From 9ddb7c78da0b4cffbc3a879f9e880e79bc015c85 Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Fri, 18 Feb 2022 15:06:08 -0800 Subject: [PATCH 01/20] new action. --- .github/workflows/build-wheel.yml | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/build-wheel.yml diff --git a/.github/workflows/build-wheel.yml b/.github/workflows/build-wheel.yml new file mode 100644 index 00000000..59846492 --- /dev/null +++ b/.github/workflows/build-wheel.yml @@ -0,0 +1,35 @@ + +name: SFCTL-build + +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.8] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install --force-reinstall -e ./src + pip install --force-reinstall -r requirements.txt + - name: Build Wheel + run: | + python sfctl/setup.py bdist_wheel --universal + + - name: upload wheel + uses: actions/upload-artifact@v2-preview + if: always() + with: + name: wheel + path: /home/runner/work/service-fabric-cli/src/dist* \ No newline at end of file From 0c995ef40a7a905d36cc1b84b55b737b414656c0 Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Tue, 5 Apr 2022 14:49:30 -0700 Subject: [PATCH 02/20] looking at formatting for new sdk. --- customSDK/__init__.py | 1 + customSDK/servicefabric/__init__.py | 15 + customSDK/servicefabric/_configuration.py | 69 + customSDK/servicefabric/_patch.py | 31 + .../_service_fabric_client_apis.py | 121 + customSDK/servicefabric/_vendor.py | 27 + customSDK/servicefabric/aio/__init__.py | 15 + customSDK/servicefabric/aio/_configuration.py | 65 + customSDK/servicefabric/aio/_patch.py | 31 + .../aio/_service_fabric_client_apis.py | 114 + .../servicefabric/aio/operations/__init__.py | 31 + .../_mesh_application_operations.py | 333 + .../_mesh_code_package_operations.py | 115 + .../operations/_mesh_gateway_operations.py | 274 + .../operations/_mesh_network_operations.py | 278 + .../aio/operations/_mesh_secret_operations.py | 278 + .../_mesh_secret_value_operations.py | 359 + .../operations/_mesh_service_operations.py | 160 + .../_mesh_service_replica_operations.py | 168 + .../aio/operations/_mesh_volume_operations.py | 274 + .../_service_fabric_client_apis_operations.py | 16791 +++++++ customSDK/servicefabric/models/__init__.py | 1826 + customSDK/servicefabric/models/_models.py | 34044 ++++++++++++++ customSDK/servicefabric/models/_models_py3.py | 36919 ++++++++++++++++ .../_service_fabric_client_apis_enums.py | 2129 + .../servicefabric/models/aad_metadata.py | 48 + .../models/aad_metadata_object.py | 34 + .../models/aad_metadata_object_py3.py | 34 + .../servicefabric/models/aad_metadata_py3.py | 48 + ...ental_named_partition_scaling_mechanism.py | 53 + ...l_named_partition_scaling_mechanism_py3.py | 53 + .../add_remove_replica_scaling_mechanism.py | 53 + ...dd_remove_replica_scaling_mechanism_py3.py | 53 + .../models/analysis_event_metadata.py | 32 + .../models/analysis_event_metadata_py3.py | 32 + .../application_backup_configuration_info.py | 54 + ...plication_backup_configuration_info_py3.py | 54 + .../models/application_backup_entity.py | 39 + .../models/application_backup_entity_py3.py | 39 + .../application_capacity_description.py | 58 + .../application_capacity_description_py3.py | 58 + ...ication_container_instance_exited_event.py | 122 + ...ion_container_instance_exited_event_py3.py | 122 + .../models/application_created_event.py | 75 + .../models/application_created_event_py3.py | 75 + .../models/application_deleted_event.py | 70 + .../models/application_deleted_event_py3.py | 70 + .../models/application_description.py | 71 + .../models/application_description_py3.py | 71 + .../servicefabric/models/application_event.py | 78 + .../models/application_event_py3.py | 78 + .../models/application_health.py | 64 + .../models/application_health_evaluation.py | 60 + .../application_health_evaluation_py3.py | 60 + .../models/application_health_policies.py | 32 + .../models/application_health_policies_py3.py | 32 + .../models/application_health_policy.py | 56 + .../application_health_policy_map_item.py | 41 + .../application_health_policy_map_item_py3.py | 41 + .../application_health_policy_map_object.py | 38 + ...pplication_health_policy_map_object_py3.py | 38 + .../models/application_health_policy_py3.py | 56 + .../models/application_health_py3.py | 64 + ...application_health_report_expired_event.py | 106 + ...ication_health_report_expired_event_py3.py | 106 + .../models/application_health_state.py | 37 + .../models/application_health_state_chunk.py | 56 + .../application_health_state_chunk_list.py | 35 + ...application_health_state_chunk_list_py3.py | 35 + .../application_health_state_chunk_py3.py | 56 + .../models/application_health_state_filter.py | 109 + .../application_health_state_filter_py3.py | 109 + .../models/application_health_state_py3.py | 37 + .../servicefabric/models/application_info.py | 78 + .../models/application_info_py3.py | 78 + .../models/application_load_info.py | 64 + .../models/application_load_info_py3.py | 64 + .../application_load_metric_information.py | 50 + ...application_load_metric_information_py3.py | 50 + .../models/application_metric_description.py | 70 + .../application_metric_description_py3.py | 70 + .../models/application_name_info.py | 39 + .../models/application_name_info_py3.py | 39 + .../application_new_health_report_event.py | 106 + ...application_new_health_report_event_py3.py | 106 + .../models/application_parameter.py | 40 + .../models/application_parameter_py3.py | 40 + .../application_process_exited_event.py | 122 + .../application_process_exited_event_py3.py | 122 + .../application_resource_description.py | 93 + .../application_resource_description_py3.py | 93 + ...lication_resource_upgrade_progress_info.py | 91 + ...tion_resource_upgrade_progress_info_py3.py | 91 + .../models/application_scoped_volume.py | 49 + ...ation_scoped_volume_creation_parameters.py | 46 + ...n_scoped_volume_creation_parameters_py3.py | 46 + ...n_parameters_service_fabric_volume_disk.py | 44 + ...rameters_service_fabric_volume_disk_py3.py | 44 + .../models/application_scoped_volume_py3.py | 49 + ...ion_type_applications_health_evaluation.py | 74 + ...type_applications_health_evaluation_py3.py | 74 + ...application_type_health_policy_map_item.py | 43 + ...ication_type_health_policy_map_item_py3.py | 43 + .../application_type_image_store_path.py | 36 + .../application_type_image_store_path_py3.py | 36 + .../models/application_type_info.py | 58 + .../models/application_type_info_py3.py | 58 + .../models/application_type_manifest.py | 29 + .../models/application_type_manifest_py3.py | 29 + .../models/application_update_description.py | 79 + .../application_update_description_py3.py | 79 + .../application_upgrade_completed_event.py | 76 + ...application_upgrade_completed_event_py3.py | 76 + .../models/application_upgrade_description.py | 125 + .../application_upgrade_description_py3.py | 125 + ...lication_upgrade_domain_completed_event.py | 93 + ...tion_upgrade_domain_completed_event_py3.py | 93 + .../application_upgrade_progress_info.py | 142 + .../application_upgrade_progress_info_py3.py | 142 + ...cation_upgrade_rollback_completed_event.py | 81 + ...on_upgrade_rollback_completed_event_py3.py | 81 + ...lication_upgrade_rollback_started_event.py | 88 + ...tion_upgrade_rollback_started_event_py3.py | 88 + .../application_upgrade_started_event.py | 92 + .../application_upgrade_started_event_py3.py | 92 + .../application_upgrade_update_description.py | 54 + ...lication_upgrade_update_description_py3.py | 54 + .../models/applications_health_evaluation.py | 63 + .../applications_health_evaluation_py3.py | 63 + .../models/auto_scaling_mechanism.py | 42 + .../models/auto_scaling_mechanism_py3.py | 42 + .../models/auto_scaling_metric.py | 42 + .../models/auto_scaling_metric_py3.py | 42 + .../models/auto_scaling_policy.py | 46 + .../models/auto_scaling_policy_py3.py | 46 + .../models/auto_scaling_resource_metric.py | 41 + .../auto_scaling_resource_metric_py3.py | 41 + .../models/auto_scaling_trigger.py | 41 + .../models/auto_scaling_trigger_py3.py | 41 + .../models/average_load_scaling_trigger.py | 58 + .../average_load_scaling_trigger_py3.py | 58 + .../average_partition_load_scaling_trigger.py | 59 + ...rage_partition_load_scaling_trigger_py3.py | 59 + .../average_service_load_scaling_trigger.py | 69 + ...verage_service_load_scaling_trigger_py3.py | 69 + .../azure_blob_backup_storage_description.py | 50 + ...ure_blob_backup_storage_description_py3.py | 50 + ...al_monitoring_pipeline_sink_description.py | 63 + ...onitoring_pipeline_sink_description_py3.py | 63 + .../models/backup_configuration_info.py | 58 + .../models/backup_configuration_info_py3.py | 58 + .../servicefabric/models/backup_entity.py | 42 + .../servicefabric/models/backup_entity_py3.py | 42 + customSDK/servicefabric/models/backup_info.py | 83 + .../servicefabric/models/backup_info_py3.py | 83 + .../models/backup_partition_description.py | 29 + .../backup_partition_description_py3.py | 29 + .../models/backup_policy_description.py | 69 + .../models/backup_policy_description_py3.py | 69 + .../models/backup_progress_info.py | 59 + .../models/backup_progress_info_py3.py | 59 + .../models/backup_schedule_description.py | 42 + .../models/backup_schedule_description_py3.py | 42 + .../models/backup_storage_description.py | 47 + .../models/backup_storage_description_py3.py | 47 + .../models/backup_suspension_info.py | 36 + .../models/backup_suspension_info_py3.py | 36 + .../basic_retention_policy_description.py | 49 + .../basic_retention_policy_description_py3.py | 49 + .../models/binary_property_value.py | 40 + .../models/binary_property_value_py3.py | 40 + customSDK/servicefabric/models/chaos.py | 40 + ...os_code_package_restart_scheduled_event.py | 91 + ...ode_package_restart_scheduled_event_py3.py | 91 + .../servicefabric/models/chaos_context.py | 34 + .../servicefabric/models/chaos_context_py3.py | 34 + customSDK/servicefabric/models/chaos_event.py | 49 + .../servicefabric/models/chaos_event_py3.py | 49 + .../models/chaos_event_wrapper.py | 28 + .../models/chaos_event_wrapper_py3.py | 28 + .../models/chaos_events_segment.py | 38 + .../models/chaos_events_segment_py3.py | 38 + .../chaos_node_restart_scheduled_event.py | 69 + .../chaos_node_restart_scheduled_event_py3.py | 69 + .../servicefabric/models/chaos_parameters.py | 107 + .../chaos_parameters_dictionary_item.py | 41 + .../chaos_parameters_dictionary_item_py3.py | 41 + .../models/chaos_parameters_py3.py | 107 + ..._partition_primary_move_scheduled_event.py | 83 + ...tition_primary_move_scheduled_event_py3.py | 83 + ...artition_secondary_move_scheduled_event.py | 88 + ...tion_secondary_move_scheduled_event_py3.py | 88 + customSDK/servicefabric/models/chaos_py3.py | 40 + .../chaos_replica_removal_scheduled_event.py | 83 + ...aos_replica_removal_scheduled_event_py3.py | 83 + .../chaos_replica_restart_scheduled_event.py | 83 + ...aos_replica_restart_scheduled_event_py3.py | 83 + .../servicefabric/models/chaos_schedule.py | 45 + .../models/chaos_schedule_description.py | 37 + .../models/chaos_schedule_description_py3.py | 37 + .../models/chaos_schedule_job.py | 40 + .../chaos_schedule_job_active_days_of_week.py | 59 + ...os_schedule_job_active_days_of_week_py3.py | 59 + .../models/chaos_schedule_job_py3.py | 40 + .../models/chaos_schedule_py3.py | 45 + .../models/chaos_started_event.py | 105 + .../models/chaos_started_event_py3.py | 105 + .../models/chaos_stopped_event.py | 55 + .../models/chaos_stopped_event_py3.py | 55 + .../models/chaos_target_filter.py | 78 + .../models/chaos_target_filter_py3.py | 78 + .../check_exists_property_batch_operation.py | 51 + ...eck_exists_property_batch_operation_py3.py | 51 + ...check_sequence_property_batch_operation.py | 52 + ...k_sequence_property_batch_operation_py3.py | 52 + .../check_value_property_batch_operation.py | 48 + ...heck_value_property_batch_operation_py3.py | 48 + .../models/cluster_configuration.py | 29 + .../models/cluster_configuration_py3.py | 29 + ...uster_configuration_upgrade_description.py | 98 + ...r_configuration_upgrade_description_py3.py | 98 + ...uster_configuration_upgrade_status_info.py | 43 + ...r_configuration_upgrade_status_info_py3.py | 43 + .../servicefabric/models/cluster_event.py | 61 + .../servicefabric/models/cluster_event_py3.py | 61 + .../servicefabric/models/cluster_health.py | 60 + .../models/cluster_health_chunk.py | 50 + .../models/cluster_health_chunk_py3.py | 50 + .../cluster_health_chunk_query_description.py | 65 + ...ster_health_chunk_query_description_py3.py | 65 + .../models/cluster_health_policies.py | 43 + .../models/cluster_health_policies_py3.py | 43 + .../models/cluster_health_policy.py | 129 + .../models/cluster_health_policy_py3.py | 129 + .../models/cluster_health_py3.py | 60 + .../cluster_health_report_expired_event.py | 91 + ...cluster_health_report_expired_event_py3.py | 91 + .../servicefabric/models/cluster_load_info.py | 41 + .../models/cluster_load_info_py3.py | 41 + .../servicefabric/models/cluster_manifest.py | 28 + .../models/cluster_manifest_py3.py | 28 + .../models/cluster_new_health_report_event.py | 91 + .../cluster_new_health_report_event_py3.py | 91 + .../models/cluster_upgrade_completed_event.py | 61 + .../cluster_upgrade_completed_event_py3.py | 61 + .../cluster_upgrade_description_object.py | 100 + .../cluster_upgrade_description_object_py3.py | 100 + .../cluster_upgrade_domain_completed_event.py | 71 + ...ster_upgrade_domain_completed_event_py3.py | 71 + .../cluster_upgrade_health_policy_object.py | 51 + ...luster_upgrade_health_policy_object_py3.py | 51 + .../models/cluster_upgrade_progress_object.py | 123 + .../cluster_upgrade_progress_object_py3.py | 123 + ...luster_upgrade_rollback_completed_event.py | 66 + ...er_upgrade_rollback_completed_event_py3.py | 66 + .../cluster_upgrade_rollback_started_event.py | 66 + ...ster_upgrade_rollback_started_event_py3.py | 66 + .../models/cluster_upgrade_started_event.py | 75 + .../cluster_upgrade_started_event_py3.py | 75 + .../servicefabric/models/cluster_version.py | 28 + .../models/cluster_version_py3.py | 28 + .../models/code_package_entry_point.py | 63 + .../models/code_package_entry_point_py3.py | 63 + .../code_package_entry_point_statistics.py | 77 + ...code_package_entry_point_statistics_py3.py | 77 + .../models/compose_deployment_status_info.py | 44 + .../compose_deployment_status_info_py3.py | 44 + .../compose_deployment_upgrade_description.py | 88 + ...pose_deployment_upgrade_description_py3.py | 88 + ...ompose_deployment_upgrade_progress_info.py | 149 + ...se_deployment_upgrade_progress_info_py3.py | 149 + .../models/config_parameter_override.py | 55 + .../models/config_parameter_override_py3.py | 55 + .../models/container_api_request_body.py | 47 + .../models/container_api_request_body_py3.py | 47 + .../models/container_api_response.py | 34 + .../models/container_api_response_py3.py | 34 + .../models/container_api_result.py | 47 + .../models/container_api_result_py3.py | 47 + .../container_code_package_properties.py | 118 + .../container_code_package_properties_py3.py | 118 + .../servicefabric/models/container_event.py | 48 + .../models/container_event_py3.py | 48 + .../models/container_instance_event.py | 50 + .../models/container_instance_event_py3.py | 50 + .../models/container_instance_view.py | 41 + .../models/container_instance_view_py3.py | 41 + .../servicefabric/models/container_label.py | 39 + .../models/container_label_py3.py | 39 + .../servicefabric/models/container_logs.py | 28 + .../models/container_logs_py3.py | 28 + .../servicefabric/models/container_state.py | 44 + .../models/container_state_py3.py | 44 + .../create_compose_deployment_description.py | 45 + ...eate_compose_deployment_description_py3.py | 45 + .../current_upgrade_domain_progress_info.py | 35 + ...urrent_upgrade_domain_progress_info_py3.py | 35 + .../current_upgrade_units_progress_info.py | 35 + ...current_upgrade_units_progress_info_py3.py | 35 + .../models/deactivation_intent_description.py | 31 + .../deactivation_intent_description_py3.py | 31 + .../models/default_execution_policy.py | 34 + .../models/default_execution_policy_py3.py | 34 + .../models/delete_property_batch_operation.py | 41 + .../delete_property_batch_operation_py3.py | 41 + .../delta_nodes_check_health_evaluation.py | 75 + ...delta_nodes_check_health_evaluation_py3.py | 75 + ...loy_service_package_to_node_description.py | 58 + ...service_package_to_node_description_py3.py | 58 + .../models/deployed_application_health.py | 62 + .../deployed_application_health_evaluation.py | 64 + ...loyed_application_health_evaluation_py3.py | 64 + .../models/deployed_application_health_py3.py | 62 + ...application_health_report_expired_event.py | 111 + ...ication_health_report_expired_event_py3.py | 111 + .../deployed_application_health_state.py | 42 + ...deployed_application_health_state_chunk.py | 43 + ...yed_application_health_state_chunk_list.py | 32 + ...application_health_state_chunk_list_py3.py | 32 + ...oyed_application_health_state_chunk_py3.py | 43 + ...eployed_application_health_state_filter.py | 90 + ...yed_application_health_state_filter_py3.py | 90 + .../deployed_application_health_state_py3.py | 42 + .../models/deployed_application_info.py | 77 + .../models/deployed_application_info_py3.py | 77 + ...yed_application_new_health_report_event.py | 111 + ...application_new_health_report_event_py3.py | 111 + ...deployed_applications_health_evaluation.py | 67 + ...oyed_applications_health_evaluation_py3.py | 67 + .../models/deployed_code_package_info.py | 84 + .../models/deployed_code_package_info_py3.py | 84 + .../models/deployed_service_package_health.py | 59 + ...loyed_service_package_health_evaluation.py | 68 + ...d_service_package_health_evaluation_py3.py | 68 + .../deployed_service_package_health_py3.py | 59 + ...ice_package_health_report_expired_event.py | 123 + ...package_health_report_expired_event_py3.py | 123 + .../deployed_service_package_health_state.py | 56 + ...oyed_service_package_health_state_chunk.py | 44 + ...service_package_health_state_chunk_list.py | 32 + ...ice_package_health_state_chunk_list_py3.py | 32 + ..._service_package_health_state_chunk_py3.py | 44 + ...yed_service_package_health_state_filter.py | 84 + ...service_package_health_state_filter_py3.py | 84 + ...ployed_service_package_health_state_py3.py | 56 + .../models/deployed_service_package_info.py | 50 + .../deployed_service_package_info_py3.py | 50 + ...service_package_new_health_report_event.py | 123 + ...ice_package_new_health_report_event_py3.py | 123 + ...oyed_service_packages_health_evaluation.py | 62 + ..._service_packages_health_evaluation_py3.py | 62 + .../deployed_service_replica_detail_info.py | 73 + ...eployed_service_replica_detail_info_py3.py | 73 + .../models/deployed_service_replica_info.py | 96 + .../deployed_service_replica_info_py3.py | 96 + .../models/deployed_service_type_info.py | 55 + .../models/deployed_service_type_info_py3.py | 55 + ...ed_stateful_service_replica_detail_info.py | 114 + ...tateful_service_replica_detail_info_py3.py | 114 + .../deployed_stateful_service_replica_info.py | 102 + ...loyed_stateful_service_replica_info_py3.py | 102 + ..._stateless_service_instance_detail_info.py | 76 + ...teless_service_instance_detail_info_py3.py | 76 + ...eployed_stateless_service_instance_info.py | 87 + ...yed_stateless_service_instance_info_py3.py | 87 + .../models/diagnostics_description.py | 37 + .../models/diagnostics_description_py3.py | 37 + .../servicefabric/models/diagnostics_ref.py | 33 + .../models/diagnostics_ref_py3.py | 33 + .../models/diagnostics_sink_properties.py | 50 + .../models/diagnostics_sink_properties_py3.py | 50 + .../models/disable_backup_description.py | 37 + .../models/disable_backup_description_py3.py | 37 + customSDK/servicefabric/models/disk_info.py | 32 + .../servicefabric/models/disk_info_py3.py | 32 + .../models/double_property_value.py | 39 + .../models/double_property_value_py3.py | 39 + ...s_azure_blob_backup_storage_description.py | 50 + ...ure_blob_backup_storage_description_py3.py | 50 + .../models/enable_backup_description.py | 35 + .../models/enable_backup_description_py3.py | 35 + .../models/endpoint_properties.py | 38 + .../models/endpoint_properties_py3.py | 38 + .../servicefabric/models/endpoint_ref.py | 28 + .../servicefabric/models/endpoint_ref_py3.py | 28 + .../ensure_availability_safety_check.py | 40 + .../ensure_availability_safety_check_py3.py | 40 + .../ensure_partition_quorum_safety_check.py | 39 + ...nsure_partition_quorum_safety_check_py3.py | 39 + .../servicefabric/models/entity_health.py | 50 + .../servicefabric/models/entity_health_py3.py | 50 + .../models/entity_health_state.py | 33 + .../models/entity_health_state_chunk.py | 31 + .../models/entity_health_state_chunk_list.py | 30 + .../entity_health_state_chunk_list_py3.py | 30 + .../models/entity_health_state_chunk_py3.py | 31 + .../models/entity_health_state_py3.py | 33 + .../models/entity_kind_health_state_count.py | 36 + .../entity_kind_health_state_count_py3.py | 36 + .../models/environment_variable.py | 39 + .../models/environment_variable_py3.py | 39 + customSDK/servicefabric/models/epoch.py | 41 + customSDK/servicefabric/models/epoch_py3.py | 41 + .../models/event_health_evaluation.py | 60 + .../models/event_health_evaluation_py3.py | 60 + .../models/executing_faults_chaos_event.py | 46 + .../executing_faults_chaos_event_py3.py | 46 + .../servicefabric/models/execution_policy.py | 41 + .../models/execution_policy_py3.py | 41 + ..._provision_application_type_description.py | 68 + ...vision_application_type_description_py3.py | 68 + .../models/fabric_code_version_info.py | 28 + .../models/fabric_code_version_info_py3.py | 28 + .../models/fabric_config_version_info.py | 28 + .../models/fabric_config_version_info_py3.py | 28 + .../servicefabric/models/fabric_error.py | 50 + .../models/fabric_error_error.py | 193 + .../models/fabric_error_error_py3.py | 193 + .../servicefabric/models/fabric_error_py3.py | 50 + .../servicefabric/models/fabric_event.py | 62 + .../servicefabric/models/fabric_event_py3.py | 62 + .../models/failed_property_batch_info.py | 46 + .../models/failed_property_batch_info_py3.py | 46 + .../failed_upgrade_domain_progress_object.py | 35 + ...iled_upgrade_domain_progress_object_py3.py | 35 + .../failure_upgrade_domain_progress_info.py | 35 + ...ailure_upgrade_domain_progress_info_py3.py | 35 + customSDK/servicefabric/models/file_info.py | 42 + .../servicefabric/models/file_info_py3.py | 42 + .../file_share_backup_storage_description.py | 60 + ...le_share_backup_storage_description_py3.py | 60 + .../servicefabric/models/file_version.py | 39 + .../servicefabric/models/file_version_py3.py | 39 + customSDK/servicefabric/models/folder_info.py | 34 + .../servicefabric/models/folder_info_py3.py | 34 + .../servicefabric/models/folder_size_info.py | 33 + .../models/folder_size_info_py3.py | 33 + ...uency_based_backup_schedule_description.py | 41 + ...y_based_backup_schedule_description_py3.py | 41 + .../models/gateway_destination.py | 45 + .../models/gateway_destination_py3.py | 45 + .../models/gateway_resource_description.py | 79 + .../gateway_resource_description_py3.py | 79 + ...get_backup_by_storage_query_description.py | 64 + ...backup_by_storage_query_description_py3.py | 64 + .../models/get_property_batch_operation.py | 48 + .../get_property_batch_operation_py3.py | 48 + .../models/guid_property_value.py | 39 + .../models/guid_property_value_py3.py | 39 + .../servicefabric/models/health_evaluation.py | 67 + .../models/health_evaluation_py3.py | 67 + .../models/health_evaluation_wrapper.py | 30 + .../models/health_evaluation_wrapper_py3.py | 30 + .../servicefabric/models/health_event.py | 163 + .../servicefabric/models/health_event_py3.py | 163 + .../models/health_information.py | 119 + .../models/health_information_py3.py | 119 + .../models/health_state_count.py | 46 + .../models/health_state_count_py3.py | 46 + .../servicefabric/models/health_statistics.py | 38 + .../models/health_statistics_py3.py | 38 + customSDK/servicefabric/models/http_config.py | 46 + .../servicefabric/models/http_config_py3.py | 46 + .../servicefabric/models/http_host_config.py | 41 + .../models/http_host_config_py3.py | 41 + .../servicefabric/models/http_route_config.py | 45 + .../models/http_route_config_py3.py | 45 + .../models/http_route_match_header.py | 42 + .../models/http_route_match_header_py3.py | 42 + .../models/http_route_match_path.py | 48 + .../models/http_route_match_path_py3.py | 48 + .../models/http_route_match_rule.py | 38 + .../models/http_route_match_rule_py3.py | 38 + .../models/identity_description.py | 55 + .../models/identity_description_py3.py | 55 + .../models/identity_item_description.py | 34 + .../models/identity_item_description_py3.py | 34 + .../models/image_registry_credential.py | 53 + .../models/image_registry_credential_py3.py | 53 + .../models/image_store_content.py | 34 + .../models/image_store_content_py3.py | 34 + .../models/image_store_copy_description.py | 54 + .../image_store_copy_description_py3.py | 54 + .../servicefabric/models/image_store_info.py | 54 + .../models/image_store_info_py3.py | 54 + ...nlined_value_secret_resource_properties.py | 59 + ...ed_value_secret_resource_properties_py3.py | 59 + .../models/instance_lifecycle_description.py | 29 + .../instance_lifecycle_description_py3.py | 29 + .../models/int64_property_value.py | 39 + .../models/int64_property_value_py3.py | 39 + .../int64_range_partition_information.py | 51 + .../int64_range_partition_information_py3.py | 51 + .../models/invoke_data_loss_result.py | 35 + .../models/invoke_data_loss_result_py3.py | 35 + .../models/invoke_quorum_loss_result.py | 35 + .../models/invoke_quorum_loss_result_py3.py | 35 + .../models/key_value_store_replica_status.py | 61 + .../key_value_store_replica_status_py3.py | 61 + .../models/load_metric_information.py | 151 + .../models/load_metric_information_py3.py | 151 + .../models/load_metric_report.py | 42 + .../models/load_metric_report_info.py | 41 + .../models/load_metric_report_info_py3.py | 41 + .../models/load_metric_report_py3.py | 42 + ...partition_information_query_description.py | 57 + ...ition_information_query_description_py3.py | 57 + .../loaded_partition_information_result.py | 51 + ...oaded_partition_information_result_list.py | 39 + ...d_partition_information_result_list_py3.py | 39 + ...loaded_partition_information_result_py3.py | 51 + .../local_network_resource_properties.py | 56 + .../local_network_resource_properties_py3.py | 56 + .../models/managed_application_identity.py | 38 + ...anaged_application_identity_description.py | 33 + ...ed_application_identity_description_py3.py | 33 + .../managed_application_identity_py3.py | 38 + ...y_azure_blob_backup_storage_description.py | 58 + ...ure_blob_backup_storage_description_py3.py | 58 + .../models/metric_load_description.py | 39 + .../models/metric_load_description_py3.py | 39 + .../models/monitoring_policy_description.py | 73 + .../monitoring_policy_description_py3.py | 73 + .../servicefabric/models/name_description.py | 35 + .../models/name_description_py3.py | 35 + .../models/named_partition_information.py | 46 + .../models/named_partition_information_py3.py | 46 + .../named_partition_scheme_description.py | 45 + .../named_partition_scheme_description_py3.py | 45 + customSDK/servicefabric/models/network_ref.py | 33 + .../servicefabric/models/network_ref_py3.py | 33 + .../models/network_resource_description.py | 39 + .../network_resource_description_py3.py | 39 + .../models/network_resource_properties.py | 60 + .../network_resource_properties_base.py | 42 + .../network_resource_properties_base_py3.py | 42 + .../models/network_resource_properties_py3.py | 60 + .../models/node_aborted_event.py | 94 + .../models/node_aborted_event_py3.py | 94 + .../models/node_added_to_cluster_event.py | 84 + .../models/node_added_to_cluster_event_py3.py | 84 + .../servicefabric/models/node_closed_event.py | 69 + .../models/node_closed_event_py3.py | 69 + .../models/node_deactivate_completed_event.py | 74 + .../node_deactivate_completed_event_py3.py | 74 + .../models/node_deactivate_started_event.py | 69 + .../node_deactivate_started_event_py3.py | 69 + .../models/node_deactivation_info.py | 50 + .../models/node_deactivation_info_py3.py | 50 + .../models/node_deactivation_task.py | 37 + .../models/node_deactivation_task_id.py | 35 + .../models/node_deactivation_task_id_py3.py | 35 + .../models/node_deactivation_task_py3.py | 37 + .../servicefabric/models/node_down_event.py | 64 + .../models/node_down_event_py3.py | 64 + customSDK/servicefabric/models/node_event.py | 66 + .../servicefabric/models/node_event_py3.py | 66 + customSDK/servicefabric/models/node_health.py | 50 + .../models/node_health_evaluation.py | 59 + .../models/node_health_evaluation_py3.py | 59 + .../servicefabric/models/node_health_py3.py | 50 + .../node_health_report_expired_event.py | 100 + .../node_health_report_expired_event_py3.py | 100 + .../servicefabric/models/node_health_state.py | 41 + .../models/node_health_state_chunk.py | 34 + .../models/node_health_state_chunk_list.py | 35 + .../node_health_state_chunk_list_py3.py | 35 + .../models/node_health_state_chunk_py3.py | 34 + .../models/node_health_state_filter.py | 66 + .../models/node_health_state_filter_py3.py | 66 + .../models/node_health_state_py3.py | 41 + customSDK/servicefabric/models/node_id.py | 29 + customSDK/servicefabric/models/node_id_py3.py | 29 + customSDK/servicefabric/models/node_impact.py | 41 + .../servicefabric/models/node_impact_py3.py | 41 + customSDK/servicefabric/models/node_info.py | 131 + .../servicefabric/models/node_info_py3.py | 131 + .../servicefabric/models/node_load_info.py | 36 + .../models/node_load_info_py3.py | 36 + .../models/node_load_metric_information.py | 84 + .../node_load_metric_information_py3.py | 84 + .../models/node_new_health_report_event.py | 100 + .../node_new_health_report_event_py3.py | 100 + .../models/node_open_failed_event.py | 99 + .../models/node_open_failed_event_py3.py | 99 + .../models/node_open_succeeded_event.py | 94 + .../models/node_open_succeeded_event_py3.py | 94 + .../models/node_removed_from_cluster_event.py | 84 + .../node_removed_from_cluster_event_py3.py | 84 + .../models/node_repair_impact_description.py | 41 + .../node_repair_impact_description_py3.py | 41 + .../models/node_repair_target_description.py | 40 + .../node_repair_target_description_py3.py | 40 + customSDK/servicefabric/models/node_result.py | 33 + .../servicefabric/models/node_result_py3.py | 33 + .../models/node_tags_description.py | 40 + .../models/node_tags_description_py3.py | 40 + .../models/node_transition_progress.py | 39 + .../models/node_transition_progress_py3.py | 39 + .../models/node_transition_result.py | 35 + .../models/node_transition_result_py3.py | 35 + .../node_type_health_policy_map_item.py | 48 + .../node_type_health_policy_map_item_py3.py | 48 + .../node_type_nodes_health_evaluation.py | 73 + .../node_type_nodes_health_evaluation_py3.py | 73 + .../servicefabric/models/node_up_event.py | 64 + .../servicefabric/models/node_up_event_py3.py | 64 + .../models/node_upgrade_progress_info.py | 44 + .../models/node_upgrade_progress_info_py3.py | 44 + .../models/nodes_health_evaluation.py | 64 + .../models/nodes_health_evaluation_py3.py | 64 + .../servicefabric/models/operation_status.py | 42 + .../models/operation_status_py3.py | 42 + .../models/package_sharing_policy_info.py | 37 + .../models/package_sharing_policy_info_py3.py | 37 + .../models/paged_application_info_list.py | 40 + .../models/paged_application_info_list_py3.py | 40 + ...d_application_resource_description_list.py | 41 + ...plication_resource_description_list_py3.py | 41 + .../paged_application_type_info_list.py | 40 + .../paged_application_type_info_list_py3.py | 40 + .../paged_backup_configuration_info_list.py | 40 + ...aged_backup_configuration_info_list_py3.py | 40 + .../models/paged_backup_entity_list.py | 40 + .../models/paged_backup_entity_list_py3.py | 40 + .../models/paged_backup_info_list.py | 39 + .../models/paged_backup_info_list_py3.py | 39 + .../paged_backup_policy_description_list.py | 40 + ...aged_backup_policy_description_list_py3.py | 40 + ...ged_compose_deployment_status_info_list.py | 40 + ...compose_deployment_status_info_list_py3.py | 40 + .../paged_deployed_application_info_list.py | 41 + ...aged_deployed_application_info_list_py3.py | 41 + ...paged_gateway_resource_description_list.py | 39 + ...d_gateway_resource_description_list_py3.py | 39 + ...paged_network_resource_description_list.py | 39 + ...d_network_resource_description_list_py3.py | 39 + .../models/paged_node_info_list.py | 39 + .../models/paged_node_info_list_py3.py | 39 + .../models/paged_property_info_list.py | 46 + .../models/paged_property_info_list_py3.py | 46 + .../models/paged_replica_info_list.py | 40 + .../models/paged_replica_info_list_py3.py | 40 + .../paged_secret_resource_description_list.py | 39 + ...ed_secret_resource_description_list_py3.py | 39 + ..._secret_value_resource_description_list.py | 41 + ...ret_value_resource_description_list_py3.py | 41 + .../models/paged_service_info_list.py | 40 + .../models/paged_service_info_list_py3.py | 40 + .../paged_service_partition_info_list.py | 40 + .../paged_service_partition_info_list_py3.py | 40 + .../paged_service_replica_description_list.py | 40 + ...ed_service_replica_description_list_py3.py | 40 + ...paged_service_resource_description_list.py | 39 + ...d_service_resource_description_list_py3.py | 39 + .../models/paged_sub_name_info_list.py | 46 + .../models/paged_sub_name_info_list_py3.py | 46 + ...paged_update_partition_load_result_list.py | 40 + ...d_update_partition_load_result_list_py3.py | 40 + .../paged_volume_resource_description_list.py | 39 + ...ed_volume_resource_description_list_py3.py | 39 + .../models/partition_analysis_event.py | 70 + .../models/partition_analysis_event_py3.py | 70 + .../partition_backup_configuration_info.py | 57 + ...partition_backup_configuration_info_py3.py | 57 + .../models/partition_backup_entity.py | 43 + .../models/partition_backup_entity_py3.py | 43 + .../models/partition_data_loss_progress.py | 36 + .../partition_data_loss_progress_py3.py | 36 + .../servicefabric/models/partition_event.py | 69 + .../models/partition_event_py3.py | 69 + .../servicefabric/models/partition_health.py | 56 + .../models/partition_health_evaluation.py | 61 + .../models/partition_health_evaluation_py3.py | 61 + .../models/partition_health_py3.py | 56 + .../partition_health_report_expired_event.py | 99 + ...rtition_health_report_expired_event_py3.py | 99 + .../models/partition_health_state.py | 37 + .../models/partition_health_state_chunk.py | 42 + .../partition_health_state_chunk_list.py | 32 + .../partition_health_state_chunk_list_py3.py | 32 + .../partition_health_state_chunk_py3.py | 42 + .../models/partition_health_state_filter.py | 84 + .../partition_health_state_filter_py3.py | 84 + .../models/partition_health_state_py3.py | 37 + .../models/partition_information.py | 51 + .../models/partition_information_py3.py | 51 + ...artition_instance_count_scale_mechanism.py | 53 + ...tion_instance_count_scale_mechanism_py3.py | 53 + .../models/partition_load_information.py | 52 + .../models/partition_load_information_py3.py | 52 + .../partition_metric_load_description.py | 62 + .../partition_metric_load_description_py3.py | 62 + .../partition_new_health_report_event.py | 99 + .../partition_new_health_report_event_py3.py | 99 + .../partition_primary_move_analysis_event.py | 87 + ...rtition_primary_move_analysis_event_py3.py | 87 + .../models/partition_quorum_loss_progress.py | 36 + .../partition_quorum_loss_progress_py3.py | 36 + .../models/partition_reconfigured_event.py | 123 + .../partition_reconfigured_event_py3.py | 123 + .../models/partition_restart_progress.py | 36 + .../models/partition_restart_progress_py3.py | 36 + .../models/partition_safety_check.py | 50 + .../models/partition_safety_check_py3.py | 50 + .../models/partition_scheme_description.py | 43 + .../partition_scheme_description_py3.py | 43 + .../models/partitions_health_evaluation.py | 66 + .../partitions_health_evaluation_py3.py | 66 + .../models/primary_replicator_status.py | 47 + .../models/primary_replicator_status_py3.py | 47 + customSDK/servicefabric/models/probe.py | 61 + customSDK/servicefabric/models/probe_exec.py | 35 + .../servicefabric/models/probe_exec_py3.py | 35 + .../servicefabric/models/probe_http_get.py | 51 + .../models/probe_http_get_headers.py | 39 + .../models/probe_http_get_headers_py3.py | 39 + .../models/probe_http_get_py3.py | 51 + customSDK/servicefabric/models/probe_py3.py | 61 + .../servicefabric/models/probe_tcp_socket.py | 34 + .../models/probe_tcp_socket_py3.py | 34 + .../models/property_batch_description_list.py | 29 + .../property_batch_description_list_py3.py | 29 + .../models/property_batch_info.py | 41 + .../models/property_batch_info_py3.py | 41 + .../models/property_batch_operation.py | 50 + .../models/property_batch_operation_py3.py | 50 + .../models/property_description.py | 44 + .../models/property_description_py3.py | 44 + .../servicefabric/models/property_info.py | 44 + .../servicefabric/models/property_info_py3.py | 44 + .../servicefabric/models/property_metadata.py | 54 + .../models/property_metadata_py3.py | 54 + .../servicefabric/models/property_value.py | 42 + .../models/property_value_py3.py | 42 + .../provision_application_type_description.py | 58 + ...ision_application_type_description_base.py | 53 + ...n_application_type_description_base_py3.py | 53 + ...vision_application_type_description_py3.py | 58 + .../models/provision_fabric_description.py | 32 + .../provision_fabric_description_py3.py | 32 + .../models/put_property_batch_operation.py | 50 + .../put_property_batch_operation_py3.py | 50 + .../models/reconfiguration_information.py | 54 + .../models/reconfiguration_information_py3.py | 54 + .../models/registry_credential.py | 38 + .../models/registry_credential_py3.py | 38 + .../models/reliable_collections_ref.py | 42 + .../models/reliable_collections_ref_py3.py | 42 + ...emote_replicator_acknowledgement_detail.py | 46 + ...e_replicator_acknowledgement_detail_py3.py | 46 + ...emote_replicator_acknowledgement_status.py | 38 + ...e_replicator_acknowledgement_status_py3.py | 38 + .../models/remote_replicator_status.py | 73 + .../models/remote_replicator_status_py3.py | 73 + .../models/repair_impact_description_base.py | 43 + .../repair_impact_description_base_py3.py | 43 + .../models/repair_target_description_base.py | 43 + .../repair_target_description_base_py3.py | 43 + customSDK/servicefabric/models/repair_task.py | 153 + .../models/repair_task_approve_description.py | 43 + .../repair_task_approve_description_py3.py | 43 + .../models/repair_task_cancel_description.py | 49 + .../repair_task_cancel_description_py3.py | 49 + .../models/repair_task_delete_description.py | 44 + .../repair_task_delete_description_py3.py | 44 + .../models/repair_task_history.py | 81 + .../models/repair_task_history_py3.py | 81 + .../servicefabric/models/repair_task_py3.py | 153 + ...r_task_update_health_policy_description.py | 57 + ...sk_update_health_policy_description_py3.py | 57 + .../models/repair_task_update_info.py | 36 + .../models/repair_task_update_info_py3.py | 36 + .../servicefabric/models/replica_event.py | 81 + .../servicefabric/models/replica_event_py3.py | 81 + .../servicefabric/models/replica_health.py | 71 + .../models/replica_health_evaluation.py | 72 + .../models/replica_health_evaluation_py3.py | 72 + .../models/replica_health_py3.py | 71 + .../models/replica_health_state.py | 56 + .../models/replica_health_state_chunk.py | 45 + .../models/replica_health_state_chunk_list.py | 30 + .../replica_health_state_chunk_list_py3.py | 30 + .../models/replica_health_state_chunk_py3.py | 45 + .../models/replica_health_state_filter.py | 71 + .../models/replica_health_state_filter_py3.py | 71 + .../models/replica_health_state_py3.py | 56 + .../servicefabric/models/replica_info.py | 67 + .../servicefabric/models/replica_info_py3.py | 67 + .../models/replica_lifecycle_description.py | 35 + .../replica_lifecycle_description_py3.py | 35 + .../models/replica_metric_load_description.py | 35 + .../replica_metric_load_description_py3.py | 35 + .../models/replica_status_base.py | 41 + .../models/replica_status_base_py3.py | 41 + .../models/replicas_health_evaluation.py | 66 + .../models/replicas_health_evaluation_py3.py | 66 + .../models/replicator_queue_status.py | 70 + .../models/replicator_queue_status_py3.py | 70 + .../servicefabric/models/replicator_status.py | 44 + .../models/replicator_status_py3.py | 44 + .../models/resolved_service_endpoint.py | 36 + .../models/resolved_service_endpoint_py3.py | 36 + .../models/resolved_service_partition.py | 55 + .../models/resolved_service_partition_py3.py | 55 + .../servicefabric/models/resource_limits.py | 35 + .../models/resource_limits_py3.py | 35 + .../servicefabric/models/resource_requests.py | 45 + .../models/resource_requests_py3.py | 45 + .../models/resource_requirements.py | 40 + .../models/resource_requirements_py3.py | 40 + ...start_deployed_code_package_description.py | 65 + ...t_deployed_code_package_description_py3.py | 65 + .../models/restart_node_description.py | 45 + .../models/restart_node_description_py3.py | 45 + .../models/restart_partition_result.py | 35 + .../models/restart_partition_result_py3.py | 35 + .../models/restore_partition_description.py | 46 + .../restore_partition_description_py3.py | 46 + .../models/restore_progress_info.py | 48 + .../models/restore_progress_info_py3.py | 48 + .../resume_application_upgrade_description.py | 36 + ...ume_application_upgrade_description_py3.py | 36 + .../resume_cluster_upgrade_description.py | 35 + .../resume_cluster_upgrade_description_py3.py | 35 + .../models/retention_policy_description.py | 41 + .../retention_policy_description_py3.py | 41 + .../rolling_upgrade_update_description.py | 118 + .../rolling_upgrade_update_description_py3.py | 118 + .../run_to_completion_execution_policy.py | 45 + .../run_to_completion_execution_policy_py3.py | 45 + .../servicefabric/models/safety_check.py | 43 + .../servicefabric/models/safety_check_py3.py | 43 + .../models/safety_check_wrapper.py | 32 + .../models/safety_check_wrapper_py3.py | 32 + .../models/scaling_mechanism_description.py | 42 + .../scaling_mechanism_description_py3.py | 42 + .../models/scaling_policy_description.py | 43 + .../models/scaling_policy_description_py3.py | 43 + .../models/scaling_trigger_description.py | 42 + .../models/scaling_trigger_description_py3.py | 42 + .../secondary_active_replicator_status.py | 66 + .../secondary_active_replicator_status_py3.py | 66 + .../secondary_idle_replicator_status.py | 66 + .../secondary_idle_replicator_status_py3.py | 66 + .../models/secondary_replicator_status.py | 80 + .../models/secondary_replicator_status_py3.py | 80 + .../models/secret_resource_description.py | 40 + .../models/secret_resource_description_py3.py | 40 + .../models/secret_resource_properties.py | 66 + .../models/secret_resource_properties_base.py | 42 + .../secret_resource_properties_base_py3.py | 42 + .../models/secret_resource_properties_py3.py | 66 + .../servicefabric/models/secret_value.py | 28 + .../models/secret_value_properties.py | 28 + .../models/secret_value_properties_py3.py | 28 + .../servicefabric/models/secret_value_py3.py | 28 + .../secret_value_resource_description.py | 39 + .../secret_value_resource_description_py3.py | 39 + .../models/seed_node_safety_check.py | 35 + .../models/seed_node_safety_check_py3.py | 35 + .../models/selected_partition.py | 37 + .../models/selected_partition_py3.py | 37 + .../service_backup_configuration_info.py | 54 + .../service_backup_configuration_info_py3.py | 54 + .../models/service_backup_entity.py | 39 + .../models/service_backup_entity_py3.py | 39 + .../models/service_correlation_description.py | 43 + .../service_correlation_description_py3.py | 43 + .../models/service_created_event.py | 114 + .../models/service_created_event_py3.py | 114 + .../models/service_deleted_event.py | 105 + .../models/service_deleted_event_py3.py | 105 + .../models/service_description.py | 132 + .../models/service_description_py3.py | 132 + .../servicefabric/models/service_event.py | 69 + .../servicefabric/models/service_event_py3.py | 69 + .../service_fabric_client_ap_is_enums.py | 1115 + .../service_from_template_description.py | 65 + .../service_from_template_description_py3.py | 65 + .../servicefabric/models/service_health.py | 56 + .../models/service_health_evaluation.py | 61 + .../models/service_health_evaluation_py3.py | 61 + .../models/service_health_py3.py | 56 + .../service_health_report_expired_event.py | 106 + ...service_health_report_expired_event_py3.py | 106 + .../models/service_health_state.py | 37 + .../models/service_health_state_chunk.py | 43 + .../models/service_health_state_chunk_list.py | 30 + .../service_health_state_chunk_list_py3.py | 30 + .../models/service_health_state_chunk_py3.py | 43 + .../models/service_health_state_filter.py | 83 + .../models/service_health_state_filter_py3.py | 83 + .../models/service_health_state_py3.py | 37 + .../servicefabric/models/service_identity.py | 32 + .../models/service_identity_py3.py | 32 + .../servicefabric/models/service_info.py | 80 + .../servicefabric/models/service_info_py3.py | 80 + .../models/service_load_metric_description.py | 66 + .../service_load_metric_description_py3.py | 66 + .../servicefabric/models/service_name_info.py | 38 + .../models/service_name_info_py3.py | 38 + .../models/service_new_health_report_event.py | 106 + .../service_new_health_report_event_py3.py | 106 + .../models/service_partition_info.py | 61 + .../models/service_partition_info_py3.py | 61 + ...ss_instances_on_node_policy_description.py | 42 + ...nstances_on_node_policy_description_py3.py | 42 + ...ement_invalid_domain_policy_description.py | 41 + ...t_invalid_domain_policy_description_py3.py | 41 + ...tially_place_service_policy_description.py | 36 + ...ly_place_service_policy_description_py3.py | 36 + .../service_placement_policy_description.py | 46 + ...ervice_placement_policy_description_py3.py | 46 + ...refer_primary_domain_policy_description.py | 48 + ...r_primary_domain_policy_description_py3.py | 48 + ..._domain_distribution_policy_description.py | 49 + ...ain_distribution_policy_description_py3.py | 49 + ...ment_required_domain_policy_description.py | 41 + ..._required_domain_policy_description_py3.py | 41 + .../models/service_properties.py | 81 + .../models/service_properties_py3.py | 81 + .../models/service_replica_description.py | 54 + .../models/service_replica_description_py3.py | 54 + .../models/service_replica_properties.py | 53 + .../models/service_replica_properties_py3.py | 53 + .../models/service_resource_description.py | 112 + .../service_resource_description_py3.py | 112 + .../models/service_type_description.py | 76 + .../models/service_type_description_py3.py | 76 + .../service_type_extension_description.py | 32 + .../service_type_extension_description_py3.py | 32 + .../models/service_type_health_policy.py | 67 + .../service_type_health_policy_map_item.py | 41 + ...service_type_health_policy_map_item_py3.py | 41 + .../models/service_type_health_policy_py3.py | 67 + .../servicefabric/models/service_type_info.py | 47 + .../models/service_type_info_py3.py | 47 + .../models/service_type_manifest.py | 29 + .../models/service_type_manifest_py3.py | 29 + .../models/service_update_description.py | 141 + .../models/service_update_description_py3.py | 141 + .../models/service_upgrade_progress.py | 39 + .../models/service_upgrade_progress_py3.py | 39 + .../models/services_health_evaluation.py | 70 + .../models/services_health_evaluation_py3.py | 70 + customSDK/servicefabric/models/setting.py | 41 + customSDK/servicefabric/models/setting_py3.py | 41 + .../models/singleton_partition_information.py | 43 + .../singleton_partition_information_py3.py | 43 + .../singleton_partition_scheme_description.py | 35 + ...gleton_partition_scheme_description_py3.py | 35 + .../start_cluster_upgrade_description.py | 114 + .../start_cluster_upgrade_description_py3.py | 114 + .../models/started_chaos_event.py | 44 + .../models/started_chaos_event_py3.py | 44 + ...ful_replica_health_report_expired_event.py | 114 + ...replica_health_report_expired_event_py3.py | 114 + ...tateful_replica_new_health_report_event.py | 114 + ...ful_replica_new_health_report_event_py3.py | 114 + .../models/stateful_service_description.py | 194 + .../stateful_service_description_py3.py | 194 + .../models/stateful_service_info.py | 70 + .../models/stateful_service_info_py3.py | 70 + .../models/stateful_service_partition_info.py | 80 + .../stateful_service_partition_info_py3.py | 80 + .../models/stateful_service_replica_health.py | 70 + .../stateful_service_replica_health_py3.py | 70 + .../stateful_service_replica_health_state.py | 56 + ...ateful_service_replica_health_state_py3.py | 56 + .../models/stateful_service_replica_info.py | 72 + .../stateful_service_replica_info_py3.py | 72 + .../stateful_service_type_description.py | 68 + .../stateful_service_type_description_py3.py | 68 + .../stateful_service_update_description.py | 173 + ...stateful_service_update_description_py3.py | 173 + ...ess_replica_health_report_expired_event.py | 109 + ...replica_health_report_expired_event_py3.py | 109 + ...ateless_replica_new_health_report_event.py | 109 + ...ess_replica_new_health_report_event_py3.py | 109 + .../models/stateless_service_description.py | 192 + .../stateless_service_description_py3.py | 192 + .../models/stateless_service_info.py | 66 + .../models/stateless_service_info_py3.py | 66 + .../stateless_service_instance_health.py | 68 + .../stateless_service_instance_health_py3.py | 68 + ...stateless_service_instance_health_state.py | 51 + ...eless_service_instance_health_state_py3.py | 51 + .../models/stateless_service_instance_info.py | 64 + .../stateless_service_instance_info_py3.py | 64 + .../stateless_service_partition_info.py | 78 + .../stateless_service_partition_info_py3.py | 78 + .../stateless_service_type_description.py | 69 + .../stateless_service_type_description_py3.py | 69 + .../stateless_service_update_description.py | 185 + ...tateless_service_update_description_py3.py | 185 + .../models/stopped_chaos_event.py | 45 + .../models/stopped_chaos_event_py3.py | 45 + .../models/string_property_value.py | 39 + .../models/string_property_value_py3.py | 39 + .../models/successful_property_batch_info.py | 42 + .../successful_property_batch_info_py3.py | 42 + .../system_application_health_evaluation.py | 56 + ...ystem_application_health_evaluation_py3.py | 56 + customSDK/servicefabric/models/tcp_config.py | 46 + .../servicefabric/models/tcp_config_py3.py | 46 + .../models/test_error_chaos_event.py | 50 + .../models/test_error_chaos_event_py3.py | 50 + .../time_based_backup_schedule_description.py | 55 + ...e_based_backup_schedule_description_py3.py | 55 + customSDK/servicefabric/models/time_of_day.py | 39 + .../servicefabric/models/time_of_day_py3.py | 39 + customSDK/servicefabric/models/time_range.py | 34 + .../servicefabric/models/time_range_py3.py | 34 + ...nt64_range_partition_scheme_description.py | 54 + ..._range_partition_scheme_description_py3.py | 54 + .../models/unplaced_replica_information.py | 37 + .../unplaced_replica_information_py3.py | 37 + ...ision_application_type_description_info.py | 45 + ...n_application_type_description_info_py3.py | 45 + .../models/unprovision_fabric_description.py | 32 + .../unprovision_fabric_description_py3.py | 32 + .../update_cluster_upgrade_description.py | 61 + .../update_cluster_upgrade_description_py3.py | 61 + .../models/update_partition_load_result.py | 35 + .../update_partition_load_result_py3.py | 35 + ...ain_delta_nodes_check_health_evaluation.py | 82 + ...delta_nodes_check_health_evaluation_py3.py | 82 + ...deployed_applications_health_evaluation.py | 72 + ...oyed_applications_health_evaluation_py3.py | 72 + .../models/upgrade_domain_info.py | 33 + .../models/upgrade_domain_info_py3.py | 33 + .../upgrade_domain_nodes_health_evaluation.py | 70 + ...rade_domain_nodes_health_evaluation_py3.py | 70 + .../upgrade_orchestration_service_state.py | 29 + ...upgrade_orchestration_service_state_py3.py | 29 + ...ade_orchestration_service_state_summary.py | 47 + ...orchestration_service_state_summary_py3.py | 47 + .../servicefabric/models/upgrade_unit_info.py | 33 + .../models/upgrade_unit_info_py3.py | 33 + .../models/upload_chunk_range.py | 34 + .../models/upload_chunk_range_py3.py | 34 + .../servicefabric/models/upload_session.py | 31 + .../models/upload_session_info.py | 49 + .../models/upload_session_info_py3.py | 49 + .../models/upload_session_py3.py | 31 + customSDK/servicefabric/models/usage_info.py | 33 + .../servicefabric/models/usage_info_py3.py | 33 + .../models/validate_cluster_upgrade_result.py | 36 + .../validate_cluster_upgrade_result_py3.py | 36 + .../models/validation_failed_chaos_event.py | 46 + .../validation_failed_chaos_event_py3.py | 46 + .../volume_provider_parameters_azure_file.py | 46 + ...lume_provider_parameters_azure_file_py3.py | 46 + .../servicefabric/models/volume_reference.py | 45 + .../models/volume_reference_py3.py | 45 + .../models/volume_resource_description.py | 66 + .../models/volume_resource_description_py3.py | 66 + .../wait_for_inbuild_replica_safety_check.py | 41 + ...it_for_inbuild_replica_safety_check_py3.py | 41 + ...wait_for_primary_placement_safety_check.py | 39 + ..._for_primary_placement_safety_check_py3.py | 39 + .../wait_for_primary_swap_safety_check.py | 40 + .../wait_for_primary_swap_safety_check_py3.py | 40 + .../wait_for_reconfiguration_safety_check.py | 39 + ...it_for_reconfiguration_safety_check_py3.py | 39 + .../models/waiting_chaos_event.py | 46 + .../models/waiting_chaos_event_py3.py | 46 + .../servicefabric/operations/__init__.py | 31 + .../_mesh_application_operations.py | 509 + .../_mesh_code_package_operations.py | 167 + .../operations/_mesh_gateway_operations.py | 416 + .../operations/_mesh_network_operations.py | 420 + .../operations/_mesh_secret_operations.py | 420 + .../_mesh_secret_value_operations.py | 549 + .../operations/_mesh_service_operations.py | 239 + .../_mesh_service_replica_operations.py | 251 + .../operations/_mesh_volume_operations.py | 416 + .../_service_fabric_client_apis_operations.py | 25421 +++++++++++ .../operations/mesh_application_operations.py | 350 + .../mesh_code_package_operations.py | 111 + .../operations/mesh_gateway_operations.py | 277 + .../operations/mesh_network_operations.py | 280 + .../operations/mesh_secret_operations.py | 277 + .../mesh_secret_value_operations.py | 364 + .../operations/mesh_service_operations.py | 164 + .../mesh_service_replica_operations.py | 168 + .../operations/mesh_volume_operations.py | 274 + customSDK/servicefabric/py.typed | 1 + .../service_fabric_client_ap_is.py | 18049 ++++++++ customSDK/servicefabric/version.py | 13 + 1091 files changed, 204822 insertions(+) create mode 100644 customSDK/__init__.py create mode 100644 customSDK/servicefabric/__init__.py create mode 100644 customSDK/servicefabric/_configuration.py create mode 100644 customSDK/servicefabric/_patch.py create mode 100644 customSDK/servicefabric/_service_fabric_client_apis.py create mode 100644 customSDK/servicefabric/_vendor.py create mode 100644 customSDK/servicefabric/aio/__init__.py create mode 100644 customSDK/servicefabric/aio/_configuration.py create mode 100644 customSDK/servicefabric/aio/_patch.py create mode 100644 customSDK/servicefabric/aio/_service_fabric_client_apis.py create mode 100644 customSDK/servicefabric/aio/operations/__init__.py create mode 100644 customSDK/servicefabric/aio/operations/_mesh_application_operations.py create mode 100644 customSDK/servicefabric/aio/operations/_mesh_code_package_operations.py create mode 100644 customSDK/servicefabric/aio/operations/_mesh_gateway_operations.py create mode 100644 customSDK/servicefabric/aio/operations/_mesh_network_operations.py create mode 100644 customSDK/servicefabric/aio/operations/_mesh_secret_operations.py create mode 100644 customSDK/servicefabric/aio/operations/_mesh_secret_value_operations.py create mode 100644 customSDK/servicefabric/aio/operations/_mesh_service_operations.py create mode 100644 customSDK/servicefabric/aio/operations/_mesh_service_replica_operations.py create mode 100644 customSDK/servicefabric/aio/operations/_mesh_volume_operations.py create mode 100644 customSDK/servicefabric/aio/operations/_service_fabric_client_apis_operations.py create mode 100644 customSDK/servicefabric/models/__init__.py create mode 100644 customSDK/servicefabric/models/_models.py create mode 100644 customSDK/servicefabric/models/_models_py3.py create mode 100644 customSDK/servicefabric/models/_service_fabric_client_apis_enums.py create mode 100644 customSDK/servicefabric/models/aad_metadata.py create mode 100644 customSDK/servicefabric/models/aad_metadata_object.py create mode 100644 customSDK/servicefabric/models/aad_metadata_object_py3.py create mode 100644 customSDK/servicefabric/models/aad_metadata_py3.py create mode 100644 customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism.py create mode 100644 customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism_py3.py create mode 100644 customSDK/servicefabric/models/add_remove_replica_scaling_mechanism.py create mode 100644 customSDK/servicefabric/models/add_remove_replica_scaling_mechanism_py3.py create mode 100644 customSDK/servicefabric/models/analysis_event_metadata.py create mode 100644 customSDK/servicefabric/models/analysis_event_metadata_py3.py create mode 100644 customSDK/servicefabric/models/application_backup_configuration_info.py create mode 100644 customSDK/servicefabric/models/application_backup_configuration_info_py3.py create mode 100644 customSDK/servicefabric/models/application_backup_entity.py create mode 100644 customSDK/servicefabric/models/application_backup_entity_py3.py create mode 100644 customSDK/servicefabric/models/application_capacity_description.py create mode 100644 customSDK/servicefabric/models/application_capacity_description_py3.py create mode 100644 customSDK/servicefabric/models/application_container_instance_exited_event.py create mode 100644 customSDK/servicefabric/models/application_container_instance_exited_event_py3.py create mode 100644 customSDK/servicefabric/models/application_created_event.py create mode 100644 customSDK/servicefabric/models/application_created_event_py3.py create mode 100644 customSDK/servicefabric/models/application_deleted_event.py create mode 100644 customSDK/servicefabric/models/application_deleted_event_py3.py create mode 100644 customSDK/servicefabric/models/application_description.py create mode 100644 customSDK/servicefabric/models/application_description_py3.py create mode 100644 customSDK/servicefabric/models/application_event.py create mode 100644 customSDK/servicefabric/models/application_event_py3.py create mode 100644 customSDK/servicefabric/models/application_health.py create mode 100644 customSDK/servicefabric/models/application_health_evaluation.py create mode 100644 customSDK/servicefabric/models/application_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/application_health_policies.py create mode 100644 customSDK/servicefabric/models/application_health_policies_py3.py create mode 100644 customSDK/servicefabric/models/application_health_policy.py create mode 100644 customSDK/servicefabric/models/application_health_policy_map_item.py create mode 100644 customSDK/servicefabric/models/application_health_policy_map_item_py3.py create mode 100644 customSDK/servicefabric/models/application_health_policy_map_object.py create mode 100644 customSDK/servicefabric/models/application_health_policy_map_object_py3.py create mode 100644 customSDK/servicefabric/models/application_health_policy_py3.py create mode 100644 customSDK/servicefabric/models/application_health_py3.py create mode 100644 customSDK/servicefabric/models/application_health_report_expired_event.py create mode 100644 customSDK/servicefabric/models/application_health_report_expired_event_py3.py create mode 100644 customSDK/servicefabric/models/application_health_state.py create mode 100644 customSDK/servicefabric/models/application_health_state_chunk.py create mode 100644 customSDK/servicefabric/models/application_health_state_chunk_list.py create mode 100644 customSDK/servicefabric/models/application_health_state_chunk_list_py3.py create mode 100644 customSDK/servicefabric/models/application_health_state_chunk_py3.py create mode 100644 customSDK/servicefabric/models/application_health_state_filter.py create mode 100644 customSDK/servicefabric/models/application_health_state_filter_py3.py create mode 100644 customSDK/servicefabric/models/application_health_state_py3.py create mode 100644 customSDK/servicefabric/models/application_info.py create mode 100644 customSDK/servicefabric/models/application_info_py3.py create mode 100644 customSDK/servicefabric/models/application_load_info.py create mode 100644 customSDK/servicefabric/models/application_load_info_py3.py create mode 100644 customSDK/servicefabric/models/application_load_metric_information.py create mode 100644 customSDK/servicefabric/models/application_load_metric_information_py3.py create mode 100644 customSDK/servicefabric/models/application_metric_description.py create mode 100644 customSDK/servicefabric/models/application_metric_description_py3.py create mode 100644 customSDK/servicefabric/models/application_name_info.py create mode 100644 customSDK/servicefabric/models/application_name_info_py3.py create mode 100644 customSDK/servicefabric/models/application_new_health_report_event.py create mode 100644 customSDK/servicefabric/models/application_new_health_report_event_py3.py create mode 100644 customSDK/servicefabric/models/application_parameter.py create mode 100644 customSDK/servicefabric/models/application_parameter_py3.py create mode 100644 customSDK/servicefabric/models/application_process_exited_event.py create mode 100644 customSDK/servicefabric/models/application_process_exited_event_py3.py create mode 100644 customSDK/servicefabric/models/application_resource_description.py create mode 100644 customSDK/servicefabric/models/application_resource_description_py3.py create mode 100644 customSDK/servicefabric/models/application_resource_upgrade_progress_info.py create mode 100644 customSDK/servicefabric/models/application_resource_upgrade_progress_info_py3.py create mode 100644 customSDK/servicefabric/models/application_scoped_volume.py create mode 100644 customSDK/servicefabric/models/application_scoped_volume_creation_parameters.py create mode 100644 customSDK/servicefabric/models/application_scoped_volume_creation_parameters_py3.py create mode 100644 customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk.py create mode 100644 customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk_py3.py create mode 100644 customSDK/servicefabric/models/application_scoped_volume_py3.py create mode 100644 customSDK/servicefabric/models/application_type_applications_health_evaluation.py create mode 100644 customSDK/servicefabric/models/application_type_applications_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/application_type_health_policy_map_item.py create mode 100644 customSDK/servicefabric/models/application_type_health_policy_map_item_py3.py create mode 100644 customSDK/servicefabric/models/application_type_image_store_path.py create mode 100644 customSDK/servicefabric/models/application_type_image_store_path_py3.py create mode 100644 customSDK/servicefabric/models/application_type_info.py create mode 100644 customSDK/servicefabric/models/application_type_info_py3.py create mode 100644 customSDK/servicefabric/models/application_type_manifest.py create mode 100644 customSDK/servicefabric/models/application_type_manifest_py3.py create mode 100644 customSDK/servicefabric/models/application_update_description.py create mode 100644 customSDK/servicefabric/models/application_update_description_py3.py create mode 100644 customSDK/servicefabric/models/application_upgrade_completed_event.py create mode 100644 customSDK/servicefabric/models/application_upgrade_completed_event_py3.py create mode 100644 customSDK/servicefabric/models/application_upgrade_description.py create mode 100644 customSDK/servicefabric/models/application_upgrade_description_py3.py create mode 100644 customSDK/servicefabric/models/application_upgrade_domain_completed_event.py create mode 100644 customSDK/servicefabric/models/application_upgrade_domain_completed_event_py3.py create mode 100644 customSDK/servicefabric/models/application_upgrade_progress_info.py create mode 100644 customSDK/servicefabric/models/application_upgrade_progress_info_py3.py create mode 100644 customSDK/servicefabric/models/application_upgrade_rollback_completed_event.py create mode 100644 customSDK/servicefabric/models/application_upgrade_rollback_completed_event_py3.py create mode 100644 customSDK/servicefabric/models/application_upgrade_rollback_started_event.py create mode 100644 customSDK/servicefabric/models/application_upgrade_rollback_started_event_py3.py create mode 100644 customSDK/servicefabric/models/application_upgrade_started_event.py create mode 100644 customSDK/servicefabric/models/application_upgrade_started_event_py3.py create mode 100644 customSDK/servicefabric/models/application_upgrade_update_description.py create mode 100644 customSDK/servicefabric/models/application_upgrade_update_description_py3.py create mode 100644 customSDK/servicefabric/models/applications_health_evaluation.py create mode 100644 customSDK/servicefabric/models/applications_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/auto_scaling_mechanism.py create mode 100644 customSDK/servicefabric/models/auto_scaling_mechanism_py3.py create mode 100644 customSDK/servicefabric/models/auto_scaling_metric.py create mode 100644 customSDK/servicefabric/models/auto_scaling_metric_py3.py create mode 100644 customSDK/servicefabric/models/auto_scaling_policy.py create mode 100644 customSDK/servicefabric/models/auto_scaling_policy_py3.py create mode 100644 customSDK/servicefabric/models/auto_scaling_resource_metric.py create mode 100644 customSDK/servicefabric/models/auto_scaling_resource_metric_py3.py create mode 100644 customSDK/servicefabric/models/auto_scaling_trigger.py create mode 100644 customSDK/servicefabric/models/auto_scaling_trigger_py3.py create mode 100644 customSDK/servicefabric/models/average_load_scaling_trigger.py create mode 100644 customSDK/servicefabric/models/average_load_scaling_trigger_py3.py create mode 100644 customSDK/servicefabric/models/average_partition_load_scaling_trigger.py create mode 100644 customSDK/servicefabric/models/average_partition_load_scaling_trigger_py3.py create mode 100644 customSDK/servicefabric/models/average_service_load_scaling_trigger.py create mode 100644 customSDK/servicefabric/models/average_service_load_scaling_trigger_py3.py create mode 100644 customSDK/servicefabric/models/azure_blob_backup_storage_description.py create mode 100644 customSDK/servicefabric/models/azure_blob_backup_storage_description_py3.py create mode 100644 customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description.py create mode 100644 customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description_py3.py create mode 100644 customSDK/servicefabric/models/backup_configuration_info.py create mode 100644 customSDK/servicefabric/models/backup_configuration_info_py3.py create mode 100644 customSDK/servicefabric/models/backup_entity.py create mode 100644 customSDK/servicefabric/models/backup_entity_py3.py create mode 100644 customSDK/servicefabric/models/backup_info.py create mode 100644 customSDK/servicefabric/models/backup_info_py3.py create mode 100644 customSDK/servicefabric/models/backup_partition_description.py create mode 100644 customSDK/servicefabric/models/backup_partition_description_py3.py create mode 100644 customSDK/servicefabric/models/backup_policy_description.py create mode 100644 customSDK/servicefabric/models/backup_policy_description_py3.py create mode 100644 customSDK/servicefabric/models/backup_progress_info.py create mode 100644 customSDK/servicefabric/models/backup_progress_info_py3.py create mode 100644 customSDK/servicefabric/models/backup_schedule_description.py create mode 100644 customSDK/servicefabric/models/backup_schedule_description_py3.py create mode 100644 customSDK/servicefabric/models/backup_storage_description.py create mode 100644 customSDK/servicefabric/models/backup_storage_description_py3.py create mode 100644 customSDK/servicefabric/models/backup_suspension_info.py create mode 100644 customSDK/servicefabric/models/backup_suspension_info_py3.py create mode 100644 customSDK/servicefabric/models/basic_retention_policy_description.py create mode 100644 customSDK/servicefabric/models/basic_retention_policy_description_py3.py create mode 100644 customSDK/servicefabric/models/binary_property_value.py create mode 100644 customSDK/servicefabric/models/binary_property_value_py3.py create mode 100644 customSDK/servicefabric/models/chaos.py create mode 100644 customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event.py create mode 100644 customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event_py3.py create mode 100644 customSDK/servicefabric/models/chaos_context.py create mode 100644 customSDK/servicefabric/models/chaos_context_py3.py create mode 100644 customSDK/servicefabric/models/chaos_event.py create mode 100644 customSDK/servicefabric/models/chaos_event_py3.py create mode 100644 customSDK/servicefabric/models/chaos_event_wrapper.py create mode 100644 customSDK/servicefabric/models/chaos_event_wrapper_py3.py create mode 100644 customSDK/servicefabric/models/chaos_events_segment.py create mode 100644 customSDK/servicefabric/models/chaos_events_segment_py3.py create mode 100644 customSDK/servicefabric/models/chaos_node_restart_scheduled_event.py create mode 100644 customSDK/servicefabric/models/chaos_node_restart_scheduled_event_py3.py create mode 100644 customSDK/servicefabric/models/chaos_parameters.py create mode 100644 customSDK/servicefabric/models/chaos_parameters_dictionary_item.py create mode 100644 customSDK/servicefabric/models/chaos_parameters_dictionary_item_py3.py create mode 100644 customSDK/servicefabric/models/chaos_parameters_py3.py create mode 100644 customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event.py create mode 100644 customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event_py3.py create mode 100644 customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event.py create mode 100644 customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event_py3.py create mode 100644 customSDK/servicefabric/models/chaos_py3.py create mode 100644 customSDK/servicefabric/models/chaos_replica_removal_scheduled_event.py create mode 100644 customSDK/servicefabric/models/chaos_replica_removal_scheduled_event_py3.py create mode 100644 customSDK/servicefabric/models/chaos_replica_restart_scheduled_event.py create mode 100644 customSDK/servicefabric/models/chaos_replica_restart_scheduled_event_py3.py create mode 100644 customSDK/servicefabric/models/chaos_schedule.py create mode 100644 customSDK/servicefabric/models/chaos_schedule_description.py create mode 100644 customSDK/servicefabric/models/chaos_schedule_description_py3.py create mode 100644 customSDK/servicefabric/models/chaos_schedule_job.py create mode 100644 customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week.py create mode 100644 customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week_py3.py create mode 100644 customSDK/servicefabric/models/chaos_schedule_job_py3.py create mode 100644 customSDK/servicefabric/models/chaos_schedule_py3.py create mode 100644 customSDK/servicefabric/models/chaos_started_event.py create mode 100644 customSDK/servicefabric/models/chaos_started_event_py3.py create mode 100644 customSDK/servicefabric/models/chaos_stopped_event.py create mode 100644 customSDK/servicefabric/models/chaos_stopped_event_py3.py create mode 100644 customSDK/servicefabric/models/chaos_target_filter.py create mode 100644 customSDK/servicefabric/models/chaos_target_filter_py3.py create mode 100644 customSDK/servicefabric/models/check_exists_property_batch_operation.py create mode 100644 customSDK/servicefabric/models/check_exists_property_batch_operation_py3.py create mode 100644 customSDK/servicefabric/models/check_sequence_property_batch_operation.py create mode 100644 customSDK/servicefabric/models/check_sequence_property_batch_operation_py3.py create mode 100644 customSDK/servicefabric/models/check_value_property_batch_operation.py create mode 100644 customSDK/servicefabric/models/check_value_property_batch_operation_py3.py create mode 100644 customSDK/servicefabric/models/cluster_configuration.py create mode 100644 customSDK/servicefabric/models/cluster_configuration_py3.py create mode 100644 customSDK/servicefabric/models/cluster_configuration_upgrade_description.py create mode 100644 customSDK/servicefabric/models/cluster_configuration_upgrade_description_py3.py create mode 100644 customSDK/servicefabric/models/cluster_configuration_upgrade_status_info.py create mode 100644 customSDK/servicefabric/models/cluster_configuration_upgrade_status_info_py3.py create mode 100644 customSDK/servicefabric/models/cluster_event.py create mode 100644 customSDK/servicefabric/models/cluster_event_py3.py create mode 100644 customSDK/servicefabric/models/cluster_health.py create mode 100644 customSDK/servicefabric/models/cluster_health_chunk.py create mode 100644 customSDK/servicefabric/models/cluster_health_chunk_py3.py create mode 100644 customSDK/servicefabric/models/cluster_health_chunk_query_description.py create mode 100644 customSDK/servicefabric/models/cluster_health_chunk_query_description_py3.py create mode 100644 customSDK/servicefabric/models/cluster_health_policies.py create mode 100644 customSDK/servicefabric/models/cluster_health_policies_py3.py create mode 100644 customSDK/servicefabric/models/cluster_health_policy.py create mode 100644 customSDK/servicefabric/models/cluster_health_policy_py3.py create mode 100644 customSDK/servicefabric/models/cluster_health_py3.py create mode 100644 customSDK/servicefabric/models/cluster_health_report_expired_event.py create mode 100644 customSDK/servicefabric/models/cluster_health_report_expired_event_py3.py create mode 100644 customSDK/servicefabric/models/cluster_load_info.py create mode 100644 customSDK/servicefabric/models/cluster_load_info_py3.py create mode 100644 customSDK/servicefabric/models/cluster_manifest.py create mode 100644 customSDK/servicefabric/models/cluster_manifest_py3.py create mode 100644 customSDK/servicefabric/models/cluster_new_health_report_event.py create mode 100644 customSDK/servicefabric/models/cluster_new_health_report_event_py3.py create mode 100644 customSDK/servicefabric/models/cluster_upgrade_completed_event.py create mode 100644 customSDK/servicefabric/models/cluster_upgrade_completed_event_py3.py create mode 100644 customSDK/servicefabric/models/cluster_upgrade_description_object.py create mode 100644 customSDK/servicefabric/models/cluster_upgrade_description_object_py3.py create mode 100644 customSDK/servicefabric/models/cluster_upgrade_domain_completed_event.py create mode 100644 customSDK/servicefabric/models/cluster_upgrade_domain_completed_event_py3.py create mode 100644 customSDK/servicefabric/models/cluster_upgrade_health_policy_object.py create mode 100644 customSDK/servicefabric/models/cluster_upgrade_health_policy_object_py3.py create mode 100644 customSDK/servicefabric/models/cluster_upgrade_progress_object.py create mode 100644 customSDK/servicefabric/models/cluster_upgrade_progress_object_py3.py create mode 100644 customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event.py create mode 100644 customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event_py3.py create mode 100644 customSDK/servicefabric/models/cluster_upgrade_rollback_started_event.py create mode 100644 customSDK/servicefabric/models/cluster_upgrade_rollback_started_event_py3.py create mode 100644 customSDK/servicefabric/models/cluster_upgrade_started_event.py create mode 100644 customSDK/servicefabric/models/cluster_upgrade_started_event_py3.py create mode 100644 customSDK/servicefabric/models/cluster_version.py create mode 100644 customSDK/servicefabric/models/cluster_version_py3.py create mode 100644 customSDK/servicefabric/models/code_package_entry_point.py create mode 100644 customSDK/servicefabric/models/code_package_entry_point_py3.py create mode 100644 customSDK/servicefabric/models/code_package_entry_point_statistics.py create mode 100644 customSDK/servicefabric/models/code_package_entry_point_statistics_py3.py create mode 100644 customSDK/servicefabric/models/compose_deployment_status_info.py create mode 100644 customSDK/servicefabric/models/compose_deployment_status_info_py3.py create mode 100644 customSDK/servicefabric/models/compose_deployment_upgrade_description.py create mode 100644 customSDK/servicefabric/models/compose_deployment_upgrade_description_py3.py create mode 100644 customSDK/servicefabric/models/compose_deployment_upgrade_progress_info.py create mode 100644 customSDK/servicefabric/models/compose_deployment_upgrade_progress_info_py3.py create mode 100644 customSDK/servicefabric/models/config_parameter_override.py create mode 100644 customSDK/servicefabric/models/config_parameter_override_py3.py create mode 100644 customSDK/servicefabric/models/container_api_request_body.py create mode 100644 customSDK/servicefabric/models/container_api_request_body_py3.py create mode 100644 customSDK/servicefabric/models/container_api_response.py create mode 100644 customSDK/servicefabric/models/container_api_response_py3.py create mode 100644 customSDK/servicefabric/models/container_api_result.py create mode 100644 customSDK/servicefabric/models/container_api_result_py3.py create mode 100644 customSDK/servicefabric/models/container_code_package_properties.py create mode 100644 customSDK/servicefabric/models/container_code_package_properties_py3.py create mode 100644 customSDK/servicefabric/models/container_event.py create mode 100644 customSDK/servicefabric/models/container_event_py3.py create mode 100644 customSDK/servicefabric/models/container_instance_event.py create mode 100644 customSDK/servicefabric/models/container_instance_event_py3.py create mode 100644 customSDK/servicefabric/models/container_instance_view.py create mode 100644 customSDK/servicefabric/models/container_instance_view_py3.py create mode 100644 customSDK/servicefabric/models/container_label.py create mode 100644 customSDK/servicefabric/models/container_label_py3.py create mode 100644 customSDK/servicefabric/models/container_logs.py create mode 100644 customSDK/servicefabric/models/container_logs_py3.py create mode 100644 customSDK/servicefabric/models/container_state.py create mode 100644 customSDK/servicefabric/models/container_state_py3.py create mode 100644 customSDK/servicefabric/models/create_compose_deployment_description.py create mode 100644 customSDK/servicefabric/models/create_compose_deployment_description_py3.py create mode 100644 customSDK/servicefabric/models/current_upgrade_domain_progress_info.py create mode 100644 customSDK/servicefabric/models/current_upgrade_domain_progress_info_py3.py create mode 100644 customSDK/servicefabric/models/current_upgrade_units_progress_info.py create mode 100644 customSDK/servicefabric/models/current_upgrade_units_progress_info_py3.py create mode 100644 customSDK/servicefabric/models/deactivation_intent_description.py create mode 100644 customSDK/servicefabric/models/deactivation_intent_description_py3.py create mode 100644 customSDK/servicefabric/models/default_execution_policy.py create mode 100644 customSDK/servicefabric/models/default_execution_policy_py3.py create mode 100644 customSDK/servicefabric/models/delete_property_batch_operation.py create mode 100644 customSDK/servicefabric/models/delete_property_batch_operation_py3.py create mode 100644 customSDK/servicefabric/models/delta_nodes_check_health_evaluation.py create mode 100644 customSDK/servicefabric/models/delta_nodes_check_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/deploy_service_package_to_node_description.py create mode 100644 customSDK/servicefabric/models/deploy_service_package_to_node_description_py3.py create mode 100644 customSDK/servicefabric/models/deployed_application_health.py create mode 100644 customSDK/servicefabric/models/deployed_application_health_evaluation.py create mode 100644 customSDK/servicefabric/models/deployed_application_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/deployed_application_health_py3.py create mode 100644 customSDK/servicefabric/models/deployed_application_health_report_expired_event.py create mode 100644 customSDK/servicefabric/models/deployed_application_health_report_expired_event_py3.py create mode 100644 customSDK/servicefabric/models/deployed_application_health_state.py create mode 100644 customSDK/servicefabric/models/deployed_application_health_state_chunk.py create mode 100644 customSDK/servicefabric/models/deployed_application_health_state_chunk_list.py create mode 100644 customSDK/servicefabric/models/deployed_application_health_state_chunk_list_py3.py create mode 100644 customSDK/servicefabric/models/deployed_application_health_state_chunk_py3.py create mode 100644 customSDK/servicefabric/models/deployed_application_health_state_filter.py create mode 100644 customSDK/servicefabric/models/deployed_application_health_state_filter_py3.py create mode 100644 customSDK/servicefabric/models/deployed_application_health_state_py3.py create mode 100644 customSDK/servicefabric/models/deployed_application_info.py create mode 100644 customSDK/servicefabric/models/deployed_application_info_py3.py create mode 100644 customSDK/servicefabric/models/deployed_application_new_health_report_event.py create mode 100644 customSDK/servicefabric/models/deployed_application_new_health_report_event_py3.py create mode 100644 customSDK/servicefabric/models/deployed_applications_health_evaluation.py create mode 100644 customSDK/servicefabric/models/deployed_applications_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/deployed_code_package_info.py create mode 100644 customSDK/servicefabric/models/deployed_code_package_info_py3.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_health.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_health_evaluation.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_health_py3.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_health_report_expired_event.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_health_report_expired_event_py3.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_health_state.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_health_state_chunk.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list_py3.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_health_state_chunk_py3.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_health_state_filter.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_health_state_filter_py3.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_health_state_py3.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_info.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_info_py3.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_new_health_report_event.py create mode 100644 customSDK/servicefabric/models/deployed_service_package_new_health_report_event_py3.py create mode 100644 customSDK/servicefabric/models/deployed_service_packages_health_evaluation.py create mode 100644 customSDK/servicefabric/models/deployed_service_packages_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/deployed_service_replica_detail_info.py create mode 100644 customSDK/servicefabric/models/deployed_service_replica_detail_info_py3.py create mode 100644 customSDK/servicefabric/models/deployed_service_replica_info.py create mode 100644 customSDK/servicefabric/models/deployed_service_replica_info_py3.py create mode 100644 customSDK/servicefabric/models/deployed_service_type_info.py create mode 100644 customSDK/servicefabric/models/deployed_service_type_info_py3.py create mode 100644 customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info.py create mode 100644 customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info_py3.py create mode 100644 customSDK/servicefabric/models/deployed_stateful_service_replica_info.py create mode 100644 customSDK/servicefabric/models/deployed_stateful_service_replica_info_py3.py create mode 100644 customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info.py create mode 100644 customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info_py3.py create mode 100644 customSDK/servicefabric/models/deployed_stateless_service_instance_info.py create mode 100644 customSDK/servicefabric/models/deployed_stateless_service_instance_info_py3.py create mode 100644 customSDK/servicefabric/models/diagnostics_description.py create mode 100644 customSDK/servicefabric/models/diagnostics_description_py3.py create mode 100644 customSDK/servicefabric/models/diagnostics_ref.py create mode 100644 customSDK/servicefabric/models/diagnostics_ref_py3.py create mode 100644 customSDK/servicefabric/models/diagnostics_sink_properties.py create mode 100644 customSDK/servicefabric/models/diagnostics_sink_properties_py3.py create mode 100644 customSDK/servicefabric/models/disable_backup_description.py create mode 100644 customSDK/servicefabric/models/disable_backup_description_py3.py create mode 100644 customSDK/servicefabric/models/disk_info.py create mode 100644 customSDK/servicefabric/models/disk_info_py3.py create mode 100644 customSDK/servicefabric/models/double_property_value.py create mode 100644 customSDK/servicefabric/models/double_property_value_py3.py create mode 100644 customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description.py create mode 100644 customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description_py3.py create mode 100644 customSDK/servicefabric/models/enable_backup_description.py create mode 100644 customSDK/servicefabric/models/enable_backup_description_py3.py create mode 100644 customSDK/servicefabric/models/endpoint_properties.py create mode 100644 customSDK/servicefabric/models/endpoint_properties_py3.py create mode 100644 customSDK/servicefabric/models/endpoint_ref.py create mode 100644 customSDK/servicefabric/models/endpoint_ref_py3.py create mode 100644 customSDK/servicefabric/models/ensure_availability_safety_check.py create mode 100644 customSDK/servicefabric/models/ensure_availability_safety_check_py3.py create mode 100644 customSDK/servicefabric/models/ensure_partition_quorum_safety_check.py create mode 100644 customSDK/servicefabric/models/ensure_partition_quorum_safety_check_py3.py create mode 100644 customSDK/servicefabric/models/entity_health.py create mode 100644 customSDK/servicefabric/models/entity_health_py3.py create mode 100644 customSDK/servicefabric/models/entity_health_state.py create mode 100644 customSDK/servicefabric/models/entity_health_state_chunk.py create mode 100644 customSDK/servicefabric/models/entity_health_state_chunk_list.py create mode 100644 customSDK/servicefabric/models/entity_health_state_chunk_list_py3.py create mode 100644 customSDK/servicefabric/models/entity_health_state_chunk_py3.py create mode 100644 customSDK/servicefabric/models/entity_health_state_py3.py create mode 100644 customSDK/servicefabric/models/entity_kind_health_state_count.py create mode 100644 customSDK/servicefabric/models/entity_kind_health_state_count_py3.py create mode 100644 customSDK/servicefabric/models/environment_variable.py create mode 100644 customSDK/servicefabric/models/environment_variable_py3.py create mode 100644 customSDK/servicefabric/models/epoch.py create mode 100644 customSDK/servicefabric/models/epoch_py3.py create mode 100644 customSDK/servicefabric/models/event_health_evaluation.py create mode 100644 customSDK/servicefabric/models/event_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/executing_faults_chaos_event.py create mode 100644 customSDK/servicefabric/models/executing_faults_chaos_event_py3.py create mode 100644 customSDK/servicefabric/models/execution_policy.py create mode 100644 customSDK/servicefabric/models/execution_policy_py3.py create mode 100644 customSDK/servicefabric/models/external_store_provision_application_type_description.py create mode 100644 customSDK/servicefabric/models/external_store_provision_application_type_description_py3.py create mode 100644 customSDK/servicefabric/models/fabric_code_version_info.py create mode 100644 customSDK/servicefabric/models/fabric_code_version_info_py3.py create mode 100644 customSDK/servicefabric/models/fabric_config_version_info.py create mode 100644 customSDK/servicefabric/models/fabric_config_version_info_py3.py create mode 100644 customSDK/servicefabric/models/fabric_error.py create mode 100644 customSDK/servicefabric/models/fabric_error_error.py create mode 100644 customSDK/servicefabric/models/fabric_error_error_py3.py create mode 100644 customSDK/servicefabric/models/fabric_error_py3.py create mode 100644 customSDK/servicefabric/models/fabric_event.py create mode 100644 customSDK/servicefabric/models/fabric_event_py3.py create mode 100644 customSDK/servicefabric/models/failed_property_batch_info.py create mode 100644 customSDK/servicefabric/models/failed_property_batch_info_py3.py create mode 100644 customSDK/servicefabric/models/failed_upgrade_domain_progress_object.py create mode 100644 customSDK/servicefabric/models/failed_upgrade_domain_progress_object_py3.py create mode 100644 customSDK/servicefabric/models/failure_upgrade_domain_progress_info.py create mode 100644 customSDK/servicefabric/models/failure_upgrade_domain_progress_info_py3.py create mode 100644 customSDK/servicefabric/models/file_info.py create mode 100644 customSDK/servicefabric/models/file_info_py3.py create mode 100644 customSDK/servicefabric/models/file_share_backup_storage_description.py create mode 100644 customSDK/servicefabric/models/file_share_backup_storage_description_py3.py create mode 100644 customSDK/servicefabric/models/file_version.py create mode 100644 customSDK/servicefabric/models/file_version_py3.py create mode 100644 customSDK/servicefabric/models/folder_info.py create mode 100644 customSDK/servicefabric/models/folder_info_py3.py create mode 100644 customSDK/servicefabric/models/folder_size_info.py create mode 100644 customSDK/servicefabric/models/folder_size_info_py3.py create mode 100644 customSDK/servicefabric/models/frequency_based_backup_schedule_description.py create mode 100644 customSDK/servicefabric/models/frequency_based_backup_schedule_description_py3.py create mode 100644 customSDK/servicefabric/models/gateway_destination.py create mode 100644 customSDK/servicefabric/models/gateway_destination_py3.py create mode 100644 customSDK/servicefabric/models/gateway_resource_description.py create mode 100644 customSDK/servicefabric/models/gateway_resource_description_py3.py create mode 100644 customSDK/servicefabric/models/get_backup_by_storage_query_description.py create mode 100644 customSDK/servicefabric/models/get_backup_by_storage_query_description_py3.py create mode 100644 customSDK/servicefabric/models/get_property_batch_operation.py create mode 100644 customSDK/servicefabric/models/get_property_batch_operation_py3.py create mode 100644 customSDK/servicefabric/models/guid_property_value.py create mode 100644 customSDK/servicefabric/models/guid_property_value_py3.py create mode 100644 customSDK/servicefabric/models/health_evaluation.py create mode 100644 customSDK/servicefabric/models/health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/health_evaluation_wrapper.py create mode 100644 customSDK/servicefabric/models/health_evaluation_wrapper_py3.py create mode 100644 customSDK/servicefabric/models/health_event.py create mode 100644 customSDK/servicefabric/models/health_event_py3.py create mode 100644 customSDK/servicefabric/models/health_information.py create mode 100644 customSDK/servicefabric/models/health_information_py3.py create mode 100644 customSDK/servicefabric/models/health_state_count.py create mode 100644 customSDK/servicefabric/models/health_state_count_py3.py create mode 100644 customSDK/servicefabric/models/health_statistics.py create mode 100644 customSDK/servicefabric/models/health_statistics_py3.py create mode 100644 customSDK/servicefabric/models/http_config.py create mode 100644 customSDK/servicefabric/models/http_config_py3.py create mode 100644 customSDK/servicefabric/models/http_host_config.py create mode 100644 customSDK/servicefabric/models/http_host_config_py3.py create mode 100644 customSDK/servicefabric/models/http_route_config.py create mode 100644 customSDK/servicefabric/models/http_route_config_py3.py create mode 100644 customSDK/servicefabric/models/http_route_match_header.py create mode 100644 customSDK/servicefabric/models/http_route_match_header_py3.py create mode 100644 customSDK/servicefabric/models/http_route_match_path.py create mode 100644 customSDK/servicefabric/models/http_route_match_path_py3.py create mode 100644 customSDK/servicefabric/models/http_route_match_rule.py create mode 100644 customSDK/servicefabric/models/http_route_match_rule_py3.py create mode 100644 customSDK/servicefabric/models/identity_description.py create mode 100644 customSDK/servicefabric/models/identity_description_py3.py create mode 100644 customSDK/servicefabric/models/identity_item_description.py create mode 100644 customSDK/servicefabric/models/identity_item_description_py3.py create mode 100644 customSDK/servicefabric/models/image_registry_credential.py create mode 100644 customSDK/servicefabric/models/image_registry_credential_py3.py create mode 100644 customSDK/servicefabric/models/image_store_content.py create mode 100644 customSDK/servicefabric/models/image_store_content_py3.py create mode 100644 customSDK/servicefabric/models/image_store_copy_description.py create mode 100644 customSDK/servicefabric/models/image_store_copy_description_py3.py create mode 100644 customSDK/servicefabric/models/image_store_info.py create mode 100644 customSDK/servicefabric/models/image_store_info_py3.py create mode 100644 customSDK/servicefabric/models/inlined_value_secret_resource_properties.py create mode 100644 customSDK/servicefabric/models/inlined_value_secret_resource_properties_py3.py create mode 100644 customSDK/servicefabric/models/instance_lifecycle_description.py create mode 100644 customSDK/servicefabric/models/instance_lifecycle_description_py3.py create mode 100644 customSDK/servicefabric/models/int64_property_value.py create mode 100644 customSDK/servicefabric/models/int64_property_value_py3.py create mode 100644 customSDK/servicefabric/models/int64_range_partition_information.py create mode 100644 customSDK/servicefabric/models/int64_range_partition_information_py3.py create mode 100644 customSDK/servicefabric/models/invoke_data_loss_result.py create mode 100644 customSDK/servicefabric/models/invoke_data_loss_result_py3.py create mode 100644 customSDK/servicefabric/models/invoke_quorum_loss_result.py create mode 100644 customSDK/servicefabric/models/invoke_quorum_loss_result_py3.py create mode 100644 customSDK/servicefabric/models/key_value_store_replica_status.py create mode 100644 customSDK/servicefabric/models/key_value_store_replica_status_py3.py create mode 100644 customSDK/servicefabric/models/load_metric_information.py create mode 100644 customSDK/servicefabric/models/load_metric_information_py3.py create mode 100644 customSDK/servicefabric/models/load_metric_report.py create mode 100644 customSDK/servicefabric/models/load_metric_report_info.py create mode 100644 customSDK/servicefabric/models/load_metric_report_info_py3.py create mode 100644 customSDK/servicefabric/models/load_metric_report_py3.py create mode 100644 customSDK/servicefabric/models/loaded_partition_information_query_description.py create mode 100644 customSDK/servicefabric/models/loaded_partition_information_query_description_py3.py create mode 100644 customSDK/servicefabric/models/loaded_partition_information_result.py create mode 100644 customSDK/servicefabric/models/loaded_partition_information_result_list.py create mode 100644 customSDK/servicefabric/models/loaded_partition_information_result_list_py3.py create mode 100644 customSDK/servicefabric/models/loaded_partition_information_result_py3.py create mode 100644 customSDK/servicefabric/models/local_network_resource_properties.py create mode 100644 customSDK/servicefabric/models/local_network_resource_properties_py3.py create mode 100644 customSDK/servicefabric/models/managed_application_identity.py create mode 100644 customSDK/servicefabric/models/managed_application_identity_description.py create mode 100644 customSDK/servicefabric/models/managed_application_identity_description_py3.py create mode 100644 customSDK/servicefabric/models/managed_application_identity_py3.py create mode 100644 customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description.py create mode 100644 customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description_py3.py create mode 100644 customSDK/servicefabric/models/metric_load_description.py create mode 100644 customSDK/servicefabric/models/metric_load_description_py3.py create mode 100644 customSDK/servicefabric/models/monitoring_policy_description.py create mode 100644 customSDK/servicefabric/models/monitoring_policy_description_py3.py create mode 100644 customSDK/servicefabric/models/name_description.py create mode 100644 customSDK/servicefabric/models/name_description_py3.py create mode 100644 customSDK/servicefabric/models/named_partition_information.py create mode 100644 customSDK/servicefabric/models/named_partition_information_py3.py create mode 100644 customSDK/servicefabric/models/named_partition_scheme_description.py create mode 100644 customSDK/servicefabric/models/named_partition_scheme_description_py3.py create mode 100644 customSDK/servicefabric/models/network_ref.py create mode 100644 customSDK/servicefabric/models/network_ref_py3.py create mode 100644 customSDK/servicefabric/models/network_resource_description.py create mode 100644 customSDK/servicefabric/models/network_resource_description_py3.py create mode 100644 customSDK/servicefabric/models/network_resource_properties.py create mode 100644 customSDK/servicefabric/models/network_resource_properties_base.py create mode 100644 customSDK/servicefabric/models/network_resource_properties_base_py3.py create mode 100644 customSDK/servicefabric/models/network_resource_properties_py3.py create mode 100644 customSDK/servicefabric/models/node_aborted_event.py create mode 100644 customSDK/servicefabric/models/node_aborted_event_py3.py create mode 100644 customSDK/servicefabric/models/node_added_to_cluster_event.py create mode 100644 customSDK/servicefabric/models/node_added_to_cluster_event_py3.py create mode 100644 customSDK/servicefabric/models/node_closed_event.py create mode 100644 customSDK/servicefabric/models/node_closed_event_py3.py create mode 100644 customSDK/servicefabric/models/node_deactivate_completed_event.py create mode 100644 customSDK/servicefabric/models/node_deactivate_completed_event_py3.py create mode 100644 customSDK/servicefabric/models/node_deactivate_started_event.py create mode 100644 customSDK/servicefabric/models/node_deactivate_started_event_py3.py create mode 100644 customSDK/servicefabric/models/node_deactivation_info.py create mode 100644 customSDK/servicefabric/models/node_deactivation_info_py3.py create mode 100644 customSDK/servicefabric/models/node_deactivation_task.py create mode 100644 customSDK/servicefabric/models/node_deactivation_task_id.py create mode 100644 customSDK/servicefabric/models/node_deactivation_task_id_py3.py create mode 100644 customSDK/servicefabric/models/node_deactivation_task_py3.py create mode 100644 customSDK/servicefabric/models/node_down_event.py create mode 100644 customSDK/servicefabric/models/node_down_event_py3.py create mode 100644 customSDK/servicefabric/models/node_event.py create mode 100644 customSDK/servicefabric/models/node_event_py3.py create mode 100644 customSDK/servicefabric/models/node_health.py create mode 100644 customSDK/servicefabric/models/node_health_evaluation.py create mode 100644 customSDK/servicefabric/models/node_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/node_health_py3.py create mode 100644 customSDK/servicefabric/models/node_health_report_expired_event.py create mode 100644 customSDK/servicefabric/models/node_health_report_expired_event_py3.py create mode 100644 customSDK/servicefabric/models/node_health_state.py create mode 100644 customSDK/servicefabric/models/node_health_state_chunk.py create mode 100644 customSDK/servicefabric/models/node_health_state_chunk_list.py create mode 100644 customSDK/servicefabric/models/node_health_state_chunk_list_py3.py create mode 100644 customSDK/servicefabric/models/node_health_state_chunk_py3.py create mode 100644 customSDK/servicefabric/models/node_health_state_filter.py create mode 100644 customSDK/servicefabric/models/node_health_state_filter_py3.py create mode 100644 customSDK/servicefabric/models/node_health_state_py3.py create mode 100644 customSDK/servicefabric/models/node_id.py create mode 100644 customSDK/servicefabric/models/node_id_py3.py create mode 100644 customSDK/servicefabric/models/node_impact.py create mode 100644 customSDK/servicefabric/models/node_impact_py3.py create mode 100644 customSDK/servicefabric/models/node_info.py create mode 100644 customSDK/servicefabric/models/node_info_py3.py create mode 100644 customSDK/servicefabric/models/node_load_info.py create mode 100644 customSDK/servicefabric/models/node_load_info_py3.py create mode 100644 customSDK/servicefabric/models/node_load_metric_information.py create mode 100644 customSDK/servicefabric/models/node_load_metric_information_py3.py create mode 100644 customSDK/servicefabric/models/node_new_health_report_event.py create mode 100644 customSDK/servicefabric/models/node_new_health_report_event_py3.py create mode 100644 customSDK/servicefabric/models/node_open_failed_event.py create mode 100644 customSDK/servicefabric/models/node_open_failed_event_py3.py create mode 100644 customSDK/servicefabric/models/node_open_succeeded_event.py create mode 100644 customSDK/servicefabric/models/node_open_succeeded_event_py3.py create mode 100644 customSDK/servicefabric/models/node_removed_from_cluster_event.py create mode 100644 customSDK/servicefabric/models/node_removed_from_cluster_event_py3.py create mode 100644 customSDK/servicefabric/models/node_repair_impact_description.py create mode 100644 customSDK/servicefabric/models/node_repair_impact_description_py3.py create mode 100644 customSDK/servicefabric/models/node_repair_target_description.py create mode 100644 customSDK/servicefabric/models/node_repair_target_description_py3.py create mode 100644 customSDK/servicefabric/models/node_result.py create mode 100644 customSDK/servicefabric/models/node_result_py3.py create mode 100644 customSDK/servicefabric/models/node_tags_description.py create mode 100644 customSDK/servicefabric/models/node_tags_description_py3.py create mode 100644 customSDK/servicefabric/models/node_transition_progress.py create mode 100644 customSDK/servicefabric/models/node_transition_progress_py3.py create mode 100644 customSDK/servicefabric/models/node_transition_result.py create mode 100644 customSDK/servicefabric/models/node_transition_result_py3.py create mode 100644 customSDK/servicefabric/models/node_type_health_policy_map_item.py create mode 100644 customSDK/servicefabric/models/node_type_health_policy_map_item_py3.py create mode 100644 customSDK/servicefabric/models/node_type_nodes_health_evaluation.py create mode 100644 customSDK/servicefabric/models/node_type_nodes_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/node_up_event.py create mode 100644 customSDK/servicefabric/models/node_up_event_py3.py create mode 100644 customSDK/servicefabric/models/node_upgrade_progress_info.py create mode 100644 customSDK/servicefabric/models/node_upgrade_progress_info_py3.py create mode 100644 customSDK/servicefabric/models/nodes_health_evaluation.py create mode 100644 customSDK/servicefabric/models/nodes_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/operation_status.py create mode 100644 customSDK/servicefabric/models/operation_status_py3.py create mode 100644 customSDK/servicefabric/models/package_sharing_policy_info.py create mode 100644 customSDK/servicefabric/models/package_sharing_policy_info_py3.py create mode 100644 customSDK/servicefabric/models/paged_application_info_list.py create mode 100644 customSDK/servicefabric/models/paged_application_info_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_application_resource_description_list.py create mode 100644 customSDK/servicefabric/models/paged_application_resource_description_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_application_type_info_list.py create mode 100644 customSDK/servicefabric/models/paged_application_type_info_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_backup_configuration_info_list.py create mode 100644 customSDK/servicefabric/models/paged_backup_configuration_info_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_backup_entity_list.py create mode 100644 customSDK/servicefabric/models/paged_backup_entity_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_backup_info_list.py create mode 100644 customSDK/servicefabric/models/paged_backup_info_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_backup_policy_description_list.py create mode 100644 customSDK/servicefabric/models/paged_backup_policy_description_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_compose_deployment_status_info_list.py create mode 100644 customSDK/servicefabric/models/paged_compose_deployment_status_info_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_deployed_application_info_list.py create mode 100644 customSDK/servicefabric/models/paged_deployed_application_info_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_gateway_resource_description_list.py create mode 100644 customSDK/servicefabric/models/paged_gateway_resource_description_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_network_resource_description_list.py create mode 100644 customSDK/servicefabric/models/paged_network_resource_description_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_node_info_list.py create mode 100644 customSDK/servicefabric/models/paged_node_info_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_property_info_list.py create mode 100644 customSDK/servicefabric/models/paged_property_info_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_replica_info_list.py create mode 100644 customSDK/servicefabric/models/paged_replica_info_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_secret_resource_description_list.py create mode 100644 customSDK/servicefabric/models/paged_secret_resource_description_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_secret_value_resource_description_list.py create mode 100644 customSDK/servicefabric/models/paged_secret_value_resource_description_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_service_info_list.py create mode 100644 customSDK/servicefabric/models/paged_service_info_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_service_partition_info_list.py create mode 100644 customSDK/servicefabric/models/paged_service_partition_info_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_service_replica_description_list.py create mode 100644 customSDK/servicefabric/models/paged_service_replica_description_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_service_resource_description_list.py create mode 100644 customSDK/servicefabric/models/paged_service_resource_description_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_sub_name_info_list.py create mode 100644 customSDK/servicefabric/models/paged_sub_name_info_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_update_partition_load_result_list.py create mode 100644 customSDK/servicefabric/models/paged_update_partition_load_result_list_py3.py create mode 100644 customSDK/servicefabric/models/paged_volume_resource_description_list.py create mode 100644 customSDK/servicefabric/models/paged_volume_resource_description_list_py3.py create mode 100644 customSDK/servicefabric/models/partition_analysis_event.py create mode 100644 customSDK/servicefabric/models/partition_analysis_event_py3.py create mode 100644 customSDK/servicefabric/models/partition_backup_configuration_info.py create mode 100644 customSDK/servicefabric/models/partition_backup_configuration_info_py3.py create mode 100644 customSDK/servicefabric/models/partition_backup_entity.py create mode 100644 customSDK/servicefabric/models/partition_backup_entity_py3.py create mode 100644 customSDK/servicefabric/models/partition_data_loss_progress.py create mode 100644 customSDK/servicefabric/models/partition_data_loss_progress_py3.py create mode 100644 customSDK/servicefabric/models/partition_event.py create mode 100644 customSDK/servicefabric/models/partition_event_py3.py create mode 100644 customSDK/servicefabric/models/partition_health.py create mode 100644 customSDK/servicefabric/models/partition_health_evaluation.py create mode 100644 customSDK/servicefabric/models/partition_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/partition_health_py3.py create mode 100644 customSDK/servicefabric/models/partition_health_report_expired_event.py create mode 100644 customSDK/servicefabric/models/partition_health_report_expired_event_py3.py create mode 100644 customSDK/servicefabric/models/partition_health_state.py create mode 100644 customSDK/servicefabric/models/partition_health_state_chunk.py create mode 100644 customSDK/servicefabric/models/partition_health_state_chunk_list.py create mode 100644 customSDK/servicefabric/models/partition_health_state_chunk_list_py3.py create mode 100644 customSDK/servicefabric/models/partition_health_state_chunk_py3.py create mode 100644 customSDK/servicefabric/models/partition_health_state_filter.py create mode 100644 customSDK/servicefabric/models/partition_health_state_filter_py3.py create mode 100644 customSDK/servicefabric/models/partition_health_state_py3.py create mode 100644 customSDK/servicefabric/models/partition_information.py create mode 100644 customSDK/servicefabric/models/partition_information_py3.py create mode 100644 customSDK/servicefabric/models/partition_instance_count_scale_mechanism.py create mode 100644 customSDK/servicefabric/models/partition_instance_count_scale_mechanism_py3.py create mode 100644 customSDK/servicefabric/models/partition_load_information.py create mode 100644 customSDK/servicefabric/models/partition_load_information_py3.py create mode 100644 customSDK/servicefabric/models/partition_metric_load_description.py create mode 100644 customSDK/servicefabric/models/partition_metric_load_description_py3.py create mode 100644 customSDK/servicefabric/models/partition_new_health_report_event.py create mode 100644 customSDK/servicefabric/models/partition_new_health_report_event_py3.py create mode 100644 customSDK/servicefabric/models/partition_primary_move_analysis_event.py create mode 100644 customSDK/servicefabric/models/partition_primary_move_analysis_event_py3.py create mode 100644 customSDK/servicefabric/models/partition_quorum_loss_progress.py create mode 100644 customSDK/servicefabric/models/partition_quorum_loss_progress_py3.py create mode 100644 customSDK/servicefabric/models/partition_reconfigured_event.py create mode 100644 customSDK/servicefabric/models/partition_reconfigured_event_py3.py create mode 100644 customSDK/servicefabric/models/partition_restart_progress.py create mode 100644 customSDK/servicefabric/models/partition_restart_progress_py3.py create mode 100644 customSDK/servicefabric/models/partition_safety_check.py create mode 100644 customSDK/servicefabric/models/partition_safety_check_py3.py create mode 100644 customSDK/servicefabric/models/partition_scheme_description.py create mode 100644 customSDK/servicefabric/models/partition_scheme_description_py3.py create mode 100644 customSDK/servicefabric/models/partitions_health_evaluation.py create mode 100644 customSDK/servicefabric/models/partitions_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/primary_replicator_status.py create mode 100644 customSDK/servicefabric/models/primary_replicator_status_py3.py create mode 100644 customSDK/servicefabric/models/probe.py create mode 100644 customSDK/servicefabric/models/probe_exec.py create mode 100644 customSDK/servicefabric/models/probe_exec_py3.py create mode 100644 customSDK/servicefabric/models/probe_http_get.py create mode 100644 customSDK/servicefabric/models/probe_http_get_headers.py create mode 100644 customSDK/servicefabric/models/probe_http_get_headers_py3.py create mode 100644 customSDK/servicefabric/models/probe_http_get_py3.py create mode 100644 customSDK/servicefabric/models/probe_py3.py create mode 100644 customSDK/servicefabric/models/probe_tcp_socket.py create mode 100644 customSDK/servicefabric/models/probe_tcp_socket_py3.py create mode 100644 customSDK/servicefabric/models/property_batch_description_list.py create mode 100644 customSDK/servicefabric/models/property_batch_description_list_py3.py create mode 100644 customSDK/servicefabric/models/property_batch_info.py create mode 100644 customSDK/servicefabric/models/property_batch_info_py3.py create mode 100644 customSDK/servicefabric/models/property_batch_operation.py create mode 100644 customSDK/servicefabric/models/property_batch_operation_py3.py create mode 100644 customSDK/servicefabric/models/property_description.py create mode 100644 customSDK/servicefabric/models/property_description_py3.py create mode 100644 customSDK/servicefabric/models/property_info.py create mode 100644 customSDK/servicefabric/models/property_info_py3.py create mode 100644 customSDK/servicefabric/models/property_metadata.py create mode 100644 customSDK/servicefabric/models/property_metadata_py3.py create mode 100644 customSDK/servicefabric/models/property_value.py create mode 100644 customSDK/servicefabric/models/property_value_py3.py create mode 100644 customSDK/servicefabric/models/provision_application_type_description.py create mode 100644 customSDK/servicefabric/models/provision_application_type_description_base.py create mode 100644 customSDK/servicefabric/models/provision_application_type_description_base_py3.py create mode 100644 customSDK/servicefabric/models/provision_application_type_description_py3.py create mode 100644 customSDK/servicefabric/models/provision_fabric_description.py create mode 100644 customSDK/servicefabric/models/provision_fabric_description_py3.py create mode 100644 customSDK/servicefabric/models/put_property_batch_operation.py create mode 100644 customSDK/servicefabric/models/put_property_batch_operation_py3.py create mode 100644 customSDK/servicefabric/models/reconfiguration_information.py create mode 100644 customSDK/servicefabric/models/reconfiguration_information_py3.py create mode 100644 customSDK/servicefabric/models/registry_credential.py create mode 100644 customSDK/servicefabric/models/registry_credential_py3.py create mode 100644 customSDK/servicefabric/models/reliable_collections_ref.py create mode 100644 customSDK/servicefabric/models/reliable_collections_ref_py3.py create mode 100644 customSDK/servicefabric/models/remote_replicator_acknowledgement_detail.py create mode 100644 customSDK/servicefabric/models/remote_replicator_acknowledgement_detail_py3.py create mode 100644 customSDK/servicefabric/models/remote_replicator_acknowledgement_status.py create mode 100644 customSDK/servicefabric/models/remote_replicator_acknowledgement_status_py3.py create mode 100644 customSDK/servicefabric/models/remote_replicator_status.py create mode 100644 customSDK/servicefabric/models/remote_replicator_status_py3.py create mode 100644 customSDK/servicefabric/models/repair_impact_description_base.py create mode 100644 customSDK/servicefabric/models/repair_impact_description_base_py3.py create mode 100644 customSDK/servicefabric/models/repair_target_description_base.py create mode 100644 customSDK/servicefabric/models/repair_target_description_base_py3.py create mode 100644 customSDK/servicefabric/models/repair_task.py create mode 100644 customSDK/servicefabric/models/repair_task_approve_description.py create mode 100644 customSDK/servicefabric/models/repair_task_approve_description_py3.py create mode 100644 customSDK/servicefabric/models/repair_task_cancel_description.py create mode 100644 customSDK/servicefabric/models/repair_task_cancel_description_py3.py create mode 100644 customSDK/servicefabric/models/repair_task_delete_description.py create mode 100644 customSDK/servicefabric/models/repair_task_delete_description_py3.py create mode 100644 customSDK/servicefabric/models/repair_task_history.py create mode 100644 customSDK/servicefabric/models/repair_task_history_py3.py create mode 100644 customSDK/servicefabric/models/repair_task_py3.py create mode 100644 customSDK/servicefabric/models/repair_task_update_health_policy_description.py create mode 100644 customSDK/servicefabric/models/repair_task_update_health_policy_description_py3.py create mode 100644 customSDK/servicefabric/models/repair_task_update_info.py create mode 100644 customSDK/servicefabric/models/repair_task_update_info_py3.py create mode 100644 customSDK/servicefabric/models/replica_event.py create mode 100644 customSDK/servicefabric/models/replica_event_py3.py create mode 100644 customSDK/servicefabric/models/replica_health.py create mode 100644 customSDK/servicefabric/models/replica_health_evaluation.py create mode 100644 customSDK/servicefabric/models/replica_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/replica_health_py3.py create mode 100644 customSDK/servicefabric/models/replica_health_state.py create mode 100644 customSDK/servicefabric/models/replica_health_state_chunk.py create mode 100644 customSDK/servicefabric/models/replica_health_state_chunk_list.py create mode 100644 customSDK/servicefabric/models/replica_health_state_chunk_list_py3.py create mode 100644 customSDK/servicefabric/models/replica_health_state_chunk_py3.py create mode 100644 customSDK/servicefabric/models/replica_health_state_filter.py create mode 100644 customSDK/servicefabric/models/replica_health_state_filter_py3.py create mode 100644 customSDK/servicefabric/models/replica_health_state_py3.py create mode 100644 customSDK/servicefabric/models/replica_info.py create mode 100644 customSDK/servicefabric/models/replica_info_py3.py create mode 100644 customSDK/servicefabric/models/replica_lifecycle_description.py create mode 100644 customSDK/servicefabric/models/replica_lifecycle_description_py3.py create mode 100644 customSDK/servicefabric/models/replica_metric_load_description.py create mode 100644 customSDK/servicefabric/models/replica_metric_load_description_py3.py create mode 100644 customSDK/servicefabric/models/replica_status_base.py create mode 100644 customSDK/servicefabric/models/replica_status_base_py3.py create mode 100644 customSDK/servicefabric/models/replicas_health_evaluation.py create mode 100644 customSDK/servicefabric/models/replicas_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/replicator_queue_status.py create mode 100644 customSDK/servicefabric/models/replicator_queue_status_py3.py create mode 100644 customSDK/servicefabric/models/replicator_status.py create mode 100644 customSDK/servicefabric/models/replicator_status_py3.py create mode 100644 customSDK/servicefabric/models/resolved_service_endpoint.py create mode 100644 customSDK/servicefabric/models/resolved_service_endpoint_py3.py create mode 100644 customSDK/servicefabric/models/resolved_service_partition.py create mode 100644 customSDK/servicefabric/models/resolved_service_partition_py3.py create mode 100644 customSDK/servicefabric/models/resource_limits.py create mode 100644 customSDK/servicefabric/models/resource_limits_py3.py create mode 100644 customSDK/servicefabric/models/resource_requests.py create mode 100644 customSDK/servicefabric/models/resource_requests_py3.py create mode 100644 customSDK/servicefabric/models/resource_requirements.py create mode 100644 customSDK/servicefabric/models/resource_requirements_py3.py create mode 100644 customSDK/servicefabric/models/restart_deployed_code_package_description.py create mode 100644 customSDK/servicefabric/models/restart_deployed_code_package_description_py3.py create mode 100644 customSDK/servicefabric/models/restart_node_description.py create mode 100644 customSDK/servicefabric/models/restart_node_description_py3.py create mode 100644 customSDK/servicefabric/models/restart_partition_result.py create mode 100644 customSDK/servicefabric/models/restart_partition_result_py3.py create mode 100644 customSDK/servicefabric/models/restore_partition_description.py create mode 100644 customSDK/servicefabric/models/restore_partition_description_py3.py create mode 100644 customSDK/servicefabric/models/restore_progress_info.py create mode 100644 customSDK/servicefabric/models/restore_progress_info_py3.py create mode 100644 customSDK/servicefabric/models/resume_application_upgrade_description.py create mode 100644 customSDK/servicefabric/models/resume_application_upgrade_description_py3.py create mode 100644 customSDK/servicefabric/models/resume_cluster_upgrade_description.py create mode 100644 customSDK/servicefabric/models/resume_cluster_upgrade_description_py3.py create mode 100644 customSDK/servicefabric/models/retention_policy_description.py create mode 100644 customSDK/servicefabric/models/retention_policy_description_py3.py create mode 100644 customSDK/servicefabric/models/rolling_upgrade_update_description.py create mode 100644 customSDK/servicefabric/models/rolling_upgrade_update_description_py3.py create mode 100644 customSDK/servicefabric/models/run_to_completion_execution_policy.py create mode 100644 customSDK/servicefabric/models/run_to_completion_execution_policy_py3.py create mode 100644 customSDK/servicefabric/models/safety_check.py create mode 100644 customSDK/servicefabric/models/safety_check_py3.py create mode 100644 customSDK/servicefabric/models/safety_check_wrapper.py create mode 100644 customSDK/servicefabric/models/safety_check_wrapper_py3.py create mode 100644 customSDK/servicefabric/models/scaling_mechanism_description.py create mode 100644 customSDK/servicefabric/models/scaling_mechanism_description_py3.py create mode 100644 customSDK/servicefabric/models/scaling_policy_description.py create mode 100644 customSDK/servicefabric/models/scaling_policy_description_py3.py create mode 100644 customSDK/servicefabric/models/scaling_trigger_description.py create mode 100644 customSDK/servicefabric/models/scaling_trigger_description_py3.py create mode 100644 customSDK/servicefabric/models/secondary_active_replicator_status.py create mode 100644 customSDK/servicefabric/models/secondary_active_replicator_status_py3.py create mode 100644 customSDK/servicefabric/models/secondary_idle_replicator_status.py create mode 100644 customSDK/servicefabric/models/secondary_idle_replicator_status_py3.py create mode 100644 customSDK/servicefabric/models/secondary_replicator_status.py create mode 100644 customSDK/servicefabric/models/secondary_replicator_status_py3.py create mode 100644 customSDK/servicefabric/models/secret_resource_description.py create mode 100644 customSDK/servicefabric/models/secret_resource_description_py3.py create mode 100644 customSDK/servicefabric/models/secret_resource_properties.py create mode 100644 customSDK/servicefabric/models/secret_resource_properties_base.py create mode 100644 customSDK/servicefabric/models/secret_resource_properties_base_py3.py create mode 100644 customSDK/servicefabric/models/secret_resource_properties_py3.py create mode 100644 customSDK/servicefabric/models/secret_value.py create mode 100644 customSDK/servicefabric/models/secret_value_properties.py create mode 100644 customSDK/servicefabric/models/secret_value_properties_py3.py create mode 100644 customSDK/servicefabric/models/secret_value_py3.py create mode 100644 customSDK/servicefabric/models/secret_value_resource_description.py create mode 100644 customSDK/servicefabric/models/secret_value_resource_description_py3.py create mode 100644 customSDK/servicefabric/models/seed_node_safety_check.py create mode 100644 customSDK/servicefabric/models/seed_node_safety_check_py3.py create mode 100644 customSDK/servicefabric/models/selected_partition.py create mode 100644 customSDK/servicefabric/models/selected_partition_py3.py create mode 100644 customSDK/servicefabric/models/service_backup_configuration_info.py create mode 100644 customSDK/servicefabric/models/service_backup_configuration_info_py3.py create mode 100644 customSDK/servicefabric/models/service_backup_entity.py create mode 100644 customSDK/servicefabric/models/service_backup_entity_py3.py create mode 100644 customSDK/servicefabric/models/service_correlation_description.py create mode 100644 customSDK/servicefabric/models/service_correlation_description_py3.py create mode 100644 customSDK/servicefabric/models/service_created_event.py create mode 100644 customSDK/servicefabric/models/service_created_event_py3.py create mode 100644 customSDK/servicefabric/models/service_deleted_event.py create mode 100644 customSDK/servicefabric/models/service_deleted_event_py3.py create mode 100644 customSDK/servicefabric/models/service_description.py create mode 100644 customSDK/servicefabric/models/service_description_py3.py create mode 100644 customSDK/servicefabric/models/service_event.py create mode 100644 customSDK/servicefabric/models/service_event_py3.py create mode 100644 customSDK/servicefabric/models/service_fabric_client_ap_is_enums.py create mode 100644 customSDK/servicefabric/models/service_from_template_description.py create mode 100644 customSDK/servicefabric/models/service_from_template_description_py3.py create mode 100644 customSDK/servicefabric/models/service_health.py create mode 100644 customSDK/servicefabric/models/service_health_evaluation.py create mode 100644 customSDK/servicefabric/models/service_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/service_health_py3.py create mode 100644 customSDK/servicefabric/models/service_health_report_expired_event.py create mode 100644 customSDK/servicefabric/models/service_health_report_expired_event_py3.py create mode 100644 customSDK/servicefabric/models/service_health_state.py create mode 100644 customSDK/servicefabric/models/service_health_state_chunk.py create mode 100644 customSDK/servicefabric/models/service_health_state_chunk_list.py create mode 100644 customSDK/servicefabric/models/service_health_state_chunk_list_py3.py create mode 100644 customSDK/servicefabric/models/service_health_state_chunk_py3.py create mode 100644 customSDK/servicefabric/models/service_health_state_filter.py create mode 100644 customSDK/servicefabric/models/service_health_state_filter_py3.py create mode 100644 customSDK/servicefabric/models/service_health_state_py3.py create mode 100644 customSDK/servicefabric/models/service_identity.py create mode 100644 customSDK/servicefabric/models/service_identity_py3.py create mode 100644 customSDK/servicefabric/models/service_info.py create mode 100644 customSDK/servicefabric/models/service_info_py3.py create mode 100644 customSDK/servicefabric/models/service_load_metric_description.py create mode 100644 customSDK/servicefabric/models/service_load_metric_description_py3.py create mode 100644 customSDK/servicefabric/models/service_name_info.py create mode 100644 customSDK/servicefabric/models/service_name_info_py3.py create mode 100644 customSDK/servicefabric/models/service_new_health_report_event.py create mode 100644 customSDK/servicefabric/models/service_new_health_report_event_py3.py create mode 100644 customSDK/servicefabric/models/service_partition_info.py create mode 100644 customSDK/servicefabric/models/service_partition_info_py3.py create mode 100644 customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description.py create mode 100644 customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description_py3.py create mode 100644 customSDK/servicefabric/models/service_placement_invalid_domain_policy_description.py create mode 100644 customSDK/servicefabric/models/service_placement_invalid_domain_policy_description_py3.py create mode 100644 customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description.py create mode 100644 customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description_py3.py create mode 100644 customSDK/servicefabric/models/service_placement_policy_description.py create mode 100644 customSDK/servicefabric/models/service_placement_policy_description_py3.py create mode 100644 customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description.py create mode 100644 customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description_py3.py create mode 100644 customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description.py create mode 100644 customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description_py3.py create mode 100644 customSDK/servicefabric/models/service_placement_required_domain_policy_description.py create mode 100644 customSDK/servicefabric/models/service_placement_required_domain_policy_description_py3.py create mode 100644 customSDK/servicefabric/models/service_properties.py create mode 100644 customSDK/servicefabric/models/service_properties_py3.py create mode 100644 customSDK/servicefabric/models/service_replica_description.py create mode 100644 customSDK/servicefabric/models/service_replica_description_py3.py create mode 100644 customSDK/servicefabric/models/service_replica_properties.py create mode 100644 customSDK/servicefabric/models/service_replica_properties_py3.py create mode 100644 customSDK/servicefabric/models/service_resource_description.py create mode 100644 customSDK/servicefabric/models/service_resource_description_py3.py create mode 100644 customSDK/servicefabric/models/service_type_description.py create mode 100644 customSDK/servicefabric/models/service_type_description_py3.py create mode 100644 customSDK/servicefabric/models/service_type_extension_description.py create mode 100644 customSDK/servicefabric/models/service_type_extension_description_py3.py create mode 100644 customSDK/servicefabric/models/service_type_health_policy.py create mode 100644 customSDK/servicefabric/models/service_type_health_policy_map_item.py create mode 100644 customSDK/servicefabric/models/service_type_health_policy_map_item_py3.py create mode 100644 customSDK/servicefabric/models/service_type_health_policy_py3.py create mode 100644 customSDK/servicefabric/models/service_type_info.py create mode 100644 customSDK/servicefabric/models/service_type_info_py3.py create mode 100644 customSDK/servicefabric/models/service_type_manifest.py create mode 100644 customSDK/servicefabric/models/service_type_manifest_py3.py create mode 100644 customSDK/servicefabric/models/service_update_description.py create mode 100644 customSDK/servicefabric/models/service_update_description_py3.py create mode 100644 customSDK/servicefabric/models/service_upgrade_progress.py create mode 100644 customSDK/servicefabric/models/service_upgrade_progress_py3.py create mode 100644 customSDK/servicefabric/models/services_health_evaluation.py create mode 100644 customSDK/servicefabric/models/services_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/setting.py create mode 100644 customSDK/servicefabric/models/setting_py3.py create mode 100644 customSDK/servicefabric/models/singleton_partition_information.py create mode 100644 customSDK/servicefabric/models/singleton_partition_information_py3.py create mode 100644 customSDK/servicefabric/models/singleton_partition_scheme_description.py create mode 100644 customSDK/servicefabric/models/singleton_partition_scheme_description_py3.py create mode 100644 customSDK/servicefabric/models/start_cluster_upgrade_description.py create mode 100644 customSDK/servicefabric/models/start_cluster_upgrade_description_py3.py create mode 100644 customSDK/servicefabric/models/started_chaos_event.py create mode 100644 customSDK/servicefabric/models/started_chaos_event_py3.py create mode 100644 customSDK/servicefabric/models/stateful_replica_health_report_expired_event.py create mode 100644 customSDK/servicefabric/models/stateful_replica_health_report_expired_event_py3.py create mode 100644 customSDK/servicefabric/models/stateful_replica_new_health_report_event.py create mode 100644 customSDK/servicefabric/models/stateful_replica_new_health_report_event_py3.py create mode 100644 customSDK/servicefabric/models/stateful_service_description.py create mode 100644 customSDK/servicefabric/models/stateful_service_description_py3.py create mode 100644 customSDK/servicefabric/models/stateful_service_info.py create mode 100644 customSDK/servicefabric/models/stateful_service_info_py3.py create mode 100644 customSDK/servicefabric/models/stateful_service_partition_info.py create mode 100644 customSDK/servicefabric/models/stateful_service_partition_info_py3.py create mode 100644 customSDK/servicefabric/models/stateful_service_replica_health.py create mode 100644 customSDK/servicefabric/models/stateful_service_replica_health_py3.py create mode 100644 customSDK/servicefabric/models/stateful_service_replica_health_state.py create mode 100644 customSDK/servicefabric/models/stateful_service_replica_health_state_py3.py create mode 100644 customSDK/servicefabric/models/stateful_service_replica_info.py create mode 100644 customSDK/servicefabric/models/stateful_service_replica_info_py3.py create mode 100644 customSDK/servicefabric/models/stateful_service_type_description.py create mode 100644 customSDK/servicefabric/models/stateful_service_type_description_py3.py create mode 100644 customSDK/servicefabric/models/stateful_service_update_description.py create mode 100644 customSDK/servicefabric/models/stateful_service_update_description_py3.py create mode 100644 customSDK/servicefabric/models/stateless_replica_health_report_expired_event.py create mode 100644 customSDK/servicefabric/models/stateless_replica_health_report_expired_event_py3.py create mode 100644 customSDK/servicefabric/models/stateless_replica_new_health_report_event.py create mode 100644 customSDK/servicefabric/models/stateless_replica_new_health_report_event_py3.py create mode 100644 customSDK/servicefabric/models/stateless_service_description.py create mode 100644 customSDK/servicefabric/models/stateless_service_description_py3.py create mode 100644 customSDK/servicefabric/models/stateless_service_info.py create mode 100644 customSDK/servicefabric/models/stateless_service_info_py3.py create mode 100644 customSDK/servicefabric/models/stateless_service_instance_health.py create mode 100644 customSDK/servicefabric/models/stateless_service_instance_health_py3.py create mode 100644 customSDK/servicefabric/models/stateless_service_instance_health_state.py create mode 100644 customSDK/servicefabric/models/stateless_service_instance_health_state_py3.py create mode 100644 customSDK/servicefabric/models/stateless_service_instance_info.py create mode 100644 customSDK/servicefabric/models/stateless_service_instance_info_py3.py create mode 100644 customSDK/servicefabric/models/stateless_service_partition_info.py create mode 100644 customSDK/servicefabric/models/stateless_service_partition_info_py3.py create mode 100644 customSDK/servicefabric/models/stateless_service_type_description.py create mode 100644 customSDK/servicefabric/models/stateless_service_type_description_py3.py create mode 100644 customSDK/servicefabric/models/stateless_service_update_description.py create mode 100644 customSDK/servicefabric/models/stateless_service_update_description_py3.py create mode 100644 customSDK/servicefabric/models/stopped_chaos_event.py create mode 100644 customSDK/servicefabric/models/stopped_chaos_event_py3.py create mode 100644 customSDK/servicefabric/models/string_property_value.py create mode 100644 customSDK/servicefabric/models/string_property_value_py3.py create mode 100644 customSDK/servicefabric/models/successful_property_batch_info.py create mode 100644 customSDK/servicefabric/models/successful_property_batch_info_py3.py create mode 100644 customSDK/servicefabric/models/system_application_health_evaluation.py create mode 100644 customSDK/servicefabric/models/system_application_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/tcp_config.py create mode 100644 customSDK/servicefabric/models/tcp_config_py3.py create mode 100644 customSDK/servicefabric/models/test_error_chaos_event.py create mode 100644 customSDK/servicefabric/models/test_error_chaos_event_py3.py create mode 100644 customSDK/servicefabric/models/time_based_backup_schedule_description.py create mode 100644 customSDK/servicefabric/models/time_based_backup_schedule_description_py3.py create mode 100644 customSDK/servicefabric/models/time_of_day.py create mode 100644 customSDK/servicefabric/models/time_of_day_py3.py create mode 100644 customSDK/servicefabric/models/time_range.py create mode 100644 customSDK/servicefabric/models/time_range_py3.py create mode 100644 customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description.py create mode 100644 customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description_py3.py create mode 100644 customSDK/servicefabric/models/unplaced_replica_information.py create mode 100644 customSDK/servicefabric/models/unplaced_replica_information_py3.py create mode 100644 customSDK/servicefabric/models/unprovision_application_type_description_info.py create mode 100644 customSDK/servicefabric/models/unprovision_application_type_description_info_py3.py create mode 100644 customSDK/servicefabric/models/unprovision_fabric_description.py create mode 100644 customSDK/servicefabric/models/unprovision_fabric_description_py3.py create mode 100644 customSDK/servicefabric/models/update_cluster_upgrade_description.py create mode 100644 customSDK/servicefabric/models/update_cluster_upgrade_description_py3.py create mode 100644 customSDK/servicefabric/models/update_partition_load_result.py create mode 100644 customSDK/servicefabric/models/update_partition_load_result_py3.py create mode 100644 customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation.py create mode 100644 customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/upgrade_domain_deployed_applications_health_evaluation.py create mode 100644 customSDK/servicefabric/models/upgrade_domain_deployed_applications_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/upgrade_domain_info.py create mode 100644 customSDK/servicefabric/models/upgrade_domain_info_py3.py create mode 100644 customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation.py create mode 100644 customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation_py3.py create mode 100644 customSDK/servicefabric/models/upgrade_orchestration_service_state.py create mode 100644 customSDK/servicefabric/models/upgrade_orchestration_service_state_py3.py create mode 100644 customSDK/servicefabric/models/upgrade_orchestration_service_state_summary.py create mode 100644 customSDK/servicefabric/models/upgrade_orchestration_service_state_summary_py3.py create mode 100644 customSDK/servicefabric/models/upgrade_unit_info.py create mode 100644 customSDK/servicefabric/models/upgrade_unit_info_py3.py create mode 100644 customSDK/servicefabric/models/upload_chunk_range.py create mode 100644 customSDK/servicefabric/models/upload_chunk_range_py3.py create mode 100644 customSDK/servicefabric/models/upload_session.py create mode 100644 customSDK/servicefabric/models/upload_session_info.py create mode 100644 customSDK/servicefabric/models/upload_session_info_py3.py create mode 100644 customSDK/servicefabric/models/upload_session_py3.py create mode 100644 customSDK/servicefabric/models/usage_info.py create mode 100644 customSDK/servicefabric/models/usage_info_py3.py create mode 100644 customSDK/servicefabric/models/validate_cluster_upgrade_result.py create mode 100644 customSDK/servicefabric/models/validate_cluster_upgrade_result_py3.py create mode 100644 customSDK/servicefabric/models/validation_failed_chaos_event.py create mode 100644 customSDK/servicefabric/models/validation_failed_chaos_event_py3.py create mode 100644 customSDK/servicefabric/models/volume_provider_parameters_azure_file.py create mode 100644 customSDK/servicefabric/models/volume_provider_parameters_azure_file_py3.py create mode 100644 customSDK/servicefabric/models/volume_reference.py create mode 100644 customSDK/servicefabric/models/volume_reference_py3.py create mode 100644 customSDK/servicefabric/models/volume_resource_description.py create mode 100644 customSDK/servicefabric/models/volume_resource_description_py3.py create mode 100644 customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check.py create mode 100644 customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check_py3.py create mode 100644 customSDK/servicefabric/models/wait_for_primary_placement_safety_check.py create mode 100644 customSDK/servicefabric/models/wait_for_primary_placement_safety_check_py3.py create mode 100644 customSDK/servicefabric/models/wait_for_primary_swap_safety_check.py create mode 100644 customSDK/servicefabric/models/wait_for_primary_swap_safety_check_py3.py create mode 100644 customSDK/servicefabric/models/wait_for_reconfiguration_safety_check.py create mode 100644 customSDK/servicefabric/models/wait_for_reconfiguration_safety_check_py3.py create mode 100644 customSDK/servicefabric/models/waiting_chaos_event.py create mode 100644 customSDK/servicefabric/models/waiting_chaos_event_py3.py create mode 100644 customSDK/servicefabric/operations/__init__.py create mode 100644 customSDK/servicefabric/operations/_mesh_application_operations.py create mode 100644 customSDK/servicefabric/operations/_mesh_code_package_operations.py create mode 100644 customSDK/servicefabric/operations/_mesh_gateway_operations.py create mode 100644 customSDK/servicefabric/operations/_mesh_network_operations.py create mode 100644 customSDK/servicefabric/operations/_mesh_secret_operations.py create mode 100644 customSDK/servicefabric/operations/_mesh_secret_value_operations.py create mode 100644 customSDK/servicefabric/operations/_mesh_service_operations.py create mode 100644 customSDK/servicefabric/operations/_mesh_service_replica_operations.py create mode 100644 customSDK/servicefabric/operations/_mesh_volume_operations.py create mode 100644 customSDK/servicefabric/operations/_service_fabric_client_apis_operations.py create mode 100644 customSDK/servicefabric/operations/mesh_application_operations.py create mode 100644 customSDK/servicefabric/operations/mesh_code_package_operations.py create mode 100644 customSDK/servicefabric/operations/mesh_gateway_operations.py create mode 100644 customSDK/servicefabric/operations/mesh_network_operations.py create mode 100644 customSDK/servicefabric/operations/mesh_secret_operations.py create mode 100644 customSDK/servicefabric/operations/mesh_secret_value_operations.py create mode 100644 customSDK/servicefabric/operations/mesh_service_operations.py create mode 100644 customSDK/servicefabric/operations/mesh_service_replica_operations.py create mode 100644 customSDK/servicefabric/operations/mesh_volume_operations.py create mode 100644 customSDK/servicefabric/py.typed create mode 100644 customSDK/servicefabric/service_fabric_client_ap_is.py create mode 100644 customSDK/servicefabric/version.py diff --git a/customSDK/__init__.py b/customSDK/__init__.py new file mode 100644 index 00000000..5960c353 --- /dev/null +++ b/customSDK/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file diff --git a/customSDK/servicefabric/__init__.py b/customSDK/servicefabric/__init__.py new file mode 100644 index 00000000..dc572712 --- /dev/null +++ b/customSDK/servicefabric/__init__.py @@ -0,0 +1,15 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license 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_fabric_client_apis import ServiceFabricClientAPIs +__all__ = ['ServiceFabricClientAPIs'] + +# `._patch.py` is used for handwritten extensions to the generated code +# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +from ._patch import patch_sdk +patch_sdk() diff --git a/customSDK/servicefabric/_configuration.py b/customSDK/servicefabric/_configuration.py new file mode 100644 index 00000000..e1899c34 --- /dev/null +++ b/customSDK/servicefabric/_configuration.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +VERSION = "unknown" + +class ServiceFabricClientAPIsConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for ServiceFabricClientAPIs. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :keyword api_version: Api Version. Default value is "8.2.0.46". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + **kwargs # type: Any + ): + # type: (...) -> None + super(ServiceFabricClientAPIsConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.credential = credential + self.api_version = api_version + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'servicefabric/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/customSDK/servicefabric/_patch.py b/customSDK/servicefabric/_patch.py new file mode 100644 index 00000000..74e48ecd --- /dev/null +++ b/customSDK/servicefabric/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass \ No newline at end of file diff --git a/customSDK/servicefabric/_service_fabric_client_apis.py b/customSDK/servicefabric/_service_fabric_client_apis.py new file mode 100644 index 00000000..5d606374 --- /dev/null +++ b/customSDK/servicefabric/_service_fabric_client_apis.py @@ -0,0 +1,121 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import TYPE_CHECKING + +from msrest import Deserializer, Serializer + +from azure.mgmt.core import ARMPipelineClient + +from . import models +from ._configuration import ServiceFabricClientAPIsConfiguration +from .operations import MeshApplicationOperations, MeshCodePackageOperations, MeshGatewayOperations, MeshNetworkOperations, MeshSecretOperations, MeshSecretValueOperations, MeshServiceOperations, MeshServiceReplicaOperations, MeshVolumeOperations, ServiceFabricClientAPIsOperationsMixin + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + from azure.core.rest import HttpRequest, HttpResponse + +class ServiceFabricClientAPIs(ServiceFabricClientAPIsOperationsMixin): # pylint: disable=too-many-instance-attributes + """Service Fabric REST Client APIs allows management of Service Fabric clusters, applications and + services. + + :ivar mesh_secret: MeshSecretOperations operations + :vartype mesh_secret: azure.servicefabric.operations.MeshSecretOperations + :ivar mesh_secret_value: MeshSecretValueOperations operations + :vartype mesh_secret_value: azure.servicefabric.operations.MeshSecretValueOperations + :ivar mesh_volume: MeshVolumeOperations operations + :vartype mesh_volume: azure.servicefabric.operations.MeshVolumeOperations + :ivar mesh_network: MeshNetworkOperations operations + :vartype mesh_network: azure.servicefabric.operations.MeshNetworkOperations + :ivar mesh_application: MeshApplicationOperations operations + :vartype mesh_application: azure.servicefabric.operations.MeshApplicationOperations + :ivar mesh_service: MeshServiceOperations operations + :vartype mesh_service: azure.servicefabric.operations.MeshServiceOperations + :ivar mesh_code_package: MeshCodePackageOperations operations + :vartype mesh_code_package: azure.servicefabric.operations.MeshCodePackageOperations + :ivar mesh_service_replica: MeshServiceReplicaOperations operations + :vartype mesh_service_replica: azure.servicefabric.operations.MeshServiceReplicaOperations + :ivar mesh_gateway: MeshGatewayOperations operations + :vartype mesh_gateway: azure.servicefabric.operations.MeshGatewayOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param base_url: Service URL. Default value is "http://localhost:19080/". + :type base_url: str + :keyword api_version: Api Version. Default value is "8.2.0.46". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + base_url="http://localhost:19080/", # type: str + **kwargs # type: Any + ): + # type: (...) -> None + self._config = ServiceFabricClientAPIsConfiguration(credential=credential, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.mesh_secret = MeshSecretOperations(self._client, self._config, self._serialize, self._deserialize) + self.mesh_secret_value = MeshSecretValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.mesh_volume = MeshVolumeOperations(self._client, self._config, self._serialize, self._deserialize) + self.mesh_network = MeshNetworkOperations(self._client, self._config, self._serialize, self._deserialize) + self.mesh_application = MeshApplicationOperations(self._client, self._config, self._serialize, self._deserialize) + self.mesh_service = MeshServiceOperations(self._client, self._config, self._serialize, self._deserialize) + self.mesh_code_package = MeshCodePackageOperations(self._client, self._config, self._serialize, self._deserialize) + self.mesh_service_replica = MeshServiceReplicaOperations(self._client, self._config, self._serialize, self._deserialize) + self.mesh_gateway = MeshGatewayOperations(self._client, self._config, self._serialize, self._deserialize) + + + def _send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> ServiceFabricClientAPIs + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/customSDK/servicefabric/_vendor.py b/customSDK/servicefabric/_vendor.py new file mode 100644 index 00000000..138f663c --- /dev/null +++ b/customSDK/servicefabric/_vendor.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.pipeline.transport import HttpRequest + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) diff --git a/customSDK/servicefabric/aio/__init__.py b/customSDK/servicefabric/aio/__init__.py new file mode 100644 index 00000000..dc572712 --- /dev/null +++ b/customSDK/servicefabric/aio/__init__.py @@ -0,0 +1,15 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license 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_fabric_client_apis import ServiceFabricClientAPIs +__all__ = ['ServiceFabricClientAPIs'] + +# `._patch.py` is used for handwritten extensions to the generated code +# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +from ._patch import patch_sdk +patch_sdk() diff --git a/customSDK/servicefabric/aio/_configuration.py b/customSDK/servicefabric/aio/_configuration.py new file mode 100644 index 00000000..f4266c55 --- /dev/null +++ b/customSDK/servicefabric/aio/_configuration.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +VERSION = "unknown" + +class ServiceFabricClientAPIsConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for ServiceFabricClientAPIs. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :keyword api_version: Api Version. Default value is "8.2.0.46". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + **kwargs: Any + ) -> None: + super(ServiceFabricClientAPIsConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.credential = credential + self.api_version = api_version + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'servicefabric/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/customSDK/servicefabric/aio/_patch.py b/customSDK/servicefabric/aio/_patch.py new file mode 100644 index 00000000..74e48ecd --- /dev/null +++ b/customSDK/servicefabric/aio/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass \ No newline at end of file diff --git a/customSDK/servicefabric/aio/_service_fabric_client_apis.py b/customSDK/servicefabric/aio/_service_fabric_client_apis.py new file mode 100644 index 00000000..122254b2 --- /dev/null +++ b/customSDK/servicefabric/aio/_service_fabric_client_apis.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer + +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient + +from .. import models +from ._configuration import ServiceFabricClientAPIsConfiguration +from .operations import MeshApplicationOperations, MeshCodePackageOperations, MeshGatewayOperations, MeshNetworkOperations, MeshSecretOperations, MeshSecretValueOperations, MeshServiceOperations, MeshServiceReplicaOperations, MeshVolumeOperations, ServiceFabricClientAPIsOperationsMixin + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +class ServiceFabricClientAPIs(ServiceFabricClientAPIsOperationsMixin): # pylint: disable=too-many-instance-attributes + """Service Fabric REST Client APIs allows management of Service Fabric clusters, applications and + services. + + :ivar mesh_secret: MeshSecretOperations operations + :vartype mesh_secret: azure.servicefabric.aio.operations.MeshSecretOperations + :ivar mesh_secret_value: MeshSecretValueOperations operations + :vartype mesh_secret_value: azure.servicefabric.aio.operations.MeshSecretValueOperations + :ivar mesh_volume: MeshVolumeOperations operations + :vartype mesh_volume: azure.servicefabric.aio.operations.MeshVolumeOperations + :ivar mesh_network: MeshNetworkOperations operations + :vartype mesh_network: azure.servicefabric.aio.operations.MeshNetworkOperations + :ivar mesh_application: MeshApplicationOperations operations + :vartype mesh_application: azure.servicefabric.aio.operations.MeshApplicationOperations + :ivar mesh_service: MeshServiceOperations operations + :vartype mesh_service: azure.servicefabric.aio.operations.MeshServiceOperations + :ivar mesh_code_package: MeshCodePackageOperations operations + :vartype mesh_code_package: azure.servicefabric.aio.operations.MeshCodePackageOperations + :ivar mesh_service_replica: MeshServiceReplicaOperations operations + :vartype mesh_service_replica: azure.servicefabric.aio.operations.MeshServiceReplicaOperations + :ivar mesh_gateway: MeshGatewayOperations operations + :vartype mesh_gateway: azure.servicefabric.aio.operations.MeshGatewayOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param base_url: Service URL. Default value is "http://localhost:19080/". + :type base_url: str + :keyword api_version: Api Version. Default value is "8.2.0.46". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + base_url: str = "http://localhost:19080/", + **kwargs: Any + ) -> None: + self._config = ServiceFabricClientAPIsConfiguration(credential=credential, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.mesh_secret = MeshSecretOperations(self._client, self._config, self._serialize, self._deserialize) + self.mesh_secret_value = MeshSecretValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.mesh_volume = MeshVolumeOperations(self._client, self._config, self._serialize, self._deserialize) + self.mesh_network = MeshNetworkOperations(self._client, self._config, self._serialize, self._deserialize) + self.mesh_application = MeshApplicationOperations(self._client, self._config, self._serialize, self._deserialize) + self.mesh_service = MeshServiceOperations(self._client, self._config, self._serialize, self._deserialize) + self.mesh_code_package = MeshCodePackageOperations(self._client, self._config, self._serialize, self._deserialize) + self.mesh_service_replica = MeshServiceReplicaOperations(self._client, self._config, self._serialize, self._deserialize) + self.mesh_gateway = MeshGatewayOperations(self._client, self._config, self._serialize, self._deserialize) + + + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "ServiceFabricClientAPIs": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/customSDK/servicefabric/aio/operations/__init__.py b/customSDK/servicefabric/aio/operations/__init__.py new file mode 100644 index 00000000..df6b66c5 --- /dev/null +++ b/customSDK/servicefabric/aio/operations/__init__.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._service_fabric_client_apis_operations import ServiceFabricClientAPIsOperationsMixin +from ._mesh_secret_operations import MeshSecretOperations +from ._mesh_secret_value_operations import MeshSecretValueOperations +from ._mesh_volume_operations import MeshVolumeOperations +from ._mesh_network_operations import MeshNetworkOperations +from ._mesh_application_operations import MeshApplicationOperations +from ._mesh_service_operations import MeshServiceOperations +from ._mesh_code_package_operations import MeshCodePackageOperations +from ._mesh_service_replica_operations import MeshServiceReplicaOperations +from ._mesh_gateway_operations import MeshGatewayOperations + +__all__ = [ + 'ServiceFabricClientAPIsOperationsMixin', + 'MeshSecretOperations', + 'MeshSecretValueOperations', + 'MeshVolumeOperations', + 'MeshNetworkOperations', + 'MeshApplicationOperations', + 'MeshServiceOperations', + 'MeshCodePackageOperations', + 'MeshServiceReplicaOperations', + 'MeshGatewayOperations', +] diff --git a/customSDK/servicefabric/aio/operations/_mesh_application_operations.py b/customSDK/servicefabric/aio/operations/_mesh_application_operations.py new file mode 100644 index 00000000..20e40bd5 --- /dev/null +++ b/customSDK/servicefabric/aio/operations/_mesh_application_operations.py @@ -0,0 +1,333 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._mesh_application_operations import build_create_or_update_request, build_delete_request, build_get_request, build_get_upgrade_progress_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MeshApplicationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_application` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def create_or_update( + self, + application_resource_name: str, + application_resource_description: "_models.ApplicationResourceDescription", + **kwargs: Any + ) -> Optional["_models.ApplicationResourceDescription"]: + """Creates or updates a Application resource. + + Creates a Application resource with the specified name, description and properties. If + Application resource with the same name exists, then it is updated with the specified + description and properties. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param application_resource_description: Description for creating a Application resource. + :type application_resource_description: + ~azure.servicefabric.models.ApplicationResourceDescription + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationResourceDescription or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationResourceDescription"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(application_resource_description, 'ApplicationResourceDescription') + + request = build_create_or_update_request( + application_resource_name=application_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationResourceDescription', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ApplicationResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/Resources/Applications/{applicationResourceName}"} # type: ignore + + + @distributed_trace_async + async def get( + self, + application_resource_name: str, + **kwargs: Any + ) -> "_models.ApplicationResourceDescription": + """Gets the Application resource with the given name. + + Gets the information about the Application resource with the given name. The information + include the description and other properties of the Application. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationResourceDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationResourceDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_request( + application_resource_name=application_resource_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/Resources/Applications/{applicationResourceName}"} # type: ignore + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + application_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the Application resource. + + Deletes the Application resource identified by the name. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_request( + application_resource_name=application_resource_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/Resources/Applications/{applicationResourceName}"} # type: ignore + + + @distributed_trace_async + async def list( + self, + **kwargs: Any + ) -> "_models.PagedApplicationResourceDescriptionList": + """Lists all the application resources. + + Gets the information about all application resources in a given resource group. The information + include the description and other properties of the Application. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedApplicationResourceDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedApplicationResourceDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedApplicationResourceDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedApplicationResourceDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/Resources/Applications"} # type: ignore + + + @distributed_trace_async + async def get_upgrade_progress( + self, + application_resource_name: str, + **kwargs: Any + ) -> "_models.ApplicationResourceUpgradeProgressInfo": + """Gets the progress of the latest upgrade performed on this application resource. + + Gets the upgrade progress information about the Application resource with the given name. The + information include percentage of completion and other upgrade state information of the + Application resource. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationResourceUpgradeProgressInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationResourceUpgradeProgressInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationResourceUpgradeProgressInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_upgrade_progress_request( + application_resource_name=application_resource_name, + api_version=api_version, + template_url=self.get_upgrade_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationResourceUpgradeProgressInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_upgrade_progress.metadata = {'url': "/Resources/Applications/{applicationResourceName}/$/GetUpgradeProgress"} # type: ignore + diff --git a/customSDK/servicefabric/aio/operations/_mesh_code_package_operations.py b/customSDK/servicefabric/aio/operations/_mesh_code_package_operations.py new file mode 100644 index 00000000..2bb31d57 --- /dev/null +++ b/customSDK/servicefabric/aio/operations/_mesh_code_package_operations.py @@ -0,0 +1,115 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._mesh_code_package_operations import build_get_container_logs_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MeshCodePackageOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_code_package` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def get_container_logs( + self, + application_resource_name: str, + service_resource_name: str, + replica_name: str, + code_package_name: str, + tail: Optional[str] = None, + **kwargs: Any + ) -> "_models.ContainerLogs": + """Gets the logs from the container. + + Gets the logs for the container of the specified code package of the service replica. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :param replica_name: Service Fabric replica name. + :type replica_name: str + :param code_package_name: The name of code package of the service. + :type code_package_name: str + :param tail: Number of lines to show from the end of the logs. Default is 100. 'all' to show + the complete logs. + :type tail: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ContainerLogs, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ContainerLogs + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerLogs"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_container_logs_request( + application_resource_name=application_resource_name, + service_resource_name=service_resource_name, + replica_name=replica_name, + code_package_name=code_package_name, + api_version=api_version, + tail=tail, + template_url=self.get_container_logs.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ContainerLogs', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_container_logs.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}/CodePackages/{codePackageName}/Logs"} # type: ignore + diff --git a/customSDK/servicefabric/aio/operations/_mesh_gateway_operations.py b/customSDK/servicefabric/aio/operations/_mesh_gateway_operations.py new file mode 100644 index 00000000..f88fa7dc --- /dev/null +++ b/customSDK/servicefabric/aio/operations/_mesh_gateway_operations.py @@ -0,0 +1,274 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._mesh_gateway_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MeshGatewayOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_gateway` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def create_or_update( + self, + gateway_resource_name: str, + gateway_resource_description: "_models.GatewayResourceDescription", + **kwargs: Any + ) -> Optional["_models.GatewayResourceDescription"]: + """Creates or updates a Gateway resource. + + Creates a Gateway resource with the specified name, description and properties. If Gateway + resource with the same name exists, then it is updated with the specified description and + properties. Use Gateway resource to provide public connectivity to application services. + + :param gateway_resource_name: The identity of the gateway. + :type gateway_resource_name: str + :param gateway_resource_description: Description for creating a Gateway resource. + :type gateway_resource_description: ~azure.servicefabric.models.GatewayResourceDescription + :keyword callable cls: A custom type or function that will be passed the direct response + :return: GatewayResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.GatewayResourceDescription or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GatewayResourceDescription"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(gateway_resource_description, 'GatewayResourceDescription') + + request = build_create_or_update_request( + gateway_resource_name=gateway_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GatewayResourceDescription', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('GatewayResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/Resources/Gateways/{gatewayResourceName}"} # type: ignore + + + @distributed_trace_async + async def get( + self, + gateway_resource_name: str, + **kwargs: Any + ) -> "_models.GatewayResourceDescription": + """Gets the Gateway resource with the given name. + + Gets the information about the Gateway resource with the given name. The information include + the description and other properties of the Gateway. + + :param gateway_resource_name: The identity of the gateway. + :type gateway_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: GatewayResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.GatewayResourceDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GatewayResourceDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_request( + gateway_resource_name=gateway_resource_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('GatewayResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/Resources/Gateways/{gatewayResourceName}"} # type: ignore + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + gateway_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the Gateway resource. + + Deletes the Gateway resource identified by the name. + + :param gateway_resource_name: The identity of the gateway. + :type gateway_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_request( + gateway_resource_name=gateway_resource_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/Resources/Gateways/{gatewayResourceName}"} # type: ignore + + + @distributed_trace_async + async def list( + self, + **kwargs: Any + ) -> "_models.PagedGatewayResourceDescriptionList": + """Lists all the gateway resources. + + Gets the information about all gateway resources in a given resource group. The information + include the description and other properties of the Gateway. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedGatewayResourceDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedGatewayResourceDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedGatewayResourceDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedGatewayResourceDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/Resources/Gateways"} # type: ignore + diff --git a/customSDK/servicefabric/aio/operations/_mesh_network_operations.py b/customSDK/servicefabric/aio/operations/_mesh_network_operations.py new file mode 100644 index 00000000..09d9cff1 --- /dev/null +++ b/customSDK/servicefabric/aio/operations/_mesh_network_operations.py @@ -0,0 +1,278 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._mesh_network_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MeshNetworkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_network` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def create_or_update( + self, + network_resource_name: str, + name: str, + properties: "_models.NetworkResourceProperties", + **kwargs: Any + ) -> Optional["_models.NetworkResourceDescription"]: + """Creates or updates a Network resource. + + Creates a Network resource with the specified name, description and properties. If Network + resource with the same name exists, then it is updated with the specified description and + properties. Network resource provides connectivity between application services. + + :param network_resource_name: The identity of the network. + :type network_resource_name: str + :param name: Name of the Network resource. + :type name: str + :param properties: Describes properties of a network resource. + :type properties: ~azure.servicefabric.models.NetworkResourceProperties + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.NetworkResourceDescription or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NetworkResourceDescription"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _network_resource_description = _models.NetworkResourceDescription(name=name, properties=properties) + _json = self._serialize.body(_network_resource_description, 'NetworkResourceDescription') + + request = build_create_or_update_request( + network_resource_name=network_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkResourceDescription', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/Resources/Networks/{networkResourceName}"} # type: ignore + + + @distributed_trace_async + async def get( + self, + network_resource_name: str, + **kwargs: Any + ) -> "_models.NetworkResourceDescription": + """Gets the Network resource with the given name. + + Gets the information about the Network resource with the given name. The information include + the description and other properties of the Network. + + :param network_resource_name: The identity of the network. + :type network_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.NetworkResourceDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkResourceDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_request( + network_resource_name=network_resource_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/Resources/Networks/{networkResourceName}"} # type: ignore + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + network_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the Network resource. + + Deletes the Network resource identified by the name. + + :param network_resource_name: The identity of the network. + :type network_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_request( + network_resource_name=network_resource_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/Resources/Networks/{networkResourceName}"} # type: ignore + + + @distributed_trace_async + async def list( + self, + **kwargs: Any + ) -> "_models.PagedNetworkResourceDescriptionList": + """Lists all the network resources. + + Gets the information about all network resources in a given resource group. The information + include the description and other properties of the Network. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedNetworkResourceDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedNetworkResourceDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedNetworkResourceDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedNetworkResourceDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/Resources/Networks"} # type: ignore + diff --git a/customSDK/servicefabric/aio/operations/_mesh_secret_operations.py b/customSDK/servicefabric/aio/operations/_mesh_secret_operations.py new file mode 100644 index 00000000..15987e68 --- /dev/null +++ b/customSDK/servicefabric/aio/operations/_mesh_secret_operations.py @@ -0,0 +1,278 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._mesh_secret_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MeshSecretOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_secret` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def create_or_update( + self, + secret_resource_name: str, + properties: "_models.SecretResourceProperties", + name: str, + **kwargs: Any + ) -> Optional["_models.SecretResourceDescription"]: + """Creates or updates a Secret resource. + + Creates a Secret resource with the specified name, description and properties. If Secret + resource with the same name exists, then it is updated with the specified description and + properties. Once created, the kind and contentType of a secret resource cannot be updated. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param properties: Describes the properties of a secret resource. + :type properties: ~azure.servicefabric.models.SecretResourceProperties + :param name: Name of the Secret resource. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecretResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.SecretResourceDescription or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SecretResourceDescription"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _secret_resource_description = _models.SecretResourceDescription(properties=properties, name=name) + _json = self._serialize.body(_secret_resource_description, 'SecretResourceDescription') + + request = build_create_or_update_request( + secret_resource_name=secret_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SecretResourceDescription', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SecretResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/Resources/Secrets/{secretResourceName}"} # type: ignore + + + @distributed_trace_async + async def get( + self, + secret_resource_name: str, + **kwargs: Any + ) -> "_models.SecretResourceDescription": + """Gets the Secret resource with the given name. + + Gets the information about the Secret resource with the given name. The information include the + description and other properties of the Secret. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecretResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.SecretResourceDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretResourceDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_request( + secret_resource_name=secret_resource_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecretResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/Resources/Secrets/{secretResourceName}"} # type: ignore + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + secret_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the Secret resource. + + Deletes the specified Secret resource and all of its named values. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_request( + secret_resource_name=secret_resource_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/Resources/Secrets/{secretResourceName}"} # type: ignore + + + @distributed_trace_async + async def list( + self, + **kwargs: Any + ) -> "_models.PagedSecretResourceDescriptionList": + """Lists all the secret resources. + + Gets the information about all secret resources in a given resource group. The information + include the description and other properties of the Secret. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedSecretResourceDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedSecretResourceDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedSecretResourceDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedSecretResourceDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/Resources/Secrets"} # type: ignore + diff --git a/customSDK/servicefabric/aio/operations/_mesh_secret_value_operations.py b/customSDK/servicefabric/aio/operations/_mesh_secret_value_operations.py new file mode 100644 index 00000000..385bba67 --- /dev/null +++ b/customSDK/servicefabric/aio/operations/_mesh_secret_value_operations.py @@ -0,0 +1,359 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._mesh_secret_value_operations import build_add_value_request, build_delete_request, build_get_request, build_list_request, build_show_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MeshSecretValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_secret_value` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def add_value( + self, + secret_resource_name: str, + secret_value_resource_name: str, + name: str, + value: Optional[str] = None, + **kwargs: Any + ) -> Optional["_models.SecretValueResourceDescription"]: + """Adds the specified value as a new version of the specified secret resource. + + Creates a new value of the specified secret resource. The name of the value is typically the + version identifier. Once created the value cannot be changed. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource value which is typically the + version identifier for the value. + :type secret_value_resource_name: str + :param name: Version identifier of the secret value. + :type name: str + :param value: The actual value of the secret. Default value is None. + :type value: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecretValueResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.SecretValueResourceDescription or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SecretValueResourceDescription"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _secret_value_resource_description = _models.SecretValueResourceDescription(name=name, value=value) + _json = self._serialize.body(_secret_value_resource_description, 'SecretValueResourceDescription') + + request = build_add_value_request( + secret_resource_name=secret_resource_name, + secret_value_resource_name=secret_value_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.add_value.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SecretValueResourceDescription', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SecretValueResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + add_value.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}"} # type: ignore + + + @distributed_trace_async + async def get( + self, + secret_resource_name: str, + secret_value_resource_name: str, + **kwargs: Any + ) -> "_models.SecretValueResourceDescription": + """Gets the specified secret value resource. + + Get the information about the specified named secret value resources. The information does not + include the actual value of the secret. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource value which is typically the + version identifier for the value. + :type secret_value_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecretValueResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.SecretValueResourceDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretValueResourceDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_request( + secret_resource_name=secret_resource_name, + secret_value_resource_name=secret_value_resource_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecretValueResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}"} # type: ignore + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + secret_resource_name: str, + secret_value_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the specified value of the named secret resource. + + Deletes the secret value resource identified by the name. The name of the resource is typically + the version associated with that value. Deletion will fail if the specified value is in use. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource value which is typically the + version identifier for the value. + :type secret_value_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_request( + secret_resource_name=secret_resource_name, + secret_value_resource_name=secret_value_resource_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}"} # type: ignore + + + @distributed_trace_async + async def list( + self, + secret_resource_name: str, + **kwargs: Any + ) -> "_models.PagedSecretValueResourceDescriptionList": + """List names of all values of the specified secret resource. + + Gets information about all secret value resources of the specified secret resource. The + information includes the names of the secret value resources, but not the actual values. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedSecretValueResourceDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedSecretValueResourceDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedSecretValueResourceDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_list_request( + secret_resource_name=secret_resource_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedSecretValueResourceDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values"} # type: ignore + + + @distributed_trace_async + async def show( + self, + secret_resource_name: str, + secret_value_resource_name: str, + **kwargs: Any + ) -> "_models.SecretValue": + """Lists the specified value of the secret resource. + + Lists the decrypted value of the specified named value of the secret resource. This is a + privileged operation. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource value which is typically the + version identifier for the value. + :type secret_value_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecretValue, or the result of cls(response) + :rtype: ~azure.servicefabric.models.SecretValue + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretValue"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_show_request( + secret_resource_name=secret_resource_name, + secret_value_resource_name=secret_value_resource_name, + api_version=api_version, + template_url=self.show.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecretValue', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + show.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}/list_value"} # type: ignore + diff --git a/customSDK/servicefabric/aio/operations/_mesh_service_operations.py b/customSDK/servicefabric/aio/operations/_mesh_service_operations.py new file mode 100644 index 00000000..9c83cc4f --- /dev/null +++ b/customSDK/servicefabric/aio/operations/_mesh_service_operations.py @@ -0,0 +1,160 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._mesh_service_operations import build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MeshServiceOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_service` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def get( + self, + application_resource_name: str, + service_resource_name: str, + **kwargs: Any + ) -> "_models.ServiceResourceDescription": + """Gets the Service resource with the given name. + + Gets the information about the Service resource with the given name. The information include + the description and other properties of the Service. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceResourceDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResourceDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_request( + application_resource_name=application_resource_name, + service_resource_name=service_resource_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}"} # type: ignore + + + @distributed_trace_async + async def list( + self, + application_resource_name: str, + **kwargs: Any + ) -> "_models.PagedServiceResourceDescriptionList": + """Lists all the service resources. + + Gets the information about all services of an application resource. The information include the + description and other properties of the Service. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedServiceResourceDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedServiceResourceDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedServiceResourceDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_list_request( + application_resource_name=application_resource_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedServiceResourceDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services"} # type: ignore + diff --git a/customSDK/servicefabric/aio/operations/_mesh_service_replica_operations.py b/customSDK/servicefabric/aio/operations/_mesh_service_replica_operations.py new file mode 100644 index 00000000..e89d82ca --- /dev/null +++ b/customSDK/servicefabric/aio/operations/_mesh_service_replica_operations.py @@ -0,0 +1,168 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._mesh_service_replica_operations import build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MeshServiceReplicaOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_service_replica` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def get( + self, + application_resource_name: str, + service_resource_name: str, + replica_name: str, + **kwargs: Any + ) -> "_models.ServiceReplicaDescription": + """Gets the given replica of the service of an application. + + Gets the information about the service replica with the given name. The information include the + description and other properties of the service replica. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :param replica_name: Service Fabric replica name. + :type replica_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceReplicaDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceReplicaDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceReplicaDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_request( + application_resource_name=application_resource_name, + service_resource_name=service_resource_name, + replica_name=replica_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceReplicaDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}"} # type: ignore + + + @distributed_trace_async + async def list( + self, + application_resource_name: str, + service_resource_name: str, + **kwargs: Any + ) -> "_models.PagedServiceReplicaDescriptionList": + """Lists all the replicas of a service. + + Gets the information about all replicas of a service. The information include the description + and other properties of the service replica. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedServiceReplicaDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedServiceReplicaDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedServiceReplicaDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_list_request( + application_resource_name=application_resource_name, + service_resource_name=service_resource_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedServiceReplicaDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas"} # type: ignore + diff --git a/customSDK/servicefabric/aio/operations/_mesh_volume_operations.py b/customSDK/servicefabric/aio/operations/_mesh_volume_operations.py new file mode 100644 index 00000000..26a38a08 --- /dev/null +++ b/customSDK/servicefabric/aio/operations/_mesh_volume_operations.py @@ -0,0 +1,274 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._mesh_volume_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MeshVolumeOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_volume` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def create_or_update( + self, + volume_resource_name: str, + volume_resource_description: "_models.VolumeResourceDescription", + **kwargs: Any + ) -> Optional["_models.VolumeResourceDescription"]: + """Creates or updates a Volume resource. + + Creates a Volume resource with the specified name, description and properties. If Volume + resource with the same name exists, then it is updated with the specified description and + properties. + + :param volume_resource_name: The identity of the volume. + :type volume_resource_name: str + :param volume_resource_description: Description for creating a Volume resource. + :type volume_resource_description: ~azure.servicefabric.models.VolumeResourceDescription + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VolumeResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.VolumeResourceDescription or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VolumeResourceDescription"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(volume_resource_description, 'VolumeResourceDescription') + + request = build_create_or_update_request( + volume_resource_name=volume_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VolumeResourceDescription', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VolumeResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/Resources/Volumes/{volumeResourceName}"} # type: ignore + + + @distributed_trace_async + async def get( + self, + volume_resource_name: str, + **kwargs: Any + ) -> "_models.VolumeResourceDescription": + """Gets the Volume resource with the given name. + + Gets the information about the Volume resource with the given name. The information include the + description and other properties of the Volume. + + :param volume_resource_name: The identity of the volume. + :type volume_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VolumeResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.VolumeResourceDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VolumeResourceDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_request( + volume_resource_name=volume_resource_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VolumeResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/Resources/Volumes/{volumeResourceName}"} # type: ignore + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + volume_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the Volume resource. + + Deletes the Volume resource identified by the name. + + :param volume_resource_name: The identity of the volume. + :type volume_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_request( + volume_resource_name=volume_resource_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/Resources/Volumes/{volumeResourceName}"} # type: ignore + + + @distributed_trace_async + async def list( + self, + **kwargs: Any + ) -> "_models.PagedVolumeResourceDescriptionList": + """Lists all the volume resources. + + Gets the information about all volume resources in a given resource group. The information + include the description and other properties of the Volume. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedVolumeResourceDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedVolumeResourceDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedVolumeResourceDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedVolumeResourceDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/Resources/Volumes"} # type: ignore + diff --git a/customSDK/servicefabric/aio/operations/_service_fabric_client_apis_operations.py b/customSDK/servicefabric/aio/operations/_service_fabric_client_apis_operations.py new file mode 100644 index 00000000..2a1cd7ad --- /dev/null +++ b/customSDK/servicefabric/aio/operations/_service_fabric_client_apis_operations.py @@ -0,0 +1,16791 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +from typing import Any, Callable, Dict, List, Optional, TypeVar, Union + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._service_fabric_client_apis_operations import build_add_configuration_parameter_overrides_request, build_add_node_tags_request, build_backup_partition_request, build_cancel_operation_request, build_cancel_repair_task_request, build_commit_image_store_upload_session_request, build_copy_image_store_content_request, build_create_application_request, build_create_backup_policy_request, build_create_compose_deployment_request, build_create_name_request, build_create_repair_task_request, build_create_service_from_template_request, build_create_service_request, build_delete_application_request, build_delete_backup_policy_request, build_delete_image_store_content_request, build_delete_image_store_upload_session_request, build_delete_name_request, build_delete_property_request, build_delete_repair_task_request, build_delete_service_request, build_deploy_service_package_to_node_request, build_disable_application_backup_request, build_disable_node_request, build_disable_partition_backup_request, build_disable_service_backup_request, build_enable_application_backup_request, build_enable_node_request, build_enable_partition_backup_request, build_enable_service_backup_request, build_force_approve_repair_task_request, build_get_aad_metadata_request, build_get_all_entities_backed_up_by_policy_request, build_get_application_backup_configuration_info_request, build_get_application_backup_list_request, build_get_application_event_list_request, build_get_application_health_request, build_get_application_health_using_policy_request, build_get_application_info_list_request, build_get_application_info_request, build_get_application_load_info_request, build_get_application_manifest_request, build_get_application_name_info_request, build_get_application_type_info_list_by_name_request, build_get_application_type_info_list_request, build_get_application_upgrade_request, build_get_applications_event_list_request, build_get_backup_policy_by_name_request, build_get_backup_policy_list_request, build_get_backups_from_backup_location_request, build_get_chaos_events_request, build_get_chaos_request, build_get_chaos_schedule_request, build_get_cluster_configuration_request, build_get_cluster_configuration_upgrade_status_request, build_get_cluster_event_list_request, build_get_cluster_health_chunk_request, build_get_cluster_health_chunk_using_policy_and_advanced_filters_request, build_get_cluster_health_request, build_get_cluster_health_using_policy_request, build_get_cluster_load_request, build_get_cluster_manifest_request, build_get_cluster_upgrade_progress_request, build_get_cluster_version_request, build_get_compose_deployment_status_list_request, build_get_compose_deployment_status_request, build_get_compose_deployment_upgrade_progress_request, build_get_configuration_overrides_request, build_get_container_logs_deployed_on_node_request, build_get_containers_event_list_request, build_get_correlated_event_list_request, build_get_data_loss_progress_request, build_get_deployed_application_health_request, build_get_deployed_application_health_using_policy_request, build_get_deployed_application_info_list_request, build_get_deployed_application_info_request, build_get_deployed_code_package_info_list_request, build_get_deployed_service_package_health_request, build_get_deployed_service_package_health_using_policy_request, build_get_deployed_service_package_info_list_by_name_request, build_get_deployed_service_package_info_list_request, build_get_deployed_service_replica_detail_info_by_partition_id_request, build_get_deployed_service_replica_detail_info_request, build_get_deployed_service_replica_info_list_request, build_get_deployed_service_type_info_by_name_request, build_get_deployed_service_type_info_list_request, build_get_fault_operation_list_request, build_get_image_store_content_request, build_get_image_store_folder_size_request, build_get_image_store_info_request, build_get_image_store_root_content_request, build_get_image_store_root_folder_size_request, build_get_image_store_upload_session_by_id_request, build_get_image_store_upload_session_by_path_request, build_get_loaded_partition_info_list_request, build_get_name_exists_info_request, build_get_node_event_list_request, build_get_node_health_request, build_get_node_health_using_policy_request, build_get_node_info_list_request, build_get_node_info_request, build_get_node_load_info_request, build_get_node_transition_progress_request, build_get_nodes_event_list_request, build_get_partition_backup_configuration_info_request, build_get_partition_backup_list_request, build_get_partition_backup_progress_request, build_get_partition_event_list_request, build_get_partition_health_request, build_get_partition_health_using_policy_request, build_get_partition_info_list_request, build_get_partition_info_request, build_get_partition_load_information_request, build_get_partition_replica_event_list_request, build_get_partition_replicas_event_list_request, build_get_partition_restart_progress_request, build_get_partition_restore_progress_request, build_get_partitions_event_list_request, build_get_property_info_list_request, build_get_property_info_request, build_get_provisioned_fabric_code_version_info_list_request, build_get_provisioned_fabric_config_version_info_list_request, build_get_quorum_loss_progress_request, build_get_repair_task_list_request, build_get_replica_health_request, build_get_replica_health_using_policy_request, build_get_replica_info_list_request, build_get_replica_info_request, build_get_service_backup_configuration_info_request, build_get_service_backup_list_request, build_get_service_description_request, build_get_service_event_list_request, build_get_service_health_request, build_get_service_health_using_policy_request, build_get_service_info_list_request, build_get_service_info_request, build_get_service_manifest_request, build_get_service_name_info_request, build_get_service_type_info_by_name_request, build_get_service_type_info_list_request, build_get_services_event_list_request, build_get_sub_name_info_list_request, build_get_unplaced_replica_information_request, build_get_upgrade_orchestration_service_state_request, build_invoke_container_api_request, build_invoke_infrastructure_command_request, build_invoke_infrastructure_query_request, build_move_auxiliary_replica_request, build_move_instance_request, build_move_primary_replica_request, build_move_secondary_replica_request, build_post_chaos_schedule_request, build_provision_application_type_request, build_provision_cluster_request, build_put_property_request, build_recover_all_partitions_request, build_recover_partition_request, build_recover_service_partitions_request, build_recover_system_partitions_request, build_remove_compose_deployment_request, build_remove_configuration_overrides_request, build_remove_node_state_request, build_remove_node_tags_request, build_remove_replica_request, build_report_application_health_request, build_report_cluster_health_request, build_report_deployed_application_health_request, build_report_deployed_service_package_health_request, build_report_node_health_request, build_report_partition_health_request, build_report_replica_health_request, build_report_service_health_request, build_reset_partition_load_request, build_resolve_service_request, build_restart_deployed_code_package_request, build_restart_node_request, build_restart_replica_request, build_restore_partition_request, build_resume_application_backup_request, build_resume_application_upgrade_request, build_resume_cluster_upgrade_request, build_resume_partition_backup_request, build_resume_service_backup_request, build_rollback_application_upgrade_request, build_rollback_cluster_upgrade_request, build_set_upgrade_orchestration_service_state_request, build_start_application_upgrade_request, build_start_chaos_request, build_start_cluster_configuration_upgrade_request, build_start_cluster_upgrade_request, build_start_compose_deployment_upgrade_request, build_start_data_loss_request, build_start_node_transition_request, build_start_partition_restart_request, build_start_quorum_loss_request, build_start_rollback_compose_deployment_upgrade_request, build_stop_chaos_request, build_submit_property_batch_request, build_suspend_application_backup_request, build_suspend_partition_backup_request, build_suspend_service_backup_request, build_toggle_verbose_service_placement_health_reporting_request, build_unprovision_application_type_request, build_unprovision_cluster_request, build_update_application_arm_metadata_request, build_update_application_request, build_update_application_type_arm_metadata_request, build_update_application_upgrade_request, build_update_backup_policy_request, build_update_cluster_upgrade_request, build_update_partition_load_request, build_update_repair_execution_state_request, build_update_repair_task_health_policy_request, build_update_service_request, build_upload_file_chunk_request, build_upload_file_request, build_validate_cluster_upgrade_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServiceFabricClientAPIsOperationsMixin: # pylint: disable=too-many-public-methods + + @distributed_trace_async + async def get_cluster_manifest( + self, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ClusterManifest": + """Get the Service Fabric cluster manifest. + + Get the Service Fabric cluster manifest. The cluster manifest contains properties of the + cluster that include different node types on the cluster, + security configurations, fault, and upgrade domain topologies, etc. + + These properties are specified as part of the ClusterConfig.JSON file while deploying a + stand-alone cluster. However, most of the information in the cluster manifest + is generated internally by service fabric during cluster deployment in other deployment + scenarios (e.g. when using Azure portal). + + The contents of the cluster manifest are for informational purposes only and users are not + expected to take a dependency on the format of the file contents or its interpretation. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterManifest, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterManifest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterManifest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_manifest_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_cluster_manifest.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterManifest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_manifest.metadata = {'url': "/$/GetClusterManifest"} # type: ignore + + + @distributed_trace_async + async def get_cluster_health( + self, + nodes_health_state_filter: Optional[int] = 0, + applications_health_state_filter: Optional[int] = 0, + events_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + include_system_application_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ClusterHealth": + """Gets the health of a Service Fabric cluster. + + Use EventsHealthStateFilter to filter the collection of health events reported on the cluster + based on the health state. + Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the + collection of nodes and applications returned based on their aggregated health state. + + :param nodes_health_state_filter: Allows filtering of the node health state objects returned in + the result of cluster health query + based on their health state. The possible values for this parameter include integer value of + one of the + following health states. Only nodes that match the filter are returned. All nodes are used to + evaluate the aggregated health state. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of nodes with HealthState value of + OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type nodes_health_state_filter: int + :param applications_health_state_filter: Allows filtering of the application health state + objects returned in the result of cluster health + query based on their health state. + The possible values for this parameter include integer value obtained from members or bitwise + operations + on members of HealthStateFilter enumeration. Only applications that match the filter are + returned. + All applications are used to evaluate the aggregated health state. If not specified, all + entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of applications with HealthState + value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type applications_health_state_filter: int + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param include_system_application_health_statistics: Indicates whether the health statistics + should include the fabric:/System application health statistics. False by default. + If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the + entities that belong to the fabric:/System application. + Otherwise, the query result includes health statistics only for user applications. + The health statistics must be included in the query result for this parameter to be applied. + Default value is False. + :type include_system_application_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_health_request( + api_version=api_version, + nodes_health_state_filter=nodes_health_state_filter, + applications_health_state_filter=applications_health_state_filter, + events_health_state_filter=events_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + include_system_application_health_statistics=include_system_application_health_statistics, + timeout=timeout, + template_url=self.get_cluster_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_health.metadata = {'url': "/$/GetClusterHealth"} # type: ignore + + + @distributed_trace_async + async def get_cluster_health_using_policy( + self, + nodes_health_state_filter: Optional[int] = 0, + applications_health_state_filter: Optional[int] = 0, + events_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + include_system_application_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + application_health_policy_map: Optional[List["_models.ApplicationHealthPolicyMapItem"]] = None, + cluster_health_policy: Optional["_models.ClusterHealthPolicy"] = None, + **kwargs: Any + ) -> "_models.ClusterHealth": + """Gets the health of a Service Fabric cluster using the specified policy. + + Use EventsHealthStateFilter to filter the collection of health events reported on the cluster + based on the health state. + Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the + collection of nodes and applications returned based on their aggregated health state. + Use ClusterHealthPolicies to override the health policies used to evaluate the health. + + :param nodes_health_state_filter: Allows filtering of the node health state objects returned in + the result of cluster health query + based on their health state. The possible values for this parameter include integer value of + one of the + following health states. Only nodes that match the filter are returned. All nodes are used to + evaluate the aggregated health state. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of nodes with HealthState value of + OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type nodes_health_state_filter: int + :param applications_health_state_filter: Allows filtering of the application health state + objects returned in the result of cluster health + query based on their health state. + The possible values for this parameter include integer value obtained from members or bitwise + operations + on members of HealthStateFilter enumeration. Only applications that match the filter are + returned. + All applications are used to evaluate the aggregated health state. If not specified, all + entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of applications with HealthState + value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type applications_health_state_filter: int + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param include_system_application_health_statistics: Indicates whether the health statistics + should include the fabric:/System application health statistics. False by default. + If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the + entities that belong to the fabric:/System application. + Otherwise, the query result includes health statistics only for user applications. + The health statistics must be included in the query result for this parameter to be applied. + Default value is False. + :type include_system_application_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param application_health_policy_map: Defines a map that contains specific application health + policies for different applications. + Each entry specifies as key the application name and as value an ApplicationHealthPolicy used + to evaluate the application health. + If an application is not specified in the map, the application health evaluation uses the + ApplicationHealthPolicy found in its application manifest or the default application health + policy (if no health policy is defined in the manifest). + The map is empty by default. Default value is None. + :type application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + :param cluster_health_policy: Defines a health policy used to evaluate the health of the + cluster or of a cluster node. Default value is None. + :type cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _cluster_health_policies = _models.ClusterHealthPolicies(application_health_policy_map=application_health_policy_map, cluster_health_policy=cluster_health_policy) + if _cluster_health_policies is not None: + _json = self._serialize.body(_cluster_health_policies, 'ClusterHealthPolicies') + else: + _json = None + + request = build_get_cluster_health_using_policy_request( + api_version=api_version, + content_type=content_type, + json=_json, + nodes_health_state_filter=nodes_health_state_filter, + applications_health_state_filter=applications_health_state_filter, + events_health_state_filter=events_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + include_system_application_health_statistics=include_system_application_health_statistics, + timeout=timeout, + template_url=self.get_cluster_health_using_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_health_using_policy.metadata = {'url': "/$/GetClusterHealth"} # type: ignore + + + @distributed_trace_async + async def get_cluster_health_chunk( + self, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ClusterHealthChunk": + """Gets the health of a Service Fabric cluster using health chunks. + + Gets the health of a Service Fabric cluster using health chunks. Includes the aggregated health + state of the cluster, but none of the cluster entities. + To expand the cluster health and get the health state of all or some of the entities, use the + POST URI and specify the cluster health chunk query description. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterHealthChunk, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterHealthChunk + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterHealthChunk"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_health_chunk_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_cluster_health_chunk.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterHealthChunk', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_health_chunk.metadata = {'url': "/$/GetClusterHealthChunk"} # type: ignore + + + @distributed_trace_async + async def get_cluster_health_chunk_using_policy_and_advanced_filters( + self, + timeout: Optional[int] = 60, + cluster_health_chunk_query_description: Optional["_models.ClusterHealthChunkQueryDescription"] = None, + **kwargs: Any + ) -> "_models.ClusterHealthChunk": + """Gets the health of a Service Fabric cluster using health chunks. + + Gets the health of a Service Fabric cluster using health chunks. The health evaluation is done + based on the input cluster health chunk query description. + The query description allows users to specify health policies for evaluating the cluster and + its children. + Users can specify very flexible filters to select which cluster entities to return. The + selection can be done based on the entities health state and based on the hierarchy. + The query can return multi-level children of the entities based on the specified filters. For + example, it can return one application with a specified name, and for this application, return + only services that are in Error or Warning, and all partitions and replicas for one of these + services. + + :param 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. Default value is 60. + :type timeout: long + :param cluster_health_chunk_query_description: Describes the cluster and application health + policies used to evaluate the cluster health and the filters to select which cluster entities + to be returned. + If the cluster health policy is present, it is used to evaluate the cluster events and the + cluster nodes. If not present, the health evaluation uses the cluster health policy defined in + the cluster manifest or the default cluster health policy. + By default, each application is evaluated using its specific application health policy, + defined in the application manifest, or the default health policy, if no policy is defined in + manifest. + If the application health policy map is specified, and it has an entry for an application, the + specified application health policy + is used to evaluate the application health. + Users can specify very flexible filters to select which cluster entities to include in + response. The selection can be done based on the entities health state and based on the + hierarchy. + The query can return multi-level children of the entities based on the specified filters. For + example, it can return one application with a specified name, and for this application, return + only services that are in Error or Warning, and all partitions and replicas for one of these + services. Default value is None. + :type cluster_health_chunk_query_description: + ~azure.servicefabric.models.ClusterHealthChunkQueryDescription + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterHealthChunk, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterHealthChunk + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterHealthChunk"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if cluster_health_chunk_query_description is not None: + _json = self._serialize.body(cluster_health_chunk_query_description, 'ClusterHealthChunkQueryDescription') + else: + _json = None + + request = build_get_cluster_health_chunk_using_policy_and_advanced_filters_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.get_cluster_health_chunk_using_policy_and_advanced_filters.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterHealthChunk', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_health_chunk_using_policy_and_advanced_filters.metadata = {'url': "/$/GetClusterHealthChunk"} # type: ignore + + + @distributed_trace_async + async def report_cluster_health( # pylint: disable=inconsistent-return-statements + self, + health_information: "_models.HealthInformation", + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric cluster. + + Sends a health report on a Service Fabric cluster. The report must contain the information + about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway node, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetClusterHealth and check that + the report appears in the HealthEvents section. + + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :type immediate: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(health_information, 'HealthInformation') + + request = build_report_cluster_health_request( + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + template_url=self.report_cluster_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + report_cluster_health.metadata = {'url': "/$/ReportClusterHealth"} # type: ignore + + + @distributed_trace_async + async def get_provisioned_fabric_code_version_info_list( + self, + code_version: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List["_models.FabricCodeVersionInfo"]: + """Gets a list of fabric code versions that are provisioned in a Service Fabric cluster. + + Gets a list of information about fabric code versions that are provisioned in the cluster. The + parameter CodeVersion can be used to optionally filter the output to only that particular + version. + + :param code_version: The product version of Service Fabric. Default value is None. + :type code_version: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of FabricCodeVersionInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.FabricCodeVersionInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.FabricCodeVersionInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_provisioned_fabric_code_version_info_list_request( + api_version=api_version, + code_version=code_version, + timeout=timeout, + template_url=self.get_provisioned_fabric_code_version_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[FabricCodeVersionInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_provisioned_fabric_code_version_info_list.metadata = {'url': "/$/GetProvisionedCodeVersions"} # type: ignore + + + @distributed_trace_async + async def get_provisioned_fabric_config_version_info_list( + self, + config_version: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List["_models.FabricConfigVersionInfo"]: + """Gets a list of fabric config versions that are provisioned in a Service Fabric cluster. + + Gets a list of information about fabric config versions that are provisioned in the cluster. + The parameter ConfigVersion can be used to optionally filter the output to only that particular + version. + + :param config_version: The config version of Service Fabric. Default value is None. + :type config_version: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of FabricConfigVersionInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.FabricConfigVersionInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.FabricConfigVersionInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_provisioned_fabric_config_version_info_list_request( + api_version=api_version, + config_version=config_version, + timeout=timeout, + template_url=self.get_provisioned_fabric_config_version_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[FabricConfigVersionInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_provisioned_fabric_config_version_info_list.metadata = {'url': "/$/GetProvisionedConfigVersions"} # type: ignore + + + @distributed_trace_async + async def get_cluster_upgrade_progress( + self, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ClusterUpgradeProgressObject": + """Gets the progress of the current cluster upgrade. + + Gets the current progress of the ongoing cluster upgrade. If no upgrade is currently in + progress, get the last state of the previous cluster upgrade. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterUpgradeProgressObject, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterUpgradeProgressObject + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterUpgradeProgressObject"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_upgrade_progress_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_cluster_upgrade_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterUpgradeProgressObject', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_upgrade_progress.metadata = {'url': "/$/GetUpgradeProgress"} # type: ignore + + + @distributed_trace_async + async def get_cluster_configuration( + self, + configuration_api_version: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ClusterConfiguration": + """Get the Service Fabric standalone cluster configuration. + + The cluster configuration contains properties of the cluster that include different node types + on the cluster, + security configurations, fault, and upgrade domain topologies, etc. + + :param configuration_api_version: The API version of the Standalone cluster json configuration. + :type configuration_api_version: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterConfiguration, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_configuration_request( + api_version=api_version, + configuration_api_version=configuration_api_version, + timeout=timeout, + template_url=self.get_cluster_configuration.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_configuration.metadata = {'url': "/$/GetClusterConfiguration"} # type: ignore + + + @distributed_trace_async + async def get_cluster_configuration_upgrade_status( + self, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ClusterConfigurationUpgradeStatusInfo": + """Get the cluster configuration upgrade status of a Service Fabric standalone cluster. + + Get the cluster configuration upgrade status details of a Service Fabric standalone cluster. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterConfigurationUpgradeStatusInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterConfigurationUpgradeStatusInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterConfigurationUpgradeStatusInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_configuration_upgrade_status_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_cluster_configuration_upgrade_status.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterConfigurationUpgradeStatusInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_configuration_upgrade_status.metadata = {'url': "/$/GetClusterConfigurationUpgradeStatus"} # type: ignore + + + @distributed_trace_async + async def get_upgrade_orchestration_service_state( + self, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.UpgradeOrchestrationServiceState": + """Get the service state of Service Fabric Upgrade Orchestration Service. + + Get the service state of Service Fabric Upgrade Orchestration Service. This API is internally + used for support purposes. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UpgradeOrchestrationServiceState, or the result of cls(response) + :rtype: ~azure.servicefabric.models.UpgradeOrchestrationServiceState + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UpgradeOrchestrationServiceState"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_upgrade_orchestration_service_state_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_upgrade_orchestration_service_state.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UpgradeOrchestrationServiceState', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_upgrade_orchestration_service_state.metadata = {'url': "/$/GetUpgradeOrchestrationServiceState"} # type: ignore + + + @distributed_trace_async + async def set_upgrade_orchestration_service_state( + self, + timeout: Optional[int] = 60, + service_state: Optional[str] = None, + **kwargs: Any + ) -> "_models.UpgradeOrchestrationServiceStateSummary": + """Update the service state of Service Fabric Upgrade Orchestration Service. + + Update the service state of Service Fabric Upgrade Orchestration Service. This API is + internally used for support purposes. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param service_state: The state of Service Fabric Upgrade Orchestration Service. Default value + is None. + :type service_state: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UpgradeOrchestrationServiceStateSummary, or the result of cls(response) + :rtype: ~azure.servicefabric.models.UpgradeOrchestrationServiceStateSummary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UpgradeOrchestrationServiceStateSummary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _upgrade_orchestration_service_state = _models.UpgradeOrchestrationServiceState(service_state=service_state) + _json = self._serialize.body(_upgrade_orchestration_service_state, 'UpgradeOrchestrationServiceState') + + request = build_set_upgrade_orchestration_service_state_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.set_upgrade_orchestration_service_state.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UpgradeOrchestrationServiceStateSummary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + set_upgrade_orchestration_service_state.metadata = {'url': "/$/SetUpgradeOrchestrationServiceState"} # type: ignore + + + @distributed_trace_async + async def provision_cluster( # pylint: disable=inconsistent-return-statements + self, + timeout: Optional[int] = 60, + code_file_path: Optional[str] = None, + cluster_manifest_file_path: Optional[str] = None, + **kwargs: Any + ) -> None: + """Provision the code or configuration packages of a Service Fabric cluster. + + Validate and provision the code or configuration packages of a Service Fabric cluster. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param code_file_path: The cluster code package file path. Default value is None. + :type code_file_path: str + :param cluster_manifest_file_path: The cluster manifest file path. Default value is None. + :type cluster_manifest_file_path: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _provision_fabric_description = _models.ProvisionFabricDescription(code_file_path=code_file_path, cluster_manifest_file_path=cluster_manifest_file_path) + _json = self._serialize.body(_provision_fabric_description, 'ProvisionFabricDescription') + + request = build_provision_cluster_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.provision_cluster.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + provision_cluster.metadata = {'url': "/$/Provision"} # type: ignore + + + @distributed_trace_async + async def unprovision_cluster( # pylint: disable=inconsistent-return-statements + self, + timeout: Optional[int] = 60, + code_version: Optional[str] = None, + config_version: Optional[str] = None, + **kwargs: Any + ) -> None: + """Unprovision the code or configuration packages of a Service Fabric cluster. + + It is supported to unprovision code and configuration separately. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param code_version: The cluster code package version. Default value is None. + :type code_version: str + :param config_version: The cluster manifest version. Default value is None. + :type config_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _unprovision_fabric_description = _models.UnprovisionFabricDescription(code_version=code_version, config_version=config_version) + _json = self._serialize.body(_unprovision_fabric_description, 'UnprovisionFabricDescription') + + request = build_unprovision_cluster_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.unprovision_cluster.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + unprovision_cluster.metadata = {'url': "/$/Unprovision"} # type: ignore + + + @distributed_trace_async + async def rollback_cluster_upgrade( # pylint: disable=inconsistent-return-statements + self, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Roll back the upgrade of a Service Fabric cluster. + + Roll back the code or configuration upgrade of a Service Fabric cluster. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_rollback_cluster_upgrade_request( + api_version=api_version, + timeout=timeout, + template_url=self.rollback_cluster_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + rollback_cluster_upgrade.metadata = {'url': "/$/RollbackUpgrade"} # type: ignore + + + @distributed_trace_async + async def resume_cluster_upgrade( # pylint: disable=inconsistent-return-statements + self, + upgrade_domain: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Make the cluster upgrade move on to the next upgrade domain. + + Make the cluster code or configuration upgrade move on to the next upgrade domain if + appropriate. + + :param upgrade_domain: The next upgrade domain for this cluster upgrade. + :type upgrade_domain: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _resume_cluster_upgrade_description = _models.ResumeClusterUpgradeDescription(upgrade_domain=upgrade_domain) + _json = self._serialize.body(_resume_cluster_upgrade_description, 'ResumeClusterUpgradeDescription') + + request = build_resume_cluster_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.resume_cluster_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + resume_cluster_upgrade.metadata = {'url': "/$/MoveToNextUpgradeDomain"} # type: ignore + + + @distributed_trace_async + async def start_cluster_upgrade( # pylint: disable=inconsistent-return-statements + self, + start_cluster_upgrade_description: "_models.StartClusterUpgradeDescription", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Start upgrading the code or configuration version of a Service Fabric cluster. + + Validate the supplied upgrade parameters and start upgrading the code or configuration version + of a Service Fabric cluster if the parameters are valid. + + :param start_cluster_upgrade_description: Describes the parameters for starting a cluster + upgrade. + :type start_cluster_upgrade_description: + ~azure.servicefabric.models.StartClusterUpgradeDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') + + request = build_start_cluster_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.start_cluster_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_cluster_upgrade.metadata = {'url': "/$/Upgrade"} # type: ignore + + + @distributed_trace_async + async def start_cluster_configuration_upgrade( # pylint: disable=inconsistent-return-statements + self, + cluster_configuration_upgrade_description: "_models.ClusterConfigurationUpgradeDescription", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Start upgrading the configuration of a Service Fabric standalone cluster. + + Validate the supplied configuration upgrade parameters and start upgrading the cluster + configuration if the parameters are valid. + + :param cluster_configuration_upgrade_description: Parameters for a standalone cluster + configuration upgrade. + :type cluster_configuration_upgrade_description: + ~azure.servicefabric.models.ClusterConfigurationUpgradeDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(cluster_configuration_upgrade_description, 'ClusterConfigurationUpgradeDescription') + + request = build_start_cluster_configuration_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.start_cluster_configuration_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_cluster_configuration_upgrade.metadata = {'url': "/$/StartClusterConfigurationUpgrade"} # type: ignore + + + @distributed_trace_async + async def update_cluster_upgrade( # pylint: disable=inconsistent-return-statements + self, + update_cluster_upgrade_description: "_models.UpdateClusterUpgradeDescription", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Update the upgrade parameters of a Service Fabric cluster upgrade. + + Update the upgrade parameters used during a Service Fabric cluster upgrade. + + :param update_cluster_upgrade_description: Parameters for updating a cluster upgrade. + :type update_cluster_upgrade_description: + ~azure.servicefabric.models.UpdateClusterUpgradeDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(update_cluster_upgrade_description, 'UpdateClusterUpgradeDescription') + + request = build_update_cluster_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.update_cluster_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + update_cluster_upgrade.metadata = {'url': "/$/UpdateUpgrade"} # type: ignore + + + @distributed_trace_async + async def get_aad_metadata( + self, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.AadMetadataObject": + """Gets the Azure Active Directory metadata used for secured connection to cluster. + + Gets the Azure Active Directory metadata used for secured connection to cluster. + This API is not supposed to be called separately. It provides information needed to set up an + Azure Active Directory secured connection with a Service Fabric cluster. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AadMetadataObject, or the result of cls(response) + :rtype: ~azure.servicefabric.models.AadMetadataObject + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AadMetadataObject"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_aad_metadata_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_aad_metadata.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AadMetadataObject', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_aad_metadata.metadata = {'url': "/$/GetAadMetadata"} # type: ignore + + + @distributed_trace_async + async def get_cluster_version( + self, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ClusterVersion": + """Get the current Service Fabric cluster version. + + If a cluster upgrade is happening, then this API will return the lowest (older) version of the + current and target cluster runtime versions. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterVersion, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterVersion + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterVersion"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_version_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_cluster_version.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterVersion', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_version.metadata = {'url': "/$/GetClusterVersion"} # type: ignore + + + @distributed_trace_async + async def get_cluster_load( + self, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ClusterLoadInfo": + """Gets the load of a Service Fabric cluster. + + Retrieves the load information of a Service Fabric cluster for all the metrics that have load + or capacity defined. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterLoadInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterLoadInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterLoadInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_load_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_cluster_load.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterLoadInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_load.metadata = {'url': "/$/GetLoadInformation"} # type: ignore + + + @distributed_trace_async + async def toggle_verbose_service_placement_health_reporting( # pylint: disable=inconsistent-return-statements + self, + enabled: bool, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Changes the verbosity of service placement health reporting. + + If verbosity is set to true, then detailed health reports will be generated when replicas + cannot be placed or dropped. + If verbosity is set to false, then no health reports will be generated when replicas cannot be + placed or dropped. + + :param enabled: The verbosity of service placement health reporting. + :type enabled: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_toggle_verbose_service_placement_health_reporting_request( + api_version=api_version, + enabled=enabled, + timeout=timeout, + template_url=self.toggle_verbose_service_placement_health_reporting.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + toggle_verbose_service_placement_health_reporting.metadata = {'url': "/$/ToggleVerboseServicePlacementHealthReporting"} # type: ignore + + + @distributed_trace_async + async def validate_cluster_upgrade( + self, + start_cluster_upgrade_description: "_models.StartClusterUpgradeDescription", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ValidateClusterUpgradeResult": + """Validate and assess the impact of a code or configuration version update of a Service Fabric + cluster. + + Validate the supplied upgrade parameters and assess the expected impact of a code or + configuration version upgrade of a Service Fabric cluster. The upgrade will not be initiated. + + :param start_cluster_upgrade_description: Describes the parameters for starting a cluster + upgrade. + :type start_cluster_upgrade_description: + ~azure.servicefabric.models.StartClusterUpgradeDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidateClusterUpgradeResult, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ValidateClusterUpgradeResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidateClusterUpgradeResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') + + request = build_validate_cluster_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.validate_cluster_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidateClusterUpgradeResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + validate_cluster_upgrade.metadata = {'url': "/$/ValidateUpgrade"} # type: ignore + + + @distributed_trace_async + async def get_node_info_list( + self, + continuation_token_parameter: Optional[str] = None, + node_status_filter: Optional[Union[str, "_models.NodeStatusFilter"]] = "default", + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PagedNodeInfoList": + """Gets the list of nodes in the Service Fabric cluster. + + The response includes the name, status, ID, health, uptime, and other details about the nodes. + + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param node_status_filter: Allows filtering the nodes based on the NodeStatus. Only the nodes + that are matching the specified filter value will be returned. The filter value can be one of + the following. Default value is "default". + :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. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedNodeInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedNodeInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedNodeInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_node_info_list_request( + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + node_status_filter=node_status_filter, + max_results=max_results, + timeout=timeout, + template_url=self.get_node_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedNodeInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_node_info_list.metadata = {'url': "/Nodes"} # type: ignore + + + @distributed_trace_async + async def get_node_info( + self, + node_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional["_models.NodeInfo"]: + """Gets the information about a specific node in the Service Fabric cluster. + + The response includes the name, status, ID, health, uptime, and other details about the node. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NodeInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.NodeInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NodeInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_node_info_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + template_url=self.get_node_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NodeInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_node_info.metadata = {'url': "/Nodes/{nodeName}"} # type: ignore + + + @distributed_trace_async + async def get_node_health( + self, + node_name: str, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.NodeHealth": + """Gets the health of a Service Fabric node. + + Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection + of health events reported on the node based on the health state. If the node that you specify + by name does not exist in the health store, this returns an error. + + :param node_name: The name of the node. + :type node_name: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NodeHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.NodeHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_node_health_request( + node_name=node_name, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + template_url=self.get_node_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NodeHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_node_health.metadata = {'url': "/Nodes/{nodeName}/$/GetHealth"} # type: ignore + + + @distributed_trace_async + async def get_node_health_using_policy( + self, + node_name: str, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + cluster_health_policy: Optional["_models.ClusterHealthPolicy"] = None, + **kwargs: Any + ) -> "_models.NodeHealth": + """Gets the health of a Service Fabric node, by using the specified health policy. + + Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection + of health events reported on the node based on the health state. Use ClusterHealthPolicy in the + POST body to override the health policies used to evaluate the health. If the node that you + specify by name does not exist in the health store, this returns an error. + + :param node_name: The name of the node. + :type node_name: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param cluster_health_policy: Describes the health policies used to evaluate the health of a + cluster or node. If not present, the health evaluation uses the health policy from cluster + manifest or the default health policy. Default value is None. + :type cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NodeHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.NodeHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if cluster_health_policy is not None: + _json = self._serialize.body(cluster_health_policy, 'ClusterHealthPolicy') + else: + _json = None + + request = build_get_node_health_using_policy_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + template_url=self.get_node_health_using_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NodeHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_node_health_using_policy.metadata = {'url': "/Nodes/{nodeName}/$/GetHealth"} # type: ignore + + + @distributed_trace_async + async def report_node_health( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + health_information: "_models.HealthInformation", + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric node. + + Reports health state of the specified Service Fabric node. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway node, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetNodeHealth and check that the + report appears in the HealthEvents section. + + :param node_name: The name of the node. + :type node_name: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :type immediate: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(health_information, 'HealthInformation') + + request = build_report_node_health_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + template_url=self.report_node_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + report_node_health.metadata = {'url': "/Nodes/{nodeName}/$/ReportHealth"} # type: ignore + + + @distributed_trace_async + async def get_node_load_info( + self, + node_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.NodeLoadInfo": + """Gets the load information of a Service Fabric node. + + Retrieves the load information of a Service Fabric node for all the metrics that have load or + capacity defined. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NodeLoadInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.NodeLoadInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeLoadInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_node_load_info_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + template_url=self.get_node_load_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NodeLoadInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_node_load_info.metadata = {'url': "/Nodes/{nodeName}/$/GetLoadInformation"} # type: ignore + + + @distributed_trace_async + async def disable_node( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + timeout: Optional[int] = 60, + deactivation_intent: Optional[Union[str, "_models.DeactivationIntent"]] = None, + **kwargs: Any + ) -> None: + """Deactivate a Service Fabric cluster node with the specified deactivation intent. + + Deactivate a Service Fabric cluster node with the specified deactivation intent. Once the + deactivation is in progress, the deactivation intent can be increased, but not decreased (for + example, a node that is deactivated with the Pause intent can be deactivated further with + Restart, but not the other way around. Nodes may be reactivated using the Activate a node + operation any time after they are deactivated. If the deactivation is not complete, this will + cancel the deactivation. A node that goes down and comes back up while deactivated will still + need to be reactivated before services will be placed on that node. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param deactivation_intent: Describes the intent or reason for deactivating the node. The + possible values are following. Default value is None. + :type deactivation_intent: str or ~azure.servicefabric.models.DeactivationIntent + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _deactivation_intent_description = _models.DeactivationIntentDescription(deactivation_intent=deactivation_intent) + _json = self._serialize.body(_deactivation_intent_description, 'DeactivationIntentDescription') + + request = build_disable_node_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.disable_node.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_node.metadata = {'url': "/Nodes/{nodeName}/$/Deactivate"} # type: ignore + + + @distributed_trace_async + async def enable_node( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Activate a Service Fabric cluster node that is currently deactivated. + + Activates a Service Fabric cluster node that is currently deactivated. Once activated, the node + will again become a viable target for placing new replicas, and any deactivated replicas + remaining on the node will be reactivated. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_enable_node_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + template_url=self.enable_node.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + enable_node.metadata = {'url': "/Nodes/{nodeName}/$/Activate"} # type: ignore + + + @distributed_trace_async + async def remove_node_state( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Notifies Service Fabric that the persisted state on a node has been permanently removed or + lost. + + This implies that it is not possible to recover the persisted state of that node. This + generally happens if a hard disk has been wiped clean, or if a hard disk crashes. The node has + to be down for this operation to be successful. This operation lets Service Fabric know that + the replicas on that node no longer exist, and that Service Fabric should stop waiting for + those replicas to come back up. Do not run this cmdlet if the state on the node has not been + removed and the node can come back up with its state intact. Starting from Service Fabric 6.5, + in order to use this API for seed nodes, please change the seed nodes to regular (non-seed) + nodes and then invoke this API to remove the node state. If the cluster is running on Azure, + after the seed node goes down, Service Fabric will try to change it to a non-seed node + automatically. To make this happen, make sure the number of non-seed nodes in the primary node + type is no less than the number of Down seed nodes. If necessary, add more nodes to the primary + node type to achieve this. For standalone cluster, if the Down seed node is not expected to + come back up with its state intact, please remove the node from the cluster, see + https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-windows-server-add-remove-nodes. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_remove_node_state_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + template_url=self.remove_node_state.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + remove_node_state.metadata = {'url': "/Nodes/{nodeName}/$/RemoveNodeState"} # type: ignore + + + @distributed_trace_async + async def restart_node( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + timeout: Optional[int] = 60, + node_instance_id: str = "0", + create_fabric_dump: Optional[Union[str, "_models.CreateFabricDump"]] = "False", + **kwargs: Any + ) -> None: + """Restarts a Service Fabric cluster node. + + Restarts a Service Fabric cluster node that is already started. + + :param node_name: The name of the node. + :type node_name: str + :param 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. Default value is 60. + :type timeout: long + :param node_instance_id: The instance ID of the target node. If instance ID is specified the + node is restarted only if it matches with the current instance of the node. A default value of + "0" would match any instance ID. The instance ID can be obtained using get node query. Default + value is "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. Default value is "False". + :type create_fabric_dump: str or ~azure.servicefabric.models.CreateFabricDump + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _restart_node_description = _models.RestartNodeDescription(node_instance_id=node_instance_id, create_fabric_dump=create_fabric_dump) + _json = self._serialize.body(_restart_node_description, 'RestartNodeDescription') + + request = build_restart_node_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.restart_node.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + restart_node.metadata = {'url': "/Nodes/{nodeName}/$/Restart"} # type: ignore + + + @distributed_trace_async + async def remove_configuration_overrides( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Removes configuration overrides on the specified node. + + This api allows removing all existing configuration overrides on specified node. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_remove_configuration_overrides_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + template_url=self.remove_configuration_overrides.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + remove_configuration_overrides.metadata = {'url': "/Nodes/{nodeName}/$/RemoveConfigurationOverrides"} # type: ignore + + + @distributed_trace_async + async def get_configuration_overrides( + self, + node_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List["_models.ConfigParameterOverride"]: + """Gets the list of configuration overrides on the specified node. + + This api allows getting all existing configuration overrides on the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ConfigParameterOverride, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ConfigParameterOverride] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ConfigParameterOverride"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_configuration_overrides_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + template_url=self.get_configuration_overrides.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ConfigParameterOverride]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_configuration_overrides.metadata = {'url': "/Nodes/{nodeName}/$/GetConfigurationOverrides"} # type: ignore + + + @distributed_trace_async + async def add_configuration_parameter_overrides( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + config_parameter_override_list: List["_models.ConfigParameterOverride"], + force: Optional[bool] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Adds the list of configuration overrides on the specified node. + + This api allows adding all existing configuration overrides on the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param config_parameter_override_list: Description for adding list of configuration overrides. + :type config_parameter_override_list: list[~azure.servicefabric.models.ConfigParameterOverride] + :param force: Force adding configuration overrides on specified nodes. Default value is None. + :type force: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(config_parameter_override_list, '[ConfigParameterOverride]') + + request = build_add_configuration_parameter_overrides_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + force=force, + timeout=timeout, + template_url=self.add_configuration_parameter_overrides.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + add_configuration_parameter_overrides.metadata = {'url': "/Nodes/{nodeName}/$/AddConfigurationParameterOverrides"} # type: ignore + + + @distributed_trace_async + async def remove_node_tags( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + node_tags: List[str], + **kwargs: Any + ) -> None: + """Removes the list of tags from the specified node. + + This api allows removing set of tags from the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param node_tags: Description for adding list of node tags. + :type node_tags: list[str] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(node_tags, '[str]') + + request = build_remove_node_tags_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.remove_node_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + remove_node_tags.metadata = {'url': "/Nodes/{nodeName}/$/RemoveNodeTags"} # type: ignore + + + @distributed_trace_async + async def add_node_tags( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + node_tags: List[str], + **kwargs: Any + ) -> None: + """Adds the list of tags on the specified node. + + This api allows adding tags to the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param node_tags: Description for adding list of node tags. + :type node_tags: list[str] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(node_tags, '[str]') + + request = build_add_node_tags_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.add_node_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + add_node_tags.metadata = {'url': "/Nodes/{nodeName}/$/AddNodeTags"} # type: ignore + + + @distributed_trace_async + async def get_application_type_info_list( + self, + application_type_definition_kind_filter: Optional[int] = 0, + exclude_application_parameters: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PagedApplicationTypeInfoList": + """Gets the list of application types in the Service Fabric cluster. + + Returns the information about the application types that are provisioned or in the process of + being provisioned in the Service Fabric cluster. Each version of an application type is + returned as one application type. The response includes the name, version, status, and other + details about the application type. This is a paged query, meaning that if not all of the + application types fit in a page, one page of results is returned as well as a continuation + token, which can be used to get the next page. For example, if there are 10 application types + but a page only fits the first three application types, or if max results is set to 3, then + three is returned. To access the rest of the results, retrieve subsequent pages by using the + returned continuation token in the next query. An empty continuation token is returned if there + are no subsequent pages. + + :param application_type_definition_kind_filter: Used to filter on ApplicationTypeDefinitionKind + which is the mechanism used to define a Service Fabric application type. + + + * Default - Default value, which performs the same function as selecting "All". The value is + 0. + * All - Filter that matches input with any ApplicationTypeDefinitionKind value. The value is + 65535. + * ServiceFabricApplicationPackage - Filter that matches input with + ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. The value is 1. + * Compose - Filter that matches input with ApplicationTypeDefinitionKind value Compose. The + value is 2. Default value is 0. + :type application_type_definition_kind_filter: int + :param exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :type exclude_application_parameters: bool + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedApplicationTypeInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedApplicationTypeInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedApplicationTypeInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_type_info_list_request( + api_version=api_version, + application_type_definition_kind_filter=application_type_definition_kind_filter, + exclude_application_parameters=exclude_application_parameters, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.get_application_type_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedApplicationTypeInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_type_info_list.metadata = {'url': "/ApplicationTypes"} # type: ignore + + + @distributed_trace_async + async def get_application_type_info_list_by_name( + self, + application_type_name: str, + application_type_version: Optional[str] = None, + exclude_application_parameters: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PagedApplicationTypeInfoList": + """Gets the list of application types in the Service Fabric cluster matching exactly the specified + name. + + Returns the information about the application types that are provisioned or in the process of + being provisioned in the Service Fabric cluster. These results are of application types whose + name match exactly the one specified as the parameter, and which comply with the given query + parameters. All versions of the application type matching the application type name are + returned, with each version returned as one application type. The response includes the name, + version, status, and other details about the application type. This is a paged query, meaning + that if not all of the application types fit in a page, one page of results is returned as well + as a continuation token, which can be used to get the next page. For example, if there are 10 + application types but a page only fits the first three application types, or if max results is + set to 3, then three is returned. To access the rest of the results, retrieve subsequent pages + by using the returned continuation token in the next query. An empty continuation token is + returned if there are no subsequent pages. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. Default value is None. + :type application_type_version: str + :param exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :type exclude_application_parameters: bool + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedApplicationTypeInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedApplicationTypeInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedApplicationTypeInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_type_info_list_by_name_request( + application_type_name=application_type_name, + api_version=api_version, + application_type_version=application_type_version, + exclude_application_parameters=exclude_application_parameters, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.get_application_type_info_list_by_name.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedApplicationTypeInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_type_info_list_by_name.metadata = {'url': "/ApplicationTypes/{applicationTypeName}"} # type: ignore + + + @distributed_trace_async + async def provision_application_type( # pylint: disable=inconsistent-return-statements + self, + provision_application_type_description_base_required_body_param: "_models.ProvisionApplicationTypeDescriptionBase", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Provisions or registers a Service Fabric application type with the cluster using the '.sfpkg' + package in the external store or using the application package in the image store. + + Provisions a Service Fabric application type with the cluster. The provision is required before + any new applications can be instantiated. + The provision operation can be performed either on the application package specified by the + relativePathInImageStore, or by using the URI of the external '.sfpkg'. + + :param provision_application_type_description_base_required_body_param: The base type of + provision application type description which supports either image store-based provision or + external store-based provision. + :type provision_application_type_description_base_required_body_param: + ~azure.servicefabric.models.ProvisionApplicationTypeDescriptionBase + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(provision_application_type_description_base_required_body_param, 'ProvisionApplicationTypeDescriptionBase') + + request = build_provision_application_type_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.provision_application_type.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + provision_application_type.metadata = {'url': "/ApplicationTypes/$/Provision"} # type: ignore + + + @distributed_trace_async + async def unprovision_application_type( # pylint: disable=inconsistent-return-statements + self, + application_type_name: str, + application_type_version: str, + timeout: Optional[int] = 60, + async_parameter: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Removes or unregisters a Service Fabric application type from the cluster. + + This operation can only be performed if all application instances of the application type have + been deleted. Once the application type is unregistered, no new application instances can be + created for this particular application type. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type as defined in the + application manifest. + :type application_type_version: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param async_parameter: The flag indicating whether or not unprovision should occur + asynchronously. When set to true, the unprovision operation returns when the request is + accepted by the system, and the unprovision operation continues without any timeout limit. The + default value is false. However, we recommend setting it to true for large application packages + that were provisioned. + :type async_parameter: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _unprovision_application_type_description_info = _models.UnprovisionApplicationTypeDescriptionInfo(application_type_version=application_type_version, async_property=async_parameter) + _json = self._serialize.body(_unprovision_application_type_description_info, 'UnprovisionApplicationTypeDescriptionInfo') + + request = build_unprovision_application_type_request( + application_type_name=application_type_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.unprovision_application_type.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + unprovision_application_type.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/Unprovision"} # type: ignore + + + @distributed_trace_async + async def update_application_type_arm_metadata( # pylint: disable=inconsistent-return-statements + self, + application_type_name: str, + application_type_version: str, + timeout: Optional[int] = 60, + force: Optional[bool] = None, + arm_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """Updates the Arm Metadata for a specific Application Type. + + Updates the Arm Metadata for a specific Application Type. Is able to be called immediately + after the provision app type API is called. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :type application_type_version: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param force: Force parameter used to prevent accidental Arm metadata update. Default value is + None. + :type force: bool + :param arm_resource_id: A string containing the ArmResourceId. Default value is None. + :type arm_resource_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _application_type_arm_metadata_update_description = _models.ArmMetadata(arm_resource_id=arm_resource_id) + _json = self._serialize.body(_application_type_arm_metadata_update_description, 'ArmMetadata') + + request = build_update_application_type_arm_metadata_request( + application_type_name=application_type_name, + api_version=api_version, + content_type=content_type, + application_type_version=application_type_version, + json=_json, + timeout=timeout, + force=force, + template_url=self.update_application_type_arm_metadata.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + update_application_type_arm_metadata.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/UpdateArmMetadata"} # type: ignore + + + @distributed_trace_async + async def get_service_type_info_list( + self, + application_type_name: str, + application_type_version: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List["_models.ServiceTypeInfo"]: + """Gets the list containing the information about service types that are supported by a + provisioned application type in a Service Fabric cluster. + + Gets the list containing the information about service types that are supported by a + provisioned application type in a Service Fabric cluster. The provided application type must + exist. Otherwise, a 404 status is returned. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :type application_type_version: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ServiceTypeInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ServiceTypeInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ServiceTypeInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_type_info_list_request( + application_type_name=application_type_name, + api_version=api_version, + application_type_version=application_type_version, + timeout=timeout, + template_url=self.get_service_type_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ServiceTypeInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_type_info_list.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes"} # type: ignore + + + @distributed_trace_async + async def get_service_type_info_by_name( + self, + application_type_name: str, + application_type_version: str, + service_type_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional["_models.ServiceTypeInfo"]: + """Gets the information about a specific service type that is supported by a provisioned + application type in a Service Fabric cluster. + + Gets the information about a specific service type that is supported by a provisioned + application type in a Service Fabric cluster. The provided application type must exist. + Otherwise, a 404 status is returned. A 204 response is returned if the specified service type + is not found in the cluster. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :type application_type_version: str + :param service_type_name: Specifies the name of a Service Fabric service type. + :type service_type_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceTypeInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceTypeInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServiceTypeInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_type_info_by_name_request( + application_type_name=application_type_name, + service_type_name=service_type_name, + api_version=api_version, + application_type_version=application_type_version, + timeout=timeout, + template_url=self.get_service_type_info_by_name.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServiceTypeInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_type_info_by_name.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes/{serviceTypeName}"} # type: ignore + + + @distributed_trace_async + async def get_service_manifest( + self, + application_type_name: str, + application_type_version: str, + service_manifest_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ServiceTypeManifest": + """Gets the manifest describing a service type. + + Gets the manifest describing a service type. The response contains the service manifest XML as + a string. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :type application_type_version: str + :param service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. + :type service_manifest_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceTypeManifest, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceTypeManifest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceTypeManifest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_manifest_request( + application_type_name=application_type_name, + api_version=api_version, + application_type_version=application_type_version, + service_manifest_name=service_manifest_name, + timeout=timeout, + template_url=self.get_service_manifest.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceTypeManifest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_manifest.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/GetServiceManifest"} # type: ignore + + + @distributed_trace_async + async def get_deployed_service_type_info_list( + self, + node_name: str, + application_id: str, + service_manifest_name: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List["_models.DeployedServiceTypeInfo"]: + """Gets the list containing the information about service types from the applications deployed on + a node in a Service Fabric cluster. + + Gets the list containing the information about service types from the applications deployed on + a node in a Service Fabric cluster. The response includes the name of the service type, its + registration status, the code package that registered it and activation ID of the service + package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_manifest_name: The name of the service manifest to filter the list of deployed + service type information. If specified, the response will only contain the information about + service types that are defined in this service manifest. Default value is None. + :type service_manifest_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of DeployedServiceTypeInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.DeployedServiceTypeInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.DeployedServiceTypeInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_service_type_info_list_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + service_manifest_name=service_manifest_name, + timeout=timeout, + template_url=self.get_deployed_service_type_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[DeployedServiceTypeInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_type_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes"} # type: ignore + + + @distributed_trace_async + async def get_deployed_service_type_info_by_name( + self, + node_name: str, + application_id: str, + service_type_name: str, + service_manifest_name: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[List["_models.DeployedServiceTypeInfo"]]: + """Gets the information about a specified service type of the application deployed on a node in a + Service Fabric cluster. + + Gets the list containing the information about a specific service type from the applications + deployed on a node in a Service Fabric cluster. The response includes the name of the service + type, its registration status, the code package that registered it and activation ID of the + service package. Each entry represents one activation of a service type, differentiated by the + activation ID. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_type_name: Specifies the name of a Service Fabric service type. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest to filter the list of deployed + service type information. If specified, the response will only contain the information about + service types that are defined in this service manifest. Default value is None. + :type service_manifest_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of DeployedServiceTypeInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.DeployedServiceTypeInfo] or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[List["_models.DeployedServiceTypeInfo"]]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_service_type_info_by_name_request( + node_name=node_name, + application_id=application_id, + service_type_name=service_type_name, + api_version=api_version, + service_manifest_name=service_manifest_name, + timeout=timeout, + template_url=self.get_deployed_service_type_info_by_name.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[DeployedServiceTypeInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_type_info_by_name.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes/{serviceTypeName}"} # type: ignore + + + @distributed_trace_async + async def create_application( # pylint: disable=inconsistent-return-statements + self, + application_description: "_models.ApplicationDescription", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates a Service Fabric application. + + Creates a Service Fabric application using the specified description. + + :param application_description: Description for creating an application. + :type application_description: ~azure.servicefabric.models.ApplicationDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(application_description, 'ApplicationDescription') + + request = build_create_application_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.create_application.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + create_application.metadata = {'url': "/Applications/$/Create"} # type: ignore + + + @distributed_trace_async + async def delete_application( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + force_remove: Optional[bool] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes an existing Service Fabric application. + + An application must be created before it can be deleted. Deleting an application will delete + all services that are part of that application. By default, Service Fabric will try to close + service replicas in a graceful manner and then delete the service. However, if a service is + having issues closing the replica gracefully, the delete operation may take a long time or get + stuck. Use the optional ForceRemove flag to skip the graceful close sequence and forcefully + delete the application and all of its services. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param force_remove: Remove a Service Fabric application or service forcefully without going + through the graceful shutdown sequence. This parameter can be used to forcefully delete an + application or service for which delete is timing out due to issues in the service code that + prevents graceful close of replicas. Default value is None. + :type force_remove: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_application_request( + application_id=application_id, + api_version=api_version, + force_remove=force_remove, + timeout=timeout, + template_url=self.delete_application.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_application.metadata = {'url': "/Applications/{applicationId}/$/Delete"} # type: ignore + + + @distributed_trace_async + async def get_application_load_info( + self, + application_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional["_models.ApplicationLoadInfo"]: + """Gets load information about a Service Fabric application. + + Returns the load information about the application that was created or in the process of being + created in the Service Fabric cluster and whose name matches the one specified as the + parameter. The response includes the name, minimum nodes, maximum nodes, the number of nodes + the application is occupying currently, and application load metric information about the + application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationLoadInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationLoadInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationLoadInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_load_info_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_application_load_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationLoadInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_load_info.metadata = {'url': "/Applications/{applicationId}/$/GetLoadInformation"} # type: ignore + + + @distributed_trace_async + async def get_application_info_list( + self, + application_definition_kind_filter: Optional[int] = 0, + application_type_name: Optional[str] = None, + exclude_application_parameters: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PagedApplicationInfoList": + """Gets the list of applications created in the Service Fabric cluster that match the specified + filters. + + Gets the information about the applications that were created or in the process of being + created in the Service Fabric cluster and match the specified filters. The response includes + the name, type, status, parameters, and other details about the application. If the + applications do not fit in a page, one page of results is returned as well as a continuation + token, which can be used to get the next page. Filters ApplicationTypeName and + ApplicationDefinitionKindFilter cannot be specified at the same time. + + :param application_definition_kind_filter: Used to filter on ApplicationDefinitionKind, which + is the mechanism used to define a Service Fabric application. + + + * Default - Default value, which performs the same function as selecting "All". The value is + 0. + * All - Filter that matches input with any ApplicationDefinitionKind value. The value is + 65535. + * ServiceFabricApplicationDescription - Filter that matches input with + ApplicationDefinitionKind value ServiceFabricApplicationDescription. The value is 1. + * Compose - Filter that matches input with ApplicationDefinitionKind value Compose. The value + is 2. Default value is 0. + :type application_definition_kind_filter: int + :param application_type_name: The application type name used to filter the applications to + query for. This value should not contain the application type version. Default value is None. + :type application_type_name: str + :param exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :type exclude_application_parameters: bool + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedApplicationInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedApplicationInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedApplicationInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_info_list_request( + api_version=api_version, + application_definition_kind_filter=application_definition_kind_filter, + application_type_name=application_type_name, + exclude_application_parameters=exclude_application_parameters, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.get_application_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedApplicationInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_info_list.metadata = {'url': "/Applications"} # type: ignore + + + @distributed_trace_async + async def get_application_info( + self, + application_id: str, + exclude_application_parameters: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional["_models.ApplicationInfo"]: + """Gets information about a Service Fabric application. + + Returns the information about the application that was created or in the process of being + created in the Service Fabric cluster and whose name matches the one specified as the + parameter. The response includes the name, type, status, parameters, and other details about + the application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :type exclude_application_parameters: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_info_request( + application_id=application_id, + api_version=api_version, + exclude_application_parameters=exclude_application_parameters, + timeout=timeout, + template_url=self.get_application_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_info.metadata = {'url': "/Applications/{applicationId}"} # type: ignore + + + @distributed_trace_async + async def get_application_health( + self, + application_id: str, + events_health_state_filter: Optional[int] = 0, + deployed_applications_health_state_filter: Optional[int] = 0, + services_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ApplicationHealth": + """Gets the health of the service fabric application. + + Returns the heath state of the service fabric application. The response reports either Ok, + Error or Warning health state. If the entity is not found in the health store, it will return + Error. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param deployed_applications_health_state_filter: Allows filtering of the deployed applications + health state objects returned in the result of application health query based on their health + state. + The possible values for this parameter include integer value of one of the following health + states. Only deployed applications that match the filter will be returned. + All deployed applications are used to evaluate the aggregated health state. If not specified, + all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values, obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of deployed applications with + HealthState value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type deployed_applications_health_state_filter: int + :param services_health_state_filter: Allows filtering of the services health state objects + returned in the result of services health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only services that match the filter are returned. All services are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of services with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type services_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_health_request( + application_id=application_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + deployed_applications_health_state_filter=deployed_applications_health_state_filter, + services_health_state_filter=services_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + template_url=self.get_application_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_health.metadata = {'url': "/Applications/{applicationId}/$/GetHealth"} # type: ignore + + + @distributed_trace_async + async def get_application_health_using_policy( + self, + application_id: str, + events_health_state_filter: Optional[int] = 0, + deployed_applications_health_state_filter: Optional[int] = 0, + services_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + application_health_policy: Optional["_models.ApplicationHealthPolicy"] = None, + **kwargs: Any + ) -> "_models.ApplicationHealth": + """Gets the health of a Service Fabric application using the specified policy. + + Gets the health of a Service Fabric application. Use EventsHealthStateFilter to filter the + collection of health events reported on the node based on the health state. Use + ClusterHealthPolicies to override the health policies used to evaluate the health. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param deployed_applications_health_state_filter: Allows filtering of the deployed applications + health state objects returned in the result of application health query based on their health + state. + The possible values for this parameter include integer value of one of the following health + states. Only deployed applications that match the filter will be returned. + All deployed applications are used to evaluate the aggregated health state. If not specified, + all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values, obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of deployed applications with + HealthState value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type deployed_applications_health_state_filter: int + :param services_health_state_filter: Allows filtering of the services health state objects + returned in the result of services health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only services that match the filter are returned. All services are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of services with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type services_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if application_health_policy is not None: + _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + _json = None + + request = build_get_application_health_using_policy_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + deployed_applications_health_state_filter=deployed_applications_health_state_filter, + services_health_state_filter=services_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + template_url=self.get_application_health_using_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_health_using_policy.metadata = {'url': "/Applications/{applicationId}/$/GetHealth"} # type: ignore + + + @distributed_trace_async + async def report_application_health( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + health_information: "_models.HealthInformation", + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric application. + + Reports health state of the specified Service Fabric application. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway Application, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, get application health and check + that the report appears in the HealthEvents section. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :type immediate: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(health_information, 'HealthInformation') + + request = build_report_application_health_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + template_url=self.report_application_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + report_application_health.metadata = {'url': "/Applications/{applicationId}/$/ReportHealth"} # type: ignore + + + @distributed_trace_async + async def start_application_upgrade( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + application_upgrade_description: "_models.ApplicationUpgradeDescription", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts upgrading an application in the Service Fabric cluster. + + Validates the supplied application upgrade parameters and starts upgrading the application if + the parameters are valid. + Note, `ApplicationParameter + `_\ + s are not preserved across an application upgrade. + In order to preserve current application parameters, the user should get the parameters using + `GetApplicationInfo <./GetApplicationInfo.md>`_ operation first and pass them into the upgrade + API call as shown in the example. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_upgrade_description: Parameters for an application upgrade. + :type application_upgrade_description: + ~azure.servicefabric.models.ApplicationUpgradeDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(application_upgrade_description, 'ApplicationUpgradeDescription') + + request = build_start_application_upgrade_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.start_application_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/Upgrade"} # type: ignore + + + @distributed_trace_async + async def get_application_upgrade( + self, + application_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ApplicationUpgradeProgressInfo": + """Gets details for the latest upgrade performed on this application. + + Returns information about the state of the latest application upgrade along with details to aid + debugging application health issues. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationUpgradeProgressInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationUpgradeProgressInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationUpgradeProgressInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_upgrade_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_application_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationUpgradeProgressInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/GetUpgradeProgress"} # type: ignore + + + @distributed_trace_async + async def update_application_upgrade( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + application_upgrade_update_description: "_models.ApplicationUpgradeUpdateDescription", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Updates an ongoing application upgrade in the Service Fabric cluster. + + Updates the parameters of an ongoing application upgrade from the ones specified at the time of + starting the application upgrade. This may be required to mitigate stuck application upgrades + due to incorrect parameters or issues in the application to make progress. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_upgrade_update_description: Parameters for updating an existing application + upgrade. + :type application_upgrade_update_description: + ~azure.servicefabric.models.ApplicationUpgradeUpdateDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(application_upgrade_update_description, 'ApplicationUpgradeUpdateDescription') + + request = build_update_application_upgrade_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.update_application_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + update_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/UpdateUpgrade"} # type: ignore + + + @distributed_trace_async + async def update_application( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + application_update_description: "_models.ApplicationUpdateDescription", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Updates a Service Fabric application. + + Updates a Service Fabric application instance. The set of properties that can be updated are a + subset of the properties that were specified at the time of creating the application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_update_description: Parameters for updating an existing application + instance. + :type application_update_description: ~azure.servicefabric.models.ApplicationUpdateDescription + :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. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(application_update_description, 'ApplicationUpdateDescription') + + request = build_update_application_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.update_application.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + update_application.metadata = {'url': "/Applications/{applicationId}/$/Update"} # type: ignore + + + @distributed_trace_async + async def resume_application_upgrade( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + upgrade_domain_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Resumes upgrading an application in the Service Fabric cluster. + + Resumes an unmonitored manual Service Fabric application upgrade. Service Fabric upgrades one + upgrade domain at a time. For unmonitored manual upgrades, after Service Fabric finishes an + upgrade domain, it waits for you to call this API before proceeding to the next upgrade domain. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param upgrade_domain_name: The name of the upgrade domain in which to resume the upgrade. + :type upgrade_domain_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _resume_application_upgrade_description = _models.ResumeApplicationUpgradeDescription(upgrade_domain_name=upgrade_domain_name) + _json = self._serialize.body(_resume_application_upgrade_description, 'ResumeApplicationUpgradeDescription') + + request = build_resume_application_upgrade_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.resume_application_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + resume_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/MoveToNextUpgradeDomain"} # type: ignore + + + @distributed_trace_async + async def rollback_application_upgrade( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts rolling back the currently on-going upgrade of an application in the Service Fabric + cluster. + + Starts rolling back the current application upgrade to the previous version. This API can only + be used to roll back the current in-progress upgrade that is rolling forward to new version. If + the application is not currently being upgraded use StartApplicationUpgrade API to upgrade it + to desired version, including rolling back to a previous version. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_rollback_application_upgrade_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + template_url=self.rollback_application_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + rollback_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/RollbackUpgrade"} # type: ignore + + + @distributed_trace_async + async def get_deployed_application_info_list( + self, + node_name: str, + timeout: Optional[int] = 60, + include_health_state: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + **kwargs: Any + ) -> "_models.PagedDeployedApplicationInfoList": + """Gets the list of applications deployed on a Service Fabric node. + + Gets the list of applications deployed on a Service Fabric node. The results do not include + information about deployed system applications unless explicitly queried for by ID. Results + encompass deployed applications in active, activating, and downloading states. This query + requires that the node name corresponds to a node on the cluster. The query fails if the + provided node name does not point to any active Service Fabric nodes on the cluster. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param include_health_state: Include the health state of an entity. + If this parameter is false or not specified, then the health state returned is "Unknown". + When set to true, the query goes in parallel to the node and the health system service before + the results are merged. + As a result, the query is more expensive and may take a longer time. Default value is False. + :type include_health_state: bool + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedDeployedApplicationInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedDeployedApplicationInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedDeployedApplicationInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_application_info_list_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + include_health_state=include_health_state, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + template_url=self.get_deployed_application_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedDeployedApplicationInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_application_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications"} # type: ignore + + + @distributed_trace_async + async def get_deployed_application_info( + self, + node_name: str, + application_id: str, + timeout: Optional[int] = 60, + include_health_state: Optional[bool] = False, + **kwargs: Any + ) -> Optional["_models.DeployedApplicationInfo"]: + """Gets the information about an application deployed on a Service Fabric node. + + This query returns system application information if the application ID provided is for system + application. Results encompass deployed applications in active, activating, and downloading + states. This query requires that the node name corresponds to a node on the cluster. The query + fails if the provided node name does not point to any active Service Fabric nodes on the + cluster. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param include_health_state: Include the health state of an entity. + If this parameter is false or not specified, then the health state returned is "Unknown". + When set to true, the query goes in parallel to the node and the health system service before + the results are merged. + As a result, the query is more expensive and may take a longer time. Default value is False. + :type include_health_state: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeployedApplicationInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.DeployedApplicationInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.DeployedApplicationInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_application_info_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + timeout=timeout, + include_health_state=include_health_state, + template_url=self.get_deployed_application_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DeployedApplicationInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_application_info.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}"} # type: ignore + + + @distributed_trace_async + async def get_deployed_application_health( + self, + node_name: str, + application_id: str, + events_health_state_filter: Optional[int] = 0, + deployed_service_packages_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.DeployedApplicationHealth": + """Gets the information about health of an application deployed on a Service Fabric node. + + Gets the information about health of an application deployed on a Service Fabric node. Use + EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported + on the deployed application based on health state. Use DeployedServicePackagesHealthStateFilter + to optionally filter for DeployedServicePackageHealth children based on health state. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param deployed_service_packages_health_state_filter: Allows filtering of the deployed service + package health state objects returned in the result of deployed application health query based + on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only deployed service packages that match the filter are returned. All deployed service + packages are used to evaluate the aggregated health state of the deployed application. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value can be a combination of these + values, obtained using the bitwise 'OR' operator. + For example, if the provided value is 6 then health state of service packages with HealthState + value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type deployed_service_packages_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeployedApplicationHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.DeployedApplicationHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedApplicationHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_application_health_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + deployed_service_packages_health_state_filter=deployed_service_packages_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + template_url=self.get_deployed_application_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeployedApplicationHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_application_health.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth"} # type: ignore + + + @distributed_trace_async + async def get_deployed_application_health_using_policy( + self, + node_name: str, + application_id: str, + events_health_state_filter: Optional[int] = 0, + deployed_service_packages_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + application_health_policy: Optional["_models.ApplicationHealthPolicy"] = None, + **kwargs: Any + ) -> "_models.DeployedApplicationHealth": + """Gets the information about health of an application deployed on a Service Fabric node. using + the specified policy. + + Gets the information about health of an application deployed on a Service Fabric node using the + specified policy. Use EventsHealthStateFilter to optionally filter for the collection of + HealthEvent objects reported on the deployed application based on health state. Use + DeployedServicePackagesHealthStateFilter to optionally filter for DeployedServicePackageHealth + children based on health state. Use ApplicationHealthPolicy to optionally override the health + policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the + ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the + deployed application. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param deployed_service_packages_health_state_filter: Allows filtering of the deployed service + package health state objects returned in the result of deployed application health query based + on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only deployed service packages that match the filter are returned. All deployed service + packages are used to evaluate the aggregated health state of the deployed application. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value can be a combination of these + values, obtained using the bitwise 'OR' operator. + For example, if the provided value is 6 then health state of service packages with HealthState + value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type deployed_service_packages_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeployedApplicationHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.DeployedApplicationHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedApplicationHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if application_health_policy is not None: + _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + _json = None + + request = build_get_deployed_application_health_using_policy_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + deployed_service_packages_health_state_filter=deployed_service_packages_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + template_url=self.get_deployed_application_health_using_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeployedApplicationHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_application_health_using_policy.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth"} # type: ignore + + + @distributed_trace_async + async def report_deployed_application_health( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + application_id: str, + health_information: "_models.HealthInformation", + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric application deployed on a Service Fabric node. + + Reports health state of the application deployed on a Service Fabric node. The report must + contain the information about the source of the health report and property on which it is + reported. + The report is sent to a Service Fabric gateway Service, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, get deployed application health and + check that the report appears in the HealthEvents section. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :type immediate: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(health_information, 'HealthInformation') + + request = build_report_deployed_application_health_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + template_url=self.report_deployed_application_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + report_deployed_application_health.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/ReportHealth"} # type: ignore + + + @distributed_trace_async + async def get_application_manifest( + self, + application_type_name: str, + application_type_version: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ApplicationTypeManifest": + """Gets the manifest describing an application type. + + The response contains the application manifest XML as a string. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :type application_type_version: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationTypeManifest, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationTypeManifest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationTypeManifest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_manifest_request( + application_type_name=application_type_name, + api_version=api_version, + application_type_version=application_type_version, + timeout=timeout, + template_url=self.get_application_manifest.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationTypeManifest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_manifest.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/GetApplicationManifest"} # type: ignore + + + @distributed_trace_async + async def update_application_arm_metadata( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + timeout: Optional[int] = 60, + force: Optional[bool] = None, + arm_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """Updates the Arm Metadata for a specific Application. + + Updates the Arm Metadata for a specific Application. Is able to be called immediately after the + create app API is called. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param force: Force parameter used to prevent accidental Arm metadata update. Default value is + None. + :type force: bool + :param arm_resource_id: A string containing the ArmResourceId. Default value is None. + :type arm_resource_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _application_arm_metadata_update_description = _models.ArmMetadata(arm_resource_id=arm_resource_id) + _json = self._serialize.body(_application_arm_metadata_update_description, 'ArmMetadata') + + request = build_update_application_arm_metadata_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + force=force, + template_url=self.update_application_arm_metadata.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + update_application_arm_metadata.metadata = {'url': "/Applications/{applicationId}/$/UpdateArmMetadata"} # type: ignore + + + @distributed_trace_async + async def get_service_info_list( + self, + application_id: str, + service_type_name: Optional[str] = None, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PagedServiceInfoList": + """Gets the information about all services belonging to the application specified by the + application ID. + + Returns the information about all services belonging to the application specified by the + application ID. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_type_name: The service type name used to filter the services to query for. + Default value is None. + :type service_type_name: str + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedServiceInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedServiceInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedServiceInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_info_list_request( + application_id=application_id, + api_version=api_version, + service_type_name=service_type_name, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + template_url=self.get_service_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedServiceInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_info_list.metadata = {'url': "/Applications/{applicationId}/$/GetServices"} # type: ignore + + + @distributed_trace_async + async def get_service_info( + self, + application_id: str, + service_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional["_models.ServiceInfo"]: + """Gets the information about the specific service belonging to the Service Fabric application. + + Returns the information about the specified service belonging to the specified Service Fabric + application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServiceInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_info_request( + application_id=application_id, + service_id=service_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_service_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServiceInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_info.metadata = {'url': "/Applications/{applicationId}/$/GetServices/{serviceId}"} # type: ignore + + + @distributed_trace_async + async def get_application_name_info( + self, + service_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ApplicationNameInfo": + """Gets the name of the Service Fabric application for a service. + + Gets the name of the application for the specified service. A 404 + FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the provided service ID + does not exist. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationNameInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationNameInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationNameInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_name_info_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_application_name_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationNameInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_name_info.metadata = {'url': "/Services/{serviceId}/$/GetApplicationName"} # type: ignore + + + @distributed_trace_async + async def create_service( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + service_description: "_models.ServiceDescription", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates the specified Service Fabric service. + + This api allows creating a new Service Fabric stateless or stateful service under a specified + Service Fabric application. The description for creating the service includes partitioning + information and optional properties for placement and load balancing. Some of the properties + can later be modified using ``UpdateService`` API. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_description: The information necessary to create a service. + :type service_description: ~azure.servicefabric.models.ServiceDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(service_description, 'ServiceDescription') + + request = build_create_service_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.create_service.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + create_service.metadata = {'url': "/Applications/{applicationId}/$/GetServices/$/Create"} # type: ignore + + + @distributed_trace_async + async def create_service_from_template( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + service_from_template_description: "_models.ServiceFromTemplateDescription", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates a Service Fabric service from the service template. + + Creates a Service Fabric service from the service template defined in the application manifest. + A service template contains the properties that will be same for the service instance of the + same type. The API allows overriding the properties that are usually different for different + services of the same service type. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_from_template_description: Describes the service that needs to be created from + the template defined in the application manifest. + :type service_from_template_description: + ~azure.servicefabric.models.ServiceFromTemplateDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(service_from_template_description, 'ServiceFromTemplateDescription') + + request = build_create_service_from_template_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.create_service_from_template.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + create_service_from_template.metadata = {'url': "/Applications/{applicationId}/$/GetServices/$/CreateFromTemplate"} # type: ignore + + + @distributed_trace_async + async def delete_service( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + force_remove: Optional[bool] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes an existing Service Fabric service. + + A service must be created before it can be deleted. By default, Service Fabric will try to + close service replicas in a graceful manner and then delete the service. However, if the + service is having issues closing the replica gracefully, the delete operation may take a long + time or get stuck. Use the optional ForceRemove flag to skip the graceful close sequence and + forcefully delete the service. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param force_remove: Remove a Service Fabric application or service forcefully without going + through the graceful shutdown sequence. This parameter can be used to forcefully delete an + application or service for which delete is timing out due to issues in the service code that + prevents graceful close of replicas. Default value is None. + :type force_remove: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_service_request( + service_id=service_id, + api_version=api_version, + force_remove=force_remove, + timeout=timeout, + template_url=self.delete_service.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_service.metadata = {'url': "/Services/{serviceId}/$/Delete"} # type: ignore + + + @distributed_trace_async + async def update_service( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + service_update_description: "_models.ServiceUpdateDescription", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Updates a Service Fabric service using the specified update description. + + This API allows updating properties of a running Service Fabric service. The set of properties + that can be updated are a subset of the properties that were specified at the time of creating + the service. The current set of properties can be obtained using ``GetServiceDescription`` API. + Note that updating the properties of a running service is different than upgrading your + application using ``StartApplicationUpgrade`` API. The upgrade is a long running background + operation that involves moving the application from one version to another, one upgrade domain + at a time, whereas update applies the new properties immediately to the service. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param service_update_description: The information necessary to update a service. + :type service_update_description: ~azure.servicefabric.models.ServiceUpdateDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(service_update_description, 'ServiceUpdateDescription') + + request = build_update_service_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.update_service.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + update_service.metadata = {'url': "/Services/{serviceId}/$/Update"} # type: ignore + + + @distributed_trace_async + async def get_service_description( + self, + service_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ServiceDescription": + """Gets the description of an existing Service Fabric service. + + Gets the description of an existing Service Fabric service. A service must be created before + its description can be obtained. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_description_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_service_description.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_description.metadata = {'url': "/Services/{serviceId}/$/GetDescription"} # type: ignore + + + @distributed_trace_async + async def get_service_health( + self, + service_id: str, + events_health_state_filter: Optional[int] = 0, + partitions_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ServiceHealth": + """Gets the health of the specified Service Fabric service. + + Gets the health information of the specified service. + Use EventsHealthStateFilter to filter the collection of health events reported on the service + based on the health state. + Use PartitionsHealthStateFilter to filter the collection of partitions returned. + If you specify a service that does not exist in the health store, this request returns an + error. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param partitions_health_state_filter: Allows filtering of the partitions health state objects + returned in the result of service health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only partitions that match the filter are returned. All partitions are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these value + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of partitions with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type partitions_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_health_request( + service_id=service_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + partitions_health_state_filter=partitions_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + template_url=self.get_service_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_health.metadata = {'url': "/Services/{serviceId}/$/GetHealth"} # type: ignore + + + @distributed_trace_async + async def get_service_health_using_policy( + self, + service_id: str, + events_health_state_filter: Optional[int] = 0, + partitions_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + application_health_policy: Optional["_models.ApplicationHealthPolicy"] = None, + **kwargs: Any + ) -> "_models.ServiceHealth": + """Gets the health of the specified Service Fabric service, by using the specified health policy. + + Gets the health information of the specified service. + If the application health policy is specified, the health evaluation uses it to get the + aggregated health state. + If the policy is not specified, the health evaluation uses the application health policy + defined in the application manifest, or the default health policy, if no policy is defined in + the manifest. + Use EventsHealthStateFilter to filter the collection of health events reported on the service + based on the health state. + Use PartitionsHealthStateFilter to filter the collection of partitions returned. + If you specify a service that does not exist in the health store, this request returns an + error. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param partitions_health_state_filter: Allows filtering of the partitions health state objects + returned in the result of service health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only partitions that match the filter are returned. All partitions are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these value + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of partitions with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type partitions_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if application_health_policy is not None: + _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + _json = None + + request = build_get_service_health_using_policy_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + partitions_health_state_filter=partitions_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + template_url=self.get_service_health_using_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_health_using_policy.metadata = {'url': "/Services/{serviceId}/$/GetHealth"} # type: ignore + + + @distributed_trace_async + async def report_service_health( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + health_information: "_models.HealthInformation", + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric service. + + Reports health state of the specified Service Fabric service. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway Service, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetServiceHealth and check that + the report appears in the HealthEvents section. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :type immediate: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(health_information, 'HealthInformation') + + request = build_report_service_health_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + template_url=self.report_service_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + report_service_health.metadata = {'url': "/Services/{serviceId}/$/ReportHealth"} # type: ignore + + + @distributed_trace_async + async def resolve_service( + self, + service_id: str, + partition_key_type: Optional[int] = None, + partition_key_value: Optional[str] = None, + previous_rsp_version: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ResolvedServicePartition": + """Resolve a Service Fabric partition. + + Resolve a Service Fabric service partition to get the endpoints of the service replicas. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_key_type: Key type for the partition. This parameter is required if the + partition scheme for the service is Int64Range or Named. The possible values are following. + + + * None (1) - Indicates that the PartitionKeyValue parameter is not specified. This is valid + for the partitions with partitioning scheme as Singleton. This is the default value. The value + is 1. + * Int64Range (2) - Indicates that the PartitionKeyValue parameter is an int64 partition key. + This is valid for the partitions with partitioning scheme as Int64Range. The value is 2. + * Named (3) - Indicates that the PartitionKeyValue parameter is a name of the partition. This + is valid for the partitions with partitioning scheme as Named. The value is 3. Default value is + None. + :type partition_key_type: int + :param partition_key_value: Partition key. This is required if the partition scheme for the + service is Int64Range or Named. + This is not the partition ID, but rather, either the integer key value, or the name of the + partition ID. + For example, if your service is using ranged partitions from 0 to 10, then they + PartitionKeyValue would be an + integer in that range. Query service description to see the range or name. Default value is + None. + :type partition_key_value: str + :param previous_rsp_version: The value in the Version field of the response that was received + previously. This is required if the user knows that the result that was gotten previously is + stale. Default value is None. + :type previous_rsp_version: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResolvedServicePartition, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ResolvedServicePartition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResolvedServicePartition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_resolve_service_request( + service_id=service_id, + api_version=api_version, + partition_key_type=partition_key_type, + partition_key_value=partition_key_value, + previous_rsp_version=previous_rsp_version, + timeout=timeout, + template_url=self.resolve_service.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResolvedServicePartition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + resolve_service.metadata = {'url': "/Services/{serviceId}/$/ResolvePartition"} # type: ignore + + + @distributed_trace_async + async def get_unplaced_replica_information( + self, + service_id: str, + partition_id: Optional[str] = None, + only_query_primaries: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.UnplacedReplicaInformation": + """Gets the information about unplaced replica of the service. + + Returns the information about the unplaced replicas of the service. + If PartitionId is specified, then result will contain information only about unplaced replicas + for that partition. + If PartitionId is not specified, then result will contain information about unplaced replicas + for all partitions of that service. + If OnlyQueryPrimaries is set to true, then result will contain information only about primary + replicas, and will ignore unplaced secondary replicas. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. Default value is None. + :type partition_id: str + :param only_query_primaries: Indicates that unplaced replica information will be queries only + for primary replicas. Default value is False. + :type only_query_primaries: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UnplacedReplicaInformation, or the result of cls(response) + :rtype: ~azure.servicefabric.models.UnplacedReplicaInformation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UnplacedReplicaInformation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_unplaced_replica_information_request( + service_id=service_id, + api_version=api_version, + partition_id=partition_id, + only_query_primaries=only_query_primaries, + timeout=timeout, + template_url=self.get_unplaced_replica_information.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UnplacedReplicaInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_unplaced_replica_information.metadata = {'url': "/Services/{serviceId}/$/GetUnplacedReplicaInformation"} # type: ignore + + + @distributed_trace_async + async def get_loaded_partition_info_list( + self, + metric_name: str, + service_name: Optional[str] = None, + ordering: Optional[Union[str, "_models.Ordering"]] = None, + max_results: Optional[int] = 0, + continuation_token_parameter: Optional[str] = None, + **kwargs: Any + ) -> "_models.LoadedPartitionInformationResultList": + """Gets ordered list of partitions. + + Retrieves partitions which are most/least loaded according to specified metric. + + :param metric_name: Name of the metric based on which to get ordered list of partitions. + :type metric_name: str + :param service_name: The name of a service. Default value is None. + :type service_name: str + :param ordering: Ordering of partitions' load. Default value is None. + :type ordering: str or ~azure.servicefabric.models.Ordering + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LoadedPartitionInformationResultList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.LoadedPartitionInformationResultList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadedPartitionInformationResultList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_loaded_partition_info_list_request( + api_version=api_version, + metric_name=metric_name, + service_name=service_name, + ordering=ordering, + max_results=max_results, + continuation_token_parameter=continuation_token_parameter, + template_url=self.get_loaded_partition_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LoadedPartitionInformationResultList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_loaded_partition_info_list.metadata = {'url': "/$/GetLoadedPartitionInfoList"} # type: ignore + + + @distributed_trace_async + async def get_partition_info_list( + self, + service_id: str, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PagedServicePartitionInfoList": + """Gets the list of partitions of a Service Fabric service. + + The response includes the partition ID, partitioning scheme information, keys supported by the + partition, status, health, and other details about the partition. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedServicePartitionInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedServicePartitionInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedServicePartitionInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_info_list_request( + service_id=service_id, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + template_url=self.get_partition_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedServicePartitionInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_info_list.metadata = {'url': "/Services/{serviceId}/$/GetPartitions"} # type: ignore + + + @distributed_trace_async + async def get_partition_info( + self, + partition_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional["_models.ServicePartitionInfo"]: + """Gets the information about a Service Fabric partition. + + Gets the information about the specified partition. The response includes the partition ID, + partitioning scheme information, keys supported by the partition, status, health, and other + details about the partition. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServicePartitionInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServicePartitionInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServicePartitionInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_info_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_partition_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServicePartitionInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_info.metadata = {'url': "/Partitions/{partitionId}"} # type: ignore + + + @distributed_trace_async + async def get_service_name_info( + self, + partition_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ServiceNameInfo": + """Gets the name of the Service Fabric service for a partition. + + Gets name of the service for the specified partition. A 404 error is returned if the partition + ID does not exist in the cluster. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceNameInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceNameInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceNameInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_name_info_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_service_name_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceNameInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_name_info.metadata = {'url': "/Partitions/{partitionId}/$/GetServiceName"} # type: ignore + + + @distributed_trace_async + async def get_partition_health( + self, + partition_id: str, + events_health_state_filter: Optional[int] = 0, + replicas_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PartitionHealth": + """Gets the health of the specified Service Fabric partition. + + Use EventsHealthStateFilter to filter the collection of health events reported on the service + based on the health state. + Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the + partition. + If you specify a partition that does not exist in the health store, this request returns an + error. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param replicas_health_state_filter: Allows filtering the collection of ReplicaHealthState + objects on the partition. The value can be obtained from members or bitwise operations on + members of HealthStateFilter. Only replicas that match the filter will be returned. All + replicas will be used to evaluate the aggregated health state. If not specified, all entries + will be returned.The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. For example, If the provided + value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be + returned. The possible values for this parameter include integer value of one of the following + health states. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type replicas_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PartitionHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PartitionHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_health_request( + partition_id=partition_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + replicas_health_state_filter=replicas_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + template_url=self.get_partition_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PartitionHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_health.metadata = {'url': "/Partitions/{partitionId}/$/GetHealth"} # type: ignore + + + @distributed_trace_async + async def get_partition_health_using_policy( + self, + partition_id: str, + events_health_state_filter: Optional[int] = 0, + replicas_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + application_health_policy: Optional["_models.ApplicationHealthPolicy"] = None, + **kwargs: Any + ) -> "_models.PartitionHealth": + """Gets the health of the specified Service Fabric partition, by using the specified health + policy. + + Gets the health information of the specified partition. + If the application health policy is specified, the health evaluation uses it to get the + aggregated health state. + If the policy is not specified, the health evaluation uses the application health policy + defined in the application manifest, or the default health policy, if no policy is defined in + the manifest. + Use EventsHealthStateFilter to filter the collection of health events reported on the partition + based on the health state. + Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the + partition. Use ApplicationHealthPolicy in the POST body to override the health policies used to + evaluate the health. + If you specify a partition that does not exist in the health store, this request returns an + error. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param replicas_health_state_filter: Allows filtering the collection of ReplicaHealthState + objects on the partition. The value can be obtained from members or bitwise operations on + members of HealthStateFilter. Only replicas that match the filter will be returned. All + replicas will be used to evaluate the aggregated health state. If not specified, all entries + will be returned.The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. For example, If the provided + value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be + returned. The possible values for this parameter include integer value of one of the following + health states. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type replicas_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PartitionHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PartitionHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if application_health_policy is not None: + _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + _json = None + + request = build_get_partition_health_using_policy_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + replicas_health_state_filter=replicas_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + template_url=self.get_partition_health_using_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PartitionHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_health_using_policy.metadata = {'url': "/Partitions/{partitionId}/$/GetHealth"} # type: ignore + + + @distributed_trace_async + async def report_partition_health( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + health_information: "_models.HealthInformation", + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric partition. + + Reports health state of the specified Service Fabric partition. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway Partition, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetPartitionHealth and check + that the report appears in the HealthEvents section. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :type immediate: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(health_information, 'HealthInformation') + + request = build_report_partition_health_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + template_url=self.report_partition_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + report_partition_health.metadata = {'url': "/Partitions/{partitionId}/$/ReportHealth"} # type: ignore + + + @distributed_trace_async + async def get_partition_load_information( + self, + partition_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PartitionLoadInformation": + """Gets the load information of the specified Service Fabric partition. + + Returns information about the load of a specified partition. + The response includes a list of load reports for a Service Fabric partition. + Each report includes the load metric name, value, and last reported time in UTC. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PartitionLoadInformation, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PartitionLoadInformation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionLoadInformation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_load_information_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_partition_load_information.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PartitionLoadInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_load_information.metadata = {'url': "/Partitions/{partitionId}/$/GetLoadInformation"} # type: ignore + + + @distributed_trace_async + async def reset_partition_load( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Resets the current load of a Service Fabric partition. + + Resets the current load of a Service Fabric partition to the default load for the service. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_reset_partition_load_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.reset_partition_load.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reset_partition_load.metadata = {'url': "/Partitions/{partitionId}/$/ResetLoad"} # type: ignore + + + @distributed_trace_async + async def recover_partition( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Indicates to the Service Fabric cluster that it should attempt to recover a specific partition + that is currently stuck in quorum loss. + + This operation should only be performed if it is known that the replicas that are down cannot + be recovered. Incorrect use of this API can cause potential data loss. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_recover_partition_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.recover_partition.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + recover_partition.metadata = {'url': "/Partitions/{partitionId}/$/Recover"} # type: ignore + + + @distributed_trace_async + async def recover_service_partitions( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Indicates to the Service Fabric cluster that it should attempt to recover the specified service + that is currently stuck in quorum loss. + + Indicates to the Service Fabric cluster that it should attempt to recover the specified service + that is currently stuck in quorum loss. This operation should only be performed if it is known + that the replicas that are down cannot be recovered. Incorrect use of this API can cause + potential data loss. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_recover_service_partitions_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + template_url=self.recover_service_partitions.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + recover_service_partitions.metadata = {'url': "/Services/$/{serviceId}/$/GetPartitions/$/Recover"} # type: ignore + + + @distributed_trace_async + async def recover_system_partitions( # pylint: disable=inconsistent-return-statements + self, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Indicates to the Service Fabric cluster that it should attempt to recover the system services + that are currently stuck in quorum loss. + + Indicates to the Service Fabric cluster that it should attempt to recover the system services + that are currently stuck in quorum loss. This operation should only be performed if it is known + that the replicas that are down cannot be recovered. Incorrect use of this API can cause + potential data loss. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_recover_system_partitions_request( + api_version=api_version, + timeout=timeout, + template_url=self.recover_system_partitions.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + recover_system_partitions.metadata = {'url': "/$/RecoverSystemPartitions"} # type: ignore + + + @distributed_trace_async + async def recover_all_partitions( # pylint: disable=inconsistent-return-statements + self, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Indicates to the Service Fabric cluster that it should attempt to recover any services + (including system services) which are currently stuck in quorum loss. + + This operation should only be performed if it is known that the replicas that are down cannot + be recovered. Incorrect use of this API can cause potential data loss. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_recover_all_partitions_request( + api_version=api_version, + timeout=timeout, + template_url=self.recover_all_partitions.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + recover_all_partitions.metadata = {'url': "/$/RecoverAllPartitions"} # type: ignore + + + @distributed_trace_async + async def move_primary_replica( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + node_name: Optional[str] = None, + ignore_constraints: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Moves the primary replica of a partition of a stateful service. + + This command moves the primary replica of a partition of a stateful service, respecting all + constraints. + If NodeName parameter is specified, primary will be moved to the specified node (if constraints + allow it). + If NodeName parameter is not specified, primary replica will be moved to a random node in the + cluster. + If IgnoreConstraints parameter is specified and set to true, then primary will be moved + regardless of the constraints. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param node_name: The name of the node. Default value is None. + :type node_name: str + :param ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :type ignore_constraints: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_move_primary_replica_request( + partition_id=partition_id, + api_version=api_version, + node_name=node_name, + ignore_constraints=ignore_constraints, + timeout=timeout, + template_url=self.move_primary_replica.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + move_primary_replica.metadata = {'url': "/Partitions/{partitionId}/$/MovePrimaryReplica"} # type: ignore + + + @distributed_trace_async + async def move_secondary_replica( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + current_node_name: str, + new_node_name: Optional[str] = None, + ignore_constraints: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Moves the secondary replica of a partition of a stateful service. + + This command moves the secondary replica of a partition of a stateful service, respecting all + constraints. + CurrentNodeName parameter must be specified to identify the replica that is moved. + Source node name must be specified, but new node name can be omitted, and in that case replica + is moved to a random node. + If IgnoreConstraints parameter is specified and set to true, then secondary will be moved + regardless of the constraints. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param current_node_name: The name of the source node for secondary replica move. + :type current_node_name: str + :param new_node_name: The name of the target node for secondary replica or instance move. If + not specified, replica or instance is moved to a random node. Default value is None. + :type new_node_name: str + :param ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :type ignore_constraints: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_move_secondary_replica_request( + partition_id=partition_id, + api_version=api_version, + current_node_name=current_node_name, + new_node_name=new_node_name, + ignore_constraints=ignore_constraints, + timeout=timeout, + template_url=self.move_secondary_replica.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + move_secondary_replica.metadata = {'url': "/Partitions/{partitionId}/$/MoveSecondaryReplica"} # type: ignore + + + @distributed_trace_async + async def update_partition_load( + self, + partition_metric_load_description_list: List["_models.PartitionMetricLoadDescription"], + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PagedUpdatePartitionLoadResultList": + """Update the loads of provided partitions for specific metrics. + + Updates the load value and predicted load value for all the partitions provided for specified + metrics. + + :param partition_metric_load_description_list: Description of updating load for list of + partitions. + :type partition_metric_load_description_list: + list[~azure.servicefabric.models.PartitionMetricLoadDescription] + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedUpdatePartitionLoadResultList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedUpdatePartitionLoadResultList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedUpdatePartitionLoadResultList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(partition_metric_load_description_list, '[PartitionMetricLoadDescription]') + + request = build_update_partition_load_request( + api_version=api_version, + content_type=content_type, + json=_json, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.update_partition_load.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedUpdatePartitionLoadResultList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_partition_load.metadata = {'url': "/$/UpdatePartitionLoad"} # type: ignore + + + @distributed_trace_async + async def move_instance( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + partition_id: str, + current_node_name: Optional[str] = None, + new_node_name: Optional[str] = None, + ignore_constraints: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Moves the instance of a partition of a stateless service. + + This command moves the instance of a partition of a stateless service, respecting all + constraints. + Partition id and service name must be specified to be able to move the instance. + CurrentNodeName when specified identifies the instance that is moved. If not specified, random + instance will be moved + New node name can be omitted, and in that case instance is moved to a random node. + If IgnoreConstraints parameter is specified and set to true, then instance will be moved + regardless of the constraints. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param current_node_name: The name of the source node for instance move. If not specified, + instance is moved from a random node. Default value is None. + :type current_node_name: str + :param new_node_name: The name of the target node for secondary replica or instance move. If + not specified, replica or instance is moved to a random node. Default value is None. + :type new_node_name: str + :param ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :type ignore_constraints: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_move_instance_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + current_node_name=current_node_name, + new_node_name=new_node_name, + ignore_constraints=ignore_constraints, + timeout=timeout, + template_url=self.move_instance.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + move_instance.metadata = {'url': "/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveInstance"} # type: ignore + + + @distributed_trace_async + async def move_auxiliary_replica( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + partition_id: str, + current_node_name: Optional[str] = None, + new_node_name: Optional[str] = None, + ignore_constraints: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Moves the auxiliary replica of a partition of a stateful service. + + This command moves the auxiliary replica of a partition of a stateful service, respecting all + constraints. + CurrentNodeName can be omitted, and in that case a random auxiliary replica is chosen. + NewNodeName can be omitted, and in that case the auxiliary replica is moved to a random node. + If IgnoreConstraints parameter is specified and set to true, then auxiliary will be moved + regardless of the constraints. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param current_node_name: The name of the source node for instance move. If not specified, + instance is moved from a random node. Default value is None. + :type current_node_name: str + :param new_node_name: The name of the target node for secondary replica or instance move. If + not specified, replica or instance is moved to a random node. Default value is None. + :type new_node_name: str + :param ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :type ignore_constraints: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_move_auxiliary_replica_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + current_node_name=current_node_name, + new_node_name=new_node_name, + ignore_constraints=ignore_constraints, + timeout=timeout, + template_url=self.move_auxiliary_replica.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + move_auxiliary_replica.metadata = {'url': "/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveAuxiliaryReplica"} # type: ignore + + + @distributed_trace_async + async def create_repair_task( + self, + repair_task: "_models.RepairTask", + **kwargs: Any + ) -> "_models.RepairTaskUpdateInfo": + """Creates a new repair task. + + For clusters that have the Repair Manager Service configured, + this API provides a way to create repair tasks that run automatically or manually. + For repair tasks that run automatically, an appropriate repair executor + must be running for each repair action to run automatically. + These are currently only available in specially-configured Azure Cloud Services. + + To create a manual repair task, provide the set of impacted node names and the + expected impact. When the state of the created repair task changes to approved, + you can safely perform repair actions on those nodes. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task: Describes the repair task to be created or updated. + :type repair_task: ~azure.servicefabric.models.RepairTask + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RepairTaskUpdateInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(repair_task, 'RepairTask') + + request = build_create_repair_task_request( + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_repair_task.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_repair_task.metadata = {'url': "/$/CreateRepairTask"} # type: ignore + + + @distributed_trace_async + async def cancel_repair_task( + self, + repair_task_cancel_description: "_models.RepairTaskCancelDescription", + **kwargs: Any + ) -> "_models.RepairTaskUpdateInfo": + """Requests the cancellation of the given repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task_cancel_description: Describes the repair task to be cancelled. + :type repair_task_cancel_description: ~azure.servicefabric.models.RepairTaskCancelDescription + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RepairTaskUpdateInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(repair_task_cancel_description, 'RepairTaskCancelDescription') + + request = build_cancel_repair_task_request( + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.cancel_repair_task.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + cancel_repair_task.metadata = {'url': "/$/CancelRepairTask"} # type: ignore + + + @distributed_trace_async + async def delete_repair_task( # pylint: disable=inconsistent-return-statements + self, + task_id: str, + version: Optional[str] = None, + **kwargs: Any + ) -> None: + """Deletes a completed repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param task_id: The ID of the completed repair task to be deleted. + :type task_id: str + :param version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current version of the repair task. If zero, + then no version check is performed. Default value is None. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _repair_task_delete_description = _models.RepairTaskDeleteDescription(task_id=task_id, version=version) + _json = self._serialize.body(_repair_task_delete_description, 'RepairTaskDeleteDescription') + + request = build_delete_repair_task_request( + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.delete_repair_task.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_repair_task.metadata = {'url': "/$/DeleteRepairTask"} # type: ignore + + + @distributed_trace_async + async def get_repair_task_list( + self, + task_id_filter: Optional[str] = None, + state_filter: Optional[int] = None, + executor_filter: Optional[str] = None, + **kwargs: Any + ) -> List["_models.RepairTask"]: + """Gets a list of repair tasks matching the given filters. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param task_id_filter: The repair task ID prefix to be matched. Default value is None. + :type task_id_filter: str + :param state_filter: A bitwise-OR of the following values, specifying which task states should + be included in the result list. + + + * 1 - Created + * 2 - Claimed + * 4 - Preparing + * 8 - Approved + * 16 - Executing + * 32 - Restoring + * 64 - Completed. Default value is None. + :type state_filter: int + :param executor_filter: The name of the repair executor whose claimed tasks should be included + in the list. Default value is None. + :type executor_filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of RepairTask, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.RepairTask] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.RepairTask"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_repair_task_list_request( + api_version=api_version, + task_id_filter=task_id_filter, + state_filter=state_filter, + executor_filter=executor_filter, + template_url=self.get_repair_task_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[RepairTask]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_repair_task_list.metadata = {'url': "/$/GetRepairTaskList"} # type: ignore + + + @distributed_trace_async + async def force_approve_repair_task( + self, + task_id: str, + version: Optional[str] = None, + **kwargs: Any + ) -> "_models.RepairTaskUpdateInfo": + """Forces the approval of the given repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param task_id: The ID of the repair task. + :type task_id: str + :param version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current version of the repair task. If zero, + then no version check is performed. Default value is None. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RepairTaskUpdateInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _repair_task_approve_description = _models.RepairTaskApproveDescription(task_id=task_id, version=version) + _json = self._serialize.body(_repair_task_approve_description, 'RepairTaskApproveDescription') + + request = build_force_approve_repair_task_request( + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.force_approve_repair_task.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + force_approve_repair_task.metadata = {'url': "/$/ForceApproveRepairTask"} # type: ignore + + + @distributed_trace_async + async def update_repair_task_health_policy( + self, + repair_task_update_health_policy_description: "_models.RepairTaskUpdateHealthPolicyDescription", + **kwargs: Any + ) -> "_models.RepairTaskUpdateInfo": + """Updates the health policy of the given repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task_update_health_policy_description: Describes the repair task healthy policy + to be updated. + :type repair_task_update_health_policy_description: + ~azure.servicefabric.models.RepairTaskUpdateHealthPolicyDescription + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RepairTaskUpdateInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(repair_task_update_health_policy_description, 'RepairTaskUpdateHealthPolicyDescription') + + request = build_update_repair_task_health_policy_request( + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_repair_task_health_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_repair_task_health_policy.metadata = {'url': "/$/UpdateRepairTaskHealthPolicy"} # type: ignore + + + @distributed_trace_async + async def update_repair_execution_state( + self, + repair_task: "_models.RepairTask", + **kwargs: Any + ) -> "_models.RepairTaskUpdateInfo": + """Updates the execution state of a repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task: Describes the repair task to be created or updated. + :type repair_task: ~azure.servicefabric.models.RepairTask + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RepairTaskUpdateInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(repair_task, 'RepairTask') + + request = build_update_repair_execution_state_request( + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_repair_execution_state.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_repair_execution_state.metadata = {'url': "/$/UpdateRepairExecutionState"} # type: ignore + + + @distributed_trace_async + async def get_replica_info_list( + self, + partition_id: str, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PagedReplicaInfoList": + """Gets the information about replicas of a Service Fabric service partition. + + The GetReplicas endpoint returns information about the replicas of the specified partition. The + response includes the ID, role, status, health, node name, uptime, and other details about the + replica. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedReplicaInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedReplicaInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedReplicaInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_replica_info_list_request( + partition_id=partition_id, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + template_url=self.get_replica_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedReplicaInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_replica_info_list.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas"} # type: ignore + + + @distributed_trace_async + async def get_replica_info( + self, + partition_id: str, + replica_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional["_models.ReplicaInfo"]: + """Gets the information about a replica of a Service Fabric partition. + + The response includes the ID, role, status, health, node name, uptime, and other details about + the replica. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ReplicaInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ReplicaInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ReplicaInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_replica_info_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_replica_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ReplicaInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_replica_info.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas/{replicaId}"} # type: ignore + + + @distributed_trace_async + async def get_replica_health( + self, + partition_id: str, + replica_id: str, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ReplicaHealth": + """Gets the health of a Service Fabric stateful service replica or stateless service instance. + + Gets the health of a Service Fabric replica. + Use EventsHealthStateFilter to filter the collection of health events reported on the replica + based on the health state. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ReplicaHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ReplicaHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicaHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_replica_health_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + template_url=self.get_replica_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ReplicaHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_replica_health.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth"} # type: ignore + + + @distributed_trace_async + async def get_replica_health_using_policy( + self, + partition_id: str, + replica_id: str, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + application_health_policy: Optional["_models.ApplicationHealthPolicy"] = None, + **kwargs: Any + ) -> "_models.ReplicaHealth": + """Gets the health of a Service Fabric stateful service replica or stateless service instance + using the specified policy. + + Gets the health of a Service Fabric stateful service replica or stateless service instance. + Use EventsHealthStateFilter to filter the collection of health events reported on the cluster + based on the health state. + Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the + health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The + rest of the fields are ignored while evaluating the health of the replica. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ReplicaHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ReplicaHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicaHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if application_health_policy is not None: + _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + _json = None + + request = build_get_replica_health_using_policy_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + template_url=self.get_replica_health_using_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ReplicaHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_replica_health_using_policy.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth"} # type: ignore + + + @distributed_trace_async + async def report_replica_health( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + replica_id: str, + health_information: "_models.HealthInformation", + service_kind: Union[str, "_models.ReplicaHealthReportServiceKind"] = "Stateful", + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric replica. + + Reports health state of the specified Service Fabric replica. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway Replica, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetReplicaHealth and check that + the report appears in the HealthEvents section. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: ~azure.servicefabric.models.HealthInformation + :param service_kind: The kind of service replica (Stateless or Stateful) for which the health + is being reported. Following are the possible values. Default value is "Stateful". + :type service_kind: str or ~azure.servicefabric.models.ReplicaHealthReportServiceKind + :param immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :type immediate: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(health_information, 'HealthInformation') + + request = build_report_replica_health_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + content_type=content_type, + json=_json, + service_kind=service_kind, + immediate=immediate, + timeout=timeout, + template_url=self.report_replica_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + report_replica_health.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/ReportHealth"} # type: ignore + + + @distributed_trace_async + async def get_deployed_service_replica_info_list( + self, + node_name: str, + application_id: str, + partition_id: Optional[str] = None, + service_manifest_name: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[List["_models.DeployedServiceReplicaInfo"]]: + """Gets the list of replicas deployed on a Service Fabric node. + + Gets the list containing the information about replicas deployed on a Service Fabric node. The + information include partition ID, replica ID, status of the replica, name of the service, name + of the service type, and other information. Use PartitionId or ServiceManifestName query + parameters to return information about the deployed replicas matching the specified values for + those parameters. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param partition_id: The identity of the partition. Default value is None. + :type partition_id: str + :param service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. Default value is None. + :type service_manifest_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of DeployedServiceReplicaInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.DeployedServiceReplicaInfo] or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[List["_models.DeployedServiceReplicaInfo"]]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_service_replica_info_list_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + partition_id=partition_id, + service_manifest_name=service_manifest_name, + timeout=timeout, + template_url=self.get_deployed_service_replica_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[DeployedServiceReplicaInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_replica_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetReplicas"} # type: ignore + + + @distributed_trace_async + async def get_deployed_service_replica_detail_info( + self, + node_name: str, + partition_id: str, + replica_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.DeployedServiceReplicaDetailInfo": + """Gets the details of replica deployed on a Service Fabric node. + + Gets the details of the replica deployed on a Service Fabric node. The information includes + service kind, service name, current service operation, current service operation start date + time, partition ID, replica/instance ID, reported load, and other information. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeployedServiceReplicaDetailInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.DeployedServiceReplicaDetailInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedServiceReplicaDetailInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_service_replica_detail_info_request( + node_name=node_name, + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_deployed_service_replica_detail_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeployedServiceReplicaDetailInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_replica_detail_info.metadata = {'url': "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetDetail"} # type: ignore + + + @distributed_trace_async + async def get_deployed_service_replica_detail_info_by_partition_id( + self, + node_name: str, + partition_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.DeployedServiceReplicaDetailInfo": + """Gets the details of replica deployed on a Service Fabric node. + + Gets the details of the replica deployed on a Service Fabric node. The information includes + service kind, service name, current service operation, current service operation start date + time, partition ID, replica/instance ID, reported load, and other information. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeployedServiceReplicaDetailInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.DeployedServiceReplicaDetailInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedServiceReplicaDetailInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_service_replica_detail_info_by_partition_id_request( + node_name=node_name, + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_deployed_service_replica_detail_info_by_partition_id.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeployedServiceReplicaDetailInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_replica_detail_info_by_partition_id.metadata = {'url': "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas"} # type: ignore + + + @distributed_trace_async + async def restart_replica( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + partition_id: str, + replica_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Restarts a service replica of a persisted service running on a node. + + Restarts a service replica of a persisted service running on a node. Warning - There are no + safety checks performed when this API is used. Incorrect use of this API can lead to + availability loss for stateful services. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_restart_replica_request( + node_name=node_name, + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + timeout=timeout, + template_url=self.restart_replica.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + restart_replica.metadata = {'url': "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Restart"} # type: ignore + + + @distributed_trace_async + async def remove_replica( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + partition_id: str, + replica_id: str, + force_remove: Optional[bool] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Removes a service replica running on a node. + + This API simulates a Service Fabric replica failure by removing a replica from a Service Fabric + cluster. The removal closes the replica, transitions the replica to the role None, and then + removes all of the state information of the replica from the cluster. This API tests the + replica state removal path, and simulates the report fault permanent path through client APIs. + Warning - There are no safety checks performed when this API is used. Incorrect use of this API + can lead to data loss for stateful services. In addition, the forceRemove flag impacts all + other replicas hosted in the same process. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param force_remove: Remove a Service Fabric application or service forcefully without going + through the graceful shutdown sequence. This parameter can be used to forcefully delete an + application or service for which delete is timing out due to issues in the service code that + prevents graceful close of replicas. Default value is None. + :type force_remove: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_remove_replica_request( + node_name=node_name, + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + force_remove=force_remove, + timeout=timeout, + template_url=self.remove_replica.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + remove_replica.metadata = {'url': "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Delete"} # type: ignore + + + @distributed_trace_async + async def get_deployed_service_package_info_list( + self, + node_name: str, + application_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List["_models.DeployedServicePackageInfo"]: + """Gets the list of service packages deployed on a Service Fabric node. + + Returns the information about the service packages deployed on a Service Fabric node for the + given application. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of DeployedServicePackageInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.DeployedServicePackageInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.DeployedServicePackageInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_service_package_info_list_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_deployed_service_package_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[DeployedServicePackageInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_package_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages"} # type: ignore + + + @distributed_trace_async + async def get_deployed_service_package_info_list_by_name( + self, + node_name: str, + application_id: str, + service_package_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[List["_models.DeployedServicePackageInfo"]]: + """Gets the list of service packages deployed on a Service Fabric node matching exactly the + specified name. + + Returns the information about the service packages deployed on a Service Fabric node for the + given application. These results are of service packages whose name match exactly the service + package name specified as the parameter. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of DeployedServicePackageInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.DeployedServicePackageInfo] or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[List["_models.DeployedServicePackageInfo"]]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_service_package_info_list_by_name_request( + node_name=node_name, + application_id=application_id, + service_package_name=service_package_name, + api_version=api_version, + timeout=timeout, + template_url=self.get_deployed_service_package_info_list_by_name.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[DeployedServicePackageInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_package_info_list_by_name.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}"} # type: ignore + + + @distributed_trace_async + async def get_deployed_service_package_health( + self, + node_name: str, + application_id: str, + service_package_name: str, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.DeployedServicePackageHealth": + """Gets the information about health of a service package for a specific application deployed for + a Service Fabric node and application. + + Gets the information about health of a service package for a specific application deployed on a + Service Fabric node. Use EventsHealthStateFilter to optionally filter for the collection of + HealthEvent objects reported on the deployed service package based on health state. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeployedServicePackageHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.DeployedServicePackageHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedServicePackageHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_service_package_health_request( + node_name=node_name, + application_id=application_id, + service_package_name=service_package_name, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + template_url=self.get_deployed_service_package_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeployedServicePackageHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_package_health.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth"} # type: ignore + + + @distributed_trace_async + async def get_deployed_service_package_health_using_policy( + self, + node_name: str, + application_id: str, + service_package_name: str, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + application_health_policy: Optional["_models.ApplicationHealthPolicy"] = None, + **kwargs: Any + ) -> "_models.DeployedServicePackageHealth": + """Gets the information about health of service package for a specific application deployed on a + Service Fabric node using the specified policy. + + Gets the information about health of a service package for a specific application deployed on a + Service Fabric node. using the specified policy. Use EventsHealthStateFilter to optionally + filter for the collection of HealthEvent objects reported on the deployed service package based + on health state. Use ApplicationHealthPolicy to optionally override the health policies used to + evaluate the health. This API only uses 'ConsiderWarningAsError' field of the + ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the + deployed service package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeployedServicePackageHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.DeployedServicePackageHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedServicePackageHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if application_health_policy is not None: + _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + _json = None + + request = build_get_deployed_service_package_health_using_policy_request( + node_name=node_name, + application_id=application_id, + service_package_name=service_package_name, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + template_url=self.get_deployed_service_package_health_using_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeployedServicePackageHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_package_health_using_policy.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth"} # type: ignore + + + @distributed_trace_async + async def report_deployed_service_package_health( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + application_id: str, + service_package_name: str, + health_information: "_models.HealthInformation", + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric deployed service package. + + Reports health state of the service package of the application deployed on a Service Fabric + node. The report must contain the information about the source of the health report and + property on which it is reported. + The report is sent to a Service Fabric gateway Service, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, get deployed service package health + and check that the report appears in the HealthEvents section. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :type immediate: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(health_information, 'HealthInformation') + + request = build_report_deployed_service_package_health_request( + node_name=node_name, + application_id=application_id, + service_package_name=service_package_name, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + template_url=self.report_deployed_service_package_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + report_deployed_service_package_health.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/ReportHealth"} # type: ignore + + + @distributed_trace_async + async def deploy_service_package_to_node( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + deploy_service_package_to_node_description: "_models.DeployServicePackageToNodeDescription", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Downloads all of the code packages associated with specified service manifest on the specified + node. + + This API provides a way to download code packages including the container images on a specific + node outside of the normal application deployment and upgrade path. This is useful for the + large code packages and container images to be present on the node before the actual + application deployment and upgrade, thus significantly reducing the total time required for the + deployment or upgrade. + + :param node_name: The name of the node. + :type node_name: str + :param deploy_service_package_to_node_description: Describes information for deploying a + service package to a Service Fabric node. + :type deploy_service_package_to_node_description: + ~azure.servicefabric.models.DeployServicePackageToNodeDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(deploy_service_package_to_node_description, 'DeployServicePackageToNodeDescription') + + request = build_deploy_service_package_to_node_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.deploy_service_package_to_node.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + deploy_service_package_to_node.metadata = {'url': "/Nodes/{nodeName}/$/DeployServicePackage"} # type: ignore + + + @distributed_trace_async + async def get_deployed_code_package_info_list( + self, + node_name: str, + application_id: str, + service_manifest_name: Optional[str] = None, + code_package_name: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List["_models.DeployedCodePackageInfo"]: + """Gets the list of code packages deployed on a Service Fabric node. + + Gets the list of code packages deployed on a Service Fabric node for the given application. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. Default value is None. + :type service_manifest_name: str + :param code_package_name: The name of code package specified in service manifest registered as + part of an application type in a Service Fabric cluster. Default value is None. + :type code_package_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of DeployedCodePackageInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.DeployedCodePackageInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.DeployedCodePackageInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_code_package_info_list_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, + timeout=timeout, + template_url=self.get_deployed_code_package_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[DeployedCodePackageInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_code_package_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages"} # type: ignore + + + @distributed_trace_async + async def restart_deployed_code_package( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + application_id: str, + restart_deployed_code_package_description: "_models.RestartDeployedCodePackageDescription", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Restarts a code package deployed on a Service Fabric node in a cluster. + + Restarts a code package deployed on a Service Fabric node in a cluster. This aborts the code + package process, which will restart all the user service replicas hosted in that process. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param restart_deployed_code_package_description: Describes the deployed code package on + Service Fabric node to restart. + :type restart_deployed_code_package_description: + ~azure.servicefabric.models.RestartDeployedCodePackageDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(restart_deployed_code_package_description, 'RestartDeployedCodePackageDescription') + + request = build_restart_deployed_code_package_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.restart_deployed_code_package.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + restart_deployed_code_package.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/Restart"} # type: ignore + + + @distributed_trace_async + async def get_container_logs_deployed_on_node( + self, + node_name: str, + application_id: str, + service_manifest_name: str, + code_package_name: str, + tail: Optional[str] = None, + previous: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ContainerLogs": + """Gets the container logs for container deployed on a Service Fabric node. + + Gets the container logs for container deployed on a Service Fabric node for the given code + package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. + :type service_manifest_name: str + :param code_package_name: The name of code package specified in service manifest registered as + part of an application type in a Service Fabric cluster. + :type code_package_name: str + :param tail: Number of lines to show from the end of the logs. Default is 100. 'all' to show + the complete logs. + :type tail: str + :param previous: Specifies whether to get container logs from exited/dead containers of the + code package instance. Default value is False. + :type previous: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ContainerLogs, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ContainerLogs + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerLogs"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_container_logs_deployed_on_node_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, + tail=tail, + previous=previous, + timeout=timeout, + template_url=self.get_container_logs_deployed_on_node.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ContainerLogs', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_container_logs_deployed_on_node.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerLogs"} # type: ignore + + + @distributed_trace_async + async def invoke_container_api( + self, + node_name: str, + application_id: str, + service_manifest_name: str, + code_package_name: str, + code_package_instance_id: str, + container_api_request_body: "_models.ContainerApiRequestBody", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ContainerApiResponse": + """Invoke container API on a container deployed on a Service Fabric node. + + Invoke container API on a container deployed on a Service Fabric node for the given code + package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. + :type service_manifest_name: str + :param code_package_name: The name of code package specified in service manifest registered as + part of an application type in a Service Fabric cluster. + :type code_package_name: str + :param code_package_instance_id: ID that uniquely identifies a code package instance deployed + on a service fabric node. + :type code_package_instance_id: str + :param container_api_request_body: Parameters for making container API call. + :type container_api_request_body: ~azure.servicefabric.models.ContainerApiRequestBody + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ContainerApiResponse, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ContainerApiResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApiResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(container_api_request_body, 'ContainerApiRequestBody') + + request = build_invoke_container_api_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + content_type=content_type, + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, + code_package_instance_id=code_package_instance_id, + json=_json, + timeout=timeout, + template_url=self.invoke_container_api.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ContainerApiResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + invoke_container_api.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerApi"} # type: ignore + + + @distributed_trace_async + async def create_compose_deployment( # pylint: disable=inconsistent-return-statements + self, + create_compose_deployment_description: "_models.CreateComposeDeploymentDescription", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates a Service Fabric compose deployment. + + Compose is a file format that describes multi-container applications. This API allows deploying + container based applications defined in compose format in a Service Fabric cluster. Once the + deployment is created, its status can be tracked via the ``GetComposeDeploymentStatus`` API. + + :param create_compose_deployment_description: Describes the compose deployment that needs to be + created. + :type create_compose_deployment_description: + ~azure.servicefabric.models.CreateComposeDeploymentDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(create_compose_deployment_description, 'CreateComposeDeploymentDescription') + + request = build_create_compose_deployment_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.create_compose_deployment.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + create_compose_deployment.metadata = {'url': "/ComposeDeployments/$/Create"} # type: ignore + + + @distributed_trace_async + async def get_compose_deployment_status( + self, + deployment_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ComposeDeploymentStatusInfo": + """Gets information about a Service Fabric compose deployment. + + Returns the status of the compose deployment that was created or in the process of being + created in the Service Fabric cluster and whose name matches the one specified as the + parameter. The response includes the name, status, and other details about the deployment. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ComposeDeploymentStatusInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ComposeDeploymentStatusInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComposeDeploymentStatusInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_compose_deployment_status_request( + deployment_name=deployment_name, + api_version=api_version, + timeout=timeout, + template_url=self.get_compose_deployment_status.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ComposeDeploymentStatusInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_compose_deployment_status.metadata = {'url': "/ComposeDeployments/{deploymentName}"} # type: ignore + + + @distributed_trace_async + async def get_compose_deployment_status_list( + self, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PagedComposeDeploymentStatusInfoList": + """Gets the list of compose deployments created in the Service Fabric cluster. + + Gets the status about the compose deployments that were created or in the process of being + created in the Service Fabric cluster. The response includes the name, status, and other + details about the compose deployments. If the list of deployments do not fit in a page, one + page of results is returned as well as a continuation token, which can be used to get the next + page. + + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedComposeDeploymentStatusInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedComposeDeploymentStatusInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedComposeDeploymentStatusInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_compose_deployment_status_list_request( + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.get_compose_deployment_status_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedComposeDeploymentStatusInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_compose_deployment_status_list.metadata = {'url': "/ComposeDeployments"} # type: ignore + + + @distributed_trace_async + async def get_compose_deployment_upgrade_progress( + self, + deployment_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ComposeDeploymentUpgradeProgressInfo": + """Gets details for the latest upgrade performed on this Service Fabric compose deployment. + + Returns the information about the state of the compose deployment upgrade along with details to + aid debugging application health issues. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ComposeDeploymentUpgradeProgressInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ComposeDeploymentUpgradeProgressInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComposeDeploymentUpgradeProgressInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_compose_deployment_upgrade_progress_request( + deployment_name=deployment_name, + api_version=api_version, + timeout=timeout, + template_url=self.get_compose_deployment_upgrade_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ComposeDeploymentUpgradeProgressInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_compose_deployment_upgrade_progress.metadata = {'url': "/ComposeDeployments/{deploymentName}/$/GetUpgradeProgress"} # type: ignore + + + @distributed_trace_async + async def remove_compose_deployment( # pylint: disable=inconsistent-return-statements + self, + deployment_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes an existing Service Fabric compose deployment from cluster. + + Deletes an existing Service Fabric compose deployment. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_remove_compose_deployment_request( + deployment_name=deployment_name, + api_version=api_version, + timeout=timeout, + template_url=self.remove_compose_deployment.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + remove_compose_deployment.metadata = {'url': "/ComposeDeployments/{deploymentName}/$/Delete"} # type: ignore + + + @distributed_trace_async + async def start_compose_deployment_upgrade( # pylint: disable=inconsistent-return-statements + self, + deployment_name: str, + compose_deployment_upgrade_description: "_models.ComposeDeploymentUpgradeDescription", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts upgrading a compose deployment in the Service Fabric cluster. + + Validates the supplied upgrade parameters and starts upgrading the deployment if the parameters + are valid. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :param compose_deployment_upgrade_description: Parameters for upgrading compose deployment. + :type compose_deployment_upgrade_description: + ~azure.servicefabric.models.ComposeDeploymentUpgradeDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(compose_deployment_upgrade_description, 'ComposeDeploymentUpgradeDescription') + + request = build_start_compose_deployment_upgrade_request( + deployment_name=deployment_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.start_compose_deployment_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_compose_deployment_upgrade.metadata = {'url': "/ComposeDeployments/{deploymentName}/$/Upgrade"} # type: ignore + + + @distributed_trace_async + async def start_rollback_compose_deployment_upgrade( # pylint: disable=inconsistent-return-statements + self, + deployment_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts rolling back a compose deployment upgrade in the Service Fabric cluster. + + Rollback a service fabric compose deployment upgrade. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_start_rollback_compose_deployment_upgrade_request( + deployment_name=deployment_name, + api_version=api_version, + timeout=timeout, + template_url=self.start_rollback_compose_deployment_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_rollback_compose_deployment_upgrade.metadata = {'url': "/ComposeDeployments/{deploymentName}/$/RollbackUpgrade"} # type: ignore + + + @distributed_trace_async + async def get_chaos( + self, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.Chaos": + """Get the status of Chaos. + + Get the status of Chaos indicating whether or not Chaos is running, the Chaos parameters used + for running Chaos and the status of the Chaos Schedule. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Chaos, or the result of cls(response) + :rtype: ~azure.servicefabric.models.Chaos + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Chaos"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_chaos_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_chaos.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Chaos', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_chaos.metadata = {'url': "/Tools/Chaos"} # type: ignore + + + @distributed_trace_async + async def start_chaos( # pylint: disable=inconsistent-return-statements + self, + chaos_parameters: "_models.ChaosParameters", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts Chaos in the cluster. + + If Chaos is not already running in the cluster, it starts Chaos with the passed in Chaos + parameters. + If Chaos is already running when this call is made, the call fails with the error code + FABRIC_E_CHAOS_ALREADY_RUNNING. + Refer to the article `Induce controlled Chaos in Service Fabric clusters + `_ for more + details. + + :param chaos_parameters: Describes all the parameters to configure a Chaos run. + :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(chaos_parameters, 'ChaosParameters') + + request = build_start_chaos_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.start_chaos.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_chaos.metadata = {'url': "/Tools/Chaos/$/Start"} # type: ignore + + + @distributed_trace_async + async def stop_chaos( # pylint: disable=inconsistent-return-statements + self, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Stops Chaos if it is running in the cluster and put the Chaos Schedule in a stopped state. + + Stops Chaos from executing new faults. In-flight faults will continue to execute until they are + complete. The current Chaos Schedule is put into a stopped state. + Once a schedule is stopped, it will stay in the stopped state and not be used to Chaos Schedule + new runs of Chaos. A new Chaos Schedule must be set in order to resume scheduling. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_stop_chaos_request( + api_version=api_version, + timeout=timeout, + template_url=self.stop_chaos.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop_chaos.metadata = {'url': "/Tools/Chaos/$/Stop"} # type: ignore + + + @distributed_trace_async + async def get_chaos_events( + self, + continuation_token_parameter: Optional[str] = None, + start_time_utc: Optional[str] = None, + end_time_utc: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ChaosEventsSegment": + """Gets the next segment of the Chaos events based on the continuation token or the time range. + + To get the next segment of the Chaos events, you can specify the ContinuationToken. To get the + start of a new segment of Chaos events, you can specify the time range + through StartTimeUtc and EndTimeUtc. You cannot specify both the ContinuationToken and the time + range in the same call. + When there are more than 100 Chaos events, the Chaos events are returned in multiple segments + where a segment contains no more than 100 Chaos events and to get the next segment you make a + call to this API with the continuation token. + + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param start_time_utc: The Windows file time representing the start time of the time range for + which a Chaos report is to be generated. Consult `DateTime.ToFileTimeUtc Method + `_.aspx) for + details. Default value is None. + :type start_time_utc: str + :param end_time_utc: The Windows file time representing the end time of the time range for + which a Chaos report is to be generated. Consult `DateTime.ToFileTimeUtc Method + `_.aspx) for + details. Default value is None. + :type end_time_utc: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ChaosEventsSegment, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ChaosEventsSegment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ChaosEventsSegment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_chaos_events_request( + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + max_results=max_results, + timeout=timeout, + template_url=self.get_chaos_events.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ChaosEventsSegment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_chaos_events.metadata = {'url': "/Tools/Chaos/Events"} # type: ignore + + + @distributed_trace_async + async def get_chaos_schedule( + self, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ChaosScheduleDescription": + """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. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ChaosScheduleDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ChaosScheduleDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ChaosScheduleDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_chaos_schedule_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_chaos_schedule.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ChaosScheduleDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_chaos_schedule.metadata = {'url': "/Tools/Chaos/Schedule"} # type: ignore + + + @distributed_trace_async + async def post_chaos_schedule( # pylint: disable=inconsistent-return-statements + self, + timeout: Optional[int] = 60, + version: Optional[int] = None, + schedule: Optional["_models.ChaosSchedule"] = None, + **kwargs: Any + ) -> None: + """Set the schedule used by Chaos. + + Chaos will automatically schedule runs based on the Chaos Schedule. + The Chaos Schedule will be updated if the provided version matches the version on the server. + When updating the Chaos Schedule, the version on the server is incremented by 1. + The version on the server will wrap back to 0 after reaching a large number. + If Chaos is running when this call is made, the call will fail. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param version: The version number of the Schedule. Default value is None. + :type version: int + :param schedule: Defines the schedule used by Chaos. Default value is None. + :type schedule: ~azure.servicefabric.models.ChaosSchedule + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _chaos_schedule = _models.ChaosScheduleDescription(version=version, schedule=schedule) + _json = self._serialize.body(_chaos_schedule, 'ChaosScheduleDescription') + + request = build_post_chaos_schedule_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.post_chaos_schedule.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + post_chaos_schedule.metadata = {'url': "/Tools/Chaos/Schedule"} # type: ignore + + + @distributed_trace_async + async def upload_file( # pylint: disable=inconsistent-return-statements + self, + content_path: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Uploads contents of the file to the image store. + + Uploads contents of the file to the image store. Use this API if the file is small enough to + upload again if the connection fails. The file's data needs to be added to the request body. + The contents will be uploaded to the specified path. Image store service uses a mark file to + indicate the availability of the folder. The mark file is an empty file named "_.dir". The mark + file is generated by the image store service when all files in a folder are uploaded. When + using File-by-File approach to upload application package in REST, the image store service + isn't aware of the file hierarchy of the application package; you need to create a mark file + per folder and upload it last, to let the image store service know that the folder is complete. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_upload_file_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + template_url=self.upload_file.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + upload_file.metadata = {'url': "/ImageStore/{contentPath}"} # type: ignore + + + @distributed_trace_async + async def get_image_store_content( + self, + content_path: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ImageStoreContent": + """Gets the image store content information. + + Returns the information about the image store content at the specified contentPath. The + contentPath is relative to the root of the image store. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ImageStoreContent, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ImageStoreContent + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ImageStoreContent"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_image_store_content_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + template_url=self.get_image_store_content.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ImageStoreContent', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_image_store_content.metadata = {'url': "/ImageStore/{contentPath}"} # type: ignore + + + @distributed_trace_async + async def delete_image_store_content( # pylint: disable=inconsistent-return-statements + self, + content_path: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes existing image store content. + + Deletes existing image store content being found within the given image store relative path. + This command can be used to delete uploaded application packages once they are provisioned. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_image_store_content_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + template_url=self.delete_image_store_content.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_image_store_content.metadata = {'url': "/ImageStore/{contentPath}"} # type: ignore + + + @distributed_trace_async + async def get_image_store_root_content( + self, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ImageStoreContent": + """Gets the content information at the root of the image store. + + Returns the information about the image store content at the root of the image store. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ImageStoreContent, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ImageStoreContent + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ImageStoreContent"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_image_store_root_content_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_image_store_root_content.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ImageStoreContent', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_image_store_root_content.metadata = {'url': "/ImageStore"} # type: ignore + + + @distributed_trace_async + async def copy_image_store_content( # pylint: disable=inconsistent-return-statements + self, + image_store_copy_description: "_models.ImageStoreCopyDescription", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Copies image store content internally. + + Copies the image store content from the source image store relative path to the destination + image store relative path. + + :param image_store_copy_description: Describes the copy description for the image store. + :type image_store_copy_description: ~azure.servicefabric.models.ImageStoreCopyDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(image_store_copy_description, 'ImageStoreCopyDescription') + + request = build_copy_image_store_content_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.copy_image_store_content.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + copy_image_store_content.metadata = {'url': "/ImageStore/$/Copy"} # type: ignore + + + @distributed_trace_async + async def delete_image_store_upload_session( # pylint: disable=inconsistent-return-statements + self, + session_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Cancels an image store upload session. + + The DELETE request will cause the existing upload session to expire and remove any previously + uploaded file chunks. + + :param session_id: A GUID generated by the user for a file uploading. It identifies an image + store upload session which keeps track of all file chunks until it is committed. + :type session_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_image_store_upload_session_request( + api_version=api_version, + session_id=session_id, + timeout=timeout, + template_url=self.delete_image_store_upload_session.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_image_store_upload_session.metadata = {'url': "/ImageStore/$/DeleteUploadSession"} # type: ignore + + + @distributed_trace_async + async def commit_image_store_upload_session( # pylint: disable=inconsistent-return-statements + self, + session_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Commit an image store upload session. + + When all file chunks have been uploaded, the upload session needs to be committed explicitly to + complete the upload. Image store preserves the upload session until the expiration time, which + is 30 minutes after the last chunk received. + + :param session_id: A GUID generated by the user for a file uploading. It identifies an image + store upload session which keeps track of all file chunks until it is committed. + :type session_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_commit_image_store_upload_session_request( + api_version=api_version, + session_id=session_id, + timeout=timeout, + template_url=self.commit_image_store_upload_session.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + commit_image_store_upload_session.metadata = {'url': "/ImageStore/$/CommitUploadSession"} # type: ignore + + + @distributed_trace_async + async def get_image_store_upload_session_by_id( + self, + session_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.UploadSession": + """Get the image store upload session by ID. + + Gets the image store upload session identified by the given ID. User can query the upload + session at any time during uploading. + + :param session_id: A GUID generated by the user for a file uploading. It identifies an image + store upload session which keeps track of all file chunks until it is committed. + :type session_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UploadSession, or the result of cls(response) + :rtype: ~azure.servicefabric.models.UploadSession + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UploadSession"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_image_store_upload_session_by_id_request( + api_version=api_version, + session_id=session_id, + timeout=timeout, + template_url=self.get_image_store_upload_session_by_id.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UploadSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_image_store_upload_session_by_id.metadata = {'url': "/ImageStore/$/GetUploadSession"} # type: ignore + + + @distributed_trace_async + async def get_image_store_upload_session_by_path( + self, + content_path: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.UploadSession": + """Get the image store upload session by relative path. + + Gets the image store upload session associated with the given image store relative path. User + can query the upload session at any time during uploading. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UploadSession, or the result of cls(response) + :rtype: ~azure.servicefabric.models.UploadSession + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UploadSession"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_image_store_upload_session_by_path_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + template_url=self.get_image_store_upload_session_by_path.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UploadSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_image_store_upload_session_by_path.metadata = {'url': "/ImageStore/{contentPath}/$/GetUploadSession"} # type: ignore + + + @distributed_trace_async + async def upload_file_chunk( # pylint: disable=inconsistent-return-statements + self, + content_path: str, + session_id: str, + content_range: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Uploads a file chunk to the image store relative path. + + Uploads a file chunk to the image store with the specified upload session ID and image store + relative path. This API allows user to resume the file upload operation. user doesn't have to + restart the file upload from scratch whenever there is a network interruption. Use this option + if the file size is large. + + To perform a resumable file upload, user need to break the file into multiple chunks and upload + these chunks to the image store one-by-one. Chunks don't have to be uploaded in order. If the + file represented by the image store relative path already exists, it will be overwritten when + the upload session commits. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :param session_id: A GUID generated by the user for a file uploading. It identifies an image + store upload session which keeps track of all file chunks until it is committed. + :type session_id: str + :param content_range: When uploading file chunks to the image store, the Content-Range header + field need to be configured and sent with a request. The format should looks like "bytes + {First-Byte-Position}-{Last-Byte-Position}/{File-Length}". For example, Content-Range:bytes + 300-5000/20000 indicates that user is sending bytes 300 through 5,000 and the total file length + is 20,000 bytes. + :type content_range: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_upload_file_chunk_request( + content_path=content_path, + api_version=api_version, + session_id=session_id, + content_range=content_range, + timeout=timeout, + template_url=self.upload_file_chunk.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + upload_file_chunk.metadata = {'url': "/ImageStore/{contentPath}/$/UploadChunk"} # type: ignore + + + @distributed_trace_async + async def get_image_store_root_folder_size( + self, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.FolderSizeInfo": + """Get the folder size at the root of the image store. + + Returns the total size of files at the root and children folders in image store. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FolderSizeInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.FolderSizeInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FolderSizeInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_image_store_root_folder_size_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_image_store_root_folder_size.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FolderSizeInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_image_store_root_folder_size.metadata = {'url': "/ImageStore/$/FolderSize"} # type: ignore + + + @distributed_trace_async + async def get_image_store_folder_size( + self, + content_path: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.FolderSizeInfo": + """Get the size of a folder in image store. + + Gets the total size of file under a image store folder, specified by contentPath. The + contentPath is relative to the root of the image store. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FolderSizeInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.FolderSizeInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FolderSizeInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_image_store_folder_size_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + template_url=self.get_image_store_folder_size.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FolderSizeInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_image_store_folder_size.metadata = {'url': "/ImageStore/{contentPath}/$/FolderSize"} # type: ignore + + + @distributed_trace_async + async def get_image_store_info( + self, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.ImageStoreInfo": + """Gets the overall ImageStore information. + + Returns information about the primary ImageStore replica, such as disk capacity and available + disk space at the node it is on, and several categories of the ImageStore's file system usage. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ImageStoreInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ImageStoreInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ImageStoreInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_image_store_info_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_image_store_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ImageStoreInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_image_store_info.metadata = {'url': "/ImageStore/$/Info"} # type: ignore + + + @distributed_trace_async + async def invoke_infrastructure_command( + self, + command: str, + service_id: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> str: + """Invokes an administrative command on the given Infrastructure Service instance. + + For clusters that have one or more instances of the Infrastructure Service configured, + this API provides a way to send infrastructure-specific commands to a particular + instance of the Infrastructure Service. + + Available commands and their corresponding response formats vary depending upon + the infrastructure on which the cluster is running. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param command: The text of the command to be invoked. The content of the command is + infrastructure-specific. + :type command: str + :param service_id: The identity of the infrastructure service. This is the full name of the + infrastructure service without the 'fabric:' URI scheme. This parameter required only for the + cluster that has more than one instance of infrastructure service running. Default value is + None. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_invoke_infrastructure_command_request( + api_version=api_version, + command=command, + service_id=service_id, + timeout=timeout, + template_url=self.invoke_infrastructure_command.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + invoke_infrastructure_command.metadata = {'url': "/$/InvokeInfrastructureCommand"} # type: ignore + + + @distributed_trace_async + async def invoke_infrastructure_query( + self, + command: str, + service_id: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> str: + """Invokes a read-only query on the given infrastructure service instance. + + For clusters that have one or more instances of the Infrastructure Service configured, + this API provides a way to send infrastructure-specific queries to a particular + instance of the Infrastructure Service. + + Available commands and their corresponding response formats vary depending upon + the infrastructure on which the cluster is running. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param command: The text of the command to be invoked. The content of the command is + infrastructure-specific. + :type command: str + :param service_id: The identity of the infrastructure service. This is the full name of the + infrastructure service without the 'fabric:' URI scheme. This parameter required only for the + cluster that has more than one instance of infrastructure service running. Default value is + None. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_invoke_infrastructure_query_request( + api_version=api_version, + command=command, + service_id=service_id, + timeout=timeout, + template_url=self.invoke_infrastructure_query.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + invoke_infrastructure_query.metadata = {'url': "/$/InvokeInfrastructureQuery"} # type: ignore + + + @distributed_trace_async + async def start_data_loss( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + partition_id: str, + operation_id: str, + data_loss_mode: Union[str, "_models.DataLossMode"], + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """This API will induce data loss for the specified partition. It will trigger a call to the + OnDataLossAsync API of the partition. + + This API will induce data loss for the specified partition. It will trigger a call to the + OnDataLoss API of the partition. + Actual data loss will depend on the specified DataLossMode. + + + * PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is triggered for the + partition but actual data loss depends on the presence of in-flight replication. + * FullDataLoss - All replicas are removed hence all data is lost and OnDataLoss is triggered. + + This API should only be called with a stateful service as the target. + + Calling this API with a system service as the target is not advised. + + Note: Once this API has been called, it cannot be reversed. Calling CancelOperation will only + stop execution and clean up internal system state. + It will not restore data if the command has progressed far enough to cause data loss. + + Call the GetDataLossProgress API with the same OperationId to return information on the + operation started with this API. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param data_loss_mode: This enum is passed to the StartDataLoss API to indicate what type of + data loss to induce. + :type data_loss_mode: str or ~azure.servicefabric.models.DataLossMode + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_start_data_loss_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + data_loss_mode=data_loss_mode, + timeout=timeout, + template_url=self.start_data_loss.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_data_loss.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartDataLoss"} # type: ignore + + + @distributed_trace_async + async def get_data_loss_progress( + self, + service_id: str, + partition_id: str, + operation_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PartitionDataLossProgress": + """Gets the progress of a partition data loss operation started using the StartDataLoss API. + + Gets the progress of a data loss operation started with StartDataLoss, using the OperationId. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PartitionDataLossProgress, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PartitionDataLossProgress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionDataLossProgress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_data_loss_progress_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + timeout=timeout, + template_url=self.get_data_loss_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PartitionDataLossProgress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_data_loss_progress.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetDataLossProgress"} # type: ignore + + + @distributed_trace_async + async def start_quorum_loss( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + partition_id: str, + operation_id: str, + quorum_loss_mode: Union[str, "_models.QuorumLossMode"], + quorum_loss_duration: int, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Induces quorum loss for a given stateful service partition. + + This API is useful for a temporary quorum loss situation on your service. + + Call the GetQuorumLossProgress API with the same OperationId to return information on the + operation started with this API. + + This can only be called on stateful persisted (HasPersistedState==true) services. Do not use + this API on stateless services or stateful in-memory only services. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param quorum_loss_mode: This enum is passed to the StartQuorumLoss API to indicate what type + of quorum loss to induce. + :type quorum_loss_mode: str or ~azure.servicefabric.models.QuorumLossMode + :param quorum_loss_duration: The amount of time for which the partition will be kept in quorum + loss. This must be specified in seconds. + :type quorum_loss_duration: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_start_quorum_loss_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + quorum_loss_mode=quorum_loss_mode, + quorum_loss_duration=quorum_loss_duration, + timeout=timeout, + template_url=self.start_quorum_loss.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_quorum_loss.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartQuorumLoss"} # type: ignore + + + @distributed_trace_async + async def get_quorum_loss_progress( + self, + service_id: str, + partition_id: str, + operation_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PartitionQuorumLossProgress": + """Gets the progress of a quorum loss operation on a partition started using the StartQuorumLoss + API. + + Gets the progress of a quorum loss operation started with StartQuorumLoss, using the provided + OperationId. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PartitionQuorumLossProgress, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PartitionQuorumLossProgress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionQuorumLossProgress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_quorum_loss_progress_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + timeout=timeout, + template_url=self.get_quorum_loss_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PartitionQuorumLossProgress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_quorum_loss_progress.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetQuorumLossProgress"} # type: ignore + + + @distributed_trace_async + async def start_partition_restart( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + partition_id: str, + operation_id: str, + restart_partition_mode: Union[str, "_models.RestartPartitionMode"], + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """This API will restart some or all replicas or instances of the specified partition. + + This API is useful for testing failover. + + If used to target a stateless service partition, RestartPartitionMode must be + AllReplicasOrInstances. + + Call the GetPartitionRestartProgress API using the same OperationId to get the progress. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param restart_partition_mode: Describe which partitions to restart. + :type restart_partition_mode: str or ~azure.servicefabric.models.RestartPartitionMode + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_start_partition_restart_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + restart_partition_mode=restart_partition_mode, + timeout=timeout, + template_url=self.start_partition_restart.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_partition_restart.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartRestart"} # type: ignore + + + @distributed_trace_async + async def get_partition_restart_progress( + self, + service_id: str, + partition_id: str, + operation_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PartitionRestartProgress": + """Gets the progress of a PartitionRestart operation started using StartPartitionRestart. + + Gets the progress of a PartitionRestart started with StartPartitionRestart using the provided + OperationId. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PartitionRestartProgress, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PartitionRestartProgress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionRestartProgress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_restart_progress_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + timeout=timeout, + template_url=self.get_partition_restart_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PartitionRestartProgress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_restart_progress.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetRestartProgress"} # type: ignore + + + @distributed_trace_async + async def start_node_transition( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + operation_id: str, + node_transition_type: Union[str, "_models.NodeTransitionType"], + node_instance_id: str, + stop_duration_in_seconds: int, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts or stops a cluster node. + + Starts or stops a cluster node. A cluster node is a process, not the OS instance itself. To + start a node, pass in "Start" for the NodeTransitionType parameter. + To stop a node, pass in "Stop" for the NodeTransitionType parameter. This API starts the + operation - when the API returns the node may not have finished transitioning yet. + Call GetNodeTransitionProgress with the same OperationId to get the progress of the operation. + + :param node_name: The name of the node. + :type node_name: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param node_transition_type: Indicates the type of transition to perform. + NodeTransitionType.Start will start a stopped node. NodeTransitionType.Stop will stop a node + that is up. + :type node_transition_type: str or ~azure.servicefabric.models.NodeTransitionType + :param node_instance_id: The node instance ID of the target node. This can be determined + through GetNodeInfo API. + :type node_instance_id: str + :param stop_duration_in_seconds: The duration, in seconds, to keep the node stopped. The + minimum value is 600, the maximum is 14400. After this time expires, the node will + automatically come back up. + :type stop_duration_in_seconds: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_start_node_transition_request( + node_name=node_name, + api_version=api_version, + operation_id=operation_id, + node_transition_type=node_transition_type, + node_instance_id=node_instance_id, + stop_duration_in_seconds=stop_duration_in_seconds, + timeout=timeout, + template_url=self.start_node_transition.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_node_transition.metadata = {'url': "/Faults/Nodes/{nodeName}/$/StartTransition/"} # type: ignore + + + @distributed_trace_async + async def get_node_transition_progress( + self, + node_name: str, + operation_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.NodeTransitionProgress": + """Gets the progress of an operation started using StartNodeTransition. + + Gets the progress of an operation started with StartNodeTransition using the provided + OperationId. + + :param node_name: The name of the node. + :type node_name: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NodeTransitionProgress, or the result of cls(response) + :rtype: ~azure.servicefabric.models.NodeTransitionProgress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeTransitionProgress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_node_transition_progress_request( + node_name=node_name, + api_version=api_version, + operation_id=operation_id, + timeout=timeout, + template_url=self.get_node_transition_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NodeTransitionProgress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_node_transition_progress.metadata = {'url': "/Faults/Nodes/{nodeName}/$/GetTransitionProgress"} # type: ignore + + + @distributed_trace_async + async def get_fault_operation_list( + self, + type_filter: int = 65535, + state_filter: int = 65535, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List["_models.OperationStatus"]: + """Gets a list of user-induced fault operations filtered by provided input. + + Gets the list of user-induced fault operations filtered by provided input. + + :param type_filter: Used to filter on OperationType for user-induced operations. + + + * 65535 - select all + * 1 - select PartitionDataLoss. + * 2 - select PartitionQuorumLoss. + * 4 - select PartitionRestart. + * 8 - select NodeTransition. Default value is 65535. + :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. Default value is 65535. + :type state_filter: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of OperationStatus, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.OperationStatus] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.OperationStatus"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_fault_operation_list_request( + api_version=api_version, + type_filter=type_filter, + state_filter=state_filter, + timeout=timeout, + template_url=self.get_fault_operation_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[OperationStatus]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_fault_operation_list.metadata = {'url': "/Faults/"} # type: ignore + + + @distributed_trace_async + async def cancel_operation( # pylint: disable=inconsistent-return-statements + self, + operation_id: str, + force: bool = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Cancels a user-induced fault operation. + + The following APIs start fault operations that may be cancelled by using CancelOperation: + StartDataLoss, StartQuorumLoss, StartPartitionRestart, StartNodeTransition. + + If force is false, then the specified user-induced operation will be gracefully stopped and + cleaned up. If force is true, the command will be aborted, and some internal state + may be left behind. Specifying force as true should be used with care. Calling this API with + force set to true is not allowed until this API has already + been called on the same test command with force set to false first, or unless the test command + already has an OperationState of OperationState.RollingBack. + Clarification: OperationState.RollingBack means that the system will be/is cleaning up internal + system state caused by executing the command. It will not restore data if the + test command was to cause data loss. For example, if you call StartDataLoss then call this + API, the system will only clean up internal state from running the command. + It will not restore the target partition's data, if the command progressed far enough to cause + data loss. + + Important note: if this API is invoked with force==true, internal state may be left behind. + + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param force: Indicates whether to gracefully roll back and clean up internal system state + modified by executing the user-induced operation. Default value is False. + :type force: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_cancel_operation_request( + api_version=api_version, + operation_id=operation_id, + force=force, + timeout=timeout, + template_url=self.cancel_operation.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + cancel_operation.metadata = {'url': "/Faults/$/Cancel"} # type: ignore + + + @distributed_trace_async + async def create_backup_policy( # pylint: disable=inconsistent-return-statements + self, + backup_policy_description: "_models.BackupPolicyDescription", + timeout: Optional[int] = 60, + validate_connection: Optional[bool] = False, + **kwargs: Any + ) -> None: + """Creates a backup policy. + + Creates a backup policy which can be associated later with a Service Fabric application, + service or a partition for periodic backup. + + :param backup_policy_description: Describes the backup policy. + :type backup_policy_description: ~azure.servicefabric.models.BackupPolicyDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param validate_connection: Specifies whether to validate the storage connection and + credentials before creating or updating the backup policies. Default value is False. + :type validate_connection: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') + + request = build_create_backup_policy_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + validate_connection=validate_connection, + template_url=self.create_backup_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + create_backup_policy.metadata = {'url': "/BackupRestore/BackupPolicies/$/Create"} # type: ignore + + + @distributed_trace_async + async def delete_backup_policy( # pylint: disable=inconsistent-return-statements + self, + backup_policy_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes the backup policy. + + Deletes an existing backup policy. A backup policy must be created before it can be deleted. A + currently active backup policy, associated with any Service Fabric application, service or + partition, cannot be deleted without first deleting the mapping. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_backup_policy_request( + backup_policy_name=backup_policy_name, + api_version=api_version, + timeout=timeout, + template_url=self.delete_backup_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_backup_policy.metadata = {'url': "/BackupRestore/BackupPolicies/{backupPolicyName}/$/Delete"} # type: ignore + + + @distributed_trace_async + async def get_backup_policy_list( + self, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PagedBackupPolicyDescriptionList": + """Gets all the backup policies configured. + + Get a list of all the backup policies configured. + + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedBackupPolicyDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedBackupPolicyDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupPolicyDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_backup_policy_list_request( + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.get_backup_policy_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedBackupPolicyDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_backup_policy_list.metadata = {'url': "/BackupRestore/BackupPolicies"} # type: ignore + + + @distributed_trace_async + async def get_backup_policy_by_name( + self, + backup_policy_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.BackupPolicyDescription": + """Gets a particular backup policy by name. + + Gets a particular backup policy identified by {backupPolicyName}. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupPolicyDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.BackupPolicyDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupPolicyDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_backup_policy_by_name_request( + backup_policy_name=backup_policy_name, + api_version=api_version, + timeout=timeout, + template_url=self.get_backup_policy_by_name.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupPolicyDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_backup_policy_by_name.metadata = {'url': "/BackupRestore/BackupPolicies/{backupPolicyName}"} # type: ignore + + + @distributed_trace_async + async def get_all_entities_backed_up_by_policy( + self, + backup_policy_name: str, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PagedBackupEntityList": + """Gets the list of backup entities that are associated with this policy. + + Returns a list of Service Fabric application, service or partition which are associated with + this backup policy. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedBackupEntityList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedBackupEntityList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupEntityList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_all_entities_backed_up_by_policy_request( + backup_policy_name=backup_policy_name, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.get_all_entities_backed_up_by_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedBackupEntityList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_all_entities_backed_up_by_policy.metadata = {'url': "/BackupRestore/BackupPolicies/{backupPolicyName}/$/GetBackupEnabledEntities"} # type: ignore + + + @distributed_trace_async + async def update_backup_policy( # pylint: disable=inconsistent-return-statements + self, + backup_policy_name: str, + backup_policy_description: "_models.BackupPolicyDescription", + timeout: Optional[int] = 60, + validate_connection: Optional[bool] = False, + **kwargs: Any + ) -> None: + """Updates the backup policy. + + Updates the backup policy identified by {backupPolicyName}. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :param backup_policy_description: Describes the backup policy. + :type backup_policy_description: ~azure.servicefabric.models.BackupPolicyDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param validate_connection: Specifies whether to validate the storage connection and + credentials before creating or updating the backup policies. Default value is False. + :type validate_connection: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') + + request = build_update_backup_policy_request( + backup_policy_name=backup_policy_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + validate_connection=validate_connection, + template_url=self.update_backup_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + update_backup_policy.metadata = {'url': "/BackupRestore/BackupPolicies/{backupPolicyName}/$/Update"} # type: ignore + + + @distributed_trace_async + async def enable_application_backup( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + backup_policy_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Enables periodic backup of stateful partitions under this Service Fabric application. + + Enables periodic backup of stateful partitions which are part of this Service Fabric + application. Each partition is backed up individually as per the specified backup policy + description. + Note only C# based Reliable Actor and Reliable Stateful services are currently supported for + periodic backup. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param backup_policy_name: Name of the backup policy to be used for enabling periodic backups. + :type backup_policy_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) + _json = self._serialize.body(_enable_backup_description, 'EnableBackupDescription') + + request = build_enable_application_backup_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.enable_application_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + enable_application_backup.metadata = {'url': "/Applications/{applicationId}/$/EnableBackup"} # type: ignore + + + @distributed_trace_async + async def disable_application_backup( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + clean_backup: bool, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Disables periodic backup of Service Fabric application. + + Disables periodic backup of Service Fabric application which was previously enabled. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param clean_backup: Boolean flag to delete backups. It can be set to true for deleting all the + backups which were created for the backup entity that is getting disabled for backup. + :type clean_backup: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) + if _disable_backup_description is not None: + _json = self._serialize.body(_disable_backup_description, 'DisableBackupDescription') + else: + _json = None + + request = build_disable_application_backup_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.disable_application_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_application_backup.metadata = {'url': "/Applications/{applicationId}/$/DisableBackup"} # type: ignore + + + @distributed_trace_async + async def get_application_backup_configuration_info( + self, + application_id: str, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PagedBackupConfigurationInfoList": + """Gets the Service Fabric application backup configuration information. + + Gets the Service Fabric backup configuration information for the application and the services + and partitions under this application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedBackupConfigurationInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedBackupConfigurationInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupConfigurationInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_backup_configuration_info_request( + application_id=application_id, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.get_application_backup_configuration_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedBackupConfigurationInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_backup_configuration_info.metadata = {'url': "/Applications/{applicationId}/$/GetBackupConfigurationInfo"} # type: ignore + + + @distributed_trace_async + async def get_application_backup_list( + self, + application_id: str, + timeout: Optional[int] = 60, + latest: Optional[bool] = False, + start_date_time_filter: Optional[datetime.datetime] = None, + end_date_time_filter: Optional[datetime.datetime] = None, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + **kwargs: Any + ) -> "_models.PagedBackupInfoList": + """Gets the list of backups available for every partition in this application. + + Returns a list of backups available for every partition in this Service Fabric application. The + server enumerates all the backups available at the backup location configured in the backup + policy. It also allows filtering of the result based on start and end datetime or just fetching + the latest available backup for every partition. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param latest: Specifies whether to get only the most recent backup available for a partition + for the specified time range. Default value is False. + :type latest: bool + :param start_date_time_filter: Specify the start date time from which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, all backups from the beginning are enumerated. Default value is + None. + :type start_date_time_filter: ~datetime.datetime + :param end_date_time_filter: Specify the end date time till which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, enumeration is done till the most recent backup. Default value is + None. + :type end_date_time_filter: ~datetime.datetime + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedBackupInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedBackupInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_backup_list_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + latest=latest, + start_date_time_filter=start_date_time_filter, + end_date_time_filter=end_date_time_filter, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + template_url=self.get_application_backup_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedBackupInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_backup_list.metadata = {'url': "/Applications/{applicationId}/$/GetBackups"} # type: ignore + + + @distributed_trace_async + async def suspend_application_backup( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Suspends periodic backup for the specified Service Fabric application. + + The application which is configured to take periodic backups, is suspended for taking further + backups till it is resumed again. This operation applies to the entire application's hierarchy. + It means all the services and partitions under this application are now suspended for backup. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_suspend_application_backup_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + template_url=self.suspend_application_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + suspend_application_backup.metadata = {'url': "/Applications/{applicationId}/$/SuspendBackup"} # type: ignore + + + @distributed_trace_async + async def resume_application_backup( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Resumes periodic backup of a Service Fabric application which was previously suspended. + + The previously suspended Service Fabric application resumes taking periodic backup as per the + backup policy currently configured for the same. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_resume_application_backup_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + template_url=self.resume_application_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + resume_application_backup.metadata = {'url': "/Applications/{applicationId}/$/ResumeBackup"} # type: ignore + + + @distributed_trace_async + async def enable_service_backup( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + backup_policy_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Enables periodic backup of stateful partitions under this Service Fabric service. + + Enables periodic backup of stateful partitions which are part of this Service Fabric service. + Each partition is backed up individually as per the specified backup policy description. In + case the application, which the service is part of, is already enabled for backup then this + operation would override the policy being used to take the periodic backup for this service and + its partitions (unless explicitly overridden at the partition level). + Note only C# based Reliable Actor and Reliable Stateful services are currently supported for + periodic backup. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param backup_policy_name: Name of the backup policy to be used for enabling periodic backups. + :type backup_policy_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) + _json = self._serialize.body(_enable_backup_description, 'EnableBackupDescription') + + request = build_enable_service_backup_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.enable_service_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + enable_service_backup.metadata = {'url': "/Services/{serviceId}/$/EnableBackup"} # type: ignore + + + @distributed_trace_async + async def disable_service_backup( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + clean_backup: bool, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Disables periodic backup of Service Fabric service which was previously enabled. + + Disables periodic backup of Service Fabric service which was previously enabled. Backup must be + explicitly enabled before it can be disabled. + In case the backup is enabled for the Service Fabric application, which this service is part + of, this service would continue to be periodically backed up as per the policy mapped at the + application level. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param clean_backup: Boolean flag to delete backups. It can be set to true for deleting all the + backups which were created for the backup entity that is getting disabled for backup. + :type clean_backup: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) + if _disable_backup_description is not None: + _json = self._serialize.body(_disable_backup_description, 'DisableBackupDescription') + else: + _json = None + + request = build_disable_service_backup_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.disable_service_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_service_backup.metadata = {'url': "/Services/{serviceId}/$/DisableBackup"} # type: ignore + + + @distributed_trace_async + async def get_service_backup_configuration_info( + self, + service_id: str, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PagedBackupConfigurationInfoList": + """Gets the Service Fabric service backup configuration information. + + Gets the Service Fabric backup configuration information for the service and the partitions + under this service. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedBackupConfigurationInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedBackupConfigurationInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupConfigurationInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_backup_configuration_info_request( + service_id=service_id, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.get_service_backup_configuration_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedBackupConfigurationInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_backup_configuration_info.metadata = {'url': "/Services/{serviceId}/$/GetBackupConfigurationInfo"} # type: ignore + + + @distributed_trace_async + async def get_service_backup_list( + self, + service_id: str, + timeout: Optional[int] = 60, + latest: Optional[bool] = False, + start_date_time_filter: Optional[datetime.datetime] = None, + end_date_time_filter: Optional[datetime.datetime] = None, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + **kwargs: Any + ) -> "_models.PagedBackupInfoList": + """Gets the list of backups available for every partition in this service. + + Returns a list of backups available for every partition in this Service Fabric service. The + server enumerates all the backups available in the backup store configured in the backup + policy. It also allows filtering of the result based on start and end datetime or just fetching + the latest available backup for every partition. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param latest: Specifies whether to get only the most recent backup available for a partition + for the specified time range. Default value is False. + :type latest: bool + :param start_date_time_filter: Specify the start date time from which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, all backups from the beginning are enumerated. Default value is + None. + :type start_date_time_filter: ~datetime.datetime + :param end_date_time_filter: Specify the end date time till which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, enumeration is done till the most recent backup. Default value is + None. + :type end_date_time_filter: ~datetime.datetime + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedBackupInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedBackupInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_backup_list_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + latest=latest, + start_date_time_filter=start_date_time_filter, + end_date_time_filter=end_date_time_filter, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + template_url=self.get_service_backup_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedBackupInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_backup_list.metadata = {'url': "/Services/{serviceId}/$/GetBackups"} # type: ignore + + + @distributed_trace_async + async def suspend_service_backup( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Suspends periodic backup for the specified Service Fabric service. + + The service which is configured to take periodic backups, is suspended for taking further + backups till it is resumed again. This operation applies to the entire service's hierarchy. It + means all the partitions under this service are now suspended for backup. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_suspend_service_backup_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + template_url=self.suspend_service_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + suspend_service_backup.metadata = {'url': "/Services/{serviceId}/$/SuspendBackup"} # type: ignore + + + @distributed_trace_async + async def resume_service_backup( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Resumes periodic backup of a Service Fabric service which was previously suspended. + + The previously suspended Service Fabric service resumes taking periodic backup as per the + backup policy currently configured for the same. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_resume_service_backup_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + template_url=self.resume_service_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + resume_service_backup.metadata = {'url': "/Services/{serviceId}/$/ResumeBackup"} # type: ignore + + + @distributed_trace_async + async def enable_partition_backup( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + backup_policy_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Enables periodic backup of the stateful persisted partition. + + Enables periodic backup of stateful persisted partition. Each partition is backed up as per the + specified backup policy description. In case the application or service, which is partition is + part of, is already enabled for backup then this operation would override the policy being used + to take the periodic backup of this partition. + Note only C# based Reliable Actor and Reliable Stateful services are currently supported for + periodic backup. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param backup_policy_name: Name of the backup policy to be used for enabling periodic backups. + :type backup_policy_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) + _json = self._serialize.body(_enable_backup_description, 'EnableBackupDescription') + + request = build_enable_partition_backup_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.enable_partition_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + enable_partition_backup.metadata = {'url': "/Partitions/{partitionId}/$/EnableBackup"} # type: ignore + + + @distributed_trace_async + async def disable_partition_backup( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + clean_backup: bool, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Disables periodic backup of Service Fabric partition which was previously enabled. + + Disables periodic backup of partition which was previously enabled. Backup must be explicitly + enabled before it can be disabled. + In case the backup is enabled for the Service Fabric application or service, which this + partition is part of, this partition would continue to be periodically backed up as per the + policy mapped at the higher level entity. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param clean_backup: Boolean flag to delete backups. It can be set to true for deleting all the + backups which were created for the backup entity that is getting disabled for backup. + :type clean_backup: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) + if _disable_backup_description is not None: + _json = self._serialize.body(_disable_backup_description, 'DisableBackupDescription') + else: + _json = None + + request = build_disable_partition_backup_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.disable_partition_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_partition_backup.metadata = {'url': "/Partitions/{partitionId}/$/DisableBackup"} # type: ignore + + + @distributed_trace_async + async def get_partition_backup_configuration_info( + self, + partition_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PartitionBackupConfigurationInfo": + """Gets the partition backup configuration information. + + Gets the Service Fabric Backup configuration information for the specified partition. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PartitionBackupConfigurationInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PartitionBackupConfigurationInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionBackupConfigurationInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_backup_configuration_info_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_partition_backup_configuration_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PartitionBackupConfigurationInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_backup_configuration_info.metadata = {'url': "/Partitions/{partitionId}/$/GetBackupConfigurationInfo"} # type: ignore + + + @distributed_trace_async + async def get_partition_backup_list( + self, + partition_id: str, + timeout: Optional[int] = 60, + latest: Optional[bool] = False, + start_date_time_filter: Optional[datetime.datetime] = None, + end_date_time_filter: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> "_models.PagedBackupInfoList": + """Gets the list of backups available for the specified partition. + + Returns a list of backups available for the specified partition. The server enumerates all the + backups available in the backup store configured in the backup policy. It also allows filtering + of the result based on start and end datetime or just fetching the latest available backup for + the partition. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param latest: Specifies whether to get only the most recent backup available for a partition + for the specified time range. Default value is False. + :type latest: bool + :param start_date_time_filter: Specify the start date time from which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, all backups from the beginning are enumerated. Default value is + None. + :type start_date_time_filter: ~datetime.datetime + :param end_date_time_filter: Specify the end date time till which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, enumeration is done till the most recent backup. Default value is + None. + :type end_date_time_filter: ~datetime.datetime + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedBackupInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedBackupInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_backup_list_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + latest=latest, + start_date_time_filter=start_date_time_filter, + end_date_time_filter=end_date_time_filter, + template_url=self.get_partition_backup_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedBackupInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_backup_list.metadata = {'url': "/Partitions/{partitionId}/$/GetBackups"} # type: ignore + + + @distributed_trace_async + async def suspend_partition_backup( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Suspends periodic backup for the specified partition. + + The partition which is configured to take periodic backups, is suspended for taking further + backups till it is resumed again. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_suspend_partition_backup_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.suspend_partition_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + suspend_partition_backup.metadata = {'url': "/Partitions/{partitionId}/$/SuspendBackup"} # type: ignore + + + @distributed_trace_async + async def resume_partition_backup( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Resumes periodic backup of partition which was previously suspended. + + The previously suspended partition resumes taking periodic backup as per the backup policy + currently configured for the same. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_resume_partition_backup_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.resume_partition_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + resume_partition_backup.metadata = {'url': "/Partitions/{partitionId}/$/ResumeBackup"} # type: ignore + + + @distributed_trace_async + async def backup_partition( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + backup_timeout: Optional[int] = 10, + timeout: Optional[int] = 60, + backup_storage: Optional["_models.BackupStorageDescription"] = None, + **kwargs: Any + ) -> None: + """Triggers backup of the partition's state. + + Creates a backup of the stateful persisted partition's state. In case the partition is already + being periodically backed up, then by default the new backup is created at the same backup + storage. One can also override the same by specifying the backup storage details as part of the + request body. Once the backup is initiated, its progress can be tracked using the + GetBackupProgress operation. + In case, the operation times out, specify a greater backup timeout value in the query + parameter. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param backup_timeout: Specifies the maximum amount of time, in minutes, to wait for the backup + operation to complete. Post that, the operation completes with timeout error. However, in + certain corner cases it could be that though the operation returns back timeout, the backup + actually goes through. In case of timeout error, its recommended to invoke this operation again + with a greater timeout value. The default value for the same is 10 minutes. Default value is + 10. + :type backup_timeout: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param backup_storage: Specifies the details of the backup storage where to save the backup. + Default value is None. + :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _backup_partition_description = _models.BackupPartitionDescription(backup_storage=backup_storage) + if _backup_partition_description is not None: + _json = self._serialize.body(_backup_partition_description, 'BackupPartitionDescription') + else: + _json = None + + request = build_backup_partition_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + backup_timeout=backup_timeout, + timeout=timeout, + template_url=self.backup_partition.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + backup_partition.metadata = {'url': "/Partitions/{partitionId}/$/Backup"} # type: ignore + + + @distributed_trace_async + async def get_partition_backup_progress( + self, + partition_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.BackupProgressInfo": + """Gets details for the latest backup triggered for this partition. + + Returns information about the state of the latest backup along with details or failure reason + in case of completion. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupProgressInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.BackupProgressInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupProgressInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_backup_progress_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_partition_backup_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupProgressInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_backup_progress.metadata = {'url': "/Partitions/{partitionId}/$/GetBackupProgress"} # type: ignore + + + @distributed_trace_async + async def restore_partition( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + restore_partition_description: "_models.RestorePartitionDescription", + restore_timeout: Optional[int] = 10, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Triggers restore of the state of the partition using the specified restore partition + description. + + Restores the state of a of the stateful persisted partition using the specified backup point. + In case the partition is already being periodically backed up, then by default the backup point + is looked for in the storage specified in backup policy. One can also override the same by + specifying the backup storage details as part of the restore partition description in body. + Once the restore is initiated, its progress can be tracked using the GetRestoreProgress + operation. + In case, the operation times out, specify a greater restore timeout value in the query + parameter. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param restore_partition_description: Describes the parameters to restore the partition. + :type restore_partition_description: ~azure.servicefabric.models.RestorePartitionDescription + :param restore_timeout: Specifies the maximum amount of time to wait, in minutes, for the + restore operation to complete. Post that, the operation returns back with timeout error. + However, in certain corner cases it could be that the restore operation goes through even + though it completes with timeout. In case of timeout error, its recommended to invoke this + operation again with a greater timeout value. the default value for the same is 10 minutes. + Default value is 10. + :type restore_timeout: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(restore_partition_description, 'RestorePartitionDescription') + + request = build_restore_partition_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + restore_timeout=restore_timeout, + timeout=timeout, + template_url=self.restore_partition.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + restore_partition.metadata = {'url': "/Partitions/{partitionId}/$/Restore"} # type: ignore + + + @distributed_trace_async + async def get_partition_restore_progress( + self, + partition_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.RestoreProgressInfo": + """Gets details for the latest restore operation triggered for this partition. + + Returns information about the state of the latest restore operation along with details or + failure reason in case of completion. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RestoreProgressInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.RestoreProgressInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreProgressInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_restore_progress_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_partition_restore_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RestoreProgressInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_restore_progress.metadata = {'url': "/Partitions/{partitionId}/$/GetRestoreProgress"} # type: ignore + + + @distributed_trace_async + async def get_backups_from_backup_location( + self, + get_backup_by_storage_query_description: "_models.GetBackupByStorageQueryDescription", + timeout: Optional[int] = 60, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + **kwargs: Any + ) -> "_models.PagedBackupInfoList": + """Gets the list of backups available for the specified backed up entity at the specified backup + location. + + Gets the list of backups available for the specified backed up entity (Application, Service or + Partition) at the specified backup location (FileShare or Azure Blob Storage). + + :param get_backup_by_storage_query_description: Describes the filters and backup storage + details to be used for enumerating backups. + :type get_backup_by_storage_query_description: + ~azure.servicefabric.models.GetBackupByStorageQueryDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedBackupInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedBackupInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(get_backup_by_storage_query_description, 'GetBackupByStorageQueryDescription') + + request = build_get_backups_from_backup_location_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + template_url=self.get_backups_from_backup_location.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedBackupInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_backups_from_backup_location.metadata = {'url': "/BackupRestore/$/GetBackups"} # type: ignore + + + @distributed_trace_async + async def create_name( # pylint: disable=inconsistent-return-statements + self, + name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates a Service Fabric name. + + Creates the specified Service Fabric name. + + :param name: The Service Fabric name, including the 'fabric:' URI scheme. + :type name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _name_description = _models.NameDescription(name=name) + _json = self._serialize.body(_name_description, 'NameDescription') + + request = build_create_name_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.create_name.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + create_name.metadata = {'url': "/Names/$/Create"} # type: ignore + + + @distributed_trace_async + async def get_name_exists_info( # pylint: disable=inconsistent-return-statements + self, + name_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Returns whether the Service Fabric name exists. + + Returns whether the specified Service Fabric name exists. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_name_exists_info_request( + name_id=name_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_name_exists_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + get_name_exists_info.metadata = {'url': "/Names/{nameId}"} # type: ignore + + + @distributed_trace_async + async def delete_name( # pylint: disable=inconsistent-return-statements + self, + name_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes a Service Fabric name. + + Deletes the specified Service Fabric name. A name must be created before it can be deleted. + Deleting a name with child properties will fail. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_name_request( + name_id=name_id, + api_version=api_version, + timeout=timeout, + template_url=self.delete_name.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_name.metadata = {'url': "/Names/{nameId}"} # type: ignore + + + @distributed_trace_async + async def get_sub_name_info_list( + self, + name_id: str, + recursive: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PagedSubNameInfoList": + """Enumerates all the Service Fabric names under a given name. + + Enumerates all the Service Fabric names under a given name. If the subnames do not fit in a + page, one page of results is returned as well as a continuation token, which can be used to get + the next page. Querying a name that doesn't exist will fail. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param recursive: Allows specifying that the search performed should be recursive. Default + value is False. + :type recursive: bool + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedSubNameInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedSubNameInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedSubNameInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_sub_name_info_list_request( + name_id=name_id, + api_version=api_version, + recursive=recursive, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + template_url=self.get_sub_name_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedSubNameInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_sub_name_info_list.metadata = {'url': "/Names/{nameId}/$/GetSubNames"} # type: ignore + + + @distributed_trace_async + async def get_property_info_list( + self, + name_id: str, + include_values: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PagedPropertyInfoList": + """Gets information on all Service Fabric properties under a given name. + + A Service Fabric name can have one or more named properties that store custom information. This + operation gets the information about these properties in a paged list. The information includes + name, value, and metadata about each of the properties. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param include_values: Allows specifying whether to include the values of the properties + returned. True if values should be returned with the metadata; False to return only property + metadata. Default value is False. + :type include_values: bool + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedPropertyInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedPropertyInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedPropertyInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_property_info_list_request( + name_id=name_id, + api_version=api_version, + include_values=include_values, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + template_url=self.get_property_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedPropertyInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_property_info_list.metadata = {'url': "/Names/{nameId}/$/GetProperties"} # type: ignore + + + @distributed_trace_async + async def put_property( # pylint: disable=inconsistent-return-statements + self, + name_id: str, + property_description: "_models.PropertyDescription", + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates or updates a Service Fabric property. + + Creates or updates the specified Service Fabric property under a given name. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param property_description: Describes the Service Fabric property to be created. + :type property_description: ~azure.servicefabric.models.PropertyDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(property_description, 'PropertyDescription') + + request = build_put_property_request( + name_id=name_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.put_property.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + put_property.metadata = {'url': "/Names/{nameId}/$/GetProperty"} # type: ignore + + + @distributed_trace_async + async def get_property_info( + self, + name_id: str, + property_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> "_models.PropertyInfo": + """Gets the specified Service Fabric property. + + Gets the specified Service Fabric property under a given name. This will always return both + value and metadata. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param property_name: Specifies the name of the property to get. + :type property_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PropertyInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PropertyInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PropertyInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_property_info_request( + name_id=name_id, + api_version=api_version, + property_name=property_name, + timeout=timeout, + template_url=self.get_property_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PropertyInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_property_info.metadata = {'url': "/Names/{nameId}/$/GetProperty"} # type: ignore + + + @distributed_trace_async + async def delete_property( # pylint: disable=inconsistent-return-statements + self, + name_id: str, + property_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes the specified Service Fabric property. + + Deletes the specified Service Fabric property under a given name. A property must be created + before it can be deleted. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param property_name: Specifies the name of the property to get. + :type property_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_property_request( + name_id=name_id, + api_version=api_version, + property_name=property_name, + timeout=timeout, + template_url=self.delete_property.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_property.metadata = {'url': "/Names/{nameId}/$/GetProperty"} # type: ignore + + + @distributed_trace_async + async def submit_property_batch( + self, + name_id: str, + timeout: Optional[int] = 60, + operations: Optional[List["_models.PropertyBatchOperation"]] = None, + **kwargs: Any + ) -> Union["_models.SuccessfulPropertyBatchInfo", "_models.FailedPropertyBatchInfo"]: + """Submits a property batch. + + Submits a batch of property operations. Either all or none of the operations will be committed. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param operations: A list of the property batch operations to be executed. Default value is + None. + :type operations: list[~azure.servicefabric.models.PropertyBatchOperation] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SuccessfulPropertyBatchInfo or FailedPropertyBatchInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.SuccessfulPropertyBatchInfo or + ~azure.servicefabric.models.FailedPropertyBatchInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Union["_models.SuccessfulPropertyBatchInfo", "_models.FailedPropertyBatchInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _property_batch_description_list = _models.PropertyBatchDescriptionList(operations=operations) + _json = self._serialize.body(_property_batch_description_list, 'PropertyBatchDescriptionList') + + request = build_submit_property_batch_request( + name_id=name_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.submit_property_batch.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 409]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SuccessfulPropertyBatchInfo', pipeline_response) + + if response.status_code == 409: + deserialized = self._deserialize('FailedPropertyBatchInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + submit_property_batch.metadata = {'url': "/Names/{nameId}/$/GetProperties/$/SubmitBatch"} # type: ignore + + + @distributed_trace_async + async def get_cluster_event_list( + self, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List["_models.ClusterEvent"]: + """Gets all Cluster-related events. + + The response is list of ClusterEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ClusterEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ClusterEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ClusterEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_cluster_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ClusterEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_event_list.metadata = {'url': "/EventsStore/Cluster/Events"} # type: ignore + + + @distributed_trace_async + async def get_containers_event_list( + self, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List["_models.ContainerInstanceEvent"]: + """Gets all Containers-related events. + + The response is list of ContainerInstanceEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ContainerInstanceEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ContainerInstanceEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ContainerInstanceEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_containers_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_containers_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ContainerInstanceEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_containers_event_list.metadata = {'url': "/EventsStore/Containers/Events"} # type: ignore + + + @distributed_trace_async + async def get_node_event_list( + self, + node_name: str, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List["_models.NodeEvent"]: + """Gets a Node-related events. + + The response is list of NodeEvent objects. + + :param node_name: The name of the node. + :type node_name: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NodeEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.NodeEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NodeEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_node_event_list_request( + node_name=node_name, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_node_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[NodeEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_node_event_list.metadata = {'url': "/EventsStore/Nodes/{nodeName}/$/Events"} # type: ignore + + + @distributed_trace_async + async def get_nodes_event_list( + self, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List["_models.NodeEvent"]: + """Gets all Nodes-related Events. + + The response is list of NodeEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NodeEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.NodeEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NodeEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_nodes_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_nodes_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[NodeEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_nodes_event_list.metadata = {'url': "/EventsStore/Nodes/Events"} # type: ignore + + + @distributed_trace_async + async def get_application_event_list( + self, + application_id: str, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List["_models.ApplicationEvent"]: + """Gets an Application-related events. + + The response is list of ApplicationEvent objects. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ApplicationEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ApplicationEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ApplicationEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_event_list_request( + application_id=application_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_application_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ApplicationEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_event_list.metadata = {'url': "/EventsStore/Applications/{applicationId}/$/Events"} # type: ignore + + + @distributed_trace_async + async def get_applications_event_list( + self, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List["_models.ApplicationEvent"]: + """Gets all Applications-related events. + + The response is list of ApplicationEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ApplicationEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ApplicationEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ApplicationEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_applications_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_applications_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ApplicationEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_applications_event_list.metadata = {'url': "/EventsStore/Applications/Events"} # type: ignore + + + @distributed_trace_async + async def get_service_event_list( + self, + service_id: str, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List["_models.ServiceEvent"]: + """Gets a Service-related events. + + The response is list of ServiceEvent objects. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ServiceEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ServiceEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ServiceEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_event_list_request( + service_id=service_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_service_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ServiceEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_event_list.metadata = {'url': "/EventsStore/Services/{serviceId}/$/Events"} # type: ignore + + + @distributed_trace_async + async def get_services_event_list( + self, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List["_models.ServiceEvent"]: + """Gets all Services-related events. + + The response is list of ServiceEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ServiceEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ServiceEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ServiceEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_services_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_services_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ServiceEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_services_event_list.metadata = {'url': "/EventsStore/Services/Events"} # type: ignore + + + @distributed_trace_async + async def get_partition_event_list( + self, + partition_id: str, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List["_models.PartitionEvent"]: + """Gets a Partition-related events. + + The response is list of PartitionEvent objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of PartitionEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.PartitionEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.PartitionEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_event_list_request( + partition_id=partition_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_partition_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[PartitionEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_event_list.metadata = {'url': "/EventsStore/Partitions/{partitionId}/$/Events"} # type: ignore + + + @distributed_trace_async + async def get_partitions_event_list( + self, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List["_models.PartitionEvent"]: + """Gets all Partitions-related events. + + The response is list of PartitionEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of PartitionEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.PartitionEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.PartitionEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partitions_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_partitions_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[PartitionEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partitions_event_list.metadata = {'url': "/EventsStore/Partitions/Events"} # type: ignore + + + @distributed_trace_async + async def get_partition_replica_event_list( + self, + partition_id: str, + replica_id: str, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List["_models.ReplicaEvent"]: + """Gets a Partition Replica-related events. + + The response is list of ReplicaEvent objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ReplicaEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ReplicaEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ReplicaEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_replica_event_list_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_partition_replica_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ReplicaEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_replica_event_list.metadata = {'url': "/EventsStore/Partitions/{partitionId}/$/Replicas/{replicaId}/$/Events"} # type: ignore + + + @distributed_trace_async + async def get_partition_replicas_event_list( + self, + partition_id: str, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List["_models.ReplicaEvent"]: + """Gets all Replicas-related events for a Partition. + + The response is list of ReplicaEvent objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ReplicaEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ReplicaEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ReplicaEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_replicas_event_list_request( + partition_id=partition_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_partition_replicas_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ReplicaEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_replicas_event_list.metadata = {'url': "/EventsStore/Partitions/{partitionId}/$/Replicas/Events"} # type: ignore + + + @distributed_trace_async + async def get_correlated_event_list( + self, + event_instance_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List["_models.FabricEvent"]: + """Gets all correlated events for a given event. + + The response is list of FabricEvents. + + :param event_instance_id: The EventInstanceId. + :type event_instance_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of FabricEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.FabricEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.FabricEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_correlated_event_list_request( + event_instance_id=event_instance_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_correlated_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[FabricEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_correlated_event_list.metadata = {'url': "/EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events"} # type: ignore + diff --git a/customSDK/servicefabric/models/__init__.py b/customSDK/servicefabric/models/__init__.py new file mode 100644 index 00000000..d8971b0e --- /dev/null +++ b/customSDK/servicefabric/models/__init__.py @@ -0,0 +1,1826 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AadMetadata + from ._models_py3 import AadMetadataObject + from ._models_py3 import AddRemoveIncrementalNamedPartitionScalingMechanism + from ._models_py3 import AddRemoveReplicaScalingMechanism + from ._models_py3 import AnalysisEventMetadata + from ._models_py3 import ApplicationBackupConfigurationInfo + from ._models_py3 import ApplicationBackupEntity + from ._models_py3 import ApplicationCapacityDescription + from ._models_py3 import ApplicationContainerInstanceExitedEvent + from ._models_py3 import ApplicationCreatedEvent + from ._models_py3 import ApplicationDeletedEvent + from ._models_py3 import ApplicationDescription + from ._models_py3 import ApplicationEvent + from ._models_py3 import ApplicationHealth + from ._models_py3 import ApplicationHealthEvaluation + from ._models_py3 import ApplicationHealthPolicies + from ._models_py3 import ApplicationHealthPolicy + from ._models_py3 import ApplicationHealthPolicyMapItem + from ._models_py3 import ApplicationHealthPolicyMapObject + from ._models_py3 import ApplicationHealthReportExpiredEvent + from ._models_py3 import ApplicationHealthState + from ._models_py3 import ApplicationHealthStateChunk + from ._models_py3 import ApplicationHealthStateChunkList + from ._models_py3 import ApplicationHealthStateFilter + from ._models_py3 import ApplicationInfo + from ._models_py3 import ApplicationLoadInfo + from ._models_py3 import ApplicationLoadMetricInformation + from ._models_py3 import ApplicationMetadata + from ._models_py3 import ApplicationMetricDescription + from ._models_py3 import ApplicationNameInfo + from ._models_py3 import ApplicationNewHealthReportEvent + from ._models_py3 import ApplicationParameter + from ._models_py3 import ApplicationProcessExitedEvent + from ._models_py3 import ApplicationResourceDescription + from ._models_py3 import ApplicationResourceUpgradeProgressInfo + from ._models_py3 import ApplicationScopedVolume + from ._models_py3 import ApplicationScopedVolumeCreationParameters + from ._models_py3 import ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk + from ._models_py3 import ApplicationTypeApplicationsHealthEvaluation + from ._models_py3 import ApplicationTypeHealthPolicyMapItem + from ._models_py3 import ApplicationTypeImageStorePath + from ._models_py3 import ApplicationTypeInfo + from ._models_py3 import ApplicationTypeManifest + from ._models_py3 import ApplicationTypeMetadata + from ._models_py3 import ApplicationUpdateDescription + from ._models_py3 import ApplicationUpgradeCompletedEvent + from ._models_py3 import ApplicationUpgradeDescription + from ._models_py3 import ApplicationUpgradeDomainCompletedEvent + from ._models_py3 import ApplicationUpgradeProgressInfo + from ._models_py3 import ApplicationUpgradeRollbackCompletedEvent + from ._models_py3 import ApplicationUpgradeRollbackStartedEvent + from ._models_py3 import ApplicationUpgradeStartedEvent + from ._models_py3 import ApplicationUpgradeUpdateDescription + from ._models_py3 import ApplicationsHealthEvaluation + from ._models_py3 import ArmMetadata + from ._models_py3 import AutoScalingMechanism + from ._models_py3 import AutoScalingMetric + from ._models_py3 import AutoScalingPolicy + from ._models_py3 import AutoScalingResourceMetric + from ._models_py3 import AutoScalingTrigger + from ._models_py3 import AverageLoadScalingTrigger + from ._models_py3 import AveragePartitionLoadScalingTrigger + from ._models_py3 import AverageServiceLoadScalingTrigger + from ._models_py3 import AzureBlobBackupStorageDescription + from ._models_py3 import AzureInternalMonitoringPipelineSinkDescription + from ._models_py3 import BackupConfigurationInfo + from ._models_py3 import BackupEntity + from ._models_py3 import BackupInfo + from ._models_py3 import BackupPartitionDescription + from ._models_py3 import BackupPolicyDescription + from ._models_py3 import BackupProgressInfo + from ._models_py3 import BackupScheduleDescription + from ._models_py3 import BackupStorageDescription + from ._models_py3 import BackupSuspensionInfo + from ._models_py3 import BasicRetentionPolicyDescription + from ._models_py3 import BinaryPropertyValue + from ._models_py3 import Chaos + from ._models_py3 import ChaosCodePackageRestartScheduledEvent + from ._models_py3 import ChaosContext + from ._models_py3 import ChaosEvent + from ._models_py3 import ChaosEventWrapper + from ._models_py3 import ChaosEventsSegment + from ._models_py3 import ChaosNodeRestartScheduledEvent + from ._models_py3 import ChaosParameters + from ._models_py3 import ChaosParametersDictionaryItem + from ._models_py3 import ChaosPartitionPrimaryMoveScheduledEvent + from ._models_py3 import ChaosPartitionSecondaryMoveScheduledEvent + from ._models_py3 import ChaosReplicaRemovalScheduledEvent + from ._models_py3 import ChaosReplicaRestartScheduledEvent + from ._models_py3 import ChaosSchedule + from ._models_py3 import ChaosScheduleDescription + from ._models_py3 import ChaosScheduleJob + from ._models_py3 import ChaosScheduleJobActiveDaysOfWeek + from ._models_py3 import ChaosStartedEvent + from ._models_py3 import ChaosStoppedEvent + from ._models_py3 import ChaosTargetFilter + from ._models_py3 import CheckExistsPropertyBatchOperation + from ._models_py3 import CheckSequencePropertyBatchOperation + from ._models_py3 import CheckValuePropertyBatchOperation + from ._models_py3 import ClusterConfiguration + from ._models_py3 import ClusterConfigurationUpgradeDescription + from ._models_py3 import ClusterConfigurationUpgradeStatusInfo + from ._models_py3 import ClusterEvent + from ._models_py3 import ClusterHealth + from ._models_py3 import ClusterHealthChunk + from ._models_py3 import ClusterHealthChunkQueryDescription + from ._models_py3 import ClusterHealthPolicies + from ._models_py3 import ClusterHealthPolicy + from ._models_py3 import ClusterHealthReportExpiredEvent + from ._models_py3 import ClusterLoadInfo + from ._models_py3 import ClusterManifest + from ._models_py3 import ClusterNewHealthReportEvent + from ._models_py3 import ClusterUpgradeCompletedEvent + from ._models_py3 import ClusterUpgradeDescriptionObject + from ._models_py3 import ClusterUpgradeDomainCompletedEvent + from ._models_py3 import ClusterUpgradeHealthPolicyObject + from ._models_py3 import ClusterUpgradeProgressObject + from ._models_py3 import ClusterUpgradeRollbackCompletedEvent + from ._models_py3 import ClusterUpgradeRollbackStartedEvent + from ._models_py3 import ClusterUpgradeStartedEvent + from ._models_py3 import ClusterVersion + from ._models_py3 import CodePackageEntryPoint + from ._models_py3 import CodePackageEntryPointStatistics + from ._models_py3 import ComposeDeploymentStatusInfo + from ._models_py3 import ComposeDeploymentUpgradeDescription + from ._models_py3 import ComposeDeploymentUpgradeProgressInfo + from ._models_py3 import ConfigParameterOverride + from ._models_py3 import ContainerApiRequestBody + from ._models_py3 import ContainerApiResponse + from ._models_py3 import ContainerApiResult + from ._models_py3 import ContainerCodePackageProperties + from ._models_py3 import ContainerEvent + from ._models_py3 import ContainerInstanceEvent + from ._models_py3 import ContainerInstanceView + from ._models_py3 import ContainerLabel + from ._models_py3 import ContainerLogs + from ._models_py3 import ContainerState + from ._models_py3 import CreateComposeDeploymentDescription + from ._models_py3 import CurrentUpgradeDomainProgressInfo + from ._models_py3 import CurrentUpgradeUnitsProgressInfo + from ._models_py3 import DeactivationIntentDescription + from ._models_py3 import DefaultExecutionPolicy + from ._models_py3 import DeletePropertyBatchOperation + from ._models_py3 import DeltaNodesCheckHealthEvaluation + from ._models_py3 import DeployServicePackageToNodeDescription + from ._models_py3 import DeployedApplicationHealth + from ._models_py3 import DeployedApplicationHealthEvaluation + from ._models_py3 import DeployedApplicationHealthReportExpiredEvent + from ._models_py3 import DeployedApplicationHealthState + from ._models_py3 import DeployedApplicationHealthStateChunk + from ._models_py3 import DeployedApplicationHealthStateChunkList + from ._models_py3 import DeployedApplicationHealthStateFilter + from ._models_py3 import DeployedApplicationInfo + from ._models_py3 import DeployedApplicationNewHealthReportEvent + from ._models_py3 import DeployedApplicationsHealthEvaluation + from ._models_py3 import DeployedCodePackageInfo + from ._models_py3 import DeployedServicePackageHealth + from ._models_py3 import DeployedServicePackageHealthEvaluation + from ._models_py3 import DeployedServicePackageHealthReportExpiredEvent + from ._models_py3 import DeployedServicePackageHealthState + from ._models_py3 import DeployedServicePackageHealthStateChunk + from ._models_py3 import DeployedServicePackageHealthStateChunkList + from ._models_py3 import DeployedServicePackageHealthStateFilter + from ._models_py3 import DeployedServicePackageInfo + from ._models_py3 import DeployedServicePackageNewHealthReportEvent + from ._models_py3 import DeployedServicePackagesHealthEvaluation + from ._models_py3 import DeployedServiceReplicaDetailInfo + from ._models_py3 import DeployedServiceReplicaInfo + from ._models_py3 import DeployedServiceTypeInfo + from ._models_py3 import DeployedStatefulServiceReplicaDetailInfo + from ._models_py3 import DeployedStatefulServiceReplicaInfo + from ._models_py3 import DeployedStatelessServiceInstanceDetailInfo + from ._models_py3 import DeployedStatelessServiceInstanceInfo + from ._models_py3 import DiagnosticsDescription + from ._models_py3 import DiagnosticsRef + from ._models_py3 import DiagnosticsSinkProperties + from ._models_py3 import DisableBackupDescription + from ._models_py3 import DiskInfo + from ._models_py3 import DoublePropertyValue + from ._models_py3 import DsmsAzureBlobBackupStorageDescription + from ._models_py3 import EnableBackupDescription + from ._models_py3 import EndpointProperties + from ._models_py3 import EndpointRef + from ._models_py3 import EnsureAvailabilitySafetyCheck + from ._models_py3 import EnsurePartitionQuorumSafetyCheck + from ._models_py3 import EntityHealth + from ._models_py3 import EntityHealthState + from ._models_py3 import EntityHealthStateChunk + from ._models_py3 import EntityHealthStateChunkList + from ._models_py3 import EntityKindHealthStateCount + from ._models_py3 import EnvironmentVariable + from ._models_py3 import Epoch + from ._models_py3 import EventHealthEvaluation + from ._models_py3 import ExecutingFaultsChaosEvent + from ._models_py3 import ExecutionPolicy + from ._models_py3 import ExternalStoreProvisionApplicationTypeDescription + from ._models_py3 import FabricCodeVersionInfo + from ._models_py3 import FabricConfigVersionInfo + from ._models_py3 import FabricError + from ._models_py3 import FabricErrorError + from ._models_py3 import FabricEvent + from ._models_py3 import FailedPropertyBatchInfo + from ._models_py3 import FailedUpgradeDomainProgressObject + from ._models_py3 import FailureUpgradeDomainProgressInfo + from ._models_py3 import FileInfo + from ._models_py3 import FileShareBackupStorageDescription + from ._models_py3 import FileVersion + from ._models_py3 import FolderInfo + from ._models_py3 import FolderSizeInfo + from ._models_py3 import FrequencyBasedBackupScheduleDescription + from ._models_py3 import GatewayDestination + from ._models_py3 import GatewayResourceDescription + from ._models_py3 import GetBackupByStorageQueryDescription + from ._models_py3 import GetPropertyBatchOperation + from ._models_py3 import GuidPropertyValue + from ._models_py3 import HealthEvaluation + from ._models_py3 import HealthEvaluationWrapper + from ._models_py3 import HealthEvent + from ._models_py3 import HealthInformation + from ._models_py3 import HealthStateCount + from ._models_py3 import HealthStatistics + from ._models_py3 import HttpConfig + from ._models_py3 import HttpHostConfig + from ._models_py3 import HttpRouteConfig + from ._models_py3 import HttpRouteMatchHeader + from ._models_py3 import HttpRouteMatchPath + from ._models_py3 import HttpRouteMatchRule + from ._models_py3 import IdentityDescription + from ._models_py3 import IdentityItemDescription + from ._models_py3 import ImageRegistryCredential + from ._models_py3 import ImageStoreContent + from ._models_py3 import ImageStoreCopyDescription + from ._models_py3 import ImageStoreInfo + from ._models_py3 import InlinedValueSecretResourceProperties + from ._models_py3 import InstanceLifecycleDescription + from ._models_py3 import Int64PropertyValue + from ._models_py3 import Int64RangePartitionInformation + from ._models_py3 import InvokeDataLossResult + from ._models_py3 import InvokeQuorumLossResult + from ._models_py3 import KeyValueStoreReplicaStatus + from ._models_py3 import LoadMetricInformation + from ._models_py3 import LoadMetricReport + from ._models_py3 import LoadMetricReportInfo + from ._models_py3 import LoadedPartitionInformationQueryDescription + from ._models_py3 import LoadedPartitionInformationResult + from ._models_py3 import LoadedPartitionInformationResultList + from ._models_py3 import LocalNetworkResourceProperties + from ._models_py3 import ManagedApplicationIdentity + from ._models_py3 import ManagedApplicationIdentityDescription + from ._models_py3 import ManagedIdentityAzureBlobBackupStorageDescription + from ._models_py3 import MetricLoadDescription + from ._models_py3 import MonitoringPolicyDescription + from ._models_py3 import NameDescription + from ._models_py3 import NamedPartitionInformation + from ._models_py3 import NamedPartitionSchemeDescription + from ._models_py3 import NetworkRef + from ._models_py3 import NetworkResourceDescription + from ._models_py3 import NetworkResourceProperties + from ._models_py3 import NetworkResourcePropertiesBase + from ._models_py3 import NodeAbortedEvent + from ._models_py3 import NodeAddedToClusterEvent + from ._models_py3 import NodeClosedEvent + from ._models_py3 import NodeDeactivateCompletedEvent + from ._models_py3 import NodeDeactivateStartedEvent + from ._models_py3 import NodeDeactivationInfo + from ._models_py3 import NodeDeactivationTask + from ._models_py3 import NodeDeactivationTaskId + from ._models_py3 import NodeDownEvent + from ._models_py3 import NodeEvent + from ._models_py3 import NodeHealth + from ._models_py3 import NodeHealthEvaluation + from ._models_py3 import NodeHealthReportExpiredEvent + from ._models_py3 import NodeHealthState + from ._models_py3 import NodeHealthStateChunk + from ._models_py3 import NodeHealthStateChunkList + from ._models_py3 import NodeHealthStateFilter + from ._models_py3 import NodeId + from ._models_py3 import NodeImpact + from ._models_py3 import NodeInfo + from ._models_py3 import NodeLoadInfo + from ._models_py3 import NodeLoadMetricInformation + from ._models_py3 import NodeNewHealthReportEvent + from ._models_py3 import NodeOpenFailedEvent + from ._models_py3 import NodeOpenSucceededEvent + from ._models_py3 import NodeRemovedFromClusterEvent + from ._models_py3 import NodeRepairImpactDescription + from ._models_py3 import NodeRepairTargetDescription + from ._models_py3 import NodeResult + from ._models_py3 import NodeTagsDescription + from ._models_py3 import NodeTransitionProgress + from ._models_py3 import NodeTransitionResult + from ._models_py3 import NodeTypeHealthPolicyMapItem + from ._models_py3 import NodeTypeNodesHealthEvaluation + from ._models_py3 import NodeUpEvent + from ._models_py3 import NodeUpgradeProgressInfo + from ._models_py3 import NodesHealthEvaluation + from ._models_py3 import OperationStatus + from ._models_py3 import PackageSharingPolicyInfo + from ._models_py3 import PagedApplicationInfoList + from ._models_py3 import PagedApplicationResourceDescriptionList + from ._models_py3 import PagedApplicationTypeInfoList + from ._models_py3 import PagedBackupConfigurationInfoList + from ._models_py3 import PagedBackupEntityList + from ._models_py3 import PagedBackupInfoList + from ._models_py3 import PagedBackupPolicyDescriptionList + from ._models_py3 import PagedComposeDeploymentStatusInfoList + from ._models_py3 import PagedDeployedApplicationInfoList + from ._models_py3 import PagedGatewayResourceDescriptionList + from ._models_py3 import PagedNetworkResourceDescriptionList + from ._models_py3 import PagedNodeInfoList + from ._models_py3 import PagedPropertyInfoList + from ._models_py3 import PagedReplicaInfoList + from ._models_py3 import PagedSecretResourceDescriptionList + from ._models_py3 import PagedSecretValueResourceDescriptionList + from ._models_py3 import PagedServiceInfoList + from ._models_py3 import PagedServicePartitionInfoList + from ._models_py3 import PagedServiceReplicaDescriptionList + from ._models_py3 import PagedServiceResourceDescriptionList + from ._models_py3 import PagedSubNameInfoList + from ._models_py3 import PagedUpdatePartitionLoadResultList + from ._models_py3 import PagedVolumeResourceDescriptionList + from ._models_py3 import PartitionAnalysisEvent + from ._models_py3 import PartitionBackupConfigurationInfo + from ._models_py3 import PartitionBackupEntity + from ._models_py3 import PartitionDataLossProgress + from ._models_py3 import PartitionEvent + from ._models_py3 import PartitionHealth + from ._models_py3 import PartitionHealthEvaluation + from ._models_py3 import PartitionHealthReportExpiredEvent + from ._models_py3 import PartitionHealthState + from ._models_py3 import PartitionHealthStateChunk + from ._models_py3 import PartitionHealthStateChunkList + from ._models_py3 import PartitionHealthStateFilter + from ._models_py3 import PartitionInformation + from ._models_py3 import PartitionInstanceCountScaleMechanism + from ._models_py3 import PartitionLoadInformation + from ._models_py3 import PartitionMetricLoadDescription + from ._models_py3 import PartitionNewHealthReportEvent + from ._models_py3 import PartitionPrimaryMoveAnalysisEvent + from ._models_py3 import PartitionQuorumLossProgress + from ._models_py3 import PartitionReconfiguredEvent + from ._models_py3 import PartitionRestartProgress + from ._models_py3 import PartitionSafetyCheck + from ._models_py3 import PartitionSchemeDescription + from ._models_py3 import PartitionsHealthEvaluation + from ._models_py3 import PrimaryReplicatorStatus + from ._models_py3 import Probe + from ._models_py3 import ProbeExec + from ._models_py3 import ProbeHttpGet + from ._models_py3 import ProbeHttpGetHeaders + from ._models_py3 import ProbeTcpSocket + from ._models_py3 import PropertyBatchDescriptionList + from ._models_py3 import PropertyBatchInfo + from ._models_py3 import PropertyBatchOperation + from ._models_py3 import PropertyDescription + from ._models_py3 import PropertyInfo + from ._models_py3 import PropertyMetadata + from ._models_py3 import PropertyValue + from ._models_py3 import ProvisionApplicationTypeDescription + from ._models_py3 import ProvisionApplicationTypeDescriptionBase + from ._models_py3 import ProvisionFabricDescription + from ._models_py3 import PutPropertyBatchOperation + from ._models_py3 import ReconfigurationInformation + from ._models_py3 import RegistryCredential + from ._models_py3 import ReliableCollectionsRef + from ._models_py3 import RemoteReplicatorAcknowledgementDetail + from ._models_py3 import RemoteReplicatorAcknowledgementStatus + from ._models_py3 import RemoteReplicatorStatus + from ._models_py3 import RepairImpactDescriptionBase + from ._models_py3 import RepairTargetDescriptionBase + from ._models_py3 import RepairTask + from ._models_py3 import RepairTaskApproveDescription + from ._models_py3 import RepairTaskCancelDescription + from ._models_py3 import RepairTaskDeleteDescription + from ._models_py3 import RepairTaskHistory + from ._models_py3 import RepairTaskUpdateHealthPolicyDescription + from ._models_py3 import RepairTaskUpdateInfo + from ._models_py3 import ReplicaEvent + from ._models_py3 import ReplicaHealth + from ._models_py3 import ReplicaHealthEvaluation + from ._models_py3 import ReplicaHealthState + from ._models_py3 import ReplicaHealthStateChunk + from ._models_py3 import ReplicaHealthStateChunkList + from ._models_py3 import ReplicaHealthStateFilter + from ._models_py3 import ReplicaInfo + from ._models_py3 import ReplicaLifecycleDescription + from ._models_py3 import ReplicaMetricLoadDescription + from ._models_py3 import ReplicaStatusBase + from ._models_py3 import ReplicasHealthEvaluation + from ._models_py3 import ReplicatorQueueStatus + from ._models_py3 import ReplicatorStatus + from ._models_py3 import ResolvedServiceEndpoint + from ._models_py3 import ResolvedServicePartition + from ._models_py3 import ResourceLimits + from ._models_py3 import ResourceRequests + from ._models_py3 import ResourceRequirements + from ._models_py3 import RestartDeployedCodePackageDescription + from ._models_py3 import RestartNodeDescription + from ._models_py3 import RestartPartitionResult + from ._models_py3 import RestorePartitionDescription + from ._models_py3 import RestoreProgressInfo + from ._models_py3 import ResumeApplicationUpgradeDescription + from ._models_py3 import ResumeClusterUpgradeDescription + from ._models_py3 import RetentionPolicyDescription + from ._models_py3 import RollingUpgradeUpdateDescription + from ._models_py3 import RunToCompletionExecutionPolicy + from ._models_py3 import SafetyCheck + from ._models_py3 import SafetyCheckWrapper + from ._models_py3 import ScalingMechanismDescription + from ._models_py3 import ScalingPolicyDescription + from ._models_py3 import ScalingTriggerDescription + from ._models_py3 import SecondaryActiveReplicatorStatus + from ._models_py3 import SecondaryIdleReplicatorStatus + from ._models_py3 import SecondaryReplicatorStatus + from ._models_py3 import SecretResourceDescription + from ._models_py3 import SecretResourceProperties + from ._models_py3 import SecretResourcePropertiesBase + from ._models_py3 import SecretValue + from ._models_py3 import SecretValueProperties + from ._models_py3 import SecretValueResourceDescription + from ._models_py3 import SecretValueResourceProperties + from ._models_py3 import SeedNodeSafetyCheck + from ._models_py3 import SelectedPartition + from ._models_py3 import ServiceBackupConfigurationInfo + from ._models_py3 import ServiceBackupEntity + from ._models_py3 import ServiceCorrelationDescription + from ._models_py3 import ServiceCreatedEvent + from ._models_py3 import ServiceDeletedEvent + from ._models_py3 import ServiceDescription + from ._models_py3 import ServiceEvent + from ._models_py3 import ServiceFromTemplateDescription + from ._models_py3 import ServiceHealth + from ._models_py3 import ServiceHealthEvaluation + from ._models_py3 import ServiceHealthReportExpiredEvent + from ._models_py3 import ServiceHealthState + from ._models_py3 import ServiceHealthStateChunk + from ._models_py3 import ServiceHealthStateChunkList + from ._models_py3 import ServiceHealthStateFilter + from ._models_py3 import ServiceIdentity + from ._models_py3 import ServiceInfo + from ._models_py3 import ServiceLoadMetricDescription + from ._models_py3 import ServiceNameInfo + from ._models_py3 import ServiceNewHealthReportEvent + from ._models_py3 import ServicePartitionInfo + from ._models_py3 import ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription + from ._models_py3 import ServicePlacementInvalidDomainPolicyDescription + from ._models_py3 import ServicePlacementNonPartiallyPlaceServicePolicyDescription + from ._models_py3 import ServicePlacementPolicyDescription + from ._models_py3 import ServicePlacementPreferPrimaryDomainPolicyDescription + from ._models_py3 import ServicePlacementRequireDomainDistributionPolicyDescription + from ._models_py3 import ServicePlacementRequiredDomainPolicyDescription + from ._models_py3 import ServiceProperties + from ._models_py3 import ServiceReplicaDescription + from ._models_py3 import ServiceReplicaProperties + from ._models_py3 import ServiceResourceDescription + from ._models_py3 import ServiceResourceProperties + from ._models_py3 import ServiceTypeDescription + from ._models_py3 import ServiceTypeExtensionDescription + from ._models_py3 import ServiceTypeHealthPolicy + from ._models_py3 import ServiceTypeHealthPolicyMapItem + from ._models_py3 import ServiceTypeInfo + from ._models_py3 import ServiceTypeManifest + from ._models_py3 import ServiceUpdateDescription + from ._models_py3 import ServiceUpgradeProgress + from ._models_py3 import ServicesHealthEvaluation + from ._models_py3 import Setting + from ._models_py3 import SingletonPartitionInformation + from ._models_py3 import SingletonPartitionSchemeDescription + from ._models_py3 import StartClusterUpgradeDescription + from ._models_py3 import StartedChaosEvent + from ._models_py3 import StatefulReplicaHealthReportExpiredEvent + from ._models_py3 import StatefulReplicaNewHealthReportEvent + from ._models_py3 import StatefulServiceDescription + from ._models_py3 import StatefulServiceInfo + from ._models_py3 import StatefulServicePartitionInfo + from ._models_py3 import StatefulServiceReplicaHealth + from ._models_py3 import StatefulServiceReplicaHealthState + from ._models_py3 import StatefulServiceReplicaInfo + from ._models_py3 import StatefulServiceTypeDescription + from ._models_py3 import StatefulServiceUpdateDescription + from ._models_py3 import StatelessReplicaHealthReportExpiredEvent + from ._models_py3 import StatelessReplicaNewHealthReportEvent + from ._models_py3 import StatelessServiceDescription + from ._models_py3 import StatelessServiceInfo + from ._models_py3 import StatelessServiceInstanceHealth + from ._models_py3 import StatelessServiceInstanceHealthState + from ._models_py3 import StatelessServiceInstanceInfo + from ._models_py3 import StatelessServicePartitionInfo + from ._models_py3 import StatelessServiceTypeDescription + from ._models_py3 import StatelessServiceUpdateDescription + from ._models_py3 import StoppedChaosEvent + from ._models_py3 import StringPropertyValue + from ._models_py3 import SuccessfulPropertyBatchInfo + from ._models_py3 import SystemApplicationHealthEvaluation + from ._models_py3 import TcpConfig + from ._models_py3 import TestErrorChaosEvent + from ._models_py3 import TimeBasedBackupScheduleDescription + from ._models_py3 import TimeOfDay + from ._models_py3 import TimeRange + from ._models_py3 import UniformInt64RangePartitionSchemeDescription + from ._models_py3 import UnplacedReplicaInformation + from ._models_py3 import UnprovisionApplicationTypeDescriptionInfo + from ._models_py3 import UnprovisionFabricDescription + from ._models_py3 import UpdateClusterUpgradeDescription + from ._models_py3 import UpdatePartitionLoadResult + from ._models_py3 import UpgradeDomainDeltaNodesCheckHealthEvaluation + from ._models_py3 import UpgradeDomainDeployedApplicationsHealthEvaluation + from ._models_py3 import UpgradeDomainInfo + from ._models_py3 import UpgradeDomainNodesHealthEvaluation + from ._models_py3 import UpgradeOrchestrationServiceState + from ._models_py3 import UpgradeOrchestrationServiceStateSummary + from ._models_py3 import UpgradeUnitInfo + from ._models_py3 import UploadChunkRange + from ._models_py3 import UploadSession + from ._models_py3 import UploadSessionInfo + from ._models_py3 import UsageInfo + from ._models_py3 import ValidateClusterUpgradeResult + from ._models_py3 import ValidationFailedChaosEvent + from ._models_py3 import VolumeProviderParametersAzureFile + from ._models_py3 import VolumeReference + from ._models_py3 import VolumeResourceDescription + from ._models_py3 import WaitForInbuildReplicaSafetyCheck + from ._models_py3 import WaitForPrimaryPlacementSafetyCheck + from ._models_py3 import WaitForPrimarySwapSafetyCheck + from ._models_py3 import WaitForReconfigurationSafetyCheck + from ._models_py3 import WaitingChaosEvent +except (SyntaxError, ImportError): + from ._models import AadMetadata # type: ignore + from ._models import AadMetadataObject # type: ignore + from ._models import AddRemoveIncrementalNamedPartitionScalingMechanism # type: ignore + from ._models import AddRemoveReplicaScalingMechanism # type: ignore + from ._models import AnalysisEventMetadata # type: ignore + from ._models import ApplicationBackupConfigurationInfo # type: ignore + from ._models import ApplicationBackupEntity # type: ignore + from ._models import ApplicationCapacityDescription # type: ignore + from ._models import ApplicationContainerInstanceExitedEvent # type: ignore + from ._models import ApplicationCreatedEvent # type: ignore + from ._models import ApplicationDeletedEvent # type: ignore + from ._models import ApplicationDescription # type: ignore + from ._models import ApplicationEvent # type: ignore + from ._models import ApplicationHealth # type: ignore + from ._models import ApplicationHealthEvaluation # type: ignore + from ._models import ApplicationHealthPolicies # type: ignore + from ._models import ApplicationHealthPolicy # type: ignore + from ._models import ApplicationHealthPolicyMapItem # type: ignore + from ._models import ApplicationHealthPolicyMapObject # type: ignore + from ._models import ApplicationHealthReportExpiredEvent # type: ignore + from ._models import ApplicationHealthState # type: ignore + from ._models import ApplicationHealthStateChunk # type: ignore + from ._models import ApplicationHealthStateChunkList # type: ignore + from ._models import ApplicationHealthStateFilter # type: ignore + from ._models import ApplicationInfo # type: ignore + from ._models import ApplicationLoadInfo # type: ignore + from ._models import ApplicationLoadMetricInformation # type: ignore + from ._models import ApplicationMetadata # type: ignore + from ._models import ApplicationMetricDescription # type: ignore + from ._models import ApplicationNameInfo # type: ignore + from ._models import ApplicationNewHealthReportEvent # type: ignore + from ._models import ApplicationParameter # type: ignore + from ._models import ApplicationProcessExitedEvent # type: ignore + from ._models import ApplicationResourceDescription # type: ignore + from ._models import ApplicationResourceUpgradeProgressInfo # type: ignore + from ._models import ApplicationScopedVolume # type: ignore + from ._models import ApplicationScopedVolumeCreationParameters # type: ignore + from ._models import ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk # type: ignore + from ._models import ApplicationTypeApplicationsHealthEvaluation # type: ignore + from ._models import ApplicationTypeHealthPolicyMapItem # type: ignore + from ._models import ApplicationTypeImageStorePath # type: ignore + from ._models import ApplicationTypeInfo # type: ignore + from ._models import ApplicationTypeManifest # type: ignore + from ._models import ApplicationTypeMetadata # type: ignore + from ._models import ApplicationUpdateDescription # type: ignore + from ._models import ApplicationUpgradeCompletedEvent # type: ignore + from ._models import ApplicationUpgradeDescription # type: ignore + from ._models import ApplicationUpgradeDomainCompletedEvent # type: ignore + from ._models import ApplicationUpgradeProgressInfo # type: ignore + from ._models import ApplicationUpgradeRollbackCompletedEvent # type: ignore + from ._models import ApplicationUpgradeRollbackStartedEvent # type: ignore + from ._models import ApplicationUpgradeStartedEvent # type: ignore + from ._models import ApplicationUpgradeUpdateDescription # type: ignore + from ._models import ApplicationsHealthEvaluation # type: ignore + from ._models import ArmMetadata # type: ignore + from ._models import AutoScalingMechanism # type: ignore + from ._models import AutoScalingMetric # type: ignore + from ._models import AutoScalingPolicy # type: ignore + from ._models import AutoScalingResourceMetric # type: ignore + from ._models import AutoScalingTrigger # type: ignore + from ._models import AverageLoadScalingTrigger # type: ignore + from ._models import AveragePartitionLoadScalingTrigger # type: ignore + from ._models import AverageServiceLoadScalingTrigger # type: ignore + from ._models import AzureBlobBackupStorageDescription # type: ignore + from ._models import AzureInternalMonitoringPipelineSinkDescription # type: ignore + from ._models import BackupConfigurationInfo # type: ignore + from ._models import BackupEntity # type: ignore + from ._models import BackupInfo # type: ignore + from ._models import BackupPartitionDescription # type: ignore + from ._models import BackupPolicyDescription # type: ignore + from ._models import BackupProgressInfo # type: ignore + from ._models import BackupScheduleDescription # type: ignore + from ._models import BackupStorageDescription # type: ignore + from ._models import BackupSuspensionInfo # type: ignore + from ._models import BasicRetentionPolicyDescription # type: ignore + from ._models import BinaryPropertyValue # type: ignore + from ._models import Chaos # type: ignore + from ._models import ChaosCodePackageRestartScheduledEvent # type: ignore + from ._models import ChaosContext # type: ignore + from ._models import ChaosEvent # type: ignore + from ._models import ChaosEventWrapper # type: ignore + from ._models import ChaosEventsSegment # type: ignore + from ._models import ChaosNodeRestartScheduledEvent # type: ignore + from ._models import ChaosParameters # type: ignore + from ._models import ChaosParametersDictionaryItem # type: ignore + from ._models import ChaosPartitionPrimaryMoveScheduledEvent # type: ignore + from ._models import ChaosPartitionSecondaryMoveScheduledEvent # type: ignore + from ._models import ChaosReplicaRemovalScheduledEvent # type: ignore + from ._models import ChaosReplicaRestartScheduledEvent # type: ignore + from ._models import ChaosSchedule # type: ignore + from ._models import ChaosScheduleDescription # type: ignore + from ._models import ChaosScheduleJob # type: ignore + from ._models import ChaosScheduleJobActiveDaysOfWeek # type: ignore + from ._models import ChaosStartedEvent # type: ignore + from ._models import ChaosStoppedEvent # type: ignore + from ._models import ChaosTargetFilter # type: ignore + from ._models import CheckExistsPropertyBatchOperation # type: ignore + from ._models import CheckSequencePropertyBatchOperation # type: ignore + from ._models import CheckValuePropertyBatchOperation # type: ignore + from ._models import ClusterConfiguration # type: ignore + from ._models import ClusterConfigurationUpgradeDescription # type: ignore + from ._models import ClusterConfigurationUpgradeStatusInfo # type: ignore + from ._models import ClusterEvent # type: ignore + from ._models import ClusterHealth # type: ignore + from ._models import ClusterHealthChunk # type: ignore + from ._models import ClusterHealthChunkQueryDescription # type: ignore + from ._models import ClusterHealthPolicies # type: ignore + from ._models import ClusterHealthPolicy # type: ignore + from ._models import ClusterHealthReportExpiredEvent # type: ignore + from ._models import ClusterLoadInfo # type: ignore + from ._models import ClusterManifest # type: ignore + from ._models import ClusterNewHealthReportEvent # type: ignore + from ._models import ClusterUpgradeCompletedEvent # type: ignore + from ._models import ClusterUpgradeDescriptionObject # type: ignore + from ._models import ClusterUpgradeDomainCompletedEvent # type: ignore + from ._models import ClusterUpgradeHealthPolicyObject # type: ignore + from ._models import ClusterUpgradeProgressObject # type: ignore + from ._models import ClusterUpgradeRollbackCompletedEvent # type: ignore + from ._models import ClusterUpgradeRollbackStartedEvent # type: ignore + from ._models import ClusterUpgradeStartedEvent # type: ignore + from ._models import ClusterVersion # type: ignore + from ._models import CodePackageEntryPoint # type: ignore + from ._models import CodePackageEntryPointStatistics # type: ignore + from ._models import ComposeDeploymentStatusInfo # type: ignore + from ._models import ComposeDeploymentUpgradeDescription # type: ignore + from ._models import ComposeDeploymentUpgradeProgressInfo # type: ignore + from ._models import ConfigParameterOverride # type: ignore + from ._models import ContainerApiRequestBody # type: ignore + from ._models import ContainerApiResponse # type: ignore + from ._models import ContainerApiResult # type: ignore + from ._models import ContainerCodePackageProperties # type: ignore + from ._models import ContainerEvent # type: ignore + from ._models import ContainerInstanceEvent # type: ignore + from ._models import ContainerInstanceView # type: ignore + from ._models import ContainerLabel # type: ignore + from ._models import ContainerLogs # type: ignore + from ._models import ContainerState # type: ignore + from ._models import CreateComposeDeploymentDescription # type: ignore + from ._models import CurrentUpgradeDomainProgressInfo # type: ignore + from ._models import CurrentUpgradeUnitsProgressInfo # type: ignore + from ._models import DeactivationIntentDescription # type: ignore + from ._models import DefaultExecutionPolicy # type: ignore + from ._models import DeletePropertyBatchOperation # type: ignore + from ._models import DeltaNodesCheckHealthEvaluation # type: ignore + from ._models import DeployServicePackageToNodeDescription # type: ignore + from ._models import DeployedApplicationHealth # type: ignore + from ._models import DeployedApplicationHealthEvaluation # type: ignore + from ._models import DeployedApplicationHealthReportExpiredEvent # type: ignore + from ._models import DeployedApplicationHealthState # type: ignore + from ._models import DeployedApplicationHealthStateChunk # type: ignore + from ._models import DeployedApplicationHealthStateChunkList # type: ignore + from ._models import DeployedApplicationHealthStateFilter # type: ignore + from ._models import DeployedApplicationInfo # type: ignore + from ._models import DeployedApplicationNewHealthReportEvent # type: ignore + from ._models import DeployedApplicationsHealthEvaluation # type: ignore + from ._models import DeployedCodePackageInfo # type: ignore + from ._models import DeployedServicePackageHealth # type: ignore + from ._models import DeployedServicePackageHealthEvaluation # type: ignore + from ._models import DeployedServicePackageHealthReportExpiredEvent # type: ignore + from ._models import DeployedServicePackageHealthState # type: ignore + from ._models import DeployedServicePackageHealthStateChunk # type: ignore + from ._models import DeployedServicePackageHealthStateChunkList # type: ignore + from ._models import DeployedServicePackageHealthStateFilter # type: ignore + from ._models import DeployedServicePackageInfo # type: ignore + from ._models import DeployedServicePackageNewHealthReportEvent # type: ignore + from ._models import DeployedServicePackagesHealthEvaluation # type: ignore + from ._models import DeployedServiceReplicaDetailInfo # type: ignore + from ._models import DeployedServiceReplicaInfo # type: ignore + from ._models import DeployedServiceTypeInfo # type: ignore + from ._models import DeployedStatefulServiceReplicaDetailInfo # type: ignore + from ._models import DeployedStatefulServiceReplicaInfo # type: ignore + from ._models import DeployedStatelessServiceInstanceDetailInfo # type: ignore + from ._models import DeployedStatelessServiceInstanceInfo # type: ignore + from ._models import DiagnosticsDescription # type: ignore + from ._models import DiagnosticsRef # type: ignore + from ._models import DiagnosticsSinkProperties # type: ignore + from ._models import DisableBackupDescription # type: ignore + from ._models import DiskInfo # type: ignore + from ._models import DoublePropertyValue # type: ignore + from ._models import DsmsAzureBlobBackupStorageDescription # type: ignore + from ._models import EnableBackupDescription # type: ignore + from ._models import EndpointProperties # type: ignore + from ._models import EndpointRef # type: ignore + from ._models import EnsureAvailabilitySafetyCheck # type: ignore + from ._models import EnsurePartitionQuorumSafetyCheck # type: ignore + from ._models import EntityHealth # type: ignore + from ._models import EntityHealthState # type: ignore + from ._models import EntityHealthStateChunk # type: ignore + from ._models import EntityHealthStateChunkList # type: ignore + from ._models import EntityKindHealthStateCount # type: ignore + from ._models import EnvironmentVariable # type: ignore + from ._models import Epoch # type: ignore + from ._models import EventHealthEvaluation # type: ignore + from ._models import ExecutingFaultsChaosEvent # type: ignore + from ._models import ExecutionPolicy # type: ignore + from ._models import ExternalStoreProvisionApplicationTypeDescription # type: ignore + from ._models import FabricCodeVersionInfo # type: ignore + from ._models import FabricConfigVersionInfo # type: ignore + from ._models import FabricError # type: ignore + from ._models import FabricErrorError # type: ignore + from ._models import FabricEvent # type: ignore + from ._models import FailedPropertyBatchInfo # type: ignore + from ._models import FailedUpgradeDomainProgressObject # type: ignore + from ._models import FailureUpgradeDomainProgressInfo # type: ignore + from ._models import FileInfo # type: ignore + from ._models import FileShareBackupStorageDescription # type: ignore + from ._models import FileVersion # type: ignore + from ._models import FolderInfo # type: ignore + from ._models import FolderSizeInfo # type: ignore + from ._models import FrequencyBasedBackupScheduleDescription # type: ignore + from ._models import GatewayDestination # type: ignore + from ._models import GatewayResourceDescription # type: ignore + from ._models import GetBackupByStorageQueryDescription # type: ignore + from ._models import GetPropertyBatchOperation # type: ignore + from ._models import GuidPropertyValue # type: ignore + from ._models import HealthEvaluation # type: ignore + from ._models import HealthEvaluationWrapper # type: ignore + from ._models import HealthEvent # type: ignore + from ._models import HealthInformation # type: ignore + from ._models import HealthStateCount # type: ignore + from ._models import HealthStatistics # type: ignore + from ._models import HttpConfig # type: ignore + from ._models import HttpHostConfig # type: ignore + from ._models import HttpRouteConfig # type: ignore + from ._models import HttpRouteMatchHeader # type: ignore + from ._models import HttpRouteMatchPath # type: ignore + from ._models import HttpRouteMatchRule # type: ignore + from ._models import IdentityDescription # type: ignore + from ._models import IdentityItemDescription # type: ignore + from ._models import ImageRegistryCredential # type: ignore + from ._models import ImageStoreContent # type: ignore + from ._models import ImageStoreCopyDescription # type: ignore + from ._models import ImageStoreInfo # type: ignore + from ._models import InlinedValueSecretResourceProperties # type: ignore + from ._models import InstanceLifecycleDescription # type: ignore + from ._models import Int64PropertyValue # type: ignore + from ._models import Int64RangePartitionInformation # type: ignore + from ._models import InvokeDataLossResult # type: ignore + from ._models import InvokeQuorumLossResult # type: ignore + from ._models import KeyValueStoreReplicaStatus # type: ignore + from ._models import LoadMetricInformation # type: ignore + from ._models import LoadMetricReport # type: ignore + from ._models import LoadMetricReportInfo # type: ignore + from ._models import LoadedPartitionInformationQueryDescription # type: ignore + from ._models import LoadedPartitionInformationResult # type: ignore + from ._models import LoadedPartitionInformationResultList # type: ignore + from ._models import LocalNetworkResourceProperties # type: ignore + from ._models import ManagedApplicationIdentity # type: ignore + from ._models import ManagedApplicationIdentityDescription # type: ignore + from ._models import ManagedIdentityAzureBlobBackupStorageDescription # type: ignore + from ._models import MetricLoadDescription # type: ignore + from ._models import MonitoringPolicyDescription # type: ignore + from ._models import NameDescription # type: ignore + from ._models import NamedPartitionInformation # type: ignore + from ._models import NamedPartitionSchemeDescription # type: ignore + from ._models import NetworkRef # type: ignore + from ._models import NetworkResourceDescription # type: ignore + from ._models import NetworkResourceProperties # type: ignore + from ._models import NetworkResourcePropertiesBase # type: ignore + from ._models import NodeAbortedEvent # type: ignore + from ._models import NodeAddedToClusterEvent # type: ignore + from ._models import NodeClosedEvent # type: ignore + from ._models import NodeDeactivateCompletedEvent # type: ignore + from ._models import NodeDeactivateStartedEvent # type: ignore + from ._models import NodeDeactivationInfo # type: ignore + from ._models import NodeDeactivationTask # type: ignore + from ._models import NodeDeactivationTaskId # type: ignore + from ._models import NodeDownEvent # type: ignore + from ._models import NodeEvent # type: ignore + from ._models import NodeHealth # type: ignore + from ._models import NodeHealthEvaluation # type: ignore + from ._models import NodeHealthReportExpiredEvent # type: ignore + from ._models import NodeHealthState # type: ignore + from ._models import NodeHealthStateChunk # type: ignore + from ._models import NodeHealthStateChunkList # type: ignore + from ._models import NodeHealthStateFilter # type: ignore + from ._models import NodeId # type: ignore + from ._models import NodeImpact # type: ignore + from ._models import NodeInfo # type: ignore + from ._models import NodeLoadInfo # type: ignore + from ._models import NodeLoadMetricInformation # type: ignore + from ._models import NodeNewHealthReportEvent # type: ignore + from ._models import NodeOpenFailedEvent # type: ignore + from ._models import NodeOpenSucceededEvent # type: ignore + from ._models import NodeRemovedFromClusterEvent # type: ignore + from ._models import NodeRepairImpactDescription # type: ignore + from ._models import NodeRepairTargetDescription # type: ignore + from ._models import NodeResult # type: ignore + from ._models import NodeTagsDescription # type: ignore + from ._models import NodeTransitionProgress # type: ignore + from ._models import NodeTransitionResult # type: ignore + from ._models import NodeTypeHealthPolicyMapItem # type: ignore + from ._models import NodeTypeNodesHealthEvaluation # type: ignore + from ._models import NodeUpEvent # type: ignore + from ._models import NodeUpgradeProgressInfo # type: ignore + from ._models import NodesHealthEvaluation # type: ignore + from ._models import OperationStatus # type: ignore + from ._models import PackageSharingPolicyInfo # type: ignore + from ._models import PagedApplicationInfoList # type: ignore + from ._models import PagedApplicationResourceDescriptionList # type: ignore + from ._models import PagedApplicationTypeInfoList # type: ignore + from ._models import PagedBackupConfigurationInfoList # type: ignore + from ._models import PagedBackupEntityList # type: ignore + from ._models import PagedBackupInfoList # type: ignore + from ._models import PagedBackupPolicyDescriptionList # type: ignore + from ._models import PagedComposeDeploymentStatusInfoList # type: ignore + from ._models import PagedDeployedApplicationInfoList # type: ignore + from ._models import PagedGatewayResourceDescriptionList # type: ignore + from ._models import PagedNetworkResourceDescriptionList # type: ignore + from ._models import PagedNodeInfoList # type: ignore + from ._models import PagedPropertyInfoList # type: ignore + from ._models import PagedReplicaInfoList # type: ignore + from ._models import PagedSecretResourceDescriptionList # type: ignore + from ._models import PagedSecretValueResourceDescriptionList # type: ignore + from ._models import PagedServiceInfoList # type: ignore + from ._models import PagedServicePartitionInfoList # type: ignore + from ._models import PagedServiceReplicaDescriptionList # type: ignore + from ._models import PagedServiceResourceDescriptionList # type: ignore + from ._models import PagedSubNameInfoList # type: ignore + from ._models import PagedUpdatePartitionLoadResultList # type: ignore + from ._models import PagedVolumeResourceDescriptionList # type: ignore + from ._models import PartitionAnalysisEvent # type: ignore + from ._models import PartitionBackupConfigurationInfo # type: ignore + from ._models import PartitionBackupEntity # type: ignore + from ._models import PartitionDataLossProgress # type: ignore + from ._models import PartitionEvent # type: ignore + from ._models import PartitionHealth # type: ignore + from ._models import PartitionHealthEvaluation # type: ignore + from ._models import PartitionHealthReportExpiredEvent # type: ignore + from ._models import PartitionHealthState # type: ignore + from ._models import PartitionHealthStateChunk # type: ignore + from ._models import PartitionHealthStateChunkList # type: ignore + from ._models import PartitionHealthStateFilter # type: ignore + from ._models import PartitionInformation # type: ignore + from ._models import PartitionInstanceCountScaleMechanism # type: ignore + from ._models import PartitionLoadInformation # type: ignore + from ._models import PartitionMetricLoadDescription # type: ignore + from ._models import PartitionNewHealthReportEvent # type: ignore + from ._models import PartitionPrimaryMoveAnalysisEvent # type: ignore + from ._models import PartitionQuorumLossProgress # type: ignore + from ._models import PartitionReconfiguredEvent # type: ignore + from ._models import PartitionRestartProgress # type: ignore + from ._models import PartitionSafetyCheck # type: ignore + from ._models import PartitionSchemeDescription # type: ignore + from ._models import PartitionsHealthEvaluation # type: ignore + from ._models import PrimaryReplicatorStatus # type: ignore + from ._models import Probe # type: ignore + from ._models import ProbeExec # type: ignore + from ._models import ProbeHttpGet # type: ignore + from ._models import ProbeHttpGetHeaders # type: ignore + from ._models import ProbeTcpSocket # type: ignore + from ._models import PropertyBatchDescriptionList # type: ignore + from ._models import PropertyBatchInfo # type: ignore + from ._models import PropertyBatchOperation # type: ignore + from ._models import PropertyDescription # type: ignore + from ._models import PropertyInfo # type: ignore + from ._models import PropertyMetadata # type: ignore + from ._models import PropertyValue # type: ignore + from ._models import ProvisionApplicationTypeDescription # type: ignore + from ._models import ProvisionApplicationTypeDescriptionBase # type: ignore + from ._models import ProvisionFabricDescription # type: ignore + from ._models import PutPropertyBatchOperation # type: ignore + from ._models import ReconfigurationInformation # type: ignore + from ._models import RegistryCredential # type: ignore + from ._models import ReliableCollectionsRef # type: ignore + from ._models import RemoteReplicatorAcknowledgementDetail # type: ignore + from ._models import RemoteReplicatorAcknowledgementStatus # type: ignore + from ._models import RemoteReplicatorStatus # type: ignore + from ._models import RepairImpactDescriptionBase # type: ignore + from ._models import RepairTargetDescriptionBase # type: ignore + from ._models import RepairTask # type: ignore + from ._models import RepairTaskApproveDescription # type: ignore + from ._models import RepairTaskCancelDescription # type: ignore + from ._models import RepairTaskDeleteDescription # type: ignore + from ._models import RepairTaskHistory # type: ignore + from ._models import RepairTaskUpdateHealthPolicyDescription # type: ignore + from ._models import RepairTaskUpdateInfo # type: ignore + from ._models import ReplicaEvent # type: ignore + from ._models import ReplicaHealth # type: ignore + from ._models import ReplicaHealthEvaluation # type: ignore + from ._models import ReplicaHealthState # type: ignore + from ._models import ReplicaHealthStateChunk # type: ignore + from ._models import ReplicaHealthStateChunkList # type: ignore + from ._models import ReplicaHealthStateFilter # type: ignore + from ._models import ReplicaInfo # type: ignore + from ._models import ReplicaLifecycleDescription # type: ignore + from ._models import ReplicaMetricLoadDescription # type: ignore + from ._models import ReplicaStatusBase # type: ignore + from ._models import ReplicasHealthEvaluation # type: ignore + from ._models import ReplicatorQueueStatus # type: ignore + from ._models import ReplicatorStatus # type: ignore + from ._models import ResolvedServiceEndpoint # type: ignore + from ._models import ResolvedServicePartition # type: ignore + from ._models import ResourceLimits # type: ignore + from ._models import ResourceRequests # type: ignore + from ._models import ResourceRequirements # type: ignore + from ._models import RestartDeployedCodePackageDescription # type: ignore + from ._models import RestartNodeDescription # type: ignore + from ._models import RestartPartitionResult # type: ignore + from ._models import RestorePartitionDescription # type: ignore + from ._models import RestoreProgressInfo # type: ignore + from ._models import ResumeApplicationUpgradeDescription # type: ignore + from ._models import ResumeClusterUpgradeDescription # type: ignore + from ._models import RetentionPolicyDescription # type: ignore + from ._models import RollingUpgradeUpdateDescription # type: ignore + from ._models import RunToCompletionExecutionPolicy # type: ignore + from ._models import SafetyCheck # type: ignore + from ._models import SafetyCheckWrapper # type: ignore + from ._models import ScalingMechanismDescription # type: ignore + from ._models import ScalingPolicyDescription # type: ignore + from ._models import ScalingTriggerDescription # type: ignore + from ._models import SecondaryActiveReplicatorStatus # type: ignore + from ._models import SecondaryIdleReplicatorStatus # type: ignore + from ._models import SecondaryReplicatorStatus # type: ignore + from ._models import SecretResourceDescription # type: ignore + from ._models import SecretResourceProperties # type: ignore + from ._models import SecretResourcePropertiesBase # type: ignore + from ._models import SecretValue # type: ignore + from ._models import SecretValueProperties # type: ignore + from ._models import SecretValueResourceDescription # type: ignore + from ._models import SecretValueResourceProperties # type: ignore + from ._models import SeedNodeSafetyCheck # type: ignore + from ._models import SelectedPartition # type: ignore + from ._models import ServiceBackupConfigurationInfo # type: ignore + from ._models import ServiceBackupEntity # type: ignore + from ._models import ServiceCorrelationDescription # type: ignore + from ._models import ServiceCreatedEvent # type: ignore + from ._models import ServiceDeletedEvent # type: ignore + from ._models import ServiceDescription # type: ignore + from ._models import ServiceEvent # type: ignore + from ._models import ServiceFromTemplateDescription # type: ignore + from ._models import ServiceHealth # type: ignore + from ._models import ServiceHealthEvaluation # type: ignore + from ._models import ServiceHealthReportExpiredEvent # type: ignore + from ._models import ServiceHealthState # type: ignore + from ._models import ServiceHealthStateChunk # type: ignore + from ._models import ServiceHealthStateChunkList # type: ignore + from ._models import ServiceHealthStateFilter # type: ignore + from ._models import ServiceIdentity # type: ignore + from ._models import ServiceInfo # type: ignore + from ._models import ServiceLoadMetricDescription # type: ignore + from ._models import ServiceNameInfo # type: ignore + from ._models import ServiceNewHealthReportEvent # type: ignore + from ._models import ServicePartitionInfo # type: ignore + from ._models import ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription # type: ignore + from ._models import ServicePlacementInvalidDomainPolicyDescription # type: ignore + from ._models import ServicePlacementNonPartiallyPlaceServicePolicyDescription # type: ignore + from ._models import ServicePlacementPolicyDescription # type: ignore + from ._models import ServicePlacementPreferPrimaryDomainPolicyDescription # type: ignore + from ._models import ServicePlacementRequireDomainDistributionPolicyDescription # type: ignore + from ._models import ServicePlacementRequiredDomainPolicyDescription # type: ignore + from ._models import ServiceProperties # type: ignore + from ._models import ServiceReplicaDescription # type: ignore + from ._models import ServiceReplicaProperties # type: ignore + from ._models import ServiceResourceDescription # type: ignore + from ._models import ServiceResourceProperties # type: ignore + from ._models import ServiceTypeDescription # type: ignore + from ._models import ServiceTypeExtensionDescription # type: ignore + from ._models import ServiceTypeHealthPolicy # type: ignore + from ._models import ServiceTypeHealthPolicyMapItem # type: ignore + from ._models import ServiceTypeInfo # type: ignore + from ._models import ServiceTypeManifest # type: ignore + from ._models import ServiceUpdateDescription # type: ignore + from ._models import ServiceUpgradeProgress # type: ignore + from ._models import ServicesHealthEvaluation # type: ignore + from ._models import Setting # type: ignore + from ._models import SingletonPartitionInformation # type: ignore + from ._models import SingletonPartitionSchemeDescription # type: ignore + from ._models import StartClusterUpgradeDescription # type: ignore + from ._models import StartedChaosEvent # type: ignore + from ._models import StatefulReplicaHealthReportExpiredEvent # type: ignore + from ._models import StatefulReplicaNewHealthReportEvent # type: ignore + from ._models import StatefulServiceDescription # type: ignore + from ._models import StatefulServiceInfo # type: ignore + from ._models import StatefulServicePartitionInfo # type: ignore + from ._models import StatefulServiceReplicaHealth # type: ignore + from ._models import StatefulServiceReplicaHealthState # type: ignore + from ._models import StatefulServiceReplicaInfo # type: ignore + from ._models import StatefulServiceTypeDescription # type: ignore + from ._models import StatefulServiceUpdateDescription # type: ignore + from ._models import StatelessReplicaHealthReportExpiredEvent # type: ignore + from ._models import StatelessReplicaNewHealthReportEvent # type: ignore + from ._models import StatelessServiceDescription # type: ignore + from ._models import StatelessServiceInfo # type: ignore + from ._models import StatelessServiceInstanceHealth # type: ignore + from ._models import StatelessServiceInstanceHealthState # type: ignore + from ._models import StatelessServiceInstanceInfo # type: ignore + from ._models import StatelessServicePartitionInfo # type: ignore + from ._models import StatelessServiceTypeDescription # type: ignore + from ._models import StatelessServiceUpdateDescription # type: ignore + from ._models import StoppedChaosEvent # type: ignore + from ._models import StringPropertyValue # type: ignore + from ._models import SuccessfulPropertyBatchInfo # type: ignore + from ._models import SystemApplicationHealthEvaluation # type: ignore + from ._models import TcpConfig # type: ignore + from ._models import TestErrorChaosEvent # type: ignore + from ._models import TimeBasedBackupScheduleDescription # type: ignore + from ._models import TimeOfDay # type: ignore + from ._models import TimeRange # type: ignore + from ._models import UniformInt64RangePartitionSchemeDescription # type: ignore + from ._models import UnplacedReplicaInformation # type: ignore + from ._models import UnprovisionApplicationTypeDescriptionInfo # type: ignore + from ._models import UnprovisionFabricDescription # type: ignore + from ._models import UpdateClusterUpgradeDescription # type: ignore + from ._models import UpdatePartitionLoadResult # type: ignore + from ._models import UpgradeDomainDeltaNodesCheckHealthEvaluation # type: ignore + from ._models import UpgradeDomainDeployedApplicationsHealthEvaluation # type: ignore + from ._models import UpgradeDomainInfo # type: ignore + from ._models import UpgradeDomainNodesHealthEvaluation # type: ignore + from ._models import UpgradeOrchestrationServiceState # type: ignore + from ._models import UpgradeOrchestrationServiceStateSummary # type: ignore + from ._models import UpgradeUnitInfo # type: ignore + from ._models import UploadChunkRange # type: ignore + from ._models import UploadSession # type: ignore + from ._models import UploadSessionInfo # type: ignore + from ._models import UsageInfo # type: ignore + from ._models import ValidateClusterUpgradeResult # type: ignore + from ._models import ValidationFailedChaosEvent # type: ignore + from ._models import VolumeProviderParametersAzureFile # type: ignore + from ._models import VolumeReference # type: ignore + from ._models import VolumeResourceDescription # type: ignore + from ._models import WaitForInbuildReplicaSafetyCheck # type: ignore + from ._models import WaitForPrimaryPlacementSafetyCheck # type: ignore + from ._models import WaitForPrimarySwapSafetyCheck # type: ignore + from ._models import WaitForReconfigurationSafetyCheck # type: ignore + from ._models import WaitingChaosEvent # type: ignore + +from ._service_fabric_client_apis_enums import ( + ApplicationDefinitionKind, + ApplicationPackageCleanupPolicy, + ApplicationResourceUpgradeState, + ApplicationScopedVolumeKind, + ApplicationStatus, + ApplicationTypeDefinitionKind, + ApplicationTypeStatus, + AutoScalingMechanismKind, + AutoScalingMetricKind, + AutoScalingResourceMetricName, + AutoScalingTriggerKind, + BackupEntityKind, + BackupPolicyScope, + BackupScheduleFrequencyType, + BackupScheduleKind, + BackupState, + BackupStorageKind, + BackupSuspensionScope, + BackupType, + ChaosEventKind, + ChaosScheduleStatus, + ChaosStatus, + ComposeDeploymentStatus, + ComposeDeploymentUpgradeState, + CreateFabricDump, + DataLossMode, + DayOfWeek, + DeactivationIntent, + DeployedApplicationStatus, + DeploymentStatus, + DiagnosticsSinkKind, + EntityKind, + EntryPointStatus, + EnvironmentVariableType, + ExecutionPolicyType, + FabricErrorCodes, + FabricEventKind, + FabricReplicaStatus, + FailureAction, + FailureReason, + HeaderMatchType, + HealthEvaluationKind, + HealthState, + HostIsolationMode, + HostOptions, + HostType, + ImageRegistryPasswordType, + ImpactLevel, + ManagedIdentityType, + MoveCost, + NetworkKind, + NodeDeactivationIntent, + NodeDeactivationStatus, + NodeDeactivationTaskType, + NodeStatus, + NodeStatusFilter, + NodeTransitionType, + NodeUpgradePhase, + OperatingSystemType, + OperationState, + OperationType, + Ordering, + PackageSharingPolicyScope, + PartitionAccessStatus, + PartitionScheme, + PathMatchType, + PropertyBatchInfoKind, + PropertyBatchOperationKind, + PropertyValueKind, + ProvisionApplicationTypeKind, + QuorumLossMode, + ReconfigurationPhase, + ReconfigurationType, + RepairImpactKind, + RepairTargetKind, + RepairTaskHealthCheckState, + ReplicaHealthReportServiceKind, + ReplicaKind, + ReplicaRole, + ReplicaStatus, + ReplicatorOperationName, + ResourceStatus, + RestartPartitionMode, + RestartPolicy, + RestoreState, + ResultStatus, + RetentionPolicyType, + RollingUpgradeMode, + SafetyCheckKind, + ScalingMechanismKind, + ScalingTriggerKind, + Scheme, + SecretKind, + ServiceCorrelationScheme, + ServiceEndpointRole, + ServiceHostUpgradeImpact, + ServiceKind, + ServiceLoadMetricWeight, + ServiceOperationName, + ServicePackageActivationMode, + ServicePartitionKind, + ServicePartitionStatus, + ServicePlacementPolicyType, + ServiceStatus, + ServiceTypeRegistrationStatus, + SettingType, + SizeTypes, + State, + UpgradeDomainState, + UpgradeKind, + UpgradeMode, + UpgradeSortOrder, + UpgradeState, + UpgradeType, + UpgradeUnitState, + VolumeProvider, +) + +__all__ = [ + 'AadMetadata', + 'AadMetadataObject', + 'AddRemoveIncrementalNamedPartitionScalingMechanism', + 'AddRemoveReplicaScalingMechanism', + 'AnalysisEventMetadata', + 'ApplicationBackupConfigurationInfo', + 'ApplicationBackupEntity', + 'ApplicationCapacityDescription', + 'ApplicationContainerInstanceExitedEvent', + 'ApplicationCreatedEvent', + 'ApplicationDeletedEvent', + 'ApplicationDescription', + 'ApplicationEvent', + 'ApplicationHealth', + 'ApplicationHealthEvaluation', + 'ApplicationHealthPolicies', + 'ApplicationHealthPolicy', + 'ApplicationHealthPolicyMapItem', + 'ApplicationHealthPolicyMapObject', + 'ApplicationHealthReportExpiredEvent', + 'ApplicationHealthState', + 'ApplicationHealthStateChunk', + 'ApplicationHealthStateChunkList', + 'ApplicationHealthStateFilter', + 'ApplicationInfo', + 'ApplicationLoadInfo', + 'ApplicationLoadMetricInformation', + 'ApplicationMetadata', + 'ApplicationMetricDescription', + 'ApplicationNameInfo', + 'ApplicationNewHealthReportEvent', + 'ApplicationParameter', + 'ApplicationProcessExitedEvent', + 'ApplicationResourceDescription', + 'ApplicationResourceUpgradeProgressInfo', + 'ApplicationScopedVolume', + 'ApplicationScopedVolumeCreationParameters', + 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk', + 'ApplicationTypeApplicationsHealthEvaluation', + 'ApplicationTypeHealthPolicyMapItem', + 'ApplicationTypeImageStorePath', + 'ApplicationTypeInfo', + 'ApplicationTypeManifest', + 'ApplicationTypeMetadata', + 'ApplicationUpdateDescription', + 'ApplicationUpgradeCompletedEvent', + 'ApplicationUpgradeDescription', + 'ApplicationUpgradeDomainCompletedEvent', + 'ApplicationUpgradeProgressInfo', + 'ApplicationUpgradeRollbackCompletedEvent', + 'ApplicationUpgradeRollbackStartedEvent', + 'ApplicationUpgradeStartedEvent', + 'ApplicationUpgradeUpdateDescription', + 'ApplicationsHealthEvaluation', + 'ArmMetadata', + 'AutoScalingMechanism', + 'AutoScalingMetric', + 'AutoScalingPolicy', + 'AutoScalingResourceMetric', + 'AutoScalingTrigger', + 'AverageLoadScalingTrigger', + 'AveragePartitionLoadScalingTrigger', + 'AverageServiceLoadScalingTrigger', + 'AzureBlobBackupStorageDescription', + 'AzureInternalMonitoringPipelineSinkDescription', + 'BackupConfigurationInfo', + 'BackupEntity', + 'BackupInfo', + 'BackupPartitionDescription', + 'BackupPolicyDescription', + 'BackupProgressInfo', + 'BackupScheduleDescription', + 'BackupStorageDescription', + 'BackupSuspensionInfo', + 'BasicRetentionPolicyDescription', + 'BinaryPropertyValue', + 'Chaos', + 'ChaosCodePackageRestartScheduledEvent', + 'ChaosContext', + 'ChaosEvent', + 'ChaosEventWrapper', + 'ChaosEventsSegment', + 'ChaosNodeRestartScheduledEvent', + 'ChaosParameters', + 'ChaosParametersDictionaryItem', + 'ChaosPartitionPrimaryMoveScheduledEvent', + 'ChaosPartitionSecondaryMoveScheduledEvent', + 'ChaosReplicaRemovalScheduledEvent', + 'ChaosReplicaRestartScheduledEvent', + 'ChaosSchedule', + 'ChaosScheduleDescription', + 'ChaosScheduleJob', + 'ChaosScheduleJobActiveDaysOfWeek', + 'ChaosStartedEvent', + 'ChaosStoppedEvent', + 'ChaosTargetFilter', + 'CheckExistsPropertyBatchOperation', + 'CheckSequencePropertyBatchOperation', + 'CheckValuePropertyBatchOperation', + 'ClusterConfiguration', + 'ClusterConfigurationUpgradeDescription', + 'ClusterConfigurationUpgradeStatusInfo', + 'ClusterEvent', + 'ClusterHealth', + 'ClusterHealthChunk', + 'ClusterHealthChunkQueryDescription', + 'ClusterHealthPolicies', + 'ClusterHealthPolicy', + 'ClusterHealthReportExpiredEvent', + 'ClusterLoadInfo', + 'ClusterManifest', + 'ClusterNewHealthReportEvent', + 'ClusterUpgradeCompletedEvent', + 'ClusterUpgradeDescriptionObject', + 'ClusterUpgradeDomainCompletedEvent', + 'ClusterUpgradeHealthPolicyObject', + 'ClusterUpgradeProgressObject', + 'ClusterUpgradeRollbackCompletedEvent', + 'ClusterUpgradeRollbackStartedEvent', + 'ClusterUpgradeStartedEvent', + 'ClusterVersion', + 'CodePackageEntryPoint', + 'CodePackageEntryPointStatistics', + 'ComposeDeploymentStatusInfo', + 'ComposeDeploymentUpgradeDescription', + 'ComposeDeploymentUpgradeProgressInfo', + 'ConfigParameterOverride', + 'ContainerApiRequestBody', + 'ContainerApiResponse', + 'ContainerApiResult', + 'ContainerCodePackageProperties', + 'ContainerEvent', + 'ContainerInstanceEvent', + 'ContainerInstanceView', + 'ContainerLabel', + 'ContainerLogs', + 'ContainerState', + 'CreateComposeDeploymentDescription', + 'CurrentUpgradeDomainProgressInfo', + 'CurrentUpgradeUnitsProgressInfo', + 'DeactivationIntentDescription', + 'DefaultExecutionPolicy', + 'DeletePropertyBatchOperation', + 'DeltaNodesCheckHealthEvaluation', + 'DeployServicePackageToNodeDescription', + 'DeployedApplicationHealth', + 'DeployedApplicationHealthEvaluation', + 'DeployedApplicationHealthReportExpiredEvent', + 'DeployedApplicationHealthState', + 'DeployedApplicationHealthStateChunk', + 'DeployedApplicationHealthStateChunkList', + 'DeployedApplicationHealthStateFilter', + 'DeployedApplicationInfo', + 'DeployedApplicationNewHealthReportEvent', + 'DeployedApplicationsHealthEvaluation', + 'DeployedCodePackageInfo', + 'DeployedServicePackageHealth', + 'DeployedServicePackageHealthEvaluation', + 'DeployedServicePackageHealthReportExpiredEvent', + 'DeployedServicePackageHealthState', + 'DeployedServicePackageHealthStateChunk', + 'DeployedServicePackageHealthStateChunkList', + 'DeployedServicePackageHealthStateFilter', + 'DeployedServicePackageInfo', + 'DeployedServicePackageNewHealthReportEvent', + 'DeployedServicePackagesHealthEvaluation', + 'DeployedServiceReplicaDetailInfo', + 'DeployedServiceReplicaInfo', + 'DeployedServiceTypeInfo', + 'DeployedStatefulServiceReplicaDetailInfo', + 'DeployedStatefulServiceReplicaInfo', + 'DeployedStatelessServiceInstanceDetailInfo', + 'DeployedStatelessServiceInstanceInfo', + 'DiagnosticsDescription', + 'DiagnosticsRef', + 'DiagnosticsSinkProperties', + 'DisableBackupDescription', + 'DiskInfo', + 'DoublePropertyValue', + 'DsmsAzureBlobBackupStorageDescription', + 'EnableBackupDescription', + 'EndpointProperties', + 'EndpointRef', + 'EnsureAvailabilitySafetyCheck', + 'EnsurePartitionQuorumSafetyCheck', + 'EntityHealth', + 'EntityHealthState', + 'EntityHealthStateChunk', + 'EntityHealthStateChunkList', + 'EntityKindHealthStateCount', + 'EnvironmentVariable', + 'Epoch', + 'EventHealthEvaluation', + 'ExecutingFaultsChaosEvent', + 'ExecutionPolicy', + 'ExternalStoreProvisionApplicationTypeDescription', + 'FabricCodeVersionInfo', + 'FabricConfigVersionInfo', + 'FabricError', + 'FabricErrorError', + 'FabricEvent', + 'FailedPropertyBatchInfo', + 'FailedUpgradeDomainProgressObject', + 'FailureUpgradeDomainProgressInfo', + 'FileInfo', + 'FileShareBackupStorageDescription', + 'FileVersion', + 'FolderInfo', + 'FolderSizeInfo', + 'FrequencyBasedBackupScheduleDescription', + 'GatewayDestination', + 'GatewayResourceDescription', + 'GetBackupByStorageQueryDescription', + 'GetPropertyBatchOperation', + 'GuidPropertyValue', + 'HealthEvaluation', + 'HealthEvaluationWrapper', + 'HealthEvent', + 'HealthInformation', + 'HealthStateCount', + 'HealthStatistics', + 'HttpConfig', + 'HttpHostConfig', + 'HttpRouteConfig', + 'HttpRouteMatchHeader', + 'HttpRouteMatchPath', + 'HttpRouteMatchRule', + 'IdentityDescription', + 'IdentityItemDescription', + 'ImageRegistryCredential', + 'ImageStoreContent', + 'ImageStoreCopyDescription', + 'ImageStoreInfo', + 'InlinedValueSecretResourceProperties', + 'InstanceLifecycleDescription', + 'Int64PropertyValue', + 'Int64RangePartitionInformation', + 'InvokeDataLossResult', + 'InvokeQuorumLossResult', + 'KeyValueStoreReplicaStatus', + 'LoadMetricInformation', + 'LoadMetricReport', + 'LoadMetricReportInfo', + 'LoadedPartitionInformationQueryDescription', + 'LoadedPartitionInformationResult', + 'LoadedPartitionInformationResultList', + 'LocalNetworkResourceProperties', + 'ManagedApplicationIdentity', + 'ManagedApplicationIdentityDescription', + 'ManagedIdentityAzureBlobBackupStorageDescription', + 'MetricLoadDescription', + 'MonitoringPolicyDescription', + 'NameDescription', + 'NamedPartitionInformation', + 'NamedPartitionSchemeDescription', + 'NetworkRef', + 'NetworkResourceDescription', + 'NetworkResourceProperties', + 'NetworkResourcePropertiesBase', + 'NodeAbortedEvent', + 'NodeAddedToClusterEvent', + 'NodeClosedEvent', + 'NodeDeactivateCompletedEvent', + 'NodeDeactivateStartedEvent', + 'NodeDeactivationInfo', + 'NodeDeactivationTask', + 'NodeDeactivationTaskId', + 'NodeDownEvent', + 'NodeEvent', + 'NodeHealth', + 'NodeHealthEvaluation', + 'NodeHealthReportExpiredEvent', + 'NodeHealthState', + 'NodeHealthStateChunk', + 'NodeHealthStateChunkList', + 'NodeHealthStateFilter', + 'NodeId', + 'NodeImpact', + 'NodeInfo', + 'NodeLoadInfo', + 'NodeLoadMetricInformation', + 'NodeNewHealthReportEvent', + 'NodeOpenFailedEvent', + 'NodeOpenSucceededEvent', + 'NodeRemovedFromClusterEvent', + 'NodeRepairImpactDescription', + 'NodeRepairTargetDescription', + 'NodeResult', + 'NodeTagsDescription', + 'NodeTransitionProgress', + 'NodeTransitionResult', + 'NodeTypeHealthPolicyMapItem', + 'NodeTypeNodesHealthEvaluation', + 'NodeUpEvent', + 'NodeUpgradeProgressInfo', + 'NodesHealthEvaluation', + 'OperationStatus', + 'PackageSharingPolicyInfo', + 'PagedApplicationInfoList', + 'PagedApplicationResourceDescriptionList', + 'PagedApplicationTypeInfoList', + 'PagedBackupConfigurationInfoList', + 'PagedBackupEntityList', + 'PagedBackupInfoList', + 'PagedBackupPolicyDescriptionList', + 'PagedComposeDeploymentStatusInfoList', + 'PagedDeployedApplicationInfoList', + 'PagedGatewayResourceDescriptionList', + 'PagedNetworkResourceDescriptionList', + 'PagedNodeInfoList', + 'PagedPropertyInfoList', + 'PagedReplicaInfoList', + 'PagedSecretResourceDescriptionList', + 'PagedSecretValueResourceDescriptionList', + 'PagedServiceInfoList', + 'PagedServicePartitionInfoList', + 'PagedServiceReplicaDescriptionList', + 'PagedServiceResourceDescriptionList', + 'PagedSubNameInfoList', + 'PagedUpdatePartitionLoadResultList', + 'PagedVolumeResourceDescriptionList', + 'PartitionAnalysisEvent', + 'PartitionBackupConfigurationInfo', + 'PartitionBackupEntity', + 'PartitionDataLossProgress', + 'PartitionEvent', + 'PartitionHealth', + 'PartitionHealthEvaluation', + 'PartitionHealthReportExpiredEvent', + 'PartitionHealthState', + 'PartitionHealthStateChunk', + 'PartitionHealthStateChunkList', + 'PartitionHealthStateFilter', + 'PartitionInformation', + 'PartitionInstanceCountScaleMechanism', + 'PartitionLoadInformation', + 'PartitionMetricLoadDescription', + 'PartitionNewHealthReportEvent', + 'PartitionPrimaryMoveAnalysisEvent', + 'PartitionQuorumLossProgress', + 'PartitionReconfiguredEvent', + 'PartitionRestartProgress', + 'PartitionSafetyCheck', + 'PartitionSchemeDescription', + 'PartitionsHealthEvaluation', + 'PrimaryReplicatorStatus', + 'Probe', + 'ProbeExec', + 'ProbeHttpGet', + 'ProbeHttpGetHeaders', + 'ProbeTcpSocket', + 'PropertyBatchDescriptionList', + 'PropertyBatchInfo', + 'PropertyBatchOperation', + 'PropertyDescription', + 'PropertyInfo', + 'PropertyMetadata', + 'PropertyValue', + 'ProvisionApplicationTypeDescription', + 'ProvisionApplicationTypeDescriptionBase', + 'ProvisionFabricDescription', + 'PutPropertyBatchOperation', + 'ReconfigurationInformation', + 'RegistryCredential', + 'ReliableCollectionsRef', + 'RemoteReplicatorAcknowledgementDetail', + 'RemoteReplicatorAcknowledgementStatus', + 'RemoteReplicatorStatus', + 'RepairImpactDescriptionBase', + 'RepairTargetDescriptionBase', + 'RepairTask', + 'RepairTaskApproveDescription', + 'RepairTaskCancelDescription', + 'RepairTaskDeleteDescription', + 'RepairTaskHistory', + 'RepairTaskUpdateHealthPolicyDescription', + 'RepairTaskUpdateInfo', + 'ReplicaEvent', + 'ReplicaHealth', + 'ReplicaHealthEvaluation', + 'ReplicaHealthState', + 'ReplicaHealthStateChunk', + 'ReplicaHealthStateChunkList', + 'ReplicaHealthStateFilter', + 'ReplicaInfo', + 'ReplicaLifecycleDescription', + 'ReplicaMetricLoadDescription', + 'ReplicaStatusBase', + 'ReplicasHealthEvaluation', + 'ReplicatorQueueStatus', + 'ReplicatorStatus', + 'ResolvedServiceEndpoint', + 'ResolvedServicePartition', + 'ResourceLimits', + 'ResourceRequests', + 'ResourceRequirements', + 'RestartDeployedCodePackageDescription', + 'RestartNodeDescription', + 'RestartPartitionResult', + 'RestorePartitionDescription', + 'RestoreProgressInfo', + 'ResumeApplicationUpgradeDescription', + 'ResumeClusterUpgradeDescription', + 'RetentionPolicyDescription', + 'RollingUpgradeUpdateDescription', + 'RunToCompletionExecutionPolicy', + 'SafetyCheck', + 'SafetyCheckWrapper', + 'ScalingMechanismDescription', + 'ScalingPolicyDescription', + 'ScalingTriggerDescription', + 'SecondaryActiveReplicatorStatus', + 'SecondaryIdleReplicatorStatus', + 'SecondaryReplicatorStatus', + 'SecretResourceDescription', + 'SecretResourceProperties', + 'SecretResourcePropertiesBase', + 'SecretValue', + 'SecretValueProperties', + 'SecretValueResourceDescription', + 'SecretValueResourceProperties', + 'SeedNodeSafetyCheck', + 'SelectedPartition', + 'ServiceBackupConfigurationInfo', + 'ServiceBackupEntity', + 'ServiceCorrelationDescription', + 'ServiceCreatedEvent', + 'ServiceDeletedEvent', + 'ServiceDescription', + 'ServiceEvent', + 'ServiceFromTemplateDescription', + 'ServiceHealth', + 'ServiceHealthEvaluation', + 'ServiceHealthReportExpiredEvent', + 'ServiceHealthState', + 'ServiceHealthStateChunk', + 'ServiceHealthStateChunkList', + 'ServiceHealthStateFilter', + 'ServiceIdentity', + 'ServiceInfo', + 'ServiceLoadMetricDescription', + 'ServiceNameInfo', + 'ServiceNewHealthReportEvent', + 'ServicePartitionInfo', + 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', + 'ServicePlacementInvalidDomainPolicyDescription', + 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', + 'ServicePlacementPolicyDescription', + 'ServicePlacementPreferPrimaryDomainPolicyDescription', + 'ServicePlacementRequireDomainDistributionPolicyDescription', + 'ServicePlacementRequiredDomainPolicyDescription', + 'ServiceProperties', + 'ServiceReplicaDescription', + 'ServiceReplicaProperties', + 'ServiceResourceDescription', + 'ServiceResourceProperties', + 'ServiceTypeDescription', + 'ServiceTypeExtensionDescription', + 'ServiceTypeHealthPolicy', + 'ServiceTypeHealthPolicyMapItem', + 'ServiceTypeInfo', + 'ServiceTypeManifest', + 'ServiceUpdateDescription', + 'ServiceUpgradeProgress', + 'ServicesHealthEvaluation', + 'Setting', + 'SingletonPartitionInformation', + 'SingletonPartitionSchemeDescription', + 'StartClusterUpgradeDescription', + 'StartedChaosEvent', + 'StatefulReplicaHealthReportExpiredEvent', + 'StatefulReplicaNewHealthReportEvent', + 'StatefulServiceDescription', + 'StatefulServiceInfo', + 'StatefulServicePartitionInfo', + 'StatefulServiceReplicaHealth', + 'StatefulServiceReplicaHealthState', + 'StatefulServiceReplicaInfo', + 'StatefulServiceTypeDescription', + 'StatefulServiceUpdateDescription', + 'StatelessReplicaHealthReportExpiredEvent', + 'StatelessReplicaNewHealthReportEvent', + 'StatelessServiceDescription', + 'StatelessServiceInfo', + 'StatelessServiceInstanceHealth', + 'StatelessServiceInstanceHealthState', + 'StatelessServiceInstanceInfo', + 'StatelessServicePartitionInfo', + 'StatelessServiceTypeDescription', + 'StatelessServiceUpdateDescription', + 'StoppedChaosEvent', + 'StringPropertyValue', + 'SuccessfulPropertyBatchInfo', + 'SystemApplicationHealthEvaluation', + 'TcpConfig', + 'TestErrorChaosEvent', + 'TimeBasedBackupScheduleDescription', + 'TimeOfDay', + 'TimeRange', + 'UniformInt64RangePartitionSchemeDescription', + 'UnplacedReplicaInformation', + 'UnprovisionApplicationTypeDescriptionInfo', + 'UnprovisionFabricDescription', + 'UpdateClusterUpgradeDescription', + 'UpdatePartitionLoadResult', + 'UpgradeDomainDeltaNodesCheckHealthEvaluation', + 'UpgradeDomainDeployedApplicationsHealthEvaluation', + 'UpgradeDomainInfo', + 'UpgradeDomainNodesHealthEvaluation', + 'UpgradeOrchestrationServiceState', + 'UpgradeOrchestrationServiceStateSummary', + 'UpgradeUnitInfo', + 'UploadChunkRange', + 'UploadSession', + 'UploadSessionInfo', + 'UsageInfo', + 'ValidateClusterUpgradeResult', + 'ValidationFailedChaosEvent', + 'VolumeProviderParametersAzureFile', + 'VolumeReference', + 'VolumeResourceDescription', + 'WaitForInbuildReplicaSafetyCheck', + 'WaitForPrimaryPlacementSafetyCheck', + 'WaitForPrimarySwapSafetyCheck', + 'WaitForReconfigurationSafetyCheck', + 'WaitingChaosEvent', + 'ApplicationDefinitionKind', + 'ApplicationPackageCleanupPolicy', + 'ApplicationResourceUpgradeState', + 'ApplicationScopedVolumeKind', + 'ApplicationStatus', + 'ApplicationTypeDefinitionKind', + 'ApplicationTypeStatus', + 'AutoScalingMechanismKind', + 'AutoScalingMetricKind', + 'AutoScalingResourceMetricName', + 'AutoScalingTriggerKind', + 'BackupEntityKind', + 'BackupPolicyScope', + 'BackupScheduleFrequencyType', + 'BackupScheduleKind', + 'BackupState', + 'BackupStorageKind', + 'BackupSuspensionScope', + 'BackupType', + 'ChaosEventKind', + 'ChaosScheduleStatus', + 'ChaosStatus', + 'ComposeDeploymentStatus', + 'ComposeDeploymentUpgradeState', + 'CreateFabricDump', + 'DataLossMode', + 'DayOfWeek', + 'DeactivationIntent', + 'DeployedApplicationStatus', + 'DeploymentStatus', + 'DiagnosticsSinkKind', + 'EntityKind', + 'EntryPointStatus', + 'EnvironmentVariableType', + 'ExecutionPolicyType', + 'FabricErrorCodes', + 'FabricEventKind', + 'FabricReplicaStatus', + 'FailureAction', + 'FailureReason', + 'HeaderMatchType', + 'HealthEvaluationKind', + 'HealthState', + 'HostIsolationMode', + 'HostOptions', + 'HostType', + 'ImageRegistryPasswordType', + 'ImpactLevel', + 'ManagedIdentityType', + 'MoveCost', + 'NetworkKind', + 'NodeDeactivationIntent', + 'NodeDeactivationStatus', + 'NodeDeactivationTaskType', + 'NodeStatus', + 'NodeStatusFilter', + 'NodeTransitionType', + 'NodeUpgradePhase', + 'OperatingSystemType', + 'OperationState', + 'OperationType', + 'Ordering', + 'PackageSharingPolicyScope', + 'PartitionAccessStatus', + 'PartitionScheme', + 'PathMatchType', + 'PropertyBatchInfoKind', + 'PropertyBatchOperationKind', + 'PropertyValueKind', + 'ProvisionApplicationTypeKind', + 'QuorumLossMode', + 'ReconfigurationPhase', + 'ReconfigurationType', + 'RepairImpactKind', + 'RepairTargetKind', + 'RepairTaskHealthCheckState', + 'ReplicaHealthReportServiceKind', + 'ReplicaKind', + 'ReplicaRole', + 'ReplicaStatus', + 'ReplicatorOperationName', + 'ResourceStatus', + 'RestartPartitionMode', + 'RestartPolicy', + 'RestoreState', + 'ResultStatus', + 'RetentionPolicyType', + 'RollingUpgradeMode', + 'SafetyCheckKind', + 'ScalingMechanismKind', + 'ScalingTriggerKind', + 'Scheme', + 'SecretKind', + 'ServiceCorrelationScheme', + 'ServiceEndpointRole', + 'ServiceHostUpgradeImpact', + 'ServiceKind', + 'ServiceLoadMetricWeight', + 'ServiceOperationName', + 'ServicePackageActivationMode', + 'ServicePartitionKind', + 'ServicePartitionStatus', + 'ServicePlacementPolicyType', + 'ServiceStatus', + 'ServiceTypeRegistrationStatus', + 'SettingType', + 'SizeTypes', + 'State', + 'UpgradeDomainState', + 'UpgradeKind', + 'UpgradeMode', + 'UpgradeSortOrder', + 'UpgradeState', + 'UpgradeType', + 'UpgradeUnitState', + 'VolumeProvider', +] diff --git a/customSDK/servicefabric/models/_models.py b/customSDK/servicefabric/models/_models.py new file mode 100644 index 00000000..fb38bb71 --- /dev/null +++ b/customSDK/servicefabric/models/_models.py @@ -0,0 +1,34044 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class AadMetadata(msrest.serialization.Model): + """Azure Active Directory metadata used for secured connection to cluster. + + :ivar authority: The AAD authority url. + :vartype authority: str + :ivar client: The AAD client application Id. + :vartype client: str + :ivar cluster: The AAD cluster application Id. + :vartype cluster: str + :ivar login: The AAD login url. + :vartype login: str + :ivar redirect: The client application redirect address. + :vartype redirect: str + :ivar tenant: The AAD tenant Id. + :vartype tenant: str + """ + + _attribute_map = { + 'authority': {'key': 'authority', 'type': 'str'}, + 'client': {'key': 'client', 'type': 'str'}, + 'cluster': {'key': 'cluster', 'type': 'str'}, + 'login': {'key': 'login', 'type': 'str'}, + 'redirect': {'key': 'redirect', 'type': 'str'}, + 'tenant': {'key': 'tenant', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword authority: The AAD authority url. + :paramtype authority: str + :keyword client: The AAD client application Id. + :paramtype client: str + :keyword cluster: The AAD cluster application Id. + :paramtype cluster: str + :keyword login: The AAD login url. + :paramtype login: str + :keyword redirect: The client application redirect address. + :paramtype redirect: str + :keyword tenant: The AAD tenant Id. + :paramtype tenant: str + """ + super(AadMetadata, self).__init__(**kwargs) + self.authority = kwargs.get('authority', None) + self.client = kwargs.get('client', None) + self.cluster = kwargs.get('cluster', None) + self.login = kwargs.get('login', None) + self.redirect = kwargs.get('redirect', None) + self.tenant = kwargs.get('tenant', None) + + +class AadMetadataObject(msrest.serialization.Model): + """Azure Active Directory metadata object used for secured connection to cluster. + + :ivar type: The client authentication method. + :vartype type: str + :ivar metadata: Azure Active Directory metadata used for secured connection to cluster. + :vartype metadata: ~azure.servicefabric.models.AadMetadata + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': 'AadMetadata'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword type: The client authentication method. + :paramtype type: str + :keyword metadata: Azure Active Directory metadata used for secured connection to cluster. + :paramtype metadata: ~azure.servicefabric.models.AadMetadata + """ + super(AadMetadataObject, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.metadata = kwargs.get('metadata', None) + + +class ScalingMechanismDescription(msrest.serialization.Model): + """Describes the mechanism for performing a scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddRemoveIncrementalNamedPartitionScalingMechanism, PartitionInstanceCountScaleMechanism. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Specifies the kind of scaling mechanism.Constant filled by server. + Possible values include: "Invalid", "PartitionInstanceCount", + "AddRemoveIncrementalNamedPartition". + :vartype kind: str or ~azure.servicefabric.models.ScalingMechanismKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AddRemoveIncrementalNamedPartition': 'AddRemoveIncrementalNamedPartitionScalingMechanism', 'PartitionInstanceCount': 'PartitionInstanceCountScaleMechanism'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ScalingMechanismDescription, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription): + """Represents a scaling mechanism for adding or removing named partitions of a stateless service. Partition names are in the format '0','1''N-1'. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Specifies the kind of scaling mechanism.Constant filled by server. + Possible values include: "Invalid", "PartitionInstanceCount", + "AddRemoveIncrementalNamedPartition". + :vartype kind: str or ~azure.servicefabric.models.ScalingMechanismKind + :ivar min_partition_count: Required. Minimum number of named partitions of the service. + :vartype min_partition_count: int + :ivar max_partition_count: Required. Maximum number of named partitions of the service. + :vartype max_partition_count: int + :ivar scale_increment: Required. The number of instances to add or remove during a scaling + operation. + :vartype scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_partition_count': {'required': True}, + 'max_partition_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'}, + 'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'}, + 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword min_partition_count: Required. Minimum number of named partitions of the service. + :paramtype min_partition_count: int + :keyword max_partition_count: Required. Maximum number of named partitions of the service. + :paramtype max_partition_count: int + :keyword scale_increment: Required. The number of instances to add or remove during a scaling + operation. + :paramtype scale_increment: int + """ + super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs) + self.kind = 'AddRemoveIncrementalNamedPartition' # type: str + self.min_partition_count = kwargs['min_partition_count'] + self.max_partition_count = kwargs['max_partition_count'] + self.scale_increment = kwargs['scale_increment'] + + +class AutoScalingMechanism(msrest.serialization.Model): + """Describes the mechanism for performing auto scaling operation. Derived classes will describe the actual mechanism. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddRemoveReplicaScalingMechanism. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of auto scaling mechanism.Constant filled by server. Possible + values include: "AddRemoveReplica". + :vartype kind: str or ~azure.servicefabric.models.AutoScalingMechanismKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AddRemoveReplica': 'AddRemoveReplicaScalingMechanism'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AutoScalingMechanism, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class AddRemoveReplicaScalingMechanism(AutoScalingMechanism): + """Describes the horizontal auto scaling mechanism that adds or removes replicas (containers or container groups). + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of auto scaling mechanism.Constant filled by server. Possible + values include: "AddRemoveReplica". + :vartype kind: str or ~azure.servicefabric.models.AutoScalingMechanismKind + :ivar min_count: Required. Minimum number of containers (scale down won't be performed below + this number). + :vartype min_count: int + :ivar max_count: Required. Maximum number of containers (scale up won't be performed above this + number). + :vartype max_count: int + :ivar scale_increment: Required. Each time auto scaling is performed, this number of containers + will be added or removed. + :vartype scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_count': {'required': True}, + 'max_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'scale_increment': {'key': 'scaleIncrement', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword min_count: Required. Minimum number of containers (scale down won't be performed below + this number). + :paramtype min_count: int + :keyword max_count: Required. Maximum number of containers (scale up won't be performed above + this number). + :paramtype max_count: int + :keyword scale_increment: Required. Each time auto scaling is performed, this number of + containers will be added or removed. + :paramtype scale_increment: int + """ + super(AddRemoveReplicaScalingMechanism, self).__init__(**kwargs) + self.kind = 'AddRemoveReplica' # type: str + self.min_count = kwargs['min_count'] + self.max_count = kwargs['max_count'] + self.scale_increment = kwargs['scale_increment'] + + +class AnalysisEventMetadata(msrest.serialization.Model): + """Metadata about an Analysis Event. + + :ivar delay: The analysis delay. + :vartype delay: ~datetime.timedelta + :ivar duration: The duration of analysis. + :vartype duration: ~datetime.timedelta + """ + + _attribute_map = { + 'delay': {'key': 'Delay', 'type': 'duration'}, + 'duration': {'key': 'Duration', 'type': 'duration'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword delay: The analysis delay. + :paramtype delay: ~datetime.timedelta + :keyword duration: The duration of analysis. + :paramtype duration: ~datetime.timedelta + """ + super(AnalysisEventMetadata, self).__init__(**kwargs) + self.delay = kwargs.get('delay', None) + self.duration = kwargs.get('duration', None) + + +class BackupConfigurationInfo(msrest.serialization.Model): + """Describes the backup configuration information. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationBackupConfigurationInfo, PartitionBackupConfigurationInfo, ServiceBackupConfigurationInfo. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The entity type of a Service Fabric entity such as Application, Service + or a Partition where periodic backups can be enabled.Constant filled by server. Possible values + include: "Invalid", "Partition", "Service", "Application". + :vartype kind: str or ~azure.servicefabric.models.BackupEntityKind + :ivar policy_name: The name of the backup policy which is applicable to this Service Fabric + application or service or partition. + :vartype policy_name: str + :ivar policy_inherited_from: Specifies the scope at which the backup policy is applied. + Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope + :ivar suspension_info: Describes the backup suspension details. + :vartype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + } + + _subtype_map = { + 'kind': {'Application': 'ApplicationBackupConfigurationInfo', 'Partition': 'PartitionBackupConfigurationInfo', 'Service': 'ServiceBackupConfigurationInfo'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword policy_name: The name of the backup policy which is applicable to this Service Fabric + application or service or partition. + :paramtype policy_name: str + :keyword policy_inherited_from: Specifies the scope at which the backup policy is applied. + Possible values include: "Invalid", "Partition", "Service", "Application". + :paramtype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope + :keyword suspension_info: Describes the backup suspension details. + :paramtype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + """ + super(BackupConfigurationInfo, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.policy_name = kwargs.get('policy_name', None) + self.policy_inherited_from = kwargs.get('policy_inherited_from', None) + self.suspension_info = kwargs.get('suspension_info', None) + + +class ApplicationBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information for a specific Service Fabric application specifying what backup policy is being applied and suspend description, if any. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The entity type of a Service Fabric entity such as Application, Service + or a Partition where periodic backups can be enabled.Constant filled by server. Possible values + include: "Invalid", "Partition", "Service", "Application". + :vartype kind: str or ~azure.servicefabric.models.BackupEntityKind + :ivar policy_name: The name of the backup policy which is applicable to this Service Fabric + application or service or partition. + :vartype policy_name: str + :ivar policy_inherited_from: Specifies the scope at which the backup policy is applied. + Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope + :ivar suspension_info: Describes the backup suspension details. + :vartype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword policy_name: The name of the backup policy which is applicable to this Service Fabric + application or service or partition. + :paramtype policy_name: str + :keyword policy_inherited_from: Specifies the scope at which the backup policy is applied. + Possible values include: "Invalid", "Partition", "Service", "Application". + :paramtype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope + :keyword suspension_info: Describes the backup suspension details. + :paramtype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + """ + super(ApplicationBackupConfigurationInfo, self).__init__(**kwargs) + self.kind = 'Application' # type: str + self.application_name = kwargs.get('application_name', None) + + +class BackupEntity(msrest.serialization.Model): + """Describes the Service Fabric entity that is configured for backup. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationBackupEntity, PartitionBackupEntity, ServiceBackupEntity. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_kind: Required. The entity type of a Service Fabric entity such as Application, + Service or a Partition where periodic backups can be enabled.Constant filled by server. + Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype entity_kind: str or ~azure.servicefabric.models.BackupEntityKind + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + } + + _subtype_map = { + 'entity_kind': {'Application': 'ApplicationBackupEntity', 'Partition': 'PartitionBackupEntity', 'Service': 'ServiceBackupEntity'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(BackupEntity, self).__init__(**kwargs) + self.entity_kind = None # type: Optional[str] + + +class ApplicationBackupEntity(BackupEntity): + """Identifies the Service Fabric application which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_kind: Required. The entity type of a Service Fabric entity such as Application, + Service or a Partition where periodic backups can be enabled.Constant filled by server. + Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype entity_kind: str or ~azure.servicefabric.models.BackupEntityKind + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + """ + super(ApplicationBackupEntity, self).__init__(**kwargs) + self.entity_kind = 'Application' # type: str + self.application_name = kwargs.get('application_name', None) + + +class ApplicationCapacityDescription(msrest.serialization.Model): + """Describes capacity information for services of this application. This description can be used for describing the following. + + +* Reserving the capacity for the services on the nodes +* Limiting the total number of nodes that services of this application can run on +* Limiting the custom capacity metrics to limit the total consumption of this metric by the services of this application. + + :ivar minimum_nodes: The minimum number of nodes where Service Fabric will reserve capacity for + this application. Note that this does not mean that the services of this application will be + placed on all of those nodes. If this property is set to zero, no capacity will be reserved. + The value of this property cannot be more than the value of the MaximumNodes property. + :vartype minimum_nodes: long + :ivar maximum_nodes: The maximum number of nodes where Service Fabric will reserve capacity for + this application. Note that this does not mean that the services of this application will be + placed on all of those nodes. By default, the value of this property is zero and it means that + the services can be placed on any node. + :vartype maximum_nodes: long + :ivar application_metrics: List of application capacity metric description. + :vartype application_metrics: list[~azure.servicefabric.models.ApplicationMetricDescription] + """ + + _validation = { + 'minimum_nodes': {'minimum': 0}, + 'maximum_nodes': {'minimum': 0}, + } + + _attribute_map = { + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword minimum_nodes: The minimum number of nodes where Service Fabric will reserve capacity + for this application. Note that this does not mean that the services of this application will + be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. + The value of this property cannot be more than the value of the MaximumNodes property. + :paramtype minimum_nodes: long + :keyword maximum_nodes: The maximum number of nodes where Service Fabric will reserve capacity + for this application. Note that this does not mean that the services of this application will + be placed on all of those nodes. By default, the value of this property is zero and it means + that the services can be placed on any node. + :paramtype maximum_nodes: long + :keyword application_metrics: List of application capacity metric description. + :paramtype application_metrics: list[~azure.servicefabric.models.ApplicationMetricDescription] + """ + super(ApplicationCapacityDescription, self).__init__(**kwargs) + self.minimum_nodes = kwargs.get('minimum_nodes', None) + self.maximum_nodes = kwargs.get('maximum_nodes', 0) + self.application_metrics = kwargs.get('application_metrics', None) + + +class FabricEvent(msrest.serialization.Model): + """Represents the base for all Fabric Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationEvent, ClusterEvent, ContainerInstanceEvent, NodeEvent, PartitionEvent, ReplicaEvent, ServiceEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + } + + _subtype_map = { + 'kind': {'ApplicationEvent': 'ApplicationEvent', 'ClusterEvent': 'ClusterEvent', 'ContainerInstanceEvent': 'ContainerInstanceEvent', 'NodeEvent': 'NodeEvent', 'PartitionEvent': 'PartitionEvent', 'ReplicaEvent': 'ReplicaEvent', 'ServiceEvent': 'ServiceEvent'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + """ + super(FabricEvent, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.event_instance_id = kwargs['event_instance_id'] + self.category = kwargs.get('category', None) + self.time_stamp = kwargs['time_stamp'] + self.has_correlated_events = kwargs.get('has_correlated_events', None) + + +class ApplicationEvent(FabricEvent): + """Represents the base for all Application Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationContainerInstanceExitedEvent, ApplicationCreatedEvent, ApplicationDeletedEvent, ApplicationHealthReportExpiredEvent, ApplicationNewHealthReportEvent, ApplicationProcessExitedEvent, ApplicationUpgradeCompletedEvent, ApplicationUpgradeDomainCompletedEvent, ApplicationUpgradeRollbackCompletedEvent, ApplicationUpgradeRollbackStartedEvent, ApplicationUpgradeStartedEvent, ChaosCodePackageRestartScheduledEvent, DeployedApplicationHealthReportExpiredEvent, DeployedApplicationNewHealthReportEvent, DeployedServicePackageHealthReportExpiredEvent, DeployedServicePackageNewHealthReportEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ApplicationContainerInstanceExited': 'ApplicationContainerInstanceExitedEvent', 'ApplicationCreated': 'ApplicationCreatedEvent', 'ApplicationDeleted': 'ApplicationDeletedEvent', 'ApplicationHealthReportExpired': 'ApplicationHealthReportExpiredEvent', 'ApplicationNewHealthReport': 'ApplicationNewHealthReportEvent', 'ApplicationProcessExited': 'ApplicationProcessExitedEvent', 'ApplicationUpgradeCompleted': 'ApplicationUpgradeCompletedEvent', 'ApplicationUpgradeDomainCompleted': 'ApplicationUpgradeDomainCompletedEvent', 'ApplicationUpgradeRollbackCompleted': 'ApplicationUpgradeRollbackCompletedEvent', 'ApplicationUpgradeRollbackStarted': 'ApplicationUpgradeRollbackStartedEvent', 'ApplicationUpgradeStarted': 'ApplicationUpgradeStartedEvent', 'ChaosCodePackageRestartScheduled': 'ChaosCodePackageRestartScheduledEvent', 'DeployedApplicationHealthReportExpired': 'DeployedApplicationHealthReportExpiredEvent', 'DeployedApplicationNewHealthReport': 'DeployedApplicationNewHealthReportEvent', 'DeployedServicePackageHealthReportExpired': 'DeployedServicePackageHealthReportExpiredEvent', 'DeployedServicePackageNewHealthReport': 'DeployedServicePackageNewHealthReportEvent'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + """ + super(ApplicationEvent, self).__init__(**kwargs) + self.kind = 'ApplicationEvent' # type: str + self.application_id = kwargs['application_id'] + + +class ApplicationContainerInstanceExitedEvent(ApplicationEvent): + """Container Exited event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar service_name: Required. Name of Service. + :vartype service_name: str + :ivar service_package_name: Required. Name of Service package. + :vartype service_package_name: str + :ivar service_package_activation_id: Required. Activation Id of Service package. + :vartype service_package_activation_id: str + :ivar is_exclusive: Required. Indicates IsExclusive flag. + :vartype is_exclusive: bool + :ivar code_package_name: Required. Name of Code package. + :vartype code_package_name: str + :ivar entry_point_type: Required. Type of EntryPoint. + :vartype entry_point_type: str + :ivar image_name: Required. Name of Container image. + :vartype image_name: str + :ivar container_name: Required. Name of Container. + :vartype container_name: str + :ivar host_id: Required. Host Id. + :vartype host_id: str + :ivar exit_code: Required. Exit code of process. + :vartype exit_code: long + :ivar unexpected_termination: Required. Indicates if termination is unexpected. + :vartype unexpected_termination: bool + :ivar start_time: Required. Start time of process. + :vartype start_time: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'service_name': {'required': True}, + 'service_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'is_exclusive': {'required': True}, + 'code_package_name': {'required': True}, + 'entry_point_type': {'required': True}, + 'image_name': {'required': True}, + 'container_name': {'required': True}, + 'host_id': {'required': True}, + 'exit_code': {'required': True}, + 'unexpected_termination': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, + 'image_name': {'key': 'ImageName', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + 'host_id': {'key': 'HostId', 'type': 'str'}, + 'exit_code': {'key': 'ExitCode', 'type': 'long'}, + 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword service_name: Required. Name of Service. + :paramtype service_name: str + :keyword service_package_name: Required. Name of Service package. + :paramtype service_package_name: str + :keyword service_package_activation_id: Required. Activation Id of Service package. + :paramtype service_package_activation_id: str + :keyword is_exclusive: Required. Indicates IsExclusive flag. + :paramtype is_exclusive: bool + :keyword code_package_name: Required. Name of Code package. + :paramtype code_package_name: str + :keyword entry_point_type: Required. Type of EntryPoint. + :paramtype entry_point_type: str + :keyword image_name: Required. Name of Container image. + :paramtype image_name: str + :keyword container_name: Required. Name of Container. + :paramtype container_name: str + :keyword host_id: Required. Host Id. + :paramtype host_id: str + :keyword exit_code: Required. Exit code of process. + :paramtype exit_code: long + :keyword unexpected_termination: Required. Indicates if termination is unexpected. + :paramtype unexpected_termination: bool + :keyword start_time: Required. Start time of process. + :paramtype start_time: ~datetime.datetime + """ + super(ApplicationContainerInstanceExitedEvent, self).__init__(**kwargs) + self.kind = 'ApplicationContainerInstanceExited' # type: str + self.service_name = kwargs['service_name'] + self.service_package_name = kwargs['service_package_name'] + self.service_package_activation_id = kwargs['service_package_activation_id'] + self.is_exclusive = kwargs['is_exclusive'] + self.code_package_name = kwargs['code_package_name'] + self.entry_point_type = kwargs['entry_point_type'] + self.image_name = kwargs['image_name'] + self.container_name = kwargs['container_name'] + self.host_id = kwargs['host_id'] + self.exit_code = kwargs['exit_code'] + self.unexpected_termination = kwargs['unexpected_termination'] + self.start_time = kwargs['start_time'] + + +class ApplicationCreatedEvent(ApplicationEvent): + """Application Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar application_type_version: Required. Application type version. + :vartype application_type_version: str + :ivar application_definition_kind: Required. Application definition kind. + :vartype application_definition_kind: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'application_definition_kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword application_type_version: Required. Application type version. + :paramtype application_type_version: str + :keyword application_definition_kind: Required. Application definition kind. + :paramtype application_definition_kind: str + """ + super(ApplicationCreatedEvent, self).__init__(**kwargs) + self.kind = 'ApplicationCreated' # type: str + self.application_type_name = kwargs['application_type_name'] + self.application_type_version = kwargs['application_type_version'] + self.application_definition_kind = kwargs['application_definition_kind'] + + +class ApplicationDeletedEvent(ApplicationEvent): + """Application Deleted event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar application_type_version: Required. Application type version. + :vartype application_type_version: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword application_type_version: Required. Application type version. + :paramtype application_type_version: str + """ + super(ApplicationDeletedEvent, self).__init__(**kwargs) + self.kind = 'ApplicationDeleted' # type: str + self.application_type_name = kwargs['application_type_name'] + self.application_type_version = kwargs['application_type_version'] + + +class ApplicationDescription(msrest.serialization.Model): + """Describes a Service Fabric application. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the application, including the 'fabric:' URI scheme. + :vartype name: str + :ivar type_name: Required. The application type name as defined in the application manifest. + :vartype type_name: str + :ivar type_version: Required. The version of the application type as defined in the application + manifest. + :vartype type_version: str + :ivar parameter_list: List of application parameters with overridden values from their default + values specified in the application manifest. + :vartype parameter_list: list[~azure.servicefabric.models.ApplicationParameter] + :ivar application_capacity: Describes capacity information for services of this application. + This description can be used for describing the following. + + + * Reserving the capacity for the services on the nodes + * Limiting the total number of nodes that services of this application can run on + * Limiting the custom capacity metrics to limit the total consumption of this metric by the + services of this application. + :vartype application_capacity: ~azure.servicefabric.models.ApplicationCapacityDescription + :ivar managed_application_identity: Managed application identity description. + :vartype managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + + _validation = { + 'name': {'required': True}, + 'type_name': {'required': True}, + 'type_version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'type_version': {'key': 'TypeVersion', 'type': 'str'}, + 'parameter_list': {'key': 'ParameterList', 'type': '[ApplicationParameter]'}, + 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'ApplicationCapacityDescription'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. The name of the application, including the 'fabric:' URI scheme. + :paramtype name: str + :keyword type_name: Required. The application type name as defined in the application manifest. + :paramtype type_name: str + :keyword type_version: Required. The version of the application type as defined in the + application manifest. + :paramtype type_version: str + :keyword parameter_list: List of application parameters with overridden values from their + default values specified in the application manifest. + :paramtype parameter_list: list[~azure.servicefabric.models.ApplicationParameter] + :keyword application_capacity: Describes capacity information for services of this application. + This description can be used for describing the following. + + + * Reserving the capacity for the services on the nodes + * Limiting the total number of nodes that services of this application can run on + * Limiting the custom capacity metrics to limit the total consumption of this metric by the + services of this application. + :paramtype application_capacity: ~azure.servicefabric.models.ApplicationCapacityDescription + :keyword managed_application_identity: Managed application identity description. + :paramtype managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + super(ApplicationDescription, self).__init__(**kwargs) + self.name = kwargs['name'] + self.type_name = kwargs['type_name'] + self.type_version = kwargs['type_version'] + self.parameter_list = kwargs.get('parameter_list', None) + self.application_capacity = kwargs.get('application_capacity', None) + self.managed_application_identity = kwargs.get('managed_application_identity', None) + + +class EntityHealth(msrest.serialization.Model): + """Health information common to all entities in the cluster. It contains the aggregated health state, health events and unhealthy evaluation. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + """ + super(EntityHealth, self).__init__(**kwargs) + self.aggregated_health_state = kwargs.get('aggregated_health_state', None) + self.health_events = kwargs.get('health_events', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.health_statistics = kwargs.get('health_statistics', None) + + +class ApplicationHealth(EntityHealth): + """Represents the health of the application. Contains the application aggregated health state and the service and deployed application health states. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar name: The name of the application, including the 'fabric:' URI scheme. + :vartype name: str + :ivar service_health_states: Service health states as found in the health store. + :vartype service_health_states: list[~azure.servicefabric.models.ServiceHealthState] + :ivar deployed_application_health_states: Deployed application health states as found in the + health store. + :vartype deployed_application_health_states: + list[~azure.servicefabric.models.DeployedApplicationHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'service_health_states': {'key': 'ServiceHealthStates', 'type': '[ServiceHealthState]'}, + 'deployed_application_health_states': {'key': 'DeployedApplicationHealthStates', 'type': '[DeployedApplicationHealthState]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword name: The name of the application, including the 'fabric:' URI scheme. + :paramtype name: str + :keyword service_health_states: Service health states as found in the health store. + :paramtype service_health_states: list[~azure.servicefabric.models.ServiceHealthState] + :keyword deployed_application_health_states: Deployed application health states as found in the + health store. + :paramtype deployed_application_health_states: + list[~azure.servicefabric.models.DeployedApplicationHealthState] + """ + super(ApplicationHealth, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.service_health_states = kwargs.get('service_health_states', None) + self.deployed_application_health_states = kwargs.get('deployed_application_health_states', None) + + +class HealthEvaluation(msrest.serialization.Model): + """Represents a health evaluation which describes the data and the algorithm used by health manager to evaluate the health of an entity. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationHealthEvaluation, ApplicationTypeApplicationsHealthEvaluation, ApplicationsHealthEvaluation, DeltaNodesCheckHealthEvaluation, DeployedApplicationHealthEvaluation, DeployedApplicationsHealthEvaluation, DeployedServicePackageHealthEvaluation, DeployedServicePackagesHealthEvaluation, EventHealthEvaluation, NodeHealthEvaluation, NodeTypeNodesHealthEvaluation, NodesHealthEvaluation, PartitionHealthEvaluation, PartitionsHealthEvaluation, ReplicaHealthEvaluation, ReplicasHealthEvaluation, ServiceHealthEvaluation, ServicesHealthEvaluation, SystemApplicationHealthEvaluation, UpgradeDomainDeltaNodesCheckHealthEvaluation, UpgradeDomainDeployedApplicationsHealthEvaluation, UpgradeDomainNodesHealthEvaluation. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Application': 'ApplicationHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'NodeTypeNodes': 'NodeTypeNodesHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainDeployedApplications': 'UpgradeDomainDeployedApplicationsHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + """ + super(HealthEvaluation, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.aggregated_health_state = kwargs.get('aggregated_health_state', None) + self.description = kwargs.get('description', None) + + +class ApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for an application, containing information about the data and the algorithm used by the health store to evaluate health. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated + health state of the application. The types of the unhealthy evaluations can be + DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current + aggregated health state of the application. The types of the unhealthy evaluations can be + DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(ApplicationHealthEvaluation, self).__init__(**kwargs) + self.kind = 'Application' # type: str + self.application_name = kwargs.get('application_name', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class ApplicationHealthPolicies(msrest.serialization.Model): + """Defines the application health policy map used to evaluate the health of an application or one of its children entities. + + :ivar application_health_policy_map: The wrapper that contains the map with application health + policies used to evaluate specific applications in the cluster. + :vartype application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword application_health_policy_map: The wrapper that contains the map with application + health policies used to evaluate specific applications in the cluster. + :paramtype application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + super(ApplicationHealthPolicies, self).__init__(**kwargs) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) + + +class ApplicationHealthPolicy(msrest.serialization.Model): + """Defines a health policy used to evaluate the health of an application or one of its children entities. + + :ivar consider_warning_as_error: Indicates whether warnings are treated with the same severity + as errors. + :vartype consider_warning_as_error: bool + :ivar max_percent_unhealthy_deployed_applications: The maximum allowed percentage of unhealthy + deployed applications. Allowed values are Byte values from zero to 100. + The percentage represents the maximum tolerated percentage of deployed applications that can + be unhealthy before the application is considered in error. + This is calculated by dividing the number of unhealthy deployed applications over the number + of nodes where the application is currently deployed on in the cluster. + The computation rounds up to tolerate one failure on small numbers of nodes. Default + percentage is zero. + :vartype max_percent_unhealthy_deployed_applications: int + :ivar default_service_type_health_policy: The health policy used by default to evaluate the + health of a service type. + :vartype default_service_type_health_policy: + ~azure.servicefabric.models.ServiceTypeHealthPolicy + :ivar service_type_health_policy_map: The map with service type health policy per service type + name. The map is empty by default. + :vartype service_type_health_policy_map: + list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem] + """ + + _attribute_map = { + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'default_service_type_health_policy': {'key': 'DefaultServiceTypeHealthPolicy', 'type': 'ServiceTypeHealthPolicy'}, + 'service_type_health_policy_map': {'key': 'ServiceTypeHealthPolicyMap', 'type': '[ServiceTypeHealthPolicyMapItem]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword consider_warning_as_error: Indicates whether warnings are treated with the same + severity as errors. + :paramtype consider_warning_as_error: bool + :keyword max_percent_unhealthy_deployed_applications: The maximum allowed percentage of + unhealthy deployed applications. Allowed values are Byte values from zero to 100. + The percentage represents the maximum tolerated percentage of deployed applications that can + be unhealthy before the application is considered in error. + This is calculated by dividing the number of unhealthy deployed applications over the number + of nodes where the application is currently deployed on in the cluster. + The computation rounds up to tolerate one failure on small numbers of nodes. Default + percentage is zero. + :paramtype max_percent_unhealthy_deployed_applications: int + :keyword default_service_type_health_policy: The health policy used by default to evaluate the + health of a service type. + :paramtype default_service_type_health_policy: + ~azure.servicefabric.models.ServiceTypeHealthPolicy + :keyword service_type_health_policy_map: The map with service type health policy per service + type name. The map is empty by default. + :paramtype service_type_health_policy_map: + list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem] + """ + super(ApplicationHealthPolicy, self).__init__(**kwargs) + self.consider_warning_as_error = kwargs.get('consider_warning_as_error', False) + self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', 0) + self.default_service_type_health_policy = kwargs.get('default_service_type_health_policy', None) + self.service_type_health_policy_map = kwargs.get('service_type_health_policy_map', None) + + +class ApplicationHealthPolicyMapItem(msrest.serialization.Model): + """Defines an item in ApplicationHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :ivar key: Required. The key of the application health policy map item. This is the name of the + application. + :vartype key: str + :ivar value: Required. The value of the application health policy map item. This is the + ApplicationHealthPolicy for this application. + :vartype value: ~azure.servicefabric.models.ApplicationHealthPolicy + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ApplicationHealthPolicy'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword key: Required. The key of the application health policy map item. This is the name of + the application. + :paramtype key: str + :keyword value: Required. The value of the application health policy map item. This is the + ApplicationHealthPolicy for this application. + :paramtype value: ~azure.servicefabric.models.ApplicationHealthPolicy + """ + super(ApplicationHealthPolicyMapItem, self).__init__(**kwargs) + self.key = kwargs['key'] + self.value = kwargs['value'] + + +class ApplicationHealthPolicyMapObject(msrest.serialization.Model): + """Represents the map of application health policies for a ServiceFabric cluster upgrade. + + :ivar application_health_policy_map: Defines a map that contains specific application health + policies for different applications. + Each entry specifies as key the application name and as value an ApplicationHealthPolicy used + to evaluate the application health. + If an application is not specified in the map, the application health evaluation uses the + ApplicationHealthPolicy found in its application manifest or the default application health + policy (if no health policy is defined in the manifest). + The map is empty by default. + :vartype application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword application_health_policy_map: Defines a map that contains specific application health + policies for different applications. + Each entry specifies as key the application name and as value an ApplicationHealthPolicy used + to evaluate the application health. + If an application is not specified in the map, the application health evaluation uses the + ApplicationHealthPolicy found in its application manifest or the default application health + policy (if no health policy is defined in the manifest). + The map is empty by default. + :paramtype application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + super(ApplicationHealthPolicyMapObject, self).__init__(**kwargs) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) + + +class ApplicationHealthReportExpiredEvent(ApplicationEvent): + """Application Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_instance_id: Required. Id of Application instance. + :vartype application_instance_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_instance_id: Required. Id of Application instance. + :paramtype application_instance_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(ApplicationHealthReportExpiredEvent, self).__init__(**kwargs) + self.kind = 'ApplicationHealthReportExpired' # type: str + self.application_instance_id = kwargs['application_instance_id'] + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class EntityHealthState(msrest.serialization.Model): + """A base type for the health state of various entities in the cluster. It contains the aggregated health state. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + """ + super(EntityHealthState, self).__init__(**kwargs) + self.aggregated_health_state = kwargs.get('aggregated_health_state', None) + + +class ApplicationHealthState(EntityHealthState): + """Represents the health state of an application, which contains the application identifier and the aggregated health state. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar name: The name of the application, including the 'fabric:' URI scheme. + :vartype name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword name: The name of the application, including the 'fabric:' URI scheme. + :paramtype name: str + """ + super(ApplicationHealthState, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class EntityHealthStateChunk(msrest.serialization.Model): + """A base type for the health state chunk of various entities in the cluster. It contains the aggregated health state. + + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + """ + super(EntityHealthStateChunk, self).__init__(**kwargs) + self.health_state = kwargs.get('health_state', None) + + +class ApplicationHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a application. +The application health state chunk contains the application name, its aggregated health state and any children services and deployed applications that respect the filters in cluster health chunk query description. + + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar application_type_name: The application type name as defined in the application manifest. + :vartype application_type_name: str + :ivar service_health_state_chunks: The list of service health state chunks in the cluster that + respect the filters in the cluster health chunk query description. + :vartype service_health_state_chunks: ~azure.servicefabric.models.ServiceHealthStateChunkList + :ivar deployed_application_health_state_chunks: The list of deployed application health state + chunks in the cluster that respect the filters in the cluster health chunk query description. + :vartype deployed_application_health_state_chunks: + ~azure.servicefabric.models.DeployedApplicationHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_health_state_chunks': {'key': 'ServiceHealthStateChunks', 'type': 'ServiceHealthStateChunkList'}, + 'deployed_application_health_state_chunks': {'key': 'DeployedApplicationHealthStateChunks', 'type': 'DeployedApplicationHealthStateChunkList'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword application_type_name: The application type name as defined in the application + manifest. + :paramtype application_type_name: str + :keyword service_health_state_chunks: The list of service health state chunks in the cluster + that respect the filters in the cluster health chunk query description. + :paramtype service_health_state_chunks: ~azure.servicefabric.models.ServiceHealthStateChunkList + :keyword deployed_application_health_state_chunks: The list of deployed application health + state chunks in the cluster that respect the filters in the cluster health chunk query + description. + :paramtype deployed_application_health_state_chunks: + ~azure.servicefabric.models.DeployedApplicationHealthStateChunkList + """ + super(ApplicationHealthStateChunk, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.application_type_name = kwargs.get('application_type_name', None) + self.service_health_state_chunks = kwargs.get('service_health_state_chunks', None) + self.deployed_application_health_state_chunks = kwargs.get('deployed_application_health_state_chunks', None) + + +class EntityHealthStateChunkList(msrest.serialization.Model): + """A base type for the list of health state chunks found in the cluster. It contains the total number of health states that match the input filters. + + :ivar total_count: Total number of entity health state objects that match the specified filters + from the cluster health chunk query description. + :vartype total_count: long + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword total_count: Total number of entity health state objects that match the specified + filters from the cluster health chunk query description. + :paramtype total_count: long + """ + super(EntityHealthStateChunkList, self).__init__(**kwargs) + self.total_count = kwargs.get('total_count', None) + + +class ApplicationHealthStateChunkList(EntityHealthStateChunkList): + """The list of application health state chunks in the cluster that respect the input filters in the chunk query. Returned by get cluster health state chunks query. + + :ivar total_count: Total number of entity health state objects that match the specified filters + from the cluster health chunk query description. + :vartype total_count: long + :ivar items: The list of application health state chunks that respect the input filters in the + chunk query. + :vartype items: list[~azure.servicefabric.models.ApplicationHealthStateChunk] + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'items': {'key': 'Items', 'type': '[ApplicationHealthStateChunk]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword total_count: Total number of entity health state objects that match the specified + filters from the cluster health chunk query description. + :paramtype total_count: long + :keyword items: The list of application health state chunks that respect the input filters in + the chunk query. + :paramtype items: list[~azure.servicefabric.models.ApplicationHealthStateChunk] + """ + super(ApplicationHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) + + +class ApplicationHealthStateFilter(msrest.serialization.Model): + """Defines matching criteria to determine whether a application should be included in the cluster health chunk. +One filter can match zero, one or multiple applications, depending on its properties. + + :ivar application_name_filter: The name of the application that matches the filter, as a fabric + uri. The filter is applied only to the specified application, if it exists. + If the application doesn't exist, no application is returned in the cluster health chunk based + on this filter. + If the application exists, it is included in the cluster health chunk if it respects the other + filter properties. + If not specified, all applications are matched against the other filter members, like health + state filter. + :vartype application_name_filter: str + :ivar application_type_name_filter: The name of the application type that matches the filter. + If specified, the filter is applied only to applications of the selected application type, if + any exists. + If no applications of the specified application type exists, no application is returned in the + cluster health chunk based on this filter. + Each application of the specified application type is included in the cluster health chunk if + it respects the other filter properties. + If not specified, all applications are matched against the other filter members, like health + state filter. + :vartype application_type_name_filter: str + :ivar health_state_filter: The filter for the health state of the applications. It allows + selecting applications if they match the desired health states. + The possible values are integer value of one of the following health states. Only applications + that match the filter are returned. All applications are used to evaluate the cluster + aggregated health state. + If not specified, default value is None, unless the application name or the application type + name are specified. If the filter has default value and application name is specified, the + matching application is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches applications with HealthState value of OK + (2) and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :vartype health_state_filter: int + :ivar service_filters: Defines a list of filters that specify which services to be included in + the returned cluster health chunk as children of the application. The services are returned + only if the parent application matches a filter. + If the list is empty, no services are returned. All the services are used to evaluate the + parent application aggregated health state, regardless of the input filters. + The application filter may specify multiple service filters. + For example, it can specify a filter to return all services with health state Error and + another filter to always include a service identified by its service name. + :vartype service_filters: list[~azure.servicefabric.models.ServiceHealthStateFilter] + :ivar deployed_application_filters: Defines a list of filters that specify which deployed + applications to be included in the returned cluster health chunk as children of the + application. The deployed applications are returned only if the parent application matches a + filter. + If the list is empty, no deployed applications are returned. All the deployed applications are + used to evaluate the parent application aggregated health state, regardless of the input + filters. + The application filter may specify multiple deployed application filters. + For example, it can specify a filter to return all deployed applications with health state + Error and another filter to always include a deployed application on a specified node. + :vartype deployed_application_filters: + list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter] + """ + + _attribute_map = { + 'application_name_filter': {'key': 'ApplicationNameFilter', 'type': 'str'}, + 'application_type_name_filter': {'key': 'ApplicationTypeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'service_filters': {'key': 'ServiceFilters', 'type': '[ServiceHealthStateFilter]'}, + 'deployed_application_filters': {'key': 'DeployedApplicationFilters', 'type': '[DeployedApplicationHealthStateFilter]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword application_name_filter: The name of the application that matches the filter, as a + fabric uri. The filter is applied only to the specified application, if it exists. + If the application doesn't exist, no application is returned in the cluster health chunk based + on this filter. + If the application exists, it is included in the cluster health chunk if it respects the other + filter properties. + If not specified, all applications are matched against the other filter members, like health + state filter. + :paramtype application_name_filter: str + :keyword application_type_name_filter: The name of the application type that matches the + filter. + If specified, the filter is applied only to applications of the selected application type, if + any exists. + If no applications of the specified application type exists, no application is returned in the + cluster health chunk based on this filter. + Each application of the specified application type is included in the cluster health chunk if + it respects the other filter properties. + If not specified, all applications are matched against the other filter members, like health + state filter. + :paramtype application_type_name_filter: str + :keyword health_state_filter: The filter for the health state of the applications. It allows + selecting applications if they match the desired health states. + The possible values are integer value of one of the following health states. Only applications + that match the filter are returned. All applications are used to evaluate the cluster + aggregated health state. + If not specified, default value is None, unless the application name or the application type + name are specified. If the filter has default value and application name is specified, the + matching application is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches applications with HealthState value of OK + (2) and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :paramtype health_state_filter: int + :keyword service_filters: Defines a list of filters that specify which services to be included + in the returned cluster health chunk as children of the application. The services are returned + only if the parent application matches a filter. + If the list is empty, no services are returned. All the services are used to evaluate the + parent application aggregated health state, regardless of the input filters. + The application filter may specify multiple service filters. + For example, it can specify a filter to return all services with health state Error and + another filter to always include a service identified by its service name. + :paramtype service_filters: list[~azure.servicefabric.models.ServiceHealthStateFilter] + :keyword deployed_application_filters: Defines a list of filters that specify which deployed + applications to be included in the returned cluster health chunk as children of the + application. The deployed applications are returned only if the parent application matches a + filter. + If the list is empty, no deployed applications are returned. All the deployed applications are + used to evaluate the parent application aggregated health state, regardless of the input + filters. + The application filter may specify multiple deployed application filters. + For example, it can specify a filter to return all deployed applications with health state + Error and another filter to always include a deployed application on a specified node. + :paramtype deployed_application_filters: + list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter] + """ + super(ApplicationHealthStateFilter, self).__init__(**kwargs) + self.application_name_filter = kwargs.get('application_name_filter', None) + self.application_type_name_filter = kwargs.get('application_type_name_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) + self.service_filters = kwargs.get('service_filters', None) + self.deployed_application_filters = kwargs.get('deployed_application_filters', None) + + +class ApplicationInfo(msrest.serialization.Model): + """Information about a Service Fabric application. + + :ivar id: The identity of the application. This is an encoded representation of the application + name. This is used in the REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype id: str + :ivar name: The name of the application, including the 'fabric:' URI scheme. + :vartype name: str + :ivar type_name: The application type name as defined in the application manifest. + :vartype type_name: str + :ivar type_version: The version of the application type as defined in the application manifest. + :vartype type_version: str + :ivar status: The status of the application. Possible values include: "Invalid", "Ready", + "Upgrading", "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ApplicationStatus + :ivar parameters: List of application parameters with overridden values from their default + values specified in the application manifest. + :vartype parameters: list[~azure.servicefabric.models.ApplicationParameter] + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar application_definition_kind: The mechanism used to define a Service Fabric application. + Possible values include: "Invalid", "ServiceFabricApplicationDescription", "Compose". + :vartype application_definition_kind: str or + ~azure.servicefabric.models.ApplicationDefinitionKind + :ivar managed_application_identity: Managed application identity description. + :vartype managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + :ivar application_metadata: Metadata associated with a specific application. + :vartype application_metadata: ~azure.servicefabric.models.ApplicationMetadata + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'type_version': {'key': 'TypeVersion', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + 'application_metadata': {'key': 'ApplicationMetadata', 'type': 'ApplicationMetadata'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: The identity of the application. This is an encoded representation of the + application name. This is used in the REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype id: str + :keyword name: The name of the application, including the 'fabric:' URI scheme. + :paramtype name: str + :keyword type_name: The application type name as defined in the application manifest. + :paramtype type_name: str + :keyword type_version: The version of the application type as defined in the application + manifest. + :paramtype type_version: str + :keyword status: The status of the application. Possible values include: "Invalid", "Ready", + "Upgrading", "Creating", "Deleting", "Failed". + :paramtype status: str or ~azure.servicefabric.models.ApplicationStatus + :keyword parameters: List of application parameters with overridden values from their default + values specified in the application manifest. + :paramtype parameters: list[~azure.servicefabric.models.ApplicationParameter] + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword application_definition_kind: The mechanism used to define a Service Fabric + application. Possible values include: "Invalid", "ServiceFabricApplicationDescription", + "Compose". + :paramtype application_definition_kind: str or + ~azure.servicefabric.models.ApplicationDefinitionKind + :keyword managed_application_identity: Managed application identity description. + :paramtype managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + :keyword application_metadata: Metadata associated with a specific application. + :paramtype application_metadata: ~azure.servicefabric.models.ApplicationMetadata + """ + super(ApplicationInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_name = kwargs.get('type_name', None) + self.type_version = kwargs.get('type_version', None) + self.status = kwargs.get('status', None) + self.parameters = kwargs.get('parameters', None) + self.health_state = kwargs.get('health_state', None) + self.application_definition_kind = kwargs.get('application_definition_kind', None) + self.managed_application_identity = kwargs.get('managed_application_identity', None) + self.application_metadata = kwargs.get('application_metadata', None) + + +class ApplicationLoadInfo(msrest.serialization.Model): + """Load Information about a Service Fabric application. + + :ivar id: The identity of the application. This is an encoded representation of the application + name. This is used in the REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype id: str + :ivar minimum_nodes: The minimum number of nodes for this application. + It is the number of nodes where Service Fabric will reserve Capacity in the cluster which + equals to ReservedLoad * MinimumNodes for this Application instance. + For applications that do not have application capacity defined this value will be zero. + :vartype minimum_nodes: long + :ivar maximum_nodes: The maximum number of nodes where this application can be instantiated. + It is the number of nodes this application is allowed to span. + For applications that do not have application capacity defined this value will be zero. + :vartype maximum_nodes: long + :ivar node_count: The number of nodes on which this application is instantiated. + For applications that do not have application capacity defined this value will be zero. + :vartype node_count: long + :ivar application_load_metric_information: List of application load metric information. + :vartype application_load_metric_information: + list[~azure.servicefabric.models.ApplicationLoadMetricInformation] + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'node_count': {'key': 'NodeCount', 'type': 'long'}, + 'application_load_metric_information': {'key': 'ApplicationLoadMetricInformation', 'type': '[ApplicationLoadMetricInformation]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: The identity of the application. This is an encoded representation of the + application name. This is used in the REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype id: str + :keyword minimum_nodes: The minimum number of nodes for this application. + It is the number of nodes where Service Fabric will reserve Capacity in the cluster which + equals to ReservedLoad * MinimumNodes for this Application instance. + For applications that do not have application capacity defined this value will be zero. + :paramtype minimum_nodes: long + :keyword maximum_nodes: The maximum number of nodes where this application can be instantiated. + It is the number of nodes this application is allowed to span. + For applications that do not have application capacity defined this value will be zero. + :paramtype maximum_nodes: long + :keyword node_count: The number of nodes on which this application is instantiated. + For applications that do not have application capacity defined this value will be zero. + :paramtype node_count: long + :keyword application_load_metric_information: List of application load metric information. + :paramtype application_load_metric_information: + list[~azure.servicefabric.models.ApplicationLoadMetricInformation] + """ + super(ApplicationLoadInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.minimum_nodes = kwargs.get('minimum_nodes', None) + self.maximum_nodes = kwargs.get('maximum_nodes', None) + self.node_count = kwargs.get('node_count', None) + self.application_load_metric_information = kwargs.get('application_load_metric_information', None) + + +class ApplicationLoadMetricInformation(msrest.serialization.Model): + """Describes load information for a custom resource balancing metric. This can be used to limit the total consumption of this metric by the services of this application. + + :ivar name: The name of the metric. + :vartype name: str + :ivar reservation_capacity: This is the capacity reserved in the cluster for the application. + It's the product of NodeReservationCapacity and MinimumNodes. + If set to zero, no capacity is reserved for this metric. + When setting application capacity or when updating application capacity this value must be + smaller than or equal to MaximumCapacity for each metric. + :vartype reservation_capacity: long + :ivar application_capacity: Total capacity for this metric in this application instance. + :vartype application_capacity: long + :ivar application_load: Current load for this metric in this application instance. + :vartype application_load: long + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, + 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'long'}, + 'application_load': {'key': 'ApplicationLoad', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: The name of the metric. + :paramtype name: str + :keyword reservation_capacity: This is the capacity reserved in the cluster for the + application. + It's the product of NodeReservationCapacity and MinimumNodes. + If set to zero, no capacity is reserved for this metric. + When setting application capacity or when updating application capacity this value must be + smaller than or equal to MaximumCapacity for each metric. + :paramtype reservation_capacity: long + :keyword application_capacity: Total capacity for this metric in this application instance. + :paramtype application_capacity: long + :keyword application_load: Current load for this metric in this application instance. + :paramtype application_load: long + """ + super(ApplicationLoadMetricInformation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.reservation_capacity = kwargs.get('reservation_capacity', None) + self.application_capacity = kwargs.get('application_capacity', None) + self.application_load = kwargs.get('application_load', None) + + +class ApplicationMetadata(msrest.serialization.Model): + """Metadata associated with a specific application. + + :ivar arm_metadata: Common ArmMetadata assocaited with Service Fabric Entities. + :vartype arm_metadata: ~azure.servicefabric.models.ArmMetadata + """ + + _attribute_map = { + 'arm_metadata': {'key': 'ArmMetadata', 'type': 'ArmMetadata'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword arm_metadata: Common ArmMetadata assocaited with Service Fabric Entities. + :paramtype arm_metadata: ~azure.servicefabric.models.ArmMetadata + """ + super(ApplicationMetadata, self).__init__(**kwargs) + self.arm_metadata = kwargs.get('arm_metadata', None) + + +class ApplicationMetricDescription(msrest.serialization.Model): + """Describes capacity information for a custom resource balancing metric. This can be used to limit the total consumption of this metric by the services of this application. + + :ivar name: The name of the metric. + :vartype name: str + :ivar maximum_capacity: The maximum node capacity for Service Fabric application. + This is the maximum Load for an instance of this application on a single node. Even if the + capacity of node is greater than this value, Service Fabric will limit the total load of + services within the application on each node to this value. + If set to zero, capacity for this metric is unlimited on each node. + When creating a new application with application capacity defined, the product of MaximumNodes + and this value must always be smaller than or equal to TotalApplicationCapacity. + When updating existing application with application capacity, the product of MaximumNodes and + this value must always be smaller than or equal to TotalApplicationCapacity. + :vartype maximum_capacity: long + :ivar reservation_capacity: The node reservation capacity for Service Fabric application. + This is the amount of load which is reserved on nodes which have instances of this + application. + If MinimumNodes is specified, then the product of these values will be the capacity reserved + in the cluster for the application. + If set to zero, no capacity is reserved for this metric. + When setting application capacity or when updating application capacity; this value must be + smaller than or equal to MaximumCapacity for each metric. + :vartype reservation_capacity: long + :ivar total_application_capacity: The total metric capacity for Service Fabric application. + This is the total metric capacity for this application in the cluster. Service Fabric will try + to limit the sum of loads of services within the application to this value. + When creating a new application with application capacity defined, the product of MaximumNodes + and MaximumCapacity must always be smaller than or equal to this value. + :vartype total_application_capacity: long + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'maximum_capacity': {'key': 'MaximumCapacity', 'type': 'long'}, + 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, + 'total_application_capacity': {'key': 'TotalApplicationCapacity', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: The name of the metric. + :paramtype name: str + :keyword maximum_capacity: The maximum node capacity for Service Fabric application. + This is the maximum Load for an instance of this application on a single node. Even if the + capacity of node is greater than this value, Service Fabric will limit the total load of + services within the application on each node to this value. + If set to zero, capacity for this metric is unlimited on each node. + When creating a new application with application capacity defined, the product of MaximumNodes + and this value must always be smaller than or equal to TotalApplicationCapacity. + When updating existing application with application capacity, the product of MaximumNodes and + this value must always be smaller than or equal to TotalApplicationCapacity. + :paramtype maximum_capacity: long + :keyword reservation_capacity: The node reservation capacity for Service Fabric application. + This is the amount of load which is reserved on nodes which have instances of this + application. + If MinimumNodes is specified, then the product of these values will be the capacity reserved + in the cluster for the application. + If set to zero, no capacity is reserved for this metric. + When setting application capacity or when updating application capacity; this value must be + smaller than or equal to MaximumCapacity for each metric. + :paramtype reservation_capacity: long + :keyword total_application_capacity: The total metric capacity for Service Fabric application. + This is the total metric capacity for this application in the cluster. Service Fabric will try + to limit the sum of loads of services within the application to this value. + When creating a new application with application capacity defined, the product of MaximumNodes + and MaximumCapacity must always be smaller than or equal to this value. + :paramtype total_application_capacity: long + """ + super(ApplicationMetricDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.maximum_capacity = kwargs.get('maximum_capacity', None) + self.reservation_capacity = kwargs.get('reservation_capacity', None) + self.total_application_capacity = kwargs.get('total_application_capacity', None) + + +class ApplicationNameInfo(msrest.serialization.Model): + """Information about the application name. + + :ivar id: The identity of the application. This is an encoded representation of the application + name. This is used in the REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype id: str + :ivar name: The name of the application, including the 'fabric:' URI scheme. + :vartype name: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: The identity of the application. This is an encoded representation of the + application name. This is used in the REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype id: str + :keyword name: The name of the application, including the 'fabric:' URI scheme. + :paramtype name: str + """ + super(ApplicationNameInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + + +class ApplicationNewHealthReportEvent(ApplicationEvent): + """Application Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_instance_id: Required. Id of Application instance. + :vartype application_instance_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_instance_id: Required. Id of Application instance. + :paramtype application_instance_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(ApplicationNewHealthReportEvent, self).__init__(**kwargs) + self.kind = 'ApplicationNewHealthReport' # type: str + self.application_instance_id = kwargs['application_instance_id'] + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class ApplicationParameter(msrest.serialization.Model): + """Describes an application parameter override to be applied when creating or upgrading an application. + + All required parameters must be populated in order to send to Azure. + + :ivar key: Required. The name of the parameter. + :vartype key: str + :ivar value: Required. The value of the parameter. + :vartype value: str + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword key: Required. The name of the parameter. + :paramtype key: str + :keyword value: Required. The value of the parameter. + :paramtype value: str + """ + super(ApplicationParameter, self).__init__(**kwargs) + self.key = kwargs['key'] + self.value = kwargs['value'] + + +class ApplicationProcessExitedEvent(ApplicationEvent): + """Process Exited event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar service_name: Required. Name of Service. + :vartype service_name: str + :ivar service_package_name: Required. Name of Service package. + :vartype service_package_name: str + :ivar service_package_activation_id: Required. Activation Id of Service package. + :vartype service_package_activation_id: str + :ivar is_exclusive: Required. Indicates IsExclusive flag. + :vartype is_exclusive: bool + :ivar code_package_name: Required. Name of Code package. + :vartype code_package_name: str + :ivar entry_point_type: Required. Type of EntryPoint. + :vartype entry_point_type: str + :ivar exe_name: Required. Name of executable. + :vartype exe_name: str + :ivar process_id: Required. Process Id. + :vartype process_id: long + :ivar host_id: Required. Host Id. + :vartype host_id: str + :ivar exit_code: Required. Exit code of process. + :vartype exit_code: long + :ivar unexpected_termination: Required. Indicates if termination is unexpected. + :vartype unexpected_termination: bool + :ivar start_time: Required. Start time of process. + :vartype start_time: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'service_name': {'required': True}, + 'service_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'is_exclusive': {'required': True}, + 'code_package_name': {'required': True}, + 'entry_point_type': {'required': True}, + 'exe_name': {'required': True}, + 'process_id': {'required': True}, + 'host_id': {'required': True}, + 'exit_code': {'required': True}, + 'unexpected_termination': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, + 'exe_name': {'key': 'ExeName', 'type': 'str'}, + 'process_id': {'key': 'ProcessId', 'type': 'long'}, + 'host_id': {'key': 'HostId', 'type': 'str'}, + 'exit_code': {'key': 'ExitCode', 'type': 'long'}, + 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword service_name: Required. Name of Service. + :paramtype service_name: str + :keyword service_package_name: Required. Name of Service package. + :paramtype service_package_name: str + :keyword service_package_activation_id: Required. Activation Id of Service package. + :paramtype service_package_activation_id: str + :keyword is_exclusive: Required. Indicates IsExclusive flag. + :paramtype is_exclusive: bool + :keyword code_package_name: Required. Name of Code package. + :paramtype code_package_name: str + :keyword entry_point_type: Required. Type of EntryPoint. + :paramtype entry_point_type: str + :keyword exe_name: Required. Name of executable. + :paramtype exe_name: str + :keyword process_id: Required. Process Id. + :paramtype process_id: long + :keyword host_id: Required. Host Id. + :paramtype host_id: str + :keyword exit_code: Required. Exit code of process. + :paramtype exit_code: long + :keyword unexpected_termination: Required. Indicates if termination is unexpected. + :paramtype unexpected_termination: bool + :keyword start_time: Required. Start time of process. + :paramtype start_time: ~datetime.datetime + """ + super(ApplicationProcessExitedEvent, self).__init__(**kwargs) + self.kind = 'ApplicationProcessExited' # type: str + self.service_name = kwargs['service_name'] + self.service_package_name = kwargs['service_package_name'] + self.service_package_activation_id = kwargs['service_package_activation_id'] + self.is_exclusive = kwargs['is_exclusive'] + self.code_package_name = kwargs['code_package_name'] + self.entry_point_type = kwargs['entry_point_type'] + self.exe_name = kwargs['exe_name'] + self.process_id = kwargs['process_id'] + self.host_id = kwargs['host_id'] + self.exit_code = kwargs['exit_code'] + self.unexpected_termination = kwargs['unexpected_termination'] + self.start_time = kwargs['start_time'] + + +class ApplicationResourceDescription(msrest.serialization.Model): + """This type describes a application resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of the Application resource. + :vartype name: str + :ivar identity: Describes the identity of the application. + :vartype identity: ~azure.servicefabric.models.IdentityDescription + :ivar description: User readable description of the application. + :vartype description: str + :ivar services: Describes the services in the application. This property is used to create or + modify services of the application. On get only the name of the service is returned. The + service description can be obtained by querying for the service resource. + :vartype services: list[~azure.servicefabric.models.ServiceResourceDescription] + :ivar diagnostics: Describes the diagnostics definition and usage for an application resource. + :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsDescription + :ivar debug_params: Internal - used by Visual Studio to setup the debugging session on the + local development environment. + :vartype debug_params: str + :ivar service_names: Names of the services in the application. + :vartype service_names: list[str] + :ivar status: Status of the application. Possible values include: "Unknown", "Ready", + "Upgrading", "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the application. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. Possible values + include: "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the application's health state is not 'Ok', this additional + details from service fabric Health Manager for the user to know why the application is marked + unhealthy. + :vartype unhealthy_evaluation: str + """ + + _validation = { + 'name': {'required': True}, + 'service_names': {'readonly': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityDescription'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, + 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, + 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. Name of the Application resource. + :paramtype name: str + :keyword identity: Describes the identity of the application. + :paramtype identity: ~azure.servicefabric.models.IdentityDescription + :keyword description: User readable description of the application. + :paramtype description: str + :keyword services: Describes the services in the application. This property is used to create + or modify services of the application. On get only the name of the service is returned. The + service description can be obtained by querying for the service resource. + :paramtype services: list[~azure.servicefabric.models.ServiceResourceDescription] + :keyword diagnostics: Describes the diagnostics definition and usage for an application + resource. + :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsDescription + :keyword debug_params: Internal - used by Visual Studio to setup the debugging session on the + local development environment. + :paramtype debug_params: str + """ + super(ApplicationResourceDescription, self).__init__(**kwargs) + self.name = kwargs['name'] + self.identity = kwargs.get('identity', None) + self.description = kwargs.get('description', None) + self.services = kwargs.get('services', None) + self.diagnostics = kwargs.get('diagnostics', None) + self.debug_params = kwargs.get('debug_params', None) + self.service_names = None + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + + +class ApplicationResourceUpgradeProgressInfo(msrest.serialization.Model): + """This type describes an application resource upgrade. + + :ivar name: Name of the Application resource. + :vartype name: str + :ivar target_application_type_version: The target application version for the application + upgrade. + :vartype target_application_type_version: str + :ivar start_timestamp_utc: The estimated UTC datetime when the upgrade started. + :vartype start_timestamp_utc: str + :ivar upgrade_state: The state of the application resource upgrade. Possible values include: + "Invalid", "ProvisioningTarget", "RollingForward", "UnprovisioningCurrent", + "CompletedRollforward", "RollingBack", "UnprovisioningTarget", "CompletedRollback", "Failed". + :vartype upgrade_state: str or ~azure.servicefabric.models.ApplicationResourceUpgradeState + :ivar percent_completed: The estimated percent of replicas are completed in the upgrade. + :vartype percent_completed: str + :ivar service_upgrade_progress: List of service upgrade progresses. + :vartype service_upgrade_progress: list[~azure.servicefabric.models.ServiceUpgradeProgress] + :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored". Default value: "Monitored". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.RollingUpgradeMode + :ivar upgrade_duration: The estimated amount of time that the overall upgrade elapsed. It is + first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :vartype upgrade_duration: str + :ivar application_upgrade_status_details: Additional detailed information about the status of + the pending upgrade. + :vartype application_upgrade_status_details: str + :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :vartype upgrade_replica_set_check_timeout_in_seconds: long + :ivar failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and + FailureAction was executed. + :vartype failure_timestamp_utc: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'percent_completed': {'key': 'PercentCompleted', 'type': 'str'}, + 'service_upgrade_progress': {'key': 'ServiceUpgradeProgress', 'type': '[ServiceUpgradeProgress]'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Name of the Application resource. + :paramtype name: str + :keyword target_application_type_version: The target application version for the application + upgrade. + :paramtype target_application_type_version: str + :keyword start_timestamp_utc: The estimated UTC datetime when the upgrade started. + :paramtype start_timestamp_utc: str + :keyword upgrade_state: The state of the application resource upgrade. Possible values include: + "Invalid", "ProvisioningTarget", "RollingForward", "UnprovisioningCurrent", + "CompletedRollforward", "RollingBack", "UnprovisioningTarget", "CompletedRollback", "Failed". + :paramtype upgrade_state: str or ~azure.servicefabric.models.ApplicationResourceUpgradeState + :keyword percent_completed: The estimated percent of replicas are completed in the upgrade. + :paramtype percent_completed: str + :keyword service_upgrade_progress: List of service upgrade progresses. + :paramtype service_upgrade_progress: list[~azure.servicefabric.models.ServiceUpgradeProgress] + :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored". Default value: "Monitored". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.RollingUpgradeMode + :keyword upgrade_duration: The estimated amount of time that the overall upgrade elapsed. It is + first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :paramtype upgrade_duration: str + :keyword application_upgrade_status_details: Additional detailed information about the status + of the pending upgrade. + :paramtype application_upgrade_status_details: str + :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :paramtype upgrade_replica_set_check_timeout_in_seconds: long + :keyword failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and + FailureAction was executed. + :paramtype failure_timestamp_utc: str + """ + super(ApplicationResourceUpgradeProgressInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.target_application_type_version = kwargs.get('target_application_type_version', None) + self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.percent_completed = kwargs.get('percent_completed', None) + self.service_upgrade_progress = kwargs.get('service_upgrade_progress', None) + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "Monitored") + self.upgrade_duration = kwargs.get('upgrade_duration', "PT0H2M0S") + self.application_upgrade_status_details = kwargs.get('application_upgrade_status_details', None) + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925) + self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) + + +class VolumeReference(msrest.serialization.Model): + """Describes a reference to a volume resource. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of the volume being referenced. + :vartype name: str + :ivar read_only: The flag indicating whether the volume is read only. Default is 'false'. + :vartype read_only: bool + :ivar destination_path: Required. The path within the container at which the volume should be + mounted. Only valid path characters are allowed. + :vartype 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 + ): + """ + :keyword name: Required. Name of the volume being referenced. + :paramtype name: str + :keyword read_only: The flag indicating whether the volume is read only. Default is 'false'. + :paramtype read_only: bool + :keyword destination_path: Required. The path within the container at which the volume should + be mounted. Only valid path characters are allowed. + :paramtype destination_path: str + """ + super(VolumeReference, self).__init__(**kwargs) + self.name = kwargs['name'] + self.read_only = kwargs.get('read_only', None) + self.destination_path = kwargs['destination_path'] + + +class ApplicationScopedVolume(VolumeReference): + """Describes a volume whose lifetime is scoped to the application's lifetime. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of the volume being referenced. + :vartype name: str + :ivar read_only: The flag indicating whether the volume is read only. Default is 'false'. + :vartype read_only: bool + :ivar destination_path: Required. The path within the container at which the volume should be + mounted. Only valid path characters are allowed. + :vartype destination_path: str + :ivar creation_parameters: Required. Describes parameters for creating application-scoped + volumes. + :vartype creation_parameters: + ~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters + """ + + _validation = { + 'name': {'required': True}, + 'destination_path': {'required': True}, + 'creation_parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'destination_path': {'key': 'destinationPath', 'type': 'str'}, + 'creation_parameters': {'key': 'creationParameters', 'type': 'ApplicationScopedVolumeCreationParameters'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. Name of the volume being referenced. + :paramtype name: str + :keyword read_only: The flag indicating whether the volume is read only. Default is 'false'. + :paramtype read_only: bool + :keyword destination_path: Required. The path within the container at which the volume should + be mounted. Only valid path characters are allowed. + :paramtype destination_path: str + :keyword creation_parameters: Required. Describes parameters for creating application-scoped + volumes. + :paramtype creation_parameters: + ~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters + """ + super(ApplicationScopedVolume, self).__init__(**kwargs) + self.creation_parameters = kwargs['creation_parameters'] + + +class ApplicationScopedVolumeCreationParameters(msrest.serialization.Model): + """Describes parameters for creating application-scoped volumes. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Specifies the application-scoped volume kind.Constant filled by server. + Possible values include: "ServiceFabricVolumeDisk". + :vartype kind: str or ~azure.servicefabric.models.ApplicationScopedVolumeKind + :ivar description: User readable description of the volume. + :vartype description: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ServiceFabricVolumeDisk': 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: User readable description of the volume. + :paramtype description: str + """ + super(ApplicationScopedVolumeCreationParameters, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.description = kwargs.get('description', None) + + +class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk(ApplicationScopedVolumeCreationParameters): + """Describes parameters for creating application-scoped volumes provided by Service Fabric Volume Disks. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Specifies the application-scoped volume kind.Constant filled by server. + Possible values include: "ServiceFabricVolumeDisk". + :vartype kind: str or ~azure.servicefabric.models.ApplicationScopedVolumeKind + :ivar description: User readable description of the volume. + :vartype description: str + :ivar size_disk: Required. Volume size. Possible values include: "Small", "Medium", "Large". + :vartype size_disk: str or ~azure.servicefabric.models.SizeTypes + """ + + _validation = { + 'kind': {'required': True}, + 'size_disk': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'size_disk': {'key': 'sizeDisk', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: User readable description of the volume. + :paramtype description: str + :keyword size_disk: Required. Volume size. Possible values include: "Small", "Medium", "Large". + :paramtype size_disk: str or ~azure.servicefabric.models.SizeTypes + """ + super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__(**kwargs) + self.kind = 'ServiceFabricVolumeDisk' # type: str + self.size_disk = kwargs['size_disk'] + + +class ApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for applications, containing health evaluations for each unhealthy application that impacted current aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar max_percent_unhealthy_applications: Maximum allowed percentage of unhealthy applications + from the ClusterHealthPolicy. + :vartype max_percent_unhealthy_applications: int + :ivar total_count: Total number of applications from the health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy ApplicationHealthEvaluation that impacted the aggregated + health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword max_percent_unhealthy_applications: Maximum allowed percentage of unhealthy + applications from the ClusterHealthPolicy. + :paramtype max_percent_unhealthy_applications: int + :keyword total_count: Total number of applications from the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy ApplicationHealthEvaluation that impacted the aggregated + health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(ApplicationsHealthEvaluation, self).__init__(**kwargs) + self.kind = 'Applications' # type: str + self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for applications of a particular application type. The application type applications evaluation can be returned when cluster health evaluation returns unhealthy aggregated health state, either Error or Warning. It contains health evaluations for each unhealthy application of the included application type that impacted current aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar application_type_name: The application type name as defined in the application manifest. + :vartype application_type_name: str + :ivar max_percent_unhealthy_applications: Maximum allowed percentage of unhealthy applications + for the application type, specified as an entry in ApplicationTypeHealthPolicyMap. + :vartype max_percent_unhealthy_applications: int + :ivar total_count: Total number of applications of the application type found in the health + store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy ApplicationHealthEvaluation of this application type that + impacted the aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword application_type_name: The application type name as defined in the application + manifest. + :paramtype application_type_name: str + :keyword max_percent_unhealthy_applications: Maximum allowed percentage of unhealthy + applications for the application type, specified as an entry in ApplicationTypeHealthPolicyMap. + :paramtype max_percent_unhealthy_applications: int + :keyword total_count: Total number of applications of the application type found in the health + store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy ApplicationHealthEvaluation of this application type that + impacted the aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(ApplicationTypeApplicationsHealthEvaluation, self).__init__(**kwargs) + self.kind = 'ApplicationTypeApplications' # type: str + self.application_type_name = kwargs.get('application_type_name', None) + self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class ApplicationTypeHealthPolicyMapItem(msrest.serialization.Model): + """Defines an item in ApplicationTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :ivar key: Required. The key of the application type health policy map item. This is the name + of the application type. + :vartype key: str + :ivar value: Required. The value of the application type health policy map item. + The max percent unhealthy applications allowed for the application type. Must be between zero + and 100. + :vartype value: int + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword key: Required. The key of the application type health policy map item. This is the + name of the application type. + :paramtype key: str + :keyword value: Required. The value of the application type health policy map item. + The max percent unhealthy applications allowed for the application type. Must be between zero + and 100. + :paramtype value: int + """ + super(ApplicationTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = kwargs['key'] + self.value = kwargs['value'] + + +class ApplicationTypeImageStorePath(msrest.serialization.Model): + """Path description for the application package in the image store specified during the prior copy operation. + + All required parameters must be populated in order to send to Azure. + + :ivar application_type_build_path: Required. The relative image store path to the application + package. + :vartype application_type_build_path: str + """ + + _validation = { + 'application_type_build_path': {'required': True}, + } + + _attribute_map = { + 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword application_type_build_path: Required. The relative image store path to the + application package. + :paramtype application_type_build_path: str + """ + super(ApplicationTypeImageStorePath, self).__init__(**kwargs) + self.application_type_build_path = kwargs['application_type_build_path'] + + +class ApplicationTypeInfo(msrest.serialization.Model): + """Information about an application type. + + :ivar name: The application type name as defined in the application manifest. + :vartype name: str + :ivar version: The version of the application type as defined in the application manifest. + :vartype version: str + :ivar default_parameter_list: List of application type parameters that can be overridden when + creating or updating the application. + :vartype default_parameter_list: list[~azure.servicefabric.models.ApplicationParameter] + :ivar status: The status of the application type. Possible values include: "Invalid", + "Provisioning", "Available", "Unprovisioning", "Failed". + :vartype status: str or ~azure.servicefabric.models.ApplicationTypeStatus + :ivar status_details: Additional detailed information about the status of the application type. + :vartype status_details: str + :ivar application_type_definition_kind: The mechanism used to define a Service Fabric + application type. Possible values include: "Invalid", "ServiceFabricApplicationPackage", + "Compose". + :vartype application_type_definition_kind: str or + ~azure.servicefabric.models.ApplicationTypeDefinitionKind + :ivar application_type_metadata: Metadata associated with a specific application type. + :vartype application_type_metadata: ~azure.servicefabric.models.ApplicationTypeMetadata + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'default_parameter_list': {'key': 'DefaultParameterList', 'type': '[ApplicationParameter]'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + 'application_type_definition_kind': {'key': 'ApplicationTypeDefinitionKind', 'type': 'str'}, + 'application_type_metadata': {'key': 'ApplicationTypeMetadata', 'type': 'ApplicationTypeMetadata'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: The application type name as defined in the application manifest. + :paramtype name: str + :keyword version: The version of the application type as defined in the application manifest. + :paramtype version: str + :keyword default_parameter_list: List of application type parameters that can be overridden + when creating or updating the application. + :paramtype default_parameter_list: list[~azure.servicefabric.models.ApplicationParameter] + :keyword status: The status of the application type. Possible values include: "Invalid", + "Provisioning", "Available", "Unprovisioning", "Failed". + :paramtype status: str or ~azure.servicefabric.models.ApplicationTypeStatus + :keyword status_details: Additional detailed information about the status of the application + type. + :paramtype status_details: str + :keyword application_type_definition_kind: The mechanism used to define a Service Fabric + application type. Possible values include: "Invalid", "ServiceFabricApplicationPackage", + "Compose". + :paramtype application_type_definition_kind: str or + ~azure.servicefabric.models.ApplicationTypeDefinitionKind + :keyword application_type_metadata: Metadata associated with a specific application type. + :paramtype application_type_metadata: ~azure.servicefabric.models.ApplicationTypeMetadata + """ + super(ApplicationTypeInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + self.default_parameter_list = kwargs.get('default_parameter_list', None) + self.status = kwargs.get('status', None) + self.status_details = kwargs.get('status_details', None) + self.application_type_definition_kind = kwargs.get('application_type_definition_kind', None) + self.application_type_metadata = kwargs.get('application_type_metadata', None) + + +class ApplicationTypeManifest(msrest.serialization.Model): + """Contains the manifest describing an application type registered in a Service Fabric cluster. + + :ivar manifest: The XML manifest as a string. + :vartype manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword manifest: The XML manifest as a string. + :paramtype manifest: str + """ + super(ApplicationTypeManifest, self).__init__(**kwargs) + self.manifest = kwargs.get('manifest', None) + + +class ApplicationTypeMetadata(msrest.serialization.Model): + """Metadata associated with a specific application type. + + :ivar application_type_provision_timestamp: The timestamp when the application type was + provisioned. + :vartype application_type_provision_timestamp: str + :ivar arm_metadata: Common ArmMetadata assocaited with Service Fabric Entities. + :vartype arm_metadata: ~azure.servicefabric.models.ArmMetadata + """ + + _attribute_map = { + 'application_type_provision_timestamp': {'key': 'ApplicationTypeProvisionTimestamp', 'type': 'str'}, + 'arm_metadata': {'key': 'ArmMetadata', 'type': 'ArmMetadata'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword application_type_provision_timestamp: The timestamp when the application type was + provisioned. + :paramtype application_type_provision_timestamp: str + :keyword arm_metadata: Common ArmMetadata assocaited with Service Fabric Entities. + :paramtype arm_metadata: ~azure.servicefabric.models.ArmMetadata + """ + super(ApplicationTypeMetadata, self).__init__(**kwargs) + self.application_type_provision_timestamp = kwargs.get('application_type_provision_timestamp', None) + self.arm_metadata = kwargs.get('arm_metadata', None) + + +class ApplicationUpdateDescription(msrest.serialization.Model): + """Describes the parameters for updating an application instance. + + :ivar flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + If flags are not specified for a certain property, the property will not be updated even if + the new value is provided. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + Exception is RemoveApplicationCapacity which cannot be specified along with other parameters. + For example, if the provided value is 3 then the flags for MinimumNodes (1) and MaximumNodes + (2) are set. + + + * None - Does not indicate any other properties are set. The value is 0. + * MinimumNodes - Indicates whether the MinimumNodes property is set. The value is 1. + * MaximumNodes - Indicates whether the MinimumNodes property is set. The value is 2. + * ApplicationMetrics - Indicates whether the ApplicationMetrics property is set. The value is + 4. + :vartype flags: str + :ivar remove_application_capacity: Used to clear all parameters related to Application Capacity + for this application. | + It is not possible to specify this parameter together with other Application Capacity + parameters. + :vartype remove_application_capacity: bool + :ivar minimum_nodes: The minimum number of nodes where Service Fabric will reserve capacity for + this application. Note that this does not mean that the services of this application will be + placed on all of those nodes. If this property is set to zero, no capacity will be reserved. + The value of this property cannot be more than the value of the MaximumNodes property. + :vartype minimum_nodes: long + :ivar maximum_nodes: The maximum number of nodes where Service Fabric will reserve capacity for + this application. Note that this does not mean that the services of this application will be + placed on all of those nodes. By default, the value of this property is zero and it means that + the services can be placed on any node. + :vartype maximum_nodes: long + :ivar application_metrics: List of application capacity metric description. + :vartype application_metrics: list[~azure.servicefabric.models.ApplicationMetricDescription] + """ + + _validation = { + 'minimum_nodes': {'minimum': 0}, + 'maximum_nodes': {'minimum': 0}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'remove_application_capacity': {'key': 'RemoveApplicationCapacity', 'type': 'bool'}, + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + If flags are not specified for a certain property, the property will not be updated even if + the new value is provided. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + Exception is RemoveApplicationCapacity which cannot be specified along with other parameters. + For example, if the provided value is 3 then the flags for MinimumNodes (1) and MaximumNodes + (2) are set. + + + * None - Does not indicate any other properties are set. The value is 0. + * MinimumNodes - Indicates whether the MinimumNodes property is set. The value is 1. + * MaximumNodes - Indicates whether the MinimumNodes property is set. The value is 2. + * ApplicationMetrics - Indicates whether the ApplicationMetrics property is set. The value is + 4. + :paramtype flags: str + :keyword remove_application_capacity: Used to clear all parameters related to Application + Capacity for this application. | + It is not possible to specify this parameter together with other Application Capacity + parameters. + :paramtype remove_application_capacity: bool + :keyword minimum_nodes: The minimum number of nodes where Service Fabric will reserve capacity + for this application. Note that this does not mean that the services of this application will + be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. + The value of this property cannot be more than the value of the MaximumNodes property. + :paramtype minimum_nodes: long + :keyword maximum_nodes: The maximum number of nodes where Service Fabric will reserve capacity + for this application. Note that this does not mean that the services of this application will + be placed on all of those nodes. By default, the value of this property is zero and it means + that the services can be placed on any node. + :paramtype maximum_nodes: long + :keyword application_metrics: List of application capacity metric description. + :paramtype application_metrics: list[~azure.servicefabric.models.ApplicationMetricDescription] + """ + super(ApplicationUpdateDescription, self).__init__(**kwargs) + self.flags = kwargs.get('flags', None) + self.remove_application_capacity = kwargs.get('remove_application_capacity', False) + self.minimum_nodes = kwargs.get('minimum_nodes', None) + self.maximum_nodes = kwargs.get('maximum_nodes', 0) + self.application_metrics = kwargs.get('application_metrics', None) + + +class ApplicationUpgradeCompletedEvent(ApplicationEvent): + """Application Upgrade Completed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar application_type_version: Required. Application type version. + :vartype application_type_version: str + :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. + :vartype overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword application_type_version: Required. Application type version. + :paramtype application_type_version: str + :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. + :paramtype overall_upgrade_elapsed_time_in_ms: float + """ + super(ApplicationUpgradeCompletedEvent, self).__init__(**kwargs) + self.kind = 'ApplicationUpgradeCompleted' # type: str + self.application_type_name = kwargs['application_type_name'] + self.application_type_version = kwargs['application_type_version'] + self.overall_upgrade_elapsed_time_in_ms = kwargs['overall_upgrade_elapsed_time_in_ms'] + + +class ApplicationUpgradeDescription(msrest.serialization.Model): + """Describes the parameters for an application upgrade. Note that upgrade description replaces the existing application description. This means that if the parameters are not specified, the existing parameters on the applications will be overwritten with the empty parameters list. This would result in the application using the default value of the parameters from the application manifest. If you do not want to change any existing parameter values, please get the application parameters first using the GetApplicationInfo query and then supply those values as Parameters in this ApplicationUpgradeDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the target application, including the 'fabric:' URI scheme. + :vartype name: str + :ivar target_application_type_version: Required. The target application type version (found in + the application manifest) for the application upgrade. + :vartype target_application_type_version: str + :ivar parameters: List of application parameters with overridden values from their default + values specified in the application manifest. + :vartype parameters: list[~azure.servicefabric.models.ApplicationParameter] + :ivar upgrade_kind: Required. The kind of upgrade out of the following possible values. + Possible values include: "Invalid", "Rolling". Default value: "Rolling". + :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :vartype upgrade_replica_set_check_timeout_in_seconds: long + :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when + the code version has not changed (the upgrade only changes configuration or data). + :vartype force_restart: bool + :ivar sort_order: Defines the order in which an upgrade proceeds through the cluster. Possible + values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + :vartype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. + :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :ivar application_health_policy: Defines a health policy used to evaluate the health of an + application or one of its children entities. + :vartype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :ivar instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster + upgrade, only for those instances which have a non-zero delay duration configured in the + service description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates + that the behavior will entirely depend on the delay configured in the stateless service + description. + :vartype instance_close_delay_duration_in_seconds: long + :ivar managed_application_identity: Managed application identity description. + :vartype managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + + _validation = { + 'name': {'required': True}, + 'target_application_type_version': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. The name of the target application, including the 'fabric:' URI + scheme. + :paramtype name: str + :keyword target_application_type_version: Required. The target application type version (found + in the application manifest) for the application upgrade. + :paramtype target_application_type_version: str + :keyword parameters: List of application parameters with overridden values from their default + values specified in the application manifest. + :paramtype parameters: list[~azure.servicefabric.models.ApplicationParameter] + :keyword upgrade_kind: Required. The kind of upgrade out of the following possible values. + Possible values include: "Invalid", "Rolling". Default value: "Rolling". + :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :paramtype upgrade_replica_set_check_timeout_in_seconds: long + :keyword force_restart: If true, then processes are forcefully restarted during upgrade even + when the code version has not changed (the upgrade only changes configuration or data). + :paramtype force_restart: bool + :keyword sort_order: Defines the order in which an upgrade proceeds through the cluster. + Possible values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + :paramtype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored + mode. + :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :keyword application_health_policy: Defines a health policy used to evaluate the health of an + application or one of its children entities. + :paramtype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a + stateless instance is closed, to allow the active requests to drain gracefully. This would be + effective when the instance is closing during the application/cluster + upgrade, only for those instances which have a non-zero delay duration configured in the + service description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates + that the behavior will entirely depend on the delay configured in the stateless service + description. + :paramtype instance_close_delay_duration_in_seconds: long + :keyword managed_application_identity: Managed application identity description. + :paramtype managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + super(ApplicationUpgradeDescription, self).__init__(**kwargs) + self.name = kwargs['name'] + self.target_application_type_version = kwargs['target_application_type_version'] + self.parameters = kwargs.get('parameters', None) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925) + self.force_restart = kwargs.get('force_restart', False) + self.sort_order = kwargs.get('sort_order', "Default") + self.monitoring_policy = kwargs.get('monitoring_policy', None) + self.application_health_policy = kwargs.get('application_health_policy', None) + self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', 4294967295) + self.managed_application_identity = kwargs.get('managed_application_identity', None) + + +class ApplicationUpgradeDomainCompletedEvent(ApplicationEvent): + """Application Upgrade Domain Completed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar current_application_type_version: Required. Current Application type version. + :vartype current_application_type_version: str + :ivar application_type_version: Required. Target Application type version. + :vartype application_type_version: str + :ivar upgrade_state: Required. State of upgrade. + :vartype upgrade_state: str + :ivar upgrade_domains: Required. Upgrade domains. + :vartype upgrade_domains: str + :ivar upgrade_domain_elapsed_time_in_ms: Required. Upgrade time of domain in milli-seconds. + :vartype upgrade_domain_elapsed_time_in_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'upgrade_state': {'required': True}, + 'upgrade_domains': {'required': True}, + 'upgrade_domain_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, + 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword current_application_type_version: Required. Current Application type version. + :paramtype current_application_type_version: str + :keyword application_type_version: Required. Target Application type version. + :paramtype application_type_version: str + :keyword upgrade_state: Required. State of upgrade. + :paramtype upgrade_state: str + :keyword upgrade_domains: Required. Upgrade domains. + :paramtype upgrade_domains: str + :keyword upgrade_domain_elapsed_time_in_ms: Required. Upgrade time of domain in milli-seconds. + :paramtype upgrade_domain_elapsed_time_in_ms: float + """ + super(ApplicationUpgradeDomainCompletedEvent, self).__init__(**kwargs) + self.kind = 'ApplicationUpgradeDomainCompleted' # type: str + self.application_type_name = kwargs['application_type_name'] + self.current_application_type_version = kwargs['current_application_type_version'] + self.application_type_version = kwargs['application_type_version'] + self.upgrade_state = kwargs['upgrade_state'] + self.upgrade_domains = kwargs['upgrade_domains'] + self.upgrade_domain_elapsed_time_in_ms = kwargs['upgrade_domain_elapsed_time_in_ms'] + + +class ApplicationUpgradeProgressInfo(msrest.serialization.Model): + """Describes the parameters for an application upgrade. + + :ivar name: The name of the target application, including the 'fabric:' URI scheme. + :vartype name: str + :ivar type_name: The application type name as defined in the application manifest. + :vartype type_name: str + :ivar target_application_type_version: The target application type version (found in the + application manifest) for the application upgrade. + :vartype target_application_type_version: str + :ivar upgrade_domains: List of upgrade domains and their statuses. Not applicable to + node-by-node upgrades. + :vartype upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] + :ivar upgrade_units: List of upgrade units and their statuses. + :vartype upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] + :ivar upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", + "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", + "RollingForwardInProgress", "RollingForwardCompleted", "Failed". + :vartype upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :ivar next_upgrade_domain: The name of the next upgrade domain to be processed. Not applicable + to node-by-node upgrades. + :vartype next_upgrade_domain: str + :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :ivar upgrade_description: Describes the parameters for an application upgrade. Note that + upgrade description replaces the existing application description. This means that if the + parameters are not specified, the existing parameters on the applications will be overwritten + with the empty parameters list. This would result in the application using the default value of + the parameters from the application manifest. If you do not want to change any existing + parameter values, please get the application parameters first using the GetApplicationInfo + query and then supply those values as Parameters in this ApplicationUpgradeDescription. + :vartype upgrade_description: ~azure.servicefabric.models.ApplicationUpgradeDescription + :ivar upgrade_duration_in_milliseconds: The estimated total amount of time spent processing the + overall upgrade. + :vartype upgrade_duration_in_milliseconds: str + :ivar upgrade_domain_duration_in_milliseconds: The estimated total amount of time spent + processing the current upgrade domain. + :vartype upgrade_domain_duration_in_milliseconds: str + :ivar unhealthy_evaluations: List of health evaluations that resulted in the current aggregated + health state. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar current_upgrade_domain_progress: Information about the current in-progress upgrade + domain. Not applicable to node-by-node upgrades. + :vartype current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :ivar current_upgrade_units_progress: Information about the current in-progress upgrade units. + :vartype current_upgrade_units_progress: + ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo + :ivar start_timestamp_utc: The estimated UTC datetime when the upgrade started. + :vartype start_timestamp_utc: str + :ivar failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and + FailureAction was executed. + :vartype failure_timestamp_utc: str + :ivar failure_reason: The cause of an upgrade failure that resulted in FailureAction being + executed. Possible values include: "None", "Interrupted", "HealthCheck", + "UpgradeDomainTimeout", "OverallUpgradeTimeout". + :vartype failure_reason: str or ~azure.servicefabric.models.FailureReason + :ivar upgrade_domain_progress_at_failure: Information about the upgrade domain progress at the + time of upgrade failure. + :vartype upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo + :ivar upgrade_status_details: Additional detailed information about the status of the pending + upgrade. + :vartype upgrade_status_details: str + :ivar is_node_by_node: Indicates whether this upgrade is node-by-node. + :vartype is_node_by_node: bool + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, + 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ApplicationUpgradeDescription'}, + 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, + 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, + 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, + 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: The name of the target application, including the 'fabric:' URI scheme. + :paramtype name: str + :keyword type_name: The application type name as defined in the application manifest. + :paramtype type_name: str + :keyword target_application_type_version: The target application type version (found in the + application manifest) for the application upgrade. + :paramtype target_application_type_version: str + :keyword upgrade_domains: List of upgrade domains and their statuses. Not applicable to + node-by-node upgrades. + :paramtype upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] + :keyword upgrade_units: List of upgrade units and their statuses. + :paramtype upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] + :keyword upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", + "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", + "RollingForwardInProgress", "RollingForwardCompleted", "Failed". + :paramtype upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :keyword next_upgrade_domain: The name of the next upgrade domain to be processed. Not + applicable to node-by-node upgrades. + :paramtype next_upgrade_domain: str + :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :keyword upgrade_description: Describes the parameters for an application upgrade. Note that + upgrade description replaces the existing application description. This means that if the + parameters are not specified, the existing parameters on the applications will be overwritten + with the empty parameters list. This would result in the application using the default value of + the parameters from the application manifest. If you do not want to change any existing + parameter values, please get the application parameters first using the GetApplicationInfo + query and then supply those values as Parameters in this ApplicationUpgradeDescription. + :paramtype upgrade_description: ~azure.servicefabric.models.ApplicationUpgradeDescription + :keyword upgrade_duration_in_milliseconds: The estimated total amount of time spent processing + the overall upgrade. + :paramtype upgrade_duration_in_milliseconds: str + :keyword upgrade_domain_duration_in_milliseconds: The estimated total amount of time spent + processing the current upgrade domain. + :paramtype upgrade_domain_duration_in_milliseconds: str + :keyword unhealthy_evaluations: List of health evaluations that resulted in the current + aggregated health state. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword current_upgrade_domain_progress: Information about the current in-progress upgrade + domain. Not applicable to node-by-node upgrades. + :paramtype current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :keyword current_upgrade_units_progress: Information about the current in-progress upgrade + units. + :paramtype current_upgrade_units_progress: + ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo + :keyword start_timestamp_utc: The estimated UTC datetime when the upgrade started. + :paramtype start_timestamp_utc: str + :keyword failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and + FailureAction was executed. + :paramtype failure_timestamp_utc: str + :keyword failure_reason: The cause of an upgrade failure that resulted in FailureAction being + executed. Possible values include: "None", "Interrupted", "HealthCheck", + "UpgradeDomainTimeout", "OverallUpgradeTimeout". + :paramtype failure_reason: str or ~azure.servicefabric.models.FailureReason + :keyword upgrade_domain_progress_at_failure: Information about the upgrade domain progress at + the time of upgrade failure. + :paramtype upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo + :keyword upgrade_status_details: Additional detailed information about the status of the + pending upgrade. + :paramtype upgrade_status_details: str + :keyword is_node_by_node: Indicates whether this upgrade is node-by-node. + :paramtype is_node_by_node: bool + """ + super(ApplicationUpgradeProgressInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type_name = kwargs.get('type_name', None) + self.target_application_type_version = kwargs.get('target_application_type_version', None) + self.upgrade_domains = kwargs.get('upgrade_domains', None) + self.upgrade_units = kwargs.get('upgrade_units', None) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.next_upgrade_domain = kwargs.get('next_upgrade_domain', None) + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_description = kwargs.get('upgrade_description', None) + self.upgrade_duration_in_milliseconds = kwargs.get('upgrade_duration_in_milliseconds', None) + self.upgrade_domain_duration_in_milliseconds = kwargs.get('upgrade_domain_duration_in_milliseconds', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) + self.current_upgrade_units_progress = kwargs.get('current_upgrade_units_progress', None) + self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) + self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) + self.upgrade_status_details = kwargs.get('upgrade_status_details', None) + self.is_node_by_node = kwargs.get('is_node_by_node', False) + + +class ApplicationUpgradeRollbackCompletedEvent(ApplicationEvent): + """Application Upgrade Rollback Completed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar application_type_version: Required. Application type version. + :vartype application_type_version: str + :ivar failure_reason: Required. Describes reason of failure. + :vartype failure_reason: str + :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. + :vartype overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword application_type_version: Required. Application type version. + :paramtype application_type_version: str + :keyword failure_reason: Required. Describes reason of failure. + :paramtype failure_reason: str + :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. + :paramtype overall_upgrade_elapsed_time_in_ms: float + """ + super(ApplicationUpgradeRollbackCompletedEvent, self).__init__(**kwargs) + self.kind = 'ApplicationUpgradeRollbackCompleted' # type: str + self.application_type_name = kwargs['application_type_name'] + self.application_type_version = kwargs['application_type_version'] + self.failure_reason = kwargs['failure_reason'] + self.overall_upgrade_elapsed_time_in_ms = kwargs['overall_upgrade_elapsed_time_in_ms'] + + +class ApplicationUpgradeRollbackStartedEvent(ApplicationEvent): + """Application Upgrade Rollback Started event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar current_application_type_version: Required. Current Application type version. + :vartype current_application_type_version: str + :ivar application_type_version: Required. Target Application type version. + :vartype application_type_version: str + :ivar failure_reason: Required. Describes reason of failure. + :vartype failure_reason: str + :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. + :vartype overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword current_application_type_version: Required. Current Application type version. + :paramtype current_application_type_version: str + :keyword application_type_version: Required. Target Application type version. + :paramtype application_type_version: str + :keyword failure_reason: Required. Describes reason of failure. + :paramtype failure_reason: str + :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. + :paramtype overall_upgrade_elapsed_time_in_ms: float + """ + super(ApplicationUpgradeRollbackStartedEvent, self).__init__(**kwargs) + self.kind = 'ApplicationUpgradeRollbackStarted' # type: str + self.application_type_name = kwargs['application_type_name'] + self.current_application_type_version = kwargs['current_application_type_version'] + self.application_type_version = kwargs['application_type_version'] + self.failure_reason = kwargs['failure_reason'] + self.overall_upgrade_elapsed_time_in_ms = kwargs['overall_upgrade_elapsed_time_in_ms'] + + +class ApplicationUpgradeStartedEvent(ApplicationEvent): + """Application Upgrade Started event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar current_application_type_version: Required. Current Application type version. + :vartype current_application_type_version: str + :ivar application_type_version: Required. Target Application type version. + :vartype application_type_version: str + :ivar upgrade_type: Required. Type of upgrade. + :vartype upgrade_type: str + :ivar rolling_upgrade_mode: Required. Mode of upgrade. + :vartype rolling_upgrade_mode: str + :ivar failure_action: Required. Action if failed. + :vartype failure_action: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'upgrade_type': {'required': True}, + 'rolling_upgrade_mode': {'required': True}, + 'failure_action': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword current_application_type_version: Required. Current Application type version. + :paramtype current_application_type_version: str + :keyword application_type_version: Required. Target Application type version. + :paramtype application_type_version: str + :keyword upgrade_type: Required. Type of upgrade. + :paramtype upgrade_type: str + :keyword rolling_upgrade_mode: Required. Mode of upgrade. + :paramtype rolling_upgrade_mode: str + :keyword failure_action: Required. Action if failed. + :paramtype failure_action: str + """ + super(ApplicationUpgradeStartedEvent, self).__init__(**kwargs) + self.kind = 'ApplicationUpgradeStarted' # type: str + self.application_type_name = kwargs['application_type_name'] + self.current_application_type_version = kwargs['current_application_type_version'] + self.application_type_version = kwargs['application_type_version'] + self.upgrade_type = kwargs['upgrade_type'] + self.rolling_upgrade_mode = kwargs['rolling_upgrade_mode'] + self.failure_action = kwargs['failure_action'] + + +class ApplicationUpgradeUpdateDescription(msrest.serialization.Model): + """Describes the parameters for updating an ongoing application upgrade. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the application, including the 'fabric:' URI scheme. + :vartype name: str + :ivar upgrade_kind: Required. The kind of upgrade out of the following possible values. + Possible values include: "Invalid", "Rolling". Default value: "Rolling". + :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :ivar application_health_policy: Defines a health policy used to evaluate the health of an + application or one of its children entities. + :vartype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :ivar update_description: Describes the parameters for updating a rolling upgrade of + application or cluster. + :vartype update_description: ~azure.servicefabric.models.RollingUpgradeUpdateDescription + """ + + _validation = { + 'name': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. The name of the application, including the 'fabric:' URI scheme. + :paramtype name: str + :keyword upgrade_kind: Required. The kind of upgrade out of the following possible values. + Possible values include: "Invalid", "Rolling". Default value: "Rolling". + :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :keyword application_health_policy: Defines a health policy used to evaluate the health of an + application or one of its children entities. + :paramtype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword update_description: Describes the parameters for updating a rolling upgrade of + application or cluster. + :paramtype update_description: ~azure.servicefabric.models.RollingUpgradeUpdateDescription + """ + super(ApplicationUpgradeUpdateDescription, self).__init__(**kwargs) + self.name = kwargs['name'] + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.application_health_policy = kwargs.get('application_health_policy', None) + self.update_description = kwargs.get('update_description', None) + + +class ArmMetadata(msrest.serialization.Model): + """Common ArmMetadata assocaited with Service Fabric Entities. + + :ivar arm_resource_id: A string containing the ArmResourceId. + :vartype arm_resource_id: str + """ + + _attribute_map = { + 'arm_resource_id': {'key': 'ArmResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword arm_resource_id: A string containing the ArmResourceId. + :paramtype arm_resource_id: str + """ + super(ArmMetadata, self).__init__(**kwargs) + self.arm_resource_id = kwargs.get('arm_resource_id', None) + + +class AutoScalingMetric(msrest.serialization.Model): + """Describes the metric that is used for triggering auto scaling operation. Derived classes will describe resources or metrics. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AutoScalingResourceMetric. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of auto scaling metric.Constant filled by server. Possible + values include: "Resource". + :vartype kind: str or ~azure.servicefabric.models.AutoScalingMetricKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Resource': 'AutoScalingResourceMetric'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AutoScalingMetric, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class AutoScalingPolicy(msrest.serialization.Model): + """Describes the auto scaling policy. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the auto scaling policy. + :vartype name: str + :ivar trigger: Required. Determines when auto scaling operation will be invoked. + :vartype trigger: ~azure.servicefabric.models.AutoScalingTrigger + :ivar mechanism: Required. The mechanism that is used to scale when auto scaling operation is + invoked. + :vartype mechanism: ~azure.servicefabric.models.AutoScalingMechanism + """ + + _validation = { + 'name': {'required': True}, + 'trigger': {'required': True}, + 'mechanism': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'trigger': {'key': 'trigger', 'type': 'AutoScalingTrigger'}, + 'mechanism': {'key': 'mechanism', 'type': 'AutoScalingMechanism'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. The name of the auto scaling policy. + :paramtype name: str + :keyword trigger: Required. Determines when auto scaling operation will be invoked. + :paramtype trigger: ~azure.servicefabric.models.AutoScalingTrigger + :keyword mechanism: Required. The mechanism that is used to scale when auto scaling operation + is invoked. + :paramtype mechanism: ~azure.servicefabric.models.AutoScalingMechanism + """ + super(AutoScalingPolicy, self).__init__(**kwargs) + self.name = kwargs['name'] + self.trigger = kwargs['trigger'] + self.mechanism = kwargs['mechanism'] + + +class AutoScalingResourceMetric(AutoScalingMetric): + """Describes the resource that is used for triggering auto scaling. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of auto scaling metric.Constant filled by server. Possible + values include: "Resource". + :vartype kind: str or ~azure.servicefabric.models.AutoScalingMetricKind + :ivar name: Required. Name of the resource. Possible values include: "cpu", "memoryInGB". + :vartype name: str or ~azure.servicefabric.models.AutoScalingResourceMetricName + """ + + _validation = { + 'kind': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. Name of the resource. Possible values include: "cpu", "memoryInGB". + :paramtype name: str or ~azure.servicefabric.models.AutoScalingResourceMetricName + """ + super(AutoScalingResourceMetric, self).__init__(**kwargs) + self.kind = 'Resource' # type: str + self.name = kwargs['name'] + + +class AutoScalingTrigger(msrest.serialization.Model): + """Describes the trigger for performing auto scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AverageLoadScalingTrigger. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of auto scaling trigger.Constant filled by server. Possible + values include: "AverageLoad". + :vartype kind: str or ~azure.servicefabric.models.AutoScalingTriggerKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AverageLoad': 'AverageLoadScalingTrigger'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AutoScalingTrigger, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class AverageLoadScalingTrigger(AutoScalingTrigger): + """Describes the average load trigger used for auto scaling. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of auto scaling trigger.Constant filled by server. Possible + values include: "AverageLoad". + :vartype kind: str or ~azure.servicefabric.models.AutoScalingTriggerKind + :ivar metric: Required. Description of the metric that is used for scaling. + :vartype metric: ~azure.servicefabric.models.AutoScalingMetric + :ivar lower_load_threshold: Required. Lower load threshold (if average load is below this + threshold, service will scale down). + :vartype lower_load_threshold: float + :ivar upper_load_threshold: Required. Upper load threshold (if average load is above this + threshold, service will scale up). + :vartype upper_load_threshold: float + :ivar scale_interval_in_seconds: Required. Scale interval that indicates how often will this + trigger be checked. + :vartype scale_interval_in_seconds: int + """ + + _validation = { + 'kind': {'required': True}, + 'metric': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'minimum': 60}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'metric': {'key': 'metric', 'type': 'AutoScalingMetric'}, + 'lower_load_threshold': {'key': 'lowerLoadThreshold', 'type': 'float'}, + 'upper_load_threshold': {'key': 'upperLoadThreshold', 'type': 'float'}, + 'scale_interval_in_seconds': {'key': 'scaleIntervalInSeconds', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword metric: Required. Description of the metric that is used for scaling. + :paramtype metric: ~azure.servicefabric.models.AutoScalingMetric + :keyword lower_load_threshold: Required. Lower load threshold (if average load is below this + threshold, service will scale down). + :paramtype lower_load_threshold: float + :keyword upper_load_threshold: Required. Upper load threshold (if average load is above this + threshold, service will scale up). + :paramtype upper_load_threshold: float + :keyword scale_interval_in_seconds: Required. Scale interval that indicates how often will this + trigger be checked. + :paramtype scale_interval_in_seconds: int + """ + super(AverageLoadScalingTrigger, self).__init__(**kwargs) + self.kind = 'AverageLoad' # type: str + self.metric = kwargs['metric'] + self.lower_load_threshold = kwargs['lower_load_threshold'] + self.upper_load_threshold = kwargs['upper_load_threshold'] + self.scale_interval_in_seconds = kwargs['scale_interval_in_seconds'] + + +class ScalingTriggerDescription(msrest.serialization.Model): + """Describes the trigger for performing a scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AveragePartitionLoadScalingTrigger, AverageServiceLoadScalingTrigger. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Specifies the kind of scaling trigger.Constant filled by server. Possible + values include: "Invalid", "AveragePartitionLoad", "AverageServiceLoad". + :vartype kind: str or ~azure.servicefabric.models.ScalingTriggerKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AveragePartitionLoad': 'AveragePartitionLoadScalingTrigger', 'AverageServiceLoad': 'AverageServiceLoadScalingTrigger'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ScalingTriggerDescription, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class AveragePartitionLoadScalingTrigger(ScalingTriggerDescription): + """Represents a scaling trigger related to an average load of a metric/resource of a partition. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Specifies the kind of scaling trigger.Constant filled by server. Possible + values include: "Invalid", "AveragePartitionLoad", "AverageServiceLoad". + :vartype kind: str or ~azure.servicefabric.models.ScalingTriggerKind + :ivar metric_name: Required. The name of the metric for which usage should be tracked. + :vartype metric_name: str + :ivar lower_load_threshold: Required. The lower limit of the load below which a scale in + operation should be performed. + :vartype lower_load_threshold: str + :ivar upper_load_threshold: Required. The upper limit of the load beyond which a scale out + operation should be performed. + :vartype upper_load_threshold: str + :ivar scale_interval_in_seconds: Required. The period in seconds on which a decision is made + whether to scale or not. + :vartype scale_interval_in_seconds: long + """ + + _validation = { + 'kind': {'required': True}, + 'metric_name': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, + 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, + 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword metric_name: Required. The name of the metric for which usage should be tracked. + :paramtype metric_name: str + :keyword lower_load_threshold: Required. The lower limit of the load below which a scale in + operation should be performed. + :paramtype lower_load_threshold: str + :keyword upper_load_threshold: Required. The upper limit of the load beyond which a scale out + operation should be performed. + :paramtype upper_load_threshold: str + :keyword scale_interval_in_seconds: Required. The period in seconds on which a decision is made + whether to scale or not. + :paramtype scale_interval_in_seconds: long + """ + super(AveragePartitionLoadScalingTrigger, self).__init__(**kwargs) + self.kind = 'AveragePartitionLoad' # type: str + self.metric_name = kwargs['metric_name'] + self.lower_load_threshold = kwargs['lower_load_threshold'] + self.upper_load_threshold = kwargs['upper_load_threshold'] + self.scale_interval_in_seconds = kwargs['scale_interval_in_seconds'] + + +class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): + """Represents a scaling policy related to an average load of a metric/resource of a service. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Specifies the kind of scaling trigger.Constant filled by server. Possible + values include: "Invalid", "AveragePartitionLoad", "AverageServiceLoad". + :vartype kind: str or ~azure.servicefabric.models.ScalingTriggerKind + :ivar metric_name: Required. The name of the metric for which usage should be tracked. + :vartype metric_name: str + :ivar lower_load_threshold: Required. The lower limit of the load below which a scale in + operation should be performed. + :vartype lower_load_threshold: str + :ivar upper_load_threshold: Required. The upper limit of the load beyond which a scale out + operation should be performed. + :vartype upper_load_threshold: str + :ivar scale_interval_in_seconds: Required. The period in seconds on which a decision is made + whether to scale or not. + :vartype scale_interval_in_seconds: long + :ivar use_only_primary_load: Required. Flag determines whether only the load of primary replica + should be considered for scaling. + If set to true, then trigger will only consider the load of primary replicas of stateful + service. + If set to false, trigger will consider load of all replicas. + This parameter cannot be set to true for stateless service. + :vartype use_only_primary_load: bool + """ + + _validation = { + 'kind': {'required': True}, + 'metric_name': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, + 'use_only_primary_load': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, + 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, + 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, + 'use_only_primary_load': {'key': 'UseOnlyPrimaryLoad', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword metric_name: Required. The name of the metric for which usage should be tracked. + :paramtype metric_name: str + :keyword lower_load_threshold: Required. The lower limit of the load below which a scale in + operation should be performed. + :paramtype lower_load_threshold: str + :keyword upper_load_threshold: Required. The upper limit of the load beyond which a scale out + operation should be performed. + :paramtype upper_load_threshold: str + :keyword scale_interval_in_seconds: Required. The period in seconds on which a decision is made + whether to scale or not. + :paramtype scale_interval_in_seconds: long + :keyword use_only_primary_load: Required. Flag determines whether only the load of primary + replica should be considered for scaling. + If set to true, then trigger will only consider the load of primary replicas of stateful + service. + If set to false, trigger will consider load of all replicas. + This parameter cannot be set to true for stateless service. + :paramtype use_only_primary_load: bool + """ + super(AverageServiceLoadScalingTrigger, self).__init__(**kwargs) + self.kind = 'AverageServiceLoad' # type: str + self.metric_name = kwargs['metric_name'] + self.lower_load_threshold = kwargs['lower_load_threshold'] + self.upper_load_threshold = kwargs['upper_load_threshold'] + self.scale_interval_in_seconds = kwargs['scale_interval_in_seconds'] + self.use_only_primary_load = kwargs['use_only_primary_load'] + + +class BackupStorageDescription(msrest.serialization.Model): + """Describes the parameters for the backup storage. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBlobBackupStorageDescription, DsmsAzureBlobBackupStorageDescription, FileShareBackupStorageDescription, ManagedIdentityAzureBlobBackupStorageDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant + filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", + "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". + :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind + :ivar friendly_name: Friendly name for this backup storage. + :vartype friendly_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + } + + _attribute_map = { + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + } + + _subtype_map = { + 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'ManagedIdentityAzureBlobStore': 'ManagedIdentityAzureBlobBackupStorageDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword friendly_name: Friendly name for this backup storage. + :paramtype friendly_name: str + """ + super(BackupStorageDescription, self).__init__(**kwargs) + self.storage_kind = None # type: Optional[str] + self.friendly_name = kwargs.get('friendly_name', None) + + +class AzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Azure blob store used for storing and enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant + filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", + "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". + :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind + :ivar friendly_name: Friendly name for this backup storage. + :vartype friendly_name: str + :ivar connection_string: Required. The connection string to connect to the Azure blob store. + :vartype connection_string: str + :ivar container_name: Required. The name of the container in the blob store to store and + enumerate backups from. + :vartype container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'connection_string': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'connection_string': {'key': 'ConnectionString', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword friendly_name: Friendly name for this backup storage. + :paramtype friendly_name: str + :keyword connection_string: Required. The connection string to connect to the Azure blob store. + :paramtype connection_string: str + :keyword container_name: Required. The name of the container in the blob store to store and + enumerate backups from. + :paramtype container_name: str + """ + super(AzureBlobBackupStorageDescription, self).__init__(**kwargs) + self.storage_kind = 'AzureBlobStore' # type: str + self.connection_string = kwargs['connection_string'] + self.container_name = kwargs['container_name'] + + +class DiagnosticsSinkProperties(msrest.serialization.Model): + """Properties of a DiagnosticsSink. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureInternalMonitoringPipelineSinkDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of DiagnosticsSink.Constant filled by server. Possible values + include: "Invalid", "AzureInternalMonitoringPipeline". + :vartype kind: str or ~azure.servicefabric.models.DiagnosticsSinkKind + :ivar name: Name of the sink. This value is referenced by DiagnosticsReferenceDescription. + :vartype name: str + :ivar description: A description of the sink. + :vartype description: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AzureInternalMonitoringPipeline': 'AzureInternalMonitoringPipelineSinkDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Name of the sink. This value is referenced by DiagnosticsReferenceDescription. + :paramtype name: str + :keyword description: A description of the sink. + :paramtype description: str + """ + super(DiagnosticsSinkProperties, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + + +class AzureInternalMonitoringPipelineSinkDescription(DiagnosticsSinkProperties): + """Diagnostics settings for Geneva. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of DiagnosticsSink.Constant filled by server. Possible values + include: "Invalid", "AzureInternalMonitoringPipeline". + :vartype kind: str or ~azure.servicefabric.models.DiagnosticsSinkKind + :ivar name: Name of the sink. This value is referenced by DiagnosticsReferenceDescription. + :vartype name: str + :ivar description: A description of the sink. + :vartype description: str + :ivar account_name: Azure Internal monitoring pipeline account. + :vartype account_name: str + :ivar namespace: Azure Internal monitoring pipeline account namespace. + :vartype namespace: str + :ivar ma_config_url: Azure Internal monitoring agent configuration. + :vartype ma_config_url: str + :ivar fluentd_config_url: Azure Internal monitoring agent fluentd configuration. + :vartype fluentd_config_url: str + :ivar auto_key_config_url: Azure Internal monitoring pipeline autokey associated with the + certificate. + :vartype auto_key_config_url: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'ma_config_url': {'key': 'maConfigUrl', 'type': 'str'}, + 'fluentd_config_url': {'key': 'fluentdConfigUrl', 'type': 'str'}, + 'auto_key_config_url': {'key': 'autoKeyConfigUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Name of the sink. This value is referenced by DiagnosticsReferenceDescription. + :paramtype name: str + :keyword description: A description of the sink. + :paramtype description: str + :keyword account_name: Azure Internal monitoring pipeline account. + :paramtype account_name: str + :keyword namespace: Azure Internal monitoring pipeline account namespace. + :paramtype namespace: str + :keyword ma_config_url: Azure Internal monitoring agent configuration. + :paramtype ma_config_url: str + :keyword fluentd_config_url: Azure Internal monitoring agent fluentd configuration. + :paramtype fluentd_config_url: str + :keyword auto_key_config_url: Azure Internal monitoring pipeline autokey associated with the + certificate. + :paramtype auto_key_config_url: str + """ + super(AzureInternalMonitoringPipelineSinkDescription, self).__init__(**kwargs) + self.kind = 'AzureInternalMonitoringPipeline' # type: str + self.account_name = kwargs.get('account_name', None) + self.namespace = kwargs.get('namespace', None) + self.ma_config_url = kwargs.get('ma_config_url', None) + self.fluentd_config_url = kwargs.get('fluentd_config_url', None) + self.auto_key_config_url = kwargs.get('auto_key_config_url', None) + + +class BackupInfo(msrest.serialization.Model): + """Represents a backup point which can be used to trigger a restore. + + :ivar backup_id: Unique backup ID . + :vartype backup_id: str + :ivar backup_chain_id: Unique backup chain ID. All backups part of the same chain has the same + backup chain id. A backup chain is comprised of 1 full backup and multiple incremental backups. + :vartype backup_chain_id: str + :ivar application_name: Name of the Service Fabric application this partition backup belongs + to. + :vartype application_name: str + :ivar service_name: Name of the Service Fabric service this partition backup belongs to. + :vartype service_name: str + :ivar partition_information: Information about the partition to which this backup belongs to. + :vartype partition_information: ~azure.servicefabric.models.PartitionInformation + :ivar backup_location: Location of the backup, relative to the backup store. + :vartype backup_location: str + :ivar backup_type: Describes the type of backup, whether its full or incremental. Possible + values include: "Invalid", "Full", "Incremental". + :vartype backup_type: str or ~azure.servicefabric.models.BackupType + :ivar epoch_of_last_backup_record: Epoch of the last record in this backup. + :vartype epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch + :ivar lsn_of_last_backup_record: LSN of the last record in this backup. + :vartype lsn_of_last_backup_record: str + :ivar creation_time_utc: The date time when this backup was taken. + :vartype creation_time_utc: ~datetime.datetime + :ivar service_manifest_version: Manifest Version of the service this partition backup belongs + to. + :vartype service_manifest_version: str + :ivar failure_error: Denotes the failure encountered in getting backup point information. + :vartype failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_chain_id': {'key': 'BackupChainId', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'backup_type': {'key': 'BackupType', 'type': 'str'}, + 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, + 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, + 'creation_time_utc': {'key': 'CreationTimeUtc', 'type': 'iso-8601'}, + 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_id: Unique backup ID . + :paramtype backup_id: str + :keyword backup_chain_id: Unique backup chain ID. All backups part of the same chain has the + same backup chain id. A backup chain is comprised of 1 full backup and multiple incremental + backups. + :paramtype backup_chain_id: str + :keyword application_name: Name of the Service Fabric application this partition backup belongs + to. + :paramtype application_name: str + :keyword service_name: Name of the Service Fabric service this partition backup belongs to. + :paramtype service_name: str + :keyword partition_information: Information about the partition to which this backup belongs + to. + :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation + :keyword backup_location: Location of the backup, relative to the backup store. + :paramtype backup_location: str + :keyword backup_type: Describes the type of backup, whether its full or incremental. Possible + values include: "Invalid", "Full", "Incremental". + :paramtype backup_type: str or ~azure.servicefabric.models.BackupType + :keyword epoch_of_last_backup_record: Epoch of the last record in this backup. + :paramtype epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch + :keyword lsn_of_last_backup_record: LSN of the last record in this backup. + :paramtype lsn_of_last_backup_record: str + :keyword creation_time_utc: The date time when this backup was taken. + :paramtype creation_time_utc: ~datetime.datetime + :keyword service_manifest_version: Manifest Version of the service this partition backup + belongs to. + :paramtype service_manifest_version: str + :keyword failure_error: Denotes the failure encountered in getting backup point information. + :paramtype failure_error: ~azure.servicefabric.models.FabricErrorError + """ + super(BackupInfo, self).__init__(**kwargs) + self.backup_id = kwargs.get('backup_id', None) + self.backup_chain_id = kwargs.get('backup_chain_id', None) + self.application_name = kwargs.get('application_name', None) + self.service_name = kwargs.get('service_name', None) + self.partition_information = kwargs.get('partition_information', None) + self.backup_location = kwargs.get('backup_location', None) + self.backup_type = kwargs.get('backup_type', None) + self.epoch_of_last_backup_record = kwargs.get('epoch_of_last_backup_record', None) + self.lsn_of_last_backup_record = kwargs.get('lsn_of_last_backup_record', None) + self.creation_time_utc = kwargs.get('creation_time_utc', None) + self.service_manifest_version = kwargs.get('service_manifest_version', None) + self.failure_error = kwargs.get('failure_error', None) + + +class BackupPartitionDescription(msrest.serialization.Model): + """Describes the parameters for triggering partition's backup. + + :ivar backup_storage: Specifies the details of the backup storage where to save the backup. + :vartype backup_storage: ~azure.servicefabric.models.BackupStorageDescription + """ + + _attribute_map = { + 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_storage: Specifies the details of the backup storage where to save the backup. + :paramtype backup_storage: ~azure.servicefabric.models.BackupStorageDescription + """ + super(BackupPartitionDescription, self).__init__(**kwargs) + self.backup_storage = kwargs.get('backup_storage', None) + + +class BackupPolicyDescription(msrest.serialization.Model): + """Describes a backup policy for configuring periodic backup. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The unique name identifying this backup policy. + :vartype name: str + :ivar auto_restore_on_data_loss: Required. Specifies whether to trigger restore automatically + using the latest available backup in case the partition experiences a data loss event. + :vartype auto_restore_on_data_loss: bool + :ivar max_incremental_backups: Required. Defines the maximum number of incremental backups to + be taken between two full backups. This is just the upper limit. A full backup may be taken + before specified number of incremental backups are completed in one of the following conditions + + + * The replica has never taken a full backup since it has become primary, + * Some of the log records since the last backup has been truncated, or + * Replica passed the MaxAccumulatedBackupLogSizeInMB limit. + :vartype max_incremental_backups: int + :ivar schedule: Required. Describes the backup schedule parameters. + :vartype schedule: ~azure.servicefabric.models.BackupScheduleDescription + :ivar storage: Required. Describes the details of backup storage where to store the periodic + backups. + :vartype storage: ~azure.servicefabric.models.BackupStorageDescription + :ivar retention_policy: Describes the policy to retain backups in storage. + :vartype retention_policy: ~azure.servicefabric.models.RetentionPolicyDescription + """ + + _validation = { + 'name': {'required': True}, + 'auto_restore_on_data_loss': {'required': True}, + 'max_incremental_backups': {'required': True, 'maximum': 255, 'minimum': 0}, + 'schedule': {'required': True}, + 'storage': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'auto_restore_on_data_loss': {'key': 'AutoRestoreOnDataLoss', 'type': 'bool'}, + 'max_incremental_backups': {'key': 'MaxIncrementalBackups', 'type': 'int'}, + 'schedule': {'key': 'Schedule', 'type': 'BackupScheduleDescription'}, + 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, + 'retention_policy': {'key': 'RetentionPolicy', 'type': 'RetentionPolicyDescription'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. The unique name identifying this backup policy. + :paramtype name: str + :keyword auto_restore_on_data_loss: Required. Specifies whether to trigger restore + automatically using the latest available backup in case the partition experiences a data loss + event. + :paramtype auto_restore_on_data_loss: bool + :keyword max_incremental_backups: Required. Defines the maximum number of incremental backups + to be taken between two full backups. This is just the upper limit. A full backup may be taken + before specified number of incremental backups are completed in one of the following conditions + + + * The replica has never taken a full backup since it has become primary, + * Some of the log records since the last backup has been truncated, or + * Replica passed the MaxAccumulatedBackupLogSizeInMB limit. + :paramtype max_incremental_backups: int + :keyword schedule: Required. Describes the backup schedule parameters. + :paramtype schedule: ~azure.servicefabric.models.BackupScheduleDescription + :keyword storage: Required. Describes the details of backup storage where to store the periodic + backups. + :paramtype storage: ~azure.servicefabric.models.BackupStorageDescription + :keyword retention_policy: Describes the policy to retain backups in storage. + :paramtype retention_policy: ~azure.servicefabric.models.RetentionPolicyDescription + """ + super(BackupPolicyDescription, self).__init__(**kwargs) + self.name = kwargs['name'] + self.auto_restore_on_data_loss = kwargs['auto_restore_on_data_loss'] + self.max_incremental_backups = kwargs['max_incremental_backups'] + self.schedule = kwargs['schedule'] + self.storage = kwargs['storage'] + self.retention_policy = kwargs.get('retention_policy', None) + + +class BackupProgressInfo(msrest.serialization.Model): + """Describes the progress of a partition's backup. + + :ivar backup_state: Represents the current state of the partition backup operation. Possible + values include: "Invalid", "Accepted", "BackupInProgress", "Success", "Failure", "Timeout". + :vartype backup_state: str or ~azure.servicefabric.models.BackupState + :ivar time_stamp_utc: TimeStamp in UTC when operation succeeded or failed. + :vartype time_stamp_utc: ~datetime.datetime + :ivar backup_id: Unique ID of the newly created backup. + :vartype backup_id: str + :ivar backup_location: Location, relative to the backup store, of the newly created backup. + :vartype backup_location: str + :ivar epoch_of_last_backup_record: Specifies the epoch of the last record included in backup. + :vartype epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch + :ivar lsn_of_last_backup_record: The LSN of last record included in backup. + :vartype lsn_of_last_backup_record: str + :ivar failure_error: Denotes the failure encountered in performing backup operation. + :vartype failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'backup_state': {'key': 'BackupState', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, + 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_state: Represents the current state of the partition backup operation. Possible + values include: "Invalid", "Accepted", "BackupInProgress", "Success", "Failure", "Timeout". + :paramtype backup_state: str or ~azure.servicefabric.models.BackupState + :keyword time_stamp_utc: TimeStamp in UTC when operation succeeded or failed. + :paramtype time_stamp_utc: ~datetime.datetime + :keyword backup_id: Unique ID of the newly created backup. + :paramtype backup_id: str + :keyword backup_location: Location, relative to the backup store, of the newly created backup. + :paramtype backup_location: str + :keyword epoch_of_last_backup_record: Specifies the epoch of the last record included in + backup. + :paramtype epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch + :keyword lsn_of_last_backup_record: The LSN of last record included in backup. + :paramtype lsn_of_last_backup_record: str + :keyword failure_error: Denotes the failure encountered in performing backup operation. + :paramtype failure_error: ~azure.servicefabric.models.FabricErrorError + """ + super(BackupProgressInfo, self).__init__(**kwargs) + self.backup_state = kwargs.get('backup_state', None) + self.time_stamp_utc = kwargs.get('time_stamp_utc', None) + self.backup_id = kwargs.get('backup_id', None) + self.backup_location = kwargs.get('backup_location', None) + self.epoch_of_last_backup_record = kwargs.get('epoch_of_last_backup_record', None) + self.lsn_of_last_backup_record = kwargs.get('lsn_of_last_backup_record', None) + self.failure_error = kwargs.get('failure_error', None) + + +class BackupScheduleDescription(msrest.serialization.Model): + """Describes the backup schedule parameters. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FrequencyBasedBackupScheduleDescription, TimeBasedBackupScheduleDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar schedule_kind: Required. The kind of backup schedule, time based or frequency + based.Constant filled by server. Possible values include: "Invalid", "TimeBased", + "FrequencyBased". + :vartype schedule_kind: str or ~azure.servicefabric.models.BackupScheduleKind + """ + + _validation = { + 'schedule_kind': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + } + + _subtype_map = { + 'schedule_kind': {'FrequencyBased': 'FrequencyBasedBackupScheduleDescription', 'TimeBased': 'TimeBasedBackupScheduleDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(BackupScheduleDescription, self).__init__(**kwargs) + self.schedule_kind = None # type: Optional[str] + + +class BackupSuspensionInfo(msrest.serialization.Model): + """Describes the backup suspension details. + + :ivar is_suspended: Indicates whether periodic backup is suspended at this level or not. + :vartype is_suspended: bool + :ivar suspension_inherited_from: Specifies the scope at which the backup suspension was + applied. Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype suspension_inherited_from: str or ~azure.servicefabric.models.BackupSuspensionScope + """ + + _attribute_map = { + 'is_suspended': {'key': 'IsSuspended', 'type': 'bool'}, + 'suspension_inherited_from': {'key': 'SuspensionInheritedFrom', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword is_suspended: Indicates whether periodic backup is suspended at this level or not. + :paramtype is_suspended: bool + :keyword suspension_inherited_from: Specifies the scope at which the backup suspension was + applied. Possible values include: "Invalid", "Partition", "Service", "Application". + :paramtype suspension_inherited_from: str or ~azure.servicefabric.models.BackupSuspensionScope + """ + super(BackupSuspensionInfo, self).__init__(**kwargs) + self.is_suspended = kwargs.get('is_suspended', None) + self.suspension_inherited_from = kwargs.get('suspension_inherited_from', None) + + +class RetentionPolicyDescription(msrest.serialization.Model): + """Describes the retention policy configured. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BasicRetentionPolicyDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar retention_policy_type: Required. The type of retention policy. Currently only "Basic" + retention policy is supported.Constant filled by server. Possible values include: "Basic", + "Invalid". + :vartype retention_policy_type: str or ~azure.servicefabric.models.RetentionPolicyType + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, + } + + _subtype_map = { + 'retention_policy_type': {'Basic': 'BasicRetentionPolicyDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(RetentionPolicyDescription, self).__init__(**kwargs) + self.retention_policy_type = None # type: Optional[str] + + +class BasicRetentionPolicyDescription(RetentionPolicyDescription): + """Describes basic retention policy. + + All required parameters must be populated in order to send to Azure. + + :ivar retention_policy_type: Required. The type of retention policy. Currently only "Basic" + retention policy is supported.Constant filled by server. Possible values include: "Basic", + "Invalid". + :vartype retention_policy_type: str or ~azure.servicefabric.models.RetentionPolicyType + :ivar retention_duration: Required. It is the minimum duration for which a backup created, will + remain stored in the storage and might get deleted after that span of time. It should be + specified in ISO8601 format. + :vartype retention_duration: ~datetime.timedelta + :ivar minimum_number_of_backups: It is the minimum number of backups to be retained at any + point of time. If specified with a non zero value, backups will not be deleted even if the + backups have gone past retention duration and have number of backups less than or equal to it. + :vartype minimum_number_of_backups: int + """ + + _validation = { + 'retention_policy_type': {'required': True}, + 'retention_duration': {'required': True}, + 'minimum_number_of_backups': {'minimum': 0}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, + 'retention_duration': {'key': 'RetentionDuration', 'type': 'duration'}, + 'minimum_number_of_backups': {'key': 'MinimumNumberOfBackups', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword retention_duration: Required. It is the minimum duration for which a backup created, + will remain stored in the storage and might get deleted after that span of time. It should be + specified in ISO8601 format. + :paramtype retention_duration: ~datetime.timedelta + :keyword minimum_number_of_backups: It is the minimum number of backups to be retained at any + point of time. If specified with a non zero value, backups will not be deleted even if the + backups have gone past retention duration and have number of backups less than or equal to it. + :paramtype minimum_number_of_backups: int + """ + super(BasicRetentionPolicyDescription, self).__init__(**kwargs) + self.retention_policy_type = 'Basic' # type: str + self.retention_duration = kwargs['retention_duration'] + self.minimum_number_of_backups = kwargs.get('minimum_number_of_backups', None) + + +class PropertyValue(msrest.serialization.Model): + """Describes a Service Fabric property value. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BinaryPropertyValue, DoublePropertyValue, GuidPropertyValue, Int64PropertyValue, StringPropertyValue. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property, determined by the type of data. Following are the + possible values.Constant filled by server. Possible values include: "Invalid", "Binary", + "Int64", "Double", "String", "Guid". + :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Binary': 'BinaryPropertyValue', 'Double': 'DoublePropertyValue', 'Guid': 'GuidPropertyValue', 'Int64': 'Int64PropertyValue', 'String': 'StringPropertyValue'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PropertyValue, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class BinaryPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Binary. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property, determined by the type of data. Following are the + possible values.Constant filled by server. Possible values include: "Invalid", "Binary", + "Int64", "Double", "String", "Guid". + :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind + :ivar data: Required. Array of bytes to be sent as an integer array. Each element of array is a + number between 0 and 255. + :vartype data: list[int] + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': '[int]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword data: Required. Array of bytes to be sent as an integer array. Each element of array + is a number between 0 and 255. + :paramtype data: list[int] + """ + super(BinaryPropertyValue, self).__init__(**kwargs) + self.kind = 'Binary' # type: str + self.data = kwargs['data'] + + +class Chaos(msrest.serialization.Model): + """Contains a description of Chaos. + + :ivar chaos_parameters: If Chaos is running, these are the parameters Chaos is running with. + :vartype chaos_parameters: ~azure.servicefabric.models.ChaosParameters + :ivar status: Current status of the Chaos run. Possible values include: "Invalid", "Running", + "Stopped". + :vartype status: str or ~azure.servicefabric.models.ChaosStatus + :ivar schedule_status: Current status of the schedule. Possible values include: "Invalid", + "Stopped", "Active", "Expired", "Pending". + :vartype schedule_status: str or ~azure.servicefabric.models.ChaosScheduleStatus + """ + + _attribute_map = { + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'schedule_status': {'key': 'ScheduleStatus', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword chaos_parameters: If Chaos is running, these are the parameters Chaos is running with. + :paramtype chaos_parameters: ~azure.servicefabric.models.ChaosParameters + :keyword status: Current status of the Chaos run. Possible values include: "Invalid", + "Running", "Stopped". + :paramtype status: str or ~azure.servicefabric.models.ChaosStatus + :keyword schedule_status: Current status of the schedule. Possible values include: "Invalid", + "Stopped", "Active", "Expired", "Pending". + :paramtype schedule_status: str or ~azure.servicefabric.models.ChaosScheduleStatus + """ + super(Chaos, self).__init__(**kwargs) + self.chaos_parameters = kwargs.get('chaos_parameters', None) + self.status = kwargs.get('status', None) + self.schedule_status = kwargs.get('schedule_status', None) + + +class ChaosCodePackageRestartScheduledEvent(ApplicationEvent): + """Chaos Restart Code Package Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar fault_group_id: Required. Id of fault group. + :vartype fault_group_id: str + :ivar fault_id: Required. Id of fault. + :vartype fault_id: str + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar service_manifest_name: Required. Service manifest name. + :vartype service_manifest_name: str + :ivar code_package_name: Required. Code package name. + :vartype code_package_name: str + :ivar service_package_activation_id: Required. Id of Service package activation. + :vartype service_package_activation_id: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'node_name': {'required': True}, + 'service_manifest_name': {'required': True}, + 'code_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword fault_group_id: Required. Id of fault group. + :paramtype fault_group_id: str + :keyword fault_id: Required. Id of fault. + :paramtype fault_id: str + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword service_manifest_name: Required. Service manifest name. + :paramtype service_manifest_name: str + :keyword code_package_name: Required. Code package name. + :paramtype code_package_name: str + :keyword service_package_activation_id: Required. Id of Service package activation. + :paramtype service_package_activation_id: str + """ + super(ChaosCodePackageRestartScheduledEvent, self).__init__(**kwargs) + self.kind = 'ChaosCodePackageRestartScheduled' # type: str + self.fault_group_id = kwargs['fault_group_id'] + self.fault_id = kwargs['fault_id'] + self.node_name = kwargs['node_name'] + self.service_manifest_name = kwargs['service_manifest_name'] + self.code_package_name = kwargs['code_package_name'] + self.service_package_activation_id = kwargs['service_package_activation_id'] + + +class ChaosContext(msrest.serialization.Model): + """Describes a map, which is a collection of (string, string) type key-value pairs. The map can be used to record information about +the Chaos run. There cannot be more than 100 such pairs and each string (key or value) can be at most 4095 characters long. +This map is set by the starter of the Chaos run to optionally store the context about the specific run. + + :ivar map: Describes a map that contains a collection of ChaosContextMapItem's. + :vartype map: dict[str, str] + """ + + _attribute_map = { + 'map': {'key': 'Map', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword map: Describes a map that contains a collection of ChaosContextMapItem's. + :paramtype map: dict[str, str] + """ + super(ChaosContext, self).__init__(**kwargs) + self.map = kwargs.get('map', None) + + +class ChaosEvent(msrest.serialization.Model): + """Represents an event generated during a Chaos run. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ExecutingFaultsChaosEvent, StartedChaosEvent, StoppedChaosEvent, TestErrorChaosEvent, ValidationFailedChaosEvent, WaitingChaosEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values + include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", + "Stopped". + :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind + :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :vartype time_stamp_utc: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'time_stamp_utc': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + } + + _subtype_map = { + 'kind': {'ExecutingFaults': 'ExecutingFaultsChaosEvent', 'Started': 'StartedChaosEvent', 'Stopped': 'StoppedChaosEvent', 'TestError': 'TestErrorChaosEvent', 'ValidationFailed': 'ValidationFailedChaosEvent', 'Waiting': 'WaitingChaosEvent'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :paramtype time_stamp_utc: ~datetime.datetime + """ + super(ChaosEvent, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.time_stamp_utc = kwargs['time_stamp_utc'] + + +class ChaosEventsSegment(msrest.serialization.Model): + """Contains the list of Chaos events and the continuation token to get the next segment. + + :ivar 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. + :vartype continuation_token: str + :ivar history: List of Chaos events that meet the user-supplied criteria. + :vartype history: list[~azure.servicefabric.models.ChaosEventWrapper] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'history': {'key': 'History', 'type': '[ChaosEventWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword history: List of Chaos events that meet the user-supplied criteria. + :paramtype history: list[~azure.servicefabric.models.ChaosEventWrapper] + """ + super(ChaosEventsSegment, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.history = kwargs.get('history', None) + + +class ChaosEventWrapper(msrest.serialization.Model): + """Wrapper object for Chaos event. + + :ivar chaos_event: Represents an event generated during a Chaos run. + :vartype chaos_event: ~azure.servicefabric.models.ChaosEvent + """ + + _attribute_map = { + 'chaos_event': {'key': 'ChaosEvent', 'type': 'ChaosEvent'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword chaos_event: Represents an event generated during a Chaos run. + :paramtype chaos_event: ~azure.servicefabric.models.ChaosEvent + """ + super(ChaosEventWrapper, self).__init__(**kwargs) + self.chaos_event = kwargs.get('chaos_event', None) + + +class NodeEvent(FabricEvent): + """Represents the base for all Node Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ChaosNodeRestartScheduledEvent, NodeAbortedEvent, NodeAddedToClusterEvent, NodeClosedEvent, NodeDeactivateCompletedEvent, NodeDeactivateStartedEvent, NodeDownEvent, NodeHealthReportExpiredEvent, NodeNewHealthReportEvent, NodeOpenFailedEvent, NodeOpenSucceededEvent, NodeRemovedFromClusterEvent, NodeUpEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ChaosNodeRestartScheduled': 'ChaosNodeRestartScheduledEvent', 'NodeAborted': 'NodeAbortedEvent', 'NodeAddedToCluster': 'NodeAddedToClusterEvent', 'NodeClosed': 'NodeClosedEvent', 'NodeDeactivateCompleted': 'NodeDeactivateCompletedEvent', 'NodeDeactivateStarted': 'NodeDeactivateStartedEvent', 'NodeDown': 'NodeDownEvent', 'NodeHealthReportExpired': 'NodeHealthReportExpiredEvent', 'NodeNewHealthReport': 'NodeNewHealthReportEvent', 'NodeOpenFailed': 'NodeOpenFailedEvent', 'NodeOpenSucceeded': 'NodeOpenSucceededEvent', 'NodeRemovedFromCluster': 'NodeRemovedFromClusterEvent', 'NodeUp': 'NodeUpEvent'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + """ + super(NodeEvent, self).__init__(**kwargs) + self.kind = 'NodeEvent' # type: str + self.node_name = kwargs['node_name'] + + +class ChaosNodeRestartScheduledEvent(NodeEvent): + """Chaos Restart Node Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance_id: Required. Id of Node instance. + :vartype node_instance_id: long + :ivar fault_group_id: Required. Id of fault group. + :vartype fault_group_id: str + :ivar fault_id: Required. Id of fault. + :vartype fault_id: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance_id: Required. Id of Node instance. + :paramtype node_instance_id: long + :keyword fault_group_id: Required. Id of fault group. + :paramtype fault_group_id: str + :keyword fault_id: Required. Id of fault. + :paramtype fault_id: str + """ + super(ChaosNodeRestartScheduledEvent, self).__init__(**kwargs) + self.kind = 'ChaosNodeRestartScheduled' # type: str + self.node_instance_id = kwargs['node_instance_id'] + self.fault_group_id = kwargs['fault_group_id'] + self.fault_id = kwargs['fault_id'] + + +class ChaosParameters(msrest.serialization.Model): + """Defines all the parameters to configure a Chaos run. + + :ivar time_to_run_in_seconds: Total time (in seconds) for which Chaos will run before + automatically stopping. The maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue). + :vartype time_to_run_in_seconds: str + :ivar max_cluster_stabilization_timeout_in_seconds: The maximum amount of time to wait for all + cluster entities to become stable and healthy. Chaos executes in iterations and at the start of + each iteration it validates the health of cluster entities. + During validation if a cluster entity is not stable and healthy within + MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed event. + :vartype max_cluster_stabilization_timeout_in_seconds: long + :ivar max_concurrent_faults: MaxConcurrentFaults is the maximum number of concurrent faults + induced per iteration. + Chaos executes in iterations and two consecutive iterations are separated by a validation + phase. + The higher the concurrency, the more aggressive the injection of faults, leading to inducing + more complex series of states to uncover bugs. + The recommendation is to start with a value of 2 or 3 and to exercise caution while moving up. + :vartype max_concurrent_faults: long + :ivar enable_move_replica_faults: Enables or disables the move primary and move secondary + faults. + :vartype enable_move_replica_faults: bool + :ivar wait_time_between_faults_in_seconds: Wait time (in seconds) between consecutive faults + within a single iteration. + The larger the value, the lower the overlapping between faults and the simpler the sequence of + state transitions that the cluster goes through. + The recommendation is to start with a value between 1 and 5 and exercise caution while moving + up. + :vartype wait_time_between_faults_in_seconds: long + :ivar wait_time_between_iterations_in_seconds: Time-separation (in seconds) between two + consecutive iterations of Chaos. + The larger the value, the lower the fault injection rate. + :vartype wait_time_between_iterations_in_seconds: long + :ivar cluster_health_policy: Passed-in cluster health policy is used to validate health of the + cluster in between Chaos iterations. If the cluster health is in error or if an unexpected + exception happens during fault execution--to provide the cluster with some time to + recuperate--Chaos will wait for 30 minutes before the next health-check. + :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :ivar context: Describes a map, which is a collection of (string, string) type key-value pairs. + The map can be used to record information about + the Chaos run. There cannot be more than 100 such pairs and each string (key or value) can be + at most 4095 characters long. + This map is set by the starter of the Chaos run to optionally store the context about the + specific run. + :vartype context: ~azure.servicefabric.models.ChaosContext + :ivar chaos_target_filter: List of cluster entities to target for Chaos faults. + This filter can be used to target Chaos faults only to certain node types or only to certain + application instances. If ChaosTargetFilter is not used, Chaos faults all cluster entities. + If ChaosTargetFilter is used, Chaos faults only the entities that meet the ChaosTargetFilter + specification. + :vartype chaos_target_filter: ~azure.servicefabric.models.ChaosTargetFilter + """ + + _validation = { + 'max_cluster_stabilization_timeout_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'max_concurrent_faults': {'maximum': 4294967295, 'minimum': 0}, + 'wait_time_between_faults_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'wait_time_between_iterations_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'str'}, + 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'long'}, + 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, + 'enable_move_replica_faults': {'key': 'EnableMoveReplicaFaults', 'type': 'bool'}, + 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'long'}, + 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'long'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'context': {'key': 'Context', 'type': 'ChaosContext'}, + 'chaos_target_filter': {'key': 'ChaosTargetFilter', 'type': 'ChaosTargetFilter'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword time_to_run_in_seconds: Total time (in seconds) for which Chaos will run before + automatically stopping. The maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue). + :paramtype time_to_run_in_seconds: str + :keyword max_cluster_stabilization_timeout_in_seconds: The maximum amount of time to wait for + all cluster entities to become stable and healthy. Chaos executes in iterations and at the + start of each iteration it validates the health of cluster entities. + During validation if a cluster entity is not stable and healthy within + MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed event. + :paramtype max_cluster_stabilization_timeout_in_seconds: long + :keyword max_concurrent_faults: MaxConcurrentFaults is the maximum number of concurrent faults + induced per iteration. + Chaos executes in iterations and two consecutive iterations are separated by a validation + phase. + The higher the concurrency, the more aggressive the injection of faults, leading to inducing + more complex series of states to uncover bugs. + The recommendation is to start with a value of 2 or 3 and to exercise caution while moving up. + :paramtype max_concurrent_faults: long + :keyword enable_move_replica_faults: Enables or disables the move primary and move secondary + faults. + :paramtype enable_move_replica_faults: bool + :keyword wait_time_between_faults_in_seconds: Wait time (in seconds) between consecutive faults + within a single iteration. + The larger the value, the lower the overlapping between faults and the simpler the sequence of + state transitions that the cluster goes through. + The recommendation is to start with a value between 1 and 5 and exercise caution while moving + up. + :paramtype wait_time_between_faults_in_seconds: long + :keyword wait_time_between_iterations_in_seconds: Time-separation (in seconds) between two + consecutive iterations of Chaos. + The larger the value, the lower the fault injection rate. + :paramtype wait_time_between_iterations_in_seconds: long + :keyword cluster_health_policy: Passed-in cluster health policy is used to validate health of + the cluster in between Chaos iterations. If the cluster health is in error or if an unexpected + exception happens during fault execution--to provide the cluster with some time to + recuperate--Chaos will wait for 30 minutes before the next health-check. + :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :keyword context: Describes a map, which is a collection of (string, string) type key-value + pairs. The map can be used to record information about + the Chaos run. There cannot be more than 100 such pairs and each string (key or value) can be + at most 4095 characters long. + This map is set by the starter of the Chaos run to optionally store the context about the + specific run. + :paramtype context: ~azure.servicefabric.models.ChaosContext + :keyword chaos_target_filter: List of cluster entities to target for Chaos faults. + This filter can be used to target Chaos faults only to certain node types or only to certain + application instances. If ChaosTargetFilter is not used, Chaos faults all cluster entities. + If ChaosTargetFilter is used, Chaos faults only the entities that meet the ChaosTargetFilter + specification. + :paramtype chaos_target_filter: ~azure.servicefabric.models.ChaosTargetFilter + """ + super(ChaosParameters, self).__init__(**kwargs) + self.time_to_run_in_seconds = kwargs.get('time_to_run_in_seconds', "4294967295") + self.max_cluster_stabilization_timeout_in_seconds = kwargs.get('max_cluster_stabilization_timeout_in_seconds', 60) + self.max_concurrent_faults = kwargs.get('max_concurrent_faults', 1) + self.enable_move_replica_faults = kwargs.get('enable_move_replica_faults', True) + self.wait_time_between_faults_in_seconds = kwargs.get('wait_time_between_faults_in_seconds', 20) + self.wait_time_between_iterations_in_seconds = kwargs.get('wait_time_between_iterations_in_seconds', 30) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.context = kwargs.get('context', None) + self.chaos_target_filter = kwargs.get('chaos_target_filter', None) + + +class ChaosParametersDictionaryItem(msrest.serialization.Model): + """Defines an item in ChaosParametersDictionary of the Chaos Schedule. + + All required parameters must be populated in order to send to Azure. + + :ivar key: Required. The key identifying the Chaos Parameter in the dictionary. This key is + referenced by Chaos Schedule Jobs. + :vartype key: str + :ivar value: Required. Defines all the parameters to configure a Chaos run. + :vartype value: ~azure.servicefabric.models.ChaosParameters + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ChaosParameters'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword key: Required. The key identifying the Chaos Parameter in the dictionary. This key is + referenced by Chaos Schedule Jobs. + :paramtype key: str + :keyword value: Required. Defines all the parameters to configure a Chaos run. + :paramtype value: ~azure.servicefabric.models.ChaosParameters + """ + super(ChaosParametersDictionaryItem, self).__init__(**kwargs) + self.key = kwargs['key'] + self.value = kwargs['value'] + + +class PartitionEvent(FabricEvent): + """Represents the base for all Partition Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ChaosPartitionPrimaryMoveScheduledEvent, ChaosPartitionSecondaryMoveScheduledEvent, PartitionAnalysisEvent, PartitionHealthReportExpiredEvent, PartitionNewHealthReportEvent, PartitionReconfiguredEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ChaosPartitionPrimaryMoveScheduled': 'ChaosPartitionPrimaryMoveScheduledEvent', 'ChaosPartitionSecondaryMoveScheduled': 'ChaosPartitionSecondaryMoveScheduledEvent', 'PartitionAnalysisEvent': 'PartitionAnalysisEvent', 'PartitionHealthReportExpired': 'PartitionHealthReportExpiredEvent', 'PartitionNewHealthReport': 'PartitionNewHealthReportEvent', 'PartitionReconfigured': 'PartitionReconfiguredEvent'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + """ + super(PartitionEvent, self).__init__(**kwargs) + self.kind = 'PartitionEvent' # type: str + self.partition_id = kwargs['partition_id'] + + +class ChaosPartitionPrimaryMoveScheduledEvent(PartitionEvent): + """Chaos Move Primary Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar fault_group_id: Required. Id of fault group. + :vartype fault_group_id: str + :ivar fault_id: Required. Id of fault. + :vartype fault_id: str + :ivar service_name: Required. Service name. + :vartype service_name: str + :ivar node_to: Required. The name of a Service Fabric node. + :vartype node_to: str + :ivar forced_move: Required. Indicates a forced move. + :vartype forced_move: bool + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_name': {'required': True}, + 'node_to': {'required': True}, + 'forced_move': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'node_to': {'key': 'NodeTo', 'type': 'str'}, + 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword fault_group_id: Required. Id of fault group. + :paramtype fault_group_id: str + :keyword fault_id: Required. Id of fault. + :paramtype fault_id: str + :keyword service_name: Required. Service name. + :paramtype service_name: str + :keyword node_to: Required. The name of a Service Fabric node. + :paramtype node_to: str + :keyword forced_move: Required. Indicates a forced move. + :paramtype forced_move: bool + """ + super(ChaosPartitionPrimaryMoveScheduledEvent, self).__init__(**kwargs) + self.kind = 'ChaosPartitionPrimaryMoveScheduled' # type: str + self.fault_group_id = kwargs['fault_group_id'] + self.fault_id = kwargs['fault_id'] + self.service_name = kwargs['service_name'] + self.node_to = kwargs['node_to'] + self.forced_move = kwargs['forced_move'] + + +class ChaosPartitionSecondaryMoveScheduledEvent(PartitionEvent): + """Chaos Move Secondary Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar fault_group_id: Required. Id of fault group. + :vartype fault_group_id: str + :ivar fault_id: Required. Id of fault. + :vartype fault_id: str + :ivar service_name: Required. Service name. + :vartype service_name: str + :ivar source_node: Required. The name of a Service Fabric node. + :vartype source_node: str + :ivar destination_node: Required. The name of a Service Fabric node. + :vartype destination_node: str + :ivar forced_move: Required. Indicates a forced move. + :vartype forced_move: bool + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_name': {'required': True}, + 'source_node': {'required': True}, + 'destination_node': {'required': True}, + 'forced_move': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'source_node': {'key': 'SourceNode', 'type': 'str'}, + 'destination_node': {'key': 'DestinationNode', 'type': 'str'}, + 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword fault_group_id: Required. Id of fault group. + :paramtype fault_group_id: str + :keyword fault_id: Required. Id of fault. + :paramtype fault_id: str + :keyword service_name: Required. Service name. + :paramtype service_name: str + :keyword source_node: Required. The name of a Service Fabric node. + :paramtype source_node: str + :keyword destination_node: Required. The name of a Service Fabric node. + :paramtype destination_node: str + :keyword forced_move: Required. Indicates a forced move. + :paramtype forced_move: bool + """ + super(ChaosPartitionSecondaryMoveScheduledEvent, self).__init__(**kwargs) + self.kind = 'ChaosPartitionSecondaryMoveScheduled' # type: str + self.fault_group_id = kwargs['fault_group_id'] + self.fault_id = kwargs['fault_id'] + self.service_name = kwargs['service_name'] + self.source_node = kwargs['source_node'] + self.destination_node = kwargs['destination_node'] + self.forced_move = kwargs['forced_move'] + + +class ReplicaEvent(FabricEvent): + """Represents the base for all Replica Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ChaosReplicaRemovalScheduledEvent, ChaosReplicaRestartScheduledEvent, StatefulReplicaHealthReportExpiredEvent, StatefulReplicaNewHealthReportEvent, StatelessReplicaHealthReportExpiredEvent, StatelessReplicaNewHealthReportEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :vartype replica_id: long + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + } + + _subtype_map = { + 'kind': {'ChaosReplicaRemovalScheduled': 'ChaosReplicaRemovalScheduledEvent', 'ChaosReplicaRestartScheduled': 'ChaosReplicaRestartScheduledEvent', 'StatefulReplicaHealthReportExpired': 'StatefulReplicaHealthReportExpiredEvent', 'StatefulReplicaNewHealthReport': 'StatefulReplicaNewHealthReportEvent', 'StatelessReplicaHealthReportExpired': 'StatelessReplicaHealthReportExpiredEvent', 'StatelessReplicaNewHealthReport': 'StatelessReplicaNewHealthReportEvent'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: long + """ + super(ReplicaEvent, self).__init__(**kwargs) + self.kind = 'ReplicaEvent' # type: str + self.partition_id = kwargs['partition_id'] + self.replica_id = kwargs['replica_id'] + + +class ChaosReplicaRemovalScheduledEvent(ReplicaEvent): + """Chaos Remove Replica Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :vartype replica_id: long + :ivar fault_group_id: Required. Id of fault group. + :vartype fault_group_id: str + :ivar fault_id: Required. Id of fault. + :vartype fault_id: str + :ivar service_uri: Required. Service name. + :vartype service_uri: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: long + :keyword fault_group_id: Required. Id of fault group. + :paramtype fault_group_id: str + :keyword fault_id: Required. Id of fault. + :paramtype fault_id: str + :keyword service_uri: Required. Service name. + :paramtype service_uri: str + """ + super(ChaosReplicaRemovalScheduledEvent, self).__init__(**kwargs) + self.kind = 'ChaosReplicaRemovalScheduled' # type: str + self.fault_group_id = kwargs['fault_group_id'] + self.fault_id = kwargs['fault_id'] + self.service_uri = kwargs['service_uri'] + + +class ChaosReplicaRestartScheduledEvent(ReplicaEvent): + """Chaos Restart Replica Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :vartype replica_id: long + :ivar fault_group_id: Required. Id of fault group. + :vartype fault_group_id: str + :ivar fault_id: Required. Id of fault. + :vartype fault_id: str + :ivar service_uri: Required. Service name. + :vartype service_uri: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: long + :keyword fault_group_id: Required. Id of fault group. + :paramtype fault_group_id: str + :keyword fault_id: Required. Id of fault. + :paramtype fault_id: str + :keyword service_uri: Required. Service name. + :paramtype service_uri: str + """ + super(ChaosReplicaRestartScheduledEvent, self).__init__(**kwargs) + self.kind = 'ChaosReplicaRestartScheduled' # type: str + self.fault_group_id = kwargs['fault_group_id'] + self.fault_id = kwargs['fault_id'] + self.service_uri = kwargs['service_uri'] + + +class ChaosSchedule(msrest.serialization.Model): + """Defines the schedule used by Chaos. + + :ivar start_date: The date and time Chaos will start using this schedule. + :vartype start_date: ~datetime.datetime + :ivar expiry_date: The date and time Chaos will continue to use this schedule until. + :vartype expiry_date: ~datetime.datetime + :ivar chaos_parameters_dictionary: A mapping of string names to Chaos Parameters to be + referenced by Chaos Schedule Jobs. + :vartype chaos_parameters_dictionary: + list[~azure.servicefabric.models.ChaosParametersDictionaryItem] + :ivar jobs: A list of all Chaos Schedule Jobs that will be automated by the schedule. + :vartype jobs: list[~azure.servicefabric.models.ChaosScheduleJob] + """ + + _attribute_map = { + 'start_date': {'key': 'StartDate', 'type': 'iso-8601'}, + 'expiry_date': {'key': 'ExpiryDate', 'type': 'iso-8601'}, + 'chaos_parameters_dictionary': {'key': 'ChaosParametersDictionary', 'type': '[ChaosParametersDictionaryItem]'}, + 'jobs': {'key': 'Jobs', 'type': '[ChaosScheduleJob]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword start_date: The date and time Chaos will start using this schedule. + :paramtype start_date: ~datetime.datetime + :keyword expiry_date: The date and time Chaos will continue to use this schedule until. + :paramtype expiry_date: ~datetime.datetime + :keyword chaos_parameters_dictionary: A mapping of string names to Chaos Parameters to be + referenced by Chaos Schedule Jobs. + :paramtype chaos_parameters_dictionary: + list[~azure.servicefabric.models.ChaosParametersDictionaryItem] + :keyword jobs: A list of all Chaos Schedule Jobs that will be automated by the schedule. + :paramtype jobs: list[~azure.servicefabric.models.ChaosScheduleJob] + """ + super(ChaosSchedule, self).__init__(**kwargs) + self.start_date = kwargs.get('start_date', "1601-01-01T00:00:00Z") + self.expiry_date = kwargs.get('expiry_date', "9999-12-31T23:59:59.999Z") + self.chaos_parameters_dictionary = kwargs.get('chaos_parameters_dictionary', None) + self.jobs = kwargs.get('jobs', None) + + +class ChaosScheduleDescription(msrest.serialization.Model): + """Defines the Chaos Schedule used by Chaos and the version of the Chaos Schedule. The version value wraps back to 0 after surpassing 2,147,483,647. + + :ivar version: The version number of the Schedule. + :vartype version: int + :ivar schedule: Defines the schedule used by Chaos. + :vartype schedule: ~azure.servicefabric.models.ChaosSchedule + """ + + _validation = { + 'version': {'minimum': 0}, + } + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'int'}, + 'schedule': {'key': 'Schedule', 'type': 'ChaosSchedule'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword version: The version number of the Schedule. + :paramtype version: int + :keyword schedule: Defines the schedule used by Chaos. + :paramtype schedule: ~azure.servicefabric.models.ChaosSchedule + """ + super(ChaosScheduleDescription, self).__init__(**kwargs) + self.version = kwargs.get('version', None) + self.schedule = kwargs.get('schedule', None) + + +class ChaosScheduleJob(msrest.serialization.Model): + """Defines a repetition rule and parameters of Chaos to be used with the Chaos Schedule. + + :ivar chaos_parameters: A reference to which Chaos Parameters of the Chaos Schedule to use. + :vartype chaos_parameters: str + :ivar days: Defines the days of the week that a Chaos Schedule Job will run for. + :vartype days: ~azure.servicefabric.models.ChaosScheduleJobActiveDaysOfWeek + :ivar times: A list of Time Ranges that specify when during active days that this job will run. + The times are interpreted as UTC. + :vartype times: list[~azure.servicefabric.models.TimeRange] + """ + + _attribute_map = { + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'str'}, + 'days': {'key': 'Days', 'type': 'ChaosScheduleJobActiveDaysOfWeek'}, + 'times': {'key': 'Times', 'type': '[TimeRange]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword chaos_parameters: A reference to which Chaos Parameters of the Chaos Schedule to use. + :paramtype chaos_parameters: str + :keyword days: Defines the days of the week that a Chaos Schedule Job will run for. + :paramtype days: ~azure.servicefabric.models.ChaosScheduleJobActiveDaysOfWeek + :keyword times: A list of Time Ranges that specify when during active days that this job will + run. The times are interpreted as UTC. + :paramtype times: list[~azure.servicefabric.models.TimeRange] + """ + super(ChaosScheduleJob, self).__init__(**kwargs) + self.chaos_parameters = kwargs.get('chaos_parameters', None) + self.days = kwargs.get('days', None) + self.times = kwargs.get('times', None) + + +class ChaosScheduleJobActiveDaysOfWeek(msrest.serialization.Model): + """Defines the days of the week that a Chaos Schedule Job will run for. + + :ivar sunday: Indicates if the Chaos Schedule Job will run on Sunday. + :vartype sunday: bool + :ivar monday: Indicates if the Chaos Schedule Job will run on Monday. + :vartype monday: bool + :ivar tuesday: Indicates if the Chaos Schedule Job will run on Tuesday. + :vartype tuesday: bool + :ivar wednesday: Indicates if the Chaos Schedule Job will run on Wednesday. + :vartype wednesday: bool + :ivar thursday: Indicates if the Chaos Schedule Job will run on Thursday. + :vartype thursday: bool + :ivar friday: Indicates if the Chaos Schedule Job will run on Friday. + :vartype friday: bool + :ivar saturday: Indicates if the Chaos Schedule Job will run on Saturday. + :vartype saturday: bool + """ + + _attribute_map = { + 'sunday': {'key': 'Sunday', 'type': 'bool'}, + 'monday': {'key': 'Monday', 'type': 'bool'}, + 'tuesday': {'key': 'Tuesday', 'type': 'bool'}, + 'wednesday': {'key': 'Wednesday', 'type': 'bool'}, + 'thursday': {'key': 'Thursday', 'type': 'bool'}, + 'friday': {'key': 'Friday', 'type': 'bool'}, + 'saturday': {'key': 'Saturday', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword sunday: Indicates if the Chaos Schedule Job will run on Sunday. + :paramtype sunday: bool + :keyword monday: Indicates if the Chaos Schedule Job will run on Monday. + :paramtype monday: bool + :keyword tuesday: Indicates if the Chaos Schedule Job will run on Tuesday. + :paramtype tuesday: bool + :keyword wednesday: Indicates if the Chaos Schedule Job will run on Wednesday. + :paramtype wednesday: bool + :keyword thursday: Indicates if the Chaos Schedule Job will run on Thursday. + :paramtype thursday: bool + :keyword friday: Indicates if the Chaos Schedule Job will run on Friday. + :paramtype friday: bool + :keyword saturday: Indicates if the Chaos Schedule Job will run on Saturday. + :paramtype saturday: bool + """ + super(ChaosScheduleJobActiveDaysOfWeek, self).__init__(**kwargs) + self.sunday = kwargs.get('sunday', False) + self.monday = kwargs.get('monday', False) + self.tuesday = kwargs.get('tuesday', False) + self.wednesday = kwargs.get('wednesday', False) + self.thursday = kwargs.get('thursday', False) + self.friday = kwargs.get('friday', False) + self.saturday = kwargs.get('saturday', False) + + +class ClusterEvent(FabricEvent): + """Represents the base for all Cluster Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ChaosStartedEvent, ChaosStoppedEvent, ClusterHealthReportExpiredEvent, ClusterNewHealthReportEvent, ClusterUpgradeCompletedEvent, ClusterUpgradeDomainCompletedEvent, ClusterUpgradeRollbackCompletedEvent, ClusterUpgradeRollbackStartedEvent, ClusterUpgradeStartedEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + } + + _subtype_map = { + 'kind': {'ChaosStarted': 'ChaosStartedEvent', 'ChaosStopped': 'ChaosStoppedEvent', 'ClusterHealthReportExpired': 'ClusterHealthReportExpiredEvent', 'ClusterNewHealthReport': 'ClusterNewHealthReportEvent', 'ClusterUpgradeCompleted': 'ClusterUpgradeCompletedEvent', 'ClusterUpgradeDomainCompleted': 'ClusterUpgradeDomainCompletedEvent', 'ClusterUpgradeRollbackCompleted': 'ClusterUpgradeRollbackCompletedEvent', 'ClusterUpgradeRollbackStarted': 'ClusterUpgradeRollbackStartedEvent', 'ClusterUpgradeStarted': 'ClusterUpgradeStartedEvent'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + """ + super(ClusterEvent, self).__init__(**kwargs) + self.kind = 'ClusterEvent' # type: str + + +class ChaosStartedEvent(ClusterEvent): + """Chaos Started event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar max_concurrent_faults: Required. Maximum number of concurrent faults. + :vartype max_concurrent_faults: long + :ivar time_to_run_in_seconds: Required. Time to run in seconds. + :vartype time_to_run_in_seconds: float + :ivar max_cluster_stabilization_timeout_in_seconds: Required. Maximum timeout for cluster + stabilization in seconds. + :vartype max_cluster_stabilization_timeout_in_seconds: float + :ivar wait_time_between_iterations_in_seconds: Required. Wait time between iterations in + seconds. + :vartype wait_time_between_iterations_in_seconds: float + :ivar wait_time_between_faults_in_seconds: Required. Wait time between faults in seconds. + :vartype wait_time_between_faults_in_seconds: float + :ivar move_replica_fault_enabled: Required. Indicates MoveReplica fault is enabled. + :vartype move_replica_fault_enabled: bool + :ivar included_node_type_list: Required. List of included Node types. + :vartype included_node_type_list: str + :ivar included_application_list: Required. List of included Applications. + :vartype included_application_list: str + :ivar cluster_health_policy: Required. Health policy. + :vartype cluster_health_policy: str + :ivar chaos_context: Required. Chaos Context. + :vartype chaos_context: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'max_concurrent_faults': {'required': True}, + 'time_to_run_in_seconds': {'required': True}, + 'max_cluster_stabilization_timeout_in_seconds': {'required': True}, + 'wait_time_between_iterations_in_seconds': {'required': True}, + 'wait_time_between_faults_in_seconds': {'required': True}, + 'move_replica_fault_enabled': {'required': True}, + 'included_node_type_list': {'required': True}, + 'included_application_list': {'required': True}, + 'cluster_health_policy': {'required': True}, + 'chaos_context': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, + 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'float'}, + 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'float'}, + 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'float'}, + 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'float'}, + 'move_replica_fault_enabled': {'key': 'MoveReplicaFaultEnabled', 'type': 'bool'}, + 'included_node_type_list': {'key': 'IncludedNodeTypeList', 'type': 'str'}, + 'included_application_list': {'key': 'IncludedApplicationList', 'type': 'str'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'str'}, + 'chaos_context': {'key': 'ChaosContext', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword max_concurrent_faults: Required. Maximum number of concurrent faults. + :paramtype max_concurrent_faults: long + :keyword time_to_run_in_seconds: Required. Time to run in seconds. + :paramtype time_to_run_in_seconds: float + :keyword max_cluster_stabilization_timeout_in_seconds: Required. Maximum timeout for cluster + stabilization in seconds. + :paramtype max_cluster_stabilization_timeout_in_seconds: float + :keyword wait_time_between_iterations_in_seconds: Required. Wait time between iterations in + seconds. + :paramtype wait_time_between_iterations_in_seconds: float + :keyword wait_time_between_faults_in_seconds: Required. Wait time between faults in seconds. + :paramtype wait_time_between_faults_in_seconds: float + :keyword move_replica_fault_enabled: Required. Indicates MoveReplica fault is enabled. + :paramtype move_replica_fault_enabled: bool + :keyword included_node_type_list: Required. List of included Node types. + :paramtype included_node_type_list: str + :keyword included_application_list: Required. List of included Applications. + :paramtype included_application_list: str + :keyword cluster_health_policy: Required. Health policy. + :paramtype cluster_health_policy: str + :keyword chaos_context: Required. Chaos Context. + :paramtype chaos_context: str + """ + super(ChaosStartedEvent, self).__init__(**kwargs) + self.kind = 'ChaosStarted' # type: str + self.max_concurrent_faults = kwargs['max_concurrent_faults'] + self.time_to_run_in_seconds = kwargs['time_to_run_in_seconds'] + self.max_cluster_stabilization_timeout_in_seconds = kwargs['max_cluster_stabilization_timeout_in_seconds'] + self.wait_time_between_iterations_in_seconds = kwargs['wait_time_between_iterations_in_seconds'] + self.wait_time_between_faults_in_seconds = kwargs['wait_time_between_faults_in_seconds'] + self.move_replica_fault_enabled = kwargs['move_replica_fault_enabled'] + self.included_node_type_list = kwargs['included_node_type_list'] + self.included_application_list = kwargs['included_application_list'] + self.cluster_health_policy = kwargs['cluster_health_policy'] + self.chaos_context = kwargs['chaos_context'] + + +class ChaosStoppedEvent(ClusterEvent): + """Chaos Stopped event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar reason: Required. Describes reason. + :vartype reason: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'reason': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword reason: Required. Describes reason. + :paramtype reason: str + """ + super(ChaosStoppedEvent, self).__init__(**kwargs) + self.kind = 'ChaosStopped' # type: str + self.reason = kwargs['reason'] + + +class ChaosTargetFilter(msrest.serialization.Model): + """Defines all filters for targeted Chaos faults, for example, faulting only certain node types or faulting only certain applications. +If ChaosTargetFilter is not used, Chaos faults all cluster entities. If ChaosTargetFilter is used, Chaos faults only the entities that meet the ChaosTargetFilter +specification. NodeTypeInclusionList and ApplicationInclusionList allow a union semantics only. It is not possible to specify an intersection +of NodeTypeInclusionList and ApplicationInclusionList. For example, it is not possible to specify "fault this application only when it is on that node type." +Once an entity is included in either NodeTypeInclusionList or ApplicationInclusionList, that entity cannot be excluded using ChaosTargetFilter. Even if +applicationX does not appear in ApplicationInclusionList, in some Chaos iteration applicationX can be faulted because it happens to be on a node of nodeTypeY that is included +in NodeTypeInclusionList. If both NodeTypeInclusionList and ApplicationInclusionList are null or empty, an ArgumentException is thrown. + + :ivar node_type_inclusion_list: A list of node types to include in Chaos faults. + All types of faults (restart node, restart code package, remove replica, restart replica, move + primary, and move secondary) are enabled for the nodes of these node types. + If a node type (say NodeTypeX) does not appear in the NodeTypeInclusionList, then node level + faults (like NodeRestart) will never be enabled for the nodes of + NodeTypeX, but code package and replica faults can still be enabled for NodeTypeX if an + application in the ApplicationInclusionList. + happens to reside on a node of NodeTypeX. + At most 100 node type names can be included in this list, to increase this number, a config + upgrade is required for MaxNumberOfNodeTypesInChaosEntityFilter configuration. + :vartype node_type_inclusion_list: list[str] + :ivar application_inclusion_list: A list of application URIs to include in Chaos faults. + All replicas belonging to services of these applications are amenable to replica faults + (restart replica, remove replica, move primary, and move secondary) by Chaos. + Chaos may restart a code package only if the code package hosts replicas of these applications + only. + If an application does not appear in this list, it can still be faulted in some Chaos + iteration if the application ends up on a node of a node type that is included in + NodeTypeInclusionList. + However, if applicationX is tied to nodeTypeY through placement constraints and applicationX + is absent from ApplicationInclusionList and nodeTypeY is absent from NodeTypeInclusionList, + then applicationX will never be faulted. + At most 1000 application names can be included in this list, to increase this number, a config + upgrade is required for MaxNumberOfApplicationsInChaosEntityFilter configuration. + :vartype application_inclusion_list: list[str] + """ + + _attribute_map = { + 'node_type_inclusion_list': {'key': 'NodeTypeInclusionList', 'type': '[str]'}, + 'application_inclusion_list': {'key': 'ApplicationInclusionList', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword node_type_inclusion_list: A list of node types to include in Chaos faults. + All types of faults (restart node, restart code package, remove replica, restart replica, move + primary, and move secondary) are enabled for the nodes of these node types. + If a node type (say NodeTypeX) does not appear in the NodeTypeInclusionList, then node level + faults (like NodeRestart) will never be enabled for the nodes of + NodeTypeX, but code package and replica faults can still be enabled for NodeTypeX if an + application in the ApplicationInclusionList. + happens to reside on a node of NodeTypeX. + At most 100 node type names can be included in this list, to increase this number, a config + upgrade is required for MaxNumberOfNodeTypesInChaosEntityFilter configuration. + :paramtype node_type_inclusion_list: list[str] + :keyword application_inclusion_list: A list of application URIs to include in Chaos faults. + All replicas belonging to services of these applications are amenable to replica faults + (restart replica, remove replica, move primary, and move secondary) by Chaos. + Chaos may restart a code package only if the code package hosts replicas of these applications + only. + If an application does not appear in this list, it can still be faulted in some Chaos + iteration if the application ends up on a node of a node type that is included in + NodeTypeInclusionList. + However, if applicationX is tied to nodeTypeY through placement constraints and applicationX + is absent from ApplicationInclusionList and nodeTypeY is absent from NodeTypeInclusionList, + then applicationX will never be faulted. + At most 1000 application names can be included in this list, to increase this number, a config + upgrade is required for MaxNumberOfApplicationsInChaosEntityFilter configuration. + :paramtype application_inclusion_list: list[str] + """ + super(ChaosTargetFilter, self).__init__(**kwargs) + self.node_type_inclusion_list = kwargs.get('node_type_inclusion_list', None) + self.application_inclusion_list = kwargs.get('application_inclusion_list', None) + + +class PropertyBatchOperation(msrest.serialization.Model): + """Represents the base type for property operations that can be put into a batch and submitted. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CheckExistsPropertyBatchOperation, CheckSequencePropertyBatchOperation, CheckValuePropertyBatchOperation, DeletePropertyBatchOperation, GetPropertyBatchOperation, PutPropertyBatchOperation. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch operation, determined by the operation to be + performed. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind + :ivar property_name: Required. The name of the Service Fabric property. + :vartype property_name: str + """ + + _validation = { + 'kind': {'required': True}, + 'property_name': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CheckExists': 'CheckExistsPropertyBatchOperation', 'CheckSequence': 'CheckSequencePropertyBatchOperation', 'CheckValue': 'CheckValuePropertyBatchOperation', 'Delete': 'DeletePropertyBatchOperation', 'Get': 'GetPropertyBatchOperation', 'Put': 'PutPropertyBatchOperation'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword property_name: Required. The name of the Service Fabric property. + :paramtype property_name: str + """ + super(PropertyBatchOperation, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.property_name = kwargs['property_name'] + + +class CheckExistsPropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that compares the Boolean existence of a property with the Exists argument. +The PropertyBatchOperation operation fails if the property's existence is not equal to the Exists argument. +The CheckExistsPropertyBatchOperation is generally used as a precondition for the write operations in the batch. +Note that if one PropertyBatchOperation in a PropertyBatch fails, +the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch operation, determined by the operation to be + performed. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind + :ivar property_name: Required. The name of the Service Fabric property. + :vartype property_name: str + :ivar exists: Required. Whether or not the property should exist for the operation to pass. + :vartype exists: bool + """ + + _validation = { + 'kind': {'required': True}, + 'property_name': {'required': True}, + 'exists': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'exists': {'key': 'Exists', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword property_name: Required. The name of the Service Fabric property. + :paramtype property_name: str + :keyword exists: Required. Whether or not the property should exist for the operation to pass. + :paramtype exists: bool + """ + super(CheckExistsPropertyBatchOperation, self).__init__(**kwargs) + self.kind = 'CheckExists' # type: str + self.exists = kwargs['exists'] + + +class CheckSequencePropertyBatchOperation(PropertyBatchOperation): + """Compares the Sequence Number of a property with the SequenceNumber argument. +A property's sequence number can be thought of as that property's version. +Every time the property is modified, its sequence number is increased. +The sequence number can be found in a property's metadata. +The comparison fails if the sequence numbers are not equal. +CheckSequencePropertyBatchOperation is generally used as a precondition for the write operations in the batch. +Note that if one PropertyBatchOperation in a PropertyBatch fails, +the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch operation, determined by the operation to be + performed. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind + :ivar property_name: Required. The name of the Service Fabric property. + :vartype property_name: str + :ivar sequence_number: Required. The expected sequence number. + :vartype sequence_number: str + """ + + _validation = { + 'kind': {'required': True}, + 'property_name': {'required': True}, + 'sequence_number': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword property_name: Required. The name of the Service Fabric property. + :paramtype property_name: str + :keyword sequence_number: Required. The expected sequence number. + :paramtype sequence_number: str + """ + super(CheckSequencePropertyBatchOperation, self).__init__(**kwargs) + self.kind = 'CheckSequence' # type: str + self.sequence_number = kwargs['sequence_number'] + + +class CheckValuePropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that compares the value of the property with the expected value. +The CheckValuePropertyBatchOperation is generally used as a precondition for the write operations in the batch. +Note that if one PropertyBatchOperation in a PropertyBatch fails, +the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch operation, determined by the operation to be + performed. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind + :ivar property_name: Required. The name of the Service Fabric property. + :vartype property_name: str + :ivar value: Required. The expected property value. + :vartype value: ~azure.servicefabric.models.PropertyValue + """ + + _validation = { + 'kind': {'required': True}, + 'property_name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword property_name: Required. The name of the Service Fabric property. + :paramtype property_name: str + :keyword value: Required. The expected property value. + :paramtype value: ~azure.servicefabric.models.PropertyValue + """ + super(CheckValuePropertyBatchOperation, self).__init__(**kwargs) + self.kind = 'CheckValue' # type: str + self.value = kwargs['value'] + + +class ClusterConfiguration(msrest.serialization.Model): + """Information about the standalone cluster configuration. + + :ivar cluster_configuration: The contents of the cluster configuration file. + :vartype cluster_configuration: str + """ + + _attribute_map = { + 'cluster_configuration': {'key': 'ClusterConfiguration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword cluster_configuration: The contents of the cluster configuration file. + :paramtype cluster_configuration: str + """ + super(ClusterConfiguration, self).__init__(**kwargs) + self.cluster_configuration = kwargs.get('cluster_configuration', None) + + +class ClusterConfigurationUpgradeDescription(msrest.serialization.Model): + """Describes the parameters for a standalone cluster configuration upgrade. + + All required parameters must be populated in order to send to Azure. + + :ivar cluster_config: Required. The cluster configuration as a JSON string. For example, `this + file + `_ + contains JSON describing the `nodes and other properties of the cluster + `_. + :vartype cluster_config: str + :ivar health_check_retry_timeout: The length of time between attempts to perform health checks + if the application or cluster is not healthy. + :vartype health_check_retry_timeout: ~datetime.timedelta + :ivar health_check_wait_duration_in_seconds: The length of time to wait after completing an + upgrade domain before starting the health checks process. + :vartype health_check_wait_duration_in_seconds: ~datetime.timedelta + :ivar health_check_stable_duration_in_seconds: The length of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade domain. + :vartype health_check_stable_duration_in_seconds: ~datetime.timedelta + :ivar upgrade_domain_timeout_in_seconds: The timeout for the upgrade domain. + :vartype upgrade_domain_timeout_in_seconds: ~datetime.timedelta + :ivar upgrade_timeout_in_seconds: The upgrade timeout. + :vartype upgrade_timeout_in_seconds: ~datetime.timedelta + :ivar max_percent_unhealthy_applications: The maximum allowed percentage of unhealthy + applications during the upgrade. Allowed values are integer values from zero to 100. + :vartype max_percent_unhealthy_applications: int + :ivar max_percent_unhealthy_nodes: The maximum allowed percentage of unhealthy nodes during the + upgrade. Allowed values are integer values from zero to 100. + :vartype max_percent_unhealthy_nodes: int + :ivar max_percent_delta_unhealthy_nodes: The maximum allowed percentage of delta health + degradation during the upgrade. Allowed values are integer values from zero to 100. + :vartype max_percent_delta_unhealthy_nodes: int + :ivar max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum allowed percentage of + upgrade domain delta health degradation during the upgrade. Allowed values are integer values + from zero to 100. + :vartype max_percent_upgrade_domain_delta_unhealthy_nodes: int + :ivar application_health_policies: Defines the application health policy map used to evaluate + the health of an application or one of its children entities. + :vartype application_health_policies: ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _validation = { + 'cluster_config': {'required': True}, + } + + _attribute_map = { + 'cluster_config': {'key': 'ClusterConfig', 'type': 'str'}, + 'health_check_retry_timeout': {'key': 'HealthCheckRetryTimeout', 'type': 'duration'}, + 'health_check_wait_duration_in_seconds': {'key': 'HealthCheckWaitDurationInSeconds', 'type': 'duration'}, + 'health_check_stable_duration_in_seconds': {'key': 'HealthCheckStableDurationInSeconds', 'type': 'duration'}, + 'upgrade_domain_timeout_in_seconds': {'key': 'UpgradeDomainTimeoutInSeconds', 'type': 'duration'}, + 'upgrade_timeout_in_seconds': {'key': 'UpgradeTimeoutInSeconds', 'type': 'duration'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, + 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword cluster_config: Required. The cluster configuration as a JSON string. For example, + `this file + `_ + contains JSON describing the `nodes and other properties of the cluster + `_. + :paramtype cluster_config: str + :keyword health_check_retry_timeout: The length of time between attempts to perform health + checks if the application or cluster is not healthy. + :paramtype health_check_retry_timeout: ~datetime.timedelta + :keyword health_check_wait_duration_in_seconds: The length of time to wait after completing an + upgrade domain before starting the health checks process. + :paramtype health_check_wait_duration_in_seconds: ~datetime.timedelta + :keyword health_check_stable_duration_in_seconds: The length of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade domain. + :paramtype health_check_stable_duration_in_seconds: ~datetime.timedelta + :keyword upgrade_domain_timeout_in_seconds: The timeout for the upgrade domain. + :paramtype upgrade_domain_timeout_in_seconds: ~datetime.timedelta + :keyword upgrade_timeout_in_seconds: The upgrade timeout. + :paramtype upgrade_timeout_in_seconds: ~datetime.timedelta + :keyword max_percent_unhealthy_applications: The maximum allowed percentage of unhealthy + applications during the upgrade. Allowed values are integer values from zero to 100. + :paramtype max_percent_unhealthy_applications: int + :keyword max_percent_unhealthy_nodes: The maximum allowed percentage of unhealthy nodes during + the upgrade. Allowed values are integer values from zero to 100. + :paramtype max_percent_unhealthy_nodes: int + :keyword max_percent_delta_unhealthy_nodes: The maximum allowed percentage of delta health + degradation during the upgrade. Allowed values are integer values from zero to 100. + :paramtype max_percent_delta_unhealthy_nodes: int + :keyword max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum allowed percentage of + upgrade domain delta health degradation during the upgrade. Allowed values are integer values + from zero to 100. + :paramtype max_percent_upgrade_domain_delta_unhealthy_nodes: int + :keyword application_health_policies: Defines the application health policy map used to + evaluate the health of an application or one of its children entities. + :paramtype application_health_policies: ~azure.servicefabric.models.ApplicationHealthPolicies + """ + super(ClusterConfigurationUpgradeDescription, self).__init__(**kwargs) + self.cluster_config = kwargs['cluster_config'] + self.health_check_retry_timeout = kwargs.get('health_check_retry_timeout', "PT0H0M0S") + self.health_check_wait_duration_in_seconds = kwargs.get('health_check_wait_duration_in_seconds', "PT0H0M0S") + self.health_check_stable_duration_in_seconds = kwargs.get('health_check_stable_duration_in_seconds', "PT0H0M0S") + self.upgrade_domain_timeout_in_seconds = kwargs.get('upgrade_domain_timeout_in_seconds', "PT0H0M0S") + self.upgrade_timeout_in_seconds = kwargs.get('upgrade_timeout_in_seconds', "PT0H0M0S") + self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', 0) + self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', 0) + self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', 0) + self.max_percent_upgrade_domain_delta_unhealthy_nodes = kwargs.get('max_percent_upgrade_domain_delta_unhealthy_nodes', 0) + self.application_health_policies = kwargs.get('application_health_policies', None) + + +class ClusterConfigurationUpgradeStatusInfo(msrest.serialization.Model): + """Information about a standalone cluster configuration upgrade status. + + :ivar upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", + "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", + "RollingForwardInProgress", "RollingForwardCompleted", "Failed". + :vartype upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :ivar progress_status: The cluster manifest version. + :vartype progress_status: int + :ivar config_version: The cluster configuration version. + :vartype config_version: str + :ivar details: The cluster upgrade status details. + :vartype details: str + """ + + _attribute_map = { + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'progress_status': {'key': 'ProgressStatus', 'type': 'int'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'details': {'key': 'Details', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", + "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", + "RollingForwardInProgress", "RollingForwardCompleted", "Failed". + :paramtype upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :keyword progress_status: The cluster manifest version. + :paramtype progress_status: int + :keyword config_version: The cluster configuration version. + :paramtype config_version: str + :keyword details: The cluster upgrade status details. + :paramtype details: str + """ + super(ClusterConfigurationUpgradeStatusInfo, self).__init__(**kwargs) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.progress_status = kwargs.get('progress_status', None) + self.config_version = kwargs.get('config_version', None) + self.details = kwargs.get('details', None) + + +class ClusterHealth(EntityHealth): + """Represents the health of the cluster. +Contains the cluster aggregated health state, the cluster application and node health states as well as the health events and the unhealthy evaluations. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar node_health_states: Cluster node health states as found in the health store. + :vartype node_health_states: list[~azure.servicefabric.models.NodeHealthState] + :ivar application_health_states: Cluster application health states as found in the health + store. + :vartype application_health_states: list[~azure.servicefabric.models.ApplicationHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'node_health_states': {'key': 'NodeHealthStates', 'type': '[NodeHealthState]'}, + 'application_health_states': {'key': 'ApplicationHealthStates', 'type': '[ApplicationHealthState]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword node_health_states: Cluster node health states as found in the health store. + :paramtype node_health_states: list[~azure.servicefabric.models.NodeHealthState] + :keyword application_health_states: Cluster application health states as found in the health + store. + :paramtype application_health_states: list[~azure.servicefabric.models.ApplicationHealthState] + """ + super(ClusterHealth, self).__init__(**kwargs) + self.node_health_states = kwargs.get('node_health_states', None) + self.application_health_states = kwargs.get('application_health_states', None) + + +class ClusterHealthChunk(msrest.serialization.Model): + """Represents the health chunk of the cluster. +Contains the cluster aggregated health state, and the cluster entities that respect the input filter. + + :ivar health_state: The HealthState representing the aggregated health state of the cluster + computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired cluster health policy and the application + health policies. Possible values include: "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar node_health_state_chunks: The list of node health state chunks in the cluster that + respect the filters in the cluster health chunk query description. + :vartype node_health_state_chunks: ~azure.servicefabric.models.NodeHealthStateChunkList + :ivar application_health_state_chunks: The list of application health state chunks in the + cluster that respect the filters in the cluster health chunk query description. + :vartype application_health_state_chunks: + ~azure.servicefabric.models.ApplicationHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_health_state_chunks': {'key': 'NodeHealthStateChunks', 'type': 'NodeHealthStateChunkList'}, + 'application_health_state_chunks': {'key': 'ApplicationHealthStateChunks', 'type': 'ApplicationHealthStateChunkList'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword health_state: The HealthState representing the aggregated health state of the cluster + computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired cluster health policy and the application + health policies. Possible values include: "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword node_health_state_chunks: The list of node health state chunks in the cluster that + respect the filters in the cluster health chunk query description. + :paramtype node_health_state_chunks: ~azure.servicefabric.models.NodeHealthStateChunkList + :keyword application_health_state_chunks: The list of application health state chunks in the + cluster that respect the filters in the cluster health chunk query description. + :paramtype application_health_state_chunks: + ~azure.servicefabric.models.ApplicationHealthStateChunkList + """ + super(ClusterHealthChunk, self).__init__(**kwargs) + self.health_state = kwargs.get('health_state', None) + self.node_health_state_chunks = kwargs.get('node_health_state_chunks', None) + self.application_health_state_chunks = kwargs.get('application_health_state_chunks', None) + + +class ClusterHealthChunkQueryDescription(msrest.serialization.Model): + """The cluster health chunk query description, which can specify the health policies to evaluate cluster health and very expressive filters to select which cluster entities to include in response. + + :ivar node_filters: Defines a list of filters that specify which nodes to be included in the + returned cluster health chunk. + If no filters are specified, no nodes are returned. All the nodes are used to evaluate the + cluster's aggregated health state, regardless of the input filters. + The cluster health chunk query may specify multiple node filters. + For example, it can specify a filter to return all nodes with health state Error and another + filter to always include a node identified by its NodeName. + :vartype node_filters: list[~azure.servicefabric.models.NodeHealthStateFilter] + :ivar application_filters: Defines a list of filters that specify which applications to be + included in the returned cluster health chunk. + If no filters are specified, no applications are returned. All the applications are used to + evaluate the cluster's aggregated health state, regardless of the input filters. + The cluster health chunk query may specify multiple application filters. + For example, it can specify a filter to return all applications with health state Error and + another filter to always include applications of a specified application type. + :vartype application_filters: list[~azure.servicefabric.models.ApplicationHealthStateFilter] + :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster + or of a cluster node. + :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :ivar application_health_policies: Defines the application health policy map used to evaluate + the health of an application or one of its children entities. + :vartype application_health_policies: ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _attribute_map = { + 'node_filters': {'key': 'NodeFilters', 'type': '[NodeHealthStateFilter]'}, + 'application_filters': {'key': 'ApplicationFilters', 'type': '[ApplicationHealthStateFilter]'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword node_filters: Defines a list of filters that specify which nodes to be included in the + returned cluster health chunk. + If no filters are specified, no nodes are returned. All the nodes are used to evaluate the + cluster's aggregated health state, regardless of the input filters. + The cluster health chunk query may specify multiple node filters. + For example, it can specify a filter to return all nodes with health state Error and another + filter to always include a node identified by its NodeName. + :paramtype node_filters: list[~azure.servicefabric.models.NodeHealthStateFilter] + :keyword application_filters: Defines a list of filters that specify which applications to be + included in the returned cluster health chunk. + If no filters are specified, no applications are returned. All the applications are used to + evaluate the cluster's aggregated health state, regardless of the input filters. + The cluster health chunk query may specify multiple application filters. + For example, it can specify a filter to return all applications with health state Error and + another filter to always include applications of a specified application type. + :paramtype application_filters: list[~azure.servicefabric.models.ApplicationHealthStateFilter] + :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the + cluster or of a cluster node. + :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :keyword application_health_policies: Defines the application health policy map used to + evaluate the health of an application or one of its children entities. + :paramtype application_health_policies: ~azure.servicefabric.models.ApplicationHealthPolicies + """ + super(ClusterHealthChunkQueryDescription, self).__init__(**kwargs) + self.node_filters = kwargs.get('node_filters', None) + self.application_filters = kwargs.get('application_filters', None) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.application_health_policies = kwargs.get('application_health_policies', None) + + +class ClusterHealthPolicies(msrest.serialization.Model): + """Health policies to evaluate cluster health. + + :ivar application_health_policy_map: Defines a map that contains specific application health + policies for different applications. + Each entry specifies as key the application name and as value an ApplicationHealthPolicy used + to evaluate the application health. + If an application is not specified in the map, the application health evaluation uses the + ApplicationHealthPolicy found in its application manifest or the default application health + policy (if no health policy is defined in the manifest). + The map is empty by default. + :vartype application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster + or of a cluster node. + :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword application_health_policy_map: Defines a map that contains specific application health + policies for different applications. + Each entry specifies as key the application name and as value an ApplicationHealthPolicy used + to evaluate the application health. + If an application is not specified in the map, the application health evaluation uses the + ApplicationHealthPolicy found in its application manifest or the default application health + policy (if no health policy is defined in the manifest). + The map is empty by default. + :paramtype application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the + cluster or of a cluster node. + :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + """ + super(ClusterHealthPolicies, self).__init__(**kwargs) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + + +class ClusterHealthPolicy(msrest.serialization.Model): + """Defines a health policy used to evaluate the health of the cluster or of a cluster node. + + :ivar consider_warning_as_error: Indicates whether warnings are treated with the same severity + as errors. + :vartype consider_warning_as_error: bool + :ivar max_percent_unhealthy_nodes: The maximum allowed percentage of unhealthy nodes before + reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10. + + The percentage represents the maximum tolerated percentage of nodes that can be unhealthy + before the cluster is considered in error. + If the percentage is respected but there is at least one unhealthy node, the health is + evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes over the total number + of nodes in the cluster. + The computation rounds up to tolerate one failure on small numbers of nodes. Default + percentage is zero. + + In large clusters, some nodes will always be down or out for repairs, so this percentage + should be configured to tolerate that. + :vartype max_percent_unhealthy_nodes: int + :ivar max_percent_unhealthy_applications: The maximum allowed percentage of unhealthy + applications before reporting an error. For example, to allow 10% of applications to be + unhealthy, this value would be 10. + + The percentage represents the maximum tolerated percentage of applications that can be + unhealthy before the cluster is considered in error. + If the percentage is respected but there is at least one unhealthy application, the health is + evaluated as Warning. + This is calculated by dividing the number of unhealthy applications over the total number of + application instances in the cluster, excluding applications of application types that are + included in the ApplicationTypeHealthPolicyMap. + The computation rounds up to tolerate one failure on small numbers of applications. Default + percentage is zero. + :vartype max_percent_unhealthy_applications: int + :ivar application_type_health_policy_map: Defines a map with max percentage unhealthy + applications for specific application types. + Each entry specifies as key the application type name and as value an integer that represents + the MaxPercentUnhealthyApplications percentage used to evaluate the applications of the + specified application type. + + The application type health policy map can be used during cluster health evaluation to + describe special application types. + The application types included in the map are evaluated against the percentage specified in + the map, and not with the global MaxPercentUnhealthyApplications defined in the cluster health + policy. + The applications of application types specified in the map are not counted against the global + pool of applications. + For example, if some applications of a type are critical, the cluster administrator can add an + entry to the map for that application type + and assign it a value of 0% (that is, do not tolerate any failures). + All other applications can be evaluated with MaxPercentUnhealthyApplications set to 20% to + tolerate some failures out of the thousands of application instances. + The application type health policy map is used only if the cluster manifest enables + application type health evaluation using the configuration entry for + HealthManager/EnableApplicationTypeHealthEvaluation. + :vartype application_type_health_policy_map: + list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] + :ivar node_type_health_policy_map: Defines a map with max percentage unhealthy nodes for + specific node types. + Each entry specifies as key the node type name and as value an integer that represents the + MaxPercentUnhealthyNodes percentage used to evaluate the nodes of the specified node type. + + The node type health policy map can be used during cluster health evaluation to describe + special node types. + They are evaluated against the percentages associated with their node type name in the map. + Setting this has no impact on the global pool of nodes used for MaxPercentUnhealthyNodes. + The node type health policy map is used only if the cluster manifest enables node type health + evaluation using the configuration entry for HealthManager/EnableNodeTypeHealthEvaluation. + + For example, given a cluster with many nodes of different types, with important work hosted on + node type "SpecialNodeType" that should not tolerate any nodes down. + You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some failures for all + nodes, but for the node type "SpecialNodeType", set the MaxPercentUnhealthyNodes to 0 by + setting the value in the key value pair in NodeTypeHealthPolicyMapItem. The key is the node + type name. + This way, as long as no nodes of type "SpecialNodeType" are in Error state, + even if some of the many nodes in the global pool are in Error state, but below the global + unhealthy percentage, the cluster would be evaluated to Warning. + A Warning health state does not impact cluster upgrade or other monitoring triggered by Error + health state. + But even one node of type SpecialNodeType in Error would make cluster unhealthy (in Error + rather than Warning/Ok), which triggers rollback or pauses the cluster upgrade, depending on + the upgrade configuration. + + Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting SpecialNodeType's + max percent unhealthy nodes to 100, + with one node of type SpecialNodeType in Error state would still put the cluster in an Error + state, since the global restriction is more strict in this case. + :vartype node_type_health_policy_map: + list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] + """ + + _attribute_map = { + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'application_type_health_policy_map': {'key': 'ApplicationTypeHealthPolicyMap', 'type': '[ApplicationTypeHealthPolicyMapItem]'}, + 'node_type_health_policy_map': {'key': 'NodeTypeHealthPolicyMap', 'type': '[NodeTypeHealthPolicyMapItem]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword consider_warning_as_error: Indicates whether warnings are treated with the same + severity as errors. + :paramtype consider_warning_as_error: bool + :keyword max_percent_unhealthy_nodes: The maximum allowed percentage of unhealthy nodes before + reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10. + + The percentage represents the maximum tolerated percentage of nodes that can be unhealthy + before the cluster is considered in error. + If the percentage is respected but there is at least one unhealthy node, the health is + evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes over the total number + of nodes in the cluster. + The computation rounds up to tolerate one failure on small numbers of nodes. Default + percentage is zero. + + In large clusters, some nodes will always be down or out for repairs, so this percentage + should be configured to tolerate that. + :paramtype max_percent_unhealthy_nodes: int + :keyword max_percent_unhealthy_applications: The maximum allowed percentage of unhealthy + applications before reporting an error. For example, to allow 10% of applications to be + unhealthy, this value would be 10. + + The percentage represents the maximum tolerated percentage of applications that can be + unhealthy before the cluster is considered in error. + If the percentage is respected but there is at least one unhealthy application, the health is + evaluated as Warning. + This is calculated by dividing the number of unhealthy applications over the total number of + application instances in the cluster, excluding applications of application types that are + included in the ApplicationTypeHealthPolicyMap. + The computation rounds up to tolerate one failure on small numbers of applications. Default + percentage is zero. + :paramtype max_percent_unhealthy_applications: int + :keyword application_type_health_policy_map: Defines a map with max percentage unhealthy + applications for specific application types. + Each entry specifies as key the application type name and as value an integer that represents + the MaxPercentUnhealthyApplications percentage used to evaluate the applications of the + specified application type. + + The application type health policy map can be used during cluster health evaluation to + describe special application types. + The application types included in the map are evaluated against the percentage specified in + the map, and not with the global MaxPercentUnhealthyApplications defined in the cluster health + policy. + The applications of application types specified in the map are not counted against the global + pool of applications. + For example, if some applications of a type are critical, the cluster administrator can add an + entry to the map for that application type + and assign it a value of 0% (that is, do not tolerate any failures). + All other applications can be evaluated with MaxPercentUnhealthyApplications set to 20% to + tolerate some failures out of the thousands of application instances. + The application type health policy map is used only if the cluster manifest enables + application type health evaluation using the configuration entry for + HealthManager/EnableApplicationTypeHealthEvaluation. + :paramtype application_type_health_policy_map: + list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] + :keyword node_type_health_policy_map: Defines a map with max percentage unhealthy nodes for + specific node types. + Each entry specifies as key the node type name and as value an integer that represents the + MaxPercentUnhealthyNodes percentage used to evaluate the nodes of the specified node type. + + The node type health policy map can be used during cluster health evaluation to describe + special node types. + They are evaluated against the percentages associated with their node type name in the map. + Setting this has no impact on the global pool of nodes used for MaxPercentUnhealthyNodes. + The node type health policy map is used only if the cluster manifest enables node type health + evaluation using the configuration entry for HealthManager/EnableNodeTypeHealthEvaluation. + + For example, given a cluster with many nodes of different types, with important work hosted on + node type "SpecialNodeType" that should not tolerate any nodes down. + You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some failures for all + nodes, but for the node type "SpecialNodeType", set the MaxPercentUnhealthyNodes to 0 by + setting the value in the key value pair in NodeTypeHealthPolicyMapItem. The key is the node + type name. + This way, as long as no nodes of type "SpecialNodeType" are in Error state, + even if some of the many nodes in the global pool are in Error state, but below the global + unhealthy percentage, the cluster would be evaluated to Warning. + A Warning health state does not impact cluster upgrade or other monitoring triggered by Error + health state. + But even one node of type SpecialNodeType in Error would make cluster unhealthy (in Error + rather than Warning/Ok), which triggers rollback or pauses the cluster upgrade, depending on + the upgrade configuration. + + Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting SpecialNodeType's + max percent unhealthy nodes to 100, + with one node of type SpecialNodeType in Error state would still put the cluster in an Error + state, since the global restriction is more strict in this case. + :paramtype node_type_health_policy_map: + list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] + """ + super(ClusterHealthPolicy, self).__init__(**kwargs) + self.consider_warning_as_error = kwargs.get('consider_warning_as_error', False) + self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', 0) + self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', 0) + self.application_type_health_policy_map = kwargs.get('application_type_health_policy_map', None) + self.node_type_health_policy_map = kwargs.get('node_type_health_policy_map', None) + + +class ClusterHealthReportExpiredEvent(ClusterEvent): + """Cluster Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(ClusterHealthReportExpiredEvent, self).__init__(**kwargs) + self.kind = 'ClusterHealthReportExpired' # type: str + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class ClusterLoadInfo(msrest.serialization.Model): + """Information about load in a Service Fabric cluster. It holds a summary of all metrics and their load in a cluster. + + :ivar last_balancing_start_time_utc: The starting time of last resource balancing run. + :vartype last_balancing_start_time_utc: ~datetime.datetime + :ivar last_balancing_end_time_utc: The end time of last resource balancing run. + :vartype last_balancing_end_time_utc: ~datetime.datetime + :ivar load_metric_information: List that contains metrics and their load information in this + cluster. + :vartype load_metric_information: list[~azure.servicefabric.models.LoadMetricInformation] + """ + + _attribute_map = { + 'last_balancing_start_time_utc': {'key': 'LastBalancingStartTimeUtc', 'type': 'iso-8601'}, + 'last_balancing_end_time_utc': {'key': 'LastBalancingEndTimeUtc', 'type': 'iso-8601'}, + 'load_metric_information': {'key': 'LoadMetricInformation', 'type': '[LoadMetricInformation]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword last_balancing_start_time_utc: The starting time of last resource balancing run. + :paramtype last_balancing_start_time_utc: ~datetime.datetime + :keyword last_balancing_end_time_utc: The end time of last resource balancing run. + :paramtype last_balancing_end_time_utc: ~datetime.datetime + :keyword load_metric_information: List that contains metrics and their load information in this + cluster. + :paramtype load_metric_information: list[~azure.servicefabric.models.LoadMetricInformation] + """ + super(ClusterLoadInfo, self).__init__(**kwargs) + self.last_balancing_start_time_utc = kwargs.get('last_balancing_start_time_utc', None) + self.last_balancing_end_time_utc = kwargs.get('last_balancing_end_time_utc', None) + self.load_metric_information = kwargs.get('load_metric_information', None) + + +class ClusterManifest(msrest.serialization.Model): + """Information about the cluster manifest. + + :ivar manifest: The contents of the cluster manifest file. + :vartype manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword manifest: The contents of the cluster manifest file. + :paramtype manifest: str + """ + super(ClusterManifest, self).__init__(**kwargs) + self.manifest = kwargs.get('manifest', None) + + +class ClusterNewHealthReportEvent(ClusterEvent): + """Cluster Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(ClusterNewHealthReportEvent, self).__init__(**kwargs) + self.kind = 'ClusterNewHealthReport' # type: str + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class ClusterUpgradeCompletedEvent(ClusterEvent): + """Cluster Upgrade Completed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar target_cluster_version: Required. Target Cluster version. + :vartype target_cluster_version: str + :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in + milli-seconds. + :vartype overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'target_cluster_version': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword target_cluster_version: Required. Target Cluster version. + :paramtype target_cluster_version: str + :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in + milli-seconds. + :paramtype overall_upgrade_elapsed_time_in_ms: float + """ + super(ClusterUpgradeCompletedEvent, self).__init__(**kwargs) + self.kind = 'ClusterUpgradeCompleted' # type: str + self.target_cluster_version = kwargs['target_cluster_version'] + self.overall_upgrade_elapsed_time_in_ms = kwargs['overall_upgrade_elapsed_time_in_ms'] + + +class ClusterUpgradeDescriptionObject(msrest.serialization.Model): + """Represents a ServiceFabric cluster upgrade. + + :ivar config_version: The cluster configuration version (specified in the cluster manifest). + :vartype config_version: str + :ivar code_version: The ServiceFabric code version of the cluster. + :vartype code_version: str + :ivar upgrade_kind: The kind of upgrade out of the following possible values. Possible values + include: "Invalid", "Rolling". Default value: "Rolling". + :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :vartype upgrade_replica_set_check_timeout_in_seconds: long + :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when + the code version has not changed (the upgrade only changes configuration or data). + :vartype force_restart: bool + :ivar sort_order: Defines the order in which an upgrade proceeds through the cluster. Possible + values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + :vartype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :ivar enable_delta_health_evaluation: When true, enables delta health evaluation rather than + absolute health evaluation after completion of each upgrade domain. + :vartype enable_delta_health_evaluation: bool + :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. + :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster + or of a cluster node. + :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :ivar cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of the + cluster during a cluster upgrade. + :vartype cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :ivar application_health_policy_map: Represents the map of application health policies for a + ServiceFabric cluster upgrade. + :vartype application_health_policy_map: + ~azure.servicefabric.models.ApplicationHealthPolicyMapObject + """ + + _attribute_map = { + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicyMapObject'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword config_version: The cluster configuration version (specified in the cluster manifest). + :paramtype config_version: str + :keyword code_version: The ServiceFabric code version of the cluster. + :paramtype code_version: str + :keyword upgrade_kind: The kind of upgrade out of the following possible values. Possible + values include: "Invalid", "Rolling". Default value: "Rolling". + :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :paramtype upgrade_replica_set_check_timeout_in_seconds: long + :keyword force_restart: If true, then processes are forcefully restarted during upgrade even + when the code version has not changed (the upgrade only changes configuration or data). + :paramtype force_restart: bool + :keyword sort_order: Defines the order in which an upgrade proceeds through the cluster. + Possible values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + :paramtype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :keyword enable_delta_health_evaluation: When true, enables delta health evaluation rather than + absolute health evaluation after completion of each upgrade domain. + :paramtype enable_delta_health_evaluation: bool + :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored + mode. + :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the + cluster or of a cluster node. + :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :keyword cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of + the cluster during a cluster upgrade. + :paramtype cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :keyword application_health_policy_map: Represents the map of application health policies for a + ServiceFabric cluster upgrade. + :paramtype application_health_policy_map: + ~azure.servicefabric.models.ApplicationHealthPolicyMapObject + """ + super(ClusterUpgradeDescriptionObject, self).__init__(**kwargs) + self.config_version = kwargs.get('config_version', None) + self.code_version = kwargs.get('code_version', None) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925) + self.force_restart = kwargs.get('force_restart', False) + self.sort_order = kwargs.get('sort_order', "Default") + self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) + self.monitoring_policy = kwargs.get('monitoring_policy', None) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) + + +class ClusterUpgradeDomainCompletedEvent(ClusterEvent): + """Cluster Upgrade Domain Completed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar target_cluster_version: Required. Target Cluster version. + :vartype target_cluster_version: str + :ivar upgrade_state: Required. State of upgrade. + :vartype upgrade_state: str + :ivar upgrade_domains: Required. Upgrade domains. + :vartype upgrade_domains: str + :ivar upgrade_domain_elapsed_time_in_ms: Required. Duration of domain upgrade in milli-seconds. + :vartype upgrade_domain_elapsed_time_in_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'target_cluster_version': {'required': True}, + 'upgrade_state': {'required': True}, + 'upgrade_domains': {'required': True}, + 'upgrade_domain_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, + 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword target_cluster_version: Required. Target Cluster version. + :paramtype target_cluster_version: str + :keyword upgrade_state: Required. State of upgrade. + :paramtype upgrade_state: str + :keyword upgrade_domains: Required. Upgrade domains. + :paramtype upgrade_domains: str + :keyword upgrade_domain_elapsed_time_in_ms: Required. Duration of domain upgrade in + milli-seconds. + :paramtype upgrade_domain_elapsed_time_in_ms: float + """ + super(ClusterUpgradeDomainCompletedEvent, self).__init__(**kwargs) + self.kind = 'ClusterUpgradeDomainCompleted' # type: str + self.target_cluster_version = kwargs['target_cluster_version'] + self.upgrade_state = kwargs['upgrade_state'] + self.upgrade_domains = kwargs['upgrade_domains'] + self.upgrade_domain_elapsed_time_in_ms = kwargs['upgrade_domain_elapsed_time_in_ms'] + + +class ClusterUpgradeHealthPolicyObject(msrest.serialization.Model): + """Defines a health policy used to evaluate the health of the cluster during a cluster upgrade. + + :ivar max_percent_delta_unhealthy_nodes: The maximum allowed percentage of nodes health + degradation allowed during cluster upgrades. The delta is measured between the state of the + nodes at the beginning of upgrade and the state of the nodes at the time of the health + evaluation. The check is performed after every upgrade domain upgrade completion to make sure + the global state of the cluster is within tolerated limits. The default value is 10%. + :vartype max_percent_delta_unhealthy_nodes: int + :ivar max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum allowed percentage of + upgrade domain nodes health degradation allowed during cluster upgrades. The delta is measured + between the state of the upgrade domain nodes at the beginning of upgrade and the state of the + upgrade domain nodes at the time of the health evaluation. The check is performed after every + upgrade domain upgrade completion for all completed upgrade domains to make sure the state of + the upgrade domains is within tolerated limits. The default value is 15%. + :vartype max_percent_upgrade_domain_delta_unhealthy_nodes: int + """ + + _validation = { + 'max_percent_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword max_percent_delta_unhealthy_nodes: The maximum allowed percentage of nodes health + degradation allowed during cluster upgrades. The delta is measured between the state of the + nodes at the beginning of upgrade and the state of the nodes at the time of the health + evaluation. The check is performed after every upgrade domain upgrade completion to make sure + the global state of the cluster is within tolerated limits. The default value is 10%. + :paramtype max_percent_delta_unhealthy_nodes: int + :keyword max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum allowed percentage of + upgrade domain nodes health degradation allowed during cluster upgrades. The delta is measured + between the state of the upgrade domain nodes at the beginning of upgrade and the state of the + upgrade domain nodes at the time of the health evaluation. The check is performed after every + upgrade domain upgrade completion for all completed upgrade domains to make sure the state of + the upgrade domains is within tolerated limits. The default value is 15%. + :paramtype max_percent_upgrade_domain_delta_unhealthy_nodes: int + """ + super(ClusterUpgradeHealthPolicyObject, self).__init__(**kwargs) + self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) + self.max_percent_upgrade_domain_delta_unhealthy_nodes = kwargs.get('max_percent_upgrade_domain_delta_unhealthy_nodes', None) + + +class ClusterUpgradeProgressObject(msrest.serialization.Model): + """Information about a cluster upgrade. + + :ivar code_version: The ServiceFabric code version of the cluster. + :vartype code_version: str + :ivar config_version: The cluster configuration version (specified in the cluster manifest). + :vartype config_version: str + :ivar upgrade_domains: List of upgrade domains and their statuses. Not applicable to + node-by-node upgrades. + :vartype upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] + :ivar upgrade_units: List of upgrade units and their statuses. + :vartype upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] + :ivar upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", + "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", + "RollingForwardInProgress", "RollingForwardCompleted", "Failed". + :vartype upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :ivar next_upgrade_domain: The name of the next upgrade domain to be processed. Not applicable + to node-by-node upgrades. + :vartype next_upgrade_domain: str + :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :ivar upgrade_description: Represents a ServiceFabric cluster upgrade. + :vartype upgrade_description: ~azure.servicefabric.models.ClusterUpgradeDescriptionObject + :ivar upgrade_duration_in_milliseconds: The estimated elapsed time spent processing the current + overall upgrade. + :vartype upgrade_duration_in_milliseconds: str + :ivar upgrade_domain_duration_in_milliseconds: The estimated elapsed time spent processing the + current upgrade domain. Not applicable to node-by-node upgrades. + :vartype upgrade_domain_duration_in_milliseconds: str + :ivar unhealthy_evaluations: List of health evaluations that resulted in the current aggregated + health state. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar current_upgrade_domain_progress: Information about the current in-progress upgrade + domain. Not applicable to node-by-node upgrades. + :vartype current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :ivar current_upgrade_units_progress: Information about the current in-progress upgrade units. + :vartype current_upgrade_units_progress: + ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo + :ivar start_timestamp_utc: The start time of the upgrade in UTC. + :vartype start_timestamp_utc: str + :ivar failure_timestamp_utc: The failure time of the upgrade in UTC. + :vartype failure_timestamp_utc: str + :ivar failure_reason: The cause of an upgrade failure that resulted in FailureAction being + executed. Possible values include: "None", "Interrupted", "HealthCheck", + "UpgradeDomainTimeout", "OverallUpgradeTimeout". + :vartype failure_reason: str or ~azure.servicefabric.models.FailureReason + :ivar upgrade_domain_progress_at_failure: The detailed upgrade progress for nodes in the + current upgrade domain at the point of failure. Not applicable to node-by-node upgrades. + :vartype upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailedUpgradeDomainProgressObject + :ivar is_node_by_node: Indicates whether this upgrade is node-by-node. + :vartype is_node_by_node: bool + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, + 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ClusterUpgradeDescriptionObject'}, + 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, + 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailedUpgradeDomainProgressObject'}, + 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code_version: The ServiceFabric code version of the cluster. + :paramtype code_version: str + :keyword config_version: The cluster configuration version (specified in the cluster manifest). + :paramtype config_version: str + :keyword upgrade_domains: List of upgrade domains and their statuses. Not applicable to + node-by-node upgrades. + :paramtype upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] + :keyword upgrade_units: List of upgrade units and their statuses. + :paramtype upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] + :keyword upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", + "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", + "RollingForwardInProgress", "RollingForwardCompleted", "Failed". + :paramtype upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :keyword next_upgrade_domain: The name of the next upgrade domain to be processed. Not + applicable to node-by-node upgrades. + :paramtype next_upgrade_domain: str + :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :keyword upgrade_description: Represents a ServiceFabric cluster upgrade. + :paramtype upgrade_description: ~azure.servicefabric.models.ClusterUpgradeDescriptionObject + :keyword upgrade_duration_in_milliseconds: The estimated elapsed time spent processing the + current overall upgrade. + :paramtype upgrade_duration_in_milliseconds: str + :keyword upgrade_domain_duration_in_milliseconds: The estimated elapsed time spent processing + the current upgrade domain. Not applicable to node-by-node upgrades. + :paramtype upgrade_domain_duration_in_milliseconds: str + :keyword unhealthy_evaluations: List of health evaluations that resulted in the current + aggregated health state. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword current_upgrade_domain_progress: Information about the current in-progress upgrade + domain. Not applicable to node-by-node upgrades. + :paramtype current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :keyword current_upgrade_units_progress: Information about the current in-progress upgrade + units. + :paramtype current_upgrade_units_progress: + ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo + :keyword start_timestamp_utc: The start time of the upgrade in UTC. + :paramtype start_timestamp_utc: str + :keyword failure_timestamp_utc: The failure time of the upgrade in UTC. + :paramtype failure_timestamp_utc: str + :keyword failure_reason: The cause of an upgrade failure that resulted in FailureAction being + executed. Possible values include: "None", "Interrupted", "HealthCheck", + "UpgradeDomainTimeout", "OverallUpgradeTimeout". + :paramtype failure_reason: str or ~azure.servicefabric.models.FailureReason + :keyword upgrade_domain_progress_at_failure: The detailed upgrade progress for nodes in the + current upgrade domain at the point of failure. Not applicable to node-by-node upgrades. + :paramtype upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailedUpgradeDomainProgressObject + :keyword is_node_by_node: Indicates whether this upgrade is node-by-node. + :paramtype is_node_by_node: bool + """ + super(ClusterUpgradeProgressObject, self).__init__(**kwargs) + self.code_version = kwargs.get('code_version', None) + self.config_version = kwargs.get('config_version', None) + self.upgrade_domains = kwargs.get('upgrade_domains', None) + self.upgrade_units = kwargs.get('upgrade_units', None) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.next_upgrade_domain = kwargs.get('next_upgrade_domain', None) + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_description = kwargs.get('upgrade_description', None) + self.upgrade_duration_in_milliseconds = kwargs.get('upgrade_duration_in_milliseconds', None) + self.upgrade_domain_duration_in_milliseconds = kwargs.get('upgrade_domain_duration_in_milliseconds', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) + self.current_upgrade_units_progress = kwargs.get('current_upgrade_units_progress', None) + self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) + self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) + self.is_node_by_node = kwargs.get('is_node_by_node', False) + + +class ClusterUpgradeRollbackCompletedEvent(ClusterEvent): + """Cluster Upgrade Rollback Completed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar target_cluster_version: Required. Target Cluster version. + :vartype target_cluster_version: str + :ivar failure_reason: Required. Describes failure. + :vartype failure_reason: str + :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in + milli-seconds. + :vartype overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'target_cluster_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword target_cluster_version: Required. Target Cluster version. + :paramtype target_cluster_version: str + :keyword failure_reason: Required. Describes failure. + :paramtype failure_reason: str + :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in + milli-seconds. + :paramtype overall_upgrade_elapsed_time_in_ms: float + """ + super(ClusterUpgradeRollbackCompletedEvent, self).__init__(**kwargs) + self.kind = 'ClusterUpgradeRollbackCompleted' # type: str + self.target_cluster_version = kwargs['target_cluster_version'] + self.failure_reason = kwargs['failure_reason'] + self.overall_upgrade_elapsed_time_in_ms = kwargs['overall_upgrade_elapsed_time_in_ms'] + + +class ClusterUpgradeRollbackStartedEvent(ClusterEvent): + """Cluster Upgrade Rollback Started event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar target_cluster_version: Required. Target Cluster version. + :vartype target_cluster_version: str + :ivar failure_reason: Required. Describes failure. + :vartype failure_reason: str + :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in + milli-seconds. + :vartype overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'target_cluster_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword target_cluster_version: Required. Target Cluster version. + :paramtype target_cluster_version: str + :keyword failure_reason: Required. Describes failure. + :paramtype failure_reason: str + :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in + milli-seconds. + :paramtype overall_upgrade_elapsed_time_in_ms: float + """ + super(ClusterUpgradeRollbackStartedEvent, self).__init__(**kwargs) + self.kind = 'ClusterUpgradeRollbackStarted' # type: str + self.target_cluster_version = kwargs['target_cluster_version'] + self.failure_reason = kwargs['failure_reason'] + self.overall_upgrade_elapsed_time_in_ms = kwargs['overall_upgrade_elapsed_time_in_ms'] + + +class ClusterUpgradeStartedEvent(ClusterEvent): + """Cluster Upgrade Started event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar current_cluster_version: Required. Current Cluster version. + :vartype current_cluster_version: str + :ivar target_cluster_version: Required. Target Cluster version. + :vartype target_cluster_version: str + :ivar upgrade_type: Required. Type of upgrade. + :vartype upgrade_type: str + :ivar rolling_upgrade_mode: Required. Mode of upgrade. + :vartype rolling_upgrade_mode: str + :ivar failure_action: Required. Action if failed. + :vartype failure_action: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'current_cluster_version': {'required': True}, + 'target_cluster_version': {'required': True}, + 'upgrade_type': {'required': True}, + 'rolling_upgrade_mode': {'required': True}, + 'failure_action': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'current_cluster_version': {'key': 'CurrentClusterVersion', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword current_cluster_version: Required. Current Cluster version. + :paramtype current_cluster_version: str + :keyword target_cluster_version: Required. Target Cluster version. + :paramtype target_cluster_version: str + :keyword upgrade_type: Required. Type of upgrade. + :paramtype upgrade_type: str + :keyword rolling_upgrade_mode: Required. Mode of upgrade. + :paramtype rolling_upgrade_mode: str + :keyword failure_action: Required. Action if failed. + :paramtype failure_action: str + """ + super(ClusterUpgradeStartedEvent, self).__init__(**kwargs) + self.kind = 'ClusterUpgradeStarted' # type: str + self.current_cluster_version = kwargs['current_cluster_version'] + self.target_cluster_version = kwargs['target_cluster_version'] + self.upgrade_type = kwargs['upgrade_type'] + self.rolling_upgrade_mode = kwargs['rolling_upgrade_mode'] + self.failure_action = kwargs['failure_action'] + + +class ClusterVersion(msrest.serialization.Model): + """The cluster version. + + :ivar version: The Service Fabric cluster runtime version. + :vartype version: str + """ + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword version: The Service Fabric cluster runtime version. + :paramtype version: str + """ + super(ClusterVersion, self).__init__(**kwargs) + self.version = kwargs.get('version', None) + + +class CodePackageEntryPoint(msrest.serialization.Model): + """Information about setup or main entry point of a code package deployed on a Service Fabric node. + + :ivar entry_point_location: The location of entry point executable on the node. + :vartype entry_point_location: str + :ivar process_id: The process ID of the entry point. + :vartype process_id: str + :ivar run_as_user_name: The user name under which entry point executable is run on the node. + :vartype run_as_user_name: str + :ivar code_package_entry_point_statistics: Statistics about setup or main entry point of a + code package deployed on a Service Fabric node. + :vartype code_package_entry_point_statistics: + ~azure.servicefabric.models.CodePackageEntryPointStatistics + :ivar status: Specifies the status of the code package entry point deployed on a Service Fabric + node. Possible values include: "Invalid", "Pending", "Starting", "Started", "Stopping", + "Stopped". + :vartype status: str or ~azure.servicefabric.models.EntryPointStatus + :ivar next_activation_time: The time (in UTC) when the entry point executable will be run next. + :vartype next_activation_time: ~datetime.datetime + :ivar instance_id: The instance ID for current running entry point. For a code package setup + entry point (if specified) runs first and after it finishes main entry point is started. Each + time entry point executable is run, its instance id will change. + :vartype instance_id: str + :ivar container_id: The container ID of the entry point. Only valid for container hosts. + :vartype container_id: str + """ + + _attribute_map = { + 'entry_point_location': {'key': 'EntryPointLocation', 'type': 'str'}, + 'process_id': {'key': 'ProcessId', 'type': 'str'}, + 'run_as_user_name': {'key': 'RunAsUserName', 'type': 'str'}, + 'code_package_entry_point_statistics': {'key': 'CodePackageEntryPointStatistics', 'type': 'CodePackageEntryPointStatistics'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'next_activation_time': {'key': 'NextActivationTime', 'type': 'iso-8601'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + 'container_id': {'key': 'ContainerId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword entry_point_location: The location of entry point executable on the node. + :paramtype entry_point_location: str + :keyword process_id: The process ID of the entry point. + :paramtype process_id: str + :keyword run_as_user_name: The user name under which entry point executable is run on the node. + :paramtype run_as_user_name: str + :keyword code_package_entry_point_statistics: Statistics about setup or main entry point of a + code package deployed on a Service Fabric node. + :paramtype code_package_entry_point_statistics: + ~azure.servicefabric.models.CodePackageEntryPointStatistics + :keyword status: Specifies the status of the code package entry point deployed on a Service + Fabric node. Possible values include: "Invalid", "Pending", "Starting", "Started", "Stopping", + "Stopped". + :paramtype status: str or ~azure.servicefabric.models.EntryPointStatus + :keyword next_activation_time: The time (in UTC) when the entry point executable will be run + next. + :paramtype next_activation_time: ~datetime.datetime + :keyword instance_id: The instance ID for current running entry point. For a code package setup + entry point (if specified) runs first and after it finishes main entry point is started. Each + time entry point executable is run, its instance id will change. + :paramtype instance_id: str + :keyword container_id: The container ID of the entry point. Only valid for container hosts. + :paramtype container_id: str + """ + super(CodePackageEntryPoint, self).__init__(**kwargs) + self.entry_point_location = kwargs.get('entry_point_location', None) + self.process_id = kwargs.get('process_id', None) + self.run_as_user_name = kwargs.get('run_as_user_name', None) + self.code_package_entry_point_statistics = kwargs.get('code_package_entry_point_statistics', None) + self.status = kwargs.get('status', None) + self.next_activation_time = kwargs.get('next_activation_time', None) + self.instance_id = kwargs.get('instance_id', None) + self.container_id = kwargs.get('container_id', None) + + +class CodePackageEntryPointStatistics(msrest.serialization.Model): + """Statistics about setup or main entry point of a code package deployed on a Service Fabric node. + + :ivar last_exit_code: The last exit code of the entry point. + :vartype last_exit_code: str + :ivar last_activation_time: The last time (in UTC) when Service Fabric attempted to run the + entry point. + :vartype last_activation_time: ~datetime.datetime + :ivar last_exit_time: The last time (in UTC) when the entry point finished running. + :vartype last_exit_time: ~datetime.datetime + :ivar last_successful_activation_time: The last time (in UTC) when the entry point ran + successfully. + :vartype last_successful_activation_time: ~datetime.datetime + :ivar last_successful_exit_time: The last time (in UTC) when the entry point finished running + gracefully. + :vartype last_successful_exit_time: ~datetime.datetime + :ivar activation_count: Number of times the entry point has run. + :vartype activation_count: str + :ivar activation_failure_count: Number of times the entry point failed to run. + :vartype activation_failure_count: str + :ivar continuous_activation_failure_count: Number of times the entry point continuously failed + to run. + :vartype continuous_activation_failure_count: str + :ivar exit_count: Number of times the entry point finished running. + :vartype exit_count: str + :ivar exit_failure_count: Number of times the entry point failed to exit gracefully. + :vartype exit_failure_count: str + :ivar continuous_exit_failure_count: Number of times the entry point continuously failed to + exit gracefully. + :vartype continuous_exit_failure_count: str + """ + + _attribute_map = { + 'last_exit_code': {'key': 'LastExitCode', 'type': 'str'}, + 'last_activation_time': {'key': 'LastActivationTime', 'type': 'iso-8601'}, + 'last_exit_time': {'key': 'LastExitTime', 'type': 'iso-8601'}, + 'last_successful_activation_time': {'key': 'LastSuccessfulActivationTime', 'type': 'iso-8601'}, + 'last_successful_exit_time': {'key': 'LastSuccessfulExitTime', 'type': 'iso-8601'}, + 'activation_count': {'key': 'ActivationCount', 'type': 'str'}, + 'activation_failure_count': {'key': 'ActivationFailureCount', 'type': 'str'}, + 'continuous_activation_failure_count': {'key': 'ContinuousActivationFailureCount', 'type': 'str'}, + 'exit_count': {'key': 'ExitCount', 'type': 'str'}, + 'exit_failure_count': {'key': 'ExitFailureCount', 'type': 'str'}, + 'continuous_exit_failure_count': {'key': 'ContinuousExitFailureCount', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword last_exit_code: The last exit code of the entry point. + :paramtype last_exit_code: str + :keyword last_activation_time: The last time (in UTC) when Service Fabric attempted to run the + entry point. + :paramtype last_activation_time: ~datetime.datetime + :keyword last_exit_time: The last time (in UTC) when the entry point finished running. + :paramtype last_exit_time: ~datetime.datetime + :keyword last_successful_activation_time: The last time (in UTC) when the entry point ran + successfully. + :paramtype last_successful_activation_time: ~datetime.datetime + :keyword last_successful_exit_time: The last time (in UTC) when the entry point finished + running gracefully. + :paramtype last_successful_exit_time: ~datetime.datetime + :keyword activation_count: Number of times the entry point has run. + :paramtype activation_count: str + :keyword activation_failure_count: Number of times the entry point failed to run. + :paramtype activation_failure_count: str + :keyword continuous_activation_failure_count: Number of times the entry point continuously + failed to run. + :paramtype continuous_activation_failure_count: str + :keyword exit_count: Number of times the entry point finished running. + :paramtype exit_count: str + :keyword exit_failure_count: Number of times the entry point failed to exit gracefully. + :paramtype exit_failure_count: str + :keyword continuous_exit_failure_count: Number of times the entry point continuously failed to + exit gracefully. + :paramtype continuous_exit_failure_count: str + """ + super(CodePackageEntryPointStatistics, self).__init__(**kwargs) + self.last_exit_code = kwargs.get('last_exit_code', None) + self.last_activation_time = kwargs.get('last_activation_time', None) + self.last_exit_time = kwargs.get('last_exit_time', None) + self.last_successful_activation_time = kwargs.get('last_successful_activation_time', None) + self.last_successful_exit_time = kwargs.get('last_successful_exit_time', None) + self.activation_count = kwargs.get('activation_count', None) + self.activation_failure_count = kwargs.get('activation_failure_count', None) + self.continuous_activation_failure_count = kwargs.get('continuous_activation_failure_count', None) + self.exit_count = kwargs.get('exit_count', None) + self.exit_failure_count = kwargs.get('exit_failure_count', None) + self.continuous_exit_failure_count = kwargs.get('continuous_exit_failure_count', None) + + +class ComposeDeploymentStatusInfo(msrest.serialization.Model): + """Information about a Service Fabric compose deployment. + + :ivar name: The name of the deployment. + :vartype name: str + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar status: The status of the compose deployment. Possible values include: "Invalid", + "Provisioning", "Creating", "Ready", "Unprovisioning", "Deleting", "Failed", "Upgrading". + :vartype status: str or ~azure.servicefabric.models.ComposeDeploymentStatus + :ivar status_details: The status details of compose deployment including failure message. + :vartype status_details: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: The name of the deployment. + :paramtype name: str + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword status: The status of the compose deployment. Possible values include: "Invalid", + "Provisioning", "Creating", "Ready", "Unprovisioning", "Deleting", "Failed", "Upgrading". + :paramtype status: str or ~azure.servicefabric.models.ComposeDeploymentStatus + :keyword status_details: The status details of compose deployment including failure message. + :paramtype status_details: str + """ + super(ComposeDeploymentStatusInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.application_name = kwargs.get('application_name', None) + self.status = kwargs.get('status', None) + self.status_details = kwargs.get('status_details', None) + + +class ComposeDeploymentUpgradeDescription(msrest.serialization.Model): + """Describes the parameters for a compose deployment upgrade. + + All required parameters must be populated in order to send to Azure. + + :ivar deployment_name: Required. The name of the deployment. + :vartype deployment_name: str + :ivar compose_file_content: Required. The content of the compose file that describes the + deployment to create. + :vartype compose_file_content: str + :ivar registry_credential: Credential information to connect to container registry. + :vartype registry_credential: ~azure.servicefabric.models.RegistryCredential + :ivar upgrade_kind: Required. The kind of upgrade out of the following possible values. + Possible values include: "Invalid", "Rolling". Default value: "Rolling". + :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :vartype upgrade_replica_set_check_timeout_in_seconds: long + :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when + the code version has not changed (the upgrade only changes configuration or data). + :vartype force_restart: bool + :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. + :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :ivar application_health_policy: Defines a health policy used to evaluate the health of an + application or one of its children entities. + :vartype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + """ + + _validation = { + 'deployment_name': {'required': True}, + 'compose_file_content': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, + 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword deployment_name: Required. The name of the deployment. + :paramtype deployment_name: str + :keyword compose_file_content: Required. The content of the compose file that describes the + deployment to create. + :paramtype compose_file_content: str + :keyword registry_credential: Credential information to connect to container registry. + :paramtype registry_credential: ~azure.servicefabric.models.RegistryCredential + :keyword upgrade_kind: Required. The kind of upgrade out of the following possible values. + Possible values include: "Invalid", "Rolling". Default value: "Rolling". + :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :paramtype upgrade_replica_set_check_timeout_in_seconds: long + :keyword force_restart: If true, then processes are forcefully restarted during upgrade even + when the code version has not changed (the upgrade only changes configuration or data). + :paramtype force_restart: bool + :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored + mode. + :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :keyword application_health_policy: Defines a health policy used to evaluate the health of an + application or one of its children entities. + :paramtype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + """ + super(ComposeDeploymentUpgradeDescription, self).__init__(**kwargs) + self.deployment_name = kwargs['deployment_name'] + self.compose_file_content = kwargs['compose_file_content'] + self.registry_credential = kwargs.get('registry_credential', None) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925) + self.force_restart = kwargs.get('force_restart', False) + self.monitoring_policy = kwargs.get('monitoring_policy', None) + self.application_health_policy = kwargs.get('application_health_policy', None) + + +class ComposeDeploymentUpgradeProgressInfo(msrest.serialization.Model): + """Describes the parameters for a compose deployment upgrade. + + :ivar deployment_name: The name of the target deployment. + :vartype deployment_name: str + :ivar application_name: The name of the target application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar upgrade_state: The state of the compose deployment upgrade. Possible values include: + "Invalid", "ProvisioningTarget", "RollingForwardInProgress", "RollingForwardPending", + "UnprovisioningCurrent", "RollingForwardCompleted", "RollingBackInProgress", + "UnprovisioningTarget", "RollingBackCompleted", "Failed". + :vartype upgrade_state: str or ~azure.servicefabric.models.ComposeDeploymentUpgradeState + :ivar upgrade_status_details: Additional detailed information about the status of the pending + upgrade. + :vartype upgrade_status_details: str + :ivar upgrade_kind: The kind of upgrade out of the following possible values. Possible values + include: "Invalid", "Rolling". Default value: "Rolling". + :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when + the code version has not changed (the upgrade only changes configuration or data). + :vartype force_restart: bool + :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :vartype upgrade_replica_set_check_timeout_in_seconds: long + :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. + :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :ivar application_health_policy: Defines a health policy used to evaluate the health of an + application or one of its children entities. + :vartype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :ivar target_application_type_version: The target application type version (found in the + application manifest) for the application upgrade. + :vartype target_application_type_version: str + :ivar upgrade_duration: The estimated amount of time that the overall upgrade elapsed. It is + first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :vartype upgrade_duration: str + :ivar current_upgrade_domain_duration: The estimated amount of time spent processing current + Upgrade Domain. It is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of milliseconds. + :vartype current_upgrade_domain_duration: str + :ivar application_unhealthy_evaluations: List of health evaluations that resulted in the + current aggregated health state. + :vartype application_unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar current_upgrade_domain_progress: Information about the current in-progress upgrade + domain. Not applicable to node-by-node upgrades. + :vartype current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :ivar start_timestamp_utc: The estimated UTC datetime when the upgrade started. + :vartype start_timestamp_utc: str + :ivar failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and + FailureAction was executed. + :vartype failure_timestamp_utc: str + :ivar failure_reason: The cause of an upgrade failure that resulted in FailureAction being + executed. Possible values include: "None", "Interrupted", "HealthCheck", + "UpgradeDomainTimeout", "OverallUpgradeTimeout". + :vartype failure_reason: str or ~azure.servicefabric.models.FailureReason + :ivar upgrade_domain_progress_at_failure: Information about the upgrade domain progress at the + time of upgrade failure. + :vartype upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo + :ivar application_upgrade_status_details: Additional details of application upgrade including + failure message. + :vartype application_upgrade_status_details: str + """ + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + 'current_upgrade_domain_duration': {'key': 'CurrentUpgradeDomainDuration', 'type': 'str'}, + 'application_unhealthy_evaluations': {'key': 'ApplicationUnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, + 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword deployment_name: The name of the target deployment. + :paramtype deployment_name: str + :keyword application_name: The name of the target application, including the 'fabric:' URI + scheme. + :paramtype application_name: str + :keyword upgrade_state: The state of the compose deployment upgrade. Possible values include: + "Invalid", "ProvisioningTarget", "RollingForwardInProgress", "RollingForwardPending", + "UnprovisioningCurrent", "RollingForwardCompleted", "RollingBackInProgress", + "UnprovisioningTarget", "RollingBackCompleted", "Failed". + :paramtype upgrade_state: str or ~azure.servicefabric.models.ComposeDeploymentUpgradeState + :keyword upgrade_status_details: Additional detailed information about the status of the + pending upgrade. + :paramtype upgrade_status_details: str + :keyword upgrade_kind: The kind of upgrade out of the following possible values. Possible + values include: "Invalid", "Rolling". Default value: "Rolling". + :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :keyword force_restart: If true, then processes are forcefully restarted during upgrade even + when the code version has not changed (the upgrade only changes configuration or data). + :paramtype force_restart: bool + :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :paramtype upgrade_replica_set_check_timeout_in_seconds: long + :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored + mode. + :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :keyword application_health_policy: Defines a health policy used to evaluate the health of an + application or one of its children entities. + :paramtype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword target_application_type_version: The target application type version (found in the + application manifest) for the application upgrade. + :paramtype target_application_type_version: str + :keyword upgrade_duration: The estimated amount of time that the overall upgrade elapsed. It is + first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :paramtype upgrade_duration: str + :keyword current_upgrade_domain_duration: The estimated amount of time spent processing current + Upgrade Domain. It is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of milliseconds. + :paramtype current_upgrade_domain_duration: str + :keyword application_unhealthy_evaluations: List of health evaluations that resulted in the + current aggregated health state. + :paramtype application_unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword current_upgrade_domain_progress: Information about the current in-progress upgrade + domain. Not applicable to node-by-node upgrades. + :paramtype current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :keyword start_timestamp_utc: The estimated UTC datetime when the upgrade started. + :paramtype start_timestamp_utc: str + :keyword failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and + FailureAction was executed. + :paramtype failure_timestamp_utc: str + :keyword failure_reason: The cause of an upgrade failure that resulted in FailureAction being + executed. Possible values include: "None", "Interrupted", "HealthCheck", + "UpgradeDomainTimeout", "OverallUpgradeTimeout". + :paramtype failure_reason: str or ~azure.servicefabric.models.FailureReason + :keyword upgrade_domain_progress_at_failure: Information about the upgrade domain progress at + the time of upgrade failure. + :paramtype upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo + :keyword application_upgrade_status_details: Additional details of application upgrade + including failure message. + :paramtype application_upgrade_status_details: str + """ + super(ComposeDeploymentUpgradeProgressInfo, self).__init__(**kwargs) + self.deployment_name = kwargs.get('deployment_name', None) + self.application_name = kwargs.get('application_name', None) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.upgrade_status_details = kwargs.get('upgrade_status_details', None) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.force_restart = kwargs.get('force_restart', False) + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925) + self.monitoring_policy = kwargs.get('monitoring_policy', None) + self.application_health_policy = kwargs.get('application_health_policy', None) + self.target_application_type_version = kwargs.get('target_application_type_version', None) + self.upgrade_duration = kwargs.get('upgrade_duration', "PT0H2M0S") + self.current_upgrade_domain_duration = kwargs.get('current_upgrade_domain_duration', "PT0H2M0S") + self.application_unhealthy_evaluations = kwargs.get('application_unhealthy_evaluations', None) + self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) + self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) + self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) + self.application_upgrade_status_details = kwargs.get('application_upgrade_status_details', None) + + +class ConfigParameterOverride(msrest.serialization.Model): + """Information about a configuration parameter override. + + All required parameters must be populated in order to send to Azure. + + :ivar section_name: Required. Name of the section for the parameter override. + :vartype section_name: str + :ivar parameter_name: Required. Name of the parameter that has been overridden. + :vartype parameter_name: str + :ivar parameter_value: Required. Value of the overridden parameter. + :vartype parameter_value: str + :ivar timeout: The duration until config override is considered as valid. + :vartype timeout: ~datetime.timedelta + :ivar persist_across_upgrade: A value that indicates whether config override will be removed on + upgrade or will still be considered as valid. + :vartype persist_across_upgrade: bool + """ + + _validation = { + 'section_name': {'required': True}, + 'parameter_name': {'required': True}, + 'parameter_value': {'required': True}, + } + + _attribute_map = { + 'section_name': {'key': 'SectionName', 'type': 'str'}, + 'parameter_name': {'key': 'ParameterName', 'type': 'str'}, + 'parameter_value': {'key': 'ParameterValue', 'type': 'str'}, + 'timeout': {'key': 'Timeout', 'type': 'duration'}, + 'persist_across_upgrade': {'key': 'PersistAcrossUpgrade', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword section_name: Required. Name of the section for the parameter override. + :paramtype section_name: str + :keyword parameter_name: Required. Name of the parameter that has been overridden. + :paramtype parameter_name: str + :keyword parameter_value: Required. Value of the overridden parameter. + :paramtype parameter_value: str + :keyword timeout: The duration until config override is considered as valid. + :paramtype timeout: ~datetime.timedelta + :keyword persist_across_upgrade: A value that indicates whether config override will be removed + on upgrade or will still be considered as valid. + :paramtype persist_across_upgrade: bool + """ + super(ConfigParameterOverride, self).__init__(**kwargs) + self.section_name = kwargs['section_name'] + self.parameter_name = kwargs['parameter_name'] + self.parameter_value = kwargs['parameter_value'] + self.timeout = kwargs.get('timeout', None) + self.persist_across_upgrade = kwargs.get('persist_across_upgrade', None) + + +class ContainerApiRequestBody(msrest.serialization.Model): + """parameters for making container API call. + + All required parameters must be populated in order to send to Azure. + + :ivar http_verb: HTTP verb of container REST API, defaults to "GET". + :vartype http_verb: str + :ivar uri_path: Required. URI path of container REST API. + :vartype uri_path: str + :ivar content_type: Content type of container REST API request, defaults to "application/json". + :vartype content_type: str + :ivar body: HTTP request body of container REST API. + :vartype body: str + """ + + _validation = { + 'uri_path': {'required': True}, + } + + _attribute_map = { + 'http_verb': {'key': 'HttpVerb', 'type': 'str'}, + 'uri_path': {'key': 'UriPath', 'type': 'str'}, + 'content_type': {'key': 'Content-Type', 'type': 'str'}, + 'body': {'key': 'Body', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword http_verb: HTTP verb of container REST API, defaults to "GET". + :paramtype http_verb: str + :keyword uri_path: Required. URI path of container REST API. + :paramtype uri_path: str + :keyword content_type: Content type of container REST API request, defaults to + "application/json". + :paramtype content_type: str + :keyword body: HTTP request body of container REST API. + :paramtype body: str + """ + super(ContainerApiRequestBody, self).__init__(**kwargs) + self.http_verb = kwargs.get('http_verb', None) + self.uri_path = kwargs['uri_path'] + self.content_type = kwargs.get('content_type', None) + self.body = kwargs.get('body', None) + + +class ContainerApiResponse(msrest.serialization.Model): + """Response body that wraps container API result. + + All required parameters must be populated in order to send to Azure. + + :ivar container_api_result: Required. Container API result. + :vartype container_api_result: ~azure.servicefabric.models.ContainerApiResult + """ + + _validation = { + 'container_api_result': {'required': True}, + } + + _attribute_map = { + 'container_api_result': {'key': 'ContainerApiResult', 'type': 'ContainerApiResult'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword container_api_result: Required. Container API result. + :paramtype container_api_result: ~azure.servicefabric.models.ContainerApiResult + """ + super(ContainerApiResponse, self).__init__(**kwargs) + self.container_api_result = kwargs['container_api_result'] + + +class ContainerApiResult(msrest.serialization.Model): + """Container API result. + + All required parameters must be populated in order to send to Azure. + + :ivar status: Required. HTTP status code returned by the target container API. + :vartype status: int + :ivar content_type: HTTP content type. + :vartype content_type: str + :ivar content_encoding: HTTP content encoding. + :vartype content_encoding: str + :ivar body: container API result body. + :vartype body: str + """ + + _validation = { + 'status': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'Status', 'type': 'int'}, + 'content_type': {'key': 'Content-Type', 'type': 'str'}, + 'content_encoding': {'key': 'Content-Encoding', 'type': 'str'}, + 'body': {'key': 'Body', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword status: Required. HTTP status code returned by the target container API. + :paramtype status: int + :keyword content_type: HTTP content type. + :paramtype content_type: str + :keyword content_encoding: HTTP content encoding. + :paramtype content_encoding: str + :keyword body: container API result body. + :paramtype body: str + """ + super(ContainerApiResult, self).__init__(**kwargs) + self.status = kwargs['status'] + self.content_type = kwargs.get('content_type', None) + self.content_encoding = kwargs.get('content_encoding', None) + self.body = kwargs.get('body', None) + + +class ContainerCodePackageProperties(msrest.serialization.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. + + :ivar name: Required. The name of the code package. + :vartype name: str + :ivar image: Required. The Container image to use. + :vartype image: str + :ivar image_registry_credential: Image registry credential. + :vartype image_registry_credential: ~azure.servicefabric.models.ImageRegistryCredential + :ivar entry_point: Override for the default entry point in the container. + :vartype entry_point: str + :ivar commands: Command array to execute within the container in exec form. + :vartype commands: list[str] + :ivar environment_variables: The environment variables to set in this container. + :vartype environment_variables: list[~azure.servicefabric.models.EnvironmentVariable] + :ivar 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". + :vartype settings: list[~azure.servicefabric.models.Setting] + :ivar labels: The labels to set in this container. + :vartype labels: list[~azure.servicefabric.models.ContainerLabel] + :ivar endpoints: The endpoints exposed by this container. + :vartype endpoints: list[~azure.servicefabric.models.EndpointProperties] + :ivar resources: Required. The resources required by this container. + :vartype resources: ~azure.servicefabric.models.ResourceRequirements + :ivar volume_refs: Volumes to be attached to the container. The lifetime of these volumes is + independent of the application's lifetime. + :vartype volume_refs: list[~azure.servicefabric.models.VolumeReference] + :ivar volumes: Volumes to be attached to the container. The lifetime of these volumes is scoped + to the application's lifetime. + :vartype volumes: list[~azure.servicefabric.models.ApplicationScopedVolume] + :ivar diagnostics: Reference to sinks in DiagnosticsDescription. + :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :ivar reliable_collections_refs: A list of ReliableCollection resources used by this particular + code package. Please refer to ReliableCollectionsRef for more details. + :vartype reliable_collections_refs: list[~azure.servicefabric.models.ReliableCollectionsRef] + :ivar instance_view: Runtime information of a container instance. + :vartype instance_view: ~azure.servicefabric.models.ContainerInstanceView + :ivar liveness_probe: An array of liveness probes for a code package. It determines when to + restart a code package. + :vartype liveness_probe: list[~azure.servicefabric.models.Probe] + :ivar readiness_probe: An array of readiness probes for a code package. It determines when to + unpublish an endpoint. + :vartype readiness_probe: list[~azure.servicefabric.models.Probe] + """ + + _validation = { + 'name': {'required': True}, + 'image': {'required': True}, + 'resources': {'required': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'image': {'key': 'image', 'type': 'str'}, + 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, + 'entry_point': {'key': 'entryPoint', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[str]'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'}, + 'settings': {'key': 'settings', 'type': '[Setting]'}, + 'labels': {'key': 'labels', 'type': '[ContainerLabel]'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointProperties]'}, + 'resources': {'key': 'resources', 'type': 'ResourceRequirements'}, + 'volume_refs': {'key': 'volumeRefs', 'type': '[VolumeReference]'}, + 'volumes': {'key': 'volumes', 'type': '[ApplicationScopedVolume]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + 'reliable_collections_refs': {'key': 'reliableCollectionsRefs', 'type': '[ReliableCollectionsRef]'}, + 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, + 'liveness_probe': {'key': 'livenessProbe', 'type': '[Probe]'}, + 'readiness_probe': {'key': 'readinessProbe', 'type': '[Probe]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. The name of the code package. + :paramtype name: str + :keyword image: Required. The Container image to use. + :paramtype image: str + :keyword image_registry_credential: Image registry credential. + :paramtype image_registry_credential: ~azure.servicefabric.models.ImageRegistryCredential + :keyword entry_point: Override for the default entry point in the container. + :paramtype entry_point: str + :keyword commands: Command array to execute within the container in exec form. + :paramtype commands: list[str] + :keyword environment_variables: The environment variables to set in this container. + :paramtype environment_variables: list[~azure.servicefabric.models.EnvironmentVariable] + :keyword 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". + :paramtype settings: list[~azure.servicefabric.models.Setting] + :keyword labels: The labels to set in this container. + :paramtype labels: list[~azure.servicefabric.models.ContainerLabel] + :keyword endpoints: The endpoints exposed by this container. + :paramtype endpoints: list[~azure.servicefabric.models.EndpointProperties] + :keyword resources: Required. The resources required by this container. + :paramtype resources: ~azure.servicefabric.models.ResourceRequirements + :keyword volume_refs: Volumes to be attached to the container. The lifetime of these volumes is + independent of the application's lifetime. + :paramtype volume_refs: list[~azure.servicefabric.models.VolumeReference] + :keyword volumes: Volumes to be attached to the container. The lifetime of these volumes is + scoped to the application's lifetime. + :paramtype volumes: list[~azure.servicefabric.models.ApplicationScopedVolume] + :keyword diagnostics: Reference to sinks in DiagnosticsDescription. + :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :keyword reliable_collections_refs: A list of ReliableCollection resources used by this + particular code package. Please refer to ReliableCollectionsRef for more details. + :paramtype reliable_collections_refs: list[~azure.servicefabric.models.ReliableCollectionsRef] + :keyword liveness_probe: An array of liveness probes for a code package. It determines when to + restart a code package. + :paramtype liveness_probe: list[~azure.servicefabric.models.Probe] + :keyword readiness_probe: An array of readiness probes for a code package. It determines when + to unpublish an endpoint. + :paramtype readiness_probe: list[~azure.servicefabric.models.Probe] + """ + super(ContainerCodePackageProperties, self).__init__(**kwargs) + self.name = kwargs['name'] + self.image = kwargs['image'] + self.image_registry_credential = kwargs.get('image_registry_credential', None) + self.entry_point = kwargs.get('entry_point', None) + self.commands = kwargs.get('commands', None) + self.environment_variables = kwargs.get('environment_variables', None) + self.settings = kwargs.get('settings', None) + self.labels = kwargs.get('labels', None) + self.endpoints = kwargs.get('endpoints', None) + self.resources = kwargs['resources'] + self.volume_refs = kwargs.get('volume_refs', None) + self.volumes = kwargs.get('volumes', None) + self.diagnostics = kwargs.get('diagnostics', None) + self.reliable_collections_refs = kwargs.get('reliable_collections_refs', None) + self.instance_view = None + self.liveness_probe = kwargs.get('liveness_probe', None) + self.readiness_probe = kwargs.get('readiness_probe', None) + + +class ContainerEvent(msrest.serialization.Model): + """A container event. + + :ivar name: The name of the container event. + :vartype name: str + :ivar count: The count of the event. + :vartype count: int + :ivar first_timestamp: Date/time of the first event. + :vartype first_timestamp: str + :ivar last_timestamp: Date/time of the last event. + :vartype last_timestamp: str + :ivar message: The event message. + :vartype message: str + :ivar type: The event type. + :vartype 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 + ): + """ + :keyword name: The name of the container event. + :paramtype name: str + :keyword count: The count of the event. + :paramtype count: int + :keyword first_timestamp: Date/time of the first event. + :paramtype first_timestamp: str + :keyword last_timestamp: Date/time of the last event. + :paramtype last_timestamp: str + :keyword message: The event message. + :paramtype message: str + :keyword type: The event type. + :paramtype type: str + """ + super(ContainerEvent, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', None) + self.first_timestamp = kwargs.get('first_timestamp', None) + self.last_timestamp = kwargs.get('last_timestamp', None) + self.message = kwargs.get('message', None) + self.type = kwargs.get('type', None) + + +class ContainerInstanceEvent(FabricEvent): + """Represents the base for all Container Events. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + """ + super(ContainerInstanceEvent, self).__init__(**kwargs) + self.kind = 'ContainerInstanceEvent' # type: str + + +class ContainerInstanceView(msrest.serialization.Model): + """Runtime information of a container instance. + + :ivar restart_count: The number of times the container has been restarted. + :vartype restart_count: int + :ivar current_state: Current container instance state. + :vartype current_state: ~azure.servicefabric.models.ContainerState + :ivar previous_state: Previous container instance state. + :vartype previous_state: ~azure.servicefabric.models.ContainerState + :ivar events: The events of this container instance. + :vartype 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 + ): + """ + :keyword restart_count: The number of times the container has been restarted. + :paramtype restart_count: int + :keyword current_state: Current container instance state. + :paramtype current_state: ~azure.servicefabric.models.ContainerState + :keyword previous_state: Previous container instance state. + :paramtype previous_state: ~azure.servicefabric.models.ContainerState + :keyword events: The events of this container instance. + :paramtype events: list[~azure.servicefabric.models.ContainerEvent] + """ + super(ContainerInstanceView, self).__init__(**kwargs) + self.restart_count = kwargs.get('restart_count', None) + self.current_state = kwargs.get('current_state', None) + self.previous_state = kwargs.get('previous_state', None) + self.events = kwargs.get('events', None) + + +class ContainerLabel(msrest.serialization.Model): + """Describes a container label. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the container label. + :vartype name: str + :ivar value: Required. The value of the container label. + :vartype 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 + ): + """ + :keyword name: Required. The name of the container label. + :paramtype name: str + :keyword value: Required. The value of the container label. + :paramtype value: str + """ + super(ContainerLabel, self).__init__(**kwargs) + self.name = kwargs['name'] + self.value = kwargs['value'] + + +class ContainerLogs(msrest.serialization.Model): + """Container logs. + + :ivar content: Container logs. + :vartype content: str + """ + + _attribute_map = { + 'content': {'key': 'Content', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword content: Container logs. + :paramtype content: str + """ + super(ContainerLogs, self).__init__(**kwargs) + self.content = kwargs.get('content', None) + + +class ContainerState(msrest.serialization.Model): + """The container state. + + :ivar state: The state of this container. + :vartype state: str + :ivar start_time: Date/time when the container state started. + :vartype start_time: ~datetime.datetime + :ivar exit_code: The container exit code. + :vartype exit_code: str + :ivar finish_time: Date/time when the container state finished. + :vartype finish_time: ~datetime.datetime + :ivar detail_status: Human-readable status of this state. + :vartype 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 + ): + """ + :keyword state: The state of this container. + :paramtype state: str + :keyword start_time: Date/time when the container state started. + :paramtype start_time: ~datetime.datetime + :keyword exit_code: The container exit code. + :paramtype exit_code: str + :keyword finish_time: Date/time when the container state finished. + :paramtype finish_time: ~datetime.datetime + :keyword detail_status: Human-readable status of this state. + :paramtype detail_status: str + """ + super(ContainerState, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.start_time = kwargs.get('start_time', None) + self.exit_code = kwargs.get('exit_code', None) + self.finish_time = kwargs.get('finish_time', None) + self.detail_status = kwargs.get('detail_status', None) + + +class CreateComposeDeploymentDescription(msrest.serialization.Model): + """Defines description for creating a Service Fabric compose deployment. + + All required parameters must be populated in order to send to Azure. + + :ivar deployment_name: Required. The name of the deployment. + :vartype deployment_name: str + :ivar compose_file_content: Required. The content of the compose file that describes the + deployment to create. + :vartype compose_file_content: str + :ivar registry_credential: Credential information to connect to container registry. + :vartype registry_credential: ~azure.servicefabric.models.RegistryCredential + """ + + _validation = { + 'deployment_name': {'required': True}, + 'compose_file_content': {'required': True}, + } + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, + 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword deployment_name: Required. The name of the deployment. + :paramtype deployment_name: str + :keyword compose_file_content: Required. The content of the compose file that describes the + deployment to create. + :paramtype compose_file_content: str + :keyword registry_credential: Credential information to connect to container registry. + :paramtype registry_credential: ~azure.servicefabric.models.RegistryCredential + """ + super(CreateComposeDeploymentDescription, self).__init__(**kwargs) + self.deployment_name = kwargs['deployment_name'] + self.compose_file_content = kwargs['compose_file_content'] + self.registry_credential = kwargs.get('registry_credential', None) + + +class CurrentUpgradeDomainProgressInfo(msrest.serialization.Model): + """Information about the current in-progress upgrade domain. Not applicable to node-by-node upgrades. + + :ivar domain_name: The name of the upgrade domain. + :vartype domain_name: str + :ivar node_upgrade_progress_list: List of upgrading nodes and their statuses. + :vartype node_upgrade_progress_list: list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword domain_name: The name of the upgrade domain. + :paramtype domain_name: str + :keyword node_upgrade_progress_list: List of upgrading nodes and their statuses. + :paramtype node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + super(CurrentUpgradeDomainProgressInfo, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) + + +class CurrentUpgradeUnitsProgressInfo(msrest.serialization.Model): + """Information about the current in-progress upgrade units. + + :ivar domain_name: The name of the upgrade domain. Not applicable to node-by-node upgrades. + :vartype domain_name: str + :ivar node_upgrade_progress_list: List of upgrading nodes and their statuses. + :vartype node_upgrade_progress_list: list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword domain_name: The name of the upgrade domain. Not applicable to node-by-node upgrades. + :paramtype domain_name: str + :keyword node_upgrade_progress_list: List of upgrading nodes and their statuses. + :paramtype node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + super(CurrentUpgradeUnitsProgressInfo, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) + + +class DeactivationIntentDescription(msrest.serialization.Model): + """Describes the intent or reason for deactivating the node. + + :ivar deactivation_intent: Describes the intent or reason for deactivating the node. The + possible values are following. Possible values include: "Pause", "Restart", "RemoveData". + :vartype deactivation_intent: str or ~azure.servicefabric.models.DeactivationIntent + """ + + _attribute_map = { + 'deactivation_intent': {'key': 'DeactivationIntent', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword deactivation_intent: Describes the intent or reason for deactivating the node. The + possible values are following. Possible values include: "Pause", "Restart", "RemoveData". + :paramtype deactivation_intent: str or ~azure.servicefabric.models.DeactivationIntent + """ + super(DeactivationIntentDescription, self).__init__(**kwargs) + self.deactivation_intent = kwargs.get('deactivation_intent', None) + + +class ExecutionPolicy(msrest.serialization.Model): + """The execution policy of the service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DefaultExecutionPolicy, RunToCompletionExecutionPolicy. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Enumerates the execution policy types for services.Constant filled by + server. Possible values include: "Default", "RunToCompletion". + :vartype type: str or ~azure.servicefabric.models.ExecutionPolicyType + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Default': 'DefaultExecutionPolicy', 'RunToCompletion': 'RunToCompletionExecutionPolicy'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ExecutionPolicy, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + +class DefaultExecutionPolicy(ExecutionPolicy): + """The default execution policy. Always restart the service if an exit occurs. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Enumerates the execution policy types for services.Constant filled by + server. Possible values include: "Default", "RunToCompletion". + :vartype type: str or ~azure.servicefabric.models.ExecutionPolicyType + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(DefaultExecutionPolicy, self).__init__(**kwargs) + self.type = 'Default' # type: str + + +class DeletePropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that deletes a specified property if it exists. +Note that if one PropertyBatchOperation in a PropertyBatch fails, +the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch operation, determined by the operation to be + performed. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind + :ivar property_name: Required. The name of the Service Fabric property. + :vartype property_name: str + """ + + _validation = { + 'kind': {'required': True}, + 'property_name': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword property_name: Required. The name of the Service Fabric property. + :paramtype property_name: str + """ + super(DeletePropertyBatchOperation, self).__init__(**kwargs) + self.kind = 'Delete' # type: str + + +class DeltaNodesCheckHealthEvaluation(HealthEvaluation): + """Represents health evaluation for delta nodes, containing health evaluations for each unhealthy node that impacted current aggregated health state. +Can be returned during cluster upgrade when the aggregated health state of the cluster is Warning or Error. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar baseline_error_count: Number of nodes with aggregated heath state Error in the health + store at the beginning of the cluster upgrade. + :vartype baseline_error_count: long + :ivar baseline_total_count: Total number of nodes in the health store at the beginning of the + cluster upgrade. + :vartype baseline_total_count: long + :ivar max_percent_delta_unhealthy_nodes: Maximum allowed percentage of delta unhealthy nodes + from the ClusterUpgradeHealthPolicy. + :vartype max_percent_delta_unhealthy_nodes: int + :ivar total_count: Total number of nodes in the health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. + Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, + 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword baseline_error_count: Number of nodes with aggregated heath state Error in the health + store at the beginning of the cluster upgrade. + :paramtype baseline_error_count: long + :keyword baseline_total_count: Total number of nodes in the health store at the beginning of + the cluster upgrade. + :paramtype baseline_total_count: long + :keyword max_percent_delta_unhealthy_nodes: Maximum allowed percentage of delta unhealthy nodes + from the ClusterUpgradeHealthPolicy. + :paramtype max_percent_delta_unhealthy_nodes: int + :keyword total_count: Total number of nodes in the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. + Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(DeltaNodesCheckHealthEvaluation, self).__init__(**kwargs) + self.kind = 'DeltaNodesCheck' # type: str + self.baseline_error_count = kwargs.get('baseline_error_count', None) + self.baseline_total_count = kwargs.get('baseline_total_count', None) + self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class DeployedApplicationHealth(EntityHealth): + """Information about the health of an application deployed on a Service Fabric node. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar name: Name of the application deployed on the node whose health information is described + by this object. + :vartype name: str + :ivar node_name: Name of the node where this application is deployed. + :vartype node_name: str + :ivar deployed_service_package_health_states: Deployed service package health states for the + current deployed application as found in the health store. + :vartype deployed_service_package_health_states: + list[~azure.servicefabric.models.DeployedServicePackageHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'deployed_service_package_health_states': {'key': 'DeployedServicePackageHealthStates', 'type': '[DeployedServicePackageHealthState]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword name: Name of the application deployed on the node whose health information is + described by this object. + :paramtype name: str + :keyword node_name: Name of the node where this application is deployed. + :paramtype node_name: str + :keyword deployed_service_package_health_states: Deployed service package health states for the + current deployed application as found in the health store. + :paramtype deployed_service_package_health_states: + list[~azure.servicefabric.models.DeployedServicePackageHealthState] + """ + super(DeployedApplicationHealth, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.node_name = kwargs.get('node_name', None) + self.deployed_service_package_health_states = kwargs.get('deployed_service_package_health_states', None) + + +class DeployedApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a deployed application, containing information about the data and the algorithm used by the health store to evaluate health. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar node_name: Name of the node where the application is deployed to. + :vartype node_name: str + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated + health state of the deployed application. + The types of the unhealthy evaluations can be DeployedServicePackagesHealthEvaluation or + EventHealthEvaluation. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword node_name: Name of the node where the application is deployed to. + :paramtype node_name: str + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current + aggregated health state of the deployed application. + The types of the unhealthy evaluations can be DeployedServicePackagesHealthEvaluation or + EventHealthEvaluation. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(DeployedApplicationHealthEvaluation, self).__init__(**kwargs) + self.kind = 'DeployedApplication' # type: str + self.node_name = kwargs.get('node_name', None) + self.application_name = kwargs.get('application_name', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class DeployedApplicationHealthReportExpiredEvent(ApplicationEvent): + """Deployed Application Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_instance_id: Required. Id of Application instance. + :vartype application_instance_id: long + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_instance_id: Required. Id of Application instance. + :paramtype application_instance_id: long + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(DeployedApplicationHealthReportExpiredEvent, self).__init__(**kwargs) + self.kind = 'DeployedApplicationHealthReportExpired' # type: str + self.application_instance_id = kwargs['application_instance_id'] + self.node_name = kwargs['node_name'] + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class DeployedApplicationHealthState(EntityHealthState): + """Represents the health state of a deployed application, which contains the entity identifier and the aggregated health state. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar node_name: Name of the node on which the service package is deployed. + :vartype node_name: str + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword node_name: Name of the node on which the service package is deployed. + :paramtype node_name: str + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + """ + super(DeployedApplicationHealthState, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.application_name = kwargs.get('application_name', None) + + +class DeployedApplicationHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a deployed application, which contains the node where the application is deployed, the aggregated health state and any deployed service packages that respect the chunk query description filters. + + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar node_name: The name of node where the application is deployed. + :vartype node_name: str + :ivar deployed_service_package_health_state_chunks: The list of deployed service package health + state chunks belonging to the deployed application that respect the filters in the cluster + health chunk query description. + :vartype deployed_service_package_health_state_chunks: + ~azure.servicefabric.models.DeployedServicePackageHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'deployed_service_package_health_state_chunks': {'key': 'DeployedServicePackageHealthStateChunks', 'type': 'DeployedServicePackageHealthStateChunkList'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword node_name: The name of node where the application is deployed. + :paramtype node_name: str + :keyword deployed_service_package_health_state_chunks: The list of deployed service package + health state chunks belonging to the deployed application that respect the filters in the + cluster health chunk query description. + :paramtype deployed_service_package_health_state_chunks: + ~azure.servicefabric.models.DeployedServicePackageHealthStateChunkList + """ + super(DeployedApplicationHealthStateChunk, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.deployed_service_package_health_state_chunks = kwargs.get('deployed_service_package_health_state_chunks', None) + + +class DeployedApplicationHealthStateChunkList(msrest.serialization.Model): + """The list of deployed application health state chunks that respect the input filters in the chunk query. Returned by get cluster health state chunks query. + + :ivar items: The list of deployed application health state chunks that respect the input + filters in the chunk query. + :vartype items: list[~azure.servicefabric.models.DeployedApplicationHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[DeployedApplicationHealthStateChunk]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword items: The list of deployed application health state chunks that respect the input + filters in the chunk query. + :paramtype items: list[~azure.servicefabric.models.DeployedApplicationHealthStateChunk] + """ + super(DeployedApplicationHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) + + +class DeployedApplicationHealthStateFilter(msrest.serialization.Model): + """Defines matching criteria to determine whether a deployed application should be included as a child of an application in the cluster health chunk. +The deployed applications are only returned if the parent application matches a filter specified in the cluster health chunk query description. +One filter can match zero, one or multiple deployed applications, depending on its properties. + + :ivar node_name_filter: The name of the node where the application is deployed in order to + match the filter. + If specified, the filter is applied only to the application deployed on the specified node. + If the application is not deployed on the node with the specified name, no deployed + application is returned in the cluster health chunk based on this filter. + Otherwise, the deployed application is included in the cluster health chunk if it respects the + other filter properties. + If not specified, all deployed applications that match the parent filters (if any) are taken + into consideration and matched against the other filter members, like health state filter. + :vartype node_name_filter: str + :ivar health_state_filter: The filter for the health state of the deployed applications. It + allows selecting deployed applications if they match the desired health states. + The possible values are integer value of one of the following health states. Only deployed + applications that match the filter are returned. All deployed applications are used to evaluate + the cluster aggregated health state. + If not specified, default value is None, unless the node name is specified. If the filter has + default value and node name is specified, the matching deployed application is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches deployed applications with HealthState + value of OK (2) and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :vartype health_state_filter: int + :ivar deployed_service_package_filters: Defines a list of filters that specify which deployed + service packages to be included in the returned cluster health chunk as children of the parent + deployed application. The deployed service packages are returned only if the parent deployed + application matches a filter. + If the list is empty, no deployed service packages are returned. All the deployed service + packages are used to evaluate the parent deployed application aggregated health state, + regardless of the input filters. + The deployed application filter may specify multiple deployed service package filters. + For example, it can specify a filter to return all deployed service packages with health state + Error and another filter to always include a deployed service package on a node. + :vartype deployed_service_package_filters: + list[~azure.servicefabric.models.DeployedServicePackageHealthStateFilter] + """ + + _attribute_map = { + 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'deployed_service_package_filters': {'key': 'DeployedServicePackageFilters', 'type': '[DeployedServicePackageHealthStateFilter]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword node_name_filter: The name of the node where the application is deployed in order to + match the filter. + If specified, the filter is applied only to the application deployed on the specified node. + If the application is not deployed on the node with the specified name, no deployed + application is returned in the cluster health chunk based on this filter. + Otherwise, the deployed application is included in the cluster health chunk if it respects the + other filter properties. + If not specified, all deployed applications that match the parent filters (if any) are taken + into consideration and matched against the other filter members, like health state filter. + :paramtype node_name_filter: str + :keyword health_state_filter: The filter for the health state of the deployed applications. It + allows selecting deployed applications if they match the desired health states. + The possible values are integer value of one of the following health states. Only deployed + applications that match the filter are returned. All deployed applications are used to evaluate + the cluster aggregated health state. + If not specified, default value is None, unless the node name is specified. If the filter has + default value and node name is specified, the matching deployed application is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches deployed applications with HealthState + value of OK (2) and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :paramtype health_state_filter: int + :keyword deployed_service_package_filters: Defines a list of filters that specify which + deployed service packages to be included in the returned cluster health chunk as children of + the parent deployed application. The deployed service packages are returned only if the parent + deployed application matches a filter. + If the list is empty, no deployed service packages are returned. All the deployed service + packages are used to evaluate the parent deployed application aggregated health state, + regardless of the input filters. + The deployed application filter may specify multiple deployed service package filters. + For example, it can specify a filter to return all deployed service packages with health state + Error and another filter to always include a deployed service package on a node. + :paramtype deployed_service_package_filters: + list[~azure.servicefabric.models.DeployedServicePackageHealthStateFilter] + """ + super(DeployedApplicationHealthStateFilter, self).__init__(**kwargs) + self.node_name_filter = kwargs.get('node_name_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) + self.deployed_service_package_filters = kwargs.get('deployed_service_package_filters', None) + + +class DeployedApplicationInfo(msrest.serialization.Model): + """Information about application deployed on the node. + + :ivar id: The identity of the application. This is an encoded representation of the application + name. This is used in the REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype id: str + :ivar name: The name of the application, including the 'fabric:' URI scheme. + :vartype name: str + :ivar type_name: The application type name as defined in the application manifest. + :vartype type_name: str + :ivar type_version: The version of the application type as defined in the application manifest. + :vartype type_version: str + :ivar status: The status of the application deployed on the node. Following are the possible + values. Possible values include: "Invalid", "Downloading", "Activating", "Active", "Upgrading", + "Deactivating". + :vartype status: str or ~azure.servicefabric.models.DeployedApplicationStatus + :ivar work_directory: The work directory of the application on the node. The work directory can + be used to store application data. + :vartype work_directory: str + :ivar log_directory: The log directory of the application on the node. The log directory can be + used to store application logs. + :vartype log_directory: str + :ivar temp_directory: The temp directory of the application on the node. The code packages + belonging to the application are forked with this directory set as their temporary directory. + :vartype temp_directory: str + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'type_version': {'key': 'TypeVersion', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'work_directory': {'key': 'WorkDirectory', 'type': 'str'}, + 'log_directory': {'key': 'LogDirectory', 'type': 'str'}, + 'temp_directory': {'key': 'TempDirectory', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: The identity of the application. This is an encoded representation of the + application name. This is used in the REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype id: str + :keyword name: The name of the application, including the 'fabric:' URI scheme. + :paramtype name: str + :keyword type_name: The application type name as defined in the application manifest. + :paramtype type_name: str + :keyword type_version: The version of the application type as defined in the application + manifest. + :paramtype type_version: str + :keyword status: The status of the application deployed on the node. Following are the possible + values. Possible values include: "Invalid", "Downloading", "Activating", "Active", "Upgrading", + "Deactivating". + :paramtype status: str or ~azure.servicefabric.models.DeployedApplicationStatus + :keyword work_directory: The work directory of the application on the node. The work directory + can be used to store application data. + :paramtype work_directory: str + :keyword log_directory: The log directory of the application on the node. The log directory can + be used to store application logs. + :paramtype log_directory: str + :keyword temp_directory: The temp directory of the application on the node. The code packages + belonging to the application are forked with this directory set as their temporary directory. + :paramtype temp_directory: str + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + """ + super(DeployedApplicationInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_name = kwargs.get('type_name', None) + self.type_version = kwargs.get('type_version', None) + self.status = kwargs.get('status', None) + self.work_directory = kwargs.get('work_directory', None) + self.log_directory = kwargs.get('log_directory', None) + self.temp_directory = kwargs.get('temp_directory', None) + self.health_state = kwargs.get('health_state', None) + + +class DeployedApplicationNewHealthReportEvent(ApplicationEvent): + """Deployed Application Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_instance_id: Required. Id of Application instance. + :vartype application_instance_id: long + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_instance_id: Required. Id of Application instance. + :paramtype application_instance_id: long + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(DeployedApplicationNewHealthReportEvent, self).__init__(**kwargs) + self.kind = 'DeployedApplicationNewHealthReport' # type: str + self.application_instance_id = kwargs['application_instance_id'] + self.node_name = kwargs['node_name'] + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class DeployedApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed applications, containing health evaluations for each unhealthy deployed application that impacted current aggregated health state. +Can be returned when evaluating application health and the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar max_percent_unhealthy_deployed_applications: Maximum allowed percentage of unhealthy + deployed applications from the ApplicationHealthPolicy. + :vartype max_percent_unhealthy_deployed_applications: int + :ivar total_count: Total number of deployed applications of the application in the health + store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy DeployedApplicationHealthEvaluation that impacted the + aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword max_percent_unhealthy_deployed_applications: Maximum allowed percentage of unhealthy + deployed applications from the ApplicationHealthPolicy. + :paramtype max_percent_unhealthy_deployed_applications: int + :keyword total_count: Total number of deployed applications of the application in the health + store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy DeployedApplicationHealthEvaluation that impacted the + aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(DeployedApplicationsHealthEvaluation, self).__init__(**kwargs) + self.kind = 'DeployedApplications' # type: str + self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class DeployedCodePackageInfo(msrest.serialization.Model): + """Information about code package deployed on a Service Fabric node. + + :ivar name: The name of the code package. + :vartype name: str + :ivar version: The version of the code package specified in service manifest. + :vartype version: str + :ivar service_manifest_name: The name of service manifest that specified this code package. + :vartype service_manifest_name: str + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + :ivar host_type: Specifies the type of host for main entry point of a code package as specified + in service manifest. Possible values include: "Invalid", "ExeHost", "ContainerHost". + :vartype host_type: str or ~azure.servicefabric.models.HostType + :ivar host_isolation_mode: Specifies the isolation mode of main entry point of a code package + when it's host type is ContainerHost. This is specified as part of container host policies in + application manifest while importing service manifest. Possible values include: "None", + "Process", "HyperV". + :vartype host_isolation_mode: str or ~azure.servicefabric.models.HostIsolationMode + :ivar status: Specifies the status of a deployed application or service package on a Service + Fabric node. Possible values include: "Invalid", "Downloading", "Activating", "Active", + "Upgrading", "Deactivating", "RanToCompletion", "Failed". + :vartype status: str or ~azure.servicefabric.models.DeploymentStatus + :ivar run_frequency_interval: The interval at which code package is run. This is used for + periodic code package. + :vartype run_frequency_interval: str + :ivar setup_entry_point: Information about setup or main entry point of a code package deployed + on a Service Fabric node. + :vartype setup_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint + :ivar main_entry_point: Information about setup or main entry point of a code package deployed + on a Service Fabric node. + :vartype main_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_type': {'key': 'HostType', 'type': 'str'}, + 'host_isolation_mode': {'key': 'HostIsolationMode', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'run_frequency_interval': {'key': 'RunFrequencyInterval', 'type': 'str'}, + 'setup_entry_point': {'key': 'SetupEntryPoint', 'type': 'CodePackageEntryPoint'}, + 'main_entry_point': {'key': 'MainEntryPoint', 'type': 'CodePackageEntryPoint'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: The name of the code package. + :paramtype name: str + :keyword version: The version of the code package specified in service manifest. + :paramtype version: str + :keyword service_manifest_name: The name of service manifest that specified this code package. + :paramtype service_manifest_name: str + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + :keyword host_type: Specifies the type of host for main entry point of a code package as + specified in service manifest. Possible values include: "Invalid", "ExeHost", "ContainerHost". + :paramtype host_type: str or ~azure.servicefabric.models.HostType + :keyword host_isolation_mode: Specifies the isolation mode of main entry point of a code + package when it's host type is ContainerHost. This is specified as part of container host + policies in application manifest while importing service manifest. Possible values include: + "None", "Process", "HyperV". + :paramtype host_isolation_mode: str or ~azure.servicefabric.models.HostIsolationMode + :keyword status: Specifies the status of a deployed application or service package on a Service + Fabric node. Possible values include: "Invalid", "Downloading", "Activating", "Active", + "Upgrading", "Deactivating", "RanToCompletion", "Failed". + :paramtype status: str or ~azure.servicefabric.models.DeploymentStatus + :keyword run_frequency_interval: The interval at which code package is run. This is used for + periodic code package. + :paramtype run_frequency_interval: str + :keyword setup_entry_point: Information about setup or main entry point of a code package + deployed on a Service Fabric node. + :paramtype setup_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint + :keyword main_entry_point: Information about setup or main entry point of a code package + deployed on a Service Fabric node. + :paramtype main_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint + """ + super(DeployedCodePackageInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.host_type = kwargs.get('host_type', None) + self.host_isolation_mode = kwargs.get('host_isolation_mode', None) + self.status = kwargs.get('status', None) + self.run_frequency_interval = kwargs.get('run_frequency_interval', None) + self.setup_entry_point = kwargs.get('setup_entry_point', None) + self.main_entry_point = kwargs.get('main_entry_point', None) + + +class DeployedServicePackageHealth(EntityHealth): + """Information about the health of a service package for a specific application deployed on a Service Fabric node. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar service_manifest_name: Name of the service manifest. + :vartype service_manifest_name: str + :ivar node_name: Name of the node where this service package is deployed. + :vartype node_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword service_manifest_name: Name of the service manifest. + :paramtype service_manifest_name: str + :keyword node_name: Name of the node where this service package is deployed. + :paramtype node_name: str + """ + super(DeployedServicePackageHealth, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.node_name = kwargs.get('node_name', None) + + +class DeployedServicePackageHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a deployed service package, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar node_name: The name of a Service Fabric node. + :vartype node_name: str + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar service_manifest_name: The name of the service manifest. + :vartype service_manifest_name: str + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated + health state. The type of the unhealthy evaluations can be EventHealthEvaluation. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword node_name: The name of a Service Fabric node. + :paramtype node_name: str + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword service_manifest_name: The name of the service manifest. + :paramtype service_manifest_name: str + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current + aggregated health state. The type of the unhealthy evaluations can be EventHealthEvaluation. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(DeployedServicePackageHealthEvaluation, self).__init__(**kwargs) + self.kind = 'DeployedServicePackage' # type: str + self.node_name = kwargs.get('node_name', None) + self.application_name = kwargs.get('application_name', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class DeployedServicePackageHealthReportExpiredEvent(ApplicationEvent): + """Deployed Service Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar service_manifest: Required. Service manifest name. + :vartype service_manifest: str + :ivar service_package_instance_id: Required. Id of Service package instance. + :vartype service_package_instance_id: long + :ivar service_package_activation_id: Required. Id of Service package activation. + :vartype service_package_activation_id: str + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'service_manifest': {'required': True}, + 'service_package_instance_id': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_manifest': {'key': 'ServiceManifest', 'type': 'str'}, + 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword service_manifest: Required. Service manifest name. + :paramtype service_manifest: str + :keyword service_package_instance_id: Required. Id of Service package instance. + :paramtype service_package_instance_id: long + :keyword service_package_activation_id: Required. Id of Service package activation. + :paramtype service_package_activation_id: str + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(DeployedServicePackageHealthReportExpiredEvent, self).__init__(**kwargs) + self.kind = 'DeployedServicePackageHealthReportExpired' # type: str + self.service_manifest = kwargs['service_manifest'] + self.service_package_instance_id = kwargs['service_package_instance_id'] + self.service_package_activation_id = kwargs['service_package_activation_id'] + self.node_name = kwargs['node_name'] + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class DeployedServicePackageHealthState(EntityHealthState): + """Represents the health state of a deployed service package, containing the entity identifier and the aggregated health state. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar node_name: Name of the node on which the service package is deployed. + :vartype node_name: str + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar service_manifest_name: Name of the manifest describing the service package. + :vartype service_manifest_name: str + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword node_name: Name of the node on which the service package is deployed. + :paramtype node_name: str + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword service_manifest_name: Name of the manifest describing the service package. + :paramtype service_manifest_name: str + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + """ + super(DeployedServicePackageHealthState, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.application_name = kwargs.get('application_name', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + + +class DeployedServicePackageHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a deployed service package, which contains the service manifest name and the service package aggregated health state. + + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_manifest_name: The name of the service manifest. + :vartype service_manifest_name: str + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword service_manifest_name: The name of the service manifest. + :paramtype service_manifest_name: str + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + """ + super(DeployedServicePackageHealthStateChunk, self).__init__(**kwargs) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + + +class DeployedServicePackageHealthStateChunkList(msrest.serialization.Model): + """The list of deployed service package health state chunks that respect the input filters in the chunk query. Returned by get cluster health state chunks query. + + :ivar items: The list of deployed service package health state chunks that respect the input + filters in the chunk query. + :vartype items: list[~azure.servicefabric.models.DeployedServicePackageHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[DeployedServicePackageHealthStateChunk]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword items: The list of deployed service package health state chunks that respect the input + filters in the chunk query. + :paramtype items: list[~azure.servicefabric.models.DeployedServicePackageHealthStateChunk] + """ + super(DeployedServicePackageHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) + + +class DeployedServicePackageHealthStateFilter(msrest.serialization.Model): + """Defines matching criteria to determine whether a deployed service package should be included as a child of a deployed application in the cluster health chunk. +The deployed service packages are only returned if the parent entities match a filter specified in the cluster health chunk query description. The parent deployed application and its parent application must be included in the cluster health chunk. +One filter can match zero, one or multiple deployed service packages, depending on its properties. + + :ivar service_manifest_name_filter: The name of the service manifest which identifies the + deployed service packages that matches the filter. + If specified, the filter is applied only to the specified deployed service packages, if any. + If no deployed service packages with specified manifest name exist, nothing is returned in the + cluster health chunk based on this filter. + If any deployed service package exists, they are included in the cluster health chunk if it + respects the other filter properties. + If not specified, all deployed service packages that match the parent filters (if any) are + taken into consideration and matched against the other filter members, like health state + filter. + :vartype service_manifest_name_filter: str + :ivar service_package_activation_id_filter: The activation ID of a deployed service package + that matches the filter. + If not specified, the filter applies to all deployed service packages that match the other + parameters. + If specified, the filter matches only the deployed service package with the specified + activation ID. + :vartype service_package_activation_id_filter: str + :ivar health_state_filter: The filter for the health state of the deployed service packages. It + allows selecting deployed service packages if they match the desired health states. + The possible values are integer value of one of the following health states. Only deployed + service packages that match the filter are returned. All deployed service packages are used to + evaluate the parent deployed application aggregated health state. + If not specified, default value is None, unless the deployed service package ID is specified. + If the filter has default value and deployed service package ID is specified, the matching + deployed service package is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches deployed service packages with HealthState + value of OK (2) and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :vartype health_state_filter: int + """ + + _attribute_map = { + 'service_manifest_name_filter': {'key': 'ServiceManifestNameFilter', 'type': 'str'}, + 'service_package_activation_id_filter': {'key': 'ServicePackageActivationIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_manifest_name_filter: The name of the service manifest which identifies the + deployed service packages that matches the filter. + If specified, the filter is applied only to the specified deployed service packages, if any. + If no deployed service packages with specified manifest name exist, nothing is returned in the + cluster health chunk based on this filter. + If any deployed service package exists, they are included in the cluster health chunk if it + respects the other filter properties. + If not specified, all deployed service packages that match the parent filters (if any) are + taken into consideration and matched against the other filter members, like health state + filter. + :paramtype service_manifest_name_filter: str + :keyword service_package_activation_id_filter: The activation ID of a deployed service package + that matches the filter. + If not specified, the filter applies to all deployed service packages that match the other + parameters. + If specified, the filter matches only the deployed service package with the specified + activation ID. + :paramtype service_package_activation_id_filter: str + :keyword health_state_filter: The filter for the health state of the deployed service packages. + It allows selecting deployed service packages if they match the desired health states. + The possible values are integer value of one of the following health states. Only deployed + service packages that match the filter are returned. All deployed service packages are used to + evaluate the parent deployed application aggregated health state. + If not specified, default value is None, unless the deployed service package ID is specified. + If the filter has default value and deployed service package ID is specified, the matching + deployed service package is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches deployed service packages with HealthState + value of OK (2) and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :paramtype health_state_filter: int + """ + super(DeployedServicePackageHealthStateFilter, self).__init__(**kwargs) + self.service_manifest_name_filter = kwargs.get('service_manifest_name_filter', None) + self.service_package_activation_id_filter = kwargs.get('service_package_activation_id_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) + + +class DeployedServicePackageInfo(msrest.serialization.Model): + """Information about service package deployed on a Service Fabric node. + + :ivar name: The name of the service package as specified in the service manifest. + :vartype name: str + :ivar version: The version of the service package specified in service manifest. + :vartype version: str + :ivar status: Specifies the status of a deployed application or service package on a Service + Fabric node. Possible values include: "Invalid", "Downloading", "Activating", "Active", + "Upgrading", "Deactivating", "RanToCompletion", "Failed". + :vartype status: str or ~azure.servicefabric.models.DeploymentStatus + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: The name of the service package as specified in the service manifest. + :paramtype name: str + :keyword version: The version of the service package specified in service manifest. + :paramtype version: str + :keyword status: Specifies the status of a deployed application or service package on a Service + Fabric node. Possible values include: "Invalid", "Downloading", "Activating", "Active", + "Upgrading", "Deactivating", "RanToCompletion", "Failed". + :paramtype status: str or ~azure.servicefabric.models.DeploymentStatus + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + """ + super(DeployedServicePackageInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + self.status = kwargs.get('status', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + + +class DeployedServicePackageNewHealthReportEvent(ApplicationEvent): + """Deployed Service Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar service_manifest_name: Required. Service manifest name. + :vartype service_manifest_name: str + :ivar service_package_instance_id: Required. Id of Service package instance. + :vartype service_package_instance_id: long + :ivar service_package_activation_id: Required. Id of Service package activation. + :vartype service_package_activation_id: str + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'service_manifest_name': {'required': True}, + 'service_package_instance_id': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword service_manifest_name: Required. Service manifest name. + :paramtype service_manifest_name: str + :keyword service_package_instance_id: Required. Id of Service package instance. + :paramtype service_package_instance_id: long + :keyword service_package_activation_id: Required. Id of Service package activation. + :paramtype service_package_activation_id: str + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(DeployedServicePackageNewHealthReportEvent, self).__init__(**kwargs) + self.kind = 'DeployedServicePackageNewHealthReport' # type: str + self.service_manifest_name = kwargs['service_manifest_name'] + self.service_package_instance_id = kwargs['service_package_instance_id'] + self.service_package_activation_id = kwargs['service_package_activation_id'] + self.node_name = kwargs['node_name'] + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class DeployedServicePackagesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed service packages, containing health evaluations for each unhealthy deployed service package that impacted current aggregated health state. Can be returned when evaluating deployed application health and the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar total_count: Total number of deployed service packages of the deployed application in the + health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy DeployedServicePackageHealthEvaluation that impacted the + aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword total_count: Total number of deployed service packages of the deployed application in + the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy DeployedServicePackageHealthEvaluation that impacted the + aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(DeployedServicePackagesHealthEvaluation, self).__init__(**kwargs) + self.kind = 'DeployedServicePackages' # type: str + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class DeployedServiceReplicaDetailInfo(msrest.serialization.Model): + """Information about a Service Fabric service replica deployed on a node. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeployedStatefulServiceReplicaDetailInfo, DeployedStatelessServiceInstanceDetailInfo. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar service_name: Full hierarchical name of the service in URI format starting with + ``fabric:``. + :vartype service_name: str + :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :vartype partition_id: str + :ivar current_service_operation: Specifies the current active life-cycle operation on a + stateful service replica or stateless service instance. Possible values include: "Unknown", + "None", "Open", "ChangeRole", "Close", "Abort". + :vartype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName + :ivar current_service_operation_start_time_utc: The start time of the current service operation + in UTC format. + :vartype current_service_operation_start_time_utc: ~datetime.datetime + :ivar reported_load: List of load reported by replica. + :vartype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaDetailInfo', 'Stateless': 'DeployedStatelessServiceInstanceDetailInfo'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_name: Full hierarchical name of the service in URI format starting with + ``fabric:``. + :paramtype service_name: str + :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword current_service_operation: Specifies the current active life-cycle operation on a + stateful service replica or stateless service instance. Possible values include: "Unknown", + "None", "Open", "ChangeRole", "Close", "Abort". + :paramtype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName + :keyword current_service_operation_start_time_utc: The start time of the current service + operation in UTC format. + :paramtype current_service_operation_start_time_utc: ~datetime.datetime + :keyword reported_load: List of load reported by replica. + :paramtype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] + """ + super(DeployedServiceReplicaDetailInfo, self).__init__(**kwargs) + self.service_kind = None # type: Optional[str] + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) + self.current_service_operation = kwargs.get('current_service_operation', None) + self.current_service_operation_start_time_utc = kwargs.get('current_service_operation_start_time_utc', None) + self.reported_load = kwargs.get('reported_load', None) + + +class DeployedServiceReplicaInfo(msrest.serialization.Model): + """Information about a Service Fabric service replica deployed on a node. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeployedStatefulServiceReplicaInfo, DeployedStatelessServiceInstanceInfo. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar service_name: The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar service_type_name: Name of the service type as specified in the service manifest. + :vartype service_type_name: str + :ivar service_manifest_name: The name of the service manifest in which this service type is + defined. + :vartype service_manifest_name: str + :ivar code_package_name: The name of the code package that hosts this replica. + :vartype code_package_name: str + :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", + "InBuild", "Standby", "Ready", "Down", "Dropped". + :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :ivar address: The last address returned by the replica in Open or ChangeRole. + :vartype address: str + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + :ivar host_process_id: Host process ID of the process that is hosting the replica. This will be + zero if the replica is down. In hyper-v containers this host process ID will be from different + kernel. + :vartype host_process_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaInfo', 'Stateless': 'DeployedStatelessServiceInstanceInfo'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_name: The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword service_type_name: Name of the service type as specified in the service manifest. + :paramtype service_type_name: str + :keyword service_manifest_name: The name of the service manifest in which this service type is + defined. + :paramtype service_manifest_name: str + :keyword code_package_name: The name of the code package that hosts this replica. + :paramtype code_package_name: str + :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_status: The status of a replica of a service. Possible values include: + "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". + :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :keyword address: The last address returned by the replica in Open or ChangeRole. + :paramtype address: str + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + :keyword host_process_id: Host process ID of the process that is hosting the replica. This will + be zero if the replica is down. In hyper-v containers this host process ID will be from + different kernel. + :paramtype host_process_id: str + """ + super(DeployedServiceReplicaInfo, self).__init__(**kwargs) + self.service_kind = None # type: Optional[str] + self.service_name = kwargs.get('service_name', None) + self.service_type_name = kwargs.get('service_type_name', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.code_package_name = kwargs.get('code_package_name', None) + self.partition_id = kwargs.get('partition_id', None) + self.replica_status = kwargs.get('replica_status', None) + self.address = kwargs.get('address', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.host_process_id = kwargs.get('host_process_id', None) + + +class DeployedServiceTypeInfo(msrest.serialization.Model): + """Information about service type deployed on a node, information such as the status of the service type registration on a node. + + :ivar service_type_name: Name of the service type as specified in the service manifest. + :vartype service_type_name: str + :ivar service_manifest_name: The name of the service manifest in which this service type is + defined. + :vartype service_manifest_name: str + :ivar code_package_name: The name of the code package that registered the service type. + :vartype code_package_name: str + :ivar status: The status of the service type registration on the node. Possible values include: + "Invalid", "Disabled", "Enabled", "Registered". + :vartype status: str or ~azure.servicefabric.models.ServiceTypeRegistrationStatus + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + """ + + _attribute_map = { + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_type_name: Name of the service type as specified in the service manifest. + :paramtype service_type_name: str + :keyword service_manifest_name: The name of the service manifest in which this service type is + defined. + :paramtype service_manifest_name: str + :keyword code_package_name: The name of the code package that registered the service type. + :paramtype code_package_name: str + :keyword status: The status of the service type registration on the node. Possible values + include: "Invalid", "Disabled", "Enabled", "Registered". + :paramtype status: str or ~azure.servicefabric.models.ServiceTypeRegistrationStatus + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + """ + super(DeployedServiceTypeInfo, self).__init__(**kwargs) + self.service_type_name = kwargs.get('service_type_name', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.code_package_name = kwargs.get('code_package_name', None) + self.status = kwargs.get('status', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + + +class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo): + """Information about a stateful replica running in a code package. Note DeployedServiceReplicaQueryResult will contain duplicate data like ServiceKind, ServiceName, PartitionId and replicaId. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar service_name: Full hierarchical name of the service in URI format starting with + ``fabric:``. + :vartype service_name: str + :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :vartype partition_id: str + :ivar current_service_operation: Specifies the current active life-cycle operation on a + stateful service replica or stateless service instance. Possible values include: "Unknown", + "None", "Open", "ChangeRole", "Close", "Abort". + :vartype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName + :ivar current_service_operation_start_time_utc: The start time of the current service operation + in UTC format. + :vartype current_service_operation_start_time_utc: ~datetime.datetime + :ivar reported_load: List of load reported by replica. + :vartype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] + :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :vartype replica_id: str + :ivar current_replicator_operation: Specifies the operation currently being executed by the + Replicator. Possible values include: "Invalid", "None", "Open", "ChangeRole", "UpdateEpoch", + "Close", "Abort", "OnDataLoss", "WaitForCatchup", "Build". + :vartype current_replicator_operation: str or + ~azure.servicefabric.models.ReplicatorOperationName + :ivar read_status: Specifies the access status of the partition. Possible values include: + "Invalid", "Granted", "ReconfigurationPending", "NotPrimary", "NoWriteQuorum". + :vartype read_status: str or ~azure.servicefabric.models.PartitionAccessStatus + :ivar write_status: Specifies the access status of the partition. Possible values include: + "Invalid", "Granted", "ReconfigurationPending", "NotPrimary", "NoWriteQuorum". + :vartype write_status: str or ~azure.servicefabric.models.PartitionAccessStatus + :ivar replicator_status: Represents a base class for primary or secondary replicator status. + Contains information about the service fabric replicator like the replication/copy queue + utilization, last acknowledgement received timestamp, etc. + :vartype replicator_status: ~azure.servicefabric.models.ReplicatorStatus + :ivar replica_status: Key value store related information for the replica. + :vartype replica_status: ~azure.servicefabric.models.KeyValueStoreReplicaStatus + :ivar deployed_service_replica_query_result: Information about a stateful service replica + deployed on a node. + :vartype deployed_service_replica_query_result: + ~azure.servicefabric.models.DeployedStatefulServiceReplicaInfo + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'current_replicator_operation': {'key': 'CurrentReplicatorOperation', 'type': 'str'}, + 'read_status': {'key': 'ReadStatus', 'type': 'str'}, + 'write_status': {'key': 'WriteStatus', 'type': 'str'}, + 'replicator_status': {'key': 'ReplicatorStatus', 'type': 'ReplicatorStatus'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'KeyValueStoreReplicaStatus'}, + 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatefulServiceReplicaInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_name: Full hierarchical name of the service in URI format starting with + ``fabric:``. + :paramtype service_name: str + :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword current_service_operation: Specifies the current active life-cycle operation on a + stateful service replica or stateless service instance. Possible values include: "Unknown", + "None", "Open", "ChangeRole", "Close", "Abort". + :paramtype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName + :keyword current_service_operation_start_time_utc: The start time of the current service + operation in UTC format. + :paramtype current_service_operation_start_time_utc: ~datetime.datetime + :keyword reported_load: List of load reported by replica. + :paramtype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] + :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: str + :keyword current_replicator_operation: Specifies the operation currently being executed by the + Replicator. Possible values include: "Invalid", "None", "Open", "ChangeRole", "UpdateEpoch", + "Close", "Abort", "OnDataLoss", "WaitForCatchup", "Build". + :paramtype current_replicator_operation: str or + ~azure.servicefabric.models.ReplicatorOperationName + :keyword read_status: Specifies the access status of the partition. Possible values include: + "Invalid", "Granted", "ReconfigurationPending", "NotPrimary", "NoWriteQuorum". + :paramtype read_status: str or ~azure.servicefabric.models.PartitionAccessStatus + :keyword write_status: Specifies the access status of the partition. Possible values include: + "Invalid", "Granted", "ReconfigurationPending", "NotPrimary", "NoWriteQuorum". + :paramtype write_status: str or ~azure.servicefabric.models.PartitionAccessStatus + :keyword replicator_status: Represents a base class for primary or secondary replicator status. + Contains information about the service fabric replicator like the replication/copy queue + utilization, last acknowledgement received timestamp, etc. + :paramtype replicator_status: ~azure.servicefabric.models.ReplicatorStatus + :keyword replica_status: Key value store related information for the replica. + :paramtype replica_status: ~azure.servicefabric.models.KeyValueStoreReplicaStatus + :keyword deployed_service_replica_query_result: Information about a stateful service replica + deployed on a node. + :paramtype deployed_service_replica_query_result: + ~azure.servicefabric.models.DeployedStatefulServiceReplicaInfo + """ + super(DeployedStatefulServiceReplicaDetailInfo, self).__init__(**kwargs) + self.service_kind = 'Stateful' # type: str + self.replica_id = kwargs.get('replica_id', None) + self.current_replicator_operation = kwargs.get('current_replicator_operation', None) + self.read_status = kwargs.get('read_status', None) + self.write_status = kwargs.get('write_status', None) + self.replicator_status = kwargs.get('replicator_status', None) + self.replica_status = kwargs.get('replica_status', None) + self.deployed_service_replica_query_result = kwargs.get('deployed_service_replica_query_result', None) + + +class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): + """Information about a stateful service replica deployed on a node. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar service_name: The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar service_type_name: Name of the service type as specified in the service manifest. + :vartype service_type_name: str + :ivar service_manifest_name: The name of the service manifest in which this service type is + defined. + :vartype service_manifest_name: str + :ivar code_package_name: The name of the code package that hosts this replica. + :vartype code_package_name: str + :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", + "InBuild", "Standby", "Ready", "Down", "Dropped". + :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :ivar address: The last address returned by the replica in Open or ChangeRole. + :vartype address: str + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + :ivar host_process_id: Host process ID of the process that is hosting the replica. This will be + zero if the replica is down. In hyper-v containers this host process ID will be from different + kernel. + :vartype host_process_id: str + :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :vartype replica_id: str + :ivar replica_role: The role of a replica of a stateful service. Possible values include: + "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", + "ActiveAuxiliary", "PrimaryAuxiliary". + :vartype replica_role: str or ~azure.servicefabric.models.ReplicaRole + :ivar reconfiguration_information: Information about current reconfiguration like phase, type, + previous configuration role of replica and reconfiguration start date time. + :vartype reconfiguration_information: ~azure.servicefabric.models.ReconfigurationInformation + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, + 'reconfiguration_information': {'key': 'ReconfigurationInformation', 'type': 'ReconfigurationInformation'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_name: The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword service_type_name: Name of the service type as specified in the service manifest. + :paramtype service_type_name: str + :keyword service_manifest_name: The name of the service manifest in which this service type is + defined. + :paramtype service_manifest_name: str + :keyword code_package_name: The name of the code package that hosts this replica. + :paramtype code_package_name: str + :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_status: The status of a replica of a service. Possible values include: + "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". + :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :keyword address: The last address returned by the replica in Open or ChangeRole. + :paramtype address: str + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + :keyword host_process_id: Host process ID of the process that is hosting the replica. This will + be zero if the replica is down. In hyper-v containers this host process ID will be from + different kernel. + :paramtype host_process_id: str + :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: str + :keyword replica_role: The role of a replica of a stateful service. Possible values include: + "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", + "ActiveAuxiliary", "PrimaryAuxiliary". + :paramtype replica_role: str or ~azure.servicefabric.models.ReplicaRole + :keyword reconfiguration_information: Information about current reconfiguration like phase, + type, previous configuration role of replica and reconfiguration start date time. + :paramtype reconfiguration_information: ~azure.servicefabric.models.ReconfigurationInformation + """ + super(DeployedStatefulServiceReplicaInfo, self).__init__(**kwargs) + self.service_kind = 'Stateful' # type: str + self.replica_id = kwargs.get('replica_id', None) + self.replica_role = kwargs.get('replica_role', None) + self.reconfiguration_information = kwargs.get('reconfiguration_information', None) + + +class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInfo): + """Information about a stateless instance running in a code package. Note that DeployedServiceReplicaQueryResult will contain duplicate data like ServiceKind, ServiceName, PartitionId and InstanceId. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar service_name: Full hierarchical name of the service in URI format starting with + ``fabric:``. + :vartype service_name: str + :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :vartype partition_id: str + :ivar current_service_operation: Specifies the current active life-cycle operation on a + stateful service replica or stateless service instance. Possible values include: "Unknown", + "None", "Open", "ChangeRole", "Close", "Abort". + :vartype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName + :ivar current_service_operation_start_time_utc: The start time of the current service operation + in UTC format. + :vartype current_service_operation_start_time_utc: ~datetime.datetime + :ivar reported_load: List of load reported by replica. + :vartype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] + :ivar instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric to + uniquely identify an instance of a partition of a stateless service. It is unique within a + partition and does not change for the lifetime of the instance. If the instance has failed over + on the same or different node, it will get a different value for the InstanceId. + :vartype instance_id: str + :ivar deployed_service_replica_query_result: Information about a stateless service instance + deployed on a node. + :vartype deployed_service_replica_query_result: + ~azure.servicefabric.models.DeployedStatelessServiceInstanceInfo + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatelessServiceInstanceInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_name: Full hierarchical name of the service in URI format starting with + ``fabric:``. + :paramtype service_name: str + :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword current_service_operation: Specifies the current active life-cycle operation on a + stateful service replica or stateless service instance. Possible values include: "Unknown", + "None", "Open", "ChangeRole", "Close", "Abort". + :paramtype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName + :keyword current_service_operation_start_time_utc: The start time of the current service + operation in UTC format. + :paramtype current_service_operation_start_time_utc: ~datetime.datetime + :keyword reported_load: List of load reported by replica. + :paramtype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] + :keyword instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric + to uniquely identify an instance of a partition of a stateless service. It is unique within a + partition and does not change for the lifetime of the instance. If the instance has failed over + on the same or different node, it will get a different value for the InstanceId. + :paramtype instance_id: str + :keyword deployed_service_replica_query_result: Information about a stateless service instance + deployed on a node. + :paramtype deployed_service_replica_query_result: + ~azure.servicefabric.models.DeployedStatelessServiceInstanceInfo + """ + super(DeployedStatelessServiceInstanceDetailInfo, self).__init__(**kwargs) + self.service_kind = 'Stateless' # type: str + self.instance_id = kwargs.get('instance_id', None) + self.deployed_service_replica_query_result = kwargs.get('deployed_service_replica_query_result', None) + + +class DeployedStatelessServiceInstanceInfo(DeployedServiceReplicaInfo): + """Information about a stateless service instance deployed on a node. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar service_name: The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar service_type_name: Name of the service type as specified in the service manifest. + :vartype service_type_name: str + :ivar service_manifest_name: The name of the service manifest in which this service type is + defined. + :vartype service_manifest_name: str + :ivar code_package_name: The name of the code package that hosts this replica. + :vartype code_package_name: str + :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", + "InBuild", "Standby", "Ready", "Down", "Dropped". + :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :ivar address: The last address returned by the replica in Open or ChangeRole. + :vartype address: str + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + :ivar host_process_id: Host process ID of the process that is hosting the replica. This will be + zero if the replica is down. In hyper-v containers this host process ID will be from different + kernel. + :vartype host_process_id: str + :ivar instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric to + uniquely identify an instance of a partition of a stateless service. It is unique within a + partition and does not change for the lifetime of the instance. If the instance has failed over + on the same or different node, it will get a different value for the InstanceId. + :vartype instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_name: The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword service_type_name: Name of the service type as specified in the service manifest. + :paramtype service_type_name: str + :keyword service_manifest_name: The name of the service manifest in which this service type is + defined. + :paramtype service_manifest_name: str + :keyword code_package_name: The name of the code package that hosts this replica. + :paramtype code_package_name: str + :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_status: The status of a replica of a service. Possible values include: + "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". + :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :keyword address: The last address returned by the replica in Open or ChangeRole. + :paramtype address: str + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + :keyword host_process_id: Host process ID of the process that is hosting the replica. This will + be zero if the replica is down. In hyper-v containers this host process ID will be from + different kernel. + :paramtype host_process_id: str + :keyword instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric + to uniquely identify an instance of a partition of a stateless service. It is unique within a + partition and does not change for the lifetime of the instance. If the instance has failed over + on the same or different node, it will get a different value for the InstanceId. + :paramtype instance_id: str + """ + super(DeployedStatelessServiceInstanceInfo, self).__init__(**kwargs) + self.service_kind = 'Stateless' # type: str + self.instance_id = kwargs.get('instance_id', None) + + +class DeployServicePackageToNodeDescription(msrest.serialization.Model): + """Defines description for downloading packages associated with a service manifest to image cache on a Service Fabric node. + + All required parameters must be populated in order to send to Azure. + + :ivar service_manifest_name: Required. The name of service manifest whose packages need to be + downloaded. + :vartype service_manifest_name: str + :ivar application_type_name: Required. The application type name as defined in the application + manifest. + :vartype application_type_name: str + :ivar application_type_version: Required. The version of the application type as defined in the + application manifest. + :vartype application_type_version: str + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar package_sharing_policy: List of package sharing policy information. + :vartype package_sharing_policy: list[~azure.servicefabric.models.PackageSharingPolicyInfo] + """ + + _validation = { + 'service_manifest_name': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'node_name': {'required': True}, + } + + _attribute_map = { + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'package_sharing_policy': {'key': 'PackageSharingPolicy', 'type': '[PackageSharingPolicyInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_manifest_name: Required. The name of service manifest whose packages need to + be downloaded. + :paramtype service_manifest_name: str + :keyword application_type_name: Required. The application type name as defined in the + application manifest. + :paramtype application_type_name: str + :keyword application_type_version: Required. The version of the application type as defined in + the application manifest. + :paramtype application_type_version: str + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword package_sharing_policy: List of package sharing policy information. + :paramtype package_sharing_policy: list[~azure.servicefabric.models.PackageSharingPolicyInfo] + """ + super(DeployServicePackageToNodeDescription, self).__init__(**kwargs) + self.service_manifest_name = kwargs['service_manifest_name'] + self.application_type_name = kwargs['application_type_name'] + self.application_type_version = kwargs['application_type_version'] + self.node_name = kwargs['node_name'] + self.package_sharing_policy = kwargs.get('package_sharing_policy', None) + + +class DiagnosticsDescription(msrest.serialization.Model): + """Describes the diagnostics options available. + + :ivar sinks: List of supported sinks that can be referenced. + :vartype sinks: list[~azure.servicefabric.models.DiagnosticsSinkProperties] + :ivar enabled: Status of whether or not sinks are enabled. + :vartype enabled: bool + :ivar default_sink_refs: The sinks to be used if diagnostics is enabled. Sink choices can be + overridden at the service and code package level. + :vartype 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 + ): + """ + :keyword sinks: List of supported sinks that can be referenced. + :paramtype sinks: list[~azure.servicefabric.models.DiagnosticsSinkProperties] + :keyword enabled: Status of whether or not sinks are enabled. + :paramtype enabled: bool + :keyword default_sink_refs: The sinks to be used if diagnostics is enabled. Sink choices can be + overridden at the service and code package level. + :paramtype default_sink_refs: list[str] + """ + super(DiagnosticsDescription, self).__init__(**kwargs) + self.sinks = kwargs.get('sinks', None) + self.enabled = kwargs.get('enabled', None) + self.default_sink_refs = kwargs.get('default_sink_refs', None) + + +class DiagnosticsRef(msrest.serialization.Model): + """Reference to sinks in DiagnosticsDescription. + + :ivar enabled: Status of whether or not sinks are enabled. + :vartype enabled: bool + :ivar sink_refs: List of sinks to be used if enabled. References the list of sinks in + DiagnosticsDescription. + :vartype sink_refs: list[str] + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'sink_refs': {'key': 'sinkRefs', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword enabled: Status of whether or not sinks are enabled. + :paramtype enabled: bool + :keyword sink_refs: List of sinks to be used if enabled. References the list of sinks in + DiagnosticsDescription. + :paramtype sink_refs: list[str] + """ + super(DiagnosticsRef, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.sink_refs = kwargs.get('sink_refs', None) + + +class DisableBackupDescription(msrest.serialization.Model): + """It describes the body parameters while disabling backup of a backup entity(Application/Service/Partition). + + All required parameters must be populated in order to send to Azure. + + :ivar clean_backup: Required. Boolean flag to delete backups. It can be set to true for + deleting all the backups which were created for the backup entity that is getting disabled for + backup. + :vartype clean_backup: bool + """ + + _validation = { + 'clean_backup': {'required': True}, + } + + _attribute_map = { + 'clean_backup': {'key': 'CleanBackup', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword clean_backup: Required. Boolean flag to delete backups. It can be set to true for + deleting all the backups which were created for the backup entity that is getting disabled for + backup. + :paramtype clean_backup: bool + """ + super(DisableBackupDescription, self).__init__(**kwargs) + self.clean_backup = kwargs['clean_backup'] + + +class DiskInfo(msrest.serialization.Model): + """Information about the disk. + + :ivar capacity: the disk size in bytes. + :vartype capacity: str + :ivar available_space: the available disk space in bytes. + :vartype available_space: str + """ + + _attribute_map = { + 'capacity': {'key': 'Capacity', 'type': 'str'}, + 'available_space': {'key': 'AvailableSpace', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword capacity: the disk size in bytes. + :paramtype capacity: str + :keyword available_space: the available disk space in bytes. + :paramtype available_space: str + """ + super(DiskInfo, self).__init__(**kwargs) + self.capacity = kwargs.get('capacity', None) + self.available_space = kwargs.get('available_space', None) + + +class DoublePropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Double. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property, determined by the type of data. Following are the + possible values.Constant filled by server. Possible values include: "Invalid", "Binary", + "Int64", "Double", "String", "Guid". + :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind + :ivar data: Required. The data of the property value. + :vartype data: float + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword data: Required. The data of the property value. + :paramtype data: float + """ + super(DoublePropertyValue, self).__init__(**kwargs) + self.kind = 'Double' # type: str + self.data = kwargs['data'] + + +class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Dsms Azure blob store used for storing and enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant + filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", + "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". + :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind + :ivar friendly_name: Friendly name for this backup storage. + :vartype friendly_name: str + :ivar storage_credentials_source_location: Required. The source location of the storage + credentials to connect to the Dsms Azure blob store. + :vartype storage_credentials_source_location: str + :ivar container_name: Required. The name of the container in the blob store to store and + enumerate backups from. + :vartype container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'storage_credentials_source_location': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_credentials_source_location': {'key': 'StorageCredentialsSourceLocation', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword friendly_name: Friendly name for this backup storage. + :paramtype friendly_name: str + :keyword storage_credentials_source_location: Required. The source location of the storage + credentials to connect to the Dsms Azure blob store. + :paramtype storage_credentials_source_location: str + :keyword container_name: Required. The name of the container in the blob store to store and + enumerate backups from. + :paramtype container_name: str + """ + super(DsmsAzureBlobBackupStorageDescription, self).__init__(**kwargs) + self.storage_kind = 'DsmsAzureBlobStore' # type: str + self.storage_credentials_source_location = kwargs['storage_credentials_source_location'] + self.container_name = kwargs['container_name'] + + +class EnableBackupDescription(msrest.serialization.Model): + """Specifies the parameters needed to enable periodic backup. + + All required parameters must be populated in order to send to Azure. + + :ivar backup_policy_name: Required. Name of the backup policy to be used for enabling periodic + backups. + :vartype backup_policy_name: str + """ + + _validation = { + 'backup_policy_name': {'required': True}, + } + + _attribute_map = { + 'backup_policy_name': {'key': 'BackupPolicyName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_policy_name: Required. Name of the backup policy to be used for enabling + periodic backups. + :paramtype backup_policy_name: str + """ + super(EnableBackupDescription, self).__init__(**kwargs) + self.backup_policy_name = kwargs['backup_policy_name'] + + +class EndpointProperties(msrest.serialization.Model): + """Describes a container endpoint. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the endpoint. + :vartype name: str + :ivar port: Port used by the container. + :vartype port: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. The name of the endpoint. + :paramtype name: str + :keyword port: Port used by the container. + :paramtype port: int + """ + super(EndpointProperties, self).__init__(**kwargs) + self.name = kwargs['name'] + self.port = kwargs.get('port', None) + + +class EndpointRef(msrest.serialization.Model): + """Describes a reference to a service endpoint. + + :ivar name: Name of the endpoint. + :vartype name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Name of the endpoint. + :paramtype name: str + """ + super(EndpointRef, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class SafetyCheck(msrest.serialization.Model): + """Represents a safety check performed by service fabric before continuing with the operations. These checks ensure the availability of the service and the reliability of the state. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SeedNodeSafetyCheck, PartitionSafetyCheck. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'EnsureSeedNodeQuorum': 'SeedNodeSafetyCheck', 'PartitionSafetyCheck': 'PartitionSafetyCheck'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(SafetyCheck, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class PartitionSafetyCheck(SafetyCheck): + """Represents a safety check for the service partition being performed by service fabric before continuing with operations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EnsureAvailabilitySafetyCheck, EnsurePartitionQuorumSafetyCheck, WaitForInbuildReplicaSafetyCheck, WaitForPrimaryPlacementSafetyCheck, WaitForPrimarySwapSafetyCheck, WaitForReconfigurationSafetyCheck. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + :ivar partition_id: Id of the partition which is undergoing the safety check. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'EnsureAvailability': 'EnsureAvailabilitySafetyCheck', 'EnsurePartitionQuorum': 'EnsurePartitionQuorumSafetyCheck', 'WaitForInbuildReplica': 'WaitForInbuildReplicaSafetyCheck', 'WaitForPrimaryPlacement': 'WaitForPrimaryPlacementSafetyCheck', 'WaitForPrimarySwap': 'WaitForPrimarySwapSafetyCheck', 'WaitForReconfiguration': 'WaitForReconfigurationSafetyCheck'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword partition_id: Id of the partition which is undergoing the safety check. + :paramtype partition_id: str + """ + super(PartitionSafetyCheck, self).__init__(**kwargs) + self.kind = 'PartitionSafetyCheck' # type: str + self.partition_id = kwargs.get('partition_id', None) + + +class EnsureAvailabilitySafetyCheck(PartitionSafetyCheck): + """Safety check that waits to ensure the availability of the partition. It waits until there are replicas available such that bringing down this replica will not cause availability loss for the partition. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + :ivar partition_id: Id of the partition which is undergoing the safety check. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword partition_id: Id of the partition which is undergoing the safety check. + :paramtype partition_id: str + """ + super(EnsureAvailabilitySafetyCheck, self).__init__(**kwargs) + self.kind = 'EnsureAvailability' # type: str + + +class EnsurePartitionQuorumSafetyCheck(PartitionSafetyCheck): + """Safety check that ensures that a quorum of replicas are not lost for a partition. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + :ivar partition_id: Id of the partition which is undergoing the safety check. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword partition_id: Id of the partition which is undergoing the safety check. + :paramtype partition_id: str + """ + super(EnsurePartitionQuorumSafetyCheck, self).__init__(**kwargs) + self.kind = 'EnsurePartitionQuorum' # type: str + + +class EntityKindHealthStateCount(msrest.serialization.Model): + """Represents health state count for entities of the specified entity kind. + + :ivar entity_kind: The entity kind for which health states are evaluated. Possible values + include: "Invalid", "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + :vartype entity_kind: str or ~azure.servicefabric.models.EntityKind + :ivar health_state_count: The health state count for the entities of the specified kind. + :vartype health_state_count: ~azure.servicefabric.models.HealthStateCount + """ + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'health_state_count': {'key': 'HealthStateCount', 'type': 'HealthStateCount'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword entity_kind: The entity kind for which health states are evaluated. Possible values + include: "Invalid", "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + :paramtype entity_kind: str or ~azure.servicefabric.models.EntityKind + :keyword health_state_count: The health state count for the entities of the specified kind. + :paramtype health_state_count: ~azure.servicefabric.models.HealthStateCount + """ + super(EntityKindHealthStateCount, self).__init__(**kwargs) + self.entity_kind = kwargs.get('entity_kind', None) + self.health_state_count = kwargs.get('health_state_count', None) + + +class EnvironmentVariable(msrest.serialization.Model): + """Describes an environment variable for the container. + + :ivar type: The type of the environment variable being given in value. Possible values include: + "ClearText", "KeyVaultReference", "SecretValueReference". Default value: "ClearText". + :vartype type: str or ~azure.servicefabric.models.EnvironmentVariableType + :ivar name: The name of the environment variable. + :vartype name: str + :ivar value: The value of the environment variable, will be processed based on the type + provided. + :vartype value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword type: The type of the environment variable being given in value. Possible values + include: "ClearText", "KeyVaultReference", "SecretValueReference". Default value: "ClearText". + :paramtype type: str or ~azure.servicefabric.models.EnvironmentVariableType + :keyword name: The name of the environment variable. + :paramtype name: str + :keyword value: The value of the environment variable, will be processed based on the type + provided. + :paramtype value: str + """ + super(EnvironmentVariable, self).__init__(**kwargs) + self.type = kwargs.get('type', "ClearText") + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class Epoch(msrest.serialization.Model): + """An Epoch is a configuration number for the partition as a whole. When the configuration of the replica set changes, for example when the Primary replica changes, the operations that are replicated from the new Primary replica are said to be a new Epoch from the ones which were sent by the old Primary replica. + + :ivar configuration_version: The current configuration number of this Epoch. The configuration + number is an increasing value that is updated whenever the configuration of this replica set + changes. + :vartype configuration_version: str + :ivar data_loss_version: The current data loss number of this Epoch. The data loss number + property is an increasing value which is updated whenever data loss is suspected, as when loss + of a quorum of replicas in the replica set that includes the Primary replica. + :vartype data_loss_version: str + """ + + _attribute_map = { + 'configuration_version': {'key': 'ConfigurationVersion', 'type': 'str'}, + 'data_loss_version': {'key': 'DataLossVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword configuration_version: The current configuration number of this Epoch. The + configuration number is an increasing value that is updated whenever the configuration of this + replica set changes. + :paramtype configuration_version: str + :keyword data_loss_version: The current data loss number of this Epoch. The data loss number + property is an increasing value which is updated whenever data loss is suspected, as when loss + of a quorum of replicas in the replica set that includes the Primary replica. + :paramtype data_loss_version: str + """ + super(Epoch, self).__init__(**kwargs) + self.configuration_version = kwargs.get('configuration_version', None) + self.data_loss_version = kwargs.get('data_loss_version', None) + + +class EventHealthEvaluation(HealthEvaluation): + """Represents health evaluation of a HealthEvent that was reported on the entity. +The health evaluation is returned when evaluating health of an entity results in Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar consider_warning_as_error: Indicates whether warnings are treated with the same severity + as errors. The field is specified in the health policy used to evaluate the entity. + :vartype consider_warning_as_error: bool + :ivar unhealthy_event: Represents health information reported on a health entity, such as + cluster, application or node, with additional metadata added by the Health Manager. + :vartype unhealthy_event: ~azure.servicefabric.models.HealthEvent + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'unhealthy_event': {'key': 'UnhealthyEvent', 'type': 'HealthEvent'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword consider_warning_as_error: Indicates whether warnings are treated with the same + severity as errors. The field is specified in the health policy used to evaluate the entity. + :paramtype consider_warning_as_error: bool + :keyword unhealthy_event: Represents health information reported on a health entity, such as + cluster, application or node, with additional metadata added by the Health Manager. + :paramtype unhealthy_event: ~azure.servicefabric.models.HealthEvent + """ + super(EventHealthEvaluation, self).__init__(**kwargs) + self.kind = 'Event' # type: str + self.consider_warning_as_error = kwargs.get('consider_warning_as_error', None) + self.unhealthy_event = kwargs.get('unhealthy_event', None) + + +class ExecutingFaultsChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos has decided on the faults for an iteration. This Chaos event contains the details of the faults as a list of strings. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values + include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", + "Stopped". + :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind + :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :vartype time_stamp_utc: ~datetime.datetime + :ivar faults: List of string description of the faults that Chaos decided to execute in an + iteration. + :vartype faults: list[str] + """ + + _validation = { + 'kind': {'required': True}, + 'time_stamp_utc': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'faults': {'key': 'Faults', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :paramtype time_stamp_utc: ~datetime.datetime + :keyword faults: List of string description of the faults that Chaos decided to execute in an + iteration. + :paramtype faults: list[str] + """ + super(ExecutingFaultsChaosEvent, self).__init__(**kwargs) + self.kind = 'ExecutingFaults' # type: str + self.faults = kwargs.get('faults', None) + + +class ProvisionApplicationTypeDescriptionBase(msrest.serialization.Model): + """Represents the type of registration or provision requested, and if the operation needs to be asynchronous or not. Supported types of provision operations are from either image store or external store. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ExternalStoreProvisionApplicationTypeDescription, ProvisionApplicationTypeDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of application type registration or provision requested. The + application package can be registered or provisioned either from the image store or from an + external store. Following are the kinds of the application type provision.Constant filled by + server. Possible values include: "Invalid", "ImageStorePath", "ExternalStore". + :vartype kind: str or ~azure.servicefabric.models.ProvisionApplicationTypeKind + :ivar async_property: Required. Indicates whether or not provisioning should occur + asynchronously. When set to true, the provision operation returns when the request is accepted + by the system, and the provision operation continues without any timeout limit. The default + value is false. For large application packages, we recommend setting the value to true. + :vartype async_property: bool + """ + + _validation = { + 'kind': {'required': True}, + 'async_property': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'async_property': {'key': 'Async', 'type': 'bool'}, + } + + _subtype_map = { + 'kind': {'ExternalStore': 'ExternalStoreProvisionApplicationTypeDescription', 'ImageStorePath': 'ProvisionApplicationTypeDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword async_property: Required. Indicates whether or not provisioning should occur + asynchronously. When set to true, the provision operation returns when the request is accepted + by the system, and the provision operation continues without any timeout limit. The default + value is false. For large application packages, we recommend setting the value to true. + :paramtype async_property: bool + """ + super(ProvisionApplicationTypeDescriptionBase, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.async_property = kwargs['async_property'] + + +class ExternalStoreProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): + """Describes the operation to register or provision an application type using an application package from an external store instead of a package uploaded to the Service Fabric image store. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of application type registration or provision requested. The + application package can be registered or provisioned either from the image store or from an + external store. Following are the kinds of the application type provision.Constant filled by + server. Possible values include: "Invalid", "ImageStorePath", "ExternalStore". + :vartype kind: str or ~azure.servicefabric.models.ProvisionApplicationTypeKind + :ivar async_property: Required. Indicates whether or not provisioning should occur + asynchronously. When set to true, the provision operation returns when the request is accepted + by the system, and the provision operation continues without any timeout limit. The default + value is false. For large application packages, we recommend setting the value to true. + :vartype async_property: bool + :ivar application_package_download_uri: Required. The path to the '.sfpkg' application package + from where the application package can be downloaded using HTTP or HTTPS protocols. The + application package can be stored in an external store that provides GET operation to download + the file. Supported protocols are HTTP and HTTPS, and the path must allow READ access. + :vartype application_package_download_uri: str + :ivar application_type_name: Required. The application type name represents the name of the + application type found in the application manifest. + :vartype application_type_name: str + :ivar application_type_version: Required. The application type version represents the version + of the application type found in the application manifest. + :vartype application_type_version: str + """ + + _validation = { + 'kind': {'required': True}, + 'async_property': {'required': True}, + 'application_package_download_uri': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'async_property': {'key': 'Async', 'type': 'bool'}, + 'application_package_download_uri': {'key': 'ApplicationPackageDownloadUri', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword async_property: Required. Indicates whether or not provisioning should occur + asynchronously. When set to true, the provision operation returns when the request is accepted + by the system, and the provision operation continues without any timeout limit. The default + value is false. For large application packages, we recommend setting the value to true. + :paramtype async_property: bool + :keyword application_package_download_uri: Required. The path to the '.sfpkg' application + package from where the application package can be downloaded using HTTP or HTTPS protocols. The + application package can be stored in an external store that provides GET operation to download + the file. Supported protocols are HTTP and HTTPS, and the path must allow READ access. + :paramtype application_package_download_uri: str + :keyword application_type_name: Required. The application type name represents the name of the + application type found in the application manifest. + :paramtype application_type_name: str + :keyword application_type_version: Required. The application type version represents the + version of the application type found in the application manifest. + :paramtype application_type_version: str + """ + super(ExternalStoreProvisionApplicationTypeDescription, self).__init__(**kwargs) + self.kind = 'ExternalStore' # type: str + self.application_package_download_uri = kwargs['application_package_download_uri'] + self.application_type_name = kwargs['application_type_name'] + self.application_type_version = kwargs['application_type_version'] + + +class FabricCodeVersionInfo(msrest.serialization.Model): + """Information about a Service Fabric code version. + + :ivar code_version: The product version of Service Fabric. + :vartype code_version: str + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code_version: The product version of Service Fabric. + :paramtype code_version: str + """ + super(FabricCodeVersionInfo, self).__init__(**kwargs) + self.code_version = kwargs.get('code_version', None) + + +class FabricConfigVersionInfo(msrest.serialization.Model): + """Information about a Service Fabric config version. + + :ivar config_version: The config version of Service Fabric. + :vartype config_version: str + """ + + _attribute_map = { + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword config_version: The config version of Service Fabric. + :paramtype config_version: str + """ + super(FabricConfigVersionInfo, self).__init__(**kwargs) + self.config_version = kwargs.get('config_version', None) + + +class FabricError(msrest.serialization.Model): + """The REST API operations for Service Fabric return standard HTTP status codes. This type defines the additional information returned from the Service Fabric API operations that are not successful. + + All required parameters must be populated in order to send to Azure. + + :ivar error: Required. Error object containing error code and error message. + :vartype error: ~azure.servicefabric.models.FabricErrorError + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'Error', 'type': 'FabricErrorError'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword error: Required. Error object containing error code and error message. + :paramtype error: ~azure.servicefabric.models.FabricErrorError + """ + super(FabricError, self).__init__(**kwargs) + self.error = kwargs['error'] + + +class FabricErrorError(msrest.serialization.Model): + """Error object containing error code and error message. + + All required parameters must be populated in order to send to Azure. + + :ivar code: Required. Defines the fabric error codes that be returned as part of the error + object in response to Service Fabric API operations that are not successful. Following are the + error code values that can be returned for a specific HTTP status code. + + + * + Possible values of the error code for HTTP status code 400 (Bad Request) + + + * "FABRIC_E_INVALID_PARTITION_KEY" + * "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" + * "FABRIC_E_INVALID_ADDRESS" + * "FABRIC_E_APPLICATION_NOT_UPGRADING" + * "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" + * "FABRIC_E_FABRIC_NOT_UPGRADING" + * "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" + * "FABRIC_E_INVALID_CONFIGURATION" + * "FABRIC_E_INVALID_NAME_URI" + * "FABRIC_E_PATH_TOO_LONG" + * "FABRIC_E_KEY_TOO_LARGE" + * "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" + * "FABRIC_E_INVALID_ATOMIC_GROUP" + * "FABRIC_E_VALUE_EMPTY" + * "FABRIC_E_BACKUP_IS_ENABLED" + * "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" + * "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" + * "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" + * "E_INVALIDARG" + + * + Possible values of the error code for HTTP status code 404 (Not Found) + + + * "FABRIC_E_NODE_NOT_FOUND" + * "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" + * "FABRIC_E_APPLICATION_NOT_FOUND" + * "FABRIC_E_SERVICE_TYPE_NOT_FOUND" + * "FABRIC_E_SERVICE_DOES_NOT_EXIST" + * "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" + * "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" + * "FABRIC_E_PARTITION_NOT_FOUND" + * "FABRIC_E_REPLICA_DOES_NOT_EXIST" + * "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" + * "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" + * "FABRIC_E_DIRECTORY_NOT_FOUND" + * "FABRIC_E_FABRIC_VERSION_NOT_FOUND" + * "FABRIC_E_FILE_NOT_FOUND" + * "FABRIC_E_NAME_DOES_NOT_EXIST" + * "FABRIC_E_PROPERTY_DOES_NOT_EXIST" + * "FABRIC_E_ENUMERATION_COMPLETED" + * "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" + * "FABRIC_E_KEY_NOT_FOUND" + * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" + * "FABRIC_E_BACKUP_NOT_ENABLED" + * "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" + * "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + * "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" + + * + Possible values of the error code for HTTP status code 409 (Conflict) + + + * "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" + * "FABRIC_E_APPLICATION_ALREADY_EXISTS" + * "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" + * "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" + * "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" + * "FABRIC_E_SERVICE_ALREADY_EXISTS" + * "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" + * "FABRIC_E_APPLICATION_TYPE_IN_USE" + * "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" + * "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" + * "FABRIC_E_FABRIC_VERSION_IN_USE" + * "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" + * "FABRIC_E_NAME_ALREADY_EXISTS" + * "FABRIC_E_NAME_NOT_EMPTY" + * "FABRIC_E_PROPERTY_CHECK_FAILED" + * "FABRIC_E_SERVICE_METADATA_MISMATCH" + * "FABRIC_E_SERVICE_TYPE_MISMATCH" + * "FABRIC_E_HEALTH_STALE_REPORT" + * "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" + * "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" + * "FABRIC_E_INSTANCE_ID_MISMATCH" + * "FABRIC_E_BACKUP_IN_PROGRESS" + * "FABRIC_E_RESTORE_IN_PROGRESS" + * "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" + + * + Possible values of the error code for HTTP status code 413 (Request Entity Too Large) + + + * "FABRIC_E_VALUE_TOO_LARGE" + + * + Possible values of the error code for HTTP status code 500 (Internal Server Error) + + + * "FABRIC_E_NODE_IS_UP" + * "E_FAIL" + * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" + * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" + * "FABRIC_E_VOLUME_ALREADY_EXISTS" + * "FABRIC_E_VOLUME_NOT_FOUND" + * "SerializationError" + * "FABRIC_E_CERTIFICATE_NOT_FOUND" + + * + Possible values of the error code for HTTP status code 503 (Service Unavailable) + + + * "FABRIC_E_NO_WRITE_QUORUM" + * "FABRIC_E_NOT_PRIMARY" + * "FABRIC_E_NOT_READY" + * "FABRIC_E_RECONFIGURATION_PENDING" + * "FABRIC_E_SERVICE_OFFLINE" + * "E_ABORT" + * "FABRIC_E_VALUE_TOO_LARGE" + + * + Possible values of the error code for HTTP status code 504 (Gateway Timeout) + + + * "FABRIC_E_COMMUNICATION_ERROR" + * "FABRIC_E_OPERATION_NOT_COMPLETE" + * "FABRIC_E_TIMEOUT". Possible values include: "FABRIC_E_INVALID_PARTITION_KEY", + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", + "FABRIC_E_APPLICATION_NOT_UPGRADING", "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_FABRIC_NOT_UPGRADING", "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", "FABRIC_E_PATH_TOO_LONG", + "FABRIC_E_KEY_TOO_LARGE", "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", + "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", "FABRIC_E_NODE_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", "FABRIC_E_APPLICATION_NOT_FOUND", + "FABRIC_E_SERVICE_TYPE_NOT_FOUND", "FABRIC_E_SERVICE_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", + "FABRIC_E_PARTITION_NOT_FOUND", "FABRIC_E_REPLICA_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", + "FABRIC_E_DIRECTORY_NOT_FOUND", "FABRIC_E_FABRIC_VERSION_NOT_FOUND", "FABRIC_E_FILE_NOT_FOUND", + "FABRIC_E_NAME_DOES_NOT_EXIST", "FABRIC_E_PROPERTY_DOES_NOT_EXIST", + "FABRIC_E_ENUMERATION_COMPLETED", "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", + "FABRIC_E_KEY_NOT_FOUND", "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", "FABRIC_E_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", + "FABRIC_E_SERVICE_ALREADY_EXISTS", "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_TYPE_IN_USE", "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", "FABRIC_E_FABRIC_VERSION_IN_USE", + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", "FABRIC_E_NAME_ALREADY_EXISTS", + "FABRIC_E_NAME_NOT_EMPTY", "FABRIC_E_PROPERTY_CHECK_FAILED", + "FABRIC_E_SERVICE_METADATA_MISMATCH", "FABRIC_E_SERVICE_TYPE_MISMATCH", + "FABRIC_E_HEALTH_STALE_REPORT", "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", + "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", "FABRIC_E_NOT_PRIMARY", + "FABRIC_E_NOT_READY", "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", + "E_ABORT", "FABRIC_E_COMMUNICATION_ERROR", "FABRIC_E_OPERATION_NOT_COMPLETE", + "FABRIC_E_TIMEOUT", "FABRIC_E_NODE_IS_UP", "E_FAIL", "FABRIC_E_BACKUP_IS_ENABLED", + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", + "FABRIC_E_BACKUP_NOT_ENABLED", "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", "FABRIC_E_BACKUP_IN_PROGRESS", + "FABRIC_E_RESTORE_IN_PROGRESS", "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", "FABRIC_E_VOLUME_ALREADY_EXISTS", + "FABRIC_E_VOLUME_NOT_FOUND", "SerializationError", + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", "FABRIC_E_CERTIFICATE_NOT_FOUND". + :vartype code: str or ~azure.servicefabric.models.FabricErrorCodes + :ivar message: Error message. + :vartype message: str + """ + + _validation = { + 'code': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'Code', 'type': 'str'}, + 'message': {'key': 'Message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code: Required. Defines the fabric error codes that be returned as part of the error + object in response to Service Fabric API operations that are not successful. Following are the + error code values that can be returned for a specific HTTP status code. + + + * + Possible values of the error code for HTTP status code 400 (Bad Request) + + + * "FABRIC_E_INVALID_PARTITION_KEY" + * "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" + * "FABRIC_E_INVALID_ADDRESS" + * "FABRIC_E_APPLICATION_NOT_UPGRADING" + * "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" + * "FABRIC_E_FABRIC_NOT_UPGRADING" + * "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" + * "FABRIC_E_INVALID_CONFIGURATION" + * "FABRIC_E_INVALID_NAME_URI" + * "FABRIC_E_PATH_TOO_LONG" + * "FABRIC_E_KEY_TOO_LARGE" + * "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" + * "FABRIC_E_INVALID_ATOMIC_GROUP" + * "FABRIC_E_VALUE_EMPTY" + * "FABRIC_E_BACKUP_IS_ENABLED" + * "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" + * "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" + * "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" + * "E_INVALIDARG" + + * + Possible values of the error code for HTTP status code 404 (Not Found) + + + * "FABRIC_E_NODE_NOT_FOUND" + * "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" + * "FABRIC_E_APPLICATION_NOT_FOUND" + * "FABRIC_E_SERVICE_TYPE_NOT_FOUND" + * "FABRIC_E_SERVICE_DOES_NOT_EXIST" + * "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" + * "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" + * "FABRIC_E_PARTITION_NOT_FOUND" + * "FABRIC_E_REPLICA_DOES_NOT_EXIST" + * "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" + * "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" + * "FABRIC_E_DIRECTORY_NOT_FOUND" + * "FABRIC_E_FABRIC_VERSION_NOT_FOUND" + * "FABRIC_E_FILE_NOT_FOUND" + * "FABRIC_E_NAME_DOES_NOT_EXIST" + * "FABRIC_E_PROPERTY_DOES_NOT_EXIST" + * "FABRIC_E_ENUMERATION_COMPLETED" + * "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" + * "FABRIC_E_KEY_NOT_FOUND" + * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" + * "FABRIC_E_BACKUP_NOT_ENABLED" + * "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" + * "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + * "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" + + * + Possible values of the error code for HTTP status code 409 (Conflict) + + + * "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" + * "FABRIC_E_APPLICATION_ALREADY_EXISTS" + * "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" + * "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" + * "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" + * "FABRIC_E_SERVICE_ALREADY_EXISTS" + * "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" + * "FABRIC_E_APPLICATION_TYPE_IN_USE" + * "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" + * "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" + * "FABRIC_E_FABRIC_VERSION_IN_USE" + * "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" + * "FABRIC_E_NAME_ALREADY_EXISTS" + * "FABRIC_E_NAME_NOT_EMPTY" + * "FABRIC_E_PROPERTY_CHECK_FAILED" + * "FABRIC_E_SERVICE_METADATA_MISMATCH" + * "FABRIC_E_SERVICE_TYPE_MISMATCH" + * "FABRIC_E_HEALTH_STALE_REPORT" + * "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" + * "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" + * "FABRIC_E_INSTANCE_ID_MISMATCH" + * "FABRIC_E_BACKUP_IN_PROGRESS" + * "FABRIC_E_RESTORE_IN_PROGRESS" + * "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" + + * + Possible values of the error code for HTTP status code 413 (Request Entity Too Large) + + + * "FABRIC_E_VALUE_TOO_LARGE" + + * + Possible values of the error code for HTTP status code 500 (Internal Server Error) + + + * "FABRIC_E_NODE_IS_UP" + * "E_FAIL" + * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" + * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" + * "FABRIC_E_VOLUME_ALREADY_EXISTS" + * "FABRIC_E_VOLUME_NOT_FOUND" + * "SerializationError" + * "FABRIC_E_CERTIFICATE_NOT_FOUND" + + * + Possible values of the error code for HTTP status code 503 (Service Unavailable) + + + * "FABRIC_E_NO_WRITE_QUORUM" + * "FABRIC_E_NOT_PRIMARY" + * "FABRIC_E_NOT_READY" + * "FABRIC_E_RECONFIGURATION_PENDING" + * "FABRIC_E_SERVICE_OFFLINE" + * "E_ABORT" + * "FABRIC_E_VALUE_TOO_LARGE" + + * + Possible values of the error code for HTTP status code 504 (Gateway Timeout) + + + * "FABRIC_E_COMMUNICATION_ERROR" + * "FABRIC_E_OPERATION_NOT_COMPLETE" + * "FABRIC_E_TIMEOUT". Possible values include: "FABRIC_E_INVALID_PARTITION_KEY", + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", + "FABRIC_E_APPLICATION_NOT_UPGRADING", "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_FABRIC_NOT_UPGRADING", "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", "FABRIC_E_PATH_TOO_LONG", + "FABRIC_E_KEY_TOO_LARGE", "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", + "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", "FABRIC_E_NODE_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", "FABRIC_E_APPLICATION_NOT_FOUND", + "FABRIC_E_SERVICE_TYPE_NOT_FOUND", "FABRIC_E_SERVICE_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", + "FABRIC_E_PARTITION_NOT_FOUND", "FABRIC_E_REPLICA_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", + "FABRIC_E_DIRECTORY_NOT_FOUND", "FABRIC_E_FABRIC_VERSION_NOT_FOUND", "FABRIC_E_FILE_NOT_FOUND", + "FABRIC_E_NAME_DOES_NOT_EXIST", "FABRIC_E_PROPERTY_DOES_NOT_EXIST", + "FABRIC_E_ENUMERATION_COMPLETED", "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", + "FABRIC_E_KEY_NOT_FOUND", "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", "FABRIC_E_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", + "FABRIC_E_SERVICE_ALREADY_EXISTS", "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_TYPE_IN_USE", "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", "FABRIC_E_FABRIC_VERSION_IN_USE", + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", "FABRIC_E_NAME_ALREADY_EXISTS", + "FABRIC_E_NAME_NOT_EMPTY", "FABRIC_E_PROPERTY_CHECK_FAILED", + "FABRIC_E_SERVICE_METADATA_MISMATCH", "FABRIC_E_SERVICE_TYPE_MISMATCH", + "FABRIC_E_HEALTH_STALE_REPORT", "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", + "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", "FABRIC_E_NOT_PRIMARY", + "FABRIC_E_NOT_READY", "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", + "E_ABORT", "FABRIC_E_COMMUNICATION_ERROR", "FABRIC_E_OPERATION_NOT_COMPLETE", + "FABRIC_E_TIMEOUT", "FABRIC_E_NODE_IS_UP", "E_FAIL", "FABRIC_E_BACKUP_IS_ENABLED", + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", + "FABRIC_E_BACKUP_NOT_ENABLED", "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", "FABRIC_E_BACKUP_IN_PROGRESS", + "FABRIC_E_RESTORE_IN_PROGRESS", "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", "FABRIC_E_VOLUME_ALREADY_EXISTS", + "FABRIC_E_VOLUME_NOT_FOUND", "SerializationError", + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", "FABRIC_E_CERTIFICATE_NOT_FOUND". + :paramtype code: str or ~azure.servicefabric.models.FabricErrorCodes + :keyword message: Error message. + :paramtype message: str + """ + super(FabricErrorError, self).__init__(**kwargs) + self.code = kwargs['code'] + self.message = kwargs.get('message', None) + + +class PropertyBatchInfo(msrest.serialization.Model): + """Information about the results of a property batch. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FailedPropertyBatchInfo, SuccessfulPropertyBatchInfo. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch info, determined by the results of a property + batch. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Successful", "Failed". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchInfoKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Failed': 'FailedPropertyBatchInfo', 'Successful': 'SuccessfulPropertyBatchInfo'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PropertyBatchInfo, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class FailedPropertyBatchInfo(PropertyBatchInfo): + """Derived from PropertyBatchInfo. Represents the property batch failing. Contains information about the specific batch failure. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch info, determined by the results of a property + batch. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Successful", "Failed". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchInfoKind + :ivar error_message: The error message of the failed operation. Describes the exception thrown + due to the first unsuccessful operation in the property batch. + :vartype error_message: str + :ivar operation_index: The index of the unsuccessful operation in the property batch. + :vartype operation_index: int + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'error_message': {'key': 'ErrorMessage', 'type': 'str'}, + 'operation_index': {'key': 'OperationIndex', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword error_message: The error message of the failed operation. Describes the exception + thrown due to the first unsuccessful operation in the property batch. + :paramtype error_message: str + :keyword operation_index: The index of the unsuccessful operation in the property batch. + :paramtype operation_index: int + """ + super(FailedPropertyBatchInfo, self).__init__(**kwargs) + self.kind = 'Failed' # type: str + self.error_message = kwargs.get('error_message', None) + self.operation_index = kwargs.get('operation_index', None) + + +class FailedUpgradeDomainProgressObject(msrest.serialization.Model): + """The detailed upgrade progress for nodes in the current upgrade domain at the point of failure. Not applicable to node-by-node upgrades. + + :ivar domain_name: The name of the upgrade domain. + :vartype domain_name: str + :ivar node_upgrade_progress_list: List of upgrading nodes and their statuses. + :vartype node_upgrade_progress_list: list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword domain_name: The name of the upgrade domain. + :paramtype domain_name: str + :keyword node_upgrade_progress_list: List of upgrading nodes and their statuses. + :paramtype node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + super(FailedUpgradeDomainProgressObject, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) + + +class FailureUpgradeDomainProgressInfo(msrest.serialization.Model): + """Information about the upgrade domain progress at the time of upgrade failure. + + :ivar domain_name: The name of the upgrade domain. + :vartype domain_name: str + :ivar node_upgrade_progress_list: List of upgrading nodes and their statuses. + :vartype node_upgrade_progress_list: list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword domain_name: The name of the upgrade domain. + :paramtype domain_name: str + :keyword node_upgrade_progress_list: List of upgrading nodes and their statuses. + :paramtype node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + super(FailureUpgradeDomainProgressInfo, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) + + +class FileInfo(msrest.serialization.Model): + """Information about a image store file. + + :ivar file_size: The size of file in bytes. + :vartype file_size: str + :ivar file_version: Information about the version of image store file. + :vartype file_version: ~azure.servicefabric.models.FileVersion + :ivar modified_date: The date and time when the image store file was last modified. + :vartype modified_date: ~datetime.datetime + :ivar store_relative_path: The file path relative to the image store root path. + :vartype store_relative_path: str + """ + + _attribute_map = { + 'file_size': {'key': 'FileSize', 'type': 'str'}, + 'file_version': {'key': 'FileVersion', 'type': 'FileVersion'}, + 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword file_size: The size of file in bytes. + :paramtype file_size: str + :keyword file_version: Information about the version of image store file. + :paramtype file_version: ~azure.servicefabric.models.FileVersion + :keyword modified_date: The date and time when the image store file was last modified. + :paramtype modified_date: ~datetime.datetime + :keyword store_relative_path: The file path relative to the image store root path. + :paramtype store_relative_path: str + """ + super(FileInfo, self).__init__(**kwargs) + self.file_size = kwargs.get('file_size', None) + self.file_version = kwargs.get('file_version', None) + self.modified_date = kwargs.get('modified_date', None) + self.store_relative_path = kwargs.get('store_relative_path', None) + + +class FileShareBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for file share storage used for storing or enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant + filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", + "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". + :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind + :ivar friendly_name: Friendly name for this backup storage. + :vartype friendly_name: str + :ivar path: Required. UNC path of the file share where to store or enumerate backups from. + :vartype path: str + :ivar primary_user_name: Primary user name to access the file share. + :vartype primary_user_name: str + :ivar primary_password: Primary password to access the share location. + :vartype primary_password: str + :ivar secondary_user_name: Secondary user name to access the file share. + :vartype secondary_user_name: str + :ivar secondary_password: Secondary password to access the share location. + :vartype secondary_password: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'path': {'required': True}, + } + + _attribute_map = { + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'path': {'key': 'Path', 'type': 'str'}, + 'primary_user_name': {'key': 'PrimaryUserName', 'type': 'str'}, + 'primary_password': {'key': 'PrimaryPassword', 'type': 'str'}, + 'secondary_user_name': {'key': 'SecondaryUserName', 'type': 'str'}, + 'secondary_password': {'key': 'SecondaryPassword', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword friendly_name: Friendly name for this backup storage. + :paramtype friendly_name: str + :keyword path: Required. UNC path of the file share where to store or enumerate backups from. + :paramtype path: str + :keyword primary_user_name: Primary user name to access the file share. + :paramtype primary_user_name: str + :keyword primary_password: Primary password to access the share location. + :paramtype primary_password: str + :keyword secondary_user_name: Secondary user name to access the file share. + :paramtype secondary_user_name: str + :keyword secondary_password: Secondary password to access the share location. + :paramtype secondary_password: str + """ + super(FileShareBackupStorageDescription, self).__init__(**kwargs) + self.storage_kind = 'FileShare' # type: str + self.path = kwargs['path'] + self.primary_user_name = kwargs.get('primary_user_name', None) + self.primary_password = kwargs.get('primary_password', None) + self.secondary_user_name = kwargs.get('secondary_user_name', None) + self.secondary_password = kwargs.get('secondary_password', None) + + +class FileVersion(msrest.serialization.Model): + """Information about the version of image store file. + + :ivar version_number: The current image store version number for the file is used in image + store for checking whether it need to be updated. + :vartype version_number: str + :ivar epoch_data_loss_number: The epoch data loss number of image store replica when this file + entry was updated or created. + :vartype epoch_data_loss_number: str + :ivar epoch_configuration_number: The epoch configuration version number of the image store + replica when this file entry was created or updated. + :vartype epoch_configuration_number: str + """ + + _attribute_map = { + 'version_number': {'key': 'VersionNumber', 'type': 'str'}, + 'epoch_data_loss_number': {'key': 'EpochDataLossNumber', 'type': 'str'}, + 'epoch_configuration_number': {'key': 'EpochConfigurationNumber', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword version_number: The current image store version number for the file is used in image + store for checking whether it need to be updated. + :paramtype version_number: str + :keyword epoch_data_loss_number: The epoch data loss number of image store replica when this + file entry was updated or created. + :paramtype epoch_data_loss_number: str + :keyword epoch_configuration_number: The epoch configuration version number of the image store + replica when this file entry was created or updated. + :paramtype epoch_configuration_number: str + """ + super(FileVersion, self).__init__(**kwargs) + self.version_number = kwargs.get('version_number', None) + self.epoch_data_loss_number = kwargs.get('epoch_data_loss_number', None) + self.epoch_configuration_number = kwargs.get('epoch_configuration_number', None) + + +class FolderInfo(msrest.serialization.Model): + """Information about a image store folder. It includes how many files this folder contains and its image store relative path. + + :ivar store_relative_path: The remote location within image store. This path is relative to the + image store root. + :vartype store_relative_path: str + :ivar file_count: The number of files from within the image store folder. + :vartype file_count: str + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'file_count': {'key': 'FileCount', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword store_relative_path: The remote location within image store. This path is relative to + the image store root. + :paramtype store_relative_path: str + :keyword file_count: The number of files from within the image store folder. + :paramtype file_count: str + """ + super(FolderInfo, self).__init__(**kwargs) + self.store_relative_path = kwargs.get('store_relative_path', None) + self.file_count = kwargs.get('file_count', None) + + +class FolderSizeInfo(msrest.serialization.Model): + """Information of a image store folder size. + + :ivar store_relative_path: The remote location within image store. This path is relative to the + image store root. + :vartype store_relative_path: str + :ivar folder_size: The size of folder in bytes. + :vartype folder_size: str + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'folder_size': {'key': 'FolderSize', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword store_relative_path: The remote location within image store. This path is relative to + the image store root. + :paramtype store_relative_path: str + :keyword folder_size: The size of folder in bytes. + :paramtype folder_size: str + """ + super(FolderSizeInfo, self).__init__(**kwargs) + self.store_relative_path = kwargs.get('store_relative_path', None) + self.folder_size = kwargs.get('folder_size', None) + + +class FrequencyBasedBackupScheduleDescription(BackupScheduleDescription): + """Describes the frequency based backup schedule. + + All required parameters must be populated in order to send to Azure. + + :ivar schedule_kind: Required. The kind of backup schedule, time based or frequency + based.Constant filled by server. Possible values include: "Invalid", "TimeBased", + "FrequencyBased". + :vartype schedule_kind: str or ~azure.servicefabric.models.BackupScheduleKind + :ivar interval: Required. Defines the interval with which backups are periodically taken. It + should be specified in ISO8601 format. Timespan in seconds is not supported and will be ignored + while creating the policy. + :vartype interval: ~datetime.timedelta + """ + + _validation = { + 'schedule_kind': {'required': True}, + 'interval': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + 'interval': {'key': 'Interval', 'type': 'duration'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword interval: Required. Defines the interval with which backups are periodically taken. It + should be specified in ISO8601 format. Timespan in seconds is not supported and will be ignored + while creating the policy. + :paramtype interval: ~datetime.timedelta + """ + super(FrequencyBasedBackupScheduleDescription, self).__init__(**kwargs) + self.schedule_kind = 'FrequencyBased' # type: str + self.interval = kwargs['interval'] + + +class GatewayDestination(msrest.serialization.Model): + """Describes destination endpoint for routing traffic. + + All required parameters must be populated in order to send to Azure. + + :ivar application_name: Required. Name of the service fabric Mesh application. + :vartype application_name: str + :ivar service_name: Required. service that contains the endpoint. + :vartype service_name: str + :ivar endpoint_name: Required. name of the endpoint in the service. + :vartype endpoint_name: str + """ + + _validation = { + 'application_name': {'required': True}, + 'service_name': {'required': True}, + 'endpoint_name': {'required': True}, + } + + _attribute_map = { + 'application_name': {'key': 'applicationName', 'type': 'str'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword application_name: Required. Name of the service fabric Mesh application. + :paramtype application_name: str + :keyword service_name: Required. service that contains the endpoint. + :paramtype service_name: str + :keyword endpoint_name: Required. name of the endpoint in the service. + :paramtype endpoint_name: str + """ + super(GatewayDestination, self).__init__(**kwargs) + self.application_name = kwargs['application_name'] + self.service_name = kwargs['service_name'] + self.endpoint_name = kwargs['endpoint_name'] + + +class GatewayResourceDescription(msrest.serialization.Model): + """This type describes a gateway resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of the Gateway resource. + :vartype name: str + :ivar description: User readable description of the gateway. + :vartype description: str + :ivar source_network: Required. Network the gateway should listen on for requests. + :vartype source_network: ~azure.servicefabric.models.NetworkRef + :ivar destination_network: Required. Network that the Application is using. + :vartype destination_network: ~azure.servicefabric.models.NetworkRef + :ivar tcp: Configuration for tcp connectivity for this gateway. + :vartype tcp: list[~azure.servicefabric.models.TcpConfig] + :ivar http: Configuration for http connectivity for this gateway. + :vartype http: list[~azure.servicefabric.models.HttpConfig] + :ivar status: Status of the resource. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the gateway. + :vartype status_details: str + :ivar ip_address: IP address of the gateway. This is populated in the response and is ignored + for incoming requests. + :vartype ip_address: str + """ + + _validation = { + 'name': {'required': True}, + 'source_network': {'required': True}, + 'destination_network': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'ip_address': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'source_network': {'key': 'properties.sourceNetwork', 'type': 'NetworkRef'}, + 'destination_network': {'key': 'properties.destinationNetwork', 'type': 'NetworkRef'}, + 'tcp': {'key': 'properties.tcp', 'type': '[TcpConfig]'}, + 'http': {'key': 'properties.http', 'type': '[HttpConfig]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. Name of the Gateway resource. + :paramtype name: str + :keyword description: User readable description of the gateway. + :paramtype description: str + :keyword source_network: Required. Network the gateway should listen on for requests. + :paramtype source_network: ~azure.servicefabric.models.NetworkRef + :keyword destination_network: Required. Network that the Application is using. + :paramtype destination_network: ~azure.servicefabric.models.NetworkRef + :keyword tcp: Configuration for tcp connectivity for this gateway. + :paramtype tcp: list[~azure.servicefabric.models.TcpConfig] + :keyword http: Configuration for http connectivity for this gateway. + :paramtype http: list[~azure.servicefabric.models.HttpConfig] + """ + super(GatewayResourceDescription, self).__init__(**kwargs) + self.name = kwargs['name'] + self.description = kwargs.get('description', None) + self.source_network = kwargs['source_network'] + self.destination_network = kwargs['destination_network'] + self.tcp = kwargs.get('tcp', None) + self.http = kwargs.get('http', None) + self.status = None + self.status_details = None + self.ip_address = None + + +class GetBackupByStorageQueryDescription(msrest.serialization.Model): + """Describes additional filters to be applied, while listing backups, and backup storage details from where to fetch the backups. + + All required parameters must be populated in order to send to Azure. + + :ivar start_date_time_filter: Specifies the start date time in ISO8601 from which to enumerate + backups. If not specified, backups are enumerated from the beginning. + :vartype start_date_time_filter: ~datetime.datetime + :ivar end_date_time_filter: Specifies the end date time in ISO8601 till which to enumerate + backups. If not specified, backups are enumerated till the end. + :vartype end_date_time_filter: ~datetime.datetime + :ivar latest: If specified as true, gets the most recent backup (within the specified time + range) for every partition under the specified backup entity. + :vartype latest: bool + :ivar storage: Required. Describes the parameters for the backup storage from where to + enumerate backups. This is optional and by default backups are enumerated from the backup + storage where this backup entity is currently being backed up (as specified in backup policy). + This parameter is useful to be able to enumerate backups from another cluster where you may + intend to restore. + :vartype storage: ~azure.servicefabric.models.BackupStorageDescription + :ivar backup_entity: Required. Indicates the entity for which to enumerate backups. + :vartype backup_entity: ~azure.servicefabric.models.BackupEntity + """ + + _validation = { + 'storage': {'required': True}, + 'backup_entity': {'required': True}, + } + + _attribute_map = { + 'start_date_time_filter': {'key': 'StartDateTimeFilter', 'type': 'iso-8601'}, + 'end_date_time_filter': {'key': 'EndDateTimeFilter', 'type': 'iso-8601'}, + 'latest': {'key': 'Latest', 'type': 'bool'}, + 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, + 'backup_entity': {'key': 'BackupEntity', 'type': 'BackupEntity'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword start_date_time_filter: Specifies the start date time in ISO8601 from which to + enumerate backups. If not specified, backups are enumerated from the beginning. + :paramtype start_date_time_filter: ~datetime.datetime + :keyword end_date_time_filter: Specifies the end date time in ISO8601 till which to enumerate + backups. If not specified, backups are enumerated till the end. + :paramtype end_date_time_filter: ~datetime.datetime + :keyword latest: If specified as true, gets the most recent backup (within the specified time + range) for every partition under the specified backup entity. + :paramtype latest: bool + :keyword storage: Required. Describes the parameters for the backup storage from where to + enumerate backups. This is optional and by default backups are enumerated from the backup + storage where this backup entity is currently being backed up (as specified in backup policy). + This parameter is useful to be able to enumerate backups from another cluster where you may + intend to restore. + :paramtype storage: ~azure.servicefabric.models.BackupStorageDescription + :keyword backup_entity: Required. Indicates the entity for which to enumerate backups. + :paramtype backup_entity: ~azure.servicefabric.models.BackupEntity + """ + super(GetBackupByStorageQueryDescription, self).__init__(**kwargs) + self.start_date_time_filter = kwargs.get('start_date_time_filter', None) + self.end_date_time_filter = kwargs.get('end_date_time_filter', None) + self.latest = kwargs.get('latest', False) + self.storage = kwargs['storage'] + self.backup_entity = kwargs['backup_entity'] + + +class GetPropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that gets the specified property if it exists. +Note that if one PropertyBatchOperation in a PropertyBatch fails, +the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch operation, determined by the operation to be + performed. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind + :ivar property_name: Required. The name of the Service Fabric property. + :vartype property_name: str + :ivar include_value: Whether or not to return the property value with the metadata. + True if values should be returned with the metadata; False to return only property metadata. + :vartype include_value: bool + """ + + _validation = { + 'kind': {'required': True}, + 'property_name': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'include_value': {'key': 'IncludeValue', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword property_name: Required. The name of the Service Fabric property. + :paramtype property_name: str + :keyword include_value: Whether or not to return the property value with the metadata. + True if values should be returned with the metadata; False to return only property metadata. + :paramtype include_value: bool + """ + super(GetPropertyBatchOperation, self).__init__(**kwargs) + self.kind = 'Get' # type: str + self.include_value = kwargs.get('include_value', False) + + +class GuidPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Guid. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property, determined by the type of data. Following are the + possible values.Constant filled by server. Possible values include: "Invalid", "Binary", + "Int64", "Double", "String", "Guid". + :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind + :ivar data: Required. The data of the property value. + :vartype data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword data: Required. The data of the property value. + :paramtype data: str + """ + super(GuidPropertyValue, self).__init__(**kwargs) + self.kind = 'Guid' # type: str + self.data = kwargs['data'] + + +class HealthEvaluationWrapper(msrest.serialization.Model): + """Wrapper object for health evaluation. + + :ivar health_evaluation: Represents a health evaluation which describes the data and the + algorithm used by health manager to evaluate the health of an entity. + :vartype health_evaluation: ~azure.servicefabric.models.HealthEvaluation + """ + + _attribute_map = { + 'health_evaluation': {'key': 'HealthEvaluation', 'type': 'HealthEvaluation'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword health_evaluation: Represents a health evaluation which describes the data and the + algorithm used by health manager to evaluate the health of an entity. + :paramtype health_evaluation: ~azure.servicefabric.models.HealthEvaluation + """ + super(HealthEvaluationWrapper, self).__init__(**kwargs) + self.health_evaluation = kwargs.get('health_evaluation', None) + + +class HealthInformation(msrest.serialization.Model): + """Represents common health report information. It is included in all health reports sent to health store and in all health events returned by health queries. + + All required parameters must be populated in order to send to Azure. + + :ivar source_id: Required. The source name that identifies the client/watchdog/system component + that generated the health information. + :vartype source_id: str + :ivar property: Required. The property of the health information. An entity can have health + reports for different properties. + The property is a string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report. + For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available + disk on a node, + so it can report "AvailableDisk" property on that node. + The same reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node. + In the health store, these reports are treated as separate health events for the specified + node. + + Together with the SourceId, the property uniquely identifies the health information. + :vartype property: str + :ivar health_state: Required. The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar time_to_live_in_milli_seconds: The duration for which this health report is valid. This + field uses ISO8601 format for specifying the duration. + When clients report periodically, they should send reports with higher frequency than time to + live. + If clients report on transition, they can set the time to live to infinite. + When time to live expires, the health event that contains the health information + is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if + RemoveWhenExpired false. + + If not specified, time to live defaults to infinite value. + :vartype time_to_live_in_milli_seconds: ~datetime.timedelta + :ivar description: The description of the health information. It represents free text used to + add human readable information about the report. + The maximum string length for the description is 4096 characters. + If the provided string is longer, it will be automatically truncated. + When truncated, the last characters of the description contain a marker "[Truncated]", and + total string size is 4096 characters. + The presence of the marker indicates to users that truncation occurred. + Note that when truncated, the description has less than 4096 characters from the original + string. + :vartype description: str + :ivar sequence_number: The sequence number for this health report as a numeric string. + The report sequence number is used by the health store to detect stale reports. + If not specified, a sequence number is auto-generated by the health client when a report is + added. + :vartype sequence_number: str + :ivar remove_when_expired: Value that indicates whether the report is removed from health store + when it expires. + If set to true, the report is removed from the health store after it expires. + If set to false, the report is treated as an error when expired. The value of this property is + false by default. + When clients report periodically, they should set RemoveWhenExpired false (default). + This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated + at error when the health report expires. + This flags the entity as being in Error health state. + :vartype remove_when_expired: bool + :ivar health_report_id: A health report ID which identifies the health report and can be used + to find more detailed information about a specific health event at + aka.ms/sfhealthid. + :vartype health_report_id: str + """ + + _validation = { + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + } + + _attribute_map = { + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword source_id: Required. The source name that identifies the client/watchdog/system + component that generated the health information. + :paramtype source_id: str + :keyword property: Required. The property of the health information. An entity can have health + reports for different properties. + The property is a string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report. + For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available + disk on a node, + so it can report "AvailableDisk" property on that node. + The same reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node. + In the health store, these reports are treated as separate health events for the specified + node. + + Together with the SourceId, the property uniquely identifies the health information. + :paramtype property: str + :keyword health_state: Required. The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword time_to_live_in_milli_seconds: The duration for which this health report is valid. + This field uses ISO8601 format for specifying the duration. + When clients report periodically, they should send reports with higher frequency than time to + live. + If clients report on transition, they can set the time to live to infinite. + When time to live expires, the health event that contains the health information + is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if + RemoveWhenExpired false. + + If not specified, time to live defaults to infinite value. + :paramtype time_to_live_in_milli_seconds: ~datetime.timedelta + :keyword description: The description of the health information. It represents free text used + to add human readable information about the report. + The maximum string length for the description is 4096 characters. + If the provided string is longer, it will be automatically truncated. + When truncated, the last characters of the description contain a marker "[Truncated]", and + total string size is 4096 characters. + The presence of the marker indicates to users that truncation occurred. + Note that when truncated, the description has less than 4096 characters from the original + string. + :paramtype description: str + :keyword sequence_number: The sequence number for this health report as a numeric string. + The report sequence number is used by the health store to detect stale reports. + If not specified, a sequence number is auto-generated by the health client when a report is + added. + :paramtype sequence_number: str + :keyword remove_when_expired: Value that indicates whether the report is removed from health + store when it expires. + If set to true, the report is removed from the health store after it expires. + If set to false, the report is treated as an error when expired. The value of this property is + false by default. + When clients report periodically, they should set RemoveWhenExpired false (default). + This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated + at error when the health report expires. + This flags the entity as being in Error health state. + :paramtype remove_when_expired: bool + :keyword health_report_id: A health report ID which identifies the health report and can be + used to find more detailed information about a specific health event at + aka.ms/sfhealthid. + :paramtype health_report_id: str + """ + super(HealthInformation, self).__init__(**kwargs) + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_in_milli_seconds = kwargs.get('time_to_live_in_milli_seconds', None) + self.description = kwargs.get('description', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.health_report_id = kwargs.get('health_report_id', None) + + +class HealthEvent(HealthInformation): + """Represents health information reported on a health entity, such as cluster, application or node, with additional metadata added by the Health Manager. + + All required parameters must be populated in order to send to Azure. + + :ivar source_id: Required. The source name that identifies the client/watchdog/system component + that generated the health information. + :vartype source_id: str + :ivar property: Required. The property of the health information. An entity can have health + reports for different properties. + The property is a string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report. + For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available + disk on a node, + so it can report "AvailableDisk" property on that node. + The same reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node. + In the health store, these reports are treated as separate health events for the specified + node. + + Together with the SourceId, the property uniquely identifies the health information. + :vartype property: str + :ivar health_state: Required. The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar time_to_live_in_milli_seconds: The duration for which this health report is valid. This + field uses ISO8601 format for specifying the duration. + When clients report periodically, they should send reports with higher frequency than time to + live. + If clients report on transition, they can set the time to live to infinite. + When time to live expires, the health event that contains the health information + is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if + RemoveWhenExpired false. + + If not specified, time to live defaults to infinite value. + :vartype time_to_live_in_milli_seconds: ~datetime.timedelta + :ivar description: The description of the health information. It represents free text used to + add human readable information about the report. + The maximum string length for the description is 4096 characters. + If the provided string is longer, it will be automatically truncated. + When truncated, the last characters of the description contain a marker "[Truncated]", and + total string size is 4096 characters. + The presence of the marker indicates to users that truncation occurred. + Note that when truncated, the description has less than 4096 characters from the original + string. + :vartype description: str + :ivar sequence_number: The sequence number for this health report as a numeric string. + The report sequence number is used by the health store to detect stale reports. + If not specified, a sequence number is auto-generated by the health client when a report is + added. + :vartype sequence_number: str + :ivar remove_when_expired: Value that indicates whether the report is removed from health store + when it expires. + If set to true, the report is removed from the health store after it expires. + If set to false, the report is treated as an error when expired. The value of this property is + false by default. + When clients report periodically, they should set RemoveWhenExpired false (default). + This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated + at error when the health report expires. + This flags the entity as being in Error health state. + :vartype remove_when_expired: bool + :ivar health_report_id: A health report ID which identifies the health report and can be used + to find more detailed information about a specific health event at + aka.ms/sfhealthid. + :vartype health_report_id: str + :ivar is_expired: Returns true if the health event is expired, otherwise false. + :vartype is_expired: bool + :ivar source_utc_timestamp: The date and time when the health report was sent by the source. + :vartype source_utc_timestamp: ~datetime.datetime + :ivar last_modified_utc_timestamp: The date and time when the health report was last modified + by the health store. + :vartype last_modified_utc_timestamp: ~datetime.datetime + :ivar last_ok_transition_at: If the current health state is 'Ok', this property returns the + time at which the health report was first reported with 'Ok'. + For periodic reporting, many reports with the same state may have been generated. + This property returns the date and time when the first 'Ok' health report was received. + + If the current health state is 'Error' or 'Warning', returns the date and time at which the + health state was last in 'Ok', before transitioning to a different state. + + If the health state was never 'Ok', the value will be zero date-time. + :vartype last_ok_transition_at: ~datetime.datetime + :ivar last_warning_transition_at: If the current health state is 'Warning', this property + returns the time at which the health report was first reported with 'Warning'. For periodic + reporting, many reports with the same state may have been generated however, this property + returns only the date and time at the first 'Warning' health report was received. + + If the current health state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different state. + + If the health state was never 'Warning', the value will be zero date-time. + :vartype last_warning_transition_at: ~datetime.datetime + :ivar last_error_transition_at: If the current health state is 'Error', this property returns + the time at which the health report was first reported with 'Error'. For periodic reporting, + many reports with the same state may have been generated however, this property returns only + the date and time at the first 'Error' health report was received. + + If the current health state is 'Ok' or 'Warning', returns the date and time at which the + health state was last in 'Error', before transitioning to a different state. + + If the health state was never 'Error', the value will be zero date-time. + :vartype last_error_transition_at: ~datetime.datetime + """ + + _validation = { + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + } + + _attribute_map = { + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, + 'is_expired': {'key': 'IsExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, + 'last_ok_transition_at': {'key': 'LastOkTransitionAt', 'type': 'iso-8601'}, + 'last_warning_transition_at': {'key': 'LastWarningTransitionAt', 'type': 'iso-8601'}, + 'last_error_transition_at': {'key': 'LastErrorTransitionAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword source_id: Required. The source name that identifies the client/watchdog/system + component that generated the health information. + :paramtype source_id: str + :keyword property: Required. The property of the health information. An entity can have health + reports for different properties. + The property is a string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report. + For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available + disk on a node, + so it can report "AvailableDisk" property on that node. + The same reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node. + In the health store, these reports are treated as separate health events for the specified + node. + + Together with the SourceId, the property uniquely identifies the health information. + :paramtype property: str + :keyword health_state: Required. The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword time_to_live_in_milli_seconds: The duration for which this health report is valid. + This field uses ISO8601 format for specifying the duration. + When clients report periodically, they should send reports with higher frequency than time to + live. + If clients report on transition, they can set the time to live to infinite. + When time to live expires, the health event that contains the health information + is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if + RemoveWhenExpired false. + + If not specified, time to live defaults to infinite value. + :paramtype time_to_live_in_milli_seconds: ~datetime.timedelta + :keyword description: The description of the health information. It represents free text used + to add human readable information about the report. + The maximum string length for the description is 4096 characters. + If the provided string is longer, it will be automatically truncated. + When truncated, the last characters of the description contain a marker "[Truncated]", and + total string size is 4096 characters. + The presence of the marker indicates to users that truncation occurred. + Note that when truncated, the description has less than 4096 characters from the original + string. + :paramtype description: str + :keyword sequence_number: The sequence number for this health report as a numeric string. + The report sequence number is used by the health store to detect stale reports. + If not specified, a sequence number is auto-generated by the health client when a report is + added. + :paramtype sequence_number: str + :keyword remove_when_expired: Value that indicates whether the report is removed from health + store when it expires. + If set to true, the report is removed from the health store after it expires. + If set to false, the report is treated as an error when expired. The value of this property is + false by default. + When clients report periodically, they should set RemoveWhenExpired false (default). + This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated + at error when the health report expires. + This flags the entity as being in Error health state. + :paramtype remove_when_expired: bool + :keyword health_report_id: A health report ID which identifies the health report and can be + used to find more detailed information about a specific health event at + aka.ms/sfhealthid. + :paramtype health_report_id: str + :keyword is_expired: Returns true if the health event is expired, otherwise false. + :paramtype is_expired: bool + :keyword source_utc_timestamp: The date and time when the health report was sent by the source. + :paramtype source_utc_timestamp: ~datetime.datetime + :keyword last_modified_utc_timestamp: The date and time when the health report was last + modified by the health store. + :paramtype last_modified_utc_timestamp: ~datetime.datetime + :keyword last_ok_transition_at: If the current health state is 'Ok', this property returns the + time at which the health report was first reported with 'Ok'. + For periodic reporting, many reports with the same state may have been generated. + This property returns the date and time when the first 'Ok' health report was received. + + If the current health state is 'Error' or 'Warning', returns the date and time at which the + health state was last in 'Ok', before transitioning to a different state. + + If the health state was never 'Ok', the value will be zero date-time. + :paramtype last_ok_transition_at: ~datetime.datetime + :keyword last_warning_transition_at: If the current health state is 'Warning', this property + returns the time at which the health report was first reported with 'Warning'. For periodic + reporting, many reports with the same state may have been generated however, this property + returns only the date and time at the first 'Warning' health report was received. + + If the current health state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different state. + + If the health state was never 'Warning', the value will be zero date-time. + :paramtype last_warning_transition_at: ~datetime.datetime + :keyword last_error_transition_at: If the current health state is 'Error', this property + returns the time at which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated however, this property + returns only the date and time at the first 'Error' health report was received. + + If the current health state is 'Ok' or 'Warning', returns the date and time at which the + health state was last in 'Error', before transitioning to a different state. + + If the health state was never 'Error', the value will be zero date-time. + :paramtype last_error_transition_at: ~datetime.datetime + """ + super(HealthEvent, self).__init__(**kwargs) + self.is_expired = kwargs.get('is_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.last_modified_utc_timestamp = kwargs.get('last_modified_utc_timestamp', None) + self.last_ok_transition_at = kwargs.get('last_ok_transition_at', None) + self.last_warning_transition_at = kwargs.get('last_warning_transition_at', None) + self.last_error_transition_at = kwargs.get('last_error_transition_at', None) + + +class HealthStateCount(msrest.serialization.Model): + """Represents information about how many health entities are in Ok, Warning and Error health state. + + :ivar ok_count: The number of health entities with aggregated health state Ok. + :vartype ok_count: long + :ivar warning_count: The number of health entities with aggregated health state Warning. + :vartype warning_count: long + :ivar error_count: The number of health entities with aggregated health state Error. + :vartype error_count: long + """ + + _validation = { + 'ok_count': {'minimum': 0}, + 'warning_count': {'minimum': 0}, + 'error_count': {'minimum': 0}, + } + + _attribute_map = { + 'ok_count': {'key': 'OkCount', 'type': 'long'}, + 'warning_count': {'key': 'WarningCount', 'type': 'long'}, + 'error_count': {'key': 'ErrorCount', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword ok_count: The number of health entities with aggregated health state Ok. + :paramtype ok_count: long + :keyword warning_count: The number of health entities with aggregated health state Warning. + :paramtype warning_count: long + :keyword error_count: The number of health entities with aggregated health state Error. + :paramtype error_count: long + """ + super(HealthStateCount, self).__init__(**kwargs) + self.ok_count = kwargs.get('ok_count', None) + self.warning_count = kwargs.get('warning_count', None) + self.error_count = kwargs.get('error_count', None) + + +class HealthStatistics(msrest.serialization.Model): + """The health statistics of an entity, returned as part of the health query result when the query description is configured to include statistics. +The statistics include health state counts for all children types of the current entity. +For example, for cluster, the health statistics include health state counts for nodes, applications, services, partitions, replicas, deployed applications and deployed service packages. +For partition, the health statistics include health counts for replicas. + + :ivar health_state_count_list: List of health state counts per entity kind, which keeps track + of how many children of the queried entity are in Ok, Warning and Error state. + :vartype health_state_count_list: list[~azure.servicefabric.models.EntityKindHealthStateCount] + """ + + _attribute_map = { + 'health_state_count_list': {'key': 'HealthStateCountList', 'type': '[EntityKindHealthStateCount]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword health_state_count_list: List of health state counts per entity kind, which keeps + track of how many children of the queried entity are in Ok, Warning and Error state. + :paramtype health_state_count_list: + list[~azure.servicefabric.models.EntityKindHealthStateCount] + """ + super(HealthStatistics, self).__init__(**kwargs) + self.health_state_count_list = kwargs.get('health_state_count_list', None) + + +class HttpConfig(msrest.serialization.Model): + """Describes the http configuration for external connectivity for this network. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. http gateway config name. + :vartype name: str + :ivar port: Required. Specifies the port at which the service endpoint below needs to be + exposed. + :vartype port: int + :ivar hosts: Required. description for routing. + :vartype hosts: list[~azure.servicefabric.models.HttpHostConfig] + """ + + _validation = { + 'name': {'required': True}, + 'port': {'required': True}, + 'hosts': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'hosts': {'key': 'hosts', 'type': '[HttpHostConfig]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. http gateway config name. + :paramtype name: str + :keyword port: Required. Specifies the port at which the service endpoint below needs to be + exposed. + :paramtype port: int + :keyword hosts: Required. description for routing. + :paramtype hosts: list[~azure.servicefabric.models.HttpHostConfig] + """ + super(HttpConfig, self).__init__(**kwargs) + self.name = kwargs['name'] + self.port = kwargs['port'] + self.hosts = kwargs['hosts'] + + +class HttpHostConfig(msrest.serialization.Model): + """Describes the hostname properties for http routing. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. http hostname config name. + :vartype name: str + :ivar routes: Required. Route information to use for routing. Routes are processed in the order + they are specified. Specify routes that are more specific before routes that can handle general + cases. + :vartype routes: list[~azure.servicefabric.models.HttpRouteConfig] + """ + + _validation = { + 'name': {'required': True}, + 'routes': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'routes': {'key': 'routes', 'type': '[HttpRouteConfig]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. http hostname config name. + :paramtype name: str + :keyword routes: Required. Route information to use for routing. Routes are processed in the + order they are specified. Specify routes that are more specific before routes that can handle + general cases. + :paramtype routes: list[~azure.servicefabric.models.HttpRouteConfig] + """ + super(HttpHostConfig, self).__init__(**kwargs) + self.name = kwargs['name'] + self.routes = kwargs['routes'] + + +class HttpRouteConfig(msrest.serialization.Model): + """Describes the hostname properties for http routing. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. http route name. + :vartype name: str + :ivar match: Required. Describes a rule for http route matching. + :vartype match: ~azure.servicefabric.models.HttpRouteMatchRule + :ivar destination: Required. Describes destination endpoint for routing traffic. + :vartype destination: ~azure.servicefabric.models.GatewayDestination + """ + + _validation = { + 'name': {'required': True}, + 'match': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'match': {'key': 'match', 'type': 'HttpRouteMatchRule'}, + 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. http route name. + :paramtype name: str + :keyword match: Required. Describes a rule for http route matching. + :paramtype match: ~azure.servicefabric.models.HttpRouteMatchRule + :keyword destination: Required. Describes destination endpoint for routing traffic. + :paramtype destination: ~azure.servicefabric.models.GatewayDestination + """ + super(HttpRouteConfig, self).__init__(**kwargs) + self.name = kwargs['name'] + self.match = kwargs['match'] + self.destination = kwargs['destination'] + + +class HttpRouteMatchHeader(msrest.serialization.Model): + """Describes header information for http route matching. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of header to match in request. + :vartype name: str + :ivar value: Value of header to match in request. + :vartype value: str + :ivar type: how to match header value. Possible values include: "exact". + :vartype type: str or ~azure.servicefabric.models.HeaderMatchType + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. Name of header to match in request. + :paramtype name: str + :keyword value: Value of header to match in request. + :paramtype value: str + :keyword type: how to match header value. Possible values include: "exact". + :paramtype type: str or ~azure.servicefabric.models.HeaderMatchType + """ + super(HttpRouteMatchHeader, self).__init__(**kwargs) + self.name = kwargs['name'] + self.value = kwargs.get('value', None) + self.type = kwargs.get('type', None) + + +class HttpRouteMatchPath(msrest.serialization.Model): + """Path to match for routing. + + All required parameters must be populated in order to send to Azure. + + :ivar value: Required. Uri path to match for request. + :vartype value: str + :ivar rewrite: replacement string for matched part of the Uri. + :vartype rewrite: str + :ivar type: Required. how to match value in the Uri. Possible values include: "prefix". + :vartype type: str or ~azure.servicefabric.models.PathMatchType + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'rewrite': {'key': 'rewrite', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: Required. Uri path to match for request. + :paramtype value: str + :keyword rewrite: replacement string for matched part of the Uri. + :paramtype rewrite: str + :keyword type: Required. how to match value in the Uri. Possible values include: "prefix". + :paramtype type: str or ~azure.servicefabric.models.PathMatchType + """ + super(HttpRouteMatchPath, self).__init__(**kwargs) + self.value = kwargs['value'] + self.rewrite = kwargs.get('rewrite', None) + self.type = kwargs['type'] + + +class HttpRouteMatchRule(msrest.serialization.Model): + """Describes a rule for http route matching. + + All required parameters must be populated in order to send to Azure. + + :ivar path: Required. Path to match for routing. + :vartype path: ~azure.servicefabric.models.HttpRouteMatchPath + :ivar headers: headers and their values to match in request. + :vartype headers: list[~azure.servicefabric.models.HttpRouteMatchHeader] + """ + + _validation = { + 'path': {'required': True}, + } + + _attribute_map = { + 'path': {'key': 'path', 'type': 'HttpRouteMatchPath'}, + 'headers': {'key': 'headers', 'type': '[HttpRouteMatchHeader]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword path: Required. Path to match for routing. + :paramtype path: ~azure.servicefabric.models.HttpRouteMatchPath + :keyword headers: headers and their values to match in request. + :paramtype headers: list[~azure.servicefabric.models.HttpRouteMatchHeader] + """ + super(HttpRouteMatchRule, self).__init__(**kwargs) + self.path = kwargs['path'] + self.headers = kwargs.get('headers', None) + + +class IdentityDescription(msrest.serialization.Model): + """Information describing the identities associated with this application. + + All required parameters must be populated in order to send to Azure. + + :ivar token_service_endpoint: the endpoint for the token service managing this identity. + :vartype token_service_endpoint: str + :ivar type: Required. the types of identities associated with this resource; currently + restricted to 'SystemAssigned and UserAssigned'. + :vartype type: str + :ivar tenant_id: the identifier of the tenant containing the application's identity. + :vartype tenant_id: str + :ivar principal_id: the object identifier of the Service Principal of the identity associated + with this resource. + :vartype principal_id: str + :ivar user_assigned_identities: represents user assigned identities map. + :vartype user_assigned_identities: dict[str, + ~azure.servicefabric.models.IdentityItemDescription] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'token_service_endpoint': {'key': 'tokenServiceEndpoint', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{IdentityItemDescription}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword token_service_endpoint: the endpoint for the token service managing this identity. + :paramtype token_service_endpoint: str + :keyword type: Required. the types of identities associated with this resource; currently + restricted to 'SystemAssigned and UserAssigned'. + :paramtype type: str + :keyword tenant_id: the identifier of the tenant containing the application's identity. + :paramtype tenant_id: str + :keyword principal_id: the object identifier of the Service Principal of the identity + associated with this resource. + :paramtype principal_id: str + :keyword user_assigned_identities: represents user assigned identities map. + :paramtype user_assigned_identities: dict[str, + ~azure.servicefabric.models.IdentityItemDescription] + """ + super(IdentityDescription, self).__init__(**kwargs) + self.token_service_endpoint = kwargs.get('token_service_endpoint', None) + self.type = kwargs['type'] + self.tenant_id = kwargs.get('tenant_id', None) + self.principal_id = kwargs.get('principal_id', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class IdentityItemDescription(msrest.serialization.Model): + """Describes a single user-assigned identity associated with the application. + + :ivar principal_id: the object identifier of the Service Principal which this identity + represents. + :vartype principal_id: str + :ivar client_id: the client identifier of the Service Principal which this identity represents. + :vartype client_id: str + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword principal_id: the object identifier of the Service Principal which this identity + represents. + :paramtype principal_id: str + :keyword client_id: the client identifier of the Service Principal which this identity + represents. + :paramtype client_id: str + """ + super(IdentityItemDescription, self).__init__(**kwargs) + self.principal_id = kwargs.get('principal_id', None) + self.client_id = kwargs.get('client_id', None) + + +class ImageRegistryCredential(msrest.serialization.Model): + """Image registry credential. + + All required parameters must be populated in order to send to Azure. + + :ivar server: Required. Docker image registry server, without protocol such as ``http`` and + ``https``. + :vartype server: str + :ivar username: Required. The username for the private registry. + :vartype username: str + :ivar password_type: The type of the image registry password being given in password. Possible + values include: "ClearText", "KeyVaultReference", "SecretValueReference". Default value: + "ClearText". + :vartype password_type: str or ~azure.servicefabric.models.ImageRegistryPasswordType + :ivar password: The password for the private registry. The password is required for create or + update operations, however it is not returned in the get or list operations. Will be processed + based on the type provided. + :vartype password: str + """ + + _validation = { + 'server': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'server': {'key': 'server', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password_type': {'key': 'passwordType', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword server: Required. Docker image registry server, without protocol such as ``http`` and + ``https``. + :paramtype server: str + :keyword username: Required. The username for the private registry. + :paramtype username: str + :keyword password_type: The type of the image registry password being given in password. + Possible values include: "ClearText", "KeyVaultReference", "SecretValueReference". Default + value: "ClearText". + :paramtype password_type: str or ~azure.servicefabric.models.ImageRegistryPasswordType + :keyword password: The password for the private registry. The password is required for create + or update operations, however it is not returned in the get or list operations. Will be + processed based on the type provided. + :paramtype password: str + """ + super(ImageRegistryCredential, self).__init__(**kwargs) + self.server = kwargs['server'] + self.username = kwargs['username'] + self.password_type = kwargs.get('password_type', "ClearText") + self.password = kwargs.get('password', None) + + +class ImageStoreContent(msrest.serialization.Model): + """Information about the image store content. + + :ivar store_files: The list of image store file info objects represents files found under the + given image store relative path. + :vartype store_files: list[~azure.servicefabric.models.FileInfo] + :ivar store_folders: The list of image store folder info objects represents subfolders found + under the given image store relative path. + :vartype store_folders: list[~azure.servicefabric.models.FolderInfo] + """ + + _attribute_map = { + 'store_files': {'key': 'StoreFiles', 'type': '[FileInfo]'}, + 'store_folders': {'key': 'StoreFolders', 'type': '[FolderInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword store_files: The list of image store file info objects represents files found under + the given image store relative path. + :paramtype store_files: list[~azure.servicefabric.models.FileInfo] + :keyword store_folders: The list of image store folder info objects represents subfolders found + under the given image store relative path. + :paramtype store_folders: list[~azure.servicefabric.models.FolderInfo] + """ + super(ImageStoreContent, self).__init__(**kwargs) + self.store_files = kwargs.get('store_files', None) + self.store_folders = kwargs.get('store_folders', None) + + +class ImageStoreCopyDescription(msrest.serialization.Model): + """Information about how to copy image store content from one image store relative path to another image store relative path. + + All required parameters must be populated in order to send to Azure. + + :ivar remote_source: Required. The relative path of source image store content to be copied + from. + :vartype remote_source: str + :ivar remote_destination: Required. The relative path of destination image store content to be + copied to. + :vartype remote_destination: str + :ivar skip_files: The list of the file names to be skipped for copying. + :vartype skip_files: list[str] + :ivar check_mark_file: Indicates whether to check mark file during copying. The property is + true if checking mark file is required, false otherwise. The mark file is used to check whether + the folder is well constructed. If the property is true and mark file does not exist, the copy + is skipped. + :vartype check_mark_file: bool + """ + + _validation = { + 'remote_source': {'required': True}, + 'remote_destination': {'required': True}, + } + + _attribute_map = { + 'remote_source': {'key': 'RemoteSource', 'type': 'str'}, + 'remote_destination': {'key': 'RemoteDestination', 'type': 'str'}, + 'skip_files': {'key': 'SkipFiles', 'type': '[str]'}, + 'check_mark_file': {'key': 'CheckMarkFile', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword remote_source: Required. The relative path of source image store content to be copied + from. + :paramtype remote_source: str + :keyword remote_destination: Required. The relative path of destination image store content to + be copied to. + :paramtype remote_destination: str + :keyword skip_files: The list of the file names to be skipped for copying. + :paramtype skip_files: list[str] + :keyword check_mark_file: Indicates whether to check mark file during copying. The property is + true if checking mark file is required, false otherwise. The mark file is used to check whether + the folder is well constructed. If the property is true and mark file does not exist, the copy + is skipped. + :paramtype check_mark_file: bool + """ + super(ImageStoreCopyDescription, self).__init__(**kwargs) + self.remote_source = kwargs['remote_source'] + self.remote_destination = kwargs['remote_destination'] + self.skip_files = kwargs.get('skip_files', None) + self.check_mark_file = kwargs.get('check_mark_file', None) + + +class ImageStoreInfo(msrest.serialization.Model): + """Information about the ImageStore's resource usage. + + :ivar disk_info: disk capacity and available disk space on the node where the ImageStore + primary is placed. + :vartype disk_info: ~azure.servicefabric.models.DiskInfo + :ivar used_by_metadata: the ImageStore's file system usage for metadata. + :vartype used_by_metadata: ~azure.servicefabric.models.UsageInfo + :ivar used_by_staging: The ImageStore's file system usage for staging files that are being + uploaded. + :vartype used_by_staging: ~azure.servicefabric.models.UsageInfo + :ivar used_by_copy: the ImageStore's file system usage for copied application and cluster + packages. `Removing application and cluster packages + `_ will + free up this space. + :vartype used_by_copy: ~azure.servicefabric.models.UsageInfo + :ivar used_by_register: the ImageStore's file system usage for registered and cluster packages. + `Unregistering application + `_ + and `cluster packages + `_ + will free up this space. + :vartype used_by_register: ~azure.servicefabric.models.UsageInfo + """ + + _attribute_map = { + 'disk_info': {'key': 'DiskInfo', 'type': 'DiskInfo'}, + 'used_by_metadata': {'key': 'UsedByMetadata', 'type': 'UsageInfo'}, + 'used_by_staging': {'key': 'UsedByStaging', 'type': 'UsageInfo'}, + 'used_by_copy': {'key': 'UsedByCopy', 'type': 'UsageInfo'}, + 'used_by_register': {'key': 'UsedByRegister', 'type': 'UsageInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword disk_info: disk capacity and available disk space on the node where the ImageStore + primary is placed. + :paramtype disk_info: ~azure.servicefabric.models.DiskInfo + :keyword used_by_metadata: the ImageStore's file system usage for metadata. + :paramtype used_by_metadata: ~azure.servicefabric.models.UsageInfo + :keyword used_by_staging: The ImageStore's file system usage for staging files that are being + uploaded. + :paramtype used_by_staging: ~azure.servicefabric.models.UsageInfo + :keyword used_by_copy: the ImageStore's file system usage for copied application and cluster + packages. `Removing application and cluster packages + `_ will + free up this space. + :paramtype used_by_copy: ~azure.servicefabric.models.UsageInfo + :keyword used_by_register: the ImageStore's file system usage for registered and cluster + packages. `Unregistering application + `_ + and `cluster packages + `_ + will free up this space. + :paramtype used_by_register: ~azure.servicefabric.models.UsageInfo + """ + super(ImageStoreInfo, self).__init__(**kwargs) + self.disk_info = kwargs.get('disk_info', None) + self.used_by_metadata = kwargs.get('used_by_metadata', None) + self.used_by_staging = kwargs.get('used_by_staging', None) + self.used_by_copy = kwargs.get('used_by_copy', None) + self.used_by_register = kwargs.get('used_by_register', None) + + +class SecretResourcePropertiesBase(msrest.serialization.Model): + """This type describes the properties of a secret resource, including its kind. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecretResourceProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Describes the kind of secret.Constant filled by server. Possible values + include: "inlinedValue", "keyVaultVersionedReference". + :vartype kind: str or ~azure.servicefabric.models.SecretKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'SecretResourceProperties': 'SecretResourceProperties'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(SecretResourcePropertiesBase, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class SecretResourceProperties(SecretResourcePropertiesBase): + """Describes the properties of a secret resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: InlinedValueSecretResourceProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Describes the kind of secret.Constant filled by server. Possible values + include: "inlinedValue", "keyVaultVersionedReference". + :vartype kind: str or ~azure.servicefabric.models.SecretKind + :ivar description: User readable description of the secret. + :vartype description: str + :ivar status: Status of the resource. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the secret. + :vartype status_details: str + :ivar content_type: The type of the content stored in the secret value. The value of this + property is opaque to Service Fabric. Once set, the value of this property cannot be changed. + :vartype content_type: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'inlinedValue': 'InlinedValueSecretResourceProperties'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: User readable description of the secret. + :paramtype description: str + :keyword content_type: The type of the content stored in the secret value. The value of this + property is opaque to Service Fabric. Once set, the value of this property cannot be changed. + :paramtype content_type: str + """ + super(SecretResourceProperties, self).__init__(**kwargs) + self.kind = 'SecretResourceProperties' # type: str + self.description = kwargs.get('description', None) + self.status = None + self.status_details = None + self.content_type = kwargs.get('content_type', None) + + +class InlinedValueSecretResourceProperties(SecretResourceProperties): + """Describes the properties of a secret resource whose value is provided explicitly as plaintext. The secret resource may have multiple values, each being uniquely versioned. The secret value of each version is stored encrypted, and delivered as plaintext into the context of applications referencing it. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Describes the kind of secret.Constant filled by server. Possible values + include: "inlinedValue", "keyVaultVersionedReference". + :vartype kind: str or ~azure.servicefabric.models.SecretKind + :ivar description: User readable description of the secret. + :vartype description: str + :ivar status: Status of the resource. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the secret. + :vartype status_details: str + :ivar content_type: The type of the content stored in the secret value. The value of this + property is opaque to Service Fabric. Once set, the value of this property cannot be changed. + :vartype content_type: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: User readable description of the secret. + :paramtype description: str + :keyword content_type: The type of the content stored in the secret value. The value of this + property is opaque to Service Fabric. Once set, the value of this property cannot be changed. + :paramtype content_type: str + """ + super(InlinedValueSecretResourceProperties, self).__init__(**kwargs) + self.kind = 'inlinedValue' # type: str + + +class InstanceLifecycleDescription(msrest.serialization.Model): + """Describes how the instance will behave. + + :ivar restore_replica_location_after_upgrade: If set to true, move/swap replica to original + location after upgrade. + :vartype restore_replica_location_after_upgrade: bool + """ + + _attribute_map = { + 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword restore_replica_location_after_upgrade: If set to true, move/swap replica to original + location after upgrade. + :paramtype restore_replica_location_after_upgrade: bool + """ + super(InstanceLifecycleDescription, self).__init__(**kwargs) + self.restore_replica_location_after_upgrade = kwargs.get('restore_replica_location_after_upgrade', None) + + +class Int64PropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Int64. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property, determined by the type of data. Following are the + possible values.Constant filled by server. Possible values include: "Invalid", "Binary", + "Int64", "Double", "String", "Guid". + :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind + :ivar data: Required. The data of the property value. + :vartype data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword data: Required. The data of the property value. + :paramtype data: str + """ + super(Int64PropertyValue, self).__init__(**kwargs) + self.kind = 'Int64' # type: str + self.data = kwargs['data'] + + +class PartitionInformation(msrest.serialization.Model): + """Information about the partition identity, partitioning scheme and keys supported by it. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Int64RangePartitionInformation, NamedPartitionInformation, SingletonPartitionInformation. + + All required parameters must be populated in order to send to Azure. + + :ivar service_partition_kind: Required. The kind of partitioning scheme used to partition the + service.Constant filled by server. Possible values include: "Invalid", "Singleton", + "Int64Range", "Named". + :vartype service_partition_kind: str or ~azure.servicefabric.models.ServicePartitionKind + :ivar id: An internal ID used by Service Fabric to uniquely identify a partition. This is a + randomly generated GUID when the service was created. The partition ID is unique and does not + change for the lifetime of the service. If the same service was deleted and recreated the IDs + of its partitions would be different. + :vartype id: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'str'}, + } + + _subtype_map = { + 'service_partition_kind': {'Int64Range': 'Int64RangePartitionInformation', 'Named': 'NamedPartitionInformation', 'Singleton': 'SingletonPartitionInformation'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: An internal ID used by Service Fabric to uniquely identify a partition. This is a + randomly generated GUID when the service was created. The partition ID is unique and does not + change for the lifetime of the service. If the same service was deleted and recreated the IDs + of its partitions would be different. + :paramtype id: str + """ + super(PartitionInformation, self).__init__(**kwargs) + self.service_partition_kind = None # type: Optional[str] + self.id = kwargs.get('id', None) + + +class Int64RangePartitionInformation(PartitionInformation): + """Describes the partition information for the integer range that is based on partition schemes. + + All required parameters must be populated in order to send to Azure. + + :ivar service_partition_kind: Required. The kind of partitioning scheme used to partition the + service.Constant filled by server. Possible values include: "Invalid", "Singleton", + "Int64Range", "Named". + :vartype service_partition_kind: str or ~azure.servicefabric.models.ServicePartitionKind + :ivar id: An internal ID used by Service Fabric to uniquely identify a partition. This is a + randomly generated GUID when the service was created. The partition ID is unique and does not + change for the lifetime of the service. If the same service was deleted and recreated the IDs + of its partitions would be different. + :vartype id: str + :ivar low_key: Specifies the minimum key value handled by this partition. + :vartype low_key: str + :ivar high_key: Specifies the maximum key value handled by this partition. + :vartype high_key: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'str'}, + 'low_key': {'key': 'LowKey', 'type': 'str'}, + 'high_key': {'key': 'HighKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: An internal ID used by Service Fabric to uniquely identify a partition. This is a + randomly generated GUID when the service was created. The partition ID is unique and does not + change for the lifetime of the service. If the same service was deleted and recreated the IDs + of its partitions would be different. + :paramtype id: str + :keyword low_key: Specifies the minimum key value handled by this partition. + :paramtype low_key: str + :keyword high_key: Specifies the maximum key value handled by this partition. + :paramtype high_key: str + """ + super(Int64RangePartitionInformation, self).__init__(**kwargs) + self.service_partition_kind = 'Int64Range' # type: str + self.low_key = kwargs.get('low_key', None) + self.high_key = kwargs.get('high_key', None) + + +class InvokeDataLossResult(msrest.serialization.Model): + """Represents information about an operation in a terminal state (Completed or Faulted). + + :ivar error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, + this is an error code indicating the reason. + :vartype error_code: int + :ivar selected_partition: This class returns information about the partition that the + user-induced operation acted upon. + :vartype selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, + this is an error code indicating the reason. + :paramtype error_code: int + :keyword selected_partition: This class returns information about the partition that the + user-induced operation acted upon. + :paramtype selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + super(InvokeDataLossResult, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.selected_partition = kwargs.get('selected_partition', None) + + +class InvokeQuorumLossResult(msrest.serialization.Model): + """Represents information about an operation in a terminal state (Completed or Faulted). + + :ivar error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, + this is an error code indicating the reason. + :vartype error_code: int + :ivar selected_partition: This class returns information about the partition that the + user-induced operation acted upon. + :vartype selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, + this is an error code indicating the reason. + :paramtype error_code: int + :keyword selected_partition: This class returns information about the partition that the + user-induced operation acted upon. + :paramtype selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + super(InvokeQuorumLossResult, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.selected_partition = kwargs.get('selected_partition', None) + + +class ReplicaStatusBase(msrest.serialization.Model): + """Information about the replica. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: KeyValueStoreReplicaStatus. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. + Possible values include: "Invalid", "KeyValueStore". + :vartype kind: str or ~azure.servicefabric.models.ReplicaKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'KeyValueStore': 'KeyValueStoreReplicaStatus'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ReplicaStatusBase, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class KeyValueStoreReplicaStatus(ReplicaStatusBase): + """Key value store related information for the replica. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. + Possible values include: "Invalid", "KeyValueStore". + :vartype kind: str or ~azure.servicefabric.models.ReplicaKind + :ivar database_row_count_estimate: Value indicating the estimated number of rows in the + underlying database. + :vartype database_row_count_estimate: str + :ivar database_logical_size_estimate: Value indicating the estimated size of the underlying + database. + :vartype database_logical_size_estimate: str + :ivar copy_notification_current_key_filter: Value indicating the latest key-prefix filter + applied to enumeration during the callback. Null if there is no pending callback. + :vartype copy_notification_current_key_filter: str + :ivar copy_notification_current_progress: Value indicating the latest number of keys enumerated + during the callback. 0 if there is no pending callback. + :vartype copy_notification_current_progress: str + :ivar status_details: Value indicating the current status details of the replica. + :vartype status_details: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'database_row_count_estimate': {'key': 'DatabaseRowCountEstimate', 'type': 'str'}, + 'database_logical_size_estimate': {'key': 'DatabaseLogicalSizeEstimate', 'type': 'str'}, + 'copy_notification_current_key_filter': {'key': 'CopyNotificationCurrentKeyFilter', 'type': 'str'}, + 'copy_notification_current_progress': {'key': 'CopyNotificationCurrentProgress', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword database_row_count_estimate: Value indicating the estimated number of rows in the + underlying database. + :paramtype database_row_count_estimate: str + :keyword database_logical_size_estimate: Value indicating the estimated size of the underlying + database. + :paramtype database_logical_size_estimate: str + :keyword copy_notification_current_key_filter: Value indicating the latest key-prefix filter + applied to enumeration during the callback. Null if there is no pending callback. + :paramtype copy_notification_current_key_filter: str + :keyword copy_notification_current_progress: Value indicating the latest number of keys + enumerated during the callback. 0 if there is no pending callback. + :paramtype copy_notification_current_progress: str + :keyword status_details: Value indicating the current status details of the replica. + :paramtype status_details: str + """ + super(KeyValueStoreReplicaStatus, self).__init__(**kwargs) + self.kind = 'KeyValueStore' # type: str + self.database_row_count_estimate = kwargs.get('database_row_count_estimate', None) + self.database_logical_size_estimate = kwargs.get('database_logical_size_estimate', None) + self.copy_notification_current_key_filter = kwargs.get('copy_notification_current_key_filter', None) + self.copy_notification_current_progress = kwargs.get('copy_notification_current_progress', None) + self.status_details = kwargs.get('status_details', None) + + +class LoadedPartitionInformationQueryDescription(msrest.serialization.Model): + """Represents data structure that contains query information. + + :ivar metric_name: Name of the metric for which this information is provided. + :vartype metric_name: str + :ivar service_name: Name of the service this partition belongs to. + :vartype service_name: str + :ivar ordering: Ordering of partitions' load. Possible values include: "Desc", "Asc". + :vartype ordering: str or ~azure.servicefabric.models.Ordering + :ivar 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. + :vartype max_results: long + :ivar 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. + :vartype continuation_token: str + """ + + _attribute_map = { + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'ordering': {'key': 'Ordering', 'type': 'str'}, + 'max_results': {'key': 'MaxResults', 'type': 'long'}, + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword metric_name: Name of the metric for which this information is provided. + :paramtype metric_name: str + :keyword service_name: Name of the service this partition belongs to. + :paramtype service_name: str + :keyword ordering: Ordering of partitions' load. Possible values include: "Desc", "Asc". + :paramtype ordering: str or ~azure.servicefabric.models.Ordering + :keyword 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. + :paramtype max_results: long + :keyword 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. + :paramtype continuation_token: str + """ + super(LoadedPartitionInformationQueryDescription, self).__init__(**kwargs) + self.metric_name = kwargs.get('metric_name', None) + self.service_name = kwargs.get('service_name', None) + self.ordering = kwargs.get('ordering', None) + self.max_results = kwargs.get('max_results', None) + self.continuation_token = kwargs.get('continuation_token', None) + + +class LoadedPartitionInformationResult(msrest.serialization.Model): + """Represents partition information. + + All required parameters must be populated in order to send to Azure. + + :ivar service_name: Required. Name of the service this partition belongs to. + :vartype service_name: str + :ivar partition_id: Required. Id of the partition. + :vartype partition_id: str + :ivar metric_name: Required. Name of the metric for which this information is provided. + :vartype metric_name: str + :ivar load: Required. Load for metric. + :vartype load: long + """ + + _validation = { + 'service_name': {'required': True}, + 'partition_id': {'required': True}, + 'metric_name': {'required': True}, + 'load': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'load': {'key': 'Load', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_name: Required. Name of the service this partition belongs to. + :paramtype service_name: str + :keyword partition_id: Required. Id of the partition. + :paramtype partition_id: str + :keyword metric_name: Required. Name of the metric for which this information is provided. + :paramtype metric_name: str + :keyword load: Required. Load for metric. + :paramtype load: long + """ + super(LoadedPartitionInformationResult, self).__init__(**kwargs) + self.service_name = kwargs['service_name'] + self.partition_id = kwargs['partition_id'] + self.metric_name = kwargs['metric_name'] + self.load = kwargs['load'] + + +class LoadedPartitionInformationResultList(msrest.serialization.Model): + """Represents data structure that contains top/least loaded partitions for a certain metric. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of application information. + :vartype items: list[~azure.servicefabric.models.LoadedPartitionInformationResult] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[LoadedPartitionInformationResult]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of application information. + :paramtype items: list[~azure.servicefabric.models.LoadedPartitionInformationResult] + """ + super(LoadedPartitionInformationResultList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class LoadMetricInformation(msrest.serialization.Model): + """Represents data structure that contains load information for a certain metric in a cluster. + + :ivar name: Name of the metric for which this load information is provided. + :vartype name: str + :ivar is_balanced_before: Value that indicates whether the metrics is balanced or not before + resource balancer run. + :vartype is_balanced_before: bool + :ivar is_balanced_after: Value that indicates whether the metrics is balanced or not after + resource balancer run. + :vartype is_balanced_after: bool + :ivar deviation_before: The standard average deviation of the metrics before resource balancer + run. + :vartype deviation_before: str + :ivar deviation_after: The standard average deviation of the metrics after resource balancer + run. + :vartype deviation_after: str + :ivar balancing_threshold: The balancing threshold for a certain metric. + :vartype balancing_threshold: str + :ivar action: The current action being taken with regard to this metric. + :vartype action: str + :ivar activity_threshold: The Activity Threshold specified for this metric in the system + Cluster Manifest. + :vartype activity_threshold: str + :ivar cluster_capacity: The total cluster capacity for a given metric. + :vartype cluster_capacity: str + :ivar cluster_load: The total cluster load. In future releases of Service Fabric this parameter + will be deprecated in favor of CurrentClusterLoad. + :vartype cluster_load: str + :ivar current_cluster_load: The total cluster load. + :vartype current_cluster_load: str + :ivar cluster_remaining_capacity: The remaining capacity for the metric in the cluster. In + future releases of Service Fabric this parameter will be deprecated in favor of + ClusterCapacityRemaining. + :vartype cluster_remaining_capacity: str + :ivar cluster_capacity_remaining: The remaining capacity for the metric in the cluster. + :vartype cluster_capacity_remaining: str + :ivar is_cluster_capacity_violation: Indicates that the metric is currently over capacity in + the cluster. + :vartype is_cluster_capacity_violation: bool + :ivar node_buffer_percentage: The reserved percentage of total node capacity for this metric. + :vartype node_buffer_percentage: str + :ivar cluster_buffered_capacity: Remaining capacity in the cluster excluding the reserved + space. In future releases of Service Fabric this parameter will be deprecated in favor of + BufferedClusterCapacityRemaining. + :vartype cluster_buffered_capacity: str + :ivar buffered_cluster_capacity_remaining: Remaining capacity in the cluster excluding the + reserved space. + :vartype buffered_cluster_capacity_remaining: str + :ivar cluster_remaining_buffered_capacity: The remaining percentage of cluster total capacity + for this metric. + :vartype cluster_remaining_buffered_capacity: str + :ivar min_node_load_value: The minimum load on any node for this metric. In future releases of + Service Fabric this parameter will be deprecated in favor of MinimumNodeLoad. + :vartype min_node_load_value: str + :ivar minimum_node_load: The minimum load on any node for this metric. + :vartype minimum_node_load: str + :ivar min_node_load_node_id: The node id of the node with the minimum load for this metric. + :vartype min_node_load_node_id: ~azure.servicefabric.models.NodeId + :ivar max_node_load_value: The maximum load on any node for this metric. In future releases of + Service Fabric this parameter will be deprecated in favor of MaximumNodeLoad. + :vartype max_node_load_value: str + :ivar maximum_node_load: The maximum load on any node for this metric. + :vartype maximum_node_load: str + :ivar max_node_load_node_id: The node id of the node with the maximum load for this metric. + :vartype max_node_load_node_id: ~azure.servicefabric.models.NodeId + :ivar planned_load_removal: This value represents the load of the replicas that are planned to + be removed in the future within the cluster. + This kind of load is reported for replicas that are currently being moving to other nodes and + for replicas that are currently being dropped but still use the load on the source node. + :vartype planned_load_removal: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'is_balanced_before': {'key': 'IsBalancedBefore', 'type': 'bool'}, + 'is_balanced_after': {'key': 'IsBalancedAfter', 'type': 'bool'}, + 'deviation_before': {'key': 'DeviationBefore', 'type': 'str'}, + 'deviation_after': {'key': 'DeviationAfter', 'type': 'str'}, + 'balancing_threshold': {'key': 'BalancingThreshold', 'type': 'str'}, + 'action': {'key': 'Action', 'type': 'str'}, + 'activity_threshold': {'key': 'ActivityThreshold', 'type': 'str'}, + 'cluster_capacity': {'key': 'ClusterCapacity', 'type': 'str'}, + 'cluster_load': {'key': 'ClusterLoad', 'type': 'str'}, + 'current_cluster_load': {'key': 'CurrentClusterLoad', 'type': 'str'}, + 'cluster_remaining_capacity': {'key': 'ClusterRemainingCapacity', 'type': 'str'}, + 'cluster_capacity_remaining': {'key': 'ClusterCapacityRemaining', 'type': 'str'}, + 'is_cluster_capacity_violation': {'key': 'IsClusterCapacityViolation', 'type': 'bool'}, + 'node_buffer_percentage': {'key': 'NodeBufferPercentage', 'type': 'str'}, + 'cluster_buffered_capacity': {'key': 'ClusterBufferedCapacity', 'type': 'str'}, + 'buffered_cluster_capacity_remaining': {'key': 'BufferedClusterCapacityRemaining', 'type': 'str'}, + 'cluster_remaining_buffered_capacity': {'key': 'ClusterRemainingBufferedCapacity', 'type': 'str'}, + 'min_node_load_value': {'key': 'MinNodeLoadValue', 'type': 'str'}, + 'minimum_node_load': {'key': 'MinimumNodeLoad', 'type': 'str'}, + 'min_node_load_node_id': {'key': 'MinNodeLoadNodeId', 'type': 'NodeId'}, + 'max_node_load_value': {'key': 'MaxNodeLoadValue', 'type': 'str'}, + 'maximum_node_load': {'key': 'MaximumNodeLoad', 'type': 'str'}, + 'max_node_load_node_id': {'key': 'MaxNodeLoadNodeId', 'type': 'NodeId'}, + 'planned_load_removal': {'key': 'PlannedLoadRemoval', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Name of the metric for which this load information is provided. + :paramtype name: str + :keyword is_balanced_before: Value that indicates whether the metrics is balanced or not before + resource balancer run. + :paramtype is_balanced_before: bool + :keyword is_balanced_after: Value that indicates whether the metrics is balanced or not after + resource balancer run. + :paramtype is_balanced_after: bool + :keyword deviation_before: The standard average deviation of the metrics before resource + balancer run. + :paramtype deviation_before: str + :keyword deviation_after: The standard average deviation of the metrics after resource balancer + run. + :paramtype deviation_after: str + :keyword balancing_threshold: The balancing threshold for a certain metric. + :paramtype balancing_threshold: str + :keyword action: The current action being taken with regard to this metric. + :paramtype action: str + :keyword activity_threshold: The Activity Threshold specified for this metric in the system + Cluster Manifest. + :paramtype activity_threshold: str + :keyword cluster_capacity: The total cluster capacity for a given metric. + :paramtype cluster_capacity: str + :keyword cluster_load: The total cluster load. In future releases of Service Fabric this + parameter will be deprecated in favor of CurrentClusterLoad. + :paramtype cluster_load: str + :keyword current_cluster_load: The total cluster load. + :paramtype current_cluster_load: str + :keyword cluster_remaining_capacity: The remaining capacity for the metric in the cluster. In + future releases of Service Fabric this parameter will be deprecated in favor of + ClusterCapacityRemaining. + :paramtype cluster_remaining_capacity: str + :keyword cluster_capacity_remaining: The remaining capacity for the metric in the cluster. + :paramtype cluster_capacity_remaining: str + :keyword is_cluster_capacity_violation: Indicates that the metric is currently over capacity in + the cluster. + :paramtype is_cluster_capacity_violation: bool + :keyword node_buffer_percentage: The reserved percentage of total node capacity for this + metric. + :paramtype node_buffer_percentage: str + :keyword cluster_buffered_capacity: Remaining capacity in the cluster excluding the reserved + space. In future releases of Service Fabric this parameter will be deprecated in favor of + BufferedClusterCapacityRemaining. + :paramtype cluster_buffered_capacity: str + :keyword buffered_cluster_capacity_remaining: Remaining capacity in the cluster excluding the + reserved space. + :paramtype buffered_cluster_capacity_remaining: str + :keyword cluster_remaining_buffered_capacity: The remaining percentage of cluster total + capacity for this metric. + :paramtype cluster_remaining_buffered_capacity: str + :keyword min_node_load_value: The minimum load on any node for this metric. In future releases + of Service Fabric this parameter will be deprecated in favor of MinimumNodeLoad. + :paramtype min_node_load_value: str + :keyword minimum_node_load: The minimum load on any node for this metric. + :paramtype minimum_node_load: str + :keyword min_node_load_node_id: The node id of the node with the minimum load for this metric. + :paramtype min_node_load_node_id: ~azure.servicefabric.models.NodeId + :keyword max_node_load_value: The maximum load on any node for this metric. In future releases + of Service Fabric this parameter will be deprecated in favor of MaximumNodeLoad. + :paramtype max_node_load_value: str + :keyword maximum_node_load: The maximum load on any node for this metric. + :paramtype maximum_node_load: str + :keyword max_node_load_node_id: The node id of the node with the maximum load for this metric. + :paramtype max_node_load_node_id: ~azure.servicefabric.models.NodeId + :keyword planned_load_removal: This value represents the load of the replicas that are planned + to be removed in the future within the cluster. + This kind of load is reported for replicas that are currently being moving to other nodes and + for replicas that are currently being dropped but still use the load on the source node. + :paramtype planned_load_removal: str + """ + super(LoadMetricInformation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.is_balanced_before = kwargs.get('is_balanced_before', None) + self.is_balanced_after = kwargs.get('is_balanced_after', None) + self.deviation_before = kwargs.get('deviation_before', None) + self.deviation_after = kwargs.get('deviation_after', None) + self.balancing_threshold = kwargs.get('balancing_threshold', None) + self.action = kwargs.get('action', None) + self.activity_threshold = kwargs.get('activity_threshold', None) + self.cluster_capacity = kwargs.get('cluster_capacity', None) + self.cluster_load = kwargs.get('cluster_load', None) + self.current_cluster_load = kwargs.get('current_cluster_load', None) + self.cluster_remaining_capacity = kwargs.get('cluster_remaining_capacity', None) + self.cluster_capacity_remaining = kwargs.get('cluster_capacity_remaining', None) + self.is_cluster_capacity_violation = kwargs.get('is_cluster_capacity_violation', None) + self.node_buffer_percentage = kwargs.get('node_buffer_percentage', None) + self.cluster_buffered_capacity = kwargs.get('cluster_buffered_capacity', None) + self.buffered_cluster_capacity_remaining = kwargs.get('buffered_cluster_capacity_remaining', None) + self.cluster_remaining_buffered_capacity = kwargs.get('cluster_remaining_buffered_capacity', None) + self.min_node_load_value = kwargs.get('min_node_load_value', None) + self.minimum_node_load = kwargs.get('minimum_node_load', None) + self.min_node_load_node_id = kwargs.get('min_node_load_node_id', None) + self.max_node_load_value = kwargs.get('max_node_load_value', None) + self.maximum_node_load = kwargs.get('maximum_node_load', None) + self.max_node_load_node_id = kwargs.get('max_node_load_node_id', None) + self.planned_load_removal = kwargs.get('planned_load_removal', None) + + +class LoadMetricReport(msrest.serialization.Model): + """Represents the load metric report which contains the time metric was reported, its name and value. + + :ivar last_reported_utc: Gets the UTC time when the load was reported. + :vartype last_reported_utc: ~datetime.datetime + :ivar name: The name of the load metric. + :vartype name: str + :ivar value: The value of the load metric. In future releases of Service Fabric this parameter + will be deprecated in favor of CurrentValue. + :vartype value: str + :ivar current_value: The value of the load metric. + :vartype current_value: str + """ + + _attribute_map = { + 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + 'current_value': {'key': 'CurrentValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword last_reported_utc: Gets the UTC time when the load was reported. + :paramtype last_reported_utc: ~datetime.datetime + :keyword name: The name of the load metric. + :paramtype name: str + :keyword value: The value of the load metric. In future releases of Service Fabric this + parameter will be deprecated in favor of CurrentValue. + :paramtype value: str + :keyword current_value: The value of the load metric. + :paramtype current_value: str + """ + super(LoadMetricReport, self).__init__(**kwargs) + self.last_reported_utc = kwargs.get('last_reported_utc', None) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + self.current_value = kwargs.get('current_value', None) + + +class LoadMetricReportInfo(msrest.serialization.Model): + """Information about load reported by replica. + + :ivar name: The name of the metric. + :vartype name: str + :ivar value: The value of the load for the metric. In future releases of Service Fabric this + parameter will be deprecated in favor of CurrentValue. + :vartype value: int + :ivar current_value: The double value of the load for the metric. + :vartype current_value: str + :ivar last_reported_utc: The UTC time when the load is reported. + :vartype last_reported_utc: ~datetime.datetime + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + 'current_value': {'key': 'CurrentValue', 'type': 'str'}, + 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: The name of the metric. + :paramtype name: str + :keyword value: The value of the load for the metric. In future releases of Service Fabric this + parameter will be deprecated in favor of CurrentValue. + :paramtype value: int + :keyword current_value: The double value of the load for the metric. + :paramtype current_value: str + :keyword last_reported_utc: The UTC time when the load is reported. + :paramtype last_reported_utc: ~datetime.datetime + """ + super(LoadMetricReportInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + self.current_value = kwargs.get('current_value', None) + self.last_reported_utc = kwargs.get('last_reported_utc', None) + + +class NetworkResourcePropertiesBase(msrest.serialization.Model): + """This type describes the properties of a network resource, including its kind. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NetworkResourceProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of a Service Fabric container network.Constant filled by server. + Possible values include: "Local". + :vartype kind: str or ~azure.servicefabric.models.NetworkKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'NetworkResourceProperties': 'NetworkResourceProperties'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(NetworkResourcePropertiesBase, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class NetworkResourceProperties(NetworkResourcePropertiesBase): + """Describes properties of a network resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LocalNetworkResourceProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of a Service Fabric container network.Constant filled by server. + Possible values include: "Local". + :vartype kind: str or ~azure.servicefabric.models.NetworkKind + :ivar description: User readable description of the network. + :vartype description: str + :ivar status: Status of the network. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the network. + :vartype status_details: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Local': 'LocalNetworkResourceProperties'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: User readable description of the network. + :paramtype description: str + """ + super(NetworkResourceProperties, self).__init__(**kwargs) + self.kind = 'NetworkResourceProperties' # type: str + self.description = kwargs.get('description', None) + self.status = None + self.status_details = None + + +class LocalNetworkResourceProperties(NetworkResourceProperties): + """Information about a Service Fabric container network local to a single Service Fabric cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of a Service Fabric container network.Constant filled by server. + Possible values include: "Local". + :vartype kind: str or ~azure.servicefabric.models.NetworkKind + :ivar description: User readable description of the network. + :vartype description: str + :ivar status: Status of the network. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the network. + :vartype status_details: str + :ivar network_address_prefix: Address space for the local container network. + :vartype network_address_prefix: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'network_address_prefix': {'key': 'networkAddressPrefix', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: User readable description of the network. + :paramtype description: str + :keyword network_address_prefix: Address space for the local container network. + :paramtype network_address_prefix: str + """ + super(LocalNetworkResourceProperties, self).__init__(**kwargs) + self.kind = 'Local' # type: str + self.network_address_prefix = kwargs.get('network_address_prefix', None) + + +class ManagedApplicationIdentity(msrest.serialization.Model): + """Describes a managed application identity. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the identity. + :vartype name: str + :ivar principal_id: The identity's PrincipalId. + :vartype principal_id: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'principal_id': {'key': 'PrincipalId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. The name of the identity. + :paramtype name: str + :keyword principal_id: The identity's PrincipalId. + :paramtype principal_id: str + """ + super(ManagedApplicationIdentity, self).__init__(**kwargs) + self.name = kwargs['name'] + self.principal_id = kwargs.get('principal_id', None) + + +class ManagedApplicationIdentityDescription(msrest.serialization.Model): + """Managed application identity description. + + :ivar token_service_endpoint: Token service endpoint. + :vartype token_service_endpoint: str + :ivar managed_identities: A list of managed application identity objects. + :vartype managed_identities: list[~azure.servicefabric.models.ManagedApplicationIdentity] + """ + + _attribute_map = { + 'token_service_endpoint': {'key': 'TokenServiceEndpoint', 'type': 'str'}, + 'managed_identities': {'key': 'ManagedIdentities', 'type': '[ManagedApplicationIdentity]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword token_service_endpoint: Token service endpoint. + :paramtype token_service_endpoint: str + :keyword managed_identities: A list of managed application identity objects. + :paramtype managed_identities: list[~azure.servicefabric.models.ManagedApplicationIdentity] + """ + super(ManagedApplicationIdentityDescription, self).__init__(**kwargs) + self.token_service_endpoint = kwargs.get('token_service_endpoint', None) + self.managed_identities = kwargs.get('managed_identities', None) + + +class ManagedIdentityAzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Azure blob store (connected using managed identity) used for storing and enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant + filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", + "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". + :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind + :ivar friendly_name: Friendly name for this backup storage. + :vartype friendly_name: str + :ivar managed_identity_type: Required. The type of managed identity to be used to connect to + Azure Blob Store via Managed Identity. Possible values include: "Invalid", "VMSS", "Cluster". + :vartype managed_identity_type: str or ~azure.servicefabric.models.ManagedIdentityType + :ivar blob_service_uri: Required. The Blob Service Uri to connect to the Azure blob store.. + :vartype blob_service_uri: str + :ivar container_name: Required. The name of the container in the blob store to store and + enumerate backups from. + :vartype container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'managed_identity_type': {'required': True}, + 'blob_service_uri': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'managed_identity_type': {'key': 'ManagedIdentityType', 'type': 'str'}, + 'blob_service_uri': {'key': 'BlobServiceUri', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword friendly_name: Friendly name for this backup storage. + :paramtype friendly_name: str + :keyword managed_identity_type: Required. The type of managed identity to be used to connect to + Azure Blob Store via Managed Identity. Possible values include: "Invalid", "VMSS", "Cluster". + :paramtype managed_identity_type: str or ~azure.servicefabric.models.ManagedIdentityType + :keyword blob_service_uri: Required. The Blob Service Uri to connect to the Azure blob store.. + :paramtype blob_service_uri: str + :keyword container_name: Required. The name of the container in the blob store to store and + enumerate backups from. + :paramtype container_name: str + """ + super(ManagedIdentityAzureBlobBackupStorageDescription, self).__init__(**kwargs) + self.storage_kind = 'ManagedIdentityAzureBlobStore' # type: str + self.managed_identity_type = kwargs['managed_identity_type'] + self.blob_service_uri = kwargs['blob_service_uri'] + self.container_name = kwargs['container_name'] + + +class MetricLoadDescription(msrest.serialization.Model): + """Specifies metric load information. + + :ivar metric_name: The name of the reported metric. + :vartype metric_name: str + :ivar current_load: The current value of the metric load. + :vartype current_load: long + :ivar predicted_load: The predicted value of the metric load. Predicted metric load values is + currently a preview feature. It allows predicted load values to be reported and used at the + Service Fabric side, but that feature is currently not enabled. + :vartype predicted_load: long + """ + + _attribute_map = { + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'current_load': {'key': 'CurrentLoad', 'type': 'long'}, + 'predicted_load': {'key': 'PredictedLoad', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword metric_name: The name of the reported metric. + :paramtype metric_name: str + :keyword current_load: The current value of the metric load. + :paramtype current_load: long + :keyword predicted_load: The predicted value of the metric load. Predicted metric load values + is currently a preview feature. It allows predicted load values to be reported and used at the + Service Fabric side, but that feature is currently not enabled. + :paramtype predicted_load: long + """ + super(MetricLoadDescription, self).__init__(**kwargs) + self.metric_name = kwargs.get('metric_name', None) + self.current_load = kwargs.get('current_load', None) + self.predicted_load = kwargs.get('predicted_load', None) + + +class MonitoringPolicyDescription(msrest.serialization.Model): + """Describes the parameters for monitoring an upgrade in Monitored mode. + + :ivar failure_action: The compensating action to perform when a Monitored upgrade encounters + monitoring policy or health policy violations. + Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will + start rolling back automatically. + Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible + values include: "Invalid", "Rollback", "Manual". + :vartype failure_action: str or ~azure.servicefabric.models.FailureAction + :ivar health_check_wait_duration_in_milliseconds: The amount of time to wait after completing + an upgrade domain before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. + :vartype health_check_wait_duration_in_milliseconds: str + :ivar health_check_stable_duration_in_milliseconds: The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :vartype health_check_stable_duration_in_milliseconds: str + :ivar health_check_retry_timeout_in_milliseconds: The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is executed. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :vartype health_check_retry_timeout_in_milliseconds: str + :ivar upgrade_timeout_in_milliseconds: The amount of time the overall upgrade has to complete + before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the total number of + milliseconds. + :vartype upgrade_timeout_in_milliseconds: str + :ivar upgrade_domain_timeout_in_milliseconds: The amount of time each upgrade domain has to + complete before FailureAction is executed. It is first interpreted as a string representing an + ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + number of milliseconds. + :vartype upgrade_domain_timeout_in_milliseconds: str + """ + + _attribute_map = { + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, + 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, + 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword failure_action: The compensating action to perform when a Monitored upgrade encounters + monitoring policy or health policy violations. + Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will + start rolling back automatically. + Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible + values include: "Invalid", "Rollback", "Manual". + :paramtype failure_action: str or ~azure.servicefabric.models.FailureAction + :keyword health_check_wait_duration_in_milliseconds: The amount of time to wait after + completing an upgrade domain before applying health policies. It is first interpreted as a + string representing an ISO 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. + :paramtype health_check_wait_duration_in_milliseconds: str + :keyword health_check_stable_duration_in_milliseconds: The amount of time that the application + or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is + first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :paramtype health_check_stable_duration_in_milliseconds: str + :keyword health_check_retry_timeout_in_milliseconds: The amount of time to retry health + evaluation when the application or cluster is unhealthy before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :paramtype health_check_retry_timeout_in_milliseconds: str + :keyword upgrade_timeout_in_milliseconds: The amount of time the overall upgrade has to + complete before FailureAction is executed. It is first interpreted as a string representing an + ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + number of milliseconds. + :paramtype upgrade_timeout_in_milliseconds: str + :keyword upgrade_domain_timeout_in_milliseconds: The amount of time each upgrade domain has to + complete before FailureAction is executed. It is first interpreted as a string representing an + ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + number of milliseconds. + :paramtype upgrade_domain_timeout_in_milliseconds: str + """ + super(MonitoringPolicyDescription, self).__init__(**kwargs) + self.failure_action = kwargs.get('failure_action', None) + self.health_check_wait_duration_in_milliseconds = kwargs.get('health_check_wait_duration_in_milliseconds', "0") + self.health_check_stable_duration_in_milliseconds = kwargs.get('health_check_stable_duration_in_milliseconds', "PT0H2M0S") + self.health_check_retry_timeout_in_milliseconds = kwargs.get('health_check_retry_timeout_in_milliseconds', "PT0H10M0S") + self.upgrade_timeout_in_milliseconds = kwargs.get('upgrade_timeout_in_milliseconds', "P10675199DT02H48M05.4775807S") + self.upgrade_domain_timeout_in_milliseconds = kwargs.get('upgrade_domain_timeout_in_milliseconds', "P10675199DT02H48M05.4775807S") + + +class NameDescription(msrest.serialization.Model): + """Describes a Service Fabric name. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The Service Fabric name, including the 'fabric:' URI scheme. + :vartype name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. The Service Fabric name, including the 'fabric:' URI scheme. + :paramtype name: str + """ + super(NameDescription, self).__init__(**kwargs) + self.name = kwargs['name'] + + +class NamedPartitionInformation(PartitionInformation): + """Describes the partition information for the name as a string that is based on partition schemes. + + All required parameters must be populated in order to send to Azure. + + :ivar service_partition_kind: Required. The kind of partitioning scheme used to partition the + service.Constant filled by server. Possible values include: "Invalid", "Singleton", + "Int64Range", "Named". + :vartype service_partition_kind: str or ~azure.servicefabric.models.ServicePartitionKind + :ivar id: An internal ID used by Service Fabric to uniquely identify a partition. This is a + randomly generated GUID when the service was created. The partition ID is unique and does not + change for the lifetime of the service. If the same service was deleted and recreated the IDs + of its partitions would be different. + :vartype id: str + :ivar name: Name of the partition. + :vartype name: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: An internal ID used by Service Fabric to uniquely identify a partition. This is a + randomly generated GUID when the service was created. The partition ID is unique and does not + change for the lifetime of the service. If the same service was deleted and recreated the IDs + of its partitions would be different. + :paramtype id: str + :keyword name: Name of the partition. + :paramtype name: str + """ + super(NamedPartitionInformation, self).__init__(**kwargs) + self.service_partition_kind = 'Named' # type: str + self.name = kwargs.get('name', None) + + +class PartitionSchemeDescription(msrest.serialization.Model): + """Describes how the service is partitioned. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NamedPartitionSchemeDescription, SingletonPartitionSchemeDescription, UniformInt64RangePartitionSchemeDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar partition_scheme: Required. Specifies how the service is partitioned.Constant filled by + server. Possible values include: "Invalid", "Singleton", "UniformInt64Range", "Named". + :vartype partition_scheme: str or ~azure.servicefabric.models.PartitionScheme + """ + + _validation = { + 'partition_scheme': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + } + + _subtype_map = { + 'partition_scheme': {'Named': 'NamedPartitionSchemeDescription', 'Singleton': 'SingletonPartitionSchemeDescription', 'UniformInt64Range': 'UniformInt64RangePartitionSchemeDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PartitionSchemeDescription, self).__init__(**kwargs) + self.partition_scheme = None # type: Optional[str] + + +class NamedPartitionSchemeDescription(PartitionSchemeDescription): + """Describes the named partition scheme of the service. + + All required parameters must be populated in order to send to Azure. + + :ivar partition_scheme: Required. Specifies how the service is partitioned.Constant filled by + server. Possible values include: "Invalid", "Singleton", "UniformInt64Range", "Named". + :vartype partition_scheme: str or ~azure.servicefabric.models.PartitionScheme + :ivar count: Required. The number of partitions. + :vartype count: int + :ivar names: Required. Array of size specified by the ‘Count’ parameter, for the names of the + partitions. + :vartype names: list[str] + """ + + _validation = { + 'partition_scheme': {'required': True}, + 'count': {'required': True}, + 'names': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + 'count': {'key': 'Count', 'type': 'int'}, + 'names': {'key': 'Names', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword count: Required. The number of partitions. + :paramtype count: int + :keyword names: Required. Array of size specified by the ‘Count’ parameter, for the names of + the partitions. + :paramtype names: list[str] + """ + super(NamedPartitionSchemeDescription, self).__init__(**kwargs) + self.partition_scheme = 'Named' # type: str + self.count = kwargs['count'] + self.names = kwargs['names'] + + +class NetworkRef(msrest.serialization.Model): + """Describes a network reference in a service. + + :ivar name: Name of the network. + :vartype name: str + :ivar endpoint_refs: A list of endpoints that are exposed on this network. + :vartype endpoint_refs: list[~azure.servicefabric.models.EndpointRef] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'endpoint_refs': {'key': 'endpointRefs', 'type': '[EndpointRef]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Name of the network. + :paramtype name: str + :keyword endpoint_refs: A list of endpoints that are exposed on this network. + :paramtype endpoint_refs: list[~azure.servicefabric.models.EndpointRef] + """ + super(NetworkRef, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.endpoint_refs = kwargs.get('endpoint_refs', None) + + +class NetworkResourceDescription(msrest.serialization.Model): + """This type describes a network resource. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of the Network resource. + :vartype name: str + :ivar properties: Required. Describes properties of a network resource. + :vartype properties: ~azure.servicefabric.models.NetworkResourceProperties + """ + + _validation = { + 'name': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'NetworkResourceProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. Name of the Network resource. + :paramtype name: str + :keyword properties: Required. Describes properties of a network resource. + :paramtype properties: ~azure.servicefabric.models.NetworkResourceProperties + """ + super(NetworkResourceDescription, self).__init__(**kwargs) + self.name = kwargs['name'] + self.properties = kwargs['properties'] + + +class NodeAbortedEvent(NodeEvent): + """Node Aborted event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar node_id: Required. Id of Node. + :vartype node_id: str + :ivar upgrade_domain: Required. Upgrade domain of Node. + :vartype upgrade_domain: str + :ivar fault_domain: Required. Fault domain of Node. + :vartype fault_domain: str + :ivar ip_address_or_fqdn: Required. IP address or FQDN. + :vartype ip_address_or_fqdn: str + :ivar hostname: Required. Name of Host. + :vartype hostname: str + :ivar is_seed_node: Required. Indicates if it is seed node. + :vartype is_seed_node: bool + :ivar node_version: Required. Version of Node. + :vartype node_version: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword node_id: Required. Id of Node. + :paramtype node_id: str + :keyword upgrade_domain: Required. Upgrade domain of Node. + :paramtype upgrade_domain: str + :keyword fault_domain: Required. Fault domain of Node. + :paramtype fault_domain: str + :keyword ip_address_or_fqdn: Required. IP address or FQDN. + :paramtype ip_address_or_fqdn: str + :keyword hostname: Required. Name of Host. + :paramtype hostname: str + :keyword is_seed_node: Required. Indicates if it is seed node. + :paramtype is_seed_node: bool + :keyword node_version: Required. Version of Node. + :paramtype node_version: str + """ + super(NodeAbortedEvent, self).__init__(**kwargs) + self.kind = 'NodeAborted' # type: str + self.node_instance = kwargs['node_instance'] + self.node_id = kwargs['node_id'] + self.upgrade_domain = kwargs['upgrade_domain'] + self.fault_domain = kwargs['fault_domain'] + self.ip_address_or_fqdn = kwargs['ip_address_or_fqdn'] + self.hostname = kwargs['hostname'] + self.is_seed_node = kwargs['is_seed_node'] + self.node_version = kwargs['node_version'] + + +class NodeAddedToClusterEvent(NodeEvent): + """Node Added event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_id: Required. Id of Node. + :vartype node_id: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar node_type: Required. Type of Node. + :vartype node_type: str + :ivar fabric_version: Required. Fabric version. + :vartype fabric_version: str + :ivar ip_address_or_fqdn: Required. IP address or FQDN. + :vartype ip_address_or_fqdn: str + :ivar node_capacities: Required. Capacities. + :vartype node_capacities: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'node_type': {'required': True}, + 'fabric_version': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'node_capacities': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_type': {'key': 'NodeType', 'type': 'str'}, + 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_id: Required. Id of Node. + :paramtype node_id: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword node_type: Required. Type of Node. + :paramtype node_type: str + :keyword fabric_version: Required. Fabric version. + :paramtype fabric_version: str + :keyword ip_address_or_fqdn: Required. IP address or FQDN. + :paramtype ip_address_or_fqdn: str + :keyword node_capacities: Required. Capacities. + :paramtype node_capacities: str + """ + super(NodeAddedToClusterEvent, self).__init__(**kwargs) + self.kind = 'NodeAddedToCluster' # type: str + self.node_id = kwargs['node_id'] + self.node_instance = kwargs['node_instance'] + self.node_type = kwargs['node_type'] + self.fabric_version = kwargs['fabric_version'] + self.ip_address_or_fqdn = kwargs['ip_address_or_fqdn'] + self.node_capacities = kwargs['node_capacities'] + + +class NodeClosedEvent(NodeEvent): + """Node Closed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_id: Required. Id of Node. + :vartype node_id: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar error: Required. Describes error. + :vartype error: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'error': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'error': {'key': 'Error', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_id: Required. Id of Node. + :paramtype node_id: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword error: Required. Describes error. + :paramtype error: str + """ + super(NodeClosedEvent, self).__init__(**kwargs) + self.kind = 'NodeClosed' # type: str + self.node_id = kwargs['node_id'] + self.node_instance = kwargs['node_instance'] + self.error = kwargs['error'] + + +class NodeDeactivateCompletedEvent(NodeEvent): + """Node Deactivate Completed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar effective_deactivate_intent: Required. Describes deactivate intent. + :vartype effective_deactivate_intent: str + :ivar batch_ids_with_deactivate_intent: Required. Batch Ids. + :vartype batch_ids_with_deactivate_intent: str + :ivar start_time: Required. Start time. + :vartype start_time: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'effective_deactivate_intent': {'required': True}, + 'batch_ids_with_deactivate_intent': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'effective_deactivate_intent': {'key': 'EffectiveDeactivateIntent', 'type': 'str'}, + 'batch_ids_with_deactivate_intent': {'key': 'BatchIdsWithDeactivateIntent', 'type': 'str'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword effective_deactivate_intent: Required. Describes deactivate intent. + :paramtype effective_deactivate_intent: str + :keyword batch_ids_with_deactivate_intent: Required. Batch Ids. + :paramtype batch_ids_with_deactivate_intent: str + :keyword start_time: Required. Start time. + :paramtype start_time: ~datetime.datetime + """ + super(NodeDeactivateCompletedEvent, self).__init__(**kwargs) + self.kind = 'NodeDeactivateCompleted' # type: str + self.node_instance = kwargs['node_instance'] + self.effective_deactivate_intent = kwargs['effective_deactivate_intent'] + self.batch_ids_with_deactivate_intent = kwargs['batch_ids_with_deactivate_intent'] + self.start_time = kwargs['start_time'] + + +class NodeDeactivateStartedEvent(NodeEvent): + """Node Deactivate Started event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar batch_id: Required. Batch Id. + :vartype batch_id: str + :ivar deactivate_intent: Required. Describes deactivate intent. + :vartype deactivate_intent: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'batch_id': {'required': True}, + 'deactivate_intent': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'batch_id': {'key': 'BatchId', 'type': 'str'}, + 'deactivate_intent': {'key': 'DeactivateIntent', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword batch_id: Required. Batch Id. + :paramtype batch_id: str + :keyword deactivate_intent: Required. Describes deactivate intent. + :paramtype deactivate_intent: str + """ + super(NodeDeactivateStartedEvent, self).__init__(**kwargs) + self.kind = 'NodeDeactivateStarted' # type: str + self.node_instance = kwargs['node_instance'] + self.batch_id = kwargs['batch_id'] + self.deactivate_intent = kwargs['deactivate_intent'] + + +class NodeDeactivationInfo(msrest.serialization.Model): + """Information about the node deactivation. This information is valid for a node that is undergoing deactivation or has already been deactivated. + + :ivar node_deactivation_intent: The intent or the reason for deactivating the node. Following + are the possible values for it. Possible values include: "Invalid", "Pause", "Restart", + "RemoveData", "RemoveNode". + :vartype node_deactivation_intent: str or ~azure.servicefabric.models.NodeDeactivationIntent + :ivar node_deactivation_status: The status of node deactivation operation. Following are the + possible values. Possible values include: "None", "SafetyCheckInProgress", + "SafetyCheckComplete", "Completed". + :vartype node_deactivation_status: str or ~azure.servicefabric.models.NodeDeactivationStatus + :ivar node_deactivation_task: List of tasks representing the deactivation operation on the + node. + :vartype node_deactivation_task: list[~azure.servicefabric.models.NodeDeactivationTask] + :ivar pending_safety_checks: List of pending safety checks. + :vartype pending_safety_checks: list[~azure.servicefabric.models.SafetyCheckWrapper] + """ + + _attribute_map = { + 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, + 'node_deactivation_status': {'key': 'NodeDeactivationStatus', 'type': 'str'}, + 'node_deactivation_task': {'key': 'NodeDeactivationTask', 'type': '[NodeDeactivationTask]'}, + 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword node_deactivation_intent: The intent or the reason for deactivating the node. + Following are the possible values for it. Possible values include: "Invalid", "Pause", + "Restart", "RemoveData", "RemoveNode". + :paramtype node_deactivation_intent: str or ~azure.servicefabric.models.NodeDeactivationIntent + :keyword node_deactivation_status: The status of node deactivation operation. Following are the + possible values. Possible values include: "None", "SafetyCheckInProgress", + "SafetyCheckComplete", "Completed". + :paramtype node_deactivation_status: str or ~azure.servicefabric.models.NodeDeactivationStatus + :keyword node_deactivation_task: List of tasks representing the deactivation operation on the + node. + :paramtype node_deactivation_task: list[~azure.servicefabric.models.NodeDeactivationTask] + :keyword pending_safety_checks: List of pending safety checks. + :paramtype pending_safety_checks: list[~azure.servicefabric.models.SafetyCheckWrapper] + """ + super(NodeDeactivationInfo, self).__init__(**kwargs) + self.node_deactivation_intent = kwargs.get('node_deactivation_intent', None) + self.node_deactivation_status = kwargs.get('node_deactivation_status', None) + self.node_deactivation_task = kwargs.get('node_deactivation_task', None) + self.pending_safety_checks = kwargs.get('pending_safety_checks', None) + + +class NodeDeactivationTask(msrest.serialization.Model): + """The task representing the deactivation operation on the node. + + :ivar node_deactivation_task_id: Identity of the task related to deactivation operation on the + node. + :vartype node_deactivation_task_id: ~azure.servicefabric.models.NodeDeactivationTaskId + :ivar node_deactivation_intent: The intent or the reason for deactivating the node. Following + are the possible values for it. Possible values include: "Invalid", "Pause", "Restart", + "RemoveData", "RemoveNode". + :vartype node_deactivation_intent: str or ~azure.servicefabric.models.NodeDeactivationIntent + """ + + _attribute_map = { + 'node_deactivation_task_id': {'key': 'NodeDeactivationTaskId', 'type': 'NodeDeactivationTaskId'}, + 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword node_deactivation_task_id: Identity of the task related to deactivation operation on + the node. + :paramtype node_deactivation_task_id: ~azure.servicefabric.models.NodeDeactivationTaskId + :keyword node_deactivation_intent: The intent or the reason for deactivating the node. + Following are the possible values for it. Possible values include: "Invalid", "Pause", + "Restart", "RemoveData", "RemoveNode". + :paramtype node_deactivation_intent: str or ~azure.servicefabric.models.NodeDeactivationIntent + """ + super(NodeDeactivationTask, self).__init__(**kwargs) + self.node_deactivation_task_id = kwargs.get('node_deactivation_task_id', None) + self.node_deactivation_intent = kwargs.get('node_deactivation_intent', None) + + +class NodeDeactivationTaskId(msrest.serialization.Model): + """Identity of the task related to deactivation operation on the node. + + :ivar id: Value of the task id. + :vartype id: str + :ivar node_deactivation_task_type: The type of the task that performed the node deactivation. + Following are the possible values. Possible values include: "Invalid", "Infrastructure", + "Repair", "Client". + :vartype node_deactivation_task_type: str or + ~azure.servicefabric.models.NodeDeactivationTaskType + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'node_deactivation_task_type': {'key': 'NodeDeactivationTaskType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Value of the task id. + :paramtype id: str + :keyword node_deactivation_task_type: The type of the task that performed the node + deactivation. Following are the possible values. Possible values include: "Invalid", + "Infrastructure", "Repair", "Client". + :paramtype node_deactivation_task_type: str or + ~azure.servicefabric.models.NodeDeactivationTaskType + """ + super(NodeDeactivationTaskId, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.node_deactivation_task_type = kwargs.get('node_deactivation_task_type', None) + + +class NodeDownEvent(NodeEvent): + """Node Down event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar last_node_up_at: Required. Time when Node was last up. + :vartype last_node_up_at: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'last_node_up_at': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'last_node_up_at': {'key': 'LastNodeUpAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword last_node_up_at: Required. Time when Node was last up. + :paramtype last_node_up_at: ~datetime.datetime + """ + super(NodeDownEvent, self).__init__(**kwargs) + self.kind = 'NodeDown' # type: str + self.node_instance = kwargs['node_instance'] + self.last_node_up_at = kwargs['last_node_up_at'] + + +class NodeHealth(EntityHealth): + """Information about the health of a Service Fabric node. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar name: Name of the node whose health information is described by this object. + :vartype name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword name: Name of the node whose health information is described by this object. + :paramtype name: str + """ + super(NodeHealth, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class NodeHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a node, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar node_name: The name of a Service Fabric node. + :vartype node_name: str + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated + health state of the node. The types of the unhealthy evaluations can be EventHealthEvaluation. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword node_name: The name of a Service Fabric node. + :paramtype node_name: str + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current + aggregated health state of the node. The types of the unhealthy evaluations can be + EventHealthEvaluation. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(NodeHealthEvaluation, self).__init__(**kwargs) + self.kind = 'Node' # type: str + self.node_name = kwargs.get('node_name', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class NodeHealthReportExpiredEvent(NodeEvent): + """Node Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance_id: Required. Id of Node instance. + :vartype node_instance_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance_id: Required. Id of Node instance. + :paramtype node_instance_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(NodeHealthReportExpiredEvent, self).__init__(**kwargs) + self.kind = 'NodeHealthReportExpired' # type: str + self.node_instance_id = kwargs['node_instance_id'] + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class NodeHealthState(EntityHealthState): + """Represents the health state of a node, which contains the node identifier and its aggregated health state. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar name: The name of a Service Fabric node. + :vartype name: str + :ivar id: An internal ID used by Service Fabric to uniquely identify a node. Node Id is + deterministically generated from node name. + :vartype id: ~azure.servicefabric.models.NodeId + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'NodeId'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword name: The name of a Service Fabric node. + :paramtype name: str + :keyword id: An internal ID used by Service Fabric to uniquely identify a node. Node Id is + deterministically generated from node name. + :paramtype id: ~azure.servicefabric.models.NodeId + """ + super(NodeHealthState, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.id = kwargs.get('id', None) + + +class NodeHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a node, which contains the node name and its aggregated health state. + + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar node_name: The name of a Service Fabric node. + :vartype node_name: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword node_name: The name of a Service Fabric node. + :paramtype node_name: str + """ + super(NodeHealthStateChunk, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + + +class NodeHealthStateChunkList(EntityHealthStateChunkList): + """The list of node health state chunks in the cluster that respect the input filters in the chunk query. Returned by get cluster health state chunks query. + + :ivar total_count: Total number of entity health state objects that match the specified filters + from the cluster health chunk query description. + :vartype total_count: long + :ivar items: The list of node health state chunks that respect the input filters in the chunk + query. + :vartype items: list[~azure.servicefabric.models.NodeHealthStateChunk] + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'items': {'key': 'Items', 'type': '[NodeHealthStateChunk]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword total_count: Total number of entity health state objects that match the specified + filters from the cluster health chunk query description. + :paramtype total_count: long + :keyword items: The list of node health state chunks that respect the input filters in the + chunk query. + :paramtype items: list[~azure.servicefabric.models.NodeHealthStateChunk] + """ + super(NodeHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) + + +class NodeHealthStateFilter(msrest.serialization.Model): + """Defines matching criteria to determine whether a node should be included in the returned cluster health chunk. +One filter can match zero, one or multiple nodes, depending on its properties. +Can be specified in the cluster health chunk query description. + + :ivar node_name_filter: Name of the node that matches the filter. The filter is applied only to + the specified node, if it exists. + If the node doesn't exist, no node is returned in the cluster health chunk based on this + filter. + If the node exists, it is included in the cluster health chunk if the health state matches the + other filter properties. + If not specified, all nodes that match the parent filters (if any) are taken into + consideration and matched against the other filter members, like health state filter. + :vartype node_name_filter: str + :ivar health_state_filter: The filter for the health state of the nodes. It allows selecting + nodes if they match the desired health states. + The possible values are integer value of one of the following health states. Only nodes that + match the filter are returned. All nodes are used to evaluate the cluster aggregated health + state. + If not specified, default value is None, unless the node name is specified. If the filter has + default value and node name is specified, the matching node is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches nodes with HealthState value of OK (2) and + Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :vartype health_state_filter: int + """ + + _attribute_map = { + 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword node_name_filter: Name of the node that matches the filter. The filter is applied only + to the specified node, if it exists. + If the node doesn't exist, no node is returned in the cluster health chunk based on this + filter. + If the node exists, it is included in the cluster health chunk if the health state matches the + other filter properties. + If not specified, all nodes that match the parent filters (if any) are taken into + consideration and matched against the other filter members, like health state filter. + :paramtype node_name_filter: str + :keyword health_state_filter: The filter for the health state of the nodes. It allows selecting + nodes if they match the desired health states. + The possible values are integer value of one of the following health states. Only nodes that + match the filter are returned. All nodes are used to evaluate the cluster aggregated health + state. + If not specified, default value is None, unless the node name is specified. If the filter has + default value and node name is specified, the matching node is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches nodes with HealthState value of OK (2) and + Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :paramtype health_state_filter: int + """ + super(NodeHealthStateFilter, self).__init__(**kwargs) + self.node_name_filter = kwargs.get('node_name_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) + + +class NodeId(msrest.serialization.Model): + """An internal ID used by Service Fabric to uniquely identify a node. Node Id is deterministically generated from node name. + + :ivar id: Value of the node Id. This is a 128 bit integer. + :vartype id: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Value of the node Id. This is a 128 bit integer. + :paramtype id: str + """ + super(NodeId, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class NodeImpact(msrest.serialization.Model): + """Describes the expected impact of a repair to a particular node. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar node_name: Required. The name of the impacted node. + :vartype node_name: str + :ivar impact_level: The level of impact expected. Possible values include: "Invalid", "None", + "Restart", "RemoveData", "RemoveNode". + :vartype impact_level: str or ~azure.servicefabric.models.ImpactLevel + """ + + _validation = { + 'node_name': {'required': True}, + } + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'impact_level': {'key': 'ImpactLevel', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword node_name: Required. The name of the impacted node. + :paramtype node_name: str + :keyword impact_level: The level of impact expected. Possible values include: "Invalid", + "None", "Restart", "RemoveData", "RemoveNode". + :paramtype impact_level: str or ~azure.servicefabric.models.ImpactLevel + """ + super(NodeImpact, self).__init__(**kwargs) + self.node_name = kwargs['node_name'] + self.impact_level = kwargs.get('impact_level', None) + + +class NodeInfo(msrest.serialization.Model): + """Information about a node in Service Fabric cluster. + + :ivar name: The name of a Service Fabric node. + :vartype name: str + :ivar ip_address_or_fqdn: The IP address or fully qualified domain name of the node. + :vartype ip_address_or_fqdn: str + :ivar type: The type of the node. + :vartype type: str + :ivar code_version: The version of Service Fabric binaries that the node is running. + :vartype code_version: str + :ivar config_version: The version of Service Fabric cluster manifest that the node is using. + :vartype config_version: str + :ivar node_status: The status of the node. Possible values include: "Invalid", "Up", "Down", + "Enabling", "Disabling", "Disabled", "Unknown", "Removed". + :vartype node_status: str or ~azure.servicefabric.models.NodeStatus + :ivar node_up_time_in_seconds: Time in seconds since the node has been in NodeStatus Up. Value + zero indicates that the node is not Up. + :vartype node_up_time_in_seconds: str + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar is_seed_node: Indicates if the node is a seed node or not. Returns true if the node is a + seed node, otherwise false. A quorum of seed nodes are required for proper operation of Service + Fabric cluster. + :vartype is_seed_node: bool + :ivar upgrade_domain: The upgrade domain of the node. + :vartype upgrade_domain: str + :ivar fault_domain: The fault domain of the node. + :vartype fault_domain: str + :ivar id: An internal ID used by Service Fabric to uniquely identify a node. Node Id is + deterministically generated from node name. + :vartype id: ~azure.servicefabric.models.NodeId + :ivar instance_id: The ID representing the node instance. While the ID of the node is + deterministically generated from the node name and remains same across restarts, the InstanceId + changes every time node restarts. + :vartype instance_id: str + :ivar node_deactivation_info: Information about the node deactivation. This information is + valid for a node that is undergoing deactivation or has already been deactivated. + :vartype node_deactivation_info: ~azure.servicefabric.models.NodeDeactivationInfo + :ivar is_stopped: Indicates if the node is stopped by calling stop node API or not. Returns + true if the node is stopped, otherwise false. + :vartype is_stopped: bool + :ivar node_down_time_in_seconds: Time in seconds since the node has been in NodeStatus Down. + Value zero indicates node is not NodeStatus Down. + :vartype node_down_time_in_seconds: str + :ivar node_up_at: Date time in UTC when the node came up. If the node has never been up then + this value will be zero date time. + :vartype node_up_at: ~datetime.datetime + :ivar node_down_at: Date time in UTC when the node went down. If node has never been down then + this value will be zero date time. + :vartype node_down_at: ~datetime.datetime + :ivar node_tags: List that contains tags, which will be applied to the nodes. + :vartype node_tags: list[str] + :ivar is_node_by_node_upgrade_in_progress: Indicates if a node-by-node upgrade is currently + being performed on this node. + :vartype is_node_by_node_upgrade_in_progress: bool + :ivar infrastructure_placement_id: PlacementID used by the InfrastructureService. + :vartype infrastructure_placement_id: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'type': {'key': 'Type', 'type': 'str'}, + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'node_status': {'key': 'NodeStatus', 'type': 'str'}, + 'node_up_time_in_seconds': {'key': 'NodeUpTimeInSeconds', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'NodeId'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + 'node_deactivation_info': {'key': 'NodeDeactivationInfo', 'type': 'NodeDeactivationInfo'}, + 'is_stopped': {'key': 'IsStopped', 'type': 'bool'}, + 'node_down_time_in_seconds': {'key': 'NodeDownTimeInSeconds', 'type': 'str'}, + 'node_up_at': {'key': 'NodeUpAt', 'type': 'iso-8601'}, + 'node_down_at': {'key': 'NodeDownAt', 'type': 'iso-8601'}, + 'node_tags': {'key': 'NodeTags', 'type': '[str]'}, + 'is_node_by_node_upgrade_in_progress': {'key': 'IsNodeByNodeUpgradeInProgress', 'type': 'bool'}, + 'infrastructure_placement_id': {'key': 'InfrastructurePlacementID', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: The name of a Service Fabric node. + :paramtype name: str + :keyword ip_address_or_fqdn: The IP address or fully qualified domain name of the node. + :paramtype ip_address_or_fqdn: str + :keyword type: The type of the node. + :paramtype type: str + :keyword code_version: The version of Service Fabric binaries that the node is running. + :paramtype code_version: str + :keyword config_version: The version of Service Fabric cluster manifest that the node is using. + :paramtype config_version: str + :keyword node_status: The status of the node. Possible values include: "Invalid", "Up", "Down", + "Enabling", "Disabling", "Disabled", "Unknown", "Removed". + :paramtype node_status: str or ~azure.servicefabric.models.NodeStatus + :keyword node_up_time_in_seconds: Time in seconds since the node has been in NodeStatus Up. + Value zero indicates that the node is not Up. + :paramtype node_up_time_in_seconds: str + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword is_seed_node: Indicates if the node is a seed node or not. Returns true if the node is + a seed node, otherwise false. A quorum of seed nodes are required for proper operation of + Service Fabric cluster. + :paramtype is_seed_node: bool + :keyword upgrade_domain: The upgrade domain of the node. + :paramtype upgrade_domain: str + :keyword fault_domain: The fault domain of the node. + :paramtype fault_domain: str + :keyword id: An internal ID used by Service Fabric to uniquely identify a node. Node Id is + deterministically generated from node name. + :paramtype id: ~azure.servicefabric.models.NodeId + :keyword instance_id: The ID representing the node instance. While the ID of the node is + deterministically generated from the node name and remains same across restarts, the InstanceId + changes every time node restarts. + :paramtype instance_id: str + :keyword node_deactivation_info: Information about the node deactivation. This information is + valid for a node that is undergoing deactivation or has already been deactivated. + :paramtype node_deactivation_info: ~azure.servicefabric.models.NodeDeactivationInfo + :keyword is_stopped: Indicates if the node is stopped by calling stop node API or not. Returns + true if the node is stopped, otherwise false. + :paramtype is_stopped: bool + :keyword node_down_time_in_seconds: Time in seconds since the node has been in NodeStatus Down. + Value zero indicates node is not NodeStatus Down. + :paramtype node_down_time_in_seconds: str + :keyword node_up_at: Date time in UTC when the node came up. If the node has never been up then + this value will be zero date time. + :paramtype node_up_at: ~datetime.datetime + :keyword node_down_at: Date time in UTC when the node went down. If node has never been down + then this value will be zero date time. + :paramtype node_down_at: ~datetime.datetime + :keyword node_tags: List that contains tags, which will be applied to the nodes. + :paramtype node_tags: list[str] + :keyword is_node_by_node_upgrade_in_progress: Indicates if a node-by-node upgrade is currently + being performed on this node. + :paramtype is_node_by_node_upgrade_in_progress: bool + :keyword infrastructure_placement_id: PlacementID used by the InfrastructureService. + :paramtype infrastructure_placement_id: str + """ + super(NodeInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) + self.type = kwargs.get('type', None) + self.code_version = kwargs.get('code_version', None) + self.config_version = kwargs.get('config_version', None) + self.node_status = kwargs.get('node_status', None) + self.node_up_time_in_seconds = kwargs.get('node_up_time_in_seconds', None) + self.health_state = kwargs.get('health_state', None) + self.is_seed_node = kwargs.get('is_seed_node', None) + self.upgrade_domain = kwargs.get('upgrade_domain', None) + self.fault_domain = kwargs.get('fault_domain', None) + self.id = kwargs.get('id', None) + self.instance_id = kwargs.get('instance_id', None) + self.node_deactivation_info = kwargs.get('node_deactivation_info', None) + self.is_stopped = kwargs.get('is_stopped', None) + self.node_down_time_in_seconds = kwargs.get('node_down_time_in_seconds', None) + self.node_up_at = kwargs.get('node_up_at', None) + self.node_down_at = kwargs.get('node_down_at', None) + self.node_tags = kwargs.get('node_tags', None) + self.is_node_by_node_upgrade_in_progress = kwargs.get('is_node_by_node_upgrade_in_progress', None) + self.infrastructure_placement_id = kwargs.get('infrastructure_placement_id', None) + + +class NodeLoadInfo(msrest.serialization.Model): + """Information about load on a Service Fabric node. It holds a summary of all metrics and their load on a node. + + :ivar node_name: Name of the node for which the load information is provided by this object. + :vartype node_name: str + :ivar node_load_metric_information: List that contains metrics and their load information on + this node. + :vartype node_load_metric_information: + list[~azure.servicefabric.models.NodeLoadMetricInformation] + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_load_metric_information': {'key': 'NodeLoadMetricInformation', 'type': '[NodeLoadMetricInformation]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword node_name: Name of the node for which the load information is provided by this object. + :paramtype node_name: str + :keyword node_load_metric_information: List that contains metrics and their load information on + this node. + :paramtype node_load_metric_information: + list[~azure.servicefabric.models.NodeLoadMetricInformation] + """ + super(NodeLoadInfo, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.node_load_metric_information = kwargs.get('node_load_metric_information', None) + + +class NodeLoadMetricInformation(msrest.serialization.Model): + """Represents data structure that contains load information for a certain metric on a node. + + :ivar name: Name of the metric for which this load information is provided. + :vartype name: str + :ivar node_capacity: Total capacity on the node for this metric. + :vartype node_capacity: str + :ivar node_load: Current load on the node for this metric. In future releases of Service Fabric + this parameter will be deprecated in favor of CurrentNodeLoad. + :vartype node_load: str + :ivar node_remaining_capacity: The remaining capacity on the node for this metric. In future + releases of Service Fabric this parameter will be deprecated in favor of NodeCapacityRemaining. + :vartype node_remaining_capacity: str + :ivar is_capacity_violation: Indicates if there is a capacity violation for this metric on the + node. + :vartype is_capacity_violation: bool + :ivar node_buffered_capacity: The value that indicates the reserved capacity for this metric on + the node. + :vartype node_buffered_capacity: str + :ivar node_remaining_buffered_capacity: The remaining reserved capacity for this metric on the + node. In future releases of Service Fabric this parameter will be deprecated in favor of + BufferedNodeCapacityRemaining. + :vartype node_remaining_buffered_capacity: str + :ivar current_node_load: Current load on the node for this metric. + :vartype current_node_load: str + :ivar node_capacity_remaining: The remaining capacity on the node for the metric. + :vartype node_capacity_remaining: str + :ivar buffered_node_capacity_remaining: The remaining capacity which is not reserved by + NodeBufferPercentage for this metric on the node. + :vartype buffered_node_capacity_remaining: str + :ivar planned_node_load_removal: This value represents the load of the replicas that are + planned to be removed in the future. + This kind of load is reported for replicas that are currently being moving to other nodes and + for replicas that are currently being dropped but still use the load on the source node. + :vartype planned_node_load_removal: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'node_capacity': {'key': 'NodeCapacity', 'type': 'str'}, + 'node_load': {'key': 'NodeLoad', 'type': 'str'}, + 'node_remaining_capacity': {'key': 'NodeRemainingCapacity', 'type': 'str'}, + 'is_capacity_violation': {'key': 'IsCapacityViolation', 'type': 'bool'}, + 'node_buffered_capacity': {'key': 'NodeBufferedCapacity', 'type': 'str'}, + 'node_remaining_buffered_capacity': {'key': 'NodeRemainingBufferedCapacity', 'type': 'str'}, + 'current_node_load': {'key': 'CurrentNodeLoad', 'type': 'str'}, + 'node_capacity_remaining': {'key': 'NodeCapacityRemaining', 'type': 'str'}, + 'buffered_node_capacity_remaining': {'key': 'BufferedNodeCapacityRemaining', 'type': 'str'}, + 'planned_node_load_removal': {'key': 'PlannedNodeLoadRemoval', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Name of the metric for which this load information is provided. + :paramtype name: str + :keyword node_capacity: Total capacity on the node for this metric. + :paramtype node_capacity: str + :keyword node_load: Current load on the node for this metric. In future releases of Service + Fabric this parameter will be deprecated in favor of CurrentNodeLoad. + :paramtype node_load: str + :keyword node_remaining_capacity: The remaining capacity on the node for this metric. In future + releases of Service Fabric this parameter will be deprecated in favor of NodeCapacityRemaining. + :paramtype node_remaining_capacity: str + :keyword is_capacity_violation: Indicates if there is a capacity violation for this metric on + the node. + :paramtype is_capacity_violation: bool + :keyword node_buffered_capacity: The value that indicates the reserved capacity for this metric + on the node. + :paramtype node_buffered_capacity: str + :keyword node_remaining_buffered_capacity: The remaining reserved capacity for this metric on + the node. In future releases of Service Fabric this parameter will be deprecated in favor of + BufferedNodeCapacityRemaining. + :paramtype node_remaining_buffered_capacity: str + :keyword current_node_load: Current load on the node for this metric. + :paramtype current_node_load: str + :keyword node_capacity_remaining: The remaining capacity on the node for the metric. + :paramtype node_capacity_remaining: str + :keyword buffered_node_capacity_remaining: The remaining capacity which is not reserved by + NodeBufferPercentage for this metric on the node. + :paramtype buffered_node_capacity_remaining: str + :keyword planned_node_load_removal: This value represents the load of the replicas that are + planned to be removed in the future. + This kind of load is reported for replicas that are currently being moving to other nodes and + for replicas that are currently being dropped but still use the load on the source node. + :paramtype planned_node_load_removal: str + """ + super(NodeLoadMetricInformation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.node_capacity = kwargs.get('node_capacity', None) + self.node_load = kwargs.get('node_load', None) + self.node_remaining_capacity = kwargs.get('node_remaining_capacity', None) + self.is_capacity_violation = kwargs.get('is_capacity_violation', None) + self.node_buffered_capacity = kwargs.get('node_buffered_capacity', None) + self.node_remaining_buffered_capacity = kwargs.get('node_remaining_buffered_capacity', None) + self.current_node_load = kwargs.get('current_node_load', None) + self.node_capacity_remaining = kwargs.get('node_capacity_remaining', None) + self.buffered_node_capacity_remaining = kwargs.get('buffered_node_capacity_remaining', None) + self.planned_node_load_removal = kwargs.get('planned_node_load_removal', None) + + +class NodeNewHealthReportEvent(NodeEvent): + """Node Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance_id: Required. Id of Node instance. + :vartype node_instance_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance_id: Required. Id of Node instance. + :paramtype node_instance_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(NodeNewHealthReportEvent, self).__init__(**kwargs) + self.kind = 'NodeNewHealthReport' # type: str + self.node_instance_id = kwargs['node_instance_id'] + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class NodeOpenFailedEvent(NodeEvent): + """Node Open Failed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar node_id: Required. Id of Node. + :vartype node_id: str + :ivar upgrade_domain: Required. Upgrade domain of Node. + :vartype upgrade_domain: str + :ivar fault_domain: Required. Fault domain of Node. + :vartype fault_domain: str + :ivar ip_address_or_fqdn: Required. IP address or FQDN. + :vartype ip_address_or_fqdn: str + :ivar hostname: Required. Name of Host. + :vartype hostname: str + :ivar is_seed_node: Required. Indicates if it is seed node. + :vartype is_seed_node: bool + :ivar node_version: Required. Version of Node. + :vartype node_version: str + :ivar error: Required. Describes the error. + :vartype error: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + 'error': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + 'error': {'key': 'Error', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword node_id: Required. Id of Node. + :paramtype node_id: str + :keyword upgrade_domain: Required. Upgrade domain of Node. + :paramtype upgrade_domain: str + :keyword fault_domain: Required. Fault domain of Node. + :paramtype fault_domain: str + :keyword ip_address_or_fqdn: Required. IP address or FQDN. + :paramtype ip_address_or_fqdn: str + :keyword hostname: Required. Name of Host. + :paramtype hostname: str + :keyword is_seed_node: Required. Indicates if it is seed node. + :paramtype is_seed_node: bool + :keyword node_version: Required. Version of Node. + :paramtype node_version: str + :keyword error: Required. Describes the error. + :paramtype error: str + """ + super(NodeOpenFailedEvent, self).__init__(**kwargs) + self.kind = 'NodeOpenFailed' # type: str + self.node_instance = kwargs['node_instance'] + self.node_id = kwargs['node_id'] + self.upgrade_domain = kwargs['upgrade_domain'] + self.fault_domain = kwargs['fault_domain'] + self.ip_address_or_fqdn = kwargs['ip_address_or_fqdn'] + self.hostname = kwargs['hostname'] + self.is_seed_node = kwargs['is_seed_node'] + self.node_version = kwargs['node_version'] + self.error = kwargs['error'] + + +class NodeOpenSucceededEvent(NodeEvent): + """Node Opened Succeeded event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar node_id: Required. Id of Node. + :vartype node_id: str + :ivar upgrade_domain: Required. Upgrade domain of Node. + :vartype upgrade_domain: str + :ivar fault_domain: Required. Fault domain of Node. + :vartype fault_domain: str + :ivar ip_address_or_fqdn: Required. IP address or FQDN. + :vartype ip_address_or_fqdn: str + :ivar hostname: Required. Name of Host. + :vartype hostname: str + :ivar is_seed_node: Required. Indicates if it is seed node. + :vartype is_seed_node: bool + :ivar node_version: Required. Version of Node. + :vartype node_version: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword node_id: Required. Id of Node. + :paramtype node_id: str + :keyword upgrade_domain: Required. Upgrade domain of Node. + :paramtype upgrade_domain: str + :keyword fault_domain: Required. Fault domain of Node. + :paramtype fault_domain: str + :keyword ip_address_or_fqdn: Required. IP address or FQDN. + :paramtype ip_address_or_fqdn: str + :keyword hostname: Required. Name of Host. + :paramtype hostname: str + :keyword is_seed_node: Required. Indicates if it is seed node. + :paramtype is_seed_node: bool + :keyword node_version: Required. Version of Node. + :paramtype node_version: str + """ + super(NodeOpenSucceededEvent, self).__init__(**kwargs) + self.kind = 'NodeOpenSucceeded' # type: str + self.node_instance = kwargs['node_instance'] + self.node_id = kwargs['node_id'] + self.upgrade_domain = kwargs['upgrade_domain'] + self.fault_domain = kwargs['fault_domain'] + self.ip_address_or_fqdn = kwargs['ip_address_or_fqdn'] + self.hostname = kwargs['hostname'] + self.is_seed_node = kwargs['is_seed_node'] + self.node_version = kwargs['node_version'] + + +class NodeRemovedFromClusterEvent(NodeEvent): + """Node Removed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_id: Required. Id of Node. + :vartype node_id: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar node_type: Required. Type of Node. + :vartype node_type: str + :ivar fabric_version: Required. Fabric version. + :vartype fabric_version: str + :ivar ip_address_or_fqdn: Required. IP address or FQDN. + :vartype ip_address_or_fqdn: str + :ivar node_capacities: Required. Capacities. + :vartype node_capacities: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'node_type': {'required': True}, + 'fabric_version': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'node_capacities': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_type': {'key': 'NodeType', 'type': 'str'}, + 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_id: Required. Id of Node. + :paramtype node_id: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword node_type: Required. Type of Node. + :paramtype node_type: str + :keyword fabric_version: Required. Fabric version. + :paramtype fabric_version: str + :keyword ip_address_or_fqdn: Required. IP address or FQDN. + :paramtype ip_address_or_fqdn: str + :keyword node_capacities: Required. Capacities. + :paramtype node_capacities: str + """ + super(NodeRemovedFromClusterEvent, self).__init__(**kwargs) + self.kind = 'NodeRemovedFromCluster' # type: str + self.node_id = kwargs['node_id'] + self.node_instance = kwargs['node_instance'] + self.node_type = kwargs['node_type'] + self.fabric_version = kwargs['fabric_version'] + self.ip_address_or_fqdn = kwargs['ip_address_or_fqdn'] + self.node_capacities = kwargs['node_capacities'] + + +class RepairImpactDescriptionBase(msrest.serialization.Model): + """Describes the expected impact of executing a repair task. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NodeRepairImpactDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of repair impact represented by the current object.Constant + filled by server. Possible values include: "Invalid", "Node". + :vartype kind: str or ~azure.servicefabric.models.RepairImpactKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Node': 'NodeRepairImpactDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(RepairImpactDescriptionBase, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class NodeRepairImpactDescription(RepairImpactDescriptionBase): + """Describes the expected impact of a repair on a set of nodes. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of repair impact represented by the current object.Constant + filled by server. Possible values include: "Invalid", "Node". + :vartype kind: str or ~azure.servicefabric.models.RepairImpactKind + :ivar node_impact_list: The list of nodes impacted by a repair action and their respective + expected impact. + :vartype node_impact_list: list[~azure.servicefabric.models.NodeImpact] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_impact_list': {'key': 'NodeImpactList', 'type': '[NodeImpact]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword node_impact_list: The list of nodes impacted by a repair action and their respective + expected impact. + :paramtype node_impact_list: list[~azure.servicefabric.models.NodeImpact] + """ + super(NodeRepairImpactDescription, self).__init__(**kwargs) + self.kind = 'Node' # type: str + self.node_impact_list = kwargs.get('node_impact_list', None) + + +class RepairTargetDescriptionBase(msrest.serialization.Model): + """Describes the entities targeted by a repair action. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NodeRepairTargetDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of repair target described by the current object.Constant filled + by server. Possible values include: "Invalid", "Node". + :vartype kind: str or ~azure.servicefabric.models.RepairTargetKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Node': 'NodeRepairTargetDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(RepairTargetDescriptionBase, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class NodeRepairTargetDescription(RepairTargetDescriptionBase): + """Describes the list of nodes targeted by a repair action. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of repair target described by the current object.Constant filled + by server. Possible values include: "Invalid", "Node". + :vartype kind: str or ~azure.servicefabric.models.RepairTargetKind + :ivar node_names: The list of nodes targeted by a repair action. + :vartype node_names: list[str] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_names': {'key': 'NodeNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword node_names: The list of nodes targeted by a repair action. + :paramtype node_names: list[str] + """ + super(NodeRepairTargetDescription, self).__init__(**kwargs) + self.kind = 'Node' # type: str + self.node_names = kwargs.get('node_names', None) + + +class NodeResult(msrest.serialization.Model): + """Contains information about a node that was targeted by a user-induced operation. + + :ivar node_name: The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance_id: The node instance id. + :vartype node_instance_id: str + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword node_name: The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance_id: The node instance id. + :paramtype node_instance_id: str + """ + super(NodeResult, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.node_instance_id = kwargs.get('node_instance_id', None) + + +class NodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for nodes, containing health evaluations for each unhealthy node that impacted current aggregated health state. Can be returned when evaluating cluster health and the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes from the + ClusterHealthPolicy. + :vartype max_percent_unhealthy_nodes: int + :ivar total_count: Total number of nodes found in the health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes from the + ClusterHealthPolicy. + :paramtype max_percent_unhealthy_nodes: int + :keyword total_count: Total number of nodes found in the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(NodesHealthEvaluation, self).__init__(**kwargs) + self.kind = 'Nodes' # type: str + self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class NodeTagsDescription(msrest.serialization.Model): + """Describes the tags required for placement or running of the service. + + All required parameters must be populated in order to send to Azure. + + :ivar count: Required. The number of tags. + :vartype count: int + :ivar tags: Required. A set of tags. Array of size specified by the ‘Count’ parameter, for the + placement tags of the service. + :vartype tags: list[str] + """ + + _validation = { + 'count': {'required': True}, + 'tags': {'required': True}, + } + + _attribute_map = { + 'count': {'key': 'Count', 'type': 'int'}, + 'tags': {'key': 'Tags', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword count: Required. The number of tags. + :paramtype count: int + :keyword tags: Required. A set of tags. Array of size specified by the ‘Count’ parameter, for + the placement tags of the service. + :paramtype tags: list[str] + """ + super(NodeTagsDescription, self).__init__(**kwargs) + self.count = kwargs['count'] + self.tags = kwargs['tags'] + + +class NodeTransitionProgress(msrest.serialization.Model): + """Information about an NodeTransition operation. This class contains an OperationState and a NodeTransitionResult. The NodeTransitionResult is not valid until OperationState +is Completed or Faulted. + + :ivar state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :vartype state: str or ~azure.servicefabric.models.OperationState + :ivar node_transition_result: Represents information about an operation in a terminal state + (Completed or Faulted). + :vartype node_transition_result: ~azure.servicefabric.models.NodeTransitionResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'node_transition_result': {'key': 'NodeTransitionResult', 'type': 'NodeTransitionResult'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :paramtype state: str or ~azure.servicefabric.models.OperationState + :keyword node_transition_result: Represents information about an operation in a terminal state + (Completed or Faulted). + :paramtype node_transition_result: ~azure.servicefabric.models.NodeTransitionResult + """ + super(NodeTransitionProgress, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.node_transition_result = kwargs.get('node_transition_result', None) + + +class NodeTransitionResult(msrest.serialization.Model): + """Represents information about an operation in a terminal state (Completed or Faulted). + + :ivar error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, + this is an error code indicating the reason. + :vartype error_code: int + :ivar node_result: Contains information about a node that was targeted by a user-induced + operation. + :vartype node_result: ~azure.servicefabric.models.NodeResult + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'node_result': {'key': 'NodeResult', 'type': 'NodeResult'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, + this is an error code indicating the reason. + :paramtype error_code: int + :keyword node_result: Contains information about a node that was targeted by a user-induced + operation. + :paramtype node_result: ~azure.servicefabric.models.NodeResult + """ + super(NodeTransitionResult, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.node_result = kwargs.get('node_result', None) + + +class NodeTypeHealthPolicyMapItem(msrest.serialization.Model): + """Defines an item in NodeTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :ivar key: Required. The key of the node type health policy map item. This is the name of the + node type. + :vartype key: str + :ivar value: Required. The value of the node type health policy map item. + If the percentage is respected but there is at least one unhealthy node in the node type, the + health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes over the total number + of nodes in the node type. + The computation rounds up to tolerate one failure on small numbers of nodes. + The max percent unhealthy nodes allowed for the node type. Must be between zero and 100. + :vartype value: int + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword key: Required. The key of the node type health policy map item. This is the name of + the node type. + :paramtype key: str + :keyword value: Required. The value of the node type health policy map item. + If the percentage is respected but there is at least one unhealthy node in the node type, the + health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes over the total number + of nodes in the node type. + The computation rounds up to tolerate one failure on small numbers of nodes. + The max percent unhealthy nodes allowed for the node type. Must be between zero and 100. + :paramtype value: int + """ + super(NodeTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = kwargs['key'] + self.value = kwargs['value'] + + +class NodeTypeNodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for nodes of a particular node type. The node type nodes evaluation can be returned when cluster health evaluation returns unhealthy aggregated health state, either Error or Warning. It contains health evaluations for each unhealthy node of the included node type that impacted current aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar node_type_name: The node type name as defined in the cluster manifest. + :vartype node_type_name: str + :ivar max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes for the node + type, specified as an entry in NodeTypeHealthPolicyMap. + :vartype max_percent_unhealthy_nodes: int + :ivar total_count: Total number of nodes of the node type found in the health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy NodeHealthEvaluation of this node type that impacted the + aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'node_type_name': {'key': 'NodeTypeName', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword node_type_name: The node type name as defined in the cluster manifest. + :paramtype node_type_name: str + :keyword max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes for the + node type, specified as an entry in NodeTypeHealthPolicyMap. + :paramtype max_percent_unhealthy_nodes: int + :keyword total_count: Total number of nodes of the node type found in the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy NodeHealthEvaluation of this node type that impacted the + aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(NodeTypeNodesHealthEvaluation, self).__init__(**kwargs) + self.kind = 'NodeTypeNodes' # type: str + self.node_type_name = kwargs.get('node_type_name', None) + self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class NodeUpEvent(NodeEvent): + """Node Up event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar last_node_down_at: Required. Time when Node was last down. + :vartype last_node_down_at: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'last_node_down_at': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'last_node_down_at': {'key': 'LastNodeDownAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword last_node_down_at: Required. Time when Node was last down. + :paramtype last_node_down_at: ~datetime.datetime + """ + super(NodeUpEvent, self).__init__(**kwargs) + self.kind = 'NodeUp' # type: str + self.node_instance = kwargs['node_instance'] + self.last_node_down_at = kwargs['last_node_down_at'] + + +class NodeUpgradeProgressInfo(msrest.serialization.Model): + """Information about the upgrading node and its status. + + :ivar node_name: The name of a Service Fabric node. + :vartype node_name: str + :ivar upgrade_phase: The state of the upgrading node. Possible values include: "Invalid", + "PreUpgradeSafetyCheck", "Upgrading", "PostUpgradeSafetyCheck". + :vartype upgrade_phase: str or ~azure.servicefabric.models.NodeUpgradePhase + :ivar pending_safety_checks: List of pending safety checks. + :vartype pending_safety_checks: list[~azure.servicefabric.models.SafetyCheckWrapper] + :ivar upgrade_duration: The estimated time spent processing the node since it was deactivated + during a node-by-node upgrade. + :vartype upgrade_duration: str + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'upgrade_phase': {'key': 'UpgradePhase', 'type': 'str'}, + 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, + 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword node_name: The name of a Service Fabric node. + :paramtype node_name: str + :keyword upgrade_phase: The state of the upgrading node. Possible values include: "Invalid", + "PreUpgradeSafetyCheck", "Upgrading", "PostUpgradeSafetyCheck". + :paramtype upgrade_phase: str or ~azure.servicefabric.models.NodeUpgradePhase + :keyword pending_safety_checks: List of pending safety checks. + :paramtype pending_safety_checks: list[~azure.servicefabric.models.SafetyCheckWrapper] + :keyword upgrade_duration: The estimated time spent processing the node since it was + deactivated during a node-by-node upgrade. + :paramtype upgrade_duration: str + """ + super(NodeUpgradeProgressInfo, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.upgrade_phase = kwargs.get('upgrade_phase', None) + self.pending_safety_checks = kwargs.get('pending_safety_checks', None) + self.upgrade_duration = kwargs.get('upgrade_duration', None) + + +class OperationStatus(msrest.serialization.Model): + """Contains the OperationId, OperationState, and OperationType for user-induced operations. + + :ivar operation_id: A GUID that identifies a call to this API. This is also passed into the + corresponding GetProgress API. + :vartype operation_id: str + :ivar state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :vartype state: str or ~azure.servicefabric.models.OperationState + :ivar type: The type of the operation. Possible values include: "Invalid", "PartitionDataLoss", + "PartitionQuorumLoss", "PartitionRestart", "NodeTransition". + :vartype type: str or ~azure.servicefabric.models.OperationType + """ + + _attribute_map = { + 'operation_id': {'key': 'OperationId', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + 'type': {'key': 'Type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword operation_id: A GUID that identifies a call to this API. This is also passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :paramtype state: str or ~azure.servicefabric.models.OperationState + :keyword type: The type of the operation. Possible values include: "Invalid", + "PartitionDataLoss", "PartitionQuorumLoss", "PartitionRestart", "NodeTransition". + :paramtype type: str or ~azure.servicefabric.models.OperationType + """ + super(OperationStatus, self).__init__(**kwargs) + self.operation_id = kwargs.get('operation_id', None) + self.state = kwargs.get('state', None) + self.type = kwargs.get('type', None) + + +class PackageSharingPolicyInfo(msrest.serialization.Model): + """Represents a policy for the package sharing. + + :ivar shared_package_name: The name of code, configuration or data package that should be + shared. + :vartype shared_package_name: str + :ivar package_sharing_scope: Represents the scope for PackageSharingPolicy. This is specified + during DeployServicePackageToNode operation. Possible values include: "None", "All", "Code", + "Config", "Data". + :vartype package_sharing_scope: str or ~azure.servicefabric.models.PackageSharingPolicyScope + """ + + _attribute_map = { + 'shared_package_name': {'key': 'SharedPackageName', 'type': 'str'}, + 'package_sharing_scope': {'key': 'PackageSharingScope', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword shared_package_name: The name of code, configuration or data package that should be + shared. + :paramtype shared_package_name: str + :keyword package_sharing_scope: Represents the scope for PackageSharingPolicy. This is + specified during DeployServicePackageToNode operation. Possible values include: "None", "All", + "Code", "Config", "Data". + :paramtype package_sharing_scope: str or ~azure.servicefabric.models.PackageSharingPolicyScope + """ + super(PackageSharingPolicyInfo, self).__init__(**kwargs) + self.shared_package_name = kwargs.get('shared_package_name', None) + self.package_sharing_scope = kwargs.get('package_sharing_scope', None) + + +class PagedApplicationInfoList(msrest.serialization.Model): + """The list of applications in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of application information. + :vartype items: list[~azure.servicefabric.models.ApplicationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of application information. + :paramtype items: list[~azure.servicefabric.models.ApplicationInfo] + """ + super(PagedApplicationInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedApplicationResourceDescriptionList(msrest.serialization.Model): + """The list of application resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: One page of the list. + :vartype items: list[~azure.servicefabric.models.ApplicationResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationResourceDescription]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: One page of the list. + :paramtype items: list[~azure.servicefabric.models.ApplicationResourceDescription] + """ + super(PagedApplicationResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedApplicationTypeInfoList(msrest.serialization.Model): + """The list of application types that are provisioned or being provisioned in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of application type information. + :vartype items: list[~azure.servicefabric.models.ApplicationTypeInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationTypeInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of application type information. + :paramtype items: list[~azure.servicefabric.models.ApplicationTypeInfo] + """ + super(PagedApplicationTypeInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedBackupConfigurationInfoList(msrest.serialization.Model): + """The list of backup configuration information. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of backup configuration information. + :vartype items: list[~azure.servicefabric.models.BackupConfigurationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupConfigurationInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of backup configuration information. + :paramtype items: list[~azure.servicefabric.models.BackupConfigurationInfo] + """ + super(PagedBackupConfigurationInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedBackupEntityList(msrest.serialization.Model): + """The list of backup entities that are being periodically backed. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of backup entity information. + :vartype items: list[~azure.servicefabric.models.BackupEntity] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupEntity]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of backup entity information. + :paramtype items: list[~azure.servicefabric.models.BackupEntity] + """ + super(PagedBackupEntityList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedBackupInfoList(msrest.serialization.Model): + """The list of backups. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of backup information. + :vartype items: list[~azure.servicefabric.models.BackupInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of backup information. + :paramtype items: list[~azure.servicefabric.models.BackupInfo] + """ + super(PagedBackupInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedBackupPolicyDescriptionList(msrest.serialization.Model): + """The list of backup policies configured in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: The list of backup policies information. + :vartype items: list[~azure.servicefabric.models.BackupPolicyDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupPolicyDescription]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: The list of backup policies information. + :paramtype items: list[~azure.servicefabric.models.BackupPolicyDescription] + """ + super(PagedBackupPolicyDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedComposeDeploymentStatusInfoList(msrest.serialization.Model): + """The list of compose deployments in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of compose deployment status information. + :vartype items: list[~azure.servicefabric.models.ComposeDeploymentStatusInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ComposeDeploymentStatusInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of compose deployment status information. + :paramtype items: list[~azure.servicefabric.models.ComposeDeploymentStatusInfo] + """ + super(PagedComposeDeploymentStatusInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedDeployedApplicationInfoList(msrest.serialization.Model): + """The list of deployed applications in activating, downloading, or active states on a node. +The list is paged when all of the results cannot fit in a single message. +The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of deployed application information. + :vartype items: list[~azure.servicefabric.models.DeployedApplicationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[DeployedApplicationInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of deployed application information. + :paramtype items: list[~azure.servicefabric.models.DeployedApplicationInfo] + """ + super(PagedDeployedApplicationInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedGatewayResourceDescriptionList(msrest.serialization.Model): + """The list of gateway resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: One page of the list. + :vartype items: list[~azure.servicefabric.models.GatewayResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[GatewayResourceDescription]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: One page of the list. + :paramtype items: list[~azure.servicefabric.models.GatewayResourceDescription] + """ + super(PagedGatewayResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedNetworkResourceDescriptionList(msrest.serialization.Model): + """The list of network resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: One page of the list. + :vartype items: list[~azure.servicefabric.models.NetworkResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[NetworkResourceDescription]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: One page of the list. + :paramtype items: list[~azure.servicefabric.models.NetworkResourceDescription] + """ + super(PagedNetworkResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedNodeInfoList(msrest.serialization.Model): + """The list of nodes in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of node information. + :vartype items: list[~azure.servicefabric.models.NodeInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[NodeInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of node information. + :paramtype items: list[~azure.servicefabric.models.NodeInfo] + """ + super(PagedNodeInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedPropertyInfoList(msrest.serialization.Model): + """The paged list of Service Fabric properties under a given name. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar is_consistent: Indicates whether any property under the given name has been modified + during the enumeration. If there was a modification, this property value is false. + :vartype is_consistent: bool + :ivar properties: List of property information. + :vartype properties: list[~azure.servicefabric.models.PropertyInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, + 'properties': {'key': 'Properties', 'type': '[PropertyInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword is_consistent: Indicates whether any property under the given name has been modified + during the enumeration. If there was a modification, this property value is false. + :paramtype is_consistent: bool + :keyword properties: List of property information. + :paramtype properties: list[~azure.servicefabric.models.PropertyInfo] + """ + super(PagedPropertyInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.is_consistent = kwargs.get('is_consistent', None) + self.properties = kwargs.get('properties', None) + + +class PagedReplicaInfoList(msrest.serialization.Model): + """The list of replicas in the cluster for a given partition. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of replica information. + :vartype items: list[~azure.servicefabric.models.ReplicaInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ReplicaInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of replica information. + :paramtype items: list[~azure.servicefabric.models.ReplicaInfo] + """ + super(PagedReplicaInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedSecretResourceDescriptionList(msrest.serialization.Model): + """The list of secret resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: One page of the list. + :vartype items: list[~azure.servicefabric.models.SecretResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[SecretResourceDescription]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: One page of the list. + :paramtype items: list[~azure.servicefabric.models.SecretResourceDescription] + """ + super(PagedSecretResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedSecretValueResourceDescriptionList(msrest.serialization.Model): + """The list of values of a secret resource, paged if the number of results exceeds the limits of a single message. The next set of results can be obtained by executing the same query with the continuation token provided in the previous page. + + :ivar 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. + :vartype continuation_token: str + :ivar items: One page of the list. + :vartype items: list[~azure.servicefabric.models.SecretValueResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[SecretValueResourceDescription]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: One page of the list. + :paramtype items: list[~azure.servicefabric.models.SecretValueResourceDescription] + """ + super(PagedSecretValueResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedServiceInfoList(msrest.serialization.Model): + """The list of services in the cluster for an application. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of service information. + :vartype items: list[~azure.servicefabric.models.ServiceInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of service information. + :paramtype items: list[~azure.servicefabric.models.ServiceInfo] + """ + super(PagedServiceInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedServicePartitionInfoList(msrest.serialization.Model): + """The list of partition in the cluster for a service. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of service partition information. + :vartype items: list[~azure.servicefabric.models.ServicePartitionInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServicePartitionInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of service partition information. + :paramtype items: list[~azure.servicefabric.models.ServicePartitionInfo] + """ + super(PagedServicePartitionInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedServiceReplicaDescriptionList(msrest.serialization.Model): + """The list of service resource replicas in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of service resource replica description. + :vartype items: list[~azure.servicefabric.models.ServiceReplicaDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceReplicaDescription]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of service resource replica description. + :paramtype items: list[~azure.servicefabric.models.ServiceReplicaDescription] + """ + super(PagedServiceReplicaDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedServiceResourceDescriptionList(msrest.serialization.Model): + """The list of service resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: One page of the list. + :vartype items: list[~azure.servicefabric.models.ServiceResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceResourceDescription]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: One page of the list. + :paramtype items: list[~azure.servicefabric.models.ServiceResourceDescription] + """ + super(PagedServiceResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedSubNameInfoList(msrest.serialization.Model): + """A paged list of Service Fabric names. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar is_consistent: Indicates whether any name under the given name has been modified during + the enumeration. If there was a modification, this property value is false. + :vartype is_consistent: bool + :ivar sub_names: List of the child names. + :vartype sub_names: list[str] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, + 'sub_names': {'key': 'SubNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword is_consistent: Indicates whether any name under the given name has been modified + during the enumeration. If there was a modification, this property value is false. + :paramtype is_consistent: bool + :keyword sub_names: List of the child names. + :paramtype sub_names: list[str] + """ + super(PagedSubNameInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.is_consistent = kwargs.get('is_consistent', None) + self.sub_names = kwargs.get('sub_names', None) + + +class PagedUpdatePartitionLoadResultList(msrest.serialization.Model): + """The list of results of the call UpdatePartitionLoad. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of partition load update information. + :vartype items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[UpdatePartitionLoadResult]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of partition load update information. + :paramtype items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] + """ + super(PagedUpdatePartitionLoadResultList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PagedVolumeResourceDescriptionList(msrest.serialization.Model): + """The list of volume resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: One page of the list. + :vartype items: list[~azure.servicefabric.models.VolumeResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[VolumeResourceDescription]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: One page of the list. + :paramtype items: list[~azure.servicefabric.models.VolumeResourceDescription] + """ + super(PagedVolumeResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + +class PartitionAnalysisEvent(PartitionEvent): + """Represents the base for all Partition Analysis Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionPrimaryMoveAnalysisEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar metadata: Required. Metadata about an Analysis Event. + :vartype metadata: ~azure.servicefabric.models.AnalysisEventMetadata + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'metadata': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, + } + + _subtype_map = { + 'kind': {'PartitionPrimaryMoveAnalysis': 'PartitionPrimaryMoveAnalysisEvent'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword metadata: Required. Metadata about an Analysis Event. + :paramtype metadata: ~azure.servicefabric.models.AnalysisEventMetadata + """ + super(PartitionAnalysisEvent, self).__init__(**kwargs) + self.kind = 'PartitionAnalysisEvent' # type: str + self.metadata = kwargs['metadata'] + + +class PartitionBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information, for a specific partition, specifying what backup policy is being applied and suspend description, if any. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The entity type of a Service Fabric entity such as Application, Service + or a Partition where periodic backups can be enabled.Constant filled by server. Possible values + include: "Invalid", "Partition", "Service", "Application". + :vartype kind: str or ~azure.servicefabric.models.BackupEntityKind + :ivar policy_name: The name of the backup policy which is applicable to this Service Fabric + application or service or partition. + :vartype policy_name: str + :ivar policy_inherited_from: Specifies the scope at which the backup policy is applied. + Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope + :ivar suspension_info: Describes the backup suspension details. + :vartype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :ivar service_name: The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar partition_id: The partition ID identifying the partition. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword policy_name: The name of the backup policy which is applicable to this Service Fabric + application or service or partition. + :paramtype policy_name: str + :keyword policy_inherited_from: Specifies the scope at which the backup policy is applied. + Possible values include: "Invalid", "Partition", "Service", "Application". + :paramtype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope + :keyword suspension_info: Describes the backup suspension details. + :paramtype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :keyword service_name: The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword partition_id: The partition ID identifying the partition. + :paramtype partition_id: str + """ + super(PartitionBackupConfigurationInfo, self).__init__(**kwargs) + self.kind = 'Partition' # type: str + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) + + +class PartitionBackupEntity(BackupEntity): + """Identifies the Service Fabric stateful partition which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_kind: Required. The entity type of a Service Fabric entity such as Application, + Service or a Partition where periodic backups can be enabled.Constant filled by server. + Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype entity_kind: str or ~azure.servicefabric.models.BackupEntityKind + :ivar service_name: The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar partition_id: The partition ID identifying the partition. + :vartype partition_id: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_name: The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword partition_id: The partition ID identifying the partition. + :paramtype partition_id: str + """ + super(PartitionBackupEntity, self).__init__(**kwargs) + self.entity_kind = 'Partition' # type: str + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) + + +class PartitionDataLossProgress(msrest.serialization.Model): + """Information about a partition data loss user-induced operation. + + :ivar state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :vartype state: str or ~azure.servicefabric.models.OperationState + :ivar invoke_data_loss_result: Represents information about an operation in a terminal state + (Completed or Faulted). + :vartype invoke_data_loss_result: ~azure.servicefabric.models.InvokeDataLossResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'invoke_data_loss_result': {'key': 'InvokeDataLossResult', 'type': 'InvokeDataLossResult'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :paramtype state: str or ~azure.servicefabric.models.OperationState + :keyword invoke_data_loss_result: Represents information about an operation in a terminal state + (Completed or Faulted). + :paramtype invoke_data_loss_result: ~azure.servicefabric.models.InvokeDataLossResult + """ + super(PartitionDataLossProgress, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.invoke_data_loss_result = kwargs.get('invoke_data_loss_result', None) + + +class PartitionHealth(EntityHealth): + """Information about the health of a Service Fabric partition. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar partition_id: ID of the partition whose health information is described by this object. + :vartype partition_id: str + :ivar replica_health_states: The list of replica health states associated with the partition. + :vartype replica_health_states: list[~azure.servicefabric.models.ReplicaHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_health_states': {'key': 'ReplicaHealthStates', 'type': '[ReplicaHealthState]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword partition_id: ID of the partition whose health information is described by this + object. + :paramtype partition_id: str + :keyword replica_health_states: The list of replica health states associated with the + partition. + :paramtype replica_health_states: list[~azure.servicefabric.models.ReplicaHealthState] + """ + super(PartitionHealth, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.replica_health_states = kwargs.get('replica_health_states', None) + + +class PartitionHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a partition, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar partition_id: Id of the partition whose health evaluation is described by this object. + :vartype partition_id: str + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated + health state of the partition. The types of the unhealthy evaluations can be + ReplicasHealthEvaluation or EventHealthEvaluation. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword partition_id: Id of the partition whose health evaluation is described by this object. + :paramtype partition_id: str + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current + aggregated health state of the partition. The types of the unhealthy evaluations can be + ReplicasHealthEvaluation or EventHealthEvaluation. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(PartitionHealthEvaluation, self).__init__(**kwargs) + self.kind = 'Partition' # type: str + self.partition_id = kwargs.get('partition_id', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class PartitionHealthReportExpiredEvent(PartitionEvent): + """Partition Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(PartitionHealthReportExpiredEvent, self).__init__(**kwargs) + self.kind = 'PartitionHealthReportExpired' # type: str + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class PartitionHealthState(EntityHealthState): + """Represents the health state of a partition, which contains the partition identifier and its aggregated health state. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar partition_id: Id of the partition whose health state is described by this object. + :vartype partition_id: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword partition_id: Id of the partition whose health state is described by this object. + :paramtype partition_id: str + """ + super(PartitionHealthState, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + + +class PartitionHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a partition, which contains the partition ID, its aggregated health state and any replicas that respect the filters in the cluster health chunk query description. + + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar partition_id: The Id of the partition. + :vartype partition_id: str + :ivar replica_health_state_chunks: The list of replica health state chunks belonging to the + partition that respect the filters in the cluster health chunk query description. + :vartype replica_health_state_chunks: ~azure.servicefabric.models.ReplicaHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_health_state_chunks': {'key': 'ReplicaHealthStateChunks', 'type': 'ReplicaHealthStateChunkList'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword partition_id: The Id of the partition. + :paramtype partition_id: str + :keyword replica_health_state_chunks: The list of replica health state chunks belonging to the + partition that respect the filters in the cluster health chunk query description. + :paramtype replica_health_state_chunks: ~azure.servicefabric.models.ReplicaHealthStateChunkList + """ + super(PartitionHealthStateChunk, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.replica_health_state_chunks = kwargs.get('replica_health_state_chunks', None) + + +class PartitionHealthStateChunkList(msrest.serialization.Model): + """The list of partition health state chunks that respect the input filters in the chunk query description. +Returned by get cluster health state chunks query as part of the parent application hierarchy. + + :ivar items: The list of partition health state chunks that respect the input filters in the + chunk query. + :vartype items: list[~azure.servicefabric.models.PartitionHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[PartitionHealthStateChunk]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword items: The list of partition health state chunks that respect the input filters in the + chunk query. + :paramtype items: list[~azure.servicefabric.models.PartitionHealthStateChunk] + """ + super(PartitionHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) + + +class PartitionHealthStateFilter(msrest.serialization.Model): + """Defines matching criteria to determine whether a partition should be included as a child of a service in the cluster health chunk. +The partitions are only returned if the parent entities match a filter specified in the cluster health chunk query description. The parent service and application must be included in the cluster health chunk. +One filter can match zero, one or multiple partitions, depending on its properties. + + :ivar partition_id_filter: ID of the partition that matches the filter. The filter is applied + only to the specified partition, if it exists. + If the partition doesn't exist, no partition is returned in the cluster health chunk based on + this filter. + If the partition exists, it is included in the cluster health chunk if it respects the other + filter properties. + If not specified, all partitions that match the parent filters (if any) are taken into + consideration and matched against the other filter members, like health state filter. + :vartype partition_id_filter: str + :ivar health_state_filter: The filter for the health state of the partitions. It allows + selecting partitions if they match the desired health states. + The possible values are integer value of one of the following health states. Only partitions + that match the filter are returned. All partitions are used to evaluate the cluster aggregated + health state. + If not specified, default value is None, unless the partition ID is specified. If the filter + has default value and partition ID is specified, the matching partition is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches partitions with HealthState value of OK + (2) and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :vartype health_state_filter: int + :ivar replica_filters: Defines a list of filters that specify which replicas to be included in + the returned cluster health chunk as children of the parent partition. The replicas are + returned only if the parent partition matches a filter. + If the list is empty, no replicas are returned. All the replicas are used to evaluate the + parent partition aggregated health state, regardless of the input filters. + The partition filter may specify multiple replica filters. + For example, it can specify a filter to return all replicas with health state Error and + another filter to always include a replica identified by its replica id. + :vartype replica_filters: list[~azure.servicefabric.models.ReplicaHealthStateFilter] + """ + + _attribute_map = { + 'partition_id_filter': {'key': 'PartitionIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'replica_filters': {'key': 'ReplicaFilters', 'type': '[ReplicaHealthStateFilter]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword partition_id_filter: ID of the partition that matches the filter. The filter is + applied only to the specified partition, if it exists. + If the partition doesn't exist, no partition is returned in the cluster health chunk based on + this filter. + If the partition exists, it is included in the cluster health chunk if it respects the other + filter properties. + If not specified, all partitions that match the parent filters (if any) are taken into + consideration and matched against the other filter members, like health state filter. + :paramtype partition_id_filter: str + :keyword health_state_filter: The filter for the health state of the partitions. It allows + selecting partitions if they match the desired health states. + The possible values are integer value of one of the following health states. Only partitions + that match the filter are returned. All partitions are used to evaluate the cluster aggregated + health state. + If not specified, default value is None, unless the partition ID is specified. If the filter + has default value and partition ID is specified, the matching partition is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches partitions with HealthState value of OK + (2) and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :paramtype health_state_filter: int + :keyword replica_filters: Defines a list of filters that specify which replicas to be included + in the returned cluster health chunk as children of the parent partition. The replicas are + returned only if the parent partition matches a filter. + If the list is empty, no replicas are returned. All the replicas are used to evaluate the + parent partition aggregated health state, regardless of the input filters. + The partition filter may specify multiple replica filters. + For example, it can specify a filter to return all replicas with health state Error and + another filter to always include a replica identified by its replica id. + :paramtype replica_filters: list[~azure.servicefabric.models.ReplicaHealthStateFilter] + """ + super(PartitionHealthStateFilter, self).__init__(**kwargs) + self.partition_id_filter = kwargs.get('partition_id_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) + self.replica_filters = kwargs.get('replica_filters', None) + + +class PartitionInstanceCountScaleMechanism(ScalingMechanismDescription): + """Represents a scaling mechanism for adding or removing instances of stateless service partition. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Specifies the kind of scaling mechanism.Constant filled by server. + Possible values include: "Invalid", "PartitionInstanceCount", + "AddRemoveIncrementalNamedPartition". + :vartype kind: str or ~azure.servicefabric.models.ScalingMechanismKind + :ivar min_instance_count: Required. Minimum number of instances of the partition. + :vartype min_instance_count: int + :ivar max_instance_count: Required. Maximum number of instances of the partition. + :vartype max_instance_count: int + :ivar scale_increment: Required. The number of instances to add or remove during a scaling + operation. + :vartype scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_instance_count': {'required': True}, + 'max_instance_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'max_instance_count': {'key': 'MaxInstanceCount', 'type': 'int'}, + 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword min_instance_count: Required. Minimum number of instances of the partition. + :paramtype min_instance_count: int + :keyword max_instance_count: Required. Maximum number of instances of the partition. + :paramtype max_instance_count: int + :keyword scale_increment: Required. The number of instances to add or remove during a scaling + operation. + :paramtype scale_increment: int + """ + super(PartitionInstanceCountScaleMechanism, self).__init__(**kwargs) + self.kind = 'PartitionInstanceCount' # type: str + self.min_instance_count = kwargs['min_instance_count'] + self.max_instance_count = kwargs['max_instance_count'] + self.scale_increment = kwargs['scale_increment'] + + +class PartitionLoadInformation(msrest.serialization.Model): + """Represents load information for a partition, which contains the primary, secondary and auxiliary reported load metrics. +In case there is no load reported, PartitionLoadInformation will contain the default load for the service of the partition. +For default loads, LoadMetricReport's LastReportedUtc is set to 0. + + :ivar partition_id: Id of the partition. + :vartype partition_id: str + :ivar primary_load_metric_reports: Array of load reports from the primary replica for this + partition. + :vartype primary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] + :ivar secondary_load_metric_reports: Array of aggregated load reports from all secondary + replicas for this partition. + Array only contains the latest reported load for each metric. + :vartype secondary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] + :ivar auxiliary_load_metric_reports: Array of aggregated load reports from all auxiliary + replicas for this partition. + Array only contains the latest reported load for each metric. + :vartype auxiliary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'primary_load_metric_reports': {'key': 'PrimaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + 'secondary_load_metric_reports': {'key': 'SecondaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + 'auxiliary_load_metric_reports': {'key': 'AuxiliaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword partition_id: Id of the partition. + :paramtype partition_id: str + :keyword primary_load_metric_reports: Array of load reports from the primary replica for this + partition. + :paramtype primary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] + :keyword secondary_load_metric_reports: Array of aggregated load reports from all secondary + replicas for this partition. + Array only contains the latest reported load for each metric. + :paramtype secondary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] + :keyword auxiliary_load_metric_reports: Array of aggregated load reports from all auxiliary + replicas for this partition. + Array only contains the latest reported load for each metric. + :paramtype auxiliary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] + """ + super(PartitionLoadInformation, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.primary_load_metric_reports = kwargs.get('primary_load_metric_reports', None) + self.secondary_load_metric_reports = kwargs.get('secondary_load_metric_reports', None) + self.auxiliary_load_metric_reports = kwargs.get('auxiliary_load_metric_reports', None) + + +class PartitionMetricLoadDescription(msrest.serialization.Model): + """Represents load information for a partition, which contains the metrics load information about primary, all secondary replicas/instances or a specific secondary replica/instance on a specific node , all auxiliary replicas or a specific auxiliary replica on a specific node. + + :ivar partition_id: Id of the partition. + :vartype partition_id: str + :ivar primary_replica_load_entries: Partition's load information for primary replica, in case + partition is from a stateful service. + :vartype primary_replica_load_entries: list[~azure.servicefabric.models.MetricLoadDescription] + :ivar secondary_replicas_or_instances_load_entries: Partition's load information for all + secondary replicas or instances. + :vartype secondary_replicas_or_instances_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :ivar secondary_replica_or_instance_load_entries_per_node: Partition's load information for a + specific secondary replica or instance located on a specific node. + :vartype secondary_replica_or_instance_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + :ivar auxiliary_replicas_load_entries: Partition's load information for all auxiliary replicas. + :vartype auxiliary_replicas_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :ivar auxiliary_replica_load_entries_per_node: Partition's load information for a specific + auxiliary replica located on a specific node. + :vartype auxiliary_replica_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'primary_replica_load_entries': {'key': 'PrimaryReplicaLoadEntries', 'type': '[MetricLoadDescription]'}, + 'secondary_replicas_or_instances_load_entries': {'key': 'SecondaryReplicasOrInstancesLoadEntries', 'type': '[MetricLoadDescription]'}, + 'secondary_replica_or_instance_load_entries_per_node': {'key': 'SecondaryReplicaOrInstanceLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, + 'auxiliary_replicas_load_entries': {'key': 'AuxiliaryReplicasLoadEntries', 'type': '[MetricLoadDescription]'}, + 'auxiliary_replica_load_entries_per_node': {'key': 'AuxiliaryReplicaLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword partition_id: Id of the partition. + :paramtype partition_id: str + :keyword primary_replica_load_entries: Partition's load information for primary replica, in + case partition is from a stateful service. + :paramtype primary_replica_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :keyword secondary_replicas_or_instances_load_entries: Partition's load information for all + secondary replicas or instances. + :paramtype secondary_replicas_or_instances_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :keyword secondary_replica_or_instance_load_entries_per_node: Partition's load information for + a specific secondary replica or instance located on a specific node. + :paramtype secondary_replica_or_instance_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + :keyword auxiliary_replicas_load_entries: Partition's load information for all auxiliary + replicas. + :paramtype auxiliary_replicas_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :keyword auxiliary_replica_load_entries_per_node: Partition's load information for a specific + auxiliary replica located on a specific node. + :paramtype auxiliary_replica_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + """ + super(PartitionMetricLoadDescription, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.primary_replica_load_entries = kwargs.get('primary_replica_load_entries', None) + self.secondary_replicas_or_instances_load_entries = kwargs.get('secondary_replicas_or_instances_load_entries', None) + self.secondary_replica_or_instance_load_entries_per_node = kwargs.get('secondary_replica_or_instance_load_entries_per_node', None) + self.auxiliary_replicas_load_entries = kwargs.get('auxiliary_replicas_load_entries', None) + self.auxiliary_replica_load_entries_per_node = kwargs.get('auxiliary_replica_load_entries_per_node', None) + + +class PartitionNewHealthReportEvent(PartitionEvent): + """Partition Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(PartitionNewHealthReportEvent, self).__init__(**kwargs) + self.kind = 'PartitionNewHealthReport' # type: str + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class PartitionPrimaryMoveAnalysisEvent(PartitionAnalysisEvent): + """Partition Primary Move Analysis event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar metadata: Required. Metadata about an Analysis Event. + :vartype metadata: ~azure.servicefabric.models.AnalysisEventMetadata + :ivar when_move_completed: Required. Time when the move was completed. + :vartype when_move_completed: ~datetime.datetime + :ivar previous_node: Required. The name of a Service Fabric node. + :vartype previous_node: str + :ivar current_node: Required. The name of a Service Fabric node. + :vartype current_node: str + :ivar move_reason: Required. Move reason. + :vartype move_reason: str + :ivar relevant_traces: Required. Relevant traces. + :vartype relevant_traces: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'metadata': {'required': True}, + 'when_move_completed': {'required': True}, + 'previous_node': {'required': True}, + 'current_node': {'required': True}, + 'move_reason': {'required': True}, + 'relevant_traces': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, + 'when_move_completed': {'key': 'WhenMoveCompleted', 'type': 'iso-8601'}, + 'previous_node': {'key': 'PreviousNode', 'type': 'str'}, + 'current_node': {'key': 'CurrentNode', 'type': 'str'}, + 'move_reason': {'key': 'MoveReason', 'type': 'str'}, + 'relevant_traces': {'key': 'RelevantTraces', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword metadata: Required. Metadata about an Analysis Event. + :paramtype metadata: ~azure.servicefabric.models.AnalysisEventMetadata + :keyword when_move_completed: Required. Time when the move was completed. + :paramtype when_move_completed: ~datetime.datetime + :keyword previous_node: Required. The name of a Service Fabric node. + :paramtype previous_node: str + :keyword current_node: Required. The name of a Service Fabric node. + :paramtype current_node: str + :keyword move_reason: Required. Move reason. + :paramtype move_reason: str + :keyword relevant_traces: Required. Relevant traces. + :paramtype relevant_traces: str + """ + super(PartitionPrimaryMoveAnalysisEvent, self).__init__(**kwargs) + self.kind = 'PartitionPrimaryMoveAnalysis' # type: str + self.when_move_completed = kwargs['when_move_completed'] + self.previous_node = kwargs['previous_node'] + self.current_node = kwargs['current_node'] + self.move_reason = kwargs['move_reason'] + self.relevant_traces = kwargs['relevant_traces'] + + +class PartitionQuorumLossProgress(msrest.serialization.Model): + """Information about a partition quorum loss user-induced operation. + + :ivar state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :vartype state: str or ~azure.servicefabric.models.OperationState + :ivar invoke_quorum_loss_result: Represents information about an operation in a terminal state + (Completed or Faulted). + :vartype invoke_quorum_loss_result: ~azure.servicefabric.models.InvokeQuorumLossResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'invoke_quorum_loss_result': {'key': 'InvokeQuorumLossResult', 'type': 'InvokeQuorumLossResult'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :paramtype state: str or ~azure.servicefabric.models.OperationState + :keyword invoke_quorum_loss_result: Represents information about an operation in a terminal + state (Completed or Faulted). + :paramtype invoke_quorum_loss_result: ~azure.servicefabric.models.InvokeQuorumLossResult + """ + super(PartitionQuorumLossProgress, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.invoke_quorum_loss_result = kwargs.get('invoke_quorum_loss_result', None) + + +class PartitionReconfiguredEvent(PartitionEvent): + """Partition Reconfiguration event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance_id: Required. Id of Node instance. + :vartype node_instance_id: str + :ivar service_type: Required. Type of Service. + :vartype service_type: str + :ivar cc_epoch_data_loss_version: Required. CcEpochDataLoss version. + :vartype cc_epoch_data_loss_version: long + :ivar cc_epoch_config_version: Required. CcEpochConfig version. + :vartype cc_epoch_config_version: long + :ivar reconfig_type: Required. Type of reconfiguration. + :vartype reconfig_type: str + :ivar result: Required. Describes reconfiguration result. + :vartype result: str + :ivar phase0_duration_ms: Required. Duration of Phase0 in milli-seconds. + :vartype phase0_duration_ms: float + :ivar phase1_duration_ms: Required. Duration of Phase1 in milli-seconds. + :vartype phase1_duration_ms: float + :ivar phase2_duration_ms: Required. Duration of Phase2 in milli-seconds. + :vartype phase2_duration_ms: float + :ivar phase3_duration_ms: Required. Duration of Phase3 in milli-seconds. + :vartype phase3_duration_ms: float + :ivar phase4_duration_ms: Required. Duration of Phase4 in milli-seconds. + :vartype phase4_duration_ms: float + :ivar total_duration_ms: Required. Total duration in milli-seconds. + :vartype total_duration_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'service_type': {'required': True}, + 'cc_epoch_data_loss_version': {'required': True}, + 'cc_epoch_config_version': {'required': True}, + 'reconfig_type': {'required': True}, + 'result': {'required': True}, + 'phase0_duration_ms': {'required': True}, + 'phase1_duration_ms': {'required': True}, + 'phase2_duration_ms': {'required': True}, + 'phase3_duration_ms': {'required': True}, + 'phase4_duration_ms': {'required': True}, + 'total_duration_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + 'service_type': {'key': 'ServiceType', 'type': 'str'}, + 'cc_epoch_data_loss_version': {'key': 'CcEpochDataLossVersion', 'type': 'long'}, + 'cc_epoch_config_version': {'key': 'CcEpochConfigVersion', 'type': 'long'}, + 'reconfig_type': {'key': 'ReconfigType', 'type': 'str'}, + 'result': {'key': 'Result', 'type': 'str'}, + 'phase0_duration_ms': {'key': 'Phase0DurationMs', 'type': 'float'}, + 'phase1_duration_ms': {'key': 'Phase1DurationMs', 'type': 'float'}, + 'phase2_duration_ms': {'key': 'Phase2DurationMs', 'type': 'float'}, + 'phase3_duration_ms': {'key': 'Phase3DurationMs', 'type': 'float'}, + 'phase4_duration_ms': {'key': 'Phase4DurationMs', 'type': 'float'}, + 'total_duration_ms': {'key': 'TotalDurationMs', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance_id: Required. Id of Node instance. + :paramtype node_instance_id: str + :keyword service_type: Required. Type of Service. + :paramtype service_type: str + :keyword cc_epoch_data_loss_version: Required. CcEpochDataLoss version. + :paramtype cc_epoch_data_loss_version: long + :keyword cc_epoch_config_version: Required. CcEpochConfig version. + :paramtype cc_epoch_config_version: long + :keyword reconfig_type: Required. Type of reconfiguration. + :paramtype reconfig_type: str + :keyword result: Required. Describes reconfiguration result. + :paramtype result: str + :keyword phase0_duration_ms: Required. Duration of Phase0 in milli-seconds. + :paramtype phase0_duration_ms: float + :keyword phase1_duration_ms: Required. Duration of Phase1 in milli-seconds. + :paramtype phase1_duration_ms: float + :keyword phase2_duration_ms: Required. Duration of Phase2 in milli-seconds. + :paramtype phase2_duration_ms: float + :keyword phase3_duration_ms: Required. Duration of Phase3 in milli-seconds. + :paramtype phase3_duration_ms: float + :keyword phase4_duration_ms: Required. Duration of Phase4 in milli-seconds. + :paramtype phase4_duration_ms: float + :keyword total_duration_ms: Required. Total duration in milli-seconds. + :paramtype total_duration_ms: float + """ + super(PartitionReconfiguredEvent, self).__init__(**kwargs) + self.kind = 'PartitionReconfigured' # type: str + self.node_name = kwargs['node_name'] + self.node_instance_id = kwargs['node_instance_id'] + self.service_type = kwargs['service_type'] + self.cc_epoch_data_loss_version = kwargs['cc_epoch_data_loss_version'] + self.cc_epoch_config_version = kwargs['cc_epoch_config_version'] + self.reconfig_type = kwargs['reconfig_type'] + self.result = kwargs['result'] + self.phase0_duration_ms = kwargs['phase0_duration_ms'] + self.phase1_duration_ms = kwargs['phase1_duration_ms'] + self.phase2_duration_ms = kwargs['phase2_duration_ms'] + self.phase3_duration_ms = kwargs['phase3_duration_ms'] + self.phase4_duration_ms = kwargs['phase4_duration_ms'] + self.total_duration_ms = kwargs['total_duration_ms'] + + +class PartitionRestartProgress(msrest.serialization.Model): + """Information about a partition restart user-induced operation. + + :ivar state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :vartype state: str or ~azure.servicefabric.models.OperationState + :ivar restart_partition_result: Represents information about an operation in a terminal state + (Completed or Faulted). + :vartype restart_partition_result: ~azure.servicefabric.models.RestartPartitionResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'restart_partition_result': {'key': 'RestartPartitionResult', 'type': 'RestartPartitionResult'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :paramtype state: str or ~azure.servicefabric.models.OperationState + :keyword restart_partition_result: Represents information about an operation in a terminal + state (Completed or Faulted). + :paramtype restart_partition_result: ~azure.servicefabric.models.RestartPartitionResult + """ + super(PartitionRestartProgress, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.restart_partition_result = kwargs.get('restart_partition_result', None) + + +class PartitionsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for the partitions of a service, containing health evaluations for each unhealthy partition that impacts current aggregated health state. Can be returned when evaluating service health and the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar max_percent_unhealthy_partitions_per_service: Maximum allowed percentage of unhealthy + partitions per service from the ServiceTypeHealthPolicy. + :vartype max_percent_unhealthy_partitions_per_service: int + :ivar total_count: Total number of partitions of the service from the health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy PartitionHealthEvaluation that impacted the aggregated + health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword max_percent_unhealthy_partitions_per_service: Maximum allowed percentage of unhealthy + partitions per service from the ServiceTypeHealthPolicy. + :paramtype max_percent_unhealthy_partitions_per_service: int + :keyword total_count: Total number of partitions of the service from the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy PartitionHealthEvaluation that impacted the aggregated + health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(PartitionsHealthEvaluation, self).__init__(**kwargs) + self.kind = 'Partitions' # type: str + self.max_percent_unhealthy_partitions_per_service = kwargs.get('max_percent_unhealthy_partitions_per_service', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class ReplicatorStatus(msrest.serialization.Model): + """Represents a base class for primary or secondary replicator status. +Contains information about the service fabric replicator like the replication/copy queue utilization, last acknowledgement received timestamp, etc. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PrimaryReplicatorStatus, SecondaryReplicatorStatus. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. + Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", + "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". + :vartype kind: str or ~azure.servicefabric.models.ReplicaRole + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Primary': 'PrimaryReplicatorStatus', 'SecondaryReplicatorStatus': 'SecondaryReplicatorStatus'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ReplicatorStatus, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class PrimaryReplicatorStatus(ReplicatorStatus): + """Provides statistics about the Service Fabric Replicator, when it is functioning in a Primary role. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. + Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", + "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". + :vartype kind: str or ~azure.servicefabric.models.ReplicaRole + :ivar replication_queue_status: Details about the replication queue on the primary replicator. + :vartype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :ivar remote_replicators: The status of all the active and idle secondary replicators that the + primary is aware of. + :vartype remote_replicators: list[~azure.servicefabric.models.RemoteReplicatorStatus] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'remote_replicators': {'key': 'RemoteReplicators', 'type': '[RemoteReplicatorStatus]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword replication_queue_status: Details about the replication queue on the primary + replicator. + :paramtype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :keyword remote_replicators: The status of all the active and idle secondary replicators that + the primary is aware of. + :paramtype remote_replicators: list[~azure.servicefabric.models.RemoteReplicatorStatus] + """ + super(PrimaryReplicatorStatus, self).__init__(**kwargs) + self.kind = 'Primary' # type: str + self.replication_queue_status = kwargs.get('replication_queue_status', None) + self.remote_replicators = kwargs.get('remote_replicators', None) + + +class Probe(msrest.serialization.Model): + """Probes have a number of fields that you can use to control their behavior. + + :ivar initial_delay_seconds: The initial delay in seconds to start executing probe once + codepackage has started. + :vartype initial_delay_seconds: int + :ivar period_seconds: Periodic seconds to execute probe. + :vartype period_seconds: int + :ivar timeout_seconds: Period after which probe is considered as failed if it hasn't completed + successfully. + :vartype timeout_seconds: int + :ivar success_threshold: The count of successful probe executions after which probe is + considered success. + :vartype success_threshold: int + :ivar failure_threshold: The count of failures after which probe is considered failed. + :vartype failure_threshold: int + :ivar exec_property: Exec command to run inside the container. + :vartype exec_property: ~azure.servicefabric.models.ProbeExec + :ivar http_get: Http probe for the container. + :vartype http_get: ~azure.servicefabric.models.ProbeHttpGet + :ivar tcp_socket: Tcp port to probe inside the container. + :vartype tcp_socket: ~azure.servicefabric.models.ProbeTcpSocket + """ + + _attribute_map = { + 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, + 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, + 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, + 'exec_property': {'key': 'exec', 'type': 'ProbeExec'}, + 'http_get': {'key': 'httpGet', 'type': 'ProbeHttpGet'}, + 'tcp_socket': {'key': 'tcpSocket', 'type': 'ProbeTcpSocket'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword initial_delay_seconds: The initial delay in seconds to start executing probe once + codepackage has started. + :paramtype initial_delay_seconds: int + :keyword period_seconds: Periodic seconds to execute probe. + :paramtype period_seconds: int + :keyword timeout_seconds: Period after which probe is considered as failed if it hasn't + completed successfully. + :paramtype timeout_seconds: int + :keyword success_threshold: The count of successful probe executions after which probe is + considered success. + :paramtype success_threshold: int + :keyword failure_threshold: The count of failures after which probe is considered failed. + :paramtype failure_threshold: int + :keyword exec_property: Exec command to run inside the container. + :paramtype exec_property: ~azure.servicefabric.models.ProbeExec + :keyword http_get: Http probe for the container. + :paramtype http_get: ~azure.servicefabric.models.ProbeHttpGet + :keyword tcp_socket: Tcp port to probe inside the container. + :paramtype tcp_socket: ~azure.servicefabric.models.ProbeTcpSocket + """ + super(Probe, self).__init__(**kwargs) + self.initial_delay_seconds = kwargs.get('initial_delay_seconds', 0) + self.period_seconds = kwargs.get('period_seconds', 10) + self.timeout_seconds = kwargs.get('timeout_seconds', 1) + self.success_threshold = kwargs.get('success_threshold', 1) + self.failure_threshold = kwargs.get('failure_threshold', 3) + self.exec_property = kwargs.get('exec_property', None) + self.http_get = kwargs.get('http_get', None) + self.tcp_socket = kwargs.get('tcp_socket', None) + + +class ProbeExec(msrest.serialization.Model): + """Exec command to run inside the container. + + All required parameters must be populated in order to send to Azure. + + :ivar command: Required. Comma separated command to run inside the container for example "sh, + -c, echo hello world". + :vartype command: str + """ + + _validation = { + 'command': {'required': True}, + } + + _attribute_map = { + 'command': {'key': 'command', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword command: Required. Comma separated command to run inside the container for example + "sh, -c, echo hello world". + :paramtype command: str + """ + super(ProbeExec, self).__init__(**kwargs) + self.command = kwargs['command'] + + +class ProbeHttpGet(msrest.serialization.Model): + """Http probe for the container. + + All required parameters must be populated in order to send to Azure. + + :ivar port: Required. Port to access for probe. + :vartype port: int + :ivar path: Path to access on the HTTP request. + :vartype path: str + :ivar host: Host IP to connect to. + :vartype host: str + :ivar http_headers: Headers to set in the request. + :vartype http_headers: list[~azure.servicefabric.models.ProbeHttpGetHeaders] + :ivar scheme: Scheme for the http probe. Can be Http or Https. Possible values include: "http", + "https". + :vartype scheme: str or ~azure.servicefabric.models.Scheme + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + 'path': {'key': 'path', 'type': 'str'}, + 'host': {'key': 'host', 'type': 'str'}, + 'http_headers': {'key': 'httpHeaders', 'type': '[ProbeHttpGetHeaders]'}, + 'scheme': {'key': 'scheme', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword port: Required. Port to access for probe. + :paramtype port: int + :keyword path: Path to access on the HTTP request. + :paramtype path: str + :keyword host: Host IP to connect to. + :paramtype host: str + :keyword http_headers: Headers to set in the request. + :paramtype http_headers: list[~azure.servicefabric.models.ProbeHttpGetHeaders] + :keyword scheme: Scheme for the http probe. Can be Http or Https. Possible values include: + "http", "https". + :paramtype scheme: str or ~azure.servicefabric.models.Scheme + """ + super(ProbeHttpGet, self).__init__(**kwargs) + self.port = kwargs['port'] + self.path = kwargs.get('path', None) + self.host = kwargs.get('host', None) + self.http_headers = kwargs.get('http_headers', None) + self.scheme = kwargs.get('scheme', None) + + +class ProbeHttpGetHeaders(msrest.serialization.Model): + """Http headers. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the header. + :vartype name: str + :ivar value: Required. The value of the header. + :vartype 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 + ): + """ + :keyword name: Required. The name of the header. + :paramtype name: str + :keyword value: Required. The value of the header. + :paramtype value: str + """ + super(ProbeHttpGetHeaders, self).__init__(**kwargs) + self.name = kwargs['name'] + self.value = kwargs['value'] + + +class ProbeTcpSocket(msrest.serialization.Model): + """Tcp port to probe inside the container. + + All required parameters must be populated in order to send to Azure. + + :ivar port: Required. Port to access for probe. + :vartype port: int + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword port: Required. Port to access for probe. + :paramtype port: int + """ + super(ProbeTcpSocket, self).__init__(**kwargs) + self.port = kwargs['port'] + + +class PropertyBatchDescriptionList(msrest.serialization.Model): + """Describes a list of property batch operations to be executed. Either all or none of the operations will be committed. + + :ivar operations: A list of the property batch operations to be executed. + :vartype operations: list[~azure.servicefabric.models.PropertyBatchOperation] + """ + + _attribute_map = { + 'operations': {'key': 'Operations', 'type': '[PropertyBatchOperation]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword operations: A list of the property batch operations to be executed. + :paramtype operations: list[~azure.servicefabric.models.PropertyBatchOperation] + """ + super(PropertyBatchDescriptionList, self).__init__(**kwargs) + self.operations = kwargs.get('operations', None) + + +class PropertyDescription(msrest.serialization.Model): + """Description of a Service Fabric property. + + All required parameters must be populated in order to send to Azure. + + :ivar property_name: Required. The name of the Service Fabric property. + :vartype property_name: str + :ivar 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. + :vartype custom_type_id: str + :ivar value: Required. Describes a Service Fabric property value. + :vartype value: ~azure.servicefabric.models.PropertyValue + """ + + _validation = { + 'property_name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword property_name: Required. The name of the Service Fabric property. + :paramtype property_name: str + :keyword 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. + :paramtype custom_type_id: str + :keyword value: Required. Describes a Service Fabric property value. + :paramtype value: ~azure.servicefabric.models.PropertyValue + """ + super(PropertyDescription, self).__init__(**kwargs) + self.property_name = kwargs['property_name'] + self.custom_type_id = kwargs.get('custom_type_id', None) + self.value = kwargs['value'] + + +class PropertyInfo(msrest.serialization.Model): + """Information about a Service Fabric property. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the Service Fabric property. + :vartype name: str + :ivar value: Describes a Service Fabric property value. + :vartype value: ~azure.servicefabric.models.PropertyValue + :ivar metadata: Required. The metadata associated with a property, including the property's + name. + :vartype metadata: ~azure.servicefabric.models.PropertyMetadata + """ + + _validation = { + 'name': {'required': True}, + 'metadata': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + 'metadata': {'key': 'Metadata', 'type': 'PropertyMetadata'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. The name of the Service Fabric property. + :paramtype name: str + :keyword value: Describes a Service Fabric property value. + :paramtype value: ~azure.servicefabric.models.PropertyValue + :keyword metadata: Required. The metadata associated with a property, including the property's + name. + :paramtype metadata: ~azure.servicefabric.models.PropertyMetadata + """ + super(PropertyInfo, self).__init__(**kwargs) + self.name = kwargs['name'] + self.value = kwargs.get('value', None) + self.metadata = kwargs['metadata'] + + +class PropertyMetadata(msrest.serialization.Model): + """The metadata associated with a property, including the property's name. + + :ivar type_id: The kind of property, determined by the type of data. Following are the possible + values. Possible values include: "Invalid", "Binary", "Int64", "Double", "String", "Guid". + :vartype type_id: str or ~azure.servicefabric.models.PropertyValueKind + :ivar custom_type_id: The property's custom type ID. + :vartype custom_type_id: str + :ivar parent: The name of the parent Service Fabric Name for the property. It could be thought + of as the name-space/table under which the property exists. + :vartype parent: str + :ivar size_in_bytes: The length of the serialized property value. + :vartype size_in_bytes: int + :ivar last_modified_utc_timestamp: Represents when the Property was last modified. Only write + operations will cause this field to be updated. + :vartype last_modified_utc_timestamp: ~datetime.datetime + :ivar sequence_number: The version of the property. Every time a property is modified, its + sequence number is increased. + :vartype sequence_number: str + """ + + _attribute_map = { + 'type_id': {'key': 'TypeId', 'type': 'str'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + 'parent': {'key': 'Parent', 'type': 'str'}, + 'size_in_bytes': {'key': 'SizeInBytes', 'type': 'int'}, + 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword type_id: The kind of property, determined by the type of data. Following are the + possible values. Possible values include: "Invalid", "Binary", "Int64", "Double", "String", + "Guid". + :paramtype type_id: str or ~azure.servicefabric.models.PropertyValueKind + :keyword custom_type_id: The property's custom type ID. + :paramtype custom_type_id: str + :keyword parent: The name of the parent Service Fabric Name for the property. It could be + thought of as the name-space/table under which the property exists. + :paramtype parent: str + :keyword size_in_bytes: The length of the serialized property value. + :paramtype size_in_bytes: int + :keyword last_modified_utc_timestamp: Represents when the Property was last modified. Only + write operations will cause this field to be updated. + :paramtype last_modified_utc_timestamp: ~datetime.datetime + :keyword sequence_number: The version of the property. Every time a property is modified, its + sequence number is increased. + :paramtype sequence_number: str + """ + super(PropertyMetadata, self).__init__(**kwargs) + self.type_id = kwargs.get('type_id', None) + self.custom_type_id = kwargs.get('custom_type_id', None) + self.parent = kwargs.get('parent', None) + self.size_in_bytes = kwargs.get('size_in_bytes', None) + self.last_modified_utc_timestamp = kwargs.get('last_modified_utc_timestamp', None) + self.sequence_number = kwargs.get('sequence_number', None) + + +class ProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): + """Describes the operation to register or provision an application type using an application package uploaded to the Service Fabric image store. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of application type registration or provision requested. The + application package can be registered or provisioned either from the image store or from an + external store. Following are the kinds of the application type provision.Constant filled by + server. Possible values include: "Invalid", "ImageStorePath", "ExternalStore". + :vartype kind: str or ~azure.servicefabric.models.ProvisionApplicationTypeKind + :ivar async_property: Required. Indicates whether or not provisioning should occur + asynchronously. When set to true, the provision operation returns when the request is accepted + by the system, and the provision operation continues without any timeout limit. The default + value is false. For large application packages, we recommend setting the value to true. + :vartype async_property: bool + :ivar application_type_build_path: Required. The relative path for the application package in + the image store specified during the prior upload operation. + :vartype application_type_build_path: str + :ivar application_package_cleanup_policy: The kind of action that needs to be taken for + cleaning up the application package after successful provision. Possible values include: + "Invalid", "Default", "Automatic", "Manual". + :vartype application_package_cleanup_policy: str or + ~azure.servicefabric.models.ApplicationPackageCleanupPolicy + """ + + _validation = { + 'kind': {'required': True}, + 'async_property': {'required': True}, + 'application_type_build_path': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'async_property': {'key': 'Async', 'type': 'bool'}, + 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, + 'application_package_cleanup_policy': {'key': 'ApplicationPackageCleanupPolicy', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword async_property: Required. Indicates whether or not provisioning should occur + asynchronously. When set to true, the provision operation returns when the request is accepted + by the system, and the provision operation continues without any timeout limit. The default + value is false. For large application packages, we recommend setting the value to true. + :paramtype async_property: bool + :keyword application_type_build_path: Required. The relative path for the application package + in the image store specified during the prior upload operation. + :paramtype application_type_build_path: str + :keyword application_package_cleanup_policy: The kind of action that needs to be taken for + cleaning up the application package after successful provision. Possible values include: + "Invalid", "Default", "Automatic", "Manual". + :paramtype application_package_cleanup_policy: str or + ~azure.servicefabric.models.ApplicationPackageCleanupPolicy + """ + super(ProvisionApplicationTypeDescription, self).__init__(**kwargs) + self.kind = 'ImageStorePath' # type: str + self.application_type_build_path = kwargs['application_type_build_path'] + self.application_package_cleanup_policy = kwargs.get('application_package_cleanup_policy', None) + + +class ProvisionFabricDescription(msrest.serialization.Model): + """Describes the parameters for provisioning a cluster. + + :ivar code_file_path: The cluster code package file path. + :vartype code_file_path: str + :ivar cluster_manifest_file_path: The cluster manifest file path. + :vartype cluster_manifest_file_path: str + """ + + _attribute_map = { + 'code_file_path': {'key': 'CodeFilePath', 'type': 'str'}, + 'cluster_manifest_file_path': {'key': 'ClusterManifestFilePath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code_file_path: The cluster code package file path. + :paramtype code_file_path: str + :keyword cluster_manifest_file_path: The cluster manifest file path. + :paramtype cluster_manifest_file_path: str + """ + super(ProvisionFabricDescription, self).__init__(**kwargs) + self.code_file_path = kwargs.get('code_file_path', None) + self.cluster_manifest_file_path = kwargs.get('cluster_manifest_file_path', None) + + +class PutPropertyBatchOperation(PropertyBatchOperation): + """Puts the specified property under the specified name. +Note that if one PropertyBatchOperation in a PropertyBatch fails, +the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch operation, determined by the operation to be + performed. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind + :ivar property_name: Required. The name of the Service Fabric property. + :vartype property_name: str + :ivar value: Required. Describes a Service Fabric property value. + :vartype value: ~azure.servicefabric.models.PropertyValue + :ivar 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. + :vartype custom_type_id: str + """ + + _validation = { + 'kind': {'required': True}, + 'property_name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword property_name: Required. The name of the Service Fabric property. + :paramtype property_name: str + :keyword value: Required. Describes a Service Fabric property value. + :paramtype value: ~azure.servicefabric.models.PropertyValue + :keyword 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. + :paramtype custom_type_id: str + """ + super(PutPropertyBatchOperation, self).__init__(**kwargs) + self.kind = 'Put' # type: str + self.value = kwargs['value'] + self.custom_type_id = kwargs.get('custom_type_id', None) + + +class ReconfigurationInformation(msrest.serialization.Model): + """Information about current reconfiguration like phase, type, previous configuration role of replica and reconfiguration start date time. + + :ivar previous_configuration_role: Replica role before reconfiguration started. Possible values + include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", + "ActiveAuxiliary", "PrimaryAuxiliary". + :vartype previous_configuration_role: str or ~azure.servicefabric.models.ReplicaRole + :ivar reconfiguration_phase: Current phase of ongoing reconfiguration. If no reconfiguration is + taking place then this value will be "None". Possible values include: "Unknown", "None", + "Phase0", "Phase1", "Phase2", "Phase3", "Phase4", "AbortPhaseZero". + :vartype reconfiguration_phase: str or ~azure.servicefabric.models.ReconfigurationPhase + :ivar reconfiguration_type: Type of current ongoing reconfiguration. If no reconfiguration is + taking place then this value will be "None". Possible values include: "Unknown", "SwapPrimary", + "Failover", "Other". + :vartype reconfiguration_type: str or ~azure.servicefabric.models.ReconfigurationType + :ivar reconfiguration_start_time_utc: Start time (in UTC) of the ongoing reconfiguration. If no + reconfiguration is taking place then this value will be zero date-time. + :vartype reconfiguration_start_time_utc: ~datetime.datetime + """ + + _attribute_map = { + 'previous_configuration_role': {'key': 'PreviousConfigurationRole', 'type': 'str'}, + 'reconfiguration_phase': {'key': 'ReconfigurationPhase', 'type': 'str'}, + 'reconfiguration_type': {'key': 'ReconfigurationType', 'type': 'str'}, + 'reconfiguration_start_time_utc': {'key': 'ReconfigurationStartTimeUtc', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword previous_configuration_role: Replica role before reconfiguration started. Possible + values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", + "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". + :paramtype previous_configuration_role: str or ~azure.servicefabric.models.ReplicaRole + :keyword reconfiguration_phase: Current phase of ongoing reconfiguration. If no reconfiguration + is taking place then this value will be "None". Possible values include: "Unknown", "None", + "Phase0", "Phase1", "Phase2", "Phase3", "Phase4", "AbortPhaseZero". + :paramtype reconfiguration_phase: str or ~azure.servicefabric.models.ReconfigurationPhase + :keyword reconfiguration_type: Type of current ongoing reconfiguration. If no reconfiguration + is taking place then this value will be "None". Possible values include: "Unknown", + "SwapPrimary", "Failover", "Other". + :paramtype reconfiguration_type: str or ~azure.servicefabric.models.ReconfigurationType + :keyword reconfiguration_start_time_utc: Start time (in UTC) of the ongoing reconfiguration. If + no reconfiguration is taking place then this value will be zero date-time. + :paramtype reconfiguration_start_time_utc: ~datetime.datetime + """ + super(ReconfigurationInformation, self).__init__(**kwargs) + self.previous_configuration_role = kwargs.get('previous_configuration_role', None) + self.reconfiguration_phase = kwargs.get('reconfiguration_phase', None) + self.reconfiguration_type = kwargs.get('reconfiguration_type', None) + self.reconfiguration_start_time_utc = kwargs.get('reconfiguration_start_time_utc', None) + + +class RegistryCredential(msrest.serialization.Model): + """Credential information to connect to container registry. + + :ivar registry_user_name: The user name to connect to container registry. + :vartype registry_user_name: str + :ivar registry_password: The password for supplied username to connect to container registry. + :vartype registry_password: str + :ivar password_encrypted: Indicates that supplied container registry password is encrypted. + :vartype password_encrypted: bool + """ + + _attribute_map = { + 'registry_user_name': {'key': 'RegistryUserName', 'type': 'str'}, + 'registry_password': {'key': 'RegistryPassword', 'type': 'str'}, + 'password_encrypted': {'key': 'PasswordEncrypted', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword registry_user_name: The user name to connect to container registry. + :paramtype registry_user_name: str + :keyword registry_password: The password for supplied username to connect to container + registry. + :paramtype registry_password: str + :keyword password_encrypted: Indicates that supplied container registry password is encrypted. + :paramtype password_encrypted: bool + """ + super(RegistryCredential, self).__init__(**kwargs) + self.registry_user_name = kwargs.get('registry_user_name', None) + self.registry_password = kwargs.get('registry_password', None) + self.password_encrypted = kwargs.get('password_encrypted', None) + + +class ReliableCollectionsRef(msrest.serialization.Model): + """Specifying this parameter adds support for reliable collections. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of ReliableCollection resource. Right now it's not used and you can + use any string. + :vartype name: str + :ivar do_not_persist_state: False (the default) if ReliableCollections state is persisted to + disk as usual. True if you do not want to persist state, in which case replication is still + enabled and you can use ReliableCollections as distributed cache. + :vartype do_not_persist_state: bool + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'do_not_persist_state': {'key': 'doNotPersistState', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. Name of ReliableCollection resource. Right now it's not used and you + can use any string. + :paramtype name: str + :keyword do_not_persist_state: False (the default) if ReliableCollections state is persisted to + disk as usual. True if you do not want to persist state, in which case replication is still + enabled and you can use ReliableCollections as distributed cache. + :paramtype do_not_persist_state: bool + """ + super(ReliableCollectionsRef, self).__init__(**kwargs) + self.name = kwargs['name'] + self.do_not_persist_state = kwargs.get('do_not_persist_state', None) + + +class RemoteReplicatorAcknowledgementDetail(msrest.serialization.Model): + """Provides various statistics of the acknowledgements that are being received from the remote replicator. + + :ivar average_receive_duration: Represents the average duration it takes for the remote + replicator to receive an operation. + :vartype average_receive_duration: str + :ivar average_apply_duration: Represents the average duration it takes for the remote + replicator to apply an operation. This usually entails writing the operation to disk. + :vartype average_apply_duration: str + :ivar not_received_count: Represents the number of operations not yet received by a remote + replicator. + :vartype not_received_count: str + :ivar received_and_not_applied_count: Represents the number of operations received and not yet + applied by a remote replicator. + :vartype received_and_not_applied_count: str + """ + + _attribute_map = { + 'average_receive_duration': {'key': 'AverageReceiveDuration', 'type': 'str'}, + 'average_apply_duration': {'key': 'AverageApplyDuration', 'type': 'str'}, + 'not_received_count': {'key': 'NotReceivedCount', 'type': 'str'}, + 'received_and_not_applied_count': {'key': 'ReceivedAndNotAppliedCount', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword average_receive_duration: Represents the average duration it takes for the remote + replicator to receive an operation. + :paramtype average_receive_duration: str + :keyword average_apply_duration: Represents the average duration it takes for the remote + replicator to apply an operation. This usually entails writing the operation to disk. + :paramtype average_apply_duration: str + :keyword not_received_count: Represents the number of operations not yet received by a remote + replicator. + :paramtype not_received_count: str + :keyword received_and_not_applied_count: Represents the number of operations received and not + yet applied by a remote replicator. + :paramtype received_and_not_applied_count: str + """ + super(RemoteReplicatorAcknowledgementDetail, self).__init__(**kwargs) + self.average_receive_duration = kwargs.get('average_receive_duration', None) + self.average_apply_duration = kwargs.get('average_apply_duration', None) + self.not_received_count = kwargs.get('not_received_count', None) + self.received_and_not_applied_count = kwargs.get('received_and_not_applied_count', None) + + +class RemoteReplicatorAcknowledgementStatus(msrest.serialization.Model): + """Provides details about the remote replicators from the primary replicator's point of view. + + :ivar replication_stream_acknowledgement_detail: Details about the acknowledgements for + operations that are part of the replication stream data. + :vartype replication_stream_acknowledgement_detail: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail + :ivar copy_stream_acknowledgement_detail: Details about the acknowledgements for operations + that are part of the copy stream data. + :vartype copy_stream_acknowledgement_detail: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail + """ + + _attribute_map = { + 'replication_stream_acknowledgement_detail': {'key': 'ReplicationStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, + 'copy_stream_acknowledgement_detail': {'key': 'CopyStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword replication_stream_acknowledgement_detail: Details about the acknowledgements for + operations that are part of the replication stream data. + :paramtype replication_stream_acknowledgement_detail: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail + :keyword copy_stream_acknowledgement_detail: Details about the acknowledgements for operations + that are part of the copy stream data. + :paramtype copy_stream_acknowledgement_detail: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail + """ + super(RemoteReplicatorAcknowledgementStatus, self).__init__(**kwargs) + self.replication_stream_acknowledgement_detail = kwargs.get('replication_stream_acknowledgement_detail', None) + self.copy_stream_acknowledgement_detail = kwargs.get('copy_stream_acknowledgement_detail', None) + + +class RemoteReplicatorStatus(msrest.serialization.Model): + """Represents the state of the secondary replicator from the primary replicator’s point of view. + + :ivar replica_id: Represents the replica ID of the remote secondary replicator. + :vartype replica_id: str + :ivar last_acknowledgement_processed_time_utc: The last timestamp (in UTC) when an + acknowledgement from the secondary replicator was processed on the primary. + UTC 0 represents an invalid value, indicating that no acknowledgement messages were ever + processed. + :vartype last_acknowledgement_processed_time_utc: ~datetime.datetime + :ivar last_received_replication_sequence_number: The highest replication operation sequence + number that the secondary has received from the primary. + :vartype last_received_replication_sequence_number: str + :ivar last_applied_replication_sequence_number: The highest replication operation sequence + number that the secondary has applied to its state. + :vartype last_applied_replication_sequence_number: str + :ivar is_in_build: A value that indicates whether the secondary replica is in the process of + being built. + :vartype is_in_build: bool + :ivar last_received_copy_sequence_number: The highest copy operation sequence number that the + secondary has received from the primary. + A value of -1 implies that the secondary has received all copy operations. + :vartype last_received_copy_sequence_number: str + :ivar last_applied_copy_sequence_number: The highest copy operation sequence number that the + secondary has applied to its state. + A value of -1 implies that the secondary has applied all copy operations and the copy process + is complete. + :vartype last_applied_copy_sequence_number: str + :ivar remote_replicator_acknowledgement_status: Represents the acknowledgment status for the + remote secondary replicator. + :vartype remote_replicator_acknowledgement_status: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementStatus + """ + + _attribute_map = { + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'last_acknowledgement_processed_time_utc': {'key': 'LastAcknowledgementProcessedTimeUtc', 'type': 'iso-8601'}, + 'last_received_replication_sequence_number': {'key': 'LastReceivedReplicationSequenceNumber', 'type': 'str'}, + 'last_applied_replication_sequence_number': {'key': 'LastAppliedReplicationSequenceNumber', 'type': 'str'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'last_received_copy_sequence_number': {'key': 'LastReceivedCopySequenceNumber', 'type': 'str'}, + 'last_applied_copy_sequence_number': {'key': 'LastAppliedCopySequenceNumber', 'type': 'str'}, + 'remote_replicator_acknowledgement_status': {'key': 'RemoteReplicatorAcknowledgementStatus', 'type': 'RemoteReplicatorAcknowledgementStatus'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword replica_id: Represents the replica ID of the remote secondary replicator. + :paramtype replica_id: str + :keyword last_acknowledgement_processed_time_utc: The last timestamp (in UTC) when an + acknowledgement from the secondary replicator was processed on the primary. + UTC 0 represents an invalid value, indicating that no acknowledgement messages were ever + processed. + :paramtype last_acknowledgement_processed_time_utc: ~datetime.datetime + :keyword last_received_replication_sequence_number: The highest replication operation sequence + number that the secondary has received from the primary. + :paramtype last_received_replication_sequence_number: str + :keyword last_applied_replication_sequence_number: The highest replication operation sequence + number that the secondary has applied to its state. + :paramtype last_applied_replication_sequence_number: str + :keyword is_in_build: A value that indicates whether the secondary replica is in the process of + being built. + :paramtype is_in_build: bool + :keyword last_received_copy_sequence_number: The highest copy operation sequence number that + the secondary has received from the primary. + A value of -1 implies that the secondary has received all copy operations. + :paramtype last_received_copy_sequence_number: str + :keyword last_applied_copy_sequence_number: The highest copy operation sequence number that the + secondary has applied to its state. + A value of -1 implies that the secondary has applied all copy operations and the copy process + is complete. + :paramtype last_applied_copy_sequence_number: str + :keyword remote_replicator_acknowledgement_status: Represents the acknowledgment status for the + remote secondary replicator. + :paramtype remote_replicator_acknowledgement_status: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementStatus + """ + super(RemoteReplicatorStatus, self).__init__(**kwargs) + self.replica_id = kwargs.get('replica_id', None) + self.last_acknowledgement_processed_time_utc = kwargs.get('last_acknowledgement_processed_time_utc', None) + self.last_received_replication_sequence_number = kwargs.get('last_received_replication_sequence_number', None) + self.last_applied_replication_sequence_number = kwargs.get('last_applied_replication_sequence_number', None) + self.is_in_build = kwargs.get('is_in_build', None) + self.last_received_copy_sequence_number = kwargs.get('last_received_copy_sequence_number', None) + self.last_applied_copy_sequence_number = kwargs.get('last_applied_copy_sequence_number', None) + self.remote_replicator_acknowledgement_status = kwargs.get('remote_replicator_acknowledgement_status', None) + + +class RepairTask(msrest.serialization.Model): + """Represents a repair task, which includes information about what kind of repair was requested, what its progress is, and what its final result was. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar task_id: Required. The ID of the repair task. + :vartype task_id: str + :ivar version: The version of the repair task. + When creating a new repair task, the version must be set to zero. When updating a repair + task, + the version is used for optimistic concurrency checks. If the version is + set to zero, the update will not check for write conflicts. If the version is set to a + non-zero value, then the + update will only succeed if the actual current version of the repair task matches this value. + :vartype version: str + :ivar description: A description of the purpose of the repair task, or other informational + details. + May be set when the repair task is created, and is immutable once set. + :vartype description: str + :ivar state: Required. The workflow state of the repair task. Valid initial states are Created, + Claimed, and Preparing. Possible values include: "Invalid", "Created", "Claimed", "Preparing", + "Approved", "Executing", "Restoring", "Completed". + :vartype state: str or ~azure.servicefabric.models.State + :ivar flags: A bitwise-OR of the following values, which gives additional details about the + status of the repair task. + + + * 1 - Cancellation of the repair has been requested + * 2 - Abort of the repair has been requested + * 4 - Approval of the repair was forced via client request. + :vartype flags: int + :ivar action: Required. The requested repair action. Must be specified when the repair task is + created, and is immutable once set. + :vartype action: str + :ivar target: The target object determines what actions the system will take to prepare for the + impact of the repair, prior to approving execution of the repair. + May be set when the repair task is created, and is immutable once set. + :vartype target: ~azure.servicefabric.models.RepairTargetDescriptionBase + :ivar executor: The name of the repair executor. Must be specified in Claimed and later states, + and is immutable once set. + :vartype executor: str + :ivar executor_data: A data string that the repair executor can use to store its internal + state. + :vartype executor_data: str + :ivar impact: The impact object determines what actions the system will take to prepare for the + impact of the repair, prior to approving execution of the repair. + Impact must be specified by the repair executor when transitioning to the Preparing state, and + is immutable once set. + :vartype impact: ~azure.servicefabric.models.RepairImpactDescriptionBase + :ivar result_status: A value describing the overall result of the repair task execution. Must + be specified in the Restoring and later states, and is immutable once set. Possible values + include: "Invalid", "Succeeded", "Cancelled", "Interrupted", "Failed", "Pending". + :vartype result_status: str or ~azure.servicefabric.models.ResultStatus + :ivar result_code: A numeric value providing additional details about the result of the repair + task execution. + May be specified in the Restoring and later states, and is immutable once set. + :vartype result_code: int + :ivar result_details: A string providing additional details about the result of the repair task + execution. + May be specified in the Restoring and later states, and is immutable once set. + :vartype result_details: str + :ivar history: An object that contains timestamps of the repair task's state transitions. + These timestamps are updated by the system, and cannot be directly modified. + :vartype history: ~azure.servicefabric.models.RepairTaskHistory + :ivar preparing_health_check_state: The workflow state of the health check when the repair task + is in the Preparing state. Possible values include: "NotStarted", "InProgress", "Succeeded", + "Skipped", "TimedOut". + :vartype preparing_health_check_state: str or + ~azure.servicefabric.models.RepairTaskHealthCheckState + :ivar restoring_health_check_state: The workflow state of the health check when the repair task + is in the Restoring state. Possible values include: "NotStarted", "InProgress", "Succeeded", + "Skipped", "TimedOut". + :vartype restoring_health_check_state: str or + ~azure.servicefabric.models.RepairTaskHealthCheckState + :ivar perform_preparing_health_check: A value to determine if health checks will be performed + when the repair task enters the Preparing state. + :vartype perform_preparing_health_check: bool + :ivar perform_restoring_health_check: A value to determine if health checks will be performed + when the repair task enters the Restoring state. + :vartype perform_restoring_health_check: bool + """ + + _validation = { + 'task_id': {'required': True}, + 'state': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'action': {'key': 'Action', 'type': 'str'}, + 'target': {'key': 'Target', 'type': 'RepairTargetDescriptionBase'}, + 'executor': {'key': 'Executor', 'type': 'str'}, + 'executor_data': {'key': 'ExecutorData', 'type': 'str'}, + 'impact': {'key': 'Impact', 'type': 'RepairImpactDescriptionBase'}, + 'result_status': {'key': 'ResultStatus', 'type': 'str'}, + 'result_code': {'key': 'ResultCode', 'type': 'int'}, + 'result_details': {'key': 'ResultDetails', 'type': 'str'}, + 'history': {'key': 'History', 'type': 'RepairTaskHistory'}, + 'preparing_health_check_state': {'key': 'PreparingHealthCheckState', 'type': 'str'}, + 'restoring_health_check_state': {'key': 'RestoringHealthCheckState', 'type': 'str'}, + 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, + 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword task_id: Required. The ID of the repair task. + :paramtype task_id: str + :keyword version: The version of the repair task. + When creating a new repair task, the version must be set to zero. When updating a repair + task, + the version is used for optimistic concurrency checks. If the version is + set to zero, the update will not check for write conflicts. If the version is set to a + non-zero value, then the + update will only succeed if the actual current version of the repair task matches this value. + :paramtype version: str + :keyword description: A description of the purpose of the repair task, or other informational + details. + May be set when the repair task is created, and is immutable once set. + :paramtype description: str + :keyword state: Required. The workflow state of the repair task. Valid initial states are + Created, Claimed, and Preparing. Possible values include: "Invalid", "Created", "Claimed", + "Preparing", "Approved", "Executing", "Restoring", "Completed". + :paramtype state: str or ~azure.servicefabric.models.State + :keyword flags: A bitwise-OR of the following values, which gives additional details about the + status of the repair task. + + + * 1 - Cancellation of the repair has been requested + * 2 - Abort of the repair has been requested + * 4 - Approval of the repair was forced via client request. + :paramtype flags: int + :keyword action: Required. The requested repair action. Must be specified when the repair task + is created, and is immutable once set. + :paramtype action: str + :keyword target: The target object determines what actions the system will take to prepare for + the impact of the repair, prior to approving execution of the repair. + May be set when the repair task is created, and is immutable once set. + :paramtype target: ~azure.servicefabric.models.RepairTargetDescriptionBase + :keyword executor: The name of the repair executor. Must be specified in Claimed and later + states, and is immutable once set. + :paramtype executor: str + :keyword executor_data: A data string that the repair executor can use to store its internal + state. + :paramtype executor_data: str + :keyword impact: The impact object determines what actions the system will take to prepare for + the impact of the repair, prior to approving execution of the repair. + Impact must be specified by the repair executor when transitioning to the Preparing state, and + is immutable once set. + :paramtype impact: ~azure.servicefabric.models.RepairImpactDescriptionBase + :keyword result_status: A value describing the overall result of the repair task execution. + Must be specified in the Restoring and later states, and is immutable once set. Possible values + include: "Invalid", "Succeeded", "Cancelled", "Interrupted", "Failed", "Pending". + :paramtype result_status: str or ~azure.servicefabric.models.ResultStatus + :keyword result_code: A numeric value providing additional details about the result of the + repair task execution. + May be specified in the Restoring and later states, and is immutable once set. + :paramtype result_code: int + :keyword result_details: A string providing additional details about the result of the repair + task execution. + May be specified in the Restoring and later states, and is immutable once set. + :paramtype result_details: str + :keyword history: An object that contains timestamps of the repair task's state transitions. + These timestamps are updated by the system, and cannot be directly modified. + :paramtype history: ~azure.servicefabric.models.RepairTaskHistory + :keyword preparing_health_check_state: The workflow state of the health check when the repair + task is in the Preparing state. Possible values include: "NotStarted", "InProgress", + "Succeeded", "Skipped", "TimedOut". + :paramtype preparing_health_check_state: str or + ~azure.servicefabric.models.RepairTaskHealthCheckState + :keyword restoring_health_check_state: The workflow state of the health check when the repair + task is in the Restoring state. Possible values include: "NotStarted", "InProgress", + "Succeeded", "Skipped", "TimedOut". + :paramtype restoring_health_check_state: str or + ~azure.servicefabric.models.RepairTaskHealthCheckState + :keyword perform_preparing_health_check: A value to determine if health checks will be + performed when the repair task enters the Preparing state. + :paramtype perform_preparing_health_check: bool + :keyword perform_restoring_health_check: A value to determine if health checks will be + performed when the repair task enters the Restoring state. + :paramtype perform_restoring_health_check: bool + """ + super(RepairTask, self).__init__(**kwargs) + self.task_id = kwargs['task_id'] + self.version = kwargs.get('version', None) + self.description = kwargs.get('description', None) + self.state = kwargs['state'] + self.flags = kwargs.get('flags', None) + self.action = kwargs['action'] + self.target = kwargs.get('target', None) + self.executor = kwargs.get('executor', None) + self.executor_data = kwargs.get('executor_data', None) + self.impact = kwargs.get('impact', None) + self.result_status = kwargs.get('result_status', None) + self.result_code = kwargs.get('result_code', None) + self.result_details = kwargs.get('result_details', None) + self.history = kwargs.get('history', None) + self.preparing_health_check_state = kwargs.get('preparing_health_check_state', None) + self.restoring_health_check_state = kwargs.get('restoring_health_check_state', None) + self.perform_preparing_health_check = kwargs.get('perform_preparing_health_check', None) + self.perform_restoring_health_check = kwargs.get('perform_restoring_health_check', None) + + +class RepairTaskApproveDescription(msrest.serialization.Model): + """Describes a request for forced approval of a repair task. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar task_id: Required. The ID of the repair task. + :vartype task_id: str + :ivar version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current version of the repair task. If zero, + then no version check is performed. + :vartype version: str + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword task_id: Required. The ID of the repair task. + :paramtype task_id: str + :keyword version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current version of the repair task. If zero, + then no version check is performed. + :paramtype version: str + """ + super(RepairTaskApproveDescription, self).__init__(**kwargs) + self.task_id = kwargs['task_id'] + self.version = kwargs.get('version', None) + + +class RepairTaskCancelDescription(msrest.serialization.Model): + """Describes a request to cancel a repair task. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar task_id: Required. The ID of the repair task. + :vartype task_id: str + :ivar version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current version of the repair task. If zero, + then no version check is performed. + :vartype version: str + :ivar request_abort: *True* if the repair should be stopped as soon as possible even if it has + already started executing. *False* if the repair should be cancelled only if execution has not + yet started. + :vartype request_abort: bool + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'request_abort': {'key': 'RequestAbort', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword task_id: Required. The ID of the repair task. + :paramtype task_id: str + :keyword version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current version of the repair task. If zero, + then no version check is performed. + :paramtype version: str + :keyword request_abort: *True* if the repair should be stopped as soon as possible even if it + has already started executing. *False* if the repair should be cancelled only if execution has + not yet started. + :paramtype request_abort: bool + """ + super(RepairTaskCancelDescription, self).__init__(**kwargs) + self.task_id = kwargs['task_id'] + self.version = kwargs.get('version', None) + self.request_abort = kwargs.get('request_abort', None) + + +class RepairTaskDeleteDescription(msrest.serialization.Model): + """Describes a request to delete a completed repair task. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar task_id: Required. The ID of the completed repair task to be deleted. + :vartype task_id: str + :ivar version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current version of the repair task. If zero, + then no version check is performed. + :vartype version: str + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword task_id: Required. The ID of the completed repair task to be deleted. + :paramtype task_id: str + :keyword version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current version of the repair task. If zero, + then no version check is performed. + :paramtype version: str + """ + super(RepairTaskDeleteDescription, self).__init__(**kwargs) + self.task_id = kwargs['task_id'] + self.version = kwargs.get('version', None) + + +class RepairTaskHistory(msrest.serialization.Model): + """A record of the times when the repair task entered each state. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + :ivar created_utc_timestamp: The time when the repair task entered the Created state. + :vartype created_utc_timestamp: ~datetime.datetime + :ivar claimed_utc_timestamp: The time when the repair task entered the Claimed state. + :vartype claimed_utc_timestamp: ~datetime.datetime + :ivar preparing_utc_timestamp: The time when the repair task entered the Preparing state. + :vartype preparing_utc_timestamp: ~datetime.datetime + :ivar approved_utc_timestamp: The time when the repair task entered the Approved state. + :vartype approved_utc_timestamp: ~datetime.datetime + :ivar executing_utc_timestamp: The time when the repair task entered the Executing state. + :vartype executing_utc_timestamp: ~datetime.datetime + :ivar restoring_utc_timestamp: The time when the repair task entered the Restoring state. + :vartype restoring_utc_timestamp: ~datetime.datetime + :ivar completed_utc_timestamp: The time when the repair task entered the Completed state. + :vartype completed_utc_timestamp: ~datetime.datetime + :ivar preparing_health_check_start_utc_timestamp: The time when the repair task started the + health check in the Preparing state. + :vartype preparing_health_check_start_utc_timestamp: ~datetime.datetime + :ivar preparing_health_check_end_utc_timestamp: The time when the repair task completed the + health check in the Preparing state. + :vartype preparing_health_check_end_utc_timestamp: ~datetime.datetime + :ivar restoring_health_check_start_utc_timestamp: The time when the repair task started the + health check in the Restoring state. + :vartype restoring_health_check_start_utc_timestamp: ~datetime.datetime + :ivar restoring_health_check_end_utc_timestamp: The time when the repair task completed the + health check in the Restoring state. + :vartype restoring_health_check_end_utc_timestamp: ~datetime.datetime + """ + + _attribute_map = { + 'created_utc_timestamp': {'key': 'CreatedUtcTimestamp', 'type': 'iso-8601'}, + 'claimed_utc_timestamp': {'key': 'ClaimedUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_utc_timestamp': {'key': 'PreparingUtcTimestamp', 'type': 'iso-8601'}, + 'approved_utc_timestamp': {'key': 'ApprovedUtcTimestamp', 'type': 'iso-8601'}, + 'executing_utc_timestamp': {'key': 'ExecutingUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_utc_timestamp': {'key': 'RestoringUtcTimestamp', 'type': 'iso-8601'}, + 'completed_utc_timestamp': {'key': 'CompletedUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_health_check_start_utc_timestamp': {'key': 'PreparingHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_health_check_end_utc_timestamp': {'key': 'PreparingHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_health_check_start_utc_timestamp': {'key': 'RestoringHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_health_check_end_utc_timestamp': {'key': 'RestoringHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword created_utc_timestamp: The time when the repair task entered the Created state. + :paramtype created_utc_timestamp: ~datetime.datetime + :keyword claimed_utc_timestamp: The time when the repair task entered the Claimed state. + :paramtype claimed_utc_timestamp: ~datetime.datetime + :keyword preparing_utc_timestamp: The time when the repair task entered the Preparing state. + :paramtype preparing_utc_timestamp: ~datetime.datetime + :keyword approved_utc_timestamp: The time when the repair task entered the Approved state. + :paramtype approved_utc_timestamp: ~datetime.datetime + :keyword executing_utc_timestamp: The time when the repair task entered the Executing state. + :paramtype executing_utc_timestamp: ~datetime.datetime + :keyword restoring_utc_timestamp: The time when the repair task entered the Restoring state. + :paramtype restoring_utc_timestamp: ~datetime.datetime + :keyword completed_utc_timestamp: The time when the repair task entered the Completed state. + :paramtype completed_utc_timestamp: ~datetime.datetime + :keyword preparing_health_check_start_utc_timestamp: The time when the repair task started the + health check in the Preparing state. + :paramtype preparing_health_check_start_utc_timestamp: ~datetime.datetime + :keyword preparing_health_check_end_utc_timestamp: The time when the repair task completed the + health check in the Preparing state. + :paramtype preparing_health_check_end_utc_timestamp: ~datetime.datetime + :keyword restoring_health_check_start_utc_timestamp: The time when the repair task started the + health check in the Restoring state. + :paramtype restoring_health_check_start_utc_timestamp: ~datetime.datetime + :keyword restoring_health_check_end_utc_timestamp: The time when the repair task completed the + health check in the Restoring state. + :paramtype restoring_health_check_end_utc_timestamp: ~datetime.datetime + """ + super(RepairTaskHistory, self).__init__(**kwargs) + self.created_utc_timestamp = kwargs.get('created_utc_timestamp', None) + self.claimed_utc_timestamp = kwargs.get('claimed_utc_timestamp', None) + self.preparing_utc_timestamp = kwargs.get('preparing_utc_timestamp', None) + self.approved_utc_timestamp = kwargs.get('approved_utc_timestamp', None) + self.executing_utc_timestamp = kwargs.get('executing_utc_timestamp', None) + self.restoring_utc_timestamp = kwargs.get('restoring_utc_timestamp', None) + self.completed_utc_timestamp = kwargs.get('completed_utc_timestamp', None) + self.preparing_health_check_start_utc_timestamp = kwargs.get('preparing_health_check_start_utc_timestamp', None) + self.preparing_health_check_end_utc_timestamp = kwargs.get('preparing_health_check_end_utc_timestamp', None) + self.restoring_health_check_start_utc_timestamp = kwargs.get('restoring_health_check_start_utc_timestamp', None) + self.restoring_health_check_end_utc_timestamp = kwargs.get('restoring_health_check_end_utc_timestamp', None) + + +class RepairTaskUpdateHealthPolicyDescription(msrest.serialization.Model): + """Describes a request to update the health policy of a repair task. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar task_id: Required. The ID of the repair task to be updated. + :vartype task_id: str + :ivar version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current value of the repair task. If zero, + then no version check is performed. + :vartype version: str + :ivar perform_preparing_health_check: A boolean indicating if health check is to be performed + in the Preparing stage of the repair task. If not specified the existing value should not be + altered. Otherwise, specify the desired new value. + :vartype perform_preparing_health_check: bool + :ivar perform_restoring_health_check: A boolean indicating if health check is to be performed + in the Restoring stage of the repair task. If not specified the existing value should not be + altered. Otherwise, specify the desired new value. + :vartype perform_restoring_health_check: bool + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, + 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword task_id: Required. The ID of the repair task to be updated. + :paramtype task_id: str + :keyword version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current value of the repair task. If zero, + then no version check is performed. + :paramtype version: str + :keyword perform_preparing_health_check: A boolean indicating if health check is to be + performed in the Preparing stage of the repair task. If not specified the existing value should + not be altered. Otherwise, specify the desired new value. + :paramtype perform_preparing_health_check: bool + :keyword perform_restoring_health_check: A boolean indicating if health check is to be + performed in the Restoring stage of the repair task. If not specified the existing value should + not be altered. Otherwise, specify the desired new value. + :paramtype perform_restoring_health_check: bool + """ + super(RepairTaskUpdateHealthPolicyDescription, self).__init__(**kwargs) + self.task_id = kwargs['task_id'] + self.version = kwargs.get('version', None) + self.perform_preparing_health_check = kwargs.get('perform_preparing_health_check', None) + self.perform_restoring_health_check = kwargs.get('perform_restoring_health_check', None) + + +class RepairTaskUpdateInfo(msrest.serialization.Model): + """Describes the result of an operation that created or updated a repair task. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar version: Required. The new version of the repair task. + :vartype version: str + """ + + _validation = { + 'version': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword version: Required. The new version of the repair task. + :paramtype version: str + """ + super(RepairTaskUpdateInfo, self).__init__(**kwargs) + self.version = kwargs['version'] + + +class ReplicaHealth(EntityHealth): + """Represents a base class for stateful service replica or stateless service instance health. +Contains the replica aggregated health state, the health events and the unhealthy evaluations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaHealth, StatelessServiceInstanceHealth. + + All required parameters must be populated in order to send to Azure. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar partition_id: Id of the partition to which this replica belongs. + :vartype partition_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaHealth', 'Stateless': 'StatelessServiceInstanceHealth'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword partition_id: Id of the partition to which this replica belongs. + :paramtype partition_id: str + """ + super(ReplicaHealth, self).__init__(**kwargs) + self.service_kind = 'ReplicaHealth' # type: str + self.partition_id = kwargs.get('partition_id', None) + + +class ReplicaHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a replica, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar partition_id: Id of the partition to which the replica belongs. + :vartype partition_id: str + :ivar replica_or_instance_id: Id of a stateful service replica or a stateless service instance. + This ID is used in the queries that apply to both stateful and stateless services. It is used + by Service Fabric to uniquely identify a replica of a partition of a stateful service or an + instance of a stateless service partition. It is unique within a partition and does not change + for the lifetime of the replica or the instance. If a stateful replica gets dropped and another + replica gets created on the same node for the same partition, it will get a different value for + the ID. If a stateless instance is failed over on the same or different node it will get a + different value for the ID. + :vartype replica_or_instance_id: str + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated + health state of the replica. The types of the unhealthy evaluations can be + EventHealthEvaluation. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword partition_id: Id of the partition to which the replica belongs. + :paramtype partition_id: str + :keyword replica_or_instance_id: Id of a stateful service replica or a stateless service + instance. This ID is used in the queries that apply to both stateful and stateless services. It + is used by Service Fabric to uniquely identify a replica of a partition of a stateful service + or an instance of a stateless service partition. It is unique within a partition and does not + change for the lifetime of the replica or the instance. If a stateful replica gets dropped and + another replica gets created on the same node for the same partition, it will get a different + value for the ID. If a stateless instance is failed over on the same or different node it will + get a different value for the ID. + :paramtype replica_or_instance_id: str + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current + aggregated health state of the replica. The types of the unhealthy evaluations can be + EventHealthEvaluation. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(ReplicaHealthEvaluation, self).__init__(**kwargs) + self.kind = 'Replica' # type: str + self.partition_id = kwargs.get('partition_id', None) + self.replica_or_instance_id = kwargs.get('replica_or_instance_id', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class ReplicaHealthState(EntityHealthState): + """Represents a base class for stateful service replica or stateless service instance health state. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaHealthState, StatelessServiceInstanceHealthState. + + All required parameters must be populated in order to send to Azure. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar partition_id: The ID of the partition to which this replica belongs. + :vartype partition_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaHealthState', 'Stateless': 'StatelessServiceInstanceHealthState'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword partition_id: The ID of the partition to which this replica belongs. + :paramtype partition_id: str + """ + super(ReplicaHealthState, self).__init__(**kwargs) + self.service_kind = 'ReplicaHealthState' # type: str + self.partition_id = kwargs.get('partition_id', None) + + +class ReplicaHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a stateful service replica or a stateless service instance. +The replica health state contains the replica ID and its aggregated health state. + + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar replica_or_instance_id: Id of a stateful service replica or a stateless service instance. + This ID is used in the queries that apply to both stateful and stateless services. It is used + by Service Fabric to uniquely identify a replica of a partition of a stateful service or an + instance of a stateless service partition. It is unique within a partition and does not change + for the lifetime of the replica or the instance. If a stateful replica gets dropped and another + replica gets created on the same node for the same partition, it will get a different value for + the ID. If a stateless instance is failed over on the same or different node it will get a + different value for the ID. + :vartype replica_or_instance_id: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword replica_or_instance_id: Id of a stateful service replica or a stateless service + instance. This ID is used in the queries that apply to both stateful and stateless services. It + is used by Service Fabric to uniquely identify a replica of a partition of a stateful service + or an instance of a stateless service partition. It is unique within a partition and does not + change for the lifetime of the replica or the instance. If a stateful replica gets dropped and + another replica gets created on the same node for the same partition, it will get a different + value for the ID. If a stateless instance is failed over on the same or different node it will + get a different value for the ID. + :paramtype replica_or_instance_id: str + """ + super(ReplicaHealthStateChunk, self).__init__(**kwargs) + self.replica_or_instance_id = kwargs.get('replica_or_instance_id', None) + + +class ReplicaHealthStateChunkList(msrest.serialization.Model): + """The list of replica health state chunks that respect the input filters in the chunk query. Returned by get cluster health state chunks query. + + :ivar items: The list of replica health state chunks that respect the input filters in the + chunk query. + :vartype items: list[~azure.servicefabric.models.ReplicaHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[ReplicaHealthStateChunk]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword items: The list of replica health state chunks that respect the input filters in the + chunk query. + :paramtype items: list[~azure.servicefabric.models.ReplicaHealthStateChunk] + """ + super(ReplicaHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) + + +class ReplicaHealthStateFilter(msrest.serialization.Model): + """Defines matching criteria to determine whether a replica should be included as a child of a partition in the cluster health chunk. +The replicas are only returned if the parent entities match a filter specified in the cluster health chunk query description. The parent partition, service and application must be included in the cluster health chunk. +One filter can match zero, one or multiple replicas, depending on its properties. + + :ivar replica_or_instance_id_filter: Id of the stateful service replica or stateless service + instance that matches the filter. The filter is applied only to the specified replica, if it + exists. + If the replica doesn't exist, no replica is returned in the cluster health chunk based on this + filter. + If the replica exists, it is included in the cluster health chunk if it respects the other + filter properties. + If not specified, all replicas that match the parent filters (if any) are taken into + consideration and matched against the other filter members, like health state filter. + :vartype replica_or_instance_id_filter: str + :ivar health_state_filter: The filter for the health state of the replicas. It allows selecting + replicas if they match the desired health states. + The possible values are integer value of one of the following health states. Only replicas + that match the filter are returned. All replicas are used to evaluate the parent partition + aggregated health state. + If not specified, default value is None, unless the replica ID is specified. If the filter has + default value and replica ID is specified, the matching replica is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches replicas with HealthState value of OK (2) + and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :vartype health_state_filter: int + """ + + _attribute_map = { + 'replica_or_instance_id_filter': {'key': 'ReplicaOrInstanceIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword replica_or_instance_id_filter: Id of the stateful service replica or stateless service + instance that matches the filter. The filter is applied only to the specified replica, if it + exists. + If the replica doesn't exist, no replica is returned in the cluster health chunk based on this + filter. + If the replica exists, it is included in the cluster health chunk if it respects the other + filter properties. + If not specified, all replicas that match the parent filters (if any) are taken into + consideration and matched against the other filter members, like health state filter. + :paramtype replica_or_instance_id_filter: str + :keyword health_state_filter: The filter for the health state of the replicas. It allows + selecting replicas if they match the desired health states. + The possible values are integer value of one of the following health states. Only replicas + that match the filter are returned. All replicas are used to evaluate the parent partition + aggregated health state. + If not specified, default value is None, unless the replica ID is specified. If the filter has + default value and replica ID is specified, the matching replica is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches replicas with HealthState value of OK (2) + and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :paramtype health_state_filter: int + """ + super(ReplicaHealthStateFilter, self).__init__(**kwargs) + self.replica_or_instance_id_filter = kwargs.get('replica_or_instance_id_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) + + +class ReplicaInfo(msrest.serialization.Model): + """Information about the identity, status, health, node name, uptime, and other details about the replica. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaInfo, StatelessServiceInstanceInfo. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", + "InBuild", "Standby", "Ready", "Down", "Dropped". + :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar node_name: The name of a Service Fabric node. + :vartype node_name: str + :ivar address: The address the replica is listening on. + :vartype address: str + :ivar last_in_build_duration_in_seconds: The last in build duration of the replica in seconds. + :vartype last_in_build_duration_in_seconds: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaInfo', 'Stateless': 'StatelessServiceInstanceInfo'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword replica_status: The status of a replica of a service. Possible values include: + "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". + :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword node_name: The name of a Service Fabric node. + :paramtype node_name: str + :keyword address: The address the replica is listening on. + :paramtype address: str + :keyword last_in_build_duration_in_seconds: The last in build duration of the replica in + seconds. + :paramtype last_in_build_duration_in_seconds: str + """ + super(ReplicaInfo, self).__init__(**kwargs) + self.service_kind = None # type: Optional[str] + self.replica_status = kwargs.get('replica_status', None) + self.health_state = kwargs.get('health_state', None) + self.node_name = kwargs.get('node_name', None) + self.address = kwargs.get('address', None) + self.last_in_build_duration_in_seconds = kwargs.get('last_in_build_duration_in_seconds', None) + + +class ReplicaLifecycleDescription(msrest.serialization.Model): + """Describes how the replica will behave. + + :ivar is_singleton_replica_move_allowed_during_upgrade: If set to true, replicas with a target + replica set size of 1 will be permitted to move during upgrade. + :vartype is_singleton_replica_move_allowed_during_upgrade: bool + :ivar restore_replica_location_after_upgrade: If set to true, move/swap replica to original + location after upgrade. + :vartype restore_replica_location_after_upgrade: bool + """ + + _attribute_map = { + 'is_singleton_replica_move_allowed_during_upgrade': {'key': 'IsSingletonReplicaMoveAllowedDuringUpgrade', 'type': 'bool'}, + 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword is_singleton_replica_move_allowed_during_upgrade: If set to true, replicas with a + target replica set size of 1 will be permitted to move during upgrade. + :paramtype is_singleton_replica_move_allowed_during_upgrade: bool + :keyword restore_replica_location_after_upgrade: If set to true, move/swap replica to original + location after upgrade. + :paramtype restore_replica_location_after_upgrade: bool + """ + super(ReplicaLifecycleDescription, self).__init__(**kwargs) + self.is_singleton_replica_move_allowed_during_upgrade = kwargs.get('is_singleton_replica_move_allowed_during_upgrade', None) + self.restore_replica_location_after_upgrade = kwargs.get('restore_replica_location_after_upgrade', None) + + +class ReplicaMetricLoadDescription(msrest.serialization.Model): + """Specifies metric loads of a partition's specific secondary replica or instance. + + :ivar node_name: Node name of a specific secondary replica or instance. + :vartype node_name: str + :ivar replica_or_instance_load_entries: Loads of a different metrics for a partition's + secondary replica or instance. + :vartype replica_or_instance_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'replica_or_instance_load_entries': {'key': 'ReplicaOrInstanceLoadEntries', 'type': '[MetricLoadDescription]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword node_name: Node name of a specific secondary replica or instance. + :paramtype node_name: str + :keyword replica_or_instance_load_entries: Loads of a different metrics for a partition's + secondary replica or instance. + :paramtype replica_or_instance_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + """ + super(ReplicaMetricLoadDescription, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.replica_or_instance_load_entries = kwargs.get('replica_or_instance_load_entries', None) + + +class ReplicasHealthEvaluation(HealthEvaluation): + """Represents health evaluation for replicas, containing health evaluations for each unhealthy replica that impacted current aggregated health state. Can be returned when evaluating partition health and the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar max_percent_unhealthy_replicas_per_partition: Maximum allowed percentage of unhealthy + replicas per partition from the ApplicationHealthPolicy. + :vartype max_percent_unhealthy_replicas_per_partition: int + :ivar total_count: Total number of replicas in the partition from the health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy ReplicaHealthEvaluation that impacted the aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword max_percent_unhealthy_replicas_per_partition: Maximum allowed percentage of unhealthy + replicas per partition from the ApplicationHealthPolicy. + :paramtype max_percent_unhealthy_replicas_per_partition: int + :keyword total_count: Total number of replicas in the partition from the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy ReplicaHealthEvaluation that impacted the aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(ReplicasHealthEvaluation, self).__init__(**kwargs) + self.kind = 'Replicas' # type: str + self.max_percent_unhealthy_replicas_per_partition = kwargs.get('max_percent_unhealthy_replicas_per_partition', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class ReplicatorQueueStatus(msrest.serialization.Model): + """Provides various statistics of the queue used in the service fabric replicator. +Contains information about the service fabric replicator like the replication/copy queue utilization, last acknowledgement received timestamp, etc. +Depending on the role of the replicator, the properties in this type imply different meanings. + + :ivar queue_utilization_percentage: Represents the utilization of the queue. A value of 0 + indicates that the queue is empty and a value of 100 indicates the queue is full. + :vartype queue_utilization_percentage: int + :ivar queue_memory_size: Represents the virtual memory consumed by the queue in bytes. + :vartype queue_memory_size: str + :ivar first_sequence_number: On a primary replicator, this is semantically the sequence number + of the operation for which all the secondary replicas have sent an acknowledgement. + On a secondary replicator, this is the smallest sequence number of the operation that is + present in the queue. + :vartype first_sequence_number: str + :ivar completed_sequence_number: On a primary replicator, this is semantically the highest + sequence number of the operation for which all the secondary replicas have sent an + acknowledgement. + On a secondary replicator, this is semantically the highest sequence number that has been + applied to the persistent state. + :vartype completed_sequence_number: str + :ivar committed_sequence_number: On a primary replicator, this is semantically the highest + sequence number of the operation for which a write quorum of the secondary replicas have sent + an acknowledgement. + On a secondary replicator, this is semantically the highest sequence number of the in-order + operation received from the primary. + :vartype committed_sequence_number: str + :ivar last_sequence_number: Represents the latest sequence number of the operation that is + available in the queue. + :vartype last_sequence_number: str + """ + + _attribute_map = { + 'queue_utilization_percentage': {'key': 'QueueUtilizationPercentage', 'type': 'int'}, + 'queue_memory_size': {'key': 'QueueMemorySize', 'type': 'str'}, + 'first_sequence_number': {'key': 'FirstSequenceNumber', 'type': 'str'}, + 'completed_sequence_number': {'key': 'CompletedSequenceNumber', 'type': 'str'}, + 'committed_sequence_number': {'key': 'CommittedSequenceNumber', 'type': 'str'}, + 'last_sequence_number': {'key': 'LastSequenceNumber', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword queue_utilization_percentage: Represents the utilization of the queue. A value of 0 + indicates that the queue is empty and a value of 100 indicates the queue is full. + :paramtype queue_utilization_percentage: int + :keyword queue_memory_size: Represents the virtual memory consumed by the queue in bytes. + :paramtype queue_memory_size: str + :keyword first_sequence_number: On a primary replicator, this is semantically the sequence + number of the operation for which all the secondary replicas have sent an acknowledgement. + On a secondary replicator, this is the smallest sequence number of the operation that is + present in the queue. + :paramtype first_sequence_number: str + :keyword completed_sequence_number: On a primary replicator, this is semantically the highest + sequence number of the operation for which all the secondary replicas have sent an + acknowledgement. + On a secondary replicator, this is semantically the highest sequence number that has been + applied to the persistent state. + :paramtype completed_sequence_number: str + :keyword committed_sequence_number: On a primary replicator, this is semantically the highest + sequence number of the operation for which a write quorum of the secondary replicas have sent + an acknowledgement. + On a secondary replicator, this is semantically the highest sequence number of the in-order + operation received from the primary. + :paramtype committed_sequence_number: str + :keyword last_sequence_number: Represents the latest sequence number of the operation that is + available in the queue. + :paramtype last_sequence_number: str + """ + super(ReplicatorQueueStatus, self).__init__(**kwargs) + self.queue_utilization_percentage = kwargs.get('queue_utilization_percentage', None) + self.queue_memory_size = kwargs.get('queue_memory_size', None) + self.first_sequence_number = kwargs.get('first_sequence_number', None) + self.completed_sequence_number = kwargs.get('completed_sequence_number', None) + self.committed_sequence_number = kwargs.get('committed_sequence_number', None) + self.last_sequence_number = kwargs.get('last_sequence_number', None) + + +class ResolvedServiceEndpoint(msrest.serialization.Model): + """Endpoint of a resolved service partition. + + :ivar kind: The role of the replica where the endpoint is reported. Possible values include: + "Invalid", "Stateless", "StatefulPrimary", "StatefulSecondary". + :vartype kind: str or ~azure.servicefabric.models.ServiceEndpointRole + :ivar address: The address of the endpoint. If the endpoint has multiple listeners the address + is a JSON object with one property per listener with the value as the address of that listener. + :vartype address: str + """ + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword kind: The role of the replica where the endpoint is reported. Possible values include: + "Invalid", "Stateless", "StatefulPrimary", "StatefulSecondary". + :paramtype kind: str or ~azure.servicefabric.models.ServiceEndpointRole + :keyword address: The address of the endpoint. If the endpoint has multiple listeners the + address is a JSON object with one property per listener with the value as the address of that + listener. + :paramtype address: str + """ + super(ResolvedServiceEndpoint, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.address = kwargs.get('address', None) + + +class ResolvedServicePartition(msrest.serialization.Model): + """Information about a service partition and its associated endpoints. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The full name of the service with 'fabric:' URI scheme. + :vartype name: str + :ivar partition_information: Required. A representation of the resolved partition. + :vartype partition_information: ~azure.servicefabric.models.PartitionInformation + :ivar endpoints: Required. List of resolved service endpoints of a service partition. + :vartype endpoints: list[~azure.servicefabric.models.ResolvedServiceEndpoint] + :ivar version: Required. The version of this resolved service partition result. This version + should be passed in the next time the ResolveService call is made via the PreviousRspVersion + query parameter. + :vartype version: str + """ + + _validation = { + 'name': {'required': True}, + 'partition_information': {'required': True}, + 'endpoints': {'required': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'endpoints': {'key': 'Endpoints', 'type': '[ResolvedServiceEndpoint]'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. The full name of the service with 'fabric:' URI scheme. + :paramtype name: str + :keyword partition_information: Required. A representation of the resolved partition. + :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation + :keyword endpoints: Required. List of resolved service endpoints of a service partition. + :paramtype endpoints: list[~azure.servicefabric.models.ResolvedServiceEndpoint] + :keyword version: Required. The version of this resolved service partition result. This version + should be passed in the next time the ResolveService call is made via the PreviousRspVersion + query parameter. + :paramtype version: str + """ + super(ResolvedServicePartition, self).__init__(**kwargs) + self.name = kwargs['name'] + self.partition_information = kwargs['partition_information'] + self.endpoints = kwargs['endpoints'] + self.version = kwargs['version'] + + +class ResourceLimits(msrest.serialization.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. + + :ivar memory_in_gb: The memory limit in GB. + :vartype memory_in_gb: float + :ivar cpu: CPU limits in cores. At present, only full cores are supported. + :vartype cpu: float + """ + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword memory_in_gb: The memory limit in GB. + :paramtype memory_in_gb: float + :keyword cpu: CPU limits in cores. At present, only full cores are supported. + :paramtype cpu: float + """ + super(ResourceLimits, self).__init__(**kwargs) + self.memory_in_gb = kwargs.get('memory_in_gb', None) + self.cpu = kwargs.get('cpu', None) + + +class ResourceRequests(msrest.serialization.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. + + :ivar memory_in_gb: Required. The memory request in GB for this container. + :vartype memory_in_gb: float + :ivar cpu: Required. Requested number of CPU cores. At present, only full cores are supported. + :vartype 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 + ): + """ + :keyword memory_in_gb: Required. The memory request in GB for this container. + :paramtype memory_in_gb: float + :keyword cpu: Required. Requested number of CPU cores. At present, only full cores are + supported. + :paramtype cpu: float + """ + super(ResourceRequests, self).__init__(**kwargs) + self.memory_in_gb = kwargs['memory_in_gb'] + self.cpu = kwargs['cpu'] + + +class ResourceRequirements(msrest.serialization.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. + + :ivar requests: Required. Describes the requested resources for a given container. + :vartype requests: ~azure.servicefabric.models.ResourceRequests + :ivar limits: Describes the maximum limits on the resources for a given container. + :vartype 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 + ): + """ + :keyword requests: Required. Describes the requested resources for a given container. + :paramtype requests: ~azure.servicefabric.models.ResourceRequests + :keyword limits: Describes the maximum limits on the resources for a given container. + :paramtype limits: ~azure.servicefabric.models.ResourceLimits + """ + super(ResourceRequirements, self).__init__(**kwargs) + self.requests = kwargs['requests'] + self.limits = kwargs.get('limits', None) + + +class RestartDeployedCodePackageDescription(msrest.serialization.Model): + """Defines description for restarting a deployed code package on Service Fabric node. + + All required parameters must be populated in order to send to Azure. + + :ivar service_manifest_name: Required. The name of service manifest that specified this code + package. + :vartype service_manifest_name: str + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + :ivar code_package_name: Required. The name of the code package defined in the service + manifest. + :vartype code_package_name: str + :ivar code_package_instance_id: Required. The instance ID for currently running entry point. + For a code package setup entry point (if specified) runs first and after it finishes main entry + point is started. + Each time entry point executable is run, its instance ID will change. If 0 is passed in as the + code package instance ID, the API will restart the code package with whatever instance ID it is + currently running. + If an instance ID other than 0 is passed in, the API will restart the code package only if the + current Instance ID matches the passed in instance ID. + Note, passing in the exact instance ID (not 0) in the API is safer, because if ensures at most + one restart of the code package. + :vartype code_package_instance_id: str + """ + + _validation = { + 'service_manifest_name': {'required': True}, + 'code_package_name': {'required': True}, + 'code_package_instance_id': {'required': True}, + } + + _attribute_map = { + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'code_package_instance_id': {'key': 'CodePackageInstanceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_manifest_name: Required. The name of service manifest that specified this code + package. + :paramtype service_manifest_name: str + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + :keyword code_package_name: Required. The name of the code package defined in the service + manifest. + :paramtype code_package_name: str + :keyword code_package_instance_id: Required. The instance ID for currently running entry point. + For a code package setup entry point (if specified) runs first and after it finishes main entry + point is started. + Each time entry point executable is run, its instance ID will change. If 0 is passed in as the + code package instance ID, the API will restart the code package with whatever instance ID it is + currently running. + If an instance ID other than 0 is passed in, the API will restart the code package only if the + current Instance ID matches the passed in instance ID. + Note, passing in the exact instance ID (not 0) in the API is safer, because if ensures at most + one restart of the code package. + :paramtype code_package_instance_id: str + """ + super(RestartDeployedCodePackageDescription, self).__init__(**kwargs) + self.service_manifest_name = kwargs['service_manifest_name'] + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.code_package_name = kwargs['code_package_name'] + self.code_package_instance_id = kwargs['code_package_instance_id'] + + +class RestartNodeDescription(msrest.serialization.Model): + """Describes the parameters to restart a Service Fabric node. + + All required parameters must be populated in order to send to Azure. + + :ivar node_instance_id: Required. The instance ID of the target node. If instance ID is + specified the node is restarted only if it matches with the current instance of the node. A + default value of "0" would match any instance ID. The instance ID can be obtained using get + node query. + :vartype node_instance_id: str + :ivar create_fabric_dump: Specify True to create a dump of the fabric node process. This is + case-sensitive. Possible values include: "False", "True". Default value: "False". + :vartype create_fabric_dump: str or ~azure.servicefabric.models.CreateFabricDump + """ + + _validation = { + 'node_instance_id': {'required': True}, + } + + _attribute_map = { + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + 'create_fabric_dump': {'key': 'CreateFabricDump', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword node_instance_id: Required. The instance ID of the target node. If instance ID is + specified the node is restarted only if it matches with the current instance of the node. A + default value of "0" would match any instance ID. The instance ID can be obtained using get + node query. + :paramtype node_instance_id: str + :keyword create_fabric_dump: Specify True to create a dump of the fabric node process. This is + case-sensitive. Possible values include: "False", "True". Default value: "False". + :paramtype create_fabric_dump: str or ~azure.servicefabric.models.CreateFabricDump + """ + super(RestartNodeDescription, self).__init__(**kwargs) + self.node_instance_id = kwargs.get('node_instance_id', "0") + self.create_fabric_dump = kwargs.get('create_fabric_dump', "False") + + +class RestartPartitionResult(msrest.serialization.Model): + """Represents information about an operation in a terminal state (Completed or Faulted). + + :ivar error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, + this is an error code indicating the reason. + :vartype error_code: int + :ivar selected_partition: This class returns information about the partition that the + user-induced operation acted upon. + :vartype selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, + this is an error code indicating the reason. + :paramtype error_code: int + :keyword selected_partition: This class returns information about the partition that the + user-induced operation acted upon. + :paramtype selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + super(RestartPartitionResult, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.selected_partition = kwargs.get('selected_partition', None) + + +class RestorePartitionDescription(msrest.serialization.Model): + """Specifies the parameters needed to trigger a restore of a specific partition. + + All required parameters must be populated in order to send to Azure. + + :ivar backup_id: Required. Unique backup ID. + :vartype backup_id: str + :ivar backup_location: Required. Location of the backup relative to the backup storage + specified/ configured. + :vartype backup_location: str + :ivar backup_storage: Location of the backup from where the partition will be restored. + :vartype backup_storage: ~azure.servicefabric.models.BackupStorageDescription + """ + + _validation = { + 'backup_id': {'required': True}, + 'backup_location': {'required': True}, + } + + _attribute_map = { + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_id: Required. Unique backup ID. + :paramtype backup_id: str + :keyword backup_location: Required. Location of the backup relative to the backup storage + specified/ configured. + :paramtype backup_location: str + :keyword backup_storage: Location of the backup from where the partition will be restored. + :paramtype backup_storage: ~azure.servicefabric.models.BackupStorageDescription + """ + super(RestorePartitionDescription, self).__init__(**kwargs) + self.backup_id = kwargs['backup_id'] + self.backup_location = kwargs['backup_location'] + self.backup_storage = kwargs.get('backup_storage', None) + + +class RestoreProgressInfo(msrest.serialization.Model): + """Describes the progress of a restore operation on a partition. + + :ivar restore_state: Represents the current state of the partition restore operation. Possible + values include: "Invalid", "Accepted", "RestoreInProgress", "Success", "Failure", "Timeout". + :vartype restore_state: str or ~azure.servicefabric.models.RestoreState + :ivar time_stamp_utc: Timestamp when operation succeeded or failed. + :vartype time_stamp_utc: ~datetime.datetime + :ivar restored_epoch: Describes the epoch at which the partition is restored. + :vartype restored_epoch: ~azure.servicefabric.models.Epoch + :ivar restored_lsn: Restored LSN. + :vartype restored_lsn: str + :ivar failure_error: Denotes the failure encountered in performing restore operation. + :vartype failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'restore_state': {'key': 'RestoreState', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'restored_epoch': {'key': 'RestoredEpoch', 'type': 'Epoch'}, + 'restored_lsn': {'key': 'RestoredLsn', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword restore_state: Represents the current state of the partition restore operation. + Possible values include: "Invalid", "Accepted", "RestoreInProgress", "Success", "Failure", + "Timeout". + :paramtype restore_state: str or ~azure.servicefabric.models.RestoreState + :keyword time_stamp_utc: Timestamp when operation succeeded or failed. + :paramtype time_stamp_utc: ~datetime.datetime + :keyword restored_epoch: Describes the epoch at which the partition is restored. + :paramtype restored_epoch: ~azure.servicefabric.models.Epoch + :keyword restored_lsn: Restored LSN. + :paramtype restored_lsn: str + :keyword failure_error: Denotes the failure encountered in performing restore operation. + :paramtype failure_error: ~azure.servicefabric.models.FabricErrorError + """ + super(RestoreProgressInfo, self).__init__(**kwargs) + self.restore_state = kwargs.get('restore_state', None) + self.time_stamp_utc = kwargs.get('time_stamp_utc', None) + self.restored_epoch = kwargs.get('restored_epoch', None) + self.restored_lsn = kwargs.get('restored_lsn', None) + self.failure_error = kwargs.get('failure_error', None) + + +class ResumeApplicationUpgradeDescription(msrest.serialization.Model): + """Describes the parameters for resuming an unmonitored manual Service Fabric application upgrade. + + All required parameters must be populated in order to send to Azure. + + :ivar upgrade_domain_name: Required. The name of the upgrade domain in which to resume the + upgrade. + :vartype upgrade_domain_name: str + """ + + _validation = { + 'upgrade_domain_name': {'required': True}, + } + + _attribute_map = { + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword upgrade_domain_name: Required. The name of the upgrade domain in which to resume the + upgrade. + :paramtype upgrade_domain_name: str + """ + super(ResumeApplicationUpgradeDescription, self).__init__(**kwargs) + self.upgrade_domain_name = kwargs['upgrade_domain_name'] + + +class ResumeClusterUpgradeDescription(msrest.serialization.Model): + """Describes the parameters for resuming a cluster upgrade. + + All required parameters must be populated in order to send to Azure. + + :ivar upgrade_domain: Required. The next upgrade domain for this cluster upgrade. + :vartype upgrade_domain: str + """ + + _validation = { + 'upgrade_domain': {'required': True}, + } + + _attribute_map = { + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword upgrade_domain: Required. The next upgrade domain for this cluster upgrade. + :paramtype upgrade_domain: str + """ + super(ResumeClusterUpgradeDescription, self).__init__(**kwargs) + self.upgrade_domain = kwargs['upgrade_domain'] + + +class RollingUpgradeUpdateDescription(msrest.serialization.Model): + """Describes the parameters for updating a rolling upgrade of application or cluster. + + All required parameters must be populated in order to send to Azure. + + :ivar rolling_upgrade_mode: Required. The mode used to monitor health during a rolling upgrade. + The values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when + the code version has not changed (the upgrade only changes configuration or data). + :vartype force_restart: bool + :ivar replica_set_check_timeout_in_milliseconds: The maximum amount of time to block processing + of an upgrade domain and prevent loss of availability when there are unexpected issues. When + this timeout expires, processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between + 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :vartype replica_set_check_timeout_in_milliseconds: long + :ivar failure_action: The compensating action to perform when a Monitored upgrade encounters + monitoring policy or health policy violations. + Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will + start rolling back automatically. + Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible + values include: "Invalid", "Rollback", "Manual". + :vartype failure_action: str or ~azure.servicefabric.models.FailureAction + :ivar health_check_wait_duration_in_milliseconds: The amount of time to wait after completing + an upgrade domain before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. + :vartype health_check_wait_duration_in_milliseconds: str + :ivar health_check_stable_duration_in_milliseconds: The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :vartype health_check_stable_duration_in_milliseconds: str + :ivar health_check_retry_timeout_in_milliseconds: The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is executed. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :vartype health_check_retry_timeout_in_milliseconds: str + :ivar upgrade_timeout_in_milliseconds: The amount of time the overall upgrade has to complete + before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the total number of + milliseconds. + :vartype upgrade_timeout_in_milliseconds: str + :ivar upgrade_domain_timeout_in_milliseconds: The amount of time each upgrade domain has to + complete before FailureAction is executed. It is first interpreted as a string representing an + ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + number of milliseconds. + :vartype upgrade_domain_timeout_in_milliseconds: str + :ivar instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster + upgrade, only for those instances which have a non-zero delay duration configured in the + service description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates + that the behavior will entirely depend on the delay configured in the stateless service + description. + :vartype instance_close_delay_duration_in_seconds: long + """ + + _validation = { + 'rolling_upgrade_mode': {'required': True}, + } + + _attribute_map = { + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'replica_set_check_timeout_in_milliseconds': {'key': 'ReplicaSetCheckTimeoutInMilliseconds', 'type': 'long'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, + 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, + 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword rolling_upgrade_mode: Required. The mode used to monitor health during a rolling + upgrade. The values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. + Possible values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :keyword force_restart: If true, then processes are forcefully restarted during upgrade even + when the code version has not changed (the upgrade only changes configuration or data). + :paramtype force_restart: bool + :keyword replica_set_check_timeout_in_milliseconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :paramtype replica_set_check_timeout_in_milliseconds: long + :keyword failure_action: The compensating action to perform when a Monitored upgrade encounters + monitoring policy or health policy violations. + Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will + start rolling back automatically. + Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible + values include: "Invalid", "Rollback", "Manual". + :paramtype failure_action: str or ~azure.servicefabric.models.FailureAction + :keyword health_check_wait_duration_in_milliseconds: The amount of time to wait after + completing an upgrade domain before applying health policies. It is first interpreted as a + string representing an ISO 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. + :paramtype health_check_wait_duration_in_milliseconds: str + :keyword health_check_stable_duration_in_milliseconds: The amount of time that the application + or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is + first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :paramtype health_check_stable_duration_in_milliseconds: str + :keyword health_check_retry_timeout_in_milliseconds: The amount of time to retry health + evaluation when the application or cluster is unhealthy before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :paramtype health_check_retry_timeout_in_milliseconds: str + :keyword upgrade_timeout_in_milliseconds: The amount of time the overall upgrade has to + complete before FailureAction is executed. It is first interpreted as a string representing an + ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + number of milliseconds. + :paramtype upgrade_timeout_in_milliseconds: str + :keyword upgrade_domain_timeout_in_milliseconds: The amount of time each upgrade domain has to + complete before FailureAction is executed. It is first interpreted as a string representing an + ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + number of milliseconds. + :paramtype upgrade_domain_timeout_in_milliseconds: str + :keyword instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a + stateless instance is closed, to allow the active requests to drain gracefully. This would be + effective when the instance is closing during the application/cluster + upgrade, only for those instances which have a non-zero delay duration configured in the + service description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates + that the behavior will entirely depend on the delay configured in the stateless service + description. + :paramtype instance_close_delay_duration_in_seconds: long + """ + super(RollingUpgradeUpdateDescription, self).__init__(**kwargs) + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.force_restart = kwargs.get('force_restart', False) + self.replica_set_check_timeout_in_milliseconds = kwargs.get('replica_set_check_timeout_in_milliseconds', 42949672925) + self.failure_action = kwargs.get('failure_action', None) + self.health_check_wait_duration_in_milliseconds = kwargs.get('health_check_wait_duration_in_milliseconds', "0") + self.health_check_stable_duration_in_milliseconds = kwargs.get('health_check_stable_duration_in_milliseconds', "PT0H2M0S") + self.health_check_retry_timeout_in_milliseconds = kwargs.get('health_check_retry_timeout_in_milliseconds', "PT0H10M0S") + self.upgrade_timeout_in_milliseconds = kwargs.get('upgrade_timeout_in_milliseconds', "P10675199DT02H48M05.4775807S") + self.upgrade_domain_timeout_in_milliseconds = kwargs.get('upgrade_domain_timeout_in_milliseconds', "P10675199DT02H48M05.4775807S") + self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', 4294967295) + + +class RunToCompletionExecutionPolicy(ExecutionPolicy): + """The run to completion execution policy, the service will perform its desired operation and complete successfully. If the service encounters failure, it will restarted based on restart policy specified. If the service completes its operation successfully, it will not be restarted again. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Enumerates the execution policy types for services.Constant filled by + server. Possible values include: "Default", "RunToCompletion". + :vartype type: str or ~azure.servicefabric.models.ExecutionPolicyType + :ivar restart: Required. Enumerates the restart policy for RunToCompletionExecutionPolicy. + Possible values include: "OnFailure", "Never". + :vartype restart: str or ~azure.servicefabric.models.RestartPolicy + """ + + _validation = { + 'type': {'required': True}, + 'restart': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'restart': {'key': 'restart', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword restart: Required. Enumerates the restart policy for RunToCompletionExecutionPolicy. + Possible values include: "OnFailure", "Never". + :paramtype restart: str or ~azure.servicefabric.models.RestartPolicy + """ + super(RunToCompletionExecutionPolicy, self).__init__(**kwargs) + self.type = 'RunToCompletion' # type: str + self.restart = kwargs['restart'] + + +class SafetyCheckWrapper(msrest.serialization.Model): + """A wrapper for the safety check object. Safety checks are performed by service fabric before continuing with the operations. These checks ensure the availability of the service and the reliability of the state. + + :ivar safety_check: Represents a safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. + :vartype safety_check: ~azure.servicefabric.models.SafetyCheck + """ + + _attribute_map = { + 'safety_check': {'key': 'SafetyCheck', 'type': 'SafetyCheck'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword safety_check: Represents a safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. + :paramtype safety_check: ~azure.servicefabric.models.SafetyCheck + """ + super(SafetyCheckWrapper, self).__init__(**kwargs) + self.safety_check = kwargs.get('safety_check', None) + + +class ScalingPolicyDescription(msrest.serialization.Model): + """Describes how the scaling should be performed. + + All required parameters must be populated in order to send to Azure. + + :ivar scaling_trigger: Required. Specifies the trigger associated with this scaling policy. + :vartype scaling_trigger: ~azure.servicefabric.models.ScalingTriggerDescription + :ivar scaling_mechanism: Required. Specifies the mechanism associated with this scaling policy. + :vartype scaling_mechanism: ~azure.servicefabric.models.ScalingMechanismDescription + """ + + _validation = { + 'scaling_trigger': {'required': True}, + 'scaling_mechanism': {'required': True}, + } + + _attribute_map = { + 'scaling_trigger': {'key': 'ScalingTrigger', 'type': 'ScalingTriggerDescription'}, + 'scaling_mechanism': {'key': 'ScalingMechanism', 'type': 'ScalingMechanismDescription'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword scaling_trigger: Required. Specifies the trigger associated with this scaling policy. + :paramtype scaling_trigger: ~azure.servicefabric.models.ScalingTriggerDescription + :keyword scaling_mechanism: Required. Specifies the mechanism associated with this scaling + policy. + :paramtype scaling_mechanism: ~azure.servicefabric.models.ScalingMechanismDescription + """ + super(ScalingPolicyDescription, self).__init__(**kwargs) + self.scaling_trigger = kwargs['scaling_trigger'] + self.scaling_mechanism = kwargs['scaling_mechanism'] + + +class SecondaryReplicatorStatus(ReplicatorStatus): + """Provides statistics about the Service Fabric Replicator, when it is functioning in a ActiveSecondary role. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecondaryActiveReplicatorStatus, SecondaryIdleReplicatorStatus. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. + Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", + "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". + :vartype kind: str or ~azure.servicefabric.models.ReplicaRole + :ivar replication_queue_status: Details about the replication queue on the secondary + replicator. + :vartype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :ivar last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a + replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation message was never + received. + :vartype last_replication_operation_received_time_utc: ~datetime.datetime + :ivar is_in_build: Value that indicates whether the replica is currently being built. + :vartype is_in_build: bool + :ivar copy_queue_status: Details about the copy queue on the secondary replicator. + :vartype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :ivar last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy + operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation message was never + received. + :vartype last_copy_operation_received_time_utc: ~datetime.datetime + :ivar last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an acknowledgment + was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. + :vartype last_acknowledgement_sent_time_utc: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + _subtype_map = { + 'kind': {'ActiveSecondary': 'SecondaryActiveReplicatorStatus', 'IdleSecondary': 'SecondaryIdleReplicatorStatus'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword replication_queue_status: Details about the replication queue on the secondary + replicator. + :paramtype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :keyword last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a + replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation message was never + received. + :paramtype last_replication_operation_received_time_utc: ~datetime.datetime + :keyword is_in_build: Value that indicates whether the replica is currently being built. + :paramtype is_in_build: bool + :keyword copy_queue_status: Details about the copy queue on the secondary replicator. + :paramtype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :keyword last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy + operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation message was never + received. + :paramtype last_copy_operation_received_time_utc: ~datetime.datetime + :keyword last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an + acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. + :paramtype last_acknowledgement_sent_time_utc: ~datetime.datetime + """ + super(SecondaryReplicatorStatus, self).__init__(**kwargs) + self.kind = 'SecondaryReplicatorStatus' # type: str + self.replication_queue_status = kwargs.get('replication_queue_status', None) + self.last_replication_operation_received_time_utc = kwargs.get('last_replication_operation_received_time_utc', None) + self.is_in_build = kwargs.get('is_in_build', None) + self.copy_queue_status = kwargs.get('copy_queue_status', None) + self.last_copy_operation_received_time_utc = kwargs.get('last_copy_operation_received_time_utc', None) + self.last_acknowledgement_sent_time_utc = kwargs.get('last_acknowledgement_sent_time_utc', None) + + +class SecondaryActiveReplicatorStatus(SecondaryReplicatorStatus): + """Status of the secondary replicator when it is in active mode and is part of the replica set. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. + Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", + "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". + :vartype kind: str or ~azure.servicefabric.models.ReplicaRole + :ivar replication_queue_status: Details about the replication queue on the secondary + replicator. + :vartype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :ivar last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a + replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation message was never + received. + :vartype last_replication_operation_received_time_utc: ~datetime.datetime + :ivar is_in_build: Value that indicates whether the replica is currently being built. + :vartype is_in_build: bool + :ivar copy_queue_status: Details about the copy queue on the secondary replicator. + :vartype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :ivar last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy + operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation message was never + received. + :vartype last_copy_operation_received_time_utc: ~datetime.datetime + :ivar last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an acknowledgment + was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. + :vartype last_acknowledgement_sent_time_utc: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword replication_queue_status: Details about the replication queue on the secondary + replicator. + :paramtype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :keyword last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a + replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation message was never + received. + :paramtype last_replication_operation_received_time_utc: ~datetime.datetime + :keyword is_in_build: Value that indicates whether the replica is currently being built. + :paramtype is_in_build: bool + :keyword copy_queue_status: Details about the copy queue on the secondary replicator. + :paramtype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :keyword last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy + operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation message was never + received. + :paramtype last_copy_operation_received_time_utc: ~datetime.datetime + :keyword last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an + acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. + :paramtype last_acknowledgement_sent_time_utc: ~datetime.datetime + """ + super(SecondaryActiveReplicatorStatus, self).__init__(**kwargs) + self.kind = 'ActiveSecondary' # type: str + + +class SecondaryIdleReplicatorStatus(SecondaryReplicatorStatus): + """Status of the secondary replicator when it is in idle mode and is being built by the primary. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. + Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", + "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". + :vartype kind: str or ~azure.servicefabric.models.ReplicaRole + :ivar replication_queue_status: Details about the replication queue on the secondary + replicator. + :vartype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :ivar last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a + replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation message was never + received. + :vartype last_replication_operation_received_time_utc: ~datetime.datetime + :ivar is_in_build: Value that indicates whether the replica is currently being built. + :vartype is_in_build: bool + :ivar copy_queue_status: Details about the copy queue on the secondary replicator. + :vartype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :ivar last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy + operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation message was never + received. + :vartype last_copy_operation_received_time_utc: ~datetime.datetime + :ivar last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an acknowledgment + was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. + :vartype last_acknowledgement_sent_time_utc: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword replication_queue_status: Details about the replication queue on the secondary + replicator. + :paramtype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :keyword last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a + replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation message was never + received. + :paramtype last_replication_operation_received_time_utc: ~datetime.datetime + :keyword is_in_build: Value that indicates whether the replica is currently being built. + :paramtype is_in_build: bool + :keyword copy_queue_status: Details about the copy queue on the secondary replicator. + :paramtype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :keyword last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy + operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation message was never + received. + :paramtype last_copy_operation_received_time_utc: ~datetime.datetime + :keyword last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an + acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. + :paramtype last_acknowledgement_sent_time_utc: ~datetime.datetime + """ + super(SecondaryIdleReplicatorStatus, self).__init__(**kwargs) + self.kind = 'IdleSecondary' # type: str + + +class SecretResourceDescription(msrest.serialization.Model): + """This type describes a secret resource. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: Required. Describes the properties of a secret resource. + :vartype properties: ~azure.servicefabric.models.SecretResourceProperties + :ivar name: Required. Name of the Secret resource. + :vartype name: str + """ + + _validation = { + 'properties': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'SecretResourceProperties'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Required. Describes the properties of a secret resource. + :paramtype properties: ~azure.servicefabric.models.SecretResourceProperties + :keyword name: Required. Name of the Secret resource. + :paramtype name: str + """ + super(SecretResourceDescription, self).__init__(**kwargs) + self.properties = kwargs['properties'] + self.name = kwargs['name'] + + +class SecretValue(msrest.serialization.Model): + """This type represents the unencrypted value of the secret. + + :ivar value: The actual value of the secret. + :vartype value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: The actual value of the secret. + :paramtype value: str + """ + super(SecretValue, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class SecretValueProperties(msrest.serialization.Model): + """This type describes properties of secret value resource. + + :ivar value: The actual value of the secret. + :vartype value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: The actual value of the secret. + :paramtype value: str + """ + super(SecretValueProperties, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class SecretValueResourceDescription(msrest.serialization.Model): + """This type describes a value of a secret resource. The name of this resource is the version identifier corresponding to this secret value. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Version identifier of the secret value. + :vartype name: str + :ivar value: The actual value of the secret. + :vartype value: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. Version identifier of the secret value. + :paramtype name: str + :keyword value: The actual value of the secret. + :paramtype value: str + """ + super(SecretValueResourceDescription, self).__init__(**kwargs) + self.name = kwargs['name'] + self.value = kwargs.get('value', None) + + +class SecretValueResourceProperties(SecretValueProperties): + """This type describes properties of a secret value resource. + + :ivar value: The actual value of the secret. + :vartype value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: The actual value of the secret. + :paramtype value: str + """ + super(SecretValueResourceProperties, self).__init__(**kwargs) + + +class SeedNodeSafetyCheck(SafetyCheck): + """Represents a safety check for the seed nodes being performed by service fabric before continuing with node level operations. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(SeedNodeSafetyCheck, self).__init__(**kwargs) + self.kind = 'EnsureSeedNodeQuorum' # type: str + + +class SelectedPartition(msrest.serialization.Model): + """This class returns information about the partition that the user-induced operation acted upon. + + :ivar service_name: The name of the service the partition belongs to. + :vartype service_name: str + :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :vartype partition_id: str + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_name: The name of the service the partition belongs to. + :paramtype service_name: str + :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :paramtype partition_id: str + """ + super(SelectedPartition, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) + + +class ServiceBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information for a specific Service Fabric service specifying what backup policy is being applied and suspend description, if any. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The entity type of a Service Fabric entity such as Application, Service + or a Partition where periodic backups can be enabled.Constant filled by server. Possible values + include: "Invalid", "Partition", "Service", "Application". + :vartype kind: str or ~azure.servicefabric.models.BackupEntityKind + :ivar policy_name: The name of the backup policy which is applicable to this Service Fabric + application or service or partition. + :vartype policy_name: str + :ivar policy_inherited_from: Specifies the scope at which the backup policy is applied. + Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope + :ivar suspension_info: Describes the backup suspension details. + :vartype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :ivar service_name: The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword policy_name: The name of the backup policy which is applicable to this Service Fabric + application or service or partition. + :paramtype policy_name: str + :keyword policy_inherited_from: Specifies the scope at which the backup policy is applied. + Possible values include: "Invalid", "Partition", "Service", "Application". + :paramtype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope + :keyword suspension_info: Describes the backup suspension details. + :paramtype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :keyword service_name: The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + """ + super(ServiceBackupConfigurationInfo, self).__init__(**kwargs) + self.kind = 'Service' # type: str + self.service_name = kwargs.get('service_name', None) + + +class ServiceBackupEntity(BackupEntity): + """Identifies the Service Fabric stateful service which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_kind: Required. The entity type of a Service Fabric entity such as Application, + Service or a Partition where periodic backups can be enabled.Constant filled by server. + Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype entity_kind: str or ~azure.servicefabric.models.BackupEntityKind + :ivar service_name: The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_name: The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + """ + super(ServiceBackupEntity, self).__init__(**kwargs) + self.entity_kind = 'Service' # type: str + self.service_name = kwargs.get('service_name', None) + + +class ServiceCorrelationDescription(msrest.serialization.Model): + """Creates a particular correlation between services. + + All required parameters must be populated in order to send to Azure. + + :ivar scheme: Required. The ServiceCorrelationScheme which describes the relationship between + this service and the service specified via ServiceName. Possible values include: "Invalid", + "Affinity", "AlignedAffinity", "NonAlignedAffinity". + :vartype scheme: str or ~azure.servicefabric.models.ServiceCorrelationScheme + :ivar service_name: Required. The name of the service that the correlation relationship is + established with. + :vartype service_name: str + """ + + _validation = { + 'scheme': {'required': True}, + 'service_name': {'required': True}, + } + + _attribute_map = { + 'scheme': {'key': 'Scheme', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword scheme: Required. The ServiceCorrelationScheme which describes the relationship + between this service and the service specified via ServiceName. Possible values include: + "Invalid", "Affinity", "AlignedAffinity", "NonAlignedAffinity". + :paramtype scheme: str or ~azure.servicefabric.models.ServiceCorrelationScheme + :keyword service_name: Required. The name of the service that the correlation relationship is + established with. + :paramtype service_name: str + """ + super(ServiceCorrelationDescription, self).__init__(**kwargs) + self.scheme = kwargs['scheme'] + self.service_name = kwargs['service_name'] + + +class ServiceEvent(FabricEvent): + """Represents the base for all Service Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ServiceCreatedEvent, ServiceDeletedEvent, ServiceHealthReportExpiredEvent, ServiceNewHealthReportEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar service_id: Required. The identity of the service. This ID is an encoded representation + of the service name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype service_id: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'service_id': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ServiceCreated': 'ServiceCreatedEvent', 'ServiceDeleted': 'ServiceDeletedEvent', 'ServiceHealthReportExpired': 'ServiceHealthReportExpiredEvent', 'ServiceNewHealthReport': 'ServiceNewHealthReportEvent'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword service_id: Required. The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to identify the service + resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype service_id: str + """ + super(ServiceEvent, self).__init__(**kwargs) + self.kind = 'ServiceEvent' # type: str + self.service_id = kwargs['service_id'] + + +class ServiceCreatedEvent(ServiceEvent): + """Service Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar service_id: Required. The identity of the service. This ID is an encoded representation + of the service name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype service_id: str + :ivar service_type_name: Required. Service type name. + :vartype service_type_name: str + :ivar application_name: Required. Application name. + :vartype application_name: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar service_instance: Required. Id of Service instance. + :vartype service_instance: long + :ivar is_stateful: Required. Indicates if Service is stateful. + :vartype is_stateful: bool + :ivar partition_count: Required. Number of partitions. + :vartype partition_count: int + :ivar target_replica_set_size: Required. Size of target replicas set. + :vartype target_replica_set_size: int + :ivar min_replica_set_size: Required. Minimum size of replicas set. + :vartype min_replica_set_size: int + :ivar service_package_version: Required. Version of Service package. + :vartype service_package_version: str + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'service_id': {'required': True}, + 'service_type_name': {'required': True}, + 'application_name': {'required': True}, + 'application_type_name': {'required': True}, + 'service_instance': {'required': True}, + 'is_stateful': {'required': True}, + 'partition_count': {'required': True}, + 'target_replica_set_size': {'required': True}, + 'min_replica_set_size': {'required': True}, + 'service_package_version': {'required': True}, + 'partition_id': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword service_id: Required. The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to identify the service + resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype service_id: str + :keyword service_type_name: Required. Service type name. + :paramtype service_type_name: str + :keyword application_name: Required. Application name. + :paramtype application_name: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword service_instance: Required. Id of Service instance. + :paramtype service_instance: long + :keyword is_stateful: Required. Indicates if Service is stateful. + :paramtype is_stateful: bool + :keyword partition_count: Required. Number of partitions. + :paramtype partition_count: int + :keyword target_replica_set_size: Required. Size of target replicas set. + :paramtype target_replica_set_size: int + :keyword min_replica_set_size: Required. Minimum size of replicas set. + :paramtype min_replica_set_size: int + :keyword service_package_version: Required. Version of Service package. + :paramtype service_package_version: str + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + """ + super(ServiceCreatedEvent, self).__init__(**kwargs) + self.kind = 'ServiceCreated' # type: str + self.service_type_name = kwargs['service_type_name'] + self.application_name = kwargs['application_name'] + self.application_type_name = kwargs['application_type_name'] + self.service_instance = kwargs['service_instance'] + self.is_stateful = kwargs['is_stateful'] + self.partition_count = kwargs['partition_count'] + self.target_replica_set_size = kwargs['target_replica_set_size'] + self.min_replica_set_size = kwargs['min_replica_set_size'] + self.service_package_version = kwargs['service_package_version'] + self.partition_id = kwargs['partition_id'] + + +class ServiceDeletedEvent(ServiceEvent): + """Service Deleted event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar service_id: Required. The identity of the service. This ID is an encoded representation + of the service name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype service_id: str + :ivar service_type_name: Required. Service type name. + :vartype service_type_name: str + :ivar application_name: Required. Application name. + :vartype application_name: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar service_instance: Required. Id of Service instance. + :vartype service_instance: long + :ivar is_stateful: Required. Indicates if Service is stateful. + :vartype is_stateful: bool + :ivar partition_count: Required. Number of partitions. + :vartype partition_count: int + :ivar target_replica_set_size: Required. Size of target replicas set. + :vartype target_replica_set_size: int + :ivar min_replica_set_size: Required. Minimum size of replicas set. + :vartype min_replica_set_size: int + :ivar service_package_version: Required. Version of Service package. + :vartype service_package_version: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'service_id': {'required': True}, + 'service_type_name': {'required': True}, + 'application_name': {'required': True}, + 'application_type_name': {'required': True}, + 'service_instance': {'required': True}, + 'is_stateful': {'required': True}, + 'partition_count': {'required': True}, + 'target_replica_set_size': {'required': True}, + 'min_replica_set_size': {'required': True}, + 'service_package_version': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword service_id: Required. The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to identify the service + resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype service_id: str + :keyword service_type_name: Required. Service type name. + :paramtype service_type_name: str + :keyword application_name: Required. Application name. + :paramtype application_name: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword service_instance: Required. Id of Service instance. + :paramtype service_instance: long + :keyword is_stateful: Required. Indicates if Service is stateful. + :paramtype is_stateful: bool + :keyword partition_count: Required. Number of partitions. + :paramtype partition_count: int + :keyword target_replica_set_size: Required. Size of target replicas set. + :paramtype target_replica_set_size: int + :keyword min_replica_set_size: Required. Minimum size of replicas set. + :paramtype min_replica_set_size: int + :keyword service_package_version: Required. Version of Service package. + :paramtype service_package_version: str + """ + super(ServiceDeletedEvent, self).__init__(**kwargs) + self.kind = 'ServiceDeleted' # type: str + self.service_type_name = kwargs['service_type_name'] + self.application_name = kwargs['application_name'] + self.application_type_name = kwargs['application_type_name'] + self.service_instance = kwargs['service_instance'] + self.is_stateful = kwargs['is_stateful'] + self.partition_count = kwargs['partition_count'] + self.target_replica_set_size = kwargs['target_replica_set_size'] + self.min_replica_set_size = kwargs['min_replica_set_size'] + self.service_package_version = kwargs['service_package_version'] + + +class ServiceDescription(msrest.serialization.Model): + """A ServiceDescription contains all of the information necessary to create a service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceDescription, StatelessServiceDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The service kind.Constant filled by server. Possible values + include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar service_name: Required. The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar service_type_name: Required. Name of the service type as specified in the service + manifest. + :vartype service_type_name: str + :ivar initialization_data: The initialization data as an array of bytes. Initialization data is + passed to service instances or replicas when they are created. + :vartype initialization_data: list[int] + :ivar partition_description: Required. The partition description as an object. + :vartype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription + :ivar placement_constraints: The placement constraints as a string. Placement constraints are + boolean expressions on node properties and allow for restricting a service to particular nodes + based on the service requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :vartype placement_constraints: str + :ivar correlation_scheme: The correlation scheme. + :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :ivar service_load_metrics: The service load metrics. + :vartype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: The service placement policies. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", + "Medium", "High", "VeryHigh". + :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :ivar is_default_move_cost_specified: Indicates if the DefaultMoveCost property is specified. + :vartype is_default_move_cost_specified: bool + :ivar service_package_activation_mode: The activation mode of service package to be used for a + service. Possible values include: "SharedProcess", "ExclusiveProcess". + :vartype service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :ivar service_dns_name: The DNS name of the service. It requires the DNS system service to be + enabled in Service Fabric cluster. + :vartype service_dns_name: str + :ivar scaling_policies: Scaling policies for this service. + :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :ivar tags_required_to_place: Tags for placement of this service. + :vartype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription + :ivar tags_required_to_run: Tags for running of this service. + :vartype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription + """ + + _validation = { + 'service_kind': {'required': True}, + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceDescription', 'Stateless': 'StatelessServiceDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword service_name: Required. The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword service_type_name: Required. Name of the service type as specified in the service + manifest. + :paramtype service_type_name: str + :keyword initialization_data: The initialization data as an array of bytes. Initialization data + is passed to service instances or replicas when they are created. + :paramtype initialization_data: list[int] + :keyword partition_description: Required. The partition description as an object. + :paramtype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription + :keyword placement_constraints: The placement constraints as a string. Placement constraints + are boolean expressions on node properties and allow for restricting a service to particular + nodes based on the service requirements. For example, to place a service on nodes where + NodeType is blue specify the following: "NodeColor == blue)". + :paramtype placement_constraints: str + :keyword correlation_scheme: The correlation scheme. + :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :keyword service_load_metrics: The service load metrics. + :paramtype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: The service placement policies. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", + "Low", "Medium", "High", "VeryHigh". + :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :keyword is_default_move_cost_specified: Indicates if the DefaultMoveCost property is + specified. + :paramtype is_default_move_cost_specified: bool + :keyword service_package_activation_mode: The activation mode of service package to be used for + a service. Possible values include: "SharedProcess", "ExclusiveProcess". + :paramtype service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :keyword service_dns_name: The DNS name of the service. It requires the DNS system service to + be enabled in Service Fabric cluster. + :paramtype service_dns_name: str + :keyword scaling_policies: Scaling policies for this service. + :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :keyword tags_required_to_place: Tags for placement of this service. + :paramtype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription + :keyword tags_required_to_run: Tags for running of this service. + :paramtype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription + """ + super(ServiceDescription, self).__init__(**kwargs) + self.service_kind = None # type: Optional[str] + self.application_name = kwargs.get('application_name', None) + self.service_name = kwargs['service_name'] + self.service_type_name = kwargs['service_type_name'] + self.initialization_data = kwargs.get('initialization_data', None) + self.partition_description = kwargs['partition_description'] + self.placement_constraints = kwargs.get('placement_constraints', None) + self.correlation_scheme = kwargs.get('correlation_scheme', None) + self.service_load_metrics = kwargs.get('service_load_metrics', None) + self.service_placement_policies = kwargs.get('service_placement_policies', None) + self.default_move_cost = kwargs.get('default_move_cost', None) + self.is_default_move_cost_specified = kwargs.get('is_default_move_cost_specified', None) + self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) + self.service_dns_name = kwargs.get('service_dns_name', None) + self.scaling_policies = kwargs.get('scaling_policies', None) + self.tags_required_to_place = kwargs.get('tags_required_to_place', None) + self.tags_required_to_run = kwargs.get('tags_required_to_run', None) + + +class ServiceFromTemplateDescription(msrest.serialization.Model): + """Defines description for creating a Service Fabric service from a template defined in the application manifest. + + All required parameters must be populated in order to send to Azure. + + :ivar application_name: Required. The name of the application, including the 'fabric:' URI + scheme. + :vartype application_name: str + :ivar service_name: Required. The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar service_type_name: Required. Name of the service type as specified in the service + manifest. + :vartype service_type_name: str + :ivar initialization_data: The initialization data for the newly created service instance. + :vartype initialization_data: list[int] + :ivar service_package_activation_mode: The activation mode of service package to be used for a + service. Possible values include: "SharedProcess", "ExclusiveProcess". + :vartype service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :ivar service_dns_name: The DNS name of the service. It requires the DNS system service to be + enabled in Service Fabric cluster. + :vartype service_dns_name: str + """ + + _validation = { + 'application_name': {'required': True}, + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword application_name: Required. The name of the application, including the 'fabric:' URI + scheme. + :paramtype application_name: str + :keyword service_name: Required. The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword service_type_name: Required. Name of the service type as specified in the service + manifest. + :paramtype service_type_name: str + :keyword initialization_data: The initialization data for the newly created service instance. + :paramtype initialization_data: list[int] + :keyword service_package_activation_mode: The activation mode of service package to be used for + a service. Possible values include: "SharedProcess", "ExclusiveProcess". + :paramtype service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :keyword service_dns_name: The DNS name of the service. It requires the DNS system service to + be enabled in Service Fabric cluster. + :paramtype service_dns_name: str + """ + super(ServiceFromTemplateDescription, self).__init__(**kwargs) + self.application_name = kwargs['application_name'] + self.service_name = kwargs['service_name'] + self.service_type_name = kwargs['service_type_name'] + self.initialization_data = kwargs.get('initialization_data', None) + self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) + self.service_dns_name = kwargs.get('service_dns_name', None) + + +class ServiceHealth(EntityHealth): + """Information about the health of a Service Fabric service. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar name: The name of the service whose health information is described by this object. + :vartype name: str + :ivar partition_health_states: The list of partition health states associated with the service. + :vartype partition_health_states: list[~azure.servicefabric.models.PartitionHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'partition_health_states': {'key': 'PartitionHealthStates', 'type': '[PartitionHealthState]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword name: The name of the service whose health information is described by this object. + :paramtype name: str + :keyword partition_health_states: The list of partition health states associated with the + service. + :paramtype partition_health_states: list[~azure.servicefabric.models.PartitionHealthState] + """ + super(ServiceHealth, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.partition_health_states = kwargs.get('partition_health_states', None) + + +class ServiceHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a service, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar service_name: Name of the service whose health evaluation is described by this object. + :vartype service_name: str + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated + health state of the service. The types of the unhealthy evaluations can be + PartitionsHealthEvaluation or EventHealthEvaluation. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword service_name: Name of the service whose health evaluation is described by this object. + :paramtype service_name: str + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current + aggregated health state of the service. The types of the unhealthy evaluations can be + PartitionsHealthEvaluation or EventHealthEvaluation. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(ServiceHealthEvaluation, self).__init__(**kwargs) + self.kind = 'Service' # type: str + self.service_name = kwargs.get('service_name', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class ServiceHealthReportExpiredEvent(ServiceEvent): + """Service Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar service_id: Required. The identity of the service. This ID is an encoded representation + of the service name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype service_id: str + :ivar instance_id: Required. Id of Service instance. + :vartype instance_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'service_id': {'required': True}, + 'instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword service_id: Required. The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to identify the service + resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype service_id: str + :keyword instance_id: Required. Id of Service instance. + :paramtype instance_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(ServiceHealthReportExpiredEvent, self).__init__(**kwargs) + self.kind = 'ServiceHealthReportExpired' # type: str + self.instance_id = kwargs['instance_id'] + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class ServiceHealthState(EntityHealthState): + """Represents the health state of a service, which contains the service identifier and its aggregated health state. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_name: Name of the service whose health state is represented by this object. + :vartype service_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword service_name: Name of the service whose health state is represented by this object. + :paramtype service_name: str + """ + super(ServiceHealthState, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + + +class ServiceHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a service, which contains the service name, its aggregated health state and any partitions that respect the filters in the cluster health chunk query description. + + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_name: The name of the service whose health state chunk is provided in this + object. + :vartype service_name: str + :ivar partition_health_state_chunks: The list of partition health state chunks belonging to the + service that respect the filters in the cluster health chunk query description. + :vartype partition_health_state_chunks: + ~azure.servicefabric.models.PartitionHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_health_state_chunks': {'key': 'PartitionHealthStateChunks', 'type': 'PartitionHealthStateChunkList'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword service_name: The name of the service whose health state chunk is provided in this + object. + :paramtype service_name: str + :keyword partition_health_state_chunks: The list of partition health state chunks belonging to + the service that respect the filters in the cluster health chunk query description. + :paramtype partition_health_state_chunks: + ~azure.servicefabric.models.PartitionHealthStateChunkList + """ + super(ServiceHealthStateChunk, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_health_state_chunks = kwargs.get('partition_health_state_chunks', None) + + +class ServiceHealthStateChunkList(msrest.serialization.Model): + """The list of service health state chunks that respect the input filters in the chunk query. Returned by get cluster health state chunks query. + + :ivar items: The list of service health state chunks that respect the input filters in the + chunk query. + :vartype items: list[~azure.servicefabric.models.ServiceHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[ServiceHealthStateChunk]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword items: The list of service health state chunks that respect the input filters in the + chunk query. + :paramtype items: list[~azure.servicefabric.models.ServiceHealthStateChunk] + """ + super(ServiceHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) + + +class ServiceHealthStateFilter(msrest.serialization.Model): + """Defines matching criteria to determine whether a service should be included as a child of an application in the cluster health chunk. +The services are only returned if the parent application matches a filter specified in the cluster health chunk query description. +One filter can match zero, one or multiple services, depending on its properties. + + :ivar service_name_filter: The name of the service that matches the filter. The filter is + applied only to the specified service, if it exists. + If the service doesn't exist, no service is returned in the cluster health chunk based on this + filter. + If the service exists, it is included as the application's child if the health state matches + the other filter properties. + If not specified, all services that match the parent filters (if any) are taken into + consideration and matched against the other filter members, like health state filter. + :vartype service_name_filter: str + :ivar health_state_filter: The filter for the health state of the services. It allows selecting + services if they match the desired health states. + The possible values are integer value of one of the following health states. Only services + that match the filter are returned. All services are used to evaluate the cluster aggregated + health state. + If not specified, default value is None, unless the service name is specified. If the filter + has default value and service name is specified, the matching service is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches services with HealthState value of OK (2) + and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :vartype health_state_filter: int + :ivar partition_filters: Defines a list of filters that specify which partitions to be included + in the returned cluster health chunk as children of the service. The partitions are returned + only if the parent service matches a filter. + If the list is empty, no partitions are returned. All the partitions are used to evaluate the + parent service aggregated health state, regardless of the input filters. + The service filter may specify multiple partition filters. + For example, it can specify a filter to return all partitions with health state Error and + another filter to always include a partition identified by its partition ID. + :vartype partition_filters: list[~azure.servicefabric.models.PartitionHealthStateFilter] + """ + + _attribute_map = { + 'service_name_filter': {'key': 'ServiceNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'partition_filters': {'key': 'PartitionFilters', 'type': '[PartitionHealthStateFilter]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_name_filter: The name of the service that matches the filter. The filter is + applied only to the specified service, if it exists. + If the service doesn't exist, no service is returned in the cluster health chunk based on this + filter. + If the service exists, it is included as the application's child if the health state matches + the other filter properties. + If not specified, all services that match the parent filters (if any) are taken into + consideration and matched against the other filter members, like health state filter. + :paramtype service_name_filter: str + :keyword health_state_filter: The filter for the health state of the services. It allows + selecting services if they match the desired health states. + The possible values are integer value of one of the following health states. Only services + that match the filter are returned. All services are used to evaluate the cluster aggregated + health state. + If not specified, default value is None, unless the service name is specified. If the filter + has default value and service name is specified, the matching service is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches services with HealthState value of OK (2) + and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :paramtype health_state_filter: int + :keyword partition_filters: Defines a list of filters that specify which partitions to be + included in the returned cluster health chunk as children of the service. The partitions are + returned only if the parent service matches a filter. + If the list is empty, no partitions are returned. All the partitions are used to evaluate the + parent service aggregated health state, regardless of the input filters. + The service filter may specify multiple partition filters. + For example, it can specify a filter to return all partitions with health state Error and + another filter to always include a partition identified by its partition ID. + :paramtype partition_filters: list[~azure.servicefabric.models.PartitionHealthStateFilter] + """ + super(ServiceHealthStateFilter, self).__init__(**kwargs) + self.service_name_filter = kwargs.get('service_name_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) + self.partition_filters = kwargs.get('partition_filters', None) + + +class ServiceIdentity(msrest.serialization.Model): + """Map service identity friendly name to an application identity. + + :ivar name: The identity friendly name. + :vartype name: str + :ivar identity_ref: The application identity name. + :vartype identity_ref: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'identity_ref': {'key': 'identityRef', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: The identity friendly name. + :paramtype name: str + :keyword identity_ref: The application identity name. + :paramtype identity_ref: str + """ + super(ServiceIdentity, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.identity_ref = kwargs.get('identity_ref', None) + + +class ServiceInfo(msrest.serialization.Model): + """Information about a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceInfo, StatelessServiceInfo. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The identity of the service. This ID is an encoded representation of the service + name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype id: str + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar name: The full name of the service with 'fabric:' URI scheme. + :vartype name: str + :ivar type_name: Name of the service type as specified in the service manifest. + :vartype type_name: str + :ivar manifest_version: The version of the service manifest. + :vartype manifest_version: str + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_status: The status of the application. Possible values include: "Unknown", + "Active", "Upgrading", "Deleting", "Creating", "Failed". + :vartype service_status: str or ~azure.servicefabric.models.ServiceStatus + :ivar is_service_group: Whether the service is in a service group. + :vartype is_service_group: bool + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceInfo', 'Stateless': 'StatelessServiceInfo'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: The identity of the service. This ID is an encoded representation of the service + name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype id: str + :keyword name: The full name of the service with 'fabric:' URI scheme. + :paramtype name: str + :keyword type_name: Name of the service type as specified in the service manifest. + :paramtype type_name: str + :keyword manifest_version: The version of the service manifest. + :paramtype manifest_version: str + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword service_status: The status of the application. Possible values include: "Unknown", + "Active", "Upgrading", "Deleting", "Creating", "Failed". + :paramtype service_status: str or ~azure.servicefabric.models.ServiceStatus + :keyword is_service_group: Whether the service is in a service group. + :paramtype is_service_group: bool + """ + super(ServiceInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.service_kind = None # type: Optional[str] + self.name = kwargs.get('name', None) + self.type_name = kwargs.get('type_name', None) + self.manifest_version = kwargs.get('manifest_version', None) + self.health_state = kwargs.get('health_state', None) + self.service_status = kwargs.get('service_status', None) + self.is_service_group = kwargs.get('is_service_group', None) + + +class ServiceLoadMetricDescription(msrest.serialization.Model): + """Specifies a metric to load balance a service during runtime. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype name: str + :ivar weight: The service load metric relative weight, compared to other metrics configured for + this service, as a number. Possible values include: "Zero", "Low", "Medium", "High". + :vartype weight: str or ~azure.servicefabric.models.ServiceLoadMetricWeight + :ivar primary_default_load: Used only for Stateful services. The default amount of load, as a + number, that this service creates for this metric when it is a Primary replica. + :vartype primary_default_load: int + :ivar secondary_default_load: Used only for Stateful services. The default amount of load, as a + number, that this service creates for this metric when it is a Secondary replica. + :vartype secondary_default_load: int + :ivar auxiliary_default_load: Used only for Stateful services. The default amount of load, as a + number, that this service creates for this metric when it is an Auxiliary replica. + :vartype auxiliary_default_load: int + :ivar default_load: Used only for Stateless services. The default amount of load, as a number, + that this service creates for this metric. + :vartype default_load: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'weight': {'key': 'Weight', 'type': 'str'}, + 'primary_default_load': {'key': 'PrimaryDefaultLoad', 'type': 'int'}, + 'secondary_default_load': {'key': 'SecondaryDefaultLoad', 'type': 'int'}, + 'auxiliary_default_load': {'key': 'AuxiliaryDefaultLoad', 'type': 'int'}, + 'default_load': {'key': 'DefaultLoad', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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. + :paramtype name: str + :keyword weight: The service load metric relative weight, compared to other metrics configured + for this service, as a number. Possible values include: "Zero", "Low", "Medium", "High". + :paramtype weight: str or ~azure.servicefabric.models.ServiceLoadMetricWeight + :keyword primary_default_load: Used only for Stateful services. The default amount of load, as + a number, that this service creates for this metric when it is a Primary replica. + :paramtype primary_default_load: int + :keyword secondary_default_load: Used only for Stateful services. The default amount of load, + as a number, that this service creates for this metric when it is a Secondary replica. + :paramtype secondary_default_load: int + :keyword auxiliary_default_load: Used only for Stateful services. The default amount of load, + as a number, that this service creates for this metric when it is an Auxiliary replica. + :paramtype auxiliary_default_load: int + :keyword default_load: Used only for Stateless services. The default amount of load, as a + number, that this service creates for this metric. + :paramtype default_load: int + """ + super(ServiceLoadMetricDescription, self).__init__(**kwargs) + self.name = kwargs['name'] + self.weight = kwargs.get('weight', None) + self.primary_default_load = kwargs.get('primary_default_load', None) + self.secondary_default_load = kwargs.get('secondary_default_load', None) + self.auxiliary_default_load = kwargs.get('auxiliary_default_load', None) + self.default_load = kwargs.get('default_load', None) + + +class ServiceNameInfo(msrest.serialization.Model): + """Information about the service name. + + :ivar id: The identity of the service. This ID is an encoded representation of the service + name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype id: str + :ivar name: The full name of the service with 'fabric:' URI scheme. + :vartype name: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: The identity of the service. This ID is an encoded representation of the service + name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype id: str + :keyword name: The full name of the service with 'fabric:' URI scheme. + :paramtype name: str + """ + super(ServiceNameInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + + +class ServiceNewHealthReportEvent(ServiceEvent): + """Service Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar service_id: Required. The identity of the service. This ID is an encoded representation + of the service name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype service_id: str + :ivar instance_id: Required. Id of Service instance. + :vartype instance_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'service_id': {'required': True}, + 'instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword service_id: Required. The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to identify the service + resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype service_id: str + :keyword instance_id: Required. Id of Service instance. + :paramtype instance_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(ServiceNewHealthReportEvent, self).__init__(**kwargs) + self.kind = 'ServiceNewHealthReport' # type: str + self.instance_id = kwargs['instance_id'] + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class ServicePartitionInfo(msrest.serialization.Model): + """Information about a partition of a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServicePartitionInfo, StatelessServicePartitionInfo. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar partition_status: The status of the service fabric service partition. Possible values + include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". + :vartype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus + :ivar partition_information: Information about the partition identity, partitioning scheme and + keys supported by it. + :vartype partition_information: ~azure.servicefabric.models.PartitionInformation + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServicePartitionInfo', 'Stateless': 'StatelessServicePartitionInfo'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword partition_status: The status of the service fabric service partition. Possible values + include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". + :paramtype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus + :keyword partition_information: Information about the partition identity, partitioning scheme + and keys supported by it. + :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation + """ + super(ServicePartitionInfo, self).__init__(**kwargs) + self.service_kind = None # type: Optional[str] + self.health_state = kwargs.get('health_state', None) + self.partition_status = kwargs.get('partition_status', None) + self.partition_information = kwargs.get('partition_information', None) + + +class ServicePlacementPolicyDescription(msrest.serialization.Model): + """Describes the policy to be used for placement of a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, ServicePlacementInvalidDomainPolicyDescription, ServicePlacementNonPartiallyPlaceServicePolicyDescription, ServicePlacementPreferPrimaryDomainPolicyDescription, ServicePlacementRequiredDomainPolicyDescription, ServicePlacementRequireDomainDistributionPolicyDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The type of placement policy for a service fabric service. Following are + the possible values.Constant filled by server. Possible values include: "Invalid", + "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", + "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". + :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'AllowMultipleStatelessInstancesOnNode': 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', 'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ServicePlacementPolicyDescription, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + +class ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service allowing multiple stateless instances of a partition of the service to be placed on a node. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The type of placement policy for a service fabric service. Following are + the possible values.Constant filled by server. Possible values include: "Invalid", + "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", + "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". + :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType + :ivar domain_name: Holdover from other policy descriptions, not used for this policy, values + are ignored by runtime. Keeping it for any backwards-compatibility with clients. + :vartype domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword domain_name: Holdover from other policy descriptions, not used for this policy, values + are ignored by runtime. Keeping it for any backwards-compatibility with clients. + :paramtype domain_name: str + """ + super(ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, self).__init__(**kwargs) + self.type = 'AllowMultipleStatelessInstancesOnNode' # type: str + self.domain_name = kwargs.get('domain_name', None) + + +class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service where a particular fault or upgrade domain should not be used for placement of the instances or replicas of that service. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The type of placement policy for a service fabric service. Following are + the possible values.Constant filled by server. Possible values include: "Invalid", + "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", + "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". + :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType + :ivar domain_name: The name of the domain that should not be used for placement. + :vartype domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword domain_name: The name of the domain that should not be used for placement. + :paramtype domain_name: str + """ + super(ServicePlacementInvalidDomainPolicyDescription, self).__init__(**kwargs) + self.type = 'InvalidDomain' # type: str + self.domain_name = kwargs.get('domain_name', None) + + +class ServicePlacementNonPartiallyPlaceServicePolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service where all replicas must be able to be placed in order for any replicas to be created. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The type of placement policy for a service fabric service. Following are + the possible values.Constant filled by server. Possible values include: "Invalid", + "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", + "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". + :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ServicePlacementNonPartiallyPlaceServicePolicyDescription, self).__init__(**kwargs) + self.type = 'NonPartiallyPlaceService' # type: str + + +class ServicePlacementPreferPrimaryDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service where the service's Primary replicas should optimally be placed in a particular domain. + +This placement policy is usually used with fault domains in scenarios where the Service Fabric cluster is geographically distributed in order to indicate that a service's primary replica should be located in a particular fault domain, which in geo-distributed scenarios usually aligns with regional or datacenter boundaries. Note that since this is an optimization it is possible that the Primary replica may not end up located in this domain due to failures, capacity limits, or other constraints. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The type of placement policy for a service fabric service. Following are + the possible values.Constant filled by server. Possible values include: "Invalid", + "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", + "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". + :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType + :ivar domain_name: The name of the domain that should used for placement as per this policy. + :vartype domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword domain_name: The name of the domain that should used for placement as per this policy. + :paramtype domain_name: str + """ + super(ServicePlacementPreferPrimaryDomainPolicyDescription, self).__init__(**kwargs) + self.type = 'PreferPrimaryDomain' # type: str + self.domain_name = kwargs.get('domain_name', None) + + +class ServicePlacementRequiredDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service where the instances or replicas of that service must be placed in a particular domain. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The type of placement policy for a service fabric service. Following are + the possible values.Constant filled by server. Possible values include: "Invalid", + "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", + "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". + :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType + :ivar domain_name: The name of the domain that should used for placement as per this policy. + :vartype domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword domain_name: The name of the domain that should used for placement as per this policy. + :paramtype domain_name: str + """ + super(ServicePlacementRequiredDomainPolicyDescription, self).__init__(**kwargs) + self.type = 'RequireDomain' # type: str + self.domain_name = kwargs.get('domain_name', None) + + +class ServicePlacementRequireDomainDistributionPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service where two replicas from the same partition should never be placed in the same fault or upgrade domain. + +While this is not common it can expose the service to an increased risk of concurrent failures due to unplanned outages or other cases of subsequent/concurrent failures. As an example, consider a case where replicas are deployed across different data center, with one replica per location. In the event that one of the datacenters goes offline, normally the replica that was placed in that datacenter will be packed into one of the remaining datacenters. If this is not desirable then this policy should be set. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The type of placement policy for a service fabric service. Following are + the possible values.Constant filled by server. Possible values include: "Invalid", + "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", + "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". + :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType + :ivar domain_name: The name of the domain that should used for placement as per this policy. + :vartype domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword domain_name: The name of the domain that should used for placement as per this policy. + :paramtype domain_name: str + """ + super(ServicePlacementRequireDomainDistributionPolicyDescription, self).__init__(**kwargs) + self.type = 'RequireDomainDistribution' # type: str + self.domain_name = kwargs.get('domain_name', None) + + +class ServiceProperties(msrest.serialization.Model): + """Describes properties of a service resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar description: User readable description of the service. + :vartype description: str + :ivar replica_count: The number of replicas of the service to create. Defaults to 1 if not + specified. + :vartype replica_count: int + :ivar execution_policy: The execution policy of the service. + :vartype execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :ivar auto_scaling_policies: Auto scaling policies. + :vartype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] + :ivar status: Status of the service. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the service. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. Possible values + include: "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the service's health state is not 'Ok', this additional + details from service fabric Health Manager for the user to know why the service is marked + unhealthy. + :vartype unhealthy_evaluation: str + :ivar identity_refs: The service identity list. + :vartype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :ivar dns_name: Dns name of the service. + :vartype dns_name: str + """ + + _validation = { + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'replica_count': {'key': 'replicaCount', 'type': 'int'}, + 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, + 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'health_state': {'key': 'healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, + 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: User readable description of the service. + :paramtype description: str + :keyword replica_count: The number of replicas of the service to create. Defaults to 1 if not + specified. + :paramtype replica_count: int + :keyword execution_policy: The execution policy of the service. + :paramtype execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :keyword auto_scaling_policies: Auto scaling policies. + :paramtype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] + :keyword identity_refs: The service identity list. + :paramtype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :keyword dns_name: Dns name of the service. + :paramtype dns_name: str + """ + super(ServiceProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.replica_count = kwargs.get('replica_count', None) + self.execution_policy = kwargs.get('execution_policy', None) + self.auto_scaling_policies = kwargs.get('auto_scaling_policies', None) + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity_refs = kwargs.get('identity_refs', None) + self.dns_name = kwargs.get('dns_name', None) + + +class ServiceReplicaProperties(msrest.serialization.Model): + """Describes the properties of a service replica. + + All required parameters must be populated in order to send to Azure. + + :ivar os_type: Required. The operation system required by the code in service. Possible values + include: "Linux", "Windows". + :vartype os_type: str or ~azure.servicefabric.models.OperatingSystemType + :ivar 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.). + :vartype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] + :ivar network_refs: The names of the private networks that this service needs to be part of. + :vartype network_refs: list[~azure.servicefabric.models.NetworkRef] + :ivar diagnostics: Reference to sinks in DiagnosticsDescription. + :vartype 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 + ): + """ + :keyword os_type: Required. The operation system required by the code in service. Possible + values include: "Linux", "Windows". + :paramtype os_type: str or ~azure.servicefabric.models.OperatingSystemType + :keyword 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.). + :paramtype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] + :keyword network_refs: The names of the private networks that this service needs to be part of. + :paramtype network_refs: list[~azure.servicefabric.models.NetworkRef] + :keyword diagnostics: Reference to sinks in DiagnosticsDescription. + :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + """ + super(ServiceReplicaProperties, self).__init__(**kwargs) + self.os_type = kwargs['os_type'] + self.code_packages = kwargs['code_packages'] + self.network_refs = kwargs.get('network_refs', None) + self.diagnostics = kwargs.get('diagnostics', None) + + +class ServiceReplicaDescription(ServiceReplicaProperties): + """Describes a replica of a service resource. + + All required parameters must be populated in order to send to Azure. + + :ivar os_type: Required. The operation system required by the code in service. Possible values + include: "Linux", "Windows". + :vartype os_type: str or ~azure.servicefabric.models.OperatingSystemType + :ivar 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.). + :vartype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] + :ivar network_refs: The names of the private networks that this service needs to be part of. + :vartype network_refs: list[~azure.servicefabric.models.NetworkRef] + :ivar diagnostics: Reference to sinks in DiagnosticsDescription. + :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :ivar replica_name: Required. Name of the replica. + :vartype 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 + ): + """ + :keyword os_type: Required. The operation system required by the code in service. Possible + values include: "Linux", "Windows". + :paramtype os_type: str or ~azure.servicefabric.models.OperatingSystemType + :keyword 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.). + :paramtype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] + :keyword network_refs: The names of the private networks that this service needs to be part of. + :paramtype network_refs: list[~azure.servicefabric.models.NetworkRef] + :keyword diagnostics: Reference to sinks in DiagnosticsDescription. + :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :keyword replica_name: Required. Name of the replica. + :paramtype replica_name: str + """ + super(ServiceReplicaDescription, self).__init__(**kwargs) + self.replica_name = kwargs['replica_name'] + + +class ServiceResourceDescription(msrest.serialization.Model): + """This type describes a service resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of the Service resource. + :vartype name: str + :ivar os_type: Required. The operation system required by the code in service. Possible values + include: "Linux", "Windows". + :vartype os_type: str or ~azure.servicefabric.models.OperatingSystemType + :ivar 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.). + :vartype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] + :ivar network_refs: The names of the private networks that this service needs to be part of. + :vartype network_refs: list[~azure.servicefabric.models.NetworkRef] + :ivar diagnostics: Reference to sinks in DiagnosticsDescription. + :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :ivar description: User readable description of the service. + :vartype description: str + :ivar replica_count: The number of replicas of the service to create. Defaults to 1 if not + specified. + :vartype replica_count: int + :ivar execution_policy: The execution policy of the service. + :vartype execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :ivar auto_scaling_policies: Auto scaling policies. + :vartype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] + :ivar status: Status of the service. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the service. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. Possible values + include: "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the service's health state is not 'Ok', this additional + details from service fabric Health Manager for the user to know why the service is marked + unhealthy. + :vartype unhealthy_evaluation: str + :ivar identity_refs: The service identity list. + :vartype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :ivar dns_name: Dns name of the service. + :vartype dns_name: str + """ + + _validation = { + 'name': {'required': True}, + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'code_packages': {'key': 'properties.codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'properties.networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsRef'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'execution_policy': {'key': 'properties.executionPolicy', 'type': 'ExecutionPolicy'}, + 'auto_scaling_policies': {'key': 'properties.autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, + 'identity_refs': {'key': 'properties.identityRefs', 'type': '[ServiceIdentity]'}, + 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. Name of the Service resource. + :paramtype name: str + :keyword os_type: Required. The operation system required by the code in service. Possible + values include: "Linux", "Windows". + :paramtype os_type: str or ~azure.servicefabric.models.OperatingSystemType + :keyword 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.). + :paramtype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] + :keyword network_refs: The names of the private networks that this service needs to be part of. + :paramtype network_refs: list[~azure.servicefabric.models.NetworkRef] + :keyword diagnostics: Reference to sinks in DiagnosticsDescription. + :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :keyword description: User readable description of the service. + :paramtype description: str + :keyword replica_count: The number of replicas of the service to create. Defaults to 1 if not + specified. + :paramtype replica_count: int + :keyword execution_policy: The execution policy of the service. + :paramtype execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :keyword auto_scaling_policies: Auto scaling policies. + :paramtype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] + :keyword identity_refs: The service identity list. + :paramtype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :keyword dns_name: Dns name of the service. + :paramtype dns_name: str + """ + super(ServiceResourceDescription, self).__init__(**kwargs) + self.name = kwargs['name'] + self.os_type = kwargs['os_type'] + self.code_packages = kwargs['code_packages'] + self.network_refs = kwargs.get('network_refs', None) + self.diagnostics = kwargs.get('diagnostics', None) + self.description = kwargs.get('description', None) + self.replica_count = kwargs.get('replica_count', None) + self.execution_policy = kwargs.get('execution_policy', None) + self.auto_scaling_policies = kwargs.get('auto_scaling_policies', None) + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity_refs = kwargs.get('identity_refs', None) + self.dns_name = kwargs.get('dns_name', None) + + +class ServiceResourceProperties(ServiceReplicaProperties, ServiceProperties): + """This type describes properties of a service resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: User readable description of the service. + :vartype description: str + :ivar replica_count: The number of replicas of the service to create. Defaults to 1 if not + specified. + :vartype replica_count: int + :ivar execution_policy: The execution policy of the service. + :vartype execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :ivar auto_scaling_policies: Auto scaling policies. + :vartype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] + :ivar status: Status of the service. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the service. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. Possible values + include: "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the service's health state is not 'Ok', this additional + details from service fabric Health Manager for the user to know why the service is marked + unhealthy. + :vartype unhealthy_evaluation: str + :ivar identity_refs: The service identity list. + :vartype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :ivar dns_name: Dns name of the service. + :vartype dns_name: str + :ivar os_type: Required. The operation system required by the code in service. Possible values + include: "Linux", "Windows". + :vartype os_type: str or ~azure.servicefabric.models.OperatingSystemType + :ivar 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.). + :vartype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] + :ivar network_refs: The names of the private networks that this service needs to be part of. + :vartype network_refs: list[~azure.servicefabric.models.NetworkRef] + :ivar diagnostics: Reference to sinks in DiagnosticsDescription. + :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + """ + + _validation = { + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'replica_count': {'key': 'replicaCount', 'type': 'int'}, + 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, + 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'health_state': {'key': 'healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, + 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + '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 + ): + """ + :keyword description: User readable description of the service. + :paramtype description: str + :keyword replica_count: The number of replicas of the service to create. Defaults to 1 if not + specified. + :paramtype replica_count: int + :keyword execution_policy: The execution policy of the service. + :paramtype execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :keyword auto_scaling_policies: Auto scaling policies. + :paramtype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] + :keyword identity_refs: The service identity list. + :paramtype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :keyword dns_name: Dns name of the service. + :paramtype dns_name: str + :keyword os_type: Required. The operation system required by the code in service. Possible + values include: "Linux", "Windows". + :paramtype os_type: str or ~azure.servicefabric.models.OperatingSystemType + :keyword 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.). + :paramtype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] + :keyword network_refs: The names of the private networks that this service needs to be part of. + :paramtype network_refs: list[~azure.servicefabric.models.NetworkRef] + :keyword diagnostics: Reference to sinks in DiagnosticsDescription. + :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + """ + super(ServiceResourceProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.replica_count = kwargs.get('replica_count', None) + self.execution_policy = kwargs.get('execution_policy', None) + self.auto_scaling_policies = kwargs.get('auto_scaling_policies', None) + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity_refs = kwargs.get('identity_refs', None) + self.dns_name = kwargs.get('dns_name', None) + self.os_type = kwargs['os_type'] + self.code_packages = kwargs['code_packages'] + self.network_refs = kwargs.get('network_refs', None) + self.diagnostics = kwargs.get('diagnostics', None) + + +class ServicesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for services of a certain service type belonging to an application, containing health evaluations for each unhealthy service that impacted current aggregated health state. Can be returned when evaluating application health and the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar service_type_name: Name of the service type of the services. + :vartype service_type_name: str + :ivar max_percent_unhealthy_services: Maximum allowed percentage of unhealthy services from the + ServiceTypeHealthPolicy. + :vartype max_percent_unhealthy_services: int + :ivar total_count: Total number of services of the current service type in the application from + the health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy ServiceHealthEvaluation that impacted the aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword service_type_name: Name of the service type of the services. + :paramtype service_type_name: str + :keyword max_percent_unhealthy_services: Maximum allowed percentage of unhealthy services from + the ServiceTypeHealthPolicy. + :paramtype max_percent_unhealthy_services: int + :keyword total_count: Total number of services of the current service type in the application + from the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy ServiceHealthEvaluation that impacted the aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(ServicesHealthEvaluation, self).__init__(**kwargs) + self.kind = 'Services' # type: str + self.service_type_name = kwargs.get('service_type_name', None) + self.max_percent_unhealthy_services = kwargs.get('max_percent_unhealthy_services', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class ServiceTypeDescription(msrest.serialization.Model): + """Describes a service type defined in the service manifest of a provisioned application type. The properties the ones defined in the service manifest. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceTypeDescription, StatelessServiceTypeDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of service (Stateless or Stateful).Constant filled by server. + Possible values include: "Invalid", "Stateless", "Stateful". + :vartype kind: str or ~azure.servicefabric.models.ServiceKind + :ivar is_stateful: Indicates whether the service type is a stateful service type or a stateless + service type. This property is true if the service type is a stateful service type, false + otherwise. + :vartype is_stateful: bool + :ivar service_type_name: Name of the service type as specified in the service manifest. + :vartype service_type_name: str + :ivar placement_constraints: The placement constraint to be used when instantiating this + service in a Service Fabric cluster. + :vartype placement_constraints: str + :ivar load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: List of service placement policy descriptions. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar extensions: List of service type extensions. + :vartype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + } + + _subtype_map = { + 'kind': {'Stateful': 'StatefulServiceTypeDescription', 'Stateless': 'StatelessServiceTypeDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword is_stateful: Indicates whether the service type is a stateful service type or a + stateless service type. This property is true if the service type is a stateful service type, + false otherwise. + :paramtype is_stateful: bool + :keyword service_type_name: Name of the service type as specified in the service manifest. + :paramtype service_type_name: str + :keyword placement_constraints: The placement constraint to be used when instantiating this + service in a Service Fabric cluster. + :paramtype placement_constraints: str + :keyword load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: List of service placement policy descriptions. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword extensions: List of service type extensions. + :paramtype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + """ + super(ServiceTypeDescription, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.is_stateful = kwargs.get('is_stateful', None) + self.service_type_name = kwargs.get('service_type_name', None) + self.placement_constraints = kwargs.get('placement_constraints', None) + self.load_metrics = kwargs.get('load_metrics', None) + self.service_placement_policies = kwargs.get('service_placement_policies', None) + self.extensions = kwargs.get('extensions', None) + + +class ServiceTypeExtensionDescription(msrest.serialization.Model): + """Describes extension of a service type defined in the service manifest. + + :ivar key: The name of the extension. + :vartype key: str + :ivar value: The extension value. + :vartype value: str + """ + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword key: The name of the extension. + :paramtype key: str + :keyword value: The extension value. + :paramtype value: str + """ + super(ServiceTypeExtensionDescription, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) + + +class ServiceTypeHealthPolicy(msrest.serialization.Model): + """Represents the health policy used to evaluate the health of services belonging to a service type. + + :ivar max_percent_unhealthy_partitions_per_service: The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte values from zero to 100 + + The percentage represents the maximum tolerated percentage of partitions that can be unhealthy + before the service is considered in error. + If the percentage is respected but there is at least one unhealthy partition, the health is + evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy partitions over the total + number of partitions in the service. + The computation rounds up to tolerate one failure on small numbers of partitions. Default + percentage is zero. + :vartype max_percent_unhealthy_partitions_per_service: int + :ivar max_percent_unhealthy_replicas_per_partition: The maximum allowed percentage of unhealthy + replicas per partition. Allowed values are Byte values from zero to 100. + + The percentage represents the maximum tolerated percentage of replicas that can be unhealthy + before the partition is considered in error. + If the percentage is respected but there is at least one unhealthy replica, the health is + evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy replicas over the total + number of replicas in the partition. + The computation rounds up to tolerate one failure on small numbers of replicas. Default + percentage is zero. + :vartype max_percent_unhealthy_replicas_per_partition: int + :ivar max_percent_unhealthy_services: The maximum allowed percentage of unhealthy services. + Allowed values are Byte values from zero to 100. + + The percentage represents the maximum tolerated percentage of services that can be unhealthy + before the application is considered in error. + If the percentage is respected but there is at least one unhealthy service, the health is + evaluated as Warning. + This is calculated by dividing the number of unhealthy services of the specific service type + over the total number of services of the specific service type. + The computation rounds up to tolerate one failure on small numbers of services. Default + percentage is zero. + :vartype max_percent_unhealthy_services: int + """ + + _attribute_map = { + 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, + 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, + 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword max_percent_unhealthy_partitions_per_service: The maximum allowed percentage of + unhealthy partitions per service. Allowed values are Byte values from zero to 100 + + The percentage represents the maximum tolerated percentage of partitions that can be unhealthy + before the service is considered in error. + If the percentage is respected but there is at least one unhealthy partition, the health is + evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy partitions over the total + number of partitions in the service. + The computation rounds up to tolerate one failure on small numbers of partitions. Default + percentage is zero. + :paramtype max_percent_unhealthy_partitions_per_service: int + :keyword max_percent_unhealthy_replicas_per_partition: The maximum allowed percentage of + unhealthy replicas per partition. Allowed values are Byte values from zero to 100. + + The percentage represents the maximum tolerated percentage of replicas that can be unhealthy + before the partition is considered in error. + If the percentage is respected but there is at least one unhealthy replica, the health is + evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy replicas over the total + number of replicas in the partition. + The computation rounds up to tolerate one failure on small numbers of replicas. Default + percentage is zero. + :paramtype max_percent_unhealthy_replicas_per_partition: int + :keyword max_percent_unhealthy_services: The maximum allowed percentage of unhealthy services. + Allowed values are Byte values from zero to 100. + + The percentage represents the maximum tolerated percentage of services that can be unhealthy + before the application is considered in error. + If the percentage is respected but there is at least one unhealthy service, the health is + evaluated as Warning. + This is calculated by dividing the number of unhealthy services of the specific service type + over the total number of services of the specific service type. + The computation rounds up to tolerate one failure on small numbers of services. Default + percentage is zero. + :paramtype max_percent_unhealthy_services: int + """ + super(ServiceTypeHealthPolicy, self).__init__(**kwargs) + self.max_percent_unhealthy_partitions_per_service = kwargs.get('max_percent_unhealthy_partitions_per_service', 0) + self.max_percent_unhealthy_replicas_per_partition = kwargs.get('max_percent_unhealthy_replicas_per_partition', 0) + self.max_percent_unhealthy_services = kwargs.get('max_percent_unhealthy_services', 0) + + +class ServiceTypeHealthPolicyMapItem(msrest.serialization.Model): + """Defines an item in ServiceTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :ivar key: Required. The key of the service type health policy map item. This is the name of + the service type. + :vartype key: str + :ivar value: Required. The value of the service type health policy map item. This is the + ServiceTypeHealthPolicy for this service type. + :vartype value: ~azure.servicefabric.models.ServiceTypeHealthPolicy + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ServiceTypeHealthPolicy'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword key: Required. The key of the service type health policy map item. This is the name of + the service type. + :paramtype key: str + :keyword value: Required. The value of the service type health policy map item. This is the + ServiceTypeHealthPolicy for this service type. + :paramtype value: ~azure.servicefabric.models.ServiceTypeHealthPolicy + """ + super(ServiceTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = kwargs['key'] + self.value = kwargs['value'] + + +class ServiceTypeInfo(msrest.serialization.Model): + """Information about a service type that is defined in a service manifest of a provisioned application type. + + :ivar service_type_description: Describes a service type defined in the service manifest of a + provisioned application type. The properties the ones defined in the service manifest. + :vartype service_type_description: ~azure.servicefabric.models.ServiceTypeDescription + :ivar service_manifest_name: The name of the service manifest in which this service type is + defined. + :vartype service_manifest_name: str + :ivar service_manifest_version: The version of the service manifest in which this service type + is defined. + :vartype service_manifest_version: str + :ivar is_service_group: Indicates whether the service is a service group. If it is, the + property value is true otherwise false. + :vartype is_service_group: bool + """ + + _attribute_map = { + 'service_type_description': {'key': 'ServiceTypeDescription', 'type': 'ServiceTypeDescription'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_type_description: Describes a service type defined in the service manifest of + a provisioned application type. The properties the ones defined in the service manifest. + :paramtype service_type_description: ~azure.servicefabric.models.ServiceTypeDescription + :keyword service_manifest_name: The name of the service manifest in which this service type is + defined. + :paramtype service_manifest_name: str + :keyword service_manifest_version: The version of the service manifest in which this service + type is defined. + :paramtype service_manifest_version: str + :keyword is_service_group: Indicates whether the service is a service group. If it is, the + property value is true otherwise false. + :paramtype is_service_group: bool + """ + super(ServiceTypeInfo, self).__init__(**kwargs) + self.service_type_description = kwargs.get('service_type_description', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.service_manifest_version = kwargs.get('service_manifest_version', None) + self.is_service_group = kwargs.get('is_service_group', None) + + +class ServiceTypeManifest(msrest.serialization.Model): + """Contains the manifest describing a service type registered as part of an application in a Service Fabric cluster. + + :ivar manifest: The XML manifest as a string. + :vartype manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword manifest: The XML manifest as a string. + :paramtype manifest: str + """ + super(ServiceTypeManifest, self).__init__(**kwargs) + self.manifest = kwargs.get('manifest', None) + + +class ServiceUpdateDescription(msrest.serialization.Model): + """A ServiceUpdateDescription contains all of the information necessary to update a service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceUpdateDescription, StatelessServiceUpdateDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The service kind.Constant filled by server. Possible values + include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and + QuorumLossWaitDuration (4) are set. + + + * None - Does not indicate any other properties are set. The value is zero. + * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property + (for Stateful services) or the InstanceCount property (for Stateless services) is set. The + value is 1. + * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The + value is 2. + * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is + 4. + * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The + value is 8. + * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. + * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. + * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is + 64. + * Correlation - Indicates the CorrelationScheme property is set. The value is 128. + * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. + * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. + * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. + * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The + value is 2048. + * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. + * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is + 8192. + * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 16384. + * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 32768. + * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value + is 65536. + * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. + * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. + * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. + :vartype flags: str + :ivar placement_constraints: The placement constraints as a string. Placement constraints are + boolean expressions on node properties and allow for restricting a service to particular nodes + based on the service requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :vartype placement_constraints: str + :ivar correlation_scheme: The correlation scheme. + :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :ivar load_metrics: The service load metrics. + :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: The service placement policies. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", + "Medium", "High", "VeryHigh". + :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :ivar scaling_policies: Scaling policies for this service. + :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :ivar service_dns_name: The DNS name of the service. + :vartype service_dns_name: str + :ivar tags_for_placement: Tags for placement of this service. + :vartype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :ivar tags_for_running: Tags for running of this service. + :vartype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceUpdateDescription', 'Stateless': 'StatelessServiceUpdateDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and + QuorumLossWaitDuration (4) are set. + + + * None - Does not indicate any other properties are set. The value is zero. + * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property + (for Stateful services) or the InstanceCount property (for Stateless services) is set. The + value is 1. + * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The + value is 2. + * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is + 4. + * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The + value is 8. + * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. + * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. + * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is + 64. + * Correlation - Indicates the CorrelationScheme property is set. The value is 128. + * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. + * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. + * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. + * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The + value is 2048. + * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. + * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is + 8192. + * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 16384. + * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 32768. + * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value + is 65536. + * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. + * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. + * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. + :paramtype flags: str + :keyword placement_constraints: The placement constraints as a string. Placement constraints + are boolean expressions on node properties and allow for restricting a service to particular + nodes based on the service requirements. For example, to place a service on nodes where + NodeType is blue specify the following: "NodeColor == blue)". + :paramtype placement_constraints: str + :keyword correlation_scheme: The correlation scheme. + :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :keyword load_metrics: The service load metrics. + :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: The service placement policies. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", + "Low", "Medium", "High", "VeryHigh". + :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :keyword scaling_policies: Scaling policies for this service. + :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :keyword service_dns_name: The DNS name of the service. + :paramtype service_dns_name: str + :keyword tags_for_placement: Tags for placement of this service. + :paramtype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :keyword tags_for_running: Tags for running of this service. + :paramtype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + """ + super(ServiceUpdateDescription, self).__init__(**kwargs) + self.service_kind = None # type: Optional[str] + self.flags = kwargs.get('flags', None) + self.placement_constraints = kwargs.get('placement_constraints', None) + self.correlation_scheme = kwargs.get('correlation_scheme', None) + self.load_metrics = kwargs.get('load_metrics', None) + self.service_placement_policies = kwargs.get('service_placement_policies', None) + self.default_move_cost = kwargs.get('default_move_cost', None) + self.scaling_policies = kwargs.get('scaling_policies', None) + self.service_dns_name = kwargs.get('service_dns_name', None) + self.tags_for_placement = kwargs.get('tags_for_placement', None) + self.tags_for_running = kwargs.get('tags_for_running', None) + + +class ServiceUpgradeProgress(msrest.serialization.Model): + """Information about how many replicas are completed or pending for a specific service during upgrade. + + :ivar service_name: Name of the Service resource. + :vartype service_name: str + :ivar completed_replica_count: The number of replicas that completes the upgrade in the + service. + :vartype completed_replica_count: str + :ivar pending_replica_count: The number of replicas that are waiting to be upgraded in the + service. + :vartype pending_replica_count: str + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'completed_replica_count': {'key': 'CompletedReplicaCount', 'type': 'str'}, + 'pending_replica_count': {'key': 'PendingReplicaCount', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_name: Name of the Service resource. + :paramtype service_name: str + :keyword completed_replica_count: The number of replicas that completes the upgrade in the + service. + :paramtype completed_replica_count: str + :keyword pending_replica_count: The number of replicas that are waiting to be upgraded in the + service. + :paramtype pending_replica_count: str + """ + super(ServiceUpgradeProgress, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.completed_replica_count = kwargs.get('completed_replica_count', None) + self.pending_replica_count = kwargs.get('pending_replica_count', None) + + +class Setting(msrest.serialization.Model): + """Describes a setting for the container. The setting file path can be fetched from environment variable "Fabric_SettingPath". The path for Windows container is "C:\secrets". The path for Linux container is "/var/secrets". + + :ivar type: The type of the setting being given in value. Possible values include: "ClearText", + "KeyVaultReference", "SecretValueReference". Default value: "ClearText". + :vartype type: str or ~azure.servicefabric.models.SettingType + :ivar name: The name of the setting. + :vartype name: str + :ivar value: The value of the setting, will be processed based on the type provided. + :vartype value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword type: The type of the setting being given in value. Possible values include: + "ClearText", "KeyVaultReference", "SecretValueReference". Default value: "ClearText". + :paramtype type: str or ~azure.servicefabric.models.SettingType + :keyword name: The name of the setting. + :paramtype name: str + :keyword value: The value of the setting, will be processed based on the type provided. + :paramtype value: str + """ + super(Setting, self).__init__(**kwargs) + self.type = kwargs.get('type', "ClearText") + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class SingletonPartitionInformation(PartitionInformation): + """Information about a partition that is singleton. The services with singleton partitioning scheme are effectively non-partitioned. They only have one partition. + + All required parameters must be populated in order to send to Azure. + + :ivar service_partition_kind: Required. The kind of partitioning scheme used to partition the + service.Constant filled by server. Possible values include: "Invalid", "Singleton", + "Int64Range", "Named". + :vartype service_partition_kind: str or ~azure.servicefabric.models.ServicePartitionKind + :ivar id: An internal ID used by Service Fabric to uniquely identify a partition. This is a + randomly generated GUID when the service was created. The partition ID is unique and does not + change for the lifetime of the service. If the same service was deleted and recreated the IDs + of its partitions would be different. + :vartype id: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: An internal ID used by Service Fabric to uniquely identify a partition. This is a + randomly generated GUID when the service was created. The partition ID is unique and does not + change for the lifetime of the service. If the same service was deleted and recreated the IDs + of its partitions would be different. + :paramtype id: str + """ + super(SingletonPartitionInformation, self).__init__(**kwargs) + self.service_partition_kind = 'Singleton' # type: str + + +class SingletonPartitionSchemeDescription(PartitionSchemeDescription): + """Describes the partition scheme of a singleton-partitioned, or non-partitioned service. + + All required parameters must be populated in order to send to Azure. + + :ivar partition_scheme: Required. Specifies how the service is partitioned.Constant filled by + server. Possible values include: "Invalid", "Singleton", "UniformInt64Range", "Named". + :vartype partition_scheme: str or ~azure.servicefabric.models.PartitionScheme + """ + + _validation = { + 'partition_scheme': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(SingletonPartitionSchemeDescription, self).__init__(**kwargs) + self.partition_scheme = 'Singleton' # type: str + + +class StartClusterUpgradeDescription(msrest.serialization.Model): + """Describes the parameters for starting a cluster upgrade. + + :ivar code_version: The cluster code version. + :vartype code_version: str + :ivar config_version: The cluster configuration version. + :vartype config_version: str + :ivar upgrade_kind: The kind of upgrade out of the following possible values. Possible values + include: "Invalid", "Rolling". Default value: "Rolling". + :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :vartype upgrade_replica_set_check_timeout_in_seconds: long + :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when + the code version has not changed (the upgrade only changes configuration or data). + :vartype force_restart: bool + :ivar sort_order: Defines the order in which an upgrade proceeds through the cluster. Possible + values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + :vartype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. + :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster + or of a cluster node. + :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :ivar enable_delta_health_evaluation: When true, enables delta health evaluation rather than + absolute health evaluation after completion of each upgrade domain. + :vartype enable_delta_health_evaluation: bool + :ivar cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of the + cluster during a cluster upgrade. + :vartype cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :ivar application_health_policy_map: Defines the application health policy map used to evaluate + the health of an application or one of its children entities. + :vartype application_health_policy_map: ~azure.servicefabric.models.ApplicationHealthPolicies + :ivar instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster + upgrade, only for those instances which have a non-zero delay duration configured in the + service description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates + that the behavior will entirely depend on the delay configured in the stateless service + description. + :vartype instance_close_delay_duration_in_seconds: long + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code_version: The cluster code version. + :paramtype code_version: str + :keyword config_version: The cluster configuration version. + :paramtype config_version: str + :keyword upgrade_kind: The kind of upgrade out of the following possible values. Possible + values include: "Invalid", "Rolling". Default value: "Rolling". + :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :paramtype upgrade_replica_set_check_timeout_in_seconds: long + :keyword force_restart: If true, then processes are forcefully restarted during upgrade even + when the code version has not changed (the upgrade only changes configuration or data). + :paramtype force_restart: bool + :keyword sort_order: Defines the order in which an upgrade proceeds through the cluster. + Possible values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + :paramtype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored + mode. + :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the + cluster or of a cluster node. + :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :keyword enable_delta_health_evaluation: When true, enables delta health evaluation rather than + absolute health evaluation after completion of each upgrade domain. + :paramtype enable_delta_health_evaluation: bool + :keyword cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of + the cluster during a cluster upgrade. + :paramtype cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :keyword application_health_policy_map: Defines the application health policy map used to + evaluate the health of an application or one of its children entities. + :paramtype application_health_policy_map: ~azure.servicefabric.models.ApplicationHealthPolicies + :keyword instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a + stateless instance is closed, to allow the active requests to drain gracefully. This would be + effective when the instance is closing during the application/cluster + upgrade, only for those instances which have a non-zero delay duration configured in the + service description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates + that the behavior will entirely depend on the delay configured in the stateless service + description. + :paramtype instance_close_delay_duration_in_seconds: long + """ + super(StartClusterUpgradeDescription, self).__init__(**kwargs) + self.code_version = kwargs.get('code_version', None) + self.config_version = kwargs.get('config_version', None) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925) + self.force_restart = kwargs.get('force_restart', False) + self.sort_order = kwargs.get('sort_order', "Default") + self.monitoring_policy = kwargs.get('monitoring_policy', None) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) + self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) + self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', 4294967295) + + +class StartedChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos is started. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values + include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", + "Stopped". + :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind + :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :vartype time_stamp_utc: ~datetime.datetime + :ivar chaos_parameters: Defines all the parameters to configure a Chaos run. + :vartype chaos_parameters: ~azure.servicefabric.models.ChaosParameters + """ + + _validation = { + 'kind': {'required': True}, + 'time_stamp_utc': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :paramtype time_stamp_utc: ~datetime.datetime + :keyword chaos_parameters: Defines all the parameters to configure a Chaos run. + :paramtype chaos_parameters: ~azure.servicefabric.models.ChaosParameters + """ + super(StartedChaosEvent, self).__init__(**kwargs) + self.kind = 'Started' # type: str + self.chaos_parameters = kwargs.get('chaos_parameters', None) + + +class StatefulReplicaHealthReportExpiredEvent(ReplicaEvent): + """Stateful Replica Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :vartype replica_id: long + :ivar replica_instance_id: Required. Id of Replica instance. + :vartype replica_instance_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'replica_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: long + :keyword replica_instance_id: Required. Id of Replica instance. + :paramtype replica_instance_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(StatefulReplicaHealthReportExpiredEvent, self).__init__(**kwargs) + self.kind = 'StatefulReplicaHealthReportExpired' # type: str + self.replica_instance_id = kwargs['replica_instance_id'] + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class StatefulReplicaNewHealthReportEvent(ReplicaEvent): + """Stateful Replica Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :vartype replica_id: long + :ivar replica_instance_id: Required. Id of Replica instance. + :vartype replica_instance_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'replica_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: long + :keyword replica_instance_id: Required. Id of Replica instance. + :paramtype replica_instance_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(StatefulReplicaNewHealthReportEvent, self).__init__(**kwargs) + self.kind = 'StatefulReplicaNewHealthReport' # type: str + self.replica_instance_id = kwargs['replica_instance_id'] + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class StatefulServiceDescription(ServiceDescription): + """Describes a stateful service. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The service kind.Constant filled by server. Possible values + include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar service_name: Required. The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar service_type_name: Required. Name of the service type as specified in the service + manifest. + :vartype service_type_name: str + :ivar initialization_data: The initialization data as an array of bytes. Initialization data is + passed to service instances or replicas when they are created. + :vartype initialization_data: list[int] + :ivar partition_description: Required. The partition description as an object. + :vartype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription + :ivar placement_constraints: The placement constraints as a string. Placement constraints are + boolean expressions on node properties and allow for restricting a service to particular nodes + based on the service requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :vartype placement_constraints: str + :ivar correlation_scheme: The correlation scheme. + :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :ivar service_load_metrics: The service load metrics. + :vartype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: The service placement policies. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", + "Medium", "High", "VeryHigh". + :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :ivar is_default_move_cost_specified: Indicates if the DefaultMoveCost property is specified. + :vartype is_default_move_cost_specified: bool + :ivar service_package_activation_mode: The activation mode of service package to be used for a + service. Possible values include: "SharedProcess", "ExclusiveProcess". + :vartype service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :ivar service_dns_name: The DNS name of the service. It requires the DNS system service to be + enabled in Service Fabric cluster. + :vartype service_dns_name: str + :ivar scaling_policies: Scaling policies for this service. + :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :ivar tags_required_to_place: Tags for placement of this service. + :vartype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription + :ivar tags_required_to_run: Tags for running of this service. + :vartype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription + :ivar target_replica_set_size: Required. The target replica set size as a number. + :vartype target_replica_set_size: int + :ivar min_replica_set_size: Required. The minimum replica set size as a number. + :vartype min_replica_set_size: int + :ivar has_persisted_state: Required. A flag indicating whether this is a persistent service + which stores states on the local disk. If it is then the value of this property is true, if not + it is false. + :vartype has_persisted_state: bool + :ivar flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then the flags for QuorumLossWaitDuration (2) and + StandByReplicaKeepDuration(4) are set. + + + * None - Does not indicate any other properties are set. The value is zero. + * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The + value is 1. + * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is + 2. + * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The + value is 4. + * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The + value is 8. + * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value + is 16. + :vartype flags: int + :ivar replica_restart_wait_duration_seconds: The duration, in seconds, between when a replica + goes down and when a new replica is created. + :vartype replica_restart_wait_duration_seconds: long + :ivar quorum_loss_wait_duration_seconds: The maximum duration, in seconds, for which a + partition is allowed to be in a state of quorum loss. + :vartype quorum_loss_wait_duration_seconds: long + :ivar stand_by_replica_keep_duration_seconds: The definition on how long StandBy replicas + should be maintained before being removed. + :vartype stand_by_replica_keep_duration_seconds: long + :ivar service_placement_time_limit_seconds: The duration for which replicas can stay InBuild + before reporting that build is stuck. + :vartype service_placement_time_limit_seconds: long + :ivar drop_source_replica_on_move: Indicates whether to drop source Secondary replica even if + the target replica has not finished build. If desired behavior is to drop it as soon as + possible the value of this property is true, if not it is false. + :vartype drop_source_replica_on_move: bool + :ivar replica_lifecycle_description: Defines how replicas of this service will behave during + ther lifecycle. + :vartype replica_lifecycle_description: ~azure.servicefabric.models.ReplicaLifecycleDescription + :ivar auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary + replicas, the following must be true: AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :vartype auxiliary_replica_count: int + """ + + _validation = { + 'service_kind': {'required': True}, + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + 'target_replica_set_size': {'required': True, 'minimum': 1}, + 'min_replica_set_size': {'required': True, 'minimum': 1}, + 'has_persisted_state': {'required': True}, + 'replica_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'quorum_loss_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'stand_by_replica_keep_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'service_placement_time_limit_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'auxiliary_replica_count': {'minimum': 0}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'long'}, + 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'long'}, + 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'long'}, + 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'long'}, + 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, + 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword service_name: Required. The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword service_type_name: Required. Name of the service type as specified in the service + manifest. + :paramtype service_type_name: str + :keyword initialization_data: The initialization data as an array of bytes. Initialization data + is passed to service instances or replicas when they are created. + :paramtype initialization_data: list[int] + :keyword partition_description: Required. The partition description as an object. + :paramtype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription + :keyword placement_constraints: The placement constraints as a string. Placement constraints + are boolean expressions on node properties and allow for restricting a service to particular + nodes based on the service requirements. For example, to place a service on nodes where + NodeType is blue specify the following: "NodeColor == blue)". + :paramtype placement_constraints: str + :keyword correlation_scheme: The correlation scheme. + :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :keyword service_load_metrics: The service load metrics. + :paramtype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: The service placement policies. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", + "Low", "Medium", "High", "VeryHigh". + :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :keyword is_default_move_cost_specified: Indicates if the DefaultMoveCost property is + specified. + :paramtype is_default_move_cost_specified: bool + :keyword service_package_activation_mode: The activation mode of service package to be used for + a service. Possible values include: "SharedProcess", "ExclusiveProcess". + :paramtype service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :keyword service_dns_name: The DNS name of the service. It requires the DNS system service to + be enabled in Service Fabric cluster. + :paramtype service_dns_name: str + :keyword scaling_policies: Scaling policies for this service. + :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :keyword tags_required_to_place: Tags for placement of this service. + :paramtype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription + :keyword tags_required_to_run: Tags for running of this service. + :paramtype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription + :keyword target_replica_set_size: Required. The target replica set size as a number. + :paramtype target_replica_set_size: int + :keyword min_replica_set_size: Required. The minimum replica set size as a number. + :paramtype min_replica_set_size: int + :keyword has_persisted_state: Required. A flag indicating whether this is a persistent service + which stores states on the local disk. If it is then the value of this property is true, if not + it is false. + :paramtype has_persisted_state: bool + :keyword flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then the flags for QuorumLossWaitDuration (2) and + StandByReplicaKeepDuration(4) are set. + + + * None - Does not indicate any other properties are set. The value is zero. + * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The + value is 1. + * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is + 2. + * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The + value is 4. + * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The + value is 8. + * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value + is 16. + :paramtype flags: int + :keyword replica_restart_wait_duration_seconds: The duration, in seconds, between when a + replica goes down and when a new replica is created. + :paramtype replica_restart_wait_duration_seconds: long + :keyword quorum_loss_wait_duration_seconds: The maximum duration, in seconds, for which a + partition is allowed to be in a state of quorum loss. + :paramtype quorum_loss_wait_duration_seconds: long + :keyword stand_by_replica_keep_duration_seconds: The definition on how long StandBy replicas + should be maintained before being removed. + :paramtype stand_by_replica_keep_duration_seconds: long + :keyword service_placement_time_limit_seconds: The duration for which replicas can stay InBuild + before reporting that build is stuck. + :paramtype service_placement_time_limit_seconds: long + :keyword drop_source_replica_on_move: Indicates whether to drop source Secondary replica even + if the target replica has not finished build. If desired behavior is to drop it as soon as + possible the value of this property is true, if not it is false. + :paramtype drop_source_replica_on_move: bool + :keyword replica_lifecycle_description: Defines how replicas of this service will behave during + ther lifecycle. + :paramtype replica_lifecycle_description: + ~azure.servicefabric.models.ReplicaLifecycleDescription + :keyword auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary + replicas, the following must be true: AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :paramtype auxiliary_replica_count: int + """ + super(StatefulServiceDescription, self).__init__(**kwargs) + self.service_kind = 'Stateful' # type: str + self.target_replica_set_size = kwargs['target_replica_set_size'] + self.min_replica_set_size = kwargs['min_replica_set_size'] + self.has_persisted_state = kwargs['has_persisted_state'] + self.flags = kwargs.get('flags', None) + self.replica_restart_wait_duration_seconds = kwargs.get('replica_restart_wait_duration_seconds', None) + self.quorum_loss_wait_duration_seconds = kwargs.get('quorum_loss_wait_duration_seconds', None) + self.stand_by_replica_keep_duration_seconds = kwargs.get('stand_by_replica_keep_duration_seconds', None) + self.service_placement_time_limit_seconds = kwargs.get('service_placement_time_limit_seconds', None) + self.drop_source_replica_on_move = kwargs.get('drop_source_replica_on_move', None) + self.replica_lifecycle_description = kwargs.get('replica_lifecycle_description', None) + self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) + + +class StatefulServiceInfo(ServiceInfo): + """Information about a stateful Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The identity of the service. This ID is an encoded representation of the service + name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype id: str + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar name: The full name of the service with 'fabric:' URI scheme. + :vartype name: str + :ivar type_name: Name of the service type as specified in the service manifest. + :vartype type_name: str + :ivar manifest_version: The version of the service manifest. + :vartype manifest_version: str + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_status: The status of the application. Possible values include: "Unknown", + "Active", "Upgrading", "Deleting", "Creating", "Failed". + :vartype service_status: str or ~azure.servicefabric.models.ServiceStatus + :ivar is_service_group: Whether the service is in a service group. + :vartype is_service_group: bool + :ivar has_persisted_state: Whether the service has persisted state. + :vartype has_persisted_state: bool + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: The identity of the service. This ID is an encoded representation of the service + name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype id: str + :keyword name: The full name of the service with 'fabric:' URI scheme. + :paramtype name: str + :keyword type_name: Name of the service type as specified in the service manifest. + :paramtype type_name: str + :keyword manifest_version: The version of the service manifest. + :paramtype manifest_version: str + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword service_status: The status of the application. Possible values include: "Unknown", + "Active", "Upgrading", "Deleting", "Creating", "Failed". + :paramtype service_status: str or ~azure.servicefabric.models.ServiceStatus + :keyword is_service_group: Whether the service is in a service group. + :paramtype is_service_group: bool + :keyword has_persisted_state: Whether the service has persisted state. + :paramtype has_persisted_state: bool + """ + super(StatefulServiceInfo, self).__init__(**kwargs) + self.service_kind = 'Stateful' # type: str + self.has_persisted_state = kwargs.get('has_persisted_state', None) + + +class StatefulServicePartitionInfo(ServicePartitionInfo): + """Information about a partition of a stateful Service Fabric service.. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar partition_status: The status of the service fabric service partition. Possible values + include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". + :vartype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus + :ivar partition_information: Information about the partition identity, partitioning scheme and + keys supported by it. + :vartype partition_information: ~azure.servicefabric.models.PartitionInformation + :ivar target_replica_set_size: The target replica set size as a number. + :vartype target_replica_set_size: long + :ivar min_replica_set_size: The minimum replica set size as a number. + :vartype min_replica_set_size: long + :ivar auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary + replicas the following must be true, AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :vartype auxiliary_replica_count: long + :ivar last_quorum_loss_duration: The duration for which this partition was in quorum loss. If + the partition is currently in quorum loss, it returns the duration since it has been in that + state. This field is using ISO8601 format for specifying the duration. + :vartype last_quorum_loss_duration: ~datetime.timedelta + :ivar primary_epoch: An Epoch is a configuration number for the partition as a whole. When the + configuration of the replica set changes, for example when the Primary replica changes, the + operations that are replicated from the new Primary replica are said to be a new Epoch from the + ones which were sent by the old Primary replica. + :vartype primary_epoch: ~azure.servicefabric.models.Epoch + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'long'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'long'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'long'}, + 'last_quorum_loss_duration': {'key': 'LastQuorumLossDuration', 'type': 'duration'}, + 'primary_epoch': {'key': 'PrimaryEpoch', 'type': 'Epoch'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword partition_status: The status of the service fabric service partition. Possible values + include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". + :paramtype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus + :keyword partition_information: Information about the partition identity, partitioning scheme + and keys supported by it. + :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation + :keyword target_replica_set_size: The target replica set size as a number. + :paramtype target_replica_set_size: long + :keyword min_replica_set_size: The minimum replica set size as a number. + :paramtype min_replica_set_size: long + :keyword auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary + replicas the following must be true, AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :paramtype auxiliary_replica_count: long + :keyword last_quorum_loss_duration: The duration for which this partition was in quorum loss. + If the partition is currently in quorum loss, it returns the duration since it has been in that + state. This field is using ISO8601 format for specifying the duration. + :paramtype last_quorum_loss_duration: ~datetime.timedelta + :keyword primary_epoch: An Epoch is a configuration number for the partition as a whole. When + the configuration of the replica set changes, for example when the Primary replica changes, the + operations that are replicated from the new Primary replica are said to be a new Epoch from the + ones which were sent by the old Primary replica. + :paramtype primary_epoch: ~azure.servicefabric.models.Epoch + """ + super(StatefulServicePartitionInfo, self).__init__(**kwargs) + self.service_kind = 'Stateful' # type: str + self.target_replica_set_size = kwargs.get('target_replica_set_size', None) + self.min_replica_set_size = kwargs.get('min_replica_set_size', None) + self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) + self.last_quorum_loss_duration = kwargs.get('last_quorum_loss_duration', None) + self.primary_epoch = kwargs.get('primary_epoch', None) + + +class StatefulServiceReplicaHealth(ReplicaHealth): + """Represents the health of the stateful service replica. +Contains the replica aggregated health state, the health events and the unhealthy evaluations. + + All required parameters must be populated in order to send to Azure. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar partition_id: Id of the partition to which this replica belongs. + :vartype partition_id: str + :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :vartype replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword partition_id: Id of the partition to which this replica belongs. + :paramtype partition_id: str + :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: str + """ + super(StatefulServiceReplicaHealth, self).__init__(**kwargs) + self.service_kind = 'Stateful' # type: str + self.replica_id = kwargs.get('replica_id', None) + + +class StatefulServiceReplicaHealthState(ReplicaHealthState): + """Represents the health state of the stateful service replica, which contains the replica ID and the aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar partition_id: The ID of the partition to which this replica belongs. + :vartype partition_id: str + :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :vartype replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword partition_id: The ID of the partition to which this replica belongs. + :paramtype partition_id: str + :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: str + """ + super(StatefulServiceReplicaHealthState, self).__init__(**kwargs) + self.service_kind = 'Stateful' # type: str + self.replica_id = kwargs.get('replica_id', None) + + +class StatefulServiceReplicaInfo(ReplicaInfo): + """Represents a stateful service replica. This includes information about the identity, role, status, health, node name, uptime, and other details about the replica. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", + "InBuild", "Standby", "Ready", "Down", "Dropped". + :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar node_name: The name of a Service Fabric node. + :vartype node_name: str + :ivar address: The address the replica is listening on. + :vartype address: str + :ivar last_in_build_duration_in_seconds: The last in build duration of the replica in seconds. + :vartype last_in_build_duration_in_seconds: str + :ivar replica_role: The role of a replica of a stateful service. Possible values include: + "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", + "ActiveAuxiliary", "PrimaryAuxiliary". + :vartype replica_role: str or ~azure.servicefabric.models.ReplicaRole + :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :vartype replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword replica_status: The status of a replica of a service. Possible values include: + "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". + :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword node_name: The name of a Service Fabric node. + :paramtype node_name: str + :keyword address: The address the replica is listening on. + :paramtype address: str + :keyword last_in_build_duration_in_seconds: The last in build duration of the replica in + seconds. + :paramtype last_in_build_duration_in_seconds: str + :keyword replica_role: The role of a replica of a stateful service. Possible values include: + "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", + "ActiveAuxiliary", "PrimaryAuxiliary". + :paramtype replica_role: str or ~azure.servicefabric.models.ReplicaRole + :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: str + """ + super(StatefulServiceReplicaInfo, self).__init__(**kwargs) + self.service_kind = 'Stateful' # type: str + self.replica_role = kwargs.get('replica_role', None) + self.replica_id = kwargs.get('replica_id', None) + + +class StatefulServiceTypeDescription(ServiceTypeDescription): + """Describes a stateful service type defined in the service manifest of a provisioned application type. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of service (Stateless or Stateful).Constant filled by server. + Possible values include: "Invalid", "Stateless", "Stateful". + :vartype kind: str or ~azure.servicefabric.models.ServiceKind + :ivar is_stateful: Indicates whether the service type is a stateful service type or a stateless + service type. This property is true if the service type is a stateful service type, false + otherwise. + :vartype is_stateful: bool + :ivar service_type_name: Name of the service type as specified in the service manifest. + :vartype service_type_name: str + :ivar placement_constraints: The placement constraint to be used when instantiating this + service in a Service Fabric cluster. + :vartype placement_constraints: str + :ivar load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: List of service placement policy descriptions. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar extensions: List of service type extensions. + :vartype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :ivar has_persisted_state: A flag indicating whether this is a persistent service which stores + states on the local disk. If it is then the value of this property is true, if not it is false. + :vartype has_persisted_state: bool + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword is_stateful: Indicates whether the service type is a stateful service type or a + stateless service type. This property is true if the service type is a stateful service type, + false otherwise. + :paramtype is_stateful: bool + :keyword service_type_name: Name of the service type as specified in the service manifest. + :paramtype service_type_name: str + :keyword placement_constraints: The placement constraint to be used when instantiating this + service in a Service Fabric cluster. + :paramtype placement_constraints: str + :keyword load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: List of service placement policy descriptions. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword extensions: List of service type extensions. + :paramtype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :keyword has_persisted_state: A flag indicating whether this is a persistent service which + stores states on the local disk. If it is then the value of this property is true, if not it is + false. + :paramtype has_persisted_state: bool + """ + super(StatefulServiceTypeDescription, self).__init__(**kwargs) + self.kind = 'Stateful' # type: str + self.has_persisted_state = kwargs.get('has_persisted_state', None) + + +class StatefulServiceUpdateDescription(ServiceUpdateDescription): + """Describes an update for a stateful service. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The service kind.Constant filled by server. Possible values + include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and + QuorumLossWaitDuration (4) are set. + + + * None - Does not indicate any other properties are set. The value is zero. + * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property + (for Stateful services) or the InstanceCount property (for Stateless services) is set. The + value is 1. + * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The + value is 2. + * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is + 4. + * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The + value is 8. + * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. + * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. + * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is + 64. + * Correlation - Indicates the CorrelationScheme property is set. The value is 128. + * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. + * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. + * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. + * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The + value is 2048. + * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. + * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is + 8192. + * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 16384. + * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 32768. + * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value + is 65536. + * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. + * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. + * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. + :vartype flags: str + :ivar placement_constraints: The placement constraints as a string. Placement constraints are + boolean expressions on node properties and allow for restricting a service to particular nodes + based on the service requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :vartype placement_constraints: str + :ivar correlation_scheme: The correlation scheme. + :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :ivar load_metrics: The service load metrics. + :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: The service placement policies. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", + "Medium", "High", "VeryHigh". + :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :ivar scaling_policies: Scaling policies for this service. + :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :ivar service_dns_name: The DNS name of the service. + :vartype service_dns_name: str + :ivar tags_for_placement: Tags for placement of this service. + :vartype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :ivar tags_for_running: Tags for running of this service. + :vartype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :ivar target_replica_set_size: The target replica set size as a number. + :vartype target_replica_set_size: int + :ivar min_replica_set_size: The minimum replica set size as a number. + :vartype min_replica_set_size: int + :ivar replica_restart_wait_duration_seconds: The duration, in seconds, between when a replica + goes down and when a new replica is created. + :vartype replica_restart_wait_duration_seconds: str + :ivar quorum_loss_wait_duration_seconds: The maximum duration, in seconds, for which a + partition is allowed to be in a state of quorum loss. + :vartype quorum_loss_wait_duration_seconds: str + :ivar stand_by_replica_keep_duration_seconds: The definition on how long StandBy replicas + should be maintained before being removed. + :vartype stand_by_replica_keep_duration_seconds: str + :ivar service_placement_time_limit_seconds: The duration for which replicas can stay InBuild + before reporting that build is stuck. + :vartype service_placement_time_limit_seconds: str + :ivar drop_source_replica_on_move: Indicates whether to drop source Secondary replica even if + the target replica has not finished build. If desired behavior is to drop it as soon as + possible the value of this property is true, if not it is false. + :vartype drop_source_replica_on_move: bool + :ivar replica_lifecycle_description: Defines how replicas of this service will behave during + ther lifecycle. + :vartype replica_lifecycle_description: ~azure.servicefabric.models.ReplicaLifecycleDescription + :ivar auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary + replicas, the following must be true: AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :vartype auxiliary_replica_count: int + """ + + _validation = { + 'service_kind': {'required': True}, + 'target_replica_set_size': {'minimum': 1}, + 'min_replica_set_size': {'minimum': 1}, + 'auxiliary_replica_count': {'minimum': 0}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'str'}, + 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'str'}, + 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'str'}, + 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'str'}, + 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, + 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and + QuorumLossWaitDuration (4) are set. + + + * None - Does not indicate any other properties are set. The value is zero. + * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property + (for Stateful services) or the InstanceCount property (for Stateless services) is set. The + value is 1. + * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The + value is 2. + * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is + 4. + * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The + value is 8. + * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. + * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. + * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is + 64. + * Correlation - Indicates the CorrelationScheme property is set. The value is 128. + * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. + * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. + * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. + * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The + value is 2048. + * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. + * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is + 8192. + * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 16384. + * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 32768. + * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value + is 65536. + * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. + * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. + * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. + :paramtype flags: str + :keyword placement_constraints: The placement constraints as a string. Placement constraints + are boolean expressions on node properties and allow for restricting a service to particular + nodes based on the service requirements. For example, to place a service on nodes where + NodeType is blue specify the following: "NodeColor == blue)". + :paramtype placement_constraints: str + :keyword correlation_scheme: The correlation scheme. + :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :keyword load_metrics: The service load metrics. + :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: The service placement policies. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", + "Low", "Medium", "High", "VeryHigh". + :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :keyword scaling_policies: Scaling policies for this service. + :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :keyword service_dns_name: The DNS name of the service. + :paramtype service_dns_name: str + :keyword tags_for_placement: Tags for placement of this service. + :paramtype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :keyword tags_for_running: Tags for running of this service. + :paramtype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :keyword target_replica_set_size: The target replica set size as a number. + :paramtype target_replica_set_size: int + :keyword min_replica_set_size: The minimum replica set size as a number. + :paramtype min_replica_set_size: int + :keyword replica_restart_wait_duration_seconds: The duration, in seconds, between when a + replica goes down and when a new replica is created. + :paramtype replica_restart_wait_duration_seconds: str + :keyword quorum_loss_wait_duration_seconds: The maximum duration, in seconds, for which a + partition is allowed to be in a state of quorum loss. + :paramtype quorum_loss_wait_duration_seconds: str + :keyword stand_by_replica_keep_duration_seconds: The definition on how long StandBy replicas + should be maintained before being removed. + :paramtype stand_by_replica_keep_duration_seconds: str + :keyword service_placement_time_limit_seconds: The duration for which replicas can stay InBuild + before reporting that build is stuck. + :paramtype service_placement_time_limit_seconds: str + :keyword drop_source_replica_on_move: Indicates whether to drop source Secondary replica even + if the target replica has not finished build. If desired behavior is to drop it as soon as + possible the value of this property is true, if not it is false. + :paramtype drop_source_replica_on_move: bool + :keyword replica_lifecycle_description: Defines how replicas of this service will behave during + ther lifecycle. + :paramtype replica_lifecycle_description: + ~azure.servicefabric.models.ReplicaLifecycleDescription + :keyword auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary + replicas, the following must be true: AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :paramtype auxiliary_replica_count: int + """ + super(StatefulServiceUpdateDescription, self).__init__(**kwargs) + self.service_kind = 'Stateful' # type: str + self.target_replica_set_size = kwargs.get('target_replica_set_size', None) + self.min_replica_set_size = kwargs.get('min_replica_set_size', None) + self.replica_restart_wait_duration_seconds = kwargs.get('replica_restart_wait_duration_seconds', None) + self.quorum_loss_wait_duration_seconds = kwargs.get('quorum_loss_wait_duration_seconds', None) + self.stand_by_replica_keep_duration_seconds = kwargs.get('stand_by_replica_keep_duration_seconds', None) + self.service_placement_time_limit_seconds = kwargs.get('service_placement_time_limit_seconds', None) + self.drop_source_replica_on_move = kwargs.get('drop_source_replica_on_move', None) + self.replica_lifecycle_description = kwargs.get('replica_lifecycle_description', None) + self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) + + +class StatelessReplicaHealthReportExpiredEvent(ReplicaEvent): + """Stateless Replica Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :vartype replica_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(StatelessReplicaHealthReportExpiredEvent, self).__init__(**kwargs) + self.kind = 'StatelessReplicaHealthReportExpired' # type: str + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class StatelessReplicaNewHealthReportEvent(ReplicaEvent): + """Stateless Replica Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :vartype replica_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(StatelessReplicaNewHealthReportEvent, self).__init__(**kwargs) + self.kind = 'StatelessReplicaNewHealthReport' # type: str + self.source_id = kwargs['source_id'] + self.property = kwargs['property'] + self.health_state = kwargs['health_state'] + self.time_to_live_ms = kwargs['time_to_live_ms'] + self.sequence_number = kwargs['sequence_number'] + self.description = kwargs['description'] + self.remove_when_expired = kwargs['remove_when_expired'] + self.source_utc_timestamp = kwargs['source_utc_timestamp'] + + +class StatelessServiceDescription(ServiceDescription): + """Describes a stateless service. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The service kind.Constant filled by server. Possible values + include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar service_name: Required. The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar service_type_name: Required. Name of the service type as specified in the service + manifest. + :vartype service_type_name: str + :ivar initialization_data: The initialization data as an array of bytes. Initialization data is + passed to service instances or replicas when they are created. + :vartype initialization_data: list[int] + :ivar partition_description: Required. The partition description as an object. + :vartype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription + :ivar placement_constraints: The placement constraints as a string. Placement constraints are + boolean expressions on node properties and allow for restricting a service to particular nodes + based on the service requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :vartype placement_constraints: str + :ivar correlation_scheme: The correlation scheme. + :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :ivar service_load_metrics: The service load metrics. + :vartype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: The service placement policies. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", + "Medium", "High", "VeryHigh". + :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :ivar is_default_move_cost_specified: Indicates if the DefaultMoveCost property is specified. + :vartype is_default_move_cost_specified: bool + :ivar service_package_activation_mode: The activation mode of service package to be used for a + service. Possible values include: "SharedProcess", "ExclusiveProcess". + :vartype service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :ivar service_dns_name: The DNS name of the service. It requires the DNS system service to be + enabled in Service Fabric cluster. + :vartype service_dns_name: str + :ivar scaling_policies: Scaling policies for this service. + :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :ivar tags_required_to_place: Tags for placement of this service. + :vartype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription + :ivar tags_required_to_run: Tags for running of this service. + :vartype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription + :ivar instance_count: Required. The instance count. + :vartype instance_count: int + :ivar min_instance_count: MinInstanceCount is the minimum number of instances that must be up + to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted + into the number of nodes on which the instances are allowed to be placed according to the + placement constraints on the service. + :vartype min_instance_count: int + :ivar min_instance_percentage: MinInstancePercentage is the minimum percentage of InstanceCount + that must be up to meet the EnsureAvailability safety check during operations like upgrade or + deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first + converted into the number of nodes on which the instances are allowed to be placed according to + the placement constraints on the service. + :vartype min_instance_percentage: int + :ivar flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 1 then the flags for InstanceCloseDelayDuration is set. + + + * None - Does not indicate any other properties are set. The value is zero. + * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 1. + * InstanceRestartWaitDuration - Indicates the InstanceRestartWaitDurationSeconds property is + set. The value is 2. + :vartype flags: int + :ivar instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster upgrade and disabling node. + The endpoint exposed on this instance is removed prior to starting the delay, which prevents + new connections to this instance. + In addition, clients that have subscribed to service endpoint change + events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), + can do + the following upon receiving the endpoint removal notification: + + .. code-block:: + + - Stop sending new requests to this instance. + - Close existing connections after in-flight requests have completed. + - Connect to a different instance of the service partition for future requests. + + Note, the default value of InstanceCloseDelayDuration is 0, which indicates that there won't + be any delay or removal of the endpoint prior to closing the instance. + :vartype instance_close_delay_duration_seconds: long + :ivar instance_lifecycle_description: Defines how instances of this service will behave during + their lifecycle. + :vartype instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :ivar instance_restart_wait_duration_seconds: When a stateless instance goes down, this timer + starts. When it expires Service Fabric will create a new instance on any node in the cluster. + This configuration is to reduce unnecessary creation of a new instance in situations where the + instance going down is likely to recover in a short time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes down, Service Fabric + will immediately start building its replacement. + :vartype instance_restart_wait_duration_seconds: long + """ + + _validation = { + 'service_kind': {'required': True}, + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + 'instance_count': {'required': True, 'minimum': -1}, + 'min_instance_count': {'minimum': 1}, + 'min_instance_percentage': {'maximum': 100, 'minimum': 0}, + 'instance_close_delay_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'instance_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'long'}, + 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, + 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword service_name: Required. The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword service_type_name: Required. Name of the service type as specified in the service + manifest. + :paramtype service_type_name: str + :keyword initialization_data: The initialization data as an array of bytes. Initialization data + is passed to service instances or replicas when they are created. + :paramtype initialization_data: list[int] + :keyword partition_description: Required. The partition description as an object. + :paramtype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription + :keyword placement_constraints: The placement constraints as a string. Placement constraints + are boolean expressions on node properties and allow for restricting a service to particular + nodes based on the service requirements. For example, to place a service on nodes where + NodeType is blue specify the following: "NodeColor == blue)". + :paramtype placement_constraints: str + :keyword correlation_scheme: The correlation scheme. + :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :keyword service_load_metrics: The service load metrics. + :paramtype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: The service placement policies. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", + "Low", "Medium", "High", "VeryHigh". + :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :keyword is_default_move_cost_specified: Indicates if the DefaultMoveCost property is + specified. + :paramtype is_default_move_cost_specified: bool + :keyword service_package_activation_mode: The activation mode of service package to be used for + a service. Possible values include: "SharedProcess", "ExclusiveProcess". + :paramtype service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :keyword service_dns_name: The DNS name of the service. It requires the DNS system service to + be enabled in Service Fabric cluster. + :paramtype service_dns_name: str + :keyword scaling_policies: Scaling policies for this service. + :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :keyword tags_required_to_place: Tags for placement of this service. + :paramtype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription + :keyword tags_required_to_run: Tags for running of this service. + :paramtype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription + :keyword instance_count: Required. The instance count. + :paramtype instance_count: int + :keyword min_instance_count: MinInstanceCount is the minimum number of instances that must be + up to meet the EnsureAvailability safety check during operations like upgrade or deactivate + node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted + into the number of nodes on which the instances are allowed to be placed according to the + placement constraints on the service. + :paramtype min_instance_count: int + :keyword min_instance_percentage: MinInstancePercentage is the minimum percentage of + InstanceCount that must be up to meet the EnsureAvailability safety check during operations + like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first + converted into the number of nodes on which the instances are allowed to be placed according to + the placement constraints on the service. + :paramtype min_instance_percentage: int + :keyword flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 1 then the flags for InstanceCloseDelayDuration is set. + + + * None - Does not indicate any other properties are set. The value is zero. + * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 1. + * InstanceRestartWaitDuration - Indicates the InstanceRestartWaitDurationSeconds property is + set. The value is 2. + :paramtype flags: int + :keyword instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster upgrade and disabling node. + The endpoint exposed on this instance is removed prior to starting the delay, which prevents + new connections to this instance. + In addition, clients that have subscribed to service endpoint change + events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), + can do + the following upon receiving the endpoint removal notification: + + .. code-block:: + + - Stop sending new requests to this instance. + - Close existing connections after in-flight requests have completed. + - Connect to a different instance of the service partition for future requests. + + Note, the default value of InstanceCloseDelayDuration is 0, which indicates that there won't + be any delay or removal of the endpoint prior to closing the instance. + :paramtype instance_close_delay_duration_seconds: long + :keyword instance_lifecycle_description: Defines how instances of this service will behave + during their lifecycle. + :paramtype instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :keyword instance_restart_wait_duration_seconds: When a stateless instance goes down, this + timer starts. When it expires Service Fabric will create a new instance on any node in the + cluster. + This configuration is to reduce unnecessary creation of a new instance in situations where the + instance going down is likely to recover in a short time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes down, Service Fabric + will immediately start building its replacement. + :paramtype instance_restart_wait_duration_seconds: long + """ + super(StatelessServiceDescription, self).__init__(**kwargs) + self.service_kind = 'Stateless' # type: str + self.instance_count = kwargs['instance_count'] + self.min_instance_count = kwargs.get('min_instance_count', 1) + self.min_instance_percentage = kwargs.get('min_instance_percentage', 0) + self.flags = kwargs.get('flags', None) + self.instance_close_delay_duration_seconds = kwargs.get('instance_close_delay_duration_seconds', None) + self.instance_lifecycle_description = kwargs.get('instance_lifecycle_description', None) + self.instance_restart_wait_duration_seconds = kwargs.get('instance_restart_wait_duration_seconds', None) + + +class StatelessServiceInfo(ServiceInfo): + """Information about a stateless Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The identity of the service. This ID is an encoded representation of the service + name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype id: str + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar name: The full name of the service with 'fabric:' URI scheme. + :vartype name: str + :ivar type_name: Name of the service type as specified in the service manifest. + :vartype type_name: str + :ivar manifest_version: The version of the service manifest. + :vartype manifest_version: str + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_status: The status of the application. Possible values include: "Unknown", + "Active", "Upgrading", "Deleting", "Creating", "Failed". + :vartype service_status: str or ~azure.servicefabric.models.ServiceStatus + :ivar is_service_group: Whether the service is in a service group. + :vartype is_service_group: bool + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: The identity of the service. This ID is an encoded representation of the service + name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype id: str + :keyword name: The full name of the service with 'fabric:' URI scheme. + :paramtype name: str + :keyword type_name: Name of the service type as specified in the service manifest. + :paramtype type_name: str + :keyword manifest_version: The version of the service manifest. + :paramtype manifest_version: str + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword service_status: The status of the application. Possible values include: "Unknown", + "Active", "Upgrading", "Deleting", "Creating", "Failed". + :paramtype service_status: str or ~azure.servicefabric.models.ServiceStatus + :keyword is_service_group: Whether the service is in a service group. + :paramtype is_service_group: bool + """ + super(StatelessServiceInfo, self).__init__(**kwargs) + self.service_kind = 'Stateless' # type: str + + +class StatelessServiceInstanceHealth(ReplicaHealth): + """Represents the health of the stateless service instance. +Contains the instance aggregated health state, the health events and the unhealthy evaluations. + + All required parameters must be populated in order to send to Azure. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar partition_id: Id of the partition to which this replica belongs. + :vartype partition_id: str + :ivar instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric to + uniquely identify an instance of a partition of a stateless service. It is unique within a + partition and does not change for the lifetime of the instance. If the instance has failed over + on the same or different node, it will get a different value for the InstanceId. + :vartype instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword partition_id: Id of the partition to which this replica belongs. + :paramtype partition_id: str + :keyword instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric + to uniquely identify an instance of a partition of a stateless service. It is unique within a + partition and does not change for the lifetime of the instance. If the instance has failed over + on the same or different node, it will get a different value for the InstanceId. + :paramtype instance_id: str + """ + super(StatelessServiceInstanceHealth, self).__init__(**kwargs) + self.service_kind = 'Stateless' # type: str + self.instance_id = kwargs.get('instance_id', None) + + +class StatelessServiceInstanceHealthState(ReplicaHealthState): + """Represents the health state of the stateless service instance, which contains the instance ID and the aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar partition_id: The ID of the partition to which this replica belongs. + :vartype partition_id: str + :ivar replica_id: Id of the stateless service instance on the wire this field is called + ReplicaId. + :vartype replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword partition_id: The ID of the partition to which this replica belongs. + :paramtype partition_id: str + :keyword replica_id: Id of the stateless service instance on the wire this field is called + ReplicaId. + :paramtype replica_id: str + """ + super(StatelessServiceInstanceHealthState, self).__init__(**kwargs) + self.service_kind = 'Stateless' # type: str + self.replica_id = kwargs.get('replica_id', None) + + +class StatelessServiceInstanceInfo(ReplicaInfo): + """Represents a stateless service instance. This includes information about the identity, status, health, node name, uptime, and other details about the instance. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", + "InBuild", "Standby", "Ready", "Down", "Dropped". + :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar node_name: The name of a Service Fabric node. + :vartype node_name: str + :ivar address: The address the replica is listening on. + :vartype address: str + :ivar last_in_build_duration_in_seconds: The last in build duration of the replica in seconds. + :vartype last_in_build_duration_in_seconds: str + :ivar instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric to + uniquely identify an instance of a partition of a stateless service. It is unique within a + partition and does not change for the lifetime of the instance. If the instance has failed over + on the same or different node, it will get a different value for the InstanceId. + :vartype instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword replica_status: The status of a replica of a service. Possible values include: + "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". + :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword node_name: The name of a Service Fabric node. + :paramtype node_name: str + :keyword address: The address the replica is listening on. + :paramtype address: str + :keyword last_in_build_duration_in_seconds: The last in build duration of the replica in + seconds. + :paramtype last_in_build_duration_in_seconds: str + :keyword instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric + to uniquely identify an instance of a partition of a stateless service. It is unique within a + partition and does not change for the lifetime of the instance. If the instance has failed over + on the same or different node, it will get a different value for the InstanceId. + :paramtype instance_id: str + """ + super(StatelessServiceInstanceInfo, self).__init__(**kwargs) + self.service_kind = 'Stateless' # type: str + self.instance_id = kwargs.get('instance_id', None) + + +class StatelessServicePartitionInfo(ServicePartitionInfo): + """Information about a partition of a stateless Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar partition_status: The status of the service fabric service partition. Possible values + include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". + :vartype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus + :ivar partition_information: Information about the partition identity, partitioning scheme and + keys supported by it. + :vartype partition_information: ~azure.servicefabric.models.PartitionInformation + :ivar instance_count: Number of instances of this partition. + :vartype instance_count: long + :ivar min_instance_count: MinInstanceCount is the minimum number of instances that must be up + to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted + into the number of nodes on which the instances are allowed to be placed according to the + placement constraints on the service. + :vartype min_instance_count: int + :ivar min_instance_percentage: MinInstancePercentage is the minimum percentage of InstanceCount + that must be up to meet the EnsureAvailability safety check during operations like upgrade or + deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first + converted into the number of nodes on which the instances are allowed to be placed according to + the placement constraints on the service. + :vartype min_instance_percentage: int + """ + + _validation = { + 'service_kind': {'required': True}, + 'min_instance_count': {'minimum': 1}, + 'min_instance_percentage': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'long'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword partition_status: The status of the service fabric service partition. Possible values + include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". + :paramtype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus + :keyword partition_information: Information about the partition identity, partitioning scheme + and keys supported by it. + :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation + :keyword instance_count: Number of instances of this partition. + :paramtype instance_count: long + :keyword min_instance_count: MinInstanceCount is the minimum number of instances that must be + up to meet the EnsureAvailability safety check during operations like upgrade or deactivate + node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted + into the number of nodes on which the instances are allowed to be placed according to the + placement constraints on the service. + :paramtype min_instance_count: int + :keyword min_instance_percentage: MinInstancePercentage is the minimum percentage of + InstanceCount that must be up to meet the EnsureAvailability safety check during operations + like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first + converted into the number of nodes on which the instances are allowed to be placed according to + the placement constraints on the service. + :paramtype min_instance_percentage: int + """ + super(StatelessServicePartitionInfo, self).__init__(**kwargs) + self.service_kind = 'Stateless' # type: str + self.instance_count = kwargs.get('instance_count', None) + self.min_instance_count = kwargs.get('min_instance_count', 1) + self.min_instance_percentage = kwargs.get('min_instance_percentage', 0) + + +class StatelessServiceTypeDescription(ServiceTypeDescription): + """Describes a stateless service type defined in the service manifest of a provisioned application type. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of service (Stateless or Stateful).Constant filled by server. + Possible values include: "Invalid", "Stateless", "Stateful". + :vartype kind: str or ~azure.servicefabric.models.ServiceKind + :ivar is_stateful: Indicates whether the service type is a stateful service type or a stateless + service type. This property is true if the service type is a stateful service type, false + otherwise. + :vartype is_stateful: bool + :ivar service_type_name: Name of the service type as specified in the service manifest. + :vartype service_type_name: str + :ivar placement_constraints: The placement constraint to be used when instantiating this + service in a Service Fabric cluster. + :vartype placement_constraints: str + :ivar load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: List of service placement policy descriptions. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar extensions: List of service type extensions. + :vartype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :ivar use_implicit_host: A flag indicating if this type is not implemented and hosted by a user + service process, but is implicitly hosted by a system created process. This value is true for + services using the guest executable services, false otherwise. + :vartype use_implicit_host: bool + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + 'use_implicit_host': {'key': 'UseImplicitHost', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword is_stateful: Indicates whether the service type is a stateful service type or a + stateless service type. This property is true if the service type is a stateful service type, + false otherwise. + :paramtype is_stateful: bool + :keyword service_type_name: Name of the service type as specified in the service manifest. + :paramtype service_type_name: str + :keyword placement_constraints: The placement constraint to be used when instantiating this + service in a Service Fabric cluster. + :paramtype placement_constraints: str + :keyword load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: List of service placement policy descriptions. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword extensions: List of service type extensions. + :paramtype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :keyword use_implicit_host: A flag indicating if this type is not implemented and hosted by a + user service process, but is implicitly hosted by a system created process. This value is true + for services using the guest executable services, false otherwise. + :paramtype use_implicit_host: bool + """ + super(StatelessServiceTypeDescription, self).__init__(**kwargs) + self.kind = 'Stateless' # type: str + self.use_implicit_host = kwargs.get('use_implicit_host', None) + + +class StatelessServiceUpdateDescription(ServiceUpdateDescription): + """Describes an update for a stateless service. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The service kind.Constant filled by server. Possible values + include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and + QuorumLossWaitDuration (4) are set. + + + * None - Does not indicate any other properties are set. The value is zero. + * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property + (for Stateful services) or the InstanceCount property (for Stateless services) is set. The + value is 1. + * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The + value is 2. + * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is + 4. + * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The + value is 8. + * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. + * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. + * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is + 64. + * Correlation - Indicates the CorrelationScheme property is set. The value is 128. + * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. + * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. + * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. + * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The + value is 2048. + * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. + * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is + 8192. + * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 16384. + * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 32768. + * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value + is 65536. + * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. + * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. + * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. + :vartype flags: str + :ivar placement_constraints: The placement constraints as a string. Placement constraints are + boolean expressions on node properties and allow for restricting a service to particular nodes + based on the service requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :vartype placement_constraints: str + :ivar correlation_scheme: The correlation scheme. + :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :ivar load_metrics: The service load metrics. + :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: The service placement policies. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", + "Medium", "High", "VeryHigh". + :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :ivar scaling_policies: Scaling policies for this service. + :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :ivar service_dns_name: The DNS name of the service. + :vartype service_dns_name: str + :ivar tags_for_placement: Tags for placement of this service. + :vartype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :ivar tags_for_running: Tags for running of this service. + :vartype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :ivar instance_count: The instance count. + :vartype instance_count: int + :ivar min_instance_count: MinInstanceCount is the minimum number of instances that must be up + to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted + into the number of nodes on which the instances are allowed to be placed according to the + placement constraints on the service. + :vartype min_instance_count: int + :ivar min_instance_percentage: MinInstancePercentage is the minimum percentage of InstanceCount + that must be up to meet the EnsureAvailability safety check during operations like upgrade or + deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first + converted into the number of nodes on which the instances are allowed to be placed according to + the placement constraints on the service. + :vartype min_instance_percentage: int + :ivar instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster upgrade and disabling node. + The endpoint exposed on this instance is removed prior to starting the delay, which prevents + new connections to this instance. + In addition, clients that have subscribed to service endpoint change + events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), + can do + the following upon receiving the endpoint removal notification: + + .. code-block:: + + - Stop sending new requests to this instance. + - Close existing connections after in-flight requests have completed. + - Connect to a different instance of the service partition for future requests. + :vartype instance_close_delay_duration_seconds: str + :ivar instance_lifecycle_description: Defines how instances of this service will behave during + their lifecycle. + :vartype instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :ivar instance_restart_wait_duration_seconds: When a stateless instance goes down, this timer + starts. When it expires Service Fabric will create a new instance on any node in the cluster. + This configuration is to reduce unnecessary creation of a new instance in situations where the + instance going down is likely to recover in a short time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes down, Service Fabric + will immediately start building its replacement. + :vartype instance_restart_wait_duration_seconds: str + """ + + _validation = { + 'service_kind': {'required': True}, + 'instance_count': {'minimum': -1}, + 'min_instance_count': {'minimum': 1}, + 'min_instance_percentage': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'str'}, + 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, + 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and + QuorumLossWaitDuration (4) are set. + + + * None - Does not indicate any other properties are set. The value is zero. + * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property + (for Stateful services) or the InstanceCount property (for Stateless services) is set. The + value is 1. + * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The + value is 2. + * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is + 4. + * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The + value is 8. + * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. + * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. + * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is + 64. + * Correlation - Indicates the CorrelationScheme property is set. The value is 128. + * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. + * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. + * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. + * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The + value is 2048. + * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. + * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is + 8192. + * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 16384. + * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 32768. + * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value + is 65536. + * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. + * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. + * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. + :paramtype flags: str + :keyword placement_constraints: The placement constraints as a string. Placement constraints + are boolean expressions on node properties and allow for restricting a service to particular + nodes based on the service requirements. For example, to place a service on nodes where + NodeType is blue specify the following: "NodeColor == blue)". + :paramtype placement_constraints: str + :keyword correlation_scheme: The correlation scheme. + :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :keyword load_metrics: The service load metrics. + :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: The service placement policies. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", + "Low", "Medium", "High", "VeryHigh". + :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :keyword scaling_policies: Scaling policies for this service. + :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :keyword service_dns_name: The DNS name of the service. + :paramtype service_dns_name: str + :keyword tags_for_placement: Tags for placement of this service. + :paramtype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :keyword tags_for_running: Tags for running of this service. + :paramtype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :keyword instance_count: The instance count. + :paramtype instance_count: int + :keyword min_instance_count: MinInstanceCount is the minimum number of instances that must be + up to meet the EnsureAvailability safety check during operations like upgrade or deactivate + node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted + into the number of nodes on which the instances are allowed to be placed according to the + placement constraints on the service. + :paramtype min_instance_count: int + :keyword min_instance_percentage: MinInstancePercentage is the minimum percentage of + InstanceCount that must be up to meet the EnsureAvailability safety check during operations + like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first + converted into the number of nodes on which the instances are allowed to be placed according to + the placement constraints on the service. + :paramtype min_instance_percentage: int + :keyword instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster upgrade and disabling node. + The endpoint exposed on this instance is removed prior to starting the delay, which prevents + new connections to this instance. + In addition, clients that have subscribed to service endpoint change + events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), + can do + the following upon receiving the endpoint removal notification: + + .. code-block:: + + - Stop sending new requests to this instance. + - Close existing connections after in-flight requests have completed. + - Connect to a different instance of the service partition for future requests. + :paramtype instance_close_delay_duration_seconds: str + :keyword instance_lifecycle_description: Defines how instances of this service will behave + during their lifecycle. + :paramtype instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :keyword instance_restart_wait_duration_seconds: When a stateless instance goes down, this + timer starts. When it expires Service Fabric will create a new instance on any node in the + cluster. + This configuration is to reduce unnecessary creation of a new instance in situations where the + instance going down is likely to recover in a short time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes down, Service Fabric + will immediately start building its replacement. + :paramtype instance_restart_wait_duration_seconds: str + """ + super(StatelessServiceUpdateDescription, self).__init__(**kwargs) + self.service_kind = 'Stateless' # type: str + self.instance_count = kwargs.get('instance_count', None) + self.min_instance_count = kwargs.get('min_instance_count', 1) + self.min_instance_percentage = kwargs.get('min_instance_percentage', 0) + self.instance_close_delay_duration_seconds = kwargs.get('instance_close_delay_duration_seconds', None) + self.instance_lifecycle_description = kwargs.get('instance_lifecycle_description', None) + self.instance_restart_wait_duration_seconds = kwargs.get('instance_restart_wait_duration_seconds', None) + + +class StoppedChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos stops because either the user issued a stop or the time to run was up. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values + include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", + "Stopped". + :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind + :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :vartype time_stamp_utc: ~datetime.datetime + :ivar reason: Describes why Chaos stopped. Chaos can stop because of StopChaos API call or the + timeToRun provided in ChaosParameters is over. + :vartype reason: str + """ + + _validation = { + 'kind': {'required': True}, + 'time_stamp_utc': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :paramtype time_stamp_utc: ~datetime.datetime + :keyword reason: Describes why Chaos stopped. Chaos can stop because of StopChaos API call or + the timeToRun provided in ChaosParameters is over. + :paramtype reason: str + """ + super(StoppedChaosEvent, self).__init__(**kwargs) + self.kind = 'Stopped' # type: str + self.reason = kwargs.get('reason', None) + + +class StringPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type String. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property, determined by the type of data. Following are the + possible values.Constant filled by server. Possible values include: "Invalid", "Binary", + "Int64", "Double", "String", "Guid". + :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind + :ivar data: Required. The data of the property value. + :vartype data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword data: Required. The data of the property value. + :paramtype data: str + """ + super(StringPropertyValue, self).__init__(**kwargs) + self.kind = 'String' # type: str + self.data = kwargs['data'] + + +class SuccessfulPropertyBatchInfo(PropertyBatchInfo): + """Derived from PropertyBatchInfo. Represents the property batch succeeding. Contains the results of any "Get" operations in the batch. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch info, determined by the results of a property + batch. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Successful", "Failed". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchInfoKind + :ivar properties: A map containing the properties that were requested through any "Get" + property batch operations. The key represents the index of the "Get" operation in the original + request, in string form. The value is the property. If a property is not found, it will not be + in the map. + :vartype properties: dict[str, ~azure.servicefabric.models.PropertyInfo] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'properties': {'key': 'Properties', 'type': '{PropertyInfo}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: A map containing the properties that were requested through any "Get" + property batch operations. The key represents the index of the "Get" operation in the original + request, in string form. The value is the property. If a property is not found, it will not be + in the map. + :paramtype properties: dict[str, ~azure.servicefabric.models.PropertyInfo] + """ + super(SuccessfulPropertyBatchInfo, self).__init__(**kwargs) + self.kind = 'Successful' # type: str + self.properties = kwargs.get('properties', None) + + +class SystemApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for the fabric:/System application, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state of the cluster is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated + health state of the system application. The types of the unhealthy evaluations can be + DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current + aggregated health state of the system application. The types of the unhealthy evaluations can + be DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(SystemApplicationHealthEvaluation, self).__init__(**kwargs) + self.kind = 'SystemApplication' # type: str + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class TcpConfig(msrest.serialization.Model): + """Describes the tcp configuration for external connectivity for this network. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. tcp gateway config name. + :vartype name: str + :ivar port: Required. Specifies the port at which the service endpoint below needs to be + exposed. + :vartype port: int + :ivar destination: Required. Describes destination endpoint for routing traffic. + :vartype destination: ~azure.servicefabric.models.GatewayDestination + """ + + _validation = { + 'name': {'required': True}, + 'port': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. tcp gateway config name. + :paramtype name: str + :keyword port: Required. Specifies the port at which the service endpoint below needs to be + exposed. + :paramtype port: int + :keyword destination: Required. Describes destination endpoint for routing traffic. + :paramtype destination: ~azure.servicefabric.models.GatewayDestination + """ + super(TcpConfig, self).__init__(**kwargs) + self.name = kwargs['name'] + self.port = kwargs['port'] + self.destination = kwargs['destination'] + + +class TestErrorChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when an unexpected event occurs in the Chaos engine. +For example, due to the cluster snapshot being inconsistent, while faulting an entity, Chaos found that the entity was already faulted -- which would be an unexpected event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values + include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", + "Stopped". + :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind + :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :vartype time_stamp_utc: ~datetime.datetime + :ivar reason: Describes why TestErrorChaosEvent was generated. For example, Chaos tries to + fault a partition but finds that the partition is no longer fault tolerant, then a + TestErrorEvent gets generated with the reason stating that the partition is not fault tolerant. + :vartype reason: str + """ + + _validation = { + 'kind': {'required': True}, + 'time_stamp_utc': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :paramtype time_stamp_utc: ~datetime.datetime + :keyword reason: Describes why TestErrorChaosEvent was generated. For example, Chaos tries to + fault a partition but finds that the partition is no longer fault tolerant, then a + TestErrorEvent gets generated with the reason stating that the partition is not fault tolerant. + :paramtype reason: str + """ + super(TestErrorChaosEvent, self).__init__(**kwargs) + self.kind = 'TestError' # type: str + self.reason = kwargs.get('reason', None) + + +class TimeBasedBackupScheduleDescription(BackupScheduleDescription): + """Describes the time based backup schedule. + + All required parameters must be populated in order to send to Azure. + + :ivar schedule_kind: Required. The kind of backup schedule, time based or frequency + based.Constant filled by server. Possible values include: "Invalid", "TimeBased", + "FrequencyBased". + :vartype schedule_kind: str or ~azure.servicefabric.models.BackupScheduleKind + :ivar schedule_frequency_type: Required. Describes the frequency with which to run the time + based backup schedule. Possible values include: "Invalid", "Daily", "Weekly". + :vartype schedule_frequency_type: str or + ~azure.servicefabric.models.BackupScheduleFrequencyType + :ivar run_days: List of days of a week when to trigger the periodic backup. This is valid only + when the backup schedule frequency type is weekly. + :vartype run_days: list[str or ~azure.servicefabric.models.DayOfWeek] + :ivar run_times: Required. Represents the list of exact time during the day in ISO8601 format. + Like '19:00:00' will represent '7PM' during the day. Date specified along with time will be + ignored. + :vartype run_times: list[~datetime.datetime] + """ + + _validation = { + 'schedule_kind': {'required': True}, + 'schedule_frequency_type': {'required': True}, + 'run_times': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + 'schedule_frequency_type': {'key': 'ScheduleFrequencyType', 'type': 'str'}, + 'run_days': {'key': 'RunDays', 'type': '[str]'}, + 'run_times': {'key': 'RunTimes', 'type': '[iso-8601]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword schedule_frequency_type: Required. Describes the frequency with which to run the time + based backup schedule. Possible values include: "Invalid", "Daily", "Weekly". + :paramtype schedule_frequency_type: str or + ~azure.servicefabric.models.BackupScheduleFrequencyType + :keyword run_days: List of days of a week when to trigger the periodic backup. This is valid + only when the backup schedule frequency type is weekly. + :paramtype run_days: list[str or ~azure.servicefabric.models.DayOfWeek] + :keyword run_times: Required. Represents the list of exact time during the day in ISO8601 + format. Like '19:00:00' will represent '7PM' during the day. Date specified along with time + will be ignored. + :paramtype run_times: list[~datetime.datetime] + """ + super(TimeBasedBackupScheduleDescription, self).__init__(**kwargs) + self.schedule_kind = 'TimeBased' # type: str + self.schedule_frequency_type = kwargs['schedule_frequency_type'] + self.run_days = kwargs.get('run_days', None) + self.run_times = kwargs['run_times'] + + +class TimeOfDay(msrest.serialization.Model): + """Defines an hour and minute of the day specified in 24 hour time. + + :ivar hour: Represents the hour of the day. Value must be between 0 and 23 inclusive. + :vartype hour: int + :ivar minute: Represents the minute of the hour. Value must be between 0 to 59 inclusive. + :vartype minute: int + """ + + _validation = { + 'hour': {'maximum': 23, 'minimum': 0}, + 'minute': {'maximum': 59, 'minimum': 0}, + } + + _attribute_map = { + 'hour': {'key': 'Hour', 'type': 'int'}, + 'minute': {'key': 'Minute', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword hour: Represents the hour of the day. Value must be between 0 and 23 inclusive. + :paramtype hour: int + :keyword minute: Represents the minute of the hour. Value must be between 0 to 59 inclusive. + :paramtype minute: int + """ + super(TimeOfDay, self).__init__(**kwargs) + self.hour = kwargs.get('hour', None) + self.minute = kwargs.get('minute', None) + + +class TimeRange(msrest.serialization.Model): + """Defines a time range in a 24 hour day specified by a start and end time. + + :ivar start_time: Defines an hour and minute of the day specified in 24 hour time. + :vartype start_time: ~azure.servicefabric.models.TimeOfDay + :ivar end_time: Defines an hour and minute of the day specified in 24 hour time. + :vartype end_time: ~azure.servicefabric.models.TimeOfDay + """ + + _attribute_map = { + 'start_time': {'key': 'StartTime', 'type': 'TimeOfDay'}, + 'end_time': {'key': 'EndTime', 'type': 'TimeOfDay'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword start_time: Defines an hour and minute of the day specified in 24 hour time. + :paramtype start_time: ~azure.servicefabric.models.TimeOfDay + :keyword end_time: Defines an hour and minute of the day specified in 24 hour time. + :paramtype end_time: ~azure.servicefabric.models.TimeOfDay + """ + super(TimeRange, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + + +class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): + """Describes a partitioning scheme where an integer range is allocated evenly across a number of partitions. + + All required parameters must be populated in order to send to Azure. + + :ivar partition_scheme: Required. Specifies how the service is partitioned.Constant filled by + server. Possible values include: "Invalid", "Singleton", "UniformInt64Range", "Named". + :vartype partition_scheme: str or ~azure.servicefabric.models.PartitionScheme + :ivar count: Required. The number of partitions. + :vartype count: int + :ivar low_key: Required. String indicating the lower bound of the partition key range that + should be split between the partitions. + :vartype low_key: str + :ivar high_key: Required. String indicating the upper bound of the partition key range that + should be split between the partitions. + :vartype high_key: str + """ + + _validation = { + 'partition_scheme': {'required': True}, + 'count': {'required': True}, + 'low_key': {'required': True}, + 'high_key': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + 'count': {'key': 'Count', 'type': 'int'}, + 'low_key': {'key': 'LowKey', 'type': 'str'}, + 'high_key': {'key': 'HighKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword count: Required. The number of partitions. + :paramtype count: int + :keyword low_key: Required. String indicating the lower bound of the partition key range that + should be split between the partitions. + :paramtype low_key: str + :keyword high_key: Required. String indicating the upper bound of the partition key range that + should be split between the partitions. + :paramtype high_key: str + """ + super(UniformInt64RangePartitionSchemeDescription, self).__init__(**kwargs) + self.partition_scheme = 'UniformInt64Range' # type: str + self.count = kwargs['count'] + self.low_key = kwargs['low_key'] + self.high_key = kwargs['high_key'] + + +class UnplacedReplicaInformation(msrest.serialization.Model): + """Contains information for an unplaced replica. + + :ivar service_name: The name of the service. + :vartype service_name: str + :ivar partition_id: The ID of the partition. + :vartype partition_id: str + :ivar unplaced_replica_details: List of reasons due to which a replica cannot be placed. + :vartype unplaced_replica_details: list[str] + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'unplaced_replica_details': {'key': 'UnplacedReplicaDetails', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_name: The name of the service. + :paramtype service_name: str + :keyword partition_id: The ID of the partition. + :paramtype partition_id: str + :keyword unplaced_replica_details: List of reasons due to which a replica cannot be placed. + :paramtype unplaced_replica_details: list[str] + """ + super(UnplacedReplicaInformation, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) + self.unplaced_replica_details = kwargs.get('unplaced_replica_details', None) + + +class UnprovisionApplicationTypeDescriptionInfo(msrest.serialization.Model): + """Describes the operation to unregister or unprovision an application type and its version that was registered with the Service Fabric. + + All required parameters must be populated in order to send to Azure. + + :ivar application_type_version: Required. The version of the application type as defined in the + application manifest. + :vartype application_type_version: str + :ivar async_property: The flag indicating whether or not unprovision should occur + asynchronously. When set to true, the unprovision operation returns when the request is + accepted by the system, and the unprovision operation continues without any timeout limit. The + default value is false. However, we recommend setting it to true for large application packages + that were provisioned. + :vartype async_property: bool + """ + + _validation = { + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'async_property': {'key': 'Async', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword application_type_version: Required. The version of the application type as defined in + the application manifest. + :paramtype application_type_version: str + :keyword async_property: The flag indicating whether or not unprovision should occur + asynchronously. When set to true, the unprovision operation returns when the request is + accepted by the system, and the unprovision operation continues without any timeout limit. The + default value is false. However, we recommend setting it to true for large application packages + that were provisioned. + :paramtype async_property: bool + """ + super(UnprovisionApplicationTypeDescriptionInfo, self).__init__(**kwargs) + self.application_type_version = kwargs['application_type_version'] + self.async_property = kwargs.get('async_property', None) + + +class UnprovisionFabricDescription(msrest.serialization.Model): + """Describes the parameters for unprovisioning a cluster. + + :ivar code_version: The cluster code package version. + :vartype code_version: str + :ivar config_version: The cluster manifest version. + :vartype config_version: str + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code_version: The cluster code package version. + :paramtype code_version: str + :keyword config_version: The cluster manifest version. + :paramtype config_version: str + """ + super(UnprovisionFabricDescription, self).__init__(**kwargs) + self.code_version = kwargs.get('code_version', None) + self.config_version = kwargs.get('config_version', None) + + +class UpdateClusterUpgradeDescription(msrest.serialization.Model): + """Parameters for updating a cluster upgrade. + + :ivar upgrade_kind: The type of upgrade out of the following possible values. Possible values + include: "Invalid", "Rolling", "Rolling_ForceRestart". Default value: "Rolling". + :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeType + :ivar update_description: Describes the parameters for updating a rolling upgrade of + application or cluster. + :vartype update_description: ~azure.servicefabric.models.RollingUpgradeUpdateDescription + :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster + or of a cluster node. + :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :ivar enable_delta_health_evaluation: When true, enables delta health evaluation rather than + absolute health evaluation after completion of each upgrade domain. + :vartype enable_delta_health_evaluation: bool + :ivar cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of the + cluster during a cluster upgrade. + :vartype cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :ivar application_health_policy_map: Defines the application health policy map used to evaluate + the health of an application or one of its children entities. + :vartype application_health_policy_map: ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _attribute_map = { + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword upgrade_kind: The type of upgrade out of the following possible values. Possible + values include: "Invalid", "Rolling", "Rolling_ForceRestart". Default value: "Rolling". + :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeType + :keyword update_description: Describes the parameters for updating a rolling upgrade of + application or cluster. + :paramtype update_description: ~azure.servicefabric.models.RollingUpgradeUpdateDescription + :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the + cluster or of a cluster node. + :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :keyword enable_delta_health_evaluation: When true, enables delta health evaluation rather than + absolute health evaluation after completion of each upgrade domain. + :paramtype enable_delta_health_evaluation: bool + :keyword cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of + the cluster during a cluster upgrade. + :paramtype cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :keyword application_health_policy_map: Defines the application health policy map used to + evaluate the health of an application or one of its children entities. + :paramtype application_health_policy_map: ~azure.servicefabric.models.ApplicationHealthPolicies + """ + super(UpdateClusterUpgradeDescription, self).__init__(**kwargs) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.update_description = kwargs.get('update_description', None) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) + self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) + + +class UpdatePartitionLoadResult(msrest.serialization.Model): + """Specifies result of updating load for specified partitions. The output will be ordered based on the partition ID. + + :ivar partition_id: Id of the partition. + :vartype partition_id: str + :ivar partition_error_code: If OperationState is Completed - this is 0. If OperationState is + Faulted - this is an error code indicating the reason. + :vartype partition_error_code: int + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'partition_error_code': {'key': 'PartitionErrorCode', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword partition_id: Id of the partition. + :paramtype partition_id: str + :keyword partition_error_code: If OperationState is Completed - this is 0. If OperationState + is Faulted - this is an error code indicating the reason. + :paramtype partition_error_code: int + """ + super(UpdatePartitionLoadResult, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.partition_error_code = kwargs.get('partition_error_code', None) + + +class UpgradeDomainDeltaNodesCheckHealthEvaluation(HealthEvaluation): + """Represents health evaluation for delta unhealthy cluster nodes in an upgrade domain, containing health evaluations for each unhealthy node that impacted current aggregated health state. +Can be returned during cluster upgrade when cluster aggregated health state is Warning or Error. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar upgrade_domain_name: Name of the upgrade domain where nodes health is currently + evaluated. + :vartype upgrade_domain_name: str + :ivar baseline_error_count: Number of upgrade domain nodes with aggregated heath state Error in + the health store at the beginning of the cluster upgrade. + :vartype baseline_error_count: long + :ivar baseline_total_count: Total number of upgrade domain nodes in the health store at the + beginning of the cluster upgrade. + :vartype baseline_total_count: long + :ivar max_percent_delta_unhealthy_nodes: Maximum allowed percentage of upgrade domain delta + unhealthy nodes from the ClusterUpgradeHealthPolicy. + :vartype max_percent_delta_unhealthy_nodes: int + :ivar total_count: Total number of upgrade domain nodes in the health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, + 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword upgrade_domain_name: Name of the upgrade domain where nodes health is currently + evaluated. + :paramtype upgrade_domain_name: str + :keyword baseline_error_count: Number of upgrade domain nodes with aggregated heath state Error + in the health store at the beginning of the cluster upgrade. + :paramtype baseline_error_count: long + :keyword baseline_total_count: Total number of upgrade domain nodes in the health store at the + beginning of the cluster upgrade. + :paramtype baseline_total_count: long + :keyword max_percent_delta_unhealthy_nodes: Maximum allowed percentage of upgrade domain delta + unhealthy nodes from the ClusterUpgradeHealthPolicy. + :paramtype max_percent_delta_unhealthy_nodes: int + :keyword total_count: Total number of upgrade domain nodes in the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(UpgradeDomainDeltaNodesCheckHealthEvaluation, self).__init__(**kwargs) + self.kind = 'UpgradeDomainDeltaNodesCheck' # type: str + self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) + self.baseline_error_count = kwargs.get('baseline_error_count', None) + self.baseline_total_count = kwargs.get('baseline_total_count', None) + self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class UpgradeDomainDeployedApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed applications in an upgrade domain, containing health evaluations for each unhealthy deployed application that impacted current aggregated health state. Can be returned when evaluating cluster health during cluster upgrade and the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar upgrade_domain_name: Name of the upgrade domain where deployed applications health is + currently evaluated. + :vartype upgrade_domain_name: str + :ivar max_percent_unhealthy_deployed_applications: Maximum allowed percentage of unhealthy + deployed applications from the ClusterHealthPolicy. + :vartype max_percent_unhealthy_deployed_applications: int + :ivar total_count: Total number of deployed applications in the current upgrade domain. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy DeployedApplicationHealthEvaluation that impacted the + aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword upgrade_domain_name: Name of the upgrade domain where deployed applications health is + currently evaluated. + :paramtype upgrade_domain_name: str + :keyword max_percent_unhealthy_deployed_applications: Maximum allowed percentage of unhealthy + deployed applications from the ClusterHealthPolicy. + :paramtype max_percent_unhealthy_deployed_applications: int + :keyword total_count: Total number of deployed applications in the current upgrade domain. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy DeployedApplicationHealthEvaluation that impacted the + aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(UpgradeDomainDeployedApplicationsHealthEvaluation, self).__init__(**kwargs) + self.kind = 'UpgradeDomainDeployedApplications' # type: str + self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) + self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class UpgradeDomainInfo(msrest.serialization.Model): + """Information about an upgrade domain. + + :ivar name: The name of the upgrade domain. + :vartype name: str + :ivar state: The state of the upgrade domain. Possible values include: "Invalid", "Pending", + "InProgress", "Completed". + :vartype state: str or ~azure.servicefabric.models.UpgradeDomainState + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: The name of the upgrade domain. + :paramtype name: str + :keyword state: The state of the upgrade domain. Possible values include: "Invalid", "Pending", + "InProgress", "Completed". + :paramtype state: str or ~azure.servicefabric.models.UpgradeDomainState + """ + super(UpgradeDomainInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.state = kwargs.get('state', None) + + +class UpgradeDomainNodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for cluster nodes in an upgrade domain, containing health evaluations for each unhealthy node that impacted current aggregated health state. Can be returned when evaluating cluster health during cluster upgrade and the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar upgrade_domain_name: Name of the upgrade domain where nodes health is currently + evaluated. + :vartype upgrade_domain_name: str + :ivar max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes from the + ClusterHealthPolicy. + :vartype max_percent_unhealthy_nodes: int + :ivar total_count: Total number of nodes in the current upgrade domain. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword upgrade_domain_name: Name of the upgrade domain where nodes health is currently + evaluated. + :paramtype upgrade_domain_name: str + :keyword max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes from the + ClusterHealthPolicy. + :paramtype max_percent_unhealthy_nodes: int + :keyword total_count: Total number of nodes in the current upgrade domain. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(UpgradeDomainNodesHealthEvaluation, self).__init__(**kwargs) + self.kind = 'UpgradeDomainNodes' # type: str + self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) + self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + + +class UpgradeOrchestrationServiceState(msrest.serialization.Model): + """Service state of Service Fabric Upgrade Orchestration Service. + + :ivar service_state: The state of Service Fabric Upgrade Orchestration Service. + :vartype service_state: str + """ + + _attribute_map = { + 'service_state': {'key': 'ServiceState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_state: The state of Service Fabric Upgrade Orchestration Service. + :paramtype service_state: str + """ + super(UpgradeOrchestrationServiceState, self).__init__(**kwargs) + self.service_state = kwargs.get('service_state', None) + + +class UpgradeOrchestrationServiceStateSummary(msrest.serialization.Model): + """Service state summary of Service Fabric Upgrade Orchestration Service. + + :ivar current_code_version: The current code version of the cluster. + :vartype current_code_version: str + :ivar current_manifest_version: The current manifest version of the cluster. + :vartype current_manifest_version: str + :ivar target_code_version: The target code version of the cluster. + :vartype target_code_version: str + :ivar target_manifest_version: The target manifest version of the cluster. + :vartype target_manifest_version: str + :ivar pending_upgrade_type: The type of the pending upgrade of the cluster. + :vartype pending_upgrade_type: str + """ + + _attribute_map = { + 'current_code_version': {'key': 'CurrentCodeVersion', 'type': 'str'}, + 'current_manifest_version': {'key': 'CurrentManifestVersion', 'type': 'str'}, + 'target_code_version': {'key': 'TargetCodeVersion', 'type': 'str'}, + 'target_manifest_version': {'key': 'TargetManifestVersion', 'type': 'str'}, + 'pending_upgrade_type': {'key': 'PendingUpgradeType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword current_code_version: The current code version of the cluster. + :paramtype current_code_version: str + :keyword current_manifest_version: The current manifest version of the cluster. + :paramtype current_manifest_version: str + :keyword target_code_version: The target code version of the cluster. + :paramtype target_code_version: str + :keyword target_manifest_version: The target manifest version of the cluster. + :paramtype target_manifest_version: str + :keyword pending_upgrade_type: The type of the pending upgrade of the cluster. + :paramtype pending_upgrade_type: str + """ + super(UpgradeOrchestrationServiceStateSummary, self).__init__(**kwargs) + self.current_code_version = kwargs.get('current_code_version', None) + self.current_manifest_version = kwargs.get('current_manifest_version', None) + self.target_code_version = kwargs.get('target_code_version', None) + self.target_manifest_version = kwargs.get('target_manifest_version', None) + self.pending_upgrade_type = kwargs.get('pending_upgrade_type', None) + + +class UpgradeUnitInfo(msrest.serialization.Model): + """Information about an upgrade unit. + + :ivar name: The name of the upgrade unit. + :vartype name: str + :ivar state: The state of the upgrade unit. Possible values include: "Invalid", "Pending", + "InProgress", "Completed", "Failed". + :vartype state: str or ~azure.servicefabric.models.UpgradeUnitState + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: The name of the upgrade unit. + :paramtype name: str + :keyword state: The state of the upgrade unit. Possible values include: "Invalid", "Pending", + "InProgress", "Completed", "Failed". + :paramtype state: str or ~azure.servicefabric.models.UpgradeUnitState + """ + super(UpgradeUnitInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.state = kwargs.get('state', None) + + +class UploadChunkRange(msrest.serialization.Model): + """Information about which portion of the file to upload. + + :ivar start_position: The start position of the portion of the file. It's represented by the + number of bytes. + :vartype start_position: str + :ivar end_position: The end position of the portion of the file. It's represented by the number + of bytes. + :vartype end_position: str + """ + + _attribute_map = { + 'start_position': {'key': 'StartPosition', 'type': 'str'}, + 'end_position': {'key': 'EndPosition', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword start_position: The start position of the portion of the file. It's represented by the + number of bytes. + :paramtype start_position: str + :keyword end_position: The end position of the portion of the file. It's represented by the + number of bytes. + :paramtype end_position: str + """ + super(UploadChunkRange, self).__init__(**kwargs) + self.start_position = kwargs.get('start_position', None) + self.end_position = kwargs.get('end_position', None) + + +class UploadSession(msrest.serialization.Model): + """Information about a image store upload session. + + :ivar upload_sessions: When querying upload session by upload session ID, the result contains + only one upload session. When querying upload session by image store relative path, the result + might contain multiple upload sessions. + :vartype upload_sessions: list[~azure.servicefabric.models.UploadSessionInfo] + """ + + _attribute_map = { + 'upload_sessions': {'key': 'UploadSessions', 'type': '[UploadSessionInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword upload_sessions: When querying upload session by upload session ID, the result + contains only one upload session. When querying upload session by image store relative path, + the result might contain multiple upload sessions. + :paramtype upload_sessions: list[~azure.servicefabric.models.UploadSessionInfo] + """ + super(UploadSession, self).__init__(**kwargs) + self.upload_sessions = kwargs.get('upload_sessions', None) + + +class UploadSessionInfo(msrest.serialization.Model): + """Information about an image store upload session. A session is associated with a relative path in the image store. + + :ivar store_relative_path: The remote location within image store. This path is relative to the + image store root. + :vartype store_relative_path: str + :ivar session_id: A unique ID of the upload session. A session ID can be reused only if the + session was committed or removed. + :vartype session_id: str + :ivar modified_date: The date and time when the upload session was last modified. + :vartype modified_date: ~datetime.datetime + :ivar file_size: The size in bytes of the uploading file. + :vartype file_size: str + :ivar expected_ranges: List of chunk ranges that image store has not received yet. + :vartype expected_ranges: list[~azure.servicefabric.models.UploadChunkRange] + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'session_id': {'key': 'SessionId', 'type': 'str'}, + 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, + 'file_size': {'key': 'FileSize', 'type': 'str'}, + 'expected_ranges': {'key': 'ExpectedRanges', 'type': '[UploadChunkRange]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword store_relative_path: The remote location within image store. This path is relative to + the image store root. + :paramtype store_relative_path: str + :keyword session_id: A unique ID of the upload session. A session ID can be reused only if the + session was committed or removed. + :paramtype session_id: str + :keyword modified_date: The date and time when the upload session was last modified. + :paramtype modified_date: ~datetime.datetime + :keyword file_size: The size in bytes of the uploading file. + :paramtype file_size: str + :keyword expected_ranges: List of chunk ranges that image store has not received yet. + :paramtype expected_ranges: list[~azure.servicefabric.models.UploadChunkRange] + """ + super(UploadSessionInfo, self).__init__(**kwargs) + self.store_relative_path = kwargs.get('store_relative_path', None) + self.session_id = kwargs.get('session_id', None) + self.modified_date = kwargs.get('modified_date', None) + self.file_size = kwargs.get('file_size', None) + self.expected_ranges = kwargs.get('expected_ranges', None) + + +class UsageInfo(msrest.serialization.Model): + """Information about how much space and how many files in the file system the ImageStore is using in this category. + + :ivar used_space: the size of all files in this category. + :vartype used_space: str + :ivar file_count: the number of all files in this category. + :vartype file_count: str + """ + + _attribute_map = { + 'used_space': {'key': 'UsedSpace', 'type': 'str'}, + 'file_count': {'key': 'FileCount', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword used_space: the size of all files in this category. + :paramtype used_space: str + :keyword file_count: the number of all files in this category. + :paramtype file_count: str + """ + super(UsageInfo, self).__init__(**kwargs) + self.used_space = kwargs.get('used_space', None) + self.file_count = kwargs.get('file_count', None) + + +class ValidateClusterUpgradeResult(msrest.serialization.Model): + """Specifies result of validating a cluster upgrade. + + :ivar service_host_upgrade_impact: The expected impact of the upgrade. Possible values include: + "Invalid", "None", "ServiceHostRestart", "UnexpectedServiceHostRestart". + :vartype service_host_upgrade_impact: str or + ~azure.servicefabric.models.ServiceHostUpgradeImpact + :ivar validation_details: A string containing additional details for the Fabric upgrade + validation result. + :vartype validation_details: str + """ + + _attribute_map = { + 'service_host_upgrade_impact': {'key': 'ServiceHostUpgradeImpact', 'type': 'str'}, + 'validation_details': {'key': 'ValidationDetails', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_host_upgrade_impact: The expected impact of the upgrade. Possible values + include: "Invalid", "None", "ServiceHostRestart", "UnexpectedServiceHostRestart". + :paramtype service_host_upgrade_impact: str or + ~azure.servicefabric.models.ServiceHostUpgradeImpact + :keyword validation_details: A string containing additional details for the Fabric upgrade + validation result. + :paramtype validation_details: str + """ + super(ValidateClusterUpgradeResult, self).__init__(**kwargs) + self.service_host_upgrade_impact = kwargs.get('service_host_upgrade_impact', None) + self.validation_details = kwargs.get('validation_details', None) + + +class ValidationFailedChaosEvent(ChaosEvent): + """Chaos event corresponding to a failure during validation. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values + include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", + "Stopped". + :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind + :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :vartype time_stamp_utc: ~datetime.datetime + :ivar reason: Describes why the ValidationFailedChaosEvent was generated. This may happen + because more than MaxPercentUnhealthyNodes are unhealthy for more than + MaxClusterStabilizationTimeout. This reason will be in the Reason property of the + ValidationFailedChaosEvent as a string. + :vartype reason: str + """ + + _validation = { + 'kind': {'required': True}, + 'time_stamp_utc': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :paramtype time_stamp_utc: ~datetime.datetime + :keyword reason: Describes why the ValidationFailedChaosEvent was generated. This may happen + because more than MaxPercentUnhealthyNodes are unhealthy for more than + MaxClusterStabilizationTimeout. This reason will be in the Reason property of the + ValidationFailedChaosEvent as a string. + :paramtype reason: str + """ + super(ValidationFailedChaosEvent, self).__init__(**kwargs) + self.kind = 'ValidationFailed' # type: str + self.reason = kwargs.get('reason', None) + + +class VolumeProviderParametersAzureFile(msrest.serialization.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. + + :ivar account_name: Required. Name of the Azure storage account for the File Share. + :vartype account_name: str + :ivar account_key: Access key of the Azure storage account for the File Share. + :vartype account_key: str + :ivar share_name: Required. Name of the Azure Files file share that provides storage for the + volume. + :vartype 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 + ): + """ + :keyword account_name: Required. Name of the Azure storage account for the File Share. + :paramtype account_name: str + :keyword account_key: Access key of the Azure storage account for the File Share. + :paramtype account_key: str + :keyword share_name: Required. Name of the Azure Files file share that provides storage for the + volume. + :paramtype share_name: str + """ + super(VolumeProviderParametersAzureFile, self).__init__(**kwargs) + self.account_name = kwargs['account_name'] + self.account_key = kwargs.get('account_key', None) + self.share_name = kwargs['share_name'] + + +class VolumeResourceDescription(msrest.serialization.Model): + """This type describes a volume resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of the Volume resource. + :vartype name: str + :ivar description: User readable description of the volume. + :vartype description: str + :ivar status: Status of the volume. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the volume. + :vartype status_details: str + :ivar provider: Required. Provider of the volume. Possible values include: "SFAzureFile". + :vartype provider: str or ~azure.servicefabric.models.VolumeProvider + :ivar azure_file_parameters: This type describes a volume provided by an Azure Files file + share. + :vartype azure_file_parameters: ~azure.servicefabric.models.VolumeProviderParametersAzureFile + """ + + _validation = { + 'name': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'provider': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. Name of the Volume resource. + :paramtype name: str + :keyword description: User readable description of the volume. + :paramtype description: str + :keyword provider: Required. Provider of the volume. Possible values include: "SFAzureFile". + :paramtype provider: str or ~azure.servicefabric.models.VolumeProvider + :keyword azure_file_parameters: This type describes a volume provided by an Azure Files file + share. + :paramtype azure_file_parameters: ~azure.servicefabric.models.VolumeProviderParametersAzureFile + """ + super(VolumeResourceDescription, self).__init__(**kwargs) + self.name = kwargs['name'] + self.description = kwargs.get('description', None) + self.status = None + self.status_details = None + self.provider = kwargs['provider'] + self.azure_file_parameters = kwargs.get('azure_file_parameters', None) + + +class WaitForInbuildReplicaSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the replica build operation to finish. This indicates that there is a replica that is going through the copy or is providing data for building another replica. Bring the node down will abort this copy operation which are typically expensive involving data movements. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + :ivar partition_id: Id of the partition which is undergoing the safety check. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword partition_id: Id of the partition which is undergoing the safety check. + :paramtype partition_id: str + """ + super(WaitForInbuildReplicaSafetyCheck, self).__init__(**kwargs) + self.kind = 'WaitForInbuildReplica' # type: str + + +class WaitForPrimaryPlacementSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the primary replica that was moved out of the node due to upgrade to be placed back again on that node. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + :ivar partition_id: Id of the partition which is undergoing the safety check. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword partition_id: Id of the partition which is undergoing the safety check. + :paramtype partition_id: str + """ + super(WaitForPrimaryPlacementSafetyCheck, self).__init__(**kwargs) + self.kind = 'WaitForPrimaryPlacement' # type: str + + +class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the primary replica to be moved out of the node before starting an upgrade to ensure the availability of the primary replica for the partition. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + :ivar partition_id: Id of the partition which is undergoing the safety check. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword partition_id: Id of the partition which is undergoing the safety check. + :paramtype partition_id: str + """ + super(WaitForPrimarySwapSafetyCheck, self).__init__(**kwargs) + self.kind = 'WaitForPrimarySwap' # type: str + + +class WaitForReconfigurationSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the current reconfiguration of the partition to be completed before starting an upgrade. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + :ivar partition_id: Id of the partition which is undergoing the safety check. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword partition_id: Id of the partition which is undergoing the safety check. + :paramtype partition_id: str + """ + super(WaitForReconfigurationSafetyCheck, self).__init__(**kwargs) + self.kind = 'WaitForReconfiguration' # type: str + + +class WaitingChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos is waiting for the cluster to become ready for faulting, for example, Chaos may be waiting for the on-going upgrade to finish. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values + include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", + "Stopped". + :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind + :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :vartype time_stamp_utc: ~datetime.datetime + :ivar reason: Describes why the WaitingChaosEvent was generated, for example, due to a cluster + upgrade. + :vartype reason: str + """ + + _validation = { + 'kind': {'required': True}, + 'time_stamp_utc': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :paramtype time_stamp_utc: ~datetime.datetime + :keyword reason: Describes why the WaitingChaosEvent was generated, for example, due to a + cluster upgrade. + :paramtype reason: str + """ + super(WaitingChaosEvent, self).__init__(**kwargs) + self.kind = 'Waiting' # type: str + self.reason = kwargs.get('reason', None) diff --git a/customSDK/servicefabric/models/_models_py3.py b/customSDK/servicefabric/models/_models_py3.py new file mode 100644 index 00000000..a2f69586 --- /dev/null +++ b/customSDK/servicefabric/models/_models_py3.py @@ -0,0 +1,36919 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +from typing import Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._service_fabric_client_apis_enums import * + + +class AadMetadata(msrest.serialization.Model): + """Azure Active Directory metadata used for secured connection to cluster. + + :ivar authority: The AAD authority url. + :vartype authority: str + :ivar client: The AAD client application Id. + :vartype client: str + :ivar cluster: The AAD cluster application Id. + :vartype cluster: str + :ivar login: The AAD login url. + :vartype login: str + :ivar redirect: The client application redirect address. + :vartype redirect: str + :ivar tenant: The AAD tenant Id. + :vartype tenant: str + """ + + _attribute_map = { + 'authority': {'key': 'authority', 'type': 'str'}, + 'client': {'key': 'client', 'type': 'str'}, + 'cluster': {'key': 'cluster', 'type': 'str'}, + 'login': {'key': 'login', 'type': 'str'}, + 'redirect': {'key': 'redirect', 'type': 'str'}, + 'tenant': {'key': 'tenant', 'type': 'str'}, + } + + def __init__( + self, + *, + authority: Optional[str] = None, + client: Optional[str] = None, + cluster: Optional[str] = None, + login: Optional[str] = None, + redirect: Optional[str] = None, + tenant: Optional[str] = None, + **kwargs + ): + """ + :keyword authority: The AAD authority url. + :paramtype authority: str + :keyword client: The AAD client application Id. + :paramtype client: str + :keyword cluster: The AAD cluster application Id. + :paramtype cluster: str + :keyword login: The AAD login url. + :paramtype login: str + :keyword redirect: The client application redirect address. + :paramtype redirect: str + :keyword tenant: The AAD tenant Id. + :paramtype tenant: str + """ + super(AadMetadata, self).__init__(**kwargs) + self.authority = authority + self.client = client + self.cluster = cluster + self.login = login + self.redirect = redirect + self.tenant = tenant + + +class AadMetadataObject(msrest.serialization.Model): + """Azure Active Directory metadata object used for secured connection to cluster. + + :ivar type: The client authentication method. + :vartype type: str + :ivar metadata: Azure Active Directory metadata used for secured connection to cluster. + :vartype metadata: ~azure.servicefabric.models.AadMetadata + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': 'AadMetadata'}, + } + + def __init__( + self, + *, + type: Optional[str] = None, + metadata: Optional["AadMetadata"] = None, + **kwargs + ): + """ + :keyword type: The client authentication method. + :paramtype type: str + :keyword metadata: Azure Active Directory metadata used for secured connection to cluster. + :paramtype metadata: ~azure.servicefabric.models.AadMetadata + """ + super(AadMetadataObject, self).__init__(**kwargs) + self.type = type + self.metadata = metadata + + +class ScalingMechanismDescription(msrest.serialization.Model): + """Describes the mechanism for performing a scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddRemoveIncrementalNamedPartitionScalingMechanism, PartitionInstanceCountScaleMechanism. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Specifies the kind of scaling mechanism.Constant filled by server. + Possible values include: "Invalid", "PartitionInstanceCount", + "AddRemoveIncrementalNamedPartition". + :vartype kind: str or ~azure.servicefabric.models.ScalingMechanismKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AddRemoveIncrementalNamedPartition': 'AddRemoveIncrementalNamedPartitionScalingMechanism', 'PartitionInstanceCount': 'PartitionInstanceCountScaleMechanism'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ScalingMechanismDescription, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription): + """Represents a scaling mechanism for adding or removing named partitions of a stateless service. Partition names are in the format '0','1''N-1'. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Specifies the kind of scaling mechanism.Constant filled by server. + Possible values include: "Invalid", "PartitionInstanceCount", + "AddRemoveIncrementalNamedPartition". + :vartype kind: str or ~azure.servicefabric.models.ScalingMechanismKind + :ivar min_partition_count: Required. Minimum number of named partitions of the service. + :vartype min_partition_count: int + :ivar max_partition_count: Required. Maximum number of named partitions of the service. + :vartype max_partition_count: int + :ivar scale_increment: Required. The number of instances to add or remove during a scaling + operation. + :vartype scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_partition_count': {'required': True}, + 'max_partition_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'}, + 'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'}, + 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, + } + + def __init__( + self, + *, + min_partition_count: int, + max_partition_count: int, + scale_increment: int, + **kwargs + ): + """ + :keyword min_partition_count: Required. Minimum number of named partitions of the service. + :paramtype min_partition_count: int + :keyword max_partition_count: Required. Maximum number of named partitions of the service. + :paramtype max_partition_count: int + :keyword scale_increment: Required. The number of instances to add or remove during a scaling + operation. + :paramtype scale_increment: int + """ + super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs) + self.kind = 'AddRemoveIncrementalNamedPartition' # type: str + self.min_partition_count = min_partition_count + self.max_partition_count = max_partition_count + self.scale_increment = scale_increment + + +class AutoScalingMechanism(msrest.serialization.Model): + """Describes the mechanism for performing auto scaling operation. Derived classes will describe the actual mechanism. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddRemoveReplicaScalingMechanism. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of auto scaling mechanism.Constant filled by server. Possible + values include: "AddRemoveReplica". + :vartype kind: str or ~azure.servicefabric.models.AutoScalingMechanismKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AddRemoveReplica': 'AddRemoveReplicaScalingMechanism'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AutoScalingMechanism, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class AddRemoveReplicaScalingMechanism(AutoScalingMechanism): + """Describes the horizontal auto scaling mechanism that adds or removes replicas (containers or container groups). + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of auto scaling mechanism.Constant filled by server. Possible + values include: "AddRemoveReplica". + :vartype kind: str or ~azure.servicefabric.models.AutoScalingMechanismKind + :ivar min_count: Required. Minimum number of containers (scale down won't be performed below + this number). + :vartype min_count: int + :ivar max_count: Required. Maximum number of containers (scale up won't be performed above this + number). + :vartype max_count: int + :ivar scale_increment: Required. Each time auto scaling is performed, this number of containers + will be added or removed. + :vartype scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_count': {'required': True}, + 'max_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'scale_increment': {'key': 'scaleIncrement', 'type': 'int'}, + } + + def __init__( + self, + *, + min_count: int, + max_count: int, + scale_increment: int, + **kwargs + ): + """ + :keyword min_count: Required. Minimum number of containers (scale down won't be performed below + this number). + :paramtype min_count: int + :keyword max_count: Required. Maximum number of containers (scale up won't be performed above + this number). + :paramtype max_count: int + :keyword scale_increment: Required. Each time auto scaling is performed, this number of + containers will be added or removed. + :paramtype scale_increment: int + """ + super(AddRemoveReplicaScalingMechanism, self).__init__(**kwargs) + self.kind = 'AddRemoveReplica' # type: str + self.min_count = min_count + self.max_count = max_count + self.scale_increment = scale_increment + + +class AnalysisEventMetadata(msrest.serialization.Model): + """Metadata about an Analysis Event. + + :ivar delay: The analysis delay. + :vartype delay: ~datetime.timedelta + :ivar duration: The duration of analysis. + :vartype duration: ~datetime.timedelta + """ + + _attribute_map = { + 'delay': {'key': 'Delay', 'type': 'duration'}, + 'duration': {'key': 'Duration', 'type': 'duration'}, + } + + def __init__( + self, + *, + delay: Optional[datetime.timedelta] = None, + duration: Optional[datetime.timedelta] = None, + **kwargs + ): + """ + :keyword delay: The analysis delay. + :paramtype delay: ~datetime.timedelta + :keyword duration: The duration of analysis. + :paramtype duration: ~datetime.timedelta + """ + super(AnalysisEventMetadata, self).__init__(**kwargs) + self.delay = delay + self.duration = duration + + +class BackupConfigurationInfo(msrest.serialization.Model): + """Describes the backup configuration information. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationBackupConfigurationInfo, PartitionBackupConfigurationInfo, ServiceBackupConfigurationInfo. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The entity type of a Service Fabric entity such as Application, Service + or a Partition where periodic backups can be enabled.Constant filled by server. Possible values + include: "Invalid", "Partition", "Service", "Application". + :vartype kind: str or ~azure.servicefabric.models.BackupEntityKind + :ivar policy_name: The name of the backup policy which is applicable to this Service Fabric + application or service or partition. + :vartype policy_name: str + :ivar policy_inherited_from: Specifies the scope at which the backup policy is applied. + Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope + :ivar suspension_info: Describes the backup suspension details. + :vartype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + } + + _subtype_map = { + 'kind': {'Application': 'ApplicationBackupConfigurationInfo', 'Partition': 'PartitionBackupConfigurationInfo', 'Service': 'ServiceBackupConfigurationInfo'} + } + + def __init__( + self, + *, + policy_name: Optional[str] = None, + policy_inherited_from: Optional[Union[str, "BackupPolicyScope"]] = None, + suspension_info: Optional["BackupSuspensionInfo"] = None, + **kwargs + ): + """ + :keyword policy_name: The name of the backup policy which is applicable to this Service Fabric + application or service or partition. + :paramtype policy_name: str + :keyword policy_inherited_from: Specifies the scope at which the backup policy is applied. + Possible values include: "Invalid", "Partition", "Service", "Application". + :paramtype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope + :keyword suspension_info: Describes the backup suspension details. + :paramtype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + """ + super(BackupConfigurationInfo, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.policy_name = policy_name + self.policy_inherited_from = policy_inherited_from + self.suspension_info = suspension_info + + +class ApplicationBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information for a specific Service Fabric application specifying what backup policy is being applied and suspend description, if any. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The entity type of a Service Fabric entity such as Application, Service + or a Partition where periodic backups can be enabled.Constant filled by server. Possible values + include: "Invalid", "Partition", "Service", "Application". + :vartype kind: str or ~azure.servicefabric.models.BackupEntityKind + :ivar policy_name: The name of the backup policy which is applicable to this Service Fabric + application or service or partition. + :vartype policy_name: str + :ivar policy_inherited_from: Specifies the scope at which the backup policy is applied. + Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope + :ivar suspension_info: Describes the backup suspension details. + :vartype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__( + self, + *, + policy_name: Optional[str] = None, + policy_inherited_from: Optional[Union[str, "BackupPolicyScope"]] = None, + suspension_info: Optional["BackupSuspensionInfo"] = None, + application_name: Optional[str] = None, + **kwargs + ): + """ + :keyword policy_name: The name of the backup policy which is applicable to this Service Fabric + application or service or partition. + :paramtype policy_name: str + :keyword policy_inherited_from: Specifies the scope at which the backup policy is applied. + Possible values include: "Invalid", "Partition", "Service", "Application". + :paramtype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope + :keyword suspension_info: Describes the backup suspension details. + :paramtype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + """ + super(ApplicationBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) + self.kind = 'Application' # type: str + self.application_name = application_name + + +class BackupEntity(msrest.serialization.Model): + """Describes the Service Fabric entity that is configured for backup. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationBackupEntity, PartitionBackupEntity, ServiceBackupEntity. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_kind: Required. The entity type of a Service Fabric entity such as Application, + Service or a Partition where periodic backups can be enabled.Constant filled by server. + Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype entity_kind: str or ~azure.servicefabric.models.BackupEntityKind + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + } + + _subtype_map = { + 'entity_kind': {'Application': 'ApplicationBackupEntity', 'Partition': 'PartitionBackupEntity', 'Service': 'ServiceBackupEntity'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(BackupEntity, self).__init__(**kwargs) + self.entity_kind = None # type: Optional[str] + + +class ApplicationBackupEntity(BackupEntity): + """Identifies the Service Fabric application which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_kind: Required. The entity type of a Service Fabric entity such as Application, + Service or a Partition where periodic backups can be enabled.Constant filled by server. + Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype entity_kind: str or ~azure.servicefabric.models.BackupEntityKind + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__( + self, + *, + application_name: Optional[str] = None, + **kwargs + ): + """ + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + """ + super(ApplicationBackupEntity, self).__init__(**kwargs) + self.entity_kind = 'Application' # type: str + self.application_name = application_name + + +class ApplicationCapacityDescription(msrest.serialization.Model): + """Describes capacity information for services of this application. This description can be used for describing the following. + + +* Reserving the capacity for the services on the nodes +* Limiting the total number of nodes that services of this application can run on +* Limiting the custom capacity metrics to limit the total consumption of this metric by the services of this application. + + :ivar minimum_nodes: The minimum number of nodes where Service Fabric will reserve capacity for + this application. Note that this does not mean that the services of this application will be + placed on all of those nodes. If this property is set to zero, no capacity will be reserved. + The value of this property cannot be more than the value of the MaximumNodes property. + :vartype minimum_nodes: long + :ivar maximum_nodes: The maximum number of nodes where Service Fabric will reserve capacity for + this application. Note that this does not mean that the services of this application will be + placed on all of those nodes. By default, the value of this property is zero and it means that + the services can be placed on any node. + :vartype maximum_nodes: long + :ivar application_metrics: List of application capacity metric description. + :vartype application_metrics: list[~azure.servicefabric.models.ApplicationMetricDescription] + """ + + _validation = { + 'minimum_nodes': {'minimum': 0}, + 'maximum_nodes': {'minimum': 0}, + } + + _attribute_map = { + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, + } + + def __init__( + self, + *, + minimum_nodes: Optional[int] = None, + maximum_nodes: Optional[int] = 0, + application_metrics: Optional[List["ApplicationMetricDescription"]] = None, + **kwargs + ): + """ + :keyword minimum_nodes: The minimum number of nodes where Service Fabric will reserve capacity + for this application. Note that this does not mean that the services of this application will + be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. + The value of this property cannot be more than the value of the MaximumNodes property. + :paramtype minimum_nodes: long + :keyword maximum_nodes: The maximum number of nodes where Service Fabric will reserve capacity + for this application. Note that this does not mean that the services of this application will + be placed on all of those nodes. By default, the value of this property is zero and it means + that the services can be placed on any node. + :paramtype maximum_nodes: long + :keyword application_metrics: List of application capacity metric description. + :paramtype application_metrics: list[~azure.servicefabric.models.ApplicationMetricDescription] + """ + super(ApplicationCapacityDescription, self).__init__(**kwargs) + self.minimum_nodes = minimum_nodes + self.maximum_nodes = maximum_nodes + self.application_metrics = application_metrics + + +class FabricEvent(msrest.serialization.Model): + """Represents the base for all Fabric Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationEvent, ClusterEvent, ContainerInstanceEvent, NodeEvent, PartitionEvent, ReplicaEvent, ServiceEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + } + + _subtype_map = { + 'kind': {'ApplicationEvent': 'ApplicationEvent', 'ClusterEvent': 'ClusterEvent', 'ContainerInstanceEvent': 'ContainerInstanceEvent', 'NodeEvent': 'NodeEvent', 'PartitionEvent': 'PartitionEvent', 'ReplicaEvent': 'ReplicaEvent', 'ServiceEvent': 'ServiceEvent'} + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + """ + super(FabricEvent, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.event_instance_id = event_instance_id + self.category = category + self.time_stamp = time_stamp + self.has_correlated_events = has_correlated_events + + +class ApplicationEvent(FabricEvent): + """Represents the base for all Application Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationContainerInstanceExitedEvent, ApplicationCreatedEvent, ApplicationDeletedEvent, ApplicationHealthReportExpiredEvent, ApplicationNewHealthReportEvent, ApplicationProcessExitedEvent, ApplicationUpgradeCompletedEvent, ApplicationUpgradeDomainCompletedEvent, ApplicationUpgradeRollbackCompletedEvent, ApplicationUpgradeRollbackStartedEvent, ApplicationUpgradeStartedEvent, ChaosCodePackageRestartScheduledEvent, DeployedApplicationHealthReportExpiredEvent, DeployedApplicationNewHealthReportEvent, DeployedServicePackageHealthReportExpiredEvent, DeployedServicePackageNewHealthReportEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ApplicationContainerInstanceExited': 'ApplicationContainerInstanceExitedEvent', 'ApplicationCreated': 'ApplicationCreatedEvent', 'ApplicationDeleted': 'ApplicationDeletedEvent', 'ApplicationHealthReportExpired': 'ApplicationHealthReportExpiredEvent', 'ApplicationNewHealthReport': 'ApplicationNewHealthReportEvent', 'ApplicationProcessExited': 'ApplicationProcessExitedEvent', 'ApplicationUpgradeCompleted': 'ApplicationUpgradeCompletedEvent', 'ApplicationUpgradeDomainCompleted': 'ApplicationUpgradeDomainCompletedEvent', 'ApplicationUpgradeRollbackCompleted': 'ApplicationUpgradeRollbackCompletedEvent', 'ApplicationUpgradeRollbackStarted': 'ApplicationUpgradeRollbackStartedEvent', 'ApplicationUpgradeStarted': 'ApplicationUpgradeStartedEvent', 'ChaosCodePackageRestartScheduled': 'ChaosCodePackageRestartScheduledEvent', 'DeployedApplicationHealthReportExpired': 'DeployedApplicationHealthReportExpiredEvent', 'DeployedApplicationNewHealthReport': 'DeployedApplicationNewHealthReportEvent', 'DeployedServicePackageHealthReportExpired': 'DeployedServicePackageHealthReportExpiredEvent', 'DeployedServicePackageNewHealthReport': 'DeployedServicePackageNewHealthReportEvent'} + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + application_id: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + """ + super(ApplicationEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ApplicationEvent' # type: str + self.application_id = application_id + + +class ApplicationContainerInstanceExitedEvent(ApplicationEvent): + """Container Exited event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar service_name: Required. Name of Service. + :vartype service_name: str + :ivar service_package_name: Required. Name of Service package. + :vartype service_package_name: str + :ivar service_package_activation_id: Required. Activation Id of Service package. + :vartype service_package_activation_id: str + :ivar is_exclusive: Required. Indicates IsExclusive flag. + :vartype is_exclusive: bool + :ivar code_package_name: Required. Name of Code package. + :vartype code_package_name: str + :ivar entry_point_type: Required. Type of EntryPoint. + :vartype entry_point_type: str + :ivar image_name: Required. Name of Container image. + :vartype image_name: str + :ivar container_name: Required. Name of Container. + :vartype container_name: str + :ivar host_id: Required. Host Id. + :vartype host_id: str + :ivar exit_code: Required. Exit code of process. + :vartype exit_code: long + :ivar unexpected_termination: Required. Indicates if termination is unexpected. + :vartype unexpected_termination: bool + :ivar start_time: Required. Start time of process. + :vartype start_time: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'service_name': {'required': True}, + 'service_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'is_exclusive': {'required': True}, + 'code_package_name': {'required': True}, + 'entry_point_type': {'required': True}, + 'image_name': {'required': True}, + 'container_name': {'required': True}, + 'host_id': {'required': True}, + 'exit_code': {'required': True}, + 'unexpected_termination': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, + 'image_name': {'key': 'ImageName', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + 'host_id': {'key': 'HostId', 'type': 'str'}, + 'exit_code': {'key': 'ExitCode', 'type': 'long'}, + 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + application_id: str, + service_name: str, + service_package_name: str, + service_package_activation_id: str, + is_exclusive: bool, + code_package_name: str, + entry_point_type: str, + image_name: str, + container_name: str, + host_id: str, + exit_code: int, + unexpected_termination: bool, + start_time: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword service_name: Required. Name of Service. + :paramtype service_name: str + :keyword service_package_name: Required. Name of Service package. + :paramtype service_package_name: str + :keyword service_package_activation_id: Required. Activation Id of Service package. + :paramtype service_package_activation_id: str + :keyword is_exclusive: Required. Indicates IsExclusive flag. + :paramtype is_exclusive: bool + :keyword code_package_name: Required. Name of Code package. + :paramtype code_package_name: str + :keyword entry_point_type: Required. Type of EntryPoint. + :paramtype entry_point_type: str + :keyword image_name: Required. Name of Container image. + :paramtype image_name: str + :keyword container_name: Required. Name of Container. + :paramtype container_name: str + :keyword host_id: Required. Host Id. + :paramtype host_id: str + :keyword exit_code: Required. Exit code of process. + :paramtype exit_code: long + :keyword unexpected_termination: Required. Indicates if termination is unexpected. + :paramtype unexpected_termination: bool + :keyword start_time: Required. Start time of process. + :paramtype start_time: ~datetime.datetime + """ + super(ApplicationContainerInstanceExitedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.kind = 'ApplicationContainerInstanceExited' # type: str + self.service_name = service_name + self.service_package_name = service_package_name + self.service_package_activation_id = service_package_activation_id + self.is_exclusive = is_exclusive + self.code_package_name = code_package_name + self.entry_point_type = entry_point_type + self.image_name = image_name + self.container_name = container_name + self.host_id = host_id + self.exit_code = exit_code + self.unexpected_termination = unexpected_termination + self.start_time = start_time + + +class ApplicationCreatedEvent(ApplicationEvent): + """Application Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar application_type_version: Required. Application type version. + :vartype application_type_version: str + :ivar application_definition_kind: Required. Application definition kind. + :vartype application_definition_kind: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'application_definition_kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + application_id: str, + application_type_name: str, + application_type_version: str, + application_definition_kind: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword application_type_version: Required. Application type version. + :paramtype application_type_version: str + :keyword application_definition_kind: Required. Application definition kind. + :paramtype application_definition_kind: str + """ + super(ApplicationCreatedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.kind = 'ApplicationCreated' # type: str + self.application_type_name = application_type_name + self.application_type_version = application_type_version + self.application_definition_kind = application_definition_kind + + +class ApplicationDeletedEvent(ApplicationEvent): + """Application Deleted event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar application_type_version: Required. Application type version. + :vartype application_type_version: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + application_id: str, + application_type_name: str, + application_type_version: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword application_type_version: Required. Application type version. + :paramtype application_type_version: str + """ + super(ApplicationDeletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.kind = 'ApplicationDeleted' # type: str + self.application_type_name = application_type_name + self.application_type_version = application_type_version + + +class ApplicationDescription(msrest.serialization.Model): + """Describes a Service Fabric application. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the application, including the 'fabric:' URI scheme. + :vartype name: str + :ivar type_name: Required. The application type name as defined in the application manifest. + :vartype type_name: str + :ivar type_version: Required. The version of the application type as defined in the application + manifest. + :vartype type_version: str + :ivar parameter_list: List of application parameters with overridden values from their default + values specified in the application manifest. + :vartype parameter_list: list[~azure.servicefabric.models.ApplicationParameter] + :ivar application_capacity: Describes capacity information for services of this application. + This description can be used for describing the following. + + + * Reserving the capacity for the services on the nodes + * Limiting the total number of nodes that services of this application can run on + * Limiting the custom capacity metrics to limit the total consumption of this metric by the + services of this application. + :vartype application_capacity: ~azure.servicefabric.models.ApplicationCapacityDescription + :ivar managed_application_identity: Managed application identity description. + :vartype managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + + _validation = { + 'name': {'required': True}, + 'type_name': {'required': True}, + 'type_version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'type_version': {'key': 'TypeVersion', 'type': 'str'}, + 'parameter_list': {'key': 'ParameterList', 'type': '[ApplicationParameter]'}, + 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'ApplicationCapacityDescription'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + } + + def __init__( + self, + *, + name: str, + type_name: str, + type_version: str, + parameter_list: Optional[List["ApplicationParameter"]] = None, + application_capacity: Optional["ApplicationCapacityDescription"] = None, + managed_application_identity: Optional["ManagedApplicationIdentityDescription"] = None, + **kwargs + ): + """ + :keyword name: Required. The name of the application, including the 'fabric:' URI scheme. + :paramtype name: str + :keyword type_name: Required. The application type name as defined in the application manifest. + :paramtype type_name: str + :keyword type_version: Required. The version of the application type as defined in the + application manifest. + :paramtype type_version: str + :keyword parameter_list: List of application parameters with overridden values from their + default values specified in the application manifest. + :paramtype parameter_list: list[~azure.servicefabric.models.ApplicationParameter] + :keyword application_capacity: Describes capacity information for services of this application. + This description can be used for describing the following. + + + * Reserving the capacity for the services on the nodes + * Limiting the total number of nodes that services of this application can run on + * Limiting the custom capacity metrics to limit the total consumption of this metric by the + services of this application. + :paramtype application_capacity: ~azure.servicefabric.models.ApplicationCapacityDescription + :keyword managed_application_identity: Managed application identity description. + :paramtype managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + super(ApplicationDescription, self).__init__(**kwargs) + self.name = name + self.type_name = type_name + self.type_version = type_version + self.parameter_list = parameter_list + self.application_capacity = application_capacity + self.managed_application_identity = managed_application_identity + + +class EntityHealth(msrest.serialization.Model): + """Health information common to all entities in the cluster. It contains the aggregated health state, health events and unhealthy evaluation. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + health_events: Optional[List["HealthEvent"]] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + health_statistics: Optional["HealthStatistics"] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + """ + super(EntityHealth, self).__init__(**kwargs) + self.aggregated_health_state = aggregated_health_state + self.health_events = health_events + self.unhealthy_evaluations = unhealthy_evaluations + self.health_statistics = health_statistics + + +class ApplicationHealth(EntityHealth): + """Represents the health of the application. Contains the application aggregated health state and the service and deployed application health states. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar name: The name of the application, including the 'fabric:' URI scheme. + :vartype name: str + :ivar service_health_states: Service health states as found in the health store. + :vartype service_health_states: list[~azure.servicefabric.models.ServiceHealthState] + :ivar deployed_application_health_states: Deployed application health states as found in the + health store. + :vartype deployed_application_health_states: + list[~azure.servicefabric.models.DeployedApplicationHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'service_health_states': {'key': 'ServiceHealthStates', 'type': '[ServiceHealthState]'}, + 'deployed_application_health_states': {'key': 'DeployedApplicationHealthStates', 'type': '[DeployedApplicationHealthState]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + health_events: Optional[List["HealthEvent"]] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + health_statistics: Optional["HealthStatistics"] = None, + name: Optional[str] = None, + service_health_states: Optional[List["ServiceHealthState"]] = None, + deployed_application_health_states: Optional[List["DeployedApplicationHealthState"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword name: The name of the application, including the 'fabric:' URI scheme. + :paramtype name: str + :keyword service_health_states: Service health states as found in the health store. + :paramtype service_health_states: list[~azure.servicefabric.models.ServiceHealthState] + :keyword deployed_application_health_states: Deployed application health states as found in the + health store. + :paramtype deployed_application_health_states: + list[~azure.servicefabric.models.DeployedApplicationHealthState] + """ + super(ApplicationHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.name = name + self.service_health_states = service_health_states + self.deployed_application_health_states = deployed_application_health_states + + +class HealthEvaluation(msrest.serialization.Model): + """Represents a health evaluation which describes the data and the algorithm used by health manager to evaluate the health of an entity. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationHealthEvaluation, ApplicationTypeApplicationsHealthEvaluation, ApplicationsHealthEvaluation, DeltaNodesCheckHealthEvaluation, DeployedApplicationHealthEvaluation, DeployedApplicationsHealthEvaluation, DeployedServicePackageHealthEvaluation, DeployedServicePackagesHealthEvaluation, EventHealthEvaluation, NodeHealthEvaluation, NodeTypeNodesHealthEvaluation, NodesHealthEvaluation, PartitionHealthEvaluation, PartitionsHealthEvaluation, ReplicaHealthEvaluation, ReplicasHealthEvaluation, ServiceHealthEvaluation, ServicesHealthEvaluation, SystemApplicationHealthEvaluation, UpgradeDomainDeltaNodesCheckHealthEvaluation, UpgradeDomainDeployedApplicationsHealthEvaluation, UpgradeDomainNodesHealthEvaluation. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Application': 'ApplicationHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'NodeTypeNodes': 'NodeTypeNodesHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainDeployedApplications': 'UpgradeDomainDeployedApplicationsHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation'} + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + """ + super(HealthEvaluation, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.aggregated_health_state = aggregated_health_state + self.description = description + + +class ApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for an application, containing information about the data and the algorithm used by the health store to evaluate health. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated + health state of the application. The types of the unhealthy evaluations can be + DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + application_name: Optional[str] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current + aggregated health state of the application. The types of the unhealthy evaluations can be + DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(ApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'Application' # type: str + self.application_name = application_name + self.unhealthy_evaluations = unhealthy_evaluations + + +class ApplicationHealthPolicies(msrest.serialization.Model): + """Defines the application health policy map used to evaluate the health of an application or one of its children entities. + + :ivar application_health_policy_map: The wrapper that contains the map with application health + policies used to evaluate specific applications in the cluster. + :vartype application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + } + + def __init__( + self, + *, + application_health_policy_map: Optional[List["ApplicationHealthPolicyMapItem"]] = None, + **kwargs + ): + """ + :keyword application_health_policy_map: The wrapper that contains the map with application + health policies used to evaluate specific applications in the cluster. + :paramtype application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + super(ApplicationHealthPolicies, self).__init__(**kwargs) + self.application_health_policy_map = application_health_policy_map + + +class ApplicationHealthPolicy(msrest.serialization.Model): + """Defines a health policy used to evaluate the health of an application or one of its children entities. + + :ivar consider_warning_as_error: Indicates whether warnings are treated with the same severity + as errors. + :vartype consider_warning_as_error: bool + :ivar max_percent_unhealthy_deployed_applications: The maximum allowed percentage of unhealthy + deployed applications. Allowed values are Byte values from zero to 100. + The percentage represents the maximum tolerated percentage of deployed applications that can + be unhealthy before the application is considered in error. + This is calculated by dividing the number of unhealthy deployed applications over the number + of nodes where the application is currently deployed on in the cluster. + The computation rounds up to tolerate one failure on small numbers of nodes. Default + percentage is zero. + :vartype max_percent_unhealthy_deployed_applications: int + :ivar default_service_type_health_policy: The health policy used by default to evaluate the + health of a service type. + :vartype default_service_type_health_policy: + ~azure.servicefabric.models.ServiceTypeHealthPolicy + :ivar service_type_health_policy_map: The map with service type health policy per service type + name. The map is empty by default. + :vartype service_type_health_policy_map: + list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem] + """ + + _attribute_map = { + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'default_service_type_health_policy': {'key': 'DefaultServiceTypeHealthPolicy', 'type': 'ServiceTypeHealthPolicy'}, + 'service_type_health_policy_map': {'key': 'ServiceTypeHealthPolicyMap', 'type': '[ServiceTypeHealthPolicyMapItem]'}, + } + + def __init__( + self, + *, + consider_warning_as_error: Optional[bool] = False, + max_percent_unhealthy_deployed_applications: Optional[int] = 0, + default_service_type_health_policy: Optional["ServiceTypeHealthPolicy"] = None, + service_type_health_policy_map: Optional[List["ServiceTypeHealthPolicyMapItem"]] = None, + **kwargs + ): + """ + :keyword consider_warning_as_error: Indicates whether warnings are treated with the same + severity as errors. + :paramtype consider_warning_as_error: bool + :keyword max_percent_unhealthy_deployed_applications: The maximum allowed percentage of + unhealthy deployed applications. Allowed values are Byte values from zero to 100. + The percentage represents the maximum tolerated percentage of deployed applications that can + be unhealthy before the application is considered in error. + This is calculated by dividing the number of unhealthy deployed applications over the number + of nodes where the application is currently deployed on in the cluster. + The computation rounds up to tolerate one failure on small numbers of nodes. Default + percentage is zero. + :paramtype max_percent_unhealthy_deployed_applications: int + :keyword default_service_type_health_policy: The health policy used by default to evaluate the + health of a service type. + :paramtype default_service_type_health_policy: + ~azure.servicefabric.models.ServiceTypeHealthPolicy + :keyword service_type_health_policy_map: The map with service type health policy per service + type name. The map is empty by default. + :paramtype service_type_health_policy_map: + list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem] + """ + super(ApplicationHealthPolicy, self).__init__(**kwargs) + self.consider_warning_as_error = consider_warning_as_error + self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications + self.default_service_type_health_policy = default_service_type_health_policy + self.service_type_health_policy_map = service_type_health_policy_map + + +class ApplicationHealthPolicyMapItem(msrest.serialization.Model): + """Defines an item in ApplicationHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :ivar key: Required. The key of the application health policy map item. This is the name of the + application. + :vartype key: str + :ivar value: Required. The value of the application health policy map item. This is the + ApplicationHealthPolicy for this application. + :vartype value: ~azure.servicefabric.models.ApplicationHealthPolicy + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ApplicationHealthPolicy'}, + } + + def __init__( + self, + *, + key: str, + value: "ApplicationHealthPolicy", + **kwargs + ): + """ + :keyword key: Required. The key of the application health policy map item. This is the name of + the application. + :paramtype key: str + :keyword value: Required. The value of the application health policy map item. This is the + ApplicationHealthPolicy for this application. + :paramtype value: ~azure.servicefabric.models.ApplicationHealthPolicy + """ + super(ApplicationHealthPolicyMapItem, self).__init__(**kwargs) + self.key = key + self.value = value + + +class ApplicationHealthPolicyMapObject(msrest.serialization.Model): + """Represents the map of application health policies for a ServiceFabric cluster upgrade. + + :ivar application_health_policy_map: Defines a map that contains specific application health + policies for different applications. + Each entry specifies as key the application name and as value an ApplicationHealthPolicy used + to evaluate the application health. + If an application is not specified in the map, the application health evaluation uses the + ApplicationHealthPolicy found in its application manifest or the default application health + policy (if no health policy is defined in the manifest). + The map is empty by default. + :vartype application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + } + + def __init__( + self, + *, + application_health_policy_map: Optional[List["ApplicationHealthPolicyMapItem"]] = None, + **kwargs + ): + """ + :keyword application_health_policy_map: Defines a map that contains specific application health + policies for different applications. + Each entry specifies as key the application name and as value an ApplicationHealthPolicy used + to evaluate the application health. + If an application is not specified in the map, the application health evaluation uses the + ApplicationHealthPolicy found in its application manifest or the default application health + policy (if no health policy is defined in the manifest). + The map is empty by default. + :paramtype application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + super(ApplicationHealthPolicyMapObject, self).__init__(**kwargs) + self.application_health_policy_map = application_health_policy_map + + +class ApplicationHealthReportExpiredEvent(ApplicationEvent): + """Application Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_instance_id: Required. Id of Application instance. + :vartype application_instance_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + application_id: str, + application_instance_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_instance_id: Required. Id of Application instance. + :paramtype application_instance_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(ApplicationHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.kind = 'ApplicationHealthReportExpired' # type: str + self.application_instance_id = application_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class EntityHealthState(msrest.serialization.Model): + """A base type for the health state of various entities in the cluster. It contains the aggregated health state. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + """ + super(EntityHealthState, self).__init__(**kwargs) + self.aggregated_health_state = aggregated_health_state + + +class ApplicationHealthState(EntityHealthState): + """Represents the health state of an application, which contains the application identifier and the aggregated health state. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar name: The name of the application, including the 'fabric:' URI scheme. + :vartype name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword name: The name of the application, including the 'fabric:' URI scheme. + :paramtype name: str + """ + super(ApplicationHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.name = name + + +class EntityHealthStateChunk(msrest.serialization.Model): + """A base type for the health state chunk of various entities in the cluster. It contains the aggregated health state. + + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + } + + def __init__( + self, + *, + health_state: Optional[Union[str, "HealthState"]] = None, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + """ + super(EntityHealthStateChunk, self).__init__(**kwargs) + self.health_state = health_state + + +class ApplicationHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a application. +The application health state chunk contains the application name, its aggregated health state and any children services and deployed applications that respect the filters in cluster health chunk query description. + + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar application_type_name: The application type name as defined in the application manifest. + :vartype application_type_name: str + :ivar service_health_state_chunks: The list of service health state chunks in the cluster that + respect the filters in the cluster health chunk query description. + :vartype service_health_state_chunks: ~azure.servicefabric.models.ServiceHealthStateChunkList + :ivar deployed_application_health_state_chunks: The list of deployed application health state + chunks in the cluster that respect the filters in the cluster health chunk query description. + :vartype deployed_application_health_state_chunks: + ~azure.servicefabric.models.DeployedApplicationHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_health_state_chunks': {'key': 'ServiceHealthStateChunks', 'type': 'ServiceHealthStateChunkList'}, + 'deployed_application_health_state_chunks': {'key': 'DeployedApplicationHealthStateChunks', 'type': 'DeployedApplicationHealthStateChunkList'}, + } + + def __init__( + self, + *, + health_state: Optional[Union[str, "HealthState"]] = None, + application_name: Optional[str] = None, + application_type_name: Optional[str] = None, + service_health_state_chunks: Optional["ServiceHealthStateChunkList"] = None, + deployed_application_health_state_chunks: Optional["DeployedApplicationHealthStateChunkList"] = None, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword application_type_name: The application type name as defined in the application + manifest. + :paramtype application_type_name: str + :keyword service_health_state_chunks: The list of service health state chunks in the cluster + that respect the filters in the cluster health chunk query description. + :paramtype service_health_state_chunks: ~azure.servicefabric.models.ServiceHealthStateChunkList + :keyword deployed_application_health_state_chunks: The list of deployed application health + state chunks in the cluster that respect the filters in the cluster health chunk query + description. + :paramtype deployed_application_health_state_chunks: + ~azure.servicefabric.models.DeployedApplicationHealthStateChunkList + """ + super(ApplicationHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.application_name = application_name + self.application_type_name = application_type_name + self.service_health_state_chunks = service_health_state_chunks + self.deployed_application_health_state_chunks = deployed_application_health_state_chunks + + +class EntityHealthStateChunkList(msrest.serialization.Model): + """A base type for the list of health state chunks found in the cluster. It contains the total number of health states that match the input filters. + + :ivar total_count: Total number of entity health state objects that match the specified filters + from the cluster health chunk query description. + :vartype total_count: long + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + } + + def __init__( + self, + *, + total_count: Optional[int] = None, + **kwargs + ): + """ + :keyword total_count: Total number of entity health state objects that match the specified + filters from the cluster health chunk query description. + :paramtype total_count: long + """ + super(EntityHealthStateChunkList, self).__init__(**kwargs) + self.total_count = total_count + + +class ApplicationHealthStateChunkList(EntityHealthStateChunkList): + """The list of application health state chunks in the cluster that respect the input filters in the chunk query. Returned by get cluster health state chunks query. + + :ivar total_count: Total number of entity health state objects that match the specified filters + from the cluster health chunk query description. + :vartype total_count: long + :ivar items: The list of application health state chunks that respect the input filters in the + chunk query. + :vartype items: list[~azure.servicefabric.models.ApplicationHealthStateChunk] + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'items': {'key': 'Items', 'type': '[ApplicationHealthStateChunk]'}, + } + + def __init__( + self, + *, + total_count: Optional[int] = None, + items: Optional[List["ApplicationHealthStateChunk"]] = None, + **kwargs + ): + """ + :keyword total_count: Total number of entity health state objects that match the specified + filters from the cluster health chunk query description. + :paramtype total_count: long + :keyword items: The list of application health state chunks that respect the input filters in + the chunk query. + :paramtype items: list[~azure.servicefabric.models.ApplicationHealthStateChunk] + """ + super(ApplicationHealthStateChunkList, self).__init__(total_count=total_count, **kwargs) + self.items = items + + +class ApplicationHealthStateFilter(msrest.serialization.Model): + """Defines matching criteria to determine whether a application should be included in the cluster health chunk. +One filter can match zero, one or multiple applications, depending on its properties. + + :ivar application_name_filter: The name of the application that matches the filter, as a fabric + uri. The filter is applied only to the specified application, if it exists. + If the application doesn't exist, no application is returned in the cluster health chunk based + on this filter. + If the application exists, it is included in the cluster health chunk if it respects the other + filter properties. + If not specified, all applications are matched against the other filter members, like health + state filter. + :vartype application_name_filter: str + :ivar application_type_name_filter: The name of the application type that matches the filter. + If specified, the filter is applied only to applications of the selected application type, if + any exists. + If no applications of the specified application type exists, no application is returned in the + cluster health chunk based on this filter. + Each application of the specified application type is included in the cluster health chunk if + it respects the other filter properties. + If not specified, all applications are matched against the other filter members, like health + state filter. + :vartype application_type_name_filter: str + :ivar health_state_filter: The filter for the health state of the applications. It allows + selecting applications if they match the desired health states. + The possible values are integer value of one of the following health states. Only applications + that match the filter are returned. All applications are used to evaluate the cluster + aggregated health state. + If not specified, default value is None, unless the application name or the application type + name are specified. If the filter has default value and application name is specified, the + matching application is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches applications with HealthState value of OK + (2) and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :vartype health_state_filter: int + :ivar service_filters: Defines a list of filters that specify which services to be included in + the returned cluster health chunk as children of the application. The services are returned + only if the parent application matches a filter. + If the list is empty, no services are returned. All the services are used to evaluate the + parent application aggregated health state, regardless of the input filters. + The application filter may specify multiple service filters. + For example, it can specify a filter to return all services with health state Error and + another filter to always include a service identified by its service name. + :vartype service_filters: list[~azure.servicefabric.models.ServiceHealthStateFilter] + :ivar deployed_application_filters: Defines a list of filters that specify which deployed + applications to be included in the returned cluster health chunk as children of the + application. The deployed applications are returned only if the parent application matches a + filter. + If the list is empty, no deployed applications are returned. All the deployed applications are + used to evaluate the parent application aggregated health state, regardless of the input + filters. + The application filter may specify multiple deployed application filters. + For example, it can specify a filter to return all deployed applications with health state + Error and another filter to always include a deployed application on a specified node. + :vartype deployed_application_filters: + list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter] + """ + + _attribute_map = { + 'application_name_filter': {'key': 'ApplicationNameFilter', 'type': 'str'}, + 'application_type_name_filter': {'key': 'ApplicationTypeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'service_filters': {'key': 'ServiceFilters', 'type': '[ServiceHealthStateFilter]'}, + 'deployed_application_filters': {'key': 'DeployedApplicationFilters', 'type': '[DeployedApplicationHealthStateFilter]'}, + } + + def __init__( + self, + *, + application_name_filter: Optional[str] = None, + application_type_name_filter: Optional[str] = None, + health_state_filter: Optional[int] = 0, + service_filters: Optional[List["ServiceHealthStateFilter"]] = None, + deployed_application_filters: Optional[List["DeployedApplicationHealthStateFilter"]] = None, + **kwargs + ): + """ + :keyword application_name_filter: The name of the application that matches the filter, as a + fabric uri. The filter is applied only to the specified application, if it exists. + If the application doesn't exist, no application is returned in the cluster health chunk based + on this filter. + If the application exists, it is included in the cluster health chunk if it respects the other + filter properties. + If not specified, all applications are matched against the other filter members, like health + state filter. + :paramtype application_name_filter: str + :keyword application_type_name_filter: The name of the application type that matches the + filter. + If specified, the filter is applied only to applications of the selected application type, if + any exists. + If no applications of the specified application type exists, no application is returned in the + cluster health chunk based on this filter. + Each application of the specified application type is included in the cluster health chunk if + it respects the other filter properties. + If not specified, all applications are matched against the other filter members, like health + state filter. + :paramtype application_type_name_filter: str + :keyword health_state_filter: The filter for the health state of the applications. It allows + selecting applications if they match the desired health states. + The possible values are integer value of one of the following health states. Only applications + that match the filter are returned. All applications are used to evaluate the cluster + aggregated health state. + If not specified, default value is None, unless the application name or the application type + name are specified. If the filter has default value and application name is specified, the + matching application is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches applications with HealthState value of OK + (2) and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :paramtype health_state_filter: int + :keyword service_filters: Defines a list of filters that specify which services to be included + in the returned cluster health chunk as children of the application. The services are returned + only if the parent application matches a filter. + If the list is empty, no services are returned. All the services are used to evaluate the + parent application aggregated health state, regardless of the input filters. + The application filter may specify multiple service filters. + For example, it can specify a filter to return all services with health state Error and + another filter to always include a service identified by its service name. + :paramtype service_filters: list[~azure.servicefabric.models.ServiceHealthStateFilter] + :keyword deployed_application_filters: Defines a list of filters that specify which deployed + applications to be included in the returned cluster health chunk as children of the + application. The deployed applications are returned only if the parent application matches a + filter. + If the list is empty, no deployed applications are returned. All the deployed applications are + used to evaluate the parent application aggregated health state, regardless of the input + filters. + The application filter may specify multiple deployed application filters. + For example, it can specify a filter to return all deployed applications with health state + Error and another filter to always include a deployed application on a specified node. + :paramtype deployed_application_filters: + list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter] + """ + super(ApplicationHealthStateFilter, self).__init__(**kwargs) + self.application_name_filter = application_name_filter + self.application_type_name_filter = application_type_name_filter + self.health_state_filter = health_state_filter + self.service_filters = service_filters + self.deployed_application_filters = deployed_application_filters + + +class ApplicationInfo(msrest.serialization.Model): + """Information about a Service Fabric application. + + :ivar id: The identity of the application. This is an encoded representation of the application + name. This is used in the REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype id: str + :ivar name: The name of the application, including the 'fabric:' URI scheme. + :vartype name: str + :ivar type_name: The application type name as defined in the application manifest. + :vartype type_name: str + :ivar type_version: The version of the application type as defined in the application manifest. + :vartype type_version: str + :ivar status: The status of the application. Possible values include: "Invalid", "Ready", + "Upgrading", "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ApplicationStatus + :ivar parameters: List of application parameters with overridden values from their default + values specified in the application manifest. + :vartype parameters: list[~azure.servicefabric.models.ApplicationParameter] + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar application_definition_kind: The mechanism used to define a Service Fabric application. + Possible values include: "Invalid", "ServiceFabricApplicationDescription", "Compose". + :vartype application_definition_kind: str or + ~azure.servicefabric.models.ApplicationDefinitionKind + :ivar managed_application_identity: Managed application identity description. + :vartype managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + :ivar application_metadata: Metadata associated with a specific application. + :vartype application_metadata: ~azure.servicefabric.models.ApplicationMetadata + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'type_version': {'key': 'TypeVersion', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + 'application_metadata': {'key': 'ApplicationMetadata', 'type': 'ApplicationMetadata'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type_name: Optional[str] = None, + type_version: Optional[str] = None, + status: Optional[Union[str, "ApplicationStatus"]] = None, + parameters: Optional[List["ApplicationParameter"]] = None, + health_state: Optional[Union[str, "HealthState"]] = None, + application_definition_kind: Optional[Union[str, "ApplicationDefinitionKind"]] = None, + managed_application_identity: Optional["ManagedApplicationIdentityDescription"] = None, + application_metadata: Optional["ApplicationMetadata"] = None, + **kwargs + ): + """ + :keyword id: The identity of the application. This is an encoded representation of the + application name. This is used in the REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype id: str + :keyword name: The name of the application, including the 'fabric:' URI scheme. + :paramtype name: str + :keyword type_name: The application type name as defined in the application manifest. + :paramtype type_name: str + :keyword type_version: The version of the application type as defined in the application + manifest. + :paramtype type_version: str + :keyword status: The status of the application. Possible values include: "Invalid", "Ready", + "Upgrading", "Creating", "Deleting", "Failed". + :paramtype status: str or ~azure.servicefabric.models.ApplicationStatus + :keyword parameters: List of application parameters with overridden values from their default + values specified in the application manifest. + :paramtype parameters: list[~azure.servicefabric.models.ApplicationParameter] + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword application_definition_kind: The mechanism used to define a Service Fabric + application. Possible values include: "Invalid", "ServiceFabricApplicationDescription", + "Compose". + :paramtype application_definition_kind: str or + ~azure.servicefabric.models.ApplicationDefinitionKind + :keyword managed_application_identity: Managed application identity description. + :paramtype managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + :keyword application_metadata: Metadata associated with a specific application. + :paramtype application_metadata: ~azure.servicefabric.models.ApplicationMetadata + """ + super(ApplicationInfo, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_name = type_name + self.type_version = type_version + self.status = status + self.parameters = parameters + self.health_state = health_state + self.application_definition_kind = application_definition_kind + self.managed_application_identity = managed_application_identity + self.application_metadata = application_metadata + + +class ApplicationLoadInfo(msrest.serialization.Model): + """Load Information about a Service Fabric application. + + :ivar id: The identity of the application. This is an encoded representation of the application + name. This is used in the REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype id: str + :ivar minimum_nodes: The minimum number of nodes for this application. + It is the number of nodes where Service Fabric will reserve Capacity in the cluster which + equals to ReservedLoad * MinimumNodes for this Application instance. + For applications that do not have application capacity defined this value will be zero. + :vartype minimum_nodes: long + :ivar maximum_nodes: The maximum number of nodes where this application can be instantiated. + It is the number of nodes this application is allowed to span. + For applications that do not have application capacity defined this value will be zero. + :vartype maximum_nodes: long + :ivar node_count: The number of nodes on which this application is instantiated. + For applications that do not have application capacity defined this value will be zero. + :vartype node_count: long + :ivar application_load_metric_information: List of application load metric information. + :vartype application_load_metric_information: + list[~azure.servicefabric.models.ApplicationLoadMetricInformation] + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'node_count': {'key': 'NodeCount', 'type': 'long'}, + 'application_load_metric_information': {'key': 'ApplicationLoadMetricInformation', 'type': '[ApplicationLoadMetricInformation]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + minimum_nodes: Optional[int] = None, + maximum_nodes: Optional[int] = None, + node_count: Optional[int] = None, + application_load_metric_information: Optional[List["ApplicationLoadMetricInformation"]] = None, + **kwargs + ): + """ + :keyword id: The identity of the application. This is an encoded representation of the + application name. This is used in the REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype id: str + :keyword minimum_nodes: The minimum number of nodes for this application. + It is the number of nodes where Service Fabric will reserve Capacity in the cluster which + equals to ReservedLoad * MinimumNodes for this Application instance. + For applications that do not have application capacity defined this value will be zero. + :paramtype minimum_nodes: long + :keyword maximum_nodes: The maximum number of nodes where this application can be instantiated. + It is the number of nodes this application is allowed to span. + For applications that do not have application capacity defined this value will be zero. + :paramtype maximum_nodes: long + :keyword node_count: The number of nodes on which this application is instantiated. + For applications that do not have application capacity defined this value will be zero. + :paramtype node_count: long + :keyword application_load_metric_information: List of application load metric information. + :paramtype application_load_metric_information: + list[~azure.servicefabric.models.ApplicationLoadMetricInformation] + """ + super(ApplicationLoadInfo, self).__init__(**kwargs) + self.id = id + self.minimum_nodes = minimum_nodes + self.maximum_nodes = maximum_nodes + self.node_count = node_count + self.application_load_metric_information = application_load_metric_information + + +class ApplicationLoadMetricInformation(msrest.serialization.Model): + """Describes load information for a custom resource balancing metric. This can be used to limit the total consumption of this metric by the services of this application. + + :ivar name: The name of the metric. + :vartype name: str + :ivar reservation_capacity: This is the capacity reserved in the cluster for the application. + It's the product of NodeReservationCapacity and MinimumNodes. + If set to zero, no capacity is reserved for this metric. + When setting application capacity or when updating application capacity this value must be + smaller than or equal to MaximumCapacity for each metric. + :vartype reservation_capacity: long + :ivar application_capacity: Total capacity for this metric in this application instance. + :vartype application_capacity: long + :ivar application_load: Current load for this metric in this application instance. + :vartype application_load: long + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, + 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'long'}, + 'application_load': {'key': 'ApplicationLoad', 'type': 'long'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + reservation_capacity: Optional[int] = None, + application_capacity: Optional[int] = None, + application_load: Optional[int] = None, + **kwargs + ): + """ + :keyword name: The name of the metric. + :paramtype name: str + :keyword reservation_capacity: This is the capacity reserved in the cluster for the + application. + It's the product of NodeReservationCapacity and MinimumNodes. + If set to zero, no capacity is reserved for this metric. + When setting application capacity or when updating application capacity this value must be + smaller than or equal to MaximumCapacity for each metric. + :paramtype reservation_capacity: long + :keyword application_capacity: Total capacity for this metric in this application instance. + :paramtype application_capacity: long + :keyword application_load: Current load for this metric in this application instance. + :paramtype application_load: long + """ + super(ApplicationLoadMetricInformation, self).__init__(**kwargs) + self.name = name + self.reservation_capacity = reservation_capacity + self.application_capacity = application_capacity + self.application_load = application_load + + +class ApplicationMetadata(msrest.serialization.Model): + """Metadata associated with a specific application. + + :ivar arm_metadata: Common ArmMetadata assocaited with Service Fabric Entities. + :vartype arm_metadata: ~azure.servicefabric.models.ArmMetadata + """ + + _attribute_map = { + 'arm_metadata': {'key': 'ArmMetadata', 'type': 'ArmMetadata'}, + } + + def __init__( + self, + *, + arm_metadata: Optional["ArmMetadata"] = None, + **kwargs + ): + """ + :keyword arm_metadata: Common ArmMetadata assocaited with Service Fabric Entities. + :paramtype arm_metadata: ~azure.servicefabric.models.ArmMetadata + """ + super(ApplicationMetadata, self).__init__(**kwargs) + self.arm_metadata = arm_metadata + + +class ApplicationMetricDescription(msrest.serialization.Model): + """Describes capacity information for a custom resource balancing metric. This can be used to limit the total consumption of this metric by the services of this application. + + :ivar name: The name of the metric. + :vartype name: str + :ivar maximum_capacity: The maximum node capacity for Service Fabric application. + This is the maximum Load for an instance of this application on a single node. Even if the + capacity of node is greater than this value, Service Fabric will limit the total load of + services within the application on each node to this value. + If set to zero, capacity for this metric is unlimited on each node. + When creating a new application with application capacity defined, the product of MaximumNodes + and this value must always be smaller than or equal to TotalApplicationCapacity. + When updating existing application with application capacity, the product of MaximumNodes and + this value must always be smaller than or equal to TotalApplicationCapacity. + :vartype maximum_capacity: long + :ivar reservation_capacity: The node reservation capacity for Service Fabric application. + This is the amount of load which is reserved on nodes which have instances of this + application. + If MinimumNodes is specified, then the product of these values will be the capacity reserved + in the cluster for the application. + If set to zero, no capacity is reserved for this metric. + When setting application capacity or when updating application capacity; this value must be + smaller than or equal to MaximumCapacity for each metric. + :vartype reservation_capacity: long + :ivar total_application_capacity: The total metric capacity for Service Fabric application. + This is the total metric capacity for this application in the cluster. Service Fabric will try + to limit the sum of loads of services within the application to this value. + When creating a new application with application capacity defined, the product of MaximumNodes + and MaximumCapacity must always be smaller than or equal to this value. + :vartype total_application_capacity: long + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'maximum_capacity': {'key': 'MaximumCapacity', 'type': 'long'}, + 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, + 'total_application_capacity': {'key': 'TotalApplicationCapacity', 'type': 'long'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + maximum_capacity: Optional[int] = None, + reservation_capacity: Optional[int] = None, + total_application_capacity: Optional[int] = None, + **kwargs + ): + """ + :keyword name: The name of the metric. + :paramtype name: str + :keyword maximum_capacity: The maximum node capacity for Service Fabric application. + This is the maximum Load for an instance of this application on a single node. Even if the + capacity of node is greater than this value, Service Fabric will limit the total load of + services within the application on each node to this value. + If set to zero, capacity for this metric is unlimited on each node. + When creating a new application with application capacity defined, the product of MaximumNodes + and this value must always be smaller than or equal to TotalApplicationCapacity. + When updating existing application with application capacity, the product of MaximumNodes and + this value must always be smaller than or equal to TotalApplicationCapacity. + :paramtype maximum_capacity: long + :keyword reservation_capacity: The node reservation capacity for Service Fabric application. + This is the amount of load which is reserved on nodes which have instances of this + application. + If MinimumNodes is specified, then the product of these values will be the capacity reserved + in the cluster for the application. + If set to zero, no capacity is reserved for this metric. + When setting application capacity or when updating application capacity; this value must be + smaller than or equal to MaximumCapacity for each metric. + :paramtype reservation_capacity: long + :keyword total_application_capacity: The total metric capacity for Service Fabric application. + This is the total metric capacity for this application in the cluster. Service Fabric will try + to limit the sum of loads of services within the application to this value. + When creating a new application with application capacity defined, the product of MaximumNodes + and MaximumCapacity must always be smaller than or equal to this value. + :paramtype total_application_capacity: long + """ + super(ApplicationMetricDescription, self).__init__(**kwargs) + self.name = name + self.maximum_capacity = maximum_capacity + self.reservation_capacity = reservation_capacity + self.total_application_capacity = total_application_capacity + + +class ApplicationNameInfo(msrest.serialization.Model): + """Information about the application name. + + :ivar id: The identity of the application. This is an encoded representation of the application + name. This is used in the REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype id: str + :ivar name: The name of the application, including the 'fabric:' URI scheme. + :vartype name: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :keyword id: The identity of the application. This is an encoded representation of the + application name. This is used in the REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype id: str + :keyword name: The name of the application, including the 'fabric:' URI scheme. + :paramtype name: str + """ + super(ApplicationNameInfo, self).__init__(**kwargs) + self.id = id + self.name = name + + +class ApplicationNewHealthReportEvent(ApplicationEvent): + """Application Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_instance_id: Required. Id of Application instance. + :vartype application_instance_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + application_id: str, + application_instance_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_instance_id: Required. Id of Application instance. + :paramtype application_instance_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(ApplicationNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.kind = 'ApplicationNewHealthReport' # type: str + self.application_instance_id = application_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class ApplicationParameter(msrest.serialization.Model): + """Describes an application parameter override to be applied when creating or upgrading an application. + + All required parameters must be populated in order to send to Azure. + + :ivar key: Required. The name of the parameter. + :vartype key: str + :ivar value: Required. The value of the parameter. + :vartype value: str + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + } + + def __init__( + self, + *, + key: str, + value: str, + **kwargs + ): + """ + :keyword key: Required. The name of the parameter. + :paramtype key: str + :keyword value: Required. The value of the parameter. + :paramtype value: str + """ + super(ApplicationParameter, self).__init__(**kwargs) + self.key = key + self.value = value + + +class ApplicationProcessExitedEvent(ApplicationEvent): + """Process Exited event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar service_name: Required. Name of Service. + :vartype service_name: str + :ivar service_package_name: Required. Name of Service package. + :vartype service_package_name: str + :ivar service_package_activation_id: Required. Activation Id of Service package. + :vartype service_package_activation_id: str + :ivar is_exclusive: Required. Indicates IsExclusive flag. + :vartype is_exclusive: bool + :ivar code_package_name: Required. Name of Code package. + :vartype code_package_name: str + :ivar entry_point_type: Required. Type of EntryPoint. + :vartype entry_point_type: str + :ivar exe_name: Required. Name of executable. + :vartype exe_name: str + :ivar process_id: Required. Process Id. + :vartype process_id: long + :ivar host_id: Required. Host Id. + :vartype host_id: str + :ivar exit_code: Required. Exit code of process. + :vartype exit_code: long + :ivar unexpected_termination: Required. Indicates if termination is unexpected. + :vartype unexpected_termination: bool + :ivar start_time: Required. Start time of process. + :vartype start_time: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'service_name': {'required': True}, + 'service_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'is_exclusive': {'required': True}, + 'code_package_name': {'required': True}, + 'entry_point_type': {'required': True}, + 'exe_name': {'required': True}, + 'process_id': {'required': True}, + 'host_id': {'required': True}, + 'exit_code': {'required': True}, + 'unexpected_termination': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, + 'exe_name': {'key': 'ExeName', 'type': 'str'}, + 'process_id': {'key': 'ProcessId', 'type': 'long'}, + 'host_id': {'key': 'HostId', 'type': 'str'}, + 'exit_code': {'key': 'ExitCode', 'type': 'long'}, + 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + application_id: str, + service_name: str, + service_package_name: str, + service_package_activation_id: str, + is_exclusive: bool, + code_package_name: str, + entry_point_type: str, + exe_name: str, + process_id: int, + host_id: str, + exit_code: int, + unexpected_termination: bool, + start_time: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword service_name: Required. Name of Service. + :paramtype service_name: str + :keyword service_package_name: Required. Name of Service package. + :paramtype service_package_name: str + :keyword service_package_activation_id: Required. Activation Id of Service package. + :paramtype service_package_activation_id: str + :keyword is_exclusive: Required. Indicates IsExclusive flag. + :paramtype is_exclusive: bool + :keyword code_package_name: Required. Name of Code package. + :paramtype code_package_name: str + :keyword entry_point_type: Required. Type of EntryPoint. + :paramtype entry_point_type: str + :keyword exe_name: Required. Name of executable. + :paramtype exe_name: str + :keyword process_id: Required. Process Id. + :paramtype process_id: long + :keyword host_id: Required. Host Id. + :paramtype host_id: str + :keyword exit_code: Required. Exit code of process. + :paramtype exit_code: long + :keyword unexpected_termination: Required. Indicates if termination is unexpected. + :paramtype unexpected_termination: bool + :keyword start_time: Required. Start time of process. + :paramtype start_time: ~datetime.datetime + """ + super(ApplicationProcessExitedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.kind = 'ApplicationProcessExited' # type: str + self.service_name = service_name + self.service_package_name = service_package_name + self.service_package_activation_id = service_package_activation_id + self.is_exclusive = is_exclusive + self.code_package_name = code_package_name + self.entry_point_type = entry_point_type + self.exe_name = exe_name + self.process_id = process_id + self.host_id = host_id + self.exit_code = exit_code + self.unexpected_termination = unexpected_termination + self.start_time = start_time + + +class ApplicationResourceDescription(msrest.serialization.Model): + """This type describes a application resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of the Application resource. + :vartype name: str + :ivar identity: Describes the identity of the application. + :vartype identity: ~azure.servicefabric.models.IdentityDescription + :ivar description: User readable description of the application. + :vartype description: str + :ivar services: Describes the services in the application. This property is used to create or + modify services of the application. On get only the name of the service is returned. The + service description can be obtained by querying for the service resource. + :vartype services: list[~azure.servicefabric.models.ServiceResourceDescription] + :ivar diagnostics: Describes the diagnostics definition and usage for an application resource. + :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsDescription + :ivar debug_params: Internal - used by Visual Studio to setup the debugging session on the + local development environment. + :vartype debug_params: str + :ivar service_names: Names of the services in the application. + :vartype service_names: list[str] + :ivar status: Status of the application. Possible values include: "Unknown", "Ready", + "Upgrading", "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the application. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. Possible values + include: "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the application's health state is not 'Ok', this additional + details from service fabric Health Manager for the user to know why the application is marked + unhealthy. + :vartype unhealthy_evaluation: str + """ + + _validation = { + 'name': {'required': True}, + 'service_names': {'readonly': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityDescription'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, + 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, + 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + identity: Optional["IdentityDescription"] = None, + description: Optional[str] = None, + services: Optional[List["ServiceResourceDescription"]] = None, + diagnostics: Optional["DiagnosticsDescription"] = None, + debug_params: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Required. Name of the Application resource. + :paramtype name: str + :keyword identity: Describes the identity of the application. + :paramtype identity: ~azure.servicefabric.models.IdentityDescription + :keyword description: User readable description of the application. + :paramtype description: str + :keyword services: Describes the services in the application. This property is used to create + or modify services of the application. On get only the name of the service is returned. The + service description can be obtained by querying for the service resource. + :paramtype services: list[~azure.servicefabric.models.ServiceResourceDescription] + :keyword diagnostics: Describes the diagnostics definition and usage for an application + resource. + :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsDescription + :keyword debug_params: Internal - used by Visual Studio to setup the debugging session on the + local development environment. + :paramtype debug_params: str + """ + super(ApplicationResourceDescription, self).__init__(**kwargs) + self.name = name + self.identity = identity + self.description = description + self.services = services + self.diagnostics = diagnostics + self.debug_params = debug_params + self.service_names = None + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + + +class ApplicationResourceUpgradeProgressInfo(msrest.serialization.Model): + """This type describes an application resource upgrade. + + :ivar name: Name of the Application resource. + :vartype name: str + :ivar target_application_type_version: The target application version for the application + upgrade. + :vartype target_application_type_version: str + :ivar start_timestamp_utc: The estimated UTC datetime when the upgrade started. + :vartype start_timestamp_utc: str + :ivar upgrade_state: The state of the application resource upgrade. Possible values include: + "Invalid", "ProvisioningTarget", "RollingForward", "UnprovisioningCurrent", + "CompletedRollforward", "RollingBack", "UnprovisioningTarget", "CompletedRollback", "Failed". + :vartype upgrade_state: str or ~azure.servicefabric.models.ApplicationResourceUpgradeState + :ivar percent_completed: The estimated percent of replicas are completed in the upgrade. + :vartype percent_completed: str + :ivar service_upgrade_progress: List of service upgrade progresses. + :vartype service_upgrade_progress: list[~azure.servicefabric.models.ServiceUpgradeProgress] + :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored". Default value: "Monitored". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.RollingUpgradeMode + :ivar upgrade_duration: The estimated amount of time that the overall upgrade elapsed. It is + first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :vartype upgrade_duration: str + :ivar application_upgrade_status_details: Additional detailed information about the status of + the pending upgrade. + :vartype application_upgrade_status_details: str + :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :vartype upgrade_replica_set_check_timeout_in_seconds: long + :ivar failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and + FailureAction was executed. + :vartype failure_timestamp_utc: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'percent_completed': {'key': 'PercentCompleted', 'type': 'str'}, + 'service_upgrade_progress': {'key': 'ServiceUpgradeProgress', 'type': '[ServiceUpgradeProgress]'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + target_application_type_version: Optional[str] = None, + start_timestamp_utc: Optional[str] = None, + upgrade_state: Optional[Union[str, "ApplicationResourceUpgradeState"]] = None, + percent_completed: Optional[str] = None, + service_upgrade_progress: Optional[List["ServiceUpgradeProgress"]] = None, + rolling_upgrade_mode: Optional[Union[str, "RollingUpgradeMode"]] = "Monitored", + upgrade_duration: Optional[str] = "PT0H2M0S", + application_upgrade_status_details: Optional[str] = None, + upgrade_replica_set_check_timeout_in_seconds: Optional[int] = 42949672925, + failure_timestamp_utc: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Name of the Application resource. + :paramtype name: str + :keyword target_application_type_version: The target application version for the application + upgrade. + :paramtype target_application_type_version: str + :keyword start_timestamp_utc: The estimated UTC datetime when the upgrade started. + :paramtype start_timestamp_utc: str + :keyword upgrade_state: The state of the application resource upgrade. Possible values include: + "Invalid", "ProvisioningTarget", "RollingForward", "UnprovisioningCurrent", + "CompletedRollforward", "RollingBack", "UnprovisioningTarget", "CompletedRollback", "Failed". + :paramtype upgrade_state: str or ~azure.servicefabric.models.ApplicationResourceUpgradeState + :keyword percent_completed: The estimated percent of replicas are completed in the upgrade. + :paramtype percent_completed: str + :keyword service_upgrade_progress: List of service upgrade progresses. + :paramtype service_upgrade_progress: list[~azure.servicefabric.models.ServiceUpgradeProgress] + :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored". Default value: "Monitored". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.RollingUpgradeMode + :keyword upgrade_duration: The estimated amount of time that the overall upgrade elapsed. It is + first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :paramtype upgrade_duration: str + :keyword application_upgrade_status_details: Additional detailed information about the status + of the pending upgrade. + :paramtype application_upgrade_status_details: str + :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :paramtype upgrade_replica_set_check_timeout_in_seconds: long + :keyword failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and + FailureAction was executed. + :paramtype failure_timestamp_utc: str + """ + super(ApplicationResourceUpgradeProgressInfo, self).__init__(**kwargs) + self.name = name + self.target_application_type_version = target_application_type_version + self.start_timestamp_utc = start_timestamp_utc + self.upgrade_state = upgrade_state + self.percent_completed = percent_completed + self.service_upgrade_progress = service_upgrade_progress + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_duration = upgrade_duration + self.application_upgrade_status_details = application_upgrade_status_details + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.failure_timestamp_utc = failure_timestamp_utc + + +class VolumeReference(msrest.serialization.Model): + """Describes a reference to a volume resource. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of the volume being referenced. + :vartype name: str + :ivar read_only: The flag indicating whether the volume is read only. Default is 'false'. + :vartype read_only: bool + :ivar destination_path: Required. The path within the container at which the volume should be + mounted. Only valid path characters are allowed. + :vartype 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: Optional[bool] = None, + **kwargs + ): + """ + :keyword name: Required. Name of the volume being referenced. + :paramtype name: str + :keyword read_only: The flag indicating whether the volume is read only. Default is 'false'. + :paramtype read_only: bool + :keyword destination_path: Required. The path within the container at which the volume should + be mounted. Only valid path characters are allowed. + :paramtype destination_path: str + """ + super(VolumeReference, self).__init__(**kwargs) + self.name = name + self.read_only = read_only + self.destination_path = destination_path + + +class ApplicationScopedVolume(VolumeReference): + """Describes a volume whose lifetime is scoped to the application's lifetime. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of the volume being referenced. + :vartype name: str + :ivar read_only: The flag indicating whether the volume is read only. Default is 'false'. + :vartype read_only: bool + :ivar destination_path: Required. The path within the container at which the volume should be + mounted. Only valid path characters are allowed. + :vartype destination_path: str + :ivar creation_parameters: Required. Describes parameters for creating application-scoped + volumes. + :vartype creation_parameters: + ~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters + """ + + _validation = { + 'name': {'required': True}, + 'destination_path': {'required': True}, + 'creation_parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'destination_path': {'key': 'destinationPath', 'type': 'str'}, + 'creation_parameters': {'key': 'creationParameters', 'type': 'ApplicationScopedVolumeCreationParameters'}, + } + + def __init__( + self, + *, + name: str, + destination_path: str, + creation_parameters: "ApplicationScopedVolumeCreationParameters", + read_only: Optional[bool] = None, + **kwargs + ): + """ + :keyword name: Required. Name of the volume being referenced. + :paramtype name: str + :keyword read_only: The flag indicating whether the volume is read only. Default is 'false'. + :paramtype read_only: bool + :keyword destination_path: Required. The path within the container at which the volume should + be mounted. Only valid path characters are allowed. + :paramtype destination_path: str + :keyword creation_parameters: Required. Describes parameters for creating application-scoped + volumes. + :paramtype creation_parameters: + ~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters + """ + super(ApplicationScopedVolume, self).__init__(name=name, read_only=read_only, destination_path=destination_path, **kwargs) + self.creation_parameters = creation_parameters + + +class ApplicationScopedVolumeCreationParameters(msrest.serialization.Model): + """Describes parameters for creating application-scoped volumes. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Specifies the application-scoped volume kind.Constant filled by server. + Possible values include: "ServiceFabricVolumeDisk". + :vartype kind: str or ~azure.servicefabric.models.ApplicationScopedVolumeKind + :ivar description: User readable description of the volume. + :vartype description: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ServiceFabricVolumeDisk': 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk'} + } + + def __init__( + self, + *, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword description: User readable description of the volume. + :paramtype description: str + """ + super(ApplicationScopedVolumeCreationParameters, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.description = description + + +class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk(ApplicationScopedVolumeCreationParameters): + """Describes parameters for creating application-scoped volumes provided by Service Fabric Volume Disks. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Specifies the application-scoped volume kind.Constant filled by server. + Possible values include: "ServiceFabricVolumeDisk". + :vartype kind: str or ~azure.servicefabric.models.ApplicationScopedVolumeKind + :ivar description: User readable description of the volume. + :vartype description: str + :ivar size_disk: Required. Volume size. Possible values include: "Small", "Medium", "Large". + :vartype size_disk: str or ~azure.servicefabric.models.SizeTypes + """ + + _validation = { + 'kind': {'required': True}, + 'size_disk': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'size_disk': {'key': 'sizeDisk', 'type': 'str'}, + } + + def __init__( + self, + *, + size_disk: Union[str, "SizeTypes"], + description: Optional[str] = None, + **kwargs + ): + """ + :keyword description: User readable description of the volume. + :paramtype description: str + :keyword size_disk: Required. Volume size. Possible values include: "Small", "Medium", "Large". + :paramtype size_disk: str or ~azure.servicefabric.models.SizeTypes + """ + super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__(description=description, **kwargs) + self.kind = 'ServiceFabricVolumeDisk' # type: str + self.size_disk = size_disk + + +class ApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for applications, containing health evaluations for each unhealthy application that impacted current aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar max_percent_unhealthy_applications: Maximum allowed percentage of unhealthy applications + from the ClusterHealthPolicy. + :vartype max_percent_unhealthy_applications: int + :ivar total_count: Total number of applications from the health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy ApplicationHealthEvaluation that impacted the aggregated + health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + max_percent_unhealthy_applications: Optional[int] = None, + total_count: Optional[int] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword max_percent_unhealthy_applications: Maximum allowed percentage of unhealthy + applications from the ClusterHealthPolicy. + :paramtype max_percent_unhealthy_applications: int + :keyword total_count: Total number of applications from the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy ApplicationHealthEvaluation that impacted the aggregated + health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(ApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'Applications' # type: str + self.max_percent_unhealthy_applications = max_percent_unhealthy_applications + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + + +class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for applications of a particular application type. The application type applications evaluation can be returned when cluster health evaluation returns unhealthy aggregated health state, either Error or Warning. It contains health evaluations for each unhealthy application of the included application type that impacted current aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar application_type_name: The application type name as defined in the application manifest. + :vartype application_type_name: str + :ivar max_percent_unhealthy_applications: Maximum allowed percentage of unhealthy applications + for the application type, specified as an entry in ApplicationTypeHealthPolicyMap. + :vartype max_percent_unhealthy_applications: int + :ivar total_count: Total number of applications of the application type found in the health + store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy ApplicationHealthEvaluation of this application type that + impacted the aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + application_type_name: Optional[str] = None, + max_percent_unhealthy_applications: Optional[int] = None, + total_count: Optional[int] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword application_type_name: The application type name as defined in the application + manifest. + :paramtype application_type_name: str + :keyword max_percent_unhealthy_applications: Maximum allowed percentage of unhealthy + applications for the application type, specified as an entry in ApplicationTypeHealthPolicyMap. + :paramtype max_percent_unhealthy_applications: int + :keyword total_count: Total number of applications of the application type found in the health + store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy ApplicationHealthEvaluation of this application type that + impacted the aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(ApplicationTypeApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'ApplicationTypeApplications' # type: str + self.application_type_name = application_type_name + self.max_percent_unhealthy_applications = max_percent_unhealthy_applications + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + + +class ApplicationTypeHealthPolicyMapItem(msrest.serialization.Model): + """Defines an item in ApplicationTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :ivar key: Required. The key of the application type health policy map item. This is the name + of the application type. + :vartype key: str + :ivar value: Required. The value of the application type health policy map item. + The max percent unhealthy applications allowed for the application type. Must be between zero + and 100. + :vartype value: int + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + } + + def __init__( + self, + *, + key: str, + value: int, + **kwargs + ): + """ + :keyword key: Required. The key of the application type health policy map item. This is the + name of the application type. + :paramtype key: str + :keyword value: Required. The value of the application type health policy map item. + The max percent unhealthy applications allowed for the application type. Must be between zero + and 100. + :paramtype value: int + """ + super(ApplicationTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = key + self.value = value + + +class ApplicationTypeImageStorePath(msrest.serialization.Model): + """Path description for the application package in the image store specified during the prior copy operation. + + All required parameters must be populated in order to send to Azure. + + :ivar application_type_build_path: Required. The relative image store path to the application + package. + :vartype application_type_build_path: str + """ + + _validation = { + 'application_type_build_path': {'required': True}, + } + + _attribute_map = { + 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, + } + + def __init__( + self, + *, + application_type_build_path: str, + **kwargs + ): + """ + :keyword application_type_build_path: Required. The relative image store path to the + application package. + :paramtype application_type_build_path: str + """ + super(ApplicationTypeImageStorePath, self).__init__(**kwargs) + self.application_type_build_path = application_type_build_path + + +class ApplicationTypeInfo(msrest.serialization.Model): + """Information about an application type. + + :ivar name: The application type name as defined in the application manifest. + :vartype name: str + :ivar version: The version of the application type as defined in the application manifest. + :vartype version: str + :ivar default_parameter_list: List of application type parameters that can be overridden when + creating or updating the application. + :vartype default_parameter_list: list[~azure.servicefabric.models.ApplicationParameter] + :ivar status: The status of the application type. Possible values include: "Invalid", + "Provisioning", "Available", "Unprovisioning", "Failed". + :vartype status: str or ~azure.servicefabric.models.ApplicationTypeStatus + :ivar status_details: Additional detailed information about the status of the application type. + :vartype status_details: str + :ivar application_type_definition_kind: The mechanism used to define a Service Fabric + application type. Possible values include: "Invalid", "ServiceFabricApplicationPackage", + "Compose". + :vartype application_type_definition_kind: str or + ~azure.servicefabric.models.ApplicationTypeDefinitionKind + :ivar application_type_metadata: Metadata associated with a specific application type. + :vartype application_type_metadata: ~azure.servicefabric.models.ApplicationTypeMetadata + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'default_parameter_list': {'key': 'DefaultParameterList', 'type': '[ApplicationParameter]'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + 'application_type_definition_kind': {'key': 'ApplicationTypeDefinitionKind', 'type': 'str'}, + 'application_type_metadata': {'key': 'ApplicationTypeMetadata', 'type': 'ApplicationTypeMetadata'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + version: Optional[str] = None, + default_parameter_list: Optional[List["ApplicationParameter"]] = None, + status: Optional[Union[str, "ApplicationTypeStatus"]] = None, + status_details: Optional[str] = None, + application_type_definition_kind: Optional[Union[str, "ApplicationTypeDefinitionKind"]] = None, + application_type_metadata: Optional["ApplicationTypeMetadata"] = None, + **kwargs + ): + """ + :keyword name: The application type name as defined in the application manifest. + :paramtype name: str + :keyword version: The version of the application type as defined in the application manifest. + :paramtype version: str + :keyword default_parameter_list: List of application type parameters that can be overridden + when creating or updating the application. + :paramtype default_parameter_list: list[~azure.servicefabric.models.ApplicationParameter] + :keyword status: The status of the application type. Possible values include: "Invalid", + "Provisioning", "Available", "Unprovisioning", "Failed". + :paramtype status: str or ~azure.servicefabric.models.ApplicationTypeStatus + :keyword status_details: Additional detailed information about the status of the application + type. + :paramtype status_details: str + :keyword application_type_definition_kind: The mechanism used to define a Service Fabric + application type. Possible values include: "Invalid", "ServiceFabricApplicationPackage", + "Compose". + :paramtype application_type_definition_kind: str or + ~azure.servicefabric.models.ApplicationTypeDefinitionKind + :keyword application_type_metadata: Metadata associated with a specific application type. + :paramtype application_type_metadata: ~azure.servicefabric.models.ApplicationTypeMetadata + """ + super(ApplicationTypeInfo, self).__init__(**kwargs) + self.name = name + self.version = version + self.default_parameter_list = default_parameter_list + self.status = status + self.status_details = status_details + self.application_type_definition_kind = application_type_definition_kind + self.application_type_metadata = application_type_metadata + + +class ApplicationTypeManifest(msrest.serialization.Model): + """Contains the manifest describing an application type registered in a Service Fabric cluster. + + :ivar manifest: The XML manifest as a string. + :vartype manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__( + self, + *, + manifest: Optional[str] = None, + **kwargs + ): + """ + :keyword manifest: The XML manifest as a string. + :paramtype manifest: str + """ + super(ApplicationTypeManifest, self).__init__(**kwargs) + self.manifest = manifest + + +class ApplicationTypeMetadata(msrest.serialization.Model): + """Metadata associated with a specific application type. + + :ivar application_type_provision_timestamp: The timestamp when the application type was + provisioned. + :vartype application_type_provision_timestamp: str + :ivar arm_metadata: Common ArmMetadata assocaited with Service Fabric Entities. + :vartype arm_metadata: ~azure.servicefabric.models.ArmMetadata + """ + + _attribute_map = { + 'application_type_provision_timestamp': {'key': 'ApplicationTypeProvisionTimestamp', 'type': 'str'}, + 'arm_metadata': {'key': 'ArmMetadata', 'type': 'ArmMetadata'}, + } + + def __init__( + self, + *, + application_type_provision_timestamp: Optional[str] = None, + arm_metadata: Optional["ArmMetadata"] = None, + **kwargs + ): + """ + :keyword application_type_provision_timestamp: The timestamp when the application type was + provisioned. + :paramtype application_type_provision_timestamp: str + :keyword arm_metadata: Common ArmMetadata assocaited with Service Fabric Entities. + :paramtype arm_metadata: ~azure.servicefabric.models.ArmMetadata + """ + super(ApplicationTypeMetadata, self).__init__(**kwargs) + self.application_type_provision_timestamp = application_type_provision_timestamp + self.arm_metadata = arm_metadata + + +class ApplicationUpdateDescription(msrest.serialization.Model): + """Describes the parameters for updating an application instance. + + :ivar flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + If flags are not specified for a certain property, the property will not be updated even if + the new value is provided. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + Exception is RemoveApplicationCapacity which cannot be specified along with other parameters. + For example, if the provided value is 3 then the flags for MinimumNodes (1) and MaximumNodes + (2) are set. + + + * None - Does not indicate any other properties are set. The value is 0. + * MinimumNodes - Indicates whether the MinimumNodes property is set. The value is 1. + * MaximumNodes - Indicates whether the MinimumNodes property is set. The value is 2. + * ApplicationMetrics - Indicates whether the ApplicationMetrics property is set. The value is + 4. + :vartype flags: str + :ivar remove_application_capacity: Used to clear all parameters related to Application Capacity + for this application. | + It is not possible to specify this parameter together with other Application Capacity + parameters. + :vartype remove_application_capacity: bool + :ivar minimum_nodes: The minimum number of nodes where Service Fabric will reserve capacity for + this application. Note that this does not mean that the services of this application will be + placed on all of those nodes. If this property is set to zero, no capacity will be reserved. + The value of this property cannot be more than the value of the MaximumNodes property. + :vartype minimum_nodes: long + :ivar maximum_nodes: The maximum number of nodes where Service Fabric will reserve capacity for + this application. Note that this does not mean that the services of this application will be + placed on all of those nodes. By default, the value of this property is zero and it means that + the services can be placed on any node. + :vartype maximum_nodes: long + :ivar application_metrics: List of application capacity metric description. + :vartype application_metrics: list[~azure.servicefabric.models.ApplicationMetricDescription] + """ + + _validation = { + 'minimum_nodes': {'minimum': 0}, + 'maximum_nodes': {'minimum': 0}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'remove_application_capacity': {'key': 'RemoveApplicationCapacity', 'type': 'bool'}, + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, + } + + def __init__( + self, + *, + flags: Optional[str] = None, + remove_application_capacity: Optional[bool] = False, + minimum_nodes: Optional[int] = None, + maximum_nodes: Optional[int] = 0, + application_metrics: Optional[List["ApplicationMetricDescription"]] = None, + **kwargs + ): + """ + :keyword flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + If flags are not specified for a certain property, the property will not be updated even if + the new value is provided. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + Exception is RemoveApplicationCapacity which cannot be specified along with other parameters. + For example, if the provided value is 3 then the flags for MinimumNodes (1) and MaximumNodes + (2) are set. + + + * None - Does not indicate any other properties are set. The value is 0. + * MinimumNodes - Indicates whether the MinimumNodes property is set. The value is 1. + * MaximumNodes - Indicates whether the MinimumNodes property is set. The value is 2. + * ApplicationMetrics - Indicates whether the ApplicationMetrics property is set. The value is + 4. + :paramtype flags: str + :keyword remove_application_capacity: Used to clear all parameters related to Application + Capacity for this application. | + It is not possible to specify this parameter together with other Application Capacity + parameters. + :paramtype remove_application_capacity: bool + :keyword minimum_nodes: The minimum number of nodes where Service Fabric will reserve capacity + for this application. Note that this does not mean that the services of this application will + be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. + The value of this property cannot be more than the value of the MaximumNodes property. + :paramtype minimum_nodes: long + :keyword maximum_nodes: The maximum number of nodes where Service Fabric will reserve capacity + for this application. Note that this does not mean that the services of this application will + be placed on all of those nodes. By default, the value of this property is zero and it means + that the services can be placed on any node. + :paramtype maximum_nodes: long + :keyword application_metrics: List of application capacity metric description. + :paramtype application_metrics: list[~azure.servicefabric.models.ApplicationMetricDescription] + """ + super(ApplicationUpdateDescription, self).__init__(**kwargs) + self.flags = flags + self.remove_application_capacity = remove_application_capacity + self.minimum_nodes = minimum_nodes + self.maximum_nodes = maximum_nodes + self.application_metrics = application_metrics + + +class ApplicationUpgradeCompletedEvent(ApplicationEvent): + """Application Upgrade Completed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar application_type_version: Required. Application type version. + :vartype application_type_version: str + :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. + :vartype overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + application_id: str, + application_type_name: str, + application_type_version: str, + overall_upgrade_elapsed_time_in_ms: float, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword application_type_version: Required. Application type version. + :paramtype application_type_version: str + :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. + :paramtype overall_upgrade_elapsed_time_in_ms: float + """ + super(ApplicationUpgradeCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.kind = 'ApplicationUpgradeCompleted' # type: str + self.application_type_name = application_type_name + self.application_type_version = application_type_version + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + + +class ApplicationUpgradeDescription(msrest.serialization.Model): + """Describes the parameters for an application upgrade. Note that upgrade description replaces the existing application description. This means that if the parameters are not specified, the existing parameters on the applications will be overwritten with the empty parameters list. This would result in the application using the default value of the parameters from the application manifest. If you do not want to change any existing parameter values, please get the application parameters first using the GetApplicationInfo query and then supply those values as Parameters in this ApplicationUpgradeDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the target application, including the 'fabric:' URI scheme. + :vartype name: str + :ivar target_application_type_version: Required. The target application type version (found in + the application manifest) for the application upgrade. + :vartype target_application_type_version: str + :ivar parameters: List of application parameters with overridden values from their default + values specified in the application manifest. + :vartype parameters: list[~azure.servicefabric.models.ApplicationParameter] + :ivar upgrade_kind: Required. The kind of upgrade out of the following possible values. + Possible values include: "Invalid", "Rolling". Default value: "Rolling". + :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :vartype upgrade_replica_set_check_timeout_in_seconds: long + :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when + the code version has not changed (the upgrade only changes configuration or data). + :vartype force_restart: bool + :ivar sort_order: Defines the order in which an upgrade proceeds through the cluster. Possible + values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + :vartype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. + :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :ivar application_health_policy: Defines a health policy used to evaluate the health of an + application or one of its children entities. + :vartype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :ivar instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster + upgrade, only for those instances which have a non-zero delay duration configured in the + service description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates + that the behavior will entirely depend on the delay configured in the stateless service + description. + :vartype instance_close_delay_duration_in_seconds: long + :ivar managed_application_identity: Managed application identity description. + :vartype managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + + _validation = { + 'name': {'required': True}, + 'target_application_type_version': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + } + + def __init__( + self, + *, + name: str, + target_application_type_version: str, + upgrade_kind: Union[str, "UpgradeKind"] = "Rolling", + parameters: Optional[List["ApplicationParameter"]] = None, + rolling_upgrade_mode: Optional[Union[str, "UpgradeMode"]] = "UnmonitoredAuto", + upgrade_replica_set_check_timeout_in_seconds: Optional[int] = 42949672925, + force_restart: Optional[bool] = False, + sort_order: Optional[Union[str, "UpgradeSortOrder"]] = "Default", + monitoring_policy: Optional["MonitoringPolicyDescription"] = None, + application_health_policy: Optional["ApplicationHealthPolicy"] = None, + instance_close_delay_duration_in_seconds: Optional[int] = 4294967295, + managed_application_identity: Optional["ManagedApplicationIdentityDescription"] = None, + **kwargs + ): + """ + :keyword name: Required. The name of the target application, including the 'fabric:' URI + scheme. + :paramtype name: str + :keyword target_application_type_version: Required. The target application type version (found + in the application manifest) for the application upgrade. + :paramtype target_application_type_version: str + :keyword parameters: List of application parameters with overridden values from their default + values specified in the application manifest. + :paramtype parameters: list[~azure.servicefabric.models.ApplicationParameter] + :keyword upgrade_kind: Required. The kind of upgrade out of the following possible values. + Possible values include: "Invalid", "Rolling". Default value: "Rolling". + :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :paramtype upgrade_replica_set_check_timeout_in_seconds: long + :keyword force_restart: If true, then processes are forcefully restarted during upgrade even + when the code version has not changed (the upgrade only changes configuration or data). + :paramtype force_restart: bool + :keyword sort_order: Defines the order in which an upgrade proceeds through the cluster. + Possible values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + :paramtype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored + mode. + :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :keyword application_health_policy: Defines a health policy used to evaluate the health of an + application or one of its children entities. + :paramtype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a + stateless instance is closed, to allow the active requests to drain gracefully. This would be + effective when the instance is closing during the application/cluster + upgrade, only for those instances which have a non-zero delay duration configured in the + service description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates + that the behavior will entirely depend on the delay configured in the stateless service + description. + :paramtype instance_close_delay_duration_in_seconds: long + :keyword managed_application_identity: Managed application identity description. + :paramtype managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + super(ApplicationUpgradeDescription, self).__init__(**kwargs) + self.name = name + self.target_application_type_version = target_application_type_version + self.parameters = parameters + self.upgrade_kind = upgrade_kind + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.force_restart = force_restart + self.sort_order = sort_order + self.monitoring_policy = monitoring_policy + self.application_health_policy = application_health_policy + self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds + self.managed_application_identity = managed_application_identity + + +class ApplicationUpgradeDomainCompletedEvent(ApplicationEvent): + """Application Upgrade Domain Completed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar current_application_type_version: Required. Current Application type version. + :vartype current_application_type_version: str + :ivar application_type_version: Required. Target Application type version. + :vartype application_type_version: str + :ivar upgrade_state: Required. State of upgrade. + :vartype upgrade_state: str + :ivar upgrade_domains: Required. Upgrade domains. + :vartype upgrade_domains: str + :ivar upgrade_domain_elapsed_time_in_ms: Required. Upgrade time of domain in milli-seconds. + :vartype upgrade_domain_elapsed_time_in_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'upgrade_state': {'required': True}, + 'upgrade_domains': {'required': True}, + 'upgrade_domain_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, + 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + application_id: str, + application_type_name: str, + current_application_type_version: str, + application_type_version: str, + upgrade_state: str, + upgrade_domains: str, + upgrade_domain_elapsed_time_in_ms: float, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword current_application_type_version: Required. Current Application type version. + :paramtype current_application_type_version: str + :keyword application_type_version: Required. Target Application type version. + :paramtype application_type_version: str + :keyword upgrade_state: Required. State of upgrade. + :paramtype upgrade_state: str + :keyword upgrade_domains: Required. Upgrade domains. + :paramtype upgrade_domains: str + :keyword upgrade_domain_elapsed_time_in_ms: Required. Upgrade time of domain in milli-seconds. + :paramtype upgrade_domain_elapsed_time_in_ms: float + """ + super(ApplicationUpgradeDomainCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.kind = 'ApplicationUpgradeDomainCompleted' # type: str + self.application_type_name = application_type_name + self.current_application_type_version = current_application_type_version + self.application_type_version = application_type_version + self.upgrade_state = upgrade_state + self.upgrade_domains = upgrade_domains + self.upgrade_domain_elapsed_time_in_ms = upgrade_domain_elapsed_time_in_ms + + +class ApplicationUpgradeProgressInfo(msrest.serialization.Model): + """Describes the parameters for an application upgrade. + + :ivar name: The name of the target application, including the 'fabric:' URI scheme. + :vartype name: str + :ivar type_name: The application type name as defined in the application manifest. + :vartype type_name: str + :ivar target_application_type_version: The target application type version (found in the + application manifest) for the application upgrade. + :vartype target_application_type_version: str + :ivar upgrade_domains: List of upgrade domains and their statuses. Not applicable to + node-by-node upgrades. + :vartype upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] + :ivar upgrade_units: List of upgrade units and their statuses. + :vartype upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] + :ivar upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", + "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", + "RollingForwardInProgress", "RollingForwardCompleted", "Failed". + :vartype upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :ivar next_upgrade_domain: The name of the next upgrade domain to be processed. Not applicable + to node-by-node upgrades. + :vartype next_upgrade_domain: str + :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :ivar upgrade_description: Describes the parameters for an application upgrade. Note that + upgrade description replaces the existing application description. This means that if the + parameters are not specified, the existing parameters on the applications will be overwritten + with the empty parameters list. This would result in the application using the default value of + the parameters from the application manifest. If you do not want to change any existing + parameter values, please get the application parameters first using the GetApplicationInfo + query and then supply those values as Parameters in this ApplicationUpgradeDescription. + :vartype upgrade_description: ~azure.servicefabric.models.ApplicationUpgradeDescription + :ivar upgrade_duration_in_milliseconds: The estimated total amount of time spent processing the + overall upgrade. + :vartype upgrade_duration_in_milliseconds: str + :ivar upgrade_domain_duration_in_milliseconds: The estimated total amount of time spent + processing the current upgrade domain. + :vartype upgrade_domain_duration_in_milliseconds: str + :ivar unhealthy_evaluations: List of health evaluations that resulted in the current aggregated + health state. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar current_upgrade_domain_progress: Information about the current in-progress upgrade + domain. Not applicable to node-by-node upgrades. + :vartype current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :ivar current_upgrade_units_progress: Information about the current in-progress upgrade units. + :vartype current_upgrade_units_progress: + ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo + :ivar start_timestamp_utc: The estimated UTC datetime when the upgrade started. + :vartype start_timestamp_utc: str + :ivar failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and + FailureAction was executed. + :vartype failure_timestamp_utc: str + :ivar failure_reason: The cause of an upgrade failure that resulted in FailureAction being + executed. Possible values include: "None", "Interrupted", "HealthCheck", + "UpgradeDomainTimeout", "OverallUpgradeTimeout". + :vartype failure_reason: str or ~azure.servicefabric.models.FailureReason + :ivar upgrade_domain_progress_at_failure: Information about the upgrade domain progress at the + time of upgrade failure. + :vartype upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo + :ivar upgrade_status_details: Additional detailed information about the status of the pending + upgrade. + :vartype upgrade_status_details: str + :ivar is_node_by_node: Indicates whether this upgrade is node-by-node. + :vartype is_node_by_node: bool + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, + 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ApplicationUpgradeDescription'}, + 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, + 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, + 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, + 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + type_name: Optional[str] = None, + target_application_type_version: Optional[str] = None, + upgrade_domains: Optional[List["UpgradeDomainInfo"]] = None, + upgrade_units: Optional[List["UpgradeUnitInfo"]] = None, + upgrade_state: Optional[Union[str, "UpgradeState"]] = None, + next_upgrade_domain: Optional[str] = None, + rolling_upgrade_mode: Optional[Union[str, "UpgradeMode"]] = "UnmonitoredAuto", + upgrade_description: Optional["ApplicationUpgradeDescription"] = None, + upgrade_duration_in_milliseconds: Optional[str] = None, + upgrade_domain_duration_in_milliseconds: Optional[str] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + current_upgrade_domain_progress: Optional["CurrentUpgradeDomainProgressInfo"] = None, + current_upgrade_units_progress: Optional["CurrentUpgradeUnitsProgressInfo"] = None, + start_timestamp_utc: Optional[str] = None, + failure_timestamp_utc: Optional[str] = None, + failure_reason: Optional[Union[str, "FailureReason"]] = None, + upgrade_domain_progress_at_failure: Optional["FailureUpgradeDomainProgressInfo"] = None, + upgrade_status_details: Optional[str] = None, + is_node_by_node: Optional[bool] = False, + **kwargs + ): + """ + :keyword name: The name of the target application, including the 'fabric:' URI scheme. + :paramtype name: str + :keyword type_name: The application type name as defined in the application manifest. + :paramtype type_name: str + :keyword target_application_type_version: The target application type version (found in the + application manifest) for the application upgrade. + :paramtype target_application_type_version: str + :keyword upgrade_domains: List of upgrade domains and their statuses. Not applicable to + node-by-node upgrades. + :paramtype upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] + :keyword upgrade_units: List of upgrade units and their statuses. + :paramtype upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] + :keyword upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", + "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", + "RollingForwardInProgress", "RollingForwardCompleted", "Failed". + :paramtype upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :keyword next_upgrade_domain: The name of the next upgrade domain to be processed. Not + applicable to node-by-node upgrades. + :paramtype next_upgrade_domain: str + :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :keyword upgrade_description: Describes the parameters for an application upgrade. Note that + upgrade description replaces the existing application description. This means that if the + parameters are not specified, the existing parameters on the applications will be overwritten + with the empty parameters list. This would result in the application using the default value of + the parameters from the application manifest. If you do not want to change any existing + parameter values, please get the application parameters first using the GetApplicationInfo + query and then supply those values as Parameters in this ApplicationUpgradeDescription. + :paramtype upgrade_description: ~azure.servicefabric.models.ApplicationUpgradeDescription + :keyword upgrade_duration_in_milliseconds: The estimated total amount of time spent processing + the overall upgrade. + :paramtype upgrade_duration_in_milliseconds: str + :keyword upgrade_domain_duration_in_milliseconds: The estimated total amount of time spent + processing the current upgrade domain. + :paramtype upgrade_domain_duration_in_milliseconds: str + :keyword unhealthy_evaluations: List of health evaluations that resulted in the current + aggregated health state. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword current_upgrade_domain_progress: Information about the current in-progress upgrade + domain. Not applicable to node-by-node upgrades. + :paramtype current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :keyword current_upgrade_units_progress: Information about the current in-progress upgrade + units. + :paramtype current_upgrade_units_progress: + ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo + :keyword start_timestamp_utc: The estimated UTC datetime when the upgrade started. + :paramtype start_timestamp_utc: str + :keyword failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and + FailureAction was executed. + :paramtype failure_timestamp_utc: str + :keyword failure_reason: The cause of an upgrade failure that resulted in FailureAction being + executed. Possible values include: "None", "Interrupted", "HealthCheck", + "UpgradeDomainTimeout", "OverallUpgradeTimeout". + :paramtype failure_reason: str or ~azure.servicefabric.models.FailureReason + :keyword upgrade_domain_progress_at_failure: Information about the upgrade domain progress at + the time of upgrade failure. + :paramtype upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo + :keyword upgrade_status_details: Additional detailed information about the status of the + pending upgrade. + :paramtype upgrade_status_details: str + :keyword is_node_by_node: Indicates whether this upgrade is node-by-node. + :paramtype is_node_by_node: bool + """ + super(ApplicationUpgradeProgressInfo, self).__init__(**kwargs) + self.name = name + self.type_name = type_name + self.target_application_type_version = target_application_type_version + self.upgrade_domains = upgrade_domains + self.upgrade_units = upgrade_units + self.upgrade_state = upgrade_state + self.next_upgrade_domain = next_upgrade_domain + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_description = upgrade_description + self.upgrade_duration_in_milliseconds = upgrade_duration_in_milliseconds + self.upgrade_domain_duration_in_milliseconds = upgrade_domain_duration_in_milliseconds + self.unhealthy_evaluations = unhealthy_evaluations + self.current_upgrade_domain_progress = current_upgrade_domain_progress + self.current_upgrade_units_progress = current_upgrade_units_progress + self.start_timestamp_utc = start_timestamp_utc + self.failure_timestamp_utc = failure_timestamp_utc + self.failure_reason = failure_reason + self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure + self.upgrade_status_details = upgrade_status_details + self.is_node_by_node = is_node_by_node + + +class ApplicationUpgradeRollbackCompletedEvent(ApplicationEvent): + """Application Upgrade Rollback Completed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar application_type_version: Required. Application type version. + :vartype application_type_version: str + :ivar failure_reason: Required. Describes reason of failure. + :vartype failure_reason: str + :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. + :vartype overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + application_id: str, + application_type_name: str, + application_type_version: str, + failure_reason: str, + overall_upgrade_elapsed_time_in_ms: float, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword application_type_version: Required. Application type version. + :paramtype application_type_version: str + :keyword failure_reason: Required. Describes reason of failure. + :paramtype failure_reason: str + :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. + :paramtype overall_upgrade_elapsed_time_in_ms: float + """ + super(ApplicationUpgradeRollbackCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.kind = 'ApplicationUpgradeRollbackCompleted' # type: str + self.application_type_name = application_type_name + self.application_type_version = application_type_version + self.failure_reason = failure_reason + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + + +class ApplicationUpgradeRollbackStartedEvent(ApplicationEvent): + """Application Upgrade Rollback Started event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar current_application_type_version: Required. Current Application type version. + :vartype current_application_type_version: str + :ivar application_type_version: Required. Target Application type version. + :vartype application_type_version: str + :ivar failure_reason: Required. Describes reason of failure. + :vartype failure_reason: str + :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. + :vartype overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + application_id: str, + application_type_name: str, + current_application_type_version: str, + application_type_version: str, + failure_reason: str, + overall_upgrade_elapsed_time_in_ms: float, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword current_application_type_version: Required. Current Application type version. + :paramtype current_application_type_version: str + :keyword application_type_version: Required. Target Application type version. + :paramtype application_type_version: str + :keyword failure_reason: Required. Describes reason of failure. + :paramtype failure_reason: str + :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. + :paramtype overall_upgrade_elapsed_time_in_ms: float + """ + super(ApplicationUpgradeRollbackStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.kind = 'ApplicationUpgradeRollbackStarted' # type: str + self.application_type_name = application_type_name + self.current_application_type_version = current_application_type_version + self.application_type_version = application_type_version + self.failure_reason = failure_reason + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + + +class ApplicationUpgradeStartedEvent(ApplicationEvent): + """Application Upgrade Started event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar current_application_type_version: Required. Current Application type version. + :vartype current_application_type_version: str + :ivar application_type_version: Required. Target Application type version. + :vartype application_type_version: str + :ivar upgrade_type: Required. Type of upgrade. + :vartype upgrade_type: str + :ivar rolling_upgrade_mode: Required. Mode of upgrade. + :vartype rolling_upgrade_mode: str + :ivar failure_action: Required. Action if failed. + :vartype failure_action: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'upgrade_type': {'required': True}, + 'rolling_upgrade_mode': {'required': True}, + 'failure_action': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + application_id: str, + application_type_name: str, + current_application_type_version: str, + application_type_version: str, + upgrade_type: str, + rolling_upgrade_mode: str, + failure_action: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword current_application_type_version: Required. Current Application type version. + :paramtype current_application_type_version: str + :keyword application_type_version: Required. Target Application type version. + :paramtype application_type_version: str + :keyword upgrade_type: Required. Type of upgrade. + :paramtype upgrade_type: str + :keyword rolling_upgrade_mode: Required. Mode of upgrade. + :paramtype rolling_upgrade_mode: str + :keyword failure_action: Required. Action if failed. + :paramtype failure_action: str + """ + super(ApplicationUpgradeStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.kind = 'ApplicationUpgradeStarted' # type: str + self.application_type_name = application_type_name + self.current_application_type_version = current_application_type_version + self.application_type_version = application_type_version + self.upgrade_type = upgrade_type + self.rolling_upgrade_mode = rolling_upgrade_mode + self.failure_action = failure_action + + +class ApplicationUpgradeUpdateDescription(msrest.serialization.Model): + """Describes the parameters for updating an ongoing application upgrade. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the application, including the 'fabric:' URI scheme. + :vartype name: str + :ivar upgrade_kind: Required. The kind of upgrade out of the following possible values. + Possible values include: "Invalid", "Rolling". Default value: "Rolling". + :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :ivar application_health_policy: Defines a health policy used to evaluate the health of an + application or one of its children entities. + :vartype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :ivar update_description: Describes the parameters for updating a rolling upgrade of + application or cluster. + :vartype update_description: ~azure.servicefabric.models.RollingUpgradeUpdateDescription + """ + + _validation = { + 'name': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, + } + + def __init__( + self, + *, + name: str, + upgrade_kind: Union[str, "UpgradeKind"] = "Rolling", + application_health_policy: Optional["ApplicationHealthPolicy"] = None, + update_description: Optional["RollingUpgradeUpdateDescription"] = None, + **kwargs + ): + """ + :keyword name: Required. The name of the application, including the 'fabric:' URI scheme. + :paramtype name: str + :keyword upgrade_kind: Required. The kind of upgrade out of the following possible values. + Possible values include: "Invalid", "Rolling". Default value: "Rolling". + :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :keyword application_health_policy: Defines a health policy used to evaluate the health of an + application or one of its children entities. + :paramtype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword update_description: Describes the parameters for updating a rolling upgrade of + application or cluster. + :paramtype update_description: ~azure.servicefabric.models.RollingUpgradeUpdateDescription + """ + super(ApplicationUpgradeUpdateDescription, self).__init__(**kwargs) + self.name = name + self.upgrade_kind = upgrade_kind + self.application_health_policy = application_health_policy + self.update_description = update_description + + +class ArmMetadata(msrest.serialization.Model): + """Common ArmMetadata assocaited with Service Fabric Entities. + + :ivar arm_resource_id: A string containing the ArmResourceId. + :vartype arm_resource_id: str + """ + + _attribute_map = { + 'arm_resource_id': {'key': 'ArmResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + arm_resource_id: Optional[str] = None, + **kwargs + ): + """ + :keyword arm_resource_id: A string containing the ArmResourceId. + :paramtype arm_resource_id: str + """ + super(ArmMetadata, self).__init__(**kwargs) + self.arm_resource_id = arm_resource_id + + +class AutoScalingMetric(msrest.serialization.Model): + """Describes the metric that is used for triggering auto scaling operation. Derived classes will describe resources or metrics. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AutoScalingResourceMetric. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of auto scaling metric.Constant filled by server. Possible + values include: "Resource". + :vartype kind: str or ~azure.servicefabric.models.AutoScalingMetricKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Resource': 'AutoScalingResourceMetric'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AutoScalingMetric, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class AutoScalingPolicy(msrest.serialization.Model): + """Describes the auto scaling policy. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the auto scaling policy. + :vartype name: str + :ivar trigger: Required. Determines when auto scaling operation will be invoked. + :vartype trigger: ~azure.servicefabric.models.AutoScalingTrigger + :ivar mechanism: Required. The mechanism that is used to scale when auto scaling operation is + invoked. + :vartype mechanism: ~azure.servicefabric.models.AutoScalingMechanism + """ + + _validation = { + 'name': {'required': True}, + 'trigger': {'required': True}, + 'mechanism': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'trigger': {'key': 'trigger', 'type': 'AutoScalingTrigger'}, + 'mechanism': {'key': 'mechanism', 'type': 'AutoScalingMechanism'}, + } + + def __init__( + self, + *, + name: str, + trigger: "AutoScalingTrigger", + mechanism: "AutoScalingMechanism", + **kwargs + ): + """ + :keyword name: Required. The name of the auto scaling policy. + :paramtype name: str + :keyword trigger: Required. Determines when auto scaling operation will be invoked. + :paramtype trigger: ~azure.servicefabric.models.AutoScalingTrigger + :keyword mechanism: Required. The mechanism that is used to scale when auto scaling operation + is invoked. + :paramtype mechanism: ~azure.servicefabric.models.AutoScalingMechanism + """ + super(AutoScalingPolicy, self).__init__(**kwargs) + self.name = name + self.trigger = trigger + self.mechanism = mechanism + + +class AutoScalingResourceMetric(AutoScalingMetric): + """Describes the resource that is used for triggering auto scaling. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of auto scaling metric.Constant filled by server. Possible + values include: "Resource". + :vartype kind: str or ~azure.servicefabric.models.AutoScalingMetricKind + :ivar name: Required. Name of the resource. Possible values include: "cpu", "memoryInGB". + :vartype name: str or ~azure.servicefabric.models.AutoScalingResourceMetricName + """ + + _validation = { + 'kind': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Union[str, "AutoScalingResourceMetricName"], + **kwargs + ): + """ + :keyword name: Required. Name of the resource. Possible values include: "cpu", "memoryInGB". + :paramtype name: str or ~azure.servicefabric.models.AutoScalingResourceMetricName + """ + super(AutoScalingResourceMetric, self).__init__(**kwargs) + self.kind = 'Resource' # type: str + self.name = name + + +class AutoScalingTrigger(msrest.serialization.Model): + """Describes the trigger for performing auto scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AverageLoadScalingTrigger. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of auto scaling trigger.Constant filled by server. Possible + values include: "AverageLoad". + :vartype kind: str or ~azure.servicefabric.models.AutoScalingTriggerKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AverageLoad': 'AverageLoadScalingTrigger'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AutoScalingTrigger, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class AverageLoadScalingTrigger(AutoScalingTrigger): + """Describes the average load trigger used for auto scaling. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of auto scaling trigger.Constant filled by server. Possible + values include: "AverageLoad". + :vartype kind: str or ~azure.servicefabric.models.AutoScalingTriggerKind + :ivar metric: Required. Description of the metric that is used for scaling. + :vartype metric: ~azure.servicefabric.models.AutoScalingMetric + :ivar lower_load_threshold: Required. Lower load threshold (if average load is below this + threshold, service will scale down). + :vartype lower_load_threshold: float + :ivar upper_load_threshold: Required. Upper load threshold (if average load is above this + threshold, service will scale up). + :vartype upper_load_threshold: float + :ivar scale_interval_in_seconds: Required. Scale interval that indicates how often will this + trigger be checked. + :vartype scale_interval_in_seconds: int + """ + + _validation = { + 'kind': {'required': True}, + 'metric': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'minimum': 60}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'metric': {'key': 'metric', 'type': 'AutoScalingMetric'}, + 'lower_load_threshold': {'key': 'lowerLoadThreshold', 'type': 'float'}, + 'upper_load_threshold': {'key': 'upperLoadThreshold', 'type': 'float'}, + 'scale_interval_in_seconds': {'key': 'scaleIntervalInSeconds', 'type': 'int'}, + } + + def __init__( + self, + *, + metric: "AutoScalingMetric", + lower_load_threshold: float, + upper_load_threshold: float, + scale_interval_in_seconds: int, + **kwargs + ): + """ + :keyword metric: Required. Description of the metric that is used for scaling. + :paramtype metric: ~azure.servicefabric.models.AutoScalingMetric + :keyword lower_load_threshold: Required. Lower load threshold (if average load is below this + threshold, service will scale down). + :paramtype lower_load_threshold: float + :keyword upper_load_threshold: Required. Upper load threshold (if average load is above this + threshold, service will scale up). + :paramtype upper_load_threshold: float + :keyword scale_interval_in_seconds: Required. Scale interval that indicates how often will this + trigger be checked. + :paramtype scale_interval_in_seconds: int + """ + super(AverageLoadScalingTrigger, self).__init__(**kwargs) + self.kind = 'AverageLoad' # type: str + self.metric = metric + self.lower_load_threshold = lower_load_threshold + self.upper_load_threshold = upper_load_threshold + self.scale_interval_in_seconds = scale_interval_in_seconds + + +class ScalingTriggerDescription(msrest.serialization.Model): + """Describes the trigger for performing a scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AveragePartitionLoadScalingTrigger, AverageServiceLoadScalingTrigger. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Specifies the kind of scaling trigger.Constant filled by server. Possible + values include: "Invalid", "AveragePartitionLoad", "AverageServiceLoad". + :vartype kind: str or ~azure.servicefabric.models.ScalingTriggerKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AveragePartitionLoad': 'AveragePartitionLoadScalingTrigger', 'AverageServiceLoad': 'AverageServiceLoadScalingTrigger'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ScalingTriggerDescription, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class AveragePartitionLoadScalingTrigger(ScalingTriggerDescription): + """Represents a scaling trigger related to an average load of a metric/resource of a partition. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Specifies the kind of scaling trigger.Constant filled by server. Possible + values include: "Invalid", "AveragePartitionLoad", "AverageServiceLoad". + :vartype kind: str or ~azure.servicefabric.models.ScalingTriggerKind + :ivar metric_name: Required. The name of the metric for which usage should be tracked. + :vartype metric_name: str + :ivar lower_load_threshold: Required. The lower limit of the load below which a scale in + operation should be performed. + :vartype lower_load_threshold: str + :ivar upper_load_threshold: Required. The upper limit of the load beyond which a scale out + operation should be performed. + :vartype upper_load_threshold: str + :ivar scale_interval_in_seconds: Required. The period in seconds on which a decision is made + whether to scale or not. + :vartype scale_interval_in_seconds: long + """ + + _validation = { + 'kind': {'required': True}, + 'metric_name': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, + 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, + 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, + } + + def __init__( + self, + *, + metric_name: str, + lower_load_threshold: str, + upper_load_threshold: str, + scale_interval_in_seconds: int, + **kwargs + ): + """ + :keyword metric_name: Required. The name of the metric for which usage should be tracked. + :paramtype metric_name: str + :keyword lower_load_threshold: Required. The lower limit of the load below which a scale in + operation should be performed. + :paramtype lower_load_threshold: str + :keyword upper_load_threshold: Required. The upper limit of the load beyond which a scale out + operation should be performed. + :paramtype upper_load_threshold: str + :keyword scale_interval_in_seconds: Required. The period in seconds on which a decision is made + whether to scale or not. + :paramtype scale_interval_in_seconds: long + """ + super(AveragePartitionLoadScalingTrigger, self).__init__(**kwargs) + self.kind = 'AveragePartitionLoad' # type: str + self.metric_name = metric_name + self.lower_load_threshold = lower_load_threshold + self.upper_load_threshold = upper_load_threshold + self.scale_interval_in_seconds = scale_interval_in_seconds + + +class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): + """Represents a scaling policy related to an average load of a metric/resource of a service. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Specifies the kind of scaling trigger.Constant filled by server. Possible + values include: "Invalid", "AveragePartitionLoad", "AverageServiceLoad". + :vartype kind: str or ~azure.servicefabric.models.ScalingTriggerKind + :ivar metric_name: Required. The name of the metric for which usage should be tracked. + :vartype metric_name: str + :ivar lower_load_threshold: Required. The lower limit of the load below which a scale in + operation should be performed. + :vartype lower_load_threshold: str + :ivar upper_load_threshold: Required. The upper limit of the load beyond which a scale out + operation should be performed. + :vartype upper_load_threshold: str + :ivar scale_interval_in_seconds: Required. The period in seconds on which a decision is made + whether to scale or not. + :vartype scale_interval_in_seconds: long + :ivar use_only_primary_load: Required. Flag determines whether only the load of primary replica + should be considered for scaling. + If set to true, then trigger will only consider the load of primary replicas of stateful + service. + If set to false, trigger will consider load of all replicas. + This parameter cannot be set to true for stateless service. + :vartype use_only_primary_load: bool + """ + + _validation = { + 'kind': {'required': True}, + 'metric_name': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, + 'use_only_primary_load': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, + 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, + 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, + 'use_only_primary_load': {'key': 'UseOnlyPrimaryLoad', 'type': 'bool'}, + } + + def __init__( + self, + *, + metric_name: str, + lower_load_threshold: str, + upper_load_threshold: str, + scale_interval_in_seconds: int, + use_only_primary_load: bool, + **kwargs + ): + """ + :keyword metric_name: Required. The name of the metric for which usage should be tracked. + :paramtype metric_name: str + :keyword lower_load_threshold: Required. The lower limit of the load below which a scale in + operation should be performed. + :paramtype lower_load_threshold: str + :keyword upper_load_threshold: Required. The upper limit of the load beyond which a scale out + operation should be performed. + :paramtype upper_load_threshold: str + :keyword scale_interval_in_seconds: Required. The period in seconds on which a decision is made + whether to scale or not. + :paramtype scale_interval_in_seconds: long + :keyword use_only_primary_load: Required. Flag determines whether only the load of primary + replica should be considered for scaling. + If set to true, then trigger will only consider the load of primary replicas of stateful + service. + If set to false, trigger will consider load of all replicas. + This parameter cannot be set to true for stateless service. + :paramtype use_only_primary_load: bool + """ + super(AverageServiceLoadScalingTrigger, self).__init__(**kwargs) + self.kind = 'AverageServiceLoad' # type: str + self.metric_name = metric_name + self.lower_load_threshold = lower_load_threshold + self.upper_load_threshold = upper_load_threshold + self.scale_interval_in_seconds = scale_interval_in_seconds + self.use_only_primary_load = use_only_primary_load + + +class BackupStorageDescription(msrest.serialization.Model): + """Describes the parameters for the backup storage. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBlobBackupStorageDescription, DsmsAzureBlobBackupStorageDescription, FileShareBackupStorageDescription, ManagedIdentityAzureBlobBackupStorageDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant + filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", + "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". + :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind + :ivar friendly_name: Friendly name for this backup storage. + :vartype friendly_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + } + + _attribute_map = { + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + } + + _subtype_map = { + 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'ManagedIdentityAzureBlobStore': 'ManagedIdentityAzureBlobBackupStorageDescription'} + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + **kwargs + ): + """ + :keyword friendly_name: Friendly name for this backup storage. + :paramtype friendly_name: str + """ + super(BackupStorageDescription, self).__init__(**kwargs) + self.storage_kind = None # type: Optional[str] + self.friendly_name = friendly_name + + +class AzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Azure blob store used for storing and enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant + filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", + "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". + :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind + :ivar friendly_name: Friendly name for this backup storage. + :vartype friendly_name: str + :ivar connection_string: Required. The connection string to connect to the Azure blob store. + :vartype connection_string: str + :ivar container_name: Required. The name of the container in the blob store to store and + enumerate backups from. + :vartype container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'connection_string': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'connection_string': {'key': 'ConnectionString', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__( + self, + *, + connection_string: str, + container_name: str, + friendly_name: Optional[str] = None, + **kwargs + ): + """ + :keyword friendly_name: Friendly name for this backup storage. + :paramtype friendly_name: str + :keyword connection_string: Required. The connection string to connect to the Azure blob store. + :paramtype connection_string: str + :keyword container_name: Required. The name of the container in the blob store to store and + enumerate backups from. + :paramtype container_name: str + """ + super(AzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) + self.storage_kind = 'AzureBlobStore' # type: str + self.connection_string = connection_string + self.container_name = container_name + + +class DiagnosticsSinkProperties(msrest.serialization.Model): + """Properties of a DiagnosticsSink. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureInternalMonitoringPipelineSinkDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of DiagnosticsSink.Constant filled by server. Possible values + include: "Invalid", "AzureInternalMonitoringPipeline". + :vartype kind: str or ~azure.servicefabric.models.DiagnosticsSinkKind + :ivar name: Name of the sink. This value is referenced by DiagnosticsReferenceDescription. + :vartype name: str + :ivar description: A description of the sink. + :vartype description: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AzureInternalMonitoringPipeline': 'AzureInternalMonitoringPipelineSinkDescription'} + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Name of the sink. This value is referenced by DiagnosticsReferenceDescription. + :paramtype name: str + :keyword description: A description of the sink. + :paramtype description: str + """ + super(DiagnosticsSinkProperties, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.name = name + self.description = description + + +class AzureInternalMonitoringPipelineSinkDescription(DiagnosticsSinkProperties): + """Diagnostics settings for Geneva. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of DiagnosticsSink.Constant filled by server. Possible values + include: "Invalid", "AzureInternalMonitoringPipeline". + :vartype kind: str or ~azure.servicefabric.models.DiagnosticsSinkKind + :ivar name: Name of the sink. This value is referenced by DiagnosticsReferenceDescription. + :vartype name: str + :ivar description: A description of the sink. + :vartype description: str + :ivar account_name: Azure Internal monitoring pipeline account. + :vartype account_name: str + :ivar namespace: Azure Internal monitoring pipeline account namespace. + :vartype namespace: str + :ivar ma_config_url: Azure Internal monitoring agent configuration. + :vartype ma_config_url: str + :ivar fluentd_config_url: Azure Internal monitoring agent fluentd configuration. + :vartype fluentd_config_url: str + :ivar auto_key_config_url: Azure Internal monitoring pipeline autokey associated with the + certificate. + :vartype auto_key_config_url: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'ma_config_url': {'key': 'maConfigUrl', 'type': 'str'}, + 'fluentd_config_url': {'key': 'fluentdConfigUrl', 'type': 'str'}, + 'auto_key_config_url': {'key': 'autoKeyConfigUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + account_name: Optional[str] = None, + namespace: Optional[str] = None, + ma_config_url: Optional[str] = None, + fluentd_config_url: Optional[str] = None, + auto_key_config_url: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Name of the sink. This value is referenced by DiagnosticsReferenceDescription. + :paramtype name: str + :keyword description: A description of the sink. + :paramtype description: str + :keyword account_name: Azure Internal monitoring pipeline account. + :paramtype account_name: str + :keyword namespace: Azure Internal monitoring pipeline account namespace. + :paramtype namespace: str + :keyword ma_config_url: Azure Internal monitoring agent configuration. + :paramtype ma_config_url: str + :keyword fluentd_config_url: Azure Internal monitoring agent fluentd configuration. + :paramtype fluentd_config_url: str + :keyword auto_key_config_url: Azure Internal monitoring pipeline autokey associated with the + certificate. + :paramtype auto_key_config_url: str + """ + super(AzureInternalMonitoringPipelineSinkDescription, self).__init__(name=name, description=description, **kwargs) + self.kind = 'AzureInternalMonitoringPipeline' # type: str + self.account_name = account_name + self.namespace = namespace + self.ma_config_url = ma_config_url + self.fluentd_config_url = fluentd_config_url + self.auto_key_config_url = auto_key_config_url + + +class BackupInfo(msrest.serialization.Model): + """Represents a backup point which can be used to trigger a restore. + + :ivar backup_id: Unique backup ID . + :vartype backup_id: str + :ivar backup_chain_id: Unique backup chain ID. All backups part of the same chain has the same + backup chain id. A backup chain is comprised of 1 full backup and multiple incremental backups. + :vartype backup_chain_id: str + :ivar application_name: Name of the Service Fabric application this partition backup belongs + to. + :vartype application_name: str + :ivar service_name: Name of the Service Fabric service this partition backup belongs to. + :vartype service_name: str + :ivar partition_information: Information about the partition to which this backup belongs to. + :vartype partition_information: ~azure.servicefabric.models.PartitionInformation + :ivar backup_location: Location of the backup, relative to the backup store. + :vartype backup_location: str + :ivar backup_type: Describes the type of backup, whether its full or incremental. Possible + values include: "Invalid", "Full", "Incremental". + :vartype backup_type: str or ~azure.servicefabric.models.BackupType + :ivar epoch_of_last_backup_record: Epoch of the last record in this backup. + :vartype epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch + :ivar lsn_of_last_backup_record: LSN of the last record in this backup. + :vartype lsn_of_last_backup_record: str + :ivar creation_time_utc: The date time when this backup was taken. + :vartype creation_time_utc: ~datetime.datetime + :ivar service_manifest_version: Manifest Version of the service this partition backup belongs + to. + :vartype service_manifest_version: str + :ivar failure_error: Denotes the failure encountered in getting backup point information. + :vartype failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_chain_id': {'key': 'BackupChainId', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'backup_type': {'key': 'BackupType', 'type': 'str'}, + 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, + 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, + 'creation_time_utc': {'key': 'CreationTimeUtc', 'type': 'iso-8601'}, + 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__( + self, + *, + backup_id: Optional[str] = None, + backup_chain_id: Optional[str] = None, + application_name: Optional[str] = None, + service_name: Optional[str] = None, + partition_information: Optional["PartitionInformation"] = None, + backup_location: Optional[str] = None, + backup_type: Optional[Union[str, "BackupType"]] = None, + epoch_of_last_backup_record: Optional["Epoch"] = None, + lsn_of_last_backup_record: Optional[str] = None, + creation_time_utc: Optional[datetime.datetime] = None, + service_manifest_version: Optional[str] = None, + failure_error: Optional["FabricErrorError"] = None, + **kwargs + ): + """ + :keyword backup_id: Unique backup ID . + :paramtype backup_id: str + :keyword backup_chain_id: Unique backup chain ID. All backups part of the same chain has the + same backup chain id. A backup chain is comprised of 1 full backup and multiple incremental + backups. + :paramtype backup_chain_id: str + :keyword application_name: Name of the Service Fabric application this partition backup belongs + to. + :paramtype application_name: str + :keyword service_name: Name of the Service Fabric service this partition backup belongs to. + :paramtype service_name: str + :keyword partition_information: Information about the partition to which this backup belongs + to. + :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation + :keyword backup_location: Location of the backup, relative to the backup store. + :paramtype backup_location: str + :keyword backup_type: Describes the type of backup, whether its full or incremental. Possible + values include: "Invalid", "Full", "Incremental". + :paramtype backup_type: str or ~azure.servicefabric.models.BackupType + :keyword epoch_of_last_backup_record: Epoch of the last record in this backup. + :paramtype epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch + :keyword lsn_of_last_backup_record: LSN of the last record in this backup. + :paramtype lsn_of_last_backup_record: str + :keyword creation_time_utc: The date time when this backup was taken. + :paramtype creation_time_utc: ~datetime.datetime + :keyword service_manifest_version: Manifest Version of the service this partition backup + belongs to. + :paramtype service_manifest_version: str + :keyword failure_error: Denotes the failure encountered in getting backup point information. + :paramtype failure_error: ~azure.servicefabric.models.FabricErrorError + """ + super(BackupInfo, self).__init__(**kwargs) + self.backup_id = backup_id + self.backup_chain_id = backup_chain_id + self.application_name = application_name + self.service_name = service_name + self.partition_information = partition_information + self.backup_location = backup_location + self.backup_type = backup_type + self.epoch_of_last_backup_record = epoch_of_last_backup_record + self.lsn_of_last_backup_record = lsn_of_last_backup_record + self.creation_time_utc = creation_time_utc + self.service_manifest_version = service_manifest_version + self.failure_error = failure_error + + +class BackupPartitionDescription(msrest.serialization.Model): + """Describes the parameters for triggering partition's backup. + + :ivar backup_storage: Specifies the details of the backup storage where to save the backup. + :vartype backup_storage: ~azure.servicefabric.models.BackupStorageDescription + """ + + _attribute_map = { + 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, + } + + def __init__( + self, + *, + backup_storage: Optional["BackupStorageDescription"] = None, + **kwargs + ): + """ + :keyword backup_storage: Specifies the details of the backup storage where to save the backup. + :paramtype backup_storage: ~azure.servicefabric.models.BackupStorageDescription + """ + super(BackupPartitionDescription, self).__init__(**kwargs) + self.backup_storage = backup_storage + + +class BackupPolicyDescription(msrest.serialization.Model): + """Describes a backup policy for configuring periodic backup. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The unique name identifying this backup policy. + :vartype name: str + :ivar auto_restore_on_data_loss: Required. Specifies whether to trigger restore automatically + using the latest available backup in case the partition experiences a data loss event. + :vartype auto_restore_on_data_loss: bool + :ivar max_incremental_backups: Required. Defines the maximum number of incremental backups to + be taken between two full backups. This is just the upper limit. A full backup may be taken + before specified number of incremental backups are completed in one of the following conditions + + + * The replica has never taken a full backup since it has become primary, + * Some of the log records since the last backup has been truncated, or + * Replica passed the MaxAccumulatedBackupLogSizeInMB limit. + :vartype max_incremental_backups: int + :ivar schedule: Required. Describes the backup schedule parameters. + :vartype schedule: ~azure.servicefabric.models.BackupScheduleDescription + :ivar storage: Required. Describes the details of backup storage where to store the periodic + backups. + :vartype storage: ~azure.servicefabric.models.BackupStorageDescription + :ivar retention_policy: Describes the policy to retain backups in storage. + :vartype retention_policy: ~azure.servicefabric.models.RetentionPolicyDescription + """ + + _validation = { + 'name': {'required': True}, + 'auto_restore_on_data_loss': {'required': True}, + 'max_incremental_backups': {'required': True, 'maximum': 255, 'minimum': 0}, + 'schedule': {'required': True}, + 'storage': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'auto_restore_on_data_loss': {'key': 'AutoRestoreOnDataLoss', 'type': 'bool'}, + 'max_incremental_backups': {'key': 'MaxIncrementalBackups', 'type': 'int'}, + 'schedule': {'key': 'Schedule', 'type': 'BackupScheduleDescription'}, + 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, + 'retention_policy': {'key': 'RetentionPolicy', 'type': 'RetentionPolicyDescription'}, + } + + def __init__( + self, + *, + name: str, + auto_restore_on_data_loss: bool, + max_incremental_backups: int, + schedule: "BackupScheduleDescription", + storage: "BackupStorageDescription", + retention_policy: Optional["RetentionPolicyDescription"] = None, + **kwargs + ): + """ + :keyword name: Required. The unique name identifying this backup policy. + :paramtype name: str + :keyword auto_restore_on_data_loss: Required. Specifies whether to trigger restore + automatically using the latest available backup in case the partition experiences a data loss + event. + :paramtype auto_restore_on_data_loss: bool + :keyword max_incremental_backups: Required. Defines the maximum number of incremental backups + to be taken between two full backups. This is just the upper limit. A full backup may be taken + before specified number of incremental backups are completed in one of the following conditions + + + * The replica has never taken a full backup since it has become primary, + * Some of the log records since the last backup has been truncated, or + * Replica passed the MaxAccumulatedBackupLogSizeInMB limit. + :paramtype max_incremental_backups: int + :keyword schedule: Required. Describes the backup schedule parameters. + :paramtype schedule: ~azure.servicefabric.models.BackupScheduleDescription + :keyword storage: Required. Describes the details of backup storage where to store the periodic + backups. + :paramtype storage: ~azure.servicefabric.models.BackupStorageDescription + :keyword retention_policy: Describes the policy to retain backups in storage. + :paramtype retention_policy: ~azure.servicefabric.models.RetentionPolicyDescription + """ + super(BackupPolicyDescription, self).__init__(**kwargs) + self.name = name + self.auto_restore_on_data_loss = auto_restore_on_data_loss + self.max_incremental_backups = max_incremental_backups + self.schedule = schedule + self.storage = storage + self.retention_policy = retention_policy + + +class BackupProgressInfo(msrest.serialization.Model): + """Describes the progress of a partition's backup. + + :ivar backup_state: Represents the current state of the partition backup operation. Possible + values include: "Invalid", "Accepted", "BackupInProgress", "Success", "Failure", "Timeout". + :vartype backup_state: str or ~azure.servicefabric.models.BackupState + :ivar time_stamp_utc: TimeStamp in UTC when operation succeeded or failed. + :vartype time_stamp_utc: ~datetime.datetime + :ivar backup_id: Unique ID of the newly created backup. + :vartype backup_id: str + :ivar backup_location: Location, relative to the backup store, of the newly created backup. + :vartype backup_location: str + :ivar epoch_of_last_backup_record: Specifies the epoch of the last record included in backup. + :vartype epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch + :ivar lsn_of_last_backup_record: The LSN of last record included in backup. + :vartype lsn_of_last_backup_record: str + :ivar failure_error: Denotes the failure encountered in performing backup operation. + :vartype failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'backup_state': {'key': 'BackupState', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, + 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__( + self, + *, + backup_state: Optional[Union[str, "BackupState"]] = None, + time_stamp_utc: Optional[datetime.datetime] = None, + backup_id: Optional[str] = None, + backup_location: Optional[str] = None, + epoch_of_last_backup_record: Optional["Epoch"] = None, + lsn_of_last_backup_record: Optional[str] = None, + failure_error: Optional["FabricErrorError"] = None, + **kwargs + ): + """ + :keyword backup_state: Represents the current state of the partition backup operation. Possible + values include: "Invalid", "Accepted", "BackupInProgress", "Success", "Failure", "Timeout". + :paramtype backup_state: str or ~azure.servicefabric.models.BackupState + :keyword time_stamp_utc: TimeStamp in UTC when operation succeeded or failed. + :paramtype time_stamp_utc: ~datetime.datetime + :keyword backup_id: Unique ID of the newly created backup. + :paramtype backup_id: str + :keyword backup_location: Location, relative to the backup store, of the newly created backup. + :paramtype backup_location: str + :keyword epoch_of_last_backup_record: Specifies the epoch of the last record included in + backup. + :paramtype epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch + :keyword lsn_of_last_backup_record: The LSN of last record included in backup. + :paramtype lsn_of_last_backup_record: str + :keyword failure_error: Denotes the failure encountered in performing backup operation. + :paramtype failure_error: ~azure.servicefabric.models.FabricErrorError + """ + super(BackupProgressInfo, self).__init__(**kwargs) + self.backup_state = backup_state + self.time_stamp_utc = time_stamp_utc + self.backup_id = backup_id + self.backup_location = backup_location + self.epoch_of_last_backup_record = epoch_of_last_backup_record + self.lsn_of_last_backup_record = lsn_of_last_backup_record + self.failure_error = failure_error + + +class BackupScheduleDescription(msrest.serialization.Model): + """Describes the backup schedule parameters. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FrequencyBasedBackupScheduleDescription, TimeBasedBackupScheduleDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar schedule_kind: Required. The kind of backup schedule, time based or frequency + based.Constant filled by server. Possible values include: "Invalid", "TimeBased", + "FrequencyBased". + :vartype schedule_kind: str or ~azure.servicefabric.models.BackupScheduleKind + """ + + _validation = { + 'schedule_kind': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + } + + _subtype_map = { + 'schedule_kind': {'FrequencyBased': 'FrequencyBasedBackupScheduleDescription', 'TimeBased': 'TimeBasedBackupScheduleDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(BackupScheduleDescription, self).__init__(**kwargs) + self.schedule_kind = None # type: Optional[str] + + +class BackupSuspensionInfo(msrest.serialization.Model): + """Describes the backup suspension details. + + :ivar is_suspended: Indicates whether periodic backup is suspended at this level or not. + :vartype is_suspended: bool + :ivar suspension_inherited_from: Specifies the scope at which the backup suspension was + applied. Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype suspension_inherited_from: str or ~azure.servicefabric.models.BackupSuspensionScope + """ + + _attribute_map = { + 'is_suspended': {'key': 'IsSuspended', 'type': 'bool'}, + 'suspension_inherited_from': {'key': 'SuspensionInheritedFrom', 'type': 'str'}, + } + + def __init__( + self, + *, + is_suspended: Optional[bool] = None, + suspension_inherited_from: Optional[Union[str, "BackupSuspensionScope"]] = None, + **kwargs + ): + """ + :keyword is_suspended: Indicates whether periodic backup is suspended at this level or not. + :paramtype is_suspended: bool + :keyword suspension_inherited_from: Specifies the scope at which the backup suspension was + applied. Possible values include: "Invalid", "Partition", "Service", "Application". + :paramtype suspension_inherited_from: str or ~azure.servicefabric.models.BackupSuspensionScope + """ + super(BackupSuspensionInfo, self).__init__(**kwargs) + self.is_suspended = is_suspended + self.suspension_inherited_from = suspension_inherited_from + + +class RetentionPolicyDescription(msrest.serialization.Model): + """Describes the retention policy configured. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BasicRetentionPolicyDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar retention_policy_type: Required. The type of retention policy. Currently only "Basic" + retention policy is supported.Constant filled by server. Possible values include: "Basic", + "Invalid". + :vartype retention_policy_type: str or ~azure.servicefabric.models.RetentionPolicyType + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, + } + + _subtype_map = { + 'retention_policy_type': {'Basic': 'BasicRetentionPolicyDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(RetentionPolicyDescription, self).__init__(**kwargs) + self.retention_policy_type = None # type: Optional[str] + + +class BasicRetentionPolicyDescription(RetentionPolicyDescription): + """Describes basic retention policy. + + All required parameters must be populated in order to send to Azure. + + :ivar retention_policy_type: Required. The type of retention policy. Currently only "Basic" + retention policy is supported.Constant filled by server. Possible values include: "Basic", + "Invalid". + :vartype retention_policy_type: str or ~azure.servicefabric.models.RetentionPolicyType + :ivar retention_duration: Required. It is the minimum duration for which a backup created, will + remain stored in the storage and might get deleted after that span of time. It should be + specified in ISO8601 format. + :vartype retention_duration: ~datetime.timedelta + :ivar minimum_number_of_backups: It is the minimum number of backups to be retained at any + point of time. If specified with a non zero value, backups will not be deleted even if the + backups have gone past retention duration and have number of backups less than or equal to it. + :vartype minimum_number_of_backups: int + """ + + _validation = { + 'retention_policy_type': {'required': True}, + 'retention_duration': {'required': True}, + 'minimum_number_of_backups': {'minimum': 0}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, + 'retention_duration': {'key': 'RetentionDuration', 'type': 'duration'}, + 'minimum_number_of_backups': {'key': 'MinimumNumberOfBackups', 'type': 'int'}, + } + + def __init__( + self, + *, + retention_duration: datetime.timedelta, + minimum_number_of_backups: Optional[int] = None, + **kwargs + ): + """ + :keyword retention_duration: Required. It is the minimum duration for which a backup created, + will remain stored in the storage and might get deleted after that span of time. It should be + specified in ISO8601 format. + :paramtype retention_duration: ~datetime.timedelta + :keyword minimum_number_of_backups: It is the minimum number of backups to be retained at any + point of time. If specified with a non zero value, backups will not be deleted even if the + backups have gone past retention duration and have number of backups less than or equal to it. + :paramtype minimum_number_of_backups: int + """ + super(BasicRetentionPolicyDescription, self).__init__(**kwargs) + self.retention_policy_type = 'Basic' # type: str + self.retention_duration = retention_duration + self.minimum_number_of_backups = minimum_number_of_backups + + +class PropertyValue(msrest.serialization.Model): + """Describes a Service Fabric property value. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BinaryPropertyValue, DoublePropertyValue, GuidPropertyValue, Int64PropertyValue, StringPropertyValue. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property, determined by the type of data. Following are the + possible values.Constant filled by server. Possible values include: "Invalid", "Binary", + "Int64", "Double", "String", "Guid". + :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Binary': 'BinaryPropertyValue', 'Double': 'DoublePropertyValue', 'Guid': 'GuidPropertyValue', 'Int64': 'Int64PropertyValue', 'String': 'StringPropertyValue'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PropertyValue, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class BinaryPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Binary. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property, determined by the type of data. Following are the + possible values.Constant filled by server. Possible values include: "Invalid", "Binary", + "Int64", "Double", "String", "Guid". + :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind + :ivar data: Required. Array of bytes to be sent as an integer array. Each element of array is a + number between 0 and 255. + :vartype data: list[int] + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': '[int]'}, + } + + def __init__( + self, + *, + data: List[int], + **kwargs + ): + """ + :keyword data: Required. Array of bytes to be sent as an integer array. Each element of array + is a number between 0 and 255. + :paramtype data: list[int] + """ + super(BinaryPropertyValue, self).__init__(**kwargs) + self.kind = 'Binary' # type: str + self.data = data + + +class Chaos(msrest.serialization.Model): + """Contains a description of Chaos. + + :ivar chaos_parameters: If Chaos is running, these are the parameters Chaos is running with. + :vartype chaos_parameters: ~azure.servicefabric.models.ChaosParameters + :ivar status: Current status of the Chaos run. Possible values include: "Invalid", "Running", + "Stopped". + :vartype status: str or ~azure.servicefabric.models.ChaosStatus + :ivar schedule_status: Current status of the schedule. Possible values include: "Invalid", + "Stopped", "Active", "Expired", "Pending". + :vartype schedule_status: str or ~azure.servicefabric.models.ChaosScheduleStatus + """ + + _attribute_map = { + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'schedule_status': {'key': 'ScheduleStatus', 'type': 'str'}, + } + + def __init__( + self, + *, + chaos_parameters: Optional["ChaosParameters"] = None, + status: Optional[Union[str, "ChaosStatus"]] = None, + schedule_status: Optional[Union[str, "ChaosScheduleStatus"]] = None, + **kwargs + ): + """ + :keyword chaos_parameters: If Chaos is running, these are the parameters Chaos is running with. + :paramtype chaos_parameters: ~azure.servicefabric.models.ChaosParameters + :keyword status: Current status of the Chaos run. Possible values include: "Invalid", + "Running", "Stopped". + :paramtype status: str or ~azure.servicefabric.models.ChaosStatus + :keyword schedule_status: Current status of the schedule. Possible values include: "Invalid", + "Stopped", "Active", "Expired", "Pending". + :paramtype schedule_status: str or ~azure.servicefabric.models.ChaosScheduleStatus + """ + super(Chaos, self).__init__(**kwargs) + self.chaos_parameters = chaos_parameters + self.status = status + self.schedule_status = schedule_status + + +class ChaosCodePackageRestartScheduledEvent(ApplicationEvent): + """Chaos Restart Code Package Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar fault_group_id: Required. Id of fault group. + :vartype fault_group_id: str + :ivar fault_id: Required. Id of fault. + :vartype fault_id: str + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar service_manifest_name: Required. Service manifest name. + :vartype service_manifest_name: str + :ivar code_package_name: Required. Code package name. + :vartype code_package_name: str + :ivar service_package_activation_id: Required. Id of Service package activation. + :vartype service_package_activation_id: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'node_name': {'required': True}, + 'service_manifest_name': {'required': True}, + 'code_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + application_id: str, + fault_group_id: str, + fault_id: str, + node_name: str, + service_manifest_name: str, + code_package_name: str, + service_package_activation_id: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword fault_group_id: Required. Id of fault group. + :paramtype fault_group_id: str + :keyword fault_id: Required. Id of fault. + :paramtype fault_id: str + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword service_manifest_name: Required. Service manifest name. + :paramtype service_manifest_name: str + :keyword code_package_name: Required. Code package name. + :paramtype code_package_name: str + :keyword service_package_activation_id: Required. Id of Service package activation. + :paramtype service_package_activation_id: str + """ + super(ChaosCodePackageRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.kind = 'ChaosCodePackageRestartScheduled' # type: str + self.fault_group_id = fault_group_id + self.fault_id = fault_id + self.node_name = node_name + self.service_manifest_name = service_manifest_name + self.code_package_name = code_package_name + self.service_package_activation_id = service_package_activation_id + + +class ChaosContext(msrest.serialization.Model): + """Describes a map, which is a collection of (string, string) type key-value pairs. The map can be used to record information about +the Chaos run. There cannot be more than 100 such pairs and each string (key or value) can be at most 4095 characters long. +This map is set by the starter of the Chaos run to optionally store the context about the specific run. + + :ivar map: Describes a map that contains a collection of ChaosContextMapItem's. + :vartype map: dict[str, str] + """ + + _attribute_map = { + 'map': {'key': 'Map', 'type': '{str}'}, + } + + def __init__( + self, + *, + map: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword map: Describes a map that contains a collection of ChaosContextMapItem's. + :paramtype map: dict[str, str] + """ + super(ChaosContext, self).__init__(**kwargs) + self.map = map + + +class ChaosEvent(msrest.serialization.Model): + """Represents an event generated during a Chaos run. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ExecutingFaultsChaosEvent, StartedChaosEvent, StoppedChaosEvent, TestErrorChaosEvent, ValidationFailedChaosEvent, WaitingChaosEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values + include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", + "Stopped". + :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind + :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :vartype time_stamp_utc: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'time_stamp_utc': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + } + + _subtype_map = { + 'kind': {'ExecutingFaults': 'ExecutingFaultsChaosEvent', 'Started': 'StartedChaosEvent', 'Stopped': 'StoppedChaosEvent', 'TestError': 'TestErrorChaosEvent', 'ValidationFailed': 'ValidationFailedChaosEvent', 'Waiting': 'WaitingChaosEvent'} + } + + def __init__( + self, + *, + time_stamp_utc: datetime.datetime, + **kwargs + ): + """ + :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :paramtype time_stamp_utc: ~datetime.datetime + """ + super(ChaosEvent, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.time_stamp_utc = time_stamp_utc + + +class ChaosEventsSegment(msrest.serialization.Model): + """Contains the list of Chaos events and the continuation token to get the next segment. + + :ivar 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. + :vartype continuation_token: str + :ivar history: List of Chaos events that meet the user-supplied criteria. + :vartype history: list[~azure.servicefabric.models.ChaosEventWrapper] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'history': {'key': 'History', 'type': '[ChaosEventWrapper]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + history: Optional[List["ChaosEventWrapper"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword history: List of Chaos events that meet the user-supplied criteria. + :paramtype history: list[~azure.servicefabric.models.ChaosEventWrapper] + """ + super(ChaosEventsSegment, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.history = history + + +class ChaosEventWrapper(msrest.serialization.Model): + """Wrapper object for Chaos event. + + :ivar chaos_event: Represents an event generated during a Chaos run. + :vartype chaos_event: ~azure.servicefabric.models.ChaosEvent + """ + + _attribute_map = { + 'chaos_event': {'key': 'ChaosEvent', 'type': 'ChaosEvent'}, + } + + def __init__( + self, + *, + chaos_event: Optional["ChaosEvent"] = None, + **kwargs + ): + """ + :keyword chaos_event: Represents an event generated during a Chaos run. + :paramtype chaos_event: ~azure.servicefabric.models.ChaosEvent + """ + super(ChaosEventWrapper, self).__init__(**kwargs) + self.chaos_event = chaos_event + + +class NodeEvent(FabricEvent): + """Represents the base for all Node Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ChaosNodeRestartScheduledEvent, NodeAbortedEvent, NodeAddedToClusterEvent, NodeClosedEvent, NodeDeactivateCompletedEvent, NodeDeactivateStartedEvent, NodeDownEvent, NodeHealthReportExpiredEvent, NodeNewHealthReportEvent, NodeOpenFailedEvent, NodeOpenSucceededEvent, NodeRemovedFromClusterEvent, NodeUpEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ChaosNodeRestartScheduled': 'ChaosNodeRestartScheduledEvent', 'NodeAborted': 'NodeAbortedEvent', 'NodeAddedToCluster': 'NodeAddedToClusterEvent', 'NodeClosed': 'NodeClosedEvent', 'NodeDeactivateCompleted': 'NodeDeactivateCompletedEvent', 'NodeDeactivateStarted': 'NodeDeactivateStartedEvent', 'NodeDown': 'NodeDownEvent', 'NodeHealthReportExpired': 'NodeHealthReportExpiredEvent', 'NodeNewHealthReport': 'NodeNewHealthReportEvent', 'NodeOpenFailed': 'NodeOpenFailedEvent', 'NodeOpenSucceeded': 'NodeOpenSucceededEvent', 'NodeRemovedFromCluster': 'NodeRemovedFromClusterEvent', 'NodeUp': 'NodeUpEvent'} + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + node_name: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + """ + super(NodeEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'NodeEvent' # type: str + self.node_name = node_name + + +class ChaosNodeRestartScheduledEvent(NodeEvent): + """Chaos Restart Node Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance_id: Required. Id of Node instance. + :vartype node_instance_id: long + :ivar fault_group_id: Required. Id of fault group. + :vartype fault_group_id: str + :ivar fault_id: Required. Id of fault. + :vartype fault_id: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + node_name: str, + node_instance_id: int, + fault_group_id: str, + fault_id: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance_id: Required. Id of Node instance. + :paramtype node_instance_id: long + :keyword fault_group_id: Required. Id of fault group. + :paramtype fault_group_id: str + :keyword fault_id: Required. Id of fault. + :paramtype fault_id: str + """ + super(ChaosNodeRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.kind = 'ChaosNodeRestartScheduled' # type: str + self.node_instance_id = node_instance_id + self.fault_group_id = fault_group_id + self.fault_id = fault_id + + +class ChaosParameters(msrest.serialization.Model): + """Defines all the parameters to configure a Chaos run. + + :ivar time_to_run_in_seconds: Total time (in seconds) for which Chaos will run before + automatically stopping. The maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue). + :vartype time_to_run_in_seconds: str + :ivar max_cluster_stabilization_timeout_in_seconds: The maximum amount of time to wait for all + cluster entities to become stable and healthy. Chaos executes in iterations and at the start of + each iteration it validates the health of cluster entities. + During validation if a cluster entity is not stable and healthy within + MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed event. + :vartype max_cluster_stabilization_timeout_in_seconds: long + :ivar max_concurrent_faults: MaxConcurrentFaults is the maximum number of concurrent faults + induced per iteration. + Chaos executes in iterations and two consecutive iterations are separated by a validation + phase. + The higher the concurrency, the more aggressive the injection of faults, leading to inducing + more complex series of states to uncover bugs. + The recommendation is to start with a value of 2 or 3 and to exercise caution while moving up. + :vartype max_concurrent_faults: long + :ivar enable_move_replica_faults: Enables or disables the move primary and move secondary + faults. + :vartype enable_move_replica_faults: bool + :ivar wait_time_between_faults_in_seconds: Wait time (in seconds) between consecutive faults + within a single iteration. + The larger the value, the lower the overlapping between faults and the simpler the sequence of + state transitions that the cluster goes through. + The recommendation is to start with a value between 1 and 5 and exercise caution while moving + up. + :vartype wait_time_between_faults_in_seconds: long + :ivar wait_time_between_iterations_in_seconds: Time-separation (in seconds) between two + consecutive iterations of Chaos. + The larger the value, the lower the fault injection rate. + :vartype wait_time_between_iterations_in_seconds: long + :ivar cluster_health_policy: Passed-in cluster health policy is used to validate health of the + cluster in between Chaos iterations. If the cluster health is in error or if an unexpected + exception happens during fault execution--to provide the cluster with some time to + recuperate--Chaos will wait for 30 minutes before the next health-check. + :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :ivar context: Describes a map, which is a collection of (string, string) type key-value pairs. + The map can be used to record information about + the Chaos run. There cannot be more than 100 such pairs and each string (key or value) can be + at most 4095 characters long. + This map is set by the starter of the Chaos run to optionally store the context about the + specific run. + :vartype context: ~azure.servicefabric.models.ChaosContext + :ivar chaos_target_filter: List of cluster entities to target for Chaos faults. + This filter can be used to target Chaos faults only to certain node types or only to certain + application instances. If ChaosTargetFilter is not used, Chaos faults all cluster entities. + If ChaosTargetFilter is used, Chaos faults only the entities that meet the ChaosTargetFilter + specification. + :vartype chaos_target_filter: ~azure.servicefabric.models.ChaosTargetFilter + """ + + _validation = { + 'max_cluster_stabilization_timeout_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'max_concurrent_faults': {'maximum': 4294967295, 'minimum': 0}, + 'wait_time_between_faults_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'wait_time_between_iterations_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'str'}, + 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'long'}, + 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, + 'enable_move_replica_faults': {'key': 'EnableMoveReplicaFaults', 'type': 'bool'}, + 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'long'}, + 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'long'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'context': {'key': 'Context', 'type': 'ChaosContext'}, + 'chaos_target_filter': {'key': 'ChaosTargetFilter', 'type': 'ChaosTargetFilter'}, + } + + def __init__( + self, + *, + time_to_run_in_seconds: Optional[str] = "4294967295", + max_cluster_stabilization_timeout_in_seconds: Optional[int] = 60, + max_concurrent_faults: Optional[int] = 1, + enable_move_replica_faults: Optional[bool] = True, + wait_time_between_faults_in_seconds: Optional[int] = 20, + wait_time_between_iterations_in_seconds: Optional[int] = 30, + cluster_health_policy: Optional["ClusterHealthPolicy"] = None, + context: Optional["ChaosContext"] = None, + chaos_target_filter: Optional["ChaosTargetFilter"] = None, + **kwargs + ): + """ + :keyword time_to_run_in_seconds: Total time (in seconds) for which Chaos will run before + automatically stopping. The maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue). + :paramtype time_to_run_in_seconds: str + :keyword max_cluster_stabilization_timeout_in_seconds: The maximum amount of time to wait for + all cluster entities to become stable and healthy. Chaos executes in iterations and at the + start of each iteration it validates the health of cluster entities. + During validation if a cluster entity is not stable and healthy within + MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed event. + :paramtype max_cluster_stabilization_timeout_in_seconds: long + :keyword max_concurrent_faults: MaxConcurrentFaults is the maximum number of concurrent faults + induced per iteration. + Chaos executes in iterations and two consecutive iterations are separated by a validation + phase. + The higher the concurrency, the more aggressive the injection of faults, leading to inducing + more complex series of states to uncover bugs. + The recommendation is to start with a value of 2 or 3 and to exercise caution while moving up. + :paramtype max_concurrent_faults: long + :keyword enable_move_replica_faults: Enables or disables the move primary and move secondary + faults. + :paramtype enable_move_replica_faults: bool + :keyword wait_time_between_faults_in_seconds: Wait time (in seconds) between consecutive faults + within a single iteration. + The larger the value, the lower the overlapping between faults and the simpler the sequence of + state transitions that the cluster goes through. + The recommendation is to start with a value between 1 and 5 and exercise caution while moving + up. + :paramtype wait_time_between_faults_in_seconds: long + :keyword wait_time_between_iterations_in_seconds: Time-separation (in seconds) between two + consecutive iterations of Chaos. + The larger the value, the lower the fault injection rate. + :paramtype wait_time_between_iterations_in_seconds: long + :keyword cluster_health_policy: Passed-in cluster health policy is used to validate health of + the cluster in between Chaos iterations. If the cluster health is in error or if an unexpected + exception happens during fault execution--to provide the cluster with some time to + recuperate--Chaos will wait for 30 minutes before the next health-check. + :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :keyword context: Describes a map, which is a collection of (string, string) type key-value + pairs. The map can be used to record information about + the Chaos run. There cannot be more than 100 such pairs and each string (key or value) can be + at most 4095 characters long. + This map is set by the starter of the Chaos run to optionally store the context about the + specific run. + :paramtype context: ~azure.servicefabric.models.ChaosContext + :keyword chaos_target_filter: List of cluster entities to target for Chaos faults. + This filter can be used to target Chaos faults only to certain node types or only to certain + application instances. If ChaosTargetFilter is not used, Chaos faults all cluster entities. + If ChaosTargetFilter is used, Chaos faults only the entities that meet the ChaosTargetFilter + specification. + :paramtype chaos_target_filter: ~azure.servicefabric.models.ChaosTargetFilter + """ + super(ChaosParameters, self).__init__(**kwargs) + self.time_to_run_in_seconds = time_to_run_in_seconds + self.max_cluster_stabilization_timeout_in_seconds = max_cluster_stabilization_timeout_in_seconds + self.max_concurrent_faults = max_concurrent_faults + self.enable_move_replica_faults = enable_move_replica_faults + self.wait_time_between_faults_in_seconds = wait_time_between_faults_in_seconds + self.wait_time_between_iterations_in_seconds = wait_time_between_iterations_in_seconds + self.cluster_health_policy = cluster_health_policy + self.context = context + self.chaos_target_filter = chaos_target_filter + + +class ChaosParametersDictionaryItem(msrest.serialization.Model): + """Defines an item in ChaosParametersDictionary of the Chaos Schedule. + + All required parameters must be populated in order to send to Azure. + + :ivar key: Required. The key identifying the Chaos Parameter in the dictionary. This key is + referenced by Chaos Schedule Jobs. + :vartype key: str + :ivar value: Required. Defines all the parameters to configure a Chaos run. + :vartype value: ~azure.servicefabric.models.ChaosParameters + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ChaosParameters'}, + } + + def __init__( + self, + *, + key: str, + value: "ChaosParameters", + **kwargs + ): + """ + :keyword key: Required. The key identifying the Chaos Parameter in the dictionary. This key is + referenced by Chaos Schedule Jobs. + :paramtype key: str + :keyword value: Required. Defines all the parameters to configure a Chaos run. + :paramtype value: ~azure.servicefabric.models.ChaosParameters + """ + super(ChaosParametersDictionaryItem, self).__init__(**kwargs) + self.key = key + self.value = value + + +class PartitionEvent(FabricEvent): + """Represents the base for all Partition Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ChaosPartitionPrimaryMoveScheduledEvent, ChaosPartitionSecondaryMoveScheduledEvent, PartitionAnalysisEvent, PartitionHealthReportExpiredEvent, PartitionNewHealthReportEvent, PartitionReconfiguredEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ChaosPartitionPrimaryMoveScheduled': 'ChaosPartitionPrimaryMoveScheduledEvent', 'ChaosPartitionSecondaryMoveScheduled': 'ChaosPartitionSecondaryMoveScheduledEvent', 'PartitionAnalysisEvent': 'PartitionAnalysisEvent', 'PartitionHealthReportExpired': 'PartitionHealthReportExpiredEvent', 'PartitionNewHealthReport': 'PartitionNewHealthReportEvent', 'PartitionReconfigured': 'PartitionReconfiguredEvent'} + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + partition_id: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + """ + super(PartitionEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'PartitionEvent' # type: str + self.partition_id = partition_id + + +class ChaosPartitionPrimaryMoveScheduledEvent(PartitionEvent): + """Chaos Move Primary Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar fault_group_id: Required. Id of fault group. + :vartype fault_group_id: str + :ivar fault_id: Required. Id of fault. + :vartype fault_id: str + :ivar service_name: Required. Service name. + :vartype service_name: str + :ivar node_to: Required. The name of a Service Fabric node. + :vartype node_to: str + :ivar forced_move: Required. Indicates a forced move. + :vartype forced_move: bool + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_name': {'required': True}, + 'node_to': {'required': True}, + 'forced_move': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'node_to': {'key': 'NodeTo', 'type': 'str'}, + 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + partition_id: str, + fault_group_id: str, + fault_id: str, + service_name: str, + node_to: str, + forced_move: bool, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword fault_group_id: Required. Id of fault group. + :paramtype fault_group_id: str + :keyword fault_id: Required. Id of fault. + :paramtype fault_id: str + :keyword service_name: Required. Service name. + :paramtype service_name: str + :keyword node_to: Required. The name of a Service Fabric node. + :paramtype node_to: str + :keyword forced_move: Required. Indicates a forced move. + :paramtype forced_move: bool + """ + super(ChaosPartitionPrimaryMoveScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.kind = 'ChaosPartitionPrimaryMoveScheduled' # type: str + self.fault_group_id = fault_group_id + self.fault_id = fault_id + self.service_name = service_name + self.node_to = node_to + self.forced_move = forced_move + + +class ChaosPartitionSecondaryMoveScheduledEvent(PartitionEvent): + """Chaos Move Secondary Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar fault_group_id: Required. Id of fault group. + :vartype fault_group_id: str + :ivar fault_id: Required. Id of fault. + :vartype fault_id: str + :ivar service_name: Required. Service name. + :vartype service_name: str + :ivar source_node: Required. The name of a Service Fabric node. + :vartype source_node: str + :ivar destination_node: Required. The name of a Service Fabric node. + :vartype destination_node: str + :ivar forced_move: Required. Indicates a forced move. + :vartype forced_move: bool + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_name': {'required': True}, + 'source_node': {'required': True}, + 'destination_node': {'required': True}, + 'forced_move': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'source_node': {'key': 'SourceNode', 'type': 'str'}, + 'destination_node': {'key': 'DestinationNode', 'type': 'str'}, + 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + partition_id: str, + fault_group_id: str, + fault_id: str, + service_name: str, + source_node: str, + destination_node: str, + forced_move: bool, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword fault_group_id: Required. Id of fault group. + :paramtype fault_group_id: str + :keyword fault_id: Required. Id of fault. + :paramtype fault_id: str + :keyword service_name: Required. Service name. + :paramtype service_name: str + :keyword source_node: Required. The name of a Service Fabric node. + :paramtype source_node: str + :keyword destination_node: Required. The name of a Service Fabric node. + :paramtype destination_node: str + :keyword forced_move: Required. Indicates a forced move. + :paramtype forced_move: bool + """ + super(ChaosPartitionSecondaryMoveScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.kind = 'ChaosPartitionSecondaryMoveScheduled' # type: str + self.fault_group_id = fault_group_id + self.fault_id = fault_id + self.service_name = service_name + self.source_node = source_node + self.destination_node = destination_node + self.forced_move = forced_move + + +class ReplicaEvent(FabricEvent): + """Represents the base for all Replica Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ChaosReplicaRemovalScheduledEvent, ChaosReplicaRestartScheduledEvent, StatefulReplicaHealthReportExpiredEvent, StatefulReplicaNewHealthReportEvent, StatelessReplicaHealthReportExpiredEvent, StatelessReplicaNewHealthReportEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :vartype replica_id: long + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + } + + _subtype_map = { + 'kind': {'ChaosReplicaRemovalScheduled': 'ChaosReplicaRemovalScheduledEvent', 'ChaosReplicaRestartScheduled': 'ChaosReplicaRestartScheduledEvent', 'StatefulReplicaHealthReportExpired': 'StatefulReplicaHealthReportExpiredEvent', 'StatefulReplicaNewHealthReport': 'StatefulReplicaNewHealthReportEvent', 'StatelessReplicaHealthReportExpired': 'StatelessReplicaHealthReportExpiredEvent', 'StatelessReplicaNewHealthReport': 'StatelessReplicaNewHealthReportEvent'} + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + partition_id: str, + replica_id: int, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: long + """ + super(ReplicaEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ReplicaEvent' # type: str + self.partition_id = partition_id + self.replica_id = replica_id + + +class ChaosReplicaRemovalScheduledEvent(ReplicaEvent): + """Chaos Remove Replica Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :vartype replica_id: long + :ivar fault_group_id: Required. Id of fault group. + :vartype fault_group_id: str + :ivar fault_id: Required. Id of fault. + :vartype fault_id: str + :ivar service_uri: Required. Service name. + :vartype service_uri: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + partition_id: str, + replica_id: int, + fault_group_id: str, + fault_id: str, + service_uri: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: long + :keyword fault_group_id: Required. Id of fault group. + :paramtype fault_group_id: str + :keyword fault_id: Required. Id of fault. + :paramtype fault_id: str + :keyword service_uri: Required. Service name. + :paramtype service_uri: str + """ + super(ChaosReplicaRemovalScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.kind = 'ChaosReplicaRemovalScheduled' # type: str + self.fault_group_id = fault_group_id + self.fault_id = fault_id + self.service_uri = service_uri + + +class ChaosReplicaRestartScheduledEvent(ReplicaEvent): + """Chaos Restart Replica Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :vartype replica_id: long + :ivar fault_group_id: Required. Id of fault group. + :vartype fault_group_id: str + :ivar fault_id: Required. Id of fault. + :vartype fault_id: str + :ivar service_uri: Required. Service name. + :vartype service_uri: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + partition_id: str, + replica_id: int, + fault_group_id: str, + fault_id: str, + service_uri: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: long + :keyword fault_group_id: Required. Id of fault group. + :paramtype fault_group_id: str + :keyword fault_id: Required. Id of fault. + :paramtype fault_id: str + :keyword service_uri: Required. Service name. + :paramtype service_uri: str + """ + super(ChaosReplicaRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.kind = 'ChaosReplicaRestartScheduled' # type: str + self.fault_group_id = fault_group_id + self.fault_id = fault_id + self.service_uri = service_uri + + +class ChaosSchedule(msrest.serialization.Model): + """Defines the schedule used by Chaos. + + :ivar start_date: The date and time Chaos will start using this schedule. + :vartype start_date: ~datetime.datetime + :ivar expiry_date: The date and time Chaos will continue to use this schedule until. + :vartype expiry_date: ~datetime.datetime + :ivar chaos_parameters_dictionary: A mapping of string names to Chaos Parameters to be + referenced by Chaos Schedule Jobs. + :vartype chaos_parameters_dictionary: + list[~azure.servicefabric.models.ChaosParametersDictionaryItem] + :ivar jobs: A list of all Chaos Schedule Jobs that will be automated by the schedule. + :vartype jobs: list[~azure.servicefabric.models.ChaosScheduleJob] + """ + + _attribute_map = { + 'start_date': {'key': 'StartDate', 'type': 'iso-8601'}, + 'expiry_date': {'key': 'ExpiryDate', 'type': 'iso-8601'}, + 'chaos_parameters_dictionary': {'key': 'ChaosParametersDictionary', 'type': '[ChaosParametersDictionaryItem]'}, + 'jobs': {'key': 'Jobs', 'type': '[ChaosScheduleJob]'}, + } + + def __init__( + self, + *, + start_date: Optional[datetime.datetime] = "1601-01-01T00:00:00Z", + expiry_date: Optional[datetime.datetime] = "9999-12-31T23:59:59.999Z", + chaos_parameters_dictionary: Optional[List["ChaosParametersDictionaryItem"]] = None, + jobs: Optional[List["ChaosScheduleJob"]] = None, + **kwargs + ): + """ + :keyword start_date: The date and time Chaos will start using this schedule. + :paramtype start_date: ~datetime.datetime + :keyword expiry_date: The date and time Chaos will continue to use this schedule until. + :paramtype expiry_date: ~datetime.datetime + :keyword chaos_parameters_dictionary: A mapping of string names to Chaos Parameters to be + referenced by Chaos Schedule Jobs. + :paramtype chaos_parameters_dictionary: + list[~azure.servicefabric.models.ChaosParametersDictionaryItem] + :keyword jobs: A list of all Chaos Schedule Jobs that will be automated by the schedule. + :paramtype jobs: list[~azure.servicefabric.models.ChaosScheduleJob] + """ + super(ChaosSchedule, self).__init__(**kwargs) + self.start_date = start_date + self.expiry_date = expiry_date + self.chaos_parameters_dictionary = chaos_parameters_dictionary + self.jobs = jobs + + +class ChaosScheduleDescription(msrest.serialization.Model): + """Defines the Chaos Schedule used by Chaos and the version of the Chaos Schedule. The version value wraps back to 0 after surpassing 2,147,483,647. + + :ivar version: The version number of the Schedule. + :vartype version: int + :ivar schedule: Defines the schedule used by Chaos. + :vartype schedule: ~azure.servicefabric.models.ChaosSchedule + """ + + _validation = { + 'version': {'minimum': 0}, + } + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'int'}, + 'schedule': {'key': 'Schedule', 'type': 'ChaosSchedule'}, + } + + def __init__( + self, + *, + version: Optional[int] = None, + schedule: Optional["ChaosSchedule"] = None, + **kwargs + ): + """ + :keyword version: The version number of the Schedule. + :paramtype version: int + :keyword schedule: Defines the schedule used by Chaos. + :paramtype schedule: ~azure.servicefabric.models.ChaosSchedule + """ + super(ChaosScheduleDescription, self).__init__(**kwargs) + self.version = version + self.schedule = schedule + + +class ChaosScheduleJob(msrest.serialization.Model): + """Defines a repetition rule and parameters of Chaos to be used with the Chaos Schedule. + + :ivar chaos_parameters: A reference to which Chaos Parameters of the Chaos Schedule to use. + :vartype chaos_parameters: str + :ivar days: Defines the days of the week that a Chaos Schedule Job will run for. + :vartype days: ~azure.servicefabric.models.ChaosScheduleJobActiveDaysOfWeek + :ivar times: A list of Time Ranges that specify when during active days that this job will run. + The times are interpreted as UTC. + :vartype times: list[~azure.servicefabric.models.TimeRange] + """ + + _attribute_map = { + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'str'}, + 'days': {'key': 'Days', 'type': 'ChaosScheduleJobActiveDaysOfWeek'}, + 'times': {'key': 'Times', 'type': '[TimeRange]'}, + } + + def __init__( + self, + *, + chaos_parameters: Optional[str] = None, + days: Optional["ChaosScheduleJobActiveDaysOfWeek"] = None, + times: Optional[List["TimeRange"]] = None, + **kwargs + ): + """ + :keyword chaos_parameters: A reference to which Chaos Parameters of the Chaos Schedule to use. + :paramtype chaos_parameters: str + :keyword days: Defines the days of the week that a Chaos Schedule Job will run for. + :paramtype days: ~azure.servicefabric.models.ChaosScheduleJobActiveDaysOfWeek + :keyword times: A list of Time Ranges that specify when during active days that this job will + run. The times are interpreted as UTC. + :paramtype times: list[~azure.servicefabric.models.TimeRange] + """ + super(ChaosScheduleJob, self).__init__(**kwargs) + self.chaos_parameters = chaos_parameters + self.days = days + self.times = times + + +class ChaosScheduleJobActiveDaysOfWeek(msrest.serialization.Model): + """Defines the days of the week that a Chaos Schedule Job will run for. + + :ivar sunday: Indicates if the Chaos Schedule Job will run on Sunday. + :vartype sunday: bool + :ivar monday: Indicates if the Chaos Schedule Job will run on Monday. + :vartype monday: bool + :ivar tuesday: Indicates if the Chaos Schedule Job will run on Tuesday. + :vartype tuesday: bool + :ivar wednesday: Indicates if the Chaos Schedule Job will run on Wednesday. + :vartype wednesday: bool + :ivar thursday: Indicates if the Chaos Schedule Job will run on Thursday. + :vartype thursday: bool + :ivar friday: Indicates if the Chaos Schedule Job will run on Friday. + :vartype friday: bool + :ivar saturday: Indicates if the Chaos Schedule Job will run on Saturday. + :vartype saturday: bool + """ + + _attribute_map = { + 'sunday': {'key': 'Sunday', 'type': 'bool'}, + 'monday': {'key': 'Monday', 'type': 'bool'}, + 'tuesday': {'key': 'Tuesday', 'type': 'bool'}, + 'wednesday': {'key': 'Wednesday', 'type': 'bool'}, + 'thursday': {'key': 'Thursday', 'type': 'bool'}, + 'friday': {'key': 'Friday', 'type': 'bool'}, + 'saturday': {'key': 'Saturday', 'type': 'bool'}, + } + + def __init__( + self, + *, + sunday: Optional[bool] = False, + monday: Optional[bool] = False, + tuesday: Optional[bool] = False, + wednesday: Optional[bool] = False, + thursday: Optional[bool] = False, + friday: Optional[bool] = False, + saturday: Optional[bool] = False, + **kwargs + ): + """ + :keyword sunday: Indicates if the Chaos Schedule Job will run on Sunday. + :paramtype sunday: bool + :keyword monday: Indicates if the Chaos Schedule Job will run on Monday. + :paramtype monday: bool + :keyword tuesday: Indicates if the Chaos Schedule Job will run on Tuesday. + :paramtype tuesday: bool + :keyword wednesday: Indicates if the Chaos Schedule Job will run on Wednesday. + :paramtype wednesday: bool + :keyword thursday: Indicates if the Chaos Schedule Job will run on Thursday. + :paramtype thursday: bool + :keyword friday: Indicates if the Chaos Schedule Job will run on Friday. + :paramtype friday: bool + :keyword saturday: Indicates if the Chaos Schedule Job will run on Saturday. + :paramtype saturday: bool + """ + super(ChaosScheduleJobActiveDaysOfWeek, self).__init__(**kwargs) + self.sunday = sunday + self.monday = monday + self.tuesday = tuesday + self.wednesday = wednesday + self.thursday = thursday + self.friday = friday + self.saturday = saturday + + +class ClusterEvent(FabricEvent): + """Represents the base for all Cluster Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ChaosStartedEvent, ChaosStoppedEvent, ClusterHealthReportExpiredEvent, ClusterNewHealthReportEvent, ClusterUpgradeCompletedEvent, ClusterUpgradeDomainCompletedEvent, ClusterUpgradeRollbackCompletedEvent, ClusterUpgradeRollbackStartedEvent, ClusterUpgradeStartedEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + } + + _subtype_map = { + 'kind': {'ChaosStarted': 'ChaosStartedEvent', 'ChaosStopped': 'ChaosStoppedEvent', 'ClusterHealthReportExpired': 'ClusterHealthReportExpiredEvent', 'ClusterNewHealthReport': 'ClusterNewHealthReportEvent', 'ClusterUpgradeCompleted': 'ClusterUpgradeCompletedEvent', 'ClusterUpgradeDomainCompleted': 'ClusterUpgradeDomainCompletedEvent', 'ClusterUpgradeRollbackCompleted': 'ClusterUpgradeRollbackCompletedEvent', 'ClusterUpgradeRollbackStarted': 'ClusterUpgradeRollbackStartedEvent', 'ClusterUpgradeStarted': 'ClusterUpgradeStartedEvent'} + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + """ + super(ClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ClusterEvent' # type: str + + +class ChaosStartedEvent(ClusterEvent): + """Chaos Started event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar max_concurrent_faults: Required. Maximum number of concurrent faults. + :vartype max_concurrent_faults: long + :ivar time_to_run_in_seconds: Required. Time to run in seconds. + :vartype time_to_run_in_seconds: float + :ivar max_cluster_stabilization_timeout_in_seconds: Required. Maximum timeout for cluster + stabilization in seconds. + :vartype max_cluster_stabilization_timeout_in_seconds: float + :ivar wait_time_between_iterations_in_seconds: Required. Wait time between iterations in + seconds. + :vartype wait_time_between_iterations_in_seconds: float + :ivar wait_time_between_faults_in_seconds: Required. Wait time between faults in seconds. + :vartype wait_time_between_faults_in_seconds: float + :ivar move_replica_fault_enabled: Required. Indicates MoveReplica fault is enabled. + :vartype move_replica_fault_enabled: bool + :ivar included_node_type_list: Required. List of included Node types. + :vartype included_node_type_list: str + :ivar included_application_list: Required. List of included Applications. + :vartype included_application_list: str + :ivar cluster_health_policy: Required. Health policy. + :vartype cluster_health_policy: str + :ivar chaos_context: Required. Chaos Context. + :vartype chaos_context: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'max_concurrent_faults': {'required': True}, + 'time_to_run_in_seconds': {'required': True}, + 'max_cluster_stabilization_timeout_in_seconds': {'required': True}, + 'wait_time_between_iterations_in_seconds': {'required': True}, + 'wait_time_between_faults_in_seconds': {'required': True}, + 'move_replica_fault_enabled': {'required': True}, + 'included_node_type_list': {'required': True}, + 'included_application_list': {'required': True}, + 'cluster_health_policy': {'required': True}, + 'chaos_context': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, + 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'float'}, + 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'float'}, + 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'float'}, + 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'float'}, + 'move_replica_fault_enabled': {'key': 'MoveReplicaFaultEnabled', 'type': 'bool'}, + 'included_node_type_list': {'key': 'IncludedNodeTypeList', 'type': 'str'}, + 'included_application_list': {'key': 'IncludedApplicationList', 'type': 'str'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'str'}, + 'chaos_context': {'key': 'ChaosContext', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + max_concurrent_faults: int, + time_to_run_in_seconds: float, + max_cluster_stabilization_timeout_in_seconds: float, + wait_time_between_iterations_in_seconds: float, + wait_time_between_faults_in_seconds: float, + move_replica_fault_enabled: bool, + included_node_type_list: str, + included_application_list: str, + cluster_health_policy: str, + chaos_context: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword max_concurrent_faults: Required. Maximum number of concurrent faults. + :paramtype max_concurrent_faults: long + :keyword time_to_run_in_seconds: Required. Time to run in seconds. + :paramtype time_to_run_in_seconds: float + :keyword max_cluster_stabilization_timeout_in_seconds: Required. Maximum timeout for cluster + stabilization in seconds. + :paramtype max_cluster_stabilization_timeout_in_seconds: float + :keyword wait_time_between_iterations_in_seconds: Required. Wait time between iterations in + seconds. + :paramtype wait_time_between_iterations_in_seconds: float + :keyword wait_time_between_faults_in_seconds: Required. Wait time between faults in seconds. + :paramtype wait_time_between_faults_in_seconds: float + :keyword move_replica_fault_enabled: Required. Indicates MoveReplica fault is enabled. + :paramtype move_replica_fault_enabled: bool + :keyword included_node_type_list: Required. List of included Node types. + :paramtype included_node_type_list: str + :keyword included_application_list: Required. List of included Applications. + :paramtype included_application_list: str + :keyword cluster_health_policy: Required. Health policy. + :paramtype cluster_health_policy: str + :keyword chaos_context: Required. Chaos Context. + :paramtype chaos_context: str + """ + super(ChaosStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ChaosStarted' # type: str + self.max_concurrent_faults = max_concurrent_faults + self.time_to_run_in_seconds = time_to_run_in_seconds + self.max_cluster_stabilization_timeout_in_seconds = max_cluster_stabilization_timeout_in_seconds + self.wait_time_between_iterations_in_seconds = wait_time_between_iterations_in_seconds + self.wait_time_between_faults_in_seconds = wait_time_between_faults_in_seconds + self.move_replica_fault_enabled = move_replica_fault_enabled + self.included_node_type_list = included_node_type_list + self.included_application_list = included_application_list + self.cluster_health_policy = cluster_health_policy + self.chaos_context = chaos_context + + +class ChaosStoppedEvent(ClusterEvent): + """Chaos Stopped event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar reason: Required. Describes reason. + :vartype reason: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'reason': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + reason: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword reason: Required. Describes reason. + :paramtype reason: str + """ + super(ChaosStoppedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ChaosStopped' # type: str + self.reason = reason + + +class ChaosTargetFilter(msrest.serialization.Model): + """Defines all filters for targeted Chaos faults, for example, faulting only certain node types or faulting only certain applications. +If ChaosTargetFilter is not used, Chaos faults all cluster entities. If ChaosTargetFilter is used, Chaos faults only the entities that meet the ChaosTargetFilter +specification. NodeTypeInclusionList and ApplicationInclusionList allow a union semantics only. It is not possible to specify an intersection +of NodeTypeInclusionList and ApplicationInclusionList. For example, it is not possible to specify "fault this application only when it is on that node type." +Once an entity is included in either NodeTypeInclusionList or ApplicationInclusionList, that entity cannot be excluded using ChaosTargetFilter. Even if +applicationX does not appear in ApplicationInclusionList, in some Chaos iteration applicationX can be faulted because it happens to be on a node of nodeTypeY that is included +in NodeTypeInclusionList. If both NodeTypeInclusionList and ApplicationInclusionList are null or empty, an ArgumentException is thrown. + + :ivar node_type_inclusion_list: A list of node types to include in Chaos faults. + All types of faults (restart node, restart code package, remove replica, restart replica, move + primary, and move secondary) are enabled for the nodes of these node types. + If a node type (say NodeTypeX) does not appear in the NodeTypeInclusionList, then node level + faults (like NodeRestart) will never be enabled for the nodes of + NodeTypeX, but code package and replica faults can still be enabled for NodeTypeX if an + application in the ApplicationInclusionList. + happens to reside on a node of NodeTypeX. + At most 100 node type names can be included in this list, to increase this number, a config + upgrade is required for MaxNumberOfNodeTypesInChaosEntityFilter configuration. + :vartype node_type_inclusion_list: list[str] + :ivar application_inclusion_list: A list of application URIs to include in Chaos faults. + All replicas belonging to services of these applications are amenable to replica faults + (restart replica, remove replica, move primary, and move secondary) by Chaos. + Chaos may restart a code package only if the code package hosts replicas of these applications + only. + If an application does not appear in this list, it can still be faulted in some Chaos + iteration if the application ends up on a node of a node type that is included in + NodeTypeInclusionList. + However, if applicationX is tied to nodeTypeY through placement constraints and applicationX + is absent from ApplicationInclusionList and nodeTypeY is absent from NodeTypeInclusionList, + then applicationX will never be faulted. + At most 1000 application names can be included in this list, to increase this number, a config + upgrade is required for MaxNumberOfApplicationsInChaosEntityFilter configuration. + :vartype application_inclusion_list: list[str] + """ + + _attribute_map = { + 'node_type_inclusion_list': {'key': 'NodeTypeInclusionList', 'type': '[str]'}, + 'application_inclusion_list': {'key': 'ApplicationInclusionList', 'type': '[str]'}, + } + + def __init__( + self, + *, + node_type_inclusion_list: Optional[List[str]] = None, + application_inclusion_list: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword node_type_inclusion_list: A list of node types to include in Chaos faults. + All types of faults (restart node, restart code package, remove replica, restart replica, move + primary, and move secondary) are enabled for the nodes of these node types. + If a node type (say NodeTypeX) does not appear in the NodeTypeInclusionList, then node level + faults (like NodeRestart) will never be enabled for the nodes of + NodeTypeX, but code package and replica faults can still be enabled for NodeTypeX if an + application in the ApplicationInclusionList. + happens to reside on a node of NodeTypeX. + At most 100 node type names can be included in this list, to increase this number, a config + upgrade is required for MaxNumberOfNodeTypesInChaosEntityFilter configuration. + :paramtype node_type_inclusion_list: list[str] + :keyword application_inclusion_list: A list of application URIs to include in Chaos faults. + All replicas belonging to services of these applications are amenable to replica faults + (restart replica, remove replica, move primary, and move secondary) by Chaos. + Chaos may restart a code package only if the code package hosts replicas of these applications + only. + If an application does not appear in this list, it can still be faulted in some Chaos + iteration if the application ends up on a node of a node type that is included in + NodeTypeInclusionList. + However, if applicationX is tied to nodeTypeY through placement constraints and applicationX + is absent from ApplicationInclusionList and nodeTypeY is absent from NodeTypeInclusionList, + then applicationX will never be faulted. + At most 1000 application names can be included in this list, to increase this number, a config + upgrade is required for MaxNumberOfApplicationsInChaosEntityFilter configuration. + :paramtype application_inclusion_list: list[str] + """ + super(ChaosTargetFilter, self).__init__(**kwargs) + self.node_type_inclusion_list = node_type_inclusion_list + self.application_inclusion_list = application_inclusion_list + + +class PropertyBatchOperation(msrest.serialization.Model): + """Represents the base type for property operations that can be put into a batch and submitted. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CheckExistsPropertyBatchOperation, CheckSequencePropertyBatchOperation, CheckValuePropertyBatchOperation, DeletePropertyBatchOperation, GetPropertyBatchOperation, PutPropertyBatchOperation. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch operation, determined by the operation to be + performed. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind + :ivar property_name: Required. The name of the Service Fabric property. + :vartype property_name: str + """ + + _validation = { + 'kind': {'required': True}, + 'property_name': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CheckExists': 'CheckExistsPropertyBatchOperation', 'CheckSequence': 'CheckSequencePropertyBatchOperation', 'CheckValue': 'CheckValuePropertyBatchOperation', 'Delete': 'DeletePropertyBatchOperation', 'Get': 'GetPropertyBatchOperation', 'Put': 'PutPropertyBatchOperation'} + } + + def __init__( + self, + *, + property_name: str, + **kwargs + ): + """ + :keyword property_name: Required. The name of the Service Fabric property. + :paramtype property_name: str + """ + super(PropertyBatchOperation, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.property_name = property_name + + +class CheckExistsPropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that compares the Boolean existence of a property with the Exists argument. +The PropertyBatchOperation operation fails if the property's existence is not equal to the Exists argument. +The CheckExistsPropertyBatchOperation is generally used as a precondition for the write operations in the batch. +Note that if one PropertyBatchOperation in a PropertyBatch fails, +the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch operation, determined by the operation to be + performed. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind + :ivar property_name: Required. The name of the Service Fabric property. + :vartype property_name: str + :ivar exists: Required. Whether or not the property should exist for the operation to pass. + :vartype exists: bool + """ + + _validation = { + 'kind': {'required': True}, + 'property_name': {'required': True}, + 'exists': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'exists': {'key': 'Exists', 'type': 'bool'}, + } + + def __init__( + self, + *, + property_name: str, + exists: bool, + **kwargs + ): + """ + :keyword property_name: Required. The name of the Service Fabric property. + :paramtype property_name: str + :keyword exists: Required. Whether or not the property should exist for the operation to pass. + :paramtype exists: bool + """ + super(CheckExistsPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.kind = 'CheckExists' # type: str + self.exists = exists + + +class CheckSequencePropertyBatchOperation(PropertyBatchOperation): + """Compares the Sequence Number of a property with the SequenceNumber argument. +A property's sequence number can be thought of as that property's version. +Every time the property is modified, its sequence number is increased. +The sequence number can be found in a property's metadata. +The comparison fails if the sequence numbers are not equal. +CheckSequencePropertyBatchOperation is generally used as a precondition for the write operations in the batch. +Note that if one PropertyBatchOperation in a PropertyBatch fails, +the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch operation, determined by the operation to be + performed. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind + :ivar property_name: Required. The name of the Service Fabric property. + :vartype property_name: str + :ivar sequence_number: Required. The expected sequence number. + :vartype sequence_number: str + """ + + _validation = { + 'kind': {'required': True}, + 'property_name': {'required': True}, + 'sequence_number': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + } + + def __init__( + self, + *, + property_name: str, + sequence_number: str, + **kwargs + ): + """ + :keyword property_name: Required. The name of the Service Fabric property. + :paramtype property_name: str + :keyword sequence_number: Required. The expected sequence number. + :paramtype sequence_number: str + """ + super(CheckSequencePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.kind = 'CheckSequence' # type: str + self.sequence_number = sequence_number + + +class CheckValuePropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that compares the value of the property with the expected value. +The CheckValuePropertyBatchOperation is generally used as a precondition for the write operations in the batch. +Note that if one PropertyBatchOperation in a PropertyBatch fails, +the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch operation, determined by the operation to be + performed. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind + :ivar property_name: Required. The name of the Service Fabric property. + :vartype property_name: str + :ivar value: Required. The expected property value. + :vartype value: ~azure.servicefabric.models.PropertyValue + """ + + _validation = { + 'kind': {'required': True}, + 'property_name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + } + + def __init__( + self, + *, + property_name: str, + value: "PropertyValue", + **kwargs + ): + """ + :keyword property_name: Required. The name of the Service Fabric property. + :paramtype property_name: str + :keyword value: Required. The expected property value. + :paramtype value: ~azure.servicefabric.models.PropertyValue + """ + super(CheckValuePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.kind = 'CheckValue' # type: str + self.value = value + + +class ClusterConfiguration(msrest.serialization.Model): + """Information about the standalone cluster configuration. + + :ivar cluster_configuration: The contents of the cluster configuration file. + :vartype cluster_configuration: str + """ + + _attribute_map = { + 'cluster_configuration': {'key': 'ClusterConfiguration', 'type': 'str'}, + } + + def __init__( + self, + *, + cluster_configuration: Optional[str] = None, + **kwargs + ): + """ + :keyword cluster_configuration: The contents of the cluster configuration file. + :paramtype cluster_configuration: str + """ + super(ClusterConfiguration, self).__init__(**kwargs) + self.cluster_configuration = cluster_configuration + + +class ClusterConfigurationUpgradeDescription(msrest.serialization.Model): + """Describes the parameters for a standalone cluster configuration upgrade. + + All required parameters must be populated in order to send to Azure. + + :ivar cluster_config: Required. The cluster configuration as a JSON string. For example, `this + file + `_ + contains JSON describing the `nodes and other properties of the cluster + `_. + :vartype cluster_config: str + :ivar health_check_retry_timeout: The length of time between attempts to perform health checks + if the application or cluster is not healthy. + :vartype health_check_retry_timeout: ~datetime.timedelta + :ivar health_check_wait_duration_in_seconds: The length of time to wait after completing an + upgrade domain before starting the health checks process. + :vartype health_check_wait_duration_in_seconds: ~datetime.timedelta + :ivar health_check_stable_duration_in_seconds: The length of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade domain. + :vartype health_check_stable_duration_in_seconds: ~datetime.timedelta + :ivar upgrade_domain_timeout_in_seconds: The timeout for the upgrade domain. + :vartype upgrade_domain_timeout_in_seconds: ~datetime.timedelta + :ivar upgrade_timeout_in_seconds: The upgrade timeout. + :vartype upgrade_timeout_in_seconds: ~datetime.timedelta + :ivar max_percent_unhealthy_applications: The maximum allowed percentage of unhealthy + applications during the upgrade. Allowed values are integer values from zero to 100. + :vartype max_percent_unhealthy_applications: int + :ivar max_percent_unhealthy_nodes: The maximum allowed percentage of unhealthy nodes during the + upgrade. Allowed values are integer values from zero to 100. + :vartype max_percent_unhealthy_nodes: int + :ivar max_percent_delta_unhealthy_nodes: The maximum allowed percentage of delta health + degradation during the upgrade. Allowed values are integer values from zero to 100. + :vartype max_percent_delta_unhealthy_nodes: int + :ivar max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum allowed percentage of + upgrade domain delta health degradation during the upgrade. Allowed values are integer values + from zero to 100. + :vartype max_percent_upgrade_domain_delta_unhealthy_nodes: int + :ivar application_health_policies: Defines the application health policy map used to evaluate + the health of an application or one of its children entities. + :vartype application_health_policies: ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _validation = { + 'cluster_config': {'required': True}, + } + + _attribute_map = { + 'cluster_config': {'key': 'ClusterConfig', 'type': 'str'}, + 'health_check_retry_timeout': {'key': 'HealthCheckRetryTimeout', 'type': 'duration'}, + 'health_check_wait_duration_in_seconds': {'key': 'HealthCheckWaitDurationInSeconds', 'type': 'duration'}, + 'health_check_stable_duration_in_seconds': {'key': 'HealthCheckStableDurationInSeconds', 'type': 'duration'}, + 'upgrade_domain_timeout_in_seconds': {'key': 'UpgradeDomainTimeoutInSeconds', 'type': 'duration'}, + 'upgrade_timeout_in_seconds': {'key': 'UpgradeTimeoutInSeconds', 'type': 'duration'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, + 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__( + self, + *, + cluster_config: str, + health_check_retry_timeout: Optional[datetime.timedelta] = "PT0H0M0S", + health_check_wait_duration_in_seconds: Optional[datetime.timedelta] = "PT0H0M0S", + health_check_stable_duration_in_seconds: Optional[datetime.timedelta] = "PT0H0M0S", + upgrade_domain_timeout_in_seconds: Optional[datetime.timedelta] = "PT0H0M0S", + upgrade_timeout_in_seconds: Optional[datetime.timedelta] = "PT0H0M0S", + max_percent_unhealthy_applications: Optional[int] = 0, + max_percent_unhealthy_nodes: Optional[int] = 0, + max_percent_delta_unhealthy_nodes: Optional[int] = 0, + max_percent_upgrade_domain_delta_unhealthy_nodes: Optional[int] = 0, + application_health_policies: Optional["ApplicationHealthPolicies"] = None, + **kwargs + ): + """ + :keyword cluster_config: Required. The cluster configuration as a JSON string. For example, + `this file + `_ + contains JSON describing the `nodes and other properties of the cluster + `_. + :paramtype cluster_config: str + :keyword health_check_retry_timeout: The length of time between attempts to perform health + checks if the application or cluster is not healthy. + :paramtype health_check_retry_timeout: ~datetime.timedelta + :keyword health_check_wait_duration_in_seconds: The length of time to wait after completing an + upgrade domain before starting the health checks process. + :paramtype health_check_wait_duration_in_seconds: ~datetime.timedelta + :keyword health_check_stable_duration_in_seconds: The length of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade domain. + :paramtype health_check_stable_duration_in_seconds: ~datetime.timedelta + :keyword upgrade_domain_timeout_in_seconds: The timeout for the upgrade domain. + :paramtype upgrade_domain_timeout_in_seconds: ~datetime.timedelta + :keyword upgrade_timeout_in_seconds: The upgrade timeout. + :paramtype upgrade_timeout_in_seconds: ~datetime.timedelta + :keyword max_percent_unhealthy_applications: The maximum allowed percentage of unhealthy + applications during the upgrade. Allowed values are integer values from zero to 100. + :paramtype max_percent_unhealthy_applications: int + :keyword max_percent_unhealthy_nodes: The maximum allowed percentage of unhealthy nodes during + the upgrade. Allowed values are integer values from zero to 100. + :paramtype max_percent_unhealthy_nodes: int + :keyword max_percent_delta_unhealthy_nodes: The maximum allowed percentage of delta health + degradation during the upgrade. Allowed values are integer values from zero to 100. + :paramtype max_percent_delta_unhealthy_nodes: int + :keyword max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum allowed percentage of + upgrade domain delta health degradation during the upgrade. Allowed values are integer values + from zero to 100. + :paramtype max_percent_upgrade_domain_delta_unhealthy_nodes: int + :keyword application_health_policies: Defines the application health policy map used to + evaluate the health of an application or one of its children entities. + :paramtype application_health_policies: ~azure.servicefabric.models.ApplicationHealthPolicies + """ + super(ClusterConfigurationUpgradeDescription, self).__init__(**kwargs) + self.cluster_config = cluster_config + self.health_check_retry_timeout = health_check_retry_timeout + self.health_check_wait_duration_in_seconds = health_check_wait_duration_in_seconds + self.health_check_stable_duration_in_seconds = health_check_stable_duration_in_seconds + self.upgrade_domain_timeout_in_seconds = upgrade_domain_timeout_in_seconds + self.upgrade_timeout_in_seconds = upgrade_timeout_in_seconds + self.max_percent_unhealthy_applications = max_percent_unhealthy_applications + self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes + self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes + self.max_percent_upgrade_domain_delta_unhealthy_nodes = max_percent_upgrade_domain_delta_unhealthy_nodes + self.application_health_policies = application_health_policies + + +class ClusterConfigurationUpgradeStatusInfo(msrest.serialization.Model): + """Information about a standalone cluster configuration upgrade status. + + :ivar upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", + "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", + "RollingForwardInProgress", "RollingForwardCompleted", "Failed". + :vartype upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :ivar progress_status: The cluster manifest version. + :vartype progress_status: int + :ivar config_version: The cluster configuration version. + :vartype config_version: str + :ivar details: The cluster upgrade status details. + :vartype details: str + """ + + _attribute_map = { + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'progress_status': {'key': 'ProgressStatus', 'type': 'int'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'details': {'key': 'Details', 'type': 'str'}, + } + + def __init__( + self, + *, + upgrade_state: Optional[Union[str, "UpgradeState"]] = None, + progress_status: Optional[int] = None, + config_version: Optional[str] = None, + details: Optional[str] = None, + **kwargs + ): + """ + :keyword upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", + "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", + "RollingForwardInProgress", "RollingForwardCompleted", "Failed". + :paramtype upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :keyword progress_status: The cluster manifest version. + :paramtype progress_status: int + :keyword config_version: The cluster configuration version. + :paramtype config_version: str + :keyword details: The cluster upgrade status details. + :paramtype details: str + """ + super(ClusterConfigurationUpgradeStatusInfo, self).__init__(**kwargs) + self.upgrade_state = upgrade_state + self.progress_status = progress_status + self.config_version = config_version + self.details = details + + +class ClusterHealth(EntityHealth): + """Represents the health of the cluster. +Contains the cluster aggregated health state, the cluster application and node health states as well as the health events and the unhealthy evaluations. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar node_health_states: Cluster node health states as found in the health store. + :vartype node_health_states: list[~azure.servicefabric.models.NodeHealthState] + :ivar application_health_states: Cluster application health states as found in the health + store. + :vartype application_health_states: list[~azure.servicefabric.models.ApplicationHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'node_health_states': {'key': 'NodeHealthStates', 'type': '[NodeHealthState]'}, + 'application_health_states': {'key': 'ApplicationHealthStates', 'type': '[ApplicationHealthState]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + health_events: Optional[List["HealthEvent"]] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + health_statistics: Optional["HealthStatistics"] = None, + node_health_states: Optional[List["NodeHealthState"]] = None, + application_health_states: Optional[List["ApplicationHealthState"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword node_health_states: Cluster node health states as found in the health store. + :paramtype node_health_states: list[~azure.servicefabric.models.NodeHealthState] + :keyword application_health_states: Cluster application health states as found in the health + store. + :paramtype application_health_states: list[~azure.servicefabric.models.ApplicationHealthState] + """ + super(ClusterHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.node_health_states = node_health_states + self.application_health_states = application_health_states + + +class ClusterHealthChunk(msrest.serialization.Model): + """Represents the health chunk of the cluster. +Contains the cluster aggregated health state, and the cluster entities that respect the input filter. + + :ivar health_state: The HealthState representing the aggregated health state of the cluster + computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired cluster health policy and the application + health policies. Possible values include: "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar node_health_state_chunks: The list of node health state chunks in the cluster that + respect the filters in the cluster health chunk query description. + :vartype node_health_state_chunks: ~azure.servicefabric.models.NodeHealthStateChunkList + :ivar application_health_state_chunks: The list of application health state chunks in the + cluster that respect the filters in the cluster health chunk query description. + :vartype application_health_state_chunks: + ~azure.servicefabric.models.ApplicationHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_health_state_chunks': {'key': 'NodeHealthStateChunks', 'type': 'NodeHealthStateChunkList'}, + 'application_health_state_chunks': {'key': 'ApplicationHealthStateChunks', 'type': 'ApplicationHealthStateChunkList'}, + } + + def __init__( + self, + *, + health_state: Optional[Union[str, "HealthState"]] = None, + node_health_state_chunks: Optional["NodeHealthStateChunkList"] = None, + application_health_state_chunks: Optional["ApplicationHealthStateChunkList"] = None, + **kwargs + ): + """ + :keyword health_state: The HealthState representing the aggregated health state of the cluster + computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired cluster health policy and the application + health policies. Possible values include: "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword node_health_state_chunks: The list of node health state chunks in the cluster that + respect the filters in the cluster health chunk query description. + :paramtype node_health_state_chunks: ~azure.servicefabric.models.NodeHealthStateChunkList + :keyword application_health_state_chunks: The list of application health state chunks in the + cluster that respect the filters in the cluster health chunk query description. + :paramtype application_health_state_chunks: + ~azure.servicefabric.models.ApplicationHealthStateChunkList + """ + super(ClusterHealthChunk, self).__init__(**kwargs) + self.health_state = health_state + self.node_health_state_chunks = node_health_state_chunks + self.application_health_state_chunks = application_health_state_chunks + + +class ClusterHealthChunkQueryDescription(msrest.serialization.Model): + """The cluster health chunk query description, which can specify the health policies to evaluate cluster health and very expressive filters to select which cluster entities to include in response. + + :ivar node_filters: Defines a list of filters that specify which nodes to be included in the + returned cluster health chunk. + If no filters are specified, no nodes are returned. All the nodes are used to evaluate the + cluster's aggregated health state, regardless of the input filters. + The cluster health chunk query may specify multiple node filters. + For example, it can specify a filter to return all nodes with health state Error and another + filter to always include a node identified by its NodeName. + :vartype node_filters: list[~azure.servicefabric.models.NodeHealthStateFilter] + :ivar application_filters: Defines a list of filters that specify which applications to be + included in the returned cluster health chunk. + If no filters are specified, no applications are returned. All the applications are used to + evaluate the cluster's aggregated health state, regardless of the input filters. + The cluster health chunk query may specify multiple application filters. + For example, it can specify a filter to return all applications with health state Error and + another filter to always include applications of a specified application type. + :vartype application_filters: list[~azure.servicefabric.models.ApplicationHealthStateFilter] + :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster + or of a cluster node. + :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :ivar application_health_policies: Defines the application health policy map used to evaluate + the health of an application or one of its children entities. + :vartype application_health_policies: ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _attribute_map = { + 'node_filters': {'key': 'NodeFilters', 'type': '[NodeHealthStateFilter]'}, + 'application_filters': {'key': 'ApplicationFilters', 'type': '[ApplicationHealthStateFilter]'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__( + self, + *, + node_filters: Optional[List["NodeHealthStateFilter"]] = None, + application_filters: Optional[List["ApplicationHealthStateFilter"]] = None, + cluster_health_policy: Optional["ClusterHealthPolicy"] = None, + application_health_policies: Optional["ApplicationHealthPolicies"] = None, + **kwargs + ): + """ + :keyword node_filters: Defines a list of filters that specify which nodes to be included in the + returned cluster health chunk. + If no filters are specified, no nodes are returned. All the nodes are used to evaluate the + cluster's aggregated health state, regardless of the input filters. + The cluster health chunk query may specify multiple node filters. + For example, it can specify a filter to return all nodes with health state Error and another + filter to always include a node identified by its NodeName. + :paramtype node_filters: list[~azure.servicefabric.models.NodeHealthStateFilter] + :keyword application_filters: Defines a list of filters that specify which applications to be + included in the returned cluster health chunk. + If no filters are specified, no applications are returned. All the applications are used to + evaluate the cluster's aggregated health state, regardless of the input filters. + The cluster health chunk query may specify multiple application filters. + For example, it can specify a filter to return all applications with health state Error and + another filter to always include applications of a specified application type. + :paramtype application_filters: list[~azure.servicefabric.models.ApplicationHealthStateFilter] + :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the + cluster or of a cluster node. + :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :keyword application_health_policies: Defines the application health policy map used to + evaluate the health of an application or one of its children entities. + :paramtype application_health_policies: ~azure.servicefabric.models.ApplicationHealthPolicies + """ + super(ClusterHealthChunkQueryDescription, self).__init__(**kwargs) + self.node_filters = node_filters + self.application_filters = application_filters + self.cluster_health_policy = cluster_health_policy + self.application_health_policies = application_health_policies + + +class ClusterHealthPolicies(msrest.serialization.Model): + """Health policies to evaluate cluster health. + + :ivar application_health_policy_map: Defines a map that contains specific application health + policies for different applications. + Each entry specifies as key the application name and as value an ApplicationHealthPolicy used + to evaluate the application health. + If an application is not specified in the map, the application health evaluation uses the + ApplicationHealthPolicy found in its application manifest or the default application health + policy (if no health policy is defined in the manifest). + The map is empty by default. + :vartype application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster + or of a cluster node. + :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + } + + def __init__( + self, + *, + application_health_policy_map: Optional[List["ApplicationHealthPolicyMapItem"]] = None, + cluster_health_policy: Optional["ClusterHealthPolicy"] = None, + **kwargs + ): + """ + :keyword application_health_policy_map: Defines a map that contains specific application health + policies for different applications. + Each entry specifies as key the application name and as value an ApplicationHealthPolicy used + to evaluate the application health. + If an application is not specified in the map, the application health evaluation uses the + ApplicationHealthPolicy found in its application manifest or the default application health + policy (if no health policy is defined in the manifest). + The map is empty by default. + :paramtype application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the + cluster or of a cluster node. + :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + """ + super(ClusterHealthPolicies, self).__init__(**kwargs) + self.application_health_policy_map = application_health_policy_map + self.cluster_health_policy = cluster_health_policy + + +class ClusterHealthPolicy(msrest.serialization.Model): + """Defines a health policy used to evaluate the health of the cluster or of a cluster node. + + :ivar consider_warning_as_error: Indicates whether warnings are treated with the same severity + as errors. + :vartype consider_warning_as_error: bool + :ivar max_percent_unhealthy_nodes: The maximum allowed percentage of unhealthy nodes before + reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10. + + The percentage represents the maximum tolerated percentage of nodes that can be unhealthy + before the cluster is considered in error. + If the percentage is respected but there is at least one unhealthy node, the health is + evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes over the total number + of nodes in the cluster. + The computation rounds up to tolerate one failure on small numbers of nodes. Default + percentage is zero. + + In large clusters, some nodes will always be down or out for repairs, so this percentage + should be configured to tolerate that. + :vartype max_percent_unhealthy_nodes: int + :ivar max_percent_unhealthy_applications: The maximum allowed percentage of unhealthy + applications before reporting an error. For example, to allow 10% of applications to be + unhealthy, this value would be 10. + + The percentage represents the maximum tolerated percentage of applications that can be + unhealthy before the cluster is considered in error. + If the percentage is respected but there is at least one unhealthy application, the health is + evaluated as Warning. + This is calculated by dividing the number of unhealthy applications over the total number of + application instances in the cluster, excluding applications of application types that are + included in the ApplicationTypeHealthPolicyMap. + The computation rounds up to tolerate one failure on small numbers of applications. Default + percentage is zero. + :vartype max_percent_unhealthy_applications: int + :ivar application_type_health_policy_map: Defines a map with max percentage unhealthy + applications for specific application types. + Each entry specifies as key the application type name and as value an integer that represents + the MaxPercentUnhealthyApplications percentage used to evaluate the applications of the + specified application type. + + The application type health policy map can be used during cluster health evaluation to + describe special application types. + The application types included in the map are evaluated against the percentage specified in + the map, and not with the global MaxPercentUnhealthyApplications defined in the cluster health + policy. + The applications of application types specified in the map are not counted against the global + pool of applications. + For example, if some applications of a type are critical, the cluster administrator can add an + entry to the map for that application type + and assign it a value of 0% (that is, do not tolerate any failures). + All other applications can be evaluated with MaxPercentUnhealthyApplications set to 20% to + tolerate some failures out of the thousands of application instances. + The application type health policy map is used only if the cluster manifest enables + application type health evaluation using the configuration entry for + HealthManager/EnableApplicationTypeHealthEvaluation. + :vartype application_type_health_policy_map: + list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] + :ivar node_type_health_policy_map: Defines a map with max percentage unhealthy nodes for + specific node types. + Each entry specifies as key the node type name and as value an integer that represents the + MaxPercentUnhealthyNodes percentage used to evaluate the nodes of the specified node type. + + The node type health policy map can be used during cluster health evaluation to describe + special node types. + They are evaluated against the percentages associated with their node type name in the map. + Setting this has no impact on the global pool of nodes used for MaxPercentUnhealthyNodes. + The node type health policy map is used only if the cluster manifest enables node type health + evaluation using the configuration entry for HealthManager/EnableNodeTypeHealthEvaluation. + + For example, given a cluster with many nodes of different types, with important work hosted on + node type "SpecialNodeType" that should not tolerate any nodes down. + You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some failures for all + nodes, but for the node type "SpecialNodeType", set the MaxPercentUnhealthyNodes to 0 by + setting the value in the key value pair in NodeTypeHealthPolicyMapItem. The key is the node + type name. + This way, as long as no nodes of type "SpecialNodeType" are in Error state, + even if some of the many nodes in the global pool are in Error state, but below the global + unhealthy percentage, the cluster would be evaluated to Warning. + A Warning health state does not impact cluster upgrade or other monitoring triggered by Error + health state. + But even one node of type SpecialNodeType in Error would make cluster unhealthy (in Error + rather than Warning/Ok), which triggers rollback or pauses the cluster upgrade, depending on + the upgrade configuration. + + Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting SpecialNodeType's + max percent unhealthy nodes to 100, + with one node of type SpecialNodeType in Error state would still put the cluster in an Error + state, since the global restriction is more strict in this case. + :vartype node_type_health_policy_map: + list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] + """ + + _attribute_map = { + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'application_type_health_policy_map': {'key': 'ApplicationTypeHealthPolicyMap', 'type': '[ApplicationTypeHealthPolicyMapItem]'}, + 'node_type_health_policy_map': {'key': 'NodeTypeHealthPolicyMap', 'type': '[NodeTypeHealthPolicyMapItem]'}, + } + + def __init__( + self, + *, + consider_warning_as_error: Optional[bool] = False, + max_percent_unhealthy_nodes: Optional[int] = 0, + max_percent_unhealthy_applications: Optional[int] = 0, + application_type_health_policy_map: Optional[List["ApplicationTypeHealthPolicyMapItem"]] = None, + node_type_health_policy_map: Optional[List["NodeTypeHealthPolicyMapItem"]] = None, + **kwargs + ): + """ + :keyword consider_warning_as_error: Indicates whether warnings are treated with the same + severity as errors. + :paramtype consider_warning_as_error: bool + :keyword max_percent_unhealthy_nodes: The maximum allowed percentage of unhealthy nodes before + reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10. + + The percentage represents the maximum tolerated percentage of nodes that can be unhealthy + before the cluster is considered in error. + If the percentage is respected but there is at least one unhealthy node, the health is + evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes over the total number + of nodes in the cluster. + The computation rounds up to tolerate one failure on small numbers of nodes. Default + percentage is zero. + + In large clusters, some nodes will always be down or out for repairs, so this percentage + should be configured to tolerate that. + :paramtype max_percent_unhealthy_nodes: int + :keyword max_percent_unhealthy_applications: The maximum allowed percentage of unhealthy + applications before reporting an error. For example, to allow 10% of applications to be + unhealthy, this value would be 10. + + The percentage represents the maximum tolerated percentage of applications that can be + unhealthy before the cluster is considered in error. + If the percentage is respected but there is at least one unhealthy application, the health is + evaluated as Warning. + This is calculated by dividing the number of unhealthy applications over the total number of + application instances in the cluster, excluding applications of application types that are + included in the ApplicationTypeHealthPolicyMap. + The computation rounds up to tolerate one failure on small numbers of applications. Default + percentage is zero. + :paramtype max_percent_unhealthy_applications: int + :keyword application_type_health_policy_map: Defines a map with max percentage unhealthy + applications for specific application types. + Each entry specifies as key the application type name and as value an integer that represents + the MaxPercentUnhealthyApplications percentage used to evaluate the applications of the + specified application type. + + The application type health policy map can be used during cluster health evaluation to + describe special application types. + The application types included in the map are evaluated against the percentage specified in + the map, and not with the global MaxPercentUnhealthyApplications defined in the cluster health + policy. + The applications of application types specified in the map are not counted against the global + pool of applications. + For example, if some applications of a type are critical, the cluster administrator can add an + entry to the map for that application type + and assign it a value of 0% (that is, do not tolerate any failures). + All other applications can be evaluated with MaxPercentUnhealthyApplications set to 20% to + tolerate some failures out of the thousands of application instances. + The application type health policy map is used only if the cluster manifest enables + application type health evaluation using the configuration entry for + HealthManager/EnableApplicationTypeHealthEvaluation. + :paramtype application_type_health_policy_map: + list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] + :keyword node_type_health_policy_map: Defines a map with max percentage unhealthy nodes for + specific node types. + Each entry specifies as key the node type name and as value an integer that represents the + MaxPercentUnhealthyNodes percentage used to evaluate the nodes of the specified node type. + + The node type health policy map can be used during cluster health evaluation to describe + special node types. + They are evaluated against the percentages associated with their node type name in the map. + Setting this has no impact on the global pool of nodes used for MaxPercentUnhealthyNodes. + The node type health policy map is used only if the cluster manifest enables node type health + evaluation using the configuration entry for HealthManager/EnableNodeTypeHealthEvaluation. + + For example, given a cluster with many nodes of different types, with important work hosted on + node type "SpecialNodeType" that should not tolerate any nodes down. + You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some failures for all + nodes, but for the node type "SpecialNodeType", set the MaxPercentUnhealthyNodes to 0 by + setting the value in the key value pair in NodeTypeHealthPolicyMapItem. The key is the node + type name. + This way, as long as no nodes of type "SpecialNodeType" are in Error state, + even if some of the many nodes in the global pool are in Error state, but below the global + unhealthy percentage, the cluster would be evaluated to Warning. + A Warning health state does not impact cluster upgrade or other monitoring triggered by Error + health state. + But even one node of type SpecialNodeType in Error would make cluster unhealthy (in Error + rather than Warning/Ok), which triggers rollback or pauses the cluster upgrade, depending on + the upgrade configuration. + + Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting SpecialNodeType's + max percent unhealthy nodes to 100, + with one node of type SpecialNodeType in Error state would still put the cluster in an Error + state, since the global restriction is more strict in this case. + :paramtype node_type_health_policy_map: + list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] + """ + super(ClusterHealthPolicy, self).__init__(**kwargs) + self.consider_warning_as_error = consider_warning_as_error + self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes + self.max_percent_unhealthy_applications = max_percent_unhealthy_applications + self.application_type_health_policy_map = application_type_health_policy_map + self.node_type_health_policy_map = node_type_health_policy_map + + +class ClusterHealthReportExpiredEvent(ClusterEvent): + """Cluster Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(ClusterHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ClusterHealthReportExpired' # type: str + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class ClusterLoadInfo(msrest.serialization.Model): + """Information about load in a Service Fabric cluster. It holds a summary of all metrics and their load in a cluster. + + :ivar last_balancing_start_time_utc: The starting time of last resource balancing run. + :vartype last_balancing_start_time_utc: ~datetime.datetime + :ivar last_balancing_end_time_utc: The end time of last resource balancing run. + :vartype last_balancing_end_time_utc: ~datetime.datetime + :ivar load_metric_information: List that contains metrics and their load information in this + cluster. + :vartype load_metric_information: list[~azure.servicefabric.models.LoadMetricInformation] + """ + + _attribute_map = { + 'last_balancing_start_time_utc': {'key': 'LastBalancingStartTimeUtc', 'type': 'iso-8601'}, + 'last_balancing_end_time_utc': {'key': 'LastBalancingEndTimeUtc', 'type': 'iso-8601'}, + 'load_metric_information': {'key': 'LoadMetricInformation', 'type': '[LoadMetricInformation]'}, + } + + def __init__( + self, + *, + last_balancing_start_time_utc: Optional[datetime.datetime] = None, + last_balancing_end_time_utc: Optional[datetime.datetime] = None, + load_metric_information: Optional[List["LoadMetricInformation"]] = None, + **kwargs + ): + """ + :keyword last_balancing_start_time_utc: The starting time of last resource balancing run. + :paramtype last_balancing_start_time_utc: ~datetime.datetime + :keyword last_balancing_end_time_utc: The end time of last resource balancing run. + :paramtype last_balancing_end_time_utc: ~datetime.datetime + :keyword load_metric_information: List that contains metrics and their load information in this + cluster. + :paramtype load_metric_information: list[~azure.servicefabric.models.LoadMetricInformation] + """ + super(ClusterLoadInfo, self).__init__(**kwargs) + self.last_balancing_start_time_utc = last_balancing_start_time_utc + self.last_balancing_end_time_utc = last_balancing_end_time_utc + self.load_metric_information = load_metric_information + + +class ClusterManifest(msrest.serialization.Model): + """Information about the cluster manifest. + + :ivar manifest: The contents of the cluster manifest file. + :vartype manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__( + self, + *, + manifest: Optional[str] = None, + **kwargs + ): + """ + :keyword manifest: The contents of the cluster manifest file. + :paramtype manifest: str + """ + super(ClusterManifest, self).__init__(**kwargs) + self.manifest = manifest + + +class ClusterNewHealthReportEvent(ClusterEvent): + """Cluster Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(ClusterNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ClusterNewHealthReport' # type: str + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class ClusterUpgradeCompletedEvent(ClusterEvent): + """Cluster Upgrade Completed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar target_cluster_version: Required. Target Cluster version. + :vartype target_cluster_version: str + :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in + milli-seconds. + :vartype overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'target_cluster_version': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + target_cluster_version: str, + overall_upgrade_elapsed_time_in_ms: float, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword target_cluster_version: Required. Target Cluster version. + :paramtype target_cluster_version: str + :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in + milli-seconds. + :paramtype overall_upgrade_elapsed_time_in_ms: float + """ + super(ClusterUpgradeCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ClusterUpgradeCompleted' # type: str + self.target_cluster_version = target_cluster_version + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + + +class ClusterUpgradeDescriptionObject(msrest.serialization.Model): + """Represents a ServiceFabric cluster upgrade. + + :ivar config_version: The cluster configuration version (specified in the cluster manifest). + :vartype config_version: str + :ivar code_version: The ServiceFabric code version of the cluster. + :vartype code_version: str + :ivar upgrade_kind: The kind of upgrade out of the following possible values. Possible values + include: "Invalid", "Rolling". Default value: "Rolling". + :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :vartype upgrade_replica_set_check_timeout_in_seconds: long + :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when + the code version has not changed (the upgrade only changes configuration or data). + :vartype force_restart: bool + :ivar sort_order: Defines the order in which an upgrade proceeds through the cluster. Possible + values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + :vartype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :ivar enable_delta_health_evaluation: When true, enables delta health evaluation rather than + absolute health evaluation after completion of each upgrade domain. + :vartype enable_delta_health_evaluation: bool + :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. + :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster + or of a cluster node. + :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :ivar cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of the + cluster during a cluster upgrade. + :vartype cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :ivar application_health_policy_map: Represents the map of application health policies for a + ServiceFabric cluster upgrade. + :vartype application_health_policy_map: + ~azure.servicefabric.models.ApplicationHealthPolicyMapObject + """ + + _attribute_map = { + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicyMapObject'}, + } + + def __init__( + self, + *, + config_version: Optional[str] = None, + code_version: Optional[str] = None, + upgrade_kind: Optional[Union[str, "UpgradeKind"]] = "Rolling", + rolling_upgrade_mode: Optional[Union[str, "UpgradeMode"]] = "UnmonitoredAuto", + upgrade_replica_set_check_timeout_in_seconds: Optional[int] = 42949672925, + force_restart: Optional[bool] = False, + sort_order: Optional[Union[str, "UpgradeSortOrder"]] = "Default", + enable_delta_health_evaluation: Optional[bool] = None, + monitoring_policy: Optional["MonitoringPolicyDescription"] = None, + cluster_health_policy: Optional["ClusterHealthPolicy"] = None, + cluster_upgrade_health_policy: Optional["ClusterUpgradeHealthPolicyObject"] = None, + application_health_policy_map: Optional["ApplicationHealthPolicyMapObject"] = None, + **kwargs + ): + """ + :keyword config_version: The cluster configuration version (specified in the cluster manifest). + :paramtype config_version: str + :keyword code_version: The ServiceFabric code version of the cluster. + :paramtype code_version: str + :keyword upgrade_kind: The kind of upgrade out of the following possible values. Possible + values include: "Invalid", "Rolling". Default value: "Rolling". + :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :paramtype upgrade_replica_set_check_timeout_in_seconds: long + :keyword force_restart: If true, then processes are forcefully restarted during upgrade even + when the code version has not changed (the upgrade only changes configuration or data). + :paramtype force_restart: bool + :keyword sort_order: Defines the order in which an upgrade proceeds through the cluster. + Possible values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + :paramtype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :keyword enable_delta_health_evaluation: When true, enables delta health evaluation rather than + absolute health evaluation after completion of each upgrade domain. + :paramtype enable_delta_health_evaluation: bool + :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored + mode. + :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the + cluster or of a cluster node. + :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :keyword cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of + the cluster during a cluster upgrade. + :paramtype cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :keyword application_health_policy_map: Represents the map of application health policies for a + ServiceFabric cluster upgrade. + :paramtype application_health_policy_map: + ~azure.servicefabric.models.ApplicationHealthPolicyMapObject + """ + super(ClusterUpgradeDescriptionObject, self).__init__(**kwargs) + self.config_version = config_version + self.code_version = code_version + self.upgrade_kind = upgrade_kind + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.force_restart = force_restart + self.sort_order = sort_order + self.enable_delta_health_evaluation = enable_delta_health_evaluation + self.monitoring_policy = monitoring_policy + self.cluster_health_policy = cluster_health_policy + self.cluster_upgrade_health_policy = cluster_upgrade_health_policy + self.application_health_policy_map = application_health_policy_map + + +class ClusterUpgradeDomainCompletedEvent(ClusterEvent): + """Cluster Upgrade Domain Completed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar target_cluster_version: Required. Target Cluster version. + :vartype target_cluster_version: str + :ivar upgrade_state: Required. State of upgrade. + :vartype upgrade_state: str + :ivar upgrade_domains: Required. Upgrade domains. + :vartype upgrade_domains: str + :ivar upgrade_domain_elapsed_time_in_ms: Required. Duration of domain upgrade in milli-seconds. + :vartype upgrade_domain_elapsed_time_in_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'target_cluster_version': {'required': True}, + 'upgrade_state': {'required': True}, + 'upgrade_domains': {'required': True}, + 'upgrade_domain_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, + 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + target_cluster_version: str, + upgrade_state: str, + upgrade_domains: str, + upgrade_domain_elapsed_time_in_ms: float, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword target_cluster_version: Required. Target Cluster version. + :paramtype target_cluster_version: str + :keyword upgrade_state: Required. State of upgrade. + :paramtype upgrade_state: str + :keyword upgrade_domains: Required. Upgrade domains. + :paramtype upgrade_domains: str + :keyword upgrade_domain_elapsed_time_in_ms: Required. Duration of domain upgrade in + milli-seconds. + :paramtype upgrade_domain_elapsed_time_in_ms: float + """ + super(ClusterUpgradeDomainCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ClusterUpgradeDomainCompleted' # type: str + self.target_cluster_version = target_cluster_version + self.upgrade_state = upgrade_state + self.upgrade_domains = upgrade_domains + self.upgrade_domain_elapsed_time_in_ms = upgrade_domain_elapsed_time_in_ms + + +class ClusterUpgradeHealthPolicyObject(msrest.serialization.Model): + """Defines a health policy used to evaluate the health of the cluster during a cluster upgrade. + + :ivar max_percent_delta_unhealthy_nodes: The maximum allowed percentage of nodes health + degradation allowed during cluster upgrades. The delta is measured between the state of the + nodes at the beginning of upgrade and the state of the nodes at the time of the health + evaluation. The check is performed after every upgrade domain upgrade completion to make sure + the global state of the cluster is within tolerated limits. The default value is 10%. + :vartype max_percent_delta_unhealthy_nodes: int + :ivar max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum allowed percentage of + upgrade domain nodes health degradation allowed during cluster upgrades. The delta is measured + between the state of the upgrade domain nodes at the beginning of upgrade and the state of the + upgrade domain nodes at the time of the health evaluation. The check is performed after every + upgrade domain upgrade completion for all completed upgrade domains to make sure the state of + the upgrade domains is within tolerated limits. The default value is 15%. + :vartype max_percent_upgrade_domain_delta_unhealthy_nodes: int + """ + + _validation = { + 'max_percent_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, + } + + def __init__( + self, + *, + max_percent_delta_unhealthy_nodes: Optional[int] = None, + max_percent_upgrade_domain_delta_unhealthy_nodes: Optional[int] = None, + **kwargs + ): + """ + :keyword max_percent_delta_unhealthy_nodes: The maximum allowed percentage of nodes health + degradation allowed during cluster upgrades. The delta is measured between the state of the + nodes at the beginning of upgrade and the state of the nodes at the time of the health + evaluation. The check is performed after every upgrade domain upgrade completion to make sure + the global state of the cluster is within tolerated limits. The default value is 10%. + :paramtype max_percent_delta_unhealthy_nodes: int + :keyword max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum allowed percentage of + upgrade domain nodes health degradation allowed during cluster upgrades. The delta is measured + between the state of the upgrade domain nodes at the beginning of upgrade and the state of the + upgrade domain nodes at the time of the health evaluation. The check is performed after every + upgrade domain upgrade completion for all completed upgrade domains to make sure the state of + the upgrade domains is within tolerated limits. The default value is 15%. + :paramtype max_percent_upgrade_domain_delta_unhealthy_nodes: int + """ + super(ClusterUpgradeHealthPolicyObject, self).__init__(**kwargs) + self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes + self.max_percent_upgrade_domain_delta_unhealthy_nodes = max_percent_upgrade_domain_delta_unhealthy_nodes + + +class ClusterUpgradeProgressObject(msrest.serialization.Model): + """Information about a cluster upgrade. + + :ivar code_version: The ServiceFabric code version of the cluster. + :vartype code_version: str + :ivar config_version: The cluster configuration version (specified in the cluster manifest). + :vartype config_version: str + :ivar upgrade_domains: List of upgrade domains and their statuses. Not applicable to + node-by-node upgrades. + :vartype upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] + :ivar upgrade_units: List of upgrade units and their statuses. + :vartype upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] + :ivar upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", + "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", + "RollingForwardInProgress", "RollingForwardCompleted", "Failed". + :vartype upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :ivar next_upgrade_domain: The name of the next upgrade domain to be processed. Not applicable + to node-by-node upgrades. + :vartype next_upgrade_domain: str + :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :ivar upgrade_description: Represents a ServiceFabric cluster upgrade. + :vartype upgrade_description: ~azure.servicefabric.models.ClusterUpgradeDescriptionObject + :ivar upgrade_duration_in_milliseconds: The estimated elapsed time spent processing the current + overall upgrade. + :vartype upgrade_duration_in_milliseconds: str + :ivar upgrade_domain_duration_in_milliseconds: The estimated elapsed time spent processing the + current upgrade domain. Not applicable to node-by-node upgrades. + :vartype upgrade_domain_duration_in_milliseconds: str + :ivar unhealthy_evaluations: List of health evaluations that resulted in the current aggregated + health state. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar current_upgrade_domain_progress: Information about the current in-progress upgrade + domain. Not applicable to node-by-node upgrades. + :vartype current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :ivar current_upgrade_units_progress: Information about the current in-progress upgrade units. + :vartype current_upgrade_units_progress: + ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo + :ivar start_timestamp_utc: The start time of the upgrade in UTC. + :vartype start_timestamp_utc: str + :ivar failure_timestamp_utc: The failure time of the upgrade in UTC. + :vartype failure_timestamp_utc: str + :ivar failure_reason: The cause of an upgrade failure that resulted in FailureAction being + executed. Possible values include: "None", "Interrupted", "HealthCheck", + "UpgradeDomainTimeout", "OverallUpgradeTimeout". + :vartype failure_reason: str or ~azure.servicefabric.models.FailureReason + :ivar upgrade_domain_progress_at_failure: The detailed upgrade progress for nodes in the + current upgrade domain at the point of failure. Not applicable to node-by-node upgrades. + :vartype upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailedUpgradeDomainProgressObject + :ivar is_node_by_node: Indicates whether this upgrade is node-by-node. + :vartype is_node_by_node: bool + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, + 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ClusterUpgradeDescriptionObject'}, + 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, + 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailedUpgradeDomainProgressObject'}, + 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, + } + + def __init__( + self, + *, + code_version: Optional[str] = None, + config_version: Optional[str] = None, + upgrade_domains: Optional[List["UpgradeDomainInfo"]] = None, + upgrade_units: Optional[List["UpgradeUnitInfo"]] = None, + upgrade_state: Optional[Union[str, "UpgradeState"]] = None, + next_upgrade_domain: Optional[str] = None, + rolling_upgrade_mode: Optional[Union[str, "UpgradeMode"]] = "UnmonitoredAuto", + upgrade_description: Optional["ClusterUpgradeDescriptionObject"] = None, + upgrade_duration_in_milliseconds: Optional[str] = None, + upgrade_domain_duration_in_milliseconds: Optional[str] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + current_upgrade_domain_progress: Optional["CurrentUpgradeDomainProgressInfo"] = None, + current_upgrade_units_progress: Optional["CurrentUpgradeUnitsProgressInfo"] = None, + start_timestamp_utc: Optional[str] = None, + failure_timestamp_utc: Optional[str] = None, + failure_reason: Optional[Union[str, "FailureReason"]] = None, + upgrade_domain_progress_at_failure: Optional["FailedUpgradeDomainProgressObject"] = None, + is_node_by_node: Optional[bool] = False, + **kwargs + ): + """ + :keyword code_version: The ServiceFabric code version of the cluster. + :paramtype code_version: str + :keyword config_version: The cluster configuration version (specified in the cluster manifest). + :paramtype config_version: str + :keyword upgrade_domains: List of upgrade domains and their statuses. Not applicable to + node-by-node upgrades. + :paramtype upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] + :keyword upgrade_units: List of upgrade units and their statuses. + :paramtype upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] + :keyword upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", + "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", + "RollingForwardInProgress", "RollingForwardCompleted", "Failed". + :paramtype upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :keyword next_upgrade_domain: The name of the next upgrade domain to be processed. Not + applicable to node-by-node upgrades. + :paramtype next_upgrade_domain: str + :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :keyword upgrade_description: Represents a ServiceFabric cluster upgrade. + :paramtype upgrade_description: ~azure.servicefabric.models.ClusterUpgradeDescriptionObject + :keyword upgrade_duration_in_milliseconds: The estimated elapsed time spent processing the + current overall upgrade. + :paramtype upgrade_duration_in_milliseconds: str + :keyword upgrade_domain_duration_in_milliseconds: The estimated elapsed time spent processing + the current upgrade domain. Not applicable to node-by-node upgrades. + :paramtype upgrade_domain_duration_in_milliseconds: str + :keyword unhealthy_evaluations: List of health evaluations that resulted in the current + aggregated health state. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword current_upgrade_domain_progress: Information about the current in-progress upgrade + domain. Not applicable to node-by-node upgrades. + :paramtype current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :keyword current_upgrade_units_progress: Information about the current in-progress upgrade + units. + :paramtype current_upgrade_units_progress: + ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo + :keyword start_timestamp_utc: The start time of the upgrade in UTC. + :paramtype start_timestamp_utc: str + :keyword failure_timestamp_utc: The failure time of the upgrade in UTC. + :paramtype failure_timestamp_utc: str + :keyword failure_reason: The cause of an upgrade failure that resulted in FailureAction being + executed. Possible values include: "None", "Interrupted", "HealthCheck", + "UpgradeDomainTimeout", "OverallUpgradeTimeout". + :paramtype failure_reason: str or ~azure.servicefabric.models.FailureReason + :keyword upgrade_domain_progress_at_failure: The detailed upgrade progress for nodes in the + current upgrade domain at the point of failure. Not applicable to node-by-node upgrades. + :paramtype upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailedUpgradeDomainProgressObject + :keyword is_node_by_node: Indicates whether this upgrade is node-by-node. + :paramtype is_node_by_node: bool + """ + super(ClusterUpgradeProgressObject, self).__init__(**kwargs) + self.code_version = code_version + self.config_version = config_version + self.upgrade_domains = upgrade_domains + self.upgrade_units = upgrade_units + self.upgrade_state = upgrade_state + self.next_upgrade_domain = next_upgrade_domain + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_description = upgrade_description + self.upgrade_duration_in_milliseconds = upgrade_duration_in_milliseconds + self.upgrade_domain_duration_in_milliseconds = upgrade_domain_duration_in_milliseconds + self.unhealthy_evaluations = unhealthy_evaluations + self.current_upgrade_domain_progress = current_upgrade_domain_progress + self.current_upgrade_units_progress = current_upgrade_units_progress + self.start_timestamp_utc = start_timestamp_utc + self.failure_timestamp_utc = failure_timestamp_utc + self.failure_reason = failure_reason + self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure + self.is_node_by_node = is_node_by_node + + +class ClusterUpgradeRollbackCompletedEvent(ClusterEvent): + """Cluster Upgrade Rollback Completed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar target_cluster_version: Required. Target Cluster version. + :vartype target_cluster_version: str + :ivar failure_reason: Required. Describes failure. + :vartype failure_reason: str + :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in + milli-seconds. + :vartype overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'target_cluster_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + target_cluster_version: str, + failure_reason: str, + overall_upgrade_elapsed_time_in_ms: float, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword target_cluster_version: Required. Target Cluster version. + :paramtype target_cluster_version: str + :keyword failure_reason: Required. Describes failure. + :paramtype failure_reason: str + :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in + milli-seconds. + :paramtype overall_upgrade_elapsed_time_in_ms: float + """ + super(ClusterUpgradeRollbackCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ClusterUpgradeRollbackCompleted' # type: str + self.target_cluster_version = target_cluster_version + self.failure_reason = failure_reason + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + + +class ClusterUpgradeRollbackStartedEvent(ClusterEvent): + """Cluster Upgrade Rollback Started event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar target_cluster_version: Required. Target Cluster version. + :vartype target_cluster_version: str + :ivar failure_reason: Required. Describes failure. + :vartype failure_reason: str + :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in + milli-seconds. + :vartype overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'target_cluster_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + target_cluster_version: str, + failure_reason: str, + overall_upgrade_elapsed_time_in_ms: float, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword target_cluster_version: Required. Target Cluster version. + :paramtype target_cluster_version: str + :keyword failure_reason: Required. Describes failure. + :paramtype failure_reason: str + :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in + milli-seconds. + :paramtype overall_upgrade_elapsed_time_in_ms: float + """ + super(ClusterUpgradeRollbackStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ClusterUpgradeRollbackStarted' # type: str + self.target_cluster_version = target_cluster_version + self.failure_reason = failure_reason + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + + +class ClusterUpgradeStartedEvent(ClusterEvent): + """Cluster Upgrade Started event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar current_cluster_version: Required. Current Cluster version. + :vartype current_cluster_version: str + :ivar target_cluster_version: Required. Target Cluster version. + :vartype target_cluster_version: str + :ivar upgrade_type: Required. Type of upgrade. + :vartype upgrade_type: str + :ivar rolling_upgrade_mode: Required. Mode of upgrade. + :vartype rolling_upgrade_mode: str + :ivar failure_action: Required. Action if failed. + :vartype failure_action: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'current_cluster_version': {'required': True}, + 'target_cluster_version': {'required': True}, + 'upgrade_type': {'required': True}, + 'rolling_upgrade_mode': {'required': True}, + 'failure_action': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'current_cluster_version': {'key': 'CurrentClusterVersion', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + current_cluster_version: str, + target_cluster_version: str, + upgrade_type: str, + rolling_upgrade_mode: str, + failure_action: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword current_cluster_version: Required. Current Cluster version. + :paramtype current_cluster_version: str + :keyword target_cluster_version: Required. Target Cluster version. + :paramtype target_cluster_version: str + :keyword upgrade_type: Required. Type of upgrade. + :paramtype upgrade_type: str + :keyword rolling_upgrade_mode: Required. Mode of upgrade. + :paramtype rolling_upgrade_mode: str + :keyword failure_action: Required. Action if failed. + :paramtype failure_action: str + """ + super(ClusterUpgradeStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ClusterUpgradeStarted' # type: str + self.current_cluster_version = current_cluster_version + self.target_cluster_version = target_cluster_version + self.upgrade_type = upgrade_type + self.rolling_upgrade_mode = rolling_upgrade_mode + self.failure_action = failure_action + + +class ClusterVersion(msrest.serialization.Model): + """The cluster version. + + :ivar version: The Service Fabric cluster runtime version. + :vartype version: str + """ + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__( + self, + *, + version: Optional[str] = None, + **kwargs + ): + """ + :keyword version: The Service Fabric cluster runtime version. + :paramtype version: str + """ + super(ClusterVersion, self).__init__(**kwargs) + self.version = version + + +class CodePackageEntryPoint(msrest.serialization.Model): + """Information about setup or main entry point of a code package deployed on a Service Fabric node. + + :ivar entry_point_location: The location of entry point executable on the node. + :vartype entry_point_location: str + :ivar process_id: The process ID of the entry point. + :vartype process_id: str + :ivar run_as_user_name: The user name under which entry point executable is run on the node. + :vartype run_as_user_name: str + :ivar code_package_entry_point_statistics: Statistics about setup or main entry point of a + code package deployed on a Service Fabric node. + :vartype code_package_entry_point_statistics: + ~azure.servicefabric.models.CodePackageEntryPointStatistics + :ivar status: Specifies the status of the code package entry point deployed on a Service Fabric + node. Possible values include: "Invalid", "Pending", "Starting", "Started", "Stopping", + "Stopped". + :vartype status: str or ~azure.servicefabric.models.EntryPointStatus + :ivar next_activation_time: The time (in UTC) when the entry point executable will be run next. + :vartype next_activation_time: ~datetime.datetime + :ivar instance_id: The instance ID for current running entry point. For a code package setup + entry point (if specified) runs first and after it finishes main entry point is started. Each + time entry point executable is run, its instance id will change. + :vartype instance_id: str + :ivar container_id: The container ID of the entry point. Only valid for container hosts. + :vartype container_id: str + """ + + _attribute_map = { + 'entry_point_location': {'key': 'EntryPointLocation', 'type': 'str'}, + 'process_id': {'key': 'ProcessId', 'type': 'str'}, + 'run_as_user_name': {'key': 'RunAsUserName', 'type': 'str'}, + 'code_package_entry_point_statistics': {'key': 'CodePackageEntryPointStatistics', 'type': 'CodePackageEntryPointStatistics'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'next_activation_time': {'key': 'NextActivationTime', 'type': 'iso-8601'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + 'container_id': {'key': 'ContainerId', 'type': 'str'}, + } + + def __init__( + self, + *, + entry_point_location: Optional[str] = None, + process_id: Optional[str] = None, + run_as_user_name: Optional[str] = None, + code_package_entry_point_statistics: Optional["CodePackageEntryPointStatistics"] = None, + status: Optional[Union[str, "EntryPointStatus"]] = None, + next_activation_time: Optional[datetime.datetime] = None, + instance_id: Optional[str] = None, + container_id: Optional[str] = None, + **kwargs + ): + """ + :keyword entry_point_location: The location of entry point executable on the node. + :paramtype entry_point_location: str + :keyword process_id: The process ID of the entry point. + :paramtype process_id: str + :keyword run_as_user_name: The user name under which entry point executable is run on the node. + :paramtype run_as_user_name: str + :keyword code_package_entry_point_statistics: Statistics about setup or main entry point of a + code package deployed on a Service Fabric node. + :paramtype code_package_entry_point_statistics: + ~azure.servicefabric.models.CodePackageEntryPointStatistics + :keyword status: Specifies the status of the code package entry point deployed on a Service + Fabric node. Possible values include: "Invalid", "Pending", "Starting", "Started", "Stopping", + "Stopped". + :paramtype status: str or ~azure.servicefabric.models.EntryPointStatus + :keyword next_activation_time: The time (in UTC) when the entry point executable will be run + next. + :paramtype next_activation_time: ~datetime.datetime + :keyword instance_id: The instance ID for current running entry point. For a code package setup + entry point (if specified) runs first and after it finishes main entry point is started. Each + time entry point executable is run, its instance id will change. + :paramtype instance_id: str + :keyword container_id: The container ID of the entry point. Only valid for container hosts. + :paramtype container_id: str + """ + super(CodePackageEntryPoint, self).__init__(**kwargs) + self.entry_point_location = entry_point_location + self.process_id = process_id + self.run_as_user_name = run_as_user_name + self.code_package_entry_point_statistics = code_package_entry_point_statistics + self.status = status + self.next_activation_time = next_activation_time + self.instance_id = instance_id + self.container_id = container_id + + +class CodePackageEntryPointStatistics(msrest.serialization.Model): + """Statistics about setup or main entry point of a code package deployed on a Service Fabric node. + + :ivar last_exit_code: The last exit code of the entry point. + :vartype last_exit_code: str + :ivar last_activation_time: The last time (in UTC) when Service Fabric attempted to run the + entry point. + :vartype last_activation_time: ~datetime.datetime + :ivar last_exit_time: The last time (in UTC) when the entry point finished running. + :vartype last_exit_time: ~datetime.datetime + :ivar last_successful_activation_time: The last time (in UTC) when the entry point ran + successfully. + :vartype last_successful_activation_time: ~datetime.datetime + :ivar last_successful_exit_time: The last time (in UTC) when the entry point finished running + gracefully. + :vartype last_successful_exit_time: ~datetime.datetime + :ivar activation_count: Number of times the entry point has run. + :vartype activation_count: str + :ivar activation_failure_count: Number of times the entry point failed to run. + :vartype activation_failure_count: str + :ivar continuous_activation_failure_count: Number of times the entry point continuously failed + to run. + :vartype continuous_activation_failure_count: str + :ivar exit_count: Number of times the entry point finished running. + :vartype exit_count: str + :ivar exit_failure_count: Number of times the entry point failed to exit gracefully. + :vartype exit_failure_count: str + :ivar continuous_exit_failure_count: Number of times the entry point continuously failed to + exit gracefully. + :vartype continuous_exit_failure_count: str + """ + + _attribute_map = { + 'last_exit_code': {'key': 'LastExitCode', 'type': 'str'}, + 'last_activation_time': {'key': 'LastActivationTime', 'type': 'iso-8601'}, + 'last_exit_time': {'key': 'LastExitTime', 'type': 'iso-8601'}, + 'last_successful_activation_time': {'key': 'LastSuccessfulActivationTime', 'type': 'iso-8601'}, + 'last_successful_exit_time': {'key': 'LastSuccessfulExitTime', 'type': 'iso-8601'}, + 'activation_count': {'key': 'ActivationCount', 'type': 'str'}, + 'activation_failure_count': {'key': 'ActivationFailureCount', 'type': 'str'}, + 'continuous_activation_failure_count': {'key': 'ContinuousActivationFailureCount', 'type': 'str'}, + 'exit_count': {'key': 'ExitCount', 'type': 'str'}, + 'exit_failure_count': {'key': 'ExitFailureCount', 'type': 'str'}, + 'continuous_exit_failure_count': {'key': 'ContinuousExitFailureCount', 'type': 'str'}, + } + + def __init__( + self, + *, + last_exit_code: Optional[str] = None, + last_activation_time: Optional[datetime.datetime] = None, + last_exit_time: Optional[datetime.datetime] = None, + last_successful_activation_time: Optional[datetime.datetime] = None, + last_successful_exit_time: Optional[datetime.datetime] = None, + activation_count: Optional[str] = None, + activation_failure_count: Optional[str] = None, + continuous_activation_failure_count: Optional[str] = None, + exit_count: Optional[str] = None, + exit_failure_count: Optional[str] = None, + continuous_exit_failure_count: Optional[str] = None, + **kwargs + ): + """ + :keyword last_exit_code: The last exit code of the entry point. + :paramtype last_exit_code: str + :keyword last_activation_time: The last time (in UTC) when Service Fabric attempted to run the + entry point. + :paramtype last_activation_time: ~datetime.datetime + :keyword last_exit_time: The last time (in UTC) when the entry point finished running. + :paramtype last_exit_time: ~datetime.datetime + :keyword last_successful_activation_time: The last time (in UTC) when the entry point ran + successfully. + :paramtype last_successful_activation_time: ~datetime.datetime + :keyword last_successful_exit_time: The last time (in UTC) when the entry point finished + running gracefully. + :paramtype last_successful_exit_time: ~datetime.datetime + :keyword activation_count: Number of times the entry point has run. + :paramtype activation_count: str + :keyword activation_failure_count: Number of times the entry point failed to run. + :paramtype activation_failure_count: str + :keyword continuous_activation_failure_count: Number of times the entry point continuously + failed to run. + :paramtype continuous_activation_failure_count: str + :keyword exit_count: Number of times the entry point finished running. + :paramtype exit_count: str + :keyword exit_failure_count: Number of times the entry point failed to exit gracefully. + :paramtype exit_failure_count: str + :keyword continuous_exit_failure_count: Number of times the entry point continuously failed to + exit gracefully. + :paramtype continuous_exit_failure_count: str + """ + super(CodePackageEntryPointStatistics, self).__init__(**kwargs) + self.last_exit_code = last_exit_code + self.last_activation_time = last_activation_time + self.last_exit_time = last_exit_time + self.last_successful_activation_time = last_successful_activation_time + self.last_successful_exit_time = last_successful_exit_time + self.activation_count = activation_count + self.activation_failure_count = activation_failure_count + self.continuous_activation_failure_count = continuous_activation_failure_count + self.exit_count = exit_count + self.exit_failure_count = exit_failure_count + self.continuous_exit_failure_count = continuous_exit_failure_count + + +class ComposeDeploymentStatusInfo(msrest.serialization.Model): + """Information about a Service Fabric compose deployment. + + :ivar name: The name of the deployment. + :vartype name: str + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar status: The status of the compose deployment. Possible values include: "Invalid", + "Provisioning", "Creating", "Ready", "Unprovisioning", "Deleting", "Failed", "Upgrading". + :vartype status: str or ~azure.servicefabric.models.ComposeDeploymentStatus + :ivar status_details: The status details of compose deployment including failure message. + :vartype status_details: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + application_name: Optional[str] = None, + status: Optional[Union[str, "ComposeDeploymentStatus"]] = None, + status_details: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The name of the deployment. + :paramtype name: str + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword status: The status of the compose deployment. Possible values include: "Invalid", + "Provisioning", "Creating", "Ready", "Unprovisioning", "Deleting", "Failed", "Upgrading". + :paramtype status: str or ~azure.servicefabric.models.ComposeDeploymentStatus + :keyword status_details: The status details of compose deployment including failure message. + :paramtype status_details: str + """ + super(ComposeDeploymentStatusInfo, self).__init__(**kwargs) + self.name = name + self.application_name = application_name + self.status = status + self.status_details = status_details + + +class ComposeDeploymentUpgradeDescription(msrest.serialization.Model): + """Describes the parameters for a compose deployment upgrade. + + All required parameters must be populated in order to send to Azure. + + :ivar deployment_name: Required. The name of the deployment. + :vartype deployment_name: str + :ivar compose_file_content: Required. The content of the compose file that describes the + deployment to create. + :vartype compose_file_content: str + :ivar registry_credential: Credential information to connect to container registry. + :vartype registry_credential: ~azure.servicefabric.models.RegistryCredential + :ivar upgrade_kind: Required. The kind of upgrade out of the following possible values. + Possible values include: "Invalid", "Rolling". Default value: "Rolling". + :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :vartype upgrade_replica_set_check_timeout_in_seconds: long + :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when + the code version has not changed (the upgrade only changes configuration or data). + :vartype force_restart: bool + :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. + :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :ivar application_health_policy: Defines a health policy used to evaluate the health of an + application or one of its children entities. + :vartype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + """ + + _validation = { + 'deployment_name': {'required': True}, + 'compose_file_content': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, + 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + } + + def __init__( + self, + *, + deployment_name: str, + compose_file_content: str, + upgrade_kind: Union[str, "UpgradeKind"] = "Rolling", + registry_credential: Optional["RegistryCredential"] = None, + rolling_upgrade_mode: Optional[Union[str, "UpgradeMode"]] = "UnmonitoredAuto", + upgrade_replica_set_check_timeout_in_seconds: Optional[int] = 42949672925, + force_restart: Optional[bool] = False, + monitoring_policy: Optional["MonitoringPolicyDescription"] = None, + application_health_policy: Optional["ApplicationHealthPolicy"] = None, + **kwargs + ): + """ + :keyword deployment_name: Required. The name of the deployment. + :paramtype deployment_name: str + :keyword compose_file_content: Required. The content of the compose file that describes the + deployment to create. + :paramtype compose_file_content: str + :keyword registry_credential: Credential information to connect to container registry. + :paramtype registry_credential: ~azure.servicefabric.models.RegistryCredential + :keyword upgrade_kind: Required. The kind of upgrade out of the following possible values. + Possible values include: "Invalid", "Rolling". Default value: "Rolling". + :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :paramtype upgrade_replica_set_check_timeout_in_seconds: long + :keyword force_restart: If true, then processes are forcefully restarted during upgrade even + when the code version has not changed (the upgrade only changes configuration or data). + :paramtype force_restart: bool + :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored + mode. + :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :keyword application_health_policy: Defines a health policy used to evaluate the health of an + application or one of its children entities. + :paramtype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + """ + super(ComposeDeploymentUpgradeDescription, self).__init__(**kwargs) + self.deployment_name = deployment_name + self.compose_file_content = compose_file_content + self.registry_credential = registry_credential + self.upgrade_kind = upgrade_kind + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.force_restart = force_restart + self.monitoring_policy = monitoring_policy + self.application_health_policy = application_health_policy + + +class ComposeDeploymentUpgradeProgressInfo(msrest.serialization.Model): + """Describes the parameters for a compose deployment upgrade. + + :ivar deployment_name: The name of the target deployment. + :vartype deployment_name: str + :ivar application_name: The name of the target application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar upgrade_state: The state of the compose deployment upgrade. Possible values include: + "Invalid", "ProvisioningTarget", "RollingForwardInProgress", "RollingForwardPending", + "UnprovisioningCurrent", "RollingForwardCompleted", "RollingBackInProgress", + "UnprovisioningTarget", "RollingBackCompleted", "Failed". + :vartype upgrade_state: str or ~azure.servicefabric.models.ComposeDeploymentUpgradeState + :ivar upgrade_status_details: Additional detailed information about the status of the pending + upgrade. + :vartype upgrade_status_details: str + :ivar upgrade_kind: The kind of upgrade out of the following possible values. Possible values + include: "Invalid", "Rolling". Default value: "Rolling". + :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when + the code version has not changed (the upgrade only changes configuration or data). + :vartype force_restart: bool + :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :vartype upgrade_replica_set_check_timeout_in_seconds: long + :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. + :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :ivar application_health_policy: Defines a health policy used to evaluate the health of an + application or one of its children entities. + :vartype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :ivar target_application_type_version: The target application type version (found in the + application manifest) for the application upgrade. + :vartype target_application_type_version: str + :ivar upgrade_duration: The estimated amount of time that the overall upgrade elapsed. It is + first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :vartype upgrade_duration: str + :ivar current_upgrade_domain_duration: The estimated amount of time spent processing current + Upgrade Domain. It is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of milliseconds. + :vartype current_upgrade_domain_duration: str + :ivar application_unhealthy_evaluations: List of health evaluations that resulted in the + current aggregated health state. + :vartype application_unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar current_upgrade_domain_progress: Information about the current in-progress upgrade + domain. Not applicable to node-by-node upgrades. + :vartype current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :ivar start_timestamp_utc: The estimated UTC datetime when the upgrade started. + :vartype start_timestamp_utc: str + :ivar failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and + FailureAction was executed. + :vartype failure_timestamp_utc: str + :ivar failure_reason: The cause of an upgrade failure that resulted in FailureAction being + executed. Possible values include: "None", "Interrupted", "HealthCheck", + "UpgradeDomainTimeout", "OverallUpgradeTimeout". + :vartype failure_reason: str or ~azure.servicefabric.models.FailureReason + :ivar upgrade_domain_progress_at_failure: Information about the upgrade domain progress at the + time of upgrade failure. + :vartype upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo + :ivar application_upgrade_status_details: Additional details of application upgrade including + failure message. + :vartype application_upgrade_status_details: str + """ + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + 'current_upgrade_domain_duration': {'key': 'CurrentUpgradeDomainDuration', 'type': 'str'}, + 'application_unhealthy_evaluations': {'key': 'ApplicationUnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, + 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, + } + + def __init__( + self, + *, + deployment_name: Optional[str] = None, + application_name: Optional[str] = None, + upgrade_state: Optional[Union[str, "ComposeDeploymentUpgradeState"]] = None, + upgrade_status_details: Optional[str] = None, + upgrade_kind: Optional[Union[str, "UpgradeKind"]] = "Rolling", + rolling_upgrade_mode: Optional[Union[str, "UpgradeMode"]] = "UnmonitoredAuto", + force_restart: Optional[bool] = False, + upgrade_replica_set_check_timeout_in_seconds: Optional[int] = 42949672925, + monitoring_policy: Optional["MonitoringPolicyDescription"] = None, + application_health_policy: Optional["ApplicationHealthPolicy"] = None, + target_application_type_version: Optional[str] = None, + upgrade_duration: Optional[str] = "PT0H2M0S", + current_upgrade_domain_duration: Optional[str] = "PT0H2M0S", + application_unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + current_upgrade_domain_progress: Optional["CurrentUpgradeDomainProgressInfo"] = None, + start_timestamp_utc: Optional[str] = None, + failure_timestamp_utc: Optional[str] = None, + failure_reason: Optional[Union[str, "FailureReason"]] = None, + upgrade_domain_progress_at_failure: Optional["FailureUpgradeDomainProgressInfo"] = None, + application_upgrade_status_details: Optional[str] = None, + **kwargs + ): + """ + :keyword deployment_name: The name of the target deployment. + :paramtype deployment_name: str + :keyword application_name: The name of the target application, including the 'fabric:' URI + scheme. + :paramtype application_name: str + :keyword upgrade_state: The state of the compose deployment upgrade. Possible values include: + "Invalid", "ProvisioningTarget", "RollingForwardInProgress", "RollingForwardPending", + "UnprovisioningCurrent", "RollingForwardCompleted", "RollingBackInProgress", + "UnprovisioningTarget", "RollingBackCompleted", "Failed". + :paramtype upgrade_state: str or ~azure.servicefabric.models.ComposeDeploymentUpgradeState + :keyword upgrade_status_details: Additional detailed information about the status of the + pending upgrade. + :paramtype upgrade_status_details: str + :keyword upgrade_kind: The kind of upgrade out of the following possible values. Possible + values include: "Invalid", "Rolling". Default value: "Rolling". + :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :keyword force_restart: If true, then processes are forcefully restarted during upgrade even + when the code version has not changed (the upgrade only changes configuration or data). + :paramtype force_restart: bool + :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :paramtype upgrade_replica_set_check_timeout_in_seconds: long + :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored + mode. + :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :keyword application_health_policy: Defines a health policy used to evaluate the health of an + application or one of its children entities. + :paramtype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword target_application_type_version: The target application type version (found in the + application manifest) for the application upgrade. + :paramtype target_application_type_version: str + :keyword upgrade_duration: The estimated amount of time that the overall upgrade elapsed. It is + first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :paramtype upgrade_duration: str + :keyword current_upgrade_domain_duration: The estimated amount of time spent processing current + Upgrade Domain. It is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of milliseconds. + :paramtype current_upgrade_domain_duration: str + :keyword application_unhealthy_evaluations: List of health evaluations that resulted in the + current aggregated health state. + :paramtype application_unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword current_upgrade_domain_progress: Information about the current in-progress upgrade + domain. Not applicable to node-by-node upgrades. + :paramtype current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :keyword start_timestamp_utc: The estimated UTC datetime when the upgrade started. + :paramtype start_timestamp_utc: str + :keyword failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and + FailureAction was executed. + :paramtype failure_timestamp_utc: str + :keyword failure_reason: The cause of an upgrade failure that resulted in FailureAction being + executed. Possible values include: "None", "Interrupted", "HealthCheck", + "UpgradeDomainTimeout", "OverallUpgradeTimeout". + :paramtype failure_reason: str or ~azure.servicefabric.models.FailureReason + :keyword upgrade_domain_progress_at_failure: Information about the upgrade domain progress at + the time of upgrade failure. + :paramtype upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo + :keyword application_upgrade_status_details: Additional details of application upgrade + including failure message. + :paramtype application_upgrade_status_details: str + """ + super(ComposeDeploymentUpgradeProgressInfo, self).__init__(**kwargs) + self.deployment_name = deployment_name + self.application_name = application_name + self.upgrade_state = upgrade_state + self.upgrade_status_details = upgrade_status_details + self.upgrade_kind = upgrade_kind + self.rolling_upgrade_mode = rolling_upgrade_mode + self.force_restart = force_restart + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.monitoring_policy = monitoring_policy + self.application_health_policy = application_health_policy + self.target_application_type_version = target_application_type_version + self.upgrade_duration = upgrade_duration + self.current_upgrade_domain_duration = current_upgrade_domain_duration + self.application_unhealthy_evaluations = application_unhealthy_evaluations + self.current_upgrade_domain_progress = current_upgrade_domain_progress + self.start_timestamp_utc = start_timestamp_utc + self.failure_timestamp_utc = failure_timestamp_utc + self.failure_reason = failure_reason + self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure + self.application_upgrade_status_details = application_upgrade_status_details + + +class ConfigParameterOverride(msrest.serialization.Model): + """Information about a configuration parameter override. + + All required parameters must be populated in order to send to Azure. + + :ivar section_name: Required. Name of the section for the parameter override. + :vartype section_name: str + :ivar parameter_name: Required. Name of the parameter that has been overridden. + :vartype parameter_name: str + :ivar parameter_value: Required. Value of the overridden parameter. + :vartype parameter_value: str + :ivar timeout: The duration until config override is considered as valid. + :vartype timeout: ~datetime.timedelta + :ivar persist_across_upgrade: A value that indicates whether config override will be removed on + upgrade or will still be considered as valid. + :vartype persist_across_upgrade: bool + """ + + _validation = { + 'section_name': {'required': True}, + 'parameter_name': {'required': True}, + 'parameter_value': {'required': True}, + } + + _attribute_map = { + 'section_name': {'key': 'SectionName', 'type': 'str'}, + 'parameter_name': {'key': 'ParameterName', 'type': 'str'}, + 'parameter_value': {'key': 'ParameterValue', 'type': 'str'}, + 'timeout': {'key': 'Timeout', 'type': 'duration'}, + 'persist_across_upgrade': {'key': 'PersistAcrossUpgrade', 'type': 'bool'}, + } + + def __init__( + self, + *, + section_name: str, + parameter_name: str, + parameter_value: str, + timeout: Optional[datetime.timedelta] = None, + persist_across_upgrade: Optional[bool] = None, + **kwargs + ): + """ + :keyword section_name: Required. Name of the section for the parameter override. + :paramtype section_name: str + :keyword parameter_name: Required. Name of the parameter that has been overridden. + :paramtype parameter_name: str + :keyword parameter_value: Required. Value of the overridden parameter. + :paramtype parameter_value: str + :keyword timeout: The duration until config override is considered as valid. + :paramtype timeout: ~datetime.timedelta + :keyword persist_across_upgrade: A value that indicates whether config override will be removed + on upgrade or will still be considered as valid. + :paramtype persist_across_upgrade: bool + """ + super(ConfigParameterOverride, self).__init__(**kwargs) + self.section_name = section_name + self.parameter_name = parameter_name + self.parameter_value = parameter_value + self.timeout = timeout + self.persist_across_upgrade = persist_across_upgrade + + +class ContainerApiRequestBody(msrest.serialization.Model): + """parameters for making container API call. + + All required parameters must be populated in order to send to Azure. + + :ivar http_verb: HTTP verb of container REST API, defaults to "GET". + :vartype http_verb: str + :ivar uri_path: Required. URI path of container REST API. + :vartype uri_path: str + :ivar content_type: Content type of container REST API request, defaults to "application/json". + :vartype content_type: str + :ivar body: HTTP request body of container REST API. + :vartype body: str + """ + + _validation = { + 'uri_path': {'required': True}, + } + + _attribute_map = { + 'http_verb': {'key': 'HttpVerb', 'type': 'str'}, + 'uri_path': {'key': 'UriPath', 'type': 'str'}, + 'content_type': {'key': 'Content-Type', 'type': 'str'}, + 'body': {'key': 'Body', 'type': 'str'}, + } + + def __init__( + self, + *, + uri_path: str, + http_verb: Optional[str] = None, + content_type: Optional[str] = None, + body: Optional[str] = None, + **kwargs + ): + """ + :keyword http_verb: HTTP verb of container REST API, defaults to "GET". + :paramtype http_verb: str + :keyword uri_path: Required. URI path of container REST API. + :paramtype uri_path: str + :keyword content_type: Content type of container REST API request, defaults to + "application/json". + :paramtype content_type: str + :keyword body: HTTP request body of container REST API. + :paramtype body: str + """ + super(ContainerApiRequestBody, self).__init__(**kwargs) + self.http_verb = http_verb + self.uri_path = uri_path + self.content_type = content_type + self.body = body + + +class ContainerApiResponse(msrest.serialization.Model): + """Response body that wraps container API result. + + All required parameters must be populated in order to send to Azure. + + :ivar container_api_result: Required. Container API result. + :vartype container_api_result: ~azure.servicefabric.models.ContainerApiResult + """ + + _validation = { + 'container_api_result': {'required': True}, + } + + _attribute_map = { + 'container_api_result': {'key': 'ContainerApiResult', 'type': 'ContainerApiResult'}, + } + + def __init__( + self, + *, + container_api_result: "ContainerApiResult", + **kwargs + ): + """ + :keyword container_api_result: Required. Container API result. + :paramtype container_api_result: ~azure.servicefabric.models.ContainerApiResult + """ + super(ContainerApiResponse, self).__init__(**kwargs) + self.container_api_result = container_api_result + + +class ContainerApiResult(msrest.serialization.Model): + """Container API result. + + All required parameters must be populated in order to send to Azure. + + :ivar status: Required. HTTP status code returned by the target container API. + :vartype status: int + :ivar content_type: HTTP content type. + :vartype content_type: str + :ivar content_encoding: HTTP content encoding. + :vartype content_encoding: str + :ivar body: container API result body. + :vartype body: str + """ + + _validation = { + 'status': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'Status', 'type': 'int'}, + 'content_type': {'key': 'Content-Type', 'type': 'str'}, + 'content_encoding': {'key': 'Content-Encoding', 'type': 'str'}, + 'body': {'key': 'Body', 'type': 'str'}, + } + + def __init__( + self, + *, + status: int, + content_type: Optional[str] = None, + content_encoding: Optional[str] = None, + body: Optional[str] = None, + **kwargs + ): + """ + :keyword status: Required. HTTP status code returned by the target container API. + :paramtype status: int + :keyword content_type: HTTP content type. + :paramtype content_type: str + :keyword content_encoding: HTTP content encoding. + :paramtype content_encoding: str + :keyword body: container API result body. + :paramtype body: str + """ + super(ContainerApiResult, self).__init__(**kwargs) + self.status = status + self.content_type = content_type + self.content_encoding = content_encoding + self.body = body + + +class ContainerCodePackageProperties(msrest.serialization.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. + + :ivar name: Required. The name of the code package. + :vartype name: str + :ivar image: Required. The Container image to use. + :vartype image: str + :ivar image_registry_credential: Image registry credential. + :vartype image_registry_credential: ~azure.servicefabric.models.ImageRegistryCredential + :ivar entry_point: Override for the default entry point in the container. + :vartype entry_point: str + :ivar commands: Command array to execute within the container in exec form. + :vartype commands: list[str] + :ivar environment_variables: The environment variables to set in this container. + :vartype environment_variables: list[~azure.servicefabric.models.EnvironmentVariable] + :ivar 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". + :vartype settings: list[~azure.servicefabric.models.Setting] + :ivar labels: The labels to set in this container. + :vartype labels: list[~azure.servicefabric.models.ContainerLabel] + :ivar endpoints: The endpoints exposed by this container. + :vartype endpoints: list[~azure.servicefabric.models.EndpointProperties] + :ivar resources: Required. The resources required by this container. + :vartype resources: ~azure.servicefabric.models.ResourceRequirements + :ivar volume_refs: Volumes to be attached to the container. The lifetime of these volumes is + independent of the application's lifetime. + :vartype volume_refs: list[~azure.servicefabric.models.VolumeReference] + :ivar volumes: Volumes to be attached to the container. The lifetime of these volumes is scoped + to the application's lifetime. + :vartype volumes: list[~azure.servicefabric.models.ApplicationScopedVolume] + :ivar diagnostics: Reference to sinks in DiagnosticsDescription. + :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :ivar reliable_collections_refs: A list of ReliableCollection resources used by this particular + code package. Please refer to ReliableCollectionsRef for more details. + :vartype reliable_collections_refs: list[~azure.servicefabric.models.ReliableCollectionsRef] + :ivar instance_view: Runtime information of a container instance. + :vartype instance_view: ~azure.servicefabric.models.ContainerInstanceView + :ivar liveness_probe: An array of liveness probes for a code package. It determines when to + restart a code package. + :vartype liveness_probe: list[~azure.servicefabric.models.Probe] + :ivar readiness_probe: An array of readiness probes for a code package. It determines when to + unpublish an endpoint. + :vartype readiness_probe: list[~azure.servicefabric.models.Probe] + """ + + _validation = { + 'name': {'required': True}, + 'image': {'required': True}, + 'resources': {'required': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'image': {'key': 'image', 'type': 'str'}, + 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, + 'entry_point': {'key': 'entryPoint', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[str]'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'}, + 'settings': {'key': 'settings', 'type': '[Setting]'}, + 'labels': {'key': 'labels', 'type': '[ContainerLabel]'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointProperties]'}, + 'resources': {'key': 'resources', 'type': 'ResourceRequirements'}, + 'volume_refs': {'key': 'volumeRefs', 'type': '[VolumeReference]'}, + 'volumes': {'key': 'volumes', 'type': '[ApplicationScopedVolume]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + 'reliable_collections_refs': {'key': 'reliableCollectionsRefs', 'type': '[ReliableCollectionsRef]'}, + 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, + 'liveness_probe': {'key': 'livenessProbe', 'type': '[Probe]'}, + 'readiness_probe': {'key': 'readinessProbe', 'type': '[Probe]'}, + } + + def __init__( + self, + *, + name: str, + image: str, + resources: "ResourceRequirements", + image_registry_credential: Optional["ImageRegistryCredential"] = None, + entry_point: Optional[str] = None, + commands: Optional[List[str]] = None, + environment_variables: Optional[List["EnvironmentVariable"]] = None, + settings: Optional[List["Setting"]] = None, + labels: Optional[List["ContainerLabel"]] = None, + endpoints: Optional[List["EndpointProperties"]] = None, + volume_refs: Optional[List["VolumeReference"]] = None, + volumes: Optional[List["ApplicationScopedVolume"]] = None, + diagnostics: Optional["DiagnosticsRef"] = None, + reliable_collections_refs: Optional[List["ReliableCollectionsRef"]] = None, + liveness_probe: Optional[List["Probe"]] = None, + readiness_probe: Optional[List["Probe"]] = None, + **kwargs + ): + """ + :keyword name: Required. The name of the code package. + :paramtype name: str + :keyword image: Required. The Container image to use. + :paramtype image: str + :keyword image_registry_credential: Image registry credential. + :paramtype image_registry_credential: ~azure.servicefabric.models.ImageRegistryCredential + :keyword entry_point: Override for the default entry point in the container. + :paramtype entry_point: str + :keyword commands: Command array to execute within the container in exec form. + :paramtype commands: list[str] + :keyword environment_variables: The environment variables to set in this container. + :paramtype environment_variables: list[~azure.servicefabric.models.EnvironmentVariable] + :keyword 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". + :paramtype settings: list[~azure.servicefabric.models.Setting] + :keyword labels: The labels to set in this container. + :paramtype labels: list[~azure.servicefabric.models.ContainerLabel] + :keyword endpoints: The endpoints exposed by this container. + :paramtype endpoints: list[~azure.servicefabric.models.EndpointProperties] + :keyword resources: Required. The resources required by this container. + :paramtype resources: ~azure.servicefabric.models.ResourceRequirements + :keyword volume_refs: Volumes to be attached to the container. The lifetime of these volumes is + independent of the application's lifetime. + :paramtype volume_refs: list[~azure.servicefabric.models.VolumeReference] + :keyword volumes: Volumes to be attached to the container. The lifetime of these volumes is + scoped to the application's lifetime. + :paramtype volumes: list[~azure.servicefabric.models.ApplicationScopedVolume] + :keyword diagnostics: Reference to sinks in DiagnosticsDescription. + :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :keyword reliable_collections_refs: A list of ReliableCollection resources used by this + particular code package. Please refer to ReliableCollectionsRef for more details. + :paramtype reliable_collections_refs: list[~azure.servicefabric.models.ReliableCollectionsRef] + :keyword liveness_probe: An array of liveness probes for a code package. It determines when to + restart a code package. + :paramtype liveness_probe: list[~azure.servicefabric.models.Probe] + :keyword readiness_probe: An array of readiness probes for a code package. It determines when + to unpublish an endpoint. + :paramtype readiness_probe: list[~azure.servicefabric.models.Probe] + """ + super(ContainerCodePackageProperties, self).__init__(**kwargs) + self.name = name + self.image = image + self.image_registry_credential = image_registry_credential + self.entry_point = entry_point + self.commands = commands + self.environment_variables = environment_variables + self.settings = settings + self.labels = labels + self.endpoints = endpoints + self.resources = resources + self.volume_refs = volume_refs + self.volumes = volumes + self.diagnostics = diagnostics + self.reliable_collections_refs = reliable_collections_refs + self.instance_view = None + self.liveness_probe = liveness_probe + self.readiness_probe = readiness_probe + + +class ContainerEvent(msrest.serialization.Model): + """A container event. + + :ivar name: The name of the container event. + :vartype name: str + :ivar count: The count of the event. + :vartype count: int + :ivar first_timestamp: Date/time of the first event. + :vartype first_timestamp: str + :ivar last_timestamp: Date/time of the last event. + :vartype last_timestamp: str + :ivar message: The event message. + :vartype message: str + :ivar type: The event type. + :vartype 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: Optional[str] = None, + count: Optional[int] = None, + first_timestamp: Optional[str] = None, + last_timestamp: Optional[str] = None, + message: Optional[str] = None, + type: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The name of the container event. + :paramtype name: str + :keyword count: The count of the event. + :paramtype count: int + :keyword first_timestamp: Date/time of the first event. + :paramtype first_timestamp: str + :keyword last_timestamp: Date/time of the last event. + :paramtype last_timestamp: str + :keyword message: The event message. + :paramtype message: str + :keyword type: The event type. + :paramtype type: str + """ + super(ContainerEvent, self).__init__(**kwargs) + self.name = name + self.count = count + self.first_timestamp = first_timestamp + self.last_timestamp = last_timestamp + self.message = message + self.type = type + + +class ContainerInstanceEvent(FabricEvent): + """Represents the base for all Container Events. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + """ + super(ContainerInstanceEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ContainerInstanceEvent' # type: str + + +class ContainerInstanceView(msrest.serialization.Model): + """Runtime information of a container instance. + + :ivar restart_count: The number of times the container has been restarted. + :vartype restart_count: int + :ivar current_state: Current container instance state. + :vartype current_state: ~azure.servicefabric.models.ContainerState + :ivar previous_state: Previous container instance state. + :vartype previous_state: ~azure.servicefabric.models.ContainerState + :ivar events: The events of this container instance. + :vartype 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: Optional[int] = None, + current_state: Optional["ContainerState"] = None, + previous_state: Optional["ContainerState"] = None, + events: Optional[List["ContainerEvent"]] = None, + **kwargs + ): + """ + :keyword restart_count: The number of times the container has been restarted. + :paramtype restart_count: int + :keyword current_state: Current container instance state. + :paramtype current_state: ~azure.servicefabric.models.ContainerState + :keyword previous_state: Previous container instance state. + :paramtype previous_state: ~azure.servicefabric.models.ContainerState + :keyword events: The events of this container instance. + :paramtype events: list[~azure.servicefabric.models.ContainerEvent] + """ + super(ContainerInstanceView, self).__init__(**kwargs) + self.restart_count = restart_count + self.current_state = current_state + self.previous_state = previous_state + self.events = events + + +class ContainerLabel(msrest.serialization.Model): + """Describes a container label. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the container label. + :vartype name: str + :ivar value: Required. The value of the container label. + :vartype 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 + ): + """ + :keyword name: Required. The name of the container label. + :paramtype name: str + :keyword value: Required. The value of the container label. + :paramtype value: str + """ + super(ContainerLabel, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ContainerLogs(msrest.serialization.Model): + """Container logs. + + :ivar content: Container logs. + :vartype content: str + """ + + _attribute_map = { + 'content': {'key': 'Content', 'type': 'str'}, + } + + def __init__( + self, + *, + content: Optional[str] = None, + **kwargs + ): + """ + :keyword content: Container logs. + :paramtype content: str + """ + super(ContainerLogs, self).__init__(**kwargs) + self.content = content + + +class ContainerState(msrest.serialization.Model): + """The container state. + + :ivar state: The state of this container. + :vartype state: str + :ivar start_time: Date/time when the container state started. + :vartype start_time: ~datetime.datetime + :ivar exit_code: The container exit code. + :vartype exit_code: str + :ivar finish_time: Date/time when the container state finished. + :vartype finish_time: ~datetime.datetime + :ivar detail_status: Human-readable status of this state. + :vartype 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: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + exit_code: Optional[str] = None, + finish_time: Optional[datetime.datetime] = None, + detail_status: Optional[str] = None, + **kwargs + ): + """ + :keyword state: The state of this container. + :paramtype state: str + :keyword start_time: Date/time when the container state started. + :paramtype start_time: ~datetime.datetime + :keyword exit_code: The container exit code. + :paramtype exit_code: str + :keyword finish_time: Date/time when the container state finished. + :paramtype finish_time: ~datetime.datetime + :keyword detail_status: Human-readable status of this state. + :paramtype detail_status: str + """ + super(ContainerState, self).__init__(**kwargs) + self.state = state + self.start_time = start_time + self.exit_code = exit_code + self.finish_time = finish_time + self.detail_status = detail_status + + +class CreateComposeDeploymentDescription(msrest.serialization.Model): + """Defines description for creating a Service Fabric compose deployment. + + All required parameters must be populated in order to send to Azure. + + :ivar deployment_name: Required. The name of the deployment. + :vartype deployment_name: str + :ivar compose_file_content: Required. The content of the compose file that describes the + deployment to create. + :vartype compose_file_content: str + :ivar registry_credential: Credential information to connect to container registry. + :vartype registry_credential: ~azure.servicefabric.models.RegistryCredential + """ + + _validation = { + 'deployment_name': {'required': True}, + 'compose_file_content': {'required': True}, + } + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, + 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, + } + + def __init__( + self, + *, + deployment_name: str, + compose_file_content: str, + registry_credential: Optional["RegistryCredential"] = None, + **kwargs + ): + """ + :keyword deployment_name: Required. The name of the deployment. + :paramtype deployment_name: str + :keyword compose_file_content: Required. The content of the compose file that describes the + deployment to create. + :paramtype compose_file_content: str + :keyword registry_credential: Credential information to connect to container registry. + :paramtype registry_credential: ~azure.servicefabric.models.RegistryCredential + """ + super(CreateComposeDeploymentDescription, self).__init__(**kwargs) + self.deployment_name = deployment_name + self.compose_file_content = compose_file_content + self.registry_credential = registry_credential + + +class CurrentUpgradeDomainProgressInfo(msrest.serialization.Model): + """Information about the current in-progress upgrade domain. Not applicable to node-by-node upgrades. + + :ivar domain_name: The name of the upgrade domain. + :vartype domain_name: str + :ivar node_upgrade_progress_list: List of upgrading nodes and their statuses. + :vartype node_upgrade_progress_list: list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__( + self, + *, + domain_name: Optional[str] = None, + node_upgrade_progress_list: Optional[List["NodeUpgradeProgressInfo"]] = None, + **kwargs + ): + """ + :keyword domain_name: The name of the upgrade domain. + :paramtype domain_name: str + :keyword node_upgrade_progress_list: List of upgrading nodes and their statuses. + :paramtype node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + super(CurrentUpgradeDomainProgressInfo, self).__init__(**kwargs) + self.domain_name = domain_name + self.node_upgrade_progress_list = node_upgrade_progress_list + + +class CurrentUpgradeUnitsProgressInfo(msrest.serialization.Model): + """Information about the current in-progress upgrade units. + + :ivar domain_name: The name of the upgrade domain. Not applicable to node-by-node upgrades. + :vartype domain_name: str + :ivar node_upgrade_progress_list: List of upgrading nodes and their statuses. + :vartype node_upgrade_progress_list: list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__( + self, + *, + domain_name: Optional[str] = None, + node_upgrade_progress_list: Optional[List["NodeUpgradeProgressInfo"]] = None, + **kwargs + ): + """ + :keyword domain_name: The name of the upgrade domain. Not applicable to node-by-node upgrades. + :paramtype domain_name: str + :keyword node_upgrade_progress_list: List of upgrading nodes and their statuses. + :paramtype node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + super(CurrentUpgradeUnitsProgressInfo, self).__init__(**kwargs) + self.domain_name = domain_name + self.node_upgrade_progress_list = node_upgrade_progress_list + + +class DeactivationIntentDescription(msrest.serialization.Model): + """Describes the intent or reason for deactivating the node. + + :ivar deactivation_intent: Describes the intent or reason for deactivating the node. The + possible values are following. Possible values include: "Pause", "Restart", "RemoveData". + :vartype deactivation_intent: str or ~azure.servicefabric.models.DeactivationIntent + """ + + _attribute_map = { + 'deactivation_intent': {'key': 'DeactivationIntent', 'type': 'str'}, + } + + def __init__( + self, + *, + deactivation_intent: Optional[Union[str, "DeactivationIntent"]] = None, + **kwargs + ): + """ + :keyword deactivation_intent: Describes the intent or reason for deactivating the node. The + possible values are following. Possible values include: "Pause", "Restart", "RemoveData". + :paramtype deactivation_intent: str or ~azure.servicefabric.models.DeactivationIntent + """ + super(DeactivationIntentDescription, self).__init__(**kwargs) + self.deactivation_intent = deactivation_intent + + +class ExecutionPolicy(msrest.serialization.Model): + """The execution policy of the service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DefaultExecutionPolicy, RunToCompletionExecutionPolicy. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Enumerates the execution policy types for services.Constant filled by + server. Possible values include: "Default", "RunToCompletion". + :vartype type: str or ~azure.servicefabric.models.ExecutionPolicyType + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Default': 'DefaultExecutionPolicy', 'RunToCompletion': 'RunToCompletionExecutionPolicy'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ExecutionPolicy, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + +class DefaultExecutionPolicy(ExecutionPolicy): + """The default execution policy. Always restart the service if an exit occurs. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Enumerates the execution policy types for services.Constant filled by + server. Possible values include: "Default", "RunToCompletion". + :vartype type: str or ~azure.servicefabric.models.ExecutionPolicyType + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(DefaultExecutionPolicy, self).__init__(**kwargs) + self.type = 'Default' # type: str + + +class DeletePropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that deletes a specified property if it exists. +Note that if one PropertyBatchOperation in a PropertyBatch fails, +the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch operation, determined by the operation to be + performed. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind + :ivar property_name: Required. The name of the Service Fabric property. + :vartype property_name: str + """ + + _validation = { + 'kind': {'required': True}, + 'property_name': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + } + + def __init__( + self, + *, + property_name: str, + **kwargs + ): + """ + :keyword property_name: Required. The name of the Service Fabric property. + :paramtype property_name: str + """ + super(DeletePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.kind = 'Delete' # type: str + + +class DeltaNodesCheckHealthEvaluation(HealthEvaluation): + """Represents health evaluation for delta nodes, containing health evaluations for each unhealthy node that impacted current aggregated health state. +Can be returned during cluster upgrade when the aggregated health state of the cluster is Warning or Error. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar baseline_error_count: Number of nodes with aggregated heath state Error in the health + store at the beginning of the cluster upgrade. + :vartype baseline_error_count: long + :ivar baseline_total_count: Total number of nodes in the health store at the beginning of the + cluster upgrade. + :vartype baseline_total_count: long + :ivar max_percent_delta_unhealthy_nodes: Maximum allowed percentage of delta unhealthy nodes + from the ClusterUpgradeHealthPolicy. + :vartype max_percent_delta_unhealthy_nodes: int + :ivar total_count: Total number of nodes in the health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. + Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, + 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + baseline_error_count: Optional[int] = None, + baseline_total_count: Optional[int] = None, + max_percent_delta_unhealthy_nodes: Optional[int] = None, + total_count: Optional[int] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword baseline_error_count: Number of nodes with aggregated heath state Error in the health + store at the beginning of the cluster upgrade. + :paramtype baseline_error_count: long + :keyword baseline_total_count: Total number of nodes in the health store at the beginning of + the cluster upgrade. + :paramtype baseline_total_count: long + :keyword max_percent_delta_unhealthy_nodes: Maximum allowed percentage of delta unhealthy nodes + from the ClusterUpgradeHealthPolicy. + :paramtype max_percent_delta_unhealthy_nodes: int + :keyword total_count: Total number of nodes in the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. + Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(DeltaNodesCheckHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'DeltaNodesCheck' # type: str + self.baseline_error_count = baseline_error_count + self.baseline_total_count = baseline_total_count + self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + + +class DeployedApplicationHealth(EntityHealth): + """Information about the health of an application deployed on a Service Fabric node. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar name: Name of the application deployed on the node whose health information is described + by this object. + :vartype name: str + :ivar node_name: Name of the node where this application is deployed. + :vartype node_name: str + :ivar deployed_service_package_health_states: Deployed service package health states for the + current deployed application as found in the health store. + :vartype deployed_service_package_health_states: + list[~azure.servicefabric.models.DeployedServicePackageHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'deployed_service_package_health_states': {'key': 'DeployedServicePackageHealthStates', 'type': '[DeployedServicePackageHealthState]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + health_events: Optional[List["HealthEvent"]] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + health_statistics: Optional["HealthStatistics"] = None, + name: Optional[str] = None, + node_name: Optional[str] = None, + deployed_service_package_health_states: Optional[List["DeployedServicePackageHealthState"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword name: Name of the application deployed on the node whose health information is + described by this object. + :paramtype name: str + :keyword node_name: Name of the node where this application is deployed. + :paramtype node_name: str + :keyword deployed_service_package_health_states: Deployed service package health states for the + current deployed application as found in the health store. + :paramtype deployed_service_package_health_states: + list[~azure.servicefabric.models.DeployedServicePackageHealthState] + """ + super(DeployedApplicationHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.name = name + self.node_name = node_name + self.deployed_service_package_health_states = deployed_service_package_health_states + + +class DeployedApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a deployed application, containing information about the data and the algorithm used by the health store to evaluate health. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar node_name: Name of the node where the application is deployed to. + :vartype node_name: str + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated + health state of the deployed application. + The types of the unhealthy evaluations can be DeployedServicePackagesHealthEvaluation or + EventHealthEvaluation. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + node_name: Optional[str] = None, + application_name: Optional[str] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword node_name: Name of the node where the application is deployed to. + :paramtype node_name: str + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current + aggregated health state of the deployed application. + The types of the unhealthy evaluations can be DeployedServicePackagesHealthEvaluation or + EventHealthEvaluation. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(DeployedApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'DeployedApplication' # type: str + self.node_name = node_name + self.application_name = application_name + self.unhealthy_evaluations = unhealthy_evaluations + + +class DeployedApplicationHealthReportExpiredEvent(ApplicationEvent): + """Deployed Application Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_instance_id: Required. Id of Application instance. + :vartype application_instance_id: long + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + application_id: str, + application_instance_id: int, + node_name: str, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_instance_id: Required. Id of Application instance. + :paramtype application_instance_id: long + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(DeployedApplicationHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.kind = 'DeployedApplicationHealthReportExpired' # type: str + self.application_instance_id = application_instance_id + self.node_name = node_name + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class DeployedApplicationHealthState(EntityHealthState): + """Represents the health state of a deployed application, which contains the entity identifier and the aggregated health state. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar node_name: Name of the node on which the service package is deployed. + :vartype node_name: str + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + node_name: Optional[str] = None, + application_name: Optional[str] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword node_name: Name of the node on which the service package is deployed. + :paramtype node_name: str + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + """ + super(DeployedApplicationHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.node_name = node_name + self.application_name = application_name + + +class DeployedApplicationHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a deployed application, which contains the node where the application is deployed, the aggregated health state and any deployed service packages that respect the chunk query description filters. + + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar node_name: The name of node where the application is deployed. + :vartype node_name: str + :ivar deployed_service_package_health_state_chunks: The list of deployed service package health + state chunks belonging to the deployed application that respect the filters in the cluster + health chunk query description. + :vartype deployed_service_package_health_state_chunks: + ~azure.servicefabric.models.DeployedServicePackageHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'deployed_service_package_health_state_chunks': {'key': 'DeployedServicePackageHealthStateChunks', 'type': 'DeployedServicePackageHealthStateChunkList'}, + } + + def __init__( + self, + *, + health_state: Optional[Union[str, "HealthState"]] = None, + node_name: Optional[str] = None, + deployed_service_package_health_state_chunks: Optional["DeployedServicePackageHealthStateChunkList"] = None, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword node_name: The name of node where the application is deployed. + :paramtype node_name: str + :keyword deployed_service_package_health_state_chunks: The list of deployed service package + health state chunks belonging to the deployed application that respect the filters in the + cluster health chunk query description. + :paramtype deployed_service_package_health_state_chunks: + ~azure.servicefabric.models.DeployedServicePackageHealthStateChunkList + """ + super(DeployedApplicationHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.node_name = node_name + self.deployed_service_package_health_state_chunks = deployed_service_package_health_state_chunks + + +class DeployedApplicationHealthStateChunkList(msrest.serialization.Model): + """The list of deployed application health state chunks that respect the input filters in the chunk query. Returned by get cluster health state chunks query. + + :ivar items: The list of deployed application health state chunks that respect the input + filters in the chunk query. + :vartype items: list[~azure.servicefabric.models.DeployedApplicationHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[DeployedApplicationHealthStateChunk]'}, + } + + def __init__( + self, + *, + items: Optional[List["DeployedApplicationHealthStateChunk"]] = None, + **kwargs + ): + """ + :keyword items: The list of deployed application health state chunks that respect the input + filters in the chunk query. + :paramtype items: list[~azure.servicefabric.models.DeployedApplicationHealthStateChunk] + """ + super(DeployedApplicationHealthStateChunkList, self).__init__(**kwargs) + self.items = items + + +class DeployedApplicationHealthStateFilter(msrest.serialization.Model): + """Defines matching criteria to determine whether a deployed application should be included as a child of an application in the cluster health chunk. +The deployed applications are only returned if the parent application matches a filter specified in the cluster health chunk query description. +One filter can match zero, one or multiple deployed applications, depending on its properties. + + :ivar node_name_filter: The name of the node where the application is deployed in order to + match the filter. + If specified, the filter is applied only to the application deployed on the specified node. + If the application is not deployed on the node with the specified name, no deployed + application is returned in the cluster health chunk based on this filter. + Otherwise, the deployed application is included in the cluster health chunk if it respects the + other filter properties. + If not specified, all deployed applications that match the parent filters (if any) are taken + into consideration and matched against the other filter members, like health state filter. + :vartype node_name_filter: str + :ivar health_state_filter: The filter for the health state of the deployed applications. It + allows selecting deployed applications if they match the desired health states. + The possible values are integer value of one of the following health states. Only deployed + applications that match the filter are returned. All deployed applications are used to evaluate + the cluster aggregated health state. + If not specified, default value is None, unless the node name is specified. If the filter has + default value and node name is specified, the matching deployed application is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches deployed applications with HealthState + value of OK (2) and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :vartype health_state_filter: int + :ivar deployed_service_package_filters: Defines a list of filters that specify which deployed + service packages to be included in the returned cluster health chunk as children of the parent + deployed application. The deployed service packages are returned only if the parent deployed + application matches a filter. + If the list is empty, no deployed service packages are returned. All the deployed service + packages are used to evaluate the parent deployed application aggregated health state, + regardless of the input filters. + The deployed application filter may specify multiple deployed service package filters. + For example, it can specify a filter to return all deployed service packages with health state + Error and another filter to always include a deployed service package on a node. + :vartype deployed_service_package_filters: + list[~azure.servicefabric.models.DeployedServicePackageHealthStateFilter] + """ + + _attribute_map = { + 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'deployed_service_package_filters': {'key': 'DeployedServicePackageFilters', 'type': '[DeployedServicePackageHealthStateFilter]'}, + } + + def __init__( + self, + *, + node_name_filter: Optional[str] = None, + health_state_filter: Optional[int] = 0, + deployed_service_package_filters: Optional[List["DeployedServicePackageHealthStateFilter"]] = None, + **kwargs + ): + """ + :keyword node_name_filter: The name of the node where the application is deployed in order to + match the filter. + If specified, the filter is applied only to the application deployed on the specified node. + If the application is not deployed on the node with the specified name, no deployed + application is returned in the cluster health chunk based on this filter. + Otherwise, the deployed application is included in the cluster health chunk if it respects the + other filter properties. + If not specified, all deployed applications that match the parent filters (if any) are taken + into consideration and matched against the other filter members, like health state filter. + :paramtype node_name_filter: str + :keyword health_state_filter: The filter for the health state of the deployed applications. It + allows selecting deployed applications if they match the desired health states. + The possible values are integer value of one of the following health states. Only deployed + applications that match the filter are returned. All deployed applications are used to evaluate + the cluster aggregated health state. + If not specified, default value is None, unless the node name is specified. If the filter has + default value and node name is specified, the matching deployed application is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches deployed applications with HealthState + value of OK (2) and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :paramtype health_state_filter: int + :keyword deployed_service_package_filters: Defines a list of filters that specify which + deployed service packages to be included in the returned cluster health chunk as children of + the parent deployed application. The deployed service packages are returned only if the parent + deployed application matches a filter. + If the list is empty, no deployed service packages are returned. All the deployed service + packages are used to evaluate the parent deployed application aggregated health state, + regardless of the input filters. + The deployed application filter may specify multiple deployed service package filters. + For example, it can specify a filter to return all deployed service packages with health state + Error and another filter to always include a deployed service package on a node. + :paramtype deployed_service_package_filters: + list[~azure.servicefabric.models.DeployedServicePackageHealthStateFilter] + """ + super(DeployedApplicationHealthStateFilter, self).__init__(**kwargs) + self.node_name_filter = node_name_filter + self.health_state_filter = health_state_filter + self.deployed_service_package_filters = deployed_service_package_filters + + +class DeployedApplicationInfo(msrest.serialization.Model): + """Information about application deployed on the node. + + :ivar id: The identity of the application. This is an encoded representation of the application + name. This is used in the REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype id: str + :ivar name: The name of the application, including the 'fabric:' URI scheme. + :vartype name: str + :ivar type_name: The application type name as defined in the application manifest. + :vartype type_name: str + :ivar type_version: The version of the application type as defined in the application manifest. + :vartype type_version: str + :ivar status: The status of the application deployed on the node. Following are the possible + values. Possible values include: "Invalid", "Downloading", "Activating", "Active", "Upgrading", + "Deactivating". + :vartype status: str or ~azure.servicefabric.models.DeployedApplicationStatus + :ivar work_directory: The work directory of the application on the node. The work directory can + be used to store application data. + :vartype work_directory: str + :ivar log_directory: The log directory of the application on the node. The log directory can be + used to store application logs. + :vartype log_directory: str + :ivar temp_directory: The temp directory of the application on the node. The code packages + belonging to the application are forked with this directory set as their temporary directory. + :vartype temp_directory: str + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'type_version': {'key': 'TypeVersion', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'work_directory': {'key': 'WorkDirectory', 'type': 'str'}, + 'log_directory': {'key': 'LogDirectory', 'type': 'str'}, + 'temp_directory': {'key': 'TempDirectory', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type_name: Optional[str] = None, + type_version: Optional[str] = None, + status: Optional[Union[str, "DeployedApplicationStatus"]] = None, + work_directory: Optional[str] = None, + log_directory: Optional[str] = None, + temp_directory: Optional[str] = None, + health_state: Optional[Union[str, "HealthState"]] = None, + **kwargs + ): + """ + :keyword id: The identity of the application. This is an encoded representation of the + application name. This is used in the REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype id: str + :keyword name: The name of the application, including the 'fabric:' URI scheme. + :paramtype name: str + :keyword type_name: The application type name as defined in the application manifest. + :paramtype type_name: str + :keyword type_version: The version of the application type as defined in the application + manifest. + :paramtype type_version: str + :keyword status: The status of the application deployed on the node. Following are the possible + values. Possible values include: "Invalid", "Downloading", "Activating", "Active", "Upgrading", + "Deactivating". + :paramtype status: str or ~azure.servicefabric.models.DeployedApplicationStatus + :keyword work_directory: The work directory of the application on the node. The work directory + can be used to store application data. + :paramtype work_directory: str + :keyword log_directory: The log directory of the application on the node. The log directory can + be used to store application logs. + :paramtype log_directory: str + :keyword temp_directory: The temp directory of the application on the node. The code packages + belonging to the application are forked with this directory set as their temporary directory. + :paramtype temp_directory: str + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + """ + super(DeployedApplicationInfo, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_name = type_name + self.type_version = type_version + self.status = status + self.work_directory = work_directory + self.log_directory = log_directory + self.temp_directory = temp_directory + self.health_state = health_state + + +class DeployedApplicationNewHealthReportEvent(ApplicationEvent): + """Deployed Application Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar application_instance_id: Required. Id of Application instance. + :vartype application_instance_id: long + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + application_id: str, + application_instance_id: int, + node_name: str, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword application_instance_id: Required. Id of Application instance. + :paramtype application_instance_id: long + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(DeployedApplicationNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.kind = 'DeployedApplicationNewHealthReport' # type: str + self.application_instance_id = application_instance_id + self.node_name = node_name + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class DeployedApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed applications, containing health evaluations for each unhealthy deployed application that impacted current aggregated health state. +Can be returned when evaluating application health and the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar max_percent_unhealthy_deployed_applications: Maximum allowed percentage of unhealthy + deployed applications from the ApplicationHealthPolicy. + :vartype max_percent_unhealthy_deployed_applications: int + :ivar total_count: Total number of deployed applications of the application in the health + store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy DeployedApplicationHealthEvaluation that impacted the + aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + max_percent_unhealthy_deployed_applications: Optional[int] = None, + total_count: Optional[int] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword max_percent_unhealthy_deployed_applications: Maximum allowed percentage of unhealthy + deployed applications from the ApplicationHealthPolicy. + :paramtype max_percent_unhealthy_deployed_applications: int + :keyword total_count: Total number of deployed applications of the application in the health + store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy DeployedApplicationHealthEvaluation that impacted the + aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(DeployedApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'DeployedApplications' # type: str + self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + + +class DeployedCodePackageInfo(msrest.serialization.Model): + """Information about code package deployed on a Service Fabric node. + + :ivar name: The name of the code package. + :vartype name: str + :ivar version: The version of the code package specified in service manifest. + :vartype version: str + :ivar service_manifest_name: The name of service manifest that specified this code package. + :vartype service_manifest_name: str + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + :ivar host_type: Specifies the type of host for main entry point of a code package as specified + in service manifest. Possible values include: "Invalid", "ExeHost", "ContainerHost". + :vartype host_type: str or ~azure.servicefabric.models.HostType + :ivar host_isolation_mode: Specifies the isolation mode of main entry point of a code package + when it's host type is ContainerHost. This is specified as part of container host policies in + application manifest while importing service manifest. Possible values include: "None", + "Process", "HyperV". + :vartype host_isolation_mode: str or ~azure.servicefabric.models.HostIsolationMode + :ivar status: Specifies the status of a deployed application or service package on a Service + Fabric node. Possible values include: "Invalid", "Downloading", "Activating", "Active", + "Upgrading", "Deactivating", "RanToCompletion", "Failed". + :vartype status: str or ~azure.servicefabric.models.DeploymentStatus + :ivar run_frequency_interval: The interval at which code package is run. This is used for + periodic code package. + :vartype run_frequency_interval: str + :ivar setup_entry_point: Information about setup or main entry point of a code package deployed + on a Service Fabric node. + :vartype setup_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint + :ivar main_entry_point: Information about setup or main entry point of a code package deployed + on a Service Fabric node. + :vartype main_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_type': {'key': 'HostType', 'type': 'str'}, + 'host_isolation_mode': {'key': 'HostIsolationMode', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'run_frequency_interval': {'key': 'RunFrequencyInterval', 'type': 'str'}, + 'setup_entry_point': {'key': 'SetupEntryPoint', 'type': 'CodePackageEntryPoint'}, + 'main_entry_point': {'key': 'MainEntryPoint', 'type': 'CodePackageEntryPoint'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + version: Optional[str] = None, + service_manifest_name: Optional[str] = None, + service_package_activation_id: Optional[str] = None, + host_type: Optional[Union[str, "HostType"]] = None, + host_isolation_mode: Optional[Union[str, "HostIsolationMode"]] = None, + status: Optional[Union[str, "DeploymentStatus"]] = None, + run_frequency_interval: Optional[str] = None, + setup_entry_point: Optional["CodePackageEntryPoint"] = None, + main_entry_point: Optional["CodePackageEntryPoint"] = None, + **kwargs + ): + """ + :keyword name: The name of the code package. + :paramtype name: str + :keyword version: The version of the code package specified in service manifest. + :paramtype version: str + :keyword service_manifest_name: The name of service manifest that specified this code package. + :paramtype service_manifest_name: str + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + :keyword host_type: Specifies the type of host for main entry point of a code package as + specified in service manifest. Possible values include: "Invalid", "ExeHost", "ContainerHost". + :paramtype host_type: str or ~azure.servicefabric.models.HostType + :keyword host_isolation_mode: Specifies the isolation mode of main entry point of a code + package when it's host type is ContainerHost. This is specified as part of container host + policies in application manifest while importing service manifest. Possible values include: + "None", "Process", "HyperV". + :paramtype host_isolation_mode: str or ~azure.servicefabric.models.HostIsolationMode + :keyword status: Specifies the status of a deployed application or service package on a Service + Fabric node. Possible values include: "Invalid", "Downloading", "Activating", "Active", + "Upgrading", "Deactivating", "RanToCompletion", "Failed". + :paramtype status: str or ~azure.servicefabric.models.DeploymentStatus + :keyword run_frequency_interval: The interval at which code package is run. This is used for + periodic code package. + :paramtype run_frequency_interval: str + :keyword setup_entry_point: Information about setup or main entry point of a code package + deployed on a Service Fabric node. + :paramtype setup_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint + :keyword main_entry_point: Information about setup or main entry point of a code package + deployed on a Service Fabric node. + :paramtype main_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint + """ + super(DeployedCodePackageInfo, self).__init__(**kwargs) + self.name = name + self.version = version + self.service_manifest_name = service_manifest_name + self.service_package_activation_id = service_package_activation_id + self.host_type = host_type + self.host_isolation_mode = host_isolation_mode + self.status = status + self.run_frequency_interval = run_frequency_interval + self.setup_entry_point = setup_entry_point + self.main_entry_point = main_entry_point + + +class DeployedServicePackageHealth(EntityHealth): + """Information about the health of a service package for a specific application deployed on a Service Fabric node. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar service_manifest_name: Name of the service manifest. + :vartype service_manifest_name: str + :ivar node_name: Name of the node where this service package is deployed. + :vartype node_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + health_events: Optional[List["HealthEvent"]] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + health_statistics: Optional["HealthStatistics"] = None, + application_name: Optional[str] = None, + service_manifest_name: Optional[str] = None, + node_name: Optional[str] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword service_manifest_name: Name of the service manifest. + :paramtype service_manifest_name: str + :keyword node_name: Name of the node where this service package is deployed. + :paramtype node_name: str + """ + super(DeployedServicePackageHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.application_name = application_name + self.service_manifest_name = service_manifest_name + self.node_name = node_name + + +class DeployedServicePackageHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a deployed service package, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar node_name: The name of a Service Fabric node. + :vartype node_name: str + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar service_manifest_name: The name of the service manifest. + :vartype service_manifest_name: str + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated + health state. The type of the unhealthy evaluations can be EventHealthEvaluation. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + node_name: Optional[str] = None, + application_name: Optional[str] = None, + service_manifest_name: Optional[str] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword node_name: The name of a Service Fabric node. + :paramtype node_name: str + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword service_manifest_name: The name of the service manifest. + :paramtype service_manifest_name: str + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current + aggregated health state. The type of the unhealthy evaluations can be EventHealthEvaluation. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(DeployedServicePackageHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'DeployedServicePackage' # type: str + self.node_name = node_name + self.application_name = application_name + self.service_manifest_name = service_manifest_name + self.unhealthy_evaluations = unhealthy_evaluations + + +class DeployedServicePackageHealthReportExpiredEvent(ApplicationEvent): + """Deployed Service Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar service_manifest: Required. Service manifest name. + :vartype service_manifest: str + :ivar service_package_instance_id: Required. Id of Service package instance. + :vartype service_package_instance_id: long + :ivar service_package_activation_id: Required. Id of Service package activation. + :vartype service_package_activation_id: str + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'service_manifest': {'required': True}, + 'service_package_instance_id': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_manifest': {'key': 'ServiceManifest', 'type': 'str'}, + 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + application_id: str, + service_manifest: str, + service_package_instance_id: int, + service_package_activation_id: str, + node_name: str, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword service_manifest: Required. Service manifest name. + :paramtype service_manifest: str + :keyword service_package_instance_id: Required. Id of Service package instance. + :paramtype service_package_instance_id: long + :keyword service_package_activation_id: Required. Id of Service package activation. + :paramtype service_package_activation_id: str + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(DeployedServicePackageHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.kind = 'DeployedServicePackageHealthReportExpired' # type: str + self.service_manifest = service_manifest + self.service_package_instance_id = service_package_instance_id + self.service_package_activation_id = service_package_activation_id + self.node_name = node_name + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class DeployedServicePackageHealthState(EntityHealthState): + """Represents the health state of a deployed service package, containing the entity identifier and the aggregated health state. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar node_name: Name of the node on which the service package is deployed. + :vartype node_name: str + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar service_manifest_name: Name of the manifest describing the service package. + :vartype service_manifest_name: str + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + node_name: Optional[str] = None, + application_name: Optional[str] = None, + service_manifest_name: Optional[str] = None, + service_package_activation_id: Optional[str] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword node_name: Name of the node on which the service package is deployed. + :paramtype node_name: str + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword service_manifest_name: Name of the manifest describing the service package. + :paramtype service_manifest_name: str + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + """ + super(DeployedServicePackageHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.node_name = node_name + self.application_name = application_name + self.service_manifest_name = service_manifest_name + self.service_package_activation_id = service_package_activation_id + + +class DeployedServicePackageHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a deployed service package, which contains the service manifest name and the service package aggregated health state. + + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_manifest_name: The name of the service manifest. + :vartype service_manifest_name: str + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__( + self, + *, + health_state: Optional[Union[str, "HealthState"]] = None, + service_manifest_name: Optional[str] = None, + service_package_activation_id: Optional[str] = None, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword service_manifest_name: The name of the service manifest. + :paramtype service_manifest_name: str + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + """ + super(DeployedServicePackageHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.service_manifest_name = service_manifest_name + self.service_package_activation_id = service_package_activation_id + + +class DeployedServicePackageHealthStateChunkList(msrest.serialization.Model): + """The list of deployed service package health state chunks that respect the input filters in the chunk query. Returned by get cluster health state chunks query. + + :ivar items: The list of deployed service package health state chunks that respect the input + filters in the chunk query. + :vartype items: list[~azure.servicefabric.models.DeployedServicePackageHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[DeployedServicePackageHealthStateChunk]'}, + } + + def __init__( + self, + *, + items: Optional[List["DeployedServicePackageHealthStateChunk"]] = None, + **kwargs + ): + """ + :keyword items: The list of deployed service package health state chunks that respect the input + filters in the chunk query. + :paramtype items: list[~azure.servicefabric.models.DeployedServicePackageHealthStateChunk] + """ + super(DeployedServicePackageHealthStateChunkList, self).__init__(**kwargs) + self.items = items + + +class DeployedServicePackageHealthStateFilter(msrest.serialization.Model): + """Defines matching criteria to determine whether a deployed service package should be included as a child of a deployed application in the cluster health chunk. +The deployed service packages are only returned if the parent entities match a filter specified in the cluster health chunk query description. The parent deployed application and its parent application must be included in the cluster health chunk. +One filter can match zero, one or multiple deployed service packages, depending on its properties. + + :ivar service_manifest_name_filter: The name of the service manifest which identifies the + deployed service packages that matches the filter. + If specified, the filter is applied only to the specified deployed service packages, if any. + If no deployed service packages with specified manifest name exist, nothing is returned in the + cluster health chunk based on this filter. + If any deployed service package exists, they are included in the cluster health chunk if it + respects the other filter properties. + If not specified, all deployed service packages that match the parent filters (if any) are + taken into consideration and matched against the other filter members, like health state + filter. + :vartype service_manifest_name_filter: str + :ivar service_package_activation_id_filter: The activation ID of a deployed service package + that matches the filter. + If not specified, the filter applies to all deployed service packages that match the other + parameters. + If specified, the filter matches only the deployed service package with the specified + activation ID. + :vartype service_package_activation_id_filter: str + :ivar health_state_filter: The filter for the health state of the deployed service packages. It + allows selecting deployed service packages if they match the desired health states. + The possible values are integer value of one of the following health states. Only deployed + service packages that match the filter are returned. All deployed service packages are used to + evaluate the parent deployed application aggregated health state. + If not specified, default value is None, unless the deployed service package ID is specified. + If the filter has default value and deployed service package ID is specified, the matching + deployed service package is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches deployed service packages with HealthState + value of OK (2) and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :vartype health_state_filter: int + """ + + _attribute_map = { + 'service_manifest_name_filter': {'key': 'ServiceManifestNameFilter', 'type': 'str'}, + 'service_package_activation_id_filter': {'key': 'ServicePackageActivationIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__( + self, + *, + service_manifest_name_filter: Optional[str] = None, + service_package_activation_id_filter: Optional[str] = None, + health_state_filter: Optional[int] = 0, + **kwargs + ): + """ + :keyword service_manifest_name_filter: The name of the service manifest which identifies the + deployed service packages that matches the filter. + If specified, the filter is applied only to the specified deployed service packages, if any. + If no deployed service packages with specified manifest name exist, nothing is returned in the + cluster health chunk based on this filter. + If any deployed service package exists, they are included in the cluster health chunk if it + respects the other filter properties. + If not specified, all deployed service packages that match the parent filters (if any) are + taken into consideration and matched against the other filter members, like health state + filter. + :paramtype service_manifest_name_filter: str + :keyword service_package_activation_id_filter: The activation ID of a deployed service package + that matches the filter. + If not specified, the filter applies to all deployed service packages that match the other + parameters. + If specified, the filter matches only the deployed service package with the specified + activation ID. + :paramtype service_package_activation_id_filter: str + :keyword health_state_filter: The filter for the health state of the deployed service packages. + It allows selecting deployed service packages if they match the desired health states. + The possible values are integer value of one of the following health states. Only deployed + service packages that match the filter are returned. All deployed service packages are used to + evaluate the parent deployed application aggregated health state. + If not specified, default value is None, unless the deployed service package ID is specified. + If the filter has default value and deployed service package ID is specified, the matching + deployed service package is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches deployed service packages with HealthState + value of OK (2) and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :paramtype health_state_filter: int + """ + super(DeployedServicePackageHealthStateFilter, self).__init__(**kwargs) + self.service_manifest_name_filter = service_manifest_name_filter + self.service_package_activation_id_filter = service_package_activation_id_filter + self.health_state_filter = health_state_filter + + +class DeployedServicePackageInfo(msrest.serialization.Model): + """Information about service package deployed on a Service Fabric node. + + :ivar name: The name of the service package as specified in the service manifest. + :vartype name: str + :ivar version: The version of the service package specified in service manifest. + :vartype version: str + :ivar status: Specifies the status of a deployed application or service package on a Service + Fabric node. Possible values include: "Invalid", "Downloading", "Activating", "Active", + "Upgrading", "Deactivating", "RanToCompletion", "Failed". + :vartype status: str or ~azure.servicefabric.models.DeploymentStatus + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + version: Optional[str] = None, + status: Optional[Union[str, "DeploymentStatus"]] = None, + service_package_activation_id: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The name of the service package as specified in the service manifest. + :paramtype name: str + :keyword version: The version of the service package specified in service manifest. + :paramtype version: str + :keyword status: Specifies the status of a deployed application or service package on a Service + Fabric node. Possible values include: "Invalid", "Downloading", "Activating", "Active", + "Upgrading", "Deactivating", "RanToCompletion", "Failed". + :paramtype status: str or ~azure.servicefabric.models.DeploymentStatus + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + """ + super(DeployedServicePackageInfo, self).__init__(**kwargs) + self.name = name + self.version = version + self.status = status + self.service_package_activation_id = service_package_activation_id + + +class DeployedServicePackageNewHealthReportEvent(ApplicationEvent): + """Deployed Service Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :vartype application_id: str + :ivar service_manifest_name: Required. Service manifest name. + :vartype service_manifest_name: str + :ivar service_package_instance_id: Required. Id of Service package instance. + :vartype service_package_instance_id: long + :ivar service_package_activation_id: Required. Id of Service package activation. + :vartype service_package_activation_id: str + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'application_id': {'required': True}, + 'service_manifest_name': {'required': True}, + 'service_package_instance_id': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + application_id: str, + service_manifest_name: str, + service_package_instance_id: int, + service_package_activation_id: str, + node_name: str, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword application_id: Required. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify the + application resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the application name is "fabric:/myapp/app1", + the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :paramtype application_id: str + :keyword service_manifest_name: Required. Service manifest name. + :paramtype service_manifest_name: str + :keyword service_package_instance_id: Required. Id of Service package instance. + :paramtype service_package_instance_id: long + :keyword service_package_activation_id: Required. Id of Service package activation. + :paramtype service_package_activation_id: str + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(DeployedServicePackageNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.kind = 'DeployedServicePackageNewHealthReport' # type: str + self.service_manifest_name = service_manifest_name + self.service_package_instance_id = service_package_instance_id + self.service_package_activation_id = service_package_activation_id + self.node_name = node_name + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class DeployedServicePackagesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed service packages, containing health evaluations for each unhealthy deployed service package that impacted current aggregated health state. Can be returned when evaluating deployed application health and the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar total_count: Total number of deployed service packages of the deployed application in the + health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy DeployedServicePackageHealthEvaluation that impacted the + aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + total_count: Optional[int] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword total_count: Total number of deployed service packages of the deployed application in + the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy DeployedServicePackageHealthEvaluation that impacted the + aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(DeployedServicePackagesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'DeployedServicePackages' # type: str + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + + +class DeployedServiceReplicaDetailInfo(msrest.serialization.Model): + """Information about a Service Fabric service replica deployed on a node. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeployedStatefulServiceReplicaDetailInfo, DeployedStatelessServiceInstanceDetailInfo. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar service_name: Full hierarchical name of the service in URI format starting with + ``fabric:``. + :vartype service_name: str + :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :vartype partition_id: str + :ivar current_service_operation: Specifies the current active life-cycle operation on a + stateful service replica or stateless service instance. Possible values include: "Unknown", + "None", "Open", "ChangeRole", "Close", "Abort". + :vartype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName + :ivar current_service_operation_start_time_utc: The start time of the current service operation + in UTC format. + :vartype current_service_operation_start_time_utc: ~datetime.datetime + :ivar reported_load: List of load reported by replica. + :vartype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaDetailInfo', 'Stateless': 'DeployedStatelessServiceInstanceDetailInfo'} + } + + def __init__( + self, + *, + service_name: Optional[str] = None, + partition_id: Optional[str] = None, + current_service_operation: Optional[Union[str, "ServiceOperationName"]] = None, + current_service_operation_start_time_utc: Optional[datetime.datetime] = None, + reported_load: Optional[List["LoadMetricReportInfo"]] = None, + **kwargs + ): + """ + :keyword service_name: Full hierarchical name of the service in URI format starting with + ``fabric:``. + :paramtype service_name: str + :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword current_service_operation: Specifies the current active life-cycle operation on a + stateful service replica or stateless service instance. Possible values include: "Unknown", + "None", "Open", "ChangeRole", "Close", "Abort". + :paramtype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName + :keyword current_service_operation_start_time_utc: The start time of the current service + operation in UTC format. + :paramtype current_service_operation_start_time_utc: ~datetime.datetime + :keyword reported_load: List of load reported by replica. + :paramtype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] + """ + super(DeployedServiceReplicaDetailInfo, self).__init__(**kwargs) + self.service_kind = None # type: Optional[str] + self.service_name = service_name + self.partition_id = partition_id + self.current_service_operation = current_service_operation + self.current_service_operation_start_time_utc = current_service_operation_start_time_utc + self.reported_load = reported_load + + +class DeployedServiceReplicaInfo(msrest.serialization.Model): + """Information about a Service Fabric service replica deployed on a node. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeployedStatefulServiceReplicaInfo, DeployedStatelessServiceInstanceInfo. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar service_name: The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar service_type_name: Name of the service type as specified in the service manifest. + :vartype service_type_name: str + :ivar service_manifest_name: The name of the service manifest in which this service type is + defined. + :vartype service_manifest_name: str + :ivar code_package_name: The name of the code package that hosts this replica. + :vartype code_package_name: str + :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", + "InBuild", "Standby", "Ready", "Down", "Dropped". + :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :ivar address: The last address returned by the replica in Open or ChangeRole. + :vartype address: str + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + :ivar host_process_id: Host process ID of the process that is hosting the replica. This will be + zero if the replica is down. In hyper-v containers this host process ID will be from different + kernel. + :vartype host_process_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaInfo', 'Stateless': 'DeployedStatelessServiceInstanceInfo'} + } + + def __init__( + self, + *, + service_name: Optional[str] = None, + service_type_name: Optional[str] = None, + service_manifest_name: Optional[str] = None, + code_package_name: Optional[str] = None, + partition_id: Optional[str] = None, + replica_status: Optional[Union[str, "ReplicaStatus"]] = None, + address: Optional[str] = None, + service_package_activation_id: Optional[str] = None, + host_process_id: Optional[str] = None, + **kwargs + ): + """ + :keyword service_name: The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword service_type_name: Name of the service type as specified in the service manifest. + :paramtype service_type_name: str + :keyword service_manifest_name: The name of the service manifest in which this service type is + defined. + :paramtype service_manifest_name: str + :keyword code_package_name: The name of the code package that hosts this replica. + :paramtype code_package_name: str + :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_status: The status of a replica of a service. Possible values include: + "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". + :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :keyword address: The last address returned by the replica in Open or ChangeRole. + :paramtype address: str + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + :keyword host_process_id: Host process ID of the process that is hosting the replica. This will + be zero if the replica is down. In hyper-v containers this host process ID will be from + different kernel. + :paramtype host_process_id: str + """ + super(DeployedServiceReplicaInfo, self).__init__(**kwargs) + self.service_kind = None # type: Optional[str] + self.service_name = service_name + self.service_type_name = service_type_name + self.service_manifest_name = service_manifest_name + self.code_package_name = code_package_name + self.partition_id = partition_id + self.replica_status = replica_status + self.address = address + self.service_package_activation_id = service_package_activation_id + self.host_process_id = host_process_id + + +class DeployedServiceTypeInfo(msrest.serialization.Model): + """Information about service type deployed on a node, information such as the status of the service type registration on a node. + + :ivar service_type_name: Name of the service type as specified in the service manifest. + :vartype service_type_name: str + :ivar service_manifest_name: The name of the service manifest in which this service type is + defined. + :vartype service_manifest_name: str + :ivar code_package_name: The name of the code package that registered the service type. + :vartype code_package_name: str + :ivar status: The status of the service type registration on the node. Possible values include: + "Invalid", "Disabled", "Enabled", "Registered". + :vartype status: str or ~azure.servicefabric.models.ServiceTypeRegistrationStatus + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + """ + + _attribute_map = { + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__( + self, + *, + service_type_name: Optional[str] = None, + service_manifest_name: Optional[str] = None, + code_package_name: Optional[str] = None, + status: Optional[Union[str, "ServiceTypeRegistrationStatus"]] = None, + service_package_activation_id: Optional[str] = None, + **kwargs + ): + """ + :keyword service_type_name: Name of the service type as specified in the service manifest. + :paramtype service_type_name: str + :keyword service_manifest_name: The name of the service manifest in which this service type is + defined. + :paramtype service_manifest_name: str + :keyword code_package_name: The name of the code package that registered the service type. + :paramtype code_package_name: str + :keyword status: The status of the service type registration on the node. Possible values + include: "Invalid", "Disabled", "Enabled", "Registered". + :paramtype status: str or ~azure.servicefabric.models.ServiceTypeRegistrationStatus + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + """ + super(DeployedServiceTypeInfo, self).__init__(**kwargs) + self.service_type_name = service_type_name + self.service_manifest_name = service_manifest_name + self.code_package_name = code_package_name + self.status = status + self.service_package_activation_id = service_package_activation_id + + +class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo): + """Information about a stateful replica running in a code package. Note DeployedServiceReplicaQueryResult will contain duplicate data like ServiceKind, ServiceName, PartitionId and replicaId. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar service_name: Full hierarchical name of the service in URI format starting with + ``fabric:``. + :vartype service_name: str + :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :vartype partition_id: str + :ivar current_service_operation: Specifies the current active life-cycle operation on a + stateful service replica or stateless service instance. Possible values include: "Unknown", + "None", "Open", "ChangeRole", "Close", "Abort". + :vartype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName + :ivar current_service_operation_start_time_utc: The start time of the current service operation + in UTC format. + :vartype current_service_operation_start_time_utc: ~datetime.datetime + :ivar reported_load: List of load reported by replica. + :vartype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] + :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :vartype replica_id: str + :ivar current_replicator_operation: Specifies the operation currently being executed by the + Replicator. Possible values include: "Invalid", "None", "Open", "ChangeRole", "UpdateEpoch", + "Close", "Abort", "OnDataLoss", "WaitForCatchup", "Build". + :vartype current_replicator_operation: str or + ~azure.servicefabric.models.ReplicatorOperationName + :ivar read_status: Specifies the access status of the partition. Possible values include: + "Invalid", "Granted", "ReconfigurationPending", "NotPrimary", "NoWriteQuorum". + :vartype read_status: str or ~azure.servicefabric.models.PartitionAccessStatus + :ivar write_status: Specifies the access status of the partition. Possible values include: + "Invalid", "Granted", "ReconfigurationPending", "NotPrimary", "NoWriteQuorum". + :vartype write_status: str or ~azure.servicefabric.models.PartitionAccessStatus + :ivar replicator_status: Represents a base class for primary or secondary replicator status. + Contains information about the service fabric replicator like the replication/copy queue + utilization, last acknowledgement received timestamp, etc. + :vartype replicator_status: ~azure.servicefabric.models.ReplicatorStatus + :ivar replica_status: Key value store related information for the replica. + :vartype replica_status: ~azure.servicefabric.models.KeyValueStoreReplicaStatus + :ivar deployed_service_replica_query_result: Information about a stateful service replica + deployed on a node. + :vartype deployed_service_replica_query_result: + ~azure.servicefabric.models.DeployedStatefulServiceReplicaInfo + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'current_replicator_operation': {'key': 'CurrentReplicatorOperation', 'type': 'str'}, + 'read_status': {'key': 'ReadStatus', 'type': 'str'}, + 'write_status': {'key': 'WriteStatus', 'type': 'str'}, + 'replicator_status': {'key': 'ReplicatorStatus', 'type': 'ReplicatorStatus'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'KeyValueStoreReplicaStatus'}, + 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatefulServiceReplicaInfo'}, + } + + def __init__( + self, + *, + service_name: Optional[str] = None, + partition_id: Optional[str] = None, + current_service_operation: Optional[Union[str, "ServiceOperationName"]] = None, + current_service_operation_start_time_utc: Optional[datetime.datetime] = None, + reported_load: Optional[List["LoadMetricReportInfo"]] = None, + replica_id: Optional[str] = None, + current_replicator_operation: Optional[Union[str, "ReplicatorOperationName"]] = None, + read_status: Optional[Union[str, "PartitionAccessStatus"]] = None, + write_status: Optional[Union[str, "PartitionAccessStatus"]] = None, + replicator_status: Optional["ReplicatorStatus"] = None, + replica_status: Optional["KeyValueStoreReplicaStatus"] = None, + deployed_service_replica_query_result: Optional["DeployedStatefulServiceReplicaInfo"] = None, + **kwargs + ): + """ + :keyword service_name: Full hierarchical name of the service in URI format starting with + ``fabric:``. + :paramtype service_name: str + :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword current_service_operation: Specifies the current active life-cycle operation on a + stateful service replica or stateless service instance. Possible values include: "Unknown", + "None", "Open", "ChangeRole", "Close", "Abort". + :paramtype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName + :keyword current_service_operation_start_time_utc: The start time of the current service + operation in UTC format. + :paramtype current_service_operation_start_time_utc: ~datetime.datetime + :keyword reported_load: List of load reported by replica. + :paramtype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] + :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: str + :keyword current_replicator_operation: Specifies the operation currently being executed by the + Replicator. Possible values include: "Invalid", "None", "Open", "ChangeRole", "UpdateEpoch", + "Close", "Abort", "OnDataLoss", "WaitForCatchup", "Build". + :paramtype current_replicator_operation: str or + ~azure.servicefabric.models.ReplicatorOperationName + :keyword read_status: Specifies the access status of the partition. Possible values include: + "Invalid", "Granted", "ReconfigurationPending", "NotPrimary", "NoWriteQuorum". + :paramtype read_status: str or ~azure.servicefabric.models.PartitionAccessStatus + :keyword write_status: Specifies the access status of the partition. Possible values include: + "Invalid", "Granted", "ReconfigurationPending", "NotPrimary", "NoWriteQuorum". + :paramtype write_status: str or ~azure.servicefabric.models.PartitionAccessStatus + :keyword replicator_status: Represents a base class for primary or secondary replicator status. + Contains information about the service fabric replicator like the replication/copy queue + utilization, last acknowledgement received timestamp, etc. + :paramtype replicator_status: ~azure.servicefabric.models.ReplicatorStatus + :keyword replica_status: Key value store related information for the replica. + :paramtype replica_status: ~azure.servicefabric.models.KeyValueStoreReplicaStatus + :keyword deployed_service_replica_query_result: Information about a stateful service replica + deployed on a node. + :paramtype deployed_service_replica_query_result: + ~azure.servicefabric.models.DeployedStatefulServiceReplicaInfo + """ + super(DeployedStatefulServiceReplicaDetailInfo, self).__init__(service_name=service_name, partition_id=partition_id, current_service_operation=current_service_operation, current_service_operation_start_time_utc=current_service_operation_start_time_utc, reported_load=reported_load, **kwargs) + self.service_kind = 'Stateful' # type: str + self.replica_id = replica_id + self.current_replicator_operation = current_replicator_operation + self.read_status = read_status + self.write_status = write_status + self.replicator_status = replicator_status + self.replica_status = replica_status + self.deployed_service_replica_query_result = deployed_service_replica_query_result + + +class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): + """Information about a stateful service replica deployed on a node. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar service_name: The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar service_type_name: Name of the service type as specified in the service manifest. + :vartype service_type_name: str + :ivar service_manifest_name: The name of the service manifest in which this service type is + defined. + :vartype service_manifest_name: str + :ivar code_package_name: The name of the code package that hosts this replica. + :vartype code_package_name: str + :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", + "InBuild", "Standby", "Ready", "Down", "Dropped". + :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :ivar address: The last address returned by the replica in Open or ChangeRole. + :vartype address: str + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + :ivar host_process_id: Host process ID of the process that is hosting the replica. This will be + zero if the replica is down. In hyper-v containers this host process ID will be from different + kernel. + :vartype host_process_id: str + :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :vartype replica_id: str + :ivar replica_role: The role of a replica of a stateful service. Possible values include: + "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", + "ActiveAuxiliary", "PrimaryAuxiliary". + :vartype replica_role: str or ~azure.servicefabric.models.ReplicaRole + :ivar reconfiguration_information: Information about current reconfiguration like phase, type, + previous configuration role of replica and reconfiguration start date time. + :vartype reconfiguration_information: ~azure.servicefabric.models.ReconfigurationInformation + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, + 'reconfiguration_information': {'key': 'ReconfigurationInformation', 'type': 'ReconfigurationInformation'}, + } + + def __init__( + self, + *, + service_name: Optional[str] = None, + service_type_name: Optional[str] = None, + service_manifest_name: Optional[str] = None, + code_package_name: Optional[str] = None, + partition_id: Optional[str] = None, + replica_status: Optional[Union[str, "ReplicaStatus"]] = None, + address: Optional[str] = None, + service_package_activation_id: Optional[str] = None, + host_process_id: Optional[str] = None, + replica_id: Optional[str] = None, + replica_role: Optional[Union[str, "ReplicaRole"]] = None, + reconfiguration_information: Optional["ReconfigurationInformation"] = None, + **kwargs + ): + """ + :keyword service_name: The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword service_type_name: Name of the service type as specified in the service manifest. + :paramtype service_type_name: str + :keyword service_manifest_name: The name of the service manifest in which this service type is + defined. + :paramtype service_manifest_name: str + :keyword code_package_name: The name of the code package that hosts this replica. + :paramtype code_package_name: str + :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_status: The status of a replica of a service. Possible values include: + "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". + :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :keyword address: The last address returned by the replica in Open or ChangeRole. + :paramtype address: str + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + :keyword host_process_id: Host process ID of the process that is hosting the replica. This will + be zero if the replica is down. In hyper-v containers this host process ID will be from + different kernel. + :paramtype host_process_id: str + :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: str + :keyword replica_role: The role of a replica of a stateful service. Possible values include: + "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", + "ActiveAuxiliary", "PrimaryAuxiliary". + :paramtype replica_role: str or ~azure.servicefabric.models.ReplicaRole + :keyword reconfiguration_information: Information about current reconfiguration like phase, + type, previous configuration role of replica and reconfiguration start date time. + :paramtype reconfiguration_information: ~azure.servicefabric.models.ReconfigurationInformation + """ + super(DeployedStatefulServiceReplicaInfo, self).__init__(service_name=service_name, service_type_name=service_type_name, service_manifest_name=service_manifest_name, code_package_name=code_package_name, partition_id=partition_id, replica_status=replica_status, address=address, service_package_activation_id=service_package_activation_id, host_process_id=host_process_id, **kwargs) + self.service_kind = 'Stateful' # type: str + self.replica_id = replica_id + self.replica_role = replica_role + self.reconfiguration_information = reconfiguration_information + + +class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInfo): + """Information about a stateless instance running in a code package. Note that DeployedServiceReplicaQueryResult will contain duplicate data like ServiceKind, ServiceName, PartitionId and InstanceId. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar service_name: Full hierarchical name of the service in URI format starting with + ``fabric:``. + :vartype service_name: str + :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :vartype partition_id: str + :ivar current_service_operation: Specifies the current active life-cycle operation on a + stateful service replica or stateless service instance. Possible values include: "Unknown", + "None", "Open", "ChangeRole", "Close", "Abort". + :vartype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName + :ivar current_service_operation_start_time_utc: The start time of the current service operation + in UTC format. + :vartype current_service_operation_start_time_utc: ~datetime.datetime + :ivar reported_load: List of load reported by replica. + :vartype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] + :ivar instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric to + uniquely identify an instance of a partition of a stateless service. It is unique within a + partition and does not change for the lifetime of the instance. If the instance has failed over + on the same or different node, it will get a different value for the InstanceId. + :vartype instance_id: str + :ivar deployed_service_replica_query_result: Information about a stateless service instance + deployed on a node. + :vartype deployed_service_replica_query_result: + ~azure.servicefabric.models.DeployedStatelessServiceInstanceInfo + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatelessServiceInstanceInfo'}, + } + + def __init__( + self, + *, + service_name: Optional[str] = None, + partition_id: Optional[str] = None, + current_service_operation: Optional[Union[str, "ServiceOperationName"]] = None, + current_service_operation_start_time_utc: Optional[datetime.datetime] = None, + reported_load: Optional[List["LoadMetricReportInfo"]] = None, + instance_id: Optional[str] = None, + deployed_service_replica_query_result: Optional["DeployedStatelessServiceInstanceInfo"] = None, + **kwargs + ): + """ + :keyword service_name: Full hierarchical name of the service in URI format starting with + ``fabric:``. + :paramtype service_name: str + :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword current_service_operation: Specifies the current active life-cycle operation on a + stateful service replica or stateless service instance. Possible values include: "Unknown", + "None", "Open", "ChangeRole", "Close", "Abort". + :paramtype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName + :keyword current_service_operation_start_time_utc: The start time of the current service + operation in UTC format. + :paramtype current_service_operation_start_time_utc: ~datetime.datetime + :keyword reported_load: List of load reported by replica. + :paramtype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] + :keyword instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric + to uniquely identify an instance of a partition of a stateless service. It is unique within a + partition and does not change for the lifetime of the instance. If the instance has failed over + on the same or different node, it will get a different value for the InstanceId. + :paramtype instance_id: str + :keyword deployed_service_replica_query_result: Information about a stateless service instance + deployed on a node. + :paramtype deployed_service_replica_query_result: + ~azure.servicefabric.models.DeployedStatelessServiceInstanceInfo + """ + super(DeployedStatelessServiceInstanceDetailInfo, self).__init__(service_name=service_name, partition_id=partition_id, current_service_operation=current_service_operation, current_service_operation_start_time_utc=current_service_operation_start_time_utc, reported_load=reported_load, **kwargs) + self.service_kind = 'Stateless' # type: str + self.instance_id = instance_id + self.deployed_service_replica_query_result = deployed_service_replica_query_result + + +class DeployedStatelessServiceInstanceInfo(DeployedServiceReplicaInfo): + """Information about a stateless service instance deployed on a node. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar service_name: The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar service_type_name: Name of the service type as specified in the service manifest. + :vartype service_type_name: str + :ivar service_manifest_name: The name of the service manifest in which this service type is + defined. + :vartype service_manifest_name: str + :ivar code_package_name: The name of the code package that hosts this replica. + :vartype code_package_name: str + :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", + "InBuild", "Standby", "Ready", "Down", "Dropped". + :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :ivar address: The last address returned by the replica in Open or ChangeRole. + :vartype address: str + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + :ivar host_process_id: Host process ID of the process that is hosting the replica. This will be + zero if the replica is down. In hyper-v containers this host process ID will be from different + kernel. + :vartype host_process_id: str + :ivar instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric to + uniquely identify an instance of a partition of a stateless service. It is unique within a + partition and does not change for the lifetime of the instance. If the instance has failed over + on the same or different node, it will get a different value for the InstanceId. + :vartype instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__( + self, + *, + service_name: Optional[str] = None, + service_type_name: Optional[str] = None, + service_manifest_name: Optional[str] = None, + code_package_name: Optional[str] = None, + partition_id: Optional[str] = None, + replica_status: Optional[Union[str, "ReplicaStatus"]] = None, + address: Optional[str] = None, + service_package_activation_id: Optional[str] = None, + host_process_id: Optional[str] = None, + instance_id: Optional[str] = None, + **kwargs + ): + """ + :keyword service_name: The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword service_type_name: Name of the service type as specified in the service manifest. + :paramtype service_type_name: str + :keyword service_manifest_name: The name of the service manifest in which this service type is + defined. + :paramtype service_manifest_name: str + :keyword code_package_name: The name of the code package that hosts this replica. + :paramtype code_package_name: str + :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_status: The status of a replica of a service. Possible values include: + "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". + :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :keyword address: The last address returned by the replica in Open or ChangeRole. + :paramtype address: str + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + :keyword host_process_id: Host process ID of the process that is hosting the replica. This will + be zero if the replica is down. In hyper-v containers this host process ID will be from + different kernel. + :paramtype host_process_id: str + :keyword instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric + to uniquely identify an instance of a partition of a stateless service. It is unique within a + partition and does not change for the lifetime of the instance. If the instance has failed over + on the same or different node, it will get a different value for the InstanceId. + :paramtype instance_id: str + """ + super(DeployedStatelessServiceInstanceInfo, self).__init__(service_name=service_name, service_type_name=service_type_name, service_manifest_name=service_manifest_name, code_package_name=code_package_name, partition_id=partition_id, replica_status=replica_status, address=address, service_package_activation_id=service_package_activation_id, host_process_id=host_process_id, **kwargs) + self.service_kind = 'Stateless' # type: str + self.instance_id = instance_id + + +class DeployServicePackageToNodeDescription(msrest.serialization.Model): + """Defines description for downloading packages associated with a service manifest to image cache on a Service Fabric node. + + All required parameters must be populated in order to send to Azure. + + :ivar service_manifest_name: Required. The name of service manifest whose packages need to be + downloaded. + :vartype service_manifest_name: str + :ivar application_type_name: Required. The application type name as defined in the application + manifest. + :vartype application_type_name: str + :ivar application_type_version: Required. The version of the application type as defined in the + application manifest. + :vartype application_type_version: str + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar package_sharing_policy: List of package sharing policy information. + :vartype package_sharing_policy: list[~azure.servicefabric.models.PackageSharingPolicyInfo] + """ + + _validation = { + 'service_manifest_name': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'node_name': {'required': True}, + } + + _attribute_map = { + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'package_sharing_policy': {'key': 'PackageSharingPolicy', 'type': '[PackageSharingPolicyInfo]'}, + } + + def __init__( + self, + *, + service_manifest_name: str, + application_type_name: str, + application_type_version: str, + node_name: str, + package_sharing_policy: Optional[List["PackageSharingPolicyInfo"]] = None, + **kwargs + ): + """ + :keyword service_manifest_name: Required. The name of service manifest whose packages need to + be downloaded. + :paramtype service_manifest_name: str + :keyword application_type_name: Required. The application type name as defined in the + application manifest. + :paramtype application_type_name: str + :keyword application_type_version: Required. The version of the application type as defined in + the application manifest. + :paramtype application_type_version: str + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword package_sharing_policy: List of package sharing policy information. + :paramtype package_sharing_policy: list[~azure.servicefabric.models.PackageSharingPolicyInfo] + """ + super(DeployServicePackageToNodeDescription, self).__init__(**kwargs) + self.service_manifest_name = service_manifest_name + self.application_type_name = application_type_name + self.application_type_version = application_type_version + self.node_name = node_name + self.package_sharing_policy = package_sharing_policy + + +class DiagnosticsDescription(msrest.serialization.Model): + """Describes the diagnostics options available. + + :ivar sinks: List of supported sinks that can be referenced. + :vartype sinks: list[~azure.servicefabric.models.DiagnosticsSinkProperties] + :ivar enabled: Status of whether or not sinks are enabled. + :vartype enabled: bool + :ivar default_sink_refs: The sinks to be used if diagnostics is enabled. Sink choices can be + overridden at the service and code package level. + :vartype 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: Optional[List["DiagnosticsSinkProperties"]] = None, + enabled: Optional[bool] = None, + default_sink_refs: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword sinks: List of supported sinks that can be referenced. + :paramtype sinks: list[~azure.servicefabric.models.DiagnosticsSinkProperties] + :keyword enabled: Status of whether or not sinks are enabled. + :paramtype enabled: bool + :keyword default_sink_refs: The sinks to be used if diagnostics is enabled. Sink choices can be + overridden at the service and code package level. + :paramtype default_sink_refs: list[str] + """ + super(DiagnosticsDescription, self).__init__(**kwargs) + self.sinks = sinks + self.enabled = enabled + self.default_sink_refs = default_sink_refs + + +class DiagnosticsRef(msrest.serialization.Model): + """Reference to sinks in DiagnosticsDescription. + + :ivar enabled: Status of whether or not sinks are enabled. + :vartype enabled: bool + :ivar sink_refs: List of sinks to be used if enabled. References the list of sinks in + DiagnosticsDescription. + :vartype sink_refs: list[str] + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'sink_refs': {'key': 'sinkRefs', 'type': '[str]'}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + sink_refs: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword enabled: Status of whether or not sinks are enabled. + :paramtype enabled: bool + :keyword sink_refs: List of sinks to be used if enabled. References the list of sinks in + DiagnosticsDescription. + :paramtype sink_refs: list[str] + """ + super(DiagnosticsRef, self).__init__(**kwargs) + self.enabled = enabled + self.sink_refs = sink_refs + + +class DisableBackupDescription(msrest.serialization.Model): + """It describes the body parameters while disabling backup of a backup entity(Application/Service/Partition). + + All required parameters must be populated in order to send to Azure. + + :ivar clean_backup: Required. Boolean flag to delete backups. It can be set to true for + deleting all the backups which were created for the backup entity that is getting disabled for + backup. + :vartype clean_backup: bool + """ + + _validation = { + 'clean_backup': {'required': True}, + } + + _attribute_map = { + 'clean_backup': {'key': 'CleanBackup', 'type': 'bool'}, + } + + def __init__( + self, + *, + clean_backup: bool, + **kwargs + ): + """ + :keyword clean_backup: Required. Boolean flag to delete backups. It can be set to true for + deleting all the backups which were created for the backup entity that is getting disabled for + backup. + :paramtype clean_backup: bool + """ + super(DisableBackupDescription, self).__init__(**kwargs) + self.clean_backup = clean_backup + + +class DiskInfo(msrest.serialization.Model): + """Information about the disk. + + :ivar capacity: the disk size in bytes. + :vartype capacity: str + :ivar available_space: the available disk space in bytes. + :vartype available_space: str + """ + + _attribute_map = { + 'capacity': {'key': 'Capacity', 'type': 'str'}, + 'available_space': {'key': 'AvailableSpace', 'type': 'str'}, + } + + def __init__( + self, + *, + capacity: Optional[str] = None, + available_space: Optional[str] = None, + **kwargs + ): + """ + :keyword capacity: the disk size in bytes. + :paramtype capacity: str + :keyword available_space: the available disk space in bytes. + :paramtype available_space: str + """ + super(DiskInfo, self).__init__(**kwargs) + self.capacity = capacity + self.available_space = available_space + + +class DoublePropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Double. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property, determined by the type of data. Following are the + possible values.Constant filled by server. Possible values include: "Invalid", "Binary", + "Int64", "Double", "String", "Guid". + :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind + :ivar data: Required. The data of the property value. + :vartype data: float + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'float'}, + } + + def __init__( + self, + *, + data: float, + **kwargs + ): + """ + :keyword data: Required. The data of the property value. + :paramtype data: float + """ + super(DoublePropertyValue, self).__init__(**kwargs) + self.kind = 'Double' # type: str + self.data = data + + +class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Dsms Azure blob store used for storing and enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant + filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", + "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". + :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind + :ivar friendly_name: Friendly name for this backup storage. + :vartype friendly_name: str + :ivar storage_credentials_source_location: Required. The source location of the storage + credentials to connect to the Dsms Azure blob store. + :vartype storage_credentials_source_location: str + :ivar container_name: Required. The name of the container in the blob store to store and + enumerate backups from. + :vartype container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'storage_credentials_source_location': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_credentials_source_location': {'key': 'StorageCredentialsSourceLocation', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_credentials_source_location: str, + container_name: str, + friendly_name: Optional[str] = None, + **kwargs + ): + """ + :keyword friendly_name: Friendly name for this backup storage. + :paramtype friendly_name: str + :keyword storage_credentials_source_location: Required. The source location of the storage + credentials to connect to the Dsms Azure blob store. + :paramtype storage_credentials_source_location: str + :keyword container_name: Required. The name of the container in the blob store to store and + enumerate backups from. + :paramtype container_name: str + """ + super(DsmsAzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) + self.storage_kind = 'DsmsAzureBlobStore' # type: str + self.storage_credentials_source_location = storage_credentials_source_location + self.container_name = container_name + + +class EnableBackupDescription(msrest.serialization.Model): + """Specifies the parameters needed to enable periodic backup. + + All required parameters must be populated in order to send to Azure. + + :ivar backup_policy_name: Required. Name of the backup policy to be used for enabling periodic + backups. + :vartype backup_policy_name: str + """ + + _validation = { + 'backup_policy_name': {'required': True}, + } + + _attribute_map = { + 'backup_policy_name': {'key': 'BackupPolicyName', 'type': 'str'}, + } + + def __init__( + self, + *, + backup_policy_name: str, + **kwargs + ): + """ + :keyword backup_policy_name: Required. Name of the backup policy to be used for enabling + periodic backups. + :paramtype backup_policy_name: str + """ + super(EnableBackupDescription, self).__init__(**kwargs) + self.backup_policy_name = backup_policy_name + + +class EndpointProperties(msrest.serialization.Model): + """Describes a container endpoint. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the endpoint. + :vartype name: str + :ivar port: Port used by the container. + :vartype port: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + *, + name: str, + port: Optional[int] = None, + **kwargs + ): + """ + :keyword name: Required. The name of the endpoint. + :paramtype name: str + :keyword port: Port used by the container. + :paramtype port: int + """ + super(EndpointProperties, self).__init__(**kwargs) + self.name = name + self.port = port + + +class EndpointRef(msrest.serialization.Model): + """Describes a reference to a service endpoint. + + :ivar name: Name of the endpoint. + :vartype name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Name of the endpoint. + :paramtype name: str + """ + super(EndpointRef, self).__init__(**kwargs) + self.name = name + + +class SafetyCheck(msrest.serialization.Model): + """Represents a safety check performed by service fabric before continuing with the operations. These checks ensure the availability of the service and the reliability of the state. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SeedNodeSafetyCheck, PartitionSafetyCheck. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'EnsureSeedNodeQuorum': 'SeedNodeSafetyCheck', 'PartitionSafetyCheck': 'PartitionSafetyCheck'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(SafetyCheck, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class PartitionSafetyCheck(SafetyCheck): + """Represents a safety check for the service partition being performed by service fabric before continuing with operations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EnsureAvailabilitySafetyCheck, EnsurePartitionQuorumSafetyCheck, WaitForInbuildReplicaSafetyCheck, WaitForPrimaryPlacementSafetyCheck, WaitForPrimarySwapSafetyCheck, WaitForReconfigurationSafetyCheck. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + :ivar partition_id: Id of the partition which is undergoing the safety check. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'EnsureAvailability': 'EnsureAvailabilitySafetyCheck', 'EnsurePartitionQuorum': 'EnsurePartitionQuorumSafetyCheck', 'WaitForInbuildReplica': 'WaitForInbuildReplicaSafetyCheck', 'WaitForPrimaryPlacement': 'WaitForPrimaryPlacementSafetyCheck', 'WaitForPrimarySwap': 'WaitForPrimarySwapSafetyCheck', 'WaitForReconfiguration': 'WaitForReconfigurationSafetyCheck'} + } + + def __init__( + self, + *, + partition_id: Optional[str] = None, + **kwargs + ): + """ + :keyword partition_id: Id of the partition which is undergoing the safety check. + :paramtype partition_id: str + """ + super(PartitionSafetyCheck, self).__init__(**kwargs) + self.kind = 'PartitionSafetyCheck' # type: str + self.partition_id = partition_id + + +class EnsureAvailabilitySafetyCheck(PartitionSafetyCheck): + """Safety check that waits to ensure the availability of the partition. It waits until there are replicas available such that bringing down this replica will not cause availability loss for the partition. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + :ivar partition_id: Id of the partition which is undergoing the safety check. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + *, + partition_id: Optional[str] = None, + **kwargs + ): + """ + :keyword partition_id: Id of the partition which is undergoing the safety check. + :paramtype partition_id: str + """ + super(EnsureAvailabilitySafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'EnsureAvailability' # type: str + + +class EnsurePartitionQuorumSafetyCheck(PartitionSafetyCheck): + """Safety check that ensures that a quorum of replicas are not lost for a partition. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + :ivar partition_id: Id of the partition which is undergoing the safety check. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + *, + partition_id: Optional[str] = None, + **kwargs + ): + """ + :keyword partition_id: Id of the partition which is undergoing the safety check. + :paramtype partition_id: str + """ + super(EnsurePartitionQuorumSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'EnsurePartitionQuorum' # type: str + + +class EntityKindHealthStateCount(msrest.serialization.Model): + """Represents health state count for entities of the specified entity kind. + + :ivar entity_kind: The entity kind for which health states are evaluated. Possible values + include: "Invalid", "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + :vartype entity_kind: str or ~azure.servicefabric.models.EntityKind + :ivar health_state_count: The health state count for the entities of the specified kind. + :vartype health_state_count: ~azure.servicefabric.models.HealthStateCount + """ + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'health_state_count': {'key': 'HealthStateCount', 'type': 'HealthStateCount'}, + } + + def __init__( + self, + *, + entity_kind: Optional[Union[str, "EntityKind"]] = None, + health_state_count: Optional["HealthStateCount"] = None, + **kwargs + ): + """ + :keyword entity_kind: The entity kind for which health states are evaluated. Possible values + include: "Invalid", "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + :paramtype entity_kind: str or ~azure.servicefabric.models.EntityKind + :keyword health_state_count: The health state count for the entities of the specified kind. + :paramtype health_state_count: ~azure.servicefabric.models.HealthStateCount + """ + super(EntityKindHealthStateCount, self).__init__(**kwargs) + self.entity_kind = entity_kind + self.health_state_count = health_state_count + + +class EnvironmentVariable(msrest.serialization.Model): + """Describes an environment variable for the container. + + :ivar type: The type of the environment variable being given in value. Possible values include: + "ClearText", "KeyVaultReference", "SecretValueReference". Default value: "ClearText". + :vartype type: str or ~azure.servicefabric.models.EnvironmentVariableType + :ivar name: The name of the environment variable. + :vartype name: str + :ivar value: The value of the environment variable, will be processed based on the type + provided. + :vartype value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "EnvironmentVariableType"]] = "ClearText", + name: Optional[str] = None, + value: Optional[str] = None, + **kwargs + ): + """ + :keyword type: The type of the environment variable being given in value. Possible values + include: "ClearText", "KeyVaultReference", "SecretValueReference". Default value: "ClearText". + :paramtype type: str or ~azure.servicefabric.models.EnvironmentVariableType + :keyword name: The name of the environment variable. + :paramtype name: str + :keyword value: The value of the environment variable, will be processed based on the type + provided. + :paramtype value: str + """ + super(EnvironmentVariable, self).__init__(**kwargs) + self.type = type + self.name = name + self.value = value + + +class Epoch(msrest.serialization.Model): + """An Epoch is a configuration number for the partition as a whole. When the configuration of the replica set changes, for example when the Primary replica changes, the operations that are replicated from the new Primary replica are said to be a new Epoch from the ones which were sent by the old Primary replica. + + :ivar configuration_version: The current configuration number of this Epoch. The configuration + number is an increasing value that is updated whenever the configuration of this replica set + changes. + :vartype configuration_version: str + :ivar data_loss_version: The current data loss number of this Epoch. The data loss number + property is an increasing value which is updated whenever data loss is suspected, as when loss + of a quorum of replicas in the replica set that includes the Primary replica. + :vartype data_loss_version: str + """ + + _attribute_map = { + 'configuration_version': {'key': 'ConfigurationVersion', 'type': 'str'}, + 'data_loss_version': {'key': 'DataLossVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + configuration_version: Optional[str] = None, + data_loss_version: Optional[str] = None, + **kwargs + ): + """ + :keyword configuration_version: The current configuration number of this Epoch. The + configuration number is an increasing value that is updated whenever the configuration of this + replica set changes. + :paramtype configuration_version: str + :keyword data_loss_version: The current data loss number of this Epoch. The data loss number + property is an increasing value which is updated whenever data loss is suspected, as when loss + of a quorum of replicas in the replica set that includes the Primary replica. + :paramtype data_loss_version: str + """ + super(Epoch, self).__init__(**kwargs) + self.configuration_version = configuration_version + self.data_loss_version = data_loss_version + + +class EventHealthEvaluation(HealthEvaluation): + """Represents health evaluation of a HealthEvent that was reported on the entity. +The health evaluation is returned when evaluating health of an entity results in Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar consider_warning_as_error: Indicates whether warnings are treated with the same severity + as errors. The field is specified in the health policy used to evaluate the entity. + :vartype consider_warning_as_error: bool + :ivar unhealthy_event: Represents health information reported on a health entity, such as + cluster, application or node, with additional metadata added by the Health Manager. + :vartype unhealthy_event: ~azure.servicefabric.models.HealthEvent + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'unhealthy_event': {'key': 'UnhealthyEvent', 'type': 'HealthEvent'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + consider_warning_as_error: Optional[bool] = None, + unhealthy_event: Optional["HealthEvent"] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword consider_warning_as_error: Indicates whether warnings are treated with the same + severity as errors. The field is specified in the health policy used to evaluate the entity. + :paramtype consider_warning_as_error: bool + :keyword unhealthy_event: Represents health information reported on a health entity, such as + cluster, application or node, with additional metadata added by the Health Manager. + :paramtype unhealthy_event: ~azure.servicefabric.models.HealthEvent + """ + super(EventHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'Event' # type: str + self.consider_warning_as_error = consider_warning_as_error + self.unhealthy_event = unhealthy_event + + +class ExecutingFaultsChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos has decided on the faults for an iteration. This Chaos event contains the details of the faults as a list of strings. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values + include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", + "Stopped". + :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind + :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :vartype time_stamp_utc: ~datetime.datetime + :ivar faults: List of string description of the faults that Chaos decided to execute in an + iteration. + :vartype faults: list[str] + """ + + _validation = { + 'kind': {'required': True}, + 'time_stamp_utc': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'faults': {'key': 'Faults', 'type': '[str]'}, + } + + def __init__( + self, + *, + time_stamp_utc: datetime.datetime, + faults: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :paramtype time_stamp_utc: ~datetime.datetime + :keyword faults: List of string description of the faults that Chaos decided to execute in an + iteration. + :paramtype faults: list[str] + """ + super(ExecutingFaultsChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.kind = 'ExecutingFaults' # type: str + self.faults = faults + + +class ProvisionApplicationTypeDescriptionBase(msrest.serialization.Model): + """Represents the type of registration or provision requested, and if the operation needs to be asynchronous or not. Supported types of provision operations are from either image store or external store. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ExternalStoreProvisionApplicationTypeDescription, ProvisionApplicationTypeDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of application type registration or provision requested. The + application package can be registered or provisioned either from the image store or from an + external store. Following are the kinds of the application type provision.Constant filled by + server. Possible values include: "Invalid", "ImageStorePath", "ExternalStore". + :vartype kind: str or ~azure.servicefabric.models.ProvisionApplicationTypeKind + :ivar async_property: Required. Indicates whether or not provisioning should occur + asynchronously. When set to true, the provision operation returns when the request is accepted + by the system, and the provision operation continues without any timeout limit. The default + value is false. For large application packages, we recommend setting the value to true. + :vartype async_property: bool + """ + + _validation = { + 'kind': {'required': True}, + 'async_property': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'async_property': {'key': 'Async', 'type': 'bool'}, + } + + _subtype_map = { + 'kind': {'ExternalStore': 'ExternalStoreProvisionApplicationTypeDescription', 'ImageStorePath': 'ProvisionApplicationTypeDescription'} + } + + def __init__( + self, + *, + async_property: bool, + **kwargs + ): + """ + :keyword async_property: Required. Indicates whether or not provisioning should occur + asynchronously. When set to true, the provision operation returns when the request is accepted + by the system, and the provision operation continues without any timeout limit. The default + value is false. For large application packages, we recommend setting the value to true. + :paramtype async_property: bool + """ + super(ProvisionApplicationTypeDescriptionBase, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.async_property = async_property + + +class ExternalStoreProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): + """Describes the operation to register or provision an application type using an application package from an external store instead of a package uploaded to the Service Fabric image store. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of application type registration or provision requested. The + application package can be registered or provisioned either from the image store or from an + external store. Following are the kinds of the application type provision.Constant filled by + server. Possible values include: "Invalid", "ImageStorePath", "ExternalStore". + :vartype kind: str or ~azure.servicefabric.models.ProvisionApplicationTypeKind + :ivar async_property: Required. Indicates whether or not provisioning should occur + asynchronously. When set to true, the provision operation returns when the request is accepted + by the system, and the provision operation continues without any timeout limit. The default + value is false. For large application packages, we recommend setting the value to true. + :vartype async_property: bool + :ivar application_package_download_uri: Required. The path to the '.sfpkg' application package + from where the application package can be downloaded using HTTP or HTTPS protocols. The + application package can be stored in an external store that provides GET operation to download + the file. Supported protocols are HTTP and HTTPS, and the path must allow READ access. + :vartype application_package_download_uri: str + :ivar application_type_name: Required. The application type name represents the name of the + application type found in the application manifest. + :vartype application_type_name: str + :ivar application_type_version: Required. The application type version represents the version + of the application type found in the application manifest. + :vartype application_type_version: str + """ + + _validation = { + 'kind': {'required': True}, + 'async_property': {'required': True}, + 'application_package_download_uri': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'async_property': {'key': 'Async', 'type': 'bool'}, + 'application_package_download_uri': {'key': 'ApplicationPackageDownloadUri', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + async_property: bool, + application_package_download_uri: str, + application_type_name: str, + application_type_version: str, + **kwargs + ): + """ + :keyword async_property: Required. Indicates whether or not provisioning should occur + asynchronously. When set to true, the provision operation returns when the request is accepted + by the system, and the provision operation continues without any timeout limit. The default + value is false. For large application packages, we recommend setting the value to true. + :paramtype async_property: bool + :keyword application_package_download_uri: Required. The path to the '.sfpkg' application + package from where the application package can be downloaded using HTTP or HTTPS protocols. The + application package can be stored in an external store that provides GET operation to download + the file. Supported protocols are HTTP and HTTPS, and the path must allow READ access. + :paramtype application_package_download_uri: str + :keyword application_type_name: Required. The application type name represents the name of the + application type found in the application manifest. + :paramtype application_type_name: str + :keyword application_type_version: Required. The application type version represents the + version of the application type found in the application manifest. + :paramtype application_type_version: str + """ + super(ExternalStoreProvisionApplicationTypeDescription, self).__init__(async_property=async_property, **kwargs) + self.kind = 'ExternalStore' # type: str + self.application_package_download_uri = application_package_download_uri + self.application_type_name = application_type_name + self.application_type_version = application_type_version + + +class FabricCodeVersionInfo(msrest.serialization.Model): + """Information about a Service Fabric code version. + + :ivar code_version: The product version of Service Fabric. + :vartype code_version: str + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + code_version: Optional[str] = None, + **kwargs + ): + """ + :keyword code_version: The product version of Service Fabric. + :paramtype code_version: str + """ + super(FabricCodeVersionInfo, self).__init__(**kwargs) + self.code_version = code_version + + +class FabricConfigVersionInfo(msrest.serialization.Model): + """Information about a Service Fabric config version. + + :ivar config_version: The config version of Service Fabric. + :vartype config_version: str + """ + + _attribute_map = { + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + config_version: Optional[str] = None, + **kwargs + ): + """ + :keyword config_version: The config version of Service Fabric. + :paramtype config_version: str + """ + super(FabricConfigVersionInfo, self).__init__(**kwargs) + self.config_version = config_version + + +class FabricError(msrest.serialization.Model): + """The REST API operations for Service Fabric return standard HTTP status codes. This type defines the additional information returned from the Service Fabric API operations that are not successful. + + All required parameters must be populated in order to send to Azure. + + :ivar error: Required. Error object containing error code and error message. + :vartype error: ~azure.servicefabric.models.FabricErrorError + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'Error', 'type': 'FabricErrorError'}, + } + + def __init__( + self, + *, + error: "FabricErrorError", + **kwargs + ): + """ + :keyword error: Required. Error object containing error code and error message. + :paramtype error: ~azure.servicefabric.models.FabricErrorError + """ + super(FabricError, self).__init__(**kwargs) + self.error = error + + +class FabricErrorError(msrest.serialization.Model): + """Error object containing error code and error message. + + All required parameters must be populated in order to send to Azure. + + :ivar code: Required. Defines the fabric error codes that be returned as part of the error + object in response to Service Fabric API operations that are not successful. Following are the + error code values that can be returned for a specific HTTP status code. + + + * + Possible values of the error code for HTTP status code 400 (Bad Request) + + + * "FABRIC_E_INVALID_PARTITION_KEY" + * "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" + * "FABRIC_E_INVALID_ADDRESS" + * "FABRIC_E_APPLICATION_NOT_UPGRADING" + * "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" + * "FABRIC_E_FABRIC_NOT_UPGRADING" + * "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" + * "FABRIC_E_INVALID_CONFIGURATION" + * "FABRIC_E_INVALID_NAME_URI" + * "FABRIC_E_PATH_TOO_LONG" + * "FABRIC_E_KEY_TOO_LARGE" + * "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" + * "FABRIC_E_INVALID_ATOMIC_GROUP" + * "FABRIC_E_VALUE_EMPTY" + * "FABRIC_E_BACKUP_IS_ENABLED" + * "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" + * "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" + * "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" + * "E_INVALIDARG" + + * + Possible values of the error code for HTTP status code 404 (Not Found) + + + * "FABRIC_E_NODE_NOT_FOUND" + * "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" + * "FABRIC_E_APPLICATION_NOT_FOUND" + * "FABRIC_E_SERVICE_TYPE_NOT_FOUND" + * "FABRIC_E_SERVICE_DOES_NOT_EXIST" + * "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" + * "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" + * "FABRIC_E_PARTITION_NOT_FOUND" + * "FABRIC_E_REPLICA_DOES_NOT_EXIST" + * "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" + * "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" + * "FABRIC_E_DIRECTORY_NOT_FOUND" + * "FABRIC_E_FABRIC_VERSION_NOT_FOUND" + * "FABRIC_E_FILE_NOT_FOUND" + * "FABRIC_E_NAME_DOES_NOT_EXIST" + * "FABRIC_E_PROPERTY_DOES_NOT_EXIST" + * "FABRIC_E_ENUMERATION_COMPLETED" + * "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" + * "FABRIC_E_KEY_NOT_FOUND" + * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" + * "FABRIC_E_BACKUP_NOT_ENABLED" + * "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" + * "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + * "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" + + * + Possible values of the error code for HTTP status code 409 (Conflict) + + + * "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" + * "FABRIC_E_APPLICATION_ALREADY_EXISTS" + * "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" + * "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" + * "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" + * "FABRIC_E_SERVICE_ALREADY_EXISTS" + * "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" + * "FABRIC_E_APPLICATION_TYPE_IN_USE" + * "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" + * "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" + * "FABRIC_E_FABRIC_VERSION_IN_USE" + * "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" + * "FABRIC_E_NAME_ALREADY_EXISTS" + * "FABRIC_E_NAME_NOT_EMPTY" + * "FABRIC_E_PROPERTY_CHECK_FAILED" + * "FABRIC_E_SERVICE_METADATA_MISMATCH" + * "FABRIC_E_SERVICE_TYPE_MISMATCH" + * "FABRIC_E_HEALTH_STALE_REPORT" + * "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" + * "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" + * "FABRIC_E_INSTANCE_ID_MISMATCH" + * "FABRIC_E_BACKUP_IN_PROGRESS" + * "FABRIC_E_RESTORE_IN_PROGRESS" + * "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" + + * + Possible values of the error code for HTTP status code 413 (Request Entity Too Large) + + + * "FABRIC_E_VALUE_TOO_LARGE" + + * + Possible values of the error code for HTTP status code 500 (Internal Server Error) + + + * "FABRIC_E_NODE_IS_UP" + * "E_FAIL" + * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" + * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" + * "FABRIC_E_VOLUME_ALREADY_EXISTS" + * "FABRIC_E_VOLUME_NOT_FOUND" + * "SerializationError" + * "FABRIC_E_CERTIFICATE_NOT_FOUND" + + * + Possible values of the error code for HTTP status code 503 (Service Unavailable) + + + * "FABRIC_E_NO_WRITE_QUORUM" + * "FABRIC_E_NOT_PRIMARY" + * "FABRIC_E_NOT_READY" + * "FABRIC_E_RECONFIGURATION_PENDING" + * "FABRIC_E_SERVICE_OFFLINE" + * "E_ABORT" + * "FABRIC_E_VALUE_TOO_LARGE" + + * + Possible values of the error code for HTTP status code 504 (Gateway Timeout) + + + * "FABRIC_E_COMMUNICATION_ERROR" + * "FABRIC_E_OPERATION_NOT_COMPLETE" + * "FABRIC_E_TIMEOUT". Possible values include: "FABRIC_E_INVALID_PARTITION_KEY", + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", + "FABRIC_E_APPLICATION_NOT_UPGRADING", "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_FABRIC_NOT_UPGRADING", "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", "FABRIC_E_PATH_TOO_LONG", + "FABRIC_E_KEY_TOO_LARGE", "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", + "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", "FABRIC_E_NODE_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", "FABRIC_E_APPLICATION_NOT_FOUND", + "FABRIC_E_SERVICE_TYPE_NOT_FOUND", "FABRIC_E_SERVICE_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", + "FABRIC_E_PARTITION_NOT_FOUND", "FABRIC_E_REPLICA_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", + "FABRIC_E_DIRECTORY_NOT_FOUND", "FABRIC_E_FABRIC_VERSION_NOT_FOUND", "FABRIC_E_FILE_NOT_FOUND", + "FABRIC_E_NAME_DOES_NOT_EXIST", "FABRIC_E_PROPERTY_DOES_NOT_EXIST", + "FABRIC_E_ENUMERATION_COMPLETED", "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", + "FABRIC_E_KEY_NOT_FOUND", "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", "FABRIC_E_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", + "FABRIC_E_SERVICE_ALREADY_EXISTS", "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_TYPE_IN_USE", "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", "FABRIC_E_FABRIC_VERSION_IN_USE", + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", "FABRIC_E_NAME_ALREADY_EXISTS", + "FABRIC_E_NAME_NOT_EMPTY", "FABRIC_E_PROPERTY_CHECK_FAILED", + "FABRIC_E_SERVICE_METADATA_MISMATCH", "FABRIC_E_SERVICE_TYPE_MISMATCH", + "FABRIC_E_HEALTH_STALE_REPORT", "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", + "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", "FABRIC_E_NOT_PRIMARY", + "FABRIC_E_NOT_READY", "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", + "E_ABORT", "FABRIC_E_COMMUNICATION_ERROR", "FABRIC_E_OPERATION_NOT_COMPLETE", + "FABRIC_E_TIMEOUT", "FABRIC_E_NODE_IS_UP", "E_FAIL", "FABRIC_E_BACKUP_IS_ENABLED", + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", + "FABRIC_E_BACKUP_NOT_ENABLED", "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", "FABRIC_E_BACKUP_IN_PROGRESS", + "FABRIC_E_RESTORE_IN_PROGRESS", "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", "FABRIC_E_VOLUME_ALREADY_EXISTS", + "FABRIC_E_VOLUME_NOT_FOUND", "SerializationError", + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", "FABRIC_E_CERTIFICATE_NOT_FOUND". + :vartype code: str or ~azure.servicefabric.models.FabricErrorCodes + :ivar message: Error message. + :vartype message: str + """ + + _validation = { + 'code': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'Code', 'type': 'str'}, + 'message': {'key': 'Message', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Union[str, "FabricErrorCodes"], + message: Optional[str] = None, + **kwargs + ): + """ + :keyword code: Required. Defines the fabric error codes that be returned as part of the error + object in response to Service Fabric API operations that are not successful. Following are the + error code values that can be returned for a specific HTTP status code. + + + * + Possible values of the error code for HTTP status code 400 (Bad Request) + + + * "FABRIC_E_INVALID_PARTITION_KEY" + * "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" + * "FABRIC_E_INVALID_ADDRESS" + * "FABRIC_E_APPLICATION_NOT_UPGRADING" + * "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" + * "FABRIC_E_FABRIC_NOT_UPGRADING" + * "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" + * "FABRIC_E_INVALID_CONFIGURATION" + * "FABRIC_E_INVALID_NAME_URI" + * "FABRIC_E_PATH_TOO_LONG" + * "FABRIC_E_KEY_TOO_LARGE" + * "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" + * "FABRIC_E_INVALID_ATOMIC_GROUP" + * "FABRIC_E_VALUE_EMPTY" + * "FABRIC_E_BACKUP_IS_ENABLED" + * "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" + * "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" + * "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" + * "E_INVALIDARG" + + * + Possible values of the error code for HTTP status code 404 (Not Found) + + + * "FABRIC_E_NODE_NOT_FOUND" + * "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" + * "FABRIC_E_APPLICATION_NOT_FOUND" + * "FABRIC_E_SERVICE_TYPE_NOT_FOUND" + * "FABRIC_E_SERVICE_DOES_NOT_EXIST" + * "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" + * "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" + * "FABRIC_E_PARTITION_NOT_FOUND" + * "FABRIC_E_REPLICA_DOES_NOT_EXIST" + * "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" + * "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" + * "FABRIC_E_DIRECTORY_NOT_FOUND" + * "FABRIC_E_FABRIC_VERSION_NOT_FOUND" + * "FABRIC_E_FILE_NOT_FOUND" + * "FABRIC_E_NAME_DOES_NOT_EXIST" + * "FABRIC_E_PROPERTY_DOES_NOT_EXIST" + * "FABRIC_E_ENUMERATION_COMPLETED" + * "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" + * "FABRIC_E_KEY_NOT_FOUND" + * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" + * "FABRIC_E_BACKUP_NOT_ENABLED" + * "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" + * "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + * "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" + + * + Possible values of the error code for HTTP status code 409 (Conflict) + + + * "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" + * "FABRIC_E_APPLICATION_ALREADY_EXISTS" + * "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" + * "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" + * "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" + * "FABRIC_E_SERVICE_ALREADY_EXISTS" + * "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" + * "FABRIC_E_APPLICATION_TYPE_IN_USE" + * "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" + * "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" + * "FABRIC_E_FABRIC_VERSION_IN_USE" + * "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" + * "FABRIC_E_NAME_ALREADY_EXISTS" + * "FABRIC_E_NAME_NOT_EMPTY" + * "FABRIC_E_PROPERTY_CHECK_FAILED" + * "FABRIC_E_SERVICE_METADATA_MISMATCH" + * "FABRIC_E_SERVICE_TYPE_MISMATCH" + * "FABRIC_E_HEALTH_STALE_REPORT" + * "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" + * "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" + * "FABRIC_E_INSTANCE_ID_MISMATCH" + * "FABRIC_E_BACKUP_IN_PROGRESS" + * "FABRIC_E_RESTORE_IN_PROGRESS" + * "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" + + * + Possible values of the error code for HTTP status code 413 (Request Entity Too Large) + + + * "FABRIC_E_VALUE_TOO_LARGE" + + * + Possible values of the error code for HTTP status code 500 (Internal Server Error) + + + * "FABRIC_E_NODE_IS_UP" + * "E_FAIL" + * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" + * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" + * "FABRIC_E_VOLUME_ALREADY_EXISTS" + * "FABRIC_E_VOLUME_NOT_FOUND" + * "SerializationError" + * "FABRIC_E_CERTIFICATE_NOT_FOUND" + + * + Possible values of the error code for HTTP status code 503 (Service Unavailable) + + + * "FABRIC_E_NO_WRITE_QUORUM" + * "FABRIC_E_NOT_PRIMARY" + * "FABRIC_E_NOT_READY" + * "FABRIC_E_RECONFIGURATION_PENDING" + * "FABRIC_E_SERVICE_OFFLINE" + * "E_ABORT" + * "FABRIC_E_VALUE_TOO_LARGE" + + * + Possible values of the error code for HTTP status code 504 (Gateway Timeout) + + + * "FABRIC_E_COMMUNICATION_ERROR" + * "FABRIC_E_OPERATION_NOT_COMPLETE" + * "FABRIC_E_TIMEOUT". Possible values include: "FABRIC_E_INVALID_PARTITION_KEY", + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", + "FABRIC_E_APPLICATION_NOT_UPGRADING", "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_FABRIC_NOT_UPGRADING", "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", "FABRIC_E_PATH_TOO_LONG", + "FABRIC_E_KEY_TOO_LARGE", "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", + "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", "FABRIC_E_NODE_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", "FABRIC_E_APPLICATION_NOT_FOUND", + "FABRIC_E_SERVICE_TYPE_NOT_FOUND", "FABRIC_E_SERVICE_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", + "FABRIC_E_PARTITION_NOT_FOUND", "FABRIC_E_REPLICA_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", + "FABRIC_E_DIRECTORY_NOT_FOUND", "FABRIC_E_FABRIC_VERSION_NOT_FOUND", "FABRIC_E_FILE_NOT_FOUND", + "FABRIC_E_NAME_DOES_NOT_EXIST", "FABRIC_E_PROPERTY_DOES_NOT_EXIST", + "FABRIC_E_ENUMERATION_COMPLETED", "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", + "FABRIC_E_KEY_NOT_FOUND", "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", "FABRIC_E_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", + "FABRIC_E_SERVICE_ALREADY_EXISTS", "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_TYPE_IN_USE", "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", "FABRIC_E_FABRIC_VERSION_IN_USE", + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", "FABRIC_E_NAME_ALREADY_EXISTS", + "FABRIC_E_NAME_NOT_EMPTY", "FABRIC_E_PROPERTY_CHECK_FAILED", + "FABRIC_E_SERVICE_METADATA_MISMATCH", "FABRIC_E_SERVICE_TYPE_MISMATCH", + "FABRIC_E_HEALTH_STALE_REPORT", "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", + "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", "FABRIC_E_NOT_PRIMARY", + "FABRIC_E_NOT_READY", "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", + "E_ABORT", "FABRIC_E_COMMUNICATION_ERROR", "FABRIC_E_OPERATION_NOT_COMPLETE", + "FABRIC_E_TIMEOUT", "FABRIC_E_NODE_IS_UP", "E_FAIL", "FABRIC_E_BACKUP_IS_ENABLED", + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", + "FABRIC_E_BACKUP_NOT_ENABLED", "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", "FABRIC_E_BACKUP_IN_PROGRESS", + "FABRIC_E_RESTORE_IN_PROGRESS", "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", "FABRIC_E_VOLUME_ALREADY_EXISTS", + "FABRIC_E_VOLUME_NOT_FOUND", "SerializationError", + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", "FABRIC_E_CERTIFICATE_NOT_FOUND". + :paramtype code: str or ~azure.servicefabric.models.FabricErrorCodes + :keyword message: Error message. + :paramtype message: str + """ + super(FabricErrorError, self).__init__(**kwargs) + self.code = code + self.message = message + + +class PropertyBatchInfo(msrest.serialization.Model): + """Information about the results of a property batch. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FailedPropertyBatchInfo, SuccessfulPropertyBatchInfo. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch info, determined by the results of a property + batch. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Successful", "Failed". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchInfoKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Failed': 'FailedPropertyBatchInfo', 'Successful': 'SuccessfulPropertyBatchInfo'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PropertyBatchInfo, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class FailedPropertyBatchInfo(PropertyBatchInfo): + """Derived from PropertyBatchInfo. Represents the property batch failing. Contains information about the specific batch failure. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch info, determined by the results of a property + batch. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Successful", "Failed". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchInfoKind + :ivar error_message: The error message of the failed operation. Describes the exception thrown + due to the first unsuccessful operation in the property batch. + :vartype error_message: str + :ivar operation_index: The index of the unsuccessful operation in the property batch. + :vartype operation_index: int + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'error_message': {'key': 'ErrorMessage', 'type': 'str'}, + 'operation_index': {'key': 'OperationIndex', 'type': 'int'}, + } + + def __init__( + self, + *, + error_message: Optional[str] = None, + operation_index: Optional[int] = None, + **kwargs + ): + """ + :keyword error_message: The error message of the failed operation. Describes the exception + thrown due to the first unsuccessful operation in the property batch. + :paramtype error_message: str + :keyword operation_index: The index of the unsuccessful operation in the property batch. + :paramtype operation_index: int + """ + super(FailedPropertyBatchInfo, self).__init__(**kwargs) + self.kind = 'Failed' # type: str + self.error_message = error_message + self.operation_index = operation_index + + +class FailedUpgradeDomainProgressObject(msrest.serialization.Model): + """The detailed upgrade progress for nodes in the current upgrade domain at the point of failure. Not applicable to node-by-node upgrades. + + :ivar domain_name: The name of the upgrade domain. + :vartype domain_name: str + :ivar node_upgrade_progress_list: List of upgrading nodes and their statuses. + :vartype node_upgrade_progress_list: list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__( + self, + *, + domain_name: Optional[str] = None, + node_upgrade_progress_list: Optional[List["NodeUpgradeProgressInfo"]] = None, + **kwargs + ): + """ + :keyword domain_name: The name of the upgrade domain. + :paramtype domain_name: str + :keyword node_upgrade_progress_list: List of upgrading nodes and their statuses. + :paramtype node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + super(FailedUpgradeDomainProgressObject, self).__init__(**kwargs) + self.domain_name = domain_name + self.node_upgrade_progress_list = node_upgrade_progress_list + + +class FailureUpgradeDomainProgressInfo(msrest.serialization.Model): + """Information about the upgrade domain progress at the time of upgrade failure. + + :ivar domain_name: The name of the upgrade domain. + :vartype domain_name: str + :ivar node_upgrade_progress_list: List of upgrading nodes and their statuses. + :vartype node_upgrade_progress_list: list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__( + self, + *, + domain_name: Optional[str] = None, + node_upgrade_progress_list: Optional[List["NodeUpgradeProgressInfo"]] = None, + **kwargs + ): + """ + :keyword domain_name: The name of the upgrade domain. + :paramtype domain_name: str + :keyword node_upgrade_progress_list: List of upgrading nodes and their statuses. + :paramtype node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + super(FailureUpgradeDomainProgressInfo, self).__init__(**kwargs) + self.domain_name = domain_name + self.node_upgrade_progress_list = node_upgrade_progress_list + + +class FileInfo(msrest.serialization.Model): + """Information about a image store file. + + :ivar file_size: The size of file in bytes. + :vartype file_size: str + :ivar file_version: Information about the version of image store file. + :vartype file_version: ~azure.servicefabric.models.FileVersion + :ivar modified_date: The date and time when the image store file was last modified. + :vartype modified_date: ~datetime.datetime + :ivar store_relative_path: The file path relative to the image store root path. + :vartype store_relative_path: str + """ + + _attribute_map = { + 'file_size': {'key': 'FileSize', 'type': 'str'}, + 'file_version': {'key': 'FileVersion', 'type': 'FileVersion'}, + 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + } + + def __init__( + self, + *, + file_size: Optional[str] = None, + file_version: Optional["FileVersion"] = None, + modified_date: Optional[datetime.datetime] = None, + store_relative_path: Optional[str] = None, + **kwargs + ): + """ + :keyword file_size: The size of file in bytes. + :paramtype file_size: str + :keyword file_version: Information about the version of image store file. + :paramtype file_version: ~azure.servicefabric.models.FileVersion + :keyword modified_date: The date and time when the image store file was last modified. + :paramtype modified_date: ~datetime.datetime + :keyword store_relative_path: The file path relative to the image store root path. + :paramtype store_relative_path: str + """ + super(FileInfo, self).__init__(**kwargs) + self.file_size = file_size + self.file_version = file_version + self.modified_date = modified_date + self.store_relative_path = store_relative_path + + +class FileShareBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for file share storage used for storing or enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant + filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", + "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". + :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind + :ivar friendly_name: Friendly name for this backup storage. + :vartype friendly_name: str + :ivar path: Required. UNC path of the file share where to store or enumerate backups from. + :vartype path: str + :ivar primary_user_name: Primary user name to access the file share. + :vartype primary_user_name: str + :ivar primary_password: Primary password to access the share location. + :vartype primary_password: str + :ivar secondary_user_name: Secondary user name to access the file share. + :vartype secondary_user_name: str + :ivar secondary_password: Secondary password to access the share location. + :vartype secondary_password: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'path': {'required': True}, + } + + _attribute_map = { + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'path': {'key': 'Path', 'type': 'str'}, + 'primary_user_name': {'key': 'PrimaryUserName', 'type': 'str'}, + 'primary_password': {'key': 'PrimaryPassword', 'type': 'str'}, + 'secondary_user_name': {'key': 'SecondaryUserName', 'type': 'str'}, + 'secondary_password': {'key': 'SecondaryPassword', 'type': 'str'}, + } + + def __init__( + self, + *, + path: str, + friendly_name: Optional[str] = None, + primary_user_name: Optional[str] = None, + primary_password: Optional[str] = None, + secondary_user_name: Optional[str] = None, + secondary_password: Optional[str] = None, + **kwargs + ): + """ + :keyword friendly_name: Friendly name for this backup storage. + :paramtype friendly_name: str + :keyword path: Required. UNC path of the file share where to store or enumerate backups from. + :paramtype path: str + :keyword primary_user_name: Primary user name to access the file share. + :paramtype primary_user_name: str + :keyword primary_password: Primary password to access the share location. + :paramtype primary_password: str + :keyword secondary_user_name: Secondary user name to access the file share. + :paramtype secondary_user_name: str + :keyword secondary_password: Secondary password to access the share location. + :paramtype secondary_password: str + """ + super(FileShareBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) + self.storage_kind = 'FileShare' # type: str + self.path = path + self.primary_user_name = primary_user_name + self.primary_password = primary_password + self.secondary_user_name = secondary_user_name + self.secondary_password = secondary_password + + +class FileVersion(msrest.serialization.Model): + """Information about the version of image store file. + + :ivar version_number: The current image store version number for the file is used in image + store for checking whether it need to be updated. + :vartype version_number: str + :ivar epoch_data_loss_number: The epoch data loss number of image store replica when this file + entry was updated or created. + :vartype epoch_data_loss_number: str + :ivar epoch_configuration_number: The epoch configuration version number of the image store + replica when this file entry was created or updated. + :vartype epoch_configuration_number: str + """ + + _attribute_map = { + 'version_number': {'key': 'VersionNumber', 'type': 'str'}, + 'epoch_data_loss_number': {'key': 'EpochDataLossNumber', 'type': 'str'}, + 'epoch_configuration_number': {'key': 'EpochConfigurationNumber', 'type': 'str'}, + } + + def __init__( + self, + *, + version_number: Optional[str] = None, + epoch_data_loss_number: Optional[str] = None, + epoch_configuration_number: Optional[str] = None, + **kwargs + ): + """ + :keyword version_number: The current image store version number for the file is used in image + store for checking whether it need to be updated. + :paramtype version_number: str + :keyword epoch_data_loss_number: The epoch data loss number of image store replica when this + file entry was updated or created. + :paramtype epoch_data_loss_number: str + :keyword epoch_configuration_number: The epoch configuration version number of the image store + replica when this file entry was created or updated. + :paramtype epoch_configuration_number: str + """ + super(FileVersion, self).__init__(**kwargs) + self.version_number = version_number + self.epoch_data_loss_number = epoch_data_loss_number + self.epoch_configuration_number = epoch_configuration_number + + +class FolderInfo(msrest.serialization.Model): + """Information about a image store folder. It includes how many files this folder contains and its image store relative path. + + :ivar store_relative_path: The remote location within image store. This path is relative to the + image store root. + :vartype store_relative_path: str + :ivar file_count: The number of files from within the image store folder. + :vartype file_count: str + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'file_count': {'key': 'FileCount', 'type': 'str'}, + } + + def __init__( + self, + *, + store_relative_path: Optional[str] = None, + file_count: Optional[str] = None, + **kwargs + ): + """ + :keyword store_relative_path: The remote location within image store. This path is relative to + the image store root. + :paramtype store_relative_path: str + :keyword file_count: The number of files from within the image store folder. + :paramtype file_count: str + """ + super(FolderInfo, self).__init__(**kwargs) + self.store_relative_path = store_relative_path + self.file_count = file_count + + +class FolderSizeInfo(msrest.serialization.Model): + """Information of a image store folder size. + + :ivar store_relative_path: The remote location within image store. This path is relative to the + image store root. + :vartype store_relative_path: str + :ivar folder_size: The size of folder in bytes. + :vartype folder_size: str + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'folder_size': {'key': 'FolderSize', 'type': 'str'}, + } + + def __init__( + self, + *, + store_relative_path: Optional[str] = None, + folder_size: Optional[str] = None, + **kwargs + ): + """ + :keyword store_relative_path: The remote location within image store. This path is relative to + the image store root. + :paramtype store_relative_path: str + :keyword folder_size: The size of folder in bytes. + :paramtype folder_size: str + """ + super(FolderSizeInfo, self).__init__(**kwargs) + self.store_relative_path = store_relative_path + self.folder_size = folder_size + + +class FrequencyBasedBackupScheduleDescription(BackupScheduleDescription): + """Describes the frequency based backup schedule. + + All required parameters must be populated in order to send to Azure. + + :ivar schedule_kind: Required. The kind of backup schedule, time based or frequency + based.Constant filled by server. Possible values include: "Invalid", "TimeBased", + "FrequencyBased". + :vartype schedule_kind: str or ~azure.servicefabric.models.BackupScheduleKind + :ivar interval: Required. Defines the interval with which backups are periodically taken. It + should be specified in ISO8601 format. Timespan in seconds is not supported and will be ignored + while creating the policy. + :vartype interval: ~datetime.timedelta + """ + + _validation = { + 'schedule_kind': {'required': True}, + 'interval': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + 'interval': {'key': 'Interval', 'type': 'duration'}, + } + + def __init__( + self, + *, + interval: datetime.timedelta, + **kwargs + ): + """ + :keyword interval: Required. Defines the interval with which backups are periodically taken. It + should be specified in ISO8601 format. Timespan in seconds is not supported and will be ignored + while creating the policy. + :paramtype interval: ~datetime.timedelta + """ + super(FrequencyBasedBackupScheduleDescription, self).__init__(**kwargs) + self.schedule_kind = 'FrequencyBased' # type: str + self.interval = interval + + +class GatewayDestination(msrest.serialization.Model): + """Describes destination endpoint for routing traffic. + + All required parameters must be populated in order to send to Azure. + + :ivar application_name: Required. Name of the service fabric Mesh application. + :vartype application_name: str + :ivar service_name: Required. service that contains the endpoint. + :vartype service_name: str + :ivar endpoint_name: Required. name of the endpoint in the service. + :vartype endpoint_name: str + """ + + _validation = { + 'application_name': {'required': True}, + 'service_name': {'required': True}, + 'endpoint_name': {'required': True}, + } + + _attribute_map = { + 'application_name': {'key': 'applicationName', 'type': 'str'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, + } + + def __init__( + self, + *, + application_name: str, + service_name: str, + endpoint_name: str, + **kwargs + ): + """ + :keyword application_name: Required. Name of the service fabric Mesh application. + :paramtype application_name: str + :keyword service_name: Required. service that contains the endpoint. + :paramtype service_name: str + :keyword endpoint_name: Required. name of the endpoint in the service. + :paramtype endpoint_name: str + """ + super(GatewayDestination, self).__init__(**kwargs) + self.application_name = application_name + self.service_name = service_name + self.endpoint_name = endpoint_name + + +class GatewayResourceDescription(msrest.serialization.Model): + """This type describes a gateway resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of the Gateway resource. + :vartype name: str + :ivar description: User readable description of the gateway. + :vartype description: str + :ivar source_network: Required. Network the gateway should listen on for requests. + :vartype source_network: ~azure.servicefabric.models.NetworkRef + :ivar destination_network: Required. Network that the Application is using. + :vartype destination_network: ~azure.servicefabric.models.NetworkRef + :ivar tcp: Configuration for tcp connectivity for this gateway. + :vartype tcp: list[~azure.servicefabric.models.TcpConfig] + :ivar http: Configuration for http connectivity for this gateway. + :vartype http: list[~azure.servicefabric.models.HttpConfig] + :ivar status: Status of the resource. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the gateway. + :vartype status_details: str + :ivar ip_address: IP address of the gateway. This is populated in the response and is ignored + for incoming requests. + :vartype ip_address: str + """ + + _validation = { + 'name': {'required': True}, + 'source_network': {'required': True}, + 'destination_network': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'ip_address': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'source_network': {'key': 'properties.sourceNetwork', 'type': 'NetworkRef'}, + 'destination_network': {'key': 'properties.destinationNetwork', 'type': 'NetworkRef'}, + 'tcp': {'key': 'properties.tcp', 'type': '[TcpConfig]'}, + 'http': {'key': 'properties.http', 'type': '[HttpConfig]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + source_network: "NetworkRef", + destination_network: "NetworkRef", + description: Optional[str] = None, + tcp: Optional[List["TcpConfig"]] = None, + http: Optional[List["HttpConfig"]] = None, + **kwargs + ): + """ + :keyword name: Required. Name of the Gateway resource. + :paramtype name: str + :keyword description: User readable description of the gateway. + :paramtype description: str + :keyword source_network: Required. Network the gateway should listen on for requests. + :paramtype source_network: ~azure.servicefabric.models.NetworkRef + :keyword destination_network: Required. Network that the Application is using. + :paramtype destination_network: ~azure.servicefabric.models.NetworkRef + :keyword tcp: Configuration for tcp connectivity for this gateway. + :paramtype tcp: list[~azure.servicefabric.models.TcpConfig] + :keyword http: Configuration for http connectivity for this gateway. + :paramtype http: list[~azure.servicefabric.models.HttpConfig] + """ + super(GatewayResourceDescription, self).__init__(**kwargs) + self.name = name + self.description = description + self.source_network = source_network + self.destination_network = destination_network + self.tcp = tcp + self.http = http + self.status = None + self.status_details = None + self.ip_address = None + + +class GetBackupByStorageQueryDescription(msrest.serialization.Model): + """Describes additional filters to be applied, while listing backups, and backup storage details from where to fetch the backups. + + All required parameters must be populated in order to send to Azure. + + :ivar start_date_time_filter: Specifies the start date time in ISO8601 from which to enumerate + backups. If not specified, backups are enumerated from the beginning. + :vartype start_date_time_filter: ~datetime.datetime + :ivar end_date_time_filter: Specifies the end date time in ISO8601 till which to enumerate + backups. If not specified, backups are enumerated till the end. + :vartype end_date_time_filter: ~datetime.datetime + :ivar latest: If specified as true, gets the most recent backup (within the specified time + range) for every partition under the specified backup entity. + :vartype latest: bool + :ivar storage: Required. Describes the parameters for the backup storage from where to + enumerate backups. This is optional and by default backups are enumerated from the backup + storage where this backup entity is currently being backed up (as specified in backup policy). + This parameter is useful to be able to enumerate backups from another cluster where you may + intend to restore. + :vartype storage: ~azure.servicefabric.models.BackupStorageDescription + :ivar backup_entity: Required. Indicates the entity for which to enumerate backups. + :vartype backup_entity: ~azure.servicefabric.models.BackupEntity + """ + + _validation = { + 'storage': {'required': True}, + 'backup_entity': {'required': True}, + } + + _attribute_map = { + 'start_date_time_filter': {'key': 'StartDateTimeFilter', 'type': 'iso-8601'}, + 'end_date_time_filter': {'key': 'EndDateTimeFilter', 'type': 'iso-8601'}, + 'latest': {'key': 'Latest', 'type': 'bool'}, + 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, + 'backup_entity': {'key': 'BackupEntity', 'type': 'BackupEntity'}, + } + + def __init__( + self, + *, + storage: "BackupStorageDescription", + backup_entity: "BackupEntity", + start_date_time_filter: Optional[datetime.datetime] = None, + end_date_time_filter: Optional[datetime.datetime] = None, + latest: Optional[bool] = False, + **kwargs + ): + """ + :keyword start_date_time_filter: Specifies the start date time in ISO8601 from which to + enumerate backups. If not specified, backups are enumerated from the beginning. + :paramtype start_date_time_filter: ~datetime.datetime + :keyword end_date_time_filter: Specifies the end date time in ISO8601 till which to enumerate + backups. If not specified, backups are enumerated till the end. + :paramtype end_date_time_filter: ~datetime.datetime + :keyword latest: If specified as true, gets the most recent backup (within the specified time + range) for every partition under the specified backup entity. + :paramtype latest: bool + :keyword storage: Required. Describes the parameters for the backup storage from where to + enumerate backups. This is optional and by default backups are enumerated from the backup + storage where this backup entity is currently being backed up (as specified in backup policy). + This parameter is useful to be able to enumerate backups from another cluster where you may + intend to restore. + :paramtype storage: ~azure.servicefabric.models.BackupStorageDescription + :keyword backup_entity: Required. Indicates the entity for which to enumerate backups. + :paramtype backup_entity: ~azure.servicefabric.models.BackupEntity + """ + super(GetBackupByStorageQueryDescription, self).__init__(**kwargs) + self.start_date_time_filter = start_date_time_filter + self.end_date_time_filter = end_date_time_filter + self.latest = latest + self.storage = storage + self.backup_entity = backup_entity + + +class GetPropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that gets the specified property if it exists. +Note that if one PropertyBatchOperation in a PropertyBatch fails, +the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch operation, determined by the operation to be + performed. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind + :ivar property_name: Required. The name of the Service Fabric property. + :vartype property_name: str + :ivar include_value: Whether or not to return the property value with the metadata. + True if values should be returned with the metadata; False to return only property metadata. + :vartype include_value: bool + """ + + _validation = { + 'kind': {'required': True}, + 'property_name': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'include_value': {'key': 'IncludeValue', 'type': 'bool'}, + } + + def __init__( + self, + *, + property_name: str, + include_value: Optional[bool] = False, + **kwargs + ): + """ + :keyword property_name: Required. The name of the Service Fabric property. + :paramtype property_name: str + :keyword include_value: Whether or not to return the property value with the metadata. + True if values should be returned with the metadata; False to return only property metadata. + :paramtype include_value: bool + """ + super(GetPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.kind = 'Get' # type: str + self.include_value = include_value + + +class GuidPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Guid. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property, determined by the type of data. Following are the + possible values.Constant filled by server. Possible values include: "Invalid", "Binary", + "Int64", "Double", "String", "Guid". + :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind + :ivar data: Required. The data of the property value. + :vartype data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__( + self, + *, + data: str, + **kwargs + ): + """ + :keyword data: Required. The data of the property value. + :paramtype data: str + """ + super(GuidPropertyValue, self).__init__(**kwargs) + self.kind = 'Guid' # type: str + self.data = data + + +class HealthEvaluationWrapper(msrest.serialization.Model): + """Wrapper object for health evaluation. + + :ivar health_evaluation: Represents a health evaluation which describes the data and the + algorithm used by health manager to evaluate the health of an entity. + :vartype health_evaluation: ~azure.servicefabric.models.HealthEvaluation + """ + + _attribute_map = { + 'health_evaluation': {'key': 'HealthEvaluation', 'type': 'HealthEvaluation'}, + } + + def __init__( + self, + *, + health_evaluation: Optional["HealthEvaluation"] = None, + **kwargs + ): + """ + :keyword health_evaluation: Represents a health evaluation which describes the data and the + algorithm used by health manager to evaluate the health of an entity. + :paramtype health_evaluation: ~azure.servicefabric.models.HealthEvaluation + """ + super(HealthEvaluationWrapper, self).__init__(**kwargs) + self.health_evaluation = health_evaluation + + +class HealthInformation(msrest.serialization.Model): + """Represents common health report information. It is included in all health reports sent to health store and in all health events returned by health queries. + + All required parameters must be populated in order to send to Azure. + + :ivar source_id: Required. The source name that identifies the client/watchdog/system component + that generated the health information. + :vartype source_id: str + :ivar property: Required. The property of the health information. An entity can have health + reports for different properties. + The property is a string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report. + For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available + disk on a node, + so it can report "AvailableDisk" property on that node. + The same reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node. + In the health store, these reports are treated as separate health events for the specified + node. + + Together with the SourceId, the property uniquely identifies the health information. + :vartype property: str + :ivar health_state: Required. The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar time_to_live_in_milli_seconds: The duration for which this health report is valid. This + field uses ISO8601 format for specifying the duration. + When clients report periodically, they should send reports with higher frequency than time to + live. + If clients report on transition, they can set the time to live to infinite. + When time to live expires, the health event that contains the health information + is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if + RemoveWhenExpired false. + + If not specified, time to live defaults to infinite value. + :vartype time_to_live_in_milli_seconds: ~datetime.timedelta + :ivar description: The description of the health information. It represents free text used to + add human readable information about the report. + The maximum string length for the description is 4096 characters. + If the provided string is longer, it will be automatically truncated. + When truncated, the last characters of the description contain a marker "[Truncated]", and + total string size is 4096 characters. + The presence of the marker indicates to users that truncation occurred. + Note that when truncated, the description has less than 4096 characters from the original + string. + :vartype description: str + :ivar sequence_number: The sequence number for this health report as a numeric string. + The report sequence number is used by the health store to detect stale reports. + If not specified, a sequence number is auto-generated by the health client when a report is + added. + :vartype sequence_number: str + :ivar remove_when_expired: Value that indicates whether the report is removed from health store + when it expires. + If set to true, the report is removed from the health store after it expires. + If set to false, the report is treated as an error when expired. The value of this property is + false by default. + When clients report periodically, they should set RemoveWhenExpired false (default). + This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated + at error when the health report expires. + This flags the entity as being in Error health state. + :vartype remove_when_expired: bool + :ivar health_report_id: A health report ID which identifies the health report and can be used + to find more detailed information about a specific health event at + aka.ms/sfhealthid. + :vartype health_report_id: str + """ + + _validation = { + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + } + + _attribute_map = { + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, + } + + def __init__( + self, + *, + source_id: str, + property: str, + health_state: Union[str, "HealthState"], + time_to_live_in_milli_seconds: Optional[datetime.timedelta] = None, + description: Optional[str] = None, + sequence_number: Optional[str] = None, + remove_when_expired: Optional[bool] = None, + health_report_id: Optional[str] = None, + **kwargs + ): + """ + :keyword source_id: Required. The source name that identifies the client/watchdog/system + component that generated the health information. + :paramtype source_id: str + :keyword property: Required. The property of the health information. An entity can have health + reports for different properties. + The property is a string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report. + For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available + disk on a node, + so it can report "AvailableDisk" property on that node. + The same reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node. + In the health store, these reports are treated as separate health events for the specified + node. + + Together with the SourceId, the property uniquely identifies the health information. + :paramtype property: str + :keyword health_state: Required. The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword time_to_live_in_milli_seconds: The duration for which this health report is valid. + This field uses ISO8601 format for specifying the duration. + When clients report periodically, they should send reports with higher frequency than time to + live. + If clients report on transition, they can set the time to live to infinite. + When time to live expires, the health event that contains the health information + is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if + RemoveWhenExpired false. + + If not specified, time to live defaults to infinite value. + :paramtype time_to_live_in_milli_seconds: ~datetime.timedelta + :keyword description: The description of the health information. It represents free text used + to add human readable information about the report. + The maximum string length for the description is 4096 characters. + If the provided string is longer, it will be automatically truncated. + When truncated, the last characters of the description contain a marker "[Truncated]", and + total string size is 4096 characters. + The presence of the marker indicates to users that truncation occurred. + Note that when truncated, the description has less than 4096 characters from the original + string. + :paramtype description: str + :keyword sequence_number: The sequence number for this health report as a numeric string. + The report sequence number is used by the health store to detect stale reports. + If not specified, a sequence number is auto-generated by the health client when a report is + added. + :paramtype sequence_number: str + :keyword remove_when_expired: Value that indicates whether the report is removed from health + store when it expires. + If set to true, the report is removed from the health store after it expires. + If set to false, the report is treated as an error when expired. The value of this property is + false by default. + When clients report periodically, they should set RemoveWhenExpired false (default). + This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated + at error when the health report expires. + This flags the entity as being in Error health state. + :paramtype remove_when_expired: bool + :keyword health_report_id: A health report ID which identifies the health report and can be + used to find more detailed information about a specific health event at + aka.ms/sfhealthid. + :paramtype health_report_id: str + """ + super(HealthInformation, self).__init__(**kwargs) + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_in_milli_seconds = time_to_live_in_milli_seconds + self.description = description + self.sequence_number = sequence_number + self.remove_when_expired = remove_when_expired + self.health_report_id = health_report_id + + +class HealthEvent(HealthInformation): + """Represents health information reported on a health entity, such as cluster, application or node, with additional metadata added by the Health Manager. + + All required parameters must be populated in order to send to Azure. + + :ivar source_id: Required. The source name that identifies the client/watchdog/system component + that generated the health information. + :vartype source_id: str + :ivar property: Required. The property of the health information. An entity can have health + reports for different properties. + The property is a string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report. + For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available + disk on a node, + so it can report "AvailableDisk" property on that node. + The same reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node. + In the health store, these reports are treated as separate health events for the specified + node. + + Together with the SourceId, the property uniquely identifies the health information. + :vartype property: str + :ivar health_state: Required. The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar time_to_live_in_milli_seconds: The duration for which this health report is valid. This + field uses ISO8601 format for specifying the duration. + When clients report periodically, they should send reports with higher frequency than time to + live. + If clients report on transition, they can set the time to live to infinite. + When time to live expires, the health event that contains the health information + is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if + RemoveWhenExpired false. + + If not specified, time to live defaults to infinite value. + :vartype time_to_live_in_milli_seconds: ~datetime.timedelta + :ivar description: The description of the health information. It represents free text used to + add human readable information about the report. + The maximum string length for the description is 4096 characters. + If the provided string is longer, it will be automatically truncated. + When truncated, the last characters of the description contain a marker "[Truncated]", and + total string size is 4096 characters. + The presence of the marker indicates to users that truncation occurred. + Note that when truncated, the description has less than 4096 characters from the original + string. + :vartype description: str + :ivar sequence_number: The sequence number for this health report as a numeric string. + The report sequence number is used by the health store to detect stale reports. + If not specified, a sequence number is auto-generated by the health client when a report is + added. + :vartype sequence_number: str + :ivar remove_when_expired: Value that indicates whether the report is removed from health store + when it expires. + If set to true, the report is removed from the health store after it expires. + If set to false, the report is treated as an error when expired. The value of this property is + false by default. + When clients report periodically, they should set RemoveWhenExpired false (default). + This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated + at error when the health report expires. + This flags the entity as being in Error health state. + :vartype remove_when_expired: bool + :ivar health_report_id: A health report ID which identifies the health report and can be used + to find more detailed information about a specific health event at + aka.ms/sfhealthid. + :vartype health_report_id: str + :ivar is_expired: Returns true if the health event is expired, otherwise false. + :vartype is_expired: bool + :ivar source_utc_timestamp: The date and time when the health report was sent by the source. + :vartype source_utc_timestamp: ~datetime.datetime + :ivar last_modified_utc_timestamp: The date and time when the health report was last modified + by the health store. + :vartype last_modified_utc_timestamp: ~datetime.datetime + :ivar last_ok_transition_at: If the current health state is 'Ok', this property returns the + time at which the health report was first reported with 'Ok'. + For periodic reporting, many reports with the same state may have been generated. + This property returns the date and time when the first 'Ok' health report was received. + + If the current health state is 'Error' or 'Warning', returns the date and time at which the + health state was last in 'Ok', before transitioning to a different state. + + If the health state was never 'Ok', the value will be zero date-time. + :vartype last_ok_transition_at: ~datetime.datetime + :ivar last_warning_transition_at: If the current health state is 'Warning', this property + returns the time at which the health report was first reported with 'Warning'. For periodic + reporting, many reports with the same state may have been generated however, this property + returns only the date and time at the first 'Warning' health report was received. + + If the current health state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different state. + + If the health state was never 'Warning', the value will be zero date-time. + :vartype last_warning_transition_at: ~datetime.datetime + :ivar last_error_transition_at: If the current health state is 'Error', this property returns + the time at which the health report was first reported with 'Error'. For periodic reporting, + many reports with the same state may have been generated however, this property returns only + the date and time at the first 'Error' health report was received. + + If the current health state is 'Ok' or 'Warning', returns the date and time at which the + health state was last in 'Error', before transitioning to a different state. + + If the health state was never 'Error', the value will be zero date-time. + :vartype last_error_transition_at: ~datetime.datetime + """ + + _validation = { + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + } + + _attribute_map = { + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, + 'is_expired': {'key': 'IsExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, + 'last_ok_transition_at': {'key': 'LastOkTransitionAt', 'type': 'iso-8601'}, + 'last_warning_transition_at': {'key': 'LastWarningTransitionAt', 'type': 'iso-8601'}, + 'last_error_transition_at': {'key': 'LastErrorTransitionAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + source_id: str, + property: str, + health_state: Union[str, "HealthState"], + time_to_live_in_milli_seconds: Optional[datetime.timedelta] = None, + description: Optional[str] = None, + sequence_number: Optional[str] = None, + remove_when_expired: Optional[bool] = None, + health_report_id: Optional[str] = None, + is_expired: Optional[bool] = None, + source_utc_timestamp: Optional[datetime.datetime] = None, + last_modified_utc_timestamp: Optional[datetime.datetime] = None, + last_ok_transition_at: Optional[datetime.datetime] = None, + last_warning_transition_at: Optional[datetime.datetime] = None, + last_error_transition_at: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword source_id: Required. The source name that identifies the client/watchdog/system + component that generated the health information. + :paramtype source_id: str + :keyword property: Required. The property of the health information. An entity can have health + reports for different properties. + The property is a string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report. + For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available + disk on a node, + so it can report "AvailableDisk" property on that node. + The same reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node. + In the health store, these reports are treated as separate health events for the specified + node. + + Together with the SourceId, the property uniquely identifies the health information. + :paramtype property: str + :keyword health_state: Required. The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword time_to_live_in_milli_seconds: The duration for which this health report is valid. + This field uses ISO8601 format for specifying the duration. + When clients report periodically, they should send reports with higher frequency than time to + live. + If clients report on transition, they can set the time to live to infinite. + When time to live expires, the health event that contains the health information + is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if + RemoveWhenExpired false. + + If not specified, time to live defaults to infinite value. + :paramtype time_to_live_in_milli_seconds: ~datetime.timedelta + :keyword description: The description of the health information. It represents free text used + to add human readable information about the report. + The maximum string length for the description is 4096 characters. + If the provided string is longer, it will be automatically truncated. + When truncated, the last characters of the description contain a marker "[Truncated]", and + total string size is 4096 characters. + The presence of the marker indicates to users that truncation occurred. + Note that when truncated, the description has less than 4096 characters from the original + string. + :paramtype description: str + :keyword sequence_number: The sequence number for this health report as a numeric string. + The report sequence number is used by the health store to detect stale reports. + If not specified, a sequence number is auto-generated by the health client when a report is + added. + :paramtype sequence_number: str + :keyword remove_when_expired: Value that indicates whether the report is removed from health + store when it expires. + If set to true, the report is removed from the health store after it expires. + If set to false, the report is treated as an error when expired. The value of this property is + false by default. + When clients report periodically, they should set RemoveWhenExpired false (default). + This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated + at error when the health report expires. + This flags the entity as being in Error health state. + :paramtype remove_when_expired: bool + :keyword health_report_id: A health report ID which identifies the health report and can be + used to find more detailed information about a specific health event at + aka.ms/sfhealthid. + :paramtype health_report_id: str + :keyword is_expired: Returns true if the health event is expired, otherwise false. + :paramtype is_expired: bool + :keyword source_utc_timestamp: The date and time when the health report was sent by the source. + :paramtype source_utc_timestamp: ~datetime.datetime + :keyword last_modified_utc_timestamp: The date and time when the health report was last + modified by the health store. + :paramtype last_modified_utc_timestamp: ~datetime.datetime + :keyword last_ok_transition_at: If the current health state is 'Ok', this property returns the + time at which the health report was first reported with 'Ok'. + For periodic reporting, many reports with the same state may have been generated. + This property returns the date and time when the first 'Ok' health report was received. + + If the current health state is 'Error' or 'Warning', returns the date and time at which the + health state was last in 'Ok', before transitioning to a different state. + + If the health state was never 'Ok', the value will be zero date-time. + :paramtype last_ok_transition_at: ~datetime.datetime + :keyword last_warning_transition_at: If the current health state is 'Warning', this property + returns the time at which the health report was first reported with 'Warning'. For periodic + reporting, many reports with the same state may have been generated however, this property + returns only the date and time at the first 'Warning' health report was received. + + If the current health state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different state. + + If the health state was never 'Warning', the value will be zero date-time. + :paramtype last_warning_transition_at: ~datetime.datetime + :keyword last_error_transition_at: If the current health state is 'Error', this property + returns the time at which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated however, this property + returns only the date and time at the first 'Error' health report was received. + + If the current health state is 'Ok' or 'Warning', returns the date and time at which the + health state was last in 'Error', before transitioning to a different state. + + If the health state was never 'Error', the value will be zero date-time. + :paramtype last_error_transition_at: ~datetime.datetime + """ + super(HealthEvent, self).__init__(source_id=source_id, property=property, health_state=health_state, time_to_live_in_milli_seconds=time_to_live_in_milli_seconds, description=description, sequence_number=sequence_number, remove_when_expired=remove_when_expired, health_report_id=health_report_id, **kwargs) + self.is_expired = is_expired + self.source_utc_timestamp = source_utc_timestamp + self.last_modified_utc_timestamp = last_modified_utc_timestamp + self.last_ok_transition_at = last_ok_transition_at + self.last_warning_transition_at = last_warning_transition_at + self.last_error_transition_at = last_error_transition_at + + +class HealthStateCount(msrest.serialization.Model): + """Represents information about how many health entities are in Ok, Warning and Error health state. + + :ivar ok_count: The number of health entities with aggregated health state Ok. + :vartype ok_count: long + :ivar warning_count: The number of health entities with aggregated health state Warning. + :vartype warning_count: long + :ivar error_count: The number of health entities with aggregated health state Error. + :vartype error_count: long + """ + + _validation = { + 'ok_count': {'minimum': 0}, + 'warning_count': {'minimum': 0}, + 'error_count': {'minimum': 0}, + } + + _attribute_map = { + 'ok_count': {'key': 'OkCount', 'type': 'long'}, + 'warning_count': {'key': 'WarningCount', 'type': 'long'}, + 'error_count': {'key': 'ErrorCount', 'type': 'long'}, + } + + def __init__( + self, + *, + ok_count: Optional[int] = None, + warning_count: Optional[int] = None, + error_count: Optional[int] = None, + **kwargs + ): + """ + :keyword ok_count: The number of health entities with aggregated health state Ok. + :paramtype ok_count: long + :keyword warning_count: The number of health entities with aggregated health state Warning. + :paramtype warning_count: long + :keyword error_count: The number of health entities with aggregated health state Error. + :paramtype error_count: long + """ + super(HealthStateCount, self).__init__(**kwargs) + self.ok_count = ok_count + self.warning_count = warning_count + self.error_count = error_count + + +class HealthStatistics(msrest.serialization.Model): + """The health statistics of an entity, returned as part of the health query result when the query description is configured to include statistics. +The statistics include health state counts for all children types of the current entity. +For example, for cluster, the health statistics include health state counts for nodes, applications, services, partitions, replicas, deployed applications and deployed service packages. +For partition, the health statistics include health counts for replicas. + + :ivar health_state_count_list: List of health state counts per entity kind, which keeps track + of how many children of the queried entity are in Ok, Warning and Error state. + :vartype health_state_count_list: list[~azure.servicefabric.models.EntityKindHealthStateCount] + """ + + _attribute_map = { + 'health_state_count_list': {'key': 'HealthStateCountList', 'type': '[EntityKindHealthStateCount]'}, + } + + def __init__( + self, + *, + health_state_count_list: Optional[List["EntityKindHealthStateCount"]] = None, + **kwargs + ): + """ + :keyword health_state_count_list: List of health state counts per entity kind, which keeps + track of how many children of the queried entity are in Ok, Warning and Error state. + :paramtype health_state_count_list: + list[~azure.servicefabric.models.EntityKindHealthStateCount] + """ + super(HealthStatistics, self).__init__(**kwargs) + self.health_state_count_list = health_state_count_list + + +class HttpConfig(msrest.serialization.Model): + """Describes the http configuration for external connectivity for this network. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. http gateway config name. + :vartype name: str + :ivar port: Required. Specifies the port at which the service endpoint below needs to be + exposed. + :vartype port: int + :ivar hosts: Required. description for routing. + :vartype hosts: list[~azure.servicefabric.models.HttpHostConfig] + """ + + _validation = { + 'name': {'required': True}, + 'port': {'required': True}, + 'hosts': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'hosts': {'key': 'hosts', 'type': '[HttpHostConfig]'}, + } + + def __init__( + self, + *, + name: str, + port: int, + hosts: List["HttpHostConfig"], + **kwargs + ): + """ + :keyword name: Required. http gateway config name. + :paramtype name: str + :keyword port: Required. Specifies the port at which the service endpoint below needs to be + exposed. + :paramtype port: int + :keyword hosts: Required. description for routing. + :paramtype hosts: list[~azure.servicefabric.models.HttpHostConfig] + """ + super(HttpConfig, self).__init__(**kwargs) + self.name = name + self.port = port + self.hosts = hosts + + +class HttpHostConfig(msrest.serialization.Model): + """Describes the hostname properties for http routing. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. http hostname config name. + :vartype name: str + :ivar routes: Required. Route information to use for routing. Routes are processed in the order + they are specified. Specify routes that are more specific before routes that can handle general + cases. + :vartype routes: list[~azure.servicefabric.models.HttpRouteConfig] + """ + + _validation = { + 'name': {'required': True}, + 'routes': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'routes': {'key': 'routes', 'type': '[HttpRouteConfig]'}, + } + + def __init__( + self, + *, + name: str, + routes: List["HttpRouteConfig"], + **kwargs + ): + """ + :keyword name: Required. http hostname config name. + :paramtype name: str + :keyword routes: Required. Route information to use for routing. Routes are processed in the + order they are specified. Specify routes that are more specific before routes that can handle + general cases. + :paramtype routes: list[~azure.servicefabric.models.HttpRouteConfig] + """ + super(HttpHostConfig, self).__init__(**kwargs) + self.name = name + self.routes = routes + + +class HttpRouteConfig(msrest.serialization.Model): + """Describes the hostname properties for http routing. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. http route name. + :vartype name: str + :ivar match: Required. Describes a rule for http route matching. + :vartype match: ~azure.servicefabric.models.HttpRouteMatchRule + :ivar destination: Required. Describes destination endpoint for routing traffic. + :vartype destination: ~azure.servicefabric.models.GatewayDestination + """ + + _validation = { + 'name': {'required': True}, + 'match': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'match': {'key': 'match', 'type': 'HttpRouteMatchRule'}, + 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, + } + + def __init__( + self, + *, + name: str, + match: "HttpRouteMatchRule", + destination: "GatewayDestination", + **kwargs + ): + """ + :keyword name: Required. http route name. + :paramtype name: str + :keyword match: Required. Describes a rule for http route matching. + :paramtype match: ~azure.servicefabric.models.HttpRouteMatchRule + :keyword destination: Required. Describes destination endpoint for routing traffic. + :paramtype destination: ~azure.servicefabric.models.GatewayDestination + """ + super(HttpRouteConfig, self).__init__(**kwargs) + self.name = name + self.match = match + self.destination = destination + + +class HttpRouteMatchHeader(msrest.serialization.Model): + """Describes header information for http route matching. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of header to match in request. + :vartype name: str + :ivar value: Value of header to match in request. + :vartype value: str + :ivar type: how to match header value. Possible values include: "exact". + :vartype type: str or ~azure.servicefabric.models.HeaderMatchType + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + value: Optional[str] = None, + type: Optional[Union[str, "HeaderMatchType"]] = None, + **kwargs + ): + """ + :keyword name: Required. Name of header to match in request. + :paramtype name: str + :keyword value: Value of header to match in request. + :paramtype value: str + :keyword type: how to match header value. Possible values include: "exact". + :paramtype type: str or ~azure.servicefabric.models.HeaderMatchType + """ + super(HttpRouteMatchHeader, self).__init__(**kwargs) + self.name = name + self.value = value + self.type = type + + +class HttpRouteMatchPath(msrest.serialization.Model): + """Path to match for routing. + + All required parameters must be populated in order to send to Azure. + + :ivar value: Required. Uri path to match for request. + :vartype value: str + :ivar rewrite: replacement string for matched part of the Uri. + :vartype rewrite: str + :ivar type: Required. how to match value in the Uri. Possible values include: "prefix". + :vartype type: str or ~azure.servicefabric.models.PathMatchType + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'rewrite': {'key': 'rewrite', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + value: str, + type: Union[str, "PathMatchType"], + rewrite: Optional[str] = None, + **kwargs + ): + """ + :keyword value: Required. Uri path to match for request. + :paramtype value: str + :keyword rewrite: replacement string for matched part of the Uri. + :paramtype rewrite: str + :keyword type: Required. how to match value in the Uri. Possible values include: "prefix". + :paramtype type: str or ~azure.servicefabric.models.PathMatchType + """ + super(HttpRouteMatchPath, self).__init__(**kwargs) + self.value = value + self.rewrite = rewrite + self.type = type + + +class HttpRouteMatchRule(msrest.serialization.Model): + """Describes a rule for http route matching. + + All required parameters must be populated in order to send to Azure. + + :ivar path: Required. Path to match for routing. + :vartype path: ~azure.servicefabric.models.HttpRouteMatchPath + :ivar headers: headers and their values to match in request. + :vartype headers: list[~azure.servicefabric.models.HttpRouteMatchHeader] + """ + + _validation = { + 'path': {'required': True}, + } + + _attribute_map = { + 'path': {'key': 'path', 'type': 'HttpRouteMatchPath'}, + 'headers': {'key': 'headers', 'type': '[HttpRouteMatchHeader]'}, + } + + def __init__( + self, + *, + path: "HttpRouteMatchPath", + headers: Optional[List["HttpRouteMatchHeader"]] = None, + **kwargs + ): + """ + :keyword path: Required. Path to match for routing. + :paramtype path: ~azure.servicefabric.models.HttpRouteMatchPath + :keyword headers: headers and their values to match in request. + :paramtype headers: list[~azure.servicefabric.models.HttpRouteMatchHeader] + """ + super(HttpRouteMatchRule, self).__init__(**kwargs) + self.path = path + self.headers = headers + + +class IdentityDescription(msrest.serialization.Model): + """Information describing the identities associated with this application. + + All required parameters must be populated in order to send to Azure. + + :ivar token_service_endpoint: the endpoint for the token service managing this identity. + :vartype token_service_endpoint: str + :ivar type: Required. the types of identities associated with this resource; currently + restricted to 'SystemAssigned and UserAssigned'. + :vartype type: str + :ivar tenant_id: the identifier of the tenant containing the application's identity. + :vartype tenant_id: str + :ivar principal_id: the object identifier of the Service Principal of the identity associated + with this resource. + :vartype principal_id: str + :ivar user_assigned_identities: represents user assigned identities map. + :vartype user_assigned_identities: dict[str, + ~azure.servicefabric.models.IdentityItemDescription] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'token_service_endpoint': {'key': 'tokenServiceEndpoint', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{IdentityItemDescription}'}, + } + + def __init__( + self, + *, + type: str, + token_service_endpoint: Optional[str] = None, + tenant_id: Optional[str] = None, + principal_id: Optional[str] = None, + user_assigned_identities: Optional[Dict[str, "IdentityItemDescription"]] = None, + **kwargs + ): + """ + :keyword token_service_endpoint: the endpoint for the token service managing this identity. + :paramtype token_service_endpoint: str + :keyword type: Required. the types of identities associated with this resource; currently + restricted to 'SystemAssigned and UserAssigned'. + :paramtype type: str + :keyword tenant_id: the identifier of the tenant containing the application's identity. + :paramtype tenant_id: str + :keyword principal_id: the object identifier of the Service Principal of the identity + associated with this resource. + :paramtype principal_id: str + :keyword user_assigned_identities: represents user assigned identities map. + :paramtype user_assigned_identities: dict[str, + ~azure.servicefabric.models.IdentityItemDescription] + """ + super(IdentityDescription, self).__init__(**kwargs) + self.token_service_endpoint = token_service_endpoint + self.type = type + self.tenant_id = tenant_id + self.principal_id = principal_id + self.user_assigned_identities = user_assigned_identities + + +class IdentityItemDescription(msrest.serialization.Model): + """Describes a single user-assigned identity associated with the application. + + :ivar principal_id: the object identifier of the Service Principal which this identity + represents. + :vartype principal_id: str + :ivar client_id: the client identifier of the Service Principal which this identity represents. + :vartype client_id: str + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + *, + principal_id: Optional[str] = None, + client_id: Optional[str] = None, + **kwargs + ): + """ + :keyword principal_id: the object identifier of the Service Principal which this identity + represents. + :paramtype principal_id: str + :keyword client_id: the client identifier of the Service Principal which this identity + represents. + :paramtype client_id: str + """ + super(IdentityItemDescription, self).__init__(**kwargs) + self.principal_id = principal_id + self.client_id = client_id + + +class ImageRegistryCredential(msrest.serialization.Model): + """Image registry credential. + + All required parameters must be populated in order to send to Azure. + + :ivar server: Required. Docker image registry server, without protocol such as ``http`` and + ``https``. + :vartype server: str + :ivar username: Required. The username for the private registry. + :vartype username: str + :ivar password_type: The type of the image registry password being given in password. Possible + values include: "ClearText", "KeyVaultReference", "SecretValueReference". Default value: + "ClearText". + :vartype password_type: str or ~azure.servicefabric.models.ImageRegistryPasswordType + :ivar password: The password for the private registry. The password is required for create or + update operations, however it is not returned in the get or list operations. Will be processed + based on the type provided. + :vartype password: str + """ + + _validation = { + 'server': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'server': {'key': 'server', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password_type': {'key': 'passwordType', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + *, + server: str, + username: str, + password_type: Optional[Union[str, "ImageRegistryPasswordType"]] = "ClearText", + password: Optional[str] = None, + **kwargs + ): + """ + :keyword server: Required. Docker image registry server, without protocol such as ``http`` and + ``https``. + :paramtype server: str + :keyword username: Required. The username for the private registry. + :paramtype username: str + :keyword password_type: The type of the image registry password being given in password. + Possible values include: "ClearText", "KeyVaultReference", "SecretValueReference". Default + value: "ClearText". + :paramtype password_type: str or ~azure.servicefabric.models.ImageRegistryPasswordType + :keyword password: The password for the private registry. The password is required for create + or update operations, however it is not returned in the get or list operations. Will be + processed based on the type provided. + :paramtype password: str + """ + super(ImageRegistryCredential, self).__init__(**kwargs) + self.server = server + self.username = username + self.password_type = password_type + self.password = password + + +class ImageStoreContent(msrest.serialization.Model): + """Information about the image store content. + + :ivar store_files: The list of image store file info objects represents files found under the + given image store relative path. + :vartype store_files: list[~azure.servicefabric.models.FileInfo] + :ivar store_folders: The list of image store folder info objects represents subfolders found + under the given image store relative path. + :vartype store_folders: list[~azure.servicefabric.models.FolderInfo] + """ + + _attribute_map = { + 'store_files': {'key': 'StoreFiles', 'type': '[FileInfo]'}, + 'store_folders': {'key': 'StoreFolders', 'type': '[FolderInfo]'}, + } + + def __init__( + self, + *, + store_files: Optional[List["FileInfo"]] = None, + store_folders: Optional[List["FolderInfo"]] = None, + **kwargs + ): + """ + :keyword store_files: The list of image store file info objects represents files found under + the given image store relative path. + :paramtype store_files: list[~azure.servicefabric.models.FileInfo] + :keyword store_folders: The list of image store folder info objects represents subfolders found + under the given image store relative path. + :paramtype store_folders: list[~azure.servicefabric.models.FolderInfo] + """ + super(ImageStoreContent, self).__init__(**kwargs) + self.store_files = store_files + self.store_folders = store_folders + + +class ImageStoreCopyDescription(msrest.serialization.Model): + """Information about how to copy image store content from one image store relative path to another image store relative path. + + All required parameters must be populated in order to send to Azure. + + :ivar remote_source: Required. The relative path of source image store content to be copied + from. + :vartype remote_source: str + :ivar remote_destination: Required. The relative path of destination image store content to be + copied to. + :vartype remote_destination: str + :ivar skip_files: The list of the file names to be skipped for copying. + :vartype skip_files: list[str] + :ivar check_mark_file: Indicates whether to check mark file during copying. The property is + true if checking mark file is required, false otherwise. The mark file is used to check whether + the folder is well constructed. If the property is true and mark file does not exist, the copy + is skipped. + :vartype check_mark_file: bool + """ + + _validation = { + 'remote_source': {'required': True}, + 'remote_destination': {'required': True}, + } + + _attribute_map = { + 'remote_source': {'key': 'RemoteSource', 'type': 'str'}, + 'remote_destination': {'key': 'RemoteDestination', 'type': 'str'}, + 'skip_files': {'key': 'SkipFiles', 'type': '[str]'}, + 'check_mark_file': {'key': 'CheckMarkFile', 'type': 'bool'}, + } + + def __init__( + self, + *, + remote_source: str, + remote_destination: str, + skip_files: Optional[List[str]] = None, + check_mark_file: Optional[bool] = None, + **kwargs + ): + """ + :keyword remote_source: Required. The relative path of source image store content to be copied + from. + :paramtype remote_source: str + :keyword remote_destination: Required. The relative path of destination image store content to + be copied to. + :paramtype remote_destination: str + :keyword skip_files: The list of the file names to be skipped for copying. + :paramtype skip_files: list[str] + :keyword check_mark_file: Indicates whether to check mark file during copying. The property is + true if checking mark file is required, false otherwise. The mark file is used to check whether + the folder is well constructed. If the property is true and mark file does not exist, the copy + is skipped. + :paramtype check_mark_file: bool + """ + super(ImageStoreCopyDescription, self).__init__(**kwargs) + self.remote_source = remote_source + self.remote_destination = remote_destination + self.skip_files = skip_files + self.check_mark_file = check_mark_file + + +class ImageStoreInfo(msrest.serialization.Model): + """Information about the ImageStore's resource usage. + + :ivar disk_info: disk capacity and available disk space on the node where the ImageStore + primary is placed. + :vartype disk_info: ~azure.servicefabric.models.DiskInfo + :ivar used_by_metadata: the ImageStore's file system usage for metadata. + :vartype used_by_metadata: ~azure.servicefabric.models.UsageInfo + :ivar used_by_staging: The ImageStore's file system usage for staging files that are being + uploaded. + :vartype used_by_staging: ~azure.servicefabric.models.UsageInfo + :ivar used_by_copy: the ImageStore's file system usage for copied application and cluster + packages. `Removing application and cluster packages + `_ will + free up this space. + :vartype used_by_copy: ~azure.servicefabric.models.UsageInfo + :ivar used_by_register: the ImageStore's file system usage for registered and cluster packages. + `Unregistering application + `_ + and `cluster packages + `_ + will free up this space. + :vartype used_by_register: ~azure.servicefabric.models.UsageInfo + """ + + _attribute_map = { + 'disk_info': {'key': 'DiskInfo', 'type': 'DiskInfo'}, + 'used_by_metadata': {'key': 'UsedByMetadata', 'type': 'UsageInfo'}, + 'used_by_staging': {'key': 'UsedByStaging', 'type': 'UsageInfo'}, + 'used_by_copy': {'key': 'UsedByCopy', 'type': 'UsageInfo'}, + 'used_by_register': {'key': 'UsedByRegister', 'type': 'UsageInfo'}, + } + + def __init__( + self, + *, + disk_info: Optional["DiskInfo"] = None, + used_by_metadata: Optional["UsageInfo"] = None, + used_by_staging: Optional["UsageInfo"] = None, + used_by_copy: Optional["UsageInfo"] = None, + used_by_register: Optional["UsageInfo"] = None, + **kwargs + ): + """ + :keyword disk_info: disk capacity and available disk space on the node where the ImageStore + primary is placed. + :paramtype disk_info: ~azure.servicefabric.models.DiskInfo + :keyword used_by_metadata: the ImageStore's file system usage for metadata. + :paramtype used_by_metadata: ~azure.servicefabric.models.UsageInfo + :keyword used_by_staging: The ImageStore's file system usage for staging files that are being + uploaded. + :paramtype used_by_staging: ~azure.servicefabric.models.UsageInfo + :keyword used_by_copy: the ImageStore's file system usage for copied application and cluster + packages. `Removing application and cluster packages + `_ will + free up this space. + :paramtype used_by_copy: ~azure.servicefabric.models.UsageInfo + :keyword used_by_register: the ImageStore's file system usage for registered and cluster + packages. `Unregistering application + `_ + and `cluster packages + `_ + will free up this space. + :paramtype used_by_register: ~azure.servicefabric.models.UsageInfo + """ + super(ImageStoreInfo, self).__init__(**kwargs) + self.disk_info = disk_info + self.used_by_metadata = used_by_metadata + self.used_by_staging = used_by_staging + self.used_by_copy = used_by_copy + self.used_by_register = used_by_register + + +class SecretResourcePropertiesBase(msrest.serialization.Model): + """This type describes the properties of a secret resource, including its kind. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecretResourceProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Describes the kind of secret.Constant filled by server. Possible values + include: "inlinedValue", "keyVaultVersionedReference". + :vartype kind: str or ~azure.servicefabric.models.SecretKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'SecretResourceProperties': 'SecretResourceProperties'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(SecretResourcePropertiesBase, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class SecretResourceProperties(SecretResourcePropertiesBase): + """Describes the properties of a secret resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: InlinedValueSecretResourceProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Describes the kind of secret.Constant filled by server. Possible values + include: "inlinedValue", "keyVaultVersionedReference". + :vartype kind: str or ~azure.servicefabric.models.SecretKind + :ivar description: User readable description of the secret. + :vartype description: str + :ivar status: Status of the resource. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the secret. + :vartype status_details: str + :ivar content_type: The type of the content stored in the secret value. The value of this + property is opaque to Service Fabric. Once set, the value of this property cannot be changed. + :vartype content_type: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'inlinedValue': 'InlinedValueSecretResourceProperties'} + } + + def __init__( + self, + *, + description: Optional[str] = None, + content_type: Optional[str] = None, + **kwargs + ): + """ + :keyword description: User readable description of the secret. + :paramtype description: str + :keyword content_type: The type of the content stored in the secret value. The value of this + property is opaque to Service Fabric. Once set, the value of this property cannot be changed. + :paramtype content_type: str + """ + super(SecretResourceProperties, self).__init__(**kwargs) + self.kind = 'SecretResourceProperties' # type: str + self.description = description + self.status = None + self.status_details = None + self.content_type = content_type + + +class InlinedValueSecretResourceProperties(SecretResourceProperties): + """Describes the properties of a secret resource whose value is provided explicitly as plaintext. The secret resource may have multiple values, each being uniquely versioned. The secret value of each version is stored encrypted, and delivered as plaintext into the context of applications referencing it. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Describes the kind of secret.Constant filled by server. Possible values + include: "inlinedValue", "keyVaultVersionedReference". + :vartype kind: str or ~azure.servicefabric.models.SecretKind + :ivar description: User readable description of the secret. + :vartype description: str + :ivar status: Status of the resource. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the secret. + :vartype status_details: str + :ivar content_type: The type of the content stored in the secret value. The value of this + property is opaque to Service Fabric. Once set, the value of this property cannot be changed. + :vartype content_type: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + content_type: Optional[str] = None, + **kwargs + ): + """ + :keyword description: User readable description of the secret. + :paramtype description: str + :keyword content_type: The type of the content stored in the secret value. The value of this + property is opaque to Service Fabric. Once set, the value of this property cannot be changed. + :paramtype content_type: str + """ + super(InlinedValueSecretResourceProperties, self).__init__(description=description, content_type=content_type, **kwargs) + self.kind = 'inlinedValue' # type: str + + +class InstanceLifecycleDescription(msrest.serialization.Model): + """Describes how the instance will behave. + + :ivar restore_replica_location_after_upgrade: If set to true, move/swap replica to original + location after upgrade. + :vartype restore_replica_location_after_upgrade: bool + """ + + _attribute_map = { + 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + } + + def __init__( + self, + *, + restore_replica_location_after_upgrade: Optional[bool] = None, + **kwargs + ): + """ + :keyword restore_replica_location_after_upgrade: If set to true, move/swap replica to original + location after upgrade. + :paramtype restore_replica_location_after_upgrade: bool + """ + super(InstanceLifecycleDescription, self).__init__(**kwargs) + self.restore_replica_location_after_upgrade = restore_replica_location_after_upgrade + + +class Int64PropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Int64. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property, determined by the type of data. Following are the + possible values.Constant filled by server. Possible values include: "Invalid", "Binary", + "Int64", "Double", "String", "Guid". + :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind + :ivar data: Required. The data of the property value. + :vartype data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__( + self, + *, + data: str, + **kwargs + ): + """ + :keyword data: Required. The data of the property value. + :paramtype data: str + """ + super(Int64PropertyValue, self).__init__(**kwargs) + self.kind = 'Int64' # type: str + self.data = data + + +class PartitionInformation(msrest.serialization.Model): + """Information about the partition identity, partitioning scheme and keys supported by it. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Int64RangePartitionInformation, NamedPartitionInformation, SingletonPartitionInformation. + + All required parameters must be populated in order to send to Azure. + + :ivar service_partition_kind: Required. The kind of partitioning scheme used to partition the + service.Constant filled by server. Possible values include: "Invalid", "Singleton", + "Int64Range", "Named". + :vartype service_partition_kind: str or ~azure.servicefabric.models.ServicePartitionKind + :ivar id: An internal ID used by Service Fabric to uniquely identify a partition. This is a + randomly generated GUID when the service was created. The partition ID is unique and does not + change for the lifetime of the service. If the same service was deleted and recreated the IDs + of its partitions would be different. + :vartype id: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'str'}, + } + + _subtype_map = { + 'service_partition_kind': {'Int64Range': 'Int64RangePartitionInformation', 'Named': 'NamedPartitionInformation', 'Singleton': 'SingletonPartitionInformation'} + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: An internal ID used by Service Fabric to uniquely identify a partition. This is a + randomly generated GUID when the service was created. The partition ID is unique and does not + change for the lifetime of the service. If the same service was deleted and recreated the IDs + of its partitions would be different. + :paramtype id: str + """ + super(PartitionInformation, self).__init__(**kwargs) + self.service_partition_kind = None # type: Optional[str] + self.id = id + + +class Int64RangePartitionInformation(PartitionInformation): + """Describes the partition information for the integer range that is based on partition schemes. + + All required parameters must be populated in order to send to Azure. + + :ivar service_partition_kind: Required. The kind of partitioning scheme used to partition the + service.Constant filled by server. Possible values include: "Invalid", "Singleton", + "Int64Range", "Named". + :vartype service_partition_kind: str or ~azure.servicefabric.models.ServicePartitionKind + :ivar id: An internal ID used by Service Fabric to uniquely identify a partition. This is a + randomly generated GUID when the service was created. The partition ID is unique and does not + change for the lifetime of the service. If the same service was deleted and recreated the IDs + of its partitions would be different. + :vartype id: str + :ivar low_key: Specifies the minimum key value handled by this partition. + :vartype low_key: str + :ivar high_key: Specifies the maximum key value handled by this partition. + :vartype high_key: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'str'}, + 'low_key': {'key': 'LowKey', 'type': 'str'}, + 'high_key': {'key': 'HighKey', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + low_key: Optional[str] = None, + high_key: Optional[str] = None, + **kwargs + ): + """ + :keyword id: An internal ID used by Service Fabric to uniquely identify a partition. This is a + randomly generated GUID when the service was created. The partition ID is unique and does not + change for the lifetime of the service. If the same service was deleted and recreated the IDs + of its partitions would be different. + :paramtype id: str + :keyword low_key: Specifies the minimum key value handled by this partition. + :paramtype low_key: str + :keyword high_key: Specifies the maximum key value handled by this partition. + :paramtype high_key: str + """ + super(Int64RangePartitionInformation, self).__init__(id=id, **kwargs) + self.service_partition_kind = 'Int64Range' # type: str + self.low_key = low_key + self.high_key = high_key + + +class InvokeDataLossResult(msrest.serialization.Model): + """Represents information about an operation in a terminal state (Completed or Faulted). + + :ivar error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, + this is an error code indicating the reason. + :vartype error_code: int + :ivar selected_partition: This class returns information about the partition that the + user-induced operation acted upon. + :vartype selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__( + self, + *, + error_code: Optional[int] = None, + selected_partition: Optional["SelectedPartition"] = None, + **kwargs + ): + """ + :keyword error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, + this is an error code indicating the reason. + :paramtype error_code: int + :keyword selected_partition: This class returns information about the partition that the + user-induced operation acted upon. + :paramtype selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + super(InvokeDataLossResult, self).__init__(**kwargs) + self.error_code = error_code + self.selected_partition = selected_partition + + +class InvokeQuorumLossResult(msrest.serialization.Model): + """Represents information about an operation in a terminal state (Completed or Faulted). + + :ivar error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, + this is an error code indicating the reason. + :vartype error_code: int + :ivar selected_partition: This class returns information about the partition that the + user-induced operation acted upon. + :vartype selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__( + self, + *, + error_code: Optional[int] = None, + selected_partition: Optional["SelectedPartition"] = None, + **kwargs + ): + """ + :keyword error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, + this is an error code indicating the reason. + :paramtype error_code: int + :keyword selected_partition: This class returns information about the partition that the + user-induced operation acted upon. + :paramtype selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + super(InvokeQuorumLossResult, self).__init__(**kwargs) + self.error_code = error_code + self.selected_partition = selected_partition + + +class ReplicaStatusBase(msrest.serialization.Model): + """Information about the replica. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: KeyValueStoreReplicaStatus. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. + Possible values include: "Invalid", "KeyValueStore". + :vartype kind: str or ~azure.servicefabric.models.ReplicaKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'KeyValueStore': 'KeyValueStoreReplicaStatus'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ReplicaStatusBase, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class KeyValueStoreReplicaStatus(ReplicaStatusBase): + """Key value store related information for the replica. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. + Possible values include: "Invalid", "KeyValueStore". + :vartype kind: str or ~azure.servicefabric.models.ReplicaKind + :ivar database_row_count_estimate: Value indicating the estimated number of rows in the + underlying database. + :vartype database_row_count_estimate: str + :ivar database_logical_size_estimate: Value indicating the estimated size of the underlying + database. + :vartype database_logical_size_estimate: str + :ivar copy_notification_current_key_filter: Value indicating the latest key-prefix filter + applied to enumeration during the callback. Null if there is no pending callback. + :vartype copy_notification_current_key_filter: str + :ivar copy_notification_current_progress: Value indicating the latest number of keys enumerated + during the callback. 0 if there is no pending callback. + :vartype copy_notification_current_progress: str + :ivar status_details: Value indicating the current status details of the replica. + :vartype status_details: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'database_row_count_estimate': {'key': 'DatabaseRowCountEstimate', 'type': 'str'}, + 'database_logical_size_estimate': {'key': 'DatabaseLogicalSizeEstimate', 'type': 'str'}, + 'copy_notification_current_key_filter': {'key': 'CopyNotificationCurrentKeyFilter', 'type': 'str'}, + 'copy_notification_current_progress': {'key': 'CopyNotificationCurrentProgress', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + } + + def __init__( + self, + *, + database_row_count_estimate: Optional[str] = None, + database_logical_size_estimate: Optional[str] = None, + copy_notification_current_key_filter: Optional[str] = None, + copy_notification_current_progress: Optional[str] = None, + status_details: Optional[str] = None, + **kwargs + ): + """ + :keyword database_row_count_estimate: Value indicating the estimated number of rows in the + underlying database. + :paramtype database_row_count_estimate: str + :keyword database_logical_size_estimate: Value indicating the estimated size of the underlying + database. + :paramtype database_logical_size_estimate: str + :keyword copy_notification_current_key_filter: Value indicating the latest key-prefix filter + applied to enumeration during the callback. Null if there is no pending callback. + :paramtype copy_notification_current_key_filter: str + :keyword copy_notification_current_progress: Value indicating the latest number of keys + enumerated during the callback. 0 if there is no pending callback. + :paramtype copy_notification_current_progress: str + :keyword status_details: Value indicating the current status details of the replica. + :paramtype status_details: str + """ + super(KeyValueStoreReplicaStatus, self).__init__(**kwargs) + self.kind = 'KeyValueStore' # type: str + self.database_row_count_estimate = database_row_count_estimate + self.database_logical_size_estimate = database_logical_size_estimate + self.copy_notification_current_key_filter = copy_notification_current_key_filter + self.copy_notification_current_progress = copy_notification_current_progress + self.status_details = status_details + + +class LoadedPartitionInformationQueryDescription(msrest.serialization.Model): + """Represents data structure that contains query information. + + :ivar metric_name: Name of the metric for which this information is provided. + :vartype metric_name: str + :ivar service_name: Name of the service this partition belongs to. + :vartype service_name: str + :ivar ordering: Ordering of partitions' load. Possible values include: "Desc", "Asc". + :vartype ordering: str or ~azure.servicefabric.models.Ordering + :ivar 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. + :vartype max_results: long + :ivar 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. + :vartype continuation_token: str + """ + + _attribute_map = { + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'ordering': {'key': 'Ordering', 'type': 'str'}, + 'max_results': {'key': 'MaxResults', 'type': 'long'}, + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + } + + def __init__( + self, + *, + metric_name: Optional[str] = None, + service_name: Optional[str] = None, + ordering: Optional[Union[str, "Ordering"]] = None, + max_results: Optional[int] = None, + continuation_token: Optional[str] = None, + **kwargs + ): + """ + :keyword metric_name: Name of the metric for which this information is provided. + :paramtype metric_name: str + :keyword service_name: Name of the service this partition belongs to. + :paramtype service_name: str + :keyword ordering: Ordering of partitions' load. Possible values include: "Desc", "Asc". + :paramtype ordering: str or ~azure.servicefabric.models.Ordering + :keyword 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. + :paramtype max_results: long + :keyword 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. + :paramtype continuation_token: str + """ + super(LoadedPartitionInformationQueryDescription, self).__init__(**kwargs) + self.metric_name = metric_name + self.service_name = service_name + self.ordering = ordering + self.max_results = max_results + self.continuation_token = continuation_token + + +class LoadedPartitionInformationResult(msrest.serialization.Model): + """Represents partition information. + + All required parameters must be populated in order to send to Azure. + + :ivar service_name: Required. Name of the service this partition belongs to. + :vartype service_name: str + :ivar partition_id: Required. Id of the partition. + :vartype partition_id: str + :ivar metric_name: Required. Name of the metric for which this information is provided. + :vartype metric_name: str + :ivar load: Required. Load for metric. + :vartype load: long + """ + + _validation = { + 'service_name': {'required': True}, + 'partition_id': {'required': True}, + 'metric_name': {'required': True}, + 'load': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'load': {'key': 'Load', 'type': 'long'}, + } + + def __init__( + self, + *, + service_name: str, + partition_id: str, + metric_name: str, + load: int, + **kwargs + ): + """ + :keyword service_name: Required. Name of the service this partition belongs to. + :paramtype service_name: str + :keyword partition_id: Required. Id of the partition. + :paramtype partition_id: str + :keyword metric_name: Required. Name of the metric for which this information is provided. + :paramtype metric_name: str + :keyword load: Required. Load for metric. + :paramtype load: long + """ + super(LoadedPartitionInformationResult, self).__init__(**kwargs) + self.service_name = service_name + self.partition_id = partition_id + self.metric_name = metric_name + self.load = load + + +class LoadedPartitionInformationResultList(msrest.serialization.Model): + """Represents data structure that contains top/least loaded partitions for a certain metric. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of application information. + :vartype items: list[~azure.servicefabric.models.LoadedPartitionInformationResult] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[LoadedPartitionInformationResult]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["LoadedPartitionInformationResult"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of application information. + :paramtype items: list[~azure.servicefabric.models.LoadedPartitionInformationResult] + """ + super(LoadedPartitionInformationResultList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class LoadMetricInformation(msrest.serialization.Model): + """Represents data structure that contains load information for a certain metric in a cluster. + + :ivar name: Name of the metric for which this load information is provided. + :vartype name: str + :ivar is_balanced_before: Value that indicates whether the metrics is balanced or not before + resource balancer run. + :vartype is_balanced_before: bool + :ivar is_balanced_after: Value that indicates whether the metrics is balanced or not after + resource balancer run. + :vartype is_balanced_after: bool + :ivar deviation_before: The standard average deviation of the metrics before resource balancer + run. + :vartype deviation_before: str + :ivar deviation_after: The standard average deviation of the metrics after resource balancer + run. + :vartype deviation_after: str + :ivar balancing_threshold: The balancing threshold for a certain metric. + :vartype balancing_threshold: str + :ivar action: The current action being taken with regard to this metric. + :vartype action: str + :ivar activity_threshold: The Activity Threshold specified for this metric in the system + Cluster Manifest. + :vartype activity_threshold: str + :ivar cluster_capacity: The total cluster capacity for a given metric. + :vartype cluster_capacity: str + :ivar cluster_load: The total cluster load. In future releases of Service Fabric this parameter + will be deprecated in favor of CurrentClusterLoad. + :vartype cluster_load: str + :ivar current_cluster_load: The total cluster load. + :vartype current_cluster_load: str + :ivar cluster_remaining_capacity: The remaining capacity for the metric in the cluster. In + future releases of Service Fabric this parameter will be deprecated in favor of + ClusterCapacityRemaining. + :vartype cluster_remaining_capacity: str + :ivar cluster_capacity_remaining: The remaining capacity for the metric in the cluster. + :vartype cluster_capacity_remaining: str + :ivar is_cluster_capacity_violation: Indicates that the metric is currently over capacity in + the cluster. + :vartype is_cluster_capacity_violation: bool + :ivar node_buffer_percentage: The reserved percentage of total node capacity for this metric. + :vartype node_buffer_percentage: str + :ivar cluster_buffered_capacity: Remaining capacity in the cluster excluding the reserved + space. In future releases of Service Fabric this parameter will be deprecated in favor of + BufferedClusterCapacityRemaining. + :vartype cluster_buffered_capacity: str + :ivar buffered_cluster_capacity_remaining: Remaining capacity in the cluster excluding the + reserved space. + :vartype buffered_cluster_capacity_remaining: str + :ivar cluster_remaining_buffered_capacity: The remaining percentage of cluster total capacity + for this metric. + :vartype cluster_remaining_buffered_capacity: str + :ivar min_node_load_value: The minimum load on any node for this metric. In future releases of + Service Fabric this parameter will be deprecated in favor of MinimumNodeLoad. + :vartype min_node_load_value: str + :ivar minimum_node_load: The minimum load on any node for this metric. + :vartype minimum_node_load: str + :ivar min_node_load_node_id: The node id of the node with the minimum load for this metric. + :vartype min_node_load_node_id: ~azure.servicefabric.models.NodeId + :ivar max_node_load_value: The maximum load on any node for this metric. In future releases of + Service Fabric this parameter will be deprecated in favor of MaximumNodeLoad. + :vartype max_node_load_value: str + :ivar maximum_node_load: The maximum load on any node for this metric. + :vartype maximum_node_load: str + :ivar max_node_load_node_id: The node id of the node with the maximum load for this metric. + :vartype max_node_load_node_id: ~azure.servicefabric.models.NodeId + :ivar planned_load_removal: This value represents the load of the replicas that are planned to + be removed in the future within the cluster. + This kind of load is reported for replicas that are currently being moving to other nodes and + for replicas that are currently being dropped but still use the load on the source node. + :vartype planned_load_removal: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'is_balanced_before': {'key': 'IsBalancedBefore', 'type': 'bool'}, + 'is_balanced_after': {'key': 'IsBalancedAfter', 'type': 'bool'}, + 'deviation_before': {'key': 'DeviationBefore', 'type': 'str'}, + 'deviation_after': {'key': 'DeviationAfter', 'type': 'str'}, + 'balancing_threshold': {'key': 'BalancingThreshold', 'type': 'str'}, + 'action': {'key': 'Action', 'type': 'str'}, + 'activity_threshold': {'key': 'ActivityThreshold', 'type': 'str'}, + 'cluster_capacity': {'key': 'ClusterCapacity', 'type': 'str'}, + 'cluster_load': {'key': 'ClusterLoad', 'type': 'str'}, + 'current_cluster_load': {'key': 'CurrentClusterLoad', 'type': 'str'}, + 'cluster_remaining_capacity': {'key': 'ClusterRemainingCapacity', 'type': 'str'}, + 'cluster_capacity_remaining': {'key': 'ClusterCapacityRemaining', 'type': 'str'}, + 'is_cluster_capacity_violation': {'key': 'IsClusterCapacityViolation', 'type': 'bool'}, + 'node_buffer_percentage': {'key': 'NodeBufferPercentage', 'type': 'str'}, + 'cluster_buffered_capacity': {'key': 'ClusterBufferedCapacity', 'type': 'str'}, + 'buffered_cluster_capacity_remaining': {'key': 'BufferedClusterCapacityRemaining', 'type': 'str'}, + 'cluster_remaining_buffered_capacity': {'key': 'ClusterRemainingBufferedCapacity', 'type': 'str'}, + 'min_node_load_value': {'key': 'MinNodeLoadValue', 'type': 'str'}, + 'minimum_node_load': {'key': 'MinimumNodeLoad', 'type': 'str'}, + 'min_node_load_node_id': {'key': 'MinNodeLoadNodeId', 'type': 'NodeId'}, + 'max_node_load_value': {'key': 'MaxNodeLoadValue', 'type': 'str'}, + 'maximum_node_load': {'key': 'MaximumNodeLoad', 'type': 'str'}, + 'max_node_load_node_id': {'key': 'MaxNodeLoadNodeId', 'type': 'NodeId'}, + 'planned_load_removal': {'key': 'PlannedLoadRemoval', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + is_balanced_before: Optional[bool] = None, + is_balanced_after: Optional[bool] = None, + deviation_before: Optional[str] = None, + deviation_after: Optional[str] = None, + balancing_threshold: Optional[str] = None, + action: Optional[str] = None, + activity_threshold: Optional[str] = None, + cluster_capacity: Optional[str] = None, + cluster_load: Optional[str] = None, + current_cluster_load: Optional[str] = None, + cluster_remaining_capacity: Optional[str] = None, + cluster_capacity_remaining: Optional[str] = None, + is_cluster_capacity_violation: Optional[bool] = None, + node_buffer_percentage: Optional[str] = None, + cluster_buffered_capacity: Optional[str] = None, + buffered_cluster_capacity_remaining: Optional[str] = None, + cluster_remaining_buffered_capacity: Optional[str] = None, + min_node_load_value: Optional[str] = None, + minimum_node_load: Optional[str] = None, + min_node_load_node_id: Optional["NodeId"] = None, + max_node_load_value: Optional[str] = None, + maximum_node_load: Optional[str] = None, + max_node_load_node_id: Optional["NodeId"] = None, + planned_load_removal: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Name of the metric for which this load information is provided. + :paramtype name: str + :keyword is_balanced_before: Value that indicates whether the metrics is balanced or not before + resource balancer run. + :paramtype is_balanced_before: bool + :keyword is_balanced_after: Value that indicates whether the metrics is balanced or not after + resource balancer run. + :paramtype is_balanced_after: bool + :keyword deviation_before: The standard average deviation of the metrics before resource + balancer run. + :paramtype deviation_before: str + :keyword deviation_after: The standard average deviation of the metrics after resource balancer + run. + :paramtype deviation_after: str + :keyword balancing_threshold: The balancing threshold for a certain metric. + :paramtype balancing_threshold: str + :keyword action: The current action being taken with regard to this metric. + :paramtype action: str + :keyword activity_threshold: The Activity Threshold specified for this metric in the system + Cluster Manifest. + :paramtype activity_threshold: str + :keyword cluster_capacity: The total cluster capacity for a given metric. + :paramtype cluster_capacity: str + :keyword cluster_load: The total cluster load. In future releases of Service Fabric this + parameter will be deprecated in favor of CurrentClusterLoad. + :paramtype cluster_load: str + :keyword current_cluster_load: The total cluster load. + :paramtype current_cluster_load: str + :keyword cluster_remaining_capacity: The remaining capacity for the metric in the cluster. In + future releases of Service Fabric this parameter will be deprecated in favor of + ClusterCapacityRemaining. + :paramtype cluster_remaining_capacity: str + :keyword cluster_capacity_remaining: The remaining capacity for the metric in the cluster. + :paramtype cluster_capacity_remaining: str + :keyword is_cluster_capacity_violation: Indicates that the metric is currently over capacity in + the cluster. + :paramtype is_cluster_capacity_violation: bool + :keyword node_buffer_percentage: The reserved percentage of total node capacity for this + metric. + :paramtype node_buffer_percentage: str + :keyword cluster_buffered_capacity: Remaining capacity in the cluster excluding the reserved + space. In future releases of Service Fabric this parameter will be deprecated in favor of + BufferedClusterCapacityRemaining. + :paramtype cluster_buffered_capacity: str + :keyword buffered_cluster_capacity_remaining: Remaining capacity in the cluster excluding the + reserved space. + :paramtype buffered_cluster_capacity_remaining: str + :keyword cluster_remaining_buffered_capacity: The remaining percentage of cluster total + capacity for this metric. + :paramtype cluster_remaining_buffered_capacity: str + :keyword min_node_load_value: The minimum load on any node for this metric. In future releases + of Service Fabric this parameter will be deprecated in favor of MinimumNodeLoad. + :paramtype min_node_load_value: str + :keyword minimum_node_load: The minimum load on any node for this metric. + :paramtype minimum_node_load: str + :keyword min_node_load_node_id: The node id of the node with the minimum load for this metric. + :paramtype min_node_load_node_id: ~azure.servicefabric.models.NodeId + :keyword max_node_load_value: The maximum load on any node for this metric. In future releases + of Service Fabric this parameter will be deprecated in favor of MaximumNodeLoad. + :paramtype max_node_load_value: str + :keyword maximum_node_load: The maximum load on any node for this metric. + :paramtype maximum_node_load: str + :keyword max_node_load_node_id: The node id of the node with the maximum load for this metric. + :paramtype max_node_load_node_id: ~azure.servicefabric.models.NodeId + :keyword planned_load_removal: This value represents the load of the replicas that are planned + to be removed in the future within the cluster. + This kind of load is reported for replicas that are currently being moving to other nodes and + for replicas that are currently being dropped but still use the load on the source node. + :paramtype planned_load_removal: str + """ + super(LoadMetricInformation, self).__init__(**kwargs) + self.name = name + self.is_balanced_before = is_balanced_before + self.is_balanced_after = is_balanced_after + self.deviation_before = deviation_before + self.deviation_after = deviation_after + self.balancing_threshold = balancing_threshold + self.action = action + self.activity_threshold = activity_threshold + self.cluster_capacity = cluster_capacity + self.cluster_load = cluster_load + self.current_cluster_load = current_cluster_load + self.cluster_remaining_capacity = cluster_remaining_capacity + self.cluster_capacity_remaining = cluster_capacity_remaining + self.is_cluster_capacity_violation = is_cluster_capacity_violation + self.node_buffer_percentage = node_buffer_percentage + self.cluster_buffered_capacity = cluster_buffered_capacity + self.buffered_cluster_capacity_remaining = buffered_cluster_capacity_remaining + self.cluster_remaining_buffered_capacity = cluster_remaining_buffered_capacity + self.min_node_load_value = min_node_load_value + self.minimum_node_load = minimum_node_load + self.min_node_load_node_id = min_node_load_node_id + self.max_node_load_value = max_node_load_value + self.maximum_node_load = maximum_node_load + self.max_node_load_node_id = max_node_load_node_id + self.planned_load_removal = planned_load_removal + + +class LoadMetricReport(msrest.serialization.Model): + """Represents the load metric report which contains the time metric was reported, its name and value. + + :ivar last_reported_utc: Gets the UTC time when the load was reported. + :vartype last_reported_utc: ~datetime.datetime + :ivar name: The name of the load metric. + :vartype name: str + :ivar value: The value of the load metric. In future releases of Service Fabric this parameter + will be deprecated in favor of CurrentValue. + :vartype value: str + :ivar current_value: The value of the load metric. + :vartype current_value: str + """ + + _attribute_map = { + 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + 'current_value': {'key': 'CurrentValue', 'type': 'str'}, + } + + def __init__( + self, + *, + last_reported_utc: Optional[datetime.datetime] = None, + name: Optional[str] = None, + value: Optional[str] = None, + current_value: Optional[str] = None, + **kwargs + ): + """ + :keyword last_reported_utc: Gets the UTC time when the load was reported. + :paramtype last_reported_utc: ~datetime.datetime + :keyword name: The name of the load metric. + :paramtype name: str + :keyword value: The value of the load metric. In future releases of Service Fabric this + parameter will be deprecated in favor of CurrentValue. + :paramtype value: str + :keyword current_value: The value of the load metric. + :paramtype current_value: str + """ + super(LoadMetricReport, self).__init__(**kwargs) + self.last_reported_utc = last_reported_utc + self.name = name + self.value = value + self.current_value = current_value + + +class LoadMetricReportInfo(msrest.serialization.Model): + """Information about load reported by replica. + + :ivar name: The name of the metric. + :vartype name: str + :ivar value: The value of the load for the metric. In future releases of Service Fabric this + parameter will be deprecated in favor of CurrentValue. + :vartype value: int + :ivar current_value: The double value of the load for the metric. + :vartype current_value: str + :ivar last_reported_utc: The UTC time when the load is reported. + :vartype last_reported_utc: ~datetime.datetime + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + 'current_value': {'key': 'CurrentValue', 'type': 'str'}, + 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + value: Optional[int] = None, + current_value: Optional[str] = None, + last_reported_utc: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword name: The name of the metric. + :paramtype name: str + :keyword value: The value of the load for the metric. In future releases of Service Fabric this + parameter will be deprecated in favor of CurrentValue. + :paramtype value: int + :keyword current_value: The double value of the load for the metric. + :paramtype current_value: str + :keyword last_reported_utc: The UTC time when the load is reported. + :paramtype last_reported_utc: ~datetime.datetime + """ + super(LoadMetricReportInfo, self).__init__(**kwargs) + self.name = name + self.value = value + self.current_value = current_value + self.last_reported_utc = last_reported_utc + + +class NetworkResourcePropertiesBase(msrest.serialization.Model): + """This type describes the properties of a network resource, including its kind. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NetworkResourceProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of a Service Fabric container network.Constant filled by server. + Possible values include: "Local". + :vartype kind: str or ~azure.servicefabric.models.NetworkKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'NetworkResourceProperties': 'NetworkResourceProperties'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(NetworkResourcePropertiesBase, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class NetworkResourceProperties(NetworkResourcePropertiesBase): + """Describes properties of a network resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LocalNetworkResourceProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of a Service Fabric container network.Constant filled by server. + Possible values include: "Local". + :vartype kind: str or ~azure.servicefabric.models.NetworkKind + :ivar description: User readable description of the network. + :vartype description: str + :ivar status: Status of the network. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the network. + :vartype status_details: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Local': 'LocalNetworkResourceProperties'} + } + + def __init__( + self, + *, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword description: User readable description of the network. + :paramtype description: str + """ + super(NetworkResourceProperties, self).__init__(**kwargs) + self.kind = 'NetworkResourceProperties' # type: str + self.description = description + self.status = None + self.status_details = None + + +class LocalNetworkResourceProperties(NetworkResourceProperties): + """Information about a Service Fabric container network local to a single Service Fabric cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The type of a Service Fabric container network.Constant filled by server. + Possible values include: "Local". + :vartype kind: str or ~azure.servicefabric.models.NetworkKind + :ivar description: User readable description of the network. + :vartype description: str + :ivar status: Status of the network. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the network. + :vartype status_details: str + :ivar network_address_prefix: Address space for the local container network. + :vartype network_address_prefix: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'network_address_prefix': {'key': 'networkAddressPrefix', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + network_address_prefix: Optional[str] = None, + **kwargs + ): + """ + :keyword description: User readable description of the network. + :paramtype description: str + :keyword network_address_prefix: Address space for the local container network. + :paramtype network_address_prefix: str + """ + super(LocalNetworkResourceProperties, self).__init__(description=description, **kwargs) + self.kind = 'Local' # type: str + self.network_address_prefix = network_address_prefix + + +class ManagedApplicationIdentity(msrest.serialization.Model): + """Describes a managed application identity. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the identity. + :vartype name: str + :ivar principal_id: The identity's PrincipalId. + :vartype principal_id: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'principal_id': {'key': 'PrincipalId', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + principal_id: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Required. The name of the identity. + :paramtype name: str + :keyword principal_id: The identity's PrincipalId. + :paramtype principal_id: str + """ + super(ManagedApplicationIdentity, self).__init__(**kwargs) + self.name = name + self.principal_id = principal_id + + +class ManagedApplicationIdentityDescription(msrest.serialization.Model): + """Managed application identity description. + + :ivar token_service_endpoint: Token service endpoint. + :vartype token_service_endpoint: str + :ivar managed_identities: A list of managed application identity objects. + :vartype managed_identities: list[~azure.servicefabric.models.ManagedApplicationIdentity] + """ + + _attribute_map = { + 'token_service_endpoint': {'key': 'TokenServiceEndpoint', 'type': 'str'}, + 'managed_identities': {'key': 'ManagedIdentities', 'type': '[ManagedApplicationIdentity]'}, + } + + def __init__( + self, + *, + token_service_endpoint: Optional[str] = None, + managed_identities: Optional[List["ManagedApplicationIdentity"]] = None, + **kwargs + ): + """ + :keyword token_service_endpoint: Token service endpoint. + :paramtype token_service_endpoint: str + :keyword managed_identities: A list of managed application identity objects. + :paramtype managed_identities: list[~azure.servicefabric.models.ManagedApplicationIdentity] + """ + super(ManagedApplicationIdentityDescription, self).__init__(**kwargs) + self.token_service_endpoint = token_service_endpoint + self.managed_identities = managed_identities + + +class ManagedIdentityAzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Azure blob store (connected using managed identity) used for storing and enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant + filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", + "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". + :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind + :ivar friendly_name: Friendly name for this backup storage. + :vartype friendly_name: str + :ivar managed_identity_type: Required. The type of managed identity to be used to connect to + Azure Blob Store via Managed Identity. Possible values include: "Invalid", "VMSS", "Cluster". + :vartype managed_identity_type: str or ~azure.servicefabric.models.ManagedIdentityType + :ivar blob_service_uri: Required. The Blob Service Uri to connect to the Azure blob store.. + :vartype blob_service_uri: str + :ivar container_name: Required. The name of the container in the blob store to store and + enumerate backups from. + :vartype container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'managed_identity_type': {'required': True}, + 'blob_service_uri': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'managed_identity_type': {'key': 'ManagedIdentityType', 'type': 'str'}, + 'blob_service_uri': {'key': 'BlobServiceUri', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__( + self, + *, + managed_identity_type: Union[str, "ManagedIdentityType"], + blob_service_uri: str, + container_name: str, + friendly_name: Optional[str] = None, + **kwargs + ): + """ + :keyword friendly_name: Friendly name for this backup storage. + :paramtype friendly_name: str + :keyword managed_identity_type: Required. The type of managed identity to be used to connect to + Azure Blob Store via Managed Identity. Possible values include: "Invalid", "VMSS", "Cluster". + :paramtype managed_identity_type: str or ~azure.servicefabric.models.ManagedIdentityType + :keyword blob_service_uri: Required. The Blob Service Uri to connect to the Azure blob store.. + :paramtype blob_service_uri: str + :keyword container_name: Required. The name of the container in the blob store to store and + enumerate backups from. + :paramtype container_name: str + """ + super(ManagedIdentityAzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) + self.storage_kind = 'ManagedIdentityAzureBlobStore' # type: str + self.managed_identity_type = managed_identity_type + self.blob_service_uri = blob_service_uri + self.container_name = container_name + + +class MetricLoadDescription(msrest.serialization.Model): + """Specifies metric load information. + + :ivar metric_name: The name of the reported metric. + :vartype metric_name: str + :ivar current_load: The current value of the metric load. + :vartype current_load: long + :ivar predicted_load: The predicted value of the metric load. Predicted metric load values is + currently a preview feature. It allows predicted load values to be reported and used at the + Service Fabric side, but that feature is currently not enabled. + :vartype predicted_load: long + """ + + _attribute_map = { + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'current_load': {'key': 'CurrentLoad', 'type': 'long'}, + 'predicted_load': {'key': 'PredictedLoad', 'type': 'long'}, + } + + def __init__( + self, + *, + metric_name: Optional[str] = None, + current_load: Optional[int] = None, + predicted_load: Optional[int] = None, + **kwargs + ): + """ + :keyword metric_name: The name of the reported metric. + :paramtype metric_name: str + :keyword current_load: The current value of the metric load. + :paramtype current_load: long + :keyword predicted_load: The predicted value of the metric load. Predicted metric load values + is currently a preview feature. It allows predicted load values to be reported and used at the + Service Fabric side, but that feature is currently not enabled. + :paramtype predicted_load: long + """ + super(MetricLoadDescription, self).__init__(**kwargs) + self.metric_name = metric_name + self.current_load = current_load + self.predicted_load = predicted_load + + +class MonitoringPolicyDescription(msrest.serialization.Model): + """Describes the parameters for monitoring an upgrade in Monitored mode. + + :ivar failure_action: The compensating action to perform when a Monitored upgrade encounters + monitoring policy or health policy violations. + Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will + start rolling back automatically. + Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible + values include: "Invalid", "Rollback", "Manual". + :vartype failure_action: str or ~azure.servicefabric.models.FailureAction + :ivar health_check_wait_duration_in_milliseconds: The amount of time to wait after completing + an upgrade domain before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. + :vartype health_check_wait_duration_in_milliseconds: str + :ivar health_check_stable_duration_in_milliseconds: The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :vartype health_check_stable_duration_in_milliseconds: str + :ivar health_check_retry_timeout_in_milliseconds: The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is executed. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :vartype health_check_retry_timeout_in_milliseconds: str + :ivar upgrade_timeout_in_milliseconds: The amount of time the overall upgrade has to complete + before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the total number of + milliseconds. + :vartype upgrade_timeout_in_milliseconds: str + :ivar upgrade_domain_timeout_in_milliseconds: The amount of time each upgrade domain has to + complete before FailureAction is executed. It is first interpreted as a string representing an + ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + number of milliseconds. + :vartype upgrade_domain_timeout_in_milliseconds: str + """ + + _attribute_map = { + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, + 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, + 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, + } + + def __init__( + self, + *, + failure_action: Optional[Union[str, "FailureAction"]] = None, + health_check_wait_duration_in_milliseconds: Optional[str] = "0", + health_check_stable_duration_in_milliseconds: Optional[str] = "PT0H2M0S", + health_check_retry_timeout_in_milliseconds: Optional[str] = "PT0H10M0S", + upgrade_timeout_in_milliseconds: Optional[str] = "P10675199DT02H48M05.4775807S", + upgrade_domain_timeout_in_milliseconds: Optional[str] = "P10675199DT02H48M05.4775807S", + **kwargs + ): + """ + :keyword failure_action: The compensating action to perform when a Monitored upgrade encounters + monitoring policy or health policy violations. + Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will + start rolling back automatically. + Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible + values include: "Invalid", "Rollback", "Manual". + :paramtype failure_action: str or ~azure.servicefabric.models.FailureAction + :keyword health_check_wait_duration_in_milliseconds: The amount of time to wait after + completing an upgrade domain before applying health policies. It is first interpreted as a + string representing an ISO 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. + :paramtype health_check_wait_duration_in_milliseconds: str + :keyword health_check_stable_duration_in_milliseconds: The amount of time that the application + or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is + first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :paramtype health_check_stable_duration_in_milliseconds: str + :keyword health_check_retry_timeout_in_milliseconds: The amount of time to retry health + evaluation when the application or cluster is unhealthy before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :paramtype health_check_retry_timeout_in_milliseconds: str + :keyword upgrade_timeout_in_milliseconds: The amount of time the overall upgrade has to + complete before FailureAction is executed. It is first interpreted as a string representing an + ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + number of milliseconds. + :paramtype upgrade_timeout_in_milliseconds: str + :keyword upgrade_domain_timeout_in_milliseconds: The amount of time each upgrade domain has to + complete before FailureAction is executed. It is first interpreted as a string representing an + ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + number of milliseconds. + :paramtype upgrade_domain_timeout_in_milliseconds: str + """ + super(MonitoringPolicyDescription, self).__init__(**kwargs) + self.failure_action = failure_action + self.health_check_wait_duration_in_milliseconds = health_check_wait_duration_in_milliseconds + self.health_check_stable_duration_in_milliseconds = health_check_stable_duration_in_milliseconds + self.health_check_retry_timeout_in_milliseconds = health_check_retry_timeout_in_milliseconds + self.upgrade_timeout_in_milliseconds = upgrade_timeout_in_milliseconds + self.upgrade_domain_timeout_in_milliseconds = upgrade_domain_timeout_in_milliseconds + + +class NameDescription(msrest.serialization.Model): + """Describes a Service Fabric name. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The Service Fabric name, including the 'fabric:' URI scheme. + :vartype name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + **kwargs + ): + """ + :keyword name: Required. The Service Fabric name, including the 'fabric:' URI scheme. + :paramtype name: str + """ + super(NameDescription, self).__init__(**kwargs) + self.name = name + + +class NamedPartitionInformation(PartitionInformation): + """Describes the partition information for the name as a string that is based on partition schemes. + + All required parameters must be populated in order to send to Azure. + + :ivar service_partition_kind: Required. The kind of partitioning scheme used to partition the + service.Constant filled by server. Possible values include: "Invalid", "Singleton", + "Int64Range", "Named". + :vartype service_partition_kind: str or ~azure.servicefabric.models.ServicePartitionKind + :ivar id: An internal ID used by Service Fabric to uniquely identify a partition. This is a + randomly generated GUID when the service was created. The partition ID is unique and does not + change for the lifetime of the service. If the same service was deleted and recreated the IDs + of its partitions would be different. + :vartype id: str + :ivar name: Name of the partition. + :vartype name: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :keyword id: An internal ID used by Service Fabric to uniquely identify a partition. This is a + randomly generated GUID when the service was created. The partition ID is unique and does not + change for the lifetime of the service. If the same service was deleted and recreated the IDs + of its partitions would be different. + :paramtype id: str + :keyword name: Name of the partition. + :paramtype name: str + """ + super(NamedPartitionInformation, self).__init__(id=id, **kwargs) + self.service_partition_kind = 'Named' # type: str + self.name = name + + +class PartitionSchemeDescription(msrest.serialization.Model): + """Describes how the service is partitioned. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NamedPartitionSchemeDescription, SingletonPartitionSchemeDescription, UniformInt64RangePartitionSchemeDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar partition_scheme: Required. Specifies how the service is partitioned.Constant filled by + server. Possible values include: "Invalid", "Singleton", "UniformInt64Range", "Named". + :vartype partition_scheme: str or ~azure.servicefabric.models.PartitionScheme + """ + + _validation = { + 'partition_scheme': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + } + + _subtype_map = { + 'partition_scheme': {'Named': 'NamedPartitionSchemeDescription', 'Singleton': 'SingletonPartitionSchemeDescription', 'UniformInt64Range': 'UniformInt64RangePartitionSchemeDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PartitionSchemeDescription, self).__init__(**kwargs) + self.partition_scheme = None # type: Optional[str] + + +class NamedPartitionSchemeDescription(PartitionSchemeDescription): + """Describes the named partition scheme of the service. + + All required parameters must be populated in order to send to Azure. + + :ivar partition_scheme: Required. Specifies how the service is partitioned.Constant filled by + server. Possible values include: "Invalid", "Singleton", "UniformInt64Range", "Named". + :vartype partition_scheme: str or ~azure.servicefabric.models.PartitionScheme + :ivar count: Required. The number of partitions. + :vartype count: int + :ivar names: Required. Array of size specified by the ‘Count’ parameter, for the names of the + partitions. + :vartype names: list[str] + """ + + _validation = { + 'partition_scheme': {'required': True}, + 'count': {'required': True}, + 'names': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + 'count': {'key': 'Count', 'type': 'int'}, + 'names': {'key': 'Names', 'type': '[str]'}, + } + + def __init__( + self, + *, + count: int, + names: List[str], + **kwargs + ): + """ + :keyword count: Required. The number of partitions. + :paramtype count: int + :keyword names: Required. Array of size specified by the ‘Count’ parameter, for the names of + the partitions. + :paramtype names: list[str] + """ + super(NamedPartitionSchemeDescription, self).__init__(**kwargs) + self.partition_scheme = 'Named' # type: str + self.count = count + self.names = names + + +class NetworkRef(msrest.serialization.Model): + """Describes a network reference in a service. + + :ivar name: Name of the network. + :vartype name: str + :ivar endpoint_refs: A list of endpoints that are exposed on this network. + :vartype endpoint_refs: list[~azure.servicefabric.models.EndpointRef] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'endpoint_refs': {'key': 'endpointRefs', 'type': '[EndpointRef]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + endpoint_refs: Optional[List["EndpointRef"]] = None, + **kwargs + ): + """ + :keyword name: Name of the network. + :paramtype name: str + :keyword endpoint_refs: A list of endpoints that are exposed on this network. + :paramtype endpoint_refs: list[~azure.servicefabric.models.EndpointRef] + """ + super(NetworkRef, self).__init__(**kwargs) + self.name = name + self.endpoint_refs = endpoint_refs + + +class NetworkResourceDescription(msrest.serialization.Model): + """This type describes a network resource. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of the Network resource. + :vartype name: str + :ivar properties: Required. Describes properties of a network resource. + :vartype properties: ~azure.servicefabric.models.NetworkResourceProperties + """ + + _validation = { + 'name': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'NetworkResourceProperties'}, + } + + def __init__( + self, + *, + name: str, + properties: "NetworkResourceProperties", + **kwargs + ): + """ + :keyword name: Required. Name of the Network resource. + :paramtype name: str + :keyword properties: Required. Describes properties of a network resource. + :paramtype properties: ~azure.servicefabric.models.NetworkResourceProperties + """ + super(NetworkResourceDescription, self).__init__(**kwargs) + self.name = name + self.properties = properties + + +class NodeAbortedEvent(NodeEvent): + """Node Aborted event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar node_id: Required. Id of Node. + :vartype node_id: str + :ivar upgrade_domain: Required. Upgrade domain of Node. + :vartype upgrade_domain: str + :ivar fault_domain: Required. Fault domain of Node. + :vartype fault_domain: str + :ivar ip_address_or_fqdn: Required. IP address or FQDN. + :vartype ip_address_or_fqdn: str + :ivar hostname: Required. Name of Host. + :vartype hostname: str + :ivar is_seed_node: Required. Indicates if it is seed node. + :vartype is_seed_node: bool + :ivar node_version: Required. Version of Node. + :vartype node_version: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + node_name: str, + node_instance: int, + node_id: str, + upgrade_domain: str, + fault_domain: str, + ip_address_or_fqdn: str, + hostname: str, + is_seed_node: bool, + node_version: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword node_id: Required. Id of Node. + :paramtype node_id: str + :keyword upgrade_domain: Required. Upgrade domain of Node. + :paramtype upgrade_domain: str + :keyword fault_domain: Required. Fault domain of Node. + :paramtype fault_domain: str + :keyword ip_address_or_fqdn: Required. IP address or FQDN. + :paramtype ip_address_or_fqdn: str + :keyword hostname: Required. Name of Host. + :paramtype hostname: str + :keyword is_seed_node: Required. Indicates if it is seed node. + :paramtype is_seed_node: bool + :keyword node_version: Required. Version of Node. + :paramtype node_version: str + """ + super(NodeAbortedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.kind = 'NodeAborted' # type: str + self.node_instance = node_instance + self.node_id = node_id + self.upgrade_domain = upgrade_domain + self.fault_domain = fault_domain + self.ip_address_or_fqdn = ip_address_or_fqdn + self.hostname = hostname + self.is_seed_node = is_seed_node + self.node_version = node_version + + +class NodeAddedToClusterEvent(NodeEvent): + """Node Added event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_id: Required. Id of Node. + :vartype node_id: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar node_type: Required. Type of Node. + :vartype node_type: str + :ivar fabric_version: Required. Fabric version. + :vartype fabric_version: str + :ivar ip_address_or_fqdn: Required. IP address or FQDN. + :vartype ip_address_or_fqdn: str + :ivar node_capacities: Required. Capacities. + :vartype node_capacities: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'node_type': {'required': True}, + 'fabric_version': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'node_capacities': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_type': {'key': 'NodeType', 'type': 'str'}, + 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + node_name: str, + node_id: str, + node_instance: int, + node_type: str, + fabric_version: str, + ip_address_or_fqdn: str, + node_capacities: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_id: Required. Id of Node. + :paramtype node_id: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword node_type: Required. Type of Node. + :paramtype node_type: str + :keyword fabric_version: Required. Fabric version. + :paramtype fabric_version: str + :keyword ip_address_or_fqdn: Required. IP address or FQDN. + :paramtype ip_address_or_fqdn: str + :keyword node_capacities: Required. Capacities. + :paramtype node_capacities: str + """ + super(NodeAddedToClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.kind = 'NodeAddedToCluster' # type: str + self.node_id = node_id + self.node_instance = node_instance + self.node_type = node_type + self.fabric_version = fabric_version + self.ip_address_or_fqdn = ip_address_or_fqdn + self.node_capacities = node_capacities + + +class NodeClosedEvent(NodeEvent): + """Node Closed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_id: Required. Id of Node. + :vartype node_id: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar error: Required. Describes error. + :vartype error: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'error': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'error': {'key': 'Error', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + node_name: str, + node_id: str, + node_instance: int, + error: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_id: Required. Id of Node. + :paramtype node_id: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword error: Required. Describes error. + :paramtype error: str + """ + super(NodeClosedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.kind = 'NodeClosed' # type: str + self.node_id = node_id + self.node_instance = node_instance + self.error = error + + +class NodeDeactivateCompletedEvent(NodeEvent): + """Node Deactivate Completed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar effective_deactivate_intent: Required. Describes deactivate intent. + :vartype effective_deactivate_intent: str + :ivar batch_ids_with_deactivate_intent: Required. Batch Ids. + :vartype batch_ids_with_deactivate_intent: str + :ivar start_time: Required. Start time. + :vartype start_time: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'effective_deactivate_intent': {'required': True}, + 'batch_ids_with_deactivate_intent': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'effective_deactivate_intent': {'key': 'EffectiveDeactivateIntent', 'type': 'str'}, + 'batch_ids_with_deactivate_intent': {'key': 'BatchIdsWithDeactivateIntent', 'type': 'str'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + node_name: str, + node_instance: int, + effective_deactivate_intent: str, + batch_ids_with_deactivate_intent: str, + start_time: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword effective_deactivate_intent: Required. Describes deactivate intent. + :paramtype effective_deactivate_intent: str + :keyword batch_ids_with_deactivate_intent: Required. Batch Ids. + :paramtype batch_ids_with_deactivate_intent: str + :keyword start_time: Required. Start time. + :paramtype start_time: ~datetime.datetime + """ + super(NodeDeactivateCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.kind = 'NodeDeactivateCompleted' # type: str + self.node_instance = node_instance + self.effective_deactivate_intent = effective_deactivate_intent + self.batch_ids_with_deactivate_intent = batch_ids_with_deactivate_intent + self.start_time = start_time + + +class NodeDeactivateStartedEvent(NodeEvent): + """Node Deactivate Started event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar batch_id: Required. Batch Id. + :vartype batch_id: str + :ivar deactivate_intent: Required. Describes deactivate intent. + :vartype deactivate_intent: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'batch_id': {'required': True}, + 'deactivate_intent': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'batch_id': {'key': 'BatchId', 'type': 'str'}, + 'deactivate_intent': {'key': 'DeactivateIntent', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + node_name: str, + node_instance: int, + batch_id: str, + deactivate_intent: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword batch_id: Required. Batch Id. + :paramtype batch_id: str + :keyword deactivate_intent: Required. Describes deactivate intent. + :paramtype deactivate_intent: str + """ + super(NodeDeactivateStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.kind = 'NodeDeactivateStarted' # type: str + self.node_instance = node_instance + self.batch_id = batch_id + self.deactivate_intent = deactivate_intent + + +class NodeDeactivationInfo(msrest.serialization.Model): + """Information about the node deactivation. This information is valid for a node that is undergoing deactivation or has already been deactivated. + + :ivar node_deactivation_intent: The intent or the reason for deactivating the node. Following + are the possible values for it. Possible values include: "Invalid", "Pause", "Restart", + "RemoveData", "RemoveNode". + :vartype node_deactivation_intent: str or ~azure.servicefabric.models.NodeDeactivationIntent + :ivar node_deactivation_status: The status of node deactivation operation. Following are the + possible values. Possible values include: "None", "SafetyCheckInProgress", + "SafetyCheckComplete", "Completed". + :vartype node_deactivation_status: str or ~azure.servicefabric.models.NodeDeactivationStatus + :ivar node_deactivation_task: List of tasks representing the deactivation operation on the + node. + :vartype node_deactivation_task: list[~azure.servicefabric.models.NodeDeactivationTask] + :ivar pending_safety_checks: List of pending safety checks. + :vartype pending_safety_checks: list[~azure.servicefabric.models.SafetyCheckWrapper] + """ + + _attribute_map = { + 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, + 'node_deactivation_status': {'key': 'NodeDeactivationStatus', 'type': 'str'}, + 'node_deactivation_task': {'key': 'NodeDeactivationTask', 'type': '[NodeDeactivationTask]'}, + 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, + } + + def __init__( + self, + *, + node_deactivation_intent: Optional[Union[str, "NodeDeactivationIntent"]] = None, + node_deactivation_status: Optional[Union[str, "NodeDeactivationStatus"]] = None, + node_deactivation_task: Optional[List["NodeDeactivationTask"]] = None, + pending_safety_checks: Optional[List["SafetyCheckWrapper"]] = None, + **kwargs + ): + """ + :keyword node_deactivation_intent: The intent or the reason for deactivating the node. + Following are the possible values for it. Possible values include: "Invalid", "Pause", + "Restart", "RemoveData", "RemoveNode". + :paramtype node_deactivation_intent: str or ~azure.servicefabric.models.NodeDeactivationIntent + :keyword node_deactivation_status: The status of node deactivation operation. Following are the + possible values. Possible values include: "None", "SafetyCheckInProgress", + "SafetyCheckComplete", "Completed". + :paramtype node_deactivation_status: str or ~azure.servicefabric.models.NodeDeactivationStatus + :keyword node_deactivation_task: List of tasks representing the deactivation operation on the + node. + :paramtype node_deactivation_task: list[~azure.servicefabric.models.NodeDeactivationTask] + :keyword pending_safety_checks: List of pending safety checks. + :paramtype pending_safety_checks: list[~azure.servicefabric.models.SafetyCheckWrapper] + """ + super(NodeDeactivationInfo, self).__init__(**kwargs) + self.node_deactivation_intent = node_deactivation_intent + self.node_deactivation_status = node_deactivation_status + self.node_deactivation_task = node_deactivation_task + self.pending_safety_checks = pending_safety_checks + + +class NodeDeactivationTask(msrest.serialization.Model): + """The task representing the deactivation operation on the node. + + :ivar node_deactivation_task_id: Identity of the task related to deactivation operation on the + node. + :vartype node_deactivation_task_id: ~azure.servicefabric.models.NodeDeactivationTaskId + :ivar node_deactivation_intent: The intent or the reason for deactivating the node. Following + are the possible values for it. Possible values include: "Invalid", "Pause", "Restart", + "RemoveData", "RemoveNode". + :vartype node_deactivation_intent: str or ~azure.servicefabric.models.NodeDeactivationIntent + """ + + _attribute_map = { + 'node_deactivation_task_id': {'key': 'NodeDeactivationTaskId', 'type': 'NodeDeactivationTaskId'}, + 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, + } + + def __init__( + self, + *, + node_deactivation_task_id: Optional["NodeDeactivationTaskId"] = None, + node_deactivation_intent: Optional[Union[str, "NodeDeactivationIntent"]] = None, + **kwargs + ): + """ + :keyword node_deactivation_task_id: Identity of the task related to deactivation operation on + the node. + :paramtype node_deactivation_task_id: ~azure.servicefabric.models.NodeDeactivationTaskId + :keyword node_deactivation_intent: The intent or the reason for deactivating the node. + Following are the possible values for it. Possible values include: "Invalid", "Pause", + "Restart", "RemoveData", "RemoveNode". + :paramtype node_deactivation_intent: str or ~azure.servicefabric.models.NodeDeactivationIntent + """ + super(NodeDeactivationTask, self).__init__(**kwargs) + self.node_deactivation_task_id = node_deactivation_task_id + self.node_deactivation_intent = node_deactivation_intent + + +class NodeDeactivationTaskId(msrest.serialization.Model): + """Identity of the task related to deactivation operation on the node. + + :ivar id: Value of the task id. + :vartype id: str + :ivar node_deactivation_task_type: The type of the task that performed the node deactivation. + Following are the possible values. Possible values include: "Invalid", "Infrastructure", + "Repair", "Client". + :vartype node_deactivation_task_type: str or + ~azure.servicefabric.models.NodeDeactivationTaskType + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'node_deactivation_task_type': {'key': 'NodeDeactivationTaskType', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + node_deactivation_task_type: Optional[Union[str, "NodeDeactivationTaskType"]] = None, + **kwargs + ): + """ + :keyword id: Value of the task id. + :paramtype id: str + :keyword node_deactivation_task_type: The type of the task that performed the node + deactivation. Following are the possible values. Possible values include: "Invalid", + "Infrastructure", "Repair", "Client". + :paramtype node_deactivation_task_type: str or + ~azure.servicefabric.models.NodeDeactivationTaskType + """ + super(NodeDeactivationTaskId, self).__init__(**kwargs) + self.id = id + self.node_deactivation_task_type = node_deactivation_task_type + + +class NodeDownEvent(NodeEvent): + """Node Down event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar last_node_up_at: Required. Time when Node was last up. + :vartype last_node_up_at: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'last_node_up_at': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'last_node_up_at': {'key': 'LastNodeUpAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + node_name: str, + node_instance: int, + last_node_up_at: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword last_node_up_at: Required. Time when Node was last up. + :paramtype last_node_up_at: ~datetime.datetime + """ + super(NodeDownEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.kind = 'NodeDown' # type: str + self.node_instance = node_instance + self.last_node_up_at = last_node_up_at + + +class NodeHealth(EntityHealth): + """Information about the health of a Service Fabric node. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar name: Name of the node whose health information is described by this object. + :vartype name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + health_events: Optional[List["HealthEvent"]] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + health_statistics: Optional["HealthStatistics"] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword name: Name of the node whose health information is described by this object. + :paramtype name: str + """ + super(NodeHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.name = name + + +class NodeHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a node, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar node_name: The name of a Service Fabric node. + :vartype node_name: str + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated + health state of the node. The types of the unhealthy evaluations can be EventHealthEvaluation. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + node_name: Optional[str] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword node_name: The name of a Service Fabric node. + :paramtype node_name: str + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current + aggregated health state of the node. The types of the unhealthy evaluations can be + EventHealthEvaluation. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(NodeHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'Node' # type: str + self.node_name = node_name + self.unhealthy_evaluations = unhealthy_evaluations + + +class NodeHealthReportExpiredEvent(NodeEvent): + """Node Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance_id: Required. Id of Node instance. + :vartype node_instance_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + node_name: str, + node_instance_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance_id: Required. Id of Node instance. + :paramtype node_instance_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(NodeHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.kind = 'NodeHealthReportExpired' # type: str + self.node_instance_id = node_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class NodeHealthState(EntityHealthState): + """Represents the health state of a node, which contains the node identifier and its aggregated health state. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar name: The name of a Service Fabric node. + :vartype name: str + :ivar id: An internal ID used by Service Fabric to uniquely identify a node. Node Id is + deterministically generated from node name. + :vartype id: ~azure.servicefabric.models.NodeId + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'NodeId'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + name: Optional[str] = None, + id: Optional["NodeId"] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword name: The name of a Service Fabric node. + :paramtype name: str + :keyword id: An internal ID used by Service Fabric to uniquely identify a node. Node Id is + deterministically generated from node name. + :paramtype id: ~azure.servicefabric.models.NodeId + """ + super(NodeHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.name = name + self.id = id + + +class NodeHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a node, which contains the node name and its aggregated health state. + + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar node_name: The name of a Service Fabric node. + :vartype node_name: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + def __init__( + self, + *, + health_state: Optional[Union[str, "HealthState"]] = None, + node_name: Optional[str] = None, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword node_name: The name of a Service Fabric node. + :paramtype node_name: str + """ + super(NodeHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.node_name = node_name + + +class NodeHealthStateChunkList(EntityHealthStateChunkList): + """The list of node health state chunks in the cluster that respect the input filters in the chunk query. Returned by get cluster health state chunks query. + + :ivar total_count: Total number of entity health state objects that match the specified filters + from the cluster health chunk query description. + :vartype total_count: long + :ivar items: The list of node health state chunks that respect the input filters in the chunk + query. + :vartype items: list[~azure.servicefabric.models.NodeHealthStateChunk] + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'items': {'key': 'Items', 'type': '[NodeHealthStateChunk]'}, + } + + def __init__( + self, + *, + total_count: Optional[int] = None, + items: Optional[List["NodeHealthStateChunk"]] = None, + **kwargs + ): + """ + :keyword total_count: Total number of entity health state objects that match the specified + filters from the cluster health chunk query description. + :paramtype total_count: long + :keyword items: The list of node health state chunks that respect the input filters in the + chunk query. + :paramtype items: list[~azure.servicefabric.models.NodeHealthStateChunk] + """ + super(NodeHealthStateChunkList, self).__init__(total_count=total_count, **kwargs) + self.items = items + + +class NodeHealthStateFilter(msrest.serialization.Model): + """Defines matching criteria to determine whether a node should be included in the returned cluster health chunk. +One filter can match zero, one or multiple nodes, depending on its properties. +Can be specified in the cluster health chunk query description. + + :ivar node_name_filter: Name of the node that matches the filter. The filter is applied only to + the specified node, if it exists. + If the node doesn't exist, no node is returned in the cluster health chunk based on this + filter. + If the node exists, it is included in the cluster health chunk if the health state matches the + other filter properties. + If not specified, all nodes that match the parent filters (if any) are taken into + consideration and matched against the other filter members, like health state filter. + :vartype node_name_filter: str + :ivar health_state_filter: The filter for the health state of the nodes. It allows selecting + nodes if they match the desired health states. + The possible values are integer value of one of the following health states. Only nodes that + match the filter are returned. All nodes are used to evaluate the cluster aggregated health + state. + If not specified, default value is None, unless the node name is specified. If the filter has + default value and node name is specified, the matching node is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches nodes with HealthState value of OK (2) and + Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :vartype health_state_filter: int + """ + + _attribute_map = { + 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__( + self, + *, + node_name_filter: Optional[str] = None, + health_state_filter: Optional[int] = 0, + **kwargs + ): + """ + :keyword node_name_filter: Name of the node that matches the filter. The filter is applied only + to the specified node, if it exists. + If the node doesn't exist, no node is returned in the cluster health chunk based on this + filter. + If the node exists, it is included in the cluster health chunk if the health state matches the + other filter properties. + If not specified, all nodes that match the parent filters (if any) are taken into + consideration and matched against the other filter members, like health state filter. + :paramtype node_name_filter: str + :keyword health_state_filter: The filter for the health state of the nodes. It allows selecting + nodes if they match the desired health states. + The possible values are integer value of one of the following health states. Only nodes that + match the filter are returned. All nodes are used to evaluate the cluster aggregated health + state. + If not specified, default value is None, unless the node name is specified. If the filter has + default value and node name is specified, the matching node is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches nodes with HealthState value of OK (2) and + Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :paramtype health_state_filter: int + """ + super(NodeHealthStateFilter, self).__init__(**kwargs) + self.node_name_filter = node_name_filter + self.health_state_filter = health_state_filter + + +class NodeId(msrest.serialization.Model): + """An internal ID used by Service Fabric to uniquely identify a node. Node Id is deterministically generated from node name. + + :ivar id: Value of the node Id. This is a 128 bit integer. + :vartype id: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Value of the node Id. This is a 128 bit integer. + :paramtype id: str + """ + super(NodeId, self).__init__(**kwargs) + self.id = id + + +class NodeImpact(msrest.serialization.Model): + """Describes the expected impact of a repair to a particular node. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar node_name: Required. The name of the impacted node. + :vartype node_name: str + :ivar impact_level: The level of impact expected. Possible values include: "Invalid", "None", + "Restart", "RemoveData", "RemoveNode". + :vartype impact_level: str or ~azure.servicefabric.models.ImpactLevel + """ + + _validation = { + 'node_name': {'required': True}, + } + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'impact_level': {'key': 'ImpactLevel', 'type': 'str'}, + } + + def __init__( + self, + *, + node_name: str, + impact_level: Optional[Union[str, "ImpactLevel"]] = None, + **kwargs + ): + """ + :keyword node_name: Required. The name of the impacted node. + :paramtype node_name: str + :keyword impact_level: The level of impact expected. Possible values include: "Invalid", + "None", "Restart", "RemoveData", "RemoveNode". + :paramtype impact_level: str or ~azure.servicefabric.models.ImpactLevel + """ + super(NodeImpact, self).__init__(**kwargs) + self.node_name = node_name + self.impact_level = impact_level + + +class NodeInfo(msrest.serialization.Model): + """Information about a node in Service Fabric cluster. + + :ivar name: The name of a Service Fabric node. + :vartype name: str + :ivar ip_address_or_fqdn: The IP address or fully qualified domain name of the node. + :vartype ip_address_or_fqdn: str + :ivar type: The type of the node. + :vartype type: str + :ivar code_version: The version of Service Fabric binaries that the node is running. + :vartype code_version: str + :ivar config_version: The version of Service Fabric cluster manifest that the node is using. + :vartype config_version: str + :ivar node_status: The status of the node. Possible values include: "Invalid", "Up", "Down", + "Enabling", "Disabling", "Disabled", "Unknown", "Removed". + :vartype node_status: str or ~azure.servicefabric.models.NodeStatus + :ivar node_up_time_in_seconds: Time in seconds since the node has been in NodeStatus Up. Value + zero indicates that the node is not Up. + :vartype node_up_time_in_seconds: str + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar is_seed_node: Indicates if the node is a seed node or not. Returns true if the node is a + seed node, otherwise false. A quorum of seed nodes are required for proper operation of Service + Fabric cluster. + :vartype is_seed_node: bool + :ivar upgrade_domain: The upgrade domain of the node. + :vartype upgrade_domain: str + :ivar fault_domain: The fault domain of the node. + :vartype fault_domain: str + :ivar id: An internal ID used by Service Fabric to uniquely identify a node. Node Id is + deterministically generated from node name. + :vartype id: ~azure.servicefabric.models.NodeId + :ivar instance_id: The ID representing the node instance. While the ID of the node is + deterministically generated from the node name and remains same across restarts, the InstanceId + changes every time node restarts. + :vartype instance_id: str + :ivar node_deactivation_info: Information about the node deactivation. This information is + valid for a node that is undergoing deactivation or has already been deactivated. + :vartype node_deactivation_info: ~azure.servicefabric.models.NodeDeactivationInfo + :ivar is_stopped: Indicates if the node is stopped by calling stop node API or not. Returns + true if the node is stopped, otherwise false. + :vartype is_stopped: bool + :ivar node_down_time_in_seconds: Time in seconds since the node has been in NodeStatus Down. + Value zero indicates node is not NodeStatus Down. + :vartype node_down_time_in_seconds: str + :ivar node_up_at: Date time in UTC when the node came up. If the node has never been up then + this value will be zero date time. + :vartype node_up_at: ~datetime.datetime + :ivar node_down_at: Date time in UTC when the node went down. If node has never been down then + this value will be zero date time. + :vartype node_down_at: ~datetime.datetime + :ivar node_tags: List that contains tags, which will be applied to the nodes. + :vartype node_tags: list[str] + :ivar is_node_by_node_upgrade_in_progress: Indicates if a node-by-node upgrade is currently + being performed on this node. + :vartype is_node_by_node_upgrade_in_progress: bool + :ivar infrastructure_placement_id: PlacementID used by the InfrastructureService. + :vartype infrastructure_placement_id: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'type': {'key': 'Type', 'type': 'str'}, + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'node_status': {'key': 'NodeStatus', 'type': 'str'}, + 'node_up_time_in_seconds': {'key': 'NodeUpTimeInSeconds', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'NodeId'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + 'node_deactivation_info': {'key': 'NodeDeactivationInfo', 'type': 'NodeDeactivationInfo'}, + 'is_stopped': {'key': 'IsStopped', 'type': 'bool'}, + 'node_down_time_in_seconds': {'key': 'NodeDownTimeInSeconds', 'type': 'str'}, + 'node_up_at': {'key': 'NodeUpAt', 'type': 'iso-8601'}, + 'node_down_at': {'key': 'NodeDownAt', 'type': 'iso-8601'}, + 'node_tags': {'key': 'NodeTags', 'type': '[str]'}, + 'is_node_by_node_upgrade_in_progress': {'key': 'IsNodeByNodeUpgradeInProgress', 'type': 'bool'}, + 'infrastructure_placement_id': {'key': 'InfrastructurePlacementID', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + ip_address_or_fqdn: Optional[str] = None, + type: Optional[str] = None, + code_version: Optional[str] = None, + config_version: Optional[str] = None, + node_status: Optional[Union[str, "NodeStatus"]] = None, + node_up_time_in_seconds: Optional[str] = None, + health_state: Optional[Union[str, "HealthState"]] = None, + is_seed_node: Optional[bool] = None, + upgrade_domain: Optional[str] = None, + fault_domain: Optional[str] = None, + id: Optional["NodeId"] = None, + instance_id: Optional[str] = None, + node_deactivation_info: Optional["NodeDeactivationInfo"] = None, + is_stopped: Optional[bool] = None, + node_down_time_in_seconds: Optional[str] = None, + node_up_at: Optional[datetime.datetime] = None, + node_down_at: Optional[datetime.datetime] = None, + node_tags: Optional[List[str]] = None, + is_node_by_node_upgrade_in_progress: Optional[bool] = None, + infrastructure_placement_id: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The name of a Service Fabric node. + :paramtype name: str + :keyword ip_address_or_fqdn: The IP address or fully qualified domain name of the node. + :paramtype ip_address_or_fqdn: str + :keyword type: The type of the node. + :paramtype type: str + :keyword code_version: The version of Service Fabric binaries that the node is running. + :paramtype code_version: str + :keyword config_version: The version of Service Fabric cluster manifest that the node is using. + :paramtype config_version: str + :keyword node_status: The status of the node. Possible values include: "Invalid", "Up", "Down", + "Enabling", "Disabling", "Disabled", "Unknown", "Removed". + :paramtype node_status: str or ~azure.servicefabric.models.NodeStatus + :keyword node_up_time_in_seconds: Time in seconds since the node has been in NodeStatus Up. + Value zero indicates that the node is not Up. + :paramtype node_up_time_in_seconds: str + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword is_seed_node: Indicates if the node is a seed node or not. Returns true if the node is + a seed node, otherwise false. A quorum of seed nodes are required for proper operation of + Service Fabric cluster. + :paramtype is_seed_node: bool + :keyword upgrade_domain: The upgrade domain of the node. + :paramtype upgrade_domain: str + :keyword fault_domain: The fault domain of the node. + :paramtype fault_domain: str + :keyword id: An internal ID used by Service Fabric to uniquely identify a node. Node Id is + deterministically generated from node name. + :paramtype id: ~azure.servicefabric.models.NodeId + :keyword instance_id: The ID representing the node instance. While the ID of the node is + deterministically generated from the node name and remains same across restarts, the InstanceId + changes every time node restarts. + :paramtype instance_id: str + :keyword node_deactivation_info: Information about the node deactivation. This information is + valid for a node that is undergoing deactivation or has already been deactivated. + :paramtype node_deactivation_info: ~azure.servicefabric.models.NodeDeactivationInfo + :keyword is_stopped: Indicates if the node is stopped by calling stop node API or not. Returns + true if the node is stopped, otherwise false. + :paramtype is_stopped: bool + :keyword node_down_time_in_seconds: Time in seconds since the node has been in NodeStatus Down. + Value zero indicates node is not NodeStatus Down. + :paramtype node_down_time_in_seconds: str + :keyword node_up_at: Date time in UTC when the node came up. If the node has never been up then + this value will be zero date time. + :paramtype node_up_at: ~datetime.datetime + :keyword node_down_at: Date time in UTC when the node went down. If node has never been down + then this value will be zero date time. + :paramtype node_down_at: ~datetime.datetime + :keyword node_tags: List that contains tags, which will be applied to the nodes. + :paramtype node_tags: list[str] + :keyword is_node_by_node_upgrade_in_progress: Indicates if a node-by-node upgrade is currently + being performed on this node. + :paramtype is_node_by_node_upgrade_in_progress: bool + :keyword infrastructure_placement_id: PlacementID used by the InfrastructureService. + :paramtype infrastructure_placement_id: str + """ + super(NodeInfo, self).__init__(**kwargs) + self.name = name + self.ip_address_or_fqdn = ip_address_or_fqdn + self.type = type + self.code_version = code_version + self.config_version = config_version + self.node_status = node_status + self.node_up_time_in_seconds = node_up_time_in_seconds + self.health_state = health_state + self.is_seed_node = is_seed_node + self.upgrade_domain = upgrade_domain + self.fault_domain = fault_domain + self.id = id + self.instance_id = instance_id + self.node_deactivation_info = node_deactivation_info + self.is_stopped = is_stopped + self.node_down_time_in_seconds = node_down_time_in_seconds + self.node_up_at = node_up_at + self.node_down_at = node_down_at + self.node_tags = node_tags + self.is_node_by_node_upgrade_in_progress = is_node_by_node_upgrade_in_progress + self.infrastructure_placement_id = infrastructure_placement_id + + +class NodeLoadInfo(msrest.serialization.Model): + """Information about load on a Service Fabric node. It holds a summary of all metrics and their load on a node. + + :ivar node_name: Name of the node for which the load information is provided by this object. + :vartype node_name: str + :ivar node_load_metric_information: List that contains metrics and their load information on + this node. + :vartype node_load_metric_information: + list[~azure.servicefabric.models.NodeLoadMetricInformation] + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_load_metric_information': {'key': 'NodeLoadMetricInformation', 'type': '[NodeLoadMetricInformation]'}, + } + + def __init__( + self, + *, + node_name: Optional[str] = None, + node_load_metric_information: Optional[List["NodeLoadMetricInformation"]] = None, + **kwargs + ): + """ + :keyword node_name: Name of the node for which the load information is provided by this object. + :paramtype node_name: str + :keyword node_load_metric_information: List that contains metrics and their load information on + this node. + :paramtype node_load_metric_information: + list[~azure.servicefabric.models.NodeLoadMetricInformation] + """ + super(NodeLoadInfo, self).__init__(**kwargs) + self.node_name = node_name + self.node_load_metric_information = node_load_metric_information + + +class NodeLoadMetricInformation(msrest.serialization.Model): + """Represents data structure that contains load information for a certain metric on a node. + + :ivar name: Name of the metric for which this load information is provided. + :vartype name: str + :ivar node_capacity: Total capacity on the node for this metric. + :vartype node_capacity: str + :ivar node_load: Current load on the node for this metric. In future releases of Service Fabric + this parameter will be deprecated in favor of CurrentNodeLoad. + :vartype node_load: str + :ivar node_remaining_capacity: The remaining capacity on the node for this metric. In future + releases of Service Fabric this parameter will be deprecated in favor of NodeCapacityRemaining. + :vartype node_remaining_capacity: str + :ivar is_capacity_violation: Indicates if there is a capacity violation for this metric on the + node. + :vartype is_capacity_violation: bool + :ivar node_buffered_capacity: The value that indicates the reserved capacity for this metric on + the node. + :vartype node_buffered_capacity: str + :ivar node_remaining_buffered_capacity: The remaining reserved capacity for this metric on the + node. In future releases of Service Fabric this parameter will be deprecated in favor of + BufferedNodeCapacityRemaining. + :vartype node_remaining_buffered_capacity: str + :ivar current_node_load: Current load on the node for this metric. + :vartype current_node_load: str + :ivar node_capacity_remaining: The remaining capacity on the node for the metric. + :vartype node_capacity_remaining: str + :ivar buffered_node_capacity_remaining: The remaining capacity which is not reserved by + NodeBufferPercentage for this metric on the node. + :vartype buffered_node_capacity_remaining: str + :ivar planned_node_load_removal: This value represents the load of the replicas that are + planned to be removed in the future. + This kind of load is reported for replicas that are currently being moving to other nodes and + for replicas that are currently being dropped but still use the load on the source node. + :vartype planned_node_load_removal: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'node_capacity': {'key': 'NodeCapacity', 'type': 'str'}, + 'node_load': {'key': 'NodeLoad', 'type': 'str'}, + 'node_remaining_capacity': {'key': 'NodeRemainingCapacity', 'type': 'str'}, + 'is_capacity_violation': {'key': 'IsCapacityViolation', 'type': 'bool'}, + 'node_buffered_capacity': {'key': 'NodeBufferedCapacity', 'type': 'str'}, + 'node_remaining_buffered_capacity': {'key': 'NodeRemainingBufferedCapacity', 'type': 'str'}, + 'current_node_load': {'key': 'CurrentNodeLoad', 'type': 'str'}, + 'node_capacity_remaining': {'key': 'NodeCapacityRemaining', 'type': 'str'}, + 'buffered_node_capacity_remaining': {'key': 'BufferedNodeCapacityRemaining', 'type': 'str'}, + 'planned_node_load_removal': {'key': 'PlannedNodeLoadRemoval', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + node_capacity: Optional[str] = None, + node_load: Optional[str] = None, + node_remaining_capacity: Optional[str] = None, + is_capacity_violation: Optional[bool] = None, + node_buffered_capacity: Optional[str] = None, + node_remaining_buffered_capacity: Optional[str] = None, + current_node_load: Optional[str] = None, + node_capacity_remaining: Optional[str] = None, + buffered_node_capacity_remaining: Optional[str] = None, + planned_node_load_removal: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Name of the metric for which this load information is provided. + :paramtype name: str + :keyword node_capacity: Total capacity on the node for this metric. + :paramtype node_capacity: str + :keyword node_load: Current load on the node for this metric. In future releases of Service + Fabric this parameter will be deprecated in favor of CurrentNodeLoad. + :paramtype node_load: str + :keyword node_remaining_capacity: The remaining capacity on the node for this metric. In future + releases of Service Fabric this parameter will be deprecated in favor of NodeCapacityRemaining. + :paramtype node_remaining_capacity: str + :keyword is_capacity_violation: Indicates if there is a capacity violation for this metric on + the node. + :paramtype is_capacity_violation: bool + :keyword node_buffered_capacity: The value that indicates the reserved capacity for this metric + on the node. + :paramtype node_buffered_capacity: str + :keyword node_remaining_buffered_capacity: The remaining reserved capacity for this metric on + the node. In future releases of Service Fabric this parameter will be deprecated in favor of + BufferedNodeCapacityRemaining. + :paramtype node_remaining_buffered_capacity: str + :keyword current_node_load: Current load on the node for this metric. + :paramtype current_node_load: str + :keyword node_capacity_remaining: The remaining capacity on the node for the metric. + :paramtype node_capacity_remaining: str + :keyword buffered_node_capacity_remaining: The remaining capacity which is not reserved by + NodeBufferPercentage for this metric on the node. + :paramtype buffered_node_capacity_remaining: str + :keyword planned_node_load_removal: This value represents the load of the replicas that are + planned to be removed in the future. + This kind of load is reported for replicas that are currently being moving to other nodes and + for replicas that are currently being dropped but still use the load on the source node. + :paramtype planned_node_load_removal: str + """ + super(NodeLoadMetricInformation, self).__init__(**kwargs) + self.name = name + self.node_capacity = node_capacity + self.node_load = node_load + self.node_remaining_capacity = node_remaining_capacity + self.is_capacity_violation = is_capacity_violation + self.node_buffered_capacity = node_buffered_capacity + self.node_remaining_buffered_capacity = node_remaining_buffered_capacity + self.current_node_load = current_node_load + self.node_capacity_remaining = node_capacity_remaining + self.buffered_node_capacity_remaining = buffered_node_capacity_remaining + self.planned_node_load_removal = planned_node_load_removal + + +class NodeNewHealthReportEvent(NodeEvent): + """Node Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance_id: Required. Id of Node instance. + :vartype node_instance_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + node_name: str, + node_instance_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance_id: Required. Id of Node instance. + :paramtype node_instance_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(NodeNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.kind = 'NodeNewHealthReport' # type: str + self.node_instance_id = node_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class NodeOpenFailedEvent(NodeEvent): + """Node Open Failed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar node_id: Required. Id of Node. + :vartype node_id: str + :ivar upgrade_domain: Required. Upgrade domain of Node. + :vartype upgrade_domain: str + :ivar fault_domain: Required. Fault domain of Node. + :vartype fault_domain: str + :ivar ip_address_or_fqdn: Required. IP address or FQDN. + :vartype ip_address_or_fqdn: str + :ivar hostname: Required. Name of Host. + :vartype hostname: str + :ivar is_seed_node: Required. Indicates if it is seed node. + :vartype is_seed_node: bool + :ivar node_version: Required. Version of Node. + :vartype node_version: str + :ivar error: Required. Describes the error. + :vartype error: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + 'error': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + 'error': {'key': 'Error', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + node_name: str, + node_instance: int, + node_id: str, + upgrade_domain: str, + fault_domain: str, + ip_address_or_fqdn: str, + hostname: str, + is_seed_node: bool, + node_version: str, + error: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword node_id: Required. Id of Node. + :paramtype node_id: str + :keyword upgrade_domain: Required. Upgrade domain of Node. + :paramtype upgrade_domain: str + :keyword fault_domain: Required. Fault domain of Node. + :paramtype fault_domain: str + :keyword ip_address_or_fqdn: Required. IP address or FQDN. + :paramtype ip_address_or_fqdn: str + :keyword hostname: Required. Name of Host. + :paramtype hostname: str + :keyword is_seed_node: Required. Indicates if it is seed node. + :paramtype is_seed_node: bool + :keyword node_version: Required. Version of Node. + :paramtype node_version: str + :keyword error: Required. Describes the error. + :paramtype error: str + """ + super(NodeOpenFailedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.kind = 'NodeOpenFailed' # type: str + self.node_instance = node_instance + self.node_id = node_id + self.upgrade_domain = upgrade_domain + self.fault_domain = fault_domain + self.ip_address_or_fqdn = ip_address_or_fqdn + self.hostname = hostname + self.is_seed_node = is_seed_node + self.node_version = node_version + self.error = error + + +class NodeOpenSucceededEvent(NodeEvent): + """Node Opened Succeeded event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar node_id: Required. Id of Node. + :vartype node_id: str + :ivar upgrade_domain: Required. Upgrade domain of Node. + :vartype upgrade_domain: str + :ivar fault_domain: Required. Fault domain of Node. + :vartype fault_domain: str + :ivar ip_address_or_fqdn: Required. IP address or FQDN. + :vartype ip_address_or_fqdn: str + :ivar hostname: Required. Name of Host. + :vartype hostname: str + :ivar is_seed_node: Required. Indicates if it is seed node. + :vartype is_seed_node: bool + :ivar node_version: Required. Version of Node. + :vartype node_version: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + node_name: str, + node_instance: int, + node_id: str, + upgrade_domain: str, + fault_domain: str, + ip_address_or_fqdn: str, + hostname: str, + is_seed_node: bool, + node_version: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword node_id: Required. Id of Node. + :paramtype node_id: str + :keyword upgrade_domain: Required. Upgrade domain of Node. + :paramtype upgrade_domain: str + :keyword fault_domain: Required. Fault domain of Node. + :paramtype fault_domain: str + :keyword ip_address_or_fqdn: Required. IP address or FQDN. + :paramtype ip_address_or_fqdn: str + :keyword hostname: Required. Name of Host. + :paramtype hostname: str + :keyword is_seed_node: Required. Indicates if it is seed node. + :paramtype is_seed_node: bool + :keyword node_version: Required. Version of Node. + :paramtype node_version: str + """ + super(NodeOpenSucceededEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.kind = 'NodeOpenSucceeded' # type: str + self.node_instance = node_instance + self.node_id = node_id + self.upgrade_domain = upgrade_domain + self.fault_domain = fault_domain + self.ip_address_or_fqdn = ip_address_or_fqdn + self.hostname = hostname + self.is_seed_node = is_seed_node + self.node_version = node_version + + +class NodeRemovedFromClusterEvent(NodeEvent): + """Node Removed event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_id: Required. Id of Node. + :vartype node_id: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar node_type: Required. Type of Node. + :vartype node_type: str + :ivar fabric_version: Required. Fabric version. + :vartype fabric_version: str + :ivar ip_address_or_fqdn: Required. IP address or FQDN. + :vartype ip_address_or_fqdn: str + :ivar node_capacities: Required. Capacities. + :vartype node_capacities: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'node_type': {'required': True}, + 'fabric_version': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'node_capacities': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_type': {'key': 'NodeType', 'type': 'str'}, + 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + node_name: str, + node_id: str, + node_instance: int, + node_type: str, + fabric_version: str, + ip_address_or_fqdn: str, + node_capacities: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_id: Required. Id of Node. + :paramtype node_id: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword node_type: Required. Type of Node. + :paramtype node_type: str + :keyword fabric_version: Required. Fabric version. + :paramtype fabric_version: str + :keyword ip_address_or_fqdn: Required. IP address or FQDN. + :paramtype ip_address_or_fqdn: str + :keyword node_capacities: Required. Capacities. + :paramtype node_capacities: str + """ + super(NodeRemovedFromClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.kind = 'NodeRemovedFromCluster' # type: str + self.node_id = node_id + self.node_instance = node_instance + self.node_type = node_type + self.fabric_version = fabric_version + self.ip_address_or_fqdn = ip_address_or_fqdn + self.node_capacities = node_capacities + + +class RepairImpactDescriptionBase(msrest.serialization.Model): + """Describes the expected impact of executing a repair task. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NodeRepairImpactDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of repair impact represented by the current object.Constant + filled by server. Possible values include: "Invalid", "Node". + :vartype kind: str or ~azure.servicefabric.models.RepairImpactKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Node': 'NodeRepairImpactDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(RepairImpactDescriptionBase, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class NodeRepairImpactDescription(RepairImpactDescriptionBase): + """Describes the expected impact of a repair on a set of nodes. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of repair impact represented by the current object.Constant + filled by server. Possible values include: "Invalid", "Node". + :vartype kind: str or ~azure.servicefabric.models.RepairImpactKind + :ivar node_impact_list: The list of nodes impacted by a repair action and their respective + expected impact. + :vartype node_impact_list: list[~azure.servicefabric.models.NodeImpact] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_impact_list': {'key': 'NodeImpactList', 'type': '[NodeImpact]'}, + } + + def __init__( + self, + *, + node_impact_list: Optional[List["NodeImpact"]] = None, + **kwargs + ): + """ + :keyword node_impact_list: The list of nodes impacted by a repair action and their respective + expected impact. + :paramtype node_impact_list: list[~azure.servicefabric.models.NodeImpact] + """ + super(NodeRepairImpactDescription, self).__init__(**kwargs) + self.kind = 'Node' # type: str + self.node_impact_list = node_impact_list + + +class RepairTargetDescriptionBase(msrest.serialization.Model): + """Describes the entities targeted by a repair action. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NodeRepairTargetDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of repair target described by the current object.Constant filled + by server. Possible values include: "Invalid", "Node". + :vartype kind: str or ~azure.servicefabric.models.RepairTargetKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Node': 'NodeRepairTargetDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(RepairTargetDescriptionBase, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class NodeRepairTargetDescription(RepairTargetDescriptionBase): + """Describes the list of nodes targeted by a repair action. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of repair target described by the current object.Constant filled + by server. Possible values include: "Invalid", "Node". + :vartype kind: str or ~azure.servicefabric.models.RepairTargetKind + :ivar node_names: The list of nodes targeted by a repair action. + :vartype node_names: list[str] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_names': {'key': 'NodeNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + node_names: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword node_names: The list of nodes targeted by a repair action. + :paramtype node_names: list[str] + """ + super(NodeRepairTargetDescription, self).__init__(**kwargs) + self.kind = 'Node' # type: str + self.node_names = node_names + + +class NodeResult(msrest.serialization.Model): + """Contains information about a node that was targeted by a user-induced operation. + + :ivar node_name: The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance_id: The node instance id. + :vartype node_instance_id: str + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + } + + def __init__( + self, + *, + node_name: Optional[str] = None, + node_instance_id: Optional[str] = None, + **kwargs + ): + """ + :keyword node_name: The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance_id: The node instance id. + :paramtype node_instance_id: str + """ + super(NodeResult, self).__init__(**kwargs) + self.node_name = node_name + self.node_instance_id = node_instance_id + + +class NodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for nodes, containing health evaluations for each unhealthy node that impacted current aggregated health state. Can be returned when evaluating cluster health and the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes from the + ClusterHealthPolicy. + :vartype max_percent_unhealthy_nodes: int + :ivar total_count: Total number of nodes found in the health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + max_percent_unhealthy_nodes: Optional[int] = None, + total_count: Optional[int] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes from the + ClusterHealthPolicy. + :paramtype max_percent_unhealthy_nodes: int + :keyword total_count: Total number of nodes found in the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(NodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'Nodes' # type: str + self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + + +class NodeTagsDescription(msrest.serialization.Model): + """Describes the tags required for placement or running of the service. + + All required parameters must be populated in order to send to Azure. + + :ivar count: Required. The number of tags. + :vartype count: int + :ivar tags: Required. A set of tags. Array of size specified by the ‘Count’ parameter, for the + placement tags of the service. + :vartype tags: list[str] + """ + + _validation = { + 'count': {'required': True}, + 'tags': {'required': True}, + } + + _attribute_map = { + 'count': {'key': 'Count', 'type': 'int'}, + 'tags': {'key': 'Tags', 'type': '[str]'}, + } + + def __init__( + self, + *, + count: int, + tags: List[str], + **kwargs + ): + """ + :keyword count: Required. The number of tags. + :paramtype count: int + :keyword tags: Required. A set of tags. Array of size specified by the ‘Count’ parameter, for + the placement tags of the service. + :paramtype tags: list[str] + """ + super(NodeTagsDescription, self).__init__(**kwargs) + self.count = count + self.tags = tags + + +class NodeTransitionProgress(msrest.serialization.Model): + """Information about an NodeTransition operation. This class contains an OperationState and a NodeTransitionResult. The NodeTransitionResult is not valid until OperationState +is Completed or Faulted. + + :ivar state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :vartype state: str or ~azure.servicefabric.models.OperationState + :ivar node_transition_result: Represents information about an operation in a terminal state + (Completed or Faulted). + :vartype node_transition_result: ~azure.servicefabric.models.NodeTransitionResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'node_transition_result': {'key': 'NodeTransitionResult', 'type': 'NodeTransitionResult'}, + } + + def __init__( + self, + *, + state: Optional[Union[str, "OperationState"]] = None, + node_transition_result: Optional["NodeTransitionResult"] = None, + **kwargs + ): + """ + :keyword state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :paramtype state: str or ~azure.servicefabric.models.OperationState + :keyword node_transition_result: Represents information about an operation in a terminal state + (Completed or Faulted). + :paramtype node_transition_result: ~azure.servicefabric.models.NodeTransitionResult + """ + super(NodeTransitionProgress, self).__init__(**kwargs) + self.state = state + self.node_transition_result = node_transition_result + + +class NodeTransitionResult(msrest.serialization.Model): + """Represents information about an operation in a terminal state (Completed or Faulted). + + :ivar error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, + this is an error code indicating the reason. + :vartype error_code: int + :ivar node_result: Contains information about a node that was targeted by a user-induced + operation. + :vartype node_result: ~azure.servicefabric.models.NodeResult + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'node_result': {'key': 'NodeResult', 'type': 'NodeResult'}, + } + + def __init__( + self, + *, + error_code: Optional[int] = None, + node_result: Optional["NodeResult"] = None, + **kwargs + ): + """ + :keyword error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, + this is an error code indicating the reason. + :paramtype error_code: int + :keyword node_result: Contains information about a node that was targeted by a user-induced + operation. + :paramtype node_result: ~azure.servicefabric.models.NodeResult + """ + super(NodeTransitionResult, self).__init__(**kwargs) + self.error_code = error_code + self.node_result = node_result + + +class NodeTypeHealthPolicyMapItem(msrest.serialization.Model): + """Defines an item in NodeTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :ivar key: Required. The key of the node type health policy map item. This is the name of the + node type. + :vartype key: str + :ivar value: Required. The value of the node type health policy map item. + If the percentage is respected but there is at least one unhealthy node in the node type, the + health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes over the total number + of nodes in the node type. + The computation rounds up to tolerate one failure on small numbers of nodes. + The max percent unhealthy nodes allowed for the node type. Must be between zero and 100. + :vartype value: int + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + } + + def __init__( + self, + *, + key: str, + value: int, + **kwargs + ): + """ + :keyword key: Required. The key of the node type health policy map item. This is the name of + the node type. + :paramtype key: str + :keyword value: Required. The value of the node type health policy map item. + If the percentage is respected but there is at least one unhealthy node in the node type, the + health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes over the total number + of nodes in the node type. + The computation rounds up to tolerate one failure on small numbers of nodes. + The max percent unhealthy nodes allowed for the node type. Must be between zero and 100. + :paramtype value: int + """ + super(NodeTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = key + self.value = value + + +class NodeTypeNodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for nodes of a particular node type. The node type nodes evaluation can be returned when cluster health evaluation returns unhealthy aggregated health state, either Error or Warning. It contains health evaluations for each unhealthy node of the included node type that impacted current aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar node_type_name: The node type name as defined in the cluster manifest. + :vartype node_type_name: str + :ivar max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes for the node + type, specified as an entry in NodeTypeHealthPolicyMap. + :vartype max_percent_unhealthy_nodes: int + :ivar total_count: Total number of nodes of the node type found in the health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy NodeHealthEvaluation of this node type that impacted the + aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'node_type_name': {'key': 'NodeTypeName', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + node_type_name: Optional[str] = None, + max_percent_unhealthy_nodes: Optional[int] = None, + total_count: Optional[int] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword node_type_name: The node type name as defined in the cluster manifest. + :paramtype node_type_name: str + :keyword max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes for the + node type, specified as an entry in NodeTypeHealthPolicyMap. + :paramtype max_percent_unhealthy_nodes: int + :keyword total_count: Total number of nodes of the node type found in the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy NodeHealthEvaluation of this node type that impacted the + aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(NodeTypeNodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'NodeTypeNodes' # type: str + self.node_type_name = node_type_name + self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + + +class NodeUpEvent(NodeEvent): + """Node Up event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance: Required. Id of Node instance. + :vartype node_instance: long + :ivar last_node_down_at: Required. Time when Node was last down. + :vartype last_node_down_at: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'last_node_down_at': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'last_node_down_at': {'key': 'LastNodeDownAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + node_name: str, + node_instance: int, + last_node_down_at: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance: Required. Id of Node instance. + :paramtype node_instance: long + :keyword last_node_down_at: Required. Time when Node was last down. + :paramtype last_node_down_at: ~datetime.datetime + """ + super(NodeUpEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.kind = 'NodeUp' # type: str + self.node_instance = node_instance + self.last_node_down_at = last_node_down_at + + +class NodeUpgradeProgressInfo(msrest.serialization.Model): + """Information about the upgrading node and its status. + + :ivar node_name: The name of a Service Fabric node. + :vartype node_name: str + :ivar upgrade_phase: The state of the upgrading node. Possible values include: "Invalid", + "PreUpgradeSafetyCheck", "Upgrading", "PostUpgradeSafetyCheck". + :vartype upgrade_phase: str or ~azure.servicefabric.models.NodeUpgradePhase + :ivar pending_safety_checks: List of pending safety checks. + :vartype pending_safety_checks: list[~azure.servicefabric.models.SafetyCheckWrapper] + :ivar upgrade_duration: The estimated time spent processing the node since it was deactivated + during a node-by-node upgrade. + :vartype upgrade_duration: str + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'upgrade_phase': {'key': 'UpgradePhase', 'type': 'str'}, + 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, + 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + } + + def __init__( + self, + *, + node_name: Optional[str] = None, + upgrade_phase: Optional[Union[str, "NodeUpgradePhase"]] = None, + pending_safety_checks: Optional[List["SafetyCheckWrapper"]] = None, + upgrade_duration: Optional[str] = None, + **kwargs + ): + """ + :keyword node_name: The name of a Service Fabric node. + :paramtype node_name: str + :keyword upgrade_phase: The state of the upgrading node. Possible values include: "Invalid", + "PreUpgradeSafetyCheck", "Upgrading", "PostUpgradeSafetyCheck". + :paramtype upgrade_phase: str or ~azure.servicefabric.models.NodeUpgradePhase + :keyword pending_safety_checks: List of pending safety checks. + :paramtype pending_safety_checks: list[~azure.servicefabric.models.SafetyCheckWrapper] + :keyword upgrade_duration: The estimated time spent processing the node since it was + deactivated during a node-by-node upgrade. + :paramtype upgrade_duration: str + """ + super(NodeUpgradeProgressInfo, self).__init__(**kwargs) + self.node_name = node_name + self.upgrade_phase = upgrade_phase + self.pending_safety_checks = pending_safety_checks + self.upgrade_duration = upgrade_duration + + +class OperationStatus(msrest.serialization.Model): + """Contains the OperationId, OperationState, and OperationType for user-induced operations. + + :ivar operation_id: A GUID that identifies a call to this API. This is also passed into the + corresponding GetProgress API. + :vartype operation_id: str + :ivar state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :vartype state: str or ~azure.servicefabric.models.OperationState + :ivar type: The type of the operation. Possible values include: "Invalid", "PartitionDataLoss", + "PartitionQuorumLoss", "PartitionRestart", "NodeTransition". + :vartype type: str or ~azure.servicefabric.models.OperationType + """ + + _attribute_map = { + 'operation_id': {'key': 'OperationId', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + 'type': {'key': 'Type', 'type': 'str'}, + } + + def __init__( + self, + *, + operation_id: Optional[str] = None, + state: Optional[Union[str, "OperationState"]] = None, + type: Optional[Union[str, "OperationType"]] = None, + **kwargs + ): + """ + :keyword operation_id: A GUID that identifies a call to this API. This is also passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :paramtype state: str or ~azure.servicefabric.models.OperationState + :keyword type: The type of the operation. Possible values include: "Invalid", + "PartitionDataLoss", "PartitionQuorumLoss", "PartitionRestart", "NodeTransition". + :paramtype type: str or ~azure.servicefabric.models.OperationType + """ + super(OperationStatus, self).__init__(**kwargs) + self.operation_id = operation_id + self.state = state + self.type = type + + +class PackageSharingPolicyInfo(msrest.serialization.Model): + """Represents a policy for the package sharing. + + :ivar shared_package_name: The name of code, configuration or data package that should be + shared. + :vartype shared_package_name: str + :ivar package_sharing_scope: Represents the scope for PackageSharingPolicy. This is specified + during DeployServicePackageToNode operation. Possible values include: "None", "All", "Code", + "Config", "Data". + :vartype package_sharing_scope: str or ~azure.servicefabric.models.PackageSharingPolicyScope + """ + + _attribute_map = { + 'shared_package_name': {'key': 'SharedPackageName', 'type': 'str'}, + 'package_sharing_scope': {'key': 'PackageSharingScope', 'type': 'str'}, + } + + def __init__( + self, + *, + shared_package_name: Optional[str] = None, + package_sharing_scope: Optional[Union[str, "PackageSharingPolicyScope"]] = None, + **kwargs + ): + """ + :keyword shared_package_name: The name of code, configuration or data package that should be + shared. + :paramtype shared_package_name: str + :keyword package_sharing_scope: Represents the scope for PackageSharingPolicy. This is + specified during DeployServicePackageToNode operation. Possible values include: "None", "All", + "Code", "Config", "Data". + :paramtype package_sharing_scope: str or ~azure.servicefabric.models.PackageSharingPolicyScope + """ + super(PackageSharingPolicyInfo, self).__init__(**kwargs) + self.shared_package_name = shared_package_name + self.package_sharing_scope = package_sharing_scope + + +class PagedApplicationInfoList(msrest.serialization.Model): + """The list of applications in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of application information. + :vartype items: list[~azure.servicefabric.models.ApplicationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationInfo]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["ApplicationInfo"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of application information. + :paramtype items: list[~azure.servicefabric.models.ApplicationInfo] + """ + super(PagedApplicationInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedApplicationResourceDescriptionList(msrest.serialization.Model): + """The list of application resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: One page of the list. + :vartype items: list[~azure.servicefabric.models.ApplicationResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationResourceDescription]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["ApplicationResourceDescription"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: One page of the list. + :paramtype items: list[~azure.servicefabric.models.ApplicationResourceDescription] + """ + super(PagedApplicationResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedApplicationTypeInfoList(msrest.serialization.Model): + """The list of application types that are provisioned or being provisioned in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of application type information. + :vartype items: list[~azure.servicefabric.models.ApplicationTypeInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationTypeInfo]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["ApplicationTypeInfo"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of application type information. + :paramtype items: list[~azure.servicefabric.models.ApplicationTypeInfo] + """ + super(PagedApplicationTypeInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedBackupConfigurationInfoList(msrest.serialization.Model): + """The list of backup configuration information. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of backup configuration information. + :vartype items: list[~azure.servicefabric.models.BackupConfigurationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupConfigurationInfo]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["BackupConfigurationInfo"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of backup configuration information. + :paramtype items: list[~azure.servicefabric.models.BackupConfigurationInfo] + """ + super(PagedBackupConfigurationInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedBackupEntityList(msrest.serialization.Model): + """The list of backup entities that are being periodically backed. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of backup entity information. + :vartype items: list[~azure.servicefabric.models.BackupEntity] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupEntity]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["BackupEntity"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of backup entity information. + :paramtype items: list[~azure.servicefabric.models.BackupEntity] + """ + super(PagedBackupEntityList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedBackupInfoList(msrest.serialization.Model): + """The list of backups. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of backup information. + :vartype items: list[~azure.servicefabric.models.BackupInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupInfo]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["BackupInfo"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of backup information. + :paramtype items: list[~azure.servicefabric.models.BackupInfo] + """ + super(PagedBackupInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedBackupPolicyDescriptionList(msrest.serialization.Model): + """The list of backup policies configured in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: The list of backup policies information. + :vartype items: list[~azure.servicefabric.models.BackupPolicyDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupPolicyDescription]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["BackupPolicyDescription"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: The list of backup policies information. + :paramtype items: list[~azure.servicefabric.models.BackupPolicyDescription] + """ + super(PagedBackupPolicyDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedComposeDeploymentStatusInfoList(msrest.serialization.Model): + """The list of compose deployments in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of compose deployment status information. + :vartype items: list[~azure.servicefabric.models.ComposeDeploymentStatusInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ComposeDeploymentStatusInfo]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["ComposeDeploymentStatusInfo"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of compose deployment status information. + :paramtype items: list[~azure.servicefabric.models.ComposeDeploymentStatusInfo] + """ + super(PagedComposeDeploymentStatusInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedDeployedApplicationInfoList(msrest.serialization.Model): + """The list of deployed applications in activating, downloading, or active states on a node. +The list is paged when all of the results cannot fit in a single message. +The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of deployed application information. + :vartype items: list[~azure.servicefabric.models.DeployedApplicationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[DeployedApplicationInfo]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["DeployedApplicationInfo"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of deployed application information. + :paramtype items: list[~azure.servicefabric.models.DeployedApplicationInfo] + """ + super(PagedDeployedApplicationInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedGatewayResourceDescriptionList(msrest.serialization.Model): + """The list of gateway resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: One page of the list. + :vartype items: list[~azure.servicefabric.models.GatewayResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[GatewayResourceDescription]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["GatewayResourceDescription"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: One page of the list. + :paramtype items: list[~azure.servicefabric.models.GatewayResourceDescription] + """ + super(PagedGatewayResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedNetworkResourceDescriptionList(msrest.serialization.Model): + """The list of network resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: One page of the list. + :vartype items: list[~azure.servicefabric.models.NetworkResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[NetworkResourceDescription]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["NetworkResourceDescription"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: One page of the list. + :paramtype items: list[~azure.servicefabric.models.NetworkResourceDescription] + """ + super(PagedNetworkResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedNodeInfoList(msrest.serialization.Model): + """The list of nodes in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of node information. + :vartype items: list[~azure.servicefabric.models.NodeInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[NodeInfo]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["NodeInfo"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of node information. + :paramtype items: list[~azure.servicefabric.models.NodeInfo] + """ + super(PagedNodeInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedPropertyInfoList(msrest.serialization.Model): + """The paged list of Service Fabric properties under a given name. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar is_consistent: Indicates whether any property under the given name has been modified + during the enumeration. If there was a modification, this property value is false. + :vartype is_consistent: bool + :ivar properties: List of property information. + :vartype properties: list[~azure.servicefabric.models.PropertyInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, + 'properties': {'key': 'Properties', 'type': '[PropertyInfo]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + is_consistent: Optional[bool] = None, + properties: Optional[List["PropertyInfo"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword is_consistent: Indicates whether any property under the given name has been modified + during the enumeration. If there was a modification, this property value is false. + :paramtype is_consistent: bool + :keyword properties: List of property information. + :paramtype properties: list[~azure.servicefabric.models.PropertyInfo] + """ + super(PagedPropertyInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.is_consistent = is_consistent + self.properties = properties + + +class PagedReplicaInfoList(msrest.serialization.Model): + """The list of replicas in the cluster for a given partition. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of replica information. + :vartype items: list[~azure.servicefabric.models.ReplicaInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ReplicaInfo]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["ReplicaInfo"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of replica information. + :paramtype items: list[~azure.servicefabric.models.ReplicaInfo] + """ + super(PagedReplicaInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedSecretResourceDescriptionList(msrest.serialization.Model): + """The list of secret resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: One page of the list. + :vartype items: list[~azure.servicefabric.models.SecretResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[SecretResourceDescription]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["SecretResourceDescription"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: One page of the list. + :paramtype items: list[~azure.servicefabric.models.SecretResourceDescription] + """ + super(PagedSecretResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedSecretValueResourceDescriptionList(msrest.serialization.Model): + """The list of values of a secret resource, paged if the number of results exceeds the limits of a single message. The next set of results can be obtained by executing the same query with the continuation token provided in the previous page. + + :ivar 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. + :vartype continuation_token: str + :ivar items: One page of the list. + :vartype items: list[~azure.servicefabric.models.SecretValueResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[SecretValueResourceDescription]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["SecretValueResourceDescription"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: One page of the list. + :paramtype items: list[~azure.servicefabric.models.SecretValueResourceDescription] + """ + super(PagedSecretValueResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedServiceInfoList(msrest.serialization.Model): + """The list of services in the cluster for an application. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of service information. + :vartype items: list[~azure.servicefabric.models.ServiceInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceInfo]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["ServiceInfo"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of service information. + :paramtype items: list[~azure.servicefabric.models.ServiceInfo] + """ + super(PagedServiceInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedServicePartitionInfoList(msrest.serialization.Model): + """The list of partition in the cluster for a service. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of service partition information. + :vartype items: list[~azure.servicefabric.models.ServicePartitionInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServicePartitionInfo]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["ServicePartitionInfo"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of service partition information. + :paramtype items: list[~azure.servicefabric.models.ServicePartitionInfo] + """ + super(PagedServicePartitionInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedServiceReplicaDescriptionList(msrest.serialization.Model): + """The list of service resource replicas in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of service resource replica description. + :vartype items: list[~azure.servicefabric.models.ServiceReplicaDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceReplicaDescription]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["ServiceReplicaDescription"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of service resource replica description. + :paramtype items: list[~azure.servicefabric.models.ServiceReplicaDescription] + """ + super(PagedServiceReplicaDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedServiceResourceDescriptionList(msrest.serialization.Model): + """The list of service resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: One page of the list. + :vartype items: list[~azure.servicefabric.models.ServiceResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceResourceDescription]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["ServiceResourceDescription"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: One page of the list. + :paramtype items: list[~azure.servicefabric.models.ServiceResourceDescription] + """ + super(PagedServiceResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedSubNameInfoList(msrest.serialization.Model): + """A paged list of Service Fabric names. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar is_consistent: Indicates whether any name under the given name has been modified during + the enumeration. If there was a modification, this property value is false. + :vartype is_consistent: bool + :ivar sub_names: List of the child names. + :vartype sub_names: list[str] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, + 'sub_names': {'key': 'SubNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + is_consistent: Optional[bool] = None, + sub_names: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword is_consistent: Indicates whether any name under the given name has been modified + during the enumeration. If there was a modification, this property value is false. + :paramtype is_consistent: bool + :keyword sub_names: List of the child names. + :paramtype sub_names: list[str] + """ + super(PagedSubNameInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.is_consistent = is_consistent + self.sub_names = sub_names + + +class PagedUpdatePartitionLoadResultList(msrest.serialization.Model): + """The list of results of the call UpdatePartitionLoad. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: List of partition load update information. + :vartype items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[UpdatePartitionLoadResult]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["UpdatePartitionLoadResult"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: List of partition load update information. + :paramtype items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] + """ + super(PagedUpdatePartitionLoadResultList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PagedVolumeResourceDescriptionList(msrest.serialization.Model): + """The list of volume resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. + + :ivar 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. + :vartype continuation_token: str + :ivar items: One page of the list. + :vartype items: list[~azure.servicefabric.models.VolumeResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[VolumeResourceDescription]'}, + } + + def __init__( + self, + *, + continuation_token: Optional[str] = None, + items: Optional[List["VolumeResourceDescription"]] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype continuation_token: str + :keyword items: One page of the list. + :paramtype items: list[~azure.servicefabric.models.VolumeResourceDescription] + """ + super(PagedVolumeResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + +class PartitionAnalysisEvent(PartitionEvent): + """Represents the base for all Partition Analysis Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionPrimaryMoveAnalysisEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar metadata: Required. Metadata about an Analysis Event. + :vartype metadata: ~azure.servicefabric.models.AnalysisEventMetadata + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'metadata': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, + } + + _subtype_map = { + 'kind': {'PartitionPrimaryMoveAnalysis': 'PartitionPrimaryMoveAnalysisEvent'} + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + partition_id: str, + metadata: "AnalysisEventMetadata", + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword metadata: Required. Metadata about an Analysis Event. + :paramtype metadata: ~azure.servicefabric.models.AnalysisEventMetadata + """ + super(PartitionAnalysisEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.kind = 'PartitionAnalysisEvent' # type: str + self.metadata = metadata + + +class PartitionBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information, for a specific partition, specifying what backup policy is being applied and suspend description, if any. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The entity type of a Service Fabric entity such as Application, Service + or a Partition where periodic backups can be enabled.Constant filled by server. Possible values + include: "Invalid", "Partition", "Service", "Application". + :vartype kind: str or ~azure.servicefabric.models.BackupEntityKind + :ivar policy_name: The name of the backup policy which is applicable to this Service Fabric + application or service or partition. + :vartype policy_name: str + :ivar policy_inherited_from: Specifies the scope at which the backup policy is applied. + Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope + :ivar suspension_info: Describes the backup suspension details. + :vartype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :ivar service_name: The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar partition_id: The partition ID identifying the partition. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + *, + policy_name: Optional[str] = None, + policy_inherited_from: Optional[Union[str, "BackupPolicyScope"]] = None, + suspension_info: Optional["BackupSuspensionInfo"] = None, + service_name: Optional[str] = None, + partition_id: Optional[str] = None, + **kwargs + ): + """ + :keyword policy_name: The name of the backup policy which is applicable to this Service Fabric + application or service or partition. + :paramtype policy_name: str + :keyword policy_inherited_from: Specifies the scope at which the backup policy is applied. + Possible values include: "Invalid", "Partition", "Service", "Application". + :paramtype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope + :keyword suspension_info: Describes the backup suspension details. + :paramtype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :keyword service_name: The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword partition_id: The partition ID identifying the partition. + :paramtype partition_id: str + """ + super(PartitionBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) + self.kind = 'Partition' # type: str + self.service_name = service_name + self.partition_id = partition_id + + +class PartitionBackupEntity(BackupEntity): + """Identifies the Service Fabric stateful partition which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_kind: Required. The entity type of a Service Fabric entity such as Application, + Service or a Partition where periodic backups can be enabled.Constant filled by server. + Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype entity_kind: str or ~azure.servicefabric.models.BackupEntityKind + :ivar service_name: The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar partition_id: The partition ID identifying the partition. + :vartype partition_id: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + *, + service_name: Optional[str] = None, + partition_id: Optional[str] = None, + **kwargs + ): + """ + :keyword service_name: The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword partition_id: The partition ID identifying the partition. + :paramtype partition_id: str + """ + super(PartitionBackupEntity, self).__init__(**kwargs) + self.entity_kind = 'Partition' # type: str + self.service_name = service_name + self.partition_id = partition_id + + +class PartitionDataLossProgress(msrest.serialization.Model): + """Information about a partition data loss user-induced operation. + + :ivar state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :vartype state: str or ~azure.servicefabric.models.OperationState + :ivar invoke_data_loss_result: Represents information about an operation in a terminal state + (Completed or Faulted). + :vartype invoke_data_loss_result: ~azure.servicefabric.models.InvokeDataLossResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'invoke_data_loss_result': {'key': 'InvokeDataLossResult', 'type': 'InvokeDataLossResult'}, + } + + def __init__( + self, + *, + state: Optional[Union[str, "OperationState"]] = None, + invoke_data_loss_result: Optional["InvokeDataLossResult"] = None, + **kwargs + ): + """ + :keyword state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :paramtype state: str or ~azure.servicefabric.models.OperationState + :keyword invoke_data_loss_result: Represents information about an operation in a terminal state + (Completed or Faulted). + :paramtype invoke_data_loss_result: ~azure.servicefabric.models.InvokeDataLossResult + """ + super(PartitionDataLossProgress, self).__init__(**kwargs) + self.state = state + self.invoke_data_loss_result = invoke_data_loss_result + + +class PartitionHealth(EntityHealth): + """Information about the health of a Service Fabric partition. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar partition_id: ID of the partition whose health information is described by this object. + :vartype partition_id: str + :ivar replica_health_states: The list of replica health states associated with the partition. + :vartype replica_health_states: list[~azure.servicefabric.models.ReplicaHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_health_states': {'key': 'ReplicaHealthStates', 'type': '[ReplicaHealthState]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + health_events: Optional[List["HealthEvent"]] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + health_statistics: Optional["HealthStatistics"] = None, + partition_id: Optional[str] = None, + replica_health_states: Optional[List["ReplicaHealthState"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword partition_id: ID of the partition whose health information is described by this + object. + :paramtype partition_id: str + :keyword replica_health_states: The list of replica health states associated with the + partition. + :paramtype replica_health_states: list[~azure.servicefabric.models.ReplicaHealthState] + """ + super(PartitionHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.partition_id = partition_id + self.replica_health_states = replica_health_states + + +class PartitionHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a partition, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar partition_id: Id of the partition whose health evaluation is described by this object. + :vartype partition_id: str + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated + health state of the partition. The types of the unhealthy evaluations can be + ReplicasHealthEvaluation or EventHealthEvaluation. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + partition_id: Optional[str] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword partition_id: Id of the partition whose health evaluation is described by this object. + :paramtype partition_id: str + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current + aggregated health state of the partition. The types of the unhealthy evaluations can be + ReplicasHealthEvaluation or EventHealthEvaluation. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(PartitionHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'Partition' # type: str + self.partition_id = partition_id + self.unhealthy_evaluations = unhealthy_evaluations + + +class PartitionHealthReportExpiredEvent(PartitionEvent): + """Partition Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + partition_id: str, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(PartitionHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.kind = 'PartitionHealthReportExpired' # type: str + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class PartitionHealthState(EntityHealthState): + """Represents the health state of a partition, which contains the partition identifier and its aggregated health state. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar partition_id: Id of the partition whose health state is described by this object. + :vartype partition_id: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + partition_id: Optional[str] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword partition_id: Id of the partition whose health state is described by this object. + :paramtype partition_id: str + """ + super(PartitionHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.partition_id = partition_id + + +class PartitionHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a partition, which contains the partition ID, its aggregated health state and any replicas that respect the filters in the cluster health chunk query description. + + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar partition_id: The Id of the partition. + :vartype partition_id: str + :ivar replica_health_state_chunks: The list of replica health state chunks belonging to the + partition that respect the filters in the cluster health chunk query description. + :vartype replica_health_state_chunks: ~azure.servicefabric.models.ReplicaHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_health_state_chunks': {'key': 'ReplicaHealthStateChunks', 'type': 'ReplicaHealthStateChunkList'}, + } + + def __init__( + self, + *, + health_state: Optional[Union[str, "HealthState"]] = None, + partition_id: Optional[str] = None, + replica_health_state_chunks: Optional["ReplicaHealthStateChunkList"] = None, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword partition_id: The Id of the partition. + :paramtype partition_id: str + :keyword replica_health_state_chunks: The list of replica health state chunks belonging to the + partition that respect the filters in the cluster health chunk query description. + :paramtype replica_health_state_chunks: ~azure.servicefabric.models.ReplicaHealthStateChunkList + """ + super(PartitionHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.partition_id = partition_id + self.replica_health_state_chunks = replica_health_state_chunks + + +class PartitionHealthStateChunkList(msrest.serialization.Model): + """The list of partition health state chunks that respect the input filters in the chunk query description. +Returned by get cluster health state chunks query as part of the parent application hierarchy. + + :ivar items: The list of partition health state chunks that respect the input filters in the + chunk query. + :vartype items: list[~azure.servicefabric.models.PartitionHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[PartitionHealthStateChunk]'}, + } + + def __init__( + self, + *, + items: Optional[List["PartitionHealthStateChunk"]] = None, + **kwargs + ): + """ + :keyword items: The list of partition health state chunks that respect the input filters in the + chunk query. + :paramtype items: list[~azure.servicefabric.models.PartitionHealthStateChunk] + """ + super(PartitionHealthStateChunkList, self).__init__(**kwargs) + self.items = items + + +class PartitionHealthStateFilter(msrest.serialization.Model): + """Defines matching criteria to determine whether a partition should be included as a child of a service in the cluster health chunk. +The partitions are only returned if the parent entities match a filter specified in the cluster health chunk query description. The parent service and application must be included in the cluster health chunk. +One filter can match zero, one or multiple partitions, depending on its properties. + + :ivar partition_id_filter: ID of the partition that matches the filter. The filter is applied + only to the specified partition, if it exists. + If the partition doesn't exist, no partition is returned in the cluster health chunk based on + this filter. + If the partition exists, it is included in the cluster health chunk if it respects the other + filter properties. + If not specified, all partitions that match the parent filters (if any) are taken into + consideration and matched against the other filter members, like health state filter. + :vartype partition_id_filter: str + :ivar health_state_filter: The filter for the health state of the partitions. It allows + selecting partitions if they match the desired health states. + The possible values are integer value of one of the following health states. Only partitions + that match the filter are returned. All partitions are used to evaluate the cluster aggregated + health state. + If not specified, default value is None, unless the partition ID is specified. If the filter + has default value and partition ID is specified, the matching partition is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches partitions with HealthState value of OK + (2) and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :vartype health_state_filter: int + :ivar replica_filters: Defines a list of filters that specify which replicas to be included in + the returned cluster health chunk as children of the parent partition. The replicas are + returned only if the parent partition matches a filter. + If the list is empty, no replicas are returned. All the replicas are used to evaluate the + parent partition aggregated health state, regardless of the input filters. + The partition filter may specify multiple replica filters. + For example, it can specify a filter to return all replicas with health state Error and + another filter to always include a replica identified by its replica id. + :vartype replica_filters: list[~azure.servicefabric.models.ReplicaHealthStateFilter] + """ + + _attribute_map = { + 'partition_id_filter': {'key': 'PartitionIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'replica_filters': {'key': 'ReplicaFilters', 'type': '[ReplicaHealthStateFilter]'}, + } + + def __init__( + self, + *, + partition_id_filter: Optional[str] = None, + health_state_filter: Optional[int] = 0, + replica_filters: Optional[List["ReplicaHealthStateFilter"]] = None, + **kwargs + ): + """ + :keyword partition_id_filter: ID of the partition that matches the filter. The filter is + applied only to the specified partition, if it exists. + If the partition doesn't exist, no partition is returned in the cluster health chunk based on + this filter. + If the partition exists, it is included in the cluster health chunk if it respects the other + filter properties. + If not specified, all partitions that match the parent filters (if any) are taken into + consideration and matched against the other filter members, like health state filter. + :paramtype partition_id_filter: str + :keyword health_state_filter: The filter for the health state of the partitions. It allows + selecting partitions if they match the desired health states. + The possible values are integer value of one of the following health states. Only partitions + that match the filter are returned. All partitions are used to evaluate the cluster aggregated + health state. + If not specified, default value is None, unless the partition ID is specified. If the filter + has default value and partition ID is specified, the matching partition is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches partitions with HealthState value of OK + (2) and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :paramtype health_state_filter: int + :keyword replica_filters: Defines a list of filters that specify which replicas to be included + in the returned cluster health chunk as children of the parent partition. The replicas are + returned only if the parent partition matches a filter. + If the list is empty, no replicas are returned. All the replicas are used to evaluate the + parent partition aggregated health state, regardless of the input filters. + The partition filter may specify multiple replica filters. + For example, it can specify a filter to return all replicas with health state Error and + another filter to always include a replica identified by its replica id. + :paramtype replica_filters: list[~azure.servicefabric.models.ReplicaHealthStateFilter] + """ + super(PartitionHealthStateFilter, self).__init__(**kwargs) + self.partition_id_filter = partition_id_filter + self.health_state_filter = health_state_filter + self.replica_filters = replica_filters + + +class PartitionInstanceCountScaleMechanism(ScalingMechanismDescription): + """Represents a scaling mechanism for adding or removing instances of stateless service partition. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. Specifies the kind of scaling mechanism.Constant filled by server. + Possible values include: "Invalid", "PartitionInstanceCount", + "AddRemoveIncrementalNamedPartition". + :vartype kind: str or ~azure.servicefabric.models.ScalingMechanismKind + :ivar min_instance_count: Required. Minimum number of instances of the partition. + :vartype min_instance_count: int + :ivar max_instance_count: Required. Maximum number of instances of the partition. + :vartype max_instance_count: int + :ivar scale_increment: Required. The number of instances to add or remove during a scaling + operation. + :vartype scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_instance_count': {'required': True}, + 'max_instance_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'max_instance_count': {'key': 'MaxInstanceCount', 'type': 'int'}, + 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, + } + + def __init__( + self, + *, + min_instance_count: int, + max_instance_count: int, + scale_increment: int, + **kwargs + ): + """ + :keyword min_instance_count: Required. Minimum number of instances of the partition. + :paramtype min_instance_count: int + :keyword max_instance_count: Required. Maximum number of instances of the partition. + :paramtype max_instance_count: int + :keyword scale_increment: Required. The number of instances to add or remove during a scaling + operation. + :paramtype scale_increment: int + """ + super(PartitionInstanceCountScaleMechanism, self).__init__(**kwargs) + self.kind = 'PartitionInstanceCount' # type: str + self.min_instance_count = min_instance_count + self.max_instance_count = max_instance_count + self.scale_increment = scale_increment + + +class PartitionLoadInformation(msrest.serialization.Model): + """Represents load information for a partition, which contains the primary, secondary and auxiliary reported load metrics. +In case there is no load reported, PartitionLoadInformation will contain the default load for the service of the partition. +For default loads, LoadMetricReport's LastReportedUtc is set to 0. + + :ivar partition_id: Id of the partition. + :vartype partition_id: str + :ivar primary_load_metric_reports: Array of load reports from the primary replica for this + partition. + :vartype primary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] + :ivar secondary_load_metric_reports: Array of aggregated load reports from all secondary + replicas for this partition. + Array only contains the latest reported load for each metric. + :vartype secondary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] + :ivar auxiliary_load_metric_reports: Array of aggregated load reports from all auxiliary + replicas for this partition. + Array only contains the latest reported load for each metric. + :vartype auxiliary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'primary_load_metric_reports': {'key': 'PrimaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + 'secondary_load_metric_reports': {'key': 'SecondaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + 'auxiliary_load_metric_reports': {'key': 'AuxiliaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + } + + def __init__( + self, + *, + partition_id: Optional[str] = None, + primary_load_metric_reports: Optional[List["LoadMetricReport"]] = None, + secondary_load_metric_reports: Optional[List["LoadMetricReport"]] = None, + auxiliary_load_metric_reports: Optional[List["LoadMetricReport"]] = None, + **kwargs + ): + """ + :keyword partition_id: Id of the partition. + :paramtype partition_id: str + :keyword primary_load_metric_reports: Array of load reports from the primary replica for this + partition. + :paramtype primary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] + :keyword secondary_load_metric_reports: Array of aggregated load reports from all secondary + replicas for this partition. + Array only contains the latest reported load for each metric. + :paramtype secondary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] + :keyword auxiliary_load_metric_reports: Array of aggregated load reports from all auxiliary + replicas for this partition. + Array only contains the latest reported load for each metric. + :paramtype auxiliary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] + """ + super(PartitionLoadInformation, self).__init__(**kwargs) + self.partition_id = partition_id + self.primary_load_metric_reports = primary_load_metric_reports + self.secondary_load_metric_reports = secondary_load_metric_reports + self.auxiliary_load_metric_reports = auxiliary_load_metric_reports + + +class PartitionMetricLoadDescription(msrest.serialization.Model): + """Represents load information for a partition, which contains the metrics load information about primary, all secondary replicas/instances or a specific secondary replica/instance on a specific node , all auxiliary replicas or a specific auxiliary replica on a specific node. + + :ivar partition_id: Id of the partition. + :vartype partition_id: str + :ivar primary_replica_load_entries: Partition's load information for primary replica, in case + partition is from a stateful service. + :vartype primary_replica_load_entries: list[~azure.servicefabric.models.MetricLoadDescription] + :ivar secondary_replicas_or_instances_load_entries: Partition's load information for all + secondary replicas or instances. + :vartype secondary_replicas_or_instances_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :ivar secondary_replica_or_instance_load_entries_per_node: Partition's load information for a + specific secondary replica or instance located on a specific node. + :vartype secondary_replica_or_instance_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + :ivar auxiliary_replicas_load_entries: Partition's load information for all auxiliary replicas. + :vartype auxiliary_replicas_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :ivar auxiliary_replica_load_entries_per_node: Partition's load information for a specific + auxiliary replica located on a specific node. + :vartype auxiliary_replica_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'primary_replica_load_entries': {'key': 'PrimaryReplicaLoadEntries', 'type': '[MetricLoadDescription]'}, + 'secondary_replicas_or_instances_load_entries': {'key': 'SecondaryReplicasOrInstancesLoadEntries', 'type': '[MetricLoadDescription]'}, + 'secondary_replica_or_instance_load_entries_per_node': {'key': 'SecondaryReplicaOrInstanceLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, + 'auxiliary_replicas_load_entries': {'key': 'AuxiliaryReplicasLoadEntries', 'type': '[MetricLoadDescription]'}, + 'auxiliary_replica_load_entries_per_node': {'key': 'AuxiliaryReplicaLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, + } + + def __init__( + self, + *, + partition_id: Optional[str] = None, + primary_replica_load_entries: Optional[List["MetricLoadDescription"]] = None, + secondary_replicas_or_instances_load_entries: Optional[List["MetricLoadDescription"]] = None, + secondary_replica_or_instance_load_entries_per_node: Optional[List["ReplicaMetricLoadDescription"]] = None, + auxiliary_replicas_load_entries: Optional[List["MetricLoadDescription"]] = None, + auxiliary_replica_load_entries_per_node: Optional[List["ReplicaMetricLoadDescription"]] = None, + **kwargs + ): + """ + :keyword partition_id: Id of the partition. + :paramtype partition_id: str + :keyword primary_replica_load_entries: Partition's load information for primary replica, in + case partition is from a stateful service. + :paramtype primary_replica_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :keyword secondary_replicas_or_instances_load_entries: Partition's load information for all + secondary replicas or instances. + :paramtype secondary_replicas_or_instances_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :keyword secondary_replica_or_instance_load_entries_per_node: Partition's load information for + a specific secondary replica or instance located on a specific node. + :paramtype secondary_replica_or_instance_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + :keyword auxiliary_replicas_load_entries: Partition's load information for all auxiliary + replicas. + :paramtype auxiliary_replicas_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :keyword auxiliary_replica_load_entries_per_node: Partition's load information for a specific + auxiliary replica located on a specific node. + :paramtype auxiliary_replica_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + """ + super(PartitionMetricLoadDescription, self).__init__(**kwargs) + self.partition_id = partition_id + self.primary_replica_load_entries = primary_replica_load_entries + self.secondary_replicas_or_instances_load_entries = secondary_replicas_or_instances_load_entries + self.secondary_replica_or_instance_load_entries_per_node = secondary_replica_or_instance_load_entries_per_node + self.auxiliary_replicas_load_entries = auxiliary_replicas_load_entries + self.auxiliary_replica_load_entries_per_node = auxiliary_replica_load_entries_per_node + + +class PartitionNewHealthReportEvent(PartitionEvent): + """Partition Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + partition_id: str, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(PartitionNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.kind = 'PartitionNewHealthReport' # type: str + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class PartitionPrimaryMoveAnalysisEvent(PartitionAnalysisEvent): + """Partition Primary Move Analysis event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar metadata: Required. Metadata about an Analysis Event. + :vartype metadata: ~azure.servicefabric.models.AnalysisEventMetadata + :ivar when_move_completed: Required. Time when the move was completed. + :vartype when_move_completed: ~datetime.datetime + :ivar previous_node: Required. The name of a Service Fabric node. + :vartype previous_node: str + :ivar current_node: Required. The name of a Service Fabric node. + :vartype current_node: str + :ivar move_reason: Required. Move reason. + :vartype move_reason: str + :ivar relevant_traces: Required. Relevant traces. + :vartype relevant_traces: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'metadata': {'required': True}, + 'when_move_completed': {'required': True}, + 'previous_node': {'required': True}, + 'current_node': {'required': True}, + 'move_reason': {'required': True}, + 'relevant_traces': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, + 'when_move_completed': {'key': 'WhenMoveCompleted', 'type': 'iso-8601'}, + 'previous_node': {'key': 'PreviousNode', 'type': 'str'}, + 'current_node': {'key': 'CurrentNode', 'type': 'str'}, + 'move_reason': {'key': 'MoveReason', 'type': 'str'}, + 'relevant_traces': {'key': 'RelevantTraces', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + partition_id: str, + metadata: "AnalysisEventMetadata", + when_move_completed: datetime.datetime, + previous_node: str, + current_node: str, + move_reason: str, + relevant_traces: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword metadata: Required. Metadata about an Analysis Event. + :paramtype metadata: ~azure.servicefabric.models.AnalysisEventMetadata + :keyword when_move_completed: Required. Time when the move was completed. + :paramtype when_move_completed: ~datetime.datetime + :keyword previous_node: Required. The name of a Service Fabric node. + :paramtype previous_node: str + :keyword current_node: Required. The name of a Service Fabric node. + :paramtype current_node: str + :keyword move_reason: Required. Move reason. + :paramtype move_reason: str + :keyword relevant_traces: Required. Relevant traces. + :paramtype relevant_traces: str + """ + super(PartitionPrimaryMoveAnalysisEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, metadata=metadata, **kwargs) + self.kind = 'PartitionPrimaryMoveAnalysis' # type: str + self.when_move_completed = when_move_completed + self.previous_node = previous_node + self.current_node = current_node + self.move_reason = move_reason + self.relevant_traces = relevant_traces + + +class PartitionQuorumLossProgress(msrest.serialization.Model): + """Information about a partition quorum loss user-induced operation. + + :ivar state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :vartype state: str or ~azure.servicefabric.models.OperationState + :ivar invoke_quorum_loss_result: Represents information about an operation in a terminal state + (Completed or Faulted). + :vartype invoke_quorum_loss_result: ~azure.servicefabric.models.InvokeQuorumLossResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'invoke_quorum_loss_result': {'key': 'InvokeQuorumLossResult', 'type': 'InvokeQuorumLossResult'}, + } + + def __init__( + self, + *, + state: Optional[Union[str, "OperationState"]] = None, + invoke_quorum_loss_result: Optional["InvokeQuorumLossResult"] = None, + **kwargs + ): + """ + :keyword state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :paramtype state: str or ~azure.servicefabric.models.OperationState + :keyword invoke_quorum_loss_result: Represents information about an operation in a terminal + state (Completed or Faulted). + :paramtype invoke_quorum_loss_result: ~azure.servicefabric.models.InvokeQuorumLossResult + """ + super(PartitionQuorumLossProgress, self).__init__(**kwargs) + self.state = state + self.invoke_quorum_loss_result = invoke_quorum_loss_result + + +class PartitionReconfiguredEvent(PartitionEvent): + """Partition Reconfiguration event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar node_name: Required. The name of a Service Fabric node. + :vartype node_name: str + :ivar node_instance_id: Required. Id of Node instance. + :vartype node_instance_id: str + :ivar service_type: Required. Type of Service. + :vartype service_type: str + :ivar cc_epoch_data_loss_version: Required. CcEpochDataLoss version. + :vartype cc_epoch_data_loss_version: long + :ivar cc_epoch_config_version: Required. CcEpochConfig version. + :vartype cc_epoch_config_version: long + :ivar reconfig_type: Required. Type of reconfiguration. + :vartype reconfig_type: str + :ivar result: Required. Describes reconfiguration result. + :vartype result: str + :ivar phase0_duration_ms: Required. Duration of Phase0 in milli-seconds. + :vartype phase0_duration_ms: float + :ivar phase1_duration_ms: Required. Duration of Phase1 in milli-seconds. + :vartype phase1_duration_ms: float + :ivar phase2_duration_ms: Required. Duration of Phase2 in milli-seconds. + :vartype phase2_duration_ms: float + :ivar phase3_duration_ms: Required. Duration of Phase3 in milli-seconds. + :vartype phase3_duration_ms: float + :ivar phase4_duration_ms: Required. Duration of Phase4 in milli-seconds. + :vartype phase4_duration_ms: float + :ivar total_duration_ms: Required. Total duration in milli-seconds. + :vartype total_duration_ms: float + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'service_type': {'required': True}, + 'cc_epoch_data_loss_version': {'required': True}, + 'cc_epoch_config_version': {'required': True}, + 'reconfig_type': {'required': True}, + 'result': {'required': True}, + 'phase0_duration_ms': {'required': True}, + 'phase1_duration_ms': {'required': True}, + 'phase2_duration_ms': {'required': True}, + 'phase3_duration_ms': {'required': True}, + 'phase4_duration_ms': {'required': True}, + 'total_duration_ms': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + 'service_type': {'key': 'ServiceType', 'type': 'str'}, + 'cc_epoch_data_loss_version': {'key': 'CcEpochDataLossVersion', 'type': 'long'}, + 'cc_epoch_config_version': {'key': 'CcEpochConfigVersion', 'type': 'long'}, + 'reconfig_type': {'key': 'ReconfigType', 'type': 'str'}, + 'result': {'key': 'Result', 'type': 'str'}, + 'phase0_duration_ms': {'key': 'Phase0DurationMs', 'type': 'float'}, + 'phase1_duration_ms': {'key': 'Phase1DurationMs', 'type': 'float'}, + 'phase2_duration_ms': {'key': 'Phase2DurationMs', 'type': 'float'}, + 'phase3_duration_ms': {'key': 'Phase3DurationMs', 'type': 'float'}, + 'phase4_duration_ms': {'key': 'Phase4DurationMs', 'type': 'float'}, + 'total_duration_ms': {'key': 'TotalDurationMs', 'type': 'float'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + partition_id: str, + node_name: str, + node_instance_id: str, + service_type: str, + cc_epoch_data_loss_version: int, + cc_epoch_config_version: int, + reconfig_type: str, + result: str, + phase0_duration_ms: float, + phase1_duration_ms: float, + phase2_duration_ms: float, + phase3_duration_ms: float, + phase4_duration_ms: float, + total_duration_ms: float, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword node_name: Required. The name of a Service Fabric node. + :paramtype node_name: str + :keyword node_instance_id: Required. Id of Node instance. + :paramtype node_instance_id: str + :keyword service_type: Required. Type of Service. + :paramtype service_type: str + :keyword cc_epoch_data_loss_version: Required. CcEpochDataLoss version. + :paramtype cc_epoch_data_loss_version: long + :keyword cc_epoch_config_version: Required. CcEpochConfig version. + :paramtype cc_epoch_config_version: long + :keyword reconfig_type: Required. Type of reconfiguration. + :paramtype reconfig_type: str + :keyword result: Required. Describes reconfiguration result. + :paramtype result: str + :keyword phase0_duration_ms: Required. Duration of Phase0 in milli-seconds. + :paramtype phase0_duration_ms: float + :keyword phase1_duration_ms: Required. Duration of Phase1 in milli-seconds. + :paramtype phase1_duration_ms: float + :keyword phase2_duration_ms: Required. Duration of Phase2 in milli-seconds. + :paramtype phase2_duration_ms: float + :keyword phase3_duration_ms: Required. Duration of Phase3 in milli-seconds. + :paramtype phase3_duration_ms: float + :keyword phase4_duration_ms: Required. Duration of Phase4 in milli-seconds. + :paramtype phase4_duration_ms: float + :keyword total_duration_ms: Required. Total duration in milli-seconds. + :paramtype total_duration_ms: float + """ + super(PartitionReconfiguredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.kind = 'PartitionReconfigured' # type: str + self.node_name = node_name + self.node_instance_id = node_instance_id + self.service_type = service_type + self.cc_epoch_data_loss_version = cc_epoch_data_loss_version + self.cc_epoch_config_version = cc_epoch_config_version + self.reconfig_type = reconfig_type + self.result = result + self.phase0_duration_ms = phase0_duration_ms + self.phase1_duration_ms = phase1_duration_ms + self.phase2_duration_ms = phase2_duration_ms + self.phase3_duration_ms = phase3_duration_ms + self.phase4_duration_ms = phase4_duration_ms + self.total_duration_ms = total_duration_ms + + +class PartitionRestartProgress(msrest.serialization.Model): + """Information about a partition restart user-induced operation. + + :ivar state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :vartype state: str or ~azure.servicefabric.models.OperationState + :ivar restart_partition_result: Represents information about an operation in a terminal state + (Completed or Faulted). + :vartype restart_partition_result: ~azure.servicefabric.models.RestartPartitionResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'restart_partition_result': {'key': 'RestartPartitionResult', 'type': 'RestartPartitionResult'}, + } + + def __init__( + self, + *, + state: Optional[Union[str, "OperationState"]] = None, + restart_partition_result: Optional["RestartPartitionResult"] = None, + **kwargs + ): + """ + :keyword state: The state of the operation. Possible values include: "Invalid", "Running", + "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". + :paramtype state: str or ~azure.servicefabric.models.OperationState + :keyword restart_partition_result: Represents information about an operation in a terminal + state (Completed or Faulted). + :paramtype restart_partition_result: ~azure.servicefabric.models.RestartPartitionResult + """ + super(PartitionRestartProgress, self).__init__(**kwargs) + self.state = state + self.restart_partition_result = restart_partition_result + + +class PartitionsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for the partitions of a service, containing health evaluations for each unhealthy partition that impacts current aggregated health state. Can be returned when evaluating service health and the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar max_percent_unhealthy_partitions_per_service: Maximum allowed percentage of unhealthy + partitions per service from the ServiceTypeHealthPolicy. + :vartype max_percent_unhealthy_partitions_per_service: int + :ivar total_count: Total number of partitions of the service from the health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy PartitionHealthEvaluation that impacted the aggregated + health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + max_percent_unhealthy_partitions_per_service: Optional[int] = None, + total_count: Optional[int] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword max_percent_unhealthy_partitions_per_service: Maximum allowed percentage of unhealthy + partitions per service from the ServiceTypeHealthPolicy. + :paramtype max_percent_unhealthy_partitions_per_service: int + :keyword total_count: Total number of partitions of the service from the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy PartitionHealthEvaluation that impacted the aggregated + health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(PartitionsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'Partitions' # type: str + self.max_percent_unhealthy_partitions_per_service = max_percent_unhealthy_partitions_per_service + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + + +class ReplicatorStatus(msrest.serialization.Model): + """Represents a base class for primary or secondary replicator status. +Contains information about the service fabric replicator like the replication/copy queue utilization, last acknowledgement received timestamp, etc. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PrimaryReplicatorStatus, SecondaryReplicatorStatus. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. + Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", + "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". + :vartype kind: str or ~azure.servicefabric.models.ReplicaRole + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Primary': 'PrimaryReplicatorStatus', 'SecondaryReplicatorStatus': 'SecondaryReplicatorStatus'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ReplicatorStatus, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + + +class PrimaryReplicatorStatus(ReplicatorStatus): + """Provides statistics about the Service Fabric Replicator, when it is functioning in a Primary role. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. + Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", + "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". + :vartype kind: str or ~azure.servicefabric.models.ReplicaRole + :ivar replication_queue_status: Details about the replication queue on the primary replicator. + :vartype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :ivar remote_replicators: The status of all the active and idle secondary replicators that the + primary is aware of. + :vartype remote_replicators: list[~azure.servicefabric.models.RemoteReplicatorStatus] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'remote_replicators': {'key': 'RemoteReplicators', 'type': '[RemoteReplicatorStatus]'}, + } + + def __init__( + self, + *, + replication_queue_status: Optional["ReplicatorQueueStatus"] = None, + remote_replicators: Optional[List["RemoteReplicatorStatus"]] = None, + **kwargs + ): + """ + :keyword replication_queue_status: Details about the replication queue on the primary + replicator. + :paramtype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :keyword remote_replicators: The status of all the active and idle secondary replicators that + the primary is aware of. + :paramtype remote_replicators: list[~azure.servicefabric.models.RemoteReplicatorStatus] + """ + super(PrimaryReplicatorStatus, self).__init__(**kwargs) + self.kind = 'Primary' # type: str + self.replication_queue_status = replication_queue_status + self.remote_replicators = remote_replicators + + +class Probe(msrest.serialization.Model): + """Probes have a number of fields that you can use to control their behavior. + + :ivar initial_delay_seconds: The initial delay in seconds to start executing probe once + codepackage has started. + :vartype initial_delay_seconds: int + :ivar period_seconds: Periodic seconds to execute probe. + :vartype period_seconds: int + :ivar timeout_seconds: Period after which probe is considered as failed if it hasn't completed + successfully. + :vartype timeout_seconds: int + :ivar success_threshold: The count of successful probe executions after which probe is + considered success. + :vartype success_threshold: int + :ivar failure_threshold: The count of failures after which probe is considered failed. + :vartype failure_threshold: int + :ivar exec_property: Exec command to run inside the container. + :vartype exec_property: ~azure.servicefabric.models.ProbeExec + :ivar http_get: Http probe for the container. + :vartype http_get: ~azure.servicefabric.models.ProbeHttpGet + :ivar tcp_socket: Tcp port to probe inside the container. + :vartype tcp_socket: ~azure.servicefabric.models.ProbeTcpSocket + """ + + _attribute_map = { + 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, + 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, + 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, + 'exec_property': {'key': 'exec', 'type': 'ProbeExec'}, + 'http_get': {'key': 'httpGet', 'type': 'ProbeHttpGet'}, + 'tcp_socket': {'key': 'tcpSocket', 'type': 'ProbeTcpSocket'}, + } + + def __init__( + self, + *, + initial_delay_seconds: Optional[int] = 0, + period_seconds: Optional[int] = 10, + timeout_seconds: Optional[int] = 1, + success_threshold: Optional[int] = 1, + failure_threshold: Optional[int] = 3, + exec_property: Optional["ProbeExec"] = None, + http_get: Optional["ProbeHttpGet"] = None, + tcp_socket: Optional["ProbeTcpSocket"] = None, + **kwargs + ): + """ + :keyword initial_delay_seconds: The initial delay in seconds to start executing probe once + codepackage has started. + :paramtype initial_delay_seconds: int + :keyword period_seconds: Periodic seconds to execute probe. + :paramtype period_seconds: int + :keyword timeout_seconds: Period after which probe is considered as failed if it hasn't + completed successfully. + :paramtype timeout_seconds: int + :keyword success_threshold: The count of successful probe executions after which probe is + considered success. + :paramtype success_threshold: int + :keyword failure_threshold: The count of failures after which probe is considered failed. + :paramtype failure_threshold: int + :keyword exec_property: Exec command to run inside the container. + :paramtype exec_property: ~azure.servicefabric.models.ProbeExec + :keyword http_get: Http probe for the container. + :paramtype http_get: ~azure.servicefabric.models.ProbeHttpGet + :keyword tcp_socket: Tcp port to probe inside the container. + :paramtype tcp_socket: ~azure.servicefabric.models.ProbeTcpSocket + """ + super(Probe, self).__init__(**kwargs) + self.initial_delay_seconds = initial_delay_seconds + self.period_seconds = period_seconds + self.timeout_seconds = timeout_seconds + self.success_threshold = success_threshold + self.failure_threshold = failure_threshold + self.exec_property = exec_property + self.http_get = http_get + self.tcp_socket = tcp_socket + + +class ProbeExec(msrest.serialization.Model): + """Exec command to run inside the container. + + All required parameters must be populated in order to send to Azure. + + :ivar command: Required. Comma separated command to run inside the container for example "sh, + -c, echo hello world". + :vartype command: str + """ + + _validation = { + 'command': {'required': True}, + } + + _attribute_map = { + 'command': {'key': 'command', 'type': 'str'}, + } + + def __init__( + self, + *, + command: str, + **kwargs + ): + """ + :keyword command: Required. Comma separated command to run inside the container for example + "sh, -c, echo hello world". + :paramtype command: str + """ + super(ProbeExec, self).__init__(**kwargs) + self.command = command + + +class ProbeHttpGet(msrest.serialization.Model): + """Http probe for the container. + + All required parameters must be populated in order to send to Azure. + + :ivar port: Required. Port to access for probe. + :vartype port: int + :ivar path: Path to access on the HTTP request. + :vartype path: str + :ivar host: Host IP to connect to. + :vartype host: str + :ivar http_headers: Headers to set in the request. + :vartype http_headers: list[~azure.servicefabric.models.ProbeHttpGetHeaders] + :ivar scheme: Scheme for the http probe. Can be Http or Https. Possible values include: "http", + "https". + :vartype scheme: str or ~azure.servicefabric.models.Scheme + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + 'path': {'key': 'path', 'type': 'str'}, + 'host': {'key': 'host', 'type': 'str'}, + 'http_headers': {'key': 'httpHeaders', 'type': '[ProbeHttpGetHeaders]'}, + 'scheme': {'key': 'scheme', 'type': 'str'}, + } + + def __init__( + self, + *, + port: int, + path: Optional[str] = None, + host: Optional[str] = None, + http_headers: Optional[List["ProbeHttpGetHeaders"]] = None, + scheme: Optional[Union[str, "Scheme"]] = None, + **kwargs + ): + """ + :keyword port: Required. Port to access for probe. + :paramtype port: int + :keyword path: Path to access on the HTTP request. + :paramtype path: str + :keyword host: Host IP to connect to. + :paramtype host: str + :keyword http_headers: Headers to set in the request. + :paramtype http_headers: list[~azure.servicefabric.models.ProbeHttpGetHeaders] + :keyword scheme: Scheme for the http probe. Can be Http or Https. Possible values include: + "http", "https". + :paramtype scheme: str or ~azure.servicefabric.models.Scheme + """ + super(ProbeHttpGet, self).__init__(**kwargs) + self.port = port + self.path = path + self.host = host + self.http_headers = http_headers + self.scheme = scheme + + +class ProbeHttpGetHeaders(msrest.serialization.Model): + """Http headers. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the header. + :vartype name: str + :ivar value: Required. The value of the header. + :vartype 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 + ): + """ + :keyword name: Required. The name of the header. + :paramtype name: str + :keyword value: Required. The value of the header. + :paramtype value: str + """ + super(ProbeHttpGetHeaders, self).__init__(**kwargs) + self.name = name + self.value = value + + +class ProbeTcpSocket(msrest.serialization.Model): + """Tcp port to probe inside the container. + + All required parameters must be populated in order to send to Azure. + + :ivar port: Required. Port to access for probe. + :vartype port: int + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + *, + port: int, + **kwargs + ): + """ + :keyword port: Required. Port to access for probe. + :paramtype port: int + """ + super(ProbeTcpSocket, self).__init__(**kwargs) + self.port = port + + +class PropertyBatchDescriptionList(msrest.serialization.Model): + """Describes a list of property batch operations to be executed. Either all or none of the operations will be committed. + + :ivar operations: A list of the property batch operations to be executed. + :vartype operations: list[~azure.servicefabric.models.PropertyBatchOperation] + """ + + _attribute_map = { + 'operations': {'key': 'Operations', 'type': '[PropertyBatchOperation]'}, + } + + def __init__( + self, + *, + operations: Optional[List["PropertyBatchOperation"]] = None, + **kwargs + ): + """ + :keyword operations: A list of the property batch operations to be executed. + :paramtype operations: list[~azure.servicefabric.models.PropertyBatchOperation] + """ + super(PropertyBatchDescriptionList, self).__init__(**kwargs) + self.operations = operations + + +class PropertyDescription(msrest.serialization.Model): + """Description of a Service Fabric property. + + All required parameters must be populated in order to send to Azure. + + :ivar property_name: Required. The name of the Service Fabric property. + :vartype property_name: str + :ivar 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. + :vartype custom_type_id: str + :ivar value: Required. Describes a Service Fabric property value. + :vartype value: ~azure.servicefabric.models.PropertyValue + """ + + _validation = { + 'property_name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + } + + def __init__( + self, + *, + property_name: str, + value: "PropertyValue", + custom_type_id: Optional[str] = None, + **kwargs + ): + """ + :keyword property_name: Required. The name of the Service Fabric property. + :paramtype property_name: str + :keyword 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. + :paramtype custom_type_id: str + :keyword value: Required. Describes a Service Fabric property value. + :paramtype value: ~azure.servicefabric.models.PropertyValue + """ + super(PropertyDescription, self).__init__(**kwargs) + self.property_name = property_name + self.custom_type_id = custom_type_id + self.value = value + + +class PropertyInfo(msrest.serialization.Model): + """Information about a Service Fabric property. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the Service Fabric property. + :vartype name: str + :ivar value: Describes a Service Fabric property value. + :vartype value: ~azure.servicefabric.models.PropertyValue + :ivar metadata: Required. The metadata associated with a property, including the property's + name. + :vartype metadata: ~azure.servicefabric.models.PropertyMetadata + """ + + _validation = { + 'name': {'required': True}, + 'metadata': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + 'metadata': {'key': 'Metadata', 'type': 'PropertyMetadata'}, + } + + def __init__( + self, + *, + name: str, + metadata: "PropertyMetadata", + value: Optional["PropertyValue"] = None, + **kwargs + ): + """ + :keyword name: Required. The name of the Service Fabric property. + :paramtype name: str + :keyword value: Describes a Service Fabric property value. + :paramtype value: ~azure.servicefabric.models.PropertyValue + :keyword metadata: Required. The metadata associated with a property, including the property's + name. + :paramtype metadata: ~azure.servicefabric.models.PropertyMetadata + """ + super(PropertyInfo, self).__init__(**kwargs) + self.name = name + self.value = value + self.metadata = metadata + + +class PropertyMetadata(msrest.serialization.Model): + """The metadata associated with a property, including the property's name. + + :ivar type_id: The kind of property, determined by the type of data. Following are the possible + values. Possible values include: "Invalid", "Binary", "Int64", "Double", "String", "Guid". + :vartype type_id: str or ~azure.servicefabric.models.PropertyValueKind + :ivar custom_type_id: The property's custom type ID. + :vartype custom_type_id: str + :ivar parent: The name of the parent Service Fabric Name for the property. It could be thought + of as the name-space/table under which the property exists. + :vartype parent: str + :ivar size_in_bytes: The length of the serialized property value. + :vartype size_in_bytes: int + :ivar last_modified_utc_timestamp: Represents when the Property was last modified. Only write + operations will cause this field to be updated. + :vartype last_modified_utc_timestamp: ~datetime.datetime + :ivar sequence_number: The version of the property. Every time a property is modified, its + sequence number is increased. + :vartype sequence_number: str + """ + + _attribute_map = { + 'type_id': {'key': 'TypeId', 'type': 'str'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + 'parent': {'key': 'Parent', 'type': 'str'}, + 'size_in_bytes': {'key': 'SizeInBytes', 'type': 'int'}, + 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + } + + def __init__( + self, + *, + type_id: Optional[Union[str, "PropertyValueKind"]] = None, + custom_type_id: Optional[str] = None, + parent: Optional[str] = None, + size_in_bytes: Optional[int] = None, + last_modified_utc_timestamp: Optional[datetime.datetime] = None, + sequence_number: Optional[str] = None, + **kwargs + ): + """ + :keyword type_id: The kind of property, determined by the type of data. Following are the + possible values. Possible values include: "Invalid", "Binary", "Int64", "Double", "String", + "Guid". + :paramtype type_id: str or ~azure.servicefabric.models.PropertyValueKind + :keyword custom_type_id: The property's custom type ID. + :paramtype custom_type_id: str + :keyword parent: The name of the parent Service Fabric Name for the property. It could be + thought of as the name-space/table under which the property exists. + :paramtype parent: str + :keyword size_in_bytes: The length of the serialized property value. + :paramtype size_in_bytes: int + :keyword last_modified_utc_timestamp: Represents when the Property was last modified. Only + write operations will cause this field to be updated. + :paramtype last_modified_utc_timestamp: ~datetime.datetime + :keyword sequence_number: The version of the property. Every time a property is modified, its + sequence number is increased. + :paramtype sequence_number: str + """ + super(PropertyMetadata, self).__init__(**kwargs) + self.type_id = type_id + self.custom_type_id = custom_type_id + self.parent = parent + self.size_in_bytes = size_in_bytes + self.last_modified_utc_timestamp = last_modified_utc_timestamp + self.sequence_number = sequence_number + + +class ProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): + """Describes the operation to register or provision an application type using an application package uploaded to the Service Fabric image store. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of application type registration or provision requested. The + application package can be registered or provisioned either from the image store or from an + external store. Following are the kinds of the application type provision.Constant filled by + server. Possible values include: "Invalid", "ImageStorePath", "ExternalStore". + :vartype kind: str or ~azure.servicefabric.models.ProvisionApplicationTypeKind + :ivar async_property: Required. Indicates whether or not provisioning should occur + asynchronously. When set to true, the provision operation returns when the request is accepted + by the system, and the provision operation continues without any timeout limit. The default + value is false. For large application packages, we recommend setting the value to true. + :vartype async_property: bool + :ivar application_type_build_path: Required. The relative path for the application package in + the image store specified during the prior upload operation. + :vartype application_type_build_path: str + :ivar application_package_cleanup_policy: The kind of action that needs to be taken for + cleaning up the application package after successful provision. Possible values include: + "Invalid", "Default", "Automatic", "Manual". + :vartype application_package_cleanup_policy: str or + ~azure.servicefabric.models.ApplicationPackageCleanupPolicy + """ + + _validation = { + 'kind': {'required': True}, + 'async_property': {'required': True}, + 'application_type_build_path': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'async_property': {'key': 'Async', 'type': 'bool'}, + 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, + 'application_package_cleanup_policy': {'key': 'ApplicationPackageCleanupPolicy', 'type': 'str'}, + } + + def __init__( + self, + *, + async_property: bool, + application_type_build_path: str, + application_package_cleanup_policy: Optional[Union[str, "ApplicationPackageCleanupPolicy"]] = None, + **kwargs + ): + """ + :keyword async_property: Required. Indicates whether or not provisioning should occur + asynchronously. When set to true, the provision operation returns when the request is accepted + by the system, and the provision operation continues without any timeout limit. The default + value is false. For large application packages, we recommend setting the value to true. + :paramtype async_property: bool + :keyword application_type_build_path: Required. The relative path for the application package + in the image store specified during the prior upload operation. + :paramtype application_type_build_path: str + :keyword application_package_cleanup_policy: The kind of action that needs to be taken for + cleaning up the application package after successful provision. Possible values include: + "Invalid", "Default", "Automatic", "Manual". + :paramtype application_package_cleanup_policy: str or + ~azure.servicefabric.models.ApplicationPackageCleanupPolicy + """ + super(ProvisionApplicationTypeDescription, self).__init__(async_property=async_property, **kwargs) + self.kind = 'ImageStorePath' # type: str + self.application_type_build_path = application_type_build_path + self.application_package_cleanup_policy = application_package_cleanup_policy + + +class ProvisionFabricDescription(msrest.serialization.Model): + """Describes the parameters for provisioning a cluster. + + :ivar code_file_path: The cluster code package file path. + :vartype code_file_path: str + :ivar cluster_manifest_file_path: The cluster manifest file path. + :vartype cluster_manifest_file_path: str + """ + + _attribute_map = { + 'code_file_path': {'key': 'CodeFilePath', 'type': 'str'}, + 'cluster_manifest_file_path': {'key': 'ClusterManifestFilePath', 'type': 'str'}, + } + + def __init__( + self, + *, + code_file_path: Optional[str] = None, + cluster_manifest_file_path: Optional[str] = None, + **kwargs + ): + """ + :keyword code_file_path: The cluster code package file path. + :paramtype code_file_path: str + :keyword cluster_manifest_file_path: The cluster manifest file path. + :paramtype cluster_manifest_file_path: str + """ + super(ProvisionFabricDescription, self).__init__(**kwargs) + self.code_file_path = code_file_path + self.cluster_manifest_file_path = cluster_manifest_file_path + + +class PutPropertyBatchOperation(PropertyBatchOperation): + """Puts the specified property under the specified name. +Note that if one PropertyBatchOperation in a PropertyBatch fails, +the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch operation, determined by the operation to be + performed. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind + :ivar property_name: Required. The name of the Service Fabric property. + :vartype property_name: str + :ivar value: Required. Describes a Service Fabric property value. + :vartype value: ~azure.servicefabric.models.PropertyValue + :ivar 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. + :vartype custom_type_id: str + """ + + _validation = { + 'kind': {'required': True}, + 'property_name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + } + + def __init__( + self, + *, + property_name: str, + value: "PropertyValue", + custom_type_id: Optional[str] = None, + **kwargs + ): + """ + :keyword property_name: Required. The name of the Service Fabric property. + :paramtype property_name: str + :keyword value: Required. Describes a Service Fabric property value. + :paramtype value: ~azure.servicefabric.models.PropertyValue + :keyword 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. + :paramtype custom_type_id: str + """ + super(PutPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.kind = 'Put' # type: str + self.value = value + self.custom_type_id = custom_type_id + + +class ReconfigurationInformation(msrest.serialization.Model): + """Information about current reconfiguration like phase, type, previous configuration role of replica and reconfiguration start date time. + + :ivar previous_configuration_role: Replica role before reconfiguration started. Possible values + include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", + "ActiveAuxiliary", "PrimaryAuxiliary". + :vartype previous_configuration_role: str or ~azure.servicefabric.models.ReplicaRole + :ivar reconfiguration_phase: Current phase of ongoing reconfiguration. If no reconfiguration is + taking place then this value will be "None". Possible values include: "Unknown", "None", + "Phase0", "Phase1", "Phase2", "Phase3", "Phase4", "AbortPhaseZero". + :vartype reconfiguration_phase: str or ~azure.servicefabric.models.ReconfigurationPhase + :ivar reconfiguration_type: Type of current ongoing reconfiguration. If no reconfiguration is + taking place then this value will be "None". Possible values include: "Unknown", "SwapPrimary", + "Failover", "Other". + :vartype reconfiguration_type: str or ~azure.servicefabric.models.ReconfigurationType + :ivar reconfiguration_start_time_utc: Start time (in UTC) of the ongoing reconfiguration. If no + reconfiguration is taking place then this value will be zero date-time. + :vartype reconfiguration_start_time_utc: ~datetime.datetime + """ + + _attribute_map = { + 'previous_configuration_role': {'key': 'PreviousConfigurationRole', 'type': 'str'}, + 'reconfiguration_phase': {'key': 'ReconfigurationPhase', 'type': 'str'}, + 'reconfiguration_type': {'key': 'ReconfigurationType', 'type': 'str'}, + 'reconfiguration_start_time_utc': {'key': 'ReconfigurationStartTimeUtc', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + previous_configuration_role: Optional[Union[str, "ReplicaRole"]] = None, + reconfiguration_phase: Optional[Union[str, "ReconfigurationPhase"]] = None, + reconfiguration_type: Optional[Union[str, "ReconfigurationType"]] = None, + reconfiguration_start_time_utc: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword previous_configuration_role: Replica role before reconfiguration started. Possible + values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", + "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". + :paramtype previous_configuration_role: str or ~azure.servicefabric.models.ReplicaRole + :keyword reconfiguration_phase: Current phase of ongoing reconfiguration. If no reconfiguration + is taking place then this value will be "None". Possible values include: "Unknown", "None", + "Phase0", "Phase1", "Phase2", "Phase3", "Phase4", "AbortPhaseZero". + :paramtype reconfiguration_phase: str or ~azure.servicefabric.models.ReconfigurationPhase + :keyword reconfiguration_type: Type of current ongoing reconfiguration. If no reconfiguration + is taking place then this value will be "None". Possible values include: "Unknown", + "SwapPrimary", "Failover", "Other". + :paramtype reconfiguration_type: str or ~azure.servicefabric.models.ReconfigurationType + :keyword reconfiguration_start_time_utc: Start time (in UTC) of the ongoing reconfiguration. If + no reconfiguration is taking place then this value will be zero date-time. + :paramtype reconfiguration_start_time_utc: ~datetime.datetime + """ + super(ReconfigurationInformation, self).__init__(**kwargs) + self.previous_configuration_role = previous_configuration_role + self.reconfiguration_phase = reconfiguration_phase + self.reconfiguration_type = reconfiguration_type + self.reconfiguration_start_time_utc = reconfiguration_start_time_utc + + +class RegistryCredential(msrest.serialization.Model): + """Credential information to connect to container registry. + + :ivar registry_user_name: The user name to connect to container registry. + :vartype registry_user_name: str + :ivar registry_password: The password for supplied username to connect to container registry. + :vartype registry_password: str + :ivar password_encrypted: Indicates that supplied container registry password is encrypted. + :vartype password_encrypted: bool + """ + + _attribute_map = { + 'registry_user_name': {'key': 'RegistryUserName', 'type': 'str'}, + 'registry_password': {'key': 'RegistryPassword', 'type': 'str'}, + 'password_encrypted': {'key': 'PasswordEncrypted', 'type': 'bool'}, + } + + def __init__( + self, + *, + registry_user_name: Optional[str] = None, + registry_password: Optional[str] = None, + password_encrypted: Optional[bool] = None, + **kwargs + ): + """ + :keyword registry_user_name: The user name to connect to container registry. + :paramtype registry_user_name: str + :keyword registry_password: The password for supplied username to connect to container + registry. + :paramtype registry_password: str + :keyword password_encrypted: Indicates that supplied container registry password is encrypted. + :paramtype password_encrypted: bool + """ + super(RegistryCredential, self).__init__(**kwargs) + self.registry_user_name = registry_user_name + self.registry_password = registry_password + self.password_encrypted = password_encrypted + + +class ReliableCollectionsRef(msrest.serialization.Model): + """Specifying this parameter adds support for reliable collections. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of ReliableCollection resource. Right now it's not used and you can + use any string. + :vartype name: str + :ivar do_not_persist_state: False (the default) if ReliableCollections state is persisted to + disk as usual. True if you do not want to persist state, in which case replication is still + enabled and you can use ReliableCollections as distributed cache. + :vartype do_not_persist_state: bool + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'do_not_persist_state': {'key': 'doNotPersistState', 'type': 'bool'}, + } + + def __init__( + self, + *, + name: str, + do_not_persist_state: Optional[bool] = None, + **kwargs + ): + """ + :keyword name: Required. Name of ReliableCollection resource. Right now it's not used and you + can use any string. + :paramtype name: str + :keyword do_not_persist_state: False (the default) if ReliableCollections state is persisted to + disk as usual. True if you do not want to persist state, in which case replication is still + enabled and you can use ReliableCollections as distributed cache. + :paramtype do_not_persist_state: bool + """ + super(ReliableCollectionsRef, self).__init__(**kwargs) + self.name = name + self.do_not_persist_state = do_not_persist_state + + +class RemoteReplicatorAcknowledgementDetail(msrest.serialization.Model): + """Provides various statistics of the acknowledgements that are being received from the remote replicator. + + :ivar average_receive_duration: Represents the average duration it takes for the remote + replicator to receive an operation. + :vartype average_receive_duration: str + :ivar average_apply_duration: Represents the average duration it takes for the remote + replicator to apply an operation. This usually entails writing the operation to disk. + :vartype average_apply_duration: str + :ivar not_received_count: Represents the number of operations not yet received by a remote + replicator. + :vartype not_received_count: str + :ivar received_and_not_applied_count: Represents the number of operations received and not yet + applied by a remote replicator. + :vartype received_and_not_applied_count: str + """ + + _attribute_map = { + 'average_receive_duration': {'key': 'AverageReceiveDuration', 'type': 'str'}, + 'average_apply_duration': {'key': 'AverageApplyDuration', 'type': 'str'}, + 'not_received_count': {'key': 'NotReceivedCount', 'type': 'str'}, + 'received_and_not_applied_count': {'key': 'ReceivedAndNotAppliedCount', 'type': 'str'}, + } + + def __init__( + self, + *, + average_receive_duration: Optional[str] = None, + average_apply_duration: Optional[str] = None, + not_received_count: Optional[str] = None, + received_and_not_applied_count: Optional[str] = None, + **kwargs + ): + """ + :keyword average_receive_duration: Represents the average duration it takes for the remote + replicator to receive an operation. + :paramtype average_receive_duration: str + :keyword average_apply_duration: Represents the average duration it takes for the remote + replicator to apply an operation. This usually entails writing the operation to disk. + :paramtype average_apply_duration: str + :keyword not_received_count: Represents the number of operations not yet received by a remote + replicator. + :paramtype not_received_count: str + :keyword received_and_not_applied_count: Represents the number of operations received and not + yet applied by a remote replicator. + :paramtype received_and_not_applied_count: str + """ + super(RemoteReplicatorAcknowledgementDetail, self).__init__(**kwargs) + self.average_receive_duration = average_receive_duration + self.average_apply_duration = average_apply_duration + self.not_received_count = not_received_count + self.received_and_not_applied_count = received_and_not_applied_count + + +class RemoteReplicatorAcknowledgementStatus(msrest.serialization.Model): + """Provides details about the remote replicators from the primary replicator's point of view. + + :ivar replication_stream_acknowledgement_detail: Details about the acknowledgements for + operations that are part of the replication stream data. + :vartype replication_stream_acknowledgement_detail: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail + :ivar copy_stream_acknowledgement_detail: Details about the acknowledgements for operations + that are part of the copy stream data. + :vartype copy_stream_acknowledgement_detail: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail + """ + + _attribute_map = { + 'replication_stream_acknowledgement_detail': {'key': 'ReplicationStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, + 'copy_stream_acknowledgement_detail': {'key': 'CopyStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, + } + + def __init__( + self, + *, + replication_stream_acknowledgement_detail: Optional["RemoteReplicatorAcknowledgementDetail"] = None, + copy_stream_acknowledgement_detail: Optional["RemoteReplicatorAcknowledgementDetail"] = None, + **kwargs + ): + """ + :keyword replication_stream_acknowledgement_detail: Details about the acknowledgements for + operations that are part of the replication stream data. + :paramtype replication_stream_acknowledgement_detail: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail + :keyword copy_stream_acknowledgement_detail: Details about the acknowledgements for operations + that are part of the copy stream data. + :paramtype copy_stream_acknowledgement_detail: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail + """ + super(RemoteReplicatorAcknowledgementStatus, self).__init__(**kwargs) + self.replication_stream_acknowledgement_detail = replication_stream_acknowledgement_detail + self.copy_stream_acknowledgement_detail = copy_stream_acknowledgement_detail + + +class RemoteReplicatorStatus(msrest.serialization.Model): + """Represents the state of the secondary replicator from the primary replicator’s point of view. + + :ivar replica_id: Represents the replica ID of the remote secondary replicator. + :vartype replica_id: str + :ivar last_acknowledgement_processed_time_utc: The last timestamp (in UTC) when an + acknowledgement from the secondary replicator was processed on the primary. + UTC 0 represents an invalid value, indicating that no acknowledgement messages were ever + processed. + :vartype last_acknowledgement_processed_time_utc: ~datetime.datetime + :ivar last_received_replication_sequence_number: The highest replication operation sequence + number that the secondary has received from the primary. + :vartype last_received_replication_sequence_number: str + :ivar last_applied_replication_sequence_number: The highest replication operation sequence + number that the secondary has applied to its state. + :vartype last_applied_replication_sequence_number: str + :ivar is_in_build: A value that indicates whether the secondary replica is in the process of + being built. + :vartype is_in_build: bool + :ivar last_received_copy_sequence_number: The highest copy operation sequence number that the + secondary has received from the primary. + A value of -1 implies that the secondary has received all copy operations. + :vartype last_received_copy_sequence_number: str + :ivar last_applied_copy_sequence_number: The highest copy operation sequence number that the + secondary has applied to its state. + A value of -1 implies that the secondary has applied all copy operations and the copy process + is complete. + :vartype last_applied_copy_sequence_number: str + :ivar remote_replicator_acknowledgement_status: Represents the acknowledgment status for the + remote secondary replicator. + :vartype remote_replicator_acknowledgement_status: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementStatus + """ + + _attribute_map = { + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'last_acknowledgement_processed_time_utc': {'key': 'LastAcknowledgementProcessedTimeUtc', 'type': 'iso-8601'}, + 'last_received_replication_sequence_number': {'key': 'LastReceivedReplicationSequenceNumber', 'type': 'str'}, + 'last_applied_replication_sequence_number': {'key': 'LastAppliedReplicationSequenceNumber', 'type': 'str'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'last_received_copy_sequence_number': {'key': 'LastReceivedCopySequenceNumber', 'type': 'str'}, + 'last_applied_copy_sequence_number': {'key': 'LastAppliedCopySequenceNumber', 'type': 'str'}, + 'remote_replicator_acknowledgement_status': {'key': 'RemoteReplicatorAcknowledgementStatus', 'type': 'RemoteReplicatorAcknowledgementStatus'}, + } + + def __init__( + self, + *, + replica_id: Optional[str] = None, + last_acknowledgement_processed_time_utc: Optional[datetime.datetime] = None, + last_received_replication_sequence_number: Optional[str] = None, + last_applied_replication_sequence_number: Optional[str] = None, + is_in_build: Optional[bool] = None, + last_received_copy_sequence_number: Optional[str] = None, + last_applied_copy_sequence_number: Optional[str] = None, + remote_replicator_acknowledgement_status: Optional["RemoteReplicatorAcknowledgementStatus"] = None, + **kwargs + ): + """ + :keyword replica_id: Represents the replica ID of the remote secondary replicator. + :paramtype replica_id: str + :keyword last_acknowledgement_processed_time_utc: The last timestamp (in UTC) when an + acknowledgement from the secondary replicator was processed on the primary. + UTC 0 represents an invalid value, indicating that no acknowledgement messages were ever + processed. + :paramtype last_acknowledgement_processed_time_utc: ~datetime.datetime + :keyword last_received_replication_sequence_number: The highest replication operation sequence + number that the secondary has received from the primary. + :paramtype last_received_replication_sequence_number: str + :keyword last_applied_replication_sequence_number: The highest replication operation sequence + number that the secondary has applied to its state. + :paramtype last_applied_replication_sequence_number: str + :keyword is_in_build: A value that indicates whether the secondary replica is in the process of + being built. + :paramtype is_in_build: bool + :keyword last_received_copy_sequence_number: The highest copy operation sequence number that + the secondary has received from the primary. + A value of -1 implies that the secondary has received all copy operations. + :paramtype last_received_copy_sequence_number: str + :keyword last_applied_copy_sequence_number: The highest copy operation sequence number that the + secondary has applied to its state. + A value of -1 implies that the secondary has applied all copy operations and the copy process + is complete. + :paramtype last_applied_copy_sequence_number: str + :keyword remote_replicator_acknowledgement_status: Represents the acknowledgment status for the + remote secondary replicator. + :paramtype remote_replicator_acknowledgement_status: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementStatus + """ + super(RemoteReplicatorStatus, self).__init__(**kwargs) + self.replica_id = replica_id + self.last_acknowledgement_processed_time_utc = last_acknowledgement_processed_time_utc + self.last_received_replication_sequence_number = last_received_replication_sequence_number + self.last_applied_replication_sequence_number = last_applied_replication_sequence_number + self.is_in_build = is_in_build + self.last_received_copy_sequence_number = last_received_copy_sequence_number + self.last_applied_copy_sequence_number = last_applied_copy_sequence_number + self.remote_replicator_acknowledgement_status = remote_replicator_acknowledgement_status + + +class RepairTask(msrest.serialization.Model): + """Represents a repair task, which includes information about what kind of repair was requested, what its progress is, and what its final result was. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar task_id: Required. The ID of the repair task. + :vartype task_id: str + :ivar version: The version of the repair task. + When creating a new repair task, the version must be set to zero. When updating a repair + task, + the version is used for optimistic concurrency checks. If the version is + set to zero, the update will not check for write conflicts. If the version is set to a + non-zero value, then the + update will only succeed if the actual current version of the repair task matches this value. + :vartype version: str + :ivar description: A description of the purpose of the repair task, or other informational + details. + May be set when the repair task is created, and is immutable once set. + :vartype description: str + :ivar state: Required. The workflow state of the repair task. Valid initial states are Created, + Claimed, and Preparing. Possible values include: "Invalid", "Created", "Claimed", "Preparing", + "Approved", "Executing", "Restoring", "Completed". + :vartype state: str or ~azure.servicefabric.models.State + :ivar flags: A bitwise-OR of the following values, which gives additional details about the + status of the repair task. + + + * 1 - Cancellation of the repair has been requested + * 2 - Abort of the repair has been requested + * 4 - Approval of the repair was forced via client request. + :vartype flags: int + :ivar action: Required. The requested repair action. Must be specified when the repair task is + created, and is immutable once set. + :vartype action: str + :ivar target: The target object determines what actions the system will take to prepare for the + impact of the repair, prior to approving execution of the repair. + May be set when the repair task is created, and is immutable once set. + :vartype target: ~azure.servicefabric.models.RepairTargetDescriptionBase + :ivar executor: The name of the repair executor. Must be specified in Claimed and later states, + and is immutable once set. + :vartype executor: str + :ivar executor_data: A data string that the repair executor can use to store its internal + state. + :vartype executor_data: str + :ivar impact: The impact object determines what actions the system will take to prepare for the + impact of the repair, prior to approving execution of the repair. + Impact must be specified by the repair executor when transitioning to the Preparing state, and + is immutable once set. + :vartype impact: ~azure.servicefabric.models.RepairImpactDescriptionBase + :ivar result_status: A value describing the overall result of the repair task execution. Must + be specified in the Restoring and later states, and is immutable once set. Possible values + include: "Invalid", "Succeeded", "Cancelled", "Interrupted", "Failed", "Pending". + :vartype result_status: str or ~azure.servicefabric.models.ResultStatus + :ivar result_code: A numeric value providing additional details about the result of the repair + task execution. + May be specified in the Restoring and later states, and is immutable once set. + :vartype result_code: int + :ivar result_details: A string providing additional details about the result of the repair task + execution. + May be specified in the Restoring and later states, and is immutable once set. + :vartype result_details: str + :ivar history: An object that contains timestamps of the repair task's state transitions. + These timestamps are updated by the system, and cannot be directly modified. + :vartype history: ~azure.servicefabric.models.RepairTaskHistory + :ivar preparing_health_check_state: The workflow state of the health check when the repair task + is in the Preparing state. Possible values include: "NotStarted", "InProgress", "Succeeded", + "Skipped", "TimedOut". + :vartype preparing_health_check_state: str or + ~azure.servicefabric.models.RepairTaskHealthCheckState + :ivar restoring_health_check_state: The workflow state of the health check when the repair task + is in the Restoring state. Possible values include: "NotStarted", "InProgress", "Succeeded", + "Skipped", "TimedOut". + :vartype restoring_health_check_state: str or + ~azure.servicefabric.models.RepairTaskHealthCheckState + :ivar perform_preparing_health_check: A value to determine if health checks will be performed + when the repair task enters the Preparing state. + :vartype perform_preparing_health_check: bool + :ivar perform_restoring_health_check: A value to determine if health checks will be performed + when the repair task enters the Restoring state. + :vartype perform_restoring_health_check: bool + """ + + _validation = { + 'task_id': {'required': True}, + 'state': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'action': {'key': 'Action', 'type': 'str'}, + 'target': {'key': 'Target', 'type': 'RepairTargetDescriptionBase'}, + 'executor': {'key': 'Executor', 'type': 'str'}, + 'executor_data': {'key': 'ExecutorData', 'type': 'str'}, + 'impact': {'key': 'Impact', 'type': 'RepairImpactDescriptionBase'}, + 'result_status': {'key': 'ResultStatus', 'type': 'str'}, + 'result_code': {'key': 'ResultCode', 'type': 'int'}, + 'result_details': {'key': 'ResultDetails', 'type': 'str'}, + 'history': {'key': 'History', 'type': 'RepairTaskHistory'}, + 'preparing_health_check_state': {'key': 'PreparingHealthCheckState', 'type': 'str'}, + 'restoring_health_check_state': {'key': 'RestoringHealthCheckState', 'type': 'str'}, + 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, + 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, + } + + def __init__( + self, + *, + task_id: str, + state: Union[str, "State"], + action: str, + version: Optional[str] = None, + description: Optional[str] = None, + flags: Optional[int] = None, + target: Optional["RepairTargetDescriptionBase"] = None, + executor: Optional[str] = None, + executor_data: Optional[str] = None, + impact: Optional["RepairImpactDescriptionBase"] = None, + result_status: Optional[Union[str, "ResultStatus"]] = None, + result_code: Optional[int] = None, + result_details: Optional[str] = None, + history: Optional["RepairTaskHistory"] = None, + preparing_health_check_state: Optional[Union[str, "RepairTaskHealthCheckState"]] = None, + restoring_health_check_state: Optional[Union[str, "RepairTaskHealthCheckState"]] = None, + perform_preparing_health_check: Optional[bool] = None, + perform_restoring_health_check: Optional[bool] = None, + **kwargs + ): + """ + :keyword task_id: Required. The ID of the repair task. + :paramtype task_id: str + :keyword version: The version of the repair task. + When creating a new repair task, the version must be set to zero. When updating a repair + task, + the version is used for optimistic concurrency checks. If the version is + set to zero, the update will not check for write conflicts. If the version is set to a + non-zero value, then the + update will only succeed if the actual current version of the repair task matches this value. + :paramtype version: str + :keyword description: A description of the purpose of the repair task, or other informational + details. + May be set when the repair task is created, and is immutable once set. + :paramtype description: str + :keyword state: Required. The workflow state of the repair task. Valid initial states are + Created, Claimed, and Preparing. Possible values include: "Invalid", "Created", "Claimed", + "Preparing", "Approved", "Executing", "Restoring", "Completed". + :paramtype state: str or ~azure.servicefabric.models.State + :keyword flags: A bitwise-OR of the following values, which gives additional details about the + status of the repair task. + + + * 1 - Cancellation of the repair has been requested + * 2 - Abort of the repair has been requested + * 4 - Approval of the repair was forced via client request. + :paramtype flags: int + :keyword action: Required. The requested repair action. Must be specified when the repair task + is created, and is immutable once set. + :paramtype action: str + :keyword target: The target object determines what actions the system will take to prepare for + the impact of the repair, prior to approving execution of the repair. + May be set when the repair task is created, and is immutable once set. + :paramtype target: ~azure.servicefabric.models.RepairTargetDescriptionBase + :keyword executor: The name of the repair executor. Must be specified in Claimed and later + states, and is immutable once set. + :paramtype executor: str + :keyword executor_data: A data string that the repair executor can use to store its internal + state. + :paramtype executor_data: str + :keyword impact: The impact object determines what actions the system will take to prepare for + the impact of the repair, prior to approving execution of the repair. + Impact must be specified by the repair executor when transitioning to the Preparing state, and + is immutable once set. + :paramtype impact: ~azure.servicefabric.models.RepairImpactDescriptionBase + :keyword result_status: A value describing the overall result of the repair task execution. + Must be specified in the Restoring and later states, and is immutable once set. Possible values + include: "Invalid", "Succeeded", "Cancelled", "Interrupted", "Failed", "Pending". + :paramtype result_status: str or ~azure.servicefabric.models.ResultStatus + :keyword result_code: A numeric value providing additional details about the result of the + repair task execution. + May be specified in the Restoring and later states, and is immutable once set. + :paramtype result_code: int + :keyword result_details: A string providing additional details about the result of the repair + task execution. + May be specified in the Restoring and later states, and is immutable once set. + :paramtype result_details: str + :keyword history: An object that contains timestamps of the repair task's state transitions. + These timestamps are updated by the system, and cannot be directly modified. + :paramtype history: ~azure.servicefabric.models.RepairTaskHistory + :keyword preparing_health_check_state: The workflow state of the health check when the repair + task is in the Preparing state. Possible values include: "NotStarted", "InProgress", + "Succeeded", "Skipped", "TimedOut". + :paramtype preparing_health_check_state: str or + ~azure.servicefabric.models.RepairTaskHealthCheckState + :keyword restoring_health_check_state: The workflow state of the health check when the repair + task is in the Restoring state. Possible values include: "NotStarted", "InProgress", + "Succeeded", "Skipped", "TimedOut". + :paramtype restoring_health_check_state: str or + ~azure.servicefabric.models.RepairTaskHealthCheckState + :keyword perform_preparing_health_check: A value to determine if health checks will be + performed when the repair task enters the Preparing state. + :paramtype perform_preparing_health_check: bool + :keyword perform_restoring_health_check: A value to determine if health checks will be + performed when the repair task enters the Restoring state. + :paramtype perform_restoring_health_check: bool + """ + super(RepairTask, self).__init__(**kwargs) + self.task_id = task_id + self.version = version + self.description = description + self.state = state + self.flags = flags + self.action = action + self.target = target + self.executor = executor + self.executor_data = executor_data + self.impact = impact + self.result_status = result_status + self.result_code = result_code + self.result_details = result_details + self.history = history + self.preparing_health_check_state = preparing_health_check_state + self.restoring_health_check_state = restoring_health_check_state + self.perform_preparing_health_check = perform_preparing_health_check + self.perform_restoring_health_check = perform_restoring_health_check + + +class RepairTaskApproveDescription(msrest.serialization.Model): + """Describes a request for forced approval of a repair task. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar task_id: Required. The ID of the repair task. + :vartype task_id: str + :ivar version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current version of the repair task. If zero, + then no version check is performed. + :vartype version: str + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__( + self, + *, + task_id: str, + version: Optional[str] = None, + **kwargs + ): + """ + :keyword task_id: Required. The ID of the repair task. + :paramtype task_id: str + :keyword version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current version of the repair task. If zero, + then no version check is performed. + :paramtype version: str + """ + super(RepairTaskApproveDescription, self).__init__(**kwargs) + self.task_id = task_id + self.version = version + + +class RepairTaskCancelDescription(msrest.serialization.Model): + """Describes a request to cancel a repair task. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar task_id: Required. The ID of the repair task. + :vartype task_id: str + :ivar version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current version of the repair task. If zero, + then no version check is performed. + :vartype version: str + :ivar request_abort: *True* if the repair should be stopped as soon as possible even if it has + already started executing. *False* if the repair should be cancelled only if execution has not + yet started. + :vartype request_abort: bool + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'request_abort': {'key': 'RequestAbort', 'type': 'bool'}, + } + + def __init__( + self, + *, + task_id: str, + version: Optional[str] = None, + request_abort: Optional[bool] = None, + **kwargs + ): + """ + :keyword task_id: Required. The ID of the repair task. + :paramtype task_id: str + :keyword version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current version of the repair task. If zero, + then no version check is performed. + :paramtype version: str + :keyword request_abort: *True* if the repair should be stopped as soon as possible even if it + has already started executing. *False* if the repair should be cancelled only if execution has + not yet started. + :paramtype request_abort: bool + """ + super(RepairTaskCancelDescription, self).__init__(**kwargs) + self.task_id = task_id + self.version = version + self.request_abort = request_abort + + +class RepairTaskDeleteDescription(msrest.serialization.Model): + """Describes a request to delete a completed repair task. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar task_id: Required. The ID of the completed repair task to be deleted. + :vartype task_id: str + :ivar version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current version of the repair task. If zero, + then no version check is performed. + :vartype version: str + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__( + self, + *, + task_id: str, + version: Optional[str] = None, + **kwargs + ): + """ + :keyword task_id: Required. The ID of the completed repair task to be deleted. + :paramtype task_id: str + :keyword version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current version of the repair task. If zero, + then no version check is performed. + :paramtype version: str + """ + super(RepairTaskDeleteDescription, self).__init__(**kwargs) + self.task_id = task_id + self.version = version + + +class RepairTaskHistory(msrest.serialization.Model): + """A record of the times when the repair task entered each state. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + :ivar created_utc_timestamp: The time when the repair task entered the Created state. + :vartype created_utc_timestamp: ~datetime.datetime + :ivar claimed_utc_timestamp: The time when the repair task entered the Claimed state. + :vartype claimed_utc_timestamp: ~datetime.datetime + :ivar preparing_utc_timestamp: The time when the repair task entered the Preparing state. + :vartype preparing_utc_timestamp: ~datetime.datetime + :ivar approved_utc_timestamp: The time when the repair task entered the Approved state. + :vartype approved_utc_timestamp: ~datetime.datetime + :ivar executing_utc_timestamp: The time when the repair task entered the Executing state. + :vartype executing_utc_timestamp: ~datetime.datetime + :ivar restoring_utc_timestamp: The time when the repair task entered the Restoring state. + :vartype restoring_utc_timestamp: ~datetime.datetime + :ivar completed_utc_timestamp: The time when the repair task entered the Completed state. + :vartype completed_utc_timestamp: ~datetime.datetime + :ivar preparing_health_check_start_utc_timestamp: The time when the repair task started the + health check in the Preparing state. + :vartype preparing_health_check_start_utc_timestamp: ~datetime.datetime + :ivar preparing_health_check_end_utc_timestamp: The time when the repair task completed the + health check in the Preparing state. + :vartype preparing_health_check_end_utc_timestamp: ~datetime.datetime + :ivar restoring_health_check_start_utc_timestamp: The time when the repair task started the + health check in the Restoring state. + :vartype restoring_health_check_start_utc_timestamp: ~datetime.datetime + :ivar restoring_health_check_end_utc_timestamp: The time when the repair task completed the + health check in the Restoring state. + :vartype restoring_health_check_end_utc_timestamp: ~datetime.datetime + """ + + _attribute_map = { + 'created_utc_timestamp': {'key': 'CreatedUtcTimestamp', 'type': 'iso-8601'}, + 'claimed_utc_timestamp': {'key': 'ClaimedUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_utc_timestamp': {'key': 'PreparingUtcTimestamp', 'type': 'iso-8601'}, + 'approved_utc_timestamp': {'key': 'ApprovedUtcTimestamp', 'type': 'iso-8601'}, + 'executing_utc_timestamp': {'key': 'ExecutingUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_utc_timestamp': {'key': 'RestoringUtcTimestamp', 'type': 'iso-8601'}, + 'completed_utc_timestamp': {'key': 'CompletedUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_health_check_start_utc_timestamp': {'key': 'PreparingHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_health_check_end_utc_timestamp': {'key': 'PreparingHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_health_check_start_utc_timestamp': {'key': 'RestoringHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_health_check_end_utc_timestamp': {'key': 'RestoringHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_utc_timestamp: Optional[datetime.datetime] = None, + claimed_utc_timestamp: Optional[datetime.datetime] = None, + preparing_utc_timestamp: Optional[datetime.datetime] = None, + approved_utc_timestamp: Optional[datetime.datetime] = None, + executing_utc_timestamp: Optional[datetime.datetime] = None, + restoring_utc_timestamp: Optional[datetime.datetime] = None, + completed_utc_timestamp: Optional[datetime.datetime] = None, + preparing_health_check_start_utc_timestamp: Optional[datetime.datetime] = None, + preparing_health_check_end_utc_timestamp: Optional[datetime.datetime] = None, + restoring_health_check_start_utc_timestamp: Optional[datetime.datetime] = None, + restoring_health_check_end_utc_timestamp: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword created_utc_timestamp: The time when the repair task entered the Created state. + :paramtype created_utc_timestamp: ~datetime.datetime + :keyword claimed_utc_timestamp: The time when the repair task entered the Claimed state. + :paramtype claimed_utc_timestamp: ~datetime.datetime + :keyword preparing_utc_timestamp: The time when the repair task entered the Preparing state. + :paramtype preparing_utc_timestamp: ~datetime.datetime + :keyword approved_utc_timestamp: The time when the repair task entered the Approved state. + :paramtype approved_utc_timestamp: ~datetime.datetime + :keyword executing_utc_timestamp: The time when the repair task entered the Executing state. + :paramtype executing_utc_timestamp: ~datetime.datetime + :keyword restoring_utc_timestamp: The time when the repair task entered the Restoring state. + :paramtype restoring_utc_timestamp: ~datetime.datetime + :keyword completed_utc_timestamp: The time when the repair task entered the Completed state. + :paramtype completed_utc_timestamp: ~datetime.datetime + :keyword preparing_health_check_start_utc_timestamp: The time when the repair task started the + health check in the Preparing state. + :paramtype preparing_health_check_start_utc_timestamp: ~datetime.datetime + :keyword preparing_health_check_end_utc_timestamp: The time when the repair task completed the + health check in the Preparing state. + :paramtype preparing_health_check_end_utc_timestamp: ~datetime.datetime + :keyword restoring_health_check_start_utc_timestamp: The time when the repair task started the + health check in the Restoring state. + :paramtype restoring_health_check_start_utc_timestamp: ~datetime.datetime + :keyword restoring_health_check_end_utc_timestamp: The time when the repair task completed the + health check in the Restoring state. + :paramtype restoring_health_check_end_utc_timestamp: ~datetime.datetime + """ + super(RepairTaskHistory, self).__init__(**kwargs) + self.created_utc_timestamp = created_utc_timestamp + self.claimed_utc_timestamp = claimed_utc_timestamp + self.preparing_utc_timestamp = preparing_utc_timestamp + self.approved_utc_timestamp = approved_utc_timestamp + self.executing_utc_timestamp = executing_utc_timestamp + self.restoring_utc_timestamp = restoring_utc_timestamp + self.completed_utc_timestamp = completed_utc_timestamp + self.preparing_health_check_start_utc_timestamp = preparing_health_check_start_utc_timestamp + self.preparing_health_check_end_utc_timestamp = preparing_health_check_end_utc_timestamp + self.restoring_health_check_start_utc_timestamp = restoring_health_check_start_utc_timestamp + self.restoring_health_check_end_utc_timestamp = restoring_health_check_end_utc_timestamp + + +class RepairTaskUpdateHealthPolicyDescription(msrest.serialization.Model): + """Describes a request to update the health policy of a repair task. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar task_id: Required. The ID of the repair task to be updated. + :vartype task_id: str + :ivar version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current value of the repair task. If zero, + then no version check is performed. + :vartype version: str + :ivar perform_preparing_health_check: A boolean indicating if health check is to be performed + in the Preparing stage of the repair task. If not specified the existing value should not be + altered. Otherwise, specify the desired new value. + :vartype perform_preparing_health_check: bool + :ivar perform_restoring_health_check: A boolean indicating if health check is to be performed + in the Restoring stage of the repair task. If not specified the existing value should not be + altered. Otherwise, specify the desired new value. + :vartype perform_restoring_health_check: bool + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, + 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, + } + + def __init__( + self, + *, + task_id: str, + version: Optional[str] = None, + perform_preparing_health_check: Optional[bool] = None, + perform_restoring_health_check: Optional[bool] = None, + **kwargs + ): + """ + :keyword task_id: Required. The ID of the repair task to be updated. + :paramtype task_id: str + :keyword version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current value of the repair task. If zero, + then no version check is performed. + :paramtype version: str + :keyword perform_preparing_health_check: A boolean indicating if health check is to be + performed in the Preparing stage of the repair task. If not specified the existing value should + not be altered. Otherwise, specify the desired new value. + :paramtype perform_preparing_health_check: bool + :keyword perform_restoring_health_check: A boolean indicating if health check is to be + performed in the Restoring stage of the repair task. If not specified the existing value should + not be altered. Otherwise, specify the desired new value. + :paramtype perform_restoring_health_check: bool + """ + super(RepairTaskUpdateHealthPolicyDescription, self).__init__(**kwargs) + self.task_id = task_id + self.version = version + self.perform_preparing_health_check = perform_preparing_health_check + self.perform_restoring_health_check = perform_restoring_health_check + + +class RepairTaskUpdateInfo(msrest.serialization.Model): + """Describes the result of an operation that created or updated a repair task. + +This type supports the Service Fabric platform; it is not meant to be used directly from your code. + + All required parameters must be populated in order to send to Azure. + + :ivar version: Required. The new version of the repair task. + :vartype version: str + """ + + _validation = { + 'version': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__( + self, + *, + version: str, + **kwargs + ): + """ + :keyword version: Required. The new version of the repair task. + :paramtype version: str + """ + super(RepairTaskUpdateInfo, self).__init__(**kwargs) + self.version = version + + +class ReplicaHealth(EntityHealth): + """Represents a base class for stateful service replica or stateless service instance health. +Contains the replica aggregated health state, the health events and the unhealthy evaluations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaHealth, StatelessServiceInstanceHealth. + + All required parameters must be populated in order to send to Azure. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar partition_id: Id of the partition to which this replica belongs. + :vartype partition_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaHealth', 'Stateless': 'StatelessServiceInstanceHealth'} + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + health_events: Optional[List["HealthEvent"]] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + health_statistics: Optional["HealthStatistics"] = None, + partition_id: Optional[str] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword partition_id: Id of the partition to which this replica belongs. + :paramtype partition_id: str + """ + super(ReplicaHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.service_kind = 'ReplicaHealth' # type: str + self.partition_id = partition_id + + +class ReplicaHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a replica, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar partition_id: Id of the partition to which the replica belongs. + :vartype partition_id: str + :ivar replica_or_instance_id: Id of a stateful service replica or a stateless service instance. + This ID is used in the queries that apply to both stateful and stateless services. It is used + by Service Fabric to uniquely identify a replica of a partition of a stateful service or an + instance of a stateless service partition. It is unique within a partition and does not change + for the lifetime of the replica or the instance. If a stateful replica gets dropped and another + replica gets created on the same node for the same partition, it will get a different value for + the ID. If a stateless instance is failed over on the same or different node it will get a + different value for the ID. + :vartype replica_or_instance_id: str + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated + health state of the replica. The types of the unhealthy evaluations can be + EventHealthEvaluation. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + partition_id: Optional[str] = None, + replica_or_instance_id: Optional[str] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword partition_id: Id of the partition to which the replica belongs. + :paramtype partition_id: str + :keyword replica_or_instance_id: Id of a stateful service replica or a stateless service + instance. This ID is used in the queries that apply to both stateful and stateless services. It + is used by Service Fabric to uniquely identify a replica of a partition of a stateful service + or an instance of a stateless service partition. It is unique within a partition and does not + change for the lifetime of the replica or the instance. If a stateful replica gets dropped and + another replica gets created on the same node for the same partition, it will get a different + value for the ID. If a stateless instance is failed over on the same or different node it will + get a different value for the ID. + :paramtype replica_or_instance_id: str + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current + aggregated health state of the replica. The types of the unhealthy evaluations can be + EventHealthEvaluation. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(ReplicaHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'Replica' # type: str + self.partition_id = partition_id + self.replica_or_instance_id = replica_or_instance_id + self.unhealthy_evaluations = unhealthy_evaluations + + +class ReplicaHealthState(EntityHealthState): + """Represents a base class for stateful service replica or stateless service instance health state. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaHealthState, StatelessServiceInstanceHealthState. + + All required parameters must be populated in order to send to Azure. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar partition_id: The ID of the partition to which this replica belongs. + :vartype partition_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaHealthState', 'Stateless': 'StatelessServiceInstanceHealthState'} + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + partition_id: Optional[str] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword partition_id: The ID of the partition to which this replica belongs. + :paramtype partition_id: str + """ + super(ReplicaHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.service_kind = 'ReplicaHealthState' # type: str + self.partition_id = partition_id + + +class ReplicaHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a stateful service replica or a stateless service instance. +The replica health state contains the replica ID and its aggregated health state. + + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar replica_or_instance_id: Id of a stateful service replica or a stateless service instance. + This ID is used in the queries that apply to both stateful and stateless services. It is used + by Service Fabric to uniquely identify a replica of a partition of a stateful service or an + instance of a stateless service partition. It is unique within a partition and does not change + for the lifetime of the replica or the instance. If a stateful replica gets dropped and another + replica gets created on the same node for the same partition, it will get a different value for + the ID. If a stateless instance is failed over on the same or different node it will get a + different value for the ID. + :vartype replica_or_instance_id: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, + } + + def __init__( + self, + *, + health_state: Optional[Union[str, "HealthState"]] = None, + replica_or_instance_id: Optional[str] = None, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword replica_or_instance_id: Id of a stateful service replica or a stateless service + instance. This ID is used in the queries that apply to both stateful and stateless services. It + is used by Service Fabric to uniquely identify a replica of a partition of a stateful service + or an instance of a stateless service partition. It is unique within a partition and does not + change for the lifetime of the replica or the instance. If a stateful replica gets dropped and + another replica gets created on the same node for the same partition, it will get a different + value for the ID. If a stateless instance is failed over on the same or different node it will + get a different value for the ID. + :paramtype replica_or_instance_id: str + """ + super(ReplicaHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.replica_or_instance_id = replica_or_instance_id + + +class ReplicaHealthStateChunkList(msrest.serialization.Model): + """The list of replica health state chunks that respect the input filters in the chunk query. Returned by get cluster health state chunks query. + + :ivar items: The list of replica health state chunks that respect the input filters in the + chunk query. + :vartype items: list[~azure.servicefabric.models.ReplicaHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[ReplicaHealthStateChunk]'}, + } + + def __init__( + self, + *, + items: Optional[List["ReplicaHealthStateChunk"]] = None, + **kwargs + ): + """ + :keyword items: The list of replica health state chunks that respect the input filters in the + chunk query. + :paramtype items: list[~azure.servicefabric.models.ReplicaHealthStateChunk] + """ + super(ReplicaHealthStateChunkList, self).__init__(**kwargs) + self.items = items + + +class ReplicaHealthStateFilter(msrest.serialization.Model): + """Defines matching criteria to determine whether a replica should be included as a child of a partition in the cluster health chunk. +The replicas are only returned if the parent entities match a filter specified in the cluster health chunk query description. The parent partition, service and application must be included in the cluster health chunk. +One filter can match zero, one or multiple replicas, depending on its properties. + + :ivar replica_or_instance_id_filter: Id of the stateful service replica or stateless service + instance that matches the filter. The filter is applied only to the specified replica, if it + exists. + If the replica doesn't exist, no replica is returned in the cluster health chunk based on this + filter. + If the replica exists, it is included in the cluster health chunk if it respects the other + filter properties. + If not specified, all replicas that match the parent filters (if any) are taken into + consideration and matched against the other filter members, like health state filter. + :vartype replica_or_instance_id_filter: str + :ivar health_state_filter: The filter for the health state of the replicas. It allows selecting + replicas if they match the desired health states. + The possible values are integer value of one of the following health states. Only replicas + that match the filter are returned. All replicas are used to evaluate the parent partition + aggregated health state. + If not specified, default value is None, unless the replica ID is specified. If the filter has + default value and replica ID is specified, the matching replica is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches replicas with HealthState value of OK (2) + and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :vartype health_state_filter: int + """ + + _attribute_map = { + 'replica_or_instance_id_filter': {'key': 'ReplicaOrInstanceIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__( + self, + *, + replica_or_instance_id_filter: Optional[str] = None, + health_state_filter: Optional[int] = 0, + **kwargs + ): + """ + :keyword replica_or_instance_id_filter: Id of the stateful service replica or stateless service + instance that matches the filter. The filter is applied only to the specified replica, if it + exists. + If the replica doesn't exist, no replica is returned in the cluster health chunk based on this + filter. + If the replica exists, it is included in the cluster health chunk if it respects the other + filter properties. + If not specified, all replicas that match the parent filters (if any) are taken into + consideration and matched against the other filter members, like health state filter. + :paramtype replica_or_instance_id_filter: str + :keyword health_state_filter: The filter for the health state of the replicas. It allows + selecting replicas if they match the desired health states. + The possible values are integer value of one of the following health states. Only replicas + that match the filter are returned. All replicas are used to evaluate the parent partition + aggregated health state. + If not specified, default value is None, unless the replica ID is specified. If the filter has + default value and replica ID is specified, the matching replica is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches replicas with HealthState value of OK (2) + and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :paramtype health_state_filter: int + """ + super(ReplicaHealthStateFilter, self).__init__(**kwargs) + self.replica_or_instance_id_filter = replica_or_instance_id_filter + self.health_state_filter = health_state_filter + + +class ReplicaInfo(msrest.serialization.Model): + """Information about the identity, status, health, node name, uptime, and other details about the replica. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaInfo, StatelessServiceInstanceInfo. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", + "InBuild", "Standby", "Ready", "Down", "Dropped". + :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar node_name: The name of a Service Fabric node. + :vartype node_name: str + :ivar address: The address the replica is listening on. + :vartype address: str + :ivar last_in_build_duration_in_seconds: The last in build duration of the replica in seconds. + :vartype last_in_build_duration_in_seconds: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaInfo', 'Stateless': 'StatelessServiceInstanceInfo'} + } + + def __init__( + self, + *, + replica_status: Optional[Union[str, "ReplicaStatus"]] = None, + health_state: Optional[Union[str, "HealthState"]] = None, + node_name: Optional[str] = None, + address: Optional[str] = None, + last_in_build_duration_in_seconds: Optional[str] = None, + **kwargs + ): + """ + :keyword replica_status: The status of a replica of a service. Possible values include: + "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". + :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword node_name: The name of a Service Fabric node. + :paramtype node_name: str + :keyword address: The address the replica is listening on. + :paramtype address: str + :keyword last_in_build_duration_in_seconds: The last in build duration of the replica in + seconds. + :paramtype last_in_build_duration_in_seconds: str + """ + super(ReplicaInfo, self).__init__(**kwargs) + self.service_kind = None # type: Optional[str] + self.replica_status = replica_status + self.health_state = health_state + self.node_name = node_name + self.address = address + self.last_in_build_duration_in_seconds = last_in_build_duration_in_seconds + + +class ReplicaLifecycleDescription(msrest.serialization.Model): + """Describes how the replica will behave. + + :ivar is_singleton_replica_move_allowed_during_upgrade: If set to true, replicas with a target + replica set size of 1 will be permitted to move during upgrade. + :vartype is_singleton_replica_move_allowed_during_upgrade: bool + :ivar restore_replica_location_after_upgrade: If set to true, move/swap replica to original + location after upgrade. + :vartype restore_replica_location_after_upgrade: bool + """ + + _attribute_map = { + 'is_singleton_replica_move_allowed_during_upgrade': {'key': 'IsSingletonReplicaMoveAllowedDuringUpgrade', 'type': 'bool'}, + 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + } + + def __init__( + self, + *, + is_singleton_replica_move_allowed_during_upgrade: Optional[bool] = None, + restore_replica_location_after_upgrade: Optional[bool] = None, + **kwargs + ): + """ + :keyword is_singleton_replica_move_allowed_during_upgrade: If set to true, replicas with a + target replica set size of 1 will be permitted to move during upgrade. + :paramtype is_singleton_replica_move_allowed_during_upgrade: bool + :keyword restore_replica_location_after_upgrade: If set to true, move/swap replica to original + location after upgrade. + :paramtype restore_replica_location_after_upgrade: bool + """ + super(ReplicaLifecycleDescription, self).__init__(**kwargs) + self.is_singleton_replica_move_allowed_during_upgrade = is_singleton_replica_move_allowed_during_upgrade + self.restore_replica_location_after_upgrade = restore_replica_location_after_upgrade + + +class ReplicaMetricLoadDescription(msrest.serialization.Model): + """Specifies metric loads of a partition's specific secondary replica or instance. + + :ivar node_name: Node name of a specific secondary replica or instance. + :vartype node_name: str + :ivar replica_or_instance_load_entries: Loads of a different metrics for a partition's + secondary replica or instance. + :vartype replica_or_instance_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'replica_or_instance_load_entries': {'key': 'ReplicaOrInstanceLoadEntries', 'type': '[MetricLoadDescription]'}, + } + + def __init__( + self, + *, + node_name: Optional[str] = None, + replica_or_instance_load_entries: Optional[List["MetricLoadDescription"]] = None, + **kwargs + ): + """ + :keyword node_name: Node name of a specific secondary replica or instance. + :paramtype node_name: str + :keyword replica_or_instance_load_entries: Loads of a different metrics for a partition's + secondary replica or instance. + :paramtype replica_or_instance_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + """ + super(ReplicaMetricLoadDescription, self).__init__(**kwargs) + self.node_name = node_name + self.replica_or_instance_load_entries = replica_or_instance_load_entries + + +class ReplicasHealthEvaluation(HealthEvaluation): + """Represents health evaluation for replicas, containing health evaluations for each unhealthy replica that impacted current aggregated health state. Can be returned when evaluating partition health and the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar max_percent_unhealthy_replicas_per_partition: Maximum allowed percentage of unhealthy + replicas per partition from the ApplicationHealthPolicy. + :vartype max_percent_unhealthy_replicas_per_partition: int + :ivar total_count: Total number of replicas in the partition from the health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy ReplicaHealthEvaluation that impacted the aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + max_percent_unhealthy_replicas_per_partition: Optional[int] = None, + total_count: Optional[int] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword max_percent_unhealthy_replicas_per_partition: Maximum allowed percentage of unhealthy + replicas per partition from the ApplicationHealthPolicy. + :paramtype max_percent_unhealthy_replicas_per_partition: int + :keyword total_count: Total number of replicas in the partition from the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy ReplicaHealthEvaluation that impacted the aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(ReplicasHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'Replicas' # type: str + self.max_percent_unhealthy_replicas_per_partition = max_percent_unhealthy_replicas_per_partition + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + + +class ReplicatorQueueStatus(msrest.serialization.Model): + """Provides various statistics of the queue used in the service fabric replicator. +Contains information about the service fabric replicator like the replication/copy queue utilization, last acknowledgement received timestamp, etc. +Depending on the role of the replicator, the properties in this type imply different meanings. + + :ivar queue_utilization_percentage: Represents the utilization of the queue. A value of 0 + indicates that the queue is empty and a value of 100 indicates the queue is full. + :vartype queue_utilization_percentage: int + :ivar queue_memory_size: Represents the virtual memory consumed by the queue in bytes. + :vartype queue_memory_size: str + :ivar first_sequence_number: On a primary replicator, this is semantically the sequence number + of the operation for which all the secondary replicas have sent an acknowledgement. + On a secondary replicator, this is the smallest sequence number of the operation that is + present in the queue. + :vartype first_sequence_number: str + :ivar completed_sequence_number: On a primary replicator, this is semantically the highest + sequence number of the operation for which all the secondary replicas have sent an + acknowledgement. + On a secondary replicator, this is semantically the highest sequence number that has been + applied to the persistent state. + :vartype completed_sequence_number: str + :ivar committed_sequence_number: On a primary replicator, this is semantically the highest + sequence number of the operation for which a write quorum of the secondary replicas have sent + an acknowledgement. + On a secondary replicator, this is semantically the highest sequence number of the in-order + operation received from the primary. + :vartype committed_sequence_number: str + :ivar last_sequence_number: Represents the latest sequence number of the operation that is + available in the queue. + :vartype last_sequence_number: str + """ + + _attribute_map = { + 'queue_utilization_percentage': {'key': 'QueueUtilizationPercentage', 'type': 'int'}, + 'queue_memory_size': {'key': 'QueueMemorySize', 'type': 'str'}, + 'first_sequence_number': {'key': 'FirstSequenceNumber', 'type': 'str'}, + 'completed_sequence_number': {'key': 'CompletedSequenceNumber', 'type': 'str'}, + 'committed_sequence_number': {'key': 'CommittedSequenceNumber', 'type': 'str'}, + 'last_sequence_number': {'key': 'LastSequenceNumber', 'type': 'str'}, + } + + def __init__( + self, + *, + queue_utilization_percentage: Optional[int] = None, + queue_memory_size: Optional[str] = None, + first_sequence_number: Optional[str] = None, + completed_sequence_number: Optional[str] = None, + committed_sequence_number: Optional[str] = None, + last_sequence_number: Optional[str] = None, + **kwargs + ): + """ + :keyword queue_utilization_percentage: Represents the utilization of the queue. A value of 0 + indicates that the queue is empty and a value of 100 indicates the queue is full. + :paramtype queue_utilization_percentage: int + :keyword queue_memory_size: Represents the virtual memory consumed by the queue in bytes. + :paramtype queue_memory_size: str + :keyword first_sequence_number: On a primary replicator, this is semantically the sequence + number of the operation for which all the secondary replicas have sent an acknowledgement. + On a secondary replicator, this is the smallest sequence number of the operation that is + present in the queue. + :paramtype first_sequence_number: str + :keyword completed_sequence_number: On a primary replicator, this is semantically the highest + sequence number of the operation for which all the secondary replicas have sent an + acknowledgement. + On a secondary replicator, this is semantically the highest sequence number that has been + applied to the persistent state. + :paramtype completed_sequence_number: str + :keyword committed_sequence_number: On a primary replicator, this is semantically the highest + sequence number of the operation for which a write quorum of the secondary replicas have sent + an acknowledgement. + On a secondary replicator, this is semantically the highest sequence number of the in-order + operation received from the primary. + :paramtype committed_sequence_number: str + :keyword last_sequence_number: Represents the latest sequence number of the operation that is + available in the queue. + :paramtype last_sequence_number: str + """ + super(ReplicatorQueueStatus, self).__init__(**kwargs) + self.queue_utilization_percentage = queue_utilization_percentage + self.queue_memory_size = queue_memory_size + self.first_sequence_number = first_sequence_number + self.completed_sequence_number = completed_sequence_number + self.committed_sequence_number = committed_sequence_number + self.last_sequence_number = last_sequence_number + + +class ResolvedServiceEndpoint(msrest.serialization.Model): + """Endpoint of a resolved service partition. + + :ivar kind: The role of the replica where the endpoint is reported. Possible values include: + "Invalid", "Stateless", "StatefulPrimary", "StatefulSecondary". + :vartype kind: str or ~azure.servicefabric.models.ServiceEndpointRole + :ivar address: The address of the endpoint. If the endpoint has multiple listeners the address + is a JSON object with one property per listener with the value as the address of that listener. + :vartype address: str + """ + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + } + + def __init__( + self, + *, + kind: Optional[Union[str, "ServiceEndpointRole"]] = None, + address: Optional[str] = None, + **kwargs + ): + """ + :keyword kind: The role of the replica where the endpoint is reported. Possible values include: + "Invalid", "Stateless", "StatefulPrimary", "StatefulSecondary". + :paramtype kind: str or ~azure.servicefabric.models.ServiceEndpointRole + :keyword address: The address of the endpoint. If the endpoint has multiple listeners the + address is a JSON object with one property per listener with the value as the address of that + listener. + :paramtype address: str + """ + super(ResolvedServiceEndpoint, self).__init__(**kwargs) + self.kind = kind + self.address = address + + +class ResolvedServicePartition(msrest.serialization.Model): + """Information about a service partition and its associated endpoints. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The full name of the service with 'fabric:' URI scheme. + :vartype name: str + :ivar partition_information: Required. A representation of the resolved partition. + :vartype partition_information: ~azure.servicefabric.models.PartitionInformation + :ivar endpoints: Required. List of resolved service endpoints of a service partition. + :vartype endpoints: list[~azure.servicefabric.models.ResolvedServiceEndpoint] + :ivar version: Required. The version of this resolved service partition result. This version + should be passed in the next time the ResolveService call is made via the PreviousRspVersion + query parameter. + :vartype version: str + """ + + _validation = { + 'name': {'required': True}, + 'partition_information': {'required': True}, + 'endpoints': {'required': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'endpoints': {'key': 'Endpoints', 'type': '[ResolvedServiceEndpoint]'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + partition_information: "PartitionInformation", + endpoints: List["ResolvedServiceEndpoint"], + version: str, + **kwargs + ): + """ + :keyword name: Required. The full name of the service with 'fabric:' URI scheme. + :paramtype name: str + :keyword partition_information: Required. A representation of the resolved partition. + :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation + :keyword endpoints: Required. List of resolved service endpoints of a service partition. + :paramtype endpoints: list[~azure.servicefabric.models.ResolvedServiceEndpoint] + :keyword version: Required. The version of this resolved service partition result. This version + should be passed in the next time the ResolveService call is made via the PreviousRspVersion + query parameter. + :paramtype version: str + """ + super(ResolvedServicePartition, self).__init__(**kwargs) + self.name = name + self.partition_information = partition_information + self.endpoints = endpoints + self.version = version + + +class ResourceLimits(msrest.serialization.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. + + :ivar memory_in_gb: The memory limit in GB. + :vartype memory_in_gb: float + :ivar cpu: CPU limits in cores. At present, only full cores are supported. + :vartype cpu: float + """ + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + } + + def __init__( + self, + *, + memory_in_gb: Optional[float] = None, + cpu: Optional[float] = None, + **kwargs + ): + """ + :keyword memory_in_gb: The memory limit in GB. + :paramtype memory_in_gb: float + :keyword cpu: CPU limits in cores. At present, only full cores are supported. + :paramtype cpu: float + """ + super(ResourceLimits, self).__init__(**kwargs) + self.memory_in_gb = memory_in_gb + self.cpu = cpu + + +class ResourceRequests(msrest.serialization.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. + + :ivar memory_in_gb: Required. The memory request in GB for this container. + :vartype memory_in_gb: float + :ivar cpu: Required. Requested number of CPU cores. At present, only full cores are supported. + :vartype 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 + ): + """ + :keyword memory_in_gb: Required. The memory request in GB for this container. + :paramtype memory_in_gb: float + :keyword cpu: Required. Requested number of CPU cores. At present, only full cores are + supported. + :paramtype cpu: float + """ + super(ResourceRequests, self).__init__(**kwargs) + self.memory_in_gb = memory_in_gb + self.cpu = cpu + + +class ResourceRequirements(msrest.serialization.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. + + :ivar requests: Required. Describes the requested resources for a given container. + :vartype requests: ~azure.servicefabric.models.ResourceRequests + :ivar limits: Describes the maximum limits on the resources for a given container. + :vartype 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: "ResourceRequests", + limits: Optional["ResourceLimits"] = None, + **kwargs + ): + """ + :keyword requests: Required. Describes the requested resources for a given container. + :paramtype requests: ~azure.servicefabric.models.ResourceRequests + :keyword limits: Describes the maximum limits on the resources for a given container. + :paramtype limits: ~azure.servicefabric.models.ResourceLimits + """ + super(ResourceRequirements, self).__init__(**kwargs) + self.requests = requests + self.limits = limits + + +class RestartDeployedCodePackageDescription(msrest.serialization.Model): + """Defines description for restarting a deployed code package on Service Fabric node. + + All required parameters must be populated in order to send to Azure. + + :ivar service_manifest_name: Required. The name of service manifest that specified this code + package. + :vartype service_manifest_name: str + :ivar service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :vartype service_package_activation_id: str + :ivar code_package_name: Required. The name of the code package defined in the service + manifest. + :vartype code_package_name: str + :ivar code_package_instance_id: Required. The instance ID for currently running entry point. + For a code package setup entry point (if specified) runs first and after it finishes main entry + point is started. + Each time entry point executable is run, its instance ID will change. If 0 is passed in as the + code package instance ID, the API will restart the code package with whatever instance ID it is + currently running. + If an instance ID other than 0 is passed in, the API will restart the code package only if the + current Instance ID matches the passed in instance ID. + Note, passing in the exact instance ID (not 0) in the API is safer, because if ensures at most + one restart of the code package. + :vartype code_package_instance_id: str + """ + + _validation = { + 'service_manifest_name': {'required': True}, + 'code_package_name': {'required': True}, + 'code_package_instance_id': {'required': True}, + } + + _attribute_map = { + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'code_package_instance_id': {'key': 'CodePackageInstanceId', 'type': 'str'}, + } + + def __init__( + self, + *, + service_manifest_name: str, + code_package_name: str, + code_package_instance_id: str, + service_package_activation_id: Optional[str] = None, + **kwargs + ): + """ + :keyword service_manifest_name: Required. The name of service manifest that specified this code + package. + :paramtype service_manifest_name: str + :keyword service_package_activation_id: The ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), + then value of ServicePackageActivationId + is always an empty string. + :paramtype service_package_activation_id: str + :keyword code_package_name: Required. The name of the code package defined in the service + manifest. + :paramtype code_package_name: str + :keyword code_package_instance_id: Required. The instance ID for currently running entry point. + For a code package setup entry point (if specified) runs first and after it finishes main entry + point is started. + Each time entry point executable is run, its instance ID will change. If 0 is passed in as the + code package instance ID, the API will restart the code package with whatever instance ID it is + currently running. + If an instance ID other than 0 is passed in, the API will restart the code package only if the + current Instance ID matches the passed in instance ID. + Note, passing in the exact instance ID (not 0) in the API is safer, because if ensures at most + one restart of the code package. + :paramtype code_package_instance_id: str + """ + super(RestartDeployedCodePackageDescription, self).__init__(**kwargs) + self.service_manifest_name = service_manifest_name + self.service_package_activation_id = service_package_activation_id + self.code_package_name = code_package_name + self.code_package_instance_id = code_package_instance_id + + +class RestartNodeDescription(msrest.serialization.Model): + """Describes the parameters to restart a Service Fabric node. + + All required parameters must be populated in order to send to Azure. + + :ivar node_instance_id: Required. The instance ID of the target node. If instance ID is + specified the node is restarted only if it matches with the current instance of the node. A + default value of "0" would match any instance ID. The instance ID can be obtained using get + node query. + :vartype node_instance_id: str + :ivar create_fabric_dump: Specify True to create a dump of the fabric node process. This is + case-sensitive. Possible values include: "False", "True". Default value: "False". + :vartype create_fabric_dump: str or ~azure.servicefabric.models.CreateFabricDump + """ + + _validation = { + 'node_instance_id': {'required': True}, + } + + _attribute_map = { + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + 'create_fabric_dump': {'key': 'CreateFabricDump', 'type': 'str'}, + } + + def __init__( + self, + *, + node_instance_id: str = "0", + create_fabric_dump: Optional[Union[str, "CreateFabricDump"]] = "False", + **kwargs + ): + """ + :keyword node_instance_id: Required. The instance ID of the target node. If instance ID is + specified the node is restarted only if it matches with the current instance of the node. A + default value of "0" would match any instance ID. The instance ID can be obtained using get + node query. + :paramtype node_instance_id: str + :keyword create_fabric_dump: Specify True to create a dump of the fabric node process. This is + case-sensitive. Possible values include: "False", "True". Default value: "False". + :paramtype create_fabric_dump: str or ~azure.servicefabric.models.CreateFabricDump + """ + super(RestartNodeDescription, self).__init__(**kwargs) + self.node_instance_id = node_instance_id + self.create_fabric_dump = create_fabric_dump + + +class RestartPartitionResult(msrest.serialization.Model): + """Represents information about an operation in a terminal state (Completed or Faulted). + + :ivar error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, + this is an error code indicating the reason. + :vartype error_code: int + :ivar selected_partition: This class returns information about the partition that the + user-induced operation acted upon. + :vartype selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__( + self, + *, + error_code: Optional[int] = None, + selected_partition: Optional["SelectedPartition"] = None, + **kwargs + ): + """ + :keyword error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, + this is an error code indicating the reason. + :paramtype error_code: int + :keyword selected_partition: This class returns information about the partition that the + user-induced operation acted upon. + :paramtype selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + super(RestartPartitionResult, self).__init__(**kwargs) + self.error_code = error_code + self.selected_partition = selected_partition + + +class RestorePartitionDescription(msrest.serialization.Model): + """Specifies the parameters needed to trigger a restore of a specific partition. + + All required parameters must be populated in order to send to Azure. + + :ivar backup_id: Required. Unique backup ID. + :vartype backup_id: str + :ivar backup_location: Required. Location of the backup relative to the backup storage + specified/ configured. + :vartype backup_location: str + :ivar backup_storage: Location of the backup from where the partition will be restored. + :vartype backup_storage: ~azure.servicefabric.models.BackupStorageDescription + """ + + _validation = { + 'backup_id': {'required': True}, + 'backup_location': {'required': True}, + } + + _attribute_map = { + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, + } + + def __init__( + self, + *, + backup_id: str, + backup_location: str, + backup_storage: Optional["BackupStorageDescription"] = None, + **kwargs + ): + """ + :keyword backup_id: Required. Unique backup ID. + :paramtype backup_id: str + :keyword backup_location: Required. Location of the backup relative to the backup storage + specified/ configured. + :paramtype backup_location: str + :keyword backup_storage: Location of the backup from where the partition will be restored. + :paramtype backup_storage: ~azure.servicefabric.models.BackupStorageDescription + """ + super(RestorePartitionDescription, self).__init__(**kwargs) + self.backup_id = backup_id + self.backup_location = backup_location + self.backup_storage = backup_storage + + +class RestoreProgressInfo(msrest.serialization.Model): + """Describes the progress of a restore operation on a partition. + + :ivar restore_state: Represents the current state of the partition restore operation. Possible + values include: "Invalid", "Accepted", "RestoreInProgress", "Success", "Failure", "Timeout". + :vartype restore_state: str or ~azure.servicefabric.models.RestoreState + :ivar time_stamp_utc: Timestamp when operation succeeded or failed. + :vartype time_stamp_utc: ~datetime.datetime + :ivar restored_epoch: Describes the epoch at which the partition is restored. + :vartype restored_epoch: ~azure.servicefabric.models.Epoch + :ivar restored_lsn: Restored LSN. + :vartype restored_lsn: str + :ivar failure_error: Denotes the failure encountered in performing restore operation. + :vartype failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'restore_state': {'key': 'RestoreState', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'restored_epoch': {'key': 'RestoredEpoch', 'type': 'Epoch'}, + 'restored_lsn': {'key': 'RestoredLsn', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__( + self, + *, + restore_state: Optional[Union[str, "RestoreState"]] = None, + time_stamp_utc: Optional[datetime.datetime] = None, + restored_epoch: Optional["Epoch"] = None, + restored_lsn: Optional[str] = None, + failure_error: Optional["FabricErrorError"] = None, + **kwargs + ): + """ + :keyword restore_state: Represents the current state of the partition restore operation. + Possible values include: "Invalid", "Accepted", "RestoreInProgress", "Success", "Failure", + "Timeout". + :paramtype restore_state: str or ~azure.servicefabric.models.RestoreState + :keyword time_stamp_utc: Timestamp when operation succeeded or failed. + :paramtype time_stamp_utc: ~datetime.datetime + :keyword restored_epoch: Describes the epoch at which the partition is restored. + :paramtype restored_epoch: ~azure.servicefabric.models.Epoch + :keyword restored_lsn: Restored LSN. + :paramtype restored_lsn: str + :keyword failure_error: Denotes the failure encountered in performing restore operation. + :paramtype failure_error: ~azure.servicefabric.models.FabricErrorError + """ + super(RestoreProgressInfo, self).__init__(**kwargs) + self.restore_state = restore_state + self.time_stamp_utc = time_stamp_utc + self.restored_epoch = restored_epoch + self.restored_lsn = restored_lsn + self.failure_error = failure_error + + +class ResumeApplicationUpgradeDescription(msrest.serialization.Model): + """Describes the parameters for resuming an unmonitored manual Service Fabric application upgrade. + + All required parameters must be populated in order to send to Azure. + + :ivar upgrade_domain_name: Required. The name of the upgrade domain in which to resume the + upgrade. + :vartype upgrade_domain_name: str + """ + + _validation = { + 'upgrade_domain_name': {'required': True}, + } + + _attribute_map = { + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + } + + def __init__( + self, + *, + upgrade_domain_name: str, + **kwargs + ): + """ + :keyword upgrade_domain_name: Required. The name of the upgrade domain in which to resume the + upgrade. + :paramtype upgrade_domain_name: str + """ + super(ResumeApplicationUpgradeDescription, self).__init__(**kwargs) + self.upgrade_domain_name = upgrade_domain_name + + +class ResumeClusterUpgradeDescription(msrest.serialization.Model): + """Describes the parameters for resuming a cluster upgrade. + + All required parameters must be populated in order to send to Azure. + + :ivar upgrade_domain: Required. The next upgrade domain for this cluster upgrade. + :vartype upgrade_domain: str + """ + + _validation = { + 'upgrade_domain': {'required': True}, + } + + _attribute_map = { + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + } + + def __init__( + self, + *, + upgrade_domain: str, + **kwargs + ): + """ + :keyword upgrade_domain: Required. The next upgrade domain for this cluster upgrade. + :paramtype upgrade_domain: str + """ + super(ResumeClusterUpgradeDescription, self).__init__(**kwargs) + self.upgrade_domain = upgrade_domain + + +class RollingUpgradeUpdateDescription(msrest.serialization.Model): + """Describes the parameters for updating a rolling upgrade of application or cluster. + + All required parameters must be populated in order to send to Azure. + + :ivar rolling_upgrade_mode: Required. The mode used to monitor health during a rolling upgrade. + The values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when + the code version has not changed (the upgrade only changes configuration or data). + :vartype force_restart: bool + :ivar replica_set_check_timeout_in_milliseconds: The maximum amount of time to block processing + of an upgrade domain and prevent loss of availability when there are unexpected issues. When + this timeout expires, processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between + 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :vartype replica_set_check_timeout_in_milliseconds: long + :ivar failure_action: The compensating action to perform when a Monitored upgrade encounters + monitoring policy or health policy violations. + Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will + start rolling back automatically. + Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible + values include: "Invalid", "Rollback", "Manual". + :vartype failure_action: str or ~azure.servicefabric.models.FailureAction + :ivar health_check_wait_duration_in_milliseconds: The amount of time to wait after completing + an upgrade domain before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. + :vartype health_check_wait_duration_in_milliseconds: str + :ivar health_check_stable_duration_in_milliseconds: The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :vartype health_check_stable_duration_in_milliseconds: str + :ivar health_check_retry_timeout_in_milliseconds: The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is executed. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :vartype health_check_retry_timeout_in_milliseconds: str + :ivar upgrade_timeout_in_milliseconds: The amount of time the overall upgrade has to complete + before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the total number of + milliseconds. + :vartype upgrade_timeout_in_milliseconds: str + :ivar upgrade_domain_timeout_in_milliseconds: The amount of time each upgrade domain has to + complete before FailureAction is executed. It is first interpreted as a string representing an + ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + number of milliseconds. + :vartype upgrade_domain_timeout_in_milliseconds: str + :ivar instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster + upgrade, only for those instances which have a non-zero delay duration configured in the + service description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates + that the behavior will entirely depend on the delay configured in the stateless service + description. + :vartype instance_close_delay_duration_in_seconds: long + """ + + _validation = { + 'rolling_upgrade_mode': {'required': True}, + } + + _attribute_map = { + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'replica_set_check_timeout_in_milliseconds': {'key': 'ReplicaSetCheckTimeoutInMilliseconds', 'type': 'long'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, + 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, + 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + } + + def __init__( + self, + *, + rolling_upgrade_mode: Union[str, "UpgradeMode"] = "UnmonitoredAuto", + force_restart: Optional[bool] = False, + replica_set_check_timeout_in_milliseconds: Optional[int] = 42949672925, + failure_action: Optional[Union[str, "FailureAction"]] = None, + health_check_wait_duration_in_milliseconds: Optional[str] = "0", + health_check_stable_duration_in_milliseconds: Optional[str] = "PT0H2M0S", + health_check_retry_timeout_in_milliseconds: Optional[str] = "PT0H10M0S", + upgrade_timeout_in_milliseconds: Optional[str] = "P10675199DT02H48M05.4775807S", + upgrade_domain_timeout_in_milliseconds: Optional[str] = "P10675199DT02H48M05.4775807S", + instance_close_delay_duration_in_seconds: Optional[int] = 4294967295, + **kwargs + ): + """ + :keyword rolling_upgrade_mode: Required. The mode used to monitor health during a rolling + upgrade. The values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. + Possible values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :keyword force_restart: If true, then processes are forcefully restarted during upgrade even + when the code version has not changed (the upgrade only changes configuration or data). + :paramtype force_restart: bool + :keyword replica_set_check_timeout_in_milliseconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :paramtype replica_set_check_timeout_in_milliseconds: long + :keyword failure_action: The compensating action to perform when a Monitored upgrade encounters + monitoring policy or health policy violations. + Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will + start rolling back automatically. + Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible + values include: "Invalid", "Rollback", "Manual". + :paramtype failure_action: str or ~azure.servicefabric.models.FailureAction + :keyword health_check_wait_duration_in_milliseconds: The amount of time to wait after + completing an upgrade domain before applying health policies. It is first interpreted as a + string representing an ISO 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. + :paramtype health_check_wait_duration_in_milliseconds: str + :keyword health_check_stable_duration_in_milliseconds: The amount of time that the application + or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is + first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :paramtype health_check_stable_duration_in_milliseconds: str + :keyword health_check_retry_timeout_in_milliseconds: The amount of time to retry health + evaluation when the application or cluster is unhealthy before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + :paramtype health_check_retry_timeout_in_milliseconds: str + :keyword upgrade_timeout_in_milliseconds: The amount of time the overall upgrade has to + complete before FailureAction is executed. It is first interpreted as a string representing an + ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + number of milliseconds. + :paramtype upgrade_timeout_in_milliseconds: str + :keyword upgrade_domain_timeout_in_milliseconds: The amount of time each upgrade domain has to + complete before FailureAction is executed. It is first interpreted as a string representing an + ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + number of milliseconds. + :paramtype upgrade_domain_timeout_in_milliseconds: str + :keyword instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a + stateless instance is closed, to allow the active requests to drain gracefully. This would be + effective when the instance is closing during the application/cluster + upgrade, only for those instances which have a non-zero delay duration configured in the + service description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates + that the behavior will entirely depend on the delay configured in the stateless service + description. + :paramtype instance_close_delay_duration_in_seconds: long + """ + super(RollingUpgradeUpdateDescription, self).__init__(**kwargs) + self.rolling_upgrade_mode = rolling_upgrade_mode + self.force_restart = force_restart + self.replica_set_check_timeout_in_milliseconds = replica_set_check_timeout_in_milliseconds + self.failure_action = failure_action + self.health_check_wait_duration_in_milliseconds = health_check_wait_duration_in_milliseconds + self.health_check_stable_duration_in_milliseconds = health_check_stable_duration_in_milliseconds + self.health_check_retry_timeout_in_milliseconds = health_check_retry_timeout_in_milliseconds + self.upgrade_timeout_in_milliseconds = upgrade_timeout_in_milliseconds + self.upgrade_domain_timeout_in_milliseconds = upgrade_domain_timeout_in_milliseconds + self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds + + +class RunToCompletionExecutionPolicy(ExecutionPolicy): + """The run to completion execution policy, the service will perform its desired operation and complete successfully. If the service encounters failure, it will restarted based on restart policy specified. If the service completes its operation successfully, it will not be restarted again. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Enumerates the execution policy types for services.Constant filled by + server. Possible values include: "Default", "RunToCompletion". + :vartype type: str or ~azure.servicefabric.models.ExecutionPolicyType + :ivar restart: Required. Enumerates the restart policy for RunToCompletionExecutionPolicy. + Possible values include: "OnFailure", "Never". + :vartype restart: str or ~azure.servicefabric.models.RestartPolicy + """ + + _validation = { + 'type': {'required': True}, + 'restart': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'restart': {'key': 'restart', 'type': 'str'}, + } + + def __init__( + self, + *, + restart: Union[str, "RestartPolicy"], + **kwargs + ): + """ + :keyword restart: Required. Enumerates the restart policy for RunToCompletionExecutionPolicy. + Possible values include: "OnFailure", "Never". + :paramtype restart: str or ~azure.servicefabric.models.RestartPolicy + """ + super(RunToCompletionExecutionPolicy, self).__init__(**kwargs) + self.type = 'RunToCompletion' # type: str + self.restart = restart + + +class SafetyCheckWrapper(msrest.serialization.Model): + """A wrapper for the safety check object. Safety checks are performed by service fabric before continuing with the operations. These checks ensure the availability of the service and the reliability of the state. + + :ivar safety_check: Represents a safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. + :vartype safety_check: ~azure.servicefabric.models.SafetyCheck + """ + + _attribute_map = { + 'safety_check': {'key': 'SafetyCheck', 'type': 'SafetyCheck'}, + } + + def __init__( + self, + *, + safety_check: Optional["SafetyCheck"] = None, + **kwargs + ): + """ + :keyword safety_check: Represents a safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. + :paramtype safety_check: ~azure.servicefabric.models.SafetyCheck + """ + super(SafetyCheckWrapper, self).__init__(**kwargs) + self.safety_check = safety_check + + +class ScalingPolicyDescription(msrest.serialization.Model): + """Describes how the scaling should be performed. + + All required parameters must be populated in order to send to Azure. + + :ivar scaling_trigger: Required. Specifies the trigger associated with this scaling policy. + :vartype scaling_trigger: ~azure.servicefabric.models.ScalingTriggerDescription + :ivar scaling_mechanism: Required. Specifies the mechanism associated with this scaling policy. + :vartype scaling_mechanism: ~azure.servicefabric.models.ScalingMechanismDescription + """ + + _validation = { + 'scaling_trigger': {'required': True}, + 'scaling_mechanism': {'required': True}, + } + + _attribute_map = { + 'scaling_trigger': {'key': 'ScalingTrigger', 'type': 'ScalingTriggerDescription'}, + 'scaling_mechanism': {'key': 'ScalingMechanism', 'type': 'ScalingMechanismDescription'}, + } + + def __init__( + self, + *, + scaling_trigger: "ScalingTriggerDescription", + scaling_mechanism: "ScalingMechanismDescription", + **kwargs + ): + """ + :keyword scaling_trigger: Required. Specifies the trigger associated with this scaling policy. + :paramtype scaling_trigger: ~azure.servicefabric.models.ScalingTriggerDescription + :keyword scaling_mechanism: Required. Specifies the mechanism associated with this scaling + policy. + :paramtype scaling_mechanism: ~azure.servicefabric.models.ScalingMechanismDescription + """ + super(ScalingPolicyDescription, self).__init__(**kwargs) + self.scaling_trigger = scaling_trigger + self.scaling_mechanism = scaling_mechanism + + +class SecondaryReplicatorStatus(ReplicatorStatus): + """Provides statistics about the Service Fabric Replicator, when it is functioning in a ActiveSecondary role. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecondaryActiveReplicatorStatus, SecondaryIdleReplicatorStatus. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. + Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", + "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". + :vartype kind: str or ~azure.servicefabric.models.ReplicaRole + :ivar replication_queue_status: Details about the replication queue on the secondary + replicator. + :vartype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :ivar last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a + replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation message was never + received. + :vartype last_replication_operation_received_time_utc: ~datetime.datetime + :ivar is_in_build: Value that indicates whether the replica is currently being built. + :vartype is_in_build: bool + :ivar copy_queue_status: Details about the copy queue on the secondary replicator. + :vartype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :ivar last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy + operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation message was never + received. + :vartype last_copy_operation_received_time_utc: ~datetime.datetime + :ivar last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an acknowledgment + was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. + :vartype last_acknowledgement_sent_time_utc: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + _subtype_map = { + 'kind': {'ActiveSecondary': 'SecondaryActiveReplicatorStatus', 'IdleSecondary': 'SecondaryIdleReplicatorStatus'} + } + + def __init__( + self, + *, + replication_queue_status: Optional["ReplicatorQueueStatus"] = None, + last_replication_operation_received_time_utc: Optional[datetime.datetime] = None, + is_in_build: Optional[bool] = None, + copy_queue_status: Optional["ReplicatorQueueStatus"] = None, + last_copy_operation_received_time_utc: Optional[datetime.datetime] = None, + last_acknowledgement_sent_time_utc: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword replication_queue_status: Details about the replication queue on the secondary + replicator. + :paramtype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :keyword last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a + replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation message was never + received. + :paramtype last_replication_operation_received_time_utc: ~datetime.datetime + :keyword is_in_build: Value that indicates whether the replica is currently being built. + :paramtype is_in_build: bool + :keyword copy_queue_status: Details about the copy queue on the secondary replicator. + :paramtype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :keyword last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy + operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation message was never + received. + :paramtype last_copy_operation_received_time_utc: ~datetime.datetime + :keyword last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an + acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. + :paramtype last_acknowledgement_sent_time_utc: ~datetime.datetime + """ + super(SecondaryReplicatorStatus, self).__init__(**kwargs) + self.kind = 'SecondaryReplicatorStatus' # type: str + self.replication_queue_status = replication_queue_status + self.last_replication_operation_received_time_utc = last_replication_operation_received_time_utc + self.is_in_build = is_in_build + self.copy_queue_status = copy_queue_status + self.last_copy_operation_received_time_utc = last_copy_operation_received_time_utc + self.last_acknowledgement_sent_time_utc = last_acknowledgement_sent_time_utc + + +class SecondaryActiveReplicatorStatus(SecondaryReplicatorStatus): + """Status of the secondary replicator when it is in active mode and is part of the replica set. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. + Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", + "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". + :vartype kind: str or ~azure.servicefabric.models.ReplicaRole + :ivar replication_queue_status: Details about the replication queue on the secondary + replicator. + :vartype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :ivar last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a + replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation message was never + received. + :vartype last_replication_operation_received_time_utc: ~datetime.datetime + :ivar is_in_build: Value that indicates whether the replica is currently being built. + :vartype is_in_build: bool + :ivar copy_queue_status: Details about the copy queue on the secondary replicator. + :vartype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :ivar last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy + operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation message was never + received. + :vartype last_copy_operation_received_time_utc: ~datetime.datetime + :ivar last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an acknowledgment + was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. + :vartype last_acknowledgement_sent_time_utc: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + replication_queue_status: Optional["ReplicatorQueueStatus"] = None, + last_replication_operation_received_time_utc: Optional[datetime.datetime] = None, + is_in_build: Optional[bool] = None, + copy_queue_status: Optional["ReplicatorQueueStatus"] = None, + last_copy_operation_received_time_utc: Optional[datetime.datetime] = None, + last_acknowledgement_sent_time_utc: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword replication_queue_status: Details about the replication queue on the secondary + replicator. + :paramtype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :keyword last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a + replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation message was never + received. + :paramtype last_replication_operation_received_time_utc: ~datetime.datetime + :keyword is_in_build: Value that indicates whether the replica is currently being built. + :paramtype is_in_build: bool + :keyword copy_queue_status: Details about the copy queue on the secondary replicator. + :paramtype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :keyword last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy + operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation message was never + received. + :paramtype last_copy_operation_received_time_utc: ~datetime.datetime + :keyword last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an + acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. + :paramtype last_acknowledgement_sent_time_utc: ~datetime.datetime + """ + super(SecondaryActiveReplicatorStatus, self).__init__(replication_queue_status=replication_queue_status, last_replication_operation_received_time_utc=last_replication_operation_received_time_utc, is_in_build=is_in_build, copy_queue_status=copy_queue_status, last_copy_operation_received_time_utc=last_copy_operation_received_time_utc, last_acknowledgement_sent_time_utc=last_acknowledgement_sent_time_utc, **kwargs) + self.kind = 'ActiveSecondary' # type: str + + +class SecondaryIdleReplicatorStatus(SecondaryReplicatorStatus): + """Status of the secondary replicator when it is in idle mode and is being built by the primary. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. + Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", + "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". + :vartype kind: str or ~azure.servicefabric.models.ReplicaRole + :ivar replication_queue_status: Details about the replication queue on the secondary + replicator. + :vartype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :ivar last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a + replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation message was never + received. + :vartype last_replication_operation_received_time_utc: ~datetime.datetime + :ivar is_in_build: Value that indicates whether the replica is currently being built. + :vartype is_in_build: bool + :ivar copy_queue_status: Details about the copy queue on the secondary replicator. + :vartype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :ivar last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy + operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation message was never + received. + :vartype last_copy_operation_received_time_utc: ~datetime.datetime + :ivar last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an acknowledgment + was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. + :vartype last_acknowledgement_sent_time_utc: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + replication_queue_status: Optional["ReplicatorQueueStatus"] = None, + last_replication_operation_received_time_utc: Optional[datetime.datetime] = None, + is_in_build: Optional[bool] = None, + copy_queue_status: Optional["ReplicatorQueueStatus"] = None, + last_copy_operation_received_time_utc: Optional[datetime.datetime] = None, + last_acknowledgement_sent_time_utc: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword replication_queue_status: Details about the replication queue on the secondary + replicator. + :paramtype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :keyword last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a + replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation message was never + received. + :paramtype last_replication_operation_received_time_utc: ~datetime.datetime + :keyword is_in_build: Value that indicates whether the replica is currently being built. + :paramtype is_in_build: bool + :keyword copy_queue_status: Details about the copy queue on the secondary replicator. + :paramtype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :keyword last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy + operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation message was never + received. + :paramtype last_copy_operation_received_time_utc: ~datetime.datetime + :keyword last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an + acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. + :paramtype last_acknowledgement_sent_time_utc: ~datetime.datetime + """ + super(SecondaryIdleReplicatorStatus, self).__init__(replication_queue_status=replication_queue_status, last_replication_operation_received_time_utc=last_replication_operation_received_time_utc, is_in_build=is_in_build, copy_queue_status=copy_queue_status, last_copy_operation_received_time_utc=last_copy_operation_received_time_utc, last_acknowledgement_sent_time_utc=last_acknowledgement_sent_time_utc, **kwargs) + self.kind = 'IdleSecondary' # type: str + + +class SecretResourceDescription(msrest.serialization.Model): + """This type describes a secret resource. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: Required. Describes the properties of a secret resource. + :vartype properties: ~azure.servicefabric.models.SecretResourceProperties + :ivar name: Required. Name of the Secret resource. + :vartype name: str + """ + + _validation = { + 'properties': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'SecretResourceProperties'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + properties: "SecretResourceProperties", + name: str, + **kwargs + ): + """ + :keyword properties: Required. Describes the properties of a secret resource. + :paramtype properties: ~azure.servicefabric.models.SecretResourceProperties + :keyword name: Required. Name of the Secret resource. + :paramtype name: str + """ + super(SecretResourceDescription, self).__init__(**kwargs) + self.properties = properties + self.name = name + + +class SecretValue(msrest.serialization.Model): + """This type represents the unencrypted value of the secret. + + :ivar value: The actual value of the secret. + :vartype value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The actual value of the secret. + :paramtype value: str + """ + super(SecretValue, self).__init__(**kwargs) + self.value = value + + +class SecretValueProperties(msrest.serialization.Model): + """This type describes properties of secret value resource. + + :ivar value: The actual value of the secret. + :vartype value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The actual value of the secret. + :paramtype value: str + """ + super(SecretValueProperties, self).__init__(**kwargs) + self.value = value + + +class SecretValueResourceDescription(msrest.serialization.Model): + """This type describes a value of a secret resource. The name of this resource is the version identifier corresponding to this secret value. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Version identifier of the secret value. + :vartype name: str + :ivar value: The actual value of the secret. + :vartype value: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + value: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Required. Version identifier of the secret value. + :paramtype name: str + :keyword value: The actual value of the secret. + :paramtype value: str + """ + super(SecretValueResourceDescription, self).__init__(**kwargs) + self.name = name + self.value = value + + +class SecretValueResourceProperties(SecretValueProperties): + """This type describes properties of a secret value resource. + + :ivar value: The actual value of the secret. + :vartype value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The actual value of the secret. + :paramtype value: str + """ + super(SecretValueResourceProperties, self).__init__(value=value, **kwargs) + + +class SeedNodeSafetyCheck(SafetyCheck): + """Represents a safety check for the seed nodes being performed by service fabric before continuing with node level operations. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(SeedNodeSafetyCheck, self).__init__(**kwargs) + self.kind = 'EnsureSeedNodeQuorum' # type: str + + +class SelectedPartition(msrest.serialization.Model): + """This class returns information about the partition that the user-induced operation acted upon. + + :ivar service_name: The name of the service the partition belongs to. + :vartype service_name: str + :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :vartype partition_id: str + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + *, + service_name: Optional[str] = None, + partition_id: Optional[str] = None, + **kwargs + ): + """ + :keyword service_name: The name of the service the partition belongs to. + :paramtype service_name: str + :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. + This is a randomly generated GUID when the service was created. The partition ID is unique and + does not change for the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :paramtype partition_id: str + """ + super(SelectedPartition, self).__init__(**kwargs) + self.service_name = service_name + self.partition_id = partition_id + + +class ServiceBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information for a specific Service Fabric service specifying what backup policy is being applied and suspend description, if any. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The entity type of a Service Fabric entity such as Application, Service + or a Partition where periodic backups can be enabled.Constant filled by server. Possible values + include: "Invalid", "Partition", "Service", "Application". + :vartype kind: str or ~azure.servicefabric.models.BackupEntityKind + :ivar policy_name: The name of the backup policy which is applicable to this Service Fabric + application or service or partition. + :vartype policy_name: str + :ivar policy_inherited_from: Specifies the scope at which the backup policy is applied. + Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope + :ivar suspension_info: Describes the backup suspension details. + :vartype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :ivar service_name: The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__( + self, + *, + policy_name: Optional[str] = None, + policy_inherited_from: Optional[Union[str, "BackupPolicyScope"]] = None, + suspension_info: Optional["BackupSuspensionInfo"] = None, + service_name: Optional[str] = None, + **kwargs + ): + """ + :keyword policy_name: The name of the backup policy which is applicable to this Service Fabric + application or service or partition. + :paramtype policy_name: str + :keyword policy_inherited_from: Specifies the scope at which the backup policy is applied. + Possible values include: "Invalid", "Partition", "Service", "Application". + :paramtype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope + :keyword suspension_info: Describes the backup suspension details. + :paramtype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :keyword service_name: The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + """ + super(ServiceBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) + self.kind = 'Service' # type: str + self.service_name = service_name + + +class ServiceBackupEntity(BackupEntity): + """Identifies the Service Fabric stateful service which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_kind: Required. The entity type of a Service Fabric entity such as Application, + Service or a Partition where periodic backups can be enabled.Constant filled by server. + Possible values include: "Invalid", "Partition", "Service", "Application". + :vartype entity_kind: str or ~azure.servicefabric.models.BackupEntityKind + :ivar service_name: The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__( + self, + *, + service_name: Optional[str] = None, + **kwargs + ): + """ + :keyword service_name: The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + """ + super(ServiceBackupEntity, self).__init__(**kwargs) + self.entity_kind = 'Service' # type: str + self.service_name = service_name + + +class ServiceCorrelationDescription(msrest.serialization.Model): + """Creates a particular correlation between services. + + All required parameters must be populated in order to send to Azure. + + :ivar scheme: Required. The ServiceCorrelationScheme which describes the relationship between + this service and the service specified via ServiceName. Possible values include: "Invalid", + "Affinity", "AlignedAffinity", "NonAlignedAffinity". + :vartype scheme: str or ~azure.servicefabric.models.ServiceCorrelationScheme + :ivar service_name: Required. The name of the service that the correlation relationship is + established with. + :vartype service_name: str + """ + + _validation = { + 'scheme': {'required': True}, + 'service_name': {'required': True}, + } + + _attribute_map = { + 'scheme': {'key': 'Scheme', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__( + self, + *, + scheme: Union[str, "ServiceCorrelationScheme"], + service_name: str, + **kwargs + ): + """ + :keyword scheme: Required. The ServiceCorrelationScheme which describes the relationship + between this service and the service specified via ServiceName. Possible values include: + "Invalid", "Affinity", "AlignedAffinity", "NonAlignedAffinity". + :paramtype scheme: str or ~azure.servicefabric.models.ServiceCorrelationScheme + :keyword service_name: Required. The name of the service that the correlation relationship is + established with. + :paramtype service_name: str + """ + super(ServiceCorrelationDescription, self).__init__(**kwargs) + self.scheme = scheme + self.service_name = service_name + + +class ServiceEvent(FabricEvent): + """Represents the base for all Service Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ServiceCreatedEvent, ServiceDeletedEvent, ServiceHealthReportExpiredEvent, ServiceNewHealthReportEvent. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar service_id: Required. The identity of the service. This ID is an encoded representation + of the service name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype service_id: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'service_id': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ServiceCreated': 'ServiceCreatedEvent', 'ServiceDeleted': 'ServiceDeletedEvent', 'ServiceHealthReportExpired': 'ServiceHealthReportExpiredEvent', 'ServiceNewHealthReport': 'ServiceNewHealthReportEvent'} + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + service_id: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword service_id: Required. The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to identify the service + resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype service_id: str + """ + super(ServiceEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ServiceEvent' # type: str + self.service_id = service_id + + +class ServiceCreatedEvent(ServiceEvent): + """Service Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar service_id: Required. The identity of the service. This ID is an encoded representation + of the service name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype service_id: str + :ivar service_type_name: Required. Service type name. + :vartype service_type_name: str + :ivar application_name: Required. Application name. + :vartype application_name: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar service_instance: Required. Id of Service instance. + :vartype service_instance: long + :ivar is_stateful: Required. Indicates if Service is stateful. + :vartype is_stateful: bool + :ivar partition_count: Required. Number of partitions. + :vartype partition_count: int + :ivar target_replica_set_size: Required. Size of target replicas set. + :vartype target_replica_set_size: int + :ivar min_replica_set_size: Required. Minimum size of replicas set. + :vartype min_replica_set_size: int + :ivar service_package_version: Required. Version of Service package. + :vartype service_package_version: str + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'service_id': {'required': True}, + 'service_type_name': {'required': True}, + 'application_name': {'required': True}, + 'application_type_name': {'required': True}, + 'service_instance': {'required': True}, + 'is_stateful': {'required': True}, + 'partition_count': {'required': True}, + 'target_replica_set_size': {'required': True}, + 'min_replica_set_size': {'required': True}, + 'service_package_version': {'required': True}, + 'partition_id': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + service_id: str, + service_type_name: str, + application_name: str, + application_type_name: str, + service_instance: int, + is_stateful: bool, + partition_count: int, + target_replica_set_size: int, + min_replica_set_size: int, + service_package_version: str, + partition_id: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword service_id: Required. The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to identify the service + resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype service_id: str + :keyword service_type_name: Required. Service type name. + :paramtype service_type_name: str + :keyword application_name: Required. Application name. + :paramtype application_name: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword service_instance: Required. Id of Service instance. + :paramtype service_instance: long + :keyword is_stateful: Required. Indicates if Service is stateful. + :paramtype is_stateful: bool + :keyword partition_count: Required. Number of partitions. + :paramtype partition_count: int + :keyword target_replica_set_size: Required. Size of target replicas set. + :paramtype target_replica_set_size: int + :keyword min_replica_set_size: Required. Minimum size of replicas set. + :paramtype min_replica_set_size: int + :keyword service_package_version: Required. Version of Service package. + :paramtype service_package_version: str + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + """ + super(ServiceCreatedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) + self.kind = 'ServiceCreated' # type: str + self.service_type_name = service_type_name + self.application_name = application_name + self.application_type_name = application_type_name + self.service_instance = service_instance + self.is_stateful = is_stateful + self.partition_count = partition_count + self.target_replica_set_size = target_replica_set_size + self.min_replica_set_size = min_replica_set_size + self.service_package_version = service_package_version + self.partition_id = partition_id + + +class ServiceDeletedEvent(ServiceEvent): + """Service Deleted event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar service_id: Required. The identity of the service. This ID is an encoded representation + of the service name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype service_id: str + :ivar service_type_name: Required. Service type name. + :vartype service_type_name: str + :ivar application_name: Required. Application name. + :vartype application_name: str + :ivar application_type_name: Required. Application type name. + :vartype application_type_name: str + :ivar service_instance: Required. Id of Service instance. + :vartype service_instance: long + :ivar is_stateful: Required. Indicates if Service is stateful. + :vartype is_stateful: bool + :ivar partition_count: Required. Number of partitions. + :vartype partition_count: int + :ivar target_replica_set_size: Required. Size of target replicas set. + :vartype target_replica_set_size: int + :ivar min_replica_set_size: Required. Minimum size of replicas set. + :vartype min_replica_set_size: int + :ivar service_package_version: Required. Version of Service package. + :vartype service_package_version: str + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'service_id': {'required': True}, + 'service_type_name': {'required': True}, + 'application_name': {'required': True}, + 'application_type_name': {'required': True}, + 'service_instance': {'required': True}, + 'is_stateful': {'required': True}, + 'partition_count': {'required': True}, + 'target_replica_set_size': {'required': True}, + 'min_replica_set_size': {'required': True}, + 'service_package_version': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + service_id: str, + service_type_name: str, + application_name: str, + application_type_name: str, + service_instance: int, + is_stateful: bool, + partition_count: int, + target_replica_set_size: int, + min_replica_set_size: int, + service_package_version: str, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword service_id: Required. The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to identify the service + resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype service_id: str + :keyword service_type_name: Required. Service type name. + :paramtype service_type_name: str + :keyword application_name: Required. Application name. + :paramtype application_name: str + :keyword application_type_name: Required. Application type name. + :paramtype application_type_name: str + :keyword service_instance: Required. Id of Service instance. + :paramtype service_instance: long + :keyword is_stateful: Required. Indicates if Service is stateful. + :paramtype is_stateful: bool + :keyword partition_count: Required. Number of partitions. + :paramtype partition_count: int + :keyword target_replica_set_size: Required. Size of target replicas set. + :paramtype target_replica_set_size: int + :keyword min_replica_set_size: Required. Minimum size of replicas set. + :paramtype min_replica_set_size: int + :keyword service_package_version: Required. Version of Service package. + :paramtype service_package_version: str + """ + super(ServiceDeletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) + self.kind = 'ServiceDeleted' # type: str + self.service_type_name = service_type_name + self.application_name = application_name + self.application_type_name = application_type_name + self.service_instance = service_instance + self.is_stateful = is_stateful + self.partition_count = partition_count + self.target_replica_set_size = target_replica_set_size + self.min_replica_set_size = min_replica_set_size + self.service_package_version = service_package_version + + +class ServiceDescription(msrest.serialization.Model): + """A ServiceDescription contains all of the information necessary to create a service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceDescription, StatelessServiceDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The service kind.Constant filled by server. Possible values + include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar service_name: Required. The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar service_type_name: Required. Name of the service type as specified in the service + manifest. + :vartype service_type_name: str + :ivar initialization_data: The initialization data as an array of bytes. Initialization data is + passed to service instances or replicas when they are created. + :vartype initialization_data: list[int] + :ivar partition_description: Required. The partition description as an object. + :vartype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription + :ivar placement_constraints: The placement constraints as a string. Placement constraints are + boolean expressions on node properties and allow for restricting a service to particular nodes + based on the service requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :vartype placement_constraints: str + :ivar correlation_scheme: The correlation scheme. + :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :ivar service_load_metrics: The service load metrics. + :vartype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: The service placement policies. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", + "Medium", "High", "VeryHigh". + :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :ivar is_default_move_cost_specified: Indicates if the DefaultMoveCost property is specified. + :vartype is_default_move_cost_specified: bool + :ivar service_package_activation_mode: The activation mode of service package to be used for a + service. Possible values include: "SharedProcess", "ExclusiveProcess". + :vartype service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :ivar service_dns_name: The DNS name of the service. It requires the DNS system service to be + enabled in Service Fabric cluster. + :vartype service_dns_name: str + :ivar scaling_policies: Scaling policies for this service. + :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :ivar tags_required_to_place: Tags for placement of this service. + :vartype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription + :ivar tags_required_to_run: Tags for running of this service. + :vartype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription + """ + + _validation = { + 'service_kind': {'required': True}, + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceDescription', 'Stateless': 'StatelessServiceDescription'} + } + + def __init__( + self, + *, + service_name: str, + service_type_name: str, + partition_description: "PartitionSchemeDescription", + application_name: Optional[str] = None, + initialization_data: Optional[List[int]] = None, + placement_constraints: Optional[str] = None, + correlation_scheme: Optional[List["ServiceCorrelationDescription"]] = None, + service_load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, + service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, + default_move_cost: Optional[Union[str, "MoveCost"]] = None, + is_default_move_cost_specified: Optional[bool] = None, + service_package_activation_mode: Optional[Union[str, "ServicePackageActivationMode"]] = None, + service_dns_name: Optional[str] = None, + scaling_policies: Optional[List["ScalingPolicyDescription"]] = None, + tags_required_to_place: Optional["NodeTagsDescription"] = None, + tags_required_to_run: Optional["NodeTagsDescription"] = None, + **kwargs + ): + """ + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword service_name: Required. The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword service_type_name: Required. Name of the service type as specified in the service + manifest. + :paramtype service_type_name: str + :keyword initialization_data: The initialization data as an array of bytes. Initialization data + is passed to service instances or replicas when they are created. + :paramtype initialization_data: list[int] + :keyword partition_description: Required. The partition description as an object. + :paramtype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription + :keyword placement_constraints: The placement constraints as a string. Placement constraints + are boolean expressions on node properties and allow for restricting a service to particular + nodes based on the service requirements. For example, to place a service on nodes where + NodeType is blue specify the following: "NodeColor == blue)". + :paramtype placement_constraints: str + :keyword correlation_scheme: The correlation scheme. + :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :keyword service_load_metrics: The service load metrics. + :paramtype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: The service placement policies. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", + "Low", "Medium", "High", "VeryHigh". + :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :keyword is_default_move_cost_specified: Indicates if the DefaultMoveCost property is + specified. + :paramtype is_default_move_cost_specified: bool + :keyword service_package_activation_mode: The activation mode of service package to be used for + a service. Possible values include: "SharedProcess", "ExclusiveProcess". + :paramtype service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :keyword service_dns_name: The DNS name of the service. It requires the DNS system service to + be enabled in Service Fabric cluster. + :paramtype service_dns_name: str + :keyword scaling_policies: Scaling policies for this service. + :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :keyword tags_required_to_place: Tags for placement of this service. + :paramtype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription + :keyword tags_required_to_run: Tags for running of this service. + :paramtype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription + """ + super(ServiceDescription, self).__init__(**kwargs) + self.service_kind = None # type: Optional[str] + self.application_name = application_name + self.service_name = service_name + self.service_type_name = service_type_name + self.initialization_data = initialization_data + self.partition_description = partition_description + self.placement_constraints = placement_constraints + self.correlation_scheme = correlation_scheme + self.service_load_metrics = service_load_metrics + self.service_placement_policies = service_placement_policies + self.default_move_cost = default_move_cost + self.is_default_move_cost_specified = is_default_move_cost_specified + self.service_package_activation_mode = service_package_activation_mode + self.service_dns_name = service_dns_name + self.scaling_policies = scaling_policies + self.tags_required_to_place = tags_required_to_place + self.tags_required_to_run = tags_required_to_run + + +class ServiceFromTemplateDescription(msrest.serialization.Model): + """Defines description for creating a Service Fabric service from a template defined in the application manifest. + + All required parameters must be populated in order to send to Azure. + + :ivar application_name: Required. The name of the application, including the 'fabric:' URI + scheme. + :vartype application_name: str + :ivar service_name: Required. The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar service_type_name: Required. Name of the service type as specified in the service + manifest. + :vartype service_type_name: str + :ivar initialization_data: The initialization data for the newly created service instance. + :vartype initialization_data: list[int] + :ivar service_package_activation_mode: The activation mode of service package to be used for a + service. Possible values include: "SharedProcess", "ExclusiveProcess". + :vartype service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :ivar service_dns_name: The DNS name of the service. It requires the DNS system service to be + enabled in Service Fabric cluster. + :vartype service_dns_name: str + """ + + _validation = { + 'application_name': {'required': True}, + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + } + + def __init__( + self, + *, + application_name: str, + service_name: str, + service_type_name: str, + initialization_data: Optional[List[int]] = None, + service_package_activation_mode: Optional[Union[str, "ServicePackageActivationMode"]] = None, + service_dns_name: Optional[str] = None, + **kwargs + ): + """ + :keyword application_name: Required. The name of the application, including the 'fabric:' URI + scheme. + :paramtype application_name: str + :keyword service_name: Required. The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword service_type_name: Required. Name of the service type as specified in the service + manifest. + :paramtype service_type_name: str + :keyword initialization_data: The initialization data for the newly created service instance. + :paramtype initialization_data: list[int] + :keyword service_package_activation_mode: The activation mode of service package to be used for + a service. Possible values include: "SharedProcess", "ExclusiveProcess". + :paramtype service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :keyword service_dns_name: The DNS name of the service. It requires the DNS system service to + be enabled in Service Fabric cluster. + :paramtype service_dns_name: str + """ + super(ServiceFromTemplateDescription, self).__init__(**kwargs) + self.application_name = application_name + self.service_name = service_name + self.service_type_name = service_type_name + self.initialization_data = initialization_data + self.service_package_activation_mode = service_package_activation_mode + self.service_dns_name = service_dns_name + + +class ServiceHealth(EntityHealth): + """Information about the health of a Service Fabric service. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar name: The name of the service whose health information is described by this object. + :vartype name: str + :ivar partition_health_states: The list of partition health states associated with the service. + :vartype partition_health_states: list[~azure.servicefabric.models.PartitionHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'partition_health_states': {'key': 'PartitionHealthStates', 'type': '[PartitionHealthState]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + health_events: Optional[List["HealthEvent"]] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + health_statistics: Optional["HealthStatistics"] = None, + name: Optional[str] = None, + partition_health_states: Optional[List["PartitionHealthState"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword name: The name of the service whose health information is described by this object. + :paramtype name: str + :keyword partition_health_states: The list of partition health states associated with the + service. + :paramtype partition_health_states: list[~azure.servicefabric.models.PartitionHealthState] + """ + super(ServiceHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.name = name + self.partition_health_states = partition_health_states + + +class ServiceHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a service, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar service_name: Name of the service whose health evaluation is described by this object. + :vartype service_name: str + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated + health state of the service. The types of the unhealthy evaluations can be + PartitionsHealthEvaluation or EventHealthEvaluation. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + service_name: Optional[str] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword service_name: Name of the service whose health evaluation is described by this object. + :paramtype service_name: str + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current + aggregated health state of the service. The types of the unhealthy evaluations can be + PartitionsHealthEvaluation or EventHealthEvaluation. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(ServiceHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'Service' # type: str + self.service_name = service_name + self.unhealthy_evaluations = unhealthy_evaluations + + +class ServiceHealthReportExpiredEvent(ServiceEvent): + """Service Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar service_id: Required. The identity of the service. This ID is an encoded representation + of the service name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype service_id: str + :ivar instance_id: Required. Id of Service instance. + :vartype instance_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'service_id': {'required': True}, + 'instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + service_id: str, + instance_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword service_id: Required. The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to identify the service + resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype service_id: str + :keyword instance_id: Required. Id of Service instance. + :paramtype instance_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(ServiceHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) + self.kind = 'ServiceHealthReportExpired' # type: str + self.instance_id = instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class ServiceHealthState(EntityHealthState): + """Represents the health state of a service, which contains the service identifier and its aggregated health state. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_name: Name of the service whose health state is represented by this object. + :vartype service_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + service_name: Optional[str] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword service_name: Name of the service whose health state is represented by this object. + :paramtype service_name: str + """ + super(ServiceHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.service_name = service_name + + +class ServiceHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a service, which contains the service name, its aggregated health state and any partitions that respect the filters in the cluster health chunk query description. + + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_name: The name of the service whose health state chunk is provided in this + object. + :vartype service_name: str + :ivar partition_health_state_chunks: The list of partition health state chunks belonging to the + service that respect the filters in the cluster health chunk query description. + :vartype partition_health_state_chunks: + ~azure.servicefabric.models.PartitionHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_health_state_chunks': {'key': 'PartitionHealthStateChunks', 'type': 'PartitionHealthStateChunkList'}, + } + + def __init__( + self, + *, + health_state: Optional[Union[str, "HealthState"]] = None, + service_name: Optional[str] = None, + partition_health_state_chunks: Optional["PartitionHealthStateChunkList"] = None, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword service_name: The name of the service whose health state chunk is provided in this + object. + :paramtype service_name: str + :keyword partition_health_state_chunks: The list of partition health state chunks belonging to + the service that respect the filters in the cluster health chunk query description. + :paramtype partition_health_state_chunks: + ~azure.servicefabric.models.PartitionHealthStateChunkList + """ + super(ServiceHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.service_name = service_name + self.partition_health_state_chunks = partition_health_state_chunks + + +class ServiceHealthStateChunkList(msrest.serialization.Model): + """The list of service health state chunks that respect the input filters in the chunk query. Returned by get cluster health state chunks query. + + :ivar items: The list of service health state chunks that respect the input filters in the + chunk query. + :vartype items: list[~azure.servicefabric.models.ServiceHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[ServiceHealthStateChunk]'}, + } + + def __init__( + self, + *, + items: Optional[List["ServiceHealthStateChunk"]] = None, + **kwargs + ): + """ + :keyword items: The list of service health state chunks that respect the input filters in the + chunk query. + :paramtype items: list[~azure.servicefabric.models.ServiceHealthStateChunk] + """ + super(ServiceHealthStateChunkList, self).__init__(**kwargs) + self.items = items + + +class ServiceHealthStateFilter(msrest.serialization.Model): + """Defines matching criteria to determine whether a service should be included as a child of an application in the cluster health chunk. +The services are only returned if the parent application matches a filter specified in the cluster health chunk query description. +One filter can match zero, one or multiple services, depending on its properties. + + :ivar service_name_filter: The name of the service that matches the filter. The filter is + applied only to the specified service, if it exists. + If the service doesn't exist, no service is returned in the cluster health chunk based on this + filter. + If the service exists, it is included as the application's child if the health state matches + the other filter properties. + If not specified, all services that match the parent filters (if any) are taken into + consideration and matched against the other filter members, like health state filter. + :vartype service_name_filter: str + :ivar health_state_filter: The filter for the health state of the services. It allows selecting + services if they match the desired health states. + The possible values are integer value of one of the following health states. Only services + that match the filter are returned. All services are used to evaluate the cluster aggregated + health state. + If not specified, default value is None, unless the service name is specified. If the filter + has default value and service name is specified, the matching service is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches services with HealthState value of OK (2) + and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :vartype health_state_filter: int + :ivar partition_filters: Defines a list of filters that specify which partitions to be included + in the returned cluster health chunk as children of the service. The partitions are returned + only if the parent service matches a filter. + If the list is empty, no partitions are returned. All the partitions are used to evaluate the + parent service aggregated health state, regardless of the input filters. + The service filter may specify multiple partition filters. + For example, it can specify a filter to return all partitions with health state Error and + another filter to always include a partition identified by its partition ID. + :vartype partition_filters: list[~azure.servicefabric.models.PartitionHealthStateFilter] + """ + + _attribute_map = { + 'service_name_filter': {'key': 'ServiceNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'partition_filters': {'key': 'PartitionFilters', 'type': '[PartitionHealthStateFilter]'}, + } + + def __init__( + self, + *, + service_name_filter: Optional[str] = None, + health_state_filter: Optional[int] = 0, + partition_filters: Optional[List["PartitionHealthStateFilter"]] = None, + **kwargs + ): + """ + :keyword service_name_filter: The name of the service that matches the filter. The filter is + applied only to the specified service, if it exists. + If the service doesn't exist, no service is returned in the cluster health chunk based on this + filter. + If the service exists, it is included as the application's child if the health state matches + the other filter properties. + If not specified, all services that match the parent filters (if any) are taken into + consideration and matched against the other filter members, like health state filter. + :paramtype service_name_filter: str + :keyword health_state_filter: The filter for the health state of the services. It allows + selecting services if they match the desired health states. + The possible values are integer value of one of the following health states. Only services + that match the filter are returned. All services are used to evaluate the cluster aggregated + health state. + If not specified, default value is None, unless the service name is specified. If the filter + has default value and service name is specified, the matching service is returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches services with HealthState value of OK (2) + and Warning (4). + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. + :paramtype health_state_filter: int + :keyword partition_filters: Defines a list of filters that specify which partitions to be + included in the returned cluster health chunk as children of the service. The partitions are + returned only if the parent service matches a filter. + If the list is empty, no partitions are returned. All the partitions are used to evaluate the + parent service aggregated health state, regardless of the input filters. + The service filter may specify multiple partition filters. + For example, it can specify a filter to return all partitions with health state Error and + another filter to always include a partition identified by its partition ID. + :paramtype partition_filters: list[~azure.servicefabric.models.PartitionHealthStateFilter] + """ + super(ServiceHealthStateFilter, self).__init__(**kwargs) + self.service_name_filter = service_name_filter + self.health_state_filter = health_state_filter + self.partition_filters = partition_filters + + +class ServiceIdentity(msrest.serialization.Model): + """Map service identity friendly name to an application identity. + + :ivar name: The identity friendly name. + :vartype name: str + :ivar identity_ref: The application identity name. + :vartype identity_ref: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'identity_ref': {'key': 'identityRef', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + identity_ref: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The identity friendly name. + :paramtype name: str + :keyword identity_ref: The application identity name. + :paramtype identity_ref: str + """ + super(ServiceIdentity, self).__init__(**kwargs) + self.name = name + self.identity_ref = identity_ref + + +class ServiceInfo(msrest.serialization.Model): + """Information about a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceInfo, StatelessServiceInfo. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The identity of the service. This ID is an encoded representation of the service + name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype id: str + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar name: The full name of the service with 'fabric:' URI scheme. + :vartype name: str + :ivar type_name: Name of the service type as specified in the service manifest. + :vartype type_name: str + :ivar manifest_version: The version of the service manifest. + :vartype manifest_version: str + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_status: The status of the application. Possible values include: "Unknown", + "Active", "Upgrading", "Deleting", "Creating", "Failed". + :vartype service_status: str or ~azure.servicefabric.models.ServiceStatus + :ivar is_service_group: Whether the service is in a service group. + :vartype is_service_group: bool + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceInfo', 'Stateless': 'StatelessServiceInfo'} + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type_name: Optional[str] = None, + manifest_version: Optional[str] = None, + health_state: Optional[Union[str, "HealthState"]] = None, + service_status: Optional[Union[str, "ServiceStatus"]] = None, + is_service_group: Optional[bool] = None, + **kwargs + ): + """ + :keyword id: The identity of the service. This ID is an encoded representation of the service + name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype id: str + :keyword name: The full name of the service with 'fabric:' URI scheme. + :paramtype name: str + :keyword type_name: Name of the service type as specified in the service manifest. + :paramtype type_name: str + :keyword manifest_version: The version of the service manifest. + :paramtype manifest_version: str + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword service_status: The status of the application. Possible values include: "Unknown", + "Active", "Upgrading", "Deleting", "Creating", "Failed". + :paramtype service_status: str or ~azure.servicefabric.models.ServiceStatus + :keyword is_service_group: Whether the service is in a service group. + :paramtype is_service_group: bool + """ + super(ServiceInfo, self).__init__(**kwargs) + self.id = id + self.service_kind = None # type: Optional[str] + self.name = name + self.type_name = type_name + self.manifest_version = manifest_version + self.health_state = health_state + self.service_status = service_status + self.is_service_group = is_service_group + + +class ServiceLoadMetricDescription(msrest.serialization.Model): + """Specifies a metric to load balance a service during runtime. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype name: str + :ivar weight: The service load metric relative weight, compared to other metrics configured for + this service, as a number. Possible values include: "Zero", "Low", "Medium", "High". + :vartype weight: str or ~azure.servicefabric.models.ServiceLoadMetricWeight + :ivar primary_default_load: Used only for Stateful services. The default amount of load, as a + number, that this service creates for this metric when it is a Primary replica. + :vartype primary_default_load: int + :ivar secondary_default_load: Used only for Stateful services. The default amount of load, as a + number, that this service creates for this metric when it is a Secondary replica. + :vartype secondary_default_load: int + :ivar auxiliary_default_load: Used only for Stateful services. The default amount of load, as a + number, that this service creates for this metric when it is an Auxiliary replica. + :vartype auxiliary_default_load: int + :ivar default_load: Used only for Stateless services. The default amount of load, as a number, + that this service creates for this metric. + :vartype default_load: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'weight': {'key': 'Weight', 'type': 'str'}, + 'primary_default_load': {'key': 'PrimaryDefaultLoad', 'type': 'int'}, + 'secondary_default_load': {'key': 'SecondaryDefaultLoad', 'type': 'int'}, + 'auxiliary_default_load': {'key': 'AuxiliaryDefaultLoad', 'type': 'int'}, + 'default_load': {'key': 'DefaultLoad', 'type': 'int'}, + } + + def __init__( + self, + *, + name: str, + weight: Optional[Union[str, "ServiceLoadMetricWeight"]] = None, + primary_default_load: Optional[int] = None, + secondary_default_load: Optional[int] = None, + auxiliary_default_load: Optional[int] = None, + default_load: Optional[int] = None, + **kwargs + ): + """ + :keyword 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. + :paramtype name: str + :keyword weight: The service load metric relative weight, compared to other metrics configured + for this service, as a number. Possible values include: "Zero", "Low", "Medium", "High". + :paramtype weight: str or ~azure.servicefabric.models.ServiceLoadMetricWeight + :keyword primary_default_load: Used only for Stateful services. The default amount of load, as + a number, that this service creates for this metric when it is a Primary replica. + :paramtype primary_default_load: int + :keyword secondary_default_load: Used only for Stateful services. The default amount of load, + as a number, that this service creates for this metric when it is a Secondary replica. + :paramtype secondary_default_load: int + :keyword auxiliary_default_load: Used only for Stateful services. The default amount of load, + as a number, that this service creates for this metric when it is an Auxiliary replica. + :paramtype auxiliary_default_load: int + :keyword default_load: Used only for Stateless services. The default amount of load, as a + number, that this service creates for this metric. + :paramtype default_load: int + """ + super(ServiceLoadMetricDescription, self).__init__(**kwargs) + self.name = name + self.weight = weight + self.primary_default_load = primary_default_load + self.secondary_default_load = secondary_default_load + self.auxiliary_default_load = auxiliary_default_load + self.default_load = default_load + + +class ServiceNameInfo(msrest.serialization.Model): + """Information about the service name. + + :ivar id: The identity of the service. This ID is an encoded representation of the service + name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype id: str + :ivar name: The full name of the service with 'fabric:' URI scheme. + :vartype name: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :keyword id: The identity of the service. This ID is an encoded representation of the service + name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype id: str + :keyword name: The full name of the service with 'fabric:' URI scheme. + :paramtype name: str + """ + super(ServiceNameInfo, self).__init__(**kwargs) + self.id = id + self.name = name + + +class ServiceNewHealthReportEvent(ServiceEvent): + """Service Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar service_id: Required. The identity of the service. This ID is an encoded representation + of the service name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype service_id: str + :ivar instance_id: Required. Id of Service instance. + :vartype instance_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'service_id': {'required': True}, + 'instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + service_id: str, + instance_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword service_id: Required. The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to identify the service + resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype service_id: str + :keyword instance_id: Required. Id of Service instance. + :paramtype instance_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(ServiceNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) + self.kind = 'ServiceNewHealthReport' # type: str + self.instance_id = instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class ServicePartitionInfo(msrest.serialization.Model): + """Information about a partition of a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServicePartitionInfo, StatelessServicePartitionInfo. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar partition_status: The status of the service fabric service partition. Possible values + include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". + :vartype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus + :ivar partition_information: Information about the partition identity, partitioning scheme and + keys supported by it. + :vartype partition_information: ~azure.servicefabric.models.PartitionInformation + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServicePartitionInfo', 'Stateless': 'StatelessServicePartitionInfo'} + } + + def __init__( + self, + *, + health_state: Optional[Union[str, "HealthState"]] = None, + partition_status: Optional[Union[str, "ServicePartitionStatus"]] = None, + partition_information: Optional["PartitionInformation"] = None, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword partition_status: The status of the service fabric service partition. Possible values + include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". + :paramtype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus + :keyword partition_information: Information about the partition identity, partitioning scheme + and keys supported by it. + :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation + """ + super(ServicePartitionInfo, self).__init__(**kwargs) + self.service_kind = None # type: Optional[str] + self.health_state = health_state + self.partition_status = partition_status + self.partition_information = partition_information + + +class ServicePlacementPolicyDescription(msrest.serialization.Model): + """Describes the policy to be used for placement of a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, ServicePlacementInvalidDomainPolicyDescription, ServicePlacementNonPartiallyPlaceServicePolicyDescription, ServicePlacementPreferPrimaryDomainPolicyDescription, ServicePlacementRequiredDomainPolicyDescription, ServicePlacementRequireDomainDistributionPolicyDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The type of placement policy for a service fabric service. Following are + the possible values.Constant filled by server. Possible values include: "Invalid", + "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", + "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". + :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'AllowMultipleStatelessInstancesOnNode': 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', 'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ServicePlacementPolicyDescription, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + +class ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service allowing multiple stateless instances of a partition of the service to be placed on a node. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The type of placement policy for a service fabric service. Following are + the possible values.Constant filled by server. Possible values include: "Invalid", + "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", + "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". + :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType + :ivar domain_name: Holdover from other policy descriptions, not used for this policy, values + are ignored by runtime. Keeping it for any backwards-compatibility with clients. + :vartype domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__( + self, + *, + domain_name: Optional[str] = None, + **kwargs + ): + """ + :keyword domain_name: Holdover from other policy descriptions, not used for this policy, values + are ignored by runtime. Keeping it for any backwards-compatibility with clients. + :paramtype domain_name: str + """ + super(ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, self).__init__(**kwargs) + self.type = 'AllowMultipleStatelessInstancesOnNode' # type: str + self.domain_name = domain_name + + +class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service where a particular fault or upgrade domain should not be used for placement of the instances or replicas of that service. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The type of placement policy for a service fabric service. Following are + the possible values.Constant filled by server. Possible values include: "Invalid", + "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", + "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". + :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType + :ivar domain_name: The name of the domain that should not be used for placement. + :vartype domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__( + self, + *, + domain_name: Optional[str] = None, + **kwargs + ): + """ + :keyword domain_name: The name of the domain that should not be used for placement. + :paramtype domain_name: str + """ + super(ServicePlacementInvalidDomainPolicyDescription, self).__init__(**kwargs) + self.type = 'InvalidDomain' # type: str + self.domain_name = domain_name + + +class ServicePlacementNonPartiallyPlaceServicePolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service where all replicas must be able to be placed in order for any replicas to be created. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The type of placement policy for a service fabric service. Following are + the possible values.Constant filled by server. Possible values include: "Invalid", + "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", + "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". + :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ServicePlacementNonPartiallyPlaceServicePolicyDescription, self).__init__(**kwargs) + self.type = 'NonPartiallyPlaceService' # type: str + + +class ServicePlacementPreferPrimaryDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service where the service's Primary replicas should optimally be placed in a particular domain. + +This placement policy is usually used with fault domains in scenarios where the Service Fabric cluster is geographically distributed in order to indicate that a service's primary replica should be located in a particular fault domain, which in geo-distributed scenarios usually aligns with regional or datacenter boundaries. Note that since this is an optimization it is possible that the Primary replica may not end up located in this domain due to failures, capacity limits, or other constraints. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The type of placement policy for a service fabric service. Following are + the possible values.Constant filled by server. Possible values include: "Invalid", + "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", + "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". + :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType + :ivar domain_name: The name of the domain that should used for placement as per this policy. + :vartype domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__( + self, + *, + domain_name: Optional[str] = None, + **kwargs + ): + """ + :keyword domain_name: The name of the domain that should used for placement as per this policy. + :paramtype domain_name: str + """ + super(ServicePlacementPreferPrimaryDomainPolicyDescription, self).__init__(**kwargs) + self.type = 'PreferPrimaryDomain' # type: str + self.domain_name = domain_name + + +class ServicePlacementRequiredDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service where the instances or replicas of that service must be placed in a particular domain. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The type of placement policy for a service fabric service. Following are + the possible values.Constant filled by server. Possible values include: "Invalid", + "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", + "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". + :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType + :ivar domain_name: The name of the domain that should used for placement as per this policy. + :vartype domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__( + self, + *, + domain_name: Optional[str] = None, + **kwargs + ): + """ + :keyword domain_name: The name of the domain that should used for placement as per this policy. + :paramtype domain_name: str + """ + super(ServicePlacementRequiredDomainPolicyDescription, self).__init__(**kwargs) + self.type = 'RequireDomain' # type: str + self.domain_name = domain_name + + +class ServicePlacementRequireDomainDistributionPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service where two replicas from the same partition should never be placed in the same fault or upgrade domain. + +While this is not common it can expose the service to an increased risk of concurrent failures due to unplanned outages or other cases of subsequent/concurrent failures. As an example, consider a case where replicas are deployed across different data center, with one replica per location. In the event that one of the datacenters goes offline, normally the replica that was placed in that datacenter will be packed into one of the remaining datacenters. If this is not desirable then this policy should be set. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The type of placement policy for a service fabric service. Following are + the possible values.Constant filled by server. Possible values include: "Invalid", + "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", + "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". + :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType + :ivar domain_name: The name of the domain that should used for placement as per this policy. + :vartype domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__( + self, + *, + domain_name: Optional[str] = None, + **kwargs + ): + """ + :keyword domain_name: The name of the domain that should used for placement as per this policy. + :paramtype domain_name: str + """ + super(ServicePlacementRequireDomainDistributionPolicyDescription, self).__init__(**kwargs) + self.type = 'RequireDomainDistribution' # type: str + self.domain_name = domain_name + + +class ServiceProperties(msrest.serialization.Model): + """Describes properties of a service resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar description: User readable description of the service. + :vartype description: str + :ivar replica_count: The number of replicas of the service to create. Defaults to 1 if not + specified. + :vartype replica_count: int + :ivar execution_policy: The execution policy of the service. + :vartype execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :ivar auto_scaling_policies: Auto scaling policies. + :vartype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] + :ivar status: Status of the service. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the service. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. Possible values + include: "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the service's health state is not 'Ok', this additional + details from service fabric Health Manager for the user to know why the service is marked + unhealthy. + :vartype unhealthy_evaluation: str + :ivar identity_refs: The service identity list. + :vartype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :ivar dns_name: Dns name of the service. + :vartype dns_name: str + """ + + _validation = { + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'replica_count': {'key': 'replicaCount', 'type': 'int'}, + 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, + 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'health_state': {'key': 'healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, + 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + replica_count: Optional[int] = None, + execution_policy: Optional["ExecutionPolicy"] = None, + auto_scaling_policies: Optional[List["AutoScalingPolicy"]] = None, + identity_refs: Optional[List["ServiceIdentity"]] = None, + dns_name: Optional[str] = None, + **kwargs + ): + """ + :keyword description: User readable description of the service. + :paramtype description: str + :keyword replica_count: The number of replicas of the service to create. Defaults to 1 if not + specified. + :paramtype replica_count: int + :keyword execution_policy: The execution policy of the service. + :paramtype execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :keyword auto_scaling_policies: Auto scaling policies. + :paramtype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] + :keyword identity_refs: The service identity list. + :paramtype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :keyword dns_name: Dns name of the service. + :paramtype dns_name: str + """ + super(ServiceProperties, self).__init__(**kwargs) + self.description = description + self.replica_count = replica_count + self.execution_policy = execution_policy + self.auto_scaling_policies = auto_scaling_policies + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity_refs = identity_refs + self.dns_name = dns_name + + +class ServiceReplicaProperties(msrest.serialization.Model): + """Describes the properties of a service replica. + + All required parameters must be populated in order to send to Azure. + + :ivar os_type: Required. The operation system required by the code in service. Possible values + include: "Linux", "Windows". + :vartype os_type: str or ~azure.servicefabric.models.OperatingSystemType + :ivar 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.). + :vartype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] + :ivar network_refs: The names of the private networks that this service needs to be part of. + :vartype network_refs: list[~azure.servicefabric.models.NetworkRef] + :ivar diagnostics: Reference to sinks in DiagnosticsDescription. + :vartype 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: Union[str, "OperatingSystemType"], + code_packages: List["ContainerCodePackageProperties"], + network_refs: Optional[List["NetworkRef"]] = None, + diagnostics: Optional["DiagnosticsRef"] = None, + **kwargs + ): + """ + :keyword os_type: Required. The operation system required by the code in service. Possible + values include: "Linux", "Windows". + :paramtype os_type: str or ~azure.servicefabric.models.OperatingSystemType + :keyword 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.). + :paramtype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] + :keyword network_refs: The names of the private networks that this service needs to be part of. + :paramtype network_refs: list[~azure.servicefabric.models.NetworkRef] + :keyword diagnostics: Reference to sinks in DiagnosticsDescription. + :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + """ + super(ServiceReplicaProperties, self).__init__(**kwargs) + self.os_type = os_type + self.code_packages = code_packages + self.network_refs = network_refs + self.diagnostics = diagnostics + + +class ServiceReplicaDescription(ServiceReplicaProperties): + """Describes a replica of a service resource. + + All required parameters must be populated in order to send to Azure. + + :ivar os_type: Required. The operation system required by the code in service. Possible values + include: "Linux", "Windows". + :vartype os_type: str or ~azure.servicefabric.models.OperatingSystemType + :ivar 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.). + :vartype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] + :ivar network_refs: The names of the private networks that this service needs to be part of. + :vartype network_refs: list[~azure.servicefabric.models.NetworkRef] + :ivar diagnostics: Reference to sinks in DiagnosticsDescription. + :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :ivar replica_name: Required. Name of the replica. + :vartype 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: Union[str, "OperatingSystemType"], + code_packages: List["ContainerCodePackageProperties"], + replica_name: str, + network_refs: Optional[List["NetworkRef"]] = None, + diagnostics: Optional["DiagnosticsRef"] = None, + **kwargs + ): + """ + :keyword os_type: Required. The operation system required by the code in service. Possible + values include: "Linux", "Windows". + :paramtype os_type: str or ~azure.servicefabric.models.OperatingSystemType + :keyword 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.). + :paramtype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] + :keyword network_refs: The names of the private networks that this service needs to be part of. + :paramtype network_refs: list[~azure.servicefabric.models.NetworkRef] + :keyword diagnostics: Reference to sinks in DiagnosticsDescription. + :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :keyword replica_name: Required. Name of the replica. + :paramtype replica_name: str + """ + super(ServiceReplicaDescription, self).__init__(os_type=os_type, code_packages=code_packages, network_refs=network_refs, diagnostics=diagnostics, **kwargs) + self.replica_name = replica_name + + +class ServiceResourceDescription(msrest.serialization.Model): + """This type describes a service resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of the Service resource. + :vartype name: str + :ivar os_type: Required. The operation system required by the code in service. Possible values + include: "Linux", "Windows". + :vartype os_type: str or ~azure.servicefabric.models.OperatingSystemType + :ivar 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.). + :vartype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] + :ivar network_refs: The names of the private networks that this service needs to be part of. + :vartype network_refs: list[~azure.servicefabric.models.NetworkRef] + :ivar diagnostics: Reference to sinks in DiagnosticsDescription. + :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :ivar description: User readable description of the service. + :vartype description: str + :ivar replica_count: The number of replicas of the service to create. Defaults to 1 if not + specified. + :vartype replica_count: int + :ivar execution_policy: The execution policy of the service. + :vartype execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :ivar auto_scaling_policies: Auto scaling policies. + :vartype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] + :ivar status: Status of the service. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the service. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. Possible values + include: "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the service's health state is not 'Ok', this additional + details from service fabric Health Manager for the user to know why the service is marked + unhealthy. + :vartype unhealthy_evaluation: str + :ivar identity_refs: The service identity list. + :vartype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :ivar dns_name: Dns name of the service. + :vartype dns_name: str + """ + + _validation = { + 'name': {'required': True}, + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'code_packages': {'key': 'properties.codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'properties.networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsRef'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'execution_policy': {'key': 'properties.executionPolicy', 'type': 'ExecutionPolicy'}, + 'auto_scaling_policies': {'key': 'properties.autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, + 'identity_refs': {'key': 'properties.identityRefs', 'type': '[ServiceIdentity]'}, + 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + os_type: Union[str, "OperatingSystemType"], + code_packages: List["ContainerCodePackageProperties"], + network_refs: Optional[List["NetworkRef"]] = None, + diagnostics: Optional["DiagnosticsRef"] = None, + description: Optional[str] = None, + replica_count: Optional[int] = None, + execution_policy: Optional["ExecutionPolicy"] = None, + auto_scaling_policies: Optional[List["AutoScalingPolicy"]] = None, + identity_refs: Optional[List["ServiceIdentity"]] = None, + dns_name: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Required. Name of the Service resource. + :paramtype name: str + :keyword os_type: Required. The operation system required by the code in service. Possible + values include: "Linux", "Windows". + :paramtype os_type: str or ~azure.servicefabric.models.OperatingSystemType + :keyword 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.). + :paramtype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] + :keyword network_refs: The names of the private networks that this service needs to be part of. + :paramtype network_refs: list[~azure.servicefabric.models.NetworkRef] + :keyword diagnostics: Reference to sinks in DiagnosticsDescription. + :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :keyword description: User readable description of the service. + :paramtype description: str + :keyword replica_count: The number of replicas of the service to create. Defaults to 1 if not + specified. + :paramtype replica_count: int + :keyword execution_policy: The execution policy of the service. + :paramtype execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :keyword auto_scaling_policies: Auto scaling policies. + :paramtype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] + :keyword identity_refs: The service identity list. + :paramtype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :keyword dns_name: Dns name of the service. + :paramtype dns_name: str + """ + super(ServiceResourceDescription, self).__init__(**kwargs) + self.name = name + self.os_type = os_type + self.code_packages = code_packages + self.network_refs = network_refs + self.diagnostics = diagnostics + self.description = description + self.replica_count = replica_count + self.execution_policy = execution_policy + self.auto_scaling_policies = auto_scaling_policies + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity_refs = identity_refs + self.dns_name = dns_name + + +class ServiceResourceProperties(ServiceReplicaProperties, ServiceProperties): + """This type describes properties of a service resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: User readable description of the service. + :vartype description: str + :ivar replica_count: The number of replicas of the service to create. Defaults to 1 if not + specified. + :vartype replica_count: int + :ivar execution_policy: The execution policy of the service. + :vartype execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :ivar auto_scaling_policies: Auto scaling policies. + :vartype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] + :ivar status: Status of the service. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the service. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. Possible values + include: "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the service's health state is not 'Ok', this additional + details from service fabric Health Manager for the user to know why the service is marked + unhealthy. + :vartype unhealthy_evaluation: str + :ivar identity_refs: The service identity list. + :vartype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :ivar dns_name: Dns name of the service. + :vartype dns_name: str + :ivar os_type: Required. The operation system required by the code in service. Possible values + include: "Linux", "Windows". + :vartype os_type: str or ~azure.servicefabric.models.OperatingSystemType + :ivar 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.). + :vartype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] + :ivar network_refs: The names of the private networks that this service needs to be part of. + :vartype network_refs: list[~azure.servicefabric.models.NetworkRef] + :ivar diagnostics: Reference to sinks in DiagnosticsDescription. + :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + """ + + _validation = { + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'replica_count': {'key': 'replicaCount', 'type': 'int'}, + 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, + 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'health_state': {'key': 'healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, + 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + '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: Union[str, "OperatingSystemType"], + code_packages: List["ContainerCodePackageProperties"], + description: Optional[str] = None, + replica_count: Optional[int] = None, + execution_policy: Optional["ExecutionPolicy"] = None, + auto_scaling_policies: Optional[List["AutoScalingPolicy"]] = None, + identity_refs: Optional[List["ServiceIdentity"]] = None, + dns_name: Optional[str] = None, + network_refs: Optional[List["NetworkRef"]] = None, + diagnostics: Optional["DiagnosticsRef"] = None, + **kwargs + ): + """ + :keyword description: User readable description of the service. + :paramtype description: str + :keyword replica_count: The number of replicas of the service to create. Defaults to 1 if not + specified. + :paramtype replica_count: int + :keyword execution_policy: The execution policy of the service. + :paramtype execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :keyword auto_scaling_policies: Auto scaling policies. + :paramtype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] + :keyword identity_refs: The service identity list. + :paramtype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :keyword dns_name: Dns name of the service. + :paramtype dns_name: str + :keyword os_type: Required. The operation system required by the code in service. Possible + values include: "Linux", "Windows". + :paramtype os_type: str or ~azure.servicefabric.models.OperatingSystemType + :keyword 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.). + :paramtype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] + :keyword network_refs: The names of the private networks that this service needs to be part of. + :paramtype network_refs: list[~azure.servicefabric.models.NetworkRef] + :keyword diagnostics: Reference to sinks in DiagnosticsDescription. + :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef + """ + super(ServiceResourceProperties, self).__init__(os_type=os_type, code_packages=code_packages, network_refs=network_refs, diagnostics=diagnostics, description=description, replica_count=replica_count, execution_policy=execution_policy, auto_scaling_policies=auto_scaling_policies, identity_refs=identity_refs, dns_name=dns_name, **kwargs) + self.description = description + self.replica_count = replica_count + self.execution_policy = execution_policy + self.auto_scaling_policies = auto_scaling_policies + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity_refs = identity_refs + self.dns_name = dns_name + self.os_type = os_type + self.code_packages = code_packages + self.network_refs = network_refs + self.diagnostics = diagnostics + + +class ServicesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for services of a certain service type belonging to an application, containing health evaluations for each unhealthy service that impacted current aggregated health state. Can be returned when evaluating application health and the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar service_type_name: Name of the service type of the services. + :vartype service_type_name: str + :ivar max_percent_unhealthy_services: Maximum allowed percentage of unhealthy services from the + ServiceTypeHealthPolicy. + :vartype max_percent_unhealthy_services: int + :ivar total_count: Total number of services of the current service type in the application from + the health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy ServiceHealthEvaluation that impacted the aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + service_type_name: Optional[str] = None, + max_percent_unhealthy_services: Optional[int] = None, + total_count: Optional[int] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword service_type_name: Name of the service type of the services. + :paramtype service_type_name: str + :keyword max_percent_unhealthy_services: Maximum allowed percentage of unhealthy services from + the ServiceTypeHealthPolicy. + :paramtype max_percent_unhealthy_services: int + :keyword total_count: Total number of services of the current service type in the application + from the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy ServiceHealthEvaluation that impacted the aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(ServicesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'Services' # type: str + self.service_type_name = service_type_name + self.max_percent_unhealthy_services = max_percent_unhealthy_services + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + + +class ServiceTypeDescription(msrest.serialization.Model): + """Describes a service type defined in the service manifest of a provisioned application type. The properties the ones defined in the service manifest. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceTypeDescription, StatelessServiceTypeDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of service (Stateless or Stateful).Constant filled by server. + Possible values include: "Invalid", "Stateless", "Stateful". + :vartype kind: str or ~azure.servicefabric.models.ServiceKind + :ivar is_stateful: Indicates whether the service type is a stateful service type or a stateless + service type. This property is true if the service type is a stateful service type, false + otherwise. + :vartype is_stateful: bool + :ivar service_type_name: Name of the service type as specified in the service manifest. + :vartype service_type_name: str + :ivar placement_constraints: The placement constraint to be used when instantiating this + service in a Service Fabric cluster. + :vartype placement_constraints: str + :ivar load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: List of service placement policy descriptions. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar extensions: List of service type extensions. + :vartype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + } + + _subtype_map = { + 'kind': {'Stateful': 'StatefulServiceTypeDescription', 'Stateless': 'StatelessServiceTypeDescription'} + } + + def __init__( + self, + *, + is_stateful: Optional[bool] = None, + service_type_name: Optional[str] = None, + placement_constraints: Optional[str] = None, + load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, + service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, + extensions: Optional[List["ServiceTypeExtensionDescription"]] = None, + **kwargs + ): + """ + :keyword is_stateful: Indicates whether the service type is a stateful service type or a + stateless service type. This property is true if the service type is a stateful service type, + false otherwise. + :paramtype is_stateful: bool + :keyword service_type_name: Name of the service type as specified in the service manifest. + :paramtype service_type_name: str + :keyword placement_constraints: The placement constraint to be used when instantiating this + service in a Service Fabric cluster. + :paramtype placement_constraints: str + :keyword load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: List of service placement policy descriptions. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword extensions: List of service type extensions. + :paramtype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + """ + super(ServiceTypeDescription, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.is_stateful = is_stateful + self.service_type_name = service_type_name + self.placement_constraints = placement_constraints + self.load_metrics = load_metrics + self.service_placement_policies = service_placement_policies + self.extensions = extensions + + +class ServiceTypeExtensionDescription(msrest.serialization.Model): + """Describes extension of a service type defined in the service manifest. + + :ivar key: The name of the extension. + :vartype key: str + :ivar value: The extension value. + :vartype value: str + """ + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + } + + def __init__( + self, + *, + key: Optional[str] = None, + value: Optional[str] = None, + **kwargs + ): + """ + :keyword key: The name of the extension. + :paramtype key: str + :keyword value: The extension value. + :paramtype value: str + """ + super(ServiceTypeExtensionDescription, self).__init__(**kwargs) + self.key = key + self.value = value + + +class ServiceTypeHealthPolicy(msrest.serialization.Model): + """Represents the health policy used to evaluate the health of services belonging to a service type. + + :ivar max_percent_unhealthy_partitions_per_service: The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte values from zero to 100 + + The percentage represents the maximum tolerated percentage of partitions that can be unhealthy + before the service is considered in error. + If the percentage is respected but there is at least one unhealthy partition, the health is + evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy partitions over the total + number of partitions in the service. + The computation rounds up to tolerate one failure on small numbers of partitions. Default + percentage is zero. + :vartype max_percent_unhealthy_partitions_per_service: int + :ivar max_percent_unhealthy_replicas_per_partition: The maximum allowed percentage of unhealthy + replicas per partition. Allowed values are Byte values from zero to 100. + + The percentage represents the maximum tolerated percentage of replicas that can be unhealthy + before the partition is considered in error. + If the percentage is respected but there is at least one unhealthy replica, the health is + evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy replicas over the total + number of replicas in the partition. + The computation rounds up to tolerate one failure on small numbers of replicas. Default + percentage is zero. + :vartype max_percent_unhealthy_replicas_per_partition: int + :ivar max_percent_unhealthy_services: The maximum allowed percentage of unhealthy services. + Allowed values are Byte values from zero to 100. + + The percentage represents the maximum tolerated percentage of services that can be unhealthy + before the application is considered in error. + If the percentage is respected but there is at least one unhealthy service, the health is + evaluated as Warning. + This is calculated by dividing the number of unhealthy services of the specific service type + over the total number of services of the specific service type. + The computation rounds up to tolerate one failure on small numbers of services. Default + percentage is zero. + :vartype max_percent_unhealthy_services: int + """ + + _attribute_map = { + 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, + 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, + 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, + } + + def __init__( + self, + *, + max_percent_unhealthy_partitions_per_service: Optional[int] = 0, + max_percent_unhealthy_replicas_per_partition: Optional[int] = 0, + max_percent_unhealthy_services: Optional[int] = 0, + **kwargs + ): + """ + :keyword max_percent_unhealthy_partitions_per_service: The maximum allowed percentage of + unhealthy partitions per service. Allowed values are Byte values from zero to 100 + + The percentage represents the maximum tolerated percentage of partitions that can be unhealthy + before the service is considered in error. + If the percentage is respected but there is at least one unhealthy partition, the health is + evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy partitions over the total + number of partitions in the service. + The computation rounds up to tolerate one failure on small numbers of partitions. Default + percentage is zero. + :paramtype max_percent_unhealthy_partitions_per_service: int + :keyword max_percent_unhealthy_replicas_per_partition: The maximum allowed percentage of + unhealthy replicas per partition. Allowed values are Byte values from zero to 100. + + The percentage represents the maximum tolerated percentage of replicas that can be unhealthy + before the partition is considered in error. + If the percentage is respected but there is at least one unhealthy replica, the health is + evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy replicas over the total + number of replicas in the partition. + The computation rounds up to tolerate one failure on small numbers of replicas. Default + percentage is zero. + :paramtype max_percent_unhealthy_replicas_per_partition: int + :keyword max_percent_unhealthy_services: The maximum allowed percentage of unhealthy services. + Allowed values are Byte values from zero to 100. + + The percentage represents the maximum tolerated percentage of services that can be unhealthy + before the application is considered in error. + If the percentage is respected but there is at least one unhealthy service, the health is + evaluated as Warning. + This is calculated by dividing the number of unhealthy services of the specific service type + over the total number of services of the specific service type. + The computation rounds up to tolerate one failure on small numbers of services. Default + percentage is zero. + :paramtype max_percent_unhealthy_services: int + """ + super(ServiceTypeHealthPolicy, self).__init__(**kwargs) + self.max_percent_unhealthy_partitions_per_service = max_percent_unhealthy_partitions_per_service + self.max_percent_unhealthy_replicas_per_partition = max_percent_unhealthy_replicas_per_partition + self.max_percent_unhealthy_services = max_percent_unhealthy_services + + +class ServiceTypeHealthPolicyMapItem(msrest.serialization.Model): + """Defines an item in ServiceTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :ivar key: Required. The key of the service type health policy map item. This is the name of + the service type. + :vartype key: str + :ivar value: Required. The value of the service type health policy map item. This is the + ServiceTypeHealthPolicy for this service type. + :vartype value: ~azure.servicefabric.models.ServiceTypeHealthPolicy + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ServiceTypeHealthPolicy'}, + } + + def __init__( + self, + *, + key: str, + value: "ServiceTypeHealthPolicy", + **kwargs + ): + """ + :keyword key: Required. The key of the service type health policy map item. This is the name of + the service type. + :paramtype key: str + :keyword value: Required. The value of the service type health policy map item. This is the + ServiceTypeHealthPolicy for this service type. + :paramtype value: ~azure.servicefabric.models.ServiceTypeHealthPolicy + """ + super(ServiceTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = key + self.value = value + + +class ServiceTypeInfo(msrest.serialization.Model): + """Information about a service type that is defined in a service manifest of a provisioned application type. + + :ivar service_type_description: Describes a service type defined in the service manifest of a + provisioned application type. The properties the ones defined in the service manifest. + :vartype service_type_description: ~azure.servicefabric.models.ServiceTypeDescription + :ivar service_manifest_name: The name of the service manifest in which this service type is + defined. + :vartype service_manifest_name: str + :ivar service_manifest_version: The version of the service manifest in which this service type + is defined. + :vartype service_manifest_version: str + :ivar is_service_group: Indicates whether the service is a service group. If it is, the + property value is true otherwise false. + :vartype is_service_group: bool + """ + + _attribute_map = { + 'service_type_description': {'key': 'ServiceTypeDescription', 'type': 'ServiceTypeDescription'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + } + + def __init__( + self, + *, + service_type_description: Optional["ServiceTypeDescription"] = None, + service_manifest_name: Optional[str] = None, + service_manifest_version: Optional[str] = None, + is_service_group: Optional[bool] = None, + **kwargs + ): + """ + :keyword service_type_description: Describes a service type defined in the service manifest of + a provisioned application type. The properties the ones defined in the service manifest. + :paramtype service_type_description: ~azure.servicefabric.models.ServiceTypeDescription + :keyword service_manifest_name: The name of the service manifest in which this service type is + defined. + :paramtype service_manifest_name: str + :keyword service_manifest_version: The version of the service manifest in which this service + type is defined. + :paramtype service_manifest_version: str + :keyword is_service_group: Indicates whether the service is a service group. If it is, the + property value is true otherwise false. + :paramtype is_service_group: bool + """ + super(ServiceTypeInfo, self).__init__(**kwargs) + self.service_type_description = service_type_description + self.service_manifest_name = service_manifest_name + self.service_manifest_version = service_manifest_version + self.is_service_group = is_service_group + + +class ServiceTypeManifest(msrest.serialization.Model): + """Contains the manifest describing a service type registered as part of an application in a Service Fabric cluster. + + :ivar manifest: The XML manifest as a string. + :vartype manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__( + self, + *, + manifest: Optional[str] = None, + **kwargs + ): + """ + :keyword manifest: The XML manifest as a string. + :paramtype manifest: str + """ + super(ServiceTypeManifest, self).__init__(**kwargs) + self.manifest = manifest + + +class ServiceUpdateDescription(msrest.serialization.Model): + """A ServiceUpdateDescription contains all of the information necessary to update a service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceUpdateDescription, StatelessServiceUpdateDescription. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The service kind.Constant filled by server. Possible values + include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and + QuorumLossWaitDuration (4) are set. + + + * None - Does not indicate any other properties are set. The value is zero. + * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property + (for Stateful services) or the InstanceCount property (for Stateless services) is set. The + value is 1. + * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The + value is 2. + * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is + 4. + * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The + value is 8. + * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. + * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. + * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is + 64. + * Correlation - Indicates the CorrelationScheme property is set. The value is 128. + * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. + * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. + * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. + * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The + value is 2048. + * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. + * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is + 8192. + * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 16384. + * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 32768. + * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value + is 65536. + * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. + * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. + * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. + :vartype flags: str + :ivar placement_constraints: The placement constraints as a string. Placement constraints are + boolean expressions on node properties and allow for restricting a service to particular nodes + based on the service requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :vartype placement_constraints: str + :ivar correlation_scheme: The correlation scheme. + :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :ivar load_metrics: The service load metrics. + :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: The service placement policies. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", + "Medium", "High", "VeryHigh". + :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :ivar scaling_policies: Scaling policies for this service. + :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :ivar service_dns_name: The DNS name of the service. + :vartype service_dns_name: str + :ivar tags_for_placement: Tags for placement of this service. + :vartype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :ivar tags_for_running: Tags for running of this service. + :vartype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceUpdateDescription', 'Stateless': 'StatelessServiceUpdateDescription'} + } + + def __init__( + self, + *, + flags: Optional[str] = None, + placement_constraints: Optional[str] = None, + correlation_scheme: Optional[List["ServiceCorrelationDescription"]] = None, + load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, + service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, + default_move_cost: Optional[Union[str, "MoveCost"]] = None, + scaling_policies: Optional[List["ScalingPolicyDescription"]] = None, + service_dns_name: Optional[str] = None, + tags_for_placement: Optional["NodeTagsDescription"] = None, + tags_for_running: Optional["NodeTagsDescription"] = None, + **kwargs + ): + """ + :keyword flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and + QuorumLossWaitDuration (4) are set. + + + * None - Does not indicate any other properties are set. The value is zero. + * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property + (for Stateful services) or the InstanceCount property (for Stateless services) is set. The + value is 1. + * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The + value is 2. + * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is + 4. + * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The + value is 8. + * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. + * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. + * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is + 64. + * Correlation - Indicates the CorrelationScheme property is set. The value is 128. + * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. + * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. + * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. + * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The + value is 2048. + * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. + * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is + 8192. + * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 16384. + * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 32768. + * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value + is 65536. + * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. + * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. + * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. + :paramtype flags: str + :keyword placement_constraints: The placement constraints as a string. Placement constraints + are boolean expressions on node properties and allow for restricting a service to particular + nodes based on the service requirements. For example, to place a service on nodes where + NodeType is blue specify the following: "NodeColor == blue)". + :paramtype placement_constraints: str + :keyword correlation_scheme: The correlation scheme. + :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :keyword load_metrics: The service load metrics. + :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: The service placement policies. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", + "Low", "Medium", "High", "VeryHigh". + :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :keyword scaling_policies: Scaling policies for this service. + :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :keyword service_dns_name: The DNS name of the service. + :paramtype service_dns_name: str + :keyword tags_for_placement: Tags for placement of this service. + :paramtype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :keyword tags_for_running: Tags for running of this service. + :paramtype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + """ + super(ServiceUpdateDescription, self).__init__(**kwargs) + self.service_kind = None # type: Optional[str] + self.flags = flags + self.placement_constraints = placement_constraints + self.correlation_scheme = correlation_scheme + self.load_metrics = load_metrics + self.service_placement_policies = service_placement_policies + self.default_move_cost = default_move_cost + self.scaling_policies = scaling_policies + self.service_dns_name = service_dns_name + self.tags_for_placement = tags_for_placement + self.tags_for_running = tags_for_running + + +class ServiceUpgradeProgress(msrest.serialization.Model): + """Information about how many replicas are completed or pending for a specific service during upgrade. + + :ivar service_name: Name of the Service resource. + :vartype service_name: str + :ivar completed_replica_count: The number of replicas that completes the upgrade in the + service. + :vartype completed_replica_count: str + :ivar pending_replica_count: The number of replicas that are waiting to be upgraded in the + service. + :vartype pending_replica_count: str + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'completed_replica_count': {'key': 'CompletedReplicaCount', 'type': 'str'}, + 'pending_replica_count': {'key': 'PendingReplicaCount', 'type': 'str'}, + } + + def __init__( + self, + *, + service_name: Optional[str] = None, + completed_replica_count: Optional[str] = None, + pending_replica_count: Optional[str] = None, + **kwargs + ): + """ + :keyword service_name: Name of the Service resource. + :paramtype service_name: str + :keyword completed_replica_count: The number of replicas that completes the upgrade in the + service. + :paramtype completed_replica_count: str + :keyword pending_replica_count: The number of replicas that are waiting to be upgraded in the + service. + :paramtype pending_replica_count: str + """ + super(ServiceUpgradeProgress, self).__init__(**kwargs) + self.service_name = service_name + self.completed_replica_count = completed_replica_count + self.pending_replica_count = pending_replica_count + + +class Setting(msrest.serialization.Model): + """Describes a setting for the container. The setting file path can be fetched from environment variable "Fabric_SettingPath". The path for Windows container is "C:\secrets". The path for Linux container is "/var/secrets". + + :ivar type: The type of the setting being given in value. Possible values include: "ClearText", + "KeyVaultReference", "SecretValueReference". Default value: "ClearText". + :vartype type: str or ~azure.servicefabric.models.SettingType + :ivar name: The name of the setting. + :vartype name: str + :ivar value: The value of the setting, will be processed based on the type provided. + :vartype value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "SettingType"]] = "ClearText", + name: Optional[str] = None, + value: Optional[str] = None, + **kwargs + ): + """ + :keyword type: The type of the setting being given in value. Possible values include: + "ClearText", "KeyVaultReference", "SecretValueReference". Default value: "ClearText". + :paramtype type: str or ~azure.servicefabric.models.SettingType + :keyword name: The name of the setting. + :paramtype name: str + :keyword value: The value of the setting, will be processed based on the type provided. + :paramtype value: str + """ + super(Setting, self).__init__(**kwargs) + self.type = type + self.name = name + self.value = value + + +class SingletonPartitionInformation(PartitionInformation): + """Information about a partition that is singleton. The services with singleton partitioning scheme are effectively non-partitioned. They only have one partition. + + All required parameters must be populated in order to send to Azure. + + :ivar service_partition_kind: Required. The kind of partitioning scheme used to partition the + service.Constant filled by server. Possible values include: "Invalid", "Singleton", + "Int64Range", "Named". + :vartype service_partition_kind: str or ~azure.servicefabric.models.ServicePartitionKind + :ivar id: An internal ID used by Service Fabric to uniquely identify a partition. This is a + randomly generated GUID when the service was created. The partition ID is unique and does not + change for the lifetime of the service. If the same service was deleted and recreated the IDs + of its partitions would be different. + :vartype id: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: An internal ID used by Service Fabric to uniquely identify a partition. This is a + randomly generated GUID when the service was created. The partition ID is unique and does not + change for the lifetime of the service. If the same service was deleted and recreated the IDs + of its partitions would be different. + :paramtype id: str + """ + super(SingletonPartitionInformation, self).__init__(id=id, **kwargs) + self.service_partition_kind = 'Singleton' # type: str + + +class SingletonPartitionSchemeDescription(PartitionSchemeDescription): + """Describes the partition scheme of a singleton-partitioned, or non-partitioned service. + + All required parameters must be populated in order to send to Azure. + + :ivar partition_scheme: Required. Specifies how the service is partitioned.Constant filled by + server. Possible values include: "Invalid", "Singleton", "UniformInt64Range", "Named". + :vartype partition_scheme: str or ~azure.servicefabric.models.PartitionScheme + """ + + _validation = { + 'partition_scheme': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(SingletonPartitionSchemeDescription, self).__init__(**kwargs) + self.partition_scheme = 'Singleton' # type: str + + +class StartClusterUpgradeDescription(msrest.serialization.Model): + """Describes the parameters for starting a cluster upgrade. + + :ivar code_version: The cluster code version. + :vartype code_version: str + :ivar config_version: The cluster configuration version. + :vartype config_version: str + :ivar upgrade_kind: The kind of upgrade out of the following possible values. Possible values + include: "Invalid", "Rolling". Default value: "Rolling". + :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :vartype upgrade_replica_set_check_timeout_in_seconds: long + :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when + the code version has not changed (the upgrade only changes configuration or data). + :vartype force_restart: bool + :ivar sort_order: Defines the order in which an upgrade proceeds through the cluster. Possible + values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + :vartype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. + :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster + or of a cluster node. + :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :ivar enable_delta_health_evaluation: When true, enables delta health evaluation rather than + absolute health evaluation after completion of each upgrade domain. + :vartype enable_delta_health_evaluation: bool + :ivar cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of the + cluster during a cluster upgrade. + :vartype cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :ivar application_health_policy_map: Defines the application health policy map used to evaluate + the health of an application or one of its children entities. + :vartype application_health_policy_map: ~azure.servicefabric.models.ApplicationHealthPolicies + :ivar instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster + upgrade, only for those instances which have a non-zero delay duration configured in the + service description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates + that the behavior will entirely depend on the delay configured in the stateless service + description. + :vartype instance_close_delay_duration_in_seconds: long + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + } + + def __init__( + self, + *, + code_version: Optional[str] = None, + config_version: Optional[str] = None, + upgrade_kind: Optional[Union[str, "UpgradeKind"]] = "Rolling", + rolling_upgrade_mode: Optional[Union[str, "UpgradeMode"]] = "UnmonitoredAuto", + upgrade_replica_set_check_timeout_in_seconds: Optional[int] = 42949672925, + force_restart: Optional[bool] = False, + sort_order: Optional[Union[str, "UpgradeSortOrder"]] = "Default", + monitoring_policy: Optional["MonitoringPolicyDescription"] = None, + cluster_health_policy: Optional["ClusterHealthPolicy"] = None, + enable_delta_health_evaluation: Optional[bool] = None, + cluster_upgrade_health_policy: Optional["ClusterUpgradeHealthPolicyObject"] = None, + application_health_policy_map: Optional["ApplicationHealthPolicies"] = None, + instance_close_delay_duration_in_seconds: Optional[int] = 4294967295, + **kwargs + ): + """ + :keyword code_version: The cluster code version. + :paramtype code_version: str + :keyword config_version: The cluster configuration version. + :paramtype config_version: str + :keyword upgrade_kind: The kind of upgrade out of the following possible values. Possible + values include: "Invalid", "Rolling". Default value: "Rolling". + :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible + values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", + "UnmonitoredDeferred". Default value: "UnmonitoredAuto". + :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block + processing of an upgrade domain and prevent loss of availability when there are unexpected + issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + availability loss issues. The timeout is reset at the start of each upgrade domain. Valid + values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + :paramtype upgrade_replica_set_check_timeout_in_seconds: long + :keyword force_restart: If true, then processes are forcefully restarted during upgrade even + when the code version has not changed (the upgrade only changes configuration or data). + :paramtype force_restart: bool + :keyword sort_order: Defines the order in which an upgrade proceeds through the cluster. + Possible values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + :paramtype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored + mode. + :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription + :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the + cluster or of a cluster node. + :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :keyword enable_delta_health_evaluation: When true, enables delta health evaluation rather than + absolute health evaluation after completion of each upgrade domain. + :paramtype enable_delta_health_evaluation: bool + :keyword cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of + the cluster during a cluster upgrade. + :paramtype cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :keyword application_health_policy_map: Defines the application health policy map used to + evaluate the health of an application or one of its children entities. + :paramtype application_health_policy_map: ~azure.servicefabric.models.ApplicationHealthPolicies + :keyword instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a + stateless instance is closed, to allow the active requests to drain gracefully. This would be + effective when the instance is closing during the application/cluster + upgrade, only for those instances which have a non-zero delay duration configured in the + service description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates + that the behavior will entirely depend on the delay configured in the stateless service + description. + :paramtype instance_close_delay_duration_in_seconds: long + """ + super(StartClusterUpgradeDescription, self).__init__(**kwargs) + self.code_version = code_version + self.config_version = config_version + self.upgrade_kind = upgrade_kind + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.force_restart = force_restart + self.sort_order = sort_order + self.monitoring_policy = monitoring_policy + self.cluster_health_policy = cluster_health_policy + self.enable_delta_health_evaluation = enable_delta_health_evaluation + self.cluster_upgrade_health_policy = cluster_upgrade_health_policy + self.application_health_policy_map = application_health_policy_map + self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds + + +class StartedChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos is started. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values + include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", + "Stopped". + :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind + :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :vartype time_stamp_utc: ~datetime.datetime + :ivar chaos_parameters: Defines all the parameters to configure a Chaos run. + :vartype chaos_parameters: ~azure.servicefabric.models.ChaosParameters + """ + + _validation = { + 'kind': {'required': True}, + 'time_stamp_utc': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, + } + + def __init__( + self, + *, + time_stamp_utc: datetime.datetime, + chaos_parameters: Optional["ChaosParameters"] = None, + **kwargs + ): + """ + :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :paramtype time_stamp_utc: ~datetime.datetime + :keyword chaos_parameters: Defines all the parameters to configure a Chaos run. + :paramtype chaos_parameters: ~azure.servicefabric.models.ChaosParameters + """ + super(StartedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.kind = 'Started' # type: str + self.chaos_parameters = chaos_parameters + + +class StatefulReplicaHealthReportExpiredEvent(ReplicaEvent): + """Stateful Replica Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :vartype replica_id: long + :ivar replica_instance_id: Required. Id of Replica instance. + :vartype replica_instance_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'replica_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + partition_id: str, + replica_id: int, + replica_instance_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: long + :keyword replica_instance_id: Required. Id of Replica instance. + :paramtype replica_instance_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(StatefulReplicaHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.kind = 'StatefulReplicaHealthReportExpired' # type: str + self.replica_instance_id = replica_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class StatefulReplicaNewHealthReportEvent(ReplicaEvent): + """Stateful Replica Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :vartype replica_id: long + :ivar replica_instance_id: Required. Id of Replica instance. + :vartype replica_instance_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'replica_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + partition_id: str, + replica_id: int, + replica_instance_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: long + :keyword replica_instance_id: Required. Id of Replica instance. + :paramtype replica_instance_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(StatefulReplicaNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.kind = 'StatefulReplicaNewHealthReport' # type: str + self.replica_instance_id = replica_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class StatefulServiceDescription(ServiceDescription): + """Describes a stateful service. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The service kind.Constant filled by server. Possible values + include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar service_name: Required. The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar service_type_name: Required. Name of the service type as specified in the service + manifest. + :vartype service_type_name: str + :ivar initialization_data: The initialization data as an array of bytes. Initialization data is + passed to service instances or replicas when they are created. + :vartype initialization_data: list[int] + :ivar partition_description: Required. The partition description as an object. + :vartype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription + :ivar placement_constraints: The placement constraints as a string. Placement constraints are + boolean expressions on node properties and allow for restricting a service to particular nodes + based on the service requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :vartype placement_constraints: str + :ivar correlation_scheme: The correlation scheme. + :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :ivar service_load_metrics: The service load metrics. + :vartype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: The service placement policies. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", + "Medium", "High", "VeryHigh". + :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :ivar is_default_move_cost_specified: Indicates if the DefaultMoveCost property is specified. + :vartype is_default_move_cost_specified: bool + :ivar service_package_activation_mode: The activation mode of service package to be used for a + service. Possible values include: "SharedProcess", "ExclusiveProcess". + :vartype service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :ivar service_dns_name: The DNS name of the service. It requires the DNS system service to be + enabled in Service Fabric cluster. + :vartype service_dns_name: str + :ivar scaling_policies: Scaling policies for this service. + :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :ivar tags_required_to_place: Tags for placement of this service. + :vartype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription + :ivar tags_required_to_run: Tags for running of this service. + :vartype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription + :ivar target_replica_set_size: Required. The target replica set size as a number. + :vartype target_replica_set_size: int + :ivar min_replica_set_size: Required. The minimum replica set size as a number. + :vartype min_replica_set_size: int + :ivar has_persisted_state: Required. A flag indicating whether this is a persistent service + which stores states on the local disk. If it is then the value of this property is true, if not + it is false. + :vartype has_persisted_state: bool + :ivar flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then the flags for QuorumLossWaitDuration (2) and + StandByReplicaKeepDuration(4) are set. + + + * None - Does not indicate any other properties are set. The value is zero. + * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The + value is 1. + * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is + 2. + * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The + value is 4. + * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The + value is 8. + * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value + is 16. + :vartype flags: int + :ivar replica_restart_wait_duration_seconds: The duration, in seconds, between when a replica + goes down and when a new replica is created. + :vartype replica_restart_wait_duration_seconds: long + :ivar quorum_loss_wait_duration_seconds: The maximum duration, in seconds, for which a + partition is allowed to be in a state of quorum loss. + :vartype quorum_loss_wait_duration_seconds: long + :ivar stand_by_replica_keep_duration_seconds: The definition on how long StandBy replicas + should be maintained before being removed. + :vartype stand_by_replica_keep_duration_seconds: long + :ivar service_placement_time_limit_seconds: The duration for which replicas can stay InBuild + before reporting that build is stuck. + :vartype service_placement_time_limit_seconds: long + :ivar drop_source_replica_on_move: Indicates whether to drop source Secondary replica even if + the target replica has not finished build. If desired behavior is to drop it as soon as + possible the value of this property is true, if not it is false. + :vartype drop_source_replica_on_move: bool + :ivar replica_lifecycle_description: Defines how replicas of this service will behave during + ther lifecycle. + :vartype replica_lifecycle_description: ~azure.servicefabric.models.ReplicaLifecycleDescription + :ivar auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary + replicas, the following must be true: AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :vartype auxiliary_replica_count: int + """ + + _validation = { + 'service_kind': {'required': True}, + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + 'target_replica_set_size': {'required': True, 'minimum': 1}, + 'min_replica_set_size': {'required': True, 'minimum': 1}, + 'has_persisted_state': {'required': True}, + 'replica_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'quorum_loss_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'stand_by_replica_keep_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'service_placement_time_limit_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'auxiliary_replica_count': {'minimum': 0}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'long'}, + 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'long'}, + 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'long'}, + 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'long'}, + 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, + 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, + } + + def __init__( + self, + *, + service_name: str, + service_type_name: str, + partition_description: "PartitionSchemeDescription", + target_replica_set_size: int, + min_replica_set_size: int, + has_persisted_state: bool, + application_name: Optional[str] = None, + initialization_data: Optional[List[int]] = None, + placement_constraints: Optional[str] = None, + correlation_scheme: Optional[List["ServiceCorrelationDescription"]] = None, + service_load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, + service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, + default_move_cost: Optional[Union[str, "MoveCost"]] = None, + is_default_move_cost_specified: Optional[bool] = None, + service_package_activation_mode: Optional[Union[str, "ServicePackageActivationMode"]] = None, + service_dns_name: Optional[str] = None, + scaling_policies: Optional[List["ScalingPolicyDescription"]] = None, + tags_required_to_place: Optional["NodeTagsDescription"] = None, + tags_required_to_run: Optional["NodeTagsDescription"] = None, + flags: Optional[int] = None, + replica_restart_wait_duration_seconds: Optional[int] = None, + quorum_loss_wait_duration_seconds: Optional[int] = None, + stand_by_replica_keep_duration_seconds: Optional[int] = None, + service_placement_time_limit_seconds: Optional[int] = None, + drop_source_replica_on_move: Optional[bool] = None, + replica_lifecycle_description: Optional["ReplicaLifecycleDescription"] = None, + auxiliary_replica_count: Optional[int] = None, + **kwargs + ): + """ + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword service_name: Required. The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword service_type_name: Required. Name of the service type as specified in the service + manifest. + :paramtype service_type_name: str + :keyword initialization_data: The initialization data as an array of bytes. Initialization data + is passed to service instances or replicas when they are created. + :paramtype initialization_data: list[int] + :keyword partition_description: Required. The partition description as an object. + :paramtype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription + :keyword placement_constraints: The placement constraints as a string. Placement constraints + are boolean expressions on node properties and allow for restricting a service to particular + nodes based on the service requirements. For example, to place a service on nodes where + NodeType is blue specify the following: "NodeColor == blue)". + :paramtype placement_constraints: str + :keyword correlation_scheme: The correlation scheme. + :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :keyword service_load_metrics: The service load metrics. + :paramtype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: The service placement policies. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", + "Low", "Medium", "High", "VeryHigh". + :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :keyword is_default_move_cost_specified: Indicates if the DefaultMoveCost property is + specified. + :paramtype is_default_move_cost_specified: bool + :keyword service_package_activation_mode: The activation mode of service package to be used for + a service. Possible values include: "SharedProcess", "ExclusiveProcess". + :paramtype service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :keyword service_dns_name: The DNS name of the service. It requires the DNS system service to + be enabled in Service Fabric cluster. + :paramtype service_dns_name: str + :keyword scaling_policies: Scaling policies for this service. + :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :keyword tags_required_to_place: Tags for placement of this service. + :paramtype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription + :keyword tags_required_to_run: Tags for running of this service. + :paramtype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription + :keyword target_replica_set_size: Required. The target replica set size as a number. + :paramtype target_replica_set_size: int + :keyword min_replica_set_size: Required. The minimum replica set size as a number. + :paramtype min_replica_set_size: int + :keyword has_persisted_state: Required. A flag indicating whether this is a persistent service + which stores states on the local disk. If it is then the value of this property is true, if not + it is false. + :paramtype has_persisted_state: bool + :keyword flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then the flags for QuorumLossWaitDuration (2) and + StandByReplicaKeepDuration(4) are set. + + + * None - Does not indicate any other properties are set. The value is zero. + * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The + value is 1. + * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is + 2. + * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The + value is 4. + * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The + value is 8. + * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value + is 16. + :paramtype flags: int + :keyword replica_restart_wait_duration_seconds: The duration, in seconds, between when a + replica goes down and when a new replica is created. + :paramtype replica_restart_wait_duration_seconds: long + :keyword quorum_loss_wait_duration_seconds: The maximum duration, in seconds, for which a + partition is allowed to be in a state of quorum loss. + :paramtype quorum_loss_wait_duration_seconds: long + :keyword stand_by_replica_keep_duration_seconds: The definition on how long StandBy replicas + should be maintained before being removed. + :paramtype stand_by_replica_keep_duration_seconds: long + :keyword service_placement_time_limit_seconds: The duration for which replicas can stay InBuild + before reporting that build is stuck. + :paramtype service_placement_time_limit_seconds: long + :keyword drop_source_replica_on_move: Indicates whether to drop source Secondary replica even + if the target replica has not finished build. If desired behavior is to drop it as soon as + possible the value of this property is true, if not it is false. + :paramtype drop_source_replica_on_move: bool + :keyword replica_lifecycle_description: Defines how replicas of this service will behave during + ther lifecycle. + :paramtype replica_lifecycle_description: + ~azure.servicefabric.models.ReplicaLifecycleDescription + :keyword auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary + replicas, the following must be true: AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :paramtype auxiliary_replica_count: int + """ + super(StatefulServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, tags_required_to_place=tags_required_to_place, tags_required_to_run=tags_required_to_run, **kwargs) + self.service_kind = 'Stateful' # type: str + self.target_replica_set_size = target_replica_set_size + self.min_replica_set_size = min_replica_set_size + self.has_persisted_state = has_persisted_state + self.flags = flags + self.replica_restart_wait_duration_seconds = replica_restart_wait_duration_seconds + self.quorum_loss_wait_duration_seconds = quorum_loss_wait_duration_seconds + self.stand_by_replica_keep_duration_seconds = stand_by_replica_keep_duration_seconds + self.service_placement_time_limit_seconds = service_placement_time_limit_seconds + self.drop_source_replica_on_move = drop_source_replica_on_move + self.replica_lifecycle_description = replica_lifecycle_description + self.auxiliary_replica_count = auxiliary_replica_count + + +class StatefulServiceInfo(ServiceInfo): + """Information about a stateful Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The identity of the service. This ID is an encoded representation of the service + name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype id: str + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar name: The full name of the service with 'fabric:' URI scheme. + :vartype name: str + :ivar type_name: Name of the service type as specified in the service manifest. + :vartype type_name: str + :ivar manifest_version: The version of the service manifest. + :vartype manifest_version: str + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_status: The status of the application. Possible values include: "Unknown", + "Active", "Upgrading", "Deleting", "Creating", "Failed". + :vartype service_status: str or ~azure.servicefabric.models.ServiceStatus + :ivar is_service_group: Whether the service is in a service group. + :vartype is_service_group: bool + :ivar has_persisted_state: Whether the service has persisted state. + :vartype has_persisted_state: bool + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type_name: Optional[str] = None, + manifest_version: Optional[str] = None, + health_state: Optional[Union[str, "HealthState"]] = None, + service_status: Optional[Union[str, "ServiceStatus"]] = None, + is_service_group: Optional[bool] = None, + has_persisted_state: Optional[bool] = None, + **kwargs + ): + """ + :keyword id: The identity of the service. This ID is an encoded representation of the service + name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype id: str + :keyword name: The full name of the service with 'fabric:' URI scheme. + :paramtype name: str + :keyword type_name: Name of the service type as specified in the service manifest. + :paramtype type_name: str + :keyword manifest_version: The version of the service manifest. + :paramtype manifest_version: str + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword service_status: The status of the application. Possible values include: "Unknown", + "Active", "Upgrading", "Deleting", "Creating", "Failed". + :paramtype service_status: str or ~azure.servicefabric.models.ServiceStatus + :keyword is_service_group: Whether the service is in a service group. + :paramtype is_service_group: bool + :keyword has_persisted_state: Whether the service has persisted state. + :paramtype has_persisted_state: bool + """ + super(StatefulServiceInfo, self).__init__(id=id, name=name, type_name=type_name, manifest_version=manifest_version, health_state=health_state, service_status=service_status, is_service_group=is_service_group, **kwargs) + self.service_kind = 'Stateful' # type: str + self.has_persisted_state = has_persisted_state + + +class StatefulServicePartitionInfo(ServicePartitionInfo): + """Information about a partition of a stateful Service Fabric service.. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar partition_status: The status of the service fabric service partition. Possible values + include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". + :vartype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus + :ivar partition_information: Information about the partition identity, partitioning scheme and + keys supported by it. + :vartype partition_information: ~azure.servicefabric.models.PartitionInformation + :ivar target_replica_set_size: The target replica set size as a number. + :vartype target_replica_set_size: long + :ivar min_replica_set_size: The minimum replica set size as a number. + :vartype min_replica_set_size: long + :ivar auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary + replicas the following must be true, AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :vartype auxiliary_replica_count: long + :ivar last_quorum_loss_duration: The duration for which this partition was in quorum loss. If + the partition is currently in quorum loss, it returns the duration since it has been in that + state. This field is using ISO8601 format for specifying the duration. + :vartype last_quorum_loss_duration: ~datetime.timedelta + :ivar primary_epoch: An Epoch is a configuration number for the partition as a whole. When the + configuration of the replica set changes, for example when the Primary replica changes, the + operations that are replicated from the new Primary replica are said to be a new Epoch from the + ones which were sent by the old Primary replica. + :vartype primary_epoch: ~azure.servicefabric.models.Epoch + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'long'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'long'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'long'}, + 'last_quorum_loss_duration': {'key': 'LastQuorumLossDuration', 'type': 'duration'}, + 'primary_epoch': {'key': 'PrimaryEpoch', 'type': 'Epoch'}, + } + + def __init__( + self, + *, + health_state: Optional[Union[str, "HealthState"]] = None, + partition_status: Optional[Union[str, "ServicePartitionStatus"]] = None, + partition_information: Optional["PartitionInformation"] = None, + target_replica_set_size: Optional[int] = None, + min_replica_set_size: Optional[int] = None, + auxiliary_replica_count: Optional[int] = None, + last_quorum_loss_duration: Optional[datetime.timedelta] = None, + primary_epoch: Optional["Epoch"] = None, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword partition_status: The status of the service fabric service partition. Possible values + include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". + :paramtype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus + :keyword partition_information: Information about the partition identity, partitioning scheme + and keys supported by it. + :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation + :keyword target_replica_set_size: The target replica set size as a number. + :paramtype target_replica_set_size: long + :keyword min_replica_set_size: The minimum replica set size as a number. + :paramtype min_replica_set_size: long + :keyword auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary + replicas the following must be true, AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :paramtype auxiliary_replica_count: long + :keyword last_quorum_loss_duration: The duration for which this partition was in quorum loss. + If the partition is currently in quorum loss, it returns the duration since it has been in that + state. This field is using ISO8601 format for specifying the duration. + :paramtype last_quorum_loss_duration: ~datetime.timedelta + :keyword primary_epoch: An Epoch is a configuration number for the partition as a whole. When + the configuration of the replica set changes, for example when the Primary replica changes, the + operations that are replicated from the new Primary replica are said to be a new Epoch from the + ones which were sent by the old Primary replica. + :paramtype primary_epoch: ~azure.servicefabric.models.Epoch + """ + super(StatefulServicePartitionInfo, self).__init__(health_state=health_state, partition_status=partition_status, partition_information=partition_information, **kwargs) + self.service_kind = 'Stateful' # type: str + self.target_replica_set_size = target_replica_set_size + self.min_replica_set_size = min_replica_set_size + self.auxiliary_replica_count = auxiliary_replica_count + self.last_quorum_loss_duration = last_quorum_loss_duration + self.primary_epoch = primary_epoch + + +class StatefulServiceReplicaHealth(ReplicaHealth): + """Represents the health of the stateful service replica. +Contains the replica aggregated health state, the health events and the unhealthy evaluations. + + All required parameters must be populated in order to send to Azure. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar partition_id: Id of the partition to which this replica belongs. + :vartype partition_id: str + :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :vartype replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + health_events: Optional[List["HealthEvent"]] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + health_statistics: Optional["HealthStatistics"] = None, + partition_id: Optional[str] = None, + replica_id: Optional[str] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword partition_id: Id of the partition to which this replica belongs. + :paramtype partition_id: str + :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: str + """ + super(StatefulServiceReplicaHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, partition_id=partition_id, **kwargs) + self.service_kind = 'Stateful' # type: str + self.replica_id = replica_id + + +class StatefulServiceReplicaHealthState(ReplicaHealthState): + """Represents the health state of the stateful service replica, which contains the replica ID and the aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar partition_id: The ID of the partition to which this replica belongs. + :vartype partition_id: str + :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :vartype replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + partition_id: Optional[str] = None, + replica_id: Optional[str] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword partition_id: The ID of the partition to which this replica belongs. + :paramtype partition_id: str + :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: str + """ + super(StatefulServiceReplicaHealthState, self).__init__(aggregated_health_state=aggregated_health_state, partition_id=partition_id, **kwargs) + self.service_kind = 'Stateful' # type: str + self.replica_id = replica_id + + +class StatefulServiceReplicaInfo(ReplicaInfo): + """Represents a stateful service replica. This includes information about the identity, role, status, health, node name, uptime, and other details about the replica. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", + "InBuild", "Standby", "Ready", "Down", "Dropped". + :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar node_name: The name of a Service Fabric node. + :vartype node_name: str + :ivar address: The address the replica is listening on. + :vartype address: str + :ivar last_in_build_duration_in_seconds: The last in build duration of the replica in seconds. + :vartype last_in_build_duration_in_seconds: str + :ivar replica_role: The role of a replica of a stateful service. Possible values include: + "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", + "ActiveAuxiliary", "PrimaryAuxiliary". + :vartype replica_role: str or ~azure.servicefabric.models.ReplicaRole + :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :vartype replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__( + self, + *, + replica_status: Optional[Union[str, "ReplicaStatus"]] = None, + health_state: Optional[Union[str, "HealthState"]] = None, + node_name: Optional[str] = None, + address: Optional[str] = None, + last_in_build_duration_in_seconds: Optional[str] = None, + replica_role: Optional[Union[str, "ReplicaRole"]] = None, + replica_id: Optional[str] = None, + **kwargs + ): + """ + :keyword replica_status: The status of a replica of a service. Possible values include: + "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". + :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword node_name: The name of a Service Fabric node. + :paramtype node_name: str + :keyword address: The address the replica is listening on. + :paramtype address: str + :keyword last_in_build_duration_in_seconds: The last in build duration of the replica in + seconds. + :paramtype last_in_build_duration_in_seconds: str + :keyword replica_role: The role of a replica of a stateful service. Possible values include: + "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", + "ActiveAuxiliary", "PrimaryAuxiliary". + :paramtype replica_role: str or ~azure.servicefabric.models.ReplicaRole + :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to + uniquely identify a replica of a partition. It is unique within a partition and does not change + for the lifetime of the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for the id. Sometimes the + id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: str + """ + super(StatefulServiceReplicaInfo, self).__init__(replica_status=replica_status, health_state=health_state, node_name=node_name, address=address, last_in_build_duration_in_seconds=last_in_build_duration_in_seconds, **kwargs) + self.service_kind = 'Stateful' # type: str + self.replica_role = replica_role + self.replica_id = replica_id + + +class StatefulServiceTypeDescription(ServiceTypeDescription): + """Describes a stateful service type defined in the service manifest of a provisioned application type. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of service (Stateless or Stateful).Constant filled by server. + Possible values include: "Invalid", "Stateless", "Stateful". + :vartype kind: str or ~azure.servicefabric.models.ServiceKind + :ivar is_stateful: Indicates whether the service type is a stateful service type or a stateless + service type. This property is true if the service type is a stateful service type, false + otherwise. + :vartype is_stateful: bool + :ivar service_type_name: Name of the service type as specified in the service manifest. + :vartype service_type_name: str + :ivar placement_constraints: The placement constraint to be used when instantiating this + service in a Service Fabric cluster. + :vartype placement_constraints: str + :ivar load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: List of service placement policy descriptions. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar extensions: List of service type extensions. + :vartype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :ivar has_persisted_state: A flag indicating whether this is a persistent service which stores + states on the local disk. If it is then the value of this property is true, if not it is false. + :vartype has_persisted_state: bool + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + } + + def __init__( + self, + *, + is_stateful: Optional[bool] = None, + service_type_name: Optional[str] = None, + placement_constraints: Optional[str] = None, + load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, + service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, + extensions: Optional[List["ServiceTypeExtensionDescription"]] = None, + has_persisted_state: Optional[bool] = None, + **kwargs + ): + """ + :keyword is_stateful: Indicates whether the service type is a stateful service type or a + stateless service type. This property is true if the service type is a stateful service type, + false otherwise. + :paramtype is_stateful: bool + :keyword service_type_name: Name of the service type as specified in the service manifest. + :paramtype service_type_name: str + :keyword placement_constraints: The placement constraint to be used when instantiating this + service in a Service Fabric cluster. + :paramtype placement_constraints: str + :keyword load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: List of service placement policy descriptions. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword extensions: List of service type extensions. + :paramtype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :keyword has_persisted_state: A flag indicating whether this is a persistent service which + stores states on the local disk. If it is then the value of this property is true, if not it is + false. + :paramtype has_persisted_state: bool + """ + super(StatefulServiceTypeDescription, self).__init__(is_stateful=is_stateful, service_type_name=service_type_name, placement_constraints=placement_constraints, load_metrics=load_metrics, service_placement_policies=service_placement_policies, extensions=extensions, **kwargs) + self.kind = 'Stateful' # type: str + self.has_persisted_state = has_persisted_state + + +class StatefulServiceUpdateDescription(ServiceUpdateDescription): + """Describes an update for a stateful service. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The service kind.Constant filled by server. Possible values + include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and + QuorumLossWaitDuration (4) are set. + + + * None - Does not indicate any other properties are set. The value is zero. + * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property + (for Stateful services) or the InstanceCount property (for Stateless services) is set. The + value is 1. + * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The + value is 2. + * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is + 4. + * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The + value is 8. + * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. + * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. + * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is + 64. + * Correlation - Indicates the CorrelationScheme property is set. The value is 128. + * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. + * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. + * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. + * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The + value is 2048. + * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. + * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is + 8192. + * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 16384. + * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 32768. + * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value + is 65536. + * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. + * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. + * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. + :vartype flags: str + :ivar placement_constraints: The placement constraints as a string. Placement constraints are + boolean expressions on node properties and allow for restricting a service to particular nodes + based on the service requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :vartype placement_constraints: str + :ivar correlation_scheme: The correlation scheme. + :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :ivar load_metrics: The service load metrics. + :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: The service placement policies. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", + "Medium", "High", "VeryHigh". + :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :ivar scaling_policies: Scaling policies for this service. + :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :ivar service_dns_name: The DNS name of the service. + :vartype service_dns_name: str + :ivar tags_for_placement: Tags for placement of this service. + :vartype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :ivar tags_for_running: Tags for running of this service. + :vartype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :ivar target_replica_set_size: The target replica set size as a number. + :vartype target_replica_set_size: int + :ivar min_replica_set_size: The minimum replica set size as a number. + :vartype min_replica_set_size: int + :ivar replica_restart_wait_duration_seconds: The duration, in seconds, between when a replica + goes down and when a new replica is created. + :vartype replica_restart_wait_duration_seconds: str + :ivar quorum_loss_wait_duration_seconds: The maximum duration, in seconds, for which a + partition is allowed to be in a state of quorum loss. + :vartype quorum_loss_wait_duration_seconds: str + :ivar stand_by_replica_keep_duration_seconds: The definition on how long StandBy replicas + should be maintained before being removed. + :vartype stand_by_replica_keep_duration_seconds: str + :ivar service_placement_time_limit_seconds: The duration for which replicas can stay InBuild + before reporting that build is stuck. + :vartype service_placement_time_limit_seconds: str + :ivar drop_source_replica_on_move: Indicates whether to drop source Secondary replica even if + the target replica has not finished build. If desired behavior is to drop it as soon as + possible the value of this property is true, if not it is false. + :vartype drop_source_replica_on_move: bool + :ivar replica_lifecycle_description: Defines how replicas of this service will behave during + ther lifecycle. + :vartype replica_lifecycle_description: ~azure.servicefabric.models.ReplicaLifecycleDescription + :ivar auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary + replicas, the following must be true: AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :vartype auxiliary_replica_count: int + """ + + _validation = { + 'service_kind': {'required': True}, + 'target_replica_set_size': {'minimum': 1}, + 'min_replica_set_size': {'minimum': 1}, + 'auxiliary_replica_count': {'minimum': 0}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'str'}, + 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'str'}, + 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'str'}, + 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'str'}, + 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, + 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, + } + + def __init__( + self, + *, + flags: Optional[str] = None, + placement_constraints: Optional[str] = None, + correlation_scheme: Optional[List["ServiceCorrelationDescription"]] = None, + load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, + service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, + default_move_cost: Optional[Union[str, "MoveCost"]] = None, + scaling_policies: Optional[List["ScalingPolicyDescription"]] = None, + service_dns_name: Optional[str] = None, + tags_for_placement: Optional["NodeTagsDescription"] = None, + tags_for_running: Optional["NodeTagsDescription"] = None, + target_replica_set_size: Optional[int] = None, + min_replica_set_size: Optional[int] = None, + replica_restart_wait_duration_seconds: Optional[str] = None, + quorum_loss_wait_duration_seconds: Optional[str] = None, + stand_by_replica_keep_duration_seconds: Optional[str] = None, + service_placement_time_limit_seconds: Optional[str] = None, + drop_source_replica_on_move: Optional[bool] = None, + replica_lifecycle_description: Optional["ReplicaLifecycleDescription"] = None, + auxiliary_replica_count: Optional[int] = None, + **kwargs + ): + """ + :keyword flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and + QuorumLossWaitDuration (4) are set. + + + * None - Does not indicate any other properties are set. The value is zero. + * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property + (for Stateful services) or the InstanceCount property (for Stateless services) is set. The + value is 1. + * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The + value is 2. + * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is + 4. + * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The + value is 8. + * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. + * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. + * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is + 64. + * Correlation - Indicates the CorrelationScheme property is set. The value is 128. + * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. + * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. + * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. + * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The + value is 2048. + * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. + * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is + 8192. + * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 16384. + * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 32768. + * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value + is 65536. + * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. + * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. + * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. + :paramtype flags: str + :keyword placement_constraints: The placement constraints as a string. Placement constraints + are boolean expressions on node properties and allow for restricting a service to particular + nodes based on the service requirements. For example, to place a service on nodes where + NodeType is blue specify the following: "NodeColor == blue)". + :paramtype placement_constraints: str + :keyword correlation_scheme: The correlation scheme. + :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :keyword load_metrics: The service load metrics. + :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: The service placement policies. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", + "Low", "Medium", "High", "VeryHigh". + :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :keyword scaling_policies: Scaling policies for this service. + :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :keyword service_dns_name: The DNS name of the service. + :paramtype service_dns_name: str + :keyword tags_for_placement: Tags for placement of this service. + :paramtype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :keyword tags_for_running: Tags for running of this service. + :paramtype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :keyword target_replica_set_size: The target replica set size as a number. + :paramtype target_replica_set_size: int + :keyword min_replica_set_size: The minimum replica set size as a number. + :paramtype min_replica_set_size: int + :keyword replica_restart_wait_duration_seconds: The duration, in seconds, between when a + replica goes down and when a new replica is created. + :paramtype replica_restart_wait_duration_seconds: str + :keyword quorum_loss_wait_duration_seconds: The maximum duration, in seconds, for which a + partition is allowed to be in a state of quorum loss. + :paramtype quorum_loss_wait_duration_seconds: str + :keyword stand_by_replica_keep_duration_seconds: The definition on how long StandBy replicas + should be maintained before being removed. + :paramtype stand_by_replica_keep_duration_seconds: str + :keyword service_placement_time_limit_seconds: The duration for which replicas can stay InBuild + before reporting that build is stuck. + :paramtype service_placement_time_limit_seconds: str + :keyword drop_source_replica_on_move: Indicates whether to drop source Secondary replica even + if the target replica has not finished build. If desired behavior is to drop it as soon as + possible the value of this property is true, if not it is false. + :paramtype drop_source_replica_on_move: bool + :keyword replica_lifecycle_description: Defines how replicas of this service will behave during + ther lifecycle. + :paramtype replica_lifecycle_description: + ~azure.servicefabric.models.ReplicaLifecycleDescription + :keyword auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary + replicas, the following must be true: AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :paramtype auxiliary_replica_count: int + """ + super(StatefulServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_dns_name=service_dns_name, tags_for_placement=tags_for_placement, tags_for_running=tags_for_running, **kwargs) + self.service_kind = 'Stateful' # type: str + self.target_replica_set_size = target_replica_set_size + self.min_replica_set_size = min_replica_set_size + self.replica_restart_wait_duration_seconds = replica_restart_wait_duration_seconds + self.quorum_loss_wait_duration_seconds = quorum_loss_wait_duration_seconds + self.stand_by_replica_keep_duration_seconds = stand_by_replica_keep_duration_seconds + self.service_placement_time_limit_seconds = service_placement_time_limit_seconds + self.drop_source_replica_on_move = drop_source_replica_on_move + self.replica_lifecycle_description = replica_lifecycle_description + self.auxiliary_replica_count = auxiliary_replica_count + + +class StatelessReplicaHealthReportExpiredEvent(ReplicaEvent): + """Stateless Replica Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :vartype replica_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + partition_id: str, + replica_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(StatelessReplicaHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.kind = 'StatelessReplicaHealthReportExpired' # type: str + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class StatelessReplicaNewHealthReportEvent(ReplicaEvent): + """Stateless Replica Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values + include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", + "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", + "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", + "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", + "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", + "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", + "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", + "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", + "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", + "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", + "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", + "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", + "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", + "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", + "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", + "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", + "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", + "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", + "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", + "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", + "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", + "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". + :vartype kind: str or ~azure.servicefabric.models.FabricEventKind + :ivar event_instance_id: Required. The identifier for the FabricEvent instance. + :vartype event_instance_id: str + :ivar category: The category of event. + :vartype category: str + :ivar time_stamp: Required. The time event was logged. + :vartype time_stamp: ~datetime.datetime + :ivar has_correlated_events: Shows there is existing related events available. + :vartype has_correlated_events: bool + :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :vartype partition_id: str + :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :vartype replica_id: long + :ivar source_id: Required. Id of report source. + :vartype source_id: str + :ivar property: Required. Describes the property. + :vartype property: str + :ivar health_state: Required. Describes the property health state. + :vartype health_state: str + :ivar time_to_live_ms: Required. Time to live in milli-seconds. + :vartype time_to_live_ms: long + :ivar sequence_number: Required. Sequence number of report. + :vartype sequence_number: long + :ivar description: Required. Description of report. + :vartype description: str + :ivar remove_when_expired: Required. Indicates the removal when it expires. + :vartype remove_when_expired: bool + :ivar source_utc_timestamp: Required. Source time. + :vartype source_utc_timestamp: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + event_instance_id: str, + time_stamp: datetime.datetime, + partition_id: str, + replica_id: int, + source_id: str, + property: str, + health_state: str, + time_to_live_ms: int, + sequence_number: int, + description: str, + remove_when_expired: bool, + source_utc_timestamp: datetime.datetime, + category: Optional[str] = None, + has_correlated_events: Optional[bool] = None, + **kwargs + ): + """ + :keyword event_instance_id: Required. The identifier for the FabricEvent instance. + :paramtype event_instance_id: str + :keyword category: The category of event. + :paramtype category: str + :keyword time_stamp: Required. The time event was logged. + :paramtype time_stamp: ~datetime.datetime + :keyword has_correlated_events: Shows there is existing related events available. + :paramtype has_correlated_events: bool + :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + :paramtype partition_id: str + :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service + Fabric to uniquely identify a replica of a partition. It is unique within a partition and does + not change for the lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a replica id. + :paramtype replica_id: long + :keyword source_id: Required. Id of report source. + :paramtype source_id: str + :keyword property: Required. Describes the property. + :paramtype property: str + :keyword health_state: Required. Describes the property health state. + :paramtype health_state: str + :keyword time_to_live_ms: Required. Time to live in milli-seconds. + :paramtype time_to_live_ms: long + :keyword sequence_number: Required. Sequence number of report. + :paramtype sequence_number: long + :keyword description: Required. Description of report. + :paramtype description: str + :keyword remove_when_expired: Required. Indicates the removal when it expires. + :paramtype remove_when_expired: bool + :keyword source_utc_timestamp: Required. Source time. + :paramtype source_utc_timestamp: ~datetime.datetime + """ + super(StatelessReplicaNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.kind = 'StatelessReplicaNewHealthReport' # type: str + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + + +class StatelessServiceDescription(ServiceDescription): + """Describes a stateless service. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The service kind.Constant filled by server. Possible values + include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar application_name: The name of the application, including the 'fabric:' URI scheme. + :vartype application_name: str + :ivar service_name: Required. The full name of the service with 'fabric:' URI scheme. + :vartype service_name: str + :ivar service_type_name: Required. Name of the service type as specified in the service + manifest. + :vartype service_type_name: str + :ivar initialization_data: The initialization data as an array of bytes. Initialization data is + passed to service instances or replicas when they are created. + :vartype initialization_data: list[int] + :ivar partition_description: Required. The partition description as an object. + :vartype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription + :ivar placement_constraints: The placement constraints as a string. Placement constraints are + boolean expressions on node properties and allow for restricting a service to particular nodes + based on the service requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :vartype placement_constraints: str + :ivar correlation_scheme: The correlation scheme. + :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :ivar service_load_metrics: The service load metrics. + :vartype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: The service placement policies. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", + "Medium", "High", "VeryHigh". + :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :ivar is_default_move_cost_specified: Indicates if the DefaultMoveCost property is specified. + :vartype is_default_move_cost_specified: bool + :ivar service_package_activation_mode: The activation mode of service package to be used for a + service. Possible values include: "SharedProcess", "ExclusiveProcess". + :vartype service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :ivar service_dns_name: The DNS name of the service. It requires the DNS system service to be + enabled in Service Fabric cluster. + :vartype service_dns_name: str + :ivar scaling_policies: Scaling policies for this service. + :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :ivar tags_required_to_place: Tags for placement of this service. + :vartype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription + :ivar tags_required_to_run: Tags for running of this service. + :vartype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription + :ivar instance_count: Required. The instance count. + :vartype instance_count: int + :ivar min_instance_count: MinInstanceCount is the minimum number of instances that must be up + to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted + into the number of nodes on which the instances are allowed to be placed according to the + placement constraints on the service. + :vartype min_instance_count: int + :ivar min_instance_percentage: MinInstancePercentage is the minimum percentage of InstanceCount + that must be up to meet the EnsureAvailability safety check during operations like upgrade or + deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first + converted into the number of nodes on which the instances are allowed to be placed according to + the placement constraints on the service. + :vartype min_instance_percentage: int + :ivar flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 1 then the flags for InstanceCloseDelayDuration is set. + + + * None - Does not indicate any other properties are set. The value is zero. + * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 1. + * InstanceRestartWaitDuration - Indicates the InstanceRestartWaitDurationSeconds property is + set. The value is 2. + :vartype flags: int + :ivar instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster upgrade and disabling node. + The endpoint exposed on this instance is removed prior to starting the delay, which prevents + new connections to this instance. + In addition, clients that have subscribed to service endpoint change + events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), + can do + the following upon receiving the endpoint removal notification: + + .. code-block:: + + - Stop sending new requests to this instance. + - Close existing connections after in-flight requests have completed. + - Connect to a different instance of the service partition for future requests. + + Note, the default value of InstanceCloseDelayDuration is 0, which indicates that there won't + be any delay or removal of the endpoint prior to closing the instance. + :vartype instance_close_delay_duration_seconds: long + :ivar instance_lifecycle_description: Defines how instances of this service will behave during + their lifecycle. + :vartype instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :ivar instance_restart_wait_duration_seconds: When a stateless instance goes down, this timer + starts. When it expires Service Fabric will create a new instance on any node in the cluster. + This configuration is to reduce unnecessary creation of a new instance in situations where the + instance going down is likely to recover in a short time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes down, Service Fabric + will immediately start building its replacement. + :vartype instance_restart_wait_duration_seconds: long + """ + + _validation = { + 'service_kind': {'required': True}, + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + 'instance_count': {'required': True, 'minimum': -1}, + 'min_instance_count': {'minimum': 1}, + 'min_instance_percentage': {'maximum': 100, 'minimum': 0}, + 'instance_close_delay_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'instance_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'long'}, + 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, + 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'long'}, + } + + def __init__( + self, + *, + service_name: str, + service_type_name: str, + partition_description: "PartitionSchemeDescription", + instance_count: int, + application_name: Optional[str] = None, + initialization_data: Optional[List[int]] = None, + placement_constraints: Optional[str] = None, + correlation_scheme: Optional[List["ServiceCorrelationDescription"]] = None, + service_load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, + service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, + default_move_cost: Optional[Union[str, "MoveCost"]] = None, + is_default_move_cost_specified: Optional[bool] = None, + service_package_activation_mode: Optional[Union[str, "ServicePackageActivationMode"]] = None, + service_dns_name: Optional[str] = None, + scaling_policies: Optional[List["ScalingPolicyDescription"]] = None, + tags_required_to_place: Optional["NodeTagsDescription"] = None, + tags_required_to_run: Optional["NodeTagsDescription"] = None, + min_instance_count: Optional[int] = 1, + min_instance_percentage: Optional[int] = 0, + flags: Optional[int] = None, + instance_close_delay_duration_seconds: Optional[int] = None, + instance_lifecycle_description: Optional["InstanceLifecycleDescription"] = None, + instance_restart_wait_duration_seconds: Optional[int] = None, + **kwargs + ): + """ + :keyword application_name: The name of the application, including the 'fabric:' URI scheme. + :paramtype application_name: str + :keyword service_name: Required. The full name of the service with 'fabric:' URI scheme. + :paramtype service_name: str + :keyword service_type_name: Required. Name of the service type as specified in the service + manifest. + :paramtype service_type_name: str + :keyword initialization_data: The initialization data as an array of bytes. Initialization data + is passed to service instances or replicas when they are created. + :paramtype initialization_data: list[int] + :keyword partition_description: Required. The partition description as an object. + :paramtype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription + :keyword placement_constraints: The placement constraints as a string. Placement constraints + are boolean expressions on node properties and allow for restricting a service to particular + nodes based on the service requirements. For example, to place a service on nodes where + NodeType is blue specify the following: "NodeColor == blue)". + :paramtype placement_constraints: str + :keyword correlation_scheme: The correlation scheme. + :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :keyword service_load_metrics: The service load metrics. + :paramtype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: The service placement policies. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", + "Low", "Medium", "High", "VeryHigh". + :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :keyword is_default_move_cost_specified: Indicates if the DefaultMoveCost property is + specified. + :paramtype is_default_move_cost_specified: bool + :keyword service_package_activation_mode: The activation mode of service package to be used for + a service. Possible values include: "SharedProcess", "ExclusiveProcess". + :paramtype service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :keyword service_dns_name: The DNS name of the service. It requires the DNS system service to + be enabled in Service Fabric cluster. + :paramtype service_dns_name: str + :keyword scaling_policies: Scaling policies for this service. + :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :keyword tags_required_to_place: Tags for placement of this service. + :paramtype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription + :keyword tags_required_to_run: Tags for running of this service. + :paramtype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription + :keyword instance_count: Required. The instance count. + :paramtype instance_count: int + :keyword min_instance_count: MinInstanceCount is the minimum number of instances that must be + up to meet the EnsureAvailability safety check during operations like upgrade or deactivate + node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted + into the number of nodes on which the instances are allowed to be placed according to the + placement constraints on the service. + :paramtype min_instance_count: int + :keyword min_instance_percentage: MinInstancePercentage is the minimum percentage of + InstanceCount that must be up to meet the EnsureAvailability safety check during operations + like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first + converted into the number of nodes on which the instances are allowed to be placed according to + the placement constraints on the service. + :paramtype min_instance_percentage: int + :keyword flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 1 then the flags for InstanceCloseDelayDuration is set. + + + * None - Does not indicate any other properties are set. The value is zero. + * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 1. + * InstanceRestartWaitDuration - Indicates the InstanceRestartWaitDurationSeconds property is + set. The value is 2. + :paramtype flags: int + :keyword instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster upgrade and disabling node. + The endpoint exposed on this instance is removed prior to starting the delay, which prevents + new connections to this instance. + In addition, clients that have subscribed to service endpoint change + events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), + can do + the following upon receiving the endpoint removal notification: + + .. code-block:: + + - Stop sending new requests to this instance. + - Close existing connections after in-flight requests have completed. + - Connect to a different instance of the service partition for future requests. + + Note, the default value of InstanceCloseDelayDuration is 0, which indicates that there won't + be any delay or removal of the endpoint prior to closing the instance. + :paramtype instance_close_delay_duration_seconds: long + :keyword instance_lifecycle_description: Defines how instances of this service will behave + during their lifecycle. + :paramtype instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :keyword instance_restart_wait_duration_seconds: When a stateless instance goes down, this + timer starts. When it expires Service Fabric will create a new instance on any node in the + cluster. + This configuration is to reduce unnecessary creation of a new instance in situations where the + instance going down is likely to recover in a short time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes down, Service Fabric + will immediately start building its replacement. + :paramtype instance_restart_wait_duration_seconds: long + """ + super(StatelessServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, tags_required_to_place=tags_required_to_place, tags_required_to_run=tags_required_to_run, **kwargs) + self.service_kind = 'Stateless' # type: str + self.instance_count = instance_count + self.min_instance_count = min_instance_count + self.min_instance_percentage = min_instance_percentage + self.flags = flags + self.instance_close_delay_duration_seconds = instance_close_delay_duration_seconds + self.instance_lifecycle_description = instance_lifecycle_description + self.instance_restart_wait_duration_seconds = instance_restart_wait_duration_seconds + + +class StatelessServiceInfo(ServiceInfo): + """Information about a stateless Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The identity of the service. This ID is an encoded representation of the service + name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :vartype id: str + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar name: The full name of the service with 'fabric:' URI scheme. + :vartype name: str + :ivar type_name: Name of the service type as specified in the service manifest. + :vartype type_name: str + :ivar manifest_version: The version of the service manifest. + :vartype manifest_version: str + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_status: The status of the application. Possible values include: "Unknown", + "Active", "Upgrading", "Deleting", "Creating", "Failed". + :vartype service_status: str or ~azure.servicefabric.models.ServiceStatus + :ivar is_service_group: Whether the service is in a service group. + :vartype is_service_group: bool + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type_name: Optional[str] = None, + manifest_version: Optional[str] = None, + health_state: Optional[Union[str, "HealthState"]] = None, + service_status: Optional[Union[str, "ServiceStatus"]] = None, + is_service_group: Optional[bool] = None, + **kwargs + ): + """ + :keyword id: The identity of the service. This ID is an encoded representation of the service + name. This is used in the REST APIs to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, + if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + :paramtype id: str + :keyword name: The full name of the service with 'fabric:' URI scheme. + :paramtype name: str + :keyword type_name: Name of the service type as specified in the service manifest. + :paramtype type_name: str + :keyword manifest_version: The version of the service manifest. + :paramtype manifest_version: str + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword service_status: The status of the application. Possible values include: "Unknown", + "Active", "Upgrading", "Deleting", "Creating", "Failed". + :paramtype service_status: str or ~azure.servicefabric.models.ServiceStatus + :keyword is_service_group: Whether the service is in a service group. + :paramtype is_service_group: bool + """ + super(StatelessServiceInfo, self).__init__(id=id, name=name, type_name=type_name, manifest_version=manifest_version, health_state=health_state, service_status=service_status, is_service_group=is_service_group, **kwargs) + self.service_kind = 'Stateless' # type: str + + +class StatelessServiceInstanceHealth(ReplicaHealth): + """Represents the health of the stateless service instance. +Contains the instance aggregated health state, the health events and the unhealthy evaluations. + + All required parameters must be populated in order to send to Azure. + + :ivar aggregated_health_state: The HealthState representing the aggregated health state of the + entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar health_events: The list of health events reported on the entity. + :vartype health_events: list[~azure.servicefabric.models.HealthEvent] + :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :ivar health_statistics: Shows the health statistics for all children types of the queried + entity. + :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar partition_id: Id of the partition to which this replica belongs. + :vartype partition_id: str + :ivar instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric to + uniquely identify an instance of a partition of a stateless service. It is unique within a + partition and does not change for the lifetime of the instance. If the instance has failed over + on the same or different node, it will get a different value for the InstanceId. + :vartype instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + health_events: Optional[List["HealthEvent"]] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + health_statistics: Optional["HealthStatistics"] = None, + partition_id: Optional[str] = None, + instance_id: Optional[str] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The HealthState representing the aggregated health state of + the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the entity and its + children (if any). + The aggregation is done by applying the desired health policy. Possible values include: + "Invalid", "Ok", "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword health_events: The list of health events reported on the entity. + :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] + :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated + health state was returned by Health Manager. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + :keyword health_statistics: Shows the health statistics for all children types of the queried + entity. + :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics + :keyword partition_id: Id of the partition to which this replica belongs. + :paramtype partition_id: str + :keyword instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric + to uniquely identify an instance of a partition of a stateless service. It is unique within a + partition and does not change for the lifetime of the instance. If the instance has failed over + on the same or different node, it will get a different value for the InstanceId. + :paramtype instance_id: str + """ + super(StatelessServiceInstanceHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, partition_id=partition_id, **kwargs) + self.service_kind = 'Stateless' # type: str + self.instance_id = instance_id + + +class StatelessServiceInstanceHealthState(ReplicaHealthState): + """Represents the health state of the stateless service instance, which contains the instance ID and the aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar partition_id: The ID of the partition to which this replica belongs. + :vartype partition_id: str + :ivar replica_id: Id of the stateless service instance on the wire this field is called + ReplicaId. + :vartype replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + partition_id: Optional[str] = None, + replica_id: Optional[str] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword partition_id: The ID of the partition to which this replica belongs. + :paramtype partition_id: str + :keyword replica_id: Id of the stateless service instance on the wire this field is called + ReplicaId. + :paramtype replica_id: str + """ + super(StatelessServiceInstanceHealthState, self).__init__(aggregated_health_state=aggregated_health_state, partition_id=partition_id, **kwargs) + self.service_kind = 'Stateless' # type: str + self.replica_id = replica_id + + +class StatelessServiceInstanceInfo(ReplicaInfo): + """Represents a stateless service instance. This includes information about the identity, status, health, node name, uptime, and other details about the instance. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", + "InBuild", "Standby", "Ready", "Down", "Dropped". + :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar node_name: The name of a Service Fabric node. + :vartype node_name: str + :ivar address: The address the replica is listening on. + :vartype address: str + :ivar last_in_build_duration_in_seconds: The last in build duration of the replica in seconds. + :vartype last_in_build_duration_in_seconds: str + :ivar instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric to + uniquely identify an instance of a partition of a stateless service. It is unique within a + partition and does not change for the lifetime of the instance. If the instance has failed over + on the same or different node, it will get a different value for the InstanceId. + :vartype instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__( + self, + *, + replica_status: Optional[Union[str, "ReplicaStatus"]] = None, + health_state: Optional[Union[str, "HealthState"]] = None, + node_name: Optional[str] = None, + address: Optional[str] = None, + last_in_build_duration_in_seconds: Optional[str] = None, + instance_id: Optional[str] = None, + **kwargs + ): + """ + :keyword replica_status: The status of a replica of a service. Possible values include: + "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". + :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword node_name: The name of a Service Fabric node. + :paramtype node_name: str + :keyword address: The address the replica is listening on. + :paramtype address: str + :keyword last_in_build_duration_in_seconds: The last in build duration of the replica in + seconds. + :paramtype last_in_build_duration_in_seconds: str + :keyword instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric + to uniquely identify an instance of a partition of a stateless service. It is unique within a + partition and does not change for the lifetime of the instance. If the instance has failed over + on the same or different node, it will get a different value for the InstanceId. + :paramtype instance_id: str + """ + super(StatelessServiceInstanceInfo, self).__init__(replica_status=replica_status, health_state=health_state, node_name=node_name, address=address, last_in_build_duration_in_seconds=last_in_build_duration_in_seconds, **kwargs) + self.service_kind = 'Stateless' # type: str + self.instance_id = instance_id + + +class StatelessServicePartitionInfo(ServicePartitionInfo): + """Information about a partition of a stateless Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by + server. Possible values include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar 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". + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar partition_status: The status of the service fabric service partition. Possible values + include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". + :vartype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus + :ivar partition_information: Information about the partition identity, partitioning scheme and + keys supported by it. + :vartype partition_information: ~azure.servicefabric.models.PartitionInformation + :ivar instance_count: Number of instances of this partition. + :vartype instance_count: long + :ivar min_instance_count: MinInstanceCount is the minimum number of instances that must be up + to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted + into the number of nodes on which the instances are allowed to be placed according to the + placement constraints on the service. + :vartype min_instance_count: int + :ivar min_instance_percentage: MinInstancePercentage is the minimum percentage of InstanceCount + that must be up to meet the EnsureAvailability safety check during operations like upgrade or + deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first + converted into the number of nodes on which the instances are allowed to be placed according to + the placement constraints on the service. + :vartype min_instance_percentage: int + """ + + _validation = { + 'service_kind': {'required': True}, + 'min_instance_count': {'minimum': 1}, + 'min_instance_percentage': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'long'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + } + + def __init__( + self, + *, + health_state: Optional[Union[str, "HealthState"]] = None, + partition_status: Optional[Union[str, "ServicePartitionStatus"]] = None, + partition_information: Optional["PartitionInformation"] = None, + instance_count: Optional[int] = None, + min_instance_count: Optional[int] = 1, + min_instance_percentage: Optional[int] = 0, + **kwargs + ): + """ + :keyword 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". + :paramtype health_state: str or ~azure.servicefabric.models.HealthState + :keyword partition_status: The status of the service fabric service partition. Possible values + include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". + :paramtype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus + :keyword partition_information: Information about the partition identity, partitioning scheme + and keys supported by it. + :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation + :keyword instance_count: Number of instances of this partition. + :paramtype instance_count: long + :keyword min_instance_count: MinInstanceCount is the minimum number of instances that must be + up to meet the EnsureAvailability safety check during operations like upgrade or deactivate + node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted + into the number of nodes on which the instances are allowed to be placed according to the + placement constraints on the service. + :paramtype min_instance_count: int + :keyword min_instance_percentage: MinInstancePercentage is the minimum percentage of + InstanceCount that must be up to meet the EnsureAvailability safety check during operations + like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first + converted into the number of nodes on which the instances are allowed to be placed according to + the placement constraints on the service. + :paramtype min_instance_percentage: int + """ + super(StatelessServicePartitionInfo, self).__init__(health_state=health_state, partition_status=partition_status, partition_information=partition_information, **kwargs) + self.service_kind = 'Stateless' # type: str + self.instance_count = instance_count + self.min_instance_count = min_instance_count + self.min_instance_percentage = min_instance_percentage + + +class StatelessServiceTypeDescription(ServiceTypeDescription): + """Describes a stateless service type defined in the service manifest of a provisioned application type. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of service (Stateless or Stateful).Constant filled by server. + Possible values include: "Invalid", "Stateless", "Stateful". + :vartype kind: str or ~azure.servicefabric.models.ServiceKind + :ivar is_stateful: Indicates whether the service type is a stateful service type or a stateless + service type. This property is true if the service type is a stateful service type, false + otherwise. + :vartype is_stateful: bool + :ivar service_type_name: Name of the service type as specified in the service manifest. + :vartype service_type_name: str + :ivar placement_constraints: The placement constraint to be used when instantiating this + service in a Service Fabric cluster. + :vartype placement_constraints: str + :ivar load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: List of service placement policy descriptions. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar extensions: List of service type extensions. + :vartype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :ivar use_implicit_host: A flag indicating if this type is not implemented and hosted by a user + service process, but is implicitly hosted by a system created process. This value is true for + services using the guest executable services, false otherwise. + :vartype use_implicit_host: bool + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + 'use_implicit_host': {'key': 'UseImplicitHost', 'type': 'bool'}, + } + + def __init__( + self, + *, + is_stateful: Optional[bool] = None, + service_type_name: Optional[str] = None, + placement_constraints: Optional[str] = None, + load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, + service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, + extensions: Optional[List["ServiceTypeExtensionDescription"]] = None, + use_implicit_host: Optional[bool] = None, + **kwargs + ): + """ + :keyword is_stateful: Indicates whether the service type is a stateful service type or a + stateless service type. This property is true if the service type is a stateful service type, + false otherwise. + :paramtype is_stateful: bool + :keyword service_type_name: Name of the service type as specified in the service manifest. + :paramtype service_type_name: str + :keyword placement_constraints: The placement constraint to be used when instantiating this + service in a Service Fabric cluster. + :paramtype placement_constraints: str + :keyword load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: List of service placement policy descriptions. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword extensions: List of service type extensions. + :paramtype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :keyword use_implicit_host: A flag indicating if this type is not implemented and hosted by a + user service process, but is implicitly hosted by a system created process. This value is true + for services using the guest executable services, false otherwise. + :paramtype use_implicit_host: bool + """ + super(StatelessServiceTypeDescription, self).__init__(is_stateful=is_stateful, service_type_name=service_type_name, placement_constraints=placement_constraints, load_metrics=load_metrics, service_placement_policies=service_placement_policies, extensions=extensions, **kwargs) + self.kind = 'Stateless' # type: str + self.use_implicit_host = use_implicit_host + + +class StatelessServiceUpdateDescription(ServiceUpdateDescription): + """Describes an update for a stateless service. + + All required parameters must be populated in order to send to Azure. + + :ivar service_kind: Required. The service kind.Constant filled by server. Possible values + include: "Invalid", "Stateless", "Stateful". + :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind + :ivar flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and + QuorumLossWaitDuration (4) are set. + + + * None - Does not indicate any other properties are set. The value is zero. + * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property + (for Stateful services) or the InstanceCount property (for Stateless services) is set. The + value is 1. + * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The + value is 2. + * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is + 4. + * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The + value is 8. + * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. + * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. + * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is + 64. + * Correlation - Indicates the CorrelationScheme property is set. The value is 128. + * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. + * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. + * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. + * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The + value is 2048. + * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. + * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is + 8192. + * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 16384. + * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 32768. + * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value + is 65536. + * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. + * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. + * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. + :vartype flags: str + :ivar placement_constraints: The placement constraints as a string. Placement constraints are + boolean expressions on node properties and allow for restricting a service to particular nodes + based on the service requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :vartype placement_constraints: str + :ivar correlation_scheme: The correlation scheme. + :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :ivar load_metrics: The service load metrics. + :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :ivar service_placement_policies: The service placement policies. + :vartype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", + "Medium", "High", "VeryHigh". + :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :ivar scaling_policies: Scaling policies for this service. + :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :ivar service_dns_name: The DNS name of the service. + :vartype service_dns_name: str + :ivar tags_for_placement: Tags for placement of this service. + :vartype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :ivar tags_for_running: Tags for running of this service. + :vartype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :ivar instance_count: The instance count. + :vartype instance_count: int + :ivar min_instance_count: MinInstanceCount is the minimum number of instances that must be up + to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted + into the number of nodes on which the instances are allowed to be placed according to the + placement constraints on the service. + :vartype min_instance_count: int + :ivar min_instance_percentage: MinInstancePercentage is the minimum percentage of InstanceCount + that must be up to meet the EnsureAvailability safety check during operations like upgrade or + deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first + converted into the number of nodes on which the instances are allowed to be placed according to + the placement constraints on the service. + :vartype min_instance_percentage: int + :ivar instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster upgrade and disabling node. + The endpoint exposed on this instance is removed prior to starting the delay, which prevents + new connections to this instance. + In addition, clients that have subscribed to service endpoint change + events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), + can do + the following upon receiving the endpoint removal notification: + + .. code-block:: + + - Stop sending new requests to this instance. + - Close existing connections after in-flight requests have completed. + - Connect to a different instance of the service partition for future requests. + :vartype instance_close_delay_duration_seconds: str + :ivar instance_lifecycle_description: Defines how instances of this service will behave during + their lifecycle. + :vartype instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :ivar instance_restart_wait_duration_seconds: When a stateless instance goes down, this timer + starts. When it expires Service Fabric will create a new instance on any node in the cluster. + This configuration is to reduce unnecessary creation of a new instance in situations where the + instance going down is likely to recover in a short time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes down, Service Fabric + will immediately start building its replacement. + :vartype instance_restart_wait_duration_seconds: str + """ + + _validation = { + 'service_kind': {'required': True}, + 'instance_count': {'minimum': -1}, + 'min_instance_count': {'minimum': 1}, + 'min_instance_percentage': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'str'}, + 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, + 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'str'}, + } + + def __init__( + self, + *, + flags: Optional[str] = None, + placement_constraints: Optional[str] = None, + correlation_scheme: Optional[List["ServiceCorrelationDescription"]] = None, + load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, + service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, + default_move_cost: Optional[Union[str, "MoveCost"]] = None, + scaling_policies: Optional[List["ScalingPolicyDescription"]] = None, + service_dns_name: Optional[str] = None, + tags_for_placement: Optional["NodeTagsDescription"] = None, + tags_for_running: Optional["NodeTagsDescription"] = None, + instance_count: Optional[int] = None, + min_instance_count: Optional[int] = 1, + min_instance_percentage: Optional[int] = 0, + instance_close_delay_duration_seconds: Optional[str] = None, + instance_lifecycle_description: Optional["InstanceLifecycleDescription"] = None, + instance_restart_wait_duration_seconds: Optional[str] = None, + **kwargs + ): + """ + :keyword flags: Flags indicating whether other properties are set. Each of the associated + properties corresponds to a flag, specified below, which, if set, indicate that the property is + specified. + This property can be a combination of those flags obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and + QuorumLossWaitDuration (4) are set. + + + * None - Does not indicate any other properties are set. The value is zero. + * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property + (for Stateful services) or the InstanceCount property (for Stateless services) is set. The + value is 1. + * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The + value is 2. + * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is + 4. + * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The + value is 8. + * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. + * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. + * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is + 64. + * Correlation - Indicates the CorrelationScheme property is set. The value is 128. + * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. + * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. + * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. + * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The + value is 2048. + * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. + * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is + 8192. + * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 16384. + * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The + value is 32768. + * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value + is 65536. + * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. + * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. + * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. + :paramtype flags: str + :keyword placement_constraints: The placement constraints as a string. Placement constraints + are boolean expressions on node properties and allow for restricting a service to particular + nodes based on the service requirements. For example, to place a service on nodes where + NodeType is blue specify the following: "NodeColor == blue)". + :paramtype placement_constraints: str + :keyword correlation_scheme: The correlation scheme. + :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] + :keyword load_metrics: The service load metrics. + :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :keyword service_placement_policies: The service placement policies. + :paramtype service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", + "Low", "Medium", "High", "VeryHigh". + :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost + :keyword scaling_policies: Scaling policies for this service. + :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :keyword service_dns_name: The DNS name of the service. + :paramtype service_dns_name: str + :keyword tags_for_placement: Tags for placement of this service. + :paramtype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :keyword tags_for_running: Tags for running of this service. + :paramtype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :keyword instance_count: The instance count. + :paramtype instance_count: int + :keyword min_instance_count: MinInstanceCount is the minimum number of instances that must be + up to meet the EnsureAvailability safety check during operations like upgrade or deactivate + node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted + into the number of nodes on which the instances are allowed to be placed according to the + placement constraints on the service. + :paramtype min_instance_count: int + :keyword min_instance_percentage: MinInstancePercentage is the minimum percentage of + InstanceCount that must be up to meet the EnsureAvailability safety check during operations + like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * + InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first + converted into the number of nodes on which the instances are allowed to be placed according to + the placement constraints on the service. + :paramtype min_instance_percentage: int + :keyword instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster upgrade and disabling node. + The endpoint exposed on this instance is removed prior to starting the delay, which prevents + new connections to this instance. + In addition, clients that have subscribed to service endpoint change + events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), + can do + the following upon receiving the endpoint removal notification: + + .. code-block:: + + - Stop sending new requests to this instance. + - Close existing connections after in-flight requests have completed. + - Connect to a different instance of the service partition for future requests. + :paramtype instance_close_delay_duration_seconds: str + :keyword instance_lifecycle_description: Defines how instances of this service will behave + during their lifecycle. + :paramtype instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :keyword instance_restart_wait_duration_seconds: When a stateless instance goes down, this + timer starts. When it expires Service Fabric will create a new instance on any node in the + cluster. + This configuration is to reduce unnecessary creation of a new instance in situations where the + instance going down is likely to recover in a short time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes down, Service Fabric + will immediately start building its replacement. + :paramtype instance_restart_wait_duration_seconds: str + """ + super(StatelessServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_dns_name=service_dns_name, tags_for_placement=tags_for_placement, tags_for_running=tags_for_running, **kwargs) + self.service_kind = 'Stateless' # type: str + self.instance_count = instance_count + self.min_instance_count = min_instance_count + self.min_instance_percentage = min_instance_percentage + self.instance_close_delay_duration_seconds = instance_close_delay_duration_seconds + self.instance_lifecycle_description = instance_lifecycle_description + self.instance_restart_wait_duration_seconds = instance_restart_wait_duration_seconds + + +class StoppedChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos stops because either the user issued a stop or the time to run was up. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values + include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", + "Stopped". + :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind + :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :vartype time_stamp_utc: ~datetime.datetime + :ivar reason: Describes why Chaos stopped. Chaos can stop because of StopChaos API call or the + timeToRun provided in ChaosParameters is over. + :vartype reason: str + """ + + _validation = { + 'kind': {'required': True}, + 'time_stamp_utc': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__( + self, + *, + time_stamp_utc: datetime.datetime, + reason: Optional[str] = None, + **kwargs + ): + """ + :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :paramtype time_stamp_utc: ~datetime.datetime + :keyword reason: Describes why Chaos stopped. Chaos can stop because of StopChaos API call or + the timeToRun provided in ChaosParameters is over. + :paramtype reason: str + """ + super(StoppedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.kind = 'Stopped' # type: str + self.reason = reason + + +class StringPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type String. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property, determined by the type of data. Following are the + possible values.Constant filled by server. Possible values include: "Invalid", "Binary", + "Int64", "Double", "String", "Guid". + :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind + :ivar data: Required. The data of the property value. + :vartype data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__( + self, + *, + data: str, + **kwargs + ): + """ + :keyword data: Required. The data of the property value. + :paramtype data: str + """ + super(StringPropertyValue, self).__init__(**kwargs) + self.kind = 'String' # type: str + self.data = data + + +class SuccessfulPropertyBatchInfo(PropertyBatchInfo): + """Derived from PropertyBatchInfo. Represents the property batch succeeding. Contains the results of any "Get" operations in the batch. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of property batch info, determined by the results of a property + batch. The following are the possible values.Constant filled by server. Possible values + include: "Invalid", "Successful", "Failed". + :vartype kind: str or ~azure.servicefabric.models.PropertyBatchInfoKind + :ivar properties: A map containing the properties that were requested through any "Get" + property batch operations. The key represents the index of the "Get" operation in the original + request, in string form. The value is the property. If a property is not found, it will not be + in the map. + :vartype properties: dict[str, ~azure.servicefabric.models.PropertyInfo] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'properties': {'key': 'Properties', 'type': '{PropertyInfo}'}, + } + + def __init__( + self, + *, + properties: Optional[Dict[str, "PropertyInfo"]] = None, + **kwargs + ): + """ + :keyword properties: A map containing the properties that were requested through any "Get" + property batch operations. The key represents the index of the "Get" operation in the original + request, in string form. The value is the property. If a property is not found, it will not be + in the map. + :paramtype properties: dict[str, ~azure.servicefabric.models.PropertyInfo] + """ + super(SuccessfulPropertyBatchInfo, self).__init__(**kwargs) + self.kind = 'Successful' # type: str + self.properties = properties + + +class SystemApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for the fabric:/System application, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state of the cluster is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated + health state of the system application. The types of the unhealthy evaluations can be + DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current + aggregated health state of the system application. The types of the unhealthy evaluations can + be DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(SystemApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'SystemApplication' # type: str + self.unhealthy_evaluations = unhealthy_evaluations + + +class TcpConfig(msrest.serialization.Model): + """Describes the tcp configuration for external connectivity for this network. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. tcp gateway config name. + :vartype name: str + :ivar port: Required. Specifies the port at which the service endpoint below needs to be + exposed. + :vartype port: int + :ivar destination: Required. Describes destination endpoint for routing traffic. + :vartype destination: ~azure.servicefabric.models.GatewayDestination + """ + + _validation = { + 'name': {'required': True}, + 'port': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, + } + + def __init__( + self, + *, + name: str, + port: int, + destination: "GatewayDestination", + **kwargs + ): + """ + :keyword name: Required. tcp gateway config name. + :paramtype name: str + :keyword port: Required. Specifies the port at which the service endpoint below needs to be + exposed. + :paramtype port: int + :keyword destination: Required. Describes destination endpoint for routing traffic. + :paramtype destination: ~azure.servicefabric.models.GatewayDestination + """ + super(TcpConfig, self).__init__(**kwargs) + self.name = name + self.port = port + self.destination = destination + + +class TestErrorChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when an unexpected event occurs in the Chaos engine. +For example, due to the cluster snapshot being inconsistent, while faulting an entity, Chaos found that the entity was already faulted -- which would be an unexpected event. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values + include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", + "Stopped". + :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind + :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :vartype time_stamp_utc: ~datetime.datetime + :ivar reason: Describes why TestErrorChaosEvent was generated. For example, Chaos tries to + fault a partition but finds that the partition is no longer fault tolerant, then a + TestErrorEvent gets generated with the reason stating that the partition is not fault tolerant. + :vartype reason: str + """ + + _validation = { + 'kind': {'required': True}, + 'time_stamp_utc': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__( + self, + *, + time_stamp_utc: datetime.datetime, + reason: Optional[str] = None, + **kwargs + ): + """ + :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :paramtype time_stamp_utc: ~datetime.datetime + :keyword reason: Describes why TestErrorChaosEvent was generated. For example, Chaos tries to + fault a partition but finds that the partition is no longer fault tolerant, then a + TestErrorEvent gets generated with the reason stating that the partition is not fault tolerant. + :paramtype reason: str + """ + super(TestErrorChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.kind = 'TestError' # type: str + self.reason = reason + + +class TimeBasedBackupScheduleDescription(BackupScheduleDescription): + """Describes the time based backup schedule. + + All required parameters must be populated in order to send to Azure. + + :ivar schedule_kind: Required. The kind of backup schedule, time based or frequency + based.Constant filled by server. Possible values include: "Invalid", "TimeBased", + "FrequencyBased". + :vartype schedule_kind: str or ~azure.servicefabric.models.BackupScheduleKind + :ivar schedule_frequency_type: Required. Describes the frequency with which to run the time + based backup schedule. Possible values include: "Invalid", "Daily", "Weekly". + :vartype schedule_frequency_type: str or + ~azure.servicefabric.models.BackupScheduleFrequencyType + :ivar run_days: List of days of a week when to trigger the periodic backup. This is valid only + when the backup schedule frequency type is weekly. + :vartype run_days: list[str or ~azure.servicefabric.models.DayOfWeek] + :ivar run_times: Required. Represents the list of exact time during the day in ISO8601 format. + Like '19:00:00' will represent '7PM' during the day. Date specified along with time will be + ignored. + :vartype run_times: list[~datetime.datetime] + """ + + _validation = { + 'schedule_kind': {'required': True}, + 'schedule_frequency_type': {'required': True}, + 'run_times': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + 'schedule_frequency_type': {'key': 'ScheduleFrequencyType', 'type': 'str'}, + 'run_days': {'key': 'RunDays', 'type': '[str]'}, + 'run_times': {'key': 'RunTimes', 'type': '[iso-8601]'}, + } + + def __init__( + self, + *, + schedule_frequency_type: Union[str, "BackupScheduleFrequencyType"], + run_times: List[datetime.datetime], + run_days: Optional[List[Union[str, "DayOfWeek"]]] = None, + **kwargs + ): + """ + :keyword schedule_frequency_type: Required. Describes the frequency with which to run the time + based backup schedule. Possible values include: "Invalid", "Daily", "Weekly". + :paramtype schedule_frequency_type: str or + ~azure.servicefabric.models.BackupScheduleFrequencyType + :keyword run_days: List of days of a week when to trigger the periodic backup. This is valid + only when the backup schedule frequency type is weekly. + :paramtype run_days: list[str or ~azure.servicefabric.models.DayOfWeek] + :keyword run_times: Required. Represents the list of exact time during the day in ISO8601 + format. Like '19:00:00' will represent '7PM' during the day. Date specified along with time + will be ignored. + :paramtype run_times: list[~datetime.datetime] + """ + super(TimeBasedBackupScheduleDescription, self).__init__(**kwargs) + self.schedule_kind = 'TimeBased' # type: str + self.schedule_frequency_type = schedule_frequency_type + self.run_days = run_days + self.run_times = run_times + + +class TimeOfDay(msrest.serialization.Model): + """Defines an hour and minute of the day specified in 24 hour time. + + :ivar hour: Represents the hour of the day. Value must be between 0 and 23 inclusive. + :vartype hour: int + :ivar minute: Represents the minute of the hour. Value must be between 0 to 59 inclusive. + :vartype minute: int + """ + + _validation = { + 'hour': {'maximum': 23, 'minimum': 0}, + 'minute': {'maximum': 59, 'minimum': 0}, + } + + _attribute_map = { + 'hour': {'key': 'Hour', 'type': 'int'}, + 'minute': {'key': 'Minute', 'type': 'int'}, + } + + def __init__( + self, + *, + hour: Optional[int] = None, + minute: Optional[int] = None, + **kwargs + ): + """ + :keyword hour: Represents the hour of the day. Value must be between 0 and 23 inclusive. + :paramtype hour: int + :keyword minute: Represents the minute of the hour. Value must be between 0 to 59 inclusive. + :paramtype minute: int + """ + super(TimeOfDay, self).__init__(**kwargs) + self.hour = hour + self.minute = minute + + +class TimeRange(msrest.serialization.Model): + """Defines a time range in a 24 hour day specified by a start and end time. + + :ivar start_time: Defines an hour and minute of the day specified in 24 hour time. + :vartype start_time: ~azure.servicefabric.models.TimeOfDay + :ivar end_time: Defines an hour and minute of the day specified in 24 hour time. + :vartype end_time: ~azure.servicefabric.models.TimeOfDay + """ + + _attribute_map = { + 'start_time': {'key': 'StartTime', 'type': 'TimeOfDay'}, + 'end_time': {'key': 'EndTime', 'type': 'TimeOfDay'}, + } + + def __init__( + self, + *, + start_time: Optional["TimeOfDay"] = None, + end_time: Optional["TimeOfDay"] = None, + **kwargs + ): + """ + :keyword start_time: Defines an hour and minute of the day specified in 24 hour time. + :paramtype start_time: ~azure.servicefabric.models.TimeOfDay + :keyword end_time: Defines an hour and minute of the day specified in 24 hour time. + :paramtype end_time: ~azure.servicefabric.models.TimeOfDay + """ + super(TimeRange, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + + +class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): + """Describes a partitioning scheme where an integer range is allocated evenly across a number of partitions. + + All required parameters must be populated in order to send to Azure. + + :ivar partition_scheme: Required. Specifies how the service is partitioned.Constant filled by + server. Possible values include: "Invalid", "Singleton", "UniformInt64Range", "Named". + :vartype partition_scheme: str or ~azure.servicefabric.models.PartitionScheme + :ivar count: Required. The number of partitions. + :vartype count: int + :ivar low_key: Required. String indicating the lower bound of the partition key range that + should be split between the partitions. + :vartype low_key: str + :ivar high_key: Required. String indicating the upper bound of the partition key range that + should be split between the partitions. + :vartype high_key: str + """ + + _validation = { + 'partition_scheme': {'required': True}, + 'count': {'required': True}, + 'low_key': {'required': True}, + 'high_key': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + 'count': {'key': 'Count', 'type': 'int'}, + 'low_key': {'key': 'LowKey', 'type': 'str'}, + 'high_key': {'key': 'HighKey', 'type': 'str'}, + } + + def __init__( + self, + *, + count: int, + low_key: str, + high_key: str, + **kwargs + ): + """ + :keyword count: Required. The number of partitions. + :paramtype count: int + :keyword low_key: Required. String indicating the lower bound of the partition key range that + should be split between the partitions. + :paramtype low_key: str + :keyword high_key: Required. String indicating the upper bound of the partition key range that + should be split between the partitions. + :paramtype high_key: str + """ + super(UniformInt64RangePartitionSchemeDescription, self).__init__(**kwargs) + self.partition_scheme = 'UniformInt64Range' # type: str + self.count = count + self.low_key = low_key + self.high_key = high_key + + +class UnplacedReplicaInformation(msrest.serialization.Model): + """Contains information for an unplaced replica. + + :ivar service_name: The name of the service. + :vartype service_name: str + :ivar partition_id: The ID of the partition. + :vartype partition_id: str + :ivar unplaced_replica_details: List of reasons due to which a replica cannot be placed. + :vartype unplaced_replica_details: list[str] + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'unplaced_replica_details': {'key': 'UnplacedReplicaDetails', 'type': '[str]'}, + } + + def __init__( + self, + *, + service_name: Optional[str] = None, + partition_id: Optional[str] = None, + unplaced_replica_details: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword service_name: The name of the service. + :paramtype service_name: str + :keyword partition_id: The ID of the partition. + :paramtype partition_id: str + :keyword unplaced_replica_details: List of reasons due to which a replica cannot be placed. + :paramtype unplaced_replica_details: list[str] + """ + super(UnplacedReplicaInformation, self).__init__(**kwargs) + self.service_name = service_name + self.partition_id = partition_id + self.unplaced_replica_details = unplaced_replica_details + + +class UnprovisionApplicationTypeDescriptionInfo(msrest.serialization.Model): + """Describes the operation to unregister or unprovision an application type and its version that was registered with the Service Fabric. + + All required parameters must be populated in order to send to Azure. + + :ivar application_type_version: Required. The version of the application type as defined in the + application manifest. + :vartype application_type_version: str + :ivar async_property: The flag indicating whether or not unprovision should occur + asynchronously. When set to true, the unprovision operation returns when the request is + accepted by the system, and the unprovision operation continues without any timeout limit. The + default value is false. However, we recommend setting it to true for large application packages + that were provisioned. + :vartype async_property: bool + """ + + _validation = { + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'async_property': {'key': 'Async', 'type': 'bool'}, + } + + def __init__( + self, + *, + application_type_version: str, + async_property: Optional[bool] = None, + **kwargs + ): + """ + :keyword application_type_version: Required. The version of the application type as defined in + the application manifest. + :paramtype application_type_version: str + :keyword async_property: The flag indicating whether or not unprovision should occur + asynchronously. When set to true, the unprovision operation returns when the request is + accepted by the system, and the unprovision operation continues without any timeout limit. The + default value is false. However, we recommend setting it to true for large application packages + that were provisioned. + :paramtype async_property: bool + """ + super(UnprovisionApplicationTypeDescriptionInfo, self).__init__(**kwargs) + self.application_type_version = application_type_version + self.async_property = async_property + + +class UnprovisionFabricDescription(msrest.serialization.Model): + """Describes the parameters for unprovisioning a cluster. + + :ivar code_version: The cluster code package version. + :vartype code_version: str + :ivar config_version: The cluster manifest version. + :vartype config_version: str + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + code_version: Optional[str] = None, + config_version: Optional[str] = None, + **kwargs + ): + """ + :keyword code_version: The cluster code package version. + :paramtype code_version: str + :keyword config_version: The cluster manifest version. + :paramtype config_version: str + """ + super(UnprovisionFabricDescription, self).__init__(**kwargs) + self.code_version = code_version + self.config_version = config_version + + +class UpdateClusterUpgradeDescription(msrest.serialization.Model): + """Parameters for updating a cluster upgrade. + + :ivar upgrade_kind: The type of upgrade out of the following possible values. Possible values + include: "Invalid", "Rolling", "Rolling_ForceRestart". Default value: "Rolling". + :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeType + :ivar update_description: Describes the parameters for updating a rolling upgrade of + application or cluster. + :vartype update_description: ~azure.servicefabric.models.RollingUpgradeUpdateDescription + :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster + or of a cluster node. + :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :ivar enable_delta_health_evaluation: When true, enables delta health evaluation rather than + absolute health evaluation after completion of each upgrade domain. + :vartype enable_delta_health_evaluation: bool + :ivar cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of the + cluster during a cluster upgrade. + :vartype cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :ivar application_health_policy_map: Defines the application health policy map used to evaluate + the health of an application or one of its children entities. + :vartype application_health_policy_map: ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _attribute_map = { + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__( + self, + *, + upgrade_kind: Optional[Union[str, "UpgradeType"]] = "Rolling", + update_description: Optional["RollingUpgradeUpdateDescription"] = None, + cluster_health_policy: Optional["ClusterHealthPolicy"] = None, + enable_delta_health_evaluation: Optional[bool] = None, + cluster_upgrade_health_policy: Optional["ClusterUpgradeHealthPolicyObject"] = None, + application_health_policy_map: Optional["ApplicationHealthPolicies"] = None, + **kwargs + ): + """ + :keyword upgrade_kind: The type of upgrade out of the following possible values. Possible + values include: "Invalid", "Rolling", "Rolling_ForceRestart". Default value: "Rolling". + :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeType + :keyword update_description: Describes the parameters for updating a rolling upgrade of + application or cluster. + :paramtype update_description: ~azure.servicefabric.models.RollingUpgradeUpdateDescription + :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the + cluster or of a cluster node. + :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :keyword enable_delta_health_evaluation: When true, enables delta health evaluation rather than + absolute health evaluation after completion of each upgrade domain. + :paramtype enable_delta_health_evaluation: bool + :keyword cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of + the cluster during a cluster upgrade. + :paramtype cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :keyword application_health_policy_map: Defines the application health policy map used to + evaluate the health of an application or one of its children entities. + :paramtype application_health_policy_map: ~azure.servicefabric.models.ApplicationHealthPolicies + """ + super(UpdateClusterUpgradeDescription, self).__init__(**kwargs) + self.upgrade_kind = upgrade_kind + self.update_description = update_description + self.cluster_health_policy = cluster_health_policy + self.enable_delta_health_evaluation = enable_delta_health_evaluation + self.cluster_upgrade_health_policy = cluster_upgrade_health_policy + self.application_health_policy_map = application_health_policy_map + + +class UpdatePartitionLoadResult(msrest.serialization.Model): + """Specifies result of updating load for specified partitions. The output will be ordered based on the partition ID. + + :ivar partition_id: Id of the partition. + :vartype partition_id: str + :ivar partition_error_code: If OperationState is Completed - this is 0. If OperationState is + Faulted - this is an error code indicating the reason. + :vartype partition_error_code: int + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'partition_error_code': {'key': 'PartitionErrorCode', 'type': 'int'}, + } + + def __init__( + self, + *, + partition_id: Optional[str] = None, + partition_error_code: Optional[int] = None, + **kwargs + ): + """ + :keyword partition_id: Id of the partition. + :paramtype partition_id: str + :keyword partition_error_code: If OperationState is Completed - this is 0. If OperationState + is Faulted - this is an error code indicating the reason. + :paramtype partition_error_code: int + """ + super(UpdatePartitionLoadResult, self).__init__(**kwargs) + self.partition_id = partition_id + self.partition_error_code = partition_error_code + + +class UpgradeDomainDeltaNodesCheckHealthEvaluation(HealthEvaluation): + """Represents health evaluation for delta unhealthy cluster nodes in an upgrade domain, containing health evaluations for each unhealthy node that impacted current aggregated health state. +Can be returned during cluster upgrade when cluster aggregated health state is Warning or Error. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar upgrade_domain_name: Name of the upgrade domain where nodes health is currently + evaluated. + :vartype upgrade_domain_name: str + :ivar baseline_error_count: Number of upgrade domain nodes with aggregated heath state Error in + the health store at the beginning of the cluster upgrade. + :vartype baseline_error_count: long + :ivar baseline_total_count: Total number of upgrade domain nodes in the health store at the + beginning of the cluster upgrade. + :vartype baseline_total_count: long + :ivar max_percent_delta_unhealthy_nodes: Maximum allowed percentage of upgrade domain delta + unhealthy nodes from the ClusterUpgradeHealthPolicy. + :vartype max_percent_delta_unhealthy_nodes: int + :ivar total_count: Total number of upgrade domain nodes in the health store. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, + 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + upgrade_domain_name: Optional[str] = None, + baseline_error_count: Optional[int] = None, + baseline_total_count: Optional[int] = None, + max_percent_delta_unhealthy_nodes: Optional[int] = None, + total_count: Optional[int] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword upgrade_domain_name: Name of the upgrade domain where nodes health is currently + evaluated. + :paramtype upgrade_domain_name: str + :keyword baseline_error_count: Number of upgrade domain nodes with aggregated heath state Error + in the health store at the beginning of the cluster upgrade. + :paramtype baseline_error_count: long + :keyword baseline_total_count: Total number of upgrade domain nodes in the health store at the + beginning of the cluster upgrade. + :paramtype baseline_total_count: long + :keyword max_percent_delta_unhealthy_nodes: Maximum allowed percentage of upgrade domain delta + unhealthy nodes from the ClusterUpgradeHealthPolicy. + :paramtype max_percent_delta_unhealthy_nodes: int + :keyword total_count: Total number of upgrade domain nodes in the health store. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(UpgradeDomainDeltaNodesCheckHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'UpgradeDomainDeltaNodesCheck' # type: str + self.upgrade_domain_name = upgrade_domain_name + self.baseline_error_count = baseline_error_count + self.baseline_total_count = baseline_total_count + self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + + +class UpgradeDomainDeployedApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed applications in an upgrade domain, containing health evaluations for each unhealthy deployed application that impacted current aggregated health state. Can be returned when evaluating cluster health during cluster upgrade and the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar upgrade_domain_name: Name of the upgrade domain where deployed applications health is + currently evaluated. + :vartype upgrade_domain_name: str + :ivar max_percent_unhealthy_deployed_applications: Maximum allowed percentage of unhealthy + deployed applications from the ClusterHealthPolicy. + :vartype max_percent_unhealthy_deployed_applications: int + :ivar total_count: Total number of deployed applications in the current upgrade domain. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy DeployedApplicationHealthEvaluation that impacted the + aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + upgrade_domain_name: Optional[str] = None, + max_percent_unhealthy_deployed_applications: Optional[int] = None, + total_count: Optional[int] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword upgrade_domain_name: Name of the upgrade domain where deployed applications health is + currently evaluated. + :paramtype upgrade_domain_name: str + :keyword max_percent_unhealthy_deployed_applications: Maximum allowed percentage of unhealthy + deployed applications from the ClusterHealthPolicy. + :paramtype max_percent_unhealthy_deployed_applications: int + :keyword total_count: Total number of deployed applications in the current upgrade domain. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy DeployedApplicationHealthEvaluation that impacted the + aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(UpgradeDomainDeployedApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'UpgradeDomainDeployedApplications' # type: str + self.upgrade_domain_name = upgrade_domain_name + self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + + +class UpgradeDomainInfo(msrest.serialization.Model): + """Information about an upgrade domain. + + :ivar name: The name of the upgrade domain. + :vartype name: str + :ivar state: The state of the upgrade domain. Possible values include: "Invalid", "Pending", + "InProgress", "Completed". + :vartype state: str or ~azure.servicefabric.models.UpgradeDomainState + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + state: Optional[Union[str, "UpgradeDomainState"]] = None, + **kwargs + ): + """ + :keyword name: The name of the upgrade domain. + :paramtype name: str + :keyword state: The state of the upgrade domain. Possible values include: "Invalid", "Pending", + "InProgress", "Completed". + :paramtype state: str or ~azure.servicefabric.models.UpgradeDomainState + """ + super(UpgradeDomainInfo, self).__init__(**kwargs) + self.name = name + self.state = state + + +class UpgradeDomainNodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for cluster nodes in an upgrade domain, containing health evaluations for each unhealthy node that impacted current aggregated health state. Can be returned when evaluating cluster health during cluster upgrade and the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The health manager in the cluster performs health evaluations in + determining the aggregated health state of an entity. This enumeration provides information on + the kind of evaluation that was performed. Following are the possible values.Constant filled by + server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", + "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", + "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", + "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", + "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", + "NodeTypeNodes". + :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind + :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :ivar description: Description of the health evaluation, which represents a summary of the + evaluation process. + :vartype description: str + :ivar upgrade_domain_name: Name of the upgrade domain where nodes health is currently + evaluated. + :vartype upgrade_domain_name: str + :ivar max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes from the + ClusterHealthPolicy. + :vartype max_percent_unhealthy_nodes: int + :ivar total_count: Total number of nodes in the current upgrade domain. + :vartype total_count: long + :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__( + self, + *, + aggregated_health_state: Optional[Union[str, "HealthState"]] = None, + description: Optional[str] = None, + upgrade_domain_name: Optional[str] = None, + max_percent_unhealthy_nodes: Optional[int] = None, + total_count: Optional[int] = None, + unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, + **kwargs + ): + """ + :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, + Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", + "Warning", "Error", "Unknown". + :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState + :keyword description: Description of the health evaluation, which represents a summary of the + evaluation process. + :paramtype description: str + :keyword upgrade_domain_name: Name of the upgrade domain where nodes health is currently + evaluated. + :paramtype upgrade_domain_name: str + :keyword max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes from the + ClusterHealthPolicy. + :paramtype max_percent_unhealthy_nodes: int + :keyword total_count: Total number of nodes in the current upgrade domain. + :paramtype total_count: long + :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health + state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + super(UpgradeDomainNodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.kind = 'UpgradeDomainNodes' # type: str + self.upgrade_domain_name = upgrade_domain_name + self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + + +class UpgradeOrchestrationServiceState(msrest.serialization.Model): + """Service state of Service Fabric Upgrade Orchestration Service. + + :ivar service_state: The state of Service Fabric Upgrade Orchestration Service. + :vartype service_state: str + """ + + _attribute_map = { + 'service_state': {'key': 'ServiceState', 'type': 'str'}, + } + + def __init__( + self, + *, + service_state: Optional[str] = None, + **kwargs + ): + """ + :keyword service_state: The state of Service Fabric Upgrade Orchestration Service. + :paramtype service_state: str + """ + super(UpgradeOrchestrationServiceState, self).__init__(**kwargs) + self.service_state = service_state + + +class UpgradeOrchestrationServiceStateSummary(msrest.serialization.Model): + """Service state summary of Service Fabric Upgrade Orchestration Service. + + :ivar current_code_version: The current code version of the cluster. + :vartype current_code_version: str + :ivar current_manifest_version: The current manifest version of the cluster. + :vartype current_manifest_version: str + :ivar target_code_version: The target code version of the cluster. + :vartype target_code_version: str + :ivar target_manifest_version: The target manifest version of the cluster. + :vartype target_manifest_version: str + :ivar pending_upgrade_type: The type of the pending upgrade of the cluster. + :vartype pending_upgrade_type: str + """ + + _attribute_map = { + 'current_code_version': {'key': 'CurrentCodeVersion', 'type': 'str'}, + 'current_manifest_version': {'key': 'CurrentManifestVersion', 'type': 'str'}, + 'target_code_version': {'key': 'TargetCodeVersion', 'type': 'str'}, + 'target_manifest_version': {'key': 'TargetManifestVersion', 'type': 'str'}, + 'pending_upgrade_type': {'key': 'PendingUpgradeType', 'type': 'str'}, + } + + def __init__( + self, + *, + current_code_version: Optional[str] = None, + current_manifest_version: Optional[str] = None, + target_code_version: Optional[str] = None, + target_manifest_version: Optional[str] = None, + pending_upgrade_type: Optional[str] = None, + **kwargs + ): + """ + :keyword current_code_version: The current code version of the cluster. + :paramtype current_code_version: str + :keyword current_manifest_version: The current manifest version of the cluster. + :paramtype current_manifest_version: str + :keyword target_code_version: The target code version of the cluster. + :paramtype target_code_version: str + :keyword target_manifest_version: The target manifest version of the cluster. + :paramtype target_manifest_version: str + :keyword pending_upgrade_type: The type of the pending upgrade of the cluster. + :paramtype pending_upgrade_type: str + """ + super(UpgradeOrchestrationServiceStateSummary, self).__init__(**kwargs) + self.current_code_version = current_code_version + self.current_manifest_version = current_manifest_version + self.target_code_version = target_code_version + self.target_manifest_version = target_manifest_version + self.pending_upgrade_type = pending_upgrade_type + + +class UpgradeUnitInfo(msrest.serialization.Model): + """Information about an upgrade unit. + + :ivar name: The name of the upgrade unit. + :vartype name: str + :ivar state: The state of the upgrade unit. Possible values include: "Invalid", "Pending", + "InProgress", "Completed", "Failed". + :vartype state: str or ~azure.servicefabric.models.UpgradeUnitState + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + state: Optional[Union[str, "UpgradeUnitState"]] = None, + **kwargs + ): + """ + :keyword name: The name of the upgrade unit. + :paramtype name: str + :keyword state: The state of the upgrade unit. Possible values include: "Invalid", "Pending", + "InProgress", "Completed", "Failed". + :paramtype state: str or ~azure.servicefabric.models.UpgradeUnitState + """ + super(UpgradeUnitInfo, self).__init__(**kwargs) + self.name = name + self.state = state + + +class UploadChunkRange(msrest.serialization.Model): + """Information about which portion of the file to upload. + + :ivar start_position: The start position of the portion of the file. It's represented by the + number of bytes. + :vartype start_position: str + :ivar end_position: The end position of the portion of the file. It's represented by the number + of bytes. + :vartype end_position: str + """ + + _attribute_map = { + 'start_position': {'key': 'StartPosition', 'type': 'str'}, + 'end_position': {'key': 'EndPosition', 'type': 'str'}, + } + + def __init__( + self, + *, + start_position: Optional[str] = None, + end_position: Optional[str] = None, + **kwargs + ): + """ + :keyword start_position: The start position of the portion of the file. It's represented by the + number of bytes. + :paramtype start_position: str + :keyword end_position: The end position of the portion of the file. It's represented by the + number of bytes. + :paramtype end_position: str + """ + super(UploadChunkRange, self).__init__(**kwargs) + self.start_position = start_position + self.end_position = end_position + + +class UploadSession(msrest.serialization.Model): + """Information about a image store upload session. + + :ivar upload_sessions: When querying upload session by upload session ID, the result contains + only one upload session. When querying upload session by image store relative path, the result + might contain multiple upload sessions. + :vartype upload_sessions: list[~azure.servicefabric.models.UploadSessionInfo] + """ + + _attribute_map = { + 'upload_sessions': {'key': 'UploadSessions', 'type': '[UploadSessionInfo]'}, + } + + def __init__( + self, + *, + upload_sessions: Optional[List["UploadSessionInfo"]] = None, + **kwargs + ): + """ + :keyword upload_sessions: When querying upload session by upload session ID, the result + contains only one upload session. When querying upload session by image store relative path, + the result might contain multiple upload sessions. + :paramtype upload_sessions: list[~azure.servicefabric.models.UploadSessionInfo] + """ + super(UploadSession, self).__init__(**kwargs) + self.upload_sessions = upload_sessions + + +class UploadSessionInfo(msrest.serialization.Model): + """Information about an image store upload session. A session is associated with a relative path in the image store. + + :ivar store_relative_path: The remote location within image store. This path is relative to the + image store root. + :vartype store_relative_path: str + :ivar session_id: A unique ID of the upload session. A session ID can be reused only if the + session was committed or removed. + :vartype session_id: str + :ivar modified_date: The date and time when the upload session was last modified. + :vartype modified_date: ~datetime.datetime + :ivar file_size: The size in bytes of the uploading file. + :vartype file_size: str + :ivar expected_ranges: List of chunk ranges that image store has not received yet. + :vartype expected_ranges: list[~azure.servicefabric.models.UploadChunkRange] + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'session_id': {'key': 'SessionId', 'type': 'str'}, + 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, + 'file_size': {'key': 'FileSize', 'type': 'str'}, + 'expected_ranges': {'key': 'ExpectedRanges', 'type': '[UploadChunkRange]'}, + } + + def __init__( + self, + *, + store_relative_path: Optional[str] = None, + session_id: Optional[str] = None, + modified_date: Optional[datetime.datetime] = None, + file_size: Optional[str] = None, + expected_ranges: Optional[List["UploadChunkRange"]] = None, + **kwargs + ): + """ + :keyword store_relative_path: The remote location within image store. This path is relative to + the image store root. + :paramtype store_relative_path: str + :keyword session_id: A unique ID of the upload session. A session ID can be reused only if the + session was committed or removed. + :paramtype session_id: str + :keyword modified_date: The date and time when the upload session was last modified. + :paramtype modified_date: ~datetime.datetime + :keyword file_size: The size in bytes of the uploading file. + :paramtype file_size: str + :keyword expected_ranges: List of chunk ranges that image store has not received yet. + :paramtype expected_ranges: list[~azure.servicefabric.models.UploadChunkRange] + """ + super(UploadSessionInfo, self).__init__(**kwargs) + self.store_relative_path = store_relative_path + self.session_id = session_id + self.modified_date = modified_date + self.file_size = file_size + self.expected_ranges = expected_ranges + + +class UsageInfo(msrest.serialization.Model): + """Information about how much space and how many files in the file system the ImageStore is using in this category. + + :ivar used_space: the size of all files in this category. + :vartype used_space: str + :ivar file_count: the number of all files in this category. + :vartype file_count: str + """ + + _attribute_map = { + 'used_space': {'key': 'UsedSpace', 'type': 'str'}, + 'file_count': {'key': 'FileCount', 'type': 'str'}, + } + + def __init__( + self, + *, + used_space: Optional[str] = None, + file_count: Optional[str] = None, + **kwargs + ): + """ + :keyword used_space: the size of all files in this category. + :paramtype used_space: str + :keyword file_count: the number of all files in this category. + :paramtype file_count: str + """ + super(UsageInfo, self).__init__(**kwargs) + self.used_space = used_space + self.file_count = file_count + + +class ValidateClusterUpgradeResult(msrest.serialization.Model): + """Specifies result of validating a cluster upgrade. + + :ivar service_host_upgrade_impact: The expected impact of the upgrade. Possible values include: + "Invalid", "None", "ServiceHostRestart", "UnexpectedServiceHostRestart". + :vartype service_host_upgrade_impact: str or + ~azure.servicefabric.models.ServiceHostUpgradeImpact + :ivar validation_details: A string containing additional details for the Fabric upgrade + validation result. + :vartype validation_details: str + """ + + _attribute_map = { + 'service_host_upgrade_impact': {'key': 'ServiceHostUpgradeImpact', 'type': 'str'}, + 'validation_details': {'key': 'ValidationDetails', 'type': 'str'}, + } + + def __init__( + self, + *, + service_host_upgrade_impact: Optional[Union[str, "ServiceHostUpgradeImpact"]] = None, + validation_details: Optional[str] = None, + **kwargs + ): + """ + :keyword service_host_upgrade_impact: The expected impact of the upgrade. Possible values + include: "Invalid", "None", "ServiceHostRestart", "UnexpectedServiceHostRestart". + :paramtype service_host_upgrade_impact: str or + ~azure.servicefabric.models.ServiceHostUpgradeImpact + :keyword validation_details: A string containing additional details for the Fabric upgrade + validation result. + :paramtype validation_details: str + """ + super(ValidateClusterUpgradeResult, self).__init__(**kwargs) + self.service_host_upgrade_impact = service_host_upgrade_impact + self.validation_details = validation_details + + +class ValidationFailedChaosEvent(ChaosEvent): + """Chaos event corresponding to a failure during validation. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values + include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", + "Stopped". + :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind + :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :vartype time_stamp_utc: ~datetime.datetime + :ivar reason: Describes why the ValidationFailedChaosEvent was generated. This may happen + because more than MaxPercentUnhealthyNodes are unhealthy for more than + MaxClusterStabilizationTimeout. This reason will be in the Reason property of the + ValidationFailedChaosEvent as a string. + :vartype reason: str + """ + + _validation = { + 'kind': {'required': True}, + 'time_stamp_utc': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__( + self, + *, + time_stamp_utc: datetime.datetime, + reason: Optional[str] = None, + **kwargs + ): + """ + :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :paramtype time_stamp_utc: ~datetime.datetime + :keyword reason: Describes why the ValidationFailedChaosEvent was generated. This may happen + because more than MaxPercentUnhealthyNodes are unhealthy for more than + MaxClusterStabilizationTimeout. This reason will be in the Reason property of the + ValidationFailedChaosEvent as a string. + :paramtype reason: str + """ + super(ValidationFailedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.kind = 'ValidationFailed' # type: str + self.reason = reason + + +class VolumeProviderParametersAzureFile(msrest.serialization.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. + + :ivar account_name: Required. Name of the Azure storage account for the File Share. + :vartype account_name: str + :ivar account_key: Access key of the Azure storage account for the File Share. + :vartype account_key: str + :ivar share_name: Required. Name of the Azure Files file share that provides storage for the + volume. + :vartype 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: Optional[str] = None, + **kwargs + ): + """ + :keyword account_name: Required. Name of the Azure storage account for the File Share. + :paramtype account_name: str + :keyword account_key: Access key of the Azure storage account for the File Share. + :paramtype account_key: str + :keyword share_name: Required. Name of the Azure Files file share that provides storage for the + volume. + :paramtype share_name: str + """ + super(VolumeProviderParametersAzureFile, self).__init__(**kwargs) + self.account_name = account_name + self.account_key = account_key + self.share_name = share_name + + +class VolumeResourceDescription(msrest.serialization.Model): + """This type describes a volume resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Name of the Volume resource. + :vartype name: str + :ivar description: User readable description of the volume. + :vartype description: str + :ivar status: Status of the volume. Possible values include: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current status of the volume. + :vartype status_details: str + :ivar provider: Required. Provider of the volume. Possible values include: "SFAzureFile". + :vartype provider: str or ~azure.servicefabric.models.VolumeProvider + :ivar azure_file_parameters: This type describes a volume provided by an Azure Files file + share. + :vartype azure_file_parameters: ~azure.servicefabric.models.VolumeProviderParametersAzureFile + """ + + _validation = { + 'name': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'provider': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, + } + + def __init__( + self, + *, + name: str, + provider: Union[str, "VolumeProvider"], + description: Optional[str] = None, + azure_file_parameters: Optional["VolumeProviderParametersAzureFile"] = None, + **kwargs + ): + """ + :keyword name: Required. Name of the Volume resource. + :paramtype name: str + :keyword description: User readable description of the volume. + :paramtype description: str + :keyword provider: Required. Provider of the volume. Possible values include: "SFAzureFile". + :paramtype provider: str or ~azure.servicefabric.models.VolumeProvider + :keyword azure_file_parameters: This type describes a volume provided by an Azure Files file + share. + :paramtype azure_file_parameters: ~azure.servicefabric.models.VolumeProviderParametersAzureFile + """ + super(VolumeResourceDescription, self).__init__(**kwargs) + self.name = name + self.description = description + self.status = None + self.status_details = None + self.provider = provider + self.azure_file_parameters = azure_file_parameters + + +class WaitForInbuildReplicaSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the replica build operation to finish. This indicates that there is a replica that is going through the copy or is providing data for building another replica. Bring the node down will abort this copy operation which are typically expensive involving data movements. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + :ivar partition_id: Id of the partition which is undergoing the safety check. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + *, + partition_id: Optional[str] = None, + **kwargs + ): + """ + :keyword partition_id: Id of the partition which is undergoing the safety check. + :paramtype partition_id: str + """ + super(WaitForInbuildReplicaSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'WaitForInbuildReplica' # type: str + + +class WaitForPrimaryPlacementSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the primary replica that was moved out of the node due to upgrade to be placed back again on that node. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + :ivar partition_id: Id of the partition which is undergoing the safety check. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + *, + partition_id: Optional[str] = None, + **kwargs + ): + """ + :keyword partition_id: Id of the partition which is undergoing the safety check. + :paramtype partition_id: str + """ + super(WaitForPrimaryPlacementSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'WaitForPrimaryPlacement' # type: str + + +class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the primary replica to be moved out of the node before starting an upgrade to ensure the availability of the primary replica for the partition. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + :ivar partition_id: Id of the partition which is undergoing the safety check. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + *, + partition_id: Optional[str] = None, + **kwargs + ): + """ + :keyword partition_id: Id of the partition which is undergoing the safety check. + :paramtype partition_id: str + """ + super(WaitForPrimarySwapSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'WaitForPrimarySwap' # type: str + + +class WaitForReconfigurationSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the current reconfiguration of the partition to be completed before starting an upgrade. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service and the reliability of + the state. Following are the kinds of safety checks.Constant filled by server. Possible values + include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", + "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". + :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind + :ivar partition_id: Id of the partition which is undergoing the safety check. + :vartype partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__( + self, + *, + partition_id: Optional[str] = None, + **kwargs + ): + """ + :keyword partition_id: Id of the partition which is undergoing the safety check. + :paramtype partition_id: str + """ + super(WaitForReconfigurationSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'WaitForReconfiguration' # type: str + + +class WaitingChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos is waiting for the cluster to become ready for faulting, for example, Chaos may be waiting for the on-going upgrade to finish. + + All required parameters must be populated in order to send to Azure. + + :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values + include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", + "Stopped". + :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind + :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :vartype time_stamp_utc: ~datetime.datetime + :ivar reason: Describes why the WaitingChaosEvent was generated, for example, due to a cluster + upgrade. + :vartype reason: str + """ + + _validation = { + 'kind': {'required': True}, + 'time_stamp_utc': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__( + self, + *, + time_stamp_utc: datetime.datetime, + reason: Optional[str] = None, + **kwargs + ): + """ + :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. + :paramtype time_stamp_utc: ~datetime.datetime + :keyword reason: Describes why the WaitingChaosEvent was generated, for example, due to a + cluster upgrade. + :paramtype reason: str + """ + super(WaitingChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.kind = 'Waiting' # type: str + self.reason = reason diff --git a/customSDK/servicefabric/models/_service_fabric_client_apis_enums.py b/customSDK/servicefabric/models/_service_fabric_client_apis_enums.py new file mode 100644 index 00000000..852a8882 --- /dev/null +++ b/customSDK/servicefabric/models/_service_fabric_client_apis_enums.py @@ -0,0 +1,2129 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum +from six import with_metaclass +from azure.core import CaseInsensitiveEnumMeta + + +class ApplicationDefinitionKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The mechanism used to define a Service Fabric application. + """ + + #: Indicates the application definition kind is invalid. All Service Fabric enumerations have the + #: invalid type. The value is 65535. + INVALID = "Invalid" + #: Indicates the application is defined by a Service Fabric application description. The value is + #: 0. + SERVICE_FABRIC_APPLICATION_DESCRIPTION = "ServiceFabricApplicationDescription" + #: Indicates the application is defined by compose file(s). The value is 1. + COMPOSE = "Compose" + +class ApplicationPackageCleanupPolicy(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The kind of action that needs to be taken for cleaning up the application package after + successful provision. + """ + + #: Indicates that the application package cleanup policy is invalid. This value is default. The + #: value is zero. + INVALID = "Invalid" + #: Indicates that the cleanup policy of application packages is based on the cluster setting + #: "CleanupApplicationPackageOnProvisionSuccess." The value is 1. + DEFAULT = "Default" + #: Indicates that the service fabric runtime determines when to do the application package + #: cleanup. By default, cleanup is done on successful provision. The value is 2. + AUTOMATIC = "Automatic" + #: Indicates that the user has to explicitly clean up the application package. The value is 3. + MANUAL = "Manual" + +class ApplicationResourceUpgradeState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The state of the application resource upgrade. + """ + + #: Indicates the upgrade state is invalid. All Service Fabric enumerations have the invalid type. + #: The value is 0. + INVALID = "Invalid" + #: The upgrade is in the progress of provisioning target application type version. The value is 1. + PROVISIONING_TARGET = "ProvisioningTarget" + #: The upgrade is rolling forward to the target version but is not complete yet. The value is 2. + ROLLING_FORWARD = "RollingForward" + #: The upgrade is in the progress of unprovisioning current application type version and rolling + #: forward to the target version is completed. The value is 3. + UNPROVISIONING_CURRENT = "UnprovisioningCurrent" + #: The upgrade has finished rolling forward. The value is 4. + COMPLETED_ROLLFORWARD = "CompletedRollforward" + #: The upgrade is rolling back to the previous version but is not complete yet. The value is 5. + ROLLING_BACK = "RollingBack" + #: The upgrade is in the progress of unprovisioning target application type version and rolling + #: back to the current version is completed. The value is 6. + UNPROVISIONING_TARGET = "UnprovisioningTarget" + #: The upgrade has finished rolling back. The value is 7. + COMPLETED_ROLLBACK = "CompletedRollback" + #: The upgrade has failed and is unable to execute FailureAction. The value is 8. + FAILED = "Failed" + +class ApplicationScopedVolumeKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the application-scoped volume kind. + """ + + #: Provides Service Fabric High Availability Volume Disk. + SERVICE_FABRIC_VOLUME_DISK = "ServiceFabricVolumeDisk" + +class ApplicationStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The status of the application. + """ + + #: Indicates the application status is invalid. All Service Fabric enumerations have the invalid + #: type. The value is zero. + INVALID = "Invalid" + #: Indicates the application status is ready. The value is 1. + READY = "Ready" + #: Indicates the application status is upgrading. The value is 2. + UPGRADING = "Upgrading" + #: Indicates the application status is creating. The value is 3. + CREATING = "Creating" + #: Indicates the application status is deleting. The value is 4. + DELETING = "Deleting" + #: Indicates the creation or deletion of application was terminated due to persistent failures. + #: Another create/delete request can be accepted to resume a failed application. The value is 5. + FAILED = "Failed" + +class ApplicationTypeDefinitionKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The mechanism used to define a Service Fabric application type. + """ + + #: Indicates the application type definition kind is invalid. All Service Fabric enumerations have + #: the invalid type. The value is 0. + INVALID = "Invalid" + #: Indicates the application type is defined and created by a Service Fabric application package + #: provided by the user. The value is 1. + SERVICE_FABRIC_APPLICATION_PACKAGE = "ServiceFabricApplicationPackage" + #: Indicates the application type is defined and created implicitly as part of a compose + #: deployment. The value is 2. + COMPOSE = "Compose" + +class ApplicationTypeStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The status of the application type. + """ + + #: Indicates the application type status is invalid. All Service Fabric enumerations have the + #: invalid type. The value is zero. + INVALID = "Invalid" + #: Indicates that the application type is being provisioned in the cluster. The value is 1. + PROVISIONING = "Provisioning" + #: Indicates that the application type is fully provisioned and is available for use. An + #: application of this type and version can be created. The value is 2. + AVAILABLE = "Available" + #: Indicates that the application type is in process of being unprovisioned from the cluster. The + #: value is 3. + UNPROVISIONING = "Unprovisioning" + #: Indicates that the application type provisioning failed and it is unavailable for use. The + #: failure details can be obtained from the application type information query. The failed + #: application type information remains in the cluster until it is unprovisioned or reprovisioned + #: successfully. The value is 4. + FAILED = "Failed" + +class AutoScalingMechanismKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Enumerates the mechanisms for auto scaling. + """ + + #: Indicates that scaling should be performed by adding or removing replicas. + ADD_REMOVE_REPLICA = "AddRemoveReplica" + +class AutoScalingMetricKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Enumerates the metrics that are used for triggering auto scaling. + """ + + #: Indicates that the metric is one of resources, like cpu or memory. + RESOURCE = "Resource" + +class AutoScalingResourceMetricName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Enumerates the resources that are used for triggering auto scaling. + """ + + #: Indicates that the resource is CPU cores. + CPU = "cpu" + #: Indicates that the resource is memory in GB. + MEMORY_IN_GB = "memoryInGB" + +class AutoScalingTriggerKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Enumerates the triggers for auto scaling. + """ + + #: Indicates that scaling should be performed based on average load of all replicas in the + #: service. + AVERAGE_LOAD = "AverageLoad" + +class BackupEntityKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The entity type of a Service Fabric entity such as Application, Service or a Partition where + periodic backups can be enabled. + """ + + #: Indicates an invalid entity kind. All Service Fabric enumerations have the invalid type. + INVALID = "Invalid" + #: Indicates the entity is a Service Fabric partition. + PARTITION = "Partition" + #: Indicates the entity is a Service Fabric service. + SERVICE = "Service" + #: Indicates the entity is a Service Fabric application. + APPLICATION = "Application" + +class BackupPolicyScope(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the scope at which the backup policy is applied. + """ + + #: Indicates an invalid backup policy scope type. All Service Fabric enumerations have the invalid + #: type. + INVALID = "Invalid" + #: Indicates the backup policy is applied at partition level. Hence overriding any policy which + #: may have applied at partition's service or application level. + PARTITION = "Partition" + #: Indicates the backup policy is applied at service level. All partitions of the service inherit + #: this policy unless explicitly overridden at partition level. + SERVICE = "Service" + #: Indicates the backup policy is applied at application level. All services and partitions of the + #: application inherit this policy unless explicitly overridden at service or partition level. + APPLICATION = "Application" + +class BackupScheduleFrequencyType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Describes the frequency with which to run the time based backup schedule. + """ + + #: Indicates an invalid backup schedule frequency type. All Service Fabric enumerations have the + #: invalid type. + INVALID = "Invalid" + #: Indicates that the time based backup schedule is repeated at a daily frequency. + DAILY = "Daily" + #: Indicates that the time based backup schedule is repeated at a weekly frequency. + WEEKLY = "Weekly" + +class BackupScheduleKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The kind of backup schedule, time based or frequency based. + """ + + #: Indicates an invalid backup schedule kind. All Service Fabric enumerations have the invalid + #: type. + INVALID = "Invalid" + #: Indicates a time-based backup schedule. + TIME_BASED = "TimeBased" + #: Indicates a frequency-based backup schedule. + FREQUENCY_BASED = "FrequencyBased" + +class BackupState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Represents the current state of the partition backup operation. + """ + + #: Indicates an invalid backup state. All Service Fabric enumerations have the invalid type. + INVALID = "Invalid" + #: Operation has been validated and accepted. Backup is yet to be triggered. + ACCEPTED = "Accepted" + #: Backup operation has been triggered and is under process. + BACKUP_IN_PROGRESS = "BackupInProgress" + #: Operation completed with success. + SUCCESS = "Success" + #: Operation completed with failure. + FAILURE = "Failure" + #: Operation timed out. + TIMEOUT = "Timeout" + +class BackupStorageKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The kind of backup storage, where backups are saved. + """ + + #: Indicates an invalid backup storage kind. All Service Fabric enumerations have the invalid + #: type. + INVALID = "Invalid" + #: Indicates file/ SMB share to be used as backup storage. + FILE_SHARE = "FileShare" + #: Indicates Azure blob store to be used as backup storage. + AZURE_BLOB_STORE = "AzureBlobStore" + #: Indicates Dsms Azure blob store to be used as backup storage. + DSMS_AZURE_BLOB_STORE = "DsmsAzureBlobStore" + #: Indicates Azure blob store to be used as backup storage using managed identity. + MANAGED_IDENTITY_AZURE_BLOB_STORE = "ManagedIdentityAzureBlobStore" + +class BackupSuspensionScope(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the scope at which the backup suspension was applied. + """ + + #: Indicates an invalid backup suspension scope type also indicating entity is not suspended. All + #: Service Fabric enumerations have the invalid type. + INVALID = "Invalid" + #: Indicates the backup suspension is applied at partition level. + PARTITION = "Partition" + #: Indicates the backup suspension is applied at service level. All partitions of the service are + #: hence suspended for backup. + SERVICE = "Service" + #: Indicates the backup suspension is applied at application level. All services and partitions of + #: the application are hence suspended for backup. + APPLICATION = "Application" + +class BackupType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Describes the type of backup, whether its full or incremental. + """ + + #: Indicates an invalid backup type. All Service Fabric enumerations have the invalid type. + INVALID = "Invalid" + #: Indicates a full backup. + FULL = "Full" + #: Indicates an incremental backup. A backup chain is comprised of a full backup followed by 0 or + #: more incremental backups. + INCREMENTAL = "Incremental" + +class ChaosEventKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The kind of Chaos event. + """ + + #: Indicates an invalid Chaos event kind. All Service Fabric enumerations have the invalid type. + INVALID = "Invalid" + #: Indicates a Chaos event that gets generated when Chaos is started. + STARTED = "Started" + #: Indicates a Chaos event that gets generated when Chaos has decided on the faults for an + #: iteration. This Chaos event contains the details of the faults as a list of strings. + EXECUTING_FAULTS = "ExecutingFaults" + #: Indicates a Chaos event that gets generated when Chaos is waiting for the cluster to become + #: ready for faulting, for example, Chaos may be waiting for the on-going upgrade to finish. + WAITING = "Waiting" + #: Indicates a Chaos event that gets generated when the cluster entities do not become stable and + #: healthy within ChaosParameters.MaxClusterStabilizationTimeoutInSeconds. + VALIDATION_FAILED = "ValidationFailed" + #: Indicates a Chaos event that gets generated when an unexpected event has occurred in the Chaos + #: engine, for example, due to the cluster snapshot being inconsistent, while faulting a faultable + #: entity Chaos found that the entity was already faulted. + TEST_ERROR = "TestError" + #: Indicates a Chaos event that gets generated when Chaos stops because either the user issued a + #: stop or the time to run was up. + STOPPED = "Stopped" + +class ChaosScheduleStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Current status of the schedule. + """ + + #: Indicates an invalid Chaos Schedule status. All Service Fabric enumerations have the invalid + #: type. The value is zero. + INVALID = "Invalid" + #: Indicates that the schedule is stopped and not being used to schedule runs of chaos. The value + #: is one. + STOPPED = "Stopped" + #: Indicates that the schedule is active and is being used to schedule runs of Chaos. The value is + #: two. + ACTIVE = "Active" + #: Indicates that the schedule is expired and will no longer be used to schedule runs of Chaos. + #: The value is three. + EXPIRED = "Expired" + #: Indicates that the schedule is pending and is not yet being used to schedule runs of Chaos but + #: will be used when the start time is passed. The value is four. + PENDING = "Pending" + +class ChaosStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Current status of the Chaos run. + """ + + #: Indicates an invalid Chaos status. All Service Fabric enumerations have the invalid type. The + #: value is zero. + INVALID = "Invalid" + #: Indicates that Chaos is not stopped. The value is one. + RUNNING = "Running" + #: Indicates that Chaos is not scheduling further faults. The value is two. + STOPPED = "Stopped" + +class ComposeDeploymentStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The status of the compose deployment. + """ + + #: Indicates that the compose deployment status is invalid. The value is zero. + INVALID = "Invalid" + #: Indicates that the compose deployment is being provisioned in background. The value is 1. + PROVISIONING = "Provisioning" + #: Indicates that the compose deployment is being created in background. The value is 2. + CREATING = "Creating" + #: Indicates that the compose deployment has been successfully created or upgraded. The value is + #: 3. + READY = "Ready" + #: Indicates that the compose deployment is being unprovisioned in background. The value is 4. + UNPROVISIONING = "Unprovisioning" + #: Indicates that the compose deployment is being deleted in background. The value is 5. + DELETING = "Deleting" + #: Indicates that the compose deployment was terminated due to persistent failures. The value is + #: 6. + FAILED = "Failed" + #: Indicates that the compose deployment is being upgraded in the background. The value is 7. + UPGRADING = "Upgrading" + +class ComposeDeploymentUpgradeState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The state of the compose deployment upgrade. + """ + + #: Indicates the upgrade state is invalid. All Service Fabric enumerations have the invalid type. + #: The value is zero. + INVALID = "Invalid" + #: The upgrade is in the progress of provisioning target application type version. The value is 1. + PROVISIONING_TARGET = "ProvisioningTarget" + #: The upgrade is rolling forward to the target version but is not complete yet. The value is 2. + ROLLING_FORWARD_IN_PROGRESS = "RollingForwardInProgress" + #: The current upgrade domain has finished upgrading. The overall upgrade is waiting for an + #: explicit move next request in UnmonitoredManual mode or performing health checks in Monitored + #: mode. The value is 3. + ROLLING_FORWARD_PENDING = "RollingForwardPending" + #: The upgrade is in the progress of unprovisioning current application type version and rolling + #: forward to the target version is completed. The value is 4. + UNPROVISIONING_CURRENT = "UnprovisioningCurrent" + #: The upgrade has finished rolling forward. The value is 5. + ROLLING_FORWARD_COMPLETED = "RollingForwardCompleted" + #: The upgrade is rolling back to the previous version but is not complete yet. The value is 6. + ROLLING_BACK_IN_PROGRESS = "RollingBackInProgress" + #: The upgrade is in the progress of unprovisioning target application type version and rolling + #: back to the current version is completed. The value is 7. + UNPROVISIONING_TARGET = "UnprovisioningTarget" + #: The upgrade has finished rolling back. The value is 8. + ROLLING_BACK_COMPLETED = "RollingBackCompleted" + #: The upgrade has failed and is unable to execute FailureAction. The value is 9. + FAILED = "Failed" + +class CreateFabricDump(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specify True to create a dump of the fabric node process. This is case-sensitive. + """ + + FALSE = "False" + TRUE = "True" + +class DataLossMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + #: Reserved. Do not pass into API. + INVALID = "Invalid" + #: PartialDataLoss option will cause a quorum of replicas to go down, triggering an OnDataLoss + #: event in the system for the given partition. + PARTIAL_DATA_LOSS = "PartialDataLoss" + #: FullDataLoss option will drop all the replicas which means that all the data will be lost. + FULL_DATA_LOSS = "FullDataLoss" + +class DayOfWeek(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Describes the days in a week. + """ + + #: Indicates the Day referred is Sunday. + SUNDAY = "Sunday" + #: Indicates the Day referred is Monday. + MONDAY = "Monday" + #: Indicates the Day referred is Tuesday. + TUESDAY = "Tuesday" + #: Indicates the Day referred is Wednesday. + WEDNESDAY = "Wednesday" + #: Indicates the Day referred is Thursday. + THURSDAY = "Thursday" + #: Indicates the Day referred is Friday. + FRIDAY = "Friday" + #: Indicates the Day referred is Saturday. + SATURDAY = "Saturday" + +class DeactivationIntent(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Describes the intent or reason for deactivating the node. The possible values are following. + """ + + #: Indicates that the node should be paused. The value is 1. + PAUSE = "Pause" + #: Indicates that the intent is for the node to be restarted after a short period of time. The + #: value is 2. + RESTART = "Restart" + #: Indicates the intent is for the node to remove data. The value is 3. + REMOVE_DATA = "RemoveData" + +class DeployedApplicationStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The status of the application deployed on the node. Following are the possible values. + """ + + #: Indicates that deployment status is not valid. All Service Fabric enumerations have the invalid + #: type. The value is zero. + INVALID = "Invalid" + #: Indicates that the package is downloading from the ImageStore. The value is 1. + DOWNLOADING = "Downloading" + #: Indicates that the package is activating. The value is 2. + ACTIVATING = "Activating" + #: Indicates that the package is active. The value is 3. + ACTIVE = "Active" + #: Indicates that the package is upgrading. The value is 4. + UPGRADING = "Upgrading" + #: Indicates that the package is deactivating. The value is 5. + DEACTIVATING = "Deactivating" + +class DeploymentStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the status of a deployed application or service package on a Service Fabric node. + """ + + #: Indicates status of the application or service package is not known or invalid. The value is 0. + INVALID = "Invalid" + #: Indicates the application or service package is being downloaded to the node from the + #: ImageStore. The value is 1. + DOWNLOADING = "Downloading" + #: Indicates the application or service package is being activated. The value is 2. + ACTIVATING = "Activating" + #: Indicates the application or service package is active the node. The value is 3. + ACTIVE = "Active" + #: Indicates the application or service package is being upgraded. The value is 4. + UPGRADING = "Upgrading" + #: Indicates the application or service package is being deactivated. The value is 5. + DEACTIVATING = "Deactivating" + #: Indicates the application or service package has ran to completion successfully. The value is + #: 6. + RAN_TO_COMPLETION = "RanToCompletion" + #: Indicates the application or service package has failed to run to completion. The value is 7. + FAILED = "Failed" + +class DiagnosticsSinkKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The kind of DiagnosticsSink. + """ + + #: Indicates an invalid sink kind. All Service Fabric enumerations have the invalid type. + INVALID = "Invalid" + #: Diagnostics settings for Geneva. + AZURE_INTERNAL_MONITORING_PIPELINE = "AzureInternalMonitoringPipeline" + +class EntityKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The entity type of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. + """ + + #: Indicates an invalid entity kind. All Service Fabric enumerations have the invalid type. The + #: value is zero. + INVALID = "Invalid" + #: Indicates the entity is a Service Fabric node. The value is 1. + NODE = "Node" + #: Indicates the entity is a Service Fabric partition. The value is 2. + PARTITION = "Partition" + #: Indicates the entity is a Service Fabric service. The value is 3. + SERVICE = "Service" + #: Indicates the entity is a Service Fabric application. The value is 4. + APPLICATION = "Application" + #: Indicates the entity is a Service Fabric replica. The value is 5. + REPLICA = "Replica" + #: Indicates the entity is a Service Fabric deployed application. The value is 6. + DEPLOYED_APPLICATION = "DeployedApplication" + #: Indicates the entity is a Service Fabric deployed service package. The value is 7. + DEPLOYED_SERVICE_PACKAGE = "DeployedServicePackage" + #: Indicates the entity is a Service Fabric cluster. The value is 8. + CLUSTER = "Cluster" + +class EntryPointStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the status of the code package entry point deployed on a Service Fabric node. + """ + + #: Indicates status of entry point is not known or invalid. The value is 0. + INVALID = "Invalid" + #: Indicates the entry point is scheduled to be started. The value is 1. + PENDING = "Pending" + #: Indicates the entry point is being started. The value is 2. + STARTING = "Starting" + #: Indicates the entry point was started successfully and is running. The value is 3. + STARTED = "Started" + #: Indicates the entry point is being stopped. The value is 4. + STOPPING = "Stopping" + #: Indicates the entry point is not running. The value is 5. + STOPPED = "Stopped" + +class EnvironmentVariableType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of the environment variable being given in value + """ + + #: The environment variable in clear text, will not be processed in any way and passed in as is. + CLEAR_TEXT = "ClearText" + #: The URI to a KeyVault secret version, will be resolved using the application's managed identity + #: (this type is only valid if the app was assigned a managed identity) before getting passed in. + KEY_VAULT_REFERENCE = "KeyVaultReference" + #: The reference to a SecretValue resource, will be resolved before getting passed in. + SECRET_VALUE_REFERENCE = "SecretValueReference" + +class ExecutionPolicyType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Enumerates the execution policy types for services. + """ + + #: Indicates the default execution policy, always restart the service if an exit occurs. + DEFAULT = "Default" + #: Indicates that the service will perform its desired operation and complete successfully. If the + #: service encounters failure, it will restarted based on restart policy specified. If the service + #: completes its operation successfully, it will not be restarted again. + RUN_TO_COMPLETION = "RunToCompletion" + +class FabricErrorCodes(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Defines the fabric error codes that be returned as part of the error object in response to + Service Fabric API operations that are not successful. Following are the error code values that + can be returned for a specific HTTP status code. + + + * + Possible values of the error code for HTTP status code 400 (Bad Request) + + + * "FABRIC_E_INVALID_PARTITION_KEY" + * "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" + * "FABRIC_E_INVALID_ADDRESS" + * "FABRIC_E_APPLICATION_NOT_UPGRADING" + * "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" + * "FABRIC_E_FABRIC_NOT_UPGRADING" + * "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" + * "FABRIC_E_INVALID_CONFIGURATION" + * "FABRIC_E_INVALID_NAME_URI" + * "FABRIC_E_PATH_TOO_LONG" + * "FABRIC_E_KEY_TOO_LARGE" + * "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" + * "FABRIC_E_INVALID_ATOMIC_GROUP" + * "FABRIC_E_VALUE_EMPTY" + * "FABRIC_E_BACKUP_IS_ENABLED" + * "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" + * "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" + * "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" + * "E_INVALIDARG" + + * + Possible values of the error code for HTTP status code 404 (Not Found) + + + * "FABRIC_E_NODE_NOT_FOUND" + * "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" + * "FABRIC_E_APPLICATION_NOT_FOUND" + * "FABRIC_E_SERVICE_TYPE_NOT_FOUND" + * "FABRIC_E_SERVICE_DOES_NOT_EXIST" + * "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" + * "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" + * "FABRIC_E_PARTITION_NOT_FOUND" + * "FABRIC_E_REPLICA_DOES_NOT_EXIST" + * "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" + * "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" + * "FABRIC_E_DIRECTORY_NOT_FOUND" + * "FABRIC_E_FABRIC_VERSION_NOT_FOUND" + * "FABRIC_E_FILE_NOT_FOUND" + * "FABRIC_E_NAME_DOES_NOT_EXIST" + * "FABRIC_E_PROPERTY_DOES_NOT_EXIST" + * "FABRIC_E_ENUMERATION_COMPLETED" + * "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" + * "FABRIC_E_KEY_NOT_FOUND" + * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" + * "FABRIC_E_BACKUP_NOT_ENABLED" + * "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" + * "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + * "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" + + * + Possible values of the error code for HTTP status code 409 (Conflict) + + + * "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" + * "FABRIC_E_APPLICATION_ALREADY_EXISTS" + * "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" + * "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" + * "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" + * "FABRIC_E_SERVICE_ALREADY_EXISTS" + * "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" + * "FABRIC_E_APPLICATION_TYPE_IN_USE" + * "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" + * "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" + * "FABRIC_E_FABRIC_VERSION_IN_USE" + * "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" + * "FABRIC_E_NAME_ALREADY_EXISTS" + * "FABRIC_E_NAME_NOT_EMPTY" + * "FABRIC_E_PROPERTY_CHECK_FAILED" + * "FABRIC_E_SERVICE_METADATA_MISMATCH" + * "FABRIC_E_SERVICE_TYPE_MISMATCH" + * "FABRIC_E_HEALTH_STALE_REPORT" + * "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" + * "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" + * "FABRIC_E_INSTANCE_ID_MISMATCH" + * "FABRIC_E_BACKUP_IN_PROGRESS" + * "FABRIC_E_RESTORE_IN_PROGRESS" + * "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" + + * + Possible values of the error code for HTTP status code 413 (Request Entity Too Large) + + + * "FABRIC_E_VALUE_TOO_LARGE" + + * + Possible values of the error code for HTTP status code 500 (Internal Server Error) + + + * "FABRIC_E_NODE_IS_UP" + * "E_FAIL" + * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" + * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" + * "FABRIC_E_VOLUME_ALREADY_EXISTS" + * "FABRIC_E_VOLUME_NOT_FOUND" + * "SerializationError" + * "FABRIC_E_CERTIFICATE_NOT_FOUND" + + * + Possible values of the error code for HTTP status code 503 (Service Unavailable) + + + * "FABRIC_E_NO_WRITE_QUORUM" + * "FABRIC_E_NOT_PRIMARY" + * "FABRIC_E_NOT_READY" + * "FABRIC_E_RECONFIGURATION_PENDING" + * "FABRIC_E_SERVICE_OFFLINE" + * "E_ABORT" + * "FABRIC_E_VALUE_TOO_LARGE" + + * + Possible values of the error code for HTTP status code 504 (Gateway Timeout) + + + * "FABRIC_E_COMMUNICATION_ERROR" + * "FABRIC_E_OPERATION_NOT_COMPLETE" + * "FABRIC_E_TIMEOUT" + """ + + FABRIC_E_INVALID_PARTITION_KEY = "FABRIC_E_INVALID_PARTITION_KEY" + FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR = "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" + FABRIC_E_INVALID_ADDRESS = "FABRIC_E_INVALID_ADDRESS" + FABRIC_E_APPLICATION_NOT_UPGRADING = "FABRIC_E_APPLICATION_NOT_UPGRADING" + FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR = "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" + FABRIC_E_FABRIC_NOT_UPGRADING = "FABRIC_E_FABRIC_NOT_UPGRADING" + FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR = "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" + FABRIC_E_INVALID_CONFIGURATION = "FABRIC_E_INVALID_CONFIGURATION" + FABRIC_E_INVALID_NAME_URI = "FABRIC_E_INVALID_NAME_URI" + FABRIC_E_PATH_TOO_LONG = "FABRIC_E_PATH_TOO_LONG" + FABRIC_E_KEY_TOO_LARGE = "FABRIC_E_KEY_TOO_LARGE" + FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED = "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" + FABRIC_E_INVALID_ATOMIC_GROUP = "FABRIC_E_INVALID_ATOMIC_GROUP" + FABRIC_E_VALUE_EMPTY = "FABRIC_E_VALUE_EMPTY" + FABRIC_E_NODE_NOT_FOUND = "FABRIC_E_NODE_NOT_FOUND" + FABRIC_E_APPLICATION_TYPE_NOT_FOUND = "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" + FABRIC_E_APPLICATION_NOT_FOUND = "FABRIC_E_APPLICATION_NOT_FOUND" + FABRIC_E_SERVICE_TYPE_NOT_FOUND = "FABRIC_E_SERVICE_TYPE_NOT_FOUND" + FABRIC_E_SERVICE_DOES_NOT_EXIST = "FABRIC_E_SERVICE_DOES_NOT_EXIST" + FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND = "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" + FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND = "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" + FABRIC_E_PARTITION_NOT_FOUND = "FABRIC_E_PARTITION_NOT_FOUND" + FABRIC_E_REPLICA_DOES_NOT_EXIST = "FABRIC_E_REPLICA_DOES_NOT_EXIST" + FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST = "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" + FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND = "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" + FABRIC_E_DIRECTORY_NOT_FOUND = "FABRIC_E_DIRECTORY_NOT_FOUND" + FABRIC_E_FABRIC_VERSION_NOT_FOUND = "FABRIC_E_FABRIC_VERSION_NOT_FOUND" + FABRIC_E_FILE_NOT_FOUND = "FABRIC_E_FILE_NOT_FOUND" + FABRIC_E_NAME_DOES_NOT_EXIST = "FABRIC_E_NAME_DOES_NOT_EXIST" + FABRIC_E_PROPERTY_DOES_NOT_EXIST = "FABRIC_E_PROPERTY_DOES_NOT_EXIST" + FABRIC_E_ENUMERATION_COMPLETED = "FABRIC_E_ENUMERATION_COMPLETED" + FABRIC_E_SERVICE_MANIFEST_NOT_FOUND = "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" + FABRIC_E_KEY_NOT_FOUND = "FABRIC_E_KEY_NOT_FOUND" + FABRIC_E_HEALTH_ENTITY_NOT_FOUND = "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" + FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS = "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" + FABRIC_E_APPLICATION_ALREADY_EXISTS = "FABRIC_E_APPLICATION_ALREADY_EXISTS" + FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION = "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" + FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS = "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" + FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS = "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" + FABRIC_E_SERVICE_ALREADY_EXISTS = "FABRIC_E_SERVICE_ALREADY_EXISTS" + FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS = "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" + FABRIC_E_APPLICATION_TYPE_IN_USE = "FABRIC_E_APPLICATION_TYPE_IN_USE" + FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION = "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" + FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS = "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" + FABRIC_E_FABRIC_VERSION_IN_USE = "FABRIC_E_FABRIC_VERSION_IN_USE" + FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS = "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" + FABRIC_E_NAME_ALREADY_EXISTS = "FABRIC_E_NAME_ALREADY_EXISTS" + FABRIC_E_NAME_NOT_EMPTY = "FABRIC_E_NAME_NOT_EMPTY" + FABRIC_E_PROPERTY_CHECK_FAILED = "FABRIC_E_PROPERTY_CHECK_FAILED" + FABRIC_E_SERVICE_METADATA_MISMATCH = "FABRIC_E_SERVICE_METADATA_MISMATCH" + FABRIC_E_SERVICE_TYPE_MISMATCH = "FABRIC_E_SERVICE_TYPE_MISMATCH" + FABRIC_E_HEALTH_STALE_REPORT = "FABRIC_E_HEALTH_STALE_REPORT" + FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED = "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" + FABRIC_E_NODE_HAS_NOT_STOPPED_YET = "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" + FABRIC_E_INSTANCE_ID_MISMATCH = "FABRIC_E_INSTANCE_ID_MISMATCH" + FABRIC_E_VALUE_TOO_LARGE = "FABRIC_E_VALUE_TOO_LARGE" + FABRIC_E_NO_WRITE_QUORUM = "FABRIC_E_NO_WRITE_QUORUM" + FABRIC_E_NOT_PRIMARY = "FABRIC_E_NOT_PRIMARY" + FABRIC_E_NOT_READY = "FABRIC_E_NOT_READY" + FABRIC_E_RECONFIGURATION_PENDING = "FABRIC_E_RECONFIGURATION_PENDING" + FABRIC_E_SERVICE_OFFLINE = "FABRIC_E_SERVICE_OFFLINE" + E_ABORT = "E_ABORT" + FABRIC_E_COMMUNICATION_ERROR = "FABRIC_E_COMMUNICATION_ERROR" + FABRIC_E_OPERATION_NOT_COMPLETE = "FABRIC_E_OPERATION_NOT_COMPLETE" + FABRIC_E_TIMEOUT = "FABRIC_E_TIMEOUT" + FABRIC_E_NODE_IS_UP = "FABRIC_E_NODE_IS_UP" + E_FAIL = "E_FAIL" + FABRIC_E_BACKUP_IS_ENABLED = "FABRIC_E_BACKUP_IS_ENABLED" + FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH = "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" + FABRIC_E_INVALID_FOR_STATELESS_SERVICES = "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" + FABRIC_E_BACKUP_NOT_ENABLED = "FABRIC_E_BACKUP_NOT_ENABLED" + FABRIC_E_BACKUP_POLICY_NOT_EXISTING = "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" + FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING = "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + FABRIC_E_BACKUP_IN_PROGRESS = "FABRIC_E_BACKUP_IN_PROGRESS" + FABRIC_E_RESTORE_IN_PROGRESS = "FABRIC_E_RESTORE_IN_PROGRESS" + 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" + FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR = "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" + FABRIC_E_CERTIFICATE_NOT_FOUND = "FABRIC_E_CERTIFICATE_NOT_FOUND" + +class FabricEventKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The kind of FabricEvent. + """ + + CLUSTER_EVENT = "ClusterEvent" + CONTAINER_INSTANCE_EVENT = "ContainerInstanceEvent" + NODE_EVENT = "NodeEvent" + APPLICATION_EVENT = "ApplicationEvent" + SERVICE_EVENT = "ServiceEvent" + PARTITION_EVENT = "PartitionEvent" + REPLICA_EVENT = "ReplicaEvent" + PARTITION_ANALYSIS_EVENT = "PartitionAnalysisEvent" + APPLICATION_CREATED = "ApplicationCreated" + APPLICATION_DELETED = "ApplicationDeleted" + APPLICATION_NEW_HEALTH_REPORT = "ApplicationNewHealthReport" + APPLICATION_HEALTH_REPORT_EXPIRED = "ApplicationHealthReportExpired" + APPLICATION_UPGRADE_COMPLETED = "ApplicationUpgradeCompleted" + APPLICATION_UPGRADE_DOMAIN_COMPLETED = "ApplicationUpgradeDomainCompleted" + APPLICATION_UPGRADE_ROLLBACK_COMPLETED = "ApplicationUpgradeRollbackCompleted" + APPLICATION_UPGRADE_ROLLBACK_STARTED = "ApplicationUpgradeRollbackStarted" + APPLICATION_UPGRADE_STARTED = "ApplicationUpgradeStarted" + DEPLOYED_APPLICATION_NEW_HEALTH_REPORT = "DeployedApplicationNewHealthReport" + DEPLOYED_APPLICATION_HEALTH_REPORT_EXPIRED = "DeployedApplicationHealthReportExpired" + APPLICATION_PROCESS_EXITED = "ApplicationProcessExited" + APPLICATION_CONTAINER_INSTANCE_EXITED = "ApplicationContainerInstanceExited" + NODE_ABORTED = "NodeAborted" + NODE_ADDED_TO_CLUSTER = "NodeAddedToCluster" + NODE_CLOSED = "NodeClosed" + NODE_DEACTIVATE_COMPLETED = "NodeDeactivateCompleted" + NODE_DEACTIVATE_STARTED = "NodeDeactivateStarted" + NODE_DOWN = "NodeDown" + NODE_NEW_HEALTH_REPORT = "NodeNewHealthReport" + NODE_HEALTH_REPORT_EXPIRED = "NodeHealthReportExpired" + NODE_OPEN_SUCCEEDED = "NodeOpenSucceeded" + NODE_OPEN_FAILED = "NodeOpenFailed" + NODE_REMOVED_FROM_CLUSTER = "NodeRemovedFromCluster" + NODE_UP = "NodeUp" + PARTITION_NEW_HEALTH_REPORT = "PartitionNewHealthReport" + PARTITION_HEALTH_REPORT_EXPIRED = "PartitionHealthReportExpired" + PARTITION_RECONFIGURED = "PartitionReconfigured" + PARTITION_PRIMARY_MOVE_ANALYSIS = "PartitionPrimaryMoveAnalysis" + SERVICE_CREATED = "ServiceCreated" + SERVICE_DELETED = "ServiceDeleted" + SERVICE_NEW_HEALTH_REPORT = "ServiceNewHealthReport" + SERVICE_HEALTH_REPORT_EXPIRED = "ServiceHealthReportExpired" + DEPLOYED_SERVICE_PACKAGE_NEW_HEALTH_REPORT = "DeployedServicePackageNewHealthReport" + DEPLOYED_SERVICE_PACKAGE_HEALTH_REPORT_EXPIRED = "DeployedServicePackageHealthReportExpired" + STATEFUL_REPLICA_NEW_HEALTH_REPORT = "StatefulReplicaNewHealthReport" + STATEFUL_REPLICA_HEALTH_REPORT_EXPIRED = "StatefulReplicaHealthReportExpired" + STATELESS_REPLICA_NEW_HEALTH_REPORT = "StatelessReplicaNewHealthReport" + STATELESS_REPLICA_HEALTH_REPORT_EXPIRED = "StatelessReplicaHealthReportExpired" + CLUSTER_NEW_HEALTH_REPORT = "ClusterNewHealthReport" + CLUSTER_HEALTH_REPORT_EXPIRED = "ClusterHealthReportExpired" + CLUSTER_UPGRADE_COMPLETED = "ClusterUpgradeCompleted" + CLUSTER_UPGRADE_DOMAIN_COMPLETED = "ClusterUpgradeDomainCompleted" + CLUSTER_UPGRADE_ROLLBACK_COMPLETED = "ClusterUpgradeRollbackCompleted" + CLUSTER_UPGRADE_ROLLBACK_STARTED = "ClusterUpgradeRollbackStarted" + CLUSTER_UPGRADE_STARTED = "ClusterUpgradeStarted" + CHAOS_STOPPED = "ChaosStopped" + CHAOS_STARTED = "ChaosStarted" + CHAOS_CODE_PACKAGE_RESTART_SCHEDULED = "ChaosCodePackageRestartScheduled" + CHAOS_REPLICA_REMOVAL_SCHEDULED = "ChaosReplicaRemovalScheduled" + CHAOS_PARTITION_SECONDARY_MOVE_SCHEDULED = "ChaosPartitionSecondaryMoveScheduled" + CHAOS_PARTITION_PRIMARY_MOVE_SCHEDULED = "ChaosPartitionPrimaryMoveScheduled" + CHAOS_REPLICA_RESTART_SCHEDULED = "ChaosReplicaRestartScheduled" + CHAOS_NODE_RESTART_SCHEDULED = "ChaosNodeRestartScheduled" + +class FabricReplicaStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the status of the replica. + """ + + #: Indicates that the read or write operation access status is not valid. This value is not + #: returned to the caller. + INVALID = "Invalid" + #: Indicates that the replica is down. + DOWN = "Down" + #: Indicates that the replica is up. + UP = "Up" + +class FailureAction(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The compensating action to perform when a Monitored upgrade encounters monitoring policy or + health policy violations. + Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start + rolling back automatically. + Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. + """ + + #: Indicates the failure action is invalid. All Service Fabric enumerations have the invalid type. + #: The value is zero. + INVALID = "Invalid" + #: The upgrade will start rolling back automatically. The value is 1. + ROLLBACK = "Rollback" + #: The upgrade will switch to UnmonitoredManual upgrade mode. The value is 2. + MANUAL = "Manual" + +class FailureReason(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The cause of an upgrade failure that resulted in FailureAction being executed. + """ + + #: Indicates the reason is invalid or unknown. All Service Fabric enumerations have the invalid + #: type. The value is zero. + NONE = "None" + #: There was an external request to roll back the upgrade. The value is 1. + INTERRUPTED = "Interrupted" + #: The upgrade failed due to health policy violations. The value is 2. + HEALTH_CHECK = "HealthCheck" + #: An upgrade domain took longer than the allowed upgrade domain timeout to process. The value is + #: 3. + UPGRADE_DOMAIN_TIMEOUT = "UpgradeDomainTimeout" + #: The overall upgrade took longer than the allowed upgrade timeout to process. The value is 4. + OVERALL_UPGRADE_TIMEOUT = "OverallUpgradeTimeout" + +class HeaderMatchType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """how to match header value + """ + + EXACT = "exact" + +class HealthEvaluationKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The health manager in the cluster performs health evaluations in determining the aggregated + health state of an entity. This enumeration provides information on the kind of evaluation that + was performed. Following are the possible values. + """ + + #: Indicates that the health evaluation is invalid. The value is zero. + INVALID = "Invalid" + #: Indicates that the health evaluation is for a health event. The value is 1. + EVENT = "Event" + #: Indicates that the health evaluation is for the replicas of a partition. The value is 2. + REPLICAS = "Replicas" + #: Indicates that the health evaluation is for the partitions of a service. The value is 3. + PARTITIONS = "Partitions" + #: Indicates that the health evaluation is for the deployed service packages of a deployed + #: application. The value is 4. + DEPLOYED_SERVICE_PACKAGES = "DeployedServicePackages" + #: Indicates that the health evaluation is for the deployed applications of an application. The + #: value is 5. + DEPLOYED_APPLICATIONS = "DeployedApplications" + #: Indicates that the health evaluation is for services of an application. The value is 6. + SERVICES = "Services" + #: Indicates that the health evaluation is for the cluster nodes. The value is 7. + NODES = "Nodes" + #: Indicates that the health evaluation is for the cluster applications. The value is 8. + APPLICATIONS = "Applications" + #: Indicates that the health evaluation is for the system application. The value is 9. + SYSTEM_APPLICATION = "SystemApplication" + #: Indicates that the health evaluation is for the deployed applications of an application in an + #: upgrade domain. The value is 10. + UPGRADE_DOMAIN_DEPLOYED_APPLICATIONS = "UpgradeDomainDeployedApplications" + #: Indicates that the health evaluation is for the cluster nodes in an upgrade domain. The value + #: is 11. + UPGRADE_DOMAIN_NODES = "UpgradeDomainNodes" + #: Indicates that the health evaluation is for a replica. The value is 13. + REPLICA = "Replica" + #: Indicates that the health evaluation is for a partition. The value is 14. + PARTITION = "Partition" + #: Indicates that the health evaluation is for a deployed service package. The value is 16. + DEPLOYED_SERVICE_PACKAGE = "DeployedServicePackage" + #: Indicates that the health evaluation is for a deployed application. The value is 17. + DEPLOYED_APPLICATION = "DeployedApplication" + #: Indicates that the health evaluation is for a service. The value is 15. + SERVICE = "Service" + #: Indicates that the health evaluation is for a node. The value is 12. + NODE = "Node" + #: Indicates that the health evaluation is for an application. The value is 18. + APPLICATION = "Application" + #: Indicates that the health evaluation is for the delta of unhealthy cluster nodes. The value is + #: 19. + DELTA_NODES_CHECK = "DeltaNodesCheck" + #: Indicates that the health evaluation is for the delta of unhealthy upgrade domain cluster + #: nodes. The value is 20. + UPGRADE_DOMAIN_DELTA_NODES_CHECK = "UpgradeDomainDeltaNodesCheck" + #: – Indicates that the health evaluation is for applications of an application type. The value is + #: 21. + APPLICATION_TYPE_APPLICATIONS = "ApplicationTypeApplications" + #: – Indicates that the health evaluation is for nodes of a node type. The value is 22. + NODE_TYPE_NODES = "NodeTypeNodes" + +class HealthState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The health state of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. + """ + + #: Indicates an invalid health state. All Service Fabric enumerations have the invalid type. The + #: value is zero. + INVALID = "Invalid" + #: Indicates the health state is okay. The value is 1. + OK = "Ok" + #: Indicates the health state is at a warning level. The value is 2. + WARNING = "Warning" + #: Indicates the health state is at an error level. Error health state should be investigated, as + #: they can impact the correct functionality of the cluster. The value is 3. + ERROR = "Error" + #: Indicates an unknown health status. The value is 65535. + UNKNOWN = "Unknown" + +class HostIsolationMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the isolation mode of main entry point of a code package when it's host type is + ContainerHost. This is specified as part of container host policies in application manifest + while importing service manifest. + """ + + #: Indicates the isolation mode is not applicable for given HostType. The value is 0. + NONE = "None" + #: This is the default isolation mode for a ContainerHost. The value is 1. + PROCESS = "Process" + #: Indicates the ContainerHost is a Hyper-V container. This applies to only Windows containers. + #: The value is 2. + HYPER_V = "HyperV" + +class HostOptions(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """choices for server host + """ + + #: host: http://localhost:19080/. + HTTP_LOCALHOST19080_ = "http://localhost:19080/" + #: host: https://localhost:19080/. + HTTPS_LOCALHOST19080_ = "https://localhost:19080/" + +class HostType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the type of host for main entry point of a code package as specified in service + manifest. + """ + + #: Indicates the type of host is not known or invalid. The value is 0. + INVALID = "Invalid" + #: Indicates the host is an executable. The value is 1. + EXE_HOST = "ExeHost" + #: Indicates the host is a container. The value is 2. + CONTAINER_HOST = "ContainerHost" + +class ImageRegistryPasswordType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of the image registry password being given in password + """ + + #: The image registry password in clear text, will not be processed in any way and used directly. + CLEAR_TEXT = "ClearText" + #: The URI to a KeyVault secret version, will be resolved using the application's managed identity + #: (this type is only valid if the app was assigned a managed identity) before getting used. + KEY_VAULT_REFERENCE = "KeyVaultReference" + #: The reference to a SecretValue resource, will be resolved before getting used. + SECRET_VALUE_REFERENCE = "SecretValueReference" + +class ImpactLevel(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The level of impact expected. + """ + + INVALID = "Invalid" + NONE = "None" + RESTART = "Restart" + REMOVE_DATA = "RemoveData" + REMOVE_NODE = "RemoveNode" + +class ManagedIdentityType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of managed identity to be used to connect to Azure Blob Store via Managed Identity. + """ + + #: Indicates an invalid managed identity type. All Service Fabric enumerations have the invalid + #: type. + INVALID = "Invalid" + #: Indicates VMSS managed identity should be used to connect to Azure blob store. + VMSS = "VMSS" + #: Indicates cluster managed identity should be used to connect to Azure blob store. + CLUSTER = "Cluster" + +class MoveCost(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the move cost for the service. + """ + + #: Zero move cost. This value is zero. + ZERO = "Zero" + #: Specifies the move cost of the service as Low. The value is 1. + LOW = "Low" + #: Specifies the move cost of the service as Medium. The value is 2. + MEDIUM = "Medium" + #: Specifies the move cost of the service as High. The value is 3. + HIGH = "High" + #: Specifies the move cost of the service as VeryHigh. The value is 4. + VERY_HIGH = "VeryHigh" + +class NetworkKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of a Service Fabric container network. + """ + + #: Indicates a container network local to a single Service Fabric cluster. The value is 1. + LOCAL = "Local" + +class NodeDeactivationIntent(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The intent or the reason for deactivating the node. Following are the possible values for it. + """ + + #: Indicates the node deactivation intent is invalid. All Service Fabric enumerations have the + #: invalid type. The value is zero. This value is not used. + INVALID = "Invalid" + #: Indicates that the node should be paused. The value is 1. + PAUSE = "Pause" + #: Indicates that the intent is for the node to be restarted after a short period of time. Service + #: Fabric does not restart the node, this action is done outside of Service Fabric. The value is + #: 2. + RESTART = "Restart" + #: Indicates that the intent is to reimage the node. Service Fabric does not reimage the node, + #: this action is done outside of Service Fabric. The value is 3. + REMOVE_DATA = "RemoveData" + #: Indicates that the node is being decommissioned and is not expected to return. Service Fabric + #: does not decommission the node, this action is done outside of Service Fabric. The value is 4. + REMOVE_NODE = "RemoveNode" + +class NodeDeactivationStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The status of node deactivation operation. Following are the possible values. + """ + + #: No status is associated with the task. The value is zero. + NONE = "None" + #: When a node is deactivated Service Fabric performs checks to ensure that the operation is safe + #: to proceed to ensure availability of the service and reliability of the state. This value + #: indicates that one or more safety checks are in progress. The value is 1. + SAFETY_CHECK_IN_PROGRESS = "SafetyCheckInProgress" + #: When a node is deactivated Service Fabric performs checks to ensure that the operation is safe + #: to proceed to ensure availability of the service and reliability of the state. This value + #: indicates that all safety checks have been completed. The value is 2. + SAFETY_CHECK_COMPLETE = "SafetyCheckComplete" + #: The task is completed. The value is 3. + COMPLETED = "Completed" + +class NodeDeactivationTaskType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of the task that performed the node deactivation. Following are the possible values. + """ + + #: Indicates the node deactivation task type is invalid. All Service Fabric enumerations have the + #: invalid type. The value is zero. This value is not used. + INVALID = "Invalid" + #: Specifies the task created by Infrastructure hosting the nodes. The value is 1. + INFRASTRUCTURE = "Infrastructure" + #: Specifies the task that was created by the Repair Manager service. The value is 2. + REPAIR = "Repair" + #: Specifies that the task was created by using the public API. The value is 3. + CLIENT = "Client" + +class NodeStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The status of the node. + """ + + #: Indicates the node status is invalid. All Service Fabric enumerations have the invalid type. + #: The value is zero. + INVALID = "Invalid" + #: Indicates the node is up. The value is 1. + UP = "Up" + #: Indicates the node is down. The value is 2. + DOWN = "Down" + #: Indicates the node is in process of being enabled. The value is 3. + ENABLING = "Enabling" + #: Indicates the node is in the process of being disabled. The value is 4. + DISABLING = "Disabling" + #: Indicates the node is disabled. The value is 5. + DISABLED = "Disabled" + #: Indicates the node is unknown. A node would be in Unknown state if Service Fabric does not have + #: authoritative information about that node. This can happen if the system learns about a node at + #: runtime.The value is 6. + UNKNOWN = "Unknown" + #: Indicates the node is removed. A node would be in Removed state if NodeStateRemoved API has + #: been called for this node. In other words, Service Fabric has been informed that the persisted + #: state on the node has been permanently lost. The value is 7. + REMOVED = "Removed" + +class NodeStatusFilter(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + #: This filter value will match all of the nodes excepts the ones with status as Unknown or + #: Removed. + DEFAULT = "default" + #: This filter value will match all of the nodes. + ALL = "all" + #: This filter value will match nodes that are Up. + UP = "up" + #: This filter value will match nodes that are Down. + DOWN = "down" + #: This filter value will match nodes that are in the process of being enabled with status as + #: Enabling. + ENABLING = "enabling" + #: This filter value will match nodes that are in the process of being disabled with status as + #: Disabling. + DISABLING = "disabling" + #: This filter value will match nodes that are Disabled. + DISABLED = "disabled" + #: This filter value will match nodes whose status is Unknown. A node would be in Unknown state if + #: Service Fabric does not have authoritative information about that node. This can happen if the + #: system learns about a node at runtime. + UNKNOWN = "unknown" + #: This filter value will match nodes whose status is Removed. These are the nodes that are + #: removed from the cluster using the RemoveNodeState API. + REMOVED = "removed" + +class NodeTransitionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + #: Reserved. Do not pass into API. + INVALID = "Invalid" + #: Transition a stopped node to up. + START = "Start" + #: Transition an up node to stopped. + STOP = "Stop" + +class NodeUpgradePhase(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The state of the upgrading node. + """ + + #: Indicates the upgrade state is invalid. All Service Fabric enumerations have the invalid type. + #: The value is zero. + INVALID = "Invalid" + #: The upgrade has not started yet due to pending safety checks. The value is 1. + PRE_UPGRADE_SAFETY_CHECK = "PreUpgradeSafetyCheck" + #: The upgrade is in progress. The value is 2. + UPGRADING = "Upgrading" + #: The upgrade has completed and post upgrade safety checks are being performed. The value is 3. + POST_UPGRADE_SAFETY_CHECK = "PostUpgradeSafetyCheck" + +class OperatingSystemType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The operation system required by the code in service. + """ + + #: The required operating system is Linux. + LINUX = "Linux" + #: The required operating system is Windows. + WINDOWS = "Windows" + +class OperationState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The state of the operation. + """ + + #: The operation state is invalid. + INVALID = "Invalid" + #: The operation is in progress. + RUNNING = "Running" + #: The operation is rolling back internal system state because it encountered a fatal error or was + #: cancelled by the user. "RollingBack" does not refer to user state. For example, if + #: CancelOperation is called on a command of type PartitionDataLoss, state of "RollingBack" does + #: not mean service data is being restored (assuming the command has progressed far enough to + #: cause data loss). It means the system is rolling back/cleaning up internal system state + #: associated with the command. + ROLLING_BACK = "RollingBack" + #: The operation has completed successfully and is no longer running. + COMPLETED = "Completed" + #: The operation has failed and is no longer running. + FAULTED = "Faulted" + #: The operation was cancelled by the user using CancelOperation, and is no longer running. + CANCELLED = "Cancelled" + #: The operation was cancelled by the user using CancelOperation, with the force parameter set to + #: true. It is no longer running. Refer to CancelOperation for more details. + FORCE_CANCELLED = "ForceCancelled" + +class OperationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of the operation. + """ + + #: The operation state is invalid. + INVALID = "Invalid" + #: An operation started using the StartDataLoss API. + PARTITION_DATA_LOSS = "PartitionDataLoss" + #: An operation started using the StartQuorumLoss API. + PARTITION_QUORUM_LOSS = "PartitionQuorumLoss" + #: An operation started using the StartPartitionRestart API. + PARTITION_RESTART = "PartitionRestart" + #: An operation started using the StartNodeTransition API. + NODE_TRANSITION = "NodeTransition" + +class Ordering(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Defines the order. + """ + + #: Descending sort order. + DESC = "Desc" + #: Ascending sort order. + ASC = "Asc" + +class PackageSharingPolicyScope(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Represents the scope for PackageSharingPolicy. This is specified during + DeployServicePackageToNode operation. + """ + + #: No package sharing policy scope. The value is 0. + NONE = "None" + #: Share all code, config and data packages from corresponding service manifest. The value is 1. + ALL = "All" + #: Share all code packages from corresponding service manifest. The value is 2. + CODE = "Code" + #: Share all config packages from corresponding service manifest. The value is 3. + CONFIG = "Config" + #: Share all data packages from corresponding service manifest. The value is 4. + DATA = "Data" + +class PartitionAccessStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the access status of the partition. + """ + + #: Indicates that the read or write operation access status is not valid. This value is not + #: returned to the caller. + INVALID = "Invalid" + #: Indicates that the read or write operation access is granted and the operation is allowed. + GRANTED = "Granted" + #: Indicates that the client should try again later, because a reconfiguration is in progress. + RECONFIGURATION_PENDING = "ReconfigurationPending" + #: Indicates that this client request was received by a replica that is not a Primary replica. + NOT_PRIMARY = "NotPrimary" + #: Indicates that no write quorum is available and, therefore, no write operation can be accepted. + NO_WRITE_QUORUM = "NoWriteQuorum" + +class PartitionScheme(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Enumerates the ways that a service can be partitioned. + """ + + #: Indicates the partition kind is invalid. All Service Fabric enumerations have the invalid type. + #: The value is zero. + INVALID = "Invalid" + #: Indicates that the partition is based on string names, and is a + #: SingletonPartitionSchemeDescription object, The value is 1. + SINGLETON = "Singleton" + #: Indicates that the partition is based on Int64 key ranges, and is a + #: UniformInt64RangePartitionSchemeDescription object. The value is 2. + UNIFORM_INT64_RANGE = "UniformInt64Range" + #: Indicates that the partition is based on string names, and is a NamedPartitionSchemeDescription + #: object. The value is 3. + NAMED = "Named" + +class PathMatchType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """how to match value in the Uri + """ + + PREFIX = "prefix" + +class PropertyBatchInfoKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The kind of property batch info, determined by the results of a property batch. The following + are the possible values. + """ + + #: Indicates the property batch info is invalid. All Service Fabric enumerations have the invalid + #: type. + INVALID = "Invalid" + #: The property batch succeeded. + SUCCESSFUL = "Successful" + #: The property batch failed. + FAILED = "Failed" + +class PropertyBatchOperationKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The kind of property batch operation, determined by the operation to be performed. The + following are the possible values. + """ + + #: Indicates the property operation is invalid. All Service Fabric enumerations have the invalid + #: type. The value is zero. + INVALID = "Invalid" + #: The operation will create or edit a property. The value is 1. + PUT = "Put" + #: The operation will get a property. The value is 2. + GET = "Get" + #: The operation will check that a property exists or doesn't exists, depending on the provided + #: value. The value is 3. + CHECK_EXISTS = "CheckExists" + #: The operation will ensure that the sequence number is equal to the provided value. The value is + #: 4. + CHECK_SEQUENCE = "CheckSequence" + #: The operation will delete a property. The value is 5. + DELETE = "Delete" + #: The operation will ensure that the value of a property is equal to the provided value. The + #: value is 7. + CHECK_VALUE = "CheckValue" + +class PropertyValueKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The kind of property, determined by the type of data. Following are the possible values. + """ + + #: Indicates the property is invalid. All Service Fabric enumerations have the invalid type. The + #: value is zero. + INVALID = "Invalid" + #: The data inside the property is a binary blob. The value is 1. + BINARY = "Binary" + #: The data inside the property is an int64. The value is 2. + INT64 = "Int64" + #: The data inside the property is a double. The value is 3. + DOUBLE = "Double" + #: The data inside the property is a string. The value is 4. + STRING = "String" + #: The data inside the property is a guid. The value is 5. + GUID = "Guid" + +class ProvisionApplicationTypeKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The kind of application type registration or provision requested. The application package can + be registered or provisioned either from the image store or from an external store. Following + are the kinds of the application type provision. + """ + + #: Indicates that the provision kind is invalid. This value is default and should not be used. The + #: value is zero. + INVALID = "Invalid" + #: Indicates that the provision is for a package that was previously uploaded to the image store. + #: The value is 1. + IMAGE_STORE_PATH = "ImageStorePath" + #: Indicates that the provision is for an application package that was previously uploaded to an + #: external store. The application package ends with the extension *.sfpkg. The value is 2. + EXTERNAL_STORE = "ExternalStore" + +class QuorumLossMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + #: Reserved. Do not pass into API. + INVALID = "Invalid" + #: Partial Quorum loss mode : Minimum number of replicas for a partition will be down that will + #: cause a quorum loss. + QUORUM_REPLICAS = "QuorumReplicas" + ALL_REPLICAS = "AllReplicas" + +class ReconfigurationPhase(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The reconfiguration phase of a replica of a stateful service. + """ + + #: Indicates the invalid reconfiguration phase. + UNKNOWN = "Unknown" + #: Specifies that there is no reconfiguration in progress. + NONE = "None" + #: Refers to the phase where the reconfiguration is transferring data from the previous primary to + #: the new primary. + PHASE0 = "Phase0" + #: Refers to the phase where the reconfiguration is querying the replica set for the progress. + PHASE1 = "Phase1" + #: Refers to the phase where the reconfiguration is ensuring that data from the current primary is + #: present in a majority of the replica set. + PHASE2 = "Phase2" + #: This phase is for internal use only. + PHASE3 = "Phase3" + #: This phase is for internal use only. + PHASE4 = "Phase4" + #: This phase is for internal use only. + ABORT_PHASE_ZERO = "AbortPhaseZero" + +class ReconfigurationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of reconfiguration for replica of a stateful service. + """ + + #: Indicates the invalid reconfiguration type. + UNKNOWN = "Unknown" + #: Specifies that the primary replica is being swapped with a different replica. + SWAP_PRIMARY = "SwapPrimary" + #: Reconfiguration triggered in response to a primary going down. This could be due to many + #: reasons such as primary replica crashing etc. + FAILOVER = "Failover" + #: Reconfigurations where the primary replica is not changing. + OTHER = "Other" + +class RepairImpactKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the kind of the impact. This type supports the Service Fabric platform; it is not + meant to be used directly from your code.' + """ + + #: The repair impact is not valid or is of an unknown type. + INVALID = "Invalid" + #: The repair impact affects a set of Service Fabric nodes. + NODE = "Node" + +class RepairTargetKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the kind of the repair target. This type supports the Service Fabric platform; it is + not meant to be used directly from your code.' + """ + + #: The repair target is not valid or is of an unknown type. + INVALID = "Invalid" + #: The repair target is a set of Service Fabric nodes. + NODE = "Node" + +class RepairTaskHealthCheckState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the workflow state of a repair task's health check. This type supports the Service + Fabric platform; it is not meant to be used directly from your code. + """ + + #: Indicates that the health check has not started. + NOT_STARTED = "NotStarted" + #: Indicates that the health check is in progress. + IN_PROGRESS = "InProgress" + #: Indicates that the health check succeeded. + SUCCEEDED = "Succeeded" + #: Indicates that the health check was skipped. + SKIPPED = "Skipped" + #: Indicates that the health check timed out. + TIMED_OUT = "TimedOut" + +class ReplicaHealthReportServiceKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + #: Does not use Service Fabric to make its state highly available or reliable. The value is 1. + STATELESS = "Stateless" + #: Uses Service Fabric to make its state or part of its state highly available and reliable. The + #: value is 2. + STATEFUL = "Stateful" + +class ReplicaKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The role of a replica of a stateful service. + """ + + #: Represents an invalid replica kind. The value is zero. + INVALID = "Invalid" + #: Represents a key value store replica. The value is 1. + KEY_VALUE_STORE = "KeyValueStore" + +class ReplicaRole(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The role of a replica of a stateful service. + """ + + #: Indicates the initial role that a replica is created in. The value is zero. + UNKNOWN = "Unknown" + #: Specifies that the replica has no responsibility in regard to the replica set. The value is 1. + NONE = "None" + #: Refers to the replica in the set on which all read and write operations are complete in order + #: to enforce strong consistency semantics. Read operations are handled directly by the Primary + #: replica, while write operations must be acknowledged by a quorum of the replicas in the replica + #: set. There can only be one Primary replica in a replica set at a time. The value is 2. + PRIMARY = "Primary" + #: Refers to a replica in the set that receives a state transfer from the Primary replica to + #: prepare for becoming an active Secondary replica. There can be multiple Idle Secondary replicas + #: in a replica set at a time. Idle Secondary replicas do not count as a part of a write quorum. + #: The value is 3. + IDLE_SECONDARY = "IdleSecondary" + #: Refers to a replica in the set that receives state updates from the Primary replica, applies + #: them, and sends acknowledgements back. Secondary replicas must participate in the write quorum + #: for a replica set. There can be multiple active Secondary replicas in a replica set at a time. + #: The number of active Secondary replicas is configurable that the reliability subsystem should + #: maintain. The value is 4. + ACTIVE_SECONDARY = "ActiveSecondary" + #: Refers to a replica in the set that receives a state transfer from the Primary replica to + #: prepare for becoming an ActiveAuxiliary replica. There can be multiple IdleAuxiliary replicas + #: in a replica set at a time. IdleAuxiliary replicas do not count as a part of a write quorum. + #: The value is 5. + IDLE_AUXILIARY = "IdleAuxiliary" + #: Refers to a replica in the set that receives state updates from the Primary replica, applies + #: them, and sends acknowledgements back. ActiveAuxiliary replicas must participate in the write + #: quorum for a replica set. There can be multiple active ActiveAuxiliary replicas in a replica + #: set at a time. The number of active ActiveAuxiliary replicas is configurable that the + #: reliability subsystem should maintain. The value is 6. + ACTIVE_AUXILIARY = "ActiveAuxiliary" + #: Refers to the replica in the set that is used to rebuild a new Secondary replica to relinquish + #: primary status to. It cannot field read or write requests. The value is 7. + PRIMARY_AUXILIARY = "PrimaryAuxiliary" + +class ReplicaStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The status of a replica of a service. + """ + + #: Indicates the replica status is invalid. All Service Fabric enumerations have the invalid type. + #: The value is zero. + INVALID = "Invalid" + #: The replica is being built. This means that a primary replica is seeding this replica. The + #: value is 1. + IN_BUILD = "InBuild" + #: The replica is in standby. The value is 2. + STANDBY = "Standby" + #: The replica is ready. The value is 3. + READY = "Ready" + #: The replica is down. The value is 4. + DOWN = "Down" + #: Replica is dropped. This means that the replica has been removed from the replica set. If it is + #: persisted, its state has been deleted. The value is 5. + DROPPED = "Dropped" + +class ReplicatorOperationName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the operation currently being executed by the Replicator. + """ + + #: Default value if the replicator is not yet ready. + INVALID = "Invalid" + #: Replicator is not running any operation from Service Fabric perspective. + NONE = "None" + #: Replicator is opening. + OPEN = "Open" + #: Replicator is in the process of changing its role. + CHANGE_ROLE = "ChangeRole" + #: Due to a change in the replica set, replicator is being updated with its Epoch. + UPDATE_EPOCH = "UpdateEpoch" + #: Replicator is closing. + CLOSE = "Close" + #: Replicator is being aborted. + ABORT = "Abort" + #: Replicator is handling the data loss condition, where the user service may potentially be + #: recovering state from an external source. + ON_DATA_LOSS = "OnDataLoss" + #: Replicator is waiting for a quorum of replicas to be caught up to the latest state. + WAIT_FOR_CATCHUP = "WaitForCatchup" + #: Replicator is in the process of building one or more replicas. + BUILD = "Build" + +class ResourceStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Status of the resource. + """ + + #: Indicates the resource status is unknown. The value is zero. + UNKNOWN = "Unknown" + #: Indicates the resource is ready. The value is 1. + READY = "Ready" + #: Indicates the resource is upgrading. The value is 2. + UPGRADING = "Upgrading" + #: Indicates the resource is being created. The value is 3. + CREATING = "Creating" + #: Indicates the resource is being deleted. The value is 4. + DELETING = "Deleting" + #: Indicates the resource is not functional due to persistent failures. See statusDetails property + #: for more details. The value is 5. + FAILED = "Failed" + +class RestartPartitionMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + #: Reserved. Do not pass into API. + INVALID = "Invalid" + #: All replicas or instances in the partition are restarted at once. + ALL_REPLICAS_OR_INSTANCES = "AllReplicasOrInstances" + #: Only the secondary replicas are restarted. + ONLY_ACTIVE_SECONDARIES = "OnlyActiveSecondaries" + +class RestartPolicy(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Enumerates the restart policy for RunToCompletionExecutionPolicy + """ + + #: Service will be restarted when it encounters a failure. + ON_FAILURE = "OnFailure" + #: Service will never be restarted. If the service encounters a failure, it will move to Failed + #: state. + NEVER = "Never" + +class RestoreState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Represents the current state of the partition restore operation. + """ + + #: Indicates an invalid restore state. All Service Fabric enumerations have the invalid type. + INVALID = "Invalid" + #: Operation has been validated and accepted. Restore is yet to be triggered. + ACCEPTED = "Accepted" + #: Restore operation has been triggered and is under process. + RESTORE_IN_PROGRESS = "RestoreInProgress" + #: Operation completed with success. + SUCCESS = "Success" + #: Operation completed with failure. + FAILURE = "Failure" + #: Operation timed out. + TIMEOUT = "Timeout" + +class ResultStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """A value describing the overall result of the repair task execution. Must be specified in the + Restoring and later states, and is immutable once set. + """ + + #: Indicates that the repair task result is invalid. All Service Fabric enumerations have the + #: invalid value. + INVALID = "Invalid" + #: Indicates that the repair task completed execution successfully. + SUCCEEDED = "Succeeded" + #: Indicates that the repair task was cancelled prior to execution. + CANCELLED = "Cancelled" + #: Indicates that execution of the repair task was interrupted by a cancellation request after + #: some work had already been performed. + INTERRUPTED = "Interrupted" + #: Indicates that there was a failure during execution of the repair task. Some work may have been + #: performed. + FAILED = "Failed" + #: Indicates that the repair task result is not yet available, because the repair task has not + #: finished executing. + PENDING = "Pending" + +class RetentionPolicyType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of retention policy. Currently only "Basic" retention policy is supported. + """ + + #: Indicates a basic retention policy type. + BASIC = "Basic" + #: Indicates an invalid retention policy type. + INVALID = "Invalid" + +class RollingUpgradeMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, + UnmonitoredManual, and Monitored. + """ + + #: Indicates the upgrade mode is invalid. All Service Fabric enumerations have the invalid type. + #: The value is zero. + INVALID = "Invalid" + #: The upgrade will proceed automatically without performing any health monitoring. The value is + #: 1. + UNMONITORED_AUTO = "UnmonitoredAuto" + #: The upgrade will stop after completing each upgrade domain, giving the opportunity to manually + #: monitor health before proceeding. The value is 2. + UNMONITORED_MANUAL = "UnmonitoredManual" + #: The upgrade will stop after completing each upgrade domain and automatically monitor health + #: before proceeding. The value is 3. + MONITORED = "Monitored" + +class SafetyCheckKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The kind of safety check performed by service fabric before continuing with the operations. + These checks ensure the availability of the service and the reliability of the state. Following + are the kinds of safety checks. + """ + + #: Indicates that the upgrade safety check kind is invalid. All Service Fabric enumerations have + #: the invalid type. The value is zero. + INVALID = "Invalid" + #: Indicates that if we bring down the node then this will result in global seed node quorum loss. + #: The value is 1. + ENSURE_SEED_NODE_QUORUM = "EnsureSeedNodeQuorum" + #: Indicates that there is some partition for which if we bring down the replica on the node, it + #: will result in quorum loss for that partition. The value is 2. + ENSURE_PARTITION_QUORUM = "EnsurePartitionQuorum" + #: Indicates that there is some replica on the node that was moved out of this node due to + #: upgrade. Service Fabric is now waiting for the primary to be moved back to this node. The value + #: is 3. + WAIT_FOR_PRIMARY_PLACEMENT = "WaitForPrimaryPlacement" + #: Indicates that Service Fabric is waiting for a primary replica to be moved out of the node + #: before starting upgrade on that node. The value is 4. + WAIT_FOR_PRIMARY_SWAP = "WaitForPrimarySwap" + #: Indicates that there is some replica on the node that is involved in a reconfiguration. Service + #: Fabric is waiting for the reconfiguration to be complete before staring upgrade on that node. + #: The value is 5. + WAIT_FOR_RECONFIGURATION = "WaitForReconfiguration" + #: Indicates that there is either a replica on the node that is going through copy, or there is a + #: primary replica on the node that is copying data to some other replica. In both cases, bringing + #: down the replica on the node due to upgrade will abort the copy. The value is 6. + WAIT_FOR_INBUILD_REPLICA = "WaitForInbuildReplica" + #: Indicates that there is either a stateless service partition on the node having exactly one + #: instance, or there is a primary replica on the node for which the partition is quorum loss. In + #: both cases, bringing down the replicas due to upgrade will result in loss of availability. The + #: value is 7. + ENSURE_AVAILABILITY = "EnsureAvailability" + +class ScalingMechanismKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Enumerates the ways that a service can be scaled. + """ + + #: Indicates the scaling mechanism is invalid. All Service Fabric enumerations have the invalid + #: type. The value is zero. + INVALID = "Invalid" + #: Indicates a mechanism for scaling where new instances are added or removed from a partition. + #: The value is 1. + PARTITION_INSTANCE_COUNT = "PartitionInstanceCount" + #: Indicates a mechanism for scaling where new named partitions are added or removed from a + #: service. The value is 2. + ADD_REMOVE_INCREMENTAL_NAMED_PARTITION = "AddRemoveIncrementalNamedPartition" + +class ScalingTriggerKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Enumerates the ways that a service can be scaled. + """ + + #: Indicates the scaling trigger is invalid. All Service Fabric enumerations have the invalid + #: type. The value is zero. + INVALID = "Invalid" + #: Indicates a trigger where scaling decisions are made based on average load of a partition. The + #: value is 1. + AVERAGE_PARTITION_LOAD = "AveragePartitionLoad" + #: Indicates a trigger where scaling decisions are made based on average load of a service. The + #: value is 2. + AVERAGE_SERVICE_LOAD = "AverageServiceLoad" + +class Scheme(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Scheme for the http probe. Can be Http or Https. + """ + + #: Indicates that the probe is http. + HTTP = "http" + #: Indicates that the probe is https. No cert validation. + HTTPS = "https" + +class SecretKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Describes the kind of secret. + """ + + #: A simple secret resource whose plaintext value is provided by the user. + INLINED_VALUE = "inlinedValue" + #: A secret resource that references a specific version of a secret stored in Azure Key Vault; the + #: expected value is a versioned KeyVault URI corresponding to the version of the secret being + #: referenced. + KEY_VAULT_VERSIONED_REFERENCE = "keyVaultVersionedReference" + +class ServiceCorrelationScheme(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The service correlation scheme. + """ + + #: An invalid correlation scheme. Cannot be used. The value is zero. + INVALID = "Invalid" + #: Indicates that this service has an affinity relationship with another service. Provided for + #: backwards compatibility, consider preferring the Aligned or NonAlignedAffinity options. The + #: value is 1. + AFFINITY = "Affinity" + #: Aligned affinity ensures that the primaries of the partitions of the affinitized services are + #: collocated on the same nodes. This is the default and is the same as selecting the Affinity + #: scheme. The value is 2. + ALIGNED_AFFINITY = "AlignedAffinity" + #: Non-Aligned affinity guarantees that all replicas of each service will be placed on the same + #: nodes. Unlike Aligned Affinity, this does not guarantee that replicas of particular role will + #: be collocated. The value is 3. + NON_ALIGNED_AFFINITY = "NonAlignedAffinity" + +class ServiceEndpointRole(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The role of the replica where the endpoint is reported. + """ + + #: Indicates the service endpoint role is invalid. All Service Fabric enumerations have the + #: invalid type. The value is zero. + INVALID = "Invalid" + #: Indicates that the service endpoint is of a stateless service. The value is 1. + STATELESS = "Stateless" + #: Indicates that the service endpoint is of a primary replica of a stateful service. The value is + #: 2. + STATEFUL_PRIMARY = "StatefulPrimary" + #: Indicates that the service endpoint is of a secondary replica of a stateful service. The value + #: is 3. + STATEFUL_SECONDARY = "StatefulSecondary" + +class ServiceHostUpgradeImpact(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The expected impact of the upgrade. + """ + + #: Indicates the upgrade impact is invalid. All Service Fabric enumerations have the invalid type. + #: The value is zero. + INVALID = "Invalid" + #: The upgrade is not expected to cause service host restarts. The value is 1. + NONE = "None" + #: The upgrade is expected to cause a service host restart. The value is 2. + SERVICE_HOST_RESTART = "ServiceHostRestart" + #: The upgrade will cause an unexpected service host restart. This indicates a bug in the Service + #: Fabric runtime and proceeding with an upgrade with this impact may lead to skipped safety + #: checks. Running the upgrade with the ForceRestart flag will force proper safety checks. The + #: value is 3. + UNEXPECTED_SERVICE_HOST_RESTART = "UnexpectedServiceHostRestart" + +class ServiceKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The kind of service (Stateless or Stateful). + """ + + #: Indicates the service kind is invalid. All Service Fabric enumerations have the invalid type. + #: The value is zero. + INVALID = "Invalid" + #: Does not use Service Fabric to make its state highly available or reliable. The value is 1. + STATELESS = "Stateless" + #: Uses Service Fabric to make its state or part of its state highly available and reliable. The + #: value is 2. + STATEFUL = "Stateful" + +class ServiceLoadMetricWeight(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Determines the metric weight relative to the other metrics that are configured for this + service. During runtime, if two metrics end up in conflict, the Cluster Resource Manager + prefers the metric with the higher weight. + """ + + #: Disables resource balancing for this metric. This value is zero. + ZERO = "Zero" + #: Specifies the metric weight of the service load as Low. The value is 1. + LOW = "Low" + #: Specifies the metric weight of the service load as Medium. The value is 2. + MEDIUM = "Medium" + #: Specifies the metric weight of the service load as High. The value is 3. + HIGH = "High" + +class ServiceOperationName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the current active life-cycle operation on a stateful service replica or stateless + service instance. + """ + + #: Reserved for future use. + UNKNOWN = "Unknown" + #: The service replica or instance is not going through any life-cycle changes. + NONE = "None" + #: The service replica or instance is being opened. + OPEN = "Open" + #: The service replica is changing roles. + CHANGE_ROLE = "ChangeRole" + #: The service replica or instance is being closed. + CLOSE = "Close" + #: The service replica or instance is being aborted. + ABORT = "Abort" + +class ServicePackageActivationMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The activation mode of service package to be used for a Service Fabric service. This is + specified at the time of creating the Service. + """ + + #: This is the default activation mode. With this activation mode, replicas or instances from + #: different partition(s) of service, on a given node, will share same activation of service + #: package on a node. The value is zero. + SHARED_PROCESS = "SharedProcess" + #: With this activation mode, each replica or instance of service, on a given node, will have its + #: own dedicated activation of service package on a node. The value is 1. + EXCLUSIVE_PROCESS = "ExclusiveProcess" + +class ServicePartitionKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The kind of partitioning scheme used to partition the service. + """ + + #: Indicates the partition kind is invalid. All Service Fabric enumerations have the invalid type. + #: The value is zero. + INVALID = "Invalid" + #: Indicates that there is only one partition, and SingletonPartitionSchemeDescription was + #: specified while creating the service. The value is 1. + SINGLETON = "Singleton" + #: Indicates that the partition is based on Int64 key ranges, and + #: UniformInt64RangePartitionSchemeDescription was specified while creating the service. The value + #: is 2. + INT64_RANGE = "Int64Range" + #: Indicates that the partition is based on string names, and NamedPartitionInformation was + #: specified while creating the service. The value is 3. + NAMED = "Named" + +class ServicePartitionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The status of the service fabric service partition. + """ + + #: Indicates the partition status is invalid. All Service Fabric enumerations have the invalid + #: type. The value is zero. + INVALID = "Invalid" + #: Indicates that the partition is ready. This means that for a stateless service partition there + #: is at least one instance that is up and for a stateful service partition the number of ready + #: replicas is greater than or equal to the MinReplicaSetSize. The value is 1. + READY = "Ready" + #: Indicates that the partition is not ready. This status is returned when none of the other + #: states apply. The value is 2. + NOT_READY = "NotReady" + #: Indicates that the partition is in quorum loss. This means that number of replicas that are up + #: and participating in a replica set is less than MinReplicaSetSize for this partition. The value + #: is 3. + IN_QUORUM_LOSS = "InQuorumLoss" + #: Indicates that the partition is undergoing reconfiguration of its replica sets. This can happen + #: due to failover, upgrade, load balancing or addition or removal of replicas from the replica + #: set. The value is 4. + RECONFIGURING = "Reconfiguring" + #: Indicates that the partition is being deleted. The value is 5. + DELETING = "Deleting" + +class ServicePlacementPolicyType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of placement policy for a service fabric service. Following are the possible values. + """ + + #: Indicates the type of the placement policy is invalid. All Service Fabric enumerations have the + #: invalid type. The value is zero. + INVALID = "Invalid" + #: Indicates that the ServicePlacementPolicyDescription is of type + #: ServicePlacementInvalidDomainPolicyDescription, which indicates that a particular fault or + #: upgrade domain cannot be used for placement of this service. The value is 1. + INVALID_DOMAIN = "InvalidDomain" + #: Indicates that the ServicePlacementPolicyDescription is of type + #: ServicePlacementRequireDomainDistributionPolicyDescription indicating that the replicas of the + #: service must be placed in a specific domain. The value is 2. + REQUIRE_DOMAIN = "RequireDomain" + #: Indicates that the ServicePlacementPolicyDescription is of type + #: ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the + #: Primary replica for the partitions of the service should be located in a particular domain as + #: an optimization. The value is 3. + PREFER_PRIMARY_DOMAIN = "PreferPrimaryDomain" + #: Indicates that the ServicePlacementPolicyDescription is of type + #: ServicePlacementRequireDomainDistributionPolicyDescription, indicating that the system will + #: disallow placement of any two replicas from the same partition in the same domain at any time. + #: The value is 4. + REQUIRE_DOMAIN_DISTRIBUTION = "RequireDomainDistribution" + #: Indicates that the ServicePlacementPolicyDescription is of type + #: ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible all + #: replicas of a particular partition of the service should be placed atomically. The value is 5. + NON_PARTIALLY_PLACE_SERVICE = "NonPartiallyPlaceService" + #: Indicates that the ServicePlacementPolicyDescription is of type + #: ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, which indicates that + #: multiple stateless instances of a particular partition of the service can be placed on a node. + #: The value is 6. + ALLOW_MULTIPLE_STATELESS_INSTANCES_ON_NODE = "AllowMultipleStatelessInstancesOnNode" + +class ServiceStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The status of the application. + """ + + #: Indicates the service status is unknown. The value is zero. + UNKNOWN = "Unknown" + #: Indicates the service status is active. The value is 1. + ACTIVE = "Active" + #: Indicates the service is upgrading. The value is 2. + UPGRADING = "Upgrading" + #: Indicates the service is being deleted. The value is 3. + DELETING = "Deleting" + #: Indicates the service is being created. The value is 4. + CREATING = "Creating" + #: Indicates creation or deletion was terminated due to persistent failures. Another create/delete + #: request can be accepted. The value is 5. + FAILED = "Failed" + +class ServiceTypeRegistrationStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The status of the service type registration on the node. + """ + + #: Indicates the registration status is invalid. All Service Fabric enumerations have the invalid + #: type. The value is zero. + INVALID = "Invalid" + #: Indicates that the service type is disabled on this node. A type gets disabled when there are + #: too many failures of the code package hosting the service type. If the service type is + #: disabled, new replicas of that service type will not be placed on the node until it is enabled + #: again. The service type is enabled again after the process hosting it comes up and re-registers + #: the type or a preconfigured time interval has passed. The value is 1. + DISABLED = "Disabled" + #: Indicates that the service type is enabled on this node. Replicas of this service type can be + #: placed on this node when the code package registers the service type. The value is 2. + ENABLED = "Enabled" + #: Indicates that the service type is enabled and registered on the node by a code package. + #: Replicas of this service type can now be placed on this node. The value is 3. + REGISTERED = "Registered" + +class SettingType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of the setting being given in value + """ + + #: The setting in clear text, will not be processed in any way and passed in as is. + CLEAR_TEXT = "ClearText" + #: The URI to a KeyVault secret version, will be resolved using the application's managed identity + #: (this type is only valid if the app was assigned a managed identity) before getting passed in. + KEY_VAULT_REFERENCE = "KeyVaultReference" + #: The reference to a SecretValue resource, will be resolved before getting passed in. + SECRET_VALUE_REFERENCE = "SecretValueReference" + +class SizeTypes(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Volume size + """ + + SMALL = "Small" + MEDIUM = "Medium" + LARGE = "Large" + +class State(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The workflow state of the repair task. Valid initial states are Created, Claimed, and + Preparing. + """ + + #: Indicates that the repair task state is invalid. All Service Fabric enumerations have the + #: invalid value. + INVALID = "Invalid" + #: Indicates that the repair task has been created. + CREATED = "Created" + #: Indicates that the repair task has been claimed by a repair executor. + CLAIMED = "Claimed" + #: Indicates that the Repair Manager is preparing the system to handle the impact of the repair + #: task, usually by taking resources offline gracefully. + PREPARING = "Preparing" + #: Indicates that the repair task has been approved by the Repair Manager and is safe to execute. + APPROVED = "Approved" + #: Indicates that execution of the repair task is in progress. + EXECUTING = "Executing" + #: Indicates that the Repair Manager is restoring the system to its pre-repair state, usually by + #: bringing resources back online. + RESTORING = "Restoring" + #: Indicates that the repair task has completed, and no further state changes will occur. + COMPLETED = "Completed" + +class UpgradeDomainState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The state of the upgrade domain. + """ + + #: Indicates the upgrade domain state is invalid. All Service Fabric enumerations have the invalid + #: type. The value is zero. + INVALID = "Invalid" + #: The upgrade domain has not started upgrading yet. The value is 1. + PENDING = "Pending" + #: The upgrade domain is being upgraded but not complete yet. The value is 2. + IN_PROGRESS = "InProgress" + #: The upgrade domain has completed upgrade. The value is 3. + COMPLETED = "Completed" + +class UpgradeKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The kind of upgrade out of the following possible values. + """ + + #: Indicates the upgrade kind is invalid. All Service Fabric enumerations have the invalid type. + #: The value is zero. + INVALID = "Invalid" + #: The upgrade progresses one upgrade domain at a time. The value is 1. + ROLLING = "Rolling" + +class UpgradeMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, + UnmonitoredManual, Monitored, and UnmonitoredDeferred. + """ + + #: Indicates the upgrade mode is invalid. All Service Fabric enumerations have the invalid type. + #: The value is zero. + INVALID = "Invalid" + #: The upgrade will proceed automatically without performing any health monitoring. The value is + #: 1. + UNMONITORED_AUTO = "UnmonitoredAuto" + #: The upgrade will stop after completing each upgrade domain, giving the opportunity to manually + #: monitor health before proceeding. The value is 2. + UNMONITORED_MANUAL = "UnmonitoredManual" + #: The upgrade will stop after completing each upgrade domain and automatically monitor health + #: before proceeding. The value is 3. + MONITORED = "Monitored" + #: Perform a node-by-node upgrade. No action is performed when upgrade starts; upgrade is applied + #: on each node when it is deactivated with intent restart or higher. The value is 4. + UNMONITORED_DEFERRED = "UnmonitoredDeferred" + +class UpgradeSortOrder(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Defines the order in which an upgrade proceeds through the cluster. + """ + + #: Indicates that this sort order is not valid. All Service Fabric enumerations have the invalid + #: type. The value is 0. + INVALID = "Invalid" + #: Indicates that the default sort order (as specified in cluster manifest) will be used. The + #: value is 1. + DEFAULT = "Default" + #: Indicates that forward numeric sort order (UD names sorted as numbers) will be used. The value + #: is 2. + NUMERIC = "Numeric" + #: Indicates that forward lexicographical sort order (UD names sorted as strings) will be used. + #: The value is 3. + LEXICOGRAPHICAL = "Lexicographical" + #: Indicates that reverse numeric sort order (UD names sorted as numbers) will be used. The value + #: is 4. + REVERSE_NUMERIC = "ReverseNumeric" + #: Indicates that reverse lexicographical sort order (UD names sorted as strings) will be used. + #: The value is 5. + REVERSE_LEXICOGRAPHICAL = "ReverseLexicographical" + +class UpgradeState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The state of the upgrade domain. + """ + + #: Indicates the upgrade state is invalid. All Service Fabric enumerations have the invalid type. + #: The value is zero. + INVALID = "Invalid" + #: The upgrade is rolling back to the previous version but is not complete yet. The value is 1. + ROLLING_BACK_IN_PROGRESS = "RollingBackInProgress" + #: The upgrade has finished rolling back. The value is 2. + ROLLING_BACK_COMPLETED = "RollingBackCompleted" + #: The current upgrade domain has finished upgrading. The overall upgrade is waiting for an + #: explicit move next request in UnmonitoredManual mode or performing health checks in Monitored + #: mode. The value is 3. + ROLLING_FORWARD_PENDING = "RollingForwardPending" + #: The upgrade is rolling forward to the target version but is not complete yet. The value is 4. + ROLLING_FORWARD_IN_PROGRESS = "RollingForwardInProgress" + #: The upgrade has finished rolling forward. The value is 5. + ROLLING_FORWARD_COMPLETED = "RollingForwardCompleted" + #: The upgrade has failed and is unable to execute FailureAction. The value is 6. + FAILED = "Failed" + +class UpgradeType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of upgrade out of the following possible values. + """ + + #: Indicates the upgrade kind is invalid. All Service Fabric enumerations have the invalid type. + #: The value is zero. + INVALID = "Invalid" + #: The upgrade progresses one upgrade domain at a time. The value is 1. + ROLLING = "Rolling" + #: The upgrade gets restarted by force. The value is 2. + ROLLING_FORCE_RESTART = "Rolling_ForceRestart" + +class UpgradeUnitState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The state of the upgrade unit. + """ + + #: Indicates the upgrade unit state is invalid. All Service Fabric enumerations have the invalid + #: type. The value is zero. + INVALID = "Invalid" + #: The upgrade unit has not started upgrading yet. The value is 1. + PENDING = "Pending" + #: The upgrade unit is being upgraded but not complete yet. The value is 2. + IN_PROGRESS = "InProgress" + #: The upgrade unit has completed upgrade. The value is 3. + COMPLETED = "Completed" + #: The upgrade unit has failed to upgrade. The value is 4. + FAILED = "Failed" + +class VolumeProvider(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Describes the provider of the volume resource. + """ + + #: Provides volumes that are backed by Azure Files. + SF_AZURE_FILE = "SFAzureFile" diff --git a/customSDK/servicefabric/models/aad_metadata.py b/customSDK/servicefabric/models/aad_metadata.py new file mode 100644 index 00000000..2baa5e8c --- /dev/null +++ b/customSDK/servicefabric/models/aad_metadata.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AadMetadata(Model): + """Azure Active Directory metadata used for secured connection to cluster. + + :param authority: The AAD authority url. + :type authority: str + :param client: The AAD client application Id. + :type client: str + :param cluster: The AAD cluster application Id. + :type cluster: str + :param login: The AAD login url. + :type login: str + :param redirect: The client application redirect address. + :type redirect: str + :param tenant: The AAD tenant Id. + :type tenant: str + """ + + _attribute_map = { + 'authority': {'key': 'authority', 'type': 'str'}, + 'client': {'key': 'client', 'type': 'str'}, + 'cluster': {'key': 'cluster', 'type': 'str'}, + 'login': {'key': 'login', 'type': 'str'}, + 'redirect': {'key': 'redirect', 'type': 'str'}, + 'tenant': {'key': 'tenant', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AadMetadata, self).__init__(**kwargs) + self.authority = kwargs.get('authority', None) + self.client = kwargs.get('client', None) + self.cluster = kwargs.get('cluster', None) + self.login = kwargs.get('login', None) + self.redirect = kwargs.get('redirect', None) + self.tenant = kwargs.get('tenant', None) diff --git a/customSDK/servicefabric/models/aad_metadata_object.py b/customSDK/servicefabric/models/aad_metadata_object.py new file mode 100644 index 00000000..3972df30 --- /dev/null +++ b/customSDK/servicefabric/models/aad_metadata_object.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AadMetadataObject(Model): + """Azure Active Directory metadata object used for secured connection to + cluster. + + :param type: The client authentication method. + :type type: str + :param metadata: Azure Active Directory metadata used for secured + connection to cluster. + :type metadata: ~azure.servicefabric.models.AadMetadata + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': 'AadMetadata'}, + } + + def __init__(self, **kwargs): + super(AadMetadataObject, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.metadata = kwargs.get('metadata', None) diff --git a/customSDK/servicefabric/models/aad_metadata_object_py3.py b/customSDK/servicefabric/models/aad_metadata_object_py3.py new file mode 100644 index 00000000..0b24eb1c --- /dev/null +++ b/customSDK/servicefabric/models/aad_metadata_object_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AadMetadataObject(Model): + """Azure Active Directory metadata object used for secured connection to + cluster. + + :param type: The client authentication method. + :type type: str + :param metadata: Azure Active Directory metadata used for secured + connection to cluster. + :type metadata: ~azure.servicefabric.models.AadMetadata + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': 'AadMetadata'}, + } + + def __init__(self, *, type: str=None, metadata=None, **kwargs) -> None: + super(AadMetadataObject, self).__init__(**kwargs) + self.type = type + self.metadata = metadata diff --git a/customSDK/servicefabric/models/aad_metadata_py3.py b/customSDK/servicefabric/models/aad_metadata_py3.py new file mode 100644 index 00000000..868dfea9 --- /dev/null +++ b/customSDK/servicefabric/models/aad_metadata_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AadMetadata(Model): + """Azure Active Directory metadata used for secured connection to cluster. + + :param authority: The AAD authority url. + :type authority: str + :param client: The AAD client application Id. + :type client: str + :param cluster: The AAD cluster application Id. + :type cluster: str + :param login: The AAD login url. + :type login: str + :param redirect: The client application redirect address. + :type redirect: str + :param tenant: The AAD tenant Id. + :type tenant: str + """ + + _attribute_map = { + 'authority': {'key': 'authority', 'type': 'str'}, + 'client': {'key': 'client', 'type': 'str'}, + 'cluster': {'key': 'cluster', 'type': 'str'}, + 'login': {'key': 'login', 'type': 'str'}, + 'redirect': {'key': 'redirect', 'type': 'str'}, + 'tenant': {'key': 'tenant', 'type': 'str'}, + } + + def __init__(self, *, authority: str=None, client: str=None, cluster: str=None, login: str=None, redirect: str=None, tenant: str=None, **kwargs) -> None: + super(AadMetadata, self).__init__(**kwargs) + self.authority = authority + self.client = client + self.cluster = cluster + self.login = login + self.redirect = redirect + self.tenant = tenant diff --git a/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism.py b/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism.py new file mode 100644 index 00000000..86905ac3 --- /dev/null +++ b/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .scaling_mechanism_description import ScalingMechanismDescription + + +class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription): + """Represents a scaling mechanism for adding or removing named partitions of a + stateless service. Partition names are in the format '0','1''N-1'. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param min_partition_count: Required. Minimum number of named partitions + of the service. + :type min_partition_count: int + :param max_partition_count: Required. Maximum number of named partitions + of the service. + :type max_partition_count: int + :param scale_increment: Required. The number of instances to add or remove + during a scaling operation. + :type scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_partition_count': {'required': True}, + 'max_partition_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'}, + 'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'}, + 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs) + self.min_partition_count = kwargs.get('min_partition_count', None) + self.max_partition_count = kwargs.get('max_partition_count', None) + self.scale_increment = kwargs.get('scale_increment', None) + self.kind = 'AddRemoveIncrementalNamedPartition' diff --git a/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism_py3.py b/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism_py3.py new file mode 100644 index 00000000..cf3a4731 --- /dev/null +++ b/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .scaling_mechanism_description_py3 import ScalingMechanismDescription + + +class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription): + """Represents a scaling mechanism for adding or removing named partitions of a + stateless service. Partition names are in the format '0','1''N-1'. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param min_partition_count: Required. Minimum number of named partitions + of the service. + :type min_partition_count: int + :param max_partition_count: Required. Maximum number of named partitions + of the service. + :type max_partition_count: int + :param scale_increment: Required. The number of instances to add or remove + during a scaling operation. + :type scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_partition_count': {'required': True}, + 'max_partition_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'}, + 'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'}, + 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, + } + + def __init__(self, *, min_partition_count: int, max_partition_count: int, scale_increment: int, **kwargs) -> None: + super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs) + self.min_partition_count = min_partition_count + self.max_partition_count = max_partition_count + self.scale_increment = scale_increment + self.kind = 'AddRemoveIncrementalNamedPartition' diff --git a/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism.py b/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism.py new file mode 100644 index 00000000..6332ff38 --- /dev/null +++ b/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .auto_scaling_mechanism import AutoScalingMechanism + + +class AddRemoveReplicaScalingMechanism(AutoScalingMechanism): + """Describes the horizontal auto scaling mechanism that adds or removes + replicas (containers or container groups). + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param min_count: Required. Minimum number of containers (scale down won't + be performed below this number). + :type min_count: int + :param max_count: Required. Maximum number of containers (scale up won't + be performed above this number). + :type max_count: int + :param scale_increment: Required. Each time auto scaling is performed, + this number of containers will be added or removed. + :type scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_count': {'required': True}, + 'max_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'scale_increment': {'key': 'scaleIncrement', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AddRemoveReplicaScalingMechanism, self).__init__(**kwargs) + self.min_count = kwargs.get('min_count', None) + self.max_count = kwargs.get('max_count', None) + self.scale_increment = kwargs.get('scale_increment', None) + self.kind = 'AddRemoveReplica' diff --git a/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism_py3.py b/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism_py3.py new file mode 100644 index 00000000..ce862f88 --- /dev/null +++ b/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .auto_scaling_mechanism_py3 import AutoScalingMechanism + + +class AddRemoveReplicaScalingMechanism(AutoScalingMechanism): + """Describes the horizontal auto scaling mechanism that adds or removes + replicas (containers or container groups). + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param min_count: Required. Minimum number of containers (scale down won't + be performed below this number). + :type min_count: int + :param max_count: Required. Maximum number of containers (scale up won't + be performed above this number). + :type max_count: int + :param scale_increment: Required. Each time auto scaling is performed, + this number of containers will be added or removed. + :type scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_count': {'required': True}, + 'max_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'scale_increment': {'key': 'scaleIncrement', 'type': 'int'}, + } + + def __init__(self, *, min_count: int, max_count: int, scale_increment: int, **kwargs) -> None: + super(AddRemoveReplicaScalingMechanism, self).__init__(**kwargs) + self.min_count = min_count + self.max_count = max_count + self.scale_increment = scale_increment + self.kind = 'AddRemoveReplica' diff --git a/customSDK/servicefabric/models/analysis_event_metadata.py b/customSDK/servicefabric/models/analysis_event_metadata.py new file mode 100644 index 00000000..9f249f11 --- /dev/null +++ b/customSDK/servicefabric/models/analysis_event_metadata.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AnalysisEventMetadata(Model): + """Metadata about an Analysis Event. + + :param delay: The analysis delay. + :type delay: timedelta + :param duration: The duration of analysis. + :type duration: timedelta + """ + + _attribute_map = { + 'delay': {'key': 'Delay', 'type': 'duration'}, + 'duration': {'key': 'Duration', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(AnalysisEventMetadata, self).__init__(**kwargs) + self.delay = kwargs.get('delay', None) + self.duration = kwargs.get('duration', None) diff --git a/customSDK/servicefabric/models/analysis_event_metadata_py3.py b/customSDK/servicefabric/models/analysis_event_metadata_py3.py new file mode 100644 index 00000000..c3615fa2 --- /dev/null +++ b/customSDK/servicefabric/models/analysis_event_metadata_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AnalysisEventMetadata(Model): + """Metadata about an Analysis Event. + + :param delay: The analysis delay. + :type delay: timedelta + :param duration: The duration of analysis. + :type duration: timedelta + """ + + _attribute_map = { + 'delay': {'key': 'Delay', 'type': 'duration'}, + 'duration': {'key': 'Duration', 'type': 'duration'}, + } + + def __init__(self, *, delay=None, duration=None, **kwargs) -> None: + super(AnalysisEventMetadata, self).__init__(**kwargs) + self.delay = delay + self.duration = duration diff --git a/customSDK/servicefabric/models/application_backup_configuration_info.py b/customSDK/servicefabric/models/application_backup_configuration_info.py new file mode 100644 index 00000000..43eb607a --- /dev/null +++ b/customSDK/servicefabric/models/application_backup_configuration_info.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_configuration_info import BackupConfigurationInfo + + +class ApplicationBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information for a specific Service Fabric application + specifying what backup policy is being applied and suspend description, if + any. + + All required parameters must be populated in order to send to Azure. + + :param policy_name: The name of the backup policy which is applicable to + this Service Fabric application or service or partition. + :type policy_name: str + :param policy_inherited_from: Specifies the scope at which the backup + policy is applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type policy_inherited_from: str or + ~azure.servicefabric.models.BackupPolicyScope + :param suspension_info: Describes the backup suspension details. + :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :param kind: Required. Constant filled by server. + :type kind: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationBackupConfigurationInfo, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.kind = 'Application' diff --git a/customSDK/servicefabric/models/application_backup_configuration_info_py3.py b/customSDK/servicefabric/models/application_backup_configuration_info_py3.py new file mode 100644 index 00000000..6bbb5ced --- /dev/null +++ b/customSDK/servicefabric/models/application_backup_configuration_info_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_configuration_info_py3 import BackupConfigurationInfo + + +class ApplicationBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information for a specific Service Fabric application + specifying what backup policy is being applied and suspend description, if + any. + + All required parameters must be populated in order to send to Azure. + + :param policy_name: The name of the backup policy which is applicable to + this Service Fabric application or service or partition. + :type policy_name: str + :param policy_inherited_from: Specifies the scope at which the backup + policy is applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type policy_inherited_from: str or + ~azure.servicefabric.models.BackupPolicyScope + :param suspension_info: Describes the backup suspension details. + :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :param kind: Required. Constant filled by server. + :type kind: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, application_name: str=None, **kwargs) -> None: + super(ApplicationBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) + self.application_name = application_name + self.kind = 'Application' diff --git a/customSDK/servicefabric/models/application_backup_entity.py b/customSDK/servicefabric/models/application_backup_entity.py new file mode 100644 index 00000000..ad276a3f --- /dev/null +++ b/customSDK/servicefabric/models/application_backup_entity.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_entity import BackupEntity + + +class ApplicationBackupEntity(BackupEntity): + """Identifies the Service Fabric application which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :param entity_kind: Required. Constant filled by server. + :type entity_kind: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationBackupEntity, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.entity_kind = 'Application' diff --git a/customSDK/servicefabric/models/application_backup_entity_py3.py b/customSDK/servicefabric/models/application_backup_entity_py3.py new file mode 100644 index 00000000..a07dd1da --- /dev/null +++ b/customSDK/servicefabric/models/application_backup_entity_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_entity_py3 import BackupEntity + + +class ApplicationBackupEntity(BackupEntity): + """Identifies the Service Fabric application which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :param entity_kind: Required. Constant filled by server. + :type entity_kind: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__(self, *, application_name: str=None, **kwargs) -> None: + super(ApplicationBackupEntity, self).__init__(**kwargs) + self.application_name = application_name + self.entity_kind = 'Application' diff --git a/customSDK/servicefabric/models/application_capacity_description.py b/customSDK/servicefabric/models/application_capacity_description.py new file mode 100644 index 00000000..79f6f5ba --- /dev/null +++ b/customSDK/servicefabric/models/application_capacity_description.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationCapacityDescription(Model): + """Describes capacity information for services of this application. This + description can be used for describing the following. + - Reserving the capacity for the services on the nodes + - Limiting the total number of nodes that services of this application can + run on + - Limiting the custom capacity metrics to limit the total consumption of + this metric by the services of this application. + + :param minimum_nodes: The minimum number of nodes where Service Fabric + will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those + nodes. If this property is set to zero, no capacity will be reserved. The + value of this property cannot be more than the value of the MaximumNodes + property. + :type minimum_nodes: long + :param maximum_nodes: The maximum number of nodes where Service Fabric + will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those + nodes. By default, the value of this property is zero and it means that + the services can be placed on any node. Default value: 0 . + :type maximum_nodes: long + :param application_metrics: List of application capacity metric + description. + :type application_metrics: + list[~azure.servicefabric.models.ApplicationMetricDescription] + """ + + _validation = { + 'minimum_nodes': {'minimum': 0}, + 'maximum_nodes': {'minimum': 0}, + } + + _attribute_map = { + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, + } + + def __init__(self, **kwargs): + super(ApplicationCapacityDescription, self).__init__(**kwargs) + self.minimum_nodes = kwargs.get('minimum_nodes', None) + self.maximum_nodes = kwargs.get('maximum_nodes', 0) + self.application_metrics = kwargs.get('application_metrics', None) diff --git a/customSDK/servicefabric/models/application_capacity_description_py3.py b/customSDK/servicefabric/models/application_capacity_description_py3.py new file mode 100644 index 00000000..dff8cade --- /dev/null +++ b/customSDK/servicefabric/models/application_capacity_description_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationCapacityDescription(Model): + """Describes capacity information for services of this application. This + description can be used for describing the following. + - Reserving the capacity for the services on the nodes + - Limiting the total number of nodes that services of this application can + run on + - Limiting the custom capacity metrics to limit the total consumption of + this metric by the services of this application. + + :param minimum_nodes: The minimum number of nodes where Service Fabric + will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those + nodes. If this property is set to zero, no capacity will be reserved. The + value of this property cannot be more than the value of the MaximumNodes + property. + :type minimum_nodes: long + :param maximum_nodes: The maximum number of nodes where Service Fabric + will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those + nodes. By default, the value of this property is zero and it means that + the services can be placed on any node. Default value: 0 . + :type maximum_nodes: long + :param application_metrics: List of application capacity metric + description. + :type application_metrics: + list[~azure.servicefabric.models.ApplicationMetricDescription] + """ + + _validation = { + 'minimum_nodes': {'minimum': 0}, + 'maximum_nodes': {'minimum': 0}, + } + + _attribute_map = { + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, + } + + def __init__(self, *, minimum_nodes: int=None, maximum_nodes: int=0, application_metrics=None, **kwargs) -> None: + super(ApplicationCapacityDescription, self).__init__(**kwargs) + self.minimum_nodes = minimum_nodes + self.maximum_nodes = maximum_nodes + self.application_metrics = application_metrics diff --git a/customSDK/servicefabric/models/application_container_instance_exited_event.py b/customSDK/servicefabric/models/application_container_instance_exited_event.py new file mode 100644 index 00000000..8556c736 --- /dev/null +++ b/customSDK/servicefabric/models/application_container_instance_exited_event.py @@ -0,0 +1,122 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event import ApplicationEvent + + +class ApplicationContainerInstanceExitedEvent(ApplicationEvent): + """Container Exited event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param service_name: Required. Name of Service. + :type service_name: str + :param service_package_name: Required. Name of Service package. + :type service_package_name: str + :param service_package_activation_id: Required. Activation Id of Service + package. + :type service_package_activation_id: str + :param is_exclusive: Required. Indicates IsExclusive flag. + :type is_exclusive: bool + :param code_package_name: Required. Name of Code package. + :type code_package_name: str + :param entry_point_type: Required. Type of EntryPoint. + :type entry_point_type: str + :param image_name: Required. Name of Container image. + :type image_name: str + :param container_name: Required. Name of Container. + :type container_name: str + :param host_id: Required. Host Id. + :type host_id: str + :param exit_code: Required. Exit code of process. + :type exit_code: long + :param unexpected_termination: Required. Indicates if termination is + unexpected. + :type unexpected_termination: bool + :param start_time: Required. Start time of process. + :type start_time: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'service_name': {'required': True}, + 'service_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'is_exclusive': {'required': True}, + 'code_package_name': {'required': True}, + 'entry_point_type': {'required': True}, + 'image_name': {'required': True}, + 'container_name': {'required': True}, + 'host_id': {'required': True}, + 'exit_code': {'required': True}, + 'unexpected_termination': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, + 'image_name': {'key': 'ImageName', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + 'host_id': {'key': 'HostId', 'type': 'str'}, + 'exit_code': {'key': 'ExitCode', 'type': 'long'}, + 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ApplicationContainerInstanceExitedEvent, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.service_package_name = kwargs.get('service_package_name', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.is_exclusive = kwargs.get('is_exclusive', None) + self.code_package_name = kwargs.get('code_package_name', None) + self.entry_point_type = kwargs.get('entry_point_type', None) + self.image_name = kwargs.get('image_name', None) + self.container_name = kwargs.get('container_name', None) + self.host_id = kwargs.get('host_id', None) + self.exit_code = kwargs.get('exit_code', None) + self.unexpected_termination = kwargs.get('unexpected_termination', None) + self.start_time = kwargs.get('start_time', None) + self.kind = 'ApplicationContainerInstanceExited' diff --git a/customSDK/servicefabric/models/application_container_instance_exited_event_py3.py b/customSDK/servicefabric/models/application_container_instance_exited_event_py3.py new file mode 100644 index 00000000..0f0451ca --- /dev/null +++ b/customSDK/servicefabric/models/application_container_instance_exited_event_py3.py @@ -0,0 +1,122 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event_py3 import ApplicationEvent + + +class ApplicationContainerInstanceExitedEvent(ApplicationEvent): + """Container Exited event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param service_name: Required. Name of Service. + :type service_name: str + :param service_package_name: Required. Name of Service package. + :type service_package_name: str + :param service_package_activation_id: Required. Activation Id of Service + package. + :type service_package_activation_id: str + :param is_exclusive: Required. Indicates IsExclusive flag. + :type is_exclusive: bool + :param code_package_name: Required. Name of Code package. + :type code_package_name: str + :param entry_point_type: Required. Type of EntryPoint. + :type entry_point_type: str + :param image_name: Required. Name of Container image. + :type image_name: str + :param container_name: Required. Name of Container. + :type container_name: str + :param host_id: Required. Host Id. + :type host_id: str + :param exit_code: Required. Exit code of process. + :type exit_code: long + :param unexpected_termination: Required. Indicates if termination is + unexpected. + :type unexpected_termination: bool + :param start_time: Required. Start time of process. + :type start_time: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'service_name': {'required': True}, + 'service_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'is_exclusive': {'required': True}, + 'code_package_name': {'required': True}, + 'entry_point_type': {'required': True}, + 'image_name': {'required': True}, + 'container_name': {'required': True}, + 'host_id': {'required': True}, + 'exit_code': {'required': True}, + 'unexpected_termination': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, + 'image_name': {'key': 'ImageName', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + 'host_id': {'key': 'HostId', 'type': 'str'}, + 'exit_code': {'key': 'ExitCode', 'type': 'long'}, + 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_name: str, service_package_name: str, service_package_activation_id: str, is_exclusive: bool, code_package_name: str, entry_point_type: str, image_name: str, container_name: str, host_id: str, exit_code: int, unexpected_termination: bool, start_time, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationContainerInstanceExitedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.service_name = service_name + self.service_package_name = service_package_name + self.service_package_activation_id = service_package_activation_id + self.is_exclusive = is_exclusive + self.code_package_name = code_package_name + self.entry_point_type = entry_point_type + self.image_name = image_name + self.container_name = container_name + self.host_id = host_id + self.exit_code = exit_code + self.unexpected_termination = unexpected_termination + self.start_time = start_time + self.kind = 'ApplicationContainerInstanceExited' diff --git a/customSDK/servicefabric/models/application_created_event.py b/customSDK/servicefabric/models/application_created_event.py new file mode 100644 index 00000000..bd190e77 --- /dev/null +++ b/customSDK/servicefabric/models/application_created_event.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event import ApplicationEvent + + +class ApplicationCreatedEvent(ApplicationEvent): + """Application Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param application_type_version: Required. Application type version. + :type application_type_version: str + :param application_definition_kind: Required. Application definition kind. + :type application_definition_kind: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'application_definition_kind': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationCreatedEvent, self).__init__(**kwargs) + self.application_type_name = kwargs.get('application_type_name', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.application_definition_kind = kwargs.get('application_definition_kind', None) + self.kind = 'ApplicationCreated' diff --git a/customSDK/servicefabric/models/application_created_event_py3.py b/customSDK/servicefabric/models/application_created_event_py3.py new file mode 100644 index 00000000..849b60ba --- /dev/null +++ b/customSDK/servicefabric/models/application_created_event_py3.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event_py3 import ApplicationEvent + + +class ApplicationCreatedEvent(ApplicationEvent): + """Application Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param application_type_version: Required. Application type version. + :type application_type_version: str + :param application_definition_kind: Required. Application definition kind. + :type application_definition_kind: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'application_definition_kind': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, application_definition_kind: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationCreatedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_type_name = application_type_name + self.application_type_version = application_type_version + self.application_definition_kind = application_definition_kind + self.kind = 'ApplicationCreated' diff --git a/customSDK/servicefabric/models/application_deleted_event.py b/customSDK/servicefabric/models/application_deleted_event.py new file mode 100644 index 00000000..440bd67a --- /dev/null +++ b/customSDK/servicefabric/models/application_deleted_event.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event import ApplicationEvent + + +class ApplicationDeletedEvent(ApplicationEvent): + """Application Deleted event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param application_type_version: Required. Application type version. + :type application_type_version: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationDeletedEvent, self).__init__(**kwargs) + self.application_type_name = kwargs.get('application_type_name', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.kind = 'ApplicationDeleted' diff --git a/customSDK/servicefabric/models/application_deleted_event_py3.py b/customSDK/servicefabric/models/application_deleted_event_py3.py new file mode 100644 index 00000000..b6aba073 --- /dev/null +++ b/customSDK/servicefabric/models/application_deleted_event_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event_py3 import ApplicationEvent + + +class ApplicationDeletedEvent(ApplicationEvent): + """Application Deleted event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param application_type_version: Required. Application type version. + :type application_type_version: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationDeletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_type_name = application_type_name + self.application_type_version = application_type_version + self.kind = 'ApplicationDeleted' diff --git a/customSDK/servicefabric/models/application_description.py b/customSDK/servicefabric/models/application_description.py new file mode 100644 index 00000000..4794af65 --- /dev/null +++ b/customSDK/servicefabric/models/application_description.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationDescription(Model): + """Describes a Service Fabric application. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the application, including the + 'fabric:' URI scheme. + :type name: str + :param type_name: Required. The application type name as defined in the + application manifest. + :type type_name: str + :param type_version: Required. The version of the application type as + defined in the application manifest. + :type type_version: str + :param parameter_list: List of application parameters with overridden + values from their default values specified in the application manifest. + :type parameter_list: + list[~azure.servicefabric.models.ApplicationParameter] + :param application_capacity: Describes capacity information for services + of this application. This description can be used for describing the + following. + - Reserving the capacity for the services on the nodes + - Limiting the total number of nodes that services of this application can + run on + - Limiting the custom capacity metrics to limit the total consumption of + this metric by the services of this application + :type application_capacity: + ~azure.servicefabric.models.ApplicationCapacityDescription + :param managed_application_identity: Managed application identity + description. + :type managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + + _validation = { + 'name': {'required': True}, + 'type_name': {'required': True}, + 'type_version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'type_version': {'key': 'TypeVersion', 'type': 'str'}, + 'parameter_list': {'key': 'ParameterList', 'type': '[ApplicationParameter]'}, + 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'ApplicationCapacityDescription'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + } + + def __init__(self, **kwargs): + super(ApplicationDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type_name = kwargs.get('type_name', None) + self.type_version = kwargs.get('type_version', None) + self.parameter_list = kwargs.get('parameter_list', None) + self.application_capacity = kwargs.get('application_capacity', None) + self.managed_application_identity = kwargs.get('managed_application_identity', None) diff --git a/customSDK/servicefabric/models/application_description_py3.py b/customSDK/servicefabric/models/application_description_py3.py new file mode 100644 index 00000000..06333344 --- /dev/null +++ b/customSDK/servicefabric/models/application_description_py3.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationDescription(Model): + """Describes a Service Fabric application. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the application, including the + 'fabric:' URI scheme. + :type name: str + :param type_name: Required. The application type name as defined in the + application manifest. + :type type_name: str + :param type_version: Required. The version of the application type as + defined in the application manifest. + :type type_version: str + :param parameter_list: List of application parameters with overridden + values from their default values specified in the application manifest. + :type parameter_list: + list[~azure.servicefabric.models.ApplicationParameter] + :param application_capacity: Describes capacity information for services + of this application. This description can be used for describing the + following. + - Reserving the capacity for the services on the nodes + - Limiting the total number of nodes that services of this application can + run on + - Limiting the custom capacity metrics to limit the total consumption of + this metric by the services of this application + :type application_capacity: + ~azure.servicefabric.models.ApplicationCapacityDescription + :param managed_application_identity: Managed application identity + description. + :type managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + + _validation = { + 'name': {'required': True}, + 'type_name': {'required': True}, + 'type_version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'type_version': {'key': 'TypeVersion', 'type': 'str'}, + 'parameter_list': {'key': 'ParameterList', 'type': '[ApplicationParameter]'}, + 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'ApplicationCapacityDescription'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + } + + def __init__(self, *, name: str, type_name: str, type_version: str, parameter_list=None, application_capacity=None, managed_application_identity=None, **kwargs) -> None: + super(ApplicationDescription, self).__init__(**kwargs) + self.name = name + self.type_name = type_name + self.type_version = type_version + self.parameter_list = parameter_list + self.application_capacity = application_capacity + self.managed_application_identity = managed_application_identity diff --git a/customSDK/servicefabric/models/application_event.py b/customSDK/servicefabric/models/application_event.py new file mode 100644 index 00000000..d85913a0 --- /dev/null +++ b/customSDK/servicefabric/models/application_event.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .fabric_event import FabricEvent + + +class ApplicationEvent(FabricEvent): + """Represents the base for all Application Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationCreatedEvent, ApplicationDeletedEvent, + ApplicationNewHealthReportEvent, ApplicationHealthReportExpiredEvent, + ApplicationUpgradeCompletedEvent, ApplicationUpgradeDomainCompletedEvent, + ApplicationUpgradeRollbackCompletedEvent, + ApplicationUpgradeRollbackStartedEvent, ApplicationUpgradeStartedEvent, + DeployedApplicationNewHealthReportEvent, + DeployedApplicationHealthReportExpiredEvent, ApplicationProcessExitedEvent, + ApplicationContainerInstanceExitedEvent, + DeployedServicePackageNewHealthReportEvent, + DeployedServicePackageHealthReportExpiredEvent, + ChaosCodePackageRestartScheduledEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ApplicationCreated': 'ApplicationCreatedEvent', 'ApplicationDeleted': 'ApplicationDeletedEvent', 'ApplicationNewHealthReport': 'ApplicationNewHealthReportEvent', 'ApplicationHealthReportExpired': 'ApplicationHealthReportExpiredEvent', 'ApplicationUpgradeCompleted': 'ApplicationUpgradeCompletedEvent', 'ApplicationUpgradeDomainCompleted': 'ApplicationUpgradeDomainCompletedEvent', 'ApplicationUpgradeRollbackCompleted': 'ApplicationUpgradeRollbackCompletedEvent', 'ApplicationUpgradeRollbackStarted': 'ApplicationUpgradeRollbackStartedEvent', 'ApplicationUpgradeStarted': 'ApplicationUpgradeStartedEvent', 'DeployedApplicationNewHealthReport': 'DeployedApplicationNewHealthReportEvent', 'DeployedApplicationHealthReportExpired': 'DeployedApplicationHealthReportExpiredEvent', 'ApplicationProcessExited': 'ApplicationProcessExitedEvent', 'ApplicationContainerInstanceExited': 'ApplicationContainerInstanceExitedEvent', 'DeployedServicePackageNewHealthReport': 'DeployedServicePackageNewHealthReportEvent', 'DeployedServicePackageHealthReportExpired': 'DeployedServicePackageHealthReportExpiredEvent', 'ChaosCodePackageRestartScheduled': 'ChaosCodePackageRestartScheduledEvent'} + } + + def __init__(self, **kwargs): + super(ApplicationEvent, self).__init__(**kwargs) + self.application_id = kwargs.get('application_id', None) + self.kind = 'ApplicationEvent' diff --git a/customSDK/servicefabric/models/application_event_py3.py b/customSDK/servicefabric/models/application_event_py3.py new file mode 100644 index 00000000..2383eef8 --- /dev/null +++ b/customSDK/servicefabric/models/application_event_py3.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .fabric_event_py3 import FabricEvent + + +class ApplicationEvent(FabricEvent): + """Represents the base for all Application Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationCreatedEvent, ApplicationDeletedEvent, + ApplicationNewHealthReportEvent, ApplicationHealthReportExpiredEvent, + ApplicationUpgradeCompletedEvent, ApplicationUpgradeDomainCompletedEvent, + ApplicationUpgradeRollbackCompletedEvent, + ApplicationUpgradeRollbackStartedEvent, ApplicationUpgradeStartedEvent, + DeployedApplicationNewHealthReportEvent, + DeployedApplicationHealthReportExpiredEvent, ApplicationProcessExitedEvent, + ApplicationContainerInstanceExitedEvent, + DeployedServicePackageNewHealthReportEvent, + DeployedServicePackageHealthReportExpiredEvent, + ChaosCodePackageRestartScheduledEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ApplicationCreated': 'ApplicationCreatedEvent', 'ApplicationDeleted': 'ApplicationDeletedEvent', 'ApplicationNewHealthReport': 'ApplicationNewHealthReportEvent', 'ApplicationHealthReportExpired': 'ApplicationHealthReportExpiredEvent', 'ApplicationUpgradeCompleted': 'ApplicationUpgradeCompletedEvent', 'ApplicationUpgradeDomainCompleted': 'ApplicationUpgradeDomainCompletedEvent', 'ApplicationUpgradeRollbackCompleted': 'ApplicationUpgradeRollbackCompletedEvent', 'ApplicationUpgradeRollbackStarted': 'ApplicationUpgradeRollbackStartedEvent', 'ApplicationUpgradeStarted': 'ApplicationUpgradeStartedEvent', 'DeployedApplicationNewHealthReport': 'DeployedApplicationNewHealthReportEvent', 'DeployedApplicationHealthReportExpired': 'DeployedApplicationHealthReportExpiredEvent', 'ApplicationProcessExited': 'ApplicationProcessExitedEvent', 'ApplicationContainerInstanceExited': 'ApplicationContainerInstanceExitedEvent', 'DeployedServicePackageNewHealthReport': 'DeployedServicePackageNewHealthReportEvent', 'DeployedServicePackageHealthReportExpired': 'DeployedServicePackageHealthReportExpiredEvent', 'ChaosCodePackageRestartScheduled': 'ChaosCodePackageRestartScheduledEvent'} + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.application_id = application_id + self.kind = 'ApplicationEvent' diff --git a/customSDK/servicefabric/models/application_health.py b/customSDK/servicefabric/models/application_health.py new file mode 100644 index 00000000..f9e1a373 --- /dev/null +++ b/customSDK/servicefabric/models/application_health.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health import EntityHealth + + +class ApplicationHealth(EntityHealth): + """Represents the health of the application. Contains the application + aggregated health state and the service and deployed application health + states. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + :param service_health_states: Service health states as found in the health + store. + :type service_health_states: + list[~azure.servicefabric.models.ServiceHealthState] + :param deployed_application_health_states: Deployed application health + states as found in the health store. + :type deployed_application_health_states: + list[~azure.servicefabric.models.DeployedApplicationHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'service_health_states': {'key': 'ServiceHealthStates', 'type': '[ServiceHealthState]'}, + 'deployed_application_health_states': {'key': 'DeployedApplicationHealthStates', 'type': '[DeployedApplicationHealthState]'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealth, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.service_health_states = kwargs.get('service_health_states', None) + self.deployed_application_health_states = kwargs.get('deployed_application_health_states', None) diff --git a/customSDK/servicefabric/models/application_health_evaluation.py b/customSDK/servicefabric/models/application_health_evaluation.py new file mode 100644 index 00000000..edaf4aa2 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_evaluation.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class ApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for an application, containing information + about the data and the algorithm used by the health store to evaluate + health. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the application. The types of the + unhealthy evaluations can be DeployedApplicationsHealthEvaluation, + ServicesHealthEvaluation or EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthEvaluation, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Application' diff --git a/customSDK/servicefabric/models/application_health_evaluation_py3.py b/customSDK/servicefabric/models/application_health_evaluation_py3.py new file mode 100644 index 00000000..a0abe474 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_evaluation_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class ApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for an application, containing information + about the data and the algorithm used by the health store to evaluate + health. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the application. The types of the + unhealthy evaluations can be DeployedApplicationsHealthEvaluation, + ServicesHealthEvaluation or EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, application_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: + super(ApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.application_name = application_name + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Application' diff --git a/customSDK/servicefabric/models/application_health_policies.py b/customSDK/servicefabric/models/application_health_policies.py new file mode 100644 index 00000000..7eb75f4d --- /dev/null +++ b/customSDK/servicefabric/models/application_health_policies.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationHealthPolicies(Model): + """Defines the application health policy map used to evaluate the health of an + application or one of its children entities. + + :param application_health_policy_map: The wrapper that contains the map + with application health policies used to evaluate specific applications in + the cluster. + :type application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthPolicies, self).__init__(**kwargs) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) diff --git a/customSDK/servicefabric/models/application_health_policies_py3.py b/customSDK/servicefabric/models/application_health_policies_py3.py new file mode 100644 index 00000000..0487b4ce --- /dev/null +++ b/customSDK/servicefabric/models/application_health_policies_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationHealthPolicies(Model): + """Defines the application health policy map used to evaluate the health of an + application or one of its children entities. + + :param application_health_policy_map: The wrapper that contains the map + with application health policies used to evaluate specific applications in + the cluster. + :type application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + } + + def __init__(self, *, application_health_policy_map=None, **kwargs) -> None: + super(ApplicationHealthPolicies, self).__init__(**kwargs) + self.application_health_policy_map = application_health_policy_map diff --git a/customSDK/servicefabric/models/application_health_policy.py b/customSDK/servicefabric/models/application_health_policy.py new file mode 100644 index 00000000..bfdbeb6f --- /dev/null +++ b/customSDK/servicefabric/models/application_health_policy.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationHealthPolicy(Model): + """Defines a health policy used to evaluate the health of an application or + one of its children entities. + + :param consider_warning_as_error: Indicates whether warnings are treated + with the same severity as errors. Default value: False . + :type consider_warning_as_error: bool + :param max_percent_unhealthy_deployed_applications: The maximum allowed + percentage of unhealthy deployed applications. Allowed values are Byte + values from zero to 100. + The percentage represents the maximum tolerated percentage of deployed + applications that can be unhealthy before the application is considered in + error. + This is calculated by dividing the number of unhealthy deployed + applications over the number of nodes where the application is currently + deployed on in the cluster. + The computation rounds up to tolerate one failure on small numbers of + nodes. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_deployed_applications: int + :param default_service_type_health_policy: The health policy used by + default to evaluate the health of a service type. + :type default_service_type_health_policy: + ~azure.servicefabric.models.ServiceTypeHealthPolicy + :param service_type_health_policy_map: The map with service type health + policy per service type name. The map is empty by default. + :type service_type_health_policy_map: + list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem] + """ + + _attribute_map = { + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'default_service_type_health_policy': {'key': 'DefaultServiceTypeHealthPolicy', 'type': 'ServiceTypeHealthPolicy'}, + 'service_type_health_policy_map': {'key': 'ServiceTypeHealthPolicyMap', 'type': '[ServiceTypeHealthPolicyMapItem]'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthPolicy, self).__init__(**kwargs) + self.consider_warning_as_error = kwargs.get('consider_warning_as_error', False) + self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', 0) + self.default_service_type_health_policy = kwargs.get('default_service_type_health_policy', None) + self.service_type_health_policy_map = kwargs.get('service_type_health_policy_map', None) diff --git a/customSDK/servicefabric/models/application_health_policy_map_item.py b/customSDK/servicefabric/models/application_health_policy_map_item.py new file mode 100644 index 00000000..3b1cf59e --- /dev/null +++ b/customSDK/servicefabric/models/application_health_policy_map_item.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationHealthPolicyMapItem(Model): + """Defines an item in ApplicationHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the application health policy map item. + This is the name of the application. + :type key: str + :param value: Required. The value of the application health policy map + item. This is the ApplicationHealthPolicy for this application. + :type value: ~azure.servicefabric.models.ApplicationHealthPolicy + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ApplicationHealthPolicy'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthPolicyMapItem, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/application_health_policy_map_item_py3.py b/customSDK/servicefabric/models/application_health_policy_map_item_py3.py new file mode 100644 index 00000000..cb7e5c92 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_policy_map_item_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationHealthPolicyMapItem(Model): + """Defines an item in ApplicationHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the application health policy map item. + This is the name of the application. + :type key: str + :param value: Required. The value of the application health policy map + item. This is the ApplicationHealthPolicy for this application. + :type value: ~azure.servicefabric.models.ApplicationHealthPolicy + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ApplicationHealthPolicy'}, + } + + def __init__(self, *, key: str, value, **kwargs) -> None: + super(ApplicationHealthPolicyMapItem, self).__init__(**kwargs) + self.key = key + self.value = value diff --git a/customSDK/servicefabric/models/application_health_policy_map_object.py b/customSDK/servicefabric/models/application_health_policy_map_object.py new file mode 100644 index 00000000..8981ebfa --- /dev/null +++ b/customSDK/servicefabric/models/application_health_policy_map_object.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationHealthPolicyMapObject(Model): + """Represents the map of application health policies for a ServiceFabric + cluster upgrade. + + :param application_health_policy_map: Defines a map that contains specific + application health policies for different applications. + Each entry specifies as key the application name and as value an + ApplicationHealthPolicy used to evaluate the application health. + If an application is not specified in the map, the application health + evaluation uses the ApplicationHealthPolicy found in its application + manifest or the default application health policy (if no health policy is + defined in the manifest). + The map is empty by default. + :type application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthPolicyMapObject, self).__init__(**kwargs) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) diff --git a/customSDK/servicefabric/models/application_health_policy_map_object_py3.py b/customSDK/servicefabric/models/application_health_policy_map_object_py3.py new file mode 100644 index 00000000..96a95a01 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_policy_map_object_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationHealthPolicyMapObject(Model): + """Represents the map of application health policies for a ServiceFabric + cluster upgrade. + + :param application_health_policy_map: Defines a map that contains specific + application health policies for different applications. + Each entry specifies as key the application name and as value an + ApplicationHealthPolicy used to evaluate the application health. + If an application is not specified in the map, the application health + evaluation uses the ApplicationHealthPolicy found in its application + manifest or the default application health policy (if no health policy is + defined in the manifest). + The map is empty by default. + :type application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + } + + def __init__(self, *, application_health_policy_map=None, **kwargs) -> None: + super(ApplicationHealthPolicyMapObject, self).__init__(**kwargs) + self.application_health_policy_map = application_health_policy_map diff --git a/customSDK/servicefabric/models/application_health_policy_py3.py b/customSDK/servicefabric/models/application_health_policy_py3.py new file mode 100644 index 00000000..82e2dca9 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_policy_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationHealthPolicy(Model): + """Defines a health policy used to evaluate the health of an application or + one of its children entities. + + :param consider_warning_as_error: Indicates whether warnings are treated + with the same severity as errors. Default value: False . + :type consider_warning_as_error: bool + :param max_percent_unhealthy_deployed_applications: The maximum allowed + percentage of unhealthy deployed applications. Allowed values are Byte + values from zero to 100. + The percentage represents the maximum tolerated percentage of deployed + applications that can be unhealthy before the application is considered in + error. + This is calculated by dividing the number of unhealthy deployed + applications over the number of nodes where the application is currently + deployed on in the cluster. + The computation rounds up to tolerate one failure on small numbers of + nodes. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_deployed_applications: int + :param default_service_type_health_policy: The health policy used by + default to evaluate the health of a service type. + :type default_service_type_health_policy: + ~azure.servicefabric.models.ServiceTypeHealthPolicy + :param service_type_health_policy_map: The map with service type health + policy per service type name. The map is empty by default. + :type service_type_health_policy_map: + list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem] + """ + + _attribute_map = { + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'default_service_type_health_policy': {'key': 'DefaultServiceTypeHealthPolicy', 'type': 'ServiceTypeHealthPolicy'}, + 'service_type_health_policy_map': {'key': 'ServiceTypeHealthPolicyMap', 'type': '[ServiceTypeHealthPolicyMapItem]'}, + } + + def __init__(self, *, consider_warning_as_error: bool=False, max_percent_unhealthy_deployed_applications: int=0, default_service_type_health_policy=None, service_type_health_policy_map=None, **kwargs) -> None: + super(ApplicationHealthPolicy, self).__init__(**kwargs) + self.consider_warning_as_error = consider_warning_as_error + self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications + self.default_service_type_health_policy = default_service_type_health_policy + self.service_type_health_policy_map = service_type_health_policy_map diff --git a/customSDK/servicefabric/models/application_health_py3.py b/customSDK/servicefabric/models/application_health_py3.py new file mode 100644 index 00000000..8606c2e4 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_py3 import EntityHealth + + +class ApplicationHealth(EntityHealth): + """Represents the health of the application. Contains the application + aggregated health state and the service and deployed application health + states. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + :param service_health_states: Service health states as found in the health + store. + :type service_health_states: + list[~azure.servicefabric.models.ServiceHealthState] + :param deployed_application_health_states: Deployed application health + states as found in the health store. + :type deployed_application_health_states: + list[~azure.servicefabric.models.DeployedApplicationHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'service_health_states': {'key': 'ServiceHealthStates', 'type': '[ServiceHealthState]'}, + 'deployed_application_health_states': {'key': 'DeployedApplicationHealthStates', 'type': '[DeployedApplicationHealthState]'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, service_health_states=None, deployed_application_health_states=None, **kwargs) -> None: + super(ApplicationHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.name = name + self.service_health_states = service_health_states + self.deployed_application_health_states = deployed_application_health_states diff --git a/customSDK/servicefabric/models/application_health_report_expired_event.py b/customSDK/servicefabric/models/application_health_report_expired_event.py new file mode 100644 index 00000000..d2771d14 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_report_expired_event.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event import ApplicationEvent + + +class ApplicationHealthReportExpiredEvent(ApplicationEvent): + """Application Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_instance_id: Required. Id of Application instance. + :type application_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthReportExpiredEvent, self).__init__(**kwargs) + self.application_instance_id = kwargs.get('application_instance_id', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'ApplicationHealthReportExpired' diff --git a/customSDK/servicefabric/models/application_health_report_expired_event_py3.py b/customSDK/servicefabric/models/application_health_report_expired_event_py3.py new file mode 100644 index 00000000..f4beb2ce --- /dev/null +++ b/customSDK/servicefabric/models/application_health_report_expired_event_py3.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event_py3 import ApplicationEvent + + +class ApplicationHealthReportExpiredEvent(ApplicationEvent): + """Application Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_instance_id: Required. Id of Application instance. + :type application_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_instance_id = application_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'ApplicationHealthReportExpired' diff --git a/customSDK/servicefabric/models/application_health_state.py b/customSDK/servicefabric/models/application_health_state.py new file mode 100644 index 00000000..ecdb9dcd --- /dev/null +++ b/customSDK/servicefabric/models/application_health_state.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state import EntityHealthState + + +class ApplicationHealthState(EntityHealthState): + """Represents the health state of an application, which contains the + application identifier and the aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthState, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/application_health_state_chunk.py b/customSDK/servicefabric/models/application_health_state_chunk.py new file mode 100644 index 00000000..891a5620 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_state_chunk.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk import EntityHealthStateChunk + + +class ApplicationHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a application. + The application health state chunk contains the application name, its + aggregated health state and any children services and deployed applications + that respect the filters in cluster health chunk query description. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param application_type_name: The application type name as defined in the + application manifest. + :type application_type_name: str + :param service_health_state_chunks: The list of service health state + chunks in the cluster that respect the filters in the cluster health chunk + query description. + :type service_health_state_chunks: + ~azure.servicefabric.models.ServiceHealthStateChunkList + :param deployed_application_health_state_chunks: The list of deployed + application health state chunks in the cluster that respect the filters in + the cluster health chunk query description. + :type deployed_application_health_state_chunks: + ~azure.servicefabric.models.DeployedApplicationHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_health_state_chunks': {'key': 'ServiceHealthStateChunks', 'type': 'ServiceHealthStateChunkList'}, + 'deployed_application_health_state_chunks': {'key': 'DeployedApplicationHealthStateChunks', 'type': 'DeployedApplicationHealthStateChunkList'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthStateChunk, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.application_type_name = kwargs.get('application_type_name', None) + self.service_health_state_chunks = kwargs.get('service_health_state_chunks', None) + self.deployed_application_health_state_chunks = kwargs.get('deployed_application_health_state_chunks', None) diff --git a/customSDK/servicefabric/models/application_health_state_chunk_list.py b/customSDK/servicefabric/models/application_health_state_chunk_list.py new file mode 100644 index 00000000..fdd1c448 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_state_chunk_list.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk_list import EntityHealthStateChunkList + + +class ApplicationHealthStateChunkList(EntityHealthStateChunkList): + """The list of application health state chunks in the cluster that respect the + input filters in the chunk query. Returned by get cluster health state + chunks query. + + :param total_count: Total number of entity health state objects that match + the specified filters from the cluster health chunk query description. + :type total_count: long + :param items: The list of application health state chunks that respect the + input filters in the chunk query. + :type items: list[~azure.servicefabric.models.ApplicationHealthStateChunk] + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'items': {'key': 'Items', 'type': '[ApplicationHealthStateChunk]'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/application_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/application_health_state_chunk_list_py3.py new file mode 100644 index 00000000..dc914190 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_state_chunk_list_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk_list_py3 import EntityHealthStateChunkList + + +class ApplicationHealthStateChunkList(EntityHealthStateChunkList): + """The list of application health state chunks in the cluster that respect the + input filters in the chunk query. Returned by get cluster health state + chunks query. + + :param total_count: Total number of entity health state objects that match + the specified filters from the cluster health chunk query description. + :type total_count: long + :param items: The list of application health state chunks that respect the + input filters in the chunk query. + :type items: list[~azure.servicefabric.models.ApplicationHealthStateChunk] + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'items': {'key': 'Items', 'type': '[ApplicationHealthStateChunk]'}, + } + + def __init__(self, *, total_count: int=None, items=None, **kwargs) -> None: + super(ApplicationHealthStateChunkList, self).__init__(total_count=total_count, **kwargs) + self.items = items diff --git a/customSDK/servicefabric/models/application_health_state_chunk_py3.py b/customSDK/servicefabric/models/application_health_state_chunk_py3.py new file mode 100644 index 00000000..52afcd53 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_state_chunk_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk_py3 import EntityHealthStateChunk + + +class ApplicationHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a application. + The application health state chunk contains the application name, its + aggregated health state and any children services and deployed applications + that respect the filters in cluster health chunk query description. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param application_type_name: The application type name as defined in the + application manifest. + :type application_type_name: str + :param service_health_state_chunks: The list of service health state + chunks in the cluster that respect the filters in the cluster health chunk + query description. + :type service_health_state_chunks: + ~azure.servicefabric.models.ServiceHealthStateChunkList + :param deployed_application_health_state_chunks: The list of deployed + application health state chunks in the cluster that respect the filters in + the cluster health chunk query description. + :type deployed_application_health_state_chunks: + ~azure.servicefabric.models.DeployedApplicationHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_health_state_chunks': {'key': 'ServiceHealthStateChunks', 'type': 'ServiceHealthStateChunkList'}, + 'deployed_application_health_state_chunks': {'key': 'DeployedApplicationHealthStateChunks', 'type': 'DeployedApplicationHealthStateChunkList'}, + } + + def __init__(self, *, health_state=None, application_name: str=None, application_type_name: str=None, service_health_state_chunks=None, deployed_application_health_state_chunks=None, **kwargs) -> None: + super(ApplicationHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.application_name = application_name + self.application_type_name = application_type_name + self.service_health_state_chunks = service_health_state_chunks + self.deployed_application_health_state_chunks = deployed_application_health_state_chunks diff --git a/customSDK/servicefabric/models/application_health_state_filter.py b/customSDK/servicefabric/models/application_health_state_filter.py new file mode 100644 index 00000000..3bc1bfb7 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_state_filter.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationHealthStateFilter(Model): + """Defines matching criteria to determine whether a application should be + included in the cluster health chunk. + One filter can match zero, one or multiple applications, depending on its + properties. + + :param application_name_filter: The name of the application that matches + the filter, as a fabric uri. The filter is applied only to the specified + application, if it exists. + If the application doesn't exist, no application is returned in the + cluster health chunk based on this filter. + If the application exists, it is included in the cluster health chunk if + it respects the other filter properties. + If not specified, all applications are matched against the other filter + members, like health state filter. + :type application_name_filter: str + :param application_type_name_filter: The name of the application type that + matches the filter. + If specified, the filter is applied only to applications of the selected + application type, if any exists. + If no applications of the specified application type exists, no + application is returned in the cluster health chunk based on this filter. + Each application of the specified application type is included in the + cluster health chunk if it respects the other filter properties. + If not specified, all applications are matched against the other filter + members, like health state filter. + :type application_type_name_filter: str + :param health_state_filter: The filter for the health state of the + applications. It allows selecting applications if they match the desired + health states. + The possible values are integer value of one of the following health + states. Only applications that match the filter are returned. All + applications are used to evaluate the cluster aggregated health state. + If not specified, default value is None, unless the application name or + the application type name are specified. If the filter has default value + and application name is specified, the matching application is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches applications with + HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + :param service_filters: Defines a list of filters that specify which + services to be included in the returned cluster health chunk as children + of the application. The services are returned only if the parent + application matches a filter. + If the list is empty, no services are returned. All the services are used + to evaluate the parent application aggregated health state, regardless of + the input filters. + The application filter may specify multiple service filters. + For example, it can specify a filter to return all services with health + state Error and another filter to always include a service identified by + its service name. + :type service_filters: + list[~azure.servicefabric.models.ServiceHealthStateFilter] + :param deployed_application_filters: Defines a list of filters that + specify which deployed applications to be included in the returned cluster + health chunk as children of the application. The deployed applications are + returned only if the parent application matches a filter. + If the list is empty, no deployed applications are returned. All the + deployed applications are used to evaluate the parent application + aggregated health state, regardless of the input filters. + The application filter may specify multiple deployed application filters. + For example, it can specify a filter to return all deployed applications + with health state Error and another filter to always include a deployed + application on a specified node. + :type deployed_application_filters: + list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter] + """ + + _attribute_map = { + 'application_name_filter': {'key': 'ApplicationNameFilter', 'type': 'str'}, + 'application_type_name_filter': {'key': 'ApplicationTypeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'service_filters': {'key': 'ServiceFilters', 'type': '[ServiceHealthStateFilter]'}, + 'deployed_application_filters': {'key': 'DeployedApplicationFilters', 'type': '[DeployedApplicationHealthStateFilter]'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthStateFilter, self).__init__(**kwargs) + self.application_name_filter = kwargs.get('application_name_filter', None) + self.application_type_name_filter = kwargs.get('application_type_name_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) + self.service_filters = kwargs.get('service_filters', None) + self.deployed_application_filters = kwargs.get('deployed_application_filters', None) diff --git a/customSDK/servicefabric/models/application_health_state_filter_py3.py b/customSDK/servicefabric/models/application_health_state_filter_py3.py new file mode 100644 index 00000000..609e9191 --- /dev/null +++ b/customSDK/servicefabric/models/application_health_state_filter_py3.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationHealthStateFilter(Model): + """Defines matching criteria to determine whether a application should be + included in the cluster health chunk. + One filter can match zero, one or multiple applications, depending on its + properties. + + :param application_name_filter: The name of the application that matches + the filter, as a fabric uri. The filter is applied only to the specified + application, if it exists. + If the application doesn't exist, no application is returned in the + cluster health chunk based on this filter. + If the application exists, it is included in the cluster health chunk if + it respects the other filter properties. + If not specified, all applications are matched against the other filter + members, like health state filter. + :type application_name_filter: str + :param application_type_name_filter: The name of the application type that + matches the filter. + If specified, the filter is applied only to applications of the selected + application type, if any exists. + If no applications of the specified application type exists, no + application is returned in the cluster health chunk based on this filter. + Each application of the specified application type is included in the + cluster health chunk if it respects the other filter properties. + If not specified, all applications are matched against the other filter + members, like health state filter. + :type application_type_name_filter: str + :param health_state_filter: The filter for the health state of the + applications. It allows selecting applications if they match the desired + health states. + The possible values are integer value of one of the following health + states. Only applications that match the filter are returned. All + applications are used to evaluate the cluster aggregated health state. + If not specified, default value is None, unless the application name or + the application type name are specified. If the filter has default value + and application name is specified, the matching application is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches applications with + HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + :param service_filters: Defines a list of filters that specify which + services to be included in the returned cluster health chunk as children + of the application. The services are returned only if the parent + application matches a filter. + If the list is empty, no services are returned. All the services are used + to evaluate the parent application aggregated health state, regardless of + the input filters. + The application filter may specify multiple service filters. + For example, it can specify a filter to return all services with health + state Error and another filter to always include a service identified by + its service name. + :type service_filters: + list[~azure.servicefabric.models.ServiceHealthStateFilter] + :param deployed_application_filters: Defines a list of filters that + specify which deployed applications to be included in the returned cluster + health chunk as children of the application. The deployed applications are + returned only if the parent application matches a filter. + If the list is empty, no deployed applications are returned. All the + deployed applications are used to evaluate the parent application + aggregated health state, regardless of the input filters. + The application filter may specify multiple deployed application filters. + For example, it can specify a filter to return all deployed applications + with health state Error and another filter to always include a deployed + application on a specified node. + :type deployed_application_filters: + list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter] + """ + + _attribute_map = { + 'application_name_filter': {'key': 'ApplicationNameFilter', 'type': 'str'}, + 'application_type_name_filter': {'key': 'ApplicationTypeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'service_filters': {'key': 'ServiceFilters', 'type': '[ServiceHealthStateFilter]'}, + 'deployed_application_filters': {'key': 'DeployedApplicationFilters', 'type': '[DeployedApplicationHealthStateFilter]'}, + } + + def __init__(self, *, application_name_filter: str=None, application_type_name_filter: str=None, health_state_filter: int=0, service_filters=None, deployed_application_filters=None, **kwargs) -> None: + super(ApplicationHealthStateFilter, self).__init__(**kwargs) + self.application_name_filter = application_name_filter + self.application_type_name_filter = application_type_name_filter + self.health_state_filter = health_state_filter + self.service_filters = service_filters + self.deployed_application_filters = deployed_application_filters diff --git a/customSDK/servicefabric/models/application_health_state_py3.py b/customSDK/servicefabric/models/application_health_state_py3.py new file mode 100644 index 00000000..88480b6f --- /dev/null +++ b/customSDK/servicefabric/models/application_health_state_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_py3 import EntityHealthState + + +class ApplicationHealthState(EntityHealthState): + """Represents the health state of an application, which contains the + application identifier and the aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, name: str=None, **kwargs) -> None: + super(ApplicationHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.name = name diff --git a/customSDK/servicefabric/models/application_info.py b/customSDK/servicefabric/models/application_info.py new file mode 100644 index 00000000..5d878bcd --- /dev/null +++ b/customSDK/servicefabric/models/application_info.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationInfo(Model): + """Information about a Service Fabric application. + + :param id: The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to + identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type id: str + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + :param type_name: The application type name as defined in the application + manifest. + :type type_name: str + :param type_version: The version of the application type as defined in the + application manifest. + :type type_version: str + :param status: The status of the application. Possible values include: + 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :type status: str or ~azure.servicefabric.models.ApplicationStatus + :param parameters: List of application parameters with overridden values + from their default values specified in the application manifest. + :type parameters: list[~azure.servicefabric.models.ApplicationParameter] + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param application_definition_kind: The mechanism used to define a Service + Fabric application. Possible values include: 'Invalid', + 'ServiceFabricApplicationDescription', 'Compose' + :type application_definition_kind: str or + ~azure.servicefabric.models.ApplicationDefinitionKind + :param managed_application_identity: Managed application identity + description. + :type managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'type_version': {'key': 'TypeVersion', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + } + + def __init__(self, **kwargs): + super(ApplicationInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_name = kwargs.get('type_name', None) + self.type_version = kwargs.get('type_version', None) + self.status = kwargs.get('status', None) + self.parameters = kwargs.get('parameters', None) + self.health_state = kwargs.get('health_state', None) + self.application_definition_kind = kwargs.get('application_definition_kind', None) + self.managed_application_identity = kwargs.get('managed_application_identity', None) diff --git a/customSDK/servicefabric/models/application_info_py3.py b/customSDK/servicefabric/models/application_info_py3.py new file mode 100644 index 00000000..6d107834 --- /dev/null +++ b/customSDK/servicefabric/models/application_info_py3.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationInfo(Model): + """Information about a Service Fabric application. + + :param id: The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to + identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type id: str + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + :param type_name: The application type name as defined in the application + manifest. + :type type_name: str + :param type_version: The version of the application type as defined in the + application manifest. + :type type_version: str + :param status: The status of the application. Possible values include: + 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :type status: str or ~azure.servicefabric.models.ApplicationStatus + :param parameters: List of application parameters with overridden values + from their default values specified in the application manifest. + :type parameters: list[~azure.servicefabric.models.ApplicationParameter] + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param application_definition_kind: The mechanism used to define a Service + Fabric application. Possible values include: 'Invalid', + 'ServiceFabricApplicationDescription', 'Compose' + :type application_definition_kind: str or + ~azure.servicefabric.models.ApplicationDefinitionKind + :param managed_application_identity: Managed application identity + description. + :type managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'type_version': {'key': 'TypeVersion', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + } + + def __init__(self, *, id: str=None, name: str=None, type_name: str=None, type_version: str=None, status=None, parameters=None, health_state=None, application_definition_kind=None, managed_application_identity=None, **kwargs) -> None: + super(ApplicationInfo, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_name = type_name + self.type_version = type_version + self.status = status + self.parameters = parameters + self.health_state = health_state + self.application_definition_kind = application_definition_kind + self.managed_application_identity = managed_application_identity diff --git a/customSDK/servicefabric/models/application_load_info.py b/customSDK/servicefabric/models/application_load_info.py new file mode 100644 index 00000000..1df604c4 --- /dev/null +++ b/customSDK/servicefabric/models/application_load_info.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationLoadInfo(Model): + """Load Information about a Service Fabric application. + + :param id: The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to + identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type id: str + :param minimum_nodes: The minimum number of nodes for this application. + It is the number of nodes where Service Fabric will reserve Capacity in + the cluster which equals to ReservedLoad * MinimumNodes for this + Application instance. + For applications that do not have application capacity defined this value + will be zero. + :type minimum_nodes: long + :param maximum_nodes: The maximum number of nodes where this application + can be instantiated. + It is the number of nodes this application is allowed to span. + For applications that do not have application capacity defined this value + will be zero. + :type maximum_nodes: long + :param node_count: The number of nodes on which this application is + instantiated. + For applications that do not have application capacity defined this value + will be zero. + :type node_count: long + :param application_load_metric_information: List of application load + metric information. + :type application_load_metric_information: + list[~azure.servicefabric.models.ApplicationLoadMetricInformation] + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'node_count': {'key': 'NodeCount', 'type': 'long'}, + 'application_load_metric_information': {'key': 'ApplicationLoadMetricInformation', 'type': '[ApplicationLoadMetricInformation]'}, + } + + def __init__(self, **kwargs): + super(ApplicationLoadInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.minimum_nodes = kwargs.get('minimum_nodes', None) + self.maximum_nodes = kwargs.get('maximum_nodes', None) + self.node_count = kwargs.get('node_count', None) + self.application_load_metric_information = kwargs.get('application_load_metric_information', None) diff --git a/customSDK/servicefabric/models/application_load_info_py3.py b/customSDK/servicefabric/models/application_load_info_py3.py new file mode 100644 index 00000000..25d008d9 --- /dev/null +++ b/customSDK/servicefabric/models/application_load_info_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationLoadInfo(Model): + """Load Information about a Service Fabric application. + + :param id: The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to + identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type id: str + :param minimum_nodes: The minimum number of nodes for this application. + It is the number of nodes where Service Fabric will reserve Capacity in + the cluster which equals to ReservedLoad * MinimumNodes for this + Application instance. + For applications that do not have application capacity defined this value + will be zero. + :type minimum_nodes: long + :param maximum_nodes: The maximum number of nodes where this application + can be instantiated. + It is the number of nodes this application is allowed to span. + For applications that do not have application capacity defined this value + will be zero. + :type maximum_nodes: long + :param node_count: The number of nodes on which this application is + instantiated. + For applications that do not have application capacity defined this value + will be zero. + :type node_count: long + :param application_load_metric_information: List of application load + metric information. + :type application_load_metric_information: + list[~azure.servicefabric.models.ApplicationLoadMetricInformation] + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'node_count': {'key': 'NodeCount', 'type': 'long'}, + 'application_load_metric_information': {'key': 'ApplicationLoadMetricInformation', 'type': '[ApplicationLoadMetricInformation]'}, + } + + def __init__(self, *, id: str=None, minimum_nodes: int=None, maximum_nodes: int=None, node_count: int=None, application_load_metric_information=None, **kwargs) -> None: + super(ApplicationLoadInfo, self).__init__(**kwargs) + self.id = id + self.minimum_nodes = minimum_nodes + self.maximum_nodes = maximum_nodes + self.node_count = node_count + self.application_load_metric_information = application_load_metric_information diff --git a/customSDK/servicefabric/models/application_load_metric_information.py b/customSDK/servicefabric/models/application_load_metric_information.py new file mode 100644 index 00000000..4ddf4b2e --- /dev/null +++ b/customSDK/servicefabric/models/application_load_metric_information.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationLoadMetricInformation(Model): + """Describes load information for a custom resource balancing metric. This can + be used to limit the total consumption of this metric by the services of + this application. + + :param name: The name of the metric. + :type name: str + :param reservation_capacity: This is the capacity reserved in the cluster + for the application. + It's the product of NodeReservationCapacity and MinimumNodes. + If set to zero, no capacity is reserved for this metric. + When setting application capacity or when updating application capacity + this value must be smaller than or equal to MaximumCapacity for each + metric. + :type reservation_capacity: long + :param application_capacity: Total capacity for this metric in this + application instance. + :type application_capacity: long + :param application_load: Current load for this metric in this application + instance. + :type application_load: long + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, + 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'long'}, + 'application_load': {'key': 'ApplicationLoad', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(ApplicationLoadMetricInformation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.reservation_capacity = kwargs.get('reservation_capacity', None) + self.application_capacity = kwargs.get('application_capacity', None) + self.application_load = kwargs.get('application_load', None) diff --git a/customSDK/servicefabric/models/application_load_metric_information_py3.py b/customSDK/servicefabric/models/application_load_metric_information_py3.py new file mode 100644 index 00000000..3214985e --- /dev/null +++ b/customSDK/servicefabric/models/application_load_metric_information_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationLoadMetricInformation(Model): + """Describes load information for a custom resource balancing metric. This can + be used to limit the total consumption of this metric by the services of + this application. + + :param name: The name of the metric. + :type name: str + :param reservation_capacity: This is the capacity reserved in the cluster + for the application. + It's the product of NodeReservationCapacity and MinimumNodes. + If set to zero, no capacity is reserved for this metric. + When setting application capacity or when updating application capacity + this value must be smaller than or equal to MaximumCapacity for each + metric. + :type reservation_capacity: long + :param application_capacity: Total capacity for this metric in this + application instance. + :type application_capacity: long + :param application_load: Current load for this metric in this application + instance. + :type application_load: long + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, + 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'long'}, + 'application_load': {'key': 'ApplicationLoad', 'type': 'long'}, + } + + def __init__(self, *, name: str=None, reservation_capacity: int=None, application_capacity: int=None, application_load: int=None, **kwargs) -> None: + super(ApplicationLoadMetricInformation, self).__init__(**kwargs) + self.name = name + self.reservation_capacity = reservation_capacity + self.application_capacity = application_capacity + self.application_load = application_load diff --git a/customSDK/servicefabric/models/application_metric_description.py b/customSDK/servicefabric/models/application_metric_description.py new file mode 100644 index 00000000..314e4829 --- /dev/null +++ b/customSDK/servicefabric/models/application_metric_description.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationMetricDescription(Model): + """Describes capacity information for a custom resource balancing metric. This + can be used to limit the total consumption of this metric by the services + of this application. + + :param name: The name of the metric. + :type name: str + :param maximum_capacity: The maximum node capacity for Service Fabric + application. + This is the maximum Load for an instance of this application on a single + node. Even if the capacity of node is greater than this value, Service + Fabric will limit the total load of services within the application on + each node to this value. + If set to zero, capacity for this metric is unlimited on each node. + When creating a new application with application capacity defined, the + product of MaximumNodes and this value must always be smaller than or + equal to TotalApplicationCapacity. + When updating existing application with application capacity, the product + of MaximumNodes and this value must always be smaller than or equal to + TotalApplicationCapacity. + :type maximum_capacity: long + :param reservation_capacity: The node reservation capacity for Service + Fabric application. + This is the amount of load which is reserved on nodes which have instances + of this application. + If MinimumNodes is specified, then the product of these values will be the + capacity reserved in the cluster for the application. + If set to zero, no capacity is reserved for this metric. + When setting application capacity or when updating application capacity; + this value must be smaller than or equal to MaximumCapacity for each + metric. + :type reservation_capacity: long + :param total_application_capacity: The total metric capacity for Service + Fabric application. + This is the total metric capacity for this application in the cluster. + Service Fabric will try to limit the sum of loads of services within the + application to this value. + When creating a new application with application capacity defined, the + product of MaximumNodes and MaximumCapacity must always be smaller than or + equal to this value. + :type total_application_capacity: long + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'maximum_capacity': {'key': 'MaximumCapacity', 'type': 'long'}, + 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, + 'total_application_capacity': {'key': 'TotalApplicationCapacity', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(ApplicationMetricDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.maximum_capacity = kwargs.get('maximum_capacity', None) + self.reservation_capacity = kwargs.get('reservation_capacity', None) + self.total_application_capacity = kwargs.get('total_application_capacity', None) diff --git a/customSDK/servicefabric/models/application_metric_description_py3.py b/customSDK/servicefabric/models/application_metric_description_py3.py new file mode 100644 index 00000000..eb1b1034 --- /dev/null +++ b/customSDK/servicefabric/models/application_metric_description_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationMetricDescription(Model): + """Describes capacity information for a custom resource balancing metric. This + can be used to limit the total consumption of this metric by the services + of this application. + + :param name: The name of the metric. + :type name: str + :param maximum_capacity: The maximum node capacity for Service Fabric + application. + This is the maximum Load for an instance of this application on a single + node. Even if the capacity of node is greater than this value, Service + Fabric will limit the total load of services within the application on + each node to this value. + If set to zero, capacity for this metric is unlimited on each node. + When creating a new application with application capacity defined, the + product of MaximumNodes and this value must always be smaller than or + equal to TotalApplicationCapacity. + When updating existing application with application capacity, the product + of MaximumNodes and this value must always be smaller than or equal to + TotalApplicationCapacity. + :type maximum_capacity: long + :param reservation_capacity: The node reservation capacity for Service + Fabric application. + This is the amount of load which is reserved on nodes which have instances + of this application. + If MinimumNodes is specified, then the product of these values will be the + capacity reserved in the cluster for the application. + If set to zero, no capacity is reserved for this metric. + When setting application capacity or when updating application capacity; + this value must be smaller than or equal to MaximumCapacity for each + metric. + :type reservation_capacity: long + :param total_application_capacity: The total metric capacity for Service + Fabric application. + This is the total metric capacity for this application in the cluster. + Service Fabric will try to limit the sum of loads of services within the + application to this value. + When creating a new application with application capacity defined, the + product of MaximumNodes and MaximumCapacity must always be smaller than or + equal to this value. + :type total_application_capacity: long + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'maximum_capacity': {'key': 'MaximumCapacity', 'type': 'long'}, + 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, + 'total_application_capacity': {'key': 'TotalApplicationCapacity', 'type': 'long'}, + } + + def __init__(self, *, name: str=None, maximum_capacity: int=None, reservation_capacity: int=None, total_application_capacity: int=None, **kwargs) -> None: + super(ApplicationMetricDescription, self).__init__(**kwargs) + self.name = name + self.maximum_capacity = maximum_capacity + self.reservation_capacity = reservation_capacity + self.total_application_capacity = total_application_capacity diff --git a/customSDK/servicefabric/models/application_name_info.py b/customSDK/servicefabric/models/application_name_info.py new file mode 100644 index 00000000..072f51f7 --- /dev/null +++ b/customSDK/servicefabric/models/application_name_info.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationNameInfo(Model): + """Information about the application name. + + :param id: The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to + identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type id: str + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationNameInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/application_name_info_py3.py b/customSDK/servicefabric/models/application_name_info_py3.py new file mode 100644 index 00000000..c259456f --- /dev/null +++ b/customSDK/servicefabric/models/application_name_info_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationNameInfo(Model): + """Information about the application name. + + :param id: The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to + identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type id: str + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(ApplicationNameInfo, self).__init__(**kwargs) + self.id = id + self.name = name diff --git a/customSDK/servicefabric/models/application_new_health_report_event.py b/customSDK/servicefabric/models/application_new_health_report_event.py new file mode 100644 index 00000000..e45d2b4f --- /dev/null +++ b/customSDK/servicefabric/models/application_new_health_report_event.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event import ApplicationEvent + + +class ApplicationNewHealthReportEvent(ApplicationEvent): + """Application Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_instance_id: Required. Id of Application instance. + :type application_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ApplicationNewHealthReportEvent, self).__init__(**kwargs) + self.application_instance_id = kwargs.get('application_instance_id', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'ApplicationNewHealthReport' diff --git a/customSDK/servicefabric/models/application_new_health_report_event_py3.py b/customSDK/servicefabric/models/application_new_health_report_event_py3.py new file mode 100644 index 00000000..912b7d4f --- /dev/null +++ b/customSDK/servicefabric/models/application_new_health_report_event_py3.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event_py3 import ApplicationEvent + + +class ApplicationNewHealthReportEvent(ApplicationEvent): + """Application Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_instance_id: Required. Id of Application instance. + :type application_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_instance_id = application_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'ApplicationNewHealthReport' diff --git a/customSDK/servicefabric/models/application_parameter.py b/customSDK/servicefabric/models/application_parameter.py new file mode 100644 index 00000000..602c2e65 --- /dev/null +++ b/customSDK/servicefabric/models/application_parameter.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationParameter(Model): + """Describes an application parameter override to be applied when creating or + upgrading an application. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The name of the parameter. + :type key: str + :param value: Required. The value of the parameter. + :type value: str + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationParameter, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/application_parameter_py3.py b/customSDK/servicefabric/models/application_parameter_py3.py new file mode 100644 index 00000000..d6d910df --- /dev/null +++ b/customSDK/servicefabric/models/application_parameter_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationParameter(Model): + """Describes an application parameter override to be applied when creating or + upgrading an application. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The name of the parameter. + :type key: str + :param value: Required. The value of the parameter. + :type value: str + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + } + + def __init__(self, *, key: str, value: str, **kwargs) -> None: + super(ApplicationParameter, self).__init__(**kwargs) + self.key = key + self.value = value diff --git a/customSDK/servicefabric/models/application_process_exited_event.py b/customSDK/servicefabric/models/application_process_exited_event.py new file mode 100644 index 00000000..56578ff3 --- /dev/null +++ b/customSDK/servicefabric/models/application_process_exited_event.py @@ -0,0 +1,122 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event import ApplicationEvent + + +class ApplicationProcessExitedEvent(ApplicationEvent): + """Process Exited event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param service_name: Required. Name of Service. + :type service_name: str + :param service_package_name: Required. Name of Service package. + :type service_package_name: str + :param service_package_activation_id: Required. Activation Id of Service + package. + :type service_package_activation_id: str + :param is_exclusive: Required. Indicates IsExclusive flag. + :type is_exclusive: bool + :param code_package_name: Required. Name of Code package. + :type code_package_name: str + :param entry_point_type: Required. Type of EntryPoint. + :type entry_point_type: str + :param exe_name: Required. Name of executable. + :type exe_name: str + :param process_id: Required. Process Id. + :type process_id: long + :param host_id: Required. Host Id. + :type host_id: str + :param exit_code: Required. Exit code of process. + :type exit_code: long + :param unexpected_termination: Required. Indicates if termination is + unexpected. + :type unexpected_termination: bool + :param start_time: Required. Start time of process. + :type start_time: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'service_name': {'required': True}, + 'service_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'is_exclusive': {'required': True}, + 'code_package_name': {'required': True}, + 'entry_point_type': {'required': True}, + 'exe_name': {'required': True}, + 'process_id': {'required': True}, + 'host_id': {'required': True}, + 'exit_code': {'required': True}, + 'unexpected_termination': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, + 'exe_name': {'key': 'ExeName', 'type': 'str'}, + 'process_id': {'key': 'ProcessId', 'type': 'long'}, + 'host_id': {'key': 'HostId', 'type': 'str'}, + 'exit_code': {'key': 'ExitCode', 'type': 'long'}, + 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ApplicationProcessExitedEvent, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.service_package_name = kwargs.get('service_package_name', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.is_exclusive = kwargs.get('is_exclusive', None) + self.code_package_name = kwargs.get('code_package_name', None) + self.entry_point_type = kwargs.get('entry_point_type', None) + self.exe_name = kwargs.get('exe_name', None) + self.process_id = kwargs.get('process_id', None) + self.host_id = kwargs.get('host_id', None) + self.exit_code = kwargs.get('exit_code', None) + self.unexpected_termination = kwargs.get('unexpected_termination', None) + self.start_time = kwargs.get('start_time', None) + self.kind = 'ApplicationProcessExited' diff --git a/customSDK/servicefabric/models/application_process_exited_event_py3.py b/customSDK/servicefabric/models/application_process_exited_event_py3.py new file mode 100644 index 00000000..26e7215f --- /dev/null +++ b/customSDK/servicefabric/models/application_process_exited_event_py3.py @@ -0,0 +1,122 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event_py3 import ApplicationEvent + + +class ApplicationProcessExitedEvent(ApplicationEvent): + """Process Exited event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param service_name: Required. Name of Service. + :type service_name: str + :param service_package_name: Required. Name of Service package. + :type service_package_name: str + :param service_package_activation_id: Required. Activation Id of Service + package. + :type service_package_activation_id: str + :param is_exclusive: Required. Indicates IsExclusive flag. + :type is_exclusive: bool + :param code_package_name: Required. Name of Code package. + :type code_package_name: str + :param entry_point_type: Required. Type of EntryPoint. + :type entry_point_type: str + :param exe_name: Required. Name of executable. + :type exe_name: str + :param process_id: Required. Process Id. + :type process_id: long + :param host_id: Required. Host Id. + :type host_id: str + :param exit_code: Required. Exit code of process. + :type exit_code: long + :param unexpected_termination: Required. Indicates if termination is + unexpected. + :type unexpected_termination: bool + :param start_time: Required. Start time of process. + :type start_time: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'service_name': {'required': True}, + 'service_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'is_exclusive': {'required': True}, + 'code_package_name': {'required': True}, + 'entry_point_type': {'required': True}, + 'exe_name': {'required': True}, + 'process_id': {'required': True}, + 'host_id': {'required': True}, + 'exit_code': {'required': True}, + 'unexpected_termination': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, + 'exe_name': {'key': 'ExeName', 'type': 'str'}, + 'process_id': {'key': 'ProcessId', 'type': 'long'}, + 'host_id': {'key': 'HostId', 'type': 'str'}, + 'exit_code': {'key': 'ExitCode', 'type': 'long'}, + 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_name: str, service_package_name: str, service_package_activation_id: str, is_exclusive: bool, code_package_name: str, entry_point_type: str, exe_name: str, process_id: int, host_id: str, exit_code: int, unexpected_termination: bool, start_time, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationProcessExitedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.service_name = service_name + self.service_package_name = service_package_name + self.service_package_activation_id = service_package_activation_id + self.is_exclusive = is_exclusive + self.code_package_name = code_package_name + self.entry_point_type = entry_point_type + self.exe_name = exe_name + self.process_id = process_id + self.host_id = host_id + self.exit_code = exit_code + self.unexpected_termination = unexpected_termination + self.start_time = start_time + self.kind = 'ApplicationProcessExited' diff --git a/customSDK/servicefabric/models/application_resource_description.py b/customSDK/servicefabric/models/application_resource_description.py new file mode 100644 index 00000000..c2d82acb --- /dev/null +++ b/customSDK/servicefabric/models/application_resource_description.py @@ -0,0 +1,93 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationResourceDescription(Model): + """This type describes a application resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Application resource. + :type name: str + :param description: User readable description of the application. + :type description: str + :param services: Describes the services in the application. This property + is used to create or modify services of the application. On get only the + name of the service is returned. The service description can be obtained + by querying for the service resource. + :type services: + list[~azure.servicefabric.models.ServiceResourceDescription] + :param diagnostics: Describes the diagnostics definition and usage for an + application resource. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsDescription + :param debug_params: Internal - used by Visual Studio to setup the + debugging session on the local development environment. + :type debug_params: str + :ivar service_names: Names of the services in the application. + :vartype service_names: list[str] + :ivar status: Status of the application. Possible values include: + 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the application. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the application's health state is not + 'Ok', this additional details from service fabric Health Manager for the + user to know why the application is marked unhealthy. + :vartype unhealthy_evaluation: str + :param identity: Describes the identity of the application. + :type identity: ~azure.servicefabric.models.IdentityDescription + """ + + _validation = { + 'name': {'required': True}, + 'service_names': {'readonly': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, + 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, + 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityDescription'}, + } + + def __init__(self, **kwargs): + super(ApplicationResourceDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.services = kwargs.get('services', None) + self.diagnostics = kwargs.get('diagnostics', None) + self.debug_params = kwargs.get('debug_params', None) + self.service_names = None + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity = kwargs.get('identity', None) diff --git a/customSDK/servicefabric/models/application_resource_description_py3.py b/customSDK/servicefabric/models/application_resource_description_py3.py new file mode 100644 index 00000000..5ff296a3 --- /dev/null +++ b/customSDK/servicefabric/models/application_resource_description_py3.py @@ -0,0 +1,93 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationResourceDescription(Model): + """This type describes a application resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Application resource. + :type name: str + :param description: User readable description of the application. + :type description: str + :param services: Describes the services in the application. This property + is used to create or modify services of the application. On get only the + name of the service is returned. The service description can be obtained + by querying for the service resource. + :type services: + list[~azure.servicefabric.models.ServiceResourceDescription] + :param diagnostics: Describes the diagnostics definition and usage for an + application resource. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsDescription + :param debug_params: Internal - used by Visual Studio to setup the + debugging session on the local development environment. + :type debug_params: str + :ivar service_names: Names of the services in the application. + :vartype service_names: list[str] + :ivar status: Status of the application. Possible values include: + 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the application. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the application's health state is not + 'Ok', this additional details from service fabric Health Manager for the + user to know why the application is marked unhealthy. + :vartype unhealthy_evaluation: str + :param identity: Describes the identity of the application. + :type identity: ~azure.servicefabric.models.IdentityDescription + """ + + _validation = { + 'name': {'required': True}, + 'service_names': {'readonly': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, + 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, + 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityDescription'}, + } + + def __init__(self, *, name: str, description: str=None, services=None, diagnostics=None, debug_params: str=None, identity=None, **kwargs) -> None: + super(ApplicationResourceDescription, self).__init__(**kwargs) + self.name = name + self.description = description + self.services = services + self.diagnostics = diagnostics + self.debug_params = debug_params + self.service_names = None + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity = identity diff --git a/customSDK/servicefabric/models/application_resource_upgrade_progress_info.py b/customSDK/servicefabric/models/application_resource_upgrade_progress_info.py new file mode 100644 index 00000000..53782922 --- /dev/null +++ b/customSDK/servicefabric/models/application_resource_upgrade_progress_info.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationResourceUpgradeProgressInfo(Model): + """This type describes an application resource upgrade. + + :param name: Name of the Application resource. + :type name: str + :param target_application_type_version: The target application version for + the application upgrade. + :type target_application_type_version: str + :param start_timestamp_utc: The estimated UTC datetime when the upgrade + started. + :type start_timestamp_utc: str + :param upgrade_state: The state of the application resource upgrade. + Possible values include: 'Invalid', 'ProvisioningTarget', + 'RollingForward', 'UnprovisioningCurrent', 'CompletedRollforward', + 'RollingBack', 'UnprovisioningTarget', 'CompletedRollback', 'Failed' + :type upgrade_state: str or + ~azure.servicefabric.models.ApplicationResourceUpgradeState + :param percent_completed: The estimated percent of replicas are completed + in the upgrade. + :type percent_completed: str + :param service_upgrade_progress: List of service upgrade progresses. + :type service_upgrade_progress: + list[~azure.servicefabric.models.ServiceUpgradeProgress] + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "Monitored" . + :type rolling_upgrade_mode: str or + ~azure.servicefabric.models.RollingUpgradeMode + :param upgrade_duration: The estimated amount of time that the overall + upgrade elapsed. It is first interpreted as a string representing an ISO + 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. Default value: "PT0H2M0S" . + :type upgrade_duration: str + :param application_upgrade_status_details: Additional detailed information + about the status of the pending upgrade. + :type application_upgrade_status_details: str + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). Default value: 42949672925 . + :type upgrade_replica_set_check_timeout_in_seconds: long + :param failure_timestamp_utc: The estimated UTC datetime when the upgrade + failed and FailureAction was executed. + :type failure_timestamp_utc: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'percent_completed': {'key': 'PercentCompleted', 'type': 'str'}, + 'service_upgrade_progress': {'key': 'ServiceUpgradeProgress', 'type': '[ServiceUpgradeProgress]'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationResourceUpgradeProgressInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.target_application_type_version = kwargs.get('target_application_type_version', None) + self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.percent_completed = kwargs.get('percent_completed', None) + self.service_upgrade_progress = kwargs.get('service_upgrade_progress', None) + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "Monitored") + self.upgrade_duration = kwargs.get('upgrade_duration', "PT0H2M0S") + self.application_upgrade_status_details = kwargs.get('application_upgrade_status_details', None) + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925) + self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) diff --git a/customSDK/servicefabric/models/application_resource_upgrade_progress_info_py3.py b/customSDK/servicefabric/models/application_resource_upgrade_progress_info_py3.py new file mode 100644 index 00000000..8741db87 --- /dev/null +++ b/customSDK/servicefabric/models/application_resource_upgrade_progress_info_py3.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationResourceUpgradeProgressInfo(Model): + """This type describes an application resource upgrade. + + :param name: Name of the Application resource. + :type name: str + :param target_application_type_version: The target application version for + the application upgrade. + :type target_application_type_version: str + :param start_timestamp_utc: The estimated UTC datetime when the upgrade + started. + :type start_timestamp_utc: str + :param upgrade_state: The state of the application resource upgrade. + Possible values include: 'Invalid', 'ProvisioningTarget', + 'RollingForward', 'UnprovisioningCurrent', 'CompletedRollforward', + 'RollingBack', 'UnprovisioningTarget', 'CompletedRollback', 'Failed' + :type upgrade_state: str or + ~azure.servicefabric.models.ApplicationResourceUpgradeState + :param percent_completed: The estimated percent of replicas are completed + in the upgrade. + :type percent_completed: str + :param service_upgrade_progress: List of service upgrade progresses. + :type service_upgrade_progress: + list[~azure.servicefabric.models.ServiceUpgradeProgress] + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "Monitored" . + :type rolling_upgrade_mode: str or + ~azure.servicefabric.models.RollingUpgradeMode + :param upgrade_duration: The estimated amount of time that the overall + upgrade elapsed. It is first interpreted as a string representing an ISO + 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. Default value: "PT0H2M0S" . + :type upgrade_duration: str + :param application_upgrade_status_details: Additional detailed information + about the status of the pending upgrade. + :type application_upgrade_status_details: str + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). Default value: 42949672925 . + :type upgrade_replica_set_check_timeout_in_seconds: long + :param failure_timestamp_utc: The estimated UTC datetime when the upgrade + failed and FailureAction was executed. + :type failure_timestamp_utc: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'percent_completed': {'key': 'PercentCompleted', 'type': 'str'}, + 'service_upgrade_progress': {'key': 'ServiceUpgradeProgress', 'type': '[ServiceUpgradeProgress]'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, target_application_type_version: str=None, start_timestamp_utc: str=None, upgrade_state=None, percent_completed: str=None, service_upgrade_progress=None, rolling_upgrade_mode="Monitored", upgrade_duration: str="PT0H2M0S", application_upgrade_status_details: str=None, upgrade_replica_set_check_timeout_in_seconds: int=42949672925, failure_timestamp_utc: str=None, **kwargs) -> None: + super(ApplicationResourceUpgradeProgressInfo, self).__init__(**kwargs) + self.name = name + self.target_application_type_version = target_application_type_version + self.start_timestamp_utc = start_timestamp_utc + self.upgrade_state = upgrade_state + self.percent_completed = percent_completed + self.service_upgrade_progress = service_upgrade_progress + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_duration = upgrade_duration + self.application_upgrade_status_details = application_upgrade_status_details + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.failure_timestamp_utc = failure_timestamp_utc diff --git a/customSDK/servicefabric/models/application_scoped_volume.py b/customSDK/servicefabric/models/application_scoped_volume.py new file mode 100644 index 00000000..267c4a06 --- /dev/null +++ b/customSDK/servicefabric/models/application_scoped_volume.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .volume_reference import VolumeReference + + +class ApplicationScopedVolume(VolumeReference): + """Describes a volume whose lifetime is scoped to the application's lifetime. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the volume being referenced. + :type name: str + :param read_only: The flag indicating whether the volume is read only. + Default is 'false'. + :type read_only: bool + :param destination_path: Required. The path within the container at which + the volume should be mounted. Only valid path characters are allowed. + :type destination_path: str + :param creation_parameters: Required. Describes parameters for creating + application-scoped volumes. + :type creation_parameters: + ~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters + """ + + _validation = { + 'name': {'required': True}, + 'destination_path': {'required': True}, + 'creation_parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'destination_path': {'key': 'destinationPath', 'type': 'str'}, + 'creation_parameters': {'key': 'creationParameters', 'type': 'ApplicationScopedVolumeCreationParameters'}, + } + + def __init__(self, **kwargs): + super(ApplicationScopedVolume, self).__init__(**kwargs) + self.creation_parameters = kwargs.get('creation_parameters', None) diff --git a/customSDK/servicefabric/models/application_scoped_volume_creation_parameters.py b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters.py new file mode 100644 index 00000000..b55aeb7b --- /dev/null +++ b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationScopedVolumeCreationParameters(Model): + """Describes parameters for creating application-scoped volumes. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: + ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk + + All required parameters must be populated in order to send to Azure. + + :param description: User readable description of the volume. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ServiceFabricVolumeDisk': 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk'} + } + + def __init__(self, **kwargs): + super(ApplicationScopedVolumeCreationParameters, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.kind = None diff --git a/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_py3.py b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_py3.py new file mode 100644 index 00000000..27c8018f --- /dev/null +++ b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationScopedVolumeCreationParameters(Model): + """Describes parameters for creating application-scoped volumes. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: + ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk + + All required parameters must be populated in order to send to Azure. + + :param description: User readable description of the volume. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ServiceFabricVolumeDisk': 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk'} + } + + def __init__(self, *, description: str=None, **kwargs) -> None: + super(ApplicationScopedVolumeCreationParameters, self).__init__(**kwargs) + self.description = description + self.kind = None diff --git a/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk.py b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk.py new file mode 100644 index 00000000..945d283d --- /dev/null +++ b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_scoped_volume_creation_parameters import ApplicationScopedVolumeCreationParameters + + +class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk(ApplicationScopedVolumeCreationParameters): + """Describes parameters for creating application-scoped volumes provided by + Service Fabric Volume Disks. + + All required parameters must be populated in order to send to Azure. + + :param description: User readable description of the volume. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param size_disk: Required. Volume size. Possible values include: 'Small', + 'Medium', 'Large' + :type size_disk: str or ~azure.servicefabric.models.SizeTypes + """ + + _validation = { + 'kind': {'required': True}, + 'size_disk': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'size_disk': {'key': 'sizeDisk', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__(**kwargs) + self.size_disk = kwargs.get('size_disk', None) + self.kind = 'ServiceFabricVolumeDisk' diff --git a/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk_py3.py b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk_py3.py new file mode 100644 index 00000000..279e0361 --- /dev/null +++ b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_scoped_volume_creation_parameters_py3 import ApplicationScopedVolumeCreationParameters + + +class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk(ApplicationScopedVolumeCreationParameters): + """Describes parameters for creating application-scoped volumes provided by + Service Fabric Volume Disks. + + All required parameters must be populated in order to send to Azure. + + :param description: User readable description of the volume. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param size_disk: Required. Volume size. Possible values include: 'Small', + 'Medium', 'Large' + :type size_disk: str or ~azure.servicefabric.models.SizeTypes + """ + + _validation = { + 'kind': {'required': True}, + 'size_disk': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'size_disk': {'key': 'sizeDisk', 'type': 'str'}, + } + + def __init__(self, *, size_disk, description: str=None, **kwargs) -> None: + super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__(description=description, **kwargs) + self.size_disk = size_disk + self.kind = 'ServiceFabricVolumeDisk' diff --git a/customSDK/servicefabric/models/application_scoped_volume_py3.py b/customSDK/servicefabric/models/application_scoped_volume_py3.py new file mode 100644 index 00000000..0c07eaf0 --- /dev/null +++ b/customSDK/servicefabric/models/application_scoped_volume_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .volume_reference_py3 import VolumeReference + + +class ApplicationScopedVolume(VolumeReference): + """Describes a volume whose lifetime is scoped to the application's lifetime. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the volume being referenced. + :type name: str + :param read_only: The flag indicating whether the volume is read only. + Default is 'false'. + :type read_only: bool + :param destination_path: Required. The path within the container at which + the volume should be mounted. Only valid path characters are allowed. + :type destination_path: str + :param creation_parameters: Required. Describes parameters for creating + application-scoped volumes. + :type creation_parameters: + ~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters + """ + + _validation = { + 'name': {'required': True}, + 'destination_path': {'required': True}, + 'creation_parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'destination_path': {'key': 'destinationPath', 'type': 'str'}, + 'creation_parameters': {'key': 'creationParameters', 'type': 'ApplicationScopedVolumeCreationParameters'}, + } + + def __init__(self, *, name: str, destination_path: str, creation_parameters, read_only: bool=None, **kwargs) -> None: + super(ApplicationScopedVolume, self).__init__(name=name, read_only=read_only, destination_path=destination_path, **kwargs) + self.creation_parameters = creation_parameters diff --git a/customSDK/servicefabric/models/application_type_applications_health_evaluation.py b/customSDK/servicefabric/models/application_type_applications_health_evaluation.py new file mode 100644 index 00000000..7d2f5d26 --- /dev/null +++ b/customSDK/servicefabric/models/application_type_applications_health_evaluation.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for applications of a particular application + type. The application type applications evaluation can be returned when + cluster health evaluation returns unhealthy aggregated health state, either + Error or Warning. It contains health evaluations for each unhealthy + application of the included application type that impacted current + aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param application_type_name: The application type name as defined in the + application manifest. + :type application_type_name: str + :param max_percent_unhealthy_applications: Maximum allowed percentage of + unhealthy applications for the application type, specified as an entry in + ApplicationTypeHealthPolicyMap. + :type max_percent_unhealthy_applications: int + :param total_count: Total number of applications of the application type + found in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + ApplicationHealthEvaluation of this application type that impacted the + aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(ApplicationTypeApplicationsHealthEvaluation, self).__init__(**kwargs) + self.application_type_name = kwargs.get('application_type_name', None) + self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'ApplicationTypeApplications' diff --git a/customSDK/servicefabric/models/application_type_applications_health_evaluation_py3.py b/customSDK/servicefabric/models/application_type_applications_health_evaluation_py3.py new file mode 100644 index 00000000..44ff4575 --- /dev/null +++ b/customSDK/servicefabric/models/application_type_applications_health_evaluation_py3.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for applications of a particular application + type. The application type applications evaluation can be returned when + cluster health evaluation returns unhealthy aggregated health state, either + Error or Warning. It contains health evaluations for each unhealthy + application of the included application type that impacted current + aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param application_type_name: The application type name as defined in the + application manifest. + :type application_type_name: str + :param max_percent_unhealthy_applications: Maximum allowed percentage of + unhealthy applications for the application type, specified as an entry in + ApplicationTypeHealthPolicyMap. + :type max_percent_unhealthy_applications: int + :param total_count: Total number of applications of the application type + found in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + ApplicationHealthEvaluation of this application type that impacted the + aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, application_type_name: str=None, max_percent_unhealthy_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(ApplicationTypeApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.application_type_name = application_type_name + self.max_percent_unhealthy_applications = max_percent_unhealthy_applications + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'ApplicationTypeApplications' diff --git a/customSDK/servicefabric/models/application_type_health_policy_map_item.py b/customSDK/servicefabric/models/application_type_health_policy_map_item.py new file mode 100644 index 00000000..29b8c66b --- /dev/null +++ b/customSDK/servicefabric/models/application_type_health_policy_map_item.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationTypeHealthPolicyMapItem(Model): + """Defines an item in ApplicationTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the application type health policy map + item. This is the name of the application type. + :type key: str + :param value: Required. The value of the application type health policy + map item. + The max percent unhealthy applications allowed for the application type. + Must be between zero and 100. + :type value: int + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ApplicationTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/application_type_health_policy_map_item_py3.py b/customSDK/servicefabric/models/application_type_health_policy_map_item_py3.py new file mode 100644 index 00000000..a964308c --- /dev/null +++ b/customSDK/servicefabric/models/application_type_health_policy_map_item_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationTypeHealthPolicyMapItem(Model): + """Defines an item in ApplicationTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the application type health policy map + item. This is the name of the application type. + :type key: str + :param value: Required. The value of the application type health policy + map item. + The max percent unhealthy applications allowed for the application type. + Must be between zero and 100. + :type value: int + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + } + + def __init__(self, *, key: str, value: int, **kwargs) -> None: + super(ApplicationTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = key + self.value = value diff --git a/customSDK/servicefabric/models/application_type_image_store_path.py b/customSDK/servicefabric/models/application_type_image_store_path.py new file mode 100644 index 00000000..89635121 --- /dev/null +++ b/customSDK/servicefabric/models/application_type_image_store_path.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationTypeImageStorePath(Model): + """Path description for the application package in the image store specified + during the prior copy operation. + + All required parameters must be populated in order to send to Azure. + + :param application_type_build_path: Required. The relative image store + path to the application package. + :type application_type_build_path: str + """ + + _validation = { + 'application_type_build_path': {'required': True}, + } + + _attribute_map = { + 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationTypeImageStorePath, self).__init__(**kwargs) + self.application_type_build_path = kwargs.get('application_type_build_path', None) diff --git a/customSDK/servicefabric/models/application_type_image_store_path_py3.py b/customSDK/servicefabric/models/application_type_image_store_path_py3.py new file mode 100644 index 00000000..750c366d --- /dev/null +++ b/customSDK/servicefabric/models/application_type_image_store_path_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationTypeImageStorePath(Model): + """Path description for the application package in the image store specified + during the prior copy operation. + + All required parameters must be populated in order to send to Azure. + + :param application_type_build_path: Required. The relative image store + path to the application package. + :type application_type_build_path: str + """ + + _validation = { + 'application_type_build_path': {'required': True}, + } + + _attribute_map = { + 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, + } + + def __init__(self, *, application_type_build_path: str, **kwargs) -> None: + super(ApplicationTypeImageStorePath, self).__init__(**kwargs) + self.application_type_build_path = application_type_build_path diff --git a/customSDK/servicefabric/models/application_type_info.py b/customSDK/servicefabric/models/application_type_info.py new file mode 100644 index 00000000..6da4e92f --- /dev/null +++ b/customSDK/servicefabric/models/application_type_info.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationTypeInfo(Model): + """Information about an application type. + + :param name: The application type name as defined in the application + manifest. + :type name: str + :param version: The version of the application type as defined in the + application manifest. + :type version: str + :param default_parameter_list: List of application type parameters that + can be overridden when creating or updating the application. + :type default_parameter_list: + list[~azure.servicefabric.models.ApplicationParameter] + :param status: The status of the application type. Possible values + include: 'Invalid', 'Provisioning', 'Available', 'Unprovisioning', + 'Failed' + :type status: str or ~azure.servicefabric.models.ApplicationTypeStatus + :param status_details: Additional detailed information about the status of + the application type. + :type status_details: str + :param application_type_definition_kind: The mechanism used to define a + Service Fabric application type. Possible values include: 'Invalid', + 'ServiceFabricApplicationPackage', 'Compose' + :type application_type_definition_kind: str or + ~azure.servicefabric.models.ApplicationTypeDefinitionKind + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'default_parameter_list': {'key': 'DefaultParameterList', 'type': '[ApplicationParameter]'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + 'application_type_definition_kind': {'key': 'ApplicationTypeDefinitionKind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationTypeInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + self.default_parameter_list = kwargs.get('default_parameter_list', None) + self.status = kwargs.get('status', None) + self.status_details = kwargs.get('status_details', None) + self.application_type_definition_kind = kwargs.get('application_type_definition_kind', None) diff --git a/customSDK/servicefabric/models/application_type_info_py3.py b/customSDK/servicefabric/models/application_type_info_py3.py new file mode 100644 index 00000000..94b8e1b5 --- /dev/null +++ b/customSDK/servicefabric/models/application_type_info_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationTypeInfo(Model): + """Information about an application type. + + :param name: The application type name as defined in the application + manifest. + :type name: str + :param version: The version of the application type as defined in the + application manifest. + :type version: str + :param default_parameter_list: List of application type parameters that + can be overridden when creating or updating the application. + :type default_parameter_list: + list[~azure.servicefabric.models.ApplicationParameter] + :param status: The status of the application type. Possible values + include: 'Invalid', 'Provisioning', 'Available', 'Unprovisioning', + 'Failed' + :type status: str or ~azure.servicefabric.models.ApplicationTypeStatus + :param status_details: Additional detailed information about the status of + the application type. + :type status_details: str + :param application_type_definition_kind: The mechanism used to define a + Service Fabric application type. Possible values include: 'Invalid', + 'ServiceFabricApplicationPackage', 'Compose' + :type application_type_definition_kind: str or + ~azure.servicefabric.models.ApplicationTypeDefinitionKind + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'default_parameter_list': {'key': 'DefaultParameterList', 'type': '[ApplicationParameter]'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + 'application_type_definition_kind': {'key': 'ApplicationTypeDefinitionKind', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, version: str=None, default_parameter_list=None, status=None, status_details: str=None, application_type_definition_kind=None, **kwargs) -> None: + super(ApplicationTypeInfo, self).__init__(**kwargs) + self.name = name + self.version = version + self.default_parameter_list = default_parameter_list + self.status = status + self.status_details = status_details + self.application_type_definition_kind = application_type_definition_kind diff --git a/customSDK/servicefabric/models/application_type_manifest.py b/customSDK/servicefabric/models/application_type_manifest.py new file mode 100644 index 00000000..4d557712 --- /dev/null +++ b/customSDK/servicefabric/models/application_type_manifest.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationTypeManifest(Model): + """Contains the manifest describing an application type registered in a + Service Fabric cluster. + + :param manifest: The XML manifest as a string. + :type manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationTypeManifest, self).__init__(**kwargs) + self.manifest = kwargs.get('manifest', None) diff --git a/customSDK/servicefabric/models/application_type_manifest_py3.py b/customSDK/servicefabric/models/application_type_manifest_py3.py new file mode 100644 index 00000000..befbb39f --- /dev/null +++ b/customSDK/servicefabric/models/application_type_manifest_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationTypeManifest(Model): + """Contains the manifest describing an application type registered in a + Service Fabric cluster. + + :param manifest: The XML manifest as a string. + :type manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__(self, *, manifest: str=None, **kwargs) -> None: + super(ApplicationTypeManifest, self).__init__(**kwargs) + self.manifest = manifest diff --git a/customSDK/servicefabric/models/application_update_description.py b/customSDK/servicefabric/models/application_update_description.py new file mode 100644 index 00000000..76b4dcb9 --- /dev/null +++ b/customSDK/servicefabric/models/application_update_description.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationUpdateDescription(Model): + """Describes the parameters for updating an application instance. + + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + If flags are not specified for a certain property, the property will not + be updated even if the new value is provided. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. Exception is RemoveApplicationCapacity which cannot be + specified along with other parameters. + For example, if the provided value is 3 then the flags for MinimumNodes + (1) and MaximumNodes (2) are set. + - None - Does not indicate any other properties are set. The value is 0. + - MinimumNodes - Indicates whether the MinimumNodes property is set. The + value is 1. + - MaximumNodes - Indicates whether the MinimumNodes property is set. The + value is 2. + - ApplicationMetrics - Indicates whether the ApplicationMetrics property + is set. The value is 4. + :type flags: str + :param remove_application_capacity: Used to clear all parameters related + to Application Capacity for this application. | + It is not possible to specify this parameter together with other + Application Capacity parameters. Default value: False . + :type remove_application_capacity: bool + :param minimum_nodes: The minimum number of nodes where Service Fabric + will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those + nodes. If this property is set to zero, no capacity will be reserved. The + value of this property cannot be more than the value of the MaximumNodes + property. + :type minimum_nodes: long + :param maximum_nodes: The maximum number of nodes where Service Fabric + will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those + nodes. By default, the value of this property is zero and it means that + the services can be placed on any node. Default value: 0 . + :type maximum_nodes: long + :param application_metrics: List of application capacity metric + description. + :type application_metrics: + list[~azure.servicefabric.models.ApplicationMetricDescription] + """ + + _validation = { + 'minimum_nodes': {'minimum': 0}, + 'maximum_nodes': {'minimum': 0}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'remove_application_capacity': {'key': 'RemoveApplicationCapacity', 'type': 'bool'}, + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpdateDescription, self).__init__(**kwargs) + self.flags = kwargs.get('flags', None) + self.remove_application_capacity = kwargs.get('remove_application_capacity', False) + self.minimum_nodes = kwargs.get('minimum_nodes', None) + self.maximum_nodes = kwargs.get('maximum_nodes', 0) + self.application_metrics = kwargs.get('application_metrics', None) diff --git a/customSDK/servicefabric/models/application_update_description_py3.py b/customSDK/servicefabric/models/application_update_description_py3.py new file mode 100644 index 00000000..433277e4 --- /dev/null +++ b/customSDK/servicefabric/models/application_update_description_py3.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationUpdateDescription(Model): + """Describes the parameters for updating an application instance. + + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + If flags are not specified for a certain property, the property will not + be updated even if the new value is provided. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. Exception is RemoveApplicationCapacity which cannot be + specified along with other parameters. + For example, if the provided value is 3 then the flags for MinimumNodes + (1) and MaximumNodes (2) are set. + - None - Does not indicate any other properties are set. The value is 0. + - MinimumNodes - Indicates whether the MinimumNodes property is set. The + value is 1. + - MaximumNodes - Indicates whether the MinimumNodes property is set. The + value is 2. + - ApplicationMetrics - Indicates whether the ApplicationMetrics property + is set. The value is 4. + :type flags: str + :param remove_application_capacity: Used to clear all parameters related + to Application Capacity for this application. | + It is not possible to specify this parameter together with other + Application Capacity parameters. Default value: False . + :type remove_application_capacity: bool + :param minimum_nodes: The minimum number of nodes where Service Fabric + will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those + nodes. If this property is set to zero, no capacity will be reserved. The + value of this property cannot be more than the value of the MaximumNodes + property. + :type minimum_nodes: long + :param maximum_nodes: The maximum number of nodes where Service Fabric + will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those + nodes. By default, the value of this property is zero and it means that + the services can be placed on any node. Default value: 0 . + :type maximum_nodes: long + :param application_metrics: List of application capacity metric + description. + :type application_metrics: + list[~azure.servicefabric.models.ApplicationMetricDescription] + """ + + _validation = { + 'minimum_nodes': {'minimum': 0}, + 'maximum_nodes': {'minimum': 0}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'remove_application_capacity': {'key': 'RemoveApplicationCapacity', 'type': 'bool'}, + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, + } + + def __init__(self, *, flags: str=None, remove_application_capacity: bool=False, minimum_nodes: int=None, maximum_nodes: int=0, application_metrics=None, **kwargs) -> None: + super(ApplicationUpdateDescription, self).__init__(**kwargs) + self.flags = flags + self.remove_application_capacity = remove_application_capacity + self.minimum_nodes = minimum_nodes + self.maximum_nodes = maximum_nodes + self.application_metrics = application_metrics diff --git a/customSDK/servicefabric/models/application_upgrade_completed_event.py b/customSDK/servicefabric/models/application_upgrade_completed_event.py new file mode 100644 index 00000000..ed48f2f6 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_completed_event.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event import ApplicationEvent + + +class ApplicationUpgradeCompletedEvent(ApplicationEvent): + """Application Upgrade Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param application_type_version: Required. Application type version. + :type application_type_version: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time + in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpgradeCompletedEvent, self).__init__(**kwargs) + self.application_type_name = kwargs.get('application_type_name', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) + self.kind = 'ApplicationUpgradeCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_completed_event_py3.py b/customSDK/servicefabric/models/application_upgrade_completed_event_py3.py new file mode 100644 index 00000000..d3a3f0a7 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_completed_event_py3.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event_py3 import ApplicationEvent + + +class ApplicationUpgradeCompletedEvent(ApplicationEvent): + """Application Upgrade Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param application_type_version: Required. Application type version. + :type application_type_version: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time + in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationUpgradeCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_type_name = application_type_name + self.application_type_version = application_type_version + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + self.kind = 'ApplicationUpgradeCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_description.py b/customSDK/servicefabric/models/application_upgrade_description.py new file mode 100644 index 00000000..6aa7a974 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_description.py @@ -0,0 +1,125 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationUpgradeDescription(Model): + """Describes the parameters for an application upgrade. Note that upgrade + description replaces the existing application description. This means that + if the parameters are not specified, the existing parameters on the + applications will be overwritten with the empty parameters list. This would + result in the application using the default value of the parameters from + the application manifest. If you do not want to change any existing + parameter values, please get the application parameters first using the + GetApplicationInfo query and then supply those values as Parameters in this + ApplicationUpgradeDescription. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the target application, including the + 'fabric:' URI scheme. + :type name: str + :param target_application_type_version: Required. The target application + type version (found in the application manifest) for the application + upgrade. + :type target_application_type_version: str + :param parameters: List of application parameters with overridden values + from their default values specified in the application manifest. + :type parameters: list[~azure.servicefabric.models.ApplicationParameter] + :param upgrade_kind: Required. The kind of upgrade out of the following + possible values. Possible values include: 'Invalid', 'Rolling'. Default + value: "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, + Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', + 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param sort_order: Defines the order in which an upgrade proceeds through + the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', + 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default + value: "Default" . + :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param application_health_policy: Defines a health policy used to evaluate + the health of an application or one of its children entities. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param instance_close_delay_duration_in_seconds: Duration in seconds, to + wait before a stateless instance is closed, to allow the active requests + to drain gracefully. This would be effective when the instance is closing + during the application/cluster + upgrade, only for those instances which have a non-zero delay duration + configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is + 4294967295, which indicates that the behavior will entirely depend on the + delay configured in the stateless service description. + :type instance_close_delay_duration_in_seconds: long + :param managed_application_identity: Managed application identity + description. + :type managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + + _validation = { + 'name': {'required': True}, + 'target_application_type_version': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpgradeDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.target_application_type_version = kwargs.get('target_application_type_version', None) + self.parameters = kwargs.get('parameters', None) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) + self.force_restart = kwargs.get('force_restart', None) + self.sort_order = kwargs.get('sort_order', "Default") + self.monitoring_policy = kwargs.get('monitoring_policy', None) + self.application_health_policy = kwargs.get('application_health_policy', None) + self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', None) + self.managed_application_identity = kwargs.get('managed_application_identity', None) diff --git a/customSDK/servicefabric/models/application_upgrade_description_py3.py b/customSDK/servicefabric/models/application_upgrade_description_py3.py new file mode 100644 index 00000000..c52facc2 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_description_py3.py @@ -0,0 +1,125 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationUpgradeDescription(Model): + """Describes the parameters for an application upgrade. Note that upgrade + description replaces the existing application description. This means that + if the parameters are not specified, the existing parameters on the + applications will be overwritten with the empty parameters list. This would + result in the application using the default value of the parameters from + the application manifest. If you do not want to change any existing + parameter values, please get the application parameters first using the + GetApplicationInfo query and then supply those values as Parameters in this + ApplicationUpgradeDescription. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the target application, including the + 'fabric:' URI scheme. + :type name: str + :param target_application_type_version: Required. The target application + type version (found in the application manifest) for the application + upgrade. + :type target_application_type_version: str + :param parameters: List of application parameters with overridden values + from their default values specified in the application manifest. + :type parameters: list[~azure.servicefabric.models.ApplicationParameter] + :param upgrade_kind: Required. The kind of upgrade out of the following + possible values. Possible values include: 'Invalid', 'Rolling'. Default + value: "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, + Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', + 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param sort_order: Defines the order in which an upgrade proceeds through + the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', + 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default + value: "Default" . + :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param application_health_policy: Defines a health policy used to evaluate + the health of an application or one of its children entities. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param instance_close_delay_duration_in_seconds: Duration in seconds, to + wait before a stateless instance is closed, to allow the active requests + to drain gracefully. This would be effective when the instance is closing + during the application/cluster + upgrade, only for those instances which have a non-zero delay duration + configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is + 4294967295, which indicates that the behavior will entirely depend on the + delay configured in the stateless service description. + :type instance_close_delay_duration_in_seconds: long + :param managed_application_identity: Managed application identity + description. + :type managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription + """ + + _validation = { + 'name': {'required': True}, + 'target_application_type_version': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, + } + + def __init__(self, *, name: str, target_application_type_version: str, parameters=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", monitoring_policy=None, application_health_policy=None, instance_close_delay_duration_in_seconds: int=None, managed_application_identity=None, **kwargs) -> None: + super(ApplicationUpgradeDescription, self).__init__(**kwargs) + self.name = name + self.target_application_type_version = target_application_type_version + self.parameters = parameters + self.upgrade_kind = upgrade_kind + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.force_restart = force_restart + self.sort_order = sort_order + self.monitoring_policy = monitoring_policy + self.application_health_policy = application_health_policy + self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds + self.managed_application_identity = managed_application_identity diff --git a/customSDK/servicefabric/models/application_upgrade_domain_completed_event.py b/customSDK/servicefabric/models/application_upgrade_domain_completed_event.py new file mode 100644 index 00000000..292ec1c8 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_domain_completed_event.py @@ -0,0 +1,93 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event import ApplicationEvent + + +class ApplicationUpgradeDomainCompletedEvent(ApplicationEvent): + """Application Upgrade Domain Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param current_application_type_version: Required. Current Application + type version. + :type current_application_type_version: str + :param application_type_version: Required. Target Application type + version. + :type application_type_version: str + :param upgrade_state: Required. State of upgrade. + :type upgrade_state: str + :param upgrade_domains: Required. Upgrade domains. + :type upgrade_domains: str + :param upgrade_domain_elapsed_time_in_ms: Required. Upgrade time of domain + in milli-seconds. + :type upgrade_domain_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'upgrade_state': {'required': True}, + 'upgrade_domains': {'required': True}, + 'upgrade_domain_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, + 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpgradeDomainCompletedEvent, self).__init__(**kwargs) + self.application_type_name = kwargs.get('application_type_name', None) + self.current_application_type_version = kwargs.get('current_application_type_version', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.upgrade_domains = kwargs.get('upgrade_domains', None) + self.upgrade_domain_elapsed_time_in_ms = kwargs.get('upgrade_domain_elapsed_time_in_ms', None) + self.kind = 'ApplicationUpgradeDomainCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_domain_completed_event_py3.py b/customSDK/servicefabric/models/application_upgrade_domain_completed_event_py3.py new file mode 100644 index 00000000..eb424ead --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_domain_completed_event_py3.py @@ -0,0 +1,93 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event_py3 import ApplicationEvent + + +class ApplicationUpgradeDomainCompletedEvent(ApplicationEvent): + """Application Upgrade Domain Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param current_application_type_version: Required. Current Application + type version. + :type current_application_type_version: str + :param application_type_version: Required. Target Application type + version. + :type application_type_version: str + :param upgrade_state: Required. State of upgrade. + :type upgrade_state: str + :param upgrade_domains: Required. Upgrade domains. + :type upgrade_domains: str + :param upgrade_domain_elapsed_time_in_ms: Required. Upgrade time of domain + in milli-seconds. + :type upgrade_domain_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'upgrade_state': {'required': True}, + 'upgrade_domains': {'required': True}, + 'upgrade_domain_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, + 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, current_application_type_version: str, application_type_version: str, upgrade_state: str, upgrade_domains: str, upgrade_domain_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationUpgradeDomainCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_type_name = application_type_name + self.current_application_type_version = current_application_type_version + self.application_type_version = application_type_version + self.upgrade_state = upgrade_state + self.upgrade_domains = upgrade_domains + self.upgrade_domain_elapsed_time_in_ms = upgrade_domain_elapsed_time_in_ms + self.kind = 'ApplicationUpgradeDomainCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_progress_info.py b/customSDK/servicefabric/models/application_upgrade_progress_info.py new file mode 100644 index 00000000..9c63a464 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_progress_info.py @@ -0,0 +1,142 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationUpgradeProgressInfo(Model): + """Describes the parameters for an application upgrade. + + :param name: The name of the target application, including the 'fabric:' + URI scheme. + :type name: str + :param type_name: The application type name as defined in the application + manifest. + :type type_name: str + :param target_application_type_version: The target application type + version (found in the application manifest) for the application upgrade. + :type target_application_type_version: str + :param upgrade_domains: List of upgrade domains and their statuses. Not + applicable to node-by-node upgrades. + :type upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] + :param upgrade_units: List of upgrade units and their statuses. + :type upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] + :param upgrade_state: The state of the upgrade domain. Possible values + include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', + 'RollingForwardPending', 'RollingForwardInProgress', + 'RollingForwardCompleted', 'Failed' + :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :param next_upgrade_domain: The name of the next upgrade domain to be + processed. Not applicable to node-by-node upgrades. + :type next_upgrade_domain: str + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, + Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', + 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_description: Describes the parameters for an application + upgrade. Note that upgrade description replaces the existing application + description. This means that if the parameters are not specified, the + existing parameters on the applications will be overwritten with the empty + parameters list. This would result in the application using the default + value of the parameters from the application manifest. If you do not want + to change any existing parameter values, please get the application + parameters first using the GetApplicationInfo query and then supply those + values as Parameters in this ApplicationUpgradeDescription. + :type upgrade_description: + ~azure.servicefabric.models.ApplicationUpgradeDescription + :param upgrade_duration_in_milliseconds: The estimated total amount of + time spent processing the overall upgrade. + :type upgrade_duration_in_milliseconds: str + :param upgrade_domain_duration_in_milliseconds: The estimated total amount + of time spent processing the current upgrade domain. + :type upgrade_domain_duration_in_milliseconds: str + :param unhealthy_evaluations: List of health evaluations that resulted in + the current aggregated health state. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param current_upgrade_domain_progress: Information about the current + in-progress upgrade domain. Not applicable to node-by-node upgrades. + :type current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :param current_upgrade_units_progress: Information about the current + in-progress upgrade units. + :type current_upgrade_units_progress: + ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo + :param start_timestamp_utc: The estimated UTC datetime when the upgrade + started. + :type start_timestamp_utc: str + :param failure_timestamp_utc: The estimated UTC datetime when the upgrade + failed and FailureAction was executed. + :type failure_timestamp_utc: str + :param failure_reason: The cause of an upgrade failure that resulted in + FailureAction being executed. Possible values include: 'None', + 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + 'OverallUpgradeTimeout' + :type failure_reason: str or ~azure.servicefabric.models.FailureReason + :param upgrade_domain_progress_at_failure: Information about the upgrade + domain progress at the time of upgrade failure. + :type upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo + :param upgrade_status_details: Additional detailed information about the + status of the pending upgrade. + :type upgrade_status_details: str + :param is_node_by_node: Indicates whether this upgrade is node-by-node. + Default value: False . + :type is_node_by_node: bool + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, + 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ApplicationUpgradeDescription'}, + 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, + 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, + 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, + 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpgradeProgressInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type_name = kwargs.get('type_name', None) + self.target_application_type_version = kwargs.get('target_application_type_version', None) + self.upgrade_domains = kwargs.get('upgrade_domains', None) + self.upgrade_units = kwargs.get('upgrade_units', None) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.next_upgrade_domain = kwargs.get('next_upgrade_domain', None) + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_description = kwargs.get('upgrade_description', None) + self.upgrade_duration_in_milliseconds = kwargs.get('upgrade_duration_in_milliseconds', None) + self.upgrade_domain_duration_in_milliseconds = kwargs.get('upgrade_domain_duration_in_milliseconds', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) + self.current_upgrade_units_progress = kwargs.get('current_upgrade_units_progress', None) + self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) + self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) + self.upgrade_status_details = kwargs.get('upgrade_status_details', None) + self.is_node_by_node = kwargs.get('is_node_by_node', False) diff --git a/customSDK/servicefabric/models/application_upgrade_progress_info_py3.py b/customSDK/servicefabric/models/application_upgrade_progress_info_py3.py new file mode 100644 index 00000000..2d7b267f --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_progress_info_py3.py @@ -0,0 +1,142 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationUpgradeProgressInfo(Model): + """Describes the parameters for an application upgrade. + + :param name: The name of the target application, including the 'fabric:' + URI scheme. + :type name: str + :param type_name: The application type name as defined in the application + manifest. + :type type_name: str + :param target_application_type_version: The target application type + version (found in the application manifest) for the application upgrade. + :type target_application_type_version: str + :param upgrade_domains: List of upgrade domains and their statuses. Not + applicable to node-by-node upgrades. + :type upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] + :param upgrade_units: List of upgrade units and their statuses. + :type upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] + :param upgrade_state: The state of the upgrade domain. Possible values + include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', + 'RollingForwardPending', 'RollingForwardInProgress', + 'RollingForwardCompleted', 'Failed' + :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :param next_upgrade_domain: The name of the next upgrade domain to be + processed. Not applicable to node-by-node upgrades. + :type next_upgrade_domain: str + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, + Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', + 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_description: Describes the parameters for an application + upgrade. Note that upgrade description replaces the existing application + description. This means that if the parameters are not specified, the + existing parameters on the applications will be overwritten with the empty + parameters list. This would result in the application using the default + value of the parameters from the application manifest. If you do not want + to change any existing parameter values, please get the application + parameters first using the GetApplicationInfo query and then supply those + values as Parameters in this ApplicationUpgradeDescription. + :type upgrade_description: + ~azure.servicefabric.models.ApplicationUpgradeDescription + :param upgrade_duration_in_milliseconds: The estimated total amount of + time spent processing the overall upgrade. + :type upgrade_duration_in_milliseconds: str + :param upgrade_domain_duration_in_milliseconds: The estimated total amount + of time spent processing the current upgrade domain. + :type upgrade_domain_duration_in_milliseconds: str + :param unhealthy_evaluations: List of health evaluations that resulted in + the current aggregated health state. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param current_upgrade_domain_progress: Information about the current + in-progress upgrade domain. Not applicable to node-by-node upgrades. + :type current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :param current_upgrade_units_progress: Information about the current + in-progress upgrade units. + :type current_upgrade_units_progress: + ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo + :param start_timestamp_utc: The estimated UTC datetime when the upgrade + started. + :type start_timestamp_utc: str + :param failure_timestamp_utc: The estimated UTC datetime when the upgrade + failed and FailureAction was executed. + :type failure_timestamp_utc: str + :param failure_reason: The cause of an upgrade failure that resulted in + FailureAction being executed. Possible values include: 'None', + 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + 'OverallUpgradeTimeout' + :type failure_reason: str or ~azure.servicefabric.models.FailureReason + :param upgrade_domain_progress_at_failure: Information about the upgrade + domain progress at the time of upgrade failure. + :type upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo + :param upgrade_status_details: Additional detailed information about the + status of the pending upgrade. + :type upgrade_status_details: str + :param is_node_by_node: Indicates whether this upgrade is node-by-node. + Default value: False . + :type is_node_by_node: bool + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, + 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ApplicationUpgradeDescription'}, + 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, + 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, + 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, + 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, + } + + def __init__(self, *, name: str=None, type_name: str=None, target_application_type_version: str=None, upgrade_domains=None, upgrade_units=None, upgrade_state=None, next_upgrade_domain: str=None, rolling_upgrade_mode="UnmonitoredAuto", upgrade_description=None, upgrade_duration_in_milliseconds: str=None, upgrade_domain_duration_in_milliseconds: str=None, unhealthy_evaluations=None, current_upgrade_domain_progress=None, current_upgrade_units_progress=None, start_timestamp_utc: str=None, failure_timestamp_utc: str=None, failure_reason=None, upgrade_domain_progress_at_failure=None, upgrade_status_details: str=None, is_node_by_node: bool=False, **kwargs) -> None: + super(ApplicationUpgradeProgressInfo, self).__init__(**kwargs) + self.name = name + self.type_name = type_name + self.target_application_type_version = target_application_type_version + self.upgrade_domains = upgrade_domains + self.upgrade_units = upgrade_units + self.upgrade_state = upgrade_state + self.next_upgrade_domain = next_upgrade_domain + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_description = upgrade_description + self.upgrade_duration_in_milliseconds = upgrade_duration_in_milliseconds + self.upgrade_domain_duration_in_milliseconds = upgrade_domain_duration_in_milliseconds + self.unhealthy_evaluations = unhealthy_evaluations + self.current_upgrade_domain_progress = current_upgrade_domain_progress + self.current_upgrade_units_progress = current_upgrade_units_progress + self.start_timestamp_utc = start_timestamp_utc + self.failure_timestamp_utc = failure_timestamp_utc + self.failure_reason = failure_reason + self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure + self.upgrade_status_details = upgrade_status_details + self.is_node_by_node = is_node_by_node diff --git a/customSDK/servicefabric/models/application_upgrade_rollback_completed_event.py b/customSDK/servicefabric/models/application_upgrade_rollback_completed_event.py new file mode 100644 index 00000000..a28a48ad --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_rollback_completed_event.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event import ApplicationEvent + + +class ApplicationUpgradeRollbackCompletedEvent(ApplicationEvent): + """Application Upgrade Rollback Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param application_type_version: Required. Application type version. + :type application_type_version: str + :param failure_reason: Required. Describes reason of failure. + :type failure_reason: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time + in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpgradeRollbackCompletedEvent, self).__init__(**kwargs) + self.application_type_name = kwargs.get('application_type_name', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) + self.kind = 'ApplicationUpgradeRollbackCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_rollback_completed_event_py3.py b/customSDK/servicefabric/models/application_upgrade_rollback_completed_event_py3.py new file mode 100644 index 00000000..2cb37f77 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_rollback_completed_event_py3.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event_py3 import ApplicationEvent + + +class ApplicationUpgradeRollbackCompletedEvent(ApplicationEvent): + """Application Upgrade Rollback Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param application_type_version: Required. Application type version. + :type application_type_version: str + :param failure_reason: Required. Describes reason of failure. + :type failure_reason: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time + in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationUpgradeRollbackCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_type_name = application_type_name + self.application_type_version = application_type_version + self.failure_reason = failure_reason + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + self.kind = 'ApplicationUpgradeRollbackCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_rollback_started_event.py b/customSDK/servicefabric/models/application_upgrade_rollback_started_event.py new file mode 100644 index 00000000..23887afa --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_rollback_started_event.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event import ApplicationEvent + + +class ApplicationUpgradeRollbackStartedEvent(ApplicationEvent): + """Application Upgrade Rollback Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param current_application_type_version: Required. Current Application + type version. + :type current_application_type_version: str + :param application_type_version: Required. Target Application type + version. + :type application_type_version: str + :param failure_reason: Required. Describes reason of failure. + :type failure_reason: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time + in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpgradeRollbackStartedEvent, self).__init__(**kwargs) + self.application_type_name = kwargs.get('application_type_name', None) + self.current_application_type_version = kwargs.get('current_application_type_version', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) + self.kind = 'ApplicationUpgradeRollbackStarted' diff --git a/customSDK/servicefabric/models/application_upgrade_rollback_started_event_py3.py b/customSDK/servicefabric/models/application_upgrade_rollback_started_event_py3.py new file mode 100644 index 00000000..95488c56 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_rollback_started_event_py3.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event_py3 import ApplicationEvent + + +class ApplicationUpgradeRollbackStartedEvent(ApplicationEvent): + """Application Upgrade Rollback Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param current_application_type_version: Required. Current Application + type version. + :type current_application_type_version: str + :param application_type_version: Required. Target Application type + version. + :type application_type_version: str + :param failure_reason: Required. Describes reason of failure. + :type failure_reason: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time + in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, current_application_type_version: str, application_type_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationUpgradeRollbackStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_type_name = application_type_name + self.current_application_type_version = current_application_type_version + self.application_type_version = application_type_version + self.failure_reason = failure_reason + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + self.kind = 'ApplicationUpgradeRollbackStarted' diff --git a/customSDK/servicefabric/models/application_upgrade_started_event.py b/customSDK/servicefabric/models/application_upgrade_started_event.py new file mode 100644 index 00000000..4b8254f7 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_started_event.py @@ -0,0 +1,92 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event import ApplicationEvent + + +class ApplicationUpgradeStartedEvent(ApplicationEvent): + """Application Upgrade Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param current_application_type_version: Required. Current Application + type version. + :type current_application_type_version: str + :param application_type_version: Required. Target Application type + version. + :type application_type_version: str + :param upgrade_type: Required. Type of upgrade. + :type upgrade_type: str + :param rolling_upgrade_mode: Required. Mode of upgrade. + :type rolling_upgrade_mode: str + :param failure_action: Required. Action if failed. + :type failure_action: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'upgrade_type': {'required': True}, + 'rolling_upgrade_mode': {'required': True}, + 'failure_action': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpgradeStartedEvent, self).__init__(**kwargs) + self.application_type_name = kwargs.get('application_type_name', None) + self.current_application_type_version = kwargs.get('current_application_type_version', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.upgrade_type = kwargs.get('upgrade_type', None) + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', None) + self.failure_action = kwargs.get('failure_action', None) + self.kind = 'ApplicationUpgradeStarted' diff --git a/customSDK/servicefabric/models/application_upgrade_started_event_py3.py b/customSDK/servicefabric/models/application_upgrade_started_event_py3.py new file mode 100644 index 00000000..aaf80f7c --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_started_event_py3.py @@ -0,0 +1,92 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event_py3 import ApplicationEvent + + +class ApplicationUpgradeStartedEvent(ApplicationEvent): + """Application Upgrade Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param current_application_type_version: Required. Current Application + type version. + :type current_application_type_version: str + :param application_type_version: Required. Target Application type + version. + :type application_type_version: str + :param upgrade_type: Required. Type of upgrade. + :type upgrade_type: str + :param rolling_upgrade_mode: Required. Mode of upgrade. + :type rolling_upgrade_mode: str + :param failure_action: Required. Action if failed. + :type failure_action: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_type_name': {'required': True}, + 'current_application_type_version': {'required': True}, + 'application_type_version': {'required': True}, + 'upgrade_type': {'required': True}, + 'rolling_upgrade_mode': {'required': True}, + 'failure_action': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, current_application_type_version: str, application_type_version: str, upgrade_type: str, rolling_upgrade_mode: str, failure_action: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ApplicationUpgradeStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_type_name = application_type_name + self.current_application_type_version = current_application_type_version + self.application_type_version = application_type_version + self.upgrade_type = upgrade_type + self.rolling_upgrade_mode = rolling_upgrade_mode + self.failure_action = failure_action + self.kind = 'ApplicationUpgradeStarted' diff --git a/customSDK/servicefabric/models/application_upgrade_update_description.py b/customSDK/servicefabric/models/application_upgrade_update_description.py new file mode 100644 index 00000000..b3944cc5 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_update_description.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationUpgradeUpdateDescription(Model): + """Describes the parameters for updating an ongoing application upgrade. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the application, including the + 'fabric:' URI scheme. + :type name: str + :param upgrade_kind: Required. The kind of upgrade out of the following + possible values. Possible values include: 'Invalid', 'Rolling'. Default + value: "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param application_health_policy: Defines a health policy used to evaluate + the health of an application or one of its children entities. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param update_description: Describes the parameters for updating a rolling + upgrade of application or cluster. + :type update_description: + ~azure.servicefabric.models.RollingUpgradeUpdateDescription + """ + + _validation = { + 'name': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpgradeUpdateDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.application_health_policy = kwargs.get('application_health_policy', None) + self.update_description = kwargs.get('update_description', None) diff --git a/customSDK/servicefabric/models/application_upgrade_update_description_py3.py b/customSDK/servicefabric/models/application_upgrade_update_description_py3.py new file mode 100644 index 00000000..9eb3ae53 --- /dev/null +++ b/customSDK/servicefabric/models/application_upgrade_update_description_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationUpgradeUpdateDescription(Model): + """Describes the parameters for updating an ongoing application upgrade. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the application, including the + 'fabric:' URI scheme. + :type name: str + :param upgrade_kind: Required. The kind of upgrade out of the following + possible values. Possible values include: 'Invalid', 'Rolling'. Default + value: "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param application_health_policy: Defines a health policy used to evaluate + the health of an application or one of its children entities. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param update_description: Describes the parameters for updating a rolling + upgrade of application or cluster. + :type update_description: + ~azure.servicefabric.models.RollingUpgradeUpdateDescription + """ + + _validation = { + 'name': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, + } + + def __init__(self, *, name: str, upgrade_kind="Rolling", application_health_policy=None, update_description=None, **kwargs) -> None: + super(ApplicationUpgradeUpdateDescription, self).__init__(**kwargs) + self.name = name + self.upgrade_kind = upgrade_kind + self.application_health_policy = application_health_policy + self.update_description = update_description diff --git a/customSDK/servicefabric/models/applications_health_evaluation.py b/customSDK/servicefabric/models/applications_health_evaluation.py new file mode 100644 index 00000000..65b925b2 --- /dev/null +++ b/customSDK/servicefabric/models/applications_health_evaluation.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class ApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for applications, containing health + evaluations for each unhealthy application that impacted current aggregated + health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_applications: Maximum allowed percentage of + unhealthy applications from the ClusterHealthPolicy. + :type max_percent_unhealthy_applications: int + :param total_count: Total number of applications from the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + ApplicationHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(ApplicationsHealthEvaluation, self).__init__(**kwargs) + self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Applications' diff --git a/customSDK/servicefabric/models/applications_health_evaluation_py3.py b/customSDK/servicefabric/models/applications_health_evaluation_py3.py new file mode 100644 index 00000000..26ab144d --- /dev/null +++ b/customSDK/servicefabric/models/applications_health_evaluation_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class ApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for applications, containing health + evaluations for each unhealthy application that impacted current aggregated + health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_applications: Maximum allowed percentage of + unhealthy applications from the ClusterHealthPolicy. + :type max_percent_unhealthy_applications: int + :param total_count: Total number of applications from the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + ApplicationHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(ApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.max_percent_unhealthy_applications = max_percent_unhealthy_applications + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Applications' diff --git a/customSDK/servicefabric/models/auto_scaling_mechanism.py b/customSDK/servicefabric/models/auto_scaling_mechanism.py new file mode 100644 index 00000000..474bcd9d --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_mechanism.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutoScalingMechanism(Model): + """Describes the mechanism for performing auto scaling operation. Derived + classes will describe the actual mechanism. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddRemoveReplicaScalingMechanism + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AddRemoveReplica': 'AddRemoveReplicaScalingMechanism'} + } + + def __init__(self, **kwargs): + super(AutoScalingMechanism, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/auto_scaling_mechanism_py3.py b/customSDK/servicefabric/models/auto_scaling_mechanism_py3.py new file mode 100644 index 00000000..69129cba --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_mechanism_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutoScalingMechanism(Model): + """Describes the mechanism for performing auto scaling operation. Derived + classes will describe the actual mechanism. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AddRemoveReplicaScalingMechanism + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AddRemoveReplica': 'AddRemoveReplicaScalingMechanism'} + } + + def __init__(self, **kwargs) -> None: + super(AutoScalingMechanism, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/auto_scaling_metric.py b/customSDK/servicefabric/models/auto_scaling_metric.py new file mode 100644 index 00000000..c100d3c8 --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_metric.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutoScalingMetric(Model): + """Describes the metric that is used for triggering auto scaling operation. + Derived classes will describe resources or metrics. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AutoScalingResourceMetric + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Resource': 'AutoScalingResourceMetric'} + } + + def __init__(self, **kwargs): + super(AutoScalingMetric, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/auto_scaling_metric_py3.py b/customSDK/servicefabric/models/auto_scaling_metric_py3.py new file mode 100644 index 00000000..dd68e4e3 --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_metric_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutoScalingMetric(Model): + """Describes the metric that is used for triggering auto scaling operation. + Derived classes will describe resources or metrics. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AutoScalingResourceMetric + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Resource': 'AutoScalingResourceMetric'} + } + + def __init__(self, **kwargs) -> None: + super(AutoScalingMetric, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/auto_scaling_policy.py b/customSDK/servicefabric/models/auto_scaling_policy.py new file mode 100644 index 00000000..764f7908 --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_policy.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutoScalingPolicy(Model): + """Describes the auto scaling policy. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the auto scaling policy. + :type name: str + :param trigger: Required. Determines when auto scaling operation will be + invoked. + :type trigger: ~azure.servicefabric.models.AutoScalingTrigger + :param mechanism: Required. The mechanism that is used to scale when auto + scaling operation is invoked. + :type mechanism: ~azure.servicefabric.models.AutoScalingMechanism + """ + + _validation = { + 'name': {'required': True}, + 'trigger': {'required': True}, + 'mechanism': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'trigger': {'key': 'trigger', 'type': 'AutoScalingTrigger'}, + 'mechanism': {'key': 'mechanism', 'type': 'AutoScalingMechanism'}, + } + + def __init__(self, **kwargs): + super(AutoScalingPolicy, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.trigger = kwargs.get('trigger', None) + self.mechanism = kwargs.get('mechanism', None) diff --git a/customSDK/servicefabric/models/auto_scaling_policy_py3.py b/customSDK/servicefabric/models/auto_scaling_policy_py3.py new file mode 100644 index 00000000..292c0fd5 --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_policy_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutoScalingPolicy(Model): + """Describes the auto scaling policy. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the auto scaling policy. + :type name: str + :param trigger: Required. Determines when auto scaling operation will be + invoked. + :type trigger: ~azure.servicefabric.models.AutoScalingTrigger + :param mechanism: Required. The mechanism that is used to scale when auto + scaling operation is invoked. + :type mechanism: ~azure.servicefabric.models.AutoScalingMechanism + """ + + _validation = { + 'name': {'required': True}, + 'trigger': {'required': True}, + 'mechanism': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'trigger': {'key': 'trigger', 'type': 'AutoScalingTrigger'}, + 'mechanism': {'key': 'mechanism', 'type': 'AutoScalingMechanism'}, + } + + def __init__(self, *, name: str, trigger, mechanism, **kwargs) -> None: + super(AutoScalingPolicy, self).__init__(**kwargs) + self.name = name + self.trigger = trigger + self.mechanism = mechanism diff --git a/customSDK/servicefabric/models/auto_scaling_resource_metric.py b/customSDK/servicefabric/models/auto_scaling_resource_metric.py new file mode 100644 index 00000000..f853bf85 --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_resource_metric.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .auto_scaling_metric import AutoScalingMetric + + +class AutoScalingResourceMetric(AutoScalingMetric): + """Describes the resource that is used for triggering auto scaling. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param name: Required. Name of the resource. Possible values include: + 'cpu', 'memoryInGB' + :type name: str or + ~azure.servicefabric.models.AutoScalingResourceMetricName + """ + + _validation = { + 'kind': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AutoScalingResourceMetric, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.kind = 'Resource' diff --git a/customSDK/servicefabric/models/auto_scaling_resource_metric_py3.py b/customSDK/servicefabric/models/auto_scaling_resource_metric_py3.py new file mode 100644 index 00000000..ad6ea3fa --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_resource_metric_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .auto_scaling_metric_py3 import AutoScalingMetric + + +class AutoScalingResourceMetric(AutoScalingMetric): + """Describes the resource that is used for triggering auto scaling. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param name: Required. Name of the resource. Possible values include: + 'cpu', 'memoryInGB' + :type name: str or + ~azure.servicefabric.models.AutoScalingResourceMetricName + """ + + _validation = { + 'kind': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name, **kwargs) -> None: + super(AutoScalingResourceMetric, self).__init__(**kwargs) + self.name = name + self.kind = 'Resource' diff --git a/customSDK/servicefabric/models/auto_scaling_trigger.py b/customSDK/servicefabric/models/auto_scaling_trigger.py new file mode 100644 index 00000000..b3754545 --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_trigger.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutoScalingTrigger(Model): + """Describes the trigger for performing auto scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AverageLoadScalingTrigger + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AverageLoad': 'AverageLoadScalingTrigger'} + } + + def __init__(self, **kwargs): + super(AutoScalingTrigger, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/auto_scaling_trigger_py3.py b/customSDK/servicefabric/models/auto_scaling_trigger_py3.py new file mode 100644 index 00000000..cbf43355 --- /dev/null +++ b/customSDK/servicefabric/models/auto_scaling_trigger_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AutoScalingTrigger(Model): + """Describes the trigger for performing auto scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AverageLoadScalingTrigger + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AverageLoad': 'AverageLoadScalingTrigger'} + } + + def __init__(self, **kwargs) -> None: + super(AutoScalingTrigger, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/average_load_scaling_trigger.py b/customSDK/servicefabric/models/average_load_scaling_trigger.py new file mode 100644 index 00000000..975597bb --- /dev/null +++ b/customSDK/servicefabric/models/average_load_scaling_trigger.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .auto_scaling_trigger import AutoScalingTrigger + + +class AverageLoadScalingTrigger(AutoScalingTrigger): + """Describes the average load trigger used for auto scaling. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param metric: Required. Description of the metric that is used for + scaling. + :type metric: ~azure.servicefabric.models.AutoScalingMetric + :param lower_load_threshold: Required. Lower load threshold (if average + load is below this threshold, service will scale down). + :type lower_load_threshold: float + :param upper_load_threshold: Required. Upper load threshold (if average + load is above this threshold, service will scale up). + :type upper_load_threshold: float + :param scale_interval_in_seconds: Required. Scale interval that indicates + how often will this trigger be checked. + :type scale_interval_in_seconds: int + """ + + _validation = { + 'kind': {'required': True}, + 'metric': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'minimum': 60}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'metric': {'key': 'metric', 'type': 'AutoScalingMetric'}, + 'lower_load_threshold': {'key': 'lowerLoadThreshold', 'type': 'float'}, + 'upper_load_threshold': {'key': 'upperLoadThreshold', 'type': 'float'}, + 'scale_interval_in_seconds': {'key': 'scaleIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AverageLoadScalingTrigger, self).__init__(**kwargs) + self.metric = kwargs.get('metric', None) + self.lower_load_threshold = kwargs.get('lower_load_threshold', None) + self.upper_load_threshold = kwargs.get('upper_load_threshold', None) + self.scale_interval_in_seconds = kwargs.get('scale_interval_in_seconds', None) + self.kind = 'AverageLoad' diff --git a/customSDK/servicefabric/models/average_load_scaling_trigger_py3.py b/customSDK/servicefabric/models/average_load_scaling_trigger_py3.py new file mode 100644 index 00000000..b6a20ae1 --- /dev/null +++ b/customSDK/servicefabric/models/average_load_scaling_trigger_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .auto_scaling_trigger_py3 import AutoScalingTrigger + + +class AverageLoadScalingTrigger(AutoScalingTrigger): + """Describes the average load trigger used for auto scaling. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param metric: Required. Description of the metric that is used for + scaling. + :type metric: ~azure.servicefabric.models.AutoScalingMetric + :param lower_load_threshold: Required. Lower load threshold (if average + load is below this threshold, service will scale down). + :type lower_load_threshold: float + :param upper_load_threshold: Required. Upper load threshold (if average + load is above this threshold, service will scale up). + :type upper_load_threshold: float + :param scale_interval_in_seconds: Required. Scale interval that indicates + how often will this trigger be checked. + :type scale_interval_in_seconds: int + """ + + _validation = { + 'kind': {'required': True}, + 'metric': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'minimum': 60}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'metric': {'key': 'metric', 'type': 'AutoScalingMetric'}, + 'lower_load_threshold': {'key': 'lowerLoadThreshold', 'type': 'float'}, + 'upper_load_threshold': {'key': 'upperLoadThreshold', 'type': 'float'}, + 'scale_interval_in_seconds': {'key': 'scaleIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, *, metric, lower_load_threshold: float, upper_load_threshold: float, scale_interval_in_seconds: int, **kwargs) -> None: + super(AverageLoadScalingTrigger, self).__init__(**kwargs) + self.metric = metric + self.lower_load_threshold = lower_load_threshold + self.upper_load_threshold = upper_load_threshold + self.scale_interval_in_seconds = scale_interval_in_seconds + self.kind = 'AverageLoad' diff --git a/customSDK/servicefabric/models/average_partition_load_scaling_trigger.py b/customSDK/servicefabric/models/average_partition_load_scaling_trigger.py new file mode 100644 index 00000000..81307353 --- /dev/null +++ b/customSDK/servicefabric/models/average_partition_load_scaling_trigger.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .scaling_trigger_description import ScalingTriggerDescription + + +class AveragePartitionLoadScalingTrigger(ScalingTriggerDescription): + """Represents a scaling trigger related to an average load of a + metric/resource of a partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param metric_name: Required. The name of the metric for which usage + should be tracked. + :type metric_name: str + :param lower_load_threshold: Required. The lower limit of the load below + which a scale in operation should be performed. + :type lower_load_threshold: str + :param upper_load_threshold: Required. The upper limit of the load beyond + which a scale out operation should be performed. + :type upper_load_threshold: str + :param scale_interval_in_seconds: Required. The period in seconds on which + a decision is made whether to scale or not. + :type scale_interval_in_seconds: long + """ + + _validation = { + 'kind': {'required': True}, + 'metric_name': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, + 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, + 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(AveragePartitionLoadScalingTrigger, self).__init__(**kwargs) + self.metric_name = kwargs.get('metric_name', None) + self.lower_load_threshold = kwargs.get('lower_load_threshold', None) + self.upper_load_threshold = kwargs.get('upper_load_threshold', None) + self.scale_interval_in_seconds = kwargs.get('scale_interval_in_seconds', None) + self.kind = 'AveragePartitionLoad' diff --git a/customSDK/servicefabric/models/average_partition_load_scaling_trigger_py3.py b/customSDK/servicefabric/models/average_partition_load_scaling_trigger_py3.py new file mode 100644 index 00000000..610459ea --- /dev/null +++ b/customSDK/servicefabric/models/average_partition_load_scaling_trigger_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .scaling_trigger_description_py3 import ScalingTriggerDescription + + +class AveragePartitionLoadScalingTrigger(ScalingTriggerDescription): + """Represents a scaling trigger related to an average load of a + metric/resource of a partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param metric_name: Required. The name of the metric for which usage + should be tracked. + :type metric_name: str + :param lower_load_threshold: Required. The lower limit of the load below + which a scale in operation should be performed. + :type lower_load_threshold: str + :param upper_load_threshold: Required. The upper limit of the load beyond + which a scale out operation should be performed. + :type upper_load_threshold: str + :param scale_interval_in_seconds: Required. The period in seconds on which + a decision is made whether to scale or not. + :type scale_interval_in_seconds: long + """ + + _validation = { + 'kind': {'required': True}, + 'metric_name': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, + 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, + 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, + } + + def __init__(self, *, metric_name: str, lower_load_threshold: str, upper_load_threshold: str, scale_interval_in_seconds: int, **kwargs) -> None: + super(AveragePartitionLoadScalingTrigger, self).__init__(**kwargs) + self.metric_name = metric_name + self.lower_load_threshold = lower_load_threshold + self.upper_load_threshold = upper_load_threshold + self.scale_interval_in_seconds = scale_interval_in_seconds + self.kind = 'AveragePartitionLoad' diff --git a/customSDK/servicefabric/models/average_service_load_scaling_trigger.py b/customSDK/servicefabric/models/average_service_load_scaling_trigger.py new file mode 100644 index 00000000..5c539270 --- /dev/null +++ b/customSDK/servicefabric/models/average_service_load_scaling_trigger.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .scaling_trigger_description import ScalingTriggerDescription + + +class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): + """Represents a scaling policy related to an average load of a metric/resource + of a service. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param metric_name: Required. The name of the metric for which usage + should be tracked. + :type metric_name: str + :param lower_load_threshold: Required. The lower limit of the load below + which a scale in operation should be performed. + :type lower_load_threshold: str + :param upper_load_threshold: Required. The upper limit of the load beyond + which a scale out operation should be performed. + :type upper_load_threshold: str + :param scale_interval_in_seconds: Required. The period in seconds on which + a decision is made whether to scale or not. + :type scale_interval_in_seconds: long + :param use_only_primary_load: Required. Flag determines whether only the + load of primary replica should be considered for scaling. + If set to true, then trigger will only consider the load of primary + replicas of stateful service. + If set to false, trigger will consider load of all replicas. + This parameter cannot be set to true for stateless service. + :type use_only_primary_load: bool + """ + + _validation = { + 'kind': {'required': True}, + 'metric_name': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, + 'use_only_primary_load': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, + 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, + 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, + 'use_only_primary_load': {'key': 'UseOnlyPrimaryLoad', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AverageServiceLoadScalingTrigger, self).__init__(**kwargs) + self.metric_name = kwargs.get('metric_name', None) + self.lower_load_threshold = kwargs.get('lower_load_threshold', None) + self.upper_load_threshold = kwargs.get('upper_load_threshold', None) + self.scale_interval_in_seconds = kwargs.get('scale_interval_in_seconds', None) + self.use_only_primary_load = kwargs.get('use_only_primary_load', None) + self.kind = 'AverageServiceLoad' diff --git a/customSDK/servicefabric/models/average_service_load_scaling_trigger_py3.py b/customSDK/servicefabric/models/average_service_load_scaling_trigger_py3.py new file mode 100644 index 00000000..0a8d2962 --- /dev/null +++ b/customSDK/servicefabric/models/average_service_load_scaling_trigger_py3.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .scaling_trigger_description_py3 import ScalingTriggerDescription + + +class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): + """Represents a scaling policy related to an average load of a metric/resource + of a service. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param metric_name: Required. The name of the metric for which usage + should be tracked. + :type metric_name: str + :param lower_load_threshold: Required. The lower limit of the load below + which a scale in operation should be performed. + :type lower_load_threshold: str + :param upper_load_threshold: Required. The upper limit of the load beyond + which a scale out operation should be performed. + :type upper_load_threshold: str + :param scale_interval_in_seconds: Required. The period in seconds on which + a decision is made whether to scale or not. + :type scale_interval_in_seconds: long + :param use_only_primary_load: Required. Flag determines whether only the + load of primary replica should be considered for scaling. + If set to true, then trigger will only consider the load of primary + replicas of stateful service. + If set to false, trigger will consider load of all replicas. + This parameter cannot be set to true for stateless service. + :type use_only_primary_load: bool + """ + + _validation = { + 'kind': {'required': True}, + 'metric_name': {'required': True}, + 'lower_load_threshold': {'required': True}, + 'upper_load_threshold': {'required': True}, + 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, + 'use_only_primary_load': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, + 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, + 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, + 'use_only_primary_load': {'key': 'UseOnlyPrimaryLoad', 'type': 'bool'}, + } + + def __init__(self, *, metric_name: str, lower_load_threshold: str, upper_load_threshold: str, scale_interval_in_seconds: int, use_only_primary_load: bool, **kwargs) -> None: + super(AverageServiceLoadScalingTrigger, self).__init__(**kwargs) + self.metric_name = metric_name + self.lower_load_threshold = lower_load_threshold + self.upper_load_threshold = upper_load_threshold + self.scale_interval_in_seconds = scale_interval_in_seconds + self.use_only_primary_load = use_only_primary_load + self.kind = 'AverageServiceLoad' diff --git a/customSDK/servicefabric/models/azure_blob_backup_storage_description.py b/customSDK/servicefabric/models/azure_blob_backup_storage_description.py new file mode 100644 index 00000000..ad0615e0 --- /dev/null +++ b/customSDK/servicefabric/models/azure_blob_backup_storage_description.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_storage_description import BackupStorageDescription + + +class AzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Azure blob store used for storing and + enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param connection_string: Required. The connection string to connect to + the Azure blob store. + :type connection_string: str + :param container_name: Required. The name of the container in the blob + store to store and enumerate backups from. + :type container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'connection_string': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'connection_string': {'key': 'ConnectionString', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureBlobBackupStorageDescription, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.container_name = kwargs.get('container_name', None) + self.storage_kind = 'AzureBlobStore' diff --git a/customSDK/servicefabric/models/azure_blob_backup_storage_description_py3.py b/customSDK/servicefabric/models/azure_blob_backup_storage_description_py3.py new file mode 100644 index 00000000..1384848e --- /dev/null +++ b/customSDK/servicefabric/models/azure_blob_backup_storage_description_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_storage_description_py3 import BackupStorageDescription + + +class AzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Azure blob store used for storing and + enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param connection_string: Required. The connection string to connect to + the Azure blob store. + :type connection_string: str + :param container_name: Required. The name of the container in the blob + store to store and enumerate backups from. + :type container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'connection_string': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'connection_string': {'key': 'ConnectionString', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, *, connection_string: str, container_name: str, friendly_name: str=None, **kwargs) -> None: + super(AzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) + self.connection_string = connection_string + self.container_name = container_name + self.storage_kind = 'AzureBlobStore' diff --git a/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description.py b/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description.py new file mode 100644 index 00000000..a61f34ee --- /dev/null +++ b/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .diagnostics_sink_properties import DiagnosticsSinkProperties + + +class AzureInternalMonitoringPipelineSinkDescription(DiagnosticsSinkProperties): + """Diagnostics settings for Geneva. + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the sink. This value is referenced by + DiagnosticsReferenceDescription + :type name: str + :param description: A description of the sink. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param account_name: Azure Internal monitoring pipeline account. + :type account_name: str + :param namespace: Azure Internal monitoring pipeline account namespace. + :type namespace: str + :param ma_config_url: Azure Internal monitoring agent configuration. + :type ma_config_url: str + :param fluentd_config_url: Azure Internal monitoring agent fluentd + configuration. + :type fluentd_config_url: str + :param auto_key_config_url: Azure Internal monitoring pipeline autokey + associated with the certificate. + :type auto_key_config_url: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'ma_config_url': {'key': 'maConfigUrl', 'type': 'str'}, + 'fluentd_config_url': {'key': 'fluentdConfigUrl', 'type': 'str'}, + 'auto_key_config_url': {'key': 'autoKeyConfigUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureInternalMonitoringPipelineSinkDescription, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + self.namespace = kwargs.get('namespace', None) + self.ma_config_url = kwargs.get('ma_config_url', None) + self.fluentd_config_url = kwargs.get('fluentd_config_url', None) + self.auto_key_config_url = kwargs.get('auto_key_config_url', None) + self.kind = 'AzureInternalMonitoringPipeline' diff --git a/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description_py3.py b/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description_py3.py new file mode 100644 index 00000000..986ff020 --- /dev/null +++ b/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .diagnostics_sink_properties_py3 import DiagnosticsSinkProperties + + +class AzureInternalMonitoringPipelineSinkDescription(DiagnosticsSinkProperties): + """Diagnostics settings for Geneva. + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the sink. This value is referenced by + DiagnosticsReferenceDescription + :type name: str + :param description: A description of the sink. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param account_name: Azure Internal monitoring pipeline account. + :type account_name: str + :param namespace: Azure Internal monitoring pipeline account namespace. + :type namespace: str + :param ma_config_url: Azure Internal monitoring agent configuration. + :type ma_config_url: str + :param fluentd_config_url: Azure Internal monitoring agent fluentd + configuration. + :type fluentd_config_url: str + :param auto_key_config_url: Azure Internal monitoring pipeline autokey + associated with the certificate. + :type auto_key_config_url: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'ma_config_url': {'key': 'maConfigUrl', 'type': 'str'}, + 'fluentd_config_url': {'key': 'fluentdConfigUrl', 'type': 'str'}, + 'auto_key_config_url': {'key': 'autoKeyConfigUrl', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, description: str=None, account_name: str=None, namespace: str=None, ma_config_url: str=None, fluentd_config_url: str=None, auto_key_config_url: str=None, **kwargs) -> None: + super(AzureInternalMonitoringPipelineSinkDescription, self).__init__(name=name, description=description, **kwargs) + self.account_name = account_name + self.namespace = namespace + self.ma_config_url = ma_config_url + self.fluentd_config_url = fluentd_config_url + self.auto_key_config_url = auto_key_config_url + self.kind = 'AzureInternalMonitoringPipeline' diff --git a/customSDK/servicefabric/models/backup_configuration_info.py b/customSDK/servicefabric/models/backup_configuration_info.py new file mode 100644 index 00000000..53e26f07 --- /dev/null +++ b/customSDK/servicefabric/models/backup_configuration_info.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupConfigurationInfo(Model): + """Describes the backup configuration information. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationBackupConfigurationInfo, + ServiceBackupConfigurationInfo, PartitionBackupConfigurationInfo + + All required parameters must be populated in order to send to Azure. + + :param policy_name: The name of the backup policy which is applicable to + this Service Fabric application or service or partition. + :type policy_name: str + :param policy_inherited_from: Specifies the scope at which the backup + policy is applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type policy_inherited_from: str or + ~azure.servicefabric.models.BackupPolicyScope + :param suspension_info: Describes the backup suspension details. + :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Application': 'ApplicationBackupConfigurationInfo', 'Service': 'ServiceBackupConfigurationInfo', 'Partition': 'PartitionBackupConfigurationInfo'} + } + + def __init__(self, **kwargs): + super(BackupConfigurationInfo, self).__init__(**kwargs) + self.policy_name = kwargs.get('policy_name', None) + self.policy_inherited_from = kwargs.get('policy_inherited_from', None) + self.suspension_info = kwargs.get('suspension_info', None) + self.kind = None diff --git a/customSDK/servicefabric/models/backup_configuration_info_py3.py b/customSDK/servicefabric/models/backup_configuration_info_py3.py new file mode 100644 index 00000000..6b160190 --- /dev/null +++ b/customSDK/servicefabric/models/backup_configuration_info_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupConfigurationInfo(Model): + """Describes the backup configuration information. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationBackupConfigurationInfo, + ServiceBackupConfigurationInfo, PartitionBackupConfigurationInfo + + All required parameters must be populated in order to send to Azure. + + :param policy_name: The name of the backup policy which is applicable to + this Service Fabric application or service or partition. + :type policy_name: str + :param policy_inherited_from: Specifies the scope at which the backup + policy is applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type policy_inherited_from: str or + ~azure.servicefabric.models.BackupPolicyScope + :param suspension_info: Describes the backup suspension details. + :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Application': 'ApplicationBackupConfigurationInfo', 'Service': 'ServiceBackupConfigurationInfo', 'Partition': 'PartitionBackupConfigurationInfo'} + } + + def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, **kwargs) -> None: + super(BackupConfigurationInfo, self).__init__(**kwargs) + self.policy_name = policy_name + self.policy_inherited_from = policy_inherited_from + self.suspension_info = suspension_info + self.kind = None diff --git a/customSDK/servicefabric/models/backup_entity.py b/customSDK/servicefabric/models/backup_entity.py new file mode 100644 index 00000000..f61be0f1 --- /dev/null +++ b/customSDK/servicefabric/models/backup_entity.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupEntity(Model): + """Describes the Service Fabric entity that is configured for backup. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationBackupEntity, ServiceBackupEntity, + PartitionBackupEntity + + All required parameters must be populated in order to send to Azure. + + :param entity_kind: Required. Constant filled by server. + :type entity_kind: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + } + + _subtype_map = { + 'entity_kind': {'Application': 'ApplicationBackupEntity', 'Service': 'ServiceBackupEntity', 'Partition': 'PartitionBackupEntity'} + } + + def __init__(self, **kwargs): + super(BackupEntity, self).__init__(**kwargs) + self.entity_kind = None diff --git a/customSDK/servicefabric/models/backup_entity_py3.py b/customSDK/servicefabric/models/backup_entity_py3.py new file mode 100644 index 00000000..4ce8b96d --- /dev/null +++ b/customSDK/servicefabric/models/backup_entity_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupEntity(Model): + """Describes the Service Fabric entity that is configured for backup. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationBackupEntity, ServiceBackupEntity, + PartitionBackupEntity + + All required parameters must be populated in order to send to Azure. + + :param entity_kind: Required. Constant filled by server. + :type entity_kind: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + } + + _subtype_map = { + 'entity_kind': {'Application': 'ApplicationBackupEntity', 'Service': 'ServiceBackupEntity', 'Partition': 'PartitionBackupEntity'} + } + + def __init__(self, **kwargs) -> None: + super(BackupEntity, self).__init__(**kwargs) + self.entity_kind = None diff --git a/customSDK/servicefabric/models/backup_info.py b/customSDK/servicefabric/models/backup_info.py new file mode 100644 index 00000000..ca205e54 --- /dev/null +++ b/customSDK/servicefabric/models/backup_info.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupInfo(Model): + """Represents a backup point which can be used to trigger a restore. + + :param backup_id: Unique backup ID . + :type backup_id: str + :param backup_chain_id: Unique backup chain ID. All backups part of the + same chain has the same backup chain id. A backup chain is comprised of 1 + full backup and multiple incremental backups. + :type backup_chain_id: str + :param application_name: Name of the Service Fabric application this + partition backup belongs to. + :type application_name: str + :param service_name: Name of the Service Fabric service this partition + backup belongs to. + :type service_name: str + :param partition_information: Information about the partition to which + this backup belongs to + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param backup_location: Location of the backup, relative to the backup + store. + :type backup_location: str + :param backup_type: Describes the type of backup, whether its full or + incremental. Possible values include: 'Invalid', 'Full', 'Incremental' + :type backup_type: str or ~azure.servicefabric.models.BackupType + :param epoch_of_last_backup_record: Epoch of the last record in this + backup. + :type epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch + :param lsn_of_last_backup_record: LSN of the last record in this backup. + :type lsn_of_last_backup_record: str + :param creation_time_utc: The date time when this backup was taken. + :type creation_time_utc: datetime + :param service_manifest_version: Manifest Version of the service this + partition backup belongs to. + :type service_manifest_version: str + :param failure_error: Denotes the failure encountered in getting backup + point information. + :type failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_chain_id': {'key': 'BackupChainId', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'backup_type': {'key': 'BackupType', 'type': 'str'}, + 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, + 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, + 'creation_time_utc': {'key': 'CreationTimeUtc', 'type': 'iso-8601'}, + 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__(self, **kwargs): + super(BackupInfo, self).__init__(**kwargs) + self.backup_id = kwargs.get('backup_id', None) + self.backup_chain_id = kwargs.get('backup_chain_id', None) + self.application_name = kwargs.get('application_name', None) + self.service_name = kwargs.get('service_name', None) + self.partition_information = kwargs.get('partition_information', None) + self.backup_location = kwargs.get('backup_location', None) + self.backup_type = kwargs.get('backup_type', None) + self.epoch_of_last_backup_record = kwargs.get('epoch_of_last_backup_record', None) + self.lsn_of_last_backup_record = kwargs.get('lsn_of_last_backup_record', None) + self.creation_time_utc = kwargs.get('creation_time_utc', None) + self.service_manifest_version = kwargs.get('service_manifest_version', None) + self.failure_error = kwargs.get('failure_error', None) diff --git a/customSDK/servicefabric/models/backup_info_py3.py b/customSDK/servicefabric/models/backup_info_py3.py new file mode 100644 index 00000000..61fdc445 --- /dev/null +++ b/customSDK/servicefabric/models/backup_info_py3.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupInfo(Model): + """Represents a backup point which can be used to trigger a restore. + + :param backup_id: Unique backup ID . + :type backup_id: str + :param backup_chain_id: Unique backup chain ID. All backups part of the + same chain has the same backup chain id. A backup chain is comprised of 1 + full backup and multiple incremental backups. + :type backup_chain_id: str + :param application_name: Name of the Service Fabric application this + partition backup belongs to. + :type application_name: str + :param service_name: Name of the Service Fabric service this partition + backup belongs to. + :type service_name: str + :param partition_information: Information about the partition to which + this backup belongs to + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param backup_location: Location of the backup, relative to the backup + store. + :type backup_location: str + :param backup_type: Describes the type of backup, whether its full or + incremental. Possible values include: 'Invalid', 'Full', 'Incremental' + :type backup_type: str or ~azure.servicefabric.models.BackupType + :param epoch_of_last_backup_record: Epoch of the last record in this + backup. + :type epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch + :param lsn_of_last_backup_record: LSN of the last record in this backup. + :type lsn_of_last_backup_record: str + :param creation_time_utc: The date time when this backup was taken. + :type creation_time_utc: datetime + :param service_manifest_version: Manifest Version of the service this + partition backup belongs to. + :type service_manifest_version: str + :param failure_error: Denotes the failure encountered in getting backup + point information. + :type failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_chain_id': {'key': 'BackupChainId', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'backup_type': {'key': 'BackupType', 'type': 'str'}, + 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, + 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, + 'creation_time_utc': {'key': 'CreationTimeUtc', 'type': 'iso-8601'}, + 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__(self, *, backup_id: str=None, backup_chain_id: str=None, application_name: str=None, service_name: str=None, partition_information=None, backup_location: str=None, backup_type=None, epoch_of_last_backup_record=None, lsn_of_last_backup_record: str=None, creation_time_utc=None, service_manifest_version: str=None, failure_error=None, **kwargs) -> None: + super(BackupInfo, self).__init__(**kwargs) + self.backup_id = backup_id + self.backup_chain_id = backup_chain_id + self.application_name = application_name + self.service_name = service_name + self.partition_information = partition_information + self.backup_location = backup_location + self.backup_type = backup_type + self.epoch_of_last_backup_record = epoch_of_last_backup_record + self.lsn_of_last_backup_record = lsn_of_last_backup_record + self.creation_time_utc = creation_time_utc + self.service_manifest_version = service_manifest_version + self.failure_error = failure_error diff --git a/customSDK/servicefabric/models/backup_partition_description.py b/customSDK/servicefabric/models/backup_partition_description.py new file mode 100644 index 00000000..dc3433ac --- /dev/null +++ b/customSDK/servicefabric/models/backup_partition_description.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupPartitionDescription(Model): + """Describes the parameters for triggering partition's backup. + + :param backup_storage: Specifies the details of the backup storage where + to save the backup. + :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription + """ + + _attribute_map = { + 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, + } + + def __init__(self, **kwargs): + super(BackupPartitionDescription, self).__init__(**kwargs) + self.backup_storage = kwargs.get('backup_storage', None) diff --git a/customSDK/servicefabric/models/backup_partition_description_py3.py b/customSDK/servicefabric/models/backup_partition_description_py3.py new file mode 100644 index 00000000..bc511a12 --- /dev/null +++ b/customSDK/servicefabric/models/backup_partition_description_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupPartitionDescription(Model): + """Describes the parameters for triggering partition's backup. + + :param backup_storage: Specifies the details of the backup storage where + to save the backup. + :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription + """ + + _attribute_map = { + 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, + } + + def __init__(self, *, backup_storage=None, **kwargs) -> None: + super(BackupPartitionDescription, self).__init__(**kwargs) + self.backup_storage = backup_storage diff --git a/customSDK/servicefabric/models/backup_policy_description.py b/customSDK/servicefabric/models/backup_policy_description.py new file mode 100644 index 00000000..d87ea576 --- /dev/null +++ b/customSDK/servicefabric/models/backup_policy_description.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupPolicyDescription(Model): + """Describes a backup policy for configuring periodic backup. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name identifying this backup policy. + :type name: str + :param auto_restore_on_data_loss: Required. Specifies whether to trigger + restore automatically using the latest available backup in case the + partition experiences a data loss event. + :type auto_restore_on_data_loss: bool + :param max_incremental_backups: Required. Defines the maximum number of + incremental backups to be taken between two full backups. This is just the + upper limit. A full backup may be taken before specified number of + incremental backups are completed in one of the following conditions + - The replica has never taken a full backup since it has become primary, + - Some of the log records since the last backup has been truncated, or + - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. + :type max_incremental_backups: int + :param schedule: Required. Describes the backup schedule parameters. + :type schedule: ~azure.servicefabric.models.BackupScheduleDescription + :param storage: Required. Describes the details of backup storage where to + store the periodic backups. + :type storage: ~azure.servicefabric.models.BackupStorageDescription + :param retention_policy: Describes the policy to retain backups in + storage. + :type retention_policy: + ~azure.servicefabric.models.RetentionPolicyDescription + """ + + _validation = { + 'name': {'required': True}, + 'auto_restore_on_data_loss': {'required': True}, + 'max_incremental_backups': {'required': True, 'maximum': 255, 'minimum': 0}, + 'schedule': {'required': True}, + 'storage': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'auto_restore_on_data_loss': {'key': 'AutoRestoreOnDataLoss', 'type': 'bool'}, + 'max_incremental_backups': {'key': 'MaxIncrementalBackups', 'type': 'int'}, + 'schedule': {'key': 'Schedule', 'type': 'BackupScheduleDescription'}, + 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, + 'retention_policy': {'key': 'RetentionPolicy', 'type': 'RetentionPolicyDescription'}, + } + + def __init__(self, **kwargs): + super(BackupPolicyDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.auto_restore_on_data_loss = kwargs.get('auto_restore_on_data_loss', None) + self.max_incremental_backups = kwargs.get('max_incremental_backups', None) + self.schedule = kwargs.get('schedule', None) + self.storage = kwargs.get('storage', None) + self.retention_policy = kwargs.get('retention_policy', None) diff --git a/customSDK/servicefabric/models/backup_policy_description_py3.py b/customSDK/servicefabric/models/backup_policy_description_py3.py new file mode 100644 index 00000000..5890d796 --- /dev/null +++ b/customSDK/servicefabric/models/backup_policy_description_py3.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupPolicyDescription(Model): + """Describes a backup policy for configuring periodic backup. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name identifying this backup policy. + :type name: str + :param auto_restore_on_data_loss: Required. Specifies whether to trigger + restore automatically using the latest available backup in case the + partition experiences a data loss event. + :type auto_restore_on_data_loss: bool + :param max_incremental_backups: Required. Defines the maximum number of + incremental backups to be taken between two full backups. This is just the + upper limit. A full backup may be taken before specified number of + incremental backups are completed in one of the following conditions + - The replica has never taken a full backup since it has become primary, + - Some of the log records since the last backup has been truncated, or + - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. + :type max_incremental_backups: int + :param schedule: Required. Describes the backup schedule parameters. + :type schedule: ~azure.servicefabric.models.BackupScheduleDescription + :param storage: Required. Describes the details of backup storage where to + store the periodic backups. + :type storage: ~azure.servicefabric.models.BackupStorageDescription + :param retention_policy: Describes the policy to retain backups in + storage. + :type retention_policy: + ~azure.servicefabric.models.RetentionPolicyDescription + """ + + _validation = { + 'name': {'required': True}, + 'auto_restore_on_data_loss': {'required': True}, + 'max_incremental_backups': {'required': True, 'maximum': 255, 'minimum': 0}, + 'schedule': {'required': True}, + 'storage': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'auto_restore_on_data_loss': {'key': 'AutoRestoreOnDataLoss', 'type': 'bool'}, + 'max_incremental_backups': {'key': 'MaxIncrementalBackups', 'type': 'int'}, + 'schedule': {'key': 'Schedule', 'type': 'BackupScheduleDescription'}, + 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, + 'retention_policy': {'key': 'RetentionPolicy', 'type': 'RetentionPolicyDescription'}, + } + + def __init__(self, *, name: str, auto_restore_on_data_loss: bool, max_incremental_backups: int, schedule, storage, retention_policy=None, **kwargs) -> None: + super(BackupPolicyDescription, self).__init__(**kwargs) + self.name = name + self.auto_restore_on_data_loss = auto_restore_on_data_loss + self.max_incremental_backups = max_incremental_backups + self.schedule = schedule + self.storage = storage + self.retention_policy = retention_policy diff --git a/customSDK/servicefabric/models/backup_progress_info.py b/customSDK/servicefabric/models/backup_progress_info.py new file mode 100644 index 00000000..785b02ff --- /dev/null +++ b/customSDK/servicefabric/models/backup_progress_info.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupProgressInfo(Model): + """Describes the progress of a partition's backup. + + :param backup_state: Represents the current state of the partition backup + operation. Possible values include: 'Invalid', 'Accepted', + 'BackupInProgress', 'Success', 'Failure', 'Timeout' + :type backup_state: str or ~azure.servicefabric.models.BackupState + :param time_stamp_utc: TimeStamp in UTC when operation succeeded or + failed. + :type time_stamp_utc: datetime + :param backup_id: Unique ID of the newly created backup. + :type backup_id: str + :param backup_location: Location, relative to the backup store, of the + newly created backup. + :type backup_location: str + :param epoch_of_last_backup_record: Specifies the epoch of the last record + included in backup. + :type epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch + :param lsn_of_last_backup_record: The LSN of last record included in + backup. + :type lsn_of_last_backup_record: str + :param failure_error: Denotes the failure encountered in performing backup + operation. + :type failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'backup_state': {'key': 'BackupState', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, + 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__(self, **kwargs): + super(BackupProgressInfo, self).__init__(**kwargs) + self.backup_state = kwargs.get('backup_state', None) + self.time_stamp_utc = kwargs.get('time_stamp_utc', None) + self.backup_id = kwargs.get('backup_id', None) + self.backup_location = kwargs.get('backup_location', None) + self.epoch_of_last_backup_record = kwargs.get('epoch_of_last_backup_record', None) + self.lsn_of_last_backup_record = kwargs.get('lsn_of_last_backup_record', None) + self.failure_error = kwargs.get('failure_error', None) diff --git a/customSDK/servicefabric/models/backup_progress_info_py3.py b/customSDK/servicefabric/models/backup_progress_info_py3.py new file mode 100644 index 00000000..c00ce62e --- /dev/null +++ b/customSDK/servicefabric/models/backup_progress_info_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupProgressInfo(Model): + """Describes the progress of a partition's backup. + + :param backup_state: Represents the current state of the partition backup + operation. Possible values include: 'Invalid', 'Accepted', + 'BackupInProgress', 'Success', 'Failure', 'Timeout' + :type backup_state: str or ~azure.servicefabric.models.BackupState + :param time_stamp_utc: TimeStamp in UTC when operation succeeded or + failed. + :type time_stamp_utc: datetime + :param backup_id: Unique ID of the newly created backup. + :type backup_id: str + :param backup_location: Location, relative to the backup store, of the + newly created backup. + :type backup_location: str + :param epoch_of_last_backup_record: Specifies the epoch of the last record + included in backup. + :type epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch + :param lsn_of_last_backup_record: The LSN of last record included in + backup. + :type lsn_of_last_backup_record: str + :param failure_error: Denotes the failure encountered in performing backup + operation. + :type failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'backup_state': {'key': 'BackupState', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, + 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__(self, *, backup_state=None, time_stamp_utc=None, backup_id: str=None, backup_location: str=None, epoch_of_last_backup_record=None, lsn_of_last_backup_record: str=None, failure_error=None, **kwargs) -> None: + super(BackupProgressInfo, self).__init__(**kwargs) + self.backup_state = backup_state + self.time_stamp_utc = time_stamp_utc + self.backup_id = backup_id + self.backup_location = backup_location + self.epoch_of_last_backup_record = epoch_of_last_backup_record + self.lsn_of_last_backup_record = lsn_of_last_backup_record + self.failure_error = failure_error diff --git a/customSDK/servicefabric/models/backup_schedule_description.py b/customSDK/servicefabric/models/backup_schedule_description.py new file mode 100644 index 00000000..5aba62aa --- /dev/null +++ b/customSDK/servicefabric/models/backup_schedule_description.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupScheduleDescription(Model): + """Describes the backup schedule parameters. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FrequencyBasedBackupScheduleDescription, + TimeBasedBackupScheduleDescription + + All required parameters must be populated in order to send to Azure. + + :param schedule_kind: Required. Constant filled by server. + :type schedule_kind: str + """ + + _validation = { + 'schedule_kind': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + } + + _subtype_map = { + 'schedule_kind': {'FrequencyBased': 'FrequencyBasedBackupScheduleDescription', 'TimeBased': 'TimeBasedBackupScheduleDescription'} + } + + def __init__(self, **kwargs): + super(BackupScheduleDescription, self).__init__(**kwargs) + self.schedule_kind = None diff --git a/customSDK/servicefabric/models/backup_schedule_description_py3.py b/customSDK/servicefabric/models/backup_schedule_description_py3.py new file mode 100644 index 00000000..cb3b824e --- /dev/null +++ b/customSDK/servicefabric/models/backup_schedule_description_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupScheduleDescription(Model): + """Describes the backup schedule parameters. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FrequencyBasedBackupScheduleDescription, + TimeBasedBackupScheduleDescription + + All required parameters must be populated in order to send to Azure. + + :param schedule_kind: Required. Constant filled by server. + :type schedule_kind: str + """ + + _validation = { + 'schedule_kind': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + } + + _subtype_map = { + 'schedule_kind': {'FrequencyBased': 'FrequencyBasedBackupScheduleDescription', 'TimeBased': 'TimeBasedBackupScheduleDescription'} + } + + def __init__(self, **kwargs) -> None: + super(BackupScheduleDescription, self).__init__(**kwargs) + self.schedule_kind = None diff --git a/customSDK/servicefabric/models/backup_storage_description.py b/customSDK/servicefabric/models/backup_storage_description.py new file mode 100644 index 00000000..a22407e6 --- /dev/null +++ b/customSDK/servicefabric/models/backup_storage_description.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupStorageDescription(Model): + """Describes the parameters for the backup storage. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBlobBackupStorageDescription, + FileShareBackupStorageDescription, DsmsAzureBlobBackupStorageDescription, + ManagedIdentityAzureBlobBackupStorageDescription + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + """ + + _validation = { + 'storage_kind': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + } + + _subtype_map = { + 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription', 'ManagedIdentityAzureBlobStore': 'ManagedIdentityAzureBlobBackupStorageDescription'} + } + + def __init__(self, **kwargs): + super(BackupStorageDescription, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.storage_kind = None diff --git a/customSDK/servicefabric/models/backup_storage_description_py3.py b/customSDK/servicefabric/models/backup_storage_description_py3.py new file mode 100644 index 00000000..da0d683d --- /dev/null +++ b/customSDK/servicefabric/models/backup_storage_description_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupStorageDescription(Model): + """Describes the parameters for the backup storage. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBlobBackupStorageDescription, + FileShareBackupStorageDescription, DsmsAzureBlobBackupStorageDescription, + ManagedIdentityAzureBlobBackupStorageDescription + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + """ + + _validation = { + 'storage_kind': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + } + + _subtype_map = { + 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription', 'ManagedIdentityAzureBlobStore': 'ManagedIdentityAzureBlobBackupStorageDescription'} + } + + def __init__(self, *, friendly_name: str=None, **kwargs) -> None: + super(BackupStorageDescription, self).__init__(**kwargs) + self.friendly_name = friendly_name + self.storage_kind = None diff --git a/customSDK/servicefabric/models/backup_suspension_info.py b/customSDK/servicefabric/models/backup_suspension_info.py new file mode 100644 index 00000000..a93a7b88 --- /dev/null +++ b/customSDK/servicefabric/models/backup_suspension_info.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupSuspensionInfo(Model): + """Describes the backup suspension details. + + :param is_suspended: Indicates whether periodic backup is suspended at + this level or not. + :type is_suspended: bool + :param suspension_inherited_from: Specifies the scope at which the backup + suspension was applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type suspension_inherited_from: str or + ~azure.servicefabric.models.BackupSuspensionScope + """ + + _attribute_map = { + 'is_suspended': {'key': 'IsSuspended', 'type': 'bool'}, + 'suspension_inherited_from': {'key': 'SuspensionInheritedFrom', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BackupSuspensionInfo, self).__init__(**kwargs) + self.is_suspended = kwargs.get('is_suspended', None) + self.suspension_inherited_from = kwargs.get('suspension_inherited_from', None) diff --git a/customSDK/servicefabric/models/backup_suspension_info_py3.py b/customSDK/servicefabric/models/backup_suspension_info_py3.py new file mode 100644 index 00000000..a384ce93 --- /dev/null +++ b/customSDK/servicefabric/models/backup_suspension_info_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupSuspensionInfo(Model): + """Describes the backup suspension details. + + :param is_suspended: Indicates whether periodic backup is suspended at + this level or not. + :type is_suspended: bool + :param suspension_inherited_from: Specifies the scope at which the backup + suspension was applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type suspension_inherited_from: str or + ~azure.servicefabric.models.BackupSuspensionScope + """ + + _attribute_map = { + 'is_suspended': {'key': 'IsSuspended', 'type': 'bool'}, + 'suspension_inherited_from': {'key': 'SuspensionInheritedFrom', 'type': 'str'}, + } + + def __init__(self, *, is_suspended: bool=None, suspension_inherited_from=None, **kwargs) -> None: + super(BackupSuspensionInfo, self).__init__(**kwargs) + self.is_suspended = is_suspended + self.suspension_inherited_from = suspension_inherited_from diff --git a/customSDK/servicefabric/models/basic_retention_policy_description.py b/customSDK/servicefabric/models/basic_retention_policy_description.py new file mode 100644 index 00000000..653dec49 --- /dev/null +++ b/customSDK/servicefabric/models/basic_retention_policy_description.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .retention_policy_description import RetentionPolicyDescription + + +class BasicRetentionPolicyDescription(RetentionPolicyDescription): + """Describes basic retention policy. + + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. + :type retention_policy_type: str + :param retention_duration: Required. It is the minimum duration for which + a backup created, will remain stored in the storage and might get deleted + after that span of time. It should be specified in ISO8601 format. + :type retention_duration: timedelta + :param minimum_number_of_backups: It is the minimum number of backups to + be retained at any point of time. If specified with a non zero value, + backups will not be deleted even if the backups have gone past retention + duration and have number of backups less than or equal to it. + :type minimum_number_of_backups: int + """ + + _validation = { + 'retention_policy_type': {'required': True}, + 'retention_duration': {'required': True}, + 'minimum_number_of_backups': {'minimum': 0}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, + 'retention_duration': {'key': 'RetentionDuration', 'type': 'duration'}, + 'minimum_number_of_backups': {'key': 'MinimumNumberOfBackups', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BasicRetentionPolicyDescription, self).__init__(**kwargs) + self.retention_duration = kwargs.get('retention_duration', None) + self.minimum_number_of_backups = kwargs.get('minimum_number_of_backups', None) + self.retention_policy_type = 'Basic' diff --git a/customSDK/servicefabric/models/basic_retention_policy_description_py3.py b/customSDK/servicefabric/models/basic_retention_policy_description_py3.py new file mode 100644 index 00000000..5abb36a8 --- /dev/null +++ b/customSDK/servicefabric/models/basic_retention_policy_description_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .retention_policy_description_py3 import RetentionPolicyDescription + + +class BasicRetentionPolicyDescription(RetentionPolicyDescription): + """Describes basic retention policy. + + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. + :type retention_policy_type: str + :param retention_duration: Required. It is the minimum duration for which + a backup created, will remain stored in the storage and might get deleted + after that span of time. It should be specified in ISO8601 format. + :type retention_duration: timedelta + :param minimum_number_of_backups: It is the minimum number of backups to + be retained at any point of time. If specified with a non zero value, + backups will not be deleted even if the backups have gone past retention + duration and have number of backups less than or equal to it. + :type minimum_number_of_backups: int + """ + + _validation = { + 'retention_policy_type': {'required': True}, + 'retention_duration': {'required': True}, + 'minimum_number_of_backups': {'minimum': 0}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, + 'retention_duration': {'key': 'RetentionDuration', 'type': 'duration'}, + 'minimum_number_of_backups': {'key': 'MinimumNumberOfBackups', 'type': 'int'}, + } + + def __init__(self, *, retention_duration, minimum_number_of_backups: int=None, **kwargs) -> None: + super(BasicRetentionPolicyDescription, self).__init__(**kwargs) + self.retention_duration = retention_duration + self.minimum_number_of_backups = minimum_number_of_backups + self.retention_policy_type = 'Basic' diff --git a/customSDK/servicefabric/models/binary_property_value.py b/customSDK/servicefabric/models/binary_property_value.py new file mode 100644 index 00000000..4dbec46a --- /dev/null +++ b/customSDK/servicefabric/models/binary_property_value.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_value import PropertyValue + + +class BinaryPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Binary. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. Array of bytes to be sent as an integer array. Each + element of array is a number between 0 and 255. + :type data: list[int] + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': '[int]'}, + } + + def __init__(self, **kwargs): + super(BinaryPropertyValue, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.kind = 'Binary' diff --git a/customSDK/servicefabric/models/binary_property_value_py3.py b/customSDK/servicefabric/models/binary_property_value_py3.py new file mode 100644 index 00000000..6435ad17 --- /dev/null +++ b/customSDK/servicefabric/models/binary_property_value_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_value_py3 import PropertyValue + + +class BinaryPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Binary. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. Array of bytes to be sent as an integer array. Each + element of array is a number between 0 and 255. + :type data: list[int] + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': '[int]'}, + } + + def __init__(self, *, data, **kwargs) -> None: + super(BinaryPropertyValue, self).__init__(**kwargs) + self.data = data + self.kind = 'Binary' diff --git a/customSDK/servicefabric/models/chaos.py b/customSDK/servicefabric/models/chaos.py new file mode 100644 index 00000000..db9f97fb --- /dev/null +++ b/customSDK/servicefabric/models/chaos.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Chaos(Model): + """Contains a description of Chaos. + + :param chaos_parameters: If Chaos is running, these are the parameters + Chaos is running with. + :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters + :param status: Current status of the Chaos run. Possible values include: + 'Invalid', 'Running', 'Stopped' + :type status: str or ~azure.servicefabric.models.ChaosStatus + :param schedule_status: Current status of the schedule. Possible values + include: 'Invalid', 'Stopped', 'Active', 'Expired', 'Pending' + :type schedule_status: str or + ~azure.servicefabric.models.ChaosScheduleStatus + """ + + _attribute_map = { + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'schedule_status': {'key': 'ScheduleStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Chaos, self).__init__(**kwargs) + self.chaos_parameters = kwargs.get('chaos_parameters', None) + self.status = kwargs.get('status', None) + self.schedule_status = kwargs.get('schedule_status', None) diff --git a/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event.py b/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event.py new file mode 100644 index 00000000..7b4396d1 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event import ApplicationEvent + + +class ChaosCodePackageRestartScheduledEvent(ApplicationEvent): + """Chaos Restart Code Package Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param service_manifest_name: Required. Service manifest name. + :type service_manifest_name: str + :param code_package_name: Required. Code package name. + :type code_package_name: str + :param service_package_activation_id: Required. Id of Service package + activation. + :type service_package_activation_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'node_name': {'required': True}, + 'service_manifest_name': {'required': True}, + 'code_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChaosCodePackageRestartScheduledEvent, self).__init__(**kwargs) + self.fault_group_id = kwargs.get('fault_group_id', None) + self.fault_id = kwargs.get('fault_id', None) + self.node_name = kwargs.get('node_name', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.code_package_name = kwargs.get('code_package_name', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.kind = 'ChaosCodePackageRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event_py3.py new file mode 100644 index 00000000..a9a80982 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event_py3.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event_py3 import ApplicationEvent + + +class ChaosCodePackageRestartScheduledEvent(ApplicationEvent): + """Chaos Restart Code Package Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param service_manifest_name: Required. Service manifest name. + :type service_manifest_name: str + :param code_package_name: Required. Code package name. + :type code_package_name: str + :param service_package_activation_id: Required. Id of Service package + activation. + :type service_package_activation_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'node_name': {'required': True}, + 'service_manifest_name': {'required': True}, + 'code_package_name': {'required': True}, + 'service_package_activation_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, fault_group_id: str, fault_id: str, node_name: str, service_manifest_name: str, code_package_name: str, service_package_activation_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ChaosCodePackageRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.fault_group_id = fault_group_id + self.fault_id = fault_id + self.node_name = node_name + self.service_manifest_name = service_manifest_name + self.code_package_name = code_package_name + self.service_package_activation_id = service_package_activation_id + self.kind = 'ChaosCodePackageRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_context.py b/customSDK/servicefabric/models/chaos_context.py new file mode 100644 index 00000000..d8d7cc59 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_context.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosContext(Model): + """Describes a map, which is a collection of (string, string) type key-value + pairs. The map can be used to record information about + the Chaos run. There cannot be more than 100 such pairs and each string + (key or value) can be at most 4095 characters long. + This map is set by the starter of the Chaos run to optionally store the + context about the specific run. + + :param map: Describes a map that contains a collection of + ChaosContextMapItem's. + :type map: dict[str, str] + """ + + _attribute_map = { + 'map': {'key': 'Map', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ChaosContext, self).__init__(**kwargs) + self.map = kwargs.get('map', None) diff --git a/customSDK/servicefabric/models/chaos_context_py3.py b/customSDK/servicefabric/models/chaos_context_py3.py new file mode 100644 index 00000000..85ea13ab --- /dev/null +++ b/customSDK/servicefabric/models/chaos_context_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosContext(Model): + """Describes a map, which is a collection of (string, string) type key-value + pairs. The map can be used to record information about + the Chaos run. There cannot be more than 100 such pairs and each string + (key or value) can be at most 4095 characters long. + This map is set by the starter of the Chaos run to optionally store the + context about the specific run. + + :param map: Describes a map that contains a collection of + ChaosContextMapItem's. + :type map: dict[str, str] + """ + + _attribute_map = { + 'map': {'key': 'Map', 'type': '{str}'}, + } + + def __init__(self, *, map=None, **kwargs) -> None: + super(ChaosContext, self).__init__(**kwargs) + self.map = map diff --git a/customSDK/servicefabric/models/chaos_event.py b/customSDK/servicefabric/models/chaos_event.py new file mode 100644 index 00000000..8d0de7a8 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_event.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosEvent(Model): + """Represents an event generated during a Chaos run. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ExecutingFaultsChaosEvent, StartedChaosEvent, + StoppedChaosEvent, TestErrorChaosEvent, ValidationFailedChaosEvent, + WaitingChaosEvent + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ExecutingFaults': 'ExecutingFaultsChaosEvent', 'Started': 'StartedChaosEvent', 'Stopped': 'StoppedChaosEvent', 'TestError': 'TestErrorChaosEvent', 'ValidationFailed': 'ValidationFailedChaosEvent', 'Waiting': 'WaitingChaosEvent'} + } + + def __init__(self, **kwargs): + super(ChaosEvent, self).__init__(**kwargs) + self.time_stamp_utc = kwargs.get('time_stamp_utc', None) + self.kind = None diff --git a/customSDK/servicefabric/models/chaos_event_py3.py b/customSDK/servicefabric/models/chaos_event_py3.py new file mode 100644 index 00000000..31f21174 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_event_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosEvent(Model): + """Represents an event generated during a Chaos run. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ExecutingFaultsChaosEvent, StartedChaosEvent, + StoppedChaosEvent, TestErrorChaosEvent, ValidationFailedChaosEvent, + WaitingChaosEvent + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ExecutingFaults': 'ExecutingFaultsChaosEvent', 'Started': 'StartedChaosEvent', 'Stopped': 'StoppedChaosEvent', 'TestError': 'TestErrorChaosEvent', 'ValidationFailed': 'ValidationFailedChaosEvent', 'Waiting': 'WaitingChaosEvent'} + } + + def __init__(self, *, time_stamp_utc, **kwargs) -> None: + super(ChaosEvent, self).__init__(**kwargs) + self.time_stamp_utc = time_stamp_utc + self.kind = None diff --git a/customSDK/servicefabric/models/chaos_event_wrapper.py b/customSDK/servicefabric/models/chaos_event_wrapper.py new file mode 100644 index 00000000..0c56d697 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_event_wrapper.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosEventWrapper(Model): + """Wrapper object for Chaos event. + + :param chaos_event: Represents an event generated during a Chaos run. + :type chaos_event: ~azure.servicefabric.models.ChaosEvent + """ + + _attribute_map = { + 'chaos_event': {'key': 'ChaosEvent', 'type': 'ChaosEvent'}, + } + + def __init__(self, **kwargs): + super(ChaosEventWrapper, self).__init__(**kwargs) + self.chaos_event = kwargs.get('chaos_event', None) diff --git a/customSDK/servicefabric/models/chaos_event_wrapper_py3.py b/customSDK/servicefabric/models/chaos_event_wrapper_py3.py new file mode 100644 index 00000000..e1c68e96 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_event_wrapper_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosEventWrapper(Model): + """Wrapper object for Chaos event. + + :param chaos_event: Represents an event generated during a Chaos run. + :type chaos_event: ~azure.servicefabric.models.ChaosEvent + """ + + _attribute_map = { + 'chaos_event': {'key': 'ChaosEvent', 'type': 'ChaosEvent'}, + } + + def __init__(self, *, chaos_event=None, **kwargs) -> None: + super(ChaosEventWrapper, self).__init__(**kwargs) + self.chaos_event = chaos_event diff --git a/customSDK/servicefabric/models/chaos_events_segment.py b/customSDK/servicefabric/models/chaos_events_segment.py new file mode 100644 index 00000000..a6373aa6 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_events_segment.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosEventsSegment(Model): + """Contains the list of Chaos events and the continuation token to get the + next segment. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param history: List of Chaos events that meet the user-supplied criteria. + :type history: list[~azure.servicefabric.models.ChaosEventWrapper] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'history': {'key': 'History', 'type': '[ChaosEventWrapper]'}, + } + + def __init__(self, **kwargs): + super(ChaosEventsSegment, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.history = kwargs.get('history', None) diff --git a/customSDK/servicefabric/models/chaos_events_segment_py3.py b/customSDK/servicefabric/models/chaos_events_segment_py3.py new file mode 100644 index 00000000..e916ca94 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_events_segment_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosEventsSegment(Model): + """Contains the list of Chaos events and the continuation token to get the + next segment. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param history: List of Chaos events that meet the user-supplied criteria. + :type history: list[~azure.servicefabric.models.ChaosEventWrapper] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'history': {'key': 'History', 'type': '[ChaosEventWrapper]'}, + } + + def __init__(self, *, continuation_token: str=None, history=None, **kwargs) -> None: + super(ChaosEventsSegment, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.history = history diff --git a/customSDK/servicefabric/models/chaos_node_restart_scheduled_event.py b/customSDK/servicefabric/models/chaos_node_restart_scheduled_event.py new file mode 100644 index 00000000..4bbcde8f --- /dev/null +++ b/customSDK/servicefabric/models/chaos_node_restart_scheduled_event.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event import NodeEvent + + +class ChaosNodeRestartScheduledEvent(NodeEvent): + """Chaos Restart Node Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: Required. Id of Node instance. + :type node_instance_id: long + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChaosNodeRestartScheduledEvent, self).__init__(**kwargs) + self.node_instance_id = kwargs.get('node_instance_id', None) + self.fault_group_id = kwargs.get('fault_group_id', None) + self.fault_id = kwargs.get('fault_id', None) + self.kind = 'ChaosNodeRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_node_restart_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_node_restart_scheduled_event_py3.py new file mode 100644 index 00000000..780e31f3 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_node_restart_scheduled_event_py3.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event_py3 import NodeEvent + + +class ChaosNodeRestartScheduledEvent(NodeEvent): + """Chaos Restart Node Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: Required. Id of Node instance. + :type node_instance_id: long + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance_id: int, fault_group_id: str, fault_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ChaosNodeRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance_id = node_instance_id + self.fault_group_id = fault_group_id + self.fault_id = fault_id + self.kind = 'ChaosNodeRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_parameters.py b/customSDK/servicefabric/models/chaos_parameters.py new file mode 100644 index 00000000..ed32218f --- /dev/null +++ b/customSDK/servicefabric/models/chaos_parameters.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosParameters(Model): + """Defines all the parameters to configure a Chaos run. + + :param time_to_run_in_seconds: Total time (in seconds) for which Chaos + will run before automatically stopping. The maximum allowed value is + 4,294,967,295 (System.UInt32.MaxValue). Default value: "4294967295" . + :type time_to_run_in_seconds: str + :param max_cluster_stabilization_timeout_in_seconds: The maximum amount of + time to wait for all cluster entities to become stable and healthy. Chaos + executes in iterations and at the start of each iteration it validates the + health of cluster entities. + During validation if a cluster entity is not stable and healthy within + MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation + failed event. Default value: 60 . + :type max_cluster_stabilization_timeout_in_seconds: long + :param max_concurrent_faults: MaxConcurrentFaults is the maximum number of + concurrent faults induced per iteration. + Chaos executes in iterations and two consecutive iterations are separated + by a validation phase. + The higher the concurrency, the more aggressive the injection of faults, + leading to inducing more complex series of states to uncover bugs. + The recommendation is to start with a value of 2 or 3 and to exercise + caution while moving up. Default value: 1 . + :type max_concurrent_faults: long + :param enable_move_replica_faults: Enables or disables the move primary + and move secondary faults. Default value: True . + :type enable_move_replica_faults: bool + :param wait_time_between_faults_in_seconds: Wait time (in seconds) between + consecutive faults within a single iteration. + The larger the value, the lower the overlapping between faults and the + simpler the sequence of state transitions that the cluster goes through. + The recommendation is to start with a value between 1 and 5 and exercise + caution while moving up. Default value: 20 . + :type wait_time_between_faults_in_seconds: long + :param wait_time_between_iterations_in_seconds: Time-separation (in + seconds) between two consecutive iterations of Chaos. + The larger the value, the lower the fault injection rate. Default value: + 30 . + :type wait_time_between_iterations_in_seconds: long + :param cluster_health_policy: Passed-in cluster health policy is used to + validate health of the cluster in between Chaos iterations. If the cluster + health is in error or if an unexpected exception happens during fault + execution--to provide the cluster with some time to recuperate--Chaos will + wait for 30 minutes before the next health-check. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param context: Describes a map, which is a collection of (string, string) + type key-value pairs. The map can be used to record information about + the Chaos run. There cannot be more than 100 such pairs and each string + (key or value) can be at most 4095 characters long. + This map is set by the starter of the Chaos run to optionally store the + context about the specific run. + :type context: ~azure.servicefabric.models.ChaosContext + :param chaos_target_filter: List of cluster entities to target for Chaos + faults. + This filter can be used to target Chaos faults only to certain node types + or only to certain application instances. If ChaosTargetFilter is not + used, Chaos faults all cluster entities. + If ChaosTargetFilter is used, Chaos faults only the entities that meet the + ChaosTargetFilter specification. + :type chaos_target_filter: ~azure.servicefabric.models.ChaosTargetFilter + """ + + _validation = { + 'max_cluster_stabilization_timeout_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'max_concurrent_faults': {'maximum': 4294967295, 'minimum': 0}, + 'wait_time_between_faults_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'wait_time_between_iterations_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'str'}, + 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'long'}, + 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, + 'enable_move_replica_faults': {'key': 'EnableMoveReplicaFaults', 'type': 'bool'}, + 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'long'}, + 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'long'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'context': {'key': 'Context', 'type': 'ChaosContext'}, + 'chaos_target_filter': {'key': 'ChaosTargetFilter', 'type': 'ChaosTargetFilter'}, + } + + def __init__(self, **kwargs): + super(ChaosParameters, self).__init__(**kwargs) + self.time_to_run_in_seconds = kwargs.get('time_to_run_in_seconds', "4294967295") + self.max_cluster_stabilization_timeout_in_seconds = kwargs.get('max_cluster_stabilization_timeout_in_seconds', 60) + self.max_concurrent_faults = kwargs.get('max_concurrent_faults', 1) + self.enable_move_replica_faults = kwargs.get('enable_move_replica_faults', True) + self.wait_time_between_faults_in_seconds = kwargs.get('wait_time_between_faults_in_seconds', 20) + self.wait_time_between_iterations_in_seconds = kwargs.get('wait_time_between_iterations_in_seconds', 30) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.context = kwargs.get('context', None) + self.chaos_target_filter = kwargs.get('chaos_target_filter', None) diff --git a/customSDK/servicefabric/models/chaos_parameters_dictionary_item.py b/customSDK/servicefabric/models/chaos_parameters_dictionary_item.py new file mode 100644 index 00000000..e2b07e8b --- /dev/null +++ b/customSDK/servicefabric/models/chaos_parameters_dictionary_item.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosParametersDictionaryItem(Model): + """Defines an item in ChaosParametersDictionary of the Chaos Schedule. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key identifying the Chaos Parameter in the + dictionary. This key is referenced by Chaos Schedule Jobs. + :type key: str + :param value: Required. Defines all the parameters to configure a Chaos + run. + :type value: ~azure.servicefabric.models.ChaosParameters + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ChaosParameters'}, + } + + def __init__(self, **kwargs): + super(ChaosParametersDictionaryItem, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/chaos_parameters_dictionary_item_py3.py b/customSDK/servicefabric/models/chaos_parameters_dictionary_item_py3.py new file mode 100644 index 00000000..067d1936 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_parameters_dictionary_item_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosParametersDictionaryItem(Model): + """Defines an item in ChaosParametersDictionary of the Chaos Schedule. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key identifying the Chaos Parameter in the + dictionary. This key is referenced by Chaos Schedule Jobs. + :type key: str + :param value: Required. Defines all the parameters to configure a Chaos + run. + :type value: ~azure.servicefabric.models.ChaosParameters + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ChaosParameters'}, + } + + def __init__(self, *, key: str, value, **kwargs) -> None: + super(ChaosParametersDictionaryItem, self).__init__(**kwargs) + self.key = key + self.value = value diff --git a/customSDK/servicefabric/models/chaos_parameters_py3.py b/customSDK/servicefabric/models/chaos_parameters_py3.py new file mode 100644 index 00000000..ed9ab927 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_parameters_py3.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosParameters(Model): + """Defines all the parameters to configure a Chaos run. + + :param time_to_run_in_seconds: Total time (in seconds) for which Chaos + will run before automatically stopping. The maximum allowed value is + 4,294,967,295 (System.UInt32.MaxValue). Default value: "4294967295" . + :type time_to_run_in_seconds: str + :param max_cluster_stabilization_timeout_in_seconds: The maximum amount of + time to wait for all cluster entities to become stable and healthy. Chaos + executes in iterations and at the start of each iteration it validates the + health of cluster entities. + During validation if a cluster entity is not stable and healthy within + MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation + failed event. Default value: 60 . + :type max_cluster_stabilization_timeout_in_seconds: long + :param max_concurrent_faults: MaxConcurrentFaults is the maximum number of + concurrent faults induced per iteration. + Chaos executes in iterations and two consecutive iterations are separated + by a validation phase. + The higher the concurrency, the more aggressive the injection of faults, + leading to inducing more complex series of states to uncover bugs. + The recommendation is to start with a value of 2 or 3 and to exercise + caution while moving up. Default value: 1 . + :type max_concurrent_faults: long + :param enable_move_replica_faults: Enables or disables the move primary + and move secondary faults. Default value: True . + :type enable_move_replica_faults: bool + :param wait_time_between_faults_in_seconds: Wait time (in seconds) between + consecutive faults within a single iteration. + The larger the value, the lower the overlapping between faults and the + simpler the sequence of state transitions that the cluster goes through. + The recommendation is to start with a value between 1 and 5 and exercise + caution while moving up. Default value: 20 . + :type wait_time_between_faults_in_seconds: long + :param wait_time_between_iterations_in_seconds: Time-separation (in + seconds) between two consecutive iterations of Chaos. + The larger the value, the lower the fault injection rate. Default value: + 30 . + :type wait_time_between_iterations_in_seconds: long + :param cluster_health_policy: Passed-in cluster health policy is used to + validate health of the cluster in between Chaos iterations. If the cluster + health is in error or if an unexpected exception happens during fault + execution--to provide the cluster with some time to recuperate--Chaos will + wait for 30 minutes before the next health-check. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param context: Describes a map, which is a collection of (string, string) + type key-value pairs. The map can be used to record information about + the Chaos run. There cannot be more than 100 such pairs and each string + (key or value) can be at most 4095 characters long. + This map is set by the starter of the Chaos run to optionally store the + context about the specific run. + :type context: ~azure.servicefabric.models.ChaosContext + :param chaos_target_filter: List of cluster entities to target for Chaos + faults. + This filter can be used to target Chaos faults only to certain node types + or only to certain application instances. If ChaosTargetFilter is not + used, Chaos faults all cluster entities. + If ChaosTargetFilter is used, Chaos faults only the entities that meet the + ChaosTargetFilter specification. + :type chaos_target_filter: ~azure.servicefabric.models.ChaosTargetFilter + """ + + _validation = { + 'max_cluster_stabilization_timeout_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'max_concurrent_faults': {'maximum': 4294967295, 'minimum': 0}, + 'wait_time_between_faults_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'wait_time_between_iterations_in_seconds': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'str'}, + 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'long'}, + 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, + 'enable_move_replica_faults': {'key': 'EnableMoveReplicaFaults', 'type': 'bool'}, + 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'long'}, + 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'long'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'context': {'key': 'Context', 'type': 'ChaosContext'}, + 'chaos_target_filter': {'key': 'ChaosTargetFilter', 'type': 'ChaosTargetFilter'}, + } + + def __init__(self, *, time_to_run_in_seconds: str="4294967295", max_cluster_stabilization_timeout_in_seconds: int=60, max_concurrent_faults: int=1, enable_move_replica_faults: bool=True, wait_time_between_faults_in_seconds: int=20, wait_time_between_iterations_in_seconds: int=30, cluster_health_policy=None, context=None, chaos_target_filter=None, **kwargs) -> None: + super(ChaosParameters, self).__init__(**kwargs) + self.time_to_run_in_seconds = time_to_run_in_seconds + self.max_cluster_stabilization_timeout_in_seconds = max_cluster_stabilization_timeout_in_seconds + self.max_concurrent_faults = max_concurrent_faults + self.enable_move_replica_faults = enable_move_replica_faults + self.wait_time_between_faults_in_seconds = wait_time_between_faults_in_seconds + self.wait_time_between_iterations_in_seconds = wait_time_between_iterations_in_seconds + self.cluster_health_policy = cluster_health_policy + self.context = context + self.chaos_target_filter = chaos_target_filter diff --git a/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event.py b/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event.py new file mode 100644 index 00000000..2275bc00 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_event import PartitionEvent + + +class ChaosPartitionPrimaryMoveScheduledEvent(PartitionEvent): + """Chaos Move Primary Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param service_name: Required. Service name. + :type service_name: str + :param node_to: Required. The name of a Service Fabric node. + :type node_to: str + :param forced_move: Required. Indicates a forced move. + :type forced_move: bool + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_name': {'required': True}, + 'node_to': {'required': True}, + 'forced_move': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'node_to': {'key': 'NodeTo', 'type': 'str'}, + 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ChaosPartitionPrimaryMoveScheduledEvent, self).__init__(**kwargs) + self.fault_group_id = kwargs.get('fault_group_id', None) + self.fault_id = kwargs.get('fault_id', None) + self.service_name = kwargs.get('service_name', None) + self.node_to = kwargs.get('node_to', None) + self.forced_move = kwargs.get('forced_move', None) + self.kind = 'ChaosPartitionPrimaryMoveScheduled' diff --git a/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event_py3.py new file mode 100644 index 00000000..e6d714d6 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event_py3.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_event_py3 import PartitionEvent + + +class ChaosPartitionPrimaryMoveScheduledEvent(PartitionEvent): + """Chaos Move Primary Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param service_name: Required. Service name. + :type service_name: str + :param node_to: Required. The name of a Service Fabric node. + :type node_to: str + :param forced_move: Required. Indicates a forced move. + :type forced_move: bool + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_name': {'required': True}, + 'node_to': {'required': True}, + 'forced_move': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'node_to': {'key': 'NodeTo', 'type': 'str'}, + 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, fault_group_id: str, fault_id: str, service_name: str, node_to: str, forced_move: bool, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ChaosPartitionPrimaryMoveScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.fault_group_id = fault_group_id + self.fault_id = fault_id + self.service_name = service_name + self.node_to = node_to + self.forced_move = forced_move + self.kind = 'ChaosPartitionPrimaryMoveScheduled' diff --git a/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event.py b/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event.py new file mode 100644 index 00000000..89a70127 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_event import PartitionEvent + + +class ChaosPartitionSecondaryMoveScheduledEvent(PartitionEvent): + """Chaos Move Secondary Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param service_name: Required. Service name. + :type service_name: str + :param source_node: Required. The name of a Service Fabric node. + :type source_node: str + :param destination_node: Required. The name of a Service Fabric node. + :type destination_node: str + :param forced_move: Required. Indicates a forced move. + :type forced_move: bool + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_name': {'required': True}, + 'source_node': {'required': True}, + 'destination_node': {'required': True}, + 'forced_move': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'source_node': {'key': 'SourceNode', 'type': 'str'}, + 'destination_node': {'key': 'DestinationNode', 'type': 'str'}, + 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ChaosPartitionSecondaryMoveScheduledEvent, self).__init__(**kwargs) + self.fault_group_id = kwargs.get('fault_group_id', None) + self.fault_id = kwargs.get('fault_id', None) + self.service_name = kwargs.get('service_name', None) + self.source_node = kwargs.get('source_node', None) + self.destination_node = kwargs.get('destination_node', None) + self.forced_move = kwargs.get('forced_move', None) + self.kind = 'ChaosPartitionSecondaryMoveScheduled' diff --git a/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event_py3.py new file mode 100644 index 00000000..c385d53d --- /dev/null +++ b/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event_py3.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_event_py3 import PartitionEvent + + +class ChaosPartitionSecondaryMoveScheduledEvent(PartitionEvent): + """Chaos Move Secondary Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param service_name: Required. Service name. + :type service_name: str + :param source_node: Required. The name of a Service Fabric node. + :type source_node: str + :param destination_node: Required. The name of a Service Fabric node. + :type destination_node: str + :param forced_move: Required. Indicates a forced move. + :type forced_move: bool + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_name': {'required': True}, + 'source_node': {'required': True}, + 'destination_node': {'required': True}, + 'forced_move': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'source_node': {'key': 'SourceNode', 'type': 'str'}, + 'destination_node': {'key': 'DestinationNode', 'type': 'str'}, + 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, fault_group_id: str, fault_id: str, service_name: str, source_node: str, destination_node: str, forced_move: bool, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ChaosPartitionSecondaryMoveScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.fault_group_id = fault_group_id + self.fault_id = fault_id + self.service_name = service_name + self.source_node = source_node + self.destination_node = destination_node + self.forced_move = forced_move + self.kind = 'ChaosPartitionSecondaryMoveScheduled' diff --git a/customSDK/servicefabric/models/chaos_py3.py b/customSDK/servicefabric/models/chaos_py3.py new file mode 100644 index 00000000..ab496617 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Chaos(Model): + """Contains a description of Chaos. + + :param chaos_parameters: If Chaos is running, these are the parameters + Chaos is running with. + :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters + :param status: Current status of the Chaos run. Possible values include: + 'Invalid', 'Running', 'Stopped' + :type status: str or ~azure.servicefabric.models.ChaosStatus + :param schedule_status: Current status of the schedule. Possible values + include: 'Invalid', 'Stopped', 'Active', 'Expired', 'Pending' + :type schedule_status: str or + ~azure.servicefabric.models.ChaosScheduleStatus + """ + + _attribute_map = { + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'schedule_status': {'key': 'ScheduleStatus', 'type': 'str'}, + } + + def __init__(self, *, chaos_parameters=None, status=None, schedule_status=None, **kwargs) -> None: + super(Chaos, self).__init__(**kwargs) + self.chaos_parameters = chaos_parameters + self.status = status + self.schedule_status = schedule_status diff --git a/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event.py b/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event.py new file mode 100644 index 00000000..3ac78109 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_event import ReplicaEvent + + +class ChaosReplicaRemovalScheduledEvent(ReplicaEvent): + """Chaos Remove Replica Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param service_uri: Required. Service name. + :type service_uri: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChaosReplicaRemovalScheduledEvent, self).__init__(**kwargs) + self.fault_group_id = kwargs.get('fault_group_id', None) + self.fault_id = kwargs.get('fault_id', None) + self.service_uri = kwargs.get('service_uri', None) + self.kind = 'ChaosReplicaRemovalScheduled' diff --git a/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event_py3.py new file mode 100644 index 00000000..81db7b07 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event_py3.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_event_py3 import ReplicaEvent + + +class ChaosReplicaRemovalScheduledEvent(ReplicaEvent): + """Chaos Remove Replica Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param service_uri: Required. Service name. + :type service_uri: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, fault_group_id: str, fault_id: str, service_uri: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ChaosReplicaRemovalScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.fault_group_id = fault_group_id + self.fault_id = fault_id + self.service_uri = service_uri + self.kind = 'ChaosReplicaRemovalScheduled' diff --git a/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event.py b/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event.py new file mode 100644 index 00000000..c877e86c --- /dev/null +++ b/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_event import ReplicaEvent + + +class ChaosReplicaRestartScheduledEvent(ReplicaEvent): + """Chaos Restart Replica Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param service_uri: Required. Service name. + :type service_uri: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChaosReplicaRestartScheduledEvent, self).__init__(**kwargs) + self.fault_group_id = kwargs.get('fault_group_id', None) + self.fault_id = kwargs.get('fault_id', None) + self.service_uri = kwargs.get('service_uri', None) + self.kind = 'ChaosReplicaRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event_py3.py new file mode 100644 index 00000000..f8b2cbbc --- /dev/null +++ b/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event_py3.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_event_py3 import ReplicaEvent + + +class ChaosReplicaRestartScheduledEvent(ReplicaEvent): + """Chaos Restart Replica Fault Scheduled event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param fault_group_id: Required. Id of fault group. + :type fault_group_id: str + :param fault_id: Required. Id of fault. + :type fault_id: str + :param service_uri: Required. Service name. + :type service_uri: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'fault_group_id': {'required': True}, + 'fault_id': {'required': True}, + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, + 'fault_id': {'key': 'FaultId', 'type': 'str'}, + 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, fault_group_id: str, fault_id: str, service_uri: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ChaosReplicaRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.fault_group_id = fault_group_id + self.fault_id = fault_id + self.service_uri = service_uri + self.kind = 'ChaosReplicaRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_schedule.py b/customSDK/servicefabric/models/chaos_schedule.py new file mode 100644 index 00000000..bac824b4 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_schedule.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosSchedule(Model): + """Defines the schedule used by Chaos. + + :param start_date: The date and time Chaos will start using this schedule. + Default value: "1601-01-01T00:00:00Z" . + :type start_date: datetime + :param expiry_date: The date and time Chaos will continue to use this + schedule until. Default value: "9999-12-31T23:59:59.999Z" . + :type expiry_date: datetime + :param chaos_parameters_dictionary: A mapping of string names to Chaos + Parameters to be referenced by Chaos Schedule Jobs. + :type chaos_parameters_dictionary: + list[~azure.servicefabric.models.ChaosParametersDictionaryItem] + :param jobs: A list of all Chaos Schedule Jobs that will be automated by + the schedule. + :type jobs: list[~azure.servicefabric.models.ChaosScheduleJob] + """ + + _attribute_map = { + 'start_date': {'key': 'StartDate', 'type': 'iso-8601'}, + 'expiry_date': {'key': 'ExpiryDate', 'type': 'iso-8601'}, + 'chaos_parameters_dictionary': {'key': 'ChaosParametersDictionary', 'type': '[ChaosParametersDictionaryItem]'}, + 'jobs': {'key': 'Jobs', 'type': '[ChaosScheduleJob]'}, + } + + def __init__(self, **kwargs): + super(ChaosSchedule, self).__init__(**kwargs) + self.start_date = kwargs.get('start_date', "1601-01-01T00:00:00Z") + self.expiry_date = kwargs.get('expiry_date', "9999-12-31T23:59:59.999Z") + self.chaos_parameters_dictionary = kwargs.get('chaos_parameters_dictionary', None) + self.jobs = kwargs.get('jobs', None) diff --git a/customSDK/servicefabric/models/chaos_schedule_description.py b/customSDK/servicefabric/models/chaos_schedule_description.py new file mode 100644 index 00000000..8a7d3760 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_schedule_description.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosScheduleDescription(Model): + """Defines the Chaos Schedule used by Chaos and the version of the Chaos + Schedule. The version value wraps back to 0 after surpassing 2,147,483,647. + + :param version: The version number of the Schedule. + :type version: int + :param schedule: Defines the schedule used by Chaos. + :type schedule: ~azure.servicefabric.models.ChaosSchedule + """ + + _validation = { + 'version': {'minimum': 0}, + } + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'int'}, + 'schedule': {'key': 'Schedule', 'type': 'ChaosSchedule'}, + } + + def __init__(self, **kwargs): + super(ChaosScheduleDescription, self).__init__(**kwargs) + self.version = kwargs.get('version', None) + self.schedule = kwargs.get('schedule', None) diff --git a/customSDK/servicefabric/models/chaos_schedule_description_py3.py b/customSDK/servicefabric/models/chaos_schedule_description_py3.py new file mode 100644 index 00000000..aeb7d9e5 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_schedule_description_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosScheduleDescription(Model): + """Defines the Chaos Schedule used by Chaos and the version of the Chaos + Schedule. The version value wraps back to 0 after surpassing 2,147,483,647. + + :param version: The version number of the Schedule. + :type version: int + :param schedule: Defines the schedule used by Chaos. + :type schedule: ~azure.servicefabric.models.ChaosSchedule + """ + + _validation = { + 'version': {'minimum': 0}, + } + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'int'}, + 'schedule': {'key': 'Schedule', 'type': 'ChaosSchedule'}, + } + + def __init__(self, *, version: int=None, schedule=None, **kwargs) -> None: + super(ChaosScheduleDescription, self).__init__(**kwargs) + self.version = version + self.schedule = schedule diff --git a/customSDK/servicefabric/models/chaos_schedule_job.py b/customSDK/servicefabric/models/chaos_schedule_job.py new file mode 100644 index 00000000..34882512 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_schedule_job.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosScheduleJob(Model): + """Defines a repetition rule and parameters of Chaos to be used with the Chaos + Schedule. + + :param chaos_parameters: A reference to which Chaos Parameters of the + Chaos Schedule to use. + :type chaos_parameters: str + :param days: Defines the days of the week that a Chaos Schedule Job will + run for. + :type days: ~azure.servicefabric.models.ChaosScheduleJobActiveDaysOfWeek + :param times: A list of Time Ranges that specify when during active days + that this job will run. The times are interpreted as UTC. + :type times: list[~azure.servicefabric.models.TimeRange] + """ + + _attribute_map = { + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'str'}, + 'days': {'key': 'Days', 'type': 'ChaosScheduleJobActiveDaysOfWeek'}, + 'times': {'key': 'Times', 'type': '[TimeRange]'}, + } + + def __init__(self, **kwargs): + super(ChaosScheduleJob, self).__init__(**kwargs) + self.chaos_parameters = kwargs.get('chaos_parameters', None) + self.days = kwargs.get('days', None) + self.times = kwargs.get('times', None) diff --git a/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week.py b/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week.py new file mode 100644 index 00000000..3586ce0d --- /dev/null +++ b/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosScheduleJobActiveDaysOfWeek(Model): + """Defines the days of the week that a Chaos Schedule Job will run for. + + :param sunday: Indicates if the Chaos Schedule Job will run on Sunday. + Default value: False . + :type sunday: bool + :param monday: Indicates if the Chaos Schedule Job will run on Monday. + Default value: False . + :type monday: bool + :param tuesday: Indicates if the Chaos Schedule Job will run on Tuesday. + Default value: False . + :type tuesday: bool + :param wednesday: Indicates if the Chaos Schedule Job will run on + Wednesday. Default value: False . + :type wednesday: bool + :param thursday: Indicates if the Chaos Schedule Job will run on Thursday. + Default value: False . + :type thursday: bool + :param friday: Indicates if the Chaos Schedule Job will run on Friday. + Default value: False . + :type friday: bool + :param saturday: Indicates if the Chaos Schedule Job will run on Saturday. + Default value: False . + :type saturday: bool + """ + + _attribute_map = { + 'sunday': {'key': 'Sunday', 'type': 'bool'}, + 'monday': {'key': 'Monday', 'type': 'bool'}, + 'tuesday': {'key': 'Tuesday', 'type': 'bool'}, + 'wednesday': {'key': 'Wednesday', 'type': 'bool'}, + 'thursday': {'key': 'Thursday', 'type': 'bool'}, + 'friday': {'key': 'Friday', 'type': 'bool'}, + 'saturday': {'key': 'Saturday', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ChaosScheduleJobActiveDaysOfWeek, self).__init__(**kwargs) + self.sunday = kwargs.get('sunday', False) + self.monday = kwargs.get('monday', False) + self.tuesday = kwargs.get('tuesday', False) + self.wednesday = kwargs.get('wednesday', False) + self.thursday = kwargs.get('thursday', False) + self.friday = kwargs.get('friday', False) + self.saturday = kwargs.get('saturday', False) diff --git a/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week_py3.py b/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week_py3.py new file mode 100644 index 00000000..75c07c50 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosScheduleJobActiveDaysOfWeek(Model): + """Defines the days of the week that a Chaos Schedule Job will run for. + + :param sunday: Indicates if the Chaos Schedule Job will run on Sunday. + Default value: False . + :type sunday: bool + :param monday: Indicates if the Chaos Schedule Job will run on Monday. + Default value: False . + :type monday: bool + :param tuesday: Indicates if the Chaos Schedule Job will run on Tuesday. + Default value: False . + :type tuesday: bool + :param wednesday: Indicates if the Chaos Schedule Job will run on + Wednesday. Default value: False . + :type wednesday: bool + :param thursday: Indicates if the Chaos Schedule Job will run on Thursday. + Default value: False . + :type thursday: bool + :param friday: Indicates if the Chaos Schedule Job will run on Friday. + Default value: False . + :type friday: bool + :param saturday: Indicates if the Chaos Schedule Job will run on Saturday. + Default value: False . + :type saturday: bool + """ + + _attribute_map = { + 'sunday': {'key': 'Sunday', 'type': 'bool'}, + 'monday': {'key': 'Monday', 'type': 'bool'}, + 'tuesday': {'key': 'Tuesday', 'type': 'bool'}, + 'wednesday': {'key': 'Wednesday', 'type': 'bool'}, + 'thursday': {'key': 'Thursday', 'type': 'bool'}, + 'friday': {'key': 'Friday', 'type': 'bool'}, + 'saturday': {'key': 'Saturday', 'type': 'bool'}, + } + + def __init__(self, *, sunday: bool=False, monday: bool=False, tuesday: bool=False, wednesday: bool=False, thursday: bool=False, friday: bool=False, saturday: bool=False, **kwargs) -> None: + super(ChaosScheduleJobActiveDaysOfWeek, self).__init__(**kwargs) + self.sunday = sunday + self.monday = monday + self.tuesday = tuesday + self.wednesday = wednesday + self.thursday = thursday + self.friday = friday + self.saturday = saturday diff --git a/customSDK/servicefabric/models/chaos_schedule_job_py3.py b/customSDK/servicefabric/models/chaos_schedule_job_py3.py new file mode 100644 index 00000000..de766ca2 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_schedule_job_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosScheduleJob(Model): + """Defines a repetition rule and parameters of Chaos to be used with the Chaos + Schedule. + + :param chaos_parameters: A reference to which Chaos Parameters of the + Chaos Schedule to use. + :type chaos_parameters: str + :param days: Defines the days of the week that a Chaos Schedule Job will + run for. + :type days: ~azure.servicefabric.models.ChaosScheduleJobActiveDaysOfWeek + :param times: A list of Time Ranges that specify when during active days + that this job will run. The times are interpreted as UTC. + :type times: list[~azure.servicefabric.models.TimeRange] + """ + + _attribute_map = { + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'str'}, + 'days': {'key': 'Days', 'type': 'ChaosScheduleJobActiveDaysOfWeek'}, + 'times': {'key': 'Times', 'type': '[TimeRange]'}, + } + + def __init__(self, *, chaos_parameters: str=None, days=None, times=None, **kwargs) -> None: + super(ChaosScheduleJob, self).__init__(**kwargs) + self.chaos_parameters = chaos_parameters + self.days = days + self.times = times diff --git a/customSDK/servicefabric/models/chaos_schedule_py3.py b/customSDK/servicefabric/models/chaos_schedule_py3.py new file mode 100644 index 00000000..78ee2ce0 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_schedule_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosSchedule(Model): + """Defines the schedule used by Chaos. + + :param start_date: The date and time Chaos will start using this schedule. + Default value: "1601-01-01T00:00:00Z" . + :type start_date: datetime + :param expiry_date: The date and time Chaos will continue to use this + schedule until. Default value: "9999-12-31T23:59:59.999Z" . + :type expiry_date: datetime + :param chaos_parameters_dictionary: A mapping of string names to Chaos + Parameters to be referenced by Chaos Schedule Jobs. + :type chaos_parameters_dictionary: + list[~azure.servicefabric.models.ChaosParametersDictionaryItem] + :param jobs: A list of all Chaos Schedule Jobs that will be automated by + the schedule. + :type jobs: list[~azure.servicefabric.models.ChaosScheduleJob] + """ + + _attribute_map = { + 'start_date': {'key': 'StartDate', 'type': 'iso-8601'}, + 'expiry_date': {'key': 'ExpiryDate', 'type': 'iso-8601'}, + 'chaos_parameters_dictionary': {'key': 'ChaosParametersDictionary', 'type': '[ChaosParametersDictionaryItem]'}, + 'jobs': {'key': 'Jobs', 'type': '[ChaosScheduleJob]'}, + } + + def __init__(self, *, start_date="1601-01-01T00:00:00Z", expiry_date="9999-12-31T23:59:59.999Z", chaos_parameters_dictionary=None, jobs=None, **kwargs) -> None: + super(ChaosSchedule, self).__init__(**kwargs) + self.start_date = start_date + self.expiry_date = expiry_date + self.chaos_parameters_dictionary = chaos_parameters_dictionary + self.jobs = jobs diff --git a/customSDK/servicefabric/models/chaos_started_event.py b/customSDK/servicefabric/models/chaos_started_event.py new file mode 100644 index 00000000..d00971f5 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_started_event.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event import ClusterEvent + + +class ChaosStartedEvent(ClusterEvent): + """Chaos Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param max_concurrent_faults: Required. Maximum number of concurrent + faults. + :type max_concurrent_faults: long + :param time_to_run_in_seconds: Required. Time to run in seconds. + :type time_to_run_in_seconds: float + :param max_cluster_stabilization_timeout_in_seconds: Required. Maximum + timeout for cluster stabilization in seconds. + :type max_cluster_stabilization_timeout_in_seconds: float + :param wait_time_between_iterations_in_seconds: Required. Wait time + between iterations in seconds. + :type wait_time_between_iterations_in_seconds: float + :param wait_time_between_faults_in_seconds: Required. Wait time between + faults in seconds. + :type wait_time_between_faults_in_seconds: float + :param move_replica_fault_enabled: Required. Indicates MoveReplica fault + is enabled. + :type move_replica_fault_enabled: bool + :param included_node_type_list: Required. List of included Node types. + :type included_node_type_list: str + :param included_application_list: Required. List of included Applications. + :type included_application_list: str + :param cluster_health_policy: Required. Health policy. + :type cluster_health_policy: str + :param chaos_context: Required. Chaos Context. + :type chaos_context: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'max_concurrent_faults': {'required': True}, + 'time_to_run_in_seconds': {'required': True}, + 'max_cluster_stabilization_timeout_in_seconds': {'required': True}, + 'wait_time_between_iterations_in_seconds': {'required': True}, + 'wait_time_between_faults_in_seconds': {'required': True}, + 'move_replica_fault_enabled': {'required': True}, + 'included_node_type_list': {'required': True}, + 'included_application_list': {'required': True}, + 'cluster_health_policy': {'required': True}, + 'chaos_context': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, + 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'float'}, + 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'float'}, + 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'float'}, + 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'float'}, + 'move_replica_fault_enabled': {'key': 'MoveReplicaFaultEnabled', 'type': 'bool'}, + 'included_node_type_list': {'key': 'IncludedNodeTypeList', 'type': 'str'}, + 'included_application_list': {'key': 'IncludedApplicationList', 'type': 'str'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'str'}, + 'chaos_context': {'key': 'ChaosContext', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChaosStartedEvent, self).__init__(**kwargs) + self.max_concurrent_faults = kwargs.get('max_concurrent_faults', None) + self.time_to_run_in_seconds = kwargs.get('time_to_run_in_seconds', None) + self.max_cluster_stabilization_timeout_in_seconds = kwargs.get('max_cluster_stabilization_timeout_in_seconds', None) + self.wait_time_between_iterations_in_seconds = kwargs.get('wait_time_between_iterations_in_seconds', None) + self.wait_time_between_faults_in_seconds = kwargs.get('wait_time_between_faults_in_seconds', None) + self.move_replica_fault_enabled = kwargs.get('move_replica_fault_enabled', None) + self.included_node_type_list = kwargs.get('included_node_type_list', None) + self.included_application_list = kwargs.get('included_application_list', None) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.chaos_context = kwargs.get('chaos_context', None) + self.kind = 'ChaosStarted' diff --git a/customSDK/servicefabric/models/chaos_started_event_py3.py b/customSDK/servicefabric/models/chaos_started_event_py3.py new file mode 100644 index 00000000..81bb0180 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_started_event_py3.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event_py3 import ClusterEvent + + +class ChaosStartedEvent(ClusterEvent): + """Chaos Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param max_concurrent_faults: Required. Maximum number of concurrent + faults. + :type max_concurrent_faults: long + :param time_to_run_in_seconds: Required. Time to run in seconds. + :type time_to_run_in_seconds: float + :param max_cluster_stabilization_timeout_in_seconds: Required. Maximum + timeout for cluster stabilization in seconds. + :type max_cluster_stabilization_timeout_in_seconds: float + :param wait_time_between_iterations_in_seconds: Required. Wait time + between iterations in seconds. + :type wait_time_between_iterations_in_seconds: float + :param wait_time_between_faults_in_seconds: Required. Wait time between + faults in seconds. + :type wait_time_between_faults_in_seconds: float + :param move_replica_fault_enabled: Required. Indicates MoveReplica fault + is enabled. + :type move_replica_fault_enabled: bool + :param included_node_type_list: Required. List of included Node types. + :type included_node_type_list: str + :param included_application_list: Required. List of included Applications. + :type included_application_list: str + :param cluster_health_policy: Required. Health policy. + :type cluster_health_policy: str + :param chaos_context: Required. Chaos Context. + :type chaos_context: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'max_concurrent_faults': {'required': True}, + 'time_to_run_in_seconds': {'required': True}, + 'max_cluster_stabilization_timeout_in_seconds': {'required': True}, + 'wait_time_between_iterations_in_seconds': {'required': True}, + 'wait_time_between_faults_in_seconds': {'required': True}, + 'move_replica_fault_enabled': {'required': True}, + 'included_node_type_list': {'required': True}, + 'included_application_list': {'required': True}, + 'cluster_health_policy': {'required': True}, + 'chaos_context': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, + 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'float'}, + 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'float'}, + 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'float'}, + 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'float'}, + 'move_replica_fault_enabled': {'key': 'MoveReplicaFaultEnabled', 'type': 'bool'}, + 'included_node_type_list': {'key': 'IncludedNodeTypeList', 'type': 'str'}, + 'included_application_list': {'key': 'IncludedApplicationList', 'type': 'str'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'str'}, + 'chaos_context': {'key': 'ChaosContext', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, max_concurrent_faults: int, time_to_run_in_seconds: float, max_cluster_stabilization_timeout_in_seconds: float, wait_time_between_iterations_in_seconds: float, wait_time_between_faults_in_seconds: float, move_replica_fault_enabled: bool, included_node_type_list: str, included_application_list: str, cluster_health_policy: str, chaos_context: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ChaosStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.max_concurrent_faults = max_concurrent_faults + self.time_to_run_in_seconds = time_to_run_in_seconds + self.max_cluster_stabilization_timeout_in_seconds = max_cluster_stabilization_timeout_in_seconds + self.wait_time_between_iterations_in_seconds = wait_time_between_iterations_in_seconds + self.wait_time_between_faults_in_seconds = wait_time_between_faults_in_seconds + self.move_replica_fault_enabled = move_replica_fault_enabled + self.included_node_type_list = included_node_type_list + self.included_application_list = included_application_list + self.cluster_health_policy = cluster_health_policy + self.chaos_context = chaos_context + self.kind = 'ChaosStarted' diff --git a/customSDK/servicefabric/models/chaos_stopped_event.py b/customSDK/servicefabric/models/chaos_stopped_event.py new file mode 100644 index 00000000..744662f5 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_stopped_event.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event import ClusterEvent + + +class ChaosStoppedEvent(ClusterEvent): + """Chaos Stopped event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Required. Describes reason. + :type reason: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'reason': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChaosStoppedEvent, self).__init__(**kwargs) + self.reason = kwargs.get('reason', None) + self.kind = 'ChaosStopped' diff --git a/customSDK/servicefabric/models/chaos_stopped_event_py3.py b/customSDK/servicefabric/models/chaos_stopped_event_py3.py new file mode 100644 index 00000000..70be550d --- /dev/null +++ b/customSDK/servicefabric/models/chaos_stopped_event_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event_py3 import ClusterEvent + + +class ChaosStoppedEvent(ClusterEvent): + """Chaos Stopped event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Required. Describes reason. + :type reason: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'reason': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, reason: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ChaosStoppedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.reason = reason + self.kind = 'ChaosStopped' diff --git a/customSDK/servicefabric/models/chaos_target_filter.py b/customSDK/servicefabric/models/chaos_target_filter.py new file mode 100644 index 00000000..97d513b4 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_target_filter.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosTargetFilter(Model): + """Defines all filters for targeted Chaos faults, for example, faulting only + certain node types or faulting only certain applications. + If ChaosTargetFilter is not used, Chaos faults all cluster entities. If + ChaosTargetFilter is used, Chaos faults only the entities that meet the + ChaosTargetFilter + specification. NodeTypeInclusionList and ApplicationInclusionList allow a + union semantics only. It is not possible to specify an intersection + of NodeTypeInclusionList and ApplicationInclusionList. For example, it is + not possible to specify "fault this application only when it is on that + node type." + Once an entity is included in either NodeTypeInclusionList or + ApplicationInclusionList, that entity cannot be excluded using + ChaosTargetFilter. Even if + applicationX does not appear in ApplicationInclusionList, in some Chaos + iteration applicationX can be faulted because it happens to be on a node of + nodeTypeY that is included + in NodeTypeInclusionList. If both NodeTypeInclusionList and + ApplicationInclusionList are null or empty, an ArgumentException is thrown. + + :param node_type_inclusion_list: A list of node types to include in Chaos + faults. + All types of faults (restart node, restart code package, remove replica, + restart replica, move primary, and move secondary) are enabled for the + nodes of these node types. + If a node type (say NodeTypeX) does not appear in the + NodeTypeInclusionList, then node level faults (like NodeRestart) will + never be enabled for the nodes of + NodeTypeX, but code package and replica faults can still be enabled for + NodeTypeX if an application in the ApplicationInclusionList. + happens to reside on a node of NodeTypeX. + At most 100 node type names can be included in this list, to increase this + number, a config upgrade is required for + MaxNumberOfNodeTypesInChaosEntityFilter configuration. + :type node_type_inclusion_list: list[str] + :param application_inclusion_list: A list of application URIs to include + in Chaos faults. + All replicas belonging to services of these applications are amenable to + replica faults (restart replica, remove replica, move primary, and move + secondary) by Chaos. + Chaos may restart a code package only if the code package hosts replicas + of these applications only. + If an application does not appear in this list, it can still be faulted in + some Chaos iteration if the application ends up on a node of a node type + that is included in NodeTypeInclusionList. + However, if applicationX is tied to nodeTypeY through placement + constraints and applicationX is absent from ApplicationInclusionList and + nodeTypeY is absent from NodeTypeInclusionList, then applicationX will + never be faulted. + At most 1000 application names can be included in this list, to increase + this number, a config upgrade is required for + MaxNumberOfApplicationsInChaosEntityFilter configuration. + :type application_inclusion_list: list[str] + """ + + _attribute_map = { + 'node_type_inclusion_list': {'key': 'NodeTypeInclusionList', 'type': '[str]'}, + 'application_inclusion_list': {'key': 'ApplicationInclusionList', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ChaosTargetFilter, self).__init__(**kwargs) + self.node_type_inclusion_list = kwargs.get('node_type_inclusion_list', None) + self.application_inclusion_list = kwargs.get('application_inclusion_list', None) diff --git a/customSDK/servicefabric/models/chaos_target_filter_py3.py b/customSDK/servicefabric/models/chaos_target_filter_py3.py new file mode 100644 index 00000000..7bcb2f00 --- /dev/null +++ b/customSDK/servicefabric/models/chaos_target_filter_py3.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ChaosTargetFilter(Model): + """Defines all filters for targeted Chaos faults, for example, faulting only + certain node types or faulting only certain applications. + If ChaosTargetFilter is not used, Chaos faults all cluster entities. If + ChaosTargetFilter is used, Chaos faults only the entities that meet the + ChaosTargetFilter + specification. NodeTypeInclusionList and ApplicationInclusionList allow a + union semantics only. It is not possible to specify an intersection + of NodeTypeInclusionList and ApplicationInclusionList. For example, it is + not possible to specify "fault this application only when it is on that + node type." + Once an entity is included in either NodeTypeInclusionList or + ApplicationInclusionList, that entity cannot be excluded using + ChaosTargetFilter. Even if + applicationX does not appear in ApplicationInclusionList, in some Chaos + iteration applicationX can be faulted because it happens to be on a node of + nodeTypeY that is included + in NodeTypeInclusionList. If both NodeTypeInclusionList and + ApplicationInclusionList are null or empty, an ArgumentException is thrown. + + :param node_type_inclusion_list: A list of node types to include in Chaos + faults. + All types of faults (restart node, restart code package, remove replica, + restart replica, move primary, and move secondary) are enabled for the + nodes of these node types. + If a node type (say NodeTypeX) does not appear in the + NodeTypeInclusionList, then node level faults (like NodeRestart) will + never be enabled for the nodes of + NodeTypeX, but code package and replica faults can still be enabled for + NodeTypeX if an application in the ApplicationInclusionList. + happens to reside on a node of NodeTypeX. + At most 100 node type names can be included in this list, to increase this + number, a config upgrade is required for + MaxNumberOfNodeTypesInChaosEntityFilter configuration. + :type node_type_inclusion_list: list[str] + :param application_inclusion_list: A list of application URIs to include + in Chaos faults. + All replicas belonging to services of these applications are amenable to + replica faults (restart replica, remove replica, move primary, and move + secondary) by Chaos. + Chaos may restart a code package only if the code package hosts replicas + of these applications only. + If an application does not appear in this list, it can still be faulted in + some Chaos iteration if the application ends up on a node of a node type + that is included in NodeTypeInclusionList. + However, if applicationX is tied to nodeTypeY through placement + constraints and applicationX is absent from ApplicationInclusionList and + nodeTypeY is absent from NodeTypeInclusionList, then applicationX will + never be faulted. + At most 1000 application names can be included in this list, to increase + this number, a config upgrade is required for + MaxNumberOfApplicationsInChaosEntityFilter configuration. + :type application_inclusion_list: list[str] + """ + + _attribute_map = { + 'node_type_inclusion_list': {'key': 'NodeTypeInclusionList', 'type': '[str]'}, + 'application_inclusion_list': {'key': 'ApplicationInclusionList', 'type': '[str]'}, + } + + def __init__(self, *, node_type_inclusion_list=None, application_inclusion_list=None, **kwargs) -> None: + super(ChaosTargetFilter, self).__init__(**kwargs) + self.node_type_inclusion_list = node_type_inclusion_list + self.application_inclusion_list = application_inclusion_list diff --git a/customSDK/servicefabric/models/check_exists_property_batch_operation.py b/customSDK/servicefabric/models/check_exists_property_batch_operation.py new file mode 100644 index 00000000..14ec2d90 --- /dev/null +++ b/customSDK/servicefabric/models/check_exists_property_batch_operation.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_batch_operation import PropertyBatchOperation + + +class CheckExistsPropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that compares the Boolean existence of + a property with the Exists argument. + The PropertyBatchOperation operation fails if the property's existence is + not equal to the Exists argument. + The CheckExistsPropertyBatchOperation is generally used as a precondition + for the write operations in the batch. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param exists: Required. Whether or not the property should exist for the + operation to pass. + :type exists: bool + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + 'exists': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'exists': {'key': 'Exists', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(CheckExistsPropertyBatchOperation, self).__init__(**kwargs) + self.exists = kwargs.get('exists', None) + self.kind = 'CheckExists' diff --git a/customSDK/servicefabric/models/check_exists_property_batch_operation_py3.py b/customSDK/servicefabric/models/check_exists_property_batch_operation_py3.py new file mode 100644 index 00000000..2bb27c8e --- /dev/null +++ b/customSDK/servicefabric/models/check_exists_property_batch_operation_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_batch_operation_py3 import PropertyBatchOperation + + +class CheckExistsPropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that compares the Boolean existence of + a property with the Exists argument. + The PropertyBatchOperation operation fails if the property's existence is + not equal to the Exists argument. + The CheckExistsPropertyBatchOperation is generally used as a precondition + for the write operations in the batch. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param exists: Required. Whether or not the property should exist for the + operation to pass. + :type exists: bool + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + 'exists': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'exists': {'key': 'Exists', 'type': 'bool'}, + } + + def __init__(self, *, property_name: str, exists: bool, **kwargs) -> None: + super(CheckExistsPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.exists = exists + self.kind = 'CheckExists' diff --git a/customSDK/servicefabric/models/check_sequence_property_batch_operation.py b/customSDK/servicefabric/models/check_sequence_property_batch_operation.py new file mode 100644 index 00000000..306b3ae6 --- /dev/null +++ b/customSDK/servicefabric/models/check_sequence_property_batch_operation.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_batch_operation import PropertyBatchOperation + + +class CheckSequencePropertyBatchOperation(PropertyBatchOperation): + """Compares the Sequence Number of a property with the SequenceNumber + argument. + A property's sequence number can be thought of as that property's version. + Every time the property is modified, its sequence number is increased. + The sequence number can be found in a property's metadata. + The comparison fails if the sequence numbers are not equal. + CheckSequencePropertyBatchOperation is generally used as a precondition for + the write operations in the batch. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param sequence_number: Required. The expected sequence number. + :type sequence_number: str + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + 'sequence_number': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckSequencePropertyBatchOperation, self).__init__(**kwargs) + self.sequence_number = kwargs.get('sequence_number', None) + self.kind = 'CheckSequence' diff --git a/customSDK/servicefabric/models/check_sequence_property_batch_operation_py3.py b/customSDK/servicefabric/models/check_sequence_property_batch_operation_py3.py new file mode 100644 index 00000000..7dabd0f8 --- /dev/null +++ b/customSDK/servicefabric/models/check_sequence_property_batch_operation_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_batch_operation_py3 import PropertyBatchOperation + + +class CheckSequencePropertyBatchOperation(PropertyBatchOperation): + """Compares the Sequence Number of a property with the SequenceNumber + argument. + A property's sequence number can be thought of as that property's version. + Every time the property is modified, its sequence number is increased. + The sequence number can be found in a property's metadata. + The comparison fails if the sequence numbers are not equal. + CheckSequencePropertyBatchOperation is generally used as a precondition for + the write operations in the batch. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param sequence_number: Required. The expected sequence number. + :type sequence_number: str + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + 'sequence_number': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + } + + def __init__(self, *, property_name: str, sequence_number: str, **kwargs) -> None: + super(CheckSequencePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.sequence_number = sequence_number + self.kind = 'CheckSequence' diff --git a/customSDK/servicefabric/models/check_value_property_batch_operation.py b/customSDK/servicefabric/models/check_value_property_batch_operation.py new file mode 100644 index 00000000..e1b8a3b9 --- /dev/null +++ b/customSDK/servicefabric/models/check_value_property_batch_operation.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_batch_operation import PropertyBatchOperation + + +class CheckValuePropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that compares the value of the property + with the expected value. + The CheckValuePropertyBatchOperation is generally used as a precondition + for the write operations in the batch. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param value: Required. The expected property value. + :type value: ~azure.servicefabric.models.PropertyValue + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + } + + def __init__(self, **kwargs): + super(CheckValuePropertyBatchOperation, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.kind = 'CheckValue' diff --git a/customSDK/servicefabric/models/check_value_property_batch_operation_py3.py b/customSDK/servicefabric/models/check_value_property_batch_operation_py3.py new file mode 100644 index 00000000..8af0c8bf --- /dev/null +++ b/customSDK/servicefabric/models/check_value_property_batch_operation_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_batch_operation_py3 import PropertyBatchOperation + + +class CheckValuePropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that compares the value of the property + with the expected value. + The CheckValuePropertyBatchOperation is generally used as a precondition + for the write operations in the batch. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param value: Required. The expected property value. + :type value: ~azure.servicefabric.models.PropertyValue + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + } + + def __init__(self, *, property_name: str, value, **kwargs) -> None: + super(CheckValuePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.value = value + self.kind = 'CheckValue' diff --git a/customSDK/servicefabric/models/cluster_configuration.py b/customSDK/servicefabric/models/cluster_configuration.py new file mode 100644 index 00000000..a888b4fe --- /dev/null +++ b/customSDK/servicefabric/models/cluster_configuration.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterConfiguration(Model): + """Information about the standalone cluster configuration. + + :param cluster_configuration: The contents of the cluster configuration + file. + :type cluster_configuration: str + """ + + _attribute_map = { + 'cluster_configuration': {'key': 'ClusterConfiguration', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterConfiguration, self).__init__(**kwargs) + self.cluster_configuration = kwargs.get('cluster_configuration', None) diff --git a/customSDK/servicefabric/models/cluster_configuration_py3.py b/customSDK/servicefabric/models/cluster_configuration_py3.py new file mode 100644 index 00000000..5d6f4090 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_configuration_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterConfiguration(Model): + """Information about the standalone cluster configuration. + + :param cluster_configuration: The contents of the cluster configuration + file. + :type cluster_configuration: str + """ + + _attribute_map = { + 'cluster_configuration': {'key': 'ClusterConfiguration', 'type': 'str'}, + } + + def __init__(self, *, cluster_configuration: str=None, **kwargs) -> None: + super(ClusterConfiguration, self).__init__(**kwargs) + self.cluster_configuration = cluster_configuration diff --git a/customSDK/servicefabric/models/cluster_configuration_upgrade_description.py b/customSDK/servicefabric/models/cluster_configuration_upgrade_description.py new file mode 100644 index 00000000..699c387f --- /dev/null +++ b/customSDK/servicefabric/models/cluster_configuration_upgrade_description.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterConfigurationUpgradeDescription(Model): + """Describes the parameters for a standalone cluster configuration upgrade. + + All required parameters must be populated in order to send to Azure. + + :param cluster_config: Required. The cluster configuration as a JSON + string. For example, [this + file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) + contains JSON describing the [nodes and other properties of the + cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). + :type cluster_config: str + :param health_check_retry_timeout: The length of time between attempts to + perform health checks if the application or cluster is not healthy. + Default value: "PT0H0M0S" . + :type health_check_retry_timeout: timedelta + :param health_check_wait_duration_in_seconds: The length of time to wait + after completing an upgrade domain before starting the health checks + process. Default value: "PT0H0M0S" . + :type health_check_wait_duration_in_seconds: timedelta + :param health_check_stable_duration_in_seconds: The length of time that + the application or cluster must remain healthy before the upgrade proceeds + to the next upgrade domain. Default value: "PT0H0M0S" . + :type health_check_stable_duration_in_seconds: timedelta + :param upgrade_domain_timeout_in_seconds: The timeout for the upgrade + domain. Default value: "PT0H0M0S" . + :type upgrade_domain_timeout_in_seconds: timedelta + :param upgrade_timeout_in_seconds: The upgrade timeout. Default value: + "PT0H0M0S" . + :type upgrade_timeout_in_seconds: timedelta + :param max_percent_unhealthy_applications: The maximum allowed percentage + of unhealthy applications during the upgrade. Allowed values are integer + values from zero to 100. Default value: 0 . + :type max_percent_unhealthy_applications: int + :param max_percent_unhealthy_nodes: The maximum allowed percentage of + unhealthy nodes during the upgrade. Allowed values are integer values from + zero to 100. Default value: 0 . + :type max_percent_unhealthy_nodes: int + :param max_percent_delta_unhealthy_nodes: The maximum allowed percentage + of delta health degradation during the upgrade. Allowed values are integer + values from zero to 100. Default value: 0 . + :type max_percent_delta_unhealthy_nodes: int + :param max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum + allowed percentage of upgrade domain delta health degradation during the + upgrade. Allowed values are integer values from zero to 100. Default + value: 0 . + :type max_percent_upgrade_domain_delta_unhealthy_nodes: int + :param application_health_policies: Defines the application health policy + map used to evaluate the health of an application or one of its children + entities. + :type application_health_policies: + ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _validation = { + 'cluster_config': {'required': True}, + } + + _attribute_map = { + 'cluster_config': {'key': 'ClusterConfig', 'type': 'str'}, + 'health_check_retry_timeout': {'key': 'HealthCheckRetryTimeout', 'type': 'duration'}, + 'health_check_wait_duration_in_seconds': {'key': 'HealthCheckWaitDurationInSeconds', 'type': 'duration'}, + 'health_check_stable_duration_in_seconds': {'key': 'HealthCheckStableDurationInSeconds', 'type': 'duration'}, + 'upgrade_domain_timeout_in_seconds': {'key': 'UpgradeDomainTimeoutInSeconds', 'type': 'duration'}, + 'upgrade_timeout_in_seconds': {'key': 'UpgradeTimeoutInSeconds', 'type': 'duration'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, + 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__(self, **kwargs): + super(ClusterConfigurationUpgradeDescription, self).__init__(**kwargs) + self.cluster_config = kwargs.get('cluster_config', None) + self.health_check_retry_timeout = kwargs.get('health_check_retry_timeout', "PT0H0M0S") + self.health_check_wait_duration_in_seconds = kwargs.get('health_check_wait_duration_in_seconds', "PT0H0M0S") + self.health_check_stable_duration_in_seconds = kwargs.get('health_check_stable_duration_in_seconds', "PT0H0M0S") + self.upgrade_domain_timeout_in_seconds = kwargs.get('upgrade_domain_timeout_in_seconds', "PT0H0M0S") + self.upgrade_timeout_in_seconds = kwargs.get('upgrade_timeout_in_seconds', "PT0H0M0S") + self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', 0) + self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', 0) + self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', 0) + self.max_percent_upgrade_domain_delta_unhealthy_nodes = kwargs.get('max_percent_upgrade_domain_delta_unhealthy_nodes', 0) + self.application_health_policies = kwargs.get('application_health_policies', None) diff --git a/customSDK/servicefabric/models/cluster_configuration_upgrade_description_py3.py b/customSDK/servicefabric/models/cluster_configuration_upgrade_description_py3.py new file mode 100644 index 00000000..856bd470 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_configuration_upgrade_description_py3.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterConfigurationUpgradeDescription(Model): + """Describes the parameters for a standalone cluster configuration upgrade. + + All required parameters must be populated in order to send to Azure. + + :param cluster_config: Required. The cluster configuration as a JSON + string. For example, [this + file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) + contains JSON describing the [nodes and other properties of the + cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). + :type cluster_config: str + :param health_check_retry_timeout: The length of time between attempts to + perform health checks if the application or cluster is not healthy. + Default value: "PT0H0M0S" . + :type health_check_retry_timeout: timedelta + :param health_check_wait_duration_in_seconds: The length of time to wait + after completing an upgrade domain before starting the health checks + process. Default value: "PT0H0M0S" . + :type health_check_wait_duration_in_seconds: timedelta + :param health_check_stable_duration_in_seconds: The length of time that + the application or cluster must remain healthy before the upgrade proceeds + to the next upgrade domain. Default value: "PT0H0M0S" . + :type health_check_stable_duration_in_seconds: timedelta + :param upgrade_domain_timeout_in_seconds: The timeout for the upgrade + domain. Default value: "PT0H0M0S" . + :type upgrade_domain_timeout_in_seconds: timedelta + :param upgrade_timeout_in_seconds: The upgrade timeout. Default value: + "PT0H0M0S" . + :type upgrade_timeout_in_seconds: timedelta + :param max_percent_unhealthy_applications: The maximum allowed percentage + of unhealthy applications during the upgrade. Allowed values are integer + values from zero to 100. Default value: 0 . + :type max_percent_unhealthy_applications: int + :param max_percent_unhealthy_nodes: The maximum allowed percentage of + unhealthy nodes during the upgrade. Allowed values are integer values from + zero to 100. Default value: 0 . + :type max_percent_unhealthy_nodes: int + :param max_percent_delta_unhealthy_nodes: The maximum allowed percentage + of delta health degradation during the upgrade. Allowed values are integer + values from zero to 100. Default value: 0 . + :type max_percent_delta_unhealthy_nodes: int + :param max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum + allowed percentage of upgrade domain delta health degradation during the + upgrade. Allowed values are integer values from zero to 100. Default + value: 0 . + :type max_percent_upgrade_domain_delta_unhealthy_nodes: int + :param application_health_policies: Defines the application health policy + map used to evaluate the health of an application or one of its children + entities. + :type application_health_policies: + ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _validation = { + 'cluster_config': {'required': True}, + } + + _attribute_map = { + 'cluster_config': {'key': 'ClusterConfig', 'type': 'str'}, + 'health_check_retry_timeout': {'key': 'HealthCheckRetryTimeout', 'type': 'duration'}, + 'health_check_wait_duration_in_seconds': {'key': 'HealthCheckWaitDurationInSeconds', 'type': 'duration'}, + 'health_check_stable_duration_in_seconds': {'key': 'HealthCheckStableDurationInSeconds', 'type': 'duration'}, + 'upgrade_domain_timeout_in_seconds': {'key': 'UpgradeDomainTimeoutInSeconds', 'type': 'duration'}, + 'upgrade_timeout_in_seconds': {'key': 'UpgradeTimeoutInSeconds', 'type': 'duration'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, + 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__(self, *, cluster_config: str, health_check_retry_timeout="PT0H0M0S", health_check_wait_duration_in_seconds="PT0H0M0S", health_check_stable_duration_in_seconds="PT0H0M0S", upgrade_domain_timeout_in_seconds="PT0H0M0S", upgrade_timeout_in_seconds="PT0H0M0S", max_percent_unhealthy_applications: int=0, max_percent_unhealthy_nodes: int=0, max_percent_delta_unhealthy_nodes: int=0, max_percent_upgrade_domain_delta_unhealthy_nodes: int=0, application_health_policies=None, **kwargs) -> None: + super(ClusterConfigurationUpgradeDescription, self).__init__(**kwargs) + self.cluster_config = cluster_config + self.health_check_retry_timeout = health_check_retry_timeout + self.health_check_wait_duration_in_seconds = health_check_wait_duration_in_seconds + self.health_check_stable_duration_in_seconds = health_check_stable_duration_in_seconds + self.upgrade_domain_timeout_in_seconds = upgrade_domain_timeout_in_seconds + self.upgrade_timeout_in_seconds = upgrade_timeout_in_seconds + self.max_percent_unhealthy_applications = max_percent_unhealthy_applications + self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes + self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes + self.max_percent_upgrade_domain_delta_unhealthy_nodes = max_percent_upgrade_domain_delta_unhealthy_nodes + self.application_health_policies = application_health_policies diff --git a/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info.py b/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info.py new file mode 100644 index 00000000..b48531bf --- /dev/null +++ b/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterConfigurationUpgradeStatusInfo(Model): + """Information about a standalone cluster configuration upgrade status. + + :param upgrade_state: The state of the upgrade domain. Possible values + include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', + 'RollingForwardPending', 'RollingForwardInProgress', + 'RollingForwardCompleted', 'Failed' + :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :param progress_status: The cluster manifest version. + :type progress_status: int + :param config_version: The cluster configuration version. + :type config_version: str + :param details: The cluster upgrade status details. + :type details: str + """ + + _attribute_map = { + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'progress_status': {'key': 'ProgressStatus', 'type': 'int'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'details': {'key': 'Details', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterConfigurationUpgradeStatusInfo, self).__init__(**kwargs) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.progress_status = kwargs.get('progress_status', None) + self.config_version = kwargs.get('config_version', None) + self.details = kwargs.get('details', None) diff --git a/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info_py3.py b/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info_py3.py new file mode 100644 index 00000000..d1362bed --- /dev/null +++ b/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterConfigurationUpgradeStatusInfo(Model): + """Information about a standalone cluster configuration upgrade status. + + :param upgrade_state: The state of the upgrade domain. Possible values + include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', + 'RollingForwardPending', 'RollingForwardInProgress', + 'RollingForwardCompleted', 'Failed' + :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :param progress_status: The cluster manifest version. + :type progress_status: int + :param config_version: The cluster configuration version. + :type config_version: str + :param details: The cluster upgrade status details. + :type details: str + """ + + _attribute_map = { + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'progress_status': {'key': 'ProgressStatus', 'type': 'int'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'details': {'key': 'Details', 'type': 'str'}, + } + + def __init__(self, *, upgrade_state=None, progress_status: int=None, config_version: str=None, details: str=None, **kwargs) -> None: + super(ClusterConfigurationUpgradeStatusInfo, self).__init__(**kwargs) + self.upgrade_state = upgrade_state + self.progress_status = progress_status + self.config_version = config_version + self.details = details diff --git a/customSDK/servicefabric/models/cluster_event.py b/customSDK/servicefabric/models/cluster_event.py new file mode 100644 index 00000000..d4822d34 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_event.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .fabric_event import FabricEvent + + +class ClusterEvent(FabricEvent): + """Represents the base for all Cluster Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ClusterNewHealthReportEvent, + ClusterHealthReportExpiredEvent, ClusterUpgradeCompletedEvent, + ClusterUpgradeDomainCompletedEvent, ClusterUpgradeRollbackCompletedEvent, + ClusterUpgradeRollbackStartedEvent, ClusterUpgradeStartedEvent, + ChaosStoppedEvent, ChaosStartedEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ClusterNewHealthReport': 'ClusterNewHealthReportEvent', 'ClusterHealthReportExpired': 'ClusterHealthReportExpiredEvent', 'ClusterUpgradeCompleted': 'ClusterUpgradeCompletedEvent', 'ClusterUpgradeDomainCompleted': 'ClusterUpgradeDomainCompletedEvent', 'ClusterUpgradeRollbackCompleted': 'ClusterUpgradeRollbackCompletedEvent', 'ClusterUpgradeRollbackStarted': 'ClusterUpgradeRollbackStartedEvent', 'ClusterUpgradeStarted': 'ClusterUpgradeStartedEvent', 'ChaosStopped': 'ChaosStoppedEvent', 'ChaosStarted': 'ChaosStartedEvent'} + } + + def __init__(self, **kwargs): + super(ClusterEvent, self).__init__(**kwargs) + self.kind = 'ClusterEvent' diff --git a/customSDK/servicefabric/models/cluster_event_py3.py b/customSDK/servicefabric/models/cluster_event_py3.py new file mode 100644 index 00000000..04613f0d --- /dev/null +++ b/customSDK/servicefabric/models/cluster_event_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .fabric_event_py3 import FabricEvent + + +class ClusterEvent(FabricEvent): + """Represents the base for all Cluster Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ClusterNewHealthReportEvent, + ClusterHealthReportExpiredEvent, ClusterUpgradeCompletedEvent, + ClusterUpgradeDomainCompletedEvent, ClusterUpgradeRollbackCompletedEvent, + ClusterUpgradeRollbackStartedEvent, ClusterUpgradeStartedEvent, + ChaosStoppedEvent, ChaosStartedEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ClusterNewHealthReport': 'ClusterNewHealthReportEvent', 'ClusterHealthReportExpired': 'ClusterHealthReportExpiredEvent', 'ClusterUpgradeCompleted': 'ClusterUpgradeCompletedEvent', 'ClusterUpgradeDomainCompleted': 'ClusterUpgradeDomainCompletedEvent', 'ClusterUpgradeRollbackCompleted': 'ClusterUpgradeRollbackCompletedEvent', 'ClusterUpgradeRollbackStarted': 'ClusterUpgradeRollbackStartedEvent', 'ClusterUpgradeStarted': 'ClusterUpgradeStartedEvent', 'ChaosStopped': 'ChaosStoppedEvent', 'ChaosStarted': 'ChaosStartedEvent'} + } + + def __init__(self, *, event_instance_id: str, time_stamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ClusterEvent' diff --git a/customSDK/servicefabric/models/cluster_health.py b/customSDK/servicefabric/models/cluster_health.py new file mode 100644 index 00000000..5185f731 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health import EntityHealth + + +class ClusterHealth(EntityHealth): + """Represents the health of the cluster. + Contains the cluster aggregated health state, the cluster application and + node health states as well as the health events and the unhealthy + evaluations. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param node_health_states: Cluster node health states as found in the + health store. + :type node_health_states: + list[~azure.servicefabric.models.NodeHealthState] + :param application_health_states: Cluster application health states as + found in the health store. + :type application_health_states: + list[~azure.servicefabric.models.ApplicationHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'node_health_states': {'key': 'NodeHealthStates', 'type': '[NodeHealthState]'}, + 'application_health_states': {'key': 'ApplicationHealthStates', 'type': '[ApplicationHealthState]'}, + } + + def __init__(self, **kwargs): + super(ClusterHealth, self).__init__(**kwargs) + self.node_health_states = kwargs.get('node_health_states', None) + self.application_health_states = kwargs.get('application_health_states', None) diff --git a/customSDK/servicefabric/models/cluster_health_chunk.py b/customSDK/servicefabric/models/cluster_health_chunk.py new file mode 100644 index 00000000..aa70ceef --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_chunk.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterHealthChunk(Model): + """Represents the health chunk of the cluster. + Contains the cluster aggregated health state, and the cluster entities that + respect the input filter. + + :param health_state: The HealthState representing the aggregated health + state of the cluster computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired cluster health policy and + the application health policies. Possible values include: 'Invalid', 'Ok', + 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_health_state_chunks: The list of node health state chunks in + the cluster that respect the filters in the cluster health chunk query + description. + :type node_health_state_chunks: + ~azure.servicefabric.models.NodeHealthStateChunkList + :param application_health_state_chunks: The list of application health + state chunks in the cluster that respect the filters in the cluster health + chunk query description. + :type application_health_state_chunks: + ~azure.servicefabric.models.ApplicationHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_health_state_chunks': {'key': 'NodeHealthStateChunks', 'type': 'NodeHealthStateChunkList'}, + 'application_health_state_chunks': {'key': 'ApplicationHealthStateChunks', 'type': 'ApplicationHealthStateChunkList'}, + } + + def __init__(self, **kwargs): + super(ClusterHealthChunk, self).__init__(**kwargs) + self.health_state = kwargs.get('health_state', None) + self.node_health_state_chunks = kwargs.get('node_health_state_chunks', None) + self.application_health_state_chunks = kwargs.get('application_health_state_chunks', None) diff --git a/customSDK/servicefabric/models/cluster_health_chunk_py3.py b/customSDK/servicefabric/models/cluster_health_chunk_py3.py new file mode 100644 index 00000000..549375a2 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_chunk_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterHealthChunk(Model): + """Represents the health chunk of the cluster. + Contains the cluster aggregated health state, and the cluster entities that + respect the input filter. + + :param health_state: The HealthState representing the aggregated health + state of the cluster computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired cluster health policy and + the application health policies. Possible values include: 'Invalid', 'Ok', + 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_health_state_chunks: The list of node health state chunks in + the cluster that respect the filters in the cluster health chunk query + description. + :type node_health_state_chunks: + ~azure.servicefabric.models.NodeHealthStateChunkList + :param application_health_state_chunks: The list of application health + state chunks in the cluster that respect the filters in the cluster health + chunk query description. + :type application_health_state_chunks: + ~azure.servicefabric.models.ApplicationHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_health_state_chunks': {'key': 'NodeHealthStateChunks', 'type': 'NodeHealthStateChunkList'}, + 'application_health_state_chunks': {'key': 'ApplicationHealthStateChunks', 'type': 'ApplicationHealthStateChunkList'}, + } + + def __init__(self, *, health_state=None, node_health_state_chunks=None, application_health_state_chunks=None, **kwargs) -> None: + super(ClusterHealthChunk, self).__init__(**kwargs) + self.health_state = health_state + self.node_health_state_chunks = node_health_state_chunks + self.application_health_state_chunks = application_health_state_chunks diff --git a/customSDK/servicefabric/models/cluster_health_chunk_query_description.py b/customSDK/servicefabric/models/cluster_health_chunk_query_description.py new file mode 100644 index 00000000..324ec7ab --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_chunk_query_description.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterHealthChunkQueryDescription(Model): + """The cluster health chunk query description, which can specify the health + policies to evaluate cluster health and very expressive filters to select + which cluster entities to include in response. + + :param node_filters: Defines a list of filters that specify which nodes to + be included in the returned cluster health chunk. + If no filters are specified, no nodes are returned. All the nodes are used + to evaluate the cluster's aggregated health state, regardless of the input + filters. + The cluster health chunk query may specify multiple node filters. + For example, it can specify a filter to return all nodes with health state + Error and another filter to always include a node identified by its + NodeName. + :type node_filters: + list[~azure.servicefabric.models.NodeHealthStateFilter] + :param application_filters: Defines a list of filters that specify which + applications to be included in the returned cluster health chunk. + If no filters are specified, no applications are returned. All the + applications are used to evaluate the cluster's aggregated health state, + regardless of the input filters. + The cluster health chunk query may specify multiple application filters. + For example, it can specify a filter to return all applications with + health state Error and another filter to always include applications of a + specified application type. + :type application_filters: + list[~azure.servicefabric.models.ApplicationHealthStateFilter] + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param application_health_policies: Defines the application health policy + map used to evaluate the health of an application or one of its children + entities. + :type application_health_policies: + ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _attribute_map = { + 'node_filters': {'key': 'NodeFilters', 'type': '[NodeHealthStateFilter]'}, + 'application_filters': {'key': 'ApplicationFilters', 'type': '[ApplicationHealthStateFilter]'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__(self, **kwargs): + super(ClusterHealthChunkQueryDescription, self).__init__(**kwargs) + self.node_filters = kwargs.get('node_filters', None) + self.application_filters = kwargs.get('application_filters', None) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.application_health_policies = kwargs.get('application_health_policies', None) diff --git a/customSDK/servicefabric/models/cluster_health_chunk_query_description_py3.py b/customSDK/servicefabric/models/cluster_health_chunk_query_description_py3.py new file mode 100644 index 00000000..5b55a1e3 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_chunk_query_description_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterHealthChunkQueryDescription(Model): + """The cluster health chunk query description, which can specify the health + policies to evaluate cluster health and very expressive filters to select + which cluster entities to include in response. + + :param node_filters: Defines a list of filters that specify which nodes to + be included in the returned cluster health chunk. + If no filters are specified, no nodes are returned. All the nodes are used + to evaluate the cluster's aggregated health state, regardless of the input + filters. + The cluster health chunk query may specify multiple node filters. + For example, it can specify a filter to return all nodes with health state + Error and another filter to always include a node identified by its + NodeName. + :type node_filters: + list[~azure.servicefabric.models.NodeHealthStateFilter] + :param application_filters: Defines a list of filters that specify which + applications to be included in the returned cluster health chunk. + If no filters are specified, no applications are returned. All the + applications are used to evaluate the cluster's aggregated health state, + regardless of the input filters. + The cluster health chunk query may specify multiple application filters. + For example, it can specify a filter to return all applications with + health state Error and another filter to always include applications of a + specified application type. + :type application_filters: + list[~azure.servicefabric.models.ApplicationHealthStateFilter] + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param application_health_policies: Defines the application health policy + map used to evaluate the health of an application or one of its children + entities. + :type application_health_policies: + ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _attribute_map = { + 'node_filters': {'key': 'NodeFilters', 'type': '[NodeHealthStateFilter]'}, + 'application_filters': {'key': 'ApplicationFilters', 'type': '[ApplicationHealthStateFilter]'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__(self, *, node_filters=None, application_filters=None, cluster_health_policy=None, application_health_policies=None, **kwargs) -> None: + super(ClusterHealthChunkQueryDescription, self).__init__(**kwargs) + self.node_filters = node_filters + self.application_filters = application_filters + self.cluster_health_policy = cluster_health_policy + self.application_health_policies = application_health_policies diff --git a/customSDK/servicefabric/models/cluster_health_policies.py b/customSDK/servicefabric/models/cluster_health_policies.py new file mode 100644 index 00000000..ff937553 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_policies.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterHealthPolicies(Model): + """Health policies to evaluate cluster health. + + :param application_health_policy_map: Defines a map that contains specific + application health policies for different applications. + Each entry specifies as key the application name and as value an + ApplicationHealthPolicy used to evaluate the application health. + If an application is not specified in the map, the application health + evaluation uses the ApplicationHealthPolicy found in its application + manifest or the default application health policy (if no health policy is + defined in the manifest). + The map is empty by default. + :type application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + } + + def __init__(self, **kwargs): + super(ClusterHealthPolicies, self).__init__(**kwargs) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) diff --git a/customSDK/servicefabric/models/cluster_health_policies_py3.py b/customSDK/servicefabric/models/cluster_health_policies_py3.py new file mode 100644 index 00000000..3434de28 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_policies_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterHealthPolicies(Model): + """Health policies to evaluate cluster health. + + :param application_health_policy_map: Defines a map that contains specific + application health policies for different applications. + Each entry specifies as key the application name and as value an + ApplicationHealthPolicy used to evaluate the application health. + If an application is not specified in the map, the application health + evaluation uses the ApplicationHealthPolicy found in its application + manifest or the default application health policy (if no health policy is + defined in the manifest). + The map is empty by default. + :type application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + } + + def __init__(self, *, application_health_policy_map=None, cluster_health_policy=None, **kwargs) -> None: + super(ClusterHealthPolicies, self).__init__(**kwargs) + self.application_health_policy_map = application_health_policy_map + self.cluster_health_policy = cluster_health_policy diff --git a/customSDK/servicefabric/models/cluster_health_policy.py b/customSDK/servicefabric/models/cluster_health_policy.py new file mode 100644 index 00000000..f7adcf00 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_policy.py @@ -0,0 +1,129 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterHealthPolicy(Model): + """Defines a health policy used to evaluate the health of the cluster or of a + cluster node. + + :param consider_warning_as_error: Indicates whether warnings are treated + with the same severity as errors. Default value: False . + :type consider_warning_as_error: bool + :param max_percent_unhealthy_nodes: The maximum allowed percentage of + unhealthy nodes before reporting an error. For example, to allow 10% of + nodes to be unhealthy, this value would be 10. + The percentage represents the maximum tolerated percentage of nodes that + can be unhealthy before the cluster is considered in error. + If the percentage is respected but there is at least one unhealthy node, + the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes + over the total number of nodes in the cluster. + The computation rounds up to tolerate one failure on small numbers of + nodes. Default percentage is zero. + In large clusters, some nodes will always be down or out for repairs, so + this percentage should be configured to tolerate that. Default value: 0 . + :type max_percent_unhealthy_nodes: int + :param max_percent_unhealthy_applications: The maximum allowed percentage + of unhealthy applications before reporting an error. For example, to allow + 10% of applications to be unhealthy, this value would be 10. + The percentage represents the maximum tolerated percentage of applications + that can be unhealthy before the cluster is considered in error. + If the percentage is respected but there is at least one unhealthy + application, the health is evaluated as Warning. + This is calculated by dividing the number of unhealthy applications over + the total number of application instances in the cluster, excluding + applications of application types that are included in the + ApplicationTypeHealthPolicyMap. + The computation rounds up to tolerate one failure on small numbers of + applications. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_applications: int + :param application_type_health_policy_map: Defines a map with max + percentage unhealthy applications for specific application types. + Each entry specifies as key the application type name and as value an + integer that represents the MaxPercentUnhealthyApplications percentage + used to evaluate the applications of the specified application type. + The application type health policy map can be used during cluster health + evaluation to describe special application types. + The application types included in the map are evaluated against the + percentage specified in the map, and not with the global + MaxPercentUnhealthyApplications defined in the cluster health policy. + The applications of application types specified in the map are not counted + against the global pool of applications. + For example, if some applications of a type are critical, the cluster + administrator can add an entry to the map for that application type + and assign it a value of 0% (that is, do not tolerate any failures). + All other applications can be evaluated with + MaxPercentUnhealthyApplications set to 20% to tolerate some failures out + of the thousands of application instances. + The application type health policy map is used only if the cluster + manifest enables application type health evaluation using the + configuration entry for + HealthManager/EnableApplicationTypeHealthEvaluation. + :type application_type_health_policy_map: + list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] + :param node_type_health_policy_map: Defines a map with max percentage + unhealthy nodes for specific node types. + Each entry specifies as key the node type name and as value an integer + that represents the MaxPercentUnhealthyNodes percentage used to evaluate + the nodes of the specified node type. + The node type health policy map can be used during cluster health + evaluation to describe special node types. + They are evaluated against the percentages associated with their node type + name in the map. + Setting this has no impact on the global pool of nodes used for + MaxPercentUnhealthyNodes. + The node type health policy map is used only if the cluster manifest + enables node type health evaluation using the configuration entry for + HealthManager/EnableNodeTypeHealthEvaluation. + For example, given a cluster with many nodes of different types, with + important work hosted on node type "SpecialNodeType" that should not + tolerate any nodes down. + You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some + failures for all nodes, but for the node type "SpecialNodeType", set the + MaxPercentUnhealthyNodes to 0 by + setting the value in the key value pair in NodeTypeHealthPolicyMapItem. + The key is the node type name. + This way, as long as no nodes of type "SpecialNodeType" are in Error + state, + even if some of the many nodes in the global pool are in Error state, but + below the global unhealthy percentage, the cluster would be evaluated to + Warning. + A Warning health state does not impact cluster upgrade or other monitoring + triggered by Error health state. + But even one node of type SpecialNodeType in Error would make cluster + unhealthy (in Error rather than Warning/Ok), which triggers rollback or + pauses the cluster upgrade, depending on the upgrade configuration. + Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting + SpecialNodeType's max percent unhealthy nodes to 100, + with one node of type SpecialNodeType in Error state would still put the + cluster in an Error state, since the global restriction is more strict in + this case. + :type node_type_health_policy_map: + list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] + """ + + _attribute_map = { + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'application_type_health_policy_map': {'key': 'ApplicationTypeHealthPolicyMap', 'type': '[ApplicationTypeHealthPolicyMapItem]'}, + 'node_type_health_policy_map': {'key': 'NodeTypeHealthPolicyMap', 'type': '[NodeTypeHealthPolicyMapItem]'}, + } + + def __init__(self, **kwargs): + super(ClusterHealthPolicy, self).__init__(**kwargs) + self.consider_warning_as_error = kwargs.get('consider_warning_as_error', False) + self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', 0) + self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', 0) + self.application_type_health_policy_map = kwargs.get('application_type_health_policy_map', None) + self.node_type_health_policy_map = kwargs.get('node_type_health_policy_map', None) diff --git a/customSDK/servicefabric/models/cluster_health_policy_py3.py b/customSDK/servicefabric/models/cluster_health_policy_py3.py new file mode 100644 index 00000000..8c9230c7 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_policy_py3.py @@ -0,0 +1,129 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterHealthPolicy(Model): + """Defines a health policy used to evaluate the health of the cluster or of a + cluster node. + + :param consider_warning_as_error: Indicates whether warnings are treated + with the same severity as errors. Default value: False . + :type consider_warning_as_error: bool + :param max_percent_unhealthy_nodes: The maximum allowed percentage of + unhealthy nodes before reporting an error. For example, to allow 10% of + nodes to be unhealthy, this value would be 10. + The percentage represents the maximum tolerated percentage of nodes that + can be unhealthy before the cluster is considered in error. + If the percentage is respected but there is at least one unhealthy node, + the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes + over the total number of nodes in the cluster. + The computation rounds up to tolerate one failure on small numbers of + nodes. Default percentage is zero. + In large clusters, some nodes will always be down or out for repairs, so + this percentage should be configured to tolerate that. Default value: 0 . + :type max_percent_unhealthy_nodes: int + :param max_percent_unhealthy_applications: The maximum allowed percentage + of unhealthy applications before reporting an error. For example, to allow + 10% of applications to be unhealthy, this value would be 10. + The percentage represents the maximum tolerated percentage of applications + that can be unhealthy before the cluster is considered in error. + If the percentage is respected but there is at least one unhealthy + application, the health is evaluated as Warning. + This is calculated by dividing the number of unhealthy applications over + the total number of application instances in the cluster, excluding + applications of application types that are included in the + ApplicationTypeHealthPolicyMap. + The computation rounds up to tolerate one failure on small numbers of + applications. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_applications: int + :param application_type_health_policy_map: Defines a map with max + percentage unhealthy applications for specific application types. + Each entry specifies as key the application type name and as value an + integer that represents the MaxPercentUnhealthyApplications percentage + used to evaluate the applications of the specified application type. + The application type health policy map can be used during cluster health + evaluation to describe special application types. + The application types included in the map are evaluated against the + percentage specified in the map, and not with the global + MaxPercentUnhealthyApplications defined in the cluster health policy. + The applications of application types specified in the map are not counted + against the global pool of applications. + For example, if some applications of a type are critical, the cluster + administrator can add an entry to the map for that application type + and assign it a value of 0% (that is, do not tolerate any failures). + All other applications can be evaluated with + MaxPercentUnhealthyApplications set to 20% to tolerate some failures out + of the thousands of application instances. + The application type health policy map is used only if the cluster + manifest enables application type health evaluation using the + configuration entry for + HealthManager/EnableApplicationTypeHealthEvaluation. + :type application_type_health_policy_map: + list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] + :param node_type_health_policy_map: Defines a map with max percentage + unhealthy nodes for specific node types. + Each entry specifies as key the node type name and as value an integer + that represents the MaxPercentUnhealthyNodes percentage used to evaluate + the nodes of the specified node type. + The node type health policy map can be used during cluster health + evaluation to describe special node types. + They are evaluated against the percentages associated with their node type + name in the map. + Setting this has no impact on the global pool of nodes used for + MaxPercentUnhealthyNodes. + The node type health policy map is used only if the cluster manifest + enables node type health evaluation using the configuration entry for + HealthManager/EnableNodeTypeHealthEvaluation. + For example, given a cluster with many nodes of different types, with + important work hosted on node type "SpecialNodeType" that should not + tolerate any nodes down. + You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some + failures for all nodes, but for the node type "SpecialNodeType", set the + MaxPercentUnhealthyNodes to 0 by + setting the value in the key value pair in NodeTypeHealthPolicyMapItem. + The key is the node type name. + This way, as long as no nodes of type "SpecialNodeType" are in Error + state, + even if some of the many nodes in the global pool are in Error state, but + below the global unhealthy percentage, the cluster would be evaluated to + Warning. + A Warning health state does not impact cluster upgrade or other monitoring + triggered by Error health state. + But even one node of type SpecialNodeType in Error would make cluster + unhealthy (in Error rather than Warning/Ok), which triggers rollback or + pauses the cluster upgrade, depending on the upgrade configuration. + Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting + SpecialNodeType's max percent unhealthy nodes to 100, + with one node of type SpecialNodeType in Error state would still put the + cluster in an Error state, since the global restriction is more strict in + this case. + :type node_type_health_policy_map: + list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] + """ + + _attribute_map = { + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, + 'application_type_health_policy_map': {'key': 'ApplicationTypeHealthPolicyMap', 'type': '[ApplicationTypeHealthPolicyMapItem]'}, + 'node_type_health_policy_map': {'key': 'NodeTypeHealthPolicyMap', 'type': '[NodeTypeHealthPolicyMapItem]'}, + } + + def __init__(self, *, consider_warning_as_error: bool=False, max_percent_unhealthy_nodes: int=0, max_percent_unhealthy_applications: int=0, application_type_health_policy_map=None, node_type_health_policy_map=None, **kwargs) -> None: + super(ClusterHealthPolicy, self).__init__(**kwargs) + self.consider_warning_as_error = consider_warning_as_error + self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes + self.max_percent_unhealthy_applications = max_percent_unhealthy_applications + self.application_type_health_policy_map = application_type_health_policy_map + self.node_type_health_policy_map = node_type_health_policy_map diff --git a/customSDK/servicefabric/models/cluster_health_py3.py b/customSDK/servicefabric/models/cluster_health_py3.py new file mode 100644 index 00000000..a60ca495 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_py3 import EntityHealth + + +class ClusterHealth(EntityHealth): + """Represents the health of the cluster. + Contains the cluster aggregated health state, the cluster application and + node health states as well as the health events and the unhealthy + evaluations. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param node_health_states: Cluster node health states as found in the + health store. + :type node_health_states: + list[~azure.servicefabric.models.NodeHealthState] + :param application_health_states: Cluster application health states as + found in the health store. + :type application_health_states: + list[~azure.servicefabric.models.ApplicationHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'node_health_states': {'key': 'NodeHealthStates', 'type': '[NodeHealthState]'}, + 'application_health_states': {'key': 'ApplicationHealthStates', 'type': '[ApplicationHealthState]'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, node_health_states=None, application_health_states=None, **kwargs) -> None: + super(ClusterHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.node_health_states = node_health_states + self.application_health_states = application_health_states diff --git a/customSDK/servicefabric/models/cluster_health_report_expired_event.py b/customSDK/servicefabric/models/cluster_health_report_expired_event.py new file mode 100644 index 00000000..a714abca --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_report_expired_event.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event import ClusterEvent + + +class ClusterHealthReportExpiredEvent(ClusterEvent): + """Cluster Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ClusterHealthReportExpiredEvent, self).__init__(**kwargs) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'ClusterHealthReportExpired' diff --git a/customSDK/servicefabric/models/cluster_health_report_expired_event_py3.py b/customSDK/servicefabric/models/cluster_health_report_expired_event_py3.py new file mode 100644 index 00000000..fcef06a2 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_health_report_expired_event_py3.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event_py3 import ClusterEvent + + +class ClusterHealthReportExpiredEvent(ClusterEvent): + """Cluster Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ClusterHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'ClusterHealthReportExpired' diff --git a/customSDK/servicefabric/models/cluster_load_info.py b/customSDK/servicefabric/models/cluster_load_info.py new file mode 100644 index 00000000..2dfb3fd1 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_load_info.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterLoadInfo(Model): + """Information about load in a Service Fabric cluster. It holds a summary of + all metrics and their load in a cluster. + + :param last_balancing_start_time_utc: The starting time of last resource + balancing run. + :type last_balancing_start_time_utc: datetime + :param last_balancing_end_time_utc: The end time of last resource + balancing run. + :type last_balancing_end_time_utc: datetime + :param load_metric_information: List that contains metrics and their load + information in this cluster. + :type load_metric_information: + list[~azure.servicefabric.models.LoadMetricInformation] + """ + + _attribute_map = { + 'last_balancing_start_time_utc': {'key': 'LastBalancingStartTimeUtc', 'type': 'iso-8601'}, + 'last_balancing_end_time_utc': {'key': 'LastBalancingEndTimeUtc', 'type': 'iso-8601'}, + 'load_metric_information': {'key': 'LoadMetricInformation', 'type': '[LoadMetricInformation]'}, + } + + def __init__(self, **kwargs): + super(ClusterLoadInfo, self).__init__(**kwargs) + self.last_balancing_start_time_utc = kwargs.get('last_balancing_start_time_utc', None) + self.last_balancing_end_time_utc = kwargs.get('last_balancing_end_time_utc', None) + self.load_metric_information = kwargs.get('load_metric_information', None) diff --git a/customSDK/servicefabric/models/cluster_load_info_py3.py b/customSDK/servicefabric/models/cluster_load_info_py3.py new file mode 100644 index 00000000..d71dc2cd --- /dev/null +++ b/customSDK/servicefabric/models/cluster_load_info_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterLoadInfo(Model): + """Information about load in a Service Fabric cluster. It holds a summary of + all metrics and their load in a cluster. + + :param last_balancing_start_time_utc: The starting time of last resource + balancing run. + :type last_balancing_start_time_utc: datetime + :param last_balancing_end_time_utc: The end time of last resource + balancing run. + :type last_balancing_end_time_utc: datetime + :param load_metric_information: List that contains metrics and their load + information in this cluster. + :type load_metric_information: + list[~azure.servicefabric.models.LoadMetricInformation] + """ + + _attribute_map = { + 'last_balancing_start_time_utc': {'key': 'LastBalancingStartTimeUtc', 'type': 'iso-8601'}, + 'last_balancing_end_time_utc': {'key': 'LastBalancingEndTimeUtc', 'type': 'iso-8601'}, + 'load_metric_information': {'key': 'LoadMetricInformation', 'type': '[LoadMetricInformation]'}, + } + + def __init__(self, *, last_balancing_start_time_utc=None, last_balancing_end_time_utc=None, load_metric_information=None, **kwargs) -> None: + super(ClusterLoadInfo, self).__init__(**kwargs) + self.last_balancing_start_time_utc = last_balancing_start_time_utc + self.last_balancing_end_time_utc = last_balancing_end_time_utc + self.load_metric_information = load_metric_information diff --git a/customSDK/servicefabric/models/cluster_manifest.py b/customSDK/servicefabric/models/cluster_manifest.py new file mode 100644 index 00000000..6f3f3e4f --- /dev/null +++ b/customSDK/servicefabric/models/cluster_manifest.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterManifest(Model): + """Information about the cluster manifest. + + :param manifest: The contents of the cluster manifest file. + :type manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterManifest, self).__init__(**kwargs) + self.manifest = kwargs.get('manifest', None) diff --git a/customSDK/servicefabric/models/cluster_manifest_py3.py b/customSDK/servicefabric/models/cluster_manifest_py3.py new file mode 100644 index 00000000..3dc2d2c8 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_manifest_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterManifest(Model): + """Information about the cluster manifest. + + :param manifest: The contents of the cluster manifest file. + :type manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__(self, *, manifest: str=None, **kwargs) -> None: + super(ClusterManifest, self).__init__(**kwargs) + self.manifest = manifest diff --git a/customSDK/servicefabric/models/cluster_new_health_report_event.py b/customSDK/servicefabric/models/cluster_new_health_report_event.py new file mode 100644 index 00000000..3c6b2be1 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_new_health_report_event.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event import ClusterEvent + + +class ClusterNewHealthReportEvent(ClusterEvent): + """Cluster Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ClusterNewHealthReportEvent, self).__init__(**kwargs) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'ClusterNewHealthReport' diff --git a/customSDK/servicefabric/models/cluster_new_health_report_event_py3.py b/customSDK/servicefabric/models/cluster_new_health_report_event_py3.py new file mode 100644 index 00000000..4f31abb5 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_new_health_report_event_py3.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event_py3 import ClusterEvent + + +class ClusterNewHealthReportEvent(ClusterEvent): + """Cluster Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ClusterNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'ClusterNewHealthReport' diff --git a/customSDK/servicefabric/models/cluster_upgrade_completed_event.py b/customSDK/servicefabric/models/cluster_upgrade_completed_event.py new file mode 100644 index 00000000..3b75cdd1 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_completed_event.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event import ClusterEvent + + +class ClusterUpgradeCompletedEvent(ClusterEvent): + """Cluster Upgrade Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of + upgrade in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'target_cluster_version': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ClusterUpgradeCompletedEvent, self).__init__(**kwargs) + self.target_cluster_version = kwargs.get('target_cluster_version', None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) + self.kind = 'ClusterUpgradeCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_completed_event_py3.py b/customSDK/servicefabric/models/cluster_upgrade_completed_event_py3.py new file mode 100644 index 00000000..8422f87b --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_completed_event_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event_py3 import ClusterEvent + + +class ClusterUpgradeCompletedEvent(ClusterEvent): + """Cluster Upgrade Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of + upgrade in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'target_cluster_version': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ClusterUpgradeCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.target_cluster_version = target_cluster_version + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + self.kind = 'ClusterUpgradeCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_description_object.py b/customSDK/servicefabric/models/cluster_upgrade_description_object.py new file mode 100644 index 00000000..fdc4981b --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_description_object.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterUpgradeDescriptionObject(Model): + """Represents a ServiceFabric cluster upgrade. + + :param config_version: The cluster configuration version (specified in the + cluster manifest). + :type config_version: str + :param code_version: The ServiceFabric code version of the cluster. + :type code_version: str + :param upgrade_kind: The kind of upgrade out of the following possible + values. Possible values include: 'Invalid', 'Rolling'. Default value: + "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, + Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', + 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param sort_order: Defines the order in which an upgrade proceeds through + the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', + 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default + value: "Default" . + :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :param enable_delta_health_evaluation: When true, enables delta health + evaluation rather than absolute health evaluation after completion of each + upgrade domain. + :type enable_delta_health_evaluation: bool + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param cluster_upgrade_health_policy: Defines a health policy used to + evaluate the health of the cluster during a cluster upgrade. + :type cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :param application_health_policy_map: Represents the map of application + health policies for a ServiceFabric cluster upgrade + :type application_health_policy_map: + ~azure.servicefabric.models.ApplicationHealthPolicyMapObject + """ + + _attribute_map = { + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicyMapObject'}, + } + + def __init__(self, **kwargs): + super(ClusterUpgradeDescriptionObject, self).__init__(**kwargs) + self.config_version = kwargs.get('config_version', None) + self.code_version = kwargs.get('code_version', None) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) + self.force_restart = kwargs.get('force_restart', None) + self.sort_order = kwargs.get('sort_order', "Default") + self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) + self.monitoring_policy = kwargs.get('monitoring_policy', None) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) diff --git a/customSDK/servicefabric/models/cluster_upgrade_description_object_py3.py b/customSDK/servicefabric/models/cluster_upgrade_description_object_py3.py new file mode 100644 index 00000000..ac7771a3 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_description_object_py3.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterUpgradeDescriptionObject(Model): + """Represents a ServiceFabric cluster upgrade. + + :param config_version: The cluster configuration version (specified in the + cluster manifest). + :type config_version: str + :param code_version: The ServiceFabric code version of the cluster. + :type code_version: str + :param upgrade_kind: The kind of upgrade out of the following possible + values. Possible values include: 'Invalid', 'Rolling'. Default value: + "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, + Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', + 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param sort_order: Defines the order in which an upgrade proceeds through + the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', + 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default + value: "Default" . + :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :param enable_delta_health_evaluation: When true, enables delta health + evaluation rather than absolute health evaluation after completion of each + upgrade domain. + :type enable_delta_health_evaluation: bool + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param cluster_upgrade_health_policy: Defines a health policy used to + evaluate the health of the cluster during a cluster upgrade. + :type cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :param application_health_policy_map: Represents the map of application + health policies for a ServiceFabric cluster upgrade + :type application_health_policy_map: + ~azure.servicefabric.models.ApplicationHealthPolicyMapObject + """ + + _attribute_map = { + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicyMapObject'}, + } + + def __init__(self, *, config_version: str=None, code_version: str=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", enable_delta_health_evaluation: bool=None, monitoring_policy=None, cluster_health_policy=None, cluster_upgrade_health_policy=None, application_health_policy_map=None, **kwargs) -> None: + super(ClusterUpgradeDescriptionObject, self).__init__(**kwargs) + self.config_version = config_version + self.code_version = code_version + self.upgrade_kind = upgrade_kind + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.force_restart = force_restart + self.sort_order = sort_order + self.enable_delta_health_evaluation = enable_delta_health_evaluation + self.monitoring_policy = monitoring_policy + self.cluster_health_policy = cluster_health_policy + self.cluster_upgrade_health_policy = cluster_upgrade_health_policy + self.application_health_policy_map = application_health_policy_map diff --git a/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event.py b/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event.py new file mode 100644 index 00000000..42a87702 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event import ClusterEvent + + +class ClusterUpgradeDomainCompletedEvent(ClusterEvent): + """Cluster Upgrade Domain Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param upgrade_state: Required. State of upgrade. + :type upgrade_state: str + :param upgrade_domains: Required. Upgrade domains. + :type upgrade_domains: str + :param upgrade_domain_elapsed_time_in_ms: Required. Duration of domain + upgrade in milli-seconds. + :type upgrade_domain_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'target_cluster_version': {'required': True}, + 'upgrade_state': {'required': True}, + 'upgrade_domains': {'required': True}, + 'upgrade_domain_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, + 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ClusterUpgradeDomainCompletedEvent, self).__init__(**kwargs) + self.target_cluster_version = kwargs.get('target_cluster_version', None) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.upgrade_domains = kwargs.get('upgrade_domains', None) + self.upgrade_domain_elapsed_time_in_ms = kwargs.get('upgrade_domain_elapsed_time_in_ms', None) + self.kind = 'ClusterUpgradeDomainCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event_py3.py b/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event_py3.py new file mode 100644 index 00000000..df7ea67d --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event_py3.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event_py3 import ClusterEvent + + +class ClusterUpgradeDomainCompletedEvent(ClusterEvent): + """Cluster Upgrade Domain Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param upgrade_state: Required. State of upgrade. + :type upgrade_state: str + :param upgrade_domains: Required. Upgrade domains. + :type upgrade_domains: str + :param upgrade_domain_elapsed_time_in_ms: Required. Duration of domain + upgrade in milli-seconds. + :type upgrade_domain_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'target_cluster_version': {'required': True}, + 'upgrade_state': {'required': True}, + 'upgrade_domains': {'required': True}, + 'upgrade_domain_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, + 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, upgrade_state: str, upgrade_domains: str, upgrade_domain_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ClusterUpgradeDomainCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.target_cluster_version = target_cluster_version + self.upgrade_state = upgrade_state + self.upgrade_domains = upgrade_domains + self.upgrade_domain_elapsed_time_in_ms = upgrade_domain_elapsed_time_in_ms + self.kind = 'ClusterUpgradeDomainCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_health_policy_object.py b/customSDK/servicefabric/models/cluster_upgrade_health_policy_object.py new file mode 100644 index 00000000..80f09db1 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_health_policy_object.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterUpgradeHealthPolicyObject(Model): + """Defines a health policy used to evaluate the health of the cluster during a + cluster upgrade. + + :param max_percent_delta_unhealthy_nodes: The maximum allowed percentage + of nodes health degradation allowed during cluster upgrades. The delta is + measured between the state of the nodes at the beginning of upgrade and + the state of the nodes at the time of the health evaluation. The check is + performed after every upgrade domain upgrade completion to make sure the + global state of the cluster is within tolerated limits. The default value + is 10%. + :type max_percent_delta_unhealthy_nodes: int + :param max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum + allowed percentage of upgrade domain nodes health degradation allowed + during cluster upgrades. The delta is measured between the state of the + upgrade domain nodes at the beginning of upgrade and the state of the + upgrade domain nodes at the time of the health evaluation. The check is + performed after every upgrade domain upgrade completion for all completed + upgrade domains to make sure the state of the upgrade domains is within + tolerated limits. The default value is 15%. + :type max_percent_upgrade_domain_delta_unhealthy_nodes: int + """ + + _validation = { + 'max_percent_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ClusterUpgradeHealthPolicyObject, self).__init__(**kwargs) + self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) + self.max_percent_upgrade_domain_delta_unhealthy_nodes = kwargs.get('max_percent_upgrade_domain_delta_unhealthy_nodes', None) diff --git a/customSDK/servicefabric/models/cluster_upgrade_health_policy_object_py3.py b/customSDK/servicefabric/models/cluster_upgrade_health_policy_object_py3.py new file mode 100644 index 00000000..f6143c36 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_health_policy_object_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterUpgradeHealthPolicyObject(Model): + """Defines a health policy used to evaluate the health of the cluster during a + cluster upgrade. + + :param max_percent_delta_unhealthy_nodes: The maximum allowed percentage + of nodes health degradation allowed during cluster upgrades. The delta is + measured between the state of the nodes at the beginning of upgrade and + the state of the nodes at the time of the health evaluation. The check is + performed after every upgrade domain upgrade completion to make sure the + global state of the cluster is within tolerated limits. The default value + is 10%. + :type max_percent_delta_unhealthy_nodes: int + :param max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum + allowed percentage of upgrade domain nodes health degradation allowed + during cluster upgrades. The delta is measured between the state of the + upgrade domain nodes at the beginning of upgrade and the state of the + upgrade domain nodes at the time of the health evaluation. The check is + performed after every upgrade domain upgrade completion for all completed + upgrade domains to make sure the state of the upgrade domains is within + tolerated limits. The default value is 15%. + :type max_percent_upgrade_domain_delta_unhealthy_nodes: int + """ + + _validation = { + 'max_percent_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, + } + + def __init__(self, *, max_percent_delta_unhealthy_nodes: int=None, max_percent_upgrade_domain_delta_unhealthy_nodes: int=None, **kwargs) -> None: + super(ClusterUpgradeHealthPolicyObject, self).__init__(**kwargs) + self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes + self.max_percent_upgrade_domain_delta_unhealthy_nodes = max_percent_upgrade_domain_delta_unhealthy_nodes diff --git a/customSDK/servicefabric/models/cluster_upgrade_progress_object.py b/customSDK/servicefabric/models/cluster_upgrade_progress_object.py new file mode 100644 index 00000000..9e9bc4e8 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_progress_object.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterUpgradeProgressObject(Model): + """Information about a cluster upgrade. + + :param code_version: The ServiceFabric code version of the cluster. + :type code_version: str + :param config_version: The cluster configuration version (specified in the + cluster manifest). + :type config_version: str + :param upgrade_domains: List of upgrade domains and their statuses. Not + applicable to node-by-node upgrades. + :type upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] + :param upgrade_units: List of upgrade units and their statuses. + :type upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] + :param upgrade_state: The state of the upgrade domain. Possible values + include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', + 'RollingForwardPending', 'RollingForwardInProgress', + 'RollingForwardCompleted', 'Failed' + :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :param next_upgrade_domain: The name of the next upgrade domain to be + processed. Not applicable to node-by-node upgrades. + :type next_upgrade_domain: str + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, + Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', + 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_description: Represents a ServiceFabric cluster upgrade + :type upgrade_description: + ~azure.servicefabric.models.ClusterUpgradeDescriptionObject + :param upgrade_duration_in_milliseconds: The estimated elapsed time spent + processing the current overall upgrade. + :type upgrade_duration_in_milliseconds: str + :param upgrade_domain_duration_in_milliseconds: The estimated elapsed time + spent processing the current upgrade domain. Not applicable to + node-by-node upgrades. + :type upgrade_domain_duration_in_milliseconds: str + :param unhealthy_evaluations: List of health evaluations that resulted in + the current aggregated health state. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param current_upgrade_domain_progress: Information about the current + in-progress upgrade domain. Not applicable to node-by-node upgrades. + :type current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :param current_upgrade_units_progress: Information about the current + in-progress upgrade units. + :type current_upgrade_units_progress: + ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo + :param start_timestamp_utc: The start time of the upgrade in UTC. + :type start_timestamp_utc: str + :param failure_timestamp_utc: The failure time of the upgrade in UTC. + :type failure_timestamp_utc: str + :param failure_reason: The cause of an upgrade failure that resulted in + FailureAction being executed. Possible values include: 'None', + 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + 'OverallUpgradeTimeout' + :type failure_reason: str or ~azure.servicefabric.models.FailureReason + :param upgrade_domain_progress_at_failure: The detailed upgrade progress + for nodes in the current upgrade domain at the point of failure. Not + applicable to node-by-node upgrades. + :type upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailedUpgradeDomainProgressObject + :param is_node_by_node: Indicates whether this upgrade is node-by-node. + Default value: False . + :type is_node_by_node: bool + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, + 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ClusterUpgradeDescriptionObject'}, + 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, + 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailedUpgradeDomainProgressObject'}, + 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ClusterUpgradeProgressObject, self).__init__(**kwargs) + self.code_version = kwargs.get('code_version', None) + self.config_version = kwargs.get('config_version', None) + self.upgrade_domains = kwargs.get('upgrade_domains', None) + self.upgrade_units = kwargs.get('upgrade_units', None) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.next_upgrade_domain = kwargs.get('next_upgrade_domain', None) + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_description = kwargs.get('upgrade_description', None) + self.upgrade_duration_in_milliseconds = kwargs.get('upgrade_duration_in_milliseconds', None) + self.upgrade_domain_duration_in_milliseconds = kwargs.get('upgrade_domain_duration_in_milliseconds', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) + self.current_upgrade_units_progress = kwargs.get('current_upgrade_units_progress', None) + self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) + self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) + self.is_node_by_node = kwargs.get('is_node_by_node', False) diff --git a/customSDK/servicefabric/models/cluster_upgrade_progress_object_py3.py b/customSDK/servicefabric/models/cluster_upgrade_progress_object_py3.py new file mode 100644 index 00000000..b22989b5 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_progress_object_py3.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterUpgradeProgressObject(Model): + """Information about a cluster upgrade. + + :param code_version: The ServiceFabric code version of the cluster. + :type code_version: str + :param config_version: The cluster configuration version (specified in the + cluster manifest). + :type config_version: str + :param upgrade_domains: List of upgrade domains and their statuses. Not + applicable to node-by-node upgrades. + :type upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] + :param upgrade_units: List of upgrade units and their statuses. + :type upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] + :param upgrade_state: The state of the upgrade domain. Possible values + include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', + 'RollingForwardPending', 'RollingForwardInProgress', + 'RollingForwardCompleted', 'Failed' + :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState + :param next_upgrade_domain: The name of the next upgrade domain to be + processed. Not applicable to node-by-node upgrades. + :type next_upgrade_domain: str + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, + Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', + 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_description: Represents a ServiceFabric cluster upgrade + :type upgrade_description: + ~azure.servicefabric.models.ClusterUpgradeDescriptionObject + :param upgrade_duration_in_milliseconds: The estimated elapsed time spent + processing the current overall upgrade. + :type upgrade_duration_in_milliseconds: str + :param upgrade_domain_duration_in_milliseconds: The estimated elapsed time + spent processing the current upgrade domain. Not applicable to + node-by-node upgrades. + :type upgrade_domain_duration_in_milliseconds: str + :param unhealthy_evaluations: List of health evaluations that resulted in + the current aggregated health state. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param current_upgrade_domain_progress: Information about the current + in-progress upgrade domain. Not applicable to node-by-node upgrades. + :type current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :param current_upgrade_units_progress: Information about the current + in-progress upgrade units. + :type current_upgrade_units_progress: + ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo + :param start_timestamp_utc: The start time of the upgrade in UTC. + :type start_timestamp_utc: str + :param failure_timestamp_utc: The failure time of the upgrade in UTC. + :type failure_timestamp_utc: str + :param failure_reason: The cause of an upgrade failure that resulted in + FailureAction being executed. Possible values include: 'None', + 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + 'OverallUpgradeTimeout' + :type failure_reason: str or ~azure.servicefabric.models.FailureReason + :param upgrade_domain_progress_at_failure: The detailed upgrade progress + for nodes in the current upgrade domain at the point of failure. Not + applicable to node-by-node upgrades. + :type upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailedUpgradeDomainProgressObject + :param is_node_by_node: Indicates whether this upgrade is node-by-node. + Default value: False . + :type is_node_by_node: bool + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, + 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ClusterUpgradeDescriptionObject'}, + 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, + 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailedUpgradeDomainProgressObject'}, + 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, + } + + def __init__(self, *, code_version: str=None, config_version: str=None, upgrade_domains=None, upgrade_units=None, upgrade_state=None, next_upgrade_domain: str=None, rolling_upgrade_mode="UnmonitoredAuto", upgrade_description=None, upgrade_duration_in_milliseconds: str=None, upgrade_domain_duration_in_milliseconds: str=None, unhealthy_evaluations=None, current_upgrade_domain_progress=None, current_upgrade_units_progress=None, start_timestamp_utc: str=None, failure_timestamp_utc: str=None, failure_reason=None, upgrade_domain_progress_at_failure=None, is_node_by_node: bool=False, **kwargs) -> None: + super(ClusterUpgradeProgressObject, self).__init__(**kwargs) + self.code_version = code_version + self.config_version = config_version + self.upgrade_domains = upgrade_domains + self.upgrade_units = upgrade_units + self.upgrade_state = upgrade_state + self.next_upgrade_domain = next_upgrade_domain + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_description = upgrade_description + self.upgrade_duration_in_milliseconds = upgrade_duration_in_milliseconds + self.upgrade_domain_duration_in_milliseconds = upgrade_domain_duration_in_milliseconds + self.unhealthy_evaluations = unhealthy_evaluations + self.current_upgrade_domain_progress = current_upgrade_domain_progress + self.current_upgrade_units_progress = current_upgrade_units_progress + self.start_timestamp_utc = start_timestamp_utc + self.failure_timestamp_utc = failure_timestamp_utc + self.failure_reason = failure_reason + self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure + self.is_node_by_node = is_node_by_node diff --git a/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event.py b/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event.py new file mode 100644 index 00000000..a9147739 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event import ClusterEvent + + +class ClusterUpgradeRollbackCompletedEvent(ClusterEvent): + """Cluster Upgrade Rollback Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param failure_reason: Required. Describes failure. + :type failure_reason: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of + upgrade in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'target_cluster_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ClusterUpgradeRollbackCompletedEvent, self).__init__(**kwargs) + self.target_cluster_version = kwargs.get('target_cluster_version', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) + self.kind = 'ClusterUpgradeRollbackCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event_py3.py b/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event_py3.py new file mode 100644 index 00000000..75e456c3 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event_py3 import ClusterEvent + + +class ClusterUpgradeRollbackCompletedEvent(ClusterEvent): + """Cluster Upgrade Rollback Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param failure_reason: Required. Describes failure. + :type failure_reason: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of + upgrade in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'target_cluster_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ClusterUpgradeRollbackCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.target_cluster_version = target_cluster_version + self.failure_reason = failure_reason + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + self.kind = 'ClusterUpgradeRollbackCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event.py b/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event.py new file mode 100644 index 00000000..b278a7de --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event import ClusterEvent + + +class ClusterUpgradeRollbackStartedEvent(ClusterEvent): + """Cluster Upgrade Rollback Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param failure_reason: Required. Describes failure. + :type failure_reason: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of + upgrade in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'target_cluster_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ClusterUpgradeRollbackStartedEvent, self).__init__(**kwargs) + self.target_cluster_version = kwargs.get('target_cluster_version', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) + self.kind = 'ClusterUpgradeRollbackStarted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event_py3.py b/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event_py3.py new file mode 100644 index 00000000..54e00da9 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event_py3 import ClusterEvent + + +class ClusterUpgradeRollbackStartedEvent(ClusterEvent): + """Cluster Upgrade Rollback Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param failure_reason: Required. Describes failure. + :type failure_reason: str + :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of + upgrade in milli-seconds. + :type overall_upgrade_elapsed_time_in_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'target_cluster_version': {'required': True}, + 'failure_reason': {'required': True}, + 'overall_upgrade_elapsed_time_in_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ClusterUpgradeRollbackStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.target_cluster_version = target_cluster_version + self.failure_reason = failure_reason + self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms + self.kind = 'ClusterUpgradeRollbackStarted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_started_event.py b/customSDK/servicefabric/models/cluster_upgrade_started_event.py new file mode 100644 index 00000000..7222ff33 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_started_event.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event import ClusterEvent + + +class ClusterUpgradeStartedEvent(ClusterEvent): + """Cluster Upgrade Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param current_cluster_version: Required. Current Cluster version. + :type current_cluster_version: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param upgrade_type: Required. Type of upgrade. + :type upgrade_type: str + :param rolling_upgrade_mode: Required. Mode of upgrade. + :type rolling_upgrade_mode: str + :param failure_action: Required. Action if failed. + :type failure_action: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'current_cluster_version': {'required': True}, + 'target_cluster_version': {'required': True}, + 'upgrade_type': {'required': True}, + 'rolling_upgrade_mode': {'required': True}, + 'failure_action': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'current_cluster_version': {'key': 'CurrentClusterVersion', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterUpgradeStartedEvent, self).__init__(**kwargs) + self.current_cluster_version = kwargs.get('current_cluster_version', None) + self.target_cluster_version = kwargs.get('target_cluster_version', None) + self.upgrade_type = kwargs.get('upgrade_type', None) + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', None) + self.failure_action = kwargs.get('failure_action', None) + self.kind = 'ClusterUpgradeStarted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_started_event_py3.py b/customSDK/servicefabric/models/cluster_upgrade_started_event_py3.py new file mode 100644 index 00000000..e35bc36b --- /dev/null +++ b/customSDK/servicefabric/models/cluster_upgrade_started_event_py3.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .cluster_event_py3 import ClusterEvent + + +class ClusterUpgradeStartedEvent(ClusterEvent): + """Cluster Upgrade Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param current_cluster_version: Required. Current Cluster version. + :type current_cluster_version: str + :param target_cluster_version: Required. Target Cluster version. + :type target_cluster_version: str + :param upgrade_type: Required. Type of upgrade. + :type upgrade_type: str + :param rolling_upgrade_mode: Required. Mode of upgrade. + :type rolling_upgrade_mode: str + :param failure_action: Required. Action if failed. + :type failure_action: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'current_cluster_version': {'required': True}, + 'target_cluster_version': {'required': True}, + 'upgrade_type': {'required': True}, + 'rolling_upgrade_mode': {'required': True}, + 'failure_action': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'current_cluster_version': {'key': 'CurrentClusterVersion', 'type': 'str'}, + 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, + 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, current_cluster_version: str, target_cluster_version: str, upgrade_type: str, rolling_upgrade_mode: str, failure_action: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ClusterUpgradeStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.current_cluster_version = current_cluster_version + self.target_cluster_version = target_cluster_version + self.upgrade_type = upgrade_type + self.rolling_upgrade_mode = rolling_upgrade_mode + self.failure_action = failure_action + self.kind = 'ClusterUpgradeStarted' diff --git a/customSDK/servicefabric/models/cluster_version.py b/customSDK/servicefabric/models/cluster_version.py new file mode 100644 index 00000000..15b4fdbf --- /dev/null +++ b/customSDK/servicefabric/models/cluster_version.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterVersion(Model): + """The cluster version. + + :param version: The Service Fabric cluster runtime version. + :type version: str + """ + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterVersion, self).__init__(**kwargs) + self.version = kwargs.get('version', None) diff --git a/customSDK/servicefabric/models/cluster_version_py3.py b/customSDK/servicefabric/models/cluster_version_py3.py new file mode 100644 index 00000000..fcf80889 --- /dev/null +++ b/customSDK/servicefabric/models/cluster_version_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterVersion(Model): + """The cluster version. + + :param version: The Service Fabric cluster runtime version. + :type version: str + """ + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, *, version: str=None, **kwargs) -> None: + super(ClusterVersion, self).__init__(**kwargs) + self.version = version diff --git a/customSDK/servicefabric/models/code_package_entry_point.py b/customSDK/servicefabric/models/code_package_entry_point.py new file mode 100644 index 00000000..7b03f019 --- /dev/null +++ b/customSDK/servicefabric/models/code_package_entry_point.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CodePackageEntryPoint(Model): + """Information about setup or main entry point of a code package deployed on a + Service Fabric node. + + :param entry_point_location: The location of entry point executable on the + node. + :type entry_point_location: str + :param process_id: The process ID of the entry point. + :type process_id: str + :param run_as_user_name: The user name under which entry point executable + is run on the node. + :type run_as_user_name: str + :param code_package_entry_point_statistics: Statistics about setup or main + entry point of a code package deployed on a Service Fabric node. + :type code_package_entry_point_statistics: + ~azure.servicefabric.models.CodePackageEntryPointStatistics + :param status: Specifies the status of the code package entry point + deployed on a Service Fabric node. Possible values include: 'Invalid', + 'Pending', 'Starting', 'Started', 'Stopping', 'Stopped' + :type status: str or ~azure.servicefabric.models.EntryPointStatus + :param next_activation_time: The time (in UTC) when the entry point + executable will be run next. + :type next_activation_time: datetime + :param instance_id: The instance ID for current running entry point. For a + code package setup entry point (if specified) runs first and after it + finishes main entry point is started. Each time entry point executable is + run, its instance id will change. + :type instance_id: str + """ + + _attribute_map = { + 'entry_point_location': {'key': 'EntryPointLocation', 'type': 'str'}, + 'process_id': {'key': 'ProcessId', 'type': 'str'}, + 'run_as_user_name': {'key': 'RunAsUserName', 'type': 'str'}, + 'code_package_entry_point_statistics': {'key': 'CodePackageEntryPointStatistics', 'type': 'CodePackageEntryPointStatistics'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'next_activation_time': {'key': 'NextActivationTime', 'type': 'iso-8601'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CodePackageEntryPoint, self).__init__(**kwargs) + self.entry_point_location = kwargs.get('entry_point_location', None) + self.process_id = kwargs.get('process_id', None) + self.run_as_user_name = kwargs.get('run_as_user_name', None) + self.code_package_entry_point_statistics = kwargs.get('code_package_entry_point_statistics', None) + self.status = kwargs.get('status', None) + self.next_activation_time = kwargs.get('next_activation_time', None) + self.instance_id = kwargs.get('instance_id', None) diff --git a/customSDK/servicefabric/models/code_package_entry_point_py3.py b/customSDK/servicefabric/models/code_package_entry_point_py3.py new file mode 100644 index 00000000..08d41003 --- /dev/null +++ b/customSDK/servicefabric/models/code_package_entry_point_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CodePackageEntryPoint(Model): + """Information about setup or main entry point of a code package deployed on a + Service Fabric node. + + :param entry_point_location: The location of entry point executable on the + node. + :type entry_point_location: str + :param process_id: The process ID of the entry point. + :type process_id: str + :param run_as_user_name: The user name under which entry point executable + is run on the node. + :type run_as_user_name: str + :param code_package_entry_point_statistics: Statistics about setup or main + entry point of a code package deployed on a Service Fabric node. + :type code_package_entry_point_statistics: + ~azure.servicefabric.models.CodePackageEntryPointStatistics + :param status: Specifies the status of the code package entry point + deployed on a Service Fabric node. Possible values include: 'Invalid', + 'Pending', 'Starting', 'Started', 'Stopping', 'Stopped' + :type status: str or ~azure.servicefabric.models.EntryPointStatus + :param next_activation_time: The time (in UTC) when the entry point + executable will be run next. + :type next_activation_time: datetime + :param instance_id: The instance ID for current running entry point. For a + code package setup entry point (if specified) runs first and after it + finishes main entry point is started. Each time entry point executable is + run, its instance id will change. + :type instance_id: str + """ + + _attribute_map = { + 'entry_point_location': {'key': 'EntryPointLocation', 'type': 'str'}, + 'process_id': {'key': 'ProcessId', 'type': 'str'}, + 'run_as_user_name': {'key': 'RunAsUserName', 'type': 'str'}, + 'code_package_entry_point_statistics': {'key': 'CodePackageEntryPointStatistics', 'type': 'CodePackageEntryPointStatistics'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'next_activation_time': {'key': 'NextActivationTime', 'type': 'iso-8601'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__(self, *, entry_point_location: str=None, process_id: str=None, run_as_user_name: str=None, code_package_entry_point_statistics=None, status=None, next_activation_time=None, instance_id: str=None, **kwargs) -> None: + super(CodePackageEntryPoint, self).__init__(**kwargs) + self.entry_point_location = entry_point_location + self.process_id = process_id + self.run_as_user_name = run_as_user_name + self.code_package_entry_point_statistics = code_package_entry_point_statistics + self.status = status + self.next_activation_time = next_activation_time + self.instance_id = instance_id diff --git a/customSDK/servicefabric/models/code_package_entry_point_statistics.py b/customSDK/servicefabric/models/code_package_entry_point_statistics.py new file mode 100644 index 00000000..2f33d3d4 --- /dev/null +++ b/customSDK/servicefabric/models/code_package_entry_point_statistics.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CodePackageEntryPointStatistics(Model): + """Statistics about setup or main entry point of a code package deployed on a + Service Fabric node. + + :param last_exit_code: The last exit code of the entry point. + :type last_exit_code: str + :param last_activation_time: The last time (in UTC) when Service Fabric + attempted to run the entry point. + :type last_activation_time: datetime + :param last_exit_time: The last time (in UTC) when the entry point + finished running. + :type last_exit_time: datetime + :param last_successful_activation_time: The last time (in UTC) when the + entry point ran successfully. + :type last_successful_activation_time: datetime + :param last_successful_exit_time: The last time (in UTC) when the entry + point finished running gracefully. + :type last_successful_exit_time: datetime + :param activation_count: Number of times the entry point has run. + :type activation_count: str + :param activation_failure_count: Number of times the entry point failed to + run. + :type activation_failure_count: str + :param continuous_activation_failure_count: Number of times the entry + point continuously failed to run. + :type continuous_activation_failure_count: str + :param exit_count: Number of times the entry point finished running. + :type exit_count: str + :param exit_failure_count: Number of times the entry point failed to exit + gracefully. + :type exit_failure_count: str + :param continuous_exit_failure_count: Number of times the entry point + continuously failed to exit gracefully. + :type continuous_exit_failure_count: str + """ + + _attribute_map = { + 'last_exit_code': {'key': 'LastExitCode', 'type': 'str'}, + 'last_activation_time': {'key': 'LastActivationTime', 'type': 'iso-8601'}, + 'last_exit_time': {'key': 'LastExitTime', 'type': 'iso-8601'}, + 'last_successful_activation_time': {'key': 'LastSuccessfulActivationTime', 'type': 'iso-8601'}, + 'last_successful_exit_time': {'key': 'LastSuccessfulExitTime', 'type': 'iso-8601'}, + 'activation_count': {'key': 'ActivationCount', 'type': 'str'}, + 'activation_failure_count': {'key': 'ActivationFailureCount', 'type': 'str'}, + 'continuous_activation_failure_count': {'key': 'ContinuousActivationFailureCount', 'type': 'str'}, + 'exit_count': {'key': 'ExitCount', 'type': 'str'}, + 'exit_failure_count': {'key': 'ExitFailureCount', 'type': 'str'}, + 'continuous_exit_failure_count': {'key': 'ContinuousExitFailureCount', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CodePackageEntryPointStatistics, self).__init__(**kwargs) + self.last_exit_code = kwargs.get('last_exit_code', None) + self.last_activation_time = kwargs.get('last_activation_time', None) + self.last_exit_time = kwargs.get('last_exit_time', None) + self.last_successful_activation_time = kwargs.get('last_successful_activation_time', None) + self.last_successful_exit_time = kwargs.get('last_successful_exit_time', None) + self.activation_count = kwargs.get('activation_count', None) + self.activation_failure_count = kwargs.get('activation_failure_count', None) + self.continuous_activation_failure_count = kwargs.get('continuous_activation_failure_count', None) + self.exit_count = kwargs.get('exit_count', None) + self.exit_failure_count = kwargs.get('exit_failure_count', None) + self.continuous_exit_failure_count = kwargs.get('continuous_exit_failure_count', None) diff --git a/customSDK/servicefabric/models/code_package_entry_point_statistics_py3.py b/customSDK/servicefabric/models/code_package_entry_point_statistics_py3.py new file mode 100644 index 00000000..1de0c886 --- /dev/null +++ b/customSDK/servicefabric/models/code_package_entry_point_statistics_py3.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CodePackageEntryPointStatistics(Model): + """Statistics about setup or main entry point of a code package deployed on a + Service Fabric node. + + :param last_exit_code: The last exit code of the entry point. + :type last_exit_code: str + :param last_activation_time: The last time (in UTC) when Service Fabric + attempted to run the entry point. + :type last_activation_time: datetime + :param last_exit_time: The last time (in UTC) when the entry point + finished running. + :type last_exit_time: datetime + :param last_successful_activation_time: The last time (in UTC) when the + entry point ran successfully. + :type last_successful_activation_time: datetime + :param last_successful_exit_time: The last time (in UTC) when the entry + point finished running gracefully. + :type last_successful_exit_time: datetime + :param activation_count: Number of times the entry point has run. + :type activation_count: str + :param activation_failure_count: Number of times the entry point failed to + run. + :type activation_failure_count: str + :param continuous_activation_failure_count: Number of times the entry + point continuously failed to run. + :type continuous_activation_failure_count: str + :param exit_count: Number of times the entry point finished running. + :type exit_count: str + :param exit_failure_count: Number of times the entry point failed to exit + gracefully. + :type exit_failure_count: str + :param continuous_exit_failure_count: Number of times the entry point + continuously failed to exit gracefully. + :type continuous_exit_failure_count: str + """ + + _attribute_map = { + 'last_exit_code': {'key': 'LastExitCode', 'type': 'str'}, + 'last_activation_time': {'key': 'LastActivationTime', 'type': 'iso-8601'}, + 'last_exit_time': {'key': 'LastExitTime', 'type': 'iso-8601'}, + 'last_successful_activation_time': {'key': 'LastSuccessfulActivationTime', 'type': 'iso-8601'}, + 'last_successful_exit_time': {'key': 'LastSuccessfulExitTime', 'type': 'iso-8601'}, + 'activation_count': {'key': 'ActivationCount', 'type': 'str'}, + 'activation_failure_count': {'key': 'ActivationFailureCount', 'type': 'str'}, + 'continuous_activation_failure_count': {'key': 'ContinuousActivationFailureCount', 'type': 'str'}, + 'exit_count': {'key': 'ExitCount', 'type': 'str'}, + 'exit_failure_count': {'key': 'ExitFailureCount', 'type': 'str'}, + 'continuous_exit_failure_count': {'key': 'ContinuousExitFailureCount', 'type': 'str'}, + } + + def __init__(self, *, last_exit_code: str=None, last_activation_time=None, last_exit_time=None, last_successful_activation_time=None, last_successful_exit_time=None, activation_count: str=None, activation_failure_count: str=None, continuous_activation_failure_count: str=None, exit_count: str=None, exit_failure_count: str=None, continuous_exit_failure_count: str=None, **kwargs) -> None: + super(CodePackageEntryPointStatistics, self).__init__(**kwargs) + self.last_exit_code = last_exit_code + self.last_activation_time = last_activation_time + self.last_exit_time = last_exit_time + self.last_successful_activation_time = last_successful_activation_time + self.last_successful_exit_time = last_successful_exit_time + self.activation_count = activation_count + self.activation_failure_count = activation_failure_count + self.continuous_activation_failure_count = continuous_activation_failure_count + self.exit_count = exit_count + self.exit_failure_count = exit_failure_count + self.continuous_exit_failure_count = continuous_exit_failure_count diff --git a/customSDK/servicefabric/models/compose_deployment_status_info.py b/customSDK/servicefabric/models/compose_deployment_status_info.py new file mode 100644 index 00000000..5895c943 --- /dev/null +++ b/customSDK/servicefabric/models/compose_deployment_status_info.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ComposeDeploymentStatusInfo(Model): + """Information about a Service Fabric compose deployment. + + :param name: The name of the deployment. + :type name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param status: The status of the compose deployment. Possible values + include: 'Invalid', 'Provisioning', 'Creating', 'Ready', 'Unprovisioning', + 'Deleting', 'Failed', 'Upgrading' + :type status: str or ~azure.servicefabric.models.ComposeDeploymentStatus + :param status_details: The status details of compose deployment including + failure message. + :type status_details: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComposeDeploymentStatusInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.application_name = kwargs.get('application_name', None) + self.status = kwargs.get('status', None) + self.status_details = kwargs.get('status_details', None) diff --git a/customSDK/servicefabric/models/compose_deployment_status_info_py3.py b/customSDK/servicefabric/models/compose_deployment_status_info_py3.py new file mode 100644 index 00000000..3ffec700 --- /dev/null +++ b/customSDK/servicefabric/models/compose_deployment_status_info_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ComposeDeploymentStatusInfo(Model): + """Information about a Service Fabric compose deployment. + + :param name: The name of the deployment. + :type name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param status: The status of the compose deployment. Possible values + include: 'Invalid', 'Provisioning', 'Creating', 'Ready', 'Unprovisioning', + 'Deleting', 'Failed', 'Upgrading' + :type status: str or ~azure.servicefabric.models.ComposeDeploymentStatus + :param status_details: The status details of compose deployment including + failure message. + :type status_details: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, application_name: str=None, status=None, status_details: str=None, **kwargs) -> None: + super(ComposeDeploymentStatusInfo, self).__init__(**kwargs) + self.name = name + self.application_name = application_name + self.status = status + self.status_details = status_details diff --git a/customSDK/servicefabric/models/compose_deployment_upgrade_description.py b/customSDK/servicefabric/models/compose_deployment_upgrade_description.py new file mode 100644 index 00000000..1f55215d --- /dev/null +++ b/customSDK/servicefabric/models/compose_deployment_upgrade_description.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ComposeDeploymentUpgradeDescription(Model): + """Describes the parameters for a compose deployment upgrade. + + All required parameters must be populated in order to send to Azure. + + :param deployment_name: Required. The name of the deployment. + :type deployment_name: str + :param compose_file_content: Required. The content of the compose file + that describes the deployment to create. + :type compose_file_content: str + :param registry_credential: Credential information to connect to container + registry. + :type registry_credential: ~azure.servicefabric.models.RegistryCredential + :param upgrade_kind: Required. The kind of upgrade out of the following + possible values. Possible values include: 'Invalid', 'Rolling'. Default + value: "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, + Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', + 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param application_health_policy: Defines a health policy used to evaluate + the health of an application or one of its children entities. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + """ + + _validation = { + 'deployment_name': {'required': True}, + 'compose_file_content': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, + 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + } + + def __init__(self, **kwargs): + super(ComposeDeploymentUpgradeDescription, self).__init__(**kwargs) + self.deployment_name = kwargs.get('deployment_name', None) + self.compose_file_content = kwargs.get('compose_file_content', None) + self.registry_credential = kwargs.get('registry_credential', None) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) + self.force_restart = kwargs.get('force_restart', None) + self.monitoring_policy = kwargs.get('monitoring_policy', None) + self.application_health_policy = kwargs.get('application_health_policy', None) diff --git a/customSDK/servicefabric/models/compose_deployment_upgrade_description_py3.py b/customSDK/servicefabric/models/compose_deployment_upgrade_description_py3.py new file mode 100644 index 00000000..cdbc11f2 --- /dev/null +++ b/customSDK/servicefabric/models/compose_deployment_upgrade_description_py3.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ComposeDeploymentUpgradeDescription(Model): + """Describes the parameters for a compose deployment upgrade. + + All required parameters must be populated in order to send to Azure. + + :param deployment_name: Required. The name of the deployment. + :type deployment_name: str + :param compose_file_content: Required. The content of the compose file + that describes the deployment to create. + :type compose_file_content: str + :param registry_credential: Credential information to connect to container + registry. + :type registry_credential: ~azure.servicefabric.models.RegistryCredential + :param upgrade_kind: Required. The kind of upgrade out of the following + possible values. Possible values include: 'Invalid', 'Rolling'. Default + value: "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, + Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', + 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param application_health_policy: Defines a health policy used to evaluate + the health of an application or one of its children entities. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + """ + + _validation = { + 'deployment_name': {'required': True}, + 'compose_file_content': {'required': True}, + 'upgrade_kind': {'required': True}, + } + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, + 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + } + + def __init__(self, *, deployment_name: str, compose_file_content: str, registry_credential=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, monitoring_policy=None, application_health_policy=None, **kwargs) -> None: + super(ComposeDeploymentUpgradeDescription, self).__init__(**kwargs) + self.deployment_name = deployment_name + self.compose_file_content = compose_file_content + self.registry_credential = registry_credential + self.upgrade_kind = upgrade_kind + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.force_restart = force_restart + self.monitoring_policy = monitoring_policy + self.application_health_policy = application_health_policy diff --git a/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info.py b/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info.py new file mode 100644 index 00000000..603e2541 --- /dev/null +++ b/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info.py @@ -0,0 +1,149 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ComposeDeploymentUpgradeProgressInfo(Model): + """Describes the parameters for a compose deployment upgrade. + + :param deployment_name: The name of the target deployment. + :type deployment_name: str + :param application_name: The name of the target application, including the + 'fabric:' URI scheme. + :type application_name: str + :param upgrade_state: The state of the compose deployment upgrade. + Possible values include: 'Invalid', 'ProvisioningTarget', + 'RollingForwardInProgress', 'RollingForwardPending', + 'UnprovisioningCurrent', 'RollingForwardCompleted', + 'RollingBackInProgress', 'UnprovisioningTarget', 'RollingBackCompleted', + 'Failed' + :type upgrade_state: str or + ~azure.servicefabric.models.ComposeDeploymentUpgradeState + :param upgrade_status_details: Additional detailed information about the + status of the pending upgrade. + :type upgrade_status_details: str + :param upgrade_kind: The kind of upgrade out of the following possible + values. Possible values include: 'Invalid', 'Rolling'. Default value: + "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, + Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', + 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param application_health_policy: Defines a health policy used to evaluate + the health of an application or one of its children entities. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param target_application_type_version: The target application type + version (found in the application manifest) for the application upgrade. + :type target_application_type_version: str + :param upgrade_duration: The estimated amount of time that the overall + upgrade elapsed. It is first interpreted as a string representing an ISO + 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. + :type upgrade_duration: str + :param current_upgrade_domain_duration: The estimated amount of time spent + processing current Upgrade Domain. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type current_upgrade_domain_duration: str + :param application_unhealthy_evaluations: List of health evaluations that + resulted in the current aggregated health state. + :type application_unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param current_upgrade_domain_progress: Information about the current + in-progress upgrade domain. Not applicable to node-by-node upgrades. + :type current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :param start_timestamp_utc: The estimated UTC datetime when the upgrade + started. + :type start_timestamp_utc: str + :param failure_timestamp_utc: The estimated UTC datetime when the upgrade + failed and FailureAction was executed. + :type failure_timestamp_utc: str + :param failure_reason: The cause of an upgrade failure that resulted in + FailureAction being executed. Possible values include: 'None', + 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + 'OverallUpgradeTimeout' + :type failure_reason: str or ~azure.servicefabric.models.FailureReason + :param upgrade_domain_progress_at_failure: Information about the upgrade + domain progress at the time of upgrade failure. + :type upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo + :param application_upgrade_status_details: Additional details of + application upgrade including failure message. + :type application_upgrade_status_details: str + """ + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + 'current_upgrade_domain_duration': {'key': 'CurrentUpgradeDomainDuration', 'type': 'str'}, + 'application_unhealthy_evaluations': {'key': 'ApplicationUnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, + 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComposeDeploymentUpgradeProgressInfo, self).__init__(**kwargs) + self.deployment_name = kwargs.get('deployment_name', None) + self.application_name = kwargs.get('application_name', None) + self.upgrade_state = kwargs.get('upgrade_state', None) + self.upgrade_status_details = kwargs.get('upgrade_status_details', None) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.force_restart = kwargs.get('force_restart', None) + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) + self.monitoring_policy = kwargs.get('monitoring_policy', None) + self.application_health_policy = kwargs.get('application_health_policy', None) + self.target_application_type_version = kwargs.get('target_application_type_version', None) + self.upgrade_duration = kwargs.get('upgrade_duration', None) + self.current_upgrade_domain_duration = kwargs.get('current_upgrade_domain_duration', None) + self.application_unhealthy_evaluations = kwargs.get('application_unhealthy_evaluations', None) + self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) + self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) + self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) + self.failure_reason = kwargs.get('failure_reason', None) + self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) + self.application_upgrade_status_details = kwargs.get('application_upgrade_status_details', None) diff --git a/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info_py3.py b/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info_py3.py new file mode 100644 index 00000000..3b7f23e7 --- /dev/null +++ b/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info_py3.py @@ -0,0 +1,149 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ComposeDeploymentUpgradeProgressInfo(Model): + """Describes the parameters for a compose deployment upgrade. + + :param deployment_name: The name of the target deployment. + :type deployment_name: str + :param application_name: The name of the target application, including the + 'fabric:' URI scheme. + :type application_name: str + :param upgrade_state: The state of the compose deployment upgrade. + Possible values include: 'Invalid', 'ProvisioningTarget', + 'RollingForwardInProgress', 'RollingForwardPending', + 'UnprovisioningCurrent', 'RollingForwardCompleted', + 'RollingBackInProgress', 'UnprovisioningTarget', 'RollingBackCompleted', + 'Failed' + :type upgrade_state: str or + ~azure.servicefabric.models.ComposeDeploymentUpgradeState + :param upgrade_status_details: Additional detailed information about the + status of the pending upgrade. + :type upgrade_status_details: str + :param upgrade_kind: The kind of upgrade out of the following possible + values. Possible values include: 'Invalid', 'Rolling'. Default value: + "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, + Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', + 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param application_health_policy: Defines a health policy used to evaluate + the health of an application or one of its children entities. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param target_application_type_version: The target application type + version (found in the application manifest) for the application upgrade. + :type target_application_type_version: str + :param upgrade_duration: The estimated amount of time that the overall + upgrade elapsed. It is first interpreted as a string representing an ISO + 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. + :type upgrade_duration: str + :param current_upgrade_domain_duration: The estimated amount of time spent + processing current Upgrade Domain. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type current_upgrade_domain_duration: str + :param application_unhealthy_evaluations: List of health evaluations that + resulted in the current aggregated health state. + :type application_unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param current_upgrade_domain_progress: Information about the current + in-progress upgrade domain. Not applicable to node-by-node upgrades. + :type current_upgrade_domain_progress: + ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo + :param start_timestamp_utc: The estimated UTC datetime when the upgrade + started. + :type start_timestamp_utc: str + :param failure_timestamp_utc: The estimated UTC datetime when the upgrade + failed and FailureAction was executed. + :type failure_timestamp_utc: str + :param failure_reason: The cause of an upgrade failure that resulted in + FailureAction being executed. Possible values include: 'None', + 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + 'OverallUpgradeTimeout' + :type failure_reason: str or ~azure.servicefabric.models.FailureReason + :param upgrade_domain_progress_at_failure: Information about the upgrade + domain progress at the time of upgrade failure. + :type upgrade_domain_progress_at_failure: + ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo + :param application_upgrade_status_details: Additional details of + application upgrade including failure message. + :type application_upgrade_status_details: str + """ + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, + 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, + 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, + 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + 'current_upgrade_domain_duration': {'key': 'CurrentUpgradeDomainDuration', 'type': 'str'}, + 'application_unhealthy_evaluations': {'key': 'ApplicationUnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, + 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, + 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, + 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, + 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, + 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, + } + + def __init__(self, *, deployment_name: str=None, application_name: str=None, upgrade_state=None, upgrade_status_details: str=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", force_restart: bool=None, upgrade_replica_set_check_timeout_in_seconds: int=None, monitoring_policy=None, application_health_policy=None, target_application_type_version: str=None, upgrade_duration: str=None, current_upgrade_domain_duration: str=None, application_unhealthy_evaluations=None, current_upgrade_domain_progress=None, start_timestamp_utc: str=None, failure_timestamp_utc: str=None, failure_reason=None, upgrade_domain_progress_at_failure=None, application_upgrade_status_details: str=None, **kwargs) -> None: + super(ComposeDeploymentUpgradeProgressInfo, self).__init__(**kwargs) + self.deployment_name = deployment_name + self.application_name = application_name + self.upgrade_state = upgrade_state + self.upgrade_status_details = upgrade_status_details + self.upgrade_kind = upgrade_kind + self.rolling_upgrade_mode = rolling_upgrade_mode + self.force_restart = force_restart + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.monitoring_policy = monitoring_policy + self.application_health_policy = application_health_policy + self.target_application_type_version = target_application_type_version + self.upgrade_duration = upgrade_duration + self.current_upgrade_domain_duration = current_upgrade_domain_duration + self.application_unhealthy_evaluations = application_unhealthy_evaluations + self.current_upgrade_domain_progress = current_upgrade_domain_progress + self.start_timestamp_utc = start_timestamp_utc + self.failure_timestamp_utc = failure_timestamp_utc + self.failure_reason = failure_reason + self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure + self.application_upgrade_status_details = application_upgrade_status_details diff --git a/customSDK/servicefabric/models/config_parameter_override.py b/customSDK/servicefabric/models/config_parameter_override.py new file mode 100644 index 00000000..b6e484eb --- /dev/null +++ b/customSDK/servicefabric/models/config_parameter_override.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConfigParameterOverride(Model): + """Information about a configuration parameter override. + + All required parameters must be populated in order to send to Azure. + + :param section_name: Required. Name of the section for the parameter + override. + :type section_name: str + :param parameter_name: Required. Name of the parameter that has been + overridden. + :type parameter_name: str + :param parameter_value: Required. Value of the overridden parameter. + :type parameter_value: str + :param timeout: The duration until config override is considered as valid. + :type timeout: timedelta + :param persist_across_upgrade: A value that indicates whether config + override will be removed on upgrade or will still be considered as valid. + :type persist_across_upgrade: bool + """ + + _validation = { + 'section_name': {'required': True}, + 'parameter_name': {'required': True}, + 'parameter_value': {'required': True}, + } + + _attribute_map = { + 'section_name': {'key': 'SectionName', 'type': 'str'}, + 'parameter_name': {'key': 'ParameterName', 'type': 'str'}, + 'parameter_value': {'key': 'ParameterValue', 'type': 'str'}, + 'timeout': {'key': 'Timeout', 'type': 'duration'}, + 'persist_across_upgrade': {'key': 'PersistAcrossUpgrade', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ConfigParameterOverride, self).__init__(**kwargs) + self.section_name = kwargs.get('section_name', None) + self.parameter_name = kwargs.get('parameter_name', None) + self.parameter_value = kwargs.get('parameter_value', None) + self.timeout = kwargs.get('timeout', None) + self.persist_across_upgrade = kwargs.get('persist_across_upgrade', None) diff --git a/customSDK/servicefabric/models/config_parameter_override_py3.py b/customSDK/servicefabric/models/config_parameter_override_py3.py new file mode 100644 index 00000000..2bbc6206 --- /dev/null +++ b/customSDK/servicefabric/models/config_parameter_override_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConfigParameterOverride(Model): + """Information about a configuration parameter override. + + All required parameters must be populated in order to send to Azure. + + :param section_name: Required. Name of the section for the parameter + override. + :type section_name: str + :param parameter_name: Required. Name of the parameter that has been + overridden. + :type parameter_name: str + :param parameter_value: Required. Value of the overridden parameter. + :type parameter_value: str + :param timeout: The duration until config override is considered as valid. + :type timeout: timedelta + :param persist_across_upgrade: A value that indicates whether config + override will be removed on upgrade or will still be considered as valid. + :type persist_across_upgrade: bool + """ + + _validation = { + 'section_name': {'required': True}, + 'parameter_name': {'required': True}, + 'parameter_value': {'required': True}, + } + + _attribute_map = { + 'section_name': {'key': 'SectionName', 'type': 'str'}, + 'parameter_name': {'key': 'ParameterName', 'type': 'str'}, + 'parameter_value': {'key': 'ParameterValue', 'type': 'str'}, + 'timeout': {'key': 'Timeout', 'type': 'duration'}, + 'persist_across_upgrade': {'key': 'PersistAcrossUpgrade', 'type': 'bool'}, + } + + def __init__(self, *, section_name: str, parameter_name: str, parameter_value: str, timeout=None, persist_across_upgrade: bool=None, **kwargs) -> None: + super(ConfigParameterOverride, self).__init__(**kwargs) + self.section_name = section_name + self.parameter_name = parameter_name + self.parameter_value = parameter_value + self.timeout = timeout + self.persist_across_upgrade = persist_across_upgrade diff --git a/customSDK/servicefabric/models/container_api_request_body.py b/customSDK/servicefabric/models/container_api_request_body.py new file mode 100644 index 00000000..71b32cde --- /dev/null +++ b/customSDK/servicefabric/models/container_api_request_body.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerApiRequestBody(Model): + """parameters for making container API call. + + All required parameters must be populated in order to send to Azure. + + :param http_verb: HTTP verb of container REST API, defaults to "GET" + :type http_verb: str + :param uri_path: Required. URI path of container REST API + :type uri_path: str + :param content_type: Content type of container REST API request, defaults + to "application/json" + :type content_type: str + :param body: HTTP request body of container REST API + :type body: str + """ + + _validation = { + 'uri_path': {'required': True}, + } + + _attribute_map = { + 'http_verb': {'key': 'HttpVerb', 'type': 'str'}, + 'uri_path': {'key': 'UriPath', 'type': 'str'}, + 'content_type': {'key': 'Content-Type', 'type': 'str'}, + 'body': {'key': 'Body', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerApiRequestBody, self).__init__(**kwargs) + self.http_verb = kwargs.get('http_verb', None) + self.uri_path = kwargs.get('uri_path', None) + self.content_type = kwargs.get('content_type', None) + self.body = kwargs.get('body', None) diff --git a/customSDK/servicefabric/models/container_api_request_body_py3.py b/customSDK/servicefabric/models/container_api_request_body_py3.py new file mode 100644 index 00000000..2a44420f --- /dev/null +++ b/customSDK/servicefabric/models/container_api_request_body_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerApiRequestBody(Model): + """parameters for making container API call. + + All required parameters must be populated in order to send to Azure. + + :param http_verb: HTTP verb of container REST API, defaults to "GET" + :type http_verb: str + :param uri_path: Required. URI path of container REST API + :type uri_path: str + :param content_type: Content type of container REST API request, defaults + to "application/json" + :type content_type: str + :param body: HTTP request body of container REST API + :type body: str + """ + + _validation = { + 'uri_path': {'required': True}, + } + + _attribute_map = { + 'http_verb': {'key': 'HttpVerb', 'type': 'str'}, + 'uri_path': {'key': 'UriPath', 'type': 'str'}, + 'content_type': {'key': 'Content-Type', 'type': 'str'}, + 'body': {'key': 'Body', 'type': 'str'}, + } + + def __init__(self, *, uri_path: str, http_verb: str=None, content_type: str=None, body: str=None, **kwargs) -> None: + super(ContainerApiRequestBody, self).__init__(**kwargs) + self.http_verb = http_verb + self.uri_path = uri_path + self.content_type = content_type + self.body = body diff --git a/customSDK/servicefabric/models/container_api_response.py b/customSDK/servicefabric/models/container_api_response.py new file mode 100644 index 00000000..1289e074 --- /dev/null +++ b/customSDK/servicefabric/models/container_api_response.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerApiResponse(Model): + """Response body that wraps container API result. + + All required parameters must be populated in order to send to Azure. + + :param container_api_result: Required. Container API result. + :type container_api_result: ~azure.servicefabric.models.ContainerApiResult + """ + + _validation = { + 'container_api_result': {'required': True}, + } + + _attribute_map = { + 'container_api_result': {'key': 'ContainerApiResult', 'type': 'ContainerApiResult'}, + } + + def __init__(self, **kwargs): + super(ContainerApiResponse, self).__init__(**kwargs) + self.container_api_result = kwargs.get('container_api_result', None) diff --git a/customSDK/servicefabric/models/container_api_response_py3.py b/customSDK/servicefabric/models/container_api_response_py3.py new file mode 100644 index 00000000..ce18615d --- /dev/null +++ b/customSDK/servicefabric/models/container_api_response_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerApiResponse(Model): + """Response body that wraps container API result. + + All required parameters must be populated in order to send to Azure. + + :param container_api_result: Required. Container API result. + :type container_api_result: ~azure.servicefabric.models.ContainerApiResult + """ + + _validation = { + 'container_api_result': {'required': True}, + } + + _attribute_map = { + 'container_api_result': {'key': 'ContainerApiResult', 'type': 'ContainerApiResult'}, + } + + def __init__(self, *, container_api_result, **kwargs) -> None: + super(ContainerApiResponse, self).__init__(**kwargs) + self.container_api_result = container_api_result diff --git a/customSDK/servicefabric/models/container_api_result.py b/customSDK/servicefabric/models/container_api_result.py new file mode 100644 index 00000000..3fb88baf --- /dev/null +++ b/customSDK/servicefabric/models/container_api_result.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerApiResult(Model): + """Container API result. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. HTTP status code returned by the target container + API + :type status: int + :param content_type: HTTP content type + :type content_type: str + :param content_encoding: HTTP content encoding + :type content_encoding: str + :param body: container API result body + :type body: str + """ + + _validation = { + 'status': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'Status', 'type': 'int'}, + 'content_type': {'key': 'Content-Type', 'type': 'str'}, + 'content_encoding': {'key': 'Content-Encoding', 'type': 'str'}, + 'body': {'key': 'Body', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerApiResult, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.content_type = kwargs.get('content_type', None) + self.content_encoding = kwargs.get('content_encoding', None) + self.body = kwargs.get('body', None) diff --git a/customSDK/servicefabric/models/container_api_result_py3.py b/customSDK/servicefabric/models/container_api_result_py3.py new file mode 100644 index 00000000..c4b43723 --- /dev/null +++ b/customSDK/servicefabric/models/container_api_result_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerApiResult(Model): + """Container API result. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. HTTP status code returned by the target container + API + :type status: int + :param content_type: HTTP content type + :type content_type: str + :param content_encoding: HTTP content encoding + :type content_encoding: str + :param body: container API result body + :type body: str + """ + + _validation = { + 'status': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'Status', 'type': 'int'}, + 'content_type': {'key': 'Content-Type', 'type': 'str'}, + 'content_encoding': {'key': 'Content-Encoding', 'type': 'str'}, + 'body': {'key': 'Body', 'type': 'str'}, + } + + def __init__(self, *, status: int, content_type: str=None, content_encoding: str=None, body: str=None, **kwargs) -> None: + super(ContainerApiResult, self).__init__(**kwargs) + self.status = status + self.content_type = content_type + self.content_encoding = content_encoding + self.body = body diff --git a/customSDK/servicefabric/models/container_code_package_properties.py b/customSDK/servicefabric/models/container_code_package_properties.py new file mode 100644 index 00000000..b72df939 --- /dev/null +++ b/customSDK/servicefabric/models/container_code_package_properties.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerCodePackageProperties(Model): + """Describes a container and its runtime properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the code package. + :type name: str + :param image: Required. The Container image to use. + :type image: str + :param image_registry_credential: Image registry credential. + :type image_registry_credential: + ~azure.servicefabric.models.ImageRegistryCredential + :param entry_point: Override for the default entry point in the container. + :type entry_point: str + :param commands: Command array to execute within the container in exec + form. + :type commands: list[str] + :param environment_variables: The environment variables to set in this + container + :type environment_variables: + list[~azure.servicefabric.models.EnvironmentVariable] + :param settings: The settings to set in this container. The setting file + path can be fetched from environment variable "Fabric_SettingPath". The + path for Windows container is "C:\\\\secrets". The path for Linux + container is "/var/secrets". + :type settings: list[~azure.servicefabric.models.Setting] + :param labels: The labels to set in this container. + :type labels: list[~azure.servicefabric.models.ContainerLabel] + :param endpoints: The endpoints exposed by this container. + :type endpoints: list[~azure.servicefabric.models.EndpointProperties] + :param resources: Required. The resources required by this container. + :type resources: ~azure.servicefabric.models.ResourceRequirements + :param volume_refs: Volumes to be attached to the container. The lifetime + of these volumes is independent of the application's lifetime. + :type volume_refs: list[~azure.servicefabric.models.VolumeReference] + :param volumes: Volumes to be attached to the container. The lifetime of + these volumes is scoped to the application's lifetime. + :type volumes: list[~azure.servicefabric.models.ApplicationScopedVolume] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :param reliable_collections_refs: A list of ReliableCollection resources + used by this particular code package. Please refer to + ReliableCollectionsRef for more details. + :type reliable_collections_refs: + list[~azure.servicefabric.models.ReliableCollectionsRef] + :ivar instance_view: Runtime information of a container instance. + :vartype instance_view: ~azure.servicefabric.models.ContainerInstanceView + :param liveness_probe: An array of liveness probes for a code package. It + determines when to restart a code package. + :type liveness_probe: list[~azure.servicefabric.models.Probe] + :param readiness_probe: An array of readiness probes for a code package. + It determines when to unpublish an endpoint. + :type readiness_probe: list[~azure.servicefabric.models.Probe] + """ + + _validation = { + 'name': {'required': True}, + 'image': {'required': True}, + 'resources': {'required': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'image': {'key': 'image', 'type': 'str'}, + 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, + 'entry_point': {'key': 'entryPoint', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[str]'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'}, + 'settings': {'key': 'settings', 'type': '[Setting]'}, + 'labels': {'key': 'labels', 'type': '[ContainerLabel]'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointProperties]'}, + 'resources': {'key': 'resources', 'type': 'ResourceRequirements'}, + 'volume_refs': {'key': 'volumeRefs', 'type': '[VolumeReference]'}, + 'volumes': {'key': 'volumes', 'type': '[ApplicationScopedVolume]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + 'reliable_collections_refs': {'key': 'reliableCollectionsRefs', 'type': '[ReliableCollectionsRef]'}, + 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, + 'liveness_probe': {'key': 'livenessProbe', 'type': '[Probe]'}, + 'readiness_probe': {'key': 'readinessProbe', 'type': '[Probe]'}, + } + + def __init__(self, **kwargs): + super(ContainerCodePackageProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.image = kwargs.get('image', None) + self.image_registry_credential = kwargs.get('image_registry_credential', None) + self.entry_point = kwargs.get('entry_point', None) + self.commands = kwargs.get('commands', None) + self.environment_variables = kwargs.get('environment_variables', None) + self.settings = kwargs.get('settings', None) + self.labels = kwargs.get('labels', None) + self.endpoints = kwargs.get('endpoints', None) + self.resources = kwargs.get('resources', None) + self.volume_refs = kwargs.get('volume_refs', None) + self.volumes = kwargs.get('volumes', None) + self.diagnostics = kwargs.get('diagnostics', None) + self.reliable_collections_refs = kwargs.get('reliable_collections_refs', None) + self.instance_view = None + self.liveness_probe = kwargs.get('liveness_probe', None) + self.readiness_probe = kwargs.get('readiness_probe', None) diff --git a/customSDK/servicefabric/models/container_code_package_properties_py3.py b/customSDK/servicefabric/models/container_code_package_properties_py3.py new file mode 100644 index 00000000..29327cb6 --- /dev/null +++ b/customSDK/servicefabric/models/container_code_package_properties_py3.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerCodePackageProperties(Model): + """Describes a container and its runtime properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the code package. + :type name: str + :param image: Required. The Container image to use. + :type image: str + :param image_registry_credential: Image registry credential. + :type image_registry_credential: + ~azure.servicefabric.models.ImageRegistryCredential + :param entry_point: Override for the default entry point in the container. + :type entry_point: str + :param commands: Command array to execute within the container in exec + form. + :type commands: list[str] + :param environment_variables: The environment variables to set in this + container + :type environment_variables: + list[~azure.servicefabric.models.EnvironmentVariable] + :param settings: The settings to set in this container. The setting file + path can be fetched from environment variable "Fabric_SettingPath". The + path for Windows container is "C:\\\\secrets". The path for Linux + container is "/var/secrets". + :type settings: list[~azure.servicefabric.models.Setting] + :param labels: The labels to set in this container. + :type labels: list[~azure.servicefabric.models.ContainerLabel] + :param endpoints: The endpoints exposed by this container. + :type endpoints: list[~azure.servicefabric.models.EndpointProperties] + :param resources: Required. The resources required by this container. + :type resources: ~azure.servicefabric.models.ResourceRequirements + :param volume_refs: Volumes to be attached to the container. The lifetime + of these volumes is independent of the application's lifetime. + :type volume_refs: list[~azure.servicefabric.models.VolumeReference] + :param volumes: Volumes to be attached to the container. The lifetime of + these volumes is scoped to the application's lifetime. + :type volumes: list[~azure.servicefabric.models.ApplicationScopedVolume] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :param reliable_collections_refs: A list of ReliableCollection resources + used by this particular code package. Please refer to + ReliableCollectionsRef for more details. + :type reliable_collections_refs: + list[~azure.servicefabric.models.ReliableCollectionsRef] + :ivar instance_view: Runtime information of a container instance. + :vartype instance_view: ~azure.servicefabric.models.ContainerInstanceView + :param liveness_probe: An array of liveness probes for a code package. It + determines when to restart a code package. + :type liveness_probe: list[~azure.servicefabric.models.Probe] + :param readiness_probe: An array of readiness probes for a code package. + It determines when to unpublish an endpoint. + :type readiness_probe: list[~azure.servicefabric.models.Probe] + """ + + _validation = { + 'name': {'required': True}, + 'image': {'required': True}, + 'resources': {'required': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'image': {'key': 'image', 'type': 'str'}, + 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, + 'entry_point': {'key': 'entryPoint', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[str]'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'}, + 'settings': {'key': 'settings', 'type': '[Setting]'}, + 'labels': {'key': 'labels', 'type': '[ContainerLabel]'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointProperties]'}, + 'resources': {'key': 'resources', 'type': 'ResourceRequirements'}, + 'volume_refs': {'key': 'volumeRefs', 'type': '[VolumeReference]'}, + 'volumes': {'key': 'volumes', 'type': '[ApplicationScopedVolume]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + 'reliable_collections_refs': {'key': 'reliableCollectionsRefs', 'type': '[ReliableCollectionsRef]'}, + 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, + 'liveness_probe': {'key': 'livenessProbe', 'type': '[Probe]'}, + 'readiness_probe': {'key': 'readinessProbe', 'type': '[Probe]'}, + } + + def __init__(self, *, name: str, image: str, resources, image_registry_credential=None, entry_point: str=None, commands=None, environment_variables=None, settings=None, labels=None, endpoints=None, volume_refs=None, volumes=None, diagnostics=None, reliable_collections_refs=None, liveness_probe=None, readiness_probe=None, **kwargs) -> None: + super(ContainerCodePackageProperties, self).__init__(**kwargs) + self.name = name + self.image = image + self.image_registry_credential = image_registry_credential + self.entry_point = entry_point + self.commands = commands + self.environment_variables = environment_variables + self.settings = settings + self.labels = labels + self.endpoints = endpoints + self.resources = resources + self.volume_refs = volume_refs + self.volumes = volumes + self.diagnostics = diagnostics + self.reliable_collections_refs = reliable_collections_refs + self.instance_view = None + self.liveness_probe = liveness_probe + self.readiness_probe = readiness_probe diff --git a/customSDK/servicefabric/models/container_event.py b/customSDK/servicefabric/models/container_event.py new file mode 100644 index 00000000..36bb437c --- /dev/null +++ b/customSDK/servicefabric/models/container_event.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerEvent(Model): + """A container event. + + :param name: The name of the container event. + :type name: str + :param count: The count of the event. + :type count: int + :param first_timestamp: Date/time of the first event. + :type first_timestamp: str + :param last_timestamp: Date/time of the last event. + :type last_timestamp: str + :param message: The event message + :type message: str + :param type: The event type. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, + 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerEvent, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', None) + self.first_timestamp = kwargs.get('first_timestamp', None) + self.last_timestamp = kwargs.get('last_timestamp', None) + self.message = kwargs.get('message', None) + self.type = kwargs.get('type', None) diff --git a/customSDK/servicefabric/models/container_event_py3.py b/customSDK/servicefabric/models/container_event_py3.py new file mode 100644 index 00000000..4851036a --- /dev/null +++ b/customSDK/servicefabric/models/container_event_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerEvent(Model): + """A container event. + + :param name: The name of the container event. + :type name: str + :param count: The count of the event. + :type count: int + :param first_timestamp: Date/time of the first event. + :type first_timestamp: str + :param last_timestamp: Date/time of the last event. + :type last_timestamp: str + :param message: The event message + :type message: str + :param type: The event type. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, + 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, count: int=None, first_timestamp: str=None, last_timestamp: str=None, message: str=None, type: str=None, **kwargs) -> None: + super(ContainerEvent, self).__init__(**kwargs) + self.name = name + self.count = count + self.first_timestamp = first_timestamp + self.last_timestamp = last_timestamp + self.message = message + self.type = type diff --git a/customSDK/servicefabric/models/container_instance_event.py b/customSDK/servicefabric/models/container_instance_event.py new file mode 100644 index 00000000..1796cecb --- /dev/null +++ b/customSDK/servicefabric/models/container_instance_event.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .fabric_event import FabricEvent + + +class ContainerInstanceEvent(FabricEvent): + """Represents the base for all Container Events. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerInstanceEvent, self).__init__(**kwargs) + self.kind = 'ContainerInstanceEvent' diff --git a/customSDK/servicefabric/models/container_instance_event_py3.py b/customSDK/servicefabric/models/container_instance_event_py3.py new file mode 100644 index 00000000..82e227c1 --- /dev/null +++ b/customSDK/servicefabric/models/container_instance_event_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .fabric_event_py3 import FabricEvent + + +class ContainerInstanceEvent(FabricEvent): + """Represents the base for all Container Events. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ContainerInstanceEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.kind = 'ContainerInstanceEvent' diff --git a/customSDK/servicefabric/models/container_instance_view.py b/customSDK/servicefabric/models/container_instance_view.py new file mode 100644 index 00000000..74d0408d --- /dev/null +++ b/customSDK/servicefabric/models/container_instance_view.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerInstanceView(Model): + """Runtime information of a container instance. + + :param restart_count: The number of times the container has been + restarted. + :type restart_count: int + :param current_state: Current container instance state. + :type current_state: ~azure.servicefabric.models.ContainerState + :param previous_state: Previous container instance state. + :type previous_state: ~azure.servicefabric.models.ContainerState + :param events: The events of this container instance. + :type events: list[~azure.servicefabric.models.ContainerEvent] + """ + + _attribute_map = { + 'restart_count': {'key': 'restartCount', 'type': 'int'}, + 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, + 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, + 'events': {'key': 'events', 'type': '[ContainerEvent]'}, + } + + def __init__(self, **kwargs): + super(ContainerInstanceView, self).__init__(**kwargs) + self.restart_count = kwargs.get('restart_count', None) + self.current_state = kwargs.get('current_state', None) + self.previous_state = kwargs.get('previous_state', None) + self.events = kwargs.get('events', None) diff --git a/customSDK/servicefabric/models/container_instance_view_py3.py b/customSDK/servicefabric/models/container_instance_view_py3.py new file mode 100644 index 00000000..2f14ce0f --- /dev/null +++ b/customSDK/servicefabric/models/container_instance_view_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerInstanceView(Model): + """Runtime information of a container instance. + + :param restart_count: The number of times the container has been + restarted. + :type restart_count: int + :param current_state: Current container instance state. + :type current_state: ~azure.servicefabric.models.ContainerState + :param previous_state: Previous container instance state. + :type previous_state: ~azure.servicefabric.models.ContainerState + :param events: The events of this container instance. + :type events: list[~azure.servicefabric.models.ContainerEvent] + """ + + _attribute_map = { + 'restart_count': {'key': 'restartCount', 'type': 'int'}, + 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, + 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, + 'events': {'key': 'events', 'type': '[ContainerEvent]'}, + } + + def __init__(self, *, restart_count: int=None, current_state=None, previous_state=None, events=None, **kwargs) -> None: + super(ContainerInstanceView, self).__init__(**kwargs) + self.restart_count = restart_count + self.current_state = current_state + self.previous_state = previous_state + self.events = events diff --git a/customSDK/servicefabric/models/container_label.py b/customSDK/servicefabric/models/container_label.py new file mode 100644 index 00000000..f474f141 --- /dev/null +++ b/customSDK/servicefabric/models/container_label.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerLabel(Model): + """Describes a container label. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the container label. + :type name: str + :param value: Required. The value of the container label. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerLabel, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/container_label_py3.py b/customSDK/servicefabric/models/container_label_py3.py new file mode 100644 index 00000000..11832639 --- /dev/null +++ b/customSDK/servicefabric/models/container_label_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerLabel(Model): + """Describes a container label. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the container label. + :type name: str + :param value: Required. The value of the container label. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(ContainerLabel, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/customSDK/servicefabric/models/container_logs.py b/customSDK/servicefabric/models/container_logs.py new file mode 100644 index 00000000..d7c5ca91 --- /dev/null +++ b/customSDK/servicefabric/models/container_logs.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerLogs(Model): + """Container logs. + + :param content: Container logs. + :type content: str + """ + + _attribute_map = { + 'content': {'key': 'Content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerLogs, self).__init__(**kwargs) + self.content = kwargs.get('content', None) diff --git a/customSDK/servicefabric/models/container_logs_py3.py b/customSDK/servicefabric/models/container_logs_py3.py new file mode 100644 index 00000000..02904405 --- /dev/null +++ b/customSDK/servicefabric/models/container_logs_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerLogs(Model): + """Container logs. + + :param content: Container logs. + :type content: str + """ + + _attribute_map = { + 'content': {'key': 'Content', 'type': 'str'}, + } + + def __init__(self, *, content: str=None, **kwargs) -> None: + super(ContainerLogs, self).__init__(**kwargs) + self.content = content diff --git a/customSDK/servicefabric/models/container_state.py b/customSDK/servicefabric/models/container_state.py new file mode 100644 index 00000000..3e2c2bf0 --- /dev/null +++ b/customSDK/servicefabric/models/container_state.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerState(Model): + """The container state. + + :param state: The state of this container + :type state: str + :param start_time: Date/time when the container state started. + :type start_time: datetime + :param exit_code: The container exit code. + :type exit_code: str + :param finish_time: Date/time when the container state finished. + :type finish_time: datetime + :param detail_status: Human-readable status of this state. + :type detail_status: str + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'exit_code': {'key': 'exitCode', 'type': 'str'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'detail_status': {'key': 'detailStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerState, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.start_time = kwargs.get('start_time', None) + self.exit_code = kwargs.get('exit_code', None) + self.finish_time = kwargs.get('finish_time', None) + self.detail_status = kwargs.get('detail_status', None) diff --git a/customSDK/servicefabric/models/container_state_py3.py b/customSDK/servicefabric/models/container_state_py3.py new file mode 100644 index 00000000..eb2f5195 --- /dev/null +++ b/customSDK/servicefabric/models/container_state_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerState(Model): + """The container state. + + :param state: The state of this container + :type state: str + :param start_time: Date/time when the container state started. + :type start_time: datetime + :param exit_code: The container exit code. + :type exit_code: str + :param finish_time: Date/time when the container state finished. + :type finish_time: datetime + :param detail_status: Human-readable status of this state. + :type detail_status: str + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'exit_code': {'key': 'exitCode', 'type': 'str'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'detail_status': {'key': 'detailStatus', 'type': 'str'}, + } + + def __init__(self, *, state: str=None, start_time=None, exit_code: str=None, finish_time=None, detail_status: str=None, **kwargs) -> None: + super(ContainerState, self).__init__(**kwargs) + self.state = state + self.start_time = start_time + self.exit_code = exit_code + self.finish_time = finish_time + self.detail_status = detail_status diff --git a/customSDK/servicefabric/models/create_compose_deployment_description.py b/customSDK/servicefabric/models/create_compose_deployment_description.py new file mode 100644 index 00000000..dea010ec --- /dev/null +++ b/customSDK/servicefabric/models/create_compose_deployment_description.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateComposeDeploymentDescription(Model): + """Defines description for creating a Service Fabric compose deployment. + + All required parameters must be populated in order to send to Azure. + + :param deployment_name: Required. The name of the deployment. + :type deployment_name: str + :param compose_file_content: Required. The content of the compose file + that describes the deployment to create. + :type compose_file_content: str + :param registry_credential: Credential information to connect to container + registry. + :type registry_credential: ~azure.servicefabric.models.RegistryCredential + """ + + _validation = { + 'deployment_name': {'required': True}, + 'compose_file_content': {'required': True}, + } + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, + 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, + } + + def __init__(self, **kwargs): + super(CreateComposeDeploymentDescription, self).__init__(**kwargs) + self.deployment_name = kwargs.get('deployment_name', None) + self.compose_file_content = kwargs.get('compose_file_content', None) + self.registry_credential = kwargs.get('registry_credential', None) diff --git a/customSDK/servicefabric/models/create_compose_deployment_description_py3.py b/customSDK/servicefabric/models/create_compose_deployment_description_py3.py new file mode 100644 index 00000000..8a8f1155 --- /dev/null +++ b/customSDK/servicefabric/models/create_compose_deployment_description_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CreateComposeDeploymentDescription(Model): + """Defines description for creating a Service Fabric compose deployment. + + All required parameters must be populated in order to send to Azure. + + :param deployment_name: Required. The name of the deployment. + :type deployment_name: str + :param compose_file_content: Required. The content of the compose file + that describes the deployment to create. + :type compose_file_content: str + :param registry_credential: Credential information to connect to container + registry. + :type registry_credential: ~azure.servicefabric.models.RegistryCredential + """ + + _validation = { + 'deployment_name': {'required': True}, + 'compose_file_content': {'required': True}, + } + + _attribute_map = { + 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, + 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, + 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, + } + + def __init__(self, *, deployment_name: str, compose_file_content: str, registry_credential=None, **kwargs) -> None: + super(CreateComposeDeploymentDescription, self).__init__(**kwargs) + self.deployment_name = deployment_name + self.compose_file_content = compose_file_content + self.registry_credential = registry_credential diff --git a/customSDK/servicefabric/models/current_upgrade_domain_progress_info.py b/customSDK/servicefabric/models/current_upgrade_domain_progress_info.py new file mode 100644 index 00000000..d4a38afd --- /dev/null +++ b/customSDK/servicefabric/models/current_upgrade_domain_progress_info.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CurrentUpgradeDomainProgressInfo(Model): + """Information about the current in-progress upgrade domain. Not applicable to + node-by-node upgrades. + + :param domain_name: The name of the upgrade domain + :type domain_name: str + :param node_upgrade_progress_list: List of upgrading nodes and their + statuses + :type node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__(self, **kwargs): + super(CurrentUpgradeDomainProgressInfo, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) diff --git a/customSDK/servicefabric/models/current_upgrade_domain_progress_info_py3.py b/customSDK/servicefabric/models/current_upgrade_domain_progress_info_py3.py new file mode 100644 index 00000000..25c94fe8 --- /dev/null +++ b/customSDK/servicefabric/models/current_upgrade_domain_progress_info_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CurrentUpgradeDomainProgressInfo(Model): + """Information about the current in-progress upgrade domain. Not applicable to + node-by-node upgrades. + + :param domain_name: The name of the upgrade domain + :type domain_name: str + :param node_upgrade_progress_list: List of upgrading nodes and their + statuses + :type node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: + super(CurrentUpgradeDomainProgressInfo, self).__init__(**kwargs) + self.domain_name = domain_name + self.node_upgrade_progress_list = node_upgrade_progress_list diff --git a/customSDK/servicefabric/models/current_upgrade_units_progress_info.py b/customSDK/servicefabric/models/current_upgrade_units_progress_info.py new file mode 100644 index 00000000..db67d224 --- /dev/null +++ b/customSDK/servicefabric/models/current_upgrade_units_progress_info.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CurrentUpgradeUnitsProgressInfo(Model): + """Information about the current in-progress upgrade units. + + :param domain_name: The name of the upgrade domain. Not applicable to + node-by-node upgrades. + :type domain_name: str + :param node_upgrade_progress_list: List of upgrading nodes and their + statuses + :type node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__(self, **kwargs): + super(CurrentUpgradeUnitsProgressInfo, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) diff --git a/customSDK/servicefabric/models/current_upgrade_units_progress_info_py3.py b/customSDK/servicefabric/models/current_upgrade_units_progress_info_py3.py new file mode 100644 index 00000000..016c6468 --- /dev/null +++ b/customSDK/servicefabric/models/current_upgrade_units_progress_info_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CurrentUpgradeUnitsProgressInfo(Model): + """Information about the current in-progress upgrade units. + + :param domain_name: The name of the upgrade domain. Not applicable to + node-by-node upgrades. + :type domain_name: str + :param node_upgrade_progress_list: List of upgrading nodes and their + statuses + :type node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: + super(CurrentUpgradeUnitsProgressInfo, self).__init__(**kwargs) + self.domain_name = domain_name + self.node_upgrade_progress_list = node_upgrade_progress_list diff --git a/customSDK/servicefabric/models/deactivation_intent_description.py b/customSDK/servicefabric/models/deactivation_intent_description.py new file mode 100644 index 00000000..28dab1f7 --- /dev/null +++ b/customSDK/servicefabric/models/deactivation_intent_description.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeactivationIntentDescription(Model): + """Describes the intent or reason for deactivating the node. + + :param deactivation_intent: Describes the intent or reason for + deactivating the node. The possible values are following. Possible values + include: 'Pause', 'Restart', 'RemoveData' + :type deactivation_intent: str or + ~azure.servicefabric.models.DeactivationIntent + """ + + _attribute_map = { + 'deactivation_intent': {'key': 'DeactivationIntent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeactivationIntentDescription, self).__init__(**kwargs) + self.deactivation_intent = kwargs.get('deactivation_intent', None) diff --git a/customSDK/servicefabric/models/deactivation_intent_description_py3.py b/customSDK/servicefabric/models/deactivation_intent_description_py3.py new file mode 100644 index 00000000..b5384272 --- /dev/null +++ b/customSDK/servicefabric/models/deactivation_intent_description_py3.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeactivationIntentDescription(Model): + """Describes the intent or reason for deactivating the node. + + :param deactivation_intent: Describes the intent or reason for + deactivating the node. The possible values are following. Possible values + include: 'Pause', 'Restart', 'RemoveData' + :type deactivation_intent: str or + ~azure.servicefabric.models.DeactivationIntent + """ + + _attribute_map = { + 'deactivation_intent': {'key': 'DeactivationIntent', 'type': 'str'}, + } + + def __init__(self, *, deactivation_intent=None, **kwargs) -> None: + super(DeactivationIntentDescription, self).__init__(**kwargs) + self.deactivation_intent = deactivation_intent diff --git a/customSDK/servicefabric/models/default_execution_policy.py b/customSDK/servicefabric/models/default_execution_policy.py new file mode 100644 index 00000000..2e6aa01b --- /dev/null +++ b/customSDK/servicefabric/models/default_execution_policy.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .execution_policy import ExecutionPolicy + + +class DefaultExecutionPolicy(ExecutionPolicy): + """The default execution policy. Always restart the service if an exit occurs. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DefaultExecutionPolicy, self).__init__(**kwargs) + self.type = 'Default' diff --git a/customSDK/servicefabric/models/default_execution_policy_py3.py b/customSDK/servicefabric/models/default_execution_policy_py3.py new file mode 100644 index 00000000..bf278f54 --- /dev/null +++ b/customSDK/servicefabric/models/default_execution_policy_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .execution_policy_py3 import ExecutionPolicy + + +class DefaultExecutionPolicy(ExecutionPolicy): + """The default execution policy. Always restart the service if an exit occurs. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DefaultExecutionPolicy, self).__init__(**kwargs) + self.type = 'Default' diff --git a/customSDK/servicefabric/models/delete_property_batch_operation.py b/customSDK/servicefabric/models/delete_property_batch_operation.py new file mode 100644 index 00000000..f41dda1c --- /dev/null +++ b/customSDK/servicefabric/models/delete_property_batch_operation.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_batch_operation import PropertyBatchOperation + + +class DeletePropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that deletes a specified property if it + exists. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletePropertyBatchOperation, self).__init__(**kwargs) + self.kind = 'Delete' diff --git a/customSDK/servicefabric/models/delete_property_batch_operation_py3.py b/customSDK/servicefabric/models/delete_property_batch_operation_py3.py new file mode 100644 index 00000000..28cdf2c1 --- /dev/null +++ b/customSDK/servicefabric/models/delete_property_batch_operation_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_batch_operation_py3 import PropertyBatchOperation + + +class DeletePropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that deletes a specified property if it + exists. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + def __init__(self, *, property_name: str, **kwargs) -> None: + super(DeletePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.kind = 'Delete' diff --git a/customSDK/servicefabric/models/delta_nodes_check_health_evaluation.py b/customSDK/servicefabric/models/delta_nodes_check_health_evaluation.py new file mode 100644 index 00000000..a619a7e4 --- /dev/null +++ b/customSDK/servicefabric/models/delta_nodes_check_health_evaluation.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class DeltaNodesCheckHealthEvaluation(HealthEvaluation): + """Represents health evaluation for delta nodes, containing health evaluations + for each unhealthy node that impacted current aggregated health state. + Can be returned during cluster upgrade when the aggregated health state of + the cluster is Warning or Error. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param baseline_error_count: Number of nodes with aggregated heath state + Error in the health store at the beginning of the cluster upgrade. + :type baseline_error_count: long + :param baseline_total_count: Total number of nodes in the health store at + the beginning of the cluster upgrade. + :type baseline_total_count: long + :param max_percent_delta_unhealthy_nodes: Maximum allowed percentage of + delta unhealthy nodes from the ClusterUpgradeHealthPolicy. + :type max_percent_delta_unhealthy_nodes: int + :param total_count: Total number of nodes in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. + Includes all the unhealthy NodeHealthEvaluation that impacted the + aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, + 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(DeltaNodesCheckHealthEvaluation, self).__init__(**kwargs) + self.baseline_error_count = kwargs.get('baseline_error_count', None) + self.baseline_total_count = kwargs.get('baseline_total_count', None) + self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'DeltaNodesCheck' diff --git a/customSDK/servicefabric/models/delta_nodes_check_health_evaluation_py3.py b/customSDK/servicefabric/models/delta_nodes_check_health_evaluation_py3.py new file mode 100644 index 00000000..7bbbc05f --- /dev/null +++ b/customSDK/servicefabric/models/delta_nodes_check_health_evaluation_py3.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class DeltaNodesCheckHealthEvaluation(HealthEvaluation): + """Represents health evaluation for delta nodes, containing health evaluations + for each unhealthy node that impacted current aggregated health state. + Can be returned during cluster upgrade when the aggregated health state of + the cluster is Warning or Error. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param baseline_error_count: Number of nodes with aggregated heath state + Error in the health store at the beginning of the cluster upgrade. + :type baseline_error_count: long + :param baseline_total_count: Total number of nodes in the health store at + the beginning of the cluster upgrade. + :type baseline_total_count: long + :param max_percent_delta_unhealthy_nodes: Maximum allowed percentage of + delta unhealthy nodes from the ClusterUpgradeHealthPolicy. + :type max_percent_delta_unhealthy_nodes: int + :param total_count: Total number of nodes in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. + Includes all the unhealthy NodeHealthEvaluation that impacted the + aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, + 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, baseline_error_count: int=None, baseline_total_count: int=None, max_percent_delta_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(DeltaNodesCheckHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.baseline_error_count = baseline_error_count + self.baseline_total_count = baseline_total_count + self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'DeltaNodesCheck' diff --git a/customSDK/servicefabric/models/deploy_service_package_to_node_description.py b/customSDK/servicefabric/models/deploy_service_package_to_node_description.py new file mode 100644 index 00000000..82050e16 --- /dev/null +++ b/customSDK/servicefabric/models/deploy_service_package_to_node_description.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployServicePackageToNodeDescription(Model): + """Defines description for downloading packages associated with a service + manifest to image cache on a Service Fabric node. + + All required parameters must be populated in order to send to Azure. + + :param service_manifest_name: Required. The name of service manifest whose + packages need to be downloaded. + :type service_manifest_name: str + :param application_type_name: Required. The application type name as + defined in the application manifest. + :type application_type_name: str + :param application_type_version: Required. The version of the application + type as defined in the application manifest. + :type application_type_version: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param package_sharing_policy: List of package sharing policy information. + :type package_sharing_policy: + list[~azure.servicefabric.models.PackageSharingPolicyInfo] + """ + + _validation = { + 'service_manifest_name': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'node_name': {'required': True}, + } + + _attribute_map = { + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'package_sharing_policy': {'key': 'PackageSharingPolicy', 'type': '[PackageSharingPolicyInfo]'}, + } + + def __init__(self, **kwargs): + super(DeployServicePackageToNodeDescription, self).__init__(**kwargs) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.application_type_name = kwargs.get('application_type_name', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.node_name = kwargs.get('node_name', None) + self.package_sharing_policy = kwargs.get('package_sharing_policy', None) diff --git a/customSDK/servicefabric/models/deploy_service_package_to_node_description_py3.py b/customSDK/servicefabric/models/deploy_service_package_to_node_description_py3.py new file mode 100644 index 00000000..0b2e6238 --- /dev/null +++ b/customSDK/servicefabric/models/deploy_service_package_to_node_description_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployServicePackageToNodeDescription(Model): + """Defines description for downloading packages associated with a service + manifest to image cache on a Service Fabric node. + + All required parameters must be populated in order to send to Azure. + + :param service_manifest_name: Required. The name of service manifest whose + packages need to be downloaded. + :type service_manifest_name: str + :param application_type_name: Required. The application type name as + defined in the application manifest. + :type application_type_name: str + :param application_type_version: Required. The version of the application + type as defined in the application manifest. + :type application_type_version: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param package_sharing_policy: List of package sharing policy information. + :type package_sharing_policy: + list[~azure.servicefabric.models.PackageSharingPolicyInfo] + """ + + _validation = { + 'service_manifest_name': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + 'node_name': {'required': True}, + } + + _attribute_map = { + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'package_sharing_policy': {'key': 'PackageSharingPolicy', 'type': '[PackageSharingPolicyInfo]'}, + } + + def __init__(self, *, service_manifest_name: str, application_type_name: str, application_type_version: str, node_name: str, package_sharing_policy=None, **kwargs) -> None: + super(DeployServicePackageToNodeDescription, self).__init__(**kwargs) + self.service_manifest_name = service_manifest_name + self.application_type_name = application_type_name + self.application_type_version = application_type_version + self.node_name = node_name + self.package_sharing_policy = package_sharing_policy diff --git a/customSDK/servicefabric/models/deployed_application_health.py b/customSDK/servicefabric/models/deployed_application_health.py new file mode 100644 index 00000000..a76e0fbf --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health import EntityHealth + + +class DeployedApplicationHealth(EntityHealth): + """Information about the health of an application deployed on a Service Fabric + node. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param name: Name of the application deployed on the node whose health + information is described by this object. + :type name: str + :param node_name: Name of the node where this application is deployed. + :type node_name: str + :param deployed_service_package_health_states: Deployed service package + health states for the current deployed application as found in the health + store. + :type deployed_service_package_health_states: + list[~azure.servicefabric.models.DeployedServicePackageHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'deployed_service_package_health_states': {'key': 'DeployedServicePackageHealthStates', 'type': '[DeployedServicePackageHealthState]'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationHealth, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.node_name = kwargs.get('node_name', None) + self.deployed_service_package_health_states = kwargs.get('deployed_service_package_health_states', None) diff --git a/customSDK/servicefabric/models/deployed_application_health_evaluation.py b/customSDK/servicefabric/models/deployed_application_health_evaluation.py new file mode 100644 index 00000000..ea06a32a --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_evaluation.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class DeployedApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a deployed application, containing + information about the data and the algorithm used by the health store to + evaluate health. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Name of the node where the application is deployed to. + :type node_name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the deployed application. + The types of the unhealthy evaluations can be + DeployedServicePackagesHealthEvaluation or EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationHealthEvaluation, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.application_name = kwargs.get('application_name', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'DeployedApplication' diff --git a/customSDK/servicefabric/models/deployed_application_health_evaluation_py3.py b/customSDK/servicefabric/models/deployed_application_health_evaluation_py3.py new file mode 100644 index 00000000..2cade0cc --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_evaluation_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class DeployedApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a deployed application, containing + information about the data and the algorithm used by the health store to + evaluate health. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Name of the node where the application is deployed to. + :type node_name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the deployed application. + The types of the unhealthy evaluations can be + DeployedServicePackagesHealthEvaluation or EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, node_name: str=None, application_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: + super(DeployedApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.node_name = node_name + self.application_name = application_name + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'DeployedApplication' diff --git a/customSDK/servicefabric/models/deployed_application_health_py3.py b/customSDK/servicefabric/models/deployed_application_health_py3.py new file mode 100644 index 00000000..fe011b34 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_py3 import EntityHealth + + +class DeployedApplicationHealth(EntityHealth): + """Information about the health of an application deployed on a Service Fabric + node. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param name: Name of the application deployed on the node whose health + information is described by this object. + :type name: str + :param node_name: Name of the node where this application is deployed. + :type node_name: str + :param deployed_service_package_health_states: Deployed service package + health states for the current deployed application as found in the health + store. + :type deployed_service_package_health_states: + list[~azure.servicefabric.models.DeployedServicePackageHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'deployed_service_package_health_states': {'key': 'DeployedServicePackageHealthStates', 'type': '[DeployedServicePackageHealthState]'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, node_name: str=None, deployed_service_package_health_states=None, **kwargs) -> None: + super(DeployedApplicationHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.name = name + self.node_name = node_name + self.deployed_service_package_health_states = deployed_service_package_health_states diff --git a/customSDK/servicefabric/models/deployed_application_health_report_expired_event.py b/customSDK/servicefabric/models/deployed_application_health_report_expired_event.py new file mode 100644 index 00000000..5646f2d6 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_report_expired_event.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event import ApplicationEvent + + +class DeployedApplicationHealthReportExpiredEvent(ApplicationEvent): + """Deployed Application Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_instance_id: Required. Id of Application instance. + :type application_instance_id: long + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationHealthReportExpiredEvent, self).__init__(**kwargs) + self.application_instance_id = kwargs.get('application_instance_id', None) + self.node_name = kwargs.get('node_name', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'DeployedApplicationHealthReportExpired' diff --git a/customSDK/servicefabric/models/deployed_application_health_report_expired_event_py3.py b/customSDK/servicefabric/models/deployed_application_health_report_expired_event_py3.py new file mode 100644 index 00000000..29489b61 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_report_expired_event_py3.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event_py3 import ApplicationEvent + + +class DeployedApplicationHealthReportExpiredEvent(ApplicationEvent): + """Deployed Application Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_instance_id: Required. Id of Application instance. + :type application_instance_id: long + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(DeployedApplicationHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_instance_id = application_instance_id + self.node_name = node_name + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'DeployedApplicationHealthReportExpired' diff --git a/customSDK/servicefabric/models/deployed_application_health_state.py b/customSDK/servicefabric/models/deployed_application_health_state.py new file mode 100644 index 00000000..6098de81 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_state.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state import EntityHealthState + + +class DeployedApplicationHealthState(EntityHealthState): + """Represents the health state of a deployed application, which contains the + entity identifier and the aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param node_name: Name of the node on which the service package is + deployed. + :type node_name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationHealthState, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.application_name = kwargs.get('application_name', None) diff --git a/customSDK/servicefabric/models/deployed_application_health_state_chunk.py b/customSDK/servicefabric/models/deployed_application_health_state_chunk.py new file mode 100644 index 00000000..cc46bad3 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_state_chunk.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk import EntityHealthStateChunk + + +class DeployedApplicationHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a deployed application, which contains + the node where the application is deployed, the aggregated health state and + any deployed service packages that respect the chunk query description + filters. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of node where the application is deployed. + :type node_name: str + :param deployed_service_package_health_state_chunks: The list of deployed + service package health state chunks belonging to the deployed application + that respect the filters in the cluster health chunk query description. + :type deployed_service_package_health_state_chunks: + ~azure.servicefabric.models.DeployedServicePackageHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'deployed_service_package_health_state_chunks': {'key': 'DeployedServicePackageHealthStateChunks', 'type': 'DeployedServicePackageHealthStateChunkList'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationHealthStateChunk, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.deployed_service_package_health_state_chunks = kwargs.get('deployed_service_package_health_state_chunks', None) diff --git a/customSDK/servicefabric/models/deployed_application_health_state_chunk_list.py b/customSDK/servicefabric/models/deployed_application_health_state_chunk_list.py new file mode 100644 index 00000000..81b2792b --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_state_chunk_list.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedApplicationHealthStateChunkList(Model): + """The list of deployed application health state chunks that respect the input + filters in the chunk query. Returned by get cluster health state chunks + query. + + :param items: The list of deployed application health state chunks that + respect the input filters in the chunk query. + :type items: + list[~azure.servicefabric.models.DeployedApplicationHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[DeployedApplicationHealthStateChunk]'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/deployed_application_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/deployed_application_health_state_chunk_list_py3.py new file mode 100644 index 00000000..74d8f231 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_state_chunk_list_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedApplicationHealthStateChunkList(Model): + """The list of deployed application health state chunks that respect the input + filters in the chunk query. Returned by get cluster health state chunks + query. + + :param items: The list of deployed application health state chunks that + respect the input filters in the chunk query. + :type items: + list[~azure.servicefabric.models.DeployedApplicationHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[DeployedApplicationHealthStateChunk]'}, + } + + def __init__(self, *, items=None, **kwargs) -> None: + super(DeployedApplicationHealthStateChunkList, self).__init__(**kwargs) + self.items = items diff --git a/customSDK/servicefabric/models/deployed_application_health_state_chunk_py3.py b/customSDK/servicefabric/models/deployed_application_health_state_chunk_py3.py new file mode 100644 index 00000000..e242b862 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_state_chunk_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk_py3 import EntityHealthStateChunk + + +class DeployedApplicationHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a deployed application, which contains + the node where the application is deployed, the aggregated health state and + any deployed service packages that respect the chunk query description + filters. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of node where the application is deployed. + :type node_name: str + :param deployed_service_package_health_state_chunks: The list of deployed + service package health state chunks belonging to the deployed application + that respect the filters in the cluster health chunk query description. + :type deployed_service_package_health_state_chunks: + ~azure.servicefabric.models.DeployedServicePackageHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'deployed_service_package_health_state_chunks': {'key': 'DeployedServicePackageHealthStateChunks', 'type': 'DeployedServicePackageHealthStateChunkList'}, + } + + def __init__(self, *, health_state=None, node_name: str=None, deployed_service_package_health_state_chunks=None, **kwargs) -> None: + super(DeployedApplicationHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.node_name = node_name + self.deployed_service_package_health_state_chunks = deployed_service_package_health_state_chunks diff --git a/customSDK/servicefabric/models/deployed_application_health_state_filter.py b/customSDK/servicefabric/models/deployed_application_health_state_filter.py new file mode 100644 index 00000000..00453b43 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_state_filter.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedApplicationHealthStateFilter(Model): + """Defines matching criteria to determine whether a deployed application + should be included as a child of an application in the cluster health + chunk. + The deployed applications are only returned if the parent application + matches a filter specified in the cluster health chunk query description. + One filter can match zero, one or multiple deployed applications, depending + on its properties. + + :param node_name_filter: The name of the node where the application is + deployed in order to match the filter. + If specified, the filter is applied only to the application deployed on + the specified node. + If the application is not deployed on the node with the specified name, no + deployed application is returned in the cluster health chunk based on this + filter. + Otherwise, the deployed application is included in the cluster health + chunk if it respects the other filter properties. + If not specified, all deployed applications that match the parent filters + (if any) are taken into consideration and matched against the other filter + members, like health state filter. + :type node_name_filter: str + :param health_state_filter: The filter for the health state of the + deployed applications. It allows selecting deployed applications if they + match the desired health states. + The possible values are integer value of one of the following health + states. Only deployed applications that match the filter are returned. All + deployed applications are used to evaluate the cluster aggregated health + state. + If not specified, default value is None, unless the node name is + specified. If the filter has default value and node name is specified, the + matching deployed application is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches deployed applications + with HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + :param deployed_service_package_filters: Defines a list of filters that + specify which deployed service packages to be included in the returned + cluster health chunk as children of the parent deployed application. The + deployed service packages are returned only if the parent deployed + application matches a filter. + If the list is empty, no deployed service packages are returned. All the + deployed service packages are used to evaluate the parent deployed + application aggregated health state, regardless of the input filters. + The deployed application filter may specify multiple deployed service + package filters. + For example, it can specify a filter to return all deployed service + packages with health state Error and another filter to always include a + deployed service package on a node. + :type deployed_service_package_filters: + list[~azure.servicefabric.models.DeployedServicePackageHealthStateFilter] + """ + + _attribute_map = { + 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'deployed_service_package_filters': {'key': 'DeployedServicePackageFilters', 'type': '[DeployedServicePackageHealthStateFilter]'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationHealthStateFilter, self).__init__(**kwargs) + self.node_name_filter = kwargs.get('node_name_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) + self.deployed_service_package_filters = kwargs.get('deployed_service_package_filters', None) diff --git a/customSDK/servicefabric/models/deployed_application_health_state_filter_py3.py b/customSDK/servicefabric/models/deployed_application_health_state_filter_py3.py new file mode 100644 index 00000000..4ced80a5 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_state_filter_py3.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedApplicationHealthStateFilter(Model): + """Defines matching criteria to determine whether a deployed application + should be included as a child of an application in the cluster health + chunk. + The deployed applications are only returned if the parent application + matches a filter specified in the cluster health chunk query description. + One filter can match zero, one or multiple deployed applications, depending + on its properties. + + :param node_name_filter: The name of the node where the application is + deployed in order to match the filter. + If specified, the filter is applied only to the application deployed on + the specified node. + If the application is not deployed on the node with the specified name, no + deployed application is returned in the cluster health chunk based on this + filter. + Otherwise, the deployed application is included in the cluster health + chunk if it respects the other filter properties. + If not specified, all deployed applications that match the parent filters + (if any) are taken into consideration and matched against the other filter + members, like health state filter. + :type node_name_filter: str + :param health_state_filter: The filter for the health state of the + deployed applications. It allows selecting deployed applications if they + match the desired health states. + The possible values are integer value of one of the following health + states. Only deployed applications that match the filter are returned. All + deployed applications are used to evaluate the cluster aggregated health + state. + If not specified, default value is None, unless the node name is + specified. If the filter has default value and node name is specified, the + matching deployed application is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches deployed applications + with HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + :param deployed_service_package_filters: Defines a list of filters that + specify which deployed service packages to be included in the returned + cluster health chunk as children of the parent deployed application. The + deployed service packages are returned only if the parent deployed + application matches a filter. + If the list is empty, no deployed service packages are returned. All the + deployed service packages are used to evaluate the parent deployed + application aggregated health state, regardless of the input filters. + The deployed application filter may specify multiple deployed service + package filters. + For example, it can specify a filter to return all deployed service + packages with health state Error and another filter to always include a + deployed service package on a node. + :type deployed_service_package_filters: + list[~azure.servicefabric.models.DeployedServicePackageHealthStateFilter] + """ + + _attribute_map = { + 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'deployed_service_package_filters': {'key': 'DeployedServicePackageFilters', 'type': '[DeployedServicePackageHealthStateFilter]'}, + } + + def __init__(self, *, node_name_filter: str=None, health_state_filter: int=0, deployed_service_package_filters=None, **kwargs) -> None: + super(DeployedApplicationHealthStateFilter, self).__init__(**kwargs) + self.node_name_filter = node_name_filter + self.health_state_filter = health_state_filter + self.deployed_service_package_filters = deployed_service_package_filters diff --git a/customSDK/servicefabric/models/deployed_application_health_state_py3.py b/customSDK/servicefabric/models/deployed_application_health_state_py3.py new file mode 100644 index 00000000..370cf230 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_health_state_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_py3 import EntityHealthState + + +class DeployedApplicationHealthState(EntityHealthState): + """Represents the health state of a deployed application, which contains the + entity identifier and the aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param node_name: Name of the node on which the service package is + deployed. + :type node_name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, node_name: str=None, application_name: str=None, **kwargs) -> None: + super(DeployedApplicationHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.node_name = node_name + self.application_name = application_name diff --git a/customSDK/servicefabric/models/deployed_application_info.py b/customSDK/servicefabric/models/deployed_application_info.py new file mode 100644 index 00000000..44b349c7 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_info.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedApplicationInfo(Model): + """Information about application deployed on the node. + + :param id: The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to + identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type id: str + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + :param type_name: The application type name as defined in the application + manifest. + :type type_name: str + :param type_version: The version of the application type as defined in the + application manifest. + :type type_version: str + :param status: The status of the application deployed on the node. + Following are the possible values. Possible values include: 'Invalid', + 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating' + :type status: str or ~azure.servicefabric.models.DeployedApplicationStatus + :param work_directory: The work directory of the application on the node. + The work directory can be used to store application data. + :type work_directory: str + :param log_directory: The log directory of the application on the node. + The log directory can be used to store application logs. + :type log_directory: str + :param temp_directory: The temp directory of the application on the node. + The code packages belonging to the application are forked with this + directory set as their temporary directory. + :type temp_directory: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'type_version': {'key': 'TypeVersion', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'work_directory': {'key': 'WorkDirectory', 'type': 'str'}, + 'log_directory': {'key': 'LogDirectory', 'type': 'str'}, + 'temp_directory': {'key': 'TempDirectory', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_name = kwargs.get('type_name', None) + self.type_version = kwargs.get('type_version', None) + self.status = kwargs.get('status', None) + self.work_directory = kwargs.get('work_directory', None) + self.log_directory = kwargs.get('log_directory', None) + self.temp_directory = kwargs.get('temp_directory', None) + self.health_state = kwargs.get('health_state', None) diff --git a/customSDK/servicefabric/models/deployed_application_info_py3.py b/customSDK/servicefabric/models/deployed_application_info_py3.py new file mode 100644 index 00000000..cf858695 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_info_py3.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedApplicationInfo(Model): + """Information about application deployed on the node. + + :param id: The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to + identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type id: str + :param name: The name of the application, including the 'fabric:' URI + scheme. + :type name: str + :param type_name: The application type name as defined in the application + manifest. + :type type_name: str + :param type_version: The version of the application type as defined in the + application manifest. + :type type_version: str + :param status: The status of the application deployed on the node. + Following are the possible values. Possible values include: 'Invalid', + 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating' + :type status: str or ~azure.servicefabric.models.DeployedApplicationStatus + :param work_directory: The work directory of the application on the node. + The work directory can be used to store application data. + :type work_directory: str + :param log_directory: The log directory of the application on the node. + The log directory can be used to store application logs. + :type log_directory: str + :param temp_directory: The temp directory of the application on the node. + The code packages belonging to the application are forked with this + directory set as their temporary directory. + :type temp_directory: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'type_version': {'key': 'TypeVersion', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'work_directory': {'key': 'WorkDirectory', 'type': 'str'}, + 'log_directory': {'key': 'LogDirectory', 'type': 'str'}, + 'temp_directory': {'key': 'TempDirectory', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, type_name: str=None, type_version: str=None, status=None, work_directory: str=None, log_directory: str=None, temp_directory: str=None, health_state=None, **kwargs) -> None: + super(DeployedApplicationInfo, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_name = type_name + self.type_version = type_version + self.status = status + self.work_directory = work_directory + self.log_directory = log_directory + self.temp_directory = temp_directory + self.health_state = health_state diff --git a/customSDK/servicefabric/models/deployed_application_new_health_report_event.py b/customSDK/servicefabric/models/deployed_application_new_health_report_event.py new file mode 100644 index 00000000..297abe18 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_new_health_report_event.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event import ApplicationEvent + + +class DeployedApplicationNewHealthReportEvent(ApplicationEvent): + """Deployed Application Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_instance_id: Required. Id of Application instance. + :type application_instance_id: long + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationNewHealthReportEvent, self).__init__(**kwargs) + self.application_instance_id = kwargs.get('application_instance_id', None) + self.node_name = kwargs.get('node_name', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'DeployedApplicationNewHealthReport' diff --git a/customSDK/servicefabric/models/deployed_application_new_health_report_event_py3.py b/customSDK/servicefabric/models/deployed_application_new_health_report_event_py3.py new file mode 100644 index 00000000..7f837853 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_application_new_health_report_event_py3.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event_py3 import ApplicationEvent + + +class DeployedApplicationNewHealthReportEvent(ApplicationEvent): + """Deployed Application Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param application_instance_id: Required. Id of Application instance. + :type application_instance_id: long + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'application_instance_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(DeployedApplicationNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.application_instance_id = application_instance_id + self.node_name = node_name + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'DeployedApplicationNewHealthReport' diff --git a/customSDK/servicefabric/models/deployed_applications_health_evaluation.py b/customSDK/servicefabric/models/deployed_applications_health_evaluation.py new file mode 100644 index 00000000..6d3f7733 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_applications_health_evaluation.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class DeployedApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed applications, containing health + evaluations for each unhealthy deployed application that impacted current + aggregated health state. + Can be returned when evaluating application health and the aggregated + health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_deployed_applications: Maximum allowed + percentage of unhealthy deployed applications from the + ApplicationHealthPolicy. + :type max_percent_unhealthy_deployed_applications: int + :param total_count: Total number of deployed applications of the + application in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + DeployedApplicationHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(DeployedApplicationsHealthEvaluation, self).__init__(**kwargs) + self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'DeployedApplications' diff --git a/customSDK/servicefabric/models/deployed_applications_health_evaluation_py3.py b/customSDK/servicefabric/models/deployed_applications_health_evaluation_py3.py new file mode 100644 index 00000000..cb907dbd --- /dev/null +++ b/customSDK/servicefabric/models/deployed_applications_health_evaluation_py3.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class DeployedApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed applications, containing health + evaluations for each unhealthy deployed application that impacted current + aggregated health state. + Can be returned when evaluating application health and the aggregated + health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_deployed_applications: Maximum allowed + percentage of unhealthy deployed applications from the + ApplicationHealthPolicy. + :type max_percent_unhealthy_deployed_applications: int + :param total_count: Total number of deployed applications of the + application in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + DeployedApplicationHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_deployed_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(DeployedApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'DeployedApplications' diff --git a/customSDK/servicefabric/models/deployed_code_package_info.py b/customSDK/servicefabric/models/deployed_code_package_info.py new file mode 100644 index 00000000..0e4cdad9 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_code_package_info.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedCodePackageInfo(Model): + """Information about code package deployed on a Service Fabric node. + + :param name: The name of the code package. + :type name: str + :param version: The version of the code package specified in service + manifest. + :type version: str + :param service_manifest_name: The name of service manifest that specified + this code package. + :type service_manifest_name: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param host_type: Specifies the type of host for main entry point of a + code package as specified in service manifest. Possible values include: + 'Invalid', 'ExeHost', 'ContainerHost' + :type host_type: str or ~azure.servicefabric.models.HostType + :param host_isolation_mode: Specifies the isolation mode of main entry + point of a code package when it's host type is ContainerHost. This is + specified as part of container host policies in application manifest while + importing service manifest. Possible values include: 'None', 'Process', + 'HyperV' + :type host_isolation_mode: str or + ~azure.servicefabric.models.HostIsolationMode + :param status: Specifies the status of a deployed application or service + package on a Service Fabric node. Possible values include: 'Invalid', + 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating', + 'RanToCompletion', 'Failed' + :type status: str or ~azure.servicefabric.models.DeploymentStatus + :param run_frequency_interval: The interval at which code package is run. + This is used for periodic code package. + :type run_frequency_interval: str + :param setup_entry_point: Information about setup or main entry point of a + code package deployed on a Service Fabric node. + :type setup_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint + :param main_entry_point: Information about setup or main entry point of a + code package deployed on a Service Fabric node. + :type main_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_type': {'key': 'HostType', 'type': 'str'}, + 'host_isolation_mode': {'key': 'HostIsolationMode', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'run_frequency_interval': {'key': 'RunFrequencyInterval', 'type': 'str'}, + 'setup_entry_point': {'key': 'SetupEntryPoint', 'type': 'CodePackageEntryPoint'}, + 'main_entry_point': {'key': 'MainEntryPoint', 'type': 'CodePackageEntryPoint'}, + } + + def __init__(self, **kwargs): + super(DeployedCodePackageInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.host_type = kwargs.get('host_type', None) + self.host_isolation_mode = kwargs.get('host_isolation_mode', None) + self.status = kwargs.get('status', None) + self.run_frequency_interval = kwargs.get('run_frequency_interval', None) + self.setup_entry_point = kwargs.get('setup_entry_point', None) + self.main_entry_point = kwargs.get('main_entry_point', None) diff --git a/customSDK/servicefabric/models/deployed_code_package_info_py3.py b/customSDK/servicefabric/models/deployed_code_package_info_py3.py new file mode 100644 index 00000000..8e4ef676 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_code_package_info_py3.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedCodePackageInfo(Model): + """Information about code package deployed on a Service Fabric node. + + :param name: The name of the code package. + :type name: str + :param version: The version of the code package specified in service + manifest. + :type version: str + :param service_manifest_name: The name of service manifest that specified + this code package. + :type service_manifest_name: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param host_type: Specifies the type of host for main entry point of a + code package as specified in service manifest. Possible values include: + 'Invalid', 'ExeHost', 'ContainerHost' + :type host_type: str or ~azure.servicefabric.models.HostType + :param host_isolation_mode: Specifies the isolation mode of main entry + point of a code package when it's host type is ContainerHost. This is + specified as part of container host policies in application manifest while + importing service manifest. Possible values include: 'None', 'Process', + 'HyperV' + :type host_isolation_mode: str or + ~azure.servicefabric.models.HostIsolationMode + :param status: Specifies the status of a deployed application or service + package on a Service Fabric node. Possible values include: 'Invalid', + 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating', + 'RanToCompletion', 'Failed' + :type status: str or ~azure.servicefabric.models.DeploymentStatus + :param run_frequency_interval: The interval at which code package is run. + This is used for periodic code package. + :type run_frequency_interval: str + :param setup_entry_point: Information about setup or main entry point of a + code package deployed on a Service Fabric node. + :type setup_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint + :param main_entry_point: Information about setup or main entry point of a + code package deployed on a Service Fabric node. + :type main_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_type': {'key': 'HostType', 'type': 'str'}, + 'host_isolation_mode': {'key': 'HostIsolationMode', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'run_frequency_interval': {'key': 'RunFrequencyInterval', 'type': 'str'}, + 'setup_entry_point': {'key': 'SetupEntryPoint', 'type': 'CodePackageEntryPoint'}, + 'main_entry_point': {'key': 'MainEntryPoint', 'type': 'CodePackageEntryPoint'}, + } + + def __init__(self, *, name: str=None, version: str=None, service_manifest_name: str=None, service_package_activation_id: str=None, host_type=None, host_isolation_mode=None, status=None, run_frequency_interval: str=None, setup_entry_point=None, main_entry_point=None, **kwargs) -> None: + super(DeployedCodePackageInfo, self).__init__(**kwargs) + self.name = name + self.version = version + self.service_manifest_name = service_manifest_name + self.service_package_activation_id = service_package_activation_id + self.host_type = host_type + self.host_isolation_mode = host_isolation_mode + self.status = status + self.run_frequency_interval = run_frequency_interval + self.setup_entry_point = setup_entry_point + self.main_entry_point = main_entry_point diff --git a/customSDK/servicefabric/models/deployed_service_package_health.py b/customSDK/servicefabric/models/deployed_service_package_health.py new file mode 100644 index 00000000..e45f95d5 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health import EntityHealth + + +class DeployedServicePackageHealth(EntityHealth): + """Information about the health of a service package for a specific + application deployed on a Service Fabric node. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_manifest_name: Name of the service manifest. + :type service_manifest_name: str + :param node_name: Name of the node where this service package is deployed. + :type node_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageHealth, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.node_name = kwargs.get('node_name', None) diff --git a/customSDK/servicefabric/models/deployed_service_package_health_evaluation.py b/customSDK/servicefabric/models/deployed_service_package_health_evaluation.py new file mode 100644 index 00000000..3af5f8bf --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_evaluation.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class DeployedServicePackageHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a deployed service package, containing + information about the data and the algorithm used by health store to + evaluate health. The evaluation is returned only when the aggregated health + state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_manifest_name: The name of the service manifest. + :type service_manifest_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state. The type of the unhealthy evaluations + can be EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageHealthEvaluation, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.application_name = kwargs.get('application_name', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'DeployedServicePackage' diff --git a/customSDK/servicefabric/models/deployed_service_package_health_evaluation_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_evaluation_py3.py new file mode 100644 index 00000000..6450f7db --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_evaluation_py3.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class DeployedServicePackageHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a deployed service package, containing + information about the data and the algorithm used by health store to + evaluate health. The evaluation is returned only when the aggregated health + state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_manifest_name: The name of the service manifest. + :type service_manifest_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state. The type of the unhealthy evaluations + can be EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, node_name: str=None, application_name: str=None, service_manifest_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: + super(DeployedServicePackageHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.node_name = node_name + self.application_name = application_name + self.service_manifest_name = service_manifest_name + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'DeployedServicePackage' diff --git a/customSDK/servicefabric/models/deployed_service_package_health_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_py3.py new file mode 100644 index 00000000..5c6a1802 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_py3 import EntityHealth + + +class DeployedServicePackageHealth(EntityHealth): + """Information about the health of a service package for a specific + application deployed on a Service Fabric node. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_manifest_name: Name of the service manifest. + :type service_manifest_name: str + :param node_name: Name of the node where this service package is deployed. + :type node_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, application_name: str=None, service_manifest_name: str=None, node_name: str=None, **kwargs) -> None: + super(DeployedServicePackageHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.application_name = application_name + self.service_manifest_name = service_manifest_name + self.node_name = node_name diff --git a/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event.py b/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event.py new file mode 100644 index 00000000..b8af144a --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event import ApplicationEvent + + +class DeployedServicePackageHealthReportExpiredEvent(ApplicationEvent): + """Deployed Service Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param service_manifest: Required. Service manifest name. + :type service_manifest: str + :param service_package_instance_id: Required. Id of Service package + instance. + :type service_package_instance_id: long + :param service_package_activation_id: Required. Id of Service package + activation. + :type service_package_activation_id: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'service_manifest': {'required': True}, + 'service_package_instance_id': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_manifest': {'key': 'ServiceManifest', 'type': 'str'}, + 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageHealthReportExpiredEvent, self).__init__(**kwargs) + self.service_manifest = kwargs.get('service_manifest', None) + self.service_package_instance_id = kwargs.get('service_package_instance_id', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.node_name = kwargs.get('node_name', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'DeployedServicePackageHealthReportExpired' diff --git a/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event_py3.py new file mode 100644 index 00000000..28e8f9d8 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event_py3.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event_py3 import ApplicationEvent + + +class DeployedServicePackageHealthReportExpiredEvent(ApplicationEvent): + """Deployed Service Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param service_manifest: Required. Service manifest name. + :type service_manifest: str + :param service_package_instance_id: Required. Id of Service package + instance. + :type service_package_instance_id: long + :param service_package_activation_id: Required. Id of Service package + activation. + :type service_package_activation_id: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'service_manifest': {'required': True}, + 'service_package_instance_id': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_manifest': {'key': 'ServiceManifest', 'type': 'str'}, + 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_manifest: str, service_package_instance_id: int, service_package_activation_id: str, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(DeployedServicePackageHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.service_manifest = service_manifest + self.service_package_instance_id = service_package_instance_id + self.service_package_activation_id = service_package_activation_id + self.node_name = node_name + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'DeployedServicePackageHealthReportExpired' diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state.py b/customSDK/servicefabric/models/deployed_service_package_health_state.py new file mode 100644 index 00000000..e9e62716 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_state.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state import EntityHealthState + + +class DeployedServicePackageHealthState(EntityHealthState): + """Represents the health state of a deployed service package, containing the + entity identifier and the aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param node_name: Name of the node on which the service package is + deployed. + :type node_name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_manifest_name: Name of the manifest describing the service + package. + :type service_manifest_name: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageHealthState, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.application_name = kwargs.get('application_name', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_chunk.py b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk.py new file mode 100644 index 00000000..0bbf966e --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk import EntityHealthStateChunk + + +class DeployedServicePackageHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a deployed service package, which + contains the service manifest name and the service package aggregated + health state. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_manifest_name: The name of the service manifest. + :type service_manifest_name: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageHealthStateChunk, self).__init__(**kwargs) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list.py b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list.py new file mode 100644 index 00000000..5b453e44 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedServicePackageHealthStateChunkList(Model): + """The list of deployed service package health state chunks that respect the + input filters in the chunk query. Returned by get cluster health state + chunks query. + + :param items: The list of deployed service package health state chunks + that respect the input filters in the chunk query. + :type items: + list[~azure.servicefabric.models.DeployedServicePackageHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[DeployedServicePackageHealthStateChunk]'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list_py3.py new file mode 100644 index 00000000..fe435a6b --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedServicePackageHealthStateChunkList(Model): + """The list of deployed service package health state chunks that respect the + input filters in the chunk query. Returned by get cluster health state + chunks query. + + :param items: The list of deployed service package health state chunks + that respect the input filters in the chunk query. + :type items: + list[~azure.servicefabric.models.DeployedServicePackageHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[DeployedServicePackageHealthStateChunk]'}, + } + + def __init__(self, *, items=None, **kwargs) -> None: + super(DeployedServicePackageHealthStateChunkList, self).__init__(**kwargs) + self.items = items diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_py3.py new file mode 100644 index 00000000..1911d409 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk_py3 import EntityHealthStateChunk + + +class DeployedServicePackageHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a deployed service package, which + contains the service manifest name and the service package aggregated + health state. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_manifest_name: The name of the service manifest. + :type service_manifest_name: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, *, health_state=None, service_manifest_name: str=None, service_package_activation_id: str=None, **kwargs) -> None: + super(DeployedServicePackageHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.service_manifest_name = service_manifest_name + self.service_package_activation_id = service_package_activation_id diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_filter.py b/customSDK/servicefabric/models/deployed_service_package_health_state_filter.py new file mode 100644 index 00000000..5dc22698 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_state_filter.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedServicePackageHealthStateFilter(Model): + """Defines matching criteria to determine whether a deployed service package + should be included as a child of a deployed application in the cluster + health chunk. + The deployed service packages are only returned if the parent entities + match a filter specified in the cluster health chunk query description. The + parent deployed application and its parent application must be included in + the cluster health chunk. + One filter can match zero, one or multiple deployed service packages, + depending on its properties. + + :param service_manifest_name_filter: The name of the service manifest + which identifies the deployed service packages that matches the filter. + If specified, the filter is applied only to the specified deployed service + packages, if any. + If no deployed service packages with specified manifest name exist, + nothing is returned in the cluster health chunk based on this filter. + If any deployed service package exists, they are included in the cluster + health chunk if it respects the other filter properties. + If not specified, all deployed service packages that match the parent + filters (if any) are taken into consideration and matched against the + other filter members, like health state filter. + :type service_manifest_name_filter: str + :param service_package_activation_id_filter: The activation ID of a + deployed service package that matches the filter. + If not specified, the filter applies to all deployed service packages that + match the other parameters. + If specified, the filter matches only the deployed service package with + the specified activation ID. + :type service_package_activation_id_filter: str + :param health_state_filter: The filter for the health state of the + deployed service packages. It allows selecting deployed service packages + if they match the desired health states. + The possible values are integer value of one of the following health + states. Only deployed service packages that match the filter are returned. + All deployed service packages are used to evaluate the parent deployed + application aggregated health state. + If not specified, default value is None, unless the deployed service + package ID is specified. If the filter has default value and deployed + service package ID is specified, the matching deployed service package is + returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches deployed service + packages with HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + """ + + _attribute_map = { + 'service_manifest_name_filter': {'key': 'ServiceManifestNameFilter', 'type': 'str'}, + 'service_package_activation_id_filter': {'key': 'ServicePackageActivationIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageHealthStateFilter, self).__init__(**kwargs) + self.service_manifest_name_filter = kwargs.get('service_manifest_name_filter', None) + self.service_package_activation_id_filter = kwargs.get('service_package_activation_id_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_filter_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_state_filter_py3.py new file mode 100644 index 00000000..a4af6760 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_state_filter_py3.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedServicePackageHealthStateFilter(Model): + """Defines matching criteria to determine whether a deployed service package + should be included as a child of a deployed application in the cluster + health chunk. + The deployed service packages are only returned if the parent entities + match a filter specified in the cluster health chunk query description. The + parent deployed application and its parent application must be included in + the cluster health chunk. + One filter can match zero, one or multiple deployed service packages, + depending on its properties. + + :param service_manifest_name_filter: The name of the service manifest + which identifies the deployed service packages that matches the filter. + If specified, the filter is applied only to the specified deployed service + packages, if any. + If no deployed service packages with specified manifest name exist, + nothing is returned in the cluster health chunk based on this filter. + If any deployed service package exists, they are included in the cluster + health chunk if it respects the other filter properties. + If not specified, all deployed service packages that match the parent + filters (if any) are taken into consideration and matched against the + other filter members, like health state filter. + :type service_manifest_name_filter: str + :param service_package_activation_id_filter: The activation ID of a + deployed service package that matches the filter. + If not specified, the filter applies to all deployed service packages that + match the other parameters. + If specified, the filter matches only the deployed service package with + the specified activation ID. + :type service_package_activation_id_filter: str + :param health_state_filter: The filter for the health state of the + deployed service packages. It allows selecting deployed service packages + if they match the desired health states. + The possible values are integer value of one of the following health + states. Only deployed service packages that match the filter are returned. + All deployed service packages are used to evaluate the parent deployed + application aggregated health state. + If not specified, default value is None, unless the deployed service + package ID is specified. If the filter has default value and deployed + service package ID is specified, the matching deployed service package is + returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches deployed service + packages with HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + """ + + _attribute_map = { + 'service_manifest_name_filter': {'key': 'ServiceManifestNameFilter', 'type': 'str'}, + 'service_package_activation_id_filter': {'key': 'ServicePackageActivationIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__(self, *, service_manifest_name_filter: str=None, service_package_activation_id_filter: str=None, health_state_filter: int=0, **kwargs) -> None: + super(DeployedServicePackageHealthStateFilter, self).__init__(**kwargs) + self.service_manifest_name_filter = service_manifest_name_filter + self.service_package_activation_id_filter = service_package_activation_id_filter + self.health_state_filter = health_state_filter diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_state_py3.py new file mode 100644 index 00000000..365b0c4a --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_health_state_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_py3 import EntityHealthState + + +class DeployedServicePackageHealthState(EntityHealthState): + """Represents the health state of a deployed service package, containing the + entity identifier and the aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param node_name: Name of the node on which the service package is + deployed. + :type node_name: str + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_manifest_name: Name of the manifest describing the service + package. + :type service_manifest_name: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, node_name: str=None, application_name: str=None, service_manifest_name: str=None, service_package_activation_id: str=None, **kwargs) -> None: + super(DeployedServicePackageHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.node_name = node_name + self.application_name = application_name + self.service_manifest_name = service_manifest_name + self.service_package_activation_id = service_package_activation_id diff --git a/customSDK/servicefabric/models/deployed_service_package_info.py b/customSDK/servicefabric/models/deployed_service_package_info.py new file mode 100644 index 00000000..0feff70d --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_info.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedServicePackageInfo(Model): + """Information about service package deployed on a Service Fabric node. + + :param name: The name of the service package as specified in the service + manifest. + :type name: str + :param version: The version of the service package specified in service + manifest. + :type version: str + :param status: Specifies the status of a deployed application or service + package on a Service Fabric node. Possible values include: 'Invalid', + 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating', + 'RanToCompletion', 'Failed' + :type status: str or ~azure.servicefabric.models.DeploymentStatus + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + self.status = kwargs.get('status', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) diff --git a/customSDK/servicefabric/models/deployed_service_package_info_py3.py b/customSDK/servicefabric/models/deployed_service_package_info_py3.py new file mode 100644 index 00000000..477a33a0 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_info_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedServicePackageInfo(Model): + """Information about service package deployed on a Service Fabric node. + + :param name: The name of the service package as specified in the service + manifest. + :type name: str + :param version: The version of the service package specified in service + manifest. + :type version: str + :param status: Specifies the status of a deployed application or service + package on a Service Fabric node. Possible values include: 'Invalid', + 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating', + 'RanToCompletion', 'Failed' + :type status: str or ~azure.servicefabric.models.DeploymentStatus + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, version: str=None, status=None, service_package_activation_id: str=None, **kwargs) -> None: + super(DeployedServicePackageInfo, self).__init__(**kwargs) + self.name = name + self.version = version + self.status = status + self.service_package_activation_id = service_package_activation_id diff --git a/customSDK/servicefabric/models/deployed_service_package_new_health_report_event.py b/customSDK/servicefabric/models/deployed_service_package_new_health_report_event.py new file mode 100644 index 00000000..74497880 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_new_health_report_event.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event import ApplicationEvent + + +class DeployedServicePackageNewHealthReportEvent(ApplicationEvent): + """Deployed Service Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param service_manifest_name: Required. Service manifest name. + :type service_manifest_name: str + :param service_package_instance_id: Required. Id of Service package + instance. + :type service_package_instance_id: long + :param service_package_activation_id: Required. Id of Service package + activation. + :type service_package_activation_id: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'service_manifest_name': {'required': True}, + 'service_package_instance_id': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackageNewHealthReportEvent, self).__init__(**kwargs) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.service_package_instance_id = kwargs.get('service_package_instance_id', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.node_name = kwargs.get('node_name', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'DeployedServicePackageNewHealthReport' diff --git a/customSDK/servicefabric/models/deployed_service_package_new_health_report_event_py3.py b/customSDK/servicefabric/models/deployed_service_package_new_health_report_event_py3.py new file mode 100644 index 00000000..487a2957 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_package_new_health_report_event_py3.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .application_event_py3 import ApplicationEvent + + +class DeployedServicePackageNewHealthReportEvent(ApplicationEvent): + """Deployed Service Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_id: Required. The identity of the application. This is + an encoded representation of the application name. This is used in the + REST APIs to identify the application resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the application name is "fabric:/myapp/app1", + the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" + in previous versions. + :type application_id: str + :param service_manifest_name: Required. Service manifest name. + :type service_manifest_name: str + :param service_package_instance_id: Required. Id of Service package + instance. + :type service_package_instance_id: long + :param service_package_activation_id: Required. Id of Service package + activation. + :type service_package_activation_id: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'application_id': {'required': True}, + 'service_manifest_name': {'required': True}, + 'service_package_instance_id': {'required': True}, + 'service_package_activation_id': {'required': True}, + 'node_name': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_id': {'key': 'ApplicationId', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_manifest_name: str, service_package_instance_id: int, service_package_activation_id: str, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(DeployedServicePackageNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) + self.service_manifest_name = service_manifest_name + self.service_package_instance_id = service_package_instance_id + self.service_package_activation_id = service_package_activation_id + self.node_name = node_name + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'DeployedServicePackageNewHealthReport' diff --git a/customSDK/servicefabric/models/deployed_service_packages_health_evaluation.py b/customSDK/servicefabric/models/deployed_service_packages_health_evaluation.py new file mode 100644 index 00000000..2820b65e --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_packages_health_evaluation.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class DeployedServicePackagesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed service packages, containing + health evaluations for each unhealthy deployed service package that + impacted current aggregated health state. Can be returned when evaluating + deployed application health and the aggregated health state is either Error + or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param total_count: Total number of deployed service packages of the + deployed application in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + DeployedServicePackageHealthEvaluation that impacted the aggregated + health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(DeployedServicePackagesHealthEvaluation, self).__init__(**kwargs) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'DeployedServicePackages' diff --git a/customSDK/servicefabric/models/deployed_service_packages_health_evaluation_py3.py b/customSDK/servicefabric/models/deployed_service_packages_health_evaluation_py3.py new file mode 100644 index 00000000..04c20abe --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_packages_health_evaluation_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class DeployedServicePackagesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed service packages, containing + health evaluations for each unhealthy deployed service package that + impacted current aggregated health state. Can be returned when evaluating + deployed application health and the aggregated health state is either Error + or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param total_count: Total number of deployed service packages of the + deployed application in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + DeployedServicePackageHealthEvaluation that impacted the aggregated + health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(DeployedServicePackagesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'DeployedServicePackages' diff --git a/customSDK/servicefabric/models/deployed_service_replica_detail_info.py b/customSDK/servicefabric/models/deployed_service_replica_detail_info.py new file mode 100644 index 00000000..2d01b8a4 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_replica_detail_info.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedServiceReplicaDetailInfo(Model): + """Information about a Service Fabric service replica deployed on a node. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeployedStatefulServiceReplicaDetailInfo, + DeployedStatelessServiceInstanceDetailInfo + + All required parameters must be populated in order to send to Azure. + + :param service_name: Full hierarchical name of the service in URI format + starting with `fabric:`. + :type service_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param current_service_operation: Specifies the current active life-cycle + operation on a stateful service replica or stateless service instance. + Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', + 'Abort' + :type current_service_operation: str or + ~azure.servicefabric.models.ServiceOperationName + :param current_service_operation_start_time_utc: The start time of the + current service operation in UTC format. + :type current_service_operation_start_time_utc: datetime + :param reported_load: List of load reported by replica. + :type reported_load: + list[~azure.servicefabric.models.LoadMetricReportInfo] + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaDetailInfo', 'Stateless': 'DeployedStatelessServiceInstanceDetailInfo'} + } + + def __init__(self, **kwargs): + super(DeployedServiceReplicaDetailInfo, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) + self.current_service_operation = kwargs.get('current_service_operation', None) + self.current_service_operation_start_time_utc = kwargs.get('current_service_operation_start_time_utc', None) + self.reported_load = kwargs.get('reported_load', None) + self.service_kind = None diff --git a/customSDK/servicefabric/models/deployed_service_replica_detail_info_py3.py b/customSDK/servicefabric/models/deployed_service_replica_detail_info_py3.py new file mode 100644 index 00000000..9e2b751c --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_replica_detail_info_py3.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedServiceReplicaDetailInfo(Model): + """Information about a Service Fabric service replica deployed on a node. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeployedStatefulServiceReplicaDetailInfo, + DeployedStatelessServiceInstanceDetailInfo + + All required parameters must be populated in order to send to Azure. + + :param service_name: Full hierarchical name of the service in URI format + starting with `fabric:`. + :type service_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param current_service_operation: Specifies the current active life-cycle + operation on a stateful service replica or stateless service instance. + Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', + 'Abort' + :type current_service_operation: str or + ~azure.servicefabric.models.ServiceOperationName + :param current_service_operation_start_time_utc: The start time of the + current service operation in UTC format. + :type current_service_operation_start_time_utc: datetime + :param reported_load: List of load reported by replica. + :type reported_load: + list[~azure.servicefabric.models.LoadMetricReportInfo] + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaDetailInfo', 'Stateless': 'DeployedStatelessServiceInstanceDetailInfo'} + } + + def __init__(self, *, service_name: str=None, partition_id: str=None, current_service_operation=None, current_service_operation_start_time_utc=None, reported_load=None, **kwargs) -> None: + super(DeployedServiceReplicaDetailInfo, self).__init__(**kwargs) + self.service_name = service_name + self.partition_id = partition_id + self.current_service_operation = current_service_operation + self.current_service_operation_start_time_utc = current_service_operation_start_time_utc + self.reported_load = reported_load + self.service_kind = None diff --git a/customSDK/servicefabric/models/deployed_service_replica_info.py b/customSDK/servicefabric/models/deployed_service_replica_info.py new file mode 100644 index 00000000..0c521cc3 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_replica_info.py @@ -0,0 +1,96 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedServiceReplicaInfo(Model): + """Information about a Service Fabric service replica deployed on a node. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeployedStatefulServiceReplicaInfo, + DeployedStatelessServiceInstanceInfo + + All required parameters must be populated in order to send to Azure. + + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param code_package_name: The name of the code package that hosts this + replica. + :type code_package_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param address: The last address returned by the replica in Open or + ChangeRole. + :type address: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param host_process_id: Host process ID of the process that is hosting the + replica. This will be zero if the replica is down. In hyper-v containers + this host process ID will be from different kernel. + :type host_process_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaInfo', 'Stateless': 'DeployedStatelessServiceInstanceInfo'} + } + + def __init__(self, **kwargs): + super(DeployedServiceReplicaInfo, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.service_type_name = kwargs.get('service_type_name', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.code_package_name = kwargs.get('code_package_name', None) + self.partition_id = kwargs.get('partition_id', None) + self.replica_status = kwargs.get('replica_status', None) + self.address = kwargs.get('address', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.host_process_id = kwargs.get('host_process_id', None) + self.service_kind = None diff --git a/customSDK/servicefabric/models/deployed_service_replica_info_py3.py b/customSDK/servicefabric/models/deployed_service_replica_info_py3.py new file mode 100644 index 00000000..7cec5b76 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_replica_info_py3.py @@ -0,0 +1,96 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedServiceReplicaInfo(Model): + """Information about a Service Fabric service replica deployed on a node. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeployedStatefulServiceReplicaInfo, + DeployedStatelessServiceInstanceInfo + + All required parameters must be populated in order to send to Azure. + + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param code_package_name: The name of the code package that hosts this + replica. + :type code_package_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param address: The last address returned by the replica in Open or + ChangeRole. + :type address: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param host_process_id: Host process ID of the process that is hosting the + replica. This will be zero if the replica is down. In hyper-v containers + this host process ID will be from different kernel. + :type host_process_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaInfo', 'Stateless': 'DeployedStatelessServiceInstanceInfo'} + } + + def __init__(self, *, service_name: str=None, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, partition_id: str=None, replica_status=None, address: str=None, service_package_activation_id: str=None, host_process_id: str=None, **kwargs) -> None: + super(DeployedServiceReplicaInfo, self).__init__(**kwargs) + self.service_name = service_name + self.service_type_name = service_type_name + self.service_manifest_name = service_manifest_name + self.code_package_name = code_package_name + self.partition_id = partition_id + self.replica_status = replica_status + self.address = address + self.service_package_activation_id = service_package_activation_id + self.host_process_id = host_process_id + self.service_kind = None diff --git a/customSDK/servicefabric/models/deployed_service_type_info.py b/customSDK/servicefabric/models/deployed_service_type_info.py new file mode 100644 index 00000000..f46f04c3 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_type_info.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedServiceTypeInfo(Model): + """Information about service type deployed on a node, information such as the + status of the service type registration on a node. + + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param code_package_name: The name of the code package that registered the + service type. + :type code_package_name: str + :param status: The status of the service type registration on the node. + Possible values include: 'Invalid', 'Disabled', 'Enabled', 'Registered' + :type status: str or + ~azure.servicefabric.models.ServiceTypeRegistrationStatus + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + """ + + _attribute_map = { + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeployedServiceTypeInfo, self).__init__(**kwargs) + self.service_type_name = kwargs.get('service_type_name', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.code_package_name = kwargs.get('code_package_name', None) + self.status = kwargs.get('status', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) diff --git a/customSDK/servicefabric/models/deployed_service_type_info_py3.py b/customSDK/servicefabric/models/deployed_service_type_info_py3.py new file mode 100644 index 00000000..f749665e --- /dev/null +++ b/customSDK/servicefabric/models/deployed_service_type_info_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeployedServiceTypeInfo(Model): + """Information about service type deployed on a node, information such as the + status of the service type registration on a node. + + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param code_package_name: The name of the code package that registered the + service type. + :type code_package_name: str + :param status: The status of the service type registration on the node. + Possible values include: 'Invalid', 'Disabled', 'Enabled', 'Registered' + :type status: str or + ~azure.servicefabric.models.ServiceTypeRegistrationStatus + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + """ + + _attribute_map = { + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + } + + def __init__(self, *, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, status=None, service_package_activation_id: str=None, **kwargs) -> None: + super(DeployedServiceTypeInfo, self).__init__(**kwargs) + self.service_type_name = service_type_name + self.service_manifest_name = service_manifest_name + self.code_package_name = code_package_name + self.status = status + self.service_package_activation_id = service_package_activation_id diff --git a/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info.py b/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info.py new file mode 100644 index 00000000..03c61662 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .deployed_service_replica_detail_info import DeployedServiceReplicaDetailInfo + + +class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo): + """Information about a stateful replica running in a code package. Note + DeployedServiceReplicaQueryResult will contain duplicate data like + ServiceKind, ServiceName, PartitionId and replicaId. + + All required parameters must be populated in order to send to Azure. + + :param service_name: Full hierarchical name of the service in URI format + starting with `fabric:`. + :type service_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param current_service_operation: Specifies the current active life-cycle + operation on a stateful service replica or stateless service instance. + Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', + 'Abort' + :type current_service_operation: str or + ~azure.servicefabric.models.ServiceOperationName + :param current_service_operation_start_time_utc: The start time of the + current service operation in UTC format. + :type current_service_operation_start_time_utc: datetime + :param reported_load: List of load reported by replica. + :type reported_load: + list[~azure.servicefabric.models.LoadMetricReportInfo] + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + :param current_replicator_operation: Specifies the operation currently + being executed by the Replicator. Possible values include: 'Invalid', + 'None', 'Open', 'ChangeRole', 'UpdateEpoch', 'Close', 'Abort', + 'OnDataLoss', 'WaitForCatchup', 'Build' + :type current_replicator_operation: str or + ~azure.servicefabric.models.ReplicatorOperationName + :param read_status: Specifies the access status of the partition. Possible + values include: 'Invalid', 'Granted', 'ReconfigurationPending', + 'NotPrimary', 'NoWriteQuorum' + :type read_status: str or + ~azure.servicefabric.models.PartitionAccessStatus + :param write_status: Specifies the access status of the partition. + Possible values include: 'Invalid', 'Granted', 'ReconfigurationPending', + 'NotPrimary', 'NoWriteQuorum' + :type write_status: str or + ~azure.servicefabric.models.PartitionAccessStatus + :param replicator_status: Represents a base class for primary or secondary + replicator status. + Contains information about the service fabric replicator like the + replication/copy queue utilization, last acknowledgement received + timestamp, etc. + :type replicator_status: ~azure.servicefabric.models.ReplicatorStatus + :param replica_status: Key value store related information for the + replica. + :type replica_status: + ~azure.servicefabric.models.KeyValueStoreReplicaStatus + :param deployed_service_replica_query_result: Information about a stateful + service replica deployed on a node. + :type deployed_service_replica_query_result: + ~azure.servicefabric.models.DeployedStatefulServiceReplicaInfo + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'current_replicator_operation': {'key': 'CurrentReplicatorOperation', 'type': 'str'}, + 'read_status': {'key': 'ReadStatus', 'type': 'str'}, + 'write_status': {'key': 'WriteStatus', 'type': 'str'}, + 'replicator_status': {'key': 'ReplicatorStatus', 'type': 'ReplicatorStatus'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'KeyValueStoreReplicaStatus'}, + 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatefulServiceReplicaInfo'}, + } + + def __init__(self, **kwargs): + super(DeployedStatefulServiceReplicaDetailInfo, self).__init__(**kwargs) + self.replica_id = kwargs.get('replica_id', None) + self.current_replicator_operation = kwargs.get('current_replicator_operation', None) + self.read_status = kwargs.get('read_status', None) + self.write_status = kwargs.get('write_status', None) + self.replicator_status = kwargs.get('replicator_status', None) + self.replica_status = kwargs.get('replica_status', None) + self.deployed_service_replica_query_result = kwargs.get('deployed_service_replica_query_result', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info_py3.py b/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info_py3.py new file mode 100644 index 00000000..fe98aade --- /dev/null +++ b/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info_py3.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .deployed_service_replica_detail_info_py3 import DeployedServiceReplicaDetailInfo + + +class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo): + """Information about a stateful replica running in a code package. Note + DeployedServiceReplicaQueryResult will contain duplicate data like + ServiceKind, ServiceName, PartitionId and replicaId. + + All required parameters must be populated in order to send to Azure. + + :param service_name: Full hierarchical name of the service in URI format + starting with `fabric:`. + :type service_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param current_service_operation: Specifies the current active life-cycle + operation on a stateful service replica or stateless service instance. + Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', + 'Abort' + :type current_service_operation: str or + ~azure.servicefabric.models.ServiceOperationName + :param current_service_operation_start_time_utc: The start time of the + current service operation in UTC format. + :type current_service_operation_start_time_utc: datetime + :param reported_load: List of load reported by replica. + :type reported_load: + list[~azure.servicefabric.models.LoadMetricReportInfo] + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + :param current_replicator_operation: Specifies the operation currently + being executed by the Replicator. Possible values include: 'Invalid', + 'None', 'Open', 'ChangeRole', 'UpdateEpoch', 'Close', 'Abort', + 'OnDataLoss', 'WaitForCatchup', 'Build' + :type current_replicator_operation: str or + ~azure.servicefabric.models.ReplicatorOperationName + :param read_status: Specifies the access status of the partition. Possible + values include: 'Invalid', 'Granted', 'ReconfigurationPending', + 'NotPrimary', 'NoWriteQuorum' + :type read_status: str or + ~azure.servicefabric.models.PartitionAccessStatus + :param write_status: Specifies the access status of the partition. + Possible values include: 'Invalid', 'Granted', 'ReconfigurationPending', + 'NotPrimary', 'NoWriteQuorum' + :type write_status: str or + ~azure.servicefabric.models.PartitionAccessStatus + :param replicator_status: Represents a base class for primary or secondary + replicator status. + Contains information about the service fabric replicator like the + replication/copy queue utilization, last acknowledgement received + timestamp, etc. + :type replicator_status: ~azure.servicefabric.models.ReplicatorStatus + :param replica_status: Key value store related information for the + replica. + :type replica_status: + ~azure.servicefabric.models.KeyValueStoreReplicaStatus + :param deployed_service_replica_query_result: Information about a stateful + service replica deployed on a node. + :type deployed_service_replica_query_result: + ~azure.servicefabric.models.DeployedStatefulServiceReplicaInfo + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'current_replicator_operation': {'key': 'CurrentReplicatorOperation', 'type': 'str'}, + 'read_status': {'key': 'ReadStatus', 'type': 'str'}, + 'write_status': {'key': 'WriteStatus', 'type': 'str'}, + 'replicator_status': {'key': 'ReplicatorStatus', 'type': 'ReplicatorStatus'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'KeyValueStoreReplicaStatus'}, + 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatefulServiceReplicaInfo'}, + } + + def __init__(self, *, service_name: str=None, partition_id: str=None, current_service_operation=None, current_service_operation_start_time_utc=None, reported_load=None, replica_id: str=None, current_replicator_operation=None, read_status=None, write_status=None, replicator_status=None, replica_status=None, deployed_service_replica_query_result=None, **kwargs) -> None: + super(DeployedStatefulServiceReplicaDetailInfo, self).__init__(service_name=service_name, partition_id=partition_id, current_service_operation=current_service_operation, current_service_operation_start_time_utc=current_service_operation_start_time_utc, reported_load=reported_load, **kwargs) + self.replica_id = replica_id + self.current_replicator_operation = current_replicator_operation + self.read_status = read_status + self.write_status = write_status + self.replicator_status = replicator_status + self.replica_status = replica_status + self.deployed_service_replica_query_result = deployed_service_replica_query_result + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/deployed_stateful_service_replica_info.py b/customSDK/servicefabric/models/deployed_stateful_service_replica_info.py new file mode 100644 index 00000000..a9fd7916 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_stateful_service_replica_info.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .deployed_service_replica_info import DeployedServiceReplicaInfo + + +class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): + """Information about a stateful service replica deployed on a node. + + All required parameters must be populated in order to send to Azure. + + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param code_package_name: The name of the code package that hosts this + replica. + :type code_package_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param address: The last address returned by the replica in Open or + ChangeRole. + :type address: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param host_process_id: Host process ID of the process that is hosting the + replica. This will be zero if the replica is down. In hyper-v containers + this host process ID will be from different kernel. + :type host_process_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + :param replica_role: The role of a replica of a stateful service. Possible + values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', + 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', 'PrimaryAuxiliary' + :type replica_role: str or ~azure.servicefabric.models.ReplicaRole + :param reconfiguration_information: Information about current + reconfiguration like phase, type, previous configuration role of replica + and reconfiguration start date time. + :type reconfiguration_information: + ~azure.servicefabric.models.ReconfigurationInformation + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, + 'reconfiguration_information': {'key': 'ReconfigurationInformation', 'type': 'ReconfigurationInformation'}, + } + + def __init__(self, **kwargs): + super(DeployedStatefulServiceReplicaInfo, self).__init__(**kwargs) + self.replica_id = kwargs.get('replica_id', None) + self.replica_role = kwargs.get('replica_role', None) + self.reconfiguration_information = kwargs.get('reconfiguration_information', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/deployed_stateful_service_replica_info_py3.py b/customSDK/servicefabric/models/deployed_stateful_service_replica_info_py3.py new file mode 100644 index 00000000..d298b62d --- /dev/null +++ b/customSDK/servicefabric/models/deployed_stateful_service_replica_info_py3.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .deployed_service_replica_info_py3 import DeployedServiceReplicaInfo + + +class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): + """Information about a stateful service replica deployed on a node. + + All required parameters must be populated in order to send to Azure. + + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param code_package_name: The name of the code package that hosts this + replica. + :type code_package_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param address: The last address returned by the replica in Open or + ChangeRole. + :type address: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param host_process_id: Host process ID of the process that is hosting the + replica. This will be zero if the replica is down. In hyper-v containers + this host process ID will be from different kernel. + :type host_process_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + :param replica_role: The role of a replica of a stateful service. Possible + values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', + 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', 'PrimaryAuxiliary' + :type replica_role: str or ~azure.servicefabric.models.ReplicaRole + :param reconfiguration_information: Information about current + reconfiguration like phase, type, previous configuration role of replica + and reconfiguration start date time. + :type reconfiguration_information: + ~azure.servicefabric.models.ReconfigurationInformation + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, + 'reconfiguration_information': {'key': 'ReconfigurationInformation', 'type': 'ReconfigurationInformation'}, + } + + def __init__(self, *, service_name: str=None, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, partition_id: str=None, replica_status=None, address: str=None, service_package_activation_id: str=None, host_process_id: str=None, replica_id: str=None, replica_role=None, reconfiguration_information=None, **kwargs) -> None: + super(DeployedStatefulServiceReplicaInfo, self).__init__(service_name=service_name, service_type_name=service_type_name, service_manifest_name=service_manifest_name, code_package_name=code_package_name, partition_id=partition_id, replica_status=replica_status, address=address, service_package_activation_id=service_package_activation_id, host_process_id=host_process_id, **kwargs) + self.replica_id = replica_id + self.replica_role = replica_role + self.reconfiguration_information = reconfiguration_information + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info.py b/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info.py new file mode 100644 index 00000000..4f06117b --- /dev/null +++ b/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .deployed_service_replica_detail_info import DeployedServiceReplicaDetailInfo + + +class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInfo): + """Information about a stateless instance running in a code package. Note that + DeployedServiceReplicaQueryResult will contain duplicate data like + ServiceKind, ServiceName, PartitionId and InstanceId. + + All required parameters must be populated in order to send to Azure. + + :param service_name: Full hierarchical name of the service in URI format + starting with `fabric:`. + :type service_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param current_service_operation: Specifies the current active life-cycle + operation on a stateful service replica or stateless service instance. + Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', + 'Abort' + :type current_service_operation: str or + ~azure.servicefabric.models.ServiceOperationName + :param current_service_operation_start_time_utc: The start time of the + current service operation in UTC format. + :type current_service_operation_start_time_utc: datetime + :param reported_load: List of load reported by replica. + :type reported_load: + list[~azure.servicefabric.models.LoadMetricReportInfo] + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_id: Id of a stateless service instance. InstanceId is used + by Service Fabric to uniquely identify an instance of a partition of a + stateless service. It is unique within a partition and does not change for + the lifetime of the instance. If the instance has failed over on the same + or different node, it will get a different value for the InstanceId. + :type instance_id: str + :param deployed_service_replica_query_result: Information about a + stateless service instance deployed on a node. + :type deployed_service_replica_query_result: + ~azure.servicefabric.models.DeployedStatelessServiceInstanceInfo + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatelessServiceInstanceInfo'}, + } + + def __init__(self, **kwargs): + super(DeployedStatelessServiceInstanceDetailInfo, self).__init__(**kwargs) + self.instance_id = kwargs.get('instance_id', None) + self.deployed_service_replica_query_result = kwargs.get('deployed_service_replica_query_result', None) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info_py3.py b/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info_py3.py new file mode 100644 index 00000000..3bbb72b6 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info_py3.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .deployed_service_replica_detail_info_py3 import DeployedServiceReplicaDetailInfo + + +class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInfo): + """Information about a stateless instance running in a code package. Note that + DeployedServiceReplicaQueryResult will contain duplicate data like + ServiceKind, ServiceName, PartitionId and InstanceId. + + All required parameters must be populated in order to send to Azure. + + :param service_name: Full hierarchical name of the service in URI format + starting with `fabric:`. + :type service_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param current_service_operation: Specifies the current active life-cycle + operation on a stateful service replica or stateless service instance. + Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', + 'Abort' + :type current_service_operation: str or + ~azure.servicefabric.models.ServiceOperationName + :param current_service_operation_start_time_utc: The start time of the + current service operation in UTC format. + :type current_service_operation_start_time_utc: datetime + :param reported_load: List of load reported by replica. + :type reported_load: + list[~azure.servicefabric.models.LoadMetricReportInfo] + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_id: Id of a stateless service instance. InstanceId is used + by Service Fabric to uniquely identify an instance of a partition of a + stateless service. It is unique within a partition and does not change for + the lifetime of the instance. If the instance has failed over on the same + or different node, it will get a different value for the InstanceId. + :type instance_id: str + :param deployed_service_replica_query_result: Information about a + stateless service instance deployed on a node. + :type deployed_service_replica_query_result: + ~azure.servicefabric.models.DeployedStatelessServiceInstanceInfo + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, + 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, + 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatelessServiceInstanceInfo'}, + } + + def __init__(self, *, service_name: str=None, partition_id: str=None, current_service_operation=None, current_service_operation_start_time_utc=None, reported_load=None, instance_id: str=None, deployed_service_replica_query_result=None, **kwargs) -> None: + super(DeployedStatelessServiceInstanceDetailInfo, self).__init__(service_name=service_name, partition_id=partition_id, current_service_operation=current_service_operation, current_service_operation_start_time_utc=current_service_operation_start_time_utc, reported_load=reported_load, **kwargs) + self.instance_id = instance_id + self.deployed_service_replica_query_result = deployed_service_replica_query_result + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/deployed_stateless_service_instance_info.py b/customSDK/servicefabric/models/deployed_stateless_service_instance_info.py new file mode 100644 index 00000000..80bf5fe6 --- /dev/null +++ b/customSDK/servicefabric/models/deployed_stateless_service_instance_info.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .deployed_service_replica_info import DeployedServiceReplicaInfo + + +class DeployedStatelessServiceInstanceInfo(DeployedServiceReplicaInfo): + """Information about a stateless service instance deployed on a node. + + All required parameters must be populated in order to send to Azure. + + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param code_package_name: The name of the code package that hosts this + replica. + :type code_package_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param address: The last address returned by the replica in Open or + ChangeRole. + :type address: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param host_process_id: Host process ID of the process that is hosting the + replica. This will be zero if the replica is down. In hyper-v containers + this host process ID will be from different kernel. + :type host_process_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_id: Id of a stateless service instance. InstanceId is used + by Service Fabric to uniquely identify an instance of a partition of a + stateless service. It is unique within a partition and does not change for + the lifetime of the instance. If the instance has failed over on the same + or different node, it will get a different value for the InstanceId. + :type instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeployedStatelessServiceInstanceInfo, self).__init__(**kwargs) + self.instance_id = kwargs.get('instance_id', None) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/deployed_stateless_service_instance_info_py3.py b/customSDK/servicefabric/models/deployed_stateless_service_instance_info_py3.py new file mode 100644 index 00000000..906c530d --- /dev/null +++ b/customSDK/servicefabric/models/deployed_stateless_service_instance_info_py3.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .deployed_service_replica_info_py3 import DeployedServiceReplicaInfo + + +class DeployedStatelessServiceInstanceInfo(DeployedServiceReplicaInfo): + """Information about a stateless service instance deployed on a node. + + All required parameters must be populated in order to send to Azure. + + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param code_package_name: The name of the code package that hosts this + replica. + :type code_package_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param address: The last address returned by the replica in Open or + ChangeRole. + :type address: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param host_process_id: Host process ID of the process that is hosting the + replica. This will be zero if the replica is down. In hyper-v containers + this host process ID will be from different kernel. + :type host_process_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_id: Id of a stateless service instance. InstanceId is used + by Service Fabric to uniquely identify an instance of a partition of a + stateless service. It is unique within a partition and does not change for + the lifetime of the instance. If the instance has failed over on the same + or different node, it will get a different value for the InstanceId. + :type instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__(self, *, service_name: str=None, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, partition_id: str=None, replica_status=None, address: str=None, service_package_activation_id: str=None, host_process_id: str=None, instance_id: str=None, **kwargs) -> None: + super(DeployedStatelessServiceInstanceInfo, self).__init__(service_name=service_name, service_type_name=service_type_name, service_manifest_name=service_manifest_name, code_package_name=code_package_name, partition_id=partition_id, replica_status=replica_status, address=address, service_package_activation_id=service_package_activation_id, host_process_id=host_process_id, **kwargs) + self.instance_id = instance_id + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/diagnostics_description.py b/customSDK/servicefabric/models/diagnostics_description.py new file mode 100644 index 00000000..8c4e0a81 --- /dev/null +++ b/customSDK/servicefabric/models/diagnostics_description.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DiagnosticsDescription(Model): + """Describes the diagnostics options available. + + :param sinks: List of supported sinks that can be referenced. + :type sinks: list[~azure.servicefabric.models.DiagnosticsSinkProperties] + :param enabled: Status of whether or not sinks are enabled. + :type enabled: bool + :param default_sink_refs: The sinks to be used if diagnostics is enabled. + Sink choices can be overridden at the service and code package level. + :type default_sink_refs: list[str] + """ + + _attribute_map = { + 'sinks': {'key': 'sinks', 'type': '[DiagnosticsSinkProperties]'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'default_sink_refs': {'key': 'defaultSinkRefs', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DiagnosticsDescription, self).__init__(**kwargs) + self.sinks = kwargs.get('sinks', None) + self.enabled = kwargs.get('enabled', None) + self.default_sink_refs = kwargs.get('default_sink_refs', None) diff --git a/customSDK/servicefabric/models/diagnostics_description_py3.py b/customSDK/servicefabric/models/diagnostics_description_py3.py new file mode 100644 index 00000000..6ff42afc --- /dev/null +++ b/customSDK/servicefabric/models/diagnostics_description_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DiagnosticsDescription(Model): + """Describes the diagnostics options available. + + :param sinks: List of supported sinks that can be referenced. + :type sinks: list[~azure.servicefabric.models.DiagnosticsSinkProperties] + :param enabled: Status of whether or not sinks are enabled. + :type enabled: bool + :param default_sink_refs: The sinks to be used if diagnostics is enabled. + Sink choices can be overridden at the service and code package level. + :type default_sink_refs: list[str] + """ + + _attribute_map = { + 'sinks': {'key': 'sinks', 'type': '[DiagnosticsSinkProperties]'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'default_sink_refs': {'key': 'defaultSinkRefs', 'type': '[str]'}, + } + + def __init__(self, *, sinks=None, enabled: bool=None, default_sink_refs=None, **kwargs) -> None: + super(DiagnosticsDescription, self).__init__(**kwargs) + self.sinks = sinks + self.enabled = enabled + self.default_sink_refs = default_sink_refs diff --git a/customSDK/servicefabric/models/diagnostics_ref.py b/customSDK/servicefabric/models/diagnostics_ref.py new file mode 100644 index 00000000..3d4c803c --- /dev/null +++ b/customSDK/servicefabric/models/diagnostics_ref.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DiagnosticsRef(Model): + """Reference to sinks in DiagnosticsDescription. + + :param enabled: Status of whether or not sinks are enabled. + :type enabled: bool + :param sink_refs: List of sinks to be used if enabled. References the list + of sinks in DiagnosticsDescription. + :type sink_refs: list[str] + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'sink_refs': {'key': 'sinkRefs', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DiagnosticsRef, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.sink_refs = kwargs.get('sink_refs', None) diff --git a/customSDK/servicefabric/models/diagnostics_ref_py3.py b/customSDK/servicefabric/models/diagnostics_ref_py3.py new file mode 100644 index 00000000..f11fbf2b --- /dev/null +++ b/customSDK/servicefabric/models/diagnostics_ref_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DiagnosticsRef(Model): + """Reference to sinks in DiagnosticsDescription. + + :param enabled: Status of whether or not sinks are enabled. + :type enabled: bool + :param sink_refs: List of sinks to be used if enabled. References the list + of sinks in DiagnosticsDescription. + :type sink_refs: list[str] + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'sink_refs': {'key': 'sinkRefs', 'type': '[str]'}, + } + + def __init__(self, *, enabled: bool=None, sink_refs=None, **kwargs) -> None: + super(DiagnosticsRef, self).__init__(**kwargs) + self.enabled = enabled + self.sink_refs = sink_refs diff --git a/customSDK/servicefabric/models/diagnostics_sink_properties.py b/customSDK/servicefabric/models/diagnostics_sink_properties.py new file mode 100644 index 00000000..63da00fe --- /dev/null +++ b/customSDK/servicefabric/models/diagnostics_sink_properties.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DiagnosticsSinkProperties(Model): + """Properties of a DiagnosticsSink. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureInternalMonitoringPipelineSinkDescription + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the sink. This value is referenced by + DiagnosticsReferenceDescription + :type name: str + :param description: A description of the sink. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AzureInternalMonitoringPipeline': 'AzureInternalMonitoringPipelineSinkDescription'} + } + + def __init__(self, **kwargs): + super(DiagnosticsSinkProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.kind = None diff --git a/customSDK/servicefabric/models/diagnostics_sink_properties_py3.py b/customSDK/servicefabric/models/diagnostics_sink_properties_py3.py new file mode 100644 index 00000000..123512a4 --- /dev/null +++ b/customSDK/servicefabric/models/diagnostics_sink_properties_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DiagnosticsSinkProperties(Model): + """Properties of a DiagnosticsSink. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureInternalMonitoringPipelineSinkDescription + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the sink. This value is referenced by + DiagnosticsReferenceDescription + :type name: str + :param description: A description of the sink. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AzureInternalMonitoringPipeline': 'AzureInternalMonitoringPipelineSinkDescription'} + } + + def __init__(self, *, name: str=None, description: str=None, **kwargs) -> None: + super(DiagnosticsSinkProperties, self).__init__(**kwargs) + self.name = name + self.description = description + self.kind = None diff --git a/customSDK/servicefabric/models/disable_backup_description.py b/customSDK/servicefabric/models/disable_backup_description.py new file mode 100644 index 00000000..3834793e --- /dev/null +++ b/customSDK/servicefabric/models/disable_backup_description.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DisableBackupDescription(Model): + """It describes the body parameters while disabling backup of a backup + entity(Application/Service/Partition). + + All required parameters must be populated in order to send to Azure. + + :param clean_backup: Required. Boolean flag to delete backups. It can be + set to true for deleting all the backups which were created for the backup + entity that is getting disabled for backup. + :type clean_backup: bool + """ + + _validation = { + 'clean_backup': {'required': True}, + } + + _attribute_map = { + 'clean_backup': {'key': 'CleanBackup', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(DisableBackupDescription, self).__init__(**kwargs) + self.clean_backup = kwargs.get('clean_backup', None) diff --git a/customSDK/servicefabric/models/disable_backup_description_py3.py b/customSDK/servicefabric/models/disable_backup_description_py3.py new file mode 100644 index 00000000..ad03ecd7 --- /dev/null +++ b/customSDK/servicefabric/models/disable_backup_description_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DisableBackupDescription(Model): + """It describes the body parameters while disabling backup of a backup + entity(Application/Service/Partition). + + All required parameters must be populated in order to send to Azure. + + :param clean_backup: Required. Boolean flag to delete backups. It can be + set to true for deleting all the backups which were created for the backup + entity that is getting disabled for backup. + :type clean_backup: bool + """ + + _validation = { + 'clean_backup': {'required': True}, + } + + _attribute_map = { + 'clean_backup': {'key': 'CleanBackup', 'type': 'bool'}, + } + + def __init__(self, *, clean_backup: bool, **kwargs) -> None: + super(DisableBackupDescription, self).__init__(**kwargs) + self.clean_backup = clean_backup diff --git a/customSDK/servicefabric/models/disk_info.py b/customSDK/servicefabric/models/disk_info.py new file mode 100644 index 00000000..2486a4cd --- /dev/null +++ b/customSDK/servicefabric/models/disk_info.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DiskInfo(Model): + """Information about the disk. + + :param capacity: the disk size in bytes + :type capacity: str + :param available_space: the available disk space in bytes + :type available_space: str + """ + + _attribute_map = { + 'capacity': {'key': 'Capacity', 'type': 'str'}, + 'available_space': {'key': 'AvailableSpace', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DiskInfo, self).__init__(**kwargs) + self.capacity = kwargs.get('capacity', None) + self.available_space = kwargs.get('available_space', None) diff --git a/customSDK/servicefabric/models/disk_info_py3.py b/customSDK/servicefabric/models/disk_info_py3.py new file mode 100644 index 00000000..6af696a2 --- /dev/null +++ b/customSDK/servicefabric/models/disk_info_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DiskInfo(Model): + """Information about the disk. + + :param capacity: the disk size in bytes + :type capacity: str + :param available_space: the available disk space in bytes + :type available_space: str + """ + + _attribute_map = { + 'capacity': {'key': 'Capacity', 'type': 'str'}, + 'available_space': {'key': 'AvailableSpace', 'type': 'str'}, + } + + def __init__(self, *, capacity: str=None, available_space: str=None, **kwargs) -> None: + super(DiskInfo, self).__init__(**kwargs) + self.capacity = capacity + self.available_space = available_space diff --git a/customSDK/servicefabric/models/double_property_value.py b/customSDK/servicefabric/models/double_property_value.py new file mode 100644 index 00000000..4643e922 --- /dev/null +++ b/customSDK/servicefabric/models/double_property_value.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_value import PropertyValue + + +class DoublePropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Double. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. The data of the property value. + :type data: float + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(DoublePropertyValue, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.kind = 'Double' diff --git a/customSDK/servicefabric/models/double_property_value_py3.py b/customSDK/servicefabric/models/double_property_value_py3.py new file mode 100644 index 00000000..2b0f6f01 --- /dev/null +++ b/customSDK/servicefabric/models/double_property_value_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_value_py3 import PropertyValue + + +class DoublePropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Double. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. The data of the property value. + :type data: float + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'float'}, + } + + def __init__(self, *, data: float, **kwargs) -> None: + super(DoublePropertyValue, self).__init__(**kwargs) + self.data = data + self.kind = 'Double' diff --git a/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description.py b/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description.py new file mode 100644 index 00000000..a9745259 --- /dev/null +++ b/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_storage_description import BackupStorageDescription + + +class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Dsms Azure blob store used for storing and + enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param storage_credentials_source_location: Required. The source location + of the storage credentials to connect to the Dsms Azure blob store. + :type storage_credentials_source_location: str + :param container_name: Required. The name of the container in the blob + store to store and enumerate backups from. + :type container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'storage_credentials_source_location': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'storage_credentials_source_location': {'key': 'StorageCredentialsSourceLocation', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DsmsAzureBlobBackupStorageDescription, self).__init__(**kwargs) + self.storage_credentials_source_location = kwargs.get('storage_credentials_source_location', None) + self.container_name = kwargs.get('container_name', None) + self.storage_kind = 'DsmsAzureBlobStore' diff --git a/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description_py3.py b/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description_py3.py new file mode 100644 index 00000000..8419de8a --- /dev/null +++ b/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_storage_description_py3 import BackupStorageDescription + + +class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Dsms Azure blob store used for storing and + enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param storage_credentials_source_location: Required. The source location + of the storage credentials to connect to the Dsms Azure blob store. + :type storage_credentials_source_location: str + :param container_name: Required. The name of the container in the blob + store to store and enumerate backups from. + :type container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'storage_credentials_source_location': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'storage_credentials_source_location': {'key': 'StorageCredentialsSourceLocation', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, *, storage_credentials_source_location: str, container_name: str, friendly_name: str=None, **kwargs) -> None: + super(DsmsAzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) + self.storage_credentials_source_location = storage_credentials_source_location + self.container_name = container_name + self.storage_kind = 'DsmsAzureBlobStore' diff --git a/customSDK/servicefabric/models/enable_backup_description.py b/customSDK/servicefabric/models/enable_backup_description.py new file mode 100644 index 00000000..a9439c8a --- /dev/null +++ b/customSDK/servicefabric/models/enable_backup_description.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EnableBackupDescription(Model): + """Specifies the parameters needed to enable periodic backup. + + All required parameters must be populated in order to send to Azure. + + :param backup_policy_name: Required. Name of the backup policy to be used + for enabling periodic backups. + :type backup_policy_name: str + """ + + _validation = { + 'backup_policy_name': {'required': True}, + } + + _attribute_map = { + 'backup_policy_name': {'key': 'BackupPolicyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnableBackupDescription, self).__init__(**kwargs) + self.backup_policy_name = kwargs.get('backup_policy_name', None) diff --git a/customSDK/servicefabric/models/enable_backup_description_py3.py b/customSDK/servicefabric/models/enable_backup_description_py3.py new file mode 100644 index 00000000..45183529 --- /dev/null +++ b/customSDK/servicefabric/models/enable_backup_description_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EnableBackupDescription(Model): + """Specifies the parameters needed to enable periodic backup. + + All required parameters must be populated in order to send to Azure. + + :param backup_policy_name: Required. Name of the backup policy to be used + for enabling periodic backups. + :type backup_policy_name: str + """ + + _validation = { + 'backup_policy_name': {'required': True}, + } + + _attribute_map = { + 'backup_policy_name': {'key': 'BackupPolicyName', 'type': 'str'}, + } + + def __init__(self, *, backup_policy_name: str, **kwargs) -> None: + super(EnableBackupDescription, self).__init__(**kwargs) + self.backup_policy_name = backup_policy_name diff --git a/customSDK/servicefabric/models/endpoint_properties.py b/customSDK/servicefabric/models/endpoint_properties.py new file mode 100644 index 00000000..fe53d35e --- /dev/null +++ b/customSDK/servicefabric/models/endpoint_properties.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EndpointProperties(Model): + """Describes a container endpoint. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the endpoint. + :type name: str + :param port: Port used by the container. + :type port: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(EndpointProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.port = kwargs.get('port', None) diff --git a/customSDK/servicefabric/models/endpoint_properties_py3.py b/customSDK/servicefabric/models/endpoint_properties_py3.py new file mode 100644 index 00000000..d6144250 --- /dev/null +++ b/customSDK/servicefabric/models/endpoint_properties_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EndpointProperties(Model): + """Describes a container endpoint. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the endpoint. + :type name: str + :param port: Port used by the container. + :type port: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, *, name: str, port: int=None, **kwargs) -> None: + super(EndpointProperties, self).__init__(**kwargs) + self.name = name + self.port = port diff --git a/customSDK/servicefabric/models/endpoint_ref.py b/customSDK/servicefabric/models/endpoint_ref.py new file mode 100644 index 00000000..3740b8c7 --- /dev/null +++ b/customSDK/servicefabric/models/endpoint_ref.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EndpointRef(Model): + """Describes a reference to a service endpoint. + + :param name: Name of the endpoint. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EndpointRef, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/endpoint_ref_py3.py b/customSDK/servicefabric/models/endpoint_ref_py3.py new file mode 100644 index 00000000..28999f87 --- /dev/null +++ b/customSDK/servicefabric/models/endpoint_ref_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EndpointRef(Model): + """Describes a reference to a service endpoint. + + :param name: Name of the endpoint. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(EndpointRef, self).__init__(**kwargs) + self.name = name diff --git a/customSDK/servicefabric/models/ensure_availability_safety_check.py b/customSDK/servicefabric/models/ensure_availability_safety_check.py new file mode 100644 index 00000000..e432ba6e --- /dev/null +++ b/customSDK/servicefabric/models/ensure_availability_safety_check.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_safety_check import PartitionSafetyCheck + + +class EnsureAvailabilitySafetyCheck(PartitionSafetyCheck): + """Safety check that waits to ensure the availability of the partition. It + waits until there are replicas available such that bringing down this + replica will not cause availability loss for the partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnsureAvailabilitySafetyCheck, self).__init__(**kwargs) + self.kind = 'EnsureAvailability' diff --git a/customSDK/servicefabric/models/ensure_availability_safety_check_py3.py b/customSDK/servicefabric/models/ensure_availability_safety_check_py3.py new file mode 100644 index 00000000..72de0dc6 --- /dev/null +++ b/customSDK/servicefabric/models/ensure_availability_safety_check_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_safety_check_py3 import PartitionSafetyCheck + + +class EnsureAvailabilitySafetyCheck(PartitionSafetyCheck): + """Safety check that waits to ensure the availability of the partition. It + waits until there are replicas available such that bringing down this + replica will not cause availability loss for the partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, partition_id: str=None, **kwargs) -> None: + super(EnsureAvailabilitySafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'EnsureAvailability' diff --git a/customSDK/servicefabric/models/ensure_partition_quorum_safety_check.py b/customSDK/servicefabric/models/ensure_partition_quorum_safety_check.py new file mode 100644 index 00000000..7315ac2f --- /dev/null +++ b/customSDK/servicefabric/models/ensure_partition_quorum_safety_check.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_safety_check import PartitionSafetyCheck + + +class EnsurePartitionQuorumSafetyCheck(PartitionSafetyCheck): + """Safety check that ensures that a quorum of replicas are not lost for a + partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnsurePartitionQuorumSafetyCheck, self).__init__(**kwargs) + self.kind = 'EnsurePartitionQuorum' diff --git a/customSDK/servicefabric/models/ensure_partition_quorum_safety_check_py3.py b/customSDK/servicefabric/models/ensure_partition_quorum_safety_check_py3.py new file mode 100644 index 00000000..532d5e88 --- /dev/null +++ b/customSDK/servicefabric/models/ensure_partition_quorum_safety_check_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_safety_check_py3 import PartitionSafetyCheck + + +class EnsurePartitionQuorumSafetyCheck(PartitionSafetyCheck): + """Safety check that ensures that a quorum of replicas are not lost for a + partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, partition_id: str=None, **kwargs) -> None: + super(EnsurePartitionQuorumSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'EnsurePartitionQuorum' diff --git a/customSDK/servicefabric/models/entity_health.py b/customSDK/servicefabric/models/entity_health.py new file mode 100644 index 00000000..dc944ccd --- /dev/null +++ b/customSDK/servicefabric/models/entity_health.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityHealth(Model): + """Health information common to all entities in the cluster. It contains the + aggregated health state, health events and unhealthy evaluation. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + } + + def __init__(self, **kwargs): + super(EntityHealth, self).__init__(**kwargs) + self.aggregated_health_state = kwargs.get('aggregated_health_state', None) + self.health_events = kwargs.get('health_events', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.health_statistics = kwargs.get('health_statistics', None) diff --git a/customSDK/servicefabric/models/entity_health_py3.py b/customSDK/servicefabric/models/entity_health_py3.py new file mode 100644 index 00000000..a253cd8b --- /dev/null +++ b/customSDK/servicefabric/models/entity_health_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityHealth(Model): + """Health information common to all entities in the cluster. It contains the + aggregated health state, health events and unhealthy evaluation. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, **kwargs) -> None: + super(EntityHealth, self).__init__(**kwargs) + self.aggregated_health_state = aggregated_health_state + self.health_events = health_events + self.unhealthy_evaluations = unhealthy_evaluations + self.health_statistics = health_statistics diff --git a/customSDK/servicefabric/models/entity_health_state.py b/customSDK/servicefabric/models/entity_health_state.py new file mode 100644 index 00000000..521a7b96 --- /dev/null +++ b/customSDK/servicefabric/models/entity_health_state.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityHealthState(Model): + """A base type for the health state of various entities in the cluster. It + contains the aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EntityHealthState, self).__init__(**kwargs) + self.aggregated_health_state = kwargs.get('aggregated_health_state', None) diff --git a/customSDK/servicefabric/models/entity_health_state_chunk.py b/customSDK/servicefabric/models/entity_health_state_chunk.py new file mode 100644 index 00000000..bf6fcd7f --- /dev/null +++ b/customSDK/servicefabric/models/entity_health_state_chunk.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityHealthStateChunk(Model): + """A base type for the health state chunk of various entities in the cluster. + It contains the aggregated health state. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EntityHealthStateChunk, self).__init__(**kwargs) + self.health_state = kwargs.get('health_state', None) diff --git a/customSDK/servicefabric/models/entity_health_state_chunk_list.py b/customSDK/servicefabric/models/entity_health_state_chunk_list.py new file mode 100644 index 00000000..963811d6 --- /dev/null +++ b/customSDK/servicefabric/models/entity_health_state_chunk_list.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityHealthStateChunkList(Model): + """A base type for the list of health state chunks found in the cluster. It + contains the total number of health states that match the input filters. + + :param total_count: Total number of entity health state objects that match + the specified filters from the cluster health chunk query description. + :type total_count: long + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(EntityHealthStateChunkList, self).__init__(**kwargs) + self.total_count = kwargs.get('total_count', None) diff --git a/customSDK/servicefabric/models/entity_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/entity_health_state_chunk_list_py3.py new file mode 100644 index 00000000..3cdaa76f --- /dev/null +++ b/customSDK/servicefabric/models/entity_health_state_chunk_list_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityHealthStateChunkList(Model): + """A base type for the list of health state chunks found in the cluster. It + contains the total number of health states that match the input filters. + + :param total_count: Total number of entity health state objects that match + the specified filters from the cluster health chunk query description. + :type total_count: long + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + } + + def __init__(self, *, total_count: int=None, **kwargs) -> None: + super(EntityHealthStateChunkList, self).__init__(**kwargs) + self.total_count = total_count diff --git a/customSDK/servicefabric/models/entity_health_state_chunk_py3.py b/customSDK/servicefabric/models/entity_health_state_chunk_py3.py new file mode 100644 index 00000000..f0b5c39d --- /dev/null +++ b/customSDK/servicefabric/models/entity_health_state_chunk_py3.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityHealthStateChunk(Model): + """A base type for the health state chunk of various entities in the cluster. + It contains the aggregated health state. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + } + + def __init__(self, *, health_state=None, **kwargs) -> None: + super(EntityHealthStateChunk, self).__init__(**kwargs) + self.health_state = health_state diff --git a/customSDK/servicefabric/models/entity_health_state_py3.py b/customSDK/servicefabric/models/entity_health_state_py3.py new file mode 100644 index 00000000..0dcce956 --- /dev/null +++ b/customSDK/servicefabric/models/entity_health_state_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityHealthState(Model): + """A base type for the health state of various entities in the cluster. It + contains the aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, **kwargs) -> None: + super(EntityHealthState, self).__init__(**kwargs) + self.aggregated_health_state = aggregated_health_state diff --git a/customSDK/servicefabric/models/entity_kind_health_state_count.py b/customSDK/servicefabric/models/entity_kind_health_state_count.py new file mode 100644 index 00000000..bec50a6a --- /dev/null +++ b/customSDK/servicefabric/models/entity_kind_health_state_count.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityKindHealthStateCount(Model): + """Represents health state count for entities of the specified entity kind. + + :param entity_kind: The entity kind for which health states are evaluated. + Possible values include: 'Invalid', 'Node', 'Partition', 'Service', + 'Application', 'Replica', 'DeployedApplication', 'DeployedServicePackage', + 'Cluster' + :type entity_kind: str or ~azure.servicefabric.models.EntityKind + :param health_state_count: The health state count for the entities of the + specified kind. + :type health_state_count: ~azure.servicefabric.models.HealthStateCount + """ + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'health_state_count': {'key': 'HealthStateCount', 'type': 'HealthStateCount'}, + } + + def __init__(self, **kwargs): + super(EntityKindHealthStateCount, self).__init__(**kwargs) + self.entity_kind = kwargs.get('entity_kind', None) + self.health_state_count = kwargs.get('health_state_count', None) diff --git a/customSDK/servicefabric/models/entity_kind_health_state_count_py3.py b/customSDK/servicefabric/models/entity_kind_health_state_count_py3.py new file mode 100644 index 00000000..a7ff9371 --- /dev/null +++ b/customSDK/servicefabric/models/entity_kind_health_state_count_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EntityKindHealthStateCount(Model): + """Represents health state count for entities of the specified entity kind. + + :param entity_kind: The entity kind for which health states are evaluated. + Possible values include: 'Invalid', 'Node', 'Partition', 'Service', + 'Application', 'Replica', 'DeployedApplication', 'DeployedServicePackage', + 'Cluster' + :type entity_kind: str or ~azure.servicefabric.models.EntityKind + :param health_state_count: The health state count for the entities of the + specified kind. + :type health_state_count: ~azure.servicefabric.models.HealthStateCount + """ + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'health_state_count': {'key': 'HealthStateCount', 'type': 'HealthStateCount'}, + } + + def __init__(self, *, entity_kind=None, health_state_count=None, **kwargs) -> None: + super(EntityKindHealthStateCount, self).__init__(**kwargs) + self.entity_kind = entity_kind + self.health_state_count = health_state_count diff --git a/customSDK/servicefabric/models/environment_variable.py b/customSDK/servicefabric/models/environment_variable.py new file mode 100644 index 00000000..7993e54f --- /dev/null +++ b/customSDK/servicefabric/models/environment_variable.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EnvironmentVariable(Model): + """Describes an environment variable for the container. + + :param type: The type of the environment variable being given in value. + Possible values include: 'ClearText', 'KeyVaultReference', + 'SecretValueReference'. Default value: "ClearText" . + :type type: str or ~azure.servicefabric.models.EnvironmentVariableType + :param name: The name of the environment variable. + :type name: str + :param value: The value of the environment variable, will be processed + based on the type provided. + :type value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnvironmentVariable, self).__init__(**kwargs) + self.type = kwargs.get('type', "ClearText") + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/environment_variable_py3.py b/customSDK/servicefabric/models/environment_variable_py3.py new file mode 100644 index 00000000..f0515a9f --- /dev/null +++ b/customSDK/servicefabric/models/environment_variable_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EnvironmentVariable(Model): + """Describes an environment variable for the container. + + :param type: The type of the environment variable being given in value. + Possible values include: 'ClearText', 'KeyVaultReference', + 'SecretValueReference'. Default value: "ClearText" . + :type type: str or ~azure.servicefabric.models.EnvironmentVariableType + :param name: The name of the environment variable. + :type name: str + :param value: The value of the environment variable, will be processed + based on the type provided. + :type value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, type="ClearText", name: str=None, value: str=None, **kwargs) -> None: + super(EnvironmentVariable, self).__init__(**kwargs) + self.type = type + self.name = name + self.value = value diff --git a/customSDK/servicefabric/models/epoch.py b/customSDK/servicefabric/models/epoch.py new file mode 100644 index 00000000..951ff5c5 --- /dev/null +++ b/customSDK/servicefabric/models/epoch.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Epoch(Model): + """An Epoch is a configuration number for the partition as a whole. When the + configuration of the replica set changes, for example when the Primary + replica changes, the operations that are replicated from the new Primary + replica are said to be a new Epoch from the ones which were sent by the old + Primary replica. + + :param configuration_version: The current configuration number of this + Epoch. The configuration number is an increasing value that is updated + whenever the configuration of this replica set changes. + :type configuration_version: str + :param data_loss_version: The current data loss number of this Epoch. The + data loss number property is an increasing value which is updated whenever + data loss is suspected, as when loss of a quorum of replicas in the + replica set that includes the Primary replica. + :type data_loss_version: str + """ + + _attribute_map = { + 'configuration_version': {'key': 'ConfigurationVersion', 'type': 'str'}, + 'data_loss_version': {'key': 'DataLossVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Epoch, self).__init__(**kwargs) + self.configuration_version = kwargs.get('configuration_version', None) + self.data_loss_version = kwargs.get('data_loss_version', None) diff --git a/customSDK/servicefabric/models/epoch_py3.py b/customSDK/servicefabric/models/epoch_py3.py new file mode 100644 index 00000000..2d9ef95f --- /dev/null +++ b/customSDK/servicefabric/models/epoch_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Epoch(Model): + """An Epoch is a configuration number for the partition as a whole. When the + configuration of the replica set changes, for example when the Primary + replica changes, the operations that are replicated from the new Primary + replica are said to be a new Epoch from the ones which were sent by the old + Primary replica. + + :param configuration_version: The current configuration number of this + Epoch. The configuration number is an increasing value that is updated + whenever the configuration of this replica set changes. + :type configuration_version: str + :param data_loss_version: The current data loss number of this Epoch. The + data loss number property is an increasing value which is updated whenever + data loss is suspected, as when loss of a quorum of replicas in the + replica set that includes the Primary replica. + :type data_loss_version: str + """ + + _attribute_map = { + 'configuration_version': {'key': 'ConfigurationVersion', 'type': 'str'}, + 'data_loss_version': {'key': 'DataLossVersion', 'type': 'str'}, + } + + def __init__(self, *, configuration_version: str=None, data_loss_version: str=None, **kwargs) -> None: + super(Epoch, self).__init__(**kwargs) + self.configuration_version = configuration_version + self.data_loss_version = data_loss_version diff --git a/customSDK/servicefabric/models/event_health_evaluation.py b/customSDK/servicefabric/models/event_health_evaluation.py new file mode 100644 index 00000000..00debb2f --- /dev/null +++ b/customSDK/servicefabric/models/event_health_evaluation.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class EventHealthEvaluation(HealthEvaluation): + """Represents health evaluation of a HealthEvent that was reported on the + entity. + The health evaluation is returned when evaluating health of an entity + results in Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param consider_warning_as_error: Indicates whether warnings are treated + with the same severity as errors. The field is specified in the health + policy used to evaluate the entity. + :type consider_warning_as_error: bool + :param unhealthy_event: Represents health information reported on a health + entity, such as cluster, application or node, with additional metadata + added by the Health Manager. + :type unhealthy_event: ~azure.servicefabric.models.HealthEvent + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'unhealthy_event': {'key': 'UnhealthyEvent', 'type': 'HealthEvent'}, + } + + def __init__(self, **kwargs): + super(EventHealthEvaluation, self).__init__(**kwargs) + self.consider_warning_as_error = kwargs.get('consider_warning_as_error', None) + self.unhealthy_event = kwargs.get('unhealthy_event', None) + self.kind = 'Event' diff --git a/customSDK/servicefabric/models/event_health_evaluation_py3.py b/customSDK/servicefabric/models/event_health_evaluation_py3.py new file mode 100644 index 00000000..5198e6a0 --- /dev/null +++ b/customSDK/servicefabric/models/event_health_evaluation_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class EventHealthEvaluation(HealthEvaluation): + """Represents health evaluation of a HealthEvent that was reported on the + entity. + The health evaluation is returned when evaluating health of an entity + results in Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param consider_warning_as_error: Indicates whether warnings are treated + with the same severity as errors. The field is specified in the health + policy used to evaluate the entity. + :type consider_warning_as_error: bool + :param unhealthy_event: Represents health information reported on a health + entity, such as cluster, application or node, with additional metadata + added by the Health Manager. + :type unhealthy_event: ~azure.servicefabric.models.HealthEvent + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, + 'unhealthy_event': {'key': 'UnhealthyEvent', 'type': 'HealthEvent'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, consider_warning_as_error: bool=None, unhealthy_event=None, **kwargs) -> None: + super(EventHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.consider_warning_as_error = consider_warning_as_error + self.unhealthy_event = unhealthy_event + self.kind = 'Event' diff --git a/customSDK/servicefabric/models/executing_faults_chaos_event.py b/customSDK/servicefabric/models/executing_faults_chaos_event.py new file mode 100644 index 00000000..501f1453 --- /dev/null +++ b/customSDK/servicefabric/models/executing_faults_chaos_event.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .chaos_event import ChaosEvent + + +class ExecutingFaultsChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos has decided on the + faults for an iteration. This Chaos event contains the details of the + faults as a list of strings. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param faults: List of string description of the faults that Chaos decided + to execute in an iteration. + :type faults: list[str] + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'faults': {'key': 'Faults', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ExecutingFaultsChaosEvent, self).__init__(**kwargs) + self.faults = kwargs.get('faults', None) + self.kind = 'ExecutingFaults' diff --git a/customSDK/servicefabric/models/executing_faults_chaos_event_py3.py b/customSDK/servicefabric/models/executing_faults_chaos_event_py3.py new file mode 100644 index 00000000..12947de1 --- /dev/null +++ b/customSDK/servicefabric/models/executing_faults_chaos_event_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .chaos_event_py3 import ChaosEvent + + +class ExecutingFaultsChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos has decided on the + faults for an iteration. This Chaos event contains the details of the + faults as a list of strings. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param faults: List of string description of the faults that Chaos decided + to execute in an iteration. + :type faults: list[str] + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'faults': {'key': 'Faults', 'type': '[str]'}, + } + + def __init__(self, *, time_stamp_utc, faults=None, **kwargs) -> None: + super(ExecutingFaultsChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.faults = faults + self.kind = 'ExecutingFaults' diff --git a/customSDK/servicefabric/models/execution_policy.py b/customSDK/servicefabric/models/execution_policy.py new file mode 100644 index 00000000..d03ba119 --- /dev/null +++ b/customSDK/servicefabric/models/execution_policy.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ExecutionPolicy(Model): + """The execution policy of the service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DefaultExecutionPolicy, RunToCompletionExecutionPolicy + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Default': 'DefaultExecutionPolicy', 'RunToCompletion': 'RunToCompletionExecutionPolicy'} + } + + def __init__(self, **kwargs): + super(ExecutionPolicy, self).__init__(**kwargs) + self.type = None diff --git a/customSDK/servicefabric/models/execution_policy_py3.py b/customSDK/servicefabric/models/execution_policy_py3.py new file mode 100644 index 00000000..8dcdcf25 --- /dev/null +++ b/customSDK/servicefabric/models/execution_policy_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ExecutionPolicy(Model): + """The execution policy of the service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DefaultExecutionPolicy, RunToCompletionExecutionPolicy + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Default': 'DefaultExecutionPolicy', 'RunToCompletion': 'RunToCompletionExecutionPolicy'} + } + + def __init__(self, **kwargs) -> None: + super(ExecutionPolicy, self).__init__(**kwargs) + self.type = None diff --git a/customSDK/servicefabric/models/external_store_provision_application_type_description.py b/customSDK/servicefabric/models/external_store_provision_application_type_description.py new file mode 100644 index 00000000..35ac9612 --- /dev/null +++ b/customSDK/servicefabric/models/external_store_provision_application_type_description.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .provision_application_type_description_base import ProvisionApplicationTypeDescriptionBase + + +class ExternalStoreProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): + """Describes the operation to register or provision an application type using + an application package from an external store instead of a package uploaded + to the Service Fabric image store. + + All required parameters must be populated in order to send to Azure. + + :param async_property: Required. Indicates whether or not provisioning + should occur asynchronously. When set to true, the provision operation + returns when the request is accepted by the system, and the provision + operation continues without any timeout limit. The default value is false. + For large application packages, we recommend setting the value to true. + :type async_property: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_package_download_uri: Required. The path to the + '.sfpkg' application package from where the application package can be + downloaded using HTTP or HTTPS protocols. The application package can be + stored in an external store that provides GET operation to download the + file. Supported protocols are HTTP and HTTPS, and the path must allow READ + access. + :type application_package_download_uri: str + :param application_type_name: Required. The application type name + represents the name of the application type found in the application + manifest. + :type application_type_name: str + :param application_type_version: Required. The application type version + represents the version of the application type found in the application + manifest. + :type application_type_version: str + """ + + _validation = { + 'async_property': {'required': True}, + 'kind': {'required': True}, + 'application_package_download_uri': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'async_property': {'key': 'Async', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_package_download_uri': {'key': 'ApplicationPackageDownloadUri', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExternalStoreProvisionApplicationTypeDescription, self).__init__(**kwargs) + self.application_package_download_uri = kwargs.get('application_package_download_uri', None) + self.application_type_name = kwargs.get('application_type_name', None) + self.application_type_version = kwargs.get('application_type_version', None) + self.kind = 'ExternalStore' diff --git a/customSDK/servicefabric/models/external_store_provision_application_type_description_py3.py b/customSDK/servicefabric/models/external_store_provision_application_type_description_py3.py new file mode 100644 index 00000000..2573d5e4 --- /dev/null +++ b/customSDK/servicefabric/models/external_store_provision_application_type_description_py3.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .provision_application_type_description_base_py3 import ProvisionApplicationTypeDescriptionBase + + +class ExternalStoreProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): + """Describes the operation to register or provision an application type using + an application package from an external store instead of a package uploaded + to the Service Fabric image store. + + All required parameters must be populated in order to send to Azure. + + :param async_property: Required. Indicates whether or not provisioning + should occur asynchronously. When set to true, the provision operation + returns when the request is accepted by the system, and the provision + operation continues without any timeout limit. The default value is false. + For large application packages, we recommend setting the value to true. + :type async_property: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_package_download_uri: Required. The path to the + '.sfpkg' application package from where the application package can be + downloaded using HTTP or HTTPS protocols. The application package can be + stored in an external store that provides GET operation to download the + file. Supported protocols are HTTP and HTTPS, and the path must allow READ + access. + :type application_package_download_uri: str + :param application_type_name: Required. The application type name + represents the name of the application type found in the application + manifest. + :type application_type_name: str + :param application_type_version: Required. The application type version + represents the version of the application type found in the application + manifest. + :type application_type_version: str + """ + + _validation = { + 'async_property': {'required': True}, + 'kind': {'required': True}, + 'application_package_download_uri': {'required': True}, + 'application_type_name': {'required': True}, + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'async_property': {'key': 'Async', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_package_download_uri': {'key': 'ApplicationPackageDownloadUri', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + } + + def __init__(self, *, async_property: bool, application_package_download_uri: str, application_type_name: str, application_type_version: str, **kwargs) -> None: + super(ExternalStoreProvisionApplicationTypeDescription, self).__init__(async_property=async_property, **kwargs) + self.application_package_download_uri = application_package_download_uri + self.application_type_name = application_type_name + self.application_type_version = application_type_version + self.kind = 'ExternalStore' diff --git a/customSDK/servicefabric/models/fabric_code_version_info.py b/customSDK/servicefabric/models/fabric_code_version_info.py new file mode 100644 index 00000000..f0d30e30 --- /dev/null +++ b/customSDK/servicefabric/models/fabric_code_version_info.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FabricCodeVersionInfo(Model): + """Information about a Service Fabric code version. + + :param code_version: The product version of Service Fabric. + :type code_version: str + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FabricCodeVersionInfo, self).__init__(**kwargs) + self.code_version = kwargs.get('code_version', None) diff --git a/customSDK/servicefabric/models/fabric_code_version_info_py3.py b/customSDK/servicefabric/models/fabric_code_version_info_py3.py new file mode 100644 index 00000000..427f8ccd --- /dev/null +++ b/customSDK/servicefabric/models/fabric_code_version_info_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FabricCodeVersionInfo(Model): + """Information about a Service Fabric code version. + + :param code_version: The product version of Service Fabric. + :type code_version: str + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + } + + def __init__(self, *, code_version: str=None, **kwargs) -> None: + super(FabricCodeVersionInfo, self).__init__(**kwargs) + self.code_version = code_version diff --git a/customSDK/servicefabric/models/fabric_config_version_info.py b/customSDK/servicefabric/models/fabric_config_version_info.py new file mode 100644 index 00000000..d02e1a35 --- /dev/null +++ b/customSDK/servicefabric/models/fabric_config_version_info.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FabricConfigVersionInfo(Model): + """Information about a Service Fabric config version. + + :param config_version: The config version of Service Fabric. + :type config_version: str + """ + + _attribute_map = { + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FabricConfigVersionInfo, self).__init__(**kwargs) + self.config_version = kwargs.get('config_version', None) diff --git a/customSDK/servicefabric/models/fabric_config_version_info_py3.py b/customSDK/servicefabric/models/fabric_config_version_info_py3.py new file mode 100644 index 00000000..5a226d52 --- /dev/null +++ b/customSDK/servicefabric/models/fabric_config_version_info_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FabricConfigVersionInfo(Model): + """Information about a Service Fabric config version. + + :param config_version: The config version of Service Fabric. + :type config_version: str + """ + + _attribute_map = { + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + } + + def __init__(self, *, config_version: str=None, **kwargs) -> None: + super(FabricConfigVersionInfo, self).__init__(**kwargs) + self.config_version = config_version diff --git a/customSDK/servicefabric/models/fabric_error.py b/customSDK/servicefabric/models/fabric_error.py new file mode 100644 index 00000000..cd158334 --- /dev/null +++ b/customSDK/servicefabric/models/fabric_error.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class FabricError(Model): + """The REST API operations for Service Fabric return standard HTTP status + codes. This type defines the additional information returned from the + Service Fabric API operations that are not successful. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. Error object containing error code and error + message. + :type error: ~azure.servicefabric.models.FabricErrorError + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'Error', 'type': 'FabricErrorError'}, + } + + def __init__(self, **kwargs): + super(FabricError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class FabricErrorException(HttpOperationError): + """Server responsed with exception of type: 'FabricError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(FabricErrorException, self).__init__(deserialize, response, 'FabricError', *args) diff --git a/customSDK/servicefabric/models/fabric_error_error.py b/customSDK/servicefabric/models/fabric_error_error.py new file mode 100644 index 00000000..9216b6cf --- /dev/null +++ b/customSDK/servicefabric/models/fabric_error_error.py @@ -0,0 +1,193 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FabricErrorError(Model): + """Error object containing error code and error message. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Defines the fabric error codes that be returned as + part of the error object in response to Service Fabric API operations that + are not successful. Following are the error code values that can be + returned for a specific HTTP status code. + - Possible values of the error code for HTTP status code 400 (Bad Request) + - "FABRIC_E_INVALID_PARTITION_KEY" + - "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" + - "FABRIC_E_INVALID_ADDRESS" + - "FABRIC_E_APPLICATION_NOT_UPGRADING" + - "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" + - "FABRIC_E_FABRIC_NOT_UPGRADING" + - "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" + - "FABRIC_E_INVALID_CONFIGURATION" + - "FABRIC_E_INVALID_NAME_URI" + - "FABRIC_E_PATH_TOO_LONG" + - "FABRIC_E_KEY_TOO_LARGE" + - "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" + - "FABRIC_E_INVALID_ATOMIC_GROUP" + - "FABRIC_E_VALUE_EMPTY" + - "FABRIC_E_BACKUP_IS_ENABLED" + - "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" + - "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" + - "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" + - "E_INVALIDARG" + - Possible values of the error code for HTTP status code 404 (Not Found) + - "FABRIC_E_NODE_NOT_FOUND" + - "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" + - "FABRIC_E_APPLICATION_NOT_FOUND" + - "FABRIC_E_SERVICE_TYPE_NOT_FOUND" + - "FABRIC_E_SERVICE_DOES_NOT_EXIST" + - "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" + - "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" + - "FABRIC_E_PARTITION_NOT_FOUND" + - "FABRIC_E_REPLICA_DOES_NOT_EXIST" + - "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" + - "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" + - "FABRIC_E_DIRECTORY_NOT_FOUND" + - "FABRIC_E_FABRIC_VERSION_NOT_FOUND" + - "FABRIC_E_FILE_NOT_FOUND" + - "FABRIC_E_NAME_DOES_NOT_EXIST" + - "FABRIC_E_PROPERTY_DOES_NOT_EXIST" + - "FABRIC_E_ENUMERATION_COMPLETED" + - "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" + - "FABRIC_E_KEY_NOT_FOUND" + - "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" + - "FABRIC_E_BACKUP_NOT_ENABLED" + - "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" + - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" + - Possible values of the error code for HTTP status code 409 (Conflict) + - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" + - "FABRIC_E_APPLICATION_ALREADY_EXISTS" + - "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" + - "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" + - "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" + - "FABRIC_E_SERVICE_ALREADY_EXISTS" + - "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" + - "FABRIC_E_APPLICATION_TYPE_IN_USE" + - "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" + - "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" + - "FABRIC_E_FABRIC_VERSION_IN_USE" + - "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" + - "FABRIC_E_NAME_ALREADY_EXISTS" + - "FABRIC_E_NAME_NOT_EMPTY" + - "FABRIC_E_PROPERTY_CHECK_FAILED" + - "FABRIC_E_SERVICE_METADATA_MISMATCH" + - "FABRIC_E_SERVICE_TYPE_MISMATCH" + - "FABRIC_E_HEALTH_STALE_REPORT" + - "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" + - "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" + - "FABRIC_E_INSTANCE_ID_MISMATCH" + - "FABRIC_E_BACKUP_IN_PROGRESS" + - "FABRIC_E_RESTORE_IN_PROGRESS" + - "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" + - Possible values of the error code for HTTP status code 413 (Request + Entity Too Large) + - "FABRIC_E_VALUE_TOO_LARGE" + - Possible values of the error code for HTTP status code 500 (Internal + Server Error) + - "FABRIC_E_NODE_IS_UP" + - "E_FAIL" + - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" + - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" + - "FABRIC_E_VOLUME_ALREADY_EXISTS" + - "FABRIC_E_VOLUME_NOT_FOUND" + - "SerializationError" + - Possible values of the error code for HTTP status code 503 (Service + Unavailable) + - "FABRIC_E_NO_WRITE_QUORUM" + - "FABRIC_E_NOT_PRIMARY" + - "FABRIC_E_NOT_READY" + - "FABRIC_E_RECONFIGURATION_PENDING" + - "FABRIC_E_SERVICE_OFFLINE" + - "E_ABORT" + - "FABRIC_E_VALUE_TOO_LARGE" + - Possible values of the error code for HTTP status code 504 (Gateway + Timeout) + - "FABRIC_E_COMMUNICATION_ERROR" + - "FABRIC_E_OPERATION_NOT_COMPLETE" + - "FABRIC_E_TIMEOUT". Possible values include: + 'FABRIC_E_INVALID_PARTITION_KEY', + 'FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR', 'FABRIC_E_INVALID_ADDRESS', + 'FABRIC_E_APPLICATION_NOT_UPGRADING', + 'FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR', + 'FABRIC_E_FABRIC_NOT_UPGRADING', + 'FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR', + 'FABRIC_E_INVALID_CONFIGURATION', 'FABRIC_E_INVALID_NAME_URI', + 'FABRIC_E_PATH_TOO_LONG', 'FABRIC_E_KEY_TOO_LARGE', + 'FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED', + 'FABRIC_E_INVALID_ATOMIC_GROUP', 'FABRIC_E_VALUE_EMPTY', + 'FABRIC_E_NODE_NOT_FOUND', 'FABRIC_E_APPLICATION_TYPE_NOT_FOUND', + 'FABRIC_E_APPLICATION_NOT_FOUND', 'FABRIC_E_SERVICE_TYPE_NOT_FOUND', + 'FABRIC_E_SERVICE_DOES_NOT_EXIST', + 'FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND', + 'FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND', + 'FABRIC_E_PARTITION_NOT_FOUND', 'FABRIC_E_REPLICA_DOES_NOT_EXIST', + 'FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST', + 'FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND', + 'FABRIC_E_DIRECTORY_NOT_FOUND', 'FABRIC_E_FABRIC_VERSION_NOT_FOUND', + 'FABRIC_E_FILE_NOT_FOUND', 'FABRIC_E_NAME_DOES_NOT_EXIST', + 'FABRIC_E_PROPERTY_DOES_NOT_EXIST', 'FABRIC_E_ENUMERATION_COMPLETED', + 'FABRIC_E_SERVICE_MANIFEST_NOT_FOUND', 'FABRIC_E_KEY_NOT_FOUND', + 'FABRIC_E_HEALTH_ENTITY_NOT_FOUND', + 'FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS', + 'FABRIC_E_APPLICATION_ALREADY_EXISTS', + 'FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION', + 'FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS', + 'FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS', + 'FABRIC_E_SERVICE_ALREADY_EXISTS', + 'FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS', + 'FABRIC_E_APPLICATION_TYPE_IN_USE', + 'FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION', + 'FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS', + 'FABRIC_E_FABRIC_VERSION_IN_USE', 'FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS', + 'FABRIC_E_NAME_ALREADY_EXISTS', 'FABRIC_E_NAME_NOT_EMPTY', + 'FABRIC_E_PROPERTY_CHECK_FAILED', 'FABRIC_E_SERVICE_METADATA_MISMATCH', + 'FABRIC_E_SERVICE_TYPE_MISMATCH', 'FABRIC_E_HEALTH_STALE_REPORT', + 'FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED', + 'FABRIC_E_NODE_HAS_NOT_STOPPED_YET', 'FABRIC_E_INSTANCE_ID_MISMATCH', + 'FABRIC_E_VALUE_TOO_LARGE', 'FABRIC_E_NO_WRITE_QUORUM', + 'FABRIC_E_NOT_PRIMARY', 'FABRIC_E_NOT_READY', + 'FABRIC_E_RECONFIGURATION_PENDING', 'FABRIC_E_SERVICE_OFFLINE', 'E_ABORT', + 'FABRIC_E_COMMUNICATION_ERROR', 'FABRIC_E_OPERATION_NOT_COMPLETE', + 'FABRIC_E_TIMEOUT', 'FABRIC_E_NODE_IS_UP', 'E_FAIL', + 'FABRIC_E_BACKUP_IS_ENABLED', + 'FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH', + 'FABRIC_E_INVALID_FOR_STATELESS_SERVICES', 'FABRIC_E_BACKUP_NOT_ENABLED', + 'FABRIC_E_BACKUP_POLICY_NOT_EXISTING', + 'FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING', + 'FABRIC_E_BACKUP_IN_PROGRESS', 'FABRIC_E_RESTORE_IN_PROGRESS', + 'FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING', + 'FABRIC_E_INVALID_SERVICE_SCALING_POLICY', 'E_INVALIDARG', + 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS', + 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND', + 'FABRIC_E_VOLUME_ALREADY_EXISTS', 'FABRIC_E_VOLUME_NOT_FOUND', + 'SerializationError', 'FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR' + :type code: str or ~azure.servicefabric.models.FabricErrorCodes + :param message: Error message. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'Code', 'type': 'str'}, + 'message': {'key': 'Message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FabricErrorError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/customSDK/servicefabric/models/fabric_error_error_py3.py b/customSDK/servicefabric/models/fabric_error_error_py3.py new file mode 100644 index 00000000..b5024184 --- /dev/null +++ b/customSDK/servicefabric/models/fabric_error_error_py3.py @@ -0,0 +1,193 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FabricErrorError(Model): + """Error object containing error code and error message. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Defines the fabric error codes that be returned as + part of the error object in response to Service Fabric API operations that + are not successful. Following are the error code values that can be + returned for a specific HTTP status code. + - Possible values of the error code for HTTP status code 400 (Bad Request) + - "FABRIC_E_INVALID_PARTITION_KEY" + - "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" + - "FABRIC_E_INVALID_ADDRESS" + - "FABRIC_E_APPLICATION_NOT_UPGRADING" + - "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" + - "FABRIC_E_FABRIC_NOT_UPGRADING" + - "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" + - "FABRIC_E_INVALID_CONFIGURATION" + - "FABRIC_E_INVALID_NAME_URI" + - "FABRIC_E_PATH_TOO_LONG" + - "FABRIC_E_KEY_TOO_LARGE" + - "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" + - "FABRIC_E_INVALID_ATOMIC_GROUP" + - "FABRIC_E_VALUE_EMPTY" + - "FABRIC_E_BACKUP_IS_ENABLED" + - "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" + - "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" + - "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" + - "E_INVALIDARG" + - Possible values of the error code for HTTP status code 404 (Not Found) + - "FABRIC_E_NODE_NOT_FOUND" + - "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" + - "FABRIC_E_APPLICATION_NOT_FOUND" + - "FABRIC_E_SERVICE_TYPE_NOT_FOUND" + - "FABRIC_E_SERVICE_DOES_NOT_EXIST" + - "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" + - "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" + - "FABRIC_E_PARTITION_NOT_FOUND" + - "FABRIC_E_REPLICA_DOES_NOT_EXIST" + - "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" + - "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" + - "FABRIC_E_DIRECTORY_NOT_FOUND" + - "FABRIC_E_FABRIC_VERSION_NOT_FOUND" + - "FABRIC_E_FILE_NOT_FOUND" + - "FABRIC_E_NAME_DOES_NOT_EXIST" + - "FABRIC_E_PROPERTY_DOES_NOT_EXIST" + - "FABRIC_E_ENUMERATION_COMPLETED" + - "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" + - "FABRIC_E_KEY_NOT_FOUND" + - "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" + - "FABRIC_E_BACKUP_NOT_ENABLED" + - "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" + - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" + - Possible values of the error code for HTTP status code 409 (Conflict) + - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" + - "FABRIC_E_APPLICATION_ALREADY_EXISTS" + - "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" + - "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" + - "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" + - "FABRIC_E_SERVICE_ALREADY_EXISTS" + - "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" + - "FABRIC_E_APPLICATION_TYPE_IN_USE" + - "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" + - "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" + - "FABRIC_E_FABRIC_VERSION_IN_USE" + - "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" + - "FABRIC_E_NAME_ALREADY_EXISTS" + - "FABRIC_E_NAME_NOT_EMPTY" + - "FABRIC_E_PROPERTY_CHECK_FAILED" + - "FABRIC_E_SERVICE_METADATA_MISMATCH" + - "FABRIC_E_SERVICE_TYPE_MISMATCH" + - "FABRIC_E_HEALTH_STALE_REPORT" + - "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" + - "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" + - "FABRIC_E_INSTANCE_ID_MISMATCH" + - "FABRIC_E_BACKUP_IN_PROGRESS" + - "FABRIC_E_RESTORE_IN_PROGRESS" + - "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" + - Possible values of the error code for HTTP status code 413 (Request + Entity Too Large) + - "FABRIC_E_VALUE_TOO_LARGE" + - Possible values of the error code for HTTP status code 500 (Internal + Server Error) + - "FABRIC_E_NODE_IS_UP" + - "E_FAIL" + - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" + - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" + - "FABRIC_E_VOLUME_ALREADY_EXISTS" + - "FABRIC_E_VOLUME_NOT_FOUND" + - "SerializationError" + - Possible values of the error code for HTTP status code 503 (Service + Unavailable) + - "FABRIC_E_NO_WRITE_QUORUM" + - "FABRIC_E_NOT_PRIMARY" + - "FABRIC_E_NOT_READY" + - "FABRIC_E_RECONFIGURATION_PENDING" + - "FABRIC_E_SERVICE_OFFLINE" + - "E_ABORT" + - "FABRIC_E_VALUE_TOO_LARGE" + - Possible values of the error code for HTTP status code 504 (Gateway + Timeout) + - "FABRIC_E_COMMUNICATION_ERROR" + - "FABRIC_E_OPERATION_NOT_COMPLETE" + - "FABRIC_E_TIMEOUT". Possible values include: + 'FABRIC_E_INVALID_PARTITION_KEY', + 'FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR', 'FABRIC_E_INVALID_ADDRESS', + 'FABRIC_E_APPLICATION_NOT_UPGRADING', + 'FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR', + 'FABRIC_E_FABRIC_NOT_UPGRADING', + 'FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR', + 'FABRIC_E_INVALID_CONFIGURATION', 'FABRIC_E_INVALID_NAME_URI', + 'FABRIC_E_PATH_TOO_LONG', 'FABRIC_E_KEY_TOO_LARGE', + 'FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED', + 'FABRIC_E_INVALID_ATOMIC_GROUP', 'FABRIC_E_VALUE_EMPTY', + 'FABRIC_E_NODE_NOT_FOUND', 'FABRIC_E_APPLICATION_TYPE_NOT_FOUND', + 'FABRIC_E_APPLICATION_NOT_FOUND', 'FABRIC_E_SERVICE_TYPE_NOT_FOUND', + 'FABRIC_E_SERVICE_DOES_NOT_EXIST', + 'FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND', + 'FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND', + 'FABRIC_E_PARTITION_NOT_FOUND', 'FABRIC_E_REPLICA_DOES_NOT_EXIST', + 'FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST', + 'FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND', + 'FABRIC_E_DIRECTORY_NOT_FOUND', 'FABRIC_E_FABRIC_VERSION_NOT_FOUND', + 'FABRIC_E_FILE_NOT_FOUND', 'FABRIC_E_NAME_DOES_NOT_EXIST', + 'FABRIC_E_PROPERTY_DOES_NOT_EXIST', 'FABRIC_E_ENUMERATION_COMPLETED', + 'FABRIC_E_SERVICE_MANIFEST_NOT_FOUND', 'FABRIC_E_KEY_NOT_FOUND', + 'FABRIC_E_HEALTH_ENTITY_NOT_FOUND', + 'FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS', + 'FABRIC_E_APPLICATION_ALREADY_EXISTS', + 'FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION', + 'FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS', + 'FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS', + 'FABRIC_E_SERVICE_ALREADY_EXISTS', + 'FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS', + 'FABRIC_E_APPLICATION_TYPE_IN_USE', + 'FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION', + 'FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS', + 'FABRIC_E_FABRIC_VERSION_IN_USE', 'FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS', + 'FABRIC_E_NAME_ALREADY_EXISTS', 'FABRIC_E_NAME_NOT_EMPTY', + 'FABRIC_E_PROPERTY_CHECK_FAILED', 'FABRIC_E_SERVICE_METADATA_MISMATCH', + 'FABRIC_E_SERVICE_TYPE_MISMATCH', 'FABRIC_E_HEALTH_STALE_REPORT', + 'FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED', + 'FABRIC_E_NODE_HAS_NOT_STOPPED_YET', 'FABRIC_E_INSTANCE_ID_MISMATCH', + 'FABRIC_E_VALUE_TOO_LARGE', 'FABRIC_E_NO_WRITE_QUORUM', + 'FABRIC_E_NOT_PRIMARY', 'FABRIC_E_NOT_READY', + 'FABRIC_E_RECONFIGURATION_PENDING', 'FABRIC_E_SERVICE_OFFLINE', 'E_ABORT', + 'FABRIC_E_COMMUNICATION_ERROR', 'FABRIC_E_OPERATION_NOT_COMPLETE', + 'FABRIC_E_TIMEOUT', 'FABRIC_E_NODE_IS_UP', 'E_FAIL', + 'FABRIC_E_BACKUP_IS_ENABLED', + 'FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH', + 'FABRIC_E_INVALID_FOR_STATELESS_SERVICES', 'FABRIC_E_BACKUP_NOT_ENABLED', + 'FABRIC_E_BACKUP_POLICY_NOT_EXISTING', + 'FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING', + 'FABRIC_E_BACKUP_IN_PROGRESS', 'FABRIC_E_RESTORE_IN_PROGRESS', + 'FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING', + 'FABRIC_E_INVALID_SERVICE_SCALING_POLICY', 'E_INVALIDARG', + 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS', + 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND', + 'FABRIC_E_VOLUME_ALREADY_EXISTS', 'FABRIC_E_VOLUME_NOT_FOUND', + 'SerializationError', 'FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR' + :type code: str or ~azure.servicefabric.models.FabricErrorCodes + :param message: Error message. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'Code', 'type': 'str'}, + 'message': {'key': 'Message', 'type': 'str'}, + } + + def __init__(self, *, code, message: str=None, **kwargs) -> None: + super(FabricErrorError, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/customSDK/servicefabric/models/fabric_error_py3.py b/customSDK/servicefabric/models/fabric_error_py3.py new file mode 100644 index 00000000..f156cc8c --- /dev/null +++ b/customSDK/servicefabric/models/fabric_error_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class FabricError(Model): + """The REST API operations for Service Fabric return standard HTTP status + codes. This type defines the additional information returned from the + Service Fabric API operations that are not successful. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. Error object containing error code and error + message. + :type error: ~azure.servicefabric.models.FabricErrorError + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'Error', 'type': 'FabricErrorError'}, + } + + def __init__(self, *, error, **kwargs) -> None: + super(FabricError, self).__init__(**kwargs) + self.error = error + + +class FabricErrorException(HttpOperationError): + """Server responsed with exception of type: 'FabricError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(FabricErrorException, self).__init__(deserialize, response, 'FabricError', *args) diff --git a/customSDK/servicefabric/models/fabric_event.py b/customSDK/servicefabric/models/fabric_event.py new file mode 100644 index 00000000..6c15194c --- /dev/null +++ b/customSDK/servicefabric/models/fabric_event.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FabricEvent(Model): + """Represents the base for all Fabric Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationEvent, ClusterEvent, ContainerInstanceEvent, + NodeEvent, PartitionEvent, ReplicaEvent, ServiceEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ApplicationEvent': 'ApplicationEvent', 'ClusterEvent': 'ClusterEvent', 'ContainerInstanceEvent': 'ContainerInstanceEvent', 'NodeEvent': 'NodeEvent', 'PartitionEvent': 'PartitionEvent', 'ReplicaEvent': 'ReplicaEvent', 'ServiceEvent': 'ServiceEvent'} + } + + def __init__(self, **kwargs): + super(FabricEvent, self).__init__(**kwargs) + self.event_instance_id = kwargs.get('event_instance_id', None) + self.category = kwargs.get('category', None) + self.time_stamp = kwargs.get('time_stamp', None) + self.has_correlated_events = kwargs.get('has_correlated_events', None) + self.kind = None diff --git a/customSDK/servicefabric/models/fabric_event_py3.py b/customSDK/servicefabric/models/fabric_event_py3.py new file mode 100644 index 00000000..118bce42 --- /dev/null +++ b/customSDK/servicefabric/models/fabric_event_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FabricEvent(Model): + """Represents the base for all Fabric Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationEvent, ClusterEvent, ContainerInstanceEvent, + NodeEvent, PartitionEvent, ReplicaEvent, ServiceEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ApplicationEvent': 'ApplicationEvent', 'ClusterEvent': 'ClusterEvent', 'ContainerInstanceEvent': 'ContainerInstanceEvent', 'NodeEvent': 'NodeEvent', 'PartitionEvent': 'PartitionEvent', 'ReplicaEvent': 'ReplicaEvent', 'ServiceEvent': 'ServiceEvent'} + } + + def __init__(self, *, event_instance_id: str, time_stamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(FabricEvent, self).__init__(**kwargs) + self.event_instance_id = event_instance_id + self.category = category + self.time_stamp = time_stamp + self.has_correlated_events = has_correlated_events + self.kind = None diff --git a/customSDK/servicefabric/models/failed_property_batch_info.py b/customSDK/servicefabric/models/failed_property_batch_info.py new file mode 100644 index 00000000..3c021240 --- /dev/null +++ b/customSDK/servicefabric/models/failed_property_batch_info.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_batch_info import PropertyBatchInfo + + +class FailedPropertyBatchInfo(PropertyBatchInfo): + """Derived from PropertyBatchInfo. Represents the property batch failing. + Contains information about the specific batch failure. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param error_message: The error message of the failed operation. Describes + the exception thrown due to the first unsuccessful operation in the + property batch. + :type error_message: str + :param operation_index: The index of the unsuccessful operation in the + property batch. + :type operation_index: int + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'error_message': {'key': 'ErrorMessage', 'type': 'str'}, + 'operation_index': {'key': 'OperationIndex', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(FailedPropertyBatchInfo, self).__init__(**kwargs) + self.error_message = kwargs.get('error_message', None) + self.operation_index = kwargs.get('operation_index', None) + self.kind = 'Failed' diff --git a/customSDK/servicefabric/models/failed_property_batch_info_py3.py b/customSDK/servicefabric/models/failed_property_batch_info_py3.py new file mode 100644 index 00000000..cbfa0f9a --- /dev/null +++ b/customSDK/servicefabric/models/failed_property_batch_info_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_batch_info_py3 import PropertyBatchInfo + + +class FailedPropertyBatchInfo(PropertyBatchInfo): + """Derived from PropertyBatchInfo. Represents the property batch failing. + Contains information about the specific batch failure. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param error_message: The error message of the failed operation. Describes + the exception thrown due to the first unsuccessful operation in the + property batch. + :type error_message: str + :param operation_index: The index of the unsuccessful operation in the + property batch. + :type operation_index: int + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'error_message': {'key': 'ErrorMessage', 'type': 'str'}, + 'operation_index': {'key': 'OperationIndex', 'type': 'int'}, + } + + def __init__(self, *, error_message: str=None, operation_index: int=None, **kwargs) -> None: + super(FailedPropertyBatchInfo, self).__init__(**kwargs) + self.error_message = error_message + self.operation_index = operation_index + self.kind = 'Failed' diff --git a/customSDK/servicefabric/models/failed_upgrade_domain_progress_object.py b/customSDK/servicefabric/models/failed_upgrade_domain_progress_object.py new file mode 100644 index 00000000..fb44bea7 --- /dev/null +++ b/customSDK/servicefabric/models/failed_upgrade_domain_progress_object.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailedUpgradeDomainProgressObject(Model): + """The detailed upgrade progress for nodes in the current upgrade domain at + the point of failure. Not applicable to node-by-node upgrades. + + :param domain_name: The name of the upgrade domain + :type domain_name: str + :param node_upgrade_progress_list: List of upgrading nodes and their + statuses + :type node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__(self, **kwargs): + super(FailedUpgradeDomainProgressObject, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) diff --git a/customSDK/servicefabric/models/failed_upgrade_domain_progress_object_py3.py b/customSDK/servicefabric/models/failed_upgrade_domain_progress_object_py3.py new file mode 100644 index 00000000..c50353a1 --- /dev/null +++ b/customSDK/servicefabric/models/failed_upgrade_domain_progress_object_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailedUpgradeDomainProgressObject(Model): + """The detailed upgrade progress for nodes in the current upgrade domain at + the point of failure. Not applicable to node-by-node upgrades. + + :param domain_name: The name of the upgrade domain + :type domain_name: str + :param node_upgrade_progress_list: List of upgrading nodes and their + statuses + :type node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: + super(FailedUpgradeDomainProgressObject, self).__init__(**kwargs) + self.domain_name = domain_name + self.node_upgrade_progress_list = node_upgrade_progress_list diff --git a/customSDK/servicefabric/models/failure_upgrade_domain_progress_info.py b/customSDK/servicefabric/models/failure_upgrade_domain_progress_info.py new file mode 100644 index 00000000..81f565f1 --- /dev/null +++ b/customSDK/servicefabric/models/failure_upgrade_domain_progress_info.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailureUpgradeDomainProgressInfo(Model): + """Information about the upgrade domain progress at the time of upgrade + failure. + + :param domain_name: The name of the upgrade domain + :type domain_name: str + :param node_upgrade_progress_list: List of upgrading nodes and their + statuses + :type node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__(self, **kwargs): + super(FailureUpgradeDomainProgressInfo, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) diff --git a/customSDK/servicefabric/models/failure_upgrade_domain_progress_info_py3.py b/customSDK/servicefabric/models/failure_upgrade_domain_progress_info_py3.py new file mode 100644 index 00000000..1ab66718 --- /dev/null +++ b/customSDK/servicefabric/models/failure_upgrade_domain_progress_info_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FailureUpgradeDomainProgressInfo(Model): + """Information about the upgrade domain progress at the time of upgrade + failure. + + :param domain_name: The name of the upgrade domain + :type domain_name: str + :param node_upgrade_progress_list: List of upgrading nodes and their + statuses + :type node_upgrade_progress_list: + list[~azure.servicefabric.models.NodeUpgradeProgressInfo] + """ + + _attribute_map = { + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, + } + + def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: + super(FailureUpgradeDomainProgressInfo, self).__init__(**kwargs) + self.domain_name = domain_name + self.node_upgrade_progress_list = node_upgrade_progress_list diff --git a/customSDK/servicefabric/models/file_info.py b/customSDK/servicefabric/models/file_info.py new file mode 100644 index 00000000..7c3ae992 --- /dev/null +++ b/customSDK/servicefabric/models/file_info.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FileInfo(Model): + """Information about a image store file. + + :param file_size: The size of file in bytes. + :type file_size: str + :param file_version: Information about the version of image store file. + :type file_version: ~azure.servicefabric.models.FileVersion + :param modified_date: The date and time when the image store file was last + modified. + :type modified_date: datetime + :param store_relative_path: The file path relative to the image store root + path. + :type store_relative_path: str + """ + + _attribute_map = { + 'file_size': {'key': 'FileSize', 'type': 'str'}, + 'file_version': {'key': 'FileVersion', 'type': 'FileVersion'}, + 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FileInfo, self).__init__(**kwargs) + self.file_size = kwargs.get('file_size', None) + self.file_version = kwargs.get('file_version', None) + self.modified_date = kwargs.get('modified_date', None) + self.store_relative_path = kwargs.get('store_relative_path', None) diff --git a/customSDK/servicefabric/models/file_info_py3.py b/customSDK/servicefabric/models/file_info_py3.py new file mode 100644 index 00000000..1ac3bd50 --- /dev/null +++ b/customSDK/servicefabric/models/file_info_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FileInfo(Model): + """Information about a image store file. + + :param file_size: The size of file in bytes. + :type file_size: str + :param file_version: Information about the version of image store file. + :type file_version: ~azure.servicefabric.models.FileVersion + :param modified_date: The date and time when the image store file was last + modified. + :type modified_date: datetime + :param store_relative_path: The file path relative to the image store root + path. + :type store_relative_path: str + """ + + _attribute_map = { + 'file_size': {'key': 'FileSize', 'type': 'str'}, + 'file_version': {'key': 'FileVersion', 'type': 'FileVersion'}, + 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + } + + def __init__(self, *, file_size: str=None, file_version=None, modified_date=None, store_relative_path: str=None, **kwargs) -> None: + super(FileInfo, self).__init__(**kwargs) + self.file_size = file_size + self.file_version = file_version + self.modified_date = modified_date + self.store_relative_path = store_relative_path diff --git a/customSDK/servicefabric/models/file_share_backup_storage_description.py b/customSDK/servicefabric/models/file_share_backup_storage_description.py new file mode 100644 index 00000000..3c96d9bf --- /dev/null +++ b/customSDK/servicefabric/models/file_share_backup_storage_description.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_storage_description import BackupStorageDescription + + +class FileShareBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for file share storage used for storing or + enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param path: Required. UNC path of the file share where to store or + enumerate backups from. + :type path: str + :param primary_user_name: Primary user name to access the file share. + :type primary_user_name: str + :param primary_password: Primary password to access the share location. + :type primary_password: str + :param secondary_user_name: Secondary user name to access the file share. + :type secondary_user_name: str + :param secondary_password: Secondary password to access the share location + :type secondary_password: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'path': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'path': {'key': 'Path', 'type': 'str'}, + 'primary_user_name': {'key': 'PrimaryUserName', 'type': 'str'}, + 'primary_password': {'key': 'PrimaryPassword', 'type': 'str'}, + 'secondary_user_name': {'key': 'SecondaryUserName', 'type': 'str'}, + 'secondary_password': {'key': 'SecondaryPassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FileShareBackupStorageDescription, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.primary_user_name = kwargs.get('primary_user_name', None) + self.primary_password = kwargs.get('primary_password', None) + self.secondary_user_name = kwargs.get('secondary_user_name', None) + self.secondary_password = kwargs.get('secondary_password', None) + self.storage_kind = 'FileShare' diff --git a/customSDK/servicefabric/models/file_share_backup_storage_description_py3.py b/customSDK/servicefabric/models/file_share_backup_storage_description_py3.py new file mode 100644 index 00000000..ec9cc257 --- /dev/null +++ b/customSDK/servicefabric/models/file_share_backup_storage_description_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_storage_description_py3 import BackupStorageDescription + + +class FileShareBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for file share storage used for storing or + enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param path: Required. UNC path of the file share where to store or + enumerate backups from. + :type path: str + :param primary_user_name: Primary user name to access the file share. + :type primary_user_name: str + :param primary_password: Primary password to access the share location. + :type primary_password: str + :param secondary_user_name: Secondary user name to access the file share. + :type secondary_user_name: str + :param secondary_password: Secondary password to access the share location + :type secondary_password: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'path': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'path': {'key': 'Path', 'type': 'str'}, + 'primary_user_name': {'key': 'PrimaryUserName', 'type': 'str'}, + 'primary_password': {'key': 'PrimaryPassword', 'type': 'str'}, + 'secondary_user_name': {'key': 'SecondaryUserName', 'type': 'str'}, + 'secondary_password': {'key': 'SecondaryPassword', 'type': 'str'}, + } + + def __init__(self, *, path: str, friendly_name: str=None, primary_user_name: str=None, primary_password: str=None, secondary_user_name: str=None, secondary_password: str=None, **kwargs) -> None: + super(FileShareBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) + self.path = path + self.primary_user_name = primary_user_name + self.primary_password = primary_password + self.secondary_user_name = secondary_user_name + self.secondary_password = secondary_password + self.storage_kind = 'FileShare' diff --git a/customSDK/servicefabric/models/file_version.py b/customSDK/servicefabric/models/file_version.py new file mode 100644 index 00000000..c1f479ce --- /dev/null +++ b/customSDK/servicefabric/models/file_version.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FileVersion(Model): + """Information about the version of image store file. + + :param version_number: The current image store version number for the file + is used in image store for checking whether it need to be updated. + :type version_number: str + :param epoch_data_loss_number: The epoch data loss number of image store + replica when this file entry was updated or created. + :type epoch_data_loss_number: str + :param epoch_configuration_number: The epoch configuration version number + of the image store replica when this file entry was created or updated. + :type epoch_configuration_number: str + """ + + _attribute_map = { + 'version_number': {'key': 'VersionNumber', 'type': 'str'}, + 'epoch_data_loss_number': {'key': 'EpochDataLossNumber', 'type': 'str'}, + 'epoch_configuration_number': {'key': 'EpochConfigurationNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FileVersion, self).__init__(**kwargs) + self.version_number = kwargs.get('version_number', None) + self.epoch_data_loss_number = kwargs.get('epoch_data_loss_number', None) + self.epoch_configuration_number = kwargs.get('epoch_configuration_number', None) diff --git a/customSDK/servicefabric/models/file_version_py3.py b/customSDK/servicefabric/models/file_version_py3.py new file mode 100644 index 00000000..65073442 --- /dev/null +++ b/customSDK/servicefabric/models/file_version_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FileVersion(Model): + """Information about the version of image store file. + + :param version_number: The current image store version number for the file + is used in image store for checking whether it need to be updated. + :type version_number: str + :param epoch_data_loss_number: The epoch data loss number of image store + replica when this file entry was updated or created. + :type epoch_data_loss_number: str + :param epoch_configuration_number: The epoch configuration version number + of the image store replica when this file entry was created or updated. + :type epoch_configuration_number: str + """ + + _attribute_map = { + 'version_number': {'key': 'VersionNumber', 'type': 'str'}, + 'epoch_data_loss_number': {'key': 'EpochDataLossNumber', 'type': 'str'}, + 'epoch_configuration_number': {'key': 'EpochConfigurationNumber', 'type': 'str'}, + } + + def __init__(self, *, version_number: str=None, epoch_data_loss_number: str=None, epoch_configuration_number: str=None, **kwargs) -> None: + super(FileVersion, self).__init__(**kwargs) + self.version_number = version_number + self.epoch_data_loss_number = epoch_data_loss_number + self.epoch_configuration_number = epoch_configuration_number diff --git a/customSDK/servicefabric/models/folder_info.py b/customSDK/servicefabric/models/folder_info.py new file mode 100644 index 00000000..7211b281 --- /dev/null +++ b/customSDK/servicefabric/models/folder_info.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FolderInfo(Model): + """Information about a image store folder. It includes how many files this + folder contains and its image store relative path. + + :param store_relative_path: The remote location within image store. This + path is relative to the image store root. + :type store_relative_path: str + :param file_count: The number of files from within the image store folder. + :type file_count: str + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'file_count': {'key': 'FileCount', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FolderInfo, self).__init__(**kwargs) + self.store_relative_path = kwargs.get('store_relative_path', None) + self.file_count = kwargs.get('file_count', None) diff --git a/customSDK/servicefabric/models/folder_info_py3.py b/customSDK/servicefabric/models/folder_info_py3.py new file mode 100644 index 00000000..2027d91e --- /dev/null +++ b/customSDK/servicefabric/models/folder_info_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FolderInfo(Model): + """Information about a image store folder. It includes how many files this + folder contains and its image store relative path. + + :param store_relative_path: The remote location within image store. This + path is relative to the image store root. + :type store_relative_path: str + :param file_count: The number of files from within the image store folder. + :type file_count: str + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'file_count': {'key': 'FileCount', 'type': 'str'}, + } + + def __init__(self, *, store_relative_path: str=None, file_count: str=None, **kwargs) -> None: + super(FolderInfo, self).__init__(**kwargs) + self.store_relative_path = store_relative_path + self.file_count = file_count diff --git a/customSDK/servicefabric/models/folder_size_info.py b/customSDK/servicefabric/models/folder_size_info.py new file mode 100644 index 00000000..28ac4780 --- /dev/null +++ b/customSDK/servicefabric/models/folder_size_info.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FolderSizeInfo(Model): + """Information of a image store folder size. + + :param store_relative_path: The remote location within image store. This + path is relative to the image store root. + :type store_relative_path: str + :param folder_size: The size of folder in bytes. + :type folder_size: str + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'folder_size': {'key': 'FolderSize', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FolderSizeInfo, self).__init__(**kwargs) + self.store_relative_path = kwargs.get('store_relative_path', None) + self.folder_size = kwargs.get('folder_size', None) diff --git a/customSDK/servicefabric/models/folder_size_info_py3.py b/customSDK/servicefabric/models/folder_size_info_py3.py new file mode 100644 index 00000000..018dce39 --- /dev/null +++ b/customSDK/servicefabric/models/folder_size_info_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FolderSizeInfo(Model): + """Information of a image store folder size. + + :param store_relative_path: The remote location within image store. This + path is relative to the image store root. + :type store_relative_path: str + :param folder_size: The size of folder in bytes. + :type folder_size: str + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'folder_size': {'key': 'FolderSize', 'type': 'str'}, + } + + def __init__(self, *, store_relative_path: str=None, folder_size: str=None, **kwargs) -> None: + super(FolderSizeInfo, self).__init__(**kwargs) + self.store_relative_path = store_relative_path + self.folder_size = folder_size diff --git a/customSDK/servicefabric/models/frequency_based_backup_schedule_description.py b/customSDK/servicefabric/models/frequency_based_backup_schedule_description.py new file mode 100644 index 00000000..c9429cd7 --- /dev/null +++ b/customSDK/servicefabric/models/frequency_based_backup_schedule_description.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_schedule_description import BackupScheduleDescription + + +class FrequencyBasedBackupScheduleDescription(BackupScheduleDescription): + """Describes the frequency based backup schedule. + + All required parameters must be populated in order to send to Azure. + + :param schedule_kind: Required. Constant filled by server. + :type schedule_kind: str + :param interval: Required. Defines the interval with which backups are + periodically taken. It should be specified in ISO8601 format. Timespan in + seconds is not supported and will be ignored while creating the policy. + :type interval: timedelta + """ + + _validation = { + 'schedule_kind': {'required': True}, + 'interval': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + 'interval': {'key': 'Interval', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(FrequencyBasedBackupScheduleDescription, self).__init__(**kwargs) + self.interval = kwargs.get('interval', None) + self.schedule_kind = 'FrequencyBased' diff --git a/customSDK/servicefabric/models/frequency_based_backup_schedule_description_py3.py b/customSDK/servicefabric/models/frequency_based_backup_schedule_description_py3.py new file mode 100644 index 00000000..8b8e662c --- /dev/null +++ b/customSDK/servicefabric/models/frequency_based_backup_schedule_description_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_schedule_description_py3 import BackupScheduleDescription + + +class FrequencyBasedBackupScheduleDescription(BackupScheduleDescription): + """Describes the frequency based backup schedule. + + All required parameters must be populated in order to send to Azure. + + :param schedule_kind: Required. Constant filled by server. + :type schedule_kind: str + :param interval: Required. Defines the interval with which backups are + periodically taken. It should be specified in ISO8601 format. Timespan in + seconds is not supported and will be ignored while creating the policy. + :type interval: timedelta + """ + + _validation = { + 'schedule_kind': {'required': True}, + 'interval': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + 'interval': {'key': 'Interval', 'type': 'duration'}, + } + + def __init__(self, *, interval, **kwargs) -> None: + super(FrequencyBasedBackupScheduleDescription, self).__init__(**kwargs) + self.interval = interval + self.schedule_kind = 'FrequencyBased' diff --git a/customSDK/servicefabric/models/gateway_destination.py b/customSDK/servicefabric/models/gateway_destination.py new file mode 100644 index 00000000..5c216274 --- /dev/null +++ b/customSDK/servicefabric/models/gateway_destination.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GatewayDestination(Model): + """Describes destination endpoint for routing traffic. + + All required parameters must be populated in order to send to Azure. + + :param application_name: Required. Name of the service fabric Mesh + application. + :type application_name: str + :param service_name: Required. service that contains the endpoint. + :type service_name: str + :param endpoint_name: Required. name of the endpoint in the service. + :type endpoint_name: str + """ + + _validation = { + 'application_name': {'required': True}, + 'service_name': {'required': True}, + 'endpoint_name': {'required': True}, + } + + _attribute_map = { + 'application_name': {'key': 'applicationName', 'type': 'str'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GatewayDestination, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.service_name = kwargs.get('service_name', None) + self.endpoint_name = kwargs.get('endpoint_name', None) diff --git a/customSDK/servicefabric/models/gateway_destination_py3.py b/customSDK/servicefabric/models/gateway_destination_py3.py new file mode 100644 index 00000000..7819e3ec --- /dev/null +++ b/customSDK/servicefabric/models/gateway_destination_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GatewayDestination(Model): + """Describes destination endpoint for routing traffic. + + All required parameters must be populated in order to send to Azure. + + :param application_name: Required. Name of the service fabric Mesh + application. + :type application_name: str + :param service_name: Required. service that contains the endpoint. + :type service_name: str + :param endpoint_name: Required. name of the endpoint in the service. + :type endpoint_name: str + """ + + _validation = { + 'application_name': {'required': True}, + 'service_name': {'required': True}, + 'endpoint_name': {'required': True}, + } + + _attribute_map = { + 'application_name': {'key': 'applicationName', 'type': 'str'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, + } + + def __init__(self, *, application_name: str, service_name: str, endpoint_name: str, **kwargs) -> None: + super(GatewayDestination, self).__init__(**kwargs) + self.application_name = application_name + self.service_name = service_name + self.endpoint_name = endpoint_name diff --git a/customSDK/servicefabric/models/gateway_resource_description.py b/customSDK/servicefabric/models/gateway_resource_description.py new file mode 100644 index 00000000..ad9d4e3f --- /dev/null +++ b/customSDK/servicefabric/models/gateway_resource_description.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GatewayResourceDescription(Model): + """This type describes a gateway resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Gateway resource. + :type name: str + :param description: User readable description of the gateway. + :type description: str + :param source_network: Required. Network the gateway should listen on for + requests. + :type source_network: ~azure.servicefabric.models.NetworkRef + :param destination_network: Required. Network that the Application is + using. + :type destination_network: ~azure.servicefabric.models.NetworkRef + :param tcp: Configuration for tcp connectivity for this gateway. + :type tcp: list[~azure.servicefabric.models.TcpConfig] + :param http: Configuration for http connectivity for this gateway. + :type http: list[~azure.servicefabric.models.HttpConfig] + :ivar status: Status of the resource. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the gateway. + :vartype status_details: str + :ivar ip_address: IP address of the gateway. This is populated in the + response and is ignored for incoming requests. + :vartype ip_address: str + """ + + _validation = { + 'name': {'required': True}, + 'source_network': {'required': True}, + 'destination_network': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'ip_address': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'source_network': {'key': 'properties.sourceNetwork', 'type': 'NetworkRef'}, + 'destination_network': {'key': 'properties.destinationNetwork', 'type': 'NetworkRef'}, + 'tcp': {'key': 'properties.tcp', 'type': '[TcpConfig]'}, + 'http': {'key': 'properties.http', 'type': '[HttpConfig]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GatewayResourceDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.source_network = kwargs.get('source_network', None) + self.destination_network = kwargs.get('destination_network', None) + self.tcp = kwargs.get('tcp', None) + self.http = kwargs.get('http', None) + self.status = None + self.status_details = None + self.ip_address = None diff --git a/customSDK/servicefabric/models/gateway_resource_description_py3.py b/customSDK/servicefabric/models/gateway_resource_description_py3.py new file mode 100644 index 00000000..ddc77ada --- /dev/null +++ b/customSDK/servicefabric/models/gateway_resource_description_py3.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GatewayResourceDescription(Model): + """This type describes a gateway resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Gateway resource. + :type name: str + :param description: User readable description of the gateway. + :type description: str + :param source_network: Required. Network the gateway should listen on for + requests. + :type source_network: ~azure.servicefabric.models.NetworkRef + :param destination_network: Required. Network that the Application is + using. + :type destination_network: ~azure.servicefabric.models.NetworkRef + :param tcp: Configuration for tcp connectivity for this gateway. + :type tcp: list[~azure.servicefabric.models.TcpConfig] + :param http: Configuration for http connectivity for this gateway. + :type http: list[~azure.servicefabric.models.HttpConfig] + :ivar status: Status of the resource. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the gateway. + :vartype status_details: str + :ivar ip_address: IP address of the gateway. This is populated in the + response and is ignored for incoming requests. + :vartype ip_address: str + """ + + _validation = { + 'name': {'required': True}, + 'source_network': {'required': True}, + 'destination_network': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'ip_address': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'source_network': {'key': 'properties.sourceNetwork', 'type': 'NetworkRef'}, + 'destination_network': {'key': 'properties.destinationNetwork', 'type': 'NetworkRef'}, + 'tcp': {'key': 'properties.tcp', 'type': '[TcpConfig]'}, + 'http': {'key': 'properties.http', 'type': '[HttpConfig]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + } + + def __init__(self, *, name: str, source_network, destination_network, description: str=None, tcp=None, http=None, **kwargs) -> None: + super(GatewayResourceDescription, self).__init__(**kwargs) + self.name = name + self.description = description + self.source_network = source_network + self.destination_network = destination_network + self.tcp = tcp + self.http = http + self.status = None + self.status_details = None + self.ip_address = None diff --git a/customSDK/servicefabric/models/get_backup_by_storage_query_description.py b/customSDK/servicefabric/models/get_backup_by_storage_query_description.py new file mode 100644 index 00000000..5b2eb4e6 --- /dev/null +++ b/customSDK/servicefabric/models/get_backup_by_storage_query_description.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GetBackupByStorageQueryDescription(Model): + """Describes additional filters to be applied, while listing backups, and + backup storage details from where to fetch the backups. + + All required parameters must be populated in order to send to Azure. + + :param start_date_time_filter: Specifies the start date time in ISO8601 + from which to enumerate backups. If not specified, backups are enumerated + from the beginning. + :type start_date_time_filter: datetime + :param end_date_time_filter: Specifies the end date time in ISO8601 till + which to enumerate backups. If not specified, backups are enumerated till + the end. + :type end_date_time_filter: datetime + :param latest: If specified as true, gets the most recent backup (within + the specified time range) for every partition under the specified backup + entity. Default value: False . + :type latest: bool + :param storage: Required. Describes the parameters for the backup storage + from where to enumerate backups. This is optional and by default backups + are enumerated from the backup storage where this backup entity is + currently being backed up (as specified in backup policy). This parameter + is useful to be able to enumerate backups from another cluster where you + may intend to restore. + :type storage: ~azure.servicefabric.models.BackupStorageDescription + :param backup_entity: Required. Indicates the entity for which to + enumerate backups. + :type backup_entity: ~azure.servicefabric.models.BackupEntity + """ + + _validation = { + 'storage': {'required': True}, + 'backup_entity': {'required': True}, + } + + _attribute_map = { + 'start_date_time_filter': {'key': 'StartDateTimeFilter', 'type': 'iso-8601'}, + 'end_date_time_filter': {'key': 'EndDateTimeFilter', 'type': 'iso-8601'}, + 'latest': {'key': 'Latest', 'type': 'bool'}, + 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, + 'backup_entity': {'key': 'BackupEntity', 'type': 'BackupEntity'}, + } + + def __init__(self, **kwargs): + super(GetBackupByStorageQueryDescription, self).__init__(**kwargs) + self.start_date_time_filter = kwargs.get('start_date_time_filter', None) + self.end_date_time_filter = kwargs.get('end_date_time_filter', None) + self.latest = kwargs.get('latest', False) + self.storage = kwargs.get('storage', None) + self.backup_entity = kwargs.get('backup_entity', None) diff --git a/customSDK/servicefabric/models/get_backup_by_storage_query_description_py3.py b/customSDK/servicefabric/models/get_backup_by_storage_query_description_py3.py new file mode 100644 index 00000000..5ad96e0b --- /dev/null +++ b/customSDK/servicefabric/models/get_backup_by_storage_query_description_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GetBackupByStorageQueryDescription(Model): + """Describes additional filters to be applied, while listing backups, and + backup storage details from where to fetch the backups. + + All required parameters must be populated in order to send to Azure. + + :param start_date_time_filter: Specifies the start date time in ISO8601 + from which to enumerate backups. If not specified, backups are enumerated + from the beginning. + :type start_date_time_filter: datetime + :param end_date_time_filter: Specifies the end date time in ISO8601 till + which to enumerate backups. If not specified, backups are enumerated till + the end. + :type end_date_time_filter: datetime + :param latest: If specified as true, gets the most recent backup (within + the specified time range) for every partition under the specified backup + entity. Default value: False . + :type latest: bool + :param storage: Required. Describes the parameters for the backup storage + from where to enumerate backups. This is optional and by default backups + are enumerated from the backup storage where this backup entity is + currently being backed up (as specified in backup policy). This parameter + is useful to be able to enumerate backups from another cluster where you + may intend to restore. + :type storage: ~azure.servicefabric.models.BackupStorageDescription + :param backup_entity: Required. Indicates the entity for which to + enumerate backups. + :type backup_entity: ~azure.servicefabric.models.BackupEntity + """ + + _validation = { + 'storage': {'required': True}, + 'backup_entity': {'required': True}, + } + + _attribute_map = { + 'start_date_time_filter': {'key': 'StartDateTimeFilter', 'type': 'iso-8601'}, + 'end_date_time_filter': {'key': 'EndDateTimeFilter', 'type': 'iso-8601'}, + 'latest': {'key': 'Latest', 'type': 'bool'}, + 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, + 'backup_entity': {'key': 'BackupEntity', 'type': 'BackupEntity'}, + } + + def __init__(self, *, storage, backup_entity, start_date_time_filter=None, end_date_time_filter=None, latest: bool=False, **kwargs) -> None: + super(GetBackupByStorageQueryDescription, self).__init__(**kwargs) + self.start_date_time_filter = start_date_time_filter + self.end_date_time_filter = end_date_time_filter + self.latest = latest + self.storage = storage + self.backup_entity = backup_entity diff --git a/customSDK/servicefabric/models/get_property_batch_operation.py b/customSDK/servicefabric/models/get_property_batch_operation.py new file mode 100644 index 00000000..d6f7784f --- /dev/null +++ b/customSDK/servicefabric/models/get_property_batch_operation.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_batch_operation import PropertyBatchOperation + + +class GetPropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that gets the specified property if it + exists. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param include_value: Whether or not to return the property value with the + metadata. + True if values should be returned with the metadata; False to return only + property metadata. Default value: False . + :type include_value: bool + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'include_value': {'key': 'IncludeValue', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(GetPropertyBatchOperation, self).__init__(**kwargs) + self.include_value = kwargs.get('include_value', False) + self.kind = 'Get' diff --git a/customSDK/servicefabric/models/get_property_batch_operation_py3.py b/customSDK/servicefabric/models/get_property_batch_operation_py3.py new file mode 100644 index 00000000..19b781a6 --- /dev/null +++ b/customSDK/servicefabric/models/get_property_batch_operation_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_batch_operation_py3 import PropertyBatchOperation + + +class GetPropertyBatchOperation(PropertyBatchOperation): + """Represents a PropertyBatchOperation that gets the specified property if it + exists. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param include_value: Whether or not to return the property value with the + metadata. + True if values should be returned with the metadata; False to return only + property metadata. Default value: False . + :type include_value: bool + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'include_value': {'key': 'IncludeValue', 'type': 'bool'}, + } + + def __init__(self, *, property_name: str, include_value: bool=False, **kwargs) -> None: + super(GetPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.include_value = include_value + self.kind = 'Get' diff --git a/customSDK/servicefabric/models/guid_property_value.py b/customSDK/servicefabric/models/guid_property_value.py new file mode 100644 index 00000000..80b52ccf --- /dev/null +++ b/customSDK/servicefabric/models/guid_property_value.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_value import PropertyValue + + +class GuidPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Guid. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. The data of the property value. + :type data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GuidPropertyValue, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.kind = 'Guid' diff --git a/customSDK/servicefabric/models/guid_property_value_py3.py b/customSDK/servicefabric/models/guid_property_value_py3.py new file mode 100644 index 00000000..9989c331 --- /dev/null +++ b/customSDK/servicefabric/models/guid_property_value_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_value_py3 import PropertyValue + + +class GuidPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Guid. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. The data of the property value. + :type data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__(self, *, data: str, **kwargs) -> None: + super(GuidPropertyValue, self).__init__(**kwargs) + self.data = data + self.kind = 'Guid' diff --git a/customSDK/servicefabric/models/health_evaluation.py b/customSDK/servicefabric/models/health_evaluation.py new file mode 100644 index 00000000..0ce18124 --- /dev/null +++ b/customSDK/servicefabric/models/health_evaluation.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HealthEvaluation(Model): + """Represents a health evaluation which describes the data and the algorithm + used by health manager to evaluate the health of an entity. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationHealthEvaluation, ApplicationsHealthEvaluation, + ApplicationTypeApplicationsHealthEvaluation, + DeltaNodesCheckHealthEvaluation, DeployedApplicationHealthEvaluation, + DeployedApplicationsHealthEvaluation, + DeployedServicePackageHealthEvaluation, + DeployedServicePackagesHealthEvaluation, EventHealthEvaluation, + NodeHealthEvaluation, NodesHealthEvaluation, PartitionHealthEvaluation, + PartitionsHealthEvaluation, ReplicaHealthEvaluation, + ReplicasHealthEvaluation, ServiceHealthEvaluation, + ServicesHealthEvaluation, SystemApplicationHealthEvaluation, + UpgradeDomainDeltaNodesCheckHealthEvaluation, + UpgradeDomainDeployedApplicationsHealthEvaluation, + UpgradeDomainNodesHealthEvaluation, NodeTypeNodesHealthEvaluation + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Application': 'ApplicationHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainDeployedApplications': 'UpgradeDomainDeployedApplicationsHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation', 'NodeTypeNodes': 'NodeTypeNodesHealthEvaluation'} + } + + def __init__(self, **kwargs): + super(HealthEvaluation, self).__init__(**kwargs) + self.aggregated_health_state = kwargs.get('aggregated_health_state', None) + self.description = kwargs.get('description', None) + self.kind = None diff --git a/customSDK/servicefabric/models/health_evaluation_py3.py b/customSDK/servicefabric/models/health_evaluation_py3.py new file mode 100644 index 00000000..58bb5899 --- /dev/null +++ b/customSDK/servicefabric/models/health_evaluation_py3.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HealthEvaluation(Model): + """Represents a health evaluation which describes the data and the algorithm + used by health manager to evaluate the health of an entity. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationHealthEvaluation, ApplicationsHealthEvaluation, + ApplicationTypeApplicationsHealthEvaluation, + DeltaNodesCheckHealthEvaluation, DeployedApplicationHealthEvaluation, + DeployedApplicationsHealthEvaluation, + DeployedServicePackageHealthEvaluation, + DeployedServicePackagesHealthEvaluation, EventHealthEvaluation, + NodeHealthEvaluation, NodesHealthEvaluation, PartitionHealthEvaluation, + PartitionsHealthEvaluation, ReplicaHealthEvaluation, + ReplicasHealthEvaluation, ServiceHealthEvaluation, + ServicesHealthEvaluation, SystemApplicationHealthEvaluation, + UpgradeDomainDeltaNodesCheckHealthEvaluation, + UpgradeDomainDeployedApplicationsHealthEvaluation, + UpgradeDomainNodesHealthEvaluation, NodeTypeNodesHealthEvaluation + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Application': 'ApplicationHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainDeployedApplications': 'UpgradeDomainDeployedApplicationsHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation', 'NodeTypeNodes': 'NodeTypeNodesHealthEvaluation'} + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, **kwargs) -> None: + super(HealthEvaluation, self).__init__(**kwargs) + self.aggregated_health_state = aggregated_health_state + self.description = description + self.kind = None diff --git a/customSDK/servicefabric/models/health_evaluation_wrapper.py b/customSDK/servicefabric/models/health_evaluation_wrapper.py new file mode 100644 index 00000000..9bb8fabb --- /dev/null +++ b/customSDK/servicefabric/models/health_evaluation_wrapper.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HealthEvaluationWrapper(Model): + """Wrapper object for health evaluation. + + :param health_evaluation: Represents a health evaluation which describes + the data and the algorithm used by health manager to evaluate the health + of an entity. + :type health_evaluation: ~azure.servicefabric.models.HealthEvaluation + """ + + _attribute_map = { + 'health_evaluation': {'key': 'HealthEvaluation', 'type': 'HealthEvaluation'}, + } + + def __init__(self, **kwargs): + super(HealthEvaluationWrapper, self).__init__(**kwargs) + self.health_evaluation = kwargs.get('health_evaluation', None) diff --git a/customSDK/servicefabric/models/health_evaluation_wrapper_py3.py b/customSDK/servicefabric/models/health_evaluation_wrapper_py3.py new file mode 100644 index 00000000..b18ee717 --- /dev/null +++ b/customSDK/servicefabric/models/health_evaluation_wrapper_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HealthEvaluationWrapper(Model): + """Wrapper object for health evaluation. + + :param health_evaluation: Represents a health evaluation which describes + the data and the algorithm used by health manager to evaluate the health + of an entity. + :type health_evaluation: ~azure.servicefabric.models.HealthEvaluation + """ + + _attribute_map = { + 'health_evaluation': {'key': 'HealthEvaluation', 'type': 'HealthEvaluation'}, + } + + def __init__(self, *, health_evaluation=None, **kwargs) -> None: + super(HealthEvaluationWrapper, self).__init__(**kwargs) + self.health_evaluation = health_evaluation diff --git a/customSDK/servicefabric/models/health_event.py b/customSDK/servicefabric/models/health_event.py new file mode 100644 index 00000000..4575acd5 --- /dev/null +++ b/customSDK/servicefabric/models/health_event.py @@ -0,0 +1,163 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_information import HealthInformation + + +class HealthEvent(HealthInformation): + """Represents health information reported on a health entity, such as cluster, + application or node, with additional metadata added by the Health Manager. + + All required parameters must be populated in order to send to Azure. + + :param source_id: Required. The source name that identifies the + client/watchdog/system component that generated the health information. + :type source_id: str + :param property: Required. The property of the health information. An + entity can have health reports for different properties. + The property is a string and not a fixed enumeration to allow the reporter + flexibility to categorize the state condition that triggers the report. + For example, a reporter with SourceId "LocalWatchdog" can monitor the + state of the available disk on a node, + so it can report "AvailableDisk" property on that node. + The same reporter can monitor the node connectivity, so it can report a + property "Connectivity" on the same node. + In the health store, these reports are treated as separate health events + for the specified node. + Together with the SourceId, the property uniquely identifies the health + information. + :type property: str + :param health_state: Required. The health state of a Service Fabric entity + such as Cluster, Node, Application, Service, Partition, Replica etc. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param time_to_live_in_milli_seconds: The duration for which this health + report is valid. This field uses ISO8601 format for specifying the + duration. + When clients report periodically, they should send reports with higher + frequency than time to live. + If clients report on transition, they can set the time to live to + infinite. + When time to live expires, the health event that contains the health + information + is either removed from health store, if RemoveWhenExpired is true, or + evaluated at error, if RemoveWhenExpired false. + If not specified, time to live defaults to infinite value. + :type time_to_live_in_milli_seconds: timedelta + :param description: The description of the health information. It + represents free text used to add human readable information about the + report. + The maximum string length for the description is 4096 characters. + If the provided string is longer, it will be automatically truncated. + When truncated, the last characters of the description contain a marker + "[Truncated]", and total string size is 4096 characters. + The presence of the marker indicates to users that truncation occurred. + Note that when truncated, the description has less than 4096 characters + from the original string. + :type description: str + :param sequence_number: The sequence number for this health report as a + numeric string. + The report sequence number is used by the health store to detect stale + reports. + If not specified, a sequence number is auto-generated by the health client + when a report is added. + :type sequence_number: str + :param remove_when_expired: Value that indicates whether the report is + removed from health store when it expires. + If set to true, the report is removed from the health store after it + expires. + If set to false, the report is treated as an error when expired. The value + of this property is false by default. + When clients report periodically, they should set RemoveWhenExpired false + (default). + This way, if the reporter has issues (e.g. deadlock) and can't report, the + entity is evaluated at error when the health report expires. + This flags the entity as being in Error health state. + :type remove_when_expired: bool + :param health_report_id: A health report ID which identifies the health + report and can be used to find more detailed information about a specific + health event at + aka.ms/sfhealthid + :type health_report_id: str + :param is_expired: Returns true if the health event is expired, otherwise + false. + :type is_expired: bool + :param source_utc_timestamp: The date and time when the health report was + sent by the source. + :type source_utc_timestamp: datetime + :param last_modified_utc_timestamp: The date and time when the health + report was last modified by the health store. + :type last_modified_utc_timestamp: datetime + :param last_ok_transition_at: If the current health state is 'Ok', this + property returns the time at which the health report was first reported + with 'Ok'. + For periodic reporting, many reports with the same state may have been + generated. + This property returns the date and time when the first 'Ok' health report + was received. + If the current health state is 'Error' or 'Warning', returns the date and + time at which the health state was last in 'Ok', before transitioning to a + different state. + If the health state was never 'Ok', the value will be zero date-time. + :type last_ok_transition_at: datetime + :param last_warning_transition_at: If the current health state is + 'Warning', this property returns the time at which the health report was + first reported with 'Warning'. For periodic reporting, many reports with + the same state may have been generated however, this property returns only + the date and time at the first 'Warning' health report was received. + If the current health state is 'Ok' or 'Error', returns the date and time + at which the health state was last in 'Warning', before transitioning to a + different state. + If the health state was never 'Warning', the value will be zero date-time. + :type last_warning_transition_at: datetime + :param last_error_transition_at: If the current health state is 'Error', + this property returns the time at which the health report was first + reported with 'Error'. For periodic reporting, many reports with the same + state may have been generated however, this property returns only the date + and time at the first 'Error' health report was received. + If the current health state is 'Ok' or 'Warning', returns the date and + time at which the health state was last in 'Error', before transitioning + to a different state. + If the health state was never 'Error', the value will be zero date-time. + :type last_error_transition_at: datetime + """ + + _validation = { + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + } + + _attribute_map = { + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, + 'is_expired': {'key': 'IsExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, + 'last_ok_transition_at': {'key': 'LastOkTransitionAt', 'type': 'iso-8601'}, + 'last_warning_transition_at': {'key': 'LastWarningTransitionAt', 'type': 'iso-8601'}, + 'last_error_transition_at': {'key': 'LastErrorTransitionAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(HealthEvent, self).__init__(**kwargs) + self.is_expired = kwargs.get('is_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.last_modified_utc_timestamp = kwargs.get('last_modified_utc_timestamp', None) + self.last_ok_transition_at = kwargs.get('last_ok_transition_at', None) + self.last_warning_transition_at = kwargs.get('last_warning_transition_at', None) + self.last_error_transition_at = kwargs.get('last_error_transition_at', None) diff --git a/customSDK/servicefabric/models/health_event_py3.py b/customSDK/servicefabric/models/health_event_py3.py new file mode 100644 index 00000000..ed08119e --- /dev/null +++ b/customSDK/servicefabric/models/health_event_py3.py @@ -0,0 +1,163 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_information_py3 import HealthInformation + + +class HealthEvent(HealthInformation): + """Represents health information reported on a health entity, such as cluster, + application or node, with additional metadata added by the Health Manager. + + All required parameters must be populated in order to send to Azure. + + :param source_id: Required. The source name that identifies the + client/watchdog/system component that generated the health information. + :type source_id: str + :param property: Required. The property of the health information. An + entity can have health reports for different properties. + The property is a string and not a fixed enumeration to allow the reporter + flexibility to categorize the state condition that triggers the report. + For example, a reporter with SourceId "LocalWatchdog" can monitor the + state of the available disk on a node, + so it can report "AvailableDisk" property on that node. + The same reporter can monitor the node connectivity, so it can report a + property "Connectivity" on the same node. + In the health store, these reports are treated as separate health events + for the specified node. + Together with the SourceId, the property uniquely identifies the health + information. + :type property: str + :param health_state: Required. The health state of a Service Fabric entity + such as Cluster, Node, Application, Service, Partition, Replica etc. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param time_to_live_in_milli_seconds: The duration for which this health + report is valid. This field uses ISO8601 format for specifying the + duration. + When clients report periodically, they should send reports with higher + frequency than time to live. + If clients report on transition, they can set the time to live to + infinite. + When time to live expires, the health event that contains the health + information + is either removed from health store, if RemoveWhenExpired is true, or + evaluated at error, if RemoveWhenExpired false. + If not specified, time to live defaults to infinite value. + :type time_to_live_in_milli_seconds: timedelta + :param description: The description of the health information. It + represents free text used to add human readable information about the + report. + The maximum string length for the description is 4096 characters. + If the provided string is longer, it will be automatically truncated. + When truncated, the last characters of the description contain a marker + "[Truncated]", and total string size is 4096 characters. + The presence of the marker indicates to users that truncation occurred. + Note that when truncated, the description has less than 4096 characters + from the original string. + :type description: str + :param sequence_number: The sequence number for this health report as a + numeric string. + The report sequence number is used by the health store to detect stale + reports. + If not specified, a sequence number is auto-generated by the health client + when a report is added. + :type sequence_number: str + :param remove_when_expired: Value that indicates whether the report is + removed from health store when it expires. + If set to true, the report is removed from the health store after it + expires. + If set to false, the report is treated as an error when expired. The value + of this property is false by default. + When clients report periodically, they should set RemoveWhenExpired false + (default). + This way, if the reporter has issues (e.g. deadlock) and can't report, the + entity is evaluated at error when the health report expires. + This flags the entity as being in Error health state. + :type remove_when_expired: bool + :param health_report_id: A health report ID which identifies the health + report and can be used to find more detailed information about a specific + health event at + aka.ms/sfhealthid + :type health_report_id: str + :param is_expired: Returns true if the health event is expired, otherwise + false. + :type is_expired: bool + :param source_utc_timestamp: The date and time when the health report was + sent by the source. + :type source_utc_timestamp: datetime + :param last_modified_utc_timestamp: The date and time when the health + report was last modified by the health store. + :type last_modified_utc_timestamp: datetime + :param last_ok_transition_at: If the current health state is 'Ok', this + property returns the time at which the health report was first reported + with 'Ok'. + For periodic reporting, many reports with the same state may have been + generated. + This property returns the date and time when the first 'Ok' health report + was received. + If the current health state is 'Error' or 'Warning', returns the date and + time at which the health state was last in 'Ok', before transitioning to a + different state. + If the health state was never 'Ok', the value will be zero date-time. + :type last_ok_transition_at: datetime + :param last_warning_transition_at: If the current health state is + 'Warning', this property returns the time at which the health report was + first reported with 'Warning'. For periodic reporting, many reports with + the same state may have been generated however, this property returns only + the date and time at the first 'Warning' health report was received. + If the current health state is 'Ok' or 'Error', returns the date and time + at which the health state was last in 'Warning', before transitioning to a + different state. + If the health state was never 'Warning', the value will be zero date-time. + :type last_warning_transition_at: datetime + :param last_error_transition_at: If the current health state is 'Error', + this property returns the time at which the health report was first + reported with 'Error'. For periodic reporting, many reports with the same + state may have been generated however, this property returns only the date + and time at the first 'Error' health report was received. + If the current health state is 'Ok' or 'Warning', returns the date and + time at which the health state was last in 'Error', before transitioning + to a different state. + If the health state was never 'Error', the value will be zero date-time. + :type last_error_transition_at: datetime + """ + + _validation = { + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + } + + _attribute_map = { + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, + 'is_expired': {'key': 'IsExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, + 'last_ok_transition_at': {'key': 'LastOkTransitionAt', 'type': 'iso-8601'}, + 'last_warning_transition_at': {'key': 'LastWarningTransitionAt', 'type': 'iso-8601'}, + 'last_error_transition_at': {'key': 'LastErrorTransitionAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, source_id: str, property: str, health_state, time_to_live_in_milli_seconds=None, description: str=None, sequence_number: str=None, remove_when_expired: bool=None, health_report_id: str=None, is_expired: bool=None, source_utc_timestamp=None, last_modified_utc_timestamp=None, last_ok_transition_at=None, last_warning_transition_at=None, last_error_transition_at=None, **kwargs) -> None: + super(HealthEvent, self).__init__(source_id=source_id, property=property, health_state=health_state, time_to_live_in_milli_seconds=time_to_live_in_milli_seconds, description=description, sequence_number=sequence_number, remove_when_expired=remove_when_expired, health_report_id=health_report_id, **kwargs) + self.is_expired = is_expired + self.source_utc_timestamp = source_utc_timestamp + self.last_modified_utc_timestamp = last_modified_utc_timestamp + self.last_ok_transition_at = last_ok_transition_at + self.last_warning_transition_at = last_warning_transition_at + self.last_error_transition_at = last_error_transition_at diff --git a/customSDK/servicefabric/models/health_information.py b/customSDK/servicefabric/models/health_information.py new file mode 100644 index 00000000..40a71d7e --- /dev/null +++ b/customSDK/servicefabric/models/health_information.py @@ -0,0 +1,119 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HealthInformation(Model): + """Represents common health report information. It is included in all health + reports sent to health store and in all health events returned by health + queries. + + All required parameters must be populated in order to send to Azure. + + :param source_id: Required. The source name that identifies the + client/watchdog/system component that generated the health information. + :type source_id: str + :param property: Required. The property of the health information. An + entity can have health reports for different properties. + The property is a string and not a fixed enumeration to allow the reporter + flexibility to categorize the state condition that triggers the report. + For example, a reporter with SourceId "LocalWatchdog" can monitor the + state of the available disk on a node, + so it can report "AvailableDisk" property on that node. + The same reporter can monitor the node connectivity, so it can report a + property "Connectivity" on the same node. + In the health store, these reports are treated as separate health events + for the specified node. + Together with the SourceId, the property uniquely identifies the health + information. + :type property: str + :param health_state: Required. The health state of a Service Fabric entity + such as Cluster, Node, Application, Service, Partition, Replica etc. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param time_to_live_in_milli_seconds: The duration for which this health + report is valid. This field uses ISO8601 format for specifying the + duration. + When clients report periodically, they should send reports with higher + frequency than time to live. + If clients report on transition, they can set the time to live to + infinite. + When time to live expires, the health event that contains the health + information + is either removed from health store, if RemoveWhenExpired is true, or + evaluated at error, if RemoveWhenExpired false. + If not specified, time to live defaults to infinite value. + :type time_to_live_in_milli_seconds: timedelta + :param description: The description of the health information. It + represents free text used to add human readable information about the + report. + The maximum string length for the description is 4096 characters. + If the provided string is longer, it will be automatically truncated. + When truncated, the last characters of the description contain a marker + "[Truncated]", and total string size is 4096 characters. + The presence of the marker indicates to users that truncation occurred. + Note that when truncated, the description has less than 4096 characters + from the original string. + :type description: str + :param sequence_number: The sequence number for this health report as a + numeric string. + The report sequence number is used by the health store to detect stale + reports. + If not specified, a sequence number is auto-generated by the health client + when a report is added. + :type sequence_number: str + :param remove_when_expired: Value that indicates whether the report is + removed from health store when it expires. + If set to true, the report is removed from the health store after it + expires. + If set to false, the report is treated as an error when expired. The value + of this property is false by default. + When clients report periodically, they should set RemoveWhenExpired false + (default). + This way, if the reporter has issues (e.g. deadlock) and can't report, the + entity is evaluated at error when the health report expires. + This flags the entity as being in Error health state. + :type remove_when_expired: bool + :param health_report_id: A health report ID which identifies the health + report and can be used to find more detailed information about a specific + health event at + aka.ms/sfhealthid + :type health_report_id: str + """ + + _validation = { + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + } + + _attribute_map = { + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HealthInformation, self).__init__(**kwargs) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_in_milli_seconds = kwargs.get('time_to_live_in_milli_seconds', None) + self.description = kwargs.get('description', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.health_report_id = kwargs.get('health_report_id', None) diff --git a/customSDK/servicefabric/models/health_information_py3.py b/customSDK/servicefabric/models/health_information_py3.py new file mode 100644 index 00000000..cc10ee65 --- /dev/null +++ b/customSDK/servicefabric/models/health_information_py3.py @@ -0,0 +1,119 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HealthInformation(Model): + """Represents common health report information. It is included in all health + reports sent to health store and in all health events returned by health + queries. + + All required parameters must be populated in order to send to Azure. + + :param source_id: Required. The source name that identifies the + client/watchdog/system component that generated the health information. + :type source_id: str + :param property: Required. The property of the health information. An + entity can have health reports for different properties. + The property is a string and not a fixed enumeration to allow the reporter + flexibility to categorize the state condition that triggers the report. + For example, a reporter with SourceId "LocalWatchdog" can monitor the + state of the available disk on a node, + so it can report "AvailableDisk" property on that node. + The same reporter can monitor the node connectivity, so it can report a + property "Connectivity" on the same node. + In the health store, these reports are treated as separate health events + for the specified node. + Together with the SourceId, the property uniquely identifies the health + information. + :type property: str + :param health_state: Required. The health state of a Service Fabric entity + such as Cluster, Node, Application, Service, Partition, Replica etc. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param time_to_live_in_milli_seconds: The duration for which this health + report is valid. This field uses ISO8601 format for specifying the + duration. + When clients report periodically, they should send reports with higher + frequency than time to live. + If clients report on transition, they can set the time to live to + infinite. + When time to live expires, the health event that contains the health + information + is either removed from health store, if RemoveWhenExpired is true, or + evaluated at error, if RemoveWhenExpired false. + If not specified, time to live defaults to infinite value. + :type time_to_live_in_milli_seconds: timedelta + :param description: The description of the health information. It + represents free text used to add human readable information about the + report. + The maximum string length for the description is 4096 characters. + If the provided string is longer, it will be automatically truncated. + When truncated, the last characters of the description contain a marker + "[Truncated]", and total string size is 4096 characters. + The presence of the marker indicates to users that truncation occurred. + Note that when truncated, the description has less than 4096 characters + from the original string. + :type description: str + :param sequence_number: The sequence number for this health report as a + numeric string. + The report sequence number is used by the health store to detect stale + reports. + If not specified, a sequence number is auto-generated by the health client + when a report is added. + :type sequence_number: str + :param remove_when_expired: Value that indicates whether the report is + removed from health store when it expires. + If set to true, the report is removed from the health store after it + expires. + If set to false, the report is treated as an error when expired. The value + of this property is false by default. + When clients report periodically, they should set RemoveWhenExpired false + (default). + This way, if the reporter has issues (e.g. deadlock) and can't report, the + entity is evaluated at error when the health report expires. + This flags the entity as being in Error health state. + :type remove_when_expired: bool + :param health_report_id: A health report ID which identifies the health + report and can be used to find more detailed information about a specific + health event at + aka.ms/sfhealthid + :type health_report_id: str + """ + + _validation = { + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + } + + _attribute_map = { + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, + } + + def __init__(self, *, source_id: str, property: str, health_state, time_to_live_in_milli_seconds=None, description: str=None, sequence_number: str=None, remove_when_expired: bool=None, health_report_id: str=None, **kwargs) -> None: + super(HealthInformation, self).__init__(**kwargs) + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_in_milli_seconds = time_to_live_in_milli_seconds + self.description = description + self.sequence_number = sequence_number + self.remove_when_expired = remove_when_expired + self.health_report_id = health_report_id diff --git a/customSDK/servicefabric/models/health_state_count.py b/customSDK/servicefabric/models/health_state_count.py new file mode 100644 index 00000000..0a27c714 --- /dev/null +++ b/customSDK/servicefabric/models/health_state_count.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HealthStateCount(Model): + """Represents information about how many health entities are in Ok, Warning + and Error health state. + + :param ok_count: The number of health entities with aggregated health + state Ok. + :type ok_count: long + :param warning_count: The number of health entities with aggregated health + state Warning. + :type warning_count: long + :param error_count: The number of health entities with aggregated health + state Error. + :type error_count: long + """ + + _validation = { + 'ok_count': {'minimum': 0}, + 'warning_count': {'minimum': 0}, + 'error_count': {'minimum': 0}, + } + + _attribute_map = { + 'ok_count': {'key': 'OkCount', 'type': 'long'}, + 'warning_count': {'key': 'WarningCount', 'type': 'long'}, + 'error_count': {'key': 'ErrorCount', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(HealthStateCount, self).__init__(**kwargs) + self.ok_count = kwargs.get('ok_count', None) + self.warning_count = kwargs.get('warning_count', None) + self.error_count = kwargs.get('error_count', None) diff --git a/customSDK/servicefabric/models/health_state_count_py3.py b/customSDK/servicefabric/models/health_state_count_py3.py new file mode 100644 index 00000000..fbba5c1d --- /dev/null +++ b/customSDK/servicefabric/models/health_state_count_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HealthStateCount(Model): + """Represents information about how many health entities are in Ok, Warning + and Error health state. + + :param ok_count: The number of health entities with aggregated health + state Ok. + :type ok_count: long + :param warning_count: The number of health entities with aggregated health + state Warning. + :type warning_count: long + :param error_count: The number of health entities with aggregated health + state Error. + :type error_count: long + """ + + _validation = { + 'ok_count': {'minimum': 0}, + 'warning_count': {'minimum': 0}, + 'error_count': {'minimum': 0}, + } + + _attribute_map = { + 'ok_count': {'key': 'OkCount', 'type': 'long'}, + 'warning_count': {'key': 'WarningCount', 'type': 'long'}, + 'error_count': {'key': 'ErrorCount', 'type': 'long'}, + } + + def __init__(self, *, ok_count: int=None, warning_count: int=None, error_count: int=None, **kwargs) -> None: + super(HealthStateCount, self).__init__(**kwargs) + self.ok_count = ok_count + self.warning_count = warning_count + self.error_count = error_count diff --git a/customSDK/servicefabric/models/health_statistics.py b/customSDK/servicefabric/models/health_statistics.py new file mode 100644 index 00000000..2ad8d509 --- /dev/null +++ b/customSDK/servicefabric/models/health_statistics.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HealthStatistics(Model): + """The health statistics of an entity, returned as part of the health query + result when the query description is configured to include statistics. + The statistics include health state counts for all children types of the + current entity. + For example, for cluster, the health statistics include health state counts + for nodes, applications, services, partitions, replicas, deployed + applications and deployed service packages. + For partition, the health statistics include health counts for replicas. + + :param health_state_count_list: List of health state counts per entity + kind, which keeps track of how many children of the queried entity are in + Ok, Warning and Error state. + :type health_state_count_list: + list[~azure.servicefabric.models.EntityKindHealthStateCount] + """ + + _attribute_map = { + 'health_state_count_list': {'key': 'HealthStateCountList', 'type': '[EntityKindHealthStateCount]'}, + } + + def __init__(self, **kwargs): + super(HealthStatistics, self).__init__(**kwargs) + self.health_state_count_list = kwargs.get('health_state_count_list', None) diff --git a/customSDK/servicefabric/models/health_statistics_py3.py b/customSDK/servicefabric/models/health_statistics_py3.py new file mode 100644 index 00000000..5bcfd417 --- /dev/null +++ b/customSDK/servicefabric/models/health_statistics_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HealthStatistics(Model): + """The health statistics of an entity, returned as part of the health query + result when the query description is configured to include statistics. + The statistics include health state counts for all children types of the + current entity. + For example, for cluster, the health statistics include health state counts + for nodes, applications, services, partitions, replicas, deployed + applications and deployed service packages. + For partition, the health statistics include health counts for replicas. + + :param health_state_count_list: List of health state counts per entity + kind, which keeps track of how many children of the queried entity are in + Ok, Warning and Error state. + :type health_state_count_list: + list[~azure.servicefabric.models.EntityKindHealthStateCount] + """ + + _attribute_map = { + 'health_state_count_list': {'key': 'HealthStateCountList', 'type': '[EntityKindHealthStateCount]'}, + } + + def __init__(self, *, health_state_count_list=None, **kwargs) -> None: + super(HealthStatistics, self).__init__(**kwargs) + self.health_state_count_list = health_state_count_list diff --git a/customSDK/servicefabric/models/http_config.py b/customSDK/servicefabric/models/http_config.py new file mode 100644 index 00000000..d52565f3 --- /dev/null +++ b/customSDK/servicefabric/models/http_config.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpConfig(Model): + """Describes the http configuration for external connectivity for this + network. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. http gateway config name. + :type name: str + :param port: Required. Specifies the port at which the service endpoint + below needs to be exposed. + :type port: int + :param hosts: Required. description for routing. + :type hosts: list[~azure.servicefabric.models.HttpHostConfig] + """ + + _validation = { + 'name': {'required': True}, + 'port': {'required': True}, + 'hosts': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'hosts': {'key': 'hosts', 'type': '[HttpHostConfig]'}, + } + + def __init__(self, **kwargs): + super(HttpConfig, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.port = kwargs.get('port', None) + self.hosts = kwargs.get('hosts', None) diff --git a/customSDK/servicefabric/models/http_config_py3.py b/customSDK/servicefabric/models/http_config_py3.py new file mode 100644 index 00000000..3f353d16 --- /dev/null +++ b/customSDK/servicefabric/models/http_config_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpConfig(Model): + """Describes the http configuration for external connectivity for this + network. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. http gateway config name. + :type name: str + :param port: Required. Specifies the port at which the service endpoint + below needs to be exposed. + :type port: int + :param hosts: Required. description for routing. + :type hosts: list[~azure.servicefabric.models.HttpHostConfig] + """ + + _validation = { + 'name': {'required': True}, + 'port': {'required': True}, + 'hosts': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'hosts': {'key': 'hosts', 'type': '[HttpHostConfig]'}, + } + + def __init__(self, *, name: str, port: int, hosts, **kwargs) -> None: + super(HttpConfig, self).__init__(**kwargs) + self.name = name + self.port = port + self.hosts = hosts diff --git a/customSDK/servicefabric/models/http_host_config.py b/customSDK/servicefabric/models/http_host_config.py new file mode 100644 index 00000000..5901ff79 --- /dev/null +++ b/customSDK/servicefabric/models/http_host_config.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpHostConfig(Model): + """Describes the hostname properties for http routing. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. http hostname config name. + :type name: str + :param routes: Required. Route information to use for routing. Routes are + processed in the order they are specified. Specify routes that are more + specific before routes that can handle general cases. + :type routes: list[~azure.servicefabric.models.HttpRouteConfig] + """ + + _validation = { + 'name': {'required': True}, + 'routes': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'routes': {'key': 'routes', 'type': '[HttpRouteConfig]'}, + } + + def __init__(self, **kwargs): + super(HttpHostConfig, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.routes = kwargs.get('routes', None) diff --git a/customSDK/servicefabric/models/http_host_config_py3.py b/customSDK/servicefabric/models/http_host_config_py3.py new file mode 100644 index 00000000..008da9b7 --- /dev/null +++ b/customSDK/servicefabric/models/http_host_config_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpHostConfig(Model): + """Describes the hostname properties for http routing. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. http hostname config name. + :type name: str + :param routes: Required. Route information to use for routing. Routes are + processed in the order they are specified. Specify routes that are more + specific before routes that can handle general cases. + :type routes: list[~azure.servicefabric.models.HttpRouteConfig] + """ + + _validation = { + 'name': {'required': True}, + 'routes': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'routes': {'key': 'routes', 'type': '[HttpRouteConfig]'}, + } + + def __init__(self, *, name: str, routes, **kwargs) -> None: + super(HttpHostConfig, self).__init__(**kwargs) + self.name = name + self.routes = routes diff --git a/customSDK/servicefabric/models/http_route_config.py b/customSDK/servicefabric/models/http_route_config.py new file mode 100644 index 00000000..f21ddccd --- /dev/null +++ b/customSDK/servicefabric/models/http_route_config.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpRouteConfig(Model): + """Describes the hostname properties for http routing. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. http route name. + :type name: str + :param match: Required. Describes a rule for http route matching. + :type match: ~azure.servicefabric.models.HttpRouteMatchRule + :param destination: Required. Describes destination endpoint for routing + traffic. + :type destination: ~azure.servicefabric.models.GatewayDestination + """ + + _validation = { + 'name': {'required': True}, + 'match': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'match': {'key': 'match', 'type': 'HttpRouteMatchRule'}, + 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, + } + + def __init__(self, **kwargs): + super(HttpRouteConfig, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.match = kwargs.get('match', None) + self.destination = kwargs.get('destination', None) diff --git a/customSDK/servicefabric/models/http_route_config_py3.py b/customSDK/servicefabric/models/http_route_config_py3.py new file mode 100644 index 00000000..442ffb82 --- /dev/null +++ b/customSDK/servicefabric/models/http_route_config_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpRouteConfig(Model): + """Describes the hostname properties for http routing. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. http route name. + :type name: str + :param match: Required. Describes a rule for http route matching. + :type match: ~azure.servicefabric.models.HttpRouteMatchRule + :param destination: Required. Describes destination endpoint for routing + traffic. + :type destination: ~azure.servicefabric.models.GatewayDestination + """ + + _validation = { + 'name': {'required': True}, + 'match': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'match': {'key': 'match', 'type': 'HttpRouteMatchRule'}, + 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, + } + + def __init__(self, *, name: str, match, destination, **kwargs) -> None: + super(HttpRouteConfig, self).__init__(**kwargs) + self.name = name + self.match = match + self.destination = destination diff --git a/customSDK/servicefabric/models/http_route_match_header.py b/customSDK/servicefabric/models/http_route_match_header.py new file mode 100644 index 00000000..54fbdd60 --- /dev/null +++ b/customSDK/servicefabric/models/http_route_match_header.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpRouteMatchHeader(Model): + """Describes header information for http route matching. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of header to match in request. + :type name: str + :param value: Value of header to match in request. + :type value: str + :param type: how to match header value. Possible values include: 'exact' + :type type: str or ~azure.servicefabric.models.HeaderMatchType + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HttpRouteMatchHeader, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + self.type = kwargs.get('type', None) diff --git a/customSDK/servicefabric/models/http_route_match_header_py3.py b/customSDK/servicefabric/models/http_route_match_header_py3.py new file mode 100644 index 00000000..ffb10df9 --- /dev/null +++ b/customSDK/servicefabric/models/http_route_match_header_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpRouteMatchHeader(Model): + """Describes header information for http route matching. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of header to match in request. + :type name: str + :param value: Value of header to match in request. + :type value: str + :param type: how to match header value. Possible values include: 'exact' + :type type: str or ~azure.servicefabric.models.HeaderMatchType + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str=None, type=None, **kwargs) -> None: + super(HttpRouteMatchHeader, self).__init__(**kwargs) + self.name = name + self.value = value + self.type = type diff --git a/customSDK/servicefabric/models/http_route_match_path.py b/customSDK/servicefabric/models/http_route_match_path.py new file mode 100644 index 00000000..fa7b45f8 --- /dev/null +++ b/customSDK/servicefabric/models/http_route_match_path.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpRouteMatchPath(Model): + """Path to match for routing. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Uri path to match for request. + :type value: str + :param rewrite: replacement string for matched part of the Uri. + :type rewrite: str + :ivar type: Required. how to match value in the Uri. Default value: + "prefix" . + :vartype type: str + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'rewrite': {'key': 'rewrite', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "prefix" + + def __init__(self, **kwargs): + super(HttpRouteMatchPath, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.rewrite = kwargs.get('rewrite', None) diff --git a/customSDK/servicefabric/models/http_route_match_path_py3.py b/customSDK/servicefabric/models/http_route_match_path_py3.py new file mode 100644 index 00000000..075b226e --- /dev/null +++ b/customSDK/servicefabric/models/http_route_match_path_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpRouteMatchPath(Model): + """Path to match for routing. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Uri path to match for request. + :type value: str + :param rewrite: replacement string for matched part of the Uri. + :type rewrite: str + :ivar type: Required. how to match value in the Uri. Default value: + "prefix" . + :vartype type: str + """ + + _validation = { + 'value': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'rewrite': {'key': 'rewrite', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "prefix" + + def __init__(self, *, value: str, rewrite: str=None, **kwargs) -> None: + super(HttpRouteMatchPath, self).__init__(**kwargs) + self.value = value + self.rewrite = rewrite diff --git a/customSDK/servicefabric/models/http_route_match_rule.py b/customSDK/servicefabric/models/http_route_match_rule.py new file mode 100644 index 00000000..d09c2ea2 --- /dev/null +++ b/customSDK/servicefabric/models/http_route_match_rule.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpRouteMatchRule(Model): + """Describes a rule for http route matching. + + All required parameters must be populated in order to send to Azure. + + :param path: Required. Path to match for routing. + :type path: ~azure.servicefabric.models.HttpRouteMatchPath + :param headers: headers and their values to match in request. + :type headers: list[~azure.servicefabric.models.HttpRouteMatchHeader] + """ + + _validation = { + 'path': {'required': True}, + } + + _attribute_map = { + 'path': {'key': 'path', 'type': 'HttpRouteMatchPath'}, + 'headers': {'key': 'headers', 'type': '[HttpRouteMatchHeader]'}, + } + + def __init__(self, **kwargs): + super(HttpRouteMatchRule, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.headers = kwargs.get('headers', None) diff --git a/customSDK/servicefabric/models/http_route_match_rule_py3.py b/customSDK/servicefabric/models/http_route_match_rule_py3.py new file mode 100644 index 00000000..61561bf4 --- /dev/null +++ b/customSDK/servicefabric/models/http_route_match_rule_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpRouteMatchRule(Model): + """Describes a rule for http route matching. + + All required parameters must be populated in order to send to Azure. + + :param path: Required. Path to match for routing. + :type path: ~azure.servicefabric.models.HttpRouteMatchPath + :param headers: headers and their values to match in request. + :type headers: list[~azure.servicefabric.models.HttpRouteMatchHeader] + """ + + _validation = { + 'path': {'required': True}, + } + + _attribute_map = { + 'path': {'key': 'path', 'type': 'HttpRouteMatchPath'}, + 'headers': {'key': 'headers', 'type': '[HttpRouteMatchHeader]'}, + } + + def __init__(self, *, path, headers=None, **kwargs) -> None: + super(HttpRouteMatchRule, self).__init__(**kwargs) + self.path = path + self.headers = headers diff --git a/customSDK/servicefabric/models/identity_description.py b/customSDK/servicefabric/models/identity_description.py new file mode 100644 index 00000000..1ab557e2 --- /dev/null +++ b/customSDK/servicefabric/models/identity_description.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IdentityDescription(Model): + """Information describing the identities associated with this application. + + All required parameters must be populated in order to send to Azure. + + :param token_service_endpoint: the endpoint for the token service managing + this identity + :type token_service_endpoint: str + :param type: Required. the types of identities associated with this + resource; currently restricted to 'SystemAssigned and UserAssigned' + :type type: str + :param tenant_id: the identifier of the tenant containing the + application's identity. + :type tenant_id: str + :param principal_id: the object identifier of the Service Principal of the + identity associated with this resource. + :type principal_id: str + :param user_assigned_identities: represents user assigned identities map. + :type user_assigned_identities: dict[str, + ~azure.servicefabric.models.IdentityItemDescription] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'token_service_endpoint': {'key': 'tokenServiceEndpoint', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{IdentityItemDescription}'}, + } + + def __init__(self, **kwargs): + super(IdentityDescription, self).__init__(**kwargs) + self.token_service_endpoint = kwargs.get('token_service_endpoint', None) + self.type = kwargs.get('type', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.principal_id = kwargs.get('principal_id', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) diff --git a/customSDK/servicefabric/models/identity_description_py3.py b/customSDK/servicefabric/models/identity_description_py3.py new file mode 100644 index 00000000..03e82573 --- /dev/null +++ b/customSDK/servicefabric/models/identity_description_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IdentityDescription(Model): + """Information describing the identities associated with this application. + + All required parameters must be populated in order to send to Azure. + + :param token_service_endpoint: the endpoint for the token service managing + this identity + :type token_service_endpoint: str + :param type: Required. the types of identities associated with this + resource; currently restricted to 'SystemAssigned and UserAssigned' + :type type: str + :param tenant_id: the identifier of the tenant containing the + application's identity. + :type tenant_id: str + :param principal_id: the object identifier of the Service Principal of the + identity associated with this resource. + :type principal_id: str + :param user_assigned_identities: represents user assigned identities map. + :type user_assigned_identities: dict[str, + ~azure.servicefabric.models.IdentityItemDescription] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'token_service_endpoint': {'key': 'tokenServiceEndpoint', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{IdentityItemDescription}'}, + } + + def __init__(self, *, type: str, token_service_endpoint: str=None, tenant_id: str=None, principal_id: str=None, user_assigned_identities=None, **kwargs) -> None: + super(IdentityDescription, self).__init__(**kwargs) + self.token_service_endpoint = token_service_endpoint + self.type = type + self.tenant_id = tenant_id + self.principal_id = principal_id + self.user_assigned_identities = user_assigned_identities diff --git a/customSDK/servicefabric/models/identity_item_description.py b/customSDK/servicefabric/models/identity_item_description.py new file mode 100644 index 00000000..74a6013e --- /dev/null +++ b/customSDK/servicefabric/models/identity_item_description.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IdentityItemDescription(Model): + """Describes a single user-assigned identity associated with the application. + + :param principal_id: the object identifier of the Service Principal which + this identity represents. + :type principal_id: str + :param client_id: the client identifier of the Service Principal which + this identity represents. + :type client_id: str + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentityItemDescription, self).__init__(**kwargs) + self.principal_id = kwargs.get('principal_id', None) + self.client_id = kwargs.get('client_id', None) diff --git a/customSDK/servicefabric/models/identity_item_description_py3.py b/customSDK/servicefabric/models/identity_item_description_py3.py new file mode 100644 index 00000000..b3cf669b --- /dev/null +++ b/customSDK/servicefabric/models/identity_item_description_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IdentityItemDescription(Model): + """Describes a single user-assigned identity associated with the application. + + :param principal_id: the object identifier of the Service Principal which + this identity represents. + :type principal_id: str + :param client_id: the client identifier of the Service Principal which + this identity represents. + :type client_id: str + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, *, principal_id: str=None, client_id: str=None, **kwargs) -> None: + super(IdentityItemDescription, self).__init__(**kwargs) + self.principal_id = principal_id + self.client_id = client_id diff --git a/customSDK/servicefabric/models/image_registry_credential.py b/customSDK/servicefabric/models/image_registry_credential.py new file mode 100644 index 00000000..80f114bf --- /dev/null +++ b/customSDK/servicefabric/models/image_registry_credential.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ImageRegistryCredential(Model): + """Image registry credential. + + All required parameters must be populated in order to send to Azure. + + :param server: Required. Docker image registry server, without protocol + such as `http` and `https`. + :type server: str + :param username: Required. The username for the private registry. + :type username: str + :param password_type: The type of the image registry password being given + in password. Possible values include: 'ClearText', 'KeyVaultReference', + 'SecretValueReference'. Default value: "ClearText" . + :type password_type: str or + ~azure.servicefabric.models.ImageRegistryPasswordType + :param password: The password for the private registry. The password is + required for create or update operations, however it is not returned in + the get or list operations. Will be processed based on the type provided. + :type password: str + """ + + _validation = { + 'server': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'server': {'key': 'server', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password_type': {'key': 'passwordType', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageRegistryCredential, self).__init__(**kwargs) + self.server = kwargs.get('server', None) + self.username = kwargs.get('username', None) + self.password_type = kwargs.get('password_type', "ClearText") + self.password = kwargs.get('password', None) diff --git a/customSDK/servicefabric/models/image_registry_credential_py3.py b/customSDK/servicefabric/models/image_registry_credential_py3.py new file mode 100644 index 00000000..9bae3ed1 --- /dev/null +++ b/customSDK/servicefabric/models/image_registry_credential_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ImageRegistryCredential(Model): + """Image registry credential. + + All required parameters must be populated in order to send to Azure. + + :param server: Required. Docker image registry server, without protocol + such as `http` and `https`. + :type server: str + :param username: Required. The username for the private registry. + :type username: str + :param password_type: The type of the image registry password being given + in password. Possible values include: 'ClearText', 'KeyVaultReference', + 'SecretValueReference'. Default value: "ClearText" . + :type password_type: str or + ~azure.servicefabric.models.ImageRegistryPasswordType + :param password: The password for the private registry. The password is + required for create or update operations, however it is not returned in + the get or list operations. Will be processed based on the type provided. + :type password: str + """ + + _validation = { + 'server': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'server': {'key': 'server', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password_type': {'key': 'passwordType', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, server: str, username: str, password_type="ClearText", password: str=None, **kwargs) -> None: + super(ImageRegistryCredential, self).__init__(**kwargs) + self.server = server + self.username = username + self.password_type = password_type + self.password = password diff --git a/customSDK/servicefabric/models/image_store_content.py b/customSDK/servicefabric/models/image_store_content.py new file mode 100644 index 00000000..936fb391 --- /dev/null +++ b/customSDK/servicefabric/models/image_store_content.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ImageStoreContent(Model): + """Information about the image store content. + + :param store_files: The list of image store file info objects represents + files found under the given image store relative path. + :type store_files: list[~azure.servicefabric.models.FileInfo] + :param store_folders: The list of image store folder info objects + represents subfolders found under the given image store relative path. + :type store_folders: list[~azure.servicefabric.models.FolderInfo] + """ + + _attribute_map = { + 'store_files': {'key': 'StoreFiles', 'type': '[FileInfo]'}, + 'store_folders': {'key': 'StoreFolders', 'type': '[FolderInfo]'}, + } + + def __init__(self, **kwargs): + super(ImageStoreContent, self).__init__(**kwargs) + self.store_files = kwargs.get('store_files', None) + self.store_folders = kwargs.get('store_folders', None) diff --git a/customSDK/servicefabric/models/image_store_content_py3.py b/customSDK/servicefabric/models/image_store_content_py3.py new file mode 100644 index 00000000..053a35f5 --- /dev/null +++ b/customSDK/servicefabric/models/image_store_content_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ImageStoreContent(Model): + """Information about the image store content. + + :param store_files: The list of image store file info objects represents + files found under the given image store relative path. + :type store_files: list[~azure.servicefabric.models.FileInfo] + :param store_folders: The list of image store folder info objects + represents subfolders found under the given image store relative path. + :type store_folders: list[~azure.servicefabric.models.FolderInfo] + """ + + _attribute_map = { + 'store_files': {'key': 'StoreFiles', 'type': '[FileInfo]'}, + 'store_folders': {'key': 'StoreFolders', 'type': '[FolderInfo]'}, + } + + def __init__(self, *, store_files=None, store_folders=None, **kwargs) -> None: + super(ImageStoreContent, self).__init__(**kwargs) + self.store_files = store_files + self.store_folders = store_folders diff --git a/customSDK/servicefabric/models/image_store_copy_description.py b/customSDK/servicefabric/models/image_store_copy_description.py new file mode 100644 index 00000000..267b0ca4 --- /dev/null +++ b/customSDK/servicefabric/models/image_store_copy_description.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ImageStoreCopyDescription(Model): + """Information about how to copy image store content from one image store + relative path to another image store relative path. + + All required parameters must be populated in order to send to Azure. + + :param remote_source: Required. The relative path of source image store + content to be copied from. + :type remote_source: str + :param remote_destination: Required. The relative path of destination + image store content to be copied to. + :type remote_destination: str + :param skip_files: The list of the file names to be skipped for copying. + :type skip_files: list[str] + :param check_mark_file: Indicates whether to check mark file during + copying. The property is true if checking mark file is required, false + otherwise. The mark file is used to check whether the folder is well + constructed. If the property is true and mark file does not exist, the + copy is skipped. + :type check_mark_file: bool + """ + + _validation = { + 'remote_source': {'required': True}, + 'remote_destination': {'required': True}, + } + + _attribute_map = { + 'remote_source': {'key': 'RemoteSource', 'type': 'str'}, + 'remote_destination': {'key': 'RemoteDestination', 'type': 'str'}, + 'skip_files': {'key': 'SkipFiles', 'type': '[str]'}, + 'check_mark_file': {'key': 'CheckMarkFile', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ImageStoreCopyDescription, self).__init__(**kwargs) + self.remote_source = kwargs.get('remote_source', None) + self.remote_destination = kwargs.get('remote_destination', None) + self.skip_files = kwargs.get('skip_files', None) + self.check_mark_file = kwargs.get('check_mark_file', None) diff --git a/customSDK/servicefabric/models/image_store_copy_description_py3.py b/customSDK/servicefabric/models/image_store_copy_description_py3.py new file mode 100644 index 00000000..534e5c23 --- /dev/null +++ b/customSDK/servicefabric/models/image_store_copy_description_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ImageStoreCopyDescription(Model): + """Information about how to copy image store content from one image store + relative path to another image store relative path. + + All required parameters must be populated in order to send to Azure. + + :param remote_source: Required. The relative path of source image store + content to be copied from. + :type remote_source: str + :param remote_destination: Required. The relative path of destination + image store content to be copied to. + :type remote_destination: str + :param skip_files: The list of the file names to be skipped for copying. + :type skip_files: list[str] + :param check_mark_file: Indicates whether to check mark file during + copying. The property is true if checking mark file is required, false + otherwise. The mark file is used to check whether the folder is well + constructed. If the property is true and mark file does not exist, the + copy is skipped. + :type check_mark_file: bool + """ + + _validation = { + 'remote_source': {'required': True}, + 'remote_destination': {'required': True}, + } + + _attribute_map = { + 'remote_source': {'key': 'RemoteSource', 'type': 'str'}, + 'remote_destination': {'key': 'RemoteDestination', 'type': 'str'}, + 'skip_files': {'key': 'SkipFiles', 'type': '[str]'}, + 'check_mark_file': {'key': 'CheckMarkFile', 'type': 'bool'}, + } + + def __init__(self, *, remote_source: str, remote_destination: str, skip_files=None, check_mark_file: bool=None, **kwargs) -> None: + super(ImageStoreCopyDescription, self).__init__(**kwargs) + self.remote_source = remote_source + self.remote_destination = remote_destination + self.skip_files = skip_files + self.check_mark_file = check_mark_file diff --git a/customSDK/servicefabric/models/image_store_info.py b/customSDK/servicefabric/models/image_store_info.py new file mode 100644 index 00000000..46ff04e9 --- /dev/null +++ b/customSDK/servicefabric/models/image_store_info.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ImageStoreInfo(Model): + """Information about the ImageStore's resource usage. + + :param disk_info: disk capacity and available disk space on the node where + the ImageStore primary is placed. + :type disk_info: ~azure.servicefabric.models.DiskInfo + :param used_by_metadata: the ImageStore's file system usage for metadata. + :type used_by_metadata: ~azure.servicefabric.models.UsageInfo + :param used_by_staging: The ImageStore's file system usage for staging + files that are being uploaded. + :type used_by_staging: ~azure.servicefabric.models.UsageInfo + :param used_by_copy: the ImageStore's file system usage for copied + application and cluster packages. [Removing application and cluster + packages](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-deleteimagestorecontent) + will free up this space. + :type used_by_copy: ~azure.servicefabric.models.UsageInfo + :param used_by_register: the ImageStore's file system usage for registered + and cluster packages. [Unregistering + application](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) + and [cluster + packages](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) + will free up this space. + :type used_by_register: ~azure.servicefabric.models.UsageInfo + """ + + _attribute_map = { + 'disk_info': {'key': 'DiskInfo', 'type': 'DiskInfo'}, + 'used_by_metadata': {'key': 'UsedByMetadata', 'type': 'UsageInfo'}, + 'used_by_staging': {'key': 'UsedByStaging', 'type': 'UsageInfo'}, + 'used_by_copy': {'key': 'UsedByCopy', 'type': 'UsageInfo'}, + 'used_by_register': {'key': 'UsedByRegister', 'type': 'UsageInfo'}, + } + + def __init__(self, **kwargs): + super(ImageStoreInfo, self).__init__(**kwargs) + self.disk_info = kwargs.get('disk_info', None) + self.used_by_metadata = kwargs.get('used_by_metadata', None) + self.used_by_staging = kwargs.get('used_by_staging', None) + self.used_by_copy = kwargs.get('used_by_copy', None) + self.used_by_register = kwargs.get('used_by_register', None) diff --git a/customSDK/servicefabric/models/image_store_info_py3.py b/customSDK/servicefabric/models/image_store_info_py3.py new file mode 100644 index 00000000..8c2ab909 --- /dev/null +++ b/customSDK/servicefabric/models/image_store_info_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ImageStoreInfo(Model): + """Information about the ImageStore's resource usage. + + :param disk_info: disk capacity and available disk space on the node where + the ImageStore primary is placed. + :type disk_info: ~azure.servicefabric.models.DiskInfo + :param used_by_metadata: the ImageStore's file system usage for metadata. + :type used_by_metadata: ~azure.servicefabric.models.UsageInfo + :param used_by_staging: The ImageStore's file system usage for staging + files that are being uploaded. + :type used_by_staging: ~azure.servicefabric.models.UsageInfo + :param used_by_copy: the ImageStore's file system usage for copied + application and cluster packages. [Removing application and cluster + packages](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-deleteimagestorecontent) + will free up this space. + :type used_by_copy: ~azure.servicefabric.models.UsageInfo + :param used_by_register: the ImageStore's file system usage for registered + and cluster packages. [Unregistering + application](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) + and [cluster + packages](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) + will free up this space. + :type used_by_register: ~azure.servicefabric.models.UsageInfo + """ + + _attribute_map = { + 'disk_info': {'key': 'DiskInfo', 'type': 'DiskInfo'}, + 'used_by_metadata': {'key': 'UsedByMetadata', 'type': 'UsageInfo'}, + 'used_by_staging': {'key': 'UsedByStaging', 'type': 'UsageInfo'}, + 'used_by_copy': {'key': 'UsedByCopy', 'type': 'UsageInfo'}, + 'used_by_register': {'key': 'UsedByRegister', 'type': 'UsageInfo'}, + } + + def __init__(self, *, disk_info=None, used_by_metadata=None, used_by_staging=None, used_by_copy=None, used_by_register=None, **kwargs) -> None: + super(ImageStoreInfo, self).__init__(**kwargs) + self.disk_info = disk_info + self.used_by_metadata = used_by_metadata + self.used_by_staging = used_by_staging + self.used_by_copy = used_by_copy + self.used_by_register = used_by_register diff --git a/customSDK/servicefabric/models/inlined_value_secret_resource_properties.py b/customSDK/servicefabric/models/inlined_value_secret_resource_properties.py new file mode 100644 index 00000000..03ec2fb6 --- /dev/null +++ b/customSDK/servicefabric/models/inlined_value_secret_resource_properties.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .secret_resource_properties import SecretResourceProperties + + +class InlinedValueSecretResourceProperties(SecretResourceProperties): + """Describes the properties of a secret resource whose value is provided + explicitly as plaintext. The secret resource may have multiple values, each + being uniquely versioned. The secret value of each version is stored + encrypted, and delivered as plaintext into the context of applications + referencing it. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param description: User readable description of the secret. + :type description: str + :ivar status: Status of the resource. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the secret. + :vartype status_details: str + :param content_type: The type of the content stored in the secret value. + The value of this property is opaque to Service Fabric. Once set, the + value of this property cannot be changed. + :type content_type: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InlinedValueSecretResourceProperties, self).__init__(**kwargs) + self.kind = 'inlinedValue' diff --git a/customSDK/servicefabric/models/inlined_value_secret_resource_properties_py3.py b/customSDK/servicefabric/models/inlined_value_secret_resource_properties_py3.py new file mode 100644 index 00000000..ab7b7213 --- /dev/null +++ b/customSDK/servicefabric/models/inlined_value_secret_resource_properties_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .secret_resource_properties_py3 import SecretResourceProperties + + +class InlinedValueSecretResourceProperties(SecretResourceProperties): + """Describes the properties of a secret resource whose value is provided + explicitly as plaintext. The secret resource may have multiple values, each + being uniquely versioned. The secret value of each version is stored + encrypted, and delivered as plaintext into the context of applications + referencing it. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param description: User readable description of the secret. + :type description: str + :ivar status: Status of the resource. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the secret. + :vartype status_details: str + :param content_type: The type of the content stored in the secret value. + The value of this property is opaque to Service Fabric. Once set, the + value of this property cannot be changed. + :type content_type: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, content_type: str=None, **kwargs) -> None: + super(InlinedValueSecretResourceProperties, self).__init__(description=description, content_type=content_type, **kwargs) + self.kind = 'inlinedValue' diff --git a/customSDK/servicefabric/models/instance_lifecycle_description.py b/customSDK/servicefabric/models/instance_lifecycle_description.py new file mode 100644 index 00000000..8c4046fb --- /dev/null +++ b/customSDK/servicefabric/models/instance_lifecycle_description.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class InstanceLifecycleDescription(Model): + """Describes how the instance will behave. + + :param restore_replica_location_after_upgrade: If set to true, move/swap + replica to original location after upgrade. + :type restore_replica_location_after_upgrade: bool + """ + + _attribute_map = { + 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(InstanceLifecycleDescription, self).__init__(**kwargs) + self.restore_replica_location_after_upgrade = kwargs.get('restore_replica_location_after_upgrade', None) diff --git a/customSDK/servicefabric/models/instance_lifecycle_description_py3.py b/customSDK/servicefabric/models/instance_lifecycle_description_py3.py new file mode 100644 index 00000000..d90d1593 --- /dev/null +++ b/customSDK/servicefabric/models/instance_lifecycle_description_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class InstanceLifecycleDescription(Model): + """Describes how the instance will behave. + + :param restore_replica_location_after_upgrade: If set to true, move/swap + replica to original location after upgrade. + :type restore_replica_location_after_upgrade: bool + """ + + _attribute_map = { + 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + } + + def __init__(self, *, restore_replica_location_after_upgrade: bool=None, **kwargs) -> None: + super(InstanceLifecycleDescription, self).__init__(**kwargs) + self.restore_replica_location_after_upgrade = restore_replica_location_after_upgrade diff --git a/customSDK/servicefabric/models/int64_property_value.py b/customSDK/servicefabric/models/int64_property_value.py new file mode 100644 index 00000000..893521e4 --- /dev/null +++ b/customSDK/servicefabric/models/int64_property_value.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_value import PropertyValue + + +class Int64PropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Int64. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. The data of the property value. + :type data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Int64PropertyValue, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.kind = 'Int64' diff --git a/customSDK/servicefabric/models/int64_property_value_py3.py b/customSDK/servicefabric/models/int64_property_value_py3.py new file mode 100644 index 00000000..98ec968d --- /dev/null +++ b/customSDK/servicefabric/models/int64_property_value_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_value_py3 import PropertyValue + + +class Int64PropertyValue(PropertyValue): + """Describes a Service Fabric property value of type Int64. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. The data of the property value. + :type data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__(self, *, data: str, **kwargs) -> None: + super(Int64PropertyValue, self).__init__(**kwargs) + self.data = data + self.kind = 'Int64' diff --git a/customSDK/servicefabric/models/int64_range_partition_information.py b/customSDK/servicefabric/models/int64_range_partition_information.py new file mode 100644 index 00000000..d98fa216 --- /dev/null +++ b/customSDK/servicefabric/models/int64_range_partition_information.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_information import PartitionInformation + + +class Int64RangePartitionInformation(PartitionInformation): + """Describes the partition information for the integer range that is based on + partition schemes. + + All required parameters must be populated in order to send to Azure. + + :param id: An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. + The partition ID is unique and does not change for the lifetime of the + service. If the same service was deleted and recreated the IDs of its + partitions would be different. + :type id: str + :param service_partition_kind: Required. Constant filled by server. + :type service_partition_kind: str + :param low_key: Specifies the minimum key value handled by this partition. + :type low_key: str + :param high_key: Specifies the maximum key value handled by this + partition. + :type high_key: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + 'low_key': {'key': 'LowKey', 'type': 'str'}, + 'high_key': {'key': 'HighKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Int64RangePartitionInformation, self).__init__(**kwargs) + self.low_key = kwargs.get('low_key', None) + self.high_key = kwargs.get('high_key', None) + self.service_partition_kind = 'Int64Range' diff --git a/customSDK/servicefabric/models/int64_range_partition_information_py3.py b/customSDK/servicefabric/models/int64_range_partition_information_py3.py new file mode 100644 index 00000000..fe771569 --- /dev/null +++ b/customSDK/servicefabric/models/int64_range_partition_information_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_information_py3 import PartitionInformation + + +class Int64RangePartitionInformation(PartitionInformation): + """Describes the partition information for the integer range that is based on + partition schemes. + + All required parameters must be populated in order to send to Azure. + + :param id: An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. + The partition ID is unique and does not change for the lifetime of the + service. If the same service was deleted and recreated the IDs of its + partitions would be different. + :type id: str + :param service_partition_kind: Required. Constant filled by server. + :type service_partition_kind: str + :param low_key: Specifies the minimum key value handled by this partition. + :type low_key: str + :param high_key: Specifies the maximum key value handled by this + partition. + :type high_key: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + 'low_key': {'key': 'LowKey', 'type': 'str'}, + 'high_key': {'key': 'HighKey', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, low_key: str=None, high_key: str=None, **kwargs) -> None: + super(Int64RangePartitionInformation, self).__init__(id=id, **kwargs) + self.low_key = low_key + self.high_key = high_key + self.service_partition_kind = 'Int64Range' diff --git a/customSDK/servicefabric/models/invoke_data_loss_result.py b/customSDK/servicefabric/models/invoke_data_loss_result.py new file mode 100644 index 00000000..cf8d6174 --- /dev/null +++ b/customSDK/servicefabric/models/invoke_data_loss_result.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class InvokeDataLossResult(Model): + """Represents information about an operation in a terminal state (Completed or + Faulted). + + :param error_code: If OperationState is Completed, this is 0. If + OperationState is Faulted, this is an error code indicating the reason. + :type error_code: int + :param selected_partition: This class returns information about the + partition that the user-induced operation acted upon. + :type selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__(self, **kwargs): + super(InvokeDataLossResult, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.selected_partition = kwargs.get('selected_partition', None) diff --git a/customSDK/servicefabric/models/invoke_data_loss_result_py3.py b/customSDK/servicefabric/models/invoke_data_loss_result_py3.py new file mode 100644 index 00000000..6fc6fafe --- /dev/null +++ b/customSDK/servicefabric/models/invoke_data_loss_result_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class InvokeDataLossResult(Model): + """Represents information about an operation in a terminal state (Completed or + Faulted). + + :param error_code: If OperationState is Completed, this is 0. If + OperationState is Faulted, this is an error code indicating the reason. + :type error_code: int + :param selected_partition: This class returns information about the + partition that the user-induced operation acted upon. + :type selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__(self, *, error_code: int=None, selected_partition=None, **kwargs) -> None: + super(InvokeDataLossResult, self).__init__(**kwargs) + self.error_code = error_code + self.selected_partition = selected_partition diff --git a/customSDK/servicefabric/models/invoke_quorum_loss_result.py b/customSDK/servicefabric/models/invoke_quorum_loss_result.py new file mode 100644 index 00000000..9ec2042f --- /dev/null +++ b/customSDK/servicefabric/models/invoke_quorum_loss_result.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class InvokeQuorumLossResult(Model): + """Represents information about an operation in a terminal state (Completed or + Faulted). + + :param error_code: If OperationState is Completed, this is 0. If + OperationState is Faulted, this is an error code indicating the reason. + :type error_code: int + :param selected_partition: This class returns information about the + partition that the user-induced operation acted upon. + :type selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__(self, **kwargs): + super(InvokeQuorumLossResult, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.selected_partition = kwargs.get('selected_partition', None) diff --git a/customSDK/servicefabric/models/invoke_quorum_loss_result_py3.py b/customSDK/servicefabric/models/invoke_quorum_loss_result_py3.py new file mode 100644 index 00000000..ec6aa382 --- /dev/null +++ b/customSDK/servicefabric/models/invoke_quorum_loss_result_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class InvokeQuorumLossResult(Model): + """Represents information about an operation in a terminal state (Completed or + Faulted). + + :param error_code: If OperationState is Completed, this is 0. If + OperationState is Faulted, this is an error code indicating the reason. + :type error_code: int + :param selected_partition: This class returns information about the + partition that the user-induced operation acted upon. + :type selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__(self, *, error_code: int=None, selected_partition=None, **kwargs) -> None: + super(InvokeQuorumLossResult, self).__init__(**kwargs) + self.error_code = error_code + self.selected_partition = selected_partition diff --git a/customSDK/servicefabric/models/key_value_store_replica_status.py b/customSDK/servicefabric/models/key_value_store_replica_status.py new file mode 100644 index 00000000..2636b5ef --- /dev/null +++ b/customSDK/servicefabric/models/key_value_store_replica_status.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_status_base import ReplicaStatusBase + + +class KeyValueStoreReplicaStatus(ReplicaStatusBase): + """Key value store related information for the replica. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param database_row_count_estimate: Value indicating the estimated number + of rows in the underlying database. + :type database_row_count_estimate: str + :param database_logical_size_estimate: Value indicating the estimated size + of the underlying database. + :type database_logical_size_estimate: str + :param copy_notification_current_key_filter: Value indicating the latest + key-prefix filter applied to enumeration during the callback. Null if + there is no pending callback. + :type copy_notification_current_key_filter: str + :param copy_notification_current_progress: Value indicating the latest + number of keys enumerated during the callback. 0 if there is no pending + callback. + :type copy_notification_current_progress: str + :param status_details: Value indicating the current status details of the + replica. + :type status_details: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'database_row_count_estimate': {'key': 'DatabaseRowCountEstimate', 'type': 'str'}, + 'database_logical_size_estimate': {'key': 'DatabaseLogicalSizeEstimate', 'type': 'str'}, + 'copy_notification_current_key_filter': {'key': 'CopyNotificationCurrentKeyFilter', 'type': 'str'}, + 'copy_notification_current_progress': {'key': 'CopyNotificationCurrentProgress', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyValueStoreReplicaStatus, self).__init__(**kwargs) + self.database_row_count_estimate = kwargs.get('database_row_count_estimate', None) + self.database_logical_size_estimate = kwargs.get('database_logical_size_estimate', None) + self.copy_notification_current_key_filter = kwargs.get('copy_notification_current_key_filter', None) + self.copy_notification_current_progress = kwargs.get('copy_notification_current_progress', None) + self.status_details = kwargs.get('status_details', None) + self.kind = 'KeyValueStore' diff --git a/customSDK/servicefabric/models/key_value_store_replica_status_py3.py b/customSDK/servicefabric/models/key_value_store_replica_status_py3.py new file mode 100644 index 00000000..14fb37c0 --- /dev/null +++ b/customSDK/servicefabric/models/key_value_store_replica_status_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_status_base_py3 import ReplicaStatusBase + + +class KeyValueStoreReplicaStatus(ReplicaStatusBase): + """Key value store related information for the replica. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param database_row_count_estimate: Value indicating the estimated number + of rows in the underlying database. + :type database_row_count_estimate: str + :param database_logical_size_estimate: Value indicating the estimated size + of the underlying database. + :type database_logical_size_estimate: str + :param copy_notification_current_key_filter: Value indicating the latest + key-prefix filter applied to enumeration during the callback. Null if + there is no pending callback. + :type copy_notification_current_key_filter: str + :param copy_notification_current_progress: Value indicating the latest + number of keys enumerated during the callback. 0 if there is no pending + callback. + :type copy_notification_current_progress: str + :param status_details: Value indicating the current status details of the + replica. + :type status_details: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'database_row_count_estimate': {'key': 'DatabaseRowCountEstimate', 'type': 'str'}, + 'database_logical_size_estimate': {'key': 'DatabaseLogicalSizeEstimate', 'type': 'str'}, + 'copy_notification_current_key_filter': {'key': 'CopyNotificationCurrentKeyFilter', 'type': 'str'}, + 'copy_notification_current_progress': {'key': 'CopyNotificationCurrentProgress', 'type': 'str'}, + 'status_details': {'key': 'StatusDetails', 'type': 'str'}, + } + + def __init__(self, *, database_row_count_estimate: str=None, database_logical_size_estimate: str=None, copy_notification_current_key_filter: str=None, copy_notification_current_progress: str=None, status_details: str=None, **kwargs) -> None: + super(KeyValueStoreReplicaStatus, self).__init__(**kwargs) + self.database_row_count_estimate = database_row_count_estimate + self.database_logical_size_estimate = database_logical_size_estimate + self.copy_notification_current_key_filter = copy_notification_current_key_filter + self.copy_notification_current_progress = copy_notification_current_progress + self.status_details = status_details + self.kind = 'KeyValueStore' diff --git a/customSDK/servicefabric/models/load_metric_information.py b/customSDK/servicefabric/models/load_metric_information.py new file mode 100644 index 00000000..7c8128d8 --- /dev/null +++ b/customSDK/servicefabric/models/load_metric_information.py @@ -0,0 +1,151 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LoadMetricInformation(Model): + """Represents data structure that contains load information for a certain + metric in a cluster. + + :param name: Name of the metric for which this load information is + provided. + :type name: str + :param is_balanced_before: Value that indicates whether the metrics is + balanced or not before resource balancer run + :type is_balanced_before: bool + :param is_balanced_after: Value that indicates whether the metrics is + balanced or not after resource balancer run. + :type is_balanced_after: bool + :param deviation_before: The standard average deviation of the metrics + before resource balancer run. + :type deviation_before: str + :param deviation_after: The standard average deviation of the metrics + after resource balancer run. + :type deviation_after: str + :param balancing_threshold: The balancing threshold for a certain metric. + :type balancing_threshold: str + :param action: The current action being taken with regard to this metric + :type action: str + :param activity_threshold: The Activity Threshold specified for this + metric in the system Cluster Manifest. + :type activity_threshold: str + :param cluster_capacity: The total cluster capacity for a given metric + :type cluster_capacity: str + :param cluster_load: The total cluster load. In future releases of Service + Fabric this parameter will be deprecated in favor of CurrentClusterLoad. + :type cluster_load: str + :param current_cluster_load: The total cluster load. + :type current_cluster_load: str + :param cluster_remaining_capacity: The remaining capacity for the metric + in the cluster. In future releases of Service Fabric this parameter will + be deprecated in favor of ClusterCapacityRemaining. + :type cluster_remaining_capacity: str + :param cluster_capacity_remaining: The remaining capacity for the metric + in the cluster. + :type cluster_capacity_remaining: str + :param is_cluster_capacity_violation: Indicates that the metric is + currently over capacity in the cluster. + :type is_cluster_capacity_violation: bool + :param node_buffer_percentage: The reserved percentage of total node + capacity for this metric. + :type node_buffer_percentage: str + :param cluster_buffered_capacity: Remaining capacity in the cluster + excluding the reserved space. In future releases of Service Fabric this + parameter will be deprecated in favor of BufferedClusterCapacityRemaining. + :type cluster_buffered_capacity: str + :param buffered_cluster_capacity_remaining: Remaining capacity in the + cluster excluding the reserved space. + :type buffered_cluster_capacity_remaining: str + :param cluster_remaining_buffered_capacity: The remaining percentage of + cluster total capacity for this metric. + :type cluster_remaining_buffered_capacity: str + :param min_node_load_value: The minimum load on any node for this metric. + In future releases of Service Fabric this parameter will be deprecated in + favor of MinimumNodeLoad. + :type min_node_load_value: str + :param minimum_node_load: The minimum load on any node for this metric. + :type minimum_node_load: str + :param min_node_load_node_id: The node id of the node with the minimum + load for this metric. + :type min_node_load_node_id: ~azure.servicefabric.models.NodeId + :param max_node_load_value: The maximum load on any node for this metric. + In future releases of Service Fabric this parameter will be deprecated in + favor of MaximumNodeLoad. + :type max_node_load_value: str + :param maximum_node_load: The maximum load on any node for this metric. + :type maximum_node_load: str + :param max_node_load_node_id: The node id of the node with the maximum + load for this metric. + :type max_node_load_node_id: ~azure.servicefabric.models.NodeId + :param planned_load_removal: This value represents the load of the + replicas that are planned to be removed in the future within the cluster. + This kind of load is reported for replicas that are currently being moving + to other nodes and for replicas that are currently being dropped but still + use the load on the source node. + :type planned_load_removal: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'is_balanced_before': {'key': 'IsBalancedBefore', 'type': 'bool'}, + 'is_balanced_after': {'key': 'IsBalancedAfter', 'type': 'bool'}, + 'deviation_before': {'key': 'DeviationBefore', 'type': 'str'}, + 'deviation_after': {'key': 'DeviationAfter', 'type': 'str'}, + 'balancing_threshold': {'key': 'BalancingThreshold', 'type': 'str'}, + 'action': {'key': 'Action', 'type': 'str'}, + 'activity_threshold': {'key': 'ActivityThreshold', 'type': 'str'}, + 'cluster_capacity': {'key': 'ClusterCapacity', 'type': 'str'}, + 'cluster_load': {'key': 'ClusterLoad', 'type': 'str'}, + 'current_cluster_load': {'key': 'CurrentClusterLoad', 'type': 'str'}, + 'cluster_remaining_capacity': {'key': 'ClusterRemainingCapacity', 'type': 'str'}, + 'cluster_capacity_remaining': {'key': 'ClusterCapacityRemaining', 'type': 'str'}, + 'is_cluster_capacity_violation': {'key': 'IsClusterCapacityViolation', 'type': 'bool'}, + 'node_buffer_percentage': {'key': 'NodeBufferPercentage', 'type': 'str'}, + 'cluster_buffered_capacity': {'key': 'ClusterBufferedCapacity', 'type': 'str'}, + 'buffered_cluster_capacity_remaining': {'key': 'BufferedClusterCapacityRemaining', 'type': 'str'}, + 'cluster_remaining_buffered_capacity': {'key': 'ClusterRemainingBufferedCapacity', 'type': 'str'}, + 'min_node_load_value': {'key': 'MinNodeLoadValue', 'type': 'str'}, + 'minimum_node_load': {'key': 'MinimumNodeLoad', 'type': 'str'}, + 'min_node_load_node_id': {'key': 'MinNodeLoadNodeId', 'type': 'NodeId'}, + 'max_node_load_value': {'key': 'MaxNodeLoadValue', 'type': 'str'}, + 'maximum_node_load': {'key': 'MaximumNodeLoad', 'type': 'str'}, + 'max_node_load_node_id': {'key': 'MaxNodeLoadNodeId', 'type': 'NodeId'}, + 'planned_load_removal': {'key': 'PlannedLoadRemoval', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LoadMetricInformation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.is_balanced_before = kwargs.get('is_balanced_before', None) + self.is_balanced_after = kwargs.get('is_balanced_after', None) + self.deviation_before = kwargs.get('deviation_before', None) + self.deviation_after = kwargs.get('deviation_after', None) + self.balancing_threshold = kwargs.get('balancing_threshold', None) + self.action = kwargs.get('action', None) + self.activity_threshold = kwargs.get('activity_threshold', None) + self.cluster_capacity = kwargs.get('cluster_capacity', None) + self.cluster_load = kwargs.get('cluster_load', None) + self.current_cluster_load = kwargs.get('current_cluster_load', None) + self.cluster_remaining_capacity = kwargs.get('cluster_remaining_capacity', None) + self.cluster_capacity_remaining = kwargs.get('cluster_capacity_remaining', None) + self.is_cluster_capacity_violation = kwargs.get('is_cluster_capacity_violation', None) + self.node_buffer_percentage = kwargs.get('node_buffer_percentage', None) + self.cluster_buffered_capacity = kwargs.get('cluster_buffered_capacity', None) + self.buffered_cluster_capacity_remaining = kwargs.get('buffered_cluster_capacity_remaining', None) + self.cluster_remaining_buffered_capacity = kwargs.get('cluster_remaining_buffered_capacity', None) + self.min_node_load_value = kwargs.get('min_node_load_value', None) + self.minimum_node_load = kwargs.get('minimum_node_load', None) + self.min_node_load_node_id = kwargs.get('min_node_load_node_id', None) + self.max_node_load_value = kwargs.get('max_node_load_value', None) + self.maximum_node_load = kwargs.get('maximum_node_load', None) + self.max_node_load_node_id = kwargs.get('max_node_load_node_id', None) + self.planned_load_removal = kwargs.get('planned_load_removal', None) diff --git a/customSDK/servicefabric/models/load_metric_information_py3.py b/customSDK/servicefabric/models/load_metric_information_py3.py new file mode 100644 index 00000000..93597eff --- /dev/null +++ b/customSDK/servicefabric/models/load_metric_information_py3.py @@ -0,0 +1,151 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LoadMetricInformation(Model): + """Represents data structure that contains load information for a certain + metric in a cluster. + + :param name: Name of the metric for which this load information is + provided. + :type name: str + :param is_balanced_before: Value that indicates whether the metrics is + balanced or not before resource balancer run + :type is_balanced_before: bool + :param is_balanced_after: Value that indicates whether the metrics is + balanced or not after resource balancer run. + :type is_balanced_after: bool + :param deviation_before: The standard average deviation of the metrics + before resource balancer run. + :type deviation_before: str + :param deviation_after: The standard average deviation of the metrics + after resource balancer run. + :type deviation_after: str + :param balancing_threshold: The balancing threshold for a certain metric. + :type balancing_threshold: str + :param action: The current action being taken with regard to this metric + :type action: str + :param activity_threshold: The Activity Threshold specified for this + metric in the system Cluster Manifest. + :type activity_threshold: str + :param cluster_capacity: The total cluster capacity for a given metric + :type cluster_capacity: str + :param cluster_load: The total cluster load. In future releases of Service + Fabric this parameter will be deprecated in favor of CurrentClusterLoad. + :type cluster_load: str + :param current_cluster_load: The total cluster load. + :type current_cluster_load: str + :param cluster_remaining_capacity: The remaining capacity for the metric + in the cluster. In future releases of Service Fabric this parameter will + be deprecated in favor of ClusterCapacityRemaining. + :type cluster_remaining_capacity: str + :param cluster_capacity_remaining: The remaining capacity for the metric + in the cluster. + :type cluster_capacity_remaining: str + :param is_cluster_capacity_violation: Indicates that the metric is + currently over capacity in the cluster. + :type is_cluster_capacity_violation: bool + :param node_buffer_percentage: The reserved percentage of total node + capacity for this metric. + :type node_buffer_percentage: str + :param cluster_buffered_capacity: Remaining capacity in the cluster + excluding the reserved space. In future releases of Service Fabric this + parameter will be deprecated in favor of BufferedClusterCapacityRemaining. + :type cluster_buffered_capacity: str + :param buffered_cluster_capacity_remaining: Remaining capacity in the + cluster excluding the reserved space. + :type buffered_cluster_capacity_remaining: str + :param cluster_remaining_buffered_capacity: The remaining percentage of + cluster total capacity for this metric. + :type cluster_remaining_buffered_capacity: str + :param min_node_load_value: The minimum load on any node for this metric. + In future releases of Service Fabric this parameter will be deprecated in + favor of MinimumNodeLoad. + :type min_node_load_value: str + :param minimum_node_load: The minimum load on any node for this metric. + :type minimum_node_load: str + :param min_node_load_node_id: The node id of the node with the minimum + load for this metric. + :type min_node_load_node_id: ~azure.servicefabric.models.NodeId + :param max_node_load_value: The maximum load on any node for this metric. + In future releases of Service Fabric this parameter will be deprecated in + favor of MaximumNodeLoad. + :type max_node_load_value: str + :param maximum_node_load: The maximum load on any node for this metric. + :type maximum_node_load: str + :param max_node_load_node_id: The node id of the node with the maximum + load for this metric. + :type max_node_load_node_id: ~azure.servicefabric.models.NodeId + :param planned_load_removal: This value represents the load of the + replicas that are planned to be removed in the future within the cluster. + This kind of load is reported for replicas that are currently being moving + to other nodes and for replicas that are currently being dropped but still + use the load on the source node. + :type planned_load_removal: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'is_balanced_before': {'key': 'IsBalancedBefore', 'type': 'bool'}, + 'is_balanced_after': {'key': 'IsBalancedAfter', 'type': 'bool'}, + 'deviation_before': {'key': 'DeviationBefore', 'type': 'str'}, + 'deviation_after': {'key': 'DeviationAfter', 'type': 'str'}, + 'balancing_threshold': {'key': 'BalancingThreshold', 'type': 'str'}, + 'action': {'key': 'Action', 'type': 'str'}, + 'activity_threshold': {'key': 'ActivityThreshold', 'type': 'str'}, + 'cluster_capacity': {'key': 'ClusterCapacity', 'type': 'str'}, + 'cluster_load': {'key': 'ClusterLoad', 'type': 'str'}, + 'current_cluster_load': {'key': 'CurrentClusterLoad', 'type': 'str'}, + 'cluster_remaining_capacity': {'key': 'ClusterRemainingCapacity', 'type': 'str'}, + 'cluster_capacity_remaining': {'key': 'ClusterCapacityRemaining', 'type': 'str'}, + 'is_cluster_capacity_violation': {'key': 'IsClusterCapacityViolation', 'type': 'bool'}, + 'node_buffer_percentage': {'key': 'NodeBufferPercentage', 'type': 'str'}, + 'cluster_buffered_capacity': {'key': 'ClusterBufferedCapacity', 'type': 'str'}, + 'buffered_cluster_capacity_remaining': {'key': 'BufferedClusterCapacityRemaining', 'type': 'str'}, + 'cluster_remaining_buffered_capacity': {'key': 'ClusterRemainingBufferedCapacity', 'type': 'str'}, + 'min_node_load_value': {'key': 'MinNodeLoadValue', 'type': 'str'}, + 'minimum_node_load': {'key': 'MinimumNodeLoad', 'type': 'str'}, + 'min_node_load_node_id': {'key': 'MinNodeLoadNodeId', 'type': 'NodeId'}, + 'max_node_load_value': {'key': 'MaxNodeLoadValue', 'type': 'str'}, + 'maximum_node_load': {'key': 'MaximumNodeLoad', 'type': 'str'}, + 'max_node_load_node_id': {'key': 'MaxNodeLoadNodeId', 'type': 'NodeId'}, + 'planned_load_removal': {'key': 'PlannedLoadRemoval', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, is_balanced_before: bool=None, is_balanced_after: bool=None, deviation_before: str=None, deviation_after: str=None, balancing_threshold: str=None, action: str=None, activity_threshold: str=None, cluster_capacity: str=None, cluster_load: str=None, current_cluster_load: str=None, cluster_remaining_capacity: str=None, cluster_capacity_remaining: str=None, is_cluster_capacity_violation: bool=None, node_buffer_percentage: str=None, cluster_buffered_capacity: str=None, buffered_cluster_capacity_remaining: str=None, cluster_remaining_buffered_capacity: str=None, min_node_load_value: str=None, minimum_node_load: str=None, min_node_load_node_id=None, max_node_load_value: str=None, maximum_node_load: str=None, max_node_load_node_id=None, planned_load_removal: str=None, **kwargs) -> None: + super(LoadMetricInformation, self).__init__(**kwargs) + self.name = name + self.is_balanced_before = is_balanced_before + self.is_balanced_after = is_balanced_after + self.deviation_before = deviation_before + self.deviation_after = deviation_after + self.balancing_threshold = balancing_threshold + self.action = action + self.activity_threshold = activity_threshold + self.cluster_capacity = cluster_capacity + self.cluster_load = cluster_load + self.current_cluster_load = current_cluster_load + self.cluster_remaining_capacity = cluster_remaining_capacity + self.cluster_capacity_remaining = cluster_capacity_remaining + self.is_cluster_capacity_violation = is_cluster_capacity_violation + self.node_buffer_percentage = node_buffer_percentage + self.cluster_buffered_capacity = cluster_buffered_capacity + self.buffered_cluster_capacity_remaining = buffered_cluster_capacity_remaining + self.cluster_remaining_buffered_capacity = cluster_remaining_buffered_capacity + self.min_node_load_value = min_node_load_value + self.minimum_node_load = minimum_node_load + self.min_node_load_node_id = min_node_load_node_id + self.max_node_load_value = max_node_load_value + self.maximum_node_load = maximum_node_load + self.max_node_load_node_id = max_node_load_node_id + self.planned_load_removal = planned_load_removal diff --git a/customSDK/servicefabric/models/load_metric_report.py b/customSDK/servicefabric/models/load_metric_report.py new file mode 100644 index 00000000..2e7e321c --- /dev/null +++ b/customSDK/servicefabric/models/load_metric_report.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LoadMetricReport(Model): + """Represents the load metric report which contains the time metric was + reported, its name and value. + + :param last_reported_utc: Gets the UTC time when the load was reported. + :type last_reported_utc: datetime + :param name: The name of the load metric. + :type name: str + :param value: The value of the load metric. In future releases of Service + Fabric this parameter will be deprecated in favor of CurrentValue. + :type value: str + :param current_value: The value of the load metric. + :type current_value: str + """ + + _attribute_map = { + 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + 'current_value': {'key': 'CurrentValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LoadMetricReport, self).__init__(**kwargs) + self.last_reported_utc = kwargs.get('last_reported_utc', None) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + self.current_value = kwargs.get('current_value', None) diff --git a/customSDK/servicefabric/models/load_metric_report_info.py b/customSDK/servicefabric/models/load_metric_report_info.py new file mode 100644 index 00000000..93fd4a45 --- /dev/null +++ b/customSDK/servicefabric/models/load_metric_report_info.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LoadMetricReportInfo(Model): + """Information about load reported by replica. + + :param name: The name of the metric. + :type name: str + :param value: The value of the load for the metric. In future releases of + Service Fabric this parameter will be deprecated in favor of CurrentValue. + :type value: int + :param current_value: The double value of the load for the metric. + :type current_value: str + :param last_reported_utc: The UTC time when the load is reported. + :type last_reported_utc: datetime + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + 'current_value': {'key': 'CurrentValue', 'type': 'str'}, + 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(LoadMetricReportInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + self.current_value = kwargs.get('current_value', None) + self.last_reported_utc = kwargs.get('last_reported_utc', None) diff --git a/customSDK/servicefabric/models/load_metric_report_info_py3.py b/customSDK/servicefabric/models/load_metric_report_info_py3.py new file mode 100644 index 00000000..24013929 --- /dev/null +++ b/customSDK/servicefabric/models/load_metric_report_info_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LoadMetricReportInfo(Model): + """Information about load reported by replica. + + :param name: The name of the metric. + :type name: str + :param value: The value of the load for the metric. In future releases of + Service Fabric this parameter will be deprecated in favor of CurrentValue. + :type value: int + :param current_value: The double value of the load for the metric. + :type current_value: str + :param last_reported_utc: The UTC time when the load is reported. + :type last_reported_utc: datetime + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + 'current_value': {'key': 'CurrentValue', 'type': 'str'}, + 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, + } + + def __init__(self, *, name: str=None, value: int=None, current_value: str=None, last_reported_utc=None, **kwargs) -> None: + super(LoadMetricReportInfo, self).__init__(**kwargs) + self.name = name + self.value = value + self.current_value = current_value + self.last_reported_utc = last_reported_utc diff --git a/customSDK/servicefabric/models/load_metric_report_py3.py b/customSDK/servicefabric/models/load_metric_report_py3.py new file mode 100644 index 00000000..e8aec5b5 --- /dev/null +++ b/customSDK/servicefabric/models/load_metric_report_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LoadMetricReport(Model): + """Represents the load metric report which contains the time metric was + reported, its name and value. + + :param last_reported_utc: Gets the UTC time when the load was reported. + :type last_reported_utc: datetime + :param name: The name of the load metric. + :type name: str + :param value: The value of the load metric. In future releases of Service + Fabric this parameter will be deprecated in favor of CurrentValue. + :type value: str + :param current_value: The value of the load metric. + :type current_value: str + """ + + _attribute_map = { + 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + 'current_value': {'key': 'CurrentValue', 'type': 'str'}, + } + + def __init__(self, *, last_reported_utc=None, name: str=None, value: str=None, current_value: str=None, **kwargs) -> None: + super(LoadMetricReport, self).__init__(**kwargs) + self.last_reported_utc = last_reported_utc + self.name = name + self.value = value + self.current_value = current_value diff --git a/customSDK/servicefabric/models/loaded_partition_information_query_description.py b/customSDK/servicefabric/models/loaded_partition_information_query_description.py new file mode 100644 index 00000000..986c87e3 --- /dev/null +++ b/customSDK/servicefabric/models/loaded_partition_information_query_description.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LoadedPartitionInformationQueryDescription(Model): + """Represents data structure that contains query information. + + :param metric_name: Name of the metric for which this information is + provided. + :type metric_name: str + :param service_name: Name of the service this partition belongs to. + :type service_name: str + :param ordering: Ordering of partitions' load. Possible values include: + 'Desc', 'Asc'. Default value: "Desc" . + :type ordering: str or ~azure.servicefabric.models.Ordering + :param max_results: The maximum number of results to be returned as part + of the paged queries. This parameter defines the upper bound on the number + of results returned. The results returned can be less than the specified + maximum results if they do not fit in the message as per the max message + size restrictions defined in the configuration. If this parameter is zero + or not specified, the paged query includes as many results as possible + that fit in the return message. + :type max_results: long + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + """ + + _attribute_map = { + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'ordering': {'key': 'Ordering', 'type': 'str'}, + 'max_results': {'key': 'MaxResults', 'type': 'long'}, + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LoadedPartitionInformationQueryDescription, self).__init__(**kwargs) + self.metric_name = kwargs.get('metric_name', None) + self.service_name = kwargs.get('service_name', None) + self.ordering = kwargs.get('ordering', "Desc") + self.max_results = kwargs.get('max_results', None) + self.continuation_token = kwargs.get('continuation_token', None) diff --git a/customSDK/servicefabric/models/loaded_partition_information_query_description_py3.py b/customSDK/servicefabric/models/loaded_partition_information_query_description_py3.py new file mode 100644 index 00000000..644d21e7 --- /dev/null +++ b/customSDK/servicefabric/models/loaded_partition_information_query_description_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LoadedPartitionInformationQueryDescription(Model): + """Represents data structure that contains query information. + + :param metric_name: Name of the metric for which this information is + provided. + :type metric_name: str + :param service_name: Name of the service this partition belongs to. + :type service_name: str + :param ordering: Ordering of partitions' load. Possible values include: + 'Desc', 'Asc'. Default value: "Desc" . + :type ordering: str or ~azure.servicefabric.models.Ordering + :param max_results: The maximum number of results to be returned as part + of the paged queries. This parameter defines the upper bound on the number + of results returned. The results returned can be less than the specified + maximum results if they do not fit in the message as per the max message + size restrictions defined in the configuration. If this parameter is zero + or not specified, the paged query includes as many results as possible + that fit in the return message. + :type max_results: long + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + """ + + _attribute_map = { + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'ordering': {'key': 'Ordering', 'type': 'str'}, + 'max_results': {'key': 'MaxResults', 'type': 'long'}, + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + } + + def __init__(self, *, metric_name: str=None, service_name: str=None, ordering="Desc", max_results: int=None, continuation_token: str=None, **kwargs) -> None: + super(LoadedPartitionInformationQueryDescription, self).__init__(**kwargs) + self.metric_name = metric_name + self.service_name = service_name + self.ordering = ordering + self.max_results = max_results + self.continuation_token = continuation_token diff --git a/customSDK/servicefabric/models/loaded_partition_information_result.py b/customSDK/servicefabric/models/loaded_partition_information_result.py new file mode 100644 index 00000000..8a760893 --- /dev/null +++ b/customSDK/servicefabric/models/loaded_partition_information_result.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LoadedPartitionInformationResult(Model): + """Represents partition information. + + All required parameters must be populated in order to send to Azure. + + :param service_name: Required. Name of the service this partition belongs + to. + :type service_name: str + :param partition_id: Required. Id of the partition. + :type partition_id: str + :param metric_name: Required. Name of the metric for which this + information is provided. + :type metric_name: str + :param load: Required. Load for metric. + :type load: long + """ + + _validation = { + 'service_name': {'required': True}, + 'partition_id': {'required': True}, + 'metric_name': {'required': True}, + 'load': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'load': {'key': 'Load', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(LoadedPartitionInformationResult, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) + self.metric_name = kwargs.get('metric_name', None) + self.load = kwargs.get('load', None) diff --git a/customSDK/servicefabric/models/loaded_partition_information_result_list.py b/customSDK/servicefabric/models/loaded_partition_information_result_list.py new file mode 100644 index 00000000..319bdca1 --- /dev/null +++ b/customSDK/servicefabric/models/loaded_partition_information_result_list.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LoadedPartitionInformationResultList(Model): + """Represents data structure that contains top/least loaded partitions for a + certain metric. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of application information. + :type items: + list[~azure.servicefabric.models.LoadedPartitionInformationResult] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[LoadedPartitionInformationResult]'}, + } + + def __init__(self, **kwargs): + super(LoadedPartitionInformationResultList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/loaded_partition_information_result_list_py3.py b/customSDK/servicefabric/models/loaded_partition_information_result_list_py3.py new file mode 100644 index 00000000..e10367a9 --- /dev/null +++ b/customSDK/servicefabric/models/loaded_partition_information_result_list_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LoadedPartitionInformationResultList(Model): + """Represents data structure that contains top/least loaded partitions for a + certain metric. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of application information. + :type items: + list[~azure.servicefabric.models.LoadedPartitionInformationResult] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[LoadedPartitionInformationResult]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(LoadedPartitionInformationResultList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/loaded_partition_information_result_py3.py b/customSDK/servicefabric/models/loaded_partition_information_result_py3.py new file mode 100644 index 00000000..9af2dee2 --- /dev/null +++ b/customSDK/servicefabric/models/loaded_partition_information_result_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LoadedPartitionInformationResult(Model): + """Represents partition information. + + All required parameters must be populated in order to send to Azure. + + :param service_name: Required. Name of the service this partition belongs + to. + :type service_name: str + :param partition_id: Required. Id of the partition. + :type partition_id: str + :param metric_name: Required. Name of the metric for which this + information is provided. + :type metric_name: str + :param load: Required. Load for metric. + :type load: long + """ + + _validation = { + 'service_name': {'required': True}, + 'partition_id': {'required': True}, + 'metric_name': {'required': True}, + 'load': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'load': {'key': 'Load', 'type': 'long'}, + } + + def __init__(self, *, service_name: str, partition_id: str, metric_name: str, load: int, **kwargs) -> None: + super(LoadedPartitionInformationResult, self).__init__(**kwargs) + self.service_name = service_name + self.partition_id = partition_id + self.metric_name = metric_name + self.load = load diff --git a/customSDK/servicefabric/models/local_network_resource_properties.py b/customSDK/servicefabric/models/local_network_resource_properties.py new file mode 100644 index 00000000..98eddf5d --- /dev/null +++ b/customSDK/servicefabric/models/local_network_resource_properties.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .network_resource_properties import NetworkResourceProperties + + +class LocalNetworkResourceProperties(NetworkResourceProperties): + """Information about a Service Fabric container network local to a single + Service Fabric cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param description: User readable description of the network. + :type description: str + :ivar status: Status of the network. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the network. + :vartype status_details: str + :param network_address_prefix: Address space for the local container + network. + :type network_address_prefix: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'network_address_prefix': {'key': 'networkAddressPrefix', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LocalNetworkResourceProperties, self).__init__(**kwargs) + self.network_address_prefix = kwargs.get('network_address_prefix', None) + self.kind = 'Local' diff --git a/customSDK/servicefabric/models/local_network_resource_properties_py3.py b/customSDK/servicefabric/models/local_network_resource_properties_py3.py new file mode 100644 index 00000000..6578e59b --- /dev/null +++ b/customSDK/servicefabric/models/local_network_resource_properties_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .network_resource_properties_py3 import NetworkResourceProperties + + +class LocalNetworkResourceProperties(NetworkResourceProperties): + """Information about a Service Fabric container network local to a single + Service Fabric cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param description: User readable description of the network. + :type description: str + :ivar status: Status of the network. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the network. + :vartype status_details: str + :param network_address_prefix: Address space for the local container + network. + :type network_address_prefix: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'network_address_prefix': {'key': 'networkAddressPrefix', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, network_address_prefix: str=None, **kwargs) -> None: + super(LocalNetworkResourceProperties, self).__init__(description=description, **kwargs) + self.network_address_prefix = network_address_prefix + self.kind = 'Local' diff --git a/customSDK/servicefabric/models/managed_application_identity.py b/customSDK/servicefabric/models/managed_application_identity.py new file mode 100644 index 00000000..6db30421 --- /dev/null +++ b/customSDK/servicefabric/models/managed_application_identity.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedApplicationIdentity(Model): + """Describes a managed application identity. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the identity. + :type name: str + :param principal_id: The identity's PrincipalId. + :type principal_id: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'principal_id': {'key': 'PrincipalId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedApplicationIdentity, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.principal_id = kwargs.get('principal_id', None) diff --git a/customSDK/servicefabric/models/managed_application_identity_description.py b/customSDK/servicefabric/models/managed_application_identity_description.py new file mode 100644 index 00000000..f5137dcb --- /dev/null +++ b/customSDK/servicefabric/models/managed_application_identity_description.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedApplicationIdentityDescription(Model): + """Managed application identity description. + + :param token_service_endpoint: Token service endpoint. + :type token_service_endpoint: str + :param managed_identities: A list of managed application identity objects. + :type managed_identities: + list[~azure.servicefabric.models.ManagedApplicationIdentity] + """ + + _attribute_map = { + 'token_service_endpoint': {'key': 'TokenServiceEndpoint', 'type': 'str'}, + 'managed_identities': {'key': 'ManagedIdentities', 'type': '[ManagedApplicationIdentity]'}, + } + + def __init__(self, **kwargs): + super(ManagedApplicationIdentityDescription, self).__init__(**kwargs) + self.token_service_endpoint = kwargs.get('token_service_endpoint', None) + self.managed_identities = kwargs.get('managed_identities', None) diff --git a/customSDK/servicefabric/models/managed_application_identity_description_py3.py b/customSDK/servicefabric/models/managed_application_identity_description_py3.py new file mode 100644 index 00000000..c8a173d1 --- /dev/null +++ b/customSDK/servicefabric/models/managed_application_identity_description_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedApplicationIdentityDescription(Model): + """Managed application identity description. + + :param token_service_endpoint: Token service endpoint. + :type token_service_endpoint: str + :param managed_identities: A list of managed application identity objects. + :type managed_identities: + list[~azure.servicefabric.models.ManagedApplicationIdentity] + """ + + _attribute_map = { + 'token_service_endpoint': {'key': 'TokenServiceEndpoint', 'type': 'str'}, + 'managed_identities': {'key': 'ManagedIdentities', 'type': '[ManagedApplicationIdentity]'}, + } + + def __init__(self, *, token_service_endpoint: str=None, managed_identities=None, **kwargs) -> None: + super(ManagedApplicationIdentityDescription, self).__init__(**kwargs) + self.token_service_endpoint = token_service_endpoint + self.managed_identities = managed_identities diff --git a/customSDK/servicefabric/models/managed_application_identity_py3.py b/customSDK/servicefabric/models/managed_application_identity_py3.py new file mode 100644 index 00000000..ad514fc9 --- /dev/null +++ b/customSDK/servicefabric/models/managed_application_identity_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedApplicationIdentity(Model): + """Describes a managed application identity. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the identity. + :type name: str + :param principal_id: The identity's PrincipalId. + :type principal_id: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'principal_id': {'key': 'PrincipalId', 'type': 'str'}, + } + + def __init__(self, *, name: str, principal_id: str=None, **kwargs) -> None: + super(ManagedApplicationIdentity, self).__init__(**kwargs) + self.name = name + self.principal_id = principal_id diff --git a/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description.py b/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description.py new file mode 100644 index 00000000..e817c279 --- /dev/null +++ b/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_storage_description import BackupStorageDescription + + +class ManagedIdentityAzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Azure blob store (connected using managed + identity) used for storing and enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param managed_identity_type: Required. The type of managed identity to be + used to connect to Azure Blob Store via Managed Identity. Possible values + include: 'Invalid', 'VMSS', 'Cluster' + :type managed_identity_type: str or + ~azure.servicefabric.models.ManagedIdentityType + :param blob_service_uri: Required. The Blob Service Uri to connect to the + Azure blob store.. + :type blob_service_uri: str + :param container_name: Required. The name of the container in the blob + store to store and enumerate backups from. + :type container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'managed_identity_type': {'required': True}, + 'blob_service_uri': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'managed_identity_type': {'key': 'ManagedIdentityType', 'type': 'str'}, + 'blob_service_uri': {'key': 'BlobServiceUri', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedIdentityAzureBlobBackupStorageDescription, self).__init__(**kwargs) + self.managed_identity_type = kwargs.get('managed_identity_type', None) + self.blob_service_uri = kwargs.get('blob_service_uri', None) + self.container_name = kwargs.get('container_name', None) + self.storage_kind = 'ManagedIdentityAzureBlobStore' diff --git a/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description_py3.py b/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description_py3.py new file mode 100644 index 00000000..af895d57 --- /dev/null +++ b/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_storage_description_py3 import BackupStorageDescription + + +class ManagedIdentityAzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Azure blob store (connected using managed + identity) used for storing and enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param managed_identity_type: Required. The type of managed identity to be + used to connect to Azure Blob Store via Managed Identity. Possible values + include: 'Invalid', 'VMSS', 'Cluster' + :type managed_identity_type: str or + ~azure.servicefabric.models.ManagedIdentityType + :param blob_service_uri: Required. The Blob Service Uri to connect to the + Azure blob store.. + :type blob_service_uri: str + :param container_name: Required. The name of the container in the blob + store to store and enumerate backups from. + :type container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'managed_identity_type': {'required': True}, + 'blob_service_uri': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'managed_identity_type': {'key': 'ManagedIdentityType', 'type': 'str'}, + 'blob_service_uri': {'key': 'BlobServiceUri', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, *, managed_identity_type, blob_service_uri: str, container_name: str, friendly_name: str=None, **kwargs) -> None: + super(ManagedIdentityAzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) + self.managed_identity_type = managed_identity_type + self.blob_service_uri = blob_service_uri + self.container_name = container_name + self.storage_kind = 'ManagedIdentityAzureBlobStore' diff --git a/customSDK/servicefabric/models/metric_load_description.py b/customSDK/servicefabric/models/metric_load_description.py new file mode 100644 index 00000000..ebe7d129 --- /dev/null +++ b/customSDK/servicefabric/models/metric_load_description.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricLoadDescription(Model): + """Specifies metric load information. + + :param metric_name: The name of the reported metric. + :type metric_name: str + :param current_load: The current value of the metric load. + :type current_load: long + :param predicted_load: The predicted value of the metric load. Predicted + metric load values is currently a preview feature. It allows predicted + load values to be reported and used at the Service Fabric side, but that + feature is currently not enabled. + :type predicted_load: long + """ + + _attribute_map = { + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'current_load': {'key': 'CurrentLoad', 'type': 'long'}, + 'predicted_load': {'key': 'PredictedLoad', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(MetricLoadDescription, self).__init__(**kwargs) + self.metric_name = kwargs.get('metric_name', None) + self.current_load = kwargs.get('current_load', None) + self.predicted_load = kwargs.get('predicted_load', None) diff --git a/customSDK/servicefabric/models/metric_load_description_py3.py b/customSDK/servicefabric/models/metric_load_description_py3.py new file mode 100644 index 00000000..efb17da7 --- /dev/null +++ b/customSDK/servicefabric/models/metric_load_description_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricLoadDescription(Model): + """Specifies metric load information. + + :param metric_name: The name of the reported metric. + :type metric_name: str + :param current_load: The current value of the metric load. + :type current_load: long + :param predicted_load: The predicted value of the metric load. Predicted + metric load values is currently a preview feature. It allows predicted + load values to be reported and used at the Service Fabric side, but that + feature is currently not enabled. + :type predicted_load: long + """ + + _attribute_map = { + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'current_load': {'key': 'CurrentLoad', 'type': 'long'}, + 'predicted_load': {'key': 'PredictedLoad', 'type': 'long'}, + } + + def __init__(self, *, metric_name: str=None, current_load: int=None, predicted_load: int=None, **kwargs) -> None: + super(MetricLoadDescription, self).__init__(**kwargs) + self.metric_name = metric_name + self.current_load = current_load + self.predicted_load = predicted_load diff --git a/customSDK/servicefabric/models/monitoring_policy_description.py b/customSDK/servicefabric/models/monitoring_policy_description.py new file mode 100644 index 00000000..6b95c6ec --- /dev/null +++ b/customSDK/servicefabric/models/monitoring_policy_description.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MonitoringPolicyDescription(Model): + """Describes the parameters for monitoring an upgrade in Monitored mode. + + :param failure_action: The compensating action to perform when a Monitored + upgrade encounters monitoring policy or health policy violations. + Invalid indicates the failure action is invalid. Rollback specifies that + the upgrade will start rolling back automatically. + Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + :type failure_action: str or ~azure.servicefabric.models.FailureAction + :param health_check_wait_duration_in_milliseconds: The amount of time to + wait after completing an upgrade domain before applying health policies. + It is first interpreted as a string representing an ISO 8601 duration. If + that fails, then it is interpreted as a number representing the total + number of milliseconds. + :type health_check_wait_duration_in_milliseconds: str + :param health_check_stable_duration_in_milliseconds: The amount of time + that the application or cluster must remain healthy before the upgrade + proceeds to the next upgrade domain. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type health_check_stable_duration_in_milliseconds: str + :param health_check_retry_timeout_in_milliseconds: The amount of time to + retry health evaluation when the application or cluster is unhealthy + before FailureAction is executed. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type health_check_retry_timeout_in_milliseconds: str + :param upgrade_timeout_in_milliseconds: The amount of time the overall + upgrade has to complete before FailureAction is executed. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, + then it is interpreted as a number representing the total number of + milliseconds. + :type upgrade_timeout_in_milliseconds: str + :param upgrade_domain_timeout_in_milliseconds: The amount of time each + upgrade domain has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + :type upgrade_domain_timeout_in_milliseconds: str + """ + + _attribute_map = { + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, + 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, + 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MonitoringPolicyDescription, self).__init__(**kwargs) + self.failure_action = kwargs.get('failure_action', None) + self.health_check_wait_duration_in_milliseconds = kwargs.get('health_check_wait_duration_in_milliseconds', None) + self.health_check_stable_duration_in_milliseconds = kwargs.get('health_check_stable_duration_in_milliseconds', None) + self.health_check_retry_timeout_in_milliseconds = kwargs.get('health_check_retry_timeout_in_milliseconds', None) + self.upgrade_timeout_in_milliseconds = kwargs.get('upgrade_timeout_in_milliseconds', None) + self.upgrade_domain_timeout_in_milliseconds = kwargs.get('upgrade_domain_timeout_in_milliseconds', None) diff --git a/customSDK/servicefabric/models/monitoring_policy_description_py3.py b/customSDK/servicefabric/models/monitoring_policy_description_py3.py new file mode 100644 index 00000000..1e3b0c85 --- /dev/null +++ b/customSDK/servicefabric/models/monitoring_policy_description_py3.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MonitoringPolicyDescription(Model): + """Describes the parameters for monitoring an upgrade in Monitored mode. + + :param failure_action: The compensating action to perform when a Monitored + upgrade encounters monitoring policy or health policy violations. + Invalid indicates the failure action is invalid. Rollback specifies that + the upgrade will start rolling back automatically. + Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + :type failure_action: str or ~azure.servicefabric.models.FailureAction + :param health_check_wait_duration_in_milliseconds: The amount of time to + wait after completing an upgrade domain before applying health policies. + It is first interpreted as a string representing an ISO 8601 duration. If + that fails, then it is interpreted as a number representing the total + number of milliseconds. + :type health_check_wait_duration_in_milliseconds: str + :param health_check_stable_duration_in_milliseconds: The amount of time + that the application or cluster must remain healthy before the upgrade + proceeds to the next upgrade domain. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type health_check_stable_duration_in_milliseconds: str + :param health_check_retry_timeout_in_milliseconds: The amount of time to + retry health evaluation when the application or cluster is unhealthy + before FailureAction is executed. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type health_check_retry_timeout_in_milliseconds: str + :param upgrade_timeout_in_milliseconds: The amount of time the overall + upgrade has to complete before FailureAction is executed. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, + then it is interpreted as a number representing the total number of + milliseconds. + :type upgrade_timeout_in_milliseconds: str + :param upgrade_domain_timeout_in_milliseconds: The amount of time each + upgrade domain has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + :type upgrade_domain_timeout_in_milliseconds: str + """ + + _attribute_map = { + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, + 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, + 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, + } + + def __init__(self, *, failure_action=None, health_check_wait_duration_in_milliseconds: str=None, health_check_stable_duration_in_milliseconds: str=None, health_check_retry_timeout_in_milliseconds: str=None, upgrade_timeout_in_milliseconds: str=None, upgrade_domain_timeout_in_milliseconds: str=None, **kwargs) -> None: + super(MonitoringPolicyDescription, self).__init__(**kwargs) + self.failure_action = failure_action + self.health_check_wait_duration_in_milliseconds = health_check_wait_duration_in_milliseconds + self.health_check_stable_duration_in_milliseconds = health_check_stable_duration_in_milliseconds + self.health_check_retry_timeout_in_milliseconds = health_check_retry_timeout_in_milliseconds + self.upgrade_timeout_in_milliseconds = upgrade_timeout_in_milliseconds + self.upgrade_domain_timeout_in_milliseconds = upgrade_domain_timeout_in_milliseconds diff --git a/customSDK/servicefabric/models/name_description.py b/customSDK/servicefabric/models/name_description.py new file mode 100644 index 00000000..93ca62e3 --- /dev/null +++ b/customSDK/servicefabric/models/name_description.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NameDescription(Model): + """Describes a Service Fabric name. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The Service Fabric name, including the 'fabric:' + URI scheme. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NameDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/name_description_py3.py b/customSDK/servicefabric/models/name_description_py3.py new file mode 100644 index 00000000..5f8a01bd --- /dev/null +++ b/customSDK/servicefabric/models/name_description_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NameDescription(Model): + """Describes a Service Fabric name. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The Service Fabric name, including the 'fabric:' + URI scheme. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, *, name: str, **kwargs) -> None: + super(NameDescription, self).__init__(**kwargs) + self.name = name diff --git a/customSDK/servicefabric/models/named_partition_information.py b/customSDK/servicefabric/models/named_partition_information.py new file mode 100644 index 00000000..8ccff214 --- /dev/null +++ b/customSDK/servicefabric/models/named_partition_information.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_information import PartitionInformation + + +class NamedPartitionInformation(PartitionInformation): + """Describes the partition information for the name as a string that is based + on partition schemes. + + All required parameters must be populated in order to send to Azure. + + :param id: An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. + The partition ID is unique and does not change for the lifetime of the + service. If the same service was deleted and recreated the IDs of its + partitions would be different. + :type id: str + :param service_partition_kind: Required. Constant filled by server. + :type service_partition_kind: str + :param name: Name of the partition. + :type name: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NamedPartitionInformation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.service_partition_kind = 'Named' diff --git a/customSDK/servicefabric/models/named_partition_information_py3.py b/customSDK/servicefabric/models/named_partition_information_py3.py new file mode 100644 index 00000000..6204651b --- /dev/null +++ b/customSDK/servicefabric/models/named_partition_information_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_information_py3 import PartitionInformation + + +class NamedPartitionInformation(PartitionInformation): + """Describes the partition information for the name as a string that is based + on partition schemes. + + All required parameters must be populated in order to send to Azure. + + :param id: An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. + The partition ID is unique and does not change for the lifetime of the + service. If the same service was deleted and recreated the IDs of its + partitions would be different. + :type id: str + :param service_partition_kind: Required. Constant filled by server. + :type service_partition_kind: str + :param name: Name of the partition. + :type name: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(NamedPartitionInformation, self).__init__(id=id, **kwargs) + self.name = name + self.service_partition_kind = 'Named' diff --git a/customSDK/servicefabric/models/named_partition_scheme_description.py b/customSDK/servicefabric/models/named_partition_scheme_description.py new file mode 100644 index 00000000..0d58fa2a --- /dev/null +++ b/customSDK/servicefabric/models/named_partition_scheme_description.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_scheme_description import PartitionSchemeDescription + + +class NamedPartitionSchemeDescription(PartitionSchemeDescription): + """Describes the named partition scheme of the service. + + All required parameters must be populated in order to send to Azure. + + :param partition_scheme: Required. Constant filled by server. + :type partition_scheme: str + :param count: Required. The number of partitions. + :type count: int + :param names: Required. Array of size specified by the ‘Count’ parameter, + for the names of the partitions. + :type names: list[str] + """ + + _validation = { + 'partition_scheme': {'required': True}, + 'count': {'required': True}, + 'names': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + 'count': {'key': 'Count', 'type': 'int'}, + 'names': {'key': 'Names', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(NamedPartitionSchemeDescription, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.names = kwargs.get('names', None) + self.partition_scheme = 'Named' diff --git a/customSDK/servicefabric/models/named_partition_scheme_description_py3.py b/customSDK/servicefabric/models/named_partition_scheme_description_py3.py new file mode 100644 index 00000000..d50a2fbb --- /dev/null +++ b/customSDK/servicefabric/models/named_partition_scheme_description_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_scheme_description_py3 import PartitionSchemeDescription + + +class NamedPartitionSchemeDescription(PartitionSchemeDescription): + """Describes the named partition scheme of the service. + + All required parameters must be populated in order to send to Azure. + + :param partition_scheme: Required. Constant filled by server. + :type partition_scheme: str + :param count: Required. The number of partitions. + :type count: int + :param names: Required. Array of size specified by the ‘Count’ parameter, + for the names of the partitions. + :type names: list[str] + """ + + _validation = { + 'partition_scheme': {'required': True}, + 'count': {'required': True}, + 'names': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + 'count': {'key': 'Count', 'type': 'int'}, + 'names': {'key': 'Names', 'type': '[str]'}, + } + + def __init__(self, *, count: int, names, **kwargs) -> None: + super(NamedPartitionSchemeDescription, self).__init__(**kwargs) + self.count = count + self.names = names + self.partition_scheme = 'Named' diff --git a/customSDK/servicefabric/models/network_ref.py b/customSDK/servicefabric/models/network_ref.py new file mode 100644 index 00000000..7c811e73 --- /dev/null +++ b/customSDK/servicefabric/models/network_ref.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkRef(Model): + """Describes a network reference in a service. + + :param name: Name of the network + :type name: str + :param endpoint_refs: A list of endpoints that are exposed on this + network. + :type endpoint_refs: list[~azure.servicefabric.models.EndpointRef] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'endpoint_refs': {'key': 'endpointRefs', 'type': '[EndpointRef]'}, + } + + def __init__(self, **kwargs): + super(NetworkRef, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.endpoint_refs = kwargs.get('endpoint_refs', None) diff --git a/customSDK/servicefabric/models/network_ref_py3.py b/customSDK/servicefabric/models/network_ref_py3.py new file mode 100644 index 00000000..9cb21573 --- /dev/null +++ b/customSDK/servicefabric/models/network_ref_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkRef(Model): + """Describes a network reference in a service. + + :param name: Name of the network + :type name: str + :param endpoint_refs: A list of endpoints that are exposed on this + network. + :type endpoint_refs: list[~azure.servicefabric.models.EndpointRef] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'endpoint_refs': {'key': 'endpointRefs', 'type': '[EndpointRef]'}, + } + + def __init__(self, *, name: str=None, endpoint_refs=None, **kwargs) -> None: + super(NetworkRef, self).__init__(**kwargs) + self.name = name + self.endpoint_refs = endpoint_refs diff --git a/customSDK/servicefabric/models/network_resource_description.py b/customSDK/servicefabric/models/network_resource_description.py new file mode 100644 index 00000000..56a03e76 --- /dev/null +++ b/customSDK/servicefabric/models/network_resource_description.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkResourceDescription(Model): + """This type describes a network resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Network resource. + :type name: str + :param properties: Required. Describes properties of a network resource. + :type properties: ~azure.servicefabric.models.NetworkResourceProperties + """ + + _validation = { + 'name': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'NetworkResourceProperties'}, + } + + def __init__(self, **kwargs): + super(NetworkResourceDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.properties = kwargs.get('properties', None) diff --git a/customSDK/servicefabric/models/network_resource_description_py3.py b/customSDK/servicefabric/models/network_resource_description_py3.py new file mode 100644 index 00000000..c812b39c --- /dev/null +++ b/customSDK/servicefabric/models/network_resource_description_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkResourceDescription(Model): + """This type describes a network resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Network resource. + :type name: str + :param properties: Required. Describes properties of a network resource. + :type properties: ~azure.servicefabric.models.NetworkResourceProperties + """ + + _validation = { + 'name': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'NetworkResourceProperties'}, + } + + def __init__(self, *, name: str, properties, **kwargs) -> None: + super(NetworkResourceDescription, self).__init__(**kwargs) + self.name = name + self.properties = properties diff --git a/customSDK/servicefabric/models/network_resource_properties.py b/customSDK/servicefabric/models/network_resource_properties.py new file mode 100644 index 00000000..bca9a90f --- /dev/null +++ b/customSDK/servicefabric/models/network_resource_properties.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .network_resource_properties_base import NetworkResourcePropertiesBase + + +class NetworkResourceProperties(NetworkResourcePropertiesBase): + """Describes properties of a network resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LocalNetworkResourceProperties + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param description: User readable description of the network. + :type description: str + :ivar status: Status of the network. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the network. + :vartype status_details: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Local': 'LocalNetworkResourceProperties'} + } + + def __init__(self, **kwargs): + super(NetworkResourceProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.status = None + self.status_details = None + self.kind = 'NetworkResourceProperties' diff --git a/customSDK/servicefabric/models/network_resource_properties_base.py b/customSDK/servicefabric/models/network_resource_properties_base.py new file mode 100644 index 00000000..d0ecd3ae --- /dev/null +++ b/customSDK/servicefabric/models/network_resource_properties_base.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkResourcePropertiesBase(Model): + """This type describes the properties of a network resource, including its + kind. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NetworkResourceProperties + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'NetworkResourceProperties': 'NetworkResourceProperties'} + } + + def __init__(self, **kwargs): + super(NetworkResourcePropertiesBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/network_resource_properties_base_py3.py b/customSDK/servicefabric/models/network_resource_properties_base_py3.py new file mode 100644 index 00000000..6410aae6 --- /dev/null +++ b/customSDK/servicefabric/models/network_resource_properties_base_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkResourcePropertiesBase(Model): + """This type describes the properties of a network resource, including its + kind. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NetworkResourceProperties + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'NetworkResourceProperties': 'NetworkResourceProperties'} + } + + def __init__(self, **kwargs) -> None: + super(NetworkResourcePropertiesBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/network_resource_properties_py3.py b/customSDK/servicefabric/models/network_resource_properties_py3.py new file mode 100644 index 00000000..0fce3829 --- /dev/null +++ b/customSDK/servicefabric/models/network_resource_properties_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .network_resource_properties_base_py3 import NetworkResourcePropertiesBase + + +class NetworkResourceProperties(NetworkResourcePropertiesBase): + """Describes properties of a network resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LocalNetworkResourceProperties + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param description: User readable description of the network. + :type description: str + :ivar status: Status of the network. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the network. + :vartype status_details: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Local': 'LocalNetworkResourceProperties'} + } + + def __init__(self, *, description: str=None, **kwargs) -> None: + super(NetworkResourceProperties, self).__init__(**kwargs) + self.description = description + self.status = None + self.status_details = None + self.kind = 'NetworkResourceProperties' diff --git a/customSDK/servicefabric/models/node_aborted_event.py b/customSDK/servicefabric/models/node_aborted_event.py new file mode 100644 index 00000000..744a8fee --- /dev/null +++ b/customSDK/servicefabric/models/node_aborted_event.py @@ -0,0 +1,94 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event import NodeEvent + + +class NodeAbortedEvent(NodeEvent): + """Node Aborted event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_id: Required. Id of Node. + :type node_id: str + :param upgrade_domain: Required. Upgrade domain of Node. + :type upgrade_domain: str + :param fault_domain: Required. Fault domain of Node. + :type fault_domain: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param hostname: Required. Name of Host. + :type hostname: str + :param is_seed_node: Required. Indicates if it is seed node. + :type is_seed_node: bool + :param node_version: Required. Version of Node. + :type node_version: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeAbortedEvent, self).__init__(**kwargs) + self.node_instance = kwargs.get('node_instance', None) + self.node_id = kwargs.get('node_id', None) + self.upgrade_domain = kwargs.get('upgrade_domain', None) + self.fault_domain = kwargs.get('fault_domain', None) + self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) + self.hostname = kwargs.get('hostname', None) + self.is_seed_node = kwargs.get('is_seed_node', None) + self.node_version = kwargs.get('node_version', None) + self.kind = 'NodeAborted' diff --git a/customSDK/servicefabric/models/node_aborted_event_py3.py b/customSDK/servicefabric/models/node_aborted_event_py3.py new file mode 100644 index 00000000..9b51fbd2 --- /dev/null +++ b/customSDK/servicefabric/models/node_aborted_event_py3.py @@ -0,0 +1,94 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event_py3 import NodeEvent + + +class NodeAbortedEvent(NodeEvent): + """Node Aborted event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_id: Required. Id of Node. + :type node_id: str + :param upgrade_domain: Required. Upgrade domain of Node. + :type upgrade_domain: str + :param fault_domain: Required. Fault domain of Node. + :type fault_domain: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param hostname: Required. Name of Host. + :type hostname: str + :param is_seed_node: Required. Indicates if it is seed node. + :type is_seed_node: bool + :param node_version: Required. Version of Node. + :type node_version: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, node_id: str, upgrade_domain: str, fault_domain: str, ip_address_or_fqdn: str, hostname: str, is_seed_node: bool, node_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeAbortedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance = node_instance + self.node_id = node_id + self.upgrade_domain = upgrade_domain + self.fault_domain = fault_domain + self.ip_address_or_fqdn = ip_address_or_fqdn + self.hostname = hostname + self.is_seed_node = is_seed_node + self.node_version = node_version + self.kind = 'NodeAborted' diff --git a/customSDK/servicefabric/models/node_added_to_cluster_event.py b/customSDK/servicefabric/models/node_added_to_cluster_event.py new file mode 100644 index 00000000..3c55e7b2 --- /dev/null +++ b/customSDK/servicefabric/models/node_added_to_cluster_event.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event import NodeEvent + + +class NodeAddedToClusterEvent(NodeEvent): + """Node Added event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_id: Required. Id of Node. + :type node_id: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_type: Required. Type of Node. + :type node_type: str + :param fabric_version: Required. Fabric version. + :type fabric_version: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param node_capacities: Required. Capacities. + :type node_capacities: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'node_type': {'required': True}, + 'fabric_version': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'node_capacities': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_type': {'key': 'NodeType', 'type': 'str'}, + 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeAddedToClusterEvent, self).__init__(**kwargs) + self.node_id = kwargs.get('node_id', None) + self.node_instance = kwargs.get('node_instance', None) + self.node_type = kwargs.get('node_type', None) + self.fabric_version = kwargs.get('fabric_version', None) + self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) + self.node_capacities = kwargs.get('node_capacities', None) + self.kind = 'NodeAddedToCluster' diff --git a/customSDK/servicefabric/models/node_added_to_cluster_event_py3.py b/customSDK/servicefabric/models/node_added_to_cluster_event_py3.py new file mode 100644 index 00000000..61780376 --- /dev/null +++ b/customSDK/servicefabric/models/node_added_to_cluster_event_py3.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event_py3 import NodeEvent + + +class NodeAddedToClusterEvent(NodeEvent): + """Node Added event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_id: Required. Id of Node. + :type node_id: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_type: Required. Type of Node. + :type node_type: str + :param fabric_version: Required. Fabric version. + :type fabric_version: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param node_capacities: Required. Capacities. + :type node_capacities: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'node_type': {'required': True}, + 'fabric_version': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'node_capacities': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_type': {'key': 'NodeType', 'type': 'str'}, + 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_id: str, node_instance: int, node_type: str, fabric_version: str, ip_address_or_fqdn: str, node_capacities: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeAddedToClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_id = node_id + self.node_instance = node_instance + self.node_type = node_type + self.fabric_version = fabric_version + self.ip_address_or_fqdn = ip_address_or_fqdn + self.node_capacities = node_capacities + self.kind = 'NodeAddedToCluster' diff --git a/customSDK/servicefabric/models/node_closed_event.py b/customSDK/servicefabric/models/node_closed_event.py new file mode 100644 index 00000000..d9abbee9 --- /dev/null +++ b/customSDK/servicefabric/models/node_closed_event.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event import NodeEvent + + +class NodeClosedEvent(NodeEvent): + """Node Closed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_id: Required. Id of Node. + :type node_id: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param error: Required. Describes error. + :type error: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'error': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'error': {'key': 'Error', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeClosedEvent, self).__init__(**kwargs) + self.node_id = kwargs.get('node_id', None) + self.node_instance = kwargs.get('node_instance', None) + self.error = kwargs.get('error', None) + self.kind = 'NodeClosed' diff --git a/customSDK/servicefabric/models/node_closed_event_py3.py b/customSDK/servicefabric/models/node_closed_event_py3.py new file mode 100644 index 00000000..e655d3d2 --- /dev/null +++ b/customSDK/servicefabric/models/node_closed_event_py3.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event_py3 import NodeEvent + + +class NodeClosedEvent(NodeEvent): + """Node Closed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_id: Required. Id of Node. + :type node_id: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param error: Required. Describes error. + :type error: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'error': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'error': {'key': 'Error', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_id: str, node_instance: int, error: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeClosedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_id = node_id + self.node_instance = node_instance + self.error = error + self.kind = 'NodeClosed' diff --git a/customSDK/servicefabric/models/node_deactivate_completed_event.py b/customSDK/servicefabric/models/node_deactivate_completed_event.py new file mode 100644 index 00000000..9e20d52b --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivate_completed_event.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event import NodeEvent + + +class NodeDeactivateCompletedEvent(NodeEvent): + """Node Deactivate Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param effective_deactivate_intent: Required. Describes deactivate intent. + :type effective_deactivate_intent: str + :param batch_ids_with_deactivate_intent: Required. Batch Ids. + :type batch_ids_with_deactivate_intent: str + :param start_time: Required. Start time. + :type start_time: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'effective_deactivate_intent': {'required': True}, + 'batch_ids_with_deactivate_intent': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'effective_deactivate_intent': {'key': 'EffectiveDeactivateIntent', 'type': 'str'}, + 'batch_ids_with_deactivate_intent': {'key': 'BatchIdsWithDeactivateIntent', 'type': 'str'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(NodeDeactivateCompletedEvent, self).__init__(**kwargs) + self.node_instance = kwargs.get('node_instance', None) + self.effective_deactivate_intent = kwargs.get('effective_deactivate_intent', None) + self.batch_ids_with_deactivate_intent = kwargs.get('batch_ids_with_deactivate_intent', None) + self.start_time = kwargs.get('start_time', None) + self.kind = 'NodeDeactivateCompleted' diff --git a/customSDK/servicefabric/models/node_deactivate_completed_event_py3.py b/customSDK/servicefabric/models/node_deactivate_completed_event_py3.py new file mode 100644 index 00000000..d78dbcef --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivate_completed_event_py3.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event_py3 import NodeEvent + + +class NodeDeactivateCompletedEvent(NodeEvent): + """Node Deactivate Completed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param effective_deactivate_intent: Required. Describes deactivate intent. + :type effective_deactivate_intent: str + :param batch_ids_with_deactivate_intent: Required. Batch Ids. + :type batch_ids_with_deactivate_intent: str + :param start_time: Required. Start time. + :type start_time: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'effective_deactivate_intent': {'required': True}, + 'batch_ids_with_deactivate_intent': {'required': True}, + 'start_time': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'effective_deactivate_intent': {'key': 'EffectiveDeactivateIntent', 'type': 'str'}, + 'batch_ids_with_deactivate_intent': {'key': 'BatchIdsWithDeactivateIntent', 'type': 'str'}, + 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, effective_deactivate_intent: str, batch_ids_with_deactivate_intent: str, start_time, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeDeactivateCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance = node_instance + self.effective_deactivate_intent = effective_deactivate_intent + self.batch_ids_with_deactivate_intent = batch_ids_with_deactivate_intent + self.start_time = start_time + self.kind = 'NodeDeactivateCompleted' diff --git a/customSDK/servicefabric/models/node_deactivate_started_event.py b/customSDK/servicefabric/models/node_deactivate_started_event.py new file mode 100644 index 00000000..7cf057fc --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivate_started_event.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event import NodeEvent + + +class NodeDeactivateStartedEvent(NodeEvent): + """Node Deactivate Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param batch_id: Required. Batch Id. + :type batch_id: str + :param deactivate_intent: Required. Describes deactivate intent. + :type deactivate_intent: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'batch_id': {'required': True}, + 'deactivate_intent': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'batch_id': {'key': 'BatchId', 'type': 'str'}, + 'deactivate_intent': {'key': 'DeactivateIntent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeDeactivateStartedEvent, self).__init__(**kwargs) + self.node_instance = kwargs.get('node_instance', None) + self.batch_id = kwargs.get('batch_id', None) + self.deactivate_intent = kwargs.get('deactivate_intent', None) + self.kind = 'NodeDeactivateStarted' diff --git a/customSDK/servicefabric/models/node_deactivate_started_event_py3.py b/customSDK/servicefabric/models/node_deactivate_started_event_py3.py new file mode 100644 index 00000000..30c39037 --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivate_started_event_py3.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event_py3 import NodeEvent + + +class NodeDeactivateStartedEvent(NodeEvent): + """Node Deactivate Started event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param batch_id: Required. Batch Id. + :type batch_id: str + :param deactivate_intent: Required. Describes deactivate intent. + :type deactivate_intent: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'batch_id': {'required': True}, + 'deactivate_intent': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'batch_id': {'key': 'BatchId', 'type': 'str'}, + 'deactivate_intent': {'key': 'DeactivateIntent', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, batch_id: str, deactivate_intent: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeDeactivateStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance = node_instance + self.batch_id = batch_id + self.deactivate_intent = deactivate_intent + self.kind = 'NodeDeactivateStarted' diff --git a/customSDK/servicefabric/models/node_deactivation_info.py b/customSDK/servicefabric/models/node_deactivation_info.py new file mode 100644 index 00000000..33793611 --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivation_info.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeDeactivationInfo(Model): + """Information about the node deactivation. This information is valid for a + node that is undergoing deactivation or has already been deactivated. + + :param node_deactivation_intent: The intent or the reason for deactivating + the node. Following are the possible values for it. Possible values + include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' + :type node_deactivation_intent: str or + ~azure.servicefabric.models.NodeDeactivationIntent + :param node_deactivation_status: The status of node deactivation + operation. Following are the possible values. Possible values include: + 'None', 'SafetyCheckInProgress', 'SafetyCheckComplete', 'Completed' + :type node_deactivation_status: str or + ~azure.servicefabric.models.NodeDeactivationStatus + :param node_deactivation_task: List of tasks representing the deactivation + operation on the node. + :type node_deactivation_task: + list[~azure.servicefabric.models.NodeDeactivationTask] + :param pending_safety_checks: List of pending safety checks + :type pending_safety_checks: + list[~azure.servicefabric.models.SafetyCheckWrapper] + """ + + _attribute_map = { + 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, + 'node_deactivation_status': {'key': 'NodeDeactivationStatus', 'type': 'str'}, + 'node_deactivation_task': {'key': 'NodeDeactivationTask', 'type': '[NodeDeactivationTask]'}, + 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, + } + + def __init__(self, **kwargs): + super(NodeDeactivationInfo, self).__init__(**kwargs) + self.node_deactivation_intent = kwargs.get('node_deactivation_intent', None) + self.node_deactivation_status = kwargs.get('node_deactivation_status', None) + self.node_deactivation_task = kwargs.get('node_deactivation_task', None) + self.pending_safety_checks = kwargs.get('pending_safety_checks', None) diff --git a/customSDK/servicefabric/models/node_deactivation_info_py3.py b/customSDK/servicefabric/models/node_deactivation_info_py3.py new file mode 100644 index 00000000..aec06f70 --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivation_info_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeDeactivationInfo(Model): + """Information about the node deactivation. This information is valid for a + node that is undergoing deactivation or has already been deactivated. + + :param node_deactivation_intent: The intent or the reason for deactivating + the node. Following are the possible values for it. Possible values + include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' + :type node_deactivation_intent: str or + ~azure.servicefabric.models.NodeDeactivationIntent + :param node_deactivation_status: The status of node deactivation + operation. Following are the possible values. Possible values include: + 'None', 'SafetyCheckInProgress', 'SafetyCheckComplete', 'Completed' + :type node_deactivation_status: str or + ~azure.servicefabric.models.NodeDeactivationStatus + :param node_deactivation_task: List of tasks representing the deactivation + operation on the node. + :type node_deactivation_task: + list[~azure.servicefabric.models.NodeDeactivationTask] + :param pending_safety_checks: List of pending safety checks + :type pending_safety_checks: + list[~azure.servicefabric.models.SafetyCheckWrapper] + """ + + _attribute_map = { + 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, + 'node_deactivation_status': {'key': 'NodeDeactivationStatus', 'type': 'str'}, + 'node_deactivation_task': {'key': 'NodeDeactivationTask', 'type': '[NodeDeactivationTask]'}, + 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, + } + + def __init__(self, *, node_deactivation_intent=None, node_deactivation_status=None, node_deactivation_task=None, pending_safety_checks=None, **kwargs) -> None: + super(NodeDeactivationInfo, self).__init__(**kwargs) + self.node_deactivation_intent = node_deactivation_intent + self.node_deactivation_status = node_deactivation_status + self.node_deactivation_task = node_deactivation_task + self.pending_safety_checks = pending_safety_checks diff --git a/customSDK/servicefabric/models/node_deactivation_task.py b/customSDK/servicefabric/models/node_deactivation_task.py new file mode 100644 index 00000000..20f95a38 --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivation_task.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeDeactivationTask(Model): + """The task representing the deactivation operation on the node. + + :param node_deactivation_task_id: Identity of the task related to + deactivation operation on the node. + :type node_deactivation_task_id: + ~azure.servicefabric.models.NodeDeactivationTaskId + :param node_deactivation_intent: The intent or the reason for deactivating + the node. Following are the possible values for it. Possible values + include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' + :type node_deactivation_intent: str or + ~azure.servicefabric.models.NodeDeactivationIntent + """ + + _attribute_map = { + 'node_deactivation_task_id': {'key': 'NodeDeactivationTaskId', 'type': 'NodeDeactivationTaskId'}, + 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeDeactivationTask, self).__init__(**kwargs) + self.node_deactivation_task_id = kwargs.get('node_deactivation_task_id', None) + self.node_deactivation_intent = kwargs.get('node_deactivation_intent', None) diff --git a/customSDK/servicefabric/models/node_deactivation_task_id.py b/customSDK/servicefabric/models/node_deactivation_task_id.py new file mode 100644 index 00000000..f63ddb60 --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivation_task_id.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeDeactivationTaskId(Model): + """Identity of the task related to deactivation operation on the node. + + :param id: Value of the task id. + :type id: str + :param node_deactivation_task_type: The type of the task that performed + the node deactivation. Following are the possible values. Possible values + include: 'Invalid', 'Infrastructure', 'Repair', 'Client' + :type node_deactivation_task_type: str or + ~azure.servicefabric.models.NodeDeactivationTaskType + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'node_deactivation_task_type': {'key': 'NodeDeactivationTaskType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeDeactivationTaskId, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.node_deactivation_task_type = kwargs.get('node_deactivation_task_type', None) diff --git a/customSDK/servicefabric/models/node_deactivation_task_id_py3.py b/customSDK/servicefabric/models/node_deactivation_task_id_py3.py new file mode 100644 index 00000000..bf0c939c --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivation_task_id_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeDeactivationTaskId(Model): + """Identity of the task related to deactivation operation on the node. + + :param id: Value of the task id. + :type id: str + :param node_deactivation_task_type: The type of the task that performed + the node deactivation. Following are the possible values. Possible values + include: 'Invalid', 'Infrastructure', 'Repair', 'Client' + :type node_deactivation_task_type: str or + ~azure.servicefabric.models.NodeDeactivationTaskType + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'node_deactivation_task_type': {'key': 'NodeDeactivationTaskType', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, node_deactivation_task_type=None, **kwargs) -> None: + super(NodeDeactivationTaskId, self).__init__(**kwargs) + self.id = id + self.node_deactivation_task_type = node_deactivation_task_type diff --git a/customSDK/servicefabric/models/node_deactivation_task_py3.py b/customSDK/servicefabric/models/node_deactivation_task_py3.py new file mode 100644 index 00000000..5c949e7c --- /dev/null +++ b/customSDK/servicefabric/models/node_deactivation_task_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeDeactivationTask(Model): + """The task representing the deactivation operation on the node. + + :param node_deactivation_task_id: Identity of the task related to + deactivation operation on the node. + :type node_deactivation_task_id: + ~azure.servicefabric.models.NodeDeactivationTaskId + :param node_deactivation_intent: The intent or the reason for deactivating + the node. Following are the possible values for it. Possible values + include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' + :type node_deactivation_intent: str or + ~azure.servicefabric.models.NodeDeactivationIntent + """ + + _attribute_map = { + 'node_deactivation_task_id': {'key': 'NodeDeactivationTaskId', 'type': 'NodeDeactivationTaskId'}, + 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, + } + + def __init__(self, *, node_deactivation_task_id=None, node_deactivation_intent=None, **kwargs) -> None: + super(NodeDeactivationTask, self).__init__(**kwargs) + self.node_deactivation_task_id = node_deactivation_task_id + self.node_deactivation_intent = node_deactivation_intent diff --git a/customSDK/servicefabric/models/node_down_event.py b/customSDK/servicefabric/models/node_down_event.py new file mode 100644 index 00000000..b20b3d4b --- /dev/null +++ b/customSDK/servicefabric/models/node_down_event.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event import NodeEvent + + +class NodeDownEvent(NodeEvent): + """Node Down event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param last_node_up_at: Required. Time when Node was last up. + :type last_node_up_at: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'last_node_up_at': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'last_node_up_at': {'key': 'LastNodeUpAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(NodeDownEvent, self).__init__(**kwargs) + self.node_instance = kwargs.get('node_instance', None) + self.last_node_up_at = kwargs.get('last_node_up_at', None) + self.kind = 'NodeDown' diff --git a/customSDK/servicefabric/models/node_down_event_py3.py b/customSDK/servicefabric/models/node_down_event_py3.py new file mode 100644 index 00000000..7702aee9 --- /dev/null +++ b/customSDK/servicefabric/models/node_down_event_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event_py3 import NodeEvent + + +class NodeDownEvent(NodeEvent): + """Node Down event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param last_node_up_at: Required. Time when Node was last up. + :type last_node_up_at: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'last_node_up_at': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'last_node_up_at': {'key': 'LastNodeUpAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, last_node_up_at, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeDownEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance = node_instance + self.last_node_up_at = last_node_up_at + self.kind = 'NodeDown' diff --git a/customSDK/servicefabric/models/node_event.py b/customSDK/servicefabric/models/node_event.py new file mode 100644 index 00000000..b10fa82f --- /dev/null +++ b/customSDK/servicefabric/models/node_event.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .fabric_event import FabricEvent + + +class NodeEvent(FabricEvent): + """Represents the base for all Node Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NodeAbortedEvent, NodeAddedToClusterEvent, + NodeClosedEvent, NodeDeactivateCompletedEvent, NodeDeactivateStartedEvent, + NodeDownEvent, NodeNewHealthReportEvent, NodeHealthReportExpiredEvent, + NodeOpenSucceededEvent, NodeOpenFailedEvent, NodeRemovedFromClusterEvent, + NodeUpEvent, ChaosNodeRestartScheduledEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'NodeAborted': 'NodeAbortedEvent', 'NodeAddedToCluster': 'NodeAddedToClusterEvent', 'NodeClosed': 'NodeClosedEvent', 'NodeDeactivateCompleted': 'NodeDeactivateCompletedEvent', 'NodeDeactivateStarted': 'NodeDeactivateStartedEvent', 'NodeDown': 'NodeDownEvent', 'NodeNewHealthReport': 'NodeNewHealthReportEvent', 'NodeHealthReportExpired': 'NodeHealthReportExpiredEvent', 'NodeOpenSucceeded': 'NodeOpenSucceededEvent', 'NodeOpenFailed': 'NodeOpenFailedEvent', 'NodeRemovedFromCluster': 'NodeRemovedFromClusterEvent', 'NodeUp': 'NodeUpEvent', 'ChaosNodeRestartScheduled': 'ChaosNodeRestartScheduledEvent'} + } + + def __init__(self, **kwargs): + super(NodeEvent, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.kind = 'NodeEvent' diff --git a/customSDK/servicefabric/models/node_event_py3.py b/customSDK/servicefabric/models/node_event_py3.py new file mode 100644 index 00000000..1fd27413 --- /dev/null +++ b/customSDK/servicefabric/models/node_event_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .fabric_event_py3 import FabricEvent + + +class NodeEvent(FabricEvent): + """Represents the base for all Node Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NodeAbortedEvent, NodeAddedToClusterEvent, + NodeClosedEvent, NodeDeactivateCompletedEvent, NodeDeactivateStartedEvent, + NodeDownEvent, NodeNewHealthReportEvent, NodeHealthReportExpiredEvent, + NodeOpenSucceededEvent, NodeOpenFailedEvent, NodeRemovedFromClusterEvent, + NodeUpEvent, ChaosNodeRestartScheduledEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'NodeAborted': 'NodeAbortedEvent', 'NodeAddedToCluster': 'NodeAddedToClusterEvent', 'NodeClosed': 'NodeClosedEvent', 'NodeDeactivateCompleted': 'NodeDeactivateCompletedEvent', 'NodeDeactivateStarted': 'NodeDeactivateStartedEvent', 'NodeDown': 'NodeDownEvent', 'NodeNewHealthReport': 'NodeNewHealthReportEvent', 'NodeHealthReportExpired': 'NodeHealthReportExpiredEvent', 'NodeOpenSucceeded': 'NodeOpenSucceededEvent', 'NodeOpenFailed': 'NodeOpenFailedEvent', 'NodeRemovedFromCluster': 'NodeRemovedFromClusterEvent', 'NodeUp': 'NodeUpEvent', 'ChaosNodeRestartScheduled': 'ChaosNodeRestartScheduledEvent'} + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.node_name = node_name + self.kind = 'NodeEvent' diff --git a/customSDK/servicefabric/models/node_health.py b/customSDK/servicefabric/models/node_health.py new file mode 100644 index 00000000..174320ce --- /dev/null +++ b/customSDK/servicefabric/models/node_health.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health import EntityHealth + + +class NodeHealth(EntityHealth): + """Information about the health of a Service Fabric node. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param name: Name of the node whose health information is described by + this object. + :type name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeHealth, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/node_health_evaluation.py b/customSDK/servicefabric/models/node_health_evaluation.py new file mode 100644 index 00000000..3c38231d --- /dev/null +++ b/customSDK/servicefabric/models/node_health_evaluation.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class NodeHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a node, containing information about the + data and the algorithm used by health store to evaluate health. The + evaluation is returned only when the aggregated health state is either + Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the node. The types of the + unhealthy evaluations can be EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(NodeHealthEvaluation, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_health_evaluation_py3.py b/customSDK/servicefabric/models/node_health_evaluation_py3.py new file mode 100644 index 00000000..e40c3050 --- /dev/null +++ b/customSDK/servicefabric/models/node_health_evaluation_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class NodeHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a node, containing information about the + data and the algorithm used by health store to evaluate health. The + evaluation is returned only when the aggregated health state is either + Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the node. The types of the + unhealthy evaluations can be EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, node_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: + super(NodeHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.node_name = node_name + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_health_py3.py b/customSDK/servicefabric/models/node_health_py3.py new file mode 100644 index 00000000..54584deb --- /dev/null +++ b/customSDK/servicefabric/models/node_health_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_py3 import EntityHealth + + +class NodeHealth(EntityHealth): + """Information about the health of a Service Fabric node. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param name: Name of the node whose health information is described by + this object. + :type name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, **kwargs) -> None: + super(NodeHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.name = name diff --git a/customSDK/servicefabric/models/node_health_report_expired_event.py b/customSDK/servicefabric/models/node_health_report_expired_event.py new file mode 100644 index 00000000..961324f6 --- /dev/null +++ b/customSDK/servicefabric/models/node_health_report_expired_event.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event import NodeEvent + + +class NodeHealthReportExpiredEvent(NodeEvent): + """Node Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: Required. Id of Node instance. + :type node_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(NodeHealthReportExpiredEvent, self).__init__(**kwargs) + self.node_instance_id = kwargs.get('node_instance_id', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'NodeHealthReportExpired' diff --git a/customSDK/servicefabric/models/node_health_report_expired_event_py3.py b/customSDK/servicefabric/models/node_health_report_expired_event_py3.py new file mode 100644 index 00000000..8012e4bc --- /dev/null +++ b/customSDK/servicefabric/models/node_health_report_expired_event_py3.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event_py3 import NodeEvent + + +class NodeHealthReportExpiredEvent(NodeEvent): + """Node Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: Required. Id of Node instance. + :type node_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance_id = node_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'NodeHealthReportExpired' diff --git a/customSDK/servicefabric/models/node_health_state.py b/customSDK/servicefabric/models/node_health_state.py new file mode 100644 index 00000000..661af1b0 --- /dev/null +++ b/customSDK/servicefabric/models/node_health_state.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state import EntityHealthState + + +class NodeHealthState(EntityHealthState): + """Represents the health state of a node, which contains the node identifier + and its aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param name: The name of a Service Fabric node. + :type name: str + :param id: An internal ID used by Service Fabric to uniquely identify a + node. Node Id is deterministically generated from node name. + :type id: ~azure.servicefabric.models.NodeId + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'NodeId'}, + } + + def __init__(self, **kwargs): + super(NodeHealthState, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.id = kwargs.get('id', None) diff --git a/customSDK/servicefabric/models/node_health_state_chunk.py b/customSDK/servicefabric/models/node_health_state_chunk.py new file mode 100644 index 00000000..4493c068 --- /dev/null +++ b/customSDK/servicefabric/models/node_health_state_chunk.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk import EntityHealthStateChunk + + +class NodeHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a node, which contains the node name + and its aggregated health state. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of a Service Fabric node. + :type node_name: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeHealthStateChunk, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) diff --git a/customSDK/servicefabric/models/node_health_state_chunk_list.py b/customSDK/servicefabric/models/node_health_state_chunk_list.py new file mode 100644 index 00000000..c882e9e7 --- /dev/null +++ b/customSDK/servicefabric/models/node_health_state_chunk_list.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk_list import EntityHealthStateChunkList + + +class NodeHealthStateChunkList(EntityHealthStateChunkList): + """The list of node health state chunks in the cluster that respect the input + filters in the chunk query. Returned by get cluster health state chunks + query. + + :param total_count: Total number of entity health state objects that match + the specified filters from the cluster health chunk query description. + :type total_count: long + :param items: The list of node health state chunks that respect the input + filters in the chunk query. + :type items: list[~azure.servicefabric.models.NodeHealthStateChunk] + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'items': {'key': 'Items', 'type': '[NodeHealthStateChunk]'}, + } + + def __init__(self, **kwargs): + super(NodeHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/node_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/node_health_state_chunk_list_py3.py new file mode 100644 index 00000000..524176b4 --- /dev/null +++ b/customSDK/servicefabric/models/node_health_state_chunk_list_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk_list_py3 import EntityHealthStateChunkList + + +class NodeHealthStateChunkList(EntityHealthStateChunkList): + """The list of node health state chunks in the cluster that respect the input + filters in the chunk query. Returned by get cluster health state chunks + query. + + :param total_count: Total number of entity health state objects that match + the specified filters from the cluster health chunk query description. + :type total_count: long + :param items: The list of node health state chunks that respect the input + filters in the chunk query. + :type items: list[~azure.servicefabric.models.NodeHealthStateChunk] + """ + + _attribute_map = { + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'items': {'key': 'Items', 'type': '[NodeHealthStateChunk]'}, + } + + def __init__(self, *, total_count: int=None, items=None, **kwargs) -> None: + super(NodeHealthStateChunkList, self).__init__(total_count=total_count, **kwargs) + self.items = items diff --git a/customSDK/servicefabric/models/node_health_state_chunk_py3.py b/customSDK/servicefabric/models/node_health_state_chunk_py3.py new file mode 100644 index 00000000..52d4fbee --- /dev/null +++ b/customSDK/servicefabric/models/node_health_state_chunk_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk_py3 import EntityHealthStateChunk + + +class NodeHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a node, which contains the node name + and its aggregated health state. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of a Service Fabric node. + :type node_name: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + } + + def __init__(self, *, health_state=None, node_name: str=None, **kwargs) -> None: + super(NodeHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.node_name = node_name diff --git a/customSDK/servicefabric/models/node_health_state_filter.py b/customSDK/servicefabric/models/node_health_state_filter.py new file mode 100644 index 00000000..cd2e1a93 --- /dev/null +++ b/customSDK/servicefabric/models/node_health_state_filter.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeHealthStateFilter(Model): + """Defines matching criteria to determine whether a node should be included in + the returned cluster health chunk. + One filter can match zero, one or multiple nodes, depending on its + properties. + Can be specified in the cluster health chunk query description. + + :param node_name_filter: Name of the node that matches the filter. The + filter is applied only to the specified node, if it exists. + If the node doesn't exist, no node is returned in the cluster health chunk + based on this filter. + If the node exists, it is included in the cluster health chunk if the + health state matches the other filter properties. + If not specified, all nodes that match the parent filters (if any) are + taken into consideration and matched against the other filter members, + like health state filter. + :type node_name_filter: str + :param health_state_filter: The filter for the health state of the nodes. + It allows selecting nodes if they match the desired health states. + The possible values are integer value of one of the following health + states. Only nodes that match the filter are returned. All nodes are used + to evaluate the cluster aggregated health state. + If not specified, default value is None, unless the node name is + specified. If the filter has default value and node name is specified, the + matching node is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches nodes with HealthState + value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + """ + + _attribute_map = { + 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(NodeHealthStateFilter, self).__init__(**kwargs) + self.node_name_filter = kwargs.get('node_name_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) diff --git a/customSDK/servicefabric/models/node_health_state_filter_py3.py b/customSDK/servicefabric/models/node_health_state_filter_py3.py new file mode 100644 index 00000000..e6e59041 --- /dev/null +++ b/customSDK/servicefabric/models/node_health_state_filter_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeHealthStateFilter(Model): + """Defines matching criteria to determine whether a node should be included in + the returned cluster health chunk. + One filter can match zero, one or multiple nodes, depending on its + properties. + Can be specified in the cluster health chunk query description. + + :param node_name_filter: Name of the node that matches the filter. The + filter is applied only to the specified node, if it exists. + If the node doesn't exist, no node is returned in the cluster health chunk + based on this filter. + If the node exists, it is included in the cluster health chunk if the + health state matches the other filter properties. + If not specified, all nodes that match the parent filters (if any) are + taken into consideration and matched against the other filter members, + like health state filter. + :type node_name_filter: str + :param health_state_filter: The filter for the health state of the nodes. + It allows selecting nodes if they match the desired health states. + The possible values are integer value of one of the following health + states. Only nodes that match the filter are returned. All nodes are used + to evaluate the cluster aggregated health state. + If not specified, default value is None, unless the node name is + specified. If the filter has default value and node name is specified, the + matching node is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches nodes with HealthState + value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + """ + + _attribute_map = { + 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__(self, *, node_name_filter: str=None, health_state_filter: int=0, **kwargs) -> None: + super(NodeHealthStateFilter, self).__init__(**kwargs) + self.node_name_filter = node_name_filter + self.health_state_filter = health_state_filter diff --git a/customSDK/servicefabric/models/node_health_state_py3.py b/customSDK/servicefabric/models/node_health_state_py3.py new file mode 100644 index 00000000..eb1dcd11 --- /dev/null +++ b/customSDK/servicefabric/models/node_health_state_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_py3 import EntityHealthState + + +class NodeHealthState(EntityHealthState): + """Represents the health state of a node, which contains the node identifier + and its aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param name: The name of a Service Fabric node. + :type name: str + :param id: An internal ID used by Service Fabric to uniquely identify a + node. Node Id is deterministically generated from node name. + :type id: ~azure.servicefabric.models.NodeId + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'NodeId'}, + } + + def __init__(self, *, aggregated_health_state=None, name: str=None, id=None, **kwargs) -> None: + super(NodeHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.name = name + self.id = id diff --git a/customSDK/servicefabric/models/node_id.py b/customSDK/servicefabric/models/node_id.py new file mode 100644 index 00000000..9fc1e33a --- /dev/null +++ b/customSDK/servicefabric/models/node_id.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeId(Model): + """An internal ID used by Service Fabric to uniquely identify a node. Node Id + is deterministically generated from node name. + + :param id: Value of the node Id. This is a 128 bit integer. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeId, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/customSDK/servicefabric/models/node_id_py3.py b/customSDK/servicefabric/models/node_id_py3.py new file mode 100644 index 00000000..9e1ff8ca --- /dev/null +++ b/customSDK/servicefabric/models/node_id_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeId(Model): + """An internal ID used by Service Fabric to uniquely identify a node. Node Id + is deterministically generated from node name. + + :param id: Value of the node Id. This is a 128 bit integer. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(NodeId, self).__init__(**kwargs) + self.id = id diff --git a/customSDK/servicefabric/models/node_impact.py b/customSDK/servicefabric/models/node_impact.py new file mode 100644 index 00000000..fc2ba3d8 --- /dev/null +++ b/customSDK/servicefabric/models/node_impact.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeImpact(Model): + """Describes the expected impact of a repair to a particular node. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param node_name: Required. The name of the impacted node. + :type node_name: str + :param impact_level: The level of impact expected. Possible values + include: 'Invalid', 'None', 'Restart', 'RemoveData', 'RemoveNode' + :type impact_level: str or ~azure.servicefabric.models.ImpactLevel + """ + + _validation = { + 'node_name': {'required': True}, + } + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'impact_level': {'key': 'ImpactLevel', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeImpact, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.impact_level = kwargs.get('impact_level', None) diff --git a/customSDK/servicefabric/models/node_impact_py3.py b/customSDK/servicefabric/models/node_impact_py3.py new file mode 100644 index 00000000..679c9110 --- /dev/null +++ b/customSDK/servicefabric/models/node_impact_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeImpact(Model): + """Describes the expected impact of a repair to a particular node. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param node_name: Required. The name of the impacted node. + :type node_name: str + :param impact_level: The level of impact expected. Possible values + include: 'Invalid', 'None', 'Restart', 'RemoveData', 'RemoveNode' + :type impact_level: str or ~azure.servicefabric.models.ImpactLevel + """ + + _validation = { + 'node_name': {'required': True}, + } + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'impact_level': {'key': 'ImpactLevel', 'type': 'str'}, + } + + def __init__(self, *, node_name: str, impact_level=None, **kwargs) -> None: + super(NodeImpact, self).__init__(**kwargs) + self.node_name = node_name + self.impact_level = impact_level diff --git a/customSDK/servicefabric/models/node_info.py b/customSDK/servicefabric/models/node_info.py new file mode 100644 index 00000000..abde3036 --- /dev/null +++ b/customSDK/servicefabric/models/node_info.py @@ -0,0 +1,131 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeInfo(Model): + """Information about a node in Service Fabric cluster. + + :param name: The name of a Service Fabric node. + :type name: str + :param ip_address_or_fqdn: The IP address or fully qualified domain name + of the node. + :type ip_address_or_fqdn: str + :param type: The type of the node. + :type type: str + :param code_version: The version of Service Fabric binaries that the node + is running. + :type code_version: str + :param config_version: The version of Service Fabric cluster manifest that + the node is using. + :type config_version: str + :param node_status: The status of the node. Possible values include: + 'Invalid', 'Up', 'Down', 'Enabling', 'Disabling', 'Disabled', 'Unknown', + 'Removed' + :type node_status: str or ~azure.servicefabric.models.NodeStatus + :param node_up_time_in_seconds: Time in seconds since the node has been in + NodeStatus Up. Value zero indicates that the node is not Up. + :type node_up_time_in_seconds: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param is_seed_node: Indicates if the node is a seed node or not. Returns + true if the node is a seed node, otherwise false. A quorum of seed nodes + are required for proper operation of Service Fabric cluster. + :type is_seed_node: bool + :param upgrade_domain: The upgrade domain of the node. + :type upgrade_domain: str + :param fault_domain: The fault domain of the node. + :type fault_domain: str + :param id: An internal ID used by Service Fabric to uniquely identify a + node. Node Id is deterministically generated from node name. + :type id: ~azure.servicefabric.models.NodeId + :param instance_id: The ID representing the node instance. While the ID of + the node is deterministically generated from the node name and remains + same across restarts, the InstanceId changes every time node restarts. + :type instance_id: str + :param node_deactivation_info: Information about the node deactivation. + This information is valid for a node that is undergoing deactivation or + has already been deactivated. + :type node_deactivation_info: + ~azure.servicefabric.models.NodeDeactivationInfo + :param is_stopped: Indicates if the node is stopped by calling stop node + API or not. Returns true if the node is stopped, otherwise false. + :type is_stopped: bool + :param node_down_time_in_seconds: Time in seconds since the node has been + in NodeStatus Down. Value zero indicates node is not NodeStatus Down. + :type node_down_time_in_seconds: str + :param node_up_at: Date time in UTC when the node came up. If the node has + never been up then this value will be zero date time. + :type node_up_at: datetime + :param node_down_at: Date time in UTC when the node went down. If node has + never been down then this value will be zero date time. + :type node_down_at: datetime + :param node_tags: List that contains tags, which will be applied to the + nodes. + :type node_tags: list[str] + :param is_node_by_node_upgrade_in_progress: Indicates if a node-by-node + upgrade is currently being performed on this node. + :type is_node_by_node_upgrade_in_progress: bool + :param infrastructure_placement_id: PlacementID used by the + InfrastructureService. + :type infrastructure_placement_id: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'type': {'key': 'Type', 'type': 'str'}, + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'node_status': {'key': 'NodeStatus', 'type': 'str'}, + 'node_up_time_in_seconds': {'key': 'NodeUpTimeInSeconds', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'NodeId'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + 'node_deactivation_info': {'key': 'NodeDeactivationInfo', 'type': 'NodeDeactivationInfo'}, + 'is_stopped': {'key': 'IsStopped', 'type': 'bool'}, + 'node_down_time_in_seconds': {'key': 'NodeDownTimeInSeconds', 'type': 'str'}, + 'node_up_at': {'key': 'NodeUpAt', 'type': 'iso-8601'}, + 'node_down_at': {'key': 'NodeDownAt', 'type': 'iso-8601'}, + 'node_tags': {'key': 'NodeTags', 'type': '[str]'}, + 'is_node_by_node_upgrade_in_progress': {'key': 'IsNodeByNodeUpgradeInProgress', 'type': 'bool'}, + 'infrastructure_placement_id': {'key': 'InfrastructurePlacementID', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) + self.type = kwargs.get('type', None) + self.code_version = kwargs.get('code_version', None) + self.config_version = kwargs.get('config_version', None) + self.node_status = kwargs.get('node_status', None) + self.node_up_time_in_seconds = kwargs.get('node_up_time_in_seconds', None) + self.health_state = kwargs.get('health_state', None) + self.is_seed_node = kwargs.get('is_seed_node', None) + self.upgrade_domain = kwargs.get('upgrade_domain', None) + self.fault_domain = kwargs.get('fault_domain', None) + self.id = kwargs.get('id', None) + self.instance_id = kwargs.get('instance_id', None) + self.node_deactivation_info = kwargs.get('node_deactivation_info', None) + self.is_stopped = kwargs.get('is_stopped', None) + self.node_down_time_in_seconds = kwargs.get('node_down_time_in_seconds', None) + self.node_up_at = kwargs.get('node_up_at', None) + self.node_down_at = kwargs.get('node_down_at', None) + self.node_tags = kwargs.get('node_tags', None) + self.is_node_by_node_upgrade_in_progress = kwargs.get('is_node_by_node_upgrade_in_progress', None) + self.infrastructure_placement_id = kwargs.get('infrastructure_placement_id', None) diff --git a/customSDK/servicefabric/models/node_info_py3.py b/customSDK/servicefabric/models/node_info_py3.py new file mode 100644 index 00000000..b7d19cea --- /dev/null +++ b/customSDK/servicefabric/models/node_info_py3.py @@ -0,0 +1,131 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeInfo(Model): + """Information about a node in Service Fabric cluster. + + :param name: The name of a Service Fabric node. + :type name: str + :param ip_address_or_fqdn: The IP address or fully qualified domain name + of the node. + :type ip_address_or_fqdn: str + :param type: The type of the node. + :type type: str + :param code_version: The version of Service Fabric binaries that the node + is running. + :type code_version: str + :param config_version: The version of Service Fabric cluster manifest that + the node is using. + :type config_version: str + :param node_status: The status of the node. Possible values include: + 'Invalid', 'Up', 'Down', 'Enabling', 'Disabling', 'Disabled', 'Unknown', + 'Removed' + :type node_status: str or ~azure.servicefabric.models.NodeStatus + :param node_up_time_in_seconds: Time in seconds since the node has been in + NodeStatus Up. Value zero indicates that the node is not Up. + :type node_up_time_in_seconds: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param is_seed_node: Indicates if the node is a seed node or not. Returns + true if the node is a seed node, otherwise false. A quorum of seed nodes + are required for proper operation of Service Fabric cluster. + :type is_seed_node: bool + :param upgrade_domain: The upgrade domain of the node. + :type upgrade_domain: str + :param fault_domain: The fault domain of the node. + :type fault_domain: str + :param id: An internal ID used by Service Fabric to uniquely identify a + node. Node Id is deterministically generated from node name. + :type id: ~azure.servicefabric.models.NodeId + :param instance_id: The ID representing the node instance. While the ID of + the node is deterministically generated from the node name and remains + same across restarts, the InstanceId changes every time node restarts. + :type instance_id: str + :param node_deactivation_info: Information about the node deactivation. + This information is valid for a node that is undergoing deactivation or + has already been deactivated. + :type node_deactivation_info: + ~azure.servicefabric.models.NodeDeactivationInfo + :param is_stopped: Indicates if the node is stopped by calling stop node + API or not. Returns true if the node is stopped, otherwise false. + :type is_stopped: bool + :param node_down_time_in_seconds: Time in seconds since the node has been + in NodeStatus Down. Value zero indicates node is not NodeStatus Down. + :type node_down_time_in_seconds: str + :param node_up_at: Date time in UTC when the node came up. If the node has + never been up then this value will be zero date time. + :type node_up_at: datetime + :param node_down_at: Date time in UTC when the node went down. If node has + never been down then this value will be zero date time. + :type node_down_at: datetime + :param node_tags: List that contains tags, which will be applied to the + nodes. + :type node_tags: list[str] + :param is_node_by_node_upgrade_in_progress: Indicates if a node-by-node + upgrade is currently being performed on this node. + :type is_node_by_node_upgrade_in_progress: bool + :param infrastructure_placement_id: PlacementID used by the + InfrastructureService. + :type infrastructure_placement_id: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'type': {'key': 'Type', 'type': 'str'}, + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'node_status': {'key': 'NodeStatus', 'type': 'str'}, + 'node_up_time_in_seconds': {'key': 'NodeUpTimeInSeconds', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'id': {'key': 'Id', 'type': 'NodeId'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + 'node_deactivation_info': {'key': 'NodeDeactivationInfo', 'type': 'NodeDeactivationInfo'}, + 'is_stopped': {'key': 'IsStopped', 'type': 'bool'}, + 'node_down_time_in_seconds': {'key': 'NodeDownTimeInSeconds', 'type': 'str'}, + 'node_up_at': {'key': 'NodeUpAt', 'type': 'iso-8601'}, + 'node_down_at': {'key': 'NodeDownAt', 'type': 'iso-8601'}, + 'node_tags': {'key': 'NodeTags', 'type': '[str]'}, + 'is_node_by_node_upgrade_in_progress': {'key': 'IsNodeByNodeUpgradeInProgress', 'type': 'bool'}, + 'infrastructure_placement_id': {'key': 'InfrastructurePlacementID', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, ip_address_or_fqdn: str=None, type: str=None, code_version: str=None, config_version: str=None, node_status=None, node_up_time_in_seconds: str=None, health_state=None, is_seed_node: bool=None, upgrade_domain: str=None, fault_domain: str=None, id=None, instance_id: str=None, node_deactivation_info=None, is_stopped: bool=None, node_down_time_in_seconds: str=None, node_up_at=None, node_down_at=None, node_tags=None, is_node_by_node_upgrade_in_progress: bool=None, infrastructure_placement_id: str=None, **kwargs) -> None: + super(NodeInfo, self).__init__(**kwargs) + self.name = name + self.ip_address_or_fqdn = ip_address_or_fqdn + self.type = type + self.code_version = code_version + self.config_version = config_version + self.node_status = node_status + self.node_up_time_in_seconds = node_up_time_in_seconds + self.health_state = health_state + self.is_seed_node = is_seed_node + self.upgrade_domain = upgrade_domain + self.fault_domain = fault_domain + self.id = id + self.instance_id = instance_id + self.node_deactivation_info = node_deactivation_info + self.is_stopped = is_stopped + self.node_down_time_in_seconds = node_down_time_in_seconds + self.node_up_at = node_up_at + self.node_down_at = node_down_at + self.node_tags = node_tags + self.is_node_by_node_upgrade_in_progress = is_node_by_node_upgrade_in_progress + self.infrastructure_placement_id = infrastructure_placement_id diff --git a/customSDK/servicefabric/models/node_load_info.py b/customSDK/servicefabric/models/node_load_info.py new file mode 100644 index 00000000..45c4cfce --- /dev/null +++ b/customSDK/servicefabric/models/node_load_info.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeLoadInfo(Model): + """Information about load on a Service Fabric node. It holds a summary of all + metrics and their load on a node. + + :param node_name: Name of the node for which the load information is + provided by this object. + :type node_name: str + :param node_load_metric_information: List that contains metrics and their + load information on this node. + :type node_load_metric_information: + list[~azure.servicefabric.models.NodeLoadMetricInformation] + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_load_metric_information': {'key': 'NodeLoadMetricInformation', 'type': '[NodeLoadMetricInformation]'}, + } + + def __init__(self, **kwargs): + super(NodeLoadInfo, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.node_load_metric_information = kwargs.get('node_load_metric_information', None) diff --git a/customSDK/servicefabric/models/node_load_info_py3.py b/customSDK/servicefabric/models/node_load_info_py3.py new file mode 100644 index 00000000..4124daeb --- /dev/null +++ b/customSDK/servicefabric/models/node_load_info_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeLoadInfo(Model): + """Information about load on a Service Fabric node. It holds a summary of all + metrics and their load on a node. + + :param node_name: Name of the node for which the load information is + provided by this object. + :type node_name: str + :param node_load_metric_information: List that contains metrics and their + load information on this node. + :type node_load_metric_information: + list[~azure.servicefabric.models.NodeLoadMetricInformation] + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_load_metric_information': {'key': 'NodeLoadMetricInformation', 'type': '[NodeLoadMetricInformation]'}, + } + + def __init__(self, *, node_name: str=None, node_load_metric_information=None, **kwargs) -> None: + super(NodeLoadInfo, self).__init__(**kwargs) + self.node_name = node_name + self.node_load_metric_information = node_load_metric_information diff --git a/customSDK/servicefabric/models/node_load_metric_information.py b/customSDK/servicefabric/models/node_load_metric_information.py new file mode 100644 index 00000000..7f66076b --- /dev/null +++ b/customSDK/servicefabric/models/node_load_metric_information.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeLoadMetricInformation(Model): + """Represents data structure that contains load information for a certain + metric on a node. + + :param name: Name of the metric for which this load information is + provided. + :type name: str + :param node_capacity: Total capacity on the node for this metric. + :type node_capacity: str + :param node_load: Current load on the node for this metric. In future + releases of Service Fabric this parameter will be deprecated in favor of + CurrentNodeLoad. + :type node_load: str + :param node_remaining_capacity: The remaining capacity on the node for + this metric. In future releases of Service Fabric this parameter will be + deprecated in favor of NodeCapacityRemaining. + :type node_remaining_capacity: str + :param is_capacity_violation: Indicates if there is a capacity violation + for this metric on the node. + :type is_capacity_violation: bool + :param node_buffered_capacity: The value that indicates the reserved + capacity for this metric on the node. + :type node_buffered_capacity: str + :param node_remaining_buffered_capacity: The remaining reserved capacity + for this metric on the node. In future releases of Service Fabric this + parameter will be deprecated in favor of BufferedNodeCapacityRemaining. + :type node_remaining_buffered_capacity: str + :param current_node_load: Current load on the node for this metric. + :type current_node_load: str + :param node_capacity_remaining: The remaining capacity on the node for the + metric. + :type node_capacity_remaining: str + :param buffered_node_capacity_remaining: The remaining capacity which is + not reserved by NodeBufferPercentage for this metric on the node. + :type buffered_node_capacity_remaining: str + :param planned_node_load_removal: This value represents the load of the + replicas that are planned to be removed in the future. + This kind of load is reported for replicas that are currently being moving + to other nodes and for replicas that are currently being dropped but still + use the load on the source node. + :type planned_node_load_removal: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'node_capacity': {'key': 'NodeCapacity', 'type': 'str'}, + 'node_load': {'key': 'NodeLoad', 'type': 'str'}, + 'node_remaining_capacity': {'key': 'NodeRemainingCapacity', 'type': 'str'}, + 'is_capacity_violation': {'key': 'IsCapacityViolation', 'type': 'bool'}, + 'node_buffered_capacity': {'key': 'NodeBufferedCapacity', 'type': 'str'}, + 'node_remaining_buffered_capacity': {'key': 'NodeRemainingBufferedCapacity', 'type': 'str'}, + 'current_node_load': {'key': 'CurrentNodeLoad', 'type': 'str'}, + 'node_capacity_remaining': {'key': 'NodeCapacityRemaining', 'type': 'str'}, + 'buffered_node_capacity_remaining': {'key': 'BufferedNodeCapacityRemaining', 'type': 'str'}, + 'planned_node_load_removal': {'key': 'PlannedNodeLoadRemoval', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeLoadMetricInformation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.node_capacity = kwargs.get('node_capacity', None) + self.node_load = kwargs.get('node_load', None) + self.node_remaining_capacity = kwargs.get('node_remaining_capacity', None) + self.is_capacity_violation = kwargs.get('is_capacity_violation', None) + self.node_buffered_capacity = kwargs.get('node_buffered_capacity', None) + self.node_remaining_buffered_capacity = kwargs.get('node_remaining_buffered_capacity', None) + self.current_node_load = kwargs.get('current_node_load', None) + self.node_capacity_remaining = kwargs.get('node_capacity_remaining', None) + self.buffered_node_capacity_remaining = kwargs.get('buffered_node_capacity_remaining', None) + self.planned_node_load_removal = kwargs.get('planned_node_load_removal', None) diff --git a/customSDK/servicefabric/models/node_load_metric_information_py3.py b/customSDK/servicefabric/models/node_load_metric_information_py3.py new file mode 100644 index 00000000..009f09d2 --- /dev/null +++ b/customSDK/servicefabric/models/node_load_metric_information_py3.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeLoadMetricInformation(Model): + """Represents data structure that contains load information for a certain + metric on a node. + + :param name: Name of the metric for which this load information is + provided. + :type name: str + :param node_capacity: Total capacity on the node for this metric. + :type node_capacity: str + :param node_load: Current load on the node for this metric. In future + releases of Service Fabric this parameter will be deprecated in favor of + CurrentNodeLoad. + :type node_load: str + :param node_remaining_capacity: The remaining capacity on the node for + this metric. In future releases of Service Fabric this parameter will be + deprecated in favor of NodeCapacityRemaining. + :type node_remaining_capacity: str + :param is_capacity_violation: Indicates if there is a capacity violation + for this metric on the node. + :type is_capacity_violation: bool + :param node_buffered_capacity: The value that indicates the reserved + capacity for this metric on the node. + :type node_buffered_capacity: str + :param node_remaining_buffered_capacity: The remaining reserved capacity + for this metric on the node. In future releases of Service Fabric this + parameter will be deprecated in favor of BufferedNodeCapacityRemaining. + :type node_remaining_buffered_capacity: str + :param current_node_load: Current load on the node for this metric. + :type current_node_load: str + :param node_capacity_remaining: The remaining capacity on the node for the + metric. + :type node_capacity_remaining: str + :param buffered_node_capacity_remaining: The remaining capacity which is + not reserved by NodeBufferPercentage for this metric on the node. + :type buffered_node_capacity_remaining: str + :param planned_node_load_removal: This value represents the load of the + replicas that are planned to be removed in the future. + This kind of load is reported for replicas that are currently being moving + to other nodes and for replicas that are currently being dropped but still + use the load on the source node. + :type planned_node_load_removal: str + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'node_capacity': {'key': 'NodeCapacity', 'type': 'str'}, + 'node_load': {'key': 'NodeLoad', 'type': 'str'}, + 'node_remaining_capacity': {'key': 'NodeRemainingCapacity', 'type': 'str'}, + 'is_capacity_violation': {'key': 'IsCapacityViolation', 'type': 'bool'}, + 'node_buffered_capacity': {'key': 'NodeBufferedCapacity', 'type': 'str'}, + 'node_remaining_buffered_capacity': {'key': 'NodeRemainingBufferedCapacity', 'type': 'str'}, + 'current_node_load': {'key': 'CurrentNodeLoad', 'type': 'str'}, + 'node_capacity_remaining': {'key': 'NodeCapacityRemaining', 'type': 'str'}, + 'buffered_node_capacity_remaining': {'key': 'BufferedNodeCapacityRemaining', 'type': 'str'}, + 'planned_node_load_removal': {'key': 'PlannedNodeLoadRemoval', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, node_capacity: str=None, node_load: str=None, node_remaining_capacity: str=None, is_capacity_violation: bool=None, node_buffered_capacity: str=None, node_remaining_buffered_capacity: str=None, current_node_load: str=None, node_capacity_remaining: str=None, buffered_node_capacity_remaining: str=None, planned_node_load_removal: str=None, **kwargs) -> None: + super(NodeLoadMetricInformation, self).__init__(**kwargs) + self.name = name + self.node_capacity = node_capacity + self.node_load = node_load + self.node_remaining_capacity = node_remaining_capacity + self.is_capacity_violation = is_capacity_violation + self.node_buffered_capacity = node_buffered_capacity + self.node_remaining_buffered_capacity = node_remaining_buffered_capacity + self.current_node_load = current_node_load + self.node_capacity_remaining = node_capacity_remaining + self.buffered_node_capacity_remaining = buffered_node_capacity_remaining + self.planned_node_load_removal = planned_node_load_removal diff --git a/customSDK/servicefabric/models/node_new_health_report_event.py b/customSDK/servicefabric/models/node_new_health_report_event.py new file mode 100644 index 00000000..d8f835a0 --- /dev/null +++ b/customSDK/servicefabric/models/node_new_health_report_event.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event import NodeEvent + + +class NodeNewHealthReportEvent(NodeEvent): + """Node Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: Required. Id of Node instance. + :type node_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(NodeNewHealthReportEvent, self).__init__(**kwargs) + self.node_instance_id = kwargs.get('node_instance_id', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'NodeNewHealthReport' diff --git a/customSDK/servicefabric/models/node_new_health_report_event_py3.py b/customSDK/servicefabric/models/node_new_health_report_event_py3.py new file mode 100644 index 00000000..bf7a0eff --- /dev/null +++ b/customSDK/servicefabric/models/node_new_health_report_event_py3.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event_py3 import NodeEvent + + +class NodeNewHealthReportEvent(NodeEvent): + """Node Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: Required. Id of Node instance. + :type node_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance_id = node_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'NodeNewHealthReport' diff --git a/customSDK/servicefabric/models/node_open_failed_event.py b/customSDK/servicefabric/models/node_open_failed_event.py new file mode 100644 index 00000000..e7fb8fbe --- /dev/null +++ b/customSDK/servicefabric/models/node_open_failed_event.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event import NodeEvent + + +class NodeOpenFailedEvent(NodeEvent): + """Node Open Failed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_id: Required. Id of Node. + :type node_id: str + :param upgrade_domain: Required. Upgrade domain of Node. + :type upgrade_domain: str + :param fault_domain: Required. Fault domain of Node. + :type fault_domain: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param hostname: Required. Name of Host. + :type hostname: str + :param is_seed_node: Required. Indicates if it is seed node. + :type is_seed_node: bool + :param node_version: Required. Version of Node. + :type node_version: str + :param error: Required. Describes the error. + :type error: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + 'error': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + 'error': {'key': 'Error', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeOpenFailedEvent, self).__init__(**kwargs) + self.node_instance = kwargs.get('node_instance', None) + self.node_id = kwargs.get('node_id', None) + self.upgrade_domain = kwargs.get('upgrade_domain', None) + self.fault_domain = kwargs.get('fault_domain', None) + self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) + self.hostname = kwargs.get('hostname', None) + self.is_seed_node = kwargs.get('is_seed_node', None) + self.node_version = kwargs.get('node_version', None) + self.error = kwargs.get('error', None) + self.kind = 'NodeOpenFailed' diff --git a/customSDK/servicefabric/models/node_open_failed_event_py3.py b/customSDK/servicefabric/models/node_open_failed_event_py3.py new file mode 100644 index 00000000..8f9e240f --- /dev/null +++ b/customSDK/servicefabric/models/node_open_failed_event_py3.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event_py3 import NodeEvent + + +class NodeOpenFailedEvent(NodeEvent): + """Node Open Failed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_id: Required. Id of Node. + :type node_id: str + :param upgrade_domain: Required. Upgrade domain of Node. + :type upgrade_domain: str + :param fault_domain: Required. Fault domain of Node. + :type fault_domain: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param hostname: Required. Name of Host. + :type hostname: str + :param is_seed_node: Required. Indicates if it is seed node. + :type is_seed_node: bool + :param node_version: Required. Version of Node. + :type node_version: str + :param error: Required. Describes the error. + :type error: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + 'error': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + 'error': {'key': 'Error', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, node_id: str, upgrade_domain: str, fault_domain: str, ip_address_or_fqdn: str, hostname: str, is_seed_node: bool, node_version: str, error: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeOpenFailedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance = node_instance + self.node_id = node_id + self.upgrade_domain = upgrade_domain + self.fault_domain = fault_domain + self.ip_address_or_fqdn = ip_address_or_fqdn + self.hostname = hostname + self.is_seed_node = is_seed_node + self.node_version = node_version + self.error = error + self.kind = 'NodeOpenFailed' diff --git a/customSDK/servicefabric/models/node_open_succeeded_event.py b/customSDK/servicefabric/models/node_open_succeeded_event.py new file mode 100644 index 00000000..a0ab8edc --- /dev/null +++ b/customSDK/servicefabric/models/node_open_succeeded_event.py @@ -0,0 +1,94 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event import NodeEvent + + +class NodeOpenSucceededEvent(NodeEvent): + """Node Opened Succeeded event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_id: Required. Id of Node. + :type node_id: str + :param upgrade_domain: Required. Upgrade domain of Node. + :type upgrade_domain: str + :param fault_domain: Required. Fault domain of Node. + :type fault_domain: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param hostname: Required. Name of Host. + :type hostname: str + :param is_seed_node: Required. Indicates if it is seed node. + :type is_seed_node: bool + :param node_version: Required. Version of Node. + :type node_version: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeOpenSucceededEvent, self).__init__(**kwargs) + self.node_instance = kwargs.get('node_instance', None) + self.node_id = kwargs.get('node_id', None) + self.upgrade_domain = kwargs.get('upgrade_domain', None) + self.fault_domain = kwargs.get('fault_domain', None) + self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) + self.hostname = kwargs.get('hostname', None) + self.is_seed_node = kwargs.get('is_seed_node', None) + self.node_version = kwargs.get('node_version', None) + self.kind = 'NodeOpenSucceeded' diff --git a/customSDK/servicefabric/models/node_open_succeeded_event_py3.py b/customSDK/servicefabric/models/node_open_succeeded_event_py3.py new file mode 100644 index 00000000..e29ba22f --- /dev/null +++ b/customSDK/servicefabric/models/node_open_succeeded_event_py3.py @@ -0,0 +1,94 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event_py3 import NodeEvent + + +class NodeOpenSucceededEvent(NodeEvent): + """Node Opened Succeeded event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_id: Required. Id of Node. + :type node_id: str + :param upgrade_domain: Required. Upgrade domain of Node. + :type upgrade_domain: str + :param fault_domain: Required. Fault domain of Node. + :type fault_domain: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param hostname: Required. Name of Host. + :type hostname: str + :param is_seed_node: Required. Indicates if it is seed node. + :type is_seed_node: bool + :param node_version: Required. Version of Node. + :type node_version: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'node_id': {'required': True}, + 'upgrade_domain': {'required': True}, + 'fault_domain': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'hostname': {'required': True}, + 'is_seed_node': {'required': True}, + 'node_version': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'hostname': {'key': 'Hostname', 'type': 'str'}, + 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, + 'node_version': {'key': 'NodeVersion', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, node_id: str, upgrade_domain: str, fault_domain: str, ip_address_or_fqdn: str, hostname: str, is_seed_node: bool, node_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeOpenSucceededEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance = node_instance + self.node_id = node_id + self.upgrade_domain = upgrade_domain + self.fault_domain = fault_domain + self.ip_address_or_fqdn = ip_address_or_fqdn + self.hostname = hostname + self.is_seed_node = is_seed_node + self.node_version = node_version + self.kind = 'NodeOpenSucceeded' diff --git a/customSDK/servicefabric/models/node_removed_from_cluster_event.py b/customSDK/servicefabric/models/node_removed_from_cluster_event.py new file mode 100644 index 00000000..651954f9 --- /dev/null +++ b/customSDK/servicefabric/models/node_removed_from_cluster_event.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event import NodeEvent + + +class NodeRemovedFromClusterEvent(NodeEvent): + """Node Removed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_id: Required. Id of Node. + :type node_id: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_type: Required. Type of Node. + :type node_type: str + :param fabric_version: Required. Fabric version. + :type fabric_version: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param node_capacities: Required. Capacities. + :type node_capacities: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'node_type': {'required': True}, + 'fabric_version': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'node_capacities': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_type': {'key': 'NodeType', 'type': 'str'}, + 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeRemovedFromClusterEvent, self).__init__(**kwargs) + self.node_id = kwargs.get('node_id', None) + self.node_instance = kwargs.get('node_instance', None) + self.node_type = kwargs.get('node_type', None) + self.fabric_version = kwargs.get('fabric_version', None) + self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) + self.node_capacities = kwargs.get('node_capacities', None) + self.kind = 'NodeRemovedFromCluster' diff --git a/customSDK/servicefabric/models/node_removed_from_cluster_event_py3.py b/customSDK/servicefabric/models/node_removed_from_cluster_event_py3.py new file mode 100644 index 00000000..dfbf977f --- /dev/null +++ b/customSDK/servicefabric/models/node_removed_from_cluster_event_py3.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event_py3 import NodeEvent + + +class NodeRemovedFromClusterEvent(NodeEvent): + """Node Removed event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_id: Required. Id of Node. + :type node_id: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param node_type: Required. Type of Node. + :type node_type: str + :param fabric_version: Required. Fabric version. + :type fabric_version: str + :param ip_address_or_fqdn: Required. IP address or FQDN. + :type ip_address_or_fqdn: str + :param node_capacities: Required. Capacities. + :type node_capacities: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_id': {'required': True}, + 'node_instance': {'required': True}, + 'node_type': {'required': True}, + 'fabric_version': {'required': True}, + 'ip_address_or_fqdn': {'required': True}, + 'node_capacities': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_id': {'key': 'NodeId', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'node_type': {'key': 'NodeType', 'type': 'str'}, + 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, + 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, + 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_id: str, node_instance: int, node_type: str, fabric_version: str, ip_address_or_fqdn: str, node_capacities: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeRemovedFromClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_id = node_id + self.node_instance = node_instance + self.node_type = node_type + self.fabric_version = fabric_version + self.ip_address_or_fqdn = ip_address_or_fqdn + self.node_capacities = node_capacities + self.kind = 'NodeRemovedFromCluster' diff --git a/customSDK/servicefabric/models/node_repair_impact_description.py b/customSDK/servicefabric/models/node_repair_impact_description.py new file mode 100644 index 00000000..cf0eb237 --- /dev/null +++ b/customSDK/servicefabric/models/node_repair_impact_description.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .repair_impact_description_base import RepairImpactDescriptionBase + + +class NodeRepairImpactDescription(RepairImpactDescriptionBase): + """Describes the expected impact of a repair on a set of nodes. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param node_impact_list: The list of nodes impacted by a repair action and + their respective expected impact. + :type node_impact_list: list[~azure.servicefabric.models.NodeImpact] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_impact_list': {'key': 'NodeImpactList', 'type': '[NodeImpact]'}, + } + + def __init__(self, **kwargs): + super(NodeRepairImpactDescription, self).__init__(**kwargs) + self.node_impact_list = kwargs.get('node_impact_list', None) + self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_repair_impact_description_py3.py b/customSDK/servicefabric/models/node_repair_impact_description_py3.py new file mode 100644 index 00000000..09f45ce8 --- /dev/null +++ b/customSDK/servicefabric/models/node_repair_impact_description_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .repair_impact_description_base_py3 import RepairImpactDescriptionBase + + +class NodeRepairImpactDescription(RepairImpactDescriptionBase): + """Describes the expected impact of a repair on a set of nodes. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param node_impact_list: The list of nodes impacted by a repair action and + their respective expected impact. + :type node_impact_list: list[~azure.servicefabric.models.NodeImpact] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_impact_list': {'key': 'NodeImpactList', 'type': '[NodeImpact]'}, + } + + def __init__(self, *, node_impact_list=None, **kwargs) -> None: + super(NodeRepairImpactDescription, self).__init__(**kwargs) + self.node_impact_list = node_impact_list + self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_repair_target_description.py b/customSDK/servicefabric/models/node_repair_target_description.py new file mode 100644 index 00000000..5a2eff32 --- /dev/null +++ b/customSDK/servicefabric/models/node_repair_target_description.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .repair_target_description_base import RepairTargetDescriptionBase + + +class NodeRepairTargetDescription(RepairTargetDescriptionBase): + """Describes the list of nodes targeted by a repair action. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param node_names: The list of nodes targeted by a repair action. + :type node_names: list[str] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_names': {'key': 'NodeNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(NodeRepairTargetDescription, self).__init__(**kwargs) + self.node_names = kwargs.get('node_names', None) + self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_repair_target_description_py3.py b/customSDK/servicefabric/models/node_repair_target_description_py3.py new file mode 100644 index 00000000..88204018 --- /dev/null +++ b/customSDK/servicefabric/models/node_repair_target_description_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .repair_target_description_base_py3 import RepairTargetDescriptionBase + + +class NodeRepairTargetDescription(RepairTargetDescriptionBase): + """Describes the list of nodes targeted by a repair action. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param node_names: The list of nodes targeted by a repair action. + :type node_names: list[str] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_names': {'key': 'NodeNames', 'type': '[str]'}, + } + + def __init__(self, *, node_names=None, **kwargs) -> None: + super(NodeRepairTargetDescription, self).__init__(**kwargs) + self.node_names = node_names + self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_result.py b/customSDK/servicefabric/models/node_result.py new file mode 100644 index 00000000..54e79ef1 --- /dev/null +++ b/customSDK/servicefabric/models/node_result.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeResult(Model): + """Contains information about a node that was targeted by a user-induced + operation. + + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: The node instance id. + :type node_instance_id: str + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeResult, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.node_instance_id = kwargs.get('node_instance_id', None) diff --git a/customSDK/servicefabric/models/node_result_py3.py b/customSDK/servicefabric/models/node_result_py3.py new file mode 100644 index 00000000..6efb6638 --- /dev/null +++ b/customSDK/servicefabric/models/node_result_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeResult(Model): + """Contains information about a node that was targeted by a user-induced + operation. + + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: The node instance id. + :type node_instance_id: str + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + } + + def __init__(self, *, node_name: str=None, node_instance_id: str=None, **kwargs) -> None: + super(NodeResult, self).__init__(**kwargs) + self.node_name = node_name + self.node_instance_id = node_instance_id diff --git a/customSDK/servicefabric/models/node_tags_description.py b/customSDK/servicefabric/models/node_tags_description.py new file mode 100644 index 00000000..1ab5d873 --- /dev/null +++ b/customSDK/servicefabric/models/node_tags_description.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeTagsDescription(Model): + """Describes the tags required for placement or running of the service. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. The number of tags. + :type count: int + :param tags: Required. Array of size specified by the ‘Count’ parameter, + for the placement tags of the service. + :type tags: list[str] + """ + + _validation = { + 'count': {'required': True}, + 'tags': {'required': True}, + } + + _attribute_map = { + 'count': {'key': 'Count', 'type': 'int'}, + 'tags': {'key': 'Tags', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(NodeTagsDescription, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.tags = kwargs.get('tags', None) diff --git a/customSDK/servicefabric/models/node_tags_description_py3.py b/customSDK/servicefabric/models/node_tags_description_py3.py new file mode 100644 index 00000000..3dd9e60c --- /dev/null +++ b/customSDK/servicefabric/models/node_tags_description_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeTagsDescription(Model): + """Describes the tags required for placement or running of the service. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. The number of tags. + :type count: int + :param tags: Required. Array of size specified by the ‘Count’ parameter, + for the placement tags of the service. + :type tags: list[str] + """ + + _validation = { + 'count': {'required': True}, + 'tags': {'required': True}, + } + + _attribute_map = { + 'count': {'key': 'Count', 'type': 'int'}, + 'tags': {'key': 'Tags', 'type': '[str]'}, + } + + def __init__(self, *, count: int, tags, **kwargs) -> None: + super(NodeTagsDescription, self).__init__(**kwargs) + self.count = count + self.tags = tags diff --git a/customSDK/servicefabric/models/node_transition_progress.py b/customSDK/servicefabric/models/node_transition_progress.py new file mode 100644 index 00000000..f60972ef --- /dev/null +++ b/customSDK/servicefabric/models/node_transition_progress.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeTransitionProgress(Model): + """Information about an NodeTransition operation. This class contains an + OperationState and a NodeTransitionResult. The NodeTransitionResult is not + valid until OperationState + is Completed or Faulted. + + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param node_transition_result: Represents information about an operation + in a terminal state (Completed or Faulted). + :type node_transition_result: + ~azure.servicefabric.models.NodeTransitionResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'node_transition_result': {'key': 'NodeTransitionResult', 'type': 'NodeTransitionResult'}, + } + + def __init__(self, **kwargs): + super(NodeTransitionProgress, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.node_transition_result = kwargs.get('node_transition_result', None) diff --git a/customSDK/servicefabric/models/node_transition_progress_py3.py b/customSDK/servicefabric/models/node_transition_progress_py3.py new file mode 100644 index 00000000..3a748068 --- /dev/null +++ b/customSDK/servicefabric/models/node_transition_progress_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeTransitionProgress(Model): + """Information about an NodeTransition operation. This class contains an + OperationState and a NodeTransitionResult. The NodeTransitionResult is not + valid until OperationState + is Completed or Faulted. + + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param node_transition_result: Represents information about an operation + in a terminal state (Completed or Faulted). + :type node_transition_result: + ~azure.servicefabric.models.NodeTransitionResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'node_transition_result': {'key': 'NodeTransitionResult', 'type': 'NodeTransitionResult'}, + } + + def __init__(self, *, state=None, node_transition_result=None, **kwargs) -> None: + super(NodeTransitionProgress, self).__init__(**kwargs) + self.state = state + self.node_transition_result = node_transition_result diff --git a/customSDK/servicefabric/models/node_transition_result.py b/customSDK/servicefabric/models/node_transition_result.py new file mode 100644 index 00000000..45185d51 --- /dev/null +++ b/customSDK/servicefabric/models/node_transition_result.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeTransitionResult(Model): + """Represents information about an operation in a terminal state (Completed or + Faulted). + + :param error_code: If OperationState is Completed, this is 0. If + OperationState is Faulted, this is an error code indicating the reason. + :type error_code: int + :param node_result: Contains information about a node that was targeted by + a user-induced operation. + :type node_result: ~azure.servicefabric.models.NodeResult + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'node_result': {'key': 'NodeResult', 'type': 'NodeResult'}, + } + + def __init__(self, **kwargs): + super(NodeTransitionResult, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.node_result = kwargs.get('node_result', None) diff --git a/customSDK/servicefabric/models/node_transition_result_py3.py b/customSDK/servicefabric/models/node_transition_result_py3.py new file mode 100644 index 00000000..17cbc327 --- /dev/null +++ b/customSDK/servicefabric/models/node_transition_result_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeTransitionResult(Model): + """Represents information about an operation in a terminal state (Completed or + Faulted). + + :param error_code: If OperationState is Completed, this is 0. If + OperationState is Faulted, this is an error code indicating the reason. + :type error_code: int + :param node_result: Contains information about a node that was targeted by + a user-induced operation. + :type node_result: ~azure.servicefabric.models.NodeResult + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'node_result': {'key': 'NodeResult', 'type': 'NodeResult'}, + } + + def __init__(self, *, error_code: int=None, node_result=None, **kwargs) -> None: + super(NodeTransitionResult, self).__init__(**kwargs) + self.error_code = error_code + self.node_result = node_result diff --git a/customSDK/servicefabric/models/node_type_health_policy_map_item.py b/customSDK/servicefabric/models/node_type_health_policy_map_item.py new file mode 100644 index 00000000..f9494a31 --- /dev/null +++ b/customSDK/servicefabric/models/node_type_health_policy_map_item.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeTypeHealthPolicyMapItem(Model): + """Defines an item in NodeTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the node type health policy map item. + This is the name of the node type. + :type key: str + :param value: Required. The value of the node type health policy map item. + If the percentage is respected but there is at least one unhealthy node in + the node type, the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes + over the total number of nodes in the node type. + The computation rounds up to tolerate one failure on small numbers of + nodes. + The max percent unhealthy nodes allowed for the node type. Must be between + zero and 100. + :type value: int + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(NodeTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/node_type_health_policy_map_item_py3.py b/customSDK/servicefabric/models/node_type_health_policy_map_item_py3.py new file mode 100644 index 00000000..975a43ef --- /dev/null +++ b/customSDK/servicefabric/models/node_type_health_policy_map_item_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeTypeHealthPolicyMapItem(Model): + """Defines an item in NodeTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the node type health policy map item. + This is the name of the node type. + :type key: str + :param value: Required. The value of the node type health policy map item. + If the percentage is respected but there is at least one unhealthy node in + the node type, the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes + over the total number of nodes in the node type. + The computation rounds up to tolerate one failure on small numbers of + nodes. + The max percent unhealthy nodes allowed for the node type. Must be between + zero and 100. + :type value: int + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + } + + def __init__(self, *, key: str, value: int, **kwargs) -> None: + super(NodeTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = key + self.value = value diff --git a/customSDK/servicefabric/models/node_type_nodes_health_evaluation.py b/customSDK/servicefabric/models/node_type_nodes_health_evaluation.py new file mode 100644 index 00000000..37344708 --- /dev/null +++ b/customSDK/servicefabric/models/node_type_nodes_health_evaluation.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class NodeTypeNodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for nodes of a particular node type. The node + type nodes evaluation can be returned when cluster health evaluation + returns unhealthy aggregated health state, either Error or Warning. It + contains health evaluations for each unhealthy node of the included node + type that impacted current aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_type_name: The node type name as defined in the cluster + manifest. + :type node_type_name: str + :param max_percent_unhealthy_nodes: Maximum allowed percentage of + unhealthy nodes for the node type, specified as an entry in + NodeTypeHealthPolicyMap. + :type max_percent_unhealthy_nodes: int + :param total_count: Total number of nodes of the node type found in the + health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation of this node type that impacted the aggregated + health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_type_name': {'key': 'NodeTypeName', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(NodeTypeNodesHealthEvaluation, self).__init__(**kwargs) + self.node_type_name = kwargs.get('node_type_name', None) + self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'NodeTypeNodes' diff --git a/customSDK/servicefabric/models/node_type_nodes_health_evaluation_py3.py b/customSDK/servicefabric/models/node_type_nodes_health_evaluation_py3.py new file mode 100644 index 00000000..d9b828e7 --- /dev/null +++ b/customSDK/servicefabric/models/node_type_nodes_health_evaluation_py3.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class NodeTypeNodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for nodes of a particular node type. The node + type nodes evaluation can be returned when cluster health evaluation + returns unhealthy aggregated health state, either Error or Warning. It + contains health evaluations for each unhealthy node of the included node + type that impacted current aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_type_name: The node type name as defined in the cluster + manifest. + :type node_type_name: str + :param max_percent_unhealthy_nodes: Maximum allowed percentage of + unhealthy nodes for the node type, specified as an entry in + NodeTypeHealthPolicyMap. + :type max_percent_unhealthy_nodes: int + :param total_count: Total number of nodes of the node type found in the + health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation of this node type that impacted the aggregated + health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_type_name': {'key': 'NodeTypeName', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, node_type_name: str=None, max_percent_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(NodeTypeNodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.node_type_name = node_type_name + self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'NodeTypeNodes' diff --git a/customSDK/servicefabric/models/node_up_event.py b/customSDK/servicefabric/models/node_up_event.py new file mode 100644 index 00000000..bcacf73a --- /dev/null +++ b/customSDK/servicefabric/models/node_up_event.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event import NodeEvent + + +class NodeUpEvent(NodeEvent): + """Node Up event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param last_node_down_at: Required. Time when Node was last down. + :type last_node_down_at: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'last_node_down_at': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'last_node_down_at': {'key': 'LastNodeDownAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(NodeUpEvent, self).__init__(**kwargs) + self.node_instance = kwargs.get('node_instance', None) + self.last_node_down_at = kwargs.get('last_node_down_at', None) + self.kind = 'NodeUp' diff --git a/customSDK/servicefabric/models/node_up_event_py3.py b/customSDK/servicefabric/models/node_up_event_py3.py new file mode 100644 index 00000000..4b02f97c --- /dev/null +++ b/customSDK/servicefabric/models/node_up_event_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .node_event_py3 import NodeEvent + + +class NodeUpEvent(NodeEvent): + """Node Up event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance: Required. Id of Node instance. + :type node_instance: long + :param last_node_down_at: Required. Time when Node was last down. + :type last_node_down_at: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'node_name': {'required': True}, + 'node_instance': {'required': True}, + 'last_node_down_at': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, + 'last_node_down_at': {'key': 'LastNodeDownAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, last_node_down_at, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(NodeUpEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) + self.node_instance = node_instance + self.last_node_down_at = last_node_down_at + self.kind = 'NodeUp' diff --git a/customSDK/servicefabric/models/node_upgrade_progress_info.py b/customSDK/servicefabric/models/node_upgrade_progress_info.py new file mode 100644 index 00000000..c4a81d2d --- /dev/null +++ b/customSDK/servicefabric/models/node_upgrade_progress_info.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeUpgradeProgressInfo(Model): + """Information about the upgrading node and its status. + + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param upgrade_phase: The state of the upgrading node. Possible values + include: 'Invalid', 'PreUpgradeSafetyCheck', 'Upgrading', + 'PostUpgradeSafetyCheck' + :type upgrade_phase: str or ~azure.servicefabric.models.NodeUpgradePhase + :param pending_safety_checks: List of pending safety checks + :type pending_safety_checks: + list[~azure.servicefabric.models.SafetyCheckWrapper] + :param upgrade_duration: The estimated time spent processing the node + since it was deactivated during a node-by-node upgrade. + :type upgrade_duration: str + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'upgrade_phase': {'key': 'UpgradePhase', 'type': 'str'}, + 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, + 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NodeUpgradeProgressInfo, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.upgrade_phase = kwargs.get('upgrade_phase', None) + self.pending_safety_checks = kwargs.get('pending_safety_checks', None) + self.upgrade_duration = kwargs.get('upgrade_duration', None) diff --git a/customSDK/servicefabric/models/node_upgrade_progress_info_py3.py b/customSDK/servicefabric/models/node_upgrade_progress_info_py3.py new file mode 100644 index 00000000..e6b4436c --- /dev/null +++ b/customSDK/servicefabric/models/node_upgrade_progress_info_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NodeUpgradeProgressInfo(Model): + """Information about the upgrading node and its status. + + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param upgrade_phase: The state of the upgrading node. Possible values + include: 'Invalid', 'PreUpgradeSafetyCheck', 'Upgrading', + 'PostUpgradeSafetyCheck' + :type upgrade_phase: str or ~azure.servicefabric.models.NodeUpgradePhase + :param pending_safety_checks: List of pending safety checks + :type pending_safety_checks: + list[~azure.servicefabric.models.SafetyCheckWrapper] + :param upgrade_duration: The estimated time spent processing the node + since it was deactivated during a node-by-node upgrade. + :type upgrade_duration: str + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'upgrade_phase': {'key': 'UpgradePhase', 'type': 'str'}, + 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, + 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, + } + + def __init__(self, *, node_name: str=None, upgrade_phase=None, pending_safety_checks=None, upgrade_duration: str=None, **kwargs) -> None: + super(NodeUpgradeProgressInfo, self).__init__(**kwargs) + self.node_name = node_name + self.upgrade_phase = upgrade_phase + self.pending_safety_checks = pending_safety_checks + self.upgrade_duration = upgrade_duration diff --git a/customSDK/servicefabric/models/nodes_health_evaluation.py b/customSDK/servicefabric/models/nodes_health_evaluation.py new file mode 100644 index 00000000..f31972d0 --- /dev/null +++ b/customSDK/servicefabric/models/nodes_health_evaluation.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class NodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for nodes, containing health evaluations for + each unhealthy node that impacted current aggregated health state. Can be + returned when evaluating cluster health and the aggregated health state is + either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_nodes: Maximum allowed percentage of + unhealthy nodes from the ClusterHealthPolicy. + :type max_percent_unhealthy_nodes: int + :param total_count: Total number of nodes found in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(NodesHealthEvaluation, self).__init__(**kwargs) + self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Nodes' diff --git a/customSDK/servicefabric/models/nodes_health_evaluation_py3.py b/customSDK/servicefabric/models/nodes_health_evaluation_py3.py new file mode 100644 index 00000000..208e702e --- /dev/null +++ b/customSDK/servicefabric/models/nodes_health_evaluation_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class NodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for nodes, containing health evaluations for + each unhealthy node that impacted current aggregated health state. Can be + returned when evaluating cluster health and the aggregated health state is + either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_nodes: Maximum allowed percentage of + unhealthy nodes from the ClusterHealthPolicy. + :type max_percent_unhealthy_nodes: int + :param total_count: Total number of nodes found in the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(NodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Nodes' diff --git a/customSDK/servicefabric/models/operation_status.py b/customSDK/servicefabric/models/operation_status.py new file mode 100644 index 00000000..0ac24628 --- /dev/null +++ b/customSDK/servicefabric/models/operation_status.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationStatus(Model): + """Contains the OperationId, OperationState, and OperationType for + user-induced operations. + + :param operation_id: A GUID that identifies a call to this API. This is + also passed into the corresponding GetProgress API. + :type operation_id: str + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param type: The type of the operation. Possible values include: + 'Invalid', 'PartitionDataLoss', 'PartitionQuorumLoss', 'PartitionRestart', + 'NodeTransition' + :type type: str or ~azure.servicefabric.models.OperationType + """ + + _attribute_map = { + 'operation_id': {'key': 'OperationId', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + 'type': {'key': 'Type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationStatus, self).__init__(**kwargs) + self.operation_id = kwargs.get('operation_id', None) + self.state = kwargs.get('state', None) + self.type = kwargs.get('type', None) diff --git a/customSDK/servicefabric/models/operation_status_py3.py b/customSDK/servicefabric/models/operation_status_py3.py new file mode 100644 index 00000000..cb089025 --- /dev/null +++ b/customSDK/servicefabric/models/operation_status_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationStatus(Model): + """Contains the OperationId, OperationState, and OperationType for + user-induced operations. + + :param operation_id: A GUID that identifies a call to this API. This is + also passed into the corresponding GetProgress API. + :type operation_id: str + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param type: The type of the operation. Possible values include: + 'Invalid', 'PartitionDataLoss', 'PartitionQuorumLoss', 'PartitionRestart', + 'NodeTransition' + :type type: str or ~azure.servicefabric.models.OperationType + """ + + _attribute_map = { + 'operation_id': {'key': 'OperationId', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + 'type': {'key': 'Type', 'type': 'str'}, + } + + def __init__(self, *, operation_id: str=None, state=None, type=None, **kwargs) -> None: + super(OperationStatus, self).__init__(**kwargs) + self.operation_id = operation_id + self.state = state + self.type = type diff --git a/customSDK/servicefabric/models/package_sharing_policy_info.py b/customSDK/servicefabric/models/package_sharing_policy_info.py new file mode 100644 index 00000000..0f8956af --- /dev/null +++ b/customSDK/servicefabric/models/package_sharing_policy_info.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PackageSharingPolicyInfo(Model): + """Represents a policy for the package sharing. + + :param shared_package_name: The name of code, configuration or data + package that should be shared. + :type shared_package_name: str + :param package_sharing_scope: Represents the scope for + PackageSharingPolicy. This is specified during DeployServicePackageToNode + operation. Possible values include: 'None', 'All', 'Code', 'Config', + 'Data' + :type package_sharing_scope: str or + ~azure.servicefabric.models.PackageSharingPolicyScope + """ + + _attribute_map = { + 'shared_package_name': {'key': 'SharedPackageName', 'type': 'str'}, + 'package_sharing_scope': {'key': 'PackageSharingScope', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PackageSharingPolicyInfo, self).__init__(**kwargs) + self.shared_package_name = kwargs.get('shared_package_name', None) + self.package_sharing_scope = kwargs.get('package_sharing_scope', None) diff --git a/customSDK/servicefabric/models/package_sharing_policy_info_py3.py b/customSDK/servicefabric/models/package_sharing_policy_info_py3.py new file mode 100644 index 00000000..ad60c663 --- /dev/null +++ b/customSDK/servicefabric/models/package_sharing_policy_info_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PackageSharingPolicyInfo(Model): + """Represents a policy for the package sharing. + + :param shared_package_name: The name of code, configuration or data + package that should be shared. + :type shared_package_name: str + :param package_sharing_scope: Represents the scope for + PackageSharingPolicy. This is specified during DeployServicePackageToNode + operation. Possible values include: 'None', 'All', 'Code', 'Config', + 'Data' + :type package_sharing_scope: str or + ~azure.servicefabric.models.PackageSharingPolicyScope + """ + + _attribute_map = { + 'shared_package_name': {'key': 'SharedPackageName', 'type': 'str'}, + 'package_sharing_scope': {'key': 'PackageSharingScope', 'type': 'str'}, + } + + def __init__(self, *, shared_package_name: str=None, package_sharing_scope=None, **kwargs) -> None: + super(PackageSharingPolicyInfo, self).__init__(**kwargs) + self.shared_package_name = shared_package_name + self.package_sharing_scope = package_sharing_scope diff --git a/customSDK/servicefabric/models/paged_application_info_list.py b/customSDK/servicefabric/models/paged_application_info_list.py new file mode 100644 index 00000000..7aa9d71f --- /dev/null +++ b/customSDK/servicefabric/models/paged_application_info_list.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedApplicationInfoList(Model): + """The list of applications in the cluster. The list is paged when all of the + results cannot fit in a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of application information. + :type items: list[~azure.servicefabric.models.ApplicationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedApplicationInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_application_info_list_py3.py b/customSDK/servicefabric/models/paged_application_info_list_py3.py new file mode 100644 index 00000000..46dc2cc8 --- /dev/null +++ b/customSDK/servicefabric/models/paged_application_info_list_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedApplicationInfoList(Model): + """The list of applications in the cluster. The list is paged when all of the + results cannot fit in a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of application information. + :type items: list[~azure.servicefabric.models.ApplicationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedApplicationInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_application_resource_description_list.py b/customSDK/servicefabric/models/paged_application_resource_description_list.py new file mode 100644 index 00000000..bda03402 --- /dev/null +++ b/customSDK/servicefabric/models/paged_application_resource_description_list.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedApplicationResourceDescriptionList(Model): + """The list of application resources. The list is paged when all of the + results cannot fit in a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: + list[~azure.servicefabric.models.ApplicationResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationResourceDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedApplicationResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_application_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_application_resource_description_list_py3.py new file mode 100644 index 00000000..bc5bd469 --- /dev/null +++ b/customSDK/servicefabric/models/paged_application_resource_description_list_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedApplicationResourceDescriptionList(Model): + """The list of application resources. The list is paged when all of the + results cannot fit in a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: + list[~azure.servicefabric.models.ApplicationResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationResourceDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedApplicationResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_application_type_info_list.py b/customSDK/servicefabric/models/paged_application_type_info_list.py new file mode 100644 index 00000000..486df2b1 --- /dev/null +++ b/customSDK/servicefabric/models/paged_application_type_info_list.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedApplicationTypeInfoList(Model): + """The list of application types that are provisioned or being provisioned in + the cluster. The list is paged when all of the results cannot fit in a + single message. The next set of results can be obtained by executing the + same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of application type information. + :type items: list[~azure.servicefabric.models.ApplicationTypeInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationTypeInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedApplicationTypeInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_application_type_info_list_py3.py b/customSDK/servicefabric/models/paged_application_type_info_list_py3.py new file mode 100644 index 00000000..cfcfce6f --- /dev/null +++ b/customSDK/servicefabric/models/paged_application_type_info_list_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedApplicationTypeInfoList(Model): + """The list of application types that are provisioned or being provisioned in + the cluster. The list is paged when all of the results cannot fit in a + single message. The next set of results can be obtained by executing the + same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of application type information. + :type items: list[~azure.servicefabric.models.ApplicationTypeInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ApplicationTypeInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedApplicationTypeInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_backup_configuration_info_list.py b/customSDK/servicefabric/models/paged_backup_configuration_info_list.py new file mode 100644 index 00000000..732c5ac8 --- /dev/null +++ b/customSDK/servicefabric/models/paged_backup_configuration_info_list.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedBackupConfigurationInfoList(Model): + """The list of backup configuration information. The list is paged when all of + the results cannot fit in a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of backup configuration information. + :type items: list[~azure.servicefabric.models.BackupConfigurationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupConfigurationInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedBackupConfigurationInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_backup_configuration_info_list_py3.py b/customSDK/servicefabric/models/paged_backup_configuration_info_list_py3.py new file mode 100644 index 00000000..643ec9e4 --- /dev/null +++ b/customSDK/servicefabric/models/paged_backup_configuration_info_list_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedBackupConfigurationInfoList(Model): + """The list of backup configuration information. The list is paged when all of + the results cannot fit in a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of backup configuration information. + :type items: list[~azure.servicefabric.models.BackupConfigurationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupConfigurationInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedBackupConfigurationInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_backup_entity_list.py b/customSDK/servicefabric/models/paged_backup_entity_list.py new file mode 100644 index 00000000..08b04f64 --- /dev/null +++ b/customSDK/servicefabric/models/paged_backup_entity_list.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedBackupEntityList(Model): + """The list of backup entities that are being periodically backed. The list is + paged when all of the results cannot fit in a single message. The next set + of results can be obtained by executing the same query with the + continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of backup entity information. + :type items: list[~azure.servicefabric.models.BackupEntity] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupEntity]'}, + } + + def __init__(self, **kwargs): + super(PagedBackupEntityList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_backup_entity_list_py3.py b/customSDK/servicefabric/models/paged_backup_entity_list_py3.py new file mode 100644 index 00000000..b2e4f9ec --- /dev/null +++ b/customSDK/servicefabric/models/paged_backup_entity_list_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedBackupEntityList(Model): + """The list of backup entities that are being periodically backed. The list is + paged when all of the results cannot fit in a single message. The next set + of results can be obtained by executing the same query with the + continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of backup entity information. + :type items: list[~azure.servicefabric.models.BackupEntity] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupEntity]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedBackupEntityList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_backup_info_list.py b/customSDK/servicefabric/models/paged_backup_info_list.py new file mode 100644 index 00000000..b65adcc8 --- /dev/null +++ b/customSDK/servicefabric/models/paged_backup_info_list.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedBackupInfoList(Model): + """The list of backups. The list is paged when all of the results cannot fit + in a single message. The next set of results can be obtained by executing + the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of backup information. + :type items: list[~azure.servicefabric.models.BackupInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedBackupInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_backup_info_list_py3.py b/customSDK/servicefabric/models/paged_backup_info_list_py3.py new file mode 100644 index 00000000..f3cfc51d --- /dev/null +++ b/customSDK/servicefabric/models/paged_backup_info_list_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedBackupInfoList(Model): + """The list of backups. The list is paged when all of the results cannot fit + in a single message. The next set of results can be obtained by executing + the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of backup information. + :type items: list[~azure.servicefabric.models.BackupInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedBackupInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_backup_policy_description_list.py b/customSDK/servicefabric/models/paged_backup_policy_description_list.py new file mode 100644 index 00000000..5898dc19 --- /dev/null +++ b/customSDK/servicefabric/models/paged_backup_policy_description_list.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedBackupPolicyDescriptionList(Model): + """The list of backup policies configured in the cluster. The list is paged + when all of the results cannot fit in a single message. The next set of + results can be obtained by executing the same query with the continuation + token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: The list of backup policies information. + :type items: list[~azure.servicefabric.models.BackupPolicyDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupPolicyDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedBackupPolicyDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_backup_policy_description_list_py3.py b/customSDK/servicefabric/models/paged_backup_policy_description_list_py3.py new file mode 100644 index 00000000..e87b8855 --- /dev/null +++ b/customSDK/servicefabric/models/paged_backup_policy_description_list_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedBackupPolicyDescriptionList(Model): + """The list of backup policies configured in the cluster. The list is paged + when all of the results cannot fit in a single message. The next set of + results can be obtained by executing the same query with the continuation + token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: The list of backup policies information. + :type items: list[~azure.servicefabric.models.BackupPolicyDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[BackupPolicyDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedBackupPolicyDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_compose_deployment_status_info_list.py b/customSDK/servicefabric/models/paged_compose_deployment_status_info_list.py new file mode 100644 index 00000000..1b2d2c5a --- /dev/null +++ b/customSDK/servicefabric/models/paged_compose_deployment_status_info_list.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedComposeDeploymentStatusInfoList(Model): + """The list of compose deployments in the cluster. The list is paged when all + of the results cannot fit in a single message. The next set of results can + be obtained by executing the same query with the continuation token + provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of compose deployment status information. + :type items: list[~azure.servicefabric.models.ComposeDeploymentStatusInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ComposeDeploymentStatusInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedComposeDeploymentStatusInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_compose_deployment_status_info_list_py3.py b/customSDK/servicefabric/models/paged_compose_deployment_status_info_list_py3.py new file mode 100644 index 00000000..37c8f8dc --- /dev/null +++ b/customSDK/servicefabric/models/paged_compose_deployment_status_info_list_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedComposeDeploymentStatusInfoList(Model): + """The list of compose deployments in the cluster. The list is paged when all + of the results cannot fit in a single message. The next set of results can + be obtained by executing the same query with the continuation token + provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of compose deployment status information. + :type items: list[~azure.servicefabric.models.ComposeDeploymentStatusInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ComposeDeploymentStatusInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedComposeDeploymentStatusInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_deployed_application_info_list.py b/customSDK/servicefabric/models/paged_deployed_application_info_list.py new file mode 100644 index 00000000..9d6ed5ef --- /dev/null +++ b/customSDK/servicefabric/models/paged_deployed_application_info_list.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedDeployedApplicationInfoList(Model): + """The list of deployed applications in activating, downloading, or active + states on a node. + The list is paged when all of the results cannot fit in a single message. + The next set of results can be obtained by executing the same query with + the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of deployed application information. + :type items: list[~azure.servicefabric.models.DeployedApplicationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[DeployedApplicationInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedDeployedApplicationInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_deployed_application_info_list_py3.py b/customSDK/servicefabric/models/paged_deployed_application_info_list_py3.py new file mode 100644 index 00000000..9610051b --- /dev/null +++ b/customSDK/servicefabric/models/paged_deployed_application_info_list_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedDeployedApplicationInfoList(Model): + """The list of deployed applications in activating, downloading, or active + states on a node. + The list is paged when all of the results cannot fit in a single message. + The next set of results can be obtained by executing the same query with + the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of deployed application information. + :type items: list[~azure.servicefabric.models.DeployedApplicationInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[DeployedApplicationInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedDeployedApplicationInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_gateway_resource_description_list.py b/customSDK/servicefabric/models/paged_gateway_resource_description_list.py new file mode 100644 index 00000000..4c415664 --- /dev/null +++ b/customSDK/servicefabric/models/paged_gateway_resource_description_list.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedGatewayResourceDescriptionList(Model): + """The list of gateway resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.GatewayResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[GatewayResourceDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedGatewayResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_gateway_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_gateway_resource_description_list_py3.py new file mode 100644 index 00000000..b4a5cbe0 --- /dev/null +++ b/customSDK/servicefabric/models/paged_gateway_resource_description_list_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedGatewayResourceDescriptionList(Model): + """The list of gateway resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.GatewayResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[GatewayResourceDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedGatewayResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_network_resource_description_list.py b/customSDK/servicefabric/models/paged_network_resource_description_list.py new file mode 100644 index 00000000..9391a3aa --- /dev/null +++ b/customSDK/servicefabric/models/paged_network_resource_description_list.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedNetworkResourceDescriptionList(Model): + """The list of network resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.NetworkResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[NetworkResourceDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedNetworkResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_network_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_network_resource_description_list_py3.py new file mode 100644 index 00000000..729aeed2 --- /dev/null +++ b/customSDK/servicefabric/models/paged_network_resource_description_list_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedNetworkResourceDescriptionList(Model): + """The list of network resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.NetworkResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[NetworkResourceDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedNetworkResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_node_info_list.py b/customSDK/servicefabric/models/paged_node_info_list.py new file mode 100644 index 00000000..4819ccb7 --- /dev/null +++ b/customSDK/servicefabric/models/paged_node_info_list.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedNodeInfoList(Model): + """The list of nodes in the cluster. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of node information. + :type items: list[~azure.servicefabric.models.NodeInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[NodeInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedNodeInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_node_info_list_py3.py b/customSDK/servicefabric/models/paged_node_info_list_py3.py new file mode 100644 index 00000000..3834bcee --- /dev/null +++ b/customSDK/servicefabric/models/paged_node_info_list_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedNodeInfoList(Model): + """The list of nodes in the cluster. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of node information. + :type items: list[~azure.servicefabric.models.NodeInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[NodeInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedNodeInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_property_info_list.py b/customSDK/servicefabric/models/paged_property_info_list.py new file mode 100644 index 00000000..a4744c9f --- /dev/null +++ b/customSDK/servicefabric/models/paged_property_info_list.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedPropertyInfoList(Model): + """The paged list of Service Fabric properties under a given name. The list is + paged when all of the results cannot fit in a single message. The next set + of results can be obtained by executing the same query with the + continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param is_consistent: Indicates whether any property under the given name + has been modified during the enumeration. If there was a modification, + this property value is false. + :type is_consistent: bool + :param properties: List of property information. + :type properties: list[~azure.servicefabric.models.PropertyInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, + 'properties': {'key': 'Properties', 'type': '[PropertyInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedPropertyInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.is_consistent = kwargs.get('is_consistent', None) + self.properties = kwargs.get('properties', None) diff --git a/customSDK/servicefabric/models/paged_property_info_list_py3.py b/customSDK/servicefabric/models/paged_property_info_list_py3.py new file mode 100644 index 00000000..5317c874 --- /dev/null +++ b/customSDK/servicefabric/models/paged_property_info_list_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedPropertyInfoList(Model): + """The paged list of Service Fabric properties under a given name. The list is + paged when all of the results cannot fit in a single message. The next set + of results can be obtained by executing the same query with the + continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param is_consistent: Indicates whether any property under the given name + has been modified during the enumeration. If there was a modification, + this property value is false. + :type is_consistent: bool + :param properties: List of property information. + :type properties: list[~azure.servicefabric.models.PropertyInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, + 'properties': {'key': 'Properties', 'type': '[PropertyInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, is_consistent: bool=None, properties=None, **kwargs) -> None: + super(PagedPropertyInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.is_consistent = is_consistent + self.properties = properties diff --git a/customSDK/servicefabric/models/paged_replica_info_list.py b/customSDK/servicefabric/models/paged_replica_info_list.py new file mode 100644 index 00000000..3fb73e21 --- /dev/null +++ b/customSDK/servicefabric/models/paged_replica_info_list.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedReplicaInfoList(Model): + """The list of replicas in the cluster for a given partition. The list is + paged when all of the results cannot fit in a single message. The next set + of results can be obtained by executing the same query with the + continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of replica information. + :type items: list[~azure.servicefabric.models.ReplicaInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ReplicaInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedReplicaInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_replica_info_list_py3.py b/customSDK/servicefabric/models/paged_replica_info_list_py3.py new file mode 100644 index 00000000..94fb1a70 --- /dev/null +++ b/customSDK/servicefabric/models/paged_replica_info_list_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedReplicaInfoList(Model): + """The list of replicas in the cluster for a given partition. The list is + paged when all of the results cannot fit in a single message. The next set + of results can be obtained by executing the same query with the + continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of replica information. + :type items: list[~azure.servicefabric.models.ReplicaInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ReplicaInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedReplicaInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_secret_resource_description_list.py b/customSDK/servicefabric/models/paged_secret_resource_description_list.py new file mode 100644 index 00000000..8ec32f9f --- /dev/null +++ b/customSDK/servicefabric/models/paged_secret_resource_description_list.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedSecretResourceDescriptionList(Model): + """The list of secret resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.SecretResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[SecretResourceDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedSecretResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_secret_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_secret_resource_description_list_py3.py new file mode 100644 index 00000000..6c02124f --- /dev/null +++ b/customSDK/servicefabric/models/paged_secret_resource_description_list_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedSecretResourceDescriptionList(Model): + """The list of secret resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.SecretResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[SecretResourceDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedSecretResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_secret_value_resource_description_list.py b/customSDK/servicefabric/models/paged_secret_value_resource_description_list.py new file mode 100644 index 00000000..927c0fd8 --- /dev/null +++ b/customSDK/servicefabric/models/paged_secret_value_resource_description_list.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedSecretValueResourceDescriptionList(Model): + """The list of values of a secret resource, paged if the number of results + exceeds the limits of a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in the previous page. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: + list[~azure.servicefabric.models.SecretValueResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[SecretValueResourceDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedSecretValueResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_secret_value_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_secret_value_resource_description_list_py3.py new file mode 100644 index 00000000..683d5a38 --- /dev/null +++ b/customSDK/servicefabric/models/paged_secret_value_resource_description_list_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedSecretValueResourceDescriptionList(Model): + """The list of values of a secret resource, paged if the number of results + exceeds the limits of a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in the previous page. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: + list[~azure.servicefabric.models.SecretValueResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[SecretValueResourceDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedSecretValueResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_service_info_list.py b/customSDK/servicefabric/models/paged_service_info_list.py new file mode 100644 index 00000000..f17b883c --- /dev/null +++ b/customSDK/servicefabric/models/paged_service_info_list.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedServiceInfoList(Model): + """The list of services in the cluster for an application. The list is paged + when all of the results cannot fit in a single message. The next set of + results can be obtained by executing the same query with the continuation + token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of service information. + :type items: list[~azure.servicefabric.models.ServiceInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedServiceInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_service_info_list_py3.py b/customSDK/servicefabric/models/paged_service_info_list_py3.py new file mode 100644 index 00000000..3f8d6c02 --- /dev/null +++ b/customSDK/servicefabric/models/paged_service_info_list_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedServiceInfoList(Model): + """The list of services in the cluster for an application. The list is paged + when all of the results cannot fit in a single message. The next set of + results can be obtained by executing the same query with the continuation + token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of service information. + :type items: list[~azure.servicefabric.models.ServiceInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedServiceInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_service_partition_info_list.py b/customSDK/servicefabric/models/paged_service_partition_info_list.py new file mode 100644 index 00000000..8cf85e24 --- /dev/null +++ b/customSDK/servicefabric/models/paged_service_partition_info_list.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedServicePartitionInfoList(Model): + """The list of partition in the cluster for a service. The list is paged when + all of the results cannot fit in a single message. The next set of results + can be obtained by executing the same query with the continuation token + provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of service partition information. + :type items: list[~azure.servicefabric.models.ServicePartitionInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServicePartitionInfo]'}, + } + + def __init__(self, **kwargs): + super(PagedServicePartitionInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_service_partition_info_list_py3.py b/customSDK/servicefabric/models/paged_service_partition_info_list_py3.py new file mode 100644 index 00000000..58d90e9f --- /dev/null +++ b/customSDK/servicefabric/models/paged_service_partition_info_list_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedServicePartitionInfoList(Model): + """The list of partition in the cluster for a service. The list is paged when + all of the results cannot fit in a single message. The next set of results + can be obtained by executing the same query with the continuation token + provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of service partition information. + :type items: list[~azure.servicefabric.models.ServicePartitionInfo] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServicePartitionInfo]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedServicePartitionInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_service_replica_description_list.py b/customSDK/servicefabric/models/paged_service_replica_description_list.py new file mode 100644 index 00000000..94956f06 --- /dev/null +++ b/customSDK/servicefabric/models/paged_service_replica_description_list.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedServiceReplicaDescriptionList(Model): + """The list of service resource replicas in the cluster. The list is paged + when all of the results cannot fit in a single message. The next set of + results can be obtained by executing the same query with the continuation + token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of service resource replica description. + :type items: list[~azure.servicefabric.models.ServiceReplicaDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceReplicaDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedServiceReplicaDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_service_replica_description_list_py3.py b/customSDK/servicefabric/models/paged_service_replica_description_list_py3.py new file mode 100644 index 00000000..ad77f539 --- /dev/null +++ b/customSDK/servicefabric/models/paged_service_replica_description_list_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedServiceReplicaDescriptionList(Model): + """The list of service resource replicas in the cluster. The list is paged + when all of the results cannot fit in a single message. The next set of + results can be obtained by executing the same query with the continuation + token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of service resource replica description. + :type items: list[~azure.servicefabric.models.ServiceReplicaDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceReplicaDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedServiceReplicaDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_service_resource_description_list.py b/customSDK/servicefabric/models/paged_service_resource_description_list.py new file mode 100644 index 00000000..76591cdc --- /dev/null +++ b/customSDK/servicefabric/models/paged_service_resource_description_list.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedServiceResourceDescriptionList(Model): + """The list of service resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.ServiceResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceResourceDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedServiceResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_service_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_service_resource_description_list_py3.py new file mode 100644 index 00000000..0d17ddbd --- /dev/null +++ b/customSDK/servicefabric/models/paged_service_resource_description_list_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedServiceResourceDescriptionList(Model): + """The list of service resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.ServiceResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[ServiceResourceDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedServiceResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_sub_name_info_list.py b/customSDK/servicefabric/models/paged_sub_name_info_list.py new file mode 100644 index 00000000..50d6d0d0 --- /dev/null +++ b/customSDK/servicefabric/models/paged_sub_name_info_list.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedSubNameInfoList(Model): + """A paged list of Service Fabric names. The list is paged when all of the + results cannot fit in a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param is_consistent: Indicates whether any name under the given name has + been modified during the enumeration. If there was a modification, this + property value is false. + :type is_consistent: bool + :param sub_names: List of the child names. + :type sub_names: list[str] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, + 'sub_names': {'key': 'SubNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(PagedSubNameInfoList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.is_consistent = kwargs.get('is_consistent', None) + self.sub_names = kwargs.get('sub_names', None) diff --git a/customSDK/servicefabric/models/paged_sub_name_info_list_py3.py b/customSDK/servicefabric/models/paged_sub_name_info_list_py3.py new file mode 100644 index 00000000..04b1f66c --- /dev/null +++ b/customSDK/servicefabric/models/paged_sub_name_info_list_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedSubNameInfoList(Model): + """A paged list of Service Fabric names. The list is paged when all of the + results cannot fit in a single message. The next set of results can be + obtained by executing the same query with the continuation token provided + in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param is_consistent: Indicates whether any name under the given name has + been modified during the enumeration. If there was a modification, this + property value is false. + :type is_consistent: bool + :param sub_names: List of the child names. + :type sub_names: list[str] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, + 'sub_names': {'key': 'SubNames', 'type': '[str]'}, + } + + def __init__(self, *, continuation_token: str=None, is_consistent: bool=None, sub_names=None, **kwargs) -> None: + super(PagedSubNameInfoList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.is_consistent = is_consistent + self.sub_names = sub_names diff --git a/customSDK/servicefabric/models/paged_update_partition_load_result_list.py b/customSDK/servicefabric/models/paged_update_partition_load_result_list.py new file mode 100644 index 00000000..1c01c714 --- /dev/null +++ b/customSDK/servicefabric/models/paged_update_partition_load_result_list.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedUpdatePartitionLoadResultList(Model): + """The list of results of the call UpdatePartitionLoad. The list is paged when + all of the results cannot fit in a single message. The next set of results + can be obtained by executing the same query with the continuation token + provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of partition load update information. + :type items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[UpdatePartitionLoadResult]'}, + } + + def __init__(self, **kwargs): + super(PagedUpdatePartitionLoadResultList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_update_partition_load_result_list_py3.py b/customSDK/servicefabric/models/paged_update_partition_load_result_list_py3.py new file mode 100644 index 00000000..bcee7726 --- /dev/null +++ b/customSDK/servicefabric/models/paged_update_partition_load_result_list_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedUpdatePartitionLoadResultList(Model): + """The list of results of the call UpdatePartitionLoad. The list is paged when + all of the results cannot fit in a single message. The next set of results + can be obtained by executing the same query with the continuation token + provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of partition load update information. + :type items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[UpdatePartitionLoadResult]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedUpdatePartitionLoadResultList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/paged_volume_resource_description_list.py b/customSDK/servicefabric/models/paged_volume_resource_description_list.py new file mode 100644 index 00000000..96f1ac55 --- /dev/null +++ b/customSDK/servicefabric/models/paged_volume_resource_description_list.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedVolumeResourceDescriptionList(Model): + """The list of volume resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.VolumeResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[VolumeResourceDescription]'}, + } + + def __init__(self, **kwargs): + super(PagedVolumeResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_volume_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_volume_resource_description_list_py3.py new file mode 100644 index 00000000..a72a818e --- /dev/null +++ b/customSDK/servicefabric/models/paged_volume_resource_description_list_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedVolumeResourceDescriptionList(Model): + """The list of volume resources. The list is paged when all of the results + cannot fit in a single message. The next set of results can be obtained by + executing the same query with the continuation token provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: One page of the list. + :type items: list[~azure.servicefabric.models.VolumeResourceDescription] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[VolumeResourceDescription]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedVolumeResourceDescriptionList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items diff --git a/customSDK/servicefabric/models/partition_analysis_event.py b/customSDK/servicefabric/models/partition_analysis_event.py new file mode 100644 index 00000000..1bd12aeb --- /dev/null +++ b/customSDK/servicefabric/models/partition_analysis_event.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_event import PartitionEvent + + +class PartitionAnalysisEvent(PartitionEvent): + """Represents the base for all Partition Analysis Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionPrimaryMoveAnalysisEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param metadata: Required. Metadata about an Analysis Event. + :type metadata: ~azure.servicefabric.models.AnalysisEventMetadata + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'metadata': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, + } + + _subtype_map = { + 'kind': {'PartitionPrimaryMoveAnalysis': 'PartitionPrimaryMoveAnalysisEvent'} + } + + def __init__(self, **kwargs): + super(PartitionAnalysisEvent, self).__init__(**kwargs) + self.metadata = kwargs.get('metadata', None) + self.kind = 'PartitionAnalysisEvent' diff --git a/customSDK/servicefabric/models/partition_analysis_event_py3.py b/customSDK/servicefabric/models/partition_analysis_event_py3.py new file mode 100644 index 00000000..b864bde3 --- /dev/null +++ b/customSDK/servicefabric/models/partition_analysis_event_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_event_py3 import PartitionEvent + + +class PartitionAnalysisEvent(PartitionEvent): + """Represents the base for all Partition Analysis Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionPrimaryMoveAnalysisEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param metadata: Required. Metadata about an Analysis Event. + :type metadata: ~azure.servicefabric.models.AnalysisEventMetadata + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'metadata': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, + } + + _subtype_map = { + 'kind': {'PartitionPrimaryMoveAnalysis': 'PartitionPrimaryMoveAnalysisEvent'} + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, metadata, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(PartitionAnalysisEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.metadata = metadata + self.kind = 'PartitionAnalysisEvent' diff --git a/customSDK/servicefabric/models/partition_backup_configuration_info.py b/customSDK/servicefabric/models/partition_backup_configuration_info.py new file mode 100644 index 00000000..02b45251 --- /dev/null +++ b/customSDK/servicefabric/models/partition_backup_configuration_info.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_configuration_info import BackupConfigurationInfo + + +class PartitionBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information, for a specific partition, specifying what + backup policy is being applied and suspend description, if any. + + All required parameters must be populated in order to send to Azure. + + :param policy_name: The name of the backup policy which is applicable to + this Service Fabric application or service or partition. + :type policy_name: str + :param policy_inherited_from: Specifies the scope at which the backup + policy is applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type policy_inherited_from: str or + ~azure.servicefabric.models.BackupPolicyScope + :param suspension_info: Describes the backup suspension details. + :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :param kind: Required. Constant filled by server. + :type kind: str + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param partition_id: The partition ID identifying the partition. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartitionBackupConfigurationInfo, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) + self.kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_backup_configuration_info_py3.py b/customSDK/servicefabric/models/partition_backup_configuration_info_py3.py new file mode 100644 index 00000000..0e53df17 --- /dev/null +++ b/customSDK/servicefabric/models/partition_backup_configuration_info_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_configuration_info_py3 import BackupConfigurationInfo + + +class PartitionBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information, for a specific partition, specifying what + backup policy is being applied and suspend description, if any. + + All required parameters must be populated in order to send to Azure. + + :param policy_name: The name of the backup policy which is applicable to + this Service Fabric application or service or partition. + :type policy_name: str + :param policy_inherited_from: Specifies the scope at which the backup + policy is applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type policy_inherited_from: str or + ~azure.servicefabric.models.BackupPolicyScope + :param suspension_info: Describes the backup suspension details. + :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :param kind: Required. Constant filled by server. + :type kind: str + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param partition_id: The partition ID identifying the partition. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, service_name: str=None, partition_id: str=None, **kwargs) -> None: + super(PartitionBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) + self.service_name = service_name + self.partition_id = partition_id + self.kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_backup_entity.py b/customSDK/servicefabric/models/partition_backup_entity.py new file mode 100644 index 00000000..0c823272 --- /dev/null +++ b/customSDK/servicefabric/models/partition_backup_entity.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_entity import BackupEntity + + +class PartitionBackupEntity(BackupEntity): + """Identifies the Service Fabric stateful partition which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :param entity_kind: Required. Constant filled by server. + :type entity_kind: str + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param partition_id: The partition ID identifying the partition. + :type partition_id: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartitionBackupEntity, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) + self.entity_kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_backup_entity_py3.py b/customSDK/servicefabric/models/partition_backup_entity_py3.py new file mode 100644 index 00000000..2cfa5dd8 --- /dev/null +++ b/customSDK/servicefabric/models/partition_backup_entity_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_entity_py3 import BackupEntity + + +class PartitionBackupEntity(BackupEntity): + """Identifies the Service Fabric stateful partition which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :param entity_kind: Required. Constant filled by server. + :type entity_kind: str + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + :param partition_id: The partition ID identifying the partition. + :type partition_id: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, service_name: str=None, partition_id: str=None, **kwargs) -> None: + super(PartitionBackupEntity, self).__init__(**kwargs) + self.service_name = service_name + self.partition_id = partition_id + self.entity_kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_data_loss_progress.py b/customSDK/servicefabric/models/partition_data_loss_progress.py new file mode 100644 index 00000000..60ca36a7 --- /dev/null +++ b/customSDK/servicefabric/models/partition_data_loss_progress.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionDataLossProgress(Model): + """Information about a partition data loss user-induced operation. + + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param invoke_data_loss_result: Represents information about an operation + in a terminal state (Completed or Faulted). + :type invoke_data_loss_result: + ~azure.servicefabric.models.InvokeDataLossResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'invoke_data_loss_result': {'key': 'InvokeDataLossResult', 'type': 'InvokeDataLossResult'}, + } + + def __init__(self, **kwargs): + super(PartitionDataLossProgress, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.invoke_data_loss_result = kwargs.get('invoke_data_loss_result', None) diff --git a/customSDK/servicefabric/models/partition_data_loss_progress_py3.py b/customSDK/servicefabric/models/partition_data_loss_progress_py3.py new file mode 100644 index 00000000..fa61ba3c --- /dev/null +++ b/customSDK/servicefabric/models/partition_data_loss_progress_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionDataLossProgress(Model): + """Information about a partition data loss user-induced operation. + + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param invoke_data_loss_result: Represents information about an operation + in a terminal state (Completed or Faulted). + :type invoke_data_loss_result: + ~azure.servicefabric.models.InvokeDataLossResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'invoke_data_loss_result': {'key': 'InvokeDataLossResult', 'type': 'InvokeDataLossResult'}, + } + + def __init__(self, *, state=None, invoke_data_loss_result=None, **kwargs) -> None: + super(PartitionDataLossProgress, self).__init__(**kwargs) + self.state = state + self.invoke_data_loss_result = invoke_data_loss_result diff --git a/customSDK/servicefabric/models/partition_event.py b/customSDK/servicefabric/models/partition_event.py new file mode 100644 index 00000000..9ab8f5e8 --- /dev/null +++ b/customSDK/servicefabric/models/partition_event.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .fabric_event import FabricEvent + + +class PartitionEvent(FabricEvent): + """Represents the base for all Partition Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionAnalysisEvent, PartitionNewHealthReportEvent, + PartitionHealthReportExpiredEvent, PartitionReconfiguredEvent, + ChaosPartitionSecondaryMoveScheduledEvent, + ChaosPartitionPrimaryMoveScheduledEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'PartitionAnalysisEvent': 'PartitionAnalysisEvent', 'PartitionNewHealthReport': 'PartitionNewHealthReportEvent', 'PartitionHealthReportExpired': 'PartitionHealthReportExpiredEvent', 'PartitionReconfigured': 'PartitionReconfiguredEvent', 'ChaosPartitionSecondaryMoveScheduled': 'ChaosPartitionSecondaryMoveScheduledEvent', 'ChaosPartitionPrimaryMoveScheduled': 'ChaosPartitionPrimaryMoveScheduledEvent'} + } + + def __init__(self, **kwargs): + super(PartitionEvent, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.kind = 'PartitionEvent' diff --git a/customSDK/servicefabric/models/partition_event_py3.py b/customSDK/servicefabric/models/partition_event_py3.py new file mode 100644 index 00000000..dc3cdd9f --- /dev/null +++ b/customSDK/servicefabric/models/partition_event_py3.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .fabric_event_py3 import FabricEvent + + +class PartitionEvent(FabricEvent): + """Represents the base for all Partition Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionAnalysisEvent, PartitionNewHealthReportEvent, + PartitionHealthReportExpiredEvent, PartitionReconfiguredEvent, + ChaosPartitionSecondaryMoveScheduledEvent, + ChaosPartitionPrimaryMoveScheduledEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'PartitionAnalysisEvent': 'PartitionAnalysisEvent', 'PartitionNewHealthReport': 'PartitionNewHealthReportEvent', 'PartitionHealthReportExpired': 'PartitionHealthReportExpiredEvent', 'PartitionReconfigured': 'PartitionReconfiguredEvent', 'ChaosPartitionSecondaryMoveScheduled': 'ChaosPartitionSecondaryMoveScheduledEvent', 'ChaosPartitionPrimaryMoveScheduled': 'ChaosPartitionPrimaryMoveScheduledEvent'} + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(PartitionEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.partition_id = partition_id + self.kind = 'PartitionEvent' diff --git a/customSDK/servicefabric/models/partition_health.py b/customSDK/servicefabric/models/partition_health.py new file mode 100644 index 00000000..cc54da85 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health import EntityHealth + + +class PartitionHealth(EntityHealth): + """Information about the health of a Service Fabric partition. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param partition_id: ID of the partition whose health information is + described by this object. + :type partition_id: str + :param replica_health_states: The list of replica health states associated + with the partition. + :type replica_health_states: + list[~azure.servicefabric.models.ReplicaHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_health_states': {'key': 'ReplicaHealthStates', 'type': '[ReplicaHealthState]'}, + } + + def __init__(self, **kwargs): + super(PartitionHealth, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.replica_health_states = kwargs.get('replica_health_states', None) diff --git a/customSDK/servicefabric/models/partition_health_evaluation.py b/customSDK/servicefabric/models/partition_health_evaluation.py new file mode 100644 index 00000000..12462195 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_evaluation.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class PartitionHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a partition, containing information about + the data and the algorithm used by health store to evaluate health. The + evaluation is returned only when the aggregated health state is either + Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition whose health evaluation is + described by this object. + :type partition_id: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the partition. The types of the + unhealthy evaluations can be ReplicasHealthEvaluation or + EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(PartitionHealthEvaluation, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_health_evaluation_py3.py b/customSDK/servicefabric/models/partition_health_evaluation_py3.py new file mode 100644 index 00000000..cece0bf0 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_evaluation_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class PartitionHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a partition, containing information about + the data and the algorithm used by health store to evaluate health. The + evaluation is returned only when the aggregated health state is either + Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition whose health evaluation is + described by this object. + :type partition_id: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the partition. The types of the + unhealthy evaluations can be ReplicasHealthEvaluation or + EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, partition_id: str=None, unhealthy_evaluations=None, **kwargs) -> None: + super(PartitionHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.partition_id = partition_id + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_health_py3.py b/customSDK/servicefabric/models/partition_health_py3.py new file mode 100644 index 00000000..8e8e37e8 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_py3 import EntityHealth + + +class PartitionHealth(EntityHealth): + """Information about the health of a Service Fabric partition. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param partition_id: ID of the partition whose health information is + described by this object. + :type partition_id: str + :param replica_health_states: The list of replica health states associated + with the partition. + :type replica_health_states: + list[~azure.servicefabric.models.ReplicaHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_health_states': {'key': 'ReplicaHealthStates', 'type': '[ReplicaHealthState]'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, replica_health_states=None, **kwargs) -> None: + super(PartitionHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.partition_id = partition_id + self.replica_health_states = replica_health_states diff --git a/customSDK/servicefabric/models/partition_health_report_expired_event.py b/customSDK/servicefabric/models/partition_health_report_expired_event.py new file mode 100644 index 00000000..3f6144ef --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_report_expired_event.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_event import PartitionEvent + + +class PartitionHealthReportExpiredEvent(PartitionEvent): + """Partition Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(PartitionHealthReportExpiredEvent, self).__init__(**kwargs) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'PartitionHealthReportExpired' diff --git a/customSDK/servicefabric/models/partition_health_report_expired_event_py3.py b/customSDK/servicefabric/models/partition_health_report_expired_event_py3.py new file mode 100644 index 00000000..69430a96 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_report_expired_event_py3.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_event_py3 import PartitionEvent + + +class PartitionHealthReportExpiredEvent(PartitionEvent): + """Partition Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(PartitionHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'PartitionHealthReportExpired' diff --git a/customSDK/servicefabric/models/partition_health_state.py b/customSDK/servicefabric/models/partition_health_state.py new file mode 100644 index 00000000..37f49a7e --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_state.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state import EntityHealthState + + +class PartitionHealthState(EntityHealthState): + """Represents the health state of a partition, which contains the partition + identifier and its aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param partition_id: Id of the partition whose health state is described + by this object. + :type partition_id: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartitionHealthState, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) diff --git a/customSDK/servicefabric/models/partition_health_state_chunk.py b/customSDK/servicefabric/models/partition_health_state_chunk.py new file mode 100644 index 00000000..fe8fc51d --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_state_chunk.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk import EntityHealthStateChunk + + +class PartitionHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a partition, which contains the + partition ID, its aggregated health state and any replicas that respect the + filters in the cluster health chunk query description. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param partition_id: The Id of the partition. + :type partition_id: str + :param replica_health_state_chunks: The list of replica health state + chunks belonging to the partition that respect the filters in the cluster + health chunk query description. + :type replica_health_state_chunks: + ~azure.servicefabric.models.ReplicaHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_health_state_chunks': {'key': 'ReplicaHealthStateChunks', 'type': 'ReplicaHealthStateChunkList'}, + } + + def __init__(self, **kwargs): + super(PartitionHealthStateChunk, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.replica_health_state_chunks = kwargs.get('replica_health_state_chunks', None) diff --git a/customSDK/servicefabric/models/partition_health_state_chunk_list.py b/customSDK/servicefabric/models/partition_health_state_chunk_list.py new file mode 100644 index 00000000..7d11f66a --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_state_chunk_list.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionHealthStateChunkList(Model): + """The list of partition health state chunks that respect the input filters in + the chunk query description. + Returned by get cluster health state chunks query as part of the parent + application hierarchy. + + :param items: The list of partition health state chunks that respect the + input filters in the chunk query. + :type items: list[~azure.servicefabric.models.PartitionHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[PartitionHealthStateChunk]'}, + } + + def __init__(self, **kwargs): + super(PartitionHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/partition_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/partition_health_state_chunk_list_py3.py new file mode 100644 index 00000000..163b94d5 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_state_chunk_list_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionHealthStateChunkList(Model): + """The list of partition health state chunks that respect the input filters in + the chunk query description. + Returned by get cluster health state chunks query as part of the parent + application hierarchy. + + :param items: The list of partition health state chunks that respect the + input filters in the chunk query. + :type items: list[~azure.servicefabric.models.PartitionHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[PartitionHealthStateChunk]'}, + } + + def __init__(self, *, items=None, **kwargs) -> None: + super(PartitionHealthStateChunkList, self).__init__(**kwargs) + self.items = items diff --git a/customSDK/servicefabric/models/partition_health_state_chunk_py3.py b/customSDK/servicefabric/models/partition_health_state_chunk_py3.py new file mode 100644 index 00000000..52ec8ea2 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_state_chunk_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk_py3 import EntityHealthStateChunk + + +class PartitionHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a partition, which contains the + partition ID, its aggregated health state and any replicas that respect the + filters in the cluster health chunk query description. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param partition_id: The Id of the partition. + :type partition_id: str + :param replica_health_state_chunks: The list of replica health state + chunks belonging to the partition that respect the filters in the cluster + health chunk query description. + :type replica_health_state_chunks: + ~azure.servicefabric.models.ReplicaHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_health_state_chunks': {'key': 'ReplicaHealthStateChunks', 'type': 'ReplicaHealthStateChunkList'}, + } + + def __init__(self, *, health_state=None, partition_id: str=None, replica_health_state_chunks=None, **kwargs) -> None: + super(PartitionHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.partition_id = partition_id + self.replica_health_state_chunks = replica_health_state_chunks diff --git a/customSDK/servicefabric/models/partition_health_state_filter.py b/customSDK/servicefabric/models/partition_health_state_filter.py new file mode 100644 index 00000000..485a6b8b --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_state_filter.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionHealthStateFilter(Model): + """Defines matching criteria to determine whether a partition should be + included as a child of a service in the cluster health chunk. + The partitions are only returned if the parent entities match a filter + specified in the cluster health chunk query description. The parent service + and application must be included in the cluster health chunk. + One filter can match zero, one or multiple partitions, depending on its + properties. + + :param partition_id_filter: ID of the partition that matches the filter. + The filter is applied only to the specified partition, if it exists. + If the partition doesn't exist, no partition is returned in the cluster + health chunk based on this filter. + If the partition exists, it is included in the cluster health chunk if it + respects the other filter properties. + If not specified, all partitions that match the parent filters (if any) + are taken into consideration and matched against the other filter members, + like health state filter. + :type partition_id_filter: str + :param health_state_filter: The filter for the health state of the + partitions. It allows selecting partitions if they match the desired + health states. + The possible values are integer value of one of the following health + states. Only partitions that match the filter are returned. All partitions + are used to evaluate the cluster aggregated health state. + If not specified, default value is None, unless the partition ID is + specified. If the filter has default value and partition ID is specified, + the matching partition is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches partitions with + HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + :param replica_filters: Defines a list of filters that specify which + replicas to be included in the returned cluster health chunk as children + of the parent partition. The replicas are returned only if the parent + partition matches a filter. + If the list is empty, no replicas are returned. All the replicas are used + to evaluate the parent partition aggregated health state, regardless of + the input filters. + The partition filter may specify multiple replica filters. + For example, it can specify a filter to return all replicas with health + state Error and another filter to always include a replica identified by + its replica id. + :type replica_filters: + list[~azure.servicefabric.models.ReplicaHealthStateFilter] + """ + + _attribute_map = { + 'partition_id_filter': {'key': 'PartitionIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'replica_filters': {'key': 'ReplicaFilters', 'type': '[ReplicaHealthStateFilter]'}, + } + + def __init__(self, **kwargs): + super(PartitionHealthStateFilter, self).__init__(**kwargs) + self.partition_id_filter = kwargs.get('partition_id_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) + self.replica_filters = kwargs.get('replica_filters', None) diff --git a/customSDK/servicefabric/models/partition_health_state_filter_py3.py b/customSDK/servicefabric/models/partition_health_state_filter_py3.py new file mode 100644 index 00000000..f4e22e02 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_state_filter_py3.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionHealthStateFilter(Model): + """Defines matching criteria to determine whether a partition should be + included as a child of a service in the cluster health chunk. + The partitions are only returned if the parent entities match a filter + specified in the cluster health chunk query description. The parent service + and application must be included in the cluster health chunk. + One filter can match zero, one or multiple partitions, depending on its + properties. + + :param partition_id_filter: ID of the partition that matches the filter. + The filter is applied only to the specified partition, if it exists. + If the partition doesn't exist, no partition is returned in the cluster + health chunk based on this filter. + If the partition exists, it is included in the cluster health chunk if it + respects the other filter properties. + If not specified, all partitions that match the parent filters (if any) + are taken into consideration and matched against the other filter members, + like health state filter. + :type partition_id_filter: str + :param health_state_filter: The filter for the health state of the + partitions. It allows selecting partitions if they match the desired + health states. + The possible values are integer value of one of the following health + states. Only partitions that match the filter are returned. All partitions + are used to evaluate the cluster aggregated health state. + If not specified, default value is None, unless the partition ID is + specified. If the filter has default value and partition ID is specified, + the matching partition is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches partitions with + HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + :param replica_filters: Defines a list of filters that specify which + replicas to be included in the returned cluster health chunk as children + of the parent partition. The replicas are returned only if the parent + partition matches a filter. + If the list is empty, no replicas are returned. All the replicas are used + to evaluate the parent partition aggregated health state, regardless of + the input filters. + The partition filter may specify multiple replica filters. + For example, it can specify a filter to return all replicas with health + state Error and another filter to always include a replica identified by + its replica id. + :type replica_filters: + list[~azure.servicefabric.models.ReplicaHealthStateFilter] + """ + + _attribute_map = { + 'partition_id_filter': {'key': 'PartitionIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'replica_filters': {'key': 'ReplicaFilters', 'type': '[ReplicaHealthStateFilter]'}, + } + + def __init__(self, *, partition_id_filter: str=None, health_state_filter: int=0, replica_filters=None, **kwargs) -> None: + super(PartitionHealthStateFilter, self).__init__(**kwargs) + self.partition_id_filter = partition_id_filter + self.health_state_filter = health_state_filter + self.replica_filters = replica_filters diff --git a/customSDK/servicefabric/models/partition_health_state_py3.py b/customSDK/servicefabric/models/partition_health_state_py3.py new file mode 100644 index 00000000..7da6a832 --- /dev/null +++ b/customSDK/servicefabric/models/partition_health_state_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_py3 import EntityHealthState + + +class PartitionHealthState(EntityHealthState): + """Represents the health state of a partition, which contains the partition + identifier and its aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param partition_id: Id of the partition whose health state is described + by this object. + :type partition_id: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, partition_id: str=None, **kwargs) -> None: + super(PartitionHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.partition_id = partition_id diff --git a/customSDK/servicefabric/models/partition_information.py b/customSDK/servicefabric/models/partition_information.py new file mode 100644 index 00000000..cbbeef94 --- /dev/null +++ b/customSDK/servicefabric/models/partition_information.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionInformation(Model): + """Information about the partition identity, partitioning scheme and keys + supported by it. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Int64RangePartitionInformation, NamedPartitionInformation, + SingletonPartitionInformation + + All required parameters must be populated in order to send to Azure. + + :param id: An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. + The partition ID is unique and does not change for the lifetime of the + service. If the same service was deleted and recreated the IDs of its + partitions would be different. + :type id: str + :param service_partition_kind: Required. Constant filled by server. + :type service_partition_kind: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_partition_kind': {'Int64Range': 'Int64RangePartitionInformation', 'Named': 'NamedPartitionInformation', 'Singleton': 'SingletonPartitionInformation'} + } + + def __init__(self, **kwargs): + super(PartitionInformation, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.service_partition_kind = None diff --git a/customSDK/servicefabric/models/partition_information_py3.py b/customSDK/servicefabric/models/partition_information_py3.py new file mode 100644 index 00000000..acbc354a --- /dev/null +++ b/customSDK/servicefabric/models/partition_information_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionInformation(Model): + """Information about the partition identity, partitioning scheme and keys + supported by it. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Int64RangePartitionInformation, NamedPartitionInformation, + SingletonPartitionInformation + + All required parameters must be populated in order to send to Azure. + + :param id: An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. + The partition ID is unique and does not change for the lifetime of the + service. If the same service was deleted and recreated the IDs of its + partitions would be different. + :type id: str + :param service_partition_kind: Required. Constant filled by server. + :type service_partition_kind: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_partition_kind': {'Int64Range': 'Int64RangePartitionInformation', 'Named': 'NamedPartitionInformation', 'Singleton': 'SingletonPartitionInformation'} + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(PartitionInformation, self).__init__(**kwargs) + self.id = id + self.service_partition_kind = None diff --git a/customSDK/servicefabric/models/partition_instance_count_scale_mechanism.py b/customSDK/servicefabric/models/partition_instance_count_scale_mechanism.py new file mode 100644 index 00000000..7c0b1a85 --- /dev/null +++ b/customSDK/servicefabric/models/partition_instance_count_scale_mechanism.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .scaling_mechanism_description import ScalingMechanismDescription + + +class PartitionInstanceCountScaleMechanism(ScalingMechanismDescription): + """Represents a scaling mechanism for adding or removing instances of + stateless service partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param min_instance_count: Required. Minimum number of instances of the + partition. + :type min_instance_count: int + :param max_instance_count: Required. Maximum number of instances of the + partition. + :type max_instance_count: int + :param scale_increment: Required. The number of instances to add or remove + during a scaling operation. + :type scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_instance_count': {'required': True}, + 'max_instance_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'max_instance_count': {'key': 'MaxInstanceCount', 'type': 'int'}, + 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(PartitionInstanceCountScaleMechanism, self).__init__(**kwargs) + self.min_instance_count = kwargs.get('min_instance_count', None) + self.max_instance_count = kwargs.get('max_instance_count', None) + self.scale_increment = kwargs.get('scale_increment', None) + self.kind = 'PartitionInstanceCount' diff --git a/customSDK/servicefabric/models/partition_instance_count_scale_mechanism_py3.py b/customSDK/servicefabric/models/partition_instance_count_scale_mechanism_py3.py new file mode 100644 index 00000000..de580aef --- /dev/null +++ b/customSDK/servicefabric/models/partition_instance_count_scale_mechanism_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .scaling_mechanism_description_py3 import ScalingMechanismDescription + + +class PartitionInstanceCountScaleMechanism(ScalingMechanismDescription): + """Represents a scaling mechanism for adding or removing instances of + stateless service partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param min_instance_count: Required. Minimum number of instances of the + partition. + :type min_instance_count: int + :param max_instance_count: Required. Maximum number of instances of the + partition. + :type max_instance_count: int + :param scale_increment: Required. The number of instances to add or remove + during a scaling operation. + :type scale_increment: int + """ + + _validation = { + 'kind': {'required': True}, + 'min_instance_count': {'required': True}, + 'max_instance_count': {'required': True}, + 'scale_increment': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'max_instance_count': {'key': 'MaxInstanceCount', 'type': 'int'}, + 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, + } + + def __init__(self, *, min_instance_count: int, max_instance_count: int, scale_increment: int, **kwargs) -> None: + super(PartitionInstanceCountScaleMechanism, self).__init__(**kwargs) + self.min_instance_count = min_instance_count + self.max_instance_count = max_instance_count + self.scale_increment = scale_increment + self.kind = 'PartitionInstanceCount' diff --git a/customSDK/servicefabric/models/partition_load_information.py b/customSDK/servicefabric/models/partition_load_information.py new file mode 100644 index 00000000..23c7a2c2 --- /dev/null +++ b/customSDK/servicefabric/models/partition_load_information.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionLoadInformation(Model): + """Represents load information for a partition, which contains the primary, + secondary and auxiliary reported load metrics. + In case there is no load reported, PartitionLoadInformation will contain + the default load for the service of the partition. + For default loads, LoadMetricReport's LastReportedUtc is set to 0. + + :param partition_id: Id of the partition. + :type partition_id: str + :param primary_load_metric_reports: Array of load reports from the primary + replica for this partition. + :type primary_load_metric_reports: + list[~azure.servicefabric.models.LoadMetricReport] + :param secondary_load_metric_reports: Array of aggregated load reports + from all secondary replicas for this partition. + Array only contains the latest reported load for each metric. + :type secondary_load_metric_reports: + list[~azure.servicefabric.models.LoadMetricReport] + :param auxiliary_load_metric_reports: Array of aggregated load reports + from all auxiliary replicas for this partition. + Array only contains the latest reported load for each metric. + :type auxiliary_load_metric_reports: + list[~azure.servicefabric.models.LoadMetricReport] + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'primary_load_metric_reports': {'key': 'PrimaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + 'secondary_load_metric_reports': {'key': 'SecondaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + 'auxiliary_load_metric_reports': {'key': 'AuxiliaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + } + + def __init__(self, **kwargs): + super(PartitionLoadInformation, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.primary_load_metric_reports = kwargs.get('primary_load_metric_reports', None) + self.secondary_load_metric_reports = kwargs.get('secondary_load_metric_reports', None) + self.auxiliary_load_metric_reports = kwargs.get('auxiliary_load_metric_reports', None) diff --git a/customSDK/servicefabric/models/partition_load_information_py3.py b/customSDK/servicefabric/models/partition_load_information_py3.py new file mode 100644 index 00000000..b846dae0 --- /dev/null +++ b/customSDK/servicefabric/models/partition_load_information_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionLoadInformation(Model): + """Represents load information for a partition, which contains the primary, + secondary and auxiliary reported load metrics. + In case there is no load reported, PartitionLoadInformation will contain + the default load for the service of the partition. + For default loads, LoadMetricReport's LastReportedUtc is set to 0. + + :param partition_id: Id of the partition. + :type partition_id: str + :param primary_load_metric_reports: Array of load reports from the primary + replica for this partition. + :type primary_load_metric_reports: + list[~azure.servicefabric.models.LoadMetricReport] + :param secondary_load_metric_reports: Array of aggregated load reports + from all secondary replicas for this partition. + Array only contains the latest reported load for each metric. + :type secondary_load_metric_reports: + list[~azure.servicefabric.models.LoadMetricReport] + :param auxiliary_load_metric_reports: Array of aggregated load reports + from all auxiliary replicas for this partition. + Array only contains the latest reported load for each metric. + :type auxiliary_load_metric_reports: + list[~azure.servicefabric.models.LoadMetricReport] + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'primary_load_metric_reports': {'key': 'PrimaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + 'secondary_load_metric_reports': {'key': 'SecondaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + 'auxiliary_load_metric_reports': {'key': 'AuxiliaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + } + + def __init__(self, *, partition_id: str=None, primary_load_metric_reports=None, secondary_load_metric_reports=None, auxiliary_load_metric_reports=None, **kwargs) -> None: + super(PartitionLoadInformation, self).__init__(**kwargs) + self.partition_id = partition_id + self.primary_load_metric_reports = primary_load_metric_reports + self.secondary_load_metric_reports = secondary_load_metric_reports + self.auxiliary_load_metric_reports = auxiliary_load_metric_reports diff --git a/customSDK/servicefabric/models/partition_metric_load_description.py b/customSDK/servicefabric/models/partition_metric_load_description.py new file mode 100644 index 00000000..c5f7b756 --- /dev/null +++ b/customSDK/servicefabric/models/partition_metric_load_description.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionMetricLoadDescription(Model): + """Represents load information for a partition, which contains the metrics + load information about primary, all secondary replicas/instances or a + specific secondary replica/instance on a specific node , all auxiliary + replicas or a specific auxiliary replica on a specific node. + + :param partition_id: Id of the partition. + :type partition_id: str + :param primary_replica_load_entries: Partition's load information for + primary replica, in case partition is from a stateful service. + :type primary_replica_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :param secondary_replicas_or_instances_load_entries: Partition's load + information for all secondary replicas or instances. + :type secondary_replicas_or_instances_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :param secondary_replica_or_instance_load_entries_per_node: Partition's + load information for a specific secondary replica or instance located on a + specific node. + :type secondary_replica_or_instance_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + :param auxiliary_replicas_load_entries: Partition's load information for + all auxiliary replicas. + :type auxiliary_replicas_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :param auxiliary_replica_load_entries_per_node: Partition's load + information for a specific auxiliary replica located on a specific node. + :type auxiliary_replica_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'primary_replica_load_entries': {'key': 'PrimaryReplicaLoadEntries', 'type': '[MetricLoadDescription]'}, + 'secondary_replicas_or_instances_load_entries': {'key': 'SecondaryReplicasOrInstancesLoadEntries', 'type': '[MetricLoadDescription]'}, + 'secondary_replica_or_instance_load_entries_per_node': {'key': 'SecondaryReplicaOrInstanceLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, + 'auxiliary_replicas_load_entries': {'key': 'AuxiliaryReplicasLoadEntries', 'type': '[MetricLoadDescription]'}, + 'auxiliary_replica_load_entries_per_node': {'key': 'AuxiliaryReplicaLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, + } + + def __init__(self, **kwargs): + super(PartitionMetricLoadDescription, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.primary_replica_load_entries = kwargs.get('primary_replica_load_entries', None) + self.secondary_replicas_or_instances_load_entries = kwargs.get('secondary_replicas_or_instances_load_entries', None) + self.secondary_replica_or_instance_load_entries_per_node = kwargs.get('secondary_replica_or_instance_load_entries_per_node', None) + self.auxiliary_replicas_load_entries = kwargs.get('auxiliary_replicas_load_entries', None) + self.auxiliary_replica_load_entries_per_node = kwargs.get('auxiliary_replica_load_entries_per_node', None) diff --git a/customSDK/servicefabric/models/partition_metric_load_description_py3.py b/customSDK/servicefabric/models/partition_metric_load_description_py3.py new file mode 100644 index 00000000..cb90725d --- /dev/null +++ b/customSDK/servicefabric/models/partition_metric_load_description_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionMetricLoadDescription(Model): + """Represents load information for a partition, which contains the metrics + load information about primary, all secondary replicas/instances or a + specific secondary replica/instance on a specific node , all auxiliary + replicas or a specific auxiliary replica on a specific node. + + :param partition_id: Id of the partition. + :type partition_id: str + :param primary_replica_load_entries: Partition's load information for + primary replica, in case partition is from a stateful service. + :type primary_replica_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :param secondary_replicas_or_instances_load_entries: Partition's load + information for all secondary replicas or instances. + :type secondary_replicas_or_instances_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :param secondary_replica_or_instance_load_entries_per_node: Partition's + load information for a specific secondary replica or instance located on a + specific node. + :type secondary_replica_or_instance_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + :param auxiliary_replicas_load_entries: Partition's load information for + all auxiliary replicas. + :type auxiliary_replicas_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :param auxiliary_replica_load_entries_per_node: Partition's load + information for a specific auxiliary replica located on a specific node. + :type auxiliary_replica_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'primary_replica_load_entries': {'key': 'PrimaryReplicaLoadEntries', 'type': '[MetricLoadDescription]'}, + 'secondary_replicas_or_instances_load_entries': {'key': 'SecondaryReplicasOrInstancesLoadEntries', 'type': '[MetricLoadDescription]'}, + 'secondary_replica_or_instance_load_entries_per_node': {'key': 'SecondaryReplicaOrInstanceLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, + 'auxiliary_replicas_load_entries': {'key': 'AuxiliaryReplicasLoadEntries', 'type': '[MetricLoadDescription]'}, + 'auxiliary_replica_load_entries_per_node': {'key': 'AuxiliaryReplicaLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, + } + + def __init__(self, *, partition_id: str=None, primary_replica_load_entries=None, secondary_replicas_or_instances_load_entries=None, secondary_replica_or_instance_load_entries_per_node=None, auxiliary_replicas_load_entries=None, auxiliary_replica_load_entries_per_node=None, **kwargs) -> None: + super(PartitionMetricLoadDescription, self).__init__(**kwargs) + self.partition_id = partition_id + self.primary_replica_load_entries = primary_replica_load_entries + self.secondary_replicas_or_instances_load_entries = secondary_replicas_or_instances_load_entries + self.secondary_replica_or_instance_load_entries_per_node = secondary_replica_or_instance_load_entries_per_node + self.auxiliary_replicas_load_entries = auxiliary_replicas_load_entries + self.auxiliary_replica_load_entries_per_node = auxiliary_replica_load_entries_per_node diff --git a/customSDK/servicefabric/models/partition_new_health_report_event.py b/customSDK/servicefabric/models/partition_new_health_report_event.py new file mode 100644 index 00000000..b51931d3 --- /dev/null +++ b/customSDK/servicefabric/models/partition_new_health_report_event.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_event import PartitionEvent + + +class PartitionNewHealthReportEvent(PartitionEvent): + """Partition Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(PartitionNewHealthReportEvent, self).__init__(**kwargs) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'PartitionNewHealthReport' diff --git a/customSDK/servicefabric/models/partition_new_health_report_event_py3.py b/customSDK/servicefabric/models/partition_new_health_report_event_py3.py new file mode 100644 index 00000000..e03c92aa --- /dev/null +++ b/customSDK/servicefabric/models/partition_new_health_report_event_py3.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_event_py3 import PartitionEvent + + +class PartitionNewHealthReportEvent(PartitionEvent): + """Partition Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(PartitionNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'PartitionNewHealthReport' diff --git a/customSDK/servicefabric/models/partition_primary_move_analysis_event.py b/customSDK/servicefabric/models/partition_primary_move_analysis_event.py new file mode 100644 index 00000000..e6aefebd --- /dev/null +++ b/customSDK/servicefabric/models/partition_primary_move_analysis_event.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_analysis_event import PartitionAnalysisEvent + + +class PartitionPrimaryMoveAnalysisEvent(PartitionAnalysisEvent): + """Partition Primary Move Analysis event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param metadata: Required. Metadata about an Analysis Event. + :type metadata: ~azure.servicefabric.models.AnalysisEventMetadata + :param when_move_completed: Required. Time when the move was completed. + :type when_move_completed: datetime + :param previous_node: Required. The name of a Service Fabric node. + :type previous_node: str + :param current_node: Required. The name of a Service Fabric node. + :type current_node: str + :param move_reason: Required. Move reason. + :type move_reason: str + :param relevant_traces: Required. Relevant traces. + :type relevant_traces: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'metadata': {'required': True}, + 'when_move_completed': {'required': True}, + 'previous_node': {'required': True}, + 'current_node': {'required': True}, + 'move_reason': {'required': True}, + 'relevant_traces': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, + 'when_move_completed': {'key': 'WhenMoveCompleted', 'type': 'iso-8601'}, + 'previous_node': {'key': 'PreviousNode', 'type': 'str'}, + 'current_node': {'key': 'CurrentNode', 'type': 'str'}, + 'move_reason': {'key': 'MoveReason', 'type': 'str'}, + 'relevant_traces': {'key': 'RelevantTraces', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartitionPrimaryMoveAnalysisEvent, self).__init__(**kwargs) + self.when_move_completed = kwargs.get('when_move_completed', None) + self.previous_node = kwargs.get('previous_node', None) + self.current_node = kwargs.get('current_node', None) + self.move_reason = kwargs.get('move_reason', None) + self.relevant_traces = kwargs.get('relevant_traces', None) + self.kind = 'PartitionPrimaryMoveAnalysis' diff --git a/customSDK/servicefabric/models/partition_primary_move_analysis_event_py3.py b/customSDK/servicefabric/models/partition_primary_move_analysis_event_py3.py new file mode 100644 index 00000000..a537c950 --- /dev/null +++ b/customSDK/servicefabric/models/partition_primary_move_analysis_event_py3.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_analysis_event_py3 import PartitionAnalysisEvent + + +class PartitionPrimaryMoveAnalysisEvent(PartitionAnalysisEvent): + """Partition Primary Move Analysis event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param metadata: Required. Metadata about an Analysis Event. + :type metadata: ~azure.servicefabric.models.AnalysisEventMetadata + :param when_move_completed: Required. Time when the move was completed. + :type when_move_completed: datetime + :param previous_node: Required. The name of a Service Fabric node. + :type previous_node: str + :param current_node: Required. The name of a Service Fabric node. + :type current_node: str + :param move_reason: Required. Move reason. + :type move_reason: str + :param relevant_traces: Required. Relevant traces. + :type relevant_traces: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'metadata': {'required': True}, + 'when_move_completed': {'required': True}, + 'previous_node': {'required': True}, + 'current_node': {'required': True}, + 'move_reason': {'required': True}, + 'relevant_traces': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, + 'when_move_completed': {'key': 'WhenMoveCompleted', 'type': 'iso-8601'}, + 'previous_node': {'key': 'PreviousNode', 'type': 'str'}, + 'current_node': {'key': 'CurrentNode', 'type': 'str'}, + 'move_reason': {'key': 'MoveReason', 'type': 'str'}, + 'relevant_traces': {'key': 'RelevantTraces', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, metadata, when_move_completed, previous_node: str, current_node: str, move_reason: str, relevant_traces: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(PartitionPrimaryMoveAnalysisEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, metadata=metadata, **kwargs) + self.when_move_completed = when_move_completed + self.previous_node = previous_node + self.current_node = current_node + self.move_reason = move_reason + self.relevant_traces = relevant_traces + self.kind = 'PartitionPrimaryMoveAnalysis' diff --git a/customSDK/servicefabric/models/partition_quorum_loss_progress.py b/customSDK/servicefabric/models/partition_quorum_loss_progress.py new file mode 100644 index 00000000..f91903fc --- /dev/null +++ b/customSDK/servicefabric/models/partition_quorum_loss_progress.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionQuorumLossProgress(Model): + """Information about a partition quorum loss user-induced operation. + + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param invoke_quorum_loss_result: Represents information about an + operation in a terminal state (Completed or Faulted). + :type invoke_quorum_loss_result: + ~azure.servicefabric.models.InvokeQuorumLossResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'invoke_quorum_loss_result': {'key': 'InvokeQuorumLossResult', 'type': 'InvokeQuorumLossResult'}, + } + + def __init__(self, **kwargs): + super(PartitionQuorumLossProgress, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.invoke_quorum_loss_result = kwargs.get('invoke_quorum_loss_result', None) diff --git a/customSDK/servicefabric/models/partition_quorum_loss_progress_py3.py b/customSDK/servicefabric/models/partition_quorum_loss_progress_py3.py new file mode 100644 index 00000000..ab03e5fb --- /dev/null +++ b/customSDK/servicefabric/models/partition_quorum_loss_progress_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionQuorumLossProgress(Model): + """Information about a partition quorum loss user-induced operation. + + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param invoke_quorum_loss_result: Represents information about an + operation in a terminal state (Completed or Faulted). + :type invoke_quorum_loss_result: + ~azure.servicefabric.models.InvokeQuorumLossResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'invoke_quorum_loss_result': {'key': 'InvokeQuorumLossResult', 'type': 'InvokeQuorumLossResult'}, + } + + def __init__(self, *, state=None, invoke_quorum_loss_result=None, **kwargs) -> None: + super(PartitionQuorumLossProgress, self).__init__(**kwargs) + self.state = state + self.invoke_quorum_loss_result = invoke_quorum_loss_result diff --git a/customSDK/servicefabric/models/partition_reconfigured_event.py b/customSDK/servicefabric/models/partition_reconfigured_event.py new file mode 100644 index 00000000..94dd7abd --- /dev/null +++ b/customSDK/servicefabric/models/partition_reconfigured_event.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_event import PartitionEvent + + +class PartitionReconfiguredEvent(PartitionEvent): + """Partition Reconfiguration event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: Required. Id of Node instance. + :type node_instance_id: str + :param service_type: Required. Type of Service. + :type service_type: str + :param cc_epoch_data_loss_version: Required. CcEpochDataLoss version. + :type cc_epoch_data_loss_version: long + :param cc_epoch_config_version: Required. CcEpochConfig version. + :type cc_epoch_config_version: long + :param reconfig_type: Required. Type of reconfiguration. + :type reconfig_type: str + :param result: Required. Describes reconfiguration result. + :type result: str + :param phase0_duration_ms: Required. Duration of Phase0 in milli-seconds. + :type phase0_duration_ms: float + :param phase1_duration_ms: Required. Duration of Phase1 in milli-seconds. + :type phase1_duration_ms: float + :param phase2_duration_ms: Required. Duration of Phase2 in milli-seconds. + :type phase2_duration_ms: float + :param phase3_duration_ms: Required. Duration of Phase3 in milli-seconds. + :type phase3_duration_ms: float + :param phase4_duration_ms: Required. Duration of Phase4 in milli-seconds. + :type phase4_duration_ms: float + :param total_duration_ms: Required. Total duration in milli-seconds. + :type total_duration_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'service_type': {'required': True}, + 'cc_epoch_data_loss_version': {'required': True}, + 'cc_epoch_config_version': {'required': True}, + 'reconfig_type': {'required': True}, + 'result': {'required': True}, + 'phase0_duration_ms': {'required': True}, + 'phase1_duration_ms': {'required': True}, + 'phase2_duration_ms': {'required': True}, + 'phase3_duration_ms': {'required': True}, + 'phase4_duration_ms': {'required': True}, + 'total_duration_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + 'service_type': {'key': 'ServiceType', 'type': 'str'}, + 'cc_epoch_data_loss_version': {'key': 'CcEpochDataLossVersion', 'type': 'long'}, + 'cc_epoch_config_version': {'key': 'CcEpochConfigVersion', 'type': 'long'}, + 'reconfig_type': {'key': 'ReconfigType', 'type': 'str'}, + 'result': {'key': 'Result', 'type': 'str'}, + 'phase0_duration_ms': {'key': 'Phase0DurationMs', 'type': 'float'}, + 'phase1_duration_ms': {'key': 'Phase1DurationMs', 'type': 'float'}, + 'phase2_duration_ms': {'key': 'Phase2DurationMs', 'type': 'float'}, + 'phase3_duration_ms': {'key': 'Phase3DurationMs', 'type': 'float'}, + 'phase4_duration_ms': {'key': 'Phase4DurationMs', 'type': 'float'}, + 'total_duration_ms': {'key': 'TotalDurationMs', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(PartitionReconfiguredEvent, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.node_instance_id = kwargs.get('node_instance_id', None) + self.service_type = kwargs.get('service_type', None) + self.cc_epoch_data_loss_version = kwargs.get('cc_epoch_data_loss_version', None) + self.cc_epoch_config_version = kwargs.get('cc_epoch_config_version', None) + self.reconfig_type = kwargs.get('reconfig_type', None) + self.result = kwargs.get('result', None) + self.phase0_duration_ms = kwargs.get('phase0_duration_ms', None) + self.phase1_duration_ms = kwargs.get('phase1_duration_ms', None) + self.phase2_duration_ms = kwargs.get('phase2_duration_ms', None) + self.phase3_duration_ms = kwargs.get('phase3_duration_ms', None) + self.phase4_duration_ms = kwargs.get('phase4_duration_ms', None) + self.total_duration_ms = kwargs.get('total_duration_ms', None) + self.kind = 'PartitionReconfigured' diff --git a/customSDK/servicefabric/models/partition_reconfigured_event_py3.py b/customSDK/servicefabric/models/partition_reconfigured_event_py3.py new file mode 100644 index 00000000..d414c344 --- /dev/null +++ b/customSDK/servicefabric/models/partition_reconfigured_event_py3.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_event_py3 import PartitionEvent + + +class PartitionReconfiguredEvent(PartitionEvent): + """Partition Reconfiguration event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param node_name: Required. The name of a Service Fabric node. + :type node_name: str + :param node_instance_id: Required. Id of Node instance. + :type node_instance_id: str + :param service_type: Required. Type of Service. + :type service_type: str + :param cc_epoch_data_loss_version: Required. CcEpochDataLoss version. + :type cc_epoch_data_loss_version: long + :param cc_epoch_config_version: Required. CcEpochConfig version. + :type cc_epoch_config_version: long + :param reconfig_type: Required. Type of reconfiguration. + :type reconfig_type: str + :param result: Required. Describes reconfiguration result. + :type result: str + :param phase0_duration_ms: Required. Duration of Phase0 in milli-seconds. + :type phase0_duration_ms: float + :param phase1_duration_ms: Required. Duration of Phase1 in milli-seconds. + :type phase1_duration_ms: float + :param phase2_duration_ms: Required. Duration of Phase2 in milli-seconds. + :type phase2_duration_ms: float + :param phase3_duration_ms: Required. Duration of Phase3 in milli-seconds. + :type phase3_duration_ms: float + :param phase4_duration_ms: Required. Duration of Phase4 in milli-seconds. + :type phase4_duration_ms: float + :param total_duration_ms: Required. Total duration in milli-seconds. + :type total_duration_ms: float + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'node_name': {'required': True}, + 'node_instance_id': {'required': True}, + 'service_type': {'required': True}, + 'cc_epoch_data_loss_version': {'required': True}, + 'cc_epoch_config_version': {'required': True}, + 'reconfig_type': {'required': True}, + 'result': {'required': True}, + 'phase0_duration_ms': {'required': True}, + 'phase1_duration_ms': {'required': True}, + 'phase2_duration_ms': {'required': True}, + 'phase3_duration_ms': {'required': True}, + 'phase4_duration_ms': {'required': True}, + 'total_duration_ms': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + 'service_type': {'key': 'ServiceType', 'type': 'str'}, + 'cc_epoch_data_loss_version': {'key': 'CcEpochDataLossVersion', 'type': 'long'}, + 'cc_epoch_config_version': {'key': 'CcEpochConfigVersion', 'type': 'long'}, + 'reconfig_type': {'key': 'ReconfigType', 'type': 'str'}, + 'result': {'key': 'Result', 'type': 'str'}, + 'phase0_duration_ms': {'key': 'Phase0DurationMs', 'type': 'float'}, + 'phase1_duration_ms': {'key': 'Phase1DurationMs', 'type': 'float'}, + 'phase2_duration_ms': {'key': 'Phase2DurationMs', 'type': 'float'}, + 'phase3_duration_ms': {'key': 'Phase3DurationMs', 'type': 'float'}, + 'phase4_duration_ms': {'key': 'Phase4DurationMs', 'type': 'float'}, + 'total_duration_ms': {'key': 'TotalDurationMs', 'type': 'float'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, node_name: str, node_instance_id: str, service_type: str, cc_epoch_data_loss_version: int, cc_epoch_config_version: int, reconfig_type: str, result: str, phase0_duration_ms: float, phase1_duration_ms: float, phase2_duration_ms: float, phase3_duration_ms: float, phase4_duration_ms: float, total_duration_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(PartitionReconfiguredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) + self.node_name = node_name + self.node_instance_id = node_instance_id + self.service_type = service_type + self.cc_epoch_data_loss_version = cc_epoch_data_loss_version + self.cc_epoch_config_version = cc_epoch_config_version + self.reconfig_type = reconfig_type + self.result = result + self.phase0_duration_ms = phase0_duration_ms + self.phase1_duration_ms = phase1_duration_ms + self.phase2_duration_ms = phase2_duration_ms + self.phase3_duration_ms = phase3_duration_ms + self.phase4_duration_ms = phase4_duration_ms + self.total_duration_ms = total_duration_ms + self.kind = 'PartitionReconfigured' diff --git a/customSDK/servicefabric/models/partition_restart_progress.py b/customSDK/servicefabric/models/partition_restart_progress.py new file mode 100644 index 00000000..7526c9eb --- /dev/null +++ b/customSDK/servicefabric/models/partition_restart_progress.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionRestartProgress(Model): + """Information about a partition restart user-induced operation. + + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param restart_partition_result: Represents information about an operation + in a terminal state (Completed or Faulted). + :type restart_partition_result: + ~azure.servicefabric.models.RestartPartitionResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'restart_partition_result': {'key': 'RestartPartitionResult', 'type': 'RestartPartitionResult'}, + } + + def __init__(self, **kwargs): + super(PartitionRestartProgress, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.restart_partition_result = kwargs.get('restart_partition_result', None) diff --git a/customSDK/servicefabric/models/partition_restart_progress_py3.py b/customSDK/servicefabric/models/partition_restart_progress_py3.py new file mode 100644 index 00000000..5d402111 --- /dev/null +++ b/customSDK/servicefabric/models/partition_restart_progress_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionRestartProgress(Model): + """Information about a partition restart user-induced operation. + + :param state: The state of the operation. Possible values include: + 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', + 'ForceCancelled' + :type state: str or ~azure.servicefabric.models.OperationState + :param restart_partition_result: Represents information about an operation + in a terminal state (Completed or Faulted). + :type restart_partition_result: + ~azure.servicefabric.models.RestartPartitionResult + """ + + _attribute_map = { + 'state': {'key': 'State', 'type': 'str'}, + 'restart_partition_result': {'key': 'RestartPartitionResult', 'type': 'RestartPartitionResult'}, + } + + def __init__(self, *, state=None, restart_partition_result=None, **kwargs) -> None: + super(PartitionRestartProgress, self).__init__(**kwargs) + self.state = state + self.restart_partition_result = restart_partition_result diff --git a/customSDK/servicefabric/models/partition_safety_check.py b/customSDK/servicefabric/models/partition_safety_check.py new file mode 100644 index 00000000..f3a79a50 --- /dev/null +++ b/customSDK/servicefabric/models/partition_safety_check.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .safety_check import SafetyCheck + + +class PartitionSafetyCheck(SafetyCheck): + """Represents a safety check for the service partition being performed by + service fabric before continuing with operations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EnsureAvailabilitySafetyCheck, + EnsurePartitionQuorumSafetyCheck, WaitForInbuildReplicaSafetyCheck, + WaitForPrimaryPlacementSafetyCheck, WaitForPrimarySwapSafetyCheck, + WaitForReconfigurationSafetyCheck + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'EnsureAvailability': 'EnsureAvailabilitySafetyCheck', 'EnsurePartitionQuorum': 'EnsurePartitionQuorumSafetyCheck', 'WaitForInbuildReplica': 'WaitForInbuildReplicaSafetyCheck', 'WaitForPrimaryPlacement': 'WaitForPrimaryPlacementSafetyCheck', 'WaitForPrimarySwap': 'WaitForPrimarySwapSafetyCheck', 'WaitForReconfiguration': 'WaitForReconfigurationSafetyCheck'} + } + + def __init__(self, **kwargs): + super(PartitionSafetyCheck, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.kind = 'PartitionSafetyCheck' diff --git a/customSDK/servicefabric/models/partition_safety_check_py3.py b/customSDK/servicefabric/models/partition_safety_check_py3.py new file mode 100644 index 00000000..86c54d03 --- /dev/null +++ b/customSDK/servicefabric/models/partition_safety_check_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .safety_check_py3 import SafetyCheck + + +class PartitionSafetyCheck(SafetyCheck): + """Represents a safety check for the service partition being performed by + service fabric before continuing with operations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EnsureAvailabilitySafetyCheck, + EnsurePartitionQuorumSafetyCheck, WaitForInbuildReplicaSafetyCheck, + WaitForPrimaryPlacementSafetyCheck, WaitForPrimarySwapSafetyCheck, + WaitForReconfigurationSafetyCheck + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'EnsureAvailability': 'EnsureAvailabilitySafetyCheck', 'EnsurePartitionQuorum': 'EnsurePartitionQuorumSafetyCheck', 'WaitForInbuildReplica': 'WaitForInbuildReplicaSafetyCheck', 'WaitForPrimaryPlacement': 'WaitForPrimaryPlacementSafetyCheck', 'WaitForPrimarySwap': 'WaitForPrimarySwapSafetyCheck', 'WaitForReconfiguration': 'WaitForReconfigurationSafetyCheck'} + } + + def __init__(self, *, partition_id: str=None, **kwargs) -> None: + super(PartitionSafetyCheck, self).__init__(**kwargs) + self.partition_id = partition_id + self.kind = 'PartitionSafetyCheck' diff --git a/customSDK/servicefabric/models/partition_scheme_description.py b/customSDK/servicefabric/models/partition_scheme_description.py new file mode 100644 index 00000000..205c3d51 --- /dev/null +++ b/customSDK/servicefabric/models/partition_scheme_description.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionSchemeDescription(Model): + """Describes how the service is partitioned. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NamedPartitionSchemeDescription, + SingletonPartitionSchemeDescription, + UniformInt64RangePartitionSchemeDescription + + All required parameters must be populated in order to send to Azure. + + :param partition_scheme: Required. Constant filled by server. + :type partition_scheme: str + """ + + _validation = { + 'partition_scheme': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + } + + _subtype_map = { + 'partition_scheme': {'Named': 'NamedPartitionSchemeDescription', 'Singleton': 'SingletonPartitionSchemeDescription', 'UniformInt64Range': 'UniformInt64RangePartitionSchemeDescription'} + } + + def __init__(self, **kwargs): + super(PartitionSchemeDescription, self).__init__(**kwargs) + self.partition_scheme = None diff --git a/customSDK/servicefabric/models/partition_scheme_description_py3.py b/customSDK/servicefabric/models/partition_scheme_description_py3.py new file mode 100644 index 00000000..88805c40 --- /dev/null +++ b/customSDK/servicefabric/models/partition_scheme_description_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartitionSchemeDescription(Model): + """Describes how the service is partitioned. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NamedPartitionSchemeDescription, + SingletonPartitionSchemeDescription, + UniformInt64RangePartitionSchemeDescription + + All required parameters must be populated in order to send to Azure. + + :param partition_scheme: Required. Constant filled by server. + :type partition_scheme: str + """ + + _validation = { + 'partition_scheme': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + } + + _subtype_map = { + 'partition_scheme': {'Named': 'NamedPartitionSchemeDescription', 'Singleton': 'SingletonPartitionSchemeDescription', 'UniformInt64Range': 'UniformInt64RangePartitionSchemeDescription'} + } + + def __init__(self, **kwargs) -> None: + super(PartitionSchemeDescription, self).__init__(**kwargs) + self.partition_scheme = None diff --git a/customSDK/servicefabric/models/partitions_health_evaluation.py b/customSDK/servicefabric/models/partitions_health_evaluation.py new file mode 100644 index 00000000..2fbf52e6 --- /dev/null +++ b/customSDK/servicefabric/models/partitions_health_evaluation.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class PartitionsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for the partitions of a service, containing + health evaluations for each unhealthy partition that impacts current + aggregated health state. Can be returned when evaluating service health and + the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_partitions_per_service: Maximum allowed + percentage of unhealthy partitions per service from the + ServiceTypeHealthPolicy. + :type max_percent_unhealthy_partitions_per_service: int + :param total_count: Total number of partitions of the service from the + health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + PartitionHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(PartitionsHealthEvaluation, self).__init__(**kwargs) + self.max_percent_unhealthy_partitions_per_service = kwargs.get('max_percent_unhealthy_partitions_per_service', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Partitions' diff --git a/customSDK/servicefabric/models/partitions_health_evaluation_py3.py b/customSDK/servicefabric/models/partitions_health_evaluation_py3.py new file mode 100644 index 00000000..012f0669 --- /dev/null +++ b/customSDK/servicefabric/models/partitions_health_evaluation_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class PartitionsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for the partitions of a service, containing + health evaluations for each unhealthy partition that impacts current + aggregated health state. Can be returned when evaluating service health and + the aggregated health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_partitions_per_service: Maximum allowed + percentage of unhealthy partitions per service from the + ServiceTypeHealthPolicy. + :type max_percent_unhealthy_partitions_per_service: int + :param total_count: Total number of partitions of the service from the + health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + PartitionHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_partitions_per_service: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(PartitionsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.max_percent_unhealthy_partitions_per_service = max_percent_unhealthy_partitions_per_service + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Partitions' diff --git a/customSDK/servicefabric/models/primary_replicator_status.py b/customSDK/servicefabric/models/primary_replicator_status.py new file mode 100644 index 00000000..eea2a133 --- /dev/null +++ b/customSDK/servicefabric/models/primary_replicator_status.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replicator_status import ReplicatorStatus + + +class PrimaryReplicatorStatus(ReplicatorStatus): + """Provides statistics about the Service Fabric Replicator, when it is + functioning in a Primary role. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param replication_queue_status: Details about the replication queue on + the primary replicator. + :type replication_queue_status: + ~azure.servicefabric.models.ReplicatorQueueStatus + :param remote_replicators: The status of all the active and idle secondary + replicators that the primary is aware of. + :type remote_replicators: + list[~azure.servicefabric.models.RemoteReplicatorStatus] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'remote_replicators': {'key': 'RemoteReplicators', 'type': '[RemoteReplicatorStatus]'}, + } + + def __init__(self, **kwargs): + super(PrimaryReplicatorStatus, self).__init__(**kwargs) + self.replication_queue_status = kwargs.get('replication_queue_status', None) + self.remote_replicators = kwargs.get('remote_replicators', None) + self.kind = 'Primary' diff --git a/customSDK/servicefabric/models/primary_replicator_status_py3.py b/customSDK/servicefabric/models/primary_replicator_status_py3.py new file mode 100644 index 00000000..cbffe9c4 --- /dev/null +++ b/customSDK/servicefabric/models/primary_replicator_status_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replicator_status_py3 import ReplicatorStatus + + +class PrimaryReplicatorStatus(ReplicatorStatus): + """Provides statistics about the Service Fabric Replicator, when it is + functioning in a Primary role. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param replication_queue_status: Details about the replication queue on + the primary replicator. + :type replication_queue_status: + ~azure.servicefabric.models.ReplicatorQueueStatus + :param remote_replicators: The status of all the active and idle secondary + replicators that the primary is aware of. + :type remote_replicators: + list[~azure.servicefabric.models.RemoteReplicatorStatus] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'remote_replicators': {'key': 'RemoteReplicators', 'type': '[RemoteReplicatorStatus]'}, + } + + def __init__(self, *, replication_queue_status=None, remote_replicators=None, **kwargs) -> None: + super(PrimaryReplicatorStatus, self).__init__(**kwargs) + self.replication_queue_status = replication_queue_status + self.remote_replicators = remote_replicators + self.kind = 'Primary' diff --git a/customSDK/servicefabric/models/probe.py b/customSDK/servicefabric/models/probe.py new file mode 100644 index 00000000..f1514369 --- /dev/null +++ b/customSDK/servicefabric/models/probe.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Probe(Model): + """Probes have a number of fields that you can use to control their behavior. + + :param initial_delay_seconds: The initial delay in seconds to start + executing probe once codepackage has started. Default value: 0 . + :type initial_delay_seconds: int + :param period_seconds: Periodic seconds to execute probe. Default value: + 10 . + :type period_seconds: int + :param timeout_seconds: Period after which probe is considered as failed + if it hasn't completed successfully. Default value: 1 . + :type timeout_seconds: int + :param success_threshold: The count of successful probe executions after + which probe is considered success. Default value: 1 . + :type success_threshold: int + :param failure_threshold: The count of failures after which probe is + considered failed. Default value: 3 . + :type failure_threshold: int + :param exec_property: Exec command to run inside the container. + :type exec_property: ~azure.servicefabric.models.ProbeExec + :param http_get: Http probe for the container. + :type http_get: ~azure.servicefabric.models.ProbeHttpGet + :param tcp_socket: Tcp port to probe inside the container. + :type tcp_socket: ~azure.servicefabric.models.ProbeTcpSocket + """ + + _attribute_map = { + 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, + 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, + 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, + 'exec_property': {'key': 'exec', 'type': 'ProbeExec'}, + 'http_get': {'key': 'httpGet', 'type': 'ProbeHttpGet'}, + 'tcp_socket': {'key': 'tcpSocket', 'type': 'ProbeTcpSocket'}, + } + + def __init__(self, **kwargs): + super(Probe, self).__init__(**kwargs) + self.initial_delay_seconds = kwargs.get('initial_delay_seconds', 0) + self.period_seconds = kwargs.get('period_seconds', 10) + self.timeout_seconds = kwargs.get('timeout_seconds', 1) + self.success_threshold = kwargs.get('success_threshold', 1) + self.failure_threshold = kwargs.get('failure_threshold', 3) + self.exec_property = kwargs.get('exec_property', None) + self.http_get = kwargs.get('http_get', None) + self.tcp_socket = kwargs.get('tcp_socket', None) diff --git a/customSDK/servicefabric/models/probe_exec.py b/customSDK/servicefabric/models/probe_exec.py new file mode 100644 index 00000000..3bd118a4 --- /dev/null +++ b/customSDK/servicefabric/models/probe_exec.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProbeExec(Model): + """Exec command to run inside the container. + + All required parameters must be populated in order to send to Azure. + + :param command: Required. Comma separated command to run inside the + container for example "sh, -c, echo hello world". + :type command: str + """ + + _validation = { + 'command': {'required': True}, + } + + _attribute_map = { + 'command': {'key': 'command', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProbeExec, self).__init__(**kwargs) + self.command = kwargs.get('command', None) diff --git a/customSDK/servicefabric/models/probe_exec_py3.py b/customSDK/servicefabric/models/probe_exec_py3.py new file mode 100644 index 00000000..4e7a9d86 --- /dev/null +++ b/customSDK/servicefabric/models/probe_exec_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProbeExec(Model): + """Exec command to run inside the container. + + All required parameters must be populated in order to send to Azure. + + :param command: Required. Comma separated command to run inside the + container for example "sh, -c, echo hello world". + :type command: str + """ + + _validation = { + 'command': {'required': True}, + } + + _attribute_map = { + 'command': {'key': 'command', 'type': 'str'}, + } + + def __init__(self, *, command: str, **kwargs) -> None: + super(ProbeExec, self).__init__(**kwargs) + self.command = command diff --git a/customSDK/servicefabric/models/probe_http_get.py b/customSDK/servicefabric/models/probe_http_get.py new file mode 100644 index 00000000..acc0ef35 --- /dev/null +++ b/customSDK/servicefabric/models/probe_http_get.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProbeHttpGet(Model): + """Http probe for the container. + + All required parameters must be populated in order to send to Azure. + + :param port: Required. Port to access for probe. + :type port: int + :param path: Path to access on the HTTP request. + :type path: str + :param host: Host IP to connect to. + :type host: str + :param http_headers: Headers to set in the request. + :type http_headers: list[~azure.servicefabric.models.ProbeHttpGetHeaders] + :param scheme: Scheme for the http probe. Can be Http or Https. Possible + values include: 'http', 'https' + :type scheme: str or ~azure.servicefabric.models.Scheme + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + 'path': {'key': 'path', 'type': 'str'}, + 'host': {'key': 'host', 'type': 'str'}, + 'http_headers': {'key': 'httpHeaders', 'type': '[ProbeHttpGetHeaders]'}, + 'scheme': {'key': 'scheme', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProbeHttpGet, self).__init__(**kwargs) + self.port = kwargs.get('port', None) + self.path = kwargs.get('path', None) + self.host = kwargs.get('host', None) + self.http_headers = kwargs.get('http_headers', None) + self.scheme = kwargs.get('scheme', None) diff --git a/customSDK/servicefabric/models/probe_http_get_headers.py b/customSDK/servicefabric/models/probe_http_get_headers.py new file mode 100644 index 00000000..9d705401 --- /dev/null +++ b/customSDK/servicefabric/models/probe_http_get_headers.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProbeHttpGetHeaders(Model): + """Http headers. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the header. + :type name: str + :param value: Required. The value of the header. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProbeHttpGetHeaders, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/probe_http_get_headers_py3.py b/customSDK/servicefabric/models/probe_http_get_headers_py3.py new file mode 100644 index 00000000..877c9ea7 --- /dev/null +++ b/customSDK/servicefabric/models/probe_http_get_headers_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProbeHttpGetHeaders(Model): + """Http headers. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the header. + :type name: str + :param value: Required. The value of the header. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str, **kwargs) -> None: + super(ProbeHttpGetHeaders, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/customSDK/servicefabric/models/probe_http_get_py3.py b/customSDK/servicefabric/models/probe_http_get_py3.py new file mode 100644 index 00000000..c3041812 --- /dev/null +++ b/customSDK/servicefabric/models/probe_http_get_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProbeHttpGet(Model): + """Http probe for the container. + + All required parameters must be populated in order to send to Azure. + + :param port: Required. Port to access for probe. + :type port: int + :param path: Path to access on the HTTP request. + :type path: str + :param host: Host IP to connect to. + :type host: str + :param http_headers: Headers to set in the request. + :type http_headers: list[~azure.servicefabric.models.ProbeHttpGetHeaders] + :param scheme: Scheme for the http probe. Can be Http or Https. Possible + values include: 'http', 'https' + :type scheme: str or ~azure.servicefabric.models.Scheme + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + 'path': {'key': 'path', 'type': 'str'}, + 'host': {'key': 'host', 'type': 'str'}, + 'http_headers': {'key': 'httpHeaders', 'type': '[ProbeHttpGetHeaders]'}, + 'scheme': {'key': 'scheme', 'type': 'str'}, + } + + def __init__(self, *, port: int, path: str=None, host: str=None, http_headers=None, scheme=None, **kwargs) -> None: + super(ProbeHttpGet, self).__init__(**kwargs) + self.port = port + self.path = path + self.host = host + self.http_headers = http_headers + self.scheme = scheme diff --git a/customSDK/servicefabric/models/probe_py3.py b/customSDK/servicefabric/models/probe_py3.py new file mode 100644 index 00000000..13e5626c --- /dev/null +++ b/customSDK/servicefabric/models/probe_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Probe(Model): + """Probes have a number of fields that you can use to control their behavior. + + :param initial_delay_seconds: The initial delay in seconds to start + executing probe once codepackage has started. Default value: 0 . + :type initial_delay_seconds: int + :param period_seconds: Periodic seconds to execute probe. Default value: + 10 . + :type period_seconds: int + :param timeout_seconds: Period after which probe is considered as failed + if it hasn't completed successfully. Default value: 1 . + :type timeout_seconds: int + :param success_threshold: The count of successful probe executions after + which probe is considered success. Default value: 1 . + :type success_threshold: int + :param failure_threshold: The count of failures after which probe is + considered failed. Default value: 3 . + :type failure_threshold: int + :param exec_property: Exec command to run inside the container. + :type exec_property: ~azure.servicefabric.models.ProbeExec + :param http_get: Http probe for the container. + :type http_get: ~azure.servicefabric.models.ProbeHttpGet + :param tcp_socket: Tcp port to probe inside the container. + :type tcp_socket: ~azure.servicefabric.models.ProbeTcpSocket + """ + + _attribute_map = { + 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, + 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, + 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, + 'exec_property': {'key': 'exec', 'type': 'ProbeExec'}, + 'http_get': {'key': 'httpGet', 'type': 'ProbeHttpGet'}, + 'tcp_socket': {'key': 'tcpSocket', 'type': 'ProbeTcpSocket'}, + } + + def __init__(self, *, initial_delay_seconds: int=0, period_seconds: int=10, timeout_seconds: int=1, success_threshold: int=1, failure_threshold: int=3, exec_property=None, http_get=None, tcp_socket=None, **kwargs) -> None: + super(Probe, self).__init__(**kwargs) + self.initial_delay_seconds = initial_delay_seconds + self.period_seconds = period_seconds + self.timeout_seconds = timeout_seconds + self.success_threshold = success_threshold + self.failure_threshold = failure_threshold + self.exec_property = exec_property + self.http_get = http_get + self.tcp_socket = tcp_socket diff --git a/customSDK/servicefabric/models/probe_tcp_socket.py b/customSDK/servicefabric/models/probe_tcp_socket.py new file mode 100644 index 00000000..73259a6d --- /dev/null +++ b/customSDK/servicefabric/models/probe_tcp_socket.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProbeTcpSocket(Model): + """Tcp port to probe inside the container. + + All required parameters must be populated in order to send to Azure. + + :param port: Required. Port to access for probe. + :type port: int + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ProbeTcpSocket, self).__init__(**kwargs) + self.port = kwargs.get('port', None) diff --git a/customSDK/servicefabric/models/probe_tcp_socket_py3.py b/customSDK/servicefabric/models/probe_tcp_socket_py3.py new file mode 100644 index 00000000..07e97f8d --- /dev/null +++ b/customSDK/servicefabric/models/probe_tcp_socket_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProbeTcpSocket(Model): + """Tcp port to probe inside the container. + + All required parameters must be populated in order to send to Azure. + + :param port: Required. Port to access for probe. + :type port: int + """ + + _validation = { + 'port': {'required': True}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, *, port: int, **kwargs) -> None: + super(ProbeTcpSocket, self).__init__(**kwargs) + self.port = port diff --git a/customSDK/servicefabric/models/property_batch_description_list.py b/customSDK/servicefabric/models/property_batch_description_list.py new file mode 100644 index 00000000..d3f8aa26 --- /dev/null +++ b/customSDK/servicefabric/models/property_batch_description_list.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PropertyBatchDescriptionList(Model): + """Describes a list of property batch operations to be executed. Either all or + none of the operations will be committed. + + :param operations: A list of the property batch operations to be executed. + :type operations: list[~azure.servicefabric.models.PropertyBatchOperation] + """ + + _attribute_map = { + 'operations': {'key': 'Operations', 'type': '[PropertyBatchOperation]'}, + } + + def __init__(self, **kwargs): + super(PropertyBatchDescriptionList, self).__init__(**kwargs) + self.operations = kwargs.get('operations', None) diff --git a/customSDK/servicefabric/models/property_batch_description_list_py3.py b/customSDK/servicefabric/models/property_batch_description_list_py3.py new file mode 100644 index 00000000..80a6a22a --- /dev/null +++ b/customSDK/servicefabric/models/property_batch_description_list_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PropertyBatchDescriptionList(Model): + """Describes a list of property batch operations to be executed. Either all or + none of the operations will be committed. + + :param operations: A list of the property batch operations to be executed. + :type operations: list[~azure.servicefabric.models.PropertyBatchOperation] + """ + + _attribute_map = { + 'operations': {'key': 'Operations', 'type': '[PropertyBatchOperation]'}, + } + + def __init__(self, *, operations=None, **kwargs) -> None: + super(PropertyBatchDescriptionList, self).__init__(**kwargs) + self.operations = operations diff --git a/customSDK/servicefabric/models/property_batch_info.py b/customSDK/servicefabric/models/property_batch_info.py new file mode 100644 index 00000000..cd752c9d --- /dev/null +++ b/customSDK/servicefabric/models/property_batch_info.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PropertyBatchInfo(Model): + """Information about the results of a property batch. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SuccessfulPropertyBatchInfo, FailedPropertyBatchInfo + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Successful': 'SuccessfulPropertyBatchInfo', 'Failed': 'FailedPropertyBatchInfo'} + } + + def __init__(self, **kwargs): + super(PropertyBatchInfo, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/property_batch_info_py3.py b/customSDK/servicefabric/models/property_batch_info_py3.py new file mode 100644 index 00000000..e11f1fdd --- /dev/null +++ b/customSDK/servicefabric/models/property_batch_info_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PropertyBatchInfo(Model): + """Information about the results of a property batch. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SuccessfulPropertyBatchInfo, FailedPropertyBatchInfo + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Successful': 'SuccessfulPropertyBatchInfo', 'Failed': 'FailedPropertyBatchInfo'} + } + + def __init__(self, **kwargs) -> None: + super(PropertyBatchInfo, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/property_batch_operation.py b/customSDK/servicefabric/models/property_batch_operation.py new file mode 100644 index 00000000..59bd0c21 --- /dev/null +++ b/customSDK/servicefabric/models/property_batch_operation.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PropertyBatchOperation(Model): + """Represents the base type for property operations that can be put into a + batch and submitted. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CheckExistsPropertyBatchOperation, + CheckSequencePropertyBatchOperation, CheckValuePropertyBatchOperation, + DeletePropertyBatchOperation, GetPropertyBatchOperation, + PutPropertyBatchOperation + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CheckExists': 'CheckExistsPropertyBatchOperation', 'CheckSequence': 'CheckSequencePropertyBatchOperation', 'CheckValue': 'CheckValuePropertyBatchOperation', 'Delete': 'DeletePropertyBatchOperation', 'Get': 'GetPropertyBatchOperation', 'Put': 'PutPropertyBatchOperation'} + } + + def __init__(self, **kwargs): + super(PropertyBatchOperation, self).__init__(**kwargs) + self.property_name = kwargs.get('property_name', None) + self.kind = None diff --git a/customSDK/servicefabric/models/property_batch_operation_py3.py b/customSDK/servicefabric/models/property_batch_operation_py3.py new file mode 100644 index 00000000..de400562 --- /dev/null +++ b/customSDK/servicefabric/models/property_batch_operation_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PropertyBatchOperation(Model): + """Represents the base type for property operations that can be put into a + batch and submitted. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CheckExistsPropertyBatchOperation, + CheckSequencePropertyBatchOperation, CheckValuePropertyBatchOperation, + DeletePropertyBatchOperation, GetPropertyBatchOperation, + PutPropertyBatchOperation + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'CheckExists': 'CheckExistsPropertyBatchOperation', 'CheckSequence': 'CheckSequencePropertyBatchOperation', 'CheckValue': 'CheckValuePropertyBatchOperation', 'Delete': 'DeletePropertyBatchOperation', 'Get': 'GetPropertyBatchOperation', 'Put': 'PutPropertyBatchOperation'} + } + + def __init__(self, *, property_name: str, **kwargs) -> None: + super(PropertyBatchOperation, self).__init__(**kwargs) + self.property_name = property_name + self.kind = None diff --git a/customSDK/servicefabric/models/property_description.py b/customSDK/servicefabric/models/property_description.py new file mode 100644 index 00000000..f94b4705 --- /dev/null +++ b/customSDK/servicefabric/models/property_description.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PropertyDescription(Model): + """Description of a Service Fabric property. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param custom_type_id: The property's custom type ID. Using this property, + the user is able to tag the type of the value of the property. + :type custom_type_id: str + :param value: Required. Describes a Service Fabric property value. + :type value: ~azure.servicefabric.models.PropertyValue + """ + + _validation = { + 'property_name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + } + + def __init__(self, **kwargs): + super(PropertyDescription, self).__init__(**kwargs) + self.property_name = kwargs.get('property_name', None) + self.custom_type_id = kwargs.get('custom_type_id', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/property_description_py3.py b/customSDK/servicefabric/models/property_description_py3.py new file mode 100644 index 00000000..bfdb021e --- /dev/null +++ b/customSDK/servicefabric/models/property_description_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PropertyDescription(Model): + """Description of a Service Fabric property. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param custom_type_id: The property's custom type ID. Using this property, + the user is able to tag the type of the value of the property. + :type custom_type_id: str + :param value: Required. Describes a Service Fabric property value. + :type value: ~azure.servicefabric.models.PropertyValue + """ + + _validation = { + 'property_name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + } + + def __init__(self, *, property_name: str, value, custom_type_id: str=None, **kwargs) -> None: + super(PropertyDescription, self).__init__(**kwargs) + self.property_name = property_name + self.custom_type_id = custom_type_id + self.value = value diff --git a/customSDK/servicefabric/models/property_info.py b/customSDK/servicefabric/models/property_info.py new file mode 100644 index 00000000..943ae118 --- /dev/null +++ b/customSDK/servicefabric/models/property_info.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PropertyInfo(Model): + """Information about a Service Fabric property. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Service Fabric property. + :type name: str + :param value: Describes a Service Fabric property value. + :type value: ~azure.servicefabric.models.PropertyValue + :param metadata: Required. The metadata associated with a property, + including the property's name. + :type metadata: ~azure.servicefabric.models.PropertyMetadata + """ + + _validation = { + 'name': {'required': True}, + 'metadata': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + 'metadata': {'key': 'Metadata', 'type': 'PropertyMetadata'}, + } + + def __init__(self, **kwargs): + super(PropertyInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + self.metadata = kwargs.get('metadata', None) diff --git a/customSDK/servicefabric/models/property_info_py3.py b/customSDK/servicefabric/models/property_info_py3.py new file mode 100644 index 00000000..b5a72e50 --- /dev/null +++ b/customSDK/servicefabric/models/property_info_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PropertyInfo(Model): + """Information about a Service Fabric property. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Service Fabric property. + :type name: str + :param value: Describes a Service Fabric property value. + :type value: ~azure.servicefabric.models.PropertyValue + :param metadata: Required. The metadata associated with a property, + including the property's name. + :type metadata: ~azure.servicefabric.models.PropertyMetadata + """ + + _validation = { + 'name': {'required': True}, + 'metadata': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + 'metadata': {'key': 'Metadata', 'type': 'PropertyMetadata'}, + } + + def __init__(self, *, name: str, metadata, value=None, **kwargs) -> None: + super(PropertyInfo, self).__init__(**kwargs) + self.name = name + self.value = value + self.metadata = metadata diff --git a/customSDK/servicefabric/models/property_metadata.py b/customSDK/servicefabric/models/property_metadata.py new file mode 100644 index 00000000..8c772044 --- /dev/null +++ b/customSDK/servicefabric/models/property_metadata.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PropertyMetadata(Model): + """The metadata associated with a property, including the property's name. + + :param type_id: The kind of property, determined by the type of data. + Following are the possible values. Possible values include: 'Invalid', + 'Binary', 'Int64', 'Double', 'String', 'Guid' + :type type_id: str or ~azure.servicefabric.models.PropertyValueKind + :param custom_type_id: The property's custom type ID. + :type custom_type_id: str + :param parent: The name of the parent Service Fabric Name for the + property. It could be thought of as the name-space/table under which the + property exists. + :type parent: str + :param size_in_bytes: The length of the serialized property value. + :type size_in_bytes: int + :param last_modified_utc_timestamp: Represents when the Property was last + modified. Only write operations will cause this field to be updated. + :type last_modified_utc_timestamp: datetime + :param sequence_number: The version of the property. Every time a property + is modified, its sequence number is increased. + :type sequence_number: str + """ + + _attribute_map = { + 'type_id': {'key': 'TypeId', 'type': 'str'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + 'parent': {'key': 'Parent', 'type': 'str'}, + 'size_in_bytes': {'key': 'SizeInBytes', 'type': 'int'}, + 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PropertyMetadata, self).__init__(**kwargs) + self.type_id = kwargs.get('type_id', None) + self.custom_type_id = kwargs.get('custom_type_id', None) + self.parent = kwargs.get('parent', None) + self.size_in_bytes = kwargs.get('size_in_bytes', None) + self.last_modified_utc_timestamp = kwargs.get('last_modified_utc_timestamp', None) + self.sequence_number = kwargs.get('sequence_number', None) diff --git a/customSDK/servicefabric/models/property_metadata_py3.py b/customSDK/servicefabric/models/property_metadata_py3.py new file mode 100644 index 00000000..8d3d2a9e --- /dev/null +++ b/customSDK/servicefabric/models/property_metadata_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PropertyMetadata(Model): + """The metadata associated with a property, including the property's name. + + :param type_id: The kind of property, determined by the type of data. + Following are the possible values. Possible values include: 'Invalid', + 'Binary', 'Int64', 'Double', 'String', 'Guid' + :type type_id: str or ~azure.servicefabric.models.PropertyValueKind + :param custom_type_id: The property's custom type ID. + :type custom_type_id: str + :param parent: The name of the parent Service Fabric Name for the + property. It could be thought of as the name-space/table under which the + property exists. + :type parent: str + :param size_in_bytes: The length of the serialized property value. + :type size_in_bytes: int + :param last_modified_utc_timestamp: Represents when the Property was last + modified. Only write operations will cause this field to be updated. + :type last_modified_utc_timestamp: datetime + :param sequence_number: The version of the property. Every time a property + is modified, its sequence number is increased. + :type sequence_number: str + """ + + _attribute_map = { + 'type_id': {'key': 'TypeId', 'type': 'str'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + 'parent': {'key': 'Parent', 'type': 'str'}, + 'size_in_bytes': {'key': 'SizeInBytes', 'type': 'int'}, + 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, + } + + def __init__(self, *, type_id=None, custom_type_id: str=None, parent: str=None, size_in_bytes: int=None, last_modified_utc_timestamp=None, sequence_number: str=None, **kwargs) -> None: + super(PropertyMetadata, self).__init__(**kwargs) + self.type_id = type_id + self.custom_type_id = custom_type_id + self.parent = parent + self.size_in_bytes = size_in_bytes + self.last_modified_utc_timestamp = last_modified_utc_timestamp + self.sequence_number = sequence_number diff --git a/customSDK/servicefabric/models/property_value.py b/customSDK/servicefabric/models/property_value.py new file mode 100644 index 00000000..6c56b26d --- /dev/null +++ b/customSDK/servicefabric/models/property_value.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PropertyValue(Model): + """Describes a Service Fabric property value. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BinaryPropertyValue, Int64PropertyValue, + DoublePropertyValue, StringPropertyValue, GuidPropertyValue + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Binary': 'BinaryPropertyValue', 'Int64': 'Int64PropertyValue', 'Double': 'DoublePropertyValue', 'String': 'StringPropertyValue', 'Guid': 'GuidPropertyValue'} + } + + def __init__(self, **kwargs): + super(PropertyValue, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/property_value_py3.py b/customSDK/servicefabric/models/property_value_py3.py new file mode 100644 index 00000000..44b7c3ba --- /dev/null +++ b/customSDK/servicefabric/models/property_value_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PropertyValue(Model): + """Describes a Service Fabric property value. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BinaryPropertyValue, Int64PropertyValue, + DoublePropertyValue, StringPropertyValue, GuidPropertyValue + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Binary': 'BinaryPropertyValue', 'Int64': 'Int64PropertyValue', 'Double': 'DoublePropertyValue', 'String': 'StringPropertyValue', 'Guid': 'GuidPropertyValue'} + } + + def __init__(self, **kwargs) -> None: + super(PropertyValue, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/provision_application_type_description.py b/customSDK/servicefabric/models/provision_application_type_description.py new file mode 100644 index 00000000..78928bff --- /dev/null +++ b/customSDK/servicefabric/models/provision_application_type_description.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .provision_application_type_description_base import ProvisionApplicationTypeDescriptionBase + + +class ProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): + """Describes the operation to register or provision an application type using + an application package uploaded to the Service Fabric image store. + + All required parameters must be populated in order to send to Azure. + + :param async_property: Required. Indicates whether or not provisioning + should occur asynchronously. When set to true, the provision operation + returns when the request is accepted by the system, and the provision + operation continues without any timeout limit. The default value is false. + For large application packages, we recommend setting the value to true. + :type async_property: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_type_build_path: Required. The relative path for the + application package in the image store specified during the prior upload + operation. + :type application_type_build_path: str + :param application_package_cleanup_policy: The kind of action that needs + to be taken for cleaning up the application package after successful + provision. Possible values include: 'Invalid', 'Default', 'Automatic', + 'Manual' + :type application_package_cleanup_policy: str or + ~azure.servicefabric.models.ApplicationPackageCleanupPolicy + """ + + _validation = { + 'async_property': {'required': True}, + 'kind': {'required': True}, + 'application_type_build_path': {'required': True}, + } + + _attribute_map = { + 'async_property': {'key': 'Async', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, + 'application_package_cleanup_policy': {'key': 'ApplicationPackageCleanupPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProvisionApplicationTypeDescription, self).__init__(**kwargs) + self.application_type_build_path = kwargs.get('application_type_build_path', None) + self.application_package_cleanup_policy = kwargs.get('application_package_cleanup_policy', None) + self.kind = 'ImageStorePath' diff --git a/customSDK/servicefabric/models/provision_application_type_description_base.py b/customSDK/servicefabric/models/provision_application_type_description_base.py new file mode 100644 index 00000000..e1e3c991 --- /dev/null +++ b/customSDK/servicefabric/models/provision_application_type_description_base.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProvisionApplicationTypeDescriptionBase(Model): + """Represents the type of registration or provision requested, and if the + operation needs to be asynchronous or not. Supported types of provision + operations are from either image store or external store. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ProvisionApplicationTypeDescription, + ExternalStoreProvisionApplicationTypeDescription + + All required parameters must be populated in order to send to Azure. + + :param async_property: Required. Indicates whether or not provisioning + should occur asynchronously. When set to true, the provision operation + returns when the request is accepted by the system, and the provision + operation continues without any timeout limit. The default value is false. + For large application packages, we recommend setting the value to true. + :type async_property: bool + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'async_property': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'async_property': {'key': 'Async', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ImageStorePath': 'ProvisionApplicationTypeDescription', 'ExternalStore': 'ExternalStoreProvisionApplicationTypeDescription'} + } + + def __init__(self, **kwargs): + super(ProvisionApplicationTypeDescriptionBase, self).__init__(**kwargs) + self.async_property = kwargs.get('async_property', None) + self.kind = None diff --git a/customSDK/servicefabric/models/provision_application_type_description_base_py3.py b/customSDK/servicefabric/models/provision_application_type_description_base_py3.py new file mode 100644 index 00000000..df9452ea --- /dev/null +++ b/customSDK/servicefabric/models/provision_application_type_description_base_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProvisionApplicationTypeDescriptionBase(Model): + """Represents the type of registration or provision requested, and if the + operation needs to be asynchronous or not. Supported types of provision + operations are from either image store or external store. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ProvisionApplicationTypeDescription, + ExternalStoreProvisionApplicationTypeDescription + + All required parameters must be populated in order to send to Azure. + + :param async_property: Required. Indicates whether or not provisioning + should occur asynchronously. When set to true, the provision operation + returns when the request is accepted by the system, and the provision + operation continues without any timeout limit. The default value is false. + For large application packages, we recommend setting the value to true. + :type async_property: bool + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'async_property': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'async_property': {'key': 'Async', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ImageStorePath': 'ProvisionApplicationTypeDescription', 'ExternalStore': 'ExternalStoreProvisionApplicationTypeDescription'} + } + + def __init__(self, *, async_property: bool, **kwargs) -> None: + super(ProvisionApplicationTypeDescriptionBase, self).__init__(**kwargs) + self.async_property = async_property + self.kind = None diff --git a/customSDK/servicefabric/models/provision_application_type_description_py3.py b/customSDK/servicefabric/models/provision_application_type_description_py3.py new file mode 100644 index 00000000..3a40324c --- /dev/null +++ b/customSDK/servicefabric/models/provision_application_type_description_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .provision_application_type_description_base_py3 import ProvisionApplicationTypeDescriptionBase + + +class ProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): + """Describes the operation to register or provision an application type using + an application package uploaded to the Service Fabric image store. + + All required parameters must be populated in order to send to Azure. + + :param async_property: Required. Indicates whether or not provisioning + should occur asynchronously. When set to true, the provision operation + returns when the request is accepted by the system, and the provision + operation continues without any timeout limit. The default value is false. + For large application packages, we recommend setting the value to true. + :type async_property: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param application_type_build_path: Required. The relative path for the + application package in the image store specified during the prior upload + operation. + :type application_type_build_path: str + :param application_package_cleanup_policy: The kind of action that needs + to be taken for cleaning up the application package after successful + provision. Possible values include: 'Invalid', 'Default', 'Automatic', + 'Manual' + :type application_package_cleanup_policy: str or + ~azure.servicefabric.models.ApplicationPackageCleanupPolicy + """ + + _validation = { + 'async_property': {'required': True}, + 'kind': {'required': True}, + 'application_type_build_path': {'required': True}, + } + + _attribute_map = { + 'async_property': {'key': 'Async', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, + 'application_package_cleanup_policy': {'key': 'ApplicationPackageCleanupPolicy', 'type': 'str'}, + } + + def __init__(self, *, async_property: bool, application_type_build_path: str, application_package_cleanup_policy=None, **kwargs) -> None: + super(ProvisionApplicationTypeDescription, self).__init__(async_property=async_property, **kwargs) + self.application_type_build_path = application_type_build_path + self.application_package_cleanup_policy = application_package_cleanup_policy + self.kind = 'ImageStorePath' diff --git a/customSDK/servicefabric/models/provision_fabric_description.py b/customSDK/servicefabric/models/provision_fabric_description.py new file mode 100644 index 00000000..b033b3d5 --- /dev/null +++ b/customSDK/servicefabric/models/provision_fabric_description.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProvisionFabricDescription(Model): + """Describes the parameters for provisioning a cluster. + + :param code_file_path: The cluster code package file path. + :type code_file_path: str + :param cluster_manifest_file_path: The cluster manifest file path. + :type cluster_manifest_file_path: str + """ + + _attribute_map = { + 'code_file_path': {'key': 'CodeFilePath', 'type': 'str'}, + 'cluster_manifest_file_path': {'key': 'ClusterManifestFilePath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProvisionFabricDescription, self).__init__(**kwargs) + self.code_file_path = kwargs.get('code_file_path', None) + self.cluster_manifest_file_path = kwargs.get('cluster_manifest_file_path', None) diff --git a/customSDK/servicefabric/models/provision_fabric_description_py3.py b/customSDK/servicefabric/models/provision_fabric_description_py3.py new file mode 100644 index 00000000..674a40cb --- /dev/null +++ b/customSDK/servicefabric/models/provision_fabric_description_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProvisionFabricDescription(Model): + """Describes the parameters for provisioning a cluster. + + :param code_file_path: The cluster code package file path. + :type code_file_path: str + :param cluster_manifest_file_path: The cluster manifest file path. + :type cluster_manifest_file_path: str + """ + + _attribute_map = { + 'code_file_path': {'key': 'CodeFilePath', 'type': 'str'}, + 'cluster_manifest_file_path': {'key': 'ClusterManifestFilePath', 'type': 'str'}, + } + + def __init__(self, *, code_file_path: str=None, cluster_manifest_file_path: str=None, **kwargs) -> None: + super(ProvisionFabricDescription, self).__init__(**kwargs) + self.code_file_path = code_file_path + self.cluster_manifest_file_path = cluster_manifest_file_path diff --git a/customSDK/servicefabric/models/put_property_batch_operation.py b/customSDK/servicefabric/models/put_property_batch_operation.py new file mode 100644 index 00000000..c1e4a263 --- /dev/null +++ b/customSDK/servicefabric/models/put_property_batch_operation.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_batch_operation import PropertyBatchOperation + + +class PutPropertyBatchOperation(PropertyBatchOperation): + """Puts the specified property under the specified name. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param value: Required. Describes a Service Fabric property value. + :type value: ~azure.servicefabric.models.PropertyValue + :param custom_type_id: The property's custom type ID. Using this property, + the user is able to tag the type of the value of the property. + :type custom_type_id: str + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PutPropertyBatchOperation, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.custom_type_id = kwargs.get('custom_type_id', None) + self.kind = 'Put' diff --git a/customSDK/servicefabric/models/put_property_batch_operation_py3.py b/customSDK/servicefabric/models/put_property_batch_operation_py3.py new file mode 100644 index 00000000..862605ac --- /dev/null +++ b/customSDK/servicefabric/models/put_property_batch_operation_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_batch_operation_py3 import PropertyBatchOperation + + +class PutPropertyBatchOperation(PropertyBatchOperation): + """Puts the specified property under the specified name. + Note that if one PropertyBatchOperation in a PropertyBatch fails, + the entire batch fails and cannot be committed in a transactional manner. + + All required parameters must be populated in order to send to Azure. + + :param property_name: Required. The name of the Service Fabric property. + :type property_name: str + :param kind: Required. Constant filled by server. + :type kind: str + :param value: Required. Describes a Service Fabric property value. + :type value: ~azure.servicefabric.models.PropertyValue + :param custom_type_id: The property's custom type ID. Using this property, + the user is able to tag the type of the value of the property. + :type custom_type_id: str + """ + + _validation = { + 'property_name': {'required': True}, + 'kind': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'property_name': {'key': 'PropertyName', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'PropertyValue'}, + 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, + } + + def __init__(self, *, property_name: str, value, custom_type_id: str=None, **kwargs) -> None: + super(PutPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) + self.value = value + self.custom_type_id = custom_type_id + self.kind = 'Put' diff --git a/customSDK/servicefabric/models/reconfiguration_information.py b/customSDK/servicefabric/models/reconfiguration_information.py new file mode 100644 index 00000000..4e46c96e --- /dev/null +++ b/customSDK/servicefabric/models/reconfiguration_information.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 ReconfigurationInformation(Model): + """Information about current reconfiguration like phase, type, previous + configuration role of replica and reconfiguration start date time. + + :param previous_configuration_role: Replica role before reconfiguration + started. Possible values include: 'Unknown', 'None', 'Primary', + 'IdleSecondary', 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', + 'PrimaryAuxiliary' + :type previous_configuration_role: str or + ~azure.servicefabric.models.ReplicaRole + :param reconfiguration_phase: Current phase of ongoing reconfiguration. If + no reconfiguration is taking place then this value will be "None". + Possible values include: 'Unknown', 'None', 'Phase0', 'Phase1', 'Phase2', + 'Phase3', 'Phase4', 'AbortPhaseZero' + :type reconfiguration_phase: str or + ~azure.servicefabric.models.ReconfigurationPhase + :param reconfiguration_type: Type of current ongoing reconfiguration. If + no reconfiguration is taking place then this value will be "None". + Possible values include: 'Unknown', 'SwapPrimary', 'Failover', 'Other' + :type reconfiguration_type: str or + ~azure.servicefabric.models.ReconfigurationType + :param reconfiguration_start_time_utc: Start time (in UTC) of the ongoing + reconfiguration. If no reconfiguration is taking place then this value + will be zero date-time. + :type reconfiguration_start_time_utc: datetime + """ + + _attribute_map = { + 'previous_configuration_role': {'key': 'PreviousConfigurationRole', 'type': 'str'}, + 'reconfiguration_phase': {'key': 'ReconfigurationPhase', 'type': 'str'}, + 'reconfiguration_type': {'key': 'ReconfigurationType', 'type': 'str'}, + 'reconfiguration_start_time_utc': {'key': 'ReconfigurationStartTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ReconfigurationInformation, self).__init__(**kwargs) + self.previous_configuration_role = kwargs.get('previous_configuration_role', None) + self.reconfiguration_phase = kwargs.get('reconfiguration_phase', None) + self.reconfiguration_type = kwargs.get('reconfiguration_type', None) + self.reconfiguration_start_time_utc = kwargs.get('reconfiguration_start_time_utc', None) diff --git a/customSDK/servicefabric/models/reconfiguration_information_py3.py b/customSDK/servicefabric/models/reconfiguration_information_py3.py new file mode 100644 index 00000000..5a6d70a4 --- /dev/null +++ b/customSDK/servicefabric/models/reconfiguration_information_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 ReconfigurationInformation(Model): + """Information about current reconfiguration like phase, type, previous + configuration role of replica and reconfiguration start date time. + + :param previous_configuration_role: Replica role before reconfiguration + started. Possible values include: 'Unknown', 'None', 'Primary', + 'IdleSecondary', 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', + 'PrimaryAuxiliary' + :type previous_configuration_role: str or + ~azure.servicefabric.models.ReplicaRole + :param reconfiguration_phase: Current phase of ongoing reconfiguration. If + no reconfiguration is taking place then this value will be "None". + Possible values include: 'Unknown', 'None', 'Phase0', 'Phase1', 'Phase2', + 'Phase3', 'Phase4', 'AbortPhaseZero' + :type reconfiguration_phase: str or + ~azure.servicefabric.models.ReconfigurationPhase + :param reconfiguration_type: Type of current ongoing reconfiguration. If + no reconfiguration is taking place then this value will be "None". + Possible values include: 'Unknown', 'SwapPrimary', 'Failover', 'Other' + :type reconfiguration_type: str or + ~azure.servicefabric.models.ReconfigurationType + :param reconfiguration_start_time_utc: Start time (in UTC) of the ongoing + reconfiguration. If no reconfiguration is taking place then this value + will be zero date-time. + :type reconfiguration_start_time_utc: datetime + """ + + _attribute_map = { + 'previous_configuration_role': {'key': 'PreviousConfigurationRole', 'type': 'str'}, + 'reconfiguration_phase': {'key': 'ReconfigurationPhase', 'type': 'str'}, + 'reconfiguration_type': {'key': 'ReconfigurationType', 'type': 'str'}, + 'reconfiguration_start_time_utc': {'key': 'ReconfigurationStartTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, *, previous_configuration_role=None, reconfiguration_phase=None, reconfiguration_type=None, reconfiguration_start_time_utc=None, **kwargs) -> None: + super(ReconfigurationInformation, self).__init__(**kwargs) + self.previous_configuration_role = previous_configuration_role + self.reconfiguration_phase = reconfiguration_phase + self.reconfiguration_type = reconfiguration_type + self.reconfiguration_start_time_utc = reconfiguration_start_time_utc diff --git a/customSDK/servicefabric/models/registry_credential.py b/customSDK/servicefabric/models/registry_credential.py new file mode 100644 index 00000000..983e9286 --- /dev/null +++ b/customSDK/servicefabric/models/registry_credential.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RegistryCredential(Model): + """Credential information to connect to container registry. + + :param registry_user_name: The user name to connect to container registry. + :type registry_user_name: str + :param registry_password: The password for supplied username to connect to + container registry. + :type registry_password: str + :param password_encrypted: Indicates that supplied container registry + password is encrypted. + :type password_encrypted: bool + """ + + _attribute_map = { + 'registry_user_name': {'key': 'RegistryUserName', 'type': 'str'}, + 'registry_password': {'key': 'RegistryPassword', 'type': 'str'}, + 'password_encrypted': {'key': 'PasswordEncrypted', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RegistryCredential, self).__init__(**kwargs) + self.registry_user_name = kwargs.get('registry_user_name', None) + self.registry_password = kwargs.get('registry_password', None) + self.password_encrypted = kwargs.get('password_encrypted', None) diff --git a/customSDK/servicefabric/models/registry_credential_py3.py b/customSDK/servicefabric/models/registry_credential_py3.py new file mode 100644 index 00000000..babd043e --- /dev/null +++ b/customSDK/servicefabric/models/registry_credential_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RegistryCredential(Model): + """Credential information to connect to container registry. + + :param registry_user_name: The user name to connect to container registry. + :type registry_user_name: str + :param registry_password: The password for supplied username to connect to + container registry. + :type registry_password: str + :param password_encrypted: Indicates that supplied container registry + password is encrypted. + :type password_encrypted: bool + """ + + _attribute_map = { + 'registry_user_name': {'key': 'RegistryUserName', 'type': 'str'}, + 'registry_password': {'key': 'RegistryPassword', 'type': 'str'}, + 'password_encrypted': {'key': 'PasswordEncrypted', 'type': 'bool'}, + } + + def __init__(self, *, registry_user_name: str=None, registry_password: str=None, password_encrypted: bool=None, **kwargs) -> None: + super(RegistryCredential, self).__init__(**kwargs) + self.registry_user_name = registry_user_name + self.registry_password = registry_password + self.password_encrypted = password_encrypted diff --git a/customSDK/servicefabric/models/reliable_collections_ref.py b/customSDK/servicefabric/models/reliable_collections_ref.py new file mode 100644 index 00000000..0bdbaa85 --- /dev/null +++ b/customSDK/servicefabric/models/reliable_collections_ref.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReliableCollectionsRef(Model): + """Specifying this parameter adds support for reliable collections. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of ReliableCollection resource. Right now it's + not used and you can use any string. + :type name: str + :param do_not_persist_state: False (the default) if ReliableCollections + state is persisted to disk as usual. True if you do not want to persist + state, in which case replication is still enabled and you can use + ReliableCollections as distributed cache. + :type do_not_persist_state: bool + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'do_not_persist_state': {'key': 'doNotPersistState', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ReliableCollectionsRef, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.do_not_persist_state = kwargs.get('do_not_persist_state', None) diff --git a/customSDK/servicefabric/models/reliable_collections_ref_py3.py b/customSDK/servicefabric/models/reliable_collections_ref_py3.py new file mode 100644 index 00000000..c517f34c --- /dev/null +++ b/customSDK/servicefabric/models/reliable_collections_ref_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReliableCollectionsRef(Model): + """Specifying this parameter adds support for reliable collections. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of ReliableCollection resource. Right now it's + not used and you can use any string. + :type name: str + :param do_not_persist_state: False (the default) if ReliableCollections + state is persisted to disk as usual. True if you do not want to persist + state, in which case replication is still enabled and you can use + ReliableCollections as distributed cache. + :type do_not_persist_state: bool + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'do_not_persist_state': {'key': 'doNotPersistState', 'type': 'bool'}, + } + + def __init__(self, *, name: str, do_not_persist_state: bool=None, **kwargs) -> None: + super(ReliableCollectionsRef, self).__init__(**kwargs) + self.name = name + self.do_not_persist_state = do_not_persist_state diff --git a/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail.py b/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail.py new file mode 100644 index 00000000..31954743 --- /dev/null +++ b/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RemoteReplicatorAcknowledgementDetail(Model): + """Provides various statistics of the acknowledgements that are being received + from the remote replicator. + + :param average_receive_duration: Represents the average duration it takes + for the remote replicator to receive an operation. + :type average_receive_duration: str + :param average_apply_duration: Represents the average duration it takes + for the remote replicator to apply an operation. This usually entails + writing the operation to disk. + :type average_apply_duration: str + :param not_received_count: Represents the number of operations not yet + received by a remote replicator. + :type not_received_count: str + :param received_and_not_applied_count: Represents the number of operations + received and not yet applied by a remote replicator. + :type received_and_not_applied_count: str + """ + + _attribute_map = { + 'average_receive_duration': {'key': 'AverageReceiveDuration', 'type': 'str'}, + 'average_apply_duration': {'key': 'AverageApplyDuration', 'type': 'str'}, + 'not_received_count': {'key': 'NotReceivedCount', 'type': 'str'}, + 'received_and_not_applied_count': {'key': 'ReceivedAndNotAppliedCount', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RemoteReplicatorAcknowledgementDetail, self).__init__(**kwargs) + self.average_receive_duration = kwargs.get('average_receive_duration', None) + self.average_apply_duration = kwargs.get('average_apply_duration', None) + self.not_received_count = kwargs.get('not_received_count', None) + self.received_and_not_applied_count = kwargs.get('received_and_not_applied_count', None) diff --git a/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail_py3.py b/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail_py3.py new file mode 100644 index 00000000..ade7b3c4 --- /dev/null +++ b/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RemoteReplicatorAcknowledgementDetail(Model): + """Provides various statistics of the acknowledgements that are being received + from the remote replicator. + + :param average_receive_duration: Represents the average duration it takes + for the remote replicator to receive an operation. + :type average_receive_duration: str + :param average_apply_duration: Represents the average duration it takes + for the remote replicator to apply an operation. This usually entails + writing the operation to disk. + :type average_apply_duration: str + :param not_received_count: Represents the number of operations not yet + received by a remote replicator. + :type not_received_count: str + :param received_and_not_applied_count: Represents the number of operations + received and not yet applied by a remote replicator. + :type received_and_not_applied_count: str + """ + + _attribute_map = { + 'average_receive_duration': {'key': 'AverageReceiveDuration', 'type': 'str'}, + 'average_apply_duration': {'key': 'AverageApplyDuration', 'type': 'str'}, + 'not_received_count': {'key': 'NotReceivedCount', 'type': 'str'}, + 'received_and_not_applied_count': {'key': 'ReceivedAndNotAppliedCount', 'type': 'str'}, + } + + def __init__(self, *, average_receive_duration: str=None, average_apply_duration: str=None, not_received_count: str=None, received_and_not_applied_count: str=None, **kwargs) -> None: + super(RemoteReplicatorAcknowledgementDetail, self).__init__(**kwargs) + self.average_receive_duration = average_receive_duration + self.average_apply_duration = average_apply_duration + self.not_received_count = not_received_count + self.received_and_not_applied_count = received_and_not_applied_count diff --git a/customSDK/servicefabric/models/remote_replicator_acknowledgement_status.py b/customSDK/servicefabric/models/remote_replicator_acknowledgement_status.py new file mode 100644 index 00000000..5b4f6e72 --- /dev/null +++ b/customSDK/servicefabric/models/remote_replicator_acknowledgement_status.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RemoteReplicatorAcknowledgementStatus(Model): + """Provides details about the remote replicators from the primary replicator's + point of view. + + :param replication_stream_acknowledgement_detail: Details about the + acknowledgements for operations that are part of the replication stream + data. + :type replication_stream_acknowledgement_detail: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail + :param copy_stream_acknowledgement_detail: Details about the + acknowledgements for operations that are part of the copy stream data. + :type copy_stream_acknowledgement_detail: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail + """ + + _attribute_map = { + 'replication_stream_acknowledgement_detail': {'key': 'ReplicationStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, + 'copy_stream_acknowledgement_detail': {'key': 'CopyStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, + } + + def __init__(self, **kwargs): + super(RemoteReplicatorAcknowledgementStatus, self).__init__(**kwargs) + self.replication_stream_acknowledgement_detail = kwargs.get('replication_stream_acknowledgement_detail', None) + self.copy_stream_acknowledgement_detail = kwargs.get('copy_stream_acknowledgement_detail', None) diff --git a/customSDK/servicefabric/models/remote_replicator_acknowledgement_status_py3.py b/customSDK/servicefabric/models/remote_replicator_acknowledgement_status_py3.py new file mode 100644 index 00000000..37428347 --- /dev/null +++ b/customSDK/servicefabric/models/remote_replicator_acknowledgement_status_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RemoteReplicatorAcknowledgementStatus(Model): + """Provides details about the remote replicators from the primary replicator's + point of view. + + :param replication_stream_acknowledgement_detail: Details about the + acknowledgements for operations that are part of the replication stream + data. + :type replication_stream_acknowledgement_detail: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail + :param copy_stream_acknowledgement_detail: Details about the + acknowledgements for operations that are part of the copy stream data. + :type copy_stream_acknowledgement_detail: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail + """ + + _attribute_map = { + 'replication_stream_acknowledgement_detail': {'key': 'ReplicationStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, + 'copy_stream_acknowledgement_detail': {'key': 'CopyStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, + } + + def __init__(self, *, replication_stream_acknowledgement_detail=None, copy_stream_acknowledgement_detail=None, **kwargs) -> None: + super(RemoteReplicatorAcknowledgementStatus, self).__init__(**kwargs) + self.replication_stream_acknowledgement_detail = replication_stream_acknowledgement_detail + self.copy_stream_acknowledgement_detail = copy_stream_acknowledgement_detail diff --git a/customSDK/servicefabric/models/remote_replicator_status.py b/customSDK/servicefabric/models/remote_replicator_status.py new file mode 100644 index 00000000..0258c842 --- /dev/null +++ b/customSDK/servicefabric/models/remote_replicator_status.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RemoteReplicatorStatus(Model): + """Represents the state of the secondary replicator from the primary + replicator’s point of view. + + :param replica_id: Represents the replica ID of the remote secondary + replicator. + :type replica_id: str + :param last_acknowledgement_processed_time_utc: The last timestamp (in + UTC) when an acknowledgement from the secondary replicator was processed + on the primary. + UTC 0 represents an invalid value, indicating that no acknowledgement + messages were ever processed. + :type last_acknowledgement_processed_time_utc: datetime + :param last_received_replication_sequence_number: The highest replication + operation sequence number that the secondary has received from the + primary. + :type last_received_replication_sequence_number: str + :param last_applied_replication_sequence_number: The highest replication + operation sequence number that the secondary has applied to its state. + :type last_applied_replication_sequence_number: str + :param is_in_build: A value that indicates whether the secondary replica + is in the process of being built. + :type is_in_build: bool + :param last_received_copy_sequence_number: The highest copy operation + sequence number that the secondary has received from the primary. + A value of -1 implies that the secondary has received all copy operations. + :type last_received_copy_sequence_number: str + :param last_applied_copy_sequence_number: The highest copy operation + sequence number that the secondary has applied to its state. + A value of -1 implies that the secondary has applied all copy operations + and the copy process is complete. + :type last_applied_copy_sequence_number: str + :param remote_replicator_acknowledgement_status: Represents the + acknowledgment status for the remote secondary replicator. + :type remote_replicator_acknowledgement_status: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementStatus + """ + + _attribute_map = { + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'last_acknowledgement_processed_time_utc': {'key': 'LastAcknowledgementProcessedTimeUtc', 'type': 'iso-8601'}, + 'last_received_replication_sequence_number': {'key': 'LastReceivedReplicationSequenceNumber', 'type': 'str'}, + 'last_applied_replication_sequence_number': {'key': 'LastAppliedReplicationSequenceNumber', 'type': 'str'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'last_received_copy_sequence_number': {'key': 'LastReceivedCopySequenceNumber', 'type': 'str'}, + 'last_applied_copy_sequence_number': {'key': 'LastAppliedCopySequenceNumber', 'type': 'str'}, + 'remote_replicator_acknowledgement_status': {'key': 'RemoteReplicatorAcknowledgementStatus', 'type': 'RemoteReplicatorAcknowledgementStatus'}, + } + + def __init__(self, **kwargs): + super(RemoteReplicatorStatus, self).__init__(**kwargs) + self.replica_id = kwargs.get('replica_id', None) + self.last_acknowledgement_processed_time_utc = kwargs.get('last_acknowledgement_processed_time_utc', None) + self.last_received_replication_sequence_number = kwargs.get('last_received_replication_sequence_number', None) + self.last_applied_replication_sequence_number = kwargs.get('last_applied_replication_sequence_number', None) + self.is_in_build = kwargs.get('is_in_build', None) + self.last_received_copy_sequence_number = kwargs.get('last_received_copy_sequence_number', None) + self.last_applied_copy_sequence_number = kwargs.get('last_applied_copy_sequence_number', None) + self.remote_replicator_acknowledgement_status = kwargs.get('remote_replicator_acknowledgement_status', None) diff --git a/customSDK/servicefabric/models/remote_replicator_status_py3.py b/customSDK/servicefabric/models/remote_replicator_status_py3.py new file mode 100644 index 00000000..99c71f03 --- /dev/null +++ b/customSDK/servicefabric/models/remote_replicator_status_py3.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RemoteReplicatorStatus(Model): + """Represents the state of the secondary replicator from the primary + replicator’s point of view. + + :param replica_id: Represents the replica ID of the remote secondary + replicator. + :type replica_id: str + :param last_acknowledgement_processed_time_utc: The last timestamp (in + UTC) when an acknowledgement from the secondary replicator was processed + on the primary. + UTC 0 represents an invalid value, indicating that no acknowledgement + messages were ever processed. + :type last_acknowledgement_processed_time_utc: datetime + :param last_received_replication_sequence_number: The highest replication + operation sequence number that the secondary has received from the + primary. + :type last_received_replication_sequence_number: str + :param last_applied_replication_sequence_number: The highest replication + operation sequence number that the secondary has applied to its state. + :type last_applied_replication_sequence_number: str + :param is_in_build: A value that indicates whether the secondary replica + is in the process of being built. + :type is_in_build: bool + :param last_received_copy_sequence_number: The highest copy operation + sequence number that the secondary has received from the primary. + A value of -1 implies that the secondary has received all copy operations. + :type last_received_copy_sequence_number: str + :param last_applied_copy_sequence_number: The highest copy operation + sequence number that the secondary has applied to its state. + A value of -1 implies that the secondary has applied all copy operations + and the copy process is complete. + :type last_applied_copy_sequence_number: str + :param remote_replicator_acknowledgement_status: Represents the + acknowledgment status for the remote secondary replicator. + :type remote_replicator_acknowledgement_status: + ~azure.servicefabric.models.RemoteReplicatorAcknowledgementStatus + """ + + _attribute_map = { + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + 'last_acknowledgement_processed_time_utc': {'key': 'LastAcknowledgementProcessedTimeUtc', 'type': 'iso-8601'}, + 'last_received_replication_sequence_number': {'key': 'LastReceivedReplicationSequenceNumber', 'type': 'str'}, + 'last_applied_replication_sequence_number': {'key': 'LastAppliedReplicationSequenceNumber', 'type': 'str'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'last_received_copy_sequence_number': {'key': 'LastReceivedCopySequenceNumber', 'type': 'str'}, + 'last_applied_copy_sequence_number': {'key': 'LastAppliedCopySequenceNumber', 'type': 'str'}, + 'remote_replicator_acknowledgement_status': {'key': 'RemoteReplicatorAcknowledgementStatus', 'type': 'RemoteReplicatorAcknowledgementStatus'}, + } + + def __init__(self, *, replica_id: str=None, last_acknowledgement_processed_time_utc=None, last_received_replication_sequence_number: str=None, last_applied_replication_sequence_number: str=None, is_in_build: bool=None, last_received_copy_sequence_number: str=None, last_applied_copy_sequence_number: str=None, remote_replicator_acknowledgement_status=None, **kwargs) -> None: + super(RemoteReplicatorStatus, self).__init__(**kwargs) + self.replica_id = replica_id + self.last_acknowledgement_processed_time_utc = last_acknowledgement_processed_time_utc + self.last_received_replication_sequence_number = last_received_replication_sequence_number + self.last_applied_replication_sequence_number = last_applied_replication_sequence_number + self.is_in_build = is_in_build + self.last_received_copy_sequence_number = last_received_copy_sequence_number + self.last_applied_copy_sequence_number = last_applied_copy_sequence_number + self.remote_replicator_acknowledgement_status = remote_replicator_acknowledgement_status diff --git a/customSDK/servicefabric/models/repair_impact_description_base.py b/customSDK/servicefabric/models/repair_impact_description_base.py new file mode 100644 index 00000000..5e691e7a --- /dev/null +++ b/customSDK/servicefabric/models/repair_impact_description_base.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairImpactDescriptionBase(Model): + """Describes the expected impact of executing a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NodeRepairImpactDescription + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Node': 'NodeRepairImpactDescription'} + } + + def __init__(self, **kwargs): + super(RepairImpactDescriptionBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/repair_impact_description_base_py3.py b/customSDK/servicefabric/models/repair_impact_description_base_py3.py new file mode 100644 index 00000000..3569e103 --- /dev/null +++ b/customSDK/servicefabric/models/repair_impact_description_base_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairImpactDescriptionBase(Model): + """Describes the expected impact of executing a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NodeRepairImpactDescription + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Node': 'NodeRepairImpactDescription'} + } + + def __init__(self, **kwargs) -> None: + super(RepairImpactDescriptionBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/repair_target_description_base.py b/customSDK/servicefabric/models/repair_target_description_base.py new file mode 100644 index 00000000..5bedd766 --- /dev/null +++ b/customSDK/servicefabric/models/repair_target_description_base.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairTargetDescriptionBase(Model): + """Describes the entities targeted by a repair action. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NodeRepairTargetDescription + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Node': 'NodeRepairTargetDescription'} + } + + def __init__(self, **kwargs): + super(RepairTargetDescriptionBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/repair_target_description_base_py3.py b/customSDK/servicefabric/models/repair_target_description_base_py3.py new file mode 100644 index 00000000..d68058e5 --- /dev/null +++ b/customSDK/servicefabric/models/repair_target_description_base_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairTargetDescriptionBase(Model): + """Describes the entities targeted by a repair action. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NodeRepairTargetDescription + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Node': 'NodeRepairTargetDescription'} + } + + def __init__(self, **kwargs) -> None: + super(RepairTargetDescriptionBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/repair_task.py b/customSDK/servicefabric/models/repair_task.py new file mode 100644 index 00000000..068b3c31 --- /dev/null +++ b/customSDK/servicefabric/models/repair_task.py @@ -0,0 +1,153 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairTask(Model): + """Represents a repair task, which includes information about what kind of + repair was requested, what its progress is, and what its final result was. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the repair task. + :type task_id: str + :param version: The version of the repair task. + When creating a new repair task, the version must be set to zero. When + updating a repair task, + the version is used for optimistic concurrency checks. If the version is + set to zero, the update will not check for write conflicts. If the + version is set to a non-zero value, then the + update will only succeed if the actual current version of the repair task + matches this value. + :type version: str + :param description: A description of the purpose of the repair task, or + other informational details. + May be set when the repair task is created, and is immutable once set. + :type description: str + :param state: Required. The workflow state of the repair task. Valid + initial states are Created, Claimed, and Preparing. Possible values + include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', + 'Executing', 'Restoring', 'Completed' + :type state: str or ~azure.servicefabric.models.State + :param flags: A bitwise-OR of the following values, which gives additional + details about the status of the repair task. + - 1 - Cancellation of the repair has been requested + - 2 - Abort of the repair has been requested + - 4 - Approval of the repair was forced via client request + :type flags: int + :param action: Required. The requested repair action. Must be specified + when the repair task is created, and is immutable once set. + :type action: str + :param target: The target object determines what actions the system will + take to prepare for the impact of the repair, prior to approving execution + of the repair. + May be set when the repair task is created, and is immutable once set. + :type target: ~azure.servicefabric.models.RepairTargetDescriptionBase + :param executor: The name of the repair executor. Must be specified in + Claimed and later states, and is immutable once set. + :type executor: str + :param executor_data: A data string that the repair executor can use to + store its internal state. + :type executor_data: str + :param impact: The impact object determines what actions the system will + take to prepare for the impact of the repair, prior to approving execution + of the repair. + Impact must be specified by the repair executor when transitioning to the + Preparing state, and is immutable once set. + :type impact: ~azure.servicefabric.models.RepairImpactDescriptionBase + :param result_status: A value describing the overall result of the repair + task execution. Must be specified in the Restoring and later states, and + is immutable once set. Possible values include: 'Invalid', 'Succeeded', + 'Cancelled', 'Interrupted', 'Failed', 'Pending' + :type result_status: str or ~azure.servicefabric.models.ResultStatus + :param result_code: A numeric value providing additional details about the + result of the repair task execution. + May be specified in the Restoring and later states, and is immutable once + set. + :type result_code: int + :param result_details: A string providing additional details about the + result of the repair task execution. + May be specified in the Restoring and later states, and is immutable once + set. + :type result_details: str + :param history: An object that contains timestamps of the repair task's + state transitions. + These timestamps are updated by the system, and cannot be directly + modified. + :type history: ~azure.servicefabric.models.RepairTaskHistory + :param preparing_health_check_state: The workflow state of the health + check when the repair task is in the Preparing state. Possible values + include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + :type preparing_health_check_state: str or + ~azure.servicefabric.models.RepairTaskHealthCheckState + :param restoring_health_check_state: The workflow state of the health + check when the repair task is in the Restoring state. Possible values + include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + :type restoring_health_check_state: str or + ~azure.servicefabric.models.RepairTaskHealthCheckState + :param perform_preparing_health_check: A value to determine if health + checks will be performed when the repair task enters the Preparing state. + :type perform_preparing_health_check: bool + :param perform_restoring_health_check: A value to determine if health + checks will be performed when the repair task enters the Restoring state. + :type perform_restoring_health_check: bool + """ + + _validation = { + 'task_id': {'required': True}, + 'state': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'action': {'key': 'Action', 'type': 'str'}, + 'target': {'key': 'Target', 'type': 'RepairTargetDescriptionBase'}, + 'executor': {'key': 'Executor', 'type': 'str'}, + 'executor_data': {'key': 'ExecutorData', 'type': 'str'}, + 'impact': {'key': 'Impact', 'type': 'RepairImpactDescriptionBase'}, + 'result_status': {'key': 'ResultStatus', 'type': 'str'}, + 'result_code': {'key': 'ResultCode', 'type': 'int'}, + 'result_details': {'key': 'ResultDetails', 'type': 'str'}, + 'history': {'key': 'History', 'type': 'RepairTaskHistory'}, + 'preparing_health_check_state': {'key': 'PreparingHealthCheckState', 'type': 'str'}, + 'restoring_health_check_state': {'key': 'RestoringHealthCheckState', 'type': 'str'}, + 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, + 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RepairTask, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.version = kwargs.get('version', None) + self.description = kwargs.get('description', None) + self.state = kwargs.get('state', None) + self.flags = kwargs.get('flags', None) + self.action = kwargs.get('action', None) + self.target = kwargs.get('target', None) + self.executor = kwargs.get('executor', None) + self.executor_data = kwargs.get('executor_data', None) + self.impact = kwargs.get('impact', None) + self.result_status = kwargs.get('result_status', None) + self.result_code = kwargs.get('result_code', None) + self.result_details = kwargs.get('result_details', None) + self.history = kwargs.get('history', None) + self.preparing_health_check_state = kwargs.get('preparing_health_check_state', None) + self.restoring_health_check_state = kwargs.get('restoring_health_check_state', None) + self.perform_preparing_health_check = kwargs.get('perform_preparing_health_check', None) + self.perform_restoring_health_check = kwargs.get('perform_restoring_health_check', None) diff --git a/customSDK/servicefabric/models/repair_task_approve_description.py b/customSDK/servicefabric/models/repair_task_approve_description.py new file mode 100644 index 00000000..132dcbdb --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_approve_description.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairTaskApproveDescription(Model): + """Describes a request for forced approval of a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the repair task. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current version of the repair task. If zero, then no version check + is performed. + :type version: str + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RepairTaskApproveDescription, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.version = kwargs.get('version', None) diff --git a/customSDK/servicefabric/models/repair_task_approve_description_py3.py b/customSDK/servicefabric/models/repair_task_approve_description_py3.py new file mode 100644 index 00000000..78c312a2 --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_approve_description_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairTaskApproveDescription(Model): + """Describes a request for forced approval of a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the repair task. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current version of the repair task. If zero, then no version check + is performed. + :type version: str + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, *, task_id: str, version: str=None, **kwargs) -> None: + super(RepairTaskApproveDescription, self).__init__(**kwargs) + self.task_id = task_id + self.version = version diff --git a/customSDK/servicefabric/models/repair_task_cancel_description.py b/customSDK/servicefabric/models/repair_task_cancel_description.py new file mode 100644 index 00000000..63767fb7 --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_cancel_description.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairTaskCancelDescription(Model): + """Describes a request to cancel a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the repair task. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current version of the repair task. If zero, then no version check + is performed. + :type version: str + :param request_abort: _True_ if the repair should be stopped as soon as + possible even if it has already started executing. _False_ if the repair + should be cancelled only if execution has not yet started. + :type request_abort: bool + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'request_abort': {'key': 'RequestAbort', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RepairTaskCancelDescription, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.version = kwargs.get('version', None) + self.request_abort = kwargs.get('request_abort', None) diff --git a/customSDK/servicefabric/models/repair_task_cancel_description_py3.py b/customSDK/servicefabric/models/repair_task_cancel_description_py3.py new file mode 100644 index 00000000..d4dcde47 --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_cancel_description_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairTaskCancelDescription(Model): + """Describes a request to cancel a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the repair task. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current version of the repair task. If zero, then no version check + is performed. + :type version: str + :param request_abort: _True_ if the repair should be stopped as soon as + possible even if it has already started executing. _False_ if the repair + should be cancelled only if execution has not yet started. + :type request_abort: bool + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'request_abort': {'key': 'RequestAbort', 'type': 'bool'}, + } + + def __init__(self, *, task_id: str, version: str=None, request_abort: bool=None, **kwargs) -> None: + super(RepairTaskCancelDescription, self).__init__(**kwargs) + self.task_id = task_id + self.version = version + self.request_abort = request_abort diff --git a/customSDK/servicefabric/models/repair_task_delete_description.py b/customSDK/servicefabric/models/repair_task_delete_description.py new file mode 100644 index 00000000..910f4fe2 --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_delete_description.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairTaskDeleteDescription(Model): + """Describes a request to delete a completed repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the completed repair task to be + deleted. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current version of the repair task. If zero, then no version check + is performed. + :type version: str + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RepairTaskDeleteDescription, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.version = kwargs.get('version', None) diff --git a/customSDK/servicefabric/models/repair_task_delete_description_py3.py b/customSDK/servicefabric/models/repair_task_delete_description_py3.py new file mode 100644 index 00000000..60ca772d --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_delete_description_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairTaskDeleteDescription(Model): + """Describes a request to delete a completed repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the completed repair task to be + deleted. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current version of the repair task. If zero, then no version check + is performed. + :type version: str + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, *, task_id: str, version: str=None, **kwargs) -> None: + super(RepairTaskDeleteDescription, self).__init__(**kwargs) + self.task_id = task_id + self.version = version diff --git a/customSDK/servicefabric/models/repair_task_history.py b/customSDK/servicefabric/models/repair_task_history.py new file mode 100644 index 00000000..476516dd --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_history.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairTaskHistory(Model): + """A record of the times when the repair task entered each state. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + :param created_utc_timestamp: The time when the repair task entered the + Created state. + :type created_utc_timestamp: datetime + :param claimed_utc_timestamp: The time when the repair task entered the + Claimed state. + :type claimed_utc_timestamp: datetime + :param preparing_utc_timestamp: The time when the repair task entered the + Preparing state. + :type preparing_utc_timestamp: datetime + :param approved_utc_timestamp: The time when the repair task entered the + Approved state + :type approved_utc_timestamp: datetime + :param executing_utc_timestamp: The time when the repair task entered the + Executing state + :type executing_utc_timestamp: datetime + :param restoring_utc_timestamp: The time when the repair task entered the + Restoring state + :type restoring_utc_timestamp: datetime + :param completed_utc_timestamp: The time when the repair task entered the + Completed state + :type completed_utc_timestamp: datetime + :param preparing_health_check_start_utc_timestamp: The time when the + repair task started the health check in the Preparing state. + :type preparing_health_check_start_utc_timestamp: datetime + :param preparing_health_check_end_utc_timestamp: The time when the repair + task completed the health check in the Preparing state. + :type preparing_health_check_end_utc_timestamp: datetime + :param restoring_health_check_start_utc_timestamp: The time when the + repair task started the health check in the Restoring state. + :type restoring_health_check_start_utc_timestamp: datetime + :param restoring_health_check_end_utc_timestamp: The time when the repair + task completed the health check in the Restoring state. + :type restoring_health_check_end_utc_timestamp: datetime + """ + + _attribute_map = { + 'created_utc_timestamp': {'key': 'CreatedUtcTimestamp', 'type': 'iso-8601'}, + 'claimed_utc_timestamp': {'key': 'ClaimedUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_utc_timestamp': {'key': 'PreparingUtcTimestamp', 'type': 'iso-8601'}, + 'approved_utc_timestamp': {'key': 'ApprovedUtcTimestamp', 'type': 'iso-8601'}, + 'executing_utc_timestamp': {'key': 'ExecutingUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_utc_timestamp': {'key': 'RestoringUtcTimestamp', 'type': 'iso-8601'}, + 'completed_utc_timestamp': {'key': 'CompletedUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_health_check_start_utc_timestamp': {'key': 'PreparingHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_health_check_end_utc_timestamp': {'key': 'PreparingHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_health_check_start_utc_timestamp': {'key': 'RestoringHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_health_check_end_utc_timestamp': {'key': 'RestoringHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(RepairTaskHistory, self).__init__(**kwargs) + self.created_utc_timestamp = kwargs.get('created_utc_timestamp', None) + self.claimed_utc_timestamp = kwargs.get('claimed_utc_timestamp', None) + self.preparing_utc_timestamp = kwargs.get('preparing_utc_timestamp', None) + self.approved_utc_timestamp = kwargs.get('approved_utc_timestamp', None) + self.executing_utc_timestamp = kwargs.get('executing_utc_timestamp', None) + self.restoring_utc_timestamp = kwargs.get('restoring_utc_timestamp', None) + self.completed_utc_timestamp = kwargs.get('completed_utc_timestamp', None) + self.preparing_health_check_start_utc_timestamp = kwargs.get('preparing_health_check_start_utc_timestamp', None) + self.preparing_health_check_end_utc_timestamp = kwargs.get('preparing_health_check_end_utc_timestamp', None) + self.restoring_health_check_start_utc_timestamp = kwargs.get('restoring_health_check_start_utc_timestamp', None) + self.restoring_health_check_end_utc_timestamp = kwargs.get('restoring_health_check_end_utc_timestamp', None) diff --git a/customSDK/servicefabric/models/repair_task_history_py3.py b/customSDK/servicefabric/models/repair_task_history_py3.py new file mode 100644 index 00000000..923526b0 --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_history_py3.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairTaskHistory(Model): + """A record of the times when the repair task entered each state. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + :param created_utc_timestamp: The time when the repair task entered the + Created state. + :type created_utc_timestamp: datetime + :param claimed_utc_timestamp: The time when the repair task entered the + Claimed state. + :type claimed_utc_timestamp: datetime + :param preparing_utc_timestamp: The time when the repair task entered the + Preparing state. + :type preparing_utc_timestamp: datetime + :param approved_utc_timestamp: The time when the repair task entered the + Approved state + :type approved_utc_timestamp: datetime + :param executing_utc_timestamp: The time when the repair task entered the + Executing state + :type executing_utc_timestamp: datetime + :param restoring_utc_timestamp: The time when the repair task entered the + Restoring state + :type restoring_utc_timestamp: datetime + :param completed_utc_timestamp: The time when the repair task entered the + Completed state + :type completed_utc_timestamp: datetime + :param preparing_health_check_start_utc_timestamp: The time when the + repair task started the health check in the Preparing state. + :type preparing_health_check_start_utc_timestamp: datetime + :param preparing_health_check_end_utc_timestamp: The time when the repair + task completed the health check in the Preparing state. + :type preparing_health_check_end_utc_timestamp: datetime + :param restoring_health_check_start_utc_timestamp: The time when the + repair task started the health check in the Restoring state. + :type restoring_health_check_start_utc_timestamp: datetime + :param restoring_health_check_end_utc_timestamp: The time when the repair + task completed the health check in the Restoring state. + :type restoring_health_check_end_utc_timestamp: datetime + """ + + _attribute_map = { + 'created_utc_timestamp': {'key': 'CreatedUtcTimestamp', 'type': 'iso-8601'}, + 'claimed_utc_timestamp': {'key': 'ClaimedUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_utc_timestamp': {'key': 'PreparingUtcTimestamp', 'type': 'iso-8601'}, + 'approved_utc_timestamp': {'key': 'ApprovedUtcTimestamp', 'type': 'iso-8601'}, + 'executing_utc_timestamp': {'key': 'ExecutingUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_utc_timestamp': {'key': 'RestoringUtcTimestamp', 'type': 'iso-8601'}, + 'completed_utc_timestamp': {'key': 'CompletedUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_health_check_start_utc_timestamp': {'key': 'PreparingHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, + 'preparing_health_check_end_utc_timestamp': {'key': 'PreparingHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_health_check_start_utc_timestamp': {'key': 'RestoringHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, + 'restoring_health_check_end_utc_timestamp': {'key': 'RestoringHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, created_utc_timestamp=None, claimed_utc_timestamp=None, preparing_utc_timestamp=None, approved_utc_timestamp=None, executing_utc_timestamp=None, restoring_utc_timestamp=None, completed_utc_timestamp=None, preparing_health_check_start_utc_timestamp=None, preparing_health_check_end_utc_timestamp=None, restoring_health_check_start_utc_timestamp=None, restoring_health_check_end_utc_timestamp=None, **kwargs) -> None: + super(RepairTaskHistory, self).__init__(**kwargs) + self.created_utc_timestamp = created_utc_timestamp + self.claimed_utc_timestamp = claimed_utc_timestamp + self.preparing_utc_timestamp = preparing_utc_timestamp + self.approved_utc_timestamp = approved_utc_timestamp + self.executing_utc_timestamp = executing_utc_timestamp + self.restoring_utc_timestamp = restoring_utc_timestamp + self.completed_utc_timestamp = completed_utc_timestamp + self.preparing_health_check_start_utc_timestamp = preparing_health_check_start_utc_timestamp + self.preparing_health_check_end_utc_timestamp = preparing_health_check_end_utc_timestamp + self.restoring_health_check_start_utc_timestamp = restoring_health_check_start_utc_timestamp + self.restoring_health_check_end_utc_timestamp = restoring_health_check_end_utc_timestamp diff --git a/customSDK/servicefabric/models/repair_task_py3.py b/customSDK/servicefabric/models/repair_task_py3.py new file mode 100644 index 00000000..fbcc3c5f --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_py3.py @@ -0,0 +1,153 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairTask(Model): + """Represents a repair task, which includes information about what kind of + repair was requested, what its progress is, and what its final result was. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the repair task. + :type task_id: str + :param version: The version of the repair task. + When creating a new repair task, the version must be set to zero. When + updating a repair task, + the version is used for optimistic concurrency checks. If the version is + set to zero, the update will not check for write conflicts. If the + version is set to a non-zero value, then the + update will only succeed if the actual current version of the repair task + matches this value. + :type version: str + :param description: A description of the purpose of the repair task, or + other informational details. + May be set when the repair task is created, and is immutable once set. + :type description: str + :param state: Required. The workflow state of the repair task. Valid + initial states are Created, Claimed, and Preparing. Possible values + include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', + 'Executing', 'Restoring', 'Completed' + :type state: str or ~azure.servicefabric.models.State + :param flags: A bitwise-OR of the following values, which gives additional + details about the status of the repair task. + - 1 - Cancellation of the repair has been requested + - 2 - Abort of the repair has been requested + - 4 - Approval of the repair was forced via client request + :type flags: int + :param action: Required. The requested repair action. Must be specified + when the repair task is created, and is immutable once set. + :type action: str + :param target: The target object determines what actions the system will + take to prepare for the impact of the repair, prior to approving execution + of the repair. + May be set when the repair task is created, and is immutable once set. + :type target: ~azure.servicefabric.models.RepairTargetDescriptionBase + :param executor: The name of the repair executor. Must be specified in + Claimed and later states, and is immutable once set. + :type executor: str + :param executor_data: A data string that the repair executor can use to + store its internal state. + :type executor_data: str + :param impact: The impact object determines what actions the system will + take to prepare for the impact of the repair, prior to approving execution + of the repair. + Impact must be specified by the repair executor when transitioning to the + Preparing state, and is immutable once set. + :type impact: ~azure.servicefabric.models.RepairImpactDescriptionBase + :param result_status: A value describing the overall result of the repair + task execution. Must be specified in the Restoring and later states, and + is immutable once set. Possible values include: 'Invalid', 'Succeeded', + 'Cancelled', 'Interrupted', 'Failed', 'Pending' + :type result_status: str or ~azure.servicefabric.models.ResultStatus + :param result_code: A numeric value providing additional details about the + result of the repair task execution. + May be specified in the Restoring and later states, and is immutable once + set. + :type result_code: int + :param result_details: A string providing additional details about the + result of the repair task execution. + May be specified in the Restoring and later states, and is immutable once + set. + :type result_details: str + :param history: An object that contains timestamps of the repair task's + state transitions. + These timestamps are updated by the system, and cannot be directly + modified. + :type history: ~azure.servicefabric.models.RepairTaskHistory + :param preparing_health_check_state: The workflow state of the health + check when the repair task is in the Preparing state. Possible values + include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + :type preparing_health_check_state: str or + ~azure.servicefabric.models.RepairTaskHealthCheckState + :param restoring_health_check_state: The workflow state of the health + check when the repair task is in the Restoring state. Possible values + include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + :type restoring_health_check_state: str or + ~azure.servicefabric.models.RepairTaskHealthCheckState + :param perform_preparing_health_check: A value to determine if health + checks will be performed when the repair task enters the Preparing state. + :type perform_preparing_health_check: bool + :param perform_restoring_health_check: A value to determine if health + checks will be performed when the repair task enters the Restoring state. + :type perform_restoring_health_check: bool + """ + + _validation = { + 'task_id': {'required': True}, + 'state': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'action': {'key': 'Action', 'type': 'str'}, + 'target': {'key': 'Target', 'type': 'RepairTargetDescriptionBase'}, + 'executor': {'key': 'Executor', 'type': 'str'}, + 'executor_data': {'key': 'ExecutorData', 'type': 'str'}, + 'impact': {'key': 'Impact', 'type': 'RepairImpactDescriptionBase'}, + 'result_status': {'key': 'ResultStatus', 'type': 'str'}, + 'result_code': {'key': 'ResultCode', 'type': 'int'}, + 'result_details': {'key': 'ResultDetails', 'type': 'str'}, + 'history': {'key': 'History', 'type': 'RepairTaskHistory'}, + 'preparing_health_check_state': {'key': 'PreparingHealthCheckState', 'type': 'str'}, + 'restoring_health_check_state': {'key': 'RestoringHealthCheckState', 'type': 'str'}, + 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, + 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, + } + + def __init__(self, *, task_id: str, state, action: str, version: str=None, description: str=None, flags: int=None, target=None, executor: str=None, executor_data: str=None, impact=None, result_status=None, result_code: int=None, result_details: str=None, history=None, preparing_health_check_state=None, restoring_health_check_state=None, perform_preparing_health_check: bool=None, perform_restoring_health_check: bool=None, **kwargs) -> None: + super(RepairTask, self).__init__(**kwargs) + self.task_id = task_id + self.version = version + self.description = description + self.state = state + self.flags = flags + self.action = action + self.target = target + self.executor = executor + self.executor_data = executor_data + self.impact = impact + self.result_status = result_status + self.result_code = result_code + self.result_details = result_details + self.history = history + self.preparing_health_check_state = preparing_health_check_state + self.restoring_health_check_state = restoring_health_check_state + self.perform_preparing_health_check = perform_preparing_health_check + self.perform_restoring_health_check = perform_restoring_health_check diff --git a/customSDK/servicefabric/models/repair_task_update_health_policy_description.py b/customSDK/servicefabric/models/repair_task_update_health_policy_description.py new file mode 100644 index 00000000..61916023 --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_update_health_policy_description.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairTaskUpdateHealthPolicyDescription(Model): + """Describes a request to update the health policy of a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the repair task to be updated. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current value of the repair task. If zero, then no version check is + performed. + :type version: str + :param perform_preparing_health_check: A boolean indicating if health + check is to be performed in the Preparing stage of the repair task. If not + specified the existing value should not be altered. Otherwise, specify the + desired new value. + :type perform_preparing_health_check: bool + :param perform_restoring_health_check: A boolean indicating if health + check is to be performed in the Restoring stage of the repair task. If not + specified the existing value should not be altered. Otherwise, specify the + desired new value. + :type perform_restoring_health_check: bool + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, + 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RepairTaskUpdateHealthPolicyDescription, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.version = kwargs.get('version', None) + self.perform_preparing_health_check = kwargs.get('perform_preparing_health_check', None) + self.perform_restoring_health_check = kwargs.get('perform_restoring_health_check', None) diff --git a/customSDK/servicefabric/models/repair_task_update_health_policy_description_py3.py b/customSDK/servicefabric/models/repair_task_update_health_policy_description_py3.py new file mode 100644 index 00000000..58615aad --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_update_health_policy_description_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairTaskUpdateHealthPolicyDescription(Model): + """Describes a request to update the health policy of a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param task_id: Required. The ID of the repair task to be updated. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current value of the repair task. If zero, then no version check is + performed. + :type version: str + :param perform_preparing_health_check: A boolean indicating if health + check is to be performed in the Preparing stage of the repair task. If not + specified the existing value should not be altered. Otherwise, specify the + desired new value. + :type perform_preparing_health_check: bool + :param perform_restoring_health_check: A boolean indicating if health + check is to be performed in the Restoring stage of the repair task. If not + specified the existing value should not be altered. Otherwise, specify the + desired new value. + :type perform_restoring_health_check: bool + """ + + _validation = { + 'task_id': {'required': True}, + } + + _attribute_map = { + 'task_id': {'key': 'TaskId', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, + 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, + } + + def __init__(self, *, task_id: str, version: str=None, perform_preparing_health_check: bool=None, perform_restoring_health_check: bool=None, **kwargs) -> None: + super(RepairTaskUpdateHealthPolicyDescription, self).__init__(**kwargs) + self.task_id = task_id + self.version = version + self.perform_preparing_health_check = perform_preparing_health_check + self.perform_restoring_health_check = perform_restoring_health_check diff --git a/customSDK/servicefabric/models/repair_task_update_info.py b/customSDK/servicefabric/models/repair_task_update_info.py new file mode 100644 index 00000000..e034e7c3 --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_update_info.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairTaskUpdateInfo(Model): + """Describes the result of an operation that created or updated a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param version: Required. The new version of the repair task. + :type version: str + """ + + _validation = { + 'version': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RepairTaskUpdateInfo, self).__init__(**kwargs) + self.version = kwargs.get('version', None) diff --git a/customSDK/servicefabric/models/repair_task_update_info_py3.py b/customSDK/servicefabric/models/repair_task_update_info_py3.py new file mode 100644 index 00000000..6d3897b6 --- /dev/null +++ b/customSDK/servicefabric/models/repair_task_update_info_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RepairTaskUpdateInfo(Model): + """Describes the result of an operation that created or updated a repair task. + This type supports the Service Fabric platform; it is not meant to be used + directly from your code. + + All required parameters must be populated in order to send to Azure. + + :param version: Required. The new version of the repair task. + :type version: str + """ + + _validation = { + 'version': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, *, version: str, **kwargs) -> None: + super(RepairTaskUpdateInfo, self).__init__(**kwargs) + self.version = version diff --git a/customSDK/servicefabric/models/replica_event.py b/customSDK/servicefabric/models/replica_event.py new file mode 100644 index 00000000..62dbd958 --- /dev/null +++ b/customSDK/servicefabric/models/replica_event.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .fabric_event import FabricEvent + + +class ReplicaEvent(FabricEvent): + """Represents the base for all Replica Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulReplicaNewHealthReportEvent, + StatefulReplicaHealthReportExpiredEvent, + StatelessReplicaNewHealthReportEvent, + StatelessReplicaHealthReportExpiredEvent, + ChaosReplicaRemovalScheduledEvent, ChaosReplicaRestartScheduledEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + } + + _subtype_map = { + 'kind': {'StatefulReplicaNewHealthReport': 'StatefulReplicaNewHealthReportEvent', 'StatefulReplicaHealthReportExpired': 'StatefulReplicaHealthReportExpiredEvent', 'StatelessReplicaNewHealthReport': 'StatelessReplicaNewHealthReportEvent', 'StatelessReplicaHealthReportExpired': 'StatelessReplicaHealthReportExpiredEvent', 'ChaosReplicaRemovalScheduled': 'ChaosReplicaRemovalScheduledEvent', 'ChaosReplicaRestartScheduled': 'ChaosReplicaRestartScheduledEvent'} + } + + def __init__(self, **kwargs): + super(ReplicaEvent, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.replica_id = kwargs.get('replica_id', None) + self.kind = 'ReplicaEvent' diff --git a/customSDK/servicefabric/models/replica_event_py3.py b/customSDK/servicefabric/models/replica_event_py3.py new file mode 100644 index 00000000..e9f53425 --- /dev/null +++ b/customSDK/servicefabric/models/replica_event_py3.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .fabric_event_py3 import FabricEvent + + +class ReplicaEvent(FabricEvent): + """Represents the base for all Replica Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulReplicaNewHealthReportEvent, + StatefulReplicaHealthReportExpiredEvent, + StatelessReplicaNewHealthReportEvent, + StatelessReplicaHealthReportExpiredEvent, + ChaosReplicaRemovalScheduledEvent, ChaosReplicaRestartScheduledEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + } + + _subtype_map = { + 'kind': {'StatefulReplicaNewHealthReport': 'StatefulReplicaNewHealthReportEvent', 'StatefulReplicaHealthReportExpired': 'StatefulReplicaHealthReportExpiredEvent', 'StatelessReplicaNewHealthReport': 'StatelessReplicaNewHealthReportEvent', 'StatelessReplicaHealthReportExpired': 'StatelessReplicaHealthReportExpiredEvent', 'ChaosReplicaRemovalScheduled': 'ChaosReplicaRemovalScheduledEvent', 'ChaosReplicaRestartScheduled': 'ChaosReplicaRestartScheduledEvent'} + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ReplicaEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.partition_id = partition_id + self.replica_id = replica_id + self.kind = 'ReplicaEvent' diff --git a/customSDK/servicefabric/models/replica_health.py b/customSDK/servicefabric/models/replica_health.py new file mode 100644 index 00000000..55551909 --- /dev/null +++ b/customSDK/servicefabric/models/replica_health.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health import EntityHealth + + +class ReplicaHealth(EntityHealth): + """Represents a base class for stateful service replica or stateless service + instance health. + Contains the replica aggregated health state, the health events and the + unhealthy evaluations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaHealth, + StatelessServiceInstanceHealth + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param partition_id: Id of the partition to which this replica belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaHealth', 'Stateless': 'StatelessServiceInstanceHealth'} + } + + def __init__(self, **kwargs): + super(ReplicaHealth, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.service_kind = None + self.service_kind = 'ReplicaHealth' diff --git a/customSDK/servicefabric/models/replica_health_evaluation.py b/customSDK/servicefabric/models/replica_health_evaluation.py new file mode 100644 index 00000000..6799d1a2 --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_evaluation.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class ReplicaHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a replica, containing information about + the data and the algorithm used by health store to evaluate health. The + evaluation is returned only when the aggregated health state is either + Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition to which the replica belongs. + :type partition_id: str + :param replica_or_instance_id: Id of a stateful service replica or a + stateless service instance. This ID is used in the queries that apply to + both stateful and stateless services. It is used by Service Fabric to + uniquely identify a replica of a partition of a stateful service or an + instance of a stateless service partition. It is unique within a partition + and does not change for the lifetime of the replica or the instance. If a + stateful replica gets dropped and another replica gets created on the same + node for the same partition, it will get a different value for the ID. If + a stateless instance is failed over on the same or different node it will + get a different value for the ID. + :type replica_or_instance_id: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the replica. The types of the + unhealthy evaluations can be EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(ReplicaHealthEvaluation, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.replica_or_instance_id = kwargs.get('replica_or_instance_id', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Replica' diff --git a/customSDK/servicefabric/models/replica_health_evaluation_py3.py b/customSDK/servicefabric/models/replica_health_evaluation_py3.py new file mode 100644 index 00000000..3f8641af --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_evaluation_py3.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class ReplicaHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a replica, containing information about + the data and the algorithm used by health store to evaluate health. The + evaluation is returned only when the aggregated health state is either + Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition to which the replica belongs. + :type partition_id: str + :param replica_or_instance_id: Id of a stateful service replica or a + stateless service instance. This ID is used in the queries that apply to + both stateful and stateless services. It is used by Service Fabric to + uniquely identify a replica of a partition of a stateful service or an + instance of a stateless service partition. It is unique within a partition + and does not change for the lifetime of the replica or the instance. If a + stateful replica gets dropped and another replica gets created on the same + node for the same partition, it will get a different value for the ID. If + a stateless instance is failed over on the same or different node it will + get a different value for the ID. + :type replica_or_instance_id: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the replica. The types of the + unhealthy evaluations can be EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, partition_id: str=None, replica_or_instance_id: str=None, unhealthy_evaluations=None, **kwargs) -> None: + super(ReplicaHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.partition_id = partition_id + self.replica_or_instance_id = replica_or_instance_id + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Replica' diff --git a/customSDK/servicefabric/models/replica_health_py3.py b/customSDK/servicefabric/models/replica_health_py3.py new file mode 100644 index 00000000..1e67205a --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_py3.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_py3 import EntityHealth + + +class ReplicaHealth(EntityHealth): + """Represents a base class for stateful service replica or stateless service + instance health. + Contains the replica aggregated health state, the health events and the + unhealthy evaluations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaHealth, + StatelessServiceInstanceHealth + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param partition_id: Id of the partition to which this replica belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaHealth', 'Stateless': 'StatelessServiceInstanceHealth'} + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, **kwargs) -> None: + super(ReplicaHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.partition_id = partition_id + self.service_kind = None + self.service_kind = 'ReplicaHealth' diff --git a/customSDK/servicefabric/models/replica_health_state.py b/customSDK/servicefabric/models/replica_health_state.py new file mode 100644 index 00000000..6f21de27 --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_state.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state import EntityHealthState + + +class ReplicaHealthState(EntityHealthState): + """Represents a base class for stateful service replica or stateless service + instance health state. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaHealthState, + StatelessServiceInstanceHealthState + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param partition_id: The ID of the partition to which this replica + belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaHealthState', 'Stateless': 'StatelessServiceInstanceHealthState'} + } + + def __init__(self, **kwargs): + super(ReplicaHealthState, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.service_kind = None + self.service_kind = 'ReplicaHealthState' diff --git a/customSDK/servicefabric/models/replica_health_state_chunk.py b/customSDK/servicefabric/models/replica_health_state_chunk.py new file mode 100644 index 00000000..8f3b8e9f --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_state_chunk.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk import EntityHealthStateChunk + + +class ReplicaHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a stateful service replica or a + stateless service instance. + The replica health state contains the replica ID and its aggregated health + state. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param replica_or_instance_id: Id of a stateful service replica or a + stateless service instance. This ID is used in the queries that apply to + both stateful and stateless services. It is used by Service Fabric to + uniquely identify a replica of a partition of a stateful service or an + instance of a stateless service partition. It is unique within a partition + and does not change for the lifetime of the replica or the instance. If a + stateful replica gets dropped and another replica gets created on the same + node for the same partition, it will get a different value for the ID. If + a stateless instance is failed over on the same or different node it will + get a different value for the ID. + :type replica_or_instance_id: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ReplicaHealthStateChunk, self).__init__(**kwargs) + self.replica_or_instance_id = kwargs.get('replica_or_instance_id', None) diff --git a/customSDK/servicefabric/models/replica_health_state_chunk_list.py b/customSDK/servicefabric/models/replica_health_state_chunk_list.py new file mode 100644 index 00000000..6f8ba7e8 --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_state_chunk_list.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicaHealthStateChunkList(Model): + """The list of replica health state chunks that respect the input filters in + the chunk query. Returned by get cluster health state chunks query. + + :param items: The list of replica health state chunks that respect the + input filters in the chunk query. + :type items: list[~azure.servicefabric.models.ReplicaHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[ReplicaHealthStateChunk]'}, + } + + def __init__(self, **kwargs): + super(ReplicaHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/replica_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/replica_health_state_chunk_list_py3.py new file mode 100644 index 00000000..90e84767 --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_state_chunk_list_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicaHealthStateChunkList(Model): + """The list of replica health state chunks that respect the input filters in + the chunk query. Returned by get cluster health state chunks query. + + :param items: The list of replica health state chunks that respect the + input filters in the chunk query. + :type items: list[~azure.servicefabric.models.ReplicaHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[ReplicaHealthStateChunk]'}, + } + + def __init__(self, *, items=None, **kwargs) -> None: + super(ReplicaHealthStateChunkList, self).__init__(**kwargs) + self.items = items diff --git a/customSDK/servicefabric/models/replica_health_state_chunk_py3.py b/customSDK/servicefabric/models/replica_health_state_chunk_py3.py new file mode 100644 index 00000000..8a21181e --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_state_chunk_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk_py3 import EntityHealthStateChunk + + +class ReplicaHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a stateful service replica or a + stateless service instance. + The replica health state contains the replica ID and its aggregated health + state. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param replica_or_instance_id: Id of a stateful service replica or a + stateless service instance. This ID is used in the queries that apply to + both stateful and stateless services. It is used by Service Fabric to + uniquely identify a replica of a partition of a stateful service or an + instance of a stateless service partition. It is unique within a partition + and does not change for the lifetime of the replica or the instance. If a + stateful replica gets dropped and another replica gets created on the same + node for the same partition, it will get a different value for the ID. If + a stateless instance is failed over on the same or different node it will + get a different value for the ID. + :type replica_or_instance_id: str + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, + } + + def __init__(self, *, health_state=None, replica_or_instance_id: str=None, **kwargs) -> None: + super(ReplicaHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.replica_or_instance_id = replica_or_instance_id diff --git a/customSDK/servicefabric/models/replica_health_state_filter.py b/customSDK/servicefabric/models/replica_health_state_filter.py new file mode 100644 index 00000000..c736e815 --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_state_filter.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicaHealthStateFilter(Model): + """Defines matching criteria to determine whether a replica should be included + as a child of a partition in the cluster health chunk. + The replicas are only returned if the parent entities match a filter + specified in the cluster health chunk query description. The parent + partition, service and application must be included in the cluster health + chunk. + One filter can match zero, one or multiple replicas, depending on its + properties. + + :param replica_or_instance_id_filter: Id of the stateful service replica + or stateless service instance that matches the filter. The filter is + applied only to the specified replica, if it exists. + If the replica doesn't exist, no replica is returned in the cluster health + chunk based on this filter. + If the replica exists, it is included in the cluster health chunk if it + respects the other filter properties. + If not specified, all replicas that match the parent filters (if any) are + taken into consideration and matched against the other filter members, + like health state filter. + :type replica_or_instance_id_filter: str + :param health_state_filter: The filter for the health state of the + replicas. It allows selecting replicas if they match the desired health + states. + The possible values are integer value of one of the following health + states. Only replicas that match the filter are returned. All replicas are + used to evaluate the parent partition aggregated health state. + If not specified, default value is None, unless the replica ID is + specified. If the filter has default value and replica ID is specified, + the matching replica is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches replicas with + HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + """ + + _attribute_map = { + 'replica_or_instance_id_filter': {'key': 'ReplicaOrInstanceIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ReplicaHealthStateFilter, self).__init__(**kwargs) + self.replica_or_instance_id_filter = kwargs.get('replica_or_instance_id_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) diff --git a/customSDK/servicefabric/models/replica_health_state_filter_py3.py b/customSDK/servicefabric/models/replica_health_state_filter_py3.py new file mode 100644 index 00000000..29a29506 --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_state_filter_py3.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicaHealthStateFilter(Model): + """Defines matching criteria to determine whether a replica should be included + as a child of a partition in the cluster health chunk. + The replicas are only returned if the parent entities match a filter + specified in the cluster health chunk query description. The parent + partition, service and application must be included in the cluster health + chunk. + One filter can match zero, one or multiple replicas, depending on its + properties. + + :param replica_or_instance_id_filter: Id of the stateful service replica + or stateless service instance that matches the filter. The filter is + applied only to the specified replica, if it exists. + If the replica doesn't exist, no replica is returned in the cluster health + chunk based on this filter. + If the replica exists, it is included in the cluster health chunk if it + respects the other filter properties. + If not specified, all replicas that match the parent filters (if any) are + taken into consideration and matched against the other filter members, + like health state filter. + :type replica_or_instance_id_filter: str + :param health_state_filter: The filter for the health state of the + replicas. It allows selecting replicas if they match the desired health + states. + The possible values are integer value of one of the following health + states. Only replicas that match the filter are returned. All replicas are + used to evaluate the parent partition aggregated health state. + If not specified, default value is None, unless the replica ID is + specified. If the filter has default value and replica ID is specified, + the matching replica is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches replicas with + HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + """ + + _attribute_map = { + 'replica_or_instance_id_filter': {'key': 'ReplicaOrInstanceIdFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + } + + def __init__(self, *, replica_or_instance_id_filter: str=None, health_state_filter: int=0, **kwargs) -> None: + super(ReplicaHealthStateFilter, self).__init__(**kwargs) + self.replica_or_instance_id_filter = replica_or_instance_id_filter + self.health_state_filter = health_state_filter diff --git a/customSDK/servicefabric/models/replica_health_state_py3.py b/customSDK/servicefabric/models/replica_health_state_py3.py new file mode 100644 index 00000000..f9e5cadd --- /dev/null +++ b/customSDK/servicefabric/models/replica_health_state_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_py3 import EntityHealthState + + +class ReplicaHealthState(EntityHealthState): + """Represents a base class for stateful service replica or stateless service + instance health state. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaHealthState, + StatelessServiceInstanceHealthState + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param partition_id: The ID of the partition to which this replica + belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaHealthState', 'Stateless': 'StatelessServiceInstanceHealthState'} + } + + def __init__(self, *, aggregated_health_state=None, partition_id: str=None, **kwargs) -> None: + super(ReplicaHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.partition_id = partition_id + self.service_kind = None + self.service_kind = 'ReplicaHealthState' diff --git a/customSDK/servicefabric/models/replica_info.py b/customSDK/servicefabric/models/replica_info.py new file mode 100644 index 00000000..ac8fde73 --- /dev/null +++ b/customSDK/servicefabric/models/replica_info.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicaInfo(Model): + """Information about the identity, status, health, node name, uptime, and + other details about the replica. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaInfo, StatelessServiceInstanceInfo + + All required parameters must be populated in order to send to Azure. + + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param address: The address the replica is listening on. + :type address: str + :param last_in_build_duration_in_seconds: The last in build duration of + the replica in seconds. + :type last_in_build_duration_in_seconds: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaInfo', 'Stateless': 'StatelessServiceInstanceInfo'} + } + + def __init__(self, **kwargs): + super(ReplicaInfo, self).__init__(**kwargs) + self.replica_status = kwargs.get('replica_status', None) + self.health_state = kwargs.get('health_state', None) + self.node_name = kwargs.get('node_name', None) + self.address = kwargs.get('address', None) + self.last_in_build_duration_in_seconds = kwargs.get('last_in_build_duration_in_seconds', None) + self.service_kind = None diff --git a/customSDK/servicefabric/models/replica_info_py3.py b/customSDK/servicefabric/models/replica_info_py3.py new file mode 100644 index 00000000..d27367c3 --- /dev/null +++ b/customSDK/servicefabric/models/replica_info_py3.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicaInfo(Model): + """Information about the identity, status, health, node name, uptime, and + other details about the replica. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceReplicaInfo, StatelessServiceInstanceInfo + + All required parameters must be populated in order to send to Azure. + + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param address: The address the replica is listening on. + :type address: str + :param last_in_build_duration_in_seconds: The last in build duration of + the replica in seconds. + :type last_in_build_duration_in_seconds: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceReplicaInfo', 'Stateless': 'StatelessServiceInstanceInfo'} + } + + def __init__(self, *, replica_status=None, health_state=None, node_name: str=None, address: str=None, last_in_build_duration_in_seconds: str=None, **kwargs) -> None: + super(ReplicaInfo, self).__init__(**kwargs) + self.replica_status = replica_status + self.health_state = health_state + self.node_name = node_name + self.address = address + self.last_in_build_duration_in_seconds = last_in_build_duration_in_seconds + self.service_kind = None diff --git a/customSDK/servicefabric/models/replica_lifecycle_description.py b/customSDK/servicefabric/models/replica_lifecycle_description.py new file mode 100644 index 00000000..e82aa2b9 --- /dev/null +++ b/customSDK/servicefabric/models/replica_lifecycle_description.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicaLifecycleDescription(Model): + """Describes how the replica will behave. + + :param is_singleton_replica_move_allowed_during_upgrade: If set to true, + replicas with a target replica set size of 1 will be permitted to move + during upgrade. + :type is_singleton_replica_move_allowed_during_upgrade: bool + :param restore_replica_location_after_upgrade: If set to true, move/swap + replica to original location after upgrade. + :type restore_replica_location_after_upgrade: bool + """ + + _attribute_map = { + 'is_singleton_replica_move_allowed_during_upgrade': {'key': 'IsSingletonReplicaMoveAllowedDuringUpgrade', 'type': 'bool'}, + 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ReplicaLifecycleDescription, self).__init__(**kwargs) + self.is_singleton_replica_move_allowed_during_upgrade = kwargs.get('is_singleton_replica_move_allowed_during_upgrade', None) + self.restore_replica_location_after_upgrade = kwargs.get('restore_replica_location_after_upgrade', None) diff --git a/customSDK/servicefabric/models/replica_lifecycle_description_py3.py b/customSDK/servicefabric/models/replica_lifecycle_description_py3.py new file mode 100644 index 00000000..9bec34e1 --- /dev/null +++ b/customSDK/servicefabric/models/replica_lifecycle_description_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicaLifecycleDescription(Model): + """Describes how the replica will behave. + + :param is_singleton_replica_move_allowed_during_upgrade: If set to true, + replicas with a target replica set size of 1 will be permitted to move + during upgrade. + :type is_singleton_replica_move_allowed_during_upgrade: bool + :param restore_replica_location_after_upgrade: If set to true, move/swap + replica to original location after upgrade. + :type restore_replica_location_after_upgrade: bool + """ + + _attribute_map = { + 'is_singleton_replica_move_allowed_during_upgrade': {'key': 'IsSingletonReplicaMoveAllowedDuringUpgrade', 'type': 'bool'}, + 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + } + + def __init__(self, *, is_singleton_replica_move_allowed_during_upgrade: bool=None, restore_replica_location_after_upgrade: bool=None, **kwargs) -> None: + super(ReplicaLifecycleDescription, self).__init__(**kwargs) + self.is_singleton_replica_move_allowed_during_upgrade = is_singleton_replica_move_allowed_during_upgrade + self.restore_replica_location_after_upgrade = restore_replica_location_after_upgrade diff --git a/customSDK/servicefabric/models/replica_metric_load_description.py b/customSDK/servicefabric/models/replica_metric_load_description.py new file mode 100644 index 00000000..4497ccba --- /dev/null +++ b/customSDK/servicefabric/models/replica_metric_load_description.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicaMetricLoadDescription(Model): + """Specifies metric loads of a partition's specific secondary replica or + instance. + + :param node_name: Node name of a specific secondary replica or instance. + :type node_name: str + :param replica_or_instance_load_entries: Loads of a different metrics for + a partition's secondary replica or instance. + :type replica_or_instance_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'replica_or_instance_load_entries': {'key': 'ReplicaOrInstanceLoadEntries', 'type': '[MetricLoadDescription]'}, + } + + def __init__(self, **kwargs): + super(ReplicaMetricLoadDescription, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.replica_or_instance_load_entries = kwargs.get('replica_or_instance_load_entries', None) diff --git a/customSDK/servicefabric/models/replica_metric_load_description_py3.py b/customSDK/servicefabric/models/replica_metric_load_description_py3.py new file mode 100644 index 00000000..8ac6133e --- /dev/null +++ b/customSDK/servicefabric/models/replica_metric_load_description_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicaMetricLoadDescription(Model): + """Specifies metric loads of a partition's specific secondary replica or + instance. + + :param node_name: Node name of a specific secondary replica or instance. + :type node_name: str + :param replica_or_instance_load_entries: Loads of a different metrics for + a partition's secondary replica or instance. + :type replica_or_instance_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'replica_or_instance_load_entries': {'key': 'ReplicaOrInstanceLoadEntries', 'type': '[MetricLoadDescription]'}, + } + + def __init__(self, *, node_name: str=None, replica_or_instance_load_entries=None, **kwargs) -> None: + super(ReplicaMetricLoadDescription, self).__init__(**kwargs) + self.node_name = node_name + self.replica_or_instance_load_entries = replica_or_instance_load_entries diff --git a/customSDK/servicefabric/models/replica_status_base.py b/customSDK/servicefabric/models/replica_status_base.py new file mode 100644 index 00000000..e95b5009 --- /dev/null +++ b/customSDK/servicefabric/models/replica_status_base.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicaStatusBase(Model): + """Information about the replica. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: KeyValueStoreReplicaStatus + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'KeyValueStore': 'KeyValueStoreReplicaStatus'} + } + + def __init__(self, **kwargs): + super(ReplicaStatusBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/replica_status_base_py3.py b/customSDK/servicefabric/models/replica_status_base_py3.py new file mode 100644 index 00000000..f279cb3f --- /dev/null +++ b/customSDK/servicefabric/models/replica_status_base_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicaStatusBase(Model): + """Information about the replica. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: KeyValueStoreReplicaStatus + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'KeyValueStore': 'KeyValueStoreReplicaStatus'} + } + + def __init__(self, **kwargs) -> None: + super(ReplicaStatusBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/replicas_health_evaluation.py b/customSDK/servicefabric/models/replicas_health_evaluation.py new file mode 100644 index 00000000..79871913 --- /dev/null +++ b/customSDK/servicefabric/models/replicas_health_evaluation.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class ReplicasHealthEvaluation(HealthEvaluation): + """Represents health evaluation for replicas, containing health evaluations + for each unhealthy replica that impacted current aggregated health state. + Can be returned when evaluating partition health and the aggregated health + state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_replicas_per_partition: Maximum allowed + percentage of unhealthy replicas per partition from the + ApplicationHealthPolicy. + :type max_percent_unhealthy_replicas_per_partition: int + :param total_count: Total number of replicas in the partition from the + health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + ReplicaHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(ReplicasHealthEvaluation, self).__init__(**kwargs) + self.max_percent_unhealthy_replicas_per_partition = kwargs.get('max_percent_unhealthy_replicas_per_partition', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Replicas' diff --git a/customSDK/servicefabric/models/replicas_health_evaluation_py3.py b/customSDK/servicefabric/models/replicas_health_evaluation_py3.py new file mode 100644 index 00000000..4cc1aa37 --- /dev/null +++ b/customSDK/servicefabric/models/replicas_health_evaluation_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class ReplicasHealthEvaluation(HealthEvaluation): + """Represents health evaluation for replicas, containing health evaluations + for each unhealthy replica that impacted current aggregated health state. + Can be returned when evaluating partition health and the aggregated health + state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param max_percent_unhealthy_replicas_per_partition: Maximum allowed + percentage of unhealthy replicas per partition from the + ApplicationHealthPolicy. + :type max_percent_unhealthy_replicas_per_partition: int + :param total_count: Total number of replicas in the partition from the + health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + ReplicaHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_replicas_per_partition: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(ReplicasHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.max_percent_unhealthy_replicas_per_partition = max_percent_unhealthy_replicas_per_partition + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Replicas' diff --git a/customSDK/servicefabric/models/replicator_queue_status.py b/customSDK/servicefabric/models/replicator_queue_status.py new file mode 100644 index 00000000..043c0670 --- /dev/null +++ b/customSDK/servicefabric/models/replicator_queue_status.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicatorQueueStatus(Model): + """Provides various statistics of the queue used in the service fabric + replicator. + Contains information about the service fabric replicator like the + replication/copy queue utilization, last acknowledgement received + timestamp, etc. + Depending on the role of the replicator, the properties in this type imply + different meanings. + + :param queue_utilization_percentage: Represents the utilization of the + queue. A value of 0 indicates that the queue is empty and a value of 100 + indicates the queue is full. + :type queue_utilization_percentage: int + :param queue_memory_size: Represents the virtual memory consumed by the + queue in bytes. + :type queue_memory_size: str + :param first_sequence_number: On a primary replicator, this is + semantically the sequence number of the operation for which all the + secondary replicas have sent an acknowledgement. + On a secondary replicator, this is the smallest sequence number of the + operation that is present in the queue. + :type first_sequence_number: str + :param completed_sequence_number: On a primary replicator, this is + semantically the highest sequence number of the operation for which all + the secondary replicas have sent an acknowledgement. + On a secondary replicator, this is semantically the highest sequence + number that has been applied to the persistent state. + :type completed_sequence_number: str + :param committed_sequence_number: On a primary replicator, this is + semantically the highest sequence number of the operation for which a + write quorum of the secondary replicas have sent an acknowledgement. + On a secondary replicator, this is semantically the highest sequence + number of the in-order operation received from the primary. + :type committed_sequence_number: str + :param last_sequence_number: Represents the latest sequence number of the + operation that is available in the queue. + :type last_sequence_number: str + """ + + _attribute_map = { + 'queue_utilization_percentage': {'key': 'QueueUtilizationPercentage', 'type': 'int'}, + 'queue_memory_size': {'key': 'QueueMemorySize', 'type': 'str'}, + 'first_sequence_number': {'key': 'FirstSequenceNumber', 'type': 'str'}, + 'completed_sequence_number': {'key': 'CompletedSequenceNumber', 'type': 'str'}, + 'committed_sequence_number': {'key': 'CommittedSequenceNumber', 'type': 'str'}, + 'last_sequence_number': {'key': 'LastSequenceNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ReplicatorQueueStatus, self).__init__(**kwargs) + self.queue_utilization_percentage = kwargs.get('queue_utilization_percentage', None) + self.queue_memory_size = kwargs.get('queue_memory_size', None) + self.first_sequence_number = kwargs.get('first_sequence_number', None) + self.completed_sequence_number = kwargs.get('completed_sequence_number', None) + self.committed_sequence_number = kwargs.get('committed_sequence_number', None) + self.last_sequence_number = kwargs.get('last_sequence_number', None) diff --git a/customSDK/servicefabric/models/replicator_queue_status_py3.py b/customSDK/servicefabric/models/replicator_queue_status_py3.py new file mode 100644 index 00000000..112316e9 --- /dev/null +++ b/customSDK/servicefabric/models/replicator_queue_status_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicatorQueueStatus(Model): + """Provides various statistics of the queue used in the service fabric + replicator. + Contains information about the service fabric replicator like the + replication/copy queue utilization, last acknowledgement received + timestamp, etc. + Depending on the role of the replicator, the properties in this type imply + different meanings. + + :param queue_utilization_percentage: Represents the utilization of the + queue. A value of 0 indicates that the queue is empty and a value of 100 + indicates the queue is full. + :type queue_utilization_percentage: int + :param queue_memory_size: Represents the virtual memory consumed by the + queue in bytes. + :type queue_memory_size: str + :param first_sequence_number: On a primary replicator, this is + semantically the sequence number of the operation for which all the + secondary replicas have sent an acknowledgement. + On a secondary replicator, this is the smallest sequence number of the + operation that is present in the queue. + :type first_sequence_number: str + :param completed_sequence_number: On a primary replicator, this is + semantically the highest sequence number of the operation for which all + the secondary replicas have sent an acknowledgement. + On a secondary replicator, this is semantically the highest sequence + number that has been applied to the persistent state. + :type completed_sequence_number: str + :param committed_sequence_number: On a primary replicator, this is + semantically the highest sequence number of the operation for which a + write quorum of the secondary replicas have sent an acknowledgement. + On a secondary replicator, this is semantically the highest sequence + number of the in-order operation received from the primary. + :type committed_sequence_number: str + :param last_sequence_number: Represents the latest sequence number of the + operation that is available in the queue. + :type last_sequence_number: str + """ + + _attribute_map = { + 'queue_utilization_percentage': {'key': 'QueueUtilizationPercentage', 'type': 'int'}, + 'queue_memory_size': {'key': 'QueueMemorySize', 'type': 'str'}, + 'first_sequence_number': {'key': 'FirstSequenceNumber', 'type': 'str'}, + 'completed_sequence_number': {'key': 'CompletedSequenceNumber', 'type': 'str'}, + 'committed_sequence_number': {'key': 'CommittedSequenceNumber', 'type': 'str'}, + 'last_sequence_number': {'key': 'LastSequenceNumber', 'type': 'str'}, + } + + def __init__(self, *, queue_utilization_percentage: int=None, queue_memory_size: str=None, first_sequence_number: str=None, completed_sequence_number: str=None, committed_sequence_number: str=None, last_sequence_number: str=None, **kwargs) -> None: + super(ReplicatorQueueStatus, self).__init__(**kwargs) + self.queue_utilization_percentage = queue_utilization_percentage + self.queue_memory_size = queue_memory_size + self.first_sequence_number = first_sequence_number + self.completed_sequence_number = completed_sequence_number + self.committed_sequence_number = committed_sequence_number + self.last_sequence_number = last_sequence_number diff --git a/customSDK/servicefabric/models/replicator_status.py b/customSDK/servicefabric/models/replicator_status.py new file mode 100644 index 00000000..7e1fb2a6 --- /dev/null +++ b/customSDK/servicefabric/models/replicator_status.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicatorStatus(Model): + """Represents a base class for primary or secondary replicator status. + Contains information about the service fabric replicator like the + replication/copy queue utilization, last acknowledgement received + timestamp, etc. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PrimaryReplicatorStatus, SecondaryReplicatorStatus + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Primary': 'PrimaryReplicatorStatus', 'SecondaryReplicatorStatus': 'SecondaryReplicatorStatus'} + } + + def __init__(self, **kwargs): + super(ReplicatorStatus, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/replicator_status_py3.py b/customSDK/servicefabric/models/replicator_status_py3.py new file mode 100644 index 00000000..b11fc83d --- /dev/null +++ b/customSDK/servicefabric/models/replicator_status_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicatorStatus(Model): + """Represents a base class for primary or secondary replicator status. + Contains information about the service fabric replicator like the + replication/copy queue utilization, last acknowledgement received + timestamp, etc. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PrimaryReplicatorStatus, SecondaryReplicatorStatus + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Primary': 'PrimaryReplicatorStatus', 'SecondaryReplicatorStatus': 'SecondaryReplicatorStatus'} + } + + def __init__(self, **kwargs) -> None: + super(ReplicatorStatus, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/resolved_service_endpoint.py b/customSDK/servicefabric/models/resolved_service_endpoint.py new file mode 100644 index 00000000..2a062502 --- /dev/null +++ b/customSDK/servicefabric/models/resolved_service_endpoint.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResolvedServiceEndpoint(Model): + """Endpoint of a resolved service partition. + + :param kind: The role of the replica where the endpoint is reported. + Possible values include: 'Invalid', 'Stateless', 'StatefulPrimary', + 'StatefulSecondary' + :type kind: str or ~azure.servicefabric.models.ServiceEndpointRole + :param address: The address of the endpoint. If the endpoint has multiple + listeners the address is a JSON object with one property per listener with + the value as the address of that listener. + :type address: str + """ + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResolvedServiceEndpoint, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.address = kwargs.get('address', None) diff --git a/customSDK/servicefabric/models/resolved_service_endpoint_py3.py b/customSDK/servicefabric/models/resolved_service_endpoint_py3.py new file mode 100644 index 00000000..c016e4df --- /dev/null +++ b/customSDK/servicefabric/models/resolved_service_endpoint_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResolvedServiceEndpoint(Model): + """Endpoint of a resolved service partition. + + :param kind: The role of the replica where the endpoint is reported. + Possible values include: 'Invalid', 'Stateless', 'StatefulPrimary', + 'StatefulSecondary' + :type kind: str or ~azure.servicefabric.models.ServiceEndpointRole + :param address: The address of the endpoint. If the endpoint has multiple + listeners the address is a JSON object with one property per listener with + the value as the address of that listener. + :type address: str + """ + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + } + + def __init__(self, *, kind=None, address: str=None, **kwargs) -> None: + super(ResolvedServiceEndpoint, self).__init__(**kwargs) + self.kind = kind + self.address = address diff --git a/customSDK/servicefabric/models/resolved_service_partition.py b/customSDK/servicefabric/models/resolved_service_partition.py new file mode 100644 index 00000000..d788d26d --- /dev/null +++ b/customSDK/servicefabric/models/resolved_service_partition.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResolvedServicePartition(Model): + """Information about a service partition and its associated endpoints. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The full name of the service with 'fabric:' URI + scheme. + :type name: str + :param partition_information: Required. A representation of the resolved + partition. + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param endpoints: Required. List of resolved service endpoints of a + service partition. + :type endpoints: list[~azure.servicefabric.models.ResolvedServiceEndpoint] + :param version: Required. The version of this resolved service partition + result. This version should be passed in the next time the ResolveService + call is made via the PreviousRspVersion query parameter. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'partition_information': {'required': True}, + 'endpoints': {'required': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'endpoints': {'key': 'Endpoints', 'type': '[ResolvedServiceEndpoint]'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResolvedServicePartition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.partition_information = kwargs.get('partition_information', None) + self.endpoints = kwargs.get('endpoints', None) + self.version = kwargs.get('version', None) diff --git a/customSDK/servicefabric/models/resolved_service_partition_py3.py b/customSDK/servicefabric/models/resolved_service_partition_py3.py new file mode 100644 index 00000000..5b26f0f6 --- /dev/null +++ b/customSDK/servicefabric/models/resolved_service_partition_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResolvedServicePartition(Model): + """Information about a service partition and its associated endpoints. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The full name of the service with 'fabric:' URI + scheme. + :type name: str + :param partition_information: Required. A representation of the resolved + partition. + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param endpoints: Required. List of resolved service endpoints of a + service partition. + :type endpoints: list[~azure.servicefabric.models.ResolvedServiceEndpoint] + :param version: Required. The version of this resolved service partition + result. This version should be passed in the next time the ResolveService + call is made via the PreviousRspVersion query parameter. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'partition_information': {'required': True}, + 'endpoints': {'required': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'endpoints': {'key': 'Endpoints', 'type': '[ResolvedServiceEndpoint]'}, + 'version': {'key': 'Version', 'type': 'str'}, + } + + def __init__(self, *, name: str, partition_information, endpoints, version: str, **kwargs) -> None: + super(ResolvedServicePartition, self).__init__(**kwargs) + self.name = name + self.partition_information = partition_information + self.endpoints = endpoints + self.version = version diff --git a/customSDK/servicefabric/models/resource_limits.py b/customSDK/servicefabric/models/resource_limits.py new file mode 100644 index 00000000..9653965c --- /dev/null +++ b/customSDK/servicefabric/models/resource_limits.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceLimits(Model): + """This type describes the resource limits for a given container. It describes + the most amount of resources a container is allowed to use before being + restarted. + + :param memory_in_gb: The memory limit in GB. + :type memory_in_gb: float + :param cpu: CPU limits in cores. At present, only full cores are + supported. + :type cpu: float + """ + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ResourceLimits, self).__init__(**kwargs) + self.memory_in_gb = kwargs.get('memory_in_gb', None) + self.cpu = kwargs.get('cpu', None) diff --git a/customSDK/servicefabric/models/resource_limits_py3.py b/customSDK/servicefabric/models/resource_limits_py3.py new file mode 100644 index 00000000..2817c55a --- /dev/null +++ b/customSDK/servicefabric/models/resource_limits_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceLimits(Model): + """This type describes the resource limits for a given container. It describes + the most amount of resources a container is allowed to use before being + restarted. + + :param memory_in_gb: The memory limit in GB. + :type memory_in_gb: float + :param cpu: CPU limits in cores. At present, only full cores are + supported. + :type cpu: float + """ + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + } + + def __init__(self, *, memory_in_gb: float=None, cpu: float=None, **kwargs) -> None: + super(ResourceLimits, self).__init__(**kwargs) + self.memory_in_gb = memory_in_gb + self.cpu = cpu diff --git a/customSDK/servicefabric/models/resource_requests.py b/customSDK/servicefabric/models/resource_requests.py new file mode 100644 index 00000000..1a1b725a --- /dev/null +++ b/customSDK/servicefabric/models/resource_requests.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceRequests(Model): + """This type describes the requested resources for a given container. It + describes the least amount of resources required for the container. A + container can consume more than requested resources up to the specified + limits before being restarted. Currently, the requested resources are + treated as limits. + + All required parameters must be populated in order to send to Azure. + + :param memory_in_gb: Required. The memory request in GB for this + container. + :type memory_in_gb: float + :param cpu: Required. Requested number of CPU cores. At present, only full + cores are supported. + :type cpu: float + """ + + _validation = { + 'memory_in_gb': {'required': True}, + 'cpu': {'required': True}, + } + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(ResourceRequests, self).__init__(**kwargs) + self.memory_in_gb = kwargs.get('memory_in_gb', None) + self.cpu = kwargs.get('cpu', None) diff --git a/customSDK/servicefabric/models/resource_requests_py3.py b/customSDK/servicefabric/models/resource_requests_py3.py new file mode 100644 index 00000000..ffa43735 --- /dev/null +++ b/customSDK/servicefabric/models/resource_requests_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceRequests(Model): + """This type describes the requested resources for a given container. It + describes the least amount of resources required for the container. A + container can consume more than requested resources up to the specified + limits before being restarted. Currently, the requested resources are + treated as limits. + + All required parameters must be populated in order to send to Azure. + + :param memory_in_gb: Required. The memory request in GB for this + container. + :type memory_in_gb: float + :param cpu: Required. Requested number of CPU cores. At present, only full + cores are supported. + :type cpu: float + """ + + _validation = { + 'memory_in_gb': {'required': True}, + 'cpu': {'required': True}, + } + + _attribute_map = { + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'cpu': {'key': 'cpu', 'type': 'float'}, + } + + def __init__(self, *, memory_in_gb: float, cpu: float, **kwargs) -> None: + super(ResourceRequests, self).__init__(**kwargs) + self.memory_in_gb = memory_in_gb + self.cpu = cpu diff --git a/customSDK/servicefabric/models/resource_requirements.py b/customSDK/servicefabric/models/resource_requirements.py new file mode 100644 index 00000000..e2801572 --- /dev/null +++ b/customSDK/servicefabric/models/resource_requirements.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceRequirements(Model): + """This type describes the resource requirements for a container or a service. + + All required parameters must be populated in order to send to Azure. + + :param requests: Required. Describes the requested resources for a given + container. + :type requests: ~azure.servicefabric.models.ResourceRequests + :param limits: Describes the maximum limits on the resources for a given + container. + :type limits: ~azure.servicefabric.models.ResourceLimits + """ + + _validation = { + 'requests': {'required': True}, + } + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'ResourceRequests'}, + 'limits': {'key': 'limits', 'type': 'ResourceLimits'}, + } + + def __init__(self, **kwargs): + super(ResourceRequirements, self).__init__(**kwargs) + self.requests = kwargs.get('requests', None) + self.limits = kwargs.get('limits', None) diff --git a/customSDK/servicefabric/models/resource_requirements_py3.py b/customSDK/servicefabric/models/resource_requirements_py3.py new file mode 100644 index 00000000..09945aa5 --- /dev/null +++ b/customSDK/servicefabric/models/resource_requirements_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceRequirements(Model): + """This type describes the resource requirements for a container or a service. + + All required parameters must be populated in order to send to Azure. + + :param requests: Required. Describes the requested resources for a given + container. + :type requests: ~azure.servicefabric.models.ResourceRequests + :param limits: Describes the maximum limits on the resources for a given + container. + :type limits: ~azure.servicefabric.models.ResourceLimits + """ + + _validation = { + 'requests': {'required': True}, + } + + _attribute_map = { + 'requests': {'key': 'requests', 'type': 'ResourceRequests'}, + 'limits': {'key': 'limits', 'type': 'ResourceLimits'}, + } + + def __init__(self, *, requests, limits=None, **kwargs) -> None: + super(ResourceRequirements, self).__init__(**kwargs) + self.requests = requests + self.limits = limits diff --git a/customSDK/servicefabric/models/restart_deployed_code_package_description.py b/customSDK/servicefabric/models/restart_deployed_code_package_description.py new file mode 100644 index 00000000..8f2cf708 --- /dev/null +++ b/customSDK/servicefabric/models/restart_deployed_code_package_description.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RestartDeployedCodePackageDescription(Model): + """Defines description for restarting a deployed code package on Service + Fabric node. + + All required parameters must be populated in order to send to Azure. + + :param service_manifest_name: Required. The name of service manifest that + specified this code package. + :type service_manifest_name: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param code_package_name: Required. The name of the code package defined + in the service manifest. + :type code_package_name: str + :param code_package_instance_id: Required. The instance ID for currently + running entry point. For a code package setup entry point (if specified) + runs first and after it finishes main entry point is started. + Each time entry point executable is run, its instance ID will change. If 0 + is passed in as the code package instance ID, the API will restart the + code package with whatever instance ID it is currently running. + If an instance ID other than 0 is passed in, the API will restart the code + package only if the current Instance ID matches the passed in instance ID. + Note, passing in the exact instance ID (not 0) in the API is safer, + because if ensures at most one restart of the code package. + :type code_package_instance_id: str + """ + + _validation = { + 'service_manifest_name': {'required': True}, + 'code_package_name': {'required': True}, + 'code_package_instance_id': {'required': True}, + } + + _attribute_map = { + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'code_package_instance_id': {'key': 'CodePackageInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RestartDeployedCodePackageDescription, self).__init__(**kwargs) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.service_package_activation_id = kwargs.get('service_package_activation_id', None) + self.code_package_name = kwargs.get('code_package_name', None) + self.code_package_instance_id = kwargs.get('code_package_instance_id', None) diff --git a/customSDK/servicefabric/models/restart_deployed_code_package_description_py3.py b/customSDK/servicefabric/models/restart_deployed_code_package_description_py3.py new file mode 100644 index 00000000..6bd67699 --- /dev/null +++ b/customSDK/servicefabric/models/restart_deployed_code_package_description_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RestartDeployedCodePackageDescription(Model): + """Defines description for restarting a deployed code package on Service + Fabric node. + + All required parameters must be populated in order to send to Azure. + + :param service_manifest_name: Required. The name of service manifest that + specified this code package. + :type service_manifest_name: str + :param service_package_activation_id: The ActivationId of a deployed + service package. If ServicePackageActivationMode specified at the time of + creating the service + is 'SharedProcess' (or if it is not specified, in which case it defaults + to 'SharedProcess'), then value of ServicePackageActivationId + is always an empty string. + :type service_package_activation_id: str + :param code_package_name: Required. The name of the code package defined + in the service manifest. + :type code_package_name: str + :param code_package_instance_id: Required. The instance ID for currently + running entry point. For a code package setup entry point (if specified) + runs first and after it finishes main entry point is started. + Each time entry point executable is run, its instance ID will change. If 0 + is passed in as the code package instance ID, the API will restart the + code package with whatever instance ID it is currently running. + If an instance ID other than 0 is passed in, the API will restart the code + package only if the current Instance ID matches the passed in instance ID. + Note, passing in the exact instance ID (not 0) in the API is safer, + because if ensures at most one restart of the code package. + :type code_package_instance_id: str + """ + + _validation = { + 'service_manifest_name': {'required': True}, + 'code_package_name': {'required': True}, + 'code_package_instance_id': {'required': True}, + } + + _attribute_map = { + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, + 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, + 'code_package_instance_id': {'key': 'CodePackageInstanceId', 'type': 'str'}, + } + + def __init__(self, *, service_manifest_name: str, code_package_name: str, code_package_instance_id: str, service_package_activation_id: str=None, **kwargs) -> None: + super(RestartDeployedCodePackageDescription, self).__init__(**kwargs) + self.service_manifest_name = service_manifest_name + self.service_package_activation_id = service_package_activation_id + self.code_package_name = code_package_name + self.code_package_instance_id = code_package_instance_id diff --git a/customSDK/servicefabric/models/restart_node_description.py b/customSDK/servicefabric/models/restart_node_description.py new file mode 100644 index 00000000..f913764a --- /dev/null +++ b/customSDK/servicefabric/models/restart_node_description.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RestartNodeDescription(Model): + """Describes the parameters to restart a Service Fabric node. + + All required parameters must be populated in order to send to Azure. + + :param node_instance_id: Required. The instance ID of the target node. If + instance ID is specified the node is restarted only if it matches with the + current instance of the node. A default value of "0" would match any + instance ID. The instance ID can be obtained using get node query. Default + value: "0" . + :type node_instance_id: str + :param create_fabric_dump: Specify True to create a dump of the fabric + node process. This is case-sensitive. Possible values include: 'False', + 'True'. Default value: "False" . + :type create_fabric_dump: str or + ~azure.servicefabric.models.CreateFabricDump + """ + + _validation = { + 'node_instance_id': {'required': True}, + } + + _attribute_map = { + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + 'create_fabric_dump': {'key': 'CreateFabricDump', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RestartNodeDescription, self).__init__(**kwargs) + self.node_instance_id = kwargs.get('node_instance_id', "0") + self.create_fabric_dump = kwargs.get('create_fabric_dump', "False") diff --git a/customSDK/servicefabric/models/restart_node_description_py3.py b/customSDK/servicefabric/models/restart_node_description_py3.py new file mode 100644 index 00000000..025da598 --- /dev/null +++ b/customSDK/servicefabric/models/restart_node_description_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RestartNodeDescription(Model): + """Describes the parameters to restart a Service Fabric node. + + All required parameters must be populated in order to send to Azure. + + :param node_instance_id: Required. The instance ID of the target node. If + instance ID is specified the node is restarted only if it matches with the + current instance of the node. A default value of "0" would match any + instance ID. The instance ID can be obtained using get node query. Default + value: "0" . + :type node_instance_id: str + :param create_fabric_dump: Specify True to create a dump of the fabric + node process. This is case-sensitive. Possible values include: 'False', + 'True'. Default value: "False" . + :type create_fabric_dump: str or + ~azure.servicefabric.models.CreateFabricDump + """ + + _validation = { + 'node_instance_id': {'required': True}, + } + + _attribute_map = { + 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, + 'create_fabric_dump': {'key': 'CreateFabricDump', 'type': 'str'}, + } + + def __init__(self, *, node_instance_id: str="0", create_fabric_dump="False", **kwargs) -> None: + super(RestartNodeDescription, self).__init__(**kwargs) + self.node_instance_id = node_instance_id + self.create_fabric_dump = create_fabric_dump diff --git a/customSDK/servicefabric/models/restart_partition_result.py b/customSDK/servicefabric/models/restart_partition_result.py new file mode 100644 index 00000000..77acab4c --- /dev/null +++ b/customSDK/servicefabric/models/restart_partition_result.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RestartPartitionResult(Model): + """Represents information about an operation in a terminal state (Completed or + Faulted). + + :param error_code: If OperationState is Completed, this is 0. If + OperationState is Faulted, this is an error code indicating the reason. + :type error_code: int + :param selected_partition: This class returns information about the + partition that the user-induced operation acted upon. + :type selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__(self, **kwargs): + super(RestartPartitionResult, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.selected_partition = kwargs.get('selected_partition', None) diff --git a/customSDK/servicefabric/models/restart_partition_result_py3.py b/customSDK/servicefabric/models/restart_partition_result_py3.py new file mode 100644 index 00000000..0770f448 --- /dev/null +++ b/customSDK/servicefabric/models/restart_partition_result_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RestartPartitionResult(Model): + """Represents information about an operation in a terminal state (Completed or + Faulted). + + :param error_code: If OperationState is Completed, this is 0. If + OperationState is Faulted, this is an error code indicating the reason. + :type error_code: int + :param selected_partition: This class returns information about the + partition that the user-induced operation acted upon. + :type selected_partition: ~azure.servicefabric.models.SelectedPartition + """ + + _attribute_map = { + 'error_code': {'key': 'ErrorCode', 'type': 'int'}, + 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, + } + + def __init__(self, *, error_code: int=None, selected_partition=None, **kwargs) -> None: + super(RestartPartitionResult, self).__init__(**kwargs) + self.error_code = error_code + self.selected_partition = selected_partition diff --git a/customSDK/servicefabric/models/restore_partition_description.py b/customSDK/servicefabric/models/restore_partition_description.py new file mode 100644 index 00000000..f21fb876 --- /dev/null +++ b/customSDK/servicefabric/models/restore_partition_description.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RestorePartitionDescription(Model): + """Specifies the parameters needed to trigger a restore of a specific + partition. + + All required parameters must be populated in order to send to Azure. + + :param backup_id: Required. Unique backup ID. + :type backup_id: str + :param backup_location: Required. Location of the backup relative to the + backup storage specified/ configured. + :type backup_location: str + :param backup_storage: Location of the backup from where the partition + will be restored. + :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription + """ + + _validation = { + 'backup_id': {'required': True}, + 'backup_location': {'required': True}, + } + + _attribute_map = { + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, + } + + def __init__(self, **kwargs): + super(RestorePartitionDescription, self).__init__(**kwargs) + self.backup_id = kwargs.get('backup_id', None) + self.backup_location = kwargs.get('backup_location', None) + self.backup_storage = kwargs.get('backup_storage', None) diff --git a/customSDK/servicefabric/models/restore_partition_description_py3.py b/customSDK/servicefabric/models/restore_partition_description_py3.py new file mode 100644 index 00000000..885a6f4f --- /dev/null +++ b/customSDK/servicefabric/models/restore_partition_description_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RestorePartitionDescription(Model): + """Specifies the parameters needed to trigger a restore of a specific + partition. + + All required parameters must be populated in order to send to Azure. + + :param backup_id: Required. Unique backup ID. + :type backup_id: str + :param backup_location: Required. Location of the backup relative to the + backup storage specified/ configured. + :type backup_location: str + :param backup_storage: Location of the backup from where the partition + will be restored. + :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription + """ + + _validation = { + 'backup_id': {'required': True}, + 'backup_location': {'required': True}, + } + + _attribute_map = { + 'backup_id': {'key': 'BackupId', 'type': 'str'}, + 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, + 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, + } + + def __init__(self, *, backup_id: str, backup_location: str, backup_storage=None, **kwargs) -> None: + super(RestorePartitionDescription, self).__init__(**kwargs) + self.backup_id = backup_id + self.backup_location = backup_location + self.backup_storage = backup_storage diff --git a/customSDK/servicefabric/models/restore_progress_info.py b/customSDK/servicefabric/models/restore_progress_info.py new file mode 100644 index 00000000..9d631925 --- /dev/null +++ b/customSDK/servicefabric/models/restore_progress_info.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RestoreProgressInfo(Model): + """Describes the progress of a restore operation on a partition. + + :param restore_state: Represents the current state of the partition + restore operation. Possible values include: 'Invalid', 'Accepted', + 'RestoreInProgress', 'Success', 'Failure', 'Timeout' + :type restore_state: str or ~azure.servicefabric.models.RestoreState + :param time_stamp_utc: Timestamp when operation succeeded or failed. + :type time_stamp_utc: datetime + :param restored_epoch: Describes the epoch at which the partition is + restored. + :type restored_epoch: ~azure.servicefabric.models.Epoch + :param restored_lsn: Restored LSN. + :type restored_lsn: str + :param failure_error: Denotes the failure encountered in performing + restore operation. + :type failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'restore_state': {'key': 'RestoreState', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'restored_epoch': {'key': 'RestoredEpoch', 'type': 'Epoch'}, + 'restored_lsn': {'key': 'RestoredLsn', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__(self, **kwargs): + super(RestoreProgressInfo, self).__init__(**kwargs) + self.restore_state = kwargs.get('restore_state', None) + self.time_stamp_utc = kwargs.get('time_stamp_utc', None) + self.restored_epoch = kwargs.get('restored_epoch', None) + self.restored_lsn = kwargs.get('restored_lsn', None) + self.failure_error = kwargs.get('failure_error', None) diff --git a/customSDK/servicefabric/models/restore_progress_info_py3.py b/customSDK/servicefabric/models/restore_progress_info_py3.py new file mode 100644 index 00000000..2274e6bd --- /dev/null +++ b/customSDK/servicefabric/models/restore_progress_info_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RestoreProgressInfo(Model): + """Describes the progress of a restore operation on a partition. + + :param restore_state: Represents the current state of the partition + restore operation. Possible values include: 'Invalid', 'Accepted', + 'RestoreInProgress', 'Success', 'Failure', 'Timeout' + :type restore_state: str or ~azure.servicefabric.models.RestoreState + :param time_stamp_utc: Timestamp when operation succeeded or failed. + :type time_stamp_utc: datetime + :param restored_epoch: Describes the epoch at which the partition is + restored. + :type restored_epoch: ~azure.servicefabric.models.Epoch + :param restored_lsn: Restored LSN. + :type restored_lsn: str + :param failure_error: Denotes the failure encountered in performing + restore operation. + :type failure_error: ~azure.servicefabric.models.FabricErrorError + """ + + _attribute_map = { + 'restore_state': {'key': 'RestoreState', 'type': 'str'}, + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'restored_epoch': {'key': 'RestoredEpoch', 'type': 'Epoch'}, + 'restored_lsn': {'key': 'RestoredLsn', 'type': 'str'}, + 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, + } + + def __init__(self, *, restore_state=None, time_stamp_utc=None, restored_epoch=None, restored_lsn: str=None, failure_error=None, **kwargs) -> None: + super(RestoreProgressInfo, self).__init__(**kwargs) + self.restore_state = restore_state + self.time_stamp_utc = time_stamp_utc + self.restored_epoch = restored_epoch + self.restored_lsn = restored_lsn + self.failure_error = failure_error diff --git a/customSDK/servicefabric/models/resume_application_upgrade_description.py b/customSDK/servicefabric/models/resume_application_upgrade_description.py new file mode 100644 index 00000000..ab0851cc --- /dev/null +++ b/customSDK/servicefabric/models/resume_application_upgrade_description.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResumeApplicationUpgradeDescription(Model): + """Describes the parameters for resuming an unmonitored manual Service Fabric + application upgrade. + + All required parameters must be populated in order to send to Azure. + + :param upgrade_domain_name: Required. The name of the upgrade domain in + which to resume the upgrade. + :type upgrade_domain_name: str + """ + + _validation = { + 'upgrade_domain_name': {'required': True}, + } + + _attribute_map = { + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResumeApplicationUpgradeDescription, self).__init__(**kwargs) + self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) diff --git a/customSDK/servicefabric/models/resume_application_upgrade_description_py3.py b/customSDK/servicefabric/models/resume_application_upgrade_description_py3.py new file mode 100644 index 00000000..7b0aaf39 --- /dev/null +++ b/customSDK/servicefabric/models/resume_application_upgrade_description_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResumeApplicationUpgradeDescription(Model): + """Describes the parameters for resuming an unmonitored manual Service Fabric + application upgrade. + + All required parameters must be populated in order to send to Azure. + + :param upgrade_domain_name: Required. The name of the upgrade domain in + which to resume the upgrade. + :type upgrade_domain_name: str + """ + + _validation = { + 'upgrade_domain_name': {'required': True}, + } + + _attribute_map = { + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + } + + def __init__(self, *, upgrade_domain_name: str, **kwargs) -> None: + super(ResumeApplicationUpgradeDescription, self).__init__(**kwargs) + self.upgrade_domain_name = upgrade_domain_name diff --git a/customSDK/servicefabric/models/resume_cluster_upgrade_description.py b/customSDK/servicefabric/models/resume_cluster_upgrade_description.py new file mode 100644 index 00000000..2cd5ab0c --- /dev/null +++ b/customSDK/servicefabric/models/resume_cluster_upgrade_description.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResumeClusterUpgradeDescription(Model): + """Describes the parameters for resuming a cluster upgrade. + + All required parameters must be populated in order to send to Azure. + + :param upgrade_domain: Required. The next upgrade domain for this cluster + upgrade. + :type upgrade_domain: str + """ + + _validation = { + 'upgrade_domain': {'required': True}, + } + + _attribute_map = { + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResumeClusterUpgradeDescription, self).__init__(**kwargs) + self.upgrade_domain = kwargs.get('upgrade_domain', None) diff --git a/customSDK/servicefabric/models/resume_cluster_upgrade_description_py3.py b/customSDK/servicefabric/models/resume_cluster_upgrade_description_py3.py new file mode 100644 index 00000000..933f0bf1 --- /dev/null +++ b/customSDK/servicefabric/models/resume_cluster_upgrade_description_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResumeClusterUpgradeDescription(Model): + """Describes the parameters for resuming a cluster upgrade. + + All required parameters must be populated in order to send to Azure. + + :param upgrade_domain: Required. The next upgrade domain for this cluster + upgrade. + :type upgrade_domain: str + """ + + _validation = { + 'upgrade_domain': {'required': True}, + } + + _attribute_map = { + 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, + } + + def __init__(self, *, upgrade_domain: str, **kwargs) -> None: + super(ResumeClusterUpgradeDescription, self).__init__(**kwargs) + self.upgrade_domain = upgrade_domain diff --git a/customSDK/servicefabric/models/retention_policy_description.py b/customSDK/servicefabric/models/retention_policy_description.py new file mode 100644 index 00000000..b1a6a7df --- /dev/null +++ b/customSDK/servicefabric/models/retention_policy_description.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RetentionPolicyDescription(Model): + """Describes the retention policy configured. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BasicRetentionPolicyDescription + + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. + :type retention_policy_type: str + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, + } + + _subtype_map = { + 'retention_policy_type': {'Basic': 'BasicRetentionPolicyDescription'} + } + + def __init__(self, **kwargs): + super(RetentionPolicyDescription, self).__init__(**kwargs) + self.retention_policy_type = None diff --git a/customSDK/servicefabric/models/retention_policy_description_py3.py b/customSDK/servicefabric/models/retention_policy_description_py3.py new file mode 100644 index 00000000..6f775cf7 --- /dev/null +++ b/customSDK/servicefabric/models/retention_policy_description_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RetentionPolicyDescription(Model): + """Describes the retention policy configured. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BasicRetentionPolicyDescription + + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. + :type retention_policy_type: str + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, + } + + _subtype_map = { + 'retention_policy_type': {'Basic': 'BasicRetentionPolicyDescription'} + } + + def __init__(self, **kwargs) -> None: + super(RetentionPolicyDescription, self).__init__(**kwargs) + self.retention_policy_type = None diff --git a/customSDK/servicefabric/models/rolling_upgrade_update_description.py b/customSDK/servicefabric/models/rolling_upgrade_update_description.py new file mode 100644 index 00000000..1d4b05de --- /dev/null +++ b/customSDK/servicefabric/models/rolling_upgrade_update_description.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RollingUpgradeUpdateDescription(Model): + """Describes the parameters for updating a rolling upgrade of application or + cluster. + + All required parameters must be populated in order to send to Azure. + + :param rolling_upgrade_mode: Required. The mode used to monitor health + during a rolling upgrade. The values are UnmonitoredAuto, + UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible values + include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', + 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param replica_set_check_timeout_in_milliseconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type replica_set_check_timeout_in_milliseconds: long + :param failure_action: The compensating action to perform when a Monitored + upgrade encounters monitoring policy or health policy violations. + Invalid indicates the failure action is invalid. Rollback specifies that + the upgrade will start rolling back automatically. + Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + :type failure_action: str or ~azure.servicefabric.models.FailureAction + :param health_check_wait_duration_in_milliseconds: The amount of time to + wait after completing an upgrade domain before applying health policies. + It is first interpreted as a string representing an ISO 8601 duration. If + that fails, then it is interpreted as a number representing the total + number of milliseconds. + :type health_check_wait_duration_in_milliseconds: str + :param health_check_stable_duration_in_milliseconds: The amount of time + that the application or cluster must remain healthy before the upgrade + proceeds to the next upgrade domain. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type health_check_stable_duration_in_milliseconds: str + :param health_check_retry_timeout_in_milliseconds: The amount of time to + retry health evaluation when the application or cluster is unhealthy + before FailureAction is executed. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type health_check_retry_timeout_in_milliseconds: str + :param upgrade_timeout_in_milliseconds: The amount of time the overall + upgrade has to complete before FailureAction is executed. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, + then it is interpreted as a number representing the total number of + milliseconds. + :type upgrade_timeout_in_milliseconds: str + :param upgrade_domain_timeout_in_milliseconds: The amount of time each + upgrade domain has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + :type upgrade_domain_timeout_in_milliseconds: str + :param instance_close_delay_duration_in_seconds: Duration in seconds, to + wait before a stateless instance is closed, to allow the active requests + to drain gracefully. This would be effective when the instance is closing + during the application/cluster + upgrade, only for those instances which have a non-zero delay duration + configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is + 4294967295, which indicates that the behavior will entirely depend on the + delay configured in the stateless service description. + :type instance_close_delay_duration_in_seconds: long + """ + + _validation = { + 'rolling_upgrade_mode': {'required': True}, + } + + _attribute_map = { + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'replica_set_check_timeout_in_milliseconds': {'key': 'ReplicaSetCheckTimeoutInMilliseconds', 'type': 'long'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, + 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, + 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(RollingUpgradeUpdateDescription, self).__init__(**kwargs) + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.force_restart = kwargs.get('force_restart', None) + self.replica_set_check_timeout_in_milliseconds = kwargs.get('replica_set_check_timeout_in_milliseconds', None) + self.failure_action = kwargs.get('failure_action', None) + self.health_check_wait_duration_in_milliseconds = kwargs.get('health_check_wait_duration_in_milliseconds', None) + self.health_check_stable_duration_in_milliseconds = kwargs.get('health_check_stable_duration_in_milliseconds', None) + self.health_check_retry_timeout_in_milliseconds = kwargs.get('health_check_retry_timeout_in_milliseconds', None) + self.upgrade_timeout_in_milliseconds = kwargs.get('upgrade_timeout_in_milliseconds', None) + self.upgrade_domain_timeout_in_milliseconds = kwargs.get('upgrade_domain_timeout_in_milliseconds', None) + self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', None) diff --git a/customSDK/servicefabric/models/rolling_upgrade_update_description_py3.py b/customSDK/servicefabric/models/rolling_upgrade_update_description_py3.py new file mode 100644 index 00000000..2a357bce --- /dev/null +++ b/customSDK/servicefabric/models/rolling_upgrade_update_description_py3.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RollingUpgradeUpdateDescription(Model): + """Describes the parameters for updating a rolling upgrade of application or + cluster. + + All required parameters must be populated in order to send to Azure. + + :param rolling_upgrade_mode: Required. The mode used to monitor health + during a rolling upgrade. The values are UnmonitoredAuto, + UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible values + include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', + 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param replica_set_check_timeout_in_milliseconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type replica_set_check_timeout_in_milliseconds: long + :param failure_action: The compensating action to perform when a Monitored + upgrade encounters monitoring policy or health policy violations. + Invalid indicates the failure action is invalid. Rollback specifies that + the upgrade will start rolling back automatically. + Manual indicates that the upgrade will switch to UnmonitoredManual upgrade + mode. Possible values include: 'Invalid', 'Rollback', 'Manual' + :type failure_action: str or ~azure.servicefabric.models.FailureAction + :param health_check_wait_duration_in_milliseconds: The amount of time to + wait after completing an upgrade domain before applying health policies. + It is first interpreted as a string representing an ISO 8601 duration. If + that fails, then it is interpreted as a number representing the total + number of milliseconds. + :type health_check_wait_duration_in_milliseconds: str + :param health_check_stable_duration_in_milliseconds: The amount of time + that the application or cluster must remain healthy before the upgrade + proceeds to the next upgrade domain. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type health_check_stable_duration_in_milliseconds: str + :param health_check_retry_timeout_in_milliseconds: The amount of time to + retry health evaluation when the application or cluster is unhealthy + before FailureAction is executed. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + :type health_check_retry_timeout_in_milliseconds: str + :param upgrade_timeout_in_milliseconds: The amount of time the overall + upgrade has to complete before FailureAction is executed. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, + then it is interpreted as a number representing the total number of + milliseconds. + :type upgrade_timeout_in_milliseconds: str + :param upgrade_domain_timeout_in_milliseconds: The amount of time each + upgrade domain has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + :type upgrade_domain_timeout_in_milliseconds: str + :param instance_close_delay_duration_in_seconds: Duration in seconds, to + wait before a stateless instance is closed, to allow the active requests + to drain gracefully. This would be effective when the instance is closing + during the application/cluster + upgrade, only for those instances which have a non-zero delay duration + configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is + 4294967295, which indicates that the behavior will entirely depend on the + delay configured in the stateless service description. + :type instance_close_delay_duration_in_seconds: long + """ + + _validation = { + 'rolling_upgrade_mode': {'required': True}, + } + + _attribute_map = { + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'replica_set_check_timeout_in_milliseconds': {'key': 'ReplicaSetCheckTimeoutInMilliseconds', 'type': 'long'}, + 'failure_action': {'key': 'FailureAction', 'type': 'str'}, + 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, + 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, + 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, + 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + } + + def __init__(self, *, rolling_upgrade_mode="UnmonitoredAuto", force_restart: bool=None, replica_set_check_timeout_in_milliseconds: int=None, failure_action=None, health_check_wait_duration_in_milliseconds: str=None, health_check_stable_duration_in_milliseconds: str=None, health_check_retry_timeout_in_milliseconds: str=None, upgrade_timeout_in_milliseconds: str=None, upgrade_domain_timeout_in_milliseconds: str=None, instance_close_delay_duration_in_seconds: int=None, **kwargs) -> None: + super(RollingUpgradeUpdateDescription, self).__init__(**kwargs) + self.rolling_upgrade_mode = rolling_upgrade_mode + self.force_restart = force_restart + self.replica_set_check_timeout_in_milliseconds = replica_set_check_timeout_in_milliseconds + self.failure_action = failure_action + self.health_check_wait_duration_in_milliseconds = health_check_wait_duration_in_milliseconds + self.health_check_stable_duration_in_milliseconds = health_check_stable_duration_in_milliseconds + self.health_check_retry_timeout_in_milliseconds = health_check_retry_timeout_in_milliseconds + self.upgrade_timeout_in_milliseconds = upgrade_timeout_in_milliseconds + self.upgrade_domain_timeout_in_milliseconds = upgrade_domain_timeout_in_milliseconds + self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds diff --git a/customSDK/servicefabric/models/run_to_completion_execution_policy.py b/customSDK/servicefabric/models/run_to_completion_execution_policy.py new file mode 100644 index 00000000..1ee4222e --- /dev/null +++ b/customSDK/servicefabric/models/run_to_completion_execution_policy.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .execution_policy import ExecutionPolicy + + +class RunToCompletionExecutionPolicy(ExecutionPolicy): + """The run to completion execution policy, the service will perform its + desired operation and complete successfully. If the service encounters + failure, it will restarted based on restart policy specified. If the + service completes its operation successfully, it will not be restarted + again. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param restart: Required. Enumerates the restart policy for + RunToCompletionExecutionPolicy. Possible values include: 'OnFailure', + 'Never' + :type restart: str or ~azure.servicefabric.models.RestartPolicy + """ + + _validation = { + 'type': {'required': True}, + 'restart': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'restart': {'key': 'restart', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunToCompletionExecutionPolicy, self).__init__(**kwargs) + self.restart = kwargs.get('restart', None) + self.type = 'RunToCompletion' diff --git a/customSDK/servicefabric/models/run_to_completion_execution_policy_py3.py b/customSDK/servicefabric/models/run_to_completion_execution_policy_py3.py new file mode 100644 index 00000000..9304ae5a --- /dev/null +++ b/customSDK/servicefabric/models/run_to_completion_execution_policy_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .execution_policy_py3 import ExecutionPolicy + + +class RunToCompletionExecutionPolicy(ExecutionPolicy): + """The run to completion execution policy, the service will perform its + desired operation and complete successfully. If the service encounters + failure, it will restarted based on restart policy specified. If the + service completes its operation successfully, it will not be restarted + again. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param restart: Required. Enumerates the restart policy for + RunToCompletionExecutionPolicy. Possible values include: 'OnFailure', + 'Never' + :type restart: str or ~azure.servicefabric.models.RestartPolicy + """ + + _validation = { + 'type': {'required': True}, + 'restart': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'restart': {'key': 'restart', 'type': 'str'}, + } + + def __init__(self, *, restart, **kwargs) -> None: + super(RunToCompletionExecutionPolicy, self).__init__(**kwargs) + self.restart = restart + self.type = 'RunToCompletion' diff --git a/customSDK/servicefabric/models/safety_check.py b/customSDK/servicefabric/models/safety_check.py new file mode 100644 index 00000000..5d2898fc --- /dev/null +++ b/customSDK/servicefabric/models/safety_check.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SafetyCheck(Model): + """Represents a safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service + and the reliability of the state. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionSafetyCheck, SeedNodeSafetyCheck + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'PartitionSafetyCheck': 'PartitionSafetyCheck', 'EnsureSeedNodeQuorum': 'SeedNodeSafetyCheck'} + } + + def __init__(self, **kwargs): + super(SafetyCheck, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/safety_check_py3.py b/customSDK/servicefabric/models/safety_check_py3.py new file mode 100644 index 00000000..b4c48b89 --- /dev/null +++ b/customSDK/servicefabric/models/safety_check_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SafetyCheck(Model): + """Represents a safety check performed by service fabric before continuing + with the operations. These checks ensure the availability of the service + and the reliability of the state. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionSafetyCheck, SeedNodeSafetyCheck + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'PartitionSafetyCheck': 'PartitionSafetyCheck', 'EnsureSeedNodeQuorum': 'SeedNodeSafetyCheck'} + } + + def __init__(self, **kwargs) -> None: + super(SafetyCheck, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/safety_check_wrapper.py b/customSDK/servicefabric/models/safety_check_wrapper.py new file mode 100644 index 00000000..7307dd6d --- /dev/null +++ b/customSDK/servicefabric/models/safety_check_wrapper.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SafetyCheckWrapper(Model): + """A wrapper for the safety check object. Safety checks are performed by + service fabric before continuing with the operations. These checks ensure + the availability of the service and the reliability of the state. + + :param safety_check: Represents a safety check performed by service fabric + before continuing with the operations. These checks ensure the + availability of the service and the reliability of the state. + :type safety_check: ~azure.servicefabric.models.SafetyCheck + """ + + _attribute_map = { + 'safety_check': {'key': 'SafetyCheck', 'type': 'SafetyCheck'}, + } + + def __init__(self, **kwargs): + super(SafetyCheckWrapper, self).__init__(**kwargs) + self.safety_check = kwargs.get('safety_check', None) diff --git a/customSDK/servicefabric/models/safety_check_wrapper_py3.py b/customSDK/servicefabric/models/safety_check_wrapper_py3.py new file mode 100644 index 00000000..92f85690 --- /dev/null +++ b/customSDK/servicefabric/models/safety_check_wrapper_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SafetyCheckWrapper(Model): + """A wrapper for the safety check object. Safety checks are performed by + service fabric before continuing with the operations. These checks ensure + the availability of the service and the reliability of the state. + + :param safety_check: Represents a safety check performed by service fabric + before continuing with the operations. These checks ensure the + availability of the service and the reliability of the state. + :type safety_check: ~azure.servicefabric.models.SafetyCheck + """ + + _attribute_map = { + 'safety_check': {'key': 'SafetyCheck', 'type': 'SafetyCheck'}, + } + + def __init__(self, *, safety_check=None, **kwargs) -> None: + super(SafetyCheckWrapper, self).__init__(**kwargs) + self.safety_check = safety_check diff --git a/customSDK/servicefabric/models/scaling_mechanism_description.py b/customSDK/servicefabric/models/scaling_mechanism_description.py new file mode 100644 index 00000000..f08e3a9a --- /dev/null +++ b/customSDK/servicefabric/models/scaling_mechanism_description.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScalingMechanismDescription(Model): + """Describes the mechanism for performing a scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionInstanceCountScaleMechanism, + AddRemoveIncrementalNamedPartitionScalingMechanism + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'PartitionInstanceCount': 'PartitionInstanceCountScaleMechanism', 'AddRemoveIncrementalNamedPartition': 'AddRemoveIncrementalNamedPartitionScalingMechanism'} + } + + def __init__(self, **kwargs): + super(ScalingMechanismDescription, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/scaling_mechanism_description_py3.py b/customSDK/servicefabric/models/scaling_mechanism_description_py3.py new file mode 100644 index 00000000..f71c38e7 --- /dev/null +++ b/customSDK/servicefabric/models/scaling_mechanism_description_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScalingMechanismDescription(Model): + """Describes the mechanism for performing a scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartitionInstanceCountScaleMechanism, + AddRemoveIncrementalNamedPartitionScalingMechanism + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'PartitionInstanceCount': 'PartitionInstanceCountScaleMechanism', 'AddRemoveIncrementalNamedPartition': 'AddRemoveIncrementalNamedPartitionScalingMechanism'} + } + + def __init__(self, **kwargs) -> None: + super(ScalingMechanismDescription, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/scaling_policy_description.py b/customSDK/servicefabric/models/scaling_policy_description.py new file mode 100644 index 00000000..28c61ba6 --- /dev/null +++ b/customSDK/servicefabric/models/scaling_policy_description.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScalingPolicyDescription(Model): + """Describes how the scaling should be performed. + + All required parameters must be populated in order to send to Azure. + + :param scaling_trigger: Required. Specifies the trigger associated with + this scaling policy + :type scaling_trigger: + ~azure.servicefabric.models.ScalingTriggerDescription + :param scaling_mechanism: Required. Specifies the mechanism associated + with this scaling policy + :type scaling_mechanism: + ~azure.servicefabric.models.ScalingMechanismDescription + """ + + _validation = { + 'scaling_trigger': {'required': True}, + 'scaling_mechanism': {'required': True}, + } + + _attribute_map = { + 'scaling_trigger': {'key': 'ScalingTrigger', 'type': 'ScalingTriggerDescription'}, + 'scaling_mechanism': {'key': 'ScalingMechanism', 'type': 'ScalingMechanismDescription'}, + } + + def __init__(self, **kwargs): + super(ScalingPolicyDescription, self).__init__(**kwargs) + self.scaling_trigger = kwargs.get('scaling_trigger', None) + self.scaling_mechanism = kwargs.get('scaling_mechanism', None) diff --git a/customSDK/servicefabric/models/scaling_policy_description_py3.py b/customSDK/servicefabric/models/scaling_policy_description_py3.py new file mode 100644 index 00000000..1e923ce6 --- /dev/null +++ b/customSDK/servicefabric/models/scaling_policy_description_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScalingPolicyDescription(Model): + """Describes how the scaling should be performed. + + All required parameters must be populated in order to send to Azure. + + :param scaling_trigger: Required. Specifies the trigger associated with + this scaling policy + :type scaling_trigger: + ~azure.servicefabric.models.ScalingTriggerDescription + :param scaling_mechanism: Required. Specifies the mechanism associated + with this scaling policy + :type scaling_mechanism: + ~azure.servicefabric.models.ScalingMechanismDescription + """ + + _validation = { + 'scaling_trigger': {'required': True}, + 'scaling_mechanism': {'required': True}, + } + + _attribute_map = { + 'scaling_trigger': {'key': 'ScalingTrigger', 'type': 'ScalingTriggerDescription'}, + 'scaling_mechanism': {'key': 'ScalingMechanism', 'type': 'ScalingMechanismDescription'}, + } + + def __init__(self, *, scaling_trigger, scaling_mechanism, **kwargs) -> None: + super(ScalingPolicyDescription, self).__init__(**kwargs) + self.scaling_trigger = scaling_trigger + self.scaling_mechanism = scaling_mechanism diff --git a/customSDK/servicefabric/models/scaling_trigger_description.py b/customSDK/servicefabric/models/scaling_trigger_description.py new file mode 100644 index 00000000..e09f6977 --- /dev/null +++ b/customSDK/servicefabric/models/scaling_trigger_description.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScalingTriggerDescription(Model): + """Describes the trigger for performing a scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AveragePartitionLoadScalingTrigger, + AverageServiceLoadScalingTrigger + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AveragePartitionLoad': 'AveragePartitionLoadScalingTrigger', 'AverageServiceLoad': 'AverageServiceLoadScalingTrigger'} + } + + def __init__(self, **kwargs): + super(ScalingTriggerDescription, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/scaling_trigger_description_py3.py b/customSDK/servicefabric/models/scaling_trigger_description_py3.py new file mode 100644 index 00000000..1ace26b8 --- /dev/null +++ b/customSDK/servicefabric/models/scaling_trigger_description_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScalingTriggerDescription(Model): + """Describes the trigger for performing a scaling operation. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AveragePartitionLoadScalingTrigger, + AverageServiceLoadScalingTrigger + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AveragePartitionLoad': 'AveragePartitionLoadScalingTrigger', 'AverageServiceLoad': 'AverageServiceLoadScalingTrigger'} + } + + def __init__(self, **kwargs) -> None: + super(ScalingTriggerDescription, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/secondary_active_replicator_status.py b/customSDK/servicefabric/models/secondary_active_replicator_status.py new file mode 100644 index 00000000..cd688dda --- /dev/null +++ b/customSDK/servicefabric/models/secondary_active_replicator_status.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .secondary_replicator_status import SecondaryReplicatorStatus + + +class SecondaryActiveReplicatorStatus(SecondaryReplicatorStatus): + """Status of the secondary replicator when it is in active mode and is part of + the replica set. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param replication_queue_status: Details about the replication queue on + the secondary replicator. + :type replication_queue_status: + ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_replication_operation_received_time_utc: The last time-stamp + (UTC) at which a replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation + message was never received. + :type last_replication_operation_received_time_utc: datetime + :param is_in_build: Value that indicates whether the replica is currently + being built. + :type is_in_build: bool + :param copy_queue_status: Details about the copy queue on the secondary + replicator. + :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at + which a copy operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation + message was never received. + :type last_copy_operation_received_time_utc: datetime + :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at + which an acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment + message was never sent. + :type last_acknowledgement_sent_time_utc: datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SecondaryActiveReplicatorStatus, self).__init__(**kwargs) + self.kind = 'ActiveSecondary' diff --git a/customSDK/servicefabric/models/secondary_active_replicator_status_py3.py b/customSDK/servicefabric/models/secondary_active_replicator_status_py3.py new file mode 100644 index 00000000..4449ac06 --- /dev/null +++ b/customSDK/servicefabric/models/secondary_active_replicator_status_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .secondary_replicator_status_py3 import SecondaryReplicatorStatus + + +class SecondaryActiveReplicatorStatus(SecondaryReplicatorStatus): + """Status of the secondary replicator when it is in active mode and is part of + the replica set. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param replication_queue_status: Details about the replication queue on + the secondary replicator. + :type replication_queue_status: + ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_replication_operation_received_time_utc: The last time-stamp + (UTC) at which a replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation + message was never received. + :type last_replication_operation_received_time_utc: datetime + :param is_in_build: Value that indicates whether the replica is currently + being built. + :type is_in_build: bool + :param copy_queue_status: Details about the copy queue on the secondary + replicator. + :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at + which a copy operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation + message was never received. + :type last_copy_operation_received_time_utc: datetime + :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at + which an acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment + message was never sent. + :type last_acknowledgement_sent_time_utc: datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, *, replication_queue_status=None, last_replication_operation_received_time_utc=None, is_in_build: bool=None, copy_queue_status=None, last_copy_operation_received_time_utc=None, last_acknowledgement_sent_time_utc=None, **kwargs) -> None: + super(SecondaryActiveReplicatorStatus, self).__init__(replication_queue_status=replication_queue_status, last_replication_operation_received_time_utc=last_replication_operation_received_time_utc, is_in_build=is_in_build, copy_queue_status=copy_queue_status, last_copy_operation_received_time_utc=last_copy_operation_received_time_utc, last_acknowledgement_sent_time_utc=last_acknowledgement_sent_time_utc, **kwargs) + self.kind = 'ActiveSecondary' diff --git a/customSDK/servicefabric/models/secondary_idle_replicator_status.py b/customSDK/servicefabric/models/secondary_idle_replicator_status.py new file mode 100644 index 00000000..c74ee00a --- /dev/null +++ b/customSDK/servicefabric/models/secondary_idle_replicator_status.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .secondary_replicator_status import SecondaryReplicatorStatus + + +class SecondaryIdleReplicatorStatus(SecondaryReplicatorStatus): + """Status of the secondary replicator when it is in idle mode and is being + built by the primary. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param replication_queue_status: Details about the replication queue on + the secondary replicator. + :type replication_queue_status: + ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_replication_operation_received_time_utc: The last time-stamp + (UTC) at which a replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation + message was never received. + :type last_replication_operation_received_time_utc: datetime + :param is_in_build: Value that indicates whether the replica is currently + being built. + :type is_in_build: bool + :param copy_queue_status: Details about the copy queue on the secondary + replicator. + :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at + which a copy operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation + message was never received. + :type last_copy_operation_received_time_utc: datetime + :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at + which an acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment + message was never sent. + :type last_acknowledgement_sent_time_utc: datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SecondaryIdleReplicatorStatus, self).__init__(**kwargs) + self.kind = 'IdleSecondary' diff --git a/customSDK/servicefabric/models/secondary_idle_replicator_status_py3.py b/customSDK/servicefabric/models/secondary_idle_replicator_status_py3.py new file mode 100644 index 00000000..3458cc34 --- /dev/null +++ b/customSDK/servicefabric/models/secondary_idle_replicator_status_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .secondary_replicator_status_py3 import SecondaryReplicatorStatus + + +class SecondaryIdleReplicatorStatus(SecondaryReplicatorStatus): + """Status of the secondary replicator when it is in idle mode and is being + built by the primary. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param replication_queue_status: Details about the replication queue on + the secondary replicator. + :type replication_queue_status: + ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_replication_operation_received_time_utc: The last time-stamp + (UTC) at which a replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation + message was never received. + :type last_replication_operation_received_time_utc: datetime + :param is_in_build: Value that indicates whether the replica is currently + being built. + :type is_in_build: bool + :param copy_queue_status: Details about the copy queue on the secondary + replicator. + :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at + which a copy operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation + message was never received. + :type last_copy_operation_received_time_utc: datetime + :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at + which an acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment + message was never sent. + :type last_acknowledgement_sent_time_utc: datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + def __init__(self, *, replication_queue_status=None, last_replication_operation_received_time_utc=None, is_in_build: bool=None, copy_queue_status=None, last_copy_operation_received_time_utc=None, last_acknowledgement_sent_time_utc=None, **kwargs) -> None: + super(SecondaryIdleReplicatorStatus, self).__init__(replication_queue_status=replication_queue_status, last_replication_operation_received_time_utc=last_replication_operation_received_time_utc, is_in_build=is_in_build, copy_queue_status=copy_queue_status, last_copy_operation_received_time_utc=last_copy_operation_received_time_utc, last_acknowledgement_sent_time_utc=last_acknowledgement_sent_time_utc, **kwargs) + self.kind = 'IdleSecondary' diff --git a/customSDK/servicefabric/models/secondary_replicator_status.py b/customSDK/servicefabric/models/secondary_replicator_status.py new file mode 100644 index 00000000..53744ac5 --- /dev/null +++ b/customSDK/servicefabric/models/secondary_replicator_status.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replicator_status import ReplicatorStatus + + +class SecondaryReplicatorStatus(ReplicatorStatus): + """Provides statistics about the Service Fabric Replicator, when it is + functioning in a ActiveSecondary role. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecondaryActiveReplicatorStatus, + SecondaryIdleReplicatorStatus + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param replication_queue_status: Details about the replication queue on + the secondary replicator. + :type replication_queue_status: + ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_replication_operation_received_time_utc: The last time-stamp + (UTC) at which a replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation + message was never received. + :type last_replication_operation_received_time_utc: datetime + :param is_in_build: Value that indicates whether the replica is currently + being built. + :type is_in_build: bool + :param copy_queue_status: Details about the copy queue on the secondary + replicator. + :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at + which a copy operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation + message was never received. + :type last_copy_operation_received_time_utc: datetime + :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at + which an acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment + message was never sent. + :type last_acknowledgement_sent_time_utc: datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + _subtype_map = { + 'kind': {'ActiveSecondary': 'SecondaryActiveReplicatorStatus', 'IdleSecondary': 'SecondaryIdleReplicatorStatus'} + } + + def __init__(self, **kwargs): + super(SecondaryReplicatorStatus, self).__init__(**kwargs) + self.replication_queue_status = kwargs.get('replication_queue_status', None) + self.last_replication_operation_received_time_utc = kwargs.get('last_replication_operation_received_time_utc', None) + self.is_in_build = kwargs.get('is_in_build', None) + self.copy_queue_status = kwargs.get('copy_queue_status', None) + self.last_copy_operation_received_time_utc = kwargs.get('last_copy_operation_received_time_utc', None) + self.last_acknowledgement_sent_time_utc = kwargs.get('last_acknowledgement_sent_time_utc', None) + self.kind = 'SecondaryReplicatorStatus' diff --git a/customSDK/servicefabric/models/secondary_replicator_status_py3.py b/customSDK/servicefabric/models/secondary_replicator_status_py3.py new file mode 100644 index 00000000..3111c98e --- /dev/null +++ b/customSDK/servicefabric/models/secondary_replicator_status_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replicator_status_py3 import ReplicatorStatus + + +class SecondaryReplicatorStatus(ReplicatorStatus): + """Provides statistics about the Service Fabric Replicator, when it is + functioning in a ActiveSecondary role. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecondaryActiveReplicatorStatus, + SecondaryIdleReplicatorStatus + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param replication_queue_status: Details about the replication queue on + the secondary replicator. + :type replication_queue_status: + ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_replication_operation_received_time_utc: The last time-stamp + (UTC) at which a replication operation was received from the primary. + UTC 0 represents an invalid value, indicating that a replication operation + message was never received. + :type last_replication_operation_received_time_utc: datetime + :param is_in_build: Value that indicates whether the replica is currently + being built. + :type is_in_build: bool + :param copy_queue_status: Details about the copy queue on the secondary + replicator. + :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus + :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at + which a copy operation was received from the primary. + UTC 0 represents an invalid value, indicating that a copy operation + message was never received. + :type last_copy_operation_received_time_utc: datetime + :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at + which an acknowledgment was sent to the primary replicator. + UTC 0 represents an invalid value, indicating that an acknowledgment + message was never sent. + :type last_acknowledgement_sent_time_utc: datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, + 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, + 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, + 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, + } + + _subtype_map = { + 'kind': {'ActiveSecondary': 'SecondaryActiveReplicatorStatus', 'IdleSecondary': 'SecondaryIdleReplicatorStatus'} + } + + def __init__(self, *, replication_queue_status=None, last_replication_operation_received_time_utc=None, is_in_build: bool=None, copy_queue_status=None, last_copy_operation_received_time_utc=None, last_acknowledgement_sent_time_utc=None, **kwargs) -> None: + super(SecondaryReplicatorStatus, self).__init__(**kwargs) + self.replication_queue_status = replication_queue_status + self.last_replication_operation_received_time_utc = last_replication_operation_received_time_utc + self.is_in_build = is_in_build + self.copy_queue_status = copy_queue_status + self.last_copy_operation_received_time_utc = last_copy_operation_received_time_utc + self.last_acknowledgement_sent_time_utc = last_acknowledgement_sent_time_utc + self.kind = 'SecondaryReplicatorStatus' diff --git a/customSDK/servicefabric/models/secret_resource_description.py b/customSDK/servicefabric/models/secret_resource_description.py new file mode 100644 index 00000000..a4e41012 --- /dev/null +++ b/customSDK/servicefabric/models/secret_resource_description.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SecretResourceDescription(Model): + """This type describes a secret resource. + + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Describes the properties of a secret + resource. + :type properties: ~azure.servicefabric.models.SecretResourceProperties + :param name: Required. Name of the Secret resource. + :type name: str + """ + + _validation = { + 'properties': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'SecretResourceProperties'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretResourceDescription, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/secret_resource_description_py3.py b/customSDK/servicefabric/models/secret_resource_description_py3.py new file mode 100644 index 00000000..c31454aa --- /dev/null +++ b/customSDK/servicefabric/models/secret_resource_description_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SecretResourceDescription(Model): + """This type describes a secret resource. + + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Describes the properties of a secret + resource. + :type properties: ~azure.servicefabric.models.SecretResourceProperties + :param name: Required. Name of the Secret resource. + :type name: str + """ + + _validation = { + 'properties': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'SecretResourceProperties'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, properties, name: str, **kwargs) -> None: + super(SecretResourceDescription, self).__init__(**kwargs) + self.properties = properties + self.name = name diff --git a/customSDK/servicefabric/models/secret_resource_properties.py b/customSDK/servicefabric/models/secret_resource_properties.py new file mode 100644 index 00000000..84868c39 --- /dev/null +++ b/customSDK/servicefabric/models/secret_resource_properties.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .secret_resource_properties_base import SecretResourcePropertiesBase + + +class SecretResourceProperties(SecretResourcePropertiesBase): + """Describes the properties of a secret resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: InlinedValueSecretResourceProperties + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param description: User readable description of the secret. + :type description: str + :ivar status: Status of the resource. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the secret. + :vartype status_details: str + :param content_type: The type of the content stored in the secret value. + The value of this property is opaque to Service Fabric. Once set, the + value of this property cannot be changed. + :type content_type: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'inlinedValue': 'InlinedValueSecretResourceProperties'} + } + + def __init__(self, **kwargs): + super(SecretResourceProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.status = None + self.status_details = None + self.content_type = kwargs.get('content_type', None) + self.kind = 'SecretResourceProperties' diff --git a/customSDK/servicefabric/models/secret_resource_properties_base.py b/customSDK/servicefabric/models/secret_resource_properties_base.py new file mode 100644 index 00000000..ac72b82d --- /dev/null +++ b/customSDK/servicefabric/models/secret_resource_properties_base.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SecretResourcePropertiesBase(Model): + """This type describes the properties of a secret resource, including its + kind. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecretResourceProperties + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'SecretResourceProperties': 'SecretResourceProperties'} + } + + def __init__(self, **kwargs): + super(SecretResourcePropertiesBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/secret_resource_properties_base_py3.py b/customSDK/servicefabric/models/secret_resource_properties_base_py3.py new file mode 100644 index 00000000..d0044f2e --- /dev/null +++ b/customSDK/servicefabric/models/secret_resource_properties_base_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SecretResourcePropertiesBase(Model): + """This type describes the properties of a secret resource, including its + kind. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecretResourceProperties + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'SecretResourceProperties': 'SecretResourceProperties'} + } + + def __init__(self, **kwargs) -> None: + super(SecretResourcePropertiesBase, self).__init__(**kwargs) + self.kind = None diff --git a/customSDK/servicefabric/models/secret_resource_properties_py3.py b/customSDK/servicefabric/models/secret_resource_properties_py3.py new file mode 100644 index 00000000..f49f3442 --- /dev/null +++ b/customSDK/servicefabric/models/secret_resource_properties_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .secret_resource_properties_base_py3 import SecretResourcePropertiesBase + + +class SecretResourceProperties(SecretResourcePropertiesBase): + """Describes the properties of a secret resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: InlinedValueSecretResourceProperties + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param description: User readable description of the secret. + :type description: str + :ivar status: Status of the resource. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the secret. + :vartype status_details: str + :param content_type: The type of the content stored in the secret value. + The value of this property is opaque to Service Fabric. Once set, the + value of this property cannot be changed. + :type content_type: str + """ + + _validation = { + 'kind': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'inlinedValue': 'InlinedValueSecretResourceProperties'} + } + + def __init__(self, *, description: str=None, content_type: str=None, **kwargs) -> None: + super(SecretResourceProperties, self).__init__(**kwargs) + self.description = description + self.status = None + self.status_details = None + self.content_type = content_type + self.kind = 'SecretResourceProperties' diff --git a/customSDK/servicefabric/models/secret_value.py b/customSDK/servicefabric/models/secret_value.py new file mode 100644 index 00000000..d7f63258 --- /dev/null +++ b/customSDK/servicefabric/models/secret_value.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SecretValue(Model): + """This type represents the unencrypted value of the secret. + + :param value: The actual value of the secret. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretValue, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/secret_value_properties.py b/customSDK/servicefabric/models/secret_value_properties.py new file mode 100644 index 00000000..2d26acf9 --- /dev/null +++ b/customSDK/servicefabric/models/secret_value_properties.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SecretValueProperties(Model): + """This type describes properties of secret value resource. + + :param value: The actual value of the secret. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretValueProperties, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/secret_value_properties_py3.py b/customSDK/servicefabric/models/secret_value_properties_py3.py new file mode 100644 index 00000000..4b422eb9 --- /dev/null +++ b/customSDK/servicefabric/models/secret_value_properties_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SecretValueProperties(Model): + """This type describes properties of secret value resource. + + :param value: The actual value of the secret. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, **kwargs) -> None: + super(SecretValueProperties, self).__init__(**kwargs) + self.value = value diff --git a/customSDK/servicefabric/models/secret_value_py3.py b/customSDK/servicefabric/models/secret_value_py3.py new file mode 100644 index 00000000..d196402e --- /dev/null +++ b/customSDK/servicefabric/models/secret_value_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SecretValue(Model): + """This type represents the unencrypted value of the secret. + + :param value: The actual value of the secret. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, **kwargs) -> None: + super(SecretValue, self).__init__(**kwargs) + self.value = value diff --git a/customSDK/servicefabric/models/secret_value_resource_description.py b/customSDK/servicefabric/models/secret_value_resource_description.py new file mode 100644 index 00000000..35809565 --- /dev/null +++ b/customSDK/servicefabric/models/secret_value_resource_description.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SecretValueResourceDescription(Model): + """This type describes a value of a secret resource. The name of this resource + is the version identifier corresponding to this secret value. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Version identifier of the secret value. + :type name: str + :param value: The actual value of the secret. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SecretValueResourceDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/secret_value_resource_description_py3.py b/customSDK/servicefabric/models/secret_value_resource_description_py3.py new file mode 100644 index 00000000..70866a93 --- /dev/null +++ b/customSDK/servicefabric/models/secret_value_resource_description_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SecretValueResourceDescription(Model): + """This type describes a value of a secret resource. The name of this resource + is the version identifier corresponding to this secret value. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Version identifier of the secret value. + :type name: str + :param value: The actual value of the secret. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + } + + def __init__(self, *, name: str, value: str=None, **kwargs) -> None: + super(SecretValueResourceDescription, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/customSDK/servicefabric/models/seed_node_safety_check.py b/customSDK/servicefabric/models/seed_node_safety_check.py new file mode 100644 index 00000000..5294f779 --- /dev/null +++ b/customSDK/servicefabric/models/seed_node_safety_check.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .safety_check import SafetyCheck + + +class SeedNodeSafetyCheck(SafetyCheck): + """Represents a safety check for the seed nodes being performed by service + fabric before continuing with node level operations. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SeedNodeSafetyCheck, self).__init__(**kwargs) + self.kind = 'EnsureSeedNodeQuorum' diff --git a/customSDK/servicefabric/models/seed_node_safety_check_py3.py b/customSDK/servicefabric/models/seed_node_safety_check_py3.py new file mode 100644 index 00000000..4e290120 --- /dev/null +++ b/customSDK/servicefabric/models/seed_node_safety_check_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .safety_check_py3 import SafetyCheck + + +class SeedNodeSafetyCheck(SafetyCheck): + """Represents a safety check for the seed nodes being performed by service + fabric before continuing with node level operations. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SeedNodeSafetyCheck, self).__init__(**kwargs) + self.kind = 'EnsureSeedNodeQuorum' diff --git a/customSDK/servicefabric/models/selected_partition.py b/customSDK/servicefabric/models/selected_partition.py new file mode 100644 index 00000000..c94ea8fd --- /dev/null +++ b/customSDK/servicefabric/models/selected_partition.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SelectedPartition(Model): + """This class returns information about the partition that the user-induced + operation acted upon. + + :param service_name: The name of the service the partition belongs to. + :type service_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SelectedPartition, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) diff --git a/customSDK/servicefabric/models/selected_partition_py3.py b/customSDK/servicefabric/models/selected_partition_py3.py new file mode 100644 index 00000000..20c94330 --- /dev/null +++ b/customSDK/servicefabric/models/selected_partition_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SelectedPartition(Model): + """This class returns information about the partition that the user-induced + operation acted upon. + + :param service_name: The name of the service the partition belongs to. + :type service_name: str + :param partition_id: An internal ID used by Service Fabric to uniquely + identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + :type partition_id: str + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, service_name: str=None, partition_id: str=None, **kwargs) -> None: + super(SelectedPartition, self).__init__(**kwargs) + self.service_name = service_name + self.partition_id = partition_id diff --git a/customSDK/servicefabric/models/service_backup_configuration_info.py b/customSDK/servicefabric/models/service_backup_configuration_info.py new file mode 100644 index 00000000..7ee1cd77 --- /dev/null +++ b/customSDK/servicefabric/models/service_backup_configuration_info.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_configuration_info import BackupConfigurationInfo + + +class ServiceBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information for a specific Service Fabric service + specifying what backup policy is being applied and suspend description, if + any. + + All required parameters must be populated in order to send to Azure. + + :param policy_name: The name of the backup policy which is applicable to + this Service Fabric application or service or partition. + :type policy_name: str + :param policy_inherited_from: Specifies the scope at which the backup + policy is applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type policy_inherited_from: str or + ~azure.servicefabric.models.BackupPolicyScope + :param suspension_info: Describes the backup suspension details. + :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :param kind: Required. Constant filled by server. + :type kind: str + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceBackupConfigurationInfo, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.kind = 'Service' diff --git a/customSDK/servicefabric/models/service_backup_configuration_info_py3.py b/customSDK/servicefabric/models/service_backup_configuration_info_py3.py new file mode 100644 index 00000000..5d708f47 --- /dev/null +++ b/customSDK/servicefabric/models/service_backup_configuration_info_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_configuration_info_py3 import BackupConfigurationInfo + + +class ServiceBackupConfigurationInfo(BackupConfigurationInfo): + """Backup configuration information for a specific Service Fabric service + specifying what backup policy is being applied and suspend description, if + any. + + All required parameters must be populated in order to send to Azure. + + :param policy_name: The name of the backup policy which is applicable to + this Service Fabric application or service or partition. + :type policy_name: str + :param policy_inherited_from: Specifies the scope at which the backup + policy is applied. Possible values include: 'Invalid', 'Partition', + 'Service', 'Application' + :type policy_inherited_from: str or + ~azure.servicefabric.models.BackupPolicyScope + :param suspension_info: Describes the backup suspension details. + :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo + :param kind: Required. Constant filled by server. + :type kind: str + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'policy_name': {'key': 'PolicyName', 'type': 'str'}, + 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, + 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, service_name: str=None, **kwargs) -> None: + super(ServiceBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) + self.service_name = service_name + self.kind = 'Service' diff --git a/customSDK/servicefabric/models/service_backup_entity.py b/customSDK/servicefabric/models/service_backup_entity.py new file mode 100644 index 00000000..3dbc91f4 --- /dev/null +++ b/customSDK/servicefabric/models/service_backup_entity.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_entity import BackupEntity + + +class ServiceBackupEntity(BackupEntity): + """Identifies the Service Fabric stateful service which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :param entity_kind: Required. Constant filled by server. + :type entity_kind: str + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceBackupEntity, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.entity_kind = 'Service' diff --git a/customSDK/servicefabric/models/service_backup_entity_py3.py b/customSDK/servicefabric/models/service_backup_entity_py3.py new file mode 100644 index 00000000..66f6036d --- /dev/null +++ b/customSDK/servicefabric/models/service_backup_entity_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_entity_py3 import BackupEntity + + +class ServiceBackupEntity(BackupEntity): + """Identifies the Service Fabric stateful service which is being backed up. + + All required parameters must be populated in order to send to Azure. + + :param entity_kind: Required. Constant filled by server. + :type entity_kind: str + :param service_name: The full name of the service with 'fabric:' URI + scheme. + :type service_name: str + """ + + _validation = { + 'entity_kind': {'required': True}, + } + + _attribute_map = { + 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__(self, *, service_name: str=None, **kwargs) -> None: + super(ServiceBackupEntity, self).__init__(**kwargs) + self.service_name = service_name + self.entity_kind = 'Service' diff --git a/customSDK/servicefabric/models/service_correlation_description.py b/customSDK/servicefabric/models/service_correlation_description.py new file mode 100644 index 00000000..46e9abaa --- /dev/null +++ b/customSDK/servicefabric/models/service_correlation_description.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceCorrelationDescription(Model): + """Creates a particular correlation between services. + + All required parameters must be populated in order to send to Azure. + + :param scheme: Required. The ServiceCorrelationScheme which describes the + relationship between this service and the service specified via + ServiceName. Possible values include: 'Invalid', 'Affinity', + 'AlignedAffinity', 'NonAlignedAffinity' + :type scheme: str or ~azure.servicefabric.models.ServiceCorrelationScheme + :param service_name: Required. The name of the service that the + correlation relationship is established with. + :type service_name: str + """ + + _validation = { + 'scheme': {'required': True}, + 'service_name': {'required': True}, + } + + _attribute_map = { + 'scheme': {'key': 'Scheme', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceCorrelationDescription, self).__init__(**kwargs) + self.scheme = kwargs.get('scheme', None) + self.service_name = kwargs.get('service_name', None) diff --git a/customSDK/servicefabric/models/service_correlation_description_py3.py b/customSDK/servicefabric/models/service_correlation_description_py3.py new file mode 100644 index 00000000..d72db912 --- /dev/null +++ b/customSDK/servicefabric/models/service_correlation_description_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceCorrelationDescription(Model): + """Creates a particular correlation between services. + + All required parameters must be populated in order to send to Azure. + + :param scheme: Required. The ServiceCorrelationScheme which describes the + relationship between this service and the service specified via + ServiceName. Possible values include: 'Invalid', 'Affinity', + 'AlignedAffinity', 'NonAlignedAffinity' + :type scheme: str or ~azure.servicefabric.models.ServiceCorrelationScheme + :param service_name: Required. The name of the service that the + correlation relationship is established with. + :type service_name: str + """ + + _validation = { + 'scheme': {'required': True}, + 'service_name': {'required': True}, + } + + _attribute_map = { + 'scheme': {'key': 'Scheme', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__(self, *, scheme, service_name: str, **kwargs) -> None: + super(ServiceCorrelationDescription, self).__init__(**kwargs) + self.scheme = scheme + self.service_name = service_name diff --git a/customSDK/servicefabric/models/service_created_event.py b/customSDK/servicefabric/models/service_created_event.py new file mode 100644 index 00000000..33d46d28 --- /dev/null +++ b/customSDK/servicefabric/models/service_created_event.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_event import ServiceEvent + + +class ServiceCreatedEvent(ServiceEvent): + """Service Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param service_type_name: Required. Service type name. + :type service_type_name: str + :param application_name: Required. Application name. + :type application_name: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param service_instance: Required. Id of Service instance. + :type service_instance: long + :param is_stateful: Required. Indicates if Service is stateful. + :type is_stateful: bool + :param partition_count: Required. Number of partitions. + :type partition_count: int + :param target_replica_set_size: Required. Size of target replicas set. + :type target_replica_set_size: int + :param min_replica_set_size: Required. Minimum size of replicas set. + :type min_replica_set_size: int + :param service_package_version: Required. Version of Service package. + :type service_package_version: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + 'service_type_name': {'required': True}, + 'application_name': {'required': True}, + 'application_type_name': {'required': True}, + 'service_instance': {'required': True}, + 'is_stateful': {'required': True}, + 'partition_count': {'required': True}, + 'target_replica_set_size': {'required': True}, + 'min_replica_set_size': {'required': True}, + 'service_package_version': {'required': True}, + 'partition_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceCreatedEvent, self).__init__(**kwargs) + self.service_type_name = kwargs.get('service_type_name', None) + self.application_name = kwargs.get('application_name', None) + self.application_type_name = kwargs.get('application_type_name', None) + self.service_instance = kwargs.get('service_instance', None) + self.is_stateful = kwargs.get('is_stateful', None) + self.partition_count = kwargs.get('partition_count', None) + self.target_replica_set_size = kwargs.get('target_replica_set_size', None) + self.min_replica_set_size = kwargs.get('min_replica_set_size', None) + self.service_package_version = kwargs.get('service_package_version', None) + self.partition_id = kwargs.get('partition_id', None) + self.kind = 'ServiceCreated' diff --git a/customSDK/servicefabric/models/service_created_event_py3.py b/customSDK/servicefabric/models/service_created_event_py3.py new file mode 100644 index 00000000..1843c859 --- /dev/null +++ b/customSDK/servicefabric/models/service_created_event_py3.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_event_py3 import ServiceEvent + + +class ServiceCreatedEvent(ServiceEvent): + """Service Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param service_type_name: Required. Service type name. + :type service_type_name: str + :param application_name: Required. Application name. + :type application_name: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param service_instance: Required. Id of Service instance. + :type service_instance: long + :param is_stateful: Required. Indicates if Service is stateful. + :type is_stateful: bool + :param partition_count: Required. Number of partitions. + :type partition_count: int + :param target_replica_set_size: Required. Size of target replicas set. + :type target_replica_set_size: int + :param min_replica_set_size: Required. Minimum size of replicas set. + :type min_replica_set_size: int + :param service_package_version: Required. Version of Service package. + :type service_package_version: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + 'service_type_name': {'required': True}, + 'application_name': {'required': True}, + 'application_type_name': {'required': True}, + 'service_instance': {'required': True}, + 'is_stateful': {'required': True}, + 'partition_count': {'required': True}, + 'target_replica_set_size': {'required': True}, + 'min_replica_set_size': {'required': True}, + 'service_package_version': {'required': True}, + 'partition_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, service_type_name: str, application_name: str, application_type_name: str, service_instance: int, is_stateful: bool, partition_count: int, target_replica_set_size: int, min_replica_set_size: int, service_package_version: str, partition_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ServiceCreatedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) + self.service_type_name = service_type_name + self.application_name = application_name + self.application_type_name = application_type_name + self.service_instance = service_instance + self.is_stateful = is_stateful + self.partition_count = partition_count + self.target_replica_set_size = target_replica_set_size + self.min_replica_set_size = min_replica_set_size + self.service_package_version = service_package_version + self.partition_id = partition_id + self.kind = 'ServiceCreated' diff --git a/customSDK/servicefabric/models/service_deleted_event.py b/customSDK/servicefabric/models/service_deleted_event.py new file mode 100644 index 00000000..7b7642f8 --- /dev/null +++ b/customSDK/servicefabric/models/service_deleted_event.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_event import ServiceEvent + + +class ServiceDeletedEvent(ServiceEvent): + """Service Deleted event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param service_type_name: Required. Service type name. + :type service_type_name: str + :param application_name: Required. Application name. + :type application_name: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param service_instance: Required. Id of Service instance. + :type service_instance: long + :param is_stateful: Required. Indicates if Service is stateful. + :type is_stateful: bool + :param partition_count: Required. Number of partitions. + :type partition_count: int + :param target_replica_set_size: Required. Size of target replicas set. + :type target_replica_set_size: int + :param min_replica_set_size: Required. Minimum size of replicas set. + :type min_replica_set_size: int + :param service_package_version: Required. Version of Service package. + :type service_package_version: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + 'service_type_name': {'required': True}, + 'application_name': {'required': True}, + 'application_type_name': {'required': True}, + 'service_instance': {'required': True}, + 'is_stateful': {'required': True}, + 'partition_count': {'required': True}, + 'target_replica_set_size': {'required': True}, + 'min_replica_set_size': {'required': True}, + 'service_package_version': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceDeletedEvent, self).__init__(**kwargs) + self.service_type_name = kwargs.get('service_type_name', None) + self.application_name = kwargs.get('application_name', None) + self.application_type_name = kwargs.get('application_type_name', None) + self.service_instance = kwargs.get('service_instance', None) + self.is_stateful = kwargs.get('is_stateful', None) + self.partition_count = kwargs.get('partition_count', None) + self.target_replica_set_size = kwargs.get('target_replica_set_size', None) + self.min_replica_set_size = kwargs.get('min_replica_set_size', None) + self.service_package_version = kwargs.get('service_package_version', None) + self.kind = 'ServiceDeleted' diff --git a/customSDK/servicefabric/models/service_deleted_event_py3.py b/customSDK/servicefabric/models/service_deleted_event_py3.py new file mode 100644 index 00000000..58357e38 --- /dev/null +++ b/customSDK/servicefabric/models/service_deleted_event_py3.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_event_py3 import ServiceEvent + + +class ServiceDeletedEvent(ServiceEvent): + """Service Deleted event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param service_type_name: Required. Service type name. + :type service_type_name: str + :param application_name: Required. Application name. + :type application_name: str + :param application_type_name: Required. Application type name. + :type application_type_name: str + :param service_instance: Required. Id of Service instance. + :type service_instance: long + :param is_stateful: Required. Indicates if Service is stateful. + :type is_stateful: bool + :param partition_count: Required. Number of partitions. + :type partition_count: int + :param target_replica_set_size: Required. Size of target replicas set. + :type target_replica_set_size: int + :param min_replica_set_size: Required. Minimum size of replicas set. + :type min_replica_set_size: int + :param service_package_version: Required. Version of Service package. + :type service_package_version: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + 'service_type_name': {'required': True}, + 'application_name': {'required': True}, + 'application_type_name': {'required': True}, + 'service_instance': {'required': True}, + 'is_stateful': {'required': True}, + 'partition_count': {'required': True}, + 'target_replica_set_size': {'required': True}, + 'min_replica_set_size': {'required': True}, + 'service_package_version': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, + 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, service_type_name: str, application_name: str, application_type_name: str, service_instance: int, is_stateful: bool, partition_count: int, target_replica_set_size: int, min_replica_set_size: int, service_package_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ServiceDeletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) + self.service_type_name = service_type_name + self.application_name = application_name + self.application_type_name = application_type_name + self.service_instance = service_instance + self.is_stateful = is_stateful + self.partition_count = partition_count + self.target_replica_set_size = target_replica_set_size + self.min_replica_set_size = min_replica_set_size + self.service_package_version = service_package_version + self.kind = 'ServiceDeleted' diff --git a/customSDK/servicefabric/models/service_description.py b/customSDK/servicefabric/models/service_description.py new file mode 100644 index 00000000..77cdb09f --- /dev/null +++ b/customSDK/servicefabric/models/service_description.py @@ -0,0 +1,132 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceDescription(Model): + """A ServiceDescription contains all of the information necessary to create a + service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceDescription, StatelessServiceDescription + + All required parameters must be populated in order to send to Azure. + + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_name: Required. The full name of the service with 'fabric:' + URI scheme. + :type service_name: str + :param service_type_name: Required. Name of the service type as specified + in the service manifest. + :type service_type_name: str + :param initialization_data: The initialization data as an array of bytes. + Initialization data is passed to service instances or replicas when they + are created. + :type initialization_data: list[int] + :param partition_description: Required. The partition description as an + object. + :type partition_description: + ~azure.servicefabric.models.PartitionSchemeDescription + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param service_load_metrics: The service load metrics. + :type service_load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param is_default_move_cost_specified: Indicates if the DefaultMoveCost + property is specified. + :type is_default_move_cost_specified: bool + :param service_package_activation_mode: The activation mode of service + package to be used for a service. Possible values include: + 'SharedProcess', 'ExclusiveProcess' + :type service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :param service_dns_name: The DNS name of the service. It requires the DNS + system service to be enabled in Service Fabric cluster. + :type service_dns_name: str + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceDescription', 'Stateless': 'StatelessServiceDescription'} + } + + def __init__(self, **kwargs): + super(ServiceDescription, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.service_name = kwargs.get('service_name', None) + self.service_type_name = kwargs.get('service_type_name', None) + self.initialization_data = kwargs.get('initialization_data', None) + self.partition_description = kwargs.get('partition_description', None) + self.placement_constraints = kwargs.get('placement_constraints', None) + self.correlation_scheme = kwargs.get('correlation_scheme', None) + self.service_load_metrics = kwargs.get('service_load_metrics', None) + self.service_placement_policies = kwargs.get('service_placement_policies', None) + self.default_move_cost = kwargs.get('default_move_cost', None) + self.is_default_move_cost_specified = kwargs.get('is_default_move_cost_specified', None) + self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) + self.service_dns_name = kwargs.get('service_dns_name', None) + self.scaling_policies = kwargs.get('scaling_policies', None) + self.tags_required_to_place = kwargs.get('tags_required_to_place', None) + self.tags_required_to_run = kwargs.get('tags_required_to_run', None) + self.service_kind = None diff --git a/customSDK/servicefabric/models/service_description_py3.py b/customSDK/servicefabric/models/service_description_py3.py new file mode 100644 index 00000000..b11ea508 --- /dev/null +++ b/customSDK/servicefabric/models/service_description_py3.py @@ -0,0 +1,132 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceDescription(Model): + """A ServiceDescription contains all of the information necessary to create a + service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceDescription, StatelessServiceDescription + + All required parameters must be populated in order to send to Azure. + + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_name: Required. The full name of the service with 'fabric:' + URI scheme. + :type service_name: str + :param service_type_name: Required. Name of the service type as specified + in the service manifest. + :type service_type_name: str + :param initialization_data: The initialization data as an array of bytes. + Initialization data is passed to service instances or replicas when they + are created. + :type initialization_data: list[int] + :param partition_description: Required. The partition description as an + object. + :type partition_description: + ~azure.servicefabric.models.PartitionSchemeDescription + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param service_load_metrics: The service load metrics. + :type service_load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param is_default_move_cost_specified: Indicates if the DefaultMoveCost + property is specified. + :type is_default_move_cost_specified: bool + :param service_package_activation_mode: The activation mode of service + package to be used for a service. Possible values include: + 'SharedProcess', 'ExclusiveProcess' + :type service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :param service_dns_name: The DNS name of the service. It requires the DNS + system service to be enabled in Service Fabric cluster. + :type service_dns_name: str + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceDescription', 'Stateless': 'StatelessServiceDescription'} + } + + def __init__(self, *, service_name: str, service_type_name: str, partition_description, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, **kwargs) -> None: + super(ServiceDescription, self).__init__(**kwargs) + self.application_name = application_name + self.service_name = service_name + self.service_type_name = service_type_name + self.initialization_data = initialization_data + self.partition_description = partition_description + self.placement_constraints = placement_constraints + self.correlation_scheme = correlation_scheme + self.service_load_metrics = service_load_metrics + self.service_placement_policies = service_placement_policies + self.default_move_cost = default_move_cost + self.is_default_move_cost_specified = is_default_move_cost_specified + self.service_package_activation_mode = service_package_activation_mode + self.service_dns_name = service_dns_name + self.scaling_policies = scaling_policies + self.tags_required_to_place = tags_required_to_place + self.tags_required_to_run = tags_required_to_run + self.service_kind = None diff --git a/customSDK/servicefabric/models/service_event.py b/customSDK/servicefabric/models/service_event.py new file mode 100644 index 00000000..8babe820 --- /dev/null +++ b/customSDK/servicefabric/models/service_event.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .fabric_event import FabricEvent + + +class ServiceEvent(FabricEvent): + """Represents the base for all Service Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ServiceCreatedEvent, ServiceDeletedEvent, + ServiceNewHealthReportEvent, ServiceHealthReportExpiredEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ServiceCreated': 'ServiceCreatedEvent', 'ServiceDeleted': 'ServiceDeletedEvent', 'ServiceNewHealthReport': 'ServiceNewHealthReportEvent', 'ServiceHealthReportExpired': 'ServiceHealthReportExpiredEvent'} + } + + def __init__(self, **kwargs): + super(ServiceEvent, self).__init__(**kwargs) + self.service_id = kwargs.get('service_id', None) + self.kind = 'ServiceEvent' diff --git a/customSDK/servicefabric/models/service_event_py3.py b/customSDK/servicefabric/models/service_event_py3.py new file mode 100644 index 00000000..da126aba --- /dev/null +++ b/customSDK/servicefabric/models/service_event_py3.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .fabric_event_py3 import FabricEvent + + +class ServiceEvent(FabricEvent): + """Represents the base for all Service Events. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ServiceCreatedEvent, ServiceDeletedEvent, + ServiceNewHealthReportEvent, ServiceHealthReportExpiredEvent + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ServiceCreated': 'ServiceCreatedEvent', 'ServiceDeleted': 'ServiceDeletedEvent', 'ServiceNewHealthReport': 'ServiceNewHealthReportEvent', 'ServiceHealthReportExpired': 'ServiceHealthReportExpiredEvent'} + } + + def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ServiceEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) + self.service_id = service_id + self.kind = 'ServiceEvent' diff --git a/customSDK/servicefabric/models/service_fabric_client_ap_is_enums.py b/customSDK/servicefabric/models/service_fabric_client_ap_is_enums.py new file mode 100644 index 00000000..ba2eb316 --- /dev/null +++ b/customSDK/servicefabric/models/service_fabric_client_ap_is_enums.py @@ -0,0 +1,1115 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class HealthState(str, Enum): + + invalid = "Invalid" #: Indicates an invalid health state. All Service Fabric enumerations have the invalid type. The value is zero. + ok = "Ok" #: Indicates the health state is okay. The value is 1. + warning = "Warning" #: Indicates the health state is at a warning level. The value is 2. + error = "Error" #: Indicates the health state is at an error level. Error health state should be investigated, as they can impact the correct functionality of the cluster. The value is 3. + unknown = "Unknown" #: Indicates an unknown health status. The value is 65535. + + +class FabricErrorCodes(str, Enum): + + fabric_e_invalid_partition_key = "FABRIC_E_INVALID_PARTITION_KEY" + fabric_e_imagebuilder_validation_error = "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" + fabric_e_invalid_address = "FABRIC_E_INVALID_ADDRESS" + fabric_e_application_not_upgrading = "FABRIC_E_APPLICATION_NOT_UPGRADING" + fabric_e_application_upgrade_validation_error = "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" + fabric_e_fabric_not_upgrading = "FABRIC_E_FABRIC_NOT_UPGRADING" + fabric_e_fabric_upgrade_validation_error = "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" + fabric_e_invalid_configuration = "FABRIC_E_INVALID_CONFIGURATION" + fabric_e_invalid_name_uri = "FABRIC_E_INVALID_NAME_URI" + fabric_e_path_too_long = "FABRIC_E_PATH_TOO_LONG" + fabric_e_key_too_large = "FABRIC_E_KEY_TOO_LARGE" + fabric_e_service_affinity_chain_not_supported = "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" + fabric_e_invalid_atomic_group = "FABRIC_E_INVALID_ATOMIC_GROUP" + fabric_e_value_empty = "FABRIC_E_VALUE_EMPTY" + fabric_e_node_not_found = "FABRIC_E_NODE_NOT_FOUND" + fabric_e_application_type_not_found = "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" + fabric_e_application_not_found = "FABRIC_E_APPLICATION_NOT_FOUND" + fabric_e_service_type_not_found = "FABRIC_E_SERVICE_TYPE_NOT_FOUND" + fabric_e_service_does_not_exist = "FABRIC_E_SERVICE_DOES_NOT_EXIST" + fabric_e_service_type_template_not_found = "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" + fabric_e_configuration_section_not_found = "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" + fabric_e_partition_not_found = "FABRIC_E_PARTITION_NOT_FOUND" + fabric_e_replica_does_not_exist = "FABRIC_E_REPLICA_DOES_NOT_EXIST" + fabric_e_service_group_does_not_exist = "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" + fabric_e_configuration_parameter_not_found = "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" + fabric_e_directory_not_found = "FABRIC_E_DIRECTORY_NOT_FOUND" + fabric_e_fabric_version_not_found = "FABRIC_E_FABRIC_VERSION_NOT_FOUND" + fabric_e_file_not_found = "FABRIC_E_FILE_NOT_FOUND" + fabric_e_name_does_not_exist = "FABRIC_E_NAME_DOES_NOT_EXIST" + fabric_e_property_does_not_exist = "FABRIC_E_PROPERTY_DOES_NOT_EXIST" + fabric_e_enumeration_completed = "FABRIC_E_ENUMERATION_COMPLETED" + fabric_e_service_manifest_not_found = "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" + fabric_e_key_not_found = "FABRIC_E_KEY_NOT_FOUND" + fabric_e_health_entity_not_found = "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" + fabric_e_application_type_already_exists = "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" + fabric_e_application_already_exists = "FABRIC_E_APPLICATION_ALREADY_EXISTS" + fabric_e_application_already_in_target_version = "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" + fabric_e_application_type_provision_in_progress = "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" + fabric_e_application_upgrade_in_progress = "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" + fabric_e_service_already_exists = "FABRIC_E_SERVICE_ALREADY_EXISTS" + fabric_e_service_group_already_exists = "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" + fabric_e_application_type_in_use = "FABRIC_E_APPLICATION_TYPE_IN_USE" + fabric_e_fabric_already_in_target_version = "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" + fabric_e_fabric_version_already_exists = "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" + fabric_e_fabric_version_in_use = "FABRIC_E_FABRIC_VERSION_IN_USE" + fabric_e_fabric_upgrade_in_progress = "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" + fabric_e_name_already_exists = "FABRIC_E_NAME_ALREADY_EXISTS" + fabric_e_name_not_empty = "FABRIC_E_NAME_NOT_EMPTY" + fabric_e_property_check_failed = "FABRIC_E_PROPERTY_CHECK_FAILED" + fabric_e_service_metadata_mismatch = "FABRIC_E_SERVICE_METADATA_MISMATCH" + fabric_e_service_type_mismatch = "FABRIC_E_SERVICE_TYPE_MISMATCH" + fabric_e_health_stale_report = "FABRIC_E_HEALTH_STALE_REPORT" + fabric_e_sequence_number_check_failed = "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" + fabric_e_node_has_not_stopped_yet = "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" + fabric_e_instance_id_mismatch = "FABRIC_E_INSTANCE_ID_MISMATCH" + fabric_e_value_too_large = "FABRIC_E_VALUE_TOO_LARGE" + fabric_e_no_write_quorum = "FABRIC_E_NO_WRITE_QUORUM" + fabric_e_not_primary = "FABRIC_E_NOT_PRIMARY" + fabric_e_not_ready = "FABRIC_E_NOT_READY" + fabric_e_reconfiguration_pending = "FABRIC_E_RECONFIGURATION_PENDING" + fabric_e_service_offline = "FABRIC_E_SERVICE_OFFLINE" + e_abort = "E_ABORT" + fabric_e_communication_error = "FABRIC_E_COMMUNICATION_ERROR" + fabric_e_operation_not_complete = "FABRIC_E_OPERATION_NOT_COMPLETE" + fabric_e_timeout = "FABRIC_E_TIMEOUT" + fabric_e_node_is_up = "FABRIC_E_NODE_IS_UP" + e_fail = "E_FAIL" + fabric_e_backup_is_enabled = "FABRIC_E_BACKUP_IS_ENABLED" + fabric_e_restore_source_target_partition_mismatch = "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" + fabric_e_invalid_for_stateless_services = "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" + fabric_e_backup_not_enabled = "FABRIC_E_BACKUP_NOT_ENABLED" + fabric_e_backup_policy_not_existing = "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" + fabric_e_fault_analysis_service_not_existing = "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + fabric_e_backup_in_progress = "FABRIC_E_BACKUP_IN_PROGRESS" + fabric_e_restore_in_progress = "FABRIC_E_RESTORE_IN_PROGRESS" + 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" + fabric_e_imagebuilder_reserved_directory_error = "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" + + +class ApplicationDefinitionKind(str, Enum): + + invalid = "Invalid" #: Indicates the application definition kind is invalid. All Service Fabric enumerations have the invalid type. The value is 65535. + service_fabric_application_description = "ServiceFabricApplicationDescription" #: Indicates the application is defined by a Service Fabric application description. The value is 0. + compose = "Compose" #: Indicates the application is defined by compose file(s). The value is 1. + + +class ApplicationStatus(str, Enum): + + invalid = "Invalid" #: Indicates the application status is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + ready = "Ready" #: Indicates the application status is ready. The value is 1. + upgrading = "Upgrading" #: Indicates the application status is upgrading. The value is 2. + creating = "Creating" #: Indicates the application status is creating. The value is 3. + deleting = "Deleting" #: Indicates the application status is deleting. The value is 4. + failed = "Failed" #: Indicates the creation or deletion of application was terminated due to persistent failures. Another create/delete request can be accepted to resume a failed application. The value is 5. + + +class ApplicationPackageCleanupPolicy(str, Enum): + + invalid = "Invalid" #: Indicates that the application package cleanup policy is invalid. This value is default. The value is zero. + default = "Default" #: Indicates that the cleanup policy of application packages is based on the cluster setting "CleanupApplicationPackageOnProvisionSuccess." The value is 1. + automatic = "Automatic" #: Indicates that the service fabric runtime determines when to do the application package cleanup. By default, cleanup is done on successful provision. The value is 2. + manual = "Manual" #: Indicates that the user has to explicitly clean up the application package. The value is 3. + + +class ApplicationTypeDefinitionKind(str, Enum): + + invalid = "Invalid" #: Indicates the application type definition kind is invalid. All Service Fabric enumerations have the invalid type. The value is 0. + service_fabric_application_package = "ServiceFabricApplicationPackage" #: Indicates the application type is defined and created by a Service Fabric application package provided by the user. The value is 1. + compose = "Compose" #: Indicates the application type is defined and created implicitly as part of a compose deployment. The value is 2. + + +class ApplicationTypeStatus(str, Enum): + + invalid = "Invalid" #: Indicates the application type status is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + provisioning = "Provisioning" #: Indicates that the application type is being provisioned in the cluster. The value is 1. + available = "Available" #: Indicates that the application type is fully provisioned and is available for use. An application of this type and version can be created. The value is 2. + unprovisioning = "Unprovisioning" #: Indicates that the application type is in process of being unprovisioned from the cluster. The value is 3. + failed = "Failed" #: Indicates that the application type provisioning failed and it is unavailable for use. The failure details can be obtained from the application type information query. The failed application type information remains in the cluster until it is unprovisioned or reprovisioned successfully. The value is 4. + + +class UpgradeKind(str, Enum): + + invalid = "Invalid" #: Indicates the upgrade kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + rolling = "Rolling" #: The upgrade progresses one upgrade domain at a time. The value is 1 + + +class UpgradeMode(str, Enum): + + invalid = "Invalid" #: Indicates the upgrade mode is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + unmonitored_auto = "UnmonitoredAuto" #: The upgrade will proceed automatically without performing any health monitoring. The value is 1 + unmonitored_manual = "UnmonitoredManual" #: The upgrade will stop after completing each upgrade domain, giving the opportunity to manually monitor health before proceeding. The value is 2 + monitored = "Monitored" #: The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. The value is 3 + unmonitored_deferred = "UnmonitoredDeferred" #: Perform a node-by-node upgrade. No action is performed when upgrade starts; upgrade is applied on each node when it is deactivated with intent restart or higher. The value is 4 + + +class UpgradeSortOrder(str, Enum): + + invalid = "Invalid" #: Indicates that this sort order is not valid. All Service Fabric enumerations have the invalid type. The value is 0. + default = "Default" #: Indicates that the default sort order (as specified in cluster manifest) will be used. The value is 1. + numeric = "Numeric" #: Indicates that forward numeric sort order (UD names sorted as numbers) will be used. The value is 2. + lexicographical = "Lexicographical" #: Indicates that forward lexicographical sort order (UD names sorted as strings) will be used. The value is 3. + reverse_numeric = "ReverseNumeric" #: Indicates that reverse numeric sort order (UD names sorted as numbers) will be used. The value is 4. + reverse_lexicographical = "ReverseLexicographical" #: Indicates that reverse lexicographical sort order (UD names sorted as strings) will be used. The value is 5. + + +class FailureAction(str, Enum): + + invalid = "Invalid" #: Indicates the failure action is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + rollback = "Rollback" #: The upgrade will start rolling back automatically. The value is 1 + manual = "Manual" #: The upgrade will switch to UnmonitoredManual upgrade mode. The value is 2 + + +class UpgradeDomainState(str, Enum): + + invalid = "Invalid" #: Indicates the upgrade domain state is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + pending = "Pending" #: The upgrade domain has not started upgrading yet. The value is 1 + in_progress = "InProgress" #: The upgrade domain is being upgraded but not complete yet. The value is 2 + completed = "Completed" #: The upgrade domain has completed upgrade. The value is 3 + + +class UpgradeUnitState(str, Enum): + + invalid = "Invalid" #: Indicates the upgrade unit state is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + pending = "Pending" #: The upgrade unit has not started upgrading yet. The value is 1 + in_progress = "InProgress" #: The upgrade unit is being upgraded but not complete yet. The value is 2 + completed = "Completed" #: The upgrade unit has completed upgrade. The value is 3 + failed = "Failed" #: The upgrade unit has failed to upgrade. The value is 4 + + +class UpgradeState(str, Enum): + + invalid = "Invalid" #: Indicates the upgrade state is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + rolling_back_in_progress = "RollingBackInProgress" #: The upgrade is rolling back to the previous version but is not complete yet. The value is 1 + rolling_back_completed = "RollingBackCompleted" #: The upgrade has finished rolling back. The value is 2 + rolling_forward_pending = "RollingForwardPending" #: The current upgrade domain has finished upgrading. The overall upgrade is waiting for an explicit move next request in UnmonitoredManual mode or performing health checks in Monitored mode. The value is 3 + rolling_forward_in_progress = "RollingForwardInProgress" #: The upgrade is rolling forward to the target version but is not complete yet. The value is 4 + rolling_forward_completed = "RollingForwardCompleted" #: The upgrade has finished rolling forward. The value is 5 + failed = "Failed" #: The upgrade has failed and is unable to execute FailureAction. The value is 6 + + +class NodeUpgradePhase(str, Enum): + + invalid = "Invalid" #: Indicates the upgrade state is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + pre_upgrade_safety_check = "PreUpgradeSafetyCheck" #: The upgrade has not started yet due to pending safety checks. The value is 1 + upgrading = "Upgrading" #: The upgrade is in progress. The value is 2 + post_upgrade_safety_check = "PostUpgradeSafetyCheck" #: The upgrade has completed and post upgrade safety checks are being performed. The value is 3 + + +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 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 + + +class DeactivationIntent(str, Enum): + + pause = "Pause" #: Indicates that the node should be paused. The value is 1. + restart = "Restart" #: Indicates that the intent is for the node to be restarted after a short period of time. The value is 2. + remove_data = "RemoveData" #: Indicates the intent is for the node to remove data. The value is 3. + + +class DeployedApplicationStatus(str, Enum): + + invalid = "Invalid" #: Indicates that deployment status is not valid. All Service Fabric enumerations have the invalid type. The value is zero. + downloading = "Downloading" #: Indicates that the package is downloading from the ImageStore. The value is 1. + activating = "Activating" #: Indicates that the package is activating. The value is 2. + active = "Active" #: Indicates that the package is active. The value is 3. + upgrading = "Upgrading" #: Indicates that the package is upgrading. The value is 4. + deactivating = "Deactivating" #: Indicates that the package is deactivating. The value is 5. + + +class ReplicaStatus(str, Enum): + + invalid = "Invalid" #: Indicates the replica status is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + in_build = "InBuild" #: The replica is being built. This means that a primary replica is seeding this replica. The value is 1. + standby = "Standby" #: The replica is in standby. The value is 2. + ready = "Ready" #: The replica is ready. The value is 3. + down = "Down" #: The replica is down. The value is 4. + dropped = "Dropped" #: Replica is dropped. This means that the replica has been removed from the replica set. If it is persisted, its state has been deleted. The value is 5. + + +class ReplicaRole(str, Enum): + + unknown = "Unknown" #: Indicates the initial role that a replica is created in. The value is zero. + none = "None" #: Specifies that the replica has no responsibility in regard to the replica set. The value is 1 + primary = "Primary" #: Refers to the replica in the set on which all read and write operations are complete in order to enforce strong consistency semantics. Read operations are handled directly by the Primary replica, while write operations must be acknowledged by a quorum of the replicas in the replica set. There can only be one Primary replica in a replica set at a time. The value is 2. + idle_secondary = "IdleSecondary" #: Refers to a replica in the set that receives a state transfer from the Primary replica to prepare for becoming an active Secondary replica. There can be multiple Idle Secondary replicas in a replica set at a time. Idle Secondary replicas do not count as a part of a write quorum. The value is 3. + active_secondary = "ActiveSecondary" #: Refers to a replica in the set that receives state updates from the Primary replica, applies them, and sends acknowledgements back. Secondary replicas must participate in the write quorum for a replica set. There can be multiple active Secondary replicas in a replica set at a time. The number of active Secondary replicas is configurable that the reliability subsystem should maintain. The value is 4. + idle_auxiliary = "IdleAuxiliary" #: Refers to a replica in the set that receives a state transfer from the Primary replica to prepare for becoming an ActiveAuxiliary replica. There can be multiple IdleAuxiliary replicas in a replica set at a time. IdleAuxiliary replicas do not count as a part of a write quorum. The value is 5. + active_auxiliary = "ActiveAuxiliary" #: Refers to a replica in the set that receives state updates from the Primary replica, applies them, and sends acknowledgements back. ActiveAuxiliary replicas must participate in the write quorum for a replica set. There can be multiple active ActiveAuxiliary replicas in a replica set at a time. The number of active ActiveAuxiliary replicas is configurable that the reliability subsystem should maintain. The value is 6. + primary_auxiliary = "PrimaryAuxiliary" #: Refers to the replica in the set that is used to rebuild a new Secondary replica to relinquish primary status to. It cannot field read or write requests. The value is 7. + + +class ReconfigurationPhase(str, Enum): + + unknown = "Unknown" #: Indicates the invalid reconfiguration phase. + none = "None" #: Specifies that there is no reconfiguration in progress. + phase0 = "Phase0" #: Refers to the phase where the reconfiguration is transferring data from the previous primary to the new primary. + phase1 = "Phase1" #: Refers to the phase where the reconfiguration is querying the replica set for the progress. + phase2 = "Phase2" #: Refers to the phase where the reconfiguration is ensuring that data from the current primary is present in a majority of the replica set. + phase3 = "Phase3" #: This phase is for internal use only. + phase4 = "Phase4" #: This phase is for internal use only. + abort_phase_zero = "AbortPhaseZero" #: This phase is for internal use only. + + +class ReconfigurationType(str, Enum): + + unknown = "Unknown" #: Indicates the invalid reconfiguration type. + swap_primary = "SwapPrimary" #: Specifies that the primary replica is being swapped with a different replica. + failover = "Failover" #: Reconfiguration triggered in response to a primary going down. This could be due to many reasons such as primary replica crashing etc. + other = "Other" #: Reconfigurations where the primary replica is not changing. + + +class EntityKind(str, Enum): + + invalid = "Invalid" #: Indicates an invalid entity kind. All Service Fabric enumerations have the invalid type. The value is zero. + node = "Node" #: Indicates the entity is a Service Fabric node. The value is 1. + partition = "Partition" #: Indicates the entity is a Service Fabric partition. The value is 2. + service = "Service" #: Indicates the entity is a Service Fabric service. The value is 3. + application = "Application" #: Indicates the entity is a Service Fabric application. The value is 4. + replica = "Replica" #: Indicates the entity is a Service Fabric replica. The value is 5. + deployed_application = "DeployedApplication" #: Indicates the entity is a Service Fabric deployed application. The value is 6. + deployed_service_package = "DeployedServicePackage" #: Indicates the entity is a Service Fabric deployed service package. The value is 7. + cluster = "Cluster" #: Indicates the entity is a Service Fabric cluster. The value is 8. + + +class FabricEventKind(str, Enum): + + cluster_event = "ClusterEvent" + container_instance_event = "ContainerInstanceEvent" + node_event = "NodeEvent" + application_event = "ApplicationEvent" + service_event = "ServiceEvent" + partition_event = "PartitionEvent" + replica_event = "ReplicaEvent" + partition_analysis_event = "PartitionAnalysisEvent" + application_created = "ApplicationCreated" + application_deleted = "ApplicationDeleted" + application_new_health_report = "ApplicationNewHealthReport" + application_health_report_expired = "ApplicationHealthReportExpired" + application_upgrade_completed = "ApplicationUpgradeCompleted" + application_upgrade_domain_completed = "ApplicationUpgradeDomainCompleted" + application_upgrade_rollback_completed = "ApplicationUpgradeRollbackCompleted" + application_upgrade_rollback_started = "ApplicationUpgradeRollbackStarted" + application_upgrade_started = "ApplicationUpgradeStarted" + deployed_application_new_health_report = "DeployedApplicationNewHealthReport" + deployed_application_health_report_expired = "DeployedApplicationHealthReportExpired" + application_process_exited = "ApplicationProcessExited" + application_container_instance_exited = "ApplicationContainerInstanceExited" + node_aborted = "NodeAborted" + node_added_to_cluster = "NodeAddedToCluster" + node_closed = "NodeClosed" + node_deactivate_completed = "NodeDeactivateCompleted" + node_deactivate_started = "NodeDeactivateStarted" + node_down = "NodeDown" + node_new_health_report = "NodeNewHealthReport" + node_health_report_expired = "NodeHealthReportExpired" + node_open_succeeded = "NodeOpenSucceeded" + node_open_failed = "NodeOpenFailed" + node_removed_from_cluster = "NodeRemovedFromCluster" + node_up = "NodeUp" + partition_new_health_report = "PartitionNewHealthReport" + partition_health_report_expired = "PartitionHealthReportExpired" + partition_reconfigured = "PartitionReconfigured" + partition_primary_move_analysis = "PartitionPrimaryMoveAnalysis" + service_created = "ServiceCreated" + service_deleted = "ServiceDeleted" + service_new_health_report = "ServiceNewHealthReport" + service_health_report_expired = "ServiceHealthReportExpired" + deployed_service_package_new_health_report = "DeployedServicePackageNewHealthReport" + deployed_service_package_health_report_expired = "DeployedServicePackageHealthReportExpired" + stateful_replica_new_health_report = "StatefulReplicaNewHealthReport" + stateful_replica_health_report_expired = "StatefulReplicaHealthReportExpired" + stateless_replica_new_health_report = "StatelessReplicaNewHealthReport" + stateless_replica_health_report_expired = "StatelessReplicaHealthReportExpired" + cluster_new_health_report = "ClusterNewHealthReport" + cluster_health_report_expired = "ClusterHealthReportExpired" + cluster_upgrade_completed = "ClusterUpgradeCompleted" + cluster_upgrade_domain_completed = "ClusterUpgradeDomainCompleted" + cluster_upgrade_rollback_completed = "ClusterUpgradeRollbackCompleted" + cluster_upgrade_rollback_started = "ClusterUpgradeRollbackStarted" + cluster_upgrade_started = "ClusterUpgradeStarted" + chaos_stopped = "ChaosStopped" + chaos_started = "ChaosStarted" + chaos_code_package_restart_scheduled = "ChaosCodePackageRestartScheduled" + chaos_replica_removal_scheduled = "ChaosReplicaRemovalScheduled" + chaos_partition_secondary_move_scheduled = "ChaosPartitionSecondaryMoveScheduled" + chaos_partition_primary_move_scheduled = "ChaosPartitionPrimaryMoveScheduled" + chaos_replica_restart_scheduled = "ChaosReplicaRestartScheduled" + chaos_node_restart_scheduled = "ChaosNodeRestartScheduled" + + +class HealthEvaluationKind(str, Enum): + + invalid = "Invalid" #: Indicates that the health evaluation is invalid. The value is zero. + event = "Event" #: Indicates that the health evaluation is for a health event. The value is 1. + replicas = "Replicas" #: Indicates that the health evaluation is for the replicas of a partition. The value is 2. + partitions = "Partitions" #: Indicates that the health evaluation is for the partitions of a service. The value is 3. + deployed_service_packages = "DeployedServicePackages" #: Indicates that the health evaluation is for the deployed service packages of a deployed application. The value is 4. + deployed_applications = "DeployedApplications" #: Indicates that the health evaluation is for the deployed applications of an application. The value is 5. + services = "Services" #: Indicates that the health evaluation is for services of an application. The value is 6. + nodes = "Nodes" #: Indicates that the health evaluation is for the cluster nodes. The value is 7. + applications = "Applications" #: Indicates that the health evaluation is for the cluster applications. The value is 8. + system_application = "SystemApplication" #: Indicates that the health evaluation is for the system application. The value is 9. + upgrade_domain_deployed_applications = "UpgradeDomainDeployedApplications" #: Indicates that the health evaluation is for the deployed applications of an application in an upgrade domain. The value is 10. + upgrade_domain_nodes = "UpgradeDomainNodes" #: Indicates that the health evaluation is for the cluster nodes in an upgrade domain. The value is 11. + replica = "Replica" #: Indicates that the health evaluation is for a replica. The value is 13. + partition = "Partition" #: Indicates that the health evaluation is for a partition. The value is 14. + deployed_service_package = "DeployedServicePackage" #: Indicates that the health evaluation is for a deployed service package. The value is 16. + deployed_application = "DeployedApplication" #: Indicates that the health evaluation is for a deployed application. The value is 17. + service = "Service" #: Indicates that the health evaluation is for a service. The value is 15. + node = "Node" #: Indicates that the health evaluation is for a node. The value is 12. + application = "Application" #: Indicates that the health evaluation is for an application. The value is 18. + delta_nodes_check = "DeltaNodesCheck" #: Indicates that the health evaluation is for the delta of unhealthy cluster nodes. The value is 19. + upgrade_domain_delta_nodes_check = "UpgradeDomainDeltaNodesCheck" #: Indicates that the health evaluation is for the delta of unhealthy upgrade domain cluster nodes. The value is 20. + application_type_applications = "ApplicationTypeApplications" #: – Indicates that the health evaluation is for applications of an application type. The value is 21. + node_type_nodes = "NodeTypeNodes" #: – Indicates that the health evaluation is for nodes of a node type. The value is 22. + + +class Ordering(str, Enum): + + desc = "Desc" #: Descending sort order. + asc = "Asc" #: Ascending sort order. + + +class NodeDeactivationIntent(str, Enum): + + invalid = "Invalid" #: Indicates the node deactivation intent is invalid. All Service Fabric enumerations have the invalid type. The value is zero. This value is not used. + pause = "Pause" #: Indicates that the node should be paused. The value is 1. + restart = "Restart" #: Indicates that the intent is for the node to be restarted after a short period of time. Service Fabric does not restart the node, this action is done outside of Service Fabric. The value is 2. + remove_data = "RemoveData" #: Indicates that the intent is to reimage the node. Service Fabric does not reimage the node, this action is done outside of Service Fabric. The value is 3. + remove_node = "RemoveNode" #: Indicates that the node is being decommissioned and is not expected to return. Service Fabric does not decommission the node, this action is done outside of Service Fabric. The value is 4. + + +class NodeDeactivationStatus(str, Enum): + + none = "None" #: No status is associated with the task. The value is zero. + safety_check_in_progress = "SafetyCheckInProgress" #: When a node is deactivated Service Fabric performs checks to ensure that the operation is safe to proceed to ensure availability of the service and reliability of the state. This value indicates that one or more safety checks are in progress. The value is 1. + safety_check_complete = "SafetyCheckComplete" #: When a node is deactivated Service Fabric performs checks to ensure that the operation is safe to proceed to ensure availability of the service and reliability of the state. This value indicates that all safety checks have been completed. The value is 2. + completed = "Completed" #: The task is completed. The value is 3. + + +class NodeDeactivationTaskType(str, Enum): + + invalid = "Invalid" #: Indicates the node deactivation task type is invalid. All Service Fabric enumerations have the invalid type. The value is zero. This value is not used. + infrastructure = "Infrastructure" #: Specifies the task created by Infrastructure hosting the nodes. The value is 1. + repair = "Repair" #: Specifies the task that was created by the Repair Manager service. The value is 2. + client = "Client" #: Specifies that the task was created by using the public API. The value is 3. + + +class NodeStatus(str, Enum): + + invalid = "Invalid" #: Indicates the node status is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + up = "Up" #: Indicates the node is up. The value is 1. + down = "Down" #: Indicates the node is down. The value is 2. + enabling = "Enabling" #: Indicates the node is in process of being enabled. The value is 3. + disabling = "Disabling" #: Indicates the node is in the process of being disabled. The value is 4. + disabled = "Disabled" #: Indicates the node is disabled. The value is 5. + unknown = "Unknown" #: Indicates the node is unknown. A node would be in Unknown state if Service Fabric does not have authoritative information about that node. This can happen if the system learns about a node at runtime.The value is 6. + removed = "Removed" #: Indicates the node is removed. A node would be in Removed state if NodeStateRemoved API has been called for this node. In other words, Service Fabric has been informed that the persisted state on the node has been permanently lost. The value is 7. + + +class ServicePartitionStatus(str, Enum): + + invalid = "Invalid" #: Indicates the partition status is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + ready = "Ready" #: Indicates that the partition is ready. This means that for a stateless service partition there is at least one instance that is up and for a stateful service partition the number of ready replicas is greater than or equal to the MinReplicaSetSize. The value is 1. + not_ready = "NotReady" #: Indicates that the partition is not ready. This status is returned when none of the other states apply. The value is 2. + in_quorum_loss = "InQuorumLoss" #: Indicates that the partition is in quorum loss. This means that number of replicas that are up and participating in a replica set is less than MinReplicaSetSize for this partition. The value is 3. + reconfiguring = "Reconfiguring" #: Indicates that the partition is undergoing reconfiguration of its replica sets. This can happen due to failover, upgrade, load balancing or addition or removal of replicas from the replica set. The value is 4. + deleting = "Deleting" #: Indicates that the partition is being deleted. The value is 5. + + +class ServiceStatus(str, Enum): + + unknown = "Unknown" #: Indicates the service status is unknown. The value is zero. + active = "Active" #: Indicates the service status is active. The value is 1. + upgrading = "Upgrading" #: Indicates the service is upgrading. The value is 2. + deleting = "Deleting" #: Indicates the service is being deleted. The value is 3. + creating = "Creating" #: Indicates the service is being created. The value is 4. + failed = "Failed" #: Indicates creation or deletion was terminated due to persistent failures. Another create/delete request can be accepted. The value is 5. + + +class ProvisionApplicationTypeKind(str, Enum): + + invalid = "Invalid" #: Indicates that the provision kind is invalid. This value is default and should not be used. The value is zero. + image_store_path = "ImageStorePath" #: Indicates that the provision is for a package that was previously uploaded to the image store. The value is 1. + external_store = "ExternalStore" #: Indicates that the provision is for an application package that was previously uploaded to an external store. The application package ends with the extension *.sfpkg. The value is 2. + + +class UpgradeType(str, Enum): + + invalid = "Invalid" #: Indicates the upgrade kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + rolling = "Rolling" #: The upgrade progresses one upgrade domain at a time. The value is 1. + rolling_force_restart = "Rolling_ForceRestart" #: The upgrade gets restarted by force. The value is 2. + + +class SafetyCheckKind(str, Enum): + + invalid = "Invalid" #: Indicates that the upgrade safety check kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + ensure_seed_node_quorum = "EnsureSeedNodeQuorum" #: Indicates that if we bring down the node then this will result in global seed node quorum loss. The value is 1. + ensure_partition_quorum = "EnsurePartitionQuorum" #: Indicates that there is some partition for which if we bring down the replica on the node, it will result in quorum loss for that partition. The value is 2. + wait_for_primary_placement = "WaitForPrimaryPlacement" #: Indicates that there is some replica on the node that was moved out of this node due to upgrade. Service Fabric is now waiting for the primary to be moved back to this node. The value is 3. + wait_for_primary_swap = "WaitForPrimarySwap" #: Indicates that Service Fabric is waiting for a primary replica to be moved out of the node before starting upgrade on that node. The value is 4. + wait_for_reconfiguration = "WaitForReconfiguration" #: Indicates that there is some replica on the node that is involved in a reconfiguration. Service Fabric is waiting for the reconfiguration to be complete before staring upgrade on that node. The value is 5. + wait_for_inbuild_replica = "WaitForInbuildReplica" #: Indicates that there is either a replica on the node that is going through copy, or there is a primary replica on the node that is copying data to some other replica. In both cases, bringing down the replica on the node due to upgrade will abort the copy. The value is 6. + ensure_availability = "EnsureAvailability" #: Indicates that there is either a stateless service partition on the node having exactly one instance, or there is a primary replica on the node for which the partition is quorum loss. In both cases, bringing down the replicas due to upgrade will result in loss of availability. The value is 7. + + +class CreateFabricDump(str, Enum): + + false = "False" + true = "True" + + +class ServicePackageActivationMode(str, Enum): + + shared_process = "SharedProcess" #: This is the default activation mode. With this activation mode, replicas or instances from different partition(s) of service, on a given node, will share same activation of service package on a node. The value is zero. + exclusive_process = "ExclusiveProcess" #: With this activation mode, each replica or instance of service, on a given node, will have its own dedicated activation of service package on a node. The value is 1. + + +class ServiceKind(str, Enum): + + invalid = "Invalid" #: Indicates the service kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + stateless = "Stateless" #: Does not use Service Fabric to make its state highly available or reliable. The value is 1. + stateful = "Stateful" #: Uses Service Fabric to make its state or part of its state highly available and reliable. The value is 2. + + +class ServicePartitionKind(str, Enum): + + invalid = "Invalid" #: Indicates the partition kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + singleton = "Singleton" #: Indicates that there is only one partition, and SingletonPartitionSchemeDescription was specified while creating the service. The value is 1. + int64_range = "Int64Range" #: Indicates that the partition is based on Int64 key ranges, and UniformInt64RangePartitionSchemeDescription was specified while creating the service. The value is 2. + named = "Named" #: Indicates that the partition is based on string names, and NamedPartitionInformation was specified while creating the service. The value is 3. + + +class ServicePlacementPolicyType(str, Enum): + + invalid = "Invalid" #: Indicates the type of the placement policy is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + invalid_domain = "InvalidDomain" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementInvalidDomainPolicyDescription, which indicates that a particular fault or upgrade domain cannot be used for placement of this service. The value is 1. + require_domain = "RequireDomain" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription indicating that the replicas of the service must be placed in a specific domain. The value is 2. + prefer_primary_domain = "PreferPrimaryDomain" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the Primary replica for the partitions of the service should be located in a particular domain as an optimization. The value is 3. + require_domain_distribution = "RequireDomainDistribution" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription, indicating that the system will disallow placement of any two replicas from the same partition in the same domain at any time. The value is 4. + non_partially_place_service = "NonPartiallyPlaceService" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible all replicas of a particular partition of the service should be placed atomically. The value is 5. + allow_multiple_stateless_instances_on_node = "AllowMultipleStatelessInstancesOnNode" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, which indicates that multiple stateless instances of a particular partition of the service can be placed on a node. The value is 6. + + +class ServiceLoadMetricWeight(str, Enum): + + zero = "Zero" #: Disables resource balancing for this metric. This value is zero. + low = "Low" #: Specifies the metric weight of the service load as Low. The value is 1. + medium = "Medium" #: Specifies the metric weight of the service load as Medium. The value is 2. + high = "High" #: Specifies the metric weight of the service load as High. The value is 3. + + +class HostType(str, Enum): + + invalid = "Invalid" #: Indicates the type of host is not known or invalid. The value is 0. + exe_host = "ExeHost" #: Indicates the host is an executable. The value is 1. + container_host = "ContainerHost" #: Indicates the host is a container. The value is 2. + + +class HostIsolationMode(str, Enum): + + none = "None" #: Indicates the isolation mode is not applicable for given HostType. The value is 0. + process = "Process" #: This is the default isolation mode for a ContainerHost. The value is 1. + hyper_v = "HyperV" #: Indicates the ContainerHost is a Hyper-V container. This applies to only Windows containers. The value is 2. + + +class DeploymentStatus(str, Enum): + + invalid = "Invalid" #: Indicates status of the application or service package is not known or invalid. The value is 0. + downloading = "Downloading" #: Indicates the application or service package is being downloaded to the node from the ImageStore. The value is 1. + activating = "Activating" #: Indicates the application or service package is being activated. The value is 2. + active = "Active" #: Indicates the application or service package is active the node. The value is 3. + upgrading = "Upgrading" #: Indicates the application or service package is being upgraded. The value is 4. + deactivating = "Deactivating" #: Indicates the application or service package is being deactivated. The value is 5. + ran_to_completion = "RanToCompletion" #: Indicates the application or service package has ran to completion successfully. The value is 6. + failed = "Failed" #: Indicates the application or service package has failed to run to completion. The value is 7. + + +class EntryPointStatus(str, Enum): + + invalid = "Invalid" #: Indicates status of entry point is not known or invalid. The value is 0. + pending = "Pending" #: Indicates the entry point is scheduled to be started. The value is 1. + starting = "Starting" #: Indicates the entry point is being started. The value is 2. + started = "Started" #: Indicates the entry point was started successfully and is running. The value is 3. + stopping = "Stopping" #: Indicates the entry point is being stopped. The value is 4. + stopped = "Stopped" #: Indicates the entry point is not running. The value is 5. + + +class ChaosStatus(str, Enum): + + invalid = "Invalid" #: Indicates an invalid Chaos status. All Service Fabric enumerations have the invalid type. The value is zero. + running = "Running" #: Indicates that Chaos is not stopped. The value is one. + stopped = "Stopped" #: Indicates that Chaos is not scheduling further faults. The value is two. + + +class ChaosScheduleStatus(str, Enum): + + invalid = "Invalid" #: Indicates an invalid Chaos Schedule status. All Service Fabric enumerations have the invalid type. The value is zero. + stopped = "Stopped" #: Indicates that the schedule is stopped and not being used to schedule runs of chaos. The value is one. + active = "Active" #: Indicates that the schedule is active and is being used to schedule runs of Chaos. The value is two. + expired = "Expired" #: Indicates that the schedule is expired and will no longer be used to schedule runs of Chaos. The value is three. + pending = "Pending" #: Indicates that the schedule is pending and is not yet being used to schedule runs of Chaos but will be used when the start time is passed. The value is four. + + +class ChaosEventKind(str, Enum): + + invalid = "Invalid" #: Indicates an invalid Chaos event kind. All Service Fabric enumerations have the invalid type. + started = "Started" #: Indicates a Chaos event that gets generated when Chaos is started. + executing_faults = "ExecutingFaults" #: Indicates a Chaos event that gets generated when Chaos has decided on the faults for an iteration. This Chaos event contains the details of the faults as a list of strings. + waiting = "Waiting" #: Indicates a Chaos event that gets generated when Chaos is waiting for the cluster to become ready for faulting, for example, Chaos may be waiting for the on-going upgrade to finish. + validation_failed = "ValidationFailed" #: Indicates a Chaos event that gets generated when the cluster entities do not become stable and healthy within ChaosParameters.MaxClusterStabilizationTimeoutInSeconds. + test_error = "TestError" #: Indicates a Chaos event that gets generated when an unexpected event has occurred in the Chaos engine, for example, due to the cluster snapshot being inconsistent, while faulting a faultable entity Chaos found that the entity was already faulted. + stopped = "Stopped" #: Indicates a Chaos event that gets generated when Chaos stops because either the user issued a stop or the time to run was up. + + +class ComposeDeploymentStatus(str, Enum): + + invalid = "Invalid" #: Indicates that the compose deployment status is invalid. The value is zero. + provisioning = "Provisioning" #: Indicates that the compose deployment is being provisioned in background. The value is 1. + creating = "Creating" #: Indicates that the compose deployment is being created in background. The value is 2. + ready = "Ready" #: Indicates that the compose deployment has been successfully created or upgraded. The value is 3. + unprovisioning = "Unprovisioning" #: Indicates that the compose deployment is being unprovisioned in background. The value is 4. + deleting = "Deleting" #: Indicates that the compose deployment is being deleted in background. The value is 5. + failed = "Failed" #: Indicates that the compose deployment was terminated due to persistent failures. The value is 6. + upgrading = "Upgrading" #: Indicates that the compose deployment is being upgraded in the background. The value is 7. + + +class ComposeDeploymentUpgradeState(str, Enum): + + invalid = "Invalid" #: Indicates the upgrade state is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + provisioning_target = "ProvisioningTarget" #: The upgrade is in the progress of provisioning target application type version. The value is 1. + rolling_forward_in_progress = "RollingForwardInProgress" #: The upgrade is rolling forward to the target version but is not complete yet. The value is 2. + rolling_forward_pending = "RollingForwardPending" #: The current upgrade domain has finished upgrading. The overall upgrade is waiting for an explicit move next request in UnmonitoredManual mode or performing health checks in Monitored mode. The value is 3 + unprovisioning_current = "UnprovisioningCurrent" #: The upgrade is in the progress of unprovisioning current application type version and rolling forward to the target version is completed. The value is 4. + rolling_forward_completed = "RollingForwardCompleted" #: The upgrade has finished rolling forward. The value is 5. + rolling_back_in_progress = "RollingBackInProgress" #: The upgrade is rolling back to the previous version but is not complete yet. The value is 6. + unprovisioning_target = "UnprovisioningTarget" #: The upgrade is in the progress of unprovisioning target application type version and rolling back to the current version is completed. The value is 7. + rolling_back_completed = "RollingBackCompleted" #: The upgrade has finished rolling back. The value is 8. + failed = "Failed" #: The upgrade has failed and is unable to execute FailureAction. The value is 9. + + +class ServiceCorrelationScheme(str, Enum): + + invalid = "Invalid" #: An invalid correlation scheme. Cannot be used. The value is zero. + affinity = "Affinity" #: Indicates that this service has an affinity relationship with another service. Provided for backwards compatibility, consider preferring the Aligned or NonAlignedAffinity options. The value is 1. + aligned_affinity = "AlignedAffinity" #: Aligned affinity ensures that the primaries of the partitions of the affinitized services are collocated on the same nodes. This is the default and is the same as selecting the Affinity scheme. The value is 2. + non_aligned_affinity = "NonAlignedAffinity" #: Non-Aligned affinity guarantees that all replicas of each service will be placed on the same nodes. Unlike Aligned Affinity, this does not guarantee that replicas of particular role will be collocated. The value is 3. + + +class MoveCost(str, Enum): + + zero = "Zero" #: Zero move cost. This value is zero. + low = "Low" #: Specifies the move cost of the service as Low. The value is 1. + medium = "Medium" #: Specifies the move cost of the service as Medium. The value is 2. + high = "High" #: Specifies the move cost of the service as High. The value is 3. + very_high = "VeryHigh" #: Specifies the move cost of the service as VeryHigh. The value is 4. + + +class PartitionScheme(str, Enum): + + invalid = "Invalid" #: Indicates the partition kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + singleton = "Singleton" #: Indicates that the partition is based on string names, and is a SingletonPartitionSchemeDescription object, The value is 1. + uniform_int64_range = "UniformInt64Range" #: Indicates that the partition is based on Int64 key ranges, and is a UniformInt64RangePartitionSchemeDescription object. The value is 2. + named = "Named" #: Indicates that the partition is based on string names, and is a NamedPartitionSchemeDescription object. The value is 3 + + +class ServiceOperationName(str, Enum): + + unknown = "Unknown" #: Reserved for future use. + none = "None" #: The service replica or instance is not going through any life-cycle changes. + open = "Open" #: The service replica or instance is being opened. + change_role = "ChangeRole" #: The service replica is changing roles. + close = "Close" #: The service replica or instance is being closed. + abort = "Abort" #: The service replica or instance is being aborted. + + +class ReplicatorOperationName(str, Enum): + + invalid = "Invalid" #: Default value if the replicator is not yet ready. + none = "None" #: Replicator is not running any operation from Service Fabric perspective. + open = "Open" #: Replicator is opening. + change_role = "ChangeRole" #: Replicator is in the process of changing its role. + update_epoch = "UpdateEpoch" #: Due to a change in the replica set, replicator is being updated with its Epoch. + close = "Close" #: Replicator is closing. + abort = "Abort" #: Replicator is being aborted. + on_data_loss = "OnDataLoss" #: Replicator is handling the data loss condition, where the user service may potentially be recovering state from an external source. + wait_for_catchup = "WaitForCatchup" #: Replicator is waiting for a quorum of replicas to be caught up to the latest state. + build = "Build" #: Replicator is in the process of building one or more replicas. + + +class PartitionAccessStatus(str, Enum): + + invalid = "Invalid" #: Indicates that the read or write operation access status is not valid. This value is not returned to the caller. + granted = "Granted" #: Indicates that the read or write operation access is granted and the operation is allowed. + reconfiguration_pending = "ReconfigurationPending" #: Indicates that the client should try again later, because a reconfiguration is in progress. + not_primary = "NotPrimary" #: Indicates that this client request was received by a replica that is not a Primary replica. + no_write_quorum = "NoWriteQuorum" #: Indicates that no write quorum is available and, therefore, no write operation can be accepted. + + +class FabricReplicaStatus(str, Enum): + + invalid = "Invalid" #: Indicates that the read or write operation access status is not valid. This value is not returned to the caller. + down = "Down" #: Indicates that the replica is down. + up = "Up" #: Indicates that the replica is up. + + +class ReplicaKind(str, Enum): + + invalid = "Invalid" #: Represents an invalid replica kind. The value is zero. + key_value_store = "KeyValueStore" #: Represents a key value store replica. The value is 1 + + +class ServiceTypeRegistrationStatus(str, Enum): + + invalid = "Invalid" #: Indicates the registration status is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + disabled = "Disabled" #: Indicates that the service type is disabled on this node. A type gets disabled when there are too many failures of the code package hosting the service type. If the service type is disabled, new replicas of that service type will not be placed on the node until it is enabled again. The service type is enabled again after the process hosting it comes up and re-registers the type or a preconfigured time interval has passed. The value is 1. + enabled = "Enabled" #: Indicates that the service type is enabled on this node. Replicas of this service type can be placed on this node when the code package registers the service type. The value is 2. + registered = "Registered" #: Indicates that the service type is enabled and registered on the node by a code package. Replicas of this service type can now be placed on this node. The value is 3. + + +class ServiceEndpointRole(str, Enum): + + invalid = "Invalid" #: Indicates the service endpoint role is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + stateless = "Stateless" #: Indicates that the service endpoint is of a stateless service. The value is 1. + stateful_primary = "StatefulPrimary" #: Indicates that the service endpoint is of a primary replica of a stateful service. The value is 2. + stateful_secondary = "StatefulSecondary" #: Indicates that the service endpoint is of a secondary replica of a stateful service. The value is 3. + + +class OperationState(str, Enum): + + invalid = "Invalid" #: The operation state is invalid. + running = "Running" #: The operation is in progress. + rolling_back = "RollingBack" #: The operation is rolling back internal system state because it encountered a fatal error or was cancelled by the user. "RollingBack" does not refer to user state. For example, if CancelOperation is called on a command of type PartitionDataLoss, state of "RollingBack" does not mean service data is being restored (assuming the command has progressed far enough to cause data loss). It means the system is rolling back/cleaning up internal system state associated with the command. + completed = "Completed" #: The operation has completed successfully and is no longer running. + faulted = "Faulted" #: The operation has failed and is no longer running. + cancelled = "Cancelled" #: The operation was cancelled by the user using CancelOperation, and is no longer running. + force_cancelled = "ForceCancelled" #: The operation was cancelled by the user using CancelOperation, with the force parameter set to true. It is no longer running. Refer to CancelOperation for more details. + + +class OperationType(str, Enum): + + invalid = "Invalid" #: The operation state is invalid. + partition_data_loss = "PartitionDataLoss" #: An operation started using the StartDataLoss API. + partition_quorum_loss = "PartitionQuorumLoss" #: An operation started using the StartQuorumLoss API. + partition_restart = "PartitionRestart" #: An operation started using the StartPartitionRestart API. + node_transition = "NodeTransition" #: An operation started using the StartNodeTransition API. + + +class PackageSharingPolicyScope(str, Enum): + + none = "None" #: No package sharing policy scope. The value is 0. + all = "All" #: Share all code, config and data packages from corresponding service manifest. The value is 1. + code = "Code" #: Share all code packages from corresponding service manifest. The value is 2. + config = "Config" #: Share all config packages from corresponding service manifest. The value is 3. + data = "Data" #: Share all data packages from corresponding service manifest. The value is 4. + + +class PropertyValueKind(str, Enum): + + invalid = "Invalid" #: Indicates the property is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + binary = "Binary" #: The data inside the property is a binary blob. The value is 1. + int64 = "Int64" #: The data inside the property is an int64. The value is 2. + double = "Double" #: The data inside the property is a double. The value is 3. + string = "String" #: The data inside the property is a string. The value is 4. + guid = "Guid" #: The data inside the property is a guid. The value is 5. + + +class PropertyBatchOperationKind(str, Enum): + + invalid = "Invalid" #: Indicates the property operation is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + put = "Put" #: The operation will create or edit a property. The value is 1. + get = "Get" #: The operation will get a property. The value is 2. + check_exists = "CheckExists" #: The operation will check that a property exists or doesn't exists, depending on the provided value. The value is 3. + check_sequence = "CheckSequence" #: The operation will ensure that the sequence number is equal to the provided value. The value is 4. + delete = "Delete" #: The operation will delete a property. The value is 5. + check_value = "CheckValue" #: The operation will ensure that the value of a property is equal to the provided value. The value is 7. + + +class PropertyBatchInfoKind(str, Enum): + + invalid = "Invalid" #: Indicates the property batch info is invalid. All Service Fabric enumerations have the invalid type. + successful = "Successful" #: The property batch succeeded. + failed = "Failed" #: The property batch failed. + + +class RetentionPolicyType(str, Enum): + + basic = "Basic" #: Indicates a basic retention policy type. + invalid = "Invalid" #: Indicates an invalid retention policy type. + + +class BackupStorageKind(str, Enum): + + invalid = "Invalid" #: Indicates an invalid backup storage kind. All Service Fabric enumerations have the invalid type. + file_share = "FileShare" #: Indicates file/ SMB share to be used as backup storage. + azure_blob_store = "AzureBlobStore" #: Indicates Azure blob store to be used as backup storage. + dsms_azure_blob_store = "DsmsAzureBlobStore" #: Indicates Dsms Azure blob store to be used as backup storage. + managed_identity_azure_blob_store = "ManagedIdentityAzureBlobStore" #: Indicates Azure blob store to be used as backup storage using managed identity. + + +class BackupScheduleKind(str, Enum): + + invalid = "Invalid" #: Indicates an invalid backup schedule kind. All Service Fabric enumerations have the invalid type. + time_based = "TimeBased" #: Indicates a time-based backup schedule. + frequency_based = "FrequencyBased" #: Indicates a frequency-based backup schedule. + + +class BackupPolicyScope(str, Enum): + + invalid = "Invalid" #: Indicates an invalid backup policy scope type. All Service Fabric enumerations have the invalid type. + partition = "Partition" #: Indicates the backup policy is applied at partition level. Hence overriding any policy which may have applied at partition's service or application level. + service = "Service" #: Indicates the backup policy is applied at service level. All partitions of the service inherit this policy unless explicitly overridden at partition level. + application = "Application" #: Indicates the backup policy is applied at application level. All services and partitions of the application inherit this policy unless explicitly overridden at service or partition level. + + +class BackupSuspensionScope(str, Enum): + + invalid = "Invalid" #: Indicates an invalid backup suspension scope type also indicating entity is not suspended. All Service Fabric enumerations have the invalid type. + partition = "Partition" #: Indicates the backup suspension is applied at partition level. + service = "Service" #: Indicates the backup suspension is applied at service level. All partitions of the service are hence suspended for backup. + application = "Application" #: Indicates the backup suspension is applied at application level. All services and partitions of the application are hence suspended for backup. + + +class RestoreState(str, Enum): + + invalid = "Invalid" #: Indicates an invalid restore state. All Service Fabric enumerations have the invalid type. + accepted = "Accepted" #: Operation has been validated and accepted. Restore is yet to be triggered. + restore_in_progress = "RestoreInProgress" #: Restore operation has been triggered and is under process. + success = "Success" #: Operation completed with success. + failure = "Failure" #: Operation completed with failure. + timeout = "Timeout" #: Operation timed out. + + +class BackupType(str, Enum): + + invalid = "Invalid" #: Indicates an invalid backup type. All Service Fabric enumerations have the invalid type. + full = "Full" #: Indicates a full backup. + incremental = "Incremental" #: Indicates an incremental backup. A backup chain is comprised of a full backup followed by 0 or more incremental backups. + + +class ManagedIdentityType(str, Enum): + + invalid = "Invalid" #: Indicates an invalid managed identity type. All Service Fabric enumerations have the invalid type. + vmss = "VMSS" #: Indicates VMSS managed identity should be used to connect to Azure blob store. + cluster = "Cluster" #: Indicates cluster managed identity should be used to connect to Azure blob store. + + +class BackupScheduleFrequencyType(str, Enum): + + invalid = "Invalid" #: Indicates an invalid backup schedule frequency type. All Service Fabric enumerations have the invalid type. + daily = "Daily" #: Indicates that the time based backup schedule is repeated at a daily frequency. + weekly = "Weekly" #: Indicates that the time based backup schedule is repeated at a weekly frequency. + + +class DayOfWeek(str, Enum): + + sunday = "Sunday" #: Indicates the Day referred is Sunday. + monday = "Monday" #: Indicates the Day referred is Monday. + tuesday = "Tuesday" #: Indicates the Day referred is Tuesday. + wednesday = "Wednesday" #: Indicates the Day referred is Wednesday. + thursday = "Thursday" #: Indicates the Day referred is Thursday. + friday = "Friday" #: Indicates the Day referred is Friday. + saturday = "Saturday" #: Indicates the Day referred is Saturday. + + +class BackupState(str, Enum): + + invalid = "Invalid" #: Indicates an invalid backup state. All Service Fabric enumerations have the invalid type. + accepted = "Accepted" #: Operation has been validated and accepted. Backup is yet to be triggered. + backup_in_progress = "BackupInProgress" #: Backup operation has been triggered and is under process. + success = "Success" #: Operation completed with success. + failure = "Failure" #: Operation completed with failure. + timeout = "Timeout" #: Operation timed out. + + +class BackupEntityKind(str, Enum): + + invalid = "Invalid" #: Indicates an invalid entity kind. All Service Fabric enumerations have the invalid type. + partition = "Partition" #: Indicates the entity is a Service Fabric partition. + service = "Service" #: Indicates the entity is a Service Fabric service. + application = "Application" #: Indicates the entity is a Service Fabric application. + + +class ImpactLevel(str, Enum): + + invalid = "Invalid" + none = "None" + restart = "Restart" + remove_data = "RemoveData" + remove_node = "RemoveNode" + + +class RepairImpactKind(str, Enum): + + invalid = "Invalid" #: The repair impact is not valid or is of an unknown type. + node = "Node" #: The repair impact affects a set of Service Fabric nodes. + + +class RepairTargetKind(str, Enum): + + invalid = "Invalid" #: The repair target is not valid or is of an unknown type. + node = "Node" #: The repair target is a set of Service Fabric nodes. + + +class State(str, Enum): + + invalid = "Invalid" #: Indicates that the repair task state is invalid. All Service Fabric enumerations have the invalid value. + created = "Created" #: Indicates that the repair task has been created. + claimed = "Claimed" #: Indicates that the repair task has been claimed by a repair executor. + preparing = "Preparing" #: Indicates that the Repair Manager is preparing the system to handle the impact of the repair task, usually by taking resources offline gracefully. + approved = "Approved" #: Indicates that the repair task has been approved by the Repair Manager and is safe to execute. + executing = "Executing" #: Indicates that execution of the repair task is in progress. + restoring = "Restoring" #: Indicates that the Repair Manager is restoring the system to its pre-repair state, usually by bringing resources back online. + completed = "Completed" #: Indicates that the repair task has completed, and no further state changes will occur. + + +class ResultStatus(str, Enum): + + invalid = "Invalid" #: Indicates that the repair task result is invalid. All Service Fabric enumerations have the invalid value. + succeeded = "Succeeded" #: Indicates that the repair task completed execution successfully. + cancelled = "Cancelled" #: Indicates that the repair task was cancelled prior to execution. + interrupted = "Interrupted" #: Indicates that execution of the repair task was interrupted by a cancellation request after some work had already been performed. + failed = "Failed" #: Indicates that there was a failure during execution of the repair task. Some work may have been performed. + pending = "Pending" #: Indicates that the repair task result is not yet available, because the repair task has not finished executing. + + +class RepairTaskHealthCheckState(str, Enum): + + not_started = "NotStarted" #: Indicates that the health check has not started. + in_progress = "InProgress" #: Indicates that the health check is in progress. + succeeded = "Succeeded" #: Indicates that the health check succeeded. + skipped = "Skipped" #: Indicates that the health check was skipped. + timed_out = "TimedOut" #: Indicates that the health check timed out. + + +class ScalingTriggerKind(str, Enum): + + invalid = "Invalid" #: Indicates the scaling trigger is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + average_partition_load = "AveragePartitionLoad" #: Indicates a trigger where scaling decisions are made based on average load of a partition. The value is 1. + average_service_load = "AverageServiceLoad" #: Indicates a trigger where scaling decisions are made based on average load of a service. The value is 2. + + +class ScalingMechanismKind(str, Enum): + + invalid = "Invalid" #: Indicates the scaling mechanism is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + partition_instance_count = "PartitionInstanceCount" #: Indicates a mechanism for scaling where new instances are added or removed from a partition. The value is 1. + 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 ServiceHostUpgradeImpact(str, Enum): + + invalid = "Invalid" #: Indicates the upgrade impact is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + none = "None" #: The upgrade is not expected to cause service host restarts. The value is 1. + service_host_restart = "ServiceHostRestart" #: The upgrade is expected to cause a service host restart. The value is 2. + unexpected_service_host_restart = "UnexpectedServiceHostRestart" #: The upgrade will cause an unexpected service host restart. This indicates a bug in the Service Fabric runtime and proceeding with an upgrade with this impact may lead to skipped safety checks. Running the upgrade with the ForceRestart flag will force proper safety checks. The value is 3. + + +class ResourceStatus(str, Enum): + + unknown = "Unknown" #: Indicates the resource status is unknown. The value is zero. + ready = "Ready" #: Indicates the resource is ready. The value is 1. + upgrading = "Upgrading" #: Indicates the resource is upgrading. The value is 2. + creating = "Creating" #: Indicates the resource is being created. The value is 3. + deleting = "Deleting" #: Indicates the resource is being deleted. The value is 4. + failed = "Failed" #: Indicates the resource is not functional due to persistent failures. See statusDetails property for more details. The value is 5. + + +class SecretKind(str, Enum): + + inlined_value = "inlinedValue" #: A simple secret resource whose plaintext value is provided by the user. + key_vault_versioned_reference = "keyVaultVersionedReference" #: A secret resource that references a specific version of a secret stored in Azure Key Vault; the expected value is a versioned KeyVault URI corresponding to the version of the secret being referenced. + + +class VolumeProvider(str, Enum): + + sf_azure_file = "SFAzureFile" #: Provides volumes that are backed by Azure Files. + + +class SizeTypes(str, Enum): + + small = "Small" + medium = "Medium" + large = "Large" + + +class ApplicationScopedVolumeKind(str, Enum): + + service_fabric_volume_disk = "ServiceFabricVolumeDisk" #: Provides Service Fabric High Availability Volume Disk + + +class NetworkKind(str, Enum): + + local = "Local" #: Indicates a container network local to a single Service Fabric cluster. The value is 1. + + +class HeaderMatchType(str, Enum): + + exact = "exact" + + +class OperatingSystemType(str, Enum): + + linux = "Linux" #: The required operating system is Linux. + windows = "Windows" #: The required operating system is Windows. + + +class ImageRegistryPasswordType(str, Enum): + + clear_text = "ClearText" #: The image registry password in clear text, will not be processed in any way and used directly + key_vault_reference = "KeyVaultReference" #: The URI to a KeyVault secret version, will be resolved using the application's managed identity (this type is only valid if the app was assigned a managed identity) before getting used + secret_value_reference = "SecretValueReference" #: The reference to a SecretValue resource, will be resolved before getting used + + +class EnvironmentVariableType(str, Enum): + + clear_text = "ClearText" #: The environment variable in clear text, will not be processed in any way and passed in as is + key_vault_reference = "KeyVaultReference" #: The URI to a KeyVault secret version, will be resolved using the application's managed identity (this type is only valid if the app was assigned a managed identity) before getting passed in + secret_value_reference = "SecretValueReference" #: The reference to a SecretValue resource, will be resolved before getting passed in + + +class SettingType(str, Enum): + + clear_text = "ClearText" #: The setting in clear text, will not be processed in any way and passed in as is + key_vault_reference = "KeyVaultReference" #: The URI to a KeyVault secret version, will be resolved using the application's managed identity (this type is only valid if the app was assigned a managed identity) before getting passed in + secret_value_reference = "SecretValueReference" #: The reference to a SecretValue resource, will be resolved before getting passed in + + +class Scheme(str, Enum): + + http = "http" #: Indicates that the probe is http. + https = "https" #: Indicates that the probe is https. No cert validation. + + +class ApplicationResourceUpgradeState(str, Enum): + + invalid = "Invalid" #: Indicates the upgrade state is invalid. All Service Fabric enumerations have the invalid type. The value is 0. + provisioning_target = "ProvisioningTarget" #: The upgrade is in the progress of provisioning target application type version. The value is 1. + rolling_forward = "RollingForward" #: The upgrade is rolling forward to the target version but is not complete yet. The value is 2. + unprovisioning_current = "UnprovisioningCurrent" #: The upgrade is in the progress of unprovisioning current application type version and rolling forward to the target version is completed. The value is 3. + completed_rollforward = "CompletedRollforward" #: The upgrade has finished rolling forward. The value is 4. + rolling_back = "RollingBack" #: The upgrade is rolling back to the previous version but is not complete yet. The value is 5. + unprovisioning_target = "UnprovisioningTarget" #: The upgrade is in the progress of unprovisioning target application type version and rolling back to the current version is completed. The value is 6. + completed_rollback = "CompletedRollback" #: The upgrade has finished rolling back. The value is 7. + failed = "Failed" #: The upgrade has failed and is unable to execute FailureAction. The value is 8. + + +class RollingUpgradeMode(str, Enum): + + invalid = "Invalid" #: Indicates the upgrade mode is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + unmonitored_auto = "UnmonitoredAuto" #: The upgrade will proceed automatically without performing any health monitoring. The value is 1 + unmonitored_manual = "UnmonitoredManual" #: The upgrade will stop after completing each upgrade domain, giving the opportunity to manually monitor health before proceeding. The value is 2 + monitored = "Monitored" #: The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. The value is 3 + + +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 AutoScalingMechanismKind(str, Enum): + + add_remove_replica = "AddRemoveReplica" #: Indicates that scaling should be performed by adding or removing replicas. + + +class AutoScalingMetricKind(str, Enum): + + resource = "Resource" #: Indicates that the metric is one of resources, like cpu or memory. + + +class AutoScalingResourceMetricName(str, Enum): + + cpu = "cpu" #: Indicates that the resource is CPU cores. + memory_in_gb = "memoryInGB" #: Indicates that the resource is memory in GB. + + +class AutoScalingTriggerKind(str, Enum): + + average_load = "AverageLoad" #: Indicates that scaling should be performed based on average load of all replicas in the service. + + +class ExecutionPolicyType(str, Enum): + + default = "Default" #: Indicates the default execution policy, always restart the service if an exit occurs. + run_to_completion = "RunToCompletion" #: Indicates that the service will perform its desired operation and complete successfully. If the service encounters failure, it will restarted based on restart policy specified. If the service completes its operation successfully, it will not be restarted again. + + +class RestartPolicy(str, Enum): + + on_failure = "OnFailure" #: Service will be restarted when it encounters a failure. + never = "Never" #: Service will never be restarted. If the service encounters a failure, it will move to Failed state. + + +class NodeStatusFilter(str, Enum): + + default = "default" #: This filter value will match all of the nodes excepts the ones with status as Unknown or Removed. + all = "all" #: This filter value will match all of the nodes. + up = "up" #: This filter value will match nodes that are Up. + down = "down" #: This filter value will match nodes that are Down. + enabling = "enabling" #: This filter value will match nodes that are in the process of being enabled with status as Enabling. + disabling = "disabling" #: This filter value will match nodes that are in the process of being disabled with status as Disabling. + disabled = "disabled" #: This filter value will match nodes that are Disabled. + unknown = "unknown" #: This filter value will match nodes whose status is Unknown. A node would be in Unknown state if Service Fabric does not have authoritative information about that node. This can happen if the system learns about a node at runtime. + removed = "removed" #: This filter value will match nodes whose status is Removed. These are the nodes that are removed from the cluster using the RemoveNodeState API. + + +class ReplicaHealthReportServiceKind(str, Enum): + + stateless = "Stateless" #: Does not use Service Fabric to make its state highly available or reliable. The value is 1 + stateful = "Stateful" #: Uses Service Fabric to make its state or part of its state highly available and reliable. The value is 2. + + +class DataLossMode(str, Enum): + + invalid = "Invalid" #: Reserved. Do not pass into API. + partial_data_loss = "PartialDataLoss" #: PartialDataLoss option will cause a quorum of replicas to go down, triggering an OnDataLoss event in the system for the given partition. + full_data_loss = "FullDataLoss" #: FullDataLoss option will drop all the replicas which means that all the data will be lost. + + +class NodeTransitionType(str, Enum): + + invalid = "Invalid" #: Reserved. Do not pass into API. + start = "Start" #: Transition a stopped node to up. + stop = "Stop" #: Transition an up node to stopped. + + +class QuorumLossMode(str, Enum): + + invalid = "Invalid" #: Reserved. Do not pass into API. + quorum_replicas = "QuorumReplicas" #: Partial Quorum loss mode : Minimum number of replicas for a partition will be down that will cause a quorum loss. + all_replicas = "AllReplicas" + + +class RestartPartitionMode(str, Enum): + + invalid = "Invalid" #: Reserved. Do not pass into API. + all_replicas_or_instances = "AllReplicasOrInstances" #: All replicas or instances in the partition are restarted at once. + only_active_secondaries = "OnlyActiveSecondaries" #: Only the secondary replicas are restarted. diff --git a/customSDK/servicefabric/models/service_from_template_description.py b/customSDK/servicefabric/models/service_from_template_description.py new file mode 100644 index 00000000..6a3a2903 --- /dev/null +++ b/customSDK/servicefabric/models/service_from_template_description.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceFromTemplateDescription(Model): + """Defines description for creating a Service Fabric service from a template + defined in the application manifest. + + All required parameters must be populated in order to send to Azure. + + :param application_name: Required. The name of the application, including + the 'fabric:' URI scheme. + :type application_name: str + :param service_name: Required. The full name of the service with 'fabric:' + URI scheme. + :type service_name: str + :param service_type_name: Required. Name of the service type as specified + in the service manifest. + :type service_type_name: str + :param initialization_data: The initialization data for the newly created + service instance. + :type initialization_data: list[int] + :param service_package_activation_mode: The activation mode of service + package to be used for a service. Possible values include: + 'SharedProcess', 'ExclusiveProcess' + :type service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :param service_dns_name: The DNS name of the service. It requires the DNS + system service to be enabled in Service Fabric cluster. + :type service_dns_name: str + """ + + _validation = { + 'application_name': {'required': True}, + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceFromTemplateDescription, self).__init__(**kwargs) + self.application_name = kwargs.get('application_name', None) + self.service_name = kwargs.get('service_name', None) + self.service_type_name = kwargs.get('service_type_name', None) + self.initialization_data = kwargs.get('initialization_data', None) + self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) + self.service_dns_name = kwargs.get('service_dns_name', None) diff --git a/customSDK/servicefabric/models/service_from_template_description_py3.py b/customSDK/servicefabric/models/service_from_template_description_py3.py new file mode 100644 index 00000000..be8bf5e2 --- /dev/null +++ b/customSDK/servicefabric/models/service_from_template_description_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceFromTemplateDescription(Model): + """Defines description for creating a Service Fabric service from a template + defined in the application manifest. + + All required parameters must be populated in order to send to Azure. + + :param application_name: Required. The name of the application, including + the 'fabric:' URI scheme. + :type application_name: str + :param service_name: Required. The full name of the service with 'fabric:' + URI scheme. + :type service_name: str + :param service_type_name: Required. Name of the service type as specified + in the service manifest. + :type service_type_name: str + :param initialization_data: The initialization data for the newly created + service instance. + :type initialization_data: list[int] + :param service_package_activation_mode: The activation mode of service + package to be used for a service. Possible values include: + 'SharedProcess', 'ExclusiveProcess' + :type service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :param service_dns_name: The DNS name of the service. It requires the DNS + system service to be enabled in Service Fabric cluster. + :type service_dns_name: str + """ + + _validation = { + 'application_name': {'required': True}, + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + } + + def __init__(self, *, application_name: str, service_name: str, service_type_name: str, initialization_data=None, service_package_activation_mode=None, service_dns_name: str=None, **kwargs) -> None: + super(ServiceFromTemplateDescription, self).__init__(**kwargs) + self.application_name = application_name + self.service_name = service_name + self.service_type_name = service_type_name + self.initialization_data = initialization_data + self.service_package_activation_mode = service_package_activation_mode + self.service_dns_name = service_dns_name diff --git a/customSDK/servicefabric/models/service_health.py b/customSDK/servicefabric/models/service_health.py new file mode 100644 index 00000000..885831d1 --- /dev/null +++ b/customSDK/servicefabric/models/service_health.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health import EntityHealth + + +class ServiceHealth(EntityHealth): + """Information about the health of a Service Fabric service. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param name: The name of the service whose health information is described + by this object. + :type name: str + :param partition_health_states: The list of partition health states + associated with the service. + :type partition_health_states: + list[~azure.servicefabric.models.PartitionHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'partition_health_states': {'key': 'PartitionHealthStates', 'type': '[PartitionHealthState]'}, + } + + def __init__(self, **kwargs): + super(ServiceHealth, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.partition_health_states = kwargs.get('partition_health_states', None) diff --git a/customSDK/servicefabric/models/service_health_evaluation.py b/customSDK/servicefabric/models/service_health_evaluation.py new file mode 100644 index 00000000..11fdbba8 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_evaluation.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class ServiceHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a service, containing information about + the data and the algorithm used by health store to evaluate health. The + evaluation is returned only when the aggregated health state is either + Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param service_name: Name of the service whose health evaluation is + described by this object. + :type service_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the service. The types of the + unhealthy evaluations can be PartitionsHealthEvaluation or + EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(ServiceHealthEvaluation, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Service' diff --git a/customSDK/servicefabric/models/service_health_evaluation_py3.py b/customSDK/servicefabric/models/service_health_evaluation_py3.py new file mode 100644 index 00000000..887fbc42 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_evaluation_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class ServiceHealthEvaluation(HealthEvaluation): + """Represents health evaluation for a service, containing information about + the data and the algorithm used by health store to evaluate health. The + evaluation is returned only when the aggregated health state is either + Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param service_name: Name of the service whose health evaluation is + described by this object. + :type service_name: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the service. The types of the + unhealthy evaluations can be PartitionsHealthEvaluation or + EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, service_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: + super(ServiceHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.service_name = service_name + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Service' diff --git a/customSDK/servicefabric/models/service_health_py3.py b/customSDK/servicefabric/models/service_health_py3.py new file mode 100644 index 00000000..73650307 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_py3 import EntityHealth + + +class ServiceHealth(EntityHealth): + """Information about the health of a Service Fabric service. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param name: The name of the service whose health information is described + by this object. + :type name: str + :param partition_health_states: The list of partition health states + associated with the service. + :type partition_health_states: + list[~azure.servicefabric.models.PartitionHealthState] + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'partition_health_states': {'key': 'PartitionHealthStates', 'type': '[PartitionHealthState]'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, partition_health_states=None, **kwargs) -> None: + super(ServiceHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) + self.name = name + self.partition_health_states = partition_health_states diff --git a/customSDK/servicefabric/models/service_health_report_expired_event.py b/customSDK/servicefabric/models/service_health_report_expired_event.py new file mode 100644 index 00000000..708f5214 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_report_expired_event.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_event import ServiceEvent + + +class ServiceHealthReportExpiredEvent(ServiceEvent): + """Service Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param instance_id: Required. Id of Service instance. + :type instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + 'instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServiceHealthReportExpiredEvent, self).__init__(**kwargs) + self.instance_id = kwargs.get('instance_id', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'ServiceHealthReportExpired' diff --git a/customSDK/servicefabric/models/service_health_report_expired_event_py3.py b/customSDK/servicefabric/models/service_health_report_expired_event_py3.py new file mode 100644 index 00000000..bdde10d7 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_report_expired_event_py3.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_event_py3 import ServiceEvent + + +class ServiceHealthReportExpiredEvent(ServiceEvent): + """Service Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param instance_id: Required. Id of Service instance. + :type instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + 'instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ServiceHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) + self.instance_id = instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'ServiceHealthReportExpired' diff --git a/customSDK/servicefabric/models/service_health_state.py b/customSDK/servicefabric/models/service_health_state.py new file mode 100644 index 00000000..3a3db023 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_state.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state import EntityHealthState + + +class ServiceHealthState(EntityHealthState): + """Represents the health state of a service, which contains the service + identifier and its aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param service_name: Name of the service whose health state is represented + by this object. + :type service_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceHealthState, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) diff --git a/customSDK/servicefabric/models/service_health_state_chunk.py b/customSDK/servicefabric/models/service_health_state_chunk.py new file mode 100644 index 00000000..b1bb24cc --- /dev/null +++ b/customSDK/servicefabric/models/service_health_state_chunk.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk import EntityHealthStateChunk + + +class ServiceHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a service, which contains the service + name, its aggregated health state and any partitions that respect the + filters in the cluster health chunk query description. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_name: The name of the service whose health state chunk is + provided in this object. + :type service_name: str + :param partition_health_state_chunks: The list of partition health state + chunks belonging to the service that respect the filters in the cluster + health chunk query description. + :type partition_health_state_chunks: + ~azure.servicefabric.models.PartitionHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_health_state_chunks': {'key': 'PartitionHealthStateChunks', 'type': 'PartitionHealthStateChunkList'}, + } + + def __init__(self, **kwargs): + super(ServiceHealthStateChunk, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_health_state_chunks = kwargs.get('partition_health_state_chunks', None) diff --git a/customSDK/servicefabric/models/service_health_state_chunk_list.py b/customSDK/servicefabric/models/service_health_state_chunk_list.py new file mode 100644 index 00000000..63511118 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_state_chunk_list.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceHealthStateChunkList(Model): + """The list of service health state chunks that respect the input filters in + the chunk query. Returned by get cluster health state chunks query. + + :param items: The list of service health state chunks that respect the + input filters in the chunk query. + :type items: list[~azure.servicefabric.models.ServiceHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[ServiceHealthStateChunk]'}, + } + + def __init__(self, **kwargs): + super(ServiceHealthStateChunkList, self).__init__(**kwargs) + self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/service_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/service_health_state_chunk_list_py3.py new file mode 100644 index 00000000..9f747304 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_state_chunk_list_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceHealthStateChunkList(Model): + """The list of service health state chunks that respect the input filters in + the chunk query. Returned by get cluster health state chunks query. + + :param items: The list of service health state chunks that respect the + input filters in the chunk query. + :type items: list[~azure.servicefabric.models.ServiceHealthStateChunk] + """ + + _attribute_map = { + 'items': {'key': 'Items', 'type': '[ServiceHealthStateChunk]'}, + } + + def __init__(self, *, items=None, **kwargs) -> None: + super(ServiceHealthStateChunkList, self).__init__(**kwargs) + self.items = items diff --git a/customSDK/servicefabric/models/service_health_state_chunk_py3.py b/customSDK/servicefabric/models/service_health_state_chunk_py3.py new file mode 100644 index 00000000..18f343ce --- /dev/null +++ b/customSDK/servicefabric/models/service_health_state_chunk_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_chunk_py3 import EntityHealthStateChunk + + +class ServiceHealthStateChunk(EntityHealthStateChunk): + """Represents the health state chunk of a service, which contains the service + name, its aggregated health state and any partitions that respect the + filters in the cluster health chunk query description. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_name: The name of the service whose health state chunk is + provided in this object. + :type service_name: str + :param partition_health_state_chunks: The list of partition health state + chunks belonging to the service that respect the filters in the cluster + health chunk query description. + :type partition_health_state_chunks: + ~azure.servicefabric.models.PartitionHealthStateChunkList + """ + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_health_state_chunks': {'key': 'PartitionHealthStateChunks', 'type': 'PartitionHealthStateChunkList'}, + } + + def __init__(self, *, health_state=None, service_name: str=None, partition_health_state_chunks=None, **kwargs) -> None: + super(ServiceHealthStateChunk, self).__init__(health_state=health_state, **kwargs) + self.service_name = service_name + self.partition_health_state_chunks = partition_health_state_chunks diff --git a/customSDK/servicefabric/models/service_health_state_filter.py b/customSDK/servicefabric/models/service_health_state_filter.py new file mode 100644 index 00000000..27b5ce5f --- /dev/null +++ b/customSDK/servicefabric/models/service_health_state_filter.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceHealthStateFilter(Model): + """Defines matching criteria to determine whether a service should be included + as a child of an application in the cluster health chunk. + The services are only returned if the parent application matches a filter + specified in the cluster health chunk query description. + One filter can match zero, one or multiple services, depending on its + properties. + + :param service_name_filter: The name of the service that matches the + filter. The filter is applied only to the specified service, if it exists. + If the service doesn't exist, no service is returned in the cluster health + chunk based on this filter. + If the service exists, it is included as the application's child if the + health state matches the other filter properties. + If not specified, all services that match the parent filters (if any) are + taken into consideration and matched against the other filter members, + like health state filter. + :type service_name_filter: str + :param health_state_filter: The filter for the health state of the + services. It allows selecting services if they match the desired health + states. + The possible values are integer value of one of the following health + states. Only services that match the filter are returned. All services are + used to evaluate the cluster aggregated health state. + If not specified, default value is None, unless the service name is + specified. If the filter has default value and service name is specified, + the matching service is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches services with + HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + :param partition_filters: Defines a list of filters that specify which + partitions to be included in the returned cluster health chunk as children + of the service. The partitions are returned only if the parent service + matches a filter. + If the list is empty, no partitions are returned. All the partitions are + used to evaluate the parent service aggregated health state, regardless of + the input filters. + The service filter may specify multiple partition filters. + For example, it can specify a filter to return all partitions with health + state Error and another filter to always include a partition identified by + its partition ID. + :type partition_filters: + list[~azure.servicefabric.models.PartitionHealthStateFilter] + """ + + _attribute_map = { + 'service_name_filter': {'key': 'ServiceNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'partition_filters': {'key': 'PartitionFilters', 'type': '[PartitionHealthStateFilter]'}, + } + + def __init__(self, **kwargs): + super(ServiceHealthStateFilter, self).__init__(**kwargs) + self.service_name_filter = kwargs.get('service_name_filter', None) + self.health_state_filter = kwargs.get('health_state_filter', 0) + self.partition_filters = kwargs.get('partition_filters', None) diff --git a/customSDK/servicefabric/models/service_health_state_filter_py3.py b/customSDK/servicefabric/models/service_health_state_filter_py3.py new file mode 100644 index 00000000..ba9ff59a --- /dev/null +++ b/customSDK/servicefabric/models/service_health_state_filter_py3.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceHealthStateFilter(Model): + """Defines matching criteria to determine whether a service should be included + as a child of an application in the cluster health chunk. + The services are only returned if the parent application matches a filter + specified in the cluster health chunk query description. + One filter can match zero, one or multiple services, depending on its + properties. + + :param service_name_filter: The name of the service that matches the + filter. The filter is applied only to the specified service, if it exists. + If the service doesn't exist, no service is returned in the cluster health + chunk based on this filter. + If the service exists, it is included as the application's child if the + health state matches the other filter properties. + If not specified, all services that match the parent filters (if any) are + taken into consideration and matched against the other filter members, + like health state filter. + :type service_name_filter: str + :param health_state_filter: The filter for the health state of the + services. It allows selecting services if they match the desired health + states. + The possible values are integer value of one of the following health + states. Only services that match the filter are returned. All services are + used to evaluate the cluster aggregated health state. + If not specified, default value is None, unless the service name is + specified. If the filter has default value and service name is specified, + the matching service is returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6, it matches services with + HealthState value of OK (2) and Warning (4). + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1. + - Ok - Filter that matches input with HealthState value Ok. The value is + 2. + - Warning - Filter that matches input with HealthState value Warning. The + value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The value is + 65535. Default value: 0 . + :type health_state_filter: int + :param partition_filters: Defines a list of filters that specify which + partitions to be included in the returned cluster health chunk as children + of the service. The partitions are returned only if the parent service + matches a filter. + If the list is empty, no partitions are returned. All the partitions are + used to evaluate the parent service aggregated health state, regardless of + the input filters. + The service filter may specify multiple partition filters. + For example, it can specify a filter to return all partitions with health + state Error and another filter to always include a partition identified by + its partition ID. + :type partition_filters: + list[~azure.servicefabric.models.PartitionHealthStateFilter] + """ + + _attribute_map = { + 'service_name_filter': {'key': 'ServiceNameFilter', 'type': 'str'}, + 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, + 'partition_filters': {'key': 'PartitionFilters', 'type': '[PartitionHealthStateFilter]'}, + } + + def __init__(self, *, service_name_filter: str=None, health_state_filter: int=0, partition_filters=None, **kwargs) -> None: + super(ServiceHealthStateFilter, self).__init__(**kwargs) + self.service_name_filter = service_name_filter + self.health_state_filter = health_state_filter + self.partition_filters = partition_filters diff --git a/customSDK/servicefabric/models/service_health_state_py3.py b/customSDK/servicefabric/models/service_health_state_py3.py new file mode 100644 index 00000000..1d23d027 --- /dev/null +++ b/customSDK/servicefabric/models/service_health_state_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .entity_health_state_py3 import EntityHealthState + + +class ServiceHealthState(EntityHealthState): + """Represents the health state of a service, which contains the service + identifier and its aggregated health state. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param service_name: Name of the service whose health state is represented + by this object. + :type service_name: str + """ + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, service_name: str=None, **kwargs) -> None: + super(ServiceHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) + self.service_name = service_name diff --git a/customSDK/servicefabric/models/service_identity.py b/customSDK/servicefabric/models/service_identity.py new file mode 100644 index 00000000..c597c3b7 --- /dev/null +++ b/customSDK/servicefabric/models/service_identity.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceIdentity(Model): + """Map service identity friendly name to an application identity. + + :param name: The identity friendly name. + :type name: str + :param identity_ref: The application identity name. + :type identity_ref: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'identity_ref': {'key': 'identityRef', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceIdentity, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.identity_ref = kwargs.get('identity_ref', None) diff --git a/customSDK/servicefabric/models/service_identity_py3.py b/customSDK/servicefabric/models/service_identity_py3.py new file mode 100644 index 00000000..2d95be7c --- /dev/null +++ b/customSDK/servicefabric/models/service_identity_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceIdentity(Model): + """Map service identity friendly name to an application identity. + + :param name: The identity friendly name. + :type name: str + :param identity_ref: The application identity name. + :type identity_ref: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'identity_ref': {'key': 'identityRef', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, identity_ref: str=None, **kwargs) -> None: + super(ServiceIdentity, self).__init__(**kwargs) + self.name = name + self.identity_ref = identity_ref diff --git a/customSDK/servicefabric/models/service_info.py b/customSDK/servicefabric/models/service_info.py new file mode 100644 index 00000000..d6e72ba0 --- /dev/null +++ b/customSDK/servicefabric/models/service_info.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceInfo(Model): + """Information about a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceInfo, StatelessServiceInfo + + All required parameters must be populated in order to send to Azure. + + :param id: The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to + identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type id: str + :param name: The full name of the service with 'fabric:' URI scheme. + :type name: str + :param type_name: Name of the service type as specified in the service + manifest. + :type type_name: str + :param manifest_version: The version of the service manifest. + :type manifest_version: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_status: The status of the application. Possible values + include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + 'Failed' + :type service_status: str or ~azure.servicefabric.models.ServiceStatus + :param is_service_group: Whether the service is in a service group. + :type is_service_group: bool + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceInfo', 'Stateless': 'StatelessServiceInfo'} + } + + def __init__(self, **kwargs): + super(ServiceInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type_name = kwargs.get('type_name', None) + self.manifest_version = kwargs.get('manifest_version', None) + self.health_state = kwargs.get('health_state', None) + self.service_status = kwargs.get('service_status', None) + self.is_service_group = kwargs.get('is_service_group', None) + self.service_kind = None diff --git a/customSDK/servicefabric/models/service_info_py3.py b/customSDK/servicefabric/models/service_info_py3.py new file mode 100644 index 00000000..2cba52c5 --- /dev/null +++ b/customSDK/servicefabric/models/service_info_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceInfo(Model): + """Information about a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceInfo, StatelessServiceInfo + + All required parameters must be populated in order to send to Azure. + + :param id: The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to + identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type id: str + :param name: The full name of the service with 'fabric:' URI scheme. + :type name: str + :param type_name: Name of the service type as specified in the service + manifest. + :type type_name: str + :param manifest_version: The version of the service manifest. + :type manifest_version: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_status: The status of the application. Possible values + include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + 'Failed' + :type service_status: str or ~azure.servicefabric.models.ServiceStatus + :param is_service_group: Whether the service is in a service group. + :type is_service_group: bool + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceInfo', 'Stateless': 'StatelessServiceInfo'} + } + + def __init__(self, *, id: str=None, name: str=None, type_name: str=None, manifest_version: str=None, health_state=None, service_status=None, is_service_group: bool=None, **kwargs) -> None: + super(ServiceInfo, self).__init__(**kwargs) + self.id = id + self.name = name + self.type_name = type_name + self.manifest_version = manifest_version + self.health_state = health_state + self.service_status = service_status + self.is_service_group = is_service_group + self.service_kind = None diff --git a/customSDK/servicefabric/models/service_load_metric_description.py b/customSDK/servicefabric/models/service_load_metric_description.py new file mode 100644 index 00000000..16728651 --- /dev/null +++ b/customSDK/servicefabric/models/service_load_metric_description.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceLoadMetricDescription(Model): + """Specifies a metric to load balance a service during runtime. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the metric. If the service chooses to + report load during runtime, the load metric name should match the name + that is specified in Name exactly. Note that metric names are + case-sensitive. + :type name: str + :param weight: The service load metric relative weight, compared to other + metrics configured for this service, as a number. Possible values include: + 'Zero', 'Low', 'Medium', 'High' + :type weight: str or ~azure.servicefabric.models.ServiceLoadMetricWeight + :param primary_default_load: Used only for Stateful services. The default + amount of load, as a number, that this service creates for this metric + when it is a Primary replica. + :type primary_default_load: int + :param secondary_default_load: Used only for Stateful services. The + default amount of load, as a number, that this service creates for this + metric when it is a Secondary replica. + :type secondary_default_load: int + :param auxiliary_default_load: Used only for Stateful services. The + default amount of load, as a number, that this service creates for this + metric when it is an Auxiliary replica. + :type auxiliary_default_load: int + :param default_load: Used only for Stateless services. The default amount + of load, as a number, that this service creates for this metric. + :type default_load: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'weight': {'key': 'Weight', 'type': 'str'}, + 'primary_default_load': {'key': 'PrimaryDefaultLoad', 'type': 'int'}, + 'secondary_default_load': {'key': 'SecondaryDefaultLoad', 'type': 'int'}, + 'auxiliary_default_load': {'key': 'AuxiliaryDefaultLoad', 'type': 'int'}, + 'default_load': {'key': 'DefaultLoad', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ServiceLoadMetricDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.weight = kwargs.get('weight', None) + self.primary_default_load = kwargs.get('primary_default_load', None) + self.secondary_default_load = kwargs.get('secondary_default_load', None) + self.auxiliary_default_load = kwargs.get('auxiliary_default_load', None) + self.default_load = kwargs.get('default_load', None) diff --git a/customSDK/servicefabric/models/service_load_metric_description_py3.py b/customSDK/servicefabric/models/service_load_metric_description_py3.py new file mode 100644 index 00000000..d346b8c0 --- /dev/null +++ b/customSDK/servicefabric/models/service_load_metric_description_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceLoadMetricDescription(Model): + """Specifies a metric to load balance a service during runtime. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the metric. If the service chooses to + report load during runtime, the load metric name should match the name + that is specified in Name exactly. Note that metric names are + case-sensitive. + :type name: str + :param weight: The service load metric relative weight, compared to other + metrics configured for this service, as a number. Possible values include: + 'Zero', 'Low', 'Medium', 'High' + :type weight: str or ~azure.servicefabric.models.ServiceLoadMetricWeight + :param primary_default_load: Used only for Stateful services. The default + amount of load, as a number, that this service creates for this metric + when it is a Primary replica. + :type primary_default_load: int + :param secondary_default_load: Used only for Stateful services. The + default amount of load, as a number, that this service creates for this + metric when it is a Secondary replica. + :type secondary_default_load: int + :param auxiliary_default_load: Used only for Stateful services. The + default amount of load, as a number, that this service creates for this + metric when it is an Auxiliary replica. + :type auxiliary_default_load: int + :param default_load: Used only for Stateless services. The default amount + of load, as a number, that this service creates for this metric. + :type default_load: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'weight': {'key': 'Weight', 'type': 'str'}, + 'primary_default_load': {'key': 'PrimaryDefaultLoad', 'type': 'int'}, + 'secondary_default_load': {'key': 'SecondaryDefaultLoad', 'type': 'int'}, + 'auxiliary_default_load': {'key': 'AuxiliaryDefaultLoad', 'type': 'int'}, + 'default_load': {'key': 'DefaultLoad', 'type': 'int'}, + } + + def __init__(self, *, name: str, weight=None, primary_default_load: int=None, secondary_default_load: int=None, auxiliary_default_load: int=None, default_load: int=None, **kwargs) -> None: + super(ServiceLoadMetricDescription, self).__init__(**kwargs) + self.name = name + self.weight = weight + self.primary_default_load = primary_default_load + self.secondary_default_load = secondary_default_load + self.auxiliary_default_load = auxiliary_default_load + self.default_load = default_load diff --git a/customSDK/servicefabric/models/service_name_info.py b/customSDK/servicefabric/models/service_name_info.py new file mode 100644 index 00000000..75fd440e --- /dev/null +++ b/customSDK/servicefabric/models/service_name_info.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceNameInfo(Model): + """Information about the service name. + + :param id: The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to + identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type id: str + :param name: The full name of the service with 'fabric:' URI scheme. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceNameInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/service_name_info_py3.py b/customSDK/servicefabric/models/service_name_info_py3.py new file mode 100644 index 00000000..474752f8 --- /dev/null +++ b/customSDK/servicefabric/models/service_name_info_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceNameInfo(Model): + """Information about the service name. + + :param id: The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to + identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type id: str + :param name: The full name of the service with 'fabric:' URI scheme. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: + super(ServiceNameInfo, self).__init__(**kwargs) + self.id = id + self.name = name diff --git a/customSDK/servicefabric/models/service_new_health_report_event.py b/customSDK/servicefabric/models/service_new_health_report_event.py new file mode 100644 index 00000000..138f18a1 --- /dev/null +++ b/customSDK/servicefabric/models/service_new_health_report_event.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_event import ServiceEvent + + +class ServiceNewHealthReportEvent(ServiceEvent): + """Service Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param instance_id: Required. Id of Service instance. + :type instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + 'instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServiceNewHealthReportEvent, self).__init__(**kwargs) + self.instance_id = kwargs.get('instance_id', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'ServiceNewHealthReport' diff --git a/customSDK/servicefabric/models/service_new_health_report_event_py3.py b/customSDK/servicefabric/models/service_new_health_report_event_py3.py new file mode 100644 index 00000000..b1e2d6bf --- /dev/null +++ b/customSDK/servicefabric/models/service_new_health_report_event_py3.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_event_py3 import ServiceEvent + + +class ServiceNewHealthReportEvent(ServiceEvent): + """Service Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param service_id: Required. The identity of the service. This ID is an + encoded representation of the service name. This is used in the REST APIs + to identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param instance_id: Required. Id of Service instance. + :type instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'service_id': {'required': True}, + 'instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_id': {'key': 'ServiceId', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(ServiceNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) + self.instance_id = instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'ServiceNewHealthReport' diff --git a/customSDK/servicefabric/models/service_partition_info.py b/customSDK/servicefabric/models/service_partition_info.py new file mode 100644 index 00000000..2aaa403e --- /dev/null +++ b/customSDK/servicefabric/models/service_partition_info.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServicePartitionInfo(Model): + """Information about a partition of a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServicePartitionInfo, + StatelessServicePartitionInfo + + All required parameters must be populated in order to send to Azure. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param partition_status: The status of the service fabric service + partition. Possible values include: 'Invalid', 'Ready', 'NotReady', + 'InQuorumLoss', 'Reconfiguring', 'Deleting' + :type partition_status: str or + ~azure.servicefabric.models.ServicePartitionStatus + :param partition_information: Information about the partition identity, + partitioning scheme and keys supported by it. + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServicePartitionInfo', 'Stateless': 'StatelessServicePartitionInfo'} + } + + def __init__(self, **kwargs): + super(ServicePartitionInfo, self).__init__(**kwargs) + self.health_state = kwargs.get('health_state', None) + self.partition_status = kwargs.get('partition_status', None) + self.partition_information = kwargs.get('partition_information', None) + self.service_kind = None diff --git a/customSDK/servicefabric/models/service_partition_info_py3.py b/customSDK/servicefabric/models/service_partition_info_py3.py new file mode 100644 index 00000000..e82a8a1d --- /dev/null +++ b/customSDK/servicefabric/models/service_partition_info_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServicePartitionInfo(Model): + """Information about a partition of a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServicePartitionInfo, + StatelessServicePartitionInfo + + All required parameters must be populated in order to send to Azure. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param partition_status: The status of the service fabric service + partition. Possible values include: 'Invalid', 'Ready', 'NotReady', + 'InQuorumLoss', 'Reconfiguring', 'Deleting' + :type partition_status: str or + ~azure.servicefabric.models.ServicePartitionStatus + :param partition_information: Information about the partition identity, + partitioning scheme and keys supported by it. + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServicePartitionInfo', 'Stateless': 'StatelessServicePartitionInfo'} + } + + def __init__(self, *, health_state=None, partition_status=None, partition_information=None, **kwargs) -> None: + super(ServicePartitionInfo, self).__init__(**kwargs) + self.health_state = health_state + self.partition_status = partition_status + self.partition_information = partition_information + self.service_kind = None diff --git a/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description.py b/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description.py new file mode 100644 index 00000000..6b8b25dd --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_placement_policy_description import ServicePlacementPolicyDescription + + +class ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + allowing multiple stateless instances of a partition of the service to be + placed on a node. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: Holdover from other policy descriptions, not used for + this policy, values are ignored by runtime. Keeping it for any + backwards-compatibility with clients. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.type = 'AllowMultipleStatelessInstancesOnNode' diff --git a/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description_py3.py new file mode 100644 index 00000000..ee18a5e1 --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_placement_policy_description_py3 import ServicePlacementPolicyDescription + + +class ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + allowing multiple stateless instances of a partition of the service to be + placed on a node. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: Holdover from other policy descriptions, not used for + this policy, values are ignored by runtime. Keeping it for any + backwards-compatibility with clients. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, *, domain_name: str=None, **kwargs) -> None: + super(ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, self).__init__(**kwargs) + self.domain_name = domain_name + self.type = 'AllowMultipleStatelessInstancesOnNode' diff --git a/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description.py b/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description.py new file mode 100644 index 00000000..90958718 --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_placement_policy_description import ServicePlacementPolicyDescription + + +class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where a particular fault or upgrade domain should not be used for placement + of the instances or replicas of that service. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: The name of the domain that should not be used for + placement. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicePlacementInvalidDomainPolicyDescription, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.type = 'InvalidDomain' diff --git a/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description_py3.py new file mode 100644 index 00000000..df261879 --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_placement_policy_description_py3 import ServicePlacementPolicyDescription + + +class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where a particular fault or upgrade domain should not be used for placement + of the instances or replicas of that service. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: The name of the domain that should not be used for + placement. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, *, domain_name: str=None, **kwargs) -> None: + super(ServicePlacementInvalidDomainPolicyDescription, self).__init__(**kwargs) + self.domain_name = domain_name + self.type = 'InvalidDomain' diff --git a/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description.py b/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description.py new file mode 100644 index 00000000..f0eb52e5 --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_placement_policy_description import ServicePlacementPolicyDescription + + +class ServicePlacementNonPartiallyPlaceServicePolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where all replicas must be able to be placed in order for any replicas to + be created. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicePlacementNonPartiallyPlaceServicePolicyDescription, self).__init__(**kwargs) + self.type = 'NonPartiallyPlaceService' diff --git a/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description_py3.py new file mode 100644 index 00000000..1ecf5dcb --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_placement_policy_description_py3 import ServicePlacementPolicyDescription + + +class ServicePlacementNonPartiallyPlaceServicePolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where all replicas must be able to be placed in order for any replicas to + be created. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ServicePlacementNonPartiallyPlaceServicePolicyDescription, self).__init__(**kwargs) + self.type = 'NonPartiallyPlaceService' diff --git a/customSDK/servicefabric/models/service_placement_policy_description.py b/customSDK/servicefabric/models/service_placement_policy_description.py new file mode 100644 index 00000000..ef550c9d --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_policy_description.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServicePlacementPolicyDescription(Model): + """Describes the policy to be used for placement of a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ServicePlacementInvalidDomainPolicyDescription, + ServicePlacementNonPartiallyPlaceServicePolicyDescription, + ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, + ServicePlacementPreferPrimaryDomainPolicyDescription, + ServicePlacementRequiredDomainPolicyDescription, + ServicePlacementRequireDomainDistributionPolicyDescription + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'AllowMultipleStatelessInstancesOnNode': 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} + } + + def __init__(self, **kwargs): + super(ServicePlacementPolicyDescription, self).__init__(**kwargs) + self.type = None diff --git a/customSDK/servicefabric/models/service_placement_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_policy_description_py3.py new file mode 100644 index 00000000..19b9e7bc --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_policy_description_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServicePlacementPolicyDescription(Model): + """Describes the policy to be used for placement of a Service Fabric service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ServicePlacementInvalidDomainPolicyDescription, + ServicePlacementNonPartiallyPlaceServicePolicyDescription, + ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, + ServicePlacementPreferPrimaryDomainPolicyDescription, + ServicePlacementRequiredDomainPolicyDescription, + ServicePlacementRequireDomainDistributionPolicyDescription + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'AllowMultipleStatelessInstancesOnNode': 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} + } + + def __init__(self, **kwargs) -> None: + super(ServicePlacementPolicyDescription, self).__init__(**kwargs) + self.type = None diff --git a/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description.py b/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description.py new file mode 100644 index 00000000..9dbda50f --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_placement_policy_description import ServicePlacementPolicyDescription + + +class ServicePlacementPreferPrimaryDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where the service's Primary replicas should optimally be placed in a + particular domain. + This placement policy is usually used with fault domains in scenarios where + the Service Fabric cluster is geographically distributed in order to + indicate that a service's primary replica should be located in a particular + fault domain, which in geo-distributed scenarios usually aligns with + regional or datacenter boundaries. Note that since this is an optimization + it is possible that the Primary replica may not end up located in this + domain due to failures, capacity limits, or other constraints. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: The name of the domain that should used for placement + as per this policy. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicePlacementPreferPrimaryDomainPolicyDescription, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.type = 'PreferPrimaryDomain' diff --git a/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description_py3.py new file mode 100644 index 00000000..4f7eb9cc --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_placement_policy_description_py3 import ServicePlacementPolicyDescription + + +class ServicePlacementPreferPrimaryDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where the service's Primary replicas should optimally be placed in a + particular domain. + This placement policy is usually used with fault domains in scenarios where + the Service Fabric cluster is geographically distributed in order to + indicate that a service's primary replica should be located in a particular + fault domain, which in geo-distributed scenarios usually aligns with + regional or datacenter boundaries. Note that since this is an optimization + it is possible that the Primary replica may not end up located in this + domain due to failures, capacity limits, or other constraints. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: The name of the domain that should used for placement + as per this policy. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, *, domain_name: str=None, **kwargs) -> None: + super(ServicePlacementPreferPrimaryDomainPolicyDescription, self).__init__(**kwargs) + self.domain_name = domain_name + self.type = 'PreferPrimaryDomain' diff --git a/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description.py b/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description.py new file mode 100644 index 00000000..c1616632 --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_placement_policy_description import ServicePlacementPolicyDescription + + +class ServicePlacementRequireDomainDistributionPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where two replicas from the same partition should never be placed in the + same fault or upgrade domain. + While this is not common it can expose the service to an increased risk of + concurrent failures due to unplanned outages or other cases of + subsequent/concurrent failures. As an example, consider a case where + replicas are deployed across different data center, with one replica per + location. In the event that one of the datacenters goes offline, normally + the replica that was placed in that datacenter will be packed into one of + the remaining datacenters. If this is not desirable then this policy should + be set. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: The name of the domain that should used for placement + as per this policy. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicePlacementRequireDomainDistributionPolicyDescription, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.type = 'RequireDomainDistribution' diff --git a/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description_py3.py new file mode 100644 index 00000000..7b9f301a --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_placement_policy_description_py3 import ServicePlacementPolicyDescription + + +class ServicePlacementRequireDomainDistributionPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where two replicas from the same partition should never be placed in the + same fault or upgrade domain. + While this is not common it can expose the service to an increased risk of + concurrent failures due to unplanned outages or other cases of + subsequent/concurrent failures. As an example, consider a case where + replicas are deployed across different data center, with one replica per + location. In the event that one of the datacenters goes offline, normally + the replica that was placed in that datacenter will be packed into one of + the remaining datacenters. If this is not desirable then this policy should + be set. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: The name of the domain that should used for placement + as per this policy. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, *, domain_name: str=None, **kwargs) -> None: + super(ServicePlacementRequireDomainDistributionPolicyDescription, self).__init__(**kwargs) + self.domain_name = domain_name + self.type = 'RequireDomainDistribution' diff --git a/customSDK/servicefabric/models/service_placement_required_domain_policy_description.py b/customSDK/servicefabric/models/service_placement_required_domain_policy_description.py new file mode 100644 index 00000000..0fe9e1a3 --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_required_domain_policy_description.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_placement_policy_description import ServicePlacementPolicyDescription + + +class ServicePlacementRequiredDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where the instances or replicas of that service must be placed in a + particular domain. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: The name of the domain that should used for placement + as per this policy. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicePlacementRequiredDomainPolicyDescription, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.type = 'RequireDomain' diff --git a/customSDK/servicefabric/models/service_placement_required_domain_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_required_domain_policy_description_py3.py new file mode 100644 index 00000000..7ce9a9d9 --- /dev/null +++ b/customSDK/servicefabric/models/service_placement_required_domain_policy_description_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_placement_policy_description_py3 import ServicePlacementPolicyDescription + + +class ServicePlacementRequiredDomainPolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + where the instances or replicas of that service must be placed in a + particular domain. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: The name of the domain that should used for placement + as per this policy. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, *, domain_name: str=None, **kwargs) -> None: + super(ServicePlacementRequiredDomainPolicyDescription, self).__init__(**kwargs) + self.domain_name = domain_name + self.type = 'RequireDomain' diff --git a/customSDK/servicefabric/models/service_properties.py b/customSDK/servicefabric/models/service_properties.py new file mode 100644 index 00000000..74a8a63e --- /dev/null +++ b/customSDK/servicefabric/models/service_properties.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProperties(Model): + """Describes properties of a service resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param description: User readable description of the service. + :type description: str + :param replica_count: The number of replicas of the service to create. + Defaults to 1 if not specified. + :type replica_count: int + :param execution_policy: The execution policy of the service + :type execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :param auto_scaling_policies: Auto scaling policies + :type auto_scaling_policies: + list[~azure.servicefabric.models.AutoScalingPolicy] + :ivar status: Status of the service. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the service. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the service's health state is not 'Ok', + this additional details from service fabric Health Manager for the user to + know why the service is marked unhealthy. + :vartype unhealthy_evaluation: str + :param identity_refs: The service identity list. + :type identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :param dns_name: Dns name of the service. + :type dns_name: str + """ + + _validation = { + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'replica_count': {'key': 'replicaCount', 'type': 'int'}, + 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, + 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'health_state': {'key': 'healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, + 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.replica_count = kwargs.get('replica_count', None) + self.execution_policy = kwargs.get('execution_policy', None) + self.auto_scaling_policies = kwargs.get('auto_scaling_policies', None) + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity_refs = kwargs.get('identity_refs', None) + self.dns_name = kwargs.get('dns_name', None) diff --git a/customSDK/servicefabric/models/service_properties_py3.py b/customSDK/servicefabric/models/service_properties_py3.py new file mode 100644 index 00000000..12818cdf --- /dev/null +++ b/customSDK/servicefabric/models/service_properties_py3.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProperties(Model): + """Describes properties of a service resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param description: User readable description of the service. + :type description: str + :param replica_count: The number of replicas of the service to create. + Defaults to 1 if not specified. + :type replica_count: int + :param execution_policy: The execution policy of the service + :type execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :param auto_scaling_policies: Auto scaling policies + :type auto_scaling_policies: + list[~azure.servicefabric.models.AutoScalingPolicy] + :ivar status: Status of the service. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the service. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the service's health state is not 'Ok', + this additional details from service fabric Health Manager for the user to + know why the service is marked unhealthy. + :vartype unhealthy_evaluation: str + :param identity_refs: The service identity list. + :type identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :param dns_name: Dns name of the service. + :type dns_name: str + """ + + _validation = { + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'replica_count': {'key': 'replicaCount', 'type': 'int'}, + 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, + 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_details': {'key': 'statusDetails', 'type': 'str'}, + 'health_state': {'key': 'healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, + 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, + 'dns_name': {'key': 'dnsName', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, replica_count: int=None, execution_policy=None, auto_scaling_policies=None, identity_refs=None, dns_name: str=None, **kwargs) -> None: + super(ServiceProperties, self).__init__(**kwargs) + self.description = description + self.replica_count = replica_count + self.execution_policy = execution_policy + self.auto_scaling_policies = auto_scaling_policies + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity_refs = identity_refs + self.dns_name = dns_name diff --git a/customSDK/servicefabric/models/service_replica_description.py b/customSDK/servicefabric/models/service_replica_description.py new file mode 100644 index 00000000..5477382d --- /dev/null +++ b/customSDK/servicefabric/models/service_replica_description.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_replica_properties import ServiceReplicaProperties + + +class ServiceReplicaDescription(ServiceReplicaProperties): + """Describes a replica of a service resource. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. The operation system required by the code in + service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemType + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.servicefabric.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.servicefabric.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :param replica_name: Required. Name of the replica. + :type replica_name: str + """ + + _validation = { + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + 'replica_name': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + 'replica_name': {'key': 'replicaName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceReplicaDescription, self).__init__(**kwargs) + self.replica_name = kwargs.get('replica_name', None) diff --git a/customSDK/servicefabric/models/service_replica_description_py3.py b/customSDK/servicefabric/models/service_replica_description_py3.py new file mode 100644 index 00000000..57878576 --- /dev/null +++ b/customSDK/servicefabric/models/service_replica_description_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_replica_properties_py3 import ServiceReplicaProperties + + +class ServiceReplicaDescription(ServiceReplicaProperties): + """Describes a replica of a service resource. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. The operation system required by the code in + service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemType + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.servicefabric.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.servicefabric.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :param replica_name: Required. Name of the replica. + :type replica_name: str + """ + + _validation = { + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + 'replica_name': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + 'replica_name': {'key': 'replicaName', 'type': 'str'}, + } + + def __init__(self, *, os_type, code_packages, replica_name: str, network_refs=None, diagnostics=None, **kwargs) -> None: + super(ServiceReplicaDescription, self).__init__(os_type=os_type, code_packages=code_packages, network_refs=network_refs, diagnostics=diagnostics, **kwargs) + self.replica_name = replica_name diff --git a/customSDK/servicefabric/models/service_replica_properties.py b/customSDK/servicefabric/models/service_replica_properties.py new file mode 100644 index 00000000..690a2354 --- /dev/null +++ b/customSDK/servicefabric/models/service_replica_properties.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceReplicaProperties(Model): + """Describes the properties of a service replica. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. The operation system required by the code in + service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemType + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.servicefabric.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.servicefabric.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + """ + + _validation = { + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + } + + def __init__(self, **kwargs): + super(ServiceReplicaProperties, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.code_packages = kwargs.get('code_packages', None) + self.network_refs = kwargs.get('network_refs', None) + self.diagnostics = kwargs.get('diagnostics', None) diff --git a/customSDK/servicefabric/models/service_replica_properties_py3.py b/customSDK/servicefabric/models/service_replica_properties_py3.py new file mode 100644 index 00000000..0bbecea6 --- /dev/null +++ b/customSDK/servicefabric/models/service_replica_properties_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceReplicaProperties(Model): + """Describes the properties of a service replica. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. The operation system required by the code in + service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemType + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.servicefabric.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.servicefabric.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + """ + + _validation = { + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, + } + + def __init__(self, *, os_type, code_packages, network_refs=None, diagnostics=None, **kwargs) -> None: + super(ServiceReplicaProperties, self).__init__(**kwargs) + self.os_type = os_type + self.code_packages = code_packages + self.network_refs = network_refs + self.diagnostics = diagnostics diff --git a/customSDK/servicefabric/models/service_resource_description.py b/customSDK/servicefabric/models/service_resource_description.py new file mode 100644 index 00000000..a70e4db1 --- /dev/null +++ b/customSDK/servicefabric/models/service_resource_description.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceResourceDescription(Model): + """This type describes a service resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Service resource. + :type name: str + :param os_type: Required. The operation system required by the code in + service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemType + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.servicefabric.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.servicefabric.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :param description: User readable description of the service. + :type description: str + :param replica_count: The number of replicas of the service to create. + Defaults to 1 if not specified. + :type replica_count: int + :param execution_policy: The execution policy of the service + :type execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :param auto_scaling_policies: Auto scaling policies + :type auto_scaling_policies: + list[~azure.servicefabric.models.AutoScalingPolicy] + :ivar status: Status of the service. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the service. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the service's health state is not 'Ok', + this additional details from service fabric Health Manager for the user to + know why the service is marked unhealthy. + :vartype unhealthy_evaluation: str + :param identity_refs: The service identity list. + :type identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :param dns_name: Dns name of the service. + :type dns_name: str + """ + + _validation = { + 'name': {'required': True}, + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'code_packages': {'key': 'properties.codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'properties.networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsRef'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'execution_policy': {'key': 'properties.executionPolicy', 'type': 'ExecutionPolicy'}, + 'auto_scaling_policies': {'key': 'properties.autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, + 'identity_refs': {'key': 'properties.identityRefs', 'type': '[ServiceIdentity]'}, + 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceResourceDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.os_type = kwargs.get('os_type', None) + self.code_packages = kwargs.get('code_packages', None) + self.network_refs = kwargs.get('network_refs', None) + self.diagnostics = kwargs.get('diagnostics', None) + self.description = kwargs.get('description', None) + self.replica_count = kwargs.get('replica_count', None) + self.execution_policy = kwargs.get('execution_policy', None) + self.auto_scaling_policies = kwargs.get('auto_scaling_policies', None) + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity_refs = kwargs.get('identity_refs', None) + self.dns_name = kwargs.get('dns_name', None) diff --git a/customSDK/servicefabric/models/service_resource_description_py3.py b/customSDK/servicefabric/models/service_resource_description_py3.py new file mode 100644 index 00000000..ea752b58 --- /dev/null +++ b/customSDK/servicefabric/models/service_resource_description_py3.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceResourceDescription(Model): + """This type describes a service resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Service resource. + :type name: str + :param os_type: Required. The operation system required by the code in + service. Possible values include: 'Linux', 'Windows' + :type os_type: str or ~azure.servicefabric.models.OperatingSystemType + :param code_packages: Required. Describes the set of code packages that + forms the service. A code package describes the container and the + properties for running it. All the code packages are started together on + the same host and share the same context (network, process etc.). + :type code_packages: + list[~azure.servicefabric.models.ContainerCodePackageProperties] + :param network_refs: The names of the private networks that this service + needs to be part of. + :type network_refs: list[~azure.servicefabric.models.NetworkRef] + :param diagnostics: Reference to sinks in DiagnosticsDescription. + :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef + :param description: User readable description of the service. + :type description: str + :param replica_count: The number of replicas of the service to create. + Defaults to 1 if not specified. + :type replica_count: int + :param execution_policy: The execution policy of the service + :type execution_policy: ~azure.servicefabric.models.ExecutionPolicy + :param auto_scaling_policies: Auto scaling policies + :type auto_scaling_policies: + list[~azure.servicefabric.models.AutoScalingPolicy] + :ivar status: Status of the service. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the service. + :vartype status_details: str + :ivar health_state: Describes the health state of an application resource. + Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :vartype health_state: str or ~azure.servicefabric.models.HealthState + :ivar unhealthy_evaluation: When the service's health state is not 'Ok', + this additional details from service fabric Health Manager for the user to + know why the service is marked unhealthy. + :vartype unhealthy_evaluation: str + :param identity_refs: The service identity list. + :type identity_refs: list[~azure.servicefabric.models.ServiceIdentity] + :param dns_name: Dns name of the service. + :type dns_name: str + """ + + _validation = { + 'name': {'required': True}, + 'os_type': {'required': True}, + 'code_packages': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'health_state': {'readonly': True}, + 'unhealthy_evaluation': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'code_packages': {'key': 'properties.codePackages', 'type': '[ContainerCodePackageProperties]'}, + 'network_refs': {'key': 'properties.networkRefs', 'type': '[NetworkRef]'}, + 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsRef'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'execution_policy': {'key': 'properties.executionPolicy', 'type': 'ExecutionPolicy'}, + 'auto_scaling_policies': {'key': 'properties.autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'health_state': {'key': 'properties.healthState', 'type': 'str'}, + 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, + 'identity_refs': {'key': 'properties.identityRefs', 'type': '[ServiceIdentity]'}, + 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, + } + + def __init__(self, *, name: str, os_type, code_packages, network_refs=None, diagnostics=None, description: str=None, replica_count: int=None, execution_policy=None, auto_scaling_policies=None, identity_refs=None, dns_name: str=None, **kwargs) -> None: + super(ServiceResourceDescription, self).__init__(**kwargs) + self.name = name + self.os_type = os_type + self.code_packages = code_packages + self.network_refs = network_refs + self.diagnostics = diagnostics + self.description = description + self.replica_count = replica_count + self.execution_policy = execution_policy + self.auto_scaling_policies = auto_scaling_policies + self.status = None + self.status_details = None + self.health_state = None + self.unhealthy_evaluation = None + self.identity_refs = identity_refs + self.dns_name = dns_name diff --git a/customSDK/servicefabric/models/service_type_description.py b/customSDK/servicefabric/models/service_type_description.py new file mode 100644 index 00000000..fee4b9fa --- /dev/null +++ b/customSDK/servicefabric/models/service_type_description.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceTypeDescription(Model): + """Describes a service type defined in the service manifest of a provisioned + application type. The properties the ones defined in the service manifest. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceTypeDescription, + StatelessServiceTypeDescription + + All required parameters must be populated in order to send to Azure. + + :param is_stateful: Indicates whether the service type is a stateful + service type or a stateless service type. This property is true if the + service type is a stateful service type, false otherwise. + :type is_stateful: bool + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param placement_constraints: The placement constraint to be used when + instantiating this service in a Service Fabric cluster. + :type placement_constraints: str + :param load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: List of service placement policy + descriptions. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param extensions: List of service type extensions. + :type extensions: + list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Stateful': 'StatefulServiceTypeDescription', 'Stateless': 'StatelessServiceTypeDescription'} + } + + def __init__(self, **kwargs): + super(ServiceTypeDescription, self).__init__(**kwargs) + self.is_stateful = kwargs.get('is_stateful', None) + self.service_type_name = kwargs.get('service_type_name', None) + self.placement_constraints = kwargs.get('placement_constraints', None) + self.load_metrics = kwargs.get('load_metrics', None) + self.service_placement_policies = kwargs.get('service_placement_policies', None) + self.extensions = kwargs.get('extensions', None) + self.kind = None diff --git a/customSDK/servicefabric/models/service_type_description_py3.py b/customSDK/servicefabric/models/service_type_description_py3.py new file mode 100644 index 00000000..e33f2739 --- /dev/null +++ b/customSDK/servicefabric/models/service_type_description_py3.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceTypeDescription(Model): + """Describes a service type defined in the service manifest of a provisioned + application type. The properties the ones defined in the service manifest. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceTypeDescription, + StatelessServiceTypeDescription + + All required parameters must be populated in order to send to Azure. + + :param is_stateful: Indicates whether the service type is a stateful + service type or a stateless service type. This property is true if the + service type is a stateful service type, false otherwise. + :type is_stateful: bool + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param placement_constraints: The placement constraint to be used when + instantiating this service in a Service Fabric cluster. + :type placement_constraints: str + :param load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: List of service placement policy + descriptions. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param extensions: List of service type extensions. + :type extensions: + list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Stateful': 'StatefulServiceTypeDescription', 'Stateless': 'StatelessServiceTypeDescription'} + } + + def __init__(self, *, is_stateful: bool=None, service_type_name: str=None, placement_constraints: str=None, load_metrics=None, service_placement_policies=None, extensions=None, **kwargs) -> None: + super(ServiceTypeDescription, self).__init__(**kwargs) + self.is_stateful = is_stateful + self.service_type_name = service_type_name + self.placement_constraints = placement_constraints + self.load_metrics = load_metrics + self.service_placement_policies = service_placement_policies + self.extensions = extensions + self.kind = None diff --git a/customSDK/servicefabric/models/service_type_extension_description.py b/customSDK/servicefabric/models/service_type_extension_description.py new file mode 100644 index 00000000..5eb6e557 --- /dev/null +++ b/customSDK/servicefabric/models/service_type_extension_description.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceTypeExtensionDescription(Model): + """Describes extension of a service type defined in the service manifest. + + :param key: The name of the extension. + :type key: str + :param value: The extension value. + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceTypeExtensionDescription, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/service_type_extension_description_py3.py b/customSDK/servicefabric/models/service_type_extension_description_py3.py new file mode 100644 index 00000000..102934cd --- /dev/null +++ b/customSDK/servicefabric/models/service_type_extension_description_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceTypeExtensionDescription(Model): + """Describes extension of a service type defined in the service manifest. + + :param key: The name of the extension. + :type key: str + :param value: The extension value. + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + } + + def __init__(self, *, key: str=None, value: str=None, **kwargs) -> None: + super(ServiceTypeExtensionDescription, self).__init__(**kwargs) + self.key = key + self.value = value diff --git a/customSDK/servicefabric/models/service_type_health_policy.py b/customSDK/servicefabric/models/service_type_health_policy.py new file mode 100644 index 00000000..ba070169 --- /dev/null +++ b/customSDK/servicefabric/models/service_type_health_policy.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceTypeHealthPolicy(Model): + """Represents the health policy used to evaluate the health of services + belonging to a service type. + + :param max_percent_unhealthy_partitions_per_service: The maximum allowed + percentage of unhealthy partitions per service. Allowed values are Byte + values from zero to 100 + The percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error. + If the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy + partitions over the total number of partitions in the service. + The computation rounds up to tolerate one failure on small numbers of + partitions. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_partitions_per_service: int + :param max_percent_unhealthy_replicas_per_partition: The maximum allowed + percentage of unhealthy replicas per partition. Allowed values are Byte + values from zero to 100. + The percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in error. + If the percentage is respected but there is at least one unhealthy + replica, the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition. + The computation rounds up to tolerate one failure on small numbers of + replicas. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_replicas_per_partition: int + :param max_percent_unhealthy_services: The maximum allowed percentage of + unhealthy services. Allowed values are Byte values from zero to 100. + The percentage represents the maximum tolerated percentage of services + that can be unhealthy before the application is considered in error. + If the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning. + This is calculated by dividing the number of unhealthy services of the + specific service type over the total number of services of the specific + service type. + The computation rounds up to tolerate one failure on small numbers of + services. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_services: int + """ + + _attribute_map = { + 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, + 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, + 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ServiceTypeHealthPolicy, self).__init__(**kwargs) + self.max_percent_unhealthy_partitions_per_service = kwargs.get('max_percent_unhealthy_partitions_per_service', 0) + self.max_percent_unhealthy_replicas_per_partition = kwargs.get('max_percent_unhealthy_replicas_per_partition', 0) + self.max_percent_unhealthy_services = kwargs.get('max_percent_unhealthy_services', 0) diff --git a/customSDK/servicefabric/models/service_type_health_policy_map_item.py b/customSDK/servicefabric/models/service_type_health_policy_map_item.py new file mode 100644 index 00000000..6f056b94 --- /dev/null +++ b/customSDK/servicefabric/models/service_type_health_policy_map_item.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceTypeHealthPolicyMapItem(Model): + """Defines an item in ServiceTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the service type health policy map item. + This is the name of the service type. + :type key: str + :param value: Required. The value of the service type health policy map + item. This is the ServiceTypeHealthPolicy for this service type. + :type value: ~azure.servicefabric.models.ServiceTypeHealthPolicy + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ServiceTypeHealthPolicy'}, + } + + def __init__(self, **kwargs): + super(ServiceTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/service_type_health_policy_map_item_py3.py b/customSDK/servicefabric/models/service_type_health_policy_map_item_py3.py new file mode 100644 index 00000000..87e5baea --- /dev/null +++ b/customSDK/servicefabric/models/service_type_health_policy_map_item_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceTypeHealthPolicyMapItem(Model): + """Defines an item in ServiceTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the service type health policy map item. + This is the name of the service type. + :type key: str + :param value: Required. The value of the service type health policy map + item. This is the ServiceTypeHealthPolicy for this service type. + :type value: ~azure.servicefabric.models.ServiceTypeHealthPolicy + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'ServiceTypeHealthPolicy'}, + } + + def __init__(self, *, key: str, value, **kwargs) -> None: + super(ServiceTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = key + self.value = value diff --git a/customSDK/servicefabric/models/service_type_health_policy_py3.py b/customSDK/servicefabric/models/service_type_health_policy_py3.py new file mode 100644 index 00000000..3cd924d6 --- /dev/null +++ b/customSDK/servicefabric/models/service_type_health_policy_py3.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceTypeHealthPolicy(Model): + """Represents the health policy used to evaluate the health of services + belonging to a service type. + + :param max_percent_unhealthy_partitions_per_service: The maximum allowed + percentage of unhealthy partitions per service. Allowed values are Byte + values from zero to 100 + The percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error. + If the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy + partitions over the total number of partitions in the service. + The computation rounds up to tolerate one failure on small numbers of + partitions. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_partitions_per_service: int + :param max_percent_unhealthy_replicas_per_partition: The maximum allowed + percentage of unhealthy replicas per partition. Allowed values are Byte + values from zero to 100. + The percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in error. + If the percentage is respected but there is at least one unhealthy + replica, the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition. + The computation rounds up to tolerate one failure on small numbers of + replicas. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_replicas_per_partition: int + :param max_percent_unhealthy_services: The maximum allowed percentage of + unhealthy services. Allowed values are Byte values from zero to 100. + The percentage represents the maximum tolerated percentage of services + that can be unhealthy before the application is considered in error. + If the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning. + This is calculated by dividing the number of unhealthy services of the + specific service type over the total number of services of the specific + service type. + The computation rounds up to tolerate one failure on small numbers of + services. Default percentage is zero. Default value: 0 . + :type max_percent_unhealthy_services: int + """ + + _attribute_map = { + 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, + 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, + 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, + } + + def __init__(self, *, max_percent_unhealthy_partitions_per_service: int=0, max_percent_unhealthy_replicas_per_partition: int=0, max_percent_unhealthy_services: int=0, **kwargs) -> None: + super(ServiceTypeHealthPolicy, self).__init__(**kwargs) + self.max_percent_unhealthy_partitions_per_service = max_percent_unhealthy_partitions_per_service + self.max_percent_unhealthy_replicas_per_partition = max_percent_unhealthy_replicas_per_partition + self.max_percent_unhealthy_services = max_percent_unhealthy_services diff --git a/customSDK/servicefabric/models/service_type_info.py b/customSDK/servicefabric/models/service_type_info.py new file mode 100644 index 00000000..64866aa2 --- /dev/null +++ b/customSDK/servicefabric/models/service_type_info.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceTypeInfo(Model): + """Information about a service type that is defined in a service manifest of a + provisioned application type. + + :param service_type_description: Describes a service type defined in the + service manifest of a provisioned application type. The properties the + ones defined in the service manifest. + :type service_type_description: + ~azure.servicefabric.models.ServiceTypeDescription + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param service_manifest_version: The version of the service manifest in + which this service type is defined. + :type service_manifest_version: str + :param is_service_group: Indicates whether the service is a service group. + If it is, the property value is true otherwise false. + :type is_service_group: bool + """ + + _attribute_map = { + 'service_type_description': {'key': 'ServiceTypeDescription', 'type': 'ServiceTypeDescription'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ServiceTypeInfo, self).__init__(**kwargs) + self.service_type_description = kwargs.get('service_type_description', None) + self.service_manifest_name = kwargs.get('service_manifest_name', None) + self.service_manifest_version = kwargs.get('service_manifest_version', None) + self.is_service_group = kwargs.get('is_service_group', None) diff --git a/customSDK/servicefabric/models/service_type_info_py3.py b/customSDK/servicefabric/models/service_type_info_py3.py new file mode 100644 index 00000000..9c8bd629 --- /dev/null +++ b/customSDK/servicefabric/models/service_type_info_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceTypeInfo(Model): + """Information about a service type that is defined in a service manifest of a + provisioned application type. + + :param service_type_description: Describes a service type defined in the + service manifest of a provisioned application type. The properties the + ones defined in the service manifest. + :type service_type_description: + ~azure.servicefabric.models.ServiceTypeDescription + :param service_manifest_name: The name of the service manifest in which + this service type is defined. + :type service_manifest_name: str + :param service_manifest_version: The version of the service manifest in + which this service type is defined. + :type service_manifest_version: str + :param is_service_group: Indicates whether the service is a service group. + If it is, the property value is true otherwise false. + :type is_service_group: bool + """ + + _attribute_map = { + 'service_type_description': {'key': 'ServiceTypeDescription', 'type': 'ServiceTypeDescription'}, + 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, + 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + } + + def __init__(self, *, service_type_description=None, service_manifest_name: str=None, service_manifest_version: str=None, is_service_group: bool=None, **kwargs) -> None: + super(ServiceTypeInfo, self).__init__(**kwargs) + self.service_type_description = service_type_description + self.service_manifest_name = service_manifest_name + self.service_manifest_version = service_manifest_version + self.is_service_group = is_service_group diff --git a/customSDK/servicefabric/models/service_type_manifest.py b/customSDK/servicefabric/models/service_type_manifest.py new file mode 100644 index 00000000..295a4b25 --- /dev/null +++ b/customSDK/servicefabric/models/service_type_manifest.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceTypeManifest(Model): + """Contains the manifest describing a service type registered as part of an + application in a Service Fabric cluster. + + :param manifest: The XML manifest as a string. + :type manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceTypeManifest, self).__init__(**kwargs) + self.manifest = kwargs.get('manifest', None) diff --git a/customSDK/servicefabric/models/service_type_manifest_py3.py b/customSDK/servicefabric/models/service_type_manifest_py3.py new file mode 100644 index 00000000..5ffbd26d --- /dev/null +++ b/customSDK/servicefabric/models/service_type_manifest_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceTypeManifest(Model): + """Contains the manifest describing a service type registered as part of an + application in a Service Fabric cluster. + + :param manifest: The XML manifest as a string. + :type manifest: str + """ + + _attribute_map = { + 'manifest': {'key': 'Manifest', 'type': 'str'}, + } + + def __init__(self, *, manifest: str=None, **kwargs) -> None: + super(ServiceTypeManifest, self).__init__(**kwargs) + self.manifest = manifest diff --git a/customSDK/servicefabric/models/service_update_description.py b/customSDK/servicefabric/models/service_update_description.py new file mode 100644 index 00000000..bd7a1678 --- /dev/null +++ b/customSDK/servicefabric/models/service_update_description.py @@ -0,0 +1,141 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceUpdateDescription(Model): + """A ServiceUpdateDescription contains all of the information necessary to + update a service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceUpdateDescription, + StatelessServiceUpdateDescription + + All required parameters must be populated in order to send to Azure. + + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 6 then the flags for + ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + - None - Does not indicate any other properties are set. The value is + zero. + - TargetReplicaSetSize/InstanceCount - Indicates whether the + TargetReplicaSetSize property (for Stateful services) or the InstanceCount + property (for Stateless services) is set. The value is 1. + - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + property is set. The value is 2. + - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property + is set. The value is 4. + - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + property is set. The value is 8. + - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The + value is 16. + - PlacementConstraints - Indicates the PlacementConstraints property is + set. The value is 32. + - PlacementPolicyList - Indicates the ServicePlacementPolicies property is + set. The value is 64. + - Correlation - Indicates the CorrelationScheme property is set. The value + is 128. + - Metrics - Indicates the ServiceLoadMetrics property is set. The value is + 256. + - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The + value is 512. + - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + is 1024. + - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit + property is set. The value is 2048. + - MinInstanceCount - Indicates the MinInstanceCount property is set. The + value is 4096. + - MinInstancePercentage - Indicates the MinInstancePercentage property is + set. The value is 8192. + - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. + :type flags: str + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param load_metrics: The service load metrics. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceUpdateDescription', 'Stateless': 'StatelessServiceUpdateDescription'} + } + + def __init__(self, **kwargs): + super(ServiceUpdateDescription, self).__init__(**kwargs) + self.flags = kwargs.get('flags', None) + self.placement_constraints = kwargs.get('placement_constraints', None) + self.correlation_scheme = kwargs.get('correlation_scheme', None) + self.load_metrics = kwargs.get('load_metrics', None) + self.service_placement_policies = kwargs.get('service_placement_policies', None) + self.default_move_cost = kwargs.get('default_move_cost', None) + self.scaling_policies = kwargs.get('scaling_policies', None) + self.service_dns_name = kwargs.get('service_dns_name', None) + self.tags_for_placement = kwargs.get('tags_for_placement', None) + self.tags_for_running = kwargs.get('tags_for_running', None) + self.service_kind = None diff --git a/customSDK/servicefabric/models/service_update_description_py3.py b/customSDK/servicefabric/models/service_update_description_py3.py new file mode 100644 index 00000000..957edcea --- /dev/null +++ b/customSDK/servicefabric/models/service_update_description_py3.py @@ -0,0 +1,141 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceUpdateDescription(Model): + """A ServiceUpdateDescription contains all of the information necessary to + update a service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StatefulServiceUpdateDescription, + StatelessServiceUpdateDescription + + All required parameters must be populated in order to send to Azure. + + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 6 then the flags for + ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + - None - Does not indicate any other properties are set. The value is + zero. + - TargetReplicaSetSize/InstanceCount - Indicates whether the + TargetReplicaSetSize property (for Stateful services) or the InstanceCount + property (for Stateless services) is set. The value is 1. + - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + property is set. The value is 2. + - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property + is set. The value is 4. + - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + property is set. The value is 8. + - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The + value is 16. + - PlacementConstraints - Indicates the PlacementConstraints property is + set. The value is 32. + - PlacementPolicyList - Indicates the ServicePlacementPolicies property is + set. The value is 64. + - Correlation - Indicates the CorrelationScheme property is set. The value + is 128. + - Metrics - Indicates the ServiceLoadMetrics property is set. The value is + 256. + - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The + value is 512. + - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + is 1024. + - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit + property is set. The value is 2048. + - MinInstanceCount - Indicates the MinInstanceCount property is set. The + value is 4096. + - MinInstancePercentage - Indicates the MinInstancePercentage property is + set. The value is 8192. + - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. + :type flags: str + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param load_metrics: The service load metrics. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + _subtype_map = { + 'service_kind': {'Stateful': 'StatefulServiceUpdateDescription', 'Stateless': 'StatelessServiceUpdateDescription'} + } + + def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, **kwargs) -> None: + super(ServiceUpdateDescription, self).__init__(**kwargs) + self.flags = flags + self.placement_constraints = placement_constraints + self.correlation_scheme = correlation_scheme + self.load_metrics = load_metrics + self.service_placement_policies = service_placement_policies + self.default_move_cost = default_move_cost + self.scaling_policies = scaling_policies + self.service_dns_name = service_dns_name + self.tags_for_placement = tags_for_placement + self.tags_for_running = tags_for_running + self.service_kind = None diff --git a/customSDK/servicefabric/models/service_upgrade_progress.py b/customSDK/servicefabric/models/service_upgrade_progress.py new file mode 100644 index 00000000..22c0adc7 --- /dev/null +++ b/customSDK/servicefabric/models/service_upgrade_progress.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceUpgradeProgress(Model): + """Information about how many replicas are completed or pending for a specific + service during upgrade. + + :param service_name: Name of the Service resource. + :type service_name: str + :param completed_replica_count: The number of replicas that completes the + upgrade in the service. + :type completed_replica_count: str + :param pending_replica_count: The number of replicas that are waiting to + be upgraded in the service. + :type pending_replica_count: str + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'completed_replica_count': {'key': 'CompletedReplicaCount', 'type': 'str'}, + 'pending_replica_count': {'key': 'PendingReplicaCount', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceUpgradeProgress, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.completed_replica_count = kwargs.get('completed_replica_count', None) + self.pending_replica_count = kwargs.get('pending_replica_count', None) diff --git a/customSDK/servicefabric/models/service_upgrade_progress_py3.py b/customSDK/servicefabric/models/service_upgrade_progress_py3.py new file mode 100644 index 00000000..f060cbb1 --- /dev/null +++ b/customSDK/servicefabric/models/service_upgrade_progress_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceUpgradeProgress(Model): + """Information about how many replicas are completed or pending for a specific + service during upgrade. + + :param service_name: Name of the Service resource. + :type service_name: str + :param completed_replica_count: The number of replicas that completes the + upgrade in the service. + :type completed_replica_count: str + :param pending_replica_count: The number of replicas that are waiting to + be upgraded in the service. + :type pending_replica_count: str + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'completed_replica_count': {'key': 'CompletedReplicaCount', 'type': 'str'}, + 'pending_replica_count': {'key': 'PendingReplicaCount', 'type': 'str'}, + } + + def __init__(self, *, service_name: str=None, completed_replica_count: str=None, pending_replica_count: str=None, **kwargs) -> None: + super(ServiceUpgradeProgress, self).__init__(**kwargs) + self.service_name = service_name + self.completed_replica_count = completed_replica_count + self.pending_replica_count = pending_replica_count diff --git a/customSDK/servicefabric/models/services_health_evaluation.py b/customSDK/servicefabric/models/services_health_evaluation.py new file mode 100644 index 00000000..55a34373 --- /dev/null +++ b/customSDK/servicefabric/models/services_health_evaluation.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class ServicesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for services of a certain service type + belonging to an application, containing health evaluations for each + unhealthy service that impacted current aggregated health state. Can be + returned when evaluating application health and the aggregated health state + is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param service_type_name: Name of the service type of the services. + :type service_type_name: str + :param max_percent_unhealthy_services: Maximum allowed percentage of + unhealthy services from the ServiceTypeHealthPolicy. + :type max_percent_unhealthy_services: int + :param total_count: Total number of services of the current service type + in the application from the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + ServiceHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(ServicesHealthEvaluation, self).__init__(**kwargs) + self.service_type_name = kwargs.get('service_type_name', None) + self.max_percent_unhealthy_services = kwargs.get('max_percent_unhealthy_services', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'Services' diff --git a/customSDK/servicefabric/models/services_health_evaluation_py3.py b/customSDK/servicefabric/models/services_health_evaluation_py3.py new file mode 100644 index 00000000..46e51393 --- /dev/null +++ b/customSDK/servicefabric/models/services_health_evaluation_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class ServicesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for services of a certain service type + belonging to an application, containing health evaluations for each + unhealthy service that impacted current aggregated health state. Can be + returned when evaluating application health and the aggregated health state + is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param service_type_name: Name of the service type of the services. + :type service_type_name: str + :param max_percent_unhealthy_services: Maximum allowed percentage of + unhealthy services from the ServiceTypeHealthPolicy. + :type max_percent_unhealthy_services: int + :param total_count: Total number of services of the current service type + in the application from the health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + ServiceHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, service_type_name: str=None, max_percent_unhealthy_services: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(ServicesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.service_type_name = service_type_name + self.max_percent_unhealthy_services = max_percent_unhealthy_services + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'Services' diff --git a/customSDK/servicefabric/models/setting.py b/customSDK/servicefabric/models/setting.py new file mode 100644 index 00000000..850ffb06 --- /dev/null +++ b/customSDK/servicefabric/models/setting.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Setting(Model): + """Describes a setting for the container. The setting file path can be fetched + from environment variable "Fabric_SettingPath". The path for Windows + container is "C:\\secrets". The path for Linux container is "/var/secrets". + + :param type: The type of the setting being given in value. Possible values + include: 'ClearText', 'KeyVaultReference', 'SecretValueReference'. Default + value: "ClearText" . + :type type: str or ~azure.servicefabric.models.SettingType + :param name: The name of the setting. + :type name: str + :param value: The value of the setting, will be processed based on the + type provided. + :type value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Setting, self).__init__(**kwargs) + self.type = kwargs.get('type', "ClearText") + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/setting_py3.py b/customSDK/servicefabric/models/setting_py3.py new file mode 100644 index 00000000..8e51284c --- /dev/null +++ b/customSDK/servicefabric/models/setting_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Setting(Model): + """Describes a setting for the container. The setting file path can be fetched + from environment variable "Fabric_SettingPath". The path for Windows + container is "C:\\secrets". The path for Linux container is "/var/secrets". + + :param type: The type of the setting being given in value. Possible values + include: 'ClearText', 'KeyVaultReference', 'SecretValueReference'. Default + value: "ClearText" . + :type type: str or ~azure.servicefabric.models.SettingType + :param name: The name of the setting. + :type name: str + :param value: The value of the setting, will be processed based on the + type provided. + :type value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, type="ClearText", name: str=None, value: str=None, **kwargs) -> None: + super(Setting, self).__init__(**kwargs) + self.type = type + self.name = name + self.value = value diff --git a/customSDK/servicefabric/models/singleton_partition_information.py b/customSDK/servicefabric/models/singleton_partition_information.py new file mode 100644 index 00000000..cb7eceb9 --- /dev/null +++ b/customSDK/servicefabric/models/singleton_partition_information.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_information import PartitionInformation + + +class SingletonPartitionInformation(PartitionInformation): + """Information about a partition that is singleton. The services with + singleton partitioning scheme are effectively non-partitioned. They only + have one partition. + + All required parameters must be populated in order to send to Azure. + + :param id: An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. + The partition ID is unique and does not change for the lifetime of the + service. If the same service was deleted and recreated the IDs of its + partitions would be different. + :type id: str + :param service_partition_kind: Required. Constant filled by server. + :type service_partition_kind: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SingletonPartitionInformation, self).__init__(**kwargs) + self.service_partition_kind = 'Singleton' diff --git a/customSDK/servicefabric/models/singleton_partition_information_py3.py b/customSDK/servicefabric/models/singleton_partition_information_py3.py new file mode 100644 index 00000000..d1cc3f76 --- /dev/null +++ b/customSDK/servicefabric/models/singleton_partition_information_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_information_py3 import PartitionInformation + + +class SingletonPartitionInformation(PartitionInformation): + """Information about a partition that is singleton. The services with + singleton partitioning scheme are effectively non-partitioned. They only + have one partition. + + All required parameters must be populated in order to send to Azure. + + :param id: An internal ID used by Service Fabric to uniquely identify a + partition. This is a randomly generated GUID when the service was created. + The partition ID is unique and does not change for the lifetime of the + service. If the same service was deleted and recreated the IDs of its + partitions would be different. + :type id: str + :param service_partition_kind: Required. Constant filled by server. + :type service_partition_kind: str + """ + + _validation = { + 'service_partition_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SingletonPartitionInformation, self).__init__(id=id, **kwargs) + self.service_partition_kind = 'Singleton' diff --git a/customSDK/servicefabric/models/singleton_partition_scheme_description.py b/customSDK/servicefabric/models/singleton_partition_scheme_description.py new file mode 100644 index 00000000..992031dc --- /dev/null +++ b/customSDK/servicefabric/models/singleton_partition_scheme_description.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_scheme_description import PartitionSchemeDescription + + +class SingletonPartitionSchemeDescription(PartitionSchemeDescription): + """Describes the partition scheme of a singleton-partitioned, or + non-partitioned service. + + All required parameters must be populated in order to send to Azure. + + :param partition_scheme: Required. Constant filled by server. + :type partition_scheme: str + """ + + _validation = { + 'partition_scheme': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SingletonPartitionSchemeDescription, self).__init__(**kwargs) + self.partition_scheme = 'Singleton' diff --git a/customSDK/servicefabric/models/singleton_partition_scheme_description_py3.py b/customSDK/servicefabric/models/singleton_partition_scheme_description_py3.py new file mode 100644 index 00000000..df9cdb2d --- /dev/null +++ b/customSDK/servicefabric/models/singleton_partition_scheme_description_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_scheme_description_py3 import PartitionSchemeDescription + + +class SingletonPartitionSchemeDescription(PartitionSchemeDescription): + """Describes the partition scheme of a singleton-partitioned, or + non-partitioned service. + + All required parameters must be populated in order to send to Azure. + + :param partition_scheme: Required. Constant filled by server. + :type partition_scheme: str + """ + + _validation = { + 'partition_scheme': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SingletonPartitionSchemeDescription, self).__init__(**kwargs) + self.partition_scheme = 'Singleton' diff --git a/customSDK/servicefabric/models/start_cluster_upgrade_description.py b/customSDK/servicefabric/models/start_cluster_upgrade_description.py new file mode 100644 index 00000000..68d639e9 --- /dev/null +++ b/customSDK/servicefabric/models/start_cluster_upgrade_description.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StartClusterUpgradeDescription(Model): + """Describes the parameters for starting a cluster upgrade. + + :param code_version: The cluster code version. + :type code_version: str + :param config_version: The cluster configuration version. + :type config_version: str + :param upgrade_kind: The kind of upgrade out of the following possible + values. Possible values include: 'Invalid', 'Rolling'. Default value: + "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, + Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', + 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param sort_order: Defines the order in which an upgrade proceeds through + the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', + 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default + value: "Default" . + :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param enable_delta_health_evaluation: When true, enables delta health + evaluation rather than absolute health evaluation after completion of each + upgrade domain. + :type enable_delta_health_evaluation: bool + :param cluster_upgrade_health_policy: Defines a health policy used to + evaluate the health of the cluster during a cluster upgrade. + :type cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :param application_health_policy_map: Defines the application health + policy map used to evaluate the health of an application or one of its + children entities. + :type application_health_policy_map: + ~azure.servicefabric.models.ApplicationHealthPolicies + :param instance_close_delay_duration_in_seconds: Duration in seconds, to + wait before a stateless instance is closed, to allow the active requests + to drain gracefully. This would be effective when the instance is closing + during the application/cluster + upgrade, only for those instances which have a non-zero delay duration + configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is + 4294967295, which indicates that the behavior will entirely depend on the + delay configured in the stateless service description. + :type instance_close_delay_duration_in_seconds: long + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(StartClusterUpgradeDescription, self).__init__(**kwargs) + self.code_version = kwargs.get('code_version', None) + self.config_version = kwargs.get('config_version', None) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") + self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) + self.force_restart = kwargs.get('force_restart', None) + self.sort_order = kwargs.get('sort_order', "Default") + self.monitoring_policy = kwargs.get('monitoring_policy', None) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) + self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) + self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', None) diff --git a/customSDK/servicefabric/models/start_cluster_upgrade_description_py3.py b/customSDK/servicefabric/models/start_cluster_upgrade_description_py3.py new file mode 100644 index 00000000..719ba635 --- /dev/null +++ b/customSDK/servicefabric/models/start_cluster_upgrade_description_py3.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StartClusterUpgradeDescription(Model): + """Describes the parameters for starting a cluster upgrade. + + :param code_version: The cluster code version. + :type code_version: str + :param config_version: The cluster configuration version. + :type config_version: str + :param upgrade_kind: The kind of upgrade out of the following possible + values. Possible values include: 'Invalid', 'Rolling'. Default value: + "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind + :param rolling_upgrade_mode: The mode used to monitor health during a + rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, + Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', + 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . + :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode + :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of + time to block processing of an upgrade domain and prevent loss of + availability when there are unexpected issues. When this timeout expires, + processing of the upgrade domain will proceed regardless of availability + loss issues. The timeout is reset at the start of each upgrade domain. + Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit + integer). + :type upgrade_replica_set_check_timeout_in_seconds: long + :param force_restart: If true, then processes are forcefully restarted + during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + :type force_restart: bool + :param sort_order: Defines the order in which an upgrade proceeds through + the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', + 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default + value: "Default" . + :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder + :param monitoring_policy: Describes the parameters for monitoring an + upgrade in Monitored mode. + :type monitoring_policy: + ~azure.servicefabric.models.MonitoringPolicyDescription + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param enable_delta_health_evaluation: When true, enables delta health + evaluation rather than absolute health evaluation after completion of each + upgrade domain. + :type enable_delta_health_evaluation: bool + :param cluster_upgrade_health_policy: Defines a health policy used to + evaluate the health of the cluster during a cluster upgrade. + :type cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :param application_health_policy_map: Defines the application health + policy map used to evaluate the health of an application or one of its + children entities. + :type application_health_policy_map: + ~azure.servicefabric.models.ApplicationHealthPolicies + :param instance_close_delay_duration_in_seconds: Duration in seconds, to + wait before a stateless instance is closed, to allow the active requests + to drain gracefully. This would be effective when the instance is closing + during the application/cluster + upgrade, only for those instances which have a non-zero delay duration + configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details. + Note, the default value of InstanceCloseDelayDurationInSeconds is + 4294967295, which indicates that the behavior will entirely depend on the + delay configured in the stateless service description. + :type instance_close_delay_duration_in_seconds: long + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, + 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, + 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, + 'sort_order': {'key': 'SortOrder', 'type': 'str'}, + 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, + 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + } + + def __init__(self, *, code_version: str=None, config_version: str=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", monitoring_policy=None, cluster_health_policy=None, enable_delta_health_evaluation: bool=None, cluster_upgrade_health_policy=None, application_health_policy_map=None, instance_close_delay_duration_in_seconds: int=None, **kwargs) -> None: + super(StartClusterUpgradeDescription, self).__init__(**kwargs) + self.code_version = code_version + self.config_version = config_version + self.upgrade_kind = upgrade_kind + self.rolling_upgrade_mode = rolling_upgrade_mode + self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds + self.force_restart = force_restart + self.sort_order = sort_order + self.monitoring_policy = monitoring_policy + self.cluster_health_policy = cluster_health_policy + self.enable_delta_health_evaluation = enable_delta_health_evaluation + self.cluster_upgrade_health_policy = cluster_upgrade_health_policy + self.application_health_policy_map = application_health_policy_map + self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds diff --git a/customSDK/servicefabric/models/started_chaos_event.py b/customSDK/servicefabric/models/started_chaos_event.py new file mode 100644 index 00000000..49dfaba2 --- /dev/null +++ b/customSDK/servicefabric/models/started_chaos_event.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .chaos_event import ChaosEvent + + +class StartedChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos is started. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param chaos_parameters: Defines all the parameters to configure a Chaos + run. + :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, + } + + def __init__(self, **kwargs): + super(StartedChaosEvent, self).__init__(**kwargs) + self.chaos_parameters = kwargs.get('chaos_parameters', None) + self.kind = 'Started' diff --git a/customSDK/servicefabric/models/started_chaos_event_py3.py b/customSDK/servicefabric/models/started_chaos_event_py3.py new file mode 100644 index 00000000..0aaf9f02 --- /dev/null +++ b/customSDK/servicefabric/models/started_chaos_event_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .chaos_event_py3 import ChaosEvent + + +class StartedChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos is started. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param chaos_parameters: Defines all the parameters to configure a Chaos + run. + :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, + } + + def __init__(self, *, time_stamp_utc, chaos_parameters=None, **kwargs) -> None: + super(StartedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.chaos_parameters = chaos_parameters + self.kind = 'Started' diff --git a/customSDK/servicefabric/models/stateful_replica_health_report_expired_event.py b/customSDK/servicefabric/models/stateful_replica_health_report_expired_event.py new file mode 100644 index 00000000..04171729 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_replica_health_report_expired_event.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_event import ReplicaEvent + + +class StatefulReplicaHealthReportExpiredEvent(ReplicaEvent): + """Stateful Replica Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param replica_instance_id: Required. Id of Replica instance. + :type replica_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'replica_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(StatefulReplicaHealthReportExpiredEvent, self).__init__(**kwargs) + self.replica_instance_id = kwargs.get('replica_instance_id', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'StatefulReplicaHealthReportExpired' diff --git a/customSDK/servicefabric/models/stateful_replica_health_report_expired_event_py3.py b/customSDK/servicefabric/models/stateful_replica_health_report_expired_event_py3.py new file mode 100644 index 00000000..e5880687 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_replica_health_report_expired_event_py3.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_event_py3 import ReplicaEvent + + +class StatefulReplicaHealthReportExpiredEvent(ReplicaEvent): + """Stateful Replica Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param replica_instance_id: Required. Id of Replica instance. + :type replica_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'replica_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, replica_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(StatefulReplicaHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.replica_instance_id = replica_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'StatefulReplicaHealthReportExpired' diff --git a/customSDK/servicefabric/models/stateful_replica_new_health_report_event.py b/customSDK/servicefabric/models/stateful_replica_new_health_report_event.py new file mode 100644 index 00000000..ac36335b --- /dev/null +++ b/customSDK/servicefabric/models/stateful_replica_new_health_report_event.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_event import ReplicaEvent + + +class StatefulReplicaNewHealthReportEvent(ReplicaEvent): + """Stateful Replica Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param replica_instance_id: Required. Id of Replica instance. + :type replica_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'replica_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(StatefulReplicaNewHealthReportEvent, self).__init__(**kwargs) + self.replica_instance_id = kwargs.get('replica_instance_id', None) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'StatefulReplicaNewHealthReport' diff --git a/customSDK/servicefabric/models/stateful_replica_new_health_report_event_py3.py b/customSDK/servicefabric/models/stateful_replica_new_health_report_event_py3.py new file mode 100644 index 00000000..0ce0b6db --- /dev/null +++ b/customSDK/servicefabric/models/stateful_replica_new_health_report_event_py3.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_event_py3 import ReplicaEvent + + +class StatefulReplicaNewHealthReportEvent(ReplicaEvent): + """Stateful Replica Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param replica_instance_id: Required. Id of Replica instance. + :type replica_instance_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'replica_instance_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, replica_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(StatefulReplicaNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.replica_instance_id = replica_instance_id + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'StatefulReplicaNewHealthReport' diff --git a/customSDK/servicefabric/models/stateful_service_description.py b/customSDK/servicefabric/models/stateful_service_description.py new file mode 100644 index 00000000..5ebad257 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_description.py @@ -0,0 +1,194 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_description import ServiceDescription + + +class StatefulServiceDescription(ServiceDescription): + """Describes a stateful service. + + All required parameters must be populated in order to send to Azure. + + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_name: Required. The full name of the service with 'fabric:' + URI scheme. + :type service_name: str + :param service_type_name: Required. Name of the service type as specified + in the service manifest. + :type service_type_name: str + :param initialization_data: The initialization data as an array of bytes. + Initialization data is passed to service instances or replicas when they + are created. + :type initialization_data: list[int] + :param partition_description: Required. The partition description as an + object. + :type partition_description: + ~azure.servicefabric.models.PartitionSchemeDescription + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param service_load_metrics: The service load metrics. + :type service_load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param is_default_move_cost_specified: Indicates if the DefaultMoveCost + property is specified. + :type is_default_move_cost_specified: bool + :param service_package_activation_mode: The activation mode of service + package to be used for a service. Possible values include: + 'SharedProcess', 'ExclusiveProcess' + :type service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :param service_dns_name: The DNS name of the service. It requires the DNS + system service to be enabled in Service Fabric cluster. + :type service_dns_name: str + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param target_replica_set_size: Required. The target replica set size as a + number. + :type target_replica_set_size: int + :param min_replica_set_size: Required. The minimum replica set size as a + number. + :type min_replica_set_size: int + :param has_persisted_state: Required. A flag indicating whether this is a + persistent service which stores states on the local disk. If it is then + the value of this property is true, if not it is false. + :type has_persisted_state: bool + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 6 then the flags for + QuorumLossWaitDuration (2) and StandByReplicaKeepDuration(4) are set. + - None - Does not indicate any other properties are set. The value is + zero. + - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + property is set. The value is 1. + - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property + is set. The value is 2. + - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + property is set. The value is 4. + - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit + property is set. The value is 8. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 16. + :type flags: int + :param replica_restart_wait_duration_seconds: The duration, in seconds, + between when a replica goes down and when a new replica is created. + :type replica_restart_wait_duration_seconds: long + :param quorum_loss_wait_duration_seconds: The maximum duration, in + seconds, for which a partition is allowed to be in a state of quorum loss. + :type quorum_loss_wait_duration_seconds: long + :param stand_by_replica_keep_duration_seconds: The definition on how long + StandBy replicas should be maintained before being removed. + :type stand_by_replica_keep_duration_seconds: long + :param service_placement_time_limit_seconds: The duration for which + replicas can stay InBuild before reporting that build is stuck. + :type service_placement_time_limit_seconds: long + :param drop_source_replica_on_move: Indicates whether to drop source + Secondary replica even if the target replica has not finished build. If + desired behavior is to drop it as soon as possible the value of this + property is true, if not it is false. + :type drop_source_replica_on_move: bool + :param replica_lifecycle_description: Defines how replicas of this service + will behave during ther lifecycle. + :type replica_lifecycle_description: + ~azure.servicefabric.models.ReplicaLifecycleDescription + :param auxiliary_replica_count: The auxiliary replica count as a number. + To use Auxiliary replicas, the following must be true: + AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :type auxiliary_replica_count: int + """ + + _validation = { + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + 'service_kind': {'required': True}, + 'target_replica_set_size': {'required': True, 'minimum': 1}, + 'min_replica_set_size': {'required': True, 'minimum': 1}, + 'has_persisted_state': {'required': True}, + 'replica_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'quorum_loss_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'stand_by_replica_keep_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'service_placement_time_limit_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'auxiliary_replica_count': {'minimum': 0}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'long'}, + 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'long'}, + 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'long'}, + 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'long'}, + 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, + 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(StatefulServiceDescription, self).__init__(**kwargs) + self.target_replica_set_size = kwargs.get('target_replica_set_size', None) + self.min_replica_set_size = kwargs.get('min_replica_set_size', None) + self.has_persisted_state = kwargs.get('has_persisted_state', None) + self.flags = kwargs.get('flags', None) + self.replica_restart_wait_duration_seconds = kwargs.get('replica_restart_wait_duration_seconds', None) + self.quorum_loss_wait_duration_seconds = kwargs.get('quorum_loss_wait_duration_seconds', None) + self.stand_by_replica_keep_duration_seconds = kwargs.get('stand_by_replica_keep_duration_seconds', None) + self.service_placement_time_limit_seconds = kwargs.get('service_placement_time_limit_seconds', None) + self.drop_source_replica_on_move = kwargs.get('drop_source_replica_on_move', None) + self.replica_lifecycle_description = kwargs.get('replica_lifecycle_description', None) + self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_description_py3.py b/customSDK/servicefabric/models/stateful_service_description_py3.py new file mode 100644 index 00000000..ebb9f713 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_description_py3.py @@ -0,0 +1,194 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_description_py3 import ServiceDescription + + +class StatefulServiceDescription(ServiceDescription): + """Describes a stateful service. + + All required parameters must be populated in order to send to Azure. + + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_name: Required. The full name of the service with 'fabric:' + URI scheme. + :type service_name: str + :param service_type_name: Required. Name of the service type as specified + in the service manifest. + :type service_type_name: str + :param initialization_data: The initialization data as an array of bytes. + Initialization data is passed to service instances or replicas when they + are created. + :type initialization_data: list[int] + :param partition_description: Required. The partition description as an + object. + :type partition_description: + ~azure.servicefabric.models.PartitionSchemeDescription + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param service_load_metrics: The service load metrics. + :type service_load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param is_default_move_cost_specified: Indicates if the DefaultMoveCost + property is specified. + :type is_default_move_cost_specified: bool + :param service_package_activation_mode: The activation mode of service + package to be used for a service. Possible values include: + 'SharedProcess', 'ExclusiveProcess' + :type service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :param service_dns_name: The DNS name of the service. It requires the DNS + system service to be enabled in Service Fabric cluster. + :type service_dns_name: str + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param target_replica_set_size: Required. The target replica set size as a + number. + :type target_replica_set_size: int + :param min_replica_set_size: Required. The minimum replica set size as a + number. + :type min_replica_set_size: int + :param has_persisted_state: Required. A flag indicating whether this is a + persistent service which stores states on the local disk. If it is then + the value of this property is true, if not it is false. + :type has_persisted_state: bool + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 6 then the flags for + QuorumLossWaitDuration (2) and StandByReplicaKeepDuration(4) are set. + - None - Does not indicate any other properties are set. The value is + zero. + - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + property is set. The value is 1. + - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property + is set. The value is 2. + - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + property is set. The value is 4. + - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit + property is set. The value is 8. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 16. + :type flags: int + :param replica_restart_wait_duration_seconds: The duration, in seconds, + between when a replica goes down and when a new replica is created. + :type replica_restart_wait_duration_seconds: long + :param quorum_loss_wait_duration_seconds: The maximum duration, in + seconds, for which a partition is allowed to be in a state of quorum loss. + :type quorum_loss_wait_duration_seconds: long + :param stand_by_replica_keep_duration_seconds: The definition on how long + StandBy replicas should be maintained before being removed. + :type stand_by_replica_keep_duration_seconds: long + :param service_placement_time_limit_seconds: The duration for which + replicas can stay InBuild before reporting that build is stuck. + :type service_placement_time_limit_seconds: long + :param drop_source_replica_on_move: Indicates whether to drop source + Secondary replica even if the target replica has not finished build. If + desired behavior is to drop it as soon as possible the value of this + property is true, if not it is false. + :type drop_source_replica_on_move: bool + :param replica_lifecycle_description: Defines how replicas of this service + will behave during ther lifecycle. + :type replica_lifecycle_description: + ~azure.servicefabric.models.ReplicaLifecycleDescription + :param auxiliary_replica_count: The auxiliary replica count as a number. + To use Auxiliary replicas, the following must be true: + AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :type auxiliary_replica_count: int + """ + + _validation = { + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + 'service_kind': {'required': True}, + 'target_replica_set_size': {'required': True, 'minimum': 1}, + 'min_replica_set_size': {'required': True, 'minimum': 1}, + 'has_persisted_state': {'required': True}, + 'replica_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'quorum_loss_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'stand_by_replica_keep_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'service_placement_time_limit_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'auxiliary_replica_count': {'minimum': 0}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'long'}, + 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'long'}, + 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'long'}, + 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'long'}, + 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, + 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, + } + + def __init__(self, *, service_name: str, service_type_name: str, partition_description, target_replica_set_size: int, min_replica_set_size: int, has_persisted_state: bool, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, flags: int=None, replica_restart_wait_duration_seconds: int=None, quorum_loss_wait_duration_seconds: int=None, stand_by_replica_keep_duration_seconds: int=None, service_placement_time_limit_seconds: int=None, drop_source_replica_on_move: bool=None, replica_lifecycle_description=None, auxiliary_replica_count: int=None, **kwargs) -> None: + super(StatefulServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, tags_required_to_place=tags_required_to_place, tags_required_to_run=tags_required_to_run, **kwargs) + self.target_replica_set_size = target_replica_set_size + self.min_replica_set_size = min_replica_set_size + self.has_persisted_state = has_persisted_state + self.flags = flags + self.replica_restart_wait_duration_seconds = replica_restart_wait_duration_seconds + self.quorum_loss_wait_duration_seconds = quorum_loss_wait_duration_seconds + self.stand_by_replica_keep_duration_seconds = stand_by_replica_keep_duration_seconds + self.service_placement_time_limit_seconds = service_placement_time_limit_seconds + self.drop_source_replica_on_move = drop_source_replica_on_move + self.replica_lifecycle_description = replica_lifecycle_description + self.auxiliary_replica_count = auxiliary_replica_count + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_info.py b/customSDK/servicefabric/models/stateful_service_info.py new file mode 100644 index 00000000..38bf04d8 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_info.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_info import ServiceInfo + + +class StatefulServiceInfo(ServiceInfo): + """Information about a stateful Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :param id: The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to + identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type id: str + :param name: The full name of the service with 'fabric:' URI scheme. + :type name: str + :param type_name: Name of the service type as specified in the service + manifest. + :type type_name: str + :param manifest_version: The version of the service manifest. + :type manifest_version: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_status: The status of the application. Possible values + include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + 'Failed' + :type service_status: str or ~azure.servicefabric.models.ServiceStatus + :param is_service_group: Whether the service is in a service group. + :type is_service_group: bool + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param has_persisted_state: Whether the service has persisted state. + :type has_persisted_state: bool + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(StatefulServiceInfo, self).__init__(**kwargs) + self.has_persisted_state = kwargs.get('has_persisted_state', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_info_py3.py b/customSDK/servicefabric/models/stateful_service_info_py3.py new file mode 100644 index 00000000..4a0f30fb --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_info_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_info_py3 import ServiceInfo + + +class StatefulServiceInfo(ServiceInfo): + """Information about a stateful Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :param id: The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to + identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type id: str + :param name: The full name of the service with 'fabric:' URI scheme. + :type name: str + :param type_name: Name of the service type as specified in the service + manifest. + :type type_name: str + :param manifest_version: The version of the service manifest. + :type manifest_version: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_status: The status of the application. Possible values + include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + 'Failed' + :type service_status: str or ~azure.servicefabric.models.ServiceStatus + :param is_service_group: Whether the service is in a service group. + :type is_service_group: bool + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param has_persisted_state: Whether the service has persisted state. + :type has_persisted_state: bool + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, name: str=None, type_name: str=None, manifest_version: str=None, health_state=None, service_status=None, is_service_group: bool=None, has_persisted_state: bool=None, **kwargs) -> None: + super(StatefulServiceInfo, self).__init__(id=id, name=name, type_name=type_name, manifest_version=manifest_version, health_state=health_state, service_status=service_status, is_service_group=is_service_group, **kwargs) + self.has_persisted_state = has_persisted_state + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_partition_info.py b/customSDK/servicefabric/models/stateful_service_partition_info.py new file mode 100644 index 00000000..11f39d76 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_partition_info.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_partition_info import ServicePartitionInfo + + +class StatefulServicePartitionInfo(ServicePartitionInfo): + """Information about a partition of a stateful Service Fabric service.. + + All required parameters must be populated in order to send to Azure. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param partition_status: The status of the service fabric service + partition. Possible values include: 'Invalid', 'Ready', 'NotReady', + 'InQuorumLoss', 'Reconfiguring', 'Deleting' + :type partition_status: str or + ~azure.servicefabric.models.ServicePartitionStatus + :param partition_information: Information about the partition identity, + partitioning scheme and keys supported by it. + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param target_replica_set_size: The target replica set size as a number. + :type target_replica_set_size: long + :param min_replica_set_size: The minimum replica set size as a number. + :type min_replica_set_size: long + :param auxiliary_replica_count: The auxiliary replica count as a number. + To use Auxiliary replicas the following must be true, + AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :type auxiliary_replica_count: long + :param last_quorum_loss_duration: The duration for which this partition + was in quorum loss. If the partition is currently in quorum loss, it + returns the duration since it has been in that state. This field is using + ISO8601 format for specifying the duration. + :type last_quorum_loss_duration: timedelta + :param primary_epoch: An Epoch is a configuration number for the partition + as a whole. When the configuration of the replica set changes, for example + when the Primary replica changes, the operations that are replicated from + the new Primary replica are said to be a new Epoch from the ones which + were sent by the old Primary replica. + :type primary_epoch: ~azure.servicefabric.models.Epoch + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'long'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'long'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'long'}, + 'last_quorum_loss_duration': {'key': 'LastQuorumLossDuration', 'type': 'duration'}, + 'primary_epoch': {'key': 'PrimaryEpoch', 'type': 'Epoch'}, + } + + def __init__(self, **kwargs): + super(StatefulServicePartitionInfo, self).__init__(**kwargs) + self.target_replica_set_size = kwargs.get('target_replica_set_size', None) + self.min_replica_set_size = kwargs.get('min_replica_set_size', None) + self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) + self.last_quorum_loss_duration = kwargs.get('last_quorum_loss_duration', None) + self.primary_epoch = kwargs.get('primary_epoch', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_partition_info_py3.py b/customSDK/servicefabric/models/stateful_service_partition_info_py3.py new file mode 100644 index 00000000..9c9f2a09 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_partition_info_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_partition_info_py3 import ServicePartitionInfo + + +class StatefulServicePartitionInfo(ServicePartitionInfo): + """Information about a partition of a stateful Service Fabric service.. + + All required parameters must be populated in order to send to Azure. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param partition_status: The status of the service fabric service + partition. Possible values include: 'Invalid', 'Ready', 'NotReady', + 'InQuorumLoss', 'Reconfiguring', 'Deleting' + :type partition_status: str or + ~azure.servicefabric.models.ServicePartitionStatus + :param partition_information: Information about the partition identity, + partitioning scheme and keys supported by it. + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param target_replica_set_size: The target replica set size as a number. + :type target_replica_set_size: long + :param min_replica_set_size: The minimum replica set size as a number. + :type min_replica_set_size: long + :param auxiliary_replica_count: The auxiliary replica count as a number. + To use Auxiliary replicas the following must be true, + AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :type auxiliary_replica_count: long + :param last_quorum_loss_duration: The duration for which this partition + was in quorum loss. If the partition is currently in quorum loss, it + returns the duration since it has been in that state. This field is using + ISO8601 format for specifying the duration. + :type last_quorum_loss_duration: timedelta + :param primary_epoch: An Epoch is a configuration number for the partition + as a whole. When the configuration of the replica set changes, for example + when the Primary replica changes, the operations that are replicated from + the new Primary replica are said to be a new Epoch from the ones which + were sent by the old Primary replica. + :type primary_epoch: ~azure.servicefabric.models.Epoch + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'long'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'long'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'long'}, + 'last_quorum_loss_duration': {'key': 'LastQuorumLossDuration', 'type': 'duration'}, + 'primary_epoch': {'key': 'PrimaryEpoch', 'type': 'Epoch'}, + } + + def __init__(self, *, health_state=None, partition_status=None, partition_information=None, target_replica_set_size: int=None, min_replica_set_size: int=None, auxiliary_replica_count: int=None, last_quorum_loss_duration=None, primary_epoch=None, **kwargs) -> None: + super(StatefulServicePartitionInfo, self).__init__(health_state=health_state, partition_status=partition_status, partition_information=partition_information, **kwargs) + self.target_replica_set_size = target_replica_set_size + self.min_replica_set_size = min_replica_set_size + self.auxiliary_replica_count = auxiliary_replica_count + self.last_quorum_loss_duration = last_quorum_loss_duration + self.primary_epoch = primary_epoch + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_health.py b/customSDK/servicefabric/models/stateful_service_replica_health.py new file mode 100644 index 00000000..45dc4c34 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_replica_health.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_health import ReplicaHealth + + +class StatefulServiceReplicaHealth(ReplicaHealth): + """Represents the health of the stateful service replica. + Contains the replica aggregated health state, the health events and the + unhealthy evaluations. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param partition_id: Id of the partition to which this replica belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StatefulServiceReplicaHealth, self).__init__(**kwargs) + self.replica_id = kwargs.get('replica_id', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_health_py3.py b/customSDK/servicefabric/models/stateful_service_replica_health_py3.py new file mode 100644 index 00000000..bc07ec80 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_replica_health_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_health_py3 import ReplicaHealth + + +class StatefulServiceReplicaHealth(ReplicaHealth): + """Represents the health of the stateful service replica. + Contains the replica aggregated health state, the health events and the + unhealthy evaluations. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param partition_id: Id of the partition to which this replica belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, replica_id: str=None, **kwargs) -> None: + super(StatefulServiceReplicaHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, partition_id=partition_id, **kwargs) + self.replica_id = replica_id + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_health_state.py b/customSDK/servicefabric/models/stateful_service_replica_health_state.py new file mode 100644 index 00000000..67dfe6d0 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_replica_health_state.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_health_state import ReplicaHealthState + + +class StatefulServiceReplicaHealthState(ReplicaHealthState): + """Represents the health state of the stateful service replica, which contains + the replica ID and the aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param partition_id: The ID of the partition to which this replica + belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StatefulServiceReplicaHealthState, self).__init__(**kwargs) + self.replica_id = kwargs.get('replica_id', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_health_state_py3.py b/customSDK/servicefabric/models/stateful_service_replica_health_state_py3.py new file mode 100644 index 00000000..62ada1f2 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_replica_health_state_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_health_state_py3 import ReplicaHealthState + + +class StatefulServiceReplicaHealthState(ReplicaHealthState): + """Represents the health state of the stateful service replica, which contains + the replica ID and the aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param partition_id: The ID of the partition to which this replica + belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, partition_id: str=None, replica_id: str=None, **kwargs) -> None: + super(StatefulServiceReplicaHealthState, self).__init__(aggregated_health_state=aggregated_health_state, partition_id=partition_id, **kwargs) + self.replica_id = replica_id + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_info.py b/customSDK/servicefabric/models/stateful_service_replica_info.py new file mode 100644 index 00000000..2fcd842f --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_replica_info.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_info import ReplicaInfo + + +class StatefulServiceReplicaInfo(ReplicaInfo): + """Represents a stateful service replica. This includes information about the + identity, role, status, health, node name, uptime, and other details about + the replica. + + All required parameters must be populated in order to send to Azure. + + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param address: The address the replica is listening on. + :type address: str + :param last_in_build_duration_in_seconds: The last in build duration of + the replica in seconds. + :type last_in_build_duration_in_seconds: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_role: The role of a replica of a stateful service. Possible + values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', + 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', 'PrimaryAuxiliary' + :type replica_role: str or ~azure.servicefabric.models.ReplicaRole + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StatefulServiceReplicaInfo, self).__init__(**kwargs) + self.replica_role = kwargs.get('replica_role', None) + self.replica_id = kwargs.get('replica_id', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_info_py3.py b/customSDK/servicefabric/models/stateful_service_replica_info_py3.py new file mode 100644 index 00000000..92e305fd --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_replica_info_py3.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_info_py3 import ReplicaInfo + + +class StatefulServiceReplicaInfo(ReplicaInfo): + """Represents a stateful service replica. This includes information about the + identity, role, status, health, node name, uptime, and other details about + the replica. + + All required parameters must be populated in order to send to Azure. + + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param address: The address the replica is listening on. + :type address: str + :param last_in_build_duration_in_seconds: The last in build duration of + the replica in seconds. + :type last_in_build_duration_in_seconds: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_role: The role of a replica of a stateful service. Possible + values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', + 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', 'PrimaryAuxiliary' + :type replica_role: str or ~azure.servicefabric.models.ReplicaRole + :param replica_id: Id of a stateful service replica. ReplicaId is used by + Service Fabric to uniquely identify a replica of a partition. It is unique + within a partition and does not change for the lifetime of the replica. If + a replica gets dropped and another replica gets created on the same node + for the same partition, it will get a different value for the id. + Sometimes the id of a stateless service instance is also referred as a + replica id. + :type replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__(self, *, replica_status=None, health_state=None, node_name: str=None, address: str=None, last_in_build_duration_in_seconds: str=None, replica_role=None, replica_id: str=None, **kwargs) -> None: + super(StatefulServiceReplicaInfo, self).__init__(replica_status=replica_status, health_state=health_state, node_name=node_name, address=address, last_in_build_duration_in_seconds=last_in_build_duration_in_seconds, **kwargs) + self.replica_role = replica_role + self.replica_id = replica_id + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_type_description.py b/customSDK/servicefabric/models/stateful_service_type_description.py new file mode 100644 index 00000000..383a2342 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_type_description.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_type_description import ServiceTypeDescription + + +class StatefulServiceTypeDescription(ServiceTypeDescription): + """Describes a stateful service type defined in the service manifest of a + provisioned application type. + + All required parameters must be populated in order to send to Azure. + + :param is_stateful: Indicates whether the service type is a stateful + service type or a stateless service type. This property is true if the + service type is a stateful service type, false otherwise. + :type is_stateful: bool + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param placement_constraints: The placement constraint to be used when + instantiating this service in a Service Fabric cluster. + :type placement_constraints: str + :param load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: List of service placement policy + descriptions. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param extensions: List of service type extensions. + :type extensions: + list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :param kind: Required. Constant filled by server. + :type kind: str + :param has_persisted_state: A flag indicating whether this is a persistent + service which stores states on the local disk. If it is then the value of + this property is true, if not it is false. + :type has_persisted_state: bool + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(StatefulServiceTypeDescription, self).__init__(**kwargs) + self.has_persisted_state = kwargs.get('has_persisted_state', None) + self.kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_type_description_py3.py b/customSDK/servicefabric/models/stateful_service_type_description_py3.py new file mode 100644 index 00000000..14d8e3ca --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_type_description_py3.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_type_description_py3 import ServiceTypeDescription + + +class StatefulServiceTypeDescription(ServiceTypeDescription): + """Describes a stateful service type defined in the service manifest of a + provisioned application type. + + All required parameters must be populated in order to send to Azure. + + :param is_stateful: Indicates whether the service type is a stateful + service type or a stateless service type. This property is true if the + service type is a stateful service type, false otherwise. + :type is_stateful: bool + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param placement_constraints: The placement constraint to be used when + instantiating this service in a Service Fabric cluster. + :type placement_constraints: str + :param load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: List of service placement policy + descriptions. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param extensions: List of service type extensions. + :type extensions: + list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :param kind: Required. Constant filled by server. + :type kind: str + :param has_persisted_state: A flag indicating whether this is a persistent + service which stores states on the local disk. If it is then the value of + this property is true, if not it is false. + :type has_persisted_state: bool + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, + } + + def __init__(self, *, is_stateful: bool=None, service_type_name: str=None, placement_constraints: str=None, load_metrics=None, service_placement_policies=None, extensions=None, has_persisted_state: bool=None, **kwargs) -> None: + super(StatefulServiceTypeDescription, self).__init__(is_stateful=is_stateful, service_type_name=service_type_name, placement_constraints=placement_constraints, load_metrics=load_metrics, service_placement_policies=service_placement_policies, extensions=extensions, **kwargs) + self.has_persisted_state = has_persisted_state + self.kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_update_description.py b/customSDK/servicefabric/models/stateful_service_update_description.py new file mode 100644 index 00000000..49b4fdb2 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_update_description.py @@ -0,0 +1,173 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_update_description import ServiceUpdateDescription + + +class StatefulServiceUpdateDescription(ServiceUpdateDescription): + """Describes an update for a stateful service. + + All required parameters must be populated in order to send to Azure. + + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 6 then the flags for + ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + - None - Does not indicate any other properties are set. The value is + zero. + - TargetReplicaSetSize/InstanceCount - Indicates whether the + TargetReplicaSetSize property (for Stateful services) or the InstanceCount + property (for Stateless services) is set. The value is 1. + - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + property is set. The value is 2. + - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property + is set. The value is 4. + - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + property is set. The value is 8. + - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The + value is 16. + - PlacementConstraints - Indicates the PlacementConstraints property is + set. The value is 32. + - PlacementPolicyList - Indicates the ServicePlacementPolicies property is + set. The value is 64. + - Correlation - Indicates the CorrelationScheme property is set. The value + is 128. + - Metrics - Indicates the ServiceLoadMetrics property is set. The value is + 256. + - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The + value is 512. + - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + is 1024. + - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit + property is set. The value is 2048. + - MinInstanceCount - Indicates the MinInstanceCount property is set. The + value is 4096. + - MinInstancePercentage - Indicates the MinInstancePercentage property is + set. The value is 8192. + - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. + :type flags: str + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param load_metrics: The service load metrics. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param target_replica_set_size: The target replica set size as a number. + :type target_replica_set_size: int + :param min_replica_set_size: The minimum replica set size as a number. + :type min_replica_set_size: int + :param replica_restart_wait_duration_seconds: The duration, in seconds, + between when a replica goes down and when a new replica is created. + :type replica_restart_wait_duration_seconds: str + :param quorum_loss_wait_duration_seconds: The maximum duration, in + seconds, for which a partition is allowed to be in a state of quorum loss. + :type quorum_loss_wait_duration_seconds: str + :param stand_by_replica_keep_duration_seconds: The definition on how long + StandBy replicas should be maintained before being removed. + :type stand_by_replica_keep_duration_seconds: str + :param service_placement_time_limit_seconds: The duration for which + replicas can stay InBuild before reporting that build is stuck. + :type service_placement_time_limit_seconds: str + :param drop_source_replica_on_move: Indicates whether to drop source + Secondary replica even if the target replica has not finished build. If + desired behavior is to drop it as soon as possible the value of this + property is true, if not it is false. + :type drop_source_replica_on_move: bool + :param replica_lifecycle_description: Defines how replicas of this service + will behave during ther lifecycle. + :type replica_lifecycle_description: + ~azure.servicefabric.models.ReplicaLifecycleDescription + :param auxiliary_replica_count: The auxiliary replica count as a number. + To use Auxiliary replicas, the following must be true: + AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :type auxiliary_replica_count: int + """ + + _validation = { + 'service_kind': {'required': True}, + 'target_replica_set_size': {'minimum': 1}, + 'min_replica_set_size': {'minimum': 1}, + 'auxiliary_replica_count': {'minimum': 0}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'str'}, + 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'str'}, + 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'str'}, + 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'str'}, + 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, + 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(StatefulServiceUpdateDescription, self).__init__(**kwargs) + self.target_replica_set_size = kwargs.get('target_replica_set_size', None) + self.min_replica_set_size = kwargs.get('min_replica_set_size', None) + self.replica_restart_wait_duration_seconds = kwargs.get('replica_restart_wait_duration_seconds', None) + self.quorum_loss_wait_duration_seconds = kwargs.get('quorum_loss_wait_duration_seconds', None) + self.stand_by_replica_keep_duration_seconds = kwargs.get('stand_by_replica_keep_duration_seconds', None) + self.service_placement_time_limit_seconds = kwargs.get('service_placement_time_limit_seconds', None) + self.drop_source_replica_on_move = kwargs.get('drop_source_replica_on_move', None) + self.replica_lifecycle_description = kwargs.get('replica_lifecycle_description', None) + self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_update_description_py3.py b/customSDK/servicefabric/models/stateful_service_update_description_py3.py new file mode 100644 index 00000000..32b93aa2 --- /dev/null +++ b/customSDK/servicefabric/models/stateful_service_update_description_py3.py @@ -0,0 +1,173 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_update_description_py3 import ServiceUpdateDescription + + +class StatefulServiceUpdateDescription(ServiceUpdateDescription): + """Describes an update for a stateful service. + + All required parameters must be populated in order to send to Azure. + + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 6 then the flags for + ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + - None - Does not indicate any other properties are set. The value is + zero. + - TargetReplicaSetSize/InstanceCount - Indicates whether the + TargetReplicaSetSize property (for Stateful services) or the InstanceCount + property (for Stateless services) is set. The value is 1. + - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + property is set. The value is 2. + - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property + is set. The value is 4. + - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + property is set. The value is 8. + - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The + value is 16. + - PlacementConstraints - Indicates the PlacementConstraints property is + set. The value is 32. + - PlacementPolicyList - Indicates the ServicePlacementPolicies property is + set. The value is 64. + - Correlation - Indicates the CorrelationScheme property is set. The value + is 128. + - Metrics - Indicates the ServiceLoadMetrics property is set. The value is + 256. + - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The + value is 512. + - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + is 1024. + - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit + property is set. The value is 2048. + - MinInstanceCount - Indicates the MinInstanceCount property is set. The + value is 4096. + - MinInstancePercentage - Indicates the MinInstancePercentage property is + set. The value is 8192. + - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. + :type flags: str + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param load_metrics: The service load metrics. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param target_replica_set_size: The target replica set size as a number. + :type target_replica_set_size: int + :param min_replica_set_size: The minimum replica set size as a number. + :type min_replica_set_size: int + :param replica_restart_wait_duration_seconds: The duration, in seconds, + between when a replica goes down and when a new replica is created. + :type replica_restart_wait_duration_seconds: str + :param quorum_loss_wait_duration_seconds: The maximum duration, in + seconds, for which a partition is allowed to be in a state of quorum loss. + :type quorum_loss_wait_duration_seconds: str + :param stand_by_replica_keep_duration_seconds: The definition on how long + StandBy replicas should be maintained before being removed. + :type stand_by_replica_keep_duration_seconds: str + :param service_placement_time_limit_seconds: The duration for which + replicas can stay InBuild before reporting that build is stuck. + :type service_placement_time_limit_seconds: str + :param drop_source_replica_on_move: Indicates whether to drop source + Secondary replica even if the target replica has not finished build. If + desired behavior is to drop it as soon as possible the value of this + property is true, if not it is false. + :type drop_source_replica_on_move: bool + :param replica_lifecycle_description: Defines how replicas of this service + will behave during ther lifecycle. + :type replica_lifecycle_description: + ~azure.servicefabric.models.ReplicaLifecycleDescription + :param auxiliary_replica_count: The auxiliary replica count as a number. + To use Auxiliary replicas, the following must be true: + AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :type auxiliary_replica_count: int + """ + + _validation = { + 'service_kind': {'required': True}, + 'target_replica_set_size': {'minimum': 1}, + 'min_replica_set_size': {'minimum': 1}, + 'auxiliary_replica_count': {'minimum': 0}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, + 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, + 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'str'}, + 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'str'}, + 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'str'}, + 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'str'}, + 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, + 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, + } + + def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, target_replica_set_size: int=None, min_replica_set_size: int=None, replica_restart_wait_duration_seconds: str=None, quorum_loss_wait_duration_seconds: str=None, stand_by_replica_keep_duration_seconds: str=None, service_placement_time_limit_seconds: str=None, drop_source_replica_on_move: bool=None, replica_lifecycle_description=None, auxiliary_replica_count: int=None, **kwargs) -> None: + super(StatefulServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_dns_name=service_dns_name, tags_for_placement=tags_for_placement, tags_for_running=tags_for_running, **kwargs) + self.target_replica_set_size = target_replica_set_size + self.min_replica_set_size = min_replica_set_size + self.replica_restart_wait_duration_seconds = replica_restart_wait_duration_seconds + self.quorum_loss_wait_duration_seconds = quorum_loss_wait_duration_seconds + self.stand_by_replica_keep_duration_seconds = stand_by_replica_keep_duration_seconds + self.service_placement_time_limit_seconds = service_placement_time_limit_seconds + self.drop_source_replica_on_move = drop_source_replica_on_move + self.replica_lifecycle_description = replica_lifecycle_description + self.auxiliary_replica_count = auxiliary_replica_count + self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateless_replica_health_report_expired_event.py b/customSDK/servicefabric/models/stateless_replica_health_report_expired_event.py new file mode 100644 index 00000000..13e3fc19 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_replica_health_report_expired_event.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_event import ReplicaEvent + + +class StatelessReplicaHealthReportExpiredEvent(ReplicaEvent): + """Stateless Replica Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(StatelessReplicaHealthReportExpiredEvent, self).__init__(**kwargs) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'StatelessReplicaHealthReportExpired' diff --git a/customSDK/servicefabric/models/stateless_replica_health_report_expired_event_py3.py b/customSDK/servicefabric/models/stateless_replica_health_report_expired_event_py3.py new file mode 100644 index 00000000..dc0c9263 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_replica_health_report_expired_event_py3.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_event_py3 import ReplicaEvent + + +class StatelessReplicaHealthReportExpiredEvent(ReplicaEvent): + """Stateless Replica Health Report Expired event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(StatelessReplicaHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'StatelessReplicaHealthReportExpired' diff --git a/customSDK/servicefabric/models/stateless_replica_new_health_report_event.py b/customSDK/servicefabric/models/stateless_replica_new_health_report_event.py new file mode 100644 index 00000000..7f2c8f7f --- /dev/null +++ b/customSDK/servicefabric/models/stateless_replica_new_health_report_event.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_event import ReplicaEvent + + +class StatelessReplicaNewHealthReportEvent(ReplicaEvent): + """Stateless Replica Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(StatelessReplicaNewHealthReportEvent, self).__init__(**kwargs) + self.source_id = kwargs.get('source_id', None) + self.property = kwargs.get('property', None) + self.health_state = kwargs.get('health_state', None) + self.time_to_live_ms = kwargs.get('time_to_live_ms', None) + self.sequence_number = kwargs.get('sequence_number', None) + self.description = kwargs.get('description', None) + self.remove_when_expired = kwargs.get('remove_when_expired', None) + self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) + self.kind = 'StatelessReplicaNewHealthReport' diff --git a/customSDK/servicefabric/models/stateless_replica_new_health_report_event_py3.py b/customSDK/servicefabric/models/stateless_replica_new_health_report_event_py3.py new file mode 100644 index 00000000..fbaeeb9a --- /dev/null +++ b/customSDK/servicefabric/models/stateless_replica_new_health_report_event_py3.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_event_py3 import ReplicaEvent + + +class StatelessReplicaNewHealthReportEvent(ReplicaEvent): + """Stateless Replica Health Report Created event. + + All required parameters must be populated in order to send to Azure. + + :param event_instance_id: Required. The identifier for the FabricEvent + instance. + :type event_instance_id: str + :param category: The category of event. + :type category: str + :param time_stamp: Required. The time event was logged. + :type time_stamp: datetime + :param has_correlated_events: Shows there is existing related events + available. + :type has_correlated_events: bool + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Required. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for + the lifetime of the service. If the same service was deleted and recreated + the IDs of its partitions would be different. + :type partition_id: str + :param replica_id: Required. Id of a stateful service replica. ReplicaId + is used by Service Fabric to uniquely identify a replica of a partition. + It is unique within a partition and does not change for the lifetime of + the replica. If a replica gets dropped and another replica gets created on + the same node for the same partition, it will get a different value for + the id. Sometimes the id of a stateless service instance is also referred + as a replica id. + :type replica_id: long + :param source_id: Required. Id of report source. + :type source_id: str + :param property: Required. Describes the property. + :type property: str + :param health_state: Required. Describes the property health state. + :type health_state: str + :param time_to_live_ms: Required. Time to live in milli-seconds. + :type time_to_live_ms: long + :param sequence_number: Required. Sequence number of report. + :type sequence_number: long + :param description: Required. Description of report. + :type description: str + :param remove_when_expired: Required. Indicates the removal when it + expires. + :type remove_when_expired: bool + :param source_utc_timestamp: Required. Source time. + :type source_utc_timestamp: datetime + """ + + _validation = { + 'event_instance_id': {'required': True}, + 'time_stamp': {'required': True}, + 'kind': {'required': True}, + 'partition_id': {'required': True}, + 'replica_id': {'required': True}, + 'source_id': {'required': True}, + 'property': {'required': True}, + 'health_state': {'required': True}, + 'time_to_live_ms': {'required': True}, + 'sequence_number': {'required': True}, + 'description': {'required': True}, + 'remove_when_expired': {'required': True}, + 'source_utc_timestamp': {'required': True}, + } + + _attribute_map = { + 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, + 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, + 'source_id': {'key': 'SourceId', 'type': 'str'}, + 'property': {'key': 'Property', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, + 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, + 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: + super(StatelessReplicaNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) + self.source_id = source_id + self.property = property + self.health_state = health_state + self.time_to_live_ms = time_to_live_ms + self.sequence_number = sequence_number + self.description = description + self.remove_when_expired = remove_when_expired + self.source_utc_timestamp = source_utc_timestamp + self.kind = 'StatelessReplicaNewHealthReport' diff --git a/customSDK/servicefabric/models/stateless_service_description.py b/customSDK/servicefabric/models/stateless_service_description.py new file mode 100644 index 00000000..7ebf6c9a --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_description.py @@ -0,0 +1,192 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_description import ServiceDescription + + +class StatelessServiceDescription(ServiceDescription): + """Describes a stateless service. + + All required parameters must be populated in order to send to Azure. + + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_name: Required. The full name of the service with 'fabric:' + URI scheme. + :type service_name: str + :param service_type_name: Required. Name of the service type as specified + in the service manifest. + :type service_type_name: str + :param initialization_data: The initialization data as an array of bytes. + Initialization data is passed to service instances or replicas when they + are created. + :type initialization_data: list[int] + :param partition_description: Required. The partition description as an + object. + :type partition_description: + ~azure.servicefabric.models.PartitionSchemeDescription + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param service_load_metrics: The service load metrics. + :type service_load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param is_default_move_cost_specified: Indicates if the DefaultMoveCost + property is specified. + :type is_default_move_cost_specified: bool + :param service_package_activation_mode: The activation mode of service + package to be used for a service. Possible values include: + 'SharedProcess', 'ExclusiveProcess' + :type service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :param service_dns_name: The DNS name of the service. It requires the DNS + system service to be enabled in Service Fabric cluster. + :type service_dns_name: str + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_count: Required. The instance count. + :type instance_count: int + :param min_instance_count: MinInstanceCount is the minimum number of + instances that must be up to meet the EnsureAvailability safety check + during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation + -1 is first converted into the number of nodes on which the instances are + allowed to be placed according to the placement constraints on the + service. + :type min_instance_count: int + :param min_instance_percentage: MinInstancePercentage is the minimum + percentage of InstanceCount that must be up to meet the EnsureAvailability + safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage + computation, -1 is first converted into the number of nodes on which the + instances are allowed to be placed according to the placement constraints + on the service. + :type min_instance_percentage: int + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 1 then the flags for + InstanceCloseDelayDuration is set. + - None - Does not indicate any other properties are set. The value is + zero. + - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 1. + - InstanceRestartWaitDuration - Indicates the + InstanceRestartWaitDurationSeconds property is set. The value is 2. + :type flags: int + :param instance_close_delay_duration_seconds: Duration in seconds, to wait + before a stateless instance is closed, to allow the active requests to + drain gracefully. This would be effective when the instance is closing + during the application/cluster upgrade and disabling node. + The endpoint exposed on this instance is removed prior to starting the + delay, which prevents new connections to this instance. + In addition, clients that have subscribed to service endpoint change + events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), + can do + the following upon receiving the endpoint removal notification: + - Stop sending new requests to this instance. + - Close existing connections after in-flight requests have completed. + - Connect to a different instance of the service partition for future + requests. + Note, the default value of InstanceCloseDelayDuration is 0, which + indicates that there won't be any delay or removal of the endpoint prior + to closing the instance. + :type instance_close_delay_duration_seconds: long + :param instance_lifecycle_description: Defines how instances of this + service will behave during their lifecycle. + :type instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :param instance_restart_wait_duration_seconds: When a stateless instance + goes down, this timer starts. When it expires Service Fabric will create a + new instance on any node in the cluster. + This configuration is to reduce unnecessary creation of a new instance in + situations where the instance going down is likely to recover in a short + time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes + down, Service Fabric will immediately start building its replacement. + :type instance_restart_wait_duration_seconds: long + """ + + _validation = { + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + 'service_kind': {'required': True}, + 'instance_count': {'required': True, 'minimum': -1}, + 'instance_close_delay_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'instance_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'long'}, + 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, + 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(StatelessServiceDescription, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) + self.min_instance_count = kwargs.get('min_instance_count', None) + self.min_instance_percentage = kwargs.get('min_instance_percentage', None) + self.flags = kwargs.get('flags', None) + self.instance_close_delay_duration_seconds = kwargs.get('instance_close_delay_duration_seconds', None) + self.instance_lifecycle_description = kwargs.get('instance_lifecycle_description', None) + self.instance_restart_wait_duration_seconds = kwargs.get('instance_restart_wait_duration_seconds', None) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_description_py3.py b/customSDK/servicefabric/models/stateless_service_description_py3.py new file mode 100644 index 00000000..87109cab --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_description_py3.py @@ -0,0 +1,192 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_description_py3 import ServiceDescription + + +class StatelessServiceDescription(ServiceDescription): + """Describes a stateless service. + + All required parameters must be populated in order to send to Azure. + + :param application_name: The name of the application, including the + 'fabric:' URI scheme. + :type application_name: str + :param service_name: Required. The full name of the service with 'fabric:' + URI scheme. + :type service_name: str + :param service_type_name: Required. Name of the service type as specified + in the service manifest. + :type service_type_name: str + :param initialization_data: The initialization data as an array of bytes. + Initialization data is passed to service instances or replicas when they + are created. + :type initialization_data: list[int] + :param partition_description: Required. The partition description as an + object. + :type partition_description: + ~azure.servicefabric.models.PartitionSchemeDescription + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param service_load_metrics: The service load metrics. + :type service_load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param is_default_move_cost_specified: Indicates if the DefaultMoveCost + property is specified. + :type is_default_move_cost_specified: bool + :param service_package_activation_mode: The activation mode of service + package to be used for a service. Possible values include: + 'SharedProcess', 'ExclusiveProcess' + :type service_package_activation_mode: str or + ~azure.servicefabric.models.ServicePackageActivationMode + :param service_dns_name: The DNS name of the service. It requires the DNS + system service to be enabled in Service Fabric cluster. + :type service_dns_name: str + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_count: Required. The instance count. + :type instance_count: int + :param min_instance_count: MinInstanceCount is the minimum number of + instances that must be up to meet the EnsureAvailability safety check + during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation + -1 is first converted into the number of nodes on which the instances are + allowed to be placed according to the placement constraints on the + service. + :type min_instance_count: int + :param min_instance_percentage: MinInstancePercentage is the minimum + percentage of InstanceCount that must be up to meet the EnsureAvailability + safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage + computation, -1 is first converted into the number of nodes on which the + instances are allowed to be placed according to the placement constraints + on the service. + :type min_instance_percentage: int + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 1 then the flags for + InstanceCloseDelayDuration is set. + - None - Does not indicate any other properties are set. The value is + zero. + - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 1. + - InstanceRestartWaitDuration - Indicates the + InstanceRestartWaitDurationSeconds property is set. The value is 2. + :type flags: int + :param instance_close_delay_duration_seconds: Duration in seconds, to wait + before a stateless instance is closed, to allow the active requests to + drain gracefully. This would be effective when the instance is closing + during the application/cluster upgrade and disabling node. + The endpoint exposed on this instance is removed prior to starting the + delay, which prevents new connections to this instance. + In addition, clients that have subscribed to service endpoint change + events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), + can do + the following upon receiving the endpoint removal notification: + - Stop sending new requests to this instance. + - Close existing connections after in-flight requests have completed. + - Connect to a different instance of the service partition for future + requests. + Note, the default value of InstanceCloseDelayDuration is 0, which + indicates that there won't be any delay or removal of the endpoint prior + to closing the instance. + :type instance_close_delay_duration_seconds: long + :param instance_lifecycle_description: Defines how instances of this + service will behave during their lifecycle. + :type instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :param instance_restart_wait_duration_seconds: When a stateless instance + goes down, this timer starts. When it expires Service Fabric will create a + new instance on any node in the cluster. + This configuration is to reduce unnecessary creation of a new instance in + situations where the instance going down is likely to recover in a short + time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes + down, Service Fabric will immediately start building its replacement. + :type instance_restart_wait_duration_seconds: long + """ + + _validation = { + 'service_name': {'required': True}, + 'service_type_name': {'required': True}, + 'partition_description': {'required': True}, + 'service_kind': {'required': True}, + 'instance_count': {'required': True, 'minimum': -1}, + 'instance_close_delay_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'instance_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'application_name': {'key': 'ApplicationName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, + 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, + 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + 'flags': {'key': 'Flags', 'type': 'int'}, + 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'long'}, + 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, + 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'long'}, + } + + def __init__(self, *, service_name: str, service_type_name: str, partition_description, instance_count: int, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, min_instance_count: int=None, min_instance_percentage: int=None, flags: int=None, instance_close_delay_duration_seconds: int=None, instance_lifecycle_description=None, instance_restart_wait_duration_seconds: int=None, **kwargs) -> None: + super(StatelessServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, tags_required_to_place=tags_required_to_place, tags_required_to_run=tags_required_to_run, **kwargs) + self.instance_count = instance_count + self.min_instance_count = min_instance_count + self.min_instance_percentage = min_instance_percentage + self.flags = flags + self.instance_close_delay_duration_seconds = instance_close_delay_duration_seconds + self.instance_lifecycle_description = instance_lifecycle_description + self.instance_restart_wait_duration_seconds = instance_restart_wait_duration_seconds + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_info.py b/customSDK/servicefabric/models/stateless_service_info.py new file mode 100644 index 00000000..234c4e18 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_info.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_info import ServiceInfo + + +class StatelessServiceInfo(ServiceInfo): + """Information about a stateless Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :param id: The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to + identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type id: str + :param name: The full name of the service with 'fabric:' URI scheme. + :type name: str + :param type_name: Name of the service type as specified in the service + manifest. + :type type_name: str + :param manifest_version: The version of the service manifest. + :type manifest_version: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_status: The status of the application. Possible values + include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + 'Failed' + :type service_status: str or ~azure.servicefabric.models.ServiceStatus + :param is_service_group: Whether the service is in a service group. + :type is_service_group: bool + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StatelessServiceInfo, self).__init__(**kwargs) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_info_py3.py b/customSDK/servicefabric/models/stateless_service_info_py3.py new file mode 100644 index 00000000..6c09bd4e --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_info_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_info_py3 import ServiceInfo + + +class StatelessServiceInfo(ServiceInfo): + """Information about a stateless Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :param id: The identity of the service. This ID is an encoded + representation of the service name. This is used in the REST APIs to + identify the service resource. + Starting in version 6.0, hierarchical names are delimited with the "\\~" + character. For example, if the service name is "fabric:/myapp/app1/svc1", + the service identity would be "myapp~app1\\~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type id: str + :param name: The full name of the service with 'fabric:' URI scheme. + :type name: str + :param type_name: Name of the service type as specified in the service + manifest. + :type type_name: str + :param manifest_version: The version of the service manifest. + :type manifest_version: str + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param service_status: The status of the application. Possible values + include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + 'Failed' + :type service_status: str or ~azure.servicefabric.models.ServiceStatus + :param is_service_group: Whether the service is in a service group. + :type is_service_group: bool + :param service_kind: Required. Constant filled by server. + :type service_kind: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'Id', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'type_name': {'key': 'TypeName', 'type': 'str'}, + 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, + 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, type_name: str=None, manifest_version: str=None, health_state=None, service_status=None, is_service_group: bool=None, **kwargs) -> None: + super(StatelessServiceInfo, self).__init__(id=id, name=name, type_name=type_name, manifest_version=manifest_version, health_state=health_state, service_status=service_status, is_service_group=is_service_group, **kwargs) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_health.py b/customSDK/servicefabric/models/stateless_service_instance_health.py new file mode 100644 index 00000000..aadcd573 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_instance_health.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_health import ReplicaHealth + + +class StatelessServiceInstanceHealth(ReplicaHealth): + """Represents the health of the stateless service instance. + Contains the instance aggregated health state, the health events and the + unhealthy evaluations. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param partition_id: Id of the partition to which this replica belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_id: Id of a stateless service instance. InstanceId is used + by Service Fabric to uniquely identify an instance of a partition of a + stateless service. It is unique within a partition and does not change for + the lifetime of the instance. If the instance has failed over on the same + or different node, it will get a different value for the InstanceId. + :type instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StatelessServiceInstanceHealth, self).__init__(**kwargs) + self.instance_id = kwargs.get('instance_id', None) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_health_py3.py b/customSDK/servicefabric/models/stateless_service_instance_health_py3.py new file mode 100644 index 00000000..ce8448d1 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_instance_health_py3.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_health_py3 import ReplicaHealth + + +class StatelessServiceInstanceHealth(ReplicaHealth): + """Represents the health of the stateless service instance. + Contains the instance aggregated health state, the health events and the + unhealthy evaluations. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The HealthState representing the + aggregated health state of the entity computed by Health Manager. + The health evaluation of the entity reflects all events reported on the + entity and its children (if any). + The aggregation is done by applying the desired health policy. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param health_events: The list of health events reported on the entity. + :type health_events: list[~azure.servicefabric.models.HealthEvent] + :param unhealthy_evaluations: The unhealthy evaluations that show why the + current aggregated health state was returned by Health Manager. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + :param health_statistics: Shows the health statistics for all children + types of the queried entity. + :type health_statistics: ~azure.servicefabric.models.HealthStatistics + :param partition_id: Id of the partition to which this replica belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_id: Id of a stateless service instance. InstanceId is used + by Service Fabric to uniquely identify an instance of a partition of a + stateless service. It is unique within a partition and does not change for + the lifetime of the instance. If the instance has failed over on the same + or different node, it will get a different value for the InstanceId. + :type instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, instance_id: str=None, **kwargs) -> None: + super(StatelessServiceInstanceHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, partition_id=partition_id, **kwargs) + self.instance_id = instance_id + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_health_state.py b/customSDK/servicefabric/models/stateless_service_instance_health_state.py new file mode 100644 index 00000000..bfd2e8f0 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_instance_health_state.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_health_state import ReplicaHealthState + + +class StatelessServiceInstanceHealthState(ReplicaHealthState): + """Represents the health state of the stateless service instance, which + contains the instance ID and the aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param partition_id: The ID of the partition to which this replica + belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of the stateless service instance on the wire this + field is called ReplicaId. + :type replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StatelessServiceInstanceHealthState, self).__init__(**kwargs) + self.replica_id = kwargs.get('replica_id', None) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_health_state_py3.py b/customSDK/servicefabric/models/stateless_service_instance_health_state_py3.py new file mode 100644 index 00000000..e417aabe --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_instance_health_state_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_health_state_py3 import ReplicaHealthState + + +class StatelessServiceInstanceHealthState(ReplicaHealthState): + """Represents the health state of the stateless service instance, which + contains the instance ID and the aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param partition_id: The ID of the partition to which this replica + belongs. + :type partition_id: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param replica_id: Id of the stateless service instance on the wire this + field is called ReplicaId. + :type replica_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, + } + + def __init__(self, *, aggregated_health_state=None, partition_id: str=None, replica_id: str=None, **kwargs) -> None: + super(StatelessServiceInstanceHealthState, self).__init__(aggregated_health_state=aggregated_health_state, partition_id=partition_id, **kwargs) + self.replica_id = replica_id + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_info.py b/customSDK/servicefabric/models/stateless_service_instance_info.py new file mode 100644 index 00000000..daa9fa1a --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_instance_info.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_info import ReplicaInfo + + +class StatelessServiceInstanceInfo(ReplicaInfo): + """Represents a stateless service instance. This includes information about + the identity, status, health, node name, uptime, and other details about + the instance. + + All required parameters must be populated in order to send to Azure. + + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param address: The address the replica is listening on. + :type address: str + :param last_in_build_duration_in_seconds: The last in build duration of + the replica in seconds. + :type last_in_build_duration_in_seconds: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_id: Id of a stateless service instance. InstanceId is used + by Service Fabric to uniquely identify an instance of a partition of a + stateless service. It is unique within a partition and does not change for + the lifetime of the instance. If the instance has failed over on the same + or different node, it will get a different value for the InstanceId. + :type instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StatelessServiceInstanceInfo, self).__init__(**kwargs) + self.instance_id = kwargs.get('instance_id', None) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_info_py3.py b/customSDK/servicefabric/models/stateless_service_instance_info_py3.py new file mode 100644 index 00000000..74dc0459 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_instance_info_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .replica_info_py3 import ReplicaInfo + + +class StatelessServiceInstanceInfo(ReplicaInfo): + """Represents a stateless service instance. This includes information about + the identity, status, health, node name, uptime, and other details about + the instance. + + All required parameters must be populated in order to send to Azure. + + :param replica_status: The status of a replica of a service. Possible + values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + 'Dropped' + :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param node_name: The name of a Service Fabric node. + :type node_name: str + :param address: The address the replica is listening on. + :type address: str + :param last_in_build_duration_in_seconds: The last in build duration of + the replica in seconds. + :type last_in_build_duration_in_seconds: str + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_id: Id of a stateless service instance. InstanceId is used + by Service Fabric to uniquely identify an instance of a partition of a + stateless service. It is unique within a partition and does not change for + the lifetime of the instance. If the instance has failed over on the same + or different node, it will get a different value for the InstanceId. + :type instance_id: str + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'address': {'key': 'Address', 'type': 'str'}, + 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_id': {'key': 'InstanceId', 'type': 'str'}, + } + + def __init__(self, *, replica_status=None, health_state=None, node_name: str=None, address: str=None, last_in_build_duration_in_seconds: str=None, instance_id: str=None, **kwargs) -> None: + super(StatelessServiceInstanceInfo, self).__init__(replica_status=replica_status, health_state=health_state, node_name=node_name, address=address, last_in_build_duration_in_seconds=last_in_build_duration_in_seconds, **kwargs) + self.instance_id = instance_id + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_partition_info.py b/customSDK/servicefabric/models/stateless_service_partition_info.py new file mode 100644 index 00000000..8e95d4d1 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_partition_info.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_partition_info import ServicePartitionInfo + + +class StatelessServicePartitionInfo(ServicePartitionInfo): + """Information about a partition of a stateless Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param partition_status: The status of the service fabric service + partition. Possible values include: 'Invalid', 'Ready', 'NotReady', + 'InQuorumLoss', 'Reconfiguring', 'Deleting' + :type partition_status: str or + ~azure.servicefabric.models.ServicePartitionStatus + :param partition_information: Information about the partition identity, + partitioning scheme and keys supported by it. + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_count: Number of instances of this partition. + :type instance_count: long + :param min_instance_count: MinInstanceCount is the minimum number of + instances that must be up to meet the EnsureAvailability safety check + during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation + -1 is first converted into the number of nodes on which the instances are + allowed to be placed according to the placement constraints on the + service. + :type min_instance_count: int + :param min_instance_percentage: MinInstancePercentage is the minimum + percentage of InstanceCount that must be up to meet the EnsureAvailability + safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage + computation, -1 is first converted into the number of nodes on which the + instances are allowed to be placed according to the placement constraints + on the service. + :type min_instance_percentage: int + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'long'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(StatelessServicePartitionInfo, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) + self.min_instance_count = kwargs.get('min_instance_count', None) + self.min_instance_percentage = kwargs.get('min_instance_percentage', None) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_partition_info_py3.py b/customSDK/servicefabric/models/stateless_service_partition_info_py3.py new file mode 100644 index 00000000..8b976219 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_partition_info_py3.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_partition_info_py3 import ServicePartitionInfo + + +class StatelessServicePartitionInfo(ServicePartitionInfo): + """Information about a partition of a stateless Service Fabric service. + + All required parameters must be populated in order to send to Azure. + + :param health_state: The health state of a Service Fabric entity such as + Cluster, Node, Application, Service, Partition, Replica etc. Possible + values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + :type health_state: str or ~azure.servicefabric.models.HealthState + :param partition_status: The status of the service fabric service + partition. Possible values include: 'Invalid', 'Ready', 'NotReady', + 'InQuorumLoss', 'Reconfiguring', 'Deleting' + :type partition_status: str or + ~azure.servicefabric.models.ServicePartitionStatus + :param partition_information: Information about the partition identity, + partitioning scheme and keys supported by it. + :type partition_information: + ~azure.servicefabric.models.PartitionInformation + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_count: Number of instances of this partition. + :type instance_count: long + :param min_instance_count: MinInstanceCount is the minimum number of + instances that must be up to meet the EnsureAvailability safety check + during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation + -1 is first converted into the number of nodes on which the instances are + allowed to be placed according to the placement constraints on the + service. + :type min_instance_count: int + :param min_instance_percentage: MinInstancePercentage is the minimum + percentage of InstanceCount that must be up to meet the EnsureAvailability + safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage + computation, -1 is first converted into the number of nodes on which the + instances are allowed to be placed according to the placement constraints + on the service. + :type min_instance_percentage: int + """ + + _validation = { + 'service_kind': {'required': True}, + } + + _attribute_map = { + 'health_state': {'key': 'HealthState', 'type': 'str'}, + 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, + 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'long'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + } + + def __init__(self, *, health_state=None, partition_status=None, partition_information=None, instance_count: int=None, min_instance_count: int=None, min_instance_percentage: int=None, **kwargs) -> None: + super(StatelessServicePartitionInfo, self).__init__(health_state=health_state, partition_status=partition_status, partition_information=partition_information, **kwargs) + self.instance_count = instance_count + self.min_instance_count = min_instance_count + self.min_instance_percentage = min_instance_percentage + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_type_description.py b/customSDK/servicefabric/models/stateless_service_type_description.py new file mode 100644 index 00000000..73cd84a2 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_type_description.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_type_description import ServiceTypeDescription + + +class StatelessServiceTypeDescription(ServiceTypeDescription): + """Describes a stateless service type defined in the service manifest of a + provisioned application type. + + All required parameters must be populated in order to send to Azure. + + :param is_stateful: Indicates whether the service type is a stateful + service type or a stateless service type. This property is true if the + service type is a stateful service type, false otherwise. + :type is_stateful: bool + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param placement_constraints: The placement constraint to be used when + instantiating this service in a Service Fabric cluster. + :type placement_constraints: str + :param load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: List of service placement policy + descriptions. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param extensions: List of service type extensions. + :type extensions: + list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :param kind: Required. Constant filled by server. + :type kind: str + :param use_implicit_host: A flag indicating if this type is not + implemented and hosted by a user service process, but is implicitly hosted + by a system created process. This value is true for services using the + guest executable services, false otherwise. + :type use_implicit_host: bool + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'use_implicit_host': {'key': 'UseImplicitHost', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(StatelessServiceTypeDescription, self).__init__(**kwargs) + self.use_implicit_host = kwargs.get('use_implicit_host', None) + self.kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_type_description_py3.py b/customSDK/servicefabric/models/stateless_service_type_description_py3.py new file mode 100644 index 00000000..bd0aa3e9 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_type_description_py3.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_type_description_py3 import ServiceTypeDescription + + +class StatelessServiceTypeDescription(ServiceTypeDescription): + """Describes a stateless service type defined in the service manifest of a + provisioned application type. + + All required parameters must be populated in order to send to Azure. + + :param is_stateful: Indicates whether the service type is a stateful + service type or a stateless service type. This property is true if the + service type is a stateful service type, false otherwise. + :type is_stateful: bool + :param service_type_name: Name of the service type as specified in the + service manifest. + :type service_type_name: str + :param placement_constraints: The placement constraint to be used when + instantiating this service in a Service Fabric cluster. + :type placement_constraints: str + :param load_metrics: The service load metrics is given as an array of + ServiceLoadMetricDescription objects. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: List of service placement policy + descriptions. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param extensions: List of service type extensions. + :type extensions: + list[~azure.servicefabric.models.ServiceTypeExtensionDescription] + :param kind: Required. Constant filled by server. + :type kind: str + :param use_implicit_host: A flag indicating if this type is not + implemented and hosted by a user service process, but is implicitly hosted + by a system created process. This value is true for services using the + guest executable services, false otherwise. + :type use_implicit_host: bool + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, + 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'use_implicit_host': {'key': 'UseImplicitHost', 'type': 'bool'}, + } + + def __init__(self, *, is_stateful: bool=None, service_type_name: str=None, placement_constraints: str=None, load_metrics=None, service_placement_policies=None, extensions=None, use_implicit_host: bool=None, **kwargs) -> None: + super(StatelessServiceTypeDescription, self).__init__(is_stateful=is_stateful, service_type_name=service_type_name, placement_constraints=placement_constraints, load_metrics=load_metrics, service_placement_policies=service_placement_policies, extensions=extensions, **kwargs) + self.use_implicit_host = use_implicit_host + self.kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_update_description.py b/customSDK/servicefabric/models/stateless_service_update_description.py new file mode 100644 index 00000000..4dc99273 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_update_description.py @@ -0,0 +1,185 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_update_description import ServiceUpdateDescription + + +class StatelessServiceUpdateDescription(ServiceUpdateDescription): + """Describes an update for a stateless service. + + All required parameters must be populated in order to send to Azure. + + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 6 then the flags for + ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + - None - Does not indicate any other properties are set. The value is + zero. + - TargetReplicaSetSize/InstanceCount - Indicates whether the + TargetReplicaSetSize property (for Stateful services) or the InstanceCount + property (for Stateless services) is set. The value is 1. + - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + property is set. The value is 2. + - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property + is set. The value is 4. + - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + property is set. The value is 8. + - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The + value is 16. + - PlacementConstraints - Indicates the PlacementConstraints property is + set. The value is 32. + - PlacementPolicyList - Indicates the ServicePlacementPolicies property is + set. The value is 64. + - Correlation - Indicates the CorrelationScheme property is set. The value + is 128. + - Metrics - Indicates the ServiceLoadMetrics property is set. The value is + 256. + - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The + value is 512. + - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + is 1024. + - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit + property is set. The value is 2048. + - MinInstanceCount - Indicates the MinInstanceCount property is set. The + value is 4096. + - MinInstancePercentage - Indicates the MinInstancePercentage property is + set. The value is 8192. + - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. + :type flags: str + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param load_metrics: The service load metrics. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_count: The instance count. + :type instance_count: int + :param min_instance_count: MinInstanceCount is the minimum number of + instances that must be up to meet the EnsureAvailability safety check + during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation + -1 is first converted into the number of nodes on which the instances are + allowed to be placed according to the placement constraints on the + service. + :type min_instance_count: int + :param min_instance_percentage: MinInstancePercentage is the minimum + percentage of InstanceCount that must be up to meet the EnsureAvailability + safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage + computation, -1 is first converted into the number of nodes on which the + instances are allowed to be placed according to the placement constraints + on the service. + :type min_instance_percentage: int + :param instance_close_delay_duration_seconds: Duration in seconds, to wait + before a stateless instance is closed, to allow the active requests to + drain gracefully. This would be effective when the instance is closing + during the application/cluster upgrade and disabling node. + The endpoint exposed on this instance is removed prior to starting the + delay, which prevents new connections to this instance. + In addition, clients that have subscribed to service endpoint change + events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), + can do + the following upon receiving the endpoint removal notification: + - Stop sending new requests to this instance. + - Close existing connections after in-flight requests have completed. + - Connect to a different instance of the service partition for future + requests. + :type instance_close_delay_duration_seconds: str + :param instance_lifecycle_description: Defines how instances of this + service will behave during their lifecycle. + :type instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :param instance_restart_wait_duration_seconds: When a stateless instance + goes down, this timer starts. When it expires Service Fabric will create a + new instance on any node in the cluster. + This configuration is to reduce unnecessary creation of a new instance in + situations where the instance going down is likely to recover in a short + time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes + down, Service Fabric will immediately start building its replacement. + :type instance_restart_wait_duration_seconds: str + """ + + _validation = { + 'service_kind': {'required': True}, + 'instance_count': {'minimum': -1}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'str'}, + 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, + 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StatelessServiceUpdateDescription, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', None) + self.min_instance_count = kwargs.get('min_instance_count', None) + self.min_instance_percentage = kwargs.get('min_instance_percentage', None) + self.instance_close_delay_duration_seconds = kwargs.get('instance_close_delay_duration_seconds', None) + self.instance_lifecycle_description = kwargs.get('instance_lifecycle_description', None) + self.instance_restart_wait_duration_seconds = kwargs.get('instance_restart_wait_duration_seconds', None) + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_update_description_py3.py b/customSDK/servicefabric/models/stateless_service_update_description_py3.py new file mode 100644 index 00000000..0e3ad1a8 --- /dev/null +++ b/customSDK/servicefabric/models/stateless_service_update_description_py3.py @@ -0,0 +1,185 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_update_description_py3 import ServiceUpdateDescription + + +class StatelessServiceUpdateDescription(ServiceUpdateDescription): + """Describes an update for a stateless service. + + All required parameters must be populated in order to send to Azure. + + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. + For example, if the provided value is 6 then the flags for + ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + - None - Does not indicate any other properties are set. The value is + zero. + - TargetReplicaSetSize/InstanceCount - Indicates whether the + TargetReplicaSetSize property (for Stateful services) or the InstanceCount + property (for Stateless services) is set. The value is 1. + - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration + property is set. The value is 2. + - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property + is set. The value is 4. + - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration + property is set. The value is 8. + - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The + value is 16. + - PlacementConstraints - Indicates the PlacementConstraints property is + set. The value is 32. + - PlacementPolicyList - Indicates the ServicePlacementPolicies property is + set. The value is 64. + - Correlation - Indicates the CorrelationScheme property is set. The value + is 128. + - Metrics - Indicates the ServiceLoadMetrics property is set. The value is + 256. + - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The + value is 512. + - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + is 1024. + - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit + property is set. The value is 2048. + - MinInstanceCount - Indicates the MinInstanceCount property is set. The + value is 4096. + - MinInstancePercentage - Indicates the MinInstancePercentage property is + set. The value is 8192. + - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. + :type flags: str + :param placement_constraints: The placement constraints as a string. + Placement constraints are boolean expressions on node properties and allow + for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is + blue specify the following: "NodeColor == blue)". + :type placement_constraints: str + :param correlation_scheme: The correlation scheme. + :type correlation_scheme: + list[~azure.servicefabric.models.ServiceCorrelationDescription] + :param load_metrics: The service load metrics. + :type load_metrics: + list[~azure.servicefabric.models.ServiceLoadMetricDescription] + :param service_placement_policies: The service placement policies. + :type service_placement_policies: + list[~azure.servicefabric.models.ServicePlacementPolicyDescription] + :param default_move_cost: The move cost for the service. Possible values + include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + :type default_move_cost: str or ~azure.servicefabric.models.MoveCost + :param scaling_policies: Scaling policies for this service. + :type scaling_policies: + list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription + :param service_kind: Required. Constant filled by server. + :type service_kind: str + :param instance_count: The instance count. + :type instance_count: int + :param min_instance_count: MinInstanceCount is the minimum number of + instances that must be up to meet the EnsureAvailability safety check + during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstanceCount computation + -1 is first converted into the number of nodes on which the instances are + allowed to be placed according to the placement constraints on the + service. + :type min_instance_count: int + :param min_instance_percentage: MinInstancePercentage is the minimum + percentage of InstanceCount that must be up to meet the EnsureAvailability + safety check during operations like upgrade or deactivate node. + The actual number that is used is max( MinInstanceCount, ceil( + MinInstancePercentage/100.0 * InstanceCount) ). + Note, if InstanceCount is set to -1, during MinInstancePercentage + computation, -1 is first converted into the number of nodes on which the + instances are allowed to be placed according to the placement constraints + on the service. + :type min_instance_percentage: int + :param instance_close_delay_duration_seconds: Duration in seconds, to wait + before a stateless instance is closed, to allow the active requests to + drain gracefully. This would be effective when the instance is closing + during the application/cluster upgrade and disabling node. + The endpoint exposed on this instance is removed prior to starting the + delay, which prevents new connections to this instance. + In addition, clients that have subscribed to service endpoint change + events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), + can do + the following upon receiving the endpoint removal notification: + - Stop sending new requests to this instance. + - Close existing connections after in-flight requests have completed. + - Connect to a different instance of the service partition for future + requests. + :type instance_close_delay_duration_seconds: str + :param instance_lifecycle_description: Defines how instances of this + service will behave during their lifecycle. + :type instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :param instance_restart_wait_duration_seconds: When a stateless instance + goes down, this timer starts. When it expires Service Fabric will create a + new instance on any node in the cluster. + This configuration is to reduce unnecessary creation of a new instance in + situations where the instance going down is likely to recover in a short + time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes + down, Service Fabric will immediately start building its replacement. + :type instance_restart_wait_duration_seconds: str + """ + + _validation = { + 'service_kind': {'required': True}, + 'instance_count': {'minimum': -1}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, + 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, + 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, + 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, + 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, + 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, + 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, + 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, + 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, + 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, + 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'str'}, + 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, + 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'str'}, + } + + def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, instance_count: int=None, min_instance_count: int=None, min_instance_percentage: int=None, instance_close_delay_duration_seconds: str=None, instance_lifecycle_description=None, instance_restart_wait_duration_seconds: str=None, **kwargs) -> None: + super(StatelessServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_dns_name=service_dns_name, tags_for_placement=tags_for_placement, tags_for_running=tags_for_running, **kwargs) + self.instance_count = instance_count + self.min_instance_count = min_instance_count + self.min_instance_percentage = min_instance_percentage + self.instance_close_delay_duration_seconds = instance_close_delay_duration_seconds + self.instance_lifecycle_description = instance_lifecycle_description + self.instance_restart_wait_duration_seconds = instance_restart_wait_duration_seconds + self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stopped_chaos_event.py b/customSDK/servicefabric/models/stopped_chaos_event.py new file mode 100644 index 00000000..c86b8891 --- /dev/null +++ b/customSDK/servicefabric/models/stopped_chaos_event.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .chaos_event import ChaosEvent + + +class StoppedChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos stops because either + the user issued a stop or the time to run was up. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Describes why Chaos stopped. Chaos can stop because of + StopChaos API call or the timeToRun provided in ChaosParameters is over. + :type reason: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StoppedChaosEvent, self).__init__(**kwargs) + self.reason = kwargs.get('reason', None) + self.kind = 'Stopped' diff --git a/customSDK/servicefabric/models/stopped_chaos_event_py3.py b/customSDK/servicefabric/models/stopped_chaos_event_py3.py new file mode 100644 index 00000000..0390a4ad --- /dev/null +++ b/customSDK/servicefabric/models/stopped_chaos_event_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .chaos_event_py3 import ChaosEvent + + +class StoppedChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos stops because either + the user issued a stop or the time to run was up. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Describes why Chaos stopped. Chaos can stop because of + StopChaos API call or the timeToRun provided in ChaosParameters is over. + :type reason: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: + super(StoppedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.reason = reason + self.kind = 'Stopped' diff --git a/customSDK/servicefabric/models/string_property_value.py b/customSDK/servicefabric/models/string_property_value.py new file mode 100644 index 00000000..6a4abd86 --- /dev/null +++ b/customSDK/servicefabric/models/string_property_value.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_value import PropertyValue + + +class StringPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type String. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. The data of the property value. + :type data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StringPropertyValue, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + self.kind = 'String' diff --git a/customSDK/servicefabric/models/string_property_value_py3.py b/customSDK/servicefabric/models/string_property_value_py3.py new file mode 100644 index 00000000..65761bce --- /dev/null +++ b/customSDK/servicefabric/models/string_property_value_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_value_py3 import PropertyValue + + +class StringPropertyValue(PropertyValue): + """Describes a Service Fabric property value of type String. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param data: Required. The data of the property value. + :type data: str + """ + + _validation = { + 'kind': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'data': {'key': 'Data', 'type': 'str'}, + } + + def __init__(self, *, data: str, **kwargs) -> None: + super(StringPropertyValue, self).__init__(**kwargs) + self.data = data + self.kind = 'String' diff --git a/customSDK/servicefabric/models/successful_property_batch_info.py b/customSDK/servicefabric/models/successful_property_batch_info.py new file mode 100644 index 00000000..5f28d5bc --- /dev/null +++ b/customSDK/servicefabric/models/successful_property_batch_info.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_batch_info import PropertyBatchInfo + + +class SuccessfulPropertyBatchInfo(PropertyBatchInfo): + """Derived from PropertyBatchInfo. Represents the property batch succeeding. + Contains the results of any "Get" operations in the batch. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param properties: A map containing the properties that were requested + through any "Get" property batch operations. The key represents the index + of the "Get" operation in the original request, in string form. The value + is the property. If a property is not found, it will not be in the map. + :type properties: dict[str, ~azure.servicefabric.models.PropertyInfo] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'properties': {'key': 'Properties', 'type': '{PropertyInfo}'}, + } + + def __init__(self, **kwargs): + super(SuccessfulPropertyBatchInfo, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.kind = 'Successful' diff --git a/customSDK/servicefabric/models/successful_property_batch_info_py3.py b/customSDK/servicefabric/models/successful_property_batch_info_py3.py new file mode 100644 index 00000000..34fc6063 --- /dev/null +++ b/customSDK/servicefabric/models/successful_property_batch_info_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .property_batch_info_py3 import PropertyBatchInfo + + +class SuccessfulPropertyBatchInfo(PropertyBatchInfo): + """Derived from PropertyBatchInfo. Represents the property batch succeeding. + Contains the results of any "Get" operations in the batch. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param properties: A map containing the properties that were requested + through any "Get" property batch operations. The key represents the index + of the "Get" operation in the original request, in string form. The value + is the property. If a property is not found, it will not be in the map. + :type properties: dict[str, ~azure.servicefabric.models.PropertyInfo] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'properties': {'key': 'Properties', 'type': '{PropertyInfo}'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(SuccessfulPropertyBatchInfo, self).__init__(**kwargs) + self.properties = properties + self.kind = 'Successful' diff --git a/customSDK/servicefabric/models/system_application_health_evaluation.py b/customSDK/servicefabric/models/system_application_health_evaluation.py new file mode 100644 index 00000000..fb13fb75 --- /dev/null +++ b/customSDK/servicefabric/models/system_application_health_evaluation.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class SystemApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for the fabric:/System application, containing + information about the data and the algorithm used by health store to + evaluate health. The evaluation is returned only when the aggregated health + state of the cluster is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the system application. The types + of the unhealthy evaluations can be DeployedApplicationsHealthEvaluation, + ServicesHealthEvaluation or EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(SystemApplicationHealthEvaluation, self).__init__(**kwargs) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'SystemApplication' diff --git a/customSDK/servicefabric/models/system_application_health_evaluation_py3.py b/customSDK/servicefabric/models/system_application_health_evaluation_py3.py new file mode 100644 index 00000000..5a121021 --- /dev/null +++ b/customSDK/servicefabric/models/system_application_health_evaluation_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class SystemApplicationHealthEvaluation(HealthEvaluation): + """Represents health evaluation for the fabric:/System application, containing + information about the data and the algorithm used by health store to + evaluate health. The evaluation is returned only when the aggregated health + state of the cluster is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the current aggregated health state of the system application. The types + of the unhealthy evaluations can be DeployedApplicationsHealthEvaluation, + ServicesHealthEvaluation or EventHealthEvaluation. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, unhealthy_evaluations=None, **kwargs) -> None: + super(SystemApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'SystemApplication' diff --git a/customSDK/servicefabric/models/tcp_config.py b/customSDK/servicefabric/models/tcp_config.py new file mode 100644 index 00000000..96401697 --- /dev/null +++ b/customSDK/servicefabric/models/tcp_config.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TcpConfig(Model): + """Describes the tcp configuration for external connectivity for this network. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. tcp gateway config name. + :type name: str + :param port: Required. Specifies the port at which the service endpoint + below needs to be exposed. + :type port: int + :param destination: Required. Describes destination endpoint for routing + traffic. + :type destination: ~azure.servicefabric.models.GatewayDestination + """ + + _validation = { + 'name': {'required': True}, + 'port': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, + } + + def __init__(self, **kwargs): + super(TcpConfig, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.port = kwargs.get('port', None) + self.destination = kwargs.get('destination', None) diff --git a/customSDK/servicefabric/models/tcp_config_py3.py b/customSDK/servicefabric/models/tcp_config_py3.py new file mode 100644 index 00000000..7266484b --- /dev/null +++ b/customSDK/servicefabric/models/tcp_config_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TcpConfig(Model): + """Describes the tcp configuration for external connectivity for this network. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. tcp gateway config name. + :type name: str + :param port: Required. Specifies the port at which the service endpoint + below needs to be exposed. + :type port: int + :param destination: Required. Describes destination endpoint for routing + traffic. + :type destination: ~azure.servicefabric.models.GatewayDestination + """ + + _validation = { + 'name': {'required': True}, + 'port': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, + } + + def __init__(self, *, name: str, port: int, destination, **kwargs) -> None: + super(TcpConfig, self).__init__(**kwargs) + self.name = name + self.port = port + self.destination = destination diff --git a/customSDK/servicefabric/models/test_error_chaos_event.py b/customSDK/servicefabric/models/test_error_chaos_event.py new file mode 100644 index 00000000..70ea29ad --- /dev/null +++ b/customSDK/servicefabric/models/test_error_chaos_event.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .chaos_event import ChaosEvent + + +class TestErrorChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when an unexpected event occurs + in the Chaos engine. + For example, due to the cluster snapshot being inconsistent, while faulting + an entity, Chaos found that the entity was already faulted -- which would + be an unexpected event. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Describes why TestErrorChaosEvent was generated. For + example, Chaos tries to fault a partition but finds that the partition is + no longer fault tolerant, then a TestErrorEvent gets generated with the + reason stating that the partition is not fault tolerant. + :type reason: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TestErrorChaosEvent, self).__init__(**kwargs) + self.reason = kwargs.get('reason', None) + self.kind = 'TestError' diff --git a/customSDK/servicefabric/models/test_error_chaos_event_py3.py b/customSDK/servicefabric/models/test_error_chaos_event_py3.py new file mode 100644 index 00000000..3ab8f587 --- /dev/null +++ b/customSDK/servicefabric/models/test_error_chaos_event_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .chaos_event_py3 import ChaosEvent + + +class TestErrorChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when an unexpected event occurs + in the Chaos engine. + For example, due to the cluster snapshot being inconsistent, while faulting + an entity, Chaos found that the entity was already faulted -- which would + be an unexpected event. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Describes why TestErrorChaosEvent was generated. For + example, Chaos tries to fault a partition but finds that the partition is + no longer fault tolerant, then a TestErrorEvent gets generated with the + reason stating that the partition is not fault tolerant. + :type reason: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: + super(TestErrorChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.reason = reason + self.kind = 'TestError' diff --git a/customSDK/servicefabric/models/time_based_backup_schedule_description.py b/customSDK/servicefabric/models/time_based_backup_schedule_description.py new file mode 100644 index 00000000..b2f36cd7 --- /dev/null +++ b/customSDK/servicefabric/models/time_based_backup_schedule_description.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_schedule_description import BackupScheduleDescription + + +class TimeBasedBackupScheduleDescription(BackupScheduleDescription): + """Describes the time based backup schedule. + + All required parameters must be populated in order to send to Azure. + + :param schedule_kind: Required. Constant filled by server. + :type schedule_kind: str + :param schedule_frequency_type: Required. Describes the frequency with + which to run the time based backup schedule. Possible values include: + 'Invalid', 'Daily', 'Weekly' + :type schedule_frequency_type: str or + ~azure.servicefabric.models.BackupScheduleFrequencyType + :param run_days: List of days of a week when to trigger the periodic + backup. This is valid only when the backup schedule frequency type is + weekly. + :type run_days: list[str or ~azure.servicefabric.models.DayOfWeek] + :param run_times: Required. Represents the list of exact time during the + day in ISO8601 format. Like '19:00:00' will represent '7PM' during the + day. Date specified along with time will be ignored. + :type run_times: list[datetime] + """ + + _validation = { + 'schedule_kind': {'required': True}, + 'schedule_frequency_type': {'required': True}, + 'run_times': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + 'schedule_frequency_type': {'key': 'ScheduleFrequencyType', 'type': 'str'}, + 'run_days': {'key': 'RunDays', 'type': '[str]'}, + 'run_times': {'key': 'RunTimes', 'type': '[iso-8601]'}, + } + + def __init__(self, **kwargs): + super(TimeBasedBackupScheduleDescription, self).__init__(**kwargs) + self.schedule_frequency_type = kwargs.get('schedule_frequency_type', None) + self.run_days = kwargs.get('run_days', None) + self.run_times = kwargs.get('run_times', None) + self.schedule_kind = 'TimeBased' diff --git a/customSDK/servicefabric/models/time_based_backup_schedule_description_py3.py b/customSDK/servicefabric/models/time_based_backup_schedule_description_py3.py new file mode 100644 index 00000000..63b0d0b8 --- /dev/null +++ b/customSDK/servicefabric/models/time_based_backup_schedule_description_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .backup_schedule_description_py3 import BackupScheduleDescription + + +class TimeBasedBackupScheduleDescription(BackupScheduleDescription): + """Describes the time based backup schedule. + + All required parameters must be populated in order to send to Azure. + + :param schedule_kind: Required. Constant filled by server. + :type schedule_kind: str + :param schedule_frequency_type: Required. Describes the frequency with + which to run the time based backup schedule. Possible values include: + 'Invalid', 'Daily', 'Weekly' + :type schedule_frequency_type: str or + ~azure.servicefabric.models.BackupScheduleFrequencyType + :param run_days: List of days of a week when to trigger the periodic + backup. This is valid only when the backup schedule frequency type is + weekly. + :type run_days: list[str or ~azure.servicefabric.models.DayOfWeek] + :param run_times: Required. Represents the list of exact time during the + day in ISO8601 format. Like '19:00:00' will represent '7PM' during the + day. Date specified along with time will be ignored. + :type run_times: list[datetime] + """ + + _validation = { + 'schedule_kind': {'required': True}, + 'schedule_frequency_type': {'required': True}, + 'run_times': {'required': True}, + } + + _attribute_map = { + 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, + 'schedule_frequency_type': {'key': 'ScheduleFrequencyType', 'type': 'str'}, + 'run_days': {'key': 'RunDays', 'type': '[str]'}, + 'run_times': {'key': 'RunTimes', 'type': '[iso-8601]'}, + } + + def __init__(self, *, schedule_frequency_type, run_times, run_days=None, **kwargs) -> None: + super(TimeBasedBackupScheduleDescription, self).__init__(**kwargs) + self.schedule_frequency_type = schedule_frequency_type + self.run_days = run_days + self.run_times = run_times + self.schedule_kind = 'TimeBased' diff --git a/customSDK/servicefabric/models/time_of_day.py b/customSDK/servicefabric/models/time_of_day.py new file mode 100644 index 00000000..313c4fd7 --- /dev/null +++ b/customSDK/servicefabric/models/time_of_day.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TimeOfDay(Model): + """Defines an hour and minute of the day specified in 24 hour time. + + :param hour: Represents the hour of the day. Value must be between 0 and + 23 inclusive. + :type hour: int + :param minute: Represents the minute of the hour. Value must be between 0 + to 59 inclusive. + :type minute: int + """ + + _validation = { + 'hour': {'maximum': 23, 'minimum': 0}, + 'minute': {'maximum': 59, 'minimum': 0}, + } + + _attribute_map = { + 'hour': {'key': 'Hour', 'type': 'int'}, + 'minute': {'key': 'Minute', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(TimeOfDay, self).__init__(**kwargs) + self.hour = kwargs.get('hour', None) + self.minute = kwargs.get('minute', None) diff --git a/customSDK/servicefabric/models/time_of_day_py3.py b/customSDK/servicefabric/models/time_of_day_py3.py new file mode 100644 index 00000000..28215d00 --- /dev/null +++ b/customSDK/servicefabric/models/time_of_day_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TimeOfDay(Model): + """Defines an hour and minute of the day specified in 24 hour time. + + :param hour: Represents the hour of the day. Value must be between 0 and + 23 inclusive. + :type hour: int + :param minute: Represents the minute of the hour. Value must be between 0 + to 59 inclusive. + :type minute: int + """ + + _validation = { + 'hour': {'maximum': 23, 'minimum': 0}, + 'minute': {'maximum': 59, 'minimum': 0}, + } + + _attribute_map = { + 'hour': {'key': 'Hour', 'type': 'int'}, + 'minute': {'key': 'Minute', 'type': 'int'}, + } + + def __init__(self, *, hour: int=None, minute: int=None, **kwargs) -> None: + super(TimeOfDay, self).__init__(**kwargs) + self.hour = hour + self.minute = minute diff --git a/customSDK/servicefabric/models/time_range.py b/customSDK/servicefabric/models/time_range.py new file mode 100644 index 00000000..2378d822 --- /dev/null +++ b/customSDK/servicefabric/models/time_range.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TimeRange(Model): + """Defines a time range in a 24 hour day specified by a start and end time. + + :param start_time: Defines an hour and minute of the day specified in 24 + hour time. + :type start_time: ~azure.servicefabric.models.TimeOfDay + :param end_time: Defines an hour and minute of the day specified in 24 + hour time. + :type end_time: ~azure.servicefabric.models.TimeOfDay + """ + + _attribute_map = { + 'start_time': {'key': 'StartTime', 'type': 'TimeOfDay'}, + 'end_time': {'key': 'EndTime', 'type': 'TimeOfDay'}, + } + + def __init__(self, **kwargs): + super(TimeRange, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) diff --git a/customSDK/servicefabric/models/time_range_py3.py b/customSDK/servicefabric/models/time_range_py3.py new file mode 100644 index 00000000..09c72e10 --- /dev/null +++ b/customSDK/servicefabric/models/time_range_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TimeRange(Model): + """Defines a time range in a 24 hour day specified by a start and end time. + + :param start_time: Defines an hour and minute of the day specified in 24 + hour time. + :type start_time: ~azure.servicefabric.models.TimeOfDay + :param end_time: Defines an hour and minute of the day specified in 24 + hour time. + :type end_time: ~azure.servicefabric.models.TimeOfDay + """ + + _attribute_map = { + 'start_time': {'key': 'StartTime', 'type': 'TimeOfDay'}, + 'end_time': {'key': 'EndTime', 'type': 'TimeOfDay'}, + } + + def __init__(self, *, start_time=None, end_time=None, **kwargs) -> None: + super(TimeRange, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time diff --git a/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description.py b/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description.py new file mode 100644 index 00000000..3007da81 --- /dev/null +++ b/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_scheme_description import PartitionSchemeDescription + + +class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): + """Describes a partitioning scheme where an integer range is allocated evenly + across a number of partitions. + + All required parameters must be populated in order to send to Azure. + + :param partition_scheme: Required. Constant filled by server. + :type partition_scheme: str + :param count: Required. The number of partitions. + :type count: int + :param low_key: Required. String indicating the lower bound of the + partition key range that + should be split between the partitions. + :type low_key: str + :param high_key: Required. String indicating the upper bound of the + partition key range that + should be split between the partitions. + :type high_key: str + """ + + _validation = { + 'partition_scheme': {'required': True}, + 'count': {'required': True}, + 'low_key': {'required': True}, + 'high_key': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + 'count': {'key': 'Count', 'type': 'int'}, + 'low_key': {'key': 'LowKey', 'type': 'str'}, + 'high_key': {'key': 'HighKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UniformInt64RangePartitionSchemeDescription, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.low_key = kwargs.get('low_key', None) + self.high_key = kwargs.get('high_key', None) + self.partition_scheme = 'UniformInt64Range' diff --git a/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description_py3.py b/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description_py3.py new file mode 100644 index 00000000..4ad8718e --- /dev/null +++ b/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_scheme_description_py3 import PartitionSchemeDescription + + +class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): + """Describes a partitioning scheme where an integer range is allocated evenly + across a number of partitions. + + All required parameters must be populated in order to send to Azure. + + :param partition_scheme: Required. Constant filled by server. + :type partition_scheme: str + :param count: Required. The number of partitions. + :type count: int + :param low_key: Required. String indicating the lower bound of the + partition key range that + should be split between the partitions. + :type low_key: str + :param high_key: Required. String indicating the upper bound of the + partition key range that + should be split between the partitions. + :type high_key: str + """ + + _validation = { + 'partition_scheme': {'required': True}, + 'count': {'required': True}, + 'low_key': {'required': True}, + 'high_key': {'required': True}, + } + + _attribute_map = { + 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, + 'count': {'key': 'Count', 'type': 'int'}, + 'low_key': {'key': 'LowKey', 'type': 'str'}, + 'high_key': {'key': 'HighKey', 'type': 'str'}, + } + + def __init__(self, *, count: int, low_key: str, high_key: str, **kwargs) -> None: + super(UniformInt64RangePartitionSchemeDescription, self).__init__(**kwargs) + self.count = count + self.low_key = low_key + self.high_key = high_key + self.partition_scheme = 'UniformInt64Range' diff --git a/customSDK/servicefabric/models/unplaced_replica_information.py b/customSDK/servicefabric/models/unplaced_replica_information.py new file mode 100644 index 00000000..ed715c2f --- /dev/null +++ b/customSDK/servicefabric/models/unplaced_replica_information.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UnplacedReplicaInformation(Model): + """Contains information for an unplaced replica. + + :param service_name: The name of the service. + :type service_name: str + :param partition_id: The ID of the partition. + :type partition_id: str + :param unplaced_replica_details: List of reasons due to which a replica + cannot be placed. + :type unplaced_replica_details: list[str] + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'unplaced_replica_details': {'key': 'UnplacedReplicaDetails', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(UnplacedReplicaInformation, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) + self.unplaced_replica_details = kwargs.get('unplaced_replica_details', None) diff --git a/customSDK/servicefabric/models/unplaced_replica_information_py3.py b/customSDK/servicefabric/models/unplaced_replica_information_py3.py new file mode 100644 index 00000000..93e162c6 --- /dev/null +++ b/customSDK/servicefabric/models/unplaced_replica_information_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UnplacedReplicaInformation(Model): + """Contains information for an unplaced replica. + + :param service_name: The name of the service. + :type service_name: str + :param partition_id: The ID of the partition. + :type partition_id: str + :param unplaced_replica_details: List of reasons due to which a replica + cannot be placed. + :type unplaced_replica_details: list[str] + """ + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'unplaced_replica_details': {'key': 'UnplacedReplicaDetails', 'type': '[str]'}, + } + + def __init__(self, *, service_name: str=None, partition_id: str=None, unplaced_replica_details=None, **kwargs) -> None: + super(UnplacedReplicaInformation, self).__init__(**kwargs) + self.service_name = service_name + self.partition_id = partition_id + self.unplaced_replica_details = unplaced_replica_details diff --git a/customSDK/servicefabric/models/unprovision_application_type_description_info.py b/customSDK/servicefabric/models/unprovision_application_type_description_info.py new file mode 100644 index 00000000..d946b380 --- /dev/null +++ b/customSDK/servicefabric/models/unprovision_application_type_description_info.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UnprovisionApplicationTypeDescriptionInfo(Model): + """Describes the operation to unregister or unprovision an application type + and its version that was registered with the Service Fabric. + + All required parameters must be populated in order to send to Azure. + + :param application_type_version: Required. The version of the application + type as defined in the application manifest. + :type application_type_version: str + :param async_property: The flag indicating whether or not unprovision + should occur asynchronously. When set to true, the unprovision operation + returns when the request is accepted by the system, and the unprovision + operation continues without any timeout limit. The default value is false. + However, we recommend setting it to true for large application packages + that were provisioned. + :type async_property: bool + """ + + _validation = { + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'async_property': {'key': 'Async', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(UnprovisionApplicationTypeDescriptionInfo, self).__init__(**kwargs) + self.application_type_version = kwargs.get('application_type_version', None) + self.async_property = kwargs.get('async_property', None) diff --git a/customSDK/servicefabric/models/unprovision_application_type_description_info_py3.py b/customSDK/servicefabric/models/unprovision_application_type_description_info_py3.py new file mode 100644 index 00000000..abc8598a --- /dev/null +++ b/customSDK/servicefabric/models/unprovision_application_type_description_info_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UnprovisionApplicationTypeDescriptionInfo(Model): + """Describes the operation to unregister or unprovision an application type + and its version that was registered with the Service Fabric. + + All required parameters must be populated in order to send to Azure. + + :param application_type_version: Required. The version of the application + type as defined in the application manifest. + :type application_type_version: str + :param async_property: The flag indicating whether or not unprovision + should occur asynchronously. When set to true, the unprovision operation + returns when the request is accepted by the system, and the unprovision + operation continues without any timeout limit. The default value is false. + However, we recommend setting it to true for large application packages + that were provisioned. + :type async_property: bool + """ + + _validation = { + 'application_type_version': {'required': True}, + } + + _attribute_map = { + 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, + 'async_property': {'key': 'Async', 'type': 'bool'}, + } + + def __init__(self, *, application_type_version: str, async_property: bool=None, **kwargs) -> None: + super(UnprovisionApplicationTypeDescriptionInfo, self).__init__(**kwargs) + self.application_type_version = application_type_version + self.async_property = async_property diff --git a/customSDK/servicefabric/models/unprovision_fabric_description.py b/customSDK/servicefabric/models/unprovision_fabric_description.py new file mode 100644 index 00000000..c56746bc --- /dev/null +++ b/customSDK/servicefabric/models/unprovision_fabric_description.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UnprovisionFabricDescription(Model): + """Describes the parameters for unprovisioning a cluster. + + :param code_version: The cluster code package version. + :type code_version: str + :param config_version: The cluster manifest version. + :type config_version: str + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UnprovisionFabricDescription, self).__init__(**kwargs) + self.code_version = kwargs.get('code_version', None) + self.config_version = kwargs.get('config_version', None) diff --git a/customSDK/servicefabric/models/unprovision_fabric_description_py3.py b/customSDK/servicefabric/models/unprovision_fabric_description_py3.py new file mode 100644 index 00000000..02691b03 --- /dev/null +++ b/customSDK/servicefabric/models/unprovision_fabric_description_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UnprovisionFabricDescription(Model): + """Describes the parameters for unprovisioning a cluster. + + :param code_version: The cluster code package version. + :type code_version: str + :param config_version: The cluster manifest version. + :type config_version: str + """ + + _attribute_map = { + 'code_version': {'key': 'CodeVersion', 'type': 'str'}, + 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, + } + + def __init__(self, *, code_version: str=None, config_version: str=None, **kwargs) -> None: + super(UnprovisionFabricDescription, self).__init__(**kwargs) + self.code_version = code_version + self.config_version = config_version diff --git a/customSDK/servicefabric/models/update_cluster_upgrade_description.py b/customSDK/servicefabric/models/update_cluster_upgrade_description.py new file mode 100644 index 00000000..22632ca5 --- /dev/null +++ b/customSDK/servicefabric/models/update_cluster_upgrade_description.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateClusterUpgradeDescription(Model): + """Parameters for updating a cluster upgrade. + + :param upgrade_kind: The type of upgrade out of the following possible + values. Possible values include: 'Invalid', 'Rolling', + 'Rolling_ForceRestart'. Default value: "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeType + :param update_description: Describes the parameters for updating a rolling + upgrade of application or cluster. + :type update_description: + ~azure.servicefabric.models.RollingUpgradeUpdateDescription + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param enable_delta_health_evaluation: When true, enables delta health + evaluation rather than absolute health evaluation after completion of each + upgrade domain. + :type enable_delta_health_evaluation: bool + :param cluster_upgrade_health_policy: Defines a health policy used to + evaluate the health of the cluster during a cluster upgrade. + :type cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :param application_health_policy_map: Defines the application health + policy map used to evaluate the health of an application or one of its + children entities. + :type application_health_policy_map: + ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _attribute_map = { + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__(self, **kwargs): + super(UpdateClusterUpgradeDescription, self).__init__(**kwargs) + self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") + self.update_description = kwargs.get('update_description', None) + self.cluster_health_policy = kwargs.get('cluster_health_policy', None) + self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) + self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) diff --git a/customSDK/servicefabric/models/update_cluster_upgrade_description_py3.py b/customSDK/servicefabric/models/update_cluster_upgrade_description_py3.py new file mode 100644 index 00000000..8e1f16cb --- /dev/null +++ b/customSDK/servicefabric/models/update_cluster_upgrade_description_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateClusterUpgradeDescription(Model): + """Parameters for updating a cluster upgrade. + + :param upgrade_kind: The type of upgrade out of the following possible + values. Possible values include: 'Invalid', 'Rolling', + 'Rolling_ForceRestart'. Default value: "Rolling" . + :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeType + :param update_description: Describes the parameters for updating a rolling + upgrade of application or cluster. + :type update_description: + ~azure.servicefabric.models.RollingUpgradeUpdateDescription + :param cluster_health_policy: Defines a health policy used to evaluate the + health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param enable_delta_health_evaluation: When true, enables delta health + evaluation rather than absolute health evaluation after completion of each + upgrade domain. + :type enable_delta_health_evaluation: bool + :param cluster_upgrade_health_policy: Defines a health policy used to + evaluate the health of the cluster during a cluster upgrade. + :type cluster_upgrade_health_policy: + ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject + :param application_health_policy_map: Defines the application health + policy map used to evaluate the health of an application or one of its + children entities. + :type application_health_policy_map: + ~azure.servicefabric.models.ApplicationHealthPolicies + """ + + _attribute_map = { + 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, + 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, + 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, + 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, + 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, + } + + def __init__(self, *, upgrade_kind="Rolling", update_description=None, cluster_health_policy=None, enable_delta_health_evaluation: bool=None, cluster_upgrade_health_policy=None, application_health_policy_map=None, **kwargs) -> None: + super(UpdateClusterUpgradeDescription, self).__init__(**kwargs) + self.upgrade_kind = upgrade_kind + self.update_description = update_description + self.cluster_health_policy = cluster_health_policy + self.enable_delta_health_evaluation = enable_delta_health_evaluation + self.cluster_upgrade_health_policy = cluster_upgrade_health_policy + self.application_health_policy_map = application_health_policy_map diff --git a/customSDK/servicefabric/models/update_partition_load_result.py b/customSDK/servicefabric/models/update_partition_load_result.py new file mode 100644 index 00000000..38866a27 --- /dev/null +++ b/customSDK/servicefabric/models/update_partition_load_result.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdatePartitionLoadResult(Model): + """Specifies result of updating load for specified partitions. The output will + be ordered based on the partition ID. + + :param partition_id: Id of the partition. + :type partition_id: str + :param partition_error_code: If OperationState is Completed - this is 0. + If OperationState is Faulted - this is an error code indicating the + reason. + :type partition_error_code: int + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'partition_error_code': {'key': 'PartitionErrorCode', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(UpdatePartitionLoadResult, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.partition_error_code = kwargs.get('partition_error_code', None) diff --git a/customSDK/servicefabric/models/update_partition_load_result_py3.py b/customSDK/servicefabric/models/update_partition_load_result_py3.py new file mode 100644 index 00000000..f5991dca --- /dev/null +++ b/customSDK/servicefabric/models/update_partition_load_result_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdatePartitionLoadResult(Model): + """Specifies result of updating load for specified partitions. The output will + be ordered based on the partition ID. + + :param partition_id: Id of the partition. + :type partition_id: str + :param partition_error_code: If OperationState is Completed - this is 0. + If OperationState is Faulted - this is an error code indicating the + reason. + :type partition_error_code: int + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'partition_error_code': {'key': 'PartitionErrorCode', 'type': 'int'}, + } + + def __init__(self, *, partition_id: str=None, partition_error_code: int=None, **kwargs) -> None: + super(UpdatePartitionLoadResult, self).__init__(**kwargs) + self.partition_id = partition_id + self.partition_error_code = partition_error_code diff --git a/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation.py b/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation.py new file mode 100644 index 00000000..02d0947d --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class UpgradeDomainDeltaNodesCheckHealthEvaluation(HealthEvaluation): + """Represents health evaluation for delta unhealthy cluster nodes in an + upgrade domain, containing health evaluations for each unhealthy node that + impacted current aggregated health state. + Can be returned during cluster upgrade when cluster aggregated health state + is Warning or Error. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param upgrade_domain_name: Name of the upgrade domain where nodes health + is currently evaluated. + :type upgrade_domain_name: str + :param baseline_error_count: Number of upgrade domain nodes with + aggregated heath state Error in the health store at the beginning of the + cluster upgrade. + :type baseline_error_count: long + :param baseline_total_count: Total number of upgrade domain nodes in the + health store at the beginning of the cluster upgrade. + :type baseline_total_count: long + :param max_percent_delta_unhealthy_nodes: Maximum allowed percentage of + upgrade domain delta unhealthy nodes from the ClusterUpgradeHealthPolicy. + :type max_percent_delta_unhealthy_nodes: int + :param total_count: Total number of upgrade domain nodes in the health + store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, + 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(UpgradeDomainDeltaNodesCheckHealthEvaluation, self).__init__(**kwargs) + self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) + self.baseline_error_count = kwargs.get('baseline_error_count', None) + self.baseline_total_count = kwargs.get('baseline_total_count', None) + self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'UpgradeDomainDeltaNodesCheck' diff --git a/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation_py3.py b/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation_py3.py new file mode 100644 index 00000000..9df9759b --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation_py3.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class UpgradeDomainDeltaNodesCheckHealthEvaluation(HealthEvaluation): + """Represents health evaluation for delta unhealthy cluster nodes in an + upgrade domain, containing health evaluations for each unhealthy node that + impacted current aggregated health state. + Can be returned during cluster upgrade when cluster aggregated health state + is Warning or Error. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param upgrade_domain_name: Name of the upgrade domain where nodes health + is currently evaluated. + :type upgrade_domain_name: str + :param baseline_error_count: Number of upgrade domain nodes with + aggregated heath state Error in the health store at the beginning of the + cluster upgrade. + :type baseline_error_count: long + :param baseline_total_count: Total number of upgrade domain nodes in the + health store at the beginning of the cluster upgrade. + :type baseline_total_count: long + :param max_percent_delta_unhealthy_nodes: Maximum allowed percentage of + upgrade domain delta unhealthy nodes from the ClusterUpgradeHealthPolicy. + :type max_percent_delta_unhealthy_nodes: int + :param total_count: Total number of upgrade domain nodes in the health + store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, + 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, + 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, upgrade_domain_name: str=None, baseline_error_count: int=None, baseline_total_count: int=None, max_percent_delta_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(UpgradeDomainDeltaNodesCheckHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.upgrade_domain_name = upgrade_domain_name + self.baseline_error_count = baseline_error_count + self.baseline_total_count = baseline_total_count + self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'UpgradeDomainDeltaNodesCheck' diff --git a/customSDK/servicefabric/models/upgrade_domain_deployed_applications_health_evaluation.py b/customSDK/servicefabric/models/upgrade_domain_deployed_applications_health_evaluation.py new file mode 100644 index 00000000..21a74858 --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_domain_deployed_applications_health_evaluation.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class UpgradeDomainDeployedApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed applications in an upgrade + domain, containing health evaluations for each unhealthy deployed + application that impacted current aggregated health state. Can be returned + when evaluating cluster health during cluster upgrade and the aggregated + health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param upgrade_domain_name: Name of the upgrade domain where deployed + applications health is currently evaluated. + :type upgrade_domain_name: str + :param max_percent_unhealthy_deployed_applications: Maximum allowed + percentage of unhealthy deployed applications from the + ClusterHealthPolicy. + :type max_percent_unhealthy_deployed_applications: int + :param total_count: Total number of deployed applications in the current + upgrade domain. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + DeployedApplicationHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(UpgradeDomainDeployedApplicationsHealthEvaluation, self).__init__(**kwargs) + self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) + self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'UpgradeDomainDeployedApplications' diff --git a/customSDK/servicefabric/models/upgrade_domain_deployed_applications_health_evaluation_py3.py b/customSDK/servicefabric/models/upgrade_domain_deployed_applications_health_evaluation_py3.py new file mode 100644 index 00000000..7d5dcc2b --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_domain_deployed_applications_health_evaluation_py3.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class UpgradeDomainDeployedApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed applications in an upgrade + domain, containing health evaluations for each unhealthy deployed + application that impacted current aggregated health state. Can be returned + when evaluating cluster health during cluster upgrade and the aggregated + health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param upgrade_domain_name: Name of the upgrade domain where deployed + applications health is currently evaluated. + :type upgrade_domain_name: str + :param max_percent_unhealthy_deployed_applications: Maximum allowed + percentage of unhealthy deployed applications from the + ClusterHealthPolicy. + :type max_percent_unhealthy_deployed_applications: int + :param total_count: Total number of deployed applications in the current + upgrade domain. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + DeployedApplicationHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, upgrade_domain_name: str=None, max_percent_unhealthy_deployed_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(UpgradeDomainDeployedApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.upgrade_domain_name = upgrade_domain_name + self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'UpgradeDomainDeployedApplications' diff --git a/customSDK/servicefabric/models/upgrade_domain_info.py b/customSDK/servicefabric/models/upgrade_domain_info.py new file mode 100644 index 00000000..71233ce8 --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_domain_info.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpgradeDomainInfo(Model): + """Information about an upgrade domain. + + :param name: The name of the upgrade domain + :type name: str + :param state: The state of the upgrade domain. Possible values include: + 'Invalid', 'Pending', 'InProgress', 'Completed' + :type state: str or ~azure.servicefabric.models.UpgradeDomainState + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpgradeDomainInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.state = kwargs.get('state', None) diff --git a/customSDK/servicefabric/models/upgrade_domain_info_py3.py b/customSDK/servicefabric/models/upgrade_domain_info_py3.py new file mode 100644 index 00000000..9edb2cf4 --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_domain_info_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpgradeDomainInfo(Model): + """Information about an upgrade domain. + + :param name: The name of the upgrade domain + :type name: str + :param state: The state of the upgrade domain. Possible values include: + 'Invalid', 'Pending', 'InProgress', 'Completed' + :type state: str or ~azure.servicefabric.models.UpgradeDomainState + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, state=None, **kwargs) -> None: + super(UpgradeDomainInfo, self).__init__(**kwargs) + self.name = name + self.state = state diff --git a/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation.py b/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation.py new file mode 100644 index 00000000..dcdfe3d8 --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation import HealthEvaluation + + +class UpgradeDomainNodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for cluster nodes in an upgrade domain, + containing health evaluations for each unhealthy node that impacted current + aggregated health state. Can be returned when evaluating cluster health + during cluster upgrade and the aggregated health state is either Error or + Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param upgrade_domain_name: Name of the upgrade domain where nodes health + is currently evaluated. + :type upgrade_domain_name: str + :param max_percent_unhealthy_nodes: Maximum allowed percentage of + unhealthy nodes from the ClusterHealthPolicy. + :type max_percent_unhealthy_nodes: int + :param total_count: Total number of nodes in the current upgrade domain. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(UpgradeDomainNodesHealthEvaluation, self).__init__(**kwargs) + self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) + self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'UpgradeDomainNodes' diff --git a/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation_py3.py b/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation_py3.py new file mode 100644 index 00000000..547ffab1 --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation_py3.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .health_evaluation_py3 import HealthEvaluation + + +class UpgradeDomainNodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for cluster nodes in an upgrade domain, + containing health evaluations for each unhealthy node that impacted current + aggregated health state. Can be returned when evaluating cluster health + during cluster upgrade and the aggregated health state is either Error or + Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param upgrade_domain_name: Name of the upgrade domain where nodes health + is currently evaluated. + :type upgrade_domain_name: str + :param max_percent_unhealthy_nodes: Maximum allowed percentage of + unhealthy nodes from the ClusterHealthPolicy. + :type max_percent_unhealthy_nodes: int + :param total_count: Total number of nodes in the current upgrade domain. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, upgrade_domain_name: str=None, max_percent_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(UpgradeDomainNodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.upgrade_domain_name = upgrade_domain_name + self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'UpgradeDomainNodes' diff --git a/customSDK/servicefabric/models/upgrade_orchestration_service_state.py b/customSDK/servicefabric/models/upgrade_orchestration_service_state.py new file mode 100644 index 00000000..6118fc31 --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_orchestration_service_state.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpgradeOrchestrationServiceState(Model): + """Service state of Service Fabric Upgrade Orchestration Service. + + :param service_state: The state of Service Fabric Upgrade Orchestration + Service. + :type service_state: str + """ + + _attribute_map = { + 'service_state': {'key': 'ServiceState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpgradeOrchestrationServiceState, self).__init__(**kwargs) + self.service_state = kwargs.get('service_state', None) diff --git a/customSDK/servicefabric/models/upgrade_orchestration_service_state_py3.py b/customSDK/servicefabric/models/upgrade_orchestration_service_state_py3.py new file mode 100644 index 00000000..35477c1b --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_orchestration_service_state_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpgradeOrchestrationServiceState(Model): + """Service state of Service Fabric Upgrade Orchestration Service. + + :param service_state: The state of Service Fabric Upgrade Orchestration + Service. + :type service_state: str + """ + + _attribute_map = { + 'service_state': {'key': 'ServiceState', 'type': 'str'}, + } + + def __init__(self, *, service_state: str=None, **kwargs) -> None: + super(UpgradeOrchestrationServiceState, self).__init__(**kwargs) + self.service_state = service_state diff --git a/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary.py b/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary.py new file mode 100644 index 00000000..0f15dd5f --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpgradeOrchestrationServiceStateSummary(Model): + """Service state summary of Service Fabric Upgrade Orchestration Service. + + :param current_code_version: The current code version of the cluster. + :type current_code_version: str + :param current_manifest_version: The current manifest version of the + cluster. + :type current_manifest_version: str + :param target_code_version: The target code version of the cluster. + :type target_code_version: str + :param target_manifest_version: The target manifest version of the + cluster. + :type target_manifest_version: str + :param pending_upgrade_type: The type of the pending upgrade of the + cluster. + :type pending_upgrade_type: str + """ + + _attribute_map = { + 'current_code_version': {'key': 'CurrentCodeVersion', 'type': 'str'}, + 'current_manifest_version': {'key': 'CurrentManifestVersion', 'type': 'str'}, + 'target_code_version': {'key': 'TargetCodeVersion', 'type': 'str'}, + 'target_manifest_version': {'key': 'TargetManifestVersion', 'type': 'str'}, + 'pending_upgrade_type': {'key': 'PendingUpgradeType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpgradeOrchestrationServiceStateSummary, self).__init__(**kwargs) + self.current_code_version = kwargs.get('current_code_version', None) + self.current_manifest_version = kwargs.get('current_manifest_version', None) + self.target_code_version = kwargs.get('target_code_version', None) + self.target_manifest_version = kwargs.get('target_manifest_version', None) + self.pending_upgrade_type = kwargs.get('pending_upgrade_type', None) diff --git a/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary_py3.py b/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary_py3.py new file mode 100644 index 00000000..1a90d312 --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpgradeOrchestrationServiceStateSummary(Model): + """Service state summary of Service Fabric Upgrade Orchestration Service. + + :param current_code_version: The current code version of the cluster. + :type current_code_version: str + :param current_manifest_version: The current manifest version of the + cluster. + :type current_manifest_version: str + :param target_code_version: The target code version of the cluster. + :type target_code_version: str + :param target_manifest_version: The target manifest version of the + cluster. + :type target_manifest_version: str + :param pending_upgrade_type: The type of the pending upgrade of the + cluster. + :type pending_upgrade_type: str + """ + + _attribute_map = { + 'current_code_version': {'key': 'CurrentCodeVersion', 'type': 'str'}, + 'current_manifest_version': {'key': 'CurrentManifestVersion', 'type': 'str'}, + 'target_code_version': {'key': 'TargetCodeVersion', 'type': 'str'}, + 'target_manifest_version': {'key': 'TargetManifestVersion', 'type': 'str'}, + 'pending_upgrade_type': {'key': 'PendingUpgradeType', 'type': 'str'}, + } + + def __init__(self, *, current_code_version: str=None, current_manifest_version: str=None, target_code_version: str=None, target_manifest_version: str=None, pending_upgrade_type: str=None, **kwargs) -> None: + super(UpgradeOrchestrationServiceStateSummary, self).__init__(**kwargs) + self.current_code_version = current_code_version + self.current_manifest_version = current_manifest_version + self.target_code_version = target_code_version + self.target_manifest_version = target_manifest_version + self.pending_upgrade_type = pending_upgrade_type diff --git a/customSDK/servicefabric/models/upgrade_unit_info.py b/customSDK/servicefabric/models/upgrade_unit_info.py new file mode 100644 index 00000000..6dff947f --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_unit_info.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpgradeUnitInfo(Model): + """Information about an upgrade unit. + + :param name: The name of the upgrade unit + :type name: str + :param state: The state of the upgrade unit. Possible values include: + 'Invalid', 'Pending', 'InProgress', 'Completed', 'Failed' + :type state: str or ~azure.servicefabric.models.UpgradeUnitState + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpgradeUnitInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.state = kwargs.get('state', None) diff --git a/customSDK/servicefabric/models/upgrade_unit_info_py3.py b/customSDK/servicefabric/models/upgrade_unit_info_py3.py new file mode 100644 index 00000000..cefc68ab --- /dev/null +++ b/customSDK/servicefabric/models/upgrade_unit_info_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpgradeUnitInfo(Model): + """Information about an upgrade unit. + + :param name: The name of the upgrade unit + :type name: str + :param state: The state of the upgrade unit. Possible values include: + 'Invalid', 'Pending', 'InProgress', 'Completed', 'Failed' + :type state: str or ~azure.servicefabric.models.UpgradeUnitState + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'state': {'key': 'State', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, state=None, **kwargs) -> None: + super(UpgradeUnitInfo, self).__init__(**kwargs) + self.name = name + self.state = state diff --git a/customSDK/servicefabric/models/upload_chunk_range.py b/customSDK/servicefabric/models/upload_chunk_range.py new file mode 100644 index 00000000..494aa8de --- /dev/null +++ b/customSDK/servicefabric/models/upload_chunk_range.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UploadChunkRange(Model): + """Information about which portion of the file to upload. + + :param start_position: The start position of the portion of the file. It's + represented by the number of bytes. + :type start_position: str + :param end_position: The end position of the portion of the file. It's + represented by the number of bytes. + :type end_position: str + """ + + _attribute_map = { + 'start_position': {'key': 'StartPosition', 'type': 'str'}, + 'end_position': {'key': 'EndPosition', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UploadChunkRange, self).__init__(**kwargs) + self.start_position = kwargs.get('start_position', None) + self.end_position = kwargs.get('end_position', None) diff --git a/customSDK/servicefabric/models/upload_chunk_range_py3.py b/customSDK/servicefabric/models/upload_chunk_range_py3.py new file mode 100644 index 00000000..a67b3021 --- /dev/null +++ b/customSDK/servicefabric/models/upload_chunk_range_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UploadChunkRange(Model): + """Information about which portion of the file to upload. + + :param start_position: The start position of the portion of the file. It's + represented by the number of bytes. + :type start_position: str + :param end_position: The end position of the portion of the file. It's + represented by the number of bytes. + :type end_position: str + """ + + _attribute_map = { + 'start_position': {'key': 'StartPosition', 'type': 'str'}, + 'end_position': {'key': 'EndPosition', 'type': 'str'}, + } + + def __init__(self, *, start_position: str=None, end_position: str=None, **kwargs) -> None: + super(UploadChunkRange, self).__init__(**kwargs) + self.start_position = start_position + self.end_position = end_position diff --git a/customSDK/servicefabric/models/upload_session.py b/customSDK/servicefabric/models/upload_session.py new file mode 100644 index 00000000..a9f2e1ef --- /dev/null +++ b/customSDK/servicefabric/models/upload_session.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UploadSession(Model): + """Information about a image store upload session. + + :param upload_sessions: When querying upload session by upload session ID, + the result contains only one upload session. When querying upload session + by image store relative path, the result might contain multiple upload + sessions. + :type upload_sessions: list[~azure.servicefabric.models.UploadSessionInfo] + """ + + _attribute_map = { + 'upload_sessions': {'key': 'UploadSessions', 'type': '[UploadSessionInfo]'}, + } + + def __init__(self, **kwargs): + super(UploadSession, self).__init__(**kwargs) + self.upload_sessions = kwargs.get('upload_sessions', None) diff --git a/customSDK/servicefabric/models/upload_session_info.py b/customSDK/servicefabric/models/upload_session_info.py new file mode 100644 index 00000000..eb71d201 --- /dev/null +++ b/customSDK/servicefabric/models/upload_session_info.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UploadSessionInfo(Model): + """Information about an image store upload session. A session is associated + with a relative path in the image store. + + :param store_relative_path: The remote location within image store. This + path is relative to the image store root. + :type store_relative_path: str + :param session_id: A unique ID of the upload session. A session ID can be + reused only if the session was committed or removed. + :type session_id: str + :param modified_date: The date and time when the upload session was last + modified. + :type modified_date: datetime + :param file_size: The size in bytes of the uploading file. + :type file_size: str + :param expected_ranges: List of chunk ranges that image store has not + received yet. + :type expected_ranges: list[~azure.servicefabric.models.UploadChunkRange] + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'session_id': {'key': 'SessionId', 'type': 'str'}, + 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, + 'file_size': {'key': 'FileSize', 'type': 'str'}, + 'expected_ranges': {'key': 'ExpectedRanges', 'type': '[UploadChunkRange]'}, + } + + def __init__(self, **kwargs): + super(UploadSessionInfo, self).__init__(**kwargs) + self.store_relative_path = kwargs.get('store_relative_path', None) + self.session_id = kwargs.get('session_id', None) + self.modified_date = kwargs.get('modified_date', None) + self.file_size = kwargs.get('file_size', None) + self.expected_ranges = kwargs.get('expected_ranges', None) diff --git a/customSDK/servicefabric/models/upload_session_info_py3.py b/customSDK/servicefabric/models/upload_session_info_py3.py new file mode 100644 index 00000000..342df6ef --- /dev/null +++ b/customSDK/servicefabric/models/upload_session_info_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UploadSessionInfo(Model): + """Information about an image store upload session. A session is associated + with a relative path in the image store. + + :param store_relative_path: The remote location within image store. This + path is relative to the image store root. + :type store_relative_path: str + :param session_id: A unique ID of the upload session. A session ID can be + reused only if the session was committed or removed. + :type session_id: str + :param modified_date: The date and time when the upload session was last + modified. + :type modified_date: datetime + :param file_size: The size in bytes of the uploading file. + :type file_size: str + :param expected_ranges: List of chunk ranges that image store has not + received yet. + :type expected_ranges: list[~azure.servicefabric.models.UploadChunkRange] + """ + + _attribute_map = { + 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, + 'session_id': {'key': 'SessionId', 'type': 'str'}, + 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, + 'file_size': {'key': 'FileSize', 'type': 'str'}, + 'expected_ranges': {'key': 'ExpectedRanges', 'type': '[UploadChunkRange]'}, + } + + def __init__(self, *, store_relative_path: str=None, session_id: str=None, modified_date=None, file_size: str=None, expected_ranges=None, **kwargs) -> None: + super(UploadSessionInfo, self).__init__(**kwargs) + self.store_relative_path = store_relative_path + self.session_id = session_id + self.modified_date = modified_date + self.file_size = file_size + self.expected_ranges = expected_ranges diff --git a/customSDK/servicefabric/models/upload_session_py3.py b/customSDK/servicefabric/models/upload_session_py3.py new file mode 100644 index 00000000..34394b80 --- /dev/null +++ b/customSDK/servicefabric/models/upload_session_py3.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UploadSession(Model): + """Information about a image store upload session. + + :param upload_sessions: When querying upload session by upload session ID, + the result contains only one upload session. When querying upload session + by image store relative path, the result might contain multiple upload + sessions. + :type upload_sessions: list[~azure.servicefabric.models.UploadSessionInfo] + """ + + _attribute_map = { + 'upload_sessions': {'key': 'UploadSessions', 'type': '[UploadSessionInfo]'}, + } + + def __init__(self, *, upload_sessions=None, **kwargs) -> None: + super(UploadSession, self).__init__(**kwargs) + self.upload_sessions = upload_sessions diff --git a/customSDK/servicefabric/models/usage_info.py b/customSDK/servicefabric/models/usage_info.py new file mode 100644 index 00000000..28f9c847 --- /dev/null +++ b/customSDK/servicefabric/models/usage_info.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UsageInfo(Model): + """Information about how much space and how many files in the file system the + ImageStore is using in this category. + + :param used_space: the size of all files in this category + :type used_space: str + :param file_count: the number of all files in this category + :type file_count: str + """ + + _attribute_map = { + 'used_space': {'key': 'UsedSpace', 'type': 'str'}, + 'file_count': {'key': 'FileCount', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageInfo, self).__init__(**kwargs) + self.used_space = kwargs.get('used_space', None) + self.file_count = kwargs.get('file_count', None) diff --git a/customSDK/servicefabric/models/usage_info_py3.py b/customSDK/servicefabric/models/usage_info_py3.py new file mode 100644 index 00000000..2a28cbc9 --- /dev/null +++ b/customSDK/servicefabric/models/usage_info_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UsageInfo(Model): + """Information about how much space and how many files in the file system the + ImageStore is using in this category. + + :param used_space: the size of all files in this category + :type used_space: str + :param file_count: the number of all files in this category + :type file_count: str + """ + + _attribute_map = { + 'used_space': {'key': 'UsedSpace', 'type': 'str'}, + 'file_count': {'key': 'FileCount', 'type': 'str'}, + } + + def __init__(self, *, used_space: str=None, file_count: str=None, **kwargs) -> None: + super(UsageInfo, self).__init__(**kwargs) + self.used_space = used_space + self.file_count = file_count diff --git a/customSDK/servicefabric/models/validate_cluster_upgrade_result.py b/customSDK/servicefabric/models/validate_cluster_upgrade_result.py new file mode 100644 index 00000000..ffde1d09 --- /dev/null +++ b/customSDK/servicefabric/models/validate_cluster_upgrade_result.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateClusterUpgradeResult(Model): + """Specifies result of validating a cluster upgrade. + + :param service_host_upgrade_impact: The expected impact of the upgrade. + Possible values include: 'Invalid', 'None', 'ServiceHostRestart', + 'UnexpectedServiceHostRestart' + :type service_host_upgrade_impact: str or + ~azure.servicefabric.models.ServiceHostUpgradeImpact + :param validation_details: A string containing additional details for the + Fabric upgrade validation result. + :type validation_details: str + """ + + _attribute_map = { + 'service_host_upgrade_impact': {'key': 'ServiceHostUpgradeImpact', 'type': 'str'}, + 'validation_details': {'key': 'ValidationDetails', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ValidateClusterUpgradeResult, self).__init__(**kwargs) + self.service_host_upgrade_impact = kwargs.get('service_host_upgrade_impact', None) + self.validation_details = kwargs.get('validation_details', None) diff --git a/customSDK/servicefabric/models/validate_cluster_upgrade_result_py3.py b/customSDK/servicefabric/models/validate_cluster_upgrade_result_py3.py new file mode 100644 index 00000000..6fc5473c --- /dev/null +++ b/customSDK/servicefabric/models/validate_cluster_upgrade_result_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateClusterUpgradeResult(Model): + """Specifies result of validating a cluster upgrade. + + :param service_host_upgrade_impact: The expected impact of the upgrade. + Possible values include: 'Invalid', 'None', 'ServiceHostRestart', + 'UnexpectedServiceHostRestart' + :type service_host_upgrade_impact: str or + ~azure.servicefabric.models.ServiceHostUpgradeImpact + :param validation_details: A string containing additional details for the + Fabric upgrade validation result. + :type validation_details: str + """ + + _attribute_map = { + 'service_host_upgrade_impact': {'key': 'ServiceHostUpgradeImpact', 'type': 'str'}, + 'validation_details': {'key': 'ValidationDetails', 'type': 'str'}, + } + + def __init__(self, *, service_host_upgrade_impact=None, validation_details: str=None, **kwargs) -> None: + super(ValidateClusterUpgradeResult, self).__init__(**kwargs) + self.service_host_upgrade_impact = service_host_upgrade_impact + self.validation_details = validation_details diff --git a/customSDK/servicefabric/models/validation_failed_chaos_event.py b/customSDK/servicefabric/models/validation_failed_chaos_event.py new file mode 100644 index 00000000..c3944394 --- /dev/null +++ b/customSDK/servicefabric/models/validation_failed_chaos_event.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .chaos_event import ChaosEvent + + +class ValidationFailedChaosEvent(ChaosEvent): + """Chaos event corresponding to a failure during validation. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Describes why the ValidationFailedChaosEvent was generated. + This may happen because more than MaxPercentUnhealthyNodes are unhealthy + for more than MaxClusterStabilizationTimeout. This reason will be in the + Reason property of the ValidationFailedChaosEvent as a string. + :type reason: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ValidationFailedChaosEvent, self).__init__(**kwargs) + self.reason = kwargs.get('reason', None) + self.kind = 'ValidationFailed' diff --git a/customSDK/servicefabric/models/validation_failed_chaos_event_py3.py b/customSDK/servicefabric/models/validation_failed_chaos_event_py3.py new file mode 100644 index 00000000..5d983a06 --- /dev/null +++ b/customSDK/servicefabric/models/validation_failed_chaos_event_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .chaos_event_py3 import ChaosEvent + + +class ValidationFailedChaosEvent(ChaosEvent): + """Chaos event corresponding to a failure during validation. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Describes why the ValidationFailedChaosEvent was generated. + This may happen because more than MaxPercentUnhealthyNodes are unhealthy + for more than MaxClusterStabilizationTimeout. This reason will be in the + Reason property of the ValidationFailedChaosEvent as a string. + :type reason: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: + super(ValidationFailedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.reason = reason + self.kind = 'ValidationFailed' diff --git a/customSDK/servicefabric/models/volume_provider_parameters_azure_file.py b/customSDK/servicefabric/models/volume_provider_parameters_azure_file.py new file mode 100644 index 00000000..c10943e9 --- /dev/null +++ b/customSDK/servicefabric/models/volume_provider_parameters_azure_file.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VolumeProviderParametersAzureFile(Model): + """This type describes a volume provided by an Azure Files file share. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. Name of the Azure storage account for the + File Share. + :type account_name: str + :param account_key: Access key of the Azure storage account for the File + Share. + :type account_key: str + :param share_name: Required. Name of the Azure Files file share that + provides storage for the volume. + :type share_name: str + """ + + _validation = { + 'account_name': {'required': True}, + 'share_name': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'share_name': {'key': 'shareName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VolumeProviderParametersAzureFile, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + self.account_key = kwargs.get('account_key', None) + self.share_name = kwargs.get('share_name', None) diff --git a/customSDK/servicefabric/models/volume_provider_parameters_azure_file_py3.py b/customSDK/servicefabric/models/volume_provider_parameters_azure_file_py3.py new file mode 100644 index 00000000..c8fea05b --- /dev/null +++ b/customSDK/servicefabric/models/volume_provider_parameters_azure_file_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VolumeProviderParametersAzureFile(Model): + """This type describes a volume provided by an Azure Files file share. + + All required parameters must be populated in order to send to Azure. + + :param account_name: Required. Name of the Azure storage account for the + File Share. + :type account_name: str + :param account_key: Access key of the Azure storage account for the File + Share. + :type account_key: str + :param share_name: Required. Name of the Azure Files file share that + provides storage for the volume. + :type share_name: str + """ + + _validation = { + 'account_name': {'required': True}, + 'share_name': {'required': True}, + } + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'share_name': {'key': 'shareName', 'type': 'str'}, + } + + def __init__(self, *, account_name: str, share_name: str, account_key: str=None, **kwargs) -> None: + super(VolumeProviderParametersAzureFile, self).__init__(**kwargs) + self.account_name = account_name + self.account_key = account_key + self.share_name = share_name diff --git a/customSDK/servicefabric/models/volume_reference.py b/customSDK/servicefabric/models/volume_reference.py new file mode 100644 index 00000000..5896c0e8 --- /dev/null +++ b/customSDK/servicefabric/models/volume_reference.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VolumeReference(Model): + """Describes a reference to a volume resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the volume being referenced. + :type name: str + :param read_only: The flag indicating whether the volume is read only. + Default is 'false'. + :type read_only: bool + :param destination_path: Required. The path within the container at which + the volume should be mounted. Only valid path characters are allowed. + :type destination_path: str + """ + + _validation = { + 'name': {'required': True}, + 'destination_path': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'destination_path': {'key': 'destinationPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VolumeReference, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.read_only = kwargs.get('read_only', None) + self.destination_path = kwargs.get('destination_path', None) diff --git a/customSDK/servicefabric/models/volume_reference_py3.py b/customSDK/servicefabric/models/volume_reference_py3.py new file mode 100644 index 00000000..78adefae --- /dev/null +++ b/customSDK/servicefabric/models/volume_reference_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VolumeReference(Model): + """Describes a reference to a volume resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the volume being referenced. + :type name: str + :param read_only: The flag indicating whether the volume is read only. + Default is 'false'. + :type read_only: bool + :param destination_path: Required. The path within the container at which + the volume should be mounted. Only valid path characters are allowed. + :type destination_path: str + """ + + _validation = { + 'name': {'required': True}, + 'destination_path': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'destination_path': {'key': 'destinationPath', 'type': 'str'}, + } + + def __init__(self, *, name: str, destination_path: str, read_only: bool=None, **kwargs) -> None: + super(VolumeReference, self).__init__(**kwargs) + self.name = name + self.read_only = read_only + self.destination_path = destination_path diff --git a/customSDK/servicefabric/models/volume_resource_description.py b/customSDK/servicefabric/models/volume_resource_description.py new file mode 100644 index 00000000..6d7b4180 --- /dev/null +++ b/customSDK/servicefabric/models/volume_resource_description.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VolumeResourceDescription(Model): + """This type describes a volume resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Volume resource. + :type name: str + :param description: User readable description of the volume. + :type description: str + :ivar status: Status of the volume. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the volume. + :vartype status_details: str + :ivar provider: Required. Provider of the volume. Default value: + "SFAzureFile" . + :vartype provider: str + :param azure_file_parameters: This type describes a volume provided by an + Azure Files file share. + :type azure_file_parameters: + ~azure.servicefabric.models.VolumeProviderParametersAzureFile + """ + + _validation = { + 'name': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'provider': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, + } + + provider = "SFAzureFile" + + def __init__(self, **kwargs): + super(VolumeResourceDescription, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.status = None + self.status_details = None + self.azure_file_parameters = kwargs.get('azure_file_parameters', None) diff --git a/customSDK/servicefabric/models/volume_resource_description_py3.py b/customSDK/servicefabric/models/volume_resource_description_py3.py new file mode 100644 index 00000000..bc275555 --- /dev/null +++ b/customSDK/servicefabric/models/volume_resource_description_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VolumeResourceDescription(Model): + """This type describes a volume resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the Volume resource. + :type name: str + :param description: User readable description of the volume. + :type description: str + :ivar status: Status of the volume. Possible values include: 'Unknown', + 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' + :vartype status: str or ~azure.servicefabric.models.ResourceStatus + :ivar status_details: Gives additional information about the current + status of the volume. + :vartype status_details: str + :ivar provider: Required. Provider of the volume. Default value: + "SFAzureFile" . + :vartype provider: str + :param azure_file_parameters: This type describes a volume provided by an + Azure Files file share. + :type azure_file_parameters: + ~azure.servicefabric.models.VolumeProviderParametersAzureFile + """ + + _validation = { + 'name': {'required': True}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'provider': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'provider': {'key': 'properties.provider', 'type': 'str'}, + 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, + } + + provider = "SFAzureFile" + + def __init__(self, *, name: str, description: str=None, azure_file_parameters=None, **kwargs) -> None: + super(VolumeResourceDescription, self).__init__(**kwargs) + self.name = name + self.description = description + self.status = None + self.status_details = None + self.azure_file_parameters = azure_file_parameters diff --git a/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check.py b/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check.py new file mode 100644 index 00000000..a9e3c654 --- /dev/null +++ b/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_safety_check import PartitionSafetyCheck + + +class WaitForInbuildReplicaSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the replica build operation to finish. This + indicates that there is a replica that is going through the copy or is + providing data for building another replica. Bring the node down will abort + this copy operation which are typically expensive involving data movements. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WaitForInbuildReplicaSafetyCheck, self).__init__(**kwargs) + self.kind = 'WaitForInbuildReplica' diff --git a/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check_py3.py b/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check_py3.py new file mode 100644 index 00000000..2880f6b1 --- /dev/null +++ b/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_safety_check_py3 import PartitionSafetyCheck + + +class WaitForInbuildReplicaSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the replica build operation to finish. This + indicates that there is a replica that is going through the copy or is + providing data for building another replica. Bring the node down will abort + this copy operation which are typically expensive involving data movements. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, partition_id: str=None, **kwargs) -> None: + super(WaitForInbuildReplicaSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'WaitForInbuildReplica' diff --git a/customSDK/servicefabric/models/wait_for_primary_placement_safety_check.py b/customSDK/servicefabric/models/wait_for_primary_placement_safety_check.py new file mode 100644 index 00000000..22974a04 --- /dev/null +++ b/customSDK/servicefabric/models/wait_for_primary_placement_safety_check.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_safety_check import PartitionSafetyCheck + + +class WaitForPrimaryPlacementSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the primary replica that was moved out of the + node due to upgrade to be placed back again on that node. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WaitForPrimaryPlacementSafetyCheck, self).__init__(**kwargs) + self.kind = 'WaitForPrimaryPlacement' diff --git a/customSDK/servicefabric/models/wait_for_primary_placement_safety_check_py3.py b/customSDK/servicefabric/models/wait_for_primary_placement_safety_check_py3.py new file mode 100644 index 00000000..ff14b6a9 --- /dev/null +++ b/customSDK/servicefabric/models/wait_for_primary_placement_safety_check_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_safety_check_py3 import PartitionSafetyCheck + + +class WaitForPrimaryPlacementSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the primary replica that was moved out of the + node due to upgrade to be placed back again on that node. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, partition_id: str=None, **kwargs) -> None: + super(WaitForPrimaryPlacementSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'WaitForPrimaryPlacement' diff --git a/customSDK/servicefabric/models/wait_for_primary_swap_safety_check.py b/customSDK/servicefabric/models/wait_for_primary_swap_safety_check.py new file mode 100644 index 00000000..9619071b --- /dev/null +++ b/customSDK/servicefabric/models/wait_for_primary_swap_safety_check.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_safety_check import PartitionSafetyCheck + + +class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the primary replica to be moved out of the node + before starting an upgrade to ensure the availability of the primary + replica for the partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WaitForPrimarySwapSafetyCheck, self).__init__(**kwargs) + self.kind = 'WaitForPrimarySwap' diff --git a/customSDK/servicefabric/models/wait_for_primary_swap_safety_check_py3.py b/customSDK/servicefabric/models/wait_for_primary_swap_safety_check_py3.py new file mode 100644 index 00000000..bc895a25 --- /dev/null +++ b/customSDK/servicefabric/models/wait_for_primary_swap_safety_check_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_safety_check_py3 import PartitionSafetyCheck + + +class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the primary replica to be moved out of the node + before starting an upgrade to ensure the availability of the primary + replica for the partition. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, partition_id: str=None, **kwargs) -> None: + super(WaitForPrimarySwapSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'WaitForPrimarySwap' diff --git a/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check.py b/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check.py new file mode 100644 index 00000000..78a6d6db --- /dev/null +++ b/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_safety_check import PartitionSafetyCheck + + +class WaitForReconfigurationSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the current reconfiguration of the partition to + be completed before starting an upgrade. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WaitForReconfigurationSafetyCheck, self).__init__(**kwargs) + self.kind = 'WaitForReconfiguration' diff --git a/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check_py3.py b/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check_py3.py new file mode 100644 index 00000000..e3900dfe --- /dev/null +++ b/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .partition_safety_check_py3 import PartitionSafetyCheck + + +class WaitForReconfigurationSafetyCheck(PartitionSafetyCheck): + """Safety check that waits for the current reconfiguration of the partition to + be completed before starting an upgrade. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param partition_id: Id of the partition which is undergoing the safety + check. + :type partition_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'Kind', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + } + + def __init__(self, *, partition_id: str=None, **kwargs) -> None: + super(WaitForReconfigurationSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) + self.kind = 'WaitForReconfiguration' diff --git a/customSDK/servicefabric/models/waiting_chaos_event.py b/customSDK/servicefabric/models/waiting_chaos_event.py new file mode 100644 index 00000000..75ddfc54 --- /dev/null +++ b/customSDK/servicefabric/models/waiting_chaos_event.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .chaos_event import ChaosEvent + + +class WaitingChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos is waiting for the + cluster to become ready for faulting, for example, Chaos may be waiting for + the on-going upgrade to finish. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Describes why the WaitingChaosEvent was generated, for + example, due to a cluster upgrade. + :type reason: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WaitingChaosEvent, self).__init__(**kwargs) + self.reason = kwargs.get('reason', None) + self.kind = 'Waiting' diff --git a/customSDK/servicefabric/models/waiting_chaos_event_py3.py b/customSDK/servicefabric/models/waiting_chaos_event_py3.py new file mode 100644 index 00000000..b36fdf69 --- /dev/null +++ b/customSDK/servicefabric/models/waiting_chaos_event_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .chaos_event_py3 import ChaosEvent + + +class WaitingChaosEvent(ChaosEvent): + """Describes a Chaos event that gets generated when Chaos is waiting for the + cluster to become ready for faulting, for example, Chaos may be waiting for + the on-going upgrade to finish. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp_utc: Required. The UTC timestamp when this Chaos event + was generated. + :type time_stamp_utc: datetime + :param kind: Required. Constant filled by server. + :type kind: str + :param reason: Describes why the WaitingChaosEvent was generated, for + example, due to a cluster upgrade. + :type reason: str + """ + + _validation = { + 'time_stamp_utc': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'reason': {'key': 'Reason', 'type': 'str'}, + } + + def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: + super(WaitingChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) + self.reason = reason + self.kind = 'Waiting' diff --git a/customSDK/servicefabric/operations/__init__.py b/customSDK/servicefabric/operations/__init__.py new file mode 100644 index 00000000..df6b66c5 --- /dev/null +++ b/customSDK/servicefabric/operations/__init__.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._service_fabric_client_apis_operations import ServiceFabricClientAPIsOperationsMixin +from ._mesh_secret_operations import MeshSecretOperations +from ._mesh_secret_value_operations import MeshSecretValueOperations +from ._mesh_volume_operations import MeshVolumeOperations +from ._mesh_network_operations import MeshNetworkOperations +from ._mesh_application_operations import MeshApplicationOperations +from ._mesh_service_operations import MeshServiceOperations +from ._mesh_code_package_operations import MeshCodePackageOperations +from ._mesh_service_replica_operations import MeshServiceReplicaOperations +from ._mesh_gateway_operations import MeshGatewayOperations + +__all__ = [ + 'ServiceFabricClientAPIsOperationsMixin', + 'MeshSecretOperations', + 'MeshSecretValueOperations', + 'MeshVolumeOperations', + 'MeshNetworkOperations', + 'MeshApplicationOperations', + 'MeshServiceOperations', + 'MeshCodePackageOperations', + 'MeshServiceReplicaOperations', + 'MeshGatewayOperations', +] diff --git a/customSDK/servicefabric/operations/_mesh_application_operations.py b/customSDK/servicefabric/operations/_mesh_application_operations.py new file mode 100644 index 00000000..db2b4e3f --- /dev/null +++ b/customSDK/servicefabric/operations/_mesh_application_operations.py @@ -0,0 +1,509 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_create_or_update_request( + application_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}") + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + application_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}") + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_request( + application_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}") + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Applications") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_upgrade_progress_request( + application_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}/$/GetUpgradeProgress") + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class MeshApplicationOperations(object): + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_application` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace + def create_or_update( + self, + application_resource_name, # type: str + application_resource_description, # type: "_models.ApplicationResourceDescription" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ApplicationResourceDescription"] + """Creates or updates a Application resource. + + Creates a Application resource with the specified name, description and properties. If + Application resource with the same name exists, then it is updated with the specified + description and properties. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param application_resource_description: Description for creating a Application resource. + :type application_resource_description: + ~azure.servicefabric.models.ApplicationResourceDescription + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationResourceDescription or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationResourceDescription"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(application_resource_description, 'ApplicationResourceDescription') + + request = build_create_or_update_request( + application_resource_name=application_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationResourceDescription', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ApplicationResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/Resources/Applications/{applicationResourceName}"} # type: ignore + + + @distributed_trace + def get( + self, + application_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ApplicationResourceDescription" + """Gets the Application resource with the given name. + + Gets the information about the Application resource with the given name. The information + include the description and other properties of the Application. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationResourceDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationResourceDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_request( + application_resource_name=application_resource_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/Resources/Applications/{applicationResourceName}"} # type: ignore + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + application_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes the Application resource. + + Deletes the Application resource identified by the name. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_request( + application_resource_name=application_resource_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/Resources/Applications/{applicationResourceName}"} # type: ignore + + + @distributed_trace + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedApplicationResourceDescriptionList" + """Lists all the application resources. + + Gets the information about all application resources in a given resource group. The information + include the description and other properties of the Application. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedApplicationResourceDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedApplicationResourceDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedApplicationResourceDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedApplicationResourceDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/Resources/Applications"} # type: ignore + + + @distributed_trace + def get_upgrade_progress( + self, + application_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ApplicationResourceUpgradeProgressInfo" + """Gets the progress of the latest upgrade performed on this application resource. + + Gets the upgrade progress information about the Application resource with the given name. The + information include percentage of completion and other upgrade state information of the + Application resource. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationResourceUpgradeProgressInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationResourceUpgradeProgressInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationResourceUpgradeProgressInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_upgrade_progress_request( + application_resource_name=application_resource_name, + api_version=api_version, + template_url=self.get_upgrade_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationResourceUpgradeProgressInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_upgrade_progress.metadata = {'url': "/Resources/Applications/{applicationResourceName}/$/GetUpgradeProgress"} # type: ignore + diff --git a/customSDK/servicefabric/operations/_mesh_code_package_operations.py b/customSDK/servicefabric/operations/_mesh_code_package_operations.py new file mode 100644 index 00000000..19039c37 --- /dev/null +++ b/customSDK/servicefabric/operations/_mesh_code_package_operations.py @@ -0,0 +1,167 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_container_logs_request( + application_resource_name, # type: str + service_resource_name, # type: str + replica_name, # type: str + code_package_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + tail = kwargs.pop('tail', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}/CodePackages/{codePackageName}/Logs") # pylint: disable=line-too-long + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + "serviceResourceName": _SERIALIZER.url("service_resource_name", service_resource_name, 'str', skip_quote=True), + "replicaName": _SERIALIZER.url("replica_name", replica_name, 'str', skip_quote=True), + "codePackageName": _SERIALIZER.url("code_package_name", code_package_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if tail is not None: + _query_parameters['Tail'] = _SERIALIZER.query("tail", tail, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class MeshCodePackageOperations(object): + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_code_package` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace + def get_container_logs( + self, + application_resource_name, # type: str + service_resource_name, # type: str + replica_name, # type: str + code_package_name, # type: str + tail=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.ContainerLogs" + """Gets the logs from the container. + + Gets the logs for the container of the specified code package of the service replica. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :param replica_name: Service Fabric replica name. + :type replica_name: str + :param code_package_name: The name of code package of the service. + :type code_package_name: str + :param tail: Number of lines to show from the end of the logs. Default is 100. 'all' to show + the complete logs. + :type tail: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ContainerLogs, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ContainerLogs + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerLogs"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_container_logs_request( + application_resource_name=application_resource_name, + service_resource_name=service_resource_name, + replica_name=replica_name, + code_package_name=code_package_name, + api_version=api_version, + tail=tail, + template_url=self.get_container_logs.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ContainerLogs', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_container_logs.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}/CodePackages/{codePackageName}/Logs"} # type: ignore + diff --git a/customSDK/servicefabric/operations/_mesh_gateway_operations.py b/customSDK/servicefabric/operations/_mesh_gateway_operations.py new file mode 100644 index 00000000..59acbe31 --- /dev/null +++ b/customSDK/servicefabric/operations/_mesh_gateway_operations.py @@ -0,0 +1,416 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_create_or_update_request( + gateway_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Gateways/{gatewayResourceName}") + path_format_arguments = { + "gatewayResourceName": _SERIALIZER.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + gateway_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Gateways/{gatewayResourceName}") + path_format_arguments = { + "gatewayResourceName": _SERIALIZER.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_request( + gateway_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Gateways/{gatewayResourceName}") + path_format_arguments = { + "gatewayResourceName": _SERIALIZER.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Gateways") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class MeshGatewayOperations(object): + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_gateway` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace + def create_or_update( + self, + gateway_resource_name, # type: str + gateway_resource_description, # type: "_models.GatewayResourceDescription" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.GatewayResourceDescription"] + """Creates or updates a Gateway resource. + + Creates a Gateway resource with the specified name, description and properties. If Gateway + resource with the same name exists, then it is updated with the specified description and + properties. Use Gateway resource to provide public connectivity to application services. + + :param gateway_resource_name: The identity of the gateway. + :type gateway_resource_name: str + :param gateway_resource_description: Description for creating a Gateway resource. + :type gateway_resource_description: ~azure.servicefabric.models.GatewayResourceDescription + :keyword callable cls: A custom type or function that will be passed the direct response + :return: GatewayResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.GatewayResourceDescription or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GatewayResourceDescription"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(gateway_resource_description, 'GatewayResourceDescription') + + request = build_create_or_update_request( + gateway_resource_name=gateway_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GatewayResourceDescription', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('GatewayResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/Resources/Gateways/{gatewayResourceName}"} # type: ignore + + + @distributed_trace + def get( + self, + gateway_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.GatewayResourceDescription" + """Gets the Gateway resource with the given name. + + Gets the information about the Gateway resource with the given name. The information include + the description and other properties of the Gateway. + + :param gateway_resource_name: The identity of the gateway. + :type gateway_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: GatewayResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.GatewayResourceDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GatewayResourceDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_request( + gateway_resource_name=gateway_resource_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('GatewayResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/Resources/Gateways/{gatewayResourceName}"} # type: ignore + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + gateway_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes the Gateway resource. + + Deletes the Gateway resource identified by the name. + + :param gateway_resource_name: The identity of the gateway. + :type gateway_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_request( + gateway_resource_name=gateway_resource_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/Resources/Gateways/{gatewayResourceName}"} # type: ignore + + + @distributed_trace + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedGatewayResourceDescriptionList" + """Lists all the gateway resources. + + Gets the information about all gateway resources in a given resource group. The information + include the description and other properties of the Gateway. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedGatewayResourceDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedGatewayResourceDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedGatewayResourceDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedGatewayResourceDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/Resources/Gateways"} # type: ignore + diff --git a/customSDK/servicefabric/operations/_mesh_network_operations.py b/customSDK/servicefabric/operations/_mesh_network_operations.py new file mode 100644 index 00000000..4b140d1d --- /dev/null +++ b/customSDK/servicefabric/operations/_mesh_network_operations.py @@ -0,0 +1,420 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_create_or_update_request( + network_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Networks/{networkResourceName}") + path_format_arguments = { + "networkResourceName": _SERIALIZER.url("network_resource_name", network_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + network_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Networks/{networkResourceName}") + path_format_arguments = { + "networkResourceName": _SERIALIZER.url("network_resource_name", network_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_request( + network_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Networks/{networkResourceName}") + path_format_arguments = { + "networkResourceName": _SERIALIZER.url("network_resource_name", network_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Networks") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class MeshNetworkOperations(object): + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_network` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace + def create_or_update( + self, + network_resource_name, # type: str + name, # type: str + properties, # type: "_models.NetworkResourceProperties" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.NetworkResourceDescription"] + """Creates or updates a Network resource. + + Creates a Network resource with the specified name, description and properties. If Network + resource with the same name exists, then it is updated with the specified description and + properties. Network resource provides connectivity between application services. + + :param network_resource_name: The identity of the network. + :type network_resource_name: str + :param name: Name of the Network resource. + :type name: str + :param properties: Describes properties of a network resource. + :type properties: ~azure.servicefabric.models.NetworkResourceProperties + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.NetworkResourceDescription or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NetworkResourceDescription"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _network_resource_description = _models.NetworkResourceDescription(name=name, properties=properties) + _json = self._serialize.body(_network_resource_description, 'NetworkResourceDescription') + + request = build_create_or_update_request( + network_resource_name=network_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NetworkResourceDescription', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/Resources/Networks/{networkResourceName}"} # type: ignore + + + @distributed_trace + def get( + self, + network_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkResourceDescription" + """Gets the Network resource with the given name. + + Gets the information about the Network resource with the given name. The information include + the description and other properties of the Network. + + :param network_resource_name: The identity of the network. + :type network_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.NetworkResourceDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkResourceDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_request( + network_resource_name=network_resource_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/Resources/Networks/{networkResourceName}"} # type: ignore + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + network_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes the Network resource. + + Deletes the Network resource identified by the name. + + :param network_resource_name: The identity of the network. + :type network_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_request( + network_resource_name=network_resource_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/Resources/Networks/{networkResourceName}"} # type: ignore + + + @distributed_trace + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedNetworkResourceDescriptionList" + """Lists all the network resources. + + Gets the information about all network resources in a given resource group. The information + include the description and other properties of the Network. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedNetworkResourceDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedNetworkResourceDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedNetworkResourceDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedNetworkResourceDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/Resources/Networks"} # type: ignore + diff --git a/customSDK/servicefabric/operations/_mesh_secret_operations.py b/customSDK/servicefabric/operations/_mesh_secret_operations.py new file mode 100644 index 00000000..dcdff98c --- /dev/null +++ b/customSDK/servicefabric/operations/_mesh_secret_operations.py @@ -0,0 +1,420 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_create_or_update_request( + secret_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Secrets/{secretResourceName}") + path_format_arguments = { + "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + secret_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Secrets/{secretResourceName}") + path_format_arguments = { + "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_request( + secret_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Secrets/{secretResourceName}") + path_format_arguments = { + "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Secrets") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class MeshSecretOperations(object): + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_secret` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace + def create_or_update( + self, + secret_resource_name, # type: str + properties, # type: "_models.SecretResourceProperties" + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.SecretResourceDescription"] + """Creates or updates a Secret resource. + + Creates a Secret resource with the specified name, description and properties. If Secret + resource with the same name exists, then it is updated with the specified description and + properties. Once created, the kind and contentType of a secret resource cannot be updated. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param properties: Describes the properties of a secret resource. + :type properties: ~azure.servicefabric.models.SecretResourceProperties + :param name: Name of the Secret resource. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecretResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.SecretResourceDescription or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SecretResourceDescription"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _secret_resource_description = _models.SecretResourceDescription(properties=properties, name=name) + _json = self._serialize.body(_secret_resource_description, 'SecretResourceDescription') + + request = build_create_or_update_request( + secret_resource_name=secret_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SecretResourceDescription', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SecretResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/Resources/Secrets/{secretResourceName}"} # type: ignore + + + @distributed_trace + def get( + self, + secret_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SecretResourceDescription" + """Gets the Secret resource with the given name. + + Gets the information about the Secret resource with the given name. The information include the + description and other properties of the Secret. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecretResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.SecretResourceDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretResourceDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_request( + secret_resource_name=secret_resource_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecretResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/Resources/Secrets/{secretResourceName}"} # type: ignore + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + secret_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes the Secret resource. + + Deletes the specified Secret resource and all of its named values. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_request( + secret_resource_name=secret_resource_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/Resources/Secrets/{secretResourceName}"} # type: ignore + + + @distributed_trace + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedSecretResourceDescriptionList" + """Lists all the secret resources. + + Gets the information about all secret resources in a given resource group. The information + include the description and other properties of the Secret. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedSecretResourceDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedSecretResourceDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedSecretResourceDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedSecretResourceDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/Resources/Secrets"} # type: ignore + diff --git a/customSDK/servicefabric/operations/_mesh_secret_value_operations.py b/customSDK/servicefabric/operations/_mesh_secret_value_operations.py new file mode 100644 index 00000000..9c033a4d --- /dev/null +++ b/customSDK/servicefabric/operations/_mesh_secret_value_operations.py @@ -0,0 +1,549 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_add_value_request( + secret_resource_name, # type: str + secret_value_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}") + path_format_arguments = { + "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + "secretValueResourceName": _SERIALIZER.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + secret_resource_name, # type: str + secret_value_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}") + path_format_arguments = { + "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + "secretValueResourceName": _SERIALIZER.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_request( + secret_resource_name, # type: str + secret_value_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}") + path_format_arguments = { + "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + "secretValueResourceName": _SERIALIZER.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_request( + secret_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Secrets/{secretResourceName}/values") + path_format_arguments = { + "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_show_request( + secret_resource_name, # type: str + secret_value_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}/list_value") + path_format_arguments = { + "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + "secretValueResourceName": _SERIALIZER.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class MeshSecretValueOperations(object): + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_secret_value` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace + def add_value( + self, + secret_resource_name, # type: str + secret_value_resource_name, # type: str + name, # type: str + value=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.SecretValueResourceDescription"] + """Adds the specified value as a new version of the specified secret resource. + + Creates a new value of the specified secret resource. The name of the value is typically the + version identifier. Once created the value cannot be changed. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource value which is typically the + version identifier for the value. + :type secret_value_resource_name: str + :param name: Version identifier of the secret value. + :type name: str + :param value: The actual value of the secret. Default value is None. + :type value: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecretValueResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.SecretValueResourceDescription or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SecretValueResourceDescription"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _secret_value_resource_description = _models.SecretValueResourceDescription(name=name, value=value) + _json = self._serialize.body(_secret_value_resource_description, 'SecretValueResourceDescription') + + request = build_add_value_request( + secret_resource_name=secret_resource_name, + secret_value_resource_name=secret_value_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.add_value.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SecretValueResourceDescription', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SecretValueResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + add_value.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}"} # type: ignore + + + @distributed_trace + def get( + self, + secret_resource_name, # type: str + secret_value_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SecretValueResourceDescription" + """Gets the specified secret value resource. + + Get the information about the specified named secret value resources. The information does not + include the actual value of the secret. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource value which is typically the + version identifier for the value. + :type secret_value_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecretValueResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.SecretValueResourceDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretValueResourceDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_request( + secret_resource_name=secret_resource_name, + secret_value_resource_name=secret_value_resource_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecretValueResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}"} # type: ignore + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + secret_resource_name, # type: str + secret_value_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes the specified value of the named secret resource. + + Deletes the secret value resource identified by the name. The name of the resource is typically + the version associated with that value. Deletion will fail if the specified value is in use. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource value which is typically the + version identifier for the value. + :type secret_value_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_request( + secret_resource_name=secret_resource_name, + secret_value_resource_name=secret_value_resource_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}"} # type: ignore + + + @distributed_trace + def list( + self, + secret_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedSecretValueResourceDescriptionList" + """List names of all values of the specified secret resource. + + Gets information about all secret value resources of the specified secret resource. The + information includes the names of the secret value resources, but not the actual values. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedSecretValueResourceDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedSecretValueResourceDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedSecretValueResourceDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_list_request( + secret_resource_name=secret_resource_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedSecretValueResourceDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values"} # type: ignore + + + @distributed_trace + def show( + self, + secret_resource_name, # type: str + secret_value_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SecretValue" + """Lists the specified value of the secret resource. + + Lists the decrypted value of the specified named value of the secret resource. This is a + privileged operation. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource value which is typically the + version identifier for the value. + :type secret_value_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecretValue, or the result of cls(response) + :rtype: ~azure.servicefabric.models.SecretValue + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretValue"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_show_request( + secret_resource_name=secret_resource_name, + secret_value_resource_name=secret_value_resource_name, + api_version=api_version, + template_url=self.show.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecretValue', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + show.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}/list_value"} # type: ignore + diff --git a/customSDK/servicefabric/operations/_mesh_service_operations.py b/customSDK/servicefabric/operations/_mesh_service_operations.py new file mode 100644 index 00000000..ab991c0c --- /dev/null +++ b/customSDK/servicefabric/operations/_mesh_service_operations.py @@ -0,0 +1,239 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + application_resource_name, # type: str + service_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}") + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + "serviceResourceName": _SERIALIZER.url("service_resource_name", service_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_request( + application_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}/Services") + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class MeshServiceOperations(object): + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_service` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace + def get( + self, + application_resource_name, # type: str + service_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ServiceResourceDescription" + """Gets the Service resource with the given name. + + Gets the information about the Service resource with the given name. The information include + the description and other properties of the Service. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceResourceDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResourceDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_request( + application_resource_name=application_resource_name, + service_resource_name=service_resource_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}"} # type: ignore + + + @distributed_trace + def list( + self, + application_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedServiceResourceDescriptionList" + """Lists all the service resources. + + Gets the information about all services of an application resource. The information include the + description and other properties of the Service. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedServiceResourceDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedServiceResourceDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedServiceResourceDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_list_request( + application_resource_name=application_resource_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedServiceResourceDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services"} # type: ignore + diff --git a/customSDK/servicefabric/operations/_mesh_service_replica_operations.py b/customSDK/servicefabric/operations/_mesh_service_replica_operations.py new file mode 100644 index 00000000..ac8d85ee --- /dev/null +++ b/customSDK/servicefabric/operations/_mesh_service_replica_operations.py @@ -0,0 +1,251 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + application_resource_name, # type: str + service_resource_name, # type: str + replica_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}") # pylint: disable=line-too-long + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + "serviceResourceName": _SERIALIZER.url("service_resource_name", service_resource_name, 'str', skip_quote=True), + "replicaName": _SERIALIZER.url("replica_name", replica_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_request( + application_resource_name, # type: str + service_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas") # pylint: disable=line-too-long + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + "serviceResourceName": _SERIALIZER.url("service_resource_name", service_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class MeshServiceReplicaOperations(object): + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_service_replica` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace + def get( + self, + application_resource_name, # type: str + service_resource_name, # type: str + replica_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ServiceReplicaDescription" + """Gets the given replica of the service of an application. + + Gets the information about the service replica with the given name. The information include the + description and other properties of the service replica. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :param replica_name: Service Fabric replica name. + :type replica_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceReplicaDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceReplicaDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceReplicaDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_request( + application_resource_name=application_resource_name, + service_resource_name=service_resource_name, + replica_name=replica_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceReplicaDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}"} # type: ignore + + + @distributed_trace + def list( + self, + application_resource_name, # type: str + service_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedServiceReplicaDescriptionList" + """Lists all the replicas of a service. + + Gets the information about all replicas of a service. The information include the description + and other properties of the service replica. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedServiceReplicaDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedServiceReplicaDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedServiceReplicaDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_list_request( + application_resource_name=application_resource_name, + service_resource_name=service_resource_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedServiceReplicaDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas"} # type: ignore + diff --git a/customSDK/servicefabric/operations/_mesh_volume_operations.py b/customSDK/servicefabric/operations/_mesh_volume_operations.py new file mode 100644 index 00000000..2a52d1ba --- /dev/null +++ b/customSDK/servicefabric/operations/_mesh_volume_operations.py @@ -0,0 +1,416 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_create_or_update_request( + volume_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Volumes/{volumeResourceName}") + path_format_arguments = { + "volumeResourceName": _SERIALIZER.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + volume_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Volumes/{volumeResourceName}") + path_format_arguments = { + "volumeResourceName": _SERIALIZER.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_request( + volume_resource_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Volumes/{volumeResourceName}") + path_format_arguments = { + "volumeResourceName": _SERIALIZER.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Resources/Volumes") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class MeshVolumeOperations(object): + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_volume` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + args = list(args) + self._client = args.pop(0) if args else kwargs.pop("client") + self._config = args.pop(0) if args else kwargs.pop("config") + self._serialize = args.pop(0) if args else kwargs.pop("serializer") + self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") + + + @distributed_trace + def create_or_update( + self, + volume_resource_name, # type: str + volume_resource_description, # type: "_models.VolumeResourceDescription" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.VolumeResourceDescription"] + """Creates or updates a Volume resource. + + Creates a Volume resource with the specified name, description and properties. If Volume + resource with the same name exists, then it is updated with the specified description and + properties. + + :param volume_resource_name: The identity of the volume. + :type volume_resource_name: str + :param volume_resource_description: Description for creating a Volume resource. + :type volume_resource_description: ~azure.servicefabric.models.VolumeResourceDescription + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VolumeResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.VolumeResourceDescription or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VolumeResourceDescription"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(volume_resource_description, 'VolumeResourceDescription') + + request = build_create_or_update_request( + volume_resource_name=volume_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VolumeResourceDescription', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VolumeResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/Resources/Volumes/{volumeResourceName}"} # type: ignore + + + @distributed_trace + def get( + self, + volume_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VolumeResourceDescription" + """Gets the Volume resource with the given name. + + Gets the information about the Volume resource with the given name. The information include the + description and other properties of the Volume. + + :param volume_resource_name: The identity of the volume. + :type volume_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VolumeResourceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.VolumeResourceDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VolumeResourceDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_request( + volume_resource_name=volume_resource_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VolumeResourceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/Resources/Volumes/{volumeResourceName}"} # type: ignore + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + volume_resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes the Volume resource. + + Deletes the Volume resource identified by the name. + + :param volume_resource_name: The identity of the volume. + :type volume_resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_request( + volume_resource_name=volume_resource_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/Resources/Volumes/{volumeResourceName}"} # type: ignore + + + @distributed_trace + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedVolumeResourceDescriptionList" + """Lists all the volume resources. + + Gets the information about all volume resources in a given resource group. The information + include the description and other properties of the Volume. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedVolumeResourceDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedVolumeResourceDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedVolumeResourceDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedVolumeResourceDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/Resources/Volumes"} # type: ignore + diff --git a/customSDK/servicefabric/operations/_service_fabric_client_apis_operations.py b/customSDK/servicefabric/operations/_service_fabric_client_apis_operations.py new file mode 100644 index 00000000..16a6bd05 --- /dev/null +++ b/customSDK/servicefabric/operations/_service_fabric_client_apis_operations.py @@ -0,0 +1,25421 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, List, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_cluster_manifest_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/GetClusterManifest") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_cluster_health_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + nodes_health_state_filter = kwargs.pop('nodes_health_state_filter', 0) # type: Optional[int] + applications_health_state_filter = kwargs.pop('applications_health_state_filter', 0) # type: Optional[int] + events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] + exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] + include_system_application_health_statistics = kwargs.pop('include_system_application_health_statistics', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/GetClusterHealth") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if nodes_health_state_filter is not None: + _query_parameters['NodesHealthStateFilter'] = _SERIALIZER.query("nodes_health_state_filter", nodes_health_state_filter, 'int') + if applications_health_state_filter is not None: + _query_parameters['ApplicationsHealthStateFilter'] = _SERIALIZER.query("applications_health_state_filter", applications_health_state_filter, 'int') + if events_health_state_filter is not None: + _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if exclude_health_statistics is not None: + _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if include_system_application_health_statistics is not None: + _query_parameters['IncludeSystemApplicationHealthStatistics'] = _SERIALIZER.query("include_system_application_health_statistics", include_system_application_health_statistics, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_cluster_health_using_policy_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + nodes_health_state_filter = kwargs.pop('nodes_health_state_filter', 0) # type: Optional[int] + applications_health_state_filter = kwargs.pop('applications_health_state_filter', 0) # type: Optional[int] + events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] + exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] + include_system_application_health_statistics = kwargs.pop('include_system_application_health_statistics', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/GetClusterHealth") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if nodes_health_state_filter is not None: + _query_parameters['NodesHealthStateFilter'] = _SERIALIZER.query("nodes_health_state_filter", nodes_health_state_filter, 'int') + if applications_health_state_filter is not None: + _query_parameters['ApplicationsHealthStateFilter'] = _SERIALIZER.query("applications_health_state_filter", applications_health_state_filter, 'int') + if events_health_state_filter is not None: + _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if exclude_health_statistics is not None: + _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if include_system_application_health_statistics is not None: + _query_parameters['IncludeSystemApplicationHealthStatistics'] = _SERIALIZER.query("include_system_application_health_statistics", include_system_application_health_statistics, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_cluster_health_chunk_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/GetClusterHealthChunk") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_cluster_health_chunk_using_policy_and_advanced_filters_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/GetClusterHealthChunk") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_report_cluster_health_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + immediate = kwargs.pop('immediate', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/ReportClusterHealth") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if immediate is not None: + _query_parameters['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_provisioned_fabric_code_version_info_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + code_version = kwargs.pop('code_version', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/GetProvisionedCodeVersions") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if code_version is not None: + _query_parameters['CodeVersion'] = _SERIALIZER.query("code_version", code_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_provisioned_fabric_config_version_info_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + config_version = kwargs.pop('config_version', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/GetProvisionedConfigVersions") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if config_version is not None: + _query_parameters['ConfigVersion'] = _SERIALIZER.query("config_version", config_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_cluster_upgrade_progress_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/GetUpgradeProgress") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_cluster_configuration_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + configuration_api_version = kwargs.pop('configuration_api_version') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/GetClusterConfiguration") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['ConfigurationApiVersion'] = _SERIALIZER.query("configuration_api_version", configuration_api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_cluster_configuration_upgrade_status_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/GetClusterConfigurationUpgradeStatus") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_upgrade_orchestration_service_state_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/GetUpgradeOrchestrationServiceState") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_set_upgrade_orchestration_service_state_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/SetUpgradeOrchestrationServiceState") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_provision_cluster_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/Provision") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_unprovision_cluster_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/Unprovision") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_rollback_cluster_upgrade_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/RollbackUpgrade") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_resume_cluster_upgrade_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/MoveToNextUpgradeDomain") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_start_cluster_upgrade_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/Upgrade") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_start_cluster_configuration_upgrade_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/StartClusterConfigurationUpgrade") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_update_cluster_upgrade_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/UpdateUpgrade") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_aad_metadata_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/GetAadMetadata") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_cluster_version_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/GetClusterVersion") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_cluster_load_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/GetLoadInformation") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_toggle_verbose_service_placement_health_reporting_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + enabled = kwargs.pop('enabled') # type: bool + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/ToggleVerboseServicePlacementHealthReporting") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['Enabled'] = _SERIALIZER.query("enabled", enabled, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_validate_cluster_upgrade_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/ValidateUpgrade") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_node_info_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + node_status_filter = kwargs.pop('node_status_filter', "default") # type: Optional[Union[str, "_models.NodeStatusFilter"]] + max_results = kwargs.pop('max_results', 0) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if node_status_filter is not None: + _query_parameters['NodeStatusFilter'] = _SERIALIZER.query("node_status_filter", node_status_filter, 'str') + if max_results is not None: + _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_node_info_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_node_health_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetHealth") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_node_health_using_policy_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetHealth") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_report_node_health_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + immediate = kwargs.pop('immediate', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/ReportHealth") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if immediate is not None: + _query_parameters['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_node_load_info_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetLoadInformation") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_disable_node_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/Deactivate") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_enable_node_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/Activate") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_remove_node_state_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/RemoveNodeState") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_restart_node_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/Restart") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_remove_configuration_overrides_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/RemoveConfigurationOverrides") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_configuration_overrides_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetConfigurationOverrides") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_add_configuration_parameter_overrides_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + force = kwargs.pop('force', None) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/AddConfigurationParameterOverrides") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if force is not None: + _query_parameters['Force'] = _SERIALIZER.query("force", force, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_remove_node_tags_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/RemoveNodeTags") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_add_node_tags_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/AddNodeTags") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_application_type_info_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + application_type_definition_kind_filter = kwargs.pop('application_type_definition_kind_filter', 0) # type: Optional[int] + exclude_application_parameters = kwargs.pop('exclude_application_parameters', False) # type: Optional[bool] + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + max_results = kwargs.pop('max_results', 0) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ApplicationTypes") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if application_type_definition_kind_filter is not None: + _query_parameters['ApplicationTypeDefinitionKindFilter'] = _SERIALIZER.query("application_type_definition_kind_filter", application_type_definition_kind_filter, 'int') + if exclude_application_parameters is not None: + _query_parameters['ExcludeApplicationParameters'] = _SERIALIZER.query("exclude_application_parameters", exclude_application_parameters, 'bool') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_application_type_info_list_by_name_request( + application_type_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + application_type_version = kwargs.pop('application_type_version', None) # type: Optional[str] + exclude_application_parameters = kwargs.pop('exclude_application_parameters', False) # type: Optional[bool] + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + max_results = kwargs.pop('max_results', 0) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ApplicationTypes/{applicationTypeName}") + path_format_arguments = { + "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if application_type_version is not None: + _query_parameters['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') + if exclude_application_parameters is not None: + _query_parameters['ExcludeApplicationParameters'] = _SERIALIZER.query("exclude_application_parameters", exclude_application_parameters, 'bool') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_provision_application_type_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ApplicationTypes/$/Provision") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_unprovision_application_type_request( + application_type_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ApplicationTypes/{applicationTypeName}/$/Unprovision") + path_format_arguments = { + "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_update_application_type_arm_metadata_request( + application_type_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + application_type_version = kwargs.pop('application_type_version') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + force = kwargs.pop('force', None) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ApplicationTypes/{applicationTypeName}/$/UpdateArmMetadata") + path_format_arguments = { + "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if force is not None: + _query_parameters['Force'] = _SERIALIZER.query("force", force, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_service_type_info_list_request( + application_type_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + application_type_version = kwargs.pop('application_type_version') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes") + path_format_arguments = { + "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_service_type_info_by_name_request( + application_type_name, # type: str + service_type_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + application_type_version = kwargs.pop('application_type_version') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes/{serviceTypeName}") + path_format_arguments = { + "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), + "serviceTypeName": _SERIALIZER.url("service_type_name", service_type_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_service_manifest_request( + application_type_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + application_type_version = kwargs.pop('application_type_version') # type: str + service_manifest_name = kwargs.pop('service_manifest_name') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ApplicationTypes/{applicationTypeName}/$/GetServiceManifest") + path_format_arguments = { + "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') + _query_parameters['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_deployed_service_type_info_list_request( + node_name, # type: str + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + service_manifest_name = kwargs.pop('service_manifest_name', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if service_manifest_name is not None: + _query_parameters['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_deployed_service_type_info_by_name_request( + node_name, # type: str + application_id, # type: str + service_type_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + service_manifest_name = kwargs.pop('service_manifest_name', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes/{serviceTypeName}") # pylint: disable=line-too-long + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + "serviceTypeName": _SERIALIZER.url("service_type_name", service_type_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if service_manifest_name is not None: + _query_parameters['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_application_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/$/Create") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_application_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + force_remove = kwargs.pop('force_remove', None) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/Delete") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if force_remove is not None: + _query_parameters['ForceRemove'] = _SERIALIZER.query("force_remove", force_remove, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_application_load_info_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetLoadInformation") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_application_info_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + application_definition_kind_filter = kwargs.pop('application_definition_kind_filter', 0) # type: Optional[int] + application_type_name = kwargs.pop('application_type_name', None) # type: Optional[str] + exclude_application_parameters = kwargs.pop('exclude_application_parameters', False) # type: Optional[bool] + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + max_results = kwargs.pop('max_results', 0) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if application_definition_kind_filter is not None: + _query_parameters['ApplicationDefinitionKindFilter'] = _SERIALIZER.query("application_definition_kind_filter", application_definition_kind_filter, 'int') + if application_type_name is not None: + _query_parameters['ApplicationTypeName'] = _SERIALIZER.query("application_type_name", application_type_name, 'str') + if exclude_application_parameters is not None: + _query_parameters['ExcludeApplicationParameters'] = _SERIALIZER.query("exclude_application_parameters", exclude_application_parameters, 'bool') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_application_info_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + exclude_application_parameters = kwargs.pop('exclude_application_parameters', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if exclude_application_parameters is not None: + _query_parameters['ExcludeApplicationParameters'] = _SERIALIZER.query("exclude_application_parameters", exclude_application_parameters, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_application_health_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] + deployed_applications_health_state_filter = kwargs.pop('deployed_applications_health_state_filter', 0) # type: Optional[int] + services_health_state_filter = kwargs.pop('services_health_state_filter', 0) # type: Optional[int] + exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetHealth") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if deployed_applications_health_state_filter is not None: + _query_parameters['DeployedApplicationsHealthStateFilter'] = _SERIALIZER.query("deployed_applications_health_state_filter", deployed_applications_health_state_filter, 'int') + if services_health_state_filter is not None: + _query_parameters['ServicesHealthStateFilter'] = _SERIALIZER.query("services_health_state_filter", services_health_state_filter, 'int') + if exclude_health_statistics is not None: + _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_application_health_using_policy_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] + deployed_applications_health_state_filter = kwargs.pop('deployed_applications_health_state_filter', 0) # type: Optional[int] + services_health_state_filter = kwargs.pop('services_health_state_filter', 0) # type: Optional[int] + exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetHealth") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if deployed_applications_health_state_filter is not None: + _query_parameters['DeployedApplicationsHealthStateFilter'] = _SERIALIZER.query("deployed_applications_health_state_filter", deployed_applications_health_state_filter, 'int') + if services_health_state_filter is not None: + _query_parameters['ServicesHealthStateFilter'] = _SERIALIZER.query("services_health_state_filter", services_health_state_filter, 'int') + if exclude_health_statistics is not None: + _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_report_application_health_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + immediate = kwargs.pop('immediate', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/ReportHealth") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if immediate is not None: + _query_parameters['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_start_application_upgrade_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/Upgrade") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_application_upgrade_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetUpgradeProgress") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_update_application_upgrade_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/UpdateUpgrade") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_update_application_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/Update") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_resume_application_upgrade_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/MoveToNextUpgradeDomain") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_rollback_application_upgrade_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/RollbackUpgrade") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_deployed_application_info_list_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + include_health_state = kwargs.pop('include_health_state', False) # type: Optional[bool] + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + max_results = kwargs.pop('max_results', 0) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if include_health_state is not None: + _query_parameters['IncludeHealthState'] = _SERIALIZER.query("include_health_state", include_health_state, 'bool') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_deployed_application_info_request( + node_name, # type: str + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + include_health_state = kwargs.pop('include_health_state', False) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if include_health_state is not None: + _query_parameters['IncludeHealthState'] = _SERIALIZER.query("include_health_state", include_health_state, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_deployed_application_health_request( + node_name, # type: str + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] + deployed_service_packages_health_state_filter = kwargs.pop('deployed_service_packages_health_state_filter', 0) # type: Optional[int] + exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if deployed_service_packages_health_state_filter is not None: + _query_parameters['DeployedServicePackagesHealthStateFilter'] = _SERIALIZER.query("deployed_service_packages_health_state_filter", deployed_service_packages_health_state_filter, 'int') + if exclude_health_statistics is not None: + _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_deployed_application_health_using_policy_request( + node_name, # type: str + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] + deployed_service_packages_health_state_filter = kwargs.pop('deployed_service_packages_health_state_filter', 0) # type: Optional[int] + exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if deployed_service_packages_health_state_filter is not None: + _query_parameters['DeployedServicePackagesHealthStateFilter'] = _SERIALIZER.query("deployed_service_packages_health_state_filter", deployed_service_packages_health_state_filter, 'int') + if exclude_health_statistics is not None: + _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_report_deployed_application_health_request( + node_name, # type: str + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + immediate = kwargs.pop('immediate', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/ReportHealth") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if immediate is not None: + _query_parameters['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_application_manifest_request( + application_type_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + application_type_version = kwargs.pop('application_type_version') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ApplicationTypes/{applicationTypeName}/$/GetApplicationManifest") + path_format_arguments = { + "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_update_application_arm_metadata_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + force = kwargs.pop('force', None) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/UpdateArmMetadata") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if force is not None: + _query_parameters['Force'] = _SERIALIZER.query("force", force, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_service_info_list_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + service_type_name = kwargs.pop('service_type_name', None) # type: Optional[str] + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetServices") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if service_type_name is not None: + _query_parameters['ServiceTypeName'] = _SERIALIZER.query("service_type_name", service_type_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_service_info_request( + application_id, # type: str + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetServices/{serviceId}") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_application_name_info_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetApplicationName") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_service_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetServices/$/Create") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_service_from_template_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetServices/$/CreateFromTemplate") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_service_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + force_remove = kwargs.pop('force_remove', None) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/Delete") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if force_remove is not None: + _query_parameters['ForceRemove'] = _SERIALIZER.query("force_remove", force_remove, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_update_service_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/Update") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_service_description_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetDescription") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_service_health_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] + partitions_health_state_filter = kwargs.pop('partitions_health_state_filter', 0) # type: Optional[int] + exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetHealth") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if partitions_health_state_filter is not None: + _query_parameters['PartitionsHealthStateFilter'] = _SERIALIZER.query("partitions_health_state_filter", partitions_health_state_filter, 'int') + if exclude_health_statistics is not None: + _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_service_health_using_policy_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] + partitions_health_state_filter = kwargs.pop('partitions_health_state_filter', 0) # type: Optional[int] + exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetHealth") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if partitions_health_state_filter is not None: + _query_parameters['PartitionsHealthStateFilter'] = _SERIALIZER.query("partitions_health_state_filter", partitions_health_state_filter, 'int') + if exclude_health_statistics is not None: + _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_report_service_health_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + immediate = kwargs.pop('immediate', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/ReportHealth") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if immediate is not None: + _query_parameters['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_resolve_service_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + partition_key_type = kwargs.pop('partition_key_type', None) # type: Optional[int] + partition_key_value = kwargs.pop('partition_key_value', None) # type: Optional[str] + previous_rsp_version = kwargs.pop('previous_rsp_version', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/ResolvePartition") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if partition_key_type is not None: + _query_parameters['PartitionKeyType'] = _SERIALIZER.query("partition_key_type", partition_key_type, 'int') + if partition_key_value is not None: + _query_parameters['PartitionKeyValue'] = _SERIALIZER.query("partition_key_value", partition_key_value, 'str', skip_quote=True) + if previous_rsp_version is not None: + _query_parameters['PreviousRspVersion'] = _SERIALIZER.query("previous_rsp_version", previous_rsp_version, 'str', skip_quote=True) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_unplaced_replica_information_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + partition_id = kwargs.pop('partition_id', None) # type: Optional[str] + only_query_primaries = kwargs.pop('only_query_primaries', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetUnplacedReplicaInformation") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if partition_id is not None: + _query_parameters['PartitionId'] = _SERIALIZER.query("partition_id", partition_id, 'str') + if only_query_primaries is not None: + _query_parameters['OnlyQueryPrimaries'] = _SERIALIZER.query("only_query_primaries", only_query_primaries, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_loaded_partition_info_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + metric_name = kwargs.pop('metric_name') # type: str + service_name = kwargs.pop('service_name', None) # type: Optional[str] + ordering = kwargs.pop('ordering', None) # type: Optional[Union[str, "_models.Ordering"]] + max_results = kwargs.pop('max_results', 0) # type: Optional[int] + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/GetLoadedPartitionInfoList") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['MetricName'] = _SERIALIZER.query("metric_name", metric_name, 'str') + if service_name is not None: + _query_parameters['ServiceName'] = _SERIALIZER.query("service_name", service_name, 'str') + if ordering is not None: + _query_parameters['Ordering'] = _SERIALIZER.query("ordering", ordering, 'str') + if max_results is not None: + _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_partition_info_list_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetPartitions") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_partition_info_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_service_name_info_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetServiceName") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_partition_health_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] + replicas_health_state_filter = kwargs.pop('replicas_health_state_filter', 0) # type: Optional[int] + exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetHealth") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if replicas_health_state_filter is not None: + _query_parameters['ReplicasHealthStateFilter'] = _SERIALIZER.query("replicas_health_state_filter", replicas_health_state_filter, 'int') + if exclude_health_statistics is not None: + _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_partition_health_using_policy_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] + replicas_health_state_filter = kwargs.pop('replicas_health_state_filter', 0) # type: Optional[int] + exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetHealth") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if replicas_health_state_filter is not None: + _query_parameters['ReplicasHealthStateFilter'] = _SERIALIZER.query("replicas_health_state_filter", replicas_health_state_filter, 'int') + if exclude_health_statistics is not None: + _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_report_partition_health_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + immediate = kwargs.pop('immediate', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/ReportHealth") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if immediate is not None: + _query_parameters['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_partition_load_information_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetLoadInformation") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_reset_partition_load_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/ResetLoad") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_recover_partition_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/Recover") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_recover_service_partitions_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/$/{serviceId}/$/GetPartitions/$/Recover") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_recover_system_partitions_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/RecoverSystemPartitions") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_recover_all_partitions_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/RecoverAllPartitions") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_move_primary_replica_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + node_name = kwargs.pop('node_name', None) # type: Optional[str] + ignore_constraints = kwargs.pop('ignore_constraints', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/MovePrimaryReplica") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if node_name is not None: + _query_parameters['NodeName'] = _SERIALIZER.query("node_name", node_name, 'str') + if ignore_constraints is not None: + _query_parameters['IgnoreConstraints'] = _SERIALIZER.query("ignore_constraints", ignore_constraints, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_move_secondary_replica_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + current_node_name = kwargs.pop('current_node_name') # type: str + new_node_name = kwargs.pop('new_node_name', None) # type: Optional[str] + ignore_constraints = kwargs.pop('ignore_constraints', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/MoveSecondaryReplica") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['CurrentNodeName'] = _SERIALIZER.query("current_node_name", current_node_name, 'str') + if new_node_name is not None: + _query_parameters['NewNodeName'] = _SERIALIZER.query("new_node_name", new_node_name, 'str') + if ignore_constraints is not None: + _query_parameters['IgnoreConstraints'] = _SERIALIZER.query("ignore_constraints", ignore_constraints, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_update_partition_load_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + max_results = kwargs.pop('max_results', 0) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/UpdatePartitionLoad") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_move_instance_request( + service_id, # type: str + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + current_node_name = kwargs.pop('current_node_name', None) # type: Optional[str] + new_node_name = kwargs.pop('new_node_name', None) # type: Optional[str] + ignore_constraints = kwargs.pop('ignore_constraints', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveInstance") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if current_node_name is not None: + _query_parameters['CurrentNodeName'] = _SERIALIZER.query("current_node_name", current_node_name, 'str') + if new_node_name is not None: + _query_parameters['NewNodeName'] = _SERIALIZER.query("new_node_name", new_node_name, 'str') + if ignore_constraints is not None: + _query_parameters['IgnoreConstraints'] = _SERIALIZER.query("ignore_constraints", ignore_constraints, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_move_auxiliary_replica_request( + service_id, # type: str + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + current_node_name = kwargs.pop('current_node_name', None) # type: Optional[str] + new_node_name = kwargs.pop('new_node_name', None) # type: Optional[str] + ignore_constraints = kwargs.pop('ignore_constraints', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveAuxiliaryReplica") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if current_node_name is not None: + _query_parameters['CurrentNodeName'] = _SERIALIZER.query("current_node_name", current_node_name, 'str') + if new_node_name is not None: + _query_parameters['NewNodeName'] = _SERIALIZER.query("new_node_name", new_node_name, 'str') + if ignore_constraints is not None: + _query_parameters['IgnoreConstraints'] = _SERIALIZER.query("ignore_constraints", ignore_constraints, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_repair_task_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/CreateRepairTask") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_cancel_repair_task_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/CancelRepairTask") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_repair_task_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/DeleteRepairTask") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_repair_task_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + task_id_filter = kwargs.pop('task_id_filter', None) # type: Optional[str] + state_filter = kwargs.pop('state_filter', None) # type: Optional[int] + executor_filter = kwargs.pop('executor_filter', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/GetRepairTaskList") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if task_id_filter is not None: + _query_parameters['TaskIdFilter'] = _SERIALIZER.query("task_id_filter", task_id_filter, 'str') + if state_filter is not None: + _query_parameters['StateFilter'] = _SERIALIZER.query("state_filter", state_filter, 'int') + if executor_filter is not None: + _query_parameters['ExecutorFilter'] = _SERIALIZER.query("executor_filter", executor_filter, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_force_approve_repair_task_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/ForceApproveRepairTask") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_update_repair_task_health_policy_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/UpdateRepairTaskHealthPolicy") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_update_repair_execution_state_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/UpdateRepairExecutionState") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_replica_info_list_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetReplicas") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_replica_info_request( + partition_id, # type: str + replica_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetReplicas/{replicaId}") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_replica_health_request( + partition_id, # type: str + replica_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_replica_health_using_policy_request( + partition_id, # type: str + replica_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_report_replica_health_request( + partition_id, # type: str + replica_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + service_kind = kwargs.pop('service_kind', "Stateful") # type: Union[str, "_models.ReplicaHealthReportServiceKind"] + immediate = kwargs.pop('immediate', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/ReportHealth") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['ServiceKind'] = _SERIALIZER.query("service_kind", service_kind, 'str') + if immediate is not None: + _query_parameters['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_deployed_service_replica_info_list_request( + node_name, # type: str + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + partition_id = kwargs.pop('partition_id', None) # type: Optional[str] + service_manifest_name = kwargs.pop('service_manifest_name', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetReplicas") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if partition_id is not None: + _query_parameters['PartitionId'] = _SERIALIZER.query("partition_id", partition_id, 'str') + if service_manifest_name is not None: + _query_parameters['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_deployed_service_replica_detail_info_request( + node_name, # type: str + partition_id, # type: str + replica_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetDetail") # pylint: disable=line-too-long + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_deployed_service_replica_detail_info_by_partition_id_request( + node_name, # type: str + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_restart_replica_request( + node_name, # type: str + partition_id, # type: str + replica_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Restart") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_remove_replica_request( + node_name, # type: str + partition_id, # type: str + replica_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + force_remove = kwargs.pop('force_remove', None) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Delete") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if force_remove is not None: + _query_parameters['ForceRemove'] = _SERIALIZER.query("force_remove", force_remove, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_deployed_service_package_info_list_request( + node_name, # type: str + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_deployed_service_package_info_list_by_name_request( + node_name, # type: str + application_id, # type: str + service_package_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}") # pylint: disable=line-too-long + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + "servicePackageName": _SERIALIZER.url("service_package_name", service_package_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_deployed_service_package_health_request( + node_name, # type: str + application_id, # type: str + service_package_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth") # pylint: disable=line-too-long + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + "servicePackageName": _SERIALIZER.url("service_package_name", service_package_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_deployed_service_package_health_using_policy_request( + node_name, # type: str + application_id, # type: str + service_package_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth") # pylint: disable=line-too-long + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + "servicePackageName": _SERIALIZER.url("service_package_name", service_package_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_report_deployed_service_package_health_request( + node_name, # type: str + application_id, # type: str + service_package_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + immediate = kwargs.pop('immediate', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/ReportHealth") # pylint: disable=line-too-long + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + "servicePackageName": _SERIALIZER.url("service_package_name", service_package_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if immediate is not None: + _query_parameters['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_deploy_service_package_to_node_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/DeployServicePackage") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_deployed_code_package_info_list_request( + node_name, # type: str + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + service_manifest_name = kwargs.pop('service_manifest_name', None) # type: Optional[str] + code_package_name = kwargs.pop('code_package_name', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if service_manifest_name is not None: + _query_parameters['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') + if code_package_name is not None: + _query_parameters['CodePackageName'] = _SERIALIZER.query("code_package_name", code_package_name, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_restart_deployed_code_package_request( + node_name, # type: str + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/Restart") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_container_logs_deployed_on_node_request( + node_name, # type: str + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + service_manifest_name = kwargs.pop('service_manifest_name') # type: str + code_package_name = kwargs.pop('code_package_name') # type: str + tail = kwargs.pop('tail', None) # type: Optional[str] + previous = kwargs.pop('previous', False) # type: Optional[bool] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerLogs") # pylint: disable=line-too-long + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') + _query_parameters['CodePackageName'] = _SERIALIZER.query("code_package_name", code_package_name, 'str') + if tail is not None: + _query_parameters['Tail'] = _SERIALIZER.query("tail", tail, 'str') + if previous is not None: + _query_parameters['Previous'] = _SERIALIZER.query("previous", previous, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_invoke_container_api_request( + node_name, # type: str + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + service_manifest_name = kwargs.pop('service_manifest_name') # type: str + code_package_name = kwargs.pop('code_package_name') # type: str + code_package_instance_id = kwargs.pop('code_package_instance_id') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerApi") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') + _query_parameters['CodePackageName'] = _SERIALIZER.query("code_package_name", code_package_name, 'str') + _query_parameters['CodePackageInstanceId'] = _SERIALIZER.query("code_package_instance_id", code_package_instance_id, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_compose_deployment_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ComposeDeployments/$/Create") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_compose_deployment_status_request( + deployment_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ComposeDeployments/{deploymentName}") + path_format_arguments = { + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_compose_deployment_status_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + max_results = kwargs.pop('max_results', 0) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ComposeDeployments") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_compose_deployment_upgrade_progress_request( + deployment_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ComposeDeployments/{deploymentName}/$/GetUpgradeProgress") + path_format_arguments = { + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_remove_compose_deployment_request( + deployment_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ComposeDeployments/{deploymentName}/$/Delete") + path_format_arguments = { + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_start_compose_deployment_upgrade_request( + deployment_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ComposeDeployments/{deploymentName}/$/Upgrade") + path_format_arguments = { + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_start_rollback_compose_deployment_upgrade_request( + deployment_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ComposeDeployments/{deploymentName}/$/RollbackUpgrade") + path_format_arguments = { + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_chaos_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Tools/Chaos") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_start_chaos_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Tools/Chaos/$/Start") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_stop_chaos_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Tools/Chaos/$/Stop") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_chaos_events_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + start_time_utc = kwargs.pop('start_time_utc', None) # type: Optional[str] + end_time_utc = kwargs.pop('end_time_utc', None) # type: Optional[str] + max_results = kwargs.pop('max_results', 0) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Tools/Chaos/Events") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if start_time_utc is not None: + _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + if end_time_utc is not None: + _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if max_results is not None: + _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_chaos_schedule_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Tools/Chaos/Schedule") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_post_chaos_schedule_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Tools/Chaos/Schedule") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_upload_file_request( + content_path, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ImageStore/{contentPath}") + path_format_arguments = { + "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_image_store_content_request( + content_path, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ImageStore/{contentPath}") + path_format_arguments = { + "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_image_store_content_request( + content_path, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ImageStore/{contentPath}") + path_format_arguments = { + "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_image_store_root_content_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ImageStore") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_copy_image_store_content_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ImageStore/$/Copy") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_image_store_upload_session_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + session_id = kwargs.pop('session_id') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ImageStore/$/DeleteUploadSession") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['session-id'] = _SERIALIZER.query("session_id", session_id, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_commit_image_store_upload_session_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + session_id = kwargs.pop('session_id') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ImageStore/$/CommitUploadSession") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['session-id'] = _SERIALIZER.query("session_id", session_id, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_image_store_upload_session_by_id_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + session_id = kwargs.pop('session_id') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ImageStore/$/GetUploadSession") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['session-id'] = _SERIALIZER.query("session_id", session_id, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_image_store_upload_session_by_path_request( + content_path, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ImageStore/{contentPath}/$/GetUploadSession") + path_format_arguments = { + "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_upload_file_chunk_request( + content_path, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + session_id = kwargs.pop('session_id') # type: str + content_range = kwargs.pop('content_range') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ImageStore/{contentPath}/$/UploadChunk") + path_format_arguments = { + "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['session-id'] = _SERIALIZER.query("session_id", session_id, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Content-Range'] = _SERIALIZER.header("content_range", content_range, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_image_store_root_folder_size_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ImageStore/$/FolderSize") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_image_store_folder_size_request( + content_path, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ImageStore/{contentPath}/$/FolderSize") + path_format_arguments = { + "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_image_store_info_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/ImageStore/$/Info") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_invoke_infrastructure_command_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + command = kwargs.pop('command') # type: str + service_id = kwargs.pop('service_id', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/InvokeInfrastructureCommand") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['Command'] = _SERIALIZER.query("command", command, 'str') + if service_id is not None: + _query_parameters['ServiceId'] = _SERIALIZER.query("service_id", service_id, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_invoke_infrastructure_query_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + command = kwargs.pop('command') # type: str + service_id = kwargs.pop('service_id', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/$/InvokeInfrastructureQuery") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['Command'] = _SERIALIZER.query("command", command, 'str') + if service_id is not None: + _query_parameters['ServiceId'] = _SERIALIZER.query("service_id", service_id, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_start_data_loss_request( + service_id, # type: str + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + operation_id = kwargs.pop('operation_id') # type: str + data_loss_mode = kwargs.pop('data_loss_mode') # type: Union[str, "_models.DataLossMode"] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartDataLoss") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + _query_parameters['DataLossMode'] = _SERIALIZER.query("data_loss_mode", data_loss_mode, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_data_loss_progress_request( + service_id, # type: str + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + operation_id = kwargs.pop('operation_id') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetDataLossProgress") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_start_quorum_loss_request( + service_id, # type: str + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + operation_id = kwargs.pop('operation_id') # type: str + quorum_loss_mode = kwargs.pop('quorum_loss_mode') # type: Union[str, "_models.QuorumLossMode"] + quorum_loss_duration = kwargs.pop('quorum_loss_duration') # type: int + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartQuorumLoss") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + _query_parameters['QuorumLossMode'] = _SERIALIZER.query("quorum_loss_mode", quorum_loss_mode, 'str') + _query_parameters['QuorumLossDuration'] = _SERIALIZER.query("quorum_loss_duration", quorum_loss_duration, 'int') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_quorum_loss_progress_request( + service_id, # type: str + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + operation_id = kwargs.pop('operation_id') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetQuorumLossProgress") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_start_partition_restart_request( + service_id, # type: str + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + operation_id = kwargs.pop('operation_id') # type: str + restart_partition_mode = kwargs.pop('restart_partition_mode') # type: Union[str, "_models.RestartPartitionMode"] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartRestart") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + _query_parameters['RestartPartitionMode'] = _SERIALIZER.query("restart_partition_mode", restart_partition_mode, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_partition_restart_progress_request( + service_id, # type: str + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + operation_id = kwargs.pop('operation_id') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetRestartProgress") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_start_node_transition_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + operation_id = kwargs.pop('operation_id') # type: str + node_transition_type = kwargs.pop('node_transition_type') # type: Union[str, "_models.NodeTransitionType"] + node_instance_id = kwargs.pop('node_instance_id') # type: str + stop_duration_in_seconds = kwargs.pop('stop_duration_in_seconds') # type: int + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Faults/Nodes/{nodeName}/$/StartTransition/") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + _query_parameters['NodeTransitionType'] = _SERIALIZER.query("node_transition_type", node_transition_type, 'str') + _query_parameters['NodeInstanceId'] = _SERIALIZER.query("node_instance_id", node_instance_id, 'str') + _query_parameters['StopDurationInSeconds'] = _SERIALIZER.query("stop_duration_in_seconds", stop_duration_in_seconds, 'int', minimum=0) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_node_transition_progress_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + operation_id = kwargs.pop('operation_id') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Faults/Nodes/{nodeName}/$/GetTransitionProgress") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_fault_operation_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + type_filter = kwargs.pop('type_filter', 65535) # type: int + state_filter = kwargs.pop('state_filter', 65535) # type: int + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Faults/") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['TypeFilter'] = _SERIALIZER.query("type_filter", type_filter, 'int') + _query_parameters['StateFilter'] = _SERIALIZER.query("state_filter", state_filter, 'int') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_cancel_operation_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + operation_id = kwargs.pop('operation_id') # type: str + force = kwargs.pop('force', False) # type: bool + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Faults/$/Cancel") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + _query_parameters['Force'] = _SERIALIZER.query("force", force, 'bool') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_backup_policy_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + validate_connection = kwargs.pop('validate_connection', False) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/BackupRestore/BackupPolicies/$/Create") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if validate_connection is not None: + _query_parameters['ValidateConnection'] = _SERIALIZER.query("validate_connection", validate_connection, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_backup_policy_request( + backup_policy_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/BackupRestore/BackupPolicies/{backupPolicyName}/$/Delete") + path_format_arguments = { + "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_backup_policy_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + max_results = kwargs.pop('max_results', 0) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/BackupRestore/BackupPolicies") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_backup_policy_by_name_request( + backup_policy_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/BackupRestore/BackupPolicies/{backupPolicyName}") + path_format_arguments = { + "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_all_entities_backed_up_by_policy_request( + backup_policy_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + max_results = kwargs.pop('max_results', 0) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/BackupRestore/BackupPolicies/{backupPolicyName}/$/GetBackupEnabledEntities") + path_format_arguments = { + "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_update_backup_policy_request( + backup_policy_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + validate_connection = kwargs.pop('validate_connection', False) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/BackupRestore/BackupPolicies/{backupPolicyName}/$/Update") + path_format_arguments = { + "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if validate_connection is not None: + _query_parameters['ValidateConnection'] = _SERIALIZER.query("validate_connection", validate_connection, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_enable_application_backup_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/EnableBackup") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_disable_application_backup_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/DisableBackup") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_application_backup_configuration_info_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + max_results = kwargs.pop('max_results', 0) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetBackupConfigurationInfo") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_application_backup_list_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + latest = kwargs.pop('latest', False) # type: Optional[bool] + start_date_time_filter = kwargs.pop('start_date_time_filter', None) # type: Optional[datetime.datetime] + end_date_time_filter = kwargs.pop('end_date_time_filter', None) # type: Optional[datetime.datetime] + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + max_results = kwargs.pop('max_results', 0) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetBackups") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if latest is not None: + _query_parameters['Latest'] = _SERIALIZER.query("latest", latest, 'bool') + if start_date_time_filter is not None: + _query_parameters['StartDateTimeFilter'] = _SERIALIZER.query("start_date_time_filter", start_date_time_filter, 'iso-8601') + if end_date_time_filter is not None: + _query_parameters['EndDateTimeFilter'] = _SERIALIZER.query("end_date_time_filter", end_date_time_filter, 'iso-8601') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_suspend_application_backup_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/SuspendBackup") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_resume_application_backup_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/ResumeBackup") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_enable_service_backup_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/EnableBackup") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_disable_service_backup_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/DisableBackup") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_service_backup_configuration_info_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + max_results = kwargs.pop('max_results', 0) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetBackupConfigurationInfo") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_service_backup_list_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + latest = kwargs.pop('latest', False) # type: Optional[bool] + start_date_time_filter = kwargs.pop('start_date_time_filter', None) # type: Optional[datetime.datetime] + end_date_time_filter = kwargs.pop('end_date_time_filter', None) # type: Optional[datetime.datetime] + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + max_results = kwargs.pop('max_results', 0) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetBackups") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if latest is not None: + _query_parameters['Latest'] = _SERIALIZER.query("latest", latest, 'bool') + if start_date_time_filter is not None: + _query_parameters['StartDateTimeFilter'] = _SERIALIZER.query("start_date_time_filter", start_date_time_filter, 'iso-8601') + if end_date_time_filter is not None: + _query_parameters['EndDateTimeFilter'] = _SERIALIZER.query("end_date_time_filter", end_date_time_filter, 'iso-8601') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_suspend_service_backup_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/SuspendBackup") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_resume_service_backup_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Services/{serviceId}/$/ResumeBackup") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_enable_partition_backup_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/EnableBackup") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_disable_partition_backup_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/DisableBackup") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_partition_backup_configuration_info_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetBackupConfigurationInfo") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_partition_backup_list_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + latest = kwargs.pop('latest', False) # type: Optional[bool] + start_date_time_filter = kwargs.pop('start_date_time_filter', None) # type: Optional[datetime.datetime] + end_date_time_filter = kwargs.pop('end_date_time_filter', None) # type: Optional[datetime.datetime] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetBackups") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if latest is not None: + _query_parameters['Latest'] = _SERIALIZER.query("latest", latest, 'bool') + if start_date_time_filter is not None: + _query_parameters['StartDateTimeFilter'] = _SERIALIZER.query("start_date_time_filter", start_date_time_filter, 'iso-8601') + if end_date_time_filter is not None: + _query_parameters['EndDateTimeFilter'] = _SERIALIZER.query("end_date_time_filter", end_date_time_filter, 'iso-8601') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_suspend_partition_backup_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/SuspendBackup") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_resume_partition_backup_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/ResumeBackup") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_backup_partition_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + backup_timeout = kwargs.pop('backup_timeout', 10) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/Backup") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if backup_timeout is not None: + _query_parameters['BackupTimeout'] = _SERIALIZER.query("backup_timeout", backup_timeout, 'int') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_partition_backup_progress_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetBackupProgress") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_restore_partition_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + restore_timeout = kwargs.pop('restore_timeout', 10) # type: Optional[int] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/Restore") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if restore_timeout is not None: + _query_parameters['RestoreTimeout'] = _SERIALIZER.query("restore_timeout", restore_timeout, 'int') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_partition_restore_progress_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetRestoreProgress") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_backups_from_backup_location_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + max_results = kwargs.pop('max_results', 0) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/BackupRestore/$/GetBackups") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_name_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Names/$/Create") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_name_exists_info_request( + name_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Names/{nameId}") + path_format_arguments = { + "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_name_request( + name_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Names/{nameId}") + path_format_arguments = { + "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_sub_name_info_list_request( + name_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + recursive = kwargs.pop('recursive', False) # type: Optional[bool] + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Names/{nameId}/$/GetSubNames") + path_format_arguments = { + "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if recursive is not None: + _query_parameters['Recursive'] = _SERIALIZER.query("recursive", recursive, 'bool') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_property_info_list_request( + name_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + include_values = kwargs.pop('include_values', False) # type: Optional[bool] + continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Names/{nameId}/$/GetProperties") + path_format_arguments = { + "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if include_values is not None: + _query_parameters['IncludeValues'] = _SERIALIZER.query("include_values", include_values, 'bool') + if continuation_token_parameter is not None: + _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_put_property_request( + name_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Names/{nameId}/$/GetProperty") + path_format_arguments = { + "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_property_info_request( + name_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + property_name = kwargs.pop('property_name') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Names/{nameId}/$/GetProperty") + path_format_arguments = { + "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['PropertyName'] = _SERIALIZER.query("property_name", property_name, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_property_request( + name_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + property_name = kwargs.pop('property_name') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Names/{nameId}/$/GetProperty") + path_format_arguments = { + "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['PropertyName'] = _SERIALIZER.query("property_name", property_name, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_submit_property_batch_request( + name_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/Names/{nameId}/$/GetProperties/$/SubmitBatch") + path_format_arguments = { + "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_cluster_event_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + start_time_utc = kwargs.pop('start_time_utc') # type: str + end_time_utc = kwargs.pop('end_time_utc') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] + exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] + skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/EventsStore/Cluster/Events") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_containers_event_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + start_time_utc = kwargs.pop('start_time_utc') # type: str + end_time_utc = kwargs.pop('end_time_utc') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] + exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] + skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/EventsStore/Containers/Events") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_node_event_list_request( + node_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + start_time_utc = kwargs.pop('start_time_utc') # type: str + end_time_utc = kwargs.pop('end_time_utc') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] + exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] + skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/EventsStore/Nodes/{nodeName}/$/Events") + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_nodes_event_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + start_time_utc = kwargs.pop('start_time_utc') # type: str + end_time_utc = kwargs.pop('end_time_utc') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] + exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] + skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/EventsStore/Nodes/Events") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_application_event_list_request( + application_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + start_time_utc = kwargs.pop('start_time_utc') # type: str + end_time_utc = kwargs.pop('end_time_utc') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] + exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] + skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/EventsStore/Applications/{applicationId}/$/Events") + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_applications_event_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + start_time_utc = kwargs.pop('start_time_utc') # type: str + end_time_utc = kwargs.pop('end_time_utc') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] + exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] + skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/EventsStore/Applications/Events") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_service_event_list_request( + service_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + start_time_utc = kwargs.pop('start_time_utc') # type: str + end_time_utc = kwargs.pop('end_time_utc') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] + exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] + skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/EventsStore/Services/{serviceId}/$/Events") + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_services_event_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + start_time_utc = kwargs.pop('start_time_utc') # type: str + end_time_utc = kwargs.pop('end_time_utc') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] + exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] + skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/EventsStore/Services/Events") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_partition_event_list_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + start_time_utc = kwargs.pop('start_time_utc') # type: str + end_time_utc = kwargs.pop('end_time_utc') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] + exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] + skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/EventsStore/Partitions/{partitionId}/$/Events") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_partitions_event_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + start_time_utc = kwargs.pop('start_time_utc') # type: str + end_time_utc = kwargs.pop('end_time_utc') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] + exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] + skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/EventsStore/Partitions/Events") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_partition_replica_event_list_request( + partition_id, # type: str + replica_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + start_time_utc = kwargs.pop('start_time_utc') # type: str + end_time_utc = kwargs.pop('end_time_utc') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] + exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] + skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/EventsStore/Partitions/{partitionId}/$/Replicas/{replicaId}/$/Events") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_partition_replicas_event_list_request( + partition_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + start_time_utc = kwargs.pop('start_time_utc') # type: str + end_time_utc = kwargs.pop('end_time_utc') # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] + exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] + skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/EventsStore/Partitions/{partitionId}/$/Replicas/Events") + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_correlated_event_list_request( + event_instance_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + timeout = kwargs.pop('timeout', 60) # type: Optional[int] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events") + path_format_arguments = { + "eventInstanceId": _SERIALIZER.url("event_instance_id", event_instance_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +# fmt: on +class ServiceFabricClientAPIsOperationsMixin(object): # pylint: disable=too-many-public-methods + + @distributed_trace + def get_cluster_manifest( + self, + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ClusterManifest" + """Get the Service Fabric cluster manifest. + + Get the Service Fabric cluster manifest. The cluster manifest contains properties of the + cluster that include different node types on the cluster, + security configurations, fault, and upgrade domain topologies, etc. + + These properties are specified as part of the ClusterConfig.JSON file while deploying a + stand-alone cluster. However, most of the information in the cluster manifest + is generated internally by service fabric during cluster deployment in other deployment + scenarios (e.g. when using Azure portal). + + The contents of the cluster manifest are for informational purposes only and users are not + expected to take a dependency on the format of the file contents or its interpretation. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterManifest, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterManifest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterManifest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_manifest_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_cluster_manifest.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterManifest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_manifest.metadata = {'url': "/$/GetClusterManifest"} # type: ignore + + + @distributed_trace + def get_cluster_health( + self, + nodes_health_state_filter=0, # type: Optional[int] + applications_health_state_filter=0, # type: Optional[int] + events_health_state_filter=0, # type: Optional[int] + exclude_health_statistics=False, # type: Optional[bool] + include_system_application_health_statistics=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ClusterHealth" + """Gets the health of a Service Fabric cluster. + + Use EventsHealthStateFilter to filter the collection of health events reported on the cluster + based on the health state. + Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the + collection of nodes and applications returned based on their aggregated health state. + + :param nodes_health_state_filter: Allows filtering of the node health state objects returned in + the result of cluster health query + based on their health state. The possible values for this parameter include integer value of + one of the + following health states. Only nodes that match the filter are returned. All nodes are used to + evaluate the aggregated health state. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of nodes with HealthState value of + OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type nodes_health_state_filter: int + :param applications_health_state_filter: Allows filtering of the application health state + objects returned in the result of cluster health + query based on their health state. + The possible values for this parameter include integer value obtained from members or bitwise + operations + on members of HealthStateFilter enumeration. Only applications that match the filter are + returned. + All applications are used to evaluate the aggregated health state. If not specified, all + entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of applications with HealthState + value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type applications_health_state_filter: int + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param include_system_application_health_statistics: Indicates whether the health statistics + should include the fabric:/System application health statistics. False by default. + If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the + entities that belong to the fabric:/System application. + Otherwise, the query result includes health statistics only for user applications. + The health statistics must be included in the query result for this parameter to be applied. + Default value is False. + :type include_system_application_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_health_request( + api_version=api_version, + nodes_health_state_filter=nodes_health_state_filter, + applications_health_state_filter=applications_health_state_filter, + events_health_state_filter=events_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + include_system_application_health_statistics=include_system_application_health_statistics, + timeout=timeout, + template_url=self.get_cluster_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_health.metadata = {'url': "/$/GetClusterHealth"} # type: ignore + + + @distributed_trace + def get_cluster_health_using_policy( + self, + nodes_health_state_filter=0, # type: Optional[int] + applications_health_state_filter=0, # type: Optional[int] + events_health_state_filter=0, # type: Optional[int] + exclude_health_statistics=False, # type: Optional[bool] + include_system_application_health_statistics=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + application_health_policy_map=None, # type: Optional[List["_models.ApplicationHealthPolicyMapItem"]] + cluster_health_policy=None, # type: Optional["_models.ClusterHealthPolicy"] + **kwargs # type: Any + ): + # type: (...) -> "_models.ClusterHealth" + """Gets the health of a Service Fabric cluster using the specified policy. + + Use EventsHealthStateFilter to filter the collection of health events reported on the cluster + based on the health state. + Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the + collection of nodes and applications returned based on their aggregated health state. + Use ClusterHealthPolicies to override the health policies used to evaluate the health. + + :param nodes_health_state_filter: Allows filtering of the node health state objects returned in + the result of cluster health query + based on their health state. The possible values for this parameter include integer value of + one of the + following health states. Only nodes that match the filter are returned. All nodes are used to + evaluate the aggregated health state. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of nodes with HealthState value of + OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type nodes_health_state_filter: int + :param applications_health_state_filter: Allows filtering of the application health state + objects returned in the result of cluster health + query based on their health state. + The possible values for this parameter include integer value obtained from members or bitwise + operations + on members of HealthStateFilter enumeration. Only applications that match the filter are + returned. + All applications are used to evaluate the aggregated health state. If not specified, all + entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of applications with HealthState + value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type applications_health_state_filter: int + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param include_system_application_health_statistics: Indicates whether the health statistics + should include the fabric:/System application health statistics. False by default. + If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the + entities that belong to the fabric:/System application. + Otherwise, the query result includes health statistics only for user applications. + The health statistics must be included in the query result for this parameter to be applied. + Default value is False. + :type include_system_application_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param application_health_policy_map: Defines a map that contains specific application health + policies for different applications. + Each entry specifies as key the application name and as value an ApplicationHealthPolicy used + to evaluate the application health. + If an application is not specified in the map, the application health evaluation uses the + ApplicationHealthPolicy found in its application manifest or the default application health + policy (if no health policy is defined in the manifest). + The map is empty by default. Default value is None. + :type application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + :param cluster_health_policy: Defines a health policy used to evaluate the health of the + cluster or of a cluster node. Default value is None. + :type cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _cluster_health_policies = _models.ClusterHealthPolicies(application_health_policy_map=application_health_policy_map, cluster_health_policy=cluster_health_policy) + if _cluster_health_policies is not None: + _json = self._serialize.body(_cluster_health_policies, 'ClusterHealthPolicies') + else: + _json = None + + request = build_get_cluster_health_using_policy_request( + api_version=api_version, + content_type=content_type, + json=_json, + nodes_health_state_filter=nodes_health_state_filter, + applications_health_state_filter=applications_health_state_filter, + events_health_state_filter=events_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + include_system_application_health_statistics=include_system_application_health_statistics, + timeout=timeout, + template_url=self.get_cluster_health_using_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_health_using_policy.metadata = {'url': "/$/GetClusterHealth"} # type: ignore + + + @distributed_trace + def get_cluster_health_chunk( + self, + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ClusterHealthChunk" + """Gets the health of a Service Fabric cluster using health chunks. + + Gets the health of a Service Fabric cluster using health chunks. Includes the aggregated health + state of the cluster, but none of the cluster entities. + To expand the cluster health and get the health state of all or some of the entities, use the + POST URI and specify the cluster health chunk query description. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterHealthChunk, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterHealthChunk + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterHealthChunk"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_health_chunk_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_cluster_health_chunk.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterHealthChunk', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_health_chunk.metadata = {'url': "/$/GetClusterHealthChunk"} # type: ignore + + + @distributed_trace + def get_cluster_health_chunk_using_policy_and_advanced_filters( + self, + timeout=60, # type: Optional[int] + cluster_health_chunk_query_description=None, # type: Optional["_models.ClusterHealthChunkQueryDescription"] + **kwargs # type: Any + ): + # type: (...) -> "_models.ClusterHealthChunk" + """Gets the health of a Service Fabric cluster using health chunks. + + Gets the health of a Service Fabric cluster using health chunks. The health evaluation is done + based on the input cluster health chunk query description. + The query description allows users to specify health policies for evaluating the cluster and + its children. + Users can specify very flexible filters to select which cluster entities to return. The + selection can be done based on the entities health state and based on the hierarchy. + The query can return multi-level children of the entities based on the specified filters. For + example, it can return one application with a specified name, and for this application, return + only services that are in Error or Warning, and all partitions and replicas for one of these + services. + + :param 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. Default value is 60. + :type timeout: long + :param cluster_health_chunk_query_description: Describes the cluster and application health + policies used to evaluate the cluster health and the filters to select which cluster entities + to be returned. + If the cluster health policy is present, it is used to evaluate the cluster events and the + cluster nodes. If not present, the health evaluation uses the cluster health policy defined in + the cluster manifest or the default cluster health policy. + By default, each application is evaluated using its specific application health policy, + defined in the application manifest, or the default health policy, if no policy is defined in + manifest. + If the application health policy map is specified, and it has an entry for an application, the + specified application health policy + is used to evaluate the application health. + Users can specify very flexible filters to select which cluster entities to include in + response. The selection can be done based on the entities health state and based on the + hierarchy. + The query can return multi-level children of the entities based on the specified filters. For + example, it can return one application with a specified name, and for this application, return + only services that are in Error or Warning, and all partitions and replicas for one of these + services. Default value is None. + :type cluster_health_chunk_query_description: + ~azure.servicefabric.models.ClusterHealthChunkQueryDescription + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterHealthChunk, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterHealthChunk + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterHealthChunk"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if cluster_health_chunk_query_description is not None: + _json = self._serialize.body(cluster_health_chunk_query_description, 'ClusterHealthChunkQueryDescription') + else: + _json = None + + request = build_get_cluster_health_chunk_using_policy_and_advanced_filters_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.get_cluster_health_chunk_using_policy_and_advanced_filters.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterHealthChunk', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_health_chunk_using_policy_and_advanced_filters.metadata = {'url': "/$/GetClusterHealthChunk"} # type: ignore + + + @distributed_trace + def report_cluster_health( # pylint: disable=inconsistent-return-statements + self, + health_information, # type: "_models.HealthInformation" + immediate=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Sends a health report on the Service Fabric cluster. + + Sends a health report on a Service Fabric cluster. The report must contain the information + about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway node, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetClusterHealth and check that + the report appears in the HealthEvents section. + + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :type immediate: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(health_information, 'HealthInformation') + + request = build_report_cluster_health_request( + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + template_url=self.report_cluster_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + report_cluster_health.metadata = {'url': "/$/ReportClusterHealth"} # type: ignore + + + @distributed_trace + def get_provisioned_fabric_code_version_info_list( + self, + code_version=None, # type: Optional[str] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> List["_models.FabricCodeVersionInfo"] + """Gets a list of fabric code versions that are provisioned in a Service Fabric cluster. + + Gets a list of information about fabric code versions that are provisioned in the cluster. The + parameter CodeVersion can be used to optionally filter the output to only that particular + version. + + :param code_version: The product version of Service Fabric. Default value is None. + :type code_version: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of FabricCodeVersionInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.FabricCodeVersionInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.FabricCodeVersionInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_provisioned_fabric_code_version_info_list_request( + api_version=api_version, + code_version=code_version, + timeout=timeout, + template_url=self.get_provisioned_fabric_code_version_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[FabricCodeVersionInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_provisioned_fabric_code_version_info_list.metadata = {'url': "/$/GetProvisionedCodeVersions"} # type: ignore + + + @distributed_trace + def get_provisioned_fabric_config_version_info_list( + self, + config_version=None, # type: Optional[str] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> List["_models.FabricConfigVersionInfo"] + """Gets a list of fabric config versions that are provisioned in a Service Fabric cluster. + + Gets a list of information about fabric config versions that are provisioned in the cluster. + The parameter ConfigVersion can be used to optionally filter the output to only that particular + version. + + :param config_version: The config version of Service Fabric. Default value is None. + :type config_version: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of FabricConfigVersionInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.FabricConfigVersionInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.FabricConfigVersionInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_provisioned_fabric_config_version_info_list_request( + api_version=api_version, + config_version=config_version, + timeout=timeout, + template_url=self.get_provisioned_fabric_config_version_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[FabricConfigVersionInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_provisioned_fabric_config_version_info_list.metadata = {'url': "/$/GetProvisionedConfigVersions"} # type: ignore + + + @distributed_trace + def get_cluster_upgrade_progress( + self, + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ClusterUpgradeProgressObject" + """Gets the progress of the current cluster upgrade. + + Gets the current progress of the ongoing cluster upgrade. If no upgrade is currently in + progress, get the last state of the previous cluster upgrade. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterUpgradeProgressObject, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterUpgradeProgressObject + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterUpgradeProgressObject"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_upgrade_progress_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_cluster_upgrade_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterUpgradeProgressObject', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_upgrade_progress.metadata = {'url': "/$/GetUpgradeProgress"} # type: ignore + + + @distributed_trace + def get_cluster_configuration( + self, + configuration_api_version, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ClusterConfiguration" + """Get the Service Fabric standalone cluster configuration. + + The cluster configuration contains properties of the cluster that include different node types + on the cluster, + security configurations, fault, and upgrade domain topologies, etc. + + :param configuration_api_version: The API version of the Standalone cluster json configuration. + :type configuration_api_version: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterConfiguration, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_configuration_request( + api_version=api_version, + configuration_api_version=configuration_api_version, + timeout=timeout, + template_url=self.get_cluster_configuration.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_configuration.metadata = {'url': "/$/GetClusterConfiguration"} # type: ignore + + + @distributed_trace + def get_cluster_configuration_upgrade_status( + self, + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ClusterConfigurationUpgradeStatusInfo" + """Get the cluster configuration upgrade status of a Service Fabric standalone cluster. + + Get the cluster configuration upgrade status details of a Service Fabric standalone cluster. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterConfigurationUpgradeStatusInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterConfigurationUpgradeStatusInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterConfigurationUpgradeStatusInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_configuration_upgrade_status_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_cluster_configuration_upgrade_status.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterConfigurationUpgradeStatusInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_configuration_upgrade_status.metadata = {'url': "/$/GetClusterConfigurationUpgradeStatus"} # type: ignore + + + @distributed_trace + def get_upgrade_orchestration_service_state( + self, + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.UpgradeOrchestrationServiceState" + """Get the service state of Service Fabric Upgrade Orchestration Service. + + Get the service state of Service Fabric Upgrade Orchestration Service. This API is internally + used for support purposes. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UpgradeOrchestrationServiceState, or the result of cls(response) + :rtype: ~azure.servicefabric.models.UpgradeOrchestrationServiceState + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UpgradeOrchestrationServiceState"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_upgrade_orchestration_service_state_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_upgrade_orchestration_service_state.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UpgradeOrchestrationServiceState', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_upgrade_orchestration_service_state.metadata = {'url': "/$/GetUpgradeOrchestrationServiceState"} # type: ignore + + + @distributed_trace + def set_upgrade_orchestration_service_state( + self, + timeout=60, # type: Optional[int] + service_state=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.UpgradeOrchestrationServiceStateSummary" + """Update the service state of Service Fabric Upgrade Orchestration Service. + + Update the service state of Service Fabric Upgrade Orchestration Service. This API is + internally used for support purposes. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param service_state: The state of Service Fabric Upgrade Orchestration Service. Default value + is None. + :type service_state: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UpgradeOrchestrationServiceStateSummary, or the result of cls(response) + :rtype: ~azure.servicefabric.models.UpgradeOrchestrationServiceStateSummary + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UpgradeOrchestrationServiceStateSummary"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _upgrade_orchestration_service_state = _models.UpgradeOrchestrationServiceState(service_state=service_state) + _json = self._serialize.body(_upgrade_orchestration_service_state, 'UpgradeOrchestrationServiceState') + + request = build_set_upgrade_orchestration_service_state_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.set_upgrade_orchestration_service_state.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UpgradeOrchestrationServiceStateSummary', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + set_upgrade_orchestration_service_state.metadata = {'url': "/$/SetUpgradeOrchestrationServiceState"} # type: ignore + + + @distributed_trace + def provision_cluster( # pylint: disable=inconsistent-return-statements + self, + timeout=60, # type: Optional[int] + code_file_path=None, # type: Optional[str] + cluster_manifest_file_path=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + """Provision the code or configuration packages of a Service Fabric cluster. + + Validate and provision the code or configuration packages of a Service Fabric cluster. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param code_file_path: The cluster code package file path. Default value is None. + :type code_file_path: str + :param cluster_manifest_file_path: The cluster manifest file path. Default value is None. + :type cluster_manifest_file_path: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _provision_fabric_description = _models.ProvisionFabricDescription(code_file_path=code_file_path, cluster_manifest_file_path=cluster_manifest_file_path) + _json = self._serialize.body(_provision_fabric_description, 'ProvisionFabricDescription') + + request = build_provision_cluster_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.provision_cluster.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + provision_cluster.metadata = {'url': "/$/Provision"} # type: ignore + + + @distributed_trace + def unprovision_cluster( # pylint: disable=inconsistent-return-statements + self, + timeout=60, # type: Optional[int] + code_version=None, # type: Optional[str] + config_version=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + """Unprovision the code or configuration packages of a Service Fabric cluster. + + It is supported to unprovision code and configuration separately. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param code_version: The cluster code package version. Default value is None. + :type code_version: str + :param config_version: The cluster manifest version. Default value is None. + :type config_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _unprovision_fabric_description = _models.UnprovisionFabricDescription(code_version=code_version, config_version=config_version) + _json = self._serialize.body(_unprovision_fabric_description, 'UnprovisionFabricDescription') + + request = build_unprovision_cluster_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.unprovision_cluster.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + unprovision_cluster.metadata = {'url': "/$/Unprovision"} # type: ignore + + + @distributed_trace + def rollback_cluster_upgrade( # pylint: disable=inconsistent-return-statements + self, + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Roll back the upgrade of a Service Fabric cluster. + + Roll back the code or configuration upgrade of a Service Fabric cluster. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_rollback_cluster_upgrade_request( + api_version=api_version, + timeout=timeout, + template_url=self.rollback_cluster_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + rollback_cluster_upgrade.metadata = {'url': "/$/RollbackUpgrade"} # type: ignore + + + @distributed_trace + def resume_cluster_upgrade( # pylint: disable=inconsistent-return-statements + self, + upgrade_domain, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Make the cluster upgrade move on to the next upgrade domain. + + Make the cluster code or configuration upgrade move on to the next upgrade domain if + appropriate. + + :param upgrade_domain: The next upgrade domain for this cluster upgrade. + :type upgrade_domain: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _resume_cluster_upgrade_description = _models.ResumeClusterUpgradeDescription(upgrade_domain=upgrade_domain) + _json = self._serialize.body(_resume_cluster_upgrade_description, 'ResumeClusterUpgradeDescription') + + request = build_resume_cluster_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.resume_cluster_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + resume_cluster_upgrade.metadata = {'url': "/$/MoveToNextUpgradeDomain"} # type: ignore + + + @distributed_trace + def start_cluster_upgrade( # pylint: disable=inconsistent-return-statements + self, + start_cluster_upgrade_description, # type: "_models.StartClusterUpgradeDescription" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Start upgrading the code or configuration version of a Service Fabric cluster. + + Validate the supplied upgrade parameters and start upgrading the code or configuration version + of a Service Fabric cluster if the parameters are valid. + + :param start_cluster_upgrade_description: Describes the parameters for starting a cluster + upgrade. + :type start_cluster_upgrade_description: + ~azure.servicefabric.models.StartClusterUpgradeDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') + + request = build_start_cluster_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.start_cluster_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_cluster_upgrade.metadata = {'url': "/$/Upgrade"} # type: ignore + + + @distributed_trace + def start_cluster_configuration_upgrade( # pylint: disable=inconsistent-return-statements + self, + cluster_configuration_upgrade_description, # type: "_models.ClusterConfigurationUpgradeDescription" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Start upgrading the configuration of a Service Fabric standalone cluster. + + Validate the supplied configuration upgrade parameters and start upgrading the cluster + configuration if the parameters are valid. + + :param cluster_configuration_upgrade_description: Parameters for a standalone cluster + configuration upgrade. + :type cluster_configuration_upgrade_description: + ~azure.servicefabric.models.ClusterConfigurationUpgradeDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(cluster_configuration_upgrade_description, 'ClusterConfigurationUpgradeDescription') + + request = build_start_cluster_configuration_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.start_cluster_configuration_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_cluster_configuration_upgrade.metadata = {'url': "/$/StartClusterConfigurationUpgrade"} # type: ignore + + + @distributed_trace + def update_cluster_upgrade( # pylint: disable=inconsistent-return-statements + self, + update_cluster_upgrade_description, # type: "_models.UpdateClusterUpgradeDescription" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Update the upgrade parameters of a Service Fabric cluster upgrade. + + Update the upgrade parameters used during a Service Fabric cluster upgrade. + + :param update_cluster_upgrade_description: Parameters for updating a cluster upgrade. + :type update_cluster_upgrade_description: + ~azure.servicefabric.models.UpdateClusterUpgradeDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(update_cluster_upgrade_description, 'UpdateClusterUpgradeDescription') + + request = build_update_cluster_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.update_cluster_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + update_cluster_upgrade.metadata = {'url': "/$/UpdateUpgrade"} # type: ignore + + + @distributed_trace + def get_aad_metadata( + self, + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.AadMetadataObject" + """Gets the Azure Active Directory metadata used for secured connection to cluster. + + Gets the Azure Active Directory metadata used for secured connection to cluster. + This API is not supposed to be called separately. It provides information needed to set up an + Azure Active Directory secured connection with a Service Fabric cluster. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AadMetadataObject, or the result of cls(response) + :rtype: ~azure.servicefabric.models.AadMetadataObject + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AadMetadataObject"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_aad_metadata_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_aad_metadata.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AadMetadataObject', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_aad_metadata.metadata = {'url': "/$/GetAadMetadata"} # type: ignore + + + @distributed_trace + def get_cluster_version( + self, + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ClusterVersion" + """Get the current Service Fabric cluster version. + + If a cluster upgrade is happening, then this API will return the lowest (older) version of the + current and target cluster runtime versions. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterVersion, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterVersion + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterVersion"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_version_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_cluster_version.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterVersion', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_version.metadata = {'url': "/$/GetClusterVersion"} # type: ignore + + + @distributed_trace + def get_cluster_load( + self, + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ClusterLoadInfo" + """Gets the load of a Service Fabric cluster. + + Retrieves the load information of a Service Fabric cluster for all the metrics that have load + or capacity defined. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterLoadInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ClusterLoadInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterLoadInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_load_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_cluster_load.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterLoadInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_load.metadata = {'url': "/$/GetLoadInformation"} # type: ignore + + + @distributed_trace + def toggle_verbose_service_placement_health_reporting( # pylint: disable=inconsistent-return-statements + self, + enabled, # type: bool + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Changes the verbosity of service placement health reporting. + + If verbosity is set to true, then detailed health reports will be generated when replicas + cannot be placed or dropped. + If verbosity is set to false, then no health reports will be generated when replicas cannot be + placed or dropped. + + :param enabled: The verbosity of service placement health reporting. + :type enabled: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_toggle_verbose_service_placement_health_reporting_request( + api_version=api_version, + enabled=enabled, + timeout=timeout, + template_url=self.toggle_verbose_service_placement_health_reporting.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + toggle_verbose_service_placement_health_reporting.metadata = {'url': "/$/ToggleVerboseServicePlacementHealthReporting"} # type: ignore + + + @distributed_trace + def validate_cluster_upgrade( + self, + start_cluster_upgrade_description, # type: "_models.StartClusterUpgradeDescription" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ValidateClusterUpgradeResult" + """Validate and assess the impact of a code or configuration version update of a Service Fabric + cluster. + + Validate the supplied upgrade parameters and assess the expected impact of a code or + configuration version upgrade of a Service Fabric cluster. The upgrade will not be initiated. + + :param start_cluster_upgrade_description: Describes the parameters for starting a cluster + upgrade. + :type start_cluster_upgrade_description: + ~azure.servicefabric.models.StartClusterUpgradeDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidateClusterUpgradeResult, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ValidateClusterUpgradeResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidateClusterUpgradeResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') + + request = build_validate_cluster_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.validate_cluster_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ValidateClusterUpgradeResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + validate_cluster_upgrade.metadata = {'url': "/$/ValidateUpgrade"} # type: ignore + + + @distributed_trace + def get_node_info_list( + self, + continuation_token_parameter=None, # type: Optional[str] + node_status_filter="default", # type: Optional[Union[str, "_models.NodeStatusFilter"]] + max_results=0, # type: Optional[int] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedNodeInfoList" + """Gets the list of nodes in the Service Fabric cluster. + + The response includes the name, status, ID, health, uptime, and other details about the nodes. + + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param node_status_filter: Allows filtering the nodes based on the NodeStatus. Only the nodes + that are matching the specified filter value will be returned. The filter value can be one of + the following. Default value is "default". + :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. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedNodeInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedNodeInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedNodeInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_node_info_list_request( + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + node_status_filter=node_status_filter, + max_results=max_results, + timeout=timeout, + template_url=self.get_node_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedNodeInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_node_info_list.metadata = {'url': "/Nodes"} # type: ignore + + + @distributed_trace + def get_node_info( + self, + node_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.NodeInfo"] + """Gets the information about a specific node in the Service Fabric cluster. + + The response includes the name, status, ID, health, uptime, and other details about the node. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NodeInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.NodeInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NodeInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_node_info_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + template_url=self.get_node_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NodeInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_node_info.metadata = {'url': "/Nodes/{nodeName}"} # type: ignore + + + @distributed_trace + def get_node_health( + self, + node_name, # type: str + events_health_state_filter=0, # type: Optional[int] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.NodeHealth" + """Gets the health of a Service Fabric node. + + Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection + of health events reported on the node based on the health state. If the node that you specify + by name does not exist in the health store, this returns an error. + + :param node_name: The name of the node. + :type node_name: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NodeHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.NodeHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_node_health_request( + node_name=node_name, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + template_url=self.get_node_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NodeHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_node_health.metadata = {'url': "/Nodes/{nodeName}/$/GetHealth"} # type: ignore + + + @distributed_trace + def get_node_health_using_policy( + self, + node_name, # type: str + events_health_state_filter=0, # type: Optional[int] + timeout=60, # type: Optional[int] + cluster_health_policy=None, # type: Optional["_models.ClusterHealthPolicy"] + **kwargs # type: Any + ): + # type: (...) -> "_models.NodeHealth" + """Gets the health of a Service Fabric node, by using the specified health policy. + + Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection + of health events reported on the node based on the health state. Use ClusterHealthPolicy in the + POST body to override the health policies used to evaluate the health. If the node that you + specify by name does not exist in the health store, this returns an error. + + :param node_name: The name of the node. + :type node_name: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param cluster_health_policy: Describes the health policies used to evaluate the health of a + cluster or node. If not present, the health evaluation uses the health policy from cluster + manifest or the default health policy. Default value is None. + :type cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NodeHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.NodeHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if cluster_health_policy is not None: + _json = self._serialize.body(cluster_health_policy, 'ClusterHealthPolicy') + else: + _json = None + + request = build_get_node_health_using_policy_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + template_url=self.get_node_health_using_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NodeHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_node_health_using_policy.metadata = {'url': "/Nodes/{nodeName}/$/GetHealth"} # type: ignore + + + @distributed_trace + def report_node_health( # pylint: disable=inconsistent-return-statements + self, + node_name, # type: str + health_information, # type: "_models.HealthInformation" + immediate=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Sends a health report on the Service Fabric node. + + Reports health state of the specified Service Fabric node. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway node, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetNodeHealth and check that the + report appears in the HealthEvents section. + + :param node_name: The name of the node. + :type node_name: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :type immediate: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(health_information, 'HealthInformation') + + request = build_report_node_health_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + template_url=self.report_node_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + report_node_health.metadata = {'url': "/Nodes/{nodeName}/$/ReportHealth"} # type: ignore + + + @distributed_trace + def get_node_load_info( + self, + node_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.NodeLoadInfo" + """Gets the load information of a Service Fabric node. + + Retrieves the load information of a Service Fabric node for all the metrics that have load or + capacity defined. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NodeLoadInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.NodeLoadInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeLoadInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_node_load_info_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + template_url=self.get_node_load_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NodeLoadInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_node_load_info.metadata = {'url': "/Nodes/{nodeName}/$/GetLoadInformation"} # type: ignore + + + @distributed_trace + def disable_node( # pylint: disable=inconsistent-return-statements + self, + node_name, # type: str + timeout=60, # type: Optional[int] + deactivation_intent=None, # type: Optional[Union[str, "_models.DeactivationIntent"]] + **kwargs # type: Any + ): + # type: (...) -> None + """Deactivate a Service Fabric cluster node with the specified deactivation intent. + + Deactivate a Service Fabric cluster node with the specified deactivation intent. Once the + deactivation is in progress, the deactivation intent can be increased, but not decreased (for + example, a node that is deactivated with the Pause intent can be deactivated further with + Restart, but not the other way around. Nodes may be reactivated using the Activate a node + operation any time after they are deactivated. If the deactivation is not complete, this will + cancel the deactivation. A node that goes down and comes back up while deactivated will still + need to be reactivated before services will be placed on that node. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param deactivation_intent: Describes the intent or reason for deactivating the node. The + possible values are following. Default value is None. + :type deactivation_intent: str or ~azure.servicefabric.models.DeactivationIntent + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _deactivation_intent_description = _models.DeactivationIntentDescription(deactivation_intent=deactivation_intent) + _json = self._serialize.body(_deactivation_intent_description, 'DeactivationIntentDescription') + + request = build_disable_node_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.disable_node.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_node.metadata = {'url': "/Nodes/{nodeName}/$/Deactivate"} # type: ignore + + + @distributed_trace + def enable_node( # pylint: disable=inconsistent-return-statements + self, + node_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Activate a Service Fabric cluster node that is currently deactivated. + + Activates a Service Fabric cluster node that is currently deactivated. Once activated, the node + will again become a viable target for placing new replicas, and any deactivated replicas + remaining on the node will be reactivated. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_enable_node_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + template_url=self.enable_node.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + enable_node.metadata = {'url': "/Nodes/{nodeName}/$/Activate"} # type: ignore + + + @distributed_trace + def remove_node_state( # pylint: disable=inconsistent-return-statements + self, + node_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Notifies Service Fabric that the persisted state on a node has been permanently removed or + lost. + + This implies that it is not possible to recover the persisted state of that node. This + generally happens if a hard disk has been wiped clean, or if a hard disk crashes. The node has + to be down for this operation to be successful. This operation lets Service Fabric know that + the replicas on that node no longer exist, and that Service Fabric should stop waiting for + those replicas to come back up. Do not run this cmdlet if the state on the node has not been + removed and the node can come back up with its state intact. Starting from Service Fabric 6.5, + in order to use this API for seed nodes, please change the seed nodes to regular (non-seed) + nodes and then invoke this API to remove the node state. If the cluster is running on Azure, + after the seed node goes down, Service Fabric will try to change it to a non-seed node + automatically. To make this happen, make sure the number of non-seed nodes in the primary node + type is no less than the number of Down seed nodes. If necessary, add more nodes to the primary + node type to achieve this. For standalone cluster, if the Down seed node is not expected to + come back up with its state intact, please remove the node from the cluster, see + https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-windows-server-add-remove-nodes. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_remove_node_state_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + template_url=self.remove_node_state.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + remove_node_state.metadata = {'url': "/Nodes/{nodeName}/$/RemoveNodeState"} # type: ignore + + + @distributed_trace + def restart_node( # pylint: disable=inconsistent-return-statements + self, + node_name, # type: str + timeout=60, # type: Optional[int] + node_instance_id="0", # type: str + create_fabric_dump="False", # type: Optional[Union[str, "_models.CreateFabricDump"]] + **kwargs # type: Any + ): + # type: (...) -> None + """Restarts a Service Fabric cluster node. + + Restarts a Service Fabric cluster node that is already started. + + :param node_name: The name of the node. + :type node_name: str + :param 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. Default value is 60. + :type timeout: long + :param node_instance_id: The instance ID of the target node. If instance ID is specified the + node is restarted only if it matches with the current instance of the node. A default value of + "0" would match any instance ID. The instance ID can be obtained using get node query. Default + value is "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. Default value is "False". + :type create_fabric_dump: str or ~azure.servicefabric.models.CreateFabricDump + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _restart_node_description = _models.RestartNodeDescription(node_instance_id=node_instance_id, create_fabric_dump=create_fabric_dump) + _json = self._serialize.body(_restart_node_description, 'RestartNodeDescription') + + request = build_restart_node_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.restart_node.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + restart_node.metadata = {'url': "/Nodes/{nodeName}/$/Restart"} # type: ignore + + + @distributed_trace + def remove_configuration_overrides( # pylint: disable=inconsistent-return-statements + self, + node_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Removes configuration overrides on the specified node. + + This api allows removing all existing configuration overrides on specified node. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_remove_configuration_overrides_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + template_url=self.remove_configuration_overrides.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + remove_configuration_overrides.metadata = {'url': "/Nodes/{nodeName}/$/RemoveConfigurationOverrides"} # type: ignore + + + @distributed_trace + def get_configuration_overrides( + self, + node_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> List["_models.ConfigParameterOverride"] + """Gets the list of configuration overrides on the specified node. + + This api allows getting all existing configuration overrides on the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ConfigParameterOverride, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ConfigParameterOverride] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ConfigParameterOverride"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_configuration_overrides_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + template_url=self.get_configuration_overrides.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ConfigParameterOverride]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_configuration_overrides.metadata = {'url': "/Nodes/{nodeName}/$/GetConfigurationOverrides"} # type: ignore + + + @distributed_trace + def add_configuration_parameter_overrides( # pylint: disable=inconsistent-return-statements + self, + node_name, # type: str + config_parameter_override_list, # type: List["_models.ConfigParameterOverride"] + force=None, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Adds the list of configuration overrides on the specified node. + + This api allows adding all existing configuration overrides on the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param config_parameter_override_list: Description for adding list of configuration overrides. + :type config_parameter_override_list: list[~azure.servicefabric.models.ConfigParameterOverride] + :param force: Force adding configuration overrides on specified nodes. Default value is None. + :type force: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(config_parameter_override_list, '[ConfigParameterOverride]') + + request = build_add_configuration_parameter_overrides_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + force=force, + timeout=timeout, + template_url=self.add_configuration_parameter_overrides.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + add_configuration_parameter_overrides.metadata = {'url': "/Nodes/{nodeName}/$/AddConfigurationParameterOverrides"} # type: ignore + + + @distributed_trace + def remove_node_tags( # pylint: disable=inconsistent-return-statements + self, + node_name, # type: str + node_tags, # type: List[str] + **kwargs # type: Any + ): + # type: (...) -> None + """Removes the list of tags from the specified node. + + This api allows removing set of tags from the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param node_tags: Description for adding list of node tags. + :type node_tags: list[str] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(node_tags, '[str]') + + request = build_remove_node_tags_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.remove_node_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + remove_node_tags.metadata = {'url': "/Nodes/{nodeName}/$/RemoveNodeTags"} # type: ignore + + + @distributed_trace + def add_node_tags( # pylint: disable=inconsistent-return-statements + self, + node_name, # type: str + node_tags, # type: List[str] + **kwargs # type: Any + ): + # type: (...) -> None + """Adds the list of tags on the specified node. + + This api allows adding tags to the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param node_tags: Description for adding list of node tags. + :type node_tags: list[str] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(node_tags, '[str]') + + request = build_add_node_tags_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.add_node_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + add_node_tags.metadata = {'url': "/Nodes/{nodeName}/$/AddNodeTags"} # type: ignore + + + @distributed_trace + def get_application_type_info_list( + self, + application_type_definition_kind_filter=0, # type: Optional[int] + exclude_application_parameters=False, # type: Optional[bool] + continuation_token_parameter=None, # type: Optional[str] + max_results=0, # type: Optional[int] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedApplicationTypeInfoList" + """Gets the list of application types in the Service Fabric cluster. + + Returns the information about the application types that are provisioned or in the process of + being provisioned in the Service Fabric cluster. Each version of an application type is + returned as one application type. The response includes the name, version, status, and other + details about the application type. This is a paged query, meaning that if not all of the + application types fit in a page, one page of results is returned as well as a continuation + token, which can be used to get the next page. For example, if there are 10 application types + but a page only fits the first three application types, or if max results is set to 3, then + three is returned. To access the rest of the results, retrieve subsequent pages by using the + returned continuation token in the next query. An empty continuation token is returned if there + are no subsequent pages. + + :param application_type_definition_kind_filter: Used to filter on ApplicationTypeDefinitionKind + which is the mechanism used to define a Service Fabric application type. + + + * Default - Default value, which performs the same function as selecting "All". The value is + 0. + * All - Filter that matches input with any ApplicationTypeDefinitionKind value. The value is + 65535. + * ServiceFabricApplicationPackage - Filter that matches input with + ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. The value is 1. + * Compose - Filter that matches input with ApplicationTypeDefinitionKind value Compose. The + value is 2. Default value is 0. + :type application_type_definition_kind_filter: int + :param exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :type exclude_application_parameters: bool + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedApplicationTypeInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedApplicationTypeInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedApplicationTypeInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_type_info_list_request( + api_version=api_version, + application_type_definition_kind_filter=application_type_definition_kind_filter, + exclude_application_parameters=exclude_application_parameters, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.get_application_type_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedApplicationTypeInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_type_info_list.metadata = {'url': "/ApplicationTypes"} # type: ignore + + + @distributed_trace + def get_application_type_info_list_by_name( + self, + application_type_name, # type: str + application_type_version=None, # type: Optional[str] + exclude_application_parameters=False, # type: Optional[bool] + continuation_token_parameter=None, # type: Optional[str] + max_results=0, # type: Optional[int] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedApplicationTypeInfoList" + """Gets the list of application types in the Service Fabric cluster matching exactly the specified + name. + + Returns the information about the application types that are provisioned or in the process of + being provisioned in the Service Fabric cluster. These results are of application types whose + name match exactly the one specified as the parameter, and which comply with the given query + parameters. All versions of the application type matching the application type name are + returned, with each version returned as one application type. The response includes the name, + version, status, and other details about the application type. This is a paged query, meaning + that if not all of the application types fit in a page, one page of results is returned as well + as a continuation token, which can be used to get the next page. For example, if there are 10 + application types but a page only fits the first three application types, or if max results is + set to 3, then three is returned. To access the rest of the results, retrieve subsequent pages + by using the returned continuation token in the next query. An empty continuation token is + returned if there are no subsequent pages. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. Default value is None. + :type application_type_version: str + :param exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :type exclude_application_parameters: bool + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedApplicationTypeInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedApplicationTypeInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedApplicationTypeInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_type_info_list_by_name_request( + application_type_name=application_type_name, + api_version=api_version, + application_type_version=application_type_version, + exclude_application_parameters=exclude_application_parameters, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.get_application_type_info_list_by_name.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedApplicationTypeInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_type_info_list_by_name.metadata = {'url': "/ApplicationTypes/{applicationTypeName}"} # type: ignore + + + @distributed_trace + def provision_application_type( # pylint: disable=inconsistent-return-statements + self, + provision_application_type_description_base_required_body_param, # type: "_models.ProvisionApplicationTypeDescriptionBase" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Provisions or registers a Service Fabric application type with the cluster using the '.sfpkg' + package in the external store or using the application package in the image store. + + Provisions a Service Fabric application type with the cluster. The provision is required before + any new applications can be instantiated. + The provision operation can be performed either on the application package specified by the + relativePathInImageStore, or by using the URI of the external '.sfpkg'. + + :param provision_application_type_description_base_required_body_param: The base type of + provision application type description which supports either image store-based provision or + external store-based provision. + :type provision_application_type_description_base_required_body_param: + ~azure.servicefabric.models.ProvisionApplicationTypeDescriptionBase + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(provision_application_type_description_base_required_body_param, 'ProvisionApplicationTypeDescriptionBase') + + request = build_provision_application_type_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.provision_application_type.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + provision_application_type.metadata = {'url': "/ApplicationTypes/$/Provision"} # type: ignore + + + @distributed_trace + def unprovision_application_type( # pylint: disable=inconsistent-return-statements + self, + application_type_name, # type: str + application_type_version, # type: str + timeout=60, # type: Optional[int] + async_parameter=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + """Removes or unregisters a Service Fabric application type from the cluster. + + This operation can only be performed if all application instances of the application type have + been deleted. Once the application type is unregistered, no new application instances can be + created for this particular application type. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type as defined in the + application manifest. + :type application_type_version: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param async_parameter: The flag indicating whether or not unprovision should occur + asynchronously. When set to true, the unprovision operation returns when the request is + accepted by the system, and the unprovision operation continues without any timeout limit. The + default value is false. However, we recommend setting it to true for large application packages + that were provisioned. + :type async_parameter: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _unprovision_application_type_description_info = _models.UnprovisionApplicationTypeDescriptionInfo(application_type_version=application_type_version, async_property=async_parameter) + _json = self._serialize.body(_unprovision_application_type_description_info, 'UnprovisionApplicationTypeDescriptionInfo') + + request = build_unprovision_application_type_request( + application_type_name=application_type_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.unprovision_application_type.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + unprovision_application_type.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/Unprovision"} # type: ignore + + + @distributed_trace + def update_application_type_arm_metadata( # pylint: disable=inconsistent-return-statements + self, + application_type_name, # type: str + application_type_version, # type: str + timeout=60, # type: Optional[int] + force=None, # type: Optional[bool] + arm_resource_id=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + """Updates the Arm Metadata for a specific Application Type. + + Updates the Arm Metadata for a specific Application Type. Is able to be called immediately + after the provision app type API is called. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :type application_type_version: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param force: Force parameter used to prevent accidental Arm metadata update. Default value is + None. + :type force: bool + :param arm_resource_id: A string containing the ArmResourceId. Default value is None. + :type arm_resource_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _application_type_arm_metadata_update_description = _models.ArmMetadata(arm_resource_id=arm_resource_id) + _json = self._serialize.body(_application_type_arm_metadata_update_description, 'ArmMetadata') + + request = build_update_application_type_arm_metadata_request( + application_type_name=application_type_name, + api_version=api_version, + content_type=content_type, + application_type_version=application_type_version, + json=_json, + timeout=timeout, + force=force, + template_url=self.update_application_type_arm_metadata.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + update_application_type_arm_metadata.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/UpdateArmMetadata"} # type: ignore + + + @distributed_trace + def get_service_type_info_list( + self, + application_type_name, # type: str + application_type_version, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> List["_models.ServiceTypeInfo"] + """Gets the list containing the information about service types that are supported by a + provisioned application type in a Service Fabric cluster. + + Gets the list containing the information about service types that are supported by a + provisioned application type in a Service Fabric cluster. The provided application type must + exist. Otherwise, a 404 status is returned. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :type application_type_version: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ServiceTypeInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ServiceTypeInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ServiceTypeInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_type_info_list_request( + application_type_name=application_type_name, + api_version=api_version, + application_type_version=application_type_version, + timeout=timeout, + template_url=self.get_service_type_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ServiceTypeInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_type_info_list.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes"} # type: ignore + + + @distributed_trace + def get_service_type_info_by_name( + self, + application_type_name, # type: str + application_type_version, # type: str + service_type_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ServiceTypeInfo"] + """Gets the information about a specific service type that is supported by a provisioned + application type in a Service Fabric cluster. + + Gets the information about a specific service type that is supported by a provisioned + application type in a Service Fabric cluster. The provided application type must exist. + Otherwise, a 404 status is returned. A 204 response is returned if the specified service type + is not found in the cluster. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :type application_type_version: str + :param service_type_name: Specifies the name of a Service Fabric service type. + :type service_type_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceTypeInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceTypeInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServiceTypeInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_type_info_by_name_request( + application_type_name=application_type_name, + service_type_name=service_type_name, + api_version=api_version, + application_type_version=application_type_version, + timeout=timeout, + template_url=self.get_service_type_info_by_name.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServiceTypeInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_type_info_by_name.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes/{serviceTypeName}"} # type: ignore + + + @distributed_trace + def get_service_manifest( + self, + application_type_name, # type: str + application_type_version, # type: str + service_manifest_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ServiceTypeManifest" + """Gets the manifest describing a service type. + + Gets the manifest describing a service type. The response contains the service manifest XML as + a string. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :type application_type_version: str + :param service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. + :type service_manifest_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceTypeManifest, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceTypeManifest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceTypeManifest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_manifest_request( + application_type_name=application_type_name, + api_version=api_version, + application_type_version=application_type_version, + service_manifest_name=service_manifest_name, + timeout=timeout, + template_url=self.get_service_manifest.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceTypeManifest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_manifest.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/GetServiceManifest"} # type: ignore + + + @distributed_trace + def get_deployed_service_type_info_list( + self, + node_name, # type: str + application_id, # type: str + service_manifest_name=None, # type: Optional[str] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> List["_models.DeployedServiceTypeInfo"] + """Gets the list containing the information about service types from the applications deployed on + a node in a Service Fabric cluster. + + Gets the list containing the information about service types from the applications deployed on + a node in a Service Fabric cluster. The response includes the name of the service type, its + registration status, the code package that registered it and activation ID of the service + package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_manifest_name: The name of the service manifest to filter the list of deployed + service type information. If specified, the response will only contain the information about + service types that are defined in this service manifest. Default value is None. + :type service_manifest_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of DeployedServiceTypeInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.DeployedServiceTypeInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.DeployedServiceTypeInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_service_type_info_list_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + service_manifest_name=service_manifest_name, + timeout=timeout, + template_url=self.get_deployed_service_type_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[DeployedServiceTypeInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_type_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes"} # type: ignore + + + @distributed_trace + def get_deployed_service_type_info_by_name( + self, + node_name, # type: str + application_id, # type: str + service_type_name, # type: str + service_manifest_name=None, # type: Optional[str] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Optional[List["_models.DeployedServiceTypeInfo"]] + """Gets the information about a specified service type of the application deployed on a node in a + Service Fabric cluster. + + Gets the list containing the information about a specific service type from the applications + deployed on a node in a Service Fabric cluster. The response includes the name of the service + type, its registration status, the code package that registered it and activation ID of the + service package. Each entry represents one activation of a service type, differentiated by the + activation ID. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_type_name: Specifies the name of a Service Fabric service type. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest to filter the list of deployed + service type information. If specified, the response will only contain the information about + service types that are defined in this service manifest. Default value is None. + :type service_manifest_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of DeployedServiceTypeInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.DeployedServiceTypeInfo] or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[List["_models.DeployedServiceTypeInfo"]]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_service_type_info_by_name_request( + node_name=node_name, + application_id=application_id, + service_type_name=service_type_name, + api_version=api_version, + service_manifest_name=service_manifest_name, + timeout=timeout, + template_url=self.get_deployed_service_type_info_by_name.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[DeployedServiceTypeInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_type_info_by_name.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes/{serviceTypeName}"} # type: ignore + + + @distributed_trace + def create_application( # pylint: disable=inconsistent-return-statements + self, + application_description, # type: "_models.ApplicationDescription" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Creates a Service Fabric application. + + Creates a Service Fabric application using the specified description. + + :param application_description: Description for creating an application. + :type application_description: ~azure.servicefabric.models.ApplicationDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(application_description, 'ApplicationDescription') + + request = build_create_application_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.create_application.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + create_application.metadata = {'url': "/Applications/$/Create"} # type: ignore + + + @distributed_trace + def delete_application( # pylint: disable=inconsistent-return-statements + self, + application_id, # type: str + force_remove=None, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes an existing Service Fabric application. + + An application must be created before it can be deleted. Deleting an application will delete + all services that are part of that application. By default, Service Fabric will try to close + service replicas in a graceful manner and then delete the service. However, if a service is + having issues closing the replica gracefully, the delete operation may take a long time or get + stuck. Use the optional ForceRemove flag to skip the graceful close sequence and forcefully + delete the application and all of its services. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param force_remove: Remove a Service Fabric application or service forcefully without going + through the graceful shutdown sequence. This parameter can be used to forcefully delete an + application or service for which delete is timing out due to issues in the service code that + prevents graceful close of replicas. Default value is None. + :type force_remove: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_application_request( + application_id=application_id, + api_version=api_version, + force_remove=force_remove, + timeout=timeout, + template_url=self.delete_application.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_application.metadata = {'url': "/Applications/{applicationId}/$/Delete"} # type: ignore + + + @distributed_trace + def get_application_load_info( + self, + application_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ApplicationLoadInfo"] + """Gets load information about a Service Fabric application. + + Returns the load information about the application that was created or in the process of being + created in the Service Fabric cluster and whose name matches the one specified as the + parameter. The response includes the name, minimum nodes, maximum nodes, the number of nodes + the application is occupying currently, and application load metric information about the + application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationLoadInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationLoadInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationLoadInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_load_info_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_application_load_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationLoadInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_load_info.metadata = {'url': "/Applications/{applicationId}/$/GetLoadInformation"} # type: ignore + + + @distributed_trace + def get_application_info_list( + self, + application_definition_kind_filter=0, # type: Optional[int] + application_type_name=None, # type: Optional[str] + exclude_application_parameters=False, # type: Optional[bool] + continuation_token_parameter=None, # type: Optional[str] + max_results=0, # type: Optional[int] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedApplicationInfoList" + """Gets the list of applications created in the Service Fabric cluster that match the specified + filters. + + Gets the information about the applications that were created or in the process of being + created in the Service Fabric cluster and match the specified filters. The response includes + the name, type, status, parameters, and other details about the application. If the + applications do not fit in a page, one page of results is returned as well as a continuation + token, which can be used to get the next page. Filters ApplicationTypeName and + ApplicationDefinitionKindFilter cannot be specified at the same time. + + :param application_definition_kind_filter: Used to filter on ApplicationDefinitionKind, which + is the mechanism used to define a Service Fabric application. + + + * Default - Default value, which performs the same function as selecting "All". The value is + 0. + * All - Filter that matches input with any ApplicationDefinitionKind value. The value is + 65535. + * ServiceFabricApplicationDescription - Filter that matches input with + ApplicationDefinitionKind value ServiceFabricApplicationDescription. The value is 1. + * Compose - Filter that matches input with ApplicationDefinitionKind value Compose. The value + is 2. Default value is 0. + :type application_definition_kind_filter: int + :param application_type_name: The application type name used to filter the applications to + query for. This value should not contain the application type version. Default value is None. + :type application_type_name: str + :param exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :type exclude_application_parameters: bool + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedApplicationInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedApplicationInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedApplicationInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_info_list_request( + api_version=api_version, + application_definition_kind_filter=application_definition_kind_filter, + application_type_name=application_type_name, + exclude_application_parameters=exclude_application_parameters, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.get_application_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedApplicationInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_info_list.metadata = {'url': "/Applications"} # type: ignore + + + @distributed_trace + def get_application_info( + self, + application_id, # type: str + exclude_application_parameters=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ApplicationInfo"] + """Gets information about a Service Fabric application. + + Returns the information about the application that was created or in the process of being + created in the Service Fabric cluster and whose name matches the one specified as the + parameter. The response includes the name, type, status, parameters, and other details about + the application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :type exclude_application_parameters: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_info_request( + application_id=application_id, + api_version=api_version, + exclude_application_parameters=exclude_application_parameters, + timeout=timeout, + template_url=self.get_application_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_info.metadata = {'url': "/Applications/{applicationId}"} # type: ignore + + + @distributed_trace + def get_application_health( + self, + application_id, # type: str + events_health_state_filter=0, # type: Optional[int] + deployed_applications_health_state_filter=0, # type: Optional[int] + services_health_state_filter=0, # type: Optional[int] + exclude_health_statistics=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ApplicationHealth" + """Gets the health of the service fabric application. + + Returns the heath state of the service fabric application. The response reports either Ok, + Error or Warning health state. If the entity is not found in the health store, it will return + Error. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param deployed_applications_health_state_filter: Allows filtering of the deployed applications + health state objects returned in the result of application health query based on their health + state. + The possible values for this parameter include integer value of one of the following health + states. Only deployed applications that match the filter will be returned. + All deployed applications are used to evaluate the aggregated health state. If not specified, + all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values, obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of deployed applications with + HealthState value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type deployed_applications_health_state_filter: int + :param services_health_state_filter: Allows filtering of the services health state objects + returned in the result of services health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only services that match the filter are returned. All services are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of services with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type services_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_health_request( + application_id=application_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + deployed_applications_health_state_filter=deployed_applications_health_state_filter, + services_health_state_filter=services_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + template_url=self.get_application_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_health.metadata = {'url': "/Applications/{applicationId}/$/GetHealth"} # type: ignore + + + @distributed_trace + def get_application_health_using_policy( + self, + application_id, # type: str + events_health_state_filter=0, # type: Optional[int] + deployed_applications_health_state_filter=0, # type: Optional[int] + services_health_state_filter=0, # type: Optional[int] + exclude_health_statistics=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + application_health_policy=None, # type: Optional["_models.ApplicationHealthPolicy"] + **kwargs # type: Any + ): + # type: (...) -> "_models.ApplicationHealth" + """Gets the health of a Service Fabric application using the specified policy. + + Gets the health of a Service Fabric application. Use EventsHealthStateFilter to filter the + collection of health events reported on the node based on the health state. Use + ClusterHealthPolicies to override the health policies used to evaluate the health. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param deployed_applications_health_state_filter: Allows filtering of the deployed applications + health state objects returned in the result of application health query based on their health + state. + The possible values for this parameter include integer value of one of the following health + states. Only deployed applications that match the filter will be returned. + All deployed applications are used to evaluate the aggregated health state. If not specified, + all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values, obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of deployed applications with + HealthState value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type deployed_applications_health_state_filter: int + :param services_health_state_filter: Allows filtering of the services health state objects + returned in the result of services health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only services that match the filter are returned. All services are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of services with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type services_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if application_health_policy is not None: + _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + _json = None + + request = build_get_application_health_using_policy_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + deployed_applications_health_state_filter=deployed_applications_health_state_filter, + services_health_state_filter=services_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + template_url=self.get_application_health_using_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_health_using_policy.metadata = {'url': "/Applications/{applicationId}/$/GetHealth"} # type: ignore + + + @distributed_trace + def report_application_health( # pylint: disable=inconsistent-return-statements + self, + application_id, # type: str + health_information, # type: "_models.HealthInformation" + immediate=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Sends a health report on the Service Fabric application. + + Reports health state of the specified Service Fabric application. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway Application, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, get application health and check + that the report appears in the HealthEvents section. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :type immediate: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(health_information, 'HealthInformation') + + request = build_report_application_health_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + template_url=self.report_application_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + report_application_health.metadata = {'url': "/Applications/{applicationId}/$/ReportHealth"} # type: ignore + + + @distributed_trace + def start_application_upgrade( # pylint: disable=inconsistent-return-statements + self, + application_id, # type: str + application_upgrade_description, # type: "_models.ApplicationUpgradeDescription" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Starts upgrading an application in the Service Fabric cluster. + + Validates the supplied application upgrade parameters and starts upgrading the application if + the parameters are valid. + Note, `ApplicationParameter + `_\ + s are not preserved across an application upgrade. + In order to preserve current application parameters, the user should get the parameters using + `GetApplicationInfo <./GetApplicationInfo.md>`_ operation first and pass them into the upgrade + API call as shown in the example. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_upgrade_description: Parameters for an application upgrade. + :type application_upgrade_description: + ~azure.servicefabric.models.ApplicationUpgradeDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(application_upgrade_description, 'ApplicationUpgradeDescription') + + request = build_start_application_upgrade_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.start_application_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/Upgrade"} # type: ignore + + + @distributed_trace + def get_application_upgrade( + self, + application_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ApplicationUpgradeProgressInfo" + """Gets details for the latest upgrade performed on this application. + + Returns information about the state of the latest application upgrade along with details to aid + debugging application health issues. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationUpgradeProgressInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationUpgradeProgressInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationUpgradeProgressInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_upgrade_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_application_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationUpgradeProgressInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/GetUpgradeProgress"} # type: ignore + + + @distributed_trace + def update_application_upgrade( # pylint: disable=inconsistent-return-statements + self, + application_id, # type: str + application_upgrade_update_description, # type: "_models.ApplicationUpgradeUpdateDescription" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Updates an ongoing application upgrade in the Service Fabric cluster. + + Updates the parameters of an ongoing application upgrade from the ones specified at the time of + starting the application upgrade. This may be required to mitigate stuck application upgrades + due to incorrect parameters or issues in the application to make progress. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_upgrade_update_description: Parameters for updating an existing application + upgrade. + :type application_upgrade_update_description: + ~azure.servicefabric.models.ApplicationUpgradeUpdateDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(application_upgrade_update_description, 'ApplicationUpgradeUpdateDescription') + + request = build_update_application_upgrade_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.update_application_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + update_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/UpdateUpgrade"} # type: ignore + + + @distributed_trace + def update_application( # pylint: disable=inconsistent-return-statements + self, + application_id, # type: str + application_update_description, # type: "_models.ApplicationUpdateDescription" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Updates a Service Fabric application. + + Updates a Service Fabric application instance. The set of properties that can be updated are a + subset of the properties that were specified at the time of creating the application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_update_description: Parameters for updating an existing application + instance. + :type application_update_description: ~azure.servicefabric.models.ApplicationUpdateDescription + :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. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(application_update_description, 'ApplicationUpdateDescription') + + request = build_update_application_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.update_application.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + update_application.metadata = {'url': "/Applications/{applicationId}/$/Update"} # type: ignore + + + @distributed_trace + def resume_application_upgrade( # pylint: disable=inconsistent-return-statements + self, + application_id, # type: str + upgrade_domain_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Resumes upgrading an application in the Service Fabric cluster. + + Resumes an unmonitored manual Service Fabric application upgrade. Service Fabric upgrades one + upgrade domain at a time. For unmonitored manual upgrades, after Service Fabric finishes an + upgrade domain, it waits for you to call this API before proceeding to the next upgrade domain. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param upgrade_domain_name: The name of the upgrade domain in which to resume the upgrade. + :type upgrade_domain_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _resume_application_upgrade_description = _models.ResumeApplicationUpgradeDescription(upgrade_domain_name=upgrade_domain_name) + _json = self._serialize.body(_resume_application_upgrade_description, 'ResumeApplicationUpgradeDescription') + + request = build_resume_application_upgrade_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.resume_application_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + resume_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/MoveToNextUpgradeDomain"} # type: ignore + + + @distributed_trace + def rollback_application_upgrade( # pylint: disable=inconsistent-return-statements + self, + application_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Starts rolling back the currently on-going upgrade of an application in the Service Fabric + cluster. + + Starts rolling back the current application upgrade to the previous version. This API can only + be used to roll back the current in-progress upgrade that is rolling forward to new version. If + the application is not currently being upgraded use StartApplicationUpgrade API to upgrade it + to desired version, including rolling back to a previous version. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_rollback_application_upgrade_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + template_url=self.rollback_application_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + rollback_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/RollbackUpgrade"} # type: ignore + + + @distributed_trace + def get_deployed_application_info_list( + self, + node_name, # type: str + timeout=60, # type: Optional[int] + include_health_state=False, # type: Optional[bool] + continuation_token_parameter=None, # type: Optional[str] + max_results=0, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedDeployedApplicationInfoList" + """Gets the list of applications deployed on a Service Fabric node. + + Gets the list of applications deployed on a Service Fabric node. The results do not include + information about deployed system applications unless explicitly queried for by ID. Results + encompass deployed applications in active, activating, and downloading states. This query + requires that the node name corresponds to a node on the cluster. The query fails if the + provided node name does not point to any active Service Fabric nodes on the cluster. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param include_health_state: Include the health state of an entity. + If this parameter is false or not specified, then the health state returned is "Unknown". + When set to true, the query goes in parallel to the node and the health system service before + the results are merged. + As a result, the query is more expensive and may take a longer time. Default value is False. + :type include_health_state: bool + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedDeployedApplicationInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedDeployedApplicationInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedDeployedApplicationInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_application_info_list_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + include_health_state=include_health_state, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + template_url=self.get_deployed_application_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedDeployedApplicationInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_application_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications"} # type: ignore + + + @distributed_trace + def get_deployed_application_info( + self, + node_name, # type: str + application_id, # type: str + timeout=60, # type: Optional[int] + include_health_state=False, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.DeployedApplicationInfo"] + """Gets the information about an application deployed on a Service Fabric node. + + This query returns system application information if the application ID provided is for system + application. Results encompass deployed applications in active, activating, and downloading + states. This query requires that the node name corresponds to a node on the cluster. The query + fails if the provided node name does not point to any active Service Fabric nodes on the + cluster. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param include_health_state: Include the health state of an entity. + If this parameter is false or not specified, then the health state returned is "Unknown". + When set to true, the query goes in parallel to the node and the health system service before + the results are merged. + As a result, the query is more expensive and may take a longer time. Default value is False. + :type include_health_state: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeployedApplicationInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.DeployedApplicationInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.DeployedApplicationInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_application_info_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + timeout=timeout, + include_health_state=include_health_state, + template_url=self.get_deployed_application_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DeployedApplicationInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_application_info.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}"} # type: ignore + + + @distributed_trace + def get_deployed_application_health( + self, + node_name, # type: str + application_id, # type: str + events_health_state_filter=0, # type: Optional[int] + deployed_service_packages_health_state_filter=0, # type: Optional[int] + exclude_health_statistics=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.DeployedApplicationHealth" + """Gets the information about health of an application deployed on a Service Fabric node. + + Gets the information about health of an application deployed on a Service Fabric node. Use + EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported + on the deployed application based on health state. Use DeployedServicePackagesHealthStateFilter + to optionally filter for DeployedServicePackageHealth children based on health state. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param deployed_service_packages_health_state_filter: Allows filtering of the deployed service + package health state objects returned in the result of deployed application health query based + on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only deployed service packages that match the filter are returned. All deployed service + packages are used to evaluate the aggregated health state of the deployed application. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value can be a combination of these + values, obtained using the bitwise 'OR' operator. + For example, if the provided value is 6 then health state of service packages with HealthState + value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type deployed_service_packages_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeployedApplicationHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.DeployedApplicationHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedApplicationHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_application_health_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + deployed_service_packages_health_state_filter=deployed_service_packages_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + template_url=self.get_deployed_application_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeployedApplicationHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_application_health.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth"} # type: ignore + + + @distributed_trace + def get_deployed_application_health_using_policy( + self, + node_name, # type: str + application_id, # type: str + events_health_state_filter=0, # type: Optional[int] + deployed_service_packages_health_state_filter=0, # type: Optional[int] + exclude_health_statistics=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + application_health_policy=None, # type: Optional["_models.ApplicationHealthPolicy"] + **kwargs # type: Any + ): + # type: (...) -> "_models.DeployedApplicationHealth" + """Gets the information about health of an application deployed on a Service Fabric node. using + the specified policy. + + Gets the information about health of an application deployed on a Service Fabric node using the + specified policy. Use EventsHealthStateFilter to optionally filter for the collection of + HealthEvent objects reported on the deployed application based on health state. Use + DeployedServicePackagesHealthStateFilter to optionally filter for DeployedServicePackageHealth + children based on health state. Use ApplicationHealthPolicy to optionally override the health + policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the + ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the + deployed application. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param deployed_service_packages_health_state_filter: Allows filtering of the deployed service + package health state objects returned in the result of deployed application health query based + on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only deployed service packages that match the filter are returned. All deployed service + packages are used to evaluate the aggregated health state of the deployed application. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value can be a combination of these + values, obtained using the bitwise 'OR' operator. + For example, if the provided value is 6 then health state of service packages with HealthState + value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type deployed_service_packages_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeployedApplicationHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.DeployedApplicationHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedApplicationHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if application_health_policy is not None: + _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + _json = None + + request = build_get_deployed_application_health_using_policy_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + deployed_service_packages_health_state_filter=deployed_service_packages_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + template_url=self.get_deployed_application_health_using_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeployedApplicationHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_application_health_using_policy.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth"} # type: ignore + + + @distributed_trace + def report_deployed_application_health( # pylint: disable=inconsistent-return-statements + self, + node_name, # type: str + application_id, # type: str + health_information, # type: "_models.HealthInformation" + immediate=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Sends a health report on the Service Fabric application deployed on a Service Fabric node. + + Reports health state of the application deployed on a Service Fabric node. The report must + contain the information about the source of the health report and property on which it is + reported. + The report is sent to a Service Fabric gateway Service, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, get deployed application health and + check that the report appears in the HealthEvents section. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :type immediate: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(health_information, 'HealthInformation') + + request = build_report_deployed_application_health_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + template_url=self.report_deployed_application_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + report_deployed_application_health.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/ReportHealth"} # type: ignore + + + @distributed_trace + def get_application_manifest( + self, + application_type_name, # type: str + application_type_version, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ApplicationTypeManifest" + """Gets the manifest describing an application type. + + The response contains the application manifest XML as a string. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :type application_type_version: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationTypeManifest, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationTypeManifest + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationTypeManifest"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_manifest_request( + application_type_name=application_type_name, + api_version=api_version, + application_type_version=application_type_version, + timeout=timeout, + template_url=self.get_application_manifest.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationTypeManifest', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_manifest.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/GetApplicationManifest"} # type: ignore + + + @distributed_trace + def update_application_arm_metadata( # pylint: disable=inconsistent-return-statements + self, + application_id, # type: str + timeout=60, # type: Optional[int] + force=None, # type: Optional[bool] + arm_resource_id=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + """Updates the Arm Metadata for a specific Application. + + Updates the Arm Metadata for a specific Application. Is able to be called immediately after the + create app API is called. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param force: Force parameter used to prevent accidental Arm metadata update. Default value is + None. + :type force: bool + :param arm_resource_id: A string containing the ArmResourceId. Default value is None. + :type arm_resource_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _application_arm_metadata_update_description = _models.ArmMetadata(arm_resource_id=arm_resource_id) + _json = self._serialize.body(_application_arm_metadata_update_description, 'ArmMetadata') + + request = build_update_application_arm_metadata_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + force=force, + template_url=self.update_application_arm_metadata.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + update_application_arm_metadata.metadata = {'url': "/Applications/{applicationId}/$/UpdateArmMetadata"} # type: ignore + + + @distributed_trace + def get_service_info_list( + self, + application_id, # type: str + service_type_name=None, # type: Optional[str] + continuation_token_parameter=None, # type: Optional[str] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedServiceInfoList" + """Gets the information about all services belonging to the application specified by the + application ID. + + Returns the information about all services belonging to the application specified by the + application ID. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_type_name: The service type name used to filter the services to query for. + Default value is None. + :type service_type_name: str + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedServiceInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedServiceInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedServiceInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_info_list_request( + application_id=application_id, + api_version=api_version, + service_type_name=service_type_name, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + template_url=self.get_service_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedServiceInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_info_list.metadata = {'url': "/Applications/{applicationId}/$/GetServices"} # type: ignore + + + @distributed_trace + def get_service_info( + self, + application_id, # type: str + service_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ServiceInfo"] + """Gets the information about the specific service belonging to the Service Fabric application. + + Returns the information about the specified service belonging to the specified Service Fabric + application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServiceInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_info_request( + application_id=application_id, + service_id=service_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_service_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServiceInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_info.metadata = {'url': "/Applications/{applicationId}/$/GetServices/{serviceId}"} # type: ignore + + + @distributed_trace + def get_application_name_info( + self, + service_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ApplicationNameInfo" + """Gets the name of the Service Fabric application for a service. + + Gets the name of the application for the specified service. A 404 + FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the provided service ID + does not exist. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationNameInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ApplicationNameInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationNameInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_name_info_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_application_name_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationNameInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_name_info.metadata = {'url': "/Services/{serviceId}/$/GetApplicationName"} # type: ignore + + + @distributed_trace + def create_service( # pylint: disable=inconsistent-return-statements + self, + application_id, # type: str + service_description, # type: "_models.ServiceDescription" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Creates the specified Service Fabric service. + + This api allows creating a new Service Fabric stateless or stateful service under a specified + Service Fabric application. The description for creating the service includes partitioning + information and optional properties for placement and load balancing. Some of the properties + can later be modified using ``UpdateService`` API. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_description: The information necessary to create a service. + :type service_description: ~azure.servicefabric.models.ServiceDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(service_description, 'ServiceDescription') + + request = build_create_service_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.create_service.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + create_service.metadata = {'url': "/Applications/{applicationId}/$/GetServices/$/Create"} # type: ignore + + + @distributed_trace + def create_service_from_template( # pylint: disable=inconsistent-return-statements + self, + application_id, # type: str + service_from_template_description, # type: "_models.ServiceFromTemplateDescription" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Creates a Service Fabric service from the service template. + + Creates a Service Fabric service from the service template defined in the application manifest. + A service template contains the properties that will be same for the service instance of the + same type. The API allows overriding the properties that are usually different for different + services of the same service type. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_from_template_description: Describes the service that needs to be created from + the template defined in the application manifest. + :type service_from_template_description: + ~azure.servicefabric.models.ServiceFromTemplateDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(service_from_template_description, 'ServiceFromTemplateDescription') + + request = build_create_service_from_template_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.create_service_from_template.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + create_service_from_template.metadata = {'url': "/Applications/{applicationId}/$/GetServices/$/CreateFromTemplate"} # type: ignore + + + @distributed_trace + def delete_service( # pylint: disable=inconsistent-return-statements + self, + service_id, # type: str + force_remove=None, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes an existing Service Fabric service. + + A service must be created before it can be deleted. By default, Service Fabric will try to + close service replicas in a graceful manner and then delete the service. However, if the + service is having issues closing the replica gracefully, the delete operation may take a long + time or get stuck. Use the optional ForceRemove flag to skip the graceful close sequence and + forcefully delete the service. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param force_remove: Remove a Service Fabric application or service forcefully without going + through the graceful shutdown sequence. This parameter can be used to forcefully delete an + application or service for which delete is timing out due to issues in the service code that + prevents graceful close of replicas. Default value is None. + :type force_remove: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_service_request( + service_id=service_id, + api_version=api_version, + force_remove=force_remove, + timeout=timeout, + template_url=self.delete_service.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_service.metadata = {'url': "/Services/{serviceId}/$/Delete"} # type: ignore + + + @distributed_trace + def update_service( # pylint: disable=inconsistent-return-statements + self, + service_id, # type: str + service_update_description, # type: "_models.ServiceUpdateDescription" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Updates a Service Fabric service using the specified update description. + + This API allows updating properties of a running Service Fabric service. The set of properties + that can be updated are a subset of the properties that were specified at the time of creating + the service. The current set of properties can be obtained using ``GetServiceDescription`` API. + Note that updating the properties of a running service is different than upgrading your + application using ``StartApplicationUpgrade`` API. The upgrade is a long running background + operation that involves moving the application from one version to another, one upgrade domain + at a time, whereas update applies the new properties immediately to the service. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param service_update_description: The information necessary to update a service. + :type service_update_description: ~azure.servicefabric.models.ServiceUpdateDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(service_update_description, 'ServiceUpdateDescription') + + request = build_update_service_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.update_service.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + update_service.metadata = {'url': "/Services/{serviceId}/$/Update"} # type: ignore + + + @distributed_trace + def get_service_description( + self, + service_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ServiceDescription" + """Gets the description of an existing Service Fabric service. + + Gets the description of an existing Service Fabric service. A service must be created before + its description can be obtained. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_description_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_service_description.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_description.metadata = {'url': "/Services/{serviceId}/$/GetDescription"} # type: ignore + + + @distributed_trace + def get_service_health( + self, + service_id, # type: str + events_health_state_filter=0, # type: Optional[int] + partitions_health_state_filter=0, # type: Optional[int] + exclude_health_statistics=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ServiceHealth" + """Gets the health of the specified Service Fabric service. + + Gets the health information of the specified service. + Use EventsHealthStateFilter to filter the collection of health events reported on the service + based on the health state. + Use PartitionsHealthStateFilter to filter the collection of partitions returned. + If you specify a service that does not exist in the health store, this request returns an + error. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param partitions_health_state_filter: Allows filtering of the partitions health state objects + returned in the result of service health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only partitions that match the filter are returned. All partitions are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these value + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of partitions with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type partitions_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_health_request( + service_id=service_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + partitions_health_state_filter=partitions_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + template_url=self.get_service_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_health.metadata = {'url': "/Services/{serviceId}/$/GetHealth"} # type: ignore + + + @distributed_trace + def get_service_health_using_policy( + self, + service_id, # type: str + events_health_state_filter=0, # type: Optional[int] + partitions_health_state_filter=0, # type: Optional[int] + exclude_health_statistics=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + application_health_policy=None, # type: Optional["_models.ApplicationHealthPolicy"] + **kwargs # type: Any + ): + # type: (...) -> "_models.ServiceHealth" + """Gets the health of the specified Service Fabric service, by using the specified health policy. + + Gets the health information of the specified service. + If the application health policy is specified, the health evaluation uses it to get the + aggregated health state. + If the policy is not specified, the health evaluation uses the application health policy + defined in the application manifest, or the default health policy, if no policy is defined in + the manifest. + Use EventsHealthStateFilter to filter the collection of health events reported on the service + based on the health state. + Use PartitionsHealthStateFilter to filter the collection of partitions returned. + If you specify a service that does not exist in the health store, this request returns an + error. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param partitions_health_state_filter: Allows filtering of the partitions health state objects + returned in the result of service health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only partitions that match the filter are returned. All partitions are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these value + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of partitions with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type partitions_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if application_health_policy is not None: + _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + _json = None + + request = build_get_service_health_using_policy_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + partitions_health_state_filter=partitions_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + template_url=self.get_service_health_using_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_health_using_policy.metadata = {'url': "/Services/{serviceId}/$/GetHealth"} # type: ignore + + + @distributed_trace + def report_service_health( # pylint: disable=inconsistent-return-statements + self, + service_id, # type: str + health_information, # type: "_models.HealthInformation" + immediate=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Sends a health report on the Service Fabric service. + + Reports health state of the specified Service Fabric service. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway Service, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetServiceHealth and check that + the report appears in the HealthEvents section. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :type immediate: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(health_information, 'HealthInformation') + + request = build_report_service_health_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + template_url=self.report_service_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + report_service_health.metadata = {'url': "/Services/{serviceId}/$/ReportHealth"} # type: ignore + + + @distributed_trace + def resolve_service( + self, + service_id, # type: str + partition_key_type=None, # type: Optional[int] + partition_key_value=None, # type: Optional[str] + previous_rsp_version=None, # type: Optional[str] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ResolvedServicePartition" + """Resolve a Service Fabric partition. + + Resolve a Service Fabric service partition to get the endpoints of the service replicas. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_key_type: Key type for the partition. This parameter is required if the + partition scheme for the service is Int64Range or Named. The possible values are following. + + + * None (1) - Indicates that the PartitionKeyValue parameter is not specified. This is valid + for the partitions with partitioning scheme as Singleton. This is the default value. The value + is 1. + * Int64Range (2) - Indicates that the PartitionKeyValue parameter is an int64 partition key. + This is valid for the partitions with partitioning scheme as Int64Range. The value is 2. + * Named (3) - Indicates that the PartitionKeyValue parameter is a name of the partition. This + is valid for the partitions with partitioning scheme as Named. The value is 3. Default value is + None. + :type partition_key_type: int + :param partition_key_value: Partition key. This is required if the partition scheme for the + service is Int64Range or Named. + This is not the partition ID, but rather, either the integer key value, or the name of the + partition ID. + For example, if your service is using ranged partitions from 0 to 10, then they + PartitionKeyValue would be an + integer in that range. Query service description to see the range or name. Default value is + None. + :type partition_key_value: str + :param previous_rsp_version: The value in the Version field of the response that was received + previously. This is required if the user knows that the result that was gotten previously is + stale. Default value is None. + :type previous_rsp_version: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResolvedServicePartition, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ResolvedServicePartition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResolvedServicePartition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_resolve_service_request( + service_id=service_id, + api_version=api_version, + partition_key_type=partition_key_type, + partition_key_value=partition_key_value, + previous_rsp_version=previous_rsp_version, + timeout=timeout, + template_url=self.resolve_service.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResolvedServicePartition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + resolve_service.metadata = {'url': "/Services/{serviceId}/$/ResolvePartition"} # type: ignore + + + @distributed_trace + def get_unplaced_replica_information( + self, + service_id, # type: str + partition_id=None, # type: Optional[str] + only_query_primaries=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.UnplacedReplicaInformation" + """Gets the information about unplaced replica of the service. + + Returns the information about the unplaced replicas of the service. + If PartitionId is specified, then result will contain information only about unplaced replicas + for that partition. + If PartitionId is not specified, then result will contain information about unplaced replicas + for all partitions of that service. + If OnlyQueryPrimaries is set to true, then result will contain information only about primary + replicas, and will ignore unplaced secondary replicas. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. Default value is None. + :type partition_id: str + :param only_query_primaries: Indicates that unplaced replica information will be queries only + for primary replicas. Default value is False. + :type only_query_primaries: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UnplacedReplicaInformation, or the result of cls(response) + :rtype: ~azure.servicefabric.models.UnplacedReplicaInformation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UnplacedReplicaInformation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_unplaced_replica_information_request( + service_id=service_id, + api_version=api_version, + partition_id=partition_id, + only_query_primaries=only_query_primaries, + timeout=timeout, + template_url=self.get_unplaced_replica_information.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UnplacedReplicaInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_unplaced_replica_information.metadata = {'url': "/Services/{serviceId}/$/GetUnplacedReplicaInformation"} # type: ignore + + + @distributed_trace + def get_loaded_partition_info_list( + self, + metric_name, # type: str + service_name=None, # type: Optional[str] + ordering=None, # type: Optional[Union[str, "_models.Ordering"]] + max_results=0, # type: Optional[int] + continuation_token_parameter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.LoadedPartitionInformationResultList" + """Gets ordered list of partitions. + + Retrieves partitions which are most/least loaded according to specified metric. + + :param metric_name: Name of the metric based on which to get ordered list of partitions. + :type metric_name: str + :param service_name: The name of a service. Default value is None. + :type service_name: str + :param ordering: Ordering of partitions' load. Default value is None. + :type ordering: str or ~azure.servicefabric.models.Ordering + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LoadedPartitionInformationResultList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.LoadedPartitionInformationResultList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadedPartitionInformationResultList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_loaded_partition_info_list_request( + api_version=api_version, + metric_name=metric_name, + service_name=service_name, + ordering=ordering, + max_results=max_results, + continuation_token_parameter=continuation_token_parameter, + template_url=self.get_loaded_partition_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LoadedPartitionInformationResultList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_loaded_partition_info_list.metadata = {'url': "/$/GetLoadedPartitionInfoList"} # type: ignore + + + @distributed_trace + def get_partition_info_list( + self, + service_id, # type: str + continuation_token_parameter=None, # type: Optional[str] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedServicePartitionInfoList" + """Gets the list of partitions of a Service Fabric service. + + The response includes the partition ID, partitioning scheme information, keys supported by the + partition, status, health, and other details about the partition. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedServicePartitionInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedServicePartitionInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedServicePartitionInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_info_list_request( + service_id=service_id, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + template_url=self.get_partition_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedServicePartitionInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_info_list.metadata = {'url': "/Services/{serviceId}/$/GetPartitions"} # type: ignore + + + @distributed_trace + def get_partition_info( + self, + partition_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ServicePartitionInfo"] + """Gets the information about a Service Fabric partition. + + Gets the information about the specified partition. The response includes the partition ID, + partitioning scheme information, keys supported by the partition, status, health, and other + details about the partition. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServicePartitionInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServicePartitionInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServicePartitionInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_info_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_partition_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServicePartitionInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_info.metadata = {'url': "/Partitions/{partitionId}"} # type: ignore + + + @distributed_trace + def get_service_name_info( + self, + partition_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ServiceNameInfo" + """Gets the name of the Service Fabric service for a partition. + + Gets name of the service for the specified partition. A 404 error is returned if the partition + ID does not exist in the cluster. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceNameInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ServiceNameInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceNameInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_name_info_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_service_name_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceNameInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_name_info.metadata = {'url': "/Partitions/{partitionId}/$/GetServiceName"} # type: ignore + + + @distributed_trace + def get_partition_health( + self, + partition_id, # type: str + events_health_state_filter=0, # type: Optional[int] + replicas_health_state_filter=0, # type: Optional[int] + exclude_health_statistics=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PartitionHealth" + """Gets the health of the specified Service Fabric partition. + + Use EventsHealthStateFilter to filter the collection of health events reported on the service + based on the health state. + Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the + partition. + If you specify a partition that does not exist in the health store, this request returns an + error. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param replicas_health_state_filter: Allows filtering the collection of ReplicaHealthState + objects on the partition. The value can be obtained from members or bitwise operations on + members of HealthStateFilter. Only replicas that match the filter will be returned. All + replicas will be used to evaluate the aggregated health state. If not specified, all entries + will be returned.The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. For example, If the provided + value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be + returned. The possible values for this parameter include integer value of one of the following + health states. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type replicas_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PartitionHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PartitionHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_health_request( + partition_id=partition_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + replicas_health_state_filter=replicas_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + template_url=self.get_partition_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PartitionHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_health.metadata = {'url': "/Partitions/{partitionId}/$/GetHealth"} # type: ignore + + + @distributed_trace + def get_partition_health_using_policy( + self, + partition_id, # type: str + events_health_state_filter=0, # type: Optional[int] + replicas_health_state_filter=0, # type: Optional[int] + exclude_health_statistics=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + application_health_policy=None, # type: Optional["_models.ApplicationHealthPolicy"] + **kwargs # type: Any + ): + # type: (...) -> "_models.PartitionHealth" + """Gets the health of the specified Service Fabric partition, by using the specified health + policy. + + Gets the health information of the specified partition. + If the application health policy is specified, the health evaluation uses it to get the + aggregated health state. + If the policy is not specified, the health evaluation uses the application health policy + defined in the application manifest, or the default health policy, if no policy is defined in + the manifest. + Use EventsHealthStateFilter to filter the collection of health events reported on the partition + based on the health state. + Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the + partition. Use ApplicationHealthPolicy in the POST body to override the health policies used to + evaluate the health. + If you specify a partition that does not exist in the health store, this request returns an + error. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param replicas_health_state_filter: Allows filtering the collection of ReplicaHealthState + objects on the partition. The value can be obtained from members or bitwise operations on + members of HealthStateFilter. Only replicas that match the filter will be returned. All + replicas will be used to evaluate the aggregated health state. If not specified, all entries + will be returned.The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. For example, If the provided + value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be + returned. The possible values for this parameter include integer value of one of the following + health states. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type replicas_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned as + part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PartitionHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PartitionHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if application_health_policy is not None: + _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + _json = None + + request = build_get_partition_health_using_policy_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + replicas_health_state_filter=replicas_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + template_url=self.get_partition_health_using_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PartitionHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_health_using_policy.metadata = {'url': "/Partitions/{partitionId}/$/GetHealth"} # type: ignore + + + @distributed_trace + def report_partition_health( # pylint: disable=inconsistent-return-statements + self, + partition_id, # type: str + health_information, # type: "_models.HealthInformation" + immediate=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Sends a health report on the Service Fabric partition. + + Reports health state of the specified Service Fabric partition. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway Partition, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetPartitionHealth and check + that the report appears in the HealthEvents section. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :type immediate: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(health_information, 'HealthInformation') + + request = build_report_partition_health_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + template_url=self.report_partition_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + report_partition_health.metadata = {'url': "/Partitions/{partitionId}/$/ReportHealth"} # type: ignore + + + @distributed_trace + def get_partition_load_information( + self, + partition_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PartitionLoadInformation" + """Gets the load information of the specified Service Fabric partition. + + Returns information about the load of a specified partition. + The response includes a list of load reports for a Service Fabric partition. + Each report includes the load metric name, value, and last reported time in UTC. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PartitionLoadInformation, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PartitionLoadInformation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionLoadInformation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_load_information_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_partition_load_information.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PartitionLoadInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_load_information.metadata = {'url': "/Partitions/{partitionId}/$/GetLoadInformation"} # type: ignore + + + @distributed_trace + def reset_partition_load( # pylint: disable=inconsistent-return-statements + self, + partition_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Resets the current load of a Service Fabric partition. + + Resets the current load of a Service Fabric partition to the default load for the service. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_reset_partition_load_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.reset_partition_load.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reset_partition_load.metadata = {'url': "/Partitions/{partitionId}/$/ResetLoad"} # type: ignore + + + @distributed_trace + def recover_partition( # pylint: disable=inconsistent-return-statements + self, + partition_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Indicates to the Service Fabric cluster that it should attempt to recover a specific partition + that is currently stuck in quorum loss. + + This operation should only be performed if it is known that the replicas that are down cannot + be recovered. Incorrect use of this API can cause potential data loss. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_recover_partition_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.recover_partition.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + recover_partition.metadata = {'url': "/Partitions/{partitionId}/$/Recover"} # type: ignore + + + @distributed_trace + def recover_service_partitions( # pylint: disable=inconsistent-return-statements + self, + service_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Indicates to the Service Fabric cluster that it should attempt to recover the specified service + that is currently stuck in quorum loss. + + Indicates to the Service Fabric cluster that it should attempt to recover the specified service + that is currently stuck in quorum loss. This operation should only be performed if it is known + that the replicas that are down cannot be recovered. Incorrect use of this API can cause + potential data loss. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_recover_service_partitions_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + template_url=self.recover_service_partitions.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + recover_service_partitions.metadata = {'url': "/Services/$/{serviceId}/$/GetPartitions/$/Recover"} # type: ignore + + + @distributed_trace + def recover_system_partitions( # pylint: disable=inconsistent-return-statements + self, + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Indicates to the Service Fabric cluster that it should attempt to recover the system services + that are currently stuck in quorum loss. + + Indicates to the Service Fabric cluster that it should attempt to recover the system services + that are currently stuck in quorum loss. This operation should only be performed if it is known + that the replicas that are down cannot be recovered. Incorrect use of this API can cause + potential data loss. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_recover_system_partitions_request( + api_version=api_version, + timeout=timeout, + template_url=self.recover_system_partitions.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + recover_system_partitions.metadata = {'url': "/$/RecoverSystemPartitions"} # type: ignore + + + @distributed_trace + def recover_all_partitions( # pylint: disable=inconsistent-return-statements + self, + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Indicates to the Service Fabric cluster that it should attempt to recover any services + (including system services) which are currently stuck in quorum loss. + + This operation should only be performed if it is known that the replicas that are down cannot + be recovered. Incorrect use of this API can cause potential data loss. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_recover_all_partitions_request( + api_version=api_version, + timeout=timeout, + template_url=self.recover_all_partitions.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + recover_all_partitions.metadata = {'url': "/$/RecoverAllPartitions"} # type: ignore + + + @distributed_trace + def move_primary_replica( # pylint: disable=inconsistent-return-statements + self, + partition_id, # type: str + node_name=None, # type: Optional[str] + ignore_constraints=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Moves the primary replica of a partition of a stateful service. + + This command moves the primary replica of a partition of a stateful service, respecting all + constraints. + If NodeName parameter is specified, primary will be moved to the specified node (if constraints + allow it). + If NodeName parameter is not specified, primary replica will be moved to a random node in the + cluster. + If IgnoreConstraints parameter is specified and set to true, then primary will be moved + regardless of the constraints. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param node_name: The name of the node. Default value is None. + :type node_name: str + :param ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :type ignore_constraints: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_move_primary_replica_request( + partition_id=partition_id, + api_version=api_version, + node_name=node_name, + ignore_constraints=ignore_constraints, + timeout=timeout, + template_url=self.move_primary_replica.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + move_primary_replica.metadata = {'url': "/Partitions/{partitionId}/$/MovePrimaryReplica"} # type: ignore + + + @distributed_trace + def move_secondary_replica( # pylint: disable=inconsistent-return-statements + self, + partition_id, # type: str + current_node_name, # type: str + new_node_name=None, # type: Optional[str] + ignore_constraints=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Moves the secondary replica of a partition of a stateful service. + + This command moves the secondary replica of a partition of a stateful service, respecting all + constraints. + CurrentNodeName parameter must be specified to identify the replica that is moved. + Source node name must be specified, but new node name can be omitted, and in that case replica + is moved to a random node. + If IgnoreConstraints parameter is specified and set to true, then secondary will be moved + regardless of the constraints. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param current_node_name: The name of the source node for secondary replica move. + :type current_node_name: str + :param new_node_name: The name of the target node for secondary replica or instance move. If + not specified, replica or instance is moved to a random node. Default value is None. + :type new_node_name: str + :param ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :type ignore_constraints: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_move_secondary_replica_request( + partition_id=partition_id, + api_version=api_version, + current_node_name=current_node_name, + new_node_name=new_node_name, + ignore_constraints=ignore_constraints, + timeout=timeout, + template_url=self.move_secondary_replica.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + move_secondary_replica.metadata = {'url': "/Partitions/{partitionId}/$/MoveSecondaryReplica"} # type: ignore + + + @distributed_trace + def update_partition_load( + self, + partition_metric_load_description_list, # type: List["_models.PartitionMetricLoadDescription"] + continuation_token_parameter=None, # type: Optional[str] + max_results=0, # type: Optional[int] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedUpdatePartitionLoadResultList" + """Update the loads of provided partitions for specific metrics. + + Updates the load value and predicted load value for all the partitions provided for specified + metrics. + + :param partition_metric_load_description_list: Description of updating load for list of + partitions. + :type partition_metric_load_description_list: + list[~azure.servicefabric.models.PartitionMetricLoadDescription] + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedUpdatePartitionLoadResultList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedUpdatePartitionLoadResultList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedUpdatePartitionLoadResultList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(partition_metric_load_description_list, '[PartitionMetricLoadDescription]') + + request = build_update_partition_load_request( + api_version=api_version, + content_type=content_type, + json=_json, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.update_partition_load.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedUpdatePartitionLoadResultList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_partition_load.metadata = {'url': "/$/UpdatePartitionLoad"} # type: ignore + + + @distributed_trace + def move_instance( # pylint: disable=inconsistent-return-statements + self, + service_id, # type: str + partition_id, # type: str + current_node_name=None, # type: Optional[str] + new_node_name=None, # type: Optional[str] + ignore_constraints=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Moves the instance of a partition of a stateless service. + + This command moves the instance of a partition of a stateless service, respecting all + constraints. + Partition id and service name must be specified to be able to move the instance. + CurrentNodeName when specified identifies the instance that is moved. If not specified, random + instance will be moved + New node name can be omitted, and in that case instance is moved to a random node. + If IgnoreConstraints parameter is specified and set to true, then instance will be moved + regardless of the constraints. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param current_node_name: The name of the source node for instance move. If not specified, + instance is moved from a random node. Default value is None. + :type current_node_name: str + :param new_node_name: The name of the target node for secondary replica or instance move. If + not specified, replica or instance is moved to a random node. Default value is None. + :type new_node_name: str + :param ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :type ignore_constraints: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_move_instance_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + current_node_name=current_node_name, + new_node_name=new_node_name, + ignore_constraints=ignore_constraints, + timeout=timeout, + template_url=self.move_instance.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + move_instance.metadata = {'url': "/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveInstance"} # type: ignore + + + @distributed_trace + def move_auxiliary_replica( # pylint: disable=inconsistent-return-statements + self, + service_id, # type: str + partition_id, # type: str + current_node_name=None, # type: Optional[str] + new_node_name=None, # type: Optional[str] + ignore_constraints=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Moves the auxiliary replica of a partition of a stateful service. + + This command moves the auxiliary replica of a partition of a stateful service, respecting all + constraints. + CurrentNodeName can be omitted, and in that case a random auxiliary replica is chosen. + NewNodeName can be omitted, and in that case the auxiliary replica is moved to a random node. + If IgnoreConstraints parameter is specified and set to true, then auxiliary will be moved + regardless of the constraints. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param current_node_name: The name of the source node for instance move. If not specified, + instance is moved from a random node. Default value is None. + :type current_node_name: str + :param new_node_name: The name of the target node for secondary replica or instance move. If + not specified, replica or instance is moved to a random node. Default value is None. + :type new_node_name: str + :param ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :type ignore_constraints: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_move_auxiliary_replica_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + current_node_name=current_node_name, + new_node_name=new_node_name, + ignore_constraints=ignore_constraints, + timeout=timeout, + template_url=self.move_auxiliary_replica.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + move_auxiliary_replica.metadata = {'url': "/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveAuxiliaryReplica"} # type: ignore + + + @distributed_trace + def create_repair_task( + self, + repair_task, # type: "_models.RepairTask" + **kwargs # type: Any + ): + # type: (...) -> "_models.RepairTaskUpdateInfo" + """Creates a new repair task. + + For clusters that have the Repair Manager Service configured, + this API provides a way to create repair tasks that run automatically or manually. + For repair tasks that run automatically, an appropriate repair executor + must be running for each repair action to run automatically. + These are currently only available in specially-configured Azure Cloud Services. + + To create a manual repair task, provide the set of impacted node names and the + expected impact. When the state of the created repair task changes to approved, + you can safely perform repair actions on those nodes. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task: Describes the repair task to be created or updated. + :type repair_task: ~azure.servicefabric.models.RepairTask + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RepairTaskUpdateInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(repair_task, 'RepairTask') + + request = build_create_repair_task_request( + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_repair_task.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_repair_task.metadata = {'url': "/$/CreateRepairTask"} # type: ignore + + + @distributed_trace + def cancel_repair_task( + self, + repair_task_cancel_description, # type: "_models.RepairTaskCancelDescription" + **kwargs # type: Any + ): + # type: (...) -> "_models.RepairTaskUpdateInfo" + """Requests the cancellation of the given repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task_cancel_description: Describes the repair task to be cancelled. + :type repair_task_cancel_description: ~azure.servicefabric.models.RepairTaskCancelDescription + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RepairTaskUpdateInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(repair_task_cancel_description, 'RepairTaskCancelDescription') + + request = build_cancel_repair_task_request( + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.cancel_repair_task.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + cancel_repair_task.metadata = {'url': "/$/CancelRepairTask"} # type: ignore + + + @distributed_trace + def delete_repair_task( # pylint: disable=inconsistent-return-statements + self, + task_id, # type: str + version=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a completed repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param task_id: The ID of the completed repair task to be deleted. + :type task_id: str + :param version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current version of the repair task. If zero, + then no version check is performed. Default value is None. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _repair_task_delete_description = _models.RepairTaskDeleteDescription(task_id=task_id, version=version) + _json = self._serialize.body(_repair_task_delete_description, 'RepairTaskDeleteDescription') + + request = build_delete_repair_task_request( + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.delete_repair_task.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_repair_task.metadata = {'url': "/$/DeleteRepairTask"} # type: ignore + + + @distributed_trace + def get_repair_task_list( + self, + task_id_filter=None, # type: Optional[str] + state_filter=None, # type: Optional[int] + executor_filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> List["_models.RepairTask"] + """Gets a list of repair tasks matching the given filters. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param task_id_filter: The repair task ID prefix to be matched. Default value is None. + :type task_id_filter: str + :param state_filter: A bitwise-OR of the following values, specifying which task states should + be included in the result list. + + + * 1 - Created + * 2 - Claimed + * 4 - Preparing + * 8 - Approved + * 16 - Executing + * 32 - Restoring + * 64 - Completed. Default value is None. + :type state_filter: int + :param executor_filter: The name of the repair executor whose claimed tasks should be included + in the list. Default value is None. + :type executor_filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of RepairTask, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.RepairTask] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.RepairTask"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_repair_task_list_request( + api_version=api_version, + task_id_filter=task_id_filter, + state_filter=state_filter, + executor_filter=executor_filter, + template_url=self.get_repair_task_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[RepairTask]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_repair_task_list.metadata = {'url': "/$/GetRepairTaskList"} # type: ignore + + + @distributed_trace + def force_approve_repair_task( + self, + task_id, # type: str + version=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.RepairTaskUpdateInfo" + """Forces the approval of the given repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param task_id: The ID of the repair task. + :type task_id: str + :param version: The current version number of the repair task. If non-zero, then the request + will only succeed if this value matches the actual current version of the repair task. If zero, + then no version check is performed. Default value is None. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RepairTaskUpdateInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _repair_task_approve_description = _models.RepairTaskApproveDescription(task_id=task_id, version=version) + _json = self._serialize.body(_repair_task_approve_description, 'RepairTaskApproveDescription') + + request = build_force_approve_repair_task_request( + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.force_approve_repair_task.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + force_approve_repair_task.metadata = {'url': "/$/ForceApproveRepairTask"} # type: ignore + + + @distributed_trace + def update_repair_task_health_policy( + self, + repair_task_update_health_policy_description, # type: "_models.RepairTaskUpdateHealthPolicyDescription" + **kwargs # type: Any + ): + # type: (...) -> "_models.RepairTaskUpdateInfo" + """Updates the health policy of the given repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task_update_health_policy_description: Describes the repair task healthy policy + to be updated. + :type repair_task_update_health_policy_description: + ~azure.servicefabric.models.RepairTaskUpdateHealthPolicyDescription + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RepairTaskUpdateInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(repair_task_update_health_policy_description, 'RepairTaskUpdateHealthPolicyDescription') + + request = build_update_repair_task_health_policy_request( + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_repair_task_health_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_repair_task_health_policy.metadata = {'url': "/$/UpdateRepairTaskHealthPolicy"} # type: ignore + + + @distributed_trace + def update_repair_execution_state( + self, + repair_task, # type: "_models.RepairTask" + **kwargs # type: Any + ): + # type: (...) -> "_models.RepairTaskUpdateInfo" + """Updates the execution state of a repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task: Describes the repair task to be created or updated. + :type repair_task: ~azure.servicefabric.models.RepairTask + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RepairTaskUpdateInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(repair_task, 'RepairTask') + + request = build_update_repair_execution_state_request( + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_repair_execution_state.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_repair_execution_state.metadata = {'url': "/$/UpdateRepairExecutionState"} # type: ignore + + + @distributed_trace + def get_replica_info_list( + self, + partition_id, # type: str + continuation_token_parameter=None, # type: Optional[str] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedReplicaInfoList" + """Gets the information about replicas of a Service Fabric service partition. + + The GetReplicas endpoint returns information about the replicas of the specified partition. The + response includes the ID, role, status, health, node name, uptime, and other details about the + replica. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedReplicaInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedReplicaInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedReplicaInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_replica_info_list_request( + partition_id=partition_id, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + template_url=self.get_replica_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedReplicaInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_replica_info_list.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas"} # type: ignore + + + @distributed_trace + def get_replica_info( + self, + partition_id, # type: str + replica_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ReplicaInfo"] + """Gets the information about a replica of a Service Fabric partition. + + The response includes the ID, role, status, health, node name, uptime, and other details about + the replica. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ReplicaInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ReplicaInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ReplicaInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_replica_info_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_replica_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ReplicaInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_replica_info.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas/{replicaId}"} # type: ignore + + + @distributed_trace + def get_replica_health( + self, + partition_id, # type: str + replica_id, # type: str + events_health_state_filter=0, # type: Optional[int] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ReplicaHealth" + """Gets the health of a Service Fabric stateful service replica or stateless service instance. + + Gets the health of a Service Fabric replica. + Use EventsHealthStateFilter to filter the collection of health events reported on the replica + based on the health state. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ReplicaHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ReplicaHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicaHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_replica_health_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + template_url=self.get_replica_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ReplicaHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_replica_health.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth"} # type: ignore + + + @distributed_trace + def get_replica_health_using_policy( + self, + partition_id, # type: str + replica_id, # type: str + events_health_state_filter=0, # type: Optional[int] + timeout=60, # type: Optional[int] + application_health_policy=None, # type: Optional["_models.ApplicationHealthPolicy"] + **kwargs # type: Any + ): + # type: (...) -> "_models.ReplicaHealth" + """Gets the health of a Service Fabric stateful service replica or stateless service instance + using the specified policy. + + Gets the health of a Service Fabric stateful service replica or stateless service instance. + Use EventsHealthStateFilter to filter the collection of health events reported on the cluster + based on the health state. + Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the + health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The + rest of the fields are ignored while evaluating the health of the replica. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ReplicaHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ReplicaHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicaHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if application_health_policy is not None: + _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + _json = None + + request = build_get_replica_health_using_policy_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + template_url=self.get_replica_health_using_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ReplicaHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_replica_health_using_policy.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth"} # type: ignore + + + @distributed_trace + def report_replica_health( # pylint: disable=inconsistent-return-statements + self, + partition_id, # type: str + replica_id, # type: str + health_information, # type: "_models.HealthInformation" + service_kind="Stateful", # type: Union[str, "_models.ReplicaHealthReportServiceKind"] + immediate=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Sends a health report on the Service Fabric replica. + + Reports health state of the specified Service Fabric replica. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway Replica, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetReplicaHealth and check that + the report appears in the HealthEvents section. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: ~azure.servicefabric.models.HealthInformation + :param service_kind: The kind of service replica (Stateless or Stateful) for which the health + is being reported. Following are the possible values. Default value is "Stateful". + :type service_kind: str or ~azure.servicefabric.models.ReplicaHealthReportServiceKind + :param immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :type immediate: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(health_information, 'HealthInformation') + + request = build_report_replica_health_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + content_type=content_type, + json=_json, + service_kind=service_kind, + immediate=immediate, + timeout=timeout, + template_url=self.report_replica_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + report_replica_health.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/ReportHealth"} # type: ignore + + + @distributed_trace + def get_deployed_service_replica_info_list( + self, + node_name, # type: str + application_id, # type: str + partition_id=None, # type: Optional[str] + service_manifest_name=None, # type: Optional[str] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Optional[List["_models.DeployedServiceReplicaInfo"]] + """Gets the list of replicas deployed on a Service Fabric node. + + Gets the list containing the information about replicas deployed on a Service Fabric node. The + information include partition ID, replica ID, status of the replica, name of the service, name + of the service type, and other information. Use PartitionId or ServiceManifestName query + parameters to return information about the deployed replicas matching the specified values for + those parameters. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param partition_id: The identity of the partition. Default value is None. + :type partition_id: str + :param service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. Default value is None. + :type service_manifest_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of DeployedServiceReplicaInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.DeployedServiceReplicaInfo] or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[List["_models.DeployedServiceReplicaInfo"]]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_service_replica_info_list_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + partition_id=partition_id, + service_manifest_name=service_manifest_name, + timeout=timeout, + template_url=self.get_deployed_service_replica_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[DeployedServiceReplicaInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_replica_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetReplicas"} # type: ignore + + + @distributed_trace + def get_deployed_service_replica_detail_info( + self, + node_name, # type: str + partition_id, # type: str + replica_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.DeployedServiceReplicaDetailInfo" + """Gets the details of replica deployed on a Service Fabric node. + + Gets the details of the replica deployed on a Service Fabric node. The information includes + service kind, service name, current service operation, current service operation start date + time, partition ID, replica/instance ID, reported load, and other information. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeployedServiceReplicaDetailInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.DeployedServiceReplicaDetailInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedServiceReplicaDetailInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_service_replica_detail_info_request( + node_name=node_name, + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_deployed_service_replica_detail_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeployedServiceReplicaDetailInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_replica_detail_info.metadata = {'url': "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetDetail"} # type: ignore + + + @distributed_trace + def get_deployed_service_replica_detail_info_by_partition_id( + self, + node_name, # type: str + partition_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.DeployedServiceReplicaDetailInfo" + """Gets the details of replica deployed on a Service Fabric node. + + Gets the details of the replica deployed on a Service Fabric node. The information includes + service kind, service name, current service operation, current service operation start date + time, partition ID, replica/instance ID, reported load, and other information. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeployedServiceReplicaDetailInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.DeployedServiceReplicaDetailInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedServiceReplicaDetailInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_service_replica_detail_info_by_partition_id_request( + node_name=node_name, + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_deployed_service_replica_detail_info_by_partition_id.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeployedServiceReplicaDetailInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_replica_detail_info_by_partition_id.metadata = {'url': "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas"} # type: ignore + + + @distributed_trace + def restart_replica( # pylint: disable=inconsistent-return-statements + self, + node_name, # type: str + partition_id, # type: str + replica_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Restarts a service replica of a persisted service running on a node. + + Restarts a service replica of a persisted service running on a node. Warning - There are no + safety checks performed when this API is used. Incorrect use of this API can lead to + availability loss for stateful services. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_restart_replica_request( + node_name=node_name, + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + timeout=timeout, + template_url=self.restart_replica.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + restart_replica.metadata = {'url': "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Restart"} # type: ignore + + + @distributed_trace + def remove_replica( # pylint: disable=inconsistent-return-statements + self, + node_name, # type: str + partition_id, # type: str + replica_id, # type: str + force_remove=None, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Removes a service replica running on a node. + + This API simulates a Service Fabric replica failure by removing a replica from a Service Fabric + cluster. The removal closes the replica, transitions the replica to the role None, and then + removes all of the state information of the replica from the cluster. This API tests the + replica state removal path, and simulates the report fault permanent path through client APIs. + Warning - There are no safety checks performed when this API is used. Incorrect use of this API + can lead to data loss for stateful services. In addition, the forceRemove flag impacts all + other replicas hosted in the same process. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param force_remove: Remove a Service Fabric application or service forcefully without going + through the graceful shutdown sequence. This parameter can be used to forcefully delete an + application or service for which delete is timing out due to issues in the service code that + prevents graceful close of replicas. Default value is None. + :type force_remove: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_remove_replica_request( + node_name=node_name, + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + force_remove=force_remove, + timeout=timeout, + template_url=self.remove_replica.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + remove_replica.metadata = {'url': "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Delete"} # type: ignore + + + @distributed_trace + def get_deployed_service_package_info_list( + self, + node_name, # type: str + application_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> List["_models.DeployedServicePackageInfo"] + """Gets the list of service packages deployed on a Service Fabric node. + + Returns the information about the service packages deployed on a Service Fabric node for the + given application. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of DeployedServicePackageInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.DeployedServicePackageInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.DeployedServicePackageInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_service_package_info_list_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_deployed_service_package_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[DeployedServicePackageInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_package_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages"} # type: ignore + + + @distributed_trace + def get_deployed_service_package_info_list_by_name( + self, + node_name, # type: str + application_id, # type: str + service_package_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Optional[List["_models.DeployedServicePackageInfo"]] + """Gets the list of service packages deployed on a Service Fabric node matching exactly the + specified name. + + Returns the information about the service packages deployed on a Service Fabric node for the + given application. These results are of service packages whose name match exactly the service + package name specified as the parameter. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of DeployedServicePackageInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.DeployedServicePackageInfo] or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional[List["_models.DeployedServicePackageInfo"]]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_service_package_info_list_by_name_request( + node_name=node_name, + application_id=application_id, + service_package_name=service_package_name, + api_version=api_version, + timeout=timeout, + template_url=self.get_deployed_service_package_info_list_by_name.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[DeployedServicePackageInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_package_info_list_by_name.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}"} # type: ignore + + + @distributed_trace + def get_deployed_service_package_health( + self, + node_name, # type: str + application_id, # type: str + service_package_name, # type: str + events_health_state_filter=0, # type: Optional[int] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.DeployedServicePackageHealth" + """Gets the information about health of a service package for a specific application deployed for + a Service Fabric node and application. + + Gets the information about health of a service package for a specific application deployed on a + Service Fabric node. Use EventsHealthStateFilter to optionally filter for the collection of + HealthEvent objects reported on the deployed service package based on health state. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeployedServicePackageHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.DeployedServicePackageHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedServicePackageHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_service_package_health_request( + node_name=node_name, + application_id=application_id, + service_package_name=service_package_name, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + template_url=self.get_deployed_service_package_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeployedServicePackageHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_package_health.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth"} # type: ignore + + + @distributed_trace + def get_deployed_service_package_health_using_policy( + self, + node_name, # type: str + application_id, # type: str + service_package_name, # type: str + events_health_state_filter=0, # type: Optional[int] + timeout=60, # type: Optional[int] + application_health_policy=None, # type: Optional["_models.ApplicationHealthPolicy"] + **kwargs # type: Any + ): + # type: (...) -> "_models.DeployedServicePackageHealth" + """Gets the information about health of service package for a specific application deployed on a + Service Fabric node using the specified policy. + + Gets the information about health of a service package for a specific application deployed on a + Service Fabric node. using the specified policy. Use EventsHealthStateFilter to optionally + filter for the collection of HealthEvent objects reported on the deployed service package based + on health state. Use ApplicationHealthPolicy to optionally override the health policies used to + evaluate the health. This API only uses 'ConsiderWarningAsError' field of the + ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the + deployed service package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :type events_health_state_filter: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeployedServicePackageHealth, or the result of cls(response) + :rtype: ~azure.servicefabric.models.DeployedServicePackageHealth + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedServicePackageHealth"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if application_health_policy is not None: + _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + _json = None + + request = build_get_deployed_service_package_health_using_policy_request( + node_name=node_name, + application_id=application_id, + service_package_name=service_package_name, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + template_url=self.get_deployed_service_package_health_using_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeployedServicePackageHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_service_package_health_using_policy.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth"} # type: ignore + + + @distributed_trace + def report_deployed_service_package_health( # pylint: disable=inconsistent-return-statements + self, + node_name, # type: str + application_id, # type: str + service_package_name, # type: str + health_information, # type: "_models.HealthInformation" + immediate=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Sends a health report on the Service Fabric deployed service package. + + Reports health state of the service package of the application deployed on a Service Fabric + node. The report must contain the information about the source of the health report and + property on which it is reported. + The report is sent to a Service Fabric gateway Service, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, get deployed service package health + and check that the report appears in the HealthEvents section. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :type immediate: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(health_information, 'HealthInformation') + + request = build_report_deployed_service_package_health_request( + node_name=node_name, + application_id=application_id, + service_package_name=service_package_name, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + template_url=self.report_deployed_service_package_health.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + report_deployed_service_package_health.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/ReportHealth"} # type: ignore + + + @distributed_trace + def deploy_service_package_to_node( # pylint: disable=inconsistent-return-statements + self, + node_name, # type: str + deploy_service_package_to_node_description, # type: "_models.DeployServicePackageToNodeDescription" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Downloads all of the code packages associated with specified service manifest on the specified + node. + + This API provides a way to download code packages including the container images on a specific + node outside of the normal application deployment and upgrade path. This is useful for the + large code packages and container images to be present on the node before the actual + application deployment and upgrade, thus significantly reducing the total time required for the + deployment or upgrade. + + :param node_name: The name of the node. + :type node_name: str + :param deploy_service_package_to_node_description: Describes information for deploying a + service package to a Service Fabric node. + :type deploy_service_package_to_node_description: + ~azure.servicefabric.models.DeployServicePackageToNodeDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(deploy_service_package_to_node_description, 'DeployServicePackageToNodeDescription') + + request = build_deploy_service_package_to_node_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.deploy_service_package_to_node.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + deploy_service_package_to_node.metadata = {'url': "/Nodes/{nodeName}/$/DeployServicePackage"} # type: ignore + + + @distributed_trace + def get_deployed_code_package_info_list( + self, + node_name, # type: str + application_id, # type: str + service_manifest_name=None, # type: Optional[str] + code_package_name=None, # type: Optional[str] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> List["_models.DeployedCodePackageInfo"] + """Gets the list of code packages deployed on a Service Fabric node. + + Gets the list of code packages deployed on a Service Fabric node for the given application. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. Default value is None. + :type service_manifest_name: str + :param code_package_name: The name of code package specified in service manifest registered as + part of an application type in a Service Fabric cluster. Default value is None. + :type code_package_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of DeployedCodePackageInfo, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.DeployedCodePackageInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.DeployedCodePackageInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_deployed_code_package_info_list_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, + timeout=timeout, + template_url=self.get_deployed_code_package_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[DeployedCodePackageInfo]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_deployed_code_package_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages"} # type: ignore + + + @distributed_trace + def restart_deployed_code_package( # pylint: disable=inconsistent-return-statements + self, + node_name, # type: str + application_id, # type: str + restart_deployed_code_package_description, # type: "_models.RestartDeployedCodePackageDescription" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Restarts a code package deployed on a Service Fabric node in a cluster. + + Restarts a code package deployed on a Service Fabric node in a cluster. This aborts the code + package process, which will restart all the user service replicas hosted in that process. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param restart_deployed_code_package_description: Describes the deployed code package on + Service Fabric node to restart. + :type restart_deployed_code_package_description: + ~azure.servicefabric.models.RestartDeployedCodePackageDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(restart_deployed_code_package_description, 'RestartDeployedCodePackageDescription') + + request = build_restart_deployed_code_package_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.restart_deployed_code_package.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + restart_deployed_code_package.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/Restart"} # type: ignore + + + @distributed_trace + def get_container_logs_deployed_on_node( + self, + node_name, # type: str + application_id, # type: str + service_manifest_name, # type: str + code_package_name, # type: str + tail=None, # type: Optional[str] + previous=False, # type: Optional[bool] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ContainerLogs" + """Gets the container logs for container deployed on a Service Fabric node. + + Gets the container logs for container deployed on a Service Fabric node for the given code + package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. + :type service_manifest_name: str + :param code_package_name: The name of code package specified in service manifest registered as + part of an application type in a Service Fabric cluster. + :type code_package_name: str + :param tail: Number of lines to show from the end of the logs. Default is 100. 'all' to show + the complete logs. + :type tail: str + :param previous: Specifies whether to get container logs from exited/dead containers of the + code package instance. Default value is False. + :type previous: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ContainerLogs, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ContainerLogs + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerLogs"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_container_logs_deployed_on_node_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, + tail=tail, + previous=previous, + timeout=timeout, + template_url=self.get_container_logs_deployed_on_node.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ContainerLogs', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_container_logs_deployed_on_node.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerLogs"} # type: ignore + + + @distributed_trace + def invoke_container_api( + self, + node_name, # type: str + application_id, # type: str + service_manifest_name, # type: str + code_package_name, # type: str + code_package_instance_id, # type: str + container_api_request_body, # type: "_models.ContainerApiRequestBody" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ContainerApiResponse" + """Invoke container API on a container deployed on a Service Fabric node. + + Invoke container API on a container deployed on a Service Fabric node for the given code + package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. + :type service_manifest_name: str + :param code_package_name: The name of code package specified in service manifest registered as + part of an application type in a Service Fabric cluster. + :type code_package_name: str + :param code_package_instance_id: ID that uniquely identifies a code package instance deployed + on a service fabric node. + :type code_package_instance_id: str + :param container_api_request_body: Parameters for making container API call. + :type container_api_request_body: ~azure.servicefabric.models.ContainerApiRequestBody + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ContainerApiResponse, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ContainerApiResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApiResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(container_api_request_body, 'ContainerApiRequestBody') + + request = build_invoke_container_api_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + content_type=content_type, + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, + code_package_instance_id=code_package_instance_id, + json=_json, + timeout=timeout, + template_url=self.invoke_container_api.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ContainerApiResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + invoke_container_api.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerApi"} # type: ignore + + + @distributed_trace + def create_compose_deployment( # pylint: disable=inconsistent-return-statements + self, + create_compose_deployment_description, # type: "_models.CreateComposeDeploymentDescription" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Creates a Service Fabric compose deployment. + + Compose is a file format that describes multi-container applications. This API allows deploying + container based applications defined in compose format in a Service Fabric cluster. Once the + deployment is created, its status can be tracked via the ``GetComposeDeploymentStatus`` API. + + :param create_compose_deployment_description: Describes the compose deployment that needs to be + created. + :type create_compose_deployment_description: + ~azure.servicefabric.models.CreateComposeDeploymentDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(create_compose_deployment_description, 'CreateComposeDeploymentDescription') + + request = build_create_compose_deployment_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.create_compose_deployment.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + create_compose_deployment.metadata = {'url': "/ComposeDeployments/$/Create"} # type: ignore + + + @distributed_trace + def get_compose_deployment_status( + self, + deployment_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ComposeDeploymentStatusInfo" + """Gets information about a Service Fabric compose deployment. + + Returns the status of the compose deployment that was created or in the process of being + created in the Service Fabric cluster and whose name matches the one specified as the + parameter. The response includes the name, status, and other details about the deployment. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ComposeDeploymentStatusInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ComposeDeploymentStatusInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComposeDeploymentStatusInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_compose_deployment_status_request( + deployment_name=deployment_name, + api_version=api_version, + timeout=timeout, + template_url=self.get_compose_deployment_status.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ComposeDeploymentStatusInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_compose_deployment_status.metadata = {'url': "/ComposeDeployments/{deploymentName}"} # type: ignore + + + @distributed_trace + def get_compose_deployment_status_list( + self, + continuation_token_parameter=None, # type: Optional[str] + max_results=0, # type: Optional[int] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedComposeDeploymentStatusInfoList" + """Gets the list of compose deployments created in the Service Fabric cluster. + + Gets the status about the compose deployments that were created or in the process of being + created in the Service Fabric cluster. The response includes the name, status, and other + details about the compose deployments. If the list of deployments do not fit in a page, one + page of results is returned as well as a continuation token, which can be used to get the next + page. + + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedComposeDeploymentStatusInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedComposeDeploymentStatusInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedComposeDeploymentStatusInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_compose_deployment_status_list_request( + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.get_compose_deployment_status_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedComposeDeploymentStatusInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_compose_deployment_status_list.metadata = {'url': "/ComposeDeployments"} # type: ignore + + + @distributed_trace + def get_compose_deployment_upgrade_progress( + self, + deployment_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ComposeDeploymentUpgradeProgressInfo" + """Gets details for the latest upgrade performed on this Service Fabric compose deployment. + + Returns the information about the state of the compose deployment upgrade along with details to + aid debugging application health issues. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ComposeDeploymentUpgradeProgressInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ComposeDeploymentUpgradeProgressInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComposeDeploymentUpgradeProgressInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_compose_deployment_upgrade_progress_request( + deployment_name=deployment_name, + api_version=api_version, + timeout=timeout, + template_url=self.get_compose_deployment_upgrade_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ComposeDeploymentUpgradeProgressInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_compose_deployment_upgrade_progress.metadata = {'url': "/ComposeDeployments/{deploymentName}/$/GetUpgradeProgress"} # type: ignore + + + @distributed_trace + def remove_compose_deployment( # pylint: disable=inconsistent-return-statements + self, + deployment_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes an existing Service Fabric compose deployment from cluster. + + Deletes an existing Service Fabric compose deployment. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_remove_compose_deployment_request( + deployment_name=deployment_name, + api_version=api_version, + timeout=timeout, + template_url=self.remove_compose_deployment.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + remove_compose_deployment.metadata = {'url': "/ComposeDeployments/{deploymentName}/$/Delete"} # type: ignore + + + @distributed_trace + def start_compose_deployment_upgrade( # pylint: disable=inconsistent-return-statements + self, + deployment_name, # type: str + compose_deployment_upgrade_description, # type: "_models.ComposeDeploymentUpgradeDescription" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Starts upgrading a compose deployment in the Service Fabric cluster. + + Validates the supplied upgrade parameters and starts upgrading the deployment if the parameters + are valid. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :param compose_deployment_upgrade_description: Parameters for upgrading compose deployment. + :type compose_deployment_upgrade_description: + ~azure.servicefabric.models.ComposeDeploymentUpgradeDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(compose_deployment_upgrade_description, 'ComposeDeploymentUpgradeDescription') + + request = build_start_compose_deployment_upgrade_request( + deployment_name=deployment_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.start_compose_deployment_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_compose_deployment_upgrade.metadata = {'url': "/ComposeDeployments/{deploymentName}/$/Upgrade"} # type: ignore + + + @distributed_trace + def start_rollback_compose_deployment_upgrade( # pylint: disable=inconsistent-return-statements + self, + deployment_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Starts rolling back a compose deployment upgrade in the Service Fabric cluster. + + Rollback a service fabric compose deployment upgrade. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_start_rollback_compose_deployment_upgrade_request( + deployment_name=deployment_name, + api_version=api_version, + timeout=timeout, + template_url=self.start_rollback_compose_deployment_upgrade.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_rollback_compose_deployment_upgrade.metadata = {'url': "/ComposeDeployments/{deploymentName}/$/RollbackUpgrade"} # type: ignore + + + @distributed_trace + def get_chaos( + self, + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.Chaos" + """Get the status of Chaos. + + Get the status of Chaos indicating whether or not Chaos is running, the Chaos parameters used + for running Chaos and the status of the Chaos Schedule. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Chaos, or the result of cls(response) + :rtype: ~azure.servicefabric.models.Chaos + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Chaos"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_chaos_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_chaos.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Chaos', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_chaos.metadata = {'url': "/Tools/Chaos"} # type: ignore + + + @distributed_trace + def start_chaos( # pylint: disable=inconsistent-return-statements + self, + chaos_parameters, # type: "_models.ChaosParameters" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Starts Chaos in the cluster. + + If Chaos is not already running in the cluster, it starts Chaos with the passed in Chaos + parameters. + If Chaos is already running when this call is made, the call fails with the error code + FABRIC_E_CHAOS_ALREADY_RUNNING. + Refer to the article `Induce controlled Chaos in Service Fabric clusters + `_ for more + details. + + :param chaos_parameters: Describes all the parameters to configure a Chaos run. + :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(chaos_parameters, 'ChaosParameters') + + request = build_start_chaos_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.start_chaos.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_chaos.metadata = {'url': "/Tools/Chaos/$/Start"} # type: ignore + + + @distributed_trace + def stop_chaos( # pylint: disable=inconsistent-return-statements + self, + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Stops Chaos if it is running in the cluster and put the Chaos Schedule in a stopped state. + + Stops Chaos from executing new faults. In-flight faults will continue to execute until they are + complete. The current Chaos Schedule is put into a stopped state. + Once a schedule is stopped, it will stay in the stopped state and not be used to Chaos Schedule + new runs of Chaos. A new Chaos Schedule must be set in order to resume scheduling. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_stop_chaos_request( + api_version=api_version, + timeout=timeout, + template_url=self.stop_chaos.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + stop_chaos.metadata = {'url': "/Tools/Chaos/$/Stop"} # type: ignore + + + @distributed_trace + def get_chaos_events( + self, + continuation_token_parameter=None, # type: Optional[str] + start_time_utc=None, # type: Optional[str] + end_time_utc=None, # type: Optional[str] + max_results=0, # type: Optional[int] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ChaosEventsSegment" + """Gets the next segment of the Chaos events based on the continuation token or the time range. + + To get the next segment of the Chaos events, you can specify the ContinuationToken. To get the + start of a new segment of Chaos events, you can specify the time range + through StartTimeUtc and EndTimeUtc. You cannot specify both the ContinuationToken and the time + range in the same call. + When there are more than 100 Chaos events, the Chaos events are returned in multiple segments + where a segment contains no more than 100 Chaos events and to get the next segment you make a + call to this API with the continuation token. + + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param start_time_utc: The Windows file time representing the start time of the time range for + which a Chaos report is to be generated. Consult `DateTime.ToFileTimeUtc Method + `_.aspx) for + details. Default value is None. + :type start_time_utc: str + :param end_time_utc: The Windows file time representing the end time of the time range for + which a Chaos report is to be generated. Consult `DateTime.ToFileTimeUtc Method + `_.aspx) for + details. Default value is None. + :type end_time_utc: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ChaosEventsSegment, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ChaosEventsSegment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ChaosEventsSegment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_chaos_events_request( + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + max_results=max_results, + timeout=timeout, + template_url=self.get_chaos_events.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ChaosEventsSegment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_chaos_events.metadata = {'url': "/Tools/Chaos/Events"} # type: ignore + + + @distributed_trace + def get_chaos_schedule( + self, + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ChaosScheduleDescription" + """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. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ChaosScheduleDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ChaosScheduleDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ChaosScheduleDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_chaos_schedule_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_chaos_schedule.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ChaosScheduleDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_chaos_schedule.metadata = {'url': "/Tools/Chaos/Schedule"} # type: ignore + + + @distributed_trace + def post_chaos_schedule( # pylint: disable=inconsistent-return-statements + self, + timeout=60, # type: Optional[int] + version=None, # type: Optional[int] + schedule=None, # type: Optional["_models.ChaosSchedule"] + **kwargs # type: Any + ): + # type: (...) -> None + """Set the schedule used by Chaos. + + Chaos will automatically schedule runs based on the Chaos Schedule. + The Chaos Schedule will be updated if the provided version matches the version on the server. + When updating the Chaos Schedule, the version on the server is incremented by 1. + The version on the server will wrap back to 0 after reaching a large number. + If Chaos is running when this call is made, the call will fail. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param version: The version number of the Schedule. Default value is None. + :type version: int + :param schedule: Defines the schedule used by Chaos. Default value is None. + :type schedule: ~azure.servicefabric.models.ChaosSchedule + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _chaos_schedule = _models.ChaosScheduleDescription(version=version, schedule=schedule) + _json = self._serialize.body(_chaos_schedule, 'ChaosScheduleDescription') + + request = build_post_chaos_schedule_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.post_chaos_schedule.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + post_chaos_schedule.metadata = {'url': "/Tools/Chaos/Schedule"} # type: ignore + + + @distributed_trace + def upload_file( # pylint: disable=inconsistent-return-statements + self, + content_path, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Uploads contents of the file to the image store. + + Uploads contents of the file to the image store. Use this API if the file is small enough to + upload again if the connection fails. The file's data needs to be added to the request body. + The contents will be uploaded to the specified path. Image store service uses a mark file to + indicate the availability of the folder. The mark file is an empty file named "_.dir". The mark + file is generated by the image store service when all files in a folder are uploaded. When + using File-by-File approach to upload application package in REST, the image store service + isn't aware of the file hierarchy of the application package; you need to create a mark file + per folder and upload it last, to let the image store service know that the folder is complete. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_upload_file_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + template_url=self.upload_file.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + upload_file.metadata = {'url': "/ImageStore/{contentPath}"} # type: ignore + + + @distributed_trace + def get_image_store_content( + self, + content_path, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ImageStoreContent" + """Gets the image store content information. + + Returns the information about the image store content at the specified contentPath. The + contentPath is relative to the root of the image store. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ImageStoreContent, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ImageStoreContent + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ImageStoreContent"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_image_store_content_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + template_url=self.get_image_store_content.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ImageStoreContent', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_image_store_content.metadata = {'url': "/ImageStore/{contentPath}"} # type: ignore + + + @distributed_trace + def delete_image_store_content( # pylint: disable=inconsistent-return-statements + self, + content_path, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes existing image store content. + + Deletes existing image store content being found within the given image store relative path. + This command can be used to delete uploaded application packages once they are provisioned. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_image_store_content_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + template_url=self.delete_image_store_content.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_image_store_content.metadata = {'url': "/ImageStore/{contentPath}"} # type: ignore + + + @distributed_trace + def get_image_store_root_content( + self, + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ImageStoreContent" + """Gets the content information at the root of the image store. + + Returns the information about the image store content at the root of the image store. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ImageStoreContent, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ImageStoreContent + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ImageStoreContent"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_image_store_root_content_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_image_store_root_content.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ImageStoreContent', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_image_store_root_content.metadata = {'url': "/ImageStore"} # type: ignore + + + @distributed_trace + def copy_image_store_content( # pylint: disable=inconsistent-return-statements + self, + image_store_copy_description, # type: "_models.ImageStoreCopyDescription" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Copies image store content internally. + + Copies the image store content from the source image store relative path to the destination + image store relative path. + + :param image_store_copy_description: Describes the copy description for the image store. + :type image_store_copy_description: ~azure.servicefabric.models.ImageStoreCopyDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(image_store_copy_description, 'ImageStoreCopyDescription') + + request = build_copy_image_store_content_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.copy_image_store_content.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + copy_image_store_content.metadata = {'url': "/ImageStore/$/Copy"} # type: ignore + + + @distributed_trace + def delete_image_store_upload_session( # pylint: disable=inconsistent-return-statements + self, + session_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Cancels an image store upload session. + + The DELETE request will cause the existing upload session to expire and remove any previously + uploaded file chunks. + + :param session_id: A GUID generated by the user for a file uploading. It identifies an image + store upload session which keeps track of all file chunks until it is committed. + :type session_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_image_store_upload_session_request( + api_version=api_version, + session_id=session_id, + timeout=timeout, + template_url=self.delete_image_store_upload_session.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_image_store_upload_session.metadata = {'url': "/ImageStore/$/DeleteUploadSession"} # type: ignore + + + @distributed_trace + def commit_image_store_upload_session( # pylint: disable=inconsistent-return-statements + self, + session_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Commit an image store upload session. + + When all file chunks have been uploaded, the upload session needs to be committed explicitly to + complete the upload. Image store preserves the upload session until the expiration time, which + is 30 minutes after the last chunk received. + + :param session_id: A GUID generated by the user for a file uploading. It identifies an image + store upload session which keeps track of all file chunks until it is committed. + :type session_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_commit_image_store_upload_session_request( + api_version=api_version, + session_id=session_id, + timeout=timeout, + template_url=self.commit_image_store_upload_session.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + commit_image_store_upload_session.metadata = {'url': "/ImageStore/$/CommitUploadSession"} # type: ignore + + + @distributed_trace + def get_image_store_upload_session_by_id( + self, + session_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.UploadSession" + """Get the image store upload session by ID. + + Gets the image store upload session identified by the given ID. User can query the upload + session at any time during uploading. + + :param session_id: A GUID generated by the user for a file uploading. It identifies an image + store upload session which keeps track of all file chunks until it is committed. + :type session_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UploadSession, or the result of cls(response) + :rtype: ~azure.servicefabric.models.UploadSession + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UploadSession"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_image_store_upload_session_by_id_request( + api_version=api_version, + session_id=session_id, + timeout=timeout, + template_url=self.get_image_store_upload_session_by_id.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UploadSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_image_store_upload_session_by_id.metadata = {'url': "/ImageStore/$/GetUploadSession"} # type: ignore + + + @distributed_trace + def get_image_store_upload_session_by_path( + self, + content_path, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.UploadSession" + """Get the image store upload session by relative path. + + Gets the image store upload session associated with the given image store relative path. User + can query the upload session at any time during uploading. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UploadSession, or the result of cls(response) + :rtype: ~azure.servicefabric.models.UploadSession + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UploadSession"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_image_store_upload_session_by_path_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + template_url=self.get_image_store_upload_session_by_path.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UploadSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_image_store_upload_session_by_path.metadata = {'url': "/ImageStore/{contentPath}/$/GetUploadSession"} # type: ignore + + + @distributed_trace + def upload_file_chunk( # pylint: disable=inconsistent-return-statements + self, + content_path, # type: str + session_id, # type: str + content_range, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Uploads a file chunk to the image store relative path. + + Uploads a file chunk to the image store with the specified upload session ID and image store + relative path. This API allows user to resume the file upload operation. user doesn't have to + restart the file upload from scratch whenever there is a network interruption. Use this option + if the file size is large. + + To perform a resumable file upload, user need to break the file into multiple chunks and upload + these chunks to the image store one-by-one. Chunks don't have to be uploaded in order. If the + file represented by the image store relative path already exists, it will be overwritten when + the upload session commits. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :param session_id: A GUID generated by the user for a file uploading. It identifies an image + store upload session which keeps track of all file chunks until it is committed. + :type session_id: str + :param content_range: When uploading file chunks to the image store, the Content-Range header + field need to be configured and sent with a request. The format should looks like "bytes + {First-Byte-Position}-{Last-Byte-Position}/{File-Length}". For example, Content-Range:bytes + 300-5000/20000 indicates that user is sending bytes 300 through 5,000 and the total file length + is 20,000 bytes. + :type content_range: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_upload_file_chunk_request( + content_path=content_path, + api_version=api_version, + session_id=session_id, + content_range=content_range, + timeout=timeout, + template_url=self.upload_file_chunk.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + upload_file_chunk.metadata = {'url': "/ImageStore/{contentPath}/$/UploadChunk"} # type: ignore + + + @distributed_trace + def get_image_store_root_folder_size( + self, + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.FolderSizeInfo" + """Get the folder size at the root of the image store. + + Returns the total size of files at the root and children folders in image store. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FolderSizeInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.FolderSizeInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FolderSizeInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_image_store_root_folder_size_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_image_store_root_folder_size.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FolderSizeInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_image_store_root_folder_size.metadata = {'url': "/ImageStore/$/FolderSize"} # type: ignore + + + @distributed_trace + def get_image_store_folder_size( + self, + content_path, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.FolderSizeInfo" + """Get the size of a folder in image store. + + Gets the total size of file under a image store folder, specified by contentPath. The + contentPath is relative to the root of the image store. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FolderSizeInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.FolderSizeInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FolderSizeInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_image_store_folder_size_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + template_url=self.get_image_store_folder_size.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FolderSizeInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_image_store_folder_size.metadata = {'url': "/ImageStore/{contentPath}/$/FolderSize"} # type: ignore + + + @distributed_trace + def get_image_store_info( + self, + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.ImageStoreInfo" + """Gets the overall ImageStore information. + + Returns information about the primary ImageStore replica, such as disk capacity and available + disk space at the node it is on, and several categories of the ImageStore's file system usage. + + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ImageStoreInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.ImageStoreInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ImageStoreInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_image_store_info_request( + api_version=api_version, + timeout=timeout, + template_url=self.get_image_store_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ImageStoreInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_image_store_info.metadata = {'url': "/ImageStore/$/Info"} # type: ignore + + + @distributed_trace + def invoke_infrastructure_command( + self, + command, # type: str + service_id=None, # type: Optional[str] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> str + """Invokes an administrative command on the given Infrastructure Service instance. + + For clusters that have one or more instances of the Infrastructure Service configured, + this API provides a way to send infrastructure-specific commands to a particular + instance of the Infrastructure Service. + + Available commands and their corresponding response formats vary depending upon + the infrastructure on which the cluster is running. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param command: The text of the command to be invoked. The content of the command is + infrastructure-specific. + :type command: str + :param service_id: The identity of the infrastructure service. This is the full name of the + infrastructure service without the 'fabric:' URI scheme. This parameter required only for the + cluster that has more than one instance of infrastructure service running. Default value is + None. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_invoke_infrastructure_command_request( + api_version=api_version, + command=command, + service_id=service_id, + timeout=timeout, + template_url=self.invoke_infrastructure_command.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + invoke_infrastructure_command.metadata = {'url': "/$/InvokeInfrastructureCommand"} # type: ignore + + + @distributed_trace + def invoke_infrastructure_query( + self, + command, # type: str + service_id=None, # type: Optional[str] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> str + """Invokes a read-only query on the given infrastructure service instance. + + For clusters that have one or more instances of the Infrastructure Service configured, + this API provides a way to send infrastructure-specific queries to a particular + instance of the Infrastructure Service. + + Available commands and their corresponding response formats vary depending upon + the infrastructure on which the cluster is running. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param command: The text of the command to be invoked. The content of the command is + infrastructure-specific. + :type command: str + :param service_id: The identity of the infrastructure service. This is the full name of the + infrastructure service without the 'fabric:' URI scheme. This parameter required only for the + cluster that has more than one instance of infrastructure service running. Default value is + None. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_invoke_infrastructure_query_request( + api_version=api_version, + command=command, + service_id=service_id, + timeout=timeout, + template_url=self.invoke_infrastructure_query.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + invoke_infrastructure_query.metadata = {'url': "/$/InvokeInfrastructureQuery"} # type: ignore + + + @distributed_trace + def start_data_loss( # pylint: disable=inconsistent-return-statements + self, + service_id, # type: str + partition_id, # type: str + operation_id, # type: str + data_loss_mode, # type: Union[str, "_models.DataLossMode"] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """This API will induce data loss for the specified partition. It will trigger a call to the + OnDataLossAsync API of the partition. + + This API will induce data loss for the specified partition. It will trigger a call to the + OnDataLoss API of the partition. + Actual data loss will depend on the specified DataLossMode. + + + * PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is triggered for the + partition but actual data loss depends on the presence of in-flight replication. + * FullDataLoss - All replicas are removed hence all data is lost and OnDataLoss is triggered. + + This API should only be called with a stateful service as the target. + + Calling this API with a system service as the target is not advised. + + Note: Once this API has been called, it cannot be reversed. Calling CancelOperation will only + stop execution and clean up internal system state. + It will not restore data if the command has progressed far enough to cause data loss. + + Call the GetDataLossProgress API with the same OperationId to return information on the + operation started with this API. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param data_loss_mode: This enum is passed to the StartDataLoss API to indicate what type of + data loss to induce. + :type data_loss_mode: str or ~azure.servicefabric.models.DataLossMode + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_start_data_loss_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + data_loss_mode=data_loss_mode, + timeout=timeout, + template_url=self.start_data_loss.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_data_loss.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartDataLoss"} # type: ignore + + + @distributed_trace + def get_data_loss_progress( + self, + service_id, # type: str + partition_id, # type: str + operation_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PartitionDataLossProgress" + """Gets the progress of a partition data loss operation started using the StartDataLoss API. + + Gets the progress of a data loss operation started with StartDataLoss, using the OperationId. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PartitionDataLossProgress, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PartitionDataLossProgress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionDataLossProgress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_data_loss_progress_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + timeout=timeout, + template_url=self.get_data_loss_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PartitionDataLossProgress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_data_loss_progress.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetDataLossProgress"} # type: ignore + + + @distributed_trace + def start_quorum_loss( # pylint: disable=inconsistent-return-statements + self, + service_id, # type: str + partition_id, # type: str + operation_id, # type: str + quorum_loss_mode, # type: Union[str, "_models.QuorumLossMode"] + quorum_loss_duration, # type: int + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Induces quorum loss for a given stateful service partition. + + This API is useful for a temporary quorum loss situation on your service. + + Call the GetQuorumLossProgress API with the same OperationId to return information on the + operation started with this API. + + This can only be called on stateful persisted (HasPersistedState==true) services. Do not use + this API on stateless services or stateful in-memory only services. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param quorum_loss_mode: This enum is passed to the StartQuorumLoss API to indicate what type + of quorum loss to induce. + :type quorum_loss_mode: str or ~azure.servicefabric.models.QuorumLossMode + :param quorum_loss_duration: The amount of time for which the partition will be kept in quorum + loss. This must be specified in seconds. + :type quorum_loss_duration: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_start_quorum_loss_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + quorum_loss_mode=quorum_loss_mode, + quorum_loss_duration=quorum_loss_duration, + timeout=timeout, + template_url=self.start_quorum_loss.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_quorum_loss.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartQuorumLoss"} # type: ignore + + + @distributed_trace + def get_quorum_loss_progress( + self, + service_id, # type: str + partition_id, # type: str + operation_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PartitionQuorumLossProgress" + """Gets the progress of a quorum loss operation on a partition started using the StartQuorumLoss + API. + + Gets the progress of a quorum loss operation started with StartQuorumLoss, using the provided + OperationId. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PartitionQuorumLossProgress, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PartitionQuorumLossProgress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionQuorumLossProgress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_quorum_loss_progress_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + timeout=timeout, + template_url=self.get_quorum_loss_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PartitionQuorumLossProgress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_quorum_loss_progress.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetQuorumLossProgress"} # type: ignore + + + @distributed_trace + def start_partition_restart( # pylint: disable=inconsistent-return-statements + self, + service_id, # type: str + partition_id, # type: str + operation_id, # type: str + restart_partition_mode, # type: Union[str, "_models.RestartPartitionMode"] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """This API will restart some or all replicas or instances of the specified partition. + + This API is useful for testing failover. + + If used to target a stateless service partition, RestartPartitionMode must be + AllReplicasOrInstances. + + Call the GetPartitionRestartProgress API using the same OperationId to get the progress. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param restart_partition_mode: Describe which partitions to restart. + :type restart_partition_mode: str or ~azure.servicefabric.models.RestartPartitionMode + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_start_partition_restart_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + restart_partition_mode=restart_partition_mode, + timeout=timeout, + template_url=self.start_partition_restart.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_partition_restart.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartRestart"} # type: ignore + + + @distributed_trace + def get_partition_restart_progress( + self, + service_id, # type: str + partition_id, # type: str + operation_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PartitionRestartProgress" + """Gets the progress of a PartitionRestart operation started using StartPartitionRestart. + + Gets the progress of a PartitionRestart started with StartPartitionRestart using the provided + OperationId. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PartitionRestartProgress, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PartitionRestartProgress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionRestartProgress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_restart_progress_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + timeout=timeout, + template_url=self.get_partition_restart_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PartitionRestartProgress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_restart_progress.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetRestartProgress"} # type: ignore + + + @distributed_trace + def start_node_transition( # pylint: disable=inconsistent-return-statements + self, + node_name, # type: str + operation_id, # type: str + node_transition_type, # type: Union[str, "_models.NodeTransitionType"] + node_instance_id, # type: str + stop_duration_in_seconds, # type: int + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Starts or stops a cluster node. + + Starts or stops a cluster node. A cluster node is a process, not the OS instance itself. To + start a node, pass in "Start" for the NodeTransitionType parameter. + To stop a node, pass in "Stop" for the NodeTransitionType parameter. This API starts the + operation - when the API returns the node may not have finished transitioning yet. + Call GetNodeTransitionProgress with the same OperationId to get the progress of the operation. + + :param node_name: The name of the node. + :type node_name: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param node_transition_type: Indicates the type of transition to perform. + NodeTransitionType.Start will start a stopped node. NodeTransitionType.Stop will stop a node + that is up. + :type node_transition_type: str or ~azure.servicefabric.models.NodeTransitionType + :param node_instance_id: The node instance ID of the target node. This can be determined + through GetNodeInfo API. + :type node_instance_id: str + :param stop_duration_in_seconds: The duration, in seconds, to keep the node stopped. The + minimum value is 600, the maximum is 14400. After this time expires, the node will + automatically come back up. + :type stop_duration_in_seconds: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_start_node_transition_request( + node_name=node_name, + api_version=api_version, + operation_id=operation_id, + node_transition_type=node_transition_type, + node_instance_id=node_instance_id, + stop_duration_in_seconds=stop_duration_in_seconds, + timeout=timeout, + template_url=self.start_node_transition.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + start_node_transition.metadata = {'url': "/Faults/Nodes/{nodeName}/$/StartTransition/"} # type: ignore + + + @distributed_trace + def get_node_transition_progress( + self, + node_name, # type: str + operation_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.NodeTransitionProgress" + """Gets the progress of an operation started using StartNodeTransition. + + Gets the progress of an operation started with StartNodeTransition using the provided + OperationId. + + :param node_name: The name of the node. + :type node_name: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NodeTransitionProgress, or the result of cls(response) + :rtype: ~azure.servicefabric.models.NodeTransitionProgress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeTransitionProgress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_node_transition_progress_request( + node_name=node_name, + api_version=api_version, + operation_id=operation_id, + timeout=timeout, + template_url=self.get_node_transition_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NodeTransitionProgress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_node_transition_progress.metadata = {'url': "/Faults/Nodes/{nodeName}/$/GetTransitionProgress"} # type: ignore + + + @distributed_trace + def get_fault_operation_list( + self, + type_filter=65535, # type: int + state_filter=65535, # type: int + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> List["_models.OperationStatus"] + """Gets a list of user-induced fault operations filtered by provided input. + + Gets the list of user-induced fault operations filtered by provided input. + + :param type_filter: Used to filter on OperationType for user-induced operations. + + + * 65535 - select all + * 1 - select PartitionDataLoss. + * 2 - select PartitionQuorumLoss. + * 4 - select PartitionRestart. + * 8 - select NodeTransition. Default value is 65535. + :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. Default value is 65535. + :type state_filter: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of OperationStatus, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.OperationStatus] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.OperationStatus"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_fault_operation_list_request( + api_version=api_version, + type_filter=type_filter, + state_filter=state_filter, + timeout=timeout, + template_url=self.get_fault_operation_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[OperationStatus]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_fault_operation_list.metadata = {'url': "/Faults/"} # type: ignore + + + @distributed_trace + def cancel_operation( # pylint: disable=inconsistent-return-statements + self, + operation_id, # type: str + force=False, # type: bool + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Cancels a user-induced fault operation. + + The following APIs start fault operations that may be cancelled by using CancelOperation: + StartDataLoss, StartQuorumLoss, StartPartitionRestart, StartNodeTransition. + + If force is false, then the specified user-induced operation will be gracefully stopped and + cleaned up. If force is true, the command will be aborted, and some internal state + may be left behind. Specifying force as true should be used with care. Calling this API with + force set to true is not allowed until this API has already + been called on the same test command with force set to false first, or unless the test command + already has an OperationState of OperationState.RollingBack. + Clarification: OperationState.RollingBack means that the system will be/is cleaning up internal + system state caused by executing the command. It will not restore data if the + test command was to cause data loss. For example, if you call StartDataLoss then call this + API, the system will only clean up internal state from running the command. + It will not restore the target partition's data, if the command progressed far enough to cause + data loss. + + Important note: if this API is invoked with force==true, internal state may be left behind. + + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :type operation_id: str + :param force: Indicates whether to gracefully roll back and clean up internal system state + modified by executing the user-induced operation. Default value is False. + :type force: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_cancel_operation_request( + api_version=api_version, + operation_id=operation_id, + force=force, + timeout=timeout, + template_url=self.cancel_operation.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + cancel_operation.metadata = {'url': "/Faults/$/Cancel"} # type: ignore + + + @distributed_trace + def create_backup_policy( # pylint: disable=inconsistent-return-statements + self, + backup_policy_description, # type: "_models.BackupPolicyDescription" + timeout=60, # type: Optional[int] + validate_connection=False, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + """Creates a backup policy. + + Creates a backup policy which can be associated later with a Service Fabric application, + service or a partition for periodic backup. + + :param backup_policy_description: Describes the backup policy. + :type backup_policy_description: ~azure.servicefabric.models.BackupPolicyDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param validate_connection: Specifies whether to validate the storage connection and + credentials before creating or updating the backup policies. Default value is False. + :type validate_connection: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') + + request = build_create_backup_policy_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + validate_connection=validate_connection, + template_url=self.create_backup_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + create_backup_policy.metadata = {'url': "/BackupRestore/BackupPolicies/$/Create"} # type: ignore + + + @distributed_trace + def delete_backup_policy( # pylint: disable=inconsistent-return-statements + self, + backup_policy_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes the backup policy. + + Deletes an existing backup policy. A backup policy must be created before it can be deleted. A + currently active backup policy, associated with any Service Fabric application, service or + partition, cannot be deleted without first deleting the mapping. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_backup_policy_request( + backup_policy_name=backup_policy_name, + api_version=api_version, + timeout=timeout, + template_url=self.delete_backup_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_backup_policy.metadata = {'url': "/BackupRestore/BackupPolicies/{backupPolicyName}/$/Delete"} # type: ignore + + + @distributed_trace + def get_backup_policy_list( + self, + continuation_token_parameter=None, # type: Optional[str] + max_results=0, # type: Optional[int] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedBackupPolicyDescriptionList" + """Gets all the backup policies configured. + + Get a list of all the backup policies configured. + + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedBackupPolicyDescriptionList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedBackupPolicyDescriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupPolicyDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_backup_policy_list_request( + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.get_backup_policy_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedBackupPolicyDescriptionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_backup_policy_list.metadata = {'url': "/BackupRestore/BackupPolicies"} # type: ignore + + + @distributed_trace + def get_backup_policy_by_name( + self, + backup_policy_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupPolicyDescription" + """Gets a particular backup policy by name. + + Gets a particular backup policy identified by {backupPolicyName}. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupPolicyDescription, or the result of cls(response) + :rtype: ~azure.servicefabric.models.BackupPolicyDescription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupPolicyDescription"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_backup_policy_by_name_request( + backup_policy_name=backup_policy_name, + api_version=api_version, + timeout=timeout, + template_url=self.get_backup_policy_by_name.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupPolicyDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_backup_policy_by_name.metadata = {'url': "/BackupRestore/BackupPolicies/{backupPolicyName}"} # type: ignore + + + @distributed_trace + def get_all_entities_backed_up_by_policy( + self, + backup_policy_name, # type: str + continuation_token_parameter=None, # type: Optional[str] + max_results=0, # type: Optional[int] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedBackupEntityList" + """Gets the list of backup entities that are associated with this policy. + + Returns a list of Service Fabric application, service or partition which are associated with + this backup policy. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedBackupEntityList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedBackupEntityList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupEntityList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_all_entities_backed_up_by_policy_request( + backup_policy_name=backup_policy_name, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.get_all_entities_backed_up_by_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedBackupEntityList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_all_entities_backed_up_by_policy.metadata = {'url': "/BackupRestore/BackupPolicies/{backupPolicyName}/$/GetBackupEnabledEntities"} # type: ignore + + + @distributed_trace + def update_backup_policy( # pylint: disable=inconsistent-return-statements + self, + backup_policy_name, # type: str + backup_policy_description, # type: "_models.BackupPolicyDescription" + timeout=60, # type: Optional[int] + validate_connection=False, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + """Updates the backup policy. + + Updates the backup policy identified by {backupPolicyName}. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :param backup_policy_description: Describes the backup policy. + :type backup_policy_description: ~azure.servicefabric.models.BackupPolicyDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param validate_connection: Specifies whether to validate the storage connection and + credentials before creating or updating the backup policies. Default value is False. + :type validate_connection: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') + + request = build_update_backup_policy_request( + backup_policy_name=backup_policy_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + validate_connection=validate_connection, + template_url=self.update_backup_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + update_backup_policy.metadata = {'url': "/BackupRestore/BackupPolicies/{backupPolicyName}/$/Update"} # type: ignore + + + @distributed_trace + def enable_application_backup( # pylint: disable=inconsistent-return-statements + self, + application_id, # type: str + backup_policy_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Enables periodic backup of stateful partitions under this Service Fabric application. + + Enables periodic backup of stateful partitions which are part of this Service Fabric + application. Each partition is backed up individually as per the specified backup policy + description. + Note only C# based Reliable Actor and Reliable Stateful services are currently supported for + periodic backup. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param backup_policy_name: Name of the backup policy to be used for enabling periodic backups. + :type backup_policy_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) + _json = self._serialize.body(_enable_backup_description, 'EnableBackupDescription') + + request = build_enable_application_backup_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.enable_application_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + enable_application_backup.metadata = {'url': "/Applications/{applicationId}/$/EnableBackup"} # type: ignore + + + @distributed_trace + def disable_application_backup( # pylint: disable=inconsistent-return-statements + self, + application_id, # type: str + clean_backup, # type: bool + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Disables periodic backup of Service Fabric application. + + Disables periodic backup of Service Fabric application which was previously enabled. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param clean_backup: Boolean flag to delete backups. It can be set to true for deleting all the + backups which were created for the backup entity that is getting disabled for backup. + :type clean_backup: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) + if _disable_backup_description is not None: + _json = self._serialize.body(_disable_backup_description, 'DisableBackupDescription') + else: + _json = None + + request = build_disable_application_backup_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.disable_application_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_application_backup.metadata = {'url': "/Applications/{applicationId}/$/DisableBackup"} # type: ignore + + + @distributed_trace + def get_application_backup_configuration_info( + self, + application_id, # type: str + continuation_token_parameter=None, # type: Optional[str] + max_results=0, # type: Optional[int] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedBackupConfigurationInfoList" + """Gets the Service Fabric application backup configuration information. + + Gets the Service Fabric backup configuration information for the application and the services + and partitions under this application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedBackupConfigurationInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedBackupConfigurationInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupConfigurationInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_backup_configuration_info_request( + application_id=application_id, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.get_application_backup_configuration_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedBackupConfigurationInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_backup_configuration_info.metadata = {'url': "/Applications/{applicationId}/$/GetBackupConfigurationInfo"} # type: ignore + + + @distributed_trace + def get_application_backup_list( + self, + application_id, # type: str + timeout=60, # type: Optional[int] + latest=False, # type: Optional[bool] + start_date_time_filter=None, # type: Optional[datetime.datetime] + end_date_time_filter=None, # type: Optional[datetime.datetime] + continuation_token_parameter=None, # type: Optional[str] + max_results=0, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedBackupInfoList" + """Gets the list of backups available for every partition in this application. + + Returns a list of backups available for every partition in this Service Fabric application. The + server enumerates all the backups available at the backup location configured in the backup + policy. It also allows filtering of the result based on start and end datetime or just fetching + the latest available backup for every partition. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param latest: Specifies whether to get only the most recent backup available for a partition + for the specified time range. Default value is False. + :type latest: bool + :param start_date_time_filter: Specify the start date time from which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, all backups from the beginning are enumerated. Default value is + None. + :type start_date_time_filter: ~datetime.datetime + :param end_date_time_filter: Specify the end date time till which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, enumeration is done till the most recent backup. Default value is + None. + :type end_date_time_filter: ~datetime.datetime + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedBackupInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedBackupInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_backup_list_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + latest=latest, + start_date_time_filter=start_date_time_filter, + end_date_time_filter=end_date_time_filter, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + template_url=self.get_application_backup_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedBackupInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_backup_list.metadata = {'url': "/Applications/{applicationId}/$/GetBackups"} # type: ignore + + + @distributed_trace + def suspend_application_backup( # pylint: disable=inconsistent-return-statements + self, + application_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Suspends periodic backup for the specified Service Fabric application. + + The application which is configured to take periodic backups, is suspended for taking further + backups till it is resumed again. This operation applies to the entire application's hierarchy. + It means all the services and partitions under this application are now suspended for backup. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_suspend_application_backup_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + template_url=self.suspend_application_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + suspend_application_backup.metadata = {'url': "/Applications/{applicationId}/$/SuspendBackup"} # type: ignore + + + @distributed_trace + def resume_application_backup( # pylint: disable=inconsistent-return-statements + self, + application_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Resumes periodic backup of a Service Fabric application which was previously suspended. + + The previously suspended Service Fabric application resumes taking periodic backup as per the + backup policy currently configured for the same. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_resume_application_backup_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + template_url=self.resume_application_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + resume_application_backup.metadata = {'url': "/Applications/{applicationId}/$/ResumeBackup"} # type: ignore + + + @distributed_trace + def enable_service_backup( # pylint: disable=inconsistent-return-statements + self, + service_id, # type: str + backup_policy_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Enables periodic backup of stateful partitions under this Service Fabric service. + + Enables periodic backup of stateful partitions which are part of this Service Fabric service. + Each partition is backed up individually as per the specified backup policy description. In + case the application, which the service is part of, is already enabled for backup then this + operation would override the policy being used to take the periodic backup for this service and + its partitions (unless explicitly overridden at the partition level). + Note only C# based Reliable Actor and Reliable Stateful services are currently supported for + periodic backup. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param backup_policy_name: Name of the backup policy to be used for enabling periodic backups. + :type backup_policy_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) + _json = self._serialize.body(_enable_backup_description, 'EnableBackupDescription') + + request = build_enable_service_backup_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.enable_service_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + enable_service_backup.metadata = {'url': "/Services/{serviceId}/$/EnableBackup"} # type: ignore + + + @distributed_trace + def disable_service_backup( # pylint: disable=inconsistent-return-statements + self, + service_id, # type: str + clean_backup, # type: bool + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Disables periodic backup of Service Fabric service which was previously enabled. + + Disables periodic backup of Service Fabric service which was previously enabled. Backup must be + explicitly enabled before it can be disabled. + In case the backup is enabled for the Service Fabric application, which this service is part + of, this service would continue to be periodically backed up as per the policy mapped at the + application level. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param clean_backup: Boolean flag to delete backups. It can be set to true for deleting all the + backups which were created for the backup entity that is getting disabled for backup. + :type clean_backup: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) + if _disable_backup_description is not None: + _json = self._serialize.body(_disable_backup_description, 'DisableBackupDescription') + else: + _json = None + + request = build_disable_service_backup_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.disable_service_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_service_backup.metadata = {'url': "/Services/{serviceId}/$/DisableBackup"} # type: ignore + + + @distributed_trace + def get_service_backup_configuration_info( + self, + service_id, # type: str + continuation_token_parameter=None, # type: Optional[str] + max_results=0, # type: Optional[int] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedBackupConfigurationInfoList" + """Gets the Service Fabric service backup configuration information. + + Gets the Service Fabric backup configuration information for the service and the partitions + under this service. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedBackupConfigurationInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedBackupConfigurationInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupConfigurationInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_backup_configuration_info_request( + service_id=service_id, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + template_url=self.get_service_backup_configuration_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedBackupConfigurationInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_backup_configuration_info.metadata = {'url': "/Services/{serviceId}/$/GetBackupConfigurationInfo"} # type: ignore + + + @distributed_trace + def get_service_backup_list( + self, + service_id, # type: str + timeout=60, # type: Optional[int] + latest=False, # type: Optional[bool] + start_date_time_filter=None, # type: Optional[datetime.datetime] + end_date_time_filter=None, # type: Optional[datetime.datetime] + continuation_token_parameter=None, # type: Optional[str] + max_results=0, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedBackupInfoList" + """Gets the list of backups available for every partition in this service. + + Returns a list of backups available for every partition in this Service Fabric service. The + server enumerates all the backups available in the backup store configured in the backup + policy. It also allows filtering of the result based on start and end datetime or just fetching + the latest available backup for every partition. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param latest: Specifies whether to get only the most recent backup available for a partition + for the specified time range. Default value is False. + :type latest: bool + :param start_date_time_filter: Specify the start date time from which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, all backups from the beginning are enumerated. Default value is + None. + :type start_date_time_filter: ~datetime.datetime + :param end_date_time_filter: Specify the end date time till which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, enumeration is done till the most recent backup. Default value is + None. + :type end_date_time_filter: ~datetime.datetime + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedBackupInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedBackupInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_backup_list_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + latest=latest, + start_date_time_filter=start_date_time_filter, + end_date_time_filter=end_date_time_filter, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + template_url=self.get_service_backup_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedBackupInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_backup_list.metadata = {'url': "/Services/{serviceId}/$/GetBackups"} # type: ignore + + + @distributed_trace + def suspend_service_backup( # pylint: disable=inconsistent-return-statements + self, + service_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Suspends periodic backup for the specified Service Fabric service. + + The service which is configured to take periodic backups, is suspended for taking further + backups till it is resumed again. This operation applies to the entire service's hierarchy. It + means all the partitions under this service are now suspended for backup. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_suspend_service_backup_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + template_url=self.suspend_service_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + suspend_service_backup.metadata = {'url': "/Services/{serviceId}/$/SuspendBackup"} # type: ignore + + + @distributed_trace + def resume_service_backup( # pylint: disable=inconsistent-return-statements + self, + service_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Resumes periodic backup of a Service Fabric service which was previously suspended. + + The previously suspended Service Fabric service resumes taking periodic backup as per the + backup policy currently configured for the same. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_resume_service_backup_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + template_url=self.resume_service_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + resume_service_backup.metadata = {'url': "/Services/{serviceId}/$/ResumeBackup"} # type: ignore + + + @distributed_trace + def enable_partition_backup( # pylint: disable=inconsistent-return-statements + self, + partition_id, # type: str + backup_policy_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Enables periodic backup of the stateful persisted partition. + + Enables periodic backup of stateful persisted partition. Each partition is backed up as per the + specified backup policy description. In case the application or service, which is partition is + part of, is already enabled for backup then this operation would override the policy being used + to take the periodic backup of this partition. + Note only C# based Reliable Actor and Reliable Stateful services are currently supported for + periodic backup. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param backup_policy_name: Name of the backup policy to be used for enabling periodic backups. + :type backup_policy_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) + _json = self._serialize.body(_enable_backup_description, 'EnableBackupDescription') + + request = build_enable_partition_backup_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.enable_partition_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + enable_partition_backup.metadata = {'url': "/Partitions/{partitionId}/$/EnableBackup"} # type: ignore + + + @distributed_trace + def disable_partition_backup( # pylint: disable=inconsistent-return-statements + self, + partition_id, # type: str + clean_backup, # type: bool + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Disables periodic backup of Service Fabric partition which was previously enabled. + + Disables periodic backup of partition which was previously enabled. Backup must be explicitly + enabled before it can be disabled. + In case the backup is enabled for the Service Fabric application or service, which this + partition is part of, this partition would continue to be periodically backed up as per the + policy mapped at the higher level entity. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param clean_backup: Boolean flag to delete backups. It can be set to true for deleting all the + backups which were created for the backup entity that is getting disabled for backup. + :type clean_backup: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) + if _disable_backup_description is not None: + _json = self._serialize.body(_disable_backup_description, 'DisableBackupDescription') + else: + _json = None + + request = build_disable_partition_backup_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.disable_partition_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable_partition_backup.metadata = {'url': "/Partitions/{partitionId}/$/DisableBackup"} # type: ignore + + + @distributed_trace + def get_partition_backup_configuration_info( + self, + partition_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PartitionBackupConfigurationInfo" + """Gets the partition backup configuration information. + + Gets the Service Fabric Backup configuration information for the specified partition. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PartitionBackupConfigurationInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PartitionBackupConfigurationInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionBackupConfigurationInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_backup_configuration_info_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_partition_backup_configuration_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PartitionBackupConfigurationInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_backup_configuration_info.metadata = {'url': "/Partitions/{partitionId}/$/GetBackupConfigurationInfo"} # type: ignore + + + @distributed_trace + def get_partition_backup_list( + self, + partition_id, # type: str + timeout=60, # type: Optional[int] + latest=False, # type: Optional[bool] + start_date_time_filter=None, # type: Optional[datetime.datetime] + end_date_time_filter=None, # type: Optional[datetime.datetime] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedBackupInfoList" + """Gets the list of backups available for the specified partition. + + Returns a list of backups available for the specified partition. The server enumerates all the + backups available in the backup store configured in the backup policy. It also allows filtering + of the result based on start and end datetime or just fetching the latest available backup for + the partition. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param latest: Specifies whether to get only the most recent backup available for a partition + for the specified time range. Default value is False. + :type latest: bool + :param start_date_time_filter: Specify the start date time from which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, all backups from the beginning are enumerated. Default value is + None. + :type start_date_time_filter: ~datetime.datetime + :param end_date_time_filter: Specify the end date time till which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, enumeration is done till the most recent backup. Default value is + None. + :type end_date_time_filter: ~datetime.datetime + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedBackupInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedBackupInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_backup_list_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + latest=latest, + start_date_time_filter=start_date_time_filter, + end_date_time_filter=end_date_time_filter, + template_url=self.get_partition_backup_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedBackupInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_backup_list.metadata = {'url': "/Partitions/{partitionId}/$/GetBackups"} # type: ignore + + + @distributed_trace + def suspend_partition_backup( # pylint: disable=inconsistent-return-statements + self, + partition_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Suspends periodic backup for the specified partition. + + The partition which is configured to take periodic backups, is suspended for taking further + backups till it is resumed again. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_suspend_partition_backup_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.suspend_partition_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + suspend_partition_backup.metadata = {'url': "/Partitions/{partitionId}/$/SuspendBackup"} # type: ignore + + + @distributed_trace + def resume_partition_backup( # pylint: disable=inconsistent-return-statements + self, + partition_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Resumes periodic backup of partition which was previously suspended. + + The previously suspended partition resumes taking periodic backup as per the backup policy + currently configured for the same. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_resume_partition_backup_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.resume_partition_backup.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + resume_partition_backup.metadata = {'url': "/Partitions/{partitionId}/$/ResumeBackup"} # type: ignore + + + @distributed_trace + def backup_partition( # pylint: disable=inconsistent-return-statements + self, + partition_id, # type: str + backup_timeout=10, # type: Optional[int] + timeout=60, # type: Optional[int] + backup_storage=None, # type: Optional["_models.BackupStorageDescription"] + **kwargs # type: Any + ): + # type: (...) -> None + """Triggers backup of the partition's state. + + Creates a backup of the stateful persisted partition's state. In case the partition is already + being periodically backed up, then by default the new backup is created at the same backup + storage. One can also override the same by specifying the backup storage details as part of the + request body. Once the backup is initiated, its progress can be tracked using the + GetBackupProgress operation. + In case, the operation times out, specify a greater backup timeout value in the query + parameter. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param backup_timeout: Specifies the maximum amount of time, in minutes, to wait for the backup + operation to complete. Post that, the operation completes with timeout error. However, in + certain corner cases it could be that though the operation returns back timeout, the backup + actually goes through. In case of timeout error, its recommended to invoke this operation again + with a greater timeout value. The default value for the same is 10 minutes. Default value is + 10. + :type backup_timeout: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param backup_storage: Specifies the details of the backup storage where to save the backup. + Default value is None. + :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _backup_partition_description = _models.BackupPartitionDescription(backup_storage=backup_storage) + if _backup_partition_description is not None: + _json = self._serialize.body(_backup_partition_description, 'BackupPartitionDescription') + else: + _json = None + + request = build_backup_partition_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + backup_timeout=backup_timeout, + timeout=timeout, + template_url=self.backup_partition.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + backup_partition.metadata = {'url': "/Partitions/{partitionId}/$/Backup"} # type: ignore + + + @distributed_trace + def get_partition_backup_progress( + self, + partition_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupProgressInfo" + """Gets details for the latest backup triggered for this partition. + + Returns information about the state of the latest backup along with details or failure reason + in case of completion. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupProgressInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.BackupProgressInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupProgressInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_backup_progress_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_partition_backup_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupProgressInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_backup_progress.metadata = {'url': "/Partitions/{partitionId}/$/GetBackupProgress"} # type: ignore + + + @distributed_trace + def restore_partition( # pylint: disable=inconsistent-return-statements + self, + partition_id, # type: str + restore_partition_description, # type: "_models.RestorePartitionDescription" + restore_timeout=10, # type: Optional[int] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Triggers restore of the state of the partition using the specified restore partition + description. + + Restores the state of a of the stateful persisted partition using the specified backup point. + In case the partition is already being periodically backed up, then by default the backup point + is looked for in the storage specified in backup policy. One can also override the same by + specifying the backup storage details as part of the restore partition description in body. + Once the restore is initiated, its progress can be tracked using the GetRestoreProgress + operation. + In case, the operation times out, specify a greater restore timeout value in the query + parameter. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param restore_partition_description: Describes the parameters to restore the partition. + :type restore_partition_description: ~azure.servicefabric.models.RestorePartitionDescription + :param restore_timeout: Specifies the maximum amount of time to wait, in minutes, for the + restore operation to complete. Post that, the operation returns back with timeout error. + However, in certain corner cases it could be that the restore operation goes through even + though it completes with timeout. In case of timeout error, its recommended to invoke this + operation again with a greater timeout value. the default value for the same is 10 minutes. + Default value is 10. + :type restore_timeout: int + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(restore_partition_description, 'RestorePartitionDescription') + + request = build_restore_partition_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + restore_timeout=restore_timeout, + timeout=timeout, + template_url=self.restore_partition.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + restore_partition.metadata = {'url': "/Partitions/{partitionId}/$/Restore"} # type: ignore + + + @distributed_trace + def get_partition_restore_progress( + self, + partition_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.RestoreProgressInfo" + """Gets details for the latest restore operation triggered for this partition. + + Returns information about the state of the latest restore operation along with details or + failure reason in case of completion. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RestoreProgressInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.RestoreProgressInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreProgressInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_restore_progress_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_partition_restore_progress.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RestoreProgressInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_restore_progress.metadata = {'url': "/Partitions/{partitionId}/$/GetRestoreProgress"} # type: ignore + + + @distributed_trace + def get_backups_from_backup_location( + self, + get_backup_by_storage_query_description, # type: "_models.GetBackupByStorageQueryDescription" + timeout=60, # type: Optional[int] + continuation_token_parameter=None, # type: Optional[str] + max_results=0, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedBackupInfoList" + """Gets the list of backups available for the specified backed up entity at the specified backup + location. + + Gets the list of backups available for the specified backed up entity (Application, Service or + Partition) at the specified backup location (FileShare or Azure Blob Storage). + + :param get_backup_by_storage_query_description: Describes the filters and backup storage + details to be used for enumerating backups. + :type get_backup_by_storage_query_description: + ~azure.servicefabric.models.GetBackupByStorageQueryDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged queries. + This parameter defines the upper bound on the number of results returned. The results returned + can be less than the specified maximum results if they do not fit in the message as per the max + message size restrictions defined in the configuration. If this parameter is zero or not + specified, the paged query includes as many results as possible that fit in the return message. + Default value is 0. + :type max_results: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedBackupInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedBackupInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(get_backup_by_storage_query_description, 'GetBackupByStorageQueryDescription') + + request = build_get_backups_from_backup_location_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + template_url=self.get_backups_from_backup_location.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedBackupInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_backups_from_backup_location.metadata = {'url': "/BackupRestore/$/GetBackups"} # type: ignore + + + @distributed_trace + def create_name( # pylint: disable=inconsistent-return-statements + self, + name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Creates a Service Fabric name. + + Creates the specified Service Fabric name. + + :param name: The Service Fabric name, including the 'fabric:' URI scheme. + :type name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _name_description = _models.NameDescription(name=name) + _json = self._serialize.body(_name_description, 'NameDescription') + + request = build_create_name_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.create_name.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + create_name.metadata = {'url': "/Names/$/Create"} # type: ignore + + + @distributed_trace + def get_name_exists_info( # pylint: disable=inconsistent-return-statements + self, + name_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Returns whether the Service Fabric name exists. + + Returns whether the specified Service Fabric name exists. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_name_exists_info_request( + name_id=name_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_name_exists_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + get_name_exists_info.metadata = {'url': "/Names/{nameId}"} # type: ignore + + + @distributed_trace + def delete_name( # pylint: disable=inconsistent-return-statements + self, + name_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a Service Fabric name. + + Deletes the specified Service Fabric name. A name must be created before it can be deleted. + Deleting a name with child properties will fail. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_name_request( + name_id=name_id, + api_version=api_version, + timeout=timeout, + template_url=self.delete_name.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_name.metadata = {'url': "/Names/{nameId}"} # type: ignore + + + @distributed_trace + def get_sub_name_info_list( + self, + name_id, # type: str + recursive=False, # type: Optional[bool] + continuation_token_parameter=None, # type: Optional[str] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedSubNameInfoList" + """Enumerates all the Service Fabric names under a given name. + + Enumerates all the Service Fabric names under a given name. If the subnames do not fit in a + page, one page of results is returned as well as a continuation token, which can be used to get + the next page. Querying a name that doesn't exist will fail. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param recursive: Allows specifying that the search performed should be recursive. Default + value is False. + :type recursive: bool + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedSubNameInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedSubNameInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedSubNameInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_sub_name_info_list_request( + name_id=name_id, + api_version=api_version, + recursive=recursive, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + template_url=self.get_sub_name_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedSubNameInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_sub_name_info_list.metadata = {'url': "/Names/{nameId}/$/GetSubNames"} # type: ignore + + + @distributed_trace + def get_property_info_list( + self, + name_id, # type: str + include_values=False, # type: Optional[bool] + continuation_token_parameter=None, # type: Optional[str] + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PagedPropertyInfoList" + """Gets information on all Service Fabric properties under a given name. + + A Service Fabric name can have one or more named properties that store custom information. This + operation gets the information about these properties in a paged list. The information includes + name, value, and metadata about each of the properties. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param include_values: Allows specifying whether to include the values of the properties + returned. True if values should be returned with the metadata; False to return only property + metadata. Default value is False. + :type include_values: bool + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :type continuation_token_parameter: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PagedPropertyInfoList, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PagedPropertyInfoList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedPropertyInfoList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_property_info_list_request( + name_id=name_id, + api_version=api_version, + include_values=include_values, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + template_url=self.get_property_info_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PagedPropertyInfoList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_property_info_list.metadata = {'url': "/Names/{nameId}/$/GetProperties"} # type: ignore + + + @distributed_trace + def put_property( # pylint: disable=inconsistent-return-statements + self, + name_id, # type: str + property_description, # type: "_models.PropertyDescription" + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Creates or updates a Service Fabric property. + + Creates or updates the specified Service Fabric property under a given name. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param property_description: Describes the Service Fabric property to be created. + :type property_description: ~azure.servicefabric.models.PropertyDescription + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(property_description, 'PropertyDescription') + + request = build_put_property_request( + name_id=name_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.put_property.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + put_property.metadata = {'url': "/Names/{nameId}/$/GetProperty"} # type: ignore + + + @distributed_trace + def get_property_info( + self, + name_id, # type: str + property_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> "_models.PropertyInfo" + """Gets the specified Service Fabric property. + + Gets the specified Service Fabric property under a given name. This will always return both + value and metadata. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param property_name: Specifies the name of the property to get. + :type property_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PropertyInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.PropertyInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PropertyInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_property_info_request( + name_id=name_id, + api_version=api_version, + property_name=property_name, + timeout=timeout, + template_url=self.get_property_info.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PropertyInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_property_info.metadata = {'url': "/Names/{nameId}/$/GetProperty"} # type: ignore + + + @distributed_trace + def delete_property( # pylint: disable=inconsistent-return-statements + self, + name_id, # type: str + property_name, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes the specified Service Fabric property. + + Deletes the specified Service Fabric property under a given name. A property must be created + before it can be deleted. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param property_name: Specifies the name of the property to get. + :type property_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_delete_property_request( + name_id=name_id, + api_version=api_version, + property_name=property_name, + timeout=timeout, + template_url=self.delete_property.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_property.metadata = {'url': "/Names/{nameId}/$/GetProperty"} # type: ignore + + + @distributed_trace + def submit_property_batch( + self, + name_id, # type: str + timeout=60, # type: Optional[int] + operations=None, # type: Optional[List["_models.PropertyBatchOperation"]] + **kwargs # type: Any + ): + # type: (...) -> Union["_models.SuccessfulPropertyBatchInfo", "_models.FailedPropertyBatchInfo"] + """Submits a property batch. + + Submits a batch of property operations. Either all or none of the operations will be committed. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param operations: A list of the property batch operations to be executed. Default value is + None. + :type operations: list[~azure.servicefabric.models.PropertyBatchOperation] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SuccessfulPropertyBatchInfo or FailedPropertyBatchInfo, or the result of cls(response) + :rtype: ~azure.servicefabric.models.SuccessfulPropertyBatchInfo or + ~azure.servicefabric.models.FailedPropertyBatchInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Union["_models.SuccessfulPropertyBatchInfo", "_models.FailedPropertyBatchInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _property_batch_description_list = _models.PropertyBatchDescriptionList(operations=operations) + _json = self._serialize.body(_property_batch_description_list, 'PropertyBatchDescriptionList') + + request = build_submit_property_batch_request( + name_id=name_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + template_url=self.submit_property_batch.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 409]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SuccessfulPropertyBatchInfo', pipeline_response) + + if response.status_code == 409: + deserialized = self._deserialize('FailedPropertyBatchInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + submit_property_batch.metadata = {'url': "/Names/{nameId}/$/GetProperties/$/SubmitBatch"} # type: ignore + + + @distributed_trace + def get_cluster_event_list( + self, + start_time_utc, # type: str + end_time_utc, # type: str + timeout=60, # type: Optional[int] + events_types_filter=None, # type: Optional[str] + exclude_analysis_events=None, # type: Optional[bool] + skip_correlation_lookup=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> List["_models.ClusterEvent"] + """Gets all Cluster-related events. + + The response is list of ClusterEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ClusterEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ClusterEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ClusterEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_cluster_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_cluster_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ClusterEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cluster_event_list.metadata = {'url': "/EventsStore/Cluster/Events"} # type: ignore + + + @distributed_trace + def get_containers_event_list( + self, + start_time_utc, # type: str + end_time_utc, # type: str + timeout=60, # type: Optional[int] + events_types_filter=None, # type: Optional[str] + exclude_analysis_events=None, # type: Optional[bool] + skip_correlation_lookup=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> List["_models.ContainerInstanceEvent"] + """Gets all Containers-related events. + + The response is list of ContainerInstanceEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ContainerInstanceEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ContainerInstanceEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ContainerInstanceEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_containers_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_containers_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ContainerInstanceEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_containers_event_list.metadata = {'url': "/EventsStore/Containers/Events"} # type: ignore + + + @distributed_trace + def get_node_event_list( + self, + node_name, # type: str + start_time_utc, # type: str + end_time_utc, # type: str + timeout=60, # type: Optional[int] + events_types_filter=None, # type: Optional[str] + exclude_analysis_events=None, # type: Optional[bool] + skip_correlation_lookup=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> List["_models.NodeEvent"] + """Gets a Node-related events. + + The response is list of NodeEvent objects. + + :param node_name: The name of the node. + :type node_name: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NodeEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.NodeEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NodeEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_node_event_list_request( + node_name=node_name, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_node_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[NodeEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_node_event_list.metadata = {'url': "/EventsStore/Nodes/{nodeName}/$/Events"} # type: ignore + + + @distributed_trace + def get_nodes_event_list( + self, + start_time_utc, # type: str + end_time_utc, # type: str + timeout=60, # type: Optional[int] + events_types_filter=None, # type: Optional[str] + exclude_analysis_events=None, # type: Optional[bool] + skip_correlation_lookup=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> List["_models.NodeEvent"] + """Gets all Nodes-related Events. + + The response is list of NodeEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of NodeEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.NodeEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NodeEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_nodes_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_nodes_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[NodeEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_nodes_event_list.metadata = {'url': "/EventsStore/Nodes/Events"} # type: ignore + + + @distributed_trace + def get_application_event_list( + self, + application_id, # type: str + start_time_utc, # type: str + end_time_utc, # type: str + timeout=60, # type: Optional[int] + events_types_filter=None, # type: Optional[str] + exclude_analysis_events=None, # type: Optional[bool] + skip_correlation_lookup=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> List["_models.ApplicationEvent"] + """Gets an Application-related events. + + The response is list of ApplicationEvent objects. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ApplicationEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ApplicationEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ApplicationEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_application_event_list_request( + application_id=application_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_application_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ApplicationEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_application_event_list.metadata = {'url': "/EventsStore/Applications/{applicationId}/$/Events"} # type: ignore + + + @distributed_trace + def get_applications_event_list( + self, + start_time_utc, # type: str + end_time_utc, # type: str + timeout=60, # type: Optional[int] + events_types_filter=None, # type: Optional[str] + exclude_analysis_events=None, # type: Optional[bool] + skip_correlation_lookup=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> List["_models.ApplicationEvent"] + """Gets all Applications-related events. + + The response is list of ApplicationEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ApplicationEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ApplicationEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ApplicationEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_applications_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_applications_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ApplicationEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_applications_event_list.metadata = {'url': "/EventsStore/Applications/Events"} # type: ignore + + + @distributed_trace + def get_service_event_list( + self, + service_id, # type: str + start_time_utc, # type: str + end_time_utc, # type: str + timeout=60, # type: Optional[int] + events_types_filter=None, # type: Optional[str] + exclude_analysis_events=None, # type: Optional[bool] + skip_correlation_lookup=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> List["_models.ServiceEvent"] + """Gets a Service-related events. + + The response is list of ServiceEvent objects. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ServiceEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ServiceEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ServiceEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_service_event_list_request( + service_id=service_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_service_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ServiceEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_service_event_list.metadata = {'url': "/EventsStore/Services/{serviceId}/$/Events"} # type: ignore + + + @distributed_trace + def get_services_event_list( + self, + start_time_utc, # type: str + end_time_utc, # type: str + timeout=60, # type: Optional[int] + events_types_filter=None, # type: Optional[str] + exclude_analysis_events=None, # type: Optional[bool] + skip_correlation_lookup=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> List["_models.ServiceEvent"] + """Gets all Services-related events. + + The response is list of ServiceEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ServiceEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ServiceEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ServiceEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_services_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_services_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ServiceEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_services_event_list.metadata = {'url': "/EventsStore/Services/Events"} # type: ignore + + + @distributed_trace + def get_partition_event_list( + self, + partition_id, # type: str + start_time_utc, # type: str + end_time_utc, # type: str + timeout=60, # type: Optional[int] + events_types_filter=None, # type: Optional[str] + exclude_analysis_events=None, # type: Optional[bool] + skip_correlation_lookup=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> List["_models.PartitionEvent"] + """Gets a Partition-related events. + + The response is list of PartitionEvent objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of PartitionEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.PartitionEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.PartitionEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_event_list_request( + partition_id=partition_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_partition_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[PartitionEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_event_list.metadata = {'url': "/EventsStore/Partitions/{partitionId}/$/Events"} # type: ignore + + + @distributed_trace + def get_partitions_event_list( + self, + start_time_utc, # type: str + end_time_utc, # type: str + timeout=60, # type: Optional[int] + events_types_filter=None, # type: Optional[str] + exclude_analysis_events=None, # type: Optional[bool] + skip_correlation_lookup=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> List["_models.PartitionEvent"] + """Gets all Partitions-related events. + + The response is list of PartitionEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of PartitionEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.PartitionEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.PartitionEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partitions_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_partitions_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[PartitionEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partitions_event_list.metadata = {'url': "/EventsStore/Partitions/Events"} # type: ignore + + + @distributed_trace + def get_partition_replica_event_list( + self, + partition_id, # type: str + replica_id, # type: str + start_time_utc, # type: str + end_time_utc, # type: str + timeout=60, # type: Optional[int] + events_types_filter=None, # type: Optional[str] + exclude_analysis_events=None, # type: Optional[bool] + skip_correlation_lookup=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> List["_models.ReplicaEvent"] + """Gets a Partition Replica-related events. + + The response is list of ReplicaEvent objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ReplicaEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ReplicaEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ReplicaEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_replica_event_list_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_partition_replica_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ReplicaEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_replica_event_list.metadata = {'url': "/EventsStore/Partitions/{partitionId}/$/Replicas/{replicaId}/$/Events"} # type: ignore + + + @distributed_trace + def get_partition_replicas_event_list( + self, + partition_id, # type: str + start_time_utc, # type: str + end_time_utc, # type: str + timeout=60, # type: Optional[int] + events_types_filter=None, # type: Optional[str] + exclude_analysis_events=None, # type: Optional[bool] + skip_correlation_lookup=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> List["_models.ReplicaEvent"] + """Gets all Replicas-related events for a Partition. + + The response is list of ReplicaEvent objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is + passed. Default value is None. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information + if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field + in every FabricEvent gets populated. Default value is None. + :type skip_correlation_lookup: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of ReplicaEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.ReplicaEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ReplicaEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_partition_replicas_event_list_request( + partition_id=partition_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + template_url=self.get_partition_replicas_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[ReplicaEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_partition_replicas_event_list.metadata = {'url': "/EventsStore/Partitions/{partitionId}/$/Replicas/Events"} # type: ignore + + + @distributed_trace + def get_correlated_event_list( + self, + event_instance_id, # type: str + timeout=60, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> List["_models.FabricEvent"] + """Gets all correlated events for a given event. + + The response is list of FabricEvents. + + :param event_instance_id: The EventInstanceId. + :type event_instance_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :type timeout: long + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of FabricEvent, or the result of cls(response) + :rtype: list[~azure.servicefabric.models.FabricEvent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List["_models.FabricEvent"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + + + request = build_get_correlated_event_list_request( + event_instance_id=event_instance_id, + api_version=api_version, + timeout=timeout, + template_url=self.get_correlated_event_list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[FabricEvent]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_correlated_event_list.metadata = {'url': "/EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events"} # type: ignore + diff --git a/customSDK/servicefabric/operations/mesh_application_operations.py b/customSDK/servicefabric/operations/mesh_application_operations.py new file mode 100644 index 00000000..a9d3763d --- /dev/null +++ b/customSDK/servicefabric/operations/mesh_application_operations.py @@ -0,0 +1,350 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class MeshApplicationOperations(object): + """MeshApplicationOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def create_or_update( + self, application_resource_name, application_resource_description, custom_headers=None, raw=False, **operation_config): + """Creates or updates a Application resource. + + Creates a Application resource with the specified name, description and + properties. If Application resource with the same name exists, then it + is updated with the specified description and properties. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param application_resource_description: Description for creating a + Application resource. + :type application_resource_description: + ~azure.servicefabric.models.ApplicationResourceDescription + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationResourceDescription or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.ApplicationResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4-preview" + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(application_resource_description, 'ApplicationResourceDescription') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.FabricErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationResourceDescription', response) + if response.status_code == 201: + deserialized = self._deserialize('ApplicationResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/Resources/Applications/{applicationResourceName}'} + + def get( + self, application_resource_name, custom_headers=None, raw=False, **operation_config): + """Gets the Application resource with the given name. + + Gets the information about the Application resource with the given + name. The information include the description and other properties of + the Application. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationResourceDescription or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.ApplicationResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4-preview" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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.metadata = {'url': '/Resources/Applications/{applicationResourceName}'} + + def delete( + self, application_resource_name, custom_headers=None, raw=False, **operation_config): + """Deletes the Application resource. + + Deletes the Application resource identified by the name. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4-preview" + + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = 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.metadata = {'url': '/Resources/Applications/{applicationResourceName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the application resources. + + Gets the information about all application resources in a given + resource group. The information include the description and other + properties of the Application. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedApplicationResourceDescriptionList or ClientRawResponse + if raw=true + :rtype: + ~azure.servicefabric.models.PagedApplicationResourceDescriptionList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4-preview" + + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedApplicationResourceDescriptionList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/Resources/Applications'} + + def get_upgrade_progress( + self, application_resource_name, custom_headers=None, raw=False, **operation_config): + """Gets the progress of the latest upgrade performed on this application + resource. + + Gets the upgrade progress information about the Application resource + with the given name. The information include percentage of completion + and other upgrade state information of the Application resource. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationResourceUpgradeProgressInfo or ClientRawResponse + if raw=true + :rtype: + ~azure.servicefabric.models.ApplicationResourceUpgradeProgressInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "7.0" + + # Construct URL + url = self.get_upgrade_progress.metadata['url'] + path_format_arguments = { + 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ApplicationResourceUpgradeProgressInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_upgrade_progress.metadata = {'url': '/Resources/Applications/{applicationResourceName}/$/GetUpgradeProgress'} diff --git a/customSDK/servicefabric/operations/mesh_code_package_operations.py b/customSDK/servicefabric/operations/mesh_code_package_operations.py new file mode 100644 index 00000000..a1d4afaf --- /dev/null +++ b/customSDK/servicefabric/operations/mesh_code_package_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class MeshCodePackageOperations(object): + """MeshCodePackageOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "6.4-preview" + + self.config = config + + def get_container_logs( + self, application_resource_name, service_resource_name, replica_name, code_package_name, tail=None, custom_headers=None, raw=False, **operation_config): + """Gets the logs from the container. + + Gets the logs for the container of the specified code package of the + service replica. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :param replica_name: Service Fabric replica name. + :type replica_name: str + :param code_package_name: The name of code package of the service. + :type code_package_name: str + :param tail: Number of lines to show from the end of the logs. Default + is 100. 'all' to show the complete logs. + :type tail: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ContainerLogs or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ContainerLogs or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.get_container_logs.metadata['url'] + path_format_arguments = { + 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True), + 'replicaName': self._serialize.url("replica_name", replica_name, 'str', skip_quote=True), + 'codePackageName': self._serialize.url("code_package_name", code_package_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if tail is not None: + query_parameters['Tail'] = self._serialize.query("tail", tail, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ContainerLogs', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_container_logs.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}/CodePackages/{codePackageName}/Logs'} diff --git a/customSDK/servicefabric/operations/mesh_gateway_operations.py b/customSDK/servicefabric/operations/mesh_gateway_operations.py new file mode 100644 index 00000000..a9c2c8ba --- /dev/null +++ b/customSDK/servicefabric/operations/mesh_gateway_operations.py @@ -0,0 +1,277 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class MeshGatewayOperations(object): + """MeshGatewayOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "6.4-preview" + + self.config = config + + def create_or_update( + self, gateway_resource_name, gateway_resource_description, custom_headers=None, raw=False, **operation_config): + """Creates or updates a Gateway resource. + + Creates a Gateway resource with the specified name, description and + properties. If Gateway resource with the same name exists, then it is + updated with the specified description and properties. Use Gateway + resource to provide public connectivity to application services. + + :param gateway_resource_name: The identity of the gateway. + :type gateway_resource_name: str + :param gateway_resource_description: Description for creating a + Gateway resource. + :type gateway_resource_description: + ~azure.servicefabric.models.GatewayResourceDescription + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: GatewayResourceDescription or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.GatewayResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(gateway_resource_description, 'GatewayResourceDescription') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.FabricErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GatewayResourceDescription', response) + if response.status_code == 201: + deserialized = self._deserialize('GatewayResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/Resources/Gateways/{gatewayResourceName}'} + + def get( + self, gateway_resource_name, custom_headers=None, raw=False, **operation_config): + """Gets the Gateway resource with the given name. + + Gets the information about the Gateway resource with the given name. + The information include the description and other properties of the + Gateway. + + :param gateway_resource_name: The identity of the gateway. + :type gateway_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: GatewayResourceDescription or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.GatewayResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('GatewayResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/Resources/Gateways/{gatewayResourceName}'} + + def delete( + self, gateway_resource_name, custom_headers=None, raw=False, **operation_config): + """Deletes the Gateway resource. + + Deletes the Gateway resource identified by the name. + + :param gateway_resource_name: The identity of the gateway. + :type gateway_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = 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.metadata = {'url': '/Resources/Gateways/{gatewayResourceName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the gateway resources. + + Gets the information about all gateway resources in a given resource + group. The information include the description and other properties of + the Gateway. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedGatewayResourceDescriptionList or ClientRawResponse if + raw=true + :rtype: + ~azure.servicefabric.models.PagedGatewayResourceDescriptionList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedGatewayResourceDescriptionList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/Resources/Gateways'} diff --git a/customSDK/servicefabric/operations/mesh_network_operations.py b/customSDK/servicefabric/operations/mesh_network_operations.py new file mode 100644 index 00000000..1ff8a556 --- /dev/null +++ b/customSDK/servicefabric/operations/mesh_network_operations.py @@ -0,0 +1,280 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class MeshNetworkOperations(object): + """MeshNetworkOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "6.4-preview" + + self.config = config + + def create_or_update( + self, network_resource_name, name, properties, custom_headers=None, raw=False, **operation_config): + """Creates or updates a Network resource. + + Creates a Network resource with the specified name, description and + properties. If Network resource with the same name exists, then it is + updated with the specified description and properties. Network resource + provides connectivity between application services. + + :param network_resource_name: The identity of the network. + :type network_resource_name: str + :param name: Name of the Network resource. + :type name: str + :param properties: Describes properties of a network resource. + :type properties: + ~azure.servicefabric.models.NetworkResourceProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NetworkResourceDescription or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.NetworkResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + network_resource_description = models.NetworkResourceDescription(name=name, properties=properties) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(network_resource_description, 'NetworkResourceDescription') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.FabricErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('NetworkResourceDescription', response) + if response.status_code == 201: + deserialized = self._deserialize('NetworkResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/Resources/Networks/{networkResourceName}'} + + def get( + self, network_resource_name, custom_headers=None, raw=False, **operation_config): + """Gets the Network resource with the given name. + + Gets the information about the Network resource with the given name. + The information include the description and other properties of the + Network. + + :param network_resource_name: The identity of the network. + :type network_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NetworkResourceDescription or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.NetworkResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('NetworkResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/Resources/Networks/{networkResourceName}'} + + def delete( + self, network_resource_name, custom_headers=None, raw=False, **operation_config): + """Deletes the Network resource. + + Deletes the Network resource identified by the name. + + :param network_resource_name: The identity of the network. + :type network_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = 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.metadata = {'url': '/Resources/Networks/{networkResourceName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the network resources. + + Gets the information about all network resources in a given resource + group. The information include the description and other properties of + the Network. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedNetworkResourceDescriptionList or ClientRawResponse if + raw=true + :rtype: + ~azure.servicefabric.models.PagedNetworkResourceDescriptionList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedNetworkResourceDescriptionList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/Resources/Networks'} diff --git a/customSDK/servicefabric/operations/mesh_secret_operations.py b/customSDK/servicefabric/operations/mesh_secret_operations.py new file mode 100644 index 00000000..bf15d6cc --- /dev/null +++ b/customSDK/servicefabric/operations/mesh_secret_operations.py @@ -0,0 +1,277 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class MeshSecretOperations(object): + """MeshSecretOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "6.4-preview" + + self.config = config + + def create_or_update( + self, secret_resource_name, properties, name, custom_headers=None, raw=False, **operation_config): + """Creates or updates a Secret resource. + + Creates a Secret resource with the specified name, description and + properties. If Secret resource with the same name exists, then it is + updated with the specified description and properties. Once created, + the kind and contentType of a secret resource cannot be updated. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param properties: Describes the properties of a secret resource. + :type properties: ~azure.servicefabric.models.SecretResourceProperties + :param name: Name of the Secret resource. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SecretResourceDescription or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.SecretResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + secret_resource_description = models.SecretResourceDescription(properties=properties, name=name) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(secret_resource_description, 'SecretResourceDescription') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.FabricErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SecretResourceDescription', response) + if response.status_code == 201: + deserialized = self._deserialize('SecretResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/Resources/Secrets/{secretResourceName}'} + + def get( + self, secret_resource_name, custom_headers=None, raw=False, **operation_config): + """Gets the Secret resource with the given name. + + Gets the information about the Secret resource with the given name. The + information include the description and other properties of the Secret. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SecretResourceDescription or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.SecretResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('SecretResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/Resources/Secrets/{secretResourceName}'} + + def delete( + self, secret_resource_name, custom_headers=None, raw=False, **operation_config): + """Deletes the Secret resource. + + Deletes the specified Secret resource and all of its named values. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = 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.metadata = {'url': '/Resources/Secrets/{secretResourceName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the secret resources. + + Gets the information about all secret resources in a given resource + group. The information include the description and other properties of + the Secret. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedSecretResourceDescriptionList or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.PagedSecretResourceDescriptionList + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedSecretResourceDescriptionList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/Resources/Secrets'} diff --git a/customSDK/servicefabric/operations/mesh_secret_value_operations.py b/customSDK/servicefabric/operations/mesh_secret_value_operations.py new file mode 100644 index 00000000..9c4fba47 --- /dev/null +++ b/customSDK/servicefabric/operations/mesh_secret_value_operations.py @@ -0,0 +1,364 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class MeshSecretValueOperations(object): + """MeshSecretValueOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "6.4-preview" + + self.config = config + + def add_value( + self, secret_resource_name, secret_value_resource_name, name, value=None, custom_headers=None, raw=False, **operation_config): + """Adds the specified value as a new version of the specified secret + resource. + + Creates a new value of the specified secret resource. The name of the + value is typically the version identifier. Once created the value + cannot be changed. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource + value which is typically the version identifier for the value. + :type secret_value_resource_name: str + :param name: Version identifier of the secret value. + :type name: str + :param value: The actual value of the secret. + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SecretValueResourceDescription or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.SecretValueResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + secret_value_resource_description = models.SecretValueResourceDescription(name=name, value=value) + + # Construct URL + url = self.add_value.metadata['url'] + path_format_arguments = { + 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(secret_value_resource_description, 'SecretValueResourceDescription') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.FabricErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SecretValueResourceDescription', response) + if response.status_code == 201: + deserialized = self._deserialize('SecretValueResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_value.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'} + + def get( + self, secret_resource_name, secret_value_resource_name, custom_headers=None, raw=False, **operation_config): + """Gets the specified secret value resource. + + Get the information about the specified named secret value resources. + The information does not include the actual value of the secret. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource + value which is typically the version identifier for the value. + :type secret_value_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SecretValueResourceDescription or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.SecretValueResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('SecretValueResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'} + + def delete( + self, secret_resource_name, secret_value_resource_name, custom_headers=None, raw=False, **operation_config): + """Deletes the specified value of the named secret resource. + + Deletes the secret value resource identified by the name. The name of + the resource is typically the version associated with that value. + Deletion will fail if the specified value is in use. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource + value which is typically the version identifier for the value. + :type secret_value_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = 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.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'} + + def list( + self, secret_resource_name, custom_headers=None, raw=False, **operation_config): + """List names of all values of the specified secret resource. + + Gets information about all secret value resources of the specified + secret resource. The information includes the names of the secret value + resources, but not the actual values. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedSecretValueResourceDescriptionList or ClientRawResponse + if raw=true + :rtype: + ~azure.servicefabric.models.PagedSecretValueResourceDescriptionList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedSecretValueResourceDescriptionList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values'} + + def show( + self, secret_resource_name, secret_value_resource_name, custom_headers=None, raw=False, **operation_config): + """Lists the specified value of the secret resource. + + Lists the decrypted value of the specified named value of the secret + resource. This is a privileged operation. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource + value which is typically the version identifier for the value. + :type secret_value_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SecretValue or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.SecretValue or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.show.metadata['url'] + path_format_arguments = { + 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = 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('SecretValue', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + show.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}/list_value'} diff --git a/customSDK/servicefabric/operations/mesh_service_operations.py b/customSDK/servicefabric/operations/mesh_service_operations.py new file mode 100644 index 00000000..04a179fc --- /dev/null +++ b/customSDK/servicefabric/operations/mesh_service_operations.py @@ -0,0 +1,164 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class MeshServiceOperations(object): + """MeshServiceOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "6.4-preview" + + self.config = config + + def get( + self, application_resource_name, service_resource_name, custom_headers=None, raw=False, **operation_config): + """Gets the Service resource with the given name. + + Gets the information about the Service resource with the given name. + The information include the description and other properties of the + Service. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceResourceDescription or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ServiceResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ServiceResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}'} + + def list( + self, application_resource_name, custom_headers=None, raw=False, **operation_config): + """Lists all the service resources. + + Gets the information about all services of an application resource. The + information include the description and other properties of the + Service. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedServiceResourceDescriptionList or ClientRawResponse if + raw=true + :rtype: + ~azure.servicefabric.models.PagedServiceResourceDescriptionList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedServiceResourceDescriptionList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services'} diff --git a/customSDK/servicefabric/operations/mesh_service_replica_operations.py b/customSDK/servicefabric/operations/mesh_service_replica_operations.py new file mode 100644 index 00000000..19bea152 --- /dev/null +++ b/customSDK/servicefabric/operations/mesh_service_replica_operations.py @@ -0,0 +1,168 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class MeshServiceReplicaOperations(object): + """MeshServiceReplicaOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "6.4-preview" + + self.config = config + + def get( + self, application_resource_name, service_resource_name, replica_name, custom_headers=None, raw=False, **operation_config): + """Gets the given replica of the service of an application. + + Gets the information about the service replica with the given name. The + information include the description and other properties of the service + replica. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :param replica_name: Service Fabric replica name. + :type replica_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceReplicaDescription or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ServiceReplicaDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True), + 'replicaName': self._serialize.url("replica_name", replica_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ServiceReplicaDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}'} + + def list( + self, application_resource_name, service_resource_name, custom_headers=None, raw=False, **operation_config): + """Lists all the replicas of a service. + + Gets the information about all replicas of a service. The information + include the description and other properties of the service replica. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedServiceReplicaDescriptionList or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.PagedServiceReplicaDescriptionList + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedServiceReplicaDescriptionList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas'} diff --git a/customSDK/servicefabric/operations/mesh_volume_operations.py b/customSDK/servicefabric/operations/mesh_volume_operations.py new file mode 100644 index 00000000..f637bacc --- /dev/null +++ b/customSDK/servicefabric/operations/mesh_volume_operations.py @@ -0,0 +1,274 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class MeshVolumeOperations(object): + """MeshVolumeOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "6.4-preview" + + self.config = config + + def create_or_update( + self, volume_resource_name, volume_resource_description, custom_headers=None, raw=False, **operation_config): + """Creates or updates a Volume resource. + + Creates a Volume resource with the specified name, description and + properties. If Volume resource with the same name exists, then it is + updated with the specified description and properties. + + :param volume_resource_name: The identity of the volume. + :type volume_resource_name: str + :param volume_resource_description: Description for creating a Volume + resource. + :type volume_resource_description: + ~azure.servicefabric.models.VolumeResourceDescription + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VolumeResourceDescription or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.VolumeResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(volume_resource_description, 'VolumeResourceDescription') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.FabricErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VolumeResourceDescription', response) + if response.status_code == 201: + deserialized = self._deserialize('VolumeResourceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'} + + def get( + self, volume_resource_name, custom_headers=None, raw=False, **operation_config): + """Gets the Volume resource with the given name. + + Gets the information about the Volume resource with the given name. The + information include the description and other properties of the Volume. + + :param volume_resource_name: The identity of the volume. + :type volume_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VolumeResourceDescription or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.VolumeResourceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'} + + def delete( + self, volume_resource_name, custom_headers=None, raw=False, **operation_config): + """Deletes the Volume resource. + + Deletes the Volume resource identified by the name. + + :param volume_resource_name: The identity of the volume. + :type volume_resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = 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.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the volume resources. + + Gets the information about all volume resources in a given resource + group. The information include the description and other properties of + the Volume. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedVolumeResourceDescriptionList or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.PagedVolumeResourceDescriptionList + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedVolumeResourceDescriptionList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/Resources/Volumes'} diff --git a/customSDK/servicefabric/py.typed b/customSDK/servicefabric/py.typed new file mode 100644 index 00000000..e5aff4f8 --- /dev/null +++ b/customSDK/servicefabric/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/customSDK/servicefabric/service_fabric_client_ap_is.py b/customSDK/servicefabric/service_fabric_client_ap_is.py new file mode 100644 index 00000000..43bb62de --- /dev/null +++ b/customSDK/servicefabric/service_fabric_client_ap_is.py @@ -0,0 +1,18049 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from msrest.pipeline import ClientRawResponse +import uuid +from .operations.mesh_secret_operations import MeshSecretOperations +from .operations.mesh_secret_value_operations import MeshSecretValueOperations +from .operations.mesh_volume_operations import MeshVolumeOperations +from .operations.mesh_network_operations import MeshNetworkOperations +from .operations.mesh_application_operations import MeshApplicationOperations +from .operations.mesh_service_operations import MeshServiceOperations +from .operations.mesh_code_package_operations import MeshCodePackageOperations +from .operations.mesh_service_replica_operations import MeshServiceReplicaOperations +from .operations.mesh_gateway_operations import MeshGatewayOperations +from . import models + + +class ServiceFabricClientAPIsConfiguration(AzureConfiguration): + """Configuration for ServiceFabricClientAPIs + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if not base_url: + base_url = 'http://localhost:19080' + + super(ServiceFabricClientAPIsConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-servicefabric/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + + +class ServiceFabricClientAPIs(SDKClient): + """Service Fabric REST Client APIs allows management of Service Fabric clusters, applications and services. + + :ivar config: Configuration for client. + :vartype config: ServiceFabricClientAPIsConfiguration + + :ivar mesh_secret: MeshSecret operations + :vartype mesh_secret: azure.servicefabric.operations.MeshSecretOperations + :ivar mesh_secret_value: MeshSecretValue operations + :vartype mesh_secret_value: azure.servicefabric.operations.MeshSecretValueOperations + :ivar mesh_volume: MeshVolume operations + :vartype mesh_volume: azure.servicefabric.operations.MeshVolumeOperations + :ivar mesh_network: MeshNetwork operations + :vartype mesh_network: azure.servicefabric.operations.MeshNetworkOperations + :ivar mesh_application: MeshApplication operations + :vartype mesh_application: azure.servicefabric.operations.MeshApplicationOperations + :ivar mesh_service: MeshService operations + :vartype mesh_service: azure.servicefabric.operations.MeshServiceOperations + :ivar mesh_code_package: MeshCodePackage operations + :vartype mesh_code_package: azure.servicefabric.operations.MeshCodePackageOperations + :ivar mesh_service_replica: MeshServiceReplica operations + :vartype mesh_service_replica: azure.servicefabric.operations.MeshServiceReplicaOperations + :ivar mesh_gateway: MeshGateway operations + :vartype mesh_gateway: azure.servicefabric.operations.MeshGatewayOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + self.config = ServiceFabricClientAPIsConfiguration(credentials, base_url) + super(ServiceFabricClientAPIs, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '8.2.0.46' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.mesh_secret = MeshSecretOperations( + self._client, self.config, self._serialize, self._deserialize) + self.mesh_secret_value = MeshSecretValueOperations( + self._client, self.config, self._serialize, self._deserialize) + self.mesh_volume = MeshVolumeOperations( + self._client, self.config, self._serialize, self._deserialize) + self.mesh_network = MeshNetworkOperations( + self._client, self.config, self._serialize, self._deserialize) + self.mesh_application = MeshApplicationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.mesh_service = MeshServiceOperations( + self._client, self.config, self._serialize, self._deserialize) + self.mesh_code_package = MeshCodePackageOperations( + self._client, self.config, self._serialize, self._deserialize) + self.mesh_service_replica = MeshServiceReplicaOperations( + self._client, self.config, self._serialize, self._deserialize) + self.mesh_gateway = MeshGatewayOperations( + self._client, self.config, self._serialize, self._deserialize) + + def get_cluster_manifest( + self, timeout=60, custom_headers=None, raw=False, **operation_config): + """Get the Service Fabric cluster manifest. + + Get the Service Fabric cluster manifest. The cluster manifest contains + properties of the cluster that include different node types on the + cluster, + security configurations, fault, and upgrade domain topologies, etc. + These properties are specified as part of the ClusterConfig.JSON file + while deploying a stand-alone cluster. However, most of the information + in the cluster manifest + is generated internally by service fabric during cluster deployment in + other deployment scenarios (e.g. when using Azure portal). + The contents of the cluster manifest are for informational purposes + only and users are not expected to take a dependency on the format of + the file contents or its interpretation. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ClusterManifest or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ClusterManifest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_cluster_manifest.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ClusterManifest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_cluster_manifest.metadata = {'url': '/$/GetClusterManifest'} + + def get_cluster_health( + self, nodes_health_state_filter=0, applications_health_state_filter=0, events_health_state_filter=0, exclude_health_statistics=False, include_system_application_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the health of a Service Fabric cluster. + + Use EventsHealthStateFilter to filter the collection of health events + reported on the cluster based on the health state. + Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter + to filter the collection of nodes and applications returned based on + their aggregated health state. + + :param nodes_health_state_filter: Allows filtering of the node health + state objects returned in the result of cluster health query + based on their health state. The possible values for this parameter + include integer value of one of the + following health states. Only nodes that match the filter are + returned. All nodes are used to evaluate the aggregated health state. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of nodes + with HealthState value of OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type nodes_health_state_filter: int + :param applications_health_state_filter: Allows filtering of the + application health state objects returned in the result of cluster + health + query based on their health state. + The possible values for this parameter include integer value obtained + from members or bitwise operations + on members of HealthStateFilter enumeration. Only applications that + match the filter are returned. + All applications are used to evaluate the aggregated health state. If + not specified, all entries are returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of + applications with HealthState value of OK (2) and Warning (4) are + returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type applications_health_state_filter: int + :param events_health_state_filter: Allows filtering the collection of + HealthEvent objects returned based on health state. + The possible values for this parameter include integer value of one of + the following health states. + Only events that match the filter are returned. All events are used to + evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, obtained using the bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type events_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health + statistics should be returned as part of the query result. False by + default. + The statistics show the number of children entities in health state + Ok, Warning, and Error. + :type exclude_health_statistics: bool + :param include_system_application_health_statistics: Indicates whether + the health statistics should include the fabric:/System application + health statistics. False by default. + If IncludeSystemApplicationHealthStatistics is set to true, the health + statistics include the entities that belong to the fabric:/System + application. + Otherwise, the query result includes health statistics only for user + applications. + The health statistics must be included in the query result for this + parameter to be applied. + :type include_system_application_health_statistics: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ClusterHealth or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ClusterHealth or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_cluster_health.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if nodes_health_state_filter is not None: + query_parameters['NodesHealthStateFilter'] = self._serialize.query("nodes_health_state_filter", nodes_health_state_filter, 'int') + if applications_health_state_filter is not None: + query_parameters['ApplicationsHealthStateFilter'] = self._serialize.query("applications_health_state_filter", applications_health_state_filter, 'int') + if events_health_state_filter is not None: + query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + if exclude_health_statistics is not None: + query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if include_system_application_health_statistics is not None: + query_parameters['IncludeSystemApplicationHealthStatistics'] = self._serialize.query("include_system_application_health_statistics", include_system_application_health_statistics, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ClusterHealth', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_cluster_health.metadata = {'url': '/$/GetClusterHealth'} + + def get_cluster_health_using_policy( + self, nodes_health_state_filter=0, applications_health_state_filter=0, events_health_state_filter=0, exclude_health_statistics=False, include_system_application_health_statistics=False, timeout=60, application_health_policy_map=None, cluster_health_policy=None, custom_headers=None, raw=False, **operation_config): + """Gets the health of a Service Fabric cluster using the specified policy. + + Use EventsHealthStateFilter to filter the collection of health events + reported on the cluster based on the health state. + Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter + to filter the collection of nodes and applications returned based on + their aggregated health state. + Use ClusterHealthPolicies to override the health policies used to + evaluate the health. + + :param nodes_health_state_filter: Allows filtering of the node health + state objects returned in the result of cluster health query + based on their health state. The possible values for this parameter + include integer value of one of the + following health states. Only nodes that match the filter are + returned. All nodes are used to evaluate the aggregated health state. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of nodes + with HealthState value of OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type nodes_health_state_filter: int + :param applications_health_state_filter: Allows filtering of the + application health state objects returned in the result of cluster + health + query based on their health state. + The possible values for this parameter include integer value obtained + from members or bitwise operations + on members of HealthStateFilter enumeration. Only applications that + match the filter are returned. + All applications are used to evaluate the aggregated health state. If + not specified, all entries are returned. + The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of + applications with HealthState value of OK (2) and Warning (4) are + returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type applications_health_state_filter: int + :param events_health_state_filter: Allows filtering the collection of + HealthEvent objects returned based on health state. + The possible values for this parameter include integer value of one of + the following health states. + Only events that match the filter are returned. All events are used to + evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, obtained using the bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type events_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health + statistics should be returned as part of the query result. False by + default. + The statistics show the number of children entities in health state + Ok, Warning, and Error. + :type exclude_health_statistics: bool + :param include_system_application_health_statistics: Indicates whether + the health statistics should include the fabric:/System application + health statistics. False by default. + If IncludeSystemApplicationHealthStatistics is set to true, the health + statistics include the entities that belong to the fabric:/System + application. + Otherwise, the query result includes health statistics only for user + applications. + The health statistics must be included in the query result for this + parameter to be applied. + :type include_system_application_health_statistics: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param application_health_policy_map: Defines a map that contains + specific application health policies for different applications. + Each entry specifies as key the application name and as value an + ApplicationHealthPolicy used to evaluate the application health. + If an application is not specified in the map, the application health + evaluation uses the ApplicationHealthPolicy found in its application + manifest or the default application health policy (if no health policy + is defined in the manifest). + The map is empty by default. + :type application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + :param cluster_health_policy: Defines a health policy used to evaluate + the health of the cluster or of a cluster node. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ClusterHealth or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ClusterHealth or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + cluster_health_policies = None + if application_health_policy_map is not None or cluster_health_policy is not None: + cluster_health_policies = models.ClusterHealthPolicies(application_health_policy_map=application_health_policy_map, cluster_health_policy=cluster_health_policy) + + api_version = "6.0" + + # Construct URL + url = self.get_cluster_health_using_policy.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if nodes_health_state_filter is not None: + query_parameters['NodesHealthStateFilter'] = self._serialize.query("nodes_health_state_filter", nodes_health_state_filter, 'int') + if applications_health_state_filter is not None: + query_parameters['ApplicationsHealthStateFilter'] = self._serialize.query("applications_health_state_filter", applications_health_state_filter, 'int') + if events_health_state_filter is not None: + query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + if exclude_health_statistics is not None: + query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if include_system_application_health_statistics is not None: + query_parameters['IncludeSystemApplicationHealthStatistics'] = self._serialize.query("include_system_application_health_statistics", include_system_application_health_statistics, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if cluster_health_policies is not None: + body_content = self._serialize.body(cluster_health_policies, 'ClusterHealthPolicies') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('ClusterHealth', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_cluster_health_using_policy.metadata = {'url': '/$/GetClusterHealth'} + + def get_cluster_health_chunk( + self, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the health of a Service Fabric cluster using health chunks. + + Gets the health of a Service Fabric cluster using health chunks. + Includes the aggregated health state of the cluster, but none of the + cluster entities. + To expand the cluster health and get the health state of all or some of + the entities, use the POST URI and specify the cluster health chunk + query description. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ClusterHealthChunk or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ClusterHealthChunk or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_cluster_health_chunk.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ClusterHealthChunk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_cluster_health_chunk.metadata = {'url': '/$/GetClusterHealthChunk'} + + def get_cluster_health_chunk_using_policy_and_advanced_filters( + self, cluster_health_chunk_query_description=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the health of a Service Fabric cluster using health chunks. + + Gets the health of a Service Fabric cluster using health chunks. The + health evaluation is done based on the input cluster health chunk query + description. + The query description allows users to specify health policies for + evaluating the cluster and its children. + Users can specify very flexible filters to select which cluster + entities to return. The selection can be done based on the entities + health state and based on the hierarchy. + The query can return multi-level children of the entities based on the + specified filters. For example, it can return one application with a + specified name, and for this application, return + only services that are in Error or Warning, and all partitions and + replicas for one of these services. + + :param cluster_health_chunk_query_description: Describes the cluster + and application health policies used to evaluate the cluster health + and the filters to select which cluster entities to be returned. + If the cluster health policy is present, it is used to evaluate the + cluster events and the cluster nodes. If not present, the health + evaluation uses the cluster health policy defined in the cluster + manifest or the default cluster health policy. + By default, each application is evaluated using its specific + application health policy, defined in the application manifest, or the + default health policy, if no policy is defined in manifest. + If the application health policy map is specified, and it has an entry + for an application, the specified application health policy + is used to evaluate the application health. + Users can specify very flexible filters to select which cluster + entities to include in response. The selection can be done based on + the entities health state and based on the hierarchy. + The query can return multi-level children of the entities based on the + specified filters. For example, it can return one application with a + specified name, and for this application, return + only services that are in Error or Warning, and all partitions and + replicas for one of these services. + :type cluster_health_chunk_query_description: + ~azure.servicefabric.models.ClusterHealthChunkQueryDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ClusterHealthChunk or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ClusterHealthChunk or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_cluster_health_chunk_using_policy_and_advanced_filters.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if cluster_health_chunk_query_description is not None: + body_content = self._serialize.body(cluster_health_chunk_query_description, 'ClusterHealthChunkQueryDescription') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('ClusterHealthChunk', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_cluster_health_chunk_using_policy_and_advanced_filters.metadata = {'url': '/$/GetClusterHealthChunk'} + + def report_cluster_health( + self, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Sends a health report on the Service Fabric cluster. + + Sends a health report on a Service Fabric cluster. The report must + contain the information about the source of the health report and + property on which it is reported. + The report is sent to a Service Fabric gateway node, which forwards to + the health store. + The report may be accepted by the gateway, but rejected by the health + store after extra validation. + For example, the health store may reject the report because of an + invalid parameter, like a stale sequence number. + To see whether the report was applied in the health store, run + GetClusterHealth and check that the report appears in the HealthEvents + section. + + :param health_information: Describes the health information for the + health report. This information needs to be present in all of the + health reports sent to the health manager. + :type health_information: + ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be + sent immediately. + A health report is sent to a Service Fabric gateway Application, which + forwards to the health store. + If Immediate is set to true, the report is sent immediately from HTTP + Gateway to the health store, regardless of the fabric client settings + that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as + possible. + Depending on timing and other conditions, sending the report may still + fail, for example if the HTTP Gateway is closed or the message doesn't + reach the Gateway. + If Immediate is set to false, the report is sent based on the health + client settings from the HTTP Gateway. Therefore, it will be batched + according to the HealthReportSendInterval configuration. + This is the recommended setting because it allows the health client to + optimize health reporting messages to health store as well as health + report processing. + By default, reports are not sent immediately. + :type immediate: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.report_cluster_health.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if immediate is not None: + query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(health_information, 'HealthInformation') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + report_cluster_health.metadata = {'url': '/$/ReportClusterHealth'} + + def get_provisioned_fabric_code_version_info_list( + self, code_version=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets a list of fabric code versions that are provisioned in a Service + Fabric cluster. + + Gets a list of information about fabric code versions that are + provisioned in the cluster. The parameter CodeVersion can be used to + optionally filter the output to only that particular version. + + :param code_version: The product version of Service Fabric. + :type code_version: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.FabricCodeVersionInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_provisioned_fabric_code_version_info_list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if code_version is not None: + query_parameters['CodeVersion'] = self._serialize.query("code_version", code_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[FabricCodeVersionInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_provisioned_fabric_code_version_info_list.metadata = {'url': '/$/GetProvisionedCodeVersions'} + + def get_provisioned_fabric_config_version_info_list( + self, config_version=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets a list of fabric config versions that are provisioned in a Service + Fabric cluster. + + Gets a list of information about fabric config versions that are + provisioned in the cluster. The parameter ConfigVersion can be used to + optionally filter the output to only that particular version. + + :param config_version: The config version of Service Fabric. + :type config_version: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.FabricConfigVersionInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_provisioned_fabric_config_version_info_list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if config_version is not None: + query_parameters['ConfigVersion'] = self._serialize.query("config_version", config_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[FabricConfigVersionInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_provisioned_fabric_config_version_info_list.metadata = {'url': '/$/GetProvisionedConfigVersions'} + + def get_cluster_upgrade_progress( + self, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the progress of the current cluster upgrade. + + Gets the current progress of the ongoing cluster upgrade. If no upgrade + is currently in progress, get the last state of the previous cluster + upgrade. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ClusterUpgradeProgressObject or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ClusterUpgradeProgressObject or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_cluster_upgrade_progress.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ClusterUpgradeProgressObject', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_cluster_upgrade_progress.metadata = {'url': '/$/GetUpgradeProgress'} + + def get_cluster_configuration( + self, configuration_api_version, timeout=60, custom_headers=None, raw=False, **operation_config): + """Get the Service Fabric standalone cluster configuration. + + The cluster configuration contains properties of the cluster that + include different node types on the cluster, + security configurations, fault, and upgrade domain topologies, etc. + + :param configuration_api_version: The API version of the Standalone + cluster json configuration. + :type configuration_api_version: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ClusterConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ClusterConfiguration or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_cluster_configuration.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['ConfigurationApiVersion'] = self._serialize.query("configuration_api_version", configuration_api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ClusterConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_cluster_configuration.metadata = {'url': '/$/GetClusterConfiguration'} + + def get_cluster_configuration_upgrade_status( + self, timeout=60, custom_headers=None, raw=False, **operation_config): + """Get the cluster configuration upgrade status of a Service Fabric + standalone cluster. + + Get the cluster configuration upgrade status details of a Service + Fabric standalone cluster. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ClusterConfigurationUpgradeStatusInfo or ClientRawResponse if + raw=true + :rtype: + ~azure.servicefabric.models.ClusterConfigurationUpgradeStatusInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_cluster_configuration_upgrade_status.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ClusterConfigurationUpgradeStatusInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_cluster_configuration_upgrade_status.metadata = {'url': '/$/GetClusterConfigurationUpgradeStatus'} + + def get_upgrade_orchestration_service_state( + self, timeout=60, custom_headers=None, raw=False, **operation_config): + """Get the service state of Service Fabric Upgrade Orchestration Service. + + Get the service state of Service Fabric Upgrade Orchestration Service. + This API is internally used for support purposes. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: UpgradeOrchestrationServiceState or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.UpgradeOrchestrationServiceState + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_upgrade_orchestration_service_state.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('UpgradeOrchestrationServiceState', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_upgrade_orchestration_service_state.metadata = {'url': '/$/GetUpgradeOrchestrationServiceState'} + + def set_upgrade_orchestration_service_state( + self, timeout=60, service_state=None, custom_headers=None, raw=False, **operation_config): + """Update the service state of Service Fabric Upgrade Orchestration + Service. + + Update the service state of Service Fabric Upgrade Orchestration + Service. This API is internally used for support purposes. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param service_state: The state of Service Fabric Upgrade + Orchestration Service. + :type service_state: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: UpgradeOrchestrationServiceStateSummary or ClientRawResponse + if raw=true + :rtype: + ~azure.servicefabric.models.UpgradeOrchestrationServiceStateSummary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + upgrade_orchestration_service_state = models.UpgradeOrchestrationServiceState(service_state=service_state) + + api_version = "6.0" + + # Construct URL + url = self.set_upgrade_orchestration_service_state.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(upgrade_orchestration_service_state, 'UpgradeOrchestrationServiceState') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('UpgradeOrchestrationServiceStateSummary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + set_upgrade_orchestration_service_state.metadata = {'url': '/$/SetUpgradeOrchestrationServiceState'} + + def provision_cluster( + self, timeout=60, code_file_path=None, cluster_manifest_file_path=None, custom_headers=None, raw=False, **operation_config): + """Provision the code or configuration packages of a Service Fabric + cluster. + + Validate and provision the code or configuration packages of a Service + Fabric cluster. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param code_file_path: The cluster code package file path. + :type code_file_path: str + :param cluster_manifest_file_path: The cluster manifest file path. + :type cluster_manifest_file_path: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + provision_fabric_description = models.ProvisionFabricDescription(code_file_path=code_file_path, cluster_manifest_file_path=cluster_manifest_file_path) + + api_version = "6.0" + + # Construct URL + url = self.provision_cluster.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(provision_fabric_description, 'ProvisionFabricDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + provision_cluster.metadata = {'url': '/$/Provision'} + + def unprovision_cluster( + self, timeout=60, code_version=None, config_version=None, custom_headers=None, raw=False, **operation_config): + """Unprovision the code or configuration packages of a Service Fabric + cluster. + + It is supported to unprovision code and configuration separately. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param code_version: The cluster code package version. + :type code_version: str + :param config_version: The cluster manifest version. + :type config_version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + unprovision_fabric_description = models.UnprovisionFabricDescription(code_version=code_version, config_version=config_version) + + api_version = "6.0" + + # Construct URL + url = self.unprovision_cluster.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(unprovision_fabric_description, 'UnprovisionFabricDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + unprovision_cluster.metadata = {'url': '/$/Unprovision'} + + def rollback_cluster_upgrade( + self, timeout=60, custom_headers=None, raw=False, **operation_config): + """Roll back the upgrade of a Service Fabric cluster. + + Roll back the code or configuration upgrade of a Service Fabric + cluster. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.rollback_cluster_upgrade.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + rollback_cluster_upgrade.metadata = {'url': '/$/RollbackUpgrade'} + + def resume_cluster_upgrade( + self, upgrade_domain, timeout=60, custom_headers=None, raw=False, **operation_config): + """Make the cluster upgrade move on to the next upgrade domain. + + Make the cluster code or configuration upgrade move on to the next + upgrade domain if appropriate. + + :param upgrade_domain: The next upgrade domain for this cluster + upgrade. + :type upgrade_domain: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + resume_cluster_upgrade_description = models.ResumeClusterUpgradeDescription(upgrade_domain=upgrade_domain) + + api_version = "6.0" + + # Construct URL + url = self.resume_cluster_upgrade.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(resume_cluster_upgrade_description, 'ResumeClusterUpgradeDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resume_cluster_upgrade.metadata = {'url': '/$/MoveToNextUpgradeDomain'} + + def start_cluster_upgrade( + self, start_cluster_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Start upgrading the code or configuration version of a Service Fabric + cluster. + + Validate the supplied upgrade parameters and start upgrading the code + or configuration version of a Service Fabric cluster if the parameters + are valid. + + :param start_cluster_upgrade_description: Describes the parameters for + starting a cluster upgrade. + :type start_cluster_upgrade_description: + ~azure.servicefabric.models.StartClusterUpgradeDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.start_cluster_upgrade.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_cluster_upgrade.metadata = {'url': '/$/Upgrade'} + + def start_cluster_configuration_upgrade( + self, cluster_configuration_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Start upgrading the configuration of a Service Fabric standalone + cluster. + + Validate the supplied configuration upgrade parameters and start + upgrading the cluster configuration if the parameters are valid. + + :param cluster_configuration_upgrade_description: Parameters for a + standalone cluster configuration upgrade. + :type cluster_configuration_upgrade_description: + ~azure.servicefabric.models.ClusterConfigurationUpgradeDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.start_cluster_configuration_upgrade.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(cluster_configuration_upgrade_description, 'ClusterConfigurationUpgradeDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_cluster_configuration_upgrade.metadata = {'url': '/$/StartClusterConfigurationUpgrade'} + + def update_cluster_upgrade( + self, update_cluster_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Update the upgrade parameters of a Service Fabric cluster upgrade. + + Update the upgrade parameters used during a Service Fabric cluster + upgrade. + + :param update_cluster_upgrade_description: Parameters for updating a + cluster upgrade. + :type update_cluster_upgrade_description: + ~azure.servicefabric.models.UpdateClusterUpgradeDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.update_cluster_upgrade.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(update_cluster_upgrade_description, 'UpdateClusterUpgradeDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update_cluster_upgrade.metadata = {'url': '/$/UpdateUpgrade'} + + def get_aad_metadata( + self, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the Azure Active Directory metadata used for secured connection to + cluster. + + Gets the Azure Active Directory metadata used for secured connection to + cluster. + This API is not supposed to be called separately. It provides + information needed to set up an Azure Active Directory secured + connection with a Service Fabric cluster. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AadMetadataObject or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.AadMetadataObject or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_aad_metadata.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('AadMetadataObject', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_aad_metadata.metadata = {'url': '/$/GetAadMetadata'} + + def get_cluster_version( + self, timeout=60, custom_headers=None, raw=False, **operation_config): + """Get the current Service Fabric cluster version. + + If a cluster upgrade is happening, then this API will return the lowest + (older) version of the current and target cluster runtime versions. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ClusterVersion or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ClusterVersion or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_cluster_version.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ClusterVersion', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_cluster_version.metadata = {'url': '/$/GetClusterVersion'} + + def get_cluster_load( + self, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the load of a Service Fabric cluster. + + Retrieves the load information of a Service Fabric cluster for all the + metrics that have load or capacity defined. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ClusterLoadInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ClusterLoadInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_cluster_load.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ClusterLoadInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_cluster_load.metadata = {'url': '/$/GetLoadInformation'} + + def toggle_verbose_service_placement_health_reporting( + self, enabled, timeout=60, custom_headers=None, raw=False, **operation_config): + """Changes the verbosity of service placement health reporting. + + If verbosity is set to true, then detailed health reports will be + generated when replicas cannot be placed or dropped. + If verbosity is set to false, then no health reports will be generated + when replicas cannot be placed or dropped. + + :param enabled: The verbosity of service placement health reporting. + :type enabled: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.toggle_verbose_service_placement_health_reporting.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['Enabled'] = self._serialize.query("enabled", enabled, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + toggle_verbose_service_placement_health_reporting.metadata = {'url': '/$/ToggleVerboseServicePlacementHealthReporting'} + + def validate_cluster_upgrade( + self, start_cluster_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Validate and assess the impact of a code or configuration version + update of a Service Fabric cluster. + + Validate the supplied upgrade parameters and assess the expected impact + of a code or configuration version upgrade of a Service Fabric cluster. + The upgrade will not be initiated. + + :param start_cluster_upgrade_description: Describes the parameters for + starting a cluster upgrade. + :type start_cluster_upgrade_description: + ~azure.servicefabric.models.StartClusterUpgradeDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ValidateClusterUpgradeResult or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ValidateClusterUpgradeResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "8.2" + + # Construct URL + url = self.validate_cluster_upgrade.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') + + # Construct and send request + 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) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ValidateClusterUpgradeResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + validate_cluster_upgrade.metadata = {'url': '/$/ValidateUpgrade'} + + def get_node_info_list( + self, continuation_token=None, node_status_filter="default", max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the list of nodes in the Service Fabric cluster. + + The response includes the name, status, ID, health, uptime, and other + details about the nodes. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param node_status_filter: Allows filtering the nodes based on the + NodeStatus. Only the nodes that are matching the specified filter + value will be returned. The filter value can be one of the following. + Possible values include: 'default', 'all', 'up', 'down', 'enabling', + 'disabling', 'disabled', 'unknown', 'removed' + :type node_status_filter: str or + ~azure.servicefabric.models.NodeStatusFilter + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedNodeInfoList or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PagedNodeInfoList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.3" + + # Construct URL + url = self.get_node_info_list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if node_status_filter is not None: + query_parameters['NodeStatusFilter'] = self._serialize.query("node_status_filter", node_status_filter, 'str') + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedNodeInfoList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_node_info_list.metadata = {'url': '/Nodes'} + + def get_node_info( + self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the information about a specific node in the Service Fabric + cluster. + + The response includes the name, status, ID, health, uptime, and other + details about the node. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NodeInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.NodeInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_node_info.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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 == 200: + deserialized = self._deserialize('NodeInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_node_info.metadata = {'url': '/Nodes/{nodeName}'} + + def get_node_health( + self, node_name, events_health_state_filter=0, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the health of a Service Fabric node. + + Gets the health of a Service Fabric node. Use EventsHealthStateFilter + to filter the collection of health events reported on the node based on + the health state. If the node that you specify by name does not exist + in the health store, this returns an error. + + :param node_name: The name of the node. + :type node_name: str + :param events_health_state_filter: Allows filtering the collection of + HealthEvent objects returned based on health state. + The possible values for this parameter include integer value of one of + the following health states. + Only events that match the filter are returned. All events are used to + evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, obtained using the bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type events_health_state_filter: int + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NodeHealth or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.NodeHealth or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_node_health.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('NodeHealth', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_node_health.metadata = {'url': '/Nodes/{nodeName}/$/GetHealth'} + + def get_node_health_using_policy( + self, node_name, events_health_state_filter=0, cluster_health_policy=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the health of a Service Fabric node, by using the specified health + policy. + + Gets the health of a Service Fabric node. Use EventsHealthStateFilter + to filter the collection of health events reported on the node based on + the health state. Use ClusterHealthPolicy in the POST body to override + the health policies used to evaluate the health. If the node that you + specify by name does not exist in the health store, this returns an + error. + + :param node_name: The name of the node. + :type node_name: str + :param events_health_state_filter: Allows filtering the collection of + HealthEvent objects returned based on health state. + The possible values for this parameter include integer value of one of + the following health states. + Only events that match the filter are returned. All events are used to + evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, obtained using the bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type events_health_state_filter: int + :param cluster_health_policy: Describes the health policies used to + evaluate the health of a cluster or node. If not present, the health + evaluation uses the health policy from cluster manifest or the default + health policy. + :type cluster_health_policy: + ~azure.servicefabric.models.ClusterHealthPolicy + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NodeHealth or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.NodeHealth or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_node_health_using_policy.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if cluster_health_policy is not None: + body_content = self._serialize.body(cluster_health_policy, 'ClusterHealthPolicy') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('NodeHealth', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_node_health_using_policy.metadata = {'url': '/Nodes/{nodeName}/$/GetHealth'} + + def report_node_health( + self, node_name, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Sends a health report on the Service Fabric node. + + Reports health state of the specified Service Fabric node. The report + must contain the information about the source of the health report and + property on which it is reported. + The report is sent to a Service Fabric gateway node, which forwards to + the health store. + The report may be accepted by the gateway, but rejected by the health + store after extra validation. + For example, the health store may reject the report because of an + invalid parameter, like a stale sequence number. + To see whether the report was applied in the health store, run + GetNodeHealth and check that the report appears in the HealthEvents + section. + + :param node_name: The name of the node. + :type node_name: str + :param health_information: Describes the health information for the + health report. This information needs to be present in all of the + health reports sent to the health manager. + :type health_information: + ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be + sent immediately. + A health report is sent to a Service Fabric gateway Application, which + forwards to the health store. + If Immediate is set to true, the report is sent immediately from HTTP + Gateway to the health store, regardless of the fabric client settings + that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as + possible. + Depending on timing and other conditions, sending the report may still + fail, for example if the HTTP Gateway is closed or the message doesn't + reach the Gateway. + If Immediate is set to false, the report is sent based on the health + client settings from the HTTP Gateway. Therefore, it will be batched + according to the HealthReportSendInterval configuration. + This is the recommended setting because it allows the health client to + optimize health reporting messages to health store as well as health + report processing. + By default, reports are not sent immediately. + :type immediate: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.report_node_health.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if immediate is not None: + query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(health_information, 'HealthInformation') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + report_node_health.metadata = {'url': '/Nodes/{nodeName}/$/ReportHealth'} + + def get_node_load_info( + self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the load information of a Service Fabric node. + + Retrieves the load information of a Service Fabric node for all the + metrics that have load or capacity defined. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NodeLoadInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.NodeLoadInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_node_load_info.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('NodeLoadInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_node_load_info.metadata = {'url': '/Nodes/{nodeName}/$/GetLoadInformation'} + + def disable_node( + self, node_name, timeout=60, deactivation_intent=None, custom_headers=None, raw=False, **operation_config): + """Deactivate a Service Fabric cluster node with the specified + deactivation intent. + + Deactivate a Service Fabric cluster node with the specified + deactivation intent. Once the deactivation is in progress, the + deactivation intent can be increased, but not decreased (for example, a + node that is deactivated with the Pause intent can be deactivated + further with Restart, but not the other way around. Nodes may be + reactivated using the Activate a node operation any time after they are + deactivated. If the deactivation is not complete, this will cancel the + deactivation. A node that goes down and comes back up while deactivated + will still need to be reactivated before services will be placed on + that node. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param deactivation_intent: Describes the intent or reason for + deactivating the node. The possible values are following. Possible + values include: 'Pause', 'Restart', 'RemoveData' + :type deactivation_intent: str or + ~azure.servicefabric.models.DeactivationIntent + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + deactivation_intent_description = models.DeactivationIntentDescription(deactivation_intent=deactivation_intent) + + api_version = "6.0" + + # Construct URL + url = self.disable_node.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(deactivation_intent_description, 'DeactivationIntentDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_node.metadata = {'url': '/Nodes/{nodeName}/$/Deactivate'} + + def enable_node( + self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Activate a Service Fabric cluster node that is currently deactivated. + + Activates a Service Fabric cluster node that is currently deactivated. + Once activated, the node will again become a viable target for placing + new replicas, and any deactivated replicas remaining on the node will + be reactivated. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.enable_node.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + enable_node.metadata = {'url': '/Nodes/{nodeName}/$/Activate'} + + def remove_node_state( + self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Notifies Service Fabric that the persisted state on a node has been + permanently removed or lost. + + This implies that it is not possible to recover the persisted state of + that node. This generally happens if a hard disk has been wiped clean, + or if a hard disk crashes. The node has to be down for this operation + to be successful. This operation lets Service Fabric know that the + replicas on that node no longer exist, and that Service Fabric should + stop waiting for those replicas to come back up. Do not run this cmdlet + if the state on the node has not been removed and the node can come + back up with its state intact. Starting from Service Fabric 6.5, in + order to use this API for seed nodes, please change the seed nodes to + regular (non-seed) nodes and then invoke this API to remove the node + state. If the cluster is running on Azure, after the seed node goes + down, Service Fabric will try to change it to a non-seed node + automatically. To make this happen, make sure the number of non-seed + nodes in the primary node type is no less than the number of Down seed + nodes. If necessary, add more nodes to the primary node type to achieve + this. For standalone cluster, if the Down seed node is not expected to + come back up with its state intact, please remove the node from the + cluster, see + https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-windows-server-add-remove-nodes. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.remove_node_state.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + remove_node_state.metadata = {'url': '/Nodes/{nodeName}/$/RemoveNodeState'} + + def restart_node( + self, node_name, node_instance_id="0", timeout=60, create_fabric_dump="False", custom_headers=None, raw=False, **operation_config): + """Restarts a Service Fabric cluster node. + + Restarts a Service Fabric cluster node that is already started. + + :param node_name: The name of the node. + :type node_name: str + :param node_instance_id: The instance ID of the target node. If + instance ID is specified the node is restarted only if it matches with + the current instance of the node. A default value of "0" would match + any instance ID. The instance ID can be obtained using get node query. + :type node_instance_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param create_fabric_dump: Specify True to create a dump of the fabric + node process. This is case-sensitive. Possible values include: + 'False', 'True' + :type create_fabric_dump: str or + ~azure.servicefabric.models.CreateFabricDump + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + restart_node_description = models.RestartNodeDescription(node_instance_id=node_instance_id, create_fabric_dump=create_fabric_dump) + + api_version = "6.0" + + # Construct URL + url = self.restart_node.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restart_node_description, 'RestartNodeDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart_node.metadata = {'url': '/Nodes/{nodeName}/$/Restart'} + + def remove_configuration_overrides( + self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Removes configuration overrides on the specified node. + + This api allows removing all existing configuration overrides on + specified node. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "7.0" + + # Construct URL + url = self.remove_configuration_overrides.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + remove_configuration_overrides.metadata = {'url': '/Nodes/{nodeName}/$/RemoveConfigurationOverrides'} + + def get_configuration_overrides( + self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the list of configuration overrides on the specified node. + + This api allows getting all existing configuration overrides on the + specified node. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.ConfigParameterOverride] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "7.0" + + # Construct URL + url = self.get_configuration_overrides.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[ConfigParameterOverride]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration_overrides.metadata = {'url': '/Nodes/{nodeName}/$/GetConfigurationOverrides'} + + def add_configuration_parameter_overrides( + self, node_name, config_parameter_override_list, force=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Adds the list of configuration overrides on the specified node. + + This api allows adding all existing configuration overrides on the + specified node. + + :param node_name: The name of the node. + :type node_name: str + :param config_parameter_override_list: Description for adding list of + configuration overrides. + :type config_parameter_override_list: + list[~azure.servicefabric.models.ConfigParameterOverride] + :param force: Force adding configuration overrides on specified nodes. + :type force: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "7.0" + + # Construct URL + url = self.add_configuration_parameter_overrides.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if force is not None: + query_parameters['Force'] = self._serialize.query("force", force, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(config_parameter_override_list, '[ConfigParameterOverride]') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + add_configuration_parameter_overrides.metadata = {'url': '/Nodes/{nodeName}/$/AddConfigurationParameterOverrides'} + + def remove_node_tags( + self, node_name, node_tags, custom_headers=None, raw=False, **operation_config): + """Removes the list of tags from the specified node. + + This api allows removing set of tags from the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param node_tags: Description for adding list of node tags. + :type node_tags: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "7.0" + + # Construct URL + url = self.remove_node_tags.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(node_tags, '[str]') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + remove_node_tags.metadata = {'url': '/Nodes/{nodeName}/$/RemoveNodeTags'} + + def add_node_tags( + self, node_name, node_tags, custom_headers=None, raw=False, **operation_config): + """Adds the list of tags on the specified node. + + This api allows adding tags to the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param node_tags: Description for adding list of node tags. + :type node_tags: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "7.2" + + # Construct URL + url = self.add_node_tags.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(node_tags, '[str]') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + add_node_tags.metadata = {'url': '/Nodes/{nodeName}/$/AddNodeTags'} + + def get_application_type_info_list( + self, application_type_definition_kind_filter=0, exclude_application_parameters=False, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the list of application types in the Service Fabric cluster. + + Returns the information about the application types that are + provisioned or in the process of being provisioned in the Service + Fabric cluster. Each version of an application type is returned as one + application type. The response includes the name, version, status, and + other details about the application type. This is a paged query, + meaning that if not all of the application types fit in a page, one + page of results is returned as well as a continuation token, which can + be used to get the next page. For example, if there are 10 application + types but a page only fits the first three application types, or if max + results is set to 3, then three is returned. To access the rest of the + results, retrieve subsequent pages by using the returned continuation + token in the next query. An empty continuation token is returned if + there are no subsequent pages. + + :param application_type_definition_kind_filter: Used to filter on + ApplicationTypeDefinitionKind which is the mechanism used to define a + Service Fabric application type. + - Default - Default value, which performs the same function as + selecting "All". The value is 0. + - All - Filter that matches input with any + ApplicationTypeDefinitionKind value. The value is 65535. + - ServiceFabricApplicationPackage - Filter that matches input with + ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. + The value is 1. + - Compose - Filter that matches input with + ApplicationTypeDefinitionKind value Compose. The value is 2. + :type application_type_definition_kind_filter: int + :param exclude_application_parameters: The flag that specifies whether + application parameters will be excluded from the result. + :type exclude_application_parameters: bool + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedApplicationTypeInfoList or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PagedApplicationTypeInfoList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_application_type_info_list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if application_type_definition_kind_filter is not None: + query_parameters['ApplicationTypeDefinitionKindFilter'] = self._serialize.query("application_type_definition_kind_filter", application_type_definition_kind_filter, 'int') + if exclude_application_parameters is not None: + query_parameters['ExcludeApplicationParameters'] = self._serialize.query("exclude_application_parameters", exclude_application_parameters, 'bool') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedApplicationTypeInfoList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_application_type_info_list.metadata = {'url': '/ApplicationTypes'} + + def get_application_type_info_list_by_name( + self, application_type_name, application_type_version=None, exclude_application_parameters=False, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the list of application types in the Service Fabric cluster + matching exactly the specified name. + + Returns the information about the application types that are + provisioned or in the process of being provisioned in the Service + Fabric cluster. These results are of application types whose name match + exactly the one specified as the parameter, and which comply with the + given query parameters. All versions of the application type matching + the application type name are returned, with each version returned as + one application type. The response includes the name, version, status, + and other details about the application type. This is a paged query, + meaning that if not all of the application types fit in a page, one + page of results is returned as well as a continuation token, which can + be used to get the next page. For example, if there are 10 application + types but a page only fits the first three application types, or if max + results is set to 3, then three is returned. To access the rest of the + results, retrieve subsequent pages by using the returned continuation + token in the next query. An empty continuation token is returned if + there are no subsequent pages. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :type application_type_version: str + :param exclude_application_parameters: The flag that specifies whether + application parameters will be excluded from the result. + :type exclude_application_parameters: bool + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedApplicationTypeInfoList or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PagedApplicationTypeInfoList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_application_type_info_list_by_name.metadata['url'] + path_format_arguments = { + 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if application_type_version is not None: + query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') + if exclude_application_parameters is not None: + query_parameters['ExcludeApplicationParameters'] = self._serialize.query("exclude_application_parameters", exclude_application_parameters, 'bool') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedApplicationTypeInfoList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_application_type_info_list_by_name.metadata = {'url': '/ApplicationTypes/{applicationTypeName}'} + + def provision_application_type( + self, provision_application_type_description_base_required_body_param, timeout=60, custom_headers=None, raw=False, **operation_config): + """Provisions or registers a Service Fabric application type with the + cluster using the '.sfpkg' package in the external store or using the + application package in the image store. + + Provisions a Service Fabric application type with the cluster. The + provision is required before any new applications can be instantiated. + The provision operation can be performed either on the application + package specified by the relativePathInImageStore, or by using the URI + of the external '.sfpkg'. + + :param + provision_application_type_description_base_required_body_param: The + base type of provision application type description which supports + either image store-based provision or external store-based provision. + :type provision_application_type_description_base_required_body_param: + ~azure.servicefabric.models.ProvisionApplicationTypeDescriptionBase + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.2" + + # Construct URL + url = self.provision_application_type.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(provision_application_type_description_base_required_body_param, 'ProvisionApplicationTypeDescriptionBase') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + provision_application_type.metadata = {'url': '/ApplicationTypes/$/Provision'} + + def unprovision_application_type( + self, application_type_name, application_type_version, timeout=60, async_parameter=None, custom_headers=None, raw=False, **operation_config): + """Removes or unregisters a Service Fabric application type from the + cluster. + + This operation can only be performed if all application instances of + the application type have been deleted. Once the application type is + unregistered, no new application instances can be created for this + particular application type. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type + as defined in the application manifest. + :type application_type_version: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param async_parameter: The flag indicating whether or not unprovision + should occur asynchronously. When set to true, the unprovision + operation returns when the request is accepted by the system, and the + unprovision operation continues without any timeout limit. The default + value is false. However, we recommend setting it to true for large + application packages that were provisioned. + :type async_parameter: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + unprovision_application_type_description_info = models.UnprovisionApplicationTypeDescriptionInfo(application_type_version=application_type_version, async_property=async_parameter) + + api_version = "6.0" + + # Construct URL + url = self.unprovision_application_type.metadata['url'] + path_format_arguments = { + 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(unprovision_application_type_description_info, 'UnprovisionApplicationTypeDescriptionInfo') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + unprovision_application_type.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/Unprovision'} + + def get_service_type_info_list( + self, application_type_name, application_type_version, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the list containing the information about service types that are + supported by a provisioned application type in a Service Fabric + cluster. + + Gets the list containing the information about service types that are + supported by a provisioned application type in a Service Fabric + cluster. The provided application type must exist. Otherwise, a 404 + status is returned. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :type application_type_version: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.ServiceTypeInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_service_type_info_list.metadata['url'] + path_format_arguments = { + 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[ServiceTypeInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_service_type_info_list.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes'} + + def get_service_type_info_by_name( + self, application_type_name, application_type_version, service_type_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the information about a specific service type that is supported by + a provisioned application type in a Service Fabric cluster. + + Gets the information about a specific service type that is supported by + a provisioned application type in a Service Fabric cluster. The + provided application type must exist. Otherwise, a 404 status is + returned. A 204 response is returned if the specified service type is + not found in the cluster. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :type application_type_version: str + :param service_type_name: Specifies the name of a Service Fabric + service type. + :type service_type_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceTypeInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ServiceTypeInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_service_type_info_by_name.metadata['url'] + path_format_arguments = { + 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str'), + 'serviceTypeName': self._serialize.url("service_type_name", service_type_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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 == 200: + deserialized = self._deserialize('ServiceTypeInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_service_type_info_by_name.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes/{serviceTypeName}'} + + def get_service_manifest( + self, application_type_name, application_type_version, service_manifest_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the manifest describing a service type. + + Gets the manifest describing a service type. The response contains the + service manifest XML as a string. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :type application_type_version: str + :param service_manifest_name: The name of a service manifest + registered as part of an application type in a Service Fabric cluster. + :type service_manifest_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceTypeManifest or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ServiceTypeManifest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_service_manifest.metadata['url'] + path_format_arguments = { + 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') + query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ServiceTypeManifest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_service_manifest.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/GetServiceManifest'} + + def get_deployed_service_type_info_list( + self, node_name, application_id, service_manifest_name=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the list containing the information about service types from the + applications deployed on a node in a Service Fabric cluster. + + Gets the list containing the information about service types from the + applications deployed on a node in a Service Fabric cluster. The + response includes the name of the service type, its registration + status, the code package that registered it and activation ID of the + service package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param service_manifest_name: The name of the service manifest to + filter the list of deployed service type information. If specified, + the response will only contain the information about service types + that are defined in this service manifest. + :type service_manifest_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.DeployedServiceTypeInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_deployed_service_type_info_list.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if service_manifest_name is not None: + query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[DeployedServiceTypeInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployed_service_type_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes'} + + def get_deployed_service_type_info_by_name( + self, node_name, application_id, service_type_name, service_manifest_name=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the information about a specified service type of the application + deployed on a node in a Service Fabric cluster. + + Gets the list containing the information about a specific service type + from the applications deployed on a node in a Service Fabric cluster. + The response includes the name of the service type, its registration + status, the code package that registered it and activation ID of the + service package. Each entry represents one activation of a service + type, differentiated by the activation ID. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param service_type_name: Specifies the name of a Service Fabric + service type. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest to + filter the list of deployed service type information. If specified, + the response will only contain the information about service types + that are defined in this service manifest. + :type service_manifest_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.DeployedServiceTypeInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_deployed_service_type_info_by_name.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), + 'serviceTypeName': self._serialize.url("service_type_name", service_type_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if service_manifest_name is not None: + query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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 == 200: + deserialized = self._deserialize('[DeployedServiceTypeInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployed_service_type_info_by_name.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes/{serviceTypeName}'} + + def create_application( + self, application_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Creates a Service Fabric application. + + Creates a Service Fabric application using the specified description. + + :param application_description: Description for creating an + application. + :type application_description: + ~azure.servicefabric.models.ApplicationDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.create_application.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(application_description, 'ApplicationDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + create_application.metadata = {'url': '/Applications/$/Create'} + + def delete_application( + self, application_id, force_remove=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Service Fabric application. + + An application must be created before it can be deleted. Deleting an + application will delete all services that are part of that application. + By default, Service Fabric will try to close service replicas in a + graceful manner and then delete the service. However, if a service is + having issues closing the replica gracefully, the delete operation may + take a long time or get stuck. Use the optional ForceRemove flag to + skip the graceful close sequence and forcefully delete the application + and all of its services. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param force_remove: Remove a Service Fabric application or service + forcefully without going through the graceful shutdown sequence. This + parameter can be used to forcefully delete an application or service + for which delete is timing out due to issues in the service code that + prevents graceful close of replicas. + :type force_remove: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.delete_application.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if force_remove is not None: + query_parameters['ForceRemove'] = self._serialize.query("force_remove", force_remove, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_application.metadata = {'url': '/Applications/{applicationId}/$/Delete'} + + def get_application_load_info( + self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets load information about a Service Fabric application. + + Returns the load information about the application that was created or + in the process of being created in the Service Fabric cluster and whose + name matches the one specified as the parameter. The response includes + the name, minimum nodes, maximum nodes, the number of nodes the + application is occupying currently, and application load metric + information about the application. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationLoadInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ApplicationLoadInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_application_load_info.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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 == 200: + deserialized = self._deserialize('ApplicationLoadInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_application_load_info.metadata = {'url': '/Applications/{applicationId}/$/GetLoadInformation'} + + def get_application_info_list( + self, application_definition_kind_filter=0, application_type_name=None, exclude_application_parameters=False, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the list of applications created in the Service Fabric cluster + that match the specified filters. + + Gets the information about the applications that were created or in the + process of being created in the Service Fabric cluster and match the + specified filters. The response includes the name, type, status, + parameters, and other details about the application. If the + applications do not fit in a page, one page of results is returned as + well as a continuation token, which can be used to get the next page. + Filters ApplicationTypeName and ApplicationDefinitionKindFilter cannot + be specified at the same time. + + :param application_definition_kind_filter: Used to filter on + ApplicationDefinitionKind, which is the mechanism used to define a + Service Fabric application. + - Default - Default value, which performs the same function as + selecting "All". The value is 0. + - All - Filter that matches input with any ApplicationDefinitionKind + value. The value is 65535. + - ServiceFabricApplicationDescription - Filter that matches input with + ApplicationDefinitionKind value ServiceFabricApplicationDescription. + The value is 1. + - Compose - Filter that matches input with ApplicationDefinitionKind + value Compose. The value is 2. + :type application_definition_kind_filter: int + :param application_type_name: The application type name used to filter + the applications to query for. This value should not contain the + application type version. + :type application_type_name: str + :param exclude_application_parameters: The flag that specifies whether + application parameters will be excluded from the result. + :type exclude_application_parameters: bool + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedApplicationInfoList or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PagedApplicationInfoList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.1" + + # Construct URL + url = self.get_application_info_list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if application_definition_kind_filter is not None: + query_parameters['ApplicationDefinitionKindFilter'] = self._serialize.query("application_definition_kind_filter", application_definition_kind_filter, 'int') + if application_type_name is not None: + query_parameters['ApplicationTypeName'] = self._serialize.query("application_type_name", application_type_name, 'str') + if exclude_application_parameters is not None: + query_parameters['ExcludeApplicationParameters'] = self._serialize.query("exclude_application_parameters", exclude_application_parameters, 'bool') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedApplicationInfoList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_application_info_list.metadata = {'url': '/Applications'} + + def get_application_info( + self, application_id, exclude_application_parameters=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets information about a Service Fabric application. + + Returns the information about the application that was created or in + the process of being created in the Service Fabric cluster and whose + name matches the one specified as the parameter. The response includes + the name, type, status, parameters, and other details about the + application. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param exclude_application_parameters: The flag that specifies whether + application parameters will be excluded from the result. + :type exclude_application_parameters: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ApplicationInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_application_info.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if exclude_application_parameters is not None: + query_parameters['ExcludeApplicationParameters'] = self._serialize.query("exclude_application_parameters", exclude_application_parameters, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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 == 200: + deserialized = self._deserialize('ApplicationInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_application_info.metadata = {'url': '/Applications/{applicationId}'} + + def get_application_health( + self, application_id, events_health_state_filter=0, deployed_applications_health_state_filter=0, services_health_state_filter=0, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the health of the service fabric application. + + Returns the heath state of the service fabric application. The response + reports either Ok, Error or Warning health state. If the entity is not + found in the health store, it will return Error. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param events_health_state_filter: Allows filtering the collection of + HealthEvent objects returned based on health state. + The possible values for this parameter include integer value of one of + the following health states. + Only events that match the filter are returned. All events are used to + evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, obtained using the bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type events_health_state_filter: int + :param deployed_applications_health_state_filter: Allows filtering of + the deployed applications health state objects returned in the result + of application health query based on their health state. + The possible values for this parameter include integer value of one of + the following health states. Only deployed applications that match the + filter will be returned. + All deployed applications are used to evaluate the aggregated health + state. If not specified, all entries are returned. + The state values are flag-based enumeration, so the value could be a + combination of these values, obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of deployed + applications with HealthState value of OK (2) and Warning (4) are + returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type deployed_applications_health_state_filter: int + :param services_health_state_filter: Allows filtering of the services + health state objects returned in the result of services health query + based on their health state. + The possible values for this parameter include integer value of one of + the following health states. + Only services that match the filter are returned. All services are + used to evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, + obtained using bitwise 'OR' operator. For example, if the provided + value is 6 then health state of services with HealthState value of OK + (2) and Warning (4) will be returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type services_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health + statistics should be returned as part of the query result. False by + default. + The statistics show the number of children entities in health state + Ok, Warning, and Error. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationHealth or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ApplicationHealth or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_application_health.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + if deployed_applications_health_state_filter is not None: + query_parameters['DeployedApplicationsHealthStateFilter'] = self._serialize.query("deployed_applications_health_state_filter", deployed_applications_health_state_filter, 'int') + if services_health_state_filter is not None: + query_parameters['ServicesHealthStateFilter'] = self._serialize.query("services_health_state_filter", services_health_state_filter, 'int') + if exclude_health_statistics is not None: + query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ApplicationHealth', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_application_health.metadata = {'url': '/Applications/{applicationId}/$/GetHealth'} + + def get_application_health_using_policy( + self, application_id, events_health_state_filter=0, deployed_applications_health_state_filter=0, services_health_state_filter=0, exclude_health_statistics=False, application_health_policy=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the health of a Service Fabric application using the specified + policy. + + Gets the health of a Service Fabric application. Use + EventsHealthStateFilter to filter the collection of health events + reported on the node based on the health state. Use + ClusterHealthPolicies to override the health policies used to evaluate + the health. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param events_health_state_filter: Allows filtering the collection of + HealthEvent objects returned based on health state. + The possible values for this parameter include integer value of one of + the following health states. + Only events that match the filter are returned. All events are used to + evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, obtained using the bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type events_health_state_filter: int + :param deployed_applications_health_state_filter: Allows filtering of + the deployed applications health state objects returned in the result + of application health query based on their health state. + The possible values for this parameter include integer value of one of + the following health states. Only deployed applications that match the + filter will be returned. + All deployed applications are used to evaluate the aggregated health + state. If not specified, all entries are returned. + The state values are flag-based enumeration, so the value could be a + combination of these values, obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of deployed + applications with HealthState value of OK (2) and Warning (4) are + returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type deployed_applications_health_state_filter: int + :param services_health_state_filter: Allows filtering of the services + health state objects returned in the result of services health query + based on their health state. + The possible values for this parameter include integer value of one of + the following health states. + Only services that match the filter are returned. All services are + used to evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, + obtained using bitwise 'OR' operator. For example, if the provided + value is 6 then health state of services with HealthState value of OK + (2) and Warning (4) will be returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type services_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health + statistics should be returned as part of the query result. False by + default. + The statistics show the number of children entities in health state + Ok, Warning, and Error. + :type exclude_health_statistics: bool + :param application_health_policy: Describes the health policies used + to evaluate the health of an application or one of its children. + If not present, the health evaluation uses the health policy from + application manifest or the default health policy. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationHealth or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ApplicationHealth or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_application_health_using_policy.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + if deployed_applications_health_state_filter is not None: + query_parameters['DeployedApplicationsHealthStateFilter'] = self._serialize.query("deployed_applications_health_state_filter", deployed_applications_health_state_filter, 'int') + if services_health_state_filter is not None: + query_parameters['ServicesHealthStateFilter'] = self._serialize.query("services_health_state_filter", services_health_state_filter, 'int') + if exclude_health_statistics is not None: + query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if application_health_policy is not None: + body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('ApplicationHealth', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_application_health_using_policy.metadata = {'url': '/Applications/{applicationId}/$/GetHealth'} + + def report_application_health( + self, application_id, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Sends a health report on the Service Fabric application. + + Reports health state of the specified Service Fabric application. The + report must contain the information about the source of the health + report and property on which it is reported. + The report is sent to a Service Fabric gateway Application, which + forwards to the health store. + The report may be accepted by the gateway, but rejected by the health + store after extra validation. + For example, the health store may reject the report because of an + invalid parameter, like a stale sequence number. + To see whether the report was applied in the health store, get + application health and check that the report appears in the + HealthEvents section. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param health_information: Describes the health information for the + health report. This information needs to be present in all of the + health reports sent to the health manager. + :type health_information: + ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be + sent immediately. + A health report is sent to a Service Fabric gateway Application, which + forwards to the health store. + If Immediate is set to true, the report is sent immediately from HTTP + Gateway to the health store, regardless of the fabric client settings + that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as + possible. + Depending on timing and other conditions, sending the report may still + fail, for example if the HTTP Gateway is closed or the message doesn't + reach the Gateway. + If Immediate is set to false, the report is sent based on the health + client settings from the HTTP Gateway. Therefore, it will be batched + according to the HealthReportSendInterval configuration. + This is the recommended setting because it allows the health client to + optimize health reporting messages to health store as well as health + report processing. + By default, reports are not sent immediately. + :type immediate: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.report_application_health.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if immediate is not None: + query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(health_information, 'HealthInformation') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + report_application_health.metadata = {'url': '/Applications/{applicationId}/$/ReportHealth'} + + def start_application_upgrade( + self, application_id, application_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Starts upgrading an application in the Service Fabric cluster. + + Validates the supplied application upgrade parameters and starts + upgrading the application if the parameters are valid. + Note, + [ApplicationParameter](https://docs.microsoft.com/dotnet/api/system.fabric.description.applicationdescription.applicationparameters)s + are not preserved across an application upgrade. + In order to preserve current application parameters, the user should + get the parameters using [GetApplicationInfo](./GetApplicationInfo.md) + operation first and pass them into the upgrade API call as shown in the + example. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param application_upgrade_description: Parameters for an application + upgrade. + :type application_upgrade_description: + ~azure.servicefabric.models.ApplicationUpgradeDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.start_application_upgrade.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(application_upgrade_description, 'ApplicationUpgradeDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/Upgrade'} + + def get_application_upgrade( + self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets details for the latest upgrade performed on this application. + + Returns information about the state of the latest application upgrade + along with details to aid debugging application health issues. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationUpgradeProgressInfo or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.ApplicationUpgradeProgressInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_application_upgrade.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ApplicationUpgradeProgressInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/GetUpgradeProgress'} + + def update_application_upgrade( + self, application_id, application_upgrade_update_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Updates an ongoing application upgrade in the Service Fabric cluster. + + Updates the parameters of an ongoing application upgrade from the ones + specified at the time of starting the application upgrade. This may be + required to mitigate stuck application upgrades due to incorrect + parameters or issues in the application to make progress. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param application_upgrade_update_description: Parameters for updating + an existing application upgrade. + :type application_upgrade_update_description: + ~azure.servicefabric.models.ApplicationUpgradeUpdateDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.update_application_upgrade.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(application_upgrade_update_description, 'ApplicationUpgradeUpdateDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/UpdateUpgrade'} + + def update_application( + self, application_id, application_update_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Updates a Service Fabric application. + + Updates a Service Fabric application instance. The set of properties + that can be updated are a subset of the properties that were specified + at the time of creating the application. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param application_update_description: Parameters for updating an + existing application instance. + :type application_update_description: + ~azure.servicefabric.models.ApplicationUpdateDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "8.1" + + # Construct URL + url = self.update_application.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(application_update_description, 'ApplicationUpdateDescription') + + # Construct and send request + 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) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update_application.metadata = {'url': '/Applications/{applicationId}/$/Update'} + + def resume_application_upgrade( + self, application_id, upgrade_domain_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Resumes upgrading an application in the Service Fabric cluster. + + Resumes an unmonitored manual Service Fabric application upgrade. + Service Fabric upgrades one upgrade domain at a time. For unmonitored + manual upgrades, after Service Fabric finishes an upgrade domain, it + waits for you to call this API before proceeding to the next upgrade + domain. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param upgrade_domain_name: The name of the upgrade domain in which to + resume the upgrade. + :type upgrade_domain_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + resume_application_upgrade_description = models.ResumeApplicationUpgradeDescription(upgrade_domain_name=upgrade_domain_name) + + api_version = "6.0" + + # Construct URL + url = self.resume_application_upgrade.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(resume_application_upgrade_description, 'ResumeApplicationUpgradeDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resume_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/MoveToNextUpgradeDomain'} + + def rollback_application_upgrade( + self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Starts rolling back the currently on-going upgrade of an application in + the Service Fabric cluster. + + Starts rolling back the current application upgrade to the previous + version. This API can only be used to roll back the current in-progress + upgrade that is rolling forward to new version. If the application is + not currently being upgraded use StartApplicationUpgrade API to upgrade + it to desired version, including rolling back to a previous version. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.rollback_application_upgrade.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + rollback_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/RollbackUpgrade'} + + def get_deployed_application_info_list( + self, node_name, timeout=60, include_health_state=False, continuation_token=None, max_results=0, custom_headers=None, raw=False, **operation_config): + """Gets the list of applications deployed on a Service Fabric node. + + Gets the list of applications deployed on a Service Fabric node. The + results do not include information about deployed system applications + unless explicitly queried for by ID. Results encompass deployed + applications in active, activating, and downloading states. This query + requires that the node name corresponds to a node on the cluster. The + query fails if the provided node name does not point to any active + Service Fabric nodes on the cluster. + + :param node_name: The name of the node. + :type node_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param include_health_state: Include the health state of an entity. + If this parameter is false or not specified, then the health state + returned is "Unknown". + When set to true, the query goes in parallel to the node and the + health system service before the results are merged. + As a result, the query is more expensive and may take a longer time. + :type include_health_state: bool + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedDeployedApplicationInfoList or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.PagedDeployedApplicationInfoList + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.1" + + # Construct URL + url = self.get_deployed_application_info_list.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if include_health_state is not None: + query_parameters['IncludeHealthState'] = self._serialize.query("include_health_state", include_health_state, 'bool') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedDeployedApplicationInfoList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployed_application_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications'} + + def get_deployed_application_info( + self, node_name, application_id, timeout=60, include_health_state=False, custom_headers=None, raw=False, **operation_config): + """Gets the information about an application deployed on a Service Fabric + node. + + This query returns system application information if the application ID + provided is for system application. Results encompass deployed + applications in active, activating, and downloading states. This query + requires that the node name corresponds to a node on the cluster. The + query fails if the provided node name does not point to any active + Service Fabric nodes on the cluster. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param include_health_state: Include the health state of an entity. + If this parameter is false or not specified, then the health state + returned is "Unknown". + When set to true, the query goes in parallel to the node and the + health system service before the results are merged. + As a result, the query is more expensive and may take a longer time. + :type include_health_state: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeployedApplicationInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.DeployedApplicationInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.1" + + # Construct URL + url = self.get_deployed_application_info.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if include_health_state is not None: + query_parameters['IncludeHealthState'] = self._serialize.query("include_health_state", include_health_state, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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 == 200: + deserialized = self._deserialize('DeployedApplicationInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployed_application_info.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}'} + + def get_deployed_application_health( + self, node_name, application_id, events_health_state_filter=0, deployed_service_packages_health_state_filter=0, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the information about health of an application deployed on a + Service Fabric node. + + Gets the information about health of an application deployed on a + Service Fabric node. Use EventsHealthStateFilter to optionally filter + for the collection of HealthEvent objects reported on the deployed + application based on health state. Use + DeployedServicePackagesHealthStateFilter to optionally filter for + DeployedServicePackageHealth children based on health state. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param events_health_state_filter: Allows filtering the collection of + HealthEvent objects returned based on health state. + The possible values for this parameter include integer value of one of + the following health states. + Only events that match the filter are returned. All events are used to + evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, obtained using the bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type events_health_state_filter: int + :param deployed_service_packages_health_state_filter: Allows filtering + of the deployed service package health state objects returned in the + result of deployed application health query based on their health + state. + The possible values for this parameter include integer value of one of + the following health states. + Only deployed service packages that match the filter are returned. All + deployed service packages are used to evaluate the aggregated health + state of the deployed application. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value can be a + combination of these values, obtained using the bitwise 'OR' operator. + For example, if the provided value is 6 then health state of service + packages with HealthState value of OK (2) and Warning (4) are + returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type deployed_service_packages_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health + statistics should be returned as part of the query result. False by + default. + The statistics show the number of children entities in health state + Ok, Warning, and Error. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeployedApplicationHealth or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.DeployedApplicationHealth or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_deployed_application_health.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + if deployed_service_packages_health_state_filter is not None: + query_parameters['DeployedServicePackagesHealthStateFilter'] = self._serialize.query("deployed_service_packages_health_state_filter", deployed_service_packages_health_state_filter, 'int') + if exclude_health_statistics is not None: + query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('DeployedApplicationHealth', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployed_application_health.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth'} + + def get_deployed_application_health_using_policy( + self, node_name, application_id, events_health_state_filter=0, deployed_service_packages_health_state_filter=0, application_health_policy=None, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the information about health of an application deployed on a + Service Fabric node. using the specified policy. + + Gets the information about health of an application deployed on a + Service Fabric node using the specified policy. Use + EventsHealthStateFilter to optionally filter for the collection of + HealthEvent objects reported on the deployed application based on + health state. Use DeployedServicePackagesHealthStateFilter to + optionally filter for DeployedServicePackageHealth children based on + health state. Use ApplicationHealthPolicy to optionally override the + health policies used to evaluate the health. This API only uses + 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest + of the fields are ignored while evaluating the health of the deployed + application. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param events_health_state_filter: Allows filtering the collection of + HealthEvent objects returned based on health state. + The possible values for this parameter include integer value of one of + the following health states. + Only events that match the filter are returned. All events are used to + evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, obtained using the bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type events_health_state_filter: int + :param deployed_service_packages_health_state_filter: Allows filtering + of the deployed service package health state objects returned in the + result of deployed application health query based on their health + state. + The possible values for this parameter include integer value of one of + the following health states. + Only deployed service packages that match the filter are returned. All + deployed service packages are used to evaluate the aggregated health + state of the deployed application. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value can be a + combination of these values, obtained using the bitwise 'OR' operator. + For example, if the provided value is 6 then health state of service + packages with HealthState value of OK (2) and Warning (4) are + returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type deployed_service_packages_health_state_filter: int + :param application_health_policy: Describes the health policies used + to evaluate the health of an application or one of its children. + If not present, the health evaluation uses the health policy from + application manifest or the default health policy. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param exclude_health_statistics: Indicates whether the health + statistics should be returned as part of the query result. False by + default. + The statistics show the number of children entities in health state + Ok, Warning, and Error. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeployedApplicationHealth or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.DeployedApplicationHealth or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_deployed_application_health_using_policy.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + if deployed_service_packages_health_state_filter is not None: + query_parameters['DeployedServicePackagesHealthStateFilter'] = self._serialize.query("deployed_service_packages_health_state_filter", deployed_service_packages_health_state_filter, 'int') + if exclude_health_statistics is not None: + query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if application_health_policy is not None: + body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('DeployedApplicationHealth', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployed_application_health_using_policy.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth'} + + def report_deployed_application_health( + self, node_name, application_id, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Sends a health report on the Service Fabric application deployed on a + Service Fabric node. + + Reports health state of the application deployed on a Service Fabric + node. The report must contain the information about the source of the + health report and property on which it is reported. + The report is sent to a Service Fabric gateway Service, which forwards + to the health store. + The report may be accepted by the gateway, but rejected by the health + store after extra validation. + For example, the health store may reject the report because of an + invalid parameter, like a stale sequence number. + To see whether the report was applied in the health store, get deployed + application health and check that the report appears in the + HealthEvents section. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param health_information: Describes the health information for the + health report. This information needs to be present in all of the + health reports sent to the health manager. + :type health_information: + ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be + sent immediately. + A health report is sent to a Service Fabric gateway Application, which + forwards to the health store. + If Immediate is set to true, the report is sent immediately from HTTP + Gateway to the health store, regardless of the fabric client settings + that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as + possible. + Depending on timing and other conditions, sending the report may still + fail, for example if the HTTP Gateway is closed or the message doesn't + reach the Gateway. + If Immediate is set to false, the report is sent based on the health + client settings from the HTTP Gateway. Therefore, it will be batched + according to the HealthReportSendInterval configuration. + This is the recommended setting because it allows the health client to + optimize health reporting messages to health store as well as health + report processing. + By default, reports are not sent immediately. + :type immediate: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.report_deployed_application_health.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if immediate is not None: + query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(health_information, 'HealthInformation') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + report_deployed_application_health.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/ReportHealth'} + + def get_application_manifest( + self, application_type_name, application_type_version, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the manifest describing an application type. + + The response contains the application manifest XML as a string. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :type application_type_version: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationTypeManifest or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ApplicationTypeManifest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_application_manifest.metadata['url'] + path_format_arguments = { + 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ApplicationTypeManifest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_application_manifest.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/GetApplicationManifest'} + + def get_service_info_list( + self, application_id, service_type_name=None, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the information about all services belonging to the application + specified by the application ID. + + Returns the information about all services belonging to the application + specified by the application ID. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param service_type_name: The service type name used to filter the + services to query for. + :type service_type_name: str + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedServiceInfoList or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PagedServiceInfoList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_service_info_list.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if service_type_name is not None: + query_parameters['ServiceTypeName'] = self._serialize.query("service_type_name", service_type_name, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedServiceInfoList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_service_info_list.metadata = {'url': '/Applications/{applicationId}/$/GetServices'} + + def get_service_info( + self, application_id, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the information about the specific service belonging to the + Service Fabric application. + + Returns the information about the specified service belonging to the + specified Service Fabric application. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ServiceInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_service_info.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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 == 200: + deserialized = self._deserialize('ServiceInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_service_info.metadata = {'url': '/Applications/{applicationId}/$/GetServices/{serviceId}'} + + def get_application_name_info( + self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the name of the Service Fabric application for a service. + + Gets the name of the application for the specified service. A 404 + FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the + provided service ID does not exist. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationNameInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ApplicationNameInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_application_name_info.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ApplicationNameInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_application_name_info.metadata = {'url': '/Services/{serviceId}/$/GetApplicationName'} + + def create_service( + self, application_id, service_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Creates the specified Service Fabric service. + + This api allows creating a new Service Fabric stateless or stateful + service under a specified Service Fabric application. The description + for creating the service includes partitioning information and optional + properties for placement and load balancing. Some of the properties can + later be modified using `UpdateService` API. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param service_description: The information necessary to create a + service. + :type service_description: + ~azure.servicefabric.models.ServiceDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.create_service.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service_description, 'ServiceDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + create_service.metadata = {'url': '/Applications/{applicationId}/$/GetServices/$/Create'} + + def create_service_from_template( + self, application_id, service_from_template_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Creates a Service Fabric service from the service template. + + Creates a Service Fabric service from the service template defined in + the application manifest. A service template contains the properties + that will be same for the service instance of the same type. The API + allows overriding the properties that are usually different for + different services of the same service type. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param service_from_template_description: Describes the service that + needs to be created from the template defined in the application + manifest. + :type service_from_template_description: + ~azure.servicefabric.models.ServiceFromTemplateDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.create_service_from_template.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service_from_template_description, 'ServiceFromTemplateDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + create_service_from_template.metadata = {'url': '/Applications/{applicationId}/$/GetServices/$/CreateFromTemplate'} + + def delete_service( + self, service_id, force_remove=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Service Fabric service. + + A service must be created before it can be deleted. By default, Service + Fabric will try to close service replicas in a graceful manner and then + delete the service. However, if the service is having issues closing + the replica gracefully, the delete operation may take a long time or + get stuck. Use the optional ForceRemove flag to skip the graceful close + sequence and forcefully delete the service. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param force_remove: Remove a Service Fabric application or service + forcefully without going through the graceful shutdown sequence. This + parameter can be used to forcefully delete an application or service + for which delete is timing out due to issues in the service code that + prevents graceful close of replicas. + :type force_remove: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.delete_service.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if force_remove is not None: + query_parameters['ForceRemove'] = self._serialize.query("force_remove", force_remove, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_service.metadata = {'url': '/Services/{serviceId}/$/Delete'} + + def update_service( + self, service_id, service_update_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Updates a Service Fabric service using the specified update + description. + + This API allows updating properties of a running Service Fabric + service. The set of properties that can be updated are a subset of the + properties that were specified at the time of creating the service. The + current set of properties can be obtained using `GetServiceDescription` + API. Note that updating the properties of a running service is + different than upgrading your application using + `StartApplicationUpgrade` API. The upgrade is a long running background + operation that involves moving the application from one version to + another, one upgrade domain at a time, whereas update applies the new + properties immediately to the service. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param service_update_description: The information necessary to update + a service. + :type service_update_description: + ~azure.servicefabric.models.ServiceUpdateDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.update_service.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service_update_description, 'ServiceUpdateDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update_service.metadata = {'url': '/Services/{serviceId}/$/Update'} + + def get_service_description( + self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the description of an existing Service Fabric service. + + Gets the description of an existing Service Fabric service. A service + must be created before its description can be obtained. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceDescription or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ServiceDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_service_description.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ServiceDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_service_description.metadata = {'url': '/Services/{serviceId}/$/GetDescription'} + + def get_service_health( + self, service_id, events_health_state_filter=0, partitions_health_state_filter=0, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the health of the specified Service Fabric service. + + Gets the health information of the specified service. + Use EventsHealthStateFilter to filter the collection of health events + reported on the service based on the health state. + Use PartitionsHealthStateFilter to filter the collection of partitions + returned. + If you specify a service that does not exist in the health store, this + request returns an error. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param events_health_state_filter: Allows filtering the collection of + HealthEvent objects returned based on health state. + The possible values for this parameter include integer value of one of + the following health states. + Only events that match the filter are returned. All events are used to + evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, obtained using the bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type events_health_state_filter: int + :param partitions_health_state_filter: Allows filtering of the + partitions health state objects returned in the result of service + health query based on their health state. + The possible values for this parameter include integer value of one of + the following health states. + Only partitions that match the filter are returned. All partitions are + used to evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + value + obtained using bitwise 'OR' operator. For example, if the provided + value is 6 then health state of partitions with HealthState value of + OK (2) and Warning (4) will be returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type partitions_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health + statistics should be returned as part of the query result. False by + default. + The statistics show the number of children entities in health state + Ok, Warning, and Error. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceHealth or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ServiceHealth or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_service_health.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + if partitions_health_state_filter is not None: + query_parameters['PartitionsHealthStateFilter'] = self._serialize.query("partitions_health_state_filter", partitions_health_state_filter, 'int') + if exclude_health_statistics is not None: + query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ServiceHealth', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_service_health.metadata = {'url': '/Services/{serviceId}/$/GetHealth'} + + def get_service_health_using_policy( + self, service_id, events_health_state_filter=0, partitions_health_state_filter=0, application_health_policy=None, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the health of the specified Service Fabric service, by using the + specified health policy. + + Gets the health information of the specified service. + If the application health policy is specified, the health evaluation + uses it to get the aggregated health state. + If the policy is not specified, the health evaluation uses the + application health policy defined in the application manifest, or the + default health policy, if no policy is defined in the manifest. + Use EventsHealthStateFilter to filter the collection of health events + reported on the service based on the health state. + Use PartitionsHealthStateFilter to filter the collection of partitions + returned. + If you specify a service that does not exist in the health store, this + request returns an error. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param events_health_state_filter: Allows filtering the collection of + HealthEvent objects returned based on health state. + The possible values for this parameter include integer value of one of + the following health states. + Only events that match the filter are returned. All events are used to + evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, obtained using the bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type events_health_state_filter: int + :param partitions_health_state_filter: Allows filtering of the + partitions health state objects returned in the result of service + health query based on their health state. + The possible values for this parameter include integer value of one of + the following health states. + Only partitions that match the filter are returned. All partitions are + used to evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + value + obtained using bitwise 'OR' operator. For example, if the provided + value is 6 then health state of partitions with HealthState value of + OK (2) and Warning (4) will be returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type partitions_health_state_filter: int + :param application_health_policy: Describes the health policies used + to evaluate the health of an application or one of its children. + If not present, the health evaluation uses the health policy from + application manifest or the default health policy. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param exclude_health_statistics: Indicates whether the health + statistics should be returned as part of the query result. False by + default. + The statistics show the number of children entities in health state + Ok, Warning, and Error. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceHealth or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ServiceHealth or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_service_health_using_policy.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + if partitions_health_state_filter is not None: + query_parameters['PartitionsHealthStateFilter'] = self._serialize.query("partitions_health_state_filter", partitions_health_state_filter, 'int') + if exclude_health_statistics is not None: + query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if application_health_policy is not None: + body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('ServiceHealth', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_service_health_using_policy.metadata = {'url': '/Services/{serviceId}/$/GetHealth'} + + def report_service_health( + self, service_id, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Sends a health report on the Service Fabric service. + + Reports health state of the specified Service Fabric service. The + report must contain the information about the source of the health + report and property on which it is reported. + The report is sent to a Service Fabric gateway Service, which forwards + to the health store. + The report may be accepted by the gateway, but rejected by the health + store after extra validation. + For example, the health store may reject the report because of an + invalid parameter, like a stale sequence number. + To see whether the report was applied in the health store, run + GetServiceHealth and check that the report appears in the HealthEvents + section. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param health_information: Describes the health information for the + health report. This information needs to be present in all of the + health reports sent to the health manager. + :type health_information: + ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be + sent immediately. + A health report is sent to a Service Fabric gateway Application, which + forwards to the health store. + If Immediate is set to true, the report is sent immediately from HTTP + Gateway to the health store, regardless of the fabric client settings + that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as + possible. + Depending on timing and other conditions, sending the report may still + fail, for example if the HTTP Gateway is closed or the message doesn't + reach the Gateway. + If Immediate is set to false, the report is sent based on the health + client settings from the HTTP Gateway. Therefore, it will be batched + according to the HealthReportSendInterval configuration. + This is the recommended setting because it allows the health client to + optimize health reporting messages to health store as well as health + report processing. + By default, reports are not sent immediately. + :type immediate: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.report_service_health.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if immediate is not None: + query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(health_information, 'HealthInformation') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + report_service_health.metadata = {'url': '/Services/{serviceId}/$/ReportHealth'} + + def resolve_service( + self, service_id, partition_key_type=None, partition_key_value=None, previous_rsp_version=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Resolve a Service Fabric partition. + + Resolve a Service Fabric service partition to get the endpoints of the + service replicas. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_key_type: Key type for the partition. This parameter + is required if the partition scheme for the service is Int64Range or + Named. The possible values are following. + - None (1) - Indicates that the PartitionKeyValue parameter is not + specified. This is valid for the partitions with partitioning scheme + as Singleton. This is the default value. The value is 1. + - Int64Range (2) - Indicates that the PartitionKeyValue parameter is + an int64 partition key. This is valid for the partitions with + partitioning scheme as Int64Range. The value is 2. + - Named (3) - Indicates that the PartitionKeyValue parameter is a name + of the partition. This is valid for the partitions with partitioning + scheme as Named. The value is 3. + :type partition_key_type: int + :param partition_key_value: Partition key. This is required if the + partition scheme for the service is Int64Range or Named. + This is not the partition ID, but rather, either the integer key + value, or the name of the partition ID. + For example, if your service is using ranged partitions from 0 to 10, + then they PartitionKeyValue would be an + integer in that range. Query service description to see the range or + name. + :type partition_key_value: str + :param previous_rsp_version: The value in the Version field of the + response that was received previously. This is required if the user + knows that the result that was gotten previously is stale. + :type previous_rsp_version: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResolvedServicePartition or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ResolvedServicePartition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.resolve_service.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if partition_key_type is not None: + query_parameters['PartitionKeyType'] = self._serialize.query("partition_key_type", partition_key_type, 'int') + if partition_key_value is not None: + query_parameters['PartitionKeyValue'] = self._serialize.query("partition_key_value", partition_key_value, 'str', skip_quote=True) + if previous_rsp_version is not None: + query_parameters['PreviousRspVersion'] = self._serialize.query("previous_rsp_version", previous_rsp_version, 'str', skip_quote=True) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ResolvedServicePartition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + resolve_service.metadata = {'url': '/Services/{serviceId}/$/ResolvePartition'} + + def get_unplaced_replica_information( + self, service_id, partition_id=None, only_query_primaries=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the information about unplaced replica of the service. + + Returns the information about the unplaced replicas of the service. + If PartitionId is specified, then result will contain information only + about unplaced replicas for that partition. + If PartitionId is not specified, then result will contain information + about unplaced replicas for all partitions of that service. + If OnlyQueryPrimaries is set to true, then result will contain + information only about primary replicas, and will ignore unplaced + secondary replicas. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param only_query_primaries: Indicates that unplaced replica + information will be queries only for primary replicas. + :type only_query_primaries: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: UnplacedReplicaInformation or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.UnplacedReplicaInformation or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_unplaced_replica_information.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if partition_id is not None: + query_parameters['PartitionId'] = self._serialize.query("partition_id", partition_id, 'str') + if only_query_primaries is not None: + query_parameters['OnlyQueryPrimaries'] = self._serialize.query("only_query_primaries", only_query_primaries, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('UnplacedReplicaInformation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_unplaced_replica_information.metadata = {'url': '/Services/{serviceId}/$/GetUnplacedReplicaInformation'} + + def get_loaded_partition_info_list( + self, metric_name, service_name=None, ordering="Desc", max_results=0, continuation_token=None, custom_headers=None, raw=False, **operation_config): + """Gets ordered list of partitions. + + Retrieves partitions which are most/least loaded according to specified + metric. + + :param metric_name: Name of the metric based on which to get ordered + list of partitions. + :type metric_name: str + :param service_name: The name of a service. + :type service_name: str + :param ordering: Ordering of partitions' load. Possible values + include: 'Desc', 'Asc' + :type ordering: str or ~azure.servicefabric.models.Ordering + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LoadedPartitionInformationResultList or ClientRawResponse if + raw=true + :rtype: + ~azure.servicefabric.models.LoadedPartitionInformationResultList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "8.0" + + # Construct URL + url = self.get_loaded_partition_info_list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['MetricName'] = self._serialize.query("metric_name", metric_name, 'str') + if service_name is not None: + query_parameters['ServiceName'] = self._serialize.query("service_name", service_name, 'str') + if ordering is not None: + query_parameters['Ordering'] = self._serialize.query("ordering", ordering, 'str') + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('LoadedPartitionInformationResultList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_loaded_partition_info_list.metadata = {'url': '/$/GetLoadedPartitionInfoList'} + + def get_partition_info_list( + self, service_id, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the list of partitions of a Service Fabric service. + + The response includes the partition ID, partitioning scheme + information, keys supported by the partition, status, health, and other + details about the partition. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedServicePartitionInfoList or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.PagedServicePartitionInfoList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_partition_info_list.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedServicePartitionInfoList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_partition_info_list.metadata = {'url': '/Services/{serviceId}/$/GetPartitions'} + + def get_partition_info( + self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the information about a Service Fabric partition. + + Gets the information about the specified partition. The response + includes the partition ID, partitioning scheme information, keys + supported by the partition, status, health, and other details about the + partition. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServicePartitionInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ServicePartitionInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_partition_info.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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 == 200: + deserialized = self._deserialize('ServicePartitionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_partition_info.metadata = {'url': '/Partitions/{partitionId}'} + + def get_service_name_info( + self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the name of the Service Fabric service for a partition. + + Gets name of the service for the specified partition. A 404 error is + returned if the partition ID does not exist in the cluster. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceNameInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ServiceNameInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_service_name_info.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ServiceNameInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_service_name_info.metadata = {'url': '/Partitions/{partitionId}/$/GetServiceName'} + + def get_partition_health( + self, partition_id, events_health_state_filter=0, replicas_health_state_filter=0, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the health of the specified Service Fabric partition. + + Use EventsHealthStateFilter to filter the collection of health events + reported on the service based on the health state. + Use ReplicasHealthStateFilter to filter the collection of + ReplicaHealthState objects on the partition. + If you specify a partition that does not exist in the health store, + this request returns an error. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param events_health_state_filter: Allows filtering the collection of + HealthEvent objects returned based on health state. + The possible values for this parameter include integer value of one of + the following health states. + Only events that match the filter are returned. All events are used to + evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, obtained using the bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type events_health_state_filter: int + :param replicas_health_state_filter: Allows filtering the collection + of ReplicaHealthState objects on the partition. The value can be + obtained from members or bitwise operations on members of + HealthStateFilter. Only replicas that match the filter will be + returned. All replicas will be used to evaluate the aggregated health + state. If not specified, all entries will be returned.The state values + are flag-based enumeration, so the value could be a combination of + these values obtained using bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) will be returned. The possible values for this + parameter include integer value of one of the following health states. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type replicas_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health + statistics should be returned as part of the query result. False by + default. + The statistics show the number of children entities in health state + Ok, Warning, and Error. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PartitionHealth or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PartitionHealth or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_partition_health.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + if replicas_health_state_filter is not None: + query_parameters['ReplicasHealthStateFilter'] = self._serialize.query("replicas_health_state_filter", replicas_health_state_filter, 'int') + if exclude_health_statistics is not None: + query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PartitionHealth', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_partition_health.metadata = {'url': '/Partitions/{partitionId}/$/GetHealth'} + + def get_partition_health_using_policy( + self, partition_id, events_health_state_filter=0, replicas_health_state_filter=0, application_health_policy=None, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the health of the specified Service Fabric partition, by using the + specified health policy. + + Gets the health information of the specified partition. + If the application health policy is specified, the health evaluation + uses it to get the aggregated health state. + If the policy is not specified, the health evaluation uses the + application health policy defined in the application manifest, or the + default health policy, if no policy is defined in the manifest. + Use EventsHealthStateFilter to filter the collection of health events + reported on the partition based on the health state. + Use ReplicasHealthStateFilter to filter the collection of + ReplicaHealthState objects on the partition. Use + ApplicationHealthPolicy in the POST body to override the health + policies used to evaluate the health. + If you specify a partition that does not exist in the health store, + this request returns an error. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param events_health_state_filter: Allows filtering the collection of + HealthEvent objects returned based on health state. + The possible values for this parameter include integer value of one of + the following health states. + Only events that match the filter are returned. All events are used to + evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, obtained using the bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type events_health_state_filter: int + :param replicas_health_state_filter: Allows filtering the collection + of ReplicaHealthState objects on the partition. The value can be + obtained from members or bitwise operations on members of + HealthStateFilter. Only replicas that match the filter will be + returned. All replicas will be used to evaluate the aggregated health + state. If not specified, all entries will be returned.The state values + are flag-based enumeration, so the value could be a combination of + these values obtained using bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) will be returned. The possible values for this + parameter include integer value of one of the following health states. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type replicas_health_state_filter: int + :param application_health_policy: Describes the health policies used + to evaluate the health of an application or one of its children. + If not present, the health evaluation uses the health policy from + application manifest or the default health policy. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param exclude_health_statistics: Indicates whether the health + statistics should be returned as part of the query result. False by + default. + The statistics show the number of children entities in health state + Ok, Warning, and Error. + :type exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PartitionHealth or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PartitionHealth or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_partition_health_using_policy.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + if replicas_health_state_filter is not None: + query_parameters['ReplicasHealthStateFilter'] = self._serialize.query("replicas_health_state_filter", replicas_health_state_filter, 'int') + if exclude_health_statistics is not None: + query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if application_health_policy is not None: + body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('PartitionHealth', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_partition_health_using_policy.metadata = {'url': '/Partitions/{partitionId}/$/GetHealth'} + + def report_partition_health( + self, partition_id, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Sends a health report on the Service Fabric partition. + + Reports health state of the specified Service Fabric partition. The + report must contain the information about the source of the health + report and property on which it is reported. + The report is sent to a Service Fabric gateway Partition, which + forwards to the health store. + The report may be accepted by the gateway, but rejected by the health + store after extra validation. + For example, the health store may reject the report because of an + invalid parameter, like a stale sequence number. + To see whether the report was applied in the health store, run + GetPartitionHealth and check that the report appears in the + HealthEvents section. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param health_information: Describes the health information for the + health report. This information needs to be present in all of the + health reports sent to the health manager. + :type health_information: + ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be + sent immediately. + A health report is sent to a Service Fabric gateway Application, which + forwards to the health store. + If Immediate is set to true, the report is sent immediately from HTTP + Gateway to the health store, regardless of the fabric client settings + that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as + possible. + Depending on timing and other conditions, sending the report may still + fail, for example if the HTTP Gateway is closed or the message doesn't + reach the Gateway. + If Immediate is set to false, the report is sent based on the health + client settings from the HTTP Gateway. Therefore, it will be batched + according to the HealthReportSendInterval configuration. + This is the recommended setting because it allows the health client to + optimize health reporting messages to health store as well as health + report processing. + By default, reports are not sent immediately. + :type immediate: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.report_partition_health.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if immediate is not None: + query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(health_information, 'HealthInformation') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + report_partition_health.metadata = {'url': '/Partitions/{partitionId}/$/ReportHealth'} + + def get_partition_load_information( + self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the load information of the specified Service Fabric partition. + + Returns information about the load of a specified partition. + The response includes a list of load reports for a Service Fabric + partition. + Each report includes the load metric name, value, and last reported + time in UTC. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PartitionLoadInformation or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PartitionLoadInformation or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_partition_load_information.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PartitionLoadInformation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_partition_load_information.metadata = {'url': '/Partitions/{partitionId}/$/GetLoadInformation'} + + def reset_partition_load( + self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Resets the current load of a Service Fabric partition. + + Resets the current load of a Service Fabric partition to the default + load for the service. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.reset_partition_load.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset_partition_load.metadata = {'url': '/Partitions/{partitionId}/$/ResetLoad'} + + def recover_partition( + self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Indicates to the Service Fabric cluster that it should attempt to + recover a specific partition that is currently stuck in quorum loss. + + This operation should only be performed if it is known that the + replicas that are down cannot be recovered. Incorrect use of this API + can cause potential data loss. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.recover_partition.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + recover_partition.metadata = {'url': '/Partitions/{partitionId}/$/Recover'} + + def recover_service_partitions( + self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Indicates to the Service Fabric cluster that it should attempt to + recover the specified service that is currently stuck in quorum loss. + + Indicates to the Service Fabric cluster that it should attempt to + recover the specified service that is currently stuck in quorum loss. + This operation should only be performed if it is known that the + replicas that are down cannot be recovered. Incorrect use of this API + can cause potential data loss. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.recover_service_partitions.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + recover_service_partitions.metadata = {'url': '/Services/$/{serviceId}/$/GetPartitions/$/Recover'} + + def recover_system_partitions( + self, timeout=60, custom_headers=None, raw=False, **operation_config): + """Indicates to the Service Fabric cluster that it should attempt to + recover the system services that are currently stuck in quorum loss. + + Indicates to the Service Fabric cluster that it should attempt to + recover the system services that are currently stuck in quorum loss. + This operation should only be performed if it is known that the + replicas that are down cannot be recovered. Incorrect use of this API + can cause potential data loss. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.recover_system_partitions.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + recover_system_partitions.metadata = {'url': '/$/RecoverSystemPartitions'} + + def recover_all_partitions( + self, timeout=60, custom_headers=None, raw=False, **operation_config): + """Indicates to the Service Fabric cluster that it should attempt to + recover any services (including system services) which are currently + stuck in quorum loss. + + This operation should only be performed if it is known that the + replicas that are down cannot be recovered. Incorrect use of this API + can cause potential data loss. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.recover_all_partitions.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + recover_all_partitions.metadata = {'url': '/$/RecoverAllPartitions'} + + def move_primary_replica( + self, partition_id, node_name=None, ignore_constraints=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Moves the primary replica of a partition of a stateful service. + + This command moves the primary replica of a partition of a stateful + service, respecting all constraints. + If NodeName parameter is specified, primary will be moved to the + specified node (if constraints allow it). + If NodeName parameter is not specified, primary replica will be moved + to a random node in the cluster. + If IgnoreConstraints parameter is specified and set to true, then + primary will be moved regardless of the constraints. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param node_name: The name of the node. + :type node_name: str + :param ignore_constraints: Ignore constraints when moving a replica or + instance. If this parameter is not specified, all constraints are + honored. + :type ignore_constraints: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.5" + + # Construct URL + url = self.move_primary_replica.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if node_name is not None: + query_parameters['NodeName'] = self._serialize.query("node_name", node_name, 'str') + if ignore_constraints is not None: + query_parameters['IgnoreConstraints'] = self._serialize.query("ignore_constraints", ignore_constraints, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + move_primary_replica.metadata = {'url': '/Partitions/{partitionId}/$/MovePrimaryReplica'} + + def move_secondary_replica( + self, partition_id, current_node_name, new_node_name=None, ignore_constraints=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Moves the secondary replica of a partition of a stateful service. + + This command moves the secondary replica of a partition of a stateful + service, respecting all constraints. + CurrentNodeName parameter must be specified to identify the replica + that is moved. + Source node name must be specified, but new node name can be omitted, + and in that case replica is moved to a random node. + If IgnoreConstraints parameter is specified and set to true, then + secondary will be moved regardless of the constraints. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param current_node_name: The name of the source node for secondary + replica move. + :type current_node_name: str + :param new_node_name: The name of the target node for secondary + replica or instance move. If not specified, replica or instance is + moved to a random node. + :type new_node_name: str + :param ignore_constraints: Ignore constraints when moving a replica or + instance. If this parameter is not specified, all constraints are + honored. + :type ignore_constraints: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.5" + + # Construct URL + url = self.move_secondary_replica.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['CurrentNodeName'] = self._serialize.query("current_node_name", current_node_name, 'str') + if new_node_name is not None: + query_parameters['NewNodeName'] = self._serialize.query("new_node_name", new_node_name, 'str') + if ignore_constraints is not None: + query_parameters['IgnoreConstraints'] = self._serialize.query("ignore_constraints", ignore_constraints, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + move_secondary_replica.metadata = {'url': '/Partitions/{partitionId}/$/MoveSecondaryReplica'} + + def update_partition_load( + self, partition_metric_load_description_list, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + """Update the loads of provided partitions for specific metrics. + + Updates the load value and predicted load value for all the partitions + provided for specified metrics. + + :param partition_metric_load_description_list: Description of updating + load for list of partitions. + :type partition_metric_load_description_list: + list[~azure.servicefabric.models.PartitionMetricLoadDescription] + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedUpdatePartitionLoadResultList or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.PagedUpdatePartitionLoadResultList + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "7.2" + + # Construct URL + url = self.update_partition_load.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(partition_metric_load_description_list, '[PartitionMetricLoadDescription]') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('PagedUpdatePartitionLoadResultList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_partition_load.metadata = {'url': '/$/UpdatePartitionLoad'} + + def move_instance( + self, service_id, partition_id, current_node_name=None, new_node_name=None, ignore_constraints=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Moves the instance of a partition of a stateless service. + + This command moves the instance of a partition of a stateless service, + respecting all constraints. + Partition id and service name must be specified to be able to move the + instance. + CurrentNodeName when specified identifies the instance that is moved. + If not specified, random instance will be moved + New node name can be omitted, and in that case instance is moved to a + random node. + If IgnoreConstraints parameter is specified and set to true, then + instance will be moved regardless of the constraints. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param current_node_name: The name of the source node for instance + move. If not specified, instance is moved from a random node. + :type current_node_name: str + :param new_node_name: The name of the target node for secondary + replica or instance move. If not specified, replica or instance is + moved to a random node. + :type new_node_name: str + :param ignore_constraints: Ignore constraints when moving a replica or + instance. If this parameter is not specified, all constraints are + honored. + :type ignore_constraints: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "8.0" + + # Construct URL + url = self.move_instance.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if current_node_name is not None: + query_parameters['CurrentNodeName'] = self._serialize.query("current_node_name", current_node_name, 'str') + if new_node_name is not None: + query_parameters['NewNodeName'] = self._serialize.query("new_node_name", new_node_name, 'str') + if ignore_constraints is not None: + query_parameters['IgnoreConstraints'] = self._serialize.query("ignore_constraints", ignore_constraints, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + move_instance.metadata = {'url': '/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveInstance'} + + def move_auxiliary_replica( + self, service_id, partition_id, current_node_name=None, new_node_name=None, ignore_constraints=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Moves the auxiliary replica of a partition of a stateful service. + + This command moves the auxiliary replica of a partition of a stateful + service, respecting all constraints. + CurrentNodeName can be omitted, and in that case a random auxiliary + replica is chosen. + NewNodeName can be omitted, and in that case the auxiliary replica is + moved to a random node. + If IgnoreConstraints parameter is specified and set to true, then + auxiliary will be moved regardless of the constraints. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param current_node_name: The name of the source node for instance + move. If not specified, instance is moved from a random node. + :type current_node_name: str + :param new_node_name: The name of the target node for secondary + replica or instance move. If not specified, replica or instance is + moved to a random node. + :type new_node_name: str + :param ignore_constraints: Ignore constraints when moving a replica or + instance. If this parameter is not specified, all constraints are + honored. + :type ignore_constraints: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "8.1" + + # Construct URL + url = self.move_auxiliary_replica.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if current_node_name is not None: + query_parameters['CurrentNodeName'] = self._serialize.query("current_node_name", current_node_name, 'str') + if new_node_name is not None: + query_parameters['NewNodeName'] = self._serialize.query("new_node_name", new_node_name, 'str') + if ignore_constraints is not None: + query_parameters['IgnoreConstraints'] = self._serialize.query("ignore_constraints", ignore_constraints, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + move_auxiliary_replica.metadata = {'url': '/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveAuxiliaryReplica'} + + def create_repair_task( + self, repair_task, custom_headers=None, raw=False, **operation_config): + """Creates a new repair task. + + For clusters that have the Repair Manager Service configured, + this API provides a way to create repair tasks that run automatically + or manually. + For repair tasks that run automatically, an appropriate repair executor + must be running for each repair action to run automatically. + These are currently only available in specially-configured Azure Cloud + Services. + To create a manual repair task, provide the set of impacted node names + and the + expected impact. When the state of the created repair task changes to + approved, + you can safely perform repair actions on those nodes. + This API supports the Service Fabric platform; it is not meant to be + used directly from your code. + + :param repair_task: Describes the repair task to be created or + updated. + :type repair_task: ~azure.servicefabric.models.RepairTask + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RepairTaskUpdateInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.create_repair_task.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(repair_task, 'RepairTask') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('RepairTaskUpdateInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_repair_task.metadata = {'url': '/$/CreateRepairTask'} + + def cancel_repair_task( + self, repair_task_cancel_description, custom_headers=None, raw=False, **operation_config): + """Requests the cancellation of the given repair task. + + This API supports the Service Fabric platform; it is not meant to be + used directly from your code. + + :param repair_task_cancel_description: Describes the repair task to be + cancelled. + :type repair_task_cancel_description: + ~azure.servicefabric.models.RepairTaskCancelDescription + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RepairTaskUpdateInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.cancel_repair_task.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(repair_task_cancel_description, 'RepairTaskCancelDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('RepairTaskUpdateInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + cancel_repair_task.metadata = {'url': '/$/CancelRepairTask'} + + def delete_repair_task( + self, task_id, version=None, custom_headers=None, raw=False, **operation_config): + """Deletes a completed repair task. + + This API supports the Service Fabric platform; it is not meant to be + used directly from your code. + + :param task_id: The ID of the completed repair task to be deleted. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current version of the repair task. If zero, then no version + check is performed. + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + repair_task_delete_description = models.RepairTaskDeleteDescription(task_id=task_id, version=version) + + api_version = "6.0" + + # Construct URL + url = self.delete_repair_task.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(repair_task_delete_description, 'RepairTaskDeleteDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_repair_task.metadata = {'url': '/$/DeleteRepairTask'} + + def get_repair_task_list( + self, task_id_filter=None, state_filter=None, executor_filter=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of repair tasks matching the given filters. + + This API supports the Service Fabric platform; it is not meant to be + used directly from your code. + + :param task_id_filter: The repair task ID prefix to be matched. + :type task_id_filter: str + :param state_filter: A bitwise-OR of the following values, specifying + which task states should be included in the result list. + - 1 - Created + - 2 - Claimed + - 4 - Preparing + - 8 - Approved + - 16 - Executing + - 32 - Restoring + - 64 - Completed + :type state_filter: int + :param executor_filter: The name of the repair executor whose claimed + tasks should be included in the list. + :type executor_filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.RepairTask] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_repair_task_list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if task_id_filter is not None: + query_parameters['TaskIdFilter'] = self._serialize.query("task_id_filter", task_id_filter, 'str') + if state_filter is not None: + query_parameters['StateFilter'] = self._serialize.query("state_filter", state_filter, 'int') + if executor_filter is not None: + query_parameters['ExecutorFilter'] = self._serialize.query("executor_filter", executor_filter, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[RepairTask]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_repair_task_list.metadata = {'url': '/$/GetRepairTaskList'} + + def force_approve_repair_task( + self, task_id, version=None, custom_headers=None, raw=False, **operation_config): + """Forces the approval of the given repair task. + + This API supports the Service Fabric platform; it is not meant to be + used directly from your code. + + :param task_id: The ID of the repair task. + :type task_id: str + :param version: The current version number of the repair task. If + non-zero, then the request will only succeed if this value matches the + actual current version of the repair task. If zero, then no version + check is performed. + :type version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RepairTaskUpdateInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + repair_task_approve_description = models.RepairTaskApproveDescription(task_id=task_id, version=version) + + api_version = "6.0" + + # Construct URL + url = self.force_approve_repair_task.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(repair_task_approve_description, 'RepairTaskApproveDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('RepairTaskUpdateInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + force_approve_repair_task.metadata = {'url': '/$/ForceApproveRepairTask'} + + def update_repair_task_health_policy( + self, repair_task_update_health_policy_description, custom_headers=None, raw=False, **operation_config): + """Updates the health policy of the given repair task. + + This API supports the Service Fabric platform; it is not meant to be + used directly from your code. + + :param repair_task_update_health_policy_description: Describes the + repair task healthy policy to be updated. + :type repair_task_update_health_policy_description: + ~azure.servicefabric.models.RepairTaskUpdateHealthPolicyDescription + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RepairTaskUpdateInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.update_repair_task_health_policy.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(repair_task_update_health_policy_description, 'RepairTaskUpdateHealthPolicyDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('RepairTaskUpdateInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_repair_task_health_policy.metadata = {'url': '/$/UpdateRepairTaskHealthPolicy'} + + def update_repair_execution_state( + self, repair_task, custom_headers=None, raw=False, **operation_config): + """Updates the execution state of a repair task. + + This API supports the Service Fabric platform; it is not meant to be + used directly from your code. + + :param repair_task: Describes the repair task to be created or + updated. + :type repair_task: ~azure.servicefabric.models.RepairTask + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RepairTaskUpdateInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.update_repair_execution_state.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(repair_task, 'RepairTask') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('RepairTaskUpdateInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_repair_execution_state.metadata = {'url': '/$/UpdateRepairExecutionState'} + + def get_replica_info_list( + self, partition_id, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the information about replicas of a Service Fabric service + partition. + + The GetReplicas endpoint returns information about the replicas of the + specified partition. The response includes the ID, role, status, + health, node name, uptime, and other details about the replica. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedReplicaInfoList or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PagedReplicaInfoList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_replica_info_list.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedReplicaInfoList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_replica_info_list.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas'} + + def get_replica_info( + self, partition_id, replica_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the information about a replica of a Service Fabric partition. + + The response includes the ID, role, status, health, node name, uptime, + and other details about the replica. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ReplicaInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ReplicaInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_replica_info.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), + 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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 == 200: + deserialized = self._deserialize('ReplicaInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_replica_info.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas/{replicaId}'} + + def get_replica_health( + self, partition_id, replica_id, events_health_state_filter=0, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the health of a Service Fabric stateful service replica or + stateless service instance. + + Gets the health of a Service Fabric replica. + Use EventsHealthStateFilter to filter the collection of health events + reported on the replica based on the health state. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param events_health_state_filter: Allows filtering the collection of + HealthEvent objects returned based on health state. + The possible values for this parameter include integer value of one of + the following health states. + Only events that match the filter are returned. All events are used to + evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, obtained using the bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type events_health_state_filter: int + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ReplicaHealth or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ReplicaHealth or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_replica_health.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), + 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ReplicaHealth', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_replica_health.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth'} + + def get_replica_health_using_policy( + self, partition_id, replica_id, events_health_state_filter=0, application_health_policy=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the health of a Service Fabric stateful service replica or + stateless service instance using the specified policy. + + Gets the health of a Service Fabric stateful service replica or + stateless service instance. + Use EventsHealthStateFilter to filter the collection of health events + reported on the cluster based on the health state. + Use ApplicationHealthPolicy to optionally override the health policies + used to evaluate the health. This API only uses + 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest + of the fields are ignored while evaluating the health of the replica. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param events_health_state_filter: Allows filtering the collection of + HealthEvent objects returned based on health state. + The possible values for this parameter include integer value of one of + the following health states. + Only events that match the filter are returned. All events are used to + evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, obtained using the bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type events_health_state_filter: int + :param application_health_policy: Describes the health policies used + to evaluate the health of an application or one of its children. + If not present, the health evaluation uses the health policy from + application manifest or the default health policy. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ReplicaHealth or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ReplicaHealth or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_replica_health_using_policy.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), + 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if application_health_policy is not None: + body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('ReplicaHealth', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_replica_health_using_policy.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth'} + + def report_replica_health( + self, partition_id, replica_id, health_information, service_kind="Stateful", immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Sends a health report on the Service Fabric replica. + + Reports health state of the specified Service Fabric replica. The + report must contain the information about the source of the health + report and property on which it is reported. + The report is sent to a Service Fabric gateway Replica, which forwards + to the health store. + The report may be accepted by the gateway, but rejected by the health + store after extra validation. + For example, the health store may reject the report because of an + invalid parameter, like a stale sequence number. + To see whether the report was applied in the health store, run + GetReplicaHealth and check that the report appears in the HealthEvents + section. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param service_kind: The kind of service replica (Stateless or + Stateful) for which the health is being reported. Following are the + possible values. Possible values include: 'Stateless', 'Stateful' + :type service_kind: str or + ~azure.servicefabric.models.ReplicaHealthReportServiceKind + :param health_information: Describes the health information for the + health report. This information needs to be present in all of the + health reports sent to the health manager. + :type health_information: + ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be + sent immediately. + A health report is sent to a Service Fabric gateway Application, which + forwards to the health store. + If Immediate is set to true, the report is sent immediately from HTTP + Gateway to the health store, regardless of the fabric client settings + that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as + possible. + Depending on timing and other conditions, sending the report may still + fail, for example if the HTTP Gateway is closed or the message doesn't + reach the Gateway. + If Immediate is set to false, the report is sent based on the health + client settings from the HTTP Gateway. Therefore, it will be batched + according to the HealthReportSendInterval configuration. + This is the recommended setting because it allows the health client to + optimize health reporting messages to health store as well as health + report processing. + By default, reports are not sent immediately. + :type immediate: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.report_replica_health.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), + 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['ServiceKind'] = self._serialize.query("service_kind", service_kind, 'str') + if immediate is not None: + query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(health_information, 'HealthInformation') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + report_replica_health.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/ReportHealth'} + + def get_deployed_service_replica_info_list( + self, node_name, application_id, partition_id=None, service_manifest_name=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the list of replicas deployed on a Service Fabric node. + + Gets the list containing the information about replicas deployed on a + Service Fabric node. The information include partition ID, replica ID, + status of the replica, name of the service, name of the service type, + and other information. Use PartitionId or ServiceManifestName query + parameters to return information about the deployed replicas matching + the specified values for those parameters. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param service_manifest_name: The name of a service manifest + registered as part of an application type in a Service Fabric cluster. + :type service_manifest_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.DeployedServiceReplicaInfo] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_deployed_service_replica_info_list.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if partition_id is not None: + query_parameters['PartitionId'] = self._serialize.query("partition_id", partition_id, 'str') + if service_manifest_name is not None: + query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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 == 200: + deserialized = self._deserialize('[DeployedServiceReplicaInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployed_service_replica_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetReplicas'} + + def get_deployed_service_replica_detail_info( + self, node_name, partition_id, replica_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the details of replica deployed on a Service Fabric node. + + Gets the details of the replica deployed on a Service Fabric node. The + information includes service kind, service name, current service + operation, current service operation start date time, partition ID, + replica/instance ID, reported load, and other information. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeployedServiceReplicaDetailInfo or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.DeployedServiceReplicaDetailInfo + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_deployed_service_replica_detail_info.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), + 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('DeployedServiceReplicaDetailInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployed_service_replica_detail_info.metadata = {'url': '/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetDetail'} + + def get_deployed_service_replica_detail_info_by_partition_id( + self, node_name, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the details of replica deployed on a Service Fabric node. + + Gets the details of the replica deployed on a Service Fabric node. The + information includes service kind, service name, current service + operation, current service operation start date time, partition ID, + replica/instance ID, reported load, and other information. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeployedServiceReplicaDetailInfo or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.DeployedServiceReplicaDetailInfo + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_deployed_service_replica_detail_info_by_partition_id.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('DeployedServiceReplicaDetailInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployed_service_replica_detail_info_by_partition_id.metadata = {'url': '/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas'} + + def restart_replica( + self, node_name, partition_id, replica_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Restarts a service replica of a persisted service running on a node. + + Restarts a service replica of a persisted service running on a node. + Warning - There are no safety checks performed when this API is used. + Incorrect use of this API can lead to availability loss for stateful + services. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.restart_replica.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), + 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart_replica.metadata = {'url': '/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Restart'} + + def remove_replica( + self, node_name, partition_id, replica_id, force_remove=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Removes a service replica running on a node. + + This API simulates a Service Fabric replica failure by removing a + replica from a Service Fabric cluster. The removal closes the replica, + transitions the replica to the role None, and then removes all of the + state information of the replica from the cluster. This API tests the + replica state removal path, and simulates the report fault permanent + path through client APIs. Warning - There are no safety checks + performed when this API is used. Incorrect use of this API can lead to + data loss for stateful services. In addition, the forceRemove flag + impacts all other replicas hosted in the same process. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param force_remove: Remove a Service Fabric application or service + forcefully without going through the graceful shutdown sequence. This + parameter can be used to forcefully delete an application or service + for which delete is timing out due to issues in the service code that + prevents graceful close of replicas. + :type force_remove: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.remove_replica.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), + 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if force_remove is not None: + query_parameters['ForceRemove'] = self._serialize.query("force_remove", force_remove, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + remove_replica.metadata = {'url': '/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Delete'} + + def get_deployed_service_package_info_list( + self, node_name, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the list of service packages deployed on a Service Fabric node. + + Returns the information about the service packages deployed on a + Service Fabric node for the given application. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.DeployedServicePackageInfo] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_deployed_service_package_info_list.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[DeployedServicePackageInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployed_service_package_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages'} + + def get_deployed_service_package_info_list_by_name( + self, node_name, application_id, service_package_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the list of service packages deployed on a Service Fabric node + matching exactly the specified name. + + Returns the information about the service packages deployed on a + Service Fabric node for the given application. These results are of + service packages whose name match exactly the service package name + specified as the parameter. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.DeployedServicePackageInfo] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_deployed_service_package_info_list_by_name.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), + 'servicePackageName': self._serialize.url("service_package_name", service_package_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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 == 200: + deserialized = self._deserialize('[DeployedServicePackageInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployed_service_package_info_list_by_name.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}'} + + def get_deployed_service_package_health( + self, node_name, application_id, service_package_name, events_health_state_filter=0, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the information about health of a service package for a specific + application deployed for a Service Fabric node and application. + + Gets the information about health of a service package for a specific + application deployed on a Service Fabric node. Use + EventsHealthStateFilter to optionally filter for the collection of + HealthEvent objects reported on the deployed service package based on + health state. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :param events_health_state_filter: Allows filtering the collection of + HealthEvent objects returned based on health state. + The possible values for this parameter include integer value of one of + the following health states. + Only events that match the filter are returned. All events are used to + evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, obtained using the bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type events_health_state_filter: int + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeployedServicePackageHealth or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.DeployedServicePackageHealth or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_deployed_service_package_health.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), + 'servicePackageName': self._serialize.url("service_package_name", service_package_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('DeployedServicePackageHealth', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployed_service_package_health.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth'} + + def get_deployed_service_package_health_using_policy( + self, node_name, application_id, service_package_name, events_health_state_filter=0, application_health_policy=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the information about health of service package for a specific + application deployed on a Service Fabric node using the specified + policy. + + Gets the information about health of a service package for a specific + application deployed on a Service Fabric node. using the specified + policy. Use EventsHealthStateFilter to optionally filter for the + collection of HealthEvent objects reported on the deployed service + package based on health state. Use ApplicationHealthPolicy to + optionally override the health policies used to evaluate the health. + This API only uses 'ConsiderWarningAsError' field of the + ApplicationHealthPolicy. The rest of the fields are ignored while + evaluating the health of the deployed service package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :param events_health_state_filter: Allows filtering the collection of + HealthEvent objects returned based on health state. + The possible values for this parameter include integer value of one of + the following health states. + Only events that match the filter are returned. All events are used to + evaluate the aggregated health state. + If not specified, all entries are returned. The state values are + flag-based enumeration, so the value could be a combination of these + values, obtained using the bitwise 'OR' operator. For example, If the + provided value is 6 then all of the events with HealthState value of + OK (2) and Warning (4) are returned. + - Default - Default value. Matches any HealthState. The value is zero. + - None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The value + is 1. + - Ok - Filter that matches input with HealthState value Ok. The value + is 2. + - Warning - Filter that matches input with HealthState value Warning. + The value is 4. + - Error - Filter that matches input with HealthState value Error. The + value is 8. + - All - Filter that matches input with any HealthState value. The + value is 65535. + :type events_health_state_filter: int + :param application_health_policy: Describes the health policies used + to evaluate the health of an application or one of its children. + If not present, the health evaluation uses the health policy from + application manifest or the default health policy. + :type application_health_policy: + ~azure.servicefabric.models.ApplicationHealthPolicy + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DeployedServicePackageHealth or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.DeployedServicePackageHealth or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_deployed_service_package_health_using_policy.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), + 'servicePackageName': self._serialize.url("service_package_name", service_package_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if application_health_policy is not None: + body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('DeployedServicePackageHealth', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployed_service_package_health_using_policy.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth'} + + def report_deployed_service_package_health( + self, node_name, application_id, service_package_name, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Sends a health report on the Service Fabric deployed service package. + + Reports health state of the service package of the application deployed + on a Service Fabric node. The report must contain the information about + the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway Service, which forwards + to the health store. + The report may be accepted by the gateway, but rejected by the health + store after extra validation. + For example, the health store may reject the report because of an + invalid parameter, like a stale sequence number. + To see whether the report was applied in the health store, get deployed + service package health and check that the report appears in the + HealthEvents section. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :param health_information: Describes the health information for the + health report. This information needs to be present in all of the + health reports sent to the health manager. + :type health_information: + ~azure.servicefabric.models.HealthInformation + :param immediate: A flag that indicates whether the report should be + sent immediately. + A health report is sent to a Service Fabric gateway Application, which + forwards to the health store. + If Immediate is set to true, the report is sent immediately from HTTP + Gateway to the health store, regardless of the fabric client settings + that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as + possible. + Depending on timing and other conditions, sending the report may still + fail, for example if the HTTP Gateway is closed or the message doesn't + reach the Gateway. + If Immediate is set to false, the report is sent based on the health + client settings from the HTTP Gateway. Therefore, it will be batched + according to the HealthReportSendInterval configuration. + This is the recommended setting because it allows the health client to + optimize health reporting messages to health store as well as health + report processing. + By default, reports are not sent immediately. + :type immediate: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.report_deployed_service_package_health.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), + 'servicePackageName': self._serialize.url("service_package_name", service_package_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if immediate is not None: + query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(health_information, 'HealthInformation') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + report_deployed_service_package_health.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/ReportHealth'} + + def deploy_service_package_to_node( + self, node_name, deploy_service_package_to_node_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Downloads all of the code packages associated with specified service + manifest on the specified node. + + This API provides a way to download code packages including the + container images on a specific node outside of the normal application + deployment and upgrade path. This is useful for the large code packages + and container images to be present on the node before the actual + application deployment and upgrade, thus significantly reducing the + total time required for the deployment or upgrade. + + :param node_name: The name of the node. + :type node_name: str + :param deploy_service_package_to_node_description: Describes + information for deploying a service package to a Service Fabric node. + :type deploy_service_package_to_node_description: + ~azure.servicefabric.models.DeployServicePackageToNodeDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.deploy_service_package_to_node.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(deploy_service_package_to_node_description, 'DeployServicePackageToNodeDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + deploy_service_package_to_node.metadata = {'url': '/Nodes/{nodeName}/$/DeployServicePackage'} + + def get_deployed_code_package_info_list( + self, node_name, application_id, service_manifest_name=None, code_package_name=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the list of code packages deployed on a Service Fabric node. + + Gets the list of code packages deployed on a Service Fabric node for + the given application. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param service_manifest_name: The name of a service manifest + registered as part of an application type in a Service Fabric cluster. + :type service_manifest_name: str + :param code_package_name: The name of code package specified in + service manifest registered as part of an application type in a + Service Fabric cluster. + :type code_package_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.DeployedCodePackageInfo] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_deployed_code_package_info_list.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if service_manifest_name is not None: + query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') + if code_package_name is not None: + query_parameters['CodePackageName'] = self._serialize.query("code_package_name", code_package_name, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[DeployedCodePackageInfo]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_deployed_code_package_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages'} + + def restart_deployed_code_package( + self, node_name, application_id, restart_deployed_code_package_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Restarts a code package deployed on a Service Fabric node in a cluster. + + Restarts a code package deployed on a Service Fabric node in a cluster. + This aborts the code package process, which will restart all the user + service replicas hosted in that process. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param restart_deployed_code_package_description: Describes the + deployed code package on Service Fabric node to restart. + :type restart_deployed_code_package_description: + ~azure.servicefabric.models.RestartDeployedCodePackageDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.restart_deployed_code_package.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restart_deployed_code_package_description, 'RestartDeployedCodePackageDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart_deployed_code_package.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/Restart'} + + def get_container_logs_deployed_on_node( + self, node_name, application_id, service_manifest_name, code_package_name, tail=None, previous=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the container logs for container deployed on a Service Fabric + node. + + Gets the container logs for container deployed on a Service Fabric node + for the given code package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param service_manifest_name: The name of a service manifest + registered as part of an application type in a Service Fabric cluster. + :type service_manifest_name: str + :param code_package_name: The name of code package specified in + service manifest registered as part of an application type in a + Service Fabric cluster. + :type code_package_name: str + :param tail: Number of lines to show from the end of the logs. Default + is 100. 'all' to show the complete logs. + :type tail: str + :param previous: Specifies whether to get container logs from + exited/dead containers of the code package instance. + :type previous: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ContainerLogs or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ContainerLogs or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.2" + + # Construct URL + url = self.get_container_logs_deployed_on_node.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') + query_parameters['CodePackageName'] = self._serialize.query("code_package_name", code_package_name, 'str') + if tail is not None: + query_parameters['Tail'] = self._serialize.query("tail", tail, 'str') + if previous is not None: + query_parameters['Previous'] = self._serialize.query("previous", previous, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ContainerLogs', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_container_logs_deployed_on_node.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerLogs'} + + def invoke_container_api( + self, node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, container_api_request_body, timeout=60, custom_headers=None, raw=False, **operation_config): + """Invoke container API on a container deployed on a Service Fabric node. + + Invoke container API on a container deployed on a Service Fabric node + for the given code package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param service_manifest_name: The name of a service manifest + registered as part of an application type in a Service Fabric cluster. + :type service_manifest_name: str + :param code_package_name: The name of code package specified in + service manifest registered as part of an application type in a + Service Fabric cluster. + :type code_package_name: str + :param code_package_instance_id: ID that uniquely identifies a code + package instance deployed on a service fabric node. + :type code_package_instance_id: str + :param container_api_request_body: Parameters for making container API + call + :type container_api_request_body: + ~azure.servicefabric.models.ContainerApiRequestBody + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ContainerApiResponse or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ContainerApiResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.2" + + # Construct URL + url = self.invoke_container_api.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str'), + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') + query_parameters['CodePackageName'] = self._serialize.query("code_package_name", code_package_name, 'str') + query_parameters['CodePackageInstanceId'] = self._serialize.query("code_package_instance_id", code_package_instance_id, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(container_api_request_body, 'ContainerApiRequestBody') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('ContainerApiResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + invoke_container_api.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerApi'} + + def create_compose_deployment( + self, create_compose_deployment_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Creates a Service Fabric compose deployment. + + Compose is a file format that describes multi-container applications. + This API allows deploying container based applications defined in + compose format in a Service Fabric cluster. Once the deployment is + created, its status can be tracked via the `GetComposeDeploymentStatus` + API. + + :param create_compose_deployment_description: Describes the compose + deployment that needs to be created. + :type create_compose_deployment_description: + ~azure.servicefabric.models.CreateComposeDeploymentDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0-preview" + + # Construct URL + url = self.create_compose_deployment.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(create_compose_deployment_description, 'CreateComposeDeploymentDescription') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + create_compose_deployment.metadata = {'url': '/ComposeDeployments/$/Create'} + + def get_compose_deployment_status( + self, deployment_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets information about a Service Fabric compose deployment. + + Returns the status of the compose deployment that was created or in the + process of being created in the Service Fabric cluster and whose name + matches the one specified as the parameter. The response includes the + name, status, and other details about the deployment. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ComposeDeploymentStatusInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ComposeDeploymentStatusInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0-preview" + + # Construct URL + url = self.get_compose_deployment_status.metadata['url'] + path_format_arguments = { + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ComposeDeploymentStatusInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_compose_deployment_status.metadata = {'url': '/ComposeDeployments/{deploymentName}'} + + def get_compose_deployment_status_list( + self, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the list of compose deployments created in the Service Fabric + cluster. + + Gets the status about the compose deployments that were created or in + the process of being created in the Service Fabric cluster. The + response includes the name, status, and other details about the compose + deployments. If the list of deployments do not fit in a page, one page + of results is returned as well as a continuation token, which can be + used to get the next page. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedComposeDeploymentStatusInfoList or ClientRawResponse if + raw=true + :rtype: + ~azure.servicefabric.models.PagedComposeDeploymentStatusInfoList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0-preview" + + # Construct URL + url = self.get_compose_deployment_status_list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedComposeDeploymentStatusInfoList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_compose_deployment_status_list.metadata = {'url': '/ComposeDeployments'} + + def get_compose_deployment_upgrade_progress( + self, deployment_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets details for the latest upgrade performed on this Service Fabric + compose deployment. + + Returns the information about the state of the compose deployment + upgrade along with details to aid debugging application health issues. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ComposeDeploymentUpgradeProgressInfo or ClientRawResponse if + raw=true + :rtype: + ~azure.servicefabric.models.ComposeDeploymentUpgradeProgressInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0-preview" + + # Construct URL + url = self.get_compose_deployment_upgrade_progress.metadata['url'] + path_format_arguments = { + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ComposeDeploymentUpgradeProgressInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_compose_deployment_upgrade_progress.metadata = {'url': '/ComposeDeployments/{deploymentName}/$/GetUpgradeProgress'} + + def remove_compose_deployment( + self, deployment_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Deletes an existing Service Fabric compose deployment from cluster. + + Deletes an existing Service Fabric compose deployment. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0-preview" + + # Construct URL + url = self.remove_compose_deployment.metadata['url'] + path_format_arguments = { + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + remove_compose_deployment.metadata = {'url': '/ComposeDeployments/{deploymentName}/$/Delete'} + + def start_compose_deployment_upgrade( + self, deployment_name, compose_deployment_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Starts upgrading a compose deployment in the Service Fabric cluster. + + Validates the supplied upgrade parameters and starts upgrading the + deployment if the parameters are valid. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :param compose_deployment_upgrade_description: Parameters for + upgrading compose deployment. + :type compose_deployment_upgrade_description: + ~azure.servicefabric.models.ComposeDeploymentUpgradeDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0-preview" + + # Construct URL + url = self.start_compose_deployment_upgrade.metadata['url'] + path_format_arguments = { + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(compose_deployment_upgrade_description, 'ComposeDeploymentUpgradeDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_compose_deployment_upgrade.metadata = {'url': '/ComposeDeployments/{deploymentName}/$/Upgrade'} + + def start_rollback_compose_deployment_upgrade( + self, deployment_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Starts rolling back a compose deployment upgrade in the Service Fabric + cluster. + + Rollback a service fabric compose deployment upgrade. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4-preview" + + # Construct URL + url = self.start_rollback_compose_deployment_upgrade.metadata['url'] + path_format_arguments = { + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_rollback_compose_deployment_upgrade.metadata = {'url': '/ComposeDeployments/{deploymentName}/$/RollbackUpgrade'} + + def get_chaos( + self, timeout=60, custom_headers=None, raw=False, **operation_config): + """Get the status of Chaos. + + Get the status of Chaos indicating whether or not Chaos is running, the + Chaos parameters used for running Chaos and the status of the Chaos + Schedule. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Chaos or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.Chaos or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.2" + + # Construct URL + url = self.get_chaos.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('Chaos', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_chaos.metadata = {'url': '/Tools/Chaos'} + + def start_chaos( + self, chaos_parameters, timeout=60, custom_headers=None, raw=False, **operation_config): + """Starts Chaos in the cluster. + + If Chaos is not already running in the cluster, it starts Chaos with + the passed in Chaos parameters. + If Chaos is already running when this call is made, the call fails with + the error code FABRIC_E_CHAOS_ALREADY_RUNNING. + Refer to the article [Induce controlled Chaos in Service Fabric + clusters](https://docs.microsoft.com/azure/service-fabric/service-fabric-controlled-chaos) + for more details. + + :param chaos_parameters: Describes all the parameters to configure a + Chaos run. + :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.start_chaos.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(chaos_parameters, 'ChaosParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_chaos.metadata = {'url': '/Tools/Chaos/$/Start'} + + def stop_chaos( + self, timeout=60, custom_headers=None, raw=False, **operation_config): + """Stops Chaos if it is running in the cluster and put the Chaos Schedule + in a stopped state. + + Stops Chaos from executing new faults. In-flight faults will continue + to execute until they are complete. The current Chaos Schedule is put + into a stopped state. + Once a schedule is stopped, it will stay in the stopped state and not + be used to Chaos Schedule new runs of Chaos. A new Chaos Schedule must + be set in order to resume scheduling. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.stop_chaos.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_chaos.metadata = {'url': '/Tools/Chaos/$/Stop'} + + def get_chaos_events( + self, continuation_token=None, start_time_utc=None, end_time_utc=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the next segment of the Chaos events based on the continuation + token or the time range. + + To get the next segment of the Chaos events, you can specify the + ContinuationToken. To get the start of a new segment of Chaos events, + you can specify the time range + through StartTimeUtc and EndTimeUtc. You cannot specify both the + ContinuationToken and the time range in the same call. + When there are more than 100 Chaos events, the Chaos events are + returned in multiple segments where a segment contains no more than 100 + Chaos events and to get the next segment you make a call to this API + with the continuation token. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param start_time_utc: The Windows file time representing the start + time of the time range for which a Chaos report is to be generated. + Consult [DateTime.ToFileTimeUtc + Method](https://msdn.microsoft.com/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + for details. + :type start_time_utc: str + :param end_time_utc: The Windows file time representing the end time + of the time range for which a Chaos report is to be generated. Consult + [DateTime.ToFileTimeUtc + Method](https://msdn.microsoft.com/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + for details. + :type end_time_utc: str + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ChaosEventsSegment or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ChaosEventsSegment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.2" + + # Construct URL + url = self.get_chaos_events.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if start_time_utc is not None: + query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') + if end_time_utc is not None: + query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ChaosEventsSegment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_chaos_events.metadata = {'url': '/Tools/Chaos/Events'} + + def get_chaos_schedule( + self, timeout=60, custom_headers=None, raw=False, **operation_config): + """Get the Chaos Schedule defining when and how to run Chaos. + + Gets the version of the Chaos Schedule in use and the Chaos Schedule + that defines when and how to run Chaos. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ChaosScheduleDescription or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ChaosScheduleDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.2" + + # Construct URL + url = self.get_chaos_schedule.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ChaosScheduleDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_chaos_schedule.metadata = {'url': '/Tools/Chaos/Schedule'} + + def post_chaos_schedule( + self, timeout=60, version=None, schedule=None, custom_headers=None, raw=False, **operation_config): + """Set the schedule used by Chaos. + + Chaos will automatically schedule runs based on the Chaos Schedule. + The Chaos Schedule will be updated if the provided version matches the + version on the server. + When updating the Chaos Schedule, the version on the server is + incremented by 1. + The version on the server will wrap back to 0 after reaching a large + number. + If Chaos is running when this call is made, the call will fail. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param version: The version number of the Schedule. + :type version: int + :param schedule: Defines the schedule used by Chaos. + :type schedule: ~azure.servicefabric.models.ChaosSchedule + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + chaos_schedule = models.ChaosScheduleDescription(version=version, schedule=schedule) + + api_version = "6.2" + + # Construct URL + url = self.post_chaos_schedule.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(chaos_schedule, 'ChaosScheduleDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + post_chaos_schedule.metadata = {'url': '/Tools/Chaos/Schedule'} + + def upload_file( + self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): + """Uploads contents of the file to the image store. + + Uploads contents of the file to the image store. Use this API if the + file is small enough to upload again if the connection fails. The + file's data needs to be added to the request body. The contents will be + uploaded to the specified path. Image store service uses a mark file to + indicate the availability of the folder. The mark file is an empty file + named "_.dir". The mark file is generated by the image store service + when all files in a folder are uploaded. When using File-by-File + approach to upload application package in REST, the image store service + isn't aware of the file hierarchy of the application package; you need + to create a mark file per folder and upload it last, to let the image + store service know that the folder is complete. + + :param content_path: Relative path to file or folder in the image + store from its root. + :type content_path: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.upload_file.metadata['url'] + path_format_arguments = { + 'contentPath': self._serialize.url("content_path", content_path, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + upload_file.metadata = {'url': '/ImageStore/{contentPath}'} + + def get_image_store_content( + self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the image store content information. + + Returns the information about the image store content at the specified + contentPath. The contentPath is relative to the root of the image + store. + + :param content_path: Relative path to file or folder in the image + store from its root. + :type content_path: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImageStoreContent or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ImageStoreContent or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.2" + + # Construct URL + url = self.get_image_store_content.metadata['url'] + path_format_arguments = { + 'contentPath': self._serialize.url("content_path", content_path, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ImageStoreContent', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_image_store_content.metadata = {'url': '/ImageStore/{contentPath}'} + + def delete_image_store_content( + self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): + """Deletes existing image store content. + + Deletes existing image store content being found within the given image + store relative path. This command can be used to delete uploaded + application packages once they are provisioned. + + :param content_path: Relative path to file or folder in the image + store from its root. + :type content_path: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.delete_image_store_content.metadata['url'] + path_format_arguments = { + 'contentPath': self._serialize.url("content_path", content_path, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_image_store_content.metadata = {'url': '/ImageStore/{contentPath}'} + + def get_image_store_root_content( + self, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the content information at the root of the image store. + + Returns the information about the image store content at the root of + the image store. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImageStoreContent or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ImageStoreContent or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_image_store_root_content.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ImageStoreContent', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_image_store_root_content.metadata = {'url': '/ImageStore'} + + def copy_image_store_content( + self, image_store_copy_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Copies image store content internally. + + Copies the image store content from the source image store relative + path to the destination image store relative path. + + :param image_store_copy_description: Describes the copy description + for the image store. + :type image_store_copy_description: + ~azure.servicefabric.models.ImageStoreCopyDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.copy_image_store_content.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(image_store_copy_description, 'ImageStoreCopyDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + copy_image_store_content.metadata = {'url': '/ImageStore/$/Copy'} + + def delete_image_store_upload_session( + self, session_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Cancels an image store upload session. + + The DELETE request will cause the existing upload session to expire and + remove any previously uploaded file chunks. + + :param session_id: A GUID generated by the user for a file uploading. + It identifies an image store upload session which keeps track of all + file chunks until it is committed. + :type session_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.delete_image_store_upload_session.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['session-id'] = self._serialize.query("session_id", session_id, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_image_store_upload_session.metadata = {'url': '/ImageStore/$/DeleteUploadSession'} + + def commit_image_store_upload_session( + self, session_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Commit an image store upload session. + + When all file chunks have been uploaded, the upload session needs to be + committed explicitly to complete the upload. Image store preserves the + upload session until the expiration time, which is 30 minutes after the + last chunk received. . + + :param session_id: A GUID generated by the user for a file uploading. + It identifies an image store upload session which keeps track of all + file chunks until it is committed. + :type session_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.commit_image_store_upload_session.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['session-id'] = self._serialize.query("session_id", session_id, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + commit_image_store_upload_session.metadata = {'url': '/ImageStore/$/CommitUploadSession'} + + def get_image_store_upload_session_by_id( + self, session_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Get the image store upload session by ID. + + Gets the image store upload session identified by the given ID. User + can query the upload session at any time during uploading. . + + :param session_id: A GUID generated by the user for a file uploading. + It identifies an image store upload session which keeps track of all + file chunks until it is committed. + :type session_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: UploadSession or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.UploadSession or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_image_store_upload_session_by_id.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['session-id'] = self._serialize.query("session_id", session_id, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('UploadSession', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_image_store_upload_session_by_id.metadata = {'url': '/ImageStore/$/GetUploadSession'} + + def get_image_store_upload_session_by_path( + self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): + """Get the image store upload session by relative path. + + Gets the image store upload session associated with the given image + store relative path. User can query the upload session at any time + during uploading. . + + :param content_path: Relative path to file or folder in the image + store from its root. + :type content_path: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: UploadSession or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.UploadSession or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_image_store_upload_session_by_path.metadata['url'] + path_format_arguments = { + 'contentPath': self._serialize.url("content_path", content_path, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('UploadSession', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_image_store_upload_session_by_path.metadata = {'url': '/ImageStore/{contentPath}/$/GetUploadSession'} + + def upload_file_chunk( + self, content_path, session_id, content_range, timeout=60, custom_headers=None, raw=False, **operation_config): + """Uploads a file chunk to the image store relative path. + + Uploads a file chunk to the image store with the specified upload + session ID and image store relative path. This API allows user to + resume the file upload operation. user doesn't have to restart the file + upload from scratch whenever there is a network interruption. Use this + option if the file size is large. + To perform a resumable file upload, user need to break the file into + multiple chunks and upload these chunks to the image store one-by-one. + Chunks don't have to be uploaded in order. If the file represented by + the image store relative path already exists, it will be overwritten + when the upload session commits. + + :param content_path: Relative path to file or folder in the image + store from its root. + :type content_path: str + :param session_id: A GUID generated by the user for a file uploading. + It identifies an image store upload session which keeps track of all + file chunks until it is committed. + :type session_id: str + :param content_range: When uploading file chunks to the image store, + the Content-Range header field need to be configured and sent with a + request. The format should looks like "bytes + {First-Byte-Position}-{Last-Byte-Position}/{File-Length}". For + example, Content-Range:bytes 300-5000/20000 indicates that user is + sending bytes 300 through 5,000 and the total file length is 20,000 + bytes. + :type content_range: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.upload_file_chunk.metadata['url'] + path_format_arguments = { + 'contentPath': self._serialize.url("content_path", content_path, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['session-id'] = self._serialize.query("session_id", session_id, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['Content-Range'] = self._serialize.header("content_range", content_range, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + upload_file_chunk.metadata = {'url': '/ImageStore/{contentPath}/$/UploadChunk'} + + def get_image_store_root_folder_size( + self, timeout=60, custom_headers=None, raw=False, **operation_config): + """Get the folder size at the root of the image store. + + Returns the total size of files at the root and children folders in + image store. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FolderSizeInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.FolderSizeInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.5" + + # Construct URL + url = self.get_image_store_root_folder_size.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('FolderSizeInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_image_store_root_folder_size.metadata = {'url': '/ImageStore/$/FolderSize'} + + def get_image_store_folder_size( + self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): + """Get the size of a folder in image store. + + Gets the total size of file under a image store folder, specified by + contentPath. The contentPath is relative to the root of the image + store. + + :param content_path: Relative path to file or folder in the image + store from its root. + :type content_path: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: FolderSizeInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.FolderSizeInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.5" + + # Construct URL + url = self.get_image_store_folder_size.metadata['url'] + path_format_arguments = { + 'contentPath': self._serialize.url("content_path", content_path, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('FolderSizeInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_image_store_folder_size.metadata = {'url': '/ImageStore/{contentPath}/$/FolderSize'} + + def get_image_store_info( + self, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the overall ImageStore information. + + Returns information about the primary ImageStore replica, such as disk + capacity and available disk space at the node it is on, and several + categories of the ImageStore's file system usage. + + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImageStoreInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.ImageStoreInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.5" + + # Construct URL + url = self.get_image_store_info.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('ImageStoreInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_image_store_info.metadata = {'url': '/ImageStore/$/Info'} + + def invoke_infrastructure_command( + self, command, service_id=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Invokes an administrative command on the given Infrastructure Service + instance. + + For clusters that have one or more instances of the Infrastructure + Service configured, + this API provides a way to send infrastructure-specific commands to a + particular + instance of the Infrastructure Service. + Available commands and their corresponding response formats vary + depending upon + the infrastructure on which the cluster is running. + This API supports the Service Fabric platform; it is not meant to be + used directly from your code. + + :param command: The text of the command to be invoked. The content of + the command is infrastructure-specific. + :type command: str + :param service_id: The identity of the infrastructure service. This is + the full name of the infrastructure service without the 'fabric:' URI + scheme. This parameter required only for the cluster that has more + than one instance of infrastructure service running. + :type service_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.invoke_infrastructure_command.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['Command'] = self._serialize.query("command", command, 'str') + if service_id is not None: + query_parameters['ServiceId'] = self._serialize.query("service_id", service_id, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = 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('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + invoke_infrastructure_command.metadata = {'url': '/$/InvokeInfrastructureCommand'} + + def invoke_infrastructure_query( + self, command, service_id=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Invokes a read-only query on the given infrastructure service instance. + + For clusters that have one or more instances of the Infrastructure + Service configured, + this API provides a way to send infrastructure-specific queries to a + particular + instance of the Infrastructure Service. + Available commands and their corresponding response formats vary + depending upon + the infrastructure on which the cluster is running. + This API supports the Service Fabric platform; it is not meant to be + used directly from your code. + + :param command: The text of the command to be invoked. The content of + the command is infrastructure-specific. + :type command: str + :param service_id: The identity of the infrastructure service. This is + the full name of the infrastructure service without the 'fabric:' URI + scheme. This parameter required only for the cluster that has more + than one instance of infrastructure service running. + :type service_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.invoke_infrastructure_query.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['Command'] = self._serialize.query("command", command, 'str') + if service_id is not None: + query_parameters['ServiceId'] = self._serialize.query("service_id", service_id, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + invoke_infrastructure_query.metadata = {'url': '/$/InvokeInfrastructureQuery'} + + def start_data_loss( + self, service_id, partition_id, operation_id, data_loss_mode, timeout=60, custom_headers=None, raw=False, **operation_config): + """This API will induce data loss for the specified partition. It will + trigger a call to the OnDataLossAsync API of the partition. + + This API will induce data loss for the specified partition. It will + trigger a call to the OnDataLoss API of the partition. + Actual data loss will depend on the specified DataLossMode. + - PartialDataLoss - Only a quorum of replicas are removed and + OnDataLoss is triggered for the partition but actual data loss depends + on the presence of in-flight replication. + - FullDataLoss - All replicas are removed hence all data is lost and + OnDataLoss is triggered. + This API should only be called with a stateful service as the target. + Calling this API with a system service as the target is not advised. + Note: Once this API has been called, it cannot be reversed. Calling + CancelOperation will only stop execution and clean up internal system + state. + It will not restore data if the command has progressed far enough to + cause data loss. + Call the GetDataLossProgress API with the same OperationId to return + information on the operation started with this API. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This + is passed into the corresponding GetProgress API + :type operation_id: str + :param data_loss_mode: This enum is passed to the StartDataLoss API to + indicate what type of data loss to induce. Possible values include: + 'Invalid', 'PartialDataLoss', 'FullDataLoss' + :type data_loss_mode: str or ~azure.servicefabric.models.DataLossMode + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.start_data_loss.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') + query_parameters['DataLossMode'] = self._serialize.query("data_loss_mode", data_loss_mode, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_data_loss.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartDataLoss'} + + def get_data_loss_progress( + self, service_id, partition_id, operation_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the progress of a partition data loss operation started using the + StartDataLoss API. + + Gets the progress of a data loss operation started with StartDataLoss, + using the OperationId. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This + is passed into the corresponding GetProgress API + :type operation_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PartitionDataLossProgress or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PartitionDataLossProgress or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_data_loss_progress.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PartitionDataLossProgress', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_data_loss_progress.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetDataLossProgress'} + + def start_quorum_loss( + self, service_id, partition_id, operation_id, quorum_loss_mode, quorum_loss_duration, timeout=60, custom_headers=None, raw=False, **operation_config): + """Induces quorum loss for a given stateful service partition. + + This API is useful for a temporary quorum loss situation on your + service. + Call the GetQuorumLossProgress API with the same OperationId to return + information on the operation started with this API. + This can only be called on stateful persisted (HasPersistedState==true) + services. Do not use this API on stateless services or stateful + in-memory only services. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This + is passed into the corresponding GetProgress API + :type operation_id: str + :param quorum_loss_mode: This enum is passed to the StartQuorumLoss + API to indicate what type of quorum loss to induce. Possible values + include: 'Invalid', 'QuorumReplicas', 'AllReplicas' + :type quorum_loss_mode: str or + ~azure.servicefabric.models.QuorumLossMode + :param quorum_loss_duration: The amount of time for which the + partition will be kept in quorum loss. This must be specified in + seconds. + :type quorum_loss_duration: int + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.start_quorum_loss.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') + query_parameters['QuorumLossMode'] = self._serialize.query("quorum_loss_mode", quorum_loss_mode, 'str') + query_parameters['QuorumLossDuration'] = self._serialize.query("quorum_loss_duration", quorum_loss_duration, 'int') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_quorum_loss.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartQuorumLoss'} + + def get_quorum_loss_progress( + self, service_id, partition_id, operation_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the progress of a quorum loss operation on a partition started + using the StartQuorumLoss API. + + Gets the progress of a quorum loss operation started with + StartQuorumLoss, using the provided OperationId. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This + is passed into the corresponding GetProgress API + :type operation_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PartitionQuorumLossProgress or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PartitionQuorumLossProgress or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_quorum_loss_progress.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PartitionQuorumLossProgress', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_quorum_loss_progress.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetQuorumLossProgress'} + + def start_partition_restart( + self, service_id, partition_id, operation_id, restart_partition_mode, timeout=60, custom_headers=None, raw=False, **operation_config): + """This API will restart some or all replicas or instances of the + specified partition. + + This API is useful for testing failover. + If used to target a stateless service partition, RestartPartitionMode + must be AllReplicasOrInstances. + Call the GetPartitionRestartProgress API using the same OperationId to + get the progress. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This + is passed into the corresponding GetProgress API + :type operation_id: str + :param restart_partition_mode: Describe which partitions to restart. + Possible values include: 'Invalid', 'AllReplicasOrInstances', + 'OnlyActiveSecondaries' + :type restart_partition_mode: str or + ~azure.servicefabric.models.RestartPartitionMode + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.start_partition_restart.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') + query_parameters['RestartPartitionMode'] = self._serialize.query("restart_partition_mode", restart_partition_mode, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_partition_restart.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartRestart'} + + def get_partition_restart_progress( + self, service_id, partition_id, operation_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the progress of a PartitionRestart operation started using + StartPartitionRestart. + + Gets the progress of a PartitionRestart started with + StartPartitionRestart using the provided OperationId. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This + is passed into the corresponding GetProgress API + :type operation_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PartitionRestartProgress or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PartitionRestartProgress or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_partition_restart_progress.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PartitionRestartProgress', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_partition_restart_progress.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetRestartProgress'} + + def start_node_transition( + self, node_name, operation_id, node_transition_type, node_instance_id, stop_duration_in_seconds, timeout=60, custom_headers=None, raw=False, **operation_config): + """Starts or stops a cluster node. + + Starts or stops a cluster node. A cluster node is a process, not the + OS instance itself. To start a node, pass in "Start" for the + NodeTransitionType parameter. + To stop a node, pass in "Stop" for the NodeTransitionType parameter. + This API starts the operation - when the API returns the node may not + have finished transitioning yet. + Call GetNodeTransitionProgress with the same OperationId to get the + progress of the operation. + + :param node_name: The name of the node. + :type node_name: str + :param operation_id: A GUID that identifies a call of this API. This + is passed into the corresponding GetProgress API + :type operation_id: str + :param node_transition_type: Indicates the type of transition to + perform. NodeTransitionType.Start will start a stopped node. + NodeTransitionType.Stop will stop a node that is up. Possible values + include: 'Invalid', 'Start', 'Stop' + :type node_transition_type: str or + ~azure.servicefabric.models.NodeTransitionType + :param node_instance_id: The node instance ID of the target node. + This can be determined through GetNodeInfo API. + :type node_instance_id: str + :param stop_duration_in_seconds: The duration, in seconds, to keep the + node stopped. The minimum value is 600, the maximum is 14400. After + this time expires, the node will automatically come back up. + :type stop_duration_in_seconds: int + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.start_node_transition.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') + query_parameters['NodeTransitionType'] = self._serialize.query("node_transition_type", node_transition_type, 'str') + query_parameters['NodeInstanceId'] = self._serialize.query("node_instance_id", node_instance_id, 'str') + query_parameters['StopDurationInSeconds'] = self._serialize.query("stop_duration_in_seconds", stop_duration_in_seconds, 'int', minimum=0) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start_node_transition.metadata = {'url': '/Faults/Nodes/{nodeName}/$/StartTransition/'} + + def get_node_transition_progress( + self, node_name, operation_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the progress of an operation started using StartNodeTransition. + + Gets the progress of an operation started with StartNodeTransition + using the provided OperationId. + + :param node_name: The name of the node. + :type node_name: str + :param operation_id: A GUID that identifies a call of this API. This + is passed into the corresponding GetProgress API + :type operation_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NodeTransitionProgress or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.NodeTransitionProgress or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_node_transition_progress.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('NodeTransitionProgress', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_node_transition_progress.metadata = {'url': '/Faults/Nodes/{nodeName}/$/GetTransitionProgress'} + + def get_fault_operation_list( + self, type_filter=65535, state_filter=65535, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets a list of user-induced fault operations filtered by provided + input. + + Gets the list of user-induced fault operations filtered by provided + input. + + :param type_filter: Used to filter on OperationType for user-induced + operations. + - 65535 - select all + - 1 - select PartitionDataLoss. + - 2 - select PartitionQuorumLoss. + - 4 - select PartitionRestart. + - 8 - select NodeTransition. + :type type_filter: int + :param state_filter: Used to filter on OperationState's for + user-induced operations. + - 65535 - select All + - 1 - select Running + - 2 - select RollingBack + - 8 - select Completed + - 16 - select Faulted + - 32 - select Cancelled + - 64 - select ForceCancelled + :type state_filter: int + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.OperationStatus] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_fault_operation_list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['TypeFilter'] = self._serialize.query("type_filter", type_filter, 'int') + query_parameters['StateFilter'] = self._serialize.query("state_filter", state_filter, 'int') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[OperationStatus]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_fault_operation_list.metadata = {'url': '/Faults/'} + + def cancel_operation( + self, operation_id, force=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Cancels a user-induced fault operation. + + The following APIs start fault operations that may be cancelled by + using CancelOperation: StartDataLoss, StartQuorumLoss, + StartPartitionRestart, StartNodeTransition. + If force is false, then the specified user-induced operation will be + gracefully stopped and cleaned up. If force is true, the command will + be aborted, and some internal state + may be left behind. Specifying force as true should be used with care. + Calling this API with force set to true is not allowed until this API + has already + been called on the same test command with force set to false first, or + unless the test command already has an OperationState of + OperationState.RollingBack. + Clarification: OperationState.RollingBack means that the system will + be/is cleaning up internal system state caused by executing the + command. It will not restore data if the + test command was to cause data loss. For example, if you call + StartDataLoss then call this API, the system will only clean up + internal state from running the command. + It will not restore the target partition's data, if the command + progressed far enough to cause data loss. + Important note: if this API is invoked with force==true, internal + state may be left behind. + + :param operation_id: A GUID that identifies a call of this API. This + is passed into the corresponding GetProgress API + :type operation_id: str + :param force: Indicates whether to gracefully roll back and clean up + internal system state modified by executing the user-induced + operation. + :type force: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.cancel_operation.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') + query_parameters['Force'] = self._serialize.query("force", force, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + cancel_operation.metadata = {'url': '/Faults/$/Cancel'} + + def create_backup_policy( + self, backup_policy_description, timeout=60, validate_connection=False, custom_headers=None, raw=False, **operation_config): + """Creates a backup policy. + + Creates a backup policy which can be associated later with a Service + Fabric application, service or a partition for periodic backup. + + :param backup_policy_description: Describes the backup policy. + :type backup_policy_description: + ~azure.servicefabric.models.BackupPolicyDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param validate_connection: Specifies whether to validate the storage + connection and credentials before creating or updating the backup + policies. + :type validate_connection: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.create_backup_policy.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if validate_connection is not None: + query_parameters['ValidateConnection'] = self._serialize.query("validate_connection", validate_connection, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + create_backup_policy.metadata = {'url': '/BackupRestore/BackupPolicies/$/Create'} + + def delete_backup_policy( + self, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Deletes the backup policy. + + Deletes an existing backup policy. A backup policy must be created + before it can be deleted. A currently active backup policy, associated + with any Service Fabric application, service or partition, cannot be + deleted without first deleting the mapping. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.delete_backup_policy.metadata['url'] + path_format_arguments = { + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_backup_policy.metadata = {'url': '/BackupRestore/BackupPolicies/{backupPolicyName}/$/Delete'} + + def get_backup_policy_list( + self, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets all the backup policies configured. + + Get a list of all the backup policies configured. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedBackupPolicyDescriptionList or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.PagedBackupPolicyDescriptionList + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_backup_policy_list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedBackupPolicyDescriptionList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_policy_list.metadata = {'url': '/BackupRestore/BackupPolicies'} + + def get_backup_policy_by_name( + self, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets a particular backup policy by name. + + Gets a particular backup policy identified by {backupPolicyName}. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupPolicyDescription or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.BackupPolicyDescription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_backup_policy_by_name.metadata['url'] + path_format_arguments = { + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('BackupPolicyDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backup_policy_by_name.metadata = {'url': '/BackupRestore/BackupPolicies/{backupPolicyName}'} + + def get_all_entities_backed_up_by_policy( + self, backup_policy_name, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the list of backup entities that are associated with this policy. + + Returns a list of Service Fabric application, service or partition + which are associated with this backup policy. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedBackupEntityList or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PagedBackupEntityList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_all_entities_backed_up_by_policy.metadata['url'] + path_format_arguments = { + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedBackupEntityList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_all_entities_backed_up_by_policy.metadata = {'url': '/BackupRestore/BackupPolicies/{backupPolicyName}/$/GetBackupEnabledEntities'} + + def update_backup_policy( + self, backup_policy_description, backup_policy_name, timeout=60, validate_connection=False, custom_headers=None, raw=False, **operation_config): + """Updates the backup policy. + + Updates the backup policy identified by {backupPolicyName}. + + :param backup_policy_description: Describes the backup policy. + :type backup_policy_description: + ~azure.servicefabric.models.BackupPolicyDescription + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param validate_connection: Specifies whether to validate the storage + connection and credentials before creating or updating the backup + policies. + :type validate_connection: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.update_backup_policy.metadata['url'] + path_format_arguments = { + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if validate_connection is not None: + query_parameters['ValidateConnection'] = self._serialize.query("validate_connection", validate_connection, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update_backup_policy.metadata = {'url': '/BackupRestore/BackupPolicies/{backupPolicyName}/$/Update'} + + def enable_application_backup( + self, application_id, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Enables periodic backup of stateful partitions under this Service + Fabric application. + + Enables periodic backup of stateful partitions which are part of this + Service Fabric application. Each partition is backed up individually as + per the specified backup policy description. + Note only C# based Reliable Actor and Reliable Stateful services are + currently supported for periodic backup. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param backup_policy_name: Name of the backup policy to be used for + enabling periodic backups. + :type backup_policy_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + enable_backup_description = models.EnableBackupDescription(backup_policy_name=backup_policy_name) + + api_version = "6.4" + + # Construct URL + url = self.enable_application_backup.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(enable_backup_description, 'EnableBackupDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + enable_application_backup.metadata = {'url': '/Applications/{applicationId}/$/EnableBackup'} + + def disable_application_backup( + self, application_id, clean_backup, timeout=60, custom_headers=None, raw=False, **operation_config): + """Disables periodic backup of Service Fabric application. + + Disables periodic backup of Service Fabric application which was + previously enabled. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param clean_backup: Boolean flag to delete backups. It can be set to + true for deleting all the backups which were created for the backup + entity that is getting disabled for backup. + :type clean_backup: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + disable_backup_description = None + if clean_backup is not None: + disable_backup_description = models.DisableBackupDescription(clean_backup=clean_backup) + + api_version = "6.4" + + # Construct URL + url = self.disable_application_backup.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if disable_backup_description is not None: + body_content = self._serialize.body(disable_backup_description, 'DisableBackupDescription') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_application_backup.metadata = {'url': '/Applications/{applicationId}/$/DisableBackup'} + + def get_application_backup_configuration_info( + self, application_id, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the Service Fabric application backup configuration information. + + Gets the Service Fabric backup configuration information for the + application and the services and partitions under this application. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedBackupConfigurationInfoList or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.PagedBackupConfigurationInfoList + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_application_backup_configuration_info.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedBackupConfigurationInfoList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_application_backup_configuration_info.metadata = {'url': '/Applications/{applicationId}/$/GetBackupConfigurationInfo'} + + def get_application_backup_list( + self, application_id, timeout=60, latest=False, start_date_time_filter=None, end_date_time_filter=None, continuation_token=None, max_results=0, custom_headers=None, raw=False, **operation_config): + """Gets the list of backups available for every partition in this + application. + + Returns a list of backups available for every partition in this Service + Fabric application. The server enumerates all the backups available at + the backup location configured in the backup policy. It also allows + filtering of the result based on start and end datetime or just + fetching the latest available backup for every partition. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param latest: Specifies whether to get only the most recent backup + available for a partition for the specified time range. + :type latest: bool + :param start_date_time_filter: Specify the start date time from which + to enumerate backups, in datetime format. The date time must be + specified in ISO8601 format. This is an optional parameter. If not + specified, all backups from the beginning are enumerated. + :type start_date_time_filter: datetime + :param end_date_time_filter: Specify the end date time till which to + enumerate backups, in datetime format. The date time must be specified + in ISO8601 format. This is an optional parameter. If not specified, + enumeration is done till the most recent backup. + :type end_date_time_filter: datetime + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedBackupInfoList or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PagedBackupInfoList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_application_backup_list.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if latest is not None: + query_parameters['Latest'] = self._serialize.query("latest", latest, 'bool') + if start_date_time_filter is not None: + query_parameters['StartDateTimeFilter'] = self._serialize.query("start_date_time_filter", start_date_time_filter, 'iso-8601') + if end_date_time_filter is not None: + query_parameters['EndDateTimeFilter'] = self._serialize.query("end_date_time_filter", end_date_time_filter, 'iso-8601') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedBackupInfoList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_application_backup_list.metadata = {'url': '/Applications/{applicationId}/$/GetBackups'} + + def suspend_application_backup( + self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Suspends periodic backup for the specified Service Fabric application. + + The application which is configured to take periodic backups, is + suspended for taking further backups till it is resumed again. This + operation applies to the entire application's hierarchy. It means all + the services and partitions under this application are now suspended + for backup. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.suspend_application_backup.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + suspend_application_backup.metadata = {'url': '/Applications/{applicationId}/$/SuspendBackup'} + + def resume_application_backup( + self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Resumes periodic backup of a Service Fabric application which was + previously suspended. + + The previously suspended Service Fabric application resumes taking + periodic backup as per the backup policy currently configured for the + same. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.resume_application_backup.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resume_application_backup.metadata = {'url': '/Applications/{applicationId}/$/ResumeBackup'} + + def enable_service_backup( + self, service_id, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Enables periodic backup of stateful partitions under this Service + Fabric service. + + Enables periodic backup of stateful partitions which are part of this + Service Fabric service. Each partition is backed up individually as per + the specified backup policy description. In case the application, which + the service is part of, is already enabled for backup then this + operation would override the policy being used to take the periodic + backup for this service and its partitions (unless explicitly + overridden at the partition level). + Note only C# based Reliable Actor and Reliable Stateful services are + currently supported for periodic backup. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param backup_policy_name: Name of the backup policy to be used for + enabling periodic backups. + :type backup_policy_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + enable_backup_description = models.EnableBackupDescription(backup_policy_name=backup_policy_name) + + api_version = "6.4" + + # Construct URL + url = self.enable_service_backup.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(enable_backup_description, 'EnableBackupDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + enable_service_backup.metadata = {'url': '/Services/{serviceId}/$/EnableBackup'} + + def disable_service_backup( + self, service_id, clean_backup, timeout=60, custom_headers=None, raw=False, **operation_config): + """Disables periodic backup of Service Fabric service which was previously + enabled. + + Disables periodic backup of Service Fabric service which was previously + enabled. Backup must be explicitly enabled before it can be disabled. + In case the backup is enabled for the Service Fabric application, which + this service is part of, this service would continue to be periodically + backed up as per the policy mapped at the application level. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param clean_backup: Boolean flag to delete backups. It can be set to + true for deleting all the backups which were created for the backup + entity that is getting disabled for backup. + :type clean_backup: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + disable_backup_description = None + if clean_backup is not None: + disable_backup_description = models.DisableBackupDescription(clean_backup=clean_backup) + + api_version = "6.4" + + # Construct URL + url = self.disable_service_backup.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if disable_backup_description is not None: + body_content = self._serialize.body(disable_backup_description, 'DisableBackupDescription') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_service_backup.metadata = {'url': '/Services/{serviceId}/$/DisableBackup'} + + def get_service_backup_configuration_info( + self, service_id, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the Service Fabric service backup configuration information. + + Gets the Service Fabric backup configuration information for the + service and the partitions under this service. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedBackupConfigurationInfoList or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.PagedBackupConfigurationInfoList + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_service_backup_configuration_info.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedBackupConfigurationInfoList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_service_backup_configuration_info.metadata = {'url': '/Services/{serviceId}/$/GetBackupConfigurationInfo'} + + def get_service_backup_list( + self, service_id, timeout=60, latest=False, start_date_time_filter=None, end_date_time_filter=None, continuation_token=None, max_results=0, custom_headers=None, raw=False, **operation_config): + """Gets the list of backups available for every partition in this service. + + Returns a list of backups available for every partition in this Service + Fabric service. The server enumerates all the backups available in the + backup store configured in the backup policy. It also allows filtering + of the result based on start and end datetime or just fetching the + latest available backup for every partition. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param latest: Specifies whether to get only the most recent backup + available for a partition for the specified time range. + :type latest: bool + :param start_date_time_filter: Specify the start date time from which + to enumerate backups, in datetime format. The date time must be + specified in ISO8601 format. This is an optional parameter. If not + specified, all backups from the beginning are enumerated. + :type start_date_time_filter: datetime + :param end_date_time_filter: Specify the end date time till which to + enumerate backups, in datetime format. The date time must be specified + in ISO8601 format. This is an optional parameter. If not specified, + enumeration is done till the most recent backup. + :type end_date_time_filter: datetime + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedBackupInfoList or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PagedBackupInfoList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_service_backup_list.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if latest is not None: + query_parameters['Latest'] = self._serialize.query("latest", latest, 'bool') + if start_date_time_filter is not None: + query_parameters['StartDateTimeFilter'] = self._serialize.query("start_date_time_filter", start_date_time_filter, 'iso-8601') + if end_date_time_filter is not None: + query_parameters['EndDateTimeFilter'] = self._serialize.query("end_date_time_filter", end_date_time_filter, 'iso-8601') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedBackupInfoList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_service_backup_list.metadata = {'url': '/Services/{serviceId}/$/GetBackups'} + + def suspend_service_backup( + self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Suspends periodic backup for the specified Service Fabric service. + + The service which is configured to take periodic backups, is suspended + for taking further backups till it is resumed again. This operation + applies to the entire service's hierarchy. It means all the partitions + under this service are now suspended for backup. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.suspend_service_backup.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + suspend_service_backup.metadata = {'url': '/Services/{serviceId}/$/SuspendBackup'} + + def resume_service_backup( + self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Resumes periodic backup of a Service Fabric service which was + previously suspended. + + The previously suspended Service Fabric service resumes taking periodic + backup as per the backup policy currently configured for the same. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.resume_service_backup.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resume_service_backup.metadata = {'url': '/Services/{serviceId}/$/ResumeBackup'} + + def enable_partition_backup( + self, partition_id, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Enables periodic backup of the stateful persisted partition. + + Enables periodic backup of stateful persisted partition. Each partition + is backed up as per the specified backup policy description. In case + the application or service, which is partition is part of, is already + enabled for backup then this operation would override the policy being + used to take the periodic backup of this partition. + Note only C# based Reliable Actor and Reliable Stateful services are + currently supported for periodic backup. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param backup_policy_name: Name of the backup policy to be used for + enabling periodic backups. + :type backup_policy_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + enable_backup_description = models.EnableBackupDescription(backup_policy_name=backup_policy_name) + + api_version = "6.4" + + # Construct URL + url = self.enable_partition_backup.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(enable_backup_description, 'EnableBackupDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + enable_partition_backup.metadata = {'url': '/Partitions/{partitionId}/$/EnableBackup'} + + def disable_partition_backup( + self, partition_id, clean_backup, timeout=60, custom_headers=None, raw=False, **operation_config): + """Disables periodic backup of Service Fabric partition which was + previously enabled. + + Disables periodic backup of partition which was previously enabled. + Backup must be explicitly enabled before it can be disabled. + In case the backup is enabled for the Service Fabric application or + service, which this partition is part of, this partition would continue + to be periodically backed up as per the policy mapped at the higher + level entity. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param clean_backup: Boolean flag to delete backups. It can be set to + true for deleting all the backups which were created for the backup + entity that is getting disabled for backup. + :type clean_backup: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + disable_backup_description = None + if clean_backup is not None: + disable_backup_description = models.DisableBackupDescription(clean_backup=clean_backup) + + api_version = "6.4" + + # Construct URL + url = self.disable_partition_backup.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if disable_backup_description is not None: + body_content = self._serialize.body(disable_backup_description, 'DisableBackupDescription') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable_partition_backup.metadata = {'url': '/Partitions/{partitionId}/$/DisableBackup'} + + def get_partition_backup_configuration_info( + self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the partition backup configuration information. + + Gets the Service Fabric Backup configuration information for the + specified partition. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PartitionBackupConfigurationInfo or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.PartitionBackupConfigurationInfo + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_partition_backup_configuration_info.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PartitionBackupConfigurationInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_partition_backup_configuration_info.metadata = {'url': '/Partitions/{partitionId}/$/GetBackupConfigurationInfo'} + + def get_partition_backup_list( + self, partition_id, timeout=60, latest=False, start_date_time_filter=None, end_date_time_filter=None, custom_headers=None, raw=False, **operation_config): + """Gets the list of backups available for the specified partition. + + Returns a list of backups available for the specified partition. The + server enumerates all the backups available in the backup store + configured in the backup policy. It also allows filtering of the result + based on start and end datetime or just fetching the latest available + backup for the partition. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param latest: Specifies whether to get only the most recent backup + available for a partition for the specified time range. + :type latest: bool + :param start_date_time_filter: Specify the start date time from which + to enumerate backups, in datetime format. The date time must be + specified in ISO8601 format. This is an optional parameter. If not + specified, all backups from the beginning are enumerated. + :type start_date_time_filter: datetime + :param end_date_time_filter: Specify the end date time till which to + enumerate backups, in datetime format. The date time must be specified + in ISO8601 format. This is an optional parameter. If not specified, + enumeration is done till the most recent backup. + :type end_date_time_filter: datetime + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedBackupInfoList or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PagedBackupInfoList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_partition_backup_list.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if latest is not None: + query_parameters['Latest'] = self._serialize.query("latest", latest, 'bool') + if start_date_time_filter is not None: + query_parameters['StartDateTimeFilter'] = self._serialize.query("start_date_time_filter", start_date_time_filter, 'iso-8601') + if end_date_time_filter is not None: + query_parameters['EndDateTimeFilter'] = self._serialize.query("end_date_time_filter", end_date_time_filter, 'iso-8601') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedBackupInfoList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_partition_backup_list.metadata = {'url': '/Partitions/{partitionId}/$/GetBackups'} + + def suspend_partition_backup( + self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Suspends periodic backup for the specified partition. + + The partition which is configured to take periodic backups, is + suspended for taking further backups till it is resumed again. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.suspend_partition_backup.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + suspend_partition_backup.metadata = {'url': '/Partitions/{partitionId}/$/SuspendBackup'} + + def resume_partition_backup( + self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Resumes periodic backup of partition which was previously suspended. + + The previously suspended partition resumes taking periodic backup as + per the backup policy currently configured for the same. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.resume_partition_backup.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resume_partition_backup.metadata = {'url': '/Partitions/{partitionId}/$/ResumeBackup'} + + def backup_partition( + self, partition_id, backup_timeout=10, timeout=60, backup_storage=None, custom_headers=None, raw=False, **operation_config): + """Triggers backup of the partition's state. + + Creates a backup of the stateful persisted partition's state. In case + the partition is already being periodically backed up, then by default + the new backup is created at the same backup storage. One can also + override the same by specifying the backup storage details as part of + the request body. Once the backup is initiated, its progress can be + tracked using the GetBackupProgress operation. + In case, the operation times out, specify a greater backup timeout + value in the query parameter. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param backup_timeout: Specifies the maximum amount of time, in + minutes, to wait for the backup operation to complete. Post that, the + operation completes with timeout error. However, in certain corner + cases it could be that though the operation returns back timeout, the + backup actually goes through. In case of timeout error, its + recommended to invoke this operation again with a greater timeout + value. The default value for the same is 10 minutes. + :type backup_timeout: int + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param backup_storage: Specifies the details of the backup storage + where to save the backup. + :type backup_storage: + ~azure.servicefabric.models.BackupStorageDescription + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + backup_partition_description = None + if backup_storage is not None: + backup_partition_description = models.BackupPartitionDescription(backup_storage=backup_storage) + + api_version = "6.4" + + # Construct URL + url = self.backup_partition.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if backup_timeout is not None: + query_parameters['BackupTimeout'] = self._serialize.query("backup_timeout", backup_timeout, 'int') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if backup_partition_description is not None: + body_content = self._serialize.body(backup_partition_description, 'BackupPartitionDescription') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + backup_partition.metadata = {'url': '/Partitions/{partitionId}/$/Backup'} + + def get_partition_backup_progress( + self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets details for the latest backup triggered for this partition. + + Returns information about the state of the latest backup along with + details or failure reason in case of completion. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BackupProgressInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.BackupProgressInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_partition_backup_progress.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('BackupProgressInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_partition_backup_progress.metadata = {'url': '/Partitions/{partitionId}/$/GetBackupProgress'} + + def restore_partition( + self, partition_id, restore_partition_description, restore_timeout=10, timeout=60, custom_headers=None, raw=False, **operation_config): + """Triggers restore of the state of the partition using the specified + restore partition description. + + Restores the state of a of the stateful persisted partition using the + specified backup point. In case the partition is already being + periodically backed up, then by default the backup point is looked for + in the storage specified in backup policy. One can also override the + same by specifying the backup storage details as part of the restore + partition description in body. Once the restore is initiated, its + progress can be tracked using the GetRestoreProgress operation. + In case, the operation times out, specify a greater restore timeout + value in the query parameter. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param restore_partition_description: Describes the parameters to + restore the partition. + :type restore_partition_description: + ~azure.servicefabric.models.RestorePartitionDescription + :param restore_timeout: Specifies the maximum amount of time to wait, + in minutes, for the restore operation to complete. Post that, the + operation returns back with timeout error. However, in certain corner + cases it could be that the restore operation goes through even though + it completes with timeout. In case of timeout error, its recommended + to invoke this operation again with a greater timeout value. the + default value for the same is 10 minutes. + :type restore_timeout: int + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.restore_partition.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if restore_timeout is not None: + query_parameters['RestoreTimeout'] = self._serialize.query("restore_timeout", restore_timeout, 'int') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(restore_partition_description, 'RestorePartitionDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restore_partition.metadata = {'url': '/Partitions/{partitionId}/$/Restore'} + + def get_partition_restore_progress( + self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets details for the latest restore operation triggered for this + partition. + + Returns information about the state of the latest restore operation + along with details or failure reason in case of completion. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RestoreProgressInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.RestoreProgressInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_partition_restore_progress.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('RestoreProgressInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_partition_restore_progress.metadata = {'url': '/Partitions/{partitionId}/$/GetRestoreProgress'} + + def get_backups_from_backup_location( + self, get_backup_by_storage_query_description, timeout=60, continuation_token=None, max_results=0, custom_headers=None, raw=False, **operation_config): + """Gets the list of backups available for the specified backed up entity + at the specified backup location. + + Gets the list of backups available for the specified backed up entity + (Application, Service or Partition) at the specified backup location + (FileShare or Azure Blob Storage). + + :param get_backup_by_storage_query_description: Describes the filters + and backup storage details to be used for enumerating backups. + :type get_backup_by_storage_query_description: + ~azure.servicefabric.models.GetBackupByStorageQueryDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedBackupInfoList or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PagedBackupInfoList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_backups_from_backup_location.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(get_backup_by_storage_query_description, 'GetBackupByStorageQueryDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = 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('PagedBackupInfoList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_backups_from_backup_location.metadata = {'url': '/BackupRestore/$/GetBackups'} + + def create_name( + self, name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Creates a Service Fabric name. + + Creates the specified Service Fabric name. + + :param name: The Service Fabric name, including the 'fabric:' URI + scheme. + :type name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + name_description = models.NameDescription(name=name) + + api_version = "6.0" + + # Construct URL + url = self.create_name.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(name_description, 'NameDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + create_name.metadata = {'url': '/Names/$/Create'} + + def get_name_exists_info( + self, name_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Returns whether the Service Fabric name exists. + + Returns whether the specified Service Fabric name exists. + + :param name_id: The Service Fabric name, without the 'fabric:' URI + scheme. + :type name_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_name_exists_info.metadata['url'] + path_format_arguments = { + 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + get_name_exists_info.metadata = {'url': '/Names/{nameId}'} + + def delete_name( + self, name_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Deletes a Service Fabric name. + + Deletes the specified Service Fabric name. A name must be created + before it can be deleted. Deleting a name with child properties will + fail. + + :param name_id: The Service Fabric name, without the 'fabric:' URI + scheme. + :type name_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.delete_name.metadata['url'] + path_format_arguments = { + 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_name.metadata = {'url': '/Names/{nameId}'} + + def get_sub_name_info_list( + self, name_id, recursive=False, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Enumerates all the Service Fabric names under a given name. + + Enumerates all the Service Fabric names under a given name. If the + subnames do not fit in a page, one page of results is returned as well + as a continuation token, which can be used to get the next page. + Querying a name that doesn't exist will fail. + + :param name_id: The Service Fabric name, without the 'fabric:' URI + scheme. + :type name_id: str + :param recursive: Allows specifying that the search performed should + be recursive. + :type recursive: bool + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedSubNameInfoList or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PagedSubNameInfoList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_sub_name_info_list.metadata['url'] + path_format_arguments = { + 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if recursive is not None: + query_parameters['Recursive'] = self._serialize.query("recursive", recursive, 'bool') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedSubNameInfoList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_sub_name_info_list.metadata = {'url': '/Names/{nameId}/$/GetSubNames'} + + def get_property_info_list( + self, name_id, include_values=False, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets information on all Service Fabric properties under a given name. + + A Service Fabric name can have one or more named properties that store + custom information. This operation gets the information about these + properties in a paged list. The information includes name, value, and + metadata about each of the properties. + + :param name_id: The Service Fabric name, without the 'fabric:' URI + scheme. + :type name_id: str + :param include_values: Allows specifying whether to include the values + of the properties returned. True if values should be returned with the + metadata; False to return only property metadata. + :type include_values: bool + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PagedPropertyInfoList or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PagedPropertyInfoList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_property_info_list.metadata['url'] + path_format_arguments = { + 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if include_values is not None: + query_parameters['IncludeValues'] = self._serialize.query("include_values", include_values, 'bool') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PagedPropertyInfoList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_property_info_list.metadata = {'url': '/Names/{nameId}/$/GetProperties'} + + def put_property( + self, name_id, property_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Creates or updates a Service Fabric property. + + Creates or updates the specified Service Fabric property under a given + name. + + :param name_id: The Service Fabric name, without the 'fabric:' URI + scheme. + :type name_id: str + :param property_description: Describes the Service Fabric property to + be created. + :type property_description: + ~azure.servicefabric.models.PropertyDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.put_property.metadata['url'] + path_format_arguments = { + 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(property_description, 'PropertyDescription') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + put_property.metadata = {'url': '/Names/{nameId}/$/GetProperty'} + + def get_property_info( + self, name_id, property_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets the specified Service Fabric property. + + Gets the specified Service Fabric property under a given name. This + will always return both value and metadata. + + :param name_id: The Service Fabric name, without the 'fabric:' URI + scheme. + :type name_id: str + :param property_name: Specifies the name of the property to get. + :type property_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PropertyInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PropertyInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.get_property_info.metadata['url'] + path_format_arguments = { + 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['PropertyName'] = self._serialize.query("property_name", property_name, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('PropertyInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_property_info.metadata = {'url': '/Names/{nameId}/$/GetProperty'} + + def delete_property( + self, name_id, property_name, timeout=60, custom_headers=None, raw=False, **operation_config): + """Deletes the specified Service Fabric property. + + Deletes the specified Service Fabric property under a given name. A + property must be created before it can be deleted. + + :param name_id: The Service Fabric name, without the 'fabric:' URI + scheme. + :type name_id: str + :param property_name: Specifies the name of the property to get. + :type property_name: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.0" + + # Construct URL + url = self.delete_property.metadata['url'] + path_format_arguments = { + 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['PropertyName'] = self._serialize.query("property_name", property_name, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_property.metadata = {'url': '/Names/{nameId}/$/GetProperty'} + + def submit_property_batch( + self, name_id, timeout=60, operations=None, custom_headers=None, raw=False, **operation_config): + """Submits a property batch. + + Submits a batch of property operations. Either all or none of the + operations will be committed. + + :param name_id: The Service Fabric name, without the 'fabric:' URI + scheme. + :type name_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param operations: A list of the property batch operations to be + executed. + :type operations: + list[~azure.servicefabric.models.PropertyBatchOperation] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PropertyBatchInfo or ClientRawResponse if raw=true + :rtype: ~azure.servicefabric.models.PropertyBatchInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + property_batch_description_list = models.PropertyBatchDescriptionList(operations=operations) + + api_version = "6.0" + + # Construct URL + url = self.submit_property_batch.metadata['url'] + path_format_arguments = { + 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(property_batch_description_list, 'PropertyBatchDescriptionList') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 409]: + raise models.FabricErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SuccessfulPropertyBatchInfo', response) + if response.status_code == 409: + deserialized = self._deserialize('FailedPropertyBatchInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + submit_property_batch.metadata = {'url': '/Names/{nameId}/$/GetProperties/$/SubmitBatch'} + + def get_cluster_event_list( + self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + """Gets all Cluster-related events. + + The response is list of ClusterEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param events_types_filter: This is a comma separated string + specifying the types of FabricEvents that should only be included in + the response. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of + AnalysisEvents if true is passed. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of + CorrelatedEvents information if true is passed. otherwise the + CorrelationEvents get processed and HasCorrelatedEvents field in every + FabricEvent gets populated. + :type skip_correlation_lookup: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.ClusterEvent] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_cluster_event_list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') + query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[ClusterEvent]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_cluster_event_list.metadata = {'url': '/EventsStore/Cluster/Events'} + + def get_containers_event_list( + self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + """Gets all Containers-related events. + + The response is list of ContainerInstanceEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param events_types_filter: This is a comma separated string + specifying the types of FabricEvents that should only be included in + the response. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of + AnalysisEvents if true is passed. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of + CorrelatedEvents information if true is passed. otherwise the + CorrelationEvents get processed and HasCorrelatedEvents field in every + FabricEvent gets populated. + :type skip_correlation_lookup: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.ContainerInstanceEvent] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.2-preview" + + # Construct URL + url = self.get_containers_event_list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') + query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[ContainerInstanceEvent]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_containers_event_list.metadata = {'url': '/EventsStore/Containers/Events'} + + def get_node_event_list( + self, node_name, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + """Gets a Node-related events. + + The response is list of NodeEvent objects. + + :param node_name: The name of the node. + :type node_name: str + :param start_time_utc: The start time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param events_types_filter: This is a comma separated string + specifying the types of FabricEvents that should only be included in + the response. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of + AnalysisEvents if true is passed. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of + CorrelatedEvents information if true is passed. otherwise the + CorrelationEvents get processed and HasCorrelatedEvents field in every + FabricEvent gets populated. + :type skip_correlation_lookup: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.NodeEvent] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_node_event_list.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') + query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[NodeEvent]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_node_event_list.metadata = {'url': '/EventsStore/Nodes/{nodeName}/$/Events'} + + def get_nodes_event_list( + self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + """Gets all Nodes-related Events. + + The response is list of NodeEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param events_types_filter: This is a comma separated string + specifying the types of FabricEvents that should only be included in + the response. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of + AnalysisEvents if true is passed. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of + CorrelatedEvents information if true is passed. otherwise the + CorrelationEvents get processed and HasCorrelatedEvents field in every + FabricEvent gets populated. + :type skip_correlation_lookup: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.NodeEvent] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_nodes_event_list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') + query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[NodeEvent]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_nodes_event_list.metadata = {'url': '/EventsStore/Nodes/Events'} + + def get_application_event_list( + self, application_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + """Gets an Application-related events. + + The response is list of ApplicationEvent objects. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param events_types_filter: This is a comma separated string + specifying the types of FabricEvents that should only be included in + the response. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of + AnalysisEvents if true is passed. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of + CorrelatedEvents information if true is passed. otherwise the + CorrelationEvents get processed and HasCorrelatedEvents field in every + FabricEvent gets populated. + :type skip_correlation_lookup: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.ApplicationEvent] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_application_event_list.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') + query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[ApplicationEvent]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_application_event_list.metadata = {'url': '/EventsStore/Applications/{applicationId}/$/Events'} + + def get_applications_event_list( + self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + """Gets all Applications-related events. + + The response is list of ApplicationEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param events_types_filter: This is a comma separated string + specifying the types of FabricEvents that should only be included in + the response. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of + AnalysisEvents if true is passed. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of + CorrelatedEvents information if true is passed. otherwise the + CorrelationEvents get processed and HasCorrelatedEvents field in every + FabricEvent gets populated. + :type skip_correlation_lookup: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.ApplicationEvent] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_applications_event_list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') + query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[ApplicationEvent]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_applications_event_list.metadata = {'url': '/EventsStore/Applications/Events'} + + def get_service_event_list( + self, service_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + """Gets a Service-related events. + + The response is list of ServiceEvent objects. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param events_types_filter: This is a comma separated string + specifying the types of FabricEvents that should only be included in + the response. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of + AnalysisEvents if true is passed. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of + CorrelatedEvents information if true is passed. otherwise the + CorrelationEvents get processed and HasCorrelatedEvents field in every + FabricEvent gets populated. + :type skip_correlation_lookup: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.ServiceEvent] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_service_event_list.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') + query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[ServiceEvent]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_service_event_list.metadata = {'url': '/EventsStore/Services/{serviceId}/$/Events'} + + def get_services_event_list( + self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + """Gets all Services-related events. + + The response is list of ServiceEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param events_types_filter: This is a comma separated string + specifying the types of FabricEvents that should only be included in + the response. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of + AnalysisEvents if true is passed. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of + CorrelatedEvents information if true is passed. otherwise the + CorrelationEvents get processed and HasCorrelatedEvents field in every + FabricEvent gets populated. + :type skip_correlation_lookup: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.ServiceEvent] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_services_event_list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') + query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[ServiceEvent]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_services_event_list.metadata = {'url': '/EventsStore/Services/Events'} + + def get_partition_event_list( + self, partition_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + """Gets a Partition-related events. + + The response is list of PartitionEvent objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param events_types_filter: This is a comma separated string + specifying the types of FabricEvents that should only be included in + the response. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of + AnalysisEvents if true is passed. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of + CorrelatedEvents information if true is passed. otherwise the + CorrelationEvents get processed and HasCorrelatedEvents field in every + FabricEvent gets populated. + :type skip_correlation_lookup: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.PartitionEvent] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_partition_event_list.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') + query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[PartitionEvent]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_partition_event_list.metadata = {'url': '/EventsStore/Partitions/{partitionId}/$/Events'} + + def get_partitions_event_list( + self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + """Gets all Partitions-related events. + + The response is list of PartitionEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param events_types_filter: This is a comma separated string + specifying the types of FabricEvents that should only be included in + the response. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of + AnalysisEvents if true is passed. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of + CorrelatedEvents information if true is passed. otherwise the + CorrelationEvents get processed and HasCorrelatedEvents field in every + FabricEvent gets populated. + :type skip_correlation_lookup: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.PartitionEvent] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_partitions_event_list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') + query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[PartitionEvent]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_partitions_event_list.metadata = {'url': '/EventsStore/Partitions/Events'} + + def get_partition_replica_event_list( + self, partition_id, replica_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + """Gets a Partition Replica-related events. + + The response is list of ReplicaEvent objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param events_types_filter: This is a comma separated string + specifying the types of FabricEvents that should only be included in + the response. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of + AnalysisEvents if true is passed. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of + CorrelatedEvents information if true is passed. otherwise the + CorrelationEvents get processed and HasCorrelatedEvents field in every + FabricEvent gets populated. + :type skip_correlation_lookup: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.ReplicaEvent] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_partition_replica_event_list.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), + 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') + query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[ReplicaEvent]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_partition_replica_event_list.metadata = {'url': '/EventsStore/Partitions/{partitionId}/$/Replicas/{replicaId}/$/Events'} + + def get_partition_replicas_event_list( + self, partition_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): + """Gets all Replicas-related events for a Partition. + + The response is list of ReplicaEvent objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC + yyyy-MM-ddTHH:mm:ssZ. + :type end_time_utc: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param events_types_filter: This is a comma separated string + specifying the types of FabricEvents that should only be included in + the response. + :type events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of + AnalysisEvents if true is passed. + :type exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of + CorrelatedEvents information if true is passed. otherwise the + CorrelationEvents get processed and HasCorrelatedEvents field in every + FabricEvent gets populated. + :type skip_correlation_lookup: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.ReplicaEvent] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_partition_replicas_event_list.metadata['url'] + path_format_arguments = { + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') + query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[ReplicaEvent]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_partition_replicas_event_list.metadata = {'url': '/EventsStore/Partitions/{partitionId}/$/Replicas/Events'} + + def get_correlated_event_list( + self, event_instance_id, timeout=60, custom_headers=None, raw=False, **operation_config): + """Gets all correlated events for a given event. + + The response is list of FabricEvents. + + :param event_instance_id: The EventInstanceId. + :type event_instance_id: str + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.servicefabric.models.FabricEvent] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "6.4" + + # Construct URL + url = self.get_correlated_event_list.metadata['url'] + path_format_arguments = { + 'eventInstanceId': self._serialize.url("event_instance_id", event_instance_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = 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('[FabricEvent]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_correlated_event_list.metadata = {'url': '/EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events'} diff --git a/customSDK/servicefabric/version.py b/customSDK/servicefabric/version.py new file mode 100644 index 00000000..5a1c1edc --- /dev/null +++ b/customSDK/servicefabric/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "8.2.0.46" + From c49098c6f023f957ca942820870d557984e523fa Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Tue, 5 Apr 2022 14:56:30 -0700 Subject: [PATCH 03/20] added unreleased line. --- src/README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/README.rst b/src/README.rst index a6e7ce53..66fafe72 100644 --- a/src/README.rst +++ b/src/README.rst @@ -16,6 +16,9 @@ To get started, after installation run the following: Change Log ========== +Unreleased +--------- + 11.1.0 ---------- - Added get top/least loaded partitions command. It will be available in the Service fabric runtime 8.0 version. From 3e7b11f96a230bc440b7c5d469321bcbe5895503 Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Wed, 6 Apr 2022 11:13:22 -0700 Subject: [PATCH 04/20] proper library --- src/setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/setup.py b/src/setup.py index 6aad0be3..f7510174 100644 --- a/src/setup.py +++ b/src/setup.py @@ -48,6 +48,7 @@ def read(fname): 'msrestazure', 'requests', 'azure-servicefabric==8.0.0.0', + 'azure-mgmt-core', 'adal', 'future', 'applicationinsights', From adc79062e22f9825cf747ac2f445b7e055f6fa24 Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Tue, 12 Apr 2022 16:48:40 -0700 Subject: [PATCH 05/20] starting to grab the right config. --- src/sfctl/apiclient.py | 23 +++++++++++------------ src/sfctl/auth.py | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/src/sfctl/apiclient.py b/src/sfctl/apiclient.py index 0eecdb10..579e348c 100644 --- a/src/sfctl/apiclient.py +++ b/src/sfctl/apiclient.py @@ -8,11 +8,17 @@ from knack.util import CLIError from azure.servicefabric import ServiceFabricClientAPIs +from azure.core.credentials import TokenCredential from sfctl.auth import (ClientCertAuthentication, AdalAuthentication) from sfctl.config import (security_type, ca_cert_info, cert_info, client_endpoint, no_verify_setting) +class dummmy_protocol(TokenCredential): + def __init__(self): + self + + def create(_): """Create a client for Service Fabric APIs.""" @@ -30,19 +36,12 @@ def create(_): if security_type() == 'aad': auth = AdalAuthentication(no_verify) else: - cert = cert_info() ca_cert = ca_cert_info() - auth = ClientCertAuthentication(cert, ca_cert, no_verify) - - client = ServiceFabricClientAPIs(auth, base_url=endpoint) - - # client.config.retry_policy has type msrest.pipeline.ClientRetryPolicy - client.config.retry_policy.total = False - client.config.retry_policy.policy.total = False + if ca_cert is not None: + no_verify = ca_cert + + dummy_credential = dummmy_protocol() - # msrest defines ClientRetryPolicy in pipline.py. - # ClientRetryPolicy.__init__ defines values for status_forcelist - # which is passed to urllib3.util.retry.Retry - client.config.retry_policy.policy.status_forcelist = None + client = ServiceFabricClientAPIs(dummy_credential, base_url=endpoint, retry_total=0, connection_verify=no_verify, connection_cert=cert_info()) return client diff --git a/src/sfctl/auth.py b/src/sfctl/auth.py index 46924e43..867e2b13 100644 --- a/src/sfctl/auth.py +++ b/src/sfctl/auth.py @@ -70,3 +70,35 @@ def signed_session(self, session=None): header = "{} {}".format("Bearer", new_token['accessToken']) session.headers['Authorization'] = header return session + +class AdalAuthentication2(): + """Azure Active Directory authentication for Service Fabric clusters""" + + # def __init__(self, no_verify=False): + # self.no_verify = no_verify + + def get_header(self): + """Create requests session with AAD auth headers + + :rtype: requests.Session. + """ + + from sfctl.config import (aad_metadata, aad_cache) + + if session: + session = super(AdalAuthentication, self).signed_session(session) + else: + session = super(AdalAuthentication, self).signed_session() + + if self.no_verify: + session.verify = False + + authority_uri, cluster_id, client_id = aad_metadata() + existing_token, existing_cache = aad_cache() + context = adal.AuthenticationContext(authority_uri, + cache=existing_cache) + new_token = context.acquire_token(cluster_id, + existing_token['userId'], client_id) + header = "{} {}".format("Bearer", new_token['accessToken']) + # session.headers['Authorization'] = header + return header \ No newline at end of file From 7748224100adfc069c898a52ca909adbb0a585e6 Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Mon, 18 Apr 2022 13:23:39 -0700 Subject: [PATCH 06/20] swap out the sdk --- customSDK/servicefabric/_configuration.py | 4 +- customSDK/servicefabric/_patch.py | 27 +- .../_service_fabric_client_apis.py | 2 +- customSDK/servicefabric/aio/_configuration.py | 4 +- .../aio/_service_fabric_client_apis.py | 2 +- .../_mesh_application_operations.py | 10 +- .../_mesh_code_package_operations.py | 2 +- .../operations/_mesh_gateway_operations.py | 8 +- .../operations/_mesh_network_operations.py | 8 +- .../aio/operations/_mesh_secret_operations.py | 8 +- .../_mesh_secret_value_operations.py | 10 +- .../operations/_mesh_service_operations.py | 4 +- .../_mesh_service_replica_operations.py | 4 +- .../aio/operations/_mesh_volume_operations.py | 8 +- .../_service_fabric_client_apis_operations.py | 436 +- .../servicefabric/models/aad_metadata.py | 48 - .../models/aad_metadata_object.py | 34 - .../models/aad_metadata_object_py3.py | 34 - .../servicefabric/models/aad_metadata_py3.py | 48 - ...ental_named_partition_scaling_mechanism.py | 53 - ...l_named_partition_scaling_mechanism_py3.py | 53 - .../add_remove_replica_scaling_mechanism.py | 53 - ...dd_remove_replica_scaling_mechanism_py3.py | 53 - .../models/analysis_event_metadata.py | 32 - .../models/analysis_event_metadata_py3.py | 32 - .../application_backup_configuration_info.py | 54 - ...plication_backup_configuration_info_py3.py | 54 - .../models/application_backup_entity.py | 39 - .../models/application_backup_entity_py3.py | 39 - .../application_capacity_description.py | 58 - .../application_capacity_description_py3.py | 58 - ...ication_container_instance_exited_event.py | 122 - ...ion_container_instance_exited_event_py3.py | 122 - .../models/application_created_event.py | 75 - .../models/application_created_event_py3.py | 75 - .../models/application_deleted_event.py | 70 - .../models/application_deleted_event_py3.py | 70 - .../models/application_description.py | 71 - .../models/application_description_py3.py | 71 - .../servicefabric/models/application_event.py | 78 - .../models/application_event_py3.py | 78 - .../models/application_health.py | 64 - .../models/application_health_evaluation.py | 60 - .../application_health_evaluation_py3.py | 60 - .../models/application_health_policies.py | 32 - .../models/application_health_policies_py3.py | 32 - .../models/application_health_policy.py | 56 - .../application_health_policy_map_item.py | 41 - .../application_health_policy_map_item_py3.py | 41 - .../application_health_policy_map_object.py | 38 - ...pplication_health_policy_map_object_py3.py | 38 - .../models/application_health_policy_py3.py | 56 - .../models/application_health_py3.py | 64 - ...application_health_report_expired_event.py | 106 - ...ication_health_report_expired_event_py3.py | 106 - .../models/application_health_state.py | 37 - .../models/application_health_state_chunk.py | 56 - .../application_health_state_chunk_list.py | 35 - ...application_health_state_chunk_list_py3.py | 35 - .../application_health_state_chunk_py3.py | 56 - .../models/application_health_state_filter.py | 109 - .../application_health_state_filter_py3.py | 109 - .../models/application_health_state_py3.py | 37 - .../servicefabric/models/application_info.py | 78 - .../models/application_info_py3.py | 78 - .../models/application_load_info.py | 64 - .../models/application_load_info_py3.py | 64 - .../application_load_metric_information.py | 50 - ...application_load_metric_information_py3.py | 50 - .../models/application_metric_description.py | 70 - .../application_metric_description_py3.py | 70 - .../models/application_name_info.py | 39 - .../models/application_name_info_py3.py | 39 - .../application_new_health_report_event.py | 106 - ...application_new_health_report_event_py3.py | 106 - .../models/application_parameter.py | 40 - .../models/application_parameter_py3.py | 40 - .../application_process_exited_event.py | 122 - .../application_process_exited_event_py3.py | 122 - .../application_resource_description.py | 93 - .../application_resource_description_py3.py | 93 - ...lication_resource_upgrade_progress_info.py | 91 - ...tion_resource_upgrade_progress_info_py3.py | 91 - .../models/application_scoped_volume.py | 49 - ...ation_scoped_volume_creation_parameters.py | 46 - ...n_scoped_volume_creation_parameters_py3.py | 46 - ...n_parameters_service_fabric_volume_disk.py | 44 - ...rameters_service_fabric_volume_disk_py3.py | 44 - .../models/application_scoped_volume_py3.py | 49 - ...ion_type_applications_health_evaluation.py | 74 - ...type_applications_health_evaluation_py3.py | 74 - ...application_type_health_policy_map_item.py | 43 - ...ication_type_health_policy_map_item_py3.py | 43 - .../application_type_image_store_path.py | 36 - .../application_type_image_store_path_py3.py | 36 - .../models/application_type_info.py | 58 - .../models/application_type_info_py3.py | 58 - .../models/application_type_manifest.py | 29 - .../models/application_type_manifest_py3.py | 29 - .../models/application_update_description.py | 79 - .../application_update_description_py3.py | 79 - .../application_upgrade_completed_event.py | 76 - ...application_upgrade_completed_event_py3.py | 76 - .../models/application_upgrade_description.py | 125 - .../application_upgrade_description_py3.py | 125 - ...lication_upgrade_domain_completed_event.py | 93 - ...tion_upgrade_domain_completed_event_py3.py | 93 - .../application_upgrade_progress_info.py | 142 - .../application_upgrade_progress_info_py3.py | 142 - ...cation_upgrade_rollback_completed_event.py | 81 - ...on_upgrade_rollback_completed_event_py3.py | 81 - ...lication_upgrade_rollback_started_event.py | 88 - ...tion_upgrade_rollback_started_event_py3.py | 88 - .../application_upgrade_started_event.py | 92 - .../application_upgrade_started_event_py3.py | 92 - .../application_upgrade_update_description.py | 54 - ...lication_upgrade_update_description_py3.py | 54 - .../models/applications_health_evaluation.py | 63 - .../applications_health_evaluation_py3.py | 63 - .../models/auto_scaling_mechanism.py | 42 - .../models/auto_scaling_mechanism_py3.py | 42 - .../models/auto_scaling_metric.py | 42 - .../models/auto_scaling_metric_py3.py | 42 - .../models/auto_scaling_policy.py | 46 - .../models/auto_scaling_policy_py3.py | 46 - .../models/auto_scaling_resource_metric.py | 41 - .../auto_scaling_resource_metric_py3.py | 41 - .../models/auto_scaling_trigger.py | 41 - .../models/auto_scaling_trigger_py3.py | 41 - .../models/average_load_scaling_trigger.py | 58 - .../average_load_scaling_trigger_py3.py | 58 - .../average_partition_load_scaling_trigger.py | 59 - ...rage_partition_load_scaling_trigger_py3.py | 59 - .../average_service_load_scaling_trigger.py | 69 - ...verage_service_load_scaling_trigger_py3.py | 69 - .../azure_blob_backup_storage_description.py | 50 - ...ure_blob_backup_storage_description_py3.py | 50 - ...al_monitoring_pipeline_sink_description.py | 63 - ...onitoring_pipeline_sink_description_py3.py | 63 - .../models/backup_configuration_info.py | 58 - .../models/backup_configuration_info_py3.py | 58 - .../servicefabric/models/backup_entity.py | 42 - .../servicefabric/models/backup_entity_py3.py | 42 - customSDK/servicefabric/models/backup_info.py | 83 - .../servicefabric/models/backup_info_py3.py | 83 - .../models/backup_partition_description.py | 29 - .../backup_partition_description_py3.py | 29 - .../models/backup_policy_description.py | 69 - .../models/backup_policy_description_py3.py | 69 - .../models/backup_progress_info.py | 59 - .../models/backup_progress_info_py3.py | 59 - .../models/backup_schedule_description.py | 42 - .../models/backup_schedule_description_py3.py | 42 - .../models/backup_storage_description.py | 47 - .../models/backup_storage_description_py3.py | 47 - .../models/backup_suspension_info.py | 36 - .../models/backup_suspension_info_py3.py | 36 - .../basic_retention_policy_description.py | 49 - .../basic_retention_policy_description_py3.py | 49 - .../models/binary_property_value.py | 40 - .../models/binary_property_value_py3.py | 40 - customSDK/servicefabric/models/chaos.py | 40 - ...os_code_package_restart_scheduled_event.py | 91 - ...ode_package_restart_scheduled_event_py3.py | 91 - .../servicefabric/models/chaos_context.py | 34 - .../servicefabric/models/chaos_context_py3.py | 34 - customSDK/servicefabric/models/chaos_event.py | 49 - .../servicefabric/models/chaos_event_py3.py | 49 - .../models/chaos_event_wrapper.py | 28 - .../models/chaos_event_wrapper_py3.py | 28 - .../models/chaos_events_segment.py | 38 - .../models/chaos_events_segment_py3.py | 38 - .../chaos_node_restart_scheduled_event.py | 69 - .../chaos_node_restart_scheduled_event_py3.py | 69 - .../servicefabric/models/chaos_parameters.py | 107 - .../chaos_parameters_dictionary_item.py | 41 - .../chaos_parameters_dictionary_item_py3.py | 41 - .../models/chaos_parameters_py3.py | 107 - ..._partition_primary_move_scheduled_event.py | 83 - ...tition_primary_move_scheduled_event_py3.py | 83 - ...artition_secondary_move_scheduled_event.py | 88 - ...tion_secondary_move_scheduled_event_py3.py | 88 - customSDK/servicefabric/models/chaos_py3.py | 40 - .../chaos_replica_removal_scheduled_event.py | 83 - ...aos_replica_removal_scheduled_event_py3.py | 83 - .../chaos_replica_restart_scheduled_event.py | 83 - ...aos_replica_restart_scheduled_event_py3.py | 83 - .../servicefabric/models/chaos_schedule.py | 45 - .../models/chaos_schedule_description.py | 37 - .../models/chaos_schedule_description_py3.py | 37 - .../models/chaos_schedule_job.py | 40 - .../chaos_schedule_job_active_days_of_week.py | 59 - ...os_schedule_job_active_days_of_week_py3.py | 59 - .../models/chaos_schedule_job_py3.py | 40 - .../models/chaos_schedule_py3.py | 45 - .../models/chaos_started_event.py | 105 - .../models/chaos_started_event_py3.py | 105 - .../models/chaos_stopped_event.py | 55 - .../models/chaos_stopped_event_py3.py | 55 - .../models/chaos_target_filter.py | 78 - .../models/chaos_target_filter_py3.py | 78 - .../check_exists_property_batch_operation.py | 51 - ...eck_exists_property_batch_operation_py3.py | 51 - ...check_sequence_property_batch_operation.py | 52 - ...k_sequence_property_batch_operation_py3.py | 52 - .../check_value_property_batch_operation.py | 48 - ...heck_value_property_batch_operation_py3.py | 48 - .../models/cluster_configuration.py | 29 - .../models/cluster_configuration_py3.py | 29 - ...uster_configuration_upgrade_description.py | 98 - ...r_configuration_upgrade_description_py3.py | 98 - ...uster_configuration_upgrade_status_info.py | 43 - ...r_configuration_upgrade_status_info_py3.py | 43 - .../servicefabric/models/cluster_event.py | 61 - .../servicefabric/models/cluster_event_py3.py | 61 - .../servicefabric/models/cluster_health.py | 60 - .../models/cluster_health_chunk.py | 50 - .../models/cluster_health_chunk_py3.py | 50 - .../cluster_health_chunk_query_description.py | 65 - ...ster_health_chunk_query_description_py3.py | 65 - .../models/cluster_health_policies.py | 43 - .../models/cluster_health_policies_py3.py | 43 - .../models/cluster_health_policy.py | 129 - .../models/cluster_health_policy_py3.py | 129 - .../models/cluster_health_py3.py | 60 - .../cluster_health_report_expired_event.py | 91 - ...cluster_health_report_expired_event_py3.py | 91 - .../servicefabric/models/cluster_load_info.py | 41 - .../models/cluster_load_info_py3.py | 41 - .../servicefabric/models/cluster_manifest.py | 28 - .../models/cluster_manifest_py3.py | 28 - .../models/cluster_new_health_report_event.py | 91 - .../cluster_new_health_report_event_py3.py | 91 - .../models/cluster_upgrade_completed_event.py | 61 - .../cluster_upgrade_completed_event_py3.py | 61 - .../cluster_upgrade_description_object.py | 100 - .../cluster_upgrade_description_object_py3.py | 100 - .../cluster_upgrade_domain_completed_event.py | 71 - ...ster_upgrade_domain_completed_event_py3.py | 71 - .../cluster_upgrade_health_policy_object.py | 51 - ...luster_upgrade_health_policy_object_py3.py | 51 - .../models/cluster_upgrade_progress_object.py | 123 - .../cluster_upgrade_progress_object_py3.py | 123 - ...luster_upgrade_rollback_completed_event.py | 66 - ...er_upgrade_rollback_completed_event_py3.py | 66 - .../cluster_upgrade_rollback_started_event.py | 66 - ...ster_upgrade_rollback_started_event_py3.py | 66 - .../models/cluster_upgrade_started_event.py | 75 - .../cluster_upgrade_started_event_py3.py | 75 - .../servicefabric/models/cluster_version.py | 28 - .../models/cluster_version_py3.py | 28 - .../models/code_package_entry_point.py | 63 - .../models/code_package_entry_point_py3.py | 63 - .../code_package_entry_point_statistics.py | 77 - ...code_package_entry_point_statistics_py3.py | 77 - .../models/compose_deployment_status_info.py | 44 - .../compose_deployment_status_info_py3.py | 44 - .../compose_deployment_upgrade_description.py | 88 - ...pose_deployment_upgrade_description_py3.py | 88 - ...ompose_deployment_upgrade_progress_info.py | 149 - ...se_deployment_upgrade_progress_info_py3.py | 149 - .../models/config_parameter_override.py | 55 - .../models/config_parameter_override_py3.py | 55 - .../models/container_api_request_body.py | 47 - .../models/container_api_request_body_py3.py | 47 - .../models/container_api_response.py | 34 - .../models/container_api_response_py3.py | 34 - .../models/container_api_result.py | 47 - .../models/container_api_result_py3.py | 47 - .../container_code_package_properties.py | 118 - .../container_code_package_properties_py3.py | 118 - .../servicefabric/models/container_event.py | 48 - .../models/container_event_py3.py | 48 - .../models/container_instance_event.py | 50 - .../models/container_instance_event_py3.py | 50 - .../models/container_instance_view.py | 41 - .../models/container_instance_view_py3.py | 41 - .../servicefabric/models/container_label.py | 39 - .../models/container_label_py3.py | 39 - .../servicefabric/models/container_logs.py | 28 - .../models/container_logs_py3.py | 28 - .../servicefabric/models/container_state.py | 44 - .../models/container_state_py3.py | 44 - .../create_compose_deployment_description.py | 45 - ...eate_compose_deployment_description_py3.py | 45 - .../current_upgrade_domain_progress_info.py | 35 - ...urrent_upgrade_domain_progress_info_py3.py | 35 - .../current_upgrade_units_progress_info.py | 35 - ...current_upgrade_units_progress_info_py3.py | 35 - .../models/deactivation_intent_description.py | 31 - .../deactivation_intent_description_py3.py | 31 - .../models/default_execution_policy.py | 34 - .../models/default_execution_policy_py3.py | 34 - .../models/delete_property_batch_operation.py | 41 - .../delete_property_batch_operation_py3.py | 41 - .../delta_nodes_check_health_evaluation.py | 75 - ...delta_nodes_check_health_evaluation_py3.py | 75 - ...loy_service_package_to_node_description.py | 58 - ...service_package_to_node_description_py3.py | 58 - .../models/deployed_application_health.py | 62 - .../deployed_application_health_evaluation.py | 64 - ...loyed_application_health_evaluation_py3.py | 64 - .../models/deployed_application_health_py3.py | 62 - ...application_health_report_expired_event.py | 111 - ...ication_health_report_expired_event_py3.py | 111 - .../deployed_application_health_state.py | 42 - ...deployed_application_health_state_chunk.py | 43 - ...yed_application_health_state_chunk_list.py | 32 - ...application_health_state_chunk_list_py3.py | 32 - ...oyed_application_health_state_chunk_py3.py | 43 - ...eployed_application_health_state_filter.py | 90 - ...yed_application_health_state_filter_py3.py | 90 - .../deployed_application_health_state_py3.py | 42 - .../models/deployed_application_info.py | 77 - .../models/deployed_application_info_py3.py | 77 - ...yed_application_new_health_report_event.py | 111 - ...application_new_health_report_event_py3.py | 111 - ...deployed_applications_health_evaluation.py | 67 - ...oyed_applications_health_evaluation_py3.py | 67 - .../models/deployed_code_package_info.py | 84 - .../models/deployed_code_package_info_py3.py | 84 - .../models/deployed_service_package_health.py | 59 - ...loyed_service_package_health_evaluation.py | 68 - ...d_service_package_health_evaluation_py3.py | 68 - .../deployed_service_package_health_py3.py | 59 - ...ice_package_health_report_expired_event.py | 123 - ...package_health_report_expired_event_py3.py | 123 - .../deployed_service_package_health_state.py | 56 - ...oyed_service_package_health_state_chunk.py | 44 - ...service_package_health_state_chunk_list.py | 32 - ...ice_package_health_state_chunk_list_py3.py | 32 - ..._service_package_health_state_chunk_py3.py | 44 - ...yed_service_package_health_state_filter.py | 84 - ...service_package_health_state_filter_py3.py | 84 - ...ployed_service_package_health_state_py3.py | 56 - .../models/deployed_service_package_info.py | 50 - .../deployed_service_package_info_py3.py | 50 - ...service_package_new_health_report_event.py | 123 - ...ice_package_new_health_report_event_py3.py | 123 - ...oyed_service_packages_health_evaluation.py | 62 - ..._service_packages_health_evaluation_py3.py | 62 - .../deployed_service_replica_detail_info.py | 73 - ...eployed_service_replica_detail_info_py3.py | 73 - .../models/deployed_service_replica_info.py | 96 - .../deployed_service_replica_info_py3.py | 96 - .../models/deployed_service_type_info.py | 55 - .../models/deployed_service_type_info_py3.py | 55 - ...ed_stateful_service_replica_detail_info.py | 114 - ...tateful_service_replica_detail_info_py3.py | 114 - .../deployed_stateful_service_replica_info.py | 102 - ...loyed_stateful_service_replica_info_py3.py | 102 - ..._stateless_service_instance_detail_info.py | 76 - ...teless_service_instance_detail_info_py3.py | 76 - ...eployed_stateless_service_instance_info.py | 87 - ...yed_stateless_service_instance_info_py3.py | 87 - .../models/diagnostics_description.py | 37 - .../models/diagnostics_description_py3.py | 37 - .../servicefabric/models/diagnostics_ref.py | 33 - .../models/diagnostics_ref_py3.py | 33 - .../models/diagnostics_sink_properties.py | 50 - .../models/diagnostics_sink_properties_py3.py | 50 - .../models/disable_backup_description.py | 37 - .../models/disable_backup_description_py3.py | 37 - customSDK/servicefabric/models/disk_info.py | 32 - .../servicefabric/models/disk_info_py3.py | 32 - .../models/double_property_value.py | 39 - .../models/double_property_value_py3.py | 39 - ...s_azure_blob_backup_storage_description.py | 50 - ...ure_blob_backup_storage_description_py3.py | 50 - .../models/enable_backup_description.py | 35 - .../models/enable_backup_description_py3.py | 35 - .../models/endpoint_properties.py | 38 - .../models/endpoint_properties_py3.py | 38 - .../servicefabric/models/endpoint_ref.py | 28 - .../servicefabric/models/endpoint_ref_py3.py | 28 - .../ensure_availability_safety_check.py | 40 - .../ensure_availability_safety_check_py3.py | 40 - .../ensure_partition_quorum_safety_check.py | 39 - ...nsure_partition_quorum_safety_check_py3.py | 39 - .../servicefabric/models/entity_health.py | 50 - .../servicefabric/models/entity_health_py3.py | 50 - .../models/entity_health_state.py | 33 - .../models/entity_health_state_chunk.py | 31 - .../models/entity_health_state_chunk_list.py | 30 - .../entity_health_state_chunk_list_py3.py | 30 - .../models/entity_health_state_chunk_py3.py | 31 - .../models/entity_health_state_py3.py | 33 - .../models/entity_kind_health_state_count.py | 36 - .../entity_kind_health_state_count_py3.py | 36 - .../models/environment_variable.py | 39 - .../models/environment_variable_py3.py | 39 - customSDK/servicefabric/models/epoch.py | 41 - customSDK/servicefabric/models/epoch_py3.py | 41 - .../models/event_health_evaluation.py | 60 - .../models/event_health_evaluation_py3.py | 60 - .../models/executing_faults_chaos_event.py | 46 - .../executing_faults_chaos_event_py3.py | 46 - .../servicefabric/models/execution_policy.py | 41 - .../models/execution_policy_py3.py | 41 - ..._provision_application_type_description.py | 68 - ...vision_application_type_description_py3.py | 68 - .../models/fabric_code_version_info.py | 28 - .../models/fabric_code_version_info_py3.py | 28 - .../models/fabric_config_version_info.py | 28 - .../models/fabric_config_version_info_py3.py | 28 - .../servicefabric/models/fabric_error.py | 50 - .../models/fabric_error_error.py | 193 - .../models/fabric_error_error_py3.py | 193 - .../servicefabric/models/fabric_error_py3.py | 50 - .../servicefabric/models/fabric_event.py | 62 - .../servicefabric/models/fabric_event_py3.py | 62 - .../models/failed_property_batch_info.py | 46 - .../models/failed_property_batch_info_py3.py | 46 - .../failed_upgrade_domain_progress_object.py | 35 - ...iled_upgrade_domain_progress_object_py3.py | 35 - .../failure_upgrade_domain_progress_info.py | 35 - ...ailure_upgrade_domain_progress_info_py3.py | 35 - customSDK/servicefabric/models/file_info.py | 42 - .../servicefabric/models/file_info_py3.py | 42 - .../file_share_backup_storage_description.py | 60 - ...le_share_backup_storage_description_py3.py | 60 - .../servicefabric/models/file_version.py | 39 - .../servicefabric/models/file_version_py3.py | 39 - customSDK/servicefabric/models/folder_info.py | 34 - .../servicefabric/models/folder_info_py3.py | 34 - .../servicefabric/models/folder_size_info.py | 33 - .../models/folder_size_info_py3.py | 33 - ...uency_based_backup_schedule_description.py | 41 - ...y_based_backup_schedule_description_py3.py | 41 - .../models/gateway_destination.py | 45 - .../models/gateway_destination_py3.py | 45 - .../models/gateway_resource_description.py | 79 - .../gateway_resource_description_py3.py | 79 - ...get_backup_by_storage_query_description.py | 64 - ...backup_by_storage_query_description_py3.py | 64 - .../models/get_property_batch_operation.py | 48 - .../get_property_batch_operation_py3.py | 48 - .../models/guid_property_value.py | 39 - .../models/guid_property_value_py3.py | 39 - .../servicefabric/models/health_evaluation.py | 67 - .../models/health_evaluation_py3.py | 67 - .../models/health_evaluation_wrapper.py | 30 - .../models/health_evaluation_wrapper_py3.py | 30 - .../servicefabric/models/health_event.py | 163 - .../servicefabric/models/health_event_py3.py | 163 - .../models/health_information.py | 119 - .../models/health_information_py3.py | 119 - .../models/health_state_count.py | 46 - .../models/health_state_count_py3.py | 46 - .../servicefabric/models/health_statistics.py | 38 - .../models/health_statistics_py3.py | 38 - customSDK/servicefabric/models/http_config.py | 46 - .../servicefabric/models/http_config_py3.py | 46 - .../servicefabric/models/http_host_config.py | 41 - .../models/http_host_config_py3.py | 41 - .../servicefabric/models/http_route_config.py | 45 - .../models/http_route_config_py3.py | 45 - .../models/http_route_match_header.py | 42 - .../models/http_route_match_header_py3.py | 42 - .../models/http_route_match_path.py | 48 - .../models/http_route_match_path_py3.py | 48 - .../models/http_route_match_rule.py | 38 - .../models/http_route_match_rule_py3.py | 38 - .../models/identity_description.py | 55 - .../models/identity_description_py3.py | 55 - .../models/identity_item_description.py | 34 - .../models/identity_item_description_py3.py | 34 - .../models/image_registry_credential.py | 53 - .../models/image_registry_credential_py3.py | 53 - .../models/image_store_content.py | 34 - .../models/image_store_content_py3.py | 34 - .../models/image_store_copy_description.py | 54 - .../image_store_copy_description_py3.py | 54 - .../servicefabric/models/image_store_info.py | 54 - .../models/image_store_info_py3.py | 54 - ...nlined_value_secret_resource_properties.py | 59 - ...ed_value_secret_resource_properties_py3.py | 59 - .../models/instance_lifecycle_description.py | 29 - .../instance_lifecycle_description_py3.py | 29 - .../models/int64_property_value.py | 39 - .../models/int64_property_value_py3.py | 39 - .../int64_range_partition_information.py | 51 - .../int64_range_partition_information_py3.py | 51 - .../models/invoke_data_loss_result.py | 35 - .../models/invoke_data_loss_result_py3.py | 35 - .../models/invoke_quorum_loss_result.py | 35 - .../models/invoke_quorum_loss_result_py3.py | 35 - .../models/key_value_store_replica_status.py | 61 - .../key_value_store_replica_status_py3.py | 61 - .../models/load_metric_information.py | 151 - .../models/load_metric_information_py3.py | 151 - .../models/load_metric_report.py | 42 - .../models/load_metric_report_info.py | 41 - .../models/load_metric_report_info_py3.py | 41 - .../models/load_metric_report_py3.py | 42 - ...partition_information_query_description.py | 57 - ...ition_information_query_description_py3.py | 57 - .../loaded_partition_information_result.py | 51 - ...oaded_partition_information_result_list.py | 39 - ...d_partition_information_result_list_py3.py | 39 - ...loaded_partition_information_result_py3.py | 51 - .../local_network_resource_properties.py | 56 - .../local_network_resource_properties_py3.py | 56 - .../models/managed_application_identity.py | 38 - ...anaged_application_identity_description.py | 33 - ...ed_application_identity_description_py3.py | 33 - .../managed_application_identity_py3.py | 38 - ...y_azure_blob_backup_storage_description.py | 58 - ...ure_blob_backup_storage_description_py3.py | 58 - .../models/metric_load_description.py | 39 - .../models/metric_load_description_py3.py | 39 - .../models/monitoring_policy_description.py | 73 - .../monitoring_policy_description_py3.py | 73 - .../servicefabric/models/name_description.py | 35 - .../models/name_description_py3.py | 35 - .../models/named_partition_information.py | 46 - .../models/named_partition_information_py3.py | 46 - .../named_partition_scheme_description.py | 45 - .../named_partition_scheme_description_py3.py | 45 - customSDK/servicefabric/models/network_ref.py | 33 - .../servicefabric/models/network_ref_py3.py | 33 - .../models/network_resource_description.py | 39 - .../network_resource_description_py3.py | 39 - .../models/network_resource_properties.py | 60 - .../network_resource_properties_base.py | 42 - .../network_resource_properties_base_py3.py | 42 - .../models/network_resource_properties_py3.py | 60 - .../models/node_aborted_event.py | 94 - .../models/node_aborted_event_py3.py | 94 - .../models/node_added_to_cluster_event.py | 84 - .../models/node_added_to_cluster_event_py3.py | 84 - .../servicefabric/models/node_closed_event.py | 69 - .../models/node_closed_event_py3.py | 69 - .../models/node_deactivate_completed_event.py | 74 - .../node_deactivate_completed_event_py3.py | 74 - .../models/node_deactivate_started_event.py | 69 - .../node_deactivate_started_event_py3.py | 69 - .../models/node_deactivation_info.py | 50 - .../models/node_deactivation_info_py3.py | 50 - .../models/node_deactivation_task.py | 37 - .../models/node_deactivation_task_id.py | 35 - .../models/node_deactivation_task_id_py3.py | 35 - .../models/node_deactivation_task_py3.py | 37 - .../servicefabric/models/node_down_event.py | 64 - .../models/node_down_event_py3.py | 64 - customSDK/servicefabric/models/node_event.py | 66 - .../servicefabric/models/node_event_py3.py | 66 - customSDK/servicefabric/models/node_health.py | 50 - .../models/node_health_evaluation.py | 59 - .../models/node_health_evaluation_py3.py | 59 - .../servicefabric/models/node_health_py3.py | 50 - .../node_health_report_expired_event.py | 100 - .../node_health_report_expired_event_py3.py | 100 - .../servicefabric/models/node_health_state.py | 41 - .../models/node_health_state_chunk.py | 34 - .../models/node_health_state_chunk_list.py | 35 - .../node_health_state_chunk_list_py3.py | 35 - .../models/node_health_state_chunk_py3.py | 34 - .../models/node_health_state_filter.py | 66 - .../models/node_health_state_filter_py3.py | 66 - .../models/node_health_state_py3.py | 41 - customSDK/servicefabric/models/node_id.py | 29 - customSDK/servicefabric/models/node_id_py3.py | 29 - customSDK/servicefabric/models/node_impact.py | 41 - .../servicefabric/models/node_impact_py3.py | 41 - customSDK/servicefabric/models/node_info.py | 131 - .../servicefabric/models/node_info_py3.py | 131 - .../servicefabric/models/node_load_info.py | 36 - .../models/node_load_info_py3.py | 36 - .../models/node_load_metric_information.py | 84 - .../node_load_metric_information_py3.py | 84 - .../models/node_new_health_report_event.py | 100 - .../node_new_health_report_event_py3.py | 100 - .../models/node_open_failed_event.py | 99 - .../models/node_open_failed_event_py3.py | 99 - .../models/node_open_succeeded_event.py | 94 - .../models/node_open_succeeded_event_py3.py | 94 - .../models/node_removed_from_cluster_event.py | 84 - .../node_removed_from_cluster_event_py3.py | 84 - .../models/node_repair_impact_description.py | 41 - .../node_repair_impact_description_py3.py | 41 - .../models/node_repair_target_description.py | 40 - .../node_repair_target_description_py3.py | 40 - customSDK/servicefabric/models/node_result.py | 33 - .../servicefabric/models/node_result_py3.py | 33 - .../models/node_tags_description.py | 40 - .../models/node_tags_description_py3.py | 40 - .../models/node_transition_progress.py | 39 - .../models/node_transition_progress_py3.py | 39 - .../models/node_transition_result.py | 35 - .../models/node_transition_result_py3.py | 35 - .../node_type_health_policy_map_item.py | 48 - .../node_type_health_policy_map_item_py3.py | 48 - .../node_type_nodes_health_evaluation.py | 73 - .../node_type_nodes_health_evaluation_py3.py | 73 - .../servicefabric/models/node_up_event.py | 64 - .../servicefabric/models/node_up_event_py3.py | 64 - .../models/node_upgrade_progress_info.py | 44 - .../models/node_upgrade_progress_info_py3.py | 44 - .../models/nodes_health_evaluation.py | 64 - .../models/nodes_health_evaluation_py3.py | 64 - .../servicefabric/models/operation_status.py | 42 - .../models/operation_status_py3.py | 42 - .../models/package_sharing_policy_info.py | 37 - .../models/package_sharing_policy_info_py3.py | 37 - .../models/paged_application_info_list.py | 40 - .../models/paged_application_info_list_py3.py | 40 - ...d_application_resource_description_list.py | 41 - ...plication_resource_description_list_py3.py | 41 - .../paged_application_type_info_list.py | 40 - .../paged_application_type_info_list_py3.py | 40 - .../paged_backup_configuration_info_list.py | 40 - ...aged_backup_configuration_info_list_py3.py | 40 - .../models/paged_backup_entity_list.py | 40 - .../models/paged_backup_entity_list_py3.py | 40 - .../models/paged_backup_info_list.py | 39 - .../models/paged_backup_info_list_py3.py | 39 - .../paged_backup_policy_description_list.py | 40 - ...aged_backup_policy_description_list_py3.py | 40 - ...ged_compose_deployment_status_info_list.py | 40 - ...compose_deployment_status_info_list_py3.py | 40 - .../paged_deployed_application_info_list.py | 41 - ...aged_deployed_application_info_list_py3.py | 41 - ...paged_gateway_resource_description_list.py | 39 - ...d_gateway_resource_description_list_py3.py | 39 - ...paged_network_resource_description_list.py | 39 - ...d_network_resource_description_list_py3.py | 39 - .../models/paged_node_info_list.py | 39 - .../models/paged_node_info_list_py3.py | 39 - .../models/paged_property_info_list.py | 46 - .../models/paged_property_info_list_py3.py | 46 - .../models/paged_replica_info_list.py | 40 - .../models/paged_replica_info_list_py3.py | 40 - .../paged_secret_resource_description_list.py | 39 - ...ed_secret_resource_description_list_py3.py | 39 - ..._secret_value_resource_description_list.py | 41 - ...ret_value_resource_description_list_py3.py | 41 - .../models/paged_service_info_list.py | 40 - .../models/paged_service_info_list_py3.py | 40 - .../paged_service_partition_info_list.py | 40 - .../paged_service_partition_info_list_py3.py | 40 - .../paged_service_replica_description_list.py | 40 - ...ed_service_replica_description_list_py3.py | 40 - ...paged_service_resource_description_list.py | 39 - ...d_service_resource_description_list_py3.py | 39 - .../models/paged_sub_name_info_list.py | 46 - .../models/paged_sub_name_info_list_py3.py | 46 - ...paged_update_partition_load_result_list.py | 40 - ...d_update_partition_load_result_list_py3.py | 40 - .../paged_volume_resource_description_list.py | 39 - ...ed_volume_resource_description_list_py3.py | 39 - .../models/partition_analysis_event.py | 70 - .../models/partition_analysis_event_py3.py | 70 - .../partition_backup_configuration_info.py | 57 - ...partition_backup_configuration_info_py3.py | 57 - .../models/partition_backup_entity.py | 43 - .../models/partition_backup_entity_py3.py | 43 - .../models/partition_data_loss_progress.py | 36 - .../partition_data_loss_progress_py3.py | 36 - .../servicefabric/models/partition_event.py | 69 - .../models/partition_event_py3.py | 69 - .../servicefabric/models/partition_health.py | 56 - .../models/partition_health_evaluation.py | 61 - .../models/partition_health_evaluation_py3.py | 61 - .../models/partition_health_py3.py | 56 - .../partition_health_report_expired_event.py | 99 - ...rtition_health_report_expired_event_py3.py | 99 - .../models/partition_health_state.py | 37 - .../models/partition_health_state_chunk.py | 42 - .../partition_health_state_chunk_list.py | 32 - .../partition_health_state_chunk_list_py3.py | 32 - .../partition_health_state_chunk_py3.py | 42 - .../models/partition_health_state_filter.py | 84 - .../partition_health_state_filter_py3.py | 84 - .../models/partition_health_state_py3.py | 37 - .../models/partition_information.py | 51 - .../models/partition_information_py3.py | 51 - ...artition_instance_count_scale_mechanism.py | 53 - ...tion_instance_count_scale_mechanism_py3.py | 53 - .../models/partition_load_information.py | 52 - .../models/partition_load_information_py3.py | 52 - .../partition_metric_load_description.py | 62 - .../partition_metric_load_description_py3.py | 62 - .../partition_new_health_report_event.py | 99 - .../partition_new_health_report_event_py3.py | 99 - .../partition_primary_move_analysis_event.py | 87 - ...rtition_primary_move_analysis_event_py3.py | 87 - .../models/partition_quorum_loss_progress.py | 36 - .../partition_quorum_loss_progress_py3.py | 36 - .../models/partition_reconfigured_event.py | 123 - .../partition_reconfigured_event_py3.py | 123 - .../models/partition_restart_progress.py | 36 - .../models/partition_restart_progress_py3.py | 36 - .../models/partition_safety_check.py | 50 - .../models/partition_safety_check_py3.py | 50 - .../models/partition_scheme_description.py | 43 - .../partition_scheme_description_py3.py | 43 - .../models/partitions_health_evaluation.py | 66 - .../partitions_health_evaluation_py3.py | 66 - .../models/primary_replicator_status.py | 47 - .../models/primary_replicator_status_py3.py | 47 - customSDK/servicefabric/models/probe.py | 61 - customSDK/servicefabric/models/probe_exec.py | 35 - .../servicefabric/models/probe_exec_py3.py | 35 - .../servicefabric/models/probe_http_get.py | 51 - .../models/probe_http_get_headers.py | 39 - .../models/probe_http_get_headers_py3.py | 39 - .../models/probe_http_get_py3.py | 51 - customSDK/servicefabric/models/probe_py3.py | 61 - .../servicefabric/models/probe_tcp_socket.py | 34 - .../models/probe_tcp_socket_py3.py | 34 - .../models/property_batch_description_list.py | 29 - .../property_batch_description_list_py3.py | 29 - .../models/property_batch_info.py | 41 - .../models/property_batch_info_py3.py | 41 - .../models/property_batch_operation.py | 50 - .../models/property_batch_operation_py3.py | 50 - .../models/property_description.py | 44 - .../models/property_description_py3.py | 44 - .../servicefabric/models/property_info.py | 44 - .../servicefabric/models/property_info_py3.py | 44 - .../servicefabric/models/property_metadata.py | 54 - .../models/property_metadata_py3.py | 54 - .../servicefabric/models/property_value.py | 42 - .../models/property_value_py3.py | 42 - .../provision_application_type_description.py | 58 - ...ision_application_type_description_base.py | 53 - ...n_application_type_description_base_py3.py | 53 - ...vision_application_type_description_py3.py | 58 - .../models/provision_fabric_description.py | 32 - .../provision_fabric_description_py3.py | 32 - .../models/put_property_batch_operation.py | 50 - .../put_property_batch_operation_py3.py | 50 - .../models/reconfiguration_information.py | 54 - .../models/reconfiguration_information_py3.py | 54 - .../models/registry_credential.py | 38 - .../models/registry_credential_py3.py | 38 - .../models/reliable_collections_ref.py | 42 - .../models/reliable_collections_ref_py3.py | 42 - ...emote_replicator_acknowledgement_detail.py | 46 - ...e_replicator_acknowledgement_detail_py3.py | 46 - ...emote_replicator_acknowledgement_status.py | 38 - ...e_replicator_acknowledgement_status_py3.py | 38 - .../models/remote_replicator_status.py | 73 - .../models/remote_replicator_status_py3.py | 73 - .../models/repair_impact_description_base.py | 43 - .../repair_impact_description_base_py3.py | 43 - .../models/repair_target_description_base.py | 43 - .../repair_target_description_base_py3.py | 43 - customSDK/servicefabric/models/repair_task.py | 153 - .../models/repair_task_approve_description.py | 43 - .../repair_task_approve_description_py3.py | 43 - .../models/repair_task_cancel_description.py | 49 - .../repair_task_cancel_description_py3.py | 49 - .../models/repair_task_delete_description.py | 44 - .../repair_task_delete_description_py3.py | 44 - .../models/repair_task_history.py | 81 - .../models/repair_task_history_py3.py | 81 - .../servicefabric/models/repair_task_py3.py | 153 - ...r_task_update_health_policy_description.py | 57 - ...sk_update_health_policy_description_py3.py | 57 - .../models/repair_task_update_info.py | 36 - .../models/repair_task_update_info_py3.py | 36 - .../servicefabric/models/replica_event.py | 81 - .../servicefabric/models/replica_event_py3.py | 81 - .../servicefabric/models/replica_health.py | 71 - .../models/replica_health_evaluation.py | 72 - .../models/replica_health_evaluation_py3.py | 72 - .../models/replica_health_py3.py | 71 - .../models/replica_health_state.py | 56 - .../models/replica_health_state_chunk.py | 45 - .../models/replica_health_state_chunk_list.py | 30 - .../replica_health_state_chunk_list_py3.py | 30 - .../models/replica_health_state_chunk_py3.py | 45 - .../models/replica_health_state_filter.py | 71 - .../models/replica_health_state_filter_py3.py | 71 - .../models/replica_health_state_py3.py | 56 - .../servicefabric/models/replica_info.py | 67 - .../servicefabric/models/replica_info_py3.py | 67 - .../models/replica_lifecycle_description.py | 35 - .../replica_lifecycle_description_py3.py | 35 - .../models/replica_metric_load_description.py | 35 - .../replica_metric_load_description_py3.py | 35 - .../models/replica_status_base.py | 41 - .../models/replica_status_base_py3.py | 41 - .../models/replicas_health_evaluation.py | 66 - .../models/replicas_health_evaluation_py3.py | 66 - .../models/replicator_queue_status.py | 70 - .../models/replicator_queue_status_py3.py | 70 - .../servicefabric/models/replicator_status.py | 44 - .../models/replicator_status_py3.py | 44 - .../models/resolved_service_endpoint.py | 36 - .../models/resolved_service_endpoint_py3.py | 36 - .../models/resolved_service_partition.py | 55 - .../models/resolved_service_partition_py3.py | 55 - .../servicefabric/models/resource_limits.py | 35 - .../models/resource_limits_py3.py | 35 - .../servicefabric/models/resource_requests.py | 45 - .../models/resource_requests_py3.py | 45 - .../models/resource_requirements.py | 40 - .../models/resource_requirements_py3.py | 40 - ...start_deployed_code_package_description.py | 65 - ...t_deployed_code_package_description_py3.py | 65 - .../models/restart_node_description.py | 45 - .../models/restart_node_description_py3.py | 45 - .../models/restart_partition_result.py | 35 - .../models/restart_partition_result_py3.py | 35 - .../models/restore_partition_description.py | 46 - .../restore_partition_description_py3.py | 46 - .../models/restore_progress_info.py | 48 - .../models/restore_progress_info_py3.py | 48 - .../resume_application_upgrade_description.py | 36 - ...ume_application_upgrade_description_py3.py | 36 - .../resume_cluster_upgrade_description.py | 35 - .../resume_cluster_upgrade_description_py3.py | 35 - .../models/retention_policy_description.py | 41 - .../retention_policy_description_py3.py | 41 - .../rolling_upgrade_update_description.py | 118 - .../rolling_upgrade_update_description_py3.py | 118 - .../run_to_completion_execution_policy.py | 45 - .../run_to_completion_execution_policy_py3.py | 45 - .../servicefabric/models/safety_check.py | 43 - .../servicefabric/models/safety_check_py3.py | 43 - .../models/safety_check_wrapper.py | 32 - .../models/safety_check_wrapper_py3.py | 32 - .../models/scaling_mechanism_description.py | 42 - .../scaling_mechanism_description_py3.py | 42 - .../models/scaling_policy_description.py | 43 - .../models/scaling_policy_description_py3.py | 43 - .../models/scaling_trigger_description.py | 42 - .../models/scaling_trigger_description_py3.py | 42 - .../secondary_active_replicator_status.py | 66 - .../secondary_active_replicator_status_py3.py | 66 - .../secondary_idle_replicator_status.py | 66 - .../secondary_idle_replicator_status_py3.py | 66 - .../models/secondary_replicator_status.py | 80 - .../models/secondary_replicator_status_py3.py | 80 - .../models/secret_resource_description.py | 40 - .../models/secret_resource_description_py3.py | 40 - .../models/secret_resource_properties.py | 66 - .../models/secret_resource_properties_base.py | 42 - .../secret_resource_properties_base_py3.py | 42 - .../models/secret_resource_properties_py3.py | 66 - .../servicefabric/models/secret_value.py | 28 - .../models/secret_value_properties.py | 28 - .../models/secret_value_properties_py3.py | 28 - .../servicefabric/models/secret_value_py3.py | 28 - .../secret_value_resource_description.py | 39 - .../secret_value_resource_description_py3.py | 39 - .../models/seed_node_safety_check.py | 35 - .../models/seed_node_safety_check_py3.py | 35 - .../models/selected_partition.py | 37 - .../models/selected_partition_py3.py | 37 - .../service_backup_configuration_info.py | 54 - .../service_backup_configuration_info_py3.py | 54 - .../models/service_backup_entity.py | 39 - .../models/service_backup_entity_py3.py | 39 - .../models/service_correlation_description.py | 43 - .../service_correlation_description_py3.py | 43 - .../models/service_created_event.py | 114 - .../models/service_created_event_py3.py | 114 - .../models/service_deleted_event.py | 105 - .../models/service_deleted_event_py3.py | 105 - .../models/service_description.py | 132 - .../models/service_description_py3.py | 132 - .../servicefabric/models/service_event.py | 69 - .../servicefabric/models/service_event_py3.py | 69 - .../service_fabric_client_ap_is_enums.py | 1115 - .../service_from_template_description.py | 65 - .../service_from_template_description_py3.py | 65 - .../servicefabric/models/service_health.py | 56 - .../models/service_health_evaluation.py | 61 - .../models/service_health_evaluation_py3.py | 61 - .../models/service_health_py3.py | 56 - .../service_health_report_expired_event.py | 106 - ...service_health_report_expired_event_py3.py | 106 - .../models/service_health_state.py | 37 - .../models/service_health_state_chunk.py | 43 - .../models/service_health_state_chunk_list.py | 30 - .../service_health_state_chunk_list_py3.py | 30 - .../models/service_health_state_chunk_py3.py | 43 - .../models/service_health_state_filter.py | 83 - .../models/service_health_state_filter_py3.py | 83 - .../models/service_health_state_py3.py | 37 - .../servicefabric/models/service_identity.py | 32 - .../models/service_identity_py3.py | 32 - .../servicefabric/models/service_info.py | 80 - .../servicefabric/models/service_info_py3.py | 80 - .../models/service_load_metric_description.py | 66 - .../service_load_metric_description_py3.py | 66 - .../servicefabric/models/service_name_info.py | 38 - .../models/service_name_info_py3.py | 38 - .../models/service_new_health_report_event.py | 106 - .../service_new_health_report_event_py3.py | 106 - .../models/service_partition_info.py | 61 - .../models/service_partition_info_py3.py | 61 - ...ss_instances_on_node_policy_description.py | 42 - ...nstances_on_node_policy_description_py3.py | 42 - ...ement_invalid_domain_policy_description.py | 41 - ...t_invalid_domain_policy_description_py3.py | 41 - ...tially_place_service_policy_description.py | 36 - ...ly_place_service_policy_description_py3.py | 36 - .../service_placement_policy_description.py | 46 - ...ervice_placement_policy_description_py3.py | 46 - ...refer_primary_domain_policy_description.py | 48 - ...r_primary_domain_policy_description_py3.py | 48 - ..._domain_distribution_policy_description.py | 49 - ...ain_distribution_policy_description_py3.py | 49 - ...ment_required_domain_policy_description.py | 41 - ..._required_domain_policy_description_py3.py | 41 - .../models/service_properties.py | 81 - .../models/service_properties_py3.py | 81 - .../models/service_replica_description.py | 54 - .../models/service_replica_description_py3.py | 54 - .../models/service_replica_properties.py | 53 - .../models/service_replica_properties_py3.py | 53 - .../models/service_resource_description.py | 112 - .../service_resource_description_py3.py | 112 - .../models/service_type_description.py | 76 - .../models/service_type_description_py3.py | 76 - .../service_type_extension_description.py | 32 - .../service_type_extension_description_py3.py | 32 - .../models/service_type_health_policy.py | 67 - .../service_type_health_policy_map_item.py | 41 - ...service_type_health_policy_map_item_py3.py | 41 - .../models/service_type_health_policy_py3.py | 67 - .../servicefabric/models/service_type_info.py | 47 - .../models/service_type_info_py3.py | 47 - .../models/service_type_manifest.py | 29 - .../models/service_type_manifest_py3.py | 29 - .../models/service_update_description.py | 141 - .../models/service_update_description_py3.py | 141 - .../models/service_upgrade_progress.py | 39 - .../models/service_upgrade_progress_py3.py | 39 - .../models/services_health_evaluation.py | 70 - .../models/services_health_evaluation_py3.py | 70 - customSDK/servicefabric/models/setting.py | 41 - customSDK/servicefabric/models/setting_py3.py | 41 - .../models/singleton_partition_information.py | 43 - .../singleton_partition_information_py3.py | 43 - .../singleton_partition_scheme_description.py | 35 - ...gleton_partition_scheme_description_py3.py | 35 - .../start_cluster_upgrade_description.py | 114 - .../start_cluster_upgrade_description_py3.py | 114 - .../models/started_chaos_event.py | 44 - .../models/started_chaos_event_py3.py | 44 - ...ful_replica_health_report_expired_event.py | 114 - ...replica_health_report_expired_event_py3.py | 114 - ...tateful_replica_new_health_report_event.py | 114 - ...ful_replica_new_health_report_event_py3.py | 114 - .../models/stateful_service_description.py | 194 - .../stateful_service_description_py3.py | 194 - .../models/stateful_service_info.py | 70 - .../models/stateful_service_info_py3.py | 70 - .../models/stateful_service_partition_info.py | 80 - .../stateful_service_partition_info_py3.py | 80 - .../models/stateful_service_replica_health.py | 70 - .../stateful_service_replica_health_py3.py | 70 - .../stateful_service_replica_health_state.py | 56 - ...ateful_service_replica_health_state_py3.py | 56 - .../models/stateful_service_replica_info.py | 72 - .../stateful_service_replica_info_py3.py | 72 - .../stateful_service_type_description.py | 68 - .../stateful_service_type_description_py3.py | 68 - .../stateful_service_update_description.py | 173 - ...stateful_service_update_description_py3.py | 173 - ...ess_replica_health_report_expired_event.py | 109 - ...replica_health_report_expired_event_py3.py | 109 - ...ateless_replica_new_health_report_event.py | 109 - ...ess_replica_new_health_report_event_py3.py | 109 - .../models/stateless_service_description.py | 192 - .../stateless_service_description_py3.py | 192 - .../models/stateless_service_info.py | 66 - .../models/stateless_service_info_py3.py | 66 - .../stateless_service_instance_health.py | 68 - .../stateless_service_instance_health_py3.py | 68 - ...stateless_service_instance_health_state.py | 51 - ...eless_service_instance_health_state_py3.py | 51 - .../models/stateless_service_instance_info.py | 64 - .../stateless_service_instance_info_py3.py | 64 - .../stateless_service_partition_info.py | 78 - .../stateless_service_partition_info_py3.py | 78 - .../stateless_service_type_description.py | 69 - .../stateless_service_type_description_py3.py | 69 - .../stateless_service_update_description.py | 185 - ...tateless_service_update_description_py3.py | 185 - .../models/stopped_chaos_event.py | 45 - .../models/stopped_chaos_event_py3.py | 45 - .../models/string_property_value.py | 39 - .../models/string_property_value_py3.py | 39 - .../models/successful_property_batch_info.py | 42 - .../successful_property_batch_info_py3.py | 42 - .../system_application_health_evaluation.py | 56 - ...ystem_application_health_evaluation_py3.py | 56 - customSDK/servicefabric/models/tcp_config.py | 46 - .../servicefabric/models/tcp_config_py3.py | 46 - .../models/test_error_chaos_event.py | 50 - .../models/test_error_chaos_event_py3.py | 50 - .../time_based_backup_schedule_description.py | 55 - ...e_based_backup_schedule_description_py3.py | 55 - customSDK/servicefabric/models/time_of_day.py | 39 - .../servicefabric/models/time_of_day_py3.py | 39 - customSDK/servicefabric/models/time_range.py | 34 - .../servicefabric/models/time_range_py3.py | 34 - ...nt64_range_partition_scheme_description.py | 54 - ..._range_partition_scheme_description_py3.py | 54 - .../models/unplaced_replica_information.py | 37 - .../unplaced_replica_information_py3.py | 37 - ...ision_application_type_description_info.py | 45 - ...n_application_type_description_info_py3.py | 45 - .../models/unprovision_fabric_description.py | 32 - .../unprovision_fabric_description_py3.py | 32 - .../update_cluster_upgrade_description.py | 61 - .../update_cluster_upgrade_description_py3.py | 61 - .../models/update_partition_load_result.py | 35 - .../update_partition_load_result_py3.py | 35 - ...ain_delta_nodes_check_health_evaluation.py | 82 - ...delta_nodes_check_health_evaluation_py3.py | 82 - ...deployed_applications_health_evaluation.py | 72 - ...oyed_applications_health_evaluation_py3.py | 72 - .../models/upgrade_domain_info.py | 33 - .../models/upgrade_domain_info_py3.py | 33 - .../upgrade_domain_nodes_health_evaluation.py | 70 - ...rade_domain_nodes_health_evaluation_py3.py | 70 - .../upgrade_orchestration_service_state.py | 29 - ...upgrade_orchestration_service_state_py3.py | 29 - ...ade_orchestration_service_state_summary.py | 47 - ...orchestration_service_state_summary_py3.py | 47 - .../servicefabric/models/upgrade_unit_info.py | 33 - .../models/upgrade_unit_info_py3.py | 33 - .../models/upload_chunk_range.py | 34 - .../models/upload_chunk_range_py3.py | 34 - .../servicefabric/models/upload_session.py | 31 - .../models/upload_session_info.py | 49 - .../models/upload_session_info_py3.py | 49 - .../models/upload_session_py3.py | 31 - customSDK/servicefabric/models/usage_info.py | 33 - .../servicefabric/models/usage_info_py3.py | 33 - .../models/validate_cluster_upgrade_result.py | 36 - .../validate_cluster_upgrade_result_py3.py | 36 - .../models/validation_failed_chaos_event.py | 46 - .../validation_failed_chaos_event_py3.py | 46 - .../volume_provider_parameters_azure_file.py | 46 - ...lume_provider_parameters_azure_file_py3.py | 46 - .../servicefabric/models/volume_reference.py | 45 - .../models/volume_reference_py3.py | 45 - .../models/volume_resource_description.py | 66 - .../models/volume_resource_description_py3.py | 66 - .../wait_for_inbuild_replica_safety_check.py | 41 - ...it_for_inbuild_replica_safety_check_py3.py | 41 - ...wait_for_primary_placement_safety_check.py | 39 - ..._for_primary_placement_safety_check_py3.py | 39 - .../wait_for_primary_swap_safety_check.py | 40 - .../wait_for_primary_swap_safety_check_py3.py | 40 - .../wait_for_reconfiguration_safety_check.py | 39 - ...it_for_reconfiguration_safety_check_py3.py | 39 - .../models/waiting_chaos_event.py | 46 - .../models/waiting_chaos_event_py3.py | 46 - .../_mesh_application_operations.py | 20 +- .../_mesh_code_package_operations.py | 4 +- .../operations/_mesh_gateway_operations.py | 16 +- .../operations/_mesh_network_operations.py | 16 +- .../operations/_mesh_secret_operations.py | 16 +- .../_mesh_secret_value_operations.py | 20 +- .../operations/_mesh_service_operations.py | 8 +- .../_mesh_service_replica_operations.py | 8 +- .../operations/_mesh_volume_operations.py | 16 +- .../_service_fabric_client_apis_operations.py | 872 +- .../operations/mesh_application_operations.py | 350 - .../mesh_code_package_operations.py | 111 - .../operations/mesh_gateway_operations.py | 277 - .../operations/mesh_network_operations.py | 280 - .../operations/mesh_secret_operations.py | 277 - .../mesh_secret_value_operations.py | 364 - .../operations/mesh_service_operations.py | 164 - .../mesh_service_replica_operations.py | 168 - .../operations/mesh_volume_operations.py | 274 - .../service_fabric_client_ap_is.py | 18049 ---------------- customSDK/servicefabric/version.py | 13 - src/sfctl/apiclient.py | 24 +- src/sfctl/auth.py | 14 +- src/sfctl/custom_cluster.py | 7 +- 1082 files changed, 810 insertions(+), 82282 deletions(-) delete mode 100644 customSDK/servicefabric/models/aad_metadata.py delete mode 100644 customSDK/servicefabric/models/aad_metadata_object.py delete mode 100644 customSDK/servicefabric/models/aad_metadata_object_py3.py delete mode 100644 customSDK/servicefabric/models/aad_metadata_py3.py delete mode 100644 customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism.py delete mode 100644 customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism_py3.py delete mode 100644 customSDK/servicefabric/models/add_remove_replica_scaling_mechanism.py delete mode 100644 customSDK/servicefabric/models/add_remove_replica_scaling_mechanism_py3.py delete mode 100644 customSDK/servicefabric/models/analysis_event_metadata.py delete mode 100644 customSDK/servicefabric/models/analysis_event_metadata_py3.py delete mode 100644 customSDK/servicefabric/models/application_backup_configuration_info.py delete mode 100644 customSDK/servicefabric/models/application_backup_configuration_info_py3.py delete mode 100644 customSDK/servicefabric/models/application_backup_entity.py delete mode 100644 customSDK/servicefabric/models/application_backup_entity_py3.py delete mode 100644 customSDK/servicefabric/models/application_capacity_description.py delete mode 100644 customSDK/servicefabric/models/application_capacity_description_py3.py delete mode 100644 customSDK/servicefabric/models/application_container_instance_exited_event.py delete mode 100644 customSDK/servicefabric/models/application_container_instance_exited_event_py3.py delete mode 100644 customSDK/servicefabric/models/application_created_event.py delete mode 100644 customSDK/servicefabric/models/application_created_event_py3.py delete mode 100644 customSDK/servicefabric/models/application_deleted_event.py delete mode 100644 customSDK/servicefabric/models/application_deleted_event_py3.py delete mode 100644 customSDK/servicefabric/models/application_description.py delete mode 100644 customSDK/servicefabric/models/application_description_py3.py delete mode 100644 customSDK/servicefabric/models/application_event.py delete mode 100644 customSDK/servicefabric/models/application_event_py3.py delete mode 100644 customSDK/servicefabric/models/application_health.py delete mode 100644 customSDK/servicefabric/models/application_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/application_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/application_health_policies.py delete mode 100644 customSDK/servicefabric/models/application_health_policies_py3.py delete mode 100644 customSDK/servicefabric/models/application_health_policy.py delete mode 100644 customSDK/servicefabric/models/application_health_policy_map_item.py delete mode 100644 customSDK/servicefabric/models/application_health_policy_map_item_py3.py delete mode 100644 customSDK/servicefabric/models/application_health_policy_map_object.py delete mode 100644 customSDK/servicefabric/models/application_health_policy_map_object_py3.py delete mode 100644 customSDK/servicefabric/models/application_health_policy_py3.py delete mode 100644 customSDK/servicefabric/models/application_health_py3.py delete mode 100644 customSDK/servicefabric/models/application_health_report_expired_event.py delete mode 100644 customSDK/servicefabric/models/application_health_report_expired_event_py3.py delete mode 100644 customSDK/servicefabric/models/application_health_state.py delete mode 100644 customSDK/servicefabric/models/application_health_state_chunk.py delete mode 100644 customSDK/servicefabric/models/application_health_state_chunk_list.py delete mode 100644 customSDK/servicefabric/models/application_health_state_chunk_list_py3.py delete mode 100644 customSDK/servicefabric/models/application_health_state_chunk_py3.py delete mode 100644 customSDK/servicefabric/models/application_health_state_filter.py delete mode 100644 customSDK/servicefabric/models/application_health_state_filter_py3.py delete mode 100644 customSDK/servicefabric/models/application_health_state_py3.py delete mode 100644 customSDK/servicefabric/models/application_info.py delete mode 100644 customSDK/servicefabric/models/application_info_py3.py delete mode 100644 customSDK/servicefabric/models/application_load_info.py delete mode 100644 customSDK/servicefabric/models/application_load_info_py3.py delete mode 100644 customSDK/servicefabric/models/application_load_metric_information.py delete mode 100644 customSDK/servicefabric/models/application_load_metric_information_py3.py delete mode 100644 customSDK/servicefabric/models/application_metric_description.py delete mode 100644 customSDK/servicefabric/models/application_metric_description_py3.py delete mode 100644 customSDK/servicefabric/models/application_name_info.py delete mode 100644 customSDK/servicefabric/models/application_name_info_py3.py delete mode 100644 customSDK/servicefabric/models/application_new_health_report_event.py delete mode 100644 customSDK/servicefabric/models/application_new_health_report_event_py3.py delete mode 100644 customSDK/servicefabric/models/application_parameter.py delete mode 100644 customSDK/servicefabric/models/application_parameter_py3.py delete mode 100644 customSDK/servicefabric/models/application_process_exited_event.py delete mode 100644 customSDK/servicefabric/models/application_process_exited_event_py3.py delete mode 100644 customSDK/servicefabric/models/application_resource_description.py delete mode 100644 customSDK/servicefabric/models/application_resource_description_py3.py delete mode 100644 customSDK/servicefabric/models/application_resource_upgrade_progress_info.py delete mode 100644 customSDK/servicefabric/models/application_resource_upgrade_progress_info_py3.py delete mode 100644 customSDK/servicefabric/models/application_scoped_volume.py delete mode 100644 customSDK/servicefabric/models/application_scoped_volume_creation_parameters.py delete mode 100644 customSDK/servicefabric/models/application_scoped_volume_creation_parameters_py3.py delete mode 100644 customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk.py delete mode 100644 customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk_py3.py delete mode 100644 customSDK/servicefabric/models/application_scoped_volume_py3.py delete mode 100644 customSDK/servicefabric/models/application_type_applications_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/application_type_applications_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/application_type_health_policy_map_item.py delete mode 100644 customSDK/servicefabric/models/application_type_health_policy_map_item_py3.py delete mode 100644 customSDK/servicefabric/models/application_type_image_store_path.py delete mode 100644 customSDK/servicefabric/models/application_type_image_store_path_py3.py delete mode 100644 customSDK/servicefabric/models/application_type_info.py delete mode 100644 customSDK/servicefabric/models/application_type_info_py3.py delete mode 100644 customSDK/servicefabric/models/application_type_manifest.py delete mode 100644 customSDK/servicefabric/models/application_type_manifest_py3.py delete mode 100644 customSDK/servicefabric/models/application_update_description.py delete mode 100644 customSDK/servicefabric/models/application_update_description_py3.py delete mode 100644 customSDK/servicefabric/models/application_upgrade_completed_event.py delete mode 100644 customSDK/servicefabric/models/application_upgrade_completed_event_py3.py delete mode 100644 customSDK/servicefabric/models/application_upgrade_description.py delete mode 100644 customSDK/servicefabric/models/application_upgrade_description_py3.py delete mode 100644 customSDK/servicefabric/models/application_upgrade_domain_completed_event.py delete mode 100644 customSDK/servicefabric/models/application_upgrade_domain_completed_event_py3.py delete mode 100644 customSDK/servicefabric/models/application_upgrade_progress_info.py delete mode 100644 customSDK/servicefabric/models/application_upgrade_progress_info_py3.py delete mode 100644 customSDK/servicefabric/models/application_upgrade_rollback_completed_event.py delete mode 100644 customSDK/servicefabric/models/application_upgrade_rollback_completed_event_py3.py delete mode 100644 customSDK/servicefabric/models/application_upgrade_rollback_started_event.py delete mode 100644 customSDK/servicefabric/models/application_upgrade_rollback_started_event_py3.py delete mode 100644 customSDK/servicefabric/models/application_upgrade_started_event.py delete mode 100644 customSDK/servicefabric/models/application_upgrade_started_event_py3.py delete mode 100644 customSDK/servicefabric/models/application_upgrade_update_description.py delete mode 100644 customSDK/servicefabric/models/application_upgrade_update_description_py3.py delete mode 100644 customSDK/servicefabric/models/applications_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/applications_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/auto_scaling_mechanism.py delete mode 100644 customSDK/servicefabric/models/auto_scaling_mechanism_py3.py delete mode 100644 customSDK/servicefabric/models/auto_scaling_metric.py delete mode 100644 customSDK/servicefabric/models/auto_scaling_metric_py3.py delete mode 100644 customSDK/servicefabric/models/auto_scaling_policy.py delete mode 100644 customSDK/servicefabric/models/auto_scaling_policy_py3.py delete mode 100644 customSDK/servicefabric/models/auto_scaling_resource_metric.py delete mode 100644 customSDK/servicefabric/models/auto_scaling_resource_metric_py3.py delete mode 100644 customSDK/servicefabric/models/auto_scaling_trigger.py delete mode 100644 customSDK/servicefabric/models/auto_scaling_trigger_py3.py delete mode 100644 customSDK/servicefabric/models/average_load_scaling_trigger.py delete mode 100644 customSDK/servicefabric/models/average_load_scaling_trigger_py3.py delete mode 100644 customSDK/servicefabric/models/average_partition_load_scaling_trigger.py delete mode 100644 customSDK/servicefabric/models/average_partition_load_scaling_trigger_py3.py delete mode 100644 customSDK/servicefabric/models/average_service_load_scaling_trigger.py delete mode 100644 customSDK/servicefabric/models/average_service_load_scaling_trigger_py3.py delete mode 100644 customSDK/servicefabric/models/azure_blob_backup_storage_description.py delete mode 100644 customSDK/servicefabric/models/azure_blob_backup_storage_description_py3.py delete mode 100644 customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description.py delete mode 100644 customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description_py3.py delete mode 100644 customSDK/servicefabric/models/backup_configuration_info.py delete mode 100644 customSDK/servicefabric/models/backup_configuration_info_py3.py delete mode 100644 customSDK/servicefabric/models/backup_entity.py delete mode 100644 customSDK/servicefabric/models/backup_entity_py3.py delete mode 100644 customSDK/servicefabric/models/backup_info.py delete mode 100644 customSDK/servicefabric/models/backup_info_py3.py delete mode 100644 customSDK/servicefabric/models/backup_partition_description.py delete mode 100644 customSDK/servicefabric/models/backup_partition_description_py3.py delete mode 100644 customSDK/servicefabric/models/backup_policy_description.py delete mode 100644 customSDK/servicefabric/models/backup_policy_description_py3.py delete mode 100644 customSDK/servicefabric/models/backup_progress_info.py delete mode 100644 customSDK/servicefabric/models/backup_progress_info_py3.py delete mode 100644 customSDK/servicefabric/models/backup_schedule_description.py delete mode 100644 customSDK/servicefabric/models/backup_schedule_description_py3.py delete mode 100644 customSDK/servicefabric/models/backup_storage_description.py delete mode 100644 customSDK/servicefabric/models/backup_storage_description_py3.py delete mode 100644 customSDK/servicefabric/models/backup_suspension_info.py delete mode 100644 customSDK/servicefabric/models/backup_suspension_info_py3.py delete mode 100644 customSDK/servicefabric/models/basic_retention_policy_description.py delete mode 100644 customSDK/servicefabric/models/basic_retention_policy_description_py3.py delete mode 100644 customSDK/servicefabric/models/binary_property_value.py delete mode 100644 customSDK/servicefabric/models/binary_property_value_py3.py delete mode 100644 customSDK/servicefabric/models/chaos.py delete mode 100644 customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event.py delete mode 100644 customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_context.py delete mode 100644 customSDK/servicefabric/models/chaos_context_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_event.py delete mode 100644 customSDK/servicefabric/models/chaos_event_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_event_wrapper.py delete mode 100644 customSDK/servicefabric/models/chaos_event_wrapper_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_events_segment.py delete mode 100644 customSDK/servicefabric/models/chaos_events_segment_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_node_restart_scheduled_event.py delete mode 100644 customSDK/servicefabric/models/chaos_node_restart_scheduled_event_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_parameters.py delete mode 100644 customSDK/servicefabric/models/chaos_parameters_dictionary_item.py delete mode 100644 customSDK/servicefabric/models/chaos_parameters_dictionary_item_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_parameters_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event.py delete mode 100644 customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event.py delete mode 100644 customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_replica_removal_scheduled_event.py delete mode 100644 customSDK/servicefabric/models/chaos_replica_removal_scheduled_event_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_replica_restart_scheduled_event.py delete mode 100644 customSDK/servicefabric/models/chaos_replica_restart_scheduled_event_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_schedule.py delete mode 100644 customSDK/servicefabric/models/chaos_schedule_description.py delete mode 100644 customSDK/servicefabric/models/chaos_schedule_description_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_schedule_job.py delete mode 100644 customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week.py delete mode 100644 customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_schedule_job_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_schedule_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_started_event.py delete mode 100644 customSDK/servicefabric/models/chaos_started_event_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_stopped_event.py delete mode 100644 customSDK/servicefabric/models/chaos_stopped_event_py3.py delete mode 100644 customSDK/servicefabric/models/chaos_target_filter.py delete mode 100644 customSDK/servicefabric/models/chaos_target_filter_py3.py delete mode 100644 customSDK/servicefabric/models/check_exists_property_batch_operation.py delete mode 100644 customSDK/servicefabric/models/check_exists_property_batch_operation_py3.py delete mode 100644 customSDK/servicefabric/models/check_sequence_property_batch_operation.py delete mode 100644 customSDK/servicefabric/models/check_sequence_property_batch_operation_py3.py delete mode 100644 customSDK/servicefabric/models/check_value_property_batch_operation.py delete mode 100644 customSDK/servicefabric/models/check_value_property_batch_operation_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_configuration.py delete mode 100644 customSDK/servicefabric/models/cluster_configuration_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_configuration_upgrade_description.py delete mode 100644 customSDK/servicefabric/models/cluster_configuration_upgrade_description_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_configuration_upgrade_status_info.py delete mode 100644 customSDK/servicefabric/models/cluster_configuration_upgrade_status_info_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_event.py delete mode 100644 customSDK/servicefabric/models/cluster_event_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_health.py delete mode 100644 customSDK/servicefabric/models/cluster_health_chunk.py delete mode 100644 customSDK/servicefabric/models/cluster_health_chunk_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_health_chunk_query_description.py delete mode 100644 customSDK/servicefabric/models/cluster_health_chunk_query_description_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_health_policies.py delete mode 100644 customSDK/servicefabric/models/cluster_health_policies_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_health_policy.py delete mode 100644 customSDK/servicefabric/models/cluster_health_policy_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_health_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_health_report_expired_event.py delete mode 100644 customSDK/servicefabric/models/cluster_health_report_expired_event_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_load_info.py delete mode 100644 customSDK/servicefabric/models/cluster_load_info_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_manifest.py delete mode 100644 customSDK/servicefabric/models/cluster_manifest_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_new_health_report_event.py delete mode 100644 customSDK/servicefabric/models/cluster_new_health_report_event_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_upgrade_completed_event.py delete mode 100644 customSDK/servicefabric/models/cluster_upgrade_completed_event_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_upgrade_description_object.py delete mode 100644 customSDK/servicefabric/models/cluster_upgrade_description_object_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_upgrade_domain_completed_event.py delete mode 100644 customSDK/servicefabric/models/cluster_upgrade_domain_completed_event_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_upgrade_health_policy_object.py delete mode 100644 customSDK/servicefabric/models/cluster_upgrade_health_policy_object_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_upgrade_progress_object.py delete mode 100644 customSDK/servicefabric/models/cluster_upgrade_progress_object_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event.py delete mode 100644 customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_upgrade_rollback_started_event.py delete mode 100644 customSDK/servicefabric/models/cluster_upgrade_rollback_started_event_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_upgrade_started_event.py delete mode 100644 customSDK/servicefabric/models/cluster_upgrade_started_event_py3.py delete mode 100644 customSDK/servicefabric/models/cluster_version.py delete mode 100644 customSDK/servicefabric/models/cluster_version_py3.py delete mode 100644 customSDK/servicefabric/models/code_package_entry_point.py delete mode 100644 customSDK/servicefabric/models/code_package_entry_point_py3.py delete mode 100644 customSDK/servicefabric/models/code_package_entry_point_statistics.py delete mode 100644 customSDK/servicefabric/models/code_package_entry_point_statistics_py3.py delete mode 100644 customSDK/servicefabric/models/compose_deployment_status_info.py delete mode 100644 customSDK/servicefabric/models/compose_deployment_status_info_py3.py delete mode 100644 customSDK/servicefabric/models/compose_deployment_upgrade_description.py delete mode 100644 customSDK/servicefabric/models/compose_deployment_upgrade_description_py3.py delete mode 100644 customSDK/servicefabric/models/compose_deployment_upgrade_progress_info.py delete mode 100644 customSDK/servicefabric/models/compose_deployment_upgrade_progress_info_py3.py delete mode 100644 customSDK/servicefabric/models/config_parameter_override.py delete mode 100644 customSDK/servicefabric/models/config_parameter_override_py3.py delete mode 100644 customSDK/servicefabric/models/container_api_request_body.py delete mode 100644 customSDK/servicefabric/models/container_api_request_body_py3.py delete mode 100644 customSDK/servicefabric/models/container_api_response.py delete mode 100644 customSDK/servicefabric/models/container_api_response_py3.py delete mode 100644 customSDK/servicefabric/models/container_api_result.py delete mode 100644 customSDK/servicefabric/models/container_api_result_py3.py delete mode 100644 customSDK/servicefabric/models/container_code_package_properties.py delete mode 100644 customSDK/servicefabric/models/container_code_package_properties_py3.py delete mode 100644 customSDK/servicefabric/models/container_event.py delete mode 100644 customSDK/servicefabric/models/container_event_py3.py delete mode 100644 customSDK/servicefabric/models/container_instance_event.py delete mode 100644 customSDK/servicefabric/models/container_instance_event_py3.py delete mode 100644 customSDK/servicefabric/models/container_instance_view.py delete mode 100644 customSDK/servicefabric/models/container_instance_view_py3.py delete mode 100644 customSDK/servicefabric/models/container_label.py delete mode 100644 customSDK/servicefabric/models/container_label_py3.py delete mode 100644 customSDK/servicefabric/models/container_logs.py delete mode 100644 customSDK/servicefabric/models/container_logs_py3.py delete mode 100644 customSDK/servicefabric/models/container_state.py delete mode 100644 customSDK/servicefabric/models/container_state_py3.py delete mode 100644 customSDK/servicefabric/models/create_compose_deployment_description.py delete mode 100644 customSDK/servicefabric/models/create_compose_deployment_description_py3.py delete mode 100644 customSDK/servicefabric/models/current_upgrade_domain_progress_info.py delete mode 100644 customSDK/servicefabric/models/current_upgrade_domain_progress_info_py3.py delete mode 100644 customSDK/servicefabric/models/current_upgrade_units_progress_info.py delete mode 100644 customSDK/servicefabric/models/current_upgrade_units_progress_info_py3.py delete mode 100644 customSDK/servicefabric/models/deactivation_intent_description.py delete mode 100644 customSDK/servicefabric/models/deactivation_intent_description_py3.py delete mode 100644 customSDK/servicefabric/models/default_execution_policy.py delete mode 100644 customSDK/servicefabric/models/default_execution_policy_py3.py delete mode 100644 customSDK/servicefabric/models/delete_property_batch_operation.py delete mode 100644 customSDK/servicefabric/models/delete_property_batch_operation_py3.py delete mode 100644 customSDK/servicefabric/models/delta_nodes_check_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/delta_nodes_check_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/deploy_service_package_to_node_description.py delete mode 100644 customSDK/servicefabric/models/deploy_service_package_to_node_description_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_application_health.py delete mode 100644 customSDK/servicefabric/models/deployed_application_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/deployed_application_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_application_health_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_application_health_report_expired_event.py delete mode 100644 customSDK/servicefabric/models/deployed_application_health_report_expired_event_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_application_health_state.py delete mode 100644 customSDK/servicefabric/models/deployed_application_health_state_chunk.py delete mode 100644 customSDK/servicefabric/models/deployed_application_health_state_chunk_list.py delete mode 100644 customSDK/servicefabric/models/deployed_application_health_state_chunk_list_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_application_health_state_chunk_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_application_health_state_filter.py delete mode 100644 customSDK/servicefabric/models/deployed_application_health_state_filter_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_application_health_state_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_application_info.py delete mode 100644 customSDK/servicefabric/models/deployed_application_info_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_application_new_health_report_event.py delete mode 100644 customSDK/servicefabric/models/deployed_application_new_health_report_event_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_applications_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/deployed_applications_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_code_package_info.py delete mode 100644 customSDK/servicefabric/models/deployed_code_package_info_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_health.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_health_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_health_report_expired_event.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_health_report_expired_event_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_health_state.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_health_state_chunk.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_health_state_chunk_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_health_state_filter.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_health_state_filter_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_health_state_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_info.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_info_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_new_health_report_event.py delete mode 100644 customSDK/servicefabric/models/deployed_service_package_new_health_report_event_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_service_packages_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/deployed_service_packages_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_service_replica_detail_info.py delete mode 100644 customSDK/servicefabric/models/deployed_service_replica_detail_info_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_service_replica_info.py delete mode 100644 customSDK/servicefabric/models/deployed_service_replica_info_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_service_type_info.py delete mode 100644 customSDK/servicefabric/models/deployed_service_type_info_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info.py delete mode 100644 customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_stateful_service_replica_info.py delete mode 100644 customSDK/servicefabric/models/deployed_stateful_service_replica_info_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info.py delete mode 100644 customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info_py3.py delete mode 100644 customSDK/servicefabric/models/deployed_stateless_service_instance_info.py delete mode 100644 customSDK/servicefabric/models/deployed_stateless_service_instance_info_py3.py delete mode 100644 customSDK/servicefabric/models/diagnostics_description.py delete mode 100644 customSDK/servicefabric/models/diagnostics_description_py3.py delete mode 100644 customSDK/servicefabric/models/diagnostics_ref.py delete mode 100644 customSDK/servicefabric/models/diagnostics_ref_py3.py delete mode 100644 customSDK/servicefabric/models/diagnostics_sink_properties.py delete mode 100644 customSDK/servicefabric/models/diagnostics_sink_properties_py3.py delete mode 100644 customSDK/servicefabric/models/disable_backup_description.py delete mode 100644 customSDK/servicefabric/models/disable_backup_description_py3.py delete mode 100644 customSDK/servicefabric/models/disk_info.py delete mode 100644 customSDK/servicefabric/models/disk_info_py3.py delete mode 100644 customSDK/servicefabric/models/double_property_value.py delete mode 100644 customSDK/servicefabric/models/double_property_value_py3.py delete mode 100644 customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description.py delete mode 100644 customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description_py3.py delete mode 100644 customSDK/servicefabric/models/enable_backup_description.py delete mode 100644 customSDK/servicefabric/models/enable_backup_description_py3.py delete mode 100644 customSDK/servicefabric/models/endpoint_properties.py delete mode 100644 customSDK/servicefabric/models/endpoint_properties_py3.py delete mode 100644 customSDK/servicefabric/models/endpoint_ref.py delete mode 100644 customSDK/servicefabric/models/endpoint_ref_py3.py delete mode 100644 customSDK/servicefabric/models/ensure_availability_safety_check.py delete mode 100644 customSDK/servicefabric/models/ensure_availability_safety_check_py3.py delete mode 100644 customSDK/servicefabric/models/ensure_partition_quorum_safety_check.py delete mode 100644 customSDK/servicefabric/models/ensure_partition_quorum_safety_check_py3.py delete mode 100644 customSDK/servicefabric/models/entity_health.py delete mode 100644 customSDK/servicefabric/models/entity_health_py3.py delete mode 100644 customSDK/servicefabric/models/entity_health_state.py delete mode 100644 customSDK/servicefabric/models/entity_health_state_chunk.py delete mode 100644 customSDK/servicefabric/models/entity_health_state_chunk_list.py delete mode 100644 customSDK/servicefabric/models/entity_health_state_chunk_list_py3.py delete mode 100644 customSDK/servicefabric/models/entity_health_state_chunk_py3.py delete mode 100644 customSDK/servicefabric/models/entity_health_state_py3.py delete mode 100644 customSDK/servicefabric/models/entity_kind_health_state_count.py delete mode 100644 customSDK/servicefabric/models/entity_kind_health_state_count_py3.py delete mode 100644 customSDK/servicefabric/models/environment_variable.py delete mode 100644 customSDK/servicefabric/models/environment_variable_py3.py delete mode 100644 customSDK/servicefabric/models/epoch.py delete mode 100644 customSDK/servicefabric/models/epoch_py3.py delete mode 100644 customSDK/servicefabric/models/event_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/event_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/executing_faults_chaos_event.py delete mode 100644 customSDK/servicefabric/models/executing_faults_chaos_event_py3.py delete mode 100644 customSDK/servicefabric/models/execution_policy.py delete mode 100644 customSDK/servicefabric/models/execution_policy_py3.py delete mode 100644 customSDK/servicefabric/models/external_store_provision_application_type_description.py delete mode 100644 customSDK/servicefabric/models/external_store_provision_application_type_description_py3.py delete mode 100644 customSDK/servicefabric/models/fabric_code_version_info.py delete mode 100644 customSDK/servicefabric/models/fabric_code_version_info_py3.py delete mode 100644 customSDK/servicefabric/models/fabric_config_version_info.py delete mode 100644 customSDK/servicefabric/models/fabric_config_version_info_py3.py delete mode 100644 customSDK/servicefabric/models/fabric_error.py delete mode 100644 customSDK/servicefabric/models/fabric_error_error.py delete mode 100644 customSDK/servicefabric/models/fabric_error_error_py3.py delete mode 100644 customSDK/servicefabric/models/fabric_error_py3.py delete mode 100644 customSDK/servicefabric/models/fabric_event.py delete mode 100644 customSDK/servicefabric/models/fabric_event_py3.py delete mode 100644 customSDK/servicefabric/models/failed_property_batch_info.py delete mode 100644 customSDK/servicefabric/models/failed_property_batch_info_py3.py delete mode 100644 customSDK/servicefabric/models/failed_upgrade_domain_progress_object.py delete mode 100644 customSDK/servicefabric/models/failed_upgrade_domain_progress_object_py3.py delete mode 100644 customSDK/servicefabric/models/failure_upgrade_domain_progress_info.py delete mode 100644 customSDK/servicefabric/models/failure_upgrade_domain_progress_info_py3.py delete mode 100644 customSDK/servicefabric/models/file_info.py delete mode 100644 customSDK/servicefabric/models/file_info_py3.py delete mode 100644 customSDK/servicefabric/models/file_share_backup_storage_description.py delete mode 100644 customSDK/servicefabric/models/file_share_backup_storage_description_py3.py delete mode 100644 customSDK/servicefabric/models/file_version.py delete mode 100644 customSDK/servicefabric/models/file_version_py3.py delete mode 100644 customSDK/servicefabric/models/folder_info.py delete mode 100644 customSDK/servicefabric/models/folder_info_py3.py delete mode 100644 customSDK/servicefabric/models/folder_size_info.py delete mode 100644 customSDK/servicefabric/models/folder_size_info_py3.py delete mode 100644 customSDK/servicefabric/models/frequency_based_backup_schedule_description.py delete mode 100644 customSDK/servicefabric/models/frequency_based_backup_schedule_description_py3.py delete mode 100644 customSDK/servicefabric/models/gateway_destination.py delete mode 100644 customSDK/servicefabric/models/gateway_destination_py3.py delete mode 100644 customSDK/servicefabric/models/gateway_resource_description.py delete mode 100644 customSDK/servicefabric/models/gateway_resource_description_py3.py delete mode 100644 customSDK/servicefabric/models/get_backup_by_storage_query_description.py delete mode 100644 customSDK/servicefabric/models/get_backup_by_storage_query_description_py3.py delete mode 100644 customSDK/servicefabric/models/get_property_batch_operation.py delete mode 100644 customSDK/servicefabric/models/get_property_batch_operation_py3.py delete mode 100644 customSDK/servicefabric/models/guid_property_value.py delete mode 100644 customSDK/servicefabric/models/guid_property_value_py3.py delete mode 100644 customSDK/servicefabric/models/health_evaluation.py delete mode 100644 customSDK/servicefabric/models/health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/health_evaluation_wrapper.py delete mode 100644 customSDK/servicefabric/models/health_evaluation_wrapper_py3.py delete mode 100644 customSDK/servicefabric/models/health_event.py delete mode 100644 customSDK/servicefabric/models/health_event_py3.py delete mode 100644 customSDK/servicefabric/models/health_information.py delete mode 100644 customSDK/servicefabric/models/health_information_py3.py delete mode 100644 customSDK/servicefabric/models/health_state_count.py delete mode 100644 customSDK/servicefabric/models/health_state_count_py3.py delete mode 100644 customSDK/servicefabric/models/health_statistics.py delete mode 100644 customSDK/servicefabric/models/health_statistics_py3.py delete mode 100644 customSDK/servicefabric/models/http_config.py delete mode 100644 customSDK/servicefabric/models/http_config_py3.py delete mode 100644 customSDK/servicefabric/models/http_host_config.py delete mode 100644 customSDK/servicefabric/models/http_host_config_py3.py delete mode 100644 customSDK/servicefabric/models/http_route_config.py delete mode 100644 customSDK/servicefabric/models/http_route_config_py3.py delete mode 100644 customSDK/servicefabric/models/http_route_match_header.py delete mode 100644 customSDK/servicefabric/models/http_route_match_header_py3.py delete mode 100644 customSDK/servicefabric/models/http_route_match_path.py delete mode 100644 customSDK/servicefabric/models/http_route_match_path_py3.py delete mode 100644 customSDK/servicefabric/models/http_route_match_rule.py delete mode 100644 customSDK/servicefabric/models/http_route_match_rule_py3.py delete mode 100644 customSDK/servicefabric/models/identity_description.py delete mode 100644 customSDK/servicefabric/models/identity_description_py3.py delete mode 100644 customSDK/servicefabric/models/identity_item_description.py delete mode 100644 customSDK/servicefabric/models/identity_item_description_py3.py delete mode 100644 customSDK/servicefabric/models/image_registry_credential.py delete mode 100644 customSDK/servicefabric/models/image_registry_credential_py3.py delete mode 100644 customSDK/servicefabric/models/image_store_content.py delete mode 100644 customSDK/servicefabric/models/image_store_content_py3.py delete mode 100644 customSDK/servicefabric/models/image_store_copy_description.py delete mode 100644 customSDK/servicefabric/models/image_store_copy_description_py3.py delete mode 100644 customSDK/servicefabric/models/image_store_info.py delete mode 100644 customSDK/servicefabric/models/image_store_info_py3.py delete mode 100644 customSDK/servicefabric/models/inlined_value_secret_resource_properties.py delete mode 100644 customSDK/servicefabric/models/inlined_value_secret_resource_properties_py3.py delete mode 100644 customSDK/servicefabric/models/instance_lifecycle_description.py delete mode 100644 customSDK/servicefabric/models/instance_lifecycle_description_py3.py delete mode 100644 customSDK/servicefabric/models/int64_property_value.py delete mode 100644 customSDK/servicefabric/models/int64_property_value_py3.py delete mode 100644 customSDK/servicefabric/models/int64_range_partition_information.py delete mode 100644 customSDK/servicefabric/models/int64_range_partition_information_py3.py delete mode 100644 customSDK/servicefabric/models/invoke_data_loss_result.py delete mode 100644 customSDK/servicefabric/models/invoke_data_loss_result_py3.py delete mode 100644 customSDK/servicefabric/models/invoke_quorum_loss_result.py delete mode 100644 customSDK/servicefabric/models/invoke_quorum_loss_result_py3.py delete mode 100644 customSDK/servicefabric/models/key_value_store_replica_status.py delete mode 100644 customSDK/servicefabric/models/key_value_store_replica_status_py3.py delete mode 100644 customSDK/servicefabric/models/load_metric_information.py delete mode 100644 customSDK/servicefabric/models/load_metric_information_py3.py delete mode 100644 customSDK/servicefabric/models/load_metric_report.py delete mode 100644 customSDK/servicefabric/models/load_metric_report_info.py delete mode 100644 customSDK/servicefabric/models/load_metric_report_info_py3.py delete mode 100644 customSDK/servicefabric/models/load_metric_report_py3.py delete mode 100644 customSDK/servicefabric/models/loaded_partition_information_query_description.py delete mode 100644 customSDK/servicefabric/models/loaded_partition_information_query_description_py3.py delete mode 100644 customSDK/servicefabric/models/loaded_partition_information_result.py delete mode 100644 customSDK/servicefabric/models/loaded_partition_information_result_list.py delete mode 100644 customSDK/servicefabric/models/loaded_partition_information_result_list_py3.py delete mode 100644 customSDK/servicefabric/models/loaded_partition_information_result_py3.py delete mode 100644 customSDK/servicefabric/models/local_network_resource_properties.py delete mode 100644 customSDK/servicefabric/models/local_network_resource_properties_py3.py delete mode 100644 customSDK/servicefabric/models/managed_application_identity.py delete mode 100644 customSDK/servicefabric/models/managed_application_identity_description.py delete mode 100644 customSDK/servicefabric/models/managed_application_identity_description_py3.py delete mode 100644 customSDK/servicefabric/models/managed_application_identity_py3.py delete mode 100644 customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description.py delete mode 100644 customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description_py3.py delete mode 100644 customSDK/servicefabric/models/metric_load_description.py delete mode 100644 customSDK/servicefabric/models/metric_load_description_py3.py delete mode 100644 customSDK/servicefabric/models/monitoring_policy_description.py delete mode 100644 customSDK/servicefabric/models/monitoring_policy_description_py3.py delete mode 100644 customSDK/servicefabric/models/name_description.py delete mode 100644 customSDK/servicefabric/models/name_description_py3.py delete mode 100644 customSDK/servicefabric/models/named_partition_information.py delete mode 100644 customSDK/servicefabric/models/named_partition_information_py3.py delete mode 100644 customSDK/servicefabric/models/named_partition_scheme_description.py delete mode 100644 customSDK/servicefabric/models/named_partition_scheme_description_py3.py delete mode 100644 customSDK/servicefabric/models/network_ref.py delete mode 100644 customSDK/servicefabric/models/network_ref_py3.py delete mode 100644 customSDK/servicefabric/models/network_resource_description.py delete mode 100644 customSDK/servicefabric/models/network_resource_description_py3.py delete mode 100644 customSDK/servicefabric/models/network_resource_properties.py delete mode 100644 customSDK/servicefabric/models/network_resource_properties_base.py delete mode 100644 customSDK/servicefabric/models/network_resource_properties_base_py3.py delete mode 100644 customSDK/servicefabric/models/network_resource_properties_py3.py delete mode 100644 customSDK/servicefabric/models/node_aborted_event.py delete mode 100644 customSDK/servicefabric/models/node_aborted_event_py3.py delete mode 100644 customSDK/servicefabric/models/node_added_to_cluster_event.py delete mode 100644 customSDK/servicefabric/models/node_added_to_cluster_event_py3.py delete mode 100644 customSDK/servicefabric/models/node_closed_event.py delete mode 100644 customSDK/servicefabric/models/node_closed_event_py3.py delete mode 100644 customSDK/servicefabric/models/node_deactivate_completed_event.py delete mode 100644 customSDK/servicefabric/models/node_deactivate_completed_event_py3.py delete mode 100644 customSDK/servicefabric/models/node_deactivate_started_event.py delete mode 100644 customSDK/servicefabric/models/node_deactivate_started_event_py3.py delete mode 100644 customSDK/servicefabric/models/node_deactivation_info.py delete mode 100644 customSDK/servicefabric/models/node_deactivation_info_py3.py delete mode 100644 customSDK/servicefabric/models/node_deactivation_task.py delete mode 100644 customSDK/servicefabric/models/node_deactivation_task_id.py delete mode 100644 customSDK/servicefabric/models/node_deactivation_task_id_py3.py delete mode 100644 customSDK/servicefabric/models/node_deactivation_task_py3.py delete mode 100644 customSDK/servicefabric/models/node_down_event.py delete mode 100644 customSDK/servicefabric/models/node_down_event_py3.py delete mode 100644 customSDK/servicefabric/models/node_event.py delete mode 100644 customSDK/servicefabric/models/node_event_py3.py delete mode 100644 customSDK/servicefabric/models/node_health.py delete mode 100644 customSDK/servicefabric/models/node_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/node_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/node_health_py3.py delete mode 100644 customSDK/servicefabric/models/node_health_report_expired_event.py delete mode 100644 customSDK/servicefabric/models/node_health_report_expired_event_py3.py delete mode 100644 customSDK/servicefabric/models/node_health_state.py delete mode 100644 customSDK/servicefabric/models/node_health_state_chunk.py delete mode 100644 customSDK/servicefabric/models/node_health_state_chunk_list.py delete mode 100644 customSDK/servicefabric/models/node_health_state_chunk_list_py3.py delete mode 100644 customSDK/servicefabric/models/node_health_state_chunk_py3.py delete mode 100644 customSDK/servicefabric/models/node_health_state_filter.py delete mode 100644 customSDK/servicefabric/models/node_health_state_filter_py3.py delete mode 100644 customSDK/servicefabric/models/node_health_state_py3.py delete mode 100644 customSDK/servicefabric/models/node_id.py delete mode 100644 customSDK/servicefabric/models/node_id_py3.py delete mode 100644 customSDK/servicefabric/models/node_impact.py delete mode 100644 customSDK/servicefabric/models/node_impact_py3.py delete mode 100644 customSDK/servicefabric/models/node_info.py delete mode 100644 customSDK/servicefabric/models/node_info_py3.py delete mode 100644 customSDK/servicefabric/models/node_load_info.py delete mode 100644 customSDK/servicefabric/models/node_load_info_py3.py delete mode 100644 customSDK/servicefabric/models/node_load_metric_information.py delete mode 100644 customSDK/servicefabric/models/node_load_metric_information_py3.py delete mode 100644 customSDK/servicefabric/models/node_new_health_report_event.py delete mode 100644 customSDK/servicefabric/models/node_new_health_report_event_py3.py delete mode 100644 customSDK/servicefabric/models/node_open_failed_event.py delete mode 100644 customSDK/servicefabric/models/node_open_failed_event_py3.py delete mode 100644 customSDK/servicefabric/models/node_open_succeeded_event.py delete mode 100644 customSDK/servicefabric/models/node_open_succeeded_event_py3.py delete mode 100644 customSDK/servicefabric/models/node_removed_from_cluster_event.py delete mode 100644 customSDK/servicefabric/models/node_removed_from_cluster_event_py3.py delete mode 100644 customSDK/servicefabric/models/node_repair_impact_description.py delete mode 100644 customSDK/servicefabric/models/node_repair_impact_description_py3.py delete mode 100644 customSDK/servicefabric/models/node_repair_target_description.py delete mode 100644 customSDK/servicefabric/models/node_repair_target_description_py3.py delete mode 100644 customSDK/servicefabric/models/node_result.py delete mode 100644 customSDK/servicefabric/models/node_result_py3.py delete mode 100644 customSDK/servicefabric/models/node_tags_description.py delete mode 100644 customSDK/servicefabric/models/node_tags_description_py3.py delete mode 100644 customSDK/servicefabric/models/node_transition_progress.py delete mode 100644 customSDK/servicefabric/models/node_transition_progress_py3.py delete mode 100644 customSDK/servicefabric/models/node_transition_result.py delete mode 100644 customSDK/servicefabric/models/node_transition_result_py3.py delete mode 100644 customSDK/servicefabric/models/node_type_health_policy_map_item.py delete mode 100644 customSDK/servicefabric/models/node_type_health_policy_map_item_py3.py delete mode 100644 customSDK/servicefabric/models/node_type_nodes_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/node_type_nodes_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/node_up_event.py delete mode 100644 customSDK/servicefabric/models/node_up_event_py3.py delete mode 100644 customSDK/servicefabric/models/node_upgrade_progress_info.py delete mode 100644 customSDK/servicefabric/models/node_upgrade_progress_info_py3.py delete mode 100644 customSDK/servicefabric/models/nodes_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/nodes_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/operation_status.py delete mode 100644 customSDK/servicefabric/models/operation_status_py3.py delete mode 100644 customSDK/servicefabric/models/package_sharing_policy_info.py delete mode 100644 customSDK/servicefabric/models/package_sharing_policy_info_py3.py delete mode 100644 customSDK/servicefabric/models/paged_application_info_list.py delete mode 100644 customSDK/servicefabric/models/paged_application_info_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_application_resource_description_list.py delete mode 100644 customSDK/servicefabric/models/paged_application_resource_description_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_application_type_info_list.py delete mode 100644 customSDK/servicefabric/models/paged_application_type_info_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_backup_configuration_info_list.py delete mode 100644 customSDK/servicefabric/models/paged_backup_configuration_info_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_backup_entity_list.py delete mode 100644 customSDK/servicefabric/models/paged_backup_entity_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_backup_info_list.py delete mode 100644 customSDK/servicefabric/models/paged_backup_info_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_backup_policy_description_list.py delete mode 100644 customSDK/servicefabric/models/paged_backup_policy_description_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_compose_deployment_status_info_list.py delete mode 100644 customSDK/servicefabric/models/paged_compose_deployment_status_info_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_deployed_application_info_list.py delete mode 100644 customSDK/servicefabric/models/paged_deployed_application_info_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_gateway_resource_description_list.py delete mode 100644 customSDK/servicefabric/models/paged_gateway_resource_description_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_network_resource_description_list.py delete mode 100644 customSDK/servicefabric/models/paged_network_resource_description_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_node_info_list.py delete mode 100644 customSDK/servicefabric/models/paged_node_info_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_property_info_list.py delete mode 100644 customSDK/servicefabric/models/paged_property_info_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_replica_info_list.py delete mode 100644 customSDK/servicefabric/models/paged_replica_info_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_secret_resource_description_list.py delete mode 100644 customSDK/servicefabric/models/paged_secret_resource_description_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_secret_value_resource_description_list.py delete mode 100644 customSDK/servicefabric/models/paged_secret_value_resource_description_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_service_info_list.py delete mode 100644 customSDK/servicefabric/models/paged_service_info_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_service_partition_info_list.py delete mode 100644 customSDK/servicefabric/models/paged_service_partition_info_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_service_replica_description_list.py delete mode 100644 customSDK/servicefabric/models/paged_service_replica_description_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_service_resource_description_list.py delete mode 100644 customSDK/servicefabric/models/paged_service_resource_description_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_sub_name_info_list.py delete mode 100644 customSDK/servicefabric/models/paged_sub_name_info_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_update_partition_load_result_list.py delete mode 100644 customSDK/servicefabric/models/paged_update_partition_load_result_list_py3.py delete mode 100644 customSDK/servicefabric/models/paged_volume_resource_description_list.py delete mode 100644 customSDK/servicefabric/models/paged_volume_resource_description_list_py3.py delete mode 100644 customSDK/servicefabric/models/partition_analysis_event.py delete mode 100644 customSDK/servicefabric/models/partition_analysis_event_py3.py delete mode 100644 customSDK/servicefabric/models/partition_backup_configuration_info.py delete mode 100644 customSDK/servicefabric/models/partition_backup_configuration_info_py3.py delete mode 100644 customSDK/servicefabric/models/partition_backup_entity.py delete mode 100644 customSDK/servicefabric/models/partition_backup_entity_py3.py delete mode 100644 customSDK/servicefabric/models/partition_data_loss_progress.py delete mode 100644 customSDK/servicefabric/models/partition_data_loss_progress_py3.py delete mode 100644 customSDK/servicefabric/models/partition_event.py delete mode 100644 customSDK/servicefabric/models/partition_event_py3.py delete mode 100644 customSDK/servicefabric/models/partition_health.py delete mode 100644 customSDK/servicefabric/models/partition_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/partition_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/partition_health_py3.py delete mode 100644 customSDK/servicefabric/models/partition_health_report_expired_event.py delete mode 100644 customSDK/servicefabric/models/partition_health_report_expired_event_py3.py delete mode 100644 customSDK/servicefabric/models/partition_health_state.py delete mode 100644 customSDK/servicefabric/models/partition_health_state_chunk.py delete mode 100644 customSDK/servicefabric/models/partition_health_state_chunk_list.py delete mode 100644 customSDK/servicefabric/models/partition_health_state_chunk_list_py3.py delete mode 100644 customSDK/servicefabric/models/partition_health_state_chunk_py3.py delete mode 100644 customSDK/servicefabric/models/partition_health_state_filter.py delete mode 100644 customSDK/servicefabric/models/partition_health_state_filter_py3.py delete mode 100644 customSDK/servicefabric/models/partition_health_state_py3.py delete mode 100644 customSDK/servicefabric/models/partition_information.py delete mode 100644 customSDK/servicefabric/models/partition_information_py3.py delete mode 100644 customSDK/servicefabric/models/partition_instance_count_scale_mechanism.py delete mode 100644 customSDK/servicefabric/models/partition_instance_count_scale_mechanism_py3.py delete mode 100644 customSDK/servicefabric/models/partition_load_information.py delete mode 100644 customSDK/servicefabric/models/partition_load_information_py3.py delete mode 100644 customSDK/servicefabric/models/partition_metric_load_description.py delete mode 100644 customSDK/servicefabric/models/partition_metric_load_description_py3.py delete mode 100644 customSDK/servicefabric/models/partition_new_health_report_event.py delete mode 100644 customSDK/servicefabric/models/partition_new_health_report_event_py3.py delete mode 100644 customSDK/servicefabric/models/partition_primary_move_analysis_event.py delete mode 100644 customSDK/servicefabric/models/partition_primary_move_analysis_event_py3.py delete mode 100644 customSDK/servicefabric/models/partition_quorum_loss_progress.py delete mode 100644 customSDK/servicefabric/models/partition_quorum_loss_progress_py3.py delete mode 100644 customSDK/servicefabric/models/partition_reconfigured_event.py delete mode 100644 customSDK/servicefabric/models/partition_reconfigured_event_py3.py delete mode 100644 customSDK/servicefabric/models/partition_restart_progress.py delete mode 100644 customSDK/servicefabric/models/partition_restart_progress_py3.py delete mode 100644 customSDK/servicefabric/models/partition_safety_check.py delete mode 100644 customSDK/servicefabric/models/partition_safety_check_py3.py delete mode 100644 customSDK/servicefabric/models/partition_scheme_description.py delete mode 100644 customSDK/servicefabric/models/partition_scheme_description_py3.py delete mode 100644 customSDK/servicefabric/models/partitions_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/partitions_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/primary_replicator_status.py delete mode 100644 customSDK/servicefabric/models/primary_replicator_status_py3.py delete mode 100644 customSDK/servicefabric/models/probe.py delete mode 100644 customSDK/servicefabric/models/probe_exec.py delete mode 100644 customSDK/servicefabric/models/probe_exec_py3.py delete mode 100644 customSDK/servicefabric/models/probe_http_get.py delete mode 100644 customSDK/servicefabric/models/probe_http_get_headers.py delete mode 100644 customSDK/servicefabric/models/probe_http_get_headers_py3.py delete mode 100644 customSDK/servicefabric/models/probe_http_get_py3.py delete mode 100644 customSDK/servicefabric/models/probe_py3.py delete mode 100644 customSDK/servicefabric/models/probe_tcp_socket.py delete mode 100644 customSDK/servicefabric/models/probe_tcp_socket_py3.py delete mode 100644 customSDK/servicefabric/models/property_batch_description_list.py delete mode 100644 customSDK/servicefabric/models/property_batch_description_list_py3.py delete mode 100644 customSDK/servicefabric/models/property_batch_info.py delete mode 100644 customSDK/servicefabric/models/property_batch_info_py3.py delete mode 100644 customSDK/servicefabric/models/property_batch_operation.py delete mode 100644 customSDK/servicefabric/models/property_batch_operation_py3.py delete mode 100644 customSDK/servicefabric/models/property_description.py delete mode 100644 customSDK/servicefabric/models/property_description_py3.py delete mode 100644 customSDK/servicefabric/models/property_info.py delete mode 100644 customSDK/servicefabric/models/property_info_py3.py delete mode 100644 customSDK/servicefabric/models/property_metadata.py delete mode 100644 customSDK/servicefabric/models/property_metadata_py3.py delete mode 100644 customSDK/servicefabric/models/property_value.py delete mode 100644 customSDK/servicefabric/models/property_value_py3.py delete mode 100644 customSDK/servicefabric/models/provision_application_type_description.py delete mode 100644 customSDK/servicefabric/models/provision_application_type_description_base.py delete mode 100644 customSDK/servicefabric/models/provision_application_type_description_base_py3.py delete mode 100644 customSDK/servicefabric/models/provision_application_type_description_py3.py delete mode 100644 customSDK/servicefabric/models/provision_fabric_description.py delete mode 100644 customSDK/servicefabric/models/provision_fabric_description_py3.py delete mode 100644 customSDK/servicefabric/models/put_property_batch_operation.py delete mode 100644 customSDK/servicefabric/models/put_property_batch_operation_py3.py delete mode 100644 customSDK/servicefabric/models/reconfiguration_information.py delete mode 100644 customSDK/servicefabric/models/reconfiguration_information_py3.py delete mode 100644 customSDK/servicefabric/models/registry_credential.py delete mode 100644 customSDK/servicefabric/models/registry_credential_py3.py delete mode 100644 customSDK/servicefabric/models/reliable_collections_ref.py delete mode 100644 customSDK/servicefabric/models/reliable_collections_ref_py3.py delete mode 100644 customSDK/servicefabric/models/remote_replicator_acknowledgement_detail.py delete mode 100644 customSDK/servicefabric/models/remote_replicator_acknowledgement_detail_py3.py delete mode 100644 customSDK/servicefabric/models/remote_replicator_acknowledgement_status.py delete mode 100644 customSDK/servicefabric/models/remote_replicator_acknowledgement_status_py3.py delete mode 100644 customSDK/servicefabric/models/remote_replicator_status.py delete mode 100644 customSDK/servicefabric/models/remote_replicator_status_py3.py delete mode 100644 customSDK/servicefabric/models/repair_impact_description_base.py delete mode 100644 customSDK/servicefabric/models/repair_impact_description_base_py3.py delete mode 100644 customSDK/servicefabric/models/repair_target_description_base.py delete mode 100644 customSDK/servicefabric/models/repair_target_description_base_py3.py delete mode 100644 customSDK/servicefabric/models/repair_task.py delete mode 100644 customSDK/servicefabric/models/repair_task_approve_description.py delete mode 100644 customSDK/servicefabric/models/repair_task_approve_description_py3.py delete mode 100644 customSDK/servicefabric/models/repair_task_cancel_description.py delete mode 100644 customSDK/servicefabric/models/repair_task_cancel_description_py3.py delete mode 100644 customSDK/servicefabric/models/repair_task_delete_description.py delete mode 100644 customSDK/servicefabric/models/repair_task_delete_description_py3.py delete mode 100644 customSDK/servicefabric/models/repair_task_history.py delete mode 100644 customSDK/servicefabric/models/repair_task_history_py3.py delete mode 100644 customSDK/servicefabric/models/repair_task_py3.py delete mode 100644 customSDK/servicefabric/models/repair_task_update_health_policy_description.py delete mode 100644 customSDK/servicefabric/models/repair_task_update_health_policy_description_py3.py delete mode 100644 customSDK/servicefabric/models/repair_task_update_info.py delete mode 100644 customSDK/servicefabric/models/repair_task_update_info_py3.py delete mode 100644 customSDK/servicefabric/models/replica_event.py delete mode 100644 customSDK/servicefabric/models/replica_event_py3.py delete mode 100644 customSDK/servicefabric/models/replica_health.py delete mode 100644 customSDK/servicefabric/models/replica_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/replica_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/replica_health_py3.py delete mode 100644 customSDK/servicefabric/models/replica_health_state.py delete mode 100644 customSDK/servicefabric/models/replica_health_state_chunk.py delete mode 100644 customSDK/servicefabric/models/replica_health_state_chunk_list.py delete mode 100644 customSDK/servicefabric/models/replica_health_state_chunk_list_py3.py delete mode 100644 customSDK/servicefabric/models/replica_health_state_chunk_py3.py delete mode 100644 customSDK/servicefabric/models/replica_health_state_filter.py delete mode 100644 customSDK/servicefabric/models/replica_health_state_filter_py3.py delete mode 100644 customSDK/servicefabric/models/replica_health_state_py3.py delete mode 100644 customSDK/servicefabric/models/replica_info.py delete mode 100644 customSDK/servicefabric/models/replica_info_py3.py delete mode 100644 customSDK/servicefabric/models/replica_lifecycle_description.py delete mode 100644 customSDK/servicefabric/models/replica_lifecycle_description_py3.py delete mode 100644 customSDK/servicefabric/models/replica_metric_load_description.py delete mode 100644 customSDK/servicefabric/models/replica_metric_load_description_py3.py delete mode 100644 customSDK/servicefabric/models/replica_status_base.py delete mode 100644 customSDK/servicefabric/models/replica_status_base_py3.py delete mode 100644 customSDK/servicefabric/models/replicas_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/replicas_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/replicator_queue_status.py delete mode 100644 customSDK/servicefabric/models/replicator_queue_status_py3.py delete mode 100644 customSDK/servicefabric/models/replicator_status.py delete mode 100644 customSDK/servicefabric/models/replicator_status_py3.py delete mode 100644 customSDK/servicefabric/models/resolved_service_endpoint.py delete mode 100644 customSDK/servicefabric/models/resolved_service_endpoint_py3.py delete mode 100644 customSDK/servicefabric/models/resolved_service_partition.py delete mode 100644 customSDK/servicefabric/models/resolved_service_partition_py3.py delete mode 100644 customSDK/servicefabric/models/resource_limits.py delete mode 100644 customSDK/servicefabric/models/resource_limits_py3.py delete mode 100644 customSDK/servicefabric/models/resource_requests.py delete mode 100644 customSDK/servicefabric/models/resource_requests_py3.py delete mode 100644 customSDK/servicefabric/models/resource_requirements.py delete mode 100644 customSDK/servicefabric/models/resource_requirements_py3.py delete mode 100644 customSDK/servicefabric/models/restart_deployed_code_package_description.py delete mode 100644 customSDK/servicefabric/models/restart_deployed_code_package_description_py3.py delete mode 100644 customSDK/servicefabric/models/restart_node_description.py delete mode 100644 customSDK/servicefabric/models/restart_node_description_py3.py delete mode 100644 customSDK/servicefabric/models/restart_partition_result.py delete mode 100644 customSDK/servicefabric/models/restart_partition_result_py3.py delete mode 100644 customSDK/servicefabric/models/restore_partition_description.py delete mode 100644 customSDK/servicefabric/models/restore_partition_description_py3.py delete mode 100644 customSDK/servicefabric/models/restore_progress_info.py delete mode 100644 customSDK/servicefabric/models/restore_progress_info_py3.py delete mode 100644 customSDK/servicefabric/models/resume_application_upgrade_description.py delete mode 100644 customSDK/servicefabric/models/resume_application_upgrade_description_py3.py delete mode 100644 customSDK/servicefabric/models/resume_cluster_upgrade_description.py delete mode 100644 customSDK/servicefabric/models/resume_cluster_upgrade_description_py3.py delete mode 100644 customSDK/servicefabric/models/retention_policy_description.py delete mode 100644 customSDK/servicefabric/models/retention_policy_description_py3.py delete mode 100644 customSDK/servicefabric/models/rolling_upgrade_update_description.py delete mode 100644 customSDK/servicefabric/models/rolling_upgrade_update_description_py3.py delete mode 100644 customSDK/servicefabric/models/run_to_completion_execution_policy.py delete mode 100644 customSDK/servicefabric/models/run_to_completion_execution_policy_py3.py delete mode 100644 customSDK/servicefabric/models/safety_check.py delete mode 100644 customSDK/servicefabric/models/safety_check_py3.py delete mode 100644 customSDK/servicefabric/models/safety_check_wrapper.py delete mode 100644 customSDK/servicefabric/models/safety_check_wrapper_py3.py delete mode 100644 customSDK/servicefabric/models/scaling_mechanism_description.py delete mode 100644 customSDK/servicefabric/models/scaling_mechanism_description_py3.py delete mode 100644 customSDK/servicefabric/models/scaling_policy_description.py delete mode 100644 customSDK/servicefabric/models/scaling_policy_description_py3.py delete mode 100644 customSDK/servicefabric/models/scaling_trigger_description.py delete mode 100644 customSDK/servicefabric/models/scaling_trigger_description_py3.py delete mode 100644 customSDK/servicefabric/models/secondary_active_replicator_status.py delete mode 100644 customSDK/servicefabric/models/secondary_active_replicator_status_py3.py delete mode 100644 customSDK/servicefabric/models/secondary_idle_replicator_status.py delete mode 100644 customSDK/servicefabric/models/secondary_idle_replicator_status_py3.py delete mode 100644 customSDK/servicefabric/models/secondary_replicator_status.py delete mode 100644 customSDK/servicefabric/models/secondary_replicator_status_py3.py delete mode 100644 customSDK/servicefabric/models/secret_resource_description.py delete mode 100644 customSDK/servicefabric/models/secret_resource_description_py3.py delete mode 100644 customSDK/servicefabric/models/secret_resource_properties.py delete mode 100644 customSDK/servicefabric/models/secret_resource_properties_base.py delete mode 100644 customSDK/servicefabric/models/secret_resource_properties_base_py3.py delete mode 100644 customSDK/servicefabric/models/secret_resource_properties_py3.py delete mode 100644 customSDK/servicefabric/models/secret_value.py delete mode 100644 customSDK/servicefabric/models/secret_value_properties.py delete mode 100644 customSDK/servicefabric/models/secret_value_properties_py3.py delete mode 100644 customSDK/servicefabric/models/secret_value_py3.py delete mode 100644 customSDK/servicefabric/models/secret_value_resource_description.py delete mode 100644 customSDK/servicefabric/models/secret_value_resource_description_py3.py delete mode 100644 customSDK/servicefabric/models/seed_node_safety_check.py delete mode 100644 customSDK/servicefabric/models/seed_node_safety_check_py3.py delete mode 100644 customSDK/servicefabric/models/selected_partition.py delete mode 100644 customSDK/servicefabric/models/selected_partition_py3.py delete mode 100644 customSDK/servicefabric/models/service_backup_configuration_info.py delete mode 100644 customSDK/servicefabric/models/service_backup_configuration_info_py3.py delete mode 100644 customSDK/servicefabric/models/service_backup_entity.py delete mode 100644 customSDK/servicefabric/models/service_backup_entity_py3.py delete mode 100644 customSDK/servicefabric/models/service_correlation_description.py delete mode 100644 customSDK/servicefabric/models/service_correlation_description_py3.py delete mode 100644 customSDK/servicefabric/models/service_created_event.py delete mode 100644 customSDK/servicefabric/models/service_created_event_py3.py delete mode 100644 customSDK/servicefabric/models/service_deleted_event.py delete mode 100644 customSDK/servicefabric/models/service_deleted_event_py3.py delete mode 100644 customSDK/servicefabric/models/service_description.py delete mode 100644 customSDK/servicefabric/models/service_description_py3.py delete mode 100644 customSDK/servicefabric/models/service_event.py delete mode 100644 customSDK/servicefabric/models/service_event_py3.py delete mode 100644 customSDK/servicefabric/models/service_fabric_client_ap_is_enums.py delete mode 100644 customSDK/servicefabric/models/service_from_template_description.py delete mode 100644 customSDK/servicefabric/models/service_from_template_description_py3.py delete mode 100644 customSDK/servicefabric/models/service_health.py delete mode 100644 customSDK/servicefabric/models/service_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/service_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/service_health_py3.py delete mode 100644 customSDK/servicefabric/models/service_health_report_expired_event.py delete mode 100644 customSDK/servicefabric/models/service_health_report_expired_event_py3.py delete mode 100644 customSDK/servicefabric/models/service_health_state.py delete mode 100644 customSDK/servicefabric/models/service_health_state_chunk.py delete mode 100644 customSDK/servicefabric/models/service_health_state_chunk_list.py delete mode 100644 customSDK/servicefabric/models/service_health_state_chunk_list_py3.py delete mode 100644 customSDK/servicefabric/models/service_health_state_chunk_py3.py delete mode 100644 customSDK/servicefabric/models/service_health_state_filter.py delete mode 100644 customSDK/servicefabric/models/service_health_state_filter_py3.py delete mode 100644 customSDK/servicefabric/models/service_health_state_py3.py delete mode 100644 customSDK/servicefabric/models/service_identity.py delete mode 100644 customSDK/servicefabric/models/service_identity_py3.py delete mode 100644 customSDK/servicefabric/models/service_info.py delete mode 100644 customSDK/servicefabric/models/service_info_py3.py delete mode 100644 customSDK/servicefabric/models/service_load_metric_description.py delete mode 100644 customSDK/servicefabric/models/service_load_metric_description_py3.py delete mode 100644 customSDK/servicefabric/models/service_name_info.py delete mode 100644 customSDK/servicefabric/models/service_name_info_py3.py delete mode 100644 customSDK/servicefabric/models/service_new_health_report_event.py delete mode 100644 customSDK/servicefabric/models/service_new_health_report_event_py3.py delete mode 100644 customSDK/servicefabric/models/service_partition_info.py delete mode 100644 customSDK/servicefabric/models/service_partition_info_py3.py delete mode 100644 customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description.py delete mode 100644 customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description_py3.py delete mode 100644 customSDK/servicefabric/models/service_placement_invalid_domain_policy_description.py delete mode 100644 customSDK/servicefabric/models/service_placement_invalid_domain_policy_description_py3.py delete mode 100644 customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description.py delete mode 100644 customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description_py3.py delete mode 100644 customSDK/servicefabric/models/service_placement_policy_description.py delete mode 100644 customSDK/servicefabric/models/service_placement_policy_description_py3.py delete mode 100644 customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description.py delete mode 100644 customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description_py3.py delete mode 100644 customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description.py delete mode 100644 customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description_py3.py delete mode 100644 customSDK/servicefabric/models/service_placement_required_domain_policy_description.py delete mode 100644 customSDK/servicefabric/models/service_placement_required_domain_policy_description_py3.py delete mode 100644 customSDK/servicefabric/models/service_properties.py delete mode 100644 customSDK/servicefabric/models/service_properties_py3.py delete mode 100644 customSDK/servicefabric/models/service_replica_description.py delete mode 100644 customSDK/servicefabric/models/service_replica_description_py3.py delete mode 100644 customSDK/servicefabric/models/service_replica_properties.py delete mode 100644 customSDK/servicefabric/models/service_replica_properties_py3.py delete mode 100644 customSDK/servicefabric/models/service_resource_description.py delete mode 100644 customSDK/servicefabric/models/service_resource_description_py3.py delete mode 100644 customSDK/servicefabric/models/service_type_description.py delete mode 100644 customSDK/servicefabric/models/service_type_description_py3.py delete mode 100644 customSDK/servicefabric/models/service_type_extension_description.py delete mode 100644 customSDK/servicefabric/models/service_type_extension_description_py3.py delete mode 100644 customSDK/servicefabric/models/service_type_health_policy.py delete mode 100644 customSDK/servicefabric/models/service_type_health_policy_map_item.py delete mode 100644 customSDK/servicefabric/models/service_type_health_policy_map_item_py3.py delete mode 100644 customSDK/servicefabric/models/service_type_health_policy_py3.py delete mode 100644 customSDK/servicefabric/models/service_type_info.py delete mode 100644 customSDK/servicefabric/models/service_type_info_py3.py delete mode 100644 customSDK/servicefabric/models/service_type_manifest.py delete mode 100644 customSDK/servicefabric/models/service_type_manifest_py3.py delete mode 100644 customSDK/servicefabric/models/service_update_description.py delete mode 100644 customSDK/servicefabric/models/service_update_description_py3.py delete mode 100644 customSDK/servicefabric/models/service_upgrade_progress.py delete mode 100644 customSDK/servicefabric/models/service_upgrade_progress_py3.py delete mode 100644 customSDK/servicefabric/models/services_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/services_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/setting.py delete mode 100644 customSDK/servicefabric/models/setting_py3.py delete mode 100644 customSDK/servicefabric/models/singleton_partition_information.py delete mode 100644 customSDK/servicefabric/models/singleton_partition_information_py3.py delete mode 100644 customSDK/servicefabric/models/singleton_partition_scheme_description.py delete mode 100644 customSDK/servicefabric/models/singleton_partition_scheme_description_py3.py delete mode 100644 customSDK/servicefabric/models/start_cluster_upgrade_description.py delete mode 100644 customSDK/servicefabric/models/start_cluster_upgrade_description_py3.py delete mode 100644 customSDK/servicefabric/models/started_chaos_event.py delete mode 100644 customSDK/servicefabric/models/started_chaos_event_py3.py delete mode 100644 customSDK/servicefabric/models/stateful_replica_health_report_expired_event.py delete mode 100644 customSDK/servicefabric/models/stateful_replica_health_report_expired_event_py3.py delete mode 100644 customSDK/servicefabric/models/stateful_replica_new_health_report_event.py delete mode 100644 customSDK/servicefabric/models/stateful_replica_new_health_report_event_py3.py delete mode 100644 customSDK/servicefabric/models/stateful_service_description.py delete mode 100644 customSDK/servicefabric/models/stateful_service_description_py3.py delete mode 100644 customSDK/servicefabric/models/stateful_service_info.py delete mode 100644 customSDK/servicefabric/models/stateful_service_info_py3.py delete mode 100644 customSDK/servicefabric/models/stateful_service_partition_info.py delete mode 100644 customSDK/servicefabric/models/stateful_service_partition_info_py3.py delete mode 100644 customSDK/servicefabric/models/stateful_service_replica_health.py delete mode 100644 customSDK/servicefabric/models/stateful_service_replica_health_py3.py delete mode 100644 customSDK/servicefabric/models/stateful_service_replica_health_state.py delete mode 100644 customSDK/servicefabric/models/stateful_service_replica_health_state_py3.py delete mode 100644 customSDK/servicefabric/models/stateful_service_replica_info.py delete mode 100644 customSDK/servicefabric/models/stateful_service_replica_info_py3.py delete mode 100644 customSDK/servicefabric/models/stateful_service_type_description.py delete mode 100644 customSDK/servicefabric/models/stateful_service_type_description_py3.py delete mode 100644 customSDK/servicefabric/models/stateful_service_update_description.py delete mode 100644 customSDK/servicefabric/models/stateful_service_update_description_py3.py delete mode 100644 customSDK/servicefabric/models/stateless_replica_health_report_expired_event.py delete mode 100644 customSDK/servicefabric/models/stateless_replica_health_report_expired_event_py3.py delete mode 100644 customSDK/servicefabric/models/stateless_replica_new_health_report_event.py delete mode 100644 customSDK/servicefabric/models/stateless_replica_new_health_report_event_py3.py delete mode 100644 customSDK/servicefabric/models/stateless_service_description.py delete mode 100644 customSDK/servicefabric/models/stateless_service_description_py3.py delete mode 100644 customSDK/servicefabric/models/stateless_service_info.py delete mode 100644 customSDK/servicefabric/models/stateless_service_info_py3.py delete mode 100644 customSDK/servicefabric/models/stateless_service_instance_health.py delete mode 100644 customSDK/servicefabric/models/stateless_service_instance_health_py3.py delete mode 100644 customSDK/servicefabric/models/stateless_service_instance_health_state.py delete mode 100644 customSDK/servicefabric/models/stateless_service_instance_health_state_py3.py delete mode 100644 customSDK/servicefabric/models/stateless_service_instance_info.py delete mode 100644 customSDK/servicefabric/models/stateless_service_instance_info_py3.py delete mode 100644 customSDK/servicefabric/models/stateless_service_partition_info.py delete mode 100644 customSDK/servicefabric/models/stateless_service_partition_info_py3.py delete mode 100644 customSDK/servicefabric/models/stateless_service_type_description.py delete mode 100644 customSDK/servicefabric/models/stateless_service_type_description_py3.py delete mode 100644 customSDK/servicefabric/models/stateless_service_update_description.py delete mode 100644 customSDK/servicefabric/models/stateless_service_update_description_py3.py delete mode 100644 customSDK/servicefabric/models/stopped_chaos_event.py delete mode 100644 customSDK/servicefabric/models/stopped_chaos_event_py3.py delete mode 100644 customSDK/servicefabric/models/string_property_value.py delete mode 100644 customSDK/servicefabric/models/string_property_value_py3.py delete mode 100644 customSDK/servicefabric/models/successful_property_batch_info.py delete mode 100644 customSDK/servicefabric/models/successful_property_batch_info_py3.py delete mode 100644 customSDK/servicefabric/models/system_application_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/system_application_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/tcp_config.py delete mode 100644 customSDK/servicefabric/models/tcp_config_py3.py delete mode 100644 customSDK/servicefabric/models/test_error_chaos_event.py delete mode 100644 customSDK/servicefabric/models/test_error_chaos_event_py3.py delete mode 100644 customSDK/servicefabric/models/time_based_backup_schedule_description.py delete mode 100644 customSDK/servicefabric/models/time_based_backup_schedule_description_py3.py delete mode 100644 customSDK/servicefabric/models/time_of_day.py delete mode 100644 customSDK/servicefabric/models/time_of_day_py3.py delete mode 100644 customSDK/servicefabric/models/time_range.py delete mode 100644 customSDK/servicefabric/models/time_range_py3.py delete mode 100644 customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description.py delete mode 100644 customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description_py3.py delete mode 100644 customSDK/servicefabric/models/unplaced_replica_information.py delete mode 100644 customSDK/servicefabric/models/unplaced_replica_information_py3.py delete mode 100644 customSDK/servicefabric/models/unprovision_application_type_description_info.py delete mode 100644 customSDK/servicefabric/models/unprovision_application_type_description_info_py3.py delete mode 100644 customSDK/servicefabric/models/unprovision_fabric_description.py delete mode 100644 customSDK/servicefabric/models/unprovision_fabric_description_py3.py delete mode 100644 customSDK/servicefabric/models/update_cluster_upgrade_description.py delete mode 100644 customSDK/servicefabric/models/update_cluster_upgrade_description_py3.py delete mode 100644 customSDK/servicefabric/models/update_partition_load_result.py delete mode 100644 customSDK/servicefabric/models/update_partition_load_result_py3.py delete mode 100644 customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/upgrade_domain_deployed_applications_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/upgrade_domain_deployed_applications_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/upgrade_domain_info.py delete mode 100644 customSDK/servicefabric/models/upgrade_domain_info_py3.py delete mode 100644 customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation.py delete mode 100644 customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation_py3.py delete mode 100644 customSDK/servicefabric/models/upgrade_orchestration_service_state.py delete mode 100644 customSDK/servicefabric/models/upgrade_orchestration_service_state_py3.py delete mode 100644 customSDK/servicefabric/models/upgrade_orchestration_service_state_summary.py delete mode 100644 customSDK/servicefabric/models/upgrade_orchestration_service_state_summary_py3.py delete mode 100644 customSDK/servicefabric/models/upgrade_unit_info.py delete mode 100644 customSDK/servicefabric/models/upgrade_unit_info_py3.py delete mode 100644 customSDK/servicefabric/models/upload_chunk_range.py delete mode 100644 customSDK/servicefabric/models/upload_chunk_range_py3.py delete mode 100644 customSDK/servicefabric/models/upload_session.py delete mode 100644 customSDK/servicefabric/models/upload_session_info.py delete mode 100644 customSDK/servicefabric/models/upload_session_info_py3.py delete mode 100644 customSDK/servicefabric/models/upload_session_py3.py delete mode 100644 customSDK/servicefabric/models/usage_info.py delete mode 100644 customSDK/servicefabric/models/usage_info_py3.py delete mode 100644 customSDK/servicefabric/models/validate_cluster_upgrade_result.py delete mode 100644 customSDK/servicefabric/models/validate_cluster_upgrade_result_py3.py delete mode 100644 customSDK/servicefabric/models/validation_failed_chaos_event.py delete mode 100644 customSDK/servicefabric/models/validation_failed_chaos_event_py3.py delete mode 100644 customSDK/servicefabric/models/volume_provider_parameters_azure_file.py delete mode 100644 customSDK/servicefabric/models/volume_provider_parameters_azure_file_py3.py delete mode 100644 customSDK/servicefabric/models/volume_reference.py delete mode 100644 customSDK/servicefabric/models/volume_reference_py3.py delete mode 100644 customSDK/servicefabric/models/volume_resource_description.py delete mode 100644 customSDK/servicefabric/models/volume_resource_description_py3.py delete mode 100644 customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check.py delete mode 100644 customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check_py3.py delete mode 100644 customSDK/servicefabric/models/wait_for_primary_placement_safety_check.py delete mode 100644 customSDK/servicefabric/models/wait_for_primary_placement_safety_check_py3.py delete mode 100644 customSDK/servicefabric/models/wait_for_primary_swap_safety_check.py delete mode 100644 customSDK/servicefabric/models/wait_for_primary_swap_safety_check_py3.py delete mode 100644 customSDK/servicefabric/models/wait_for_reconfiguration_safety_check.py delete mode 100644 customSDK/servicefabric/models/wait_for_reconfiguration_safety_check_py3.py delete mode 100644 customSDK/servicefabric/models/waiting_chaos_event.py delete mode 100644 customSDK/servicefabric/models/waiting_chaos_event_py3.py delete mode 100644 customSDK/servicefabric/operations/mesh_application_operations.py delete mode 100644 customSDK/servicefabric/operations/mesh_code_package_operations.py delete mode 100644 customSDK/servicefabric/operations/mesh_gateway_operations.py delete mode 100644 customSDK/servicefabric/operations/mesh_network_operations.py delete mode 100644 customSDK/servicefabric/operations/mesh_secret_operations.py delete mode 100644 customSDK/servicefabric/operations/mesh_secret_value_operations.py delete mode 100644 customSDK/servicefabric/operations/mesh_service_operations.py delete mode 100644 customSDK/servicefabric/operations/mesh_service_replica_operations.py delete mode 100644 customSDK/servicefabric/operations/mesh_volume_operations.py delete mode 100644 customSDK/servicefabric/service_fabric_client_ap_is.py delete mode 100644 customSDK/servicefabric/version.py diff --git a/customSDK/servicefabric/_configuration.py b/customSDK/servicefabric/_configuration.py index e1899c34..db55caa7 100644 --- a/customSDK/servicefabric/_configuration.py +++ b/customSDK/servicefabric/_configuration.py @@ -28,7 +28,7 @@ class ServiceFabricClientAPIsConfiguration(Configuration): # pylint: disable=to :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :keyword api_version: Api Version. Default value is "8.2.0.46". Note that overriding this + :keyword api_version: Api Version. Default value is "9.0.0.46". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -40,7 +40,7 @@ def __init__( ): # type: (...) -> None super(ServiceFabricClientAPIsConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/customSDK/servicefabric/_patch.py b/customSDK/servicefabric/_patch.py index 74e48ecd..0f5b2a7c 100644 --- a/customSDK/servicefabric/_patch.py +++ b/customSDK/servicefabric/_patch.py @@ -28,4 +28,29 @@ # This file is used for handwritten extensions to the generated code. Example: # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): - pass \ No newline at end of file + pass + +# from ._service_fabric_client_apis import ServiceFabricClientAPIs as ServiceClientGenerated +# from azure.core.pipeline import PipelineRequest +# from azure.core.pipeline.policies import SansIOHTTPPolicy + +# class MyAuthenticationPolicy(SansIOHTTPPolicy): + +# def __init__(self, key: str): +# self.key = key + +# def on_request(self, request: PipelineRequest): +# # request.http_request.headers["Authorization"] = f"My key is {self.key}" +# return super().on_request(request) + +# class ServiceClient(ServiceClientGenerated): + +# def __init__(self, endpoint: str, credential: str, **kwargs): +# super().__init__( +# endpoint=endpoint, +# credential=credential, +# authentication_policy=kwargs.pop("authentication_policy", MyAuthenticationPolicy(credential)), +# **kwargs +# ) + +# __all__ = ["ServiceClient"] \ No newline at end of file diff --git a/customSDK/servicefabric/_service_fabric_client_apis.py b/customSDK/servicefabric/_service_fabric_client_apis.py index 5d606374..8fb50013 100644 --- a/customSDK/servicefabric/_service_fabric_client_apis.py +++ b/customSDK/servicefabric/_service_fabric_client_apis.py @@ -50,7 +50,7 @@ class ServiceFabricClientAPIs(ServiceFabricClientAPIsOperationsMixin): # pyli :type credential: ~azure.core.credentials.TokenCredential :param base_url: Service URL. Default value is "http://localhost:19080/". :type base_url: str - :keyword api_version: Api Version. Default value is "8.2.0.46". Note that overriding this + :keyword api_version: Api Version. Default value is "9.0.0.46". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ diff --git a/customSDK/servicefabric/aio/_configuration.py b/customSDK/servicefabric/aio/_configuration.py index f4266c55..322f7fc4 100644 --- a/customSDK/servicefabric/aio/_configuration.py +++ b/customSDK/servicefabric/aio/_configuration.py @@ -26,7 +26,7 @@ class ServiceFabricClientAPIsConfiguration(Configuration): # pylint: disable=to :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :keyword api_version: Api Version. Default value is "8.2.0.46". Note that overriding this + :keyword api_version: Api Version. Default value is "9.0.0.46". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -37,7 +37,7 @@ def __init__( **kwargs: Any ) -> None: super(ServiceFabricClientAPIsConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/customSDK/servicefabric/aio/_service_fabric_client_apis.py b/customSDK/servicefabric/aio/_service_fabric_client_apis.py index 122254b2..20966a86 100644 --- a/customSDK/servicefabric/aio/_service_fabric_client_apis.py +++ b/customSDK/servicefabric/aio/_service_fabric_client_apis.py @@ -48,7 +48,7 @@ class ServiceFabricClientAPIs(ServiceFabricClientAPIsOperationsMixin): # pyli :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param base_url: Service URL. Default value is "http://localhost:19080/". :type base_url: str - :keyword api_version: Api Version. Default value is "8.2.0.46". Note that overriding this + :keyword api_version: Api Version. Default value is "9.0.0.46". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ diff --git a/customSDK/servicefabric/aio/operations/_mesh_application_operations.py b/customSDK/servicefabric/aio/operations/_mesh_application_operations.py index 20e40bd5..0e07de49 100644 --- a/customSDK/servicefabric/aio/operations/_mesh_application_operations.py +++ b/customSDK/servicefabric/aio/operations/_mesh_application_operations.py @@ -70,7 +70,7 @@ async def create_or_update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(application_resource_description, 'ApplicationResourceDescription') @@ -136,7 +136,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_request( @@ -192,7 +192,7 @@ async def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_request( @@ -242,7 +242,7 @@ async def list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_list_request( @@ -299,7 +299,7 @@ async def get_upgrade_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_upgrade_progress_request( diff --git a/customSDK/servicefabric/aio/operations/_mesh_code_package_operations.py b/customSDK/servicefabric/aio/operations/_mesh_code_package_operations.py index 2bb31d57..18f738e8 100644 --- a/customSDK/servicefabric/aio/operations/_mesh_code_package_operations.py +++ b/customSDK/servicefabric/aio/operations/_mesh_code_package_operations.py @@ -77,7 +77,7 @@ async def get_container_logs( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_container_logs_request( diff --git a/customSDK/servicefabric/aio/operations/_mesh_gateway_operations.py b/customSDK/servicefabric/aio/operations/_mesh_gateway_operations.py index f88fa7dc..901d7b1a 100644 --- a/customSDK/servicefabric/aio/operations/_mesh_gateway_operations.py +++ b/customSDK/servicefabric/aio/operations/_mesh_gateway_operations.py @@ -69,7 +69,7 @@ async def create_or_update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(gateway_resource_description, 'GatewayResourceDescription') @@ -135,7 +135,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_request( @@ -191,7 +191,7 @@ async def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_request( @@ -241,7 +241,7 @@ async def list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_list_request( diff --git a/customSDK/servicefabric/aio/operations/_mesh_network_operations.py b/customSDK/servicefabric/aio/operations/_mesh_network_operations.py index 09d9cff1..ae9ba441 100644 --- a/customSDK/servicefabric/aio/operations/_mesh_network_operations.py +++ b/customSDK/servicefabric/aio/operations/_mesh_network_operations.py @@ -72,7 +72,7 @@ async def create_or_update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _network_resource_description = _models.NetworkResourceDescription(name=name, properties=properties) @@ -139,7 +139,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_request( @@ -195,7 +195,7 @@ async def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_request( @@ -245,7 +245,7 @@ async def list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_list_request( diff --git a/customSDK/servicefabric/aio/operations/_mesh_secret_operations.py b/customSDK/servicefabric/aio/operations/_mesh_secret_operations.py index 15987e68..07a091ad 100644 --- a/customSDK/servicefabric/aio/operations/_mesh_secret_operations.py +++ b/customSDK/servicefabric/aio/operations/_mesh_secret_operations.py @@ -72,7 +72,7 @@ async def create_or_update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _secret_resource_description = _models.SecretResourceDescription(properties=properties, name=name) @@ -139,7 +139,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_request( @@ -195,7 +195,7 @@ async def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_request( @@ -245,7 +245,7 @@ async def list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_list_request( diff --git a/customSDK/servicefabric/aio/operations/_mesh_secret_value_operations.py b/customSDK/servicefabric/aio/operations/_mesh_secret_value_operations.py index 385bba67..99fc25ae 100644 --- a/customSDK/servicefabric/aio/operations/_mesh_secret_value_operations.py +++ b/customSDK/servicefabric/aio/operations/_mesh_secret_value_operations.py @@ -75,7 +75,7 @@ async def add_value( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _secret_value_resource_description = _models.SecretValueResourceDescription(name=name, value=value) @@ -147,7 +147,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_request( @@ -209,7 +209,7 @@ async def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_request( @@ -263,7 +263,7 @@ async def list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_list_request( @@ -324,7 +324,7 @@ async def show( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_show_request( diff --git a/customSDK/servicefabric/aio/operations/_mesh_service_operations.py b/customSDK/servicefabric/aio/operations/_mesh_service_operations.py index 9c83cc4f..9c635127 100644 --- a/customSDK/servicefabric/aio/operations/_mesh_service_operations.py +++ b/customSDK/servicefabric/aio/operations/_mesh_service_operations.py @@ -68,7 +68,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_request( @@ -126,7 +126,7 @@ async def list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_list_request( diff --git a/customSDK/servicefabric/aio/operations/_mesh_service_replica_operations.py b/customSDK/servicefabric/aio/operations/_mesh_service_replica_operations.py index e89d82ca..fa8f5d19 100644 --- a/customSDK/servicefabric/aio/operations/_mesh_service_replica_operations.py +++ b/customSDK/servicefabric/aio/operations/_mesh_service_replica_operations.py @@ -71,7 +71,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_request( @@ -133,7 +133,7 @@ async def list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_list_request( diff --git a/customSDK/servicefabric/aio/operations/_mesh_volume_operations.py b/customSDK/servicefabric/aio/operations/_mesh_volume_operations.py index 26a38a08..11372894 100644 --- a/customSDK/servicefabric/aio/operations/_mesh_volume_operations.py +++ b/customSDK/servicefabric/aio/operations/_mesh_volume_operations.py @@ -69,7 +69,7 @@ async def create_or_update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(volume_resource_description, 'VolumeResourceDescription') @@ -135,7 +135,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_request( @@ -191,7 +191,7 @@ async def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_request( @@ -241,7 +241,7 @@ async def list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_list_request( diff --git a/customSDK/servicefabric/aio/operations/_service_fabric_client_apis_operations.py b/customSDK/servicefabric/aio/operations/_service_fabric_client_apis_operations.py index 2a1cd7ad..13ed9602 100644 --- a/customSDK/servicefabric/aio/operations/_service_fabric_client_apis_operations.py +++ b/customSDK/servicefabric/aio/operations/_service_fabric_client_apis_operations.py @@ -59,7 +59,7 @@ async def get_cluster_manifest( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_cluster_manifest_request( @@ -205,7 +205,7 @@ async def get_cluster_health( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_cluster_health_request( @@ -372,7 +372,7 @@ async def get_cluster_health_using_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _cluster_health_policies = _models.ClusterHealthPolicies(application_health_policy_map=application_health_policy_map, cluster_health_policy=cluster_health_policy) @@ -446,7 +446,7 @@ async def get_cluster_health_chunk( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_cluster_health_chunk_request( @@ -535,7 +535,7 @@ async def get_cluster_health_chunk_using_policy_and_advanced_filters( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if cluster_health_chunk_query_description is not None: @@ -628,7 +628,7 @@ async def report_cluster_health( # pylint: disable=inconsistent-return-statemen } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(health_information, 'HealthInformation') @@ -692,7 +692,7 @@ async def get_provisioned_fabric_code_version_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_provisioned_fabric_code_version_info_list_request( @@ -756,7 +756,7 @@ async def get_provisioned_fabric_config_version_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_provisioned_fabric_config_version_info_list_request( @@ -816,7 +816,7 @@ async def get_cluster_upgrade_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_cluster_upgrade_progress_request( @@ -879,7 +879,7 @@ async def get_cluster_configuration( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_cluster_configuration_request( @@ -938,7 +938,7 @@ async def get_cluster_configuration_upgrade_status( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_cluster_configuration_upgrade_status_request( @@ -997,7 +997,7 @@ async def get_upgrade_orchestration_service_state( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_upgrade_orchestration_service_state_request( @@ -1060,7 +1060,7 @@ async def set_upgrade_orchestration_service_state( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _upgrade_orchestration_service_state = _models.UpgradeOrchestrationServiceState(service_state=service_state) @@ -1129,7 +1129,7 @@ async def provision_cluster( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _provision_fabric_description = _models.ProvisionFabricDescription(code_file_path=code_file_path, cluster_manifest_file_path=cluster_manifest_file_path) @@ -1194,7 +1194,7 @@ async def unprovision_cluster( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _unprovision_fabric_description = _models.UnprovisionFabricDescription(code_version=code_version, config_version=config_version) @@ -1253,7 +1253,7 @@ async def rollback_cluster_upgrade( # pylint: disable=inconsistent-return-state } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_rollback_cluster_upgrade_request( @@ -1311,7 +1311,7 @@ async def resume_cluster_upgrade( # pylint: disable=inconsistent-return-stateme } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _resume_cluster_upgrade_description = _models.ResumeClusterUpgradeDescription(upgrade_domain=upgrade_domain) @@ -1376,7 +1376,7 @@ async def start_cluster_upgrade( # pylint: disable=inconsistent-return-statemen } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') @@ -1440,7 +1440,7 @@ async def start_cluster_configuration_upgrade( # pylint: disable=inconsistent-r } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(cluster_configuration_upgrade_description, 'ClusterConfigurationUpgradeDescription') @@ -1502,7 +1502,7 @@ async def update_cluster_upgrade( # pylint: disable=inconsistent-return-stateme } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(update_cluster_upgrade_description, 'UpdateClusterUpgradeDescription') @@ -1562,7 +1562,7 @@ async def get_aad_metadata( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_aad_metadata_request( @@ -1621,7 +1621,7 @@ async def get_cluster_version( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_cluster_version_request( @@ -1680,7 +1680,7 @@ async def get_cluster_load( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_cluster_load_request( @@ -1744,7 +1744,7 @@ async def toggle_verbose_service_placement_health_reporting( # pylint: disable= } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_toggle_verbose_service_placement_health_reporting_request( @@ -1806,7 +1806,7 @@ async def validate_cluster_upgrade( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') @@ -1889,7 +1889,7 @@ async def get_node_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_node_info_list_request( @@ -1953,7 +1953,7 @@ async def get_node_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_node_info_request( @@ -2041,7 +2041,7 @@ async def get_node_health( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_node_health_request( @@ -2134,7 +2134,7 @@ async def get_node_health_using_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if cluster_health_policy is not None: @@ -2232,7 +2232,7 @@ async def report_node_health( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(health_information, 'HealthInformation') @@ -2296,7 +2296,7 @@ async def get_node_load_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_node_load_info_request( @@ -2368,7 +2368,7 @@ async def disable_node( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _deactivation_intent_description = _models.DeactivationIntentDescription(deactivation_intent=deactivation_intent) @@ -2433,7 +2433,7 @@ async def enable_node( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_enable_node_request( @@ -2505,7 +2505,7 @@ async def remove_node_state( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_remove_node_state_request( @@ -2573,7 +2573,7 @@ async def restart_node( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _restart_node_description = _models.RestartNodeDescription(node_instance_id=node_instance_id, create_fabric_dump=create_fabric_dump) @@ -2636,7 +2636,7 @@ async def remove_configuration_overrides( # pylint: disable=inconsistent-return } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_remove_configuration_overrides_request( @@ -2694,7 +2694,7 @@ async def get_configuration_overrides( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_configuration_overrides_request( @@ -2762,7 +2762,7 @@ async def add_configuration_parameter_overrides( # pylint: disable=inconsistent } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(config_parameter_override_list, '[ConfigParameterOverride]') @@ -2823,7 +2823,7 @@ async def remove_node_tags( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(node_tags, '[str]') @@ -2882,7 +2882,7 @@ async def add_node_tags( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(node_tags, '[str]') @@ -2983,7 +2983,7 @@ async def get_application_type_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_type_info_list_request( @@ -3083,7 +3083,7 @@ async def get_application_type_info_list_by_name( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_type_info_list_by_name_request( @@ -3156,7 +3156,7 @@ async def provision_application_type( # pylint: disable=inconsistent-return-sta } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(provision_application_type_description_base_required_body_param, 'ProvisionApplicationTypeDescriptionBase') @@ -3230,7 +3230,7 @@ async def unprovision_application_type( # pylint: disable=inconsistent-return-s } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _unprovision_application_type_description_info = _models.UnprovisionApplicationTypeDescriptionInfo(application_type_version=application_type_version, async_property=async_parameter) @@ -3304,7 +3304,7 @@ async def update_application_type_arm_metadata( # pylint: disable=inconsistent- } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _application_type_arm_metadata_update_description = _models.ArmMetadata(arm_resource_id=arm_resource_id) @@ -3375,7 +3375,7 @@ async def get_service_type_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_type_info_list_request( @@ -3448,7 +3448,7 @@ async def get_service_type_info_by_name( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_type_info_by_name_request( @@ -3522,7 +3522,7 @@ async def get_service_manifest( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_manifest_request( @@ -3602,7 +3602,7 @@ async def get_deployed_service_type_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_service_type_info_list_request( @@ -3686,7 +3686,7 @@ async def get_deployed_service_type_info_by_name( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_service_type_info_by_name_request( @@ -3753,7 +3753,7 @@ async def create_application( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(application_description, 'ApplicationDescription') @@ -3829,7 +3829,7 @@ async def delete_application( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_application_request( @@ -3896,7 +3896,7 @@ async def get_application_load_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_load_info_request( @@ -4001,7 +4001,7 @@ async def get_application_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_info_list_request( @@ -4078,7 +4078,7 @@ async def get_application_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_info_request( @@ -4222,7 +4222,7 @@ async def get_application_health( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_health_request( @@ -4373,7 +4373,7 @@ async def get_application_health_using_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if application_health_policy is not None: @@ -4478,7 +4478,7 @@ async def report_application_health( # pylint: disable=inconsistent-return-stat } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(health_information, 'HealthInformation') @@ -4556,7 +4556,7 @@ async def start_application_upgrade( # pylint: disable=inconsistent-return-stat } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(application_upgrade_description, 'ApplicationUpgradeDescription') @@ -4623,7 +4623,7 @@ async def get_application_upgrade( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_upgrade_request( @@ -4696,7 +4696,7 @@ async def update_application_upgrade( # pylint: disable=inconsistent-return-sta } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(application_upgrade_update_description, 'ApplicationUpgradeUpdateDescription') @@ -4767,7 +4767,7 @@ async def update_application( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(application_update_description, 'ApplicationUpdateDescription') @@ -4838,7 +4838,7 @@ async def resume_application_upgrade( # pylint: disable=inconsistent-return-sta } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _resume_application_upgrade_description = _models.ResumeApplicationUpgradeDescription(upgrade_domain_name=upgrade_domain_name) @@ -4909,7 +4909,7 @@ async def rollback_application_upgrade( # pylint: disable=inconsistent-return-s } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_rollback_application_upgrade_request( @@ -4994,7 +4994,7 @@ async def get_deployed_application_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_application_info_list_request( @@ -5077,7 +5077,7 @@ async def get_deployed_application_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_application_info_request( @@ -5205,7 +5205,7 @@ async def get_deployed_application_health( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_application_health_request( @@ -5344,7 +5344,7 @@ async def get_deployed_application_health_using_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if application_health_policy is not None: @@ -5453,7 +5453,7 @@ async def report_deployed_application_health( # pylint: disable=inconsistent-re } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(health_information, 'HealthInformation') @@ -5520,7 +5520,7 @@ async def get_application_manifest( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_manifest_request( @@ -5595,7 +5595,7 @@ async def update_application_arm_metadata( # pylint: disable=inconsistent-retur } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _application_arm_metadata_update_description = _models.ArmMetadata(arm_resource_id=arm_resource_id) @@ -5677,7 +5677,7 @@ async def get_service_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_info_list_request( @@ -5753,7 +5753,7 @@ async def get_service_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_info_request( @@ -5824,7 +5824,7 @@ async def get_application_name_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_name_info_request( @@ -5896,7 +5896,7 @@ async def create_service( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(service_description, 'ServiceDescription') @@ -5970,7 +5970,7 @@ async def create_service_from_template( # pylint: disable=inconsistent-return-s } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(service_from_template_description, 'ServiceFromTemplateDescription') @@ -6046,7 +6046,7 @@ async def delete_service( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_service_request( @@ -6118,7 +6118,7 @@ async def update_service( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(service_update_description, 'ServiceUpdateDescription') @@ -6185,7 +6185,7 @@ async def get_service_description( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_description_request( @@ -6306,7 +6306,7 @@ async def get_service_health( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_health_request( @@ -6441,7 +6441,7 @@ async def get_service_health_using_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if application_health_policy is not None: @@ -6545,7 +6545,7 @@ async def report_service_health( # pylint: disable=inconsistent-return-statemen } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(health_information, 'HealthInformation') @@ -6641,7 +6641,7 @@ async def resolve_service( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_resolve_service_request( @@ -6723,7 +6723,7 @@ async def get_unplaced_replica_information( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_unplaced_replica_information_request( @@ -6804,7 +6804,7 @@ async def get_loaded_partition_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_loaded_partition_info_list_request( @@ -6882,7 +6882,7 @@ async def get_partition_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_info_list_request( @@ -6947,7 +6947,7 @@ async def get_partition_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_info_request( @@ -7012,7 +7012,7 @@ async def get_service_name_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_name_info_request( @@ -7128,7 +7128,7 @@ async def get_partition_health( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_health_request( @@ -7261,7 +7261,7 @@ async def get_partition_health_using_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if application_health_policy is not None: @@ -7361,7 +7361,7 @@ async def report_partition_health( # pylint: disable=inconsistent-return-statem } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(health_information, 'HealthInformation') @@ -7426,7 +7426,7 @@ async def get_partition_load_information( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_load_information_request( @@ -7488,7 +7488,7 @@ async def reset_partition_load( # pylint: disable=inconsistent-return-statement } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_reset_partition_load_request( @@ -7548,7 +7548,7 @@ async def recover_partition( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_recover_partition_request( @@ -7614,7 +7614,7 @@ async def recover_service_partitions( # pylint: disable=inconsistent-return-sta } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_recover_service_partitions_request( @@ -7673,7 +7673,7 @@ async def recover_system_partitions( # pylint: disable=inconsistent-return-stat } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_recover_system_partitions_request( @@ -7729,7 +7729,7 @@ async def recover_all_partitions( # pylint: disable=inconsistent-return-stateme } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_recover_all_partitions_request( @@ -7800,7 +7800,7 @@ async def move_primary_replica( # pylint: disable=inconsistent-return-statement } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_move_primary_replica_request( @@ -7877,7 +7877,7 @@ async def move_secondary_replica( # pylint: disable=inconsistent-return-stateme } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_move_secondary_replica_request( @@ -7957,7 +7957,7 @@ async def update_partition_load( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partition_metric_load_description_list, '[PartitionMetricLoadDescription]') @@ -8050,7 +8050,7 @@ async def move_instance( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_move_instance_request( @@ -8136,7 +8136,7 @@ async def move_auxiliary_replica( # pylint: disable=inconsistent-return-stateme } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_move_auxiliary_replica_request( @@ -8204,7 +8204,7 @@ async def create_repair_task( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(repair_task, 'RepairTask') @@ -8264,7 +8264,7 @@ async def cancel_repair_task( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(repair_task_cancel_description, 'RepairTaskCancelDescription') @@ -8329,7 +8329,7 @@ async def delete_repair_task( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _repair_task_delete_description = _models.RepairTaskDeleteDescription(task_id=task_id, version=version) @@ -8403,7 +8403,7 @@ async def get_repair_task_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_repair_task_list_request( @@ -8467,7 +8467,7 @@ async def force_approve_repair_task( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _repair_task_approve_description = _models.RepairTaskApproveDescription(task_id=task_id, version=version) @@ -8530,7 +8530,7 @@ async def update_repair_task_health_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(repair_task_update_health_policy_description, 'RepairTaskUpdateHealthPolicyDescription') @@ -8590,7 +8590,7 @@ async def update_repair_execution_state( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(repair_task, 'RepairTask') @@ -8664,7 +8664,7 @@ async def get_replica_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_replica_info_list_request( @@ -8731,7 +8731,7 @@ async def get_replica_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_replica_info_request( @@ -8823,7 +8823,7 @@ async def get_replica_health( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_replica_health_request( @@ -8924,7 +8924,7 @@ async def get_replica_health_using_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if application_health_policy is not None: @@ -9030,7 +9030,7 @@ async def report_replica_health( # pylint: disable=inconsistent-return-statemen } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(health_information, 'HealthInformation') @@ -9113,7 +9113,7 @@ async def get_deployed_service_replica_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_service_replica_info_list_request( @@ -9188,7 +9188,7 @@ async def get_deployed_service_replica_detail_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_service_replica_detail_info_request( @@ -9257,7 +9257,7 @@ async def get_deployed_service_replica_detail_info_by_partition_id( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_service_replica_detail_info_by_partition_id_request( @@ -9328,7 +9328,7 @@ async def restart_replica( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_restart_replica_request( @@ -9406,7 +9406,7 @@ async def remove_replica( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_remove_replica_request( @@ -9475,7 +9475,7 @@ async def get_deployed_service_package_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_service_package_info_list_request( @@ -9551,7 +9551,7 @@ async def get_deployed_service_package_info_list_by_name( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_service_package_info_list_by_name_request( @@ -9652,7 +9652,7 @@ async def get_deployed_service_package_health( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_service_package_health_request( @@ -9762,7 +9762,7 @@ async def get_deployed_service_package_health_using_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if application_health_policy is not None: @@ -9873,7 +9873,7 @@ async def report_deployed_service_package_health( # pylint: disable=inconsisten } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(health_information, 'HealthInformation') @@ -9948,7 +9948,7 @@ async def deploy_service_package_to_node( # pylint: disable=inconsistent-return } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deploy_service_package_to_node_description, 'DeployServicePackageToNodeDescription') @@ -10025,7 +10025,7 @@ async def get_deployed_code_package_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_code_package_info_list_request( @@ -10103,7 +10103,7 @@ async def restart_deployed_code_package( # pylint: disable=inconsistent-return- } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restart_deployed_code_package_description, 'RestartDeployedCodePackageDescription') @@ -10190,7 +10190,7 @@ async def get_container_logs_deployed_on_node( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_container_logs_deployed_on_node_request( @@ -10280,7 +10280,7 @@ async def invoke_container_api( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(container_api_request_body, 'ContainerApiRequestBody') @@ -10354,7 +10354,7 @@ async def create_compose_deployment( # pylint: disable=inconsistent-return-stat } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(create_compose_deployment_description, 'CreateComposeDeploymentDescription') @@ -10417,7 +10417,7 @@ async def get_compose_deployment_status( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_compose_deployment_status_request( @@ -10496,7 +10496,7 @@ async def get_compose_deployment_status_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_compose_deployment_status_list_request( @@ -10560,7 +10560,7 @@ async def get_compose_deployment_upgrade_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_compose_deployment_upgrade_progress_request( @@ -10622,7 +10622,7 @@ async def remove_compose_deployment( # pylint: disable=inconsistent-return-stat } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_remove_compose_deployment_request( @@ -10685,7 +10685,7 @@ async def start_compose_deployment_upgrade( # pylint: disable=inconsistent-retu } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(compose_deployment_upgrade_description, 'ComposeDeploymentUpgradeDescription') @@ -10747,7 +10747,7 @@ async def start_rollback_compose_deployment_upgrade( # pylint: disable=inconsis } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_start_rollback_compose_deployment_upgrade_request( @@ -10803,7 +10803,7 @@ async def get_chaos( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_chaos_request( @@ -10870,7 +10870,7 @@ async def start_chaos( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(chaos_parameters, 'ChaosParameters') @@ -10931,7 +10931,7 @@ async def stop_chaos( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_stop_chaos_request( @@ -11019,7 +11019,7 @@ async def get_chaos_events( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_chaos_events_request( @@ -11082,7 +11082,7 @@ async def get_chaos_schedule( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_chaos_schedule_request( @@ -11150,7 +11150,7 @@ async def post_chaos_schedule( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _chaos_schedule = _models.ChaosScheduleDescription(version=version, schedule=schedule) @@ -11219,7 +11219,7 @@ async def upload_file( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_upload_file_request( @@ -11278,7 +11278,7 @@ async def get_image_store_content( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_image_store_content_request( @@ -11341,7 +11341,7 @@ async def delete_image_store_content( # pylint: disable=inconsistent-return-sta } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_image_store_content_request( @@ -11396,7 +11396,7 @@ async def get_image_store_root_content( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_image_store_root_content_request( @@ -11458,7 +11458,7 @@ async def copy_image_store_content( # pylint: disable=inconsistent-return-state } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(image_store_copy_description, 'ImageStoreCopyDescription') @@ -11521,7 +11521,7 @@ async def delete_image_store_upload_session( # pylint: disable=inconsistent-ret } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_image_store_upload_session_request( @@ -11582,7 +11582,7 @@ async def commit_image_store_upload_session( # pylint: disable=inconsistent-ret } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_commit_image_store_upload_session_request( @@ -11642,7 +11642,7 @@ async def get_image_store_upload_session_by_id( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_image_store_upload_session_by_id_request( @@ -11705,7 +11705,7 @@ async def get_image_store_upload_session_by_path( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_image_store_upload_session_by_path_request( @@ -11786,7 +11786,7 @@ async def upload_file_chunk( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_upload_file_chunk_request( @@ -11843,7 +11843,7 @@ async def get_image_store_root_folder_size( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_image_store_root_folder_size_request( @@ -11905,7 +11905,7 @@ async def get_image_store_folder_size( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_image_store_folder_size_request( @@ -11965,7 +11965,7 @@ async def get_image_store_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_image_store_info_request( @@ -12041,7 +12041,7 @@ async def invoke_infrastructure_command( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_invoke_infrastructure_command_request( @@ -12119,7 +12119,7 @@ async def invoke_infrastructure_query( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_invoke_infrastructure_query_request( @@ -12216,7 +12216,7 @@ async def start_data_loss( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_start_data_loss_request( @@ -12288,7 +12288,7 @@ async def get_data_loss_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_data_loss_progress_request( @@ -12377,7 +12377,7 @@ async def start_quorum_loss( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_start_quorum_loss_request( @@ -12452,7 +12452,7 @@ async def get_quorum_loss_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_quorum_loss_progress_request( @@ -12535,7 +12535,7 @@ async def start_partition_restart( # pylint: disable=inconsistent-return-statem } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_start_partition_restart_request( @@ -12608,7 +12608,7 @@ async def get_partition_restart_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_restart_progress_request( @@ -12694,7 +12694,7 @@ async def start_node_transition( # pylint: disable=inconsistent-return-statemen } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_start_node_transition_request( @@ -12761,7 +12761,7 @@ async def get_node_transition_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_node_transition_progress_request( @@ -12843,7 +12843,7 @@ async def get_fault_operation_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_fault_operation_list_request( @@ -12927,7 +12927,7 @@ async def cancel_operation( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_cancel_operation_request( @@ -12991,7 +12991,7 @@ async def create_backup_policy( # pylint: disable=inconsistent-return-statement } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') @@ -13055,7 +13055,7 @@ async def delete_backup_policy( # pylint: disable=inconsistent-return-statement } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_backup_policy_request( @@ -13126,7 +13126,7 @@ async def get_backup_policy_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_backup_policy_list_request( @@ -13189,7 +13189,7 @@ async def get_backup_policy_by_name( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_backup_policy_by_name_request( @@ -13268,7 +13268,7 @@ async def get_all_entities_backed_up_by_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_all_entities_backed_up_by_policy_request( @@ -13339,7 +13339,7 @@ async def update_backup_policy( # pylint: disable=inconsistent-return-statement } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') @@ -13413,7 +13413,7 @@ async def enable_application_backup( # pylint: disable=inconsistent-return-stat } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) @@ -13484,7 +13484,7 @@ async def disable_application_backup( # pylint: disable=inconsistent-return-sta } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) @@ -13571,7 +13571,7 @@ async def get_application_backup_configuration_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_backup_configuration_info_request( @@ -13674,7 +13674,7 @@ async def get_application_backup_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_backup_list_request( @@ -13747,7 +13747,7 @@ async def suspend_application_backup( # pylint: disable=inconsistent-return-sta } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_suspend_application_backup_request( @@ -13810,7 +13810,7 @@ async def resume_application_backup( # pylint: disable=inconsistent-return-stat } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_resume_application_backup_request( @@ -13881,7 +13881,7 @@ async def enable_service_backup( # pylint: disable=inconsistent-return-statemen } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) @@ -13956,7 +13956,7 @@ async def disable_service_backup( # pylint: disable=inconsistent-return-stateme } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) @@ -14043,7 +14043,7 @@ async def get_service_backup_configuration_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_backup_configuration_info_request( @@ -14146,7 +14146,7 @@ async def get_service_backup_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_backup_list_request( @@ -14219,7 +14219,7 @@ async def suspend_service_backup( # pylint: disable=inconsistent-return-stateme } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_suspend_service_backup_request( @@ -14282,7 +14282,7 @@ async def resume_service_backup( # pylint: disable=inconsistent-return-statemen } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_resume_service_backup_request( @@ -14348,7 +14348,7 @@ async def enable_partition_backup( # pylint: disable=inconsistent-return-statem } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) @@ -14419,7 +14419,7 @@ async def disable_partition_backup( # pylint: disable=inconsistent-return-state } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) @@ -14485,7 +14485,7 @@ async def get_partition_backup_configuration_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_backup_configuration_info_request( @@ -14566,7 +14566,7 @@ async def get_partition_backup_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_backup_list_request( @@ -14632,7 +14632,7 @@ async def suspend_partition_backup( # pylint: disable=inconsistent-return-state } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_suspend_partition_backup_request( @@ -14691,7 +14691,7 @@ async def resume_partition_backup( # pylint: disable=inconsistent-return-statem } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_resume_partition_backup_request( @@ -14767,7 +14767,7 @@ async def backup_partition( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _backup_partition_description = _models.BackupPartitionDescription(backup_storage=backup_storage) @@ -14835,7 +14835,7 @@ async def get_partition_backup_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_backup_progress_request( @@ -14916,7 +14916,7 @@ async def restore_partition( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_partition_description, 'RestorePartitionDescription') @@ -14980,7 +14980,7 @@ async def get_partition_restore_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_restore_progress_request( @@ -15062,7 +15062,7 @@ async def get_backups_from_backup_location( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(get_backup_by_storage_query_description, 'GetBackupByStorageQueryDescription') @@ -15129,7 +15129,7 @@ async def create_name( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _name_description = _models.NameDescription(name=name) @@ -15191,7 +15191,7 @@ async def get_name_exists_info( # pylint: disable=inconsistent-return-statement } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_name_exists_info_request( @@ -15250,7 +15250,7 @@ async def delete_name( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_name_request( @@ -15322,7 +15322,7 @@ async def get_sub_name_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_sub_name_info_list_request( @@ -15401,7 +15401,7 @@ async def get_property_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_property_info_list_request( @@ -15468,7 +15468,7 @@ async def put_property( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(property_description, 'PropertyDescription') @@ -15534,7 +15534,7 @@ async def get_property_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_property_info_request( @@ -15601,7 +15601,7 @@ async def delete_property( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_property_request( @@ -15665,7 +15665,7 @@ async def submit_property_batch( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _property_batch_description_list = _models.PropertyBatchDescriptionList(operations=operations) @@ -15752,7 +15752,7 @@ async def get_cluster_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_cluster_event_list_request( @@ -15834,7 +15834,7 @@ async def get_containers_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_containers_event_list_request( @@ -15919,7 +15919,7 @@ async def get_node_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_node_event_list_request( @@ -16002,7 +16002,7 @@ async def get_nodes_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_nodes_event_list_request( @@ -16091,7 +16091,7 @@ async def get_application_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_event_list_request( @@ -16174,7 +16174,7 @@ async def get_applications_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_applications_event_list_request( @@ -16263,7 +16263,7 @@ async def get_service_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_event_list_request( @@ -16346,7 +16346,7 @@ async def get_services_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_services_event_list_request( @@ -16431,7 +16431,7 @@ async def get_partition_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_event_list_request( @@ -16514,7 +16514,7 @@ async def get_partitions_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partitions_event_list_request( @@ -16602,7 +16602,7 @@ async def get_partition_replica_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_replica_event_list_request( @@ -16689,7 +16689,7 @@ async def get_partition_replicas_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_replicas_event_list_request( @@ -16756,7 +16756,7 @@ async def get_correlated_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_correlated_event_list_request( diff --git a/customSDK/servicefabric/models/aad_metadata.py b/customSDK/servicefabric/models/aad_metadata.py deleted file mode 100644 index 2baa5e8c..00000000 --- a/customSDK/servicefabric/models/aad_metadata.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AadMetadata(Model): - """Azure Active Directory metadata used for secured connection to cluster. - - :param authority: The AAD authority url. - :type authority: str - :param client: The AAD client application Id. - :type client: str - :param cluster: The AAD cluster application Id. - :type cluster: str - :param login: The AAD login url. - :type login: str - :param redirect: The client application redirect address. - :type redirect: str - :param tenant: The AAD tenant Id. - :type tenant: str - """ - - _attribute_map = { - 'authority': {'key': 'authority', 'type': 'str'}, - 'client': {'key': 'client', 'type': 'str'}, - 'cluster': {'key': 'cluster', 'type': 'str'}, - 'login': {'key': 'login', 'type': 'str'}, - 'redirect': {'key': 'redirect', 'type': 'str'}, - 'tenant': {'key': 'tenant', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AadMetadata, self).__init__(**kwargs) - self.authority = kwargs.get('authority', None) - self.client = kwargs.get('client', None) - self.cluster = kwargs.get('cluster', None) - self.login = kwargs.get('login', None) - self.redirect = kwargs.get('redirect', None) - self.tenant = kwargs.get('tenant', None) diff --git a/customSDK/servicefabric/models/aad_metadata_object.py b/customSDK/servicefabric/models/aad_metadata_object.py deleted file mode 100644 index 3972df30..00000000 --- a/customSDK/servicefabric/models/aad_metadata_object.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AadMetadataObject(Model): - """Azure Active Directory metadata object used for secured connection to - cluster. - - :param type: The client authentication method. - :type type: str - :param metadata: Azure Active Directory metadata used for secured - connection to cluster. - :type metadata: ~azure.servicefabric.models.AadMetadata - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'metadata': {'key': 'metadata', 'type': 'AadMetadata'}, - } - - def __init__(self, **kwargs): - super(AadMetadataObject, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.metadata = kwargs.get('metadata', None) diff --git a/customSDK/servicefabric/models/aad_metadata_object_py3.py b/customSDK/servicefabric/models/aad_metadata_object_py3.py deleted file mode 100644 index 0b24eb1c..00000000 --- a/customSDK/servicefabric/models/aad_metadata_object_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AadMetadataObject(Model): - """Azure Active Directory metadata object used for secured connection to - cluster. - - :param type: The client authentication method. - :type type: str - :param metadata: Azure Active Directory metadata used for secured - connection to cluster. - :type metadata: ~azure.servicefabric.models.AadMetadata - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'metadata': {'key': 'metadata', 'type': 'AadMetadata'}, - } - - def __init__(self, *, type: str=None, metadata=None, **kwargs) -> None: - super(AadMetadataObject, self).__init__(**kwargs) - self.type = type - self.metadata = metadata diff --git a/customSDK/servicefabric/models/aad_metadata_py3.py b/customSDK/servicefabric/models/aad_metadata_py3.py deleted file mode 100644 index 868dfea9..00000000 --- a/customSDK/servicefabric/models/aad_metadata_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AadMetadata(Model): - """Azure Active Directory metadata used for secured connection to cluster. - - :param authority: The AAD authority url. - :type authority: str - :param client: The AAD client application Id. - :type client: str - :param cluster: The AAD cluster application Id. - :type cluster: str - :param login: The AAD login url. - :type login: str - :param redirect: The client application redirect address. - :type redirect: str - :param tenant: The AAD tenant Id. - :type tenant: str - """ - - _attribute_map = { - 'authority': {'key': 'authority', 'type': 'str'}, - 'client': {'key': 'client', 'type': 'str'}, - 'cluster': {'key': 'cluster', 'type': 'str'}, - 'login': {'key': 'login', 'type': 'str'}, - 'redirect': {'key': 'redirect', 'type': 'str'}, - 'tenant': {'key': 'tenant', 'type': 'str'}, - } - - def __init__(self, *, authority: str=None, client: str=None, cluster: str=None, login: str=None, redirect: str=None, tenant: str=None, **kwargs) -> None: - super(AadMetadata, self).__init__(**kwargs) - self.authority = authority - self.client = client - self.cluster = cluster - self.login = login - self.redirect = redirect - self.tenant = tenant diff --git a/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism.py b/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism.py deleted file mode 100644 index 86905ac3..00000000 --- a/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .scaling_mechanism_description import ScalingMechanismDescription - - -class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription): - """Represents a scaling mechanism for adding or removing named partitions of a - stateless service. Partition names are in the format '0','1''N-1'. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param min_partition_count: Required. Minimum number of named partitions - of the service. - :type min_partition_count: int - :param max_partition_count: Required. Maximum number of named partitions - of the service. - :type max_partition_count: int - :param scale_increment: Required. The number of instances to add or remove - during a scaling operation. - :type scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_partition_count': {'required': True}, - 'max_partition_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'}, - 'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'}, - 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs) - self.min_partition_count = kwargs.get('min_partition_count', None) - self.max_partition_count = kwargs.get('max_partition_count', None) - self.scale_increment = kwargs.get('scale_increment', None) - self.kind = 'AddRemoveIncrementalNamedPartition' diff --git a/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism_py3.py b/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism_py3.py deleted file mode 100644 index cf3a4731..00000000 --- a/customSDK/servicefabric/models/add_remove_incremental_named_partition_scaling_mechanism_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .scaling_mechanism_description_py3 import ScalingMechanismDescription - - -class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription): - """Represents a scaling mechanism for adding or removing named partitions of a - stateless service. Partition names are in the format '0','1''N-1'. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param min_partition_count: Required. Minimum number of named partitions - of the service. - :type min_partition_count: int - :param max_partition_count: Required. Maximum number of named partitions - of the service. - :type max_partition_count: int - :param scale_increment: Required. The number of instances to add or remove - during a scaling operation. - :type scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_partition_count': {'required': True}, - 'max_partition_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'}, - 'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'}, - 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, - } - - def __init__(self, *, min_partition_count: int, max_partition_count: int, scale_increment: int, **kwargs) -> None: - super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs) - self.min_partition_count = min_partition_count - self.max_partition_count = max_partition_count - self.scale_increment = scale_increment - self.kind = 'AddRemoveIncrementalNamedPartition' diff --git a/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism.py b/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism.py deleted file mode 100644 index 6332ff38..00000000 --- a/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .auto_scaling_mechanism import AutoScalingMechanism - - -class AddRemoveReplicaScalingMechanism(AutoScalingMechanism): - """Describes the horizontal auto scaling mechanism that adds or removes - replicas (containers or container groups). - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param min_count: Required. Minimum number of containers (scale down won't - be performed below this number). - :type min_count: int - :param max_count: Required. Maximum number of containers (scale up won't - be performed above this number). - :type max_count: int - :param scale_increment: Required. Each time auto scaling is performed, - this number of containers will be added or removed. - :type scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_count': {'required': True}, - 'max_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'scale_increment': {'key': 'scaleIncrement', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(AddRemoveReplicaScalingMechanism, self).__init__(**kwargs) - self.min_count = kwargs.get('min_count', None) - self.max_count = kwargs.get('max_count', None) - self.scale_increment = kwargs.get('scale_increment', None) - self.kind = 'AddRemoveReplica' diff --git a/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism_py3.py b/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism_py3.py deleted file mode 100644 index ce862f88..00000000 --- a/customSDK/servicefabric/models/add_remove_replica_scaling_mechanism_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .auto_scaling_mechanism_py3 import AutoScalingMechanism - - -class AddRemoveReplicaScalingMechanism(AutoScalingMechanism): - """Describes the horizontal auto scaling mechanism that adds or removes - replicas (containers or container groups). - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param min_count: Required. Minimum number of containers (scale down won't - be performed below this number). - :type min_count: int - :param max_count: Required. Maximum number of containers (scale up won't - be performed above this number). - :type max_count: int - :param scale_increment: Required. Each time auto scaling is performed, - this number of containers will be added or removed. - :type scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_count': {'required': True}, - 'max_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'scale_increment': {'key': 'scaleIncrement', 'type': 'int'}, - } - - def __init__(self, *, min_count: int, max_count: int, scale_increment: int, **kwargs) -> None: - super(AddRemoveReplicaScalingMechanism, self).__init__(**kwargs) - self.min_count = min_count - self.max_count = max_count - self.scale_increment = scale_increment - self.kind = 'AddRemoveReplica' diff --git a/customSDK/servicefabric/models/analysis_event_metadata.py b/customSDK/servicefabric/models/analysis_event_metadata.py deleted file mode 100644 index 9f249f11..00000000 --- a/customSDK/servicefabric/models/analysis_event_metadata.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AnalysisEventMetadata(Model): - """Metadata about an Analysis Event. - - :param delay: The analysis delay. - :type delay: timedelta - :param duration: The duration of analysis. - :type duration: timedelta - """ - - _attribute_map = { - 'delay': {'key': 'Delay', 'type': 'duration'}, - 'duration': {'key': 'Duration', 'type': 'duration'}, - } - - def __init__(self, **kwargs): - super(AnalysisEventMetadata, self).__init__(**kwargs) - self.delay = kwargs.get('delay', None) - self.duration = kwargs.get('duration', None) diff --git a/customSDK/servicefabric/models/analysis_event_metadata_py3.py b/customSDK/servicefabric/models/analysis_event_metadata_py3.py deleted file mode 100644 index c3615fa2..00000000 --- a/customSDK/servicefabric/models/analysis_event_metadata_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AnalysisEventMetadata(Model): - """Metadata about an Analysis Event. - - :param delay: The analysis delay. - :type delay: timedelta - :param duration: The duration of analysis. - :type duration: timedelta - """ - - _attribute_map = { - 'delay': {'key': 'Delay', 'type': 'duration'}, - 'duration': {'key': 'Duration', 'type': 'duration'}, - } - - def __init__(self, *, delay=None, duration=None, **kwargs) -> None: - super(AnalysisEventMetadata, self).__init__(**kwargs) - self.delay = delay - self.duration = duration diff --git a/customSDK/servicefabric/models/application_backup_configuration_info.py b/customSDK/servicefabric/models/application_backup_configuration_info.py deleted file mode 100644 index 43eb607a..00000000 --- a/customSDK/servicefabric/models/application_backup_configuration_info.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_configuration_info import BackupConfigurationInfo - - -class ApplicationBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information for a specific Service Fabric application - specifying what backup policy is being applied and suspend description, if - any. - - All required parameters must be populated in order to send to Azure. - - :param policy_name: The name of the backup policy which is applicable to - this Service Fabric application or service or partition. - :type policy_name: str - :param policy_inherited_from: Specifies the scope at which the backup - policy is applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type policy_inherited_from: str or - ~azure.servicefabric.models.BackupPolicyScope - :param suspension_info: Describes the backup suspension details. - :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :param kind: Required. Constant filled by server. - :type kind: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationBackupConfigurationInfo, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.kind = 'Application' diff --git a/customSDK/servicefabric/models/application_backup_configuration_info_py3.py b/customSDK/servicefabric/models/application_backup_configuration_info_py3.py deleted file mode 100644 index 6bbb5ced..00000000 --- a/customSDK/servicefabric/models/application_backup_configuration_info_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_configuration_info_py3 import BackupConfigurationInfo - - -class ApplicationBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information for a specific Service Fabric application - specifying what backup policy is being applied and suspend description, if - any. - - All required parameters must be populated in order to send to Azure. - - :param policy_name: The name of the backup policy which is applicable to - this Service Fabric application or service or partition. - :type policy_name: str - :param policy_inherited_from: Specifies the scope at which the backup - policy is applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type policy_inherited_from: str or - ~azure.servicefabric.models.BackupPolicyScope - :param suspension_info: Describes the backup suspension details. - :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :param kind: Required. Constant filled by server. - :type kind: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, application_name: str=None, **kwargs) -> None: - super(ApplicationBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) - self.application_name = application_name - self.kind = 'Application' diff --git a/customSDK/servicefabric/models/application_backup_entity.py b/customSDK/servicefabric/models/application_backup_entity.py deleted file mode 100644 index ad276a3f..00000000 --- a/customSDK/servicefabric/models/application_backup_entity.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_entity import BackupEntity - - -class ApplicationBackupEntity(BackupEntity): - """Identifies the Service Fabric application which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :param entity_kind: Required. Constant filled by server. - :type entity_kind: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationBackupEntity, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.entity_kind = 'Application' diff --git a/customSDK/servicefabric/models/application_backup_entity_py3.py b/customSDK/servicefabric/models/application_backup_entity_py3.py deleted file mode 100644 index a07dd1da..00000000 --- a/customSDK/servicefabric/models/application_backup_entity_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_entity_py3 import BackupEntity - - -class ApplicationBackupEntity(BackupEntity): - """Identifies the Service Fabric application which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :param entity_kind: Required. Constant filled by server. - :type entity_kind: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__(self, *, application_name: str=None, **kwargs) -> None: - super(ApplicationBackupEntity, self).__init__(**kwargs) - self.application_name = application_name - self.entity_kind = 'Application' diff --git a/customSDK/servicefabric/models/application_capacity_description.py b/customSDK/servicefabric/models/application_capacity_description.py deleted file mode 100644 index 79f6f5ba..00000000 --- a/customSDK/servicefabric/models/application_capacity_description.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationCapacityDescription(Model): - """Describes capacity information for services of this application. This - description can be used for describing the following. - - Reserving the capacity for the services on the nodes - - Limiting the total number of nodes that services of this application can - run on - - Limiting the custom capacity metrics to limit the total consumption of - this metric by the services of this application. - - :param minimum_nodes: The minimum number of nodes where Service Fabric - will reserve capacity for this application. Note that this does not mean - that the services of this application will be placed on all of those - nodes. If this property is set to zero, no capacity will be reserved. The - value of this property cannot be more than the value of the MaximumNodes - property. - :type minimum_nodes: long - :param maximum_nodes: The maximum number of nodes where Service Fabric - will reserve capacity for this application. Note that this does not mean - that the services of this application will be placed on all of those - nodes. By default, the value of this property is zero and it means that - the services can be placed on any node. Default value: 0 . - :type maximum_nodes: long - :param application_metrics: List of application capacity metric - description. - :type application_metrics: - list[~azure.servicefabric.models.ApplicationMetricDescription] - """ - - _validation = { - 'minimum_nodes': {'minimum': 0}, - 'maximum_nodes': {'minimum': 0}, - } - - _attribute_map = { - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, - } - - def __init__(self, **kwargs): - super(ApplicationCapacityDescription, self).__init__(**kwargs) - self.minimum_nodes = kwargs.get('minimum_nodes', None) - self.maximum_nodes = kwargs.get('maximum_nodes', 0) - self.application_metrics = kwargs.get('application_metrics', None) diff --git a/customSDK/servicefabric/models/application_capacity_description_py3.py b/customSDK/servicefabric/models/application_capacity_description_py3.py deleted file mode 100644 index dff8cade..00000000 --- a/customSDK/servicefabric/models/application_capacity_description_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationCapacityDescription(Model): - """Describes capacity information for services of this application. This - description can be used for describing the following. - - Reserving the capacity for the services on the nodes - - Limiting the total number of nodes that services of this application can - run on - - Limiting the custom capacity metrics to limit the total consumption of - this metric by the services of this application. - - :param minimum_nodes: The minimum number of nodes where Service Fabric - will reserve capacity for this application. Note that this does not mean - that the services of this application will be placed on all of those - nodes. If this property is set to zero, no capacity will be reserved. The - value of this property cannot be more than the value of the MaximumNodes - property. - :type minimum_nodes: long - :param maximum_nodes: The maximum number of nodes where Service Fabric - will reserve capacity for this application. Note that this does not mean - that the services of this application will be placed on all of those - nodes. By default, the value of this property is zero and it means that - the services can be placed on any node. Default value: 0 . - :type maximum_nodes: long - :param application_metrics: List of application capacity metric - description. - :type application_metrics: - list[~azure.servicefabric.models.ApplicationMetricDescription] - """ - - _validation = { - 'minimum_nodes': {'minimum': 0}, - 'maximum_nodes': {'minimum': 0}, - } - - _attribute_map = { - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, - } - - def __init__(self, *, minimum_nodes: int=None, maximum_nodes: int=0, application_metrics=None, **kwargs) -> None: - super(ApplicationCapacityDescription, self).__init__(**kwargs) - self.minimum_nodes = minimum_nodes - self.maximum_nodes = maximum_nodes - self.application_metrics = application_metrics diff --git a/customSDK/servicefabric/models/application_container_instance_exited_event.py b/customSDK/servicefabric/models/application_container_instance_exited_event.py deleted file mode 100644 index 8556c736..00000000 --- a/customSDK/servicefabric/models/application_container_instance_exited_event.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event import ApplicationEvent - - -class ApplicationContainerInstanceExitedEvent(ApplicationEvent): - """Container Exited event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param service_name: Required. Name of Service. - :type service_name: str - :param service_package_name: Required. Name of Service package. - :type service_package_name: str - :param service_package_activation_id: Required. Activation Id of Service - package. - :type service_package_activation_id: str - :param is_exclusive: Required. Indicates IsExclusive flag. - :type is_exclusive: bool - :param code_package_name: Required. Name of Code package. - :type code_package_name: str - :param entry_point_type: Required. Type of EntryPoint. - :type entry_point_type: str - :param image_name: Required. Name of Container image. - :type image_name: str - :param container_name: Required. Name of Container. - :type container_name: str - :param host_id: Required. Host Id. - :type host_id: str - :param exit_code: Required. Exit code of process. - :type exit_code: long - :param unexpected_termination: Required. Indicates if termination is - unexpected. - :type unexpected_termination: bool - :param start_time: Required. Start time of process. - :type start_time: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_name': {'required': True}, - 'service_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'is_exclusive': {'required': True}, - 'code_package_name': {'required': True}, - 'entry_point_type': {'required': True}, - 'image_name': {'required': True}, - 'container_name': {'required': True}, - 'host_id': {'required': True}, - 'exit_code': {'required': True}, - 'unexpected_termination': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, - 'image_name': {'key': 'ImageName', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - 'host_id': {'key': 'HostId', 'type': 'str'}, - 'exit_code': {'key': 'ExitCode', 'type': 'long'}, - 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ApplicationContainerInstanceExitedEvent, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.service_package_name = kwargs.get('service_package_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.is_exclusive = kwargs.get('is_exclusive', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.entry_point_type = kwargs.get('entry_point_type', None) - self.image_name = kwargs.get('image_name', None) - self.container_name = kwargs.get('container_name', None) - self.host_id = kwargs.get('host_id', None) - self.exit_code = kwargs.get('exit_code', None) - self.unexpected_termination = kwargs.get('unexpected_termination', None) - self.start_time = kwargs.get('start_time', None) - self.kind = 'ApplicationContainerInstanceExited' diff --git a/customSDK/servicefabric/models/application_container_instance_exited_event_py3.py b/customSDK/servicefabric/models/application_container_instance_exited_event_py3.py deleted file mode 100644 index 0f0451ca..00000000 --- a/customSDK/servicefabric/models/application_container_instance_exited_event_py3.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event_py3 import ApplicationEvent - - -class ApplicationContainerInstanceExitedEvent(ApplicationEvent): - """Container Exited event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param service_name: Required. Name of Service. - :type service_name: str - :param service_package_name: Required. Name of Service package. - :type service_package_name: str - :param service_package_activation_id: Required. Activation Id of Service - package. - :type service_package_activation_id: str - :param is_exclusive: Required. Indicates IsExclusive flag. - :type is_exclusive: bool - :param code_package_name: Required. Name of Code package. - :type code_package_name: str - :param entry_point_type: Required. Type of EntryPoint. - :type entry_point_type: str - :param image_name: Required. Name of Container image. - :type image_name: str - :param container_name: Required. Name of Container. - :type container_name: str - :param host_id: Required. Host Id. - :type host_id: str - :param exit_code: Required. Exit code of process. - :type exit_code: long - :param unexpected_termination: Required. Indicates if termination is - unexpected. - :type unexpected_termination: bool - :param start_time: Required. Start time of process. - :type start_time: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_name': {'required': True}, - 'service_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'is_exclusive': {'required': True}, - 'code_package_name': {'required': True}, - 'entry_point_type': {'required': True}, - 'image_name': {'required': True}, - 'container_name': {'required': True}, - 'host_id': {'required': True}, - 'exit_code': {'required': True}, - 'unexpected_termination': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, - 'image_name': {'key': 'ImageName', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - 'host_id': {'key': 'HostId', 'type': 'str'}, - 'exit_code': {'key': 'ExitCode', 'type': 'long'}, - 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_name: str, service_package_name: str, service_package_activation_id: str, is_exclusive: bool, code_package_name: str, entry_point_type: str, image_name: str, container_name: str, host_id: str, exit_code: int, unexpected_termination: bool, start_time, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationContainerInstanceExitedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.service_name = service_name - self.service_package_name = service_package_name - self.service_package_activation_id = service_package_activation_id - self.is_exclusive = is_exclusive - self.code_package_name = code_package_name - self.entry_point_type = entry_point_type - self.image_name = image_name - self.container_name = container_name - self.host_id = host_id - self.exit_code = exit_code - self.unexpected_termination = unexpected_termination - self.start_time = start_time - self.kind = 'ApplicationContainerInstanceExited' diff --git a/customSDK/servicefabric/models/application_created_event.py b/customSDK/servicefabric/models/application_created_event.py deleted file mode 100644 index bd190e77..00000000 --- a/customSDK/servicefabric/models/application_created_event.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event import ApplicationEvent - - -class ApplicationCreatedEvent(ApplicationEvent): - """Application Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param application_type_version: Required. Application type version. - :type application_type_version: str - :param application_definition_kind: Required. Application definition kind. - :type application_definition_kind: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'application_definition_kind': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationCreatedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.application_definition_kind = kwargs.get('application_definition_kind', None) - self.kind = 'ApplicationCreated' diff --git a/customSDK/servicefabric/models/application_created_event_py3.py b/customSDK/servicefabric/models/application_created_event_py3.py deleted file mode 100644 index 849b60ba..00000000 --- a/customSDK/servicefabric/models/application_created_event_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event_py3 import ApplicationEvent - - -class ApplicationCreatedEvent(ApplicationEvent): - """Application Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param application_type_version: Required. Application type version. - :type application_type_version: str - :param application_definition_kind: Required. Application definition kind. - :type application_definition_kind: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'application_definition_kind': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, application_definition_kind: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationCreatedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_type_name = application_type_name - self.application_type_version = application_type_version - self.application_definition_kind = application_definition_kind - self.kind = 'ApplicationCreated' diff --git a/customSDK/servicefabric/models/application_deleted_event.py b/customSDK/servicefabric/models/application_deleted_event.py deleted file mode 100644 index 440bd67a..00000000 --- a/customSDK/servicefabric/models/application_deleted_event.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event import ApplicationEvent - - -class ApplicationDeletedEvent(ApplicationEvent): - """Application Deleted event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param application_type_version: Required. Application type version. - :type application_type_version: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationDeletedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.kind = 'ApplicationDeleted' diff --git a/customSDK/servicefabric/models/application_deleted_event_py3.py b/customSDK/servicefabric/models/application_deleted_event_py3.py deleted file mode 100644 index b6aba073..00000000 --- a/customSDK/servicefabric/models/application_deleted_event_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event_py3 import ApplicationEvent - - -class ApplicationDeletedEvent(ApplicationEvent): - """Application Deleted event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param application_type_version: Required. Application type version. - :type application_type_version: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationDeletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_type_name = application_type_name - self.application_type_version = application_type_version - self.kind = 'ApplicationDeleted' diff --git a/customSDK/servicefabric/models/application_description.py b/customSDK/servicefabric/models/application_description.py deleted file mode 100644 index 4794af65..00000000 --- a/customSDK/servicefabric/models/application_description.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationDescription(Model): - """Describes a Service Fabric application. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the application, including the - 'fabric:' URI scheme. - :type name: str - :param type_name: Required. The application type name as defined in the - application manifest. - :type type_name: str - :param type_version: Required. The version of the application type as - defined in the application manifest. - :type type_version: str - :param parameter_list: List of application parameters with overridden - values from their default values specified in the application manifest. - :type parameter_list: - list[~azure.servicefabric.models.ApplicationParameter] - :param application_capacity: Describes capacity information for services - of this application. This description can be used for describing the - following. - - Reserving the capacity for the services on the nodes - - Limiting the total number of nodes that services of this application can - run on - - Limiting the custom capacity metrics to limit the total consumption of - this metric by the services of this application - :type application_capacity: - ~azure.servicefabric.models.ApplicationCapacityDescription - :param managed_application_identity: Managed application identity - description. - :type managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - - _validation = { - 'name': {'required': True}, - 'type_name': {'required': True}, - 'type_version': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'parameter_list': {'key': 'ParameterList', 'type': '[ApplicationParameter]'}, - 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'ApplicationCapacityDescription'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__(self, **kwargs): - super(ApplicationDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.type_version = kwargs.get('type_version', None) - self.parameter_list = kwargs.get('parameter_list', None) - self.application_capacity = kwargs.get('application_capacity', None) - self.managed_application_identity = kwargs.get('managed_application_identity', None) diff --git a/customSDK/servicefabric/models/application_description_py3.py b/customSDK/servicefabric/models/application_description_py3.py deleted file mode 100644 index 06333344..00000000 --- a/customSDK/servicefabric/models/application_description_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationDescription(Model): - """Describes a Service Fabric application. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the application, including the - 'fabric:' URI scheme. - :type name: str - :param type_name: Required. The application type name as defined in the - application manifest. - :type type_name: str - :param type_version: Required. The version of the application type as - defined in the application manifest. - :type type_version: str - :param parameter_list: List of application parameters with overridden - values from their default values specified in the application manifest. - :type parameter_list: - list[~azure.servicefabric.models.ApplicationParameter] - :param application_capacity: Describes capacity information for services - of this application. This description can be used for describing the - following. - - Reserving the capacity for the services on the nodes - - Limiting the total number of nodes that services of this application can - run on - - Limiting the custom capacity metrics to limit the total consumption of - this metric by the services of this application - :type application_capacity: - ~azure.servicefabric.models.ApplicationCapacityDescription - :param managed_application_identity: Managed application identity - description. - :type managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - - _validation = { - 'name': {'required': True}, - 'type_name': {'required': True}, - 'type_version': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'parameter_list': {'key': 'ParameterList', 'type': '[ApplicationParameter]'}, - 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'ApplicationCapacityDescription'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__(self, *, name: str, type_name: str, type_version: str, parameter_list=None, application_capacity=None, managed_application_identity=None, **kwargs) -> None: - super(ApplicationDescription, self).__init__(**kwargs) - self.name = name - self.type_name = type_name - self.type_version = type_version - self.parameter_list = parameter_list - self.application_capacity = application_capacity - self.managed_application_identity = managed_application_identity diff --git a/customSDK/servicefabric/models/application_event.py b/customSDK/servicefabric/models/application_event.py deleted file mode 100644 index d85913a0..00000000 --- a/customSDK/servicefabric/models/application_event.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .fabric_event import FabricEvent - - -class ApplicationEvent(FabricEvent): - """Represents the base for all Application Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationCreatedEvent, ApplicationDeletedEvent, - ApplicationNewHealthReportEvent, ApplicationHealthReportExpiredEvent, - ApplicationUpgradeCompletedEvent, ApplicationUpgradeDomainCompletedEvent, - ApplicationUpgradeRollbackCompletedEvent, - ApplicationUpgradeRollbackStartedEvent, ApplicationUpgradeStartedEvent, - DeployedApplicationNewHealthReportEvent, - DeployedApplicationHealthReportExpiredEvent, ApplicationProcessExitedEvent, - ApplicationContainerInstanceExitedEvent, - DeployedServicePackageNewHealthReportEvent, - DeployedServicePackageHealthReportExpiredEvent, - ChaosCodePackageRestartScheduledEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ApplicationCreated': 'ApplicationCreatedEvent', 'ApplicationDeleted': 'ApplicationDeletedEvent', 'ApplicationNewHealthReport': 'ApplicationNewHealthReportEvent', 'ApplicationHealthReportExpired': 'ApplicationHealthReportExpiredEvent', 'ApplicationUpgradeCompleted': 'ApplicationUpgradeCompletedEvent', 'ApplicationUpgradeDomainCompleted': 'ApplicationUpgradeDomainCompletedEvent', 'ApplicationUpgradeRollbackCompleted': 'ApplicationUpgradeRollbackCompletedEvent', 'ApplicationUpgradeRollbackStarted': 'ApplicationUpgradeRollbackStartedEvent', 'ApplicationUpgradeStarted': 'ApplicationUpgradeStartedEvent', 'DeployedApplicationNewHealthReport': 'DeployedApplicationNewHealthReportEvent', 'DeployedApplicationHealthReportExpired': 'DeployedApplicationHealthReportExpiredEvent', 'ApplicationProcessExited': 'ApplicationProcessExitedEvent', 'ApplicationContainerInstanceExited': 'ApplicationContainerInstanceExitedEvent', 'DeployedServicePackageNewHealthReport': 'DeployedServicePackageNewHealthReportEvent', 'DeployedServicePackageHealthReportExpired': 'DeployedServicePackageHealthReportExpiredEvent', 'ChaosCodePackageRestartScheduled': 'ChaosCodePackageRestartScheduledEvent'} - } - - def __init__(self, **kwargs): - super(ApplicationEvent, self).__init__(**kwargs) - self.application_id = kwargs.get('application_id', None) - self.kind = 'ApplicationEvent' diff --git a/customSDK/servicefabric/models/application_event_py3.py b/customSDK/servicefabric/models/application_event_py3.py deleted file mode 100644 index 2383eef8..00000000 --- a/customSDK/servicefabric/models/application_event_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .fabric_event_py3 import FabricEvent - - -class ApplicationEvent(FabricEvent): - """Represents the base for all Application Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationCreatedEvent, ApplicationDeletedEvent, - ApplicationNewHealthReportEvent, ApplicationHealthReportExpiredEvent, - ApplicationUpgradeCompletedEvent, ApplicationUpgradeDomainCompletedEvent, - ApplicationUpgradeRollbackCompletedEvent, - ApplicationUpgradeRollbackStartedEvent, ApplicationUpgradeStartedEvent, - DeployedApplicationNewHealthReportEvent, - DeployedApplicationHealthReportExpiredEvent, ApplicationProcessExitedEvent, - ApplicationContainerInstanceExitedEvent, - DeployedServicePackageNewHealthReportEvent, - DeployedServicePackageHealthReportExpiredEvent, - ChaosCodePackageRestartScheduledEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ApplicationCreated': 'ApplicationCreatedEvent', 'ApplicationDeleted': 'ApplicationDeletedEvent', 'ApplicationNewHealthReport': 'ApplicationNewHealthReportEvent', 'ApplicationHealthReportExpired': 'ApplicationHealthReportExpiredEvent', 'ApplicationUpgradeCompleted': 'ApplicationUpgradeCompletedEvent', 'ApplicationUpgradeDomainCompleted': 'ApplicationUpgradeDomainCompletedEvent', 'ApplicationUpgradeRollbackCompleted': 'ApplicationUpgradeRollbackCompletedEvent', 'ApplicationUpgradeRollbackStarted': 'ApplicationUpgradeRollbackStartedEvent', 'ApplicationUpgradeStarted': 'ApplicationUpgradeStartedEvent', 'DeployedApplicationNewHealthReport': 'DeployedApplicationNewHealthReportEvent', 'DeployedApplicationHealthReportExpired': 'DeployedApplicationHealthReportExpiredEvent', 'ApplicationProcessExited': 'ApplicationProcessExitedEvent', 'ApplicationContainerInstanceExited': 'ApplicationContainerInstanceExitedEvent', 'DeployedServicePackageNewHealthReport': 'DeployedServicePackageNewHealthReportEvent', 'DeployedServicePackageHealthReportExpired': 'DeployedServicePackageHealthReportExpiredEvent', 'ChaosCodePackageRestartScheduled': 'ChaosCodePackageRestartScheduledEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.application_id = application_id - self.kind = 'ApplicationEvent' diff --git a/customSDK/servicefabric/models/application_health.py b/customSDK/servicefabric/models/application_health.py deleted file mode 100644 index f9e1a373..00000000 --- a/customSDK/servicefabric/models/application_health.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health import EntityHealth - - -class ApplicationHealth(EntityHealth): - """Represents the health of the application. Contains the application - aggregated health state and the service and deployed application health - states. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - :param service_health_states: Service health states as found in the health - store. - :type service_health_states: - list[~azure.servicefabric.models.ServiceHealthState] - :param deployed_application_health_states: Deployed application health - states as found in the health store. - :type deployed_application_health_states: - list[~azure.servicefabric.models.DeployedApplicationHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'service_health_states': {'key': 'ServiceHealthStates', 'type': '[ServiceHealthState]'}, - 'deployed_application_health_states': {'key': 'DeployedApplicationHealthStates', 'type': '[DeployedApplicationHealthState]'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealth, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.service_health_states = kwargs.get('service_health_states', None) - self.deployed_application_health_states = kwargs.get('deployed_application_health_states', None) diff --git a/customSDK/servicefabric/models/application_health_evaluation.py b/customSDK/servicefabric/models/application_health_evaluation.py deleted file mode 100644 index edaf4aa2..00000000 --- a/customSDK/servicefabric/models/application_health_evaluation.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class ApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for an application, containing information - about the data and the algorithm used by the health store to evaluate - health. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the application. The types of the - unhealthy evaluations can be DeployedApplicationsHealthEvaluation, - ServicesHealthEvaluation or EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthEvaluation, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Application' diff --git a/customSDK/servicefabric/models/application_health_evaluation_py3.py b/customSDK/servicefabric/models/application_health_evaluation_py3.py deleted file mode 100644 index a0abe474..00000000 --- a/customSDK/servicefabric/models/application_health_evaluation_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class ApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for an application, containing information - about the data and the algorithm used by the health store to evaluate - health. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the application. The types of the - unhealthy evaluations can be DeployedApplicationsHealthEvaluation, - ServicesHealthEvaluation or EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, application_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.application_name = application_name - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Application' diff --git a/customSDK/servicefabric/models/application_health_policies.py b/customSDK/servicefabric/models/application_health_policies.py deleted file mode 100644 index 7eb75f4d..00000000 --- a/customSDK/servicefabric/models/application_health_policies.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationHealthPolicies(Model): - """Defines the application health policy map used to evaluate the health of an - application or one of its children entities. - - :param application_health_policy_map: The wrapper that contains the map - with application health policies used to evaluate specific applications in - the cluster. - :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthPolicies, self).__init__(**kwargs) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) diff --git a/customSDK/servicefabric/models/application_health_policies_py3.py b/customSDK/servicefabric/models/application_health_policies_py3.py deleted file mode 100644 index 0487b4ce..00000000 --- a/customSDK/servicefabric/models/application_health_policies_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationHealthPolicies(Model): - """Defines the application health policy map used to evaluate the health of an - application or one of its children entities. - - :param application_health_policy_map: The wrapper that contains the map - with application health policies used to evaluate specific applications in - the cluster. - :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - } - - def __init__(self, *, application_health_policy_map=None, **kwargs) -> None: - super(ApplicationHealthPolicies, self).__init__(**kwargs) - self.application_health_policy_map = application_health_policy_map diff --git a/customSDK/servicefabric/models/application_health_policy.py b/customSDK/servicefabric/models/application_health_policy.py deleted file mode 100644 index bfdbeb6f..00000000 --- a/customSDK/servicefabric/models/application_health_policy.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationHealthPolicy(Model): - """Defines a health policy used to evaluate the health of an application or - one of its children entities. - - :param consider_warning_as_error: Indicates whether warnings are treated - with the same severity as errors. Default value: False . - :type consider_warning_as_error: bool - :param max_percent_unhealthy_deployed_applications: The maximum allowed - percentage of unhealthy deployed applications. Allowed values are Byte - values from zero to 100. - The percentage represents the maximum tolerated percentage of deployed - applications that can be unhealthy before the application is considered in - error. - This is calculated by dividing the number of unhealthy deployed - applications over the number of nodes where the application is currently - deployed on in the cluster. - The computation rounds up to tolerate one failure on small numbers of - nodes. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_deployed_applications: int - :param default_service_type_health_policy: The health policy used by - default to evaluate the health of a service type. - :type default_service_type_health_policy: - ~azure.servicefabric.models.ServiceTypeHealthPolicy - :param service_type_health_policy_map: The map with service type health - policy per service type name. The map is empty by default. - :type service_type_health_policy_map: - list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem] - """ - - _attribute_map = { - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'default_service_type_health_policy': {'key': 'DefaultServiceTypeHealthPolicy', 'type': 'ServiceTypeHealthPolicy'}, - 'service_type_health_policy_map': {'key': 'ServiceTypeHealthPolicyMap', 'type': '[ServiceTypeHealthPolicyMapItem]'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthPolicy, self).__init__(**kwargs) - self.consider_warning_as_error = kwargs.get('consider_warning_as_error', False) - self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', 0) - self.default_service_type_health_policy = kwargs.get('default_service_type_health_policy', None) - self.service_type_health_policy_map = kwargs.get('service_type_health_policy_map', None) diff --git a/customSDK/servicefabric/models/application_health_policy_map_item.py b/customSDK/servicefabric/models/application_health_policy_map_item.py deleted file mode 100644 index 3b1cf59e..00000000 --- a/customSDK/servicefabric/models/application_health_policy_map_item.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationHealthPolicyMapItem(Model): - """Defines an item in ApplicationHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key of the application health policy map item. - This is the name of the application. - :type key: str - :param value: Required. The value of the application health policy map - item. This is the ApplicationHealthPolicy for this application. - :type value: ~azure.servicefabric.models.ApplicationHealthPolicy - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ApplicationHealthPolicy'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthPolicyMapItem, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/application_health_policy_map_item_py3.py b/customSDK/servicefabric/models/application_health_policy_map_item_py3.py deleted file mode 100644 index cb7e5c92..00000000 --- a/customSDK/servicefabric/models/application_health_policy_map_item_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationHealthPolicyMapItem(Model): - """Defines an item in ApplicationHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key of the application health policy map item. - This is the name of the application. - :type key: str - :param value: Required. The value of the application health policy map - item. This is the ApplicationHealthPolicy for this application. - :type value: ~azure.servicefabric.models.ApplicationHealthPolicy - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ApplicationHealthPolicy'}, - } - - def __init__(self, *, key: str, value, **kwargs) -> None: - super(ApplicationHealthPolicyMapItem, self).__init__(**kwargs) - self.key = key - self.value = value diff --git a/customSDK/servicefabric/models/application_health_policy_map_object.py b/customSDK/servicefabric/models/application_health_policy_map_object.py deleted file mode 100644 index 8981ebfa..00000000 --- a/customSDK/servicefabric/models/application_health_policy_map_object.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationHealthPolicyMapObject(Model): - """Represents the map of application health policies for a ServiceFabric - cluster upgrade. - - :param application_health_policy_map: Defines a map that contains specific - application health policies for different applications. - Each entry specifies as key the application name and as value an - ApplicationHealthPolicy used to evaluate the application health. - If an application is not specified in the map, the application health - evaluation uses the ApplicationHealthPolicy found in its application - manifest or the default application health policy (if no health policy is - defined in the manifest). - The map is empty by default. - :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthPolicyMapObject, self).__init__(**kwargs) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) diff --git a/customSDK/servicefabric/models/application_health_policy_map_object_py3.py b/customSDK/servicefabric/models/application_health_policy_map_object_py3.py deleted file mode 100644 index 96a95a01..00000000 --- a/customSDK/servicefabric/models/application_health_policy_map_object_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationHealthPolicyMapObject(Model): - """Represents the map of application health policies for a ServiceFabric - cluster upgrade. - - :param application_health_policy_map: Defines a map that contains specific - application health policies for different applications. - Each entry specifies as key the application name and as value an - ApplicationHealthPolicy used to evaluate the application health. - If an application is not specified in the map, the application health - evaluation uses the ApplicationHealthPolicy found in its application - manifest or the default application health policy (if no health policy is - defined in the manifest). - The map is empty by default. - :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - } - - def __init__(self, *, application_health_policy_map=None, **kwargs) -> None: - super(ApplicationHealthPolicyMapObject, self).__init__(**kwargs) - self.application_health_policy_map = application_health_policy_map diff --git a/customSDK/servicefabric/models/application_health_policy_py3.py b/customSDK/servicefabric/models/application_health_policy_py3.py deleted file mode 100644 index 82e2dca9..00000000 --- a/customSDK/servicefabric/models/application_health_policy_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationHealthPolicy(Model): - """Defines a health policy used to evaluate the health of an application or - one of its children entities. - - :param consider_warning_as_error: Indicates whether warnings are treated - with the same severity as errors. Default value: False . - :type consider_warning_as_error: bool - :param max_percent_unhealthy_deployed_applications: The maximum allowed - percentage of unhealthy deployed applications. Allowed values are Byte - values from zero to 100. - The percentage represents the maximum tolerated percentage of deployed - applications that can be unhealthy before the application is considered in - error. - This is calculated by dividing the number of unhealthy deployed - applications over the number of nodes where the application is currently - deployed on in the cluster. - The computation rounds up to tolerate one failure on small numbers of - nodes. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_deployed_applications: int - :param default_service_type_health_policy: The health policy used by - default to evaluate the health of a service type. - :type default_service_type_health_policy: - ~azure.servicefabric.models.ServiceTypeHealthPolicy - :param service_type_health_policy_map: The map with service type health - policy per service type name. The map is empty by default. - :type service_type_health_policy_map: - list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem] - """ - - _attribute_map = { - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'default_service_type_health_policy': {'key': 'DefaultServiceTypeHealthPolicy', 'type': 'ServiceTypeHealthPolicy'}, - 'service_type_health_policy_map': {'key': 'ServiceTypeHealthPolicyMap', 'type': '[ServiceTypeHealthPolicyMapItem]'}, - } - - def __init__(self, *, consider_warning_as_error: bool=False, max_percent_unhealthy_deployed_applications: int=0, default_service_type_health_policy=None, service_type_health_policy_map=None, **kwargs) -> None: - super(ApplicationHealthPolicy, self).__init__(**kwargs) - self.consider_warning_as_error = consider_warning_as_error - self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications - self.default_service_type_health_policy = default_service_type_health_policy - self.service_type_health_policy_map = service_type_health_policy_map diff --git a/customSDK/servicefabric/models/application_health_py3.py b/customSDK/servicefabric/models/application_health_py3.py deleted file mode 100644 index 8606c2e4..00000000 --- a/customSDK/servicefabric/models/application_health_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_py3 import EntityHealth - - -class ApplicationHealth(EntityHealth): - """Represents the health of the application. Contains the application - aggregated health state and the service and deployed application health - states. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - :param service_health_states: Service health states as found in the health - store. - :type service_health_states: - list[~azure.servicefabric.models.ServiceHealthState] - :param deployed_application_health_states: Deployed application health - states as found in the health store. - :type deployed_application_health_states: - list[~azure.servicefabric.models.DeployedApplicationHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'service_health_states': {'key': 'ServiceHealthStates', 'type': '[ServiceHealthState]'}, - 'deployed_application_health_states': {'key': 'DeployedApplicationHealthStates', 'type': '[DeployedApplicationHealthState]'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, service_health_states=None, deployed_application_health_states=None, **kwargs) -> None: - super(ApplicationHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.name = name - self.service_health_states = service_health_states - self.deployed_application_health_states = deployed_application_health_states diff --git a/customSDK/servicefabric/models/application_health_report_expired_event.py b/customSDK/servicefabric/models/application_health_report_expired_event.py deleted file mode 100644 index d2771d14..00000000 --- a/customSDK/servicefabric/models/application_health_report_expired_event.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event import ApplicationEvent - - -class ApplicationHealthReportExpiredEvent(ApplicationEvent): - """Application Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_instance_id: Required. Id of Application instance. - :type application_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthReportExpiredEvent, self).__init__(**kwargs) - self.application_instance_id = kwargs.get('application_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ApplicationHealthReportExpired' diff --git a/customSDK/servicefabric/models/application_health_report_expired_event_py3.py b/customSDK/servicefabric/models/application_health_report_expired_event_py3.py deleted file mode 100644 index f4beb2ce..00000000 --- a/customSDK/servicefabric/models/application_health_report_expired_event_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event_py3 import ApplicationEvent - - -class ApplicationHealthReportExpiredEvent(ApplicationEvent): - """Application Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_instance_id: Required. Id of Application instance. - :type application_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_instance_id = application_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ApplicationHealthReportExpired' diff --git a/customSDK/servicefabric/models/application_health_state.py b/customSDK/servicefabric/models/application_health_state.py deleted file mode 100644 index ecdb9dcd..00000000 --- a/customSDK/servicefabric/models/application_health_state.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state import EntityHealthState - - -class ApplicationHealthState(EntityHealthState): - """Represents the health state of an application, which contains the - application identifier and the aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthState, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/application_health_state_chunk.py b/customSDK/servicefabric/models/application_health_state_chunk.py deleted file mode 100644 index 891a5620..00000000 --- a/customSDK/servicefabric/models/application_health_state_chunk.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk import EntityHealthStateChunk - - -class ApplicationHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a application. - The application health state chunk contains the application name, its - aggregated health state and any children services and deployed applications - that respect the filters in cluster health chunk query description. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param application_type_name: The application type name as defined in the - application manifest. - :type application_type_name: str - :param service_health_state_chunks: The list of service health state - chunks in the cluster that respect the filters in the cluster health chunk - query description. - :type service_health_state_chunks: - ~azure.servicefabric.models.ServiceHealthStateChunkList - :param deployed_application_health_state_chunks: The list of deployed - application health state chunks in the cluster that respect the filters in - the cluster health chunk query description. - :type deployed_application_health_state_chunks: - ~azure.servicefabric.models.DeployedApplicationHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_health_state_chunks': {'key': 'ServiceHealthStateChunks', 'type': 'ServiceHealthStateChunkList'}, - 'deployed_application_health_state_chunks': {'key': 'DeployedApplicationHealthStateChunks', 'type': 'DeployedApplicationHealthStateChunkList'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthStateChunk, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.application_type_name = kwargs.get('application_type_name', None) - self.service_health_state_chunks = kwargs.get('service_health_state_chunks', None) - self.deployed_application_health_state_chunks = kwargs.get('deployed_application_health_state_chunks', None) diff --git a/customSDK/servicefabric/models/application_health_state_chunk_list.py b/customSDK/servicefabric/models/application_health_state_chunk_list.py deleted file mode 100644 index fdd1c448..00000000 --- a/customSDK/servicefabric/models/application_health_state_chunk_list.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk_list import EntityHealthStateChunkList - - -class ApplicationHealthStateChunkList(EntityHealthStateChunkList): - """The list of application health state chunks in the cluster that respect the - input filters in the chunk query. Returned by get cluster health state - chunks query. - - :param total_count: Total number of entity health state objects that match - the specified filters from the cluster health chunk query description. - :type total_count: long - :param items: The list of application health state chunks that respect the - input filters in the chunk query. - :type items: list[~azure.servicefabric.models.ApplicationHealthStateChunk] - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'items': {'key': 'Items', 'type': '[ApplicationHealthStateChunk]'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/application_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/application_health_state_chunk_list_py3.py deleted file mode 100644 index dc914190..00000000 --- a/customSDK/servicefabric/models/application_health_state_chunk_list_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk_list_py3 import EntityHealthStateChunkList - - -class ApplicationHealthStateChunkList(EntityHealthStateChunkList): - """The list of application health state chunks in the cluster that respect the - input filters in the chunk query. Returned by get cluster health state - chunks query. - - :param total_count: Total number of entity health state objects that match - the specified filters from the cluster health chunk query description. - :type total_count: long - :param items: The list of application health state chunks that respect the - input filters in the chunk query. - :type items: list[~azure.servicefabric.models.ApplicationHealthStateChunk] - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'items': {'key': 'Items', 'type': '[ApplicationHealthStateChunk]'}, - } - - def __init__(self, *, total_count: int=None, items=None, **kwargs) -> None: - super(ApplicationHealthStateChunkList, self).__init__(total_count=total_count, **kwargs) - self.items = items diff --git a/customSDK/servicefabric/models/application_health_state_chunk_py3.py b/customSDK/servicefabric/models/application_health_state_chunk_py3.py deleted file mode 100644 index 52afcd53..00000000 --- a/customSDK/servicefabric/models/application_health_state_chunk_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk_py3 import EntityHealthStateChunk - - -class ApplicationHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a application. - The application health state chunk contains the application name, its - aggregated health state and any children services and deployed applications - that respect the filters in cluster health chunk query description. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param application_type_name: The application type name as defined in the - application manifest. - :type application_type_name: str - :param service_health_state_chunks: The list of service health state - chunks in the cluster that respect the filters in the cluster health chunk - query description. - :type service_health_state_chunks: - ~azure.servicefabric.models.ServiceHealthStateChunkList - :param deployed_application_health_state_chunks: The list of deployed - application health state chunks in the cluster that respect the filters in - the cluster health chunk query description. - :type deployed_application_health_state_chunks: - ~azure.servicefabric.models.DeployedApplicationHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_health_state_chunks': {'key': 'ServiceHealthStateChunks', 'type': 'ServiceHealthStateChunkList'}, - 'deployed_application_health_state_chunks': {'key': 'DeployedApplicationHealthStateChunks', 'type': 'DeployedApplicationHealthStateChunkList'}, - } - - def __init__(self, *, health_state=None, application_name: str=None, application_type_name: str=None, service_health_state_chunks=None, deployed_application_health_state_chunks=None, **kwargs) -> None: - super(ApplicationHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.application_name = application_name - self.application_type_name = application_type_name - self.service_health_state_chunks = service_health_state_chunks - self.deployed_application_health_state_chunks = deployed_application_health_state_chunks diff --git a/customSDK/servicefabric/models/application_health_state_filter.py b/customSDK/servicefabric/models/application_health_state_filter.py deleted file mode 100644 index 3bc1bfb7..00000000 --- a/customSDK/servicefabric/models/application_health_state_filter.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationHealthStateFilter(Model): - """Defines matching criteria to determine whether a application should be - included in the cluster health chunk. - One filter can match zero, one or multiple applications, depending on its - properties. - - :param application_name_filter: The name of the application that matches - the filter, as a fabric uri. The filter is applied only to the specified - application, if it exists. - If the application doesn't exist, no application is returned in the - cluster health chunk based on this filter. - If the application exists, it is included in the cluster health chunk if - it respects the other filter properties. - If not specified, all applications are matched against the other filter - members, like health state filter. - :type application_name_filter: str - :param application_type_name_filter: The name of the application type that - matches the filter. - If specified, the filter is applied only to applications of the selected - application type, if any exists. - If no applications of the specified application type exists, no - application is returned in the cluster health chunk based on this filter. - Each application of the specified application type is included in the - cluster health chunk if it respects the other filter properties. - If not specified, all applications are matched against the other filter - members, like health state filter. - :type application_type_name_filter: str - :param health_state_filter: The filter for the health state of the - applications. It allows selecting applications if they match the desired - health states. - The possible values are integer value of one of the following health - states. Only applications that match the filter are returned. All - applications are used to evaluate the cluster aggregated health state. - If not specified, default value is None, unless the application name or - the application type name are specified. If the filter has default value - and application name is specified, the matching application is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches applications with - HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - :param service_filters: Defines a list of filters that specify which - services to be included in the returned cluster health chunk as children - of the application. The services are returned only if the parent - application matches a filter. - If the list is empty, no services are returned. All the services are used - to evaluate the parent application aggregated health state, regardless of - the input filters. - The application filter may specify multiple service filters. - For example, it can specify a filter to return all services with health - state Error and another filter to always include a service identified by - its service name. - :type service_filters: - list[~azure.servicefabric.models.ServiceHealthStateFilter] - :param deployed_application_filters: Defines a list of filters that - specify which deployed applications to be included in the returned cluster - health chunk as children of the application. The deployed applications are - returned only if the parent application matches a filter. - If the list is empty, no deployed applications are returned. All the - deployed applications are used to evaluate the parent application - aggregated health state, regardless of the input filters. - The application filter may specify multiple deployed application filters. - For example, it can specify a filter to return all deployed applications - with health state Error and another filter to always include a deployed - application on a specified node. - :type deployed_application_filters: - list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter] - """ - - _attribute_map = { - 'application_name_filter': {'key': 'ApplicationNameFilter', 'type': 'str'}, - 'application_type_name_filter': {'key': 'ApplicationTypeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'service_filters': {'key': 'ServiceFilters', 'type': '[ServiceHealthStateFilter]'}, - 'deployed_application_filters': {'key': 'DeployedApplicationFilters', 'type': '[DeployedApplicationHealthStateFilter]'}, - } - - def __init__(self, **kwargs): - super(ApplicationHealthStateFilter, self).__init__(**kwargs) - self.application_name_filter = kwargs.get('application_name_filter', None) - self.application_type_name_filter = kwargs.get('application_type_name_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - self.service_filters = kwargs.get('service_filters', None) - self.deployed_application_filters = kwargs.get('deployed_application_filters', None) diff --git a/customSDK/servicefabric/models/application_health_state_filter_py3.py b/customSDK/servicefabric/models/application_health_state_filter_py3.py deleted file mode 100644 index 609e9191..00000000 --- a/customSDK/servicefabric/models/application_health_state_filter_py3.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationHealthStateFilter(Model): - """Defines matching criteria to determine whether a application should be - included in the cluster health chunk. - One filter can match zero, one or multiple applications, depending on its - properties. - - :param application_name_filter: The name of the application that matches - the filter, as a fabric uri. The filter is applied only to the specified - application, if it exists. - If the application doesn't exist, no application is returned in the - cluster health chunk based on this filter. - If the application exists, it is included in the cluster health chunk if - it respects the other filter properties. - If not specified, all applications are matched against the other filter - members, like health state filter. - :type application_name_filter: str - :param application_type_name_filter: The name of the application type that - matches the filter. - If specified, the filter is applied only to applications of the selected - application type, if any exists. - If no applications of the specified application type exists, no - application is returned in the cluster health chunk based on this filter. - Each application of the specified application type is included in the - cluster health chunk if it respects the other filter properties. - If not specified, all applications are matched against the other filter - members, like health state filter. - :type application_type_name_filter: str - :param health_state_filter: The filter for the health state of the - applications. It allows selecting applications if they match the desired - health states. - The possible values are integer value of one of the following health - states. Only applications that match the filter are returned. All - applications are used to evaluate the cluster aggregated health state. - If not specified, default value is None, unless the application name or - the application type name are specified. If the filter has default value - and application name is specified, the matching application is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches applications with - HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - :param service_filters: Defines a list of filters that specify which - services to be included in the returned cluster health chunk as children - of the application. The services are returned only if the parent - application matches a filter. - If the list is empty, no services are returned. All the services are used - to evaluate the parent application aggregated health state, regardless of - the input filters. - The application filter may specify multiple service filters. - For example, it can specify a filter to return all services with health - state Error and another filter to always include a service identified by - its service name. - :type service_filters: - list[~azure.servicefabric.models.ServiceHealthStateFilter] - :param deployed_application_filters: Defines a list of filters that - specify which deployed applications to be included in the returned cluster - health chunk as children of the application. The deployed applications are - returned only if the parent application matches a filter. - If the list is empty, no deployed applications are returned. All the - deployed applications are used to evaluate the parent application - aggregated health state, regardless of the input filters. - The application filter may specify multiple deployed application filters. - For example, it can specify a filter to return all deployed applications - with health state Error and another filter to always include a deployed - application on a specified node. - :type deployed_application_filters: - list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter] - """ - - _attribute_map = { - 'application_name_filter': {'key': 'ApplicationNameFilter', 'type': 'str'}, - 'application_type_name_filter': {'key': 'ApplicationTypeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'service_filters': {'key': 'ServiceFilters', 'type': '[ServiceHealthStateFilter]'}, - 'deployed_application_filters': {'key': 'DeployedApplicationFilters', 'type': '[DeployedApplicationHealthStateFilter]'}, - } - - def __init__(self, *, application_name_filter: str=None, application_type_name_filter: str=None, health_state_filter: int=0, service_filters=None, deployed_application_filters=None, **kwargs) -> None: - super(ApplicationHealthStateFilter, self).__init__(**kwargs) - self.application_name_filter = application_name_filter - self.application_type_name_filter = application_type_name_filter - self.health_state_filter = health_state_filter - self.service_filters = service_filters - self.deployed_application_filters = deployed_application_filters diff --git a/customSDK/servicefabric/models/application_health_state_py3.py b/customSDK/servicefabric/models/application_health_state_py3.py deleted file mode 100644 index 88480b6f..00000000 --- a/customSDK/servicefabric/models/application_health_state_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_py3 import EntityHealthState - - -class ApplicationHealthState(EntityHealthState): - """Represents the health state of an application, which contains the - application identifier and the aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, name: str=None, **kwargs) -> None: - super(ApplicationHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.name = name diff --git a/customSDK/servicefabric/models/application_info.py b/customSDK/servicefabric/models/application_info.py deleted file mode 100644 index 5d878bcd..00000000 --- a/customSDK/servicefabric/models/application_info.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInfo(Model): - """Information about a Service Fabric application. - - :param id: The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to - identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type id: str - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - :param type_name: The application type name as defined in the application - manifest. - :type type_name: str - :param type_version: The version of the application type as defined in the - application manifest. - :type type_version: str - :param status: The status of the application. Possible values include: - 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :type status: str or ~azure.servicefabric.models.ApplicationStatus - :param parameters: List of application parameters with overridden values - from their default values specified in the application manifest. - :type parameters: list[~azure.servicefabric.models.ApplicationParameter] - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param application_definition_kind: The mechanism used to define a Service - Fabric application. Possible values include: 'Invalid', - 'ServiceFabricApplicationDescription', 'Compose' - :type application_definition_kind: str or - ~azure.servicefabric.models.ApplicationDefinitionKind - :param managed_application_identity: Managed application identity - description. - :type managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__(self, **kwargs): - super(ApplicationInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.type_version = kwargs.get('type_version', None) - self.status = kwargs.get('status', None) - self.parameters = kwargs.get('parameters', None) - self.health_state = kwargs.get('health_state', None) - self.application_definition_kind = kwargs.get('application_definition_kind', None) - self.managed_application_identity = kwargs.get('managed_application_identity', None) diff --git a/customSDK/servicefabric/models/application_info_py3.py b/customSDK/servicefabric/models/application_info_py3.py deleted file mode 100644 index 6d107834..00000000 --- a/customSDK/servicefabric/models/application_info_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationInfo(Model): - """Information about a Service Fabric application. - - :param id: The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to - identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type id: str - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - :param type_name: The application type name as defined in the application - manifest. - :type type_name: str - :param type_version: The version of the application type as defined in the - application manifest. - :type type_version: str - :param status: The status of the application. Possible values include: - 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :type status: str or ~azure.servicefabric.models.ApplicationStatus - :param parameters: List of application parameters with overridden values - from their default values specified in the application manifest. - :type parameters: list[~azure.servicefabric.models.ApplicationParameter] - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param application_definition_kind: The mechanism used to define a Service - Fabric application. Possible values include: 'Invalid', - 'ServiceFabricApplicationDescription', 'Compose' - :type application_definition_kind: str or - ~azure.servicefabric.models.ApplicationDefinitionKind - :param managed_application_identity: Managed application identity - description. - :type managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__(self, *, id: str=None, name: str=None, type_name: str=None, type_version: str=None, status=None, parameters=None, health_state=None, application_definition_kind=None, managed_application_identity=None, **kwargs) -> None: - super(ApplicationInfo, self).__init__(**kwargs) - self.id = id - self.name = name - self.type_name = type_name - self.type_version = type_version - self.status = status - self.parameters = parameters - self.health_state = health_state - self.application_definition_kind = application_definition_kind - self.managed_application_identity = managed_application_identity diff --git a/customSDK/servicefabric/models/application_load_info.py b/customSDK/servicefabric/models/application_load_info.py deleted file mode 100644 index 1df604c4..00000000 --- a/customSDK/servicefabric/models/application_load_info.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationLoadInfo(Model): - """Load Information about a Service Fabric application. - - :param id: The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to - identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type id: str - :param minimum_nodes: The minimum number of nodes for this application. - It is the number of nodes where Service Fabric will reserve Capacity in - the cluster which equals to ReservedLoad * MinimumNodes for this - Application instance. - For applications that do not have application capacity defined this value - will be zero. - :type minimum_nodes: long - :param maximum_nodes: The maximum number of nodes where this application - can be instantiated. - It is the number of nodes this application is allowed to span. - For applications that do not have application capacity defined this value - will be zero. - :type maximum_nodes: long - :param node_count: The number of nodes on which this application is - instantiated. - For applications that do not have application capacity defined this value - will be zero. - :type node_count: long - :param application_load_metric_information: List of application load - metric information. - :type application_load_metric_information: - list[~azure.servicefabric.models.ApplicationLoadMetricInformation] - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'node_count': {'key': 'NodeCount', 'type': 'long'}, - 'application_load_metric_information': {'key': 'ApplicationLoadMetricInformation', 'type': '[ApplicationLoadMetricInformation]'}, - } - - def __init__(self, **kwargs): - super(ApplicationLoadInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.minimum_nodes = kwargs.get('minimum_nodes', None) - self.maximum_nodes = kwargs.get('maximum_nodes', None) - self.node_count = kwargs.get('node_count', None) - self.application_load_metric_information = kwargs.get('application_load_metric_information', None) diff --git a/customSDK/servicefabric/models/application_load_info_py3.py b/customSDK/servicefabric/models/application_load_info_py3.py deleted file mode 100644 index 25d008d9..00000000 --- a/customSDK/servicefabric/models/application_load_info_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationLoadInfo(Model): - """Load Information about a Service Fabric application. - - :param id: The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to - identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type id: str - :param minimum_nodes: The minimum number of nodes for this application. - It is the number of nodes where Service Fabric will reserve Capacity in - the cluster which equals to ReservedLoad * MinimumNodes for this - Application instance. - For applications that do not have application capacity defined this value - will be zero. - :type minimum_nodes: long - :param maximum_nodes: The maximum number of nodes where this application - can be instantiated. - It is the number of nodes this application is allowed to span. - For applications that do not have application capacity defined this value - will be zero. - :type maximum_nodes: long - :param node_count: The number of nodes on which this application is - instantiated. - For applications that do not have application capacity defined this value - will be zero. - :type node_count: long - :param application_load_metric_information: List of application load - metric information. - :type application_load_metric_information: - list[~azure.servicefabric.models.ApplicationLoadMetricInformation] - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'node_count': {'key': 'NodeCount', 'type': 'long'}, - 'application_load_metric_information': {'key': 'ApplicationLoadMetricInformation', 'type': '[ApplicationLoadMetricInformation]'}, - } - - def __init__(self, *, id: str=None, minimum_nodes: int=None, maximum_nodes: int=None, node_count: int=None, application_load_metric_information=None, **kwargs) -> None: - super(ApplicationLoadInfo, self).__init__(**kwargs) - self.id = id - self.minimum_nodes = minimum_nodes - self.maximum_nodes = maximum_nodes - self.node_count = node_count - self.application_load_metric_information = application_load_metric_information diff --git a/customSDK/servicefabric/models/application_load_metric_information.py b/customSDK/servicefabric/models/application_load_metric_information.py deleted file mode 100644 index 4ddf4b2e..00000000 --- a/customSDK/servicefabric/models/application_load_metric_information.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationLoadMetricInformation(Model): - """Describes load information for a custom resource balancing metric. This can - be used to limit the total consumption of this metric by the services of - this application. - - :param name: The name of the metric. - :type name: str - :param reservation_capacity: This is the capacity reserved in the cluster - for the application. - It's the product of NodeReservationCapacity and MinimumNodes. - If set to zero, no capacity is reserved for this metric. - When setting application capacity or when updating application capacity - this value must be smaller than or equal to MaximumCapacity for each - metric. - :type reservation_capacity: long - :param application_capacity: Total capacity for this metric in this - application instance. - :type application_capacity: long - :param application_load: Current load for this metric in this application - instance. - :type application_load: long - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, - 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'long'}, - 'application_load': {'key': 'ApplicationLoad', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(ApplicationLoadMetricInformation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.reservation_capacity = kwargs.get('reservation_capacity', None) - self.application_capacity = kwargs.get('application_capacity', None) - self.application_load = kwargs.get('application_load', None) diff --git a/customSDK/servicefabric/models/application_load_metric_information_py3.py b/customSDK/servicefabric/models/application_load_metric_information_py3.py deleted file mode 100644 index 3214985e..00000000 --- a/customSDK/servicefabric/models/application_load_metric_information_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationLoadMetricInformation(Model): - """Describes load information for a custom resource balancing metric. This can - be used to limit the total consumption of this metric by the services of - this application. - - :param name: The name of the metric. - :type name: str - :param reservation_capacity: This is the capacity reserved in the cluster - for the application. - It's the product of NodeReservationCapacity and MinimumNodes. - If set to zero, no capacity is reserved for this metric. - When setting application capacity or when updating application capacity - this value must be smaller than or equal to MaximumCapacity for each - metric. - :type reservation_capacity: long - :param application_capacity: Total capacity for this metric in this - application instance. - :type application_capacity: long - :param application_load: Current load for this metric in this application - instance. - :type application_load: long - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, - 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'long'}, - 'application_load': {'key': 'ApplicationLoad', 'type': 'long'}, - } - - def __init__(self, *, name: str=None, reservation_capacity: int=None, application_capacity: int=None, application_load: int=None, **kwargs) -> None: - super(ApplicationLoadMetricInformation, self).__init__(**kwargs) - self.name = name - self.reservation_capacity = reservation_capacity - self.application_capacity = application_capacity - self.application_load = application_load diff --git a/customSDK/servicefabric/models/application_metric_description.py b/customSDK/servicefabric/models/application_metric_description.py deleted file mode 100644 index 314e4829..00000000 --- a/customSDK/servicefabric/models/application_metric_description.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationMetricDescription(Model): - """Describes capacity information for a custom resource balancing metric. This - can be used to limit the total consumption of this metric by the services - of this application. - - :param name: The name of the metric. - :type name: str - :param maximum_capacity: The maximum node capacity for Service Fabric - application. - This is the maximum Load for an instance of this application on a single - node. Even if the capacity of node is greater than this value, Service - Fabric will limit the total load of services within the application on - each node to this value. - If set to zero, capacity for this metric is unlimited on each node. - When creating a new application with application capacity defined, the - product of MaximumNodes and this value must always be smaller than or - equal to TotalApplicationCapacity. - When updating existing application with application capacity, the product - of MaximumNodes and this value must always be smaller than or equal to - TotalApplicationCapacity. - :type maximum_capacity: long - :param reservation_capacity: The node reservation capacity for Service - Fabric application. - This is the amount of load which is reserved on nodes which have instances - of this application. - If MinimumNodes is specified, then the product of these values will be the - capacity reserved in the cluster for the application. - If set to zero, no capacity is reserved for this metric. - When setting application capacity or when updating application capacity; - this value must be smaller than or equal to MaximumCapacity for each - metric. - :type reservation_capacity: long - :param total_application_capacity: The total metric capacity for Service - Fabric application. - This is the total metric capacity for this application in the cluster. - Service Fabric will try to limit the sum of loads of services within the - application to this value. - When creating a new application with application capacity defined, the - product of MaximumNodes and MaximumCapacity must always be smaller than or - equal to this value. - :type total_application_capacity: long - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'maximum_capacity': {'key': 'MaximumCapacity', 'type': 'long'}, - 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, - 'total_application_capacity': {'key': 'TotalApplicationCapacity', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(ApplicationMetricDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.maximum_capacity = kwargs.get('maximum_capacity', None) - self.reservation_capacity = kwargs.get('reservation_capacity', None) - self.total_application_capacity = kwargs.get('total_application_capacity', None) diff --git a/customSDK/servicefabric/models/application_metric_description_py3.py b/customSDK/servicefabric/models/application_metric_description_py3.py deleted file mode 100644 index eb1b1034..00000000 --- a/customSDK/servicefabric/models/application_metric_description_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationMetricDescription(Model): - """Describes capacity information for a custom resource balancing metric. This - can be used to limit the total consumption of this metric by the services - of this application. - - :param name: The name of the metric. - :type name: str - :param maximum_capacity: The maximum node capacity for Service Fabric - application. - This is the maximum Load for an instance of this application on a single - node. Even if the capacity of node is greater than this value, Service - Fabric will limit the total load of services within the application on - each node to this value. - If set to zero, capacity for this metric is unlimited on each node. - When creating a new application with application capacity defined, the - product of MaximumNodes and this value must always be smaller than or - equal to TotalApplicationCapacity. - When updating existing application with application capacity, the product - of MaximumNodes and this value must always be smaller than or equal to - TotalApplicationCapacity. - :type maximum_capacity: long - :param reservation_capacity: The node reservation capacity for Service - Fabric application. - This is the amount of load which is reserved on nodes which have instances - of this application. - If MinimumNodes is specified, then the product of these values will be the - capacity reserved in the cluster for the application. - If set to zero, no capacity is reserved for this metric. - When setting application capacity or when updating application capacity; - this value must be smaller than or equal to MaximumCapacity for each - metric. - :type reservation_capacity: long - :param total_application_capacity: The total metric capacity for Service - Fabric application. - This is the total metric capacity for this application in the cluster. - Service Fabric will try to limit the sum of loads of services within the - application to this value. - When creating a new application with application capacity defined, the - product of MaximumNodes and MaximumCapacity must always be smaller than or - equal to this value. - :type total_application_capacity: long - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'maximum_capacity': {'key': 'MaximumCapacity', 'type': 'long'}, - 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, - 'total_application_capacity': {'key': 'TotalApplicationCapacity', 'type': 'long'}, - } - - def __init__(self, *, name: str=None, maximum_capacity: int=None, reservation_capacity: int=None, total_application_capacity: int=None, **kwargs) -> None: - super(ApplicationMetricDescription, self).__init__(**kwargs) - self.name = name - self.maximum_capacity = maximum_capacity - self.reservation_capacity = reservation_capacity - self.total_application_capacity = total_application_capacity diff --git a/customSDK/servicefabric/models/application_name_info.py b/customSDK/servicefabric/models/application_name_info.py deleted file mode 100644 index 072f51f7..00000000 --- a/customSDK/servicefabric/models/application_name_info.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationNameInfo(Model): - """Information about the application name. - - :param id: The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to - identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type id: str - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationNameInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/application_name_info_py3.py b/customSDK/servicefabric/models/application_name_info_py3.py deleted file mode 100644 index c259456f..00000000 --- a/customSDK/servicefabric/models/application_name_info_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationNameInfo(Model): - """Information about the application name. - - :param id: The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to - identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type id: str - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: - super(ApplicationNameInfo, self).__init__(**kwargs) - self.id = id - self.name = name diff --git a/customSDK/servicefabric/models/application_new_health_report_event.py b/customSDK/servicefabric/models/application_new_health_report_event.py deleted file mode 100644 index e45d2b4f..00000000 --- a/customSDK/servicefabric/models/application_new_health_report_event.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event import ApplicationEvent - - -class ApplicationNewHealthReportEvent(ApplicationEvent): - """Application Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_instance_id: Required. Id of Application instance. - :type application_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ApplicationNewHealthReportEvent, self).__init__(**kwargs) - self.application_instance_id = kwargs.get('application_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ApplicationNewHealthReport' diff --git a/customSDK/servicefabric/models/application_new_health_report_event_py3.py b/customSDK/servicefabric/models/application_new_health_report_event_py3.py deleted file mode 100644 index 912b7d4f..00000000 --- a/customSDK/servicefabric/models/application_new_health_report_event_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event_py3 import ApplicationEvent - - -class ApplicationNewHealthReportEvent(ApplicationEvent): - """Application Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_instance_id: Required. Id of Application instance. - :type application_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_instance_id = application_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ApplicationNewHealthReport' diff --git a/customSDK/servicefabric/models/application_parameter.py b/customSDK/servicefabric/models/application_parameter.py deleted file mode 100644 index 602c2e65..00000000 --- a/customSDK/servicefabric/models/application_parameter.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationParameter(Model): - """Describes an application parameter override to be applied when creating or - upgrading an application. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The name of the parameter. - :type key: str - :param value: Required. The value of the parameter. - :type value: str - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationParameter, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/application_parameter_py3.py b/customSDK/servicefabric/models/application_parameter_py3.py deleted file mode 100644 index d6d910df..00000000 --- a/customSDK/servicefabric/models/application_parameter_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationParameter(Model): - """Describes an application parameter override to be applied when creating or - upgrading an application. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The name of the parameter. - :type key: str - :param value: Required. The value of the parameter. - :type value: str - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - } - - def __init__(self, *, key: str, value: str, **kwargs) -> None: - super(ApplicationParameter, self).__init__(**kwargs) - self.key = key - self.value = value diff --git a/customSDK/servicefabric/models/application_process_exited_event.py b/customSDK/servicefabric/models/application_process_exited_event.py deleted file mode 100644 index 56578ff3..00000000 --- a/customSDK/servicefabric/models/application_process_exited_event.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event import ApplicationEvent - - -class ApplicationProcessExitedEvent(ApplicationEvent): - """Process Exited event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param service_name: Required. Name of Service. - :type service_name: str - :param service_package_name: Required. Name of Service package. - :type service_package_name: str - :param service_package_activation_id: Required. Activation Id of Service - package. - :type service_package_activation_id: str - :param is_exclusive: Required. Indicates IsExclusive flag. - :type is_exclusive: bool - :param code_package_name: Required. Name of Code package. - :type code_package_name: str - :param entry_point_type: Required. Type of EntryPoint. - :type entry_point_type: str - :param exe_name: Required. Name of executable. - :type exe_name: str - :param process_id: Required. Process Id. - :type process_id: long - :param host_id: Required. Host Id. - :type host_id: str - :param exit_code: Required. Exit code of process. - :type exit_code: long - :param unexpected_termination: Required. Indicates if termination is - unexpected. - :type unexpected_termination: bool - :param start_time: Required. Start time of process. - :type start_time: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_name': {'required': True}, - 'service_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'is_exclusive': {'required': True}, - 'code_package_name': {'required': True}, - 'entry_point_type': {'required': True}, - 'exe_name': {'required': True}, - 'process_id': {'required': True}, - 'host_id': {'required': True}, - 'exit_code': {'required': True}, - 'unexpected_termination': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, - 'exe_name': {'key': 'ExeName', 'type': 'str'}, - 'process_id': {'key': 'ProcessId', 'type': 'long'}, - 'host_id': {'key': 'HostId', 'type': 'str'}, - 'exit_code': {'key': 'ExitCode', 'type': 'long'}, - 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ApplicationProcessExitedEvent, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.service_package_name = kwargs.get('service_package_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.is_exclusive = kwargs.get('is_exclusive', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.entry_point_type = kwargs.get('entry_point_type', None) - self.exe_name = kwargs.get('exe_name', None) - self.process_id = kwargs.get('process_id', None) - self.host_id = kwargs.get('host_id', None) - self.exit_code = kwargs.get('exit_code', None) - self.unexpected_termination = kwargs.get('unexpected_termination', None) - self.start_time = kwargs.get('start_time', None) - self.kind = 'ApplicationProcessExited' diff --git a/customSDK/servicefabric/models/application_process_exited_event_py3.py b/customSDK/servicefabric/models/application_process_exited_event_py3.py deleted file mode 100644 index 26e7215f..00000000 --- a/customSDK/servicefabric/models/application_process_exited_event_py3.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event_py3 import ApplicationEvent - - -class ApplicationProcessExitedEvent(ApplicationEvent): - """Process Exited event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param service_name: Required. Name of Service. - :type service_name: str - :param service_package_name: Required. Name of Service package. - :type service_package_name: str - :param service_package_activation_id: Required. Activation Id of Service - package. - :type service_package_activation_id: str - :param is_exclusive: Required. Indicates IsExclusive flag. - :type is_exclusive: bool - :param code_package_name: Required. Name of Code package. - :type code_package_name: str - :param entry_point_type: Required. Type of EntryPoint. - :type entry_point_type: str - :param exe_name: Required. Name of executable. - :type exe_name: str - :param process_id: Required. Process Id. - :type process_id: long - :param host_id: Required. Host Id. - :type host_id: str - :param exit_code: Required. Exit code of process. - :type exit_code: long - :param unexpected_termination: Required. Indicates if termination is - unexpected. - :type unexpected_termination: bool - :param start_time: Required. Start time of process. - :type start_time: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_name': {'required': True}, - 'service_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'is_exclusive': {'required': True}, - 'code_package_name': {'required': True}, - 'entry_point_type': {'required': True}, - 'exe_name': {'required': True}, - 'process_id': {'required': True}, - 'host_id': {'required': True}, - 'exit_code': {'required': True}, - 'unexpected_termination': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, - 'exe_name': {'key': 'ExeName', 'type': 'str'}, - 'process_id': {'key': 'ProcessId', 'type': 'long'}, - 'host_id': {'key': 'HostId', 'type': 'str'}, - 'exit_code': {'key': 'ExitCode', 'type': 'long'}, - 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_name: str, service_package_name: str, service_package_activation_id: str, is_exclusive: bool, code_package_name: str, entry_point_type: str, exe_name: str, process_id: int, host_id: str, exit_code: int, unexpected_termination: bool, start_time, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationProcessExitedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.service_name = service_name - self.service_package_name = service_package_name - self.service_package_activation_id = service_package_activation_id - self.is_exclusive = is_exclusive - self.code_package_name = code_package_name - self.entry_point_type = entry_point_type - self.exe_name = exe_name - self.process_id = process_id - self.host_id = host_id - self.exit_code = exit_code - self.unexpected_termination = unexpected_termination - self.start_time = start_time - self.kind = 'ApplicationProcessExited' diff --git a/customSDK/servicefabric/models/application_resource_description.py b/customSDK/servicefabric/models/application_resource_description.py deleted file mode 100644 index c2d82acb..00000000 --- a/customSDK/servicefabric/models/application_resource_description.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationResourceDescription(Model): - """This type describes a application resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Application resource. - :type name: str - :param description: User readable description of the application. - :type description: str - :param services: Describes the services in the application. This property - is used to create or modify services of the application. On get only the - name of the service is returned. The service description can be obtained - by querying for the service resource. - :type services: - list[~azure.servicefabric.models.ServiceResourceDescription] - :param diagnostics: Describes the diagnostics definition and usage for an - application resource. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsDescription - :param debug_params: Internal - used by Visual Studio to setup the - debugging session on the local development environment. - :type debug_params: str - :ivar service_names: Names of the services in the application. - :vartype service_names: list[str] - :ivar status: Status of the application. Possible values include: - 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the application. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the application's health state is not - 'Ok', this additional details from service fabric Health Manager for the - user to know why the application is marked unhealthy. - :vartype unhealthy_evaluation: str - :param identity: Describes the identity of the application. - :type identity: ~azure.servicefabric.models.IdentityDescription - """ - - _validation = { - 'name': {'required': True}, - 'service_names': {'readonly': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, - 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, - 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'IdentityDescription'}, - } - - def __init__(self, **kwargs): - super(ApplicationResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) - self.services = kwargs.get('services', None) - self.diagnostics = kwargs.get('diagnostics', None) - self.debug_params = kwargs.get('debug_params', None) - self.service_names = None - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity = kwargs.get('identity', None) diff --git a/customSDK/servicefabric/models/application_resource_description_py3.py b/customSDK/servicefabric/models/application_resource_description_py3.py deleted file mode 100644 index 5ff296a3..00000000 --- a/customSDK/servicefabric/models/application_resource_description_py3.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationResourceDescription(Model): - """This type describes a application resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Application resource. - :type name: str - :param description: User readable description of the application. - :type description: str - :param services: Describes the services in the application. This property - is used to create or modify services of the application. On get only the - name of the service is returned. The service description can be obtained - by querying for the service resource. - :type services: - list[~azure.servicefabric.models.ServiceResourceDescription] - :param diagnostics: Describes the diagnostics definition and usage for an - application resource. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsDescription - :param debug_params: Internal - used by Visual Studio to setup the - debugging session on the local development environment. - :type debug_params: str - :ivar service_names: Names of the services in the application. - :vartype service_names: list[str] - :ivar status: Status of the application. Possible values include: - 'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the application. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the application's health state is not - 'Ok', this additional details from service fabric Health Manager for the - user to know why the application is marked unhealthy. - :vartype unhealthy_evaluation: str - :param identity: Describes the identity of the application. - :type identity: ~azure.servicefabric.models.IdentityDescription - """ - - _validation = { - 'name': {'required': True}, - 'service_names': {'readonly': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, - 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, - 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'IdentityDescription'}, - } - - def __init__(self, *, name: str, description: str=None, services=None, diagnostics=None, debug_params: str=None, identity=None, **kwargs) -> None: - super(ApplicationResourceDescription, self).__init__(**kwargs) - self.name = name - self.description = description - self.services = services - self.diagnostics = diagnostics - self.debug_params = debug_params - self.service_names = None - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity = identity diff --git a/customSDK/servicefabric/models/application_resource_upgrade_progress_info.py b/customSDK/servicefabric/models/application_resource_upgrade_progress_info.py deleted file mode 100644 index 53782922..00000000 --- a/customSDK/servicefabric/models/application_resource_upgrade_progress_info.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationResourceUpgradeProgressInfo(Model): - """This type describes an application resource upgrade. - - :param name: Name of the Application resource. - :type name: str - :param target_application_type_version: The target application version for - the application upgrade. - :type target_application_type_version: str - :param start_timestamp_utc: The estimated UTC datetime when the upgrade - started. - :type start_timestamp_utc: str - :param upgrade_state: The state of the application resource upgrade. - Possible values include: 'Invalid', 'ProvisioningTarget', - 'RollingForward', 'UnprovisioningCurrent', 'CompletedRollforward', - 'RollingBack', 'UnprovisioningTarget', 'CompletedRollback', 'Failed' - :type upgrade_state: str or - ~azure.servicefabric.models.ApplicationResourceUpgradeState - :param percent_completed: The estimated percent of replicas are completed - in the upgrade. - :type percent_completed: str - :param service_upgrade_progress: List of service upgrade progresses. - :type service_upgrade_progress: - list[~azure.servicefabric.models.ServiceUpgradeProgress] - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "Monitored" . - :type rolling_upgrade_mode: str or - ~azure.servicefabric.models.RollingUpgradeMode - :param upgrade_duration: The estimated amount of time that the overall - upgrade elapsed. It is first interpreted as a string representing an ISO - 8601 duration. If that fails, then it is interpreted as a number - representing the total number of milliseconds. Default value: "PT0H2M0S" . - :type upgrade_duration: str - :param application_upgrade_status_details: Additional detailed information - about the status of the pending upgrade. - :type application_upgrade_status_details: str - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). Default value: 42949672925 . - :type upgrade_replica_set_check_timeout_in_seconds: long - :param failure_timestamp_utc: The estimated UTC datetime when the upgrade - failed and FailureAction was executed. - :type failure_timestamp_utc: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'percent_completed': {'key': 'PercentCompleted', 'type': 'str'}, - 'service_upgrade_progress': {'key': 'ServiceUpgradeProgress', 'type': '[ServiceUpgradeProgress]'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationResourceUpgradeProgressInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.target_application_type_version = kwargs.get('target_application_type_version', None) - self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.percent_completed = kwargs.get('percent_completed', None) - self.service_upgrade_progress = kwargs.get('service_upgrade_progress', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "Monitored") - self.upgrade_duration = kwargs.get('upgrade_duration', "PT0H2M0S") - self.application_upgrade_status_details = kwargs.get('application_upgrade_status_details', None) - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925) - self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) diff --git a/customSDK/servicefabric/models/application_resource_upgrade_progress_info_py3.py b/customSDK/servicefabric/models/application_resource_upgrade_progress_info_py3.py deleted file mode 100644 index 8741db87..00000000 --- a/customSDK/servicefabric/models/application_resource_upgrade_progress_info_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationResourceUpgradeProgressInfo(Model): - """This type describes an application resource upgrade. - - :param name: Name of the Application resource. - :type name: str - :param target_application_type_version: The target application version for - the application upgrade. - :type target_application_type_version: str - :param start_timestamp_utc: The estimated UTC datetime when the upgrade - started. - :type start_timestamp_utc: str - :param upgrade_state: The state of the application resource upgrade. - Possible values include: 'Invalid', 'ProvisioningTarget', - 'RollingForward', 'UnprovisioningCurrent', 'CompletedRollforward', - 'RollingBack', 'UnprovisioningTarget', 'CompletedRollback', 'Failed' - :type upgrade_state: str or - ~azure.servicefabric.models.ApplicationResourceUpgradeState - :param percent_completed: The estimated percent of replicas are completed - in the upgrade. - :type percent_completed: str - :param service_upgrade_progress: List of service upgrade progresses. - :type service_upgrade_progress: - list[~azure.servicefabric.models.ServiceUpgradeProgress] - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and - Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', - 'UnmonitoredManual', 'Monitored'. Default value: "Monitored" . - :type rolling_upgrade_mode: str or - ~azure.servicefabric.models.RollingUpgradeMode - :param upgrade_duration: The estimated amount of time that the overall - upgrade elapsed. It is first interpreted as a string representing an ISO - 8601 duration. If that fails, then it is interpreted as a number - representing the total number of milliseconds. Default value: "PT0H2M0S" . - :type upgrade_duration: str - :param application_upgrade_status_details: Additional detailed information - about the status of the pending upgrade. - :type application_upgrade_status_details: str - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). Default value: 42949672925 . - :type upgrade_replica_set_check_timeout_in_seconds: long - :param failure_timestamp_utc: The estimated UTC datetime when the upgrade - failed and FailureAction was executed. - :type failure_timestamp_utc: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'percent_completed': {'key': 'PercentCompleted', 'type': 'str'}, - 'service_upgrade_progress': {'key': 'ServiceUpgradeProgress', 'type': '[ServiceUpgradeProgress]'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, target_application_type_version: str=None, start_timestamp_utc: str=None, upgrade_state=None, percent_completed: str=None, service_upgrade_progress=None, rolling_upgrade_mode="Monitored", upgrade_duration: str="PT0H2M0S", application_upgrade_status_details: str=None, upgrade_replica_set_check_timeout_in_seconds: int=42949672925, failure_timestamp_utc: str=None, **kwargs) -> None: - super(ApplicationResourceUpgradeProgressInfo, self).__init__(**kwargs) - self.name = name - self.target_application_type_version = target_application_type_version - self.start_timestamp_utc = start_timestamp_utc - self.upgrade_state = upgrade_state - self.percent_completed = percent_completed - self.service_upgrade_progress = service_upgrade_progress - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_duration = upgrade_duration - self.application_upgrade_status_details = application_upgrade_status_details - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.failure_timestamp_utc = failure_timestamp_utc diff --git a/customSDK/servicefabric/models/application_scoped_volume.py b/customSDK/servicefabric/models/application_scoped_volume.py deleted file mode 100644 index 267c4a06..00000000 --- a/customSDK/servicefabric/models/application_scoped_volume.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .volume_reference import VolumeReference - - -class ApplicationScopedVolume(VolumeReference): - """Describes a volume whose lifetime is scoped to the application's lifetime. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the volume being referenced. - :type name: str - :param read_only: The flag indicating whether the volume is read only. - Default is 'false'. - :type read_only: bool - :param destination_path: Required. The path within the container at which - the volume should be mounted. Only valid path characters are allowed. - :type destination_path: str - :param creation_parameters: Required. Describes parameters for creating - application-scoped volumes. - :type creation_parameters: - ~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters - """ - - _validation = { - 'name': {'required': True}, - 'destination_path': {'required': True}, - 'creation_parameters': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'destination_path': {'key': 'destinationPath', 'type': 'str'}, - 'creation_parameters': {'key': 'creationParameters', 'type': 'ApplicationScopedVolumeCreationParameters'}, - } - - def __init__(self, **kwargs): - super(ApplicationScopedVolume, self).__init__(**kwargs) - self.creation_parameters = kwargs.get('creation_parameters', None) diff --git a/customSDK/servicefabric/models/application_scoped_volume_creation_parameters.py b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters.py deleted file mode 100644 index b55aeb7b..00000000 --- a/customSDK/servicefabric/models/application_scoped_volume_creation_parameters.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationScopedVolumeCreationParameters(Model): - """Describes parameters for creating application-scoped volumes. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: - ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk - - All required parameters must be populated in order to send to Azure. - - :param description: User readable description of the volume. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ServiceFabricVolumeDisk': 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk'} - } - - def __init__(self, **kwargs): - super(ApplicationScopedVolumeCreationParameters, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.kind = None diff --git a/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_py3.py b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_py3.py deleted file mode 100644 index 27c8018f..00000000 --- a/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationScopedVolumeCreationParameters(Model): - """Describes parameters for creating application-scoped volumes. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: - ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk - - All required parameters must be populated in order to send to Azure. - - :param description: User readable description of the volume. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ServiceFabricVolumeDisk': 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk'} - } - - def __init__(self, *, description: str=None, **kwargs) -> None: - super(ApplicationScopedVolumeCreationParameters, self).__init__(**kwargs) - self.description = description - self.kind = None diff --git a/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk.py b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk.py deleted file mode 100644 index 945d283d..00000000 --- a/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_scoped_volume_creation_parameters import ApplicationScopedVolumeCreationParameters - - -class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk(ApplicationScopedVolumeCreationParameters): - """Describes parameters for creating application-scoped volumes provided by - Service Fabric Volume Disks. - - All required parameters must be populated in order to send to Azure. - - :param description: User readable description of the volume. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param size_disk: Required. Volume size. Possible values include: 'Small', - 'Medium', 'Large' - :type size_disk: str or ~azure.servicefabric.models.SizeTypes - """ - - _validation = { - 'kind': {'required': True}, - 'size_disk': {'required': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'size_disk': {'key': 'sizeDisk', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__(**kwargs) - self.size_disk = kwargs.get('size_disk', None) - self.kind = 'ServiceFabricVolumeDisk' diff --git a/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk_py3.py b/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk_py3.py deleted file mode 100644 index 279e0361..00000000 --- a/customSDK/servicefabric/models/application_scoped_volume_creation_parameters_service_fabric_volume_disk_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_scoped_volume_creation_parameters_py3 import ApplicationScopedVolumeCreationParameters - - -class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk(ApplicationScopedVolumeCreationParameters): - """Describes parameters for creating application-scoped volumes provided by - Service Fabric Volume Disks. - - All required parameters must be populated in order to send to Azure. - - :param description: User readable description of the volume. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param size_disk: Required. Volume size. Possible values include: 'Small', - 'Medium', 'Large' - :type size_disk: str or ~azure.servicefabric.models.SizeTypes - """ - - _validation = { - 'kind': {'required': True}, - 'size_disk': {'required': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'size_disk': {'key': 'sizeDisk', 'type': 'str'}, - } - - def __init__(self, *, size_disk, description: str=None, **kwargs) -> None: - super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__(description=description, **kwargs) - self.size_disk = size_disk - self.kind = 'ServiceFabricVolumeDisk' diff --git a/customSDK/servicefabric/models/application_scoped_volume_py3.py b/customSDK/servicefabric/models/application_scoped_volume_py3.py deleted file mode 100644 index 0c07eaf0..00000000 --- a/customSDK/servicefabric/models/application_scoped_volume_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .volume_reference_py3 import VolumeReference - - -class ApplicationScopedVolume(VolumeReference): - """Describes a volume whose lifetime is scoped to the application's lifetime. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the volume being referenced. - :type name: str - :param read_only: The flag indicating whether the volume is read only. - Default is 'false'. - :type read_only: bool - :param destination_path: Required. The path within the container at which - the volume should be mounted. Only valid path characters are allowed. - :type destination_path: str - :param creation_parameters: Required. Describes parameters for creating - application-scoped volumes. - :type creation_parameters: - ~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters - """ - - _validation = { - 'name': {'required': True}, - 'destination_path': {'required': True}, - 'creation_parameters': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'destination_path': {'key': 'destinationPath', 'type': 'str'}, - 'creation_parameters': {'key': 'creationParameters', 'type': 'ApplicationScopedVolumeCreationParameters'}, - } - - def __init__(self, *, name: str, destination_path: str, creation_parameters, read_only: bool=None, **kwargs) -> None: - super(ApplicationScopedVolume, self).__init__(name=name, read_only=read_only, destination_path=destination_path, **kwargs) - self.creation_parameters = creation_parameters diff --git a/customSDK/servicefabric/models/application_type_applications_health_evaluation.py b/customSDK/servicefabric/models/application_type_applications_health_evaluation.py deleted file mode 100644 index 7d2f5d26..00000000 --- a/customSDK/servicefabric/models/application_type_applications_health_evaluation.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for applications of a particular application - type. The application type applications evaluation can be returned when - cluster health evaluation returns unhealthy aggregated health state, either - Error or Warning. It contains health evaluations for each unhealthy - application of the included application type that impacted current - aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param application_type_name: The application type name as defined in the - application manifest. - :type application_type_name: str - :param max_percent_unhealthy_applications: Maximum allowed percentage of - unhealthy applications for the application type, specified as an entry in - ApplicationTypeHealthPolicyMap. - :type max_percent_unhealthy_applications: int - :param total_count: Total number of applications of the application type - found in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - ApplicationHealthEvaluation of this application type that impacted the - aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(ApplicationTypeApplicationsHealthEvaluation, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'ApplicationTypeApplications' diff --git a/customSDK/servicefabric/models/application_type_applications_health_evaluation_py3.py b/customSDK/servicefabric/models/application_type_applications_health_evaluation_py3.py deleted file mode 100644 index 44ff4575..00000000 --- a/customSDK/servicefabric/models/application_type_applications_health_evaluation_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for applications of a particular application - type. The application type applications evaluation can be returned when - cluster health evaluation returns unhealthy aggregated health state, either - Error or Warning. It contains health evaluations for each unhealthy - application of the included application type that impacted current - aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param application_type_name: The application type name as defined in the - application manifest. - :type application_type_name: str - :param max_percent_unhealthy_applications: Maximum allowed percentage of - unhealthy applications for the application type, specified as an entry in - ApplicationTypeHealthPolicyMap. - :type max_percent_unhealthy_applications: int - :param total_count: Total number of applications of the application type - found in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - ApplicationHealthEvaluation of this application type that impacted the - aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, application_type_name: str=None, max_percent_unhealthy_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ApplicationTypeApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.application_type_name = application_type_name - self.max_percent_unhealthy_applications = max_percent_unhealthy_applications - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'ApplicationTypeApplications' diff --git a/customSDK/servicefabric/models/application_type_health_policy_map_item.py b/customSDK/servicefabric/models/application_type_health_policy_map_item.py deleted file mode 100644 index 29b8c66b..00000000 --- a/customSDK/servicefabric/models/application_type_health_policy_map_item.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationTypeHealthPolicyMapItem(Model): - """Defines an item in ApplicationTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key of the application type health policy map - item. This is the name of the application type. - :type key: str - :param value: Required. The value of the application type health policy - map item. - The max percent unhealthy applications allowed for the application type. - Must be between zero and 100. - :type value: int - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ApplicationTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/application_type_health_policy_map_item_py3.py b/customSDK/servicefabric/models/application_type_health_policy_map_item_py3.py deleted file mode 100644 index a964308c..00000000 --- a/customSDK/servicefabric/models/application_type_health_policy_map_item_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationTypeHealthPolicyMapItem(Model): - """Defines an item in ApplicationTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key of the application type health policy map - item. This is the name of the application type. - :type key: str - :param value: Required. The value of the application type health policy - map item. - The max percent unhealthy applications allowed for the application type. - Must be between zero and 100. - :type value: int - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - } - - def __init__(self, *, key: str, value: int, **kwargs) -> None: - super(ApplicationTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = key - self.value = value diff --git a/customSDK/servicefabric/models/application_type_image_store_path.py b/customSDK/servicefabric/models/application_type_image_store_path.py deleted file mode 100644 index 89635121..00000000 --- a/customSDK/servicefabric/models/application_type_image_store_path.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationTypeImageStorePath(Model): - """Path description for the application package in the image store specified - during the prior copy operation. - - All required parameters must be populated in order to send to Azure. - - :param application_type_build_path: Required. The relative image store - path to the application package. - :type application_type_build_path: str - """ - - _validation = { - 'application_type_build_path': {'required': True}, - } - - _attribute_map = { - 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationTypeImageStorePath, self).__init__(**kwargs) - self.application_type_build_path = kwargs.get('application_type_build_path', None) diff --git a/customSDK/servicefabric/models/application_type_image_store_path_py3.py b/customSDK/servicefabric/models/application_type_image_store_path_py3.py deleted file mode 100644 index 750c366d..00000000 --- a/customSDK/servicefabric/models/application_type_image_store_path_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationTypeImageStorePath(Model): - """Path description for the application package in the image store specified - during the prior copy operation. - - All required parameters must be populated in order to send to Azure. - - :param application_type_build_path: Required. The relative image store - path to the application package. - :type application_type_build_path: str - """ - - _validation = { - 'application_type_build_path': {'required': True}, - } - - _attribute_map = { - 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, - } - - def __init__(self, *, application_type_build_path: str, **kwargs) -> None: - super(ApplicationTypeImageStorePath, self).__init__(**kwargs) - self.application_type_build_path = application_type_build_path diff --git a/customSDK/servicefabric/models/application_type_info.py b/customSDK/servicefabric/models/application_type_info.py deleted file mode 100644 index 6da4e92f..00000000 --- a/customSDK/servicefabric/models/application_type_info.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationTypeInfo(Model): - """Information about an application type. - - :param name: The application type name as defined in the application - manifest. - :type name: str - :param version: The version of the application type as defined in the - application manifest. - :type version: str - :param default_parameter_list: List of application type parameters that - can be overridden when creating or updating the application. - :type default_parameter_list: - list[~azure.servicefabric.models.ApplicationParameter] - :param status: The status of the application type. Possible values - include: 'Invalid', 'Provisioning', 'Available', 'Unprovisioning', - 'Failed' - :type status: str or ~azure.servicefabric.models.ApplicationTypeStatus - :param status_details: Additional detailed information about the status of - the application type. - :type status_details: str - :param application_type_definition_kind: The mechanism used to define a - Service Fabric application type. Possible values include: 'Invalid', - 'ServiceFabricApplicationPackage', 'Compose' - :type application_type_definition_kind: str or - ~azure.servicefabric.models.ApplicationTypeDefinitionKind - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'default_parameter_list': {'key': 'DefaultParameterList', 'type': '[ApplicationParameter]'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - 'application_type_definition_kind': {'key': 'ApplicationTypeDefinitionKind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationTypeInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) - self.default_parameter_list = kwargs.get('default_parameter_list', None) - self.status = kwargs.get('status', None) - self.status_details = kwargs.get('status_details', None) - self.application_type_definition_kind = kwargs.get('application_type_definition_kind', None) diff --git a/customSDK/servicefabric/models/application_type_info_py3.py b/customSDK/servicefabric/models/application_type_info_py3.py deleted file mode 100644 index 94b8e1b5..00000000 --- a/customSDK/servicefabric/models/application_type_info_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationTypeInfo(Model): - """Information about an application type. - - :param name: The application type name as defined in the application - manifest. - :type name: str - :param version: The version of the application type as defined in the - application manifest. - :type version: str - :param default_parameter_list: List of application type parameters that - can be overridden when creating or updating the application. - :type default_parameter_list: - list[~azure.servicefabric.models.ApplicationParameter] - :param status: The status of the application type. Possible values - include: 'Invalid', 'Provisioning', 'Available', 'Unprovisioning', - 'Failed' - :type status: str or ~azure.servicefabric.models.ApplicationTypeStatus - :param status_details: Additional detailed information about the status of - the application type. - :type status_details: str - :param application_type_definition_kind: The mechanism used to define a - Service Fabric application type. Possible values include: 'Invalid', - 'ServiceFabricApplicationPackage', 'Compose' - :type application_type_definition_kind: str or - ~azure.servicefabric.models.ApplicationTypeDefinitionKind - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'default_parameter_list': {'key': 'DefaultParameterList', 'type': '[ApplicationParameter]'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - 'application_type_definition_kind': {'key': 'ApplicationTypeDefinitionKind', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, version: str=None, default_parameter_list=None, status=None, status_details: str=None, application_type_definition_kind=None, **kwargs) -> None: - super(ApplicationTypeInfo, self).__init__(**kwargs) - self.name = name - self.version = version - self.default_parameter_list = default_parameter_list - self.status = status - self.status_details = status_details - self.application_type_definition_kind = application_type_definition_kind diff --git a/customSDK/servicefabric/models/application_type_manifest.py b/customSDK/servicefabric/models/application_type_manifest.py deleted file mode 100644 index 4d557712..00000000 --- a/customSDK/servicefabric/models/application_type_manifest.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationTypeManifest(Model): - """Contains the manifest describing an application type registered in a - Service Fabric cluster. - - :param manifest: The XML manifest as a string. - :type manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationTypeManifest, self).__init__(**kwargs) - self.manifest = kwargs.get('manifest', None) diff --git a/customSDK/servicefabric/models/application_type_manifest_py3.py b/customSDK/servicefabric/models/application_type_manifest_py3.py deleted file mode 100644 index befbb39f..00000000 --- a/customSDK/servicefabric/models/application_type_manifest_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationTypeManifest(Model): - """Contains the manifest describing an application type registered in a - Service Fabric cluster. - - :param manifest: The XML manifest as a string. - :type manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__(self, *, manifest: str=None, **kwargs) -> None: - super(ApplicationTypeManifest, self).__init__(**kwargs) - self.manifest = manifest diff --git a/customSDK/servicefabric/models/application_update_description.py b/customSDK/servicefabric/models/application_update_description.py deleted file mode 100644 index 76b4dcb9..00000000 --- a/customSDK/servicefabric/models/application_update_description.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationUpdateDescription(Model): - """Describes the parameters for updating an application instance. - - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - If flags are not specified for a certain property, the property will not - be updated even if the new value is provided. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. Exception is RemoveApplicationCapacity which cannot be - specified along with other parameters. - For example, if the provided value is 3 then the flags for MinimumNodes - (1) and MaximumNodes (2) are set. - - None - Does not indicate any other properties are set. The value is 0. - - MinimumNodes - Indicates whether the MinimumNodes property is set. The - value is 1. - - MaximumNodes - Indicates whether the MinimumNodes property is set. The - value is 2. - - ApplicationMetrics - Indicates whether the ApplicationMetrics property - is set. The value is 4. - :type flags: str - :param remove_application_capacity: Used to clear all parameters related - to Application Capacity for this application. | - It is not possible to specify this parameter together with other - Application Capacity parameters. Default value: False . - :type remove_application_capacity: bool - :param minimum_nodes: The minimum number of nodes where Service Fabric - will reserve capacity for this application. Note that this does not mean - that the services of this application will be placed on all of those - nodes. If this property is set to zero, no capacity will be reserved. The - value of this property cannot be more than the value of the MaximumNodes - property. - :type minimum_nodes: long - :param maximum_nodes: The maximum number of nodes where Service Fabric - will reserve capacity for this application. Note that this does not mean - that the services of this application will be placed on all of those - nodes. By default, the value of this property is zero and it means that - the services can be placed on any node. Default value: 0 . - :type maximum_nodes: long - :param application_metrics: List of application capacity metric - description. - :type application_metrics: - list[~azure.servicefabric.models.ApplicationMetricDescription] - """ - - _validation = { - 'minimum_nodes': {'minimum': 0}, - 'maximum_nodes': {'minimum': 0}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'remove_application_capacity': {'key': 'RemoveApplicationCapacity', 'type': 'bool'}, - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, - } - - def __init__(self, **kwargs): - super(ApplicationUpdateDescription, self).__init__(**kwargs) - self.flags = kwargs.get('flags', None) - self.remove_application_capacity = kwargs.get('remove_application_capacity', False) - self.minimum_nodes = kwargs.get('minimum_nodes', None) - self.maximum_nodes = kwargs.get('maximum_nodes', 0) - self.application_metrics = kwargs.get('application_metrics', None) diff --git a/customSDK/servicefabric/models/application_update_description_py3.py b/customSDK/servicefabric/models/application_update_description_py3.py deleted file mode 100644 index 433277e4..00000000 --- a/customSDK/servicefabric/models/application_update_description_py3.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationUpdateDescription(Model): - """Describes the parameters for updating an application instance. - - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - If flags are not specified for a certain property, the property will not - be updated even if the new value is provided. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. Exception is RemoveApplicationCapacity which cannot be - specified along with other parameters. - For example, if the provided value is 3 then the flags for MinimumNodes - (1) and MaximumNodes (2) are set. - - None - Does not indicate any other properties are set. The value is 0. - - MinimumNodes - Indicates whether the MinimumNodes property is set. The - value is 1. - - MaximumNodes - Indicates whether the MinimumNodes property is set. The - value is 2. - - ApplicationMetrics - Indicates whether the ApplicationMetrics property - is set. The value is 4. - :type flags: str - :param remove_application_capacity: Used to clear all parameters related - to Application Capacity for this application. | - It is not possible to specify this parameter together with other - Application Capacity parameters. Default value: False . - :type remove_application_capacity: bool - :param minimum_nodes: The minimum number of nodes where Service Fabric - will reserve capacity for this application. Note that this does not mean - that the services of this application will be placed on all of those - nodes. If this property is set to zero, no capacity will be reserved. The - value of this property cannot be more than the value of the MaximumNodes - property. - :type minimum_nodes: long - :param maximum_nodes: The maximum number of nodes where Service Fabric - will reserve capacity for this application. Note that this does not mean - that the services of this application will be placed on all of those - nodes. By default, the value of this property is zero and it means that - the services can be placed on any node. Default value: 0 . - :type maximum_nodes: long - :param application_metrics: List of application capacity metric - description. - :type application_metrics: - list[~azure.servicefabric.models.ApplicationMetricDescription] - """ - - _validation = { - 'minimum_nodes': {'minimum': 0}, - 'maximum_nodes': {'minimum': 0}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'remove_application_capacity': {'key': 'RemoveApplicationCapacity', 'type': 'bool'}, - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, - } - - def __init__(self, *, flags: str=None, remove_application_capacity: bool=False, minimum_nodes: int=None, maximum_nodes: int=0, application_metrics=None, **kwargs) -> None: - super(ApplicationUpdateDescription, self).__init__(**kwargs) - self.flags = flags - self.remove_application_capacity = remove_application_capacity - self.minimum_nodes = minimum_nodes - self.maximum_nodes = maximum_nodes - self.application_metrics = application_metrics diff --git a/customSDK/servicefabric/models/application_upgrade_completed_event.py b/customSDK/servicefabric/models/application_upgrade_completed_event.py deleted file mode 100644 index ed48f2f6..00000000 --- a/customSDK/servicefabric/models/application_upgrade_completed_event.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event import ApplicationEvent - - -class ApplicationUpgradeCompletedEvent(ApplicationEvent): - """Application Upgrade Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param application_type_version: Required. Application type version. - :type application_type_version: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time - in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ApplicationUpgradeCompletedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ApplicationUpgradeCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_completed_event_py3.py b/customSDK/servicefabric/models/application_upgrade_completed_event_py3.py deleted file mode 100644 index d3a3f0a7..00000000 --- a/customSDK/servicefabric/models/application_upgrade_completed_event_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event_py3 import ApplicationEvent - - -class ApplicationUpgradeCompletedEvent(ApplicationEvent): - """Application Upgrade Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param application_type_version: Required. Application type version. - :type application_type_version: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time - in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationUpgradeCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_type_name = application_type_name - self.application_type_version = application_type_version - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ApplicationUpgradeCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_description.py b/customSDK/servicefabric/models/application_upgrade_description.py deleted file mode 100644 index 6aa7a974..00000000 --- a/customSDK/servicefabric/models/application_upgrade_description.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationUpgradeDescription(Model): - """Describes the parameters for an application upgrade. Note that upgrade - description replaces the existing application description. This means that - if the parameters are not specified, the existing parameters on the - applications will be overwritten with the empty parameters list. This would - result in the application using the default value of the parameters from - the application manifest. If you do not want to change any existing - parameter values, please get the application parameters first using the - GetApplicationInfo query and then supply those values as Parameters in this - ApplicationUpgradeDescription. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the target application, including the - 'fabric:' URI scheme. - :type name: str - :param target_application_type_version: Required. The target application - type version (found in the application manifest) for the application - upgrade. - :type target_application_type_version: str - :param parameters: List of application parameters with overridden values - from their default values specified in the application manifest. - :type parameters: list[~azure.servicefabric.models.ApplicationParameter] - :param upgrade_kind: Required. The kind of upgrade out of the following - possible values. Possible values include: 'Invalid', 'Rolling'. Default - value: "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, - Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', - 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', - 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param sort_order: Defines the order in which an upgrade proceeds through - the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', - 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default - value: "Default" . - :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param instance_close_delay_duration_in_seconds: Duration in seconds, to - wait before a stateless instance is closed, to allow the active requests - to drain gracefully. This would be effective when the instance is closing - during the application/cluster - upgrade, only for those instances which have a non-zero delay duration - configured in the service description. See - InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is - 4294967295, which indicates that the behavior will entirely depend on the - delay configured in the stateless service description. - :type instance_close_delay_duration_in_seconds: long - :param managed_application_identity: Managed application identity - description. - :type managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - - _validation = { - 'name': {'required': True}, - 'target_application_type_version': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__(self, **kwargs): - super(ApplicationUpgradeDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.target_application_type_version = kwargs.get('target_application_type_version', None) - self.parameters = kwargs.get('parameters', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) - self.force_restart = kwargs.get('force_restart', None) - self.sort_order = kwargs.get('sort_order', "Default") - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.application_health_policy = kwargs.get('application_health_policy', None) - self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', None) - self.managed_application_identity = kwargs.get('managed_application_identity', None) diff --git a/customSDK/servicefabric/models/application_upgrade_description_py3.py b/customSDK/servicefabric/models/application_upgrade_description_py3.py deleted file mode 100644 index c52facc2..00000000 --- a/customSDK/servicefabric/models/application_upgrade_description_py3.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationUpgradeDescription(Model): - """Describes the parameters for an application upgrade. Note that upgrade - description replaces the existing application description. This means that - if the parameters are not specified, the existing parameters on the - applications will be overwritten with the empty parameters list. This would - result in the application using the default value of the parameters from - the application manifest. If you do not want to change any existing - parameter values, please get the application parameters first using the - GetApplicationInfo query and then supply those values as Parameters in this - ApplicationUpgradeDescription. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the target application, including the - 'fabric:' URI scheme. - :type name: str - :param target_application_type_version: Required. The target application - type version (found in the application manifest) for the application - upgrade. - :type target_application_type_version: str - :param parameters: List of application parameters with overridden values - from their default values specified in the application manifest. - :type parameters: list[~azure.servicefabric.models.ApplicationParameter] - :param upgrade_kind: Required. The kind of upgrade out of the following - possible values. Possible values include: 'Invalid', 'Rolling'. Default - value: "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, - Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', - 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', - 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param sort_order: Defines the order in which an upgrade proceeds through - the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', - 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default - value: "Default" . - :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param instance_close_delay_duration_in_seconds: Duration in seconds, to - wait before a stateless instance is closed, to allow the active requests - to drain gracefully. This would be effective when the instance is closing - during the application/cluster - upgrade, only for those instances which have a non-zero delay duration - configured in the service description. See - InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is - 4294967295, which indicates that the behavior will entirely depend on the - delay configured in the stateless service description. - :type instance_close_delay_duration_in_seconds: long - :param managed_application_identity: Managed application identity - description. - :type managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - - _validation = { - 'name': {'required': True}, - 'target_application_type_version': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__(self, *, name: str, target_application_type_version: str, parameters=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", monitoring_policy=None, application_health_policy=None, instance_close_delay_duration_in_seconds: int=None, managed_application_identity=None, **kwargs) -> None: - super(ApplicationUpgradeDescription, self).__init__(**kwargs) - self.name = name - self.target_application_type_version = target_application_type_version - self.parameters = parameters - self.upgrade_kind = upgrade_kind - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.force_restart = force_restart - self.sort_order = sort_order - self.monitoring_policy = monitoring_policy - self.application_health_policy = application_health_policy - self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds - self.managed_application_identity = managed_application_identity diff --git a/customSDK/servicefabric/models/application_upgrade_domain_completed_event.py b/customSDK/servicefabric/models/application_upgrade_domain_completed_event.py deleted file mode 100644 index 292ec1c8..00000000 --- a/customSDK/servicefabric/models/application_upgrade_domain_completed_event.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event import ApplicationEvent - - -class ApplicationUpgradeDomainCompletedEvent(ApplicationEvent): - """Application Upgrade Domain Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param current_application_type_version: Required. Current Application - type version. - :type current_application_type_version: str - :param application_type_version: Required. Target Application type - version. - :type application_type_version: str - :param upgrade_state: Required. State of upgrade. - :type upgrade_state: str - :param upgrade_domains: Required. Upgrade domains. - :type upgrade_domains: str - :param upgrade_domain_elapsed_time_in_ms: Required. Upgrade time of domain - in milli-seconds. - :type upgrade_domain_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'upgrade_state': {'required': True}, - 'upgrade_domains': {'required': True}, - 'upgrade_domain_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, - 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ApplicationUpgradeDomainCompletedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.current_application_type_version = kwargs.get('current_application_type_version', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.upgrade_domains = kwargs.get('upgrade_domains', None) - self.upgrade_domain_elapsed_time_in_ms = kwargs.get('upgrade_domain_elapsed_time_in_ms', None) - self.kind = 'ApplicationUpgradeDomainCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_domain_completed_event_py3.py b/customSDK/servicefabric/models/application_upgrade_domain_completed_event_py3.py deleted file mode 100644 index eb424ead..00000000 --- a/customSDK/servicefabric/models/application_upgrade_domain_completed_event_py3.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event_py3 import ApplicationEvent - - -class ApplicationUpgradeDomainCompletedEvent(ApplicationEvent): - """Application Upgrade Domain Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param current_application_type_version: Required. Current Application - type version. - :type current_application_type_version: str - :param application_type_version: Required. Target Application type - version. - :type application_type_version: str - :param upgrade_state: Required. State of upgrade. - :type upgrade_state: str - :param upgrade_domains: Required. Upgrade domains. - :type upgrade_domains: str - :param upgrade_domain_elapsed_time_in_ms: Required. Upgrade time of domain - in milli-seconds. - :type upgrade_domain_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'upgrade_state': {'required': True}, - 'upgrade_domains': {'required': True}, - 'upgrade_domain_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, - 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, current_application_type_version: str, application_type_version: str, upgrade_state: str, upgrade_domains: str, upgrade_domain_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationUpgradeDomainCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_type_name = application_type_name - self.current_application_type_version = current_application_type_version - self.application_type_version = application_type_version - self.upgrade_state = upgrade_state - self.upgrade_domains = upgrade_domains - self.upgrade_domain_elapsed_time_in_ms = upgrade_domain_elapsed_time_in_ms - self.kind = 'ApplicationUpgradeDomainCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_progress_info.py b/customSDK/servicefabric/models/application_upgrade_progress_info.py deleted file mode 100644 index 9c63a464..00000000 --- a/customSDK/servicefabric/models/application_upgrade_progress_info.py +++ /dev/null @@ -1,142 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationUpgradeProgressInfo(Model): - """Describes the parameters for an application upgrade. - - :param name: The name of the target application, including the 'fabric:' - URI scheme. - :type name: str - :param type_name: The application type name as defined in the application - manifest. - :type type_name: str - :param target_application_type_version: The target application type - version (found in the application manifest) for the application upgrade. - :type target_application_type_version: str - :param upgrade_domains: List of upgrade domains and their statuses. Not - applicable to node-by-node upgrades. - :type upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] - :param upgrade_units: List of upgrade units and their statuses. - :type upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] - :param upgrade_state: The state of the upgrade domain. Possible values - include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', - 'RollingForwardPending', 'RollingForwardInProgress', - 'RollingForwardCompleted', 'Failed' - :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :param next_upgrade_domain: The name of the next upgrade domain to be - processed. Not applicable to node-by-node upgrades. - :type next_upgrade_domain: str - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, - Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', - 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', - 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_description: Describes the parameters for an application - upgrade. Note that upgrade description replaces the existing application - description. This means that if the parameters are not specified, the - existing parameters on the applications will be overwritten with the empty - parameters list. This would result in the application using the default - value of the parameters from the application manifest. If you do not want - to change any existing parameter values, please get the application - parameters first using the GetApplicationInfo query and then supply those - values as Parameters in this ApplicationUpgradeDescription. - :type upgrade_description: - ~azure.servicefabric.models.ApplicationUpgradeDescription - :param upgrade_duration_in_milliseconds: The estimated total amount of - time spent processing the overall upgrade. - :type upgrade_duration_in_milliseconds: str - :param upgrade_domain_duration_in_milliseconds: The estimated total amount - of time spent processing the current upgrade domain. - :type upgrade_domain_duration_in_milliseconds: str - :param unhealthy_evaluations: List of health evaluations that resulted in - the current aggregated health state. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param current_upgrade_domain_progress: Information about the current - in-progress upgrade domain. Not applicable to node-by-node upgrades. - :type current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :param current_upgrade_units_progress: Information about the current - in-progress upgrade units. - :type current_upgrade_units_progress: - ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo - :param start_timestamp_utc: The estimated UTC datetime when the upgrade - started. - :type start_timestamp_utc: str - :param failure_timestamp_utc: The estimated UTC datetime when the upgrade - failed and FailureAction was executed. - :type failure_timestamp_utc: str - :param failure_reason: The cause of an upgrade failure that resulted in - FailureAction being executed. Possible values include: 'None', - 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', - 'OverallUpgradeTimeout' - :type failure_reason: str or ~azure.servicefabric.models.FailureReason - :param upgrade_domain_progress_at_failure: Information about the upgrade - domain progress at the time of upgrade failure. - :type upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo - :param upgrade_status_details: Additional detailed information about the - status of the pending upgrade. - :type upgrade_status_details: str - :param is_node_by_node: Indicates whether this upgrade is node-by-node. - Default value: False . - :type is_node_by_node: bool - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, - 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ApplicationUpgradeDescription'}, - 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, - 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, - 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, - 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ApplicationUpgradeProgressInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.target_application_type_version = kwargs.get('target_application_type_version', None) - self.upgrade_domains = kwargs.get('upgrade_domains', None) - self.upgrade_units = kwargs.get('upgrade_units', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.next_upgrade_domain = kwargs.get('next_upgrade_domain', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_description = kwargs.get('upgrade_description', None) - self.upgrade_duration_in_milliseconds = kwargs.get('upgrade_duration_in_milliseconds', None) - self.upgrade_domain_duration_in_milliseconds = kwargs.get('upgrade_domain_duration_in_milliseconds', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) - self.current_upgrade_units_progress = kwargs.get('current_upgrade_units_progress', None) - self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) - self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) - self.upgrade_status_details = kwargs.get('upgrade_status_details', None) - self.is_node_by_node = kwargs.get('is_node_by_node', False) diff --git a/customSDK/servicefabric/models/application_upgrade_progress_info_py3.py b/customSDK/servicefabric/models/application_upgrade_progress_info_py3.py deleted file mode 100644 index 2d7b267f..00000000 --- a/customSDK/servicefabric/models/application_upgrade_progress_info_py3.py +++ /dev/null @@ -1,142 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationUpgradeProgressInfo(Model): - """Describes the parameters for an application upgrade. - - :param name: The name of the target application, including the 'fabric:' - URI scheme. - :type name: str - :param type_name: The application type name as defined in the application - manifest. - :type type_name: str - :param target_application_type_version: The target application type - version (found in the application manifest) for the application upgrade. - :type target_application_type_version: str - :param upgrade_domains: List of upgrade domains and their statuses. Not - applicable to node-by-node upgrades. - :type upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] - :param upgrade_units: List of upgrade units and their statuses. - :type upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] - :param upgrade_state: The state of the upgrade domain. Possible values - include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', - 'RollingForwardPending', 'RollingForwardInProgress', - 'RollingForwardCompleted', 'Failed' - :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :param next_upgrade_domain: The name of the next upgrade domain to be - processed. Not applicable to node-by-node upgrades. - :type next_upgrade_domain: str - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, - Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', - 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', - 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_description: Describes the parameters for an application - upgrade. Note that upgrade description replaces the existing application - description. This means that if the parameters are not specified, the - existing parameters on the applications will be overwritten with the empty - parameters list. This would result in the application using the default - value of the parameters from the application manifest. If you do not want - to change any existing parameter values, please get the application - parameters first using the GetApplicationInfo query and then supply those - values as Parameters in this ApplicationUpgradeDescription. - :type upgrade_description: - ~azure.servicefabric.models.ApplicationUpgradeDescription - :param upgrade_duration_in_milliseconds: The estimated total amount of - time spent processing the overall upgrade. - :type upgrade_duration_in_milliseconds: str - :param upgrade_domain_duration_in_milliseconds: The estimated total amount - of time spent processing the current upgrade domain. - :type upgrade_domain_duration_in_milliseconds: str - :param unhealthy_evaluations: List of health evaluations that resulted in - the current aggregated health state. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param current_upgrade_domain_progress: Information about the current - in-progress upgrade domain. Not applicable to node-by-node upgrades. - :type current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :param current_upgrade_units_progress: Information about the current - in-progress upgrade units. - :type current_upgrade_units_progress: - ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo - :param start_timestamp_utc: The estimated UTC datetime when the upgrade - started. - :type start_timestamp_utc: str - :param failure_timestamp_utc: The estimated UTC datetime when the upgrade - failed and FailureAction was executed. - :type failure_timestamp_utc: str - :param failure_reason: The cause of an upgrade failure that resulted in - FailureAction being executed. Possible values include: 'None', - 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', - 'OverallUpgradeTimeout' - :type failure_reason: str or ~azure.servicefabric.models.FailureReason - :param upgrade_domain_progress_at_failure: Information about the upgrade - domain progress at the time of upgrade failure. - :type upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo - :param upgrade_status_details: Additional detailed information about the - status of the pending upgrade. - :type upgrade_status_details: str - :param is_node_by_node: Indicates whether this upgrade is node-by-node. - Default value: False . - :type is_node_by_node: bool - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, - 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ApplicationUpgradeDescription'}, - 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, - 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, - 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, - 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, - } - - def __init__(self, *, name: str=None, type_name: str=None, target_application_type_version: str=None, upgrade_domains=None, upgrade_units=None, upgrade_state=None, next_upgrade_domain: str=None, rolling_upgrade_mode="UnmonitoredAuto", upgrade_description=None, upgrade_duration_in_milliseconds: str=None, upgrade_domain_duration_in_milliseconds: str=None, unhealthy_evaluations=None, current_upgrade_domain_progress=None, current_upgrade_units_progress=None, start_timestamp_utc: str=None, failure_timestamp_utc: str=None, failure_reason=None, upgrade_domain_progress_at_failure=None, upgrade_status_details: str=None, is_node_by_node: bool=False, **kwargs) -> None: - super(ApplicationUpgradeProgressInfo, self).__init__(**kwargs) - self.name = name - self.type_name = type_name - self.target_application_type_version = target_application_type_version - self.upgrade_domains = upgrade_domains - self.upgrade_units = upgrade_units - self.upgrade_state = upgrade_state - self.next_upgrade_domain = next_upgrade_domain - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_description = upgrade_description - self.upgrade_duration_in_milliseconds = upgrade_duration_in_milliseconds - self.upgrade_domain_duration_in_milliseconds = upgrade_domain_duration_in_milliseconds - self.unhealthy_evaluations = unhealthy_evaluations - self.current_upgrade_domain_progress = current_upgrade_domain_progress - self.current_upgrade_units_progress = current_upgrade_units_progress - self.start_timestamp_utc = start_timestamp_utc - self.failure_timestamp_utc = failure_timestamp_utc - self.failure_reason = failure_reason - self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure - self.upgrade_status_details = upgrade_status_details - self.is_node_by_node = is_node_by_node diff --git a/customSDK/servicefabric/models/application_upgrade_rollback_completed_event.py b/customSDK/servicefabric/models/application_upgrade_rollback_completed_event.py deleted file mode 100644 index a28a48ad..00000000 --- a/customSDK/servicefabric/models/application_upgrade_rollback_completed_event.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event import ApplicationEvent - - -class ApplicationUpgradeRollbackCompletedEvent(ApplicationEvent): - """Application Upgrade Rollback Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param application_type_version: Required. Application type version. - :type application_type_version: str - :param failure_reason: Required. Describes reason of failure. - :type failure_reason: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time - in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ApplicationUpgradeRollbackCompletedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ApplicationUpgradeRollbackCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_rollback_completed_event_py3.py b/customSDK/servicefabric/models/application_upgrade_rollback_completed_event_py3.py deleted file mode 100644 index 2cb37f77..00000000 --- a/customSDK/servicefabric/models/application_upgrade_rollback_completed_event_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event_py3 import ApplicationEvent - - -class ApplicationUpgradeRollbackCompletedEvent(ApplicationEvent): - """Application Upgrade Rollback Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param application_type_version: Required. Application type version. - :type application_type_version: str - :param failure_reason: Required. Describes reason of failure. - :type failure_reason: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time - in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationUpgradeRollbackCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_type_name = application_type_name - self.application_type_version = application_type_version - self.failure_reason = failure_reason - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ApplicationUpgradeRollbackCompleted' diff --git a/customSDK/servicefabric/models/application_upgrade_rollback_started_event.py b/customSDK/servicefabric/models/application_upgrade_rollback_started_event.py deleted file mode 100644 index 23887afa..00000000 --- a/customSDK/servicefabric/models/application_upgrade_rollback_started_event.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event import ApplicationEvent - - -class ApplicationUpgradeRollbackStartedEvent(ApplicationEvent): - """Application Upgrade Rollback Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param current_application_type_version: Required. Current Application - type version. - :type current_application_type_version: str - :param application_type_version: Required. Target Application type - version. - :type application_type_version: str - :param failure_reason: Required. Describes reason of failure. - :type failure_reason: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time - in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ApplicationUpgradeRollbackStartedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.current_application_type_version = kwargs.get('current_application_type_version', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ApplicationUpgradeRollbackStarted' diff --git a/customSDK/servicefabric/models/application_upgrade_rollback_started_event_py3.py b/customSDK/servicefabric/models/application_upgrade_rollback_started_event_py3.py deleted file mode 100644 index 95488c56..00000000 --- a/customSDK/servicefabric/models/application_upgrade_rollback_started_event_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event_py3 import ApplicationEvent - - -class ApplicationUpgradeRollbackStartedEvent(ApplicationEvent): - """Application Upgrade Rollback Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param current_application_type_version: Required. Current Application - type version. - :type current_application_type_version: str - :param application_type_version: Required. Target Application type - version. - :type application_type_version: str - :param failure_reason: Required. Describes reason of failure. - :type failure_reason: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time - in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, current_application_type_version: str, application_type_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationUpgradeRollbackStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_type_name = application_type_name - self.current_application_type_version = current_application_type_version - self.application_type_version = application_type_version - self.failure_reason = failure_reason - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ApplicationUpgradeRollbackStarted' diff --git a/customSDK/servicefabric/models/application_upgrade_started_event.py b/customSDK/servicefabric/models/application_upgrade_started_event.py deleted file mode 100644 index 4b8254f7..00000000 --- a/customSDK/servicefabric/models/application_upgrade_started_event.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event import ApplicationEvent - - -class ApplicationUpgradeStartedEvent(ApplicationEvent): - """Application Upgrade Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param current_application_type_version: Required. Current Application - type version. - :type current_application_type_version: str - :param application_type_version: Required. Target Application type - version. - :type application_type_version: str - :param upgrade_type: Required. Type of upgrade. - :type upgrade_type: str - :param rolling_upgrade_mode: Required. Mode of upgrade. - :type rolling_upgrade_mode: str - :param failure_action: Required. Action if failed. - :type failure_action: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'upgrade_type': {'required': True}, - 'rolling_upgrade_mode': {'required': True}, - 'failure_action': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ApplicationUpgradeStartedEvent, self).__init__(**kwargs) - self.application_type_name = kwargs.get('application_type_name', None) - self.current_application_type_version = kwargs.get('current_application_type_version', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.upgrade_type = kwargs.get('upgrade_type', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', None) - self.failure_action = kwargs.get('failure_action', None) - self.kind = 'ApplicationUpgradeStarted' diff --git a/customSDK/servicefabric/models/application_upgrade_started_event_py3.py b/customSDK/servicefabric/models/application_upgrade_started_event_py3.py deleted file mode 100644 index aaf80f7c..00000000 --- a/customSDK/servicefabric/models/application_upgrade_started_event_py3.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event_py3 import ApplicationEvent - - -class ApplicationUpgradeStartedEvent(ApplicationEvent): - """Application Upgrade Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param current_application_type_version: Required. Current Application - type version. - :type current_application_type_version: str - :param application_type_version: Required. Target Application type - version. - :type application_type_version: str - :param upgrade_type: Required. Type of upgrade. - :type upgrade_type: str - :param rolling_upgrade_mode: Required. Mode of upgrade. - :type rolling_upgrade_mode: str - :param failure_action: Required. Action if failed. - :type failure_action: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'upgrade_type': {'required': True}, - 'rolling_upgrade_mode': {'required': True}, - 'failure_action': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, current_application_type_version: str, application_type_version: str, upgrade_type: str, rolling_upgrade_mode: str, failure_action: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ApplicationUpgradeStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_type_name = application_type_name - self.current_application_type_version = current_application_type_version - self.application_type_version = application_type_version - self.upgrade_type = upgrade_type - self.rolling_upgrade_mode = rolling_upgrade_mode - self.failure_action = failure_action - self.kind = 'ApplicationUpgradeStarted' diff --git a/customSDK/servicefabric/models/application_upgrade_update_description.py b/customSDK/servicefabric/models/application_upgrade_update_description.py deleted file mode 100644 index b3944cc5..00000000 --- a/customSDK/servicefabric/models/application_upgrade_update_description.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationUpgradeUpdateDescription(Model): - """Describes the parameters for updating an ongoing application upgrade. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the application, including the - 'fabric:' URI scheme. - :type name: str - :param upgrade_kind: Required. The kind of upgrade out of the following - possible values. Possible values include: 'Invalid', 'Rolling'. Default - value: "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param update_description: Describes the parameters for updating a rolling - upgrade of application or cluster. - :type update_description: - ~azure.servicefabric.models.RollingUpgradeUpdateDescription - """ - - _validation = { - 'name': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, - } - - def __init__(self, **kwargs): - super(ApplicationUpgradeUpdateDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.application_health_policy = kwargs.get('application_health_policy', None) - self.update_description = kwargs.get('update_description', None) diff --git a/customSDK/servicefabric/models/application_upgrade_update_description_py3.py b/customSDK/servicefabric/models/application_upgrade_update_description_py3.py deleted file mode 100644 index 9eb3ae53..00000000 --- a/customSDK/servicefabric/models/application_upgrade_update_description_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ApplicationUpgradeUpdateDescription(Model): - """Describes the parameters for updating an ongoing application upgrade. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the application, including the - 'fabric:' URI scheme. - :type name: str - :param upgrade_kind: Required. The kind of upgrade out of the following - possible values. Possible values include: 'Invalid', 'Rolling'. Default - value: "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param update_description: Describes the parameters for updating a rolling - upgrade of application or cluster. - :type update_description: - ~azure.servicefabric.models.RollingUpgradeUpdateDescription - """ - - _validation = { - 'name': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, - } - - def __init__(self, *, name: str, upgrade_kind="Rolling", application_health_policy=None, update_description=None, **kwargs) -> None: - super(ApplicationUpgradeUpdateDescription, self).__init__(**kwargs) - self.name = name - self.upgrade_kind = upgrade_kind - self.application_health_policy = application_health_policy - self.update_description = update_description diff --git a/customSDK/servicefabric/models/applications_health_evaluation.py b/customSDK/servicefabric/models/applications_health_evaluation.py deleted file mode 100644 index 65b925b2..00000000 --- a/customSDK/servicefabric/models/applications_health_evaluation.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class ApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for applications, containing health - evaluations for each unhealthy application that impacted current aggregated - health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_applications: Maximum allowed percentage of - unhealthy applications from the ClusterHealthPolicy. - :type max_percent_unhealthy_applications: int - :param total_count: Total number of applications from the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - ApplicationHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(ApplicationsHealthEvaluation, self).__init__(**kwargs) - self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Applications' diff --git a/customSDK/servicefabric/models/applications_health_evaluation_py3.py b/customSDK/servicefabric/models/applications_health_evaluation_py3.py deleted file mode 100644 index 26ab144d..00000000 --- a/customSDK/servicefabric/models/applications_health_evaluation_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class ApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for applications, containing health - evaluations for each unhealthy application that impacted current aggregated - health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_applications: Maximum allowed percentage of - unhealthy applications from the ClusterHealthPolicy. - :type max_percent_unhealthy_applications: int - :param total_count: Total number of applications from the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - ApplicationHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.max_percent_unhealthy_applications = max_percent_unhealthy_applications - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Applications' diff --git a/customSDK/servicefabric/models/auto_scaling_mechanism.py b/customSDK/servicefabric/models/auto_scaling_mechanism.py deleted file mode 100644 index 474bcd9d..00000000 --- a/customSDK/servicefabric/models/auto_scaling_mechanism.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoScalingMechanism(Model): - """Describes the mechanism for performing auto scaling operation. Derived - classes will describe the actual mechanism. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AddRemoveReplicaScalingMechanism - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AddRemoveReplica': 'AddRemoveReplicaScalingMechanism'} - } - - def __init__(self, **kwargs): - super(AutoScalingMechanism, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/auto_scaling_mechanism_py3.py b/customSDK/servicefabric/models/auto_scaling_mechanism_py3.py deleted file mode 100644 index 69129cba..00000000 --- a/customSDK/servicefabric/models/auto_scaling_mechanism_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoScalingMechanism(Model): - """Describes the mechanism for performing auto scaling operation. Derived - classes will describe the actual mechanism. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AddRemoveReplicaScalingMechanism - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AddRemoveReplica': 'AddRemoveReplicaScalingMechanism'} - } - - def __init__(self, **kwargs) -> None: - super(AutoScalingMechanism, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/auto_scaling_metric.py b/customSDK/servicefabric/models/auto_scaling_metric.py deleted file mode 100644 index c100d3c8..00000000 --- a/customSDK/servicefabric/models/auto_scaling_metric.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoScalingMetric(Model): - """Describes the metric that is used for triggering auto scaling operation. - Derived classes will describe resources or metrics. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AutoScalingResourceMetric - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Resource': 'AutoScalingResourceMetric'} - } - - def __init__(self, **kwargs): - super(AutoScalingMetric, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/auto_scaling_metric_py3.py b/customSDK/servicefabric/models/auto_scaling_metric_py3.py deleted file mode 100644 index dd68e4e3..00000000 --- a/customSDK/servicefabric/models/auto_scaling_metric_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoScalingMetric(Model): - """Describes the metric that is used for triggering auto scaling operation. - Derived classes will describe resources or metrics. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AutoScalingResourceMetric - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Resource': 'AutoScalingResourceMetric'} - } - - def __init__(self, **kwargs) -> None: - super(AutoScalingMetric, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/auto_scaling_policy.py b/customSDK/servicefabric/models/auto_scaling_policy.py deleted file mode 100644 index 764f7908..00000000 --- a/customSDK/servicefabric/models/auto_scaling_policy.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoScalingPolicy(Model): - """Describes the auto scaling policy. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the auto scaling policy. - :type name: str - :param trigger: Required. Determines when auto scaling operation will be - invoked. - :type trigger: ~azure.servicefabric.models.AutoScalingTrigger - :param mechanism: Required. The mechanism that is used to scale when auto - scaling operation is invoked. - :type mechanism: ~azure.servicefabric.models.AutoScalingMechanism - """ - - _validation = { - 'name': {'required': True}, - 'trigger': {'required': True}, - 'mechanism': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'trigger': {'key': 'trigger', 'type': 'AutoScalingTrigger'}, - 'mechanism': {'key': 'mechanism', 'type': 'AutoScalingMechanism'}, - } - - def __init__(self, **kwargs): - super(AutoScalingPolicy, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.trigger = kwargs.get('trigger', None) - self.mechanism = kwargs.get('mechanism', None) diff --git a/customSDK/servicefabric/models/auto_scaling_policy_py3.py b/customSDK/servicefabric/models/auto_scaling_policy_py3.py deleted file mode 100644 index 292c0fd5..00000000 --- a/customSDK/servicefabric/models/auto_scaling_policy_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoScalingPolicy(Model): - """Describes the auto scaling policy. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the auto scaling policy. - :type name: str - :param trigger: Required. Determines when auto scaling operation will be - invoked. - :type trigger: ~azure.servicefabric.models.AutoScalingTrigger - :param mechanism: Required. The mechanism that is used to scale when auto - scaling operation is invoked. - :type mechanism: ~azure.servicefabric.models.AutoScalingMechanism - """ - - _validation = { - 'name': {'required': True}, - 'trigger': {'required': True}, - 'mechanism': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'trigger': {'key': 'trigger', 'type': 'AutoScalingTrigger'}, - 'mechanism': {'key': 'mechanism', 'type': 'AutoScalingMechanism'}, - } - - def __init__(self, *, name: str, trigger, mechanism, **kwargs) -> None: - super(AutoScalingPolicy, self).__init__(**kwargs) - self.name = name - self.trigger = trigger - self.mechanism = mechanism diff --git a/customSDK/servicefabric/models/auto_scaling_resource_metric.py b/customSDK/servicefabric/models/auto_scaling_resource_metric.py deleted file mode 100644 index f853bf85..00000000 --- a/customSDK/servicefabric/models/auto_scaling_resource_metric.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .auto_scaling_metric import AutoScalingMetric - - -class AutoScalingResourceMetric(AutoScalingMetric): - """Describes the resource that is used for triggering auto scaling. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param name: Required. Name of the resource. Possible values include: - 'cpu', 'memoryInGB' - :type name: str or - ~azure.servicefabric.models.AutoScalingResourceMetricName - """ - - _validation = { - 'kind': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AutoScalingResourceMetric, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.kind = 'Resource' diff --git a/customSDK/servicefabric/models/auto_scaling_resource_metric_py3.py b/customSDK/servicefabric/models/auto_scaling_resource_metric_py3.py deleted file mode 100644 index ad6ea3fa..00000000 --- a/customSDK/servicefabric/models/auto_scaling_resource_metric_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .auto_scaling_metric_py3 import AutoScalingMetric - - -class AutoScalingResourceMetric(AutoScalingMetric): - """Describes the resource that is used for triggering auto scaling. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param name: Required. Name of the resource. Possible values include: - 'cpu', 'memoryInGB' - :type name: str or - ~azure.servicefabric.models.AutoScalingResourceMetricName - """ - - _validation = { - 'kind': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name, **kwargs) -> None: - super(AutoScalingResourceMetric, self).__init__(**kwargs) - self.name = name - self.kind = 'Resource' diff --git a/customSDK/servicefabric/models/auto_scaling_trigger.py b/customSDK/servicefabric/models/auto_scaling_trigger.py deleted file mode 100644 index b3754545..00000000 --- a/customSDK/servicefabric/models/auto_scaling_trigger.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoScalingTrigger(Model): - """Describes the trigger for performing auto scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AverageLoadScalingTrigger - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AverageLoad': 'AverageLoadScalingTrigger'} - } - - def __init__(self, **kwargs): - super(AutoScalingTrigger, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/auto_scaling_trigger_py3.py b/customSDK/servicefabric/models/auto_scaling_trigger_py3.py deleted file mode 100644 index cbf43355..00000000 --- a/customSDK/servicefabric/models/auto_scaling_trigger_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AutoScalingTrigger(Model): - """Describes the trigger for performing auto scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AverageLoadScalingTrigger - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AverageLoad': 'AverageLoadScalingTrigger'} - } - - def __init__(self, **kwargs) -> None: - super(AutoScalingTrigger, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/average_load_scaling_trigger.py b/customSDK/servicefabric/models/average_load_scaling_trigger.py deleted file mode 100644 index 975597bb..00000000 --- a/customSDK/servicefabric/models/average_load_scaling_trigger.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .auto_scaling_trigger import AutoScalingTrigger - - -class AverageLoadScalingTrigger(AutoScalingTrigger): - """Describes the average load trigger used for auto scaling. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param metric: Required. Description of the metric that is used for - scaling. - :type metric: ~azure.servicefabric.models.AutoScalingMetric - :param lower_load_threshold: Required. Lower load threshold (if average - load is below this threshold, service will scale down). - :type lower_load_threshold: float - :param upper_load_threshold: Required. Upper load threshold (if average - load is above this threshold, service will scale up). - :type upper_load_threshold: float - :param scale_interval_in_seconds: Required. Scale interval that indicates - how often will this trigger be checked. - :type scale_interval_in_seconds: int - """ - - _validation = { - 'kind': {'required': True}, - 'metric': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'minimum': 60}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'metric': {'key': 'metric', 'type': 'AutoScalingMetric'}, - 'lower_load_threshold': {'key': 'lowerLoadThreshold', 'type': 'float'}, - 'upper_load_threshold': {'key': 'upperLoadThreshold', 'type': 'float'}, - 'scale_interval_in_seconds': {'key': 'scaleIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(AverageLoadScalingTrigger, self).__init__(**kwargs) - self.metric = kwargs.get('metric', None) - self.lower_load_threshold = kwargs.get('lower_load_threshold', None) - self.upper_load_threshold = kwargs.get('upper_load_threshold', None) - self.scale_interval_in_seconds = kwargs.get('scale_interval_in_seconds', None) - self.kind = 'AverageLoad' diff --git a/customSDK/servicefabric/models/average_load_scaling_trigger_py3.py b/customSDK/servicefabric/models/average_load_scaling_trigger_py3.py deleted file mode 100644 index b6a20ae1..00000000 --- a/customSDK/servicefabric/models/average_load_scaling_trigger_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .auto_scaling_trigger_py3 import AutoScalingTrigger - - -class AverageLoadScalingTrigger(AutoScalingTrigger): - """Describes the average load trigger used for auto scaling. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param metric: Required. Description of the metric that is used for - scaling. - :type metric: ~azure.servicefabric.models.AutoScalingMetric - :param lower_load_threshold: Required. Lower load threshold (if average - load is below this threshold, service will scale down). - :type lower_load_threshold: float - :param upper_load_threshold: Required. Upper load threshold (if average - load is above this threshold, service will scale up). - :type upper_load_threshold: float - :param scale_interval_in_seconds: Required. Scale interval that indicates - how often will this trigger be checked. - :type scale_interval_in_seconds: int - """ - - _validation = { - 'kind': {'required': True}, - 'metric': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'minimum': 60}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'metric': {'key': 'metric', 'type': 'AutoScalingMetric'}, - 'lower_load_threshold': {'key': 'lowerLoadThreshold', 'type': 'float'}, - 'upper_load_threshold': {'key': 'upperLoadThreshold', 'type': 'float'}, - 'scale_interval_in_seconds': {'key': 'scaleIntervalInSeconds', 'type': 'int'}, - } - - def __init__(self, *, metric, lower_load_threshold: float, upper_load_threshold: float, scale_interval_in_seconds: int, **kwargs) -> None: - super(AverageLoadScalingTrigger, self).__init__(**kwargs) - self.metric = metric - self.lower_load_threshold = lower_load_threshold - self.upper_load_threshold = upper_load_threshold - self.scale_interval_in_seconds = scale_interval_in_seconds - self.kind = 'AverageLoad' diff --git a/customSDK/servicefabric/models/average_partition_load_scaling_trigger.py b/customSDK/servicefabric/models/average_partition_load_scaling_trigger.py deleted file mode 100644 index 81307353..00000000 --- a/customSDK/servicefabric/models/average_partition_load_scaling_trigger.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .scaling_trigger_description import ScalingTriggerDescription - - -class AveragePartitionLoadScalingTrigger(ScalingTriggerDescription): - """Represents a scaling trigger related to an average load of a - metric/resource of a partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param metric_name: Required. The name of the metric for which usage - should be tracked. - :type metric_name: str - :param lower_load_threshold: Required. The lower limit of the load below - which a scale in operation should be performed. - :type lower_load_threshold: str - :param upper_load_threshold: Required. The upper limit of the load beyond - which a scale out operation should be performed. - :type upper_load_threshold: str - :param scale_interval_in_seconds: Required. The period in seconds on which - a decision is made whether to scale or not. - :type scale_interval_in_seconds: long - """ - - _validation = { - 'kind': {'required': True}, - 'metric_name': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, - 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, - 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(AveragePartitionLoadScalingTrigger, self).__init__(**kwargs) - self.metric_name = kwargs.get('metric_name', None) - self.lower_load_threshold = kwargs.get('lower_load_threshold', None) - self.upper_load_threshold = kwargs.get('upper_load_threshold', None) - self.scale_interval_in_seconds = kwargs.get('scale_interval_in_seconds', None) - self.kind = 'AveragePartitionLoad' diff --git a/customSDK/servicefabric/models/average_partition_load_scaling_trigger_py3.py b/customSDK/servicefabric/models/average_partition_load_scaling_trigger_py3.py deleted file mode 100644 index 610459ea..00000000 --- a/customSDK/servicefabric/models/average_partition_load_scaling_trigger_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .scaling_trigger_description_py3 import ScalingTriggerDescription - - -class AveragePartitionLoadScalingTrigger(ScalingTriggerDescription): - """Represents a scaling trigger related to an average load of a - metric/resource of a partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param metric_name: Required. The name of the metric for which usage - should be tracked. - :type metric_name: str - :param lower_load_threshold: Required. The lower limit of the load below - which a scale in operation should be performed. - :type lower_load_threshold: str - :param upper_load_threshold: Required. The upper limit of the load beyond - which a scale out operation should be performed. - :type upper_load_threshold: str - :param scale_interval_in_seconds: Required. The period in seconds on which - a decision is made whether to scale or not. - :type scale_interval_in_seconds: long - """ - - _validation = { - 'kind': {'required': True}, - 'metric_name': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, - 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, - 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, - } - - def __init__(self, *, metric_name: str, lower_load_threshold: str, upper_load_threshold: str, scale_interval_in_seconds: int, **kwargs) -> None: - super(AveragePartitionLoadScalingTrigger, self).__init__(**kwargs) - self.metric_name = metric_name - self.lower_load_threshold = lower_load_threshold - self.upper_load_threshold = upper_load_threshold - self.scale_interval_in_seconds = scale_interval_in_seconds - self.kind = 'AveragePartitionLoad' diff --git a/customSDK/servicefabric/models/average_service_load_scaling_trigger.py b/customSDK/servicefabric/models/average_service_load_scaling_trigger.py deleted file mode 100644 index 5c539270..00000000 --- a/customSDK/servicefabric/models/average_service_load_scaling_trigger.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .scaling_trigger_description import ScalingTriggerDescription - - -class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): - """Represents a scaling policy related to an average load of a metric/resource - of a service. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param metric_name: Required. The name of the metric for which usage - should be tracked. - :type metric_name: str - :param lower_load_threshold: Required. The lower limit of the load below - which a scale in operation should be performed. - :type lower_load_threshold: str - :param upper_load_threshold: Required. The upper limit of the load beyond - which a scale out operation should be performed. - :type upper_load_threshold: str - :param scale_interval_in_seconds: Required. The period in seconds on which - a decision is made whether to scale or not. - :type scale_interval_in_seconds: long - :param use_only_primary_load: Required. Flag determines whether only the - load of primary replica should be considered for scaling. - If set to true, then trigger will only consider the load of primary - replicas of stateful service. - If set to false, trigger will consider load of all replicas. - This parameter cannot be set to true for stateless service. - :type use_only_primary_load: bool - """ - - _validation = { - 'kind': {'required': True}, - 'metric_name': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, - 'use_only_primary_load': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, - 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, - 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, - 'use_only_primary_load': {'key': 'UseOnlyPrimaryLoad', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(AverageServiceLoadScalingTrigger, self).__init__(**kwargs) - self.metric_name = kwargs.get('metric_name', None) - self.lower_load_threshold = kwargs.get('lower_load_threshold', None) - self.upper_load_threshold = kwargs.get('upper_load_threshold', None) - self.scale_interval_in_seconds = kwargs.get('scale_interval_in_seconds', None) - self.use_only_primary_load = kwargs.get('use_only_primary_load', None) - self.kind = 'AverageServiceLoad' diff --git a/customSDK/servicefabric/models/average_service_load_scaling_trigger_py3.py b/customSDK/servicefabric/models/average_service_load_scaling_trigger_py3.py deleted file mode 100644 index 0a8d2962..00000000 --- a/customSDK/servicefabric/models/average_service_load_scaling_trigger_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .scaling_trigger_description_py3 import ScalingTriggerDescription - - -class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): - """Represents a scaling policy related to an average load of a metric/resource - of a service. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param metric_name: Required. The name of the metric for which usage - should be tracked. - :type metric_name: str - :param lower_load_threshold: Required. The lower limit of the load below - which a scale in operation should be performed. - :type lower_load_threshold: str - :param upper_load_threshold: Required. The upper limit of the load beyond - which a scale out operation should be performed. - :type upper_load_threshold: str - :param scale_interval_in_seconds: Required. The period in seconds on which - a decision is made whether to scale or not. - :type scale_interval_in_seconds: long - :param use_only_primary_load: Required. Flag determines whether only the - load of primary replica should be considered for scaling. - If set to true, then trigger will only consider the load of primary - replicas of stateful service. - If set to false, trigger will consider load of all replicas. - This parameter cannot be set to true for stateless service. - :type use_only_primary_load: bool - """ - - _validation = { - 'kind': {'required': True}, - 'metric_name': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, - 'use_only_primary_load': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, - 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, - 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, - 'use_only_primary_load': {'key': 'UseOnlyPrimaryLoad', 'type': 'bool'}, - } - - def __init__(self, *, metric_name: str, lower_load_threshold: str, upper_load_threshold: str, scale_interval_in_seconds: int, use_only_primary_load: bool, **kwargs) -> None: - super(AverageServiceLoadScalingTrigger, self).__init__(**kwargs) - self.metric_name = metric_name - self.lower_load_threshold = lower_load_threshold - self.upper_load_threshold = upper_load_threshold - self.scale_interval_in_seconds = scale_interval_in_seconds - self.use_only_primary_load = use_only_primary_load - self.kind = 'AverageServiceLoad' diff --git a/customSDK/servicefabric/models/azure_blob_backup_storage_description.py b/customSDK/servicefabric/models/azure_blob_backup_storage_description.py deleted file mode 100644 index ad0615e0..00000000 --- a/customSDK/servicefabric/models/azure_blob_backup_storage_description.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_storage_description import BackupStorageDescription - - -class AzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Azure blob store used for storing and - enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - :param connection_string: Required. The connection string to connect to - the Azure blob store. - :type connection_string: str - :param container_name: Required. The name of the container in the blob - store to store and enumerate backups from. - :type container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'connection_string': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'connection_string': {'key': 'ConnectionString', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureBlobBackupStorageDescription, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.container_name = kwargs.get('container_name', None) - self.storage_kind = 'AzureBlobStore' diff --git a/customSDK/servicefabric/models/azure_blob_backup_storage_description_py3.py b/customSDK/servicefabric/models/azure_blob_backup_storage_description_py3.py deleted file mode 100644 index 1384848e..00000000 --- a/customSDK/servicefabric/models/azure_blob_backup_storage_description_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_storage_description_py3 import BackupStorageDescription - - -class AzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Azure blob store used for storing and - enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - :param connection_string: Required. The connection string to connect to - the Azure blob store. - :type connection_string: str - :param container_name: Required. The name of the container in the blob - store to store and enumerate backups from. - :type container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'connection_string': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'connection_string': {'key': 'ConnectionString', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__(self, *, connection_string: str, container_name: str, friendly_name: str=None, **kwargs) -> None: - super(AzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) - self.connection_string = connection_string - self.container_name = container_name - self.storage_kind = 'AzureBlobStore' diff --git a/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description.py b/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description.py deleted file mode 100644 index a61f34ee..00000000 --- a/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .diagnostics_sink_properties import DiagnosticsSinkProperties - - -class AzureInternalMonitoringPipelineSinkDescription(DiagnosticsSinkProperties): - """Diagnostics settings for Geneva. - - All required parameters must be populated in order to send to Azure. - - :param name: Name of the sink. This value is referenced by - DiagnosticsReferenceDescription - :type name: str - :param description: A description of the sink. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param account_name: Azure Internal monitoring pipeline account. - :type account_name: str - :param namespace: Azure Internal monitoring pipeline account namespace. - :type namespace: str - :param ma_config_url: Azure Internal monitoring agent configuration. - :type ma_config_url: str - :param fluentd_config_url: Azure Internal monitoring agent fluentd - configuration. - :type fluentd_config_url: str - :param auto_key_config_url: Azure Internal monitoring pipeline autokey - associated with the certificate. - :type auto_key_config_url: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'ma_config_url': {'key': 'maConfigUrl', 'type': 'str'}, - 'fluentd_config_url': {'key': 'fluentdConfigUrl', 'type': 'str'}, - 'auto_key_config_url': {'key': 'autoKeyConfigUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureInternalMonitoringPipelineSinkDescription, self).__init__(**kwargs) - self.account_name = kwargs.get('account_name', None) - self.namespace = kwargs.get('namespace', None) - self.ma_config_url = kwargs.get('ma_config_url', None) - self.fluentd_config_url = kwargs.get('fluentd_config_url', None) - self.auto_key_config_url = kwargs.get('auto_key_config_url', None) - self.kind = 'AzureInternalMonitoringPipeline' diff --git a/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description_py3.py b/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description_py3.py deleted file mode 100644 index 986ff020..00000000 --- a/customSDK/servicefabric/models/azure_internal_monitoring_pipeline_sink_description_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .diagnostics_sink_properties_py3 import DiagnosticsSinkProperties - - -class AzureInternalMonitoringPipelineSinkDescription(DiagnosticsSinkProperties): - """Diagnostics settings for Geneva. - - All required parameters must be populated in order to send to Azure. - - :param name: Name of the sink. This value is referenced by - DiagnosticsReferenceDescription - :type name: str - :param description: A description of the sink. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param account_name: Azure Internal monitoring pipeline account. - :type account_name: str - :param namespace: Azure Internal monitoring pipeline account namespace. - :type namespace: str - :param ma_config_url: Azure Internal monitoring agent configuration. - :type ma_config_url: str - :param fluentd_config_url: Azure Internal monitoring agent fluentd - configuration. - :type fluentd_config_url: str - :param auto_key_config_url: Azure Internal monitoring pipeline autokey - associated with the certificate. - :type auto_key_config_url: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'ma_config_url': {'key': 'maConfigUrl', 'type': 'str'}, - 'fluentd_config_url': {'key': 'fluentdConfigUrl', 'type': 'str'}, - 'auto_key_config_url': {'key': 'autoKeyConfigUrl', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, description: str=None, account_name: str=None, namespace: str=None, ma_config_url: str=None, fluentd_config_url: str=None, auto_key_config_url: str=None, **kwargs) -> None: - super(AzureInternalMonitoringPipelineSinkDescription, self).__init__(name=name, description=description, **kwargs) - self.account_name = account_name - self.namespace = namespace - self.ma_config_url = ma_config_url - self.fluentd_config_url = fluentd_config_url - self.auto_key_config_url = auto_key_config_url - self.kind = 'AzureInternalMonitoringPipeline' diff --git a/customSDK/servicefabric/models/backup_configuration_info.py b/customSDK/servicefabric/models/backup_configuration_info.py deleted file mode 100644 index 53e26f07..00000000 --- a/customSDK/servicefabric/models/backup_configuration_info.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupConfigurationInfo(Model): - """Describes the backup configuration information. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationBackupConfigurationInfo, - ServiceBackupConfigurationInfo, PartitionBackupConfigurationInfo - - All required parameters must be populated in order to send to Azure. - - :param policy_name: The name of the backup policy which is applicable to - this Service Fabric application or service or partition. - :type policy_name: str - :param policy_inherited_from: Specifies the scope at which the backup - policy is applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type policy_inherited_from: str or - ~azure.servicefabric.models.BackupPolicyScope - :param suspension_info: Describes the backup suspension details. - :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Application': 'ApplicationBackupConfigurationInfo', 'Service': 'ServiceBackupConfigurationInfo', 'Partition': 'PartitionBackupConfigurationInfo'} - } - - def __init__(self, **kwargs): - super(BackupConfigurationInfo, self).__init__(**kwargs) - self.policy_name = kwargs.get('policy_name', None) - self.policy_inherited_from = kwargs.get('policy_inherited_from', None) - self.suspension_info = kwargs.get('suspension_info', None) - self.kind = None diff --git a/customSDK/servicefabric/models/backup_configuration_info_py3.py b/customSDK/servicefabric/models/backup_configuration_info_py3.py deleted file mode 100644 index 6b160190..00000000 --- a/customSDK/servicefabric/models/backup_configuration_info_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupConfigurationInfo(Model): - """Describes the backup configuration information. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationBackupConfigurationInfo, - ServiceBackupConfigurationInfo, PartitionBackupConfigurationInfo - - All required parameters must be populated in order to send to Azure. - - :param policy_name: The name of the backup policy which is applicable to - this Service Fabric application or service or partition. - :type policy_name: str - :param policy_inherited_from: Specifies the scope at which the backup - policy is applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type policy_inherited_from: str or - ~azure.servicefabric.models.BackupPolicyScope - :param suspension_info: Describes the backup suspension details. - :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Application': 'ApplicationBackupConfigurationInfo', 'Service': 'ServiceBackupConfigurationInfo', 'Partition': 'PartitionBackupConfigurationInfo'} - } - - def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, **kwargs) -> None: - super(BackupConfigurationInfo, self).__init__(**kwargs) - self.policy_name = policy_name - self.policy_inherited_from = policy_inherited_from - self.suspension_info = suspension_info - self.kind = None diff --git a/customSDK/servicefabric/models/backup_entity.py b/customSDK/servicefabric/models/backup_entity.py deleted file mode 100644 index f61be0f1..00000000 --- a/customSDK/servicefabric/models/backup_entity.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupEntity(Model): - """Describes the Service Fabric entity that is configured for backup. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationBackupEntity, ServiceBackupEntity, - PartitionBackupEntity - - All required parameters must be populated in order to send to Azure. - - :param entity_kind: Required. Constant filled by server. - :type entity_kind: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - } - - _subtype_map = { - 'entity_kind': {'Application': 'ApplicationBackupEntity', 'Service': 'ServiceBackupEntity', 'Partition': 'PartitionBackupEntity'} - } - - def __init__(self, **kwargs): - super(BackupEntity, self).__init__(**kwargs) - self.entity_kind = None diff --git a/customSDK/servicefabric/models/backup_entity_py3.py b/customSDK/servicefabric/models/backup_entity_py3.py deleted file mode 100644 index 4ce8b96d..00000000 --- a/customSDK/servicefabric/models/backup_entity_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupEntity(Model): - """Describes the Service Fabric entity that is configured for backup. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationBackupEntity, ServiceBackupEntity, - PartitionBackupEntity - - All required parameters must be populated in order to send to Azure. - - :param entity_kind: Required. Constant filled by server. - :type entity_kind: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - } - - _subtype_map = { - 'entity_kind': {'Application': 'ApplicationBackupEntity', 'Service': 'ServiceBackupEntity', 'Partition': 'PartitionBackupEntity'} - } - - def __init__(self, **kwargs) -> None: - super(BackupEntity, self).__init__(**kwargs) - self.entity_kind = None diff --git a/customSDK/servicefabric/models/backup_info.py b/customSDK/servicefabric/models/backup_info.py deleted file mode 100644 index ca205e54..00000000 --- a/customSDK/servicefabric/models/backup_info.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupInfo(Model): - """Represents a backup point which can be used to trigger a restore. - - :param backup_id: Unique backup ID . - :type backup_id: str - :param backup_chain_id: Unique backup chain ID. All backups part of the - same chain has the same backup chain id. A backup chain is comprised of 1 - full backup and multiple incremental backups. - :type backup_chain_id: str - :param application_name: Name of the Service Fabric application this - partition backup belongs to. - :type application_name: str - :param service_name: Name of the Service Fabric service this partition - backup belongs to. - :type service_name: str - :param partition_information: Information about the partition to which - this backup belongs to - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param backup_location: Location of the backup, relative to the backup - store. - :type backup_location: str - :param backup_type: Describes the type of backup, whether its full or - incremental. Possible values include: 'Invalid', 'Full', 'Incremental' - :type backup_type: str or ~azure.servicefabric.models.BackupType - :param epoch_of_last_backup_record: Epoch of the last record in this - backup. - :type epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch - :param lsn_of_last_backup_record: LSN of the last record in this backup. - :type lsn_of_last_backup_record: str - :param creation_time_utc: The date time when this backup was taken. - :type creation_time_utc: datetime - :param service_manifest_version: Manifest Version of the service this - partition backup belongs to. - :type service_manifest_version: str - :param failure_error: Denotes the failure encountered in getting backup - point information. - :type failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_chain_id': {'key': 'BackupChainId', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'backup_type': {'key': 'BackupType', 'type': 'str'}, - 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, - 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, - 'creation_time_utc': {'key': 'CreationTimeUtc', 'type': 'iso-8601'}, - 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__(self, **kwargs): - super(BackupInfo, self).__init__(**kwargs) - self.backup_id = kwargs.get('backup_id', None) - self.backup_chain_id = kwargs.get('backup_chain_id', None) - self.application_name = kwargs.get('application_name', None) - self.service_name = kwargs.get('service_name', None) - self.partition_information = kwargs.get('partition_information', None) - self.backup_location = kwargs.get('backup_location', None) - self.backup_type = kwargs.get('backup_type', None) - self.epoch_of_last_backup_record = kwargs.get('epoch_of_last_backup_record', None) - self.lsn_of_last_backup_record = kwargs.get('lsn_of_last_backup_record', None) - self.creation_time_utc = kwargs.get('creation_time_utc', None) - self.service_manifest_version = kwargs.get('service_manifest_version', None) - self.failure_error = kwargs.get('failure_error', None) diff --git a/customSDK/servicefabric/models/backup_info_py3.py b/customSDK/servicefabric/models/backup_info_py3.py deleted file mode 100644 index 61fdc445..00000000 --- a/customSDK/servicefabric/models/backup_info_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupInfo(Model): - """Represents a backup point which can be used to trigger a restore. - - :param backup_id: Unique backup ID . - :type backup_id: str - :param backup_chain_id: Unique backup chain ID. All backups part of the - same chain has the same backup chain id. A backup chain is comprised of 1 - full backup and multiple incremental backups. - :type backup_chain_id: str - :param application_name: Name of the Service Fabric application this - partition backup belongs to. - :type application_name: str - :param service_name: Name of the Service Fabric service this partition - backup belongs to. - :type service_name: str - :param partition_information: Information about the partition to which - this backup belongs to - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param backup_location: Location of the backup, relative to the backup - store. - :type backup_location: str - :param backup_type: Describes the type of backup, whether its full or - incremental. Possible values include: 'Invalid', 'Full', 'Incremental' - :type backup_type: str or ~azure.servicefabric.models.BackupType - :param epoch_of_last_backup_record: Epoch of the last record in this - backup. - :type epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch - :param lsn_of_last_backup_record: LSN of the last record in this backup. - :type lsn_of_last_backup_record: str - :param creation_time_utc: The date time when this backup was taken. - :type creation_time_utc: datetime - :param service_manifest_version: Manifest Version of the service this - partition backup belongs to. - :type service_manifest_version: str - :param failure_error: Denotes the failure encountered in getting backup - point information. - :type failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_chain_id': {'key': 'BackupChainId', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'backup_type': {'key': 'BackupType', 'type': 'str'}, - 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, - 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, - 'creation_time_utc': {'key': 'CreationTimeUtc', 'type': 'iso-8601'}, - 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__(self, *, backup_id: str=None, backup_chain_id: str=None, application_name: str=None, service_name: str=None, partition_information=None, backup_location: str=None, backup_type=None, epoch_of_last_backup_record=None, lsn_of_last_backup_record: str=None, creation_time_utc=None, service_manifest_version: str=None, failure_error=None, **kwargs) -> None: - super(BackupInfo, self).__init__(**kwargs) - self.backup_id = backup_id - self.backup_chain_id = backup_chain_id - self.application_name = application_name - self.service_name = service_name - self.partition_information = partition_information - self.backup_location = backup_location - self.backup_type = backup_type - self.epoch_of_last_backup_record = epoch_of_last_backup_record - self.lsn_of_last_backup_record = lsn_of_last_backup_record - self.creation_time_utc = creation_time_utc - self.service_manifest_version = service_manifest_version - self.failure_error = failure_error diff --git a/customSDK/servicefabric/models/backup_partition_description.py b/customSDK/servicefabric/models/backup_partition_description.py deleted file mode 100644 index dc3433ac..00000000 --- a/customSDK/servicefabric/models/backup_partition_description.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupPartitionDescription(Model): - """Describes the parameters for triggering partition's backup. - - :param backup_storage: Specifies the details of the backup storage where - to save the backup. - :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription - """ - - _attribute_map = { - 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, - } - - def __init__(self, **kwargs): - super(BackupPartitionDescription, self).__init__(**kwargs) - self.backup_storage = kwargs.get('backup_storage', None) diff --git a/customSDK/servicefabric/models/backup_partition_description_py3.py b/customSDK/servicefabric/models/backup_partition_description_py3.py deleted file mode 100644 index bc511a12..00000000 --- a/customSDK/servicefabric/models/backup_partition_description_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupPartitionDescription(Model): - """Describes the parameters for triggering partition's backup. - - :param backup_storage: Specifies the details of the backup storage where - to save the backup. - :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription - """ - - _attribute_map = { - 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, - } - - def __init__(self, *, backup_storage=None, **kwargs) -> None: - super(BackupPartitionDescription, self).__init__(**kwargs) - self.backup_storage = backup_storage diff --git a/customSDK/servicefabric/models/backup_policy_description.py b/customSDK/servicefabric/models/backup_policy_description.py deleted file mode 100644 index d87ea576..00000000 --- a/customSDK/servicefabric/models/backup_policy_description.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupPolicyDescription(Model): - """Describes a backup policy for configuring periodic backup. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The unique name identifying this backup policy. - :type name: str - :param auto_restore_on_data_loss: Required. Specifies whether to trigger - restore automatically using the latest available backup in case the - partition experiences a data loss event. - :type auto_restore_on_data_loss: bool - :param max_incremental_backups: Required. Defines the maximum number of - incremental backups to be taken between two full backups. This is just the - upper limit. A full backup may be taken before specified number of - incremental backups are completed in one of the following conditions - - The replica has never taken a full backup since it has become primary, - - Some of the log records since the last backup has been truncated, or - - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. - :type max_incremental_backups: int - :param schedule: Required. Describes the backup schedule parameters. - :type schedule: ~azure.servicefabric.models.BackupScheduleDescription - :param storage: Required. Describes the details of backup storage where to - store the periodic backups. - :type storage: ~azure.servicefabric.models.BackupStorageDescription - :param retention_policy: Describes the policy to retain backups in - storage. - :type retention_policy: - ~azure.servicefabric.models.RetentionPolicyDescription - """ - - _validation = { - 'name': {'required': True}, - 'auto_restore_on_data_loss': {'required': True}, - 'max_incremental_backups': {'required': True, 'maximum': 255, 'minimum': 0}, - 'schedule': {'required': True}, - 'storage': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'auto_restore_on_data_loss': {'key': 'AutoRestoreOnDataLoss', 'type': 'bool'}, - 'max_incremental_backups': {'key': 'MaxIncrementalBackups', 'type': 'int'}, - 'schedule': {'key': 'Schedule', 'type': 'BackupScheduleDescription'}, - 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, - 'retention_policy': {'key': 'RetentionPolicy', 'type': 'RetentionPolicyDescription'}, - } - - def __init__(self, **kwargs): - super(BackupPolicyDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.auto_restore_on_data_loss = kwargs.get('auto_restore_on_data_loss', None) - self.max_incremental_backups = kwargs.get('max_incremental_backups', None) - self.schedule = kwargs.get('schedule', None) - self.storage = kwargs.get('storage', None) - self.retention_policy = kwargs.get('retention_policy', None) diff --git a/customSDK/servicefabric/models/backup_policy_description_py3.py b/customSDK/servicefabric/models/backup_policy_description_py3.py deleted file mode 100644 index 5890d796..00000000 --- a/customSDK/servicefabric/models/backup_policy_description_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupPolicyDescription(Model): - """Describes a backup policy for configuring periodic backup. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The unique name identifying this backup policy. - :type name: str - :param auto_restore_on_data_loss: Required. Specifies whether to trigger - restore automatically using the latest available backup in case the - partition experiences a data loss event. - :type auto_restore_on_data_loss: bool - :param max_incremental_backups: Required. Defines the maximum number of - incremental backups to be taken between two full backups. This is just the - upper limit. A full backup may be taken before specified number of - incremental backups are completed in one of the following conditions - - The replica has never taken a full backup since it has become primary, - - Some of the log records since the last backup has been truncated, or - - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. - :type max_incremental_backups: int - :param schedule: Required. Describes the backup schedule parameters. - :type schedule: ~azure.servicefabric.models.BackupScheduleDescription - :param storage: Required. Describes the details of backup storage where to - store the periodic backups. - :type storage: ~azure.servicefabric.models.BackupStorageDescription - :param retention_policy: Describes the policy to retain backups in - storage. - :type retention_policy: - ~azure.servicefabric.models.RetentionPolicyDescription - """ - - _validation = { - 'name': {'required': True}, - 'auto_restore_on_data_loss': {'required': True}, - 'max_incremental_backups': {'required': True, 'maximum': 255, 'minimum': 0}, - 'schedule': {'required': True}, - 'storage': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'auto_restore_on_data_loss': {'key': 'AutoRestoreOnDataLoss', 'type': 'bool'}, - 'max_incremental_backups': {'key': 'MaxIncrementalBackups', 'type': 'int'}, - 'schedule': {'key': 'Schedule', 'type': 'BackupScheduleDescription'}, - 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, - 'retention_policy': {'key': 'RetentionPolicy', 'type': 'RetentionPolicyDescription'}, - } - - def __init__(self, *, name: str, auto_restore_on_data_loss: bool, max_incremental_backups: int, schedule, storage, retention_policy=None, **kwargs) -> None: - super(BackupPolicyDescription, self).__init__(**kwargs) - self.name = name - self.auto_restore_on_data_loss = auto_restore_on_data_loss - self.max_incremental_backups = max_incremental_backups - self.schedule = schedule - self.storage = storage - self.retention_policy = retention_policy diff --git a/customSDK/servicefabric/models/backup_progress_info.py b/customSDK/servicefabric/models/backup_progress_info.py deleted file mode 100644 index 785b02ff..00000000 --- a/customSDK/servicefabric/models/backup_progress_info.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupProgressInfo(Model): - """Describes the progress of a partition's backup. - - :param backup_state: Represents the current state of the partition backup - operation. Possible values include: 'Invalid', 'Accepted', - 'BackupInProgress', 'Success', 'Failure', 'Timeout' - :type backup_state: str or ~azure.servicefabric.models.BackupState - :param time_stamp_utc: TimeStamp in UTC when operation succeeded or - failed. - :type time_stamp_utc: datetime - :param backup_id: Unique ID of the newly created backup. - :type backup_id: str - :param backup_location: Location, relative to the backup store, of the - newly created backup. - :type backup_location: str - :param epoch_of_last_backup_record: Specifies the epoch of the last record - included in backup. - :type epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch - :param lsn_of_last_backup_record: The LSN of last record included in - backup. - :type lsn_of_last_backup_record: str - :param failure_error: Denotes the failure encountered in performing backup - operation. - :type failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'backup_state': {'key': 'BackupState', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, - 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__(self, **kwargs): - super(BackupProgressInfo, self).__init__(**kwargs) - self.backup_state = kwargs.get('backup_state', None) - self.time_stamp_utc = kwargs.get('time_stamp_utc', None) - self.backup_id = kwargs.get('backup_id', None) - self.backup_location = kwargs.get('backup_location', None) - self.epoch_of_last_backup_record = kwargs.get('epoch_of_last_backup_record', None) - self.lsn_of_last_backup_record = kwargs.get('lsn_of_last_backup_record', None) - self.failure_error = kwargs.get('failure_error', None) diff --git a/customSDK/servicefabric/models/backup_progress_info_py3.py b/customSDK/servicefabric/models/backup_progress_info_py3.py deleted file mode 100644 index c00ce62e..00000000 --- a/customSDK/servicefabric/models/backup_progress_info_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupProgressInfo(Model): - """Describes the progress of a partition's backup. - - :param backup_state: Represents the current state of the partition backup - operation. Possible values include: 'Invalid', 'Accepted', - 'BackupInProgress', 'Success', 'Failure', 'Timeout' - :type backup_state: str or ~azure.servicefabric.models.BackupState - :param time_stamp_utc: TimeStamp in UTC when operation succeeded or - failed. - :type time_stamp_utc: datetime - :param backup_id: Unique ID of the newly created backup. - :type backup_id: str - :param backup_location: Location, relative to the backup store, of the - newly created backup. - :type backup_location: str - :param epoch_of_last_backup_record: Specifies the epoch of the last record - included in backup. - :type epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch - :param lsn_of_last_backup_record: The LSN of last record included in - backup. - :type lsn_of_last_backup_record: str - :param failure_error: Denotes the failure encountered in performing backup - operation. - :type failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'backup_state': {'key': 'BackupState', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, - 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__(self, *, backup_state=None, time_stamp_utc=None, backup_id: str=None, backup_location: str=None, epoch_of_last_backup_record=None, lsn_of_last_backup_record: str=None, failure_error=None, **kwargs) -> None: - super(BackupProgressInfo, self).__init__(**kwargs) - self.backup_state = backup_state - self.time_stamp_utc = time_stamp_utc - self.backup_id = backup_id - self.backup_location = backup_location - self.epoch_of_last_backup_record = epoch_of_last_backup_record - self.lsn_of_last_backup_record = lsn_of_last_backup_record - self.failure_error = failure_error diff --git a/customSDK/servicefabric/models/backup_schedule_description.py b/customSDK/servicefabric/models/backup_schedule_description.py deleted file mode 100644 index 5aba62aa..00000000 --- a/customSDK/servicefabric/models/backup_schedule_description.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupScheduleDescription(Model): - """Describes the backup schedule parameters. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: FrequencyBasedBackupScheduleDescription, - TimeBasedBackupScheduleDescription - - All required parameters must be populated in order to send to Azure. - - :param schedule_kind: Required. Constant filled by server. - :type schedule_kind: str - """ - - _validation = { - 'schedule_kind': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - } - - _subtype_map = { - 'schedule_kind': {'FrequencyBased': 'FrequencyBasedBackupScheduleDescription', 'TimeBased': 'TimeBasedBackupScheduleDescription'} - } - - def __init__(self, **kwargs): - super(BackupScheduleDescription, self).__init__(**kwargs) - self.schedule_kind = None diff --git a/customSDK/servicefabric/models/backup_schedule_description_py3.py b/customSDK/servicefabric/models/backup_schedule_description_py3.py deleted file mode 100644 index cb3b824e..00000000 --- a/customSDK/servicefabric/models/backup_schedule_description_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupScheduleDescription(Model): - """Describes the backup schedule parameters. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: FrequencyBasedBackupScheduleDescription, - TimeBasedBackupScheduleDescription - - All required parameters must be populated in order to send to Azure. - - :param schedule_kind: Required. Constant filled by server. - :type schedule_kind: str - """ - - _validation = { - 'schedule_kind': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - } - - _subtype_map = { - 'schedule_kind': {'FrequencyBased': 'FrequencyBasedBackupScheduleDescription', 'TimeBased': 'TimeBasedBackupScheduleDescription'} - } - - def __init__(self, **kwargs) -> None: - super(BackupScheduleDescription, self).__init__(**kwargs) - self.schedule_kind = None diff --git a/customSDK/servicefabric/models/backup_storage_description.py b/customSDK/servicefabric/models/backup_storage_description.py deleted file mode 100644 index a22407e6..00000000 --- a/customSDK/servicefabric/models/backup_storage_description.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupStorageDescription(Model): - """Describes the parameters for the backup storage. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureBlobBackupStorageDescription, - FileShareBackupStorageDescription, DsmsAzureBlobBackupStorageDescription, - ManagedIdentityAzureBlobBackupStorageDescription - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - """ - - _validation = { - 'storage_kind': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - } - - _subtype_map = { - 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription', 'ManagedIdentityAzureBlobStore': 'ManagedIdentityAzureBlobBackupStorageDescription'} - } - - def __init__(self, **kwargs): - super(BackupStorageDescription, self).__init__(**kwargs) - self.friendly_name = kwargs.get('friendly_name', None) - self.storage_kind = None diff --git a/customSDK/servicefabric/models/backup_storage_description_py3.py b/customSDK/servicefabric/models/backup_storage_description_py3.py deleted file mode 100644 index da0d683d..00000000 --- a/customSDK/servicefabric/models/backup_storage_description_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupStorageDescription(Model): - """Describes the parameters for the backup storage. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureBlobBackupStorageDescription, - FileShareBackupStorageDescription, DsmsAzureBlobBackupStorageDescription, - ManagedIdentityAzureBlobBackupStorageDescription - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - """ - - _validation = { - 'storage_kind': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - } - - _subtype_map = { - 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription', 'ManagedIdentityAzureBlobStore': 'ManagedIdentityAzureBlobBackupStorageDescription'} - } - - def __init__(self, *, friendly_name: str=None, **kwargs) -> None: - super(BackupStorageDescription, self).__init__(**kwargs) - self.friendly_name = friendly_name - self.storage_kind = None diff --git a/customSDK/servicefabric/models/backup_suspension_info.py b/customSDK/servicefabric/models/backup_suspension_info.py deleted file mode 100644 index a93a7b88..00000000 --- a/customSDK/servicefabric/models/backup_suspension_info.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupSuspensionInfo(Model): - """Describes the backup suspension details. - - :param is_suspended: Indicates whether periodic backup is suspended at - this level or not. - :type is_suspended: bool - :param suspension_inherited_from: Specifies the scope at which the backup - suspension was applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type suspension_inherited_from: str or - ~azure.servicefabric.models.BackupSuspensionScope - """ - - _attribute_map = { - 'is_suspended': {'key': 'IsSuspended', 'type': 'bool'}, - 'suspension_inherited_from': {'key': 'SuspensionInheritedFrom', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BackupSuspensionInfo, self).__init__(**kwargs) - self.is_suspended = kwargs.get('is_suspended', None) - self.suspension_inherited_from = kwargs.get('suspension_inherited_from', None) diff --git a/customSDK/servicefabric/models/backup_suspension_info_py3.py b/customSDK/servicefabric/models/backup_suspension_info_py3.py deleted file mode 100644 index a384ce93..00000000 --- a/customSDK/servicefabric/models/backup_suspension_info_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BackupSuspensionInfo(Model): - """Describes the backup suspension details. - - :param is_suspended: Indicates whether periodic backup is suspended at - this level or not. - :type is_suspended: bool - :param suspension_inherited_from: Specifies the scope at which the backup - suspension was applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type suspension_inherited_from: str or - ~azure.servicefabric.models.BackupSuspensionScope - """ - - _attribute_map = { - 'is_suspended': {'key': 'IsSuspended', 'type': 'bool'}, - 'suspension_inherited_from': {'key': 'SuspensionInheritedFrom', 'type': 'str'}, - } - - def __init__(self, *, is_suspended: bool=None, suspension_inherited_from=None, **kwargs) -> None: - super(BackupSuspensionInfo, self).__init__(**kwargs) - self.is_suspended = is_suspended - self.suspension_inherited_from = suspension_inherited_from diff --git a/customSDK/servicefabric/models/basic_retention_policy_description.py b/customSDK/servicefabric/models/basic_retention_policy_description.py deleted file mode 100644 index 653dec49..00000000 --- a/customSDK/servicefabric/models/basic_retention_policy_description.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .retention_policy_description import RetentionPolicyDescription - - -class BasicRetentionPolicyDescription(RetentionPolicyDescription): - """Describes basic retention policy. - - All required parameters must be populated in order to send to Azure. - - :param retention_policy_type: Required. Constant filled by server. - :type retention_policy_type: str - :param retention_duration: Required. It is the minimum duration for which - a backup created, will remain stored in the storage and might get deleted - after that span of time. It should be specified in ISO8601 format. - :type retention_duration: timedelta - :param minimum_number_of_backups: It is the minimum number of backups to - be retained at any point of time. If specified with a non zero value, - backups will not be deleted even if the backups have gone past retention - duration and have number of backups less than or equal to it. - :type minimum_number_of_backups: int - """ - - _validation = { - 'retention_policy_type': {'required': True}, - 'retention_duration': {'required': True}, - 'minimum_number_of_backups': {'minimum': 0}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, - 'retention_duration': {'key': 'RetentionDuration', 'type': 'duration'}, - 'minimum_number_of_backups': {'key': 'MinimumNumberOfBackups', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(BasicRetentionPolicyDescription, self).__init__(**kwargs) - self.retention_duration = kwargs.get('retention_duration', None) - self.minimum_number_of_backups = kwargs.get('minimum_number_of_backups', None) - self.retention_policy_type = 'Basic' diff --git a/customSDK/servicefabric/models/basic_retention_policy_description_py3.py b/customSDK/servicefabric/models/basic_retention_policy_description_py3.py deleted file mode 100644 index 5abb36a8..00000000 --- a/customSDK/servicefabric/models/basic_retention_policy_description_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .retention_policy_description_py3 import RetentionPolicyDescription - - -class BasicRetentionPolicyDescription(RetentionPolicyDescription): - """Describes basic retention policy. - - All required parameters must be populated in order to send to Azure. - - :param retention_policy_type: Required. Constant filled by server. - :type retention_policy_type: str - :param retention_duration: Required. It is the minimum duration for which - a backup created, will remain stored in the storage and might get deleted - after that span of time. It should be specified in ISO8601 format. - :type retention_duration: timedelta - :param minimum_number_of_backups: It is the minimum number of backups to - be retained at any point of time. If specified with a non zero value, - backups will not be deleted even if the backups have gone past retention - duration and have number of backups less than or equal to it. - :type minimum_number_of_backups: int - """ - - _validation = { - 'retention_policy_type': {'required': True}, - 'retention_duration': {'required': True}, - 'minimum_number_of_backups': {'minimum': 0}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, - 'retention_duration': {'key': 'RetentionDuration', 'type': 'duration'}, - 'minimum_number_of_backups': {'key': 'MinimumNumberOfBackups', 'type': 'int'}, - } - - def __init__(self, *, retention_duration, minimum_number_of_backups: int=None, **kwargs) -> None: - super(BasicRetentionPolicyDescription, self).__init__(**kwargs) - self.retention_duration = retention_duration - self.minimum_number_of_backups = minimum_number_of_backups - self.retention_policy_type = 'Basic' diff --git a/customSDK/servicefabric/models/binary_property_value.py b/customSDK/servicefabric/models/binary_property_value.py deleted file mode 100644 index 4dbec46a..00000000 --- a/customSDK/servicefabric/models/binary_property_value.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_value import PropertyValue - - -class BinaryPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Binary. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. Array of bytes to be sent as an integer array. Each - element of array is a number between 0 and 255. - :type data: list[int] - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': '[int]'}, - } - - def __init__(self, **kwargs): - super(BinaryPropertyValue, self).__init__(**kwargs) - self.data = kwargs.get('data', None) - self.kind = 'Binary' diff --git a/customSDK/servicefabric/models/binary_property_value_py3.py b/customSDK/servicefabric/models/binary_property_value_py3.py deleted file mode 100644 index 6435ad17..00000000 --- a/customSDK/servicefabric/models/binary_property_value_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_value_py3 import PropertyValue - - -class BinaryPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Binary. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. Array of bytes to be sent as an integer array. Each - element of array is a number between 0 and 255. - :type data: list[int] - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': '[int]'}, - } - - def __init__(self, *, data, **kwargs) -> None: - super(BinaryPropertyValue, self).__init__(**kwargs) - self.data = data - self.kind = 'Binary' diff --git a/customSDK/servicefabric/models/chaos.py b/customSDK/servicefabric/models/chaos.py deleted file mode 100644 index db9f97fb..00000000 --- a/customSDK/servicefabric/models/chaos.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Chaos(Model): - """Contains a description of Chaos. - - :param chaos_parameters: If Chaos is running, these are the parameters - Chaos is running with. - :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters - :param status: Current status of the Chaos run. Possible values include: - 'Invalid', 'Running', 'Stopped' - :type status: str or ~azure.servicefabric.models.ChaosStatus - :param schedule_status: Current status of the schedule. Possible values - include: 'Invalid', 'Stopped', 'Active', 'Expired', 'Pending' - :type schedule_status: str or - ~azure.servicefabric.models.ChaosScheduleStatus - """ - - _attribute_map = { - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'schedule_status': {'key': 'ScheduleStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Chaos, self).__init__(**kwargs) - self.chaos_parameters = kwargs.get('chaos_parameters', None) - self.status = kwargs.get('status', None) - self.schedule_status = kwargs.get('schedule_status', None) diff --git a/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event.py b/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event.py deleted file mode 100644 index 7b4396d1..00000000 --- a/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event import ApplicationEvent - - -class ChaosCodePackageRestartScheduledEvent(ApplicationEvent): - """Chaos Restart Code Package Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param service_manifest_name: Required. Service manifest name. - :type service_manifest_name: str - :param code_package_name: Required. Code package name. - :type code_package_name: str - :param service_package_activation_id: Required. Id of Service package - activation. - :type service_package_activation_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'node_name': {'required': True}, - 'service_manifest_name': {'required': True}, - 'code_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ChaosCodePackageRestartScheduledEvent, self).__init__(**kwargs) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.node_name = kwargs.get('node_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.kind = 'ChaosCodePackageRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event_py3.py deleted file mode 100644 index a9a80982..00000000 --- a/customSDK/servicefabric/models/chaos_code_package_restart_scheduled_event_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event_py3 import ApplicationEvent - - -class ChaosCodePackageRestartScheduledEvent(ApplicationEvent): - """Chaos Restart Code Package Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param service_manifest_name: Required. Service manifest name. - :type service_manifest_name: str - :param code_package_name: Required. Code package name. - :type code_package_name: str - :param service_package_activation_id: Required. Id of Service package - activation. - :type service_package_activation_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'node_name': {'required': True}, - 'service_manifest_name': {'required': True}, - 'code_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, fault_group_id: str, fault_id: str, node_name: str, service_manifest_name: str, code_package_name: str, service_package_activation_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosCodePackageRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.fault_group_id = fault_group_id - self.fault_id = fault_id - self.node_name = node_name - self.service_manifest_name = service_manifest_name - self.code_package_name = code_package_name - self.service_package_activation_id = service_package_activation_id - self.kind = 'ChaosCodePackageRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_context.py b/customSDK/servicefabric/models/chaos_context.py deleted file mode 100644 index d8d7cc59..00000000 --- a/customSDK/servicefabric/models/chaos_context.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosContext(Model): - """Describes a map, which is a collection of (string, string) type key-value - pairs. The map can be used to record information about - the Chaos run. There cannot be more than 100 such pairs and each string - (key or value) can be at most 4095 characters long. - This map is set by the starter of the Chaos run to optionally store the - context about the specific run. - - :param map: Describes a map that contains a collection of - ChaosContextMapItem's. - :type map: dict[str, str] - """ - - _attribute_map = { - 'map': {'key': 'Map', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ChaosContext, self).__init__(**kwargs) - self.map = kwargs.get('map', None) diff --git a/customSDK/servicefabric/models/chaos_context_py3.py b/customSDK/servicefabric/models/chaos_context_py3.py deleted file mode 100644 index 85ea13ab..00000000 --- a/customSDK/servicefabric/models/chaos_context_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosContext(Model): - """Describes a map, which is a collection of (string, string) type key-value - pairs. The map can be used to record information about - the Chaos run. There cannot be more than 100 such pairs and each string - (key or value) can be at most 4095 characters long. - This map is set by the starter of the Chaos run to optionally store the - context about the specific run. - - :param map: Describes a map that contains a collection of - ChaosContextMapItem's. - :type map: dict[str, str] - """ - - _attribute_map = { - 'map': {'key': 'Map', 'type': '{str}'}, - } - - def __init__(self, *, map=None, **kwargs) -> None: - super(ChaosContext, self).__init__(**kwargs) - self.map = map diff --git a/customSDK/servicefabric/models/chaos_event.py b/customSDK/servicefabric/models/chaos_event.py deleted file mode 100644 index 8d0de7a8..00000000 --- a/customSDK/servicefabric/models/chaos_event.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosEvent(Model): - """Represents an event generated during a Chaos run. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ExecutingFaultsChaosEvent, StartedChaosEvent, - StoppedChaosEvent, TestErrorChaosEvent, ValidationFailedChaosEvent, - WaitingChaosEvent - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ExecutingFaults': 'ExecutingFaultsChaosEvent', 'Started': 'StartedChaosEvent', 'Stopped': 'StoppedChaosEvent', 'TestError': 'TestErrorChaosEvent', 'ValidationFailed': 'ValidationFailedChaosEvent', 'Waiting': 'WaitingChaosEvent'} - } - - def __init__(self, **kwargs): - super(ChaosEvent, self).__init__(**kwargs) - self.time_stamp_utc = kwargs.get('time_stamp_utc', None) - self.kind = None diff --git a/customSDK/servicefabric/models/chaos_event_py3.py b/customSDK/servicefabric/models/chaos_event_py3.py deleted file mode 100644 index 31f21174..00000000 --- a/customSDK/servicefabric/models/chaos_event_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosEvent(Model): - """Represents an event generated during a Chaos run. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ExecutingFaultsChaosEvent, StartedChaosEvent, - StoppedChaosEvent, TestErrorChaosEvent, ValidationFailedChaosEvent, - WaitingChaosEvent - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ExecutingFaults': 'ExecutingFaultsChaosEvent', 'Started': 'StartedChaosEvent', 'Stopped': 'StoppedChaosEvent', 'TestError': 'TestErrorChaosEvent', 'ValidationFailed': 'ValidationFailedChaosEvent', 'Waiting': 'WaitingChaosEvent'} - } - - def __init__(self, *, time_stamp_utc, **kwargs) -> None: - super(ChaosEvent, self).__init__(**kwargs) - self.time_stamp_utc = time_stamp_utc - self.kind = None diff --git a/customSDK/servicefabric/models/chaos_event_wrapper.py b/customSDK/servicefabric/models/chaos_event_wrapper.py deleted file mode 100644 index 0c56d697..00000000 --- a/customSDK/servicefabric/models/chaos_event_wrapper.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosEventWrapper(Model): - """Wrapper object for Chaos event. - - :param chaos_event: Represents an event generated during a Chaos run. - :type chaos_event: ~azure.servicefabric.models.ChaosEvent - """ - - _attribute_map = { - 'chaos_event': {'key': 'ChaosEvent', 'type': 'ChaosEvent'}, - } - - def __init__(self, **kwargs): - super(ChaosEventWrapper, self).__init__(**kwargs) - self.chaos_event = kwargs.get('chaos_event', None) diff --git a/customSDK/servicefabric/models/chaos_event_wrapper_py3.py b/customSDK/servicefabric/models/chaos_event_wrapper_py3.py deleted file mode 100644 index e1c68e96..00000000 --- a/customSDK/servicefabric/models/chaos_event_wrapper_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosEventWrapper(Model): - """Wrapper object for Chaos event. - - :param chaos_event: Represents an event generated during a Chaos run. - :type chaos_event: ~azure.servicefabric.models.ChaosEvent - """ - - _attribute_map = { - 'chaos_event': {'key': 'ChaosEvent', 'type': 'ChaosEvent'}, - } - - def __init__(self, *, chaos_event=None, **kwargs) -> None: - super(ChaosEventWrapper, self).__init__(**kwargs) - self.chaos_event = chaos_event diff --git a/customSDK/servicefabric/models/chaos_events_segment.py b/customSDK/servicefabric/models/chaos_events_segment.py deleted file mode 100644 index a6373aa6..00000000 --- a/customSDK/servicefabric/models/chaos_events_segment.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosEventsSegment(Model): - """Contains the list of Chaos events and the continuation token to get the - next segment. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param history: List of Chaos events that meet the user-supplied criteria. - :type history: list[~azure.servicefabric.models.ChaosEventWrapper] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'history': {'key': 'History', 'type': '[ChaosEventWrapper]'}, - } - - def __init__(self, **kwargs): - super(ChaosEventsSegment, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.history = kwargs.get('history', None) diff --git a/customSDK/servicefabric/models/chaos_events_segment_py3.py b/customSDK/servicefabric/models/chaos_events_segment_py3.py deleted file mode 100644 index e916ca94..00000000 --- a/customSDK/servicefabric/models/chaos_events_segment_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosEventsSegment(Model): - """Contains the list of Chaos events and the continuation token to get the - next segment. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param history: List of Chaos events that meet the user-supplied criteria. - :type history: list[~azure.servicefabric.models.ChaosEventWrapper] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'history': {'key': 'History', 'type': '[ChaosEventWrapper]'}, - } - - def __init__(self, *, continuation_token: str=None, history=None, **kwargs) -> None: - super(ChaosEventsSegment, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.history = history diff --git a/customSDK/servicefabric/models/chaos_node_restart_scheduled_event.py b/customSDK/servicefabric/models/chaos_node_restart_scheduled_event.py deleted file mode 100644 index 4bbcde8f..00000000 --- a/customSDK/servicefabric/models/chaos_node_restart_scheduled_event.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event import NodeEvent - - -class ChaosNodeRestartScheduledEvent(NodeEvent): - """Chaos Restart Node Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: Required. Id of Node instance. - :type node_instance_id: long - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ChaosNodeRestartScheduledEvent, self).__init__(**kwargs) - self.node_instance_id = kwargs.get('node_instance_id', None) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.kind = 'ChaosNodeRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_node_restart_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_node_restart_scheduled_event_py3.py deleted file mode 100644 index 780e31f3..00000000 --- a/customSDK/servicefabric/models/chaos_node_restart_scheduled_event_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event_py3 import NodeEvent - - -class ChaosNodeRestartScheduledEvent(NodeEvent): - """Chaos Restart Node Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: Required. Id of Node instance. - :type node_instance_id: long - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance_id: int, fault_group_id: str, fault_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosNodeRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance_id = node_instance_id - self.fault_group_id = fault_group_id - self.fault_id = fault_id - self.kind = 'ChaosNodeRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_parameters.py b/customSDK/servicefabric/models/chaos_parameters.py deleted file mode 100644 index ed32218f..00000000 --- a/customSDK/servicefabric/models/chaos_parameters.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosParameters(Model): - """Defines all the parameters to configure a Chaos run. - - :param time_to_run_in_seconds: Total time (in seconds) for which Chaos - will run before automatically stopping. The maximum allowed value is - 4,294,967,295 (System.UInt32.MaxValue). Default value: "4294967295" . - :type time_to_run_in_seconds: str - :param max_cluster_stabilization_timeout_in_seconds: The maximum amount of - time to wait for all cluster entities to become stable and healthy. Chaos - executes in iterations and at the start of each iteration it validates the - health of cluster entities. - During validation if a cluster entity is not stable and healthy within - MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation - failed event. Default value: 60 . - :type max_cluster_stabilization_timeout_in_seconds: long - :param max_concurrent_faults: MaxConcurrentFaults is the maximum number of - concurrent faults induced per iteration. - Chaos executes in iterations and two consecutive iterations are separated - by a validation phase. - The higher the concurrency, the more aggressive the injection of faults, - leading to inducing more complex series of states to uncover bugs. - The recommendation is to start with a value of 2 or 3 and to exercise - caution while moving up. Default value: 1 . - :type max_concurrent_faults: long - :param enable_move_replica_faults: Enables or disables the move primary - and move secondary faults. Default value: True . - :type enable_move_replica_faults: bool - :param wait_time_between_faults_in_seconds: Wait time (in seconds) between - consecutive faults within a single iteration. - The larger the value, the lower the overlapping between faults and the - simpler the sequence of state transitions that the cluster goes through. - The recommendation is to start with a value between 1 and 5 and exercise - caution while moving up. Default value: 20 . - :type wait_time_between_faults_in_seconds: long - :param wait_time_between_iterations_in_seconds: Time-separation (in - seconds) between two consecutive iterations of Chaos. - The larger the value, the lower the fault injection rate. Default value: - 30 . - :type wait_time_between_iterations_in_seconds: long - :param cluster_health_policy: Passed-in cluster health policy is used to - validate health of the cluster in between Chaos iterations. If the cluster - health is in error or if an unexpected exception happens during fault - execution--to provide the cluster with some time to recuperate--Chaos will - wait for 30 minutes before the next health-check. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param context: Describes a map, which is a collection of (string, string) - type key-value pairs. The map can be used to record information about - the Chaos run. There cannot be more than 100 such pairs and each string - (key or value) can be at most 4095 characters long. - This map is set by the starter of the Chaos run to optionally store the - context about the specific run. - :type context: ~azure.servicefabric.models.ChaosContext - :param chaos_target_filter: List of cluster entities to target for Chaos - faults. - This filter can be used to target Chaos faults only to certain node types - or only to certain application instances. If ChaosTargetFilter is not - used, Chaos faults all cluster entities. - If ChaosTargetFilter is used, Chaos faults only the entities that meet the - ChaosTargetFilter specification. - :type chaos_target_filter: ~azure.servicefabric.models.ChaosTargetFilter - """ - - _validation = { - 'max_cluster_stabilization_timeout_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'max_concurrent_faults': {'maximum': 4294967295, 'minimum': 0}, - 'wait_time_between_faults_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'wait_time_between_iterations_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'str'}, - 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'long'}, - 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, - 'enable_move_replica_faults': {'key': 'EnableMoveReplicaFaults', 'type': 'bool'}, - 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'long'}, - 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'long'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'context': {'key': 'Context', 'type': 'ChaosContext'}, - 'chaos_target_filter': {'key': 'ChaosTargetFilter', 'type': 'ChaosTargetFilter'}, - } - - def __init__(self, **kwargs): - super(ChaosParameters, self).__init__(**kwargs) - self.time_to_run_in_seconds = kwargs.get('time_to_run_in_seconds', "4294967295") - self.max_cluster_stabilization_timeout_in_seconds = kwargs.get('max_cluster_stabilization_timeout_in_seconds', 60) - self.max_concurrent_faults = kwargs.get('max_concurrent_faults', 1) - self.enable_move_replica_faults = kwargs.get('enable_move_replica_faults', True) - self.wait_time_between_faults_in_seconds = kwargs.get('wait_time_between_faults_in_seconds', 20) - self.wait_time_between_iterations_in_seconds = kwargs.get('wait_time_between_iterations_in_seconds', 30) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.context = kwargs.get('context', None) - self.chaos_target_filter = kwargs.get('chaos_target_filter', None) diff --git a/customSDK/servicefabric/models/chaos_parameters_dictionary_item.py b/customSDK/servicefabric/models/chaos_parameters_dictionary_item.py deleted file mode 100644 index e2b07e8b..00000000 --- a/customSDK/servicefabric/models/chaos_parameters_dictionary_item.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosParametersDictionaryItem(Model): - """Defines an item in ChaosParametersDictionary of the Chaos Schedule. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key identifying the Chaos Parameter in the - dictionary. This key is referenced by Chaos Schedule Jobs. - :type key: str - :param value: Required. Defines all the parameters to configure a Chaos - run. - :type value: ~azure.servicefabric.models.ChaosParameters - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ChaosParameters'}, - } - - def __init__(self, **kwargs): - super(ChaosParametersDictionaryItem, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/chaos_parameters_dictionary_item_py3.py b/customSDK/servicefabric/models/chaos_parameters_dictionary_item_py3.py deleted file mode 100644 index 067d1936..00000000 --- a/customSDK/servicefabric/models/chaos_parameters_dictionary_item_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosParametersDictionaryItem(Model): - """Defines an item in ChaosParametersDictionary of the Chaos Schedule. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key identifying the Chaos Parameter in the - dictionary. This key is referenced by Chaos Schedule Jobs. - :type key: str - :param value: Required. Defines all the parameters to configure a Chaos - run. - :type value: ~azure.servicefabric.models.ChaosParameters - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ChaosParameters'}, - } - - def __init__(self, *, key: str, value, **kwargs) -> None: - super(ChaosParametersDictionaryItem, self).__init__(**kwargs) - self.key = key - self.value = value diff --git a/customSDK/servicefabric/models/chaos_parameters_py3.py b/customSDK/servicefabric/models/chaos_parameters_py3.py deleted file mode 100644 index ed9ab927..00000000 --- a/customSDK/servicefabric/models/chaos_parameters_py3.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosParameters(Model): - """Defines all the parameters to configure a Chaos run. - - :param time_to_run_in_seconds: Total time (in seconds) for which Chaos - will run before automatically stopping. The maximum allowed value is - 4,294,967,295 (System.UInt32.MaxValue). Default value: "4294967295" . - :type time_to_run_in_seconds: str - :param max_cluster_stabilization_timeout_in_seconds: The maximum amount of - time to wait for all cluster entities to become stable and healthy. Chaos - executes in iterations and at the start of each iteration it validates the - health of cluster entities. - During validation if a cluster entity is not stable and healthy within - MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation - failed event. Default value: 60 . - :type max_cluster_stabilization_timeout_in_seconds: long - :param max_concurrent_faults: MaxConcurrentFaults is the maximum number of - concurrent faults induced per iteration. - Chaos executes in iterations and two consecutive iterations are separated - by a validation phase. - The higher the concurrency, the more aggressive the injection of faults, - leading to inducing more complex series of states to uncover bugs. - The recommendation is to start with a value of 2 or 3 and to exercise - caution while moving up. Default value: 1 . - :type max_concurrent_faults: long - :param enable_move_replica_faults: Enables or disables the move primary - and move secondary faults. Default value: True . - :type enable_move_replica_faults: bool - :param wait_time_between_faults_in_seconds: Wait time (in seconds) between - consecutive faults within a single iteration. - The larger the value, the lower the overlapping between faults and the - simpler the sequence of state transitions that the cluster goes through. - The recommendation is to start with a value between 1 and 5 and exercise - caution while moving up. Default value: 20 . - :type wait_time_between_faults_in_seconds: long - :param wait_time_between_iterations_in_seconds: Time-separation (in - seconds) between two consecutive iterations of Chaos. - The larger the value, the lower the fault injection rate. Default value: - 30 . - :type wait_time_between_iterations_in_seconds: long - :param cluster_health_policy: Passed-in cluster health policy is used to - validate health of the cluster in between Chaos iterations. If the cluster - health is in error or if an unexpected exception happens during fault - execution--to provide the cluster with some time to recuperate--Chaos will - wait for 30 minutes before the next health-check. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param context: Describes a map, which is a collection of (string, string) - type key-value pairs. The map can be used to record information about - the Chaos run. There cannot be more than 100 such pairs and each string - (key or value) can be at most 4095 characters long. - This map is set by the starter of the Chaos run to optionally store the - context about the specific run. - :type context: ~azure.servicefabric.models.ChaosContext - :param chaos_target_filter: List of cluster entities to target for Chaos - faults. - This filter can be used to target Chaos faults only to certain node types - or only to certain application instances. If ChaosTargetFilter is not - used, Chaos faults all cluster entities. - If ChaosTargetFilter is used, Chaos faults only the entities that meet the - ChaosTargetFilter specification. - :type chaos_target_filter: ~azure.servicefabric.models.ChaosTargetFilter - """ - - _validation = { - 'max_cluster_stabilization_timeout_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'max_concurrent_faults': {'maximum': 4294967295, 'minimum': 0}, - 'wait_time_between_faults_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'wait_time_between_iterations_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'str'}, - 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'long'}, - 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, - 'enable_move_replica_faults': {'key': 'EnableMoveReplicaFaults', 'type': 'bool'}, - 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'long'}, - 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'long'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'context': {'key': 'Context', 'type': 'ChaosContext'}, - 'chaos_target_filter': {'key': 'ChaosTargetFilter', 'type': 'ChaosTargetFilter'}, - } - - def __init__(self, *, time_to_run_in_seconds: str="4294967295", max_cluster_stabilization_timeout_in_seconds: int=60, max_concurrent_faults: int=1, enable_move_replica_faults: bool=True, wait_time_between_faults_in_seconds: int=20, wait_time_between_iterations_in_seconds: int=30, cluster_health_policy=None, context=None, chaos_target_filter=None, **kwargs) -> None: - super(ChaosParameters, self).__init__(**kwargs) - self.time_to_run_in_seconds = time_to_run_in_seconds - self.max_cluster_stabilization_timeout_in_seconds = max_cluster_stabilization_timeout_in_seconds - self.max_concurrent_faults = max_concurrent_faults - self.enable_move_replica_faults = enable_move_replica_faults - self.wait_time_between_faults_in_seconds = wait_time_between_faults_in_seconds - self.wait_time_between_iterations_in_seconds = wait_time_between_iterations_in_seconds - self.cluster_health_policy = cluster_health_policy - self.context = context - self.chaos_target_filter = chaos_target_filter diff --git a/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event.py b/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event.py deleted file mode 100644 index 2275bc00..00000000 --- a/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_event import PartitionEvent - - -class ChaosPartitionPrimaryMoveScheduledEvent(PartitionEvent): - """Chaos Move Primary Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param service_name: Required. Service name. - :type service_name: str - :param node_to: Required. The name of a Service Fabric node. - :type node_to: str - :param forced_move: Required. Indicates a forced move. - :type forced_move: bool - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_name': {'required': True}, - 'node_to': {'required': True}, - 'forced_move': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'node_to': {'key': 'NodeTo', 'type': 'str'}, - 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ChaosPartitionPrimaryMoveScheduledEvent, self).__init__(**kwargs) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.service_name = kwargs.get('service_name', None) - self.node_to = kwargs.get('node_to', None) - self.forced_move = kwargs.get('forced_move', None) - self.kind = 'ChaosPartitionPrimaryMoveScheduled' diff --git a/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event_py3.py deleted file mode 100644 index e6d714d6..00000000 --- a/customSDK/servicefabric/models/chaos_partition_primary_move_scheduled_event_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_event_py3 import PartitionEvent - - -class ChaosPartitionPrimaryMoveScheduledEvent(PartitionEvent): - """Chaos Move Primary Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param service_name: Required. Service name. - :type service_name: str - :param node_to: Required. The name of a Service Fabric node. - :type node_to: str - :param forced_move: Required. Indicates a forced move. - :type forced_move: bool - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_name': {'required': True}, - 'node_to': {'required': True}, - 'forced_move': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'node_to': {'key': 'NodeTo', 'type': 'str'}, - 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, fault_group_id: str, fault_id: str, service_name: str, node_to: str, forced_move: bool, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosPartitionPrimaryMoveScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.fault_group_id = fault_group_id - self.fault_id = fault_id - self.service_name = service_name - self.node_to = node_to - self.forced_move = forced_move - self.kind = 'ChaosPartitionPrimaryMoveScheduled' diff --git a/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event.py b/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event.py deleted file mode 100644 index 89a70127..00000000 --- a/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_event import PartitionEvent - - -class ChaosPartitionSecondaryMoveScheduledEvent(PartitionEvent): - """Chaos Move Secondary Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param service_name: Required. Service name. - :type service_name: str - :param source_node: Required. The name of a Service Fabric node. - :type source_node: str - :param destination_node: Required. The name of a Service Fabric node. - :type destination_node: str - :param forced_move: Required. Indicates a forced move. - :type forced_move: bool - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_name': {'required': True}, - 'source_node': {'required': True}, - 'destination_node': {'required': True}, - 'forced_move': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'source_node': {'key': 'SourceNode', 'type': 'str'}, - 'destination_node': {'key': 'DestinationNode', 'type': 'str'}, - 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ChaosPartitionSecondaryMoveScheduledEvent, self).__init__(**kwargs) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.service_name = kwargs.get('service_name', None) - self.source_node = kwargs.get('source_node', None) - self.destination_node = kwargs.get('destination_node', None) - self.forced_move = kwargs.get('forced_move', None) - self.kind = 'ChaosPartitionSecondaryMoveScheduled' diff --git a/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event_py3.py deleted file mode 100644 index c385d53d..00000000 --- a/customSDK/servicefabric/models/chaos_partition_secondary_move_scheduled_event_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_event_py3 import PartitionEvent - - -class ChaosPartitionSecondaryMoveScheduledEvent(PartitionEvent): - """Chaos Move Secondary Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param service_name: Required. Service name. - :type service_name: str - :param source_node: Required. The name of a Service Fabric node. - :type source_node: str - :param destination_node: Required. The name of a Service Fabric node. - :type destination_node: str - :param forced_move: Required. Indicates a forced move. - :type forced_move: bool - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_name': {'required': True}, - 'source_node': {'required': True}, - 'destination_node': {'required': True}, - 'forced_move': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'source_node': {'key': 'SourceNode', 'type': 'str'}, - 'destination_node': {'key': 'DestinationNode', 'type': 'str'}, - 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, fault_group_id: str, fault_id: str, service_name: str, source_node: str, destination_node: str, forced_move: bool, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosPartitionSecondaryMoveScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.fault_group_id = fault_group_id - self.fault_id = fault_id - self.service_name = service_name - self.source_node = source_node - self.destination_node = destination_node - self.forced_move = forced_move - self.kind = 'ChaosPartitionSecondaryMoveScheduled' diff --git a/customSDK/servicefabric/models/chaos_py3.py b/customSDK/servicefabric/models/chaos_py3.py deleted file mode 100644 index ab496617..00000000 --- a/customSDK/servicefabric/models/chaos_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Chaos(Model): - """Contains a description of Chaos. - - :param chaos_parameters: If Chaos is running, these are the parameters - Chaos is running with. - :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters - :param status: Current status of the Chaos run. Possible values include: - 'Invalid', 'Running', 'Stopped' - :type status: str or ~azure.servicefabric.models.ChaosStatus - :param schedule_status: Current status of the schedule. Possible values - include: 'Invalid', 'Stopped', 'Active', 'Expired', 'Pending' - :type schedule_status: str or - ~azure.servicefabric.models.ChaosScheduleStatus - """ - - _attribute_map = { - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'schedule_status': {'key': 'ScheduleStatus', 'type': 'str'}, - } - - def __init__(self, *, chaos_parameters=None, status=None, schedule_status=None, **kwargs) -> None: - super(Chaos, self).__init__(**kwargs) - self.chaos_parameters = chaos_parameters - self.status = status - self.schedule_status = schedule_status diff --git a/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event.py b/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event.py deleted file mode 100644 index 3ac78109..00000000 --- a/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_event import ReplicaEvent - - -class ChaosReplicaRemovalScheduledEvent(ReplicaEvent): - """Chaos Remove Replica Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param service_uri: Required. Service name. - :type service_uri: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_uri': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ChaosReplicaRemovalScheduledEvent, self).__init__(**kwargs) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.service_uri = kwargs.get('service_uri', None) - self.kind = 'ChaosReplicaRemovalScheduled' diff --git a/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event_py3.py deleted file mode 100644 index 81db7b07..00000000 --- a/customSDK/servicefabric/models/chaos_replica_removal_scheduled_event_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_event_py3 import ReplicaEvent - - -class ChaosReplicaRemovalScheduledEvent(ReplicaEvent): - """Chaos Remove Replica Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param service_uri: Required. Service name. - :type service_uri: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_uri': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, fault_group_id: str, fault_id: str, service_uri: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosReplicaRemovalScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.fault_group_id = fault_group_id - self.fault_id = fault_id - self.service_uri = service_uri - self.kind = 'ChaosReplicaRemovalScheduled' diff --git a/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event.py b/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event.py deleted file mode 100644 index c877e86c..00000000 --- a/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_event import ReplicaEvent - - -class ChaosReplicaRestartScheduledEvent(ReplicaEvent): - """Chaos Restart Replica Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param service_uri: Required. Service name. - :type service_uri: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_uri': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ChaosReplicaRestartScheduledEvent, self).__init__(**kwargs) - self.fault_group_id = kwargs.get('fault_group_id', None) - self.fault_id = kwargs.get('fault_id', None) - self.service_uri = kwargs.get('service_uri', None) - self.kind = 'ChaosReplicaRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event_py3.py b/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event_py3.py deleted file mode 100644 index f8b2cbbc..00000000 --- a/customSDK/servicefabric/models/chaos_replica_restart_scheduled_event_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_event_py3 import ReplicaEvent - - -class ChaosReplicaRestartScheduledEvent(ReplicaEvent): - """Chaos Restart Replica Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param fault_group_id: Required. Id of fault group. - :type fault_group_id: str - :param fault_id: Required. Id of fault. - :type fault_id: str - :param service_uri: Required. Service name. - :type service_uri: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_uri': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, fault_group_id: str, fault_id: str, service_uri: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosReplicaRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.fault_group_id = fault_group_id - self.fault_id = fault_id - self.service_uri = service_uri - self.kind = 'ChaosReplicaRestartScheduled' diff --git a/customSDK/servicefabric/models/chaos_schedule.py b/customSDK/servicefabric/models/chaos_schedule.py deleted file mode 100644 index bac824b4..00000000 --- a/customSDK/servicefabric/models/chaos_schedule.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosSchedule(Model): - """Defines the schedule used by Chaos. - - :param start_date: The date and time Chaos will start using this schedule. - Default value: "1601-01-01T00:00:00Z" . - :type start_date: datetime - :param expiry_date: The date and time Chaos will continue to use this - schedule until. Default value: "9999-12-31T23:59:59.999Z" . - :type expiry_date: datetime - :param chaos_parameters_dictionary: A mapping of string names to Chaos - Parameters to be referenced by Chaos Schedule Jobs. - :type chaos_parameters_dictionary: - list[~azure.servicefabric.models.ChaosParametersDictionaryItem] - :param jobs: A list of all Chaos Schedule Jobs that will be automated by - the schedule. - :type jobs: list[~azure.servicefabric.models.ChaosScheduleJob] - """ - - _attribute_map = { - 'start_date': {'key': 'StartDate', 'type': 'iso-8601'}, - 'expiry_date': {'key': 'ExpiryDate', 'type': 'iso-8601'}, - 'chaos_parameters_dictionary': {'key': 'ChaosParametersDictionary', 'type': '[ChaosParametersDictionaryItem]'}, - 'jobs': {'key': 'Jobs', 'type': '[ChaosScheduleJob]'}, - } - - def __init__(self, **kwargs): - super(ChaosSchedule, self).__init__(**kwargs) - self.start_date = kwargs.get('start_date', "1601-01-01T00:00:00Z") - self.expiry_date = kwargs.get('expiry_date', "9999-12-31T23:59:59.999Z") - self.chaos_parameters_dictionary = kwargs.get('chaos_parameters_dictionary', None) - self.jobs = kwargs.get('jobs', None) diff --git a/customSDK/servicefabric/models/chaos_schedule_description.py b/customSDK/servicefabric/models/chaos_schedule_description.py deleted file mode 100644 index 8a7d3760..00000000 --- a/customSDK/servicefabric/models/chaos_schedule_description.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosScheduleDescription(Model): - """Defines the Chaos Schedule used by Chaos and the version of the Chaos - Schedule. The version value wraps back to 0 after surpassing 2,147,483,647. - - :param version: The version number of the Schedule. - :type version: int - :param schedule: Defines the schedule used by Chaos. - :type schedule: ~azure.servicefabric.models.ChaosSchedule - """ - - _validation = { - 'version': {'minimum': 0}, - } - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'int'}, - 'schedule': {'key': 'Schedule', 'type': 'ChaosSchedule'}, - } - - def __init__(self, **kwargs): - super(ChaosScheduleDescription, self).__init__(**kwargs) - self.version = kwargs.get('version', None) - self.schedule = kwargs.get('schedule', None) diff --git a/customSDK/servicefabric/models/chaos_schedule_description_py3.py b/customSDK/servicefabric/models/chaos_schedule_description_py3.py deleted file mode 100644 index aeb7d9e5..00000000 --- a/customSDK/servicefabric/models/chaos_schedule_description_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosScheduleDescription(Model): - """Defines the Chaos Schedule used by Chaos and the version of the Chaos - Schedule. The version value wraps back to 0 after surpassing 2,147,483,647. - - :param version: The version number of the Schedule. - :type version: int - :param schedule: Defines the schedule used by Chaos. - :type schedule: ~azure.servicefabric.models.ChaosSchedule - """ - - _validation = { - 'version': {'minimum': 0}, - } - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'int'}, - 'schedule': {'key': 'Schedule', 'type': 'ChaosSchedule'}, - } - - def __init__(self, *, version: int=None, schedule=None, **kwargs) -> None: - super(ChaosScheduleDescription, self).__init__(**kwargs) - self.version = version - self.schedule = schedule diff --git a/customSDK/servicefabric/models/chaos_schedule_job.py b/customSDK/servicefabric/models/chaos_schedule_job.py deleted file mode 100644 index 34882512..00000000 --- a/customSDK/servicefabric/models/chaos_schedule_job.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosScheduleJob(Model): - """Defines a repetition rule and parameters of Chaos to be used with the Chaos - Schedule. - - :param chaos_parameters: A reference to which Chaos Parameters of the - Chaos Schedule to use. - :type chaos_parameters: str - :param days: Defines the days of the week that a Chaos Schedule Job will - run for. - :type days: ~azure.servicefabric.models.ChaosScheduleJobActiveDaysOfWeek - :param times: A list of Time Ranges that specify when during active days - that this job will run. The times are interpreted as UTC. - :type times: list[~azure.servicefabric.models.TimeRange] - """ - - _attribute_map = { - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'str'}, - 'days': {'key': 'Days', 'type': 'ChaosScheduleJobActiveDaysOfWeek'}, - 'times': {'key': 'Times', 'type': '[TimeRange]'}, - } - - def __init__(self, **kwargs): - super(ChaosScheduleJob, self).__init__(**kwargs) - self.chaos_parameters = kwargs.get('chaos_parameters', None) - self.days = kwargs.get('days', None) - self.times = kwargs.get('times', None) diff --git a/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week.py b/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week.py deleted file mode 100644 index 3586ce0d..00000000 --- a/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosScheduleJobActiveDaysOfWeek(Model): - """Defines the days of the week that a Chaos Schedule Job will run for. - - :param sunday: Indicates if the Chaos Schedule Job will run on Sunday. - Default value: False . - :type sunday: bool - :param monday: Indicates if the Chaos Schedule Job will run on Monday. - Default value: False . - :type monday: bool - :param tuesday: Indicates if the Chaos Schedule Job will run on Tuesday. - Default value: False . - :type tuesday: bool - :param wednesday: Indicates if the Chaos Schedule Job will run on - Wednesday. Default value: False . - :type wednesday: bool - :param thursday: Indicates if the Chaos Schedule Job will run on Thursday. - Default value: False . - :type thursday: bool - :param friday: Indicates if the Chaos Schedule Job will run on Friday. - Default value: False . - :type friday: bool - :param saturday: Indicates if the Chaos Schedule Job will run on Saturday. - Default value: False . - :type saturday: bool - """ - - _attribute_map = { - 'sunday': {'key': 'Sunday', 'type': 'bool'}, - 'monday': {'key': 'Monday', 'type': 'bool'}, - 'tuesday': {'key': 'Tuesday', 'type': 'bool'}, - 'wednesday': {'key': 'Wednesday', 'type': 'bool'}, - 'thursday': {'key': 'Thursday', 'type': 'bool'}, - 'friday': {'key': 'Friday', 'type': 'bool'}, - 'saturday': {'key': 'Saturday', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ChaosScheduleJobActiveDaysOfWeek, self).__init__(**kwargs) - self.sunday = kwargs.get('sunday', False) - self.monday = kwargs.get('monday', False) - self.tuesday = kwargs.get('tuesday', False) - self.wednesday = kwargs.get('wednesday', False) - self.thursday = kwargs.get('thursday', False) - self.friday = kwargs.get('friday', False) - self.saturday = kwargs.get('saturday', False) diff --git a/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week_py3.py b/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week_py3.py deleted file mode 100644 index 75c07c50..00000000 --- a/customSDK/servicefabric/models/chaos_schedule_job_active_days_of_week_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosScheduleJobActiveDaysOfWeek(Model): - """Defines the days of the week that a Chaos Schedule Job will run for. - - :param sunday: Indicates if the Chaos Schedule Job will run on Sunday. - Default value: False . - :type sunday: bool - :param monday: Indicates if the Chaos Schedule Job will run on Monday. - Default value: False . - :type monday: bool - :param tuesday: Indicates if the Chaos Schedule Job will run on Tuesday. - Default value: False . - :type tuesday: bool - :param wednesday: Indicates if the Chaos Schedule Job will run on - Wednesday. Default value: False . - :type wednesday: bool - :param thursday: Indicates if the Chaos Schedule Job will run on Thursday. - Default value: False . - :type thursday: bool - :param friday: Indicates if the Chaos Schedule Job will run on Friday. - Default value: False . - :type friday: bool - :param saturday: Indicates if the Chaos Schedule Job will run on Saturday. - Default value: False . - :type saturday: bool - """ - - _attribute_map = { - 'sunday': {'key': 'Sunday', 'type': 'bool'}, - 'monday': {'key': 'Monday', 'type': 'bool'}, - 'tuesday': {'key': 'Tuesday', 'type': 'bool'}, - 'wednesday': {'key': 'Wednesday', 'type': 'bool'}, - 'thursday': {'key': 'Thursday', 'type': 'bool'}, - 'friday': {'key': 'Friday', 'type': 'bool'}, - 'saturday': {'key': 'Saturday', 'type': 'bool'}, - } - - def __init__(self, *, sunday: bool=False, monday: bool=False, tuesday: bool=False, wednesday: bool=False, thursday: bool=False, friday: bool=False, saturday: bool=False, **kwargs) -> None: - super(ChaosScheduleJobActiveDaysOfWeek, self).__init__(**kwargs) - self.sunday = sunday - self.monday = monday - self.tuesday = tuesday - self.wednesday = wednesday - self.thursday = thursday - self.friday = friday - self.saturday = saturday diff --git a/customSDK/servicefabric/models/chaos_schedule_job_py3.py b/customSDK/servicefabric/models/chaos_schedule_job_py3.py deleted file mode 100644 index de766ca2..00000000 --- a/customSDK/servicefabric/models/chaos_schedule_job_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosScheduleJob(Model): - """Defines a repetition rule and parameters of Chaos to be used with the Chaos - Schedule. - - :param chaos_parameters: A reference to which Chaos Parameters of the - Chaos Schedule to use. - :type chaos_parameters: str - :param days: Defines the days of the week that a Chaos Schedule Job will - run for. - :type days: ~azure.servicefabric.models.ChaosScheduleJobActiveDaysOfWeek - :param times: A list of Time Ranges that specify when during active days - that this job will run. The times are interpreted as UTC. - :type times: list[~azure.servicefabric.models.TimeRange] - """ - - _attribute_map = { - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'str'}, - 'days': {'key': 'Days', 'type': 'ChaosScheduleJobActiveDaysOfWeek'}, - 'times': {'key': 'Times', 'type': '[TimeRange]'}, - } - - def __init__(self, *, chaos_parameters: str=None, days=None, times=None, **kwargs) -> None: - super(ChaosScheduleJob, self).__init__(**kwargs) - self.chaos_parameters = chaos_parameters - self.days = days - self.times = times diff --git a/customSDK/servicefabric/models/chaos_schedule_py3.py b/customSDK/servicefabric/models/chaos_schedule_py3.py deleted file mode 100644 index 78ee2ce0..00000000 --- a/customSDK/servicefabric/models/chaos_schedule_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosSchedule(Model): - """Defines the schedule used by Chaos. - - :param start_date: The date and time Chaos will start using this schedule. - Default value: "1601-01-01T00:00:00Z" . - :type start_date: datetime - :param expiry_date: The date and time Chaos will continue to use this - schedule until. Default value: "9999-12-31T23:59:59.999Z" . - :type expiry_date: datetime - :param chaos_parameters_dictionary: A mapping of string names to Chaos - Parameters to be referenced by Chaos Schedule Jobs. - :type chaos_parameters_dictionary: - list[~azure.servicefabric.models.ChaosParametersDictionaryItem] - :param jobs: A list of all Chaos Schedule Jobs that will be automated by - the schedule. - :type jobs: list[~azure.servicefabric.models.ChaosScheduleJob] - """ - - _attribute_map = { - 'start_date': {'key': 'StartDate', 'type': 'iso-8601'}, - 'expiry_date': {'key': 'ExpiryDate', 'type': 'iso-8601'}, - 'chaos_parameters_dictionary': {'key': 'ChaosParametersDictionary', 'type': '[ChaosParametersDictionaryItem]'}, - 'jobs': {'key': 'Jobs', 'type': '[ChaosScheduleJob]'}, - } - - def __init__(self, *, start_date="1601-01-01T00:00:00Z", expiry_date="9999-12-31T23:59:59.999Z", chaos_parameters_dictionary=None, jobs=None, **kwargs) -> None: - super(ChaosSchedule, self).__init__(**kwargs) - self.start_date = start_date - self.expiry_date = expiry_date - self.chaos_parameters_dictionary = chaos_parameters_dictionary - self.jobs = jobs diff --git a/customSDK/servicefabric/models/chaos_started_event.py b/customSDK/servicefabric/models/chaos_started_event.py deleted file mode 100644 index d00971f5..00000000 --- a/customSDK/servicefabric/models/chaos_started_event.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event import ClusterEvent - - -class ChaosStartedEvent(ClusterEvent): - """Chaos Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param max_concurrent_faults: Required. Maximum number of concurrent - faults. - :type max_concurrent_faults: long - :param time_to_run_in_seconds: Required. Time to run in seconds. - :type time_to_run_in_seconds: float - :param max_cluster_stabilization_timeout_in_seconds: Required. Maximum - timeout for cluster stabilization in seconds. - :type max_cluster_stabilization_timeout_in_seconds: float - :param wait_time_between_iterations_in_seconds: Required. Wait time - between iterations in seconds. - :type wait_time_between_iterations_in_seconds: float - :param wait_time_between_faults_in_seconds: Required. Wait time between - faults in seconds. - :type wait_time_between_faults_in_seconds: float - :param move_replica_fault_enabled: Required. Indicates MoveReplica fault - is enabled. - :type move_replica_fault_enabled: bool - :param included_node_type_list: Required. List of included Node types. - :type included_node_type_list: str - :param included_application_list: Required. List of included Applications. - :type included_application_list: str - :param cluster_health_policy: Required. Health policy. - :type cluster_health_policy: str - :param chaos_context: Required. Chaos Context. - :type chaos_context: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'max_concurrent_faults': {'required': True}, - 'time_to_run_in_seconds': {'required': True}, - 'max_cluster_stabilization_timeout_in_seconds': {'required': True}, - 'wait_time_between_iterations_in_seconds': {'required': True}, - 'wait_time_between_faults_in_seconds': {'required': True}, - 'move_replica_fault_enabled': {'required': True}, - 'included_node_type_list': {'required': True}, - 'included_application_list': {'required': True}, - 'cluster_health_policy': {'required': True}, - 'chaos_context': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, - 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'float'}, - 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'float'}, - 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'float'}, - 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'float'}, - 'move_replica_fault_enabled': {'key': 'MoveReplicaFaultEnabled', 'type': 'bool'}, - 'included_node_type_list': {'key': 'IncludedNodeTypeList', 'type': 'str'}, - 'included_application_list': {'key': 'IncludedApplicationList', 'type': 'str'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'str'}, - 'chaos_context': {'key': 'ChaosContext', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ChaosStartedEvent, self).__init__(**kwargs) - self.max_concurrent_faults = kwargs.get('max_concurrent_faults', None) - self.time_to_run_in_seconds = kwargs.get('time_to_run_in_seconds', None) - self.max_cluster_stabilization_timeout_in_seconds = kwargs.get('max_cluster_stabilization_timeout_in_seconds', None) - self.wait_time_between_iterations_in_seconds = kwargs.get('wait_time_between_iterations_in_seconds', None) - self.wait_time_between_faults_in_seconds = kwargs.get('wait_time_between_faults_in_seconds', None) - self.move_replica_fault_enabled = kwargs.get('move_replica_fault_enabled', None) - self.included_node_type_list = kwargs.get('included_node_type_list', None) - self.included_application_list = kwargs.get('included_application_list', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.chaos_context = kwargs.get('chaos_context', None) - self.kind = 'ChaosStarted' diff --git a/customSDK/servicefabric/models/chaos_started_event_py3.py b/customSDK/servicefabric/models/chaos_started_event_py3.py deleted file mode 100644 index 81bb0180..00000000 --- a/customSDK/servicefabric/models/chaos_started_event_py3.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event_py3 import ClusterEvent - - -class ChaosStartedEvent(ClusterEvent): - """Chaos Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param max_concurrent_faults: Required. Maximum number of concurrent - faults. - :type max_concurrent_faults: long - :param time_to_run_in_seconds: Required. Time to run in seconds. - :type time_to_run_in_seconds: float - :param max_cluster_stabilization_timeout_in_seconds: Required. Maximum - timeout for cluster stabilization in seconds. - :type max_cluster_stabilization_timeout_in_seconds: float - :param wait_time_between_iterations_in_seconds: Required. Wait time - between iterations in seconds. - :type wait_time_between_iterations_in_seconds: float - :param wait_time_between_faults_in_seconds: Required. Wait time between - faults in seconds. - :type wait_time_between_faults_in_seconds: float - :param move_replica_fault_enabled: Required. Indicates MoveReplica fault - is enabled. - :type move_replica_fault_enabled: bool - :param included_node_type_list: Required. List of included Node types. - :type included_node_type_list: str - :param included_application_list: Required. List of included Applications. - :type included_application_list: str - :param cluster_health_policy: Required. Health policy. - :type cluster_health_policy: str - :param chaos_context: Required. Chaos Context. - :type chaos_context: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'max_concurrent_faults': {'required': True}, - 'time_to_run_in_seconds': {'required': True}, - 'max_cluster_stabilization_timeout_in_seconds': {'required': True}, - 'wait_time_between_iterations_in_seconds': {'required': True}, - 'wait_time_between_faults_in_seconds': {'required': True}, - 'move_replica_fault_enabled': {'required': True}, - 'included_node_type_list': {'required': True}, - 'included_application_list': {'required': True}, - 'cluster_health_policy': {'required': True}, - 'chaos_context': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, - 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'float'}, - 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'float'}, - 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'float'}, - 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'float'}, - 'move_replica_fault_enabled': {'key': 'MoveReplicaFaultEnabled', 'type': 'bool'}, - 'included_node_type_list': {'key': 'IncludedNodeTypeList', 'type': 'str'}, - 'included_application_list': {'key': 'IncludedApplicationList', 'type': 'str'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'str'}, - 'chaos_context': {'key': 'ChaosContext', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, max_concurrent_faults: int, time_to_run_in_seconds: float, max_cluster_stabilization_timeout_in_seconds: float, wait_time_between_iterations_in_seconds: float, wait_time_between_faults_in_seconds: float, move_replica_fault_enabled: bool, included_node_type_list: str, included_application_list: str, cluster_health_policy: str, chaos_context: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.max_concurrent_faults = max_concurrent_faults - self.time_to_run_in_seconds = time_to_run_in_seconds - self.max_cluster_stabilization_timeout_in_seconds = max_cluster_stabilization_timeout_in_seconds - self.wait_time_between_iterations_in_seconds = wait_time_between_iterations_in_seconds - self.wait_time_between_faults_in_seconds = wait_time_between_faults_in_seconds - self.move_replica_fault_enabled = move_replica_fault_enabled - self.included_node_type_list = included_node_type_list - self.included_application_list = included_application_list - self.cluster_health_policy = cluster_health_policy - self.chaos_context = chaos_context - self.kind = 'ChaosStarted' diff --git a/customSDK/servicefabric/models/chaos_stopped_event.py b/customSDK/servicefabric/models/chaos_stopped_event.py deleted file mode 100644 index 744662f5..00000000 --- a/customSDK/servicefabric/models/chaos_stopped_event.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event import ClusterEvent - - -class ChaosStoppedEvent(ClusterEvent): - """Chaos Stopped event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Required. Describes reason. - :type reason: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'reason': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ChaosStoppedEvent, self).__init__(**kwargs) - self.reason = kwargs.get('reason', None) - self.kind = 'ChaosStopped' diff --git a/customSDK/servicefabric/models/chaos_stopped_event_py3.py b/customSDK/servicefabric/models/chaos_stopped_event_py3.py deleted file mode 100644 index 70be550d..00000000 --- a/customSDK/servicefabric/models/chaos_stopped_event_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event_py3 import ClusterEvent - - -class ChaosStoppedEvent(ClusterEvent): - """Chaos Stopped event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Required. Describes reason. - :type reason: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'reason': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, reason: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ChaosStoppedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.reason = reason - self.kind = 'ChaosStopped' diff --git a/customSDK/servicefabric/models/chaos_target_filter.py b/customSDK/servicefabric/models/chaos_target_filter.py deleted file mode 100644 index 97d513b4..00000000 --- a/customSDK/servicefabric/models/chaos_target_filter.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosTargetFilter(Model): - """Defines all filters for targeted Chaos faults, for example, faulting only - certain node types or faulting only certain applications. - If ChaosTargetFilter is not used, Chaos faults all cluster entities. If - ChaosTargetFilter is used, Chaos faults only the entities that meet the - ChaosTargetFilter - specification. NodeTypeInclusionList and ApplicationInclusionList allow a - union semantics only. It is not possible to specify an intersection - of NodeTypeInclusionList and ApplicationInclusionList. For example, it is - not possible to specify "fault this application only when it is on that - node type." - Once an entity is included in either NodeTypeInclusionList or - ApplicationInclusionList, that entity cannot be excluded using - ChaosTargetFilter. Even if - applicationX does not appear in ApplicationInclusionList, in some Chaos - iteration applicationX can be faulted because it happens to be on a node of - nodeTypeY that is included - in NodeTypeInclusionList. If both NodeTypeInclusionList and - ApplicationInclusionList are null or empty, an ArgumentException is thrown. - - :param node_type_inclusion_list: A list of node types to include in Chaos - faults. - All types of faults (restart node, restart code package, remove replica, - restart replica, move primary, and move secondary) are enabled for the - nodes of these node types. - If a node type (say NodeTypeX) does not appear in the - NodeTypeInclusionList, then node level faults (like NodeRestart) will - never be enabled for the nodes of - NodeTypeX, but code package and replica faults can still be enabled for - NodeTypeX if an application in the ApplicationInclusionList. - happens to reside on a node of NodeTypeX. - At most 100 node type names can be included in this list, to increase this - number, a config upgrade is required for - MaxNumberOfNodeTypesInChaosEntityFilter configuration. - :type node_type_inclusion_list: list[str] - :param application_inclusion_list: A list of application URIs to include - in Chaos faults. - All replicas belonging to services of these applications are amenable to - replica faults (restart replica, remove replica, move primary, and move - secondary) by Chaos. - Chaos may restart a code package only if the code package hosts replicas - of these applications only. - If an application does not appear in this list, it can still be faulted in - some Chaos iteration if the application ends up on a node of a node type - that is included in NodeTypeInclusionList. - However, if applicationX is tied to nodeTypeY through placement - constraints and applicationX is absent from ApplicationInclusionList and - nodeTypeY is absent from NodeTypeInclusionList, then applicationX will - never be faulted. - At most 1000 application names can be included in this list, to increase - this number, a config upgrade is required for - MaxNumberOfApplicationsInChaosEntityFilter configuration. - :type application_inclusion_list: list[str] - """ - - _attribute_map = { - 'node_type_inclusion_list': {'key': 'NodeTypeInclusionList', 'type': '[str]'}, - 'application_inclusion_list': {'key': 'ApplicationInclusionList', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ChaosTargetFilter, self).__init__(**kwargs) - self.node_type_inclusion_list = kwargs.get('node_type_inclusion_list', None) - self.application_inclusion_list = kwargs.get('application_inclusion_list', None) diff --git a/customSDK/servicefabric/models/chaos_target_filter_py3.py b/customSDK/servicefabric/models/chaos_target_filter_py3.py deleted file mode 100644 index 7bcb2f00..00000000 --- a/customSDK/servicefabric/models/chaos_target_filter_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChaosTargetFilter(Model): - """Defines all filters for targeted Chaos faults, for example, faulting only - certain node types or faulting only certain applications. - If ChaosTargetFilter is not used, Chaos faults all cluster entities. If - ChaosTargetFilter is used, Chaos faults only the entities that meet the - ChaosTargetFilter - specification. NodeTypeInclusionList and ApplicationInclusionList allow a - union semantics only. It is not possible to specify an intersection - of NodeTypeInclusionList and ApplicationInclusionList. For example, it is - not possible to specify "fault this application only when it is on that - node type." - Once an entity is included in either NodeTypeInclusionList or - ApplicationInclusionList, that entity cannot be excluded using - ChaosTargetFilter. Even if - applicationX does not appear in ApplicationInclusionList, in some Chaos - iteration applicationX can be faulted because it happens to be on a node of - nodeTypeY that is included - in NodeTypeInclusionList. If both NodeTypeInclusionList and - ApplicationInclusionList are null or empty, an ArgumentException is thrown. - - :param node_type_inclusion_list: A list of node types to include in Chaos - faults. - All types of faults (restart node, restart code package, remove replica, - restart replica, move primary, and move secondary) are enabled for the - nodes of these node types. - If a node type (say NodeTypeX) does not appear in the - NodeTypeInclusionList, then node level faults (like NodeRestart) will - never be enabled for the nodes of - NodeTypeX, but code package and replica faults can still be enabled for - NodeTypeX if an application in the ApplicationInclusionList. - happens to reside on a node of NodeTypeX. - At most 100 node type names can be included in this list, to increase this - number, a config upgrade is required for - MaxNumberOfNodeTypesInChaosEntityFilter configuration. - :type node_type_inclusion_list: list[str] - :param application_inclusion_list: A list of application URIs to include - in Chaos faults. - All replicas belonging to services of these applications are amenable to - replica faults (restart replica, remove replica, move primary, and move - secondary) by Chaos. - Chaos may restart a code package only if the code package hosts replicas - of these applications only. - If an application does not appear in this list, it can still be faulted in - some Chaos iteration if the application ends up on a node of a node type - that is included in NodeTypeInclusionList. - However, if applicationX is tied to nodeTypeY through placement - constraints and applicationX is absent from ApplicationInclusionList and - nodeTypeY is absent from NodeTypeInclusionList, then applicationX will - never be faulted. - At most 1000 application names can be included in this list, to increase - this number, a config upgrade is required for - MaxNumberOfApplicationsInChaosEntityFilter configuration. - :type application_inclusion_list: list[str] - """ - - _attribute_map = { - 'node_type_inclusion_list': {'key': 'NodeTypeInclusionList', 'type': '[str]'}, - 'application_inclusion_list': {'key': 'ApplicationInclusionList', 'type': '[str]'}, - } - - def __init__(self, *, node_type_inclusion_list=None, application_inclusion_list=None, **kwargs) -> None: - super(ChaosTargetFilter, self).__init__(**kwargs) - self.node_type_inclusion_list = node_type_inclusion_list - self.application_inclusion_list = application_inclusion_list diff --git a/customSDK/servicefabric/models/check_exists_property_batch_operation.py b/customSDK/servicefabric/models/check_exists_property_batch_operation.py deleted file mode 100644 index 14ec2d90..00000000 --- a/customSDK/servicefabric/models/check_exists_property_batch_operation.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_batch_operation import PropertyBatchOperation - - -class CheckExistsPropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that compares the Boolean existence of - a property with the Exists argument. - The PropertyBatchOperation operation fails if the property's existence is - not equal to the Exists argument. - The CheckExistsPropertyBatchOperation is generally used as a precondition - for the write operations in the batch. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param exists: Required. Whether or not the property should exist for the - operation to pass. - :type exists: bool - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'exists': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'exists': {'key': 'Exists', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(CheckExistsPropertyBatchOperation, self).__init__(**kwargs) - self.exists = kwargs.get('exists', None) - self.kind = 'CheckExists' diff --git a/customSDK/servicefabric/models/check_exists_property_batch_operation_py3.py b/customSDK/servicefabric/models/check_exists_property_batch_operation_py3.py deleted file mode 100644 index 2bb27c8e..00000000 --- a/customSDK/servicefabric/models/check_exists_property_batch_operation_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_batch_operation_py3 import PropertyBatchOperation - - -class CheckExistsPropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that compares the Boolean existence of - a property with the Exists argument. - The PropertyBatchOperation operation fails if the property's existence is - not equal to the Exists argument. - The CheckExistsPropertyBatchOperation is generally used as a precondition - for the write operations in the batch. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param exists: Required. Whether or not the property should exist for the - operation to pass. - :type exists: bool - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'exists': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'exists': {'key': 'Exists', 'type': 'bool'}, - } - - def __init__(self, *, property_name: str, exists: bool, **kwargs) -> None: - super(CheckExistsPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.exists = exists - self.kind = 'CheckExists' diff --git a/customSDK/servicefabric/models/check_sequence_property_batch_operation.py b/customSDK/servicefabric/models/check_sequence_property_batch_operation.py deleted file mode 100644 index 306b3ae6..00000000 --- a/customSDK/servicefabric/models/check_sequence_property_batch_operation.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_batch_operation import PropertyBatchOperation - - -class CheckSequencePropertyBatchOperation(PropertyBatchOperation): - """Compares the Sequence Number of a property with the SequenceNumber - argument. - A property's sequence number can be thought of as that property's version. - Every time the property is modified, its sequence number is increased. - The sequence number can be found in a property's metadata. - The comparison fails if the sequence numbers are not equal. - CheckSequencePropertyBatchOperation is generally used as a precondition for - the write operations in the batch. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param sequence_number: Required. The expected sequence number. - :type sequence_number: str - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'sequence_number': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CheckSequencePropertyBatchOperation, self).__init__(**kwargs) - self.sequence_number = kwargs.get('sequence_number', None) - self.kind = 'CheckSequence' diff --git a/customSDK/servicefabric/models/check_sequence_property_batch_operation_py3.py b/customSDK/servicefabric/models/check_sequence_property_batch_operation_py3.py deleted file mode 100644 index 7dabd0f8..00000000 --- a/customSDK/servicefabric/models/check_sequence_property_batch_operation_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_batch_operation_py3 import PropertyBatchOperation - - -class CheckSequencePropertyBatchOperation(PropertyBatchOperation): - """Compares the Sequence Number of a property with the SequenceNumber - argument. - A property's sequence number can be thought of as that property's version. - Every time the property is modified, its sequence number is increased. - The sequence number can be found in a property's metadata. - The comparison fails if the sequence numbers are not equal. - CheckSequencePropertyBatchOperation is generally used as a precondition for - the write operations in the batch. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param sequence_number: Required. The expected sequence number. - :type sequence_number: str - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'sequence_number': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - } - - def __init__(self, *, property_name: str, sequence_number: str, **kwargs) -> None: - super(CheckSequencePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.sequence_number = sequence_number - self.kind = 'CheckSequence' diff --git a/customSDK/servicefabric/models/check_value_property_batch_operation.py b/customSDK/servicefabric/models/check_value_property_batch_operation.py deleted file mode 100644 index e1b8a3b9..00000000 --- a/customSDK/servicefabric/models/check_value_property_batch_operation.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_batch_operation import PropertyBatchOperation - - -class CheckValuePropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that compares the value of the property - with the expected value. - The CheckValuePropertyBatchOperation is generally used as a precondition - for the write operations in the batch. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param value: Required. The expected property value. - :type value: ~azure.servicefabric.models.PropertyValue - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - } - - def __init__(self, **kwargs): - super(CheckValuePropertyBatchOperation, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.kind = 'CheckValue' diff --git a/customSDK/servicefabric/models/check_value_property_batch_operation_py3.py b/customSDK/servicefabric/models/check_value_property_batch_operation_py3.py deleted file mode 100644 index 8af0c8bf..00000000 --- a/customSDK/servicefabric/models/check_value_property_batch_operation_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_batch_operation_py3 import PropertyBatchOperation - - -class CheckValuePropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that compares the value of the property - with the expected value. - The CheckValuePropertyBatchOperation is generally used as a precondition - for the write operations in the batch. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param value: Required. The expected property value. - :type value: ~azure.servicefabric.models.PropertyValue - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - } - - def __init__(self, *, property_name: str, value, **kwargs) -> None: - super(CheckValuePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.value = value - self.kind = 'CheckValue' diff --git a/customSDK/servicefabric/models/cluster_configuration.py b/customSDK/servicefabric/models/cluster_configuration.py deleted file mode 100644 index a888b4fe..00000000 --- a/customSDK/servicefabric/models/cluster_configuration.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterConfiguration(Model): - """Information about the standalone cluster configuration. - - :param cluster_configuration: The contents of the cluster configuration - file. - :type cluster_configuration: str - """ - - _attribute_map = { - 'cluster_configuration': {'key': 'ClusterConfiguration', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ClusterConfiguration, self).__init__(**kwargs) - self.cluster_configuration = kwargs.get('cluster_configuration', None) diff --git a/customSDK/servicefabric/models/cluster_configuration_py3.py b/customSDK/servicefabric/models/cluster_configuration_py3.py deleted file mode 100644 index 5d6f4090..00000000 --- a/customSDK/servicefabric/models/cluster_configuration_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterConfiguration(Model): - """Information about the standalone cluster configuration. - - :param cluster_configuration: The contents of the cluster configuration - file. - :type cluster_configuration: str - """ - - _attribute_map = { - 'cluster_configuration': {'key': 'ClusterConfiguration', 'type': 'str'}, - } - - def __init__(self, *, cluster_configuration: str=None, **kwargs) -> None: - super(ClusterConfiguration, self).__init__(**kwargs) - self.cluster_configuration = cluster_configuration diff --git a/customSDK/servicefabric/models/cluster_configuration_upgrade_description.py b/customSDK/servicefabric/models/cluster_configuration_upgrade_description.py deleted file mode 100644 index 699c387f..00000000 --- a/customSDK/servicefabric/models/cluster_configuration_upgrade_description.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterConfigurationUpgradeDescription(Model): - """Describes the parameters for a standalone cluster configuration upgrade. - - All required parameters must be populated in order to send to Azure. - - :param cluster_config: Required. The cluster configuration as a JSON - string. For example, [this - file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) - contains JSON describing the [nodes and other properties of the - cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). - :type cluster_config: str - :param health_check_retry_timeout: The length of time between attempts to - perform health checks if the application or cluster is not healthy. - Default value: "PT0H0M0S" . - :type health_check_retry_timeout: timedelta - :param health_check_wait_duration_in_seconds: The length of time to wait - after completing an upgrade domain before starting the health checks - process. Default value: "PT0H0M0S" . - :type health_check_wait_duration_in_seconds: timedelta - :param health_check_stable_duration_in_seconds: The length of time that - the application or cluster must remain healthy before the upgrade proceeds - to the next upgrade domain. Default value: "PT0H0M0S" . - :type health_check_stable_duration_in_seconds: timedelta - :param upgrade_domain_timeout_in_seconds: The timeout for the upgrade - domain. Default value: "PT0H0M0S" . - :type upgrade_domain_timeout_in_seconds: timedelta - :param upgrade_timeout_in_seconds: The upgrade timeout. Default value: - "PT0H0M0S" . - :type upgrade_timeout_in_seconds: timedelta - :param max_percent_unhealthy_applications: The maximum allowed percentage - of unhealthy applications during the upgrade. Allowed values are integer - values from zero to 100. Default value: 0 . - :type max_percent_unhealthy_applications: int - :param max_percent_unhealthy_nodes: The maximum allowed percentage of - unhealthy nodes during the upgrade. Allowed values are integer values from - zero to 100. Default value: 0 . - :type max_percent_unhealthy_nodes: int - :param max_percent_delta_unhealthy_nodes: The maximum allowed percentage - of delta health degradation during the upgrade. Allowed values are integer - values from zero to 100. Default value: 0 . - :type max_percent_delta_unhealthy_nodes: int - :param max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum - allowed percentage of upgrade domain delta health degradation during the - upgrade. Allowed values are integer values from zero to 100. Default - value: 0 . - :type max_percent_upgrade_domain_delta_unhealthy_nodes: int - :param application_health_policies: Defines the application health policy - map used to evaluate the health of an application or one of its children - entities. - :type application_health_policies: - ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _validation = { - 'cluster_config': {'required': True}, - } - - _attribute_map = { - 'cluster_config': {'key': 'ClusterConfig', 'type': 'str'}, - 'health_check_retry_timeout': {'key': 'HealthCheckRetryTimeout', 'type': 'duration'}, - 'health_check_wait_duration_in_seconds': {'key': 'HealthCheckWaitDurationInSeconds', 'type': 'duration'}, - 'health_check_stable_duration_in_seconds': {'key': 'HealthCheckStableDurationInSeconds', 'type': 'duration'}, - 'upgrade_domain_timeout_in_seconds': {'key': 'UpgradeDomainTimeoutInSeconds', 'type': 'duration'}, - 'upgrade_timeout_in_seconds': {'key': 'UpgradeTimeoutInSeconds', 'type': 'duration'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, - 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__(self, **kwargs): - super(ClusterConfigurationUpgradeDescription, self).__init__(**kwargs) - self.cluster_config = kwargs.get('cluster_config', None) - self.health_check_retry_timeout = kwargs.get('health_check_retry_timeout', "PT0H0M0S") - self.health_check_wait_duration_in_seconds = kwargs.get('health_check_wait_duration_in_seconds', "PT0H0M0S") - self.health_check_stable_duration_in_seconds = kwargs.get('health_check_stable_duration_in_seconds', "PT0H0M0S") - self.upgrade_domain_timeout_in_seconds = kwargs.get('upgrade_domain_timeout_in_seconds', "PT0H0M0S") - self.upgrade_timeout_in_seconds = kwargs.get('upgrade_timeout_in_seconds', "PT0H0M0S") - self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', 0) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', 0) - self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', 0) - self.max_percent_upgrade_domain_delta_unhealthy_nodes = kwargs.get('max_percent_upgrade_domain_delta_unhealthy_nodes', 0) - self.application_health_policies = kwargs.get('application_health_policies', None) diff --git a/customSDK/servicefabric/models/cluster_configuration_upgrade_description_py3.py b/customSDK/servicefabric/models/cluster_configuration_upgrade_description_py3.py deleted file mode 100644 index 856bd470..00000000 --- a/customSDK/servicefabric/models/cluster_configuration_upgrade_description_py3.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterConfigurationUpgradeDescription(Model): - """Describes the parameters for a standalone cluster configuration upgrade. - - All required parameters must be populated in order to send to Azure. - - :param cluster_config: Required. The cluster configuration as a JSON - string. For example, [this - file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) - contains JSON describing the [nodes and other properties of the - cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). - :type cluster_config: str - :param health_check_retry_timeout: The length of time between attempts to - perform health checks if the application or cluster is not healthy. - Default value: "PT0H0M0S" . - :type health_check_retry_timeout: timedelta - :param health_check_wait_duration_in_seconds: The length of time to wait - after completing an upgrade domain before starting the health checks - process. Default value: "PT0H0M0S" . - :type health_check_wait_duration_in_seconds: timedelta - :param health_check_stable_duration_in_seconds: The length of time that - the application or cluster must remain healthy before the upgrade proceeds - to the next upgrade domain. Default value: "PT0H0M0S" . - :type health_check_stable_duration_in_seconds: timedelta - :param upgrade_domain_timeout_in_seconds: The timeout for the upgrade - domain. Default value: "PT0H0M0S" . - :type upgrade_domain_timeout_in_seconds: timedelta - :param upgrade_timeout_in_seconds: The upgrade timeout. Default value: - "PT0H0M0S" . - :type upgrade_timeout_in_seconds: timedelta - :param max_percent_unhealthy_applications: The maximum allowed percentage - of unhealthy applications during the upgrade. Allowed values are integer - values from zero to 100. Default value: 0 . - :type max_percent_unhealthy_applications: int - :param max_percent_unhealthy_nodes: The maximum allowed percentage of - unhealthy nodes during the upgrade. Allowed values are integer values from - zero to 100. Default value: 0 . - :type max_percent_unhealthy_nodes: int - :param max_percent_delta_unhealthy_nodes: The maximum allowed percentage - of delta health degradation during the upgrade. Allowed values are integer - values from zero to 100. Default value: 0 . - :type max_percent_delta_unhealthy_nodes: int - :param max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum - allowed percentage of upgrade domain delta health degradation during the - upgrade. Allowed values are integer values from zero to 100. Default - value: 0 . - :type max_percent_upgrade_domain_delta_unhealthy_nodes: int - :param application_health_policies: Defines the application health policy - map used to evaluate the health of an application or one of its children - entities. - :type application_health_policies: - ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _validation = { - 'cluster_config': {'required': True}, - } - - _attribute_map = { - 'cluster_config': {'key': 'ClusterConfig', 'type': 'str'}, - 'health_check_retry_timeout': {'key': 'HealthCheckRetryTimeout', 'type': 'duration'}, - 'health_check_wait_duration_in_seconds': {'key': 'HealthCheckWaitDurationInSeconds', 'type': 'duration'}, - 'health_check_stable_duration_in_seconds': {'key': 'HealthCheckStableDurationInSeconds', 'type': 'duration'}, - 'upgrade_domain_timeout_in_seconds': {'key': 'UpgradeDomainTimeoutInSeconds', 'type': 'duration'}, - 'upgrade_timeout_in_seconds': {'key': 'UpgradeTimeoutInSeconds', 'type': 'duration'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, - 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__(self, *, cluster_config: str, health_check_retry_timeout="PT0H0M0S", health_check_wait_duration_in_seconds="PT0H0M0S", health_check_stable_duration_in_seconds="PT0H0M0S", upgrade_domain_timeout_in_seconds="PT0H0M0S", upgrade_timeout_in_seconds="PT0H0M0S", max_percent_unhealthy_applications: int=0, max_percent_unhealthy_nodes: int=0, max_percent_delta_unhealthy_nodes: int=0, max_percent_upgrade_domain_delta_unhealthy_nodes: int=0, application_health_policies=None, **kwargs) -> None: - super(ClusterConfigurationUpgradeDescription, self).__init__(**kwargs) - self.cluster_config = cluster_config - self.health_check_retry_timeout = health_check_retry_timeout - self.health_check_wait_duration_in_seconds = health_check_wait_duration_in_seconds - self.health_check_stable_duration_in_seconds = health_check_stable_duration_in_seconds - self.upgrade_domain_timeout_in_seconds = upgrade_domain_timeout_in_seconds - self.upgrade_timeout_in_seconds = upgrade_timeout_in_seconds - self.max_percent_unhealthy_applications = max_percent_unhealthy_applications - self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes - self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes - self.max_percent_upgrade_domain_delta_unhealthy_nodes = max_percent_upgrade_domain_delta_unhealthy_nodes - self.application_health_policies = application_health_policies diff --git a/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info.py b/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info.py deleted file mode 100644 index b48531bf..00000000 --- a/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterConfigurationUpgradeStatusInfo(Model): - """Information about a standalone cluster configuration upgrade status. - - :param upgrade_state: The state of the upgrade domain. Possible values - include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', - 'RollingForwardPending', 'RollingForwardInProgress', - 'RollingForwardCompleted', 'Failed' - :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :param progress_status: The cluster manifest version. - :type progress_status: int - :param config_version: The cluster configuration version. - :type config_version: str - :param details: The cluster upgrade status details. - :type details: str - """ - - _attribute_map = { - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'progress_status': {'key': 'ProgressStatus', 'type': 'int'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'details': {'key': 'Details', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ClusterConfigurationUpgradeStatusInfo, self).__init__(**kwargs) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.progress_status = kwargs.get('progress_status', None) - self.config_version = kwargs.get('config_version', None) - self.details = kwargs.get('details', None) diff --git a/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info_py3.py b/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info_py3.py deleted file mode 100644 index d1362bed..00000000 --- a/customSDK/servicefabric/models/cluster_configuration_upgrade_status_info_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterConfigurationUpgradeStatusInfo(Model): - """Information about a standalone cluster configuration upgrade status. - - :param upgrade_state: The state of the upgrade domain. Possible values - include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', - 'RollingForwardPending', 'RollingForwardInProgress', - 'RollingForwardCompleted', 'Failed' - :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :param progress_status: The cluster manifest version. - :type progress_status: int - :param config_version: The cluster configuration version. - :type config_version: str - :param details: The cluster upgrade status details. - :type details: str - """ - - _attribute_map = { - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'progress_status': {'key': 'ProgressStatus', 'type': 'int'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'details': {'key': 'Details', 'type': 'str'}, - } - - def __init__(self, *, upgrade_state=None, progress_status: int=None, config_version: str=None, details: str=None, **kwargs) -> None: - super(ClusterConfigurationUpgradeStatusInfo, self).__init__(**kwargs) - self.upgrade_state = upgrade_state - self.progress_status = progress_status - self.config_version = config_version - self.details = details diff --git a/customSDK/servicefabric/models/cluster_event.py b/customSDK/servicefabric/models/cluster_event.py deleted file mode 100644 index d4822d34..00000000 --- a/customSDK/servicefabric/models/cluster_event.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .fabric_event import FabricEvent - - -class ClusterEvent(FabricEvent): - """Represents the base for all Cluster Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ClusterNewHealthReportEvent, - ClusterHealthReportExpiredEvent, ClusterUpgradeCompletedEvent, - ClusterUpgradeDomainCompletedEvent, ClusterUpgradeRollbackCompletedEvent, - ClusterUpgradeRollbackStartedEvent, ClusterUpgradeStartedEvent, - ChaosStoppedEvent, ChaosStartedEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ClusterNewHealthReport': 'ClusterNewHealthReportEvent', 'ClusterHealthReportExpired': 'ClusterHealthReportExpiredEvent', 'ClusterUpgradeCompleted': 'ClusterUpgradeCompletedEvent', 'ClusterUpgradeDomainCompleted': 'ClusterUpgradeDomainCompletedEvent', 'ClusterUpgradeRollbackCompleted': 'ClusterUpgradeRollbackCompletedEvent', 'ClusterUpgradeRollbackStarted': 'ClusterUpgradeRollbackStartedEvent', 'ClusterUpgradeStarted': 'ClusterUpgradeStartedEvent', 'ChaosStopped': 'ChaosStoppedEvent', 'ChaosStarted': 'ChaosStartedEvent'} - } - - def __init__(self, **kwargs): - super(ClusterEvent, self).__init__(**kwargs) - self.kind = 'ClusterEvent' diff --git a/customSDK/servicefabric/models/cluster_event_py3.py b/customSDK/servicefabric/models/cluster_event_py3.py deleted file mode 100644 index 04613f0d..00000000 --- a/customSDK/servicefabric/models/cluster_event_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .fabric_event_py3 import FabricEvent - - -class ClusterEvent(FabricEvent): - """Represents the base for all Cluster Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ClusterNewHealthReportEvent, - ClusterHealthReportExpiredEvent, ClusterUpgradeCompletedEvent, - ClusterUpgradeDomainCompletedEvent, ClusterUpgradeRollbackCompletedEvent, - ClusterUpgradeRollbackStartedEvent, ClusterUpgradeStartedEvent, - ChaosStoppedEvent, ChaosStartedEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ClusterNewHealthReport': 'ClusterNewHealthReportEvent', 'ClusterHealthReportExpired': 'ClusterHealthReportExpiredEvent', 'ClusterUpgradeCompleted': 'ClusterUpgradeCompletedEvent', 'ClusterUpgradeDomainCompleted': 'ClusterUpgradeDomainCompletedEvent', 'ClusterUpgradeRollbackCompleted': 'ClusterUpgradeRollbackCompletedEvent', 'ClusterUpgradeRollbackStarted': 'ClusterUpgradeRollbackStartedEvent', 'ClusterUpgradeStarted': 'ClusterUpgradeStartedEvent', 'ChaosStopped': 'ChaosStoppedEvent', 'ChaosStarted': 'ChaosStartedEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ClusterEvent' diff --git a/customSDK/servicefabric/models/cluster_health.py b/customSDK/servicefabric/models/cluster_health.py deleted file mode 100644 index 5185f731..00000000 --- a/customSDK/servicefabric/models/cluster_health.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health import EntityHealth - - -class ClusterHealth(EntityHealth): - """Represents the health of the cluster. - Contains the cluster aggregated health state, the cluster application and - node health states as well as the health events and the unhealthy - evaluations. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param node_health_states: Cluster node health states as found in the - health store. - :type node_health_states: - list[~azure.servicefabric.models.NodeHealthState] - :param application_health_states: Cluster application health states as - found in the health store. - :type application_health_states: - list[~azure.servicefabric.models.ApplicationHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'node_health_states': {'key': 'NodeHealthStates', 'type': '[NodeHealthState]'}, - 'application_health_states': {'key': 'ApplicationHealthStates', 'type': '[ApplicationHealthState]'}, - } - - def __init__(self, **kwargs): - super(ClusterHealth, self).__init__(**kwargs) - self.node_health_states = kwargs.get('node_health_states', None) - self.application_health_states = kwargs.get('application_health_states', None) diff --git a/customSDK/servicefabric/models/cluster_health_chunk.py b/customSDK/servicefabric/models/cluster_health_chunk.py deleted file mode 100644 index aa70ceef..00000000 --- a/customSDK/servicefabric/models/cluster_health_chunk.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterHealthChunk(Model): - """Represents the health chunk of the cluster. - Contains the cluster aggregated health state, and the cluster entities that - respect the input filter. - - :param health_state: The HealthState representing the aggregated health - state of the cluster computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired cluster health policy and - the application health policies. Possible values include: 'Invalid', 'Ok', - 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_health_state_chunks: The list of node health state chunks in - the cluster that respect the filters in the cluster health chunk query - description. - :type node_health_state_chunks: - ~azure.servicefabric.models.NodeHealthStateChunkList - :param application_health_state_chunks: The list of application health - state chunks in the cluster that respect the filters in the cluster health - chunk query description. - :type application_health_state_chunks: - ~azure.servicefabric.models.ApplicationHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_health_state_chunks': {'key': 'NodeHealthStateChunks', 'type': 'NodeHealthStateChunkList'}, - 'application_health_state_chunks': {'key': 'ApplicationHealthStateChunks', 'type': 'ApplicationHealthStateChunkList'}, - } - - def __init__(self, **kwargs): - super(ClusterHealthChunk, self).__init__(**kwargs) - self.health_state = kwargs.get('health_state', None) - self.node_health_state_chunks = kwargs.get('node_health_state_chunks', None) - self.application_health_state_chunks = kwargs.get('application_health_state_chunks', None) diff --git a/customSDK/servicefabric/models/cluster_health_chunk_py3.py b/customSDK/servicefabric/models/cluster_health_chunk_py3.py deleted file mode 100644 index 549375a2..00000000 --- a/customSDK/servicefabric/models/cluster_health_chunk_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterHealthChunk(Model): - """Represents the health chunk of the cluster. - Contains the cluster aggregated health state, and the cluster entities that - respect the input filter. - - :param health_state: The HealthState representing the aggregated health - state of the cluster computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired cluster health policy and - the application health policies. Possible values include: 'Invalid', 'Ok', - 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_health_state_chunks: The list of node health state chunks in - the cluster that respect the filters in the cluster health chunk query - description. - :type node_health_state_chunks: - ~azure.servicefabric.models.NodeHealthStateChunkList - :param application_health_state_chunks: The list of application health - state chunks in the cluster that respect the filters in the cluster health - chunk query description. - :type application_health_state_chunks: - ~azure.servicefabric.models.ApplicationHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_health_state_chunks': {'key': 'NodeHealthStateChunks', 'type': 'NodeHealthStateChunkList'}, - 'application_health_state_chunks': {'key': 'ApplicationHealthStateChunks', 'type': 'ApplicationHealthStateChunkList'}, - } - - def __init__(self, *, health_state=None, node_health_state_chunks=None, application_health_state_chunks=None, **kwargs) -> None: - super(ClusterHealthChunk, self).__init__(**kwargs) - self.health_state = health_state - self.node_health_state_chunks = node_health_state_chunks - self.application_health_state_chunks = application_health_state_chunks diff --git a/customSDK/servicefabric/models/cluster_health_chunk_query_description.py b/customSDK/servicefabric/models/cluster_health_chunk_query_description.py deleted file mode 100644 index 324ec7ab..00000000 --- a/customSDK/servicefabric/models/cluster_health_chunk_query_description.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterHealthChunkQueryDescription(Model): - """The cluster health chunk query description, which can specify the health - policies to evaluate cluster health and very expressive filters to select - which cluster entities to include in response. - - :param node_filters: Defines a list of filters that specify which nodes to - be included in the returned cluster health chunk. - If no filters are specified, no nodes are returned. All the nodes are used - to evaluate the cluster's aggregated health state, regardless of the input - filters. - The cluster health chunk query may specify multiple node filters. - For example, it can specify a filter to return all nodes with health state - Error and another filter to always include a node identified by its - NodeName. - :type node_filters: - list[~azure.servicefabric.models.NodeHealthStateFilter] - :param application_filters: Defines a list of filters that specify which - applications to be included in the returned cluster health chunk. - If no filters are specified, no applications are returned. All the - applications are used to evaluate the cluster's aggregated health state, - regardless of the input filters. - The cluster health chunk query may specify multiple application filters. - For example, it can specify a filter to return all applications with - health state Error and another filter to always include applications of a - specified application type. - :type application_filters: - list[~azure.servicefabric.models.ApplicationHealthStateFilter] - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param application_health_policies: Defines the application health policy - map used to evaluate the health of an application or one of its children - entities. - :type application_health_policies: - ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _attribute_map = { - 'node_filters': {'key': 'NodeFilters', 'type': '[NodeHealthStateFilter]'}, - 'application_filters': {'key': 'ApplicationFilters', 'type': '[ApplicationHealthStateFilter]'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__(self, **kwargs): - super(ClusterHealthChunkQueryDescription, self).__init__(**kwargs) - self.node_filters = kwargs.get('node_filters', None) - self.application_filters = kwargs.get('application_filters', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.application_health_policies = kwargs.get('application_health_policies', None) diff --git a/customSDK/servicefabric/models/cluster_health_chunk_query_description_py3.py b/customSDK/servicefabric/models/cluster_health_chunk_query_description_py3.py deleted file mode 100644 index 5b55a1e3..00000000 --- a/customSDK/servicefabric/models/cluster_health_chunk_query_description_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterHealthChunkQueryDescription(Model): - """The cluster health chunk query description, which can specify the health - policies to evaluate cluster health and very expressive filters to select - which cluster entities to include in response. - - :param node_filters: Defines a list of filters that specify which nodes to - be included in the returned cluster health chunk. - If no filters are specified, no nodes are returned. All the nodes are used - to evaluate the cluster's aggregated health state, regardless of the input - filters. - The cluster health chunk query may specify multiple node filters. - For example, it can specify a filter to return all nodes with health state - Error and another filter to always include a node identified by its - NodeName. - :type node_filters: - list[~azure.servicefabric.models.NodeHealthStateFilter] - :param application_filters: Defines a list of filters that specify which - applications to be included in the returned cluster health chunk. - If no filters are specified, no applications are returned. All the - applications are used to evaluate the cluster's aggregated health state, - regardless of the input filters. - The cluster health chunk query may specify multiple application filters. - For example, it can specify a filter to return all applications with - health state Error and another filter to always include applications of a - specified application type. - :type application_filters: - list[~azure.servicefabric.models.ApplicationHealthStateFilter] - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param application_health_policies: Defines the application health policy - map used to evaluate the health of an application or one of its children - entities. - :type application_health_policies: - ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _attribute_map = { - 'node_filters': {'key': 'NodeFilters', 'type': '[NodeHealthStateFilter]'}, - 'application_filters': {'key': 'ApplicationFilters', 'type': '[ApplicationHealthStateFilter]'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__(self, *, node_filters=None, application_filters=None, cluster_health_policy=None, application_health_policies=None, **kwargs) -> None: - super(ClusterHealthChunkQueryDescription, self).__init__(**kwargs) - self.node_filters = node_filters - self.application_filters = application_filters - self.cluster_health_policy = cluster_health_policy - self.application_health_policies = application_health_policies diff --git a/customSDK/servicefabric/models/cluster_health_policies.py b/customSDK/servicefabric/models/cluster_health_policies.py deleted file mode 100644 index ff937553..00000000 --- a/customSDK/servicefabric/models/cluster_health_policies.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterHealthPolicies(Model): - """Health policies to evaluate cluster health. - - :param application_health_policy_map: Defines a map that contains specific - application health policies for different applications. - Each entry specifies as key the application name and as value an - ApplicationHealthPolicy used to evaluate the application health. - If an application is not specified in the map, the application health - evaluation uses the ApplicationHealthPolicy found in its application - manifest or the default application health policy (if no health policy is - defined in the manifest). - The map is empty by default. - :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - } - - def __init__(self, **kwargs): - super(ClusterHealthPolicies, self).__init__(**kwargs) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) diff --git a/customSDK/servicefabric/models/cluster_health_policies_py3.py b/customSDK/servicefabric/models/cluster_health_policies_py3.py deleted file mode 100644 index 3434de28..00000000 --- a/customSDK/servicefabric/models/cluster_health_policies_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterHealthPolicies(Model): - """Health policies to evaluate cluster health. - - :param application_health_policy_map: Defines a map that contains specific - application health policies for different applications. - Each entry specifies as key the application name and as value an - ApplicationHealthPolicy used to evaluate the application health. - If an application is not specified in the map, the application health - evaluation uses the ApplicationHealthPolicy found in its application - manifest or the default application health policy (if no health policy is - defined in the manifest). - The map is empty by default. - :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - } - - def __init__(self, *, application_health_policy_map=None, cluster_health_policy=None, **kwargs) -> None: - super(ClusterHealthPolicies, self).__init__(**kwargs) - self.application_health_policy_map = application_health_policy_map - self.cluster_health_policy = cluster_health_policy diff --git a/customSDK/servicefabric/models/cluster_health_policy.py b/customSDK/servicefabric/models/cluster_health_policy.py deleted file mode 100644 index f7adcf00..00000000 --- a/customSDK/servicefabric/models/cluster_health_policy.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterHealthPolicy(Model): - """Defines a health policy used to evaluate the health of the cluster or of a - cluster node. - - :param consider_warning_as_error: Indicates whether warnings are treated - with the same severity as errors. Default value: False . - :type consider_warning_as_error: bool - :param max_percent_unhealthy_nodes: The maximum allowed percentage of - unhealthy nodes before reporting an error. For example, to allow 10% of - nodes to be unhealthy, this value would be 10. - The percentage represents the maximum tolerated percentage of nodes that - can be unhealthy before the cluster is considered in error. - If the percentage is respected but there is at least one unhealthy node, - the health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy nodes - over the total number of nodes in the cluster. - The computation rounds up to tolerate one failure on small numbers of - nodes. Default percentage is zero. - In large clusters, some nodes will always be down or out for repairs, so - this percentage should be configured to tolerate that. Default value: 0 . - :type max_percent_unhealthy_nodes: int - :param max_percent_unhealthy_applications: The maximum allowed percentage - of unhealthy applications before reporting an error. For example, to allow - 10% of applications to be unhealthy, this value would be 10. - The percentage represents the maximum tolerated percentage of applications - that can be unhealthy before the cluster is considered in error. - If the percentage is respected but there is at least one unhealthy - application, the health is evaluated as Warning. - This is calculated by dividing the number of unhealthy applications over - the total number of application instances in the cluster, excluding - applications of application types that are included in the - ApplicationTypeHealthPolicyMap. - The computation rounds up to tolerate one failure on small numbers of - applications. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_applications: int - :param application_type_health_policy_map: Defines a map with max - percentage unhealthy applications for specific application types. - Each entry specifies as key the application type name and as value an - integer that represents the MaxPercentUnhealthyApplications percentage - used to evaluate the applications of the specified application type. - The application type health policy map can be used during cluster health - evaluation to describe special application types. - The application types included in the map are evaluated against the - percentage specified in the map, and not with the global - MaxPercentUnhealthyApplications defined in the cluster health policy. - The applications of application types specified in the map are not counted - against the global pool of applications. - For example, if some applications of a type are critical, the cluster - administrator can add an entry to the map for that application type - and assign it a value of 0% (that is, do not tolerate any failures). - All other applications can be evaluated with - MaxPercentUnhealthyApplications set to 20% to tolerate some failures out - of the thousands of application instances. - The application type health policy map is used only if the cluster - manifest enables application type health evaluation using the - configuration entry for - HealthManager/EnableApplicationTypeHealthEvaluation. - :type application_type_health_policy_map: - list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] - :param node_type_health_policy_map: Defines a map with max percentage - unhealthy nodes for specific node types. - Each entry specifies as key the node type name and as value an integer - that represents the MaxPercentUnhealthyNodes percentage used to evaluate - the nodes of the specified node type. - The node type health policy map can be used during cluster health - evaluation to describe special node types. - They are evaluated against the percentages associated with their node type - name in the map. - Setting this has no impact on the global pool of nodes used for - MaxPercentUnhealthyNodes. - The node type health policy map is used only if the cluster manifest - enables node type health evaluation using the configuration entry for - HealthManager/EnableNodeTypeHealthEvaluation. - For example, given a cluster with many nodes of different types, with - important work hosted on node type "SpecialNodeType" that should not - tolerate any nodes down. - You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some - failures for all nodes, but for the node type "SpecialNodeType", set the - MaxPercentUnhealthyNodes to 0 by - setting the value in the key value pair in NodeTypeHealthPolicyMapItem. - The key is the node type name. - This way, as long as no nodes of type "SpecialNodeType" are in Error - state, - even if some of the many nodes in the global pool are in Error state, but - below the global unhealthy percentage, the cluster would be evaluated to - Warning. - A Warning health state does not impact cluster upgrade or other monitoring - triggered by Error health state. - But even one node of type SpecialNodeType in Error would make cluster - unhealthy (in Error rather than Warning/Ok), which triggers rollback or - pauses the cluster upgrade, depending on the upgrade configuration. - Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting - SpecialNodeType's max percent unhealthy nodes to 100, - with one node of type SpecialNodeType in Error state would still put the - cluster in an Error state, since the global restriction is more strict in - this case. - :type node_type_health_policy_map: - list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] - """ - - _attribute_map = { - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'application_type_health_policy_map': {'key': 'ApplicationTypeHealthPolicyMap', 'type': '[ApplicationTypeHealthPolicyMapItem]'}, - 'node_type_health_policy_map': {'key': 'NodeTypeHealthPolicyMap', 'type': '[NodeTypeHealthPolicyMapItem]'}, - } - - def __init__(self, **kwargs): - super(ClusterHealthPolicy, self).__init__(**kwargs) - self.consider_warning_as_error = kwargs.get('consider_warning_as_error', False) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', 0) - self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', 0) - self.application_type_health_policy_map = kwargs.get('application_type_health_policy_map', None) - self.node_type_health_policy_map = kwargs.get('node_type_health_policy_map', None) diff --git a/customSDK/servicefabric/models/cluster_health_policy_py3.py b/customSDK/servicefabric/models/cluster_health_policy_py3.py deleted file mode 100644 index 8c9230c7..00000000 --- a/customSDK/servicefabric/models/cluster_health_policy_py3.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterHealthPolicy(Model): - """Defines a health policy used to evaluate the health of the cluster or of a - cluster node. - - :param consider_warning_as_error: Indicates whether warnings are treated - with the same severity as errors. Default value: False . - :type consider_warning_as_error: bool - :param max_percent_unhealthy_nodes: The maximum allowed percentage of - unhealthy nodes before reporting an error. For example, to allow 10% of - nodes to be unhealthy, this value would be 10. - The percentage represents the maximum tolerated percentage of nodes that - can be unhealthy before the cluster is considered in error. - If the percentage is respected but there is at least one unhealthy node, - the health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy nodes - over the total number of nodes in the cluster. - The computation rounds up to tolerate one failure on small numbers of - nodes. Default percentage is zero. - In large clusters, some nodes will always be down or out for repairs, so - this percentage should be configured to tolerate that. Default value: 0 . - :type max_percent_unhealthy_nodes: int - :param max_percent_unhealthy_applications: The maximum allowed percentage - of unhealthy applications before reporting an error. For example, to allow - 10% of applications to be unhealthy, this value would be 10. - The percentage represents the maximum tolerated percentage of applications - that can be unhealthy before the cluster is considered in error. - If the percentage is respected but there is at least one unhealthy - application, the health is evaluated as Warning. - This is calculated by dividing the number of unhealthy applications over - the total number of application instances in the cluster, excluding - applications of application types that are included in the - ApplicationTypeHealthPolicyMap. - The computation rounds up to tolerate one failure on small numbers of - applications. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_applications: int - :param application_type_health_policy_map: Defines a map with max - percentage unhealthy applications for specific application types. - Each entry specifies as key the application type name and as value an - integer that represents the MaxPercentUnhealthyApplications percentage - used to evaluate the applications of the specified application type. - The application type health policy map can be used during cluster health - evaluation to describe special application types. - The application types included in the map are evaluated against the - percentage specified in the map, and not with the global - MaxPercentUnhealthyApplications defined in the cluster health policy. - The applications of application types specified in the map are not counted - against the global pool of applications. - For example, if some applications of a type are critical, the cluster - administrator can add an entry to the map for that application type - and assign it a value of 0% (that is, do not tolerate any failures). - All other applications can be evaluated with - MaxPercentUnhealthyApplications set to 20% to tolerate some failures out - of the thousands of application instances. - The application type health policy map is used only if the cluster - manifest enables application type health evaluation using the - configuration entry for - HealthManager/EnableApplicationTypeHealthEvaluation. - :type application_type_health_policy_map: - list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] - :param node_type_health_policy_map: Defines a map with max percentage - unhealthy nodes for specific node types. - Each entry specifies as key the node type name and as value an integer - that represents the MaxPercentUnhealthyNodes percentage used to evaluate - the nodes of the specified node type. - The node type health policy map can be used during cluster health - evaluation to describe special node types. - They are evaluated against the percentages associated with their node type - name in the map. - Setting this has no impact on the global pool of nodes used for - MaxPercentUnhealthyNodes. - The node type health policy map is used only if the cluster manifest - enables node type health evaluation using the configuration entry for - HealthManager/EnableNodeTypeHealthEvaluation. - For example, given a cluster with many nodes of different types, with - important work hosted on node type "SpecialNodeType" that should not - tolerate any nodes down. - You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some - failures for all nodes, but for the node type "SpecialNodeType", set the - MaxPercentUnhealthyNodes to 0 by - setting the value in the key value pair in NodeTypeHealthPolicyMapItem. - The key is the node type name. - This way, as long as no nodes of type "SpecialNodeType" are in Error - state, - even if some of the many nodes in the global pool are in Error state, but - below the global unhealthy percentage, the cluster would be evaluated to - Warning. - A Warning health state does not impact cluster upgrade or other monitoring - triggered by Error health state. - But even one node of type SpecialNodeType in Error would make cluster - unhealthy (in Error rather than Warning/Ok), which triggers rollback or - pauses the cluster upgrade, depending on the upgrade configuration. - Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting - SpecialNodeType's max percent unhealthy nodes to 100, - with one node of type SpecialNodeType in Error state would still put the - cluster in an Error state, since the global restriction is more strict in - this case. - :type node_type_health_policy_map: - list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] - """ - - _attribute_map = { - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'application_type_health_policy_map': {'key': 'ApplicationTypeHealthPolicyMap', 'type': '[ApplicationTypeHealthPolicyMapItem]'}, - 'node_type_health_policy_map': {'key': 'NodeTypeHealthPolicyMap', 'type': '[NodeTypeHealthPolicyMapItem]'}, - } - - def __init__(self, *, consider_warning_as_error: bool=False, max_percent_unhealthy_nodes: int=0, max_percent_unhealthy_applications: int=0, application_type_health_policy_map=None, node_type_health_policy_map=None, **kwargs) -> None: - super(ClusterHealthPolicy, self).__init__(**kwargs) - self.consider_warning_as_error = consider_warning_as_error - self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes - self.max_percent_unhealthy_applications = max_percent_unhealthy_applications - self.application_type_health_policy_map = application_type_health_policy_map - self.node_type_health_policy_map = node_type_health_policy_map diff --git a/customSDK/servicefabric/models/cluster_health_py3.py b/customSDK/servicefabric/models/cluster_health_py3.py deleted file mode 100644 index a60ca495..00000000 --- a/customSDK/servicefabric/models/cluster_health_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_py3 import EntityHealth - - -class ClusterHealth(EntityHealth): - """Represents the health of the cluster. - Contains the cluster aggregated health state, the cluster application and - node health states as well as the health events and the unhealthy - evaluations. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param node_health_states: Cluster node health states as found in the - health store. - :type node_health_states: - list[~azure.servicefabric.models.NodeHealthState] - :param application_health_states: Cluster application health states as - found in the health store. - :type application_health_states: - list[~azure.servicefabric.models.ApplicationHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'node_health_states': {'key': 'NodeHealthStates', 'type': '[NodeHealthState]'}, - 'application_health_states': {'key': 'ApplicationHealthStates', 'type': '[ApplicationHealthState]'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, node_health_states=None, application_health_states=None, **kwargs) -> None: - super(ClusterHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.node_health_states = node_health_states - self.application_health_states = application_health_states diff --git a/customSDK/servicefabric/models/cluster_health_report_expired_event.py b/customSDK/servicefabric/models/cluster_health_report_expired_event.py deleted file mode 100644 index a714abca..00000000 --- a/customSDK/servicefabric/models/cluster_health_report_expired_event.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event import ClusterEvent - - -class ClusterHealthReportExpiredEvent(ClusterEvent): - """Cluster Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ClusterHealthReportExpiredEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ClusterHealthReportExpired' diff --git a/customSDK/servicefabric/models/cluster_health_report_expired_event_py3.py b/customSDK/servicefabric/models/cluster_health_report_expired_event_py3.py deleted file mode 100644 index fcef06a2..00000000 --- a/customSDK/servicefabric/models/cluster_health_report_expired_event_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event_py3 import ClusterEvent - - -class ClusterHealthReportExpiredEvent(ClusterEvent): - """Cluster Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ClusterHealthReportExpired' diff --git a/customSDK/servicefabric/models/cluster_load_info.py b/customSDK/servicefabric/models/cluster_load_info.py deleted file mode 100644 index 2dfb3fd1..00000000 --- a/customSDK/servicefabric/models/cluster_load_info.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterLoadInfo(Model): - """Information about load in a Service Fabric cluster. It holds a summary of - all metrics and their load in a cluster. - - :param last_balancing_start_time_utc: The starting time of last resource - balancing run. - :type last_balancing_start_time_utc: datetime - :param last_balancing_end_time_utc: The end time of last resource - balancing run. - :type last_balancing_end_time_utc: datetime - :param load_metric_information: List that contains metrics and their load - information in this cluster. - :type load_metric_information: - list[~azure.servicefabric.models.LoadMetricInformation] - """ - - _attribute_map = { - 'last_balancing_start_time_utc': {'key': 'LastBalancingStartTimeUtc', 'type': 'iso-8601'}, - 'last_balancing_end_time_utc': {'key': 'LastBalancingEndTimeUtc', 'type': 'iso-8601'}, - 'load_metric_information': {'key': 'LoadMetricInformation', 'type': '[LoadMetricInformation]'}, - } - - def __init__(self, **kwargs): - super(ClusterLoadInfo, self).__init__(**kwargs) - self.last_balancing_start_time_utc = kwargs.get('last_balancing_start_time_utc', None) - self.last_balancing_end_time_utc = kwargs.get('last_balancing_end_time_utc', None) - self.load_metric_information = kwargs.get('load_metric_information', None) diff --git a/customSDK/servicefabric/models/cluster_load_info_py3.py b/customSDK/servicefabric/models/cluster_load_info_py3.py deleted file mode 100644 index d71dc2cd..00000000 --- a/customSDK/servicefabric/models/cluster_load_info_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterLoadInfo(Model): - """Information about load in a Service Fabric cluster. It holds a summary of - all metrics and their load in a cluster. - - :param last_balancing_start_time_utc: The starting time of last resource - balancing run. - :type last_balancing_start_time_utc: datetime - :param last_balancing_end_time_utc: The end time of last resource - balancing run. - :type last_balancing_end_time_utc: datetime - :param load_metric_information: List that contains metrics and their load - information in this cluster. - :type load_metric_information: - list[~azure.servicefabric.models.LoadMetricInformation] - """ - - _attribute_map = { - 'last_balancing_start_time_utc': {'key': 'LastBalancingStartTimeUtc', 'type': 'iso-8601'}, - 'last_balancing_end_time_utc': {'key': 'LastBalancingEndTimeUtc', 'type': 'iso-8601'}, - 'load_metric_information': {'key': 'LoadMetricInformation', 'type': '[LoadMetricInformation]'}, - } - - def __init__(self, *, last_balancing_start_time_utc=None, last_balancing_end_time_utc=None, load_metric_information=None, **kwargs) -> None: - super(ClusterLoadInfo, self).__init__(**kwargs) - self.last_balancing_start_time_utc = last_balancing_start_time_utc - self.last_balancing_end_time_utc = last_balancing_end_time_utc - self.load_metric_information = load_metric_information diff --git a/customSDK/servicefabric/models/cluster_manifest.py b/customSDK/servicefabric/models/cluster_manifest.py deleted file mode 100644 index 6f3f3e4f..00000000 --- a/customSDK/servicefabric/models/cluster_manifest.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterManifest(Model): - """Information about the cluster manifest. - - :param manifest: The contents of the cluster manifest file. - :type manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ClusterManifest, self).__init__(**kwargs) - self.manifest = kwargs.get('manifest', None) diff --git a/customSDK/servicefabric/models/cluster_manifest_py3.py b/customSDK/servicefabric/models/cluster_manifest_py3.py deleted file mode 100644 index 3dc2d2c8..00000000 --- a/customSDK/servicefabric/models/cluster_manifest_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterManifest(Model): - """Information about the cluster manifest. - - :param manifest: The contents of the cluster manifest file. - :type manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__(self, *, manifest: str=None, **kwargs) -> None: - super(ClusterManifest, self).__init__(**kwargs) - self.manifest = manifest diff --git a/customSDK/servicefabric/models/cluster_new_health_report_event.py b/customSDK/servicefabric/models/cluster_new_health_report_event.py deleted file mode 100644 index 3c6b2be1..00000000 --- a/customSDK/servicefabric/models/cluster_new_health_report_event.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event import ClusterEvent - - -class ClusterNewHealthReportEvent(ClusterEvent): - """Cluster Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ClusterNewHealthReportEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ClusterNewHealthReport' diff --git a/customSDK/servicefabric/models/cluster_new_health_report_event_py3.py b/customSDK/servicefabric/models/cluster_new_health_report_event_py3.py deleted file mode 100644 index 4f31abb5..00000000 --- a/customSDK/servicefabric/models/cluster_new_health_report_event_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event_py3 import ClusterEvent - - -class ClusterNewHealthReportEvent(ClusterEvent): - """Cluster Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ClusterNewHealthReport' diff --git a/customSDK/servicefabric/models/cluster_upgrade_completed_event.py b/customSDK/servicefabric/models/cluster_upgrade_completed_event.py deleted file mode 100644 index 3b75cdd1..00000000 --- a/customSDK/servicefabric/models/cluster_upgrade_completed_event.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event import ClusterEvent - - -class ClusterUpgradeCompletedEvent(ClusterEvent): - """Cluster Upgrade Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of - upgrade in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ClusterUpgradeCompletedEvent, self).__init__(**kwargs) - self.target_cluster_version = kwargs.get('target_cluster_version', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ClusterUpgradeCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_completed_event_py3.py b/customSDK/servicefabric/models/cluster_upgrade_completed_event_py3.py deleted file mode 100644 index 8422f87b..00000000 --- a/customSDK/servicefabric/models/cluster_upgrade_completed_event_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event_py3 import ClusterEvent - - -class ClusterUpgradeCompletedEvent(ClusterEvent): - """Cluster Upgrade Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of - upgrade in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterUpgradeCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.target_cluster_version = target_cluster_version - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ClusterUpgradeCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_description_object.py b/customSDK/servicefabric/models/cluster_upgrade_description_object.py deleted file mode 100644 index fdc4981b..00000000 --- a/customSDK/servicefabric/models/cluster_upgrade_description_object.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterUpgradeDescriptionObject(Model): - """Represents a ServiceFabric cluster upgrade. - - :param config_version: The cluster configuration version (specified in the - cluster manifest). - :type config_version: str - :param code_version: The ServiceFabric code version of the cluster. - :type code_version: str - :param upgrade_kind: The kind of upgrade out of the following possible - values. Possible values include: 'Invalid', 'Rolling'. Default value: - "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, - Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', - 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', - 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param sort_order: Defines the order in which an upgrade proceeds through - the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', - 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default - value: "Default" . - :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :param enable_delta_health_evaluation: When true, enables delta health - evaluation rather than absolute health evaluation after completion of each - upgrade domain. - :type enable_delta_health_evaluation: bool - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param cluster_upgrade_health_policy: Defines a health policy used to - evaluate the health of the cluster during a cluster upgrade. - :type cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :param application_health_policy_map: Represents the map of application - health policies for a ServiceFabric cluster upgrade - :type application_health_policy_map: - ~azure.servicefabric.models.ApplicationHealthPolicyMapObject - """ - - _attribute_map = { - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicyMapObject'}, - } - - def __init__(self, **kwargs): - super(ClusterUpgradeDescriptionObject, self).__init__(**kwargs) - self.config_version = kwargs.get('config_version', None) - self.code_version = kwargs.get('code_version', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) - self.force_restart = kwargs.get('force_restart', None) - self.sort_order = kwargs.get('sort_order', "Default") - self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) diff --git a/customSDK/servicefabric/models/cluster_upgrade_description_object_py3.py b/customSDK/servicefabric/models/cluster_upgrade_description_object_py3.py deleted file mode 100644 index ac7771a3..00000000 --- a/customSDK/servicefabric/models/cluster_upgrade_description_object_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterUpgradeDescriptionObject(Model): - """Represents a ServiceFabric cluster upgrade. - - :param config_version: The cluster configuration version (specified in the - cluster manifest). - :type config_version: str - :param code_version: The ServiceFabric code version of the cluster. - :type code_version: str - :param upgrade_kind: The kind of upgrade out of the following possible - values. Possible values include: 'Invalid', 'Rolling'. Default value: - "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, - Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', - 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', - 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param sort_order: Defines the order in which an upgrade proceeds through - the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', - 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default - value: "Default" . - :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :param enable_delta_health_evaluation: When true, enables delta health - evaluation rather than absolute health evaluation after completion of each - upgrade domain. - :type enable_delta_health_evaluation: bool - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param cluster_upgrade_health_policy: Defines a health policy used to - evaluate the health of the cluster during a cluster upgrade. - :type cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :param application_health_policy_map: Represents the map of application - health policies for a ServiceFabric cluster upgrade - :type application_health_policy_map: - ~azure.servicefabric.models.ApplicationHealthPolicyMapObject - """ - - _attribute_map = { - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicyMapObject'}, - } - - def __init__(self, *, config_version: str=None, code_version: str=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", enable_delta_health_evaluation: bool=None, monitoring_policy=None, cluster_health_policy=None, cluster_upgrade_health_policy=None, application_health_policy_map=None, **kwargs) -> None: - super(ClusterUpgradeDescriptionObject, self).__init__(**kwargs) - self.config_version = config_version - self.code_version = code_version - self.upgrade_kind = upgrade_kind - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.force_restart = force_restart - self.sort_order = sort_order - self.enable_delta_health_evaluation = enable_delta_health_evaluation - self.monitoring_policy = monitoring_policy - self.cluster_health_policy = cluster_health_policy - self.cluster_upgrade_health_policy = cluster_upgrade_health_policy - self.application_health_policy_map = application_health_policy_map diff --git a/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event.py b/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event.py deleted file mode 100644 index 42a87702..00000000 --- a/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event import ClusterEvent - - -class ClusterUpgradeDomainCompletedEvent(ClusterEvent): - """Cluster Upgrade Domain Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param upgrade_state: Required. State of upgrade. - :type upgrade_state: str - :param upgrade_domains: Required. Upgrade domains. - :type upgrade_domains: str - :param upgrade_domain_elapsed_time_in_ms: Required. Duration of domain - upgrade in milli-seconds. - :type upgrade_domain_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'upgrade_state': {'required': True}, - 'upgrade_domains': {'required': True}, - 'upgrade_domain_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, - 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ClusterUpgradeDomainCompletedEvent, self).__init__(**kwargs) - self.target_cluster_version = kwargs.get('target_cluster_version', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.upgrade_domains = kwargs.get('upgrade_domains', None) - self.upgrade_domain_elapsed_time_in_ms = kwargs.get('upgrade_domain_elapsed_time_in_ms', None) - self.kind = 'ClusterUpgradeDomainCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event_py3.py b/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event_py3.py deleted file mode 100644 index df7ea67d..00000000 --- a/customSDK/servicefabric/models/cluster_upgrade_domain_completed_event_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event_py3 import ClusterEvent - - -class ClusterUpgradeDomainCompletedEvent(ClusterEvent): - """Cluster Upgrade Domain Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param upgrade_state: Required. State of upgrade. - :type upgrade_state: str - :param upgrade_domains: Required. Upgrade domains. - :type upgrade_domains: str - :param upgrade_domain_elapsed_time_in_ms: Required. Duration of domain - upgrade in milli-seconds. - :type upgrade_domain_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'upgrade_state': {'required': True}, - 'upgrade_domains': {'required': True}, - 'upgrade_domain_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, - 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, upgrade_state: str, upgrade_domains: str, upgrade_domain_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterUpgradeDomainCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.target_cluster_version = target_cluster_version - self.upgrade_state = upgrade_state - self.upgrade_domains = upgrade_domains - self.upgrade_domain_elapsed_time_in_ms = upgrade_domain_elapsed_time_in_ms - self.kind = 'ClusterUpgradeDomainCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_health_policy_object.py b/customSDK/servicefabric/models/cluster_upgrade_health_policy_object.py deleted file mode 100644 index 80f09db1..00000000 --- a/customSDK/servicefabric/models/cluster_upgrade_health_policy_object.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterUpgradeHealthPolicyObject(Model): - """Defines a health policy used to evaluate the health of the cluster during a - cluster upgrade. - - :param max_percent_delta_unhealthy_nodes: The maximum allowed percentage - of nodes health degradation allowed during cluster upgrades. The delta is - measured between the state of the nodes at the beginning of upgrade and - the state of the nodes at the time of the health evaluation. The check is - performed after every upgrade domain upgrade completion to make sure the - global state of the cluster is within tolerated limits. The default value - is 10%. - :type max_percent_delta_unhealthy_nodes: int - :param max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum - allowed percentage of upgrade domain nodes health degradation allowed - during cluster upgrades. The delta is measured between the state of the - upgrade domain nodes at the beginning of upgrade and the state of the - upgrade domain nodes at the time of the health evaluation. The check is - performed after every upgrade domain upgrade completion for all completed - upgrade domains to make sure the state of the upgrade domains is within - tolerated limits. The default value is 15%. - :type max_percent_upgrade_domain_delta_unhealthy_nodes: int - """ - - _validation = { - 'max_percent_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ClusterUpgradeHealthPolicyObject, self).__init__(**kwargs) - self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) - self.max_percent_upgrade_domain_delta_unhealthy_nodes = kwargs.get('max_percent_upgrade_domain_delta_unhealthy_nodes', None) diff --git a/customSDK/servicefabric/models/cluster_upgrade_health_policy_object_py3.py b/customSDK/servicefabric/models/cluster_upgrade_health_policy_object_py3.py deleted file mode 100644 index f6143c36..00000000 --- a/customSDK/servicefabric/models/cluster_upgrade_health_policy_object_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterUpgradeHealthPolicyObject(Model): - """Defines a health policy used to evaluate the health of the cluster during a - cluster upgrade. - - :param max_percent_delta_unhealthy_nodes: The maximum allowed percentage - of nodes health degradation allowed during cluster upgrades. The delta is - measured between the state of the nodes at the beginning of upgrade and - the state of the nodes at the time of the health evaluation. The check is - performed after every upgrade domain upgrade completion to make sure the - global state of the cluster is within tolerated limits. The default value - is 10%. - :type max_percent_delta_unhealthy_nodes: int - :param max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum - allowed percentage of upgrade domain nodes health degradation allowed - during cluster upgrades. The delta is measured between the state of the - upgrade domain nodes at the beginning of upgrade and the state of the - upgrade domain nodes at the time of the health evaluation. The check is - performed after every upgrade domain upgrade completion for all completed - upgrade domains to make sure the state of the upgrade domains is within - tolerated limits. The default value is 15%. - :type max_percent_upgrade_domain_delta_unhealthy_nodes: int - """ - - _validation = { - 'max_percent_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, - } - - def __init__(self, *, max_percent_delta_unhealthy_nodes: int=None, max_percent_upgrade_domain_delta_unhealthy_nodes: int=None, **kwargs) -> None: - super(ClusterUpgradeHealthPolicyObject, self).__init__(**kwargs) - self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes - self.max_percent_upgrade_domain_delta_unhealthy_nodes = max_percent_upgrade_domain_delta_unhealthy_nodes diff --git a/customSDK/servicefabric/models/cluster_upgrade_progress_object.py b/customSDK/servicefabric/models/cluster_upgrade_progress_object.py deleted file mode 100644 index 9e9bc4e8..00000000 --- a/customSDK/servicefabric/models/cluster_upgrade_progress_object.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterUpgradeProgressObject(Model): - """Information about a cluster upgrade. - - :param code_version: The ServiceFabric code version of the cluster. - :type code_version: str - :param config_version: The cluster configuration version (specified in the - cluster manifest). - :type config_version: str - :param upgrade_domains: List of upgrade domains and their statuses. Not - applicable to node-by-node upgrades. - :type upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] - :param upgrade_units: List of upgrade units and their statuses. - :type upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] - :param upgrade_state: The state of the upgrade domain. Possible values - include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', - 'RollingForwardPending', 'RollingForwardInProgress', - 'RollingForwardCompleted', 'Failed' - :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :param next_upgrade_domain: The name of the next upgrade domain to be - processed. Not applicable to node-by-node upgrades. - :type next_upgrade_domain: str - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, - Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', - 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', - 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_description: Represents a ServiceFabric cluster upgrade - :type upgrade_description: - ~azure.servicefabric.models.ClusterUpgradeDescriptionObject - :param upgrade_duration_in_milliseconds: The estimated elapsed time spent - processing the current overall upgrade. - :type upgrade_duration_in_milliseconds: str - :param upgrade_domain_duration_in_milliseconds: The estimated elapsed time - spent processing the current upgrade domain. Not applicable to - node-by-node upgrades. - :type upgrade_domain_duration_in_milliseconds: str - :param unhealthy_evaluations: List of health evaluations that resulted in - the current aggregated health state. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param current_upgrade_domain_progress: Information about the current - in-progress upgrade domain. Not applicable to node-by-node upgrades. - :type current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :param current_upgrade_units_progress: Information about the current - in-progress upgrade units. - :type current_upgrade_units_progress: - ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo - :param start_timestamp_utc: The start time of the upgrade in UTC. - :type start_timestamp_utc: str - :param failure_timestamp_utc: The failure time of the upgrade in UTC. - :type failure_timestamp_utc: str - :param failure_reason: The cause of an upgrade failure that resulted in - FailureAction being executed. Possible values include: 'None', - 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', - 'OverallUpgradeTimeout' - :type failure_reason: str or ~azure.servicefabric.models.FailureReason - :param upgrade_domain_progress_at_failure: The detailed upgrade progress - for nodes in the current upgrade domain at the point of failure. Not - applicable to node-by-node upgrades. - :type upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailedUpgradeDomainProgressObject - :param is_node_by_node: Indicates whether this upgrade is node-by-node. - Default value: False . - :type is_node_by_node: bool - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, - 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ClusterUpgradeDescriptionObject'}, - 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, - 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailedUpgradeDomainProgressObject'}, - 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ClusterUpgradeProgressObject, self).__init__(**kwargs) - self.code_version = kwargs.get('code_version', None) - self.config_version = kwargs.get('config_version', None) - self.upgrade_domains = kwargs.get('upgrade_domains', None) - self.upgrade_units = kwargs.get('upgrade_units', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.next_upgrade_domain = kwargs.get('next_upgrade_domain', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_description = kwargs.get('upgrade_description', None) - self.upgrade_duration_in_milliseconds = kwargs.get('upgrade_duration_in_milliseconds', None) - self.upgrade_domain_duration_in_milliseconds = kwargs.get('upgrade_domain_duration_in_milliseconds', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) - self.current_upgrade_units_progress = kwargs.get('current_upgrade_units_progress', None) - self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) - self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) - self.is_node_by_node = kwargs.get('is_node_by_node', False) diff --git a/customSDK/servicefabric/models/cluster_upgrade_progress_object_py3.py b/customSDK/servicefabric/models/cluster_upgrade_progress_object_py3.py deleted file mode 100644 index b22989b5..00000000 --- a/customSDK/servicefabric/models/cluster_upgrade_progress_object_py3.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterUpgradeProgressObject(Model): - """Information about a cluster upgrade. - - :param code_version: The ServiceFabric code version of the cluster. - :type code_version: str - :param config_version: The cluster configuration version (specified in the - cluster manifest). - :type config_version: str - :param upgrade_domains: List of upgrade domains and their statuses. Not - applicable to node-by-node upgrades. - :type upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] - :param upgrade_units: List of upgrade units and their statuses. - :type upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] - :param upgrade_state: The state of the upgrade domain. Possible values - include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', - 'RollingForwardPending', 'RollingForwardInProgress', - 'RollingForwardCompleted', 'Failed' - :type upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :param next_upgrade_domain: The name of the next upgrade domain to be - processed. Not applicable to node-by-node upgrades. - :type next_upgrade_domain: str - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, - Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', - 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', - 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_description: Represents a ServiceFabric cluster upgrade - :type upgrade_description: - ~azure.servicefabric.models.ClusterUpgradeDescriptionObject - :param upgrade_duration_in_milliseconds: The estimated elapsed time spent - processing the current overall upgrade. - :type upgrade_duration_in_milliseconds: str - :param upgrade_domain_duration_in_milliseconds: The estimated elapsed time - spent processing the current upgrade domain. Not applicable to - node-by-node upgrades. - :type upgrade_domain_duration_in_milliseconds: str - :param unhealthy_evaluations: List of health evaluations that resulted in - the current aggregated health state. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param current_upgrade_domain_progress: Information about the current - in-progress upgrade domain. Not applicable to node-by-node upgrades. - :type current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :param current_upgrade_units_progress: Information about the current - in-progress upgrade units. - :type current_upgrade_units_progress: - ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo - :param start_timestamp_utc: The start time of the upgrade in UTC. - :type start_timestamp_utc: str - :param failure_timestamp_utc: The failure time of the upgrade in UTC. - :type failure_timestamp_utc: str - :param failure_reason: The cause of an upgrade failure that resulted in - FailureAction being executed. Possible values include: 'None', - 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', - 'OverallUpgradeTimeout' - :type failure_reason: str or ~azure.servicefabric.models.FailureReason - :param upgrade_domain_progress_at_failure: The detailed upgrade progress - for nodes in the current upgrade domain at the point of failure. Not - applicable to node-by-node upgrades. - :type upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailedUpgradeDomainProgressObject - :param is_node_by_node: Indicates whether this upgrade is node-by-node. - Default value: False . - :type is_node_by_node: bool - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, - 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ClusterUpgradeDescriptionObject'}, - 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, - 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailedUpgradeDomainProgressObject'}, - 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, - } - - def __init__(self, *, code_version: str=None, config_version: str=None, upgrade_domains=None, upgrade_units=None, upgrade_state=None, next_upgrade_domain: str=None, rolling_upgrade_mode="UnmonitoredAuto", upgrade_description=None, upgrade_duration_in_milliseconds: str=None, upgrade_domain_duration_in_milliseconds: str=None, unhealthy_evaluations=None, current_upgrade_domain_progress=None, current_upgrade_units_progress=None, start_timestamp_utc: str=None, failure_timestamp_utc: str=None, failure_reason=None, upgrade_domain_progress_at_failure=None, is_node_by_node: bool=False, **kwargs) -> None: - super(ClusterUpgradeProgressObject, self).__init__(**kwargs) - self.code_version = code_version - self.config_version = config_version - self.upgrade_domains = upgrade_domains - self.upgrade_units = upgrade_units - self.upgrade_state = upgrade_state - self.next_upgrade_domain = next_upgrade_domain - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_description = upgrade_description - self.upgrade_duration_in_milliseconds = upgrade_duration_in_milliseconds - self.upgrade_domain_duration_in_milliseconds = upgrade_domain_duration_in_milliseconds - self.unhealthy_evaluations = unhealthy_evaluations - self.current_upgrade_domain_progress = current_upgrade_domain_progress - self.current_upgrade_units_progress = current_upgrade_units_progress - self.start_timestamp_utc = start_timestamp_utc - self.failure_timestamp_utc = failure_timestamp_utc - self.failure_reason = failure_reason - self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure - self.is_node_by_node = is_node_by_node diff --git a/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event.py b/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event.py deleted file mode 100644 index a9147739..00000000 --- a/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event import ClusterEvent - - -class ClusterUpgradeRollbackCompletedEvent(ClusterEvent): - """Cluster Upgrade Rollback Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param failure_reason: Required. Describes failure. - :type failure_reason: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of - upgrade in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ClusterUpgradeRollbackCompletedEvent, self).__init__(**kwargs) - self.target_cluster_version = kwargs.get('target_cluster_version', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ClusterUpgradeRollbackCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event_py3.py b/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event_py3.py deleted file mode 100644 index 75e456c3..00000000 --- a/customSDK/servicefabric/models/cluster_upgrade_rollback_completed_event_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event_py3 import ClusterEvent - - -class ClusterUpgradeRollbackCompletedEvent(ClusterEvent): - """Cluster Upgrade Rollback Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param failure_reason: Required. Describes failure. - :type failure_reason: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of - upgrade in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterUpgradeRollbackCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.target_cluster_version = target_cluster_version - self.failure_reason = failure_reason - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ClusterUpgradeRollbackCompleted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event.py b/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event.py deleted file mode 100644 index b278a7de..00000000 --- a/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event import ClusterEvent - - -class ClusterUpgradeRollbackStartedEvent(ClusterEvent): - """Cluster Upgrade Rollback Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param failure_reason: Required. Describes failure. - :type failure_reason: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of - upgrade in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ClusterUpgradeRollbackStartedEvent, self).__init__(**kwargs) - self.target_cluster_version = kwargs.get('target_cluster_version', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.overall_upgrade_elapsed_time_in_ms = kwargs.get('overall_upgrade_elapsed_time_in_ms', None) - self.kind = 'ClusterUpgradeRollbackStarted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event_py3.py b/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event_py3.py deleted file mode 100644 index 54e00da9..00000000 --- a/customSDK/servicefabric/models/cluster_upgrade_rollback_started_event_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event_py3 import ClusterEvent - - -class ClusterUpgradeRollbackStartedEvent(ClusterEvent): - """Cluster Upgrade Rollback Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param failure_reason: Required. Describes failure. - :type failure_reason: str - :param overall_upgrade_elapsed_time_in_ms: Required. Overall duration of - upgrade in milli-seconds. - :type overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'target_cluster_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, target_cluster_version: str, failure_reason: str, overall_upgrade_elapsed_time_in_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterUpgradeRollbackStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.target_cluster_version = target_cluster_version - self.failure_reason = failure_reason - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - self.kind = 'ClusterUpgradeRollbackStarted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_started_event.py b/customSDK/servicefabric/models/cluster_upgrade_started_event.py deleted file mode 100644 index 7222ff33..00000000 --- a/customSDK/servicefabric/models/cluster_upgrade_started_event.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event import ClusterEvent - - -class ClusterUpgradeStartedEvent(ClusterEvent): - """Cluster Upgrade Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param current_cluster_version: Required. Current Cluster version. - :type current_cluster_version: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param upgrade_type: Required. Type of upgrade. - :type upgrade_type: str - :param rolling_upgrade_mode: Required. Mode of upgrade. - :type rolling_upgrade_mode: str - :param failure_action: Required. Action if failed. - :type failure_action: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'current_cluster_version': {'required': True}, - 'target_cluster_version': {'required': True}, - 'upgrade_type': {'required': True}, - 'rolling_upgrade_mode': {'required': True}, - 'failure_action': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'current_cluster_version': {'key': 'CurrentClusterVersion', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ClusterUpgradeStartedEvent, self).__init__(**kwargs) - self.current_cluster_version = kwargs.get('current_cluster_version', None) - self.target_cluster_version = kwargs.get('target_cluster_version', None) - self.upgrade_type = kwargs.get('upgrade_type', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', None) - self.failure_action = kwargs.get('failure_action', None) - self.kind = 'ClusterUpgradeStarted' diff --git a/customSDK/servicefabric/models/cluster_upgrade_started_event_py3.py b/customSDK/servicefabric/models/cluster_upgrade_started_event_py3.py deleted file mode 100644 index e35bc36b..00000000 --- a/customSDK/servicefabric/models/cluster_upgrade_started_event_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .cluster_event_py3 import ClusterEvent - - -class ClusterUpgradeStartedEvent(ClusterEvent): - """Cluster Upgrade Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param current_cluster_version: Required. Current Cluster version. - :type current_cluster_version: str - :param target_cluster_version: Required. Target Cluster version. - :type target_cluster_version: str - :param upgrade_type: Required. Type of upgrade. - :type upgrade_type: str - :param rolling_upgrade_mode: Required. Mode of upgrade. - :type rolling_upgrade_mode: str - :param failure_action: Required. Action if failed. - :type failure_action: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'current_cluster_version': {'required': True}, - 'target_cluster_version': {'required': True}, - 'upgrade_type': {'required': True}, - 'rolling_upgrade_mode': {'required': True}, - 'failure_action': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'current_cluster_version': {'key': 'CurrentClusterVersion', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, current_cluster_version: str, target_cluster_version: str, upgrade_type: str, rolling_upgrade_mode: str, failure_action: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ClusterUpgradeStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.current_cluster_version = current_cluster_version - self.target_cluster_version = target_cluster_version - self.upgrade_type = upgrade_type - self.rolling_upgrade_mode = rolling_upgrade_mode - self.failure_action = failure_action - self.kind = 'ClusterUpgradeStarted' diff --git a/customSDK/servicefabric/models/cluster_version.py b/customSDK/servicefabric/models/cluster_version.py deleted file mode 100644 index 15b4fdbf..00000000 --- a/customSDK/servicefabric/models/cluster_version.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterVersion(Model): - """The cluster version. - - :param version: The Service Fabric cluster runtime version. - :type version: str - """ - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ClusterVersion, self).__init__(**kwargs) - self.version = kwargs.get('version', None) diff --git a/customSDK/servicefabric/models/cluster_version_py3.py b/customSDK/servicefabric/models/cluster_version_py3.py deleted file mode 100644 index fcf80889..00000000 --- a/customSDK/servicefabric/models/cluster_version_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ClusterVersion(Model): - """The cluster version. - - :param version: The Service Fabric cluster runtime version. - :type version: str - """ - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, *, version: str=None, **kwargs) -> None: - super(ClusterVersion, self).__init__(**kwargs) - self.version = version diff --git a/customSDK/servicefabric/models/code_package_entry_point.py b/customSDK/servicefabric/models/code_package_entry_point.py deleted file mode 100644 index 7b03f019..00000000 --- a/customSDK/servicefabric/models/code_package_entry_point.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CodePackageEntryPoint(Model): - """Information about setup or main entry point of a code package deployed on a - Service Fabric node. - - :param entry_point_location: The location of entry point executable on the - node. - :type entry_point_location: str - :param process_id: The process ID of the entry point. - :type process_id: str - :param run_as_user_name: The user name under which entry point executable - is run on the node. - :type run_as_user_name: str - :param code_package_entry_point_statistics: Statistics about setup or main - entry point of a code package deployed on a Service Fabric node. - :type code_package_entry_point_statistics: - ~azure.servicefabric.models.CodePackageEntryPointStatistics - :param status: Specifies the status of the code package entry point - deployed on a Service Fabric node. Possible values include: 'Invalid', - 'Pending', 'Starting', 'Started', 'Stopping', 'Stopped' - :type status: str or ~azure.servicefabric.models.EntryPointStatus - :param next_activation_time: The time (in UTC) when the entry point - executable will be run next. - :type next_activation_time: datetime - :param instance_id: The instance ID for current running entry point. For a - code package setup entry point (if specified) runs first and after it - finishes main entry point is started. Each time entry point executable is - run, its instance id will change. - :type instance_id: str - """ - - _attribute_map = { - 'entry_point_location': {'key': 'EntryPointLocation', 'type': 'str'}, - 'process_id': {'key': 'ProcessId', 'type': 'str'}, - 'run_as_user_name': {'key': 'RunAsUserName', 'type': 'str'}, - 'code_package_entry_point_statistics': {'key': 'CodePackageEntryPointStatistics', 'type': 'CodePackageEntryPointStatistics'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'next_activation_time': {'key': 'NextActivationTime', 'type': 'iso-8601'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CodePackageEntryPoint, self).__init__(**kwargs) - self.entry_point_location = kwargs.get('entry_point_location', None) - self.process_id = kwargs.get('process_id', None) - self.run_as_user_name = kwargs.get('run_as_user_name', None) - self.code_package_entry_point_statistics = kwargs.get('code_package_entry_point_statistics', None) - self.status = kwargs.get('status', None) - self.next_activation_time = kwargs.get('next_activation_time', None) - self.instance_id = kwargs.get('instance_id', None) diff --git a/customSDK/servicefabric/models/code_package_entry_point_py3.py b/customSDK/servicefabric/models/code_package_entry_point_py3.py deleted file mode 100644 index 08d41003..00000000 --- a/customSDK/servicefabric/models/code_package_entry_point_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CodePackageEntryPoint(Model): - """Information about setup or main entry point of a code package deployed on a - Service Fabric node. - - :param entry_point_location: The location of entry point executable on the - node. - :type entry_point_location: str - :param process_id: The process ID of the entry point. - :type process_id: str - :param run_as_user_name: The user name under which entry point executable - is run on the node. - :type run_as_user_name: str - :param code_package_entry_point_statistics: Statistics about setup or main - entry point of a code package deployed on a Service Fabric node. - :type code_package_entry_point_statistics: - ~azure.servicefabric.models.CodePackageEntryPointStatistics - :param status: Specifies the status of the code package entry point - deployed on a Service Fabric node. Possible values include: 'Invalid', - 'Pending', 'Starting', 'Started', 'Stopping', 'Stopped' - :type status: str or ~azure.servicefabric.models.EntryPointStatus - :param next_activation_time: The time (in UTC) when the entry point - executable will be run next. - :type next_activation_time: datetime - :param instance_id: The instance ID for current running entry point. For a - code package setup entry point (if specified) runs first and after it - finishes main entry point is started. Each time entry point executable is - run, its instance id will change. - :type instance_id: str - """ - - _attribute_map = { - 'entry_point_location': {'key': 'EntryPointLocation', 'type': 'str'}, - 'process_id': {'key': 'ProcessId', 'type': 'str'}, - 'run_as_user_name': {'key': 'RunAsUserName', 'type': 'str'}, - 'code_package_entry_point_statistics': {'key': 'CodePackageEntryPointStatistics', 'type': 'CodePackageEntryPointStatistics'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'next_activation_time': {'key': 'NextActivationTime', 'type': 'iso-8601'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, *, entry_point_location: str=None, process_id: str=None, run_as_user_name: str=None, code_package_entry_point_statistics=None, status=None, next_activation_time=None, instance_id: str=None, **kwargs) -> None: - super(CodePackageEntryPoint, self).__init__(**kwargs) - self.entry_point_location = entry_point_location - self.process_id = process_id - self.run_as_user_name = run_as_user_name - self.code_package_entry_point_statistics = code_package_entry_point_statistics - self.status = status - self.next_activation_time = next_activation_time - self.instance_id = instance_id diff --git a/customSDK/servicefabric/models/code_package_entry_point_statistics.py b/customSDK/servicefabric/models/code_package_entry_point_statistics.py deleted file mode 100644 index 2f33d3d4..00000000 --- a/customSDK/servicefabric/models/code_package_entry_point_statistics.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CodePackageEntryPointStatistics(Model): - """Statistics about setup or main entry point of a code package deployed on a - Service Fabric node. - - :param last_exit_code: The last exit code of the entry point. - :type last_exit_code: str - :param last_activation_time: The last time (in UTC) when Service Fabric - attempted to run the entry point. - :type last_activation_time: datetime - :param last_exit_time: The last time (in UTC) when the entry point - finished running. - :type last_exit_time: datetime - :param last_successful_activation_time: The last time (in UTC) when the - entry point ran successfully. - :type last_successful_activation_time: datetime - :param last_successful_exit_time: The last time (in UTC) when the entry - point finished running gracefully. - :type last_successful_exit_time: datetime - :param activation_count: Number of times the entry point has run. - :type activation_count: str - :param activation_failure_count: Number of times the entry point failed to - run. - :type activation_failure_count: str - :param continuous_activation_failure_count: Number of times the entry - point continuously failed to run. - :type continuous_activation_failure_count: str - :param exit_count: Number of times the entry point finished running. - :type exit_count: str - :param exit_failure_count: Number of times the entry point failed to exit - gracefully. - :type exit_failure_count: str - :param continuous_exit_failure_count: Number of times the entry point - continuously failed to exit gracefully. - :type continuous_exit_failure_count: str - """ - - _attribute_map = { - 'last_exit_code': {'key': 'LastExitCode', 'type': 'str'}, - 'last_activation_time': {'key': 'LastActivationTime', 'type': 'iso-8601'}, - 'last_exit_time': {'key': 'LastExitTime', 'type': 'iso-8601'}, - 'last_successful_activation_time': {'key': 'LastSuccessfulActivationTime', 'type': 'iso-8601'}, - 'last_successful_exit_time': {'key': 'LastSuccessfulExitTime', 'type': 'iso-8601'}, - 'activation_count': {'key': 'ActivationCount', 'type': 'str'}, - 'activation_failure_count': {'key': 'ActivationFailureCount', 'type': 'str'}, - 'continuous_activation_failure_count': {'key': 'ContinuousActivationFailureCount', 'type': 'str'}, - 'exit_count': {'key': 'ExitCount', 'type': 'str'}, - 'exit_failure_count': {'key': 'ExitFailureCount', 'type': 'str'}, - 'continuous_exit_failure_count': {'key': 'ContinuousExitFailureCount', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CodePackageEntryPointStatistics, self).__init__(**kwargs) - self.last_exit_code = kwargs.get('last_exit_code', None) - self.last_activation_time = kwargs.get('last_activation_time', None) - self.last_exit_time = kwargs.get('last_exit_time', None) - self.last_successful_activation_time = kwargs.get('last_successful_activation_time', None) - self.last_successful_exit_time = kwargs.get('last_successful_exit_time', None) - self.activation_count = kwargs.get('activation_count', None) - self.activation_failure_count = kwargs.get('activation_failure_count', None) - self.continuous_activation_failure_count = kwargs.get('continuous_activation_failure_count', None) - self.exit_count = kwargs.get('exit_count', None) - self.exit_failure_count = kwargs.get('exit_failure_count', None) - self.continuous_exit_failure_count = kwargs.get('continuous_exit_failure_count', None) diff --git a/customSDK/servicefabric/models/code_package_entry_point_statistics_py3.py b/customSDK/servicefabric/models/code_package_entry_point_statistics_py3.py deleted file mode 100644 index 1de0c886..00000000 --- a/customSDK/servicefabric/models/code_package_entry_point_statistics_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CodePackageEntryPointStatistics(Model): - """Statistics about setup or main entry point of a code package deployed on a - Service Fabric node. - - :param last_exit_code: The last exit code of the entry point. - :type last_exit_code: str - :param last_activation_time: The last time (in UTC) when Service Fabric - attempted to run the entry point. - :type last_activation_time: datetime - :param last_exit_time: The last time (in UTC) when the entry point - finished running. - :type last_exit_time: datetime - :param last_successful_activation_time: The last time (in UTC) when the - entry point ran successfully. - :type last_successful_activation_time: datetime - :param last_successful_exit_time: The last time (in UTC) when the entry - point finished running gracefully. - :type last_successful_exit_time: datetime - :param activation_count: Number of times the entry point has run. - :type activation_count: str - :param activation_failure_count: Number of times the entry point failed to - run. - :type activation_failure_count: str - :param continuous_activation_failure_count: Number of times the entry - point continuously failed to run. - :type continuous_activation_failure_count: str - :param exit_count: Number of times the entry point finished running. - :type exit_count: str - :param exit_failure_count: Number of times the entry point failed to exit - gracefully. - :type exit_failure_count: str - :param continuous_exit_failure_count: Number of times the entry point - continuously failed to exit gracefully. - :type continuous_exit_failure_count: str - """ - - _attribute_map = { - 'last_exit_code': {'key': 'LastExitCode', 'type': 'str'}, - 'last_activation_time': {'key': 'LastActivationTime', 'type': 'iso-8601'}, - 'last_exit_time': {'key': 'LastExitTime', 'type': 'iso-8601'}, - 'last_successful_activation_time': {'key': 'LastSuccessfulActivationTime', 'type': 'iso-8601'}, - 'last_successful_exit_time': {'key': 'LastSuccessfulExitTime', 'type': 'iso-8601'}, - 'activation_count': {'key': 'ActivationCount', 'type': 'str'}, - 'activation_failure_count': {'key': 'ActivationFailureCount', 'type': 'str'}, - 'continuous_activation_failure_count': {'key': 'ContinuousActivationFailureCount', 'type': 'str'}, - 'exit_count': {'key': 'ExitCount', 'type': 'str'}, - 'exit_failure_count': {'key': 'ExitFailureCount', 'type': 'str'}, - 'continuous_exit_failure_count': {'key': 'ContinuousExitFailureCount', 'type': 'str'}, - } - - def __init__(self, *, last_exit_code: str=None, last_activation_time=None, last_exit_time=None, last_successful_activation_time=None, last_successful_exit_time=None, activation_count: str=None, activation_failure_count: str=None, continuous_activation_failure_count: str=None, exit_count: str=None, exit_failure_count: str=None, continuous_exit_failure_count: str=None, **kwargs) -> None: - super(CodePackageEntryPointStatistics, self).__init__(**kwargs) - self.last_exit_code = last_exit_code - self.last_activation_time = last_activation_time - self.last_exit_time = last_exit_time - self.last_successful_activation_time = last_successful_activation_time - self.last_successful_exit_time = last_successful_exit_time - self.activation_count = activation_count - self.activation_failure_count = activation_failure_count - self.continuous_activation_failure_count = continuous_activation_failure_count - self.exit_count = exit_count - self.exit_failure_count = exit_failure_count - self.continuous_exit_failure_count = continuous_exit_failure_count diff --git a/customSDK/servicefabric/models/compose_deployment_status_info.py b/customSDK/servicefabric/models/compose_deployment_status_info.py deleted file mode 100644 index 5895c943..00000000 --- a/customSDK/servicefabric/models/compose_deployment_status_info.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComposeDeploymentStatusInfo(Model): - """Information about a Service Fabric compose deployment. - - :param name: The name of the deployment. - :type name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param status: The status of the compose deployment. Possible values - include: 'Invalid', 'Provisioning', 'Creating', 'Ready', 'Unprovisioning', - 'Deleting', 'Failed', 'Upgrading' - :type status: str or ~azure.servicefabric.models.ComposeDeploymentStatus - :param status_details: The status details of compose deployment including - failure message. - :type status_details: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComposeDeploymentStatusInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.application_name = kwargs.get('application_name', None) - self.status = kwargs.get('status', None) - self.status_details = kwargs.get('status_details', None) diff --git a/customSDK/servicefabric/models/compose_deployment_status_info_py3.py b/customSDK/servicefabric/models/compose_deployment_status_info_py3.py deleted file mode 100644 index 3ffec700..00000000 --- a/customSDK/servicefabric/models/compose_deployment_status_info_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComposeDeploymentStatusInfo(Model): - """Information about a Service Fabric compose deployment. - - :param name: The name of the deployment. - :type name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param status: The status of the compose deployment. Possible values - include: 'Invalid', 'Provisioning', 'Creating', 'Ready', 'Unprovisioning', - 'Deleting', 'Failed', 'Upgrading' - :type status: str or ~azure.servicefabric.models.ComposeDeploymentStatus - :param status_details: The status details of compose deployment including - failure message. - :type status_details: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, application_name: str=None, status=None, status_details: str=None, **kwargs) -> None: - super(ComposeDeploymentStatusInfo, self).__init__(**kwargs) - self.name = name - self.application_name = application_name - self.status = status - self.status_details = status_details diff --git a/customSDK/servicefabric/models/compose_deployment_upgrade_description.py b/customSDK/servicefabric/models/compose_deployment_upgrade_description.py deleted file mode 100644 index 1f55215d..00000000 --- a/customSDK/servicefabric/models/compose_deployment_upgrade_description.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComposeDeploymentUpgradeDescription(Model): - """Describes the parameters for a compose deployment upgrade. - - All required parameters must be populated in order to send to Azure. - - :param deployment_name: Required. The name of the deployment. - :type deployment_name: str - :param compose_file_content: Required. The content of the compose file - that describes the deployment to create. - :type compose_file_content: str - :param registry_credential: Credential information to connect to container - registry. - :type registry_credential: ~azure.servicefabric.models.RegistryCredential - :param upgrade_kind: Required. The kind of upgrade out of the following - possible values. Possible values include: 'Invalid', 'Rolling'. Default - value: "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, - Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', - 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', - 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - """ - - _validation = { - 'deployment_name': {'required': True}, - 'compose_file_content': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, - 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - } - - def __init__(self, **kwargs): - super(ComposeDeploymentUpgradeDescription, self).__init__(**kwargs) - self.deployment_name = kwargs.get('deployment_name', None) - self.compose_file_content = kwargs.get('compose_file_content', None) - self.registry_credential = kwargs.get('registry_credential', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) - self.force_restart = kwargs.get('force_restart', None) - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.application_health_policy = kwargs.get('application_health_policy', None) diff --git a/customSDK/servicefabric/models/compose_deployment_upgrade_description_py3.py b/customSDK/servicefabric/models/compose_deployment_upgrade_description_py3.py deleted file mode 100644 index cdbc11f2..00000000 --- a/customSDK/servicefabric/models/compose_deployment_upgrade_description_py3.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComposeDeploymentUpgradeDescription(Model): - """Describes the parameters for a compose deployment upgrade. - - All required parameters must be populated in order to send to Azure. - - :param deployment_name: Required. The name of the deployment. - :type deployment_name: str - :param compose_file_content: Required. The content of the compose file - that describes the deployment to create. - :type compose_file_content: str - :param registry_credential: Credential information to connect to container - registry. - :type registry_credential: ~azure.servicefabric.models.RegistryCredential - :param upgrade_kind: Required. The kind of upgrade out of the following - possible values. Possible values include: 'Invalid', 'Rolling'. Default - value: "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, - Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', - 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', - 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - """ - - _validation = { - 'deployment_name': {'required': True}, - 'compose_file_content': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, - 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - } - - def __init__(self, *, deployment_name: str, compose_file_content: str, registry_credential=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, monitoring_policy=None, application_health_policy=None, **kwargs) -> None: - super(ComposeDeploymentUpgradeDescription, self).__init__(**kwargs) - self.deployment_name = deployment_name - self.compose_file_content = compose_file_content - self.registry_credential = registry_credential - self.upgrade_kind = upgrade_kind - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.force_restart = force_restart - self.monitoring_policy = monitoring_policy - self.application_health_policy = application_health_policy diff --git a/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info.py b/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info.py deleted file mode 100644 index 603e2541..00000000 --- a/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComposeDeploymentUpgradeProgressInfo(Model): - """Describes the parameters for a compose deployment upgrade. - - :param deployment_name: The name of the target deployment. - :type deployment_name: str - :param application_name: The name of the target application, including the - 'fabric:' URI scheme. - :type application_name: str - :param upgrade_state: The state of the compose deployment upgrade. - Possible values include: 'Invalid', 'ProvisioningTarget', - 'RollingForwardInProgress', 'RollingForwardPending', - 'UnprovisioningCurrent', 'RollingForwardCompleted', - 'RollingBackInProgress', 'UnprovisioningTarget', 'RollingBackCompleted', - 'Failed' - :type upgrade_state: str or - ~azure.servicefabric.models.ComposeDeploymentUpgradeState - :param upgrade_status_details: Additional detailed information about the - status of the pending upgrade. - :type upgrade_status_details: str - :param upgrade_kind: The kind of upgrade out of the following possible - values. Possible values include: 'Invalid', 'Rolling'. Default value: - "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, - Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', - 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', - 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param target_application_type_version: The target application type - version (found in the application manifest) for the application upgrade. - :type target_application_type_version: str - :param upgrade_duration: The estimated amount of time that the overall - upgrade elapsed. It is first interpreted as a string representing an ISO - 8601 duration. If that fails, then it is interpreted as a number - representing the total number of milliseconds. - :type upgrade_duration: str - :param current_upgrade_domain_duration: The estimated amount of time spent - processing current Upgrade Domain. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type current_upgrade_domain_duration: str - :param application_unhealthy_evaluations: List of health evaluations that - resulted in the current aggregated health state. - :type application_unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param current_upgrade_domain_progress: Information about the current - in-progress upgrade domain. Not applicable to node-by-node upgrades. - :type current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :param start_timestamp_utc: The estimated UTC datetime when the upgrade - started. - :type start_timestamp_utc: str - :param failure_timestamp_utc: The estimated UTC datetime when the upgrade - failed and FailureAction was executed. - :type failure_timestamp_utc: str - :param failure_reason: The cause of an upgrade failure that resulted in - FailureAction being executed. Possible values include: 'None', - 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', - 'OverallUpgradeTimeout' - :type failure_reason: str or ~azure.servicefabric.models.FailureReason - :param upgrade_domain_progress_at_failure: Information about the upgrade - domain progress at the time of upgrade failure. - :type upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo - :param application_upgrade_status_details: Additional details of - application upgrade including failure message. - :type application_upgrade_status_details: str - """ - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - 'current_upgrade_domain_duration': {'key': 'CurrentUpgradeDomainDuration', 'type': 'str'}, - 'application_unhealthy_evaluations': {'key': 'ApplicationUnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, - 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ComposeDeploymentUpgradeProgressInfo, self).__init__(**kwargs) - self.deployment_name = kwargs.get('deployment_name', None) - self.application_name = kwargs.get('application_name', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.upgrade_status_details = kwargs.get('upgrade_status_details', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.force_restart = kwargs.get('force_restart', None) - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.application_health_policy = kwargs.get('application_health_policy', None) - self.target_application_type_version = kwargs.get('target_application_type_version', None) - self.upgrade_duration = kwargs.get('upgrade_duration', None) - self.current_upgrade_domain_duration = kwargs.get('current_upgrade_domain_duration', None) - self.application_unhealthy_evaluations = kwargs.get('application_unhealthy_evaluations', None) - self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) - self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) - self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) - self.application_upgrade_status_details = kwargs.get('application_upgrade_status_details', None) diff --git a/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info_py3.py b/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info_py3.py deleted file mode 100644 index 3b7f23e7..00000000 --- a/customSDK/servicefabric/models/compose_deployment_upgrade_progress_info_py3.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ComposeDeploymentUpgradeProgressInfo(Model): - """Describes the parameters for a compose deployment upgrade. - - :param deployment_name: The name of the target deployment. - :type deployment_name: str - :param application_name: The name of the target application, including the - 'fabric:' URI scheme. - :type application_name: str - :param upgrade_state: The state of the compose deployment upgrade. - Possible values include: 'Invalid', 'ProvisioningTarget', - 'RollingForwardInProgress', 'RollingForwardPending', - 'UnprovisioningCurrent', 'RollingForwardCompleted', - 'RollingBackInProgress', 'UnprovisioningTarget', 'RollingBackCompleted', - 'Failed' - :type upgrade_state: str or - ~azure.servicefabric.models.ComposeDeploymentUpgradeState - :param upgrade_status_details: Additional detailed information about the - status of the pending upgrade. - :type upgrade_status_details: str - :param upgrade_kind: The kind of upgrade out of the following possible - values. Possible values include: 'Invalid', 'Rolling'. Default value: - "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, - Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', - 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', - 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param target_application_type_version: The target application type - version (found in the application manifest) for the application upgrade. - :type target_application_type_version: str - :param upgrade_duration: The estimated amount of time that the overall - upgrade elapsed. It is first interpreted as a string representing an ISO - 8601 duration. If that fails, then it is interpreted as a number - representing the total number of milliseconds. - :type upgrade_duration: str - :param current_upgrade_domain_duration: The estimated amount of time spent - processing current Upgrade Domain. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type current_upgrade_domain_duration: str - :param application_unhealthy_evaluations: List of health evaluations that - resulted in the current aggregated health state. - :type application_unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param current_upgrade_domain_progress: Information about the current - in-progress upgrade domain. Not applicable to node-by-node upgrades. - :type current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :param start_timestamp_utc: The estimated UTC datetime when the upgrade - started. - :type start_timestamp_utc: str - :param failure_timestamp_utc: The estimated UTC datetime when the upgrade - failed and FailureAction was executed. - :type failure_timestamp_utc: str - :param failure_reason: The cause of an upgrade failure that resulted in - FailureAction being executed. Possible values include: 'None', - 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', - 'OverallUpgradeTimeout' - :type failure_reason: str or ~azure.servicefabric.models.FailureReason - :param upgrade_domain_progress_at_failure: Information about the upgrade - domain progress at the time of upgrade failure. - :type upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo - :param application_upgrade_status_details: Additional details of - application upgrade including failure message. - :type application_upgrade_status_details: str - """ - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - 'current_upgrade_domain_duration': {'key': 'CurrentUpgradeDomainDuration', 'type': 'str'}, - 'application_unhealthy_evaluations': {'key': 'ApplicationUnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, - 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, - } - - def __init__(self, *, deployment_name: str=None, application_name: str=None, upgrade_state=None, upgrade_status_details: str=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", force_restart: bool=None, upgrade_replica_set_check_timeout_in_seconds: int=None, monitoring_policy=None, application_health_policy=None, target_application_type_version: str=None, upgrade_duration: str=None, current_upgrade_domain_duration: str=None, application_unhealthy_evaluations=None, current_upgrade_domain_progress=None, start_timestamp_utc: str=None, failure_timestamp_utc: str=None, failure_reason=None, upgrade_domain_progress_at_failure=None, application_upgrade_status_details: str=None, **kwargs) -> None: - super(ComposeDeploymentUpgradeProgressInfo, self).__init__(**kwargs) - self.deployment_name = deployment_name - self.application_name = application_name - self.upgrade_state = upgrade_state - self.upgrade_status_details = upgrade_status_details - self.upgrade_kind = upgrade_kind - self.rolling_upgrade_mode = rolling_upgrade_mode - self.force_restart = force_restart - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.monitoring_policy = monitoring_policy - self.application_health_policy = application_health_policy - self.target_application_type_version = target_application_type_version - self.upgrade_duration = upgrade_duration - self.current_upgrade_domain_duration = current_upgrade_domain_duration - self.application_unhealthy_evaluations = application_unhealthy_evaluations - self.current_upgrade_domain_progress = current_upgrade_domain_progress - self.start_timestamp_utc = start_timestamp_utc - self.failure_timestamp_utc = failure_timestamp_utc - self.failure_reason = failure_reason - self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure - self.application_upgrade_status_details = application_upgrade_status_details diff --git a/customSDK/servicefabric/models/config_parameter_override.py b/customSDK/servicefabric/models/config_parameter_override.py deleted file mode 100644 index b6e484eb..00000000 --- a/customSDK/servicefabric/models/config_parameter_override.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConfigParameterOverride(Model): - """Information about a configuration parameter override. - - All required parameters must be populated in order to send to Azure. - - :param section_name: Required. Name of the section for the parameter - override. - :type section_name: str - :param parameter_name: Required. Name of the parameter that has been - overridden. - :type parameter_name: str - :param parameter_value: Required. Value of the overridden parameter. - :type parameter_value: str - :param timeout: The duration until config override is considered as valid. - :type timeout: timedelta - :param persist_across_upgrade: A value that indicates whether config - override will be removed on upgrade or will still be considered as valid. - :type persist_across_upgrade: bool - """ - - _validation = { - 'section_name': {'required': True}, - 'parameter_name': {'required': True}, - 'parameter_value': {'required': True}, - } - - _attribute_map = { - 'section_name': {'key': 'SectionName', 'type': 'str'}, - 'parameter_name': {'key': 'ParameterName', 'type': 'str'}, - 'parameter_value': {'key': 'ParameterValue', 'type': 'str'}, - 'timeout': {'key': 'Timeout', 'type': 'duration'}, - 'persist_across_upgrade': {'key': 'PersistAcrossUpgrade', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ConfigParameterOverride, self).__init__(**kwargs) - self.section_name = kwargs.get('section_name', None) - self.parameter_name = kwargs.get('parameter_name', None) - self.parameter_value = kwargs.get('parameter_value', None) - self.timeout = kwargs.get('timeout', None) - self.persist_across_upgrade = kwargs.get('persist_across_upgrade', None) diff --git a/customSDK/servicefabric/models/config_parameter_override_py3.py b/customSDK/servicefabric/models/config_parameter_override_py3.py deleted file mode 100644 index 2bbc6206..00000000 --- a/customSDK/servicefabric/models/config_parameter_override_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ConfigParameterOverride(Model): - """Information about a configuration parameter override. - - All required parameters must be populated in order to send to Azure. - - :param section_name: Required. Name of the section for the parameter - override. - :type section_name: str - :param parameter_name: Required. Name of the parameter that has been - overridden. - :type parameter_name: str - :param parameter_value: Required. Value of the overridden parameter. - :type parameter_value: str - :param timeout: The duration until config override is considered as valid. - :type timeout: timedelta - :param persist_across_upgrade: A value that indicates whether config - override will be removed on upgrade or will still be considered as valid. - :type persist_across_upgrade: bool - """ - - _validation = { - 'section_name': {'required': True}, - 'parameter_name': {'required': True}, - 'parameter_value': {'required': True}, - } - - _attribute_map = { - 'section_name': {'key': 'SectionName', 'type': 'str'}, - 'parameter_name': {'key': 'ParameterName', 'type': 'str'}, - 'parameter_value': {'key': 'ParameterValue', 'type': 'str'}, - 'timeout': {'key': 'Timeout', 'type': 'duration'}, - 'persist_across_upgrade': {'key': 'PersistAcrossUpgrade', 'type': 'bool'}, - } - - def __init__(self, *, section_name: str, parameter_name: str, parameter_value: str, timeout=None, persist_across_upgrade: bool=None, **kwargs) -> None: - super(ConfigParameterOverride, self).__init__(**kwargs) - self.section_name = section_name - self.parameter_name = parameter_name - self.parameter_value = parameter_value - self.timeout = timeout - self.persist_across_upgrade = persist_across_upgrade diff --git a/customSDK/servicefabric/models/container_api_request_body.py b/customSDK/servicefabric/models/container_api_request_body.py deleted file mode 100644 index 71b32cde..00000000 --- a/customSDK/servicefabric/models/container_api_request_body.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerApiRequestBody(Model): - """parameters for making container API call. - - All required parameters must be populated in order to send to Azure. - - :param http_verb: HTTP verb of container REST API, defaults to "GET" - :type http_verb: str - :param uri_path: Required. URI path of container REST API - :type uri_path: str - :param content_type: Content type of container REST API request, defaults - to "application/json" - :type content_type: str - :param body: HTTP request body of container REST API - :type body: str - """ - - _validation = { - 'uri_path': {'required': True}, - } - - _attribute_map = { - 'http_verb': {'key': 'HttpVerb', 'type': 'str'}, - 'uri_path': {'key': 'UriPath', 'type': 'str'}, - 'content_type': {'key': 'Content-Type', 'type': 'str'}, - 'body': {'key': 'Body', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerApiRequestBody, self).__init__(**kwargs) - self.http_verb = kwargs.get('http_verb', None) - self.uri_path = kwargs.get('uri_path', None) - self.content_type = kwargs.get('content_type', None) - self.body = kwargs.get('body', None) diff --git a/customSDK/servicefabric/models/container_api_request_body_py3.py b/customSDK/servicefabric/models/container_api_request_body_py3.py deleted file mode 100644 index 2a44420f..00000000 --- a/customSDK/servicefabric/models/container_api_request_body_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerApiRequestBody(Model): - """parameters for making container API call. - - All required parameters must be populated in order to send to Azure. - - :param http_verb: HTTP verb of container REST API, defaults to "GET" - :type http_verb: str - :param uri_path: Required. URI path of container REST API - :type uri_path: str - :param content_type: Content type of container REST API request, defaults - to "application/json" - :type content_type: str - :param body: HTTP request body of container REST API - :type body: str - """ - - _validation = { - 'uri_path': {'required': True}, - } - - _attribute_map = { - 'http_verb': {'key': 'HttpVerb', 'type': 'str'}, - 'uri_path': {'key': 'UriPath', 'type': 'str'}, - 'content_type': {'key': 'Content-Type', 'type': 'str'}, - 'body': {'key': 'Body', 'type': 'str'}, - } - - def __init__(self, *, uri_path: str, http_verb: str=None, content_type: str=None, body: str=None, **kwargs) -> None: - super(ContainerApiRequestBody, self).__init__(**kwargs) - self.http_verb = http_verb - self.uri_path = uri_path - self.content_type = content_type - self.body = body diff --git a/customSDK/servicefabric/models/container_api_response.py b/customSDK/servicefabric/models/container_api_response.py deleted file mode 100644 index 1289e074..00000000 --- a/customSDK/servicefabric/models/container_api_response.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerApiResponse(Model): - """Response body that wraps container API result. - - All required parameters must be populated in order to send to Azure. - - :param container_api_result: Required. Container API result. - :type container_api_result: ~azure.servicefabric.models.ContainerApiResult - """ - - _validation = { - 'container_api_result': {'required': True}, - } - - _attribute_map = { - 'container_api_result': {'key': 'ContainerApiResult', 'type': 'ContainerApiResult'}, - } - - def __init__(self, **kwargs): - super(ContainerApiResponse, self).__init__(**kwargs) - self.container_api_result = kwargs.get('container_api_result', None) diff --git a/customSDK/servicefabric/models/container_api_response_py3.py b/customSDK/servicefabric/models/container_api_response_py3.py deleted file mode 100644 index ce18615d..00000000 --- a/customSDK/servicefabric/models/container_api_response_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerApiResponse(Model): - """Response body that wraps container API result. - - All required parameters must be populated in order to send to Azure. - - :param container_api_result: Required. Container API result. - :type container_api_result: ~azure.servicefabric.models.ContainerApiResult - """ - - _validation = { - 'container_api_result': {'required': True}, - } - - _attribute_map = { - 'container_api_result': {'key': 'ContainerApiResult', 'type': 'ContainerApiResult'}, - } - - def __init__(self, *, container_api_result, **kwargs) -> None: - super(ContainerApiResponse, self).__init__(**kwargs) - self.container_api_result = container_api_result diff --git a/customSDK/servicefabric/models/container_api_result.py b/customSDK/servicefabric/models/container_api_result.py deleted file mode 100644 index 3fb88baf..00000000 --- a/customSDK/servicefabric/models/container_api_result.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerApiResult(Model): - """Container API result. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. HTTP status code returned by the target container - API - :type status: int - :param content_type: HTTP content type - :type content_type: str - :param content_encoding: HTTP content encoding - :type content_encoding: str - :param body: container API result body - :type body: str - """ - - _validation = { - 'status': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'Status', 'type': 'int'}, - 'content_type': {'key': 'Content-Type', 'type': 'str'}, - 'content_encoding': {'key': 'Content-Encoding', 'type': 'str'}, - 'body': {'key': 'Body', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerApiResult, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.content_type = kwargs.get('content_type', None) - self.content_encoding = kwargs.get('content_encoding', None) - self.body = kwargs.get('body', None) diff --git a/customSDK/servicefabric/models/container_api_result_py3.py b/customSDK/servicefabric/models/container_api_result_py3.py deleted file mode 100644 index c4b43723..00000000 --- a/customSDK/servicefabric/models/container_api_result_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerApiResult(Model): - """Container API result. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. HTTP status code returned by the target container - API - :type status: int - :param content_type: HTTP content type - :type content_type: str - :param content_encoding: HTTP content encoding - :type content_encoding: str - :param body: container API result body - :type body: str - """ - - _validation = { - 'status': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'Status', 'type': 'int'}, - 'content_type': {'key': 'Content-Type', 'type': 'str'}, - 'content_encoding': {'key': 'Content-Encoding', 'type': 'str'}, - 'body': {'key': 'Body', 'type': 'str'}, - } - - def __init__(self, *, status: int, content_type: str=None, content_encoding: str=None, body: str=None, **kwargs) -> None: - super(ContainerApiResult, self).__init__(**kwargs) - self.status = status - self.content_type = content_type - self.content_encoding = content_encoding - self.body = body diff --git a/customSDK/servicefabric/models/container_code_package_properties.py b/customSDK/servicefabric/models/container_code_package_properties.py deleted file mode 100644 index b72df939..00000000 --- a/customSDK/servicefabric/models/container_code_package_properties.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerCodePackageProperties(Model): - """Describes a container and its runtime properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the code package. - :type name: str - :param image: Required. The Container image to use. - :type image: str - :param image_registry_credential: Image registry credential. - :type image_registry_credential: - ~azure.servicefabric.models.ImageRegistryCredential - :param entry_point: Override for the default entry point in the container. - :type entry_point: str - :param commands: Command array to execute within the container in exec - form. - :type commands: list[str] - :param environment_variables: The environment variables to set in this - container - :type environment_variables: - list[~azure.servicefabric.models.EnvironmentVariable] - :param settings: The settings to set in this container. The setting file - path can be fetched from environment variable "Fabric_SettingPath". The - path for Windows container is "C:\\\\secrets". The path for Linux - container is "/var/secrets". - :type settings: list[~azure.servicefabric.models.Setting] - :param labels: The labels to set in this container. - :type labels: list[~azure.servicefabric.models.ContainerLabel] - :param endpoints: The endpoints exposed by this container. - :type endpoints: list[~azure.servicefabric.models.EndpointProperties] - :param resources: Required. The resources required by this container. - :type resources: ~azure.servicefabric.models.ResourceRequirements - :param volume_refs: Volumes to be attached to the container. The lifetime - of these volumes is independent of the application's lifetime. - :type volume_refs: list[~azure.servicefabric.models.VolumeReference] - :param volumes: Volumes to be attached to the container. The lifetime of - these volumes is scoped to the application's lifetime. - :type volumes: list[~azure.servicefabric.models.ApplicationScopedVolume] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :param reliable_collections_refs: A list of ReliableCollection resources - used by this particular code package. Please refer to - ReliableCollectionsRef for more details. - :type reliable_collections_refs: - list[~azure.servicefabric.models.ReliableCollectionsRef] - :ivar instance_view: Runtime information of a container instance. - :vartype instance_view: ~azure.servicefabric.models.ContainerInstanceView - :param liveness_probe: An array of liveness probes for a code package. It - determines when to restart a code package. - :type liveness_probe: list[~azure.servicefabric.models.Probe] - :param readiness_probe: An array of readiness probes for a code package. - It determines when to unpublish an endpoint. - :type readiness_probe: list[~azure.servicefabric.models.Probe] - """ - - _validation = { - 'name': {'required': True}, - 'image': {'required': True}, - 'resources': {'required': True}, - 'instance_view': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'image': {'key': 'image', 'type': 'str'}, - 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, - 'entry_point': {'key': 'entryPoint', 'type': 'str'}, - 'commands': {'key': 'commands', 'type': '[str]'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'}, - 'settings': {'key': 'settings', 'type': '[Setting]'}, - 'labels': {'key': 'labels', 'type': '[ContainerLabel]'}, - 'endpoints': {'key': 'endpoints', 'type': '[EndpointProperties]'}, - 'resources': {'key': 'resources', 'type': 'ResourceRequirements'}, - 'volume_refs': {'key': 'volumeRefs', 'type': '[VolumeReference]'}, - 'volumes': {'key': 'volumes', 'type': '[ApplicationScopedVolume]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - 'reliable_collections_refs': {'key': 'reliableCollectionsRefs', 'type': '[ReliableCollectionsRef]'}, - 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, - 'liveness_probe': {'key': 'livenessProbe', 'type': '[Probe]'}, - 'readiness_probe': {'key': 'readinessProbe', 'type': '[Probe]'}, - } - - def __init__(self, **kwargs): - super(ContainerCodePackageProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.image = kwargs.get('image', None) - self.image_registry_credential = kwargs.get('image_registry_credential', None) - self.entry_point = kwargs.get('entry_point', None) - self.commands = kwargs.get('commands', None) - self.environment_variables = kwargs.get('environment_variables', None) - self.settings = kwargs.get('settings', None) - self.labels = kwargs.get('labels', None) - self.endpoints = kwargs.get('endpoints', None) - self.resources = kwargs.get('resources', None) - self.volume_refs = kwargs.get('volume_refs', None) - self.volumes = kwargs.get('volumes', None) - self.diagnostics = kwargs.get('diagnostics', None) - self.reliable_collections_refs = kwargs.get('reliable_collections_refs', None) - self.instance_view = None - self.liveness_probe = kwargs.get('liveness_probe', None) - self.readiness_probe = kwargs.get('readiness_probe', None) diff --git a/customSDK/servicefabric/models/container_code_package_properties_py3.py b/customSDK/servicefabric/models/container_code_package_properties_py3.py deleted file mode 100644 index 29327cb6..00000000 --- a/customSDK/servicefabric/models/container_code_package_properties_py3.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerCodePackageProperties(Model): - """Describes a container and its runtime properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the code package. - :type name: str - :param image: Required. The Container image to use. - :type image: str - :param image_registry_credential: Image registry credential. - :type image_registry_credential: - ~azure.servicefabric.models.ImageRegistryCredential - :param entry_point: Override for the default entry point in the container. - :type entry_point: str - :param commands: Command array to execute within the container in exec - form. - :type commands: list[str] - :param environment_variables: The environment variables to set in this - container - :type environment_variables: - list[~azure.servicefabric.models.EnvironmentVariable] - :param settings: The settings to set in this container. The setting file - path can be fetched from environment variable "Fabric_SettingPath". The - path for Windows container is "C:\\\\secrets". The path for Linux - container is "/var/secrets". - :type settings: list[~azure.servicefabric.models.Setting] - :param labels: The labels to set in this container. - :type labels: list[~azure.servicefabric.models.ContainerLabel] - :param endpoints: The endpoints exposed by this container. - :type endpoints: list[~azure.servicefabric.models.EndpointProperties] - :param resources: Required. The resources required by this container. - :type resources: ~azure.servicefabric.models.ResourceRequirements - :param volume_refs: Volumes to be attached to the container. The lifetime - of these volumes is independent of the application's lifetime. - :type volume_refs: list[~azure.servicefabric.models.VolumeReference] - :param volumes: Volumes to be attached to the container. The lifetime of - these volumes is scoped to the application's lifetime. - :type volumes: list[~azure.servicefabric.models.ApplicationScopedVolume] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :param reliable_collections_refs: A list of ReliableCollection resources - used by this particular code package. Please refer to - ReliableCollectionsRef for more details. - :type reliable_collections_refs: - list[~azure.servicefabric.models.ReliableCollectionsRef] - :ivar instance_view: Runtime information of a container instance. - :vartype instance_view: ~azure.servicefabric.models.ContainerInstanceView - :param liveness_probe: An array of liveness probes for a code package. It - determines when to restart a code package. - :type liveness_probe: list[~azure.servicefabric.models.Probe] - :param readiness_probe: An array of readiness probes for a code package. - It determines when to unpublish an endpoint. - :type readiness_probe: list[~azure.servicefabric.models.Probe] - """ - - _validation = { - 'name': {'required': True}, - 'image': {'required': True}, - 'resources': {'required': True}, - 'instance_view': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'image': {'key': 'image', 'type': 'str'}, - 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, - 'entry_point': {'key': 'entryPoint', 'type': 'str'}, - 'commands': {'key': 'commands', 'type': '[str]'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'}, - 'settings': {'key': 'settings', 'type': '[Setting]'}, - 'labels': {'key': 'labels', 'type': '[ContainerLabel]'}, - 'endpoints': {'key': 'endpoints', 'type': '[EndpointProperties]'}, - 'resources': {'key': 'resources', 'type': 'ResourceRequirements'}, - 'volume_refs': {'key': 'volumeRefs', 'type': '[VolumeReference]'}, - 'volumes': {'key': 'volumes', 'type': '[ApplicationScopedVolume]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - 'reliable_collections_refs': {'key': 'reliableCollectionsRefs', 'type': '[ReliableCollectionsRef]'}, - 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, - 'liveness_probe': {'key': 'livenessProbe', 'type': '[Probe]'}, - 'readiness_probe': {'key': 'readinessProbe', 'type': '[Probe]'}, - } - - def __init__(self, *, name: str, image: str, resources, image_registry_credential=None, entry_point: str=None, commands=None, environment_variables=None, settings=None, labels=None, endpoints=None, volume_refs=None, volumes=None, diagnostics=None, reliable_collections_refs=None, liveness_probe=None, readiness_probe=None, **kwargs) -> None: - super(ContainerCodePackageProperties, self).__init__(**kwargs) - self.name = name - self.image = image - self.image_registry_credential = image_registry_credential - self.entry_point = entry_point - self.commands = commands - self.environment_variables = environment_variables - self.settings = settings - self.labels = labels - self.endpoints = endpoints - self.resources = resources - self.volume_refs = volume_refs - self.volumes = volumes - self.diagnostics = diagnostics - self.reliable_collections_refs = reliable_collections_refs - self.instance_view = None - self.liveness_probe = liveness_probe - self.readiness_probe = readiness_probe diff --git a/customSDK/servicefabric/models/container_event.py b/customSDK/servicefabric/models/container_event.py deleted file mode 100644 index 36bb437c..00000000 --- a/customSDK/servicefabric/models/container_event.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerEvent(Model): - """A container event. - - :param name: The name of the container event. - :type name: str - :param count: The count of the event. - :type count: int - :param first_timestamp: Date/time of the first event. - :type first_timestamp: str - :param last_timestamp: Date/time of the last event. - :type last_timestamp: str - :param message: The event message - :type message: str - :param type: The event type. - :type type: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, - 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerEvent, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', None) - self.first_timestamp = kwargs.get('first_timestamp', None) - self.last_timestamp = kwargs.get('last_timestamp', None) - self.message = kwargs.get('message', None) - self.type = kwargs.get('type', None) diff --git a/customSDK/servicefabric/models/container_event_py3.py b/customSDK/servicefabric/models/container_event_py3.py deleted file mode 100644 index 4851036a..00000000 --- a/customSDK/servicefabric/models/container_event_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerEvent(Model): - """A container event. - - :param name: The name of the container event. - :type name: str - :param count: The count of the event. - :type count: int - :param first_timestamp: Date/time of the first event. - :type first_timestamp: str - :param last_timestamp: Date/time of the last event. - :type last_timestamp: str - :param message: The event message - :type message: str - :param type: The event type. - :type type: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, - 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, count: int=None, first_timestamp: str=None, last_timestamp: str=None, message: str=None, type: str=None, **kwargs) -> None: - super(ContainerEvent, self).__init__(**kwargs) - self.name = name - self.count = count - self.first_timestamp = first_timestamp - self.last_timestamp = last_timestamp - self.message = message - self.type = type diff --git a/customSDK/servicefabric/models/container_instance_event.py b/customSDK/servicefabric/models/container_instance_event.py deleted file mode 100644 index 1796cecb..00000000 --- a/customSDK/servicefabric/models/container_instance_event.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .fabric_event import FabricEvent - - -class ContainerInstanceEvent(FabricEvent): - """Represents the base for all Container Events. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerInstanceEvent, self).__init__(**kwargs) - self.kind = 'ContainerInstanceEvent' diff --git a/customSDK/servicefabric/models/container_instance_event_py3.py b/customSDK/servicefabric/models/container_instance_event_py3.py deleted file mode 100644 index 82e227c1..00000000 --- a/customSDK/servicefabric/models/container_instance_event_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .fabric_event_py3 import FabricEvent - - -class ContainerInstanceEvent(FabricEvent): - """Represents the base for all Container Events. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ContainerInstanceEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ContainerInstanceEvent' diff --git a/customSDK/servicefabric/models/container_instance_view.py b/customSDK/servicefabric/models/container_instance_view.py deleted file mode 100644 index 74d0408d..00000000 --- a/customSDK/servicefabric/models/container_instance_view.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerInstanceView(Model): - """Runtime information of a container instance. - - :param restart_count: The number of times the container has been - restarted. - :type restart_count: int - :param current_state: Current container instance state. - :type current_state: ~azure.servicefabric.models.ContainerState - :param previous_state: Previous container instance state. - :type previous_state: ~azure.servicefabric.models.ContainerState - :param events: The events of this container instance. - :type events: list[~azure.servicefabric.models.ContainerEvent] - """ - - _attribute_map = { - 'restart_count': {'key': 'restartCount', 'type': 'int'}, - 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, - 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, - 'events': {'key': 'events', 'type': '[ContainerEvent]'}, - } - - def __init__(self, **kwargs): - super(ContainerInstanceView, self).__init__(**kwargs) - self.restart_count = kwargs.get('restart_count', None) - self.current_state = kwargs.get('current_state', None) - self.previous_state = kwargs.get('previous_state', None) - self.events = kwargs.get('events', None) diff --git a/customSDK/servicefabric/models/container_instance_view_py3.py b/customSDK/servicefabric/models/container_instance_view_py3.py deleted file mode 100644 index 2f14ce0f..00000000 --- a/customSDK/servicefabric/models/container_instance_view_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerInstanceView(Model): - """Runtime information of a container instance. - - :param restart_count: The number of times the container has been - restarted. - :type restart_count: int - :param current_state: Current container instance state. - :type current_state: ~azure.servicefabric.models.ContainerState - :param previous_state: Previous container instance state. - :type previous_state: ~azure.servicefabric.models.ContainerState - :param events: The events of this container instance. - :type events: list[~azure.servicefabric.models.ContainerEvent] - """ - - _attribute_map = { - 'restart_count': {'key': 'restartCount', 'type': 'int'}, - 'current_state': {'key': 'currentState', 'type': 'ContainerState'}, - 'previous_state': {'key': 'previousState', 'type': 'ContainerState'}, - 'events': {'key': 'events', 'type': '[ContainerEvent]'}, - } - - def __init__(self, *, restart_count: int=None, current_state=None, previous_state=None, events=None, **kwargs) -> None: - super(ContainerInstanceView, self).__init__(**kwargs) - self.restart_count = restart_count - self.current_state = current_state - self.previous_state = previous_state - self.events = events diff --git a/customSDK/servicefabric/models/container_label.py b/customSDK/servicefabric/models/container_label.py deleted file mode 100644 index f474f141..00000000 --- a/customSDK/servicefabric/models/container_label.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerLabel(Model): - """Describes a container label. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the container label. - :type name: str - :param value: Required. The value of the container label. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerLabel, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/container_label_py3.py b/customSDK/servicefabric/models/container_label_py3.py deleted file mode 100644 index 11832639..00000000 --- a/customSDK/servicefabric/models/container_label_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerLabel(Model): - """Describes a container label. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the container label. - :type name: str - :param value: Required. The value of the container label. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str, **kwargs) -> None: - super(ContainerLabel, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/customSDK/servicefabric/models/container_logs.py b/customSDK/servicefabric/models/container_logs.py deleted file mode 100644 index d7c5ca91..00000000 --- a/customSDK/servicefabric/models/container_logs.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerLogs(Model): - """Container logs. - - :param content: Container logs. - :type content: str - """ - - _attribute_map = { - 'content': {'key': 'Content', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerLogs, self).__init__(**kwargs) - self.content = kwargs.get('content', None) diff --git a/customSDK/servicefabric/models/container_logs_py3.py b/customSDK/servicefabric/models/container_logs_py3.py deleted file mode 100644 index 02904405..00000000 --- a/customSDK/servicefabric/models/container_logs_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerLogs(Model): - """Container logs. - - :param content: Container logs. - :type content: str - """ - - _attribute_map = { - 'content': {'key': 'Content', 'type': 'str'}, - } - - def __init__(self, *, content: str=None, **kwargs) -> None: - super(ContainerLogs, self).__init__(**kwargs) - self.content = content diff --git a/customSDK/servicefabric/models/container_state.py b/customSDK/servicefabric/models/container_state.py deleted file mode 100644 index 3e2c2bf0..00000000 --- a/customSDK/servicefabric/models/container_state.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerState(Model): - """The container state. - - :param state: The state of this container - :type state: str - :param start_time: Date/time when the container state started. - :type start_time: datetime - :param exit_code: The container exit code. - :type exit_code: str - :param finish_time: Date/time when the container state finished. - :type finish_time: datetime - :param detail_status: Human-readable status of this state. - :type detail_status: str - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'exit_code': {'key': 'exitCode', 'type': 'str'}, - 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, - 'detail_status': {'key': 'detailStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerState, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.start_time = kwargs.get('start_time', None) - self.exit_code = kwargs.get('exit_code', None) - self.finish_time = kwargs.get('finish_time', None) - self.detail_status = kwargs.get('detail_status', None) diff --git a/customSDK/servicefabric/models/container_state_py3.py b/customSDK/servicefabric/models/container_state_py3.py deleted file mode 100644 index eb2f5195..00000000 --- a/customSDK/servicefabric/models/container_state_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerState(Model): - """The container state. - - :param state: The state of this container - :type state: str - :param start_time: Date/time when the container state started. - :type start_time: datetime - :param exit_code: The container exit code. - :type exit_code: str - :param finish_time: Date/time when the container state finished. - :type finish_time: datetime - :param detail_status: Human-readable status of this state. - :type detail_status: str - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'exit_code': {'key': 'exitCode', 'type': 'str'}, - 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, - 'detail_status': {'key': 'detailStatus', 'type': 'str'}, - } - - def __init__(self, *, state: str=None, start_time=None, exit_code: str=None, finish_time=None, detail_status: str=None, **kwargs) -> None: - super(ContainerState, self).__init__(**kwargs) - self.state = state - self.start_time = start_time - self.exit_code = exit_code - self.finish_time = finish_time - self.detail_status = detail_status diff --git a/customSDK/servicefabric/models/create_compose_deployment_description.py b/customSDK/servicefabric/models/create_compose_deployment_description.py deleted file mode 100644 index dea010ec..00000000 --- a/customSDK/servicefabric/models/create_compose_deployment_description.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateComposeDeploymentDescription(Model): - """Defines description for creating a Service Fabric compose deployment. - - All required parameters must be populated in order to send to Azure. - - :param deployment_name: Required. The name of the deployment. - :type deployment_name: str - :param compose_file_content: Required. The content of the compose file - that describes the deployment to create. - :type compose_file_content: str - :param registry_credential: Credential information to connect to container - registry. - :type registry_credential: ~azure.servicefabric.models.RegistryCredential - """ - - _validation = { - 'deployment_name': {'required': True}, - 'compose_file_content': {'required': True}, - } - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, - 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, - } - - def __init__(self, **kwargs): - super(CreateComposeDeploymentDescription, self).__init__(**kwargs) - self.deployment_name = kwargs.get('deployment_name', None) - self.compose_file_content = kwargs.get('compose_file_content', None) - self.registry_credential = kwargs.get('registry_credential', None) diff --git a/customSDK/servicefabric/models/create_compose_deployment_description_py3.py b/customSDK/servicefabric/models/create_compose_deployment_description_py3.py deleted file mode 100644 index 8a8f1155..00000000 --- a/customSDK/servicefabric/models/create_compose_deployment_description_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CreateComposeDeploymentDescription(Model): - """Defines description for creating a Service Fabric compose deployment. - - All required parameters must be populated in order to send to Azure. - - :param deployment_name: Required. The name of the deployment. - :type deployment_name: str - :param compose_file_content: Required. The content of the compose file - that describes the deployment to create. - :type compose_file_content: str - :param registry_credential: Credential information to connect to container - registry. - :type registry_credential: ~azure.servicefabric.models.RegistryCredential - """ - - _validation = { - 'deployment_name': {'required': True}, - 'compose_file_content': {'required': True}, - } - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, - 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, - } - - def __init__(self, *, deployment_name: str, compose_file_content: str, registry_credential=None, **kwargs) -> None: - super(CreateComposeDeploymentDescription, self).__init__(**kwargs) - self.deployment_name = deployment_name - self.compose_file_content = compose_file_content - self.registry_credential = registry_credential diff --git a/customSDK/servicefabric/models/current_upgrade_domain_progress_info.py b/customSDK/servicefabric/models/current_upgrade_domain_progress_info.py deleted file mode 100644 index d4a38afd..00000000 --- a/customSDK/servicefabric/models/current_upgrade_domain_progress_info.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CurrentUpgradeDomainProgressInfo(Model): - """Information about the current in-progress upgrade domain. Not applicable to - node-by-node upgrades. - - :param domain_name: The name of the upgrade domain - :type domain_name: str - :param node_upgrade_progress_list: List of upgrading nodes and their - statuses - :type node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__(self, **kwargs): - super(CurrentUpgradeDomainProgressInfo, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) diff --git a/customSDK/servicefabric/models/current_upgrade_domain_progress_info_py3.py b/customSDK/servicefabric/models/current_upgrade_domain_progress_info_py3.py deleted file mode 100644 index 25c94fe8..00000000 --- a/customSDK/servicefabric/models/current_upgrade_domain_progress_info_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CurrentUpgradeDomainProgressInfo(Model): - """Information about the current in-progress upgrade domain. Not applicable to - node-by-node upgrades. - - :param domain_name: The name of the upgrade domain - :type domain_name: str - :param node_upgrade_progress_list: List of upgrading nodes and their - statuses - :type node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: - super(CurrentUpgradeDomainProgressInfo, self).__init__(**kwargs) - self.domain_name = domain_name - self.node_upgrade_progress_list = node_upgrade_progress_list diff --git a/customSDK/servicefabric/models/current_upgrade_units_progress_info.py b/customSDK/servicefabric/models/current_upgrade_units_progress_info.py deleted file mode 100644 index db67d224..00000000 --- a/customSDK/servicefabric/models/current_upgrade_units_progress_info.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CurrentUpgradeUnitsProgressInfo(Model): - """Information about the current in-progress upgrade units. - - :param domain_name: The name of the upgrade domain. Not applicable to - node-by-node upgrades. - :type domain_name: str - :param node_upgrade_progress_list: List of upgrading nodes and their - statuses - :type node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__(self, **kwargs): - super(CurrentUpgradeUnitsProgressInfo, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) diff --git a/customSDK/servicefabric/models/current_upgrade_units_progress_info_py3.py b/customSDK/servicefabric/models/current_upgrade_units_progress_info_py3.py deleted file mode 100644 index 016c6468..00000000 --- a/customSDK/servicefabric/models/current_upgrade_units_progress_info_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CurrentUpgradeUnitsProgressInfo(Model): - """Information about the current in-progress upgrade units. - - :param domain_name: The name of the upgrade domain. Not applicable to - node-by-node upgrades. - :type domain_name: str - :param node_upgrade_progress_list: List of upgrading nodes and their - statuses - :type node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: - super(CurrentUpgradeUnitsProgressInfo, self).__init__(**kwargs) - self.domain_name = domain_name - self.node_upgrade_progress_list = node_upgrade_progress_list diff --git a/customSDK/servicefabric/models/deactivation_intent_description.py b/customSDK/servicefabric/models/deactivation_intent_description.py deleted file mode 100644 index 28dab1f7..00000000 --- a/customSDK/servicefabric/models/deactivation_intent_description.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeactivationIntentDescription(Model): - """Describes the intent or reason for deactivating the node. - - :param deactivation_intent: Describes the intent or reason for - deactivating the node. The possible values are following. Possible values - include: 'Pause', 'Restart', 'RemoveData' - :type deactivation_intent: str or - ~azure.servicefabric.models.DeactivationIntent - """ - - _attribute_map = { - 'deactivation_intent': {'key': 'DeactivationIntent', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeactivationIntentDescription, self).__init__(**kwargs) - self.deactivation_intent = kwargs.get('deactivation_intent', None) diff --git a/customSDK/servicefabric/models/deactivation_intent_description_py3.py b/customSDK/servicefabric/models/deactivation_intent_description_py3.py deleted file mode 100644 index b5384272..00000000 --- a/customSDK/servicefabric/models/deactivation_intent_description_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeactivationIntentDescription(Model): - """Describes the intent or reason for deactivating the node. - - :param deactivation_intent: Describes the intent or reason for - deactivating the node. The possible values are following. Possible values - include: 'Pause', 'Restart', 'RemoveData' - :type deactivation_intent: str or - ~azure.servicefabric.models.DeactivationIntent - """ - - _attribute_map = { - 'deactivation_intent': {'key': 'DeactivationIntent', 'type': 'str'}, - } - - def __init__(self, *, deactivation_intent=None, **kwargs) -> None: - super(DeactivationIntentDescription, self).__init__(**kwargs) - self.deactivation_intent = deactivation_intent diff --git a/customSDK/servicefabric/models/default_execution_policy.py b/customSDK/servicefabric/models/default_execution_policy.py deleted file mode 100644 index 2e6aa01b..00000000 --- a/customSDK/servicefabric/models/default_execution_policy.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_policy import ExecutionPolicy - - -class DefaultExecutionPolicy(ExecutionPolicy): - """The default execution policy. Always restart the service if an exit occurs. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DefaultExecutionPolicy, self).__init__(**kwargs) - self.type = 'Default' diff --git a/customSDK/servicefabric/models/default_execution_policy_py3.py b/customSDK/servicefabric/models/default_execution_policy_py3.py deleted file mode 100644 index bf278f54..00000000 --- a/customSDK/servicefabric/models/default_execution_policy_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_policy_py3 import ExecutionPolicy - - -class DefaultExecutionPolicy(ExecutionPolicy): - """The default execution policy. Always restart the service if an exit occurs. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DefaultExecutionPolicy, self).__init__(**kwargs) - self.type = 'Default' diff --git a/customSDK/servicefabric/models/delete_property_batch_operation.py b/customSDK/servicefabric/models/delete_property_batch_operation.py deleted file mode 100644 index f41dda1c..00000000 --- a/customSDK/servicefabric/models/delete_property_batch_operation.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_batch_operation import PropertyBatchOperation - - -class DeletePropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that deletes a specified property if it - exists. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeletePropertyBatchOperation, self).__init__(**kwargs) - self.kind = 'Delete' diff --git a/customSDK/servicefabric/models/delete_property_batch_operation_py3.py b/customSDK/servicefabric/models/delete_property_batch_operation_py3.py deleted file mode 100644 index 28cdf2c1..00000000 --- a/customSDK/servicefabric/models/delete_property_batch_operation_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_batch_operation_py3 import PropertyBatchOperation - - -class DeletePropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that deletes a specified property if it - exists. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - def __init__(self, *, property_name: str, **kwargs) -> None: - super(DeletePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.kind = 'Delete' diff --git a/customSDK/servicefabric/models/delta_nodes_check_health_evaluation.py b/customSDK/servicefabric/models/delta_nodes_check_health_evaluation.py deleted file mode 100644 index a619a7e4..00000000 --- a/customSDK/servicefabric/models/delta_nodes_check_health_evaluation.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class DeltaNodesCheckHealthEvaluation(HealthEvaluation): - """Represents health evaluation for delta nodes, containing health evaluations - for each unhealthy node that impacted current aggregated health state. - Can be returned during cluster upgrade when the aggregated health state of - the cluster is Warning or Error. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param baseline_error_count: Number of nodes with aggregated heath state - Error in the health store at the beginning of the cluster upgrade. - :type baseline_error_count: long - :param baseline_total_count: Total number of nodes in the health store at - the beginning of the cluster upgrade. - :type baseline_total_count: long - :param max_percent_delta_unhealthy_nodes: Maximum allowed percentage of - delta unhealthy nodes from the ClusterUpgradeHealthPolicy. - :type max_percent_delta_unhealthy_nodes: int - :param total_count: Total number of nodes in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. - Includes all the unhealthy NodeHealthEvaluation that impacted the - aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, - 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(DeltaNodesCheckHealthEvaluation, self).__init__(**kwargs) - self.baseline_error_count = kwargs.get('baseline_error_count', None) - self.baseline_total_count = kwargs.get('baseline_total_count', None) - self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'DeltaNodesCheck' diff --git a/customSDK/servicefabric/models/delta_nodes_check_health_evaluation_py3.py b/customSDK/servicefabric/models/delta_nodes_check_health_evaluation_py3.py deleted file mode 100644 index 7bbbc05f..00000000 --- a/customSDK/servicefabric/models/delta_nodes_check_health_evaluation_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class DeltaNodesCheckHealthEvaluation(HealthEvaluation): - """Represents health evaluation for delta nodes, containing health evaluations - for each unhealthy node that impacted current aggregated health state. - Can be returned during cluster upgrade when the aggregated health state of - the cluster is Warning or Error. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param baseline_error_count: Number of nodes with aggregated heath state - Error in the health store at the beginning of the cluster upgrade. - :type baseline_error_count: long - :param baseline_total_count: Total number of nodes in the health store at - the beginning of the cluster upgrade. - :type baseline_total_count: long - :param max_percent_delta_unhealthy_nodes: Maximum allowed percentage of - delta unhealthy nodes from the ClusterUpgradeHealthPolicy. - :type max_percent_delta_unhealthy_nodes: int - :param total_count: Total number of nodes in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. - Includes all the unhealthy NodeHealthEvaluation that impacted the - aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, - 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, baseline_error_count: int=None, baseline_total_count: int=None, max_percent_delta_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(DeltaNodesCheckHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.baseline_error_count = baseline_error_count - self.baseline_total_count = baseline_total_count - self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'DeltaNodesCheck' diff --git a/customSDK/servicefabric/models/deploy_service_package_to_node_description.py b/customSDK/servicefabric/models/deploy_service_package_to_node_description.py deleted file mode 100644 index 82050e16..00000000 --- a/customSDK/servicefabric/models/deploy_service_package_to_node_description.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployServicePackageToNodeDescription(Model): - """Defines description for downloading packages associated with a service - manifest to image cache on a Service Fabric node. - - All required parameters must be populated in order to send to Azure. - - :param service_manifest_name: Required. The name of service manifest whose - packages need to be downloaded. - :type service_manifest_name: str - :param application_type_name: Required. The application type name as - defined in the application manifest. - :type application_type_name: str - :param application_type_version: Required. The version of the application - type as defined in the application manifest. - :type application_type_version: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param package_sharing_policy: List of package sharing policy information. - :type package_sharing_policy: - list[~azure.servicefabric.models.PackageSharingPolicyInfo] - """ - - _validation = { - 'service_manifest_name': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'node_name': {'required': True}, - } - - _attribute_map = { - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'package_sharing_policy': {'key': 'PackageSharingPolicy', 'type': '[PackageSharingPolicyInfo]'}, - } - - def __init__(self, **kwargs): - super(DeployServicePackageToNodeDescription, self).__init__(**kwargs) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.node_name = kwargs.get('node_name', None) - self.package_sharing_policy = kwargs.get('package_sharing_policy', None) diff --git a/customSDK/servicefabric/models/deploy_service_package_to_node_description_py3.py b/customSDK/servicefabric/models/deploy_service_package_to_node_description_py3.py deleted file mode 100644 index 0b2e6238..00000000 --- a/customSDK/servicefabric/models/deploy_service_package_to_node_description_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployServicePackageToNodeDescription(Model): - """Defines description for downloading packages associated with a service - manifest to image cache on a Service Fabric node. - - All required parameters must be populated in order to send to Azure. - - :param service_manifest_name: Required. The name of service manifest whose - packages need to be downloaded. - :type service_manifest_name: str - :param application_type_name: Required. The application type name as - defined in the application manifest. - :type application_type_name: str - :param application_type_version: Required. The version of the application - type as defined in the application manifest. - :type application_type_version: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param package_sharing_policy: List of package sharing policy information. - :type package_sharing_policy: - list[~azure.servicefabric.models.PackageSharingPolicyInfo] - """ - - _validation = { - 'service_manifest_name': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'node_name': {'required': True}, - } - - _attribute_map = { - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'package_sharing_policy': {'key': 'PackageSharingPolicy', 'type': '[PackageSharingPolicyInfo]'}, - } - - def __init__(self, *, service_manifest_name: str, application_type_name: str, application_type_version: str, node_name: str, package_sharing_policy=None, **kwargs) -> None: - super(DeployServicePackageToNodeDescription, self).__init__(**kwargs) - self.service_manifest_name = service_manifest_name - self.application_type_name = application_type_name - self.application_type_version = application_type_version - self.node_name = node_name - self.package_sharing_policy = package_sharing_policy diff --git a/customSDK/servicefabric/models/deployed_application_health.py b/customSDK/servicefabric/models/deployed_application_health.py deleted file mode 100644 index a76e0fbf..00000000 --- a/customSDK/servicefabric/models/deployed_application_health.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health import EntityHealth - - -class DeployedApplicationHealth(EntityHealth): - """Information about the health of an application deployed on a Service Fabric - node. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param name: Name of the application deployed on the node whose health - information is described by this object. - :type name: str - :param node_name: Name of the node where this application is deployed. - :type node_name: str - :param deployed_service_package_health_states: Deployed service package - health states for the current deployed application as found in the health - store. - :type deployed_service_package_health_states: - list[~azure.servicefabric.models.DeployedServicePackageHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'deployed_service_package_health_states': {'key': 'DeployedServicePackageHealthStates', 'type': '[DeployedServicePackageHealthState]'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationHealth, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.node_name = kwargs.get('node_name', None) - self.deployed_service_package_health_states = kwargs.get('deployed_service_package_health_states', None) diff --git a/customSDK/servicefabric/models/deployed_application_health_evaluation.py b/customSDK/servicefabric/models/deployed_application_health_evaluation.py deleted file mode 100644 index ea06a32a..00000000 --- a/customSDK/servicefabric/models/deployed_application_health_evaluation.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class DeployedApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a deployed application, containing - information about the data and the algorithm used by the health store to - evaluate health. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Name of the node where the application is deployed to. - :type node_name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the deployed application. - The types of the unhealthy evaluations can be - DeployedServicePackagesHealthEvaluation or EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationHealthEvaluation, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.application_name = kwargs.get('application_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'DeployedApplication' diff --git a/customSDK/servicefabric/models/deployed_application_health_evaluation_py3.py b/customSDK/servicefabric/models/deployed_application_health_evaluation_py3.py deleted file mode 100644 index 2cade0cc..00000000 --- a/customSDK/servicefabric/models/deployed_application_health_evaluation_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class DeployedApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a deployed application, containing - information about the data and the algorithm used by the health store to - evaluate health. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Name of the node where the application is deployed to. - :type node_name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the deployed application. - The types of the unhealthy evaluations can be - DeployedServicePackagesHealthEvaluation or EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, node_name: str=None, application_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(DeployedApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.node_name = node_name - self.application_name = application_name - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'DeployedApplication' diff --git a/customSDK/servicefabric/models/deployed_application_health_py3.py b/customSDK/servicefabric/models/deployed_application_health_py3.py deleted file mode 100644 index fe011b34..00000000 --- a/customSDK/servicefabric/models/deployed_application_health_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_py3 import EntityHealth - - -class DeployedApplicationHealth(EntityHealth): - """Information about the health of an application deployed on a Service Fabric - node. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param name: Name of the application deployed on the node whose health - information is described by this object. - :type name: str - :param node_name: Name of the node where this application is deployed. - :type node_name: str - :param deployed_service_package_health_states: Deployed service package - health states for the current deployed application as found in the health - store. - :type deployed_service_package_health_states: - list[~azure.servicefabric.models.DeployedServicePackageHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'deployed_service_package_health_states': {'key': 'DeployedServicePackageHealthStates', 'type': '[DeployedServicePackageHealthState]'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, node_name: str=None, deployed_service_package_health_states=None, **kwargs) -> None: - super(DeployedApplicationHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.name = name - self.node_name = node_name - self.deployed_service_package_health_states = deployed_service_package_health_states diff --git a/customSDK/servicefabric/models/deployed_application_health_report_expired_event.py b/customSDK/servicefabric/models/deployed_application_health_report_expired_event.py deleted file mode 100644 index 5646f2d6..00000000 --- a/customSDK/servicefabric/models/deployed_application_health_report_expired_event.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event import ApplicationEvent - - -class DeployedApplicationHealthReportExpiredEvent(ApplicationEvent): - """Deployed Application Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_instance_id: Required. Id of Application instance. - :type application_instance_id: long - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationHealthReportExpiredEvent, self).__init__(**kwargs) - self.application_instance_id = kwargs.get('application_instance_id', None) - self.node_name = kwargs.get('node_name', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'DeployedApplicationHealthReportExpired' diff --git a/customSDK/servicefabric/models/deployed_application_health_report_expired_event_py3.py b/customSDK/servicefabric/models/deployed_application_health_report_expired_event_py3.py deleted file mode 100644 index 29489b61..00000000 --- a/customSDK/servicefabric/models/deployed_application_health_report_expired_event_py3.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event_py3 import ApplicationEvent - - -class DeployedApplicationHealthReportExpiredEvent(ApplicationEvent): - """Deployed Application Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_instance_id: Required. Id of Application instance. - :type application_instance_id: long - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(DeployedApplicationHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_instance_id = application_instance_id - self.node_name = node_name - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'DeployedApplicationHealthReportExpired' diff --git a/customSDK/servicefabric/models/deployed_application_health_state.py b/customSDK/servicefabric/models/deployed_application_health_state.py deleted file mode 100644 index 6098de81..00000000 --- a/customSDK/servicefabric/models/deployed_application_health_state.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state import EntityHealthState - - -class DeployedApplicationHealthState(EntityHealthState): - """Represents the health state of a deployed application, which contains the - entity identifier and the aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param node_name: Name of the node on which the service package is - deployed. - :type node_name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationHealthState, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.application_name = kwargs.get('application_name', None) diff --git a/customSDK/servicefabric/models/deployed_application_health_state_chunk.py b/customSDK/servicefabric/models/deployed_application_health_state_chunk.py deleted file mode 100644 index cc46bad3..00000000 --- a/customSDK/servicefabric/models/deployed_application_health_state_chunk.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk import EntityHealthStateChunk - - -class DeployedApplicationHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a deployed application, which contains - the node where the application is deployed, the aggregated health state and - any deployed service packages that respect the chunk query description - filters. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of node where the application is deployed. - :type node_name: str - :param deployed_service_package_health_state_chunks: The list of deployed - service package health state chunks belonging to the deployed application - that respect the filters in the cluster health chunk query description. - :type deployed_service_package_health_state_chunks: - ~azure.servicefabric.models.DeployedServicePackageHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'deployed_service_package_health_state_chunks': {'key': 'DeployedServicePackageHealthStateChunks', 'type': 'DeployedServicePackageHealthStateChunkList'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationHealthStateChunk, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.deployed_service_package_health_state_chunks = kwargs.get('deployed_service_package_health_state_chunks', None) diff --git a/customSDK/servicefabric/models/deployed_application_health_state_chunk_list.py b/customSDK/servicefabric/models/deployed_application_health_state_chunk_list.py deleted file mode 100644 index 81b2792b..00000000 --- a/customSDK/servicefabric/models/deployed_application_health_state_chunk_list.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedApplicationHealthStateChunkList(Model): - """The list of deployed application health state chunks that respect the input - filters in the chunk query. Returned by get cluster health state chunks - query. - - :param items: The list of deployed application health state chunks that - respect the input filters in the chunk query. - :type items: - list[~azure.servicefabric.models.DeployedApplicationHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[DeployedApplicationHealthStateChunk]'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/deployed_application_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/deployed_application_health_state_chunk_list_py3.py deleted file mode 100644 index 74d8f231..00000000 --- a/customSDK/servicefabric/models/deployed_application_health_state_chunk_list_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedApplicationHealthStateChunkList(Model): - """The list of deployed application health state chunks that respect the input - filters in the chunk query. Returned by get cluster health state chunks - query. - - :param items: The list of deployed application health state chunks that - respect the input filters in the chunk query. - :type items: - list[~azure.servicefabric.models.DeployedApplicationHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[DeployedApplicationHealthStateChunk]'}, - } - - def __init__(self, *, items=None, **kwargs) -> None: - super(DeployedApplicationHealthStateChunkList, self).__init__(**kwargs) - self.items = items diff --git a/customSDK/servicefabric/models/deployed_application_health_state_chunk_py3.py b/customSDK/servicefabric/models/deployed_application_health_state_chunk_py3.py deleted file mode 100644 index e242b862..00000000 --- a/customSDK/servicefabric/models/deployed_application_health_state_chunk_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk_py3 import EntityHealthStateChunk - - -class DeployedApplicationHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a deployed application, which contains - the node where the application is deployed, the aggregated health state and - any deployed service packages that respect the chunk query description - filters. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of node where the application is deployed. - :type node_name: str - :param deployed_service_package_health_state_chunks: The list of deployed - service package health state chunks belonging to the deployed application - that respect the filters in the cluster health chunk query description. - :type deployed_service_package_health_state_chunks: - ~azure.servicefabric.models.DeployedServicePackageHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'deployed_service_package_health_state_chunks': {'key': 'DeployedServicePackageHealthStateChunks', 'type': 'DeployedServicePackageHealthStateChunkList'}, - } - - def __init__(self, *, health_state=None, node_name: str=None, deployed_service_package_health_state_chunks=None, **kwargs) -> None: - super(DeployedApplicationHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.node_name = node_name - self.deployed_service_package_health_state_chunks = deployed_service_package_health_state_chunks diff --git a/customSDK/servicefabric/models/deployed_application_health_state_filter.py b/customSDK/servicefabric/models/deployed_application_health_state_filter.py deleted file mode 100644 index 00453b43..00000000 --- a/customSDK/servicefabric/models/deployed_application_health_state_filter.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedApplicationHealthStateFilter(Model): - """Defines matching criteria to determine whether a deployed application - should be included as a child of an application in the cluster health - chunk. - The deployed applications are only returned if the parent application - matches a filter specified in the cluster health chunk query description. - One filter can match zero, one or multiple deployed applications, depending - on its properties. - - :param node_name_filter: The name of the node where the application is - deployed in order to match the filter. - If specified, the filter is applied only to the application deployed on - the specified node. - If the application is not deployed on the node with the specified name, no - deployed application is returned in the cluster health chunk based on this - filter. - Otherwise, the deployed application is included in the cluster health - chunk if it respects the other filter properties. - If not specified, all deployed applications that match the parent filters - (if any) are taken into consideration and matched against the other filter - members, like health state filter. - :type node_name_filter: str - :param health_state_filter: The filter for the health state of the - deployed applications. It allows selecting deployed applications if they - match the desired health states. - The possible values are integer value of one of the following health - states. Only deployed applications that match the filter are returned. All - deployed applications are used to evaluate the cluster aggregated health - state. - If not specified, default value is None, unless the node name is - specified. If the filter has default value and node name is specified, the - matching deployed application is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches deployed applications - with HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - :param deployed_service_package_filters: Defines a list of filters that - specify which deployed service packages to be included in the returned - cluster health chunk as children of the parent deployed application. The - deployed service packages are returned only if the parent deployed - application matches a filter. - If the list is empty, no deployed service packages are returned. All the - deployed service packages are used to evaluate the parent deployed - application aggregated health state, regardless of the input filters. - The deployed application filter may specify multiple deployed service - package filters. - For example, it can specify a filter to return all deployed service - packages with health state Error and another filter to always include a - deployed service package on a node. - :type deployed_service_package_filters: - list[~azure.servicefabric.models.DeployedServicePackageHealthStateFilter] - """ - - _attribute_map = { - 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'deployed_service_package_filters': {'key': 'DeployedServicePackageFilters', 'type': '[DeployedServicePackageHealthStateFilter]'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationHealthStateFilter, self).__init__(**kwargs) - self.node_name_filter = kwargs.get('node_name_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - self.deployed_service_package_filters = kwargs.get('deployed_service_package_filters', None) diff --git a/customSDK/servicefabric/models/deployed_application_health_state_filter_py3.py b/customSDK/servicefabric/models/deployed_application_health_state_filter_py3.py deleted file mode 100644 index 4ced80a5..00000000 --- a/customSDK/servicefabric/models/deployed_application_health_state_filter_py3.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedApplicationHealthStateFilter(Model): - """Defines matching criteria to determine whether a deployed application - should be included as a child of an application in the cluster health - chunk. - The deployed applications are only returned if the parent application - matches a filter specified in the cluster health chunk query description. - One filter can match zero, one or multiple deployed applications, depending - on its properties. - - :param node_name_filter: The name of the node where the application is - deployed in order to match the filter. - If specified, the filter is applied only to the application deployed on - the specified node. - If the application is not deployed on the node with the specified name, no - deployed application is returned in the cluster health chunk based on this - filter. - Otherwise, the deployed application is included in the cluster health - chunk if it respects the other filter properties. - If not specified, all deployed applications that match the parent filters - (if any) are taken into consideration and matched against the other filter - members, like health state filter. - :type node_name_filter: str - :param health_state_filter: The filter for the health state of the - deployed applications. It allows selecting deployed applications if they - match the desired health states. - The possible values are integer value of one of the following health - states. Only deployed applications that match the filter are returned. All - deployed applications are used to evaluate the cluster aggregated health - state. - If not specified, default value is None, unless the node name is - specified. If the filter has default value and node name is specified, the - matching deployed application is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches deployed applications - with HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - :param deployed_service_package_filters: Defines a list of filters that - specify which deployed service packages to be included in the returned - cluster health chunk as children of the parent deployed application. The - deployed service packages are returned only if the parent deployed - application matches a filter. - If the list is empty, no deployed service packages are returned. All the - deployed service packages are used to evaluate the parent deployed - application aggregated health state, regardless of the input filters. - The deployed application filter may specify multiple deployed service - package filters. - For example, it can specify a filter to return all deployed service - packages with health state Error and another filter to always include a - deployed service package on a node. - :type deployed_service_package_filters: - list[~azure.servicefabric.models.DeployedServicePackageHealthStateFilter] - """ - - _attribute_map = { - 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'deployed_service_package_filters': {'key': 'DeployedServicePackageFilters', 'type': '[DeployedServicePackageHealthStateFilter]'}, - } - - def __init__(self, *, node_name_filter: str=None, health_state_filter: int=0, deployed_service_package_filters=None, **kwargs) -> None: - super(DeployedApplicationHealthStateFilter, self).__init__(**kwargs) - self.node_name_filter = node_name_filter - self.health_state_filter = health_state_filter - self.deployed_service_package_filters = deployed_service_package_filters diff --git a/customSDK/servicefabric/models/deployed_application_health_state_py3.py b/customSDK/servicefabric/models/deployed_application_health_state_py3.py deleted file mode 100644 index 370cf230..00000000 --- a/customSDK/servicefabric/models/deployed_application_health_state_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_py3 import EntityHealthState - - -class DeployedApplicationHealthState(EntityHealthState): - """Represents the health state of a deployed application, which contains the - entity identifier and the aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param node_name: Name of the node on which the service package is - deployed. - :type node_name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, node_name: str=None, application_name: str=None, **kwargs) -> None: - super(DeployedApplicationHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.node_name = node_name - self.application_name = application_name diff --git a/customSDK/servicefabric/models/deployed_application_info.py b/customSDK/servicefabric/models/deployed_application_info.py deleted file mode 100644 index 44b349c7..00000000 --- a/customSDK/servicefabric/models/deployed_application_info.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedApplicationInfo(Model): - """Information about application deployed on the node. - - :param id: The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to - identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type id: str - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - :param type_name: The application type name as defined in the application - manifest. - :type type_name: str - :param type_version: The version of the application type as defined in the - application manifest. - :type type_version: str - :param status: The status of the application deployed on the node. - Following are the possible values. Possible values include: 'Invalid', - 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating' - :type status: str or ~azure.servicefabric.models.DeployedApplicationStatus - :param work_directory: The work directory of the application on the node. - The work directory can be used to store application data. - :type work_directory: str - :param log_directory: The log directory of the application on the node. - The log directory can be used to store application logs. - :type log_directory: str - :param temp_directory: The temp directory of the application on the node. - The code packages belonging to the application are forked with this - directory set as their temporary directory. - :type temp_directory: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'work_directory': {'key': 'WorkDirectory', 'type': 'str'}, - 'log_directory': {'key': 'LogDirectory', 'type': 'str'}, - 'temp_directory': {'key': 'TempDirectory', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.type_version = kwargs.get('type_version', None) - self.status = kwargs.get('status', None) - self.work_directory = kwargs.get('work_directory', None) - self.log_directory = kwargs.get('log_directory', None) - self.temp_directory = kwargs.get('temp_directory', None) - self.health_state = kwargs.get('health_state', None) diff --git a/customSDK/servicefabric/models/deployed_application_info_py3.py b/customSDK/servicefabric/models/deployed_application_info_py3.py deleted file mode 100644 index cf858695..00000000 --- a/customSDK/servicefabric/models/deployed_application_info_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedApplicationInfo(Model): - """Information about application deployed on the node. - - :param id: The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to - identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type id: str - :param name: The name of the application, including the 'fabric:' URI - scheme. - :type name: str - :param type_name: The application type name as defined in the application - manifest. - :type type_name: str - :param type_version: The version of the application type as defined in the - application manifest. - :type type_version: str - :param status: The status of the application deployed on the node. - Following are the possible values. Possible values include: 'Invalid', - 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating' - :type status: str or ~azure.servicefabric.models.DeployedApplicationStatus - :param work_directory: The work directory of the application on the node. - The work directory can be used to store application data. - :type work_directory: str - :param log_directory: The log directory of the application on the node. - The log directory can be used to store application logs. - :type log_directory: str - :param temp_directory: The temp directory of the application on the node. - The code packages belonging to the application are forked with this - directory set as their temporary directory. - :type temp_directory: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'work_directory': {'key': 'WorkDirectory', 'type': 'str'}, - 'log_directory': {'key': 'LogDirectory', 'type': 'str'}, - 'temp_directory': {'key': 'TempDirectory', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, type_name: str=None, type_version: str=None, status=None, work_directory: str=None, log_directory: str=None, temp_directory: str=None, health_state=None, **kwargs) -> None: - super(DeployedApplicationInfo, self).__init__(**kwargs) - self.id = id - self.name = name - self.type_name = type_name - self.type_version = type_version - self.status = status - self.work_directory = work_directory - self.log_directory = log_directory - self.temp_directory = temp_directory - self.health_state = health_state diff --git a/customSDK/servicefabric/models/deployed_application_new_health_report_event.py b/customSDK/servicefabric/models/deployed_application_new_health_report_event.py deleted file mode 100644 index 297abe18..00000000 --- a/customSDK/servicefabric/models/deployed_application_new_health_report_event.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event import ApplicationEvent - - -class DeployedApplicationNewHealthReportEvent(ApplicationEvent): - """Deployed Application Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_instance_id: Required. Id of Application instance. - :type application_instance_id: long - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationNewHealthReportEvent, self).__init__(**kwargs) - self.application_instance_id = kwargs.get('application_instance_id', None) - self.node_name = kwargs.get('node_name', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'DeployedApplicationNewHealthReport' diff --git a/customSDK/servicefabric/models/deployed_application_new_health_report_event_py3.py b/customSDK/servicefabric/models/deployed_application_new_health_report_event_py3.py deleted file mode 100644 index 7f837853..00000000 --- a/customSDK/servicefabric/models/deployed_application_new_health_report_event_py3.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event_py3 import ApplicationEvent - - -class DeployedApplicationNewHealthReportEvent(ApplicationEvent): - """Deployed Application Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param application_instance_id: Required. Id of Application instance. - :type application_instance_id: long - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(DeployedApplicationNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.application_instance_id = application_instance_id - self.node_name = node_name - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'DeployedApplicationNewHealthReport' diff --git a/customSDK/servicefabric/models/deployed_applications_health_evaluation.py b/customSDK/servicefabric/models/deployed_applications_health_evaluation.py deleted file mode 100644 index 6d3f7733..00000000 --- a/customSDK/servicefabric/models/deployed_applications_health_evaluation.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class DeployedApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for deployed applications, containing health - evaluations for each unhealthy deployed application that impacted current - aggregated health state. - Can be returned when evaluating application health and the aggregated - health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_deployed_applications: Maximum allowed - percentage of unhealthy deployed applications from the - ApplicationHealthPolicy. - :type max_percent_unhealthy_deployed_applications: int - :param total_count: Total number of deployed applications of the - application in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - DeployedApplicationHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(DeployedApplicationsHealthEvaluation, self).__init__(**kwargs) - self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'DeployedApplications' diff --git a/customSDK/servicefabric/models/deployed_applications_health_evaluation_py3.py b/customSDK/servicefabric/models/deployed_applications_health_evaluation_py3.py deleted file mode 100644 index cb907dbd..00000000 --- a/customSDK/servicefabric/models/deployed_applications_health_evaluation_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class DeployedApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for deployed applications, containing health - evaluations for each unhealthy deployed application that impacted current - aggregated health state. - Can be returned when evaluating application health and the aggregated - health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_deployed_applications: Maximum allowed - percentage of unhealthy deployed applications from the - ApplicationHealthPolicy. - :type max_percent_unhealthy_deployed_applications: int - :param total_count: Total number of deployed applications of the - application in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - DeployedApplicationHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_deployed_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(DeployedApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'DeployedApplications' diff --git a/customSDK/servicefabric/models/deployed_code_package_info.py b/customSDK/servicefabric/models/deployed_code_package_info.py deleted file mode 100644 index 0e4cdad9..00000000 --- a/customSDK/servicefabric/models/deployed_code_package_info.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedCodePackageInfo(Model): - """Information about code package deployed on a Service Fabric node. - - :param name: The name of the code package. - :type name: str - :param version: The version of the code package specified in service - manifest. - :type version: str - :param service_manifest_name: The name of service manifest that specified - this code package. - :type service_manifest_name: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param host_type: Specifies the type of host for main entry point of a - code package as specified in service manifest. Possible values include: - 'Invalid', 'ExeHost', 'ContainerHost' - :type host_type: str or ~azure.servicefabric.models.HostType - :param host_isolation_mode: Specifies the isolation mode of main entry - point of a code package when it's host type is ContainerHost. This is - specified as part of container host policies in application manifest while - importing service manifest. Possible values include: 'None', 'Process', - 'HyperV' - :type host_isolation_mode: str or - ~azure.servicefabric.models.HostIsolationMode - :param status: Specifies the status of a deployed application or service - package on a Service Fabric node. Possible values include: 'Invalid', - 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating', - 'RanToCompletion', 'Failed' - :type status: str or ~azure.servicefabric.models.DeploymentStatus - :param run_frequency_interval: The interval at which code package is run. - This is used for periodic code package. - :type run_frequency_interval: str - :param setup_entry_point: Information about setup or main entry point of a - code package deployed on a Service Fabric node. - :type setup_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint - :param main_entry_point: Information about setup or main entry point of a - code package deployed on a Service Fabric node. - :type main_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_type': {'key': 'HostType', 'type': 'str'}, - 'host_isolation_mode': {'key': 'HostIsolationMode', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'run_frequency_interval': {'key': 'RunFrequencyInterval', 'type': 'str'}, - 'setup_entry_point': {'key': 'SetupEntryPoint', 'type': 'CodePackageEntryPoint'}, - 'main_entry_point': {'key': 'MainEntryPoint', 'type': 'CodePackageEntryPoint'}, - } - - def __init__(self, **kwargs): - super(DeployedCodePackageInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.host_type = kwargs.get('host_type', None) - self.host_isolation_mode = kwargs.get('host_isolation_mode', None) - self.status = kwargs.get('status', None) - self.run_frequency_interval = kwargs.get('run_frequency_interval', None) - self.setup_entry_point = kwargs.get('setup_entry_point', None) - self.main_entry_point = kwargs.get('main_entry_point', None) diff --git a/customSDK/servicefabric/models/deployed_code_package_info_py3.py b/customSDK/servicefabric/models/deployed_code_package_info_py3.py deleted file mode 100644 index 8e4ef676..00000000 --- a/customSDK/servicefabric/models/deployed_code_package_info_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedCodePackageInfo(Model): - """Information about code package deployed on a Service Fabric node. - - :param name: The name of the code package. - :type name: str - :param version: The version of the code package specified in service - manifest. - :type version: str - :param service_manifest_name: The name of service manifest that specified - this code package. - :type service_manifest_name: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param host_type: Specifies the type of host for main entry point of a - code package as specified in service manifest. Possible values include: - 'Invalid', 'ExeHost', 'ContainerHost' - :type host_type: str or ~azure.servicefabric.models.HostType - :param host_isolation_mode: Specifies the isolation mode of main entry - point of a code package when it's host type is ContainerHost. This is - specified as part of container host policies in application manifest while - importing service manifest. Possible values include: 'None', 'Process', - 'HyperV' - :type host_isolation_mode: str or - ~azure.servicefabric.models.HostIsolationMode - :param status: Specifies the status of a deployed application or service - package on a Service Fabric node. Possible values include: 'Invalid', - 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating', - 'RanToCompletion', 'Failed' - :type status: str or ~azure.servicefabric.models.DeploymentStatus - :param run_frequency_interval: The interval at which code package is run. - This is used for periodic code package. - :type run_frequency_interval: str - :param setup_entry_point: Information about setup or main entry point of a - code package deployed on a Service Fabric node. - :type setup_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint - :param main_entry_point: Information about setup or main entry point of a - code package deployed on a Service Fabric node. - :type main_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_type': {'key': 'HostType', 'type': 'str'}, - 'host_isolation_mode': {'key': 'HostIsolationMode', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'run_frequency_interval': {'key': 'RunFrequencyInterval', 'type': 'str'}, - 'setup_entry_point': {'key': 'SetupEntryPoint', 'type': 'CodePackageEntryPoint'}, - 'main_entry_point': {'key': 'MainEntryPoint', 'type': 'CodePackageEntryPoint'}, - } - - def __init__(self, *, name: str=None, version: str=None, service_manifest_name: str=None, service_package_activation_id: str=None, host_type=None, host_isolation_mode=None, status=None, run_frequency_interval: str=None, setup_entry_point=None, main_entry_point=None, **kwargs) -> None: - super(DeployedCodePackageInfo, self).__init__(**kwargs) - self.name = name - self.version = version - self.service_manifest_name = service_manifest_name - self.service_package_activation_id = service_package_activation_id - self.host_type = host_type - self.host_isolation_mode = host_isolation_mode - self.status = status - self.run_frequency_interval = run_frequency_interval - self.setup_entry_point = setup_entry_point - self.main_entry_point = main_entry_point diff --git a/customSDK/servicefabric/models/deployed_service_package_health.py b/customSDK/servicefabric/models/deployed_service_package_health.py deleted file mode 100644 index e45f95d5..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_health.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health import EntityHealth - - -class DeployedServicePackageHealth(EntityHealth): - """Information about the health of a service package for a specific - application deployed on a Service Fabric node. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_manifest_name: Name of the service manifest. - :type service_manifest_name: str - :param node_name: Name of the node where this service package is deployed. - :type node_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageHealth, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.node_name = kwargs.get('node_name', None) diff --git a/customSDK/servicefabric/models/deployed_service_package_health_evaluation.py b/customSDK/servicefabric/models/deployed_service_package_health_evaluation.py deleted file mode 100644 index 3af5f8bf..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_health_evaluation.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class DeployedServicePackageHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a deployed service package, containing - information about the data and the algorithm used by health store to - evaluate health. The evaluation is returned only when the aggregated health - state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_manifest_name: The name of the service manifest. - :type service_manifest_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state. The type of the unhealthy evaluations - can be EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageHealthEvaluation, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.application_name = kwargs.get('application_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'DeployedServicePackage' diff --git a/customSDK/servicefabric/models/deployed_service_package_health_evaluation_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_evaluation_py3.py deleted file mode 100644 index 6450f7db..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_health_evaluation_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class DeployedServicePackageHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a deployed service package, containing - information about the data and the algorithm used by health store to - evaluate health. The evaluation is returned only when the aggregated health - state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_manifest_name: The name of the service manifest. - :type service_manifest_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state. The type of the unhealthy evaluations - can be EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, node_name: str=None, application_name: str=None, service_manifest_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(DeployedServicePackageHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.node_name = node_name - self.application_name = application_name - self.service_manifest_name = service_manifest_name - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'DeployedServicePackage' diff --git a/customSDK/servicefabric/models/deployed_service_package_health_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_py3.py deleted file mode 100644 index 5c6a1802..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_health_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_py3 import EntityHealth - - -class DeployedServicePackageHealth(EntityHealth): - """Information about the health of a service package for a specific - application deployed on a Service Fabric node. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_manifest_name: Name of the service manifest. - :type service_manifest_name: str - :param node_name: Name of the node where this service package is deployed. - :type node_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, application_name: str=None, service_manifest_name: str=None, node_name: str=None, **kwargs) -> None: - super(DeployedServicePackageHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.application_name = application_name - self.service_manifest_name = service_manifest_name - self.node_name = node_name diff --git a/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event.py b/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event.py deleted file mode 100644 index b8af144a..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event import ApplicationEvent - - -class DeployedServicePackageHealthReportExpiredEvent(ApplicationEvent): - """Deployed Service Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param service_manifest: Required. Service manifest name. - :type service_manifest: str - :param service_package_instance_id: Required. Id of Service package - instance. - :type service_package_instance_id: long - :param service_package_activation_id: Required. Id of Service package - activation. - :type service_package_activation_id: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_manifest': {'required': True}, - 'service_package_instance_id': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_manifest': {'key': 'ServiceManifest', 'type': 'str'}, - 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageHealthReportExpiredEvent, self).__init__(**kwargs) - self.service_manifest = kwargs.get('service_manifest', None) - self.service_package_instance_id = kwargs.get('service_package_instance_id', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.node_name = kwargs.get('node_name', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'DeployedServicePackageHealthReportExpired' diff --git a/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event_py3.py deleted file mode 100644 index 28e8f9d8..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_health_report_expired_event_py3.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event_py3 import ApplicationEvent - - -class DeployedServicePackageHealthReportExpiredEvent(ApplicationEvent): - """Deployed Service Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param service_manifest: Required. Service manifest name. - :type service_manifest: str - :param service_package_instance_id: Required. Id of Service package - instance. - :type service_package_instance_id: long - :param service_package_activation_id: Required. Id of Service package - activation. - :type service_package_activation_id: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_manifest': {'required': True}, - 'service_package_instance_id': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_manifest': {'key': 'ServiceManifest', 'type': 'str'}, - 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_manifest: str, service_package_instance_id: int, service_package_activation_id: str, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(DeployedServicePackageHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.service_manifest = service_manifest - self.service_package_instance_id = service_package_instance_id - self.service_package_activation_id = service_package_activation_id - self.node_name = node_name - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'DeployedServicePackageHealthReportExpired' diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state.py b/customSDK/servicefabric/models/deployed_service_package_health_state.py deleted file mode 100644 index e9e62716..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_health_state.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state import EntityHealthState - - -class DeployedServicePackageHealthState(EntityHealthState): - """Represents the health state of a deployed service package, containing the - entity identifier and the aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param node_name: Name of the node on which the service package is - deployed. - :type node_name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_manifest_name: Name of the manifest describing the service - package. - :type service_manifest_name: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageHealthState, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.application_name = kwargs.get('application_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_chunk.py b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk.py deleted file mode 100644 index 0bbf966e..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_health_state_chunk.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk import EntityHealthStateChunk - - -class DeployedServicePackageHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a deployed service package, which - contains the service manifest name and the service package aggregated - health state. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_manifest_name: The name of the service manifest. - :type service_manifest_name: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageHealthStateChunk, self).__init__(**kwargs) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list.py b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list.py deleted file mode 100644 index 5b453e44..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedServicePackageHealthStateChunkList(Model): - """The list of deployed service package health state chunks that respect the - input filters in the chunk query. Returned by get cluster health state - chunks query. - - :param items: The list of deployed service package health state chunks - that respect the input filters in the chunk query. - :type items: - list[~azure.servicefabric.models.DeployedServicePackageHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[DeployedServicePackageHealthStateChunk]'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list_py3.py deleted file mode 100644 index fe435a6b..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_list_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedServicePackageHealthStateChunkList(Model): - """The list of deployed service package health state chunks that respect the - input filters in the chunk query. Returned by get cluster health state - chunks query. - - :param items: The list of deployed service package health state chunks - that respect the input filters in the chunk query. - :type items: - list[~azure.servicefabric.models.DeployedServicePackageHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[DeployedServicePackageHealthStateChunk]'}, - } - - def __init__(self, *, items=None, **kwargs) -> None: - super(DeployedServicePackageHealthStateChunkList, self).__init__(**kwargs) - self.items = items diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_py3.py deleted file mode 100644 index 1911d409..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_health_state_chunk_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk_py3 import EntityHealthStateChunk - - -class DeployedServicePackageHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a deployed service package, which - contains the service manifest name and the service package aggregated - health state. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_manifest_name: The name of the service manifest. - :type service_manifest_name: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, *, health_state=None, service_manifest_name: str=None, service_package_activation_id: str=None, **kwargs) -> None: - super(DeployedServicePackageHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.service_manifest_name = service_manifest_name - self.service_package_activation_id = service_package_activation_id diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_filter.py b/customSDK/servicefabric/models/deployed_service_package_health_state_filter.py deleted file mode 100644 index 5dc22698..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_health_state_filter.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedServicePackageHealthStateFilter(Model): - """Defines matching criteria to determine whether a deployed service package - should be included as a child of a deployed application in the cluster - health chunk. - The deployed service packages are only returned if the parent entities - match a filter specified in the cluster health chunk query description. The - parent deployed application and its parent application must be included in - the cluster health chunk. - One filter can match zero, one or multiple deployed service packages, - depending on its properties. - - :param service_manifest_name_filter: The name of the service manifest - which identifies the deployed service packages that matches the filter. - If specified, the filter is applied only to the specified deployed service - packages, if any. - If no deployed service packages with specified manifest name exist, - nothing is returned in the cluster health chunk based on this filter. - If any deployed service package exists, they are included in the cluster - health chunk if it respects the other filter properties. - If not specified, all deployed service packages that match the parent - filters (if any) are taken into consideration and matched against the - other filter members, like health state filter. - :type service_manifest_name_filter: str - :param service_package_activation_id_filter: The activation ID of a - deployed service package that matches the filter. - If not specified, the filter applies to all deployed service packages that - match the other parameters. - If specified, the filter matches only the deployed service package with - the specified activation ID. - :type service_package_activation_id_filter: str - :param health_state_filter: The filter for the health state of the - deployed service packages. It allows selecting deployed service packages - if they match the desired health states. - The possible values are integer value of one of the following health - states. Only deployed service packages that match the filter are returned. - All deployed service packages are used to evaluate the parent deployed - application aggregated health state. - If not specified, default value is None, unless the deployed service - package ID is specified. If the filter has default value and deployed - service package ID is specified, the matching deployed service package is - returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches deployed service - packages with HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - """ - - _attribute_map = { - 'service_manifest_name_filter': {'key': 'ServiceManifestNameFilter', 'type': 'str'}, - 'service_package_activation_id_filter': {'key': 'ServicePackageActivationIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageHealthStateFilter, self).__init__(**kwargs) - self.service_manifest_name_filter = kwargs.get('service_manifest_name_filter', None) - self.service_package_activation_id_filter = kwargs.get('service_package_activation_id_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_filter_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_state_filter_py3.py deleted file mode 100644 index a4af6760..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_health_state_filter_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedServicePackageHealthStateFilter(Model): - """Defines matching criteria to determine whether a deployed service package - should be included as a child of a deployed application in the cluster - health chunk. - The deployed service packages are only returned if the parent entities - match a filter specified in the cluster health chunk query description. The - parent deployed application and its parent application must be included in - the cluster health chunk. - One filter can match zero, one or multiple deployed service packages, - depending on its properties. - - :param service_manifest_name_filter: The name of the service manifest - which identifies the deployed service packages that matches the filter. - If specified, the filter is applied only to the specified deployed service - packages, if any. - If no deployed service packages with specified manifest name exist, - nothing is returned in the cluster health chunk based on this filter. - If any deployed service package exists, they are included in the cluster - health chunk if it respects the other filter properties. - If not specified, all deployed service packages that match the parent - filters (if any) are taken into consideration and matched against the - other filter members, like health state filter. - :type service_manifest_name_filter: str - :param service_package_activation_id_filter: The activation ID of a - deployed service package that matches the filter. - If not specified, the filter applies to all deployed service packages that - match the other parameters. - If specified, the filter matches only the deployed service package with - the specified activation ID. - :type service_package_activation_id_filter: str - :param health_state_filter: The filter for the health state of the - deployed service packages. It allows selecting deployed service packages - if they match the desired health states. - The possible values are integer value of one of the following health - states. Only deployed service packages that match the filter are returned. - All deployed service packages are used to evaluate the parent deployed - application aggregated health state. - If not specified, default value is None, unless the deployed service - package ID is specified. If the filter has default value and deployed - service package ID is specified, the matching deployed service package is - returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches deployed service - packages with HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - """ - - _attribute_map = { - 'service_manifest_name_filter': {'key': 'ServiceManifestNameFilter', 'type': 'str'}, - 'service_package_activation_id_filter': {'key': 'ServicePackageActivationIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__(self, *, service_manifest_name_filter: str=None, service_package_activation_id_filter: str=None, health_state_filter: int=0, **kwargs) -> None: - super(DeployedServicePackageHealthStateFilter, self).__init__(**kwargs) - self.service_manifest_name_filter = service_manifest_name_filter - self.service_package_activation_id_filter = service_package_activation_id_filter - self.health_state_filter = health_state_filter diff --git a/customSDK/servicefabric/models/deployed_service_package_health_state_py3.py b/customSDK/servicefabric/models/deployed_service_package_health_state_py3.py deleted file mode 100644 index 365b0c4a..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_health_state_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_py3 import EntityHealthState - - -class DeployedServicePackageHealthState(EntityHealthState): - """Represents the health state of a deployed service package, containing the - entity identifier and the aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param node_name: Name of the node on which the service package is - deployed. - :type node_name: str - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_manifest_name: Name of the manifest describing the service - package. - :type service_manifest_name: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, node_name: str=None, application_name: str=None, service_manifest_name: str=None, service_package_activation_id: str=None, **kwargs) -> None: - super(DeployedServicePackageHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.node_name = node_name - self.application_name = application_name - self.service_manifest_name = service_manifest_name - self.service_package_activation_id = service_package_activation_id diff --git a/customSDK/servicefabric/models/deployed_service_package_info.py b/customSDK/servicefabric/models/deployed_service_package_info.py deleted file mode 100644 index 0feff70d..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_info.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedServicePackageInfo(Model): - """Information about service package deployed on a Service Fabric node. - - :param name: The name of the service package as specified in the service - manifest. - :type name: str - :param version: The version of the service package specified in service - manifest. - :type version: str - :param status: Specifies the status of a deployed application or service - package on a Service Fabric node. Possible values include: 'Invalid', - 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating', - 'RanToCompletion', 'Failed' - :type status: str or ~azure.servicefabric.models.DeploymentStatus - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) - self.status = kwargs.get('status', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) diff --git a/customSDK/servicefabric/models/deployed_service_package_info_py3.py b/customSDK/servicefabric/models/deployed_service_package_info_py3.py deleted file mode 100644 index 477a33a0..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_info_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedServicePackageInfo(Model): - """Information about service package deployed on a Service Fabric node. - - :param name: The name of the service package as specified in the service - manifest. - :type name: str - :param version: The version of the service package specified in service - manifest. - :type version: str - :param status: Specifies the status of a deployed application or service - package on a Service Fabric node. Possible values include: 'Invalid', - 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating', - 'RanToCompletion', 'Failed' - :type status: str or ~azure.servicefabric.models.DeploymentStatus - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, version: str=None, status=None, service_package_activation_id: str=None, **kwargs) -> None: - super(DeployedServicePackageInfo, self).__init__(**kwargs) - self.name = name - self.version = version - self.status = status - self.service_package_activation_id = service_package_activation_id diff --git a/customSDK/servicefabric/models/deployed_service_package_new_health_report_event.py b/customSDK/servicefabric/models/deployed_service_package_new_health_report_event.py deleted file mode 100644 index 74497880..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_new_health_report_event.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event import ApplicationEvent - - -class DeployedServicePackageNewHealthReportEvent(ApplicationEvent): - """Deployed Service Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param service_manifest_name: Required. Service manifest name. - :type service_manifest_name: str - :param service_package_instance_id: Required. Id of Service package - instance. - :type service_package_instance_id: long - :param service_package_activation_id: Required. Id of Service package - activation. - :type service_package_activation_id: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_manifest_name': {'required': True}, - 'service_package_instance_id': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackageNewHealthReportEvent, self).__init__(**kwargs) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_instance_id = kwargs.get('service_package_instance_id', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.node_name = kwargs.get('node_name', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'DeployedServicePackageNewHealthReport' diff --git a/customSDK/servicefabric/models/deployed_service_package_new_health_report_event_py3.py b/customSDK/servicefabric/models/deployed_service_package_new_health_report_event_py3.py deleted file mode 100644 index 487a2957..00000000 --- a/customSDK/servicefabric/models/deployed_service_package_new_health_report_event_py3.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_event_py3 import ApplicationEvent - - -class DeployedServicePackageNewHealthReportEvent(ApplicationEvent): - """Deployed Service Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_id: Required. The identity of the application. This is - an encoded representation of the application name. This is used in the - REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the application name is "fabric:/myapp/app1", - the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1" - in previous versions. - :type application_id: str - :param service_manifest_name: Required. Service manifest name. - :type service_manifest_name: str - :param service_package_instance_id: Required. Id of Service package - instance. - :type service_package_instance_id: long - :param service_package_activation_id: Required. Id of Service package - activation. - :type service_package_activation_id: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'application_id': {'required': True}, - 'service_manifest_name': {'required': True}, - 'service_package_instance_id': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_manifest_name: str, service_package_instance_id: int, service_package_activation_id: str, node_name: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(DeployedServicePackageNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.service_manifest_name = service_manifest_name - self.service_package_instance_id = service_package_instance_id - self.service_package_activation_id = service_package_activation_id - self.node_name = node_name - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'DeployedServicePackageNewHealthReport' diff --git a/customSDK/servicefabric/models/deployed_service_packages_health_evaluation.py b/customSDK/servicefabric/models/deployed_service_packages_health_evaluation.py deleted file mode 100644 index 2820b65e..00000000 --- a/customSDK/servicefabric/models/deployed_service_packages_health_evaluation.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class DeployedServicePackagesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for deployed service packages, containing - health evaluations for each unhealthy deployed service package that - impacted current aggregated health state. Can be returned when evaluating - deployed application health and the aggregated health state is either Error - or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param total_count: Total number of deployed service packages of the - deployed application in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - DeployedServicePackageHealthEvaluation that impacted the aggregated - health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(DeployedServicePackagesHealthEvaluation, self).__init__(**kwargs) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'DeployedServicePackages' diff --git a/customSDK/servicefabric/models/deployed_service_packages_health_evaluation_py3.py b/customSDK/servicefabric/models/deployed_service_packages_health_evaluation_py3.py deleted file mode 100644 index 04c20abe..00000000 --- a/customSDK/servicefabric/models/deployed_service_packages_health_evaluation_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class DeployedServicePackagesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for deployed service packages, containing - health evaluations for each unhealthy deployed service package that - impacted current aggregated health state. Can be returned when evaluating - deployed application health and the aggregated health state is either Error - or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param total_count: Total number of deployed service packages of the - deployed application in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - DeployedServicePackageHealthEvaluation that impacted the aggregated - health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(DeployedServicePackagesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'DeployedServicePackages' diff --git a/customSDK/servicefabric/models/deployed_service_replica_detail_info.py b/customSDK/servicefabric/models/deployed_service_replica_detail_info.py deleted file mode 100644 index 2d01b8a4..00000000 --- a/customSDK/servicefabric/models/deployed_service_replica_detail_info.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedServiceReplicaDetailInfo(Model): - """Information about a Service Fabric service replica deployed on a node. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeployedStatefulServiceReplicaDetailInfo, - DeployedStatelessServiceInstanceDetailInfo - - All required parameters must be populated in order to send to Azure. - - :param service_name: Full hierarchical name of the service in URI format - starting with `fabric:`. - :type service_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param current_service_operation: Specifies the current active life-cycle - operation on a stateful service replica or stateless service instance. - Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', - 'Abort' - :type current_service_operation: str or - ~azure.servicefabric.models.ServiceOperationName - :param current_service_operation_start_time_utc: The start time of the - current service operation in UTC format. - :type current_service_operation_start_time_utc: datetime - :param reported_load: List of load reported by replica. - :type reported_load: - list[~azure.servicefabric.models.LoadMetricReportInfo] - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaDetailInfo', 'Stateless': 'DeployedStatelessServiceInstanceDetailInfo'} - } - - def __init__(self, **kwargs): - super(DeployedServiceReplicaDetailInfo, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.current_service_operation = kwargs.get('current_service_operation', None) - self.current_service_operation_start_time_utc = kwargs.get('current_service_operation_start_time_utc', None) - self.reported_load = kwargs.get('reported_load', None) - self.service_kind = None diff --git a/customSDK/servicefabric/models/deployed_service_replica_detail_info_py3.py b/customSDK/servicefabric/models/deployed_service_replica_detail_info_py3.py deleted file mode 100644 index 9e2b751c..00000000 --- a/customSDK/servicefabric/models/deployed_service_replica_detail_info_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedServiceReplicaDetailInfo(Model): - """Information about a Service Fabric service replica deployed on a node. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeployedStatefulServiceReplicaDetailInfo, - DeployedStatelessServiceInstanceDetailInfo - - All required parameters must be populated in order to send to Azure. - - :param service_name: Full hierarchical name of the service in URI format - starting with `fabric:`. - :type service_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param current_service_operation: Specifies the current active life-cycle - operation on a stateful service replica or stateless service instance. - Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', - 'Abort' - :type current_service_operation: str or - ~azure.servicefabric.models.ServiceOperationName - :param current_service_operation_start_time_utc: The start time of the - current service operation in UTC format. - :type current_service_operation_start_time_utc: datetime - :param reported_load: List of load reported by replica. - :type reported_load: - list[~azure.servicefabric.models.LoadMetricReportInfo] - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaDetailInfo', 'Stateless': 'DeployedStatelessServiceInstanceDetailInfo'} - } - - def __init__(self, *, service_name: str=None, partition_id: str=None, current_service_operation=None, current_service_operation_start_time_utc=None, reported_load=None, **kwargs) -> None: - super(DeployedServiceReplicaDetailInfo, self).__init__(**kwargs) - self.service_name = service_name - self.partition_id = partition_id - self.current_service_operation = current_service_operation - self.current_service_operation_start_time_utc = current_service_operation_start_time_utc - self.reported_load = reported_load - self.service_kind = None diff --git a/customSDK/servicefabric/models/deployed_service_replica_info.py b/customSDK/servicefabric/models/deployed_service_replica_info.py deleted file mode 100644 index 0c521cc3..00000000 --- a/customSDK/servicefabric/models/deployed_service_replica_info.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedServiceReplicaInfo(Model): - """Information about a Service Fabric service replica deployed on a node. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeployedStatefulServiceReplicaInfo, - DeployedStatelessServiceInstanceInfo - - All required parameters must be populated in order to send to Azure. - - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param code_package_name: The name of the code package that hosts this - replica. - :type code_package_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param address: The last address returned by the replica in Open or - ChangeRole. - :type address: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param host_process_id: Host process ID of the process that is hosting the - replica. This will be zero if the replica is down. In hyper-v containers - this host process ID will be from different kernel. - :type host_process_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaInfo', 'Stateless': 'DeployedStatelessServiceInstanceInfo'} - } - - def __init__(self, **kwargs): - super(DeployedServiceReplicaInfo, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.service_type_name = kwargs.get('service_type_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.replica_status = kwargs.get('replica_status', None) - self.address = kwargs.get('address', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.host_process_id = kwargs.get('host_process_id', None) - self.service_kind = None diff --git a/customSDK/servicefabric/models/deployed_service_replica_info_py3.py b/customSDK/servicefabric/models/deployed_service_replica_info_py3.py deleted file mode 100644 index 7cec5b76..00000000 --- a/customSDK/servicefabric/models/deployed_service_replica_info_py3.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedServiceReplicaInfo(Model): - """Information about a Service Fabric service replica deployed on a node. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeployedStatefulServiceReplicaInfo, - DeployedStatelessServiceInstanceInfo - - All required parameters must be populated in order to send to Azure. - - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param code_package_name: The name of the code package that hosts this - replica. - :type code_package_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param address: The last address returned by the replica in Open or - ChangeRole. - :type address: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param host_process_id: Host process ID of the process that is hosting the - replica. This will be zero if the replica is down. In hyper-v containers - this host process ID will be from different kernel. - :type host_process_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaInfo', 'Stateless': 'DeployedStatelessServiceInstanceInfo'} - } - - def __init__(self, *, service_name: str=None, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, partition_id: str=None, replica_status=None, address: str=None, service_package_activation_id: str=None, host_process_id: str=None, **kwargs) -> None: - super(DeployedServiceReplicaInfo, self).__init__(**kwargs) - self.service_name = service_name - self.service_type_name = service_type_name - self.service_manifest_name = service_manifest_name - self.code_package_name = code_package_name - self.partition_id = partition_id - self.replica_status = replica_status - self.address = address - self.service_package_activation_id = service_package_activation_id - self.host_process_id = host_process_id - self.service_kind = None diff --git a/customSDK/servicefabric/models/deployed_service_type_info.py b/customSDK/servicefabric/models/deployed_service_type_info.py deleted file mode 100644 index f46f04c3..00000000 --- a/customSDK/servicefabric/models/deployed_service_type_info.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedServiceTypeInfo(Model): - """Information about service type deployed on a node, information such as the - status of the service type registration on a node. - - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param code_package_name: The name of the code package that registered the - service type. - :type code_package_name: str - :param status: The status of the service type registration on the node. - Possible values include: 'Invalid', 'Disabled', 'Enabled', 'Registered' - :type status: str or - ~azure.servicefabric.models.ServiceTypeRegistrationStatus - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - """ - - _attribute_map = { - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeployedServiceTypeInfo, self).__init__(**kwargs) - self.service_type_name = kwargs.get('service_type_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.status = kwargs.get('status', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) diff --git a/customSDK/servicefabric/models/deployed_service_type_info_py3.py b/customSDK/servicefabric/models/deployed_service_type_info_py3.py deleted file mode 100644 index f749665e..00000000 --- a/customSDK/servicefabric/models/deployed_service_type_info_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeployedServiceTypeInfo(Model): - """Information about service type deployed on a node, information such as the - status of the service type registration on a node. - - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param code_package_name: The name of the code package that registered the - service type. - :type code_package_name: str - :param status: The status of the service type registration on the node. - Possible values include: 'Invalid', 'Disabled', 'Enabled', 'Registered' - :type status: str or - ~azure.servicefabric.models.ServiceTypeRegistrationStatus - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - """ - - _attribute_map = { - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__(self, *, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, status=None, service_package_activation_id: str=None, **kwargs) -> None: - super(DeployedServiceTypeInfo, self).__init__(**kwargs) - self.service_type_name = service_type_name - self.service_manifest_name = service_manifest_name - self.code_package_name = code_package_name - self.status = status - self.service_package_activation_id = service_package_activation_id diff --git a/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info.py b/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info.py deleted file mode 100644 index 03c61662..00000000 --- a/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .deployed_service_replica_detail_info import DeployedServiceReplicaDetailInfo - - -class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo): - """Information about a stateful replica running in a code package. Note - DeployedServiceReplicaQueryResult will contain duplicate data like - ServiceKind, ServiceName, PartitionId and replicaId. - - All required parameters must be populated in order to send to Azure. - - :param service_name: Full hierarchical name of the service in URI format - starting with `fabric:`. - :type service_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param current_service_operation: Specifies the current active life-cycle - operation on a stateful service replica or stateless service instance. - Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', - 'Abort' - :type current_service_operation: str or - ~azure.servicefabric.models.ServiceOperationName - :param current_service_operation_start_time_utc: The start time of the - current service operation in UTC format. - :type current_service_operation_start_time_utc: datetime - :param reported_load: List of load reported by replica. - :type reported_load: - list[~azure.servicefabric.models.LoadMetricReportInfo] - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - :param current_replicator_operation: Specifies the operation currently - being executed by the Replicator. Possible values include: 'Invalid', - 'None', 'Open', 'ChangeRole', 'UpdateEpoch', 'Close', 'Abort', - 'OnDataLoss', 'WaitForCatchup', 'Build' - :type current_replicator_operation: str or - ~azure.servicefabric.models.ReplicatorOperationName - :param read_status: Specifies the access status of the partition. Possible - values include: 'Invalid', 'Granted', 'ReconfigurationPending', - 'NotPrimary', 'NoWriteQuorum' - :type read_status: str or - ~azure.servicefabric.models.PartitionAccessStatus - :param write_status: Specifies the access status of the partition. - Possible values include: 'Invalid', 'Granted', 'ReconfigurationPending', - 'NotPrimary', 'NoWriteQuorum' - :type write_status: str or - ~azure.servicefabric.models.PartitionAccessStatus - :param replicator_status: Represents a base class for primary or secondary - replicator status. - Contains information about the service fabric replicator like the - replication/copy queue utilization, last acknowledgement received - timestamp, etc. - :type replicator_status: ~azure.servicefabric.models.ReplicatorStatus - :param replica_status: Key value store related information for the - replica. - :type replica_status: - ~azure.servicefabric.models.KeyValueStoreReplicaStatus - :param deployed_service_replica_query_result: Information about a stateful - service replica deployed on a node. - :type deployed_service_replica_query_result: - ~azure.servicefabric.models.DeployedStatefulServiceReplicaInfo - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'current_replicator_operation': {'key': 'CurrentReplicatorOperation', 'type': 'str'}, - 'read_status': {'key': 'ReadStatus', 'type': 'str'}, - 'write_status': {'key': 'WriteStatus', 'type': 'str'}, - 'replicator_status': {'key': 'ReplicatorStatus', 'type': 'ReplicatorStatus'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'KeyValueStoreReplicaStatus'}, - 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatefulServiceReplicaInfo'}, - } - - def __init__(self, **kwargs): - super(DeployedStatefulServiceReplicaDetailInfo, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.current_replicator_operation = kwargs.get('current_replicator_operation', None) - self.read_status = kwargs.get('read_status', None) - self.write_status = kwargs.get('write_status', None) - self.replicator_status = kwargs.get('replicator_status', None) - self.replica_status = kwargs.get('replica_status', None) - self.deployed_service_replica_query_result = kwargs.get('deployed_service_replica_query_result', None) - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info_py3.py b/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info_py3.py deleted file mode 100644 index fe98aade..00000000 --- a/customSDK/servicefabric/models/deployed_stateful_service_replica_detail_info_py3.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .deployed_service_replica_detail_info_py3 import DeployedServiceReplicaDetailInfo - - -class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo): - """Information about a stateful replica running in a code package. Note - DeployedServiceReplicaQueryResult will contain duplicate data like - ServiceKind, ServiceName, PartitionId and replicaId. - - All required parameters must be populated in order to send to Azure. - - :param service_name: Full hierarchical name of the service in URI format - starting with `fabric:`. - :type service_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param current_service_operation: Specifies the current active life-cycle - operation on a stateful service replica or stateless service instance. - Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', - 'Abort' - :type current_service_operation: str or - ~azure.servicefabric.models.ServiceOperationName - :param current_service_operation_start_time_utc: The start time of the - current service operation in UTC format. - :type current_service_operation_start_time_utc: datetime - :param reported_load: List of load reported by replica. - :type reported_load: - list[~azure.servicefabric.models.LoadMetricReportInfo] - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - :param current_replicator_operation: Specifies the operation currently - being executed by the Replicator. Possible values include: 'Invalid', - 'None', 'Open', 'ChangeRole', 'UpdateEpoch', 'Close', 'Abort', - 'OnDataLoss', 'WaitForCatchup', 'Build' - :type current_replicator_operation: str or - ~azure.servicefabric.models.ReplicatorOperationName - :param read_status: Specifies the access status of the partition. Possible - values include: 'Invalid', 'Granted', 'ReconfigurationPending', - 'NotPrimary', 'NoWriteQuorum' - :type read_status: str or - ~azure.servicefabric.models.PartitionAccessStatus - :param write_status: Specifies the access status of the partition. - Possible values include: 'Invalid', 'Granted', 'ReconfigurationPending', - 'NotPrimary', 'NoWriteQuorum' - :type write_status: str or - ~azure.servicefabric.models.PartitionAccessStatus - :param replicator_status: Represents a base class for primary or secondary - replicator status. - Contains information about the service fabric replicator like the - replication/copy queue utilization, last acknowledgement received - timestamp, etc. - :type replicator_status: ~azure.servicefabric.models.ReplicatorStatus - :param replica_status: Key value store related information for the - replica. - :type replica_status: - ~azure.servicefabric.models.KeyValueStoreReplicaStatus - :param deployed_service_replica_query_result: Information about a stateful - service replica deployed on a node. - :type deployed_service_replica_query_result: - ~azure.servicefabric.models.DeployedStatefulServiceReplicaInfo - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'current_replicator_operation': {'key': 'CurrentReplicatorOperation', 'type': 'str'}, - 'read_status': {'key': 'ReadStatus', 'type': 'str'}, - 'write_status': {'key': 'WriteStatus', 'type': 'str'}, - 'replicator_status': {'key': 'ReplicatorStatus', 'type': 'ReplicatorStatus'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'KeyValueStoreReplicaStatus'}, - 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatefulServiceReplicaInfo'}, - } - - def __init__(self, *, service_name: str=None, partition_id: str=None, current_service_operation=None, current_service_operation_start_time_utc=None, reported_load=None, replica_id: str=None, current_replicator_operation=None, read_status=None, write_status=None, replicator_status=None, replica_status=None, deployed_service_replica_query_result=None, **kwargs) -> None: - super(DeployedStatefulServiceReplicaDetailInfo, self).__init__(service_name=service_name, partition_id=partition_id, current_service_operation=current_service_operation, current_service_operation_start_time_utc=current_service_operation_start_time_utc, reported_load=reported_load, **kwargs) - self.replica_id = replica_id - self.current_replicator_operation = current_replicator_operation - self.read_status = read_status - self.write_status = write_status - self.replicator_status = replicator_status - self.replica_status = replica_status - self.deployed_service_replica_query_result = deployed_service_replica_query_result - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/deployed_stateful_service_replica_info.py b/customSDK/servicefabric/models/deployed_stateful_service_replica_info.py deleted file mode 100644 index a9fd7916..00000000 --- a/customSDK/servicefabric/models/deployed_stateful_service_replica_info.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .deployed_service_replica_info import DeployedServiceReplicaInfo - - -class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): - """Information about a stateful service replica deployed on a node. - - All required parameters must be populated in order to send to Azure. - - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param code_package_name: The name of the code package that hosts this - replica. - :type code_package_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param address: The last address returned by the replica in Open or - ChangeRole. - :type address: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param host_process_id: Host process ID of the process that is hosting the - replica. This will be zero if the replica is down. In hyper-v containers - this host process ID will be from different kernel. - :type host_process_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - :param replica_role: The role of a replica of a stateful service. Possible - values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', - 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', 'PrimaryAuxiliary' - :type replica_role: str or ~azure.servicefabric.models.ReplicaRole - :param reconfiguration_information: Information about current - reconfiguration like phase, type, previous configuration role of replica - and reconfiguration start date time. - :type reconfiguration_information: - ~azure.servicefabric.models.ReconfigurationInformation - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, - 'reconfiguration_information': {'key': 'ReconfigurationInformation', 'type': 'ReconfigurationInformation'}, - } - - def __init__(self, **kwargs): - super(DeployedStatefulServiceReplicaInfo, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.replica_role = kwargs.get('replica_role', None) - self.reconfiguration_information = kwargs.get('reconfiguration_information', None) - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/deployed_stateful_service_replica_info_py3.py b/customSDK/servicefabric/models/deployed_stateful_service_replica_info_py3.py deleted file mode 100644 index d298b62d..00000000 --- a/customSDK/servicefabric/models/deployed_stateful_service_replica_info_py3.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .deployed_service_replica_info_py3 import DeployedServiceReplicaInfo - - -class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): - """Information about a stateful service replica deployed on a node. - - All required parameters must be populated in order to send to Azure. - - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param code_package_name: The name of the code package that hosts this - replica. - :type code_package_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param address: The last address returned by the replica in Open or - ChangeRole. - :type address: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param host_process_id: Host process ID of the process that is hosting the - replica. This will be zero if the replica is down. In hyper-v containers - this host process ID will be from different kernel. - :type host_process_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - :param replica_role: The role of a replica of a stateful service. Possible - values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', - 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', 'PrimaryAuxiliary' - :type replica_role: str or ~azure.servicefabric.models.ReplicaRole - :param reconfiguration_information: Information about current - reconfiguration like phase, type, previous configuration role of replica - and reconfiguration start date time. - :type reconfiguration_information: - ~azure.servicefabric.models.ReconfigurationInformation - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, - 'reconfiguration_information': {'key': 'ReconfigurationInformation', 'type': 'ReconfigurationInformation'}, - } - - def __init__(self, *, service_name: str=None, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, partition_id: str=None, replica_status=None, address: str=None, service_package_activation_id: str=None, host_process_id: str=None, replica_id: str=None, replica_role=None, reconfiguration_information=None, **kwargs) -> None: - super(DeployedStatefulServiceReplicaInfo, self).__init__(service_name=service_name, service_type_name=service_type_name, service_manifest_name=service_manifest_name, code_package_name=code_package_name, partition_id=partition_id, replica_status=replica_status, address=address, service_package_activation_id=service_package_activation_id, host_process_id=host_process_id, **kwargs) - self.replica_id = replica_id - self.replica_role = replica_role - self.reconfiguration_information = reconfiguration_information - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info.py b/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info.py deleted file mode 100644 index 4f06117b..00000000 --- a/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .deployed_service_replica_detail_info import DeployedServiceReplicaDetailInfo - - -class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInfo): - """Information about a stateless instance running in a code package. Note that - DeployedServiceReplicaQueryResult will contain duplicate data like - ServiceKind, ServiceName, PartitionId and InstanceId. - - All required parameters must be populated in order to send to Azure. - - :param service_name: Full hierarchical name of the service in URI format - starting with `fabric:`. - :type service_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param current_service_operation: Specifies the current active life-cycle - operation on a stateful service replica or stateless service instance. - Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', - 'Abort' - :type current_service_operation: str or - ~azure.servicefabric.models.ServiceOperationName - :param current_service_operation_start_time_utc: The start time of the - current service operation in UTC format. - :type current_service_operation_start_time_utc: datetime - :param reported_load: List of load reported by replica. - :type reported_load: - list[~azure.servicefabric.models.LoadMetricReportInfo] - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_id: Id of a stateless service instance. InstanceId is used - by Service Fabric to uniquely identify an instance of a partition of a - stateless service. It is unique within a partition and does not change for - the lifetime of the instance. If the instance has failed over on the same - or different node, it will get a different value for the InstanceId. - :type instance_id: str - :param deployed_service_replica_query_result: Information about a - stateless service instance deployed on a node. - :type deployed_service_replica_query_result: - ~azure.servicefabric.models.DeployedStatelessServiceInstanceInfo - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatelessServiceInstanceInfo'}, - } - - def __init__(self, **kwargs): - super(DeployedStatelessServiceInstanceDetailInfo, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.deployed_service_replica_query_result = kwargs.get('deployed_service_replica_query_result', None) - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info_py3.py b/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info_py3.py deleted file mode 100644 index 3bbb72b6..00000000 --- a/customSDK/servicefabric/models/deployed_stateless_service_instance_detail_info_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .deployed_service_replica_detail_info_py3 import DeployedServiceReplicaDetailInfo - - -class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInfo): - """Information about a stateless instance running in a code package. Note that - DeployedServiceReplicaQueryResult will contain duplicate data like - ServiceKind, ServiceName, PartitionId and InstanceId. - - All required parameters must be populated in order to send to Azure. - - :param service_name: Full hierarchical name of the service in URI format - starting with `fabric:`. - :type service_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param current_service_operation: Specifies the current active life-cycle - operation on a stateful service replica or stateless service instance. - Possible values include: 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', - 'Abort' - :type current_service_operation: str or - ~azure.servicefabric.models.ServiceOperationName - :param current_service_operation_start_time_utc: The start time of the - current service operation in UTC format. - :type current_service_operation_start_time_utc: datetime - :param reported_load: List of load reported by replica. - :type reported_load: - list[~azure.servicefabric.models.LoadMetricReportInfo] - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_id: Id of a stateless service instance. InstanceId is used - by Service Fabric to uniquely identify an instance of a partition of a - stateless service. It is unique within a partition and does not change for - the lifetime of the instance. If the instance has failed over on the same - or different node, it will get a different value for the InstanceId. - :type instance_id: str - :param deployed_service_replica_query_result: Information about a - stateless service instance deployed on a node. - :type deployed_service_replica_query_result: - ~azure.servicefabric.models.DeployedStatelessServiceInstanceInfo - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatelessServiceInstanceInfo'}, - } - - def __init__(self, *, service_name: str=None, partition_id: str=None, current_service_operation=None, current_service_operation_start_time_utc=None, reported_load=None, instance_id: str=None, deployed_service_replica_query_result=None, **kwargs) -> None: - super(DeployedStatelessServiceInstanceDetailInfo, self).__init__(service_name=service_name, partition_id=partition_id, current_service_operation=current_service_operation, current_service_operation_start_time_utc=current_service_operation_start_time_utc, reported_load=reported_load, **kwargs) - self.instance_id = instance_id - self.deployed_service_replica_query_result = deployed_service_replica_query_result - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/deployed_stateless_service_instance_info.py b/customSDK/servicefabric/models/deployed_stateless_service_instance_info.py deleted file mode 100644 index 80bf5fe6..00000000 --- a/customSDK/servicefabric/models/deployed_stateless_service_instance_info.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .deployed_service_replica_info import DeployedServiceReplicaInfo - - -class DeployedStatelessServiceInstanceInfo(DeployedServiceReplicaInfo): - """Information about a stateless service instance deployed on a node. - - All required parameters must be populated in order to send to Azure. - - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param code_package_name: The name of the code package that hosts this - replica. - :type code_package_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param address: The last address returned by the replica in Open or - ChangeRole. - :type address: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param host_process_id: Host process ID of the process that is hosting the - replica. This will be zero if the replica is down. In hyper-v containers - this host process ID will be from different kernel. - :type host_process_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_id: Id of a stateless service instance. InstanceId is used - by Service Fabric to uniquely identify an instance of a partition of a - stateless service. It is unique within a partition and does not change for - the lifetime of the instance. If the instance has failed over on the same - or different node, it will get a different value for the InstanceId. - :type instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeployedStatelessServiceInstanceInfo, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/deployed_stateless_service_instance_info_py3.py b/customSDK/servicefabric/models/deployed_stateless_service_instance_info_py3.py deleted file mode 100644 index 906c530d..00000000 --- a/customSDK/servicefabric/models/deployed_stateless_service_instance_info_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .deployed_service_replica_info_py3 import DeployedServiceReplicaInfo - - -class DeployedStatelessServiceInstanceInfo(DeployedServiceReplicaInfo): - """Information about a stateless service instance deployed on a node. - - All required parameters must be populated in order to send to Azure. - - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param code_package_name: The name of the code package that hosts this - replica. - :type code_package_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param address: The last address returned by the replica in Open or - ChangeRole. - :type address: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param host_process_id: Host process ID of the process that is hosting the - replica. This will be zero if the replica is down. In hyper-v containers - this host process ID will be from different kernel. - :type host_process_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_id: Id of a stateless service instance. InstanceId is used - by Service Fabric to uniquely identify an instance of a partition of a - stateless service. It is unique within a partition and does not change for - the lifetime of the instance. If the instance has failed over on the same - or different node, it will get a different value for the InstanceId. - :type instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, *, service_name: str=None, service_type_name: str=None, service_manifest_name: str=None, code_package_name: str=None, partition_id: str=None, replica_status=None, address: str=None, service_package_activation_id: str=None, host_process_id: str=None, instance_id: str=None, **kwargs) -> None: - super(DeployedStatelessServiceInstanceInfo, self).__init__(service_name=service_name, service_type_name=service_type_name, service_manifest_name=service_manifest_name, code_package_name=code_package_name, partition_id=partition_id, replica_status=replica_status, address=address, service_package_activation_id=service_package_activation_id, host_process_id=host_process_id, **kwargs) - self.instance_id = instance_id - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/diagnostics_description.py b/customSDK/servicefabric/models/diagnostics_description.py deleted file mode 100644 index 8c4e0a81..00000000 --- a/customSDK/servicefabric/models/diagnostics_description.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsDescription(Model): - """Describes the diagnostics options available. - - :param sinks: List of supported sinks that can be referenced. - :type sinks: list[~azure.servicefabric.models.DiagnosticsSinkProperties] - :param enabled: Status of whether or not sinks are enabled. - :type enabled: bool - :param default_sink_refs: The sinks to be used if diagnostics is enabled. - Sink choices can be overridden at the service and code package level. - :type default_sink_refs: list[str] - """ - - _attribute_map = { - 'sinks': {'key': 'sinks', 'type': '[DiagnosticsSinkProperties]'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'default_sink_refs': {'key': 'defaultSinkRefs', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(DiagnosticsDescription, self).__init__(**kwargs) - self.sinks = kwargs.get('sinks', None) - self.enabled = kwargs.get('enabled', None) - self.default_sink_refs = kwargs.get('default_sink_refs', None) diff --git a/customSDK/servicefabric/models/diagnostics_description_py3.py b/customSDK/servicefabric/models/diagnostics_description_py3.py deleted file mode 100644 index 6ff42afc..00000000 --- a/customSDK/servicefabric/models/diagnostics_description_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsDescription(Model): - """Describes the diagnostics options available. - - :param sinks: List of supported sinks that can be referenced. - :type sinks: list[~azure.servicefabric.models.DiagnosticsSinkProperties] - :param enabled: Status of whether or not sinks are enabled. - :type enabled: bool - :param default_sink_refs: The sinks to be used if diagnostics is enabled. - Sink choices can be overridden at the service and code package level. - :type default_sink_refs: list[str] - """ - - _attribute_map = { - 'sinks': {'key': 'sinks', 'type': '[DiagnosticsSinkProperties]'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'default_sink_refs': {'key': 'defaultSinkRefs', 'type': '[str]'}, - } - - def __init__(self, *, sinks=None, enabled: bool=None, default_sink_refs=None, **kwargs) -> None: - super(DiagnosticsDescription, self).__init__(**kwargs) - self.sinks = sinks - self.enabled = enabled - self.default_sink_refs = default_sink_refs diff --git a/customSDK/servicefabric/models/diagnostics_ref.py b/customSDK/servicefabric/models/diagnostics_ref.py deleted file mode 100644 index 3d4c803c..00000000 --- a/customSDK/servicefabric/models/diagnostics_ref.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsRef(Model): - """Reference to sinks in DiagnosticsDescription. - - :param enabled: Status of whether or not sinks are enabled. - :type enabled: bool - :param sink_refs: List of sinks to be used if enabled. References the list - of sinks in DiagnosticsDescription. - :type sink_refs: list[str] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'sink_refs': {'key': 'sinkRefs', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(DiagnosticsRef, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.sink_refs = kwargs.get('sink_refs', None) diff --git a/customSDK/servicefabric/models/diagnostics_ref_py3.py b/customSDK/servicefabric/models/diagnostics_ref_py3.py deleted file mode 100644 index f11fbf2b..00000000 --- a/customSDK/servicefabric/models/diagnostics_ref_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsRef(Model): - """Reference to sinks in DiagnosticsDescription. - - :param enabled: Status of whether or not sinks are enabled. - :type enabled: bool - :param sink_refs: List of sinks to be used if enabled. References the list - of sinks in DiagnosticsDescription. - :type sink_refs: list[str] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'sink_refs': {'key': 'sinkRefs', 'type': '[str]'}, - } - - def __init__(self, *, enabled: bool=None, sink_refs=None, **kwargs) -> None: - super(DiagnosticsRef, self).__init__(**kwargs) - self.enabled = enabled - self.sink_refs = sink_refs diff --git a/customSDK/servicefabric/models/diagnostics_sink_properties.py b/customSDK/servicefabric/models/diagnostics_sink_properties.py deleted file mode 100644 index 63da00fe..00000000 --- a/customSDK/servicefabric/models/diagnostics_sink_properties.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsSinkProperties(Model): - """Properties of a DiagnosticsSink. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureInternalMonitoringPipelineSinkDescription - - All required parameters must be populated in order to send to Azure. - - :param name: Name of the sink. This value is referenced by - DiagnosticsReferenceDescription - :type name: str - :param description: A description of the sink. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AzureInternalMonitoringPipeline': 'AzureInternalMonitoringPipelineSinkDescription'} - } - - def __init__(self, **kwargs): - super(DiagnosticsSinkProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) - self.kind = None diff --git a/customSDK/servicefabric/models/diagnostics_sink_properties_py3.py b/customSDK/servicefabric/models/diagnostics_sink_properties_py3.py deleted file mode 100644 index 123512a4..00000000 --- a/customSDK/servicefabric/models/diagnostics_sink_properties_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiagnosticsSinkProperties(Model): - """Properties of a DiagnosticsSink. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureInternalMonitoringPipelineSinkDescription - - All required parameters must be populated in order to send to Azure. - - :param name: Name of the sink. This value is referenced by - DiagnosticsReferenceDescription - :type name: str - :param description: A description of the sink. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AzureInternalMonitoringPipeline': 'AzureInternalMonitoringPipelineSinkDescription'} - } - - def __init__(self, *, name: str=None, description: str=None, **kwargs) -> None: - super(DiagnosticsSinkProperties, self).__init__(**kwargs) - self.name = name - self.description = description - self.kind = None diff --git a/customSDK/servicefabric/models/disable_backup_description.py b/customSDK/servicefabric/models/disable_backup_description.py deleted file mode 100644 index 3834793e..00000000 --- a/customSDK/servicefabric/models/disable_backup_description.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DisableBackupDescription(Model): - """It describes the body parameters while disabling backup of a backup - entity(Application/Service/Partition). - - All required parameters must be populated in order to send to Azure. - - :param clean_backup: Required. Boolean flag to delete backups. It can be - set to true for deleting all the backups which were created for the backup - entity that is getting disabled for backup. - :type clean_backup: bool - """ - - _validation = { - 'clean_backup': {'required': True}, - } - - _attribute_map = { - 'clean_backup': {'key': 'CleanBackup', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(DisableBackupDescription, self).__init__(**kwargs) - self.clean_backup = kwargs.get('clean_backup', None) diff --git a/customSDK/servicefabric/models/disable_backup_description_py3.py b/customSDK/servicefabric/models/disable_backup_description_py3.py deleted file mode 100644 index ad03ecd7..00000000 --- a/customSDK/servicefabric/models/disable_backup_description_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DisableBackupDescription(Model): - """It describes the body parameters while disabling backup of a backup - entity(Application/Service/Partition). - - All required parameters must be populated in order to send to Azure. - - :param clean_backup: Required. Boolean flag to delete backups. It can be - set to true for deleting all the backups which were created for the backup - entity that is getting disabled for backup. - :type clean_backup: bool - """ - - _validation = { - 'clean_backup': {'required': True}, - } - - _attribute_map = { - 'clean_backup': {'key': 'CleanBackup', 'type': 'bool'}, - } - - def __init__(self, *, clean_backup: bool, **kwargs) -> None: - super(DisableBackupDescription, self).__init__(**kwargs) - self.clean_backup = clean_backup diff --git a/customSDK/servicefabric/models/disk_info.py b/customSDK/servicefabric/models/disk_info.py deleted file mode 100644 index 2486a4cd..00000000 --- a/customSDK/servicefabric/models/disk_info.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInfo(Model): - """Information about the disk. - - :param capacity: the disk size in bytes - :type capacity: str - :param available_space: the available disk space in bytes - :type available_space: str - """ - - _attribute_map = { - 'capacity': {'key': 'Capacity', 'type': 'str'}, - 'available_space': {'key': 'AvailableSpace', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DiskInfo, self).__init__(**kwargs) - self.capacity = kwargs.get('capacity', None) - self.available_space = kwargs.get('available_space', None) diff --git a/customSDK/servicefabric/models/disk_info_py3.py b/customSDK/servicefabric/models/disk_info_py3.py deleted file mode 100644 index 6af696a2..00000000 --- a/customSDK/servicefabric/models/disk_info_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DiskInfo(Model): - """Information about the disk. - - :param capacity: the disk size in bytes - :type capacity: str - :param available_space: the available disk space in bytes - :type available_space: str - """ - - _attribute_map = { - 'capacity': {'key': 'Capacity', 'type': 'str'}, - 'available_space': {'key': 'AvailableSpace', 'type': 'str'}, - } - - def __init__(self, *, capacity: str=None, available_space: str=None, **kwargs) -> None: - super(DiskInfo, self).__init__(**kwargs) - self.capacity = capacity - self.available_space = available_space diff --git a/customSDK/servicefabric/models/double_property_value.py b/customSDK/servicefabric/models/double_property_value.py deleted file mode 100644 index 4643e922..00000000 --- a/customSDK/servicefabric/models/double_property_value.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_value import PropertyValue - - -class DoublePropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Double. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. The data of the property value. - :type data: float - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(DoublePropertyValue, self).__init__(**kwargs) - self.data = kwargs.get('data', None) - self.kind = 'Double' diff --git a/customSDK/servicefabric/models/double_property_value_py3.py b/customSDK/servicefabric/models/double_property_value_py3.py deleted file mode 100644 index 2b0f6f01..00000000 --- a/customSDK/servicefabric/models/double_property_value_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_value_py3 import PropertyValue - - -class DoublePropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Double. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. The data of the property value. - :type data: float - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'float'}, - } - - def __init__(self, *, data: float, **kwargs) -> None: - super(DoublePropertyValue, self).__init__(**kwargs) - self.data = data - self.kind = 'Double' diff --git a/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description.py b/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description.py deleted file mode 100644 index a9745259..00000000 --- a/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_storage_description import BackupStorageDescription - - -class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Dsms Azure blob store used for storing and - enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - :param storage_credentials_source_location: Required. The source location - of the storage credentials to connect to the Dsms Azure blob store. - :type storage_credentials_source_location: str - :param container_name: Required. The name of the container in the blob - store to store and enumerate backups from. - :type container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'storage_credentials_source_location': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'storage_credentials_source_location': {'key': 'StorageCredentialsSourceLocation', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DsmsAzureBlobBackupStorageDescription, self).__init__(**kwargs) - self.storage_credentials_source_location = kwargs.get('storage_credentials_source_location', None) - self.container_name = kwargs.get('container_name', None) - self.storage_kind = 'DsmsAzureBlobStore' diff --git a/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description_py3.py b/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description_py3.py deleted file mode 100644 index 8419de8a..00000000 --- a/customSDK/servicefabric/models/dsms_azure_blob_backup_storage_description_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_storage_description_py3 import BackupStorageDescription - - -class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Dsms Azure blob store used for storing and - enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - :param storage_credentials_source_location: Required. The source location - of the storage credentials to connect to the Dsms Azure blob store. - :type storage_credentials_source_location: str - :param container_name: Required. The name of the container in the blob - store to store and enumerate backups from. - :type container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'storage_credentials_source_location': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'storage_credentials_source_location': {'key': 'StorageCredentialsSourceLocation', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__(self, *, storage_credentials_source_location: str, container_name: str, friendly_name: str=None, **kwargs) -> None: - super(DsmsAzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) - self.storage_credentials_source_location = storage_credentials_source_location - self.container_name = container_name - self.storage_kind = 'DsmsAzureBlobStore' diff --git a/customSDK/servicefabric/models/enable_backup_description.py b/customSDK/servicefabric/models/enable_backup_description.py deleted file mode 100644 index a9439c8a..00000000 --- a/customSDK/servicefabric/models/enable_backup_description.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnableBackupDescription(Model): - """Specifies the parameters needed to enable periodic backup. - - All required parameters must be populated in order to send to Azure. - - :param backup_policy_name: Required. Name of the backup policy to be used - for enabling periodic backups. - :type backup_policy_name: str - """ - - _validation = { - 'backup_policy_name': {'required': True}, - } - - _attribute_map = { - 'backup_policy_name': {'key': 'BackupPolicyName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EnableBackupDescription, self).__init__(**kwargs) - self.backup_policy_name = kwargs.get('backup_policy_name', None) diff --git a/customSDK/servicefabric/models/enable_backup_description_py3.py b/customSDK/servicefabric/models/enable_backup_description_py3.py deleted file mode 100644 index 45183529..00000000 --- a/customSDK/servicefabric/models/enable_backup_description_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnableBackupDescription(Model): - """Specifies the parameters needed to enable periodic backup. - - All required parameters must be populated in order to send to Azure. - - :param backup_policy_name: Required. Name of the backup policy to be used - for enabling periodic backups. - :type backup_policy_name: str - """ - - _validation = { - 'backup_policy_name': {'required': True}, - } - - _attribute_map = { - 'backup_policy_name': {'key': 'BackupPolicyName', 'type': 'str'}, - } - - def __init__(self, *, backup_policy_name: str, **kwargs) -> None: - super(EnableBackupDescription, self).__init__(**kwargs) - self.backup_policy_name = backup_policy_name diff --git a/customSDK/servicefabric/models/endpoint_properties.py b/customSDK/servicefabric/models/endpoint_properties.py deleted file mode 100644 index fe53d35e..00000000 --- a/customSDK/servicefabric/models/endpoint_properties.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EndpointProperties(Model): - """Describes a container endpoint. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the endpoint. - :type name: str - :param port: Port used by the container. - :type port: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(EndpointProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.port = kwargs.get('port', None) diff --git a/customSDK/servicefabric/models/endpoint_properties_py3.py b/customSDK/servicefabric/models/endpoint_properties_py3.py deleted file mode 100644 index d6144250..00000000 --- a/customSDK/servicefabric/models/endpoint_properties_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EndpointProperties(Model): - """Describes a container endpoint. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the endpoint. - :type name: str - :param port: Port used by the container. - :type port: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__(self, *, name: str, port: int=None, **kwargs) -> None: - super(EndpointProperties, self).__init__(**kwargs) - self.name = name - self.port = port diff --git a/customSDK/servicefabric/models/endpoint_ref.py b/customSDK/servicefabric/models/endpoint_ref.py deleted file mode 100644 index 3740b8c7..00000000 --- a/customSDK/servicefabric/models/endpoint_ref.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EndpointRef(Model): - """Describes a reference to a service endpoint. - - :param name: Name of the endpoint. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EndpointRef, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/endpoint_ref_py3.py b/customSDK/servicefabric/models/endpoint_ref_py3.py deleted file mode 100644 index 28999f87..00000000 --- a/customSDK/servicefabric/models/endpoint_ref_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EndpointRef(Model): - """Describes a reference to a service endpoint. - - :param name: Name of the endpoint. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(EndpointRef, self).__init__(**kwargs) - self.name = name diff --git a/customSDK/servicefabric/models/ensure_availability_safety_check.py b/customSDK/servicefabric/models/ensure_availability_safety_check.py deleted file mode 100644 index e432ba6e..00000000 --- a/customSDK/servicefabric/models/ensure_availability_safety_check.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_safety_check import PartitionSafetyCheck - - -class EnsureAvailabilitySafetyCheck(PartitionSafetyCheck): - """Safety check that waits to ensure the availability of the partition. It - waits until there are replicas available such that bringing down this - replica will not cause availability loss for the partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EnsureAvailabilitySafetyCheck, self).__init__(**kwargs) - self.kind = 'EnsureAvailability' diff --git a/customSDK/servicefabric/models/ensure_availability_safety_check_py3.py b/customSDK/servicefabric/models/ensure_availability_safety_check_py3.py deleted file mode 100644 index 72de0dc6..00000000 --- a/customSDK/servicefabric/models/ensure_availability_safety_check_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_safety_check_py3 import PartitionSafetyCheck - - -class EnsureAvailabilitySafetyCheck(PartitionSafetyCheck): - """Safety check that waits to ensure the availability of the partition. It - waits until there are replicas available such that bringing down this - replica will not cause availability loss for the partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, partition_id: str=None, **kwargs) -> None: - super(EnsureAvailabilitySafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'EnsureAvailability' diff --git a/customSDK/servicefabric/models/ensure_partition_quorum_safety_check.py b/customSDK/servicefabric/models/ensure_partition_quorum_safety_check.py deleted file mode 100644 index 7315ac2f..00000000 --- a/customSDK/servicefabric/models/ensure_partition_quorum_safety_check.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_safety_check import PartitionSafetyCheck - - -class EnsurePartitionQuorumSafetyCheck(PartitionSafetyCheck): - """Safety check that ensures that a quorum of replicas are not lost for a - partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EnsurePartitionQuorumSafetyCheck, self).__init__(**kwargs) - self.kind = 'EnsurePartitionQuorum' diff --git a/customSDK/servicefabric/models/ensure_partition_quorum_safety_check_py3.py b/customSDK/servicefabric/models/ensure_partition_quorum_safety_check_py3.py deleted file mode 100644 index 532d5e88..00000000 --- a/customSDK/servicefabric/models/ensure_partition_quorum_safety_check_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_safety_check_py3 import PartitionSafetyCheck - - -class EnsurePartitionQuorumSafetyCheck(PartitionSafetyCheck): - """Safety check that ensures that a quorum of replicas are not lost for a - partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, partition_id: str=None, **kwargs) -> None: - super(EnsurePartitionQuorumSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'EnsurePartitionQuorum' diff --git a/customSDK/servicefabric/models/entity_health.py b/customSDK/servicefabric/models/entity_health.py deleted file mode 100644 index dc944ccd..00000000 --- a/customSDK/servicefabric/models/entity_health.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EntityHealth(Model): - """Health information common to all entities in the cluster. It contains the - aggregated health state, health events and unhealthy evaluation. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - } - - def __init__(self, **kwargs): - super(EntityHealth, self).__init__(**kwargs) - self.aggregated_health_state = kwargs.get('aggregated_health_state', None) - self.health_events = kwargs.get('health_events', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.health_statistics = kwargs.get('health_statistics', None) diff --git a/customSDK/servicefabric/models/entity_health_py3.py b/customSDK/servicefabric/models/entity_health_py3.py deleted file mode 100644 index a253cd8b..00000000 --- a/customSDK/servicefabric/models/entity_health_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EntityHealth(Model): - """Health information common to all entities in the cluster. It contains the - aggregated health state, health events and unhealthy evaluation. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, **kwargs) -> None: - super(EntityHealth, self).__init__(**kwargs) - self.aggregated_health_state = aggregated_health_state - self.health_events = health_events - self.unhealthy_evaluations = unhealthy_evaluations - self.health_statistics = health_statistics diff --git a/customSDK/servicefabric/models/entity_health_state.py b/customSDK/servicefabric/models/entity_health_state.py deleted file mode 100644 index 521a7b96..00000000 --- a/customSDK/servicefabric/models/entity_health_state.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EntityHealthState(Model): - """A base type for the health state of various entities in the cluster. It - contains the aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EntityHealthState, self).__init__(**kwargs) - self.aggregated_health_state = kwargs.get('aggregated_health_state', None) diff --git a/customSDK/servicefabric/models/entity_health_state_chunk.py b/customSDK/servicefabric/models/entity_health_state_chunk.py deleted file mode 100644 index bf6fcd7f..00000000 --- a/customSDK/servicefabric/models/entity_health_state_chunk.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EntityHealthStateChunk(Model): - """A base type for the health state chunk of various entities in the cluster. - It contains the aggregated health state. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EntityHealthStateChunk, self).__init__(**kwargs) - self.health_state = kwargs.get('health_state', None) diff --git a/customSDK/servicefabric/models/entity_health_state_chunk_list.py b/customSDK/servicefabric/models/entity_health_state_chunk_list.py deleted file mode 100644 index 963811d6..00000000 --- a/customSDK/servicefabric/models/entity_health_state_chunk_list.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EntityHealthStateChunkList(Model): - """A base type for the list of health state chunks found in the cluster. It - contains the total number of health states that match the input filters. - - :param total_count: Total number of entity health state objects that match - the specified filters from the cluster health chunk query description. - :type total_count: long - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(EntityHealthStateChunkList, self).__init__(**kwargs) - self.total_count = kwargs.get('total_count', None) diff --git a/customSDK/servicefabric/models/entity_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/entity_health_state_chunk_list_py3.py deleted file mode 100644 index 3cdaa76f..00000000 --- a/customSDK/servicefabric/models/entity_health_state_chunk_list_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EntityHealthStateChunkList(Model): - """A base type for the list of health state chunks found in the cluster. It - contains the total number of health states that match the input filters. - - :param total_count: Total number of entity health state objects that match - the specified filters from the cluster health chunk query description. - :type total_count: long - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - } - - def __init__(self, *, total_count: int=None, **kwargs) -> None: - super(EntityHealthStateChunkList, self).__init__(**kwargs) - self.total_count = total_count diff --git a/customSDK/servicefabric/models/entity_health_state_chunk_py3.py b/customSDK/servicefabric/models/entity_health_state_chunk_py3.py deleted file mode 100644 index f0b5c39d..00000000 --- a/customSDK/servicefabric/models/entity_health_state_chunk_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EntityHealthStateChunk(Model): - """A base type for the health state chunk of various entities in the cluster. - It contains the aggregated health state. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - } - - def __init__(self, *, health_state=None, **kwargs) -> None: - super(EntityHealthStateChunk, self).__init__(**kwargs) - self.health_state = health_state diff --git a/customSDK/servicefabric/models/entity_health_state_py3.py b/customSDK/servicefabric/models/entity_health_state_py3.py deleted file mode 100644 index 0dcce956..00000000 --- a/customSDK/servicefabric/models/entity_health_state_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EntityHealthState(Model): - """A base type for the health state of various entities in the cluster. It - contains the aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, **kwargs) -> None: - super(EntityHealthState, self).__init__(**kwargs) - self.aggregated_health_state = aggregated_health_state diff --git a/customSDK/servicefabric/models/entity_kind_health_state_count.py b/customSDK/servicefabric/models/entity_kind_health_state_count.py deleted file mode 100644 index bec50a6a..00000000 --- a/customSDK/servicefabric/models/entity_kind_health_state_count.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EntityKindHealthStateCount(Model): - """Represents health state count for entities of the specified entity kind. - - :param entity_kind: The entity kind for which health states are evaluated. - Possible values include: 'Invalid', 'Node', 'Partition', 'Service', - 'Application', 'Replica', 'DeployedApplication', 'DeployedServicePackage', - 'Cluster' - :type entity_kind: str or ~azure.servicefabric.models.EntityKind - :param health_state_count: The health state count for the entities of the - specified kind. - :type health_state_count: ~azure.servicefabric.models.HealthStateCount - """ - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'health_state_count': {'key': 'HealthStateCount', 'type': 'HealthStateCount'}, - } - - def __init__(self, **kwargs): - super(EntityKindHealthStateCount, self).__init__(**kwargs) - self.entity_kind = kwargs.get('entity_kind', None) - self.health_state_count = kwargs.get('health_state_count', None) diff --git a/customSDK/servicefabric/models/entity_kind_health_state_count_py3.py b/customSDK/servicefabric/models/entity_kind_health_state_count_py3.py deleted file mode 100644 index a7ff9371..00000000 --- a/customSDK/servicefabric/models/entity_kind_health_state_count_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EntityKindHealthStateCount(Model): - """Represents health state count for entities of the specified entity kind. - - :param entity_kind: The entity kind for which health states are evaluated. - Possible values include: 'Invalid', 'Node', 'Partition', 'Service', - 'Application', 'Replica', 'DeployedApplication', 'DeployedServicePackage', - 'Cluster' - :type entity_kind: str or ~azure.servicefabric.models.EntityKind - :param health_state_count: The health state count for the entities of the - specified kind. - :type health_state_count: ~azure.servicefabric.models.HealthStateCount - """ - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'health_state_count': {'key': 'HealthStateCount', 'type': 'HealthStateCount'}, - } - - def __init__(self, *, entity_kind=None, health_state_count=None, **kwargs) -> None: - super(EntityKindHealthStateCount, self).__init__(**kwargs) - self.entity_kind = entity_kind - self.health_state_count = health_state_count diff --git a/customSDK/servicefabric/models/environment_variable.py b/customSDK/servicefabric/models/environment_variable.py deleted file mode 100644 index 7993e54f..00000000 --- a/customSDK/servicefabric/models/environment_variable.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentVariable(Model): - """Describes an environment variable for the container. - - :param type: The type of the environment variable being given in value. - Possible values include: 'ClearText', 'KeyVaultReference', - 'SecretValueReference'. Default value: "ClearText" . - :type type: str or ~azure.servicefabric.models.EnvironmentVariableType - :param name: The name of the environment variable. - :type name: str - :param value: The value of the environment variable, will be processed - based on the type provided. - :type value: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EnvironmentVariable, self).__init__(**kwargs) - self.type = kwargs.get('type', "ClearText") - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/environment_variable_py3.py b/customSDK/servicefabric/models/environment_variable_py3.py deleted file mode 100644 index f0515a9f..00000000 --- a/customSDK/servicefabric/models/environment_variable_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnvironmentVariable(Model): - """Describes an environment variable for the container. - - :param type: The type of the environment variable being given in value. - Possible values include: 'ClearText', 'KeyVaultReference', - 'SecretValueReference'. Default value: "ClearText" . - :type type: str or ~azure.servicefabric.models.EnvironmentVariableType - :param name: The name of the environment variable. - :type name: str - :param value: The value of the environment variable, will be processed - based on the type provided. - :type value: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, type="ClearText", name: str=None, value: str=None, **kwargs) -> None: - super(EnvironmentVariable, self).__init__(**kwargs) - self.type = type - self.name = name - self.value = value diff --git a/customSDK/servicefabric/models/epoch.py b/customSDK/servicefabric/models/epoch.py deleted file mode 100644 index 951ff5c5..00000000 --- a/customSDK/servicefabric/models/epoch.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Epoch(Model): - """An Epoch is a configuration number for the partition as a whole. When the - configuration of the replica set changes, for example when the Primary - replica changes, the operations that are replicated from the new Primary - replica are said to be a new Epoch from the ones which were sent by the old - Primary replica. - - :param configuration_version: The current configuration number of this - Epoch. The configuration number is an increasing value that is updated - whenever the configuration of this replica set changes. - :type configuration_version: str - :param data_loss_version: The current data loss number of this Epoch. The - data loss number property is an increasing value which is updated whenever - data loss is suspected, as when loss of a quorum of replicas in the - replica set that includes the Primary replica. - :type data_loss_version: str - """ - - _attribute_map = { - 'configuration_version': {'key': 'ConfigurationVersion', 'type': 'str'}, - 'data_loss_version': {'key': 'DataLossVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Epoch, self).__init__(**kwargs) - self.configuration_version = kwargs.get('configuration_version', None) - self.data_loss_version = kwargs.get('data_loss_version', None) diff --git a/customSDK/servicefabric/models/epoch_py3.py b/customSDK/servicefabric/models/epoch_py3.py deleted file mode 100644 index 2d9ef95f..00000000 --- a/customSDK/servicefabric/models/epoch_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Epoch(Model): - """An Epoch is a configuration number for the partition as a whole. When the - configuration of the replica set changes, for example when the Primary - replica changes, the operations that are replicated from the new Primary - replica are said to be a new Epoch from the ones which were sent by the old - Primary replica. - - :param configuration_version: The current configuration number of this - Epoch. The configuration number is an increasing value that is updated - whenever the configuration of this replica set changes. - :type configuration_version: str - :param data_loss_version: The current data loss number of this Epoch. The - data loss number property is an increasing value which is updated whenever - data loss is suspected, as when loss of a quorum of replicas in the - replica set that includes the Primary replica. - :type data_loss_version: str - """ - - _attribute_map = { - 'configuration_version': {'key': 'ConfigurationVersion', 'type': 'str'}, - 'data_loss_version': {'key': 'DataLossVersion', 'type': 'str'}, - } - - def __init__(self, *, configuration_version: str=None, data_loss_version: str=None, **kwargs) -> None: - super(Epoch, self).__init__(**kwargs) - self.configuration_version = configuration_version - self.data_loss_version = data_loss_version diff --git a/customSDK/servicefabric/models/event_health_evaluation.py b/customSDK/servicefabric/models/event_health_evaluation.py deleted file mode 100644 index 00debb2f..00000000 --- a/customSDK/servicefabric/models/event_health_evaluation.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class EventHealthEvaluation(HealthEvaluation): - """Represents health evaluation of a HealthEvent that was reported on the - entity. - The health evaluation is returned when evaluating health of an entity - results in Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param consider_warning_as_error: Indicates whether warnings are treated - with the same severity as errors. The field is specified in the health - policy used to evaluate the entity. - :type consider_warning_as_error: bool - :param unhealthy_event: Represents health information reported on a health - entity, such as cluster, application or node, with additional metadata - added by the Health Manager. - :type unhealthy_event: ~azure.servicefabric.models.HealthEvent - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'unhealthy_event': {'key': 'UnhealthyEvent', 'type': 'HealthEvent'}, - } - - def __init__(self, **kwargs): - super(EventHealthEvaluation, self).__init__(**kwargs) - self.consider_warning_as_error = kwargs.get('consider_warning_as_error', None) - self.unhealthy_event = kwargs.get('unhealthy_event', None) - self.kind = 'Event' diff --git a/customSDK/servicefabric/models/event_health_evaluation_py3.py b/customSDK/servicefabric/models/event_health_evaluation_py3.py deleted file mode 100644 index 5198e6a0..00000000 --- a/customSDK/servicefabric/models/event_health_evaluation_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class EventHealthEvaluation(HealthEvaluation): - """Represents health evaluation of a HealthEvent that was reported on the - entity. - The health evaluation is returned when evaluating health of an entity - results in Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param consider_warning_as_error: Indicates whether warnings are treated - with the same severity as errors. The field is specified in the health - policy used to evaluate the entity. - :type consider_warning_as_error: bool - :param unhealthy_event: Represents health information reported on a health - entity, such as cluster, application or node, with additional metadata - added by the Health Manager. - :type unhealthy_event: ~azure.servicefabric.models.HealthEvent - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'unhealthy_event': {'key': 'UnhealthyEvent', 'type': 'HealthEvent'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, consider_warning_as_error: bool=None, unhealthy_event=None, **kwargs) -> None: - super(EventHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.consider_warning_as_error = consider_warning_as_error - self.unhealthy_event = unhealthy_event - self.kind = 'Event' diff --git a/customSDK/servicefabric/models/executing_faults_chaos_event.py b/customSDK/servicefabric/models/executing_faults_chaos_event.py deleted file mode 100644 index 501f1453..00000000 --- a/customSDK/servicefabric/models/executing_faults_chaos_event.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .chaos_event import ChaosEvent - - -class ExecutingFaultsChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos has decided on the - faults for an iteration. This Chaos event contains the details of the - faults as a list of strings. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param faults: List of string description of the faults that Chaos decided - to execute in an iteration. - :type faults: list[str] - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'faults': {'key': 'Faults', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ExecutingFaultsChaosEvent, self).__init__(**kwargs) - self.faults = kwargs.get('faults', None) - self.kind = 'ExecutingFaults' diff --git a/customSDK/servicefabric/models/executing_faults_chaos_event_py3.py b/customSDK/servicefabric/models/executing_faults_chaos_event_py3.py deleted file mode 100644 index 12947de1..00000000 --- a/customSDK/servicefabric/models/executing_faults_chaos_event_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .chaos_event_py3 import ChaosEvent - - -class ExecutingFaultsChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos has decided on the - faults for an iteration. This Chaos event contains the details of the - faults as a list of strings. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param faults: List of string description of the faults that Chaos decided - to execute in an iteration. - :type faults: list[str] - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'faults': {'key': 'Faults', 'type': '[str]'}, - } - - def __init__(self, *, time_stamp_utc, faults=None, **kwargs) -> None: - super(ExecutingFaultsChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.faults = faults - self.kind = 'ExecutingFaults' diff --git a/customSDK/servicefabric/models/execution_policy.py b/customSDK/servicefabric/models/execution_policy.py deleted file mode 100644 index d03ba119..00000000 --- a/customSDK/servicefabric/models/execution_policy.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExecutionPolicy(Model): - """The execution policy of the service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DefaultExecutionPolicy, RunToCompletionExecutionPolicy - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'Default': 'DefaultExecutionPolicy', 'RunToCompletion': 'RunToCompletionExecutionPolicy'} - } - - def __init__(self, **kwargs): - super(ExecutionPolicy, self).__init__(**kwargs) - self.type = None diff --git a/customSDK/servicefabric/models/execution_policy_py3.py b/customSDK/servicefabric/models/execution_policy_py3.py deleted file mode 100644 index 8dcdcf25..00000000 --- a/customSDK/servicefabric/models/execution_policy_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExecutionPolicy(Model): - """The execution policy of the service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DefaultExecutionPolicy, RunToCompletionExecutionPolicy - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'Default': 'DefaultExecutionPolicy', 'RunToCompletion': 'RunToCompletionExecutionPolicy'} - } - - def __init__(self, **kwargs) -> None: - super(ExecutionPolicy, self).__init__(**kwargs) - self.type = None diff --git a/customSDK/servicefabric/models/external_store_provision_application_type_description.py b/customSDK/servicefabric/models/external_store_provision_application_type_description.py deleted file mode 100644 index 35ac9612..00000000 --- a/customSDK/servicefabric/models/external_store_provision_application_type_description.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .provision_application_type_description_base import ProvisionApplicationTypeDescriptionBase - - -class ExternalStoreProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): - """Describes the operation to register or provision an application type using - an application package from an external store instead of a package uploaded - to the Service Fabric image store. - - All required parameters must be populated in order to send to Azure. - - :param async_property: Required. Indicates whether or not provisioning - should occur asynchronously. When set to true, the provision operation - returns when the request is accepted by the system, and the provision - operation continues without any timeout limit. The default value is false. - For large application packages, we recommend setting the value to true. - :type async_property: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_package_download_uri: Required. The path to the - '.sfpkg' application package from where the application package can be - downloaded using HTTP or HTTPS protocols. The application package can be - stored in an external store that provides GET operation to download the - file. Supported protocols are HTTP and HTTPS, and the path must allow READ - access. - :type application_package_download_uri: str - :param application_type_name: Required. The application type name - represents the name of the application type found in the application - manifest. - :type application_type_name: str - :param application_type_version: Required. The application type version - represents the version of the application type found in the application - manifest. - :type application_type_version: str - """ - - _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, - 'application_package_download_uri': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_package_download_uri': {'key': 'ApplicationPackageDownloadUri', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExternalStoreProvisionApplicationTypeDescription, self).__init__(**kwargs) - self.application_package_download_uri = kwargs.get('application_package_download_uri', None) - self.application_type_name = kwargs.get('application_type_name', None) - self.application_type_version = kwargs.get('application_type_version', None) - self.kind = 'ExternalStore' diff --git a/customSDK/servicefabric/models/external_store_provision_application_type_description_py3.py b/customSDK/servicefabric/models/external_store_provision_application_type_description_py3.py deleted file mode 100644 index 2573d5e4..00000000 --- a/customSDK/servicefabric/models/external_store_provision_application_type_description_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .provision_application_type_description_base_py3 import ProvisionApplicationTypeDescriptionBase - - -class ExternalStoreProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): - """Describes the operation to register or provision an application type using - an application package from an external store instead of a package uploaded - to the Service Fabric image store. - - All required parameters must be populated in order to send to Azure. - - :param async_property: Required. Indicates whether or not provisioning - should occur asynchronously. When set to true, the provision operation - returns when the request is accepted by the system, and the provision - operation continues without any timeout limit. The default value is false. - For large application packages, we recommend setting the value to true. - :type async_property: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_package_download_uri: Required. The path to the - '.sfpkg' application package from where the application package can be - downloaded using HTTP or HTTPS protocols. The application package can be - stored in an external store that provides GET operation to download the - file. Supported protocols are HTTP and HTTPS, and the path must allow READ - access. - :type application_package_download_uri: str - :param application_type_name: Required. The application type name - represents the name of the application type found in the application - manifest. - :type application_type_name: str - :param application_type_version: Required. The application type version - represents the version of the application type found in the application - manifest. - :type application_type_version: str - """ - - _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, - 'application_package_download_uri': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_package_download_uri': {'key': 'ApplicationPackageDownloadUri', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - } - - def __init__(self, *, async_property: bool, application_package_download_uri: str, application_type_name: str, application_type_version: str, **kwargs) -> None: - super(ExternalStoreProvisionApplicationTypeDescription, self).__init__(async_property=async_property, **kwargs) - self.application_package_download_uri = application_package_download_uri - self.application_type_name = application_type_name - self.application_type_version = application_type_version - self.kind = 'ExternalStore' diff --git a/customSDK/servicefabric/models/fabric_code_version_info.py b/customSDK/servicefabric/models/fabric_code_version_info.py deleted file mode 100644 index f0d30e30..00000000 --- a/customSDK/servicefabric/models/fabric_code_version_info.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FabricCodeVersionInfo(Model): - """Information about a Service Fabric code version. - - :param code_version: The product version of Service Fabric. - :type code_version: str - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FabricCodeVersionInfo, self).__init__(**kwargs) - self.code_version = kwargs.get('code_version', None) diff --git a/customSDK/servicefabric/models/fabric_code_version_info_py3.py b/customSDK/servicefabric/models/fabric_code_version_info_py3.py deleted file mode 100644 index 427f8ccd..00000000 --- a/customSDK/servicefabric/models/fabric_code_version_info_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FabricCodeVersionInfo(Model): - """Information about a Service Fabric code version. - - :param code_version: The product version of Service Fabric. - :type code_version: str - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - } - - def __init__(self, *, code_version: str=None, **kwargs) -> None: - super(FabricCodeVersionInfo, self).__init__(**kwargs) - self.code_version = code_version diff --git a/customSDK/servicefabric/models/fabric_config_version_info.py b/customSDK/servicefabric/models/fabric_config_version_info.py deleted file mode 100644 index d02e1a35..00000000 --- a/customSDK/servicefabric/models/fabric_config_version_info.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FabricConfigVersionInfo(Model): - """Information about a Service Fabric config version. - - :param config_version: The config version of Service Fabric. - :type config_version: str - """ - - _attribute_map = { - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FabricConfigVersionInfo, self).__init__(**kwargs) - self.config_version = kwargs.get('config_version', None) diff --git a/customSDK/servicefabric/models/fabric_config_version_info_py3.py b/customSDK/servicefabric/models/fabric_config_version_info_py3.py deleted file mode 100644 index 5a226d52..00000000 --- a/customSDK/servicefabric/models/fabric_config_version_info_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FabricConfigVersionInfo(Model): - """Information about a Service Fabric config version. - - :param config_version: The config version of Service Fabric. - :type config_version: str - """ - - _attribute_map = { - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - } - - def __init__(self, *, config_version: str=None, **kwargs) -> None: - super(FabricConfigVersionInfo, self).__init__(**kwargs) - self.config_version = config_version diff --git a/customSDK/servicefabric/models/fabric_error.py b/customSDK/servicefabric/models/fabric_error.py deleted file mode 100644 index cd158334..00000000 --- a/customSDK/servicefabric/models/fabric_error.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class FabricError(Model): - """The REST API operations for Service Fabric return standard HTTP status - codes. This type defines the additional information returned from the - Service Fabric API operations that are not successful. - - All required parameters must be populated in order to send to Azure. - - :param error: Required. Error object containing error code and error - message. - :type error: ~azure.servicefabric.models.FabricErrorError - """ - - _validation = { - 'error': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'Error', 'type': 'FabricErrorError'}, - } - - def __init__(self, **kwargs): - super(FabricError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class FabricErrorException(HttpOperationError): - """Server responsed with exception of type: 'FabricError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(FabricErrorException, self).__init__(deserialize, response, 'FabricError', *args) diff --git a/customSDK/servicefabric/models/fabric_error_error.py b/customSDK/servicefabric/models/fabric_error_error.py deleted file mode 100644 index 9216b6cf..00000000 --- a/customSDK/servicefabric/models/fabric_error_error.py +++ /dev/null @@ -1,193 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FabricErrorError(Model): - """Error object containing error code and error message. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. Defines the fabric error codes that be returned as - part of the error object in response to Service Fabric API operations that - are not successful. Following are the error code values that can be - returned for a specific HTTP status code. - - Possible values of the error code for HTTP status code 400 (Bad Request) - - "FABRIC_E_INVALID_PARTITION_KEY" - - "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" - - "FABRIC_E_INVALID_ADDRESS" - - "FABRIC_E_APPLICATION_NOT_UPGRADING" - - "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" - - "FABRIC_E_FABRIC_NOT_UPGRADING" - - "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" - - "FABRIC_E_INVALID_CONFIGURATION" - - "FABRIC_E_INVALID_NAME_URI" - - "FABRIC_E_PATH_TOO_LONG" - - "FABRIC_E_KEY_TOO_LARGE" - - "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" - - "FABRIC_E_INVALID_ATOMIC_GROUP" - - "FABRIC_E_VALUE_EMPTY" - - "FABRIC_E_BACKUP_IS_ENABLED" - - "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" - - "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" - - "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" - - "E_INVALIDARG" - - Possible values of the error code for HTTP status code 404 (Not Found) - - "FABRIC_E_NODE_NOT_FOUND" - - "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" - - "FABRIC_E_APPLICATION_NOT_FOUND" - - "FABRIC_E_SERVICE_TYPE_NOT_FOUND" - - "FABRIC_E_SERVICE_DOES_NOT_EXIST" - - "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" - - "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" - - "FABRIC_E_PARTITION_NOT_FOUND" - - "FABRIC_E_REPLICA_DOES_NOT_EXIST" - - "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" - - "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" - - "FABRIC_E_DIRECTORY_NOT_FOUND" - - "FABRIC_E_FABRIC_VERSION_NOT_FOUND" - - "FABRIC_E_FILE_NOT_FOUND" - - "FABRIC_E_NAME_DOES_NOT_EXIST" - - "FABRIC_E_PROPERTY_DOES_NOT_EXIST" - - "FABRIC_E_ENUMERATION_COMPLETED" - - "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" - - "FABRIC_E_KEY_NOT_FOUND" - - "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" - - "FABRIC_E_BACKUP_NOT_ENABLED" - - "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" - - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" - - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" - - Possible values of the error code for HTTP status code 409 (Conflict) - - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" - - "FABRIC_E_APPLICATION_ALREADY_EXISTS" - - "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" - - "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" - - "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" - - "FABRIC_E_SERVICE_ALREADY_EXISTS" - - "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" - - "FABRIC_E_APPLICATION_TYPE_IN_USE" - - "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" - - "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" - - "FABRIC_E_FABRIC_VERSION_IN_USE" - - "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" - - "FABRIC_E_NAME_ALREADY_EXISTS" - - "FABRIC_E_NAME_NOT_EMPTY" - - "FABRIC_E_PROPERTY_CHECK_FAILED" - - "FABRIC_E_SERVICE_METADATA_MISMATCH" - - "FABRIC_E_SERVICE_TYPE_MISMATCH" - - "FABRIC_E_HEALTH_STALE_REPORT" - - "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" - - "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" - - "FABRIC_E_INSTANCE_ID_MISMATCH" - - "FABRIC_E_BACKUP_IN_PROGRESS" - - "FABRIC_E_RESTORE_IN_PROGRESS" - - "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" - - Possible values of the error code for HTTP status code 413 (Request - Entity Too Large) - - "FABRIC_E_VALUE_TOO_LARGE" - - Possible values of the error code for HTTP status code 500 (Internal - Server Error) - - "FABRIC_E_NODE_IS_UP" - - "E_FAIL" - - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" - - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" - - "FABRIC_E_VOLUME_ALREADY_EXISTS" - - "FABRIC_E_VOLUME_NOT_FOUND" - - "SerializationError" - - Possible values of the error code for HTTP status code 503 (Service - Unavailable) - - "FABRIC_E_NO_WRITE_QUORUM" - - "FABRIC_E_NOT_PRIMARY" - - "FABRIC_E_NOT_READY" - - "FABRIC_E_RECONFIGURATION_PENDING" - - "FABRIC_E_SERVICE_OFFLINE" - - "E_ABORT" - - "FABRIC_E_VALUE_TOO_LARGE" - - Possible values of the error code for HTTP status code 504 (Gateway - Timeout) - - "FABRIC_E_COMMUNICATION_ERROR" - - "FABRIC_E_OPERATION_NOT_COMPLETE" - - "FABRIC_E_TIMEOUT". Possible values include: - 'FABRIC_E_INVALID_PARTITION_KEY', - 'FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR', 'FABRIC_E_INVALID_ADDRESS', - 'FABRIC_E_APPLICATION_NOT_UPGRADING', - 'FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR', - 'FABRIC_E_FABRIC_NOT_UPGRADING', - 'FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR', - 'FABRIC_E_INVALID_CONFIGURATION', 'FABRIC_E_INVALID_NAME_URI', - 'FABRIC_E_PATH_TOO_LONG', 'FABRIC_E_KEY_TOO_LARGE', - 'FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED', - 'FABRIC_E_INVALID_ATOMIC_GROUP', 'FABRIC_E_VALUE_EMPTY', - 'FABRIC_E_NODE_NOT_FOUND', 'FABRIC_E_APPLICATION_TYPE_NOT_FOUND', - 'FABRIC_E_APPLICATION_NOT_FOUND', 'FABRIC_E_SERVICE_TYPE_NOT_FOUND', - 'FABRIC_E_SERVICE_DOES_NOT_EXIST', - 'FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND', - 'FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND', - 'FABRIC_E_PARTITION_NOT_FOUND', 'FABRIC_E_REPLICA_DOES_NOT_EXIST', - 'FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST', - 'FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND', - 'FABRIC_E_DIRECTORY_NOT_FOUND', 'FABRIC_E_FABRIC_VERSION_NOT_FOUND', - 'FABRIC_E_FILE_NOT_FOUND', 'FABRIC_E_NAME_DOES_NOT_EXIST', - 'FABRIC_E_PROPERTY_DOES_NOT_EXIST', 'FABRIC_E_ENUMERATION_COMPLETED', - 'FABRIC_E_SERVICE_MANIFEST_NOT_FOUND', 'FABRIC_E_KEY_NOT_FOUND', - 'FABRIC_E_HEALTH_ENTITY_NOT_FOUND', - 'FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS', - 'FABRIC_E_APPLICATION_ALREADY_EXISTS', - 'FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION', - 'FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS', - 'FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS', - 'FABRIC_E_SERVICE_ALREADY_EXISTS', - 'FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS', - 'FABRIC_E_APPLICATION_TYPE_IN_USE', - 'FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION', - 'FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS', - 'FABRIC_E_FABRIC_VERSION_IN_USE', 'FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS', - 'FABRIC_E_NAME_ALREADY_EXISTS', 'FABRIC_E_NAME_NOT_EMPTY', - 'FABRIC_E_PROPERTY_CHECK_FAILED', 'FABRIC_E_SERVICE_METADATA_MISMATCH', - 'FABRIC_E_SERVICE_TYPE_MISMATCH', 'FABRIC_E_HEALTH_STALE_REPORT', - 'FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED', - 'FABRIC_E_NODE_HAS_NOT_STOPPED_YET', 'FABRIC_E_INSTANCE_ID_MISMATCH', - 'FABRIC_E_VALUE_TOO_LARGE', 'FABRIC_E_NO_WRITE_QUORUM', - 'FABRIC_E_NOT_PRIMARY', 'FABRIC_E_NOT_READY', - 'FABRIC_E_RECONFIGURATION_PENDING', 'FABRIC_E_SERVICE_OFFLINE', 'E_ABORT', - 'FABRIC_E_COMMUNICATION_ERROR', 'FABRIC_E_OPERATION_NOT_COMPLETE', - 'FABRIC_E_TIMEOUT', 'FABRIC_E_NODE_IS_UP', 'E_FAIL', - 'FABRIC_E_BACKUP_IS_ENABLED', - 'FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH', - 'FABRIC_E_INVALID_FOR_STATELESS_SERVICES', 'FABRIC_E_BACKUP_NOT_ENABLED', - 'FABRIC_E_BACKUP_POLICY_NOT_EXISTING', - 'FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING', - 'FABRIC_E_BACKUP_IN_PROGRESS', 'FABRIC_E_RESTORE_IN_PROGRESS', - 'FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING', - 'FABRIC_E_INVALID_SERVICE_SCALING_POLICY', 'E_INVALIDARG', - 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS', - 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND', - 'FABRIC_E_VOLUME_ALREADY_EXISTS', 'FABRIC_E_VOLUME_NOT_FOUND', - 'SerializationError', 'FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR' - :type code: str or ~azure.servicefabric.models.FabricErrorCodes - :param message: Error message. - :type message: str - """ - - _validation = { - 'code': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'Code', 'type': 'str'}, - 'message': {'key': 'Message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FabricErrorError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) diff --git a/customSDK/servicefabric/models/fabric_error_error_py3.py b/customSDK/servicefabric/models/fabric_error_error_py3.py deleted file mode 100644 index b5024184..00000000 --- a/customSDK/servicefabric/models/fabric_error_error_py3.py +++ /dev/null @@ -1,193 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FabricErrorError(Model): - """Error object containing error code and error message. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. Defines the fabric error codes that be returned as - part of the error object in response to Service Fabric API operations that - are not successful. Following are the error code values that can be - returned for a specific HTTP status code. - - Possible values of the error code for HTTP status code 400 (Bad Request) - - "FABRIC_E_INVALID_PARTITION_KEY" - - "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" - - "FABRIC_E_INVALID_ADDRESS" - - "FABRIC_E_APPLICATION_NOT_UPGRADING" - - "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" - - "FABRIC_E_FABRIC_NOT_UPGRADING" - - "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" - - "FABRIC_E_INVALID_CONFIGURATION" - - "FABRIC_E_INVALID_NAME_URI" - - "FABRIC_E_PATH_TOO_LONG" - - "FABRIC_E_KEY_TOO_LARGE" - - "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" - - "FABRIC_E_INVALID_ATOMIC_GROUP" - - "FABRIC_E_VALUE_EMPTY" - - "FABRIC_E_BACKUP_IS_ENABLED" - - "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" - - "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" - - "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" - - "E_INVALIDARG" - - Possible values of the error code for HTTP status code 404 (Not Found) - - "FABRIC_E_NODE_NOT_FOUND" - - "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" - - "FABRIC_E_APPLICATION_NOT_FOUND" - - "FABRIC_E_SERVICE_TYPE_NOT_FOUND" - - "FABRIC_E_SERVICE_DOES_NOT_EXIST" - - "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" - - "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" - - "FABRIC_E_PARTITION_NOT_FOUND" - - "FABRIC_E_REPLICA_DOES_NOT_EXIST" - - "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" - - "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" - - "FABRIC_E_DIRECTORY_NOT_FOUND" - - "FABRIC_E_FABRIC_VERSION_NOT_FOUND" - - "FABRIC_E_FILE_NOT_FOUND" - - "FABRIC_E_NAME_DOES_NOT_EXIST" - - "FABRIC_E_PROPERTY_DOES_NOT_EXIST" - - "FABRIC_E_ENUMERATION_COMPLETED" - - "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" - - "FABRIC_E_KEY_NOT_FOUND" - - "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" - - "FABRIC_E_BACKUP_NOT_ENABLED" - - "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" - - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" - - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" - - Possible values of the error code for HTTP status code 409 (Conflict) - - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" - - "FABRIC_E_APPLICATION_ALREADY_EXISTS" - - "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" - - "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" - - "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" - - "FABRIC_E_SERVICE_ALREADY_EXISTS" - - "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" - - "FABRIC_E_APPLICATION_TYPE_IN_USE" - - "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" - - "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" - - "FABRIC_E_FABRIC_VERSION_IN_USE" - - "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" - - "FABRIC_E_NAME_ALREADY_EXISTS" - - "FABRIC_E_NAME_NOT_EMPTY" - - "FABRIC_E_PROPERTY_CHECK_FAILED" - - "FABRIC_E_SERVICE_METADATA_MISMATCH" - - "FABRIC_E_SERVICE_TYPE_MISMATCH" - - "FABRIC_E_HEALTH_STALE_REPORT" - - "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" - - "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" - - "FABRIC_E_INSTANCE_ID_MISMATCH" - - "FABRIC_E_BACKUP_IN_PROGRESS" - - "FABRIC_E_RESTORE_IN_PROGRESS" - - "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" - - Possible values of the error code for HTTP status code 413 (Request - Entity Too Large) - - "FABRIC_E_VALUE_TOO_LARGE" - - Possible values of the error code for HTTP status code 500 (Internal - Server Error) - - "FABRIC_E_NODE_IS_UP" - - "E_FAIL" - - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" - - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" - - "FABRIC_E_VOLUME_ALREADY_EXISTS" - - "FABRIC_E_VOLUME_NOT_FOUND" - - "SerializationError" - - Possible values of the error code for HTTP status code 503 (Service - Unavailable) - - "FABRIC_E_NO_WRITE_QUORUM" - - "FABRIC_E_NOT_PRIMARY" - - "FABRIC_E_NOT_READY" - - "FABRIC_E_RECONFIGURATION_PENDING" - - "FABRIC_E_SERVICE_OFFLINE" - - "E_ABORT" - - "FABRIC_E_VALUE_TOO_LARGE" - - Possible values of the error code for HTTP status code 504 (Gateway - Timeout) - - "FABRIC_E_COMMUNICATION_ERROR" - - "FABRIC_E_OPERATION_NOT_COMPLETE" - - "FABRIC_E_TIMEOUT". Possible values include: - 'FABRIC_E_INVALID_PARTITION_KEY', - 'FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR', 'FABRIC_E_INVALID_ADDRESS', - 'FABRIC_E_APPLICATION_NOT_UPGRADING', - 'FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR', - 'FABRIC_E_FABRIC_NOT_UPGRADING', - 'FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR', - 'FABRIC_E_INVALID_CONFIGURATION', 'FABRIC_E_INVALID_NAME_URI', - 'FABRIC_E_PATH_TOO_LONG', 'FABRIC_E_KEY_TOO_LARGE', - 'FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED', - 'FABRIC_E_INVALID_ATOMIC_GROUP', 'FABRIC_E_VALUE_EMPTY', - 'FABRIC_E_NODE_NOT_FOUND', 'FABRIC_E_APPLICATION_TYPE_NOT_FOUND', - 'FABRIC_E_APPLICATION_NOT_FOUND', 'FABRIC_E_SERVICE_TYPE_NOT_FOUND', - 'FABRIC_E_SERVICE_DOES_NOT_EXIST', - 'FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND', - 'FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND', - 'FABRIC_E_PARTITION_NOT_FOUND', 'FABRIC_E_REPLICA_DOES_NOT_EXIST', - 'FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST', - 'FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND', - 'FABRIC_E_DIRECTORY_NOT_FOUND', 'FABRIC_E_FABRIC_VERSION_NOT_FOUND', - 'FABRIC_E_FILE_NOT_FOUND', 'FABRIC_E_NAME_DOES_NOT_EXIST', - 'FABRIC_E_PROPERTY_DOES_NOT_EXIST', 'FABRIC_E_ENUMERATION_COMPLETED', - 'FABRIC_E_SERVICE_MANIFEST_NOT_FOUND', 'FABRIC_E_KEY_NOT_FOUND', - 'FABRIC_E_HEALTH_ENTITY_NOT_FOUND', - 'FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS', - 'FABRIC_E_APPLICATION_ALREADY_EXISTS', - 'FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION', - 'FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS', - 'FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS', - 'FABRIC_E_SERVICE_ALREADY_EXISTS', - 'FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS', - 'FABRIC_E_APPLICATION_TYPE_IN_USE', - 'FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION', - 'FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS', - 'FABRIC_E_FABRIC_VERSION_IN_USE', 'FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS', - 'FABRIC_E_NAME_ALREADY_EXISTS', 'FABRIC_E_NAME_NOT_EMPTY', - 'FABRIC_E_PROPERTY_CHECK_FAILED', 'FABRIC_E_SERVICE_METADATA_MISMATCH', - 'FABRIC_E_SERVICE_TYPE_MISMATCH', 'FABRIC_E_HEALTH_STALE_REPORT', - 'FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED', - 'FABRIC_E_NODE_HAS_NOT_STOPPED_YET', 'FABRIC_E_INSTANCE_ID_MISMATCH', - 'FABRIC_E_VALUE_TOO_LARGE', 'FABRIC_E_NO_WRITE_QUORUM', - 'FABRIC_E_NOT_PRIMARY', 'FABRIC_E_NOT_READY', - 'FABRIC_E_RECONFIGURATION_PENDING', 'FABRIC_E_SERVICE_OFFLINE', 'E_ABORT', - 'FABRIC_E_COMMUNICATION_ERROR', 'FABRIC_E_OPERATION_NOT_COMPLETE', - 'FABRIC_E_TIMEOUT', 'FABRIC_E_NODE_IS_UP', 'E_FAIL', - 'FABRIC_E_BACKUP_IS_ENABLED', - 'FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH', - 'FABRIC_E_INVALID_FOR_STATELESS_SERVICES', 'FABRIC_E_BACKUP_NOT_ENABLED', - 'FABRIC_E_BACKUP_POLICY_NOT_EXISTING', - 'FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING', - 'FABRIC_E_BACKUP_IN_PROGRESS', 'FABRIC_E_RESTORE_IN_PROGRESS', - 'FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING', - 'FABRIC_E_INVALID_SERVICE_SCALING_POLICY', 'E_INVALIDARG', - 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS', - 'FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND', - 'FABRIC_E_VOLUME_ALREADY_EXISTS', 'FABRIC_E_VOLUME_NOT_FOUND', - 'SerializationError', 'FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR' - :type code: str or ~azure.servicefabric.models.FabricErrorCodes - :param message: Error message. - :type message: str - """ - - _validation = { - 'code': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'Code', 'type': 'str'}, - 'message': {'key': 'Message', 'type': 'str'}, - } - - def __init__(self, *, code, message: str=None, **kwargs) -> None: - super(FabricErrorError, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/customSDK/servicefabric/models/fabric_error_py3.py b/customSDK/servicefabric/models/fabric_error_py3.py deleted file mode 100644 index f156cc8c..00000000 --- a/customSDK/servicefabric/models/fabric_error_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class FabricError(Model): - """The REST API operations for Service Fabric return standard HTTP status - codes. This type defines the additional information returned from the - Service Fabric API operations that are not successful. - - All required parameters must be populated in order to send to Azure. - - :param error: Required. Error object containing error code and error - message. - :type error: ~azure.servicefabric.models.FabricErrorError - """ - - _validation = { - 'error': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'Error', 'type': 'FabricErrorError'}, - } - - def __init__(self, *, error, **kwargs) -> None: - super(FabricError, self).__init__(**kwargs) - self.error = error - - -class FabricErrorException(HttpOperationError): - """Server responsed with exception of type: 'FabricError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(FabricErrorException, self).__init__(deserialize, response, 'FabricError', *args) diff --git a/customSDK/servicefabric/models/fabric_event.py b/customSDK/servicefabric/models/fabric_event.py deleted file mode 100644 index 6c15194c..00000000 --- a/customSDK/servicefabric/models/fabric_event.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FabricEvent(Model): - """Represents the base for all Fabric Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationEvent, ClusterEvent, ContainerInstanceEvent, - NodeEvent, PartitionEvent, ReplicaEvent, ServiceEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ApplicationEvent': 'ApplicationEvent', 'ClusterEvent': 'ClusterEvent', 'ContainerInstanceEvent': 'ContainerInstanceEvent', 'NodeEvent': 'NodeEvent', 'PartitionEvent': 'PartitionEvent', 'ReplicaEvent': 'ReplicaEvent', 'ServiceEvent': 'ServiceEvent'} - } - - def __init__(self, **kwargs): - super(FabricEvent, self).__init__(**kwargs) - self.event_instance_id = kwargs.get('event_instance_id', None) - self.category = kwargs.get('category', None) - self.time_stamp = kwargs.get('time_stamp', None) - self.has_correlated_events = kwargs.get('has_correlated_events', None) - self.kind = None diff --git a/customSDK/servicefabric/models/fabric_event_py3.py b/customSDK/servicefabric/models/fabric_event_py3.py deleted file mode 100644 index 118bce42..00000000 --- a/customSDK/servicefabric/models/fabric_event_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FabricEvent(Model): - """Represents the base for all Fabric Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationEvent, ClusterEvent, ContainerInstanceEvent, - NodeEvent, PartitionEvent, ReplicaEvent, ServiceEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ApplicationEvent': 'ApplicationEvent', 'ClusterEvent': 'ClusterEvent', 'ContainerInstanceEvent': 'ContainerInstanceEvent', 'NodeEvent': 'NodeEvent', 'PartitionEvent': 'PartitionEvent', 'ReplicaEvent': 'ReplicaEvent', 'ServiceEvent': 'ServiceEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(FabricEvent, self).__init__(**kwargs) - self.event_instance_id = event_instance_id - self.category = category - self.time_stamp = time_stamp - self.has_correlated_events = has_correlated_events - self.kind = None diff --git a/customSDK/servicefabric/models/failed_property_batch_info.py b/customSDK/servicefabric/models/failed_property_batch_info.py deleted file mode 100644 index 3c021240..00000000 --- a/customSDK/servicefabric/models/failed_property_batch_info.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_batch_info import PropertyBatchInfo - - -class FailedPropertyBatchInfo(PropertyBatchInfo): - """Derived from PropertyBatchInfo. Represents the property batch failing. - Contains information about the specific batch failure. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param error_message: The error message of the failed operation. Describes - the exception thrown due to the first unsuccessful operation in the - property batch. - :type error_message: str - :param operation_index: The index of the unsuccessful operation in the - property batch. - :type operation_index: int - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'error_message': {'key': 'ErrorMessage', 'type': 'str'}, - 'operation_index': {'key': 'OperationIndex', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(FailedPropertyBatchInfo, self).__init__(**kwargs) - self.error_message = kwargs.get('error_message', None) - self.operation_index = kwargs.get('operation_index', None) - self.kind = 'Failed' diff --git a/customSDK/servicefabric/models/failed_property_batch_info_py3.py b/customSDK/servicefabric/models/failed_property_batch_info_py3.py deleted file mode 100644 index cbfa0f9a..00000000 --- a/customSDK/servicefabric/models/failed_property_batch_info_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_batch_info_py3 import PropertyBatchInfo - - -class FailedPropertyBatchInfo(PropertyBatchInfo): - """Derived from PropertyBatchInfo. Represents the property batch failing. - Contains information about the specific batch failure. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param error_message: The error message of the failed operation. Describes - the exception thrown due to the first unsuccessful operation in the - property batch. - :type error_message: str - :param operation_index: The index of the unsuccessful operation in the - property batch. - :type operation_index: int - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'error_message': {'key': 'ErrorMessage', 'type': 'str'}, - 'operation_index': {'key': 'OperationIndex', 'type': 'int'}, - } - - def __init__(self, *, error_message: str=None, operation_index: int=None, **kwargs) -> None: - super(FailedPropertyBatchInfo, self).__init__(**kwargs) - self.error_message = error_message - self.operation_index = operation_index - self.kind = 'Failed' diff --git a/customSDK/servicefabric/models/failed_upgrade_domain_progress_object.py b/customSDK/servicefabric/models/failed_upgrade_domain_progress_object.py deleted file mode 100644 index fb44bea7..00000000 --- a/customSDK/servicefabric/models/failed_upgrade_domain_progress_object.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailedUpgradeDomainProgressObject(Model): - """The detailed upgrade progress for nodes in the current upgrade domain at - the point of failure. Not applicable to node-by-node upgrades. - - :param domain_name: The name of the upgrade domain - :type domain_name: str - :param node_upgrade_progress_list: List of upgrading nodes and their - statuses - :type node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__(self, **kwargs): - super(FailedUpgradeDomainProgressObject, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) diff --git a/customSDK/servicefabric/models/failed_upgrade_domain_progress_object_py3.py b/customSDK/servicefabric/models/failed_upgrade_domain_progress_object_py3.py deleted file mode 100644 index c50353a1..00000000 --- a/customSDK/servicefabric/models/failed_upgrade_domain_progress_object_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailedUpgradeDomainProgressObject(Model): - """The detailed upgrade progress for nodes in the current upgrade domain at - the point of failure. Not applicable to node-by-node upgrades. - - :param domain_name: The name of the upgrade domain - :type domain_name: str - :param node_upgrade_progress_list: List of upgrading nodes and their - statuses - :type node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: - super(FailedUpgradeDomainProgressObject, self).__init__(**kwargs) - self.domain_name = domain_name - self.node_upgrade_progress_list = node_upgrade_progress_list diff --git a/customSDK/servicefabric/models/failure_upgrade_domain_progress_info.py b/customSDK/servicefabric/models/failure_upgrade_domain_progress_info.py deleted file mode 100644 index 81f565f1..00000000 --- a/customSDK/servicefabric/models/failure_upgrade_domain_progress_info.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailureUpgradeDomainProgressInfo(Model): - """Information about the upgrade domain progress at the time of upgrade - failure. - - :param domain_name: The name of the upgrade domain - :type domain_name: str - :param node_upgrade_progress_list: List of upgrading nodes and their - statuses - :type node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__(self, **kwargs): - super(FailureUpgradeDomainProgressInfo, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) diff --git a/customSDK/servicefabric/models/failure_upgrade_domain_progress_info_py3.py b/customSDK/servicefabric/models/failure_upgrade_domain_progress_info_py3.py deleted file mode 100644 index 1ab66718..00000000 --- a/customSDK/servicefabric/models/failure_upgrade_domain_progress_info_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailureUpgradeDomainProgressInfo(Model): - """Information about the upgrade domain progress at the time of upgrade - failure. - - :param domain_name: The name of the upgrade domain - :type domain_name: str - :param node_upgrade_progress_list: List of upgrading nodes and their - statuses - :type node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__(self, *, domain_name: str=None, node_upgrade_progress_list=None, **kwargs) -> None: - super(FailureUpgradeDomainProgressInfo, self).__init__(**kwargs) - self.domain_name = domain_name - self.node_upgrade_progress_list = node_upgrade_progress_list diff --git a/customSDK/servicefabric/models/file_info.py b/customSDK/servicefabric/models/file_info.py deleted file mode 100644 index 7c3ae992..00000000 --- a/customSDK/servicefabric/models/file_info.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FileInfo(Model): - """Information about a image store file. - - :param file_size: The size of file in bytes. - :type file_size: str - :param file_version: Information about the version of image store file. - :type file_version: ~azure.servicefabric.models.FileVersion - :param modified_date: The date and time when the image store file was last - modified. - :type modified_date: datetime - :param store_relative_path: The file path relative to the image store root - path. - :type store_relative_path: str - """ - - _attribute_map = { - 'file_size': {'key': 'FileSize', 'type': 'str'}, - 'file_version': {'key': 'FileVersion', 'type': 'FileVersion'}, - 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FileInfo, self).__init__(**kwargs) - self.file_size = kwargs.get('file_size', None) - self.file_version = kwargs.get('file_version', None) - self.modified_date = kwargs.get('modified_date', None) - self.store_relative_path = kwargs.get('store_relative_path', None) diff --git a/customSDK/servicefabric/models/file_info_py3.py b/customSDK/servicefabric/models/file_info_py3.py deleted file mode 100644 index 1ac3bd50..00000000 --- a/customSDK/servicefabric/models/file_info_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FileInfo(Model): - """Information about a image store file. - - :param file_size: The size of file in bytes. - :type file_size: str - :param file_version: Information about the version of image store file. - :type file_version: ~azure.servicefabric.models.FileVersion - :param modified_date: The date and time when the image store file was last - modified. - :type modified_date: datetime - :param store_relative_path: The file path relative to the image store root - path. - :type store_relative_path: str - """ - - _attribute_map = { - 'file_size': {'key': 'FileSize', 'type': 'str'}, - 'file_version': {'key': 'FileVersion', 'type': 'FileVersion'}, - 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - } - - def __init__(self, *, file_size: str=None, file_version=None, modified_date=None, store_relative_path: str=None, **kwargs) -> None: - super(FileInfo, self).__init__(**kwargs) - self.file_size = file_size - self.file_version = file_version - self.modified_date = modified_date - self.store_relative_path = store_relative_path diff --git a/customSDK/servicefabric/models/file_share_backup_storage_description.py b/customSDK/servicefabric/models/file_share_backup_storage_description.py deleted file mode 100644 index 3c96d9bf..00000000 --- a/customSDK/servicefabric/models/file_share_backup_storage_description.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_storage_description import BackupStorageDescription - - -class FileShareBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for file share storage used for storing or - enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - :param path: Required. UNC path of the file share where to store or - enumerate backups from. - :type path: str - :param primary_user_name: Primary user name to access the file share. - :type primary_user_name: str - :param primary_password: Primary password to access the share location. - :type primary_password: str - :param secondary_user_name: Secondary user name to access the file share. - :type secondary_user_name: str - :param secondary_password: Secondary password to access the share location - :type secondary_password: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'path': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'path': {'key': 'Path', 'type': 'str'}, - 'primary_user_name': {'key': 'PrimaryUserName', 'type': 'str'}, - 'primary_password': {'key': 'PrimaryPassword', 'type': 'str'}, - 'secondary_user_name': {'key': 'SecondaryUserName', 'type': 'str'}, - 'secondary_password': {'key': 'SecondaryPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FileShareBackupStorageDescription, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.primary_user_name = kwargs.get('primary_user_name', None) - self.primary_password = kwargs.get('primary_password', None) - self.secondary_user_name = kwargs.get('secondary_user_name', None) - self.secondary_password = kwargs.get('secondary_password', None) - self.storage_kind = 'FileShare' diff --git a/customSDK/servicefabric/models/file_share_backup_storage_description_py3.py b/customSDK/servicefabric/models/file_share_backup_storage_description_py3.py deleted file mode 100644 index ec9cc257..00000000 --- a/customSDK/servicefabric/models/file_share_backup_storage_description_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_storage_description_py3 import BackupStorageDescription - - -class FileShareBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for file share storage used for storing or - enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - :param path: Required. UNC path of the file share where to store or - enumerate backups from. - :type path: str - :param primary_user_name: Primary user name to access the file share. - :type primary_user_name: str - :param primary_password: Primary password to access the share location. - :type primary_password: str - :param secondary_user_name: Secondary user name to access the file share. - :type secondary_user_name: str - :param secondary_password: Secondary password to access the share location - :type secondary_password: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'path': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'path': {'key': 'Path', 'type': 'str'}, - 'primary_user_name': {'key': 'PrimaryUserName', 'type': 'str'}, - 'primary_password': {'key': 'PrimaryPassword', 'type': 'str'}, - 'secondary_user_name': {'key': 'SecondaryUserName', 'type': 'str'}, - 'secondary_password': {'key': 'SecondaryPassword', 'type': 'str'}, - } - - def __init__(self, *, path: str, friendly_name: str=None, primary_user_name: str=None, primary_password: str=None, secondary_user_name: str=None, secondary_password: str=None, **kwargs) -> None: - super(FileShareBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) - self.path = path - self.primary_user_name = primary_user_name - self.primary_password = primary_password - self.secondary_user_name = secondary_user_name - self.secondary_password = secondary_password - self.storage_kind = 'FileShare' diff --git a/customSDK/servicefabric/models/file_version.py b/customSDK/servicefabric/models/file_version.py deleted file mode 100644 index c1f479ce..00000000 --- a/customSDK/servicefabric/models/file_version.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FileVersion(Model): - """Information about the version of image store file. - - :param version_number: The current image store version number for the file - is used in image store for checking whether it need to be updated. - :type version_number: str - :param epoch_data_loss_number: The epoch data loss number of image store - replica when this file entry was updated or created. - :type epoch_data_loss_number: str - :param epoch_configuration_number: The epoch configuration version number - of the image store replica when this file entry was created or updated. - :type epoch_configuration_number: str - """ - - _attribute_map = { - 'version_number': {'key': 'VersionNumber', 'type': 'str'}, - 'epoch_data_loss_number': {'key': 'EpochDataLossNumber', 'type': 'str'}, - 'epoch_configuration_number': {'key': 'EpochConfigurationNumber', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FileVersion, self).__init__(**kwargs) - self.version_number = kwargs.get('version_number', None) - self.epoch_data_loss_number = kwargs.get('epoch_data_loss_number', None) - self.epoch_configuration_number = kwargs.get('epoch_configuration_number', None) diff --git a/customSDK/servicefabric/models/file_version_py3.py b/customSDK/servicefabric/models/file_version_py3.py deleted file mode 100644 index 65073442..00000000 --- a/customSDK/servicefabric/models/file_version_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FileVersion(Model): - """Information about the version of image store file. - - :param version_number: The current image store version number for the file - is used in image store for checking whether it need to be updated. - :type version_number: str - :param epoch_data_loss_number: The epoch data loss number of image store - replica when this file entry was updated or created. - :type epoch_data_loss_number: str - :param epoch_configuration_number: The epoch configuration version number - of the image store replica when this file entry was created or updated. - :type epoch_configuration_number: str - """ - - _attribute_map = { - 'version_number': {'key': 'VersionNumber', 'type': 'str'}, - 'epoch_data_loss_number': {'key': 'EpochDataLossNumber', 'type': 'str'}, - 'epoch_configuration_number': {'key': 'EpochConfigurationNumber', 'type': 'str'}, - } - - def __init__(self, *, version_number: str=None, epoch_data_loss_number: str=None, epoch_configuration_number: str=None, **kwargs) -> None: - super(FileVersion, self).__init__(**kwargs) - self.version_number = version_number - self.epoch_data_loss_number = epoch_data_loss_number - self.epoch_configuration_number = epoch_configuration_number diff --git a/customSDK/servicefabric/models/folder_info.py b/customSDK/servicefabric/models/folder_info.py deleted file mode 100644 index 7211b281..00000000 --- a/customSDK/servicefabric/models/folder_info.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FolderInfo(Model): - """Information about a image store folder. It includes how many files this - folder contains and its image store relative path. - - :param store_relative_path: The remote location within image store. This - path is relative to the image store root. - :type store_relative_path: str - :param file_count: The number of files from within the image store folder. - :type file_count: str - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'file_count': {'key': 'FileCount', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FolderInfo, self).__init__(**kwargs) - self.store_relative_path = kwargs.get('store_relative_path', None) - self.file_count = kwargs.get('file_count', None) diff --git a/customSDK/servicefabric/models/folder_info_py3.py b/customSDK/servicefabric/models/folder_info_py3.py deleted file mode 100644 index 2027d91e..00000000 --- a/customSDK/servicefabric/models/folder_info_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FolderInfo(Model): - """Information about a image store folder. It includes how many files this - folder contains and its image store relative path. - - :param store_relative_path: The remote location within image store. This - path is relative to the image store root. - :type store_relative_path: str - :param file_count: The number of files from within the image store folder. - :type file_count: str - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'file_count': {'key': 'FileCount', 'type': 'str'}, - } - - def __init__(self, *, store_relative_path: str=None, file_count: str=None, **kwargs) -> None: - super(FolderInfo, self).__init__(**kwargs) - self.store_relative_path = store_relative_path - self.file_count = file_count diff --git a/customSDK/servicefabric/models/folder_size_info.py b/customSDK/servicefabric/models/folder_size_info.py deleted file mode 100644 index 28ac4780..00000000 --- a/customSDK/servicefabric/models/folder_size_info.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FolderSizeInfo(Model): - """Information of a image store folder size. - - :param store_relative_path: The remote location within image store. This - path is relative to the image store root. - :type store_relative_path: str - :param folder_size: The size of folder in bytes. - :type folder_size: str - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'folder_size': {'key': 'FolderSize', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FolderSizeInfo, self).__init__(**kwargs) - self.store_relative_path = kwargs.get('store_relative_path', None) - self.folder_size = kwargs.get('folder_size', None) diff --git a/customSDK/servicefabric/models/folder_size_info_py3.py b/customSDK/servicefabric/models/folder_size_info_py3.py deleted file mode 100644 index 018dce39..00000000 --- a/customSDK/servicefabric/models/folder_size_info_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FolderSizeInfo(Model): - """Information of a image store folder size. - - :param store_relative_path: The remote location within image store. This - path is relative to the image store root. - :type store_relative_path: str - :param folder_size: The size of folder in bytes. - :type folder_size: str - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'folder_size': {'key': 'FolderSize', 'type': 'str'}, - } - - def __init__(self, *, store_relative_path: str=None, folder_size: str=None, **kwargs) -> None: - super(FolderSizeInfo, self).__init__(**kwargs) - self.store_relative_path = store_relative_path - self.folder_size = folder_size diff --git a/customSDK/servicefabric/models/frequency_based_backup_schedule_description.py b/customSDK/servicefabric/models/frequency_based_backup_schedule_description.py deleted file mode 100644 index c9429cd7..00000000 --- a/customSDK/servicefabric/models/frequency_based_backup_schedule_description.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_schedule_description import BackupScheduleDescription - - -class FrequencyBasedBackupScheduleDescription(BackupScheduleDescription): - """Describes the frequency based backup schedule. - - All required parameters must be populated in order to send to Azure. - - :param schedule_kind: Required. Constant filled by server. - :type schedule_kind: str - :param interval: Required. Defines the interval with which backups are - periodically taken. It should be specified in ISO8601 format. Timespan in - seconds is not supported and will be ignored while creating the policy. - :type interval: timedelta - """ - - _validation = { - 'schedule_kind': {'required': True}, - 'interval': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - 'interval': {'key': 'Interval', 'type': 'duration'}, - } - - def __init__(self, **kwargs): - super(FrequencyBasedBackupScheduleDescription, self).__init__(**kwargs) - self.interval = kwargs.get('interval', None) - self.schedule_kind = 'FrequencyBased' diff --git a/customSDK/servicefabric/models/frequency_based_backup_schedule_description_py3.py b/customSDK/servicefabric/models/frequency_based_backup_schedule_description_py3.py deleted file mode 100644 index 8b8e662c..00000000 --- a/customSDK/servicefabric/models/frequency_based_backup_schedule_description_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_schedule_description_py3 import BackupScheduleDescription - - -class FrequencyBasedBackupScheduleDescription(BackupScheduleDescription): - """Describes the frequency based backup schedule. - - All required parameters must be populated in order to send to Azure. - - :param schedule_kind: Required. Constant filled by server. - :type schedule_kind: str - :param interval: Required. Defines the interval with which backups are - periodically taken. It should be specified in ISO8601 format. Timespan in - seconds is not supported and will be ignored while creating the policy. - :type interval: timedelta - """ - - _validation = { - 'schedule_kind': {'required': True}, - 'interval': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - 'interval': {'key': 'Interval', 'type': 'duration'}, - } - - def __init__(self, *, interval, **kwargs) -> None: - super(FrequencyBasedBackupScheduleDescription, self).__init__(**kwargs) - self.interval = interval - self.schedule_kind = 'FrequencyBased' diff --git a/customSDK/servicefabric/models/gateway_destination.py b/customSDK/servicefabric/models/gateway_destination.py deleted file mode 100644 index 5c216274..00000000 --- a/customSDK/servicefabric/models/gateway_destination.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GatewayDestination(Model): - """Describes destination endpoint for routing traffic. - - All required parameters must be populated in order to send to Azure. - - :param application_name: Required. Name of the service fabric Mesh - application. - :type application_name: str - :param service_name: Required. service that contains the endpoint. - :type service_name: str - :param endpoint_name: Required. name of the endpoint in the service. - :type endpoint_name: str - """ - - _validation = { - 'application_name': {'required': True}, - 'service_name': {'required': True}, - 'endpoint_name': {'required': True}, - } - - _attribute_map = { - 'application_name': {'key': 'applicationName', 'type': 'str'}, - 'service_name': {'key': 'serviceName', 'type': 'str'}, - 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GatewayDestination, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.service_name = kwargs.get('service_name', None) - self.endpoint_name = kwargs.get('endpoint_name', None) diff --git a/customSDK/servicefabric/models/gateway_destination_py3.py b/customSDK/servicefabric/models/gateway_destination_py3.py deleted file mode 100644 index 7819e3ec..00000000 --- a/customSDK/servicefabric/models/gateway_destination_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GatewayDestination(Model): - """Describes destination endpoint for routing traffic. - - All required parameters must be populated in order to send to Azure. - - :param application_name: Required. Name of the service fabric Mesh - application. - :type application_name: str - :param service_name: Required. service that contains the endpoint. - :type service_name: str - :param endpoint_name: Required. name of the endpoint in the service. - :type endpoint_name: str - """ - - _validation = { - 'application_name': {'required': True}, - 'service_name': {'required': True}, - 'endpoint_name': {'required': True}, - } - - _attribute_map = { - 'application_name': {'key': 'applicationName', 'type': 'str'}, - 'service_name': {'key': 'serviceName', 'type': 'str'}, - 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, - } - - def __init__(self, *, application_name: str, service_name: str, endpoint_name: str, **kwargs) -> None: - super(GatewayDestination, self).__init__(**kwargs) - self.application_name = application_name - self.service_name = service_name - self.endpoint_name = endpoint_name diff --git a/customSDK/servicefabric/models/gateway_resource_description.py b/customSDK/servicefabric/models/gateway_resource_description.py deleted file mode 100644 index ad9d4e3f..00000000 --- a/customSDK/servicefabric/models/gateway_resource_description.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GatewayResourceDescription(Model): - """This type describes a gateway resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Gateway resource. - :type name: str - :param description: User readable description of the gateway. - :type description: str - :param source_network: Required. Network the gateway should listen on for - requests. - :type source_network: ~azure.servicefabric.models.NetworkRef - :param destination_network: Required. Network that the Application is - using. - :type destination_network: ~azure.servicefabric.models.NetworkRef - :param tcp: Configuration for tcp connectivity for this gateway. - :type tcp: list[~azure.servicefabric.models.TcpConfig] - :param http: Configuration for http connectivity for this gateway. - :type http: list[~azure.servicefabric.models.HttpConfig] - :ivar status: Status of the resource. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the gateway. - :vartype status_details: str - :ivar ip_address: IP address of the gateway. This is populated in the - response and is ignored for incoming requests. - :vartype ip_address: str - """ - - _validation = { - 'name': {'required': True}, - 'source_network': {'required': True}, - 'destination_network': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'ip_address': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'source_network': {'key': 'properties.sourceNetwork', 'type': 'NetworkRef'}, - 'destination_network': {'key': 'properties.destinationNetwork', 'type': 'NetworkRef'}, - 'tcp': {'key': 'properties.tcp', 'type': '[TcpConfig]'}, - 'http': {'key': 'properties.http', 'type': '[HttpConfig]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GatewayResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) - self.source_network = kwargs.get('source_network', None) - self.destination_network = kwargs.get('destination_network', None) - self.tcp = kwargs.get('tcp', None) - self.http = kwargs.get('http', None) - self.status = None - self.status_details = None - self.ip_address = None diff --git a/customSDK/servicefabric/models/gateway_resource_description_py3.py b/customSDK/servicefabric/models/gateway_resource_description_py3.py deleted file mode 100644 index ddc77ada..00000000 --- a/customSDK/servicefabric/models/gateway_resource_description_py3.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GatewayResourceDescription(Model): - """This type describes a gateway resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Gateway resource. - :type name: str - :param description: User readable description of the gateway. - :type description: str - :param source_network: Required. Network the gateway should listen on for - requests. - :type source_network: ~azure.servicefabric.models.NetworkRef - :param destination_network: Required. Network that the Application is - using. - :type destination_network: ~azure.servicefabric.models.NetworkRef - :param tcp: Configuration for tcp connectivity for this gateway. - :type tcp: list[~azure.servicefabric.models.TcpConfig] - :param http: Configuration for http connectivity for this gateway. - :type http: list[~azure.servicefabric.models.HttpConfig] - :ivar status: Status of the resource. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the gateway. - :vartype status_details: str - :ivar ip_address: IP address of the gateway. This is populated in the - response and is ignored for incoming requests. - :vartype ip_address: str - """ - - _validation = { - 'name': {'required': True}, - 'source_network': {'required': True}, - 'destination_network': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'ip_address': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'source_network': {'key': 'properties.sourceNetwork', 'type': 'NetworkRef'}, - 'destination_network': {'key': 'properties.destinationNetwork', 'type': 'NetworkRef'}, - 'tcp': {'key': 'properties.tcp', 'type': '[TcpConfig]'}, - 'http': {'key': 'properties.http', 'type': '[HttpConfig]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, - } - - def __init__(self, *, name: str, source_network, destination_network, description: str=None, tcp=None, http=None, **kwargs) -> None: - super(GatewayResourceDescription, self).__init__(**kwargs) - self.name = name - self.description = description - self.source_network = source_network - self.destination_network = destination_network - self.tcp = tcp - self.http = http - self.status = None - self.status_details = None - self.ip_address = None diff --git a/customSDK/servicefabric/models/get_backup_by_storage_query_description.py b/customSDK/servicefabric/models/get_backup_by_storage_query_description.py deleted file mode 100644 index 5b2eb4e6..00000000 --- a/customSDK/servicefabric/models/get_backup_by_storage_query_description.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GetBackupByStorageQueryDescription(Model): - """Describes additional filters to be applied, while listing backups, and - backup storage details from where to fetch the backups. - - All required parameters must be populated in order to send to Azure. - - :param start_date_time_filter: Specifies the start date time in ISO8601 - from which to enumerate backups. If not specified, backups are enumerated - from the beginning. - :type start_date_time_filter: datetime - :param end_date_time_filter: Specifies the end date time in ISO8601 till - which to enumerate backups. If not specified, backups are enumerated till - the end. - :type end_date_time_filter: datetime - :param latest: If specified as true, gets the most recent backup (within - the specified time range) for every partition under the specified backup - entity. Default value: False . - :type latest: bool - :param storage: Required. Describes the parameters for the backup storage - from where to enumerate backups. This is optional and by default backups - are enumerated from the backup storage where this backup entity is - currently being backed up (as specified in backup policy). This parameter - is useful to be able to enumerate backups from another cluster where you - may intend to restore. - :type storage: ~azure.servicefabric.models.BackupStorageDescription - :param backup_entity: Required. Indicates the entity for which to - enumerate backups. - :type backup_entity: ~azure.servicefabric.models.BackupEntity - """ - - _validation = { - 'storage': {'required': True}, - 'backup_entity': {'required': True}, - } - - _attribute_map = { - 'start_date_time_filter': {'key': 'StartDateTimeFilter', 'type': 'iso-8601'}, - 'end_date_time_filter': {'key': 'EndDateTimeFilter', 'type': 'iso-8601'}, - 'latest': {'key': 'Latest', 'type': 'bool'}, - 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, - 'backup_entity': {'key': 'BackupEntity', 'type': 'BackupEntity'}, - } - - def __init__(self, **kwargs): - super(GetBackupByStorageQueryDescription, self).__init__(**kwargs) - self.start_date_time_filter = kwargs.get('start_date_time_filter', None) - self.end_date_time_filter = kwargs.get('end_date_time_filter', None) - self.latest = kwargs.get('latest', False) - self.storage = kwargs.get('storage', None) - self.backup_entity = kwargs.get('backup_entity', None) diff --git a/customSDK/servicefabric/models/get_backup_by_storage_query_description_py3.py b/customSDK/servicefabric/models/get_backup_by_storage_query_description_py3.py deleted file mode 100644 index 5ad96e0b..00000000 --- a/customSDK/servicefabric/models/get_backup_by_storage_query_description_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class GetBackupByStorageQueryDescription(Model): - """Describes additional filters to be applied, while listing backups, and - backup storage details from where to fetch the backups. - - All required parameters must be populated in order to send to Azure. - - :param start_date_time_filter: Specifies the start date time in ISO8601 - from which to enumerate backups. If not specified, backups are enumerated - from the beginning. - :type start_date_time_filter: datetime - :param end_date_time_filter: Specifies the end date time in ISO8601 till - which to enumerate backups. If not specified, backups are enumerated till - the end. - :type end_date_time_filter: datetime - :param latest: If specified as true, gets the most recent backup (within - the specified time range) for every partition under the specified backup - entity. Default value: False . - :type latest: bool - :param storage: Required. Describes the parameters for the backup storage - from where to enumerate backups. This is optional and by default backups - are enumerated from the backup storage where this backup entity is - currently being backed up (as specified in backup policy). This parameter - is useful to be able to enumerate backups from another cluster where you - may intend to restore. - :type storage: ~azure.servicefabric.models.BackupStorageDescription - :param backup_entity: Required. Indicates the entity for which to - enumerate backups. - :type backup_entity: ~azure.servicefabric.models.BackupEntity - """ - - _validation = { - 'storage': {'required': True}, - 'backup_entity': {'required': True}, - } - - _attribute_map = { - 'start_date_time_filter': {'key': 'StartDateTimeFilter', 'type': 'iso-8601'}, - 'end_date_time_filter': {'key': 'EndDateTimeFilter', 'type': 'iso-8601'}, - 'latest': {'key': 'Latest', 'type': 'bool'}, - 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, - 'backup_entity': {'key': 'BackupEntity', 'type': 'BackupEntity'}, - } - - def __init__(self, *, storage, backup_entity, start_date_time_filter=None, end_date_time_filter=None, latest: bool=False, **kwargs) -> None: - super(GetBackupByStorageQueryDescription, self).__init__(**kwargs) - self.start_date_time_filter = start_date_time_filter - self.end_date_time_filter = end_date_time_filter - self.latest = latest - self.storage = storage - self.backup_entity = backup_entity diff --git a/customSDK/servicefabric/models/get_property_batch_operation.py b/customSDK/servicefabric/models/get_property_batch_operation.py deleted file mode 100644 index d6f7784f..00000000 --- a/customSDK/servicefabric/models/get_property_batch_operation.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_batch_operation import PropertyBatchOperation - - -class GetPropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that gets the specified property if it - exists. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param include_value: Whether or not to return the property value with the - metadata. - True if values should be returned with the metadata; False to return only - property metadata. Default value: False . - :type include_value: bool - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'include_value': {'key': 'IncludeValue', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(GetPropertyBatchOperation, self).__init__(**kwargs) - self.include_value = kwargs.get('include_value', False) - self.kind = 'Get' diff --git a/customSDK/servicefabric/models/get_property_batch_operation_py3.py b/customSDK/servicefabric/models/get_property_batch_operation_py3.py deleted file mode 100644 index 19b781a6..00000000 --- a/customSDK/servicefabric/models/get_property_batch_operation_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_batch_operation_py3 import PropertyBatchOperation - - -class GetPropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that gets the specified property if it - exists. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param include_value: Whether or not to return the property value with the - metadata. - True if values should be returned with the metadata; False to return only - property metadata. Default value: False . - :type include_value: bool - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'include_value': {'key': 'IncludeValue', 'type': 'bool'}, - } - - def __init__(self, *, property_name: str, include_value: bool=False, **kwargs) -> None: - super(GetPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.include_value = include_value - self.kind = 'Get' diff --git a/customSDK/servicefabric/models/guid_property_value.py b/customSDK/servicefabric/models/guid_property_value.py deleted file mode 100644 index 80b52ccf..00000000 --- a/customSDK/servicefabric/models/guid_property_value.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_value import PropertyValue - - -class GuidPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Guid. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. The data of the property value. - :type data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GuidPropertyValue, self).__init__(**kwargs) - self.data = kwargs.get('data', None) - self.kind = 'Guid' diff --git a/customSDK/servicefabric/models/guid_property_value_py3.py b/customSDK/servicefabric/models/guid_property_value_py3.py deleted file mode 100644 index 9989c331..00000000 --- a/customSDK/servicefabric/models/guid_property_value_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_value_py3 import PropertyValue - - -class GuidPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Guid. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. The data of the property value. - :type data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__(self, *, data: str, **kwargs) -> None: - super(GuidPropertyValue, self).__init__(**kwargs) - self.data = data - self.kind = 'Guid' diff --git a/customSDK/servicefabric/models/health_evaluation.py b/customSDK/servicefabric/models/health_evaluation.py deleted file mode 100644 index 0ce18124..00000000 --- a/customSDK/servicefabric/models/health_evaluation.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HealthEvaluation(Model): - """Represents a health evaluation which describes the data and the algorithm - used by health manager to evaluate the health of an entity. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationHealthEvaluation, ApplicationsHealthEvaluation, - ApplicationTypeApplicationsHealthEvaluation, - DeltaNodesCheckHealthEvaluation, DeployedApplicationHealthEvaluation, - DeployedApplicationsHealthEvaluation, - DeployedServicePackageHealthEvaluation, - DeployedServicePackagesHealthEvaluation, EventHealthEvaluation, - NodeHealthEvaluation, NodesHealthEvaluation, PartitionHealthEvaluation, - PartitionsHealthEvaluation, ReplicaHealthEvaluation, - ReplicasHealthEvaluation, ServiceHealthEvaluation, - ServicesHealthEvaluation, SystemApplicationHealthEvaluation, - UpgradeDomainDeltaNodesCheckHealthEvaluation, - UpgradeDomainDeployedApplicationsHealthEvaluation, - UpgradeDomainNodesHealthEvaluation, NodeTypeNodesHealthEvaluation - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Application': 'ApplicationHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainDeployedApplications': 'UpgradeDomainDeployedApplicationsHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation', 'NodeTypeNodes': 'NodeTypeNodesHealthEvaluation'} - } - - def __init__(self, **kwargs): - super(HealthEvaluation, self).__init__(**kwargs) - self.aggregated_health_state = kwargs.get('aggregated_health_state', None) - self.description = kwargs.get('description', None) - self.kind = None diff --git a/customSDK/servicefabric/models/health_evaluation_py3.py b/customSDK/servicefabric/models/health_evaluation_py3.py deleted file mode 100644 index 58bb5899..00000000 --- a/customSDK/servicefabric/models/health_evaluation_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HealthEvaluation(Model): - """Represents a health evaluation which describes the data and the algorithm - used by health manager to evaluate the health of an entity. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationHealthEvaluation, ApplicationsHealthEvaluation, - ApplicationTypeApplicationsHealthEvaluation, - DeltaNodesCheckHealthEvaluation, DeployedApplicationHealthEvaluation, - DeployedApplicationsHealthEvaluation, - DeployedServicePackageHealthEvaluation, - DeployedServicePackagesHealthEvaluation, EventHealthEvaluation, - NodeHealthEvaluation, NodesHealthEvaluation, PartitionHealthEvaluation, - PartitionsHealthEvaluation, ReplicaHealthEvaluation, - ReplicasHealthEvaluation, ServiceHealthEvaluation, - ServicesHealthEvaluation, SystemApplicationHealthEvaluation, - UpgradeDomainDeltaNodesCheckHealthEvaluation, - UpgradeDomainDeployedApplicationsHealthEvaluation, - UpgradeDomainNodesHealthEvaluation, NodeTypeNodesHealthEvaluation - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Application': 'ApplicationHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainDeployedApplications': 'UpgradeDomainDeployedApplicationsHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation', 'NodeTypeNodes': 'NodeTypeNodesHealthEvaluation'} - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, **kwargs) -> None: - super(HealthEvaluation, self).__init__(**kwargs) - self.aggregated_health_state = aggregated_health_state - self.description = description - self.kind = None diff --git a/customSDK/servicefabric/models/health_evaluation_wrapper.py b/customSDK/servicefabric/models/health_evaluation_wrapper.py deleted file mode 100644 index 9bb8fabb..00000000 --- a/customSDK/servicefabric/models/health_evaluation_wrapper.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HealthEvaluationWrapper(Model): - """Wrapper object for health evaluation. - - :param health_evaluation: Represents a health evaluation which describes - the data and the algorithm used by health manager to evaluate the health - of an entity. - :type health_evaluation: ~azure.servicefabric.models.HealthEvaluation - """ - - _attribute_map = { - 'health_evaluation': {'key': 'HealthEvaluation', 'type': 'HealthEvaluation'}, - } - - def __init__(self, **kwargs): - super(HealthEvaluationWrapper, self).__init__(**kwargs) - self.health_evaluation = kwargs.get('health_evaluation', None) diff --git a/customSDK/servicefabric/models/health_evaluation_wrapper_py3.py b/customSDK/servicefabric/models/health_evaluation_wrapper_py3.py deleted file mode 100644 index b18ee717..00000000 --- a/customSDK/servicefabric/models/health_evaluation_wrapper_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HealthEvaluationWrapper(Model): - """Wrapper object for health evaluation. - - :param health_evaluation: Represents a health evaluation which describes - the data and the algorithm used by health manager to evaluate the health - of an entity. - :type health_evaluation: ~azure.servicefabric.models.HealthEvaluation - """ - - _attribute_map = { - 'health_evaluation': {'key': 'HealthEvaluation', 'type': 'HealthEvaluation'}, - } - - def __init__(self, *, health_evaluation=None, **kwargs) -> None: - super(HealthEvaluationWrapper, self).__init__(**kwargs) - self.health_evaluation = health_evaluation diff --git a/customSDK/servicefabric/models/health_event.py b/customSDK/servicefabric/models/health_event.py deleted file mode 100644 index 4575acd5..00000000 --- a/customSDK/servicefabric/models/health_event.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_information import HealthInformation - - -class HealthEvent(HealthInformation): - """Represents health information reported on a health entity, such as cluster, - application or node, with additional metadata added by the Health Manager. - - All required parameters must be populated in order to send to Azure. - - :param source_id: Required. The source name that identifies the - client/watchdog/system component that generated the health information. - :type source_id: str - :param property: Required. The property of the health information. An - entity can have health reports for different properties. - The property is a string and not a fixed enumeration to allow the reporter - flexibility to categorize the state condition that triggers the report. - For example, a reporter with SourceId "LocalWatchdog" can monitor the - state of the available disk on a node, - so it can report "AvailableDisk" property on that node. - The same reporter can monitor the node connectivity, so it can report a - property "Connectivity" on the same node. - In the health store, these reports are treated as separate health events - for the specified node. - Together with the SourceId, the property uniquely identifies the health - information. - :type property: str - :param health_state: Required. The health state of a Service Fabric entity - such as Cluster, Node, Application, Service, Partition, Replica etc. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param time_to_live_in_milli_seconds: The duration for which this health - report is valid. This field uses ISO8601 format for specifying the - duration. - When clients report periodically, they should send reports with higher - frequency than time to live. - If clients report on transition, they can set the time to live to - infinite. - When time to live expires, the health event that contains the health - information - is either removed from health store, if RemoveWhenExpired is true, or - evaluated at error, if RemoveWhenExpired false. - If not specified, time to live defaults to infinite value. - :type time_to_live_in_milli_seconds: timedelta - :param description: The description of the health information. It - represents free text used to add human readable information about the - report. - The maximum string length for the description is 4096 characters. - If the provided string is longer, it will be automatically truncated. - When truncated, the last characters of the description contain a marker - "[Truncated]", and total string size is 4096 characters. - The presence of the marker indicates to users that truncation occurred. - Note that when truncated, the description has less than 4096 characters - from the original string. - :type description: str - :param sequence_number: The sequence number for this health report as a - numeric string. - The report sequence number is used by the health store to detect stale - reports. - If not specified, a sequence number is auto-generated by the health client - when a report is added. - :type sequence_number: str - :param remove_when_expired: Value that indicates whether the report is - removed from health store when it expires. - If set to true, the report is removed from the health store after it - expires. - If set to false, the report is treated as an error when expired. The value - of this property is false by default. - When clients report periodically, they should set RemoveWhenExpired false - (default). - This way, if the reporter has issues (e.g. deadlock) and can't report, the - entity is evaluated at error when the health report expires. - This flags the entity as being in Error health state. - :type remove_when_expired: bool - :param health_report_id: A health report ID which identifies the health - report and can be used to find more detailed information about a specific - health event at - aka.ms/sfhealthid - :type health_report_id: str - :param is_expired: Returns true if the health event is expired, otherwise - false. - :type is_expired: bool - :param source_utc_timestamp: The date and time when the health report was - sent by the source. - :type source_utc_timestamp: datetime - :param last_modified_utc_timestamp: The date and time when the health - report was last modified by the health store. - :type last_modified_utc_timestamp: datetime - :param last_ok_transition_at: If the current health state is 'Ok', this - property returns the time at which the health report was first reported - with 'Ok'. - For periodic reporting, many reports with the same state may have been - generated. - This property returns the date and time when the first 'Ok' health report - was received. - If the current health state is 'Error' or 'Warning', returns the date and - time at which the health state was last in 'Ok', before transitioning to a - different state. - If the health state was never 'Ok', the value will be zero date-time. - :type last_ok_transition_at: datetime - :param last_warning_transition_at: If the current health state is - 'Warning', this property returns the time at which the health report was - first reported with 'Warning'. For periodic reporting, many reports with - the same state may have been generated however, this property returns only - the date and time at the first 'Warning' health report was received. - If the current health state is 'Ok' or 'Error', returns the date and time - at which the health state was last in 'Warning', before transitioning to a - different state. - If the health state was never 'Warning', the value will be zero date-time. - :type last_warning_transition_at: datetime - :param last_error_transition_at: If the current health state is 'Error', - this property returns the time at which the health report was first - reported with 'Error'. For periodic reporting, many reports with the same - state may have been generated however, this property returns only the date - and time at the first 'Error' health report was received. - If the current health state is 'Ok' or 'Warning', returns the date and - time at which the health state was last in 'Error', before transitioning - to a different state. - If the health state was never 'Error', the value will be zero date-time. - :type last_error_transition_at: datetime - """ - - _validation = { - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - } - - _attribute_map = { - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, - 'is_expired': {'key': 'IsExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, - 'last_ok_transition_at': {'key': 'LastOkTransitionAt', 'type': 'iso-8601'}, - 'last_warning_transition_at': {'key': 'LastWarningTransitionAt', 'type': 'iso-8601'}, - 'last_error_transition_at': {'key': 'LastErrorTransitionAt', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(HealthEvent, self).__init__(**kwargs) - self.is_expired = kwargs.get('is_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.last_modified_utc_timestamp = kwargs.get('last_modified_utc_timestamp', None) - self.last_ok_transition_at = kwargs.get('last_ok_transition_at', None) - self.last_warning_transition_at = kwargs.get('last_warning_transition_at', None) - self.last_error_transition_at = kwargs.get('last_error_transition_at', None) diff --git a/customSDK/servicefabric/models/health_event_py3.py b/customSDK/servicefabric/models/health_event_py3.py deleted file mode 100644 index ed08119e..00000000 --- a/customSDK/servicefabric/models/health_event_py3.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_information_py3 import HealthInformation - - -class HealthEvent(HealthInformation): - """Represents health information reported on a health entity, such as cluster, - application or node, with additional metadata added by the Health Manager. - - All required parameters must be populated in order to send to Azure. - - :param source_id: Required. The source name that identifies the - client/watchdog/system component that generated the health information. - :type source_id: str - :param property: Required. The property of the health information. An - entity can have health reports for different properties. - The property is a string and not a fixed enumeration to allow the reporter - flexibility to categorize the state condition that triggers the report. - For example, a reporter with SourceId "LocalWatchdog" can monitor the - state of the available disk on a node, - so it can report "AvailableDisk" property on that node. - The same reporter can monitor the node connectivity, so it can report a - property "Connectivity" on the same node. - In the health store, these reports are treated as separate health events - for the specified node. - Together with the SourceId, the property uniquely identifies the health - information. - :type property: str - :param health_state: Required. The health state of a Service Fabric entity - such as Cluster, Node, Application, Service, Partition, Replica etc. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param time_to_live_in_milli_seconds: The duration for which this health - report is valid. This field uses ISO8601 format for specifying the - duration. - When clients report periodically, they should send reports with higher - frequency than time to live. - If clients report on transition, they can set the time to live to - infinite. - When time to live expires, the health event that contains the health - information - is either removed from health store, if RemoveWhenExpired is true, or - evaluated at error, if RemoveWhenExpired false. - If not specified, time to live defaults to infinite value. - :type time_to_live_in_milli_seconds: timedelta - :param description: The description of the health information. It - represents free text used to add human readable information about the - report. - The maximum string length for the description is 4096 characters. - If the provided string is longer, it will be automatically truncated. - When truncated, the last characters of the description contain a marker - "[Truncated]", and total string size is 4096 characters. - The presence of the marker indicates to users that truncation occurred. - Note that when truncated, the description has less than 4096 characters - from the original string. - :type description: str - :param sequence_number: The sequence number for this health report as a - numeric string. - The report sequence number is used by the health store to detect stale - reports. - If not specified, a sequence number is auto-generated by the health client - when a report is added. - :type sequence_number: str - :param remove_when_expired: Value that indicates whether the report is - removed from health store when it expires. - If set to true, the report is removed from the health store after it - expires. - If set to false, the report is treated as an error when expired. The value - of this property is false by default. - When clients report periodically, they should set RemoveWhenExpired false - (default). - This way, if the reporter has issues (e.g. deadlock) and can't report, the - entity is evaluated at error when the health report expires. - This flags the entity as being in Error health state. - :type remove_when_expired: bool - :param health_report_id: A health report ID which identifies the health - report and can be used to find more detailed information about a specific - health event at - aka.ms/sfhealthid - :type health_report_id: str - :param is_expired: Returns true if the health event is expired, otherwise - false. - :type is_expired: bool - :param source_utc_timestamp: The date and time when the health report was - sent by the source. - :type source_utc_timestamp: datetime - :param last_modified_utc_timestamp: The date and time when the health - report was last modified by the health store. - :type last_modified_utc_timestamp: datetime - :param last_ok_transition_at: If the current health state is 'Ok', this - property returns the time at which the health report was first reported - with 'Ok'. - For periodic reporting, many reports with the same state may have been - generated. - This property returns the date and time when the first 'Ok' health report - was received. - If the current health state is 'Error' or 'Warning', returns the date and - time at which the health state was last in 'Ok', before transitioning to a - different state. - If the health state was never 'Ok', the value will be zero date-time. - :type last_ok_transition_at: datetime - :param last_warning_transition_at: If the current health state is - 'Warning', this property returns the time at which the health report was - first reported with 'Warning'. For periodic reporting, many reports with - the same state may have been generated however, this property returns only - the date and time at the first 'Warning' health report was received. - If the current health state is 'Ok' or 'Error', returns the date and time - at which the health state was last in 'Warning', before transitioning to a - different state. - If the health state was never 'Warning', the value will be zero date-time. - :type last_warning_transition_at: datetime - :param last_error_transition_at: If the current health state is 'Error', - this property returns the time at which the health report was first - reported with 'Error'. For periodic reporting, many reports with the same - state may have been generated however, this property returns only the date - and time at the first 'Error' health report was received. - If the current health state is 'Ok' or 'Warning', returns the date and - time at which the health state was last in 'Error', before transitioning - to a different state. - If the health state was never 'Error', the value will be zero date-time. - :type last_error_transition_at: datetime - """ - - _validation = { - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - } - - _attribute_map = { - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, - 'is_expired': {'key': 'IsExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, - 'last_ok_transition_at': {'key': 'LastOkTransitionAt', 'type': 'iso-8601'}, - 'last_warning_transition_at': {'key': 'LastWarningTransitionAt', 'type': 'iso-8601'}, - 'last_error_transition_at': {'key': 'LastErrorTransitionAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, source_id: str, property: str, health_state, time_to_live_in_milli_seconds=None, description: str=None, sequence_number: str=None, remove_when_expired: bool=None, health_report_id: str=None, is_expired: bool=None, source_utc_timestamp=None, last_modified_utc_timestamp=None, last_ok_transition_at=None, last_warning_transition_at=None, last_error_transition_at=None, **kwargs) -> None: - super(HealthEvent, self).__init__(source_id=source_id, property=property, health_state=health_state, time_to_live_in_milli_seconds=time_to_live_in_milli_seconds, description=description, sequence_number=sequence_number, remove_when_expired=remove_when_expired, health_report_id=health_report_id, **kwargs) - self.is_expired = is_expired - self.source_utc_timestamp = source_utc_timestamp - self.last_modified_utc_timestamp = last_modified_utc_timestamp - self.last_ok_transition_at = last_ok_transition_at - self.last_warning_transition_at = last_warning_transition_at - self.last_error_transition_at = last_error_transition_at diff --git a/customSDK/servicefabric/models/health_information.py b/customSDK/servicefabric/models/health_information.py deleted file mode 100644 index 40a71d7e..00000000 --- a/customSDK/servicefabric/models/health_information.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HealthInformation(Model): - """Represents common health report information. It is included in all health - reports sent to health store and in all health events returned by health - queries. - - All required parameters must be populated in order to send to Azure. - - :param source_id: Required. The source name that identifies the - client/watchdog/system component that generated the health information. - :type source_id: str - :param property: Required. The property of the health information. An - entity can have health reports for different properties. - The property is a string and not a fixed enumeration to allow the reporter - flexibility to categorize the state condition that triggers the report. - For example, a reporter with SourceId "LocalWatchdog" can monitor the - state of the available disk on a node, - so it can report "AvailableDisk" property on that node. - The same reporter can monitor the node connectivity, so it can report a - property "Connectivity" on the same node. - In the health store, these reports are treated as separate health events - for the specified node. - Together with the SourceId, the property uniquely identifies the health - information. - :type property: str - :param health_state: Required. The health state of a Service Fabric entity - such as Cluster, Node, Application, Service, Partition, Replica etc. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param time_to_live_in_milli_seconds: The duration for which this health - report is valid. This field uses ISO8601 format for specifying the - duration. - When clients report periodically, they should send reports with higher - frequency than time to live. - If clients report on transition, they can set the time to live to - infinite. - When time to live expires, the health event that contains the health - information - is either removed from health store, if RemoveWhenExpired is true, or - evaluated at error, if RemoveWhenExpired false. - If not specified, time to live defaults to infinite value. - :type time_to_live_in_milli_seconds: timedelta - :param description: The description of the health information. It - represents free text used to add human readable information about the - report. - The maximum string length for the description is 4096 characters. - If the provided string is longer, it will be automatically truncated. - When truncated, the last characters of the description contain a marker - "[Truncated]", and total string size is 4096 characters. - The presence of the marker indicates to users that truncation occurred. - Note that when truncated, the description has less than 4096 characters - from the original string. - :type description: str - :param sequence_number: The sequence number for this health report as a - numeric string. - The report sequence number is used by the health store to detect stale - reports. - If not specified, a sequence number is auto-generated by the health client - when a report is added. - :type sequence_number: str - :param remove_when_expired: Value that indicates whether the report is - removed from health store when it expires. - If set to true, the report is removed from the health store after it - expires. - If set to false, the report is treated as an error when expired. The value - of this property is false by default. - When clients report periodically, they should set RemoveWhenExpired false - (default). - This way, if the reporter has issues (e.g. deadlock) and can't report, the - entity is evaluated at error when the health report expires. - This flags the entity as being in Error health state. - :type remove_when_expired: bool - :param health_report_id: A health report ID which identifies the health - report and can be used to find more detailed information about a specific - health event at - aka.ms/sfhealthid - :type health_report_id: str - """ - - _validation = { - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - } - - _attribute_map = { - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HealthInformation, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_in_milli_seconds = kwargs.get('time_to_live_in_milli_seconds', None) - self.description = kwargs.get('description', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.health_report_id = kwargs.get('health_report_id', None) diff --git a/customSDK/servicefabric/models/health_information_py3.py b/customSDK/servicefabric/models/health_information_py3.py deleted file mode 100644 index cc10ee65..00000000 --- a/customSDK/servicefabric/models/health_information_py3.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HealthInformation(Model): - """Represents common health report information. It is included in all health - reports sent to health store and in all health events returned by health - queries. - - All required parameters must be populated in order to send to Azure. - - :param source_id: Required. The source name that identifies the - client/watchdog/system component that generated the health information. - :type source_id: str - :param property: Required. The property of the health information. An - entity can have health reports for different properties. - The property is a string and not a fixed enumeration to allow the reporter - flexibility to categorize the state condition that triggers the report. - For example, a reporter with SourceId "LocalWatchdog" can monitor the - state of the available disk on a node, - so it can report "AvailableDisk" property on that node. - The same reporter can monitor the node connectivity, so it can report a - property "Connectivity" on the same node. - In the health store, these reports are treated as separate health events - for the specified node. - Together with the SourceId, the property uniquely identifies the health - information. - :type property: str - :param health_state: Required. The health state of a Service Fabric entity - such as Cluster, Node, Application, Service, Partition, Replica etc. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param time_to_live_in_milli_seconds: The duration for which this health - report is valid. This field uses ISO8601 format for specifying the - duration. - When clients report periodically, they should send reports with higher - frequency than time to live. - If clients report on transition, they can set the time to live to - infinite. - When time to live expires, the health event that contains the health - information - is either removed from health store, if RemoveWhenExpired is true, or - evaluated at error, if RemoveWhenExpired false. - If not specified, time to live defaults to infinite value. - :type time_to_live_in_milli_seconds: timedelta - :param description: The description of the health information. It - represents free text used to add human readable information about the - report. - The maximum string length for the description is 4096 characters. - If the provided string is longer, it will be automatically truncated. - When truncated, the last characters of the description contain a marker - "[Truncated]", and total string size is 4096 characters. - The presence of the marker indicates to users that truncation occurred. - Note that when truncated, the description has less than 4096 characters - from the original string. - :type description: str - :param sequence_number: The sequence number for this health report as a - numeric string. - The report sequence number is used by the health store to detect stale - reports. - If not specified, a sequence number is auto-generated by the health client - when a report is added. - :type sequence_number: str - :param remove_when_expired: Value that indicates whether the report is - removed from health store when it expires. - If set to true, the report is removed from the health store after it - expires. - If set to false, the report is treated as an error when expired. The value - of this property is false by default. - When clients report periodically, they should set RemoveWhenExpired false - (default). - This way, if the reporter has issues (e.g. deadlock) and can't report, the - entity is evaluated at error when the health report expires. - This flags the entity as being in Error health state. - :type remove_when_expired: bool - :param health_report_id: A health report ID which identifies the health - report and can be used to find more detailed information about a specific - health event at - aka.ms/sfhealthid - :type health_report_id: str - """ - - _validation = { - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - } - - _attribute_map = { - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, - } - - def __init__(self, *, source_id: str, property: str, health_state, time_to_live_in_milli_seconds=None, description: str=None, sequence_number: str=None, remove_when_expired: bool=None, health_report_id: str=None, **kwargs) -> None: - super(HealthInformation, self).__init__(**kwargs) - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_in_milli_seconds = time_to_live_in_milli_seconds - self.description = description - self.sequence_number = sequence_number - self.remove_when_expired = remove_when_expired - self.health_report_id = health_report_id diff --git a/customSDK/servicefabric/models/health_state_count.py b/customSDK/servicefabric/models/health_state_count.py deleted file mode 100644 index 0a27c714..00000000 --- a/customSDK/servicefabric/models/health_state_count.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HealthStateCount(Model): - """Represents information about how many health entities are in Ok, Warning - and Error health state. - - :param ok_count: The number of health entities with aggregated health - state Ok. - :type ok_count: long - :param warning_count: The number of health entities with aggregated health - state Warning. - :type warning_count: long - :param error_count: The number of health entities with aggregated health - state Error. - :type error_count: long - """ - - _validation = { - 'ok_count': {'minimum': 0}, - 'warning_count': {'minimum': 0}, - 'error_count': {'minimum': 0}, - } - - _attribute_map = { - 'ok_count': {'key': 'OkCount', 'type': 'long'}, - 'warning_count': {'key': 'WarningCount', 'type': 'long'}, - 'error_count': {'key': 'ErrorCount', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(HealthStateCount, self).__init__(**kwargs) - self.ok_count = kwargs.get('ok_count', None) - self.warning_count = kwargs.get('warning_count', None) - self.error_count = kwargs.get('error_count', None) diff --git a/customSDK/servicefabric/models/health_state_count_py3.py b/customSDK/servicefabric/models/health_state_count_py3.py deleted file mode 100644 index fbba5c1d..00000000 --- a/customSDK/servicefabric/models/health_state_count_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HealthStateCount(Model): - """Represents information about how many health entities are in Ok, Warning - and Error health state. - - :param ok_count: The number of health entities with aggregated health - state Ok. - :type ok_count: long - :param warning_count: The number of health entities with aggregated health - state Warning. - :type warning_count: long - :param error_count: The number of health entities with aggregated health - state Error. - :type error_count: long - """ - - _validation = { - 'ok_count': {'minimum': 0}, - 'warning_count': {'minimum': 0}, - 'error_count': {'minimum': 0}, - } - - _attribute_map = { - 'ok_count': {'key': 'OkCount', 'type': 'long'}, - 'warning_count': {'key': 'WarningCount', 'type': 'long'}, - 'error_count': {'key': 'ErrorCount', 'type': 'long'}, - } - - def __init__(self, *, ok_count: int=None, warning_count: int=None, error_count: int=None, **kwargs) -> None: - super(HealthStateCount, self).__init__(**kwargs) - self.ok_count = ok_count - self.warning_count = warning_count - self.error_count = error_count diff --git a/customSDK/servicefabric/models/health_statistics.py b/customSDK/servicefabric/models/health_statistics.py deleted file mode 100644 index 2ad8d509..00000000 --- a/customSDK/servicefabric/models/health_statistics.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HealthStatistics(Model): - """The health statistics of an entity, returned as part of the health query - result when the query description is configured to include statistics. - The statistics include health state counts for all children types of the - current entity. - For example, for cluster, the health statistics include health state counts - for nodes, applications, services, partitions, replicas, deployed - applications and deployed service packages. - For partition, the health statistics include health counts for replicas. - - :param health_state_count_list: List of health state counts per entity - kind, which keeps track of how many children of the queried entity are in - Ok, Warning and Error state. - :type health_state_count_list: - list[~azure.servicefabric.models.EntityKindHealthStateCount] - """ - - _attribute_map = { - 'health_state_count_list': {'key': 'HealthStateCountList', 'type': '[EntityKindHealthStateCount]'}, - } - - def __init__(self, **kwargs): - super(HealthStatistics, self).__init__(**kwargs) - self.health_state_count_list = kwargs.get('health_state_count_list', None) diff --git a/customSDK/servicefabric/models/health_statistics_py3.py b/customSDK/servicefabric/models/health_statistics_py3.py deleted file mode 100644 index 5bcfd417..00000000 --- a/customSDK/servicefabric/models/health_statistics_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HealthStatistics(Model): - """The health statistics of an entity, returned as part of the health query - result when the query description is configured to include statistics. - The statistics include health state counts for all children types of the - current entity. - For example, for cluster, the health statistics include health state counts - for nodes, applications, services, partitions, replicas, deployed - applications and deployed service packages. - For partition, the health statistics include health counts for replicas. - - :param health_state_count_list: List of health state counts per entity - kind, which keeps track of how many children of the queried entity are in - Ok, Warning and Error state. - :type health_state_count_list: - list[~azure.servicefabric.models.EntityKindHealthStateCount] - """ - - _attribute_map = { - 'health_state_count_list': {'key': 'HealthStateCountList', 'type': '[EntityKindHealthStateCount]'}, - } - - def __init__(self, *, health_state_count_list=None, **kwargs) -> None: - super(HealthStatistics, self).__init__(**kwargs) - self.health_state_count_list = health_state_count_list diff --git a/customSDK/servicefabric/models/http_config.py b/customSDK/servicefabric/models/http_config.py deleted file mode 100644 index d52565f3..00000000 --- a/customSDK/servicefabric/models/http_config.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpConfig(Model): - """Describes the http configuration for external connectivity for this - network. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. http gateway config name. - :type name: str - :param port: Required. Specifies the port at which the service endpoint - below needs to be exposed. - :type port: int - :param hosts: Required. description for routing. - :type hosts: list[~azure.servicefabric.models.HttpHostConfig] - """ - - _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'hosts': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'hosts': {'key': 'hosts', 'type': '[HttpHostConfig]'}, - } - - def __init__(self, **kwargs): - super(HttpConfig, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.port = kwargs.get('port', None) - self.hosts = kwargs.get('hosts', None) diff --git a/customSDK/servicefabric/models/http_config_py3.py b/customSDK/servicefabric/models/http_config_py3.py deleted file mode 100644 index 3f353d16..00000000 --- a/customSDK/servicefabric/models/http_config_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpConfig(Model): - """Describes the http configuration for external connectivity for this - network. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. http gateway config name. - :type name: str - :param port: Required. Specifies the port at which the service endpoint - below needs to be exposed. - :type port: int - :param hosts: Required. description for routing. - :type hosts: list[~azure.servicefabric.models.HttpHostConfig] - """ - - _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'hosts': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'hosts': {'key': 'hosts', 'type': '[HttpHostConfig]'}, - } - - def __init__(self, *, name: str, port: int, hosts, **kwargs) -> None: - super(HttpConfig, self).__init__(**kwargs) - self.name = name - self.port = port - self.hosts = hosts diff --git a/customSDK/servicefabric/models/http_host_config.py b/customSDK/servicefabric/models/http_host_config.py deleted file mode 100644 index 5901ff79..00000000 --- a/customSDK/servicefabric/models/http_host_config.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpHostConfig(Model): - """Describes the hostname properties for http routing. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. http hostname config name. - :type name: str - :param routes: Required. Route information to use for routing. Routes are - processed in the order they are specified. Specify routes that are more - specific before routes that can handle general cases. - :type routes: list[~azure.servicefabric.models.HttpRouteConfig] - """ - - _validation = { - 'name': {'required': True}, - 'routes': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'routes': {'key': 'routes', 'type': '[HttpRouteConfig]'}, - } - - def __init__(self, **kwargs): - super(HttpHostConfig, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.routes = kwargs.get('routes', None) diff --git a/customSDK/servicefabric/models/http_host_config_py3.py b/customSDK/servicefabric/models/http_host_config_py3.py deleted file mode 100644 index 008da9b7..00000000 --- a/customSDK/servicefabric/models/http_host_config_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpHostConfig(Model): - """Describes the hostname properties for http routing. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. http hostname config name. - :type name: str - :param routes: Required. Route information to use for routing. Routes are - processed in the order they are specified. Specify routes that are more - specific before routes that can handle general cases. - :type routes: list[~azure.servicefabric.models.HttpRouteConfig] - """ - - _validation = { - 'name': {'required': True}, - 'routes': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'routes': {'key': 'routes', 'type': '[HttpRouteConfig]'}, - } - - def __init__(self, *, name: str, routes, **kwargs) -> None: - super(HttpHostConfig, self).__init__(**kwargs) - self.name = name - self.routes = routes diff --git a/customSDK/servicefabric/models/http_route_config.py b/customSDK/servicefabric/models/http_route_config.py deleted file mode 100644 index f21ddccd..00000000 --- a/customSDK/servicefabric/models/http_route_config.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpRouteConfig(Model): - """Describes the hostname properties for http routing. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. http route name. - :type name: str - :param match: Required. Describes a rule for http route matching. - :type match: ~azure.servicefabric.models.HttpRouteMatchRule - :param destination: Required. Describes destination endpoint for routing - traffic. - :type destination: ~azure.servicefabric.models.GatewayDestination - """ - - _validation = { - 'name': {'required': True}, - 'match': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'match': {'key': 'match', 'type': 'HttpRouteMatchRule'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, - } - - def __init__(self, **kwargs): - super(HttpRouteConfig, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.match = kwargs.get('match', None) - self.destination = kwargs.get('destination', None) diff --git a/customSDK/servicefabric/models/http_route_config_py3.py b/customSDK/servicefabric/models/http_route_config_py3.py deleted file mode 100644 index 442ffb82..00000000 --- a/customSDK/servicefabric/models/http_route_config_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpRouteConfig(Model): - """Describes the hostname properties for http routing. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. http route name. - :type name: str - :param match: Required. Describes a rule for http route matching. - :type match: ~azure.servicefabric.models.HttpRouteMatchRule - :param destination: Required. Describes destination endpoint for routing - traffic. - :type destination: ~azure.servicefabric.models.GatewayDestination - """ - - _validation = { - 'name': {'required': True}, - 'match': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'match': {'key': 'match', 'type': 'HttpRouteMatchRule'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, - } - - def __init__(self, *, name: str, match, destination, **kwargs) -> None: - super(HttpRouteConfig, self).__init__(**kwargs) - self.name = name - self.match = match - self.destination = destination diff --git a/customSDK/servicefabric/models/http_route_match_header.py b/customSDK/servicefabric/models/http_route_match_header.py deleted file mode 100644 index 54fbdd60..00000000 --- a/customSDK/servicefabric/models/http_route_match_header.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpRouteMatchHeader(Model): - """Describes header information for http route matching. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of header to match in request. - :type name: str - :param value: Value of header to match in request. - :type value: str - :param type: how to match header value. Possible values include: 'exact' - :type type: str or ~azure.servicefabric.models.HeaderMatchType - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HttpRouteMatchHeader, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - self.type = kwargs.get('type', None) diff --git a/customSDK/servicefabric/models/http_route_match_header_py3.py b/customSDK/servicefabric/models/http_route_match_header_py3.py deleted file mode 100644 index ffb10df9..00000000 --- a/customSDK/servicefabric/models/http_route_match_header_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpRouteMatchHeader(Model): - """Describes header information for http route matching. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of header to match in request. - :type name: str - :param value: Value of header to match in request. - :type value: str - :param type: how to match header value. Possible values include: 'exact' - :type type: str or ~azure.servicefabric.models.HeaderMatchType - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str=None, type=None, **kwargs) -> None: - super(HttpRouteMatchHeader, self).__init__(**kwargs) - self.name = name - self.value = value - self.type = type diff --git a/customSDK/servicefabric/models/http_route_match_path.py b/customSDK/servicefabric/models/http_route_match_path.py deleted file mode 100644 index fa7b45f8..00000000 --- a/customSDK/servicefabric/models/http_route_match_path.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpRouteMatchPath(Model): - """Path to match for routing. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. Uri path to match for request. - :type value: str - :param rewrite: replacement string for matched part of the Uri. - :type rewrite: str - :ivar type: Required. how to match value in the Uri. Default value: - "prefix" . - :vartype type: str - """ - - _validation = { - 'value': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'rewrite': {'key': 'rewrite', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "prefix" - - def __init__(self, **kwargs): - super(HttpRouteMatchPath, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.rewrite = kwargs.get('rewrite', None) diff --git a/customSDK/servicefabric/models/http_route_match_path_py3.py b/customSDK/servicefabric/models/http_route_match_path_py3.py deleted file mode 100644 index 075b226e..00000000 --- a/customSDK/servicefabric/models/http_route_match_path_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpRouteMatchPath(Model): - """Path to match for routing. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. Uri path to match for request. - :type value: str - :param rewrite: replacement string for matched part of the Uri. - :type rewrite: str - :ivar type: Required. how to match value in the Uri. Default value: - "prefix" . - :vartype type: str - """ - - _validation = { - 'value': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'rewrite': {'key': 'rewrite', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "prefix" - - def __init__(self, *, value: str, rewrite: str=None, **kwargs) -> None: - super(HttpRouteMatchPath, self).__init__(**kwargs) - self.value = value - self.rewrite = rewrite diff --git a/customSDK/servicefabric/models/http_route_match_rule.py b/customSDK/servicefabric/models/http_route_match_rule.py deleted file mode 100644 index d09c2ea2..00000000 --- a/customSDK/servicefabric/models/http_route_match_rule.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpRouteMatchRule(Model): - """Describes a rule for http route matching. - - All required parameters must be populated in order to send to Azure. - - :param path: Required. Path to match for routing. - :type path: ~azure.servicefabric.models.HttpRouteMatchPath - :param headers: headers and their values to match in request. - :type headers: list[~azure.servicefabric.models.HttpRouteMatchHeader] - """ - - _validation = { - 'path': {'required': True}, - } - - _attribute_map = { - 'path': {'key': 'path', 'type': 'HttpRouteMatchPath'}, - 'headers': {'key': 'headers', 'type': '[HttpRouteMatchHeader]'}, - } - - def __init__(self, **kwargs): - super(HttpRouteMatchRule, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.headers = kwargs.get('headers', None) diff --git a/customSDK/servicefabric/models/http_route_match_rule_py3.py b/customSDK/servicefabric/models/http_route_match_rule_py3.py deleted file mode 100644 index 61561bf4..00000000 --- a/customSDK/servicefabric/models/http_route_match_rule_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpRouteMatchRule(Model): - """Describes a rule for http route matching. - - All required parameters must be populated in order to send to Azure. - - :param path: Required. Path to match for routing. - :type path: ~azure.servicefabric.models.HttpRouteMatchPath - :param headers: headers and their values to match in request. - :type headers: list[~azure.servicefabric.models.HttpRouteMatchHeader] - """ - - _validation = { - 'path': {'required': True}, - } - - _attribute_map = { - 'path': {'key': 'path', 'type': 'HttpRouteMatchPath'}, - 'headers': {'key': 'headers', 'type': '[HttpRouteMatchHeader]'}, - } - - def __init__(self, *, path, headers=None, **kwargs) -> None: - super(HttpRouteMatchRule, self).__init__(**kwargs) - self.path = path - self.headers = headers diff --git a/customSDK/servicefabric/models/identity_description.py b/customSDK/servicefabric/models/identity_description.py deleted file mode 100644 index 1ab557e2..00000000 --- a/customSDK/servicefabric/models/identity_description.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IdentityDescription(Model): - """Information describing the identities associated with this application. - - All required parameters must be populated in order to send to Azure. - - :param token_service_endpoint: the endpoint for the token service managing - this identity - :type token_service_endpoint: str - :param type: Required. the types of identities associated with this - resource; currently restricted to 'SystemAssigned and UserAssigned' - :type type: str - :param tenant_id: the identifier of the tenant containing the - application's identity. - :type tenant_id: str - :param principal_id: the object identifier of the Service Principal of the - identity associated with this resource. - :type principal_id: str - :param user_assigned_identities: represents user assigned identities map. - :type user_assigned_identities: dict[str, - ~azure.servicefabric.models.IdentityItemDescription] - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'token_service_endpoint': {'key': 'tokenServiceEndpoint', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{IdentityItemDescription}'}, - } - - def __init__(self, **kwargs): - super(IdentityDescription, self).__init__(**kwargs) - self.token_service_endpoint = kwargs.get('token_service_endpoint', None) - self.type = kwargs.get('type', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.principal_id = kwargs.get('principal_id', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) diff --git a/customSDK/servicefabric/models/identity_description_py3.py b/customSDK/servicefabric/models/identity_description_py3.py deleted file mode 100644 index 03e82573..00000000 --- a/customSDK/servicefabric/models/identity_description_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IdentityDescription(Model): - """Information describing the identities associated with this application. - - All required parameters must be populated in order to send to Azure. - - :param token_service_endpoint: the endpoint for the token service managing - this identity - :type token_service_endpoint: str - :param type: Required. the types of identities associated with this - resource; currently restricted to 'SystemAssigned and UserAssigned' - :type type: str - :param tenant_id: the identifier of the tenant containing the - application's identity. - :type tenant_id: str - :param principal_id: the object identifier of the Service Principal of the - identity associated with this resource. - :type principal_id: str - :param user_assigned_identities: represents user assigned identities map. - :type user_assigned_identities: dict[str, - ~azure.servicefabric.models.IdentityItemDescription] - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'token_service_endpoint': {'key': 'tokenServiceEndpoint', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{IdentityItemDescription}'}, - } - - def __init__(self, *, type: str, token_service_endpoint: str=None, tenant_id: str=None, principal_id: str=None, user_assigned_identities=None, **kwargs) -> None: - super(IdentityDescription, self).__init__(**kwargs) - self.token_service_endpoint = token_service_endpoint - self.type = type - self.tenant_id = tenant_id - self.principal_id = principal_id - self.user_assigned_identities = user_assigned_identities diff --git a/customSDK/servicefabric/models/identity_item_description.py b/customSDK/servicefabric/models/identity_item_description.py deleted file mode 100644 index 74a6013e..00000000 --- a/customSDK/servicefabric/models/identity_item_description.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IdentityItemDescription(Model): - """Describes a single user-assigned identity associated with the application. - - :param principal_id: the object identifier of the Service Principal which - this identity represents. - :type principal_id: str - :param client_id: the client identifier of the Service Principal which - this identity represents. - :type client_id: str - """ - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IdentityItemDescription, self).__init__(**kwargs) - self.principal_id = kwargs.get('principal_id', None) - self.client_id = kwargs.get('client_id', None) diff --git a/customSDK/servicefabric/models/identity_item_description_py3.py b/customSDK/servicefabric/models/identity_item_description_py3.py deleted file mode 100644 index b3cf669b..00000000 --- a/customSDK/servicefabric/models/identity_item_description_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IdentityItemDescription(Model): - """Describes a single user-assigned identity associated with the application. - - :param principal_id: the object identifier of the Service Principal which - this identity represents. - :type principal_id: str - :param client_id: the client identifier of the Service Principal which - this identity represents. - :type client_id: str - """ - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, *, principal_id: str=None, client_id: str=None, **kwargs) -> None: - super(IdentityItemDescription, self).__init__(**kwargs) - self.principal_id = principal_id - self.client_id = client_id diff --git a/customSDK/servicefabric/models/image_registry_credential.py b/customSDK/servicefabric/models/image_registry_credential.py deleted file mode 100644 index 80f114bf..00000000 --- a/customSDK/servicefabric/models/image_registry_credential.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageRegistryCredential(Model): - """Image registry credential. - - All required parameters must be populated in order to send to Azure. - - :param server: Required. Docker image registry server, without protocol - such as `http` and `https`. - :type server: str - :param username: Required. The username for the private registry. - :type username: str - :param password_type: The type of the image registry password being given - in password. Possible values include: 'ClearText', 'KeyVaultReference', - 'SecretValueReference'. Default value: "ClearText" . - :type password_type: str or - ~azure.servicefabric.models.ImageRegistryPasswordType - :param password: The password for the private registry. The password is - required for create or update operations, however it is not returned in - the get or list operations. Will be processed based on the type provided. - :type password: str - """ - - _validation = { - 'server': {'required': True}, - 'username': {'required': True}, - } - - _attribute_map = { - 'server': {'key': 'server', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password_type': {'key': 'passwordType', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageRegistryCredential, self).__init__(**kwargs) - self.server = kwargs.get('server', None) - self.username = kwargs.get('username', None) - self.password_type = kwargs.get('password_type', "ClearText") - self.password = kwargs.get('password', None) diff --git a/customSDK/servicefabric/models/image_registry_credential_py3.py b/customSDK/servicefabric/models/image_registry_credential_py3.py deleted file mode 100644 index 9bae3ed1..00000000 --- a/customSDK/servicefabric/models/image_registry_credential_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageRegistryCredential(Model): - """Image registry credential. - - All required parameters must be populated in order to send to Azure. - - :param server: Required. Docker image registry server, without protocol - such as `http` and `https`. - :type server: str - :param username: Required. The username for the private registry. - :type username: str - :param password_type: The type of the image registry password being given - in password. Possible values include: 'ClearText', 'KeyVaultReference', - 'SecretValueReference'. Default value: "ClearText" . - :type password_type: str or - ~azure.servicefabric.models.ImageRegistryPasswordType - :param password: The password for the private registry. The password is - required for create or update operations, however it is not returned in - the get or list operations. Will be processed based on the type provided. - :type password: str - """ - - _validation = { - 'server': {'required': True}, - 'username': {'required': True}, - } - - _attribute_map = { - 'server': {'key': 'server', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password_type': {'key': 'passwordType', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__(self, *, server: str, username: str, password_type="ClearText", password: str=None, **kwargs) -> None: - super(ImageRegistryCredential, self).__init__(**kwargs) - self.server = server - self.username = username - self.password_type = password_type - self.password = password diff --git a/customSDK/servicefabric/models/image_store_content.py b/customSDK/servicefabric/models/image_store_content.py deleted file mode 100644 index 936fb391..00000000 --- a/customSDK/servicefabric/models/image_store_content.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStoreContent(Model): - """Information about the image store content. - - :param store_files: The list of image store file info objects represents - files found under the given image store relative path. - :type store_files: list[~azure.servicefabric.models.FileInfo] - :param store_folders: The list of image store folder info objects - represents subfolders found under the given image store relative path. - :type store_folders: list[~azure.servicefabric.models.FolderInfo] - """ - - _attribute_map = { - 'store_files': {'key': 'StoreFiles', 'type': '[FileInfo]'}, - 'store_folders': {'key': 'StoreFolders', 'type': '[FolderInfo]'}, - } - - def __init__(self, **kwargs): - super(ImageStoreContent, self).__init__(**kwargs) - self.store_files = kwargs.get('store_files', None) - self.store_folders = kwargs.get('store_folders', None) diff --git a/customSDK/servicefabric/models/image_store_content_py3.py b/customSDK/servicefabric/models/image_store_content_py3.py deleted file mode 100644 index 053a35f5..00000000 --- a/customSDK/servicefabric/models/image_store_content_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStoreContent(Model): - """Information about the image store content. - - :param store_files: The list of image store file info objects represents - files found under the given image store relative path. - :type store_files: list[~azure.servicefabric.models.FileInfo] - :param store_folders: The list of image store folder info objects - represents subfolders found under the given image store relative path. - :type store_folders: list[~azure.servicefabric.models.FolderInfo] - """ - - _attribute_map = { - 'store_files': {'key': 'StoreFiles', 'type': '[FileInfo]'}, - 'store_folders': {'key': 'StoreFolders', 'type': '[FolderInfo]'}, - } - - def __init__(self, *, store_files=None, store_folders=None, **kwargs) -> None: - super(ImageStoreContent, self).__init__(**kwargs) - self.store_files = store_files - self.store_folders = store_folders diff --git a/customSDK/servicefabric/models/image_store_copy_description.py b/customSDK/servicefabric/models/image_store_copy_description.py deleted file mode 100644 index 267b0ca4..00000000 --- a/customSDK/servicefabric/models/image_store_copy_description.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStoreCopyDescription(Model): - """Information about how to copy image store content from one image store - relative path to another image store relative path. - - All required parameters must be populated in order to send to Azure. - - :param remote_source: Required. The relative path of source image store - content to be copied from. - :type remote_source: str - :param remote_destination: Required. The relative path of destination - image store content to be copied to. - :type remote_destination: str - :param skip_files: The list of the file names to be skipped for copying. - :type skip_files: list[str] - :param check_mark_file: Indicates whether to check mark file during - copying. The property is true if checking mark file is required, false - otherwise. The mark file is used to check whether the folder is well - constructed. If the property is true and mark file does not exist, the - copy is skipped. - :type check_mark_file: bool - """ - - _validation = { - 'remote_source': {'required': True}, - 'remote_destination': {'required': True}, - } - - _attribute_map = { - 'remote_source': {'key': 'RemoteSource', 'type': 'str'}, - 'remote_destination': {'key': 'RemoteDestination', 'type': 'str'}, - 'skip_files': {'key': 'SkipFiles', 'type': '[str]'}, - 'check_mark_file': {'key': 'CheckMarkFile', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ImageStoreCopyDescription, self).__init__(**kwargs) - self.remote_source = kwargs.get('remote_source', None) - self.remote_destination = kwargs.get('remote_destination', None) - self.skip_files = kwargs.get('skip_files', None) - self.check_mark_file = kwargs.get('check_mark_file', None) diff --git a/customSDK/servicefabric/models/image_store_copy_description_py3.py b/customSDK/servicefabric/models/image_store_copy_description_py3.py deleted file mode 100644 index 534e5c23..00000000 --- a/customSDK/servicefabric/models/image_store_copy_description_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStoreCopyDescription(Model): - """Information about how to copy image store content from one image store - relative path to another image store relative path. - - All required parameters must be populated in order to send to Azure. - - :param remote_source: Required. The relative path of source image store - content to be copied from. - :type remote_source: str - :param remote_destination: Required. The relative path of destination - image store content to be copied to. - :type remote_destination: str - :param skip_files: The list of the file names to be skipped for copying. - :type skip_files: list[str] - :param check_mark_file: Indicates whether to check mark file during - copying. The property is true if checking mark file is required, false - otherwise. The mark file is used to check whether the folder is well - constructed. If the property is true and mark file does not exist, the - copy is skipped. - :type check_mark_file: bool - """ - - _validation = { - 'remote_source': {'required': True}, - 'remote_destination': {'required': True}, - } - - _attribute_map = { - 'remote_source': {'key': 'RemoteSource', 'type': 'str'}, - 'remote_destination': {'key': 'RemoteDestination', 'type': 'str'}, - 'skip_files': {'key': 'SkipFiles', 'type': '[str]'}, - 'check_mark_file': {'key': 'CheckMarkFile', 'type': 'bool'}, - } - - def __init__(self, *, remote_source: str, remote_destination: str, skip_files=None, check_mark_file: bool=None, **kwargs) -> None: - super(ImageStoreCopyDescription, self).__init__(**kwargs) - self.remote_source = remote_source - self.remote_destination = remote_destination - self.skip_files = skip_files - self.check_mark_file = check_mark_file diff --git a/customSDK/servicefabric/models/image_store_info.py b/customSDK/servicefabric/models/image_store_info.py deleted file mode 100644 index 46ff04e9..00000000 --- a/customSDK/servicefabric/models/image_store_info.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStoreInfo(Model): - """Information about the ImageStore's resource usage. - - :param disk_info: disk capacity and available disk space on the node where - the ImageStore primary is placed. - :type disk_info: ~azure.servicefabric.models.DiskInfo - :param used_by_metadata: the ImageStore's file system usage for metadata. - :type used_by_metadata: ~azure.servicefabric.models.UsageInfo - :param used_by_staging: The ImageStore's file system usage for staging - files that are being uploaded. - :type used_by_staging: ~azure.servicefabric.models.UsageInfo - :param used_by_copy: the ImageStore's file system usage for copied - application and cluster packages. [Removing application and cluster - packages](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-deleteimagestorecontent) - will free up this space. - :type used_by_copy: ~azure.servicefabric.models.UsageInfo - :param used_by_register: the ImageStore's file system usage for registered - and cluster packages. [Unregistering - application](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) - and [cluster - packages](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) - will free up this space. - :type used_by_register: ~azure.servicefabric.models.UsageInfo - """ - - _attribute_map = { - 'disk_info': {'key': 'DiskInfo', 'type': 'DiskInfo'}, - 'used_by_metadata': {'key': 'UsedByMetadata', 'type': 'UsageInfo'}, - 'used_by_staging': {'key': 'UsedByStaging', 'type': 'UsageInfo'}, - 'used_by_copy': {'key': 'UsedByCopy', 'type': 'UsageInfo'}, - 'used_by_register': {'key': 'UsedByRegister', 'type': 'UsageInfo'}, - } - - def __init__(self, **kwargs): - super(ImageStoreInfo, self).__init__(**kwargs) - self.disk_info = kwargs.get('disk_info', None) - self.used_by_metadata = kwargs.get('used_by_metadata', None) - self.used_by_staging = kwargs.get('used_by_staging', None) - self.used_by_copy = kwargs.get('used_by_copy', None) - self.used_by_register = kwargs.get('used_by_register', None) diff --git a/customSDK/servicefabric/models/image_store_info_py3.py b/customSDK/servicefabric/models/image_store_info_py3.py deleted file mode 100644 index 8c2ab909..00000000 --- a/customSDK/servicefabric/models/image_store_info_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImageStoreInfo(Model): - """Information about the ImageStore's resource usage. - - :param disk_info: disk capacity and available disk space on the node where - the ImageStore primary is placed. - :type disk_info: ~azure.servicefabric.models.DiskInfo - :param used_by_metadata: the ImageStore's file system usage for metadata. - :type used_by_metadata: ~azure.servicefabric.models.UsageInfo - :param used_by_staging: The ImageStore's file system usage for staging - files that are being uploaded. - :type used_by_staging: ~azure.servicefabric.models.UsageInfo - :param used_by_copy: the ImageStore's file system usage for copied - application and cluster packages. [Removing application and cluster - packages](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-deleteimagestorecontent) - will free up this space. - :type used_by_copy: ~azure.servicefabric.models.UsageInfo - :param used_by_register: the ImageStore's file system usage for registered - and cluster packages. [Unregistering - application](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) - and [cluster - packages](https://docs.microsoft.com/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) - will free up this space. - :type used_by_register: ~azure.servicefabric.models.UsageInfo - """ - - _attribute_map = { - 'disk_info': {'key': 'DiskInfo', 'type': 'DiskInfo'}, - 'used_by_metadata': {'key': 'UsedByMetadata', 'type': 'UsageInfo'}, - 'used_by_staging': {'key': 'UsedByStaging', 'type': 'UsageInfo'}, - 'used_by_copy': {'key': 'UsedByCopy', 'type': 'UsageInfo'}, - 'used_by_register': {'key': 'UsedByRegister', 'type': 'UsageInfo'}, - } - - def __init__(self, *, disk_info=None, used_by_metadata=None, used_by_staging=None, used_by_copy=None, used_by_register=None, **kwargs) -> None: - super(ImageStoreInfo, self).__init__(**kwargs) - self.disk_info = disk_info - self.used_by_metadata = used_by_metadata - self.used_by_staging = used_by_staging - self.used_by_copy = used_by_copy - self.used_by_register = used_by_register diff --git a/customSDK/servicefabric/models/inlined_value_secret_resource_properties.py b/customSDK/servicefabric/models/inlined_value_secret_resource_properties.py deleted file mode 100644 index 03ec2fb6..00000000 --- a/customSDK/servicefabric/models/inlined_value_secret_resource_properties.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .secret_resource_properties import SecretResourceProperties - - -class InlinedValueSecretResourceProperties(SecretResourceProperties): - """Describes the properties of a secret resource whose value is provided - explicitly as plaintext. The secret resource may have multiple values, each - being uniquely versioned. The secret value of each version is stored - encrypted, and delivered as plaintext into the context of applications - referencing it. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param description: User readable description of the secret. - :type description: str - :ivar status: Status of the resource. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the secret. - :vartype status_details: str - :param content_type: The type of the content stored in the secret value. - The value of this property is opaque to Service Fabric. Once set, the - value of this property cannot be changed. - :type content_type: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InlinedValueSecretResourceProperties, self).__init__(**kwargs) - self.kind = 'inlinedValue' diff --git a/customSDK/servicefabric/models/inlined_value_secret_resource_properties_py3.py b/customSDK/servicefabric/models/inlined_value_secret_resource_properties_py3.py deleted file mode 100644 index ab7b7213..00000000 --- a/customSDK/servicefabric/models/inlined_value_secret_resource_properties_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .secret_resource_properties_py3 import SecretResourceProperties - - -class InlinedValueSecretResourceProperties(SecretResourceProperties): - """Describes the properties of a secret resource whose value is provided - explicitly as plaintext. The secret resource may have multiple values, each - being uniquely versioned. The secret value of each version is stored - encrypted, and delivered as plaintext into the context of applications - referencing it. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param description: User readable description of the secret. - :type description: str - :ivar status: Status of the resource. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the secret. - :vartype status_details: str - :param content_type: The type of the content stored in the secret value. - The value of this property is opaque to Service Fabric. Once set, the - value of this property cannot be changed. - :type content_type: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, content_type: str=None, **kwargs) -> None: - super(InlinedValueSecretResourceProperties, self).__init__(description=description, content_type=content_type, **kwargs) - self.kind = 'inlinedValue' diff --git a/customSDK/servicefabric/models/instance_lifecycle_description.py b/customSDK/servicefabric/models/instance_lifecycle_description.py deleted file mode 100644 index 8c4046fb..00000000 --- a/customSDK/servicefabric/models/instance_lifecycle_description.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceLifecycleDescription(Model): - """Describes how the instance will behave. - - :param restore_replica_location_after_upgrade: If set to true, move/swap - replica to original location after upgrade. - :type restore_replica_location_after_upgrade: bool - """ - - _attribute_map = { - 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(InstanceLifecycleDescription, self).__init__(**kwargs) - self.restore_replica_location_after_upgrade = kwargs.get('restore_replica_location_after_upgrade', None) diff --git a/customSDK/servicefabric/models/instance_lifecycle_description_py3.py b/customSDK/servicefabric/models/instance_lifecycle_description_py3.py deleted file mode 100644 index d90d1593..00000000 --- a/customSDK/servicefabric/models/instance_lifecycle_description_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InstanceLifecycleDescription(Model): - """Describes how the instance will behave. - - :param restore_replica_location_after_upgrade: If set to true, move/swap - replica to original location after upgrade. - :type restore_replica_location_after_upgrade: bool - """ - - _attribute_map = { - 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, - } - - def __init__(self, *, restore_replica_location_after_upgrade: bool=None, **kwargs) -> None: - super(InstanceLifecycleDescription, self).__init__(**kwargs) - self.restore_replica_location_after_upgrade = restore_replica_location_after_upgrade diff --git a/customSDK/servicefabric/models/int64_property_value.py b/customSDK/servicefabric/models/int64_property_value.py deleted file mode 100644 index 893521e4..00000000 --- a/customSDK/servicefabric/models/int64_property_value.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_value import PropertyValue - - -class Int64PropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Int64. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. The data of the property value. - :type data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Int64PropertyValue, self).__init__(**kwargs) - self.data = kwargs.get('data', None) - self.kind = 'Int64' diff --git a/customSDK/servicefabric/models/int64_property_value_py3.py b/customSDK/servicefabric/models/int64_property_value_py3.py deleted file mode 100644 index 98ec968d..00000000 --- a/customSDK/servicefabric/models/int64_property_value_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_value_py3 import PropertyValue - - -class Int64PropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Int64. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. The data of the property value. - :type data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__(self, *, data: str, **kwargs) -> None: - super(Int64PropertyValue, self).__init__(**kwargs) - self.data = data - self.kind = 'Int64' diff --git a/customSDK/servicefabric/models/int64_range_partition_information.py b/customSDK/servicefabric/models/int64_range_partition_information.py deleted file mode 100644 index d98fa216..00000000 --- a/customSDK/servicefabric/models/int64_range_partition_information.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_information import PartitionInformation - - -class Int64RangePartitionInformation(PartitionInformation): - """Describes the partition information for the integer range that is based on - partition schemes. - - All required parameters must be populated in order to send to Azure. - - :param id: An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. - The partition ID is unique and does not change for the lifetime of the - service. If the same service was deleted and recreated the IDs of its - partitions would be different. - :type id: str - :param service_partition_kind: Required. Constant filled by server. - :type service_partition_kind: str - :param low_key: Specifies the minimum key value handled by this partition. - :type low_key: str - :param high_key: Specifies the maximum key value handled by this - partition. - :type high_key: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Int64RangePartitionInformation, self).__init__(**kwargs) - self.low_key = kwargs.get('low_key', None) - self.high_key = kwargs.get('high_key', None) - self.service_partition_kind = 'Int64Range' diff --git a/customSDK/servicefabric/models/int64_range_partition_information_py3.py b/customSDK/servicefabric/models/int64_range_partition_information_py3.py deleted file mode 100644 index fe771569..00000000 --- a/customSDK/servicefabric/models/int64_range_partition_information_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_information_py3 import PartitionInformation - - -class Int64RangePartitionInformation(PartitionInformation): - """Describes the partition information for the integer range that is based on - partition schemes. - - All required parameters must be populated in order to send to Azure. - - :param id: An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. - The partition ID is unique and does not change for the lifetime of the - service. If the same service was deleted and recreated the IDs of its - partitions would be different. - :type id: str - :param service_partition_kind: Required. Constant filled by server. - :type service_partition_kind: str - :param low_key: Specifies the minimum key value handled by this partition. - :type low_key: str - :param high_key: Specifies the maximum key value handled by this - partition. - :type high_key: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, low_key: str=None, high_key: str=None, **kwargs) -> None: - super(Int64RangePartitionInformation, self).__init__(id=id, **kwargs) - self.low_key = low_key - self.high_key = high_key - self.service_partition_kind = 'Int64Range' diff --git a/customSDK/servicefabric/models/invoke_data_loss_result.py b/customSDK/servicefabric/models/invoke_data_loss_result.py deleted file mode 100644 index cf8d6174..00000000 --- a/customSDK/servicefabric/models/invoke_data_loss_result.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InvokeDataLossResult(Model): - """Represents information about an operation in a terminal state (Completed or - Faulted). - - :param error_code: If OperationState is Completed, this is 0. If - OperationState is Faulted, this is an error code indicating the reason. - :type error_code: int - :param selected_partition: This class returns information about the - partition that the user-induced operation acted upon. - :type selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__(self, **kwargs): - super(InvokeDataLossResult, self).__init__(**kwargs) - self.error_code = kwargs.get('error_code', None) - self.selected_partition = kwargs.get('selected_partition', None) diff --git a/customSDK/servicefabric/models/invoke_data_loss_result_py3.py b/customSDK/servicefabric/models/invoke_data_loss_result_py3.py deleted file mode 100644 index 6fc6fafe..00000000 --- a/customSDK/servicefabric/models/invoke_data_loss_result_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InvokeDataLossResult(Model): - """Represents information about an operation in a terminal state (Completed or - Faulted). - - :param error_code: If OperationState is Completed, this is 0. If - OperationState is Faulted, this is an error code indicating the reason. - :type error_code: int - :param selected_partition: This class returns information about the - partition that the user-induced operation acted upon. - :type selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__(self, *, error_code: int=None, selected_partition=None, **kwargs) -> None: - super(InvokeDataLossResult, self).__init__(**kwargs) - self.error_code = error_code - self.selected_partition = selected_partition diff --git a/customSDK/servicefabric/models/invoke_quorum_loss_result.py b/customSDK/servicefabric/models/invoke_quorum_loss_result.py deleted file mode 100644 index 9ec2042f..00000000 --- a/customSDK/servicefabric/models/invoke_quorum_loss_result.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InvokeQuorumLossResult(Model): - """Represents information about an operation in a terminal state (Completed or - Faulted). - - :param error_code: If OperationState is Completed, this is 0. If - OperationState is Faulted, this is an error code indicating the reason. - :type error_code: int - :param selected_partition: This class returns information about the - partition that the user-induced operation acted upon. - :type selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__(self, **kwargs): - super(InvokeQuorumLossResult, self).__init__(**kwargs) - self.error_code = kwargs.get('error_code', None) - self.selected_partition = kwargs.get('selected_partition', None) diff --git a/customSDK/servicefabric/models/invoke_quorum_loss_result_py3.py b/customSDK/servicefabric/models/invoke_quorum_loss_result_py3.py deleted file mode 100644 index ec6aa382..00000000 --- a/customSDK/servicefabric/models/invoke_quorum_loss_result_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class InvokeQuorumLossResult(Model): - """Represents information about an operation in a terminal state (Completed or - Faulted). - - :param error_code: If OperationState is Completed, this is 0. If - OperationState is Faulted, this is an error code indicating the reason. - :type error_code: int - :param selected_partition: This class returns information about the - partition that the user-induced operation acted upon. - :type selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__(self, *, error_code: int=None, selected_partition=None, **kwargs) -> None: - super(InvokeQuorumLossResult, self).__init__(**kwargs) - self.error_code = error_code - self.selected_partition = selected_partition diff --git a/customSDK/servicefabric/models/key_value_store_replica_status.py b/customSDK/servicefabric/models/key_value_store_replica_status.py deleted file mode 100644 index 2636b5ef..00000000 --- a/customSDK/servicefabric/models/key_value_store_replica_status.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_status_base import ReplicaStatusBase - - -class KeyValueStoreReplicaStatus(ReplicaStatusBase): - """Key value store related information for the replica. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param database_row_count_estimate: Value indicating the estimated number - of rows in the underlying database. - :type database_row_count_estimate: str - :param database_logical_size_estimate: Value indicating the estimated size - of the underlying database. - :type database_logical_size_estimate: str - :param copy_notification_current_key_filter: Value indicating the latest - key-prefix filter applied to enumeration during the callback. Null if - there is no pending callback. - :type copy_notification_current_key_filter: str - :param copy_notification_current_progress: Value indicating the latest - number of keys enumerated during the callback. 0 if there is no pending - callback. - :type copy_notification_current_progress: str - :param status_details: Value indicating the current status details of the - replica. - :type status_details: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'database_row_count_estimate': {'key': 'DatabaseRowCountEstimate', 'type': 'str'}, - 'database_logical_size_estimate': {'key': 'DatabaseLogicalSizeEstimate', 'type': 'str'}, - 'copy_notification_current_key_filter': {'key': 'CopyNotificationCurrentKeyFilter', 'type': 'str'}, - 'copy_notification_current_progress': {'key': 'CopyNotificationCurrentProgress', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(KeyValueStoreReplicaStatus, self).__init__(**kwargs) - self.database_row_count_estimate = kwargs.get('database_row_count_estimate', None) - self.database_logical_size_estimate = kwargs.get('database_logical_size_estimate', None) - self.copy_notification_current_key_filter = kwargs.get('copy_notification_current_key_filter', None) - self.copy_notification_current_progress = kwargs.get('copy_notification_current_progress', None) - self.status_details = kwargs.get('status_details', None) - self.kind = 'KeyValueStore' diff --git a/customSDK/servicefabric/models/key_value_store_replica_status_py3.py b/customSDK/servicefabric/models/key_value_store_replica_status_py3.py deleted file mode 100644 index 14fb37c0..00000000 --- a/customSDK/servicefabric/models/key_value_store_replica_status_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_status_base_py3 import ReplicaStatusBase - - -class KeyValueStoreReplicaStatus(ReplicaStatusBase): - """Key value store related information for the replica. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param database_row_count_estimate: Value indicating the estimated number - of rows in the underlying database. - :type database_row_count_estimate: str - :param database_logical_size_estimate: Value indicating the estimated size - of the underlying database. - :type database_logical_size_estimate: str - :param copy_notification_current_key_filter: Value indicating the latest - key-prefix filter applied to enumeration during the callback. Null if - there is no pending callback. - :type copy_notification_current_key_filter: str - :param copy_notification_current_progress: Value indicating the latest - number of keys enumerated during the callback. 0 if there is no pending - callback. - :type copy_notification_current_progress: str - :param status_details: Value indicating the current status details of the - replica. - :type status_details: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'database_row_count_estimate': {'key': 'DatabaseRowCountEstimate', 'type': 'str'}, - 'database_logical_size_estimate': {'key': 'DatabaseLogicalSizeEstimate', 'type': 'str'}, - 'copy_notification_current_key_filter': {'key': 'CopyNotificationCurrentKeyFilter', 'type': 'str'}, - 'copy_notification_current_progress': {'key': 'CopyNotificationCurrentProgress', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - } - - def __init__(self, *, database_row_count_estimate: str=None, database_logical_size_estimate: str=None, copy_notification_current_key_filter: str=None, copy_notification_current_progress: str=None, status_details: str=None, **kwargs) -> None: - super(KeyValueStoreReplicaStatus, self).__init__(**kwargs) - self.database_row_count_estimate = database_row_count_estimate - self.database_logical_size_estimate = database_logical_size_estimate - self.copy_notification_current_key_filter = copy_notification_current_key_filter - self.copy_notification_current_progress = copy_notification_current_progress - self.status_details = status_details - self.kind = 'KeyValueStore' diff --git a/customSDK/servicefabric/models/load_metric_information.py b/customSDK/servicefabric/models/load_metric_information.py deleted file mode 100644 index 7c8128d8..00000000 --- a/customSDK/servicefabric/models/load_metric_information.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LoadMetricInformation(Model): - """Represents data structure that contains load information for a certain - metric in a cluster. - - :param name: Name of the metric for which this load information is - provided. - :type name: str - :param is_balanced_before: Value that indicates whether the metrics is - balanced or not before resource balancer run - :type is_balanced_before: bool - :param is_balanced_after: Value that indicates whether the metrics is - balanced or not after resource balancer run. - :type is_balanced_after: bool - :param deviation_before: The standard average deviation of the metrics - before resource balancer run. - :type deviation_before: str - :param deviation_after: The standard average deviation of the metrics - after resource balancer run. - :type deviation_after: str - :param balancing_threshold: The balancing threshold for a certain metric. - :type balancing_threshold: str - :param action: The current action being taken with regard to this metric - :type action: str - :param activity_threshold: The Activity Threshold specified for this - metric in the system Cluster Manifest. - :type activity_threshold: str - :param cluster_capacity: The total cluster capacity for a given metric - :type cluster_capacity: str - :param cluster_load: The total cluster load. In future releases of Service - Fabric this parameter will be deprecated in favor of CurrentClusterLoad. - :type cluster_load: str - :param current_cluster_load: The total cluster load. - :type current_cluster_load: str - :param cluster_remaining_capacity: The remaining capacity for the metric - in the cluster. In future releases of Service Fabric this parameter will - be deprecated in favor of ClusterCapacityRemaining. - :type cluster_remaining_capacity: str - :param cluster_capacity_remaining: The remaining capacity for the metric - in the cluster. - :type cluster_capacity_remaining: str - :param is_cluster_capacity_violation: Indicates that the metric is - currently over capacity in the cluster. - :type is_cluster_capacity_violation: bool - :param node_buffer_percentage: The reserved percentage of total node - capacity for this metric. - :type node_buffer_percentage: str - :param cluster_buffered_capacity: Remaining capacity in the cluster - excluding the reserved space. In future releases of Service Fabric this - parameter will be deprecated in favor of BufferedClusterCapacityRemaining. - :type cluster_buffered_capacity: str - :param buffered_cluster_capacity_remaining: Remaining capacity in the - cluster excluding the reserved space. - :type buffered_cluster_capacity_remaining: str - :param cluster_remaining_buffered_capacity: The remaining percentage of - cluster total capacity for this metric. - :type cluster_remaining_buffered_capacity: str - :param min_node_load_value: The minimum load on any node for this metric. - In future releases of Service Fabric this parameter will be deprecated in - favor of MinimumNodeLoad. - :type min_node_load_value: str - :param minimum_node_load: The minimum load on any node for this metric. - :type minimum_node_load: str - :param min_node_load_node_id: The node id of the node with the minimum - load for this metric. - :type min_node_load_node_id: ~azure.servicefabric.models.NodeId - :param max_node_load_value: The maximum load on any node for this metric. - In future releases of Service Fabric this parameter will be deprecated in - favor of MaximumNodeLoad. - :type max_node_load_value: str - :param maximum_node_load: The maximum load on any node for this metric. - :type maximum_node_load: str - :param max_node_load_node_id: The node id of the node with the maximum - load for this metric. - :type max_node_load_node_id: ~azure.servicefabric.models.NodeId - :param planned_load_removal: This value represents the load of the - replicas that are planned to be removed in the future within the cluster. - This kind of load is reported for replicas that are currently being moving - to other nodes and for replicas that are currently being dropped but still - use the load on the source node. - :type planned_load_removal: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'is_balanced_before': {'key': 'IsBalancedBefore', 'type': 'bool'}, - 'is_balanced_after': {'key': 'IsBalancedAfter', 'type': 'bool'}, - 'deviation_before': {'key': 'DeviationBefore', 'type': 'str'}, - 'deviation_after': {'key': 'DeviationAfter', 'type': 'str'}, - 'balancing_threshold': {'key': 'BalancingThreshold', 'type': 'str'}, - 'action': {'key': 'Action', 'type': 'str'}, - 'activity_threshold': {'key': 'ActivityThreshold', 'type': 'str'}, - 'cluster_capacity': {'key': 'ClusterCapacity', 'type': 'str'}, - 'cluster_load': {'key': 'ClusterLoad', 'type': 'str'}, - 'current_cluster_load': {'key': 'CurrentClusterLoad', 'type': 'str'}, - 'cluster_remaining_capacity': {'key': 'ClusterRemainingCapacity', 'type': 'str'}, - 'cluster_capacity_remaining': {'key': 'ClusterCapacityRemaining', 'type': 'str'}, - 'is_cluster_capacity_violation': {'key': 'IsClusterCapacityViolation', 'type': 'bool'}, - 'node_buffer_percentage': {'key': 'NodeBufferPercentage', 'type': 'str'}, - 'cluster_buffered_capacity': {'key': 'ClusterBufferedCapacity', 'type': 'str'}, - 'buffered_cluster_capacity_remaining': {'key': 'BufferedClusterCapacityRemaining', 'type': 'str'}, - 'cluster_remaining_buffered_capacity': {'key': 'ClusterRemainingBufferedCapacity', 'type': 'str'}, - 'min_node_load_value': {'key': 'MinNodeLoadValue', 'type': 'str'}, - 'minimum_node_load': {'key': 'MinimumNodeLoad', 'type': 'str'}, - 'min_node_load_node_id': {'key': 'MinNodeLoadNodeId', 'type': 'NodeId'}, - 'max_node_load_value': {'key': 'MaxNodeLoadValue', 'type': 'str'}, - 'maximum_node_load': {'key': 'MaximumNodeLoad', 'type': 'str'}, - 'max_node_load_node_id': {'key': 'MaxNodeLoadNodeId', 'type': 'NodeId'}, - 'planned_load_removal': {'key': 'PlannedLoadRemoval', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LoadMetricInformation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.is_balanced_before = kwargs.get('is_balanced_before', None) - self.is_balanced_after = kwargs.get('is_balanced_after', None) - self.deviation_before = kwargs.get('deviation_before', None) - self.deviation_after = kwargs.get('deviation_after', None) - self.balancing_threshold = kwargs.get('balancing_threshold', None) - self.action = kwargs.get('action', None) - self.activity_threshold = kwargs.get('activity_threshold', None) - self.cluster_capacity = kwargs.get('cluster_capacity', None) - self.cluster_load = kwargs.get('cluster_load', None) - self.current_cluster_load = kwargs.get('current_cluster_load', None) - self.cluster_remaining_capacity = kwargs.get('cluster_remaining_capacity', None) - self.cluster_capacity_remaining = kwargs.get('cluster_capacity_remaining', None) - self.is_cluster_capacity_violation = kwargs.get('is_cluster_capacity_violation', None) - self.node_buffer_percentage = kwargs.get('node_buffer_percentage', None) - self.cluster_buffered_capacity = kwargs.get('cluster_buffered_capacity', None) - self.buffered_cluster_capacity_remaining = kwargs.get('buffered_cluster_capacity_remaining', None) - self.cluster_remaining_buffered_capacity = kwargs.get('cluster_remaining_buffered_capacity', None) - self.min_node_load_value = kwargs.get('min_node_load_value', None) - self.minimum_node_load = kwargs.get('minimum_node_load', None) - self.min_node_load_node_id = kwargs.get('min_node_load_node_id', None) - self.max_node_load_value = kwargs.get('max_node_load_value', None) - self.maximum_node_load = kwargs.get('maximum_node_load', None) - self.max_node_load_node_id = kwargs.get('max_node_load_node_id', None) - self.planned_load_removal = kwargs.get('planned_load_removal', None) diff --git a/customSDK/servicefabric/models/load_metric_information_py3.py b/customSDK/servicefabric/models/load_metric_information_py3.py deleted file mode 100644 index 93597eff..00000000 --- a/customSDK/servicefabric/models/load_metric_information_py3.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LoadMetricInformation(Model): - """Represents data structure that contains load information for a certain - metric in a cluster. - - :param name: Name of the metric for which this load information is - provided. - :type name: str - :param is_balanced_before: Value that indicates whether the metrics is - balanced or not before resource balancer run - :type is_balanced_before: bool - :param is_balanced_after: Value that indicates whether the metrics is - balanced or not after resource balancer run. - :type is_balanced_after: bool - :param deviation_before: The standard average deviation of the metrics - before resource balancer run. - :type deviation_before: str - :param deviation_after: The standard average deviation of the metrics - after resource balancer run. - :type deviation_after: str - :param balancing_threshold: The balancing threshold for a certain metric. - :type balancing_threshold: str - :param action: The current action being taken with regard to this metric - :type action: str - :param activity_threshold: The Activity Threshold specified for this - metric in the system Cluster Manifest. - :type activity_threshold: str - :param cluster_capacity: The total cluster capacity for a given metric - :type cluster_capacity: str - :param cluster_load: The total cluster load. In future releases of Service - Fabric this parameter will be deprecated in favor of CurrentClusterLoad. - :type cluster_load: str - :param current_cluster_load: The total cluster load. - :type current_cluster_load: str - :param cluster_remaining_capacity: The remaining capacity for the metric - in the cluster. In future releases of Service Fabric this parameter will - be deprecated in favor of ClusterCapacityRemaining. - :type cluster_remaining_capacity: str - :param cluster_capacity_remaining: The remaining capacity for the metric - in the cluster. - :type cluster_capacity_remaining: str - :param is_cluster_capacity_violation: Indicates that the metric is - currently over capacity in the cluster. - :type is_cluster_capacity_violation: bool - :param node_buffer_percentage: The reserved percentage of total node - capacity for this metric. - :type node_buffer_percentage: str - :param cluster_buffered_capacity: Remaining capacity in the cluster - excluding the reserved space. In future releases of Service Fabric this - parameter will be deprecated in favor of BufferedClusterCapacityRemaining. - :type cluster_buffered_capacity: str - :param buffered_cluster_capacity_remaining: Remaining capacity in the - cluster excluding the reserved space. - :type buffered_cluster_capacity_remaining: str - :param cluster_remaining_buffered_capacity: The remaining percentage of - cluster total capacity for this metric. - :type cluster_remaining_buffered_capacity: str - :param min_node_load_value: The minimum load on any node for this metric. - In future releases of Service Fabric this parameter will be deprecated in - favor of MinimumNodeLoad. - :type min_node_load_value: str - :param minimum_node_load: The minimum load on any node for this metric. - :type minimum_node_load: str - :param min_node_load_node_id: The node id of the node with the minimum - load for this metric. - :type min_node_load_node_id: ~azure.servicefabric.models.NodeId - :param max_node_load_value: The maximum load on any node for this metric. - In future releases of Service Fabric this parameter will be deprecated in - favor of MaximumNodeLoad. - :type max_node_load_value: str - :param maximum_node_load: The maximum load on any node for this metric. - :type maximum_node_load: str - :param max_node_load_node_id: The node id of the node with the maximum - load for this metric. - :type max_node_load_node_id: ~azure.servicefabric.models.NodeId - :param planned_load_removal: This value represents the load of the - replicas that are planned to be removed in the future within the cluster. - This kind of load is reported for replicas that are currently being moving - to other nodes and for replicas that are currently being dropped but still - use the load on the source node. - :type planned_load_removal: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'is_balanced_before': {'key': 'IsBalancedBefore', 'type': 'bool'}, - 'is_balanced_after': {'key': 'IsBalancedAfter', 'type': 'bool'}, - 'deviation_before': {'key': 'DeviationBefore', 'type': 'str'}, - 'deviation_after': {'key': 'DeviationAfter', 'type': 'str'}, - 'balancing_threshold': {'key': 'BalancingThreshold', 'type': 'str'}, - 'action': {'key': 'Action', 'type': 'str'}, - 'activity_threshold': {'key': 'ActivityThreshold', 'type': 'str'}, - 'cluster_capacity': {'key': 'ClusterCapacity', 'type': 'str'}, - 'cluster_load': {'key': 'ClusterLoad', 'type': 'str'}, - 'current_cluster_load': {'key': 'CurrentClusterLoad', 'type': 'str'}, - 'cluster_remaining_capacity': {'key': 'ClusterRemainingCapacity', 'type': 'str'}, - 'cluster_capacity_remaining': {'key': 'ClusterCapacityRemaining', 'type': 'str'}, - 'is_cluster_capacity_violation': {'key': 'IsClusterCapacityViolation', 'type': 'bool'}, - 'node_buffer_percentage': {'key': 'NodeBufferPercentage', 'type': 'str'}, - 'cluster_buffered_capacity': {'key': 'ClusterBufferedCapacity', 'type': 'str'}, - 'buffered_cluster_capacity_remaining': {'key': 'BufferedClusterCapacityRemaining', 'type': 'str'}, - 'cluster_remaining_buffered_capacity': {'key': 'ClusterRemainingBufferedCapacity', 'type': 'str'}, - 'min_node_load_value': {'key': 'MinNodeLoadValue', 'type': 'str'}, - 'minimum_node_load': {'key': 'MinimumNodeLoad', 'type': 'str'}, - 'min_node_load_node_id': {'key': 'MinNodeLoadNodeId', 'type': 'NodeId'}, - 'max_node_load_value': {'key': 'MaxNodeLoadValue', 'type': 'str'}, - 'maximum_node_load': {'key': 'MaximumNodeLoad', 'type': 'str'}, - 'max_node_load_node_id': {'key': 'MaxNodeLoadNodeId', 'type': 'NodeId'}, - 'planned_load_removal': {'key': 'PlannedLoadRemoval', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, is_balanced_before: bool=None, is_balanced_after: bool=None, deviation_before: str=None, deviation_after: str=None, balancing_threshold: str=None, action: str=None, activity_threshold: str=None, cluster_capacity: str=None, cluster_load: str=None, current_cluster_load: str=None, cluster_remaining_capacity: str=None, cluster_capacity_remaining: str=None, is_cluster_capacity_violation: bool=None, node_buffer_percentage: str=None, cluster_buffered_capacity: str=None, buffered_cluster_capacity_remaining: str=None, cluster_remaining_buffered_capacity: str=None, min_node_load_value: str=None, minimum_node_load: str=None, min_node_load_node_id=None, max_node_load_value: str=None, maximum_node_load: str=None, max_node_load_node_id=None, planned_load_removal: str=None, **kwargs) -> None: - super(LoadMetricInformation, self).__init__(**kwargs) - self.name = name - self.is_balanced_before = is_balanced_before - self.is_balanced_after = is_balanced_after - self.deviation_before = deviation_before - self.deviation_after = deviation_after - self.balancing_threshold = balancing_threshold - self.action = action - self.activity_threshold = activity_threshold - self.cluster_capacity = cluster_capacity - self.cluster_load = cluster_load - self.current_cluster_load = current_cluster_load - self.cluster_remaining_capacity = cluster_remaining_capacity - self.cluster_capacity_remaining = cluster_capacity_remaining - self.is_cluster_capacity_violation = is_cluster_capacity_violation - self.node_buffer_percentage = node_buffer_percentage - self.cluster_buffered_capacity = cluster_buffered_capacity - self.buffered_cluster_capacity_remaining = buffered_cluster_capacity_remaining - self.cluster_remaining_buffered_capacity = cluster_remaining_buffered_capacity - self.min_node_load_value = min_node_load_value - self.minimum_node_load = minimum_node_load - self.min_node_load_node_id = min_node_load_node_id - self.max_node_load_value = max_node_load_value - self.maximum_node_load = maximum_node_load - self.max_node_load_node_id = max_node_load_node_id - self.planned_load_removal = planned_load_removal diff --git a/customSDK/servicefabric/models/load_metric_report.py b/customSDK/servicefabric/models/load_metric_report.py deleted file mode 100644 index 2e7e321c..00000000 --- a/customSDK/servicefabric/models/load_metric_report.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LoadMetricReport(Model): - """Represents the load metric report which contains the time metric was - reported, its name and value. - - :param last_reported_utc: Gets the UTC time when the load was reported. - :type last_reported_utc: datetime - :param name: The name of the load metric. - :type name: str - :param value: The value of the load metric. In future releases of Service - Fabric this parameter will be deprecated in favor of CurrentValue. - :type value: str - :param current_value: The value of the load metric. - :type current_value: str - """ - - _attribute_map = { - 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - 'current_value': {'key': 'CurrentValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LoadMetricReport, self).__init__(**kwargs) - self.last_reported_utc = kwargs.get('last_reported_utc', None) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - self.current_value = kwargs.get('current_value', None) diff --git a/customSDK/servicefabric/models/load_metric_report_info.py b/customSDK/servicefabric/models/load_metric_report_info.py deleted file mode 100644 index 93fd4a45..00000000 --- a/customSDK/servicefabric/models/load_metric_report_info.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LoadMetricReportInfo(Model): - """Information about load reported by replica. - - :param name: The name of the metric. - :type name: str - :param value: The value of the load for the metric. In future releases of - Service Fabric this parameter will be deprecated in favor of CurrentValue. - :type value: int - :param current_value: The double value of the load for the metric. - :type current_value: str - :param last_reported_utc: The UTC time when the load is reported. - :type last_reported_utc: datetime - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - 'current_value': {'key': 'CurrentValue', 'type': 'str'}, - 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(LoadMetricReportInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - self.current_value = kwargs.get('current_value', None) - self.last_reported_utc = kwargs.get('last_reported_utc', None) diff --git a/customSDK/servicefabric/models/load_metric_report_info_py3.py b/customSDK/servicefabric/models/load_metric_report_info_py3.py deleted file mode 100644 index 24013929..00000000 --- a/customSDK/servicefabric/models/load_metric_report_info_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LoadMetricReportInfo(Model): - """Information about load reported by replica. - - :param name: The name of the metric. - :type name: str - :param value: The value of the load for the metric. In future releases of - Service Fabric this parameter will be deprecated in favor of CurrentValue. - :type value: int - :param current_value: The double value of the load for the metric. - :type current_value: str - :param last_reported_utc: The UTC time when the load is reported. - :type last_reported_utc: datetime - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - 'current_value': {'key': 'CurrentValue', 'type': 'str'}, - 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, - } - - def __init__(self, *, name: str=None, value: int=None, current_value: str=None, last_reported_utc=None, **kwargs) -> None: - super(LoadMetricReportInfo, self).__init__(**kwargs) - self.name = name - self.value = value - self.current_value = current_value - self.last_reported_utc = last_reported_utc diff --git a/customSDK/servicefabric/models/load_metric_report_py3.py b/customSDK/servicefabric/models/load_metric_report_py3.py deleted file mode 100644 index e8aec5b5..00000000 --- a/customSDK/servicefabric/models/load_metric_report_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LoadMetricReport(Model): - """Represents the load metric report which contains the time metric was - reported, its name and value. - - :param last_reported_utc: Gets the UTC time when the load was reported. - :type last_reported_utc: datetime - :param name: The name of the load metric. - :type name: str - :param value: The value of the load metric. In future releases of Service - Fabric this parameter will be deprecated in favor of CurrentValue. - :type value: str - :param current_value: The value of the load metric. - :type current_value: str - """ - - _attribute_map = { - 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - 'current_value': {'key': 'CurrentValue', 'type': 'str'}, - } - - def __init__(self, *, last_reported_utc=None, name: str=None, value: str=None, current_value: str=None, **kwargs) -> None: - super(LoadMetricReport, self).__init__(**kwargs) - self.last_reported_utc = last_reported_utc - self.name = name - self.value = value - self.current_value = current_value diff --git a/customSDK/servicefabric/models/loaded_partition_information_query_description.py b/customSDK/servicefabric/models/loaded_partition_information_query_description.py deleted file mode 100644 index 986c87e3..00000000 --- a/customSDK/servicefabric/models/loaded_partition_information_query_description.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LoadedPartitionInformationQueryDescription(Model): - """Represents data structure that contains query information. - - :param metric_name: Name of the metric for which this information is - provided. - :type metric_name: str - :param service_name: Name of the service this partition belongs to. - :type service_name: str - :param ordering: Ordering of partitions' load. Possible values include: - 'Desc', 'Asc'. Default value: "Desc" . - :type ordering: str or ~azure.servicefabric.models.Ordering - :param max_results: The maximum number of results to be returned as part - of the paged queries. This parameter defines the upper bound on the number - of results returned. The results returned can be less than the specified - maximum results if they do not fit in the message as per the max message - size restrictions defined in the configuration. If this parameter is zero - or not specified, the paged query includes as many results as possible - that fit in the return message. - :type max_results: long - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - """ - - _attribute_map = { - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'ordering': {'key': 'Ordering', 'type': 'str'}, - 'max_results': {'key': 'MaxResults', 'type': 'long'}, - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LoadedPartitionInformationQueryDescription, self).__init__(**kwargs) - self.metric_name = kwargs.get('metric_name', None) - self.service_name = kwargs.get('service_name', None) - self.ordering = kwargs.get('ordering', "Desc") - self.max_results = kwargs.get('max_results', None) - self.continuation_token = kwargs.get('continuation_token', None) diff --git a/customSDK/servicefabric/models/loaded_partition_information_query_description_py3.py b/customSDK/servicefabric/models/loaded_partition_information_query_description_py3.py deleted file mode 100644 index 644d21e7..00000000 --- a/customSDK/servicefabric/models/loaded_partition_information_query_description_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LoadedPartitionInformationQueryDescription(Model): - """Represents data structure that contains query information. - - :param metric_name: Name of the metric for which this information is - provided. - :type metric_name: str - :param service_name: Name of the service this partition belongs to. - :type service_name: str - :param ordering: Ordering of partitions' load. Possible values include: - 'Desc', 'Asc'. Default value: "Desc" . - :type ordering: str or ~azure.servicefabric.models.Ordering - :param max_results: The maximum number of results to be returned as part - of the paged queries. This parameter defines the upper bound on the number - of results returned. The results returned can be less than the specified - maximum results if they do not fit in the message as per the max message - size restrictions defined in the configuration. If this parameter is zero - or not specified, the paged query includes as many results as possible - that fit in the return message. - :type max_results: long - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - """ - - _attribute_map = { - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'ordering': {'key': 'Ordering', 'type': 'str'}, - 'max_results': {'key': 'MaxResults', 'type': 'long'}, - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - } - - def __init__(self, *, metric_name: str=None, service_name: str=None, ordering="Desc", max_results: int=None, continuation_token: str=None, **kwargs) -> None: - super(LoadedPartitionInformationQueryDescription, self).__init__(**kwargs) - self.metric_name = metric_name - self.service_name = service_name - self.ordering = ordering - self.max_results = max_results - self.continuation_token = continuation_token diff --git a/customSDK/servicefabric/models/loaded_partition_information_result.py b/customSDK/servicefabric/models/loaded_partition_information_result.py deleted file mode 100644 index 8a760893..00000000 --- a/customSDK/servicefabric/models/loaded_partition_information_result.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LoadedPartitionInformationResult(Model): - """Represents partition information. - - All required parameters must be populated in order to send to Azure. - - :param service_name: Required. Name of the service this partition belongs - to. - :type service_name: str - :param partition_id: Required. Id of the partition. - :type partition_id: str - :param metric_name: Required. Name of the metric for which this - information is provided. - :type metric_name: str - :param load: Required. Load for metric. - :type load: long - """ - - _validation = { - 'service_name': {'required': True}, - 'partition_id': {'required': True}, - 'metric_name': {'required': True}, - 'load': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'load': {'key': 'Load', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(LoadedPartitionInformationResult, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.metric_name = kwargs.get('metric_name', None) - self.load = kwargs.get('load', None) diff --git a/customSDK/servicefabric/models/loaded_partition_information_result_list.py b/customSDK/servicefabric/models/loaded_partition_information_result_list.py deleted file mode 100644 index 319bdca1..00000000 --- a/customSDK/servicefabric/models/loaded_partition_information_result_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LoadedPartitionInformationResultList(Model): - """Represents data structure that contains top/least loaded partitions for a - certain metric. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of application information. - :type items: - list[~azure.servicefabric.models.LoadedPartitionInformationResult] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[LoadedPartitionInformationResult]'}, - } - - def __init__(self, **kwargs): - super(LoadedPartitionInformationResultList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/loaded_partition_information_result_list_py3.py b/customSDK/servicefabric/models/loaded_partition_information_result_list_py3.py deleted file mode 100644 index e10367a9..00000000 --- a/customSDK/servicefabric/models/loaded_partition_information_result_list_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LoadedPartitionInformationResultList(Model): - """Represents data structure that contains top/least loaded partitions for a - certain metric. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of application information. - :type items: - list[~azure.servicefabric.models.LoadedPartitionInformationResult] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[LoadedPartitionInformationResult]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(LoadedPartitionInformationResultList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/loaded_partition_information_result_py3.py b/customSDK/servicefabric/models/loaded_partition_information_result_py3.py deleted file mode 100644 index 9af2dee2..00000000 --- a/customSDK/servicefabric/models/loaded_partition_information_result_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class LoadedPartitionInformationResult(Model): - """Represents partition information. - - All required parameters must be populated in order to send to Azure. - - :param service_name: Required. Name of the service this partition belongs - to. - :type service_name: str - :param partition_id: Required. Id of the partition. - :type partition_id: str - :param metric_name: Required. Name of the metric for which this - information is provided. - :type metric_name: str - :param load: Required. Load for metric. - :type load: long - """ - - _validation = { - 'service_name': {'required': True}, - 'partition_id': {'required': True}, - 'metric_name': {'required': True}, - 'load': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'load': {'key': 'Load', 'type': 'long'}, - } - - def __init__(self, *, service_name: str, partition_id: str, metric_name: str, load: int, **kwargs) -> None: - super(LoadedPartitionInformationResult, self).__init__(**kwargs) - self.service_name = service_name - self.partition_id = partition_id - self.metric_name = metric_name - self.load = load diff --git a/customSDK/servicefabric/models/local_network_resource_properties.py b/customSDK/servicefabric/models/local_network_resource_properties.py deleted file mode 100644 index 98eddf5d..00000000 --- a/customSDK/servicefabric/models/local_network_resource_properties.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .network_resource_properties import NetworkResourceProperties - - -class LocalNetworkResourceProperties(NetworkResourceProperties): - """Information about a Service Fabric container network local to a single - Service Fabric cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param description: User readable description of the network. - :type description: str - :ivar status: Status of the network. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the network. - :vartype status_details: str - :param network_address_prefix: Address space for the local container - network. - :type network_address_prefix: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'network_address_prefix': {'key': 'networkAddressPrefix', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LocalNetworkResourceProperties, self).__init__(**kwargs) - self.network_address_prefix = kwargs.get('network_address_prefix', None) - self.kind = 'Local' diff --git a/customSDK/servicefabric/models/local_network_resource_properties_py3.py b/customSDK/servicefabric/models/local_network_resource_properties_py3.py deleted file mode 100644 index 6578e59b..00000000 --- a/customSDK/servicefabric/models/local_network_resource_properties_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .network_resource_properties_py3 import NetworkResourceProperties - - -class LocalNetworkResourceProperties(NetworkResourceProperties): - """Information about a Service Fabric container network local to a single - Service Fabric cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param description: User readable description of the network. - :type description: str - :ivar status: Status of the network. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the network. - :vartype status_details: str - :param network_address_prefix: Address space for the local container - network. - :type network_address_prefix: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'network_address_prefix': {'key': 'networkAddressPrefix', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, network_address_prefix: str=None, **kwargs) -> None: - super(LocalNetworkResourceProperties, self).__init__(description=description, **kwargs) - self.network_address_prefix = network_address_prefix - self.kind = 'Local' diff --git a/customSDK/servicefabric/models/managed_application_identity.py b/customSDK/servicefabric/models/managed_application_identity.py deleted file mode 100644 index 6db30421..00000000 --- a/customSDK/servicefabric/models/managed_application_identity.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedApplicationIdentity(Model): - """Describes a managed application identity. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the identity. - :type name: str - :param principal_id: The identity's PrincipalId. - :type principal_id: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'principal_id': {'key': 'PrincipalId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedApplicationIdentity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.principal_id = kwargs.get('principal_id', None) diff --git a/customSDK/servicefabric/models/managed_application_identity_description.py b/customSDK/servicefabric/models/managed_application_identity_description.py deleted file mode 100644 index f5137dcb..00000000 --- a/customSDK/servicefabric/models/managed_application_identity_description.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedApplicationIdentityDescription(Model): - """Managed application identity description. - - :param token_service_endpoint: Token service endpoint. - :type token_service_endpoint: str - :param managed_identities: A list of managed application identity objects. - :type managed_identities: - list[~azure.servicefabric.models.ManagedApplicationIdentity] - """ - - _attribute_map = { - 'token_service_endpoint': {'key': 'TokenServiceEndpoint', 'type': 'str'}, - 'managed_identities': {'key': 'ManagedIdentities', 'type': '[ManagedApplicationIdentity]'}, - } - - def __init__(self, **kwargs): - super(ManagedApplicationIdentityDescription, self).__init__(**kwargs) - self.token_service_endpoint = kwargs.get('token_service_endpoint', None) - self.managed_identities = kwargs.get('managed_identities', None) diff --git a/customSDK/servicefabric/models/managed_application_identity_description_py3.py b/customSDK/servicefabric/models/managed_application_identity_description_py3.py deleted file mode 100644 index c8a173d1..00000000 --- a/customSDK/servicefabric/models/managed_application_identity_description_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedApplicationIdentityDescription(Model): - """Managed application identity description. - - :param token_service_endpoint: Token service endpoint. - :type token_service_endpoint: str - :param managed_identities: A list of managed application identity objects. - :type managed_identities: - list[~azure.servicefabric.models.ManagedApplicationIdentity] - """ - - _attribute_map = { - 'token_service_endpoint': {'key': 'TokenServiceEndpoint', 'type': 'str'}, - 'managed_identities': {'key': 'ManagedIdentities', 'type': '[ManagedApplicationIdentity]'}, - } - - def __init__(self, *, token_service_endpoint: str=None, managed_identities=None, **kwargs) -> None: - super(ManagedApplicationIdentityDescription, self).__init__(**kwargs) - self.token_service_endpoint = token_service_endpoint - self.managed_identities = managed_identities diff --git a/customSDK/servicefabric/models/managed_application_identity_py3.py b/customSDK/servicefabric/models/managed_application_identity_py3.py deleted file mode 100644 index ad514fc9..00000000 --- a/customSDK/servicefabric/models/managed_application_identity_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ManagedApplicationIdentity(Model): - """Describes a managed application identity. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the identity. - :type name: str - :param principal_id: The identity's PrincipalId. - :type principal_id: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'principal_id': {'key': 'PrincipalId', 'type': 'str'}, - } - - def __init__(self, *, name: str, principal_id: str=None, **kwargs) -> None: - super(ManagedApplicationIdentity, self).__init__(**kwargs) - self.name = name - self.principal_id = principal_id diff --git a/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description.py b/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description.py deleted file mode 100644 index e817c279..00000000 --- a/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_storage_description import BackupStorageDescription - - -class ManagedIdentityAzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Azure blob store (connected using managed - identity) used for storing and enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - :param managed_identity_type: Required. The type of managed identity to be - used to connect to Azure Blob Store via Managed Identity. Possible values - include: 'Invalid', 'VMSS', 'Cluster' - :type managed_identity_type: str or - ~azure.servicefabric.models.ManagedIdentityType - :param blob_service_uri: Required. The Blob Service Uri to connect to the - Azure blob store.. - :type blob_service_uri: str - :param container_name: Required. The name of the container in the blob - store to store and enumerate backups from. - :type container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'managed_identity_type': {'required': True}, - 'blob_service_uri': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'managed_identity_type': {'key': 'ManagedIdentityType', 'type': 'str'}, - 'blob_service_uri': {'key': 'BlobServiceUri', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedIdentityAzureBlobBackupStorageDescription, self).__init__(**kwargs) - self.managed_identity_type = kwargs.get('managed_identity_type', None) - self.blob_service_uri = kwargs.get('blob_service_uri', None) - self.container_name = kwargs.get('container_name', None) - self.storage_kind = 'ManagedIdentityAzureBlobStore' diff --git a/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description_py3.py b/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description_py3.py deleted file mode 100644 index af895d57..00000000 --- a/customSDK/servicefabric/models/managed_identity_azure_blob_backup_storage_description_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_storage_description_py3 import BackupStorageDescription - - -class ManagedIdentityAzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Azure blob store (connected using managed - identity) used for storing and enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :param friendly_name: Friendly name for this backup storage. - :type friendly_name: str - :param storage_kind: Required. Constant filled by server. - :type storage_kind: str - :param managed_identity_type: Required. The type of managed identity to be - used to connect to Azure Blob Store via Managed Identity. Possible values - include: 'Invalid', 'VMSS', 'Cluster' - :type managed_identity_type: str or - ~azure.servicefabric.models.ManagedIdentityType - :param blob_service_uri: Required. The Blob Service Uri to connect to the - Azure blob store.. - :type blob_service_uri: str - :param container_name: Required. The name of the container in the blob - store to store and enumerate backups from. - :type container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'managed_identity_type': {'required': True}, - 'blob_service_uri': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'managed_identity_type': {'key': 'ManagedIdentityType', 'type': 'str'}, - 'blob_service_uri': {'key': 'BlobServiceUri', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__(self, *, managed_identity_type, blob_service_uri: str, container_name: str, friendly_name: str=None, **kwargs) -> None: - super(ManagedIdentityAzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) - self.managed_identity_type = managed_identity_type - self.blob_service_uri = blob_service_uri - self.container_name = container_name - self.storage_kind = 'ManagedIdentityAzureBlobStore' diff --git a/customSDK/servicefabric/models/metric_load_description.py b/customSDK/servicefabric/models/metric_load_description.py deleted file mode 100644 index ebe7d129..00000000 --- a/customSDK/servicefabric/models/metric_load_description.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricLoadDescription(Model): - """Specifies metric load information. - - :param metric_name: The name of the reported metric. - :type metric_name: str - :param current_load: The current value of the metric load. - :type current_load: long - :param predicted_load: The predicted value of the metric load. Predicted - metric load values is currently a preview feature. It allows predicted - load values to be reported and used at the Service Fabric side, but that - feature is currently not enabled. - :type predicted_load: long - """ - - _attribute_map = { - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'current_load': {'key': 'CurrentLoad', 'type': 'long'}, - 'predicted_load': {'key': 'PredictedLoad', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(MetricLoadDescription, self).__init__(**kwargs) - self.metric_name = kwargs.get('metric_name', None) - self.current_load = kwargs.get('current_load', None) - self.predicted_load = kwargs.get('predicted_load', None) diff --git a/customSDK/servicefabric/models/metric_load_description_py3.py b/customSDK/servicefabric/models/metric_load_description_py3.py deleted file mode 100644 index efb17da7..00000000 --- a/customSDK/servicefabric/models/metric_load_description_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricLoadDescription(Model): - """Specifies metric load information. - - :param metric_name: The name of the reported metric. - :type metric_name: str - :param current_load: The current value of the metric load. - :type current_load: long - :param predicted_load: The predicted value of the metric load. Predicted - metric load values is currently a preview feature. It allows predicted - load values to be reported and used at the Service Fabric side, but that - feature is currently not enabled. - :type predicted_load: long - """ - - _attribute_map = { - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'current_load': {'key': 'CurrentLoad', 'type': 'long'}, - 'predicted_load': {'key': 'PredictedLoad', 'type': 'long'}, - } - - def __init__(self, *, metric_name: str=None, current_load: int=None, predicted_load: int=None, **kwargs) -> None: - super(MetricLoadDescription, self).__init__(**kwargs) - self.metric_name = metric_name - self.current_load = current_load - self.predicted_load = predicted_load diff --git a/customSDK/servicefabric/models/monitoring_policy_description.py b/customSDK/servicefabric/models/monitoring_policy_description.py deleted file mode 100644 index 6b95c6ec..00000000 --- a/customSDK/servicefabric/models/monitoring_policy_description.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MonitoringPolicyDescription(Model): - """Describes the parameters for monitoring an upgrade in Monitored mode. - - :param failure_action: The compensating action to perform when a Monitored - upgrade encounters monitoring policy or health policy violations. - Invalid indicates the failure action is invalid. Rollback specifies that - the upgrade will start rolling back automatically. - Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - mode. Possible values include: 'Invalid', 'Rollback', 'Manual' - :type failure_action: str or ~azure.servicefabric.models.FailureAction - :param health_check_wait_duration_in_milliseconds: The amount of time to - wait after completing an upgrade domain before applying health policies. - It is first interpreted as a string representing an ISO 8601 duration. If - that fails, then it is interpreted as a number representing the total - number of milliseconds. - :type health_check_wait_duration_in_milliseconds: str - :param health_check_stable_duration_in_milliseconds: The amount of time - that the application or cluster must remain healthy before the upgrade - proceeds to the next upgrade domain. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type health_check_stable_duration_in_milliseconds: str - :param health_check_retry_timeout_in_milliseconds: The amount of time to - retry health evaluation when the application or cluster is unhealthy - before FailureAction is executed. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type health_check_retry_timeout_in_milliseconds: str - :param upgrade_timeout_in_milliseconds: The amount of time the overall - upgrade has to complete before FailureAction is executed. It is first - interpreted as a string representing an ISO 8601 duration. If that fails, - then it is interpreted as a number representing the total number of - milliseconds. - :type upgrade_timeout_in_milliseconds: str - :param upgrade_domain_timeout_in_milliseconds: The amount of time each - upgrade domain has to complete before FailureAction is executed. It is - first interpreted as a string representing an ISO 8601 duration. If that - fails, then it is interpreted as a number representing the total number of - milliseconds. - :type upgrade_domain_timeout_in_milliseconds: str - """ - - _attribute_map = { - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, - 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, - 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MonitoringPolicyDescription, self).__init__(**kwargs) - self.failure_action = kwargs.get('failure_action', None) - self.health_check_wait_duration_in_milliseconds = kwargs.get('health_check_wait_duration_in_milliseconds', None) - self.health_check_stable_duration_in_milliseconds = kwargs.get('health_check_stable_duration_in_milliseconds', None) - self.health_check_retry_timeout_in_milliseconds = kwargs.get('health_check_retry_timeout_in_milliseconds', None) - self.upgrade_timeout_in_milliseconds = kwargs.get('upgrade_timeout_in_milliseconds', None) - self.upgrade_domain_timeout_in_milliseconds = kwargs.get('upgrade_domain_timeout_in_milliseconds', None) diff --git a/customSDK/servicefabric/models/monitoring_policy_description_py3.py b/customSDK/servicefabric/models/monitoring_policy_description_py3.py deleted file mode 100644 index 1e3b0c85..00000000 --- a/customSDK/servicefabric/models/monitoring_policy_description_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MonitoringPolicyDescription(Model): - """Describes the parameters for monitoring an upgrade in Monitored mode. - - :param failure_action: The compensating action to perform when a Monitored - upgrade encounters monitoring policy or health policy violations. - Invalid indicates the failure action is invalid. Rollback specifies that - the upgrade will start rolling back automatically. - Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - mode. Possible values include: 'Invalid', 'Rollback', 'Manual' - :type failure_action: str or ~azure.servicefabric.models.FailureAction - :param health_check_wait_duration_in_milliseconds: The amount of time to - wait after completing an upgrade domain before applying health policies. - It is first interpreted as a string representing an ISO 8601 duration. If - that fails, then it is interpreted as a number representing the total - number of milliseconds. - :type health_check_wait_duration_in_milliseconds: str - :param health_check_stable_duration_in_milliseconds: The amount of time - that the application or cluster must remain healthy before the upgrade - proceeds to the next upgrade domain. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type health_check_stable_duration_in_milliseconds: str - :param health_check_retry_timeout_in_milliseconds: The amount of time to - retry health evaluation when the application or cluster is unhealthy - before FailureAction is executed. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type health_check_retry_timeout_in_milliseconds: str - :param upgrade_timeout_in_milliseconds: The amount of time the overall - upgrade has to complete before FailureAction is executed. It is first - interpreted as a string representing an ISO 8601 duration. If that fails, - then it is interpreted as a number representing the total number of - milliseconds. - :type upgrade_timeout_in_milliseconds: str - :param upgrade_domain_timeout_in_milliseconds: The amount of time each - upgrade domain has to complete before FailureAction is executed. It is - first interpreted as a string representing an ISO 8601 duration. If that - fails, then it is interpreted as a number representing the total number of - milliseconds. - :type upgrade_domain_timeout_in_milliseconds: str - """ - - _attribute_map = { - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, - 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, - 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, - } - - def __init__(self, *, failure_action=None, health_check_wait_duration_in_milliseconds: str=None, health_check_stable_duration_in_milliseconds: str=None, health_check_retry_timeout_in_milliseconds: str=None, upgrade_timeout_in_milliseconds: str=None, upgrade_domain_timeout_in_milliseconds: str=None, **kwargs) -> None: - super(MonitoringPolicyDescription, self).__init__(**kwargs) - self.failure_action = failure_action - self.health_check_wait_duration_in_milliseconds = health_check_wait_duration_in_milliseconds - self.health_check_stable_duration_in_milliseconds = health_check_stable_duration_in_milliseconds - self.health_check_retry_timeout_in_milliseconds = health_check_retry_timeout_in_milliseconds - self.upgrade_timeout_in_milliseconds = upgrade_timeout_in_milliseconds - self.upgrade_domain_timeout_in_milliseconds = upgrade_domain_timeout_in_milliseconds diff --git a/customSDK/servicefabric/models/name_description.py b/customSDK/servicefabric/models/name_description.py deleted file mode 100644 index 93ca62e3..00000000 --- a/customSDK/servicefabric/models/name_description.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NameDescription(Model): - """Describes a Service Fabric name. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The Service Fabric name, including the 'fabric:' - URI scheme. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/name_description_py3.py b/customSDK/servicefabric/models/name_description_py3.py deleted file mode 100644 index 5f8a01bd..00000000 --- a/customSDK/servicefabric/models/name_description_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NameDescription(Model): - """Describes a Service Fabric name. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The Service Fabric name, including the 'fabric:' - URI scheme. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, *, name: str, **kwargs) -> None: - super(NameDescription, self).__init__(**kwargs) - self.name = name diff --git a/customSDK/servicefabric/models/named_partition_information.py b/customSDK/servicefabric/models/named_partition_information.py deleted file mode 100644 index 8ccff214..00000000 --- a/customSDK/servicefabric/models/named_partition_information.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_information import PartitionInformation - - -class NamedPartitionInformation(PartitionInformation): - """Describes the partition information for the name as a string that is based - on partition schemes. - - All required parameters must be populated in order to send to Azure. - - :param id: An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. - The partition ID is unique and does not change for the lifetime of the - service. If the same service was deleted and recreated the IDs of its - partitions would be different. - :type id: str - :param service_partition_kind: Required. Constant filled by server. - :type service_partition_kind: str - :param name: Name of the partition. - :type name: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NamedPartitionInformation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.service_partition_kind = 'Named' diff --git a/customSDK/servicefabric/models/named_partition_information_py3.py b/customSDK/servicefabric/models/named_partition_information_py3.py deleted file mode 100644 index 6204651b..00000000 --- a/customSDK/servicefabric/models/named_partition_information_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_information_py3 import PartitionInformation - - -class NamedPartitionInformation(PartitionInformation): - """Describes the partition information for the name as a string that is based - on partition schemes. - - All required parameters must be populated in order to send to Azure. - - :param id: An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. - The partition ID is unique and does not change for the lifetime of the - service. If the same service was deleted and recreated the IDs of its - partitions would be different. - :type id: str - :param service_partition_kind: Required. Constant filled by server. - :type service_partition_kind: str - :param name: Name of the partition. - :type name: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: - super(NamedPartitionInformation, self).__init__(id=id, **kwargs) - self.name = name - self.service_partition_kind = 'Named' diff --git a/customSDK/servicefabric/models/named_partition_scheme_description.py b/customSDK/servicefabric/models/named_partition_scheme_description.py deleted file mode 100644 index 0d58fa2a..00000000 --- a/customSDK/servicefabric/models/named_partition_scheme_description.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_scheme_description import PartitionSchemeDescription - - -class NamedPartitionSchemeDescription(PartitionSchemeDescription): - """Describes the named partition scheme of the service. - - All required parameters must be populated in order to send to Azure. - - :param partition_scheme: Required. Constant filled by server. - :type partition_scheme: str - :param count: Required. The number of partitions. - :type count: int - :param names: Required. Array of size specified by the ‘Count’ parameter, - for the names of the partitions. - :type names: list[str] - """ - - _validation = { - 'partition_scheme': {'required': True}, - 'count': {'required': True}, - 'names': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'names': {'key': 'Names', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(NamedPartitionSchemeDescription, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.names = kwargs.get('names', None) - self.partition_scheme = 'Named' diff --git a/customSDK/servicefabric/models/named_partition_scheme_description_py3.py b/customSDK/servicefabric/models/named_partition_scheme_description_py3.py deleted file mode 100644 index d50a2fbb..00000000 --- a/customSDK/servicefabric/models/named_partition_scheme_description_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_scheme_description_py3 import PartitionSchemeDescription - - -class NamedPartitionSchemeDescription(PartitionSchemeDescription): - """Describes the named partition scheme of the service. - - All required parameters must be populated in order to send to Azure. - - :param partition_scheme: Required. Constant filled by server. - :type partition_scheme: str - :param count: Required. The number of partitions. - :type count: int - :param names: Required. Array of size specified by the ‘Count’ parameter, - for the names of the partitions. - :type names: list[str] - """ - - _validation = { - 'partition_scheme': {'required': True}, - 'count': {'required': True}, - 'names': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'names': {'key': 'Names', 'type': '[str]'}, - } - - def __init__(self, *, count: int, names, **kwargs) -> None: - super(NamedPartitionSchemeDescription, self).__init__(**kwargs) - self.count = count - self.names = names - self.partition_scheme = 'Named' diff --git a/customSDK/servicefabric/models/network_ref.py b/customSDK/servicefabric/models/network_ref.py deleted file mode 100644 index 7c811e73..00000000 --- a/customSDK/servicefabric/models/network_ref.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkRef(Model): - """Describes a network reference in a service. - - :param name: Name of the network - :type name: str - :param endpoint_refs: A list of endpoints that are exposed on this - network. - :type endpoint_refs: list[~azure.servicefabric.models.EndpointRef] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'endpoint_refs': {'key': 'endpointRefs', 'type': '[EndpointRef]'}, - } - - def __init__(self, **kwargs): - super(NetworkRef, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.endpoint_refs = kwargs.get('endpoint_refs', None) diff --git a/customSDK/servicefabric/models/network_ref_py3.py b/customSDK/servicefabric/models/network_ref_py3.py deleted file mode 100644 index 9cb21573..00000000 --- a/customSDK/servicefabric/models/network_ref_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkRef(Model): - """Describes a network reference in a service. - - :param name: Name of the network - :type name: str - :param endpoint_refs: A list of endpoints that are exposed on this - network. - :type endpoint_refs: list[~azure.servicefabric.models.EndpointRef] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'endpoint_refs': {'key': 'endpointRefs', 'type': '[EndpointRef]'}, - } - - def __init__(self, *, name: str=None, endpoint_refs=None, **kwargs) -> None: - super(NetworkRef, self).__init__(**kwargs) - self.name = name - self.endpoint_refs = endpoint_refs diff --git a/customSDK/servicefabric/models/network_resource_description.py b/customSDK/servicefabric/models/network_resource_description.py deleted file mode 100644 index 56a03e76..00000000 --- a/customSDK/servicefabric/models/network_resource_description.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkResourceDescription(Model): - """This type describes a network resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Network resource. - :type name: str - :param properties: Required. Describes properties of a network resource. - :type properties: ~azure.servicefabric.models.NetworkResourceProperties - """ - - _validation = { - 'name': {'required': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'NetworkResourceProperties'}, - } - - def __init__(self, **kwargs): - super(NetworkResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.properties = kwargs.get('properties', None) diff --git a/customSDK/servicefabric/models/network_resource_description_py3.py b/customSDK/servicefabric/models/network_resource_description_py3.py deleted file mode 100644 index c812b39c..00000000 --- a/customSDK/servicefabric/models/network_resource_description_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkResourceDescription(Model): - """This type describes a network resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Network resource. - :type name: str - :param properties: Required. Describes properties of a network resource. - :type properties: ~azure.servicefabric.models.NetworkResourceProperties - """ - - _validation = { - 'name': {'required': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'NetworkResourceProperties'}, - } - - def __init__(self, *, name: str, properties, **kwargs) -> None: - super(NetworkResourceDescription, self).__init__(**kwargs) - self.name = name - self.properties = properties diff --git a/customSDK/servicefabric/models/network_resource_properties.py b/customSDK/servicefabric/models/network_resource_properties.py deleted file mode 100644 index bca9a90f..00000000 --- a/customSDK/servicefabric/models/network_resource_properties.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .network_resource_properties_base import NetworkResourcePropertiesBase - - -class NetworkResourceProperties(NetworkResourcePropertiesBase): - """Describes properties of a network resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LocalNetworkResourceProperties - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param description: User readable description of the network. - :type description: str - :ivar status: Status of the network. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the network. - :vartype status_details: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Local': 'LocalNetworkResourceProperties'} - } - - def __init__(self, **kwargs): - super(NetworkResourceProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.status = None - self.status_details = None - self.kind = 'NetworkResourceProperties' diff --git a/customSDK/servicefabric/models/network_resource_properties_base.py b/customSDK/servicefabric/models/network_resource_properties_base.py deleted file mode 100644 index d0ecd3ae..00000000 --- a/customSDK/servicefabric/models/network_resource_properties_base.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkResourcePropertiesBase(Model): - """This type describes the properties of a network resource, including its - kind. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NetworkResourceProperties - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'NetworkResourceProperties': 'NetworkResourceProperties'} - } - - def __init__(self, **kwargs): - super(NetworkResourcePropertiesBase, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/network_resource_properties_base_py3.py b/customSDK/servicefabric/models/network_resource_properties_base_py3.py deleted file mode 100644 index 6410aae6..00000000 --- a/customSDK/servicefabric/models/network_resource_properties_base_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NetworkResourcePropertiesBase(Model): - """This type describes the properties of a network resource, including its - kind. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NetworkResourceProperties - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'NetworkResourceProperties': 'NetworkResourceProperties'} - } - - def __init__(self, **kwargs) -> None: - super(NetworkResourcePropertiesBase, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/network_resource_properties_py3.py b/customSDK/servicefabric/models/network_resource_properties_py3.py deleted file mode 100644 index 0fce3829..00000000 --- a/customSDK/servicefabric/models/network_resource_properties_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .network_resource_properties_base_py3 import NetworkResourcePropertiesBase - - -class NetworkResourceProperties(NetworkResourcePropertiesBase): - """Describes properties of a network resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LocalNetworkResourceProperties - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param description: User readable description of the network. - :type description: str - :ivar status: Status of the network. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the network. - :vartype status_details: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Local': 'LocalNetworkResourceProperties'} - } - - def __init__(self, *, description: str=None, **kwargs) -> None: - super(NetworkResourceProperties, self).__init__(**kwargs) - self.description = description - self.status = None - self.status_details = None - self.kind = 'NetworkResourceProperties' diff --git a/customSDK/servicefabric/models/node_aborted_event.py b/customSDK/servicefabric/models/node_aborted_event.py deleted file mode 100644 index 744a8fee..00000000 --- a/customSDK/servicefabric/models/node_aborted_event.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event import NodeEvent - - -class NodeAbortedEvent(NodeEvent): - """Node Aborted event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_id: Required. Id of Node. - :type node_id: str - :param upgrade_domain: Required. Upgrade domain of Node. - :type upgrade_domain: str - :param fault_domain: Required. Fault domain of Node. - :type fault_domain: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param hostname: Required. Name of Host. - :type hostname: str - :param is_seed_node: Required. Indicates if it is seed node. - :type is_seed_node: bool - :param node_version: Required. Version of Node. - :type node_version: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeAbortedEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.node_id = kwargs.get('node_id', None) - self.upgrade_domain = kwargs.get('upgrade_domain', None) - self.fault_domain = kwargs.get('fault_domain', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.hostname = kwargs.get('hostname', None) - self.is_seed_node = kwargs.get('is_seed_node', None) - self.node_version = kwargs.get('node_version', None) - self.kind = 'NodeAborted' diff --git a/customSDK/servicefabric/models/node_aborted_event_py3.py b/customSDK/servicefabric/models/node_aborted_event_py3.py deleted file mode 100644 index 9b51fbd2..00000000 --- a/customSDK/servicefabric/models/node_aborted_event_py3.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event_py3 import NodeEvent - - -class NodeAbortedEvent(NodeEvent): - """Node Aborted event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_id: Required. Id of Node. - :type node_id: str - :param upgrade_domain: Required. Upgrade domain of Node. - :type upgrade_domain: str - :param fault_domain: Required. Fault domain of Node. - :type fault_domain: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param hostname: Required. Name of Host. - :type hostname: str - :param is_seed_node: Required. Indicates if it is seed node. - :type is_seed_node: bool - :param node_version: Required. Version of Node. - :type node_version: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, node_id: str, upgrade_domain: str, fault_domain: str, ip_address_or_fqdn: str, hostname: str, is_seed_node: bool, node_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeAbortedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance = node_instance - self.node_id = node_id - self.upgrade_domain = upgrade_domain - self.fault_domain = fault_domain - self.ip_address_or_fqdn = ip_address_or_fqdn - self.hostname = hostname - self.is_seed_node = is_seed_node - self.node_version = node_version - self.kind = 'NodeAborted' diff --git a/customSDK/servicefabric/models/node_added_to_cluster_event.py b/customSDK/servicefabric/models/node_added_to_cluster_event.py deleted file mode 100644 index 3c55e7b2..00000000 --- a/customSDK/servicefabric/models/node_added_to_cluster_event.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event import NodeEvent - - -class NodeAddedToClusterEvent(NodeEvent): - """Node Added event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_id: Required. Id of Node. - :type node_id: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_type: Required. Type of Node. - :type node_type: str - :param fabric_version: Required. Fabric version. - :type fabric_version: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param node_capacities: Required. Capacities. - :type node_capacities: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'node_type': {'required': True}, - 'fabric_version': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'node_capacities': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_type': {'key': 'NodeType', 'type': 'str'}, - 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeAddedToClusterEvent, self).__init__(**kwargs) - self.node_id = kwargs.get('node_id', None) - self.node_instance = kwargs.get('node_instance', None) - self.node_type = kwargs.get('node_type', None) - self.fabric_version = kwargs.get('fabric_version', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.node_capacities = kwargs.get('node_capacities', None) - self.kind = 'NodeAddedToCluster' diff --git a/customSDK/servicefabric/models/node_added_to_cluster_event_py3.py b/customSDK/servicefabric/models/node_added_to_cluster_event_py3.py deleted file mode 100644 index 61780376..00000000 --- a/customSDK/servicefabric/models/node_added_to_cluster_event_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event_py3 import NodeEvent - - -class NodeAddedToClusterEvent(NodeEvent): - """Node Added event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_id: Required. Id of Node. - :type node_id: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_type: Required. Type of Node. - :type node_type: str - :param fabric_version: Required. Fabric version. - :type fabric_version: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param node_capacities: Required. Capacities. - :type node_capacities: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'node_type': {'required': True}, - 'fabric_version': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'node_capacities': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_type': {'key': 'NodeType', 'type': 'str'}, - 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_id: str, node_instance: int, node_type: str, fabric_version: str, ip_address_or_fqdn: str, node_capacities: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeAddedToClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_id = node_id - self.node_instance = node_instance - self.node_type = node_type - self.fabric_version = fabric_version - self.ip_address_or_fqdn = ip_address_or_fqdn - self.node_capacities = node_capacities - self.kind = 'NodeAddedToCluster' diff --git a/customSDK/servicefabric/models/node_closed_event.py b/customSDK/servicefabric/models/node_closed_event.py deleted file mode 100644 index d9abbee9..00000000 --- a/customSDK/servicefabric/models/node_closed_event.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event import NodeEvent - - -class NodeClosedEvent(NodeEvent): - """Node Closed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_id: Required. Id of Node. - :type node_id: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param error: Required. Describes error. - :type error: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'error': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'error': {'key': 'Error', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeClosedEvent, self).__init__(**kwargs) - self.node_id = kwargs.get('node_id', None) - self.node_instance = kwargs.get('node_instance', None) - self.error = kwargs.get('error', None) - self.kind = 'NodeClosed' diff --git a/customSDK/servicefabric/models/node_closed_event_py3.py b/customSDK/servicefabric/models/node_closed_event_py3.py deleted file mode 100644 index e655d3d2..00000000 --- a/customSDK/servicefabric/models/node_closed_event_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event_py3 import NodeEvent - - -class NodeClosedEvent(NodeEvent): - """Node Closed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_id: Required. Id of Node. - :type node_id: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param error: Required. Describes error. - :type error: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'error': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'error': {'key': 'Error', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_id: str, node_instance: int, error: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeClosedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_id = node_id - self.node_instance = node_instance - self.error = error - self.kind = 'NodeClosed' diff --git a/customSDK/servicefabric/models/node_deactivate_completed_event.py b/customSDK/servicefabric/models/node_deactivate_completed_event.py deleted file mode 100644 index 9e20d52b..00000000 --- a/customSDK/servicefabric/models/node_deactivate_completed_event.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event import NodeEvent - - -class NodeDeactivateCompletedEvent(NodeEvent): - """Node Deactivate Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param effective_deactivate_intent: Required. Describes deactivate intent. - :type effective_deactivate_intent: str - :param batch_ids_with_deactivate_intent: Required. Batch Ids. - :type batch_ids_with_deactivate_intent: str - :param start_time: Required. Start time. - :type start_time: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'effective_deactivate_intent': {'required': True}, - 'batch_ids_with_deactivate_intent': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'effective_deactivate_intent': {'key': 'EffectiveDeactivateIntent', 'type': 'str'}, - 'batch_ids_with_deactivate_intent': {'key': 'BatchIdsWithDeactivateIntent', 'type': 'str'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(NodeDeactivateCompletedEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.effective_deactivate_intent = kwargs.get('effective_deactivate_intent', None) - self.batch_ids_with_deactivate_intent = kwargs.get('batch_ids_with_deactivate_intent', None) - self.start_time = kwargs.get('start_time', None) - self.kind = 'NodeDeactivateCompleted' diff --git a/customSDK/servicefabric/models/node_deactivate_completed_event_py3.py b/customSDK/servicefabric/models/node_deactivate_completed_event_py3.py deleted file mode 100644 index d78dbcef..00000000 --- a/customSDK/servicefabric/models/node_deactivate_completed_event_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event_py3 import NodeEvent - - -class NodeDeactivateCompletedEvent(NodeEvent): - """Node Deactivate Completed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param effective_deactivate_intent: Required. Describes deactivate intent. - :type effective_deactivate_intent: str - :param batch_ids_with_deactivate_intent: Required. Batch Ids. - :type batch_ids_with_deactivate_intent: str - :param start_time: Required. Start time. - :type start_time: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'effective_deactivate_intent': {'required': True}, - 'batch_ids_with_deactivate_intent': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'effective_deactivate_intent': {'key': 'EffectiveDeactivateIntent', 'type': 'str'}, - 'batch_ids_with_deactivate_intent': {'key': 'BatchIdsWithDeactivateIntent', 'type': 'str'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, effective_deactivate_intent: str, batch_ids_with_deactivate_intent: str, start_time, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeDeactivateCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance = node_instance - self.effective_deactivate_intent = effective_deactivate_intent - self.batch_ids_with_deactivate_intent = batch_ids_with_deactivate_intent - self.start_time = start_time - self.kind = 'NodeDeactivateCompleted' diff --git a/customSDK/servicefabric/models/node_deactivate_started_event.py b/customSDK/servicefabric/models/node_deactivate_started_event.py deleted file mode 100644 index 7cf057fc..00000000 --- a/customSDK/servicefabric/models/node_deactivate_started_event.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event import NodeEvent - - -class NodeDeactivateStartedEvent(NodeEvent): - """Node Deactivate Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param batch_id: Required. Batch Id. - :type batch_id: str - :param deactivate_intent: Required. Describes deactivate intent. - :type deactivate_intent: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'batch_id': {'required': True}, - 'deactivate_intent': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'batch_id': {'key': 'BatchId', 'type': 'str'}, - 'deactivate_intent': {'key': 'DeactivateIntent', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeDeactivateStartedEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.batch_id = kwargs.get('batch_id', None) - self.deactivate_intent = kwargs.get('deactivate_intent', None) - self.kind = 'NodeDeactivateStarted' diff --git a/customSDK/servicefabric/models/node_deactivate_started_event_py3.py b/customSDK/servicefabric/models/node_deactivate_started_event_py3.py deleted file mode 100644 index 30c39037..00000000 --- a/customSDK/servicefabric/models/node_deactivate_started_event_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event_py3 import NodeEvent - - -class NodeDeactivateStartedEvent(NodeEvent): - """Node Deactivate Started event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param batch_id: Required. Batch Id. - :type batch_id: str - :param deactivate_intent: Required. Describes deactivate intent. - :type deactivate_intent: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'batch_id': {'required': True}, - 'deactivate_intent': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'batch_id': {'key': 'BatchId', 'type': 'str'}, - 'deactivate_intent': {'key': 'DeactivateIntent', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, batch_id: str, deactivate_intent: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeDeactivateStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance = node_instance - self.batch_id = batch_id - self.deactivate_intent = deactivate_intent - self.kind = 'NodeDeactivateStarted' diff --git a/customSDK/servicefabric/models/node_deactivation_info.py b/customSDK/servicefabric/models/node_deactivation_info.py deleted file mode 100644 index 33793611..00000000 --- a/customSDK/servicefabric/models/node_deactivation_info.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeDeactivationInfo(Model): - """Information about the node deactivation. This information is valid for a - node that is undergoing deactivation or has already been deactivated. - - :param node_deactivation_intent: The intent or the reason for deactivating - the node. Following are the possible values for it. Possible values - include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' - :type node_deactivation_intent: str or - ~azure.servicefabric.models.NodeDeactivationIntent - :param node_deactivation_status: The status of node deactivation - operation. Following are the possible values. Possible values include: - 'None', 'SafetyCheckInProgress', 'SafetyCheckComplete', 'Completed' - :type node_deactivation_status: str or - ~azure.servicefabric.models.NodeDeactivationStatus - :param node_deactivation_task: List of tasks representing the deactivation - operation on the node. - :type node_deactivation_task: - list[~azure.servicefabric.models.NodeDeactivationTask] - :param pending_safety_checks: List of pending safety checks - :type pending_safety_checks: - list[~azure.servicefabric.models.SafetyCheckWrapper] - """ - - _attribute_map = { - 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, - 'node_deactivation_status': {'key': 'NodeDeactivationStatus', 'type': 'str'}, - 'node_deactivation_task': {'key': 'NodeDeactivationTask', 'type': '[NodeDeactivationTask]'}, - 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, - } - - def __init__(self, **kwargs): - super(NodeDeactivationInfo, self).__init__(**kwargs) - self.node_deactivation_intent = kwargs.get('node_deactivation_intent', None) - self.node_deactivation_status = kwargs.get('node_deactivation_status', None) - self.node_deactivation_task = kwargs.get('node_deactivation_task', None) - self.pending_safety_checks = kwargs.get('pending_safety_checks', None) diff --git a/customSDK/servicefabric/models/node_deactivation_info_py3.py b/customSDK/servicefabric/models/node_deactivation_info_py3.py deleted file mode 100644 index aec06f70..00000000 --- a/customSDK/servicefabric/models/node_deactivation_info_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeDeactivationInfo(Model): - """Information about the node deactivation. This information is valid for a - node that is undergoing deactivation or has already been deactivated. - - :param node_deactivation_intent: The intent or the reason for deactivating - the node. Following are the possible values for it. Possible values - include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' - :type node_deactivation_intent: str or - ~azure.servicefabric.models.NodeDeactivationIntent - :param node_deactivation_status: The status of node deactivation - operation. Following are the possible values. Possible values include: - 'None', 'SafetyCheckInProgress', 'SafetyCheckComplete', 'Completed' - :type node_deactivation_status: str or - ~azure.servicefabric.models.NodeDeactivationStatus - :param node_deactivation_task: List of tasks representing the deactivation - operation on the node. - :type node_deactivation_task: - list[~azure.servicefabric.models.NodeDeactivationTask] - :param pending_safety_checks: List of pending safety checks - :type pending_safety_checks: - list[~azure.servicefabric.models.SafetyCheckWrapper] - """ - - _attribute_map = { - 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, - 'node_deactivation_status': {'key': 'NodeDeactivationStatus', 'type': 'str'}, - 'node_deactivation_task': {'key': 'NodeDeactivationTask', 'type': '[NodeDeactivationTask]'}, - 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, - } - - def __init__(self, *, node_deactivation_intent=None, node_deactivation_status=None, node_deactivation_task=None, pending_safety_checks=None, **kwargs) -> None: - super(NodeDeactivationInfo, self).__init__(**kwargs) - self.node_deactivation_intent = node_deactivation_intent - self.node_deactivation_status = node_deactivation_status - self.node_deactivation_task = node_deactivation_task - self.pending_safety_checks = pending_safety_checks diff --git a/customSDK/servicefabric/models/node_deactivation_task.py b/customSDK/servicefabric/models/node_deactivation_task.py deleted file mode 100644 index 20f95a38..00000000 --- a/customSDK/servicefabric/models/node_deactivation_task.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeDeactivationTask(Model): - """The task representing the deactivation operation on the node. - - :param node_deactivation_task_id: Identity of the task related to - deactivation operation on the node. - :type node_deactivation_task_id: - ~azure.servicefabric.models.NodeDeactivationTaskId - :param node_deactivation_intent: The intent or the reason for deactivating - the node. Following are the possible values for it. Possible values - include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' - :type node_deactivation_intent: str or - ~azure.servicefabric.models.NodeDeactivationIntent - """ - - _attribute_map = { - 'node_deactivation_task_id': {'key': 'NodeDeactivationTaskId', 'type': 'NodeDeactivationTaskId'}, - 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeDeactivationTask, self).__init__(**kwargs) - self.node_deactivation_task_id = kwargs.get('node_deactivation_task_id', None) - self.node_deactivation_intent = kwargs.get('node_deactivation_intent', None) diff --git a/customSDK/servicefabric/models/node_deactivation_task_id.py b/customSDK/servicefabric/models/node_deactivation_task_id.py deleted file mode 100644 index f63ddb60..00000000 --- a/customSDK/servicefabric/models/node_deactivation_task_id.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeDeactivationTaskId(Model): - """Identity of the task related to deactivation operation on the node. - - :param id: Value of the task id. - :type id: str - :param node_deactivation_task_type: The type of the task that performed - the node deactivation. Following are the possible values. Possible values - include: 'Invalid', 'Infrastructure', 'Repair', 'Client' - :type node_deactivation_task_type: str or - ~azure.servicefabric.models.NodeDeactivationTaskType - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'node_deactivation_task_type': {'key': 'NodeDeactivationTaskType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeDeactivationTaskId, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.node_deactivation_task_type = kwargs.get('node_deactivation_task_type', None) diff --git a/customSDK/servicefabric/models/node_deactivation_task_id_py3.py b/customSDK/servicefabric/models/node_deactivation_task_id_py3.py deleted file mode 100644 index bf0c939c..00000000 --- a/customSDK/servicefabric/models/node_deactivation_task_id_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeDeactivationTaskId(Model): - """Identity of the task related to deactivation operation on the node. - - :param id: Value of the task id. - :type id: str - :param node_deactivation_task_type: The type of the task that performed - the node deactivation. Following are the possible values. Possible values - include: 'Invalid', 'Infrastructure', 'Repair', 'Client' - :type node_deactivation_task_type: str or - ~azure.servicefabric.models.NodeDeactivationTaskType - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'node_deactivation_task_type': {'key': 'NodeDeactivationTaskType', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, node_deactivation_task_type=None, **kwargs) -> None: - super(NodeDeactivationTaskId, self).__init__(**kwargs) - self.id = id - self.node_deactivation_task_type = node_deactivation_task_type diff --git a/customSDK/servicefabric/models/node_deactivation_task_py3.py b/customSDK/servicefabric/models/node_deactivation_task_py3.py deleted file mode 100644 index 5c949e7c..00000000 --- a/customSDK/servicefabric/models/node_deactivation_task_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeDeactivationTask(Model): - """The task representing the deactivation operation on the node. - - :param node_deactivation_task_id: Identity of the task related to - deactivation operation on the node. - :type node_deactivation_task_id: - ~azure.servicefabric.models.NodeDeactivationTaskId - :param node_deactivation_intent: The intent or the reason for deactivating - the node. Following are the possible values for it. Possible values - include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' - :type node_deactivation_intent: str or - ~azure.servicefabric.models.NodeDeactivationIntent - """ - - _attribute_map = { - 'node_deactivation_task_id': {'key': 'NodeDeactivationTaskId', 'type': 'NodeDeactivationTaskId'}, - 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, - } - - def __init__(self, *, node_deactivation_task_id=None, node_deactivation_intent=None, **kwargs) -> None: - super(NodeDeactivationTask, self).__init__(**kwargs) - self.node_deactivation_task_id = node_deactivation_task_id - self.node_deactivation_intent = node_deactivation_intent diff --git a/customSDK/servicefabric/models/node_down_event.py b/customSDK/servicefabric/models/node_down_event.py deleted file mode 100644 index b20b3d4b..00000000 --- a/customSDK/servicefabric/models/node_down_event.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event import NodeEvent - - -class NodeDownEvent(NodeEvent): - """Node Down event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param last_node_up_at: Required. Time when Node was last up. - :type last_node_up_at: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'last_node_up_at': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'last_node_up_at': {'key': 'LastNodeUpAt', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(NodeDownEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.last_node_up_at = kwargs.get('last_node_up_at', None) - self.kind = 'NodeDown' diff --git a/customSDK/servicefabric/models/node_down_event_py3.py b/customSDK/servicefabric/models/node_down_event_py3.py deleted file mode 100644 index 7702aee9..00000000 --- a/customSDK/servicefabric/models/node_down_event_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event_py3 import NodeEvent - - -class NodeDownEvent(NodeEvent): - """Node Down event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param last_node_up_at: Required. Time when Node was last up. - :type last_node_up_at: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'last_node_up_at': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'last_node_up_at': {'key': 'LastNodeUpAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, last_node_up_at, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeDownEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance = node_instance - self.last_node_up_at = last_node_up_at - self.kind = 'NodeDown' diff --git a/customSDK/servicefabric/models/node_event.py b/customSDK/servicefabric/models/node_event.py deleted file mode 100644 index b10fa82f..00000000 --- a/customSDK/servicefabric/models/node_event.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .fabric_event import FabricEvent - - -class NodeEvent(FabricEvent): - """Represents the base for all Node Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NodeAbortedEvent, NodeAddedToClusterEvent, - NodeClosedEvent, NodeDeactivateCompletedEvent, NodeDeactivateStartedEvent, - NodeDownEvent, NodeNewHealthReportEvent, NodeHealthReportExpiredEvent, - NodeOpenSucceededEvent, NodeOpenFailedEvent, NodeRemovedFromClusterEvent, - NodeUpEvent, ChaosNodeRestartScheduledEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'NodeAborted': 'NodeAbortedEvent', 'NodeAddedToCluster': 'NodeAddedToClusterEvent', 'NodeClosed': 'NodeClosedEvent', 'NodeDeactivateCompleted': 'NodeDeactivateCompletedEvent', 'NodeDeactivateStarted': 'NodeDeactivateStartedEvent', 'NodeDown': 'NodeDownEvent', 'NodeNewHealthReport': 'NodeNewHealthReportEvent', 'NodeHealthReportExpired': 'NodeHealthReportExpiredEvent', 'NodeOpenSucceeded': 'NodeOpenSucceededEvent', 'NodeOpenFailed': 'NodeOpenFailedEvent', 'NodeRemovedFromCluster': 'NodeRemovedFromClusterEvent', 'NodeUp': 'NodeUpEvent', 'ChaosNodeRestartScheduled': 'ChaosNodeRestartScheduledEvent'} - } - - def __init__(self, **kwargs): - super(NodeEvent, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.kind = 'NodeEvent' diff --git a/customSDK/servicefabric/models/node_event_py3.py b/customSDK/servicefabric/models/node_event_py3.py deleted file mode 100644 index 1fd27413..00000000 --- a/customSDK/servicefabric/models/node_event_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .fabric_event_py3 import FabricEvent - - -class NodeEvent(FabricEvent): - """Represents the base for all Node Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NodeAbortedEvent, NodeAddedToClusterEvent, - NodeClosedEvent, NodeDeactivateCompletedEvent, NodeDeactivateStartedEvent, - NodeDownEvent, NodeNewHealthReportEvent, NodeHealthReportExpiredEvent, - NodeOpenSucceededEvent, NodeOpenFailedEvent, NodeRemovedFromClusterEvent, - NodeUpEvent, ChaosNodeRestartScheduledEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'NodeAborted': 'NodeAbortedEvent', 'NodeAddedToCluster': 'NodeAddedToClusterEvent', 'NodeClosed': 'NodeClosedEvent', 'NodeDeactivateCompleted': 'NodeDeactivateCompletedEvent', 'NodeDeactivateStarted': 'NodeDeactivateStartedEvent', 'NodeDown': 'NodeDownEvent', 'NodeNewHealthReport': 'NodeNewHealthReportEvent', 'NodeHealthReportExpired': 'NodeHealthReportExpiredEvent', 'NodeOpenSucceeded': 'NodeOpenSucceededEvent', 'NodeOpenFailed': 'NodeOpenFailedEvent', 'NodeRemovedFromCluster': 'NodeRemovedFromClusterEvent', 'NodeUp': 'NodeUpEvent', 'ChaosNodeRestartScheduled': 'ChaosNodeRestartScheduledEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.node_name = node_name - self.kind = 'NodeEvent' diff --git a/customSDK/servicefabric/models/node_health.py b/customSDK/servicefabric/models/node_health.py deleted file mode 100644 index 174320ce..00000000 --- a/customSDK/servicefabric/models/node_health.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health import EntityHealth - - -class NodeHealth(EntityHealth): - """Information about the health of a Service Fabric node. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param name: Name of the node whose health information is described by - this object. - :type name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeHealth, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/node_health_evaluation.py b/customSDK/servicefabric/models/node_health_evaluation.py deleted file mode 100644 index 3c38231d..00000000 --- a/customSDK/servicefabric/models/node_health_evaluation.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class NodeHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a node, containing information about the - data and the algorithm used by health store to evaluate health. The - evaluation is returned only when the aggregated health state is either - Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the node. The types of the - unhealthy evaluations can be EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(NodeHealthEvaluation, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_health_evaluation_py3.py b/customSDK/servicefabric/models/node_health_evaluation_py3.py deleted file mode 100644 index e40c3050..00000000 --- a/customSDK/servicefabric/models/node_health_evaluation_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class NodeHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a node, containing information about the - data and the algorithm used by health store to evaluate health. The - evaluation is returned only when the aggregated health state is either - Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the node. The types of the - unhealthy evaluations can be EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, node_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(NodeHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.node_name = node_name - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_health_py3.py b/customSDK/servicefabric/models/node_health_py3.py deleted file mode 100644 index 54584deb..00000000 --- a/customSDK/servicefabric/models/node_health_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_py3 import EntityHealth - - -class NodeHealth(EntityHealth): - """Information about the health of a Service Fabric node. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param name: Name of the node whose health information is described by - this object. - :type name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, **kwargs) -> None: - super(NodeHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.name = name diff --git a/customSDK/servicefabric/models/node_health_report_expired_event.py b/customSDK/servicefabric/models/node_health_report_expired_event.py deleted file mode 100644 index 961324f6..00000000 --- a/customSDK/servicefabric/models/node_health_report_expired_event.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event import NodeEvent - - -class NodeHealthReportExpiredEvent(NodeEvent): - """Node Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: Required. Id of Node instance. - :type node_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(NodeHealthReportExpiredEvent, self).__init__(**kwargs) - self.node_instance_id = kwargs.get('node_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'NodeHealthReportExpired' diff --git a/customSDK/servicefabric/models/node_health_report_expired_event_py3.py b/customSDK/servicefabric/models/node_health_report_expired_event_py3.py deleted file mode 100644 index 8012e4bc..00000000 --- a/customSDK/servicefabric/models/node_health_report_expired_event_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event_py3 import NodeEvent - - -class NodeHealthReportExpiredEvent(NodeEvent): - """Node Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: Required. Id of Node instance. - :type node_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance_id = node_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'NodeHealthReportExpired' diff --git a/customSDK/servicefabric/models/node_health_state.py b/customSDK/servicefabric/models/node_health_state.py deleted file mode 100644 index 661af1b0..00000000 --- a/customSDK/servicefabric/models/node_health_state.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state import EntityHealthState - - -class NodeHealthState(EntityHealthState): - """Represents the health state of a node, which contains the node identifier - and its aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param name: The name of a Service Fabric node. - :type name: str - :param id: An internal ID used by Service Fabric to uniquely identify a - node. Node Id is deterministically generated from node name. - :type id: ~azure.servicefabric.models.NodeId - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'NodeId'}, - } - - def __init__(self, **kwargs): - super(NodeHealthState, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.id = kwargs.get('id', None) diff --git a/customSDK/servicefabric/models/node_health_state_chunk.py b/customSDK/servicefabric/models/node_health_state_chunk.py deleted file mode 100644 index 4493c068..00000000 --- a/customSDK/servicefabric/models/node_health_state_chunk.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk import EntityHealthStateChunk - - -class NodeHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a node, which contains the node name - and its aggregated health state. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of a Service Fabric node. - :type node_name: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeHealthStateChunk, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) diff --git a/customSDK/servicefabric/models/node_health_state_chunk_list.py b/customSDK/servicefabric/models/node_health_state_chunk_list.py deleted file mode 100644 index c882e9e7..00000000 --- a/customSDK/servicefabric/models/node_health_state_chunk_list.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk_list import EntityHealthStateChunkList - - -class NodeHealthStateChunkList(EntityHealthStateChunkList): - """The list of node health state chunks in the cluster that respect the input - filters in the chunk query. Returned by get cluster health state chunks - query. - - :param total_count: Total number of entity health state objects that match - the specified filters from the cluster health chunk query description. - :type total_count: long - :param items: The list of node health state chunks that respect the input - filters in the chunk query. - :type items: list[~azure.servicefabric.models.NodeHealthStateChunk] - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'items': {'key': 'Items', 'type': '[NodeHealthStateChunk]'}, - } - - def __init__(self, **kwargs): - super(NodeHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/node_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/node_health_state_chunk_list_py3.py deleted file mode 100644 index 524176b4..00000000 --- a/customSDK/servicefabric/models/node_health_state_chunk_list_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk_list_py3 import EntityHealthStateChunkList - - -class NodeHealthStateChunkList(EntityHealthStateChunkList): - """The list of node health state chunks in the cluster that respect the input - filters in the chunk query. Returned by get cluster health state chunks - query. - - :param total_count: Total number of entity health state objects that match - the specified filters from the cluster health chunk query description. - :type total_count: long - :param items: The list of node health state chunks that respect the input - filters in the chunk query. - :type items: list[~azure.servicefabric.models.NodeHealthStateChunk] - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'items': {'key': 'Items', 'type': '[NodeHealthStateChunk]'}, - } - - def __init__(self, *, total_count: int=None, items=None, **kwargs) -> None: - super(NodeHealthStateChunkList, self).__init__(total_count=total_count, **kwargs) - self.items = items diff --git a/customSDK/servicefabric/models/node_health_state_chunk_py3.py b/customSDK/servicefabric/models/node_health_state_chunk_py3.py deleted file mode 100644 index 52d4fbee..00000000 --- a/customSDK/servicefabric/models/node_health_state_chunk_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk_py3 import EntityHealthStateChunk - - -class NodeHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a node, which contains the node name - and its aggregated health state. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of a Service Fabric node. - :type node_name: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - def __init__(self, *, health_state=None, node_name: str=None, **kwargs) -> None: - super(NodeHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.node_name = node_name diff --git a/customSDK/servicefabric/models/node_health_state_filter.py b/customSDK/servicefabric/models/node_health_state_filter.py deleted file mode 100644 index cd2e1a93..00000000 --- a/customSDK/servicefabric/models/node_health_state_filter.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeHealthStateFilter(Model): - """Defines matching criteria to determine whether a node should be included in - the returned cluster health chunk. - One filter can match zero, one or multiple nodes, depending on its - properties. - Can be specified in the cluster health chunk query description. - - :param node_name_filter: Name of the node that matches the filter. The - filter is applied only to the specified node, if it exists. - If the node doesn't exist, no node is returned in the cluster health chunk - based on this filter. - If the node exists, it is included in the cluster health chunk if the - health state matches the other filter properties. - If not specified, all nodes that match the parent filters (if any) are - taken into consideration and matched against the other filter members, - like health state filter. - :type node_name_filter: str - :param health_state_filter: The filter for the health state of the nodes. - It allows selecting nodes if they match the desired health states. - The possible values are integer value of one of the following health - states. Only nodes that match the filter are returned. All nodes are used - to evaluate the cluster aggregated health state. - If not specified, default value is None, unless the node name is - specified. If the filter has default value and node name is specified, the - matching node is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches nodes with HealthState - value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - """ - - _attribute_map = { - 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(NodeHealthStateFilter, self).__init__(**kwargs) - self.node_name_filter = kwargs.get('node_name_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) diff --git a/customSDK/servicefabric/models/node_health_state_filter_py3.py b/customSDK/servicefabric/models/node_health_state_filter_py3.py deleted file mode 100644 index e6e59041..00000000 --- a/customSDK/servicefabric/models/node_health_state_filter_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeHealthStateFilter(Model): - """Defines matching criteria to determine whether a node should be included in - the returned cluster health chunk. - One filter can match zero, one or multiple nodes, depending on its - properties. - Can be specified in the cluster health chunk query description. - - :param node_name_filter: Name of the node that matches the filter. The - filter is applied only to the specified node, if it exists. - If the node doesn't exist, no node is returned in the cluster health chunk - based on this filter. - If the node exists, it is included in the cluster health chunk if the - health state matches the other filter properties. - If not specified, all nodes that match the parent filters (if any) are - taken into consideration and matched against the other filter members, - like health state filter. - :type node_name_filter: str - :param health_state_filter: The filter for the health state of the nodes. - It allows selecting nodes if they match the desired health states. - The possible values are integer value of one of the following health - states. Only nodes that match the filter are returned. All nodes are used - to evaluate the cluster aggregated health state. - If not specified, default value is None, unless the node name is - specified. If the filter has default value and node name is specified, the - matching node is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches nodes with HealthState - value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - """ - - _attribute_map = { - 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__(self, *, node_name_filter: str=None, health_state_filter: int=0, **kwargs) -> None: - super(NodeHealthStateFilter, self).__init__(**kwargs) - self.node_name_filter = node_name_filter - self.health_state_filter = health_state_filter diff --git a/customSDK/servicefabric/models/node_health_state_py3.py b/customSDK/servicefabric/models/node_health_state_py3.py deleted file mode 100644 index eb1dcd11..00000000 --- a/customSDK/servicefabric/models/node_health_state_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_py3 import EntityHealthState - - -class NodeHealthState(EntityHealthState): - """Represents the health state of a node, which contains the node identifier - and its aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param name: The name of a Service Fabric node. - :type name: str - :param id: An internal ID used by Service Fabric to uniquely identify a - node. Node Id is deterministically generated from node name. - :type id: ~azure.servicefabric.models.NodeId - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'NodeId'}, - } - - def __init__(self, *, aggregated_health_state=None, name: str=None, id=None, **kwargs) -> None: - super(NodeHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.name = name - self.id = id diff --git a/customSDK/servicefabric/models/node_id.py b/customSDK/servicefabric/models/node_id.py deleted file mode 100644 index 9fc1e33a..00000000 --- a/customSDK/servicefabric/models/node_id.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeId(Model): - """An internal ID used by Service Fabric to uniquely identify a node. Node Id - is deterministically generated from node name. - - :param id: Value of the node Id. This is a 128 bit integer. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeId, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/customSDK/servicefabric/models/node_id_py3.py b/customSDK/servicefabric/models/node_id_py3.py deleted file mode 100644 index 9e1ff8ca..00000000 --- a/customSDK/servicefabric/models/node_id_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeId(Model): - """An internal ID used by Service Fabric to uniquely identify a node. Node Id - is deterministically generated from node name. - - :param id: Value of the node Id. This is a 128 bit integer. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(NodeId, self).__init__(**kwargs) - self.id = id diff --git a/customSDK/servicefabric/models/node_impact.py b/customSDK/servicefabric/models/node_impact.py deleted file mode 100644 index fc2ba3d8..00000000 --- a/customSDK/servicefabric/models/node_impact.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeImpact(Model): - """Describes the expected impact of a repair to a particular node. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param node_name: Required. The name of the impacted node. - :type node_name: str - :param impact_level: The level of impact expected. Possible values - include: 'Invalid', 'None', 'Restart', 'RemoveData', 'RemoveNode' - :type impact_level: str or ~azure.servicefabric.models.ImpactLevel - """ - - _validation = { - 'node_name': {'required': True}, - } - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'impact_level': {'key': 'ImpactLevel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeImpact, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.impact_level = kwargs.get('impact_level', None) diff --git a/customSDK/servicefabric/models/node_impact_py3.py b/customSDK/servicefabric/models/node_impact_py3.py deleted file mode 100644 index 679c9110..00000000 --- a/customSDK/servicefabric/models/node_impact_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeImpact(Model): - """Describes the expected impact of a repair to a particular node. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param node_name: Required. The name of the impacted node. - :type node_name: str - :param impact_level: The level of impact expected. Possible values - include: 'Invalid', 'None', 'Restart', 'RemoveData', 'RemoveNode' - :type impact_level: str or ~azure.servicefabric.models.ImpactLevel - """ - - _validation = { - 'node_name': {'required': True}, - } - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'impact_level': {'key': 'ImpactLevel', 'type': 'str'}, - } - - def __init__(self, *, node_name: str, impact_level=None, **kwargs) -> None: - super(NodeImpact, self).__init__(**kwargs) - self.node_name = node_name - self.impact_level = impact_level diff --git a/customSDK/servicefabric/models/node_info.py b/customSDK/servicefabric/models/node_info.py deleted file mode 100644 index abde3036..00000000 --- a/customSDK/servicefabric/models/node_info.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeInfo(Model): - """Information about a node in Service Fabric cluster. - - :param name: The name of a Service Fabric node. - :type name: str - :param ip_address_or_fqdn: The IP address or fully qualified domain name - of the node. - :type ip_address_or_fqdn: str - :param type: The type of the node. - :type type: str - :param code_version: The version of Service Fabric binaries that the node - is running. - :type code_version: str - :param config_version: The version of Service Fabric cluster manifest that - the node is using. - :type config_version: str - :param node_status: The status of the node. Possible values include: - 'Invalid', 'Up', 'Down', 'Enabling', 'Disabling', 'Disabled', 'Unknown', - 'Removed' - :type node_status: str or ~azure.servicefabric.models.NodeStatus - :param node_up_time_in_seconds: Time in seconds since the node has been in - NodeStatus Up. Value zero indicates that the node is not Up. - :type node_up_time_in_seconds: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param is_seed_node: Indicates if the node is a seed node or not. Returns - true if the node is a seed node, otherwise false. A quorum of seed nodes - are required for proper operation of Service Fabric cluster. - :type is_seed_node: bool - :param upgrade_domain: The upgrade domain of the node. - :type upgrade_domain: str - :param fault_domain: The fault domain of the node. - :type fault_domain: str - :param id: An internal ID used by Service Fabric to uniquely identify a - node. Node Id is deterministically generated from node name. - :type id: ~azure.servicefabric.models.NodeId - :param instance_id: The ID representing the node instance. While the ID of - the node is deterministically generated from the node name and remains - same across restarts, the InstanceId changes every time node restarts. - :type instance_id: str - :param node_deactivation_info: Information about the node deactivation. - This information is valid for a node that is undergoing deactivation or - has already been deactivated. - :type node_deactivation_info: - ~azure.servicefabric.models.NodeDeactivationInfo - :param is_stopped: Indicates if the node is stopped by calling stop node - API or not. Returns true if the node is stopped, otherwise false. - :type is_stopped: bool - :param node_down_time_in_seconds: Time in seconds since the node has been - in NodeStatus Down. Value zero indicates node is not NodeStatus Down. - :type node_down_time_in_seconds: str - :param node_up_at: Date time in UTC when the node came up. If the node has - never been up then this value will be zero date time. - :type node_up_at: datetime - :param node_down_at: Date time in UTC when the node went down. If node has - never been down then this value will be zero date time. - :type node_down_at: datetime - :param node_tags: List that contains tags, which will be applied to the - nodes. - :type node_tags: list[str] - :param is_node_by_node_upgrade_in_progress: Indicates if a node-by-node - upgrade is currently being performed on this node. - :type is_node_by_node_upgrade_in_progress: bool - :param infrastructure_placement_id: PlacementID used by the - InfrastructureService. - :type infrastructure_placement_id: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'node_status': {'key': 'NodeStatus', 'type': 'str'}, - 'node_up_time_in_seconds': {'key': 'NodeUpTimeInSeconds', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'NodeId'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'node_deactivation_info': {'key': 'NodeDeactivationInfo', 'type': 'NodeDeactivationInfo'}, - 'is_stopped': {'key': 'IsStopped', 'type': 'bool'}, - 'node_down_time_in_seconds': {'key': 'NodeDownTimeInSeconds', 'type': 'str'}, - 'node_up_at': {'key': 'NodeUpAt', 'type': 'iso-8601'}, - 'node_down_at': {'key': 'NodeDownAt', 'type': 'iso-8601'}, - 'node_tags': {'key': 'NodeTags', 'type': '[str]'}, - 'is_node_by_node_upgrade_in_progress': {'key': 'IsNodeByNodeUpgradeInProgress', 'type': 'bool'}, - 'infrastructure_placement_id': {'key': 'InfrastructurePlacementID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.type = kwargs.get('type', None) - self.code_version = kwargs.get('code_version', None) - self.config_version = kwargs.get('config_version', None) - self.node_status = kwargs.get('node_status', None) - self.node_up_time_in_seconds = kwargs.get('node_up_time_in_seconds', None) - self.health_state = kwargs.get('health_state', None) - self.is_seed_node = kwargs.get('is_seed_node', None) - self.upgrade_domain = kwargs.get('upgrade_domain', None) - self.fault_domain = kwargs.get('fault_domain', None) - self.id = kwargs.get('id', None) - self.instance_id = kwargs.get('instance_id', None) - self.node_deactivation_info = kwargs.get('node_deactivation_info', None) - self.is_stopped = kwargs.get('is_stopped', None) - self.node_down_time_in_seconds = kwargs.get('node_down_time_in_seconds', None) - self.node_up_at = kwargs.get('node_up_at', None) - self.node_down_at = kwargs.get('node_down_at', None) - self.node_tags = kwargs.get('node_tags', None) - self.is_node_by_node_upgrade_in_progress = kwargs.get('is_node_by_node_upgrade_in_progress', None) - self.infrastructure_placement_id = kwargs.get('infrastructure_placement_id', None) diff --git a/customSDK/servicefabric/models/node_info_py3.py b/customSDK/servicefabric/models/node_info_py3.py deleted file mode 100644 index b7d19cea..00000000 --- a/customSDK/servicefabric/models/node_info_py3.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeInfo(Model): - """Information about a node in Service Fabric cluster. - - :param name: The name of a Service Fabric node. - :type name: str - :param ip_address_or_fqdn: The IP address or fully qualified domain name - of the node. - :type ip_address_or_fqdn: str - :param type: The type of the node. - :type type: str - :param code_version: The version of Service Fabric binaries that the node - is running. - :type code_version: str - :param config_version: The version of Service Fabric cluster manifest that - the node is using. - :type config_version: str - :param node_status: The status of the node. Possible values include: - 'Invalid', 'Up', 'Down', 'Enabling', 'Disabling', 'Disabled', 'Unknown', - 'Removed' - :type node_status: str or ~azure.servicefabric.models.NodeStatus - :param node_up_time_in_seconds: Time in seconds since the node has been in - NodeStatus Up. Value zero indicates that the node is not Up. - :type node_up_time_in_seconds: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param is_seed_node: Indicates if the node is a seed node or not. Returns - true if the node is a seed node, otherwise false. A quorum of seed nodes - are required for proper operation of Service Fabric cluster. - :type is_seed_node: bool - :param upgrade_domain: The upgrade domain of the node. - :type upgrade_domain: str - :param fault_domain: The fault domain of the node. - :type fault_domain: str - :param id: An internal ID used by Service Fabric to uniquely identify a - node. Node Id is deterministically generated from node name. - :type id: ~azure.servicefabric.models.NodeId - :param instance_id: The ID representing the node instance. While the ID of - the node is deterministically generated from the node name and remains - same across restarts, the InstanceId changes every time node restarts. - :type instance_id: str - :param node_deactivation_info: Information about the node deactivation. - This information is valid for a node that is undergoing deactivation or - has already been deactivated. - :type node_deactivation_info: - ~azure.servicefabric.models.NodeDeactivationInfo - :param is_stopped: Indicates if the node is stopped by calling stop node - API or not. Returns true if the node is stopped, otherwise false. - :type is_stopped: bool - :param node_down_time_in_seconds: Time in seconds since the node has been - in NodeStatus Down. Value zero indicates node is not NodeStatus Down. - :type node_down_time_in_seconds: str - :param node_up_at: Date time in UTC when the node came up. If the node has - never been up then this value will be zero date time. - :type node_up_at: datetime - :param node_down_at: Date time in UTC when the node went down. If node has - never been down then this value will be zero date time. - :type node_down_at: datetime - :param node_tags: List that contains tags, which will be applied to the - nodes. - :type node_tags: list[str] - :param is_node_by_node_upgrade_in_progress: Indicates if a node-by-node - upgrade is currently being performed on this node. - :type is_node_by_node_upgrade_in_progress: bool - :param infrastructure_placement_id: PlacementID used by the - InfrastructureService. - :type infrastructure_placement_id: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'node_status': {'key': 'NodeStatus', 'type': 'str'}, - 'node_up_time_in_seconds': {'key': 'NodeUpTimeInSeconds', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'NodeId'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'node_deactivation_info': {'key': 'NodeDeactivationInfo', 'type': 'NodeDeactivationInfo'}, - 'is_stopped': {'key': 'IsStopped', 'type': 'bool'}, - 'node_down_time_in_seconds': {'key': 'NodeDownTimeInSeconds', 'type': 'str'}, - 'node_up_at': {'key': 'NodeUpAt', 'type': 'iso-8601'}, - 'node_down_at': {'key': 'NodeDownAt', 'type': 'iso-8601'}, - 'node_tags': {'key': 'NodeTags', 'type': '[str]'}, - 'is_node_by_node_upgrade_in_progress': {'key': 'IsNodeByNodeUpgradeInProgress', 'type': 'bool'}, - 'infrastructure_placement_id': {'key': 'InfrastructurePlacementID', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, ip_address_or_fqdn: str=None, type: str=None, code_version: str=None, config_version: str=None, node_status=None, node_up_time_in_seconds: str=None, health_state=None, is_seed_node: bool=None, upgrade_domain: str=None, fault_domain: str=None, id=None, instance_id: str=None, node_deactivation_info=None, is_stopped: bool=None, node_down_time_in_seconds: str=None, node_up_at=None, node_down_at=None, node_tags=None, is_node_by_node_upgrade_in_progress: bool=None, infrastructure_placement_id: str=None, **kwargs) -> None: - super(NodeInfo, self).__init__(**kwargs) - self.name = name - self.ip_address_or_fqdn = ip_address_or_fqdn - self.type = type - self.code_version = code_version - self.config_version = config_version - self.node_status = node_status - self.node_up_time_in_seconds = node_up_time_in_seconds - self.health_state = health_state - self.is_seed_node = is_seed_node - self.upgrade_domain = upgrade_domain - self.fault_domain = fault_domain - self.id = id - self.instance_id = instance_id - self.node_deactivation_info = node_deactivation_info - self.is_stopped = is_stopped - self.node_down_time_in_seconds = node_down_time_in_seconds - self.node_up_at = node_up_at - self.node_down_at = node_down_at - self.node_tags = node_tags - self.is_node_by_node_upgrade_in_progress = is_node_by_node_upgrade_in_progress - self.infrastructure_placement_id = infrastructure_placement_id diff --git a/customSDK/servicefabric/models/node_load_info.py b/customSDK/servicefabric/models/node_load_info.py deleted file mode 100644 index 45c4cfce..00000000 --- a/customSDK/servicefabric/models/node_load_info.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeLoadInfo(Model): - """Information about load on a Service Fabric node. It holds a summary of all - metrics and their load on a node. - - :param node_name: Name of the node for which the load information is - provided by this object. - :type node_name: str - :param node_load_metric_information: List that contains metrics and their - load information on this node. - :type node_load_metric_information: - list[~azure.servicefabric.models.NodeLoadMetricInformation] - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_load_metric_information': {'key': 'NodeLoadMetricInformation', 'type': '[NodeLoadMetricInformation]'}, - } - - def __init__(self, **kwargs): - super(NodeLoadInfo, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.node_load_metric_information = kwargs.get('node_load_metric_information', None) diff --git a/customSDK/servicefabric/models/node_load_info_py3.py b/customSDK/servicefabric/models/node_load_info_py3.py deleted file mode 100644 index 4124daeb..00000000 --- a/customSDK/servicefabric/models/node_load_info_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeLoadInfo(Model): - """Information about load on a Service Fabric node. It holds a summary of all - metrics and their load on a node. - - :param node_name: Name of the node for which the load information is - provided by this object. - :type node_name: str - :param node_load_metric_information: List that contains metrics and their - load information on this node. - :type node_load_metric_information: - list[~azure.servicefabric.models.NodeLoadMetricInformation] - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_load_metric_information': {'key': 'NodeLoadMetricInformation', 'type': '[NodeLoadMetricInformation]'}, - } - - def __init__(self, *, node_name: str=None, node_load_metric_information=None, **kwargs) -> None: - super(NodeLoadInfo, self).__init__(**kwargs) - self.node_name = node_name - self.node_load_metric_information = node_load_metric_information diff --git a/customSDK/servicefabric/models/node_load_metric_information.py b/customSDK/servicefabric/models/node_load_metric_information.py deleted file mode 100644 index 7f66076b..00000000 --- a/customSDK/servicefabric/models/node_load_metric_information.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeLoadMetricInformation(Model): - """Represents data structure that contains load information for a certain - metric on a node. - - :param name: Name of the metric for which this load information is - provided. - :type name: str - :param node_capacity: Total capacity on the node for this metric. - :type node_capacity: str - :param node_load: Current load on the node for this metric. In future - releases of Service Fabric this parameter will be deprecated in favor of - CurrentNodeLoad. - :type node_load: str - :param node_remaining_capacity: The remaining capacity on the node for - this metric. In future releases of Service Fabric this parameter will be - deprecated in favor of NodeCapacityRemaining. - :type node_remaining_capacity: str - :param is_capacity_violation: Indicates if there is a capacity violation - for this metric on the node. - :type is_capacity_violation: bool - :param node_buffered_capacity: The value that indicates the reserved - capacity for this metric on the node. - :type node_buffered_capacity: str - :param node_remaining_buffered_capacity: The remaining reserved capacity - for this metric on the node. In future releases of Service Fabric this - parameter will be deprecated in favor of BufferedNodeCapacityRemaining. - :type node_remaining_buffered_capacity: str - :param current_node_load: Current load on the node for this metric. - :type current_node_load: str - :param node_capacity_remaining: The remaining capacity on the node for the - metric. - :type node_capacity_remaining: str - :param buffered_node_capacity_remaining: The remaining capacity which is - not reserved by NodeBufferPercentage for this metric on the node. - :type buffered_node_capacity_remaining: str - :param planned_node_load_removal: This value represents the load of the - replicas that are planned to be removed in the future. - This kind of load is reported for replicas that are currently being moving - to other nodes and for replicas that are currently being dropped but still - use the load on the source node. - :type planned_node_load_removal: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'node_capacity': {'key': 'NodeCapacity', 'type': 'str'}, - 'node_load': {'key': 'NodeLoad', 'type': 'str'}, - 'node_remaining_capacity': {'key': 'NodeRemainingCapacity', 'type': 'str'}, - 'is_capacity_violation': {'key': 'IsCapacityViolation', 'type': 'bool'}, - 'node_buffered_capacity': {'key': 'NodeBufferedCapacity', 'type': 'str'}, - 'node_remaining_buffered_capacity': {'key': 'NodeRemainingBufferedCapacity', 'type': 'str'}, - 'current_node_load': {'key': 'CurrentNodeLoad', 'type': 'str'}, - 'node_capacity_remaining': {'key': 'NodeCapacityRemaining', 'type': 'str'}, - 'buffered_node_capacity_remaining': {'key': 'BufferedNodeCapacityRemaining', 'type': 'str'}, - 'planned_node_load_removal': {'key': 'PlannedNodeLoadRemoval', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeLoadMetricInformation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.node_capacity = kwargs.get('node_capacity', None) - self.node_load = kwargs.get('node_load', None) - self.node_remaining_capacity = kwargs.get('node_remaining_capacity', None) - self.is_capacity_violation = kwargs.get('is_capacity_violation', None) - self.node_buffered_capacity = kwargs.get('node_buffered_capacity', None) - self.node_remaining_buffered_capacity = kwargs.get('node_remaining_buffered_capacity', None) - self.current_node_load = kwargs.get('current_node_load', None) - self.node_capacity_remaining = kwargs.get('node_capacity_remaining', None) - self.buffered_node_capacity_remaining = kwargs.get('buffered_node_capacity_remaining', None) - self.planned_node_load_removal = kwargs.get('planned_node_load_removal', None) diff --git a/customSDK/servicefabric/models/node_load_metric_information_py3.py b/customSDK/servicefabric/models/node_load_metric_information_py3.py deleted file mode 100644 index 009f09d2..00000000 --- a/customSDK/servicefabric/models/node_load_metric_information_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeLoadMetricInformation(Model): - """Represents data structure that contains load information for a certain - metric on a node. - - :param name: Name of the metric for which this load information is - provided. - :type name: str - :param node_capacity: Total capacity on the node for this metric. - :type node_capacity: str - :param node_load: Current load on the node for this metric. In future - releases of Service Fabric this parameter will be deprecated in favor of - CurrentNodeLoad. - :type node_load: str - :param node_remaining_capacity: The remaining capacity on the node for - this metric. In future releases of Service Fabric this parameter will be - deprecated in favor of NodeCapacityRemaining. - :type node_remaining_capacity: str - :param is_capacity_violation: Indicates if there is a capacity violation - for this metric on the node. - :type is_capacity_violation: bool - :param node_buffered_capacity: The value that indicates the reserved - capacity for this metric on the node. - :type node_buffered_capacity: str - :param node_remaining_buffered_capacity: The remaining reserved capacity - for this metric on the node. In future releases of Service Fabric this - parameter will be deprecated in favor of BufferedNodeCapacityRemaining. - :type node_remaining_buffered_capacity: str - :param current_node_load: Current load on the node for this metric. - :type current_node_load: str - :param node_capacity_remaining: The remaining capacity on the node for the - metric. - :type node_capacity_remaining: str - :param buffered_node_capacity_remaining: The remaining capacity which is - not reserved by NodeBufferPercentage for this metric on the node. - :type buffered_node_capacity_remaining: str - :param planned_node_load_removal: This value represents the load of the - replicas that are planned to be removed in the future. - This kind of load is reported for replicas that are currently being moving - to other nodes and for replicas that are currently being dropped but still - use the load on the source node. - :type planned_node_load_removal: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'node_capacity': {'key': 'NodeCapacity', 'type': 'str'}, - 'node_load': {'key': 'NodeLoad', 'type': 'str'}, - 'node_remaining_capacity': {'key': 'NodeRemainingCapacity', 'type': 'str'}, - 'is_capacity_violation': {'key': 'IsCapacityViolation', 'type': 'bool'}, - 'node_buffered_capacity': {'key': 'NodeBufferedCapacity', 'type': 'str'}, - 'node_remaining_buffered_capacity': {'key': 'NodeRemainingBufferedCapacity', 'type': 'str'}, - 'current_node_load': {'key': 'CurrentNodeLoad', 'type': 'str'}, - 'node_capacity_remaining': {'key': 'NodeCapacityRemaining', 'type': 'str'}, - 'buffered_node_capacity_remaining': {'key': 'BufferedNodeCapacityRemaining', 'type': 'str'}, - 'planned_node_load_removal': {'key': 'PlannedNodeLoadRemoval', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, node_capacity: str=None, node_load: str=None, node_remaining_capacity: str=None, is_capacity_violation: bool=None, node_buffered_capacity: str=None, node_remaining_buffered_capacity: str=None, current_node_load: str=None, node_capacity_remaining: str=None, buffered_node_capacity_remaining: str=None, planned_node_load_removal: str=None, **kwargs) -> None: - super(NodeLoadMetricInformation, self).__init__(**kwargs) - self.name = name - self.node_capacity = node_capacity - self.node_load = node_load - self.node_remaining_capacity = node_remaining_capacity - self.is_capacity_violation = is_capacity_violation - self.node_buffered_capacity = node_buffered_capacity - self.node_remaining_buffered_capacity = node_remaining_buffered_capacity - self.current_node_load = current_node_load - self.node_capacity_remaining = node_capacity_remaining - self.buffered_node_capacity_remaining = buffered_node_capacity_remaining - self.planned_node_load_removal = planned_node_load_removal diff --git a/customSDK/servicefabric/models/node_new_health_report_event.py b/customSDK/servicefabric/models/node_new_health_report_event.py deleted file mode 100644 index d8f835a0..00000000 --- a/customSDK/servicefabric/models/node_new_health_report_event.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event import NodeEvent - - -class NodeNewHealthReportEvent(NodeEvent): - """Node Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: Required. Id of Node instance. - :type node_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(NodeNewHealthReportEvent, self).__init__(**kwargs) - self.node_instance_id = kwargs.get('node_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'NodeNewHealthReport' diff --git a/customSDK/servicefabric/models/node_new_health_report_event_py3.py b/customSDK/servicefabric/models/node_new_health_report_event_py3.py deleted file mode 100644 index bf7a0eff..00000000 --- a/customSDK/servicefabric/models/node_new_health_report_event_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event_py3 import NodeEvent - - -class NodeNewHealthReportEvent(NodeEvent): - """Node Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: Required. Id of Node instance. - :type node_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance_id = node_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'NodeNewHealthReport' diff --git a/customSDK/servicefabric/models/node_open_failed_event.py b/customSDK/servicefabric/models/node_open_failed_event.py deleted file mode 100644 index e7fb8fbe..00000000 --- a/customSDK/servicefabric/models/node_open_failed_event.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event import NodeEvent - - -class NodeOpenFailedEvent(NodeEvent): - """Node Open Failed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_id: Required. Id of Node. - :type node_id: str - :param upgrade_domain: Required. Upgrade domain of Node. - :type upgrade_domain: str - :param fault_domain: Required. Fault domain of Node. - :type fault_domain: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param hostname: Required. Name of Host. - :type hostname: str - :param is_seed_node: Required. Indicates if it is seed node. - :type is_seed_node: bool - :param node_version: Required. Version of Node. - :type node_version: str - :param error: Required. Describes the error. - :type error: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - 'error': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - 'error': {'key': 'Error', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeOpenFailedEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.node_id = kwargs.get('node_id', None) - self.upgrade_domain = kwargs.get('upgrade_domain', None) - self.fault_domain = kwargs.get('fault_domain', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.hostname = kwargs.get('hostname', None) - self.is_seed_node = kwargs.get('is_seed_node', None) - self.node_version = kwargs.get('node_version', None) - self.error = kwargs.get('error', None) - self.kind = 'NodeOpenFailed' diff --git a/customSDK/servicefabric/models/node_open_failed_event_py3.py b/customSDK/servicefabric/models/node_open_failed_event_py3.py deleted file mode 100644 index 8f9e240f..00000000 --- a/customSDK/servicefabric/models/node_open_failed_event_py3.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event_py3 import NodeEvent - - -class NodeOpenFailedEvent(NodeEvent): - """Node Open Failed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_id: Required. Id of Node. - :type node_id: str - :param upgrade_domain: Required. Upgrade domain of Node. - :type upgrade_domain: str - :param fault_domain: Required. Fault domain of Node. - :type fault_domain: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param hostname: Required. Name of Host. - :type hostname: str - :param is_seed_node: Required. Indicates if it is seed node. - :type is_seed_node: bool - :param node_version: Required. Version of Node. - :type node_version: str - :param error: Required. Describes the error. - :type error: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - 'error': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - 'error': {'key': 'Error', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, node_id: str, upgrade_domain: str, fault_domain: str, ip_address_or_fqdn: str, hostname: str, is_seed_node: bool, node_version: str, error: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeOpenFailedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance = node_instance - self.node_id = node_id - self.upgrade_domain = upgrade_domain - self.fault_domain = fault_domain - self.ip_address_or_fqdn = ip_address_or_fqdn - self.hostname = hostname - self.is_seed_node = is_seed_node - self.node_version = node_version - self.error = error - self.kind = 'NodeOpenFailed' diff --git a/customSDK/servicefabric/models/node_open_succeeded_event.py b/customSDK/servicefabric/models/node_open_succeeded_event.py deleted file mode 100644 index a0ab8edc..00000000 --- a/customSDK/servicefabric/models/node_open_succeeded_event.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event import NodeEvent - - -class NodeOpenSucceededEvent(NodeEvent): - """Node Opened Succeeded event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_id: Required. Id of Node. - :type node_id: str - :param upgrade_domain: Required. Upgrade domain of Node. - :type upgrade_domain: str - :param fault_domain: Required. Fault domain of Node. - :type fault_domain: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param hostname: Required. Name of Host. - :type hostname: str - :param is_seed_node: Required. Indicates if it is seed node. - :type is_seed_node: bool - :param node_version: Required. Version of Node. - :type node_version: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeOpenSucceededEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.node_id = kwargs.get('node_id', None) - self.upgrade_domain = kwargs.get('upgrade_domain', None) - self.fault_domain = kwargs.get('fault_domain', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.hostname = kwargs.get('hostname', None) - self.is_seed_node = kwargs.get('is_seed_node', None) - self.node_version = kwargs.get('node_version', None) - self.kind = 'NodeOpenSucceeded' diff --git a/customSDK/servicefabric/models/node_open_succeeded_event_py3.py b/customSDK/servicefabric/models/node_open_succeeded_event_py3.py deleted file mode 100644 index e29ba22f..00000000 --- a/customSDK/servicefabric/models/node_open_succeeded_event_py3.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event_py3 import NodeEvent - - -class NodeOpenSucceededEvent(NodeEvent): - """Node Opened Succeeded event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_id: Required. Id of Node. - :type node_id: str - :param upgrade_domain: Required. Upgrade domain of Node. - :type upgrade_domain: str - :param fault_domain: Required. Fault domain of Node. - :type fault_domain: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param hostname: Required. Name of Host. - :type hostname: str - :param is_seed_node: Required. Indicates if it is seed node. - :type is_seed_node: bool - :param node_version: Required. Version of Node. - :type node_version: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, node_id: str, upgrade_domain: str, fault_domain: str, ip_address_or_fqdn: str, hostname: str, is_seed_node: bool, node_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeOpenSucceededEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance = node_instance - self.node_id = node_id - self.upgrade_domain = upgrade_domain - self.fault_domain = fault_domain - self.ip_address_or_fqdn = ip_address_or_fqdn - self.hostname = hostname - self.is_seed_node = is_seed_node - self.node_version = node_version - self.kind = 'NodeOpenSucceeded' diff --git a/customSDK/servicefabric/models/node_removed_from_cluster_event.py b/customSDK/servicefabric/models/node_removed_from_cluster_event.py deleted file mode 100644 index 651954f9..00000000 --- a/customSDK/servicefabric/models/node_removed_from_cluster_event.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event import NodeEvent - - -class NodeRemovedFromClusterEvent(NodeEvent): - """Node Removed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_id: Required. Id of Node. - :type node_id: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_type: Required. Type of Node. - :type node_type: str - :param fabric_version: Required. Fabric version. - :type fabric_version: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param node_capacities: Required. Capacities. - :type node_capacities: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'node_type': {'required': True}, - 'fabric_version': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'node_capacities': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_type': {'key': 'NodeType', 'type': 'str'}, - 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeRemovedFromClusterEvent, self).__init__(**kwargs) - self.node_id = kwargs.get('node_id', None) - self.node_instance = kwargs.get('node_instance', None) - self.node_type = kwargs.get('node_type', None) - self.fabric_version = kwargs.get('fabric_version', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.node_capacities = kwargs.get('node_capacities', None) - self.kind = 'NodeRemovedFromCluster' diff --git a/customSDK/servicefabric/models/node_removed_from_cluster_event_py3.py b/customSDK/servicefabric/models/node_removed_from_cluster_event_py3.py deleted file mode 100644 index dfbf977f..00000000 --- a/customSDK/servicefabric/models/node_removed_from_cluster_event_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event_py3 import NodeEvent - - -class NodeRemovedFromClusterEvent(NodeEvent): - """Node Removed event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_id: Required. Id of Node. - :type node_id: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param node_type: Required. Type of Node. - :type node_type: str - :param fabric_version: Required. Fabric version. - :type fabric_version: str - :param ip_address_or_fqdn: Required. IP address or FQDN. - :type ip_address_or_fqdn: str - :param node_capacities: Required. Capacities. - :type node_capacities: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'node_type': {'required': True}, - 'fabric_version': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'node_capacities': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_type': {'key': 'NodeType', 'type': 'str'}, - 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_id: str, node_instance: int, node_type: str, fabric_version: str, ip_address_or_fqdn: str, node_capacities: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeRemovedFromClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_id = node_id - self.node_instance = node_instance - self.node_type = node_type - self.fabric_version = fabric_version - self.ip_address_or_fqdn = ip_address_or_fqdn - self.node_capacities = node_capacities - self.kind = 'NodeRemovedFromCluster' diff --git a/customSDK/servicefabric/models/node_repair_impact_description.py b/customSDK/servicefabric/models/node_repair_impact_description.py deleted file mode 100644 index cf0eb237..00000000 --- a/customSDK/servicefabric/models/node_repair_impact_description.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .repair_impact_description_base import RepairImpactDescriptionBase - - -class NodeRepairImpactDescription(RepairImpactDescriptionBase): - """Describes the expected impact of a repair on a set of nodes. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param node_impact_list: The list of nodes impacted by a repair action and - their respective expected impact. - :type node_impact_list: list[~azure.servicefabric.models.NodeImpact] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_impact_list': {'key': 'NodeImpactList', 'type': '[NodeImpact]'}, - } - - def __init__(self, **kwargs): - super(NodeRepairImpactDescription, self).__init__(**kwargs) - self.node_impact_list = kwargs.get('node_impact_list', None) - self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_repair_impact_description_py3.py b/customSDK/servicefabric/models/node_repair_impact_description_py3.py deleted file mode 100644 index 09f45ce8..00000000 --- a/customSDK/servicefabric/models/node_repair_impact_description_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .repair_impact_description_base_py3 import RepairImpactDescriptionBase - - -class NodeRepairImpactDescription(RepairImpactDescriptionBase): - """Describes the expected impact of a repair on a set of nodes. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param node_impact_list: The list of nodes impacted by a repair action and - their respective expected impact. - :type node_impact_list: list[~azure.servicefabric.models.NodeImpact] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_impact_list': {'key': 'NodeImpactList', 'type': '[NodeImpact]'}, - } - - def __init__(self, *, node_impact_list=None, **kwargs) -> None: - super(NodeRepairImpactDescription, self).__init__(**kwargs) - self.node_impact_list = node_impact_list - self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_repair_target_description.py b/customSDK/servicefabric/models/node_repair_target_description.py deleted file mode 100644 index 5a2eff32..00000000 --- a/customSDK/servicefabric/models/node_repair_target_description.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .repair_target_description_base import RepairTargetDescriptionBase - - -class NodeRepairTargetDescription(RepairTargetDescriptionBase): - """Describes the list of nodes targeted by a repair action. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param node_names: The list of nodes targeted by a repair action. - :type node_names: list[str] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_names': {'key': 'NodeNames', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(NodeRepairTargetDescription, self).__init__(**kwargs) - self.node_names = kwargs.get('node_names', None) - self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_repair_target_description_py3.py b/customSDK/servicefabric/models/node_repair_target_description_py3.py deleted file mode 100644 index 88204018..00000000 --- a/customSDK/servicefabric/models/node_repair_target_description_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .repair_target_description_base_py3 import RepairTargetDescriptionBase - - -class NodeRepairTargetDescription(RepairTargetDescriptionBase): - """Describes the list of nodes targeted by a repair action. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param node_names: The list of nodes targeted by a repair action. - :type node_names: list[str] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_names': {'key': 'NodeNames', 'type': '[str]'}, - } - - def __init__(self, *, node_names=None, **kwargs) -> None: - super(NodeRepairTargetDescription, self).__init__(**kwargs) - self.node_names = node_names - self.kind = 'Node' diff --git a/customSDK/servicefabric/models/node_result.py b/customSDK/servicefabric/models/node_result.py deleted file mode 100644 index 54e79ef1..00000000 --- a/customSDK/servicefabric/models/node_result.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeResult(Model): - """Contains information about a node that was targeted by a user-induced - operation. - - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: The node instance id. - :type node_instance_id: str - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeResult, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.node_instance_id = kwargs.get('node_instance_id', None) diff --git a/customSDK/servicefabric/models/node_result_py3.py b/customSDK/servicefabric/models/node_result_py3.py deleted file mode 100644 index 6efb6638..00000000 --- a/customSDK/servicefabric/models/node_result_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeResult(Model): - """Contains information about a node that was targeted by a user-induced - operation. - - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: The node instance id. - :type node_instance_id: str - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - } - - def __init__(self, *, node_name: str=None, node_instance_id: str=None, **kwargs) -> None: - super(NodeResult, self).__init__(**kwargs) - self.node_name = node_name - self.node_instance_id = node_instance_id diff --git a/customSDK/servicefabric/models/node_tags_description.py b/customSDK/servicefabric/models/node_tags_description.py deleted file mode 100644 index 1ab5d873..00000000 --- a/customSDK/servicefabric/models/node_tags_description.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeTagsDescription(Model): - """Describes the tags required for placement or running of the service. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. The number of tags. - :type count: int - :param tags: Required. Array of size specified by the ‘Count’ parameter, - for the placement tags of the service. - :type tags: list[str] - """ - - _validation = { - 'count': {'required': True}, - 'tags': {'required': True}, - } - - _attribute_map = { - 'count': {'key': 'Count', 'type': 'int'}, - 'tags': {'key': 'Tags', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(NodeTagsDescription, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.tags = kwargs.get('tags', None) diff --git a/customSDK/servicefabric/models/node_tags_description_py3.py b/customSDK/servicefabric/models/node_tags_description_py3.py deleted file mode 100644 index 3dd9e60c..00000000 --- a/customSDK/servicefabric/models/node_tags_description_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeTagsDescription(Model): - """Describes the tags required for placement or running of the service. - - All required parameters must be populated in order to send to Azure. - - :param count: Required. The number of tags. - :type count: int - :param tags: Required. Array of size specified by the ‘Count’ parameter, - for the placement tags of the service. - :type tags: list[str] - """ - - _validation = { - 'count': {'required': True}, - 'tags': {'required': True}, - } - - _attribute_map = { - 'count': {'key': 'Count', 'type': 'int'}, - 'tags': {'key': 'Tags', 'type': '[str]'}, - } - - def __init__(self, *, count: int, tags, **kwargs) -> None: - super(NodeTagsDescription, self).__init__(**kwargs) - self.count = count - self.tags = tags diff --git a/customSDK/servicefabric/models/node_transition_progress.py b/customSDK/servicefabric/models/node_transition_progress.py deleted file mode 100644 index f60972ef..00000000 --- a/customSDK/servicefabric/models/node_transition_progress.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeTransitionProgress(Model): - """Information about an NodeTransition operation. This class contains an - OperationState and a NodeTransitionResult. The NodeTransitionResult is not - valid until OperationState - is Completed or Faulted. - - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param node_transition_result: Represents information about an operation - in a terminal state (Completed or Faulted). - :type node_transition_result: - ~azure.servicefabric.models.NodeTransitionResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'node_transition_result': {'key': 'NodeTransitionResult', 'type': 'NodeTransitionResult'}, - } - - def __init__(self, **kwargs): - super(NodeTransitionProgress, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.node_transition_result = kwargs.get('node_transition_result', None) diff --git a/customSDK/servicefabric/models/node_transition_progress_py3.py b/customSDK/servicefabric/models/node_transition_progress_py3.py deleted file mode 100644 index 3a748068..00000000 --- a/customSDK/servicefabric/models/node_transition_progress_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeTransitionProgress(Model): - """Information about an NodeTransition operation. This class contains an - OperationState and a NodeTransitionResult. The NodeTransitionResult is not - valid until OperationState - is Completed or Faulted. - - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param node_transition_result: Represents information about an operation - in a terminal state (Completed or Faulted). - :type node_transition_result: - ~azure.servicefabric.models.NodeTransitionResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'node_transition_result': {'key': 'NodeTransitionResult', 'type': 'NodeTransitionResult'}, - } - - def __init__(self, *, state=None, node_transition_result=None, **kwargs) -> None: - super(NodeTransitionProgress, self).__init__(**kwargs) - self.state = state - self.node_transition_result = node_transition_result diff --git a/customSDK/servicefabric/models/node_transition_result.py b/customSDK/servicefabric/models/node_transition_result.py deleted file mode 100644 index 45185d51..00000000 --- a/customSDK/servicefabric/models/node_transition_result.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeTransitionResult(Model): - """Represents information about an operation in a terminal state (Completed or - Faulted). - - :param error_code: If OperationState is Completed, this is 0. If - OperationState is Faulted, this is an error code indicating the reason. - :type error_code: int - :param node_result: Contains information about a node that was targeted by - a user-induced operation. - :type node_result: ~azure.servicefabric.models.NodeResult - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'node_result': {'key': 'NodeResult', 'type': 'NodeResult'}, - } - - def __init__(self, **kwargs): - super(NodeTransitionResult, self).__init__(**kwargs) - self.error_code = kwargs.get('error_code', None) - self.node_result = kwargs.get('node_result', None) diff --git a/customSDK/servicefabric/models/node_transition_result_py3.py b/customSDK/servicefabric/models/node_transition_result_py3.py deleted file mode 100644 index 17cbc327..00000000 --- a/customSDK/servicefabric/models/node_transition_result_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeTransitionResult(Model): - """Represents information about an operation in a terminal state (Completed or - Faulted). - - :param error_code: If OperationState is Completed, this is 0. If - OperationState is Faulted, this is an error code indicating the reason. - :type error_code: int - :param node_result: Contains information about a node that was targeted by - a user-induced operation. - :type node_result: ~azure.servicefabric.models.NodeResult - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'node_result': {'key': 'NodeResult', 'type': 'NodeResult'}, - } - - def __init__(self, *, error_code: int=None, node_result=None, **kwargs) -> None: - super(NodeTransitionResult, self).__init__(**kwargs) - self.error_code = error_code - self.node_result = node_result diff --git a/customSDK/servicefabric/models/node_type_health_policy_map_item.py b/customSDK/servicefabric/models/node_type_health_policy_map_item.py deleted file mode 100644 index f9494a31..00000000 --- a/customSDK/servicefabric/models/node_type_health_policy_map_item.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeTypeHealthPolicyMapItem(Model): - """Defines an item in NodeTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key of the node type health policy map item. - This is the name of the node type. - :type key: str - :param value: Required. The value of the node type health policy map item. - If the percentage is respected but there is at least one unhealthy node in - the node type, the health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy nodes - over the total number of nodes in the node type. - The computation rounds up to tolerate one failure on small numbers of - nodes. - The max percent unhealthy nodes allowed for the node type. Must be between - zero and 100. - :type value: int - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(NodeTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/node_type_health_policy_map_item_py3.py b/customSDK/servicefabric/models/node_type_health_policy_map_item_py3.py deleted file mode 100644 index 975a43ef..00000000 --- a/customSDK/servicefabric/models/node_type_health_policy_map_item_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeTypeHealthPolicyMapItem(Model): - """Defines an item in NodeTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key of the node type health policy map item. - This is the name of the node type. - :type key: str - :param value: Required. The value of the node type health policy map item. - If the percentage is respected but there is at least one unhealthy node in - the node type, the health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy nodes - over the total number of nodes in the node type. - The computation rounds up to tolerate one failure on small numbers of - nodes. - The max percent unhealthy nodes allowed for the node type. Must be between - zero and 100. - :type value: int - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - } - - def __init__(self, *, key: str, value: int, **kwargs) -> None: - super(NodeTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = key - self.value = value diff --git a/customSDK/servicefabric/models/node_type_nodes_health_evaluation.py b/customSDK/servicefabric/models/node_type_nodes_health_evaluation.py deleted file mode 100644 index 37344708..00000000 --- a/customSDK/servicefabric/models/node_type_nodes_health_evaluation.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class NodeTypeNodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for nodes of a particular node type. The node - type nodes evaluation can be returned when cluster health evaluation - returns unhealthy aggregated health state, either Error or Warning. It - contains health evaluations for each unhealthy node of the included node - type that impacted current aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param node_type_name: The node type name as defined in the cluster - manifest. - :type node_type_name: str - :param max_percent_unhealthy_nodes: Maximum allowed percentage of - unhealthy nodes for the node type, specified as an entry in - NodeTypeHealthPolicyMap. - :type max_percent_unhealthy_nodes: int - :param total_count: Total number of nodes of the node type found in the - health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - NodeHealthEvaluation of this node type that impacted the aggregated - health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_type_name': {'key': 'NodeTypeName', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(NodeTypeNodesHealthEvaluation, self).__init__(**kwargs) - self.node_type_name = kwargs.get('node_type_name', None) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'NodeTypeNodes' diff --git a/customSDK/servicefabric/models/node_type_nodes_health_evaluation_py3.py b/customSDK/servicefabric/models/node_type_nodes_health_evaluation_py3.py deleted file mode 100644 index d9b828e7..00000000 --- a/customSDK/servicefabric/models/node_type_nodes_health_evaluation_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class NodeTypeNodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for nodes of a particular node type. The node - type nodes evaluation can be returned when cluster health evaluation - returns unhealthy aggregated health state, either Error or Warning. It - contains health evaluations for each unhealthy node of the included node - type that impacted current aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param node_type_name: The node type name as defined in the cluster - manifest. - :type node_type_name: str - :param max_percent_unhealthy_nodes: Maximum allowed percentage of - unhealthy nodes for the node type, specified as an entry in - NodeTypeHealthPolicyMap. - :type max_percent_unhealthy_nodes: int - :param total_count: Total number of nodes of the node type found in the - health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - NodeHealthEvaluation of this node type that impacted the aggregated - health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_type_name': {'key': 'NodeTypeName', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, node_type_name: str=None, max_percent_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(NodeTypeNodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.node_type_name = node_type_name - self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'NodeTypeNodes' diff --git a/customSDK/servicefabric/models/node_up_event.py b/customSDK/servicefabric/models/node_up_event.py deleted file mode 100644 index bcacf73a..00000000 --- a/customSDK/servicefabric/models/node_up_event.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event import NodeEvent - - -class NodeUpEvent(NodeEvent): - """Node Up event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param last_node_down_at: Required. Time when Node was last down. - :type last_node_down_at: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'last_node_down_at': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'last_node_down_at': {'key': 'LastNodeDownAt', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(NodeUpEvent, self).__init__(**kwargs) - self.node_instance = kwargs.get('node_instance', None) - self.last_node_down_at = kwargs.get('last_node_down_at', None) - self.kind = 'NodeUp' diff --git a/customSDK/servicefabric/models/node_up_event_py3.py b/customSDK/servicefabric/models/node_up_event_py3.py deleted file mode 100644 index 4b02f97c..00000000 --- a/customSDK/servicefabric/models/node_up_event_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .node_event_py3 import NodeEvent - - -class NodeUpEvent(NodeEvent): - """Node Up event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance: Required. Id of Node instance. - :type node_instance: long - :param last_node_down_at: Required. Time when Node was last down. - :type last_node_down_at: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'last_node_down_at': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'last_node_down_at': {'key': 'LastNodeDownAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, node_name: str, node_instance: int, last_node_down_at, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(NodeUpEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.node_instance = node_instance - self.last_node_down_at = last_node_down_at - self.kind = 'NodeUp' diff --git a/customSDK/servicefabric/models/node_upgrade_progress_info.py b/customSDK/servicefabric/models/node_upgrade_progress_info.py deleted file mode 100644 index c4a81d2d..00000000 --- a/customSDK/servicefabric/models/node_upgrade_progress_info.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeUpgradeProgressInfo(Model): - """Information about the upgrading node and its status. - - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param upgrade_phase: The state of the upgrading node. Possible values - include: 'Invalid', 'PreUpgradeSafetyCheck', 'Upgrading', - 'PostUpgradeSafetyCheck' - :type upgrade_phase: str or ~azure.servicefabric.models.NodeUpgradePhase - :param pending_safety_checks: List of pending safety checks - :type pending_safety_checks: - list[~azure.servicefabric.models.SafetyCheckWrapper] - :param upgrade_duration: The estimated time spent processing the node - since it was deactivated during a node-by-node upgrade. - :type upgrade_duration: str - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'upgrade_phase': {'key': 'UpgradePhase', 'type': 'str'}, - 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeUpgradeProgressInfo, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.upgrade_phase = kwargs.get('upgrade_phase', None) - self.pending_safety_checks = kwargs.get('pending_safety_checks', None) - self.upgrade_duration = kwargs.get('upgrade_duration', None) diff --git a/customSDK/servicefabric/models/node_upgrade_progress_info_py3.py b/customSDK/servicefabric/models/node_upgrade_progress_info_py3.py deleted file mode 100644 index e6b4436c..00000000 --- a/customSDK/servicefabric/models/node_upgrade_progress_info_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class NodeUpgradeProgressInfo(Model): - """Information about the upgrading node and its status. - - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param upgrade_phase: The state of the upgrading node. Possible values - include: 'Invalid', 'PreUpgradeSafetyCheck', 'Upgrading', - 'PostUpgradeSafetyCheck' - :type upgrade_phase: str or ~azure.servicefabric.models.NodeUpgradePhase - :param pending_safety_checks: List of pending safety checks - :type pending_safety_checks: - list[~azure.servicefabric.models.SafetyCheckWrapper] - :param upgrade_duration: The estimated time spent processing the node - since it was deactivated during a node-by-node upgrade. - :type upgrade_duration: str - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'upgrade_phase': {'key': 'UpgradePhase', 'type': 'str'}, - 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - } - - def __init__(self, *, node_name: str=None, upgrade_phase=None, pending_safety_checks=None, upgrade_duration: str=None, **kwargs) -> None: - super(NodeUpgradeProgressInfo, self).__init__(**kwargs) - self.node_name = node_name - self.upgrade_phase = upgrade_phase - self.pending_safety_checks = pending_safety_checks - self.upgrade_duration = upgrade_duration diff --git a/customSDK/servicefabric/models/nodes_health_evaluation.py b/customSDK/servicefabric/models/nodes_health_evaluation.py deleted file mode 100644 index f31972d0..00000000 --- a/customSDK/servicefabric/models/nodes_health_evaluation.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class NodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for nodes, containing health evaluations for - each unhealthy node that impacted current aggregated health state. Can be - returned when evaluating cluster health and the aggregated health state is - either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_nodes: Maximum allowed percentage of - unhealthy nodes from the ClusterHealthPolicy. - :type max_percent_unhealthy_nodes: int - :param total_count: Total number of nodes found in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - NodeHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(NodesHealthEvaluation, self).__init__(**kwargs) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Nodes' diff --git a/customSDK/servicefabric/models/nodes_health_evaluation_py3.py b/customSDK/servicefabric/models/nodes_health_evaluation_py3.py deleted file mode 100644 index 208e702e..00000000 --- a/customSDK/servicefabric/models/nodes_health_evaluation_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class NodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for nodes, containing health evaluations for - each unhealthy node that impacted current aggregated health state. Can be - returned when evaluating cluster health and the aggregated health state is - either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_nodes: Maximum allowed percentage of - unhealthy nodes from the ClusterHealthPolicy. - :type max_percent_unhealthy_nodes: int - :param total_count: Total number of nodes found in the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - NodeHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(NodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Nodes' diff --git a/customSDK/servicefabric/models/operation_status.py b/customSDK/servicefabric/models/operation_status.py deleted file mode 100644 index 0ac24628..00000000 --- a/customSDK/servicefabric/models/operation_status.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationStatus(Model): - """Contains the OperationId, OperationState, and OperationType for - user-induced operations. - - :param operation_id: A GUID that identifies a call to this API. This is - also passed into the corresponding GetProgress API. - :type operation_id: str - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param type: The type of the operation. Possible values include: - 'Invalid', 'PartitionDataLoss', 'PartitionQuorumLoss', 'PartitionRestart', - 'NodeTransition' - :type type: str or ~azure.servicefabric.models.OperationType - """ - - _attribute_map = { - 'operation_id': {'key': 'OperationId', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationStatus, self).__init__(**kwargs) - self.operation_id = kwargs.get('operation_id', None) - self.state = kwargs.get('state', None) - self.type = kwargs.get('type', None) diff --git a/customSDK/servicefabric/models/operation_status_py3.py b/customSDK/servicefabric/models/operation_status_py3.py deleted file mode 100644 index cb089025..00000000 --- a/customSDK/servicefabric/models/operation_status_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationStatus(Model): - """Contains the OperationId, OperationState, and OperationType for - user-induced operations. - - :param operation_id: A GUID that identifies a call to this API. This is - also passed into the corresponding GetProgress API. - :type operation_id: str - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param type: The type of the operation. Possible values include: - 'Invalid', 'PartitionDataLoss', 'PartitionQuorumLoss', 'PartitionRestart', - 'NodeTransition' - :type type: str or ~azure.servicefabric.models.OperationType - """ - - _attribute_map = { - 'operation_id': {'key': 'OperationId', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, - } - - def __init__(self, *, operation_id: str=None, state=None, type=None, **kwargs) -> None: - super(OperationStatus, self).__init__(**kwargs) - self.operation_id = operation_id - self.state = state - self.type = type diff --git a/customSDK/servicefabric/models/package_sharing_policy_info.py b/customSDK/servicefabric/models/package_sharing_policy_info.py deleted file mode 100644 index 0f8956af..00000000 --- a/customSDK/servicefabric/models/package_sharing_policy_info.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PackageSharingPolicyInfo(Model): - """Represents a policy for the package sharing. - - :param shared_package_name: The name of code, configuration or data - package that should be shared. - :type shared_package_name: str - :param package_sharing_scope: Represents the scope for - PackageSharingPolicy. This is specified during DeployServicePackageToNode - operation. Possible values include: 'None', 'All', 'Code', 'Config', - 'Data' - :type package_sharing_scope: str or - ~azure.servicefabric.models.PackageSharingPolicyScope - """ - - _attribute_map = { - 'shared_package_name': {'key': 'SharedPackageName', 'type': 'str'}, - 'package_sharing_scope': {'key': 'PackageSharingScope', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PackageSharingPolicyInfo, self).__init__(**kwargs) - self.shared_package_name = kwargs.get('shared_package_name', None) - self.package_sharing_scope = kwargs.get('package_sharing_scope', None) diff --git a/customSDK/servicefabric/models/package_sharing_policy_info_py3.py b/customSDK/servicefabric/models/package_sharing_policy_info_py3.py deleted file mode 100644 index ad60c663..00000000 --- a/customSDK/servicefabric/models/package_sharing_policy_info_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PackageSharingPolicyInfo(Model): - """Represents a policy for the package sharing. - - :param shared_package_name: The name of code, configuration or data - package that should be shared. - :type shared_package_name: str - :param package_sharing_scope: Represents the scope for - PackageSharingPolicy. This is specified during DeployServicePackageToNode - operation. Possible values include: 'None', 'All', 'Code', 'Config', - 'Data' - :type package_sharing_scope: str or - ~azure.servicefabric.models.PackageSharingPolicyScope - """ - - _attribute_map = { - 'shared_package_name': {'key': 'SharedPackageName', 'type': 'str'}, - 'package_sharing_scope': {'key': 'PackageSharingScope', 'type': 'str'}, - } - - def __init__(self, *, shared_package_name: str=None, package_sharing_scope=None, **kwargs) -> None: - super(PackageSharingPolicyInfo, self).__init__(**kwargs) - self.shared_package_name = shared_package_name - self.package_sharing_scope = package_sharing_scope diff --git a/customSDK/servicefabric/models/paged_application_info_list.py b/customSDK/servicefabric/models/paged_application_info_list.py deleted file mode 100644 index 7aa9d71f..00000000 --- a/customSDK/servicefabric/models/paged_application_info_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedApplicationInfoList(Model): - """The list of applications in the cluster. The list is paged when all of the - results cannot fit in a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of application information. - :type items: list[~azure.servicefabric.models.ApplicationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedApplicationInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_application_info_list_py3.py b/customSDK/servicefabric/models/paged_application_info_list_py3.py deleted file mode 100644 index 46dc2cc8..00000000 --- a/customSDK/servicefabric/models/paged_application_info_list_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedApplicationInfoList(Model): - """The list of applications in the cluster. The list is paged when all of the - results cannot fit in a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of application information. - :type items: list[~azure.servicefabric.models.ApplicationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedApplicationInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_application_resource_description_list.py b/customSDK/servicefabric/models/paged_application_resource_description_list.py deleted file mode 100644 index bda03402..00000000 --- a/customSDK/servicefabric/models/paged_application_resource_description_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedApplicationResourceDescriptionList(Model): - """The list of application resources. The list is paged when all of the - results cannot fit in a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: - list[~azure.servicefabric.models.ApplicationResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationResourceDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedApplicationResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_application_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_application_resource_description_list_py3.py deleted file mode 100644 index bc5bd469..00000000 --- a/customSDK/servicefabric/models/paged_application_resource_description_list_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedApplicationResourceDescriptionList(Model): - """The list of application resources. The list is paged when all of the - results cannot fit in a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: - list[~azure.servicefabric.models.ApplicationResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationResourceDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedApplicationResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_application_type_info_list.py b/customSDK/servicefabric/models/paged_application_type_info_list.py deleted file mode 100644 index 486df2b1..00000000 --- a/customSDK/servicefabric/models/paged_application_type_info_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedApplicationTypeInfoList(Model): - """The list of application types that are provisioned or being provisioned in - the cluster. The list is paged when all of the results cannot fit in a - single message. The next set of results can be obtained by executing the - same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of application type information. - :type items: list[~azure.servicefabric.models.ApplicationTypeInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationTypeInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedApplicationTypeInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_application_type_info_list_py3.py b/customSDK/servicefabric/models/paged_application_type_info_list_py3.py deleted file mode 100644 index cfcfce6f..00000000 --- a/customSDK/servicefabric/models/paged_application_type_info_list_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedApplicationTypeInfoList(Model): - """The list of application types that are provisioned or being provisioned in - the cluster. The list is paged when all of the results cannot fit in a - single message. The next set of results can be obtained by executing the - same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of application type information. - :type items: list[~azure.servicefabric.models.ApplicationTypeInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationTypeInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedApplicationTypeInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_backup_configuration_info_list.py b/customSDK/servicefabric/models/paged_backup_configuration_info_list.py deleted file mode 100644 index 732c5ac8..00000000 --- a/customSDK/servicefabric/models/paged_backup_configuration_info_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedBackupConfigurationInfoList(Model): - """The list of backup configuration information. The list is paged when all of - the results cannot fit in a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of backup configuration information. - :type items: list[~azure.servicefabric.models.BackupConfigurationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupConfigurationInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedBackupConfigurationInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_backup_configuration_info_list_py3.py b/customSDK/servicefabric/models/paged_backup_configuration_info_list_py3.py deleted file mode 100644 index 643ec9e4..00000000 --- a/customSDK/servicefabric/models/paged_backup_configuration_info_list_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedBackupConfigurationInfoList(Model): - """The list of backup configuration information. The list is paged when all of - the results cannot fit in a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of backup configuration information. - :type items: list[~azure.servicefabric.models.BackupConfigurationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupConfigurationInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedBackupConfigurationInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_backup_entity_list.py b/customSDK/servicefabric/models/paged_backup_entity_list.py deleted file mode 100644 index 08b04f64..00000000 --- a/customSDK/servicefabric/models/paged_backup_entity_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedBackupEntityList(Model): - """The list of backup entities that are being periodically backed. The list is - paged when all of the results cannot fit in a single message. The next set - of results can be obtained by executing the same query with the - continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of backup entity information. - :type items: list[~azure.servicefabric.models.BackupEntity] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupEntity]'}, - } - - def __init__(self, **kwargs): - super(PagedBackupEntityList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_backup_entity_list_py3.py b/customSDK/servicefabric/models/paged_backup_entity_list_py3.py deleted file mode 100644 index b2e4f9ec..00000000 --- a/customSDK/servicefabric/models/paged_backup_entity_list_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedBackupEntityList(Model): - """The list of backup entities that are being periodically backed. The list is - paged when all of the results cannot fit in a single message. The next set - of results can be obtained by executing the same query with the - continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of backup entity information. - :type items: list[~azure.servicefabric.models.BackupEntity] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupEntity]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedBackupEntityList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_backup_info_list.py b/customSDK/servicefabric/models/paged_backup_info_list.py deleted file mode 100644 index b65adcc8..00000000 --- a/customSDK/servicefabric/models/paged_backup_info_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedBackupInfoList(Model): - """The list of backups. The list is paged when all of the results cannot fit - in a single message. The next set of results can be obtained by executing - the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of backup information. - :type items: list[~azure.servicefabric.models.BackupInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedBackupInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_backup_info_list_py3.py b/customSDK/servicefabric/models/paged_backup_info_list_py3.py deleted file mode 100644 index f3cfc51d..00000000 --- a/customSDK/servicefabric/models/paged_backup_info_list_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedBackupInfoList(Model): - """The list of backups. The list is paged when all of the results cannot fit - in a single message. The next set of results can be obtained by executing - the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of backup information. - :type items: list[~azure.servicefabric.models.BackupInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedBackupInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_backup_policy_description_list.py b/customSDK/servicefabric/models/paged_backup_policy_description_list.py deleted file mode 100644 index 5898dc19..00000000 --- a/customSDK/servicefabric/models/paged_backup_policy_description_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedBackupPolicyDescriptionList(Model): - """The list of backup policies configured in the cluster. The list is paged - when all of the results cannot fit in a single message. The next set of - results can be obtained by executing the same query with the continuation - token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: The list of backup policies information. - :type items: list[~azure.servicefabric.models.BackupPolicyDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupPolicyDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedBackupPolicyDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_backup_policy_description_list_py3.py b/customSDK/servicefabric/models/paged_backup_policy_description_list_py3.py deleted file mode 100644 index e87b8855..00000000 --- a/customSDK/servicefabric/models/paged_backup_policy_description_list_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedBackupPolicyDescriptionList(Model): - """The list of backup policies configured in the cluster. The list is paged - when all of the results cannot fit in a single message. The next set of - results can be obtained by executing the same query with the continuation - token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: The list of backup policies information. - :type items: list[~azure.servicefabric.models.BackupPolicyDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupPolicyDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedBackupPolicyDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_compose_deployment_status_info_list.py b/customSDK/servicefabric/models/paged_compose_deployment_status_info_list.py deleted file mode 100644 index 1b2d2c5a..00000000 --- a/customSDK/servicefabric/models/paged_compose_deployment_status_info_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedComposeDeploymentStatusInfoList(Model): - """The list of compose deployments in the cluster. The list is paged when all - of the results cannot fit in a single message. The next set of results can - be obtained by executing the same query with the continuation token - provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of compose deployment status information. - :type items: list[~azure.servicefabric.models.ComposeDeploymentStatusInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ComposeDeploymentStatusInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedComposeDeploymentStatusInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_compose_deployment_status_info_list_py3.py b/customSDK/servicefabric/models/paged_compose_deployment_status_info_list_py3.py deleted file mode 100644 index 37c8f8dc..00000000 --- a/customSDK/servicefabric/models/paged_compose_deployment_status_info_list_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedComposeDeploymentStatusInfoList(Model): - """The list of compose deployments in the cluster. The list is paged when all - of the results cannot fit in a single message. The next set of results can - be obtained by executing the same query with the continuation token - provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of compose deployment status information. - :type items: list[~azure.servicefabric.models.ComposeDeploymentStatusInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ComposeDeploymentStatusInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedComposeDeploymentStatusInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_deployed_application_info_list.py b/customSDK/servicefabric/models/paged_deployed_application_info_list.py deleted file mode 100644 index 9d6ed5ef..00000000 --- a/customSDK/servicefabric/models/paged_deployed_application_info_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedDeployedApplicationInfoList(Model): - """The list of deployed applications in activating, downloading, or active - states on a node. - The list is paged when all of the results cannot fit in a single message. - The next set of results can be obtained by executing the same query with - the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of deployed application information. - :type items: list[~azure.servicefabric.models.DeployedApplicationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[DeployedApplicationInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedDeployedApplicationInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_deployed_application_info_list_py3.py b/customSDK/servicefabric/models/paged_deployed_application_info_list_py3.py deleted file mode 100644 index 9610051b..00000000 --- a/customSDK/servicefabric/models/paged_deployed_application_info_list_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedDeployedApplicationInfoList(Model): - """The list of deployed applications in activating, downloading, or active - states on a node. - The list is paged when all of the results cannot fit in a single message. - The next set of results can be obtained by executing the same query with - the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of deployed application information. - :type items: list[~azure.servicefabric.models.DeployedApplicationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[DeployedApplicationInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedDeployedApplicationInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_gateway_resource_description_list.py b/customSDK/servicefabric/models/paged_gateway_resource_description_list.py deleted file mode 100644 index 4c415664..00000000 --- a/customSDK/servicefabric/models/paged_gateway_resource_description_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedGatewayResourceDescriptionList(Model): - """The list of gateway resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.GatewayResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[GatewayResourceDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedGatewayResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_gateway_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_gateway_resource_description_list_py3.py deleted file mode 100644 index b4a5cbe0..00000000 --- a/customSDK/servicefabric/models/paged_gateway_resource_description_list_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedGatewayResourceDescriptionList(Model): - """The list of gateway resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.GatewayResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[GatewayResourceDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedGatewayResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_network_resource_description_list.py b/customSDK/servicefabric/models/paged_network_resource_description_list.py deleted file mode 100644 index 9391a3aa..00000000 --- a/customSDK/servicefabric/models/paged_network_resource_description_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedNetworkResourceDescriptionList(Model): - """The list of network resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.NetworkResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[NetworkResourceDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedNetworkResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_network_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_network_resource_description_list_py3.py deleted file mode 100644 index 729aeed2..00000000 --- a/customSDK/servicefabric/models/paged_network_resource_description_list_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedNetworkResourceDescriptionList(Model): - """The list of network resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.NetworkResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[NetworkResourceDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedNetworkResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_node_info_list.py b/customSDK/servicefabric/models/paged_node_info_list.py deleted file mode 100644 index 4819ccb7..00000000 --- a/customSDK/servicefabric/models/paged_node_info_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedNodeInfoList(Model): - """The list of nodes in the cluster. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of node information. - :type items: list[~azure.servicefabric.models.NodeInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[NodeInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedNodeInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_node_info_list_py3.py b/customSDK/servicefabric/models/paged_node_info_list_py3.py deleted file mode 100644 index 3834bcee..00000000 --- a/customSDK/servicefabric/models/paged_node_info_list_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedNodeInfoList(Model): - """The list of nodes in the cluster. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of node information. - :type items: list[~azure.servicefabric.models.NodeInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[NodeInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedNodeInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_property_info_list.py b/customSDK/servicefabric/models/paged_property_info_list.py deleted file mode 100644 index a4744c9f..00000000 --- a/customSDK/servicefabric/models/paged_property_info_list.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedPropertyInfoList(Model): - """The paged list of Service Fabric properties under a given name. The list is - paged when all of the results cannot fit in a single message. The next set - of results can be obtained by executing the same query with the - continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param is_consistent: Indicates whether any property under the given name - has been modified during the enumeration. If there was a modification, - this property value is false. - :type is_consistent: bool - :param properties: List of property information. - :type properties: list[~azure.servicefabric.models.PropertyInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, - 'properties': {'key': 'Properties', 'type': '[PropertyInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedPropertyInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.is_consistent = kwargs.get('is_consistent', None) - self.properties = kwargs.get('properties', None) diff --git a/customSDK/servicefabric/models/paged_property_info_list_py3.py b/customSDK/servicefabric/models/paged_property_info_list_py3.py deleted file mode 100644 index 5317c874..00000000 --- a/customSDK/servicefabric/models/paged_property_info_list_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedPropertyInfoList(Model): - """The paged list of Service Fabric properties under a given name. The list is - paged when all of the results cannot fit in a single message. The next set - of results can be obtained by executing the same query with the - continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param is_consistent: Indicates whether any property under the given name - has been modified during the enumeration. If there was a modification, - this property value is false. - :type is_consistent: bool - :param properties: List of property information. - :type properties: list[~azure.servicefabric.models.PropertyInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, - 'properties': {'key': 'Properties', 'type': '[PropertyInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, is_consistent: bool=None, properties=None, **kwargs) -> None: - super(PagedPropertyInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.is_consistent = is_consistent - self.properties = properties diff --git a/customSDK/servicefabric/models/paged_replica_info_list.py b/customSDK/servicefabric/models/paged_replica_info_list.py deleted file mode 100644 index 3fb73e21..00000000 --- a/customSDK/servicefabric/models/paged_replica_info_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedReplicaInfoList(Model): - """The list of replicas in the cluster for a given partition. The list is - paged when all of the results cannot fit in a single message. The next set - of results can be obtained by executing the same query with the - continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of replica information. - :type items: list[~azure.servicefabric.models.ReplicaInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ReplicaInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedReplicaInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_replica_info_list_py3.py b/customSDK/servicefabric/models/paged_replica_info_list_py3.py deleted file mode 100644 index 94fb1a70..00000000 --- a/customSDK/servicefabric/models/paged_replica_info_list_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedReplicaInfoList(Model): - """The list of replicas in the cluster for a given partition. The list is - paged when all of the results cannot fit in a single message. The next set - of results can be obtained by executing the same query with the - continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of replica information. - :type items: list[~azure.servicefabric.models.ReplicaInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ReplicaInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedReplicaInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_secret_resource_description_list.py b/customSDK/servicefabric/models/paged_secret_resource_description_list.py deleted file mode 100644 index 8ec32f9f..00000000 --- a/customSDK/servicefabric/models/paged_secret_resource_description_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedSecretResourceDescriptionList(Model): - """The list of secret resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.SecretResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[SecretResourceDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedSecretResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_secret_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_secret_resource_description_list_py3.py deleted file mode 100644 index 6c02124f..00000000 --- a/customSDK/servicefabric/models/paged_secret_resource_description_list_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedSecretResourceDescriptionList(Model): - """The list of secret resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.SecretResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[SecretResourceDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedSecretResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_secret_value_resource_description_list.py b/customSDK/servicefabric/models/paged_secret_value_resource_description_list.py deleted file mode 100644 index 927c0fd8..00000000 --- a/customSDK/servicefabric/models/paged_secret_value_resource_description_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedSecretValueResourceDescriptionList(Model): - """The list of values of a secret resource, paged if the number of results - exceeds the limits of a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in the previous page. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: - list[~azure.servicefabric.models.SecretValueResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[SecretValueResourceDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedSecretValueResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_secret_value_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_secret_value_resource_description_list_py3.py deleted file mode 100644 index 683d5a38..00000000 --- a/customSDK/servicefabric/models/paged_secret_value_resource_description_list_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedSecretValueResourceDescriptionList(Model): - """The list of values of a secret resource, paged if the number of results - exceeds the limits of a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in the previous page. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: - list[~azure.servicefabric.models.SecretValueResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[SecretValueResourceDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedSecretValueResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_service_info_list.py b/customSDK/servicefabric/models/paged_service_info_list.py deleted file mode 100644 index f17b883c..00000000 --- a/customSDK/servicefabric/models/paged_service_info_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedServiceInfoList(Model): - """The list of services in the cluster for an application. The list is paged - when all of the results cannot fit in a single message. The next set of - results can be obtained by executing the same query with the continuation - token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of service information. - :type items: list[~azure.servicefabric.models.ServiceInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedServiceInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_service_info_list_py3.py b/customSDK/servicefabric/models/paged_service_info_list_py3.py deleted file mode 100644 index 3f8d6c02..00000000 --- a/customSDK/servicefabric/models/paged_service_info_list_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedServiceInfoList(Model): - """The list of services in the cluster for an application. The list is paged - when all of the results cannot fit in a single message. The next set of - results can be obtained by executing the same query with the continuation - token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of service information. - :type items: list[~azure.servicefabric.models.ServiceInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedServiceInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_service_partition_info_list.py b/customSDK/servicefabric/models/paged_service_partition_info_list.py deleted file mode 100644 index 8cf85e24..00000000 --- a/customSDK/servicefabric/models/paged_service_partition_info_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedServicePartitionInfoList(Model): - """The list of partition in the cluster for a service. The list is paged when - all of the results cannot fit in a single message. The next set of results - can be obtained by executing the same query with the continuation token - provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of service partition information. - :type items: list[~azure.servicefabric.models.ServicePartitionInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServicePartitionInfo]'}, - } - - def __init__(self, **kwargs): - super(PagedServicePartitionInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_service_partition_info_list_py3.py b/customSDK/servicefabric/models/paged_service_partition_info_list_py3.py deleted file mode 100644 index 58d90e9f..00000000 --- a/customSDK/servicefabric/models/paged_service_partition_info_list_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedServicePartitionInfoList(Model): - """The list of partition in the cluster for a service. The list is paged when - all of the results cannot fit in a single message. The next set of results - can be obtained by executing the same query with the continuation token - provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of service partition information. - :type items: list[~azure.servicefabric.models.ServicePartitionInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServicePartitionInfo]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedServicePartitionInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_service_replica_description_list.py b/customSDK/servicefabric/models/paged_service_replica_description_list.py deleted file mode 100644 index 94956f06..00000000 --- a/customSDK/servicefabric/models/paged_service_replica_description_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedServiceReplicaDescriptionList(Model): - """The list of service resource replicas in the cluster. The list is paged - when all of the results cannot fit in a single message. The next set of - results can be obtained by executing the same query with the continuation - token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of service resource replica description. - :type items: list[~azure.servicefabric.models.ServiceReplicaDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceReplicaDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedServiceReplicaDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_service_replica_description_list_py3.py b/customSDK/servicefabric/models/paged_service_replica_description_list_py3.py deleted file mode 100644 index ad77f539..00000000 --- a/customSDK/servicefabric/models/paged_service_replica_description_list_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedServiceReplicaDescriptionList(Model): - """The list of service resource replicas in the cluster. The list is paged - when all of the results cannot fit in a single message. The next set of - results can be obtained by executing the same query with the continuation - token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of service resource replica description. - :type items: list[~azure.servicefabric.models.ServiceReplicaDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceReplicaDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedServiceReplicaDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_service_resource_description_list.py b/customSDK/servicefabric/models/paged_service_resource_description_list.py deleted file mode 100644 index 76591cdc..00000000 --- a/customSDK/servicefabric/models/paged_service_resource_description_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedServiceResourceDescriptionList(Model): - """The list of service resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.ServiceResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceResourceDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedServiceResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_service_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_service_resource_description_list_py3.py deleted file mode 100644 index 0d17ddbd..00000000 --- a/customSDK/servicefabric/models/paged_service_resource_description_list_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedServiceResourceDescriptionList(Model): - """The list of service resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.ServiceResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceResourceDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedServiceResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_sub_name_info_list.py b/customSDK/servicefabric/models/paged_sub_name_info_list.py deleted file mode 100644 index 50d6d0d0..00000000 --- a/customSDK/servicefabric/models/paged_sub_name_info_list.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedSubNameInfoList(Model): - """A paged list of Service Fabric names. The list is paged when all of the - results cannot fit in a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param is_consistent: Indicates whether any name under the given name has - been modified during the enumeration. If there was a modification, this - property value is false. - :type is_consistent: bool - :param sub_names: List of the child names. - :type sub_names: list[str] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, - 'sub_names': {'key': 'SubNames', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(PagedSubNameInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.is_consistent = kwargs.get('is_consistent', None) - self.sub_names = kwargs.get('sub_names', None) diff --git a/customSDK/servicefabric/models/paged_sub_name_info_list_py3.py b/customSDK/servicefabric/models/paged_sub_name_info_list_py3.py deleted file mode 100644 index 04b1f66c..00000000 --- a/customSDK/servicefabric/models/paged_sub_name_info_list_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedSubNameInfoList(Model): - """A paged list of Service Fabric names. The list is paged when all of the - results cannot fit in a single message. The next set of results can be - obtained by executing the same query with the continuation token provided - in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param is_consistent: Indicates whether any name under the given name has - been modified during the enumeration. If there was a modification, this - property value is false. - :type is_consistent: bool - :param sub_names: List of the child names. - :type sub_names: list[str] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, - 'sub_names': {'key': 'SubNames', 'type': '[str]'}, - } - - def __init__(self, *, continuation_token: str=None, is_consistent: bool=None, sub_names=None, **kwargs) -> None: - super(PagedSubNameInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.is_consistent = is_consistent - self.sub_names = sub_names diff --git a/customSDK/servicefabric/models/paged_update_partition_load_result_list.py b/customSDK/servicefabric/models/paged_update_partition_load_result_list.py deleted file mode 100644 index 1c01c714..00000000 --- a/customSDK/servicefabric/models/paged_update_partition_load_result_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedUpdatePartitionLoadResultList(Model): - """The list of results of the call UpdatePartitionLoad. The list is paged when - all of the results cannot fit in a single message. The next set of results - can be obtained by executing the same query with the continuation token - provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of partition load update information. - :type items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[UpdatePartitionLoadResult]'}, - } - - def __init__(self, **kwargs): - super(PagedUpdatePartitionLoadResultList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_update_partition_load_result_list_py3.py b/customSDK/servicefabric/models/paged_update_partition_load_result_list_py3.py deleted file mode 100644 index bcee7726..00000000 --- a/customSDK/servicefabric/models/paged_update_partition_load_result_list_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedUpdatePartitionLoadResultList(Model): - """The list of results of the call UpdatePartitionLoad. The list is paged when - all of the results cannot fit in a single message. The next set of results - can be obtained by executing the same query with the continuation token - provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: List of partition load update information. - :type items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[UpdatePartitionLoadResult]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedUpdatePartitionLoadResultList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/paged_volume_resource_description_list.py b/customSDK/servicefabric/models/paged_volume_resource_description_list.py deleted file mode 100644 index 96f1ac55..00000000 --- a/customSDK/servicefabric/models/paged_volume_resource_description_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedVolumeResourceDescriptionList(Model): - """The list of volume resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.VolumeResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[VolumeResourceDescription]'}, - } - - def __init__(self, **kwargs): - super(PagedVolumeResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/paged_volume_resource_description_list_py3.py b/customSDK/servicefabric/models/paged_volume_resource_description_list_py3.py deleted file mode 100644 index a72a818e..00000000 --- a/customSDK/servicefabric/models/paged_volume_resource_description_list_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PagedVolumeResourceDescriptionList(Model): - """The list of volume resources. The list is paged when all of the results - cannot fit in a single message. The next set of results can be obtained by - executing the same query with the continuation token provided in this list. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. The continuation token is included in the - response of the API when the results from the system do not fit in a - single response. When this value is passed to the next API call, the API - returns next set of results. If there are no further results, then the - continuation token is not included in the response. - :type continuation_token: str - :param items: One page of the list. - :type items: list[~azure.servicefabric.models.VolumeResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[VolumeResourceDescription]'}, - } - - def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: - super(PagedVolumeResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items diff --git a/customSDK/servicefabric/models/partition_analysis_event.py b/customSDK/servicefabric/models/partition_analysis_event.py deleted file mode 100644 index 1bd12aeb..00000000 --- a/customSDK/servicefabric/models/partition_analysis_event.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_event import PartitionEvent - - -class PartitionAnalysisEvent(PartitionEvent): - """Represents the base for all Partition Analysis Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionPrimaryMoveAnalysisEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param metadata: Required. Metadata about an Analysis Event. - :type metadata: ~azure.servicefabric.models.AnalysisEventMetadata - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'metadata': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, - } - - _subtype_map = { - 'kind': {'PartitionPrimaryMoveAnalysis': 'PartitionPrimaryMoveAnalysisEvent'} - } - - def __init__(self, **kwargs): - super(PartitionAnalysisEvent, self).__init__(**kwargs) - self.metadata = kwargs.get('metadata', None) - self.kind = 'PartitionAnalysisEvent' diff --git a/customSDK/servicefabric/models/partition_analysis_event_py3.py b/customSDK/servicefabric/models/partition_analysis_event_py3.py deleted file mode 100644 index b864bde3..00000000 --- a/customSDK/servicefabric/models/partition_analysis_event_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_event_py3 import PartitionEvent - - -class PartitionAnalysisEvent(PartitionEvent): - """Represents the base for all Partition Analysis Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionPrimaryMoveAnalysisEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param metadata: Required. Metadata about an Analysis Event. - :type metadata: ~azure.servicefabric.models.AnalysisEventMetadata - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'metadata': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, - } - - _subtype_map = { - 'kind': {'PartitionPrimaryMoveAnalysis': 'PartitionPrimaryMoveAnalysisEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, metadata, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionAnalysisEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.metadata = metadata - self.kind = 'PartitionAnalysisEvent' diff --git a/customSDK/servicefabric/models/partition_backup_configuration_info.py b/customSDK/servicefabric/models/partition_backup_configuration_info.py deleted file mode 100644 index 02b45251..00000000 --- a/customSDK/servicefabric/models/partition_backup_configuration_info.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_configuration_info import BackupConfigurationInfo - - -class PartitionBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information, for a specific partition, specifying what - backup policy is being applied and suspend description, if any. - - All required parameters must be populated in order to send to Azure. - - :param policy_name: The name of the backup policy which is applicable to - this Service Fabric application or service or partition. - :type policy_name: str - :param policy_inherited_from: Specifies the scope at which the backup - policy is applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type policy_inherited_from: str or - ~azure.servicefabric.models.BackupPolicyScope - :param suspension_info: Describes the backup suspension details. - :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :param kind: Required. Constant filled by server. - :type kind: str - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param partition_id: The partition ID identifying the partition. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartitionBackupConfigurationInfo, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_backup_configuration_info_py3.py b/customSDK/servicefabric/models/partition_backup_configuration_info_py3.py deleted file mode 100644 index 0e53df17..00000000 --- a/customSDK/servicefabric/models/partition_backup_configuration_info_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_configuration_info_py3 import BackupConfigurationInfo - - -class PartitionBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information, for a specific partition, specifying what - backup policy is being applied and suspend description, if any. - - All required parameters must be populated in order to send to Azure. - - :param policy_name: The name of the backup policy which is applicable to - this Service Fabric application or service or partition. - :type policy_name: str - :param policy_inherited_from: Specifies the scope at which the backup - policy is applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type policy_inherited_from: str or - ~azure.servicefabric.models.BackupPolicyScope - :param suspension_info: Describes the backup suspension details. - :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :param kind: Required. Constant filled by server. - :type kind: str - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param partition_id: The partition ID identifying the partition. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, service_name: str=None, partition_id: str=None, **kwargs) -> None: - super(PartitionBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) - self.service_name = service_name - self.partition_id = partition_id - self.kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_backup_entity.py b/customSDK/servicefabric/models/partition_backup_entity.py deleted file mode 100644 index 0c823272..00000000 --- a/customSDK/servicefabric/models/partition_backup_entity.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_entity import BackupEntity - - -class PartitionBackupEntity(BackupEntity): - """Identifies the Service Fabric stateful partition which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :param entity_kind: Required. Constant filled by server. - :type entity_kind: str - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param partition_id: The partition ID identifying the partition. - :type partition_id: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartitionBackupEntity, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.entity_kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_backup_entity_py3.py b/customSDK/servicefabric/models/partition_backup_entity_py3.py deleted file mode 100644 index 2cfa5dd8..00000000 --- a/customSDK/servicefabric/models/partition_backup_entity_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_entity_py3 import BackupEntity - - -class PartitionBackupEntity(BackupEntity): - """Identifies the Service Fabric stateful partition which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :param entity_kind: Required. Constant filled by server. - :type entity_kind: str - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - :param partition_id: The partition ID identifying the partition. - :type partition_id: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, service_name: str=None, partition_id: str=None, **kwargs) -> None: - super(PartitionBackupEntity, self).__init__(**kwargs) - self.service_name = service_name - self.partition_id = partition_id - self.entity_kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_data_loss_progress.py b/customSDK/servicefabric/models/partition_data_loss_progress.py deleted file mode 100644 index 60ca36a7..00000000 --- a/customSDK/servicefabric/models/partition_data_loss_progress.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionDataLossProgress(Model): - """Information about a partition data loss user-induced operation. - - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param invoke_data_loss_result: Represents information about an operation - in a terminal state (Completed or Faulted). - :type invoke_data_loss_result: - ~azure.servicefabric.models.InvokeDataLossResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'invoke_data_loss_result': {'key': 'InvokeDataLossResult', 'type': 'InvokeDataLossResult'}, - } - - def __init__(self, **kwargs): - super(PartitionDataLossProgress, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.invoke_data_loss_result = kwargs.get('invoke_data_loss_result', None) diff --git a/customSDK/servicefabric/models/partition_data_loss_progress_py3.py b/customSDK/servicefabric/models/partition_data_loss_progress_py3.py deleted file mode 100644 index fa61ba3c..00000000 --- a/customSDK/servicefabric/models/partition_data_loss_progress_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionDataLossProgress(Model): - """Information about a partition data loss user-induced operation. - - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param invoke_data_loss_result: Represents information about an operation - in a terminal state (Completed or Faulted). - :type invoke_data_loss_result: - ~azure.servicefabric.models.InvokeDataLossResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'invoke_data_loss_result': {'key': 'InvokeDataLossResult', 'type': 'InvokeDataLossResult'}, - } - - def __init__(self, *, state=None, invoke_data_loss_result=None, **kwargs) -> None: - super(PartitionDataLossProgress, self).__init__(**kwargs) - self.state = state - self.invoke_data_loss_result = invoke_data_loss_result diff --git a/customSDK/servicefabric/models/partition_event.py b/customSDK/servicefabric/models/partition_event.py deleted file mode 100644 index 9ab8f5e8..00000000 --- a/customSDK/servicefabric/models/partition_event.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .fabric_event import FabricEvent - - -class PartitionEvent(FabricEvent): - """Represents the base for all Partition Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionAnalysisEvent, PartitionNewHealthReportEvent, - PartitionHealthReportExpiredEvent, PartitionReconfiguredEvent, - ChaosPartitionSecondaryMoveScheduledEvent, - ChaosPartitionPrimaryMoveScheduledEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'PartitionAnalysisEvent': 'PartitionAnalysisEvent', 'PartitionNewHealthReport': 'PartitionNewHealthReportEvent', 'PartitionHealthReportExpired': 'PartitionHealthReportExpiredEvent', 'PartitionReconfigured': 'PartitionReconfiguredEvent', 'ChaosPartitionSecondaryMoveScheduled': 'ChaosPartitionSecondaryMoveScheduledEvent', 'ChaosPartitionPrimaryMoveScheduled': 'ChaosPartitionPrimaryMoveScheduledEvent'} - } - - def __init__(self, **kwargs): - super(PartitionEvent, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.kind = 'PartitionEvent' diff --git a/customSDK/servicefabric/models/partition_event_py3.py b/customSDK/servicefabric/models/partition_event_py3.py deleted file mode 100644 index dc3cdd9f..00000000 --- a/customSDK/servicefabric/models/partition_event_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .fabric_event_py3 import FabricEvent - - -class PartitionEvent(FabricEvent): - """Represents the base for all Partition Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionAnalysisEvent, PartitionNewHealthReportEvent, - PartitionHealthReportExpiredEvent, PartitionReconfiguredEvent, - ChaosPartitionSecondaryMoveScheduledEvent, - ChaosPartitionPrimaryMoveScheduledEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'PartitionAnalysisEvent': 'PartitionAnalysisEvent', 'PartitionNewHealthReport': 'PartitionNewHealthReportEvent', 'PartitionHealthReportExpired': 'PartitionHealthReportExpiredEvent', 'PartitionReconfigured': 'PartitionReconfiguredEvent', 'ChaosPartitionSecondaryMoveScheduled': 'ChaosPartitionSecondaryMoveScheduledEvent', 'ChaosPartitionPrimaryMoveScheduled': 'ChaosPartitionPrimaryMoveScheduledEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.partition_id = partition_id - self.kind = 'PartitionEvent' diff --git a/customSDK/servicefabric/models/partition_health.py b/customSDK/servicefabric/models/partition_health.py deleted file mode 100644 index cc54da85..00000000 --- a/customSDK/servicefabric/models/partition_health.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health import EntityHealth - - -class PartitionHealth(EntityHealth): - """Information about the health of a Service Fabric partition. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param partition_id: ID of the partition whose health information is - described by this object. - :type partition_id: str - :param replica_health_states: The list of replica health states associated - with the partition. - :type replica_health_states: - list[~azure.servicefabric.models.ReplicaHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_health_states': {'key': 'ReplicaHealthStates', 'type': '[ReplicaHealthState]'}, - } - - def __init__(self, **kwargs): - super(PartitionHealth, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.replica_health_states = kwargs.get('replica_health_states', None) diff --git a/customSDK/servicefabric/models/partition_health_evaluation.py b/customSDK/servicefabric/models/partition_health_evaluation.py deleted file mode 100644 index 12462195..00000000 --- a/customSDK/servicefabric/models/partition_health_evaluation.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class PartitionHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a partition, containing information about - the data and the algorithm used by health store to evaluate health. The - evaluation is returned only when the aggregated health state is either - Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition whose health evaluation is - described by this object. - :type partition_id: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the partition. The types of the - unhealthy evaluations can be ReplicasHealthEvaluation or - EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(PartitionHealthEvaluation, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_health_evaluation_py3.py b/customSDK/servicefabric/models/partition_health_evaluation_py3.py deleted file mode 100644 index cece0bf0..00000000 --- a/customSDK/servicefabric/models/partition_health_evaluation_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class PartitionHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a partition, containing information about - the data and the algorithm used by health store to evaluate health. The - evaluation is returned only when the aggregated health state is either - Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition whose health evaluation is - described by this object. - :type partition_id: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the partition. The types of the - unhealthy evaluations can be ReplicasHealthEvaluation or - EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, partition_id: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(PartitionHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.partition_id = partition_id - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Partition' diff --git a/customSDK/servicefabric/models/partition_health_py3.py b/customSDK/servicefabric/models/partition_health_py3.py deleted file mode 100644 index 8e8e37e8..00000000 --- a/customSDK/servicefabric/models/partition_health_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_py3 import EntityHealth - - -class PartitionHealth(EntityHealth): - """Information about the health of a Service Fabric partition. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param partition_id: ID of the partition whose health information is - described by this object. - :type partition_id: str - :param replica_health_states: The list of replica health states associated - with the partition. - :type replica_health_states: - list[~azure.servicefabric.models.ReplicaHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_health_states': {'key': 'ReplicaHealthStates', 'type': '[ReplicaHealthState]'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, replica_health_states=None, **kwargs) -> None: - super(PartitionHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.partition_id = partition_id - self.replica_health_states = replica_health_states diff --git a/customSDK/servicefabric/models/partition_health_report_expired_event.py b/customSDK/servicefabric/models/partition_health_report_expired_event.py deleted file mode 100644 index 3f6144ef..00000000 --- a/customSDK/servicefabric/models/partition_health_report_expired_event.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_event import PartitionEvent - - -class PartitionHealthReportExpiredEvent(PartitionEvent): - """Partition Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(PartitionHealthReportExpiredEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'PartitionHealthReportExpired' diff --git a/customSDK/servicefabric/models/partition_health_report_expired_event_py3.py b/customSDK/servicefabric/models/partition_health_report_expired_event_py3.py deleted file mode 100644 index 69430a96..00000000 --- a/customSDK/servicefabric/models/partition_health_report_expired_event_py3.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_event_py3 import PartitionEvent - - -class PartitionHealthReportExpiredEvent(PartitionEvent): - """Partition Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'PartitionHealthReportExpired' diff --git a/customSDK/servicefabric/models/partition_health_state.py b/customSDK/servicefabric/models/partition_health_state.py deleted file mode 100644 index 37f49a7e..00000000 --- a/customSDK/servicefabric/models/partition_health_state.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state import EntityHealthState - - -class PartitionHealthState(EntityHealthState): - """Represents the health state of a partition, which contains the partition - identifier and its aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param partition_id: Id of the partition whose health state is described - by this object. - :type partition_id: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartitionHealthState, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) diff --git a/customSDK/servicefabric/models/partition_health_state_chunk.py b/customSDK/servicefabric/models/partition_health_state_chunk.py deleted file mode 100644 index fe8fc51d..00000000 --- a/customSDK/servicefabric/models/partition_health_state_chunk.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk import EntityHealthStateChunk - - -class PartitionHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a partition, which contains the - partition ID, its aggregated health state and any replicas that respect the - filters in the cluster health chunk query description. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param partition_id: The Id of the partition. - :type partition_id: str - :param replica_health_state_chunks: The list of replica health state - chunks belonging to the partition that respect the filters in the cluster - health chunk query description. - :type replica_health_state_chunks: - ~azure.servicefabric.models.ReplicaHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_health_state_chunks': {'key': 'ReplicaHealthStateChunks', 'type': 'ReplicaHealthStateChunkList'}, - } - - def __init__(self, **kwargs): - super(PartitionHealthStateChunk, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.replica_health_state_chunks = kwargs.get('replica_health_state_chunks', None) diff --git a/customSDK/servicefabric/models/partition_health_state_chunk_list.py b/customSDK/servicefabric/models/partition_health_state_chunk_list.py deleted file mode 100644 index 7d11f66a..00000000 --- a/customSDK/servicefabric/models/partition_health_state_chunk_list.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionHealthStateChunkList(Model): - """The list of partition health state chunks that respect the input filters in - the chunk query description. - Returned by get cluster health state chunks query as part of the parent - application hierarchy. - - :param items: The list of partition health state chunks that respect the - input filters in the chunk query. - :type items: list[~azure.servicefabric.models.PartitionHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[PartitionHealthStateChunk]'}, - } - - def __init__(self, **kwargs): - super(PartitionHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/partition_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/partition_health_state_chunk_list_py3.py deleted file mode 100644 index 163b94d5..00000000 --- a/customSDK/servicefabric/models/partition_health_state_chunk_list_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionHealthStateChunkList(Model): - """The list of partition health state chunks that respect the input filters in - the chunk query description. - Returned by get cluster health state chunks query as part of the parent - application hierarchy. - - :param items: The list of partition health state chunks that respect the - input filters in the chunk query. - :type items: list[~azure.servicefabric.models.PartitionHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[PartitionHealthStateChunk]'}, - } - - def __init__(self, *, items=None, **kwargs) -> None: - super(PartitionHealthStateChunkList, self).__init__(**kwargs) - self.items = items diff --git a/customSDK/servicefabric/models/partition_health_state_chunk_py3.py b/customSDK/servicefabric/models/partition_health_state_chunk_py3.py deleted file mode 100644 index 52ec8ea2..00000000 --- a/customSDK/servicefabric/models/partition_health_state_chunk_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk_py3 import EntityHealthStateChunk - - -class PartitionHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a partition, which contains the - partition ID, its aggregated health state and any replicas that respect the - filters in the cluster health chunk query description. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param partition_id: The Id of the partition. - :type partition_id: str - :param replica_health_state_chunks: The list of replica health state - chunks belonging to the partition that respect the filters in the cluster - health chunk query description. - :type replica_health_state_chunks: - ~azure.servicefabric.models.ReplicaHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_health_state_chunks': {'key': 'ReplicaHealthStateChunks', 'type': 'ReplicaHealthStateChunkList'}, - } - - def __init__(self, *, health_state=None, partition_id: str=None, replica_health_state_chunks=None, **kwargs) -> None: - super(PartitionHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.partition_id = partition_id - self.replica_health_state_chunks = replica_health_state_chunks diff --git a/customSDK/servicefabric/models/partition_health_state_filter.py b/customSDK/servicefabric/models/partition_health_state_filter.py deleted file mode 100644 index 485a6b8b..00000000 --- a/customSDK/servicefabric/models/partition_health_state_filter.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionHealthStateFilter(Model): - """Defines matching criteria to determine whether a partition should be - included as a child of a service in the cluster health chunk. - The partitions are only returned if the parent entities match a filter - specified in the cluster health chunk query description. The parent service - and application must be included in the cluster health chunk. - One filter can match zero, one or multiple partitions, depending on its - properties. - - :param partition_id_filter: ID of the partition that matches the filter. - The filter is applied only to the specified partition, if it exists. - If the partition doesn't exist, no partition is returned in the cluster - health chunk based on this filter. - If the partition exists, it is included in the cluster health chunk if it - respects the other filter properties. - If not specified, all partitions that match the parent filters (if any) - are taken into consideration and matched against the other filter members, - like health state filter. - :type partition_id_filter: str - :param health_state_filter: The filter for the health state of the - partitions. It allows selecting partitions if they match the desired - health states. - The possible values are integer value of one of the following health - states. Only partitions that match the filter are returned. All partitions - are used to evaluate the cluster aggregated health state. - If not specified, default value is None, unless the partition ID is - specified. If the filter has default value and partition ID is specified, - the matching partition is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches partitions with - HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - :param replica_filters: Defines a list of filters that specify which - replicas to be included in the returned cluster health chunk as children - of the parent partition. The replicas are returned only if the parent - partition matches a filter. - If the list is empty, no replicas are returned. All the replicas are used - to evaluate the parent partition aggregated health state, regardless of - the input filters. - The partition filter may specify multiple replica filters. - For example, it can specify a filter to return all replicas with health - state Error and another filter to always include a replica identified by - its replica id. - :type replica_filters: - list[~azure.servicefabric.models.ReplicaHealthStateFilter] - """ - - _attribute_map = { - 'partition_id_filter': {'key': 'PartitionIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'replica_filters': {'key': 'ReplicaFilters', 'type': '[ReplicaHealthStateFilter]'}, - } - - def __init__(self, **kwargs): - super(PartitionHealthStateFilter, self).__init__(**kwargs) - self.partition_id_filter = kwargs.get('partition_id_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - self.replica_filters = kwargs.get('replica_filters', None) diff --git a/customSDK/servicefabric/models/partition_health_state_filter_py3.py b/customSDK/servicefabric/models/partition_health_state_filter_py3.py deleted file mode 100644 index f4e22e02..00000000 --- a/customSDK/servicefabric/models/partition_health_state_filter_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionHealthStateFilter(Model): - """Defines matching criteria to determine whether a partition should be - included as a child of a service in the cluster health chunk. - The partitions are only returned if the parent entities match a filter - specified in the cluster health chunk query description. The parent service - and application must be included in the cluster health chunk. - One filter can match zero, one or multiple partitions, depending on its - properties. - - :param partition_id_filter: ID of the partition that matches the filter. - The filter is applied only to the specified partition, if it exists. - If the partition doesn't exist, no partition is returned in the cluster - health chunk based on this filter. - If the partition exists, it is included in the cluster health chunk if it - respects the other filter properties. - If not specified, all partitions that match the parent filters (if any) - are taken into consideration and matched against the other filter members, - like health state filter. - :type partition_id_filter: str - :param health_state_filter: The filter for the health state of the - partitions. It allows selecting partitions if they match the desired - health states. - The possible values are integer value of one of the following health - states. Only partitions that match the filter are returned. All partitions - are used to evaluate the cluster aggregated health state. - If not specified, default value is None, unless the partition ID is - specified. If the filter has default value and partition ID is specified, - the matching partition is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches partitions with - HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - :param replica_filters: Defines a list of filters that specify which - replicas to be included in the returned cluster health chunk as children - of the parent partition. The replicas are returned only if the parent - partition matches a filter. - If the list is empty, no replicas are returned. All the replicas are used - to evaluate the parent partition aggregated health state, regardless of - the input filters. - The partition filter may specify multiple replica filters. - For example, it can specify a filter to return all replicas with health - state Error and another filter to always include a replica identified by - its replica id. - :type replica_filters: - list[~azure.servicefabric.models.ReplicaHealthStateFilter] - """ - - _attribute_map = { - 'partition_id_filter': {'key': 'PartitionIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'replica_filters': {'key': 'ReplicaFilters', 'type': '[ReplicaHealthStateFilter]'}, - } - - def __init__(self, *, partition_id_filter: str=None, health_state_filter: int=0, replica_filters=None, **kwargs) -> None: - super(PartitionHealthStateFilter, self).__init__(**kwargs) - self.partition_id_filter = partition_id_filter - self.health_state_filter = health_state_filter - self.replica_filters = replica_filters diff --git a/customSDK/servicefabric/models/partition_health_state_py3.py b/customSDK/servicefabric/models/partition_health_state_py3.py deleted file mode 100644 index 7da6a832..00000000 --- a/customSDK/servicefabric/models/partition_health_state_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_py3 import EntityHealthState - - -class PartitionHealthState(EntityHealthState): - """Represents the health state of a partition, which contains the partition - identifier and its aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param partition_id: Id of the partition whose health state is described - by this object. - :type partition_id: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, partition_id: str=None, **kwargs) -> None: - super(PartitionHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.partition_id = partition_id diff --git a/customSDK/servicefabric/models/partition_information.py b/customSDK/servicefabric/models/partition_information.py deleted file mode 100644 index cbbeef94..00000000 --- a/customSDK/servicefabric/models/partition_information.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionInformation(Model): - """Information about the partition identity, partitioning scheme and keys - supported by it. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Int64RangePartitionInformation, NamedPartitionInformation, - SingletonPartitionInformation - - All required parameters must be populated in order to send to Azure. - - :param id: An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. - The partition ID is unique and does not change for the lifetime of the - service. If the same service was deleted and recreated the IDs of its - partitions would be different. - :type id: str - :param service_partition_kind: Required. Constant filled by server. - :type service_partition_kind: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_partition_kind': {'Int64Range': 'Int64RangePartitionInformation', 'Named': 'NamedPartitionInformation', 'Singleton': 'SingletonPartitionInformation'} - } - - def __init__(self, **kwargs): - super(PartitionInformation, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.service_partition_kind = None diff --git a/customSDK/servicefabric/models/partition_information_py3.py b/customSDK/servicefabric/models/partition_information_py3.py deleted file mode 100644 index acbc354a..00000000 --- a/customSDK/servicefabric/models/partition_information_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionInformation(Model): - """Information about the partition identity, partitioning scheme and keys - supported by it. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Int64RangePartitionInformation, NamedPartitionInformation, - SingletonPartitionInformation - - All required parameters must be populated in order to send to Azure. - - :param id: An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. - The partition ID is unique and does not change for the lifetime of the - service. If the same service was deleted and recreated the IDs of its - partitions would be different. - :type id: str - :param service_partition_kind: Required. Constant filled by server. - :type service_partition_kind: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_partition_kind': {'Int64Range': 'Int64RangePartitionInformation', 'Named': 'NamedPartitionInformation', 'Singleton': 'SingletonPartitionInformation'} - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(PartitionInformation, self).__init__(**kwargs) - self.id = id - self.service_partition_kind = None diff --git a/customSDK/servicefabric/models/partition_instance_count_scale_mechanism.py b/customSDK/servicefabric/models/partition_instance_count_scale_mechanism.py deleted file mode 100644 index 7c0b1a85..00000000 --- a/customSDK/servicefabric/models/partition_instance_count_scale_mechanism.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .scaling_mechanism_description import ScalingMechanismDescription - - -class PartitionInstanceCountScaleMechanism(ScalingMechanismDescription): - """Represents a scaling mechanism for adding or removing instances of - stateless service partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param min_instance_count: Required. Minimum number of instances of the - partition. - :type min_instance_count: int - :param max_instance_count: Required. Maximum number of instances of the - partition. - :type max_instance_count: int - :param scale_increment: Required. The number of instances to add or remove - during a scaling operation. - :type scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_instance_count': {'required': True}, - 'max_instance_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'max_instance_count': {'key': 'MaxInstanceCount', 'type': 'int'}, - 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(PartitionInstanceCountScaleMechanism, self).__init__(**kwargs) - self.min_instance_count = kwargs.get('min_instance_count', None) - self.max_instance_count = kwargs.get('max_instance_count', None) - self.scale_increment = kwargs.get('scale_increment', None) - self.kind = 'PartitionInstanceCount' diff --git a/customSDK/servicefabric/models/partition_instance_count_scale_mechanism_py3.py b/customSDK/servicefabric/models/partition_instance_count_scale_mechanism_py3.py deleted file mode 100644 index de580aef..00000000 --- a/customSDK/servicefabric/models/partition_instance_count_scale_mechanism_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .scaling_mechanism_description_py3 import ScalingMechanismDescription - - -class PartitionInstanceCountScaleMechanism(ScalingMechanismDescription): - """Represents a scaling mechanism for adding or removing instances of - stateless service partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param min_instance_count: Required. Minimum number of instances of the - partition. - :type min_instance_count: int - :param max_instance_count: Required. Maximum number of instances of the - partition. - :type max_instance_count: int - :param scale_increment: Required. The number of instances to add or remove - during a scaling operation. - :type scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_instance_count': {'required': True}, - 'max_instance_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'max_instance_count': {'key': 'MaxInstanceCount', 'type': 'int'}, - 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, - } - - def __init__(self, *, min_instance_count: int, max_instance_count: int, scale_increment: int, **kwargs) -> None: - super(PartitionInstanceCountScaleMechanism, self).__init__(**kwargs) - self.min_instance_count = min_instance_count - self.max_instance_count = max_instance_count - self.scale_increment = scale_increment - self.kind = 'PartitionInstanceCount' diff --git a/customSDK/servicefabric/models/partition_load_information.py b/customSDK/servicefabric/models/partition_load_information.py deleted file mode 100644 index 23c7a2c2..00000000 --- a/customSDK/servicefabric/models/partition_load_information.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionLoadInformation(Model): - """Represents load information for a partition, which contains the primary, - secondary and auxiliary reported load metrics. - In case there is no load reported, PartitionLoadInformation will contain - the default load for the service of the partition. - For default loads, LoadMetricReport's LastReportedUtc is set to 0. - - :param partition_id: Id of the partition. - :type partition_id: str - :param primary_load_metric_reports: Array of load reports from the primary - replica for this partition. - :type primary_load_metric_reports: - list[~azure.servicefabric.models.LoadMetricReport] - :param secondary_load_metric_reports: Array of aggregated load reports - from all secondary replicas for this partition. - Array only contains the latest reported load for each metric. - :type secondary_load_metric_reports: - list[~azure.servicefabric.models.LoadMetricReport] - :param auxiliary_load_metric_reports: Array of aggregated load reports - from all auxiliary replicas for this partition. - Array only contains the latest reported load for each metric. - :type auxiliary_load_metric_reports: - list[~azure.servicefabric.models.LoadMetricReport] - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'primary_load_metric_reports': {'key': 'PrimaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - 'secondary_load_metric_reports': {'key': 'SecondaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - 'auxiliary_load_metric_reports': {'key': 'AuxiliaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - } - - def __init__(self, **kwargs): - super(PartitionLoadInformation, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.primary_load_metric_reports = kwargs.get('primary_load_metric_reports', None) - self.secondary_load_metric_reports = kwargs.get('secondary_load_metric_reports', None) - self.auxiliary_load_metric_reports = kwargs.get('auxiliary_load_metric_reports', None) diff --git a/customSDK/servicefabric/models/partition_load_information_py3.py b/customSDK/servicefabric/models/partition_load_information_py3.py deleted file mode 100644 index b846dae0..00000000 --- a/customSDK/servicefabric/models/partition_load_information_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionLoadInformation(Model): - """Represents load information for a partition, which contains the primary, - secondary and auxiliary reported load metrics. - In case there is no load reported, PartitionLoadInformation will contain - the default load for the service of the partition. - For default loads, LoadMetricReport's LastReportedUtc is set to 0. - - :param partition_id: Id of the partition. - :type partition_id: str - :param primary_load_metric_reports: Array of load reports from the primary - replica for this partition. - :type primary_load_metric_reports: - list[~azure.servicefabric.models.LoadMetricReport] - :param secondary_load_metric_reports: Array of aggregated load reports - from all secondary replicas for this partition. - Array only contains the latest reported load for each metric. - :type secondary_load_metric_reports: - list[~azure.servicefabric.models.LoadMetricReport] - :param auxiliary_load_metric_reports: Array of aggregated load reports - from all auxiliary replicas for this partition. - Array only contains the latest reported load for each metric. - :type auxiliary_load_metric_reports: - list[~azure.servicefabric.models.LoadMetricReport] - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'primary_load_metric_reports': {'key': 'PrimaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - 'secondary_load_metric_reports': {'key': 'SecondaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - 'auxiliary_load_metric_reports': {'key': 'AuxiliaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - } - - def __init__(self, *, partition_id: str=None, primary_load_metric_reports=None, secondary_load_metric_reports=None, auxiliary_load_metric_reports=None, **kwargs) -> None: - super(PartitionLoadInformation, self).__init__(**kwargs) - self.partition_id = partition_id - self.primary_load_metric_reports = primary_load_metric_reports - self.secondary_load_metric_reports = secondary_load_metric_reports - self.auxiliary_load_metric_reports = auxiliary_load_metric_reports diff --git a/customSDK/servicefabric/models/partition_metric_load_description.py b/customSDK/servicefabric/models/partition_metric_load_description.py deleted file mode 100644 index c5f7b756..00000000 --- a/customSDK/servicefabric/models/partition_metric_load_description.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionMetricLoadDescription(Model): - """Represents load information for a partition, which contains the metrics - load information about primary, all secondary replicas/instances or a - specific secondary replica/instance on a specific node , all auxiliary - replicas or a specific auxiliary replica on a specific node. - - :param partition_id: Id of the partition. - :type partition_id: str - :param primary_replica_load_entries: Partition's load information for - primary replica, in case partition is from a stateful service. - :type primary_replica_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :param secondary_replicas_or_instances_load_entries: Partition's load - information for all secondary replicas or instances. - :type secondary_replicas_or_instances_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :param secondary_replica_or_instance_load_entries_per_node: Partition's - load information for a specific secondary replica or instance located on a - specific node. - :type secondary_replica_or_instance_load_entries_per_node: - list[~azure.servicefabric.models.ReplicaMetricLoadDescription] - :param auxiliary_replicas_load_entries: Partition's load information for - all auxiliary replicas. - :type auxiliary_replicas_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :param auxiliary_replica_load_entries_per_node: Partition's load - information for a specific auxiliary replica located on a specific node. - :type auxiliary_replica_load_entries_per_node: - list[~azure.servicefabric.models.ReplicaMetricLoadDescription] - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'primary_replica_load_entries': {'key': 'PrimaryReplicaLoadEntries', 'type': '[MetricLoadDescription]'}, - 'secondary_replicas_or_instances_load_entries': {'key': 'SecondaryReplicasOrInstancesLoadEntries', 'type': '[MetricLoadDescription]'}, - 'secondary_replica_or_instance_load_entries_per_node': {'key': 'SecondaryReplicaOrInstanceLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, - 'auxiliary_replicas_load_entries': {'key': 'AuxiliaryReplicasLoadEntries', 'type': '[MetricLoadDescription]'}, - 'auxiliary_replica_load_entries_per_node': {'key': 'AuxiliaryReplicaLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, - } - - def __init__(self, **kwargs): - super(PartitionMetricLoadDescription, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.primary_replica_load_entries = kwargs.get('primary_replica_load_entries', None) - self.secondary_replicas_or_instances_load_entries = kwargs.get('secondary_replicas_or_instances_load_entries', None) - self.secondary_replica_or_instance_load_entries_per_node = kwargs.get('secondary_replica_or_instance_load_entries_per_node', None) - self.auxiliary_replicas_load_entries = kwargs.get('auxiliary_replicas_load_entries', None) - self.auxiliary_replica_load_entries_per_node = kwargs.get('auxiliary_replica_load_entries_per_node', None) diff --git a/customSDK/servicefabric/models/partition_metric_load_description_py3.py b/customSDK/servicefabric/models/partition_metric_load_description_py3.py deleted file mode 100644 index cb90725d..00000000 --- a/customSDK/servicefabric/models/partition_metric_load_description_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionMetricLoadDescription(Model): - """Represents load information for a partition, which contains the metrics - load information about primary, all secondary replicas/instances or a - specific secondary replica/instance on a specific node , all auxiliary - replicas or a specific auxiliary replica on a specific node. - - :param partition_id: Id of the partition. - :type partition_id: str - :param primary_replica_load_entries: Partition's load information for - primary replica, in case partition is from a stateful service. - :type primary_replica_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :param secondary_replicas_or_instances_load_entries: Partition's load - information for all secondary replicas or instances. - :type secondary_replicas_or_instances_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :param secondary_replica_or_instance_load_entries_per_node: Partition's - load information for a specific secondary replica or instance located on a - specific node. - :type secondary_replica_or_instance_load_entries_per_node: - list[~azure.servicefabric.models.ReplicaMetricLoadDescription] - :param auxiliary_replicas_load_entries: Partition's load information for - all auxiliary replicas. - :type auxiliary_replicas_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :param auxiliary_replica_load_entries_per_node: Partition's load - information for a specific auxiliary replica located on a specific node. - :type auxiliary_replica_load_entries_per_node: - list[~azure.servicefabric.models.ReplicaMetricLoadDescription] - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'primary_replica_load_entries': {'key': 'PrimaryReplicaLoadEntries', 'type': '[MetricLoadDescription]'}, - 'secondary_replicas_or_instances_load_entries': {'key': 'SecondaryReplicasOrInstancesLoadEntries', 'type': '[MetricLoadDescription]'}, - 'secondary_replica_or_instance_load_entries_per_node': {'key': 'SecondaryReplicaOrInstanceLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, - 'auxiliary_replicas_load_entries': {'key': 'AuxiliaryReplicasLoadEntries', 'type': '[MetricLoadDescription]'}, - 'auxiliary_replica_load_entries_per_node': {'key': 'AuxiliaryReplicaLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, - } - - def __init__(self, *, partition_id: str=None, primary_replica_load_entries=None, secondary_replicas_or_instances_load_entries=None, secondary_replica_or_instance_load_entries_per_node=None, auxiliary_replicas_load_entries=None, auxiliary_replica_load_entries_per_node=None, **kwargs) -> None: - super(PartitionMetricLoadDescription, self).__init__(**kwargs) - self.partition_id = partition_id - self.primary_replica_load_entries = primary_replica_load_entries - self.secondary_replicas_or_instances_load_entries = secondary_replicas_or_instances_load_entries - self.secondary_replica_or_instance_load_entries_per_node = secondary_replica_or_instance_load_entries_per_node - self.auxiliary_replicas_load_entries = auxiliary_replicas_load_entries - self.auxiliary_replica_load_entries_per_node = auxiliary_replica_load_entries_per_node diff --git a/customSDK/servicefabric/models/partition_new_health_report_event.py b/customSDK/servicefabric/models/partition_new_health_report_event.py deleted file mode 100644 index b51931d3..00000000 --- a/customSDK/servicefabric/models/partition_new_health_report_event.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_event import PartitionEvent - - -class PartitionNewHealthReportEvent(PartitionEvent): - """Partition Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(PartitionNewHealthReportEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'PartitionNewHealthReport' diff --git a/customSDK/servicefabric/models/partition_new_health_report_event_py3.py b/customSDK/servicefabric/models/partition_new_health_report_event_py3.py deleted file mode 100644 index e03c92aa..00000000 --- a/customSDK/servicefabric/models/partition_new_health_report_event_py3.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_event_py3 import PartitionEvent - - -class PartitionNewHealthReportEvent(PartitionEvent): - """Partition Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'PartitionNewHealthReport' diff --git a/customSDK/servicefabric/models/partition_primary_move_analysis_event.py b/customSDK/servicefabric/models/partition_primary_move_analysis_event.py deleted file mode 100644 index e6aefebd..00000000 --- a/customSDK/servicefabric/models/partition_primary_move_analysis_event.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_analysis_event import PartitionAnalysisEvent - - -class PartitionPrimaryMoveAnalysisEvent(PartitionAnalysisEvent): - """Partition Primary Move Analysis event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param metadata: Required. Metadata about an Analysis Event. - :type metadata: ~azure.servicefabric.models.AnalysisEventMetadata - :param when_move_completed: Required. Time when the move was completed. - :type when_move_completed: datetime - :param previous_node: Required. The name of a Service Fabric node. - :type previous_node: str - :param current_node: Required. The name of a Service Fabric node. - :type current_node: str - :param move_reason: Required. Move reason. - :type move_reason: str - :param relevant_traces: Required. Relevant traces. - :type relevant_traces: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'metadata': {'required': True}, - 'when_move_completed': {'required': True}, - 'previous_node': {'required': True}, - 'current_node': {'required': True}, - 'move_reason': {'required': True}, - 'relevant_traces': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, - 'when_move_completed': {'key': 'WhenMoveCompleted', 'type': 'iso-8601'}, - 'previous_node': {'key': 'PreviousNode', 'type': 'str'}, - 'current_node': {'key': 'CurrentNode', 'type': 'str'}, - 'move_reason': {'key': 'MoveReason', 'type': 'str'}, - 'relevant_traces': {'key': 'RelevantTraces', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PartitionPrimaryMoveAnalysisEvent, self).__init__(**kwargs) - self.when_move_completed = kwargs.get('when_move_completed', None) - self.previous_node = kwargs.get('previous_node', None) - self.current_node = kwargs.get('current_node', None) - self.move_reason = kwargs.get('move_reason', None) - self.relevant_traces = kwargs.get('relevant_traces', None) - self.kind = 'PartitionPrimaryMoveAnalysis' diff --git a/customSDK/servicefabric/models/partition_primary_move_analysis_event_py3.py b/customSDK/servicefabric/models/partition_primary_move_analysis_event_py3.py deleted file mode 100644 index a537c950..00000000 --- a/customSDK/servicefabric/models/partition_primary_move_analysis_event_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_analysis_event_py3 import PartitionAnalysisEvent - - -class PartitionPrimaryMoveAnalysisEvent(PartitionAnalysisEvent): - """Partition Primary Move Analysis event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param metadata: Required. Metadata about an Analysis Event. - :type metadata: ~azure.servicefabric.models.AnalysisEventMetadata - :param when_move_completed: Required. Time when the move was completed. - :type when_move_completed: datetime - :param previous_node: Required. The name of a Service Fabric node. - :type previous_node: str - :param current_node: Required. The name of a Service Fabric node. - :type current_node: str - :param move_reason: Required. Move reason. - :type move_reason: str - :param relevant_traces: Required. Relevant traces. - :type relevant_traces: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'metadata': {'required': True}, - 'when_move_completed': {'required': True}, - 'previous_node': {'required': True}, - 'current_node': {'required': True}, - 'move_reason': {'required': True}, - 'relevant_traces': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, - 'when_move_completed': {'key': 'WhenMoveCompleted', 'type': 'iso-8601'}, - 'previous_node': {'key': 'PreviousNode', 'type': 'str'}, - 'current_node': {'key': 'CurrentNode', 'type': 'str'}, - 'move_reason': {'key': 'MoveReason', 'type': 'str'}, - 'relevant_traces': {'key': 'RelevantTraces', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, metadata, when_move_completed, previous_node: str, current_node: str, move_reason: str, relevant_traces: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionPrimaryMoveAnalysisEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, metadata=metadata, **kwargs) - self.when_move_completed = when_move_completed - self.previous_node = previous_node - self.current_node = current_node - self.move_reason = move_reason - self.relevant_traces = relevant_traces - self.kind = 'PartitionPrimaryMoveAnalysis' diff --git a/customSDK/servicefabric/models/partition_quorum_loss_progress.py b/customSDK/servicefabric/models/partition_quorum_loss_progress.py deleted file mode 100644 index f91903fc..00000000 --- a/customSDK/servicefabric/models/partition_quorum_loss_progress.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionQuorumLossProgress(Model): - """Information about a partition quorum loss user-induced operation. - - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param invoke_quorum_loss_result: Represents information about an - operation in a terminal state (Completed or Faulted). - :type invoke_quorum_loss_result: - ~azure.servicefabric.models.InvokeQuorumLossResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'invoke_quorum_loss_result': {'key': 'InvokeQuorumLossResult', 'type': 'InvokeQuorumLossResult'}, - } - - def __init__(self, **kwargs): - super(PartitionQuorumLossProgress, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.invoke_quorum_loss_result = kwargs.get('invoke_quorum_loss_result', None) diff --git a/customSDK/servicefabric/models/partition_quorum_loss_progress_py3.py b/customSDK/servicefabric/models/partition_quorum_loss_progress_py3.py deleted file mode 100644 index ab03e5fb..00000000 --- a/customSDK/servicefabric/models/partition_quorum_loss_progress_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionQuorumLossProgress(Model): - """Information about a partition quorum loss user-induced operation. - - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param invoke_quorum_loss_result: Represents information about an - operation in a terminal state (Completed or Faulted). - :type invoke_quorum_loss_result: - ~azure.servicefabric.models.InvokeQuorumLossResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'invoke_quorum_loss_result': {'key': 'InvokeQuorumLossResult', 'type': 'InvokeQuorumLossResult'}, - } - - def __init__(self, *, state=None, invoke_quorum_loss_result=None, **kwargs) -> None: - super(PartitionQuorumLossProgress, self).__init__(**kwargs) - self.state = state - self.invoke_quorum_loss_result = invoke_quorum_loss_result diff --git a/customSDK/servicefabric/models/partition_reconfigured_event.py b/customSDK/servicefabric/models/partition_reconfigured_event.py deleted file mode 100644 index 94dd7abd..00000000 --- a/customSDK/servicefabric/models/partition_reconfigured_event.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_event import PartitionEvent - - -class PartitionReconfiguredEvent(PartitionEvent): - """Partition Reconfiguration event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: Required. Id of Node instance. - :type node_instance_id: str - :param service_type: Required. Type of Service. - :type service_type: str - :param cc_epoch_data_loss_version: Required. CcEpochDataLoss version. - :type cc_epoch_data_loss_version: long - :param cc_epoch_config_version: Required. CcEpochConfig version. - :type cc_epoch_config_version: long - :param reconfig_type: Required. Type of reconfiguration. - :type reconfig_type: str - :param result: Required. Describes reconfiguration result. - :type result: str - :param phase0_duration_ms: Required. Duration of Phase0 in milli-seconds. - :type phase0_duration_ms: float - :param phase1_duration_ms: Required. Duration of Phase1 in milli-seconds. - :type phase1_duration_ms: float - :param phase2_duration_ms: Required. Duration of Phase2 in milli-seconds. - :type phase2_duration_ms: float - :param phase3_duration_ms: Required. Duration of Phase3 in milli-seconds. - :type phase3_duration_ms: float - :param phase4_duration_ms: Required. Duration of Phase4 in milli-seconds. - :type phase4_duration_ms: float - :param total_duration_ms: Required. Total duration in milli-seconds. - :type total_duration_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'service_type': {'required': True}, - 'cc_epoch_data_loss_version': {'required': True}, - 'cc_epoch_config_version': {'required': True}, - 'reconfig_type': {'required': True}, - 'result': {'required': True}, - 'phase0_duration_ms': {'required': True}, - 'phase1_duration_ms': {'required': True}, - 'phase2_duration_ms': {'required': True}, - 'phase3_duration_ms': {'required': True}, - 'phase4_duration_ms': {'required': True}, - 'total_duration_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - 'service_type': {'key': 'ServiceType', 'type': 'str'}, - 'cc_epoch_data_loss_version': {'key': 'CcEpochDataLossVersion', 'type': 'long'}, - 'cc_epoch_config_version': {'key': 'CcEpochConfigVersion', 'type': 'long'}, - 'reconfig_type': {'key': 'ReconfigType', 'type': 'str'}, - 'result': {'key': 'Result', 'type': 'str'}, - 'phase0_duration_ms': {'key': 'Phase0DurationMs', 'type': 'float'}, - 'phase1_duration_ms': {'key': 'Phase1DurationMs', 'type': 'float'}, - 'phase2_duration_ms': {'key': 'Phase2DurationMs', 'type': 'float'}, - 'phase3_duration_ms': {'key': 'Phase3DurationMs', 'type': 'float'}, - 'phase4_duration_ms': {'key': 'Phase4DurationMs', 'type': 'float'}, - 'total_duration_ms': {'key': 'TotalDurationMs', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(PartitionReconfiguredEvent, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.node_instance_id = kwargs.get('node_instance_id', None) - self.service_type = kwargs.get('service_type', None) - self.cc_epoch_data_loss_version = kwargs.get('cc_epoch_data_loss_version', None) - self.cc_epoch_config_version = kwargs.get('cc_epoch_config_version', None) - self.reconfig_type = kwargs.get('reconfig_type', None) - self.result = kwargs.get('result', None) - self.phase0_duration_ms = kwargs.get('phase0_duration_ms', None) - self.phase1_duration_ms = kwargs.get('phase1_duration_ms', None) - self.phase2_duration_ms = kwargs.get('phase2_duration_ms', None) - self.phase3_duration_ms = kwargs.get('phase3_duration_ms', None) - self.phase4_duration_ms = kwargs.get('phase4_duration_ms', None) - self.total_duration_ms = kwargs.get('total_duration_ms', None) - self.kind = 'PartitionReconfigured' diff --git a/customSDK/servicefabric/models/partition_reconfigured_event_py3.py b/customSDK/servicefabric/models/partition_reconfigured_event_py3.py deleted file mode 100644 index d414c344..00000000 --- a/customSDK/servicefabric/models/partition_reconfigured_event_py3.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_event_py3 import PartitionEvent - - -class PartitionReconfiguredEvent(PartitionEvent): - """Partition Reconfiguration event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param node_name: Required. The name of a Service Fabric node. - :type node_name: str - :param node_instance_id: Required. Id of Node instance. - :type node_instance_id: str - :param service_type: Required. Type of Service. - :type service_type: str - :param cc_epoch_data_loss_version: Required. CcEpochDataLoss version. - :type cc_epoch_data_loss_version: long - :param cc_epoch_config_version: Required. CcEpochConfig version. - :type cc_epoch_config_version: long - :param reconfig_type: Required. Type of reconfiguration. - :type reconfig_type: str - :param result: Required. Describes reconfiguration result. - :type result: str - :param phase0_duration_ms: Required. Duration of Phase0 in milli-seconds. - :type phase0_duration_ms: float - :param phase1_duration_ms: Required. Duration of Phase1 in milli-seconds. - :type phase1_duration_ms: float - :param phase2_duration_ms: Required. Duration of Phase2 in milli-seconds. - :type phase2_duration_ms: float - :param phase3_duration_ms: Required. Duration of Phase3 in milli-seconds. - :type phase3_duration_ms: float - :param phase4_duration_ms: Required. Duration of Phase4 in milli-seconds. - :type phase4_duration_ms: float - :param total_duration_ms: Required. Total duration in milli-seconds. - :type total_duration_ms: float - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'service_type': {'required': True}, - 'cc_epoch_data_loss_version': {'required': True}, - 'cc_epoch_config_version': {'required': True}, - 'reconfig_type': {'required': True}, - 'result': {'required': True}, - 'phase0_duration_ms': {'required': True}, - 'phase1_duration_ms': {'required': True}, - 'phase2_duration_ms': {'required': True}, - 'phase3_duration_ms': {'required': True}, - 'phase4_duration_ms': {'required': True}, - 'total_duration_ms': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - 'service_type': {'key': 'ServiceType', 'type': 'str'}, - 'cc_epoch_data_loss_version': {'key': 'CcEpochDataLossVersion', 'type': 'long'}, - 'cc_epoch_config_version': {'key': 'CcEpochConfigVersion', 'type': 'long'}, - 'reconfig_type': {'key': 'ReconfigType', 'type': 'str'}, - 'result': {'key': 'Result', 'type': 'str'}, - 'phase0_duration_ms': {'key': 'Phase0DurationMs', 'type': 'float'}, - 'phase1_duration_ms': {'key': 'Phase1DurationMs', 'type': 'float'}, - 'phase2_duration_ms': {'key': 'Phase2DurationMs', 'type': 'float'}, - 'phase3_duration_ms': {'key': 'Phase3DurationMs', 'type': 'float'}, - 'phase4_duration_ms': {'key': 'Phase4DurationMs', 'type': 'float'}, - 'total_duration_ms': {'key': 'TotalDurationMs', 'type': 'float'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, node_name: str, node_instance_id: str, service_type: str, cc_epoch_data_loss_version: int, cc_epoch_config_version: int, reconfig_type: str, result: str, phase0_duration_ms: float, phase1_duration_ms: float, phase2_duration_ms: float, phase3_duration_ms: float, phase4_duration_ms: float, total_duration_ms: float, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(PartitionReconfiguredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.node_name = node_name - self.node_instance_id = node_instance_id - self.service_type = service_type - self.cc_epoch_data_loss_version = cc_epoch_data_loss_version - self.cc_epoch_config_version = cc_epoch_config_version - self.reconfig_type = reconfig_type - self.result = result - self.phase0_duration_ms = phase0_duration_ms - self.phase1_duration_ms = phase1_duration_ms - self.phase2_duration_ms = phase2_duration_ms - self.phase3_duration_ms = phase3_duration_ms - self.phase4_duration_ms = phase4_duration_ms - self.total_duration_ms = total_duration_ms - self.kind = 'PartitionReconfigured' diff --git a/customSDK/servicefabric/models/partition_restart_progress.py b/customSDK/servicefabric/models/partition_restart_progress.py deleted file mode 100644 index 7526c9eb..00000000 --- a/customSDK/servicefabric/models/partition_restart_progress.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionRestartProgress(Model): - """Information about a partition restart user-induced operation. - - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param restart_partition_result: Represents information about an operation - in a terminal state (Completed or Faulted). - :type restart_partition_result: - ~azure.servicefabric.models.RestartPartitionResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'restart_partition_result': {'key': 'RestartPartitionResult', 'type': 'RestartPartitionResult'}, - } - - def __init__(self, **kwargs): - super(PartitionRestartProgress, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.restart_partition_result = kwargs.get('restart_partition_result', None) diff --git a/customSDK/servicefabric/models/partition_restart_progress_py3.py b/customSDK/servicefabric/models/partition_restart_progress_py3.py deleted file mode 100644 index 5d402111..00000000 --- a/customSDK/servicefabric/models/partition_restart_progress_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionRestartProgress(Model): - """Information about a partition restart user-induced operation. - - :param state: The state of the operation. Possible values include: - 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', 'Cancelled', - 'ForceCancelled' - :type state: str or ~azure.servicefabric.models.OperationState - :param restart_partition_result: Represents information about an operation - in a terminal state (Completed or Faulted). - :type restart_partition_result: - ~azure.servicefabric.models.RestartPartitionResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'restart_partition_result': {'key': 'RestartPartitionResult', 'type': 'RestartPartitionResult'}, - } - - def __init__(self, *, state=None, restart_partition_result=None, **kwargs) -> None: - super(PartitionRestartProgress, self).__init__(**kwargs) - self.state = state - self.restart_partition_result = restart_partition_result diff --git a/customSDK/servicefabric/models/partition_safety_check.py b/customSDK/servicefabric/models/partition_safety_check.py deleted file mode 100644 index f3a79a50..00000000 --- a/customSDK/servicefabric/models/partition_safety_check.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .safety_check import SafetyCheck - - -class PartitionSafetyCheck(SafetyCheck): - """Represents a safety check for the service partition being performed by - service fabric before continuing with operations. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: EnsureAvailabilitySafetyCheck, - EnsurePartitionQuorumSafetyCheck, WaitForInbuildReplicaSafetyCheck, - WaitForPrimaryPlacementSafetyCheck, WaitForPrimarySwapSafetyCheck, - WaitForReconfigurationSafetyCheck - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'EnsureAvailability': 'EnsureAvailabilitySafetyCheck', 'EnsurePartitionQuorum': 'EnsurePartitionQuorumSafetyCheck', 'WaitForInbuildReplica': 'WaitForInbuildReplicaSafetyCheck', 'WaitForPrimaryPlacement': 'WaitForPrimaryPlacementSafetyCheck', 'WaitForPrimarySwap': 'WaitForPrimarySwapSafetyCheck', 'WaitForReconfiguration': 'WaitForReconfigurationSafetyCheck'} - } - - def __init__(self, **kwargs): - super(PartitionSafetyCheck, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.kind = 'PartitionSafetyCheck' diff --git a/customSDK/servicefabric/models/partition_safety_check_py3.py b/customSDK/servicefabric/models/partition_safety_check_py3.py deleted file mode 100644 index 86c54d03..00000000 --- a/customSDK/servicefabric/models/partition_safety_check_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .safety_check_py3 import SafetyCheck - - -class PartitionSafetyCheck(SafetyCheck): - """Represents a safety check for the service partition being performed by - service fabric before continuing with operations. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: EnsureAvailabilitySafetyCheck, - EnsurePartitionQuorumSafetyCheck, WaitForInbuildReplicaSafetyCheck, - WaitForPrimaryPlacementSafetyCheck, WaitForPrimarySwapSafetyCheck, - WaitForReconfigurationSafetyCheck - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'EnsureAvailability': 'EnsureAvailabilitySafetyCheck', 'EnsurePartitionQuorum': 'EnsurePartitionQuorumSafetyCheck', 'WaitForInbuildReplica': 'WaitForInbuildReplicaSafetyCheck', 'WaitForPrimaryPlacement': 'WaitForPrimaryPlacementSafetyCheck', 'WaitForPrimarySwap': 'WaitForPrimarySwapSafetyCheck', 'WaitForReconfiguration': 'WaitForReconfigurationSafetyCheck'} - } - - def __init__(self, *, partition_id: str=None, **kwargs) -> None: - super(PartitionSafetyCheck, self).__init__(**kwargs) - self.partition_id = partition_id - self.kind = 'PartitionSafetyCheck' diff --git a/customSDK/servicefabric/models/partition_scheme_description.py b/customSDK/servicefabric/models/partition_scheme_description.py deleted file mode 100644 index 205c3d51..00000000 --- a/customSDK/servicefabric/models/partition_scheme_description.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionSchemeDescription(Model): - """Describes how the service is partitioned. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NamedPartitionSchemeDescription, - SingletonPartitionSchemeDescription, - UniformInt64RangePartitionSchemeDescription - - All required parameters must be populated in order to send to Azure. - - :param partition_scheme: Required. Constant filled by server. - :type partition_scheme: str - """ - - _validation = { - 'partition_scheme': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - } - - _subtype_map = { - 'partition_scheme': {'Named': 'NamedPartitionSchemeDescription', 'Singleton': 'SingletonPartitionSchemeDescription', 'UniformInt64Range': 'UniformInt64RangePartitionSchemeDescription'} - } - - def __init__(self, **kwargs): - super(PartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = None diff --git a/customSDK/servicefabric/models/partition_scheme_description_py3.py b/customSDK/servicefabric/models/partition_scheme_description_py3.py deleted file mode 100644 index 88805c40..00000000 --- a/customSDK/servicefabric/models/partition_scheme_description_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PartitionSchemeDescription(Model): - """Describes how the service is partitioned. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NamedPartitionSchemeDescription, - SingletonPartitionSchemeDescription, - UniformInt64RangePartitionSchemeDescription - - All required parameters must be populated in order to send to Azure. - - :param partition_scheme: Required. Constant filled by server. - :type partition_scheme: str - """ - - _validation = { - 'partition_scheme': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - } - - _subtype_map = { - 'partition_scheme': {'Named': 'NamedPartitionSchemeDescription', 'Singleton': 'SingletonPartitionSchemeDescription', 'UniformInt64Range': 'UniformInt64RangePartitionSchemeDescription'} - } - - def __init__(self, **kwargs) -> None: - super(PartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = None diff --git a/customSDK/servicefabric/models/partitions_health_evaluation.py b/customSDK/servicefabric/models/partitions_health_evaluation.py deleted file mode 100644 index 2fbf52e6..00000000 --- a/customSDK/servicefabric/models/partitions_health_evaluation.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class PartitionsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for the partitions of a service, containing - health evaluations for each unhealthy partition that impacts current - aggregated health state. Can be returned when evaluating service health and - the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_partitions_per_service: Maximum allowed - percentage of unhealthy partitions per service from the - ServiceTypeHealthPolicy. - :type max_percent_unhealthy_partitions_per_service: int - :param total_count: Total number of partitions of the service from the - health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - PartitionHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(PartitionsHealthEvaluation, self).__init__(**kwargs) - self.max_percent_unhealthy_partitions_per_service = kwargs.get('max_percent_unhealthy_partitions_per_service', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Partitions' diff --git a/customSDK/servicefabric/models/partitions_health_evaluation_py3.py b/customSDK/servicefabric/models/partitions_health_evaluation_py3.py deleted file mode 100644 index 012f0669..00000000 --- a/customSDK/servicefabric/models/partitions_health_evaluation_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class PartitionsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for the partitions of a service, containing - health evaluations for each unhealthy partition that impacts current - aggregated health state. Can be returned when evaluating service health and - the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_partitions_per_service: Maximum allowed - percentage of unhealthy partitions per service from the - ServiceTypeHealthPolicy. - :type max_percent_unhealthy_partitions_per_service: int - :param total_count: Total number of partitions of the service from the - health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - PartitionHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_partitions_per_service: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(PartitionsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.max_percent_unhealthy_partitions_per_service = max_percent_unhealthy_partitions_per_service - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Partitions' diff --git a/customSDK/servicefabric/models/primary_replicator_status.py b/customSDK/servicefabric/models/primary_replicator_status.py deleted file mode 100644 index eea2a133..00000000 --- a/customSDK/servicefabric/models/primary_replicator_status.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replicator_status import ReplicatorStatus - - -class PrimaryReplicatorStatus(ReplicatorStatus): - """Provides statistics about the Service Fabric Replicator, when it is - functioning in a Primary role. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param replication_queue_status: Details about the replication queue on - the primary replicator. - :type replication_queue_status: - ~azure.servicefabric.models.ReplicatorQueueStatus - :param remote_replicators: The status of all the active and idle secondary - replicators that the primary is aware of. - :type remote_replicators: - list[~azure.servicefabric.models.RemoteReplicatorStatus] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'remote_replicators': {'key': 'RemoteReplicators', 'type': '[RemoteReplicatorStatus]'}, - } - - def __init__(self, **kwargs): - super(PrimaryReplicatorStatus, self).__init__(**kwargs) - self.replication_queue_status = kwargs.get('replication_queue_status', None) - self.remote_replicators = kwargs.get('remote_replicators', None) - self.kind = 'Primary' diff --git a/customSDK/servicefabric/models/primary_replicator_status_py3.py b/customSDK/servicefabric/models/primary_replicator_status_py3.py deleted file mode 100644 index cbffe9c4..00000000 --- a/customSDK/servicefabric/models/primary_replicator_status_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replicator_status_py3 import ReplicatorStatus - - -class PrimaryReplicatorStatus(ReplicatorStatus): - """Provides statistics about the Service Fabric Replicator, when it is - functioning in a Primary role. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param replication_queue_status: Details about the replication queue on - the primary replicator. - :type replication_queue_status: - ~azure.servicefabric.models.ReplicatorQueueStatus - :param remote_replicators: The status of all the active and idle secondary - replicators that the primary is aware of. - :type remote_replicators: - list[~azure.servicefabric.models.RemoteReplicatorStatus] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'remote_replicators': {'key': 'RemoteReplicators', 'type': '[RemoteReplicatorStatus]'}, - } - - def __init__(self, *, replication_queue_status=None, remote_replicators=None, **kwargs) -> None: - super(PrimaryReplicatorStatus, self).__init__(**kwargs) - self.replication_queue_status = replication_queue_status - self.remote_replicators = remote_replicators - self.kind = 'Primary' diff --git a/customSDK/servicefabric/models/probe.py b/customSDK/servicefabric/models/probe.py deleted file mode 100644 index f1514369..00000000 --- a/customSDK/servicefabric/models/probe.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Probe(Model): - """Probes have a number of fields that you can use to control their behavior. - - :param initial_delay_seconds: The initial delay in seconds to start - executing probe once codepackage has started. Default value: 0 . - :type initial_delay_seconds: int - :param period_seconds: Periodic seconds to execute probe. Default value: - 10 . - :type period_seconds: int - :param timeout_seconds: Period after which probe is considered as failed - if it hasn't completed successfully. Default value: 1 . - :type timeout_seconds: int - :param success_threshold: The count of successful probe executions after - which probe is considered success. Default value: 1 . - :type success_threshold: int - :param failure_threshold: The count of failures after which probe is - considered failed. Default value: 3 . - :type failure_threshold: int - :param exec_property: Exec command to run inside the container. - :type exec_property: ~azure.servicefabric.models.ProbeExec - :param http_get: Http probe for the container. - :type http_get: ~azure.servicefabric.models.ProbeHttpGet - :param tcp_socket: Tcp port to probe inside the container. - :type tcp_socket: ~azure.servicefabric.models.ProbeTcpSocket - """ - - _attribute_map = { - 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, - 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, - 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, - 'exec_property': {'key': 'exec', 'type': 'ProbeExec'}, - 'http_get': {'key': 'httpGet', 'type': 'ProbeHttpGet'}, - 'tcp_socket': {'key': 'tcpSocket', 'type': 'ProbeTcpSocket'}, - } - - def __init__(self, **kwargs): - super(Probe, self).__init__(**kwargs) - self.initial_delay_seconds = kwargs.get('initial_delay_seconds', 0) - self.period_seconds = kwargs.get('period_seconds', 10) - self.timeout_seconds = kwargs.get('timeout_seconds', 1) - self.success_threshold = kwargs.get('success_threshold', 1) - self.failure_threshold = kwargs.get('failure_threshold', 3) - self.exec_property = kwargs.get('exec_property', None) - self.http_get = kwargs.get('http_get', None) - self.tcp_socket = kwargs.get('tcp_socket', None) diff --git a/customSDK/servicefabric/models/probe_exec.py b/customSDK/servicefabric/models/probe_exec.py deleted file mode 100644 index 3bd118a4..00000000 --- a/customSDK/servicefabric/models/probe_exec.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProbeExec(Model): - """Exec command to run inside the container. - - All required parameters must be populated in order to send to Azure. - - :param command: Required. Comma separated command to run inside the - container for example "sh, -c, echo hello world". - :type command: str - """ - - _validation = { - 'command': {'required': True}, - } - - _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProbeExec, self).__init__(**kwargs) - self.command = kwargs.get('command', None) diff --git a/customSDK/servicefabric/models/probe_exec_py3.py b/customSDK/servicefabric/models/probe_exec_py3.py deleted file mode 100644 index 4e7a9d86..00000000 --- a/customSDK/servicefabric/models/probe_exec_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProbeExec(Model): - """Exec command to run inside the container. - - All required parameters must be populated in order to send to Azure. - - :param command: Required. Comma separated command to run inside the - container for example "sh, -c, echo hello world". - :type command: str - """ - - _validation = { - 'command': {'required': True}, - } - - _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, - } - - def __init__(self, *, command: str, **kwargs) -> None: - super(ProbeExec, self).__init__(**kwargs) - self.command = command diff --git a/customSDK/servicefabric/models/probe_http_get.py b/customSDK/servicefabric/models/probe_http_get.py deleted file mode 100644 index acc0ef35..00000000 --- a/customSDK/servicefabric/models/probe_http_get.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProbeHttpGet(Model): - """Http probe for the container. - - All required parameters must be populated in order to send to Azure. - - :param port: Required. Port to access for probe. - :type port: int - :param path: Path to access on the HTTP request. - :type path: str - :param host: Host IP to connect to. - :type host: str - :param http_headers: Headers to set in the request. - :type http_headers: list[~azure.servicefabric.models.ProbeHttpGetHeaders] - :param scheme: Scheme for the http probe. Can be Http or Https. Possible - values include: 'http', 'https' - :type scheme: str or ~azure.servicefabric.models.Scheme - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'port': {'key': 'port', 'type': 'int'}, - 'path': {'key': 'path', 'type': 'str'}, - 'host': {'key': 'host', 'type': 'str'}, - 'http_headers': {'key': 'httpHeaders', 'type': '[ProbeHttpGetHeaders]'}, - 'scheme': {'key': 'scheme', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProbeHttpGet, self).__init__(**kwargs) - self.port = kwargs.get('port', None) - self.path = kwargs.get('path', None) - self.host = kwargs.get('host', None) - self.http_headers = kwargs.get('http_headers', None) - self.scheme = kwargs.get('scheme', None) diff --git a/customSDK/servicefabric/models/probe_http_get_headers.py b/customSDK/servicefabric/models/probe_http_get_headers.py deleted file mode 100644 index 9d705401..00000000 --- a/customSDK/servicefabric/models/probe_http_get_headers.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProbeHttpGetHeaders(Model): - """Http headers. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the header. - :type name: str - :param value: Required. The value of the header. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProbeHttpGetHeaders, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/probe_http_get_headers_py3.py b/customSDK/servicefabric/models/probe_http_get_headers_py3.py deleted file mode 100644 index 877c9ea7..00000000 --- a/customSDK/servicefabric/models/probe_http_get_headers_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProbeHttpGetHeaders(Model): - """Http headers. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the header. - :type name: str - :param value: Required. The value of the header. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str, **kwargs) -> None: - super(ProbeHttpGetHeaders, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/customSDK/servicefabric/models/probe_http_get_py3.py b/customSDK/servicefabric/models/probe_http_get_py3.py deleted file mode 100644 index c3041812..00000000 --- a/customSDK/servicefabric/models/probe_http_get_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProbeHttpGet(Model): - """Http probe for the container. - - All required parameters must be populated in order to send to Azure. - - :param port: Required. Port to access for probe. - :type port: int - :param path: Path to access on the HTTP request. - :type path: str - :param host: Host IP to connect to. - :type host: str - :param http_headers: Headers to set in the request. - :type http_headers: list[~azure.servicefabric.models.ProbeHttpGetHeaders] - :param scheme: Scheme for the http probe. Can be Http or Https. Possible - values include: 'http', 'https' - :type scheme: str or ~azure.servicefabric.models.Scheme - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'port': {'key': 'port', 'type': 'int'}, - 'path': {'key': 'path', 'type': 'str'}, - 'host': {'key': 'host', 'type': 'str'}, - 'http_headers': {'key': 'httpHeaders', 'type': '[ProbeHttpGetHeaders]'}, - 'scheme': {'key': 'scheme', 'type': 'str'}, - } - - def __init__(self, *, port: int, path: str=None, host: str=None, http_headers=None, scheme=None, **kwargs) -> None: - super(ProbeHttpGet, self).__init__(**kwargs) - self.port = port - self.path = path - self.host = host - self.http_headers = http_headers - self.scheme = scheme diff --git a/customSDK/servicefabric/models/probe_py3.py b/customSDK/servicefabric/models/probe_py3.py deleted file mode 100644 index 13e5626c..00000000 --- a/customSDK/servicefabric/models/probe_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Probe(Model): - """Probes have a number of fields that you can use to control their behavior. - - :param initial_delay_seconds: The initial delay in seconds to start - executing probe once codepackage has started. Default value: 0 . - :type initial_delay_seconds: int - :param period_seconds: Periodic seconds to execute probe. Default value: - 10 . - :type period_seconds: int - :param timeout_seconds: Period after which probe is considered as failed - if it hasn't completed successfully. Default value: 1 . - :type timeout_seconds: int - :param success_threshold: The count of successful probe executions after - which probe is considered success. Default value: 1 . - :type success_threshold: int - :param failure_threshold: The count of failures after which probe is - considered failed. Default value: 3 . - :type failure_threshold: int - :param exec_property: Exec command to run inside the container. - :type exec_property: ~azure.servicefabric.models.ProbeExec - :param http_get: Http probe for the container. - :type http_get: ~azure.servicefabric.models.ProbeHttpGet - :param tcp_socket: Tcp port to probe inside the container. - :type tcp_socket: ~azure.servicefabric.models.ProbeTcpSocket - """ - - _attribute_map = { - 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, - 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, - 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, - 'exec_property': {'key': 'exec', 'type': 'ProbeExec'}, - 'http_get': {'key': 'httpGet', 'type': 'ProbeHttpGet'}, - 'tcp_socket': {'key': 'tcpSocket', 'type': 'ProbeTcpSocket'}, - } - - def __init__(self, *, initial_delay_seconds: int=0, period_seconds: int=10, timeout_seconds: int=1, success_threshold: int=1, failure_threshold: int=3, exec_property=None, http_get=None, tcp_socket=None, **kwargs) -> None: - super(Probe, self).__init__(**kwargs) - self.initial_delay_seconds = initial_delay_seconds - self.period_seconds = period_seconds - self.timeout_seconds = timeout_seconds - self.success_threshold = success_threshold - self.failure_threshold = failure_threshold - self.exec_property = exec_property - self.http_get = http_get - self.tcp_socket = tcp_socket diff --git a/customSDK/servicefabric/models/probe_tcp_socket.py b/customSDK/servicefabric/models/probe_tcp_socket.py deleted file mode 100644 index 73259a6d..00000000 --- a/customSDK/servicefabric/models/probe_tcp_socket.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProbeTcpSocket(Model): - """Tcp port to probe inside the container. - - All required parameters must be populated in order to send to Azure. - - :param port: Required. Port to access for probe. - :type port: int - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ProbeTcpSocket, self).__init__(**kwargs) - self.port = kwargs.get('port', None) diff --git a/customSDK/servicefabric/models/probe_tcp_socket_py3.py b/customSDK/servicefabric/models/probe_tcp_socket_py3.py deleted file mode 100644 index 07e97f8d..00000000 --- a/customSDK/servicefabric/models/probe_tcp_socket_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProbeTcpSocket(Model): - """Tcp port to probe inside the container. - - All required parameters must be populated in order to send to Azure. - - :param port: Required. Port to access for probe. - :type port: int - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__(self, *, port: int, **kwargs) -> None: - super(ProbeTcpSocket, self).__init__(**kwargs) - self.port = port diff --git a/customSDK/servicefabric/models/property_batch_description_list.py b/customSDK/servicefabric/models/property_batch_description_list.py deleted file mode 100644 index d3f8aa26..00000000 --- a/customSDK/servicefabric/models/property_batch_description_list.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyBatchDescriptionList(Model): - """Describes a list of property batch operations to be executed. Either all or - none of the operations will be committed. - - :param operations: A list of the property batch operations to be executed. - :type operations: list[~azure.servicefabric.models.PropertyBatchOperation] - """ - - _attribute_map = { - 'operations': {'key': 'Operations', 'type': '[PropertyBatchOperation]'}, - } - - def __init__(self, **kwargs): - super(PropertyBatchDescriptionList, self).__init__(**kwargs) - self.operations = kwargs.get('operations', None) diff --git a/customSDK/servicefabric/models/property_batch_description_list_py3.py b/customSDK/servicefabric/models/property_batch_description_list_py3.py deleted file mode 100644 index 80a6a22a..00000000 --- a/customSDK/servicefabric/models/property_batch_description_list_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyBatchDescriptionList(Model): - """Describes a list of property batch operations to be executed. Either all or - none of the operations will be committed. - - :param operations: A list of the property batch operations to be executed. - :type operations: list[~azure.servicefabric.models.PropertyBatchOperation] - """ - - _attribute_map = { - 'operations': {'key': 'Operations', 'type': '[PropertyBatchOperation]'}, - } - - def __init__(self, *, operations=None, **kwargs) -> None: - super(PropertyBatchDescriptionList, self).__init__(**kwargs) - self.operations = operations diff --git a/customSDK/servicefabric/models/property_batch_info.py b/customSDK/servicefabric/models/property_batch_info.py deleted file mode 100644 index cd752c9d..00000000 --- a/customSDK/servicefabric/models/property_batch_info.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyBatchInfo(Model): - """Information about the results of a property batch. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SuccessfulPropertyBatchInfo, FailedPropertyBatchInfo - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Successful': 'SuccessfulPropertyBatchInfo', 'Failed': 'FailedPropertyBatchInfo'} - } - - def __init__(self, **kwargs): - super(PropertyBatchInfo, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/property_batch_info_py3.py b/customSDK/servicefabric/models/property_batch_info_py3.py deleted file mode 100644 index e11f1fdd..00000000 --- a/customSDK/servicefabric/models/property_batch_info_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyBatchInfo(Model): - """Information about the results of a property batch. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SuccessfulPropertyBatchInfo, FailedPropertyBatchInfo - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Successful': 'SuccessfulPropertyBatchInfo', 'Failed': 'FailedPropertyBatchInfo'} - } - - def __init__(self, **kwargs) -> None: - super(PropertyBatchInfo, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/property_batch_operation.py b/customSDK/servicefabric/models/property_batch_operation.py deleted file mode 100644 index 59bd0c21..00000000 --- a/customSDK/servicefabric/models/property_batch_operation.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyBatchOperation(Model): - """Represents the base type for property operations that can be put into a - batch and submitted. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CheckExistsPropertyBatchOperation, - CheckSequencePropertyBatchOperation, CheckValuePropertyBatchOperation, - DeletePropertyBatchOperation, GetPropertyBatchOperation, - PutPropertyBatchOperation - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'CheckExists': 'CheckExistsPropertyBatchOperation', 'CheckSequence': 'CheckSequencePropertyBatchOperation', 'CheckValue': 'CheckValuePropertyBatchOperation', 'Delete': 'DeletePropertyBatchOperation', 'Get': 'GetPropertyBatchOperation', 'Put': 'PutPropertyBatchOperation'} - } - - def __init__(self, **kwargs): - super(PropertyBatchOperation, self).__init__(**kwargs) - self.property_name = kwargs.get('property_name', None) - self.kind = None diff --git a/customSDK/servicefabric/models/property_batch_operation_py3.py b/customSDK/servicefabric/models/property_batch_operation_py3.py deleted file mode 100644 index de400562..00000000 --- a/customSDK/servicefabric/models/property_batch_operation_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyBatchOperation(Model): - """Represents the base type for property operations that can be put into a - batch and submitted. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CheckExistsPropertyBatchOperation, - CheckSequencePropertyBatchOperation, CheckValuePropertyBatchOperation, - DeletePropertyBatchOperation, GetPropertyBatchOperation, - PutPropertyBatchOperation - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'CheckExists': 'CheckExistsPropertyBatchOperation', 'CheckSequence': 'CheckSequencePropertyBatchOperation', 'CheckValue': 'CheckValuePropertyBatchOperation', 'Delete': 'DeletePropertyBatchOperation', 'Get': 'GetPropertyBatchOperation', 'Put': 'PutPropertyBatchOperation'} - } - - def __init__(self, *, property_name: str, **kwargs) -> None: - super(PropertyBatchOperation, self).__init__(**kwargs) - self.property_name = property_name - self.kind = None diff --git a/customSDK/servicefabric/models/property_description.py b/customSDK/servicefabric/models/property_description.py deleted file mode 100644 index f94b4705..00000000 --- a/customSDK/servicefabric/models/property_description.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyDescription(Model): - """Description of a Service Fabric property. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param custom_type_id: The property's custom type ID. Using this property, - the user is able to tag the type of the value of the property. - :type custom_type_id: str - :param value: Required. Describes a Service Fabric property value. - :type value: ~azure.servicefabric.models.PropertyValue - """ - - _validation = { - 'property_name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - } - - def __init__(self, **kwargs): - super(PropertyDescription, self).__init__(**kwargs) - self.property_name = kwargs.get('property_name', None) - self.custom_type_id = kwargs.get('custom_type_id', None) - self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/property_description_py3.py b/customSDK/servicefabric/models/property_description_py3.py deleted file mode 100644 index bfdb021e..00000000 --- a/customSDK/servicefabric/models/property_description_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyDescription(Model): - """Description of a Service Fabric property. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param custom_type_id: The property's custom type ID. Using this property, - the user is able to tag the type of the value of the property. - :type custom_type_id: str - :param value: Required. Describes a Service Fabric property value. - :type value: ~azure.servicefabric.models.PropertyValue - """ - - _validation = { - 'property_name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - } - - def __init__(self, *, property_name: str, value, custom_type_id: str=None, **kwargs) -> None: - super(PropertyDescription, self).__init__(**kwargs) - self.property_name = property_name - self.custom_type_id = custom_type_id - self.value = value diff --git a/customSDK/servicefabric/models/property_info.py b/customSDK/servicefabric/models/property_info.py deleted file mode 100644 index 943ae118..00000000 --- a/customSDK/servicefabric/models/property_info.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyInfo(Model): - """Information about a Service Fabric property. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the Service Fabric property. - :type name: str - :param value: Describes a Service Fabric property value. - :type value: ~azure.servicefabric.models.PropertyValue - :param metadata: Required. The metadata associated with a property, - including the property's name. - :type metadata: ~azure.servicefabric.models.PropertyMetadata - """ - - _validation = { - 'name': {'required': True}, - 'metadata': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - 'metadata': {'key': 'Metadata', 'type': 'PropertyMetadata'}, - } - - def __init__(self, **kwargs): - super(PropertyInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - self.metadata = kwargs.get('metadata', None) diff --git a/customSDK/servicefabric/models/property_info_py3.py b/customSDK/servicefabric/models/property_info_py3.py deleted file mode 100644 index b5a72e50..00000000 --- a/customSDK/servicefabric/models/property_info_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyInfo(Model): - """Information about a Service Fabric property. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the Service Fabric property. - :type name: str - :param value: Describes a Service Fabric property value. - :type value: ~azure.servicefabric.models.PropertyValue - :param metadata: Required. The metadata associated with a property, - including the property's name. - :type metadata: ~azure.servicefabric.models.PropertyMetadata - """ - - _validation = { - 'name': {'required': True}, - 'metadata': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - 'metadata': {'key': 'Metadata', 'type': 'PropertyMetadata'}, - } - - def __init__(self, *, name: str, metadata, value=None, **kwargs) -> None: - super(PropertyInfo, self).__init__(**kwargs) - self.name = name - self.value = value - self.metadata = metadata diff --git a/customSDK/servicefabric/models/property_metadata.py b/customSDK/servicefabric/models/property_metadata.py deleted file mode 100644 index 8c772044..00000000 --- a/customSDK/servicefabric/models/property_metadata.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyMetadata(Model): - """The metadata associated with a property, including the property's name. - - :param type_id: The kind of property, determined by the type of data. - Following are the possible values. Possible values include: 'Invalid', - 'Binary', 'Int64', 'Double', 'String', 'Guid' - :type type_id: str or ~azure.servicefabric.models.PropertyValueKind - :param custom_type_id: The property's custom type ID. - :type custom_type_id: str - :param parent: The name of the parent Service Fabric Name for the - property. It could be thought of as the name-space/table under which the - property exists. - :type parent: str - :param size_in_bytes: The length of the serialized property value. - :type size_in_bytes: int - :param last_modified_utc_timestamp: Represents when the Property was last - modified. Only write operations will cause this field to be updated. - :type last_modified_utc_timestamp: datetime - :param sequence_number: The version of the property. Every time a property - is modified, its sequence number is increased. - :type sequence_number: str - """ - - _attribute_map = { - 'type_id': {'key': 'TypeId', 'type': 'str'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - 'parent': {'key': 'Parent', 'type': 'str'}, - 'size_in_bytes': {'key': 'SizeInBytes', 'type': 'int'}, - 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PropertyMetadata, self).__init__(**kwargs) - self.type_id = kwargs.get('type_id', None) - self.custom_type_id = kwargs.get('custom_type_id', None) - self.parent = kwargs.get('parent', None) - self.size_in_bytes = kwargs.get('size_in_bytes', None) - self.last_modified_utc_timestamp = kwargs.get('last_modified_utc_timestamp', None) - self.sequence_number = kwargs.get('sequence_number', None) diff --git a/customSDK/servicefabric/models/property_metadata_py3.py b/customSDK/servicefabric/models/property_metadata_py3.py deleted file mode 100644 index 8d3d2a9e..00000000 --- a/customSDK/servicefabric/models/property_metadata_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyMetadata(Model): - """The metadata associated with a property, including the property's name. - - :param type_id: The kind of property, determined by the type of data. - Following are the possible values. Possible values include: 'Invalid', - 'Binary', 'Int64', 'Double', 'String', 'Guid' - :type type_id: str or ~azure.servicefabric.models.PropertyValueKind - :param custom_type_id: The property's custom type ID. - :type custom_type_id: str - :param parent: The name of the parent Service Fabric Name for the - property. It could be thought of as the name-space/table under which the - property exists. - :type parent: str - :param size_in_bytes: The length of the serialized property value. - :type size_in_bytes: int - :param last_modified_utc_timestamp: Represents when the Property was last - modified. Only write operations will cause this field to be updated. - :type last_modified_utc_timestamp: datetime - :param sequence_number: The version of the property. Every time a property - is modified, its sequence number is increased. - :type sequence_number: str - """ - - _attribute_map = { - 'type_id': {'key': 'TypeId', 'type': 'str'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - 'parent': {'key': 'Parent', 'type': 'str'}, - 'size_in_bytes': {'key': 'SizeInBytes', 'type': 'int'}, - 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - } - - def __init__(self, *, type_id=None, custom_type_id: str=None, parent: str=None, size_in_bytes: int=None, last_modified_utc_timestamp=None, sequence_number: str=None, **kwargs) -> None: - super(PropertyMetadata, self).__init__(**kwargs) - self.type_id = type_id - self.custom_type_id = custom_type_id - self.parent = parent - self.size_in_bytes = size_in_bytes - self.last_modified_utc_timestamp = last_modified_utc_timestamp - self.sequence_number = sequence_number diff --git a/customSDK/servicefabric/models/property_value.py b/customSDK/servicefabric/models/property_value.py deleted file mode 100644 index 6c56b26d..00000000 --- a/customSDK/servicefabric/models/property_value.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyValue(Model): - """Describes a Service Fabric property value. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BinaryPropertyValue, Int64PropertyValue, - DoublePropertyValue, StringPropertyValue, GuidPropertyValue - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Binary': 'BinaryPropertyValue', 'Int64': 'Int64PropertyValue', 'Double': 'DoublePropertyValue', 'String': 'StringPropertyValue', 'Guid': 'GuidPropertyValue'} - } - - def __init__(self, **kwargs): - super(PropertyValue, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/property_value_py3.py b/customSDK/servicefabric/models/property_value_py3.py deleted file mode 100644 index 44b7c3ba..00000000 --- a/customSDK/servicefabric/models/property_value_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PropertyValue(Model): - """Describes a Service Fabric property value. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BinaryPropertyValue, Int64PropertyValue, - DoublePropertyValue, StringPropertyValue, GuidPropertyValue - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Binary': 'BinaryPropertyValue', 'Int64': 'Int64PropertyValue', 'Double': 'DoublePropertyValue', 'String': 'StringPropertyValue', 'Guid': 'GuidPropertyValue'} - } - - def __init__(self, **kwargs) -> None: - super(PropertyValue, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/provision_application_type_description.py b/customSDK/servicefabric/models/provision_application_type_description.py deleted file mode 100644 index 78928bff..00000000 --- a/customSDK/servicefabric/models/provision_application_type_description.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .provision_application_type_description_base import ProvisionApplicationTypeDescriptionBase - - -class ProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): - """Describes the operation to register or provision an application type using - an application package uploaded to the Service Fabric image store. - - All required parameters must be populated in order to send to Azure. - - :param async_property: Required. Indicates whether or not provisioning - should occur asynchronously. When set to true, the provision operation - returns when the request is accepted by the system, and the provision - operation continues without any timeout limit. The default value is false. - For large application packages, we recommend setting the value to true. - :type async_property: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_type_build_path: Required. The relative path for the - application package in the image store specified during the prior upload - operation. - :type application_type_build_path: str - :param application_package_cleanup_policy: The kind of action that needs - to be taken for cleaning up the application package after successful - provision. Possible values include: 'Invalid', 'Default', 'Automatic', - 'Manual' - :type application_package_cleanup_policy: str or - ~azure.servicefabric.models.ApplicationPackageCleanupPolicy - """ - - _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, - 'application_type_build_path': {'required': True}, - } - - _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, - 'application_package_cleanup_policy': {'key': 'ApplicationPackageCleanupPolicy', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProvisionApplicationTypeDescription, self).__init__(**kwargs) - self.application_type_build_path = kwargs.get('application_type_build_path', None) - self.application_package_cleanup_policy = kwargs.get('application_package_cleanup_policy', None) - self.kind = 'ImageStorePath' diff --git a/customSDK/servicefabric/models/provision_application_type_description_base.py b/customSDK/servicefabric/models/provision_application_type_description_base.py deleted file mode 100644 index e1e3c991..00000000 --- a/customSDK/servicefabric/models/provision_application_type_description_base.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProvisionApplicationTypeDescriptionBase(Model): - """Represents the type of registration or provision requested, and if the - operation needs to be asynchronous or not. Supported types of provision - operations are from either image store or external store. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ProvisionApplicationTypeDescription, - ExternalStoreProvisionApplicationTypeDescription - - All required parameters must be populated in order to send to Azure. - - :param async_property: Required. Indicates whether or not provisioning - should occur asynchronously. When set to true, the provision operation - returns when the request is accepted by the system, and the provision - operation continues without any timeout limit. The default value is false. - For large application packages, we recommend setting the value to true. - :type async_property: bool - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ImageStorePath': 'ProvisionApplicationTypeDescription', 'ExternalStore': 'ExternalStoreProvisionApplicationTypeDescription'} - } - - def __init__(self, **kwargs): - super(ProvisionApplicationTypeDescriptionBase, self).__init__(**kwargs) - self.async_property = kwargs.get('async_property', None) - self.kind = None diff --git a/customSDK/servicefabric/models/provision_application_type_description_base_py3.py b/customSDK/servicefabric/models/provision_application_type_description_base_py3.py deleted file mode 100644 index df9452ea..00000000 --- a/customSDK/servicefabric/models/provision_application_type_description_base_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProvisionApplicationTypeDescriptionBase(Model): - """Represents the type of registration or provision requested, and if the - operation needs to be asynchronous or not. Supported types of provision - operations are from either image store or external store. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ProvisionApplicationTypeDescription, - ExternalStoreProvisionApplicationTypeDescription - - All required parameters must be populated in order to send to Azure. - - :param async_property: Required. Indicates whether or not provisioning - should occur asynchronously. When set to true, the provision operation - returns when the request is accepted by the system, and the provision - operation continues without any timeout limit. The default value is false. - For large application packages, we recommend setting the value to true. - :type async_property: bool - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ImageStorePath': 'ProvisionApplicationTypeDescription', 'ExternalStore': 'ExternalStoreProvisionApplicationTypeDescription'} - } - - def __init__(self, *, async_property: bool, **kwargs) -> None: - super(ProvisionApplicationTypeDescriptionBase, self).__init__(**kwargs) - self.async_property = async_property - self.kind = None diff --git a/customSDK/servicefabric/models/provision_application_type_description_py3.py b/customSDK/servicefabric/models/provision_application_type_description_py3.py deleted file mode 100644 index 3a40324c..00000000 --- a/customSDK/servicefabric/models/provision_application_type_description_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .provision_application_type_description_base_py3 import ProvisionApplicationTypeDescriptionBase - - -class ProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): - """Describes the operation to register or provision an application type using - an application package uploaded to the Service Fabric image store. - - All required parameters must be populated in order to send to Azure. - - :param async_property: Required. Indicates whether or not provisioning - should occur asynchronously. When set to true, the provision operation - returns when the request is accepted by the system, and the provision - operation continues without any timeout limit. The default value is false. - For large application packages, we recommend setting the value to true. - :type async_property: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param application_type_build_path: Required. The relative path for the - application package in the image store specified during the prior upload - operation. - :type application_type_build_path: str - :param application_package_cleanup_policy: The kind of action that needs - to be taken for cleaning up the application package after successful - provision. Possible values include: 'Invalid', 'Default', 'Automatic', - 'Manual' - :type application_package_cleanup_policy: str or - ~azure.servicefabric.models.ApplicationPackageCleanupPolicy - """ - - _validation = { - 'async_property': {'required': True}, - 'kind': {'required': True}, - 'application_type_build_path': {'required': True}, - } - - _attribute_map = { - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, - 'application_package_cleanup_policy': {'key': 'ApplicationPackageCleanupPolicy', 'type': 'str'}, - } - - def __init__(self, *, async_property: bool, application_type_build_path: str, application_package_cleanup_policy=None, **kwargs) -> None: - super(ProvisionApplicationTypeDescription, self).__init__(async_property=async_property, **kwargs) - self.application_type_build_path = application_type_build_path - self.application_package_cleanup_policy = application_package_cleanup_policy - self.kind = 'ImageStorePath' diff --git a/customSDK/servicefabric/models/provision_fabric_description.py b/customSDK/servicefabric/models/provision_fabric_description.py deleted file mode 100644 index b033b3d5..00000000 --- a/customSDK/servicefabric/models/provision_fabric_description.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProvisionFabricDescription(Model): - """Describes the parameters for provisioning a cluster. - - :param code_file_path: The cluster code package file path. - :type code_file_path: str - :param cluster_manifest_file_path: The cluster manifest file path. - :type cluster_manifest_file_path: str - """ - - _attribute_map = { - 'code_file_path': {'key': 'CodeFilePath', 'type': 'str'}, - 'cluster_manifest_file_path': {'key': 'ClusterManifestFilePath', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProvisionFabricDescription, self).__init__(**kwargs) - self.code_file_path = kwargs.get('code_file_path', None) - self.cluster_manifest_file_path = kwargs.get('cluster_manifest_file_path', None) diff --git a/customSDK/servicefabric/models/provision_fabric_description_py3.py b/customSDK/servicefabric/models/provision_fabric_description_py3.py deleted file mode 100644 index 674a40cb..00000000 --- a/customSDK/servicefabric/models/provision_fabric_description_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProvisionFabricDescription(Model): - """Describes the parameters for provisioning a cluster. - - :param code_file_path: The cluster code package file path. - :type code_file_path: str - :param cluster_manifest_file_path: The cluster manifest file path. - :type cluster_manifest_file_path: str - """ - - _attribute_map = { - 'code_file_path': {'key': 'CodeFilePath', 'type': 'str'}, - 'cluster_manifest_file_path': {'key': 'ClusterManifestFilePath', 'type': 'str'}, - } - - def __init__(self, *, code_file_path: str=None, cluster_manifest_file_path: str=None, **kwargs) -> None: - super(ProvisionFabricDescription, self).__init__(**kwargs) - self.code_file_path = code_file_path - self.cluster_manifest_file_path = cluster_manifest_file_path diff --git a/customSDK/servicefabric/models/put_property_batch_operation.py b/customSDK/servicefabric/models/put_property_batch_operation.py deleted file mode 100644 index c1e4a263..00000000 --- a/customSDK/servicefabric/models/put_property_batch_operation.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_batch_operation import PropertyBatchOperation - - -class PutPropertyBatchOperation(PropertyBatchOperation): - """Puts the specified property under the specified name. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param value: Required. Describes a Service Fabric property value. - :type value: ~azure.servicefabric.models.PropertyValue - :param custom_type_id: The property's custom type ID. Using this property, - the user is able to tag the type of the value of the property. - :type custom_type_id: str - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PutPropertyBatchOperation, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.custom_type_id = kwargs.get('custom_type_id', None) - self.kind = 'Put' diff --git a/customSDK/servicefabric/models/put_property_batch_operation_py3.py b/customSDK/servicefabric/models/put_property_batch_operation_py3.py deleted file mode 100644 index 862605ac..00000000 --- a/customSDK/servicefabric/models/put_property_batch_operation_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_batch_operation_py3 import PropertyBatchOperation - - -class PutPropertyBatchOperation(PropertyBatchOperation): - """Puts the specified property under the specified name. - Note that if one PropertyBatchOperation in a PropertyBatch fails, - the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :param property_name: Required. The name of the Service Fabric property. - :type property_name: str - :param kind: Required. Constant filled by server. - :type kind: str - :param value: Required. Describes a Service Fabric property value. - :type value: ~azure.servicefabric.models.PropertyValue - :param custom_type_id: The property's custom type ID. Using this property, - the user is able to tag the type of the value of the property. - :type custom_type_id: str - """ - - _validation = { - 'property_name': {'required': True}, - 'kind': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - } - - def __init__(self, *, property_name: str, value, custom_type_id: str=None, **kwargs) -> None: - super(PutPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.value = value - self.custom_type_id = custom_type_id - self.kind = 'Put' diff --git a/customSDK/servicefabric/models/reconfiguration_information.py b/customSDK/servicefabric/models/reconfiguration_information.py deleted file mode 100644 index 4e46c96e..00000000 --- a/customSDK/servicefabric/models/reconfiguration_information.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReconfigurationInformation(Model): - """Information about current reconfiguration like phase, type, previous - configuration role of replica and reconfiguration start date time. - - :param previous_configuration_role: Replica role before reconfiguration - started. Possible values include: 'Unknown', 'None', 'Primary', - 'IdleSecondary', 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', - 'PrimaryAuxiliary' - :type previous_configuration_role: str or - ~azure.servicefabric.models.ReplicaRole - :param reconfiguration_phase: Current phase of ongoing reconfiguration. If - no reconfiguration is taking place then this value will be "None". - Possible values include: 'Unknown', 'None', 'Phase0', 'Phase1', 'Phase2', - 'Phase3', 'Phase4', 'AbortPhaseZero' - :type reconfiguration_phase: str or - ~azure.servicefabric.models.ReconfigurationPhase - :param reconfiguration_type: Type of current ongoing reconfiguration. If - no reconfiguration is taking place then this value will be "None". - Possible values include: 'Unknown', 'SwapPrimary', 'Failover', 'Other' - :type reconfiguration_type: str or - ~azure.servicefabric.models.ReconfigurationType - :param reconfiguration_start_time_utc: Start time (in UTC) of the ongoing - reconfiguration. If no reconfiguration is taking place then this value - will be zero date-time. - :type reconfiguration_start_time_utc: datetime - """ - - _attribute_map = { - 'previous_configuration_role': {'key': 'PreviousConfigurationRole', 'type': 'str'}, - 'reconfiguration_phase': {'key': 'ReconfigurationPhase', 'type': 'str'}, - 'reconfiguration_type': {'key': 'ReconfigurationType', 'type': 'str'}, - 'reconfiguration_start_time_utc': {'key': 'ReconfigurationStartTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ReconfigurationInformation, self).__init__(**kwargs) - self.previous_configuration_role = kwargs.get('previous_configuration_role', None) - self.reconfiguration_phase = kwargs.get('reconfiguration_phase', None) - self.reconfiguration_type = kwargs.get('reconfiguration_type', None) - self.reconfiguration_start_time_utc = kwargs.get('reconfiguration_start_time_utc', None) diff --git a/customSDK/servicefabric/models/reconfiguration_information_py3.py b/customSDK/servicefabric/models/reconfiguration_information_py3.py deleted file mode 100644 index 5a6d70a4..00000000 --- a/customSDK/servicefabric/models/reconfiguration_information_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReconfigurationInformation(Model): - """Information about current reconfiguration like phase, type, previous - configuration role of replica and reconfiguration start date time. - - :param previous_configuration_role: Replica role before reconfiguration - started. Possible values include: 'Unknown', 'None', 'Primary', - 'IdleSecondary', 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', - 'PrimaryAuxiliary' - :type previous_configuration_role: str or - ~azure.servicefabric.models.ReplicaRole - :param reconfiguration_phase: Current phase of ongoing reconfiguration. If - no reconfiguration is taking place then this value will be "None". - Possible values include: 'Unknown', 'None', 'Phase0', 'Phase1', 'Phase2', - 'Phase3', 'Phase4', 'AbortPhaseZero' - :type reconfiguration_phase: str or - ~azure.servicefabric.models.ReconfigurationPhase - :param reconfiguration_type: Type of current ongoing reconfiguration. If - no reconfiguration is taking place then this value will be "None". - Possible values include: 'Unknown', 'SwapPrimary', 'Failover', 'Other' - :type reconfiguration_type: str or - ~azure.servicefabric.models.ReconfigurationType - :param reconfiguration_start_time_utc: Start time (in UTC) of the ongoing - reconfiguration. If no reconfiguration is taking place then this value - will be zero date-time. - :type reconfiguration_start_time_utc: datetime - """ - - _attribute_map = { - 'previous_configuration_role': {'key': 'PreviousConfigurationRole', 'type': 'str'}, - 'reconfiguration_phase': {'key': 'ReconfigurationPhase', 'type': 'str'}, - 'reconfiguration_type': {'key': 'ReconfigurationType', 'type': 'str'}, - 'reconfiguration_start_time_utc': {'key': 'ReconfigurationStartTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, *, previous_configuration_role=None, reconfiguration_phase=None, reconfiguration_type=None, reconfiguration_start_time_utc=None, **kwargs) -> None: - super(ReconfigurationInformation, self).__init__(**kwargs) - self.previous_configuration_role = previous_configuration_role - self.reconfiguration_phase = reconfiguration_phase - self.reconfiguration_type = reconfiguration_type - self.reconfiguration_start_time_utc = reconfiguration_start_time_utc diff --git a/customSDK/servicefabric/models/registry_credential.py b/customSDK/servicefabric/models/registry_credential.py deleted file mode 100644 index 983e9286..00000000 --- a/customSDK/servicefabric/models/registry_credential.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistryCredential(Model): - """Credential information to connect to container registry. - - :param registry_user_name: The user name to connect to container registry. - :type registry_user_name: str - :param registry_password: The password for supplied username to connect to - container registry. - :type registry_password: str - :param password_encrypted: Indicates that supplied container registry - password is encrypted. - :type password_encrypted: bool - """ - - _attribute_map = { - 'registry_user_name': {'key': 'RegistryUserName', 'type': 'str'}, - 'registry_password': {'key': 'RegistryPassword', 'type': 'str'}, - 'password_encrypted': {'key': 'PasswordEncrypted', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RegistryCredential, self).__init__(**kwargs) - self.registry_user_name = kwargs.get('registry_user_name', None) - self.registry_password = kwargs.get('registry_password', None) - self.password_encrypted = kwargs.get('password_encrypted', None) diff --git a/customSDK/servicefabric/models/registry_credential_py3.py b/customSDK/servicefabric/models/registry_credential_py3.py deleted file mode 100644 index babd043e..00000000 --- a/customSDK/servicefabric/models/registry_credential_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistryCredential(Model): - """Credential information to connect to container registry. - - :param registry_user_name: The user name to connect to container registry. - :type registry_user_name: str - :param registry_password: The password for supplied username to connect to - container registry. - :type registry_password: str - :param password_encrypted: Indicates that supplied container registry - password is encrypted. - :type password_encrypted: bool - """ - - _attribute_map = { - 'registry_user_name': {'key': 'RegistryUserName', 'type': 'str'}, - 'registry_password': {'key': 'RegistryPassword', 'type': 'str'}, - 'password_encrypted': {'key': 'PasswordEncrypted', 'type': 'bool'}, - } - - def __init__(self, *, registry_user_name: str=None, registry_password: str=None, password_encrypted: bool=None, **kwargs) -> None: - super(RegistryCredential, self).__init__(**kwargs) - self.registry_user_name = registry_user_name - self.registry_password = registry_password - self.password_encrypted = password_encrypted diff --git a/customSDK/servicefabric/models/reliable_collections_ref.py b/customSDK/servicefabric/models/reliable_collections_ref.py deleted file mode 100644 index 0bdbaa85..00000000 --- a/customSDK/servicefabric/models/reliable_collections_ref.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReliableCollectionsRef(Model): - """Specifying this parameter adds support for reliable collections. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of ReliableCollection resource. Right now it's - not used and you can use any string. - :type name: str - :param do_not_persist_state: False (the default) if ReliableCollections - state is persisted to disk as usual. True if you do not want to persist - state, in which case replication is still enabled and you can use - ReliableCollections as distributed cache. - :type do_not_persist_state: bool - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'do_not_persist_state': {'key': 'doNotPersistState', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ReliableCollectionsRef, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.do_not_persist_state = kwargs.get('do_not_persist_state', None) diff --git a/customSDK/servicefabric/models/reliable_collections_ref_py3.py b/customSDK/servicefabric/models/reliable_collections_ref_py3.py deleted file mode 100644 index c517f34c..00000000 --- a/customSDK/servicefabric/models/reliable_collections_ref_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReliableCollectionsRef(Model): - """Specifying this parameter adds support for reliable collections. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of ReliableCollection resource. Right now it's - not used and you can use any string. - :type name: str - :param do_not_persist_state: False (the default) if ReliableCollections - state is persisted to disk as usual. True if you do not want to persist - state, in which case replication is still enabled and you can use - ReliableCollections as distributed cache. - :type do_not_persist_state: bool - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'do_not_persist_state': {'key': 'doNotPersistState', 'type': 'bool'}, - } - - def __init__(self, *, name: str, do_not_persist_state: bool=None, **kwargs) -> None: - super(ReliableCollectionsRef, self).__init__(**kwargs) - self.name = name - self.do_not_persist_state = do_not_persist_state diff --git a/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail.py b/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail.py deleted file mode 100644 index 31954743..00000000 --- a/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RemoteReplicatorAcknowledgementDetail(Model): - """Provides various statistics of the acknowledgements that are being received - from the remote replicator. - - :param average_receive_duration: Represents the average duration it takes - for the remote replicator to receive an operation. - :type average_receive_duration: str - :param average_apply_duration: Represents the average duration it takes - for the remote replicator to apply an operation. This usually entails - writing the operation to disk. - :type average_apply_duration: str - :param not_received_count: Represents the number of operations not yet - received by a remote replicator. - :type not_received_count: str - :param received_and_not_applied_count: Represents the number of operations - received and not yet applied by a remote replicator. - :type received_and_not_applied_count: str - """ - - _attribute_map = { - 'average_receive_duration': {'key': 'AverageReceiveDuration', 'type': 'str'}, - 'average_apply_duration': {'key': 'AverageApplyDuration', 'type': 'str'}, - 'not_received_count': {'key': 'NotReceivedCount', 'type': 'str'}, - 'received_and_not_applied_count': {'key': 'ReceivedAndNotAppliedCount', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RemoteReplicatorAcknowledgementDetail, self).__init__(**kwargs) - self.average_receive_duration = kwargs.get('average_receive_duration', None) - self.average_apply_duration = kwargs.get('average_apply_duration', None) - self.not_received_count = kwargs.get('not_received_count', None) - self.received_and_not_applied_count = kwargs.get('received_and_not_applied_count', None) diff --git a/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail_py3.py b/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail_py3.py deleted file mode 100644 index ade7b3c4..00000000 --- a/customSDK/servicefabric/models/remote_replicator_acknowledgement_detail_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RemoteReplicatorAcknowledgementDetail(Model): - """Provides various statistics of the acknowledgements that are being received - from the remote replicator. - - :param average_receive_duration: Represents the average duration it takes - for the remote replicator to receive an operation. - :type average_receive_duration: str - :param average_apply_duration: Represents the average duration it takes - for the remote replicator to apply an operation. This usually entails - writing the operation to disk. - :type average_apply_duration: str - :param not_received_count: Represents the number of operations not yet - received by a remote replicator. - :type not_received_count: str - :param received_and_not_applied_count: Represents the number of operations - received and not yet applied by a remote replicator. - :type received_and_not_applied_count: str - """ - - _attribute_map = { - 'average_receive_duration': {'key': 'AverageReceiveDuration', 'type': 'str'}, - 'average_apply_duration': {'key': 'AverageApplyDuration', 'type': 'str'}, - 'not_received_count': {'key': 'NotReceivedCount', 'type': 'str'}, - 'received_and_not_applied_count': {'key': 'ReceivedAndNotAppliedCount', 'type': 'str'}, - } - - def __init__(self, *, average_receive_duration: str=None, average_apply_duration: str=None, not_received_count: str=None, received_and_not_applied_count: str=None, **kwargs) -> None: - super(RemoteReplicatorAcknowledgementDetail, self).__init__(**kwargs) - self.average_receive_duration = average_receive_duration - self.average_apply_duration = average_apply_duration - self.not_received_count = not_received_count - self.received_and_not_applied_count = received_and_not_applied_count diff --git a/customSDK/servicefabric/models/remote_replicator_acknowledgement_status.py b/customSDK/servicefabric/models/remote_replicator_acknowledgement_status.py deleted file mode 100644 index 5b4f6e72..00000000 --- a/customSDK/servicefabric/models/remote_replicator_acknowledgement_status.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RemoteReplicatorAcknowledgementStatus(Model): - """Provides details about the remote replicators from the primary replicator's - point of view. - - :param replication_stream_acknowledgement_detail: Details about the - acknowledgements for operations that are part of the replication stream - data. - :type replication_stream_acknowledgement_detail: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail - :param copy_stream_acknowledgement_detail: Details about the - acknowledgements for operations that are part of the copy stream data. - :type copy_stream_acknowledgement_detail: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail - """ - - _attribute_map = { - 'replication_stream_acknowledgement_detail': {'key': 'ReplicationStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, - 'copy_stream_acknowledgement_detail': {'key': 'CopyStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, - } - - def __init__(self, **kwargs): - super(RemoteReplicatorAcknowledgementStatus, self).__init__(**kwargs) - self.replication_stream_acknowledgement_detail = kwargs.get('replication_stream_acknowledgement_detail', None) - self.copy_stream_acknowledgement_detail = kwargs.get('copy_stream_acknowledgement_detail', None) diff --git a/customSDK/servicefabric/models/remote_replicator_acknowledgement_status_py3.py b/customSDK/servicefabric/models/remote_replicator_acknowledgement_status_py3.py deleted file mode 100644 index 37428347..00000000 --- a/customSDK/servicefabric/models/remote_replicator_acknowledgement_status_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RemoteReplicatorAcknowledgementStatus(Model): - """Provides details about the remote replicators from the primary replicator's - point of view. - - :param replication_stream_acknowledgement_detail: Details about the - acknowledgements for operations that are part of the replication stream - data. - :type replication_stream_acknowledgement_detail: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail - :param copy_stream_acknowledgement_detail: Details about the - acknowledgements for operations that are part of the copy stream data. - :type copy_stream_acknowledgement_detail: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail - """ - - _attribute_map = { - 'replication_stream_acknowledgement_detail': {'key': 'ReplicationStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, - 'copy_stream_acknowledgement_detail': {'key': 'CopyStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, - } - - def __init__(self, *, replication_stream_acknowledgement_detail=None, copy_stream_acknowledgement_detail=None, **kwargs) -> None: - super(RemoteReplicatorAcknowledgementStatus, self).__init__(**kwargs) - self.replication_stream_acknowledgement_detail = replication_stream_acknowledgement_detail - self.copy_stream_acknowledgement_detail = copy_stream_acknowledgement_detail diff --git a/customSDK/servicefabric/models/remote_replicator_status.py b/customSDK/servicefabric/models/remote_replicator_status.py deleted file mode 100644 index 0258c842..00000000 --- a/customSDK/servicefabric/models/remote_replicator_status.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RemoteReplicatorStatus(Model): - """Represents the state of the secondary replicator from the primary - replicator’s point of view. - - :param replica_id: Represents the replica ID of the remote secondary - replicator. - :type replica_id: str - :param last_acknowledgement_processed_time_utc: The last timestamp (in - UTC) when an acknowledgement from the secondary replicator was processed - on the primary. - UTC 0 represents an invalid value, indicating that no acknowledgement - messages were ever processed. - :type last_acknowledgement_processed_time_utc: datetime - :param last_received_replication_sequence_number: The highest replication - operation sequence number that the secondary has received from the - primary. - :type last_received_replication_sequence_number: str - :param last_applied_replication_sequence_number: The highest replication - operation sequence number that the secondary has applied to its state. - :type last_applied_replication_sequence_number: str - :param is_in_build: A value that indicates whether the secondary replica - is in the process of being built. - :type is_in_build: bool - :param last_received_copy_sequence_number: The highest copy operation - sequence number that the secondary has received from the primary. - A value of -1 implies that the secondary has received all copy operations. - :type last_received_copy_sequence_number: str - :param last_applied_copy_sequence_number: The highest copy operation - sequence number that the secondary has applied to its state. - A value of -1 implies that the secondary has applied all copy operations - and the copy process is complete. - :type last_applied_copy_sequence_number: str - :param remote_replicator_acknowledgement_status: Represents the - acknowledgment status for the remote secondary replicator. - :type remote_replicator_acknowledgement_status: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementStatus - """ - - _attribute_map = { - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'last_acknowledgement_processed_time_utc': {'key': 'LastAcknowledgementProcessedTimeUtc', 'type': 'iso-8601'}, - 'last_received_replication_sequence_number': {'key': 'LastReceivedReplicationSequenceNumber', 'type': 'str'}, - 'last_applied_replication_sequence_number': {'key': 'LastAppliedReplicationSequenceNumber', 'type': 'str'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'last_received_copy_sequence_number': {'key': 'LastReceivedCopySequenceNumber', 'type': 'str'}, - 'last_applied_copy_sequence_number': {'key': 'LastAppliedCopySequenceNumber', 'type': 'str'}, - 'remote_replicator_acknowledgement_status': {'key': 'RemoteReplicatorAcknowledgementStatus', 'type': 'RemoteReplicatorAcknowledgementStatus'}, - } - - def __init__(self, **kwargs): - super(RemoteReplicatorStatus, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.last_acknowledgement_processed_time_utc = kwargs.get('last_acknowledgement_processed_time_utc', None) - self.last_received_replication_sequence_number = kwargs.get('last_received_replication_sequence_number', None) - self.last_applied_replication_sequence_number = kwargs.get('last_applied_replication_sequence_number', None) - self.is_in_build = kwargs.get('is_in_build', None) - self.last_received_copy_sequence_number = kwargs.get('last_received_copy_sequence_number', None) - self.last_applied_copy_sequence_number = kwargs.get('last_applied_copy_sequence_number', None) - self.remote_replicator_acknowledgement_status = kwargs.get('remote_replicator_acknowledgement_status', None) diff --git a/customSDK/servicefabric/models/remote_replicator_status_py3.py b/customSDK/servicefabric/models/remote_replicator_status_py3.py deleted file mode 100644 index 99c71f03..00000000 --- a/customSDK/servicefabric/models/remote_replicator_status_py3.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RemoteReplicatorStatus(Model): - """Represents the state of the secondary replicator from the primary - replicator’s point of view. - - :param replica_id: Represents the replica ID of the remote secondary - replicator. - :type replica_id: str - :param last_acknowledgement_processed_time_utc: The last timestamp (in - UTC) when an acknowledgement from the secondary replicator was processed - on the primary. - UTC 0 represents an invalid value, indicating that no acknowledgement - messages were ever processed. - :type last_acknowledgement_processed_time_utc: datetime - :param last_received_replication_sequence_number: The highest replication - operation sequence number that the secondary has received from the - primary. - :type last_received_replication_sequence_number: str - :param last_applied_replication_sequence_number: The highest replication - operation sequence number that the secondary has applied to its state. - :type last_applied_replication_sequence_number: str - :param is_in_build: A value that indicates whether the secondary replica - is in the process of being built. - :type is_in_build: bool - :param last_received_copy_sequence_number: The highest copy operation - sequence number that the secondary has received from the primary. - A value of -1 implies that the secondary has received all copy operations. - :type last_received_copy_sequence_number: str - :param last_applied_copy_sequence_number: The highest copy operation - sequence number that the secondary has applied to its state. - A value of -1 implies that the secondary has applied all copy operations - and the copy process is complete. - :type last_applied_copy_sequence_number: str - :param remote_replicator_acknowledgement_status: Represents the - acknowledgment status for the remote secondary replicator. - :type remote_replicator_acknowledgement_status: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementStatus - """ - - _attribute_map = { - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'last_acknowledgement_processed_time_utc': {'key': 'LastAcknowledgementProcessedTimeUtc', 'type': 'iso-8601'}, - 'last_received_replication_sequence_number': {'key': 'LastReceivedReplicationSequenceNumber', 'type': 'str'}, - 'last_applied_replication_sequence_number': {'key': 'LastAppliedReplicationSequenceNumber', 'type': 'str'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'last_received_copy_sequence_number': {'key': 'LastReceivedCopySequenceNumber', 'type': 'str'}, - 'last_applied_copy_sequence_number': {'key': 'LastAppliedCopySequenceNumber', 'type': 'str'}, - 'remote_replicator_acknowledgement_status': {'key': 'RemoteReplicatorAcknowledgementStatus', 'type': 'RemoteReplicatorAcknowledgementStatus'}, - } - - def __init__(self, *, replica_id: str=None, last_acknowledgement_processed_time_utc=None, last_received_replication_sequence_number: str=None, last_applied_replication_sequence_number: str=None, is_in_build: bool=None, last_received_copy_sequence_number: str=None, last_applied_copy_sequence_number: str=None, remote_replicator_acknowledgement_status=None, **kwargs) -> None: - super(RemoteReplicatorStatus, self).__init__(**kwargs) - self.replica_id = replica_id - self.last_acknowledgement_processed_time_utc = last_acknowledgement_processed_time_utc - self.last_received_replication_sequence_number = last_received_replication_sequence_number - self.last_applied_replication_sequence_number = last_applied_replication_sequence_number - self.is_in_build = is_in_build - self.last_received_copy_sequence_number = last_received_copy_sequence_number - self.last_applied_copy_sequence_number = last_applied_copy_sequence_number - self.remote_replicator_acknowledgement_status = remote_replicator_acknowledgement_status diff --git a/customSDK/servicefabric/models/repair_impact_description_base.py b/customSDK/servicefabric/models/repair_impact_description_base.py deleted file mode 100644 index 5e691e7a..00000000 --- a/customSDK/servicefabric/models/repair_impact_description_base.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairImpactDescriptionBase(Model): - """Describes the expected impact of executing a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NodeRepairImpactDescription - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Node': 'NodeRepairImpactDescription'} - } - - def __init__(self, **kwargs): - super(RepairImpactDescriptionBase, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/repair_impact_description_base_py3.py b/customSDK/servicefabric/models/repair_impact_description_base_py3.py deleted file mode 100644 index 3569e103..00000000 --- a/customSDK/servicefabric/models/repair_impact_description_base_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairImpactDescriptionBase(Model): - """Describes the expected impact of executing a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NodeRepairImpactDescription - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Node': 'NodeRepairImpactDescription'} - } - - def __init__(self, **kwargs) -> None: - super(RepairImpactDescriptionBase, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/repair_target_description_base.py b/customSDK/servicefabric/models/repair_target_description_base.py deleted file mode 100644 index 5bedd766..00000000 --- a/customSDK/servicefabric/models/repair_target_description_base.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairTargetDescriptionBase(Model): - """Describes the entities targeted by a repair action. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NodeRepairTargetDescription - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Node': 'NodeRepairTargetDescription'} - } - - def __init__(self, **kwargs): - super(RepairTargetDescriptionBase, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/repair_target_description_base_py3.py b/customSDK/servicefabric/models/repair_target_description_base_py3.py deleted file mode 100644 index d68058e5..00000000 --- a/customSDK/servicefabric/models/repair_target_description_base_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairTargetDescriptionBase(Model): - """Describes the entities targeted by a repair action. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NodeRepairTargetDescription - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Node': 'NodeRepairTargetDescription'} - } - - def __init__(self, **kwargs) -> None: - super(RepairTargetDescriptionBase, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/repair_task.py b/customSDK/servicefabric/models/repair_task.py deleted file mode 100644 index 068b3c31..00000000 --- a/customSDK/servicefabric/models/repair_task.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairTask(Model): - """Represents a repair task, which includes information about what kind of - repair was requested, what its progress is, and what its final result was. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the repair task. - :type task_id: str - :param version: The version of the repair task. - When creating a new repair task, the version must be set to zero. When - updating a repair task, - the version is used for optimistic concurrency checks. If the version is - set to zero, the update will not check for write conflicts. If the - version is set to a non-zero value, then the - update will only succeed if the actual current version of the repair task - matches this value. - :type version: str - :param description: A description of the purpose of the repair task, or - other informational details. - May be set when the repair task is created, and is immutable once set. - :type description: str - :param state: Required. The workflow state of the repair task. Valid - initial states are Created, Claimed, and Preparing. Possible values - include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', - 'Executing', 'Restoring', 'Completed' - :type state: str or ~azure.servicefabric.models.State - :param flags: A bitwise-OR of the following values, which gives additional - details about the status of the repair task. - - 1 - Cancellation of the repair has been requested - - 2 - Abort of the repair has been requested - - 4 - Approval of the repair was forced via client request - :type flags: int - :param action: Required. The requested repair action. Must be specified - when the repair task is created, and is immutable once set. - :type action: str - :param target: The target object determines what actions the system will - take to prepare for the impact of the repair, prior to approving execution - of the repair. - May be set when the repair task is created, and is immutable once set. - :type target: ~azure.servicefabric.models.RepairTargetDescriptionBase - :param executor: The name of the repair executor. Must be specified in - Claimed and later states, and is immutable once set. - :type executor: str - :param executor_data: A data string that the repair executor can use to - store its internal state. - :type executor_data: str - :param impact: The impact object determines what actions the system will - take to prepare for the impact of the repair, prior to approving execution - of the repair. - Impact must be specified by the repair executor when transitioning to the - Preparing state, and is immutable once set. - :type impact: ~azure.servicefabric.models.RepairImpactDescriptionBase - :param result_status: A value describing the overall result of the repair - task execution. Must be specified in the Restoring and later states, and - is immutable once set. Possible values include: 'Invalid', 'Succeeded', - 'Cancelled', 'Interrupted', 'Failed', 'Pending' - :type result_status: str or ~azure.servicefabric.models.ResultStatus - :param result_code: A numeric value providing additional details about the - result of the repair task execution. - May be specified in the Restoring and later states, and is immutable once - set. - :type result_code: int - :param result_details: A string providing additional details about the - result of the repair task execution. - May be specified in the Restoring and later states, and is immutable once - set. - :type result_details: str - :param history: An object that contains timestamps of the repair task's - state transitions. - These timestamps are updated by the system, and cannot be directly - modified. - :type history: ~azure.servicefabric.models.RepairTaskHistory - :param preparing_health_check_state: The workflow state of the health - check when the repair task is in the Preparing state. Possible values - include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' - :type preparing_health_check_state: str or - ~azure.servicefabric.models.RepairTaskHealthCheckState - :param restoring_health_check_state: The workflow state of the health - check when the repair task is in the Restoring state. Possible values - include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' - :type restoring_health_check_state: str or - ~azure.servicefabric.models.RepairTaskHealthCheckState - :param perform_preparing_health_check: A value to determine if health - checks will be performed when the repair task enters the Preparing state. - :type perform_preparing_health_check: bool - :param perform_restoring_health_check: A value to determine if health - checks will be performed when the repair task enters the Restoring state. - :type perform_restoring_health_check: bool - """ - - _validation = { - 'task_id': {'required': True}, - 'state': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'action': {'key': 'Action', 'type': 'str'}, - 'target': {'key': 'Target', 'type': 'RepairTargetDescriptionBase'}, - 'executor': {'key': 'Executor', 'type': 'str'}, - 'executor_data': {'key': 'ExecutorData', 'type': 'str'}, - 'impact': {'key': 'Impact', 'type': 'RepairImpactDescriptionBase'}, - 'result_status': {'key': 'ResultStatus', 'type': 'str'}, - 'result_code': {'key': 'ResultCode', 'type': 'int'}, - 'result_details': {'key': 'ResultDetails', 'type': 'str'}, - 'history': {'key': 'History', 'type': 'RepairTaskHistory'}, - 'preparing_health_check_state': {'key': 'PreparingHealthCheckState', 'type': 'str'}, - 'restoring_health_check_state': {'key': 'RestoringHealthCheckState', 'type': 'str'}, - 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, - 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RepairTask, self).__init__(**kwargs) - self.task_id = kwargs.get('task_id', None) - self.version = kwargs.get('version', None) - self.description = kwargs.get('description', None) - self.state = kwargs.get('state', None) - self.flags = kwargs.get('flags', None) - self.action = kwargs.get('action', None) - self.target = kwargs.get('target', None) - self.executor = kwargs.get('executor', None) - self.executor_data = kwargs.get('executor_data', None) - self.impact = kwargs.get('impact', None) - self.result_status = kwargs.get('result_status', None) - self.result_code = kwargs.get('result_code', None) - self.result_details = kwargs.get('result_details', None) - self.history = kwargs.get('history', None) - self.preparing_health_check_state = kwargs.get('preparing_health_check_state', None) - self.restoring_health_check_state = kwargs.get('restoring_health_check_state', None) - self.perform_preparing_health_check = kwargs.get('perform_preparing_health_check', None) - self.perform_restoring_health_check = kwargs.get('perform_restoring_health_check', None) diff --git a/customSDK/servicefabric/models/repair_task_approve_description.py b/customSDK/servicefabric/models/repair_task_approve_description.py deleted file mode 100644 index 132dcbdb..00000000 --- a/customSDK/servicefabric/models/repair_task_approve_description.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairTaskApproveDescription(Model): - """Describes a request for forced approval of a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the repair task. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current version of the repair task. If zero, then no version check - is performed. - :type version: str - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RepairTaskApproveDescription, self).__init__(**kwargs) - self.task_id = kwargs.get('task_id', None) - self.version = kwargs.get('version', None) diff --git a/customSDK/servicefabric/models/repair_task_approve_description_py3.py b/customSDK/servicefabric/models/repair_task_approve_description_py3.py deleted file mode 100644 index 78c312a2..00000000 --- a/customSDK/servicefabric/models/repair_task_approve_description_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairTaskApproveDescription(Model): - """Describes a request for forced approval of a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the repair task. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current version of the repair task. If zero, then no version check - is performed. - :type version: str - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, *, task_id: str, version: str=None, **kwargs) -> None: - super(RepairTaskApproveDescription, self).__init__(**kwargs) - self.task_id = task_id - self.version = version diff --git a/customSDK/servicefabric/models/repair_task_cancel_description.py b/customSDK/servicefabric/models/repair_task_cancel_description.py deleted file mode 100644 index 63767fb7..00000000 --- a/customSDK/servicefabric/models/repair_task_cancel_description.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairTaskCancelDescription(Model): - """Describes a request to cancel a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the repair task. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current version of the repair task. If zero, then no version check - is performed. - :type version: str - :param request_abort: _True_ if the repair should be stopped as soon as - possible even if it has already started executing. _False_ if the repair - should be cancelled only if execution has not yet started. - :type request_abort: bool - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'request_abort': {'key': 'RequestAbort', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RepairTaskCancelDescription, self).__init__(**kwargs) - self.task_id = kwargs.get('task_id', None) - self.version = kwargs.get('version', None) - self.request_abort = kwargs.get('request_abort', None) diff --git a/customSDK/servicefabric/models/repair_task_cancel_description_py3.py b/customSDK/servicefabric/models/repair_task_cancel_description_py3.py deleted file mode 100644 index d4dcde47..00000000 --- a/customSDK/servicefabric/models/repair_task_cancel_description_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairTaskCancelDescription(Model): - """Describes a request to cancel a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the repair task. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current version of the repair task. If zero, then no version check - is performed. - :type version: str - :param request_abort: _True_ if the repair should be stopped as soon as - possible even if it has already started executing. _False_ if the repair - should be cancelled only if execution has not yet started. - :type request_abort: bool - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'request_abort': {'key': 'RequestAbort', 'type': 'bool'}, - } - - def __init__(self, *, task_id: str, version: str=None, request_abort: bool=None, **kwargs) -> None: - super(RepairTaskCancelDescription, self).__init__(**kwargs) - self.task_id = task_id - self.version = version - self.request_abort = request_abort diff --git a/customSDK/servicefabric/models/repair_task_delete_description.py b/customSDK/servicefabric/models/repair_task_delete_description.py deleted file mode 100644 index 910f4fe2..00000000 --- a/customSDK/servicefabric/models/repair_task_delete_description.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairTaskDeleteDescription(Model): - """Describes a request to delete a completed repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the completed repair task to be - deleted. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current version of the repair task. If zero, then no version check - is performed. - :type version: str - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RepairTaskDeleteDescription, self).__init__(**kwargs) - self.task_id = kwargs.get('task_id', None) - self.version = kwargs.get('version', None) diff --git a/customSDK/servicefabric/models/repair_task_delete_description_py3.py b/customSDK/servicefabric/models/repair_task_delete_description_py3.py deleted file mode 100644 index 60ca772d..00000000 --- a/customSDK/servicefabric/models/repair_task_delete_description_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairTaskDeleteDescription(Model): - """Describes a request to delete a completed repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the completed repair task to be - deleted. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current version of the repair task. If zero, then no version check - is performed. - :type version: str - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, *, task_id: str, version: str=None, **kwargs) -> None: - super(RepairTaskDeleteDescription, self).__init__(**kwargs) - self.task_id = task_id - self.version = version diff --git a/customSDK/servicefabric/models/repair_task_history.py b/customSDK/servicefabric/models/repair_task_history.py deleted file mode 100644 index 476516dd..00000000 --- a/customSDK/servicefabric/models/repair_task_history.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairTaskHistory(Model): - """A record of the times when the repair task entered each state. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - :param created_utc_timestamp: The time when the repair task entered the - Created state. - :type created_utc_timestamp: datetime - :param claimed_utc_timestamp: The time when the repair task entered the - Claimed state. - :type claimed_utc_timestamp: datetime - :param preparing_utc_timestamp: The time when the repair task entered the - Preparing state. - :type preparing_utc_timestamp: datetime - :param approved_utc_timestamp: The time when the repair task entered the - Approved state - :type approved_utc_timestamp: datetime - :param executing_utc_timestamp: The time when the repair task entered the - Executing state - :type executing_utc_timestamp: datetime - :param restoring_utc_timestamp: The time when the repair task entered the - Restoring state - :type restoring_utc_timestamp: datetime - :param completed_utc_timestamp: The time when the repair task entered the - Completed state - :type completed_utc_timestamp: datetime - :param preparing_health_check_start_utc_timestamp: The time when the - repair task started the health check in the Preparing state. - :type preparing_health_check_start_utc_timestamp: datetime - :param preparing_health_check_end_utc_timestamp: The time when the repair - task completed the health check in the Preparing state. - :type preparing_health_check_end_utc_timestamp: datetime - :param restoring_health_check_start_utc_timestamp: The time when the - repair task started the health check in the Restoring state. - :type restoring_health_check_start_utc_timestamp: datetime - :param restoring_health_check_end_utc_timestamp: The time when the repair - task completed the health check in the Restoring state. - :type restoring_health_check_end_utc_timestamp: datetime - """ - - _attribute_map = { - 'created_utc_timestamp': {'key': 'CreatedUtcTimestamp', 'type': 'iso-8601'}, - 'claimed_utc_timestamp': {'key': 'ClaimedUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_utc_timestamp': {'key': 'PreparingUtcTimestamp', 'type': 'iso-8601'}, - 'approved_utc_timestamp': {'key': 'ApprovedUtcTimestamp', 'type': 'iso-8601'}, - 'executing_utc_timestamp': {'key': 'ExecutingUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_utc_timestamp': {'key': 'RestoringUtcTimestamp', 'type': 'iso-8601'}, - 'completed_utc_timestamp': {'key': 'CompletedUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_health_check_start_utc_timestamp': {'key': 'PreparingHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_health_check_end_utc_timestamp': {'key': 'PreparingHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_health_check_start_utc_timestamp': {'key': 'RestoringHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_health_check_end_utc_timestamp': {'key': 'RestoringHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RepairTaskHistory, self).__init__(**kwargs) - self.created_utc_timestamp = kwargs.get('created_utc_timestamp', None) - self.claimed_utc_timestamp = kwargs.get('claimed_utc_timestamp', None) - self.preparing_utc_timestamp = kwargs.get('preparing_utc_timestamp', None) - self.approved_utc_timestamp = kwargs.get('approved_utc_timestamp', None) - self.executing_utc_timestamp = kwargs.get('executing_utc_timestamp', None) - self.restoring_utc_timestamp = kwargs.get('restoring_utc_timestamp', None) - self.completed_utc_timestamp = kwargs.get('completed_utc_timestamp', None) - self.preparing_health_check_start_utc_timestamp = kwargs.get('preparing_health_check_start_utc_timestamp', None) - self.preparing_health_check_end_utc_timestamp = kwargs.get('preparing_health_check_end_utc_timestamp', None) - self.restoring_health_check_start_utc_timestamp = kwargs.get('restoring_health_check_start_utc_timestamp', None) - self.restoring_health_check_end_utc_timestamp = kwargs.get('restoring_health_check_end_utc_timestamp', None) diff --git a/customSDK/servicefabric/models/repair_task_history_py3.py b/customSDK/servicefabric/models/repair_task_history_py3.py deleted file mode 100644 index 923526b0..00000000 --- a/customSDK/servicefabric/models/repair_task_history_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairTaskHistory(Model): - """A record of the times when the repair task entered each state. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - :param created_utc_timestamp: The time when the repair task entered the - Created state. - :type created_utc_timestamp: datetime - :param claimed_utc_timestamp: The time when the repair task entered the - Claimed state. - :type claimed_utc_timestamp: datetime - :param preparing_utc_timestamp: The time when the repair task entered the - Preparing state. - :type preparing_utc_timestamp: datetime - :param approved_utc_timestamp: The time when the repair task entered the - Approved state - :type approved_utc_timestamp: datetime - :param executing_utc_timestamp: The time when the repair task entered the - Executing state - :type executing_utc_timestamp: datetime - :param restoring_utc_timestamp: The time when the repair task entered the - Restoring state - :type restoring_utc_timestamp: datetime - :param completed_utc_timestamp: The time when the repair task entered the - Completed state - :type completed_utc_timestamp: datetime - :param preparing_health_check_start_utc_timestamp: The time when the - repair task started the health check in the Preparing state. - :type preparing_health_check_start_utc_timestamp: datetime - :param preparing_health_check_end_utc_timestamp: The time when the repair - task completed the health check in the Preparing state. - :type preparing_health_check_end_utc_timestamp: datetime - :param restoring_health_check_start_utc_timestamp: The time when the - repair task started the health check in the Restoring state. - :type restoring_health_check_start_utc_timestamp: datetime - :param restoring_health_check_end_utc_timestamp: The time when the repair - task completed the health check in the Restoring state. - :type restoring_health_check_end_utc_timestamp: datetime - """ - - _attribute_map = { - 'created_utc_timestamp': {'key': 'CreatedUtcTimestamp', 'type': 'iso-8601'}, - 'claimed_utc_timestamp': {'key': 'ClaimedUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_utc_timestamp': {'key': 'PreparingUtcTimestamp', 'type': 'iso-8601'}, - 'approved_utc_timestamp': {'key': 'ApprovedUtcTimestamp', 'type': 'iso-8601'}, - 'executing_utc_timestamp': {'key': 'ExecutingUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_utc_timestamp': {'key': 'RestoringUtcTimestamp', 'type': 'iso-8601'}, - 'completed_utc_timestamp': {'key': 'CompletedUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_health_check_start_utc_timestamp': {'key': 'PreparingHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_health_check_end_utc_timestamp': {'key': 'PreparingHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_health_check_start_utc_timestamp': {'key': 'RestoringHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_health_check_end_utc_timestamp': {'key': 'RestoringHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, created_utc_timestamp=None, claimed_utc_timestamp=None, preparing_utc_timestamp=None, approved_utc_timestamp=None, executing_utc_timestamp=None, restoring_utc_timestamp=None, completed_utc_timestamp=None, preparing_health_check_start_utc_timestamp=None, preparing_health_check_end_utc_timestamp=None, restoring_health_check_start_utc_timestamp=None, restoring_health_check_end_utc_timestamp=None, **kwargs) -> None: - super(RepairTaskHistory, self).__init__(**kwargs) - self.created_utc_timestamp = created_utc_timestamp - self.claimed_utc_timestamp = claimed_utc_timestamp - self.preparing_utc_timestamp = preparing_utc_timestamp - self.approved_utc_timestamp = approved_utc_timestamp - self.executing_utc_timestamp = executing_utc_timestamp - self.restoring_utc_timestamp = restoring_utc_timestamp - self.completed_utc_timestamp = completed_utc_timestamp - self.preparing_health_check_start_utc_timestamp = preparing_health_check_start_utc_timestamp - self.preparing_health_check_end_utc_timestamp = preparing_health_check_end_utc_timestamp - self.restoring_health_check_start_utc_timestamp = restoring_health_check_start_utc_timestamp - self.restoring_health_check_end_utc_timestamp = restoring_health_check_end_utc_timestamp diff --git a/customSDK/servicefabric/models/repair_task_py3.py b/customSDK/servicefabric/models/repair_task_py3.py deleted file mode 100644 index fbcc3c5f..00000000 --- a/customSDK/servicefabric/models/repair_task_py3.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairTask(Model): - """Represents a repair task, which includes information about what kind of - repair was requested, what its progress is, and what its final result was. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the repair task. - :type task_id: str - :param version: The version of the repair task. - When creating a new repair task, the version must be set to zero. When - updating a repair task, - the version is used for optimistic concurrency checks. If the version is - set to zero, the update will not check for write conflicts. If the - version is set to a non-zero value, then the - update will only succeed if the actual current version of the repair task - matches this value. - :type version: str - :param description: A description of the purpose of the repair task, or - other informational details. - May be set when the repair task is created, and is immutable once set. - :type description: str - :param state: Required. The workflow state of the repair task. Valid - initial states are Created, Claimed, and Preparing. Possible values - include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', - 'Executing', 'Restoring', 'Completed' - :type state: str or ~azure.servicefabric.models.State - :param flags: A bitwise-OR of the following values, which gives additional - details about the status of the repair task. - - 1 - Cancellation of the repair has been requested - - 2 - Abort of the repair has been requested - - 4 - Approval of the repair was forced via client request - :type flags: int - :param action: Required. The requested repair action. Must be specified - when the repair task is created, and is immutable once set. - :type action: str - :param target: The target object determines what actions the system will - take to prepare for the impact of the repair, prior to approving execution - of the repair. - May be set when the repair task is created, and is immutable once set. - :type target: ~azure.servicefabric.models.RepairTargetDescriptionBase - :param executor: The name of the repair executor. Must be specified in - Claimed and later states, and is immutable once set. - :type executor: str - :param executor_data: A data string that the repair executor can use to - store its internal state. - :type executor_data: str - :param impact: The impact object determines what actions the system will - take to prepare for the impact of the repair, prior to approving execution - of the repair. - Impact must be specified by the repair executor when transitioning to the - Preparing state, and is immutable once set. - :type impact: ~azure.servicefabric.models.RepairImpactDescriptionBase - :param result_status: A value describing the overall result of the repair - task execution. Must be specified in the Restoring and later states, and - is immutable once set. Possible values include: 'Invalid', 'Succeeded', - 'Cancelled', 'Interrupted', 'Failed', 'Pending' - :type result_status: str or ~azure.servicefabric.models.ResultStatus - :param result_code: A numeric value providing additional details about the - result of the repair task execution. - May be specified in the Restoring and later states, and is immutable once - set. - :type result_code: int - :param result_details: A string providing additional details about the - result of the repair task execution. - May be specified in the Restoring and later states, and is immutable once - set. - :type result_details: str - :param history: An object that contains timestamps of the repair task's - state transitions. - These timestamps are updated by the system, and cannot be directly - modified. - :type history: ~azure.servicefabric.models.RepairTaskHistory - :param preparing_health_check_state: The workflow state of the health - check when the repair task is in the Preparing state. Possible values - include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' - :type preparing_health_check_state: str or - ~azure.servicefabric.models.RepairTaskHealthCheckState - :param restoring_health_check_state: The workflow state of the health - check when the repair task is in the Restoring state. Possible values - include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' - :type restoring_health_check_state: str or - ~azure.servicefabric.models.RepairTaskHealthCheckState - :param perform_preparing_health_check: A value to determine if health - checks will be performed when the repair task enters the Preparing state. - :type perform_preparing_health_check: bool - :param perform_restoring_health_check: A value to determine if health - checks will be performed when the repair task enters the Restoring state. - :type perform_restoring_health_check: bool - """ - - _validation = { - 'task_id': {'required': True}, - 'state': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'action': {'key': 'Action', 'type': 'str'}, - 'target': {'key': 'Target', 'type': 'RepairTargetDescriptionBase'}, - 'executor': {'key': 'Executor', 'type': 'str'}, - 'executor_data': {'key': 'ExecutorData', 'type': 'str'}, - 'impact': {'key': 'Impact', 'type': 'RepairImpactDescriptionBase'}, - 'result_status': {'key': 'ResultStatus', 'type': 'str'}, - 'result_code': {'key': 'ResultCode', 'type': 'int'}, - 'result_details': {'key': 'ResultDetails', 'type': 'str'}, - 'history': {'key': 'History', 'type': 'RepairTaskHistory'}, - 'preparing_health_check_state': {'key': 'PreparingHealthCheckState', 'type': 'str'}, - 'restoring_health_check_state': {'key': 'RestoringHealthCheckState', 'type': 'str'}, - 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, - 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, - } - - def __init__(self, *, task_id: str, state, action: str, version: str=None, description: str=None, flags: int=None, target=None, executor: str=None, executor_data: str=None, impact=None, result_status=None, result_code: int=None, result_details: str=None, history=None, preparing_health_check_state=None, restoring_health_check_state=None, perform_preparing_health_check: bool=None, perform_restoring_health_check: bool=None, **kwargs) -> None: - super(RepairTask, self).__init__(**kwargs) - self.task_id = task_id - self.version = version - self.description = description - self.state = state - self.flags = flags - self.action = action - self.target = target - self.executor = executor - self.executor_data = executor_data - self.impact = impact - self.result_status = result_status - self.result_code = result_code - self.result_details = result_details - self.history = history - self.preparing_health_check_state = preparing_health_check_state - self.restoring_health_check_state = restoring_health_check_state - self.perform_preparing_health_check = perform_preparing_health_check - self.perform_restoring_health_check = perform_restoring_health_check diff --git a/customSDK/servicefabric/models/repair_task_update_health_policy_description.py b/customSDK/servicefabric/models/repair_task_update_health_policy_description.py deleted file mode 100644 index 61916023..00000000 --- a/customSDK/servicefabric/models/repair_task_update_health_policy_description.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairTaskUpdateHealthPolicyDescription(Model): - """Describes a request to update the health policy of a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the repair task to be updated. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current value of the repair task. If zero, then no version check is - performed. - :type version: str - :param perform_preparing_health_check: A boolean indicating if health - check is to be performed in the Preparing stage of the repair task. If not - specified the existing value should not be altered. Otherwise, specify the - desired new value. - :type perform_preparing_health_check: bool - :param perform_restoring_health_check: A boolean indicating if health - check is to be performed in the Restoring stage of the repair task. If not - specified the existing value should not be altered. Otherwise, specify the - desired new value. - :type perform_restoring_health_check: bool - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, - 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RepairTaskUpdateHealthPolicyDescription, self).__init__(**kwargs) - self.task_id = kwargs.get('task_id', None) - self.version = kwargs.get('version', None) - self.perform_preparing_health_check = kwargs.get('perform_preparing_health_check', None) - self.perform_restoring_health_check = kwargs.get('perform_restoring_health_check', None) diff --git a/customSDK/servicefabric/models/repair_task_update_health_policy_description_py3.py b/customSDK/servicefabric/models/repair_task_update_health_policy_description_py3.py deleted file mode 100644 index 58615aad..00000000 --- a/customSDK/servicefabric/models/repair_task_update_health_policy_description_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairTaskUpdateHealthPolicyDescription(Model): - """Describes a request to update the health policy of a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param task_id: Required. The ID of the repair task to be updated. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current value of the repair task. If zero, then no version check is - performed. - :type version: str - :param perform_preparing_health_check: A boolean indicating if health - check is to be performed in the Preparing stage of the repair task. If not - specified the existing value should not be altered. Otherwise, specify the - desired new value. - :type perform_preparing_health_check: bool - :param perform_restoring_health_check: A boolean indicating if health - check is to be performed in the Restoring stage of the repair task. If not - specified the existing value should not be altered. Otherwise, specify the - desired new value. - :type perform_restoring_health_check: bool - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, - 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, - } - - def __init__(self, *, task_id: str, version: str=None, perform_preparing_health_check: bool=None, perform_restoring_health_check: bool=None, **kwargs) -> None: - super(RepairTaskUpdateHealthPolicyDescription, self).__init__(**kwargs) - self.task_id = task_id - self.version = version - self.perform_preparing_health_check = perform_preparing_health_check - self.perform_restoring_health_check = perform_restoring_health_check diff --git a/customSDK/servicefabric/models/repair_task_update_info.py b/customSDK/servicefabric/models/repair_task_update_info.py deleted file mode 100644 index e034e7c3..00000000 --- a/customSDK/servicefabric/models/repair_task_update_info.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairTaskUpdateInfo(Model): - """Describes the result of an operation that created or updated a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param version: Required. The new version of the repair task. - :type version: str - """ - - _validation = { - 'version': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RepairTaskUpdateInfo, self).__init__(**kwargs) - self.version = kwargs.get('version', None) diff --git a/customSDK/servicefabric/models/repair_task_update_info_py3.py b/customSDK/servicefabric/models/repair_task_update_info_py3.py deleted file mode 100644 index 6d3897b6..00000000 --- a/customSDK/servicefabric/models/repair_task_update_info_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RepairTaskUpdateInfo(Model): - """Describes the result of an operation that created or updated a repair task. - This type supports the Service Fabric platform; it is not meant to be used - directly from your code. - - All required parameters must be populated in order to send to Azure. - - :param version: Required. The new version of the repair task. - :type version: str - """ - - _validation = { - 'version': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, *, version: str, **kwargs) -> None: - super(RepairTaskUpdateInfo, self).__init__(**kwargs) - self.version = version diff --git a/customSDK/servicefabric/models/replica_event.py b/customSDK/servicefabric/models/replica_event.py deleted file mode 100644 index 62dbd958..00000000 --- a/customSDK/servicefabric/models/replica_event.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .fabric_event import FabricEvent - - -class ReplicaEvent(FabricEvent): - """Represents the base for all Replica Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulReplicaNewHealthReportEvent, - StatefulReplicaHealthReportExpiredEvent, - StatelessReplicaNewHealthReportEvent, - StatelessReplicaHealthReportExpiredEvent, - ChaosReplicaRemovalScheduledEvent, ChaosReplicaRestartScheduledEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - } - - _subtype_map = { - 'kind': {'StatefulReplicaNewHealthReport': 'StatefulReplicaNewHealthReportEvent', 'StatefulReplicaHealthReportExpired': 'StatefulReplicaHealthReportExpiredEvent', 'StatelessReplicaNewHealthReport': 'StatelessReplicaNewHealthReportEvent', 'StatelessReplicaHealthReportExpired': 'StatelessReplicaHealthReportExpiredEvent', 'ChaosReplicaRemovalScheduled': 'ChaosReplicaRemovalScheduledEvent', 'ChaosReplicaRestartScheduled': 'ChaosReplicaRestartScheduledEvent'} - } - - def __init__(self, **kwargs): - super(ReplicaEvent, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.replica_id = kwargs.get('replica_id', None) - self.kind = 'ReplicaEvent' diff --git a/customSDK/servicefabric/models/replica_event_py3.py b/customSDK/servicefabric/models/replica_event_py3.py deleted file mode 100644 index e9f53425..00000000 --- a/customSDK/servicefabric/models/replica_event_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .fabric_event_py3 import FabricEvent - - -class ReplicaEvent(FabricEvent): - """Represents the base for all Replica Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulReplicaNewHealthReportEvent, - StatefulReplicaHealthReportExpiredEvent, - StatelessReplicaNewHealthReportEvent, - StatelessReplicaHealthReportExpiredEvent, - ChaosReplicaRemovalScheduledEvent, ChaosReplicaRestartScheduledEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - } - - _subtype_map = { - 'kind': {'StatefulReplicaNewHealthReport': 'StatefulReplicaNewHealthReportEvent', 'StatefulReplicaHealthReportExpired': 'StatefulReplicaHealthReportExpiredEvent', 'StatelessReplicaNewHealthReport': 'StatelessReplicaNewHealthReportEvent', 'StatelessReplicaHealthReportExpired': 'StatelessReplicaHealthReportExpiredEvent', 'ChaosReplicaRemovalScheduled': 'ChaosReplicaRemovalScheduledEvent', 'ChaosReplicaRestartScheduled': 'ChaosReplicaRestartScheduledEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ReplicaEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.partition_id = partition_id - self.replica_id = replica_id - self.kind = 'ReplicaEvent' diff --git a/customSDK/servicefabric/models/replica_health.py b/customSDK/servicefabric/models/replica_health.py deleted file mode 100644 index 55551909..00000000 --- a/customSDK/servicefabric/models/replica_health.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health import EntityHealth - - -class ReplicaHealth(EntityHealth): - """Represents a base class for stateful service replica or stateless service - instance health. - Contains the replica aggregated health state, the health events and the - unhealthy evaluations. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaHealth, - StatelessServiceInstanceHealth - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param partition_id: Id of the partition to which this replica belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaHealth', 'Stateless': 'StatelessServiceInstanceHealth'} - } - - def __init__(self, **kwargs): - super(ReplicaHealth, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.service_kind = None - self.service_kind = 'ReplicaHealth' diff --git a/customSDK/servicefabric/models/replica_health_evaluation.py b/customSDK/servicefabric/models/replica_health_evaluation.py deleted file mode 100644 index 6799d1a2..00000000 --- a/customSDK/servicefabric/models/replica_health_evaluation.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class ReplicaHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a replica, containing information about - the data and the algorithm used by health store to evaluate health. The - evaluation is returned only when the aggregated health state is either - Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition to which the replica belongs. - :type partition_id: str - :param replica_or_instance_id: Id of a stateful service replica or a - stateless service instance. This ID is used in the queries that apply to - both stateful and stateless services. It is used by Service Fabric to - uniquely identify a replica of a partition of a stateful service or an - instance of a stateless service partition. It is unique within a partition - and does not change for the lifetime of the replica or the instance. If a - stateful replica gets dropped and another replica gets created on the same - node for the same partition, it will get a different value for the ID. If - a stateless instance is failed over on the same or different node it will - get a different value for the ID. - :type replica_or_instance_id: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the replica. The types of the - unhealthy evaluations can be EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(ReplicaHealthEvaluation, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.replica_or_instance_id = kwargs.get('replica_or_instance_id', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Replica' diff --git a/customSDK/servicefabric/models/replica_health_evaluation_py3.py b/customSDK/servicefabric/models/replica_health_evaluation_py3.py deleted file mode 100644 index 3f8641af..00000000 --- a/customSDK/servicefabric/models/replica_health_evaluation_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class ReplicaHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a replica, containing information about - the data and the algorithm used by health store to evaluate health. The - evaluation is returned only when the aggregated health state is either - Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition to which the replica belongs. - :type partition_id: str - :param replica_or_instance_id: Id of a stateful service replica or a - stateless service instance. This ID is used in the queries that apply to - both stateful and stateless services. It is used by Service Fabric to - uniquely identify a replica of a partition of a stateful service or an - instance of a stateless service partition. It is unique within a partition - and does not change for the lifetime of the replica or the instance. If a - stateful replica gets dropped and another replica gets created on the same - node for the same partition, it will get a different value for the ID. If - a stateless instance is failed over on the same or different node it will - get a different value for the ID. - :type replica_or_instance_id: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the replica. The types of the - unhealthy evaluations can be EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, partition_id: str=None, replica_or_instance_id: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ReplicaHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.partition_id = partition_id - self.replica_or_instance_id = replica_or_instance_id - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Replica' diff --git a/customSDK/servicefabric/models/replica_health_py3.py b/customSDK/servicefabric/models/replica_health_py3.py deleted file mode 100644 index 1e67205a..00000000 --- a/customSDK/servicefabric/models/replica_health_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_py3 import EntityHealth - - -class ReplicaHealth(EntityHealth): - """Represents a base class for stateful service replica or stateless service - instance health. - Contains the replica aggregated health state, the health events and the - unhealthy evaluations. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaHealth, - StatelessServiceInstanceHealth - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param partition_id: Id of the partition to which this replica belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaHealth', 'Stateless': 'StatelessServiceInstanceHealth'} - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, **kwargs) -> None: - super(ReplicaHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.partition_id = partition_id - self.service_kind = None - self.service_kind = 'ReplicaHealth' diff --git a/customSDK/servicefabric/models/replica_health_state.py b/customSDK/servicefabric/models/replica_health_state.py deleted file mode 100644 index 6f21de27..00000000 --- a/customSDK/servicefabric/models/replica_health_state.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state import EntityHealthState - - -class ReplicaHealthState(EntityHealthState): - """Represents a base class for stateful service replica or stateless service - instance health state. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaHealthState, - StatelessServiceInstanceHealthState - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param partition_id: The ID of the partition to which this replica - belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaHealthState', 'Stateless': 'StatelessServiceInstanceHealthState'} - } - - def __init__(self, **kwargs): - super(ReplicaHealthState, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.service_kind = None - self.service_kind = 'ReplicaHealthState' diff --git a/customSDK/servicefabric/models/replica_health_state_chunk.py b/customSDK/servicefabric/models/replica_health_state_chunk.py deleted file mode 100644 index 8f3b8e9f..00000000 --- a/customSDK/servicefabric/models/replica_health_state_chunk.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk import EntityHealthStateChunk - - -class ReplicaHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a stateful service replica or a - stateless service instance. - The replica health state contains the replica ID and its aggregated health - state. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param replica_or_instance_id: Id of a stateful service replica or a - stateless service instance. This ID is used in the queries that apply to - both stateful and stateless services. It is used by Service Fabric to - uniquely identify a replica of a partition of a stateful service or an - instance of a stateless service partition. It is unique within a partition - and does not change for the lifetime of the replica or the instance. If a - stateful replica gets dropped and another replica gets created on the same - node for the same partition, it will get a different value for the ID. If - a stateless instance is failed over on the same or different node it will - get a different value for the ID. - :type replica_or_instance_id: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReplicaHealthStateChunk, self).__init__(**kwargs) - self.replica_or_instance_id = kwargs.get('replica_or_instance_id', None) diff --git a/customSDK/servicefabric/models/replica_health_state_chunk_list.py b/customSDK/servicefabric/models/replica_health_state_chunk_list.py deleted file mode 100644 index 6f8ba7e8..00000000 --- a/customSDK/servicefabric/models/replica_health_state_chunk_list.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicaHealthStateChunkList(Model): - """The list of replica health state chunks that respect the input filters in - the chunk query. Returned by get cluster health state chunks query. - - :param items: The list of replica health state chunks that respect the - input filters in the chunk query. - :type items: list[~azure.servicefabric.models.ReplicaHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[ReplicaHealthStateChunk]'}, - } - - def __init__(self, **kwargs): - super(ReplicaHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/replica_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/replica_health_state_chunk_list_py3.py deleted file mode 100644 index 90e84767..00000000 --- a/customSDK/servicefabric/models/replica_health_state_chunk_list_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicaHealthStateChunkList(Model): - """The list of replica health state chunks that respect the input filters in - the chunk query. Returned by get cluster health state chunks query. - - :param items: The list of replica health state chunks that respect the - input filters in the chunk query. - :type items: list[~azure.servicefabric.models.ReplicaHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[ReplicaHealthStateChunk]'}, - } - - def __init__(self, *, items=None, **kwargs) -> None: - super(ReplicaHealthStateChunkList, self).__init__(**kwargs) - self.items = items diff --git a/customSDK/servicefabric/models/replica_health_state_chunk_py3.py b/customSDK/servicefabric/models/replica_health_state_chunk_py3.py deleted file mode 100644 index 8a21181e..00000000 --- a/customSDK/servicefabric/models/replica_health_state_chunk_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk_py3 import EntityHealthStateChunk - - -class ReplicaHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a stateful service replica or a - stateless service instance. - The replica health state contains the replica ID and its aggregated health - state. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param replica_or_instance_id: Id of a stateful service replica or a - stateless service instance. This ID is used in the queries that apply to - both stateful and stateless services. It is used by Service Fabric to - uniquely identify a replica of a partition of a stateful service or an - instance of a stateless service partition. It is unique within a partition - and does not change for the lifetime of the replica or the instance. If a - stateful replica gets dropped and another replica gets created on the same - node for the same partition, it will get a different value for the ID. If - a stateless instance is failed over on the same or different node it will - get a different value for the ID. - :type replica_or_instance_id: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, - } - - def __init__(self, *, health_state=None, replica_or_instance_id: str=None, **kwargs) -> None: - super(ReplicaHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.replica_or_instance_id = replica_or_instance_id diff --git a/customSDK/servicefabric/models/replica_health_state_filter.py b/customSDK/servicefabric/models/replica_health_state_filter.py deleted file mode 100644 index c736e815..00000000 --- a/customSDK/servicefabric/models/replica_health_state_filter.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicaHealthStateFilter(Model): - """Defines matching criteria to determine whether a replica should be included - as a child of a partition in the cluster health chunk. - The replicas are only returned if the parent entities match a filter - specified in the cluster health chunk query description. The parent - partition, service and application must be included in the cluster health - chunk. - One filter can match zero, one or multiple replicas, depending on its - properties. - - :param replica_or_instance_id_filter: Id of the stateful service replica - or stateless service instance that matches the filter. The filter is - applied only to the specified replica, if it exists. - If the replica doesn't exist, no replica is returned in the cluster health - chunk based on this filter. - If the replica exists, it is included in the cluster health chunk if it - respects the other filter properties. - If not specified, all replicas that match the parent filters (if any) are - taken into consideration and matched against the other filter members, - like health state filter. - :type replica_or_instance_id_filter: str - :param health_state_filter: The filter for the health state of the - replicas. It allows selecting replicas if they match the desired health - states. - The possible values are integer value of one of the following health - states. Only replicas that match the filter are returned. All replicas are - used to evaluate the parent partition aggregated health state. - If not specified, default value is None, unless the replica ID is - specified. If the filter has default value and replica ID is specified, - the matching replica is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches replicas with - HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - """ - - _attribute_map = { - 'replica_or_instance_id_filter': {'key': 'ReplicaOrInstanceIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ReplicaHealthStateFilter, self).__init__(**kwargs) - self.replica_or_instance_id_filter = kwargs.get('replica_or_instance_id_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) diff --git a/customSDK/servicefabric/models/replica_health_state_filter_py3.py b/customSDK/servicefabric/models/replica_health_state_filter_py3.py deleted file mode 100644 index 29a29506..00000000 --- a/customSDK/servicefabric/models/replica_health_state_filter_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicaHealthStateFilter(Model): - """Defines matching criteria to determine whether a replica should be included - as a child of a partition in the cluster health chunk. - The replicas are only returned if the parent entities match a filter - specified in the cluster health chunk query description. The parent - partition, service and application must be included in the cluster health - chunk. - One filter can match zero, one or multiple replicas, depending on its - properties. - - :param replica_or_instance_id_filter: Id of the stateful service replica - or stateless service instance that matches the filter. The filter is - applied only to the specified replica, if it exists. - If the replica doesn't exist, no replica is returned in the cluster health - chunk based on this filter. - If the replica exists, it is included in the cluster health chunk if it - respects the other filter properties. - If not specified, all replicas that match the parent filters (if any) are - taken into consideration and matched against the other filter members, - like health state filter. - :type replica_or_instance_id_filter: str - :param health_state_filter: The filter for the health state of the - replicas. It allows selecting replicas if they match the desired health - states. - The possible values are integer value of one of the following health - states. Only replicas that match the filter are returned. All replicas are - used to evaluate the parent partition aggregated health state. - If not specified, default value is None, unless the replica ID is - specified. If the filter has default value and replica ID is specified, - the matching replica is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches replicas with - HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - """ - - _attribute_map = { - 'replica_or_instance_id_filter': {'key': 'ReplicaOrInstanceIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__(self, *, replica_or_instance_id_filter: str=None, health_state_filter: int=0, **kwargs) -> None: - super(ReplicaHealthStateFilter, self).__init__(**kwargs) - self.replica_or_instance_id_filter = replica_or_instance_id_filter - self.health_state_filter = health_state_filter diff --git a/customSDK/servicefabric/models/replica_health_state_py3.py b/customSDK/servicefabric/models/replica_health_state_py3.py deleted file mode 100644 index f9e5cadd..00000000 --- a/customSDK/servicefabric/models/replica_health_state_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_py3 import EntityHealthState - - -class ReplicaHealthState(EntityHealthState): - """Represents a base class for stateful service replica or stateless service - instance health state. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaHealthState, - StatelessServiceInstanceHealthState - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param partition_id: The ID of the partition to which this replica - belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaHealthState', 'Stateless': 'StatelessServiceInstanceHealthState'} - } - - def __init__(self, *, aggregated_health_state=None, partition_id: str=None, **kwargs) -> None: - super(ReplicaHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.partition_id = partition_id - self.service_kind = None - self.service_kind = 'ReplicaHealthState' diff --git a/customSDK/servicefabric/models/replica_info.py b/customSDK/servicefabric/models/replica_info.py deleted file mode 100644 index ac8fde73..00000000 --- a/customSDK/servicefabric/models/replica_info.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicaInfo(Model): - """Information about the identity, status, health, node name, uptime, and - other details about the replica. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaInfo, StatelessServiceInstanceInfo - - All required parameters must be populated in order to send to Azure. - - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param address: The address the replica is listening on. - :type address: str - :param last_in_build_duration_in_seconds: The last in build duration of - the replica in seconds. - :type last_in_build_duration_in_seconds: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaInfo', 'Stateless': 'StatelessServiceInstanceInfo'} - } - - def __init__(self, **kwargs): - super(ReplicaInfo, self).__init__(**kwargs) - self.replica_status = kwargs.get('replica_status', None) - self.health_state = kwargs.get('health_state', None) - self.node_name = kwargs.get('node_name', None) - self.address = kwargs.get('address', None) - self.last_in_build_duration_in_seconds = kwargs.get('last_in_build_duration_in_seconds', None) - self.service_kind = None diff --git a/customSDK/servicefabric/models/replica_info_py3.py b/customSDK/servicefabric/models/replica_info_py3.py deleted file mode 100644 index d27367c3..00000000 --- a/customSDK/servicefabric/models/replica_info_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicaInfo(Model): - """Information about the identity, status, health, node name, uptime, and - other details about the replica. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaInfo, StatelessServiceInstanceInfo - - All required parameters must be populated in order to send to Azure. - - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param address: The address the replica is listening on. - :type address: str - :param last_in_build_duration_in_seconds: The last in build duration of - the replica in seconds. - :type last_in_build_duration_in_seconds: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaInfo', 'Stateless': 'StatelessServiceInstanceInfo'} - } - - def __init__(self, *, replica_status=None, health_state=None, node_name: str=None, address: str=None, last_in_build_duration_in_seconds: str=None, **kwargs) -> None: - super(ReplicaInfo, self).__init__(**kwargs) - self.replica_status = replica_status - self.health_state = health_state - self.node_name = node_name - self.address = address - self.last_in_build_duration_in_seconds = last_in_build_duration_in_seconds - self.service_kind = None diff --git a/customSDK/servicefabric/models/replica_lifecycle_description.py b/customSDK/servicefabric/models/replica_lifecycle_description.py deleted file mode 100644 index e82aa2b9..00000000 --- a/customSDK/servicefabric/models/replica_lifecycle_description.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicaLifecycleDescription(Model): - """Describes how the replica will behave. - - :param is_singleton_replica_move_allowed_during_upgrade: If set to true, - replicas with a target replica set size of 1 will be permitted to move - during upgrade. - :type is_singleton_replica_move_allowed_during_upgrade: bool - :param restore_replica_location_after_upgrade: If set to true, move/swap - replica to original location after upgrade. - :type restore_replica_location_after_upgrade: bool - """ - - _attribute_map = { - 'is_singleton_replica_move_allowed_during_upgrade': {'key': 'IsSingletonReplicaMoveAllowedDuringUpgrade', 'type': 'bool'}, - 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ReplicaLifecycleDescription, self).__init__(**kwargs) - self.is_singleton_replica_move_allowed_during_upgrade = kwargs.get('is_singleton_replica_move_allowed_during_upgrade', None) - self.restore_replica_location_after_upgrade = kwargs.get('restore_replica_location_after_upgrade', None) diff --git a/customSDK/servicefabric/models/replica_lifecycle_description_py3.py b/customSDK/servicefabric/models/replica_lifecycle_description_py3.py deleted file mode 100644 index 9bec34e1..00000000 --- a/customSDK/servicefabric/models/replica_lifecycle_description_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicaLifecycleDescription(Model): - """Describes how the replica will behave. - - :param is_singleton_replica_move_allowed_during_upgrade: If set to true, - replicas with a target replica set size of 1 will be permitted to move - during upgrade. - :type is_singleton_replica_move_allowed_during_upgrade: bool - :param restore_replica_location_after_upgrade: If set to true, move/swap - replica to original location after upgrade. - :type restore_replica_location_after_upgrade: bool - """ - - _attribute_map = { - 'is_singleton_replica_move_allowed_during_upgrade': {'key': 'IsSingletonReplicaMoveAllowedDuringUpgrade', 'type': 'bool'}, - 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, - } - - def __init__(self, *, is_singleton_replica_move_allowed_during_upgrade: bool=None, restore_replica_location_after_upgrade: bool=None, **kwargs) -> None: - super(ReplicaLifecycleDescription, self).__init__(**kwargs) - self.is_singleton_replica_move_allowed_during_upgrade = is_singleton_replica_move_allowed_during_upgrade - self.restore_replica_location_after_upgrade = restore_replica_location_after_upgrade diff --git a/customSDK/servicefabric/models/replica_metric_load_description.py b/customSDK/servicefabric/models/replica_metric_load_description.py deleted file mode 100644 index 4497ccba..00000000 --- a/customSDK/servicefabric/models/replica_metric_load_description.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicaMetricLoadDescription(Model): - """Specifies metric loads of a partition's specific secondary replica or - instance. - - :param node_name: Node name of a specific secondary replica or instance. - :type node_name: str - :param replica_or_instance_load_entries: Loads of a different metrics for - a partition's secondary replica or instance. - :type replica_or_instance_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'replica_or_instance_load_entries': {'key': 'ReplicaOrInstanceLoadEntries', 'type': '[MetricLoadDescription]'}, - } - - def __init__(self, **kwargs): - super(ReplicaMetricLoadDescription, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.replica_or_instance_load_entries = kwargs.get('replica_or_instance_load_entries', None) diff --git a/customSDK/servicefabric/models/replica_metric_load_description_py3.py b/customSDK/servicefabric/models/replica_metric_load_description_py3.py deleted file mode 100644 index 8ac6133e..00000000 --- a/customSDK/servicefabric/models/replica_metric_load_description_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicaMetricLoadDescription(Model): - """Specifies metric loads of a partition's specific secondary replica or - instance. - - :param node_name: Node name of a specific secondary replica or instance. - :type node_name: str - :param replica_or_instance_load_entries: Loads of a different metrics for - a partition's secondary replica or instance. - :type replica_or_instance_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'replica_or_instance_load_entries': {'key': 'ReplicaOrInstanceLoadEntries', 'type': '[MetricLoadDescription]'}, - } - - def __init__(self, *, node_name: str=None, replica_or_instance_load_entries=None, **kwargs) -> None: - super(ReplicaMetricLoadDescription, self).__init__(**kwargs) - self.node_name = node_name - self.replica_or_instance_load_entries = replica_or_instance_load_entries diff --git a/customSDK/servicefabric/models/replica_status_base.py b/customSDK/servicefabric/models/replica_status_base.py deleted file mode 100644 index e95b5009..00000000 --- a/customSDK/servicefabric/models/replica_status_base.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicaStatusBase(Model): - """Information about the replica. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: KeyValueStoreReplicaStatus - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'KeyValueStore': 'KeyValueStoreReplicaStatus'} - } - - def __init__(self, **kwargs): - super(ReplicaStatusBase, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/replica_status_base_py3.py b/customSDK/servicefabric/models/replica_status_base_py3.py deleted file mode 100644 index f279cb3f..00000000 --- a/customSDK/servicefabric/models/replica_status_base_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicaStatusBase(Model): - """Information about the replica. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: KeyValueStoreReplicaStatus - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'KeyValueStore': 'KeyValueStoreReplicaStatus'} - } - - def __init__(self, **kwargs) -> None: - super(ReplicaStatusBase, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/replicas_health_evaluation.py b/customSDK/servicefabric/models/replicas_health_evaluation.py deleted file mode 100644 index 79871913..00000000 --- a/customSDK/servicefabric/models/replicas_health_evaluation.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class ReplicasHealthEvaluation(HealthEvaluation): - """Represents health evaluation for replicas, containing health evaluations - for each unhealthy replica that impacted current aggregated health state. - Can be returned when evaluating partition health and the aggregated health - state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_replicas_per_partition: Maximum allowed - percentage of unhealthy replicas per partition from the - ApplicationHealthPolicy. - :type max_percent_unhealthy_replicas_per_partition: int - :param total_count: Total number of replicas in the partition from the - health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - ReplicaHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(ReplicasHealthEvaluation, self).__init__(**kwargs) - self.max_percent_unhealthy_replicas_per_partition = kwargs.get('max_percent_unhealthy_replicas_per_partition', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Replicas' diff --git a/customSDK/servicefabric/models/replicas_health_evaluation_py3.py b/customSDK/servicefabric/models/replicas_health_evaluation_py3.py deleted file mode 100644 index 4cc1aa37..00000000 --- a/customSDK/servicefabric/models/replicas_health_evaluation_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class ReplicasHealthEvaluation(HealthEvaluation): - """Represents health evaluation for replicas, containing health evaluations - for each unhealthy replica that impacted current aggregated health state. - Can be returned when evaluating partition health and the aggregated health - state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param max_percent_unhealthy_replicas_per_partition: Maximum allowed - percentage of unhealthy replicas per partition from the - ApplicationHealthPolicy. - :type max_percent_unhealthy_replicas_per_partition: int - :param total_count: Total number of replicas in the partition from the - health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - ReplicaHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, max_percent_unhealthy_replicas_per_partition: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ReplicasHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.max_percent_unhealthy_replicas_per_partition = max_percent_unhealthy_replicas_per_partition - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Replicas' diff --git a/customSDK/servicefabric/models/replicator_queue_status.py b/customSDK/servicefabric/models/replicator_queue_status.py deleted file mode 100644 index 043c0670..00000000 --- a/customSDK/servicefabric/models/replicator_queue_status.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicatorQueueStatus(Model): - """Provides various statistics of the queue used in the service fabric - replicator. - Contains information about the service fabric replicator like the - replication/copy queue utilization, last acknowledgement received - timestamp, etc. - Depending on the role of the replicator, the properties in this type imply - different meanings. - - :param queue_utilization_percentage: Represents the utilization of the - queue. A value of 0 indicates that the queue is empty and a value of 100 - indicates the queue is full. - :type queue_utilization_percentage: int - :param queue_memory_size: Represents the virtual memory consumed by the - queue in bytes. - :type queue_memory_size: str - :param first_sequence_number: On a primary replicator, this is - semantically the sequence number of the operation for which all the - secondary replicas have sent an acknowledgement. - On a secondary replicator, this is the smallest sequence number of the - operation that is present in the queue. - :type first_sequence_number: str - :param completed_sequence_number: On a primary replicator, this is - semantically the highest sequence number of the operation for which all - the secondary replicas have sent an acknowledgement. - On a secondary replicator, this is semantically the highest sequence - number that has been applied to the persistent state. - :type completed_sequence_number: str - :param committed_sequence_number: On a primary replicator, this is - semantically the highest sequence number of the operation for which a - write quorum of the secondary replicas have sent an acknowledgement. - On a secondary replicator, this is semantically the highest sequence - number of the in-order operation received from the primary. - :type committed_sequence_number: str - :param last_sequence_number: Represents the latest sequence number of the - operation that is available in the queue. - :type last_sequence_number: str - """ - - _attribute_map = { - 'queue_utilization_percentage': {'key': 'QueueUtilizationPercentage', 'type': 'int'}, - 'queue_memory_size': {'key': 'QueueMemorySize', 'type': 'str'}, - 'first_sequence_number': {'key': 'FirstSequenceNumber', 'type': 'str'}, - 'completed_sequence_number': {'key': 'CompletedSequenceNumber', 'type': 'str'}, - 'committed_sequence_number': {'key': 'CommittedSequenceNumber', 'type': 'str'}, - 'last_sequence_number': {'key': 'LastSequenceNumber', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReplicatorQueueStatus, self).__init__(**kwargs) - self.queue_utilization_percentage = kwargs.get('queue_utilization_percentage', None) - self.queue_memory_size = kwargs.get('queue_memory_size', None) - self.first_sequence_number = kwargs.get('first_sequence_number', None) - self.completed_sequence_number = kwargs.get('completed_sequence_number', None) - self.committed_sequence_number = kwargs.get('committed_sequence_number', None) - self.last_sequence_number = kwargs.get('last_sequence_number', None) diff --git a/customSDK/servicefabric/models/replicator_queue_status_py3.py b/customSDK/servicefabric/models/replicator_queue_status_py3.py deleted file mode 100644 index 112316e9..00000000 --- a/customSDK/servicefabric/models/replicator_queue_status_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicatorQueueStatus(Model): - """Provides various statistics of the queue used in the service fabric - replicator. - Contains information about the service fabric replicator like the - replication/copy queue utilization, last acknowledgement received - timestamp, etc. - Depending on the role of the replicator, the properties in this type imply - different meanings. - - :param queue_utilization_percentage: Represents the utilization of the - queue. A value of 0 indicates that the queue is empty and a value of 100 - indicates the queue is full. - :type queue_utilization_percentage: int - :param queue_memory_size: Represents the virtual memory consumed by the - queue in bytes. - :type queue_memory_size: str - :param first_sequence_number: On a primary replicator, this is - semantically the sequence number of the operation for which all the - secondary replicas have sent an acknowledgement. - On a secondary replicator, this is the smallest sequence number of the - operation that is present in the queue. - :type first_sequence_number: str - :param completed_sequence_number: On a primary replicator, this is - semantically the highest sequence number of the operation for which all - the secondary replicas have sent an acknowledgement. - On a secondary replicator, this is semantically the highest sequence - number that has been applied to the persistent state. - :type completed_sequence_number: str - :param committed_sequence_number: On a primary replicator, this is - semantically the highest sequence number of the operation for which a - write quorum of the secondary replicas have sent an acknowledgement. - On a secondary replicator, this is semantically the highest sequence - number of the in-order operation received from the primary. - :type committed_sequence_number: str - :param last_sequence_number: Represents the latest sequence number of the - operation that is available in the queue. - :type last_sequence_number: str - """ - - _attribute_map = { - 'queue_utilization_percentage': {'key': 'QueueUtilizationPercentage', 'type': 'int'}, - 'queue_memory_size': {'key': 'QueueMemorySize', 'type': 'str'}, - 'first_sequence_number': {'key': 'FirstSequenceNumber', 'type': 'str'}, - 'completed_sequence_number': {'key': 'CompletedSequenceNumber', 'type': 'str'}, - 'committed_sequence_number': {'key': 'CommittedSequenceNumber', 'type': 'str'}, - 'last_sequence_number': {'key': 'LastSequenceNumber', 'type': 'str'}, - } - - def __init__(self, *, queue_utilization_percentage: int=None, queue_memory_size: str=None, first_sequence_number: str=None, completed_sequence_number: str=None, committed_sequence_number: str=None, last_sequence_number: str=None, **kwargs) -> None: - super(ReplicatorQueueStatus, self).__init__(**kwargs) - self.queue_utilization_percentage = queue_utilization_percentage - self.queue_memory_size = queue_memory_size - self.first_sequence_number = first_sequence_number - self.completed_sequence_number = completed_sequence_number - self.committed_sequence_number = committed_sequence_number - self.last_sequence_number = last_sequence_number diff --git a/customSDK/servicefabric/models/replicator_status.py b/customSDK/servicefabric/models/replicator_status.py deleted file mode 100644 index 7e1fb2a6..00000000 --- a/customSDK/servicefabric/models/replicator_status.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicatorStatus(Model): - """Represents a base class for primary or secondary replicator status. - Contains information about the service fabric replicator like the - replication/copy queue utilization, last acknowledgement received - timestamp, etc. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PrimaryReplicatorStatus, SecondaryReplicatorStatus - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Primary': 'PrimaryReplicatorStatus', 'SecondaryReplicatorStatus': 'SecondaryReplicatorStatus'} - } - - def __init__(self, **kwargs): - super(ReplicatorStatus, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/replicator_status_py3.py b/customSDK/servicefabric/models/replicator_status_py3.py deleted file mode 100644 index b11fc83d..00000000 --- a/customSDK/servicefabric/models/replicator_status_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReplicatorStatus(Model): - """Represents a base class for primary or secondary replicator status. - Contains information about the service fabric replicator like the - replication/copy queue utilization, last acknowledgement received - timestamp, etc. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PrimaryReplicatorStatus, SecondaryReplicatorStatus - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Primary': 'PrimaryReplicatorStatus', 'SecondaryReplicatorStatus': 'SecondaryReplicatorStatus'} - } - - def __init__(self, **kwargs) -> None: - super(ReplicatorStatus, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/resolved_service_endpoint.py b/customSDK/servicefabric/models/resolved_service_endpoint.py deleted file mode 100644 index 2a062502..00000000 --- a/customSDK/servicefabric/models/resolved_service_endpoint.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResolvedServiceEndpoint(Model): - """Endpoint of a resolved service partition. - - :param kind: The role of the replica where the endpoint is reported. - Possible values include: 'Invalid', 'Stateless', 'StatefulPrimary', - 'StatefulSecondary' - :type kind: str or ~azure.servicefabric.models.ServiceEndpointRole - :param address: The address of the endpoint. If the endpoint has multiple - listeners the address is a JSON object with one property per listener with - the value as the address of that listener. - :type address: str - """ - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResolvedServiceEndpoint, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.address = kwargs.get('address', None) diff --git a/customSDK/servicefabric/models/resolved_service_endpoint_py3.py b/customSDK/servicefabric/models/resolved_service_endpoint_py3.py deleted file mode 100644 index c016e4df..00000000 --- a/customSDK/servicefabric/models/resolved_service_endpoint_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResolvedServiceEndpoint(Model): - """Endpoint of a resolved service partition. - - :param kind: The role of the replica where the endpoint is reported. - Possible values include: 'Invalid', 'Stateless', 'StatefulPrimary', - 'StatefulSecondary' - :type kind: str or ~azure.servicefabric.models.ServiceEndpointRole - :param address: The address of the endpoint. If the endpoint has multiple - listeners the address is a JSON object with one property per listener with - the value as the address of that listener. - :type address: str - """ - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - } - - def __init__(self, *, kind=None, address: str=None, **kwargs) -> None: - super(ResolvedServiceEndpoint, self).__init__(**kwargs) - self.kind = kind - self.address = address diff --git a/customSDK/servicefabric/models/resolved_service_partition.py b/customSDK/servicefabric/models/resolved_service_partition.py deleted file mode 100644 index d788d26d..00000000 --- a/customSDK/servicefabric/models/resolved_service_partition.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResolvedServicePartition(Model): - """Information about a service partition and its associated endpoints. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The full name of the service with 'fabric:' URI - scheme. - :type name: str - :param partition_information: Required. A representation of the resolved - partition. - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param endpoints: Required. List of resolved service endpoints of a - service partition. - :type endpoints: list[~azure.servicefabric.models.ResolvedServiceEndpoint] - :param version: Required. The version of this resolved service partition - result. This version should be passed in the next time the ResolveService - call is made via the PreviousRspVersion query parameter. - :type version: str - """ - - _validation = { - 'name': {'required': True}, - 'partition_information': {'required': True}, - 'endpoints': {'required': True}, - 'version': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'endpoints': {'key': 'Endpoints', 'type': '[ResolvedServiceEndpoint]'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResolvedServicePartition, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.partition_information = kwargs.get('partition_information', None) - self.endpoints = kwargs.get('endpoints', None) - self.version = kwargs.get('version', None) diff --git a/customSDK/servicefabric/models/resolved_service_partition_py3.py b/customSDK/servicefabric/models/resolved_service_partition_py3.py deleted file mode 100644 index 5b26f0f6..00000000 --- a/customSDK/servicefabric/models/resolved_service_partition_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResolvedServicePartition(Model): - """Information about a service partition and its associated endpoints. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The full name of the service with 'fabric:' URI - scheme. - :type name: str - :param partition_information: Required. A representation of the resolved - partition. - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param endpoints: Required. List of resolved service endpoints of a - service partition. - :type endpoints: list[~azure.servicefabric.models.ResolvedServiceEndpoint] - :param version: Required. The version of this resolved service partition - result. This version should be passed in the next time the ResolveService - call is made via the PreviousRspVersion query parameter. - :type version: str - """ - - _validation = { - 'name': {'required': True}, - 'partition_information': {'required': True}, - 'endpoints': {'required': True}, - 'version': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'endpoints': {'key': 'Endpoints', 'type': '[ResolvedServiceEndpoint]'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__(self, *, name: str, partition_information, endpoints, version: str, **kwargs) -> None: - super(ResolvedServicePartition, self).__init__(**kwargs) - self.name = name - self.partition_information = partition_information - self.endpoints = endpoints - self.version = version diff --git a/customSDK/servicefabric/models/resource_limits.py b/customSDK/servicefabric/models/resource_limits.py deleted file mode 100644 index 9653965c..00000000 --- a/customSDK/servicefabric/models/resource_limits.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceLimits(Model): - """This type describes the resource limits for a given container. It describes - the most amount of resources a container is allowed to use before being - restarted. - - :param memory_in_gb: The memory limit in GB. - :type memory_in_gb: float - :param cpu: CPU limits in cores. At present, only full cores are - supported. - :type cpu: float - """ - - _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ResourceLimits, self).__init__(**kwargs) - self.memory_in_gb = kwargs.get('memory_in_gb', None) - self.cpu = kwargs.get('cpu', None) diff --git a/customSDK/servicefabric/models/resource_limits_py3.py b/customSDK/servicefabric/models/resource_limits_py3.py deleted file mode 100644 index 2817c55a..00000000 --- a/customSDK/servicefabric/models/resource_limits_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceLimits(Model): - """This type describes the resource limits for a given container. It describes - the most amount of resources a container is allowed to use before being - restarted. - - :param memory_in_gb: The memory limit in GB. - :type memory_in_gb: float - :param cpu: CPU limits in cores. At present, only full cores are - supported. - :type cpu: float - """ - - _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, - } - - def __init__(self, *, memory_in_gb: float=None, cpu: float=None, **kwargs) -> None: - super(ResourceLimits, self).__init__(**kwargs) - self.memory_in_gb = memory_in_gb - self.cpu = cpu diff --git a/customSDK/servicefabric/models/resource_requests.py b/customSDK/servicefabric/models/resource_requests.py deleted file mode 100644 index 1a1b725a..00000000 --- a/customSDK/servicefabric/models/resource_requests.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceRequests(Model): - """This type describes the requested resources for a given container. It - describes the least amount of resources required for the container. A - container can consume more than requested resources up to the specified - limits before being restarted. Currently, the requested resources are - treated as limits. - - All required parameters must be populated in order to send to Azure. - - :param memory_in_gb: Required. The memory request in GB for this - container. - :type memory_in_gb: float - :param cpu: Required. Requested number of CPU cores. At present, only full - cores are supported. - :type cpu: float - """ - - _validation = { - 'memory_in_gb': {'required': True}, - 'cpu': {'required': True}, - } - - _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(ResourceRequests, self).__init__(**kwargs) - self.memory_in_gb = kwargs.get('memory_in_gb', None) - self.cpu = kwargs.get('cpu', None) diff --git a/customSDK/servicefabric/models/resource_requests_py3.py b/customSDK/servicefabric/models/resource_requests_py3.py deleted file mode 100644 index ffa43735..00000000 --- a/customSDK/servicefabric/models/resource_requests_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceRequests(Model): - """This type describes the requested resources for a given container. It - describes the least amount of resources required for the container. A - container can consume more than requested resources up to the specified - limits before being restarted. Currently, the requested resources are - treated as limits. - - All required parameters must be populated in order to send to Azure. - - :param memory_in_gb: Required. The memory request in GB for this - container. - :type memory_in_gb: float - :param cpu: Required. Requested number of CPU cores. At present, only full - cores are supported. - :type cpu: float - """ - - _validation = { - 'memory_in_gb': {'required': True}, - 'cpu': {'required': True}, - } - - _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, - } - - def __init__(self, *, memory_in_gb: float, cpu: float, **kwargs) -> None: - super(ResourceRequests, self).__init__(**kwargs) - self.memory_in_gb = memory_in_gb - self.cpu = cpu diff --git a/customSDK/servicefabric/models/resource_requirements.py b/customSDK/servicefabric/models/resource_requirements.py deleted file mode 100644 index e2801572..00000000 --- a/customSDK/servicefabric/models/resource_requirements.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceRequirements(Model): - """This type describes the resource requirements for a container or a service. - - All required parameters must be populated in order to send to Azure. - - :param requests: Required. Describes the requested resources for a given - container. - :type requests: ~azure.servicefabric.models.ResourceRequests - :param limits: Describes the maximum limits on the resources for a given - container. - :type limits: ~azure.servicefabric.models.ResourceLimits - """ - - _validation = { - 'requests': {'required': True}, - } - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'ResourceRequests'}, - 'limits': {'key': 'limits', 'type': 'ResourceLimits'}, - } - - def __init__(self, **kwargs): - super(ResourceRequirements, self).__init__(**kwargs) - self.requests = kwargs.get('requests', None) - self.limits = kwargs.get('limits', None) diff --git a/customSDK/servicefabric/models/resource_requirements_py3.py b/customSDK/servicefabric/models/resource_requirements_py3.py deleted file mode 100644 index 09945aa5..00000000 --- a/customSDK/servicefabric/models/resource_requirements_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceRequirements(Model): - """This type describes the resource requirements for a container or a service. - - All required parameters must be populated in order to send to Azure. - - :param requests: Required. Describes the requested resources for a given - container. - :type requests: ~azure.servicefabric.models.ResourceRequests - :param limits: Describes the maximum limits on the resources for a given - container. - :type limits: ~azure.servicefabric.models.ResourceLimits - """ - - _validation = { - 'requests': {'required': True}, - } - - _attribute_map = { - 'requests': {'key': 'requests', 'type': 'ResourceRequests'}, - 'limits': {'key': 'limits', 'type': 'ResourceLimits'}, - } - - def __init__(self, *, requests, limits=None, **kwargs) -> None: - super(ResourceRequirements, self).__init__(**kwargs) - self.requests = requests - self.limits = limits diff --git a/customSDK/servicefabric/models/restart_deployed_code_package_description.py b/customSDK/servicefabric/models/restart_deployed_code_package_description.py deleted file mode 100644 index 8f2cf708..00000000 --- a/customSDK/servicefabric/models/restart_deployed_code_package_description.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RestartDeployedCodePackageDescription(Model): - """Defines description for restarting a deployed code package on Service - Fabric node. - - All required parameters must be populated in order to send to Azure. - - :param service_manifest_name: Required. The name of service manifest that - specified this code package. - :type service_manifest_name: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param code_package_name: Required. The name of the code package defined - in the service manifest. - :type code_package_name: str - :param code_package_instance_id: Required. The instance ID for currently - running entry point. For a code package setup entry point (if specified) - runs first and after it finishes main entry point is started. - Each time entry point executable is run, its instance ID will change. If 0 - is passed in as the code package instance ID, the API will restart the - code package with whatever instance ID it is currently running. - If an instance ID other than 0 is passed in, the API will restart the code - package only if the current Instance ID matches the passed in instance ID. - Note, passing in the exact instance ID (not 0) in the API is safer, - because if ensures at most one restart of the code package. - :type code_package_instance_id: str - """ - - _validation = { - 'service_manifest_name': {'required': True}, - 'code_package_name': {'required': True}, - 'code_package_instance_id': {'required': True}, - } - - _attribute_map = { - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'code_package_instance_id': {'key': 'CodePackageInstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestartDeployedCodePackageDescription, self).__init__(**kwargs) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.code_package_instance_id = kwargs.get('code_package_instance_id', None) diff --git a/customSDK/servicefabric/models/restart_deployed_code_package_description_py3.py b/customSDK/servicefabric/models/restart_deployed_code_package_description_py3.py deleted file mode 100644 index 6bd67699..00000000 --- a/customSDK/servicefabric/models/restart_deployed_code_package_description_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RestartDeployedCodePackageDescription(Model): - """Defines description for restarting a deployed code package on Service - Fabric node. - - All required parameters must be populated in order to send to Azure. - - :param service_manifest_name: Required. The name of service manifest that - specified this code package. - :type service_manifest_name: str - :param service_package_activation_id: The ActivationId of a deployed - service package. If ServicePackageActivationMode specified at the time of - creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults - to 'SharedProcess'), then value of ServicePackageActivationId - is always an empty string. - :type service_package_activation_id: str - :param code_package_name: Required. The name of the code package defined - in the service manifest. - :type code_package_name: str - :param code_package_instance_id: Required. The instance ID for currently - running entry point. For a code package setup entry point (if specified) - runs first and after it finishes main entry point is started. - Each time entry point executable is run, its instance ID will change. If 0 - is passed in as the code package instance ID, the API will restart the - code package with whatever instance ID it is currently running. - If an instance ID other than 0 is passed in, the API will restart the code - package only if the current Instance ID matches the passed in instance ID. - Note, passing in the exact instance ID (not 0) in the API is safer, - because if ensures at most one restart of the code package. - :type code_package_instance_id: str - """ - - _validation = { - 'service_manifest_name': {'required': True}, - 'code_package_name': {'required': True}, - 'code_package_instance_id': {'required': True}, - } - - _attribute_map = { - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'code_package_instance_id': {'key': 'CodePackageInstanceId', 'type': 'str'}, - } - - def __init__(self, *, service_manifest_name: str, code_package_name: str, code_package_instance_id: str, service_package_activation_id: str=None, **kwargs) -> None: - super(RestartDeployedCodePackageDescription, self).__init__(**kwargs) - self.service_manifest_name = service_manifest_name - self.service_package_activation_id = service_package_activation_id - self.code_package_name = code_package_name - self.code_package_instance_id = code_package_instance_id diff --git a/customSDK/servicefabric/models/restart_node_description.py b/customSDK/servicefabric/models/restart_node_description.py deleted file mode 100644 index f913764a..00000000 --- a/customSDK/servicefabric/models/restart_node_description.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RestartNodeDescription(Model): - """Describes the parameters to restart a Service Fabric node. - - All required parameters must be populated in order to send to Azure. - - :param node_instance_id: Required. The instance ID of the target node. If - instance ID is specified the node is restarted only if it matches with the - current instance of the node. A default value of "0" would match any - instance ID. The instance ID can be obtained using get node query. Default - value: "0" . - :type node_instance_id: str - :param create_fabric_dump: Specify True to create a dump of the fabric - node process. This is case-sensitive. Possible values include: 'False', - 'True'. Default value: "False" . - :type create_fabric_dump: str or - ~azure.servicefabric.models.CreateFabricDump - """ - - _validation = { - 'node_instance_id': {'required': True}, - } - - _attribute_map = { - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - 'create_fabric_dump': {'key': 'CreateFabricDump', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestartNodeDescription, self).__init__(**kwargs) - self.node_instance_id = kwargs.get('node_instance_id', "0") - self.create_fabric_dump = kwargs.get('create_fabric_dump', "False") diff --git a/customSDK/servicefabric/models/restart_node_description_py3.py b/customSDK/servicefabric/models/restart_node_description_py3.py deleted file mode 100644 index 025da598..00000000 --- a/customSDK/servicefabric/models/restart_node_description_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RestartNodeDescription(Model): - """Describes the parameters to restart a Service Fabric node. - - All required parameters must be populated in order to send to Azure. - - :param node_instance_id: Required. The instance ID of the target node. If - instance ID is specified the node is restarted only if it matches with the - current instance of the node. A default value of "0" would match any - instance ID. The instance ID can be obtained using get node query. Default - value: "0" . - :type node_instance_id: str - :param create_fabric_dump: Specify True to create a dump of the fabric - node process. This is case-sensitive. Possible values include: 'False', - 'True'. Default value: "False" . - :type create_fabric_dump: str or - ~azure.servicefabric.models.CreateFabricDump - """ - - _validation = { - 'node_instance_id': {'required': True}, - } - - _attribute_map = { - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - 'create_fabric_dump': {'key': 'CreateFabricDump', 'type': 'str'}, - } - - def __init__(self, *, node_instance_id: str="0", create_fabric_dump="False", **kwargs) -> None: - super(RestartNodeDescription, self).__init__(**kwargs) - self.node_instance_id = node_instance_id - self.create_fabric_dump = create_fabric_dump diff --git a/customSDK/servicefabric/models/restart_partition_result.py b/customSDK/servicefabric/models/restart_partition_result.py deleted file mode 100644 index 77acab4c..00000000 --- a/customSDK/servicefabric/models/restart_partition_result.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RestartPartitionResult(Model): - """Represents information about an operation in a terminal state (Completed or - Faulted). - - :param error_code: If OperationState is Completed, this is 0. If - OperationState is Faulted, this is an error code indicating the reason. - :type error_code: int - :param selected_partition: This class returns information about the - partition that the user-induced operation acted upon. - :type selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__(self, **kwargs): - super(RestartPartitionResult, self).__init__(**kwargs) - self.error_code = kwargs.get('error_code', None) - self.selected_partition = kwargs.get('selected_partition', None) diff --git a/customSDK/servicefabric/models/restart_partition_result_py3.py b/customSDK/servicefabric/models/restart_partition_result_py3.py deleted file mode 100644 index 0770f448..00000000 --- a/customSDK/servicefabric/models/restart_partition_result_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RestartPartitionResult(Model): - """Represents information about an operation in a terminal state (Completed or - Faulted). - - :param error_code: If OperationState is Completed, this is 0. If - OperationState is Faulted, this is an error code indicating the reason. - :type error_code: int - :param selected_partition: This class returns information about the - partition that the user-induced operation acted upon. - :type selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__(self, *, error_code: int=None, selected_partition=None, **kwargs) -> None: - super(RestartPartitionResult, self).__init__(**kwargs) - self.error_code = error_code - self.selected_partition = selected_partition diff --git a/customSDK/servicefabric/models/restore_partition_description.py b/customSDK/servicefabric/models/restore_partition_description.py deleted file mode 100644 index f21fb876..00000000 --- a/customSDK/servicefabric/models/restore_partition_description.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RestorePartitionDescription(Model): - """Specifies the parameters needed to trigger a restore of a specific - partition. - - All required parameters must be populated in order to send to Azure. - - :param backup_id: Required. Unique backup ID. - :type backup_id: str - :param backup_location: Required. Location of the backup relative to the - backup storage specified/ configured. - :type backup_location: str - :param backup_storage: Location of the backup from where the partition - will be restored. - :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription - """ - - _validation = { - 'backup_id': {'required': True}, - 'backup_location': {'required': True}, - } - - _attribute_map = { - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, - } - - def __init__(self, **kwargs): - super(RestorePartitionDescription, self).__init__(**kwargs) - self.backup_id = kwargs.get('backup_id', None) - self.backup_location = kwargs.get('backup_location', None) - self.backup_storage = kwargs.get('backup_storage', None) diff --git a/customSDK/servicefabric/models/restore_partition_description_py3.py b/customSDK/servicefabric/models/restore_partition_description_py3.py deleted file mode 100644 index 885a6f4f..00000000 --- a/customSDK/servicefabric/models/restore_partition_description_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RestorePartitionDescription(Model): - """Specifies the parameters needed to trigger a restore of a specific - partition. - - All required parameters must be populated in order to send to Azure. - - :param backup_id: Required. Unique backup ID. - :type backup_id: str - :param backup_location: Required. Location of the backup relative to the - backup storage specified/ configured. - :type backup_location: str - :param backup_storage: Location of the backup from where the partition - will be restored. - :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription - """ - - _validation = { - 'backup_id': {'required': True}, - 'backup_location': {'required': True}, - } - - _attribute_map = { - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, - } - - def __init__(self, *, backup_id: str, backup_location: str, backup_storage=None, **kwargs) -> None: - super(RestorePartitionDescription, self).__init__(**kwargs) - self.backup_id = backup_id - self.backup_location = backup_location - self.backup_storage = backup_storage diff --git a/customSDK/servicefabric/models/restore_progress_info.py b/customSDK/servicefabric/models/restore_progress_info.py deleted file mode 100644 index 9d631925..00000000 --- a/customSDK/servicefabric/models/restore_progress_info.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RestoreProgressInfo(Model): - """Describes the progress of a restore operation on a partition. - - :param restore_state: Represents the current state of the partition - restore operation. Possible values include: 'Invalid', 'Accepted', - 'RestoreInProgress', 'Success', 'Failure', 'Timeout' - :type restore_state: str or ~azure.servicefabric.models.RestoreState - :param time_stamp_utc: Timestamp when operation succeeded or failed. - :type time_stamp_utc: datetime - :param restored_epoch: Describes the epoch at which the partition is - restored. - :type restored_epoch: ~azure.servicefabric.models.Epoch - :param restored_lsn: Restored LSN. - :type restored_lsn: str - :param failure_error: Denotes the failure encountered in performing - restore operation. - :type failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'restore_state': {'key': 'RestoreState', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'restored_epoch': {'key': 'RestoredEpoch', 'type': 'Epoch'}, - 'restored_lsn': {'key': 'RestoredLsn', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__(self, **kwargs): - super(RestoreProgressInfo, self).__init__(**kwargs) - self.restore_state = kwargs.get('restore_state', None) - self.time_stamp_utc = kwargs.get('time_stamp_utc', None) - self.restored_epoch = kwargs.get('restored_epoch', None) - self.restored_lsn = kwargs.get('restored_lsn', None) - self.failure_error = kwargs.get('failure_error', None) diff --git a/customSDK/servicefabric/models/restore_progress_info_py3.py b/customSDK/servicefabric/models/restore_progress_info_py3.py deleted file mode 100644 index 2274e6bd..00000000 --- a/customSDK/servicefabric/models/restore_progress_info_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RestoreProgressInfo(Model): - """Describes the progress of a restore operation on a partition. - - :param restore_state: Represents the current state of the partition - restore operation. Possible values include: 'Invalid', 'Accepted', - 'RestoreInProgress', 'Success', 'Failure', 'Timeout' - :type restore_state: str or ~azure.servicefabric.models.RestoreState - :param time_stamp_utc: Timestamp when operation succeeded or failed. - :type time_stamp_utc: datetime - :param restored_epoch: Describes the epoch at which the partition is - restored. - :type restored_epoch: ~azure.servicefabric.models.Epoch - :param restored_lsn: Restored LSN. - :type restored_lsn: str - :param failure_error: Denotes the failure encountered in performing - restore operation. - :type failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'restore_state': {'key': 'RestoreState', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'restored_epoch': {'key': 'RestoredEpoch', 'type': 'Epoch'}, - 'restored_lsn': {'key': 'RestoredLsn', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__(self, *, restore_state=None, time_stamp_utc=None, restored_epoch=None, restored_lsn: str=None, failure_error=None, **kwargs) -> None: - super(RestoreProgressInfo, self).__init__(**kwargs) - self.restore_state = restore_state - self.time_stamp_utc = time_stamp_utc - self.restored_epoch = restored_epoch - self.restored_lsn = restored_lsn - self.failure_error = failure_error diff --git a/customSDK/servicefabric/models/resume_application_upgrade_description.py b/customSDK/servicefabric/models/resume_application_upgrade_description.py deleted file mode 100644 index ab0851cc..00000000 --- a/customSDK/servicefabric/models/resume_application_upgrade_description.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResumeApplicationUpgradeDescription(Model): - """Describes the parameters for resuming an unmonitored manual Service Fabric - application upgrade. - - All required parameters must be populated in order to send to Azure. - - :param upgrade_domain_name: Required. The name of the upgrade domain in - which to resume the upgrade. - :type upgrade_domain_name: str - """ - - _validation = { - 'upgrade_domain_name': {'required': True}, - } - - _attribute_map = { - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResumeApplicationUpgradeDescription, self).__init__(**kwargs) - self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) diff --git a/customSDK/servicefabric/models/resume_application_upgrade_description_py3.py b/customSDK/servicefabric/models/resume_application_upgrade_description_py3.py deleted file mode 100644 index 7b0aaf39..00000000 --- a/customSDK/servicefabric/models/resume_application_upgrade_description_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResumeApplicationUpgradeDescription(Model): - """Describes the parameters for resuming an unmonitored manual Service Fabric - application upgrade. - - All required parameters must be populated in order to send to Azure. - - :param upgrade_domain_name: Required. The name of the upgrade domain in - which to resume the upgrade. - :type upgrade_domain_name: str - """ - - _validation = { - 'upgrade_domain_name': {'required': True}, - } - - _attribute_map = { - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - } - - def __init__(self, *, upgrade_domain_name: str, **kwargs) -> None: - super(ResumeApplicationUpgradeDescription, self).__init__(**kwargs) - self.upgrade_domain_name = upgrade_domain_name diff --git a/customSDK/servicefabric/models/resume_cluster_upgrade_description.py b/customSDK/servicefabric/models/resume_cluster_upgrade_description.py deleted file mode 100644 index 2cd5ab0c..00000000 --- a/customSDK/servicefabric/models/resume_cluster_upgrade_description.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResumeClusterUpgradeDescription(Model): - """Describes the parameters for resuming a cluster upgrade. - - All required parameters must be populated in order to send to Azure. - - :param upgrade_domain: Required. The next upgrade domain for this cluster - upgrade. - :type upgrade_domain: str - """ - - _validation = { - 'upgrade_domain': {'required': True}, - } - - _attribute_map = { - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResumeClusterUpgradeDescription, self).__init__(**kwargs) - self.upgrade_domain = kwargs.get('upgrade_domain', None) diff --git a/customSDK/servicefabric/models/resume_cluster_upgrade_description_py3.py b/customSDK/servicefabric/models/resume_cluster_upgrade_description_py3.py deleted file mode 100644 index 933f0bf1..00000000 --- a/customSDK/servicefabric/models/resume_cluster_upgrade_description_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResumeClusterUpgradeDescription(Model): - """Describes the parameters for resuming a cluster upgrade. - - All required parameters must be populated in order to send to Azure. - - :param upgrade_domain: Required. The next upgrade domain for this cluster - upgrade. - :type upgrade_domain: str - """ - - _validation = { - 'upgrade_domain': {'required': True}, - } - - _attribute_map = { - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - } - - def __init__(self, *, upgrade_domain: str, **kwargs) -> None: - super(ResumeClusterUpgradeDescription, self).__init__(**kwargs) - self.upgrade_domain = upgrade_domain diff --git a/customSDK/servicefabric/models/retention_policy_description.py b/customSDK/servicefabric/models/retention_policy_description.py deleted file mode 100644 index b1a6a7df..00000000 --- a/customSDK/servicefabric/models/retention_policy_description.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetentionPolicyDescription(Model): - """Describes the retention policy configured. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BasicRetentionPolicyDescription - - All required parameters must be populated in order to send to Azure. - - :param retention_policy_type: Required. Constant filled by server. - :type retention_policy_type: str - """ - - _validation = { - 'retention_policy_type': {'required': True}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, - } - - _subtype_map = { - 'retention_policy_type': {'Basic': 'BasicRetentionPolicyDescription'} - } - - def __init__(self, **kwargs): - super(RetentionPolicyDescription, self).__init__(**kwargs) - self.retention_policy_type = None diff --git a/customSDK/servicefabric/models/retention_policy_description_py3.py b/customSDK/servicefabric/models/retention_policy_description_py3.py deleted file mode 100644 index 6f775cf7..00000000 --- a/customSDK/servicefabric/models/retention_policy_description_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetentionPolicyDescription(Model): - """Describes the retention policy configured. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BasicRetentionPolicyDescription - - All required parameters must be populated in order to send to Azure. - - :param retention_policy_type: Required. Constant filled by server. - :type retention_policy_type: str - """ - - _validation = { - 'retention_policy_type': {'required': True}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, - } - - _subtype_map = { - 'retention_policy_type': {'Basic': 'BasicRetentionPolicyDescription'} - } - - def __init__(self, **kwargs) -> None: - super(RetentionPolicyDescription, self).__init__(**kwargs) - self.retention_policy_type = None diff --git a/customSDK/servicefabric/models/rolling_upgrade_update_description.py b/customSDK/servicefabric/models/rolling_upgrade_update_description.py deleted file mode 100644 index 1d4b05de..00000000 --- a/customSDK/servicefabric/models/rolling_upgrade_update_description.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeUpdateDescription(Model): - """Describes the parameters for updating a rolling upgrade of application or - cluster. - - All required parameters must be populated in order to send to Azure. - - :param rolling_upgrade_mode: Required. The mode used to monitor health - during a rolling upgrade. The values are UnmonitoredAuto, - UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible values - include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', - 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param replica_set_check_timeout_in_milliseconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type replica_set_check_timeout_in_milliseconds: long - :param failure_action: The compensating action to perform when a Monitored - upgrade encounters monitoring policy or health policy violations. - Invalid indicates the failure action is invalid. Rollback specifies that - the upgrade will start rolling back automatically. - Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - mode. Possible values include: 'Invalid', 'Rollback', 'Manual' - :type failure_action: str or ~azure.servicefabric.models.FailureAction - :param health_check_wait_duration_in_milliseconds: The amount of time to - wait after completing an upgrade domain before applying health policies. - It is first interpreted as a string representing an ISO 8601 duration. If - that fails, then it is interpreted as a number representing the total - number of milliseconds. - :type health_check_wait_duration_in_milliseconds: str - :param health_check_stable_duration_in_milliseconds: The amount of time - that the application or cluster must remain healthy before the upgrade - proceeds to the next upgrade domain. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type health_check_stable_duration_in_milliseconds: str - :param health_check_retry_timeout_in_milliseconds: The amount of time to - retry health evaluation when the application or cluster is unhealthy - before FailureAction is executed. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type health_check_retry_timeout_in_milliseconds: str - :param upgrade_timeout_in_milliseconds: The amount of time the overall - upgrade has to complete before FailureAction is executed. It is first - interpreted as a string representing an ISO 8601 duration. If that fails, - then it is interpreted as a number representing the total number of - milliseconds. - :type upgrade_timeout_in_milliseconds: str - :param upgrade_domain_timeout_in_milliseconds: The amount of time each - upgrade domain has to complete before FailureAction is executed. It is - first interpreted as a string representing an ISO 8601 duration. If that - fails, then it is interpreted as a number representing the total number of - milliseconds. - :type upgrade_domain_timeout_in_milliseconds: str - :param instance_close_delay_duration_in_seconds: Duration in seconds, to - wait before a stateless instance is closed, to allow the active requests - to drain gracefully. This would be effective when the instance is closing - during the application/cluster - upgrade, only for those instances which have a non-zero delay duration - configured in the service description. See - InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is - 4294967295, which indicates that the behavior will entirely depend on the - delay configured in the stateless service description. - :type instance_close_delay_duration_in_seconds: long - """ - - _validation = { - 'rolling_upgrade_mode': {'required': True}, - } - - _attribute_map = { - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'replica_set_check_timeout_in_milliseconds': {'key': 'ReplicaSetCheckTimeoutInMilliseconds', 'type': 'long'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, - 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, - 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(RollingUpgradeUpdateDescription, self).__init__(**kwargs) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.force_restart = kwargs.get('force_restart', None) - self.replica_set_check_timeout_in_milliseconds = kwargs.get('replica_set_check_timeout_in_milliseconds', None) - self.failure_action = kwargs.get('failure_action', None) - self.health_check_wait_duration_in_milliseconds = kwargs.get('health_check_wait_duration_in_milliseconds', None) - self.health_check_stable_duration_in_milliseconds = kwargs.get('health_check_stable_duration_in_milliseconds', None) - self.health_check_retry_timeout_in_milliseconds = kwargs.get('health_check_retry_timeout_in_milliseconds', None) - self.upgrade_timeout_in_milliseconds = kwargs.get('upgrade_timeout_in_milliseconds', None) - self.upgrade_domain_timeout_in_milliseconds = kwargs.get('upgrade_domain_timeout_in_milliseconds', None) - self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', None) diff --git a/customSDK/servicefabric/models/rolling_upgrade_update_description_py3.py b/customSDK/servicefabric/models/rolling_upgrade_update_description_py3.py deleted file mode 100644 index 2a357bce..00000000 --- a/customSDK/servicefabric/models/rolling_upgrade_update_description_py3.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RollingUpgradeUpdateDescription(Model): - """Describes the parameters for updating a rolling upgrade of application or - cluster. - - All required parameters must be populated in order to send to Azure. - - :param rolling_upgrade_mode: Required. The mode used to monitor health - during a rolling upgrade. The values are UnmonitoredAuto, - UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible values - include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', - 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param replica_set_check_timeout_in_milliseconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type replica_set_check_timeout_in_milliseconds: long - :param failure_action: The compensating action to perform when a Monitored - upgrade encounters monitoring policy or health policy violations. - Invalid indicates the failure action is invalid. Rollback specifies that - the upgrade will start rolling back automatically. - Manual indicates that the upgrade will switch to UnmonitoredManual upgrade - mode. Possible values include: 'Invalid', 'Rollback', 'Manual' - :type failure_action: str or ~azure.servicefabric.models.FailureAction - :param health_check_wait_duration_in_milliseconds: The amount of time to - wait after completing an upgrade domain before applying health policies. - It is first interpreted as a string representing an ISO 8601 duration. If - that fails, then it is interpreted as a number representing the total - number of milliseconds. - :type health_check_wait_duration_in_milliseconds: str - :param health_check_stable_duration_in_milliseconds: The amount of time - that the application or cluster must remain healthy before the upgrade - proceeds to the next upgrade domain. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type health_check_stable_duration_in_milliseconds: str - :param health_check_retry_timeout_in_milliseconds: The amount of time to - retry health evaluation when the application or cluster is unhealthy - before FailureAction is executed. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted - as a number representing the total number of milliseconds. - :type health_check_retry_timeout_in_milliseconds: str - :param upgrade_timeout_in_milliseconds: The amount of time the overall - upgrade has to complete before FailureAction is executed. It is first - interpreted as a string representing an ISO 8601 duration. If that fails, - then it is interpreted as a number representing the total number of - milliseconds. - :type upgrade_timeout_in_milliseconds: str - :param upgrade_domain_timeout_in_milliseconds: The amount of time each - upgrade domain has to complete before FailureAction is executed. It is - first interpreted as a string representing an ISO 8601 duration. If that - fails, then it is interpreted as a number representing the total number of - milliseconds. - :type upgrade_domain_timeout_in_milliseconds: str - :param instance_close_delay_duration_in_seconds: Duration in seconds, to - wait before a stateless instance is closed, to allow the active requests - to drain gracefully. This would be effective when the instance is closing - during the application/cluster - upgrade, only for those instances which have a non-zero delay duration - configured in the service description. See - InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is - 4294967295, which indicates that the behavior will entirely depend on the - delay configured in the stateless service description. - :type instance_close_delay_duration_in_seconds: long - """ - - _validation = { - 'rolling_upgrade_mode': {'required': True}, - } - - _attribute_map = { - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'replica_set_check_timeout_in_milliseconds': {'key': 'ReplicaSetCheckTimeoutInMilliseconds', 'type': 'long'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, - 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, - 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - } - - def __init__(self, *, rolling_upgrade_mode="UnmonitoredAuto", force_restart: bool=None, replica_set_check_timeout_in_milliseconds: int=None, failure_action=None, health_check_wait_duration_in_milliseconds: str=None, health_check_stable_duration_in_milliseconds: str=None, health_check_retry_timeout_in_milliseconds: str=None, upgrade_timeout_in_milliseconds: str=None, upgrade_domain_timeout_in_milliseconds: str=None, instance_close_delay_duration_in_seconds: int=None, **kwargs) -> None: - super(RollingUpgradeUpdateDescription, self).__init__(**kwargs) - self.rolling_upgrade_mode = rolling_upgrade_mode - self.force_restart = force_restart - self.replica_set_check_timeout_in_milliseconds = replica_set_check_timeout_in_milliseconds - self.failure_action = failure_action - self.health_check_wait_duration_in_milliseconds = health_check_wait_duration_in_milliseconds - self.health_check_stable_duration_in_milliseconds = health_check_stable_duration_in_milliseconds - self.health_check_retry_timeout_in_milliseconds = health_check_retry_timeout_in_milliseconds - self.upgrade_timeout_in_milliseconds = upgrade_timeout_in_milliseconds - self.upgrade_domain_timeout_in_milliseconds = upgrade_domain_timeout_in_milliseconds - self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds diff --git a/customSDK/servicefabric/models/run_to_completion_execution_policy.py b/customSDK/servicefabric/models/run_to_completion_execution_policy.py deleted file mode 100644 index 1ee4222e..00000000 --- a/customSDK/servicefabric/models/run_to_completion_execution_policy.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_policy import ExecutionPolicy - - -class RunToCompletionExecutionPolicy(ExecutionPolicy): - """The run to completion execution policy, the service will perform its - desired operation and complete successfully. If the service encounters - failure, it will restarted based on restart policy specified. If the - service completes its operation successfully, it will not be restarted - again. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param restart: Required. Enumerates the restart policy for - RunToCompletionExecutionPolicy. Possible values include: 'OnFailure', - 'Never' - :type restart: str or ~azure.servicefabric.models.RestartPolicy - """ - - _validation = { - 'type': {'required': True}, - 'restart': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'restart': {'key': 'restart', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RunToCompletionExecutionPolicy, self).__init__(**kwargs) - self.restart = kwargs.get('restart', None) - self.type = 'RunToCompletion' diff --git a/customSDK/servicefabric/models/run_to_completion_execution_policy_py3.py b/customSDK/servicefabric/models/run_to_completion_execution_policy_py3.py deleted file mode 100644 index 9304ae5a..00000000 --- a/customSDK/servicefabric/models/run_to_completion_execution_policy_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .execution_policy_py3 import ExecutionPolicy - - -class RunToCompletionExecutionPolicy(ExecutionPolicy): - """The run to completion execution policy, the service will perform its - desired operation and complete successfully. If the service encounters - failure, it will restarted based on restart policy specified. If the - service completes its operation successfully, it will not be restarted - again. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param restart: Required. Enumerates the restart policy for - RunToCompletionExecutionPolicy. Possible values include: 'OnFailure', - 'Never' - :type restart: str or ~azure.servicefabric.models.RestartPolicy - """ - - _validation = { - 'type': {'required': True}, - 'restart': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'restart': {'key': 'restart', 'type': 'str'}, - } - - def __init__(self, *, restart, **kwargs) -> None: - super(RunToCompletionExecutionPolicy, self).__init__(**kwargs) - self.restart = restart - self.type = 'RunToCompletion' diff --git a/customSDK/servicefabric/models/safety_check.py b/customSDK/servicefabric/models/safety_check.py deleted file mode 100644 index 5d2898fc..00000000 --- a/customSDK/servicefabric/models/safety_check.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SafetyCheck(Model): - """Represents a safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service - and the reliability of the state. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionSafetyCheck, SeedNodeSafetyCheck - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'PartitionSafetyCheck': 'PartitionSafetyCheck', 'EnsureSeedNodeQuorum': 'SeedNodeSafetyCheck'} - } - - def __init__(self, **kwargs): - super(SafetyCheck, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/safety_check_py3.py b/customSDK/servicefabric/models/safety_check_py3.py deleted file mode 100644 index b4c48b89..00000000 --- a/customSDK/servicefabric/models/safety_check_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SafetyCheck(Model): - """Represents a safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service - and the reliability of the state. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionSafetyCheck, SeedNodeSafetyCheck - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'PartitionSafetyCheck': 'PartitionSafetyCheck', 'EnsureSeedNodeQuorum': 'SeedNodeSafetyCheck'} - } - - def __init__(self, **kwargs) -> None: - super(SafetyCheck, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/safety_check_wrapper.py b/customSDK/servicefabric/models/safety_check_wrapper.py deleted file mode 100644 index 7307dd6d..00000000 --- a/customSDK/servicefabric/models/safety_check_wrapper.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SafetyCheckWrapper(Model): - """A wrapper for the safety check object. Safety checks are performed by - service fabric before continuing with the operations. These checks ensure - the availability of the service and the reliability of the state. - - :param safety_check: Represents a safety check performed by service fabric - before continuing with the operations. These checks ensure the - availability of the service and the reliability of the state. - :type safety_check: ~azure.servicefabric.models.SafetyCheck - """ - - _attribute_map = { - 'safety_check': {'key': 'SafetyCheck', 'type': 'SafetyCheck'}, - } - - def __init__(self, **kwargs): - super(SafetyCheckWrapper, self).__init__(**kwargs) - self.safety_check = kwargs.get('safety_check', None) diff --git a/customSDK/servicefabric/models/safety_check_wrapper_py3.py b/customSDK/servicefabric/models/safety_check_wrapper_py3.py deleted file mode 100644 index 92f85690..00000000 --- a/customSDK/servicefabric/models/safety_check_wrapper_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SafetyCheckWrapper(Model): - """A wrapper for the safety check object. Safety checks are performed by - service fabric before continuing with the operations. These checks ensure - the availability of the service and the reliability of the state. - - :param safety_check: Represents a safety check performed by service fabric - before continuing with the operations. These checks ensure the - availability of the service and the reliability of the state. - :type safety_check: ~azure.servicefabric.models.SafetyCheck - """ - - _attribute_map = { - 'safety_check': {'key': 'SafetyCheck', 'type': 'SafetyCheck'}, - } - - def __init__(self, *, safety_check=None, **kwargs) -> None: - super(SafetyCheckWrapper, self).__init__(**kwargs) - self.safety_check = safety_check diff --git a/customSDK/servicefabric/models/scaling_mechanism_description.py b/customSDK/servicefabric/models/scaling_mechanism_description.py deleted file mode 100644 index f08e3a9a..00000000 --- a/customSDK/servicefabric/models/scaling_mechanism_description.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScalingMechanismDescription(Model): - """Describes the mechanism for performing a scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionInstanceCountScaleMechanism, - AddRemoveIncrementalNamedPartitionScalingMechanism - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'PartitionInstanceCount': 'PartitionInstanceCountScaleMechanism', 'AddRemoveIncrementalNamedPartition': 'AddRemoveIncrementalNamedPartitionScalingMechanism'} - } - - def __init__(self, **kwargs): - super(ScalingMechanismDescription, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/scaling_mechanism_description_py3.py b/customSDK/servicefabric/models/scaling_mechanism_description_py3.py deleted file mode 100644 index f71c38e7..00000000 --- a/customSDK/servicefabric/models/scaling_mechanism_description_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScalingMechanismDescription(Model): - """Describes the mechanism for performing a scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionInstanceCountScaleMechanism, - AddRemoveIncrementalNamedPartitionScalingMechanism - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'PartitionInstanceCount': 'PartitionInstanceCountScaleMechanism', 'AddRemoveIncrementalNamedPartition': 'AddRemoveIncrementalNamedPartitionScalingMechanism'} - } - - def __init__(self, **kwargs) -> None: - super(ScalingMechanismDescription, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/scaling_policy_description.py b/customSDK/servicefabric/models/scaling_policy_description.py deleted file mode 100644 index 28c61ba6..00000000 --- a/customSDK/servicefabric/models/scaling_policy_description.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScalingPolicyDescription(Model): - """Describes how the scaling should be performed. - - All required parameters must be populated in order to send to Azure. - - :param scaling_trigger: Required. Specifies the trigger associated with - this scaling policy - :type scaling_trigger: - ~azure.servicefabric.models.ScalingTriggerDescription - :param scaling_mechanism: Required. Specifies the mechanism associated - with this scaling policy - :type scaling_mechanism: - ~azure.servicefabric.models.ScalingMechanismDescription - """ - - _validation = { - 'scaling_trigger': {'required': True}, - 'scaling_mechanism': {'required': True}, - } - - _attribute_map = { - 'scaling_trigger': {'key': 'ScalingTrigger', 'type': 'ScalingTriggerDescription'}, - 'scaling_mechanism': {'key': 'ScalingMechanism', 'type': 'ScalingMechanismDescription'}, - } - - def __init__(self, **kwargs): - super(ScalingPolicyDescription, self).__init__(**kwargs) - self.scaling_trigger = kwargs.get('scaling_trigger', None) - self.scaling_mechanism = kwargs.get('scaling_mechanism', None) diff --git a/customSDK/servicefabric/models/scaling_policy_description_py3.py b/customSDK/servicefabric/models/scaling_policy_description_py3.py deleted file mode 100644 index 1e923ce6..00000000 --- a/customSDK/servicefabric/models/scaling_policy_description_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScalingPolicyDescription(Model): - """Describes how the scaling should be performed. - - All required parameters must be populated in order to send to Azure. - - :param scaling_trigger: Required. Specifies the trigger associated with - this scaling policy - :type scaling_trigger: - ~azure.servicefabric.models.ScalingTriggerDescription - :param scaling_mechanism: Required. Specifies the mechanism associated - with this scaling policy - :type scaling_mechanism: - ~azure.servicefabric.models.ScalingMechanismDescription - """ - - _validation = { - 'scaling_trigger': {'required': True}, - 'scaling_mechanism': {'required': True}, - } - - _attribute_map = { - 'scaling_trigger': {'key': 'ScalingTrigger', 'type': 'ScalingTriggerDescription'}, - 'scaling_mechanism': {'key': 'ScalingMechanism', 'type': 'ScalingMechanismDescription'}, - } - - def __init__(self, *, scaling_trigger, scaling_mechanism, **kwargs) -> None: - super(ScalingPolicyDescription, self).__init__(**kwargs) - self.scaling_trigger = scaling_trigger - self.scaling_mechanism = scaling_mechanism diff --git a/customSDK/servicefabric/models/scaling_trigger_description.py b/customSDK/servicefabric/models/scaling_trigger_description.py deleted file mode 100644 index e09f6977..00000000 --- a/customSDK/servicefabric/models/scaling_trigger_description.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScalingTriggerDescription(Model): - """Describes the trigger for performing a scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AveragePartitionLoadScalingTrigger, - AverageServiceLoadScalingTrigger - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AveragePartitionLoad': 'AveragePartitionLoadScalingTrigger', 'AverageServiceLoad': 'AverageServiceLoadScalingTrigger'} - } - - def __init__(self, **kwargs): - super(ScalingTriggerDescription, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/scaling_trigger_description_py3.py b/customSDK/servicefabric/models/scaling_trigger_description_py3.py deleted file mode 100644 index 1ace26b8..00000000 --- a/customSDK/servicefabric/models/scaling_trigger_description_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ScalingTriggerDescription(Model): - """Describes the trigger for performing a scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AveragePartitionLoadScalingTrigger, - AverageServiceLoadScalingTrigger - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AveragePartitionLoad': 'AveragePartitionLoadScalingTrigger', 'AverageServiceLoad': 'AverageServiceLoadScalingTrigger'} - } - - def __init__(self, **kwargs) -> None: - super(ScalingTriggerDescription, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/secondary_active_replicator_status.py b/customSDK/servicefabric/models/secondary_active_replicator_status.py deleted file mode 100644 index cd688dda..00000000 --- a/customSDK/servicefabric/models/secondary_active_replicator_status.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .secondary_replicator_status import SecondaryReplicatorStatus - - -class SecondaryActiveReplicatorStatus(SecondaryReplicatorStatus): - """Status of the secondary replicator when it is in active mode and is part of - the replica set. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param replication_queue_status: Details about the replication queue on - the secondary replicator. - :type replication_queue_status: - ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_replication_operation_received_time_utc: The last time-stamp - (UTC) at which a replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation - message was never received. - :type last_replication_operation_received_time_utc: datetime - :param is_in_build: Value that indicates whether the replica is currently - being built. - :type is_in_build: bool - :param copy_queue_status: Details about the copy queue on the secondary - replicator. - :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at - which a copy operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation - message was never received. - :type last_copy_operation_received_time_utc: datetime - :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at - which an acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment - message was never sent. - :type last_acknowledgement_sent_time_utc: datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SecondaryActiveReplicatorStatus, self).__init__(**kwargs) - self.kind = 'ActiveSecondary' diff --git a/customSDK/servicefabric/models/secondary_active_replicator_status_py3.py b/customSDK/servicefabric/models/secondary_active_replicator_status_py3.py deleted file mode 100644 index 4449ac06..00000000 --- a/customSDK/servicefabric/models/secondary_active_replicator_status_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .secondary_replicator_status_py3 import SecondaryReplicatorStatus - - -class SecondaryActiveReplicatorStatus(SecondaryReplicatorStatus): - """Status of the secondary replicator when it is in active mode and is part of - the replica set. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param replication_queue_status: Details about the replication queue on - the secondary replicator. - :type replication_queue_status: - ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_replication_operation_received_time_utc: The last time-stamp - (UTC) at which a replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation - message was never received. - :type last_replication_operation_received_time_utc: datetime - :param is_in_build: Value that indicates whether the replica is currently - being built. - :type is_in_build: bool - :param copy_queue_status: Details about the copy queue on the secondary - replicator. - :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at - which a copy operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation - message was never received. - :type last_copy_operation_received_time_utc: datetime - :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at - which an acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment - message was never sent. - :type last_acknowledgement_sent_time_utc: datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, *, replication_queue_status=None, last_replication_operation_received_time_utc=None, is_in_build: bool=None, copy_queue_status=None, last_copy_operation_received_time_utc=None, last_acknowledgement_sent_time_utc=None, **kwargs) -> None: - super(SecondaryActiveReplicatorStatus, self).__init__(replication_queue_status=replication_queue_status, last_replication_operation_received_time_utc=last_replication_operation_received_time_utc, is_in_build=is_in_build, copy_queue_status=copy_queue_status, last_copy_operation_received_time_utc=last_copy_operation_received_time_utc, last_acknowledgement_sent_time_utc=last_acknowledgement_sent_time_utc, **kwargs) - self.kind = 'ActiveSecondary' diff --git a/customSDK/servicefabric/models/secondary_idle_replicator_status.py b/customSDK/servicefabric/models/secondary_idle_replicator_status.py deleted file mode 100644 index c74ee00a..00000000 --- a/customSDK/servicefabric/models/secondary_idle_replicator_status.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .secondary_replicator_status import SecondaryReplicatorStatus - - -class SecondaryIdleReplicatorStatus(SecondaryReplicatorStatus): - """Status of the secondary replicator when it is in idle mode and is being - built by the primary. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param replication_queue_status: Details about the replication queue on - the secondary replicator. - :type replication_queue_status: - ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_replication_operation_received_time_utc: The last time-stamp - (UTC) at which a replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation - message was never received. - :type last_replication_operation_received_time_utc: datetime - :param is_in_build: Value that indicates whether the replica is currently - being built. - :type is_in_build: bool - :param copy_queue_status: Details about the copy queue on the secondary - replicator. - :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at - which a copy operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation - message was never received. - :type last_copy_operation_received_time_utc: datetime - :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at - which an acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment - message was never sent. - :type last_acknowledgement_sent_time_utc: datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SecondaryIdleReplicatorStatus, self).__init__(**kwargs) - self.kind = 'IdleSecondary' diff --git a/customSDK/servicefabric/models/secondary_idle_replicator_status_py3.py b/customSDK/servicefabric/models/secondary_idle_replicator_status_py3.py deleted file mode 100644 index 3458cc34..00000000 --- a/customSDK/servicefabric/models/secondary_idle_replicator_status_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .secondary_replicator_status_py3 import SecondaryReplicatorStatus - - -class SecondaryIdleReplicatorStatus(SecondaryReplicatorStatus): - """Status of the secondary replicator when it is in idle mode and is being - built by the primary. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param replication_queue_status: Details about the replication queue on - the secondary replicator. - :type replication_queue_status: - ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_replication_operation_received_time_utc: The last time-stamp - (UTC) at which a replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation - message was never received. - :type last_replication_operation_received_time_utc: datetime - :param is_in_build: Value that indicates whether the replica is currently - being built. - :type is_in_build: bool - :param copy_queue_status: Details about the copy queue on the secondary - replicator. - :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at - which a copy operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation - message was never received. - :type last_copy_operation_received_time_utc: datetime - :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at - which an acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment - message was never sent. - :type last_acknowledgement_sent_time_utc: datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - def __init__(self, *, replication_queue_status=None, last_replication_operation_received_time_utc=None, is_in_build: bool=None, copy_queue_status=None, last_copy_operation_received_time_utc=None, last_acknowledgement_sent_time_utc=None, **kwargs) -> None: - super(SecondaryIdleReplicatorStatus, self).__init__(replication_queue_status=replication_queue_status, last_replication_operation_received_time_utc=last_replication_operation_received_time_utc, is_in_build=is_in_build, copy_queue_status=copy_queue_status, last_copy_operation_received_time_utc=last_copy_operation_received_time_utc, last_acknowledgement_sent_time_utc=last_acknowledgement_sent_time_utc, **kwargs) - self.kind = 'IdleSecondary' diff --git a/customSDK/servicefabric/models/secondary_replicator_status.py b/customSDK/servicefabric/models/secondary_replicator_status.py deleted file mode 100644 index 53744ac5..00000000 --- a/customSDK/servicefabric/models/secondary_replicator_status.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replicator_status import ReplicatorStatus - - -class SecondaryReplicatorStatus(ReplicatorStatus): - """Provides statistics about the Service Fabric Replicator, when it is - functioning in a ActiveSecondary role. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SecondaryActiveReplicatorStatus, - SecondaryIdleReplicatorStatus - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param replication_queue_status: Details about the replication queue on - the secondary replicator. - :type replication_queue_status: - ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_replication_operation_received_time_utc: The last time-stamp - (UTC) at which a replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation - message was never received. - :type last_replication_operation_received_time_utc: datetime - :param is_in_build: Value that indicates whether the replica is currently - being built. - :type is_in_build: bool - :param copy_queue_status: Details about the copy queue on the secondary - replicator. - :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at - which a copy operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation - message was never received. - :type last_copy_operation_received_time_utc: datetime - :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at - which an acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment - message was never sent. - :type last_acknowledgement_sent_time_utc: datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - _subtype_map = { - 'kind': {'ActiveSecondary': 'SecondaryActiveReplicatorStatus', 'IdleSecondary': 'SecondaryIdleReplicatorStatus'} - } - - def __init__(self, **kwargs): - super(SecondaryReplicatorStatus, self).__init__(**kwargs) - self.replication_queue_status = kwargs.get('replication_queue_status', None) - self.last_replication_operation_received_time_utc = kwargs.get('last_replication_operation_received_time_utc', None) - self.is_in_build = kwargs.get('is_in_build', None) - self.copy_queue_status = kwargs.get('copy_queue_status', None) - self.last_copy_operation_received_time_utc = kwargs.get('last_copy_operation_received_time_utc', None) - self.last_acknowledgement_sent_time_utc = kwargs.get('last_acknowledgement_sent_time_utc', None) - self.kind = 'SecondaryReplicatorStatus' diff --git a/customSDK/servicefabric/models/secondary_replicator_status_py3.py b/customSDK/servicefabric/models/secondary_replicator_status_py3.py deleted file mode 100644 index 3111c98e..00000000 --- a/customSDK/servicefabric/models/secondary_replicator_status_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replicator_status_py3 import ReplicatorStatus - - -class SecondaryReplicatorStatus(ReplicatorStatus): - """Provides statistics about the Service Fabric Replicator, when it is - functioning in a ActiveSecondary role. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SecondaryActiveReplicatorStatus, - SecondaryIdleReplicatorStatus - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param replication_queue_status: Details about the replication queue on - the secondary replicator. - :type replication_queue_status: - ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_replication_operation_received_time_utc: The last time-stamp - (UTC) at which a replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation - message was never received. - :type last_replication_operation_received_time_utc: datetime - :param is_in_build: Value that indicates whether the replica is currently - being built. - :type is_in_build: bool - :param copy_queue_status: Details about the copy queue on the secondary - replicator. - :type copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :param last_copy_operation_received_time_utc: The last time-stamp (UTC) at - which a copy operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation - message was never received. - :type last_copy_operation_received_time_utc: datetime - :param last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at - which an acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment - message was never sent. - :type last_acknowledgement_sent_time_utc: datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - _subtype_map = { - 'kind': {'ActiveSecondary': 'SecondaryActiveReplicatorStatus', 'IdleSecondary': 'SecondaryIdleReplicatorStatus'} - } - - def __init__(self, *, replication_queue_status=None, last_replication_operation_received_time_utc=None, is_in_build: bool=None, copy_queue_status=None, last_copy_operation_received_time_utc=None, last_acknowledgement_sent_time_utc=None, **kwargs) -> None: - super(SecondaryReplicatorStatus, self).__init__(**kwargs) - self.replication_queue_status = replication_queue_status - self.last_replication_operation_received_time_utc = last_replication_operation_received_time_utc - self.is_in_build = is_in_build - self.copy_queue_status = copy_queue_status - self.last_copy_operation_received_time_utc = last_copy_operation_received_time_utc - self.last_acknowledgement_sent_time_utc = last_acknowledgement_sent_time_utc - self.kind = 'SecondaryReplicatorStatus' diff --git a/customSDK/servicefabric/models/secret_resource_description.py b/customSDK/servicefabric/models/secret_resource_description.py deleted file mode 100644 index a4e41012..00000000 --- a/customSDK/servicefabric/models/secret_resource_description.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecretResourceDescription(Model): - """This type describes a secret resource. - - All required parameters must be populated in order to send to Azure. - - :param properties: Required. Describes the properties of a secret - resource. - :type properties: ~azure.servicefabric.models.SecretResourceProperties - :param name: Required. Name of the Secret resource. - :type name: str - """ - - _validation = { - 'properties': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'SecretResourceProperties'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecretResourceDescription, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/secret_resource_description_py3.py b/customSDK/servicefabric/models/secret_resource_description_py3.py deleted file mode 100644 index c31454aa..00000000 --- a/customSDK/servicefabric/models/secret_resource_description_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecretResourceDescription(Model): - """This type describes a secret resource. - - All required parameters must be populated in order to send to Azure. - - :param properties: Required. Describes the properties of a secret - resource. - :type properties: ~azure.servicefabric.models.SecretResourceProperties - :param name: Required. Name of the Secret resource. - :type name: str - """ - - _validation = { - 'properties': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'SecretResourceProperties'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, properties, name: str, **kwargs) -> None: - super(SecretResourceDescription, self).__init__(**kwargs) - self.properties = properties - self.name = name diff --git a/customSDK/servicefabric/models/secret_resource_properties.py b/customSDK/servicefabric/models/secret_resource_properties.py deleted file mode 100644 index 84868c39..00000000 --- a/customSDK/servicefabric/models/secret_resource_properties.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .secret_resource_properties_base import SecretResourcePropertiesBase - - -class SecretResourceProperties(SecretResourcePropertiesBase): - """Describes the properties of a secret resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: InlinedValueSecretResourceProperties - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param description: User readable description of the secret. - :type description: str - :ivar status: Status of the resource. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the secret. - :vartype status_details: str - :param content_type: The type of the content stored in the secret value. - The value of this property is opaque to Service Fabric. Once set, the - value of this property cannot be changed. - :type content_type: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'inlinedValue': 'InlinedValueSecretResourceProperties'} - } - - def __init__(self, **kwargs): - super(SecretResourceProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.status = None - self.status_details = None - self.content_type = kwargs.get('content_type', None) - self.kind = 'SecretResourceProperties' diff --git a/customSDK/servicefabric/models/secret_resource_properties_base.py b/customSDK/servicefabric/models/secret_resource_properties_base.py deleted file mode 100644 index ac72b82d..00000000 --- a/customSDK/servicefabric/models/secret_resource_properties_base.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecretResourcePropertiesBase(Model): - """This type describes the properties of a secret resource, including its - kind. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SecretResourceProperties - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'SecretResourceProperties': 'SecretResourceProperties'} - } - - def __init__(self, **kwargs): - super(SecretResourcePropertiesBase, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/secret_resource_properties_base_py3.py b/customSDK/servicefabric/models/secret_resource_properties_base_py3.py deleted file mode 100644 index d0044f2e..00000000 --- a/customSDK/servicefabric/models/secret_resource_properties_base_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecretResourcePropertiesBase(Model): - """This type describes the properties of a secret resource, including its - kind. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SecretResourceProperties - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'SecretResourceProperties': 'SecretResourceProperties'} - } - - def __init__(self, **kwargs) -> None: - super(SecretResourcePropertiesBase, self).__init__(**kwargs) - self.kind = None diff --git a/customSDK/servicefabric/models/secret_resource_properties_py3.py b/customSDK/servicefabric/models/secret_resource_properties_py3.py deleted file mode 100644 index f49f3442..00000000 --- a/customSDK/servicefabric/models/secret_resource_properties_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .secret_resource_properties_base_py3 import SecretResourcePropertiesBase - - -class SecretResourceProperties(SecretResourcePropertiesBase): - """Describes the properties of a secret resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: InlinedValueSecretResourceProperties - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param description: User readable description of the secret. - :type description: str - :ivar status: Status of the resource. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the secret. - :vartype status_details: str - :param content_type: The type of the content stored in the secret value. - The value of this property is opaque to Service Fabric. Once set, the - value of this property cannot be changed. - :type content_type: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'inlinedValue': 'InlinedValueSecretResourceProperties'} - } - - def __init__(self, *, description: str=None, content_type: str=None, **kwargs) -> None: - super(SecretResourceProperties, self).__init__(**kwargs) - self.description = description - self.status = None - self.status_details = None - self.content_type = content_type - self.kind = 'SecretResourceProperties' diff --git a/customSDK/servicefabric/models/secret_value.py b/customSDK/servicefabric/models/secret_value.py deleted file mode 100644 index d7f63258..00000000 --- a/customSDK/servicefabric/models/secret_value.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecretValue(Model): - """This type represents the unencrypted value of the secret. - - :param value: The actual value of the secret. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecretValue, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/secret_value_properties.py b/customSDK/servicefabric/models/secret_value_properties.py deleted file mode 100644 index 2d26acf9..00000000 --- a/customSDK/servicefabric/models/secret_value_properties.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecretValueProperties(Model): - """This type describes properties of secret value resource. - - :param value: The actual value of the secret. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecretValueProperties, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/secret_value_properties_py3.py b/customSDK/servicefabric/models/secret_value_properties_py3.py deleted file mode 100644 index 4b422eb9..00000000 --- a/customSDK/servicefabric/models/secret_value_properties_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecretValueProperties(Model): - """This type describes properties of secret value resource. - - :param value: The actual value of the secret. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, **kwargs) -> None: - super(SecretValueProperties, self).__init__(**kwargs) - self.value = value diff --git a/customSDK/servicefabric/models/secret_value_py3.py b/customSDK/servicefabric/models/secret_value_py3.py deleted file mode 100644 index d196402e..00000000 --- a/customSDK/servicefabric/models/secret_value_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecretValue(Model): - """This type represents the unencrypted value of the secret. - - :param value: The actual value of the secret. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, **kwargs) -> None: - super(SecretValue, self).__init__(**kwargs) - self.value = value diff --git a/customSDK/servicefabric/models/secret_value_resource_description.py b/customSDK/servicefabric/models/secret_value_resource_description.py deleted file mode 100644 index 35809565..00000000 --- a/customSDK/servicefabric/models/secret_value_resource_description.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecretValueResourceDescription(Model): - """This type describes a value of a secret resource. The name of this resource - is the version identifier corresponding to this secret value. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Version identifier of the secret value. - :type name: str - :param value: The actual value of the secret. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SecretValueResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/secret_value_resource_description_py3.py b/customSDK/servicefabric/models/secret_value_resource_description_py3.py deleted file mode 100644 index 70866a93..00000000 --- a/customSDK/servicefabric/models/secret_value_resource_description_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SecretValueResourceDescription(Model): - """This type describes a value of a secret resource. The name of this resource - is the version identifier corresponding to this secret value. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Version identifier of the secret value. - :type name: str - :param value: The actual value of the secret. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str=None, **kwargs) -> None: - super(SecretValueResourceDescription, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/customSDK/servicefabric/models/seed_node_safety_check.py b/customSDK/servicefabric/models/seed_node_safety_check.py deleted file mode 100644 index 5294f779..00000000 --- a/customSDK/servicefabric/models/seed_node_safety_check.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .safety_check import SafetyCheck - - -class SeedNodeSafetyCheck(SafetyCheck): - """Represents a safety check for the seed nodes being performed by service - fabric before continuing with node level operations. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SeedNodeSafetyCheck, self).__init__(**kwargs) - self.kind = 'EnsureSeedNodeQuorum' diff --git a/customSDK/servicefabric/models/seed_node_safety_check_py3.py b/customSDK/servicefabric/models/seed_node_safety_check_py3.py deleted file mode 100644 index 4e290120..00000000 --- a/customSDK/servicefabric/models/seed_node_safety_check_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .safety_check_py3 import SafetyCheck - - -class SeedNodeSafetyCheck(SafetyCheck): - """Represents a safety check for the seed nodes being performed by service - fabric before continuing with node level operations. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SeedNodeSafetyCheck, self).__init__(**kwargs) - self.kind = 'EnsureSeedNodeQuorum' diff --git a/customSDK/servicefabric/models/selected_partition.py b/customSDK/servicefabric/models/selected_partition.py deleted file mode 100644 index c94ea8fd..00000000 --- a/customSDK/servicefabric/models/selected_partition.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SelectedPartition(Model): - """This class returns information about the partition that the user-induced - operation acted upon. - - :param service_name: The name of the service the partition belongs to. - :type service_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SelectedPartition, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) diff --git a/customSDK/servicefabric/models/selected_partition_py3.py b/customSDK/servicefabric/models/selected_partition_py3.py deleted file mode 100644 index 20c94330..00000000 --- a/customSDK/servicefabric/models/selected_partition_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SelectedPartition(Model): - """This class returns information about the partition that the user-induced - operation acted upon. - - :param service_name: The name of the service the partition belongs to. - :type service_name: str - :param partition_id: An internal ID used by Service Fabric to uniquely - identify a partition. This is a randomly generated GUID when the service - was created. The partition ID is unique and does not change for the - lifetime of the service. If the same service was deleted and recreated the - IDs of its partitions would be different. - :type partition_id: str - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, service_name: str=None, partition_id: str=None, **kwargs) -> None: - super(SelectedPartition, self).__init__(**kwargs) - self.service_name = service_name - self.partition_id = partition_id diff --git a/customSDK/servicefabric/models/service_backup_configuration_info.py b/customSDK/servicefabric/models/service_backup_configuration_info.py deleted file mode 100644 index 7ee1cd77..00000000 --- a/customSDK/servicefabric/models/service_backup_configuration_info.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_configuration_info import BackupConfigurationInfo - - -class ServiceBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information for a specific Service Fabric service - specifying what backup policy is being applied and suspend description, if - any. - - All required parameters must be populated in order to send to Azure. - - :param policy_name: The name of the backup policy which is applicable to - this Service Fabric application or service or partition. - :type policy_name: str - :param policy_inherited_from: Specifies the scope at which the backup - policy is applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type policy_inherited_from: str or - ~azure.servicefabric.models.BackupPolicyScope - :param suspension_info: Describes the backup suspension details. - :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :param kind: Required. Constant filled by server. - :type kind: str - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceBackupConfigurationInfo, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.kind = 'Service' diff --git a/customSDK/servicefabric/models/service_backup_configuration_info_py3.py b/customSDK/servicefabric/models/service_backup_configuration_info_py3.py deleted file mode 100644 index 5d708f47..00000000 --- a/customSDK/servicefabric/models/service_backup_configuration_info_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_configuration_info_py3 import BackupConfigurationInfo - - -class ServiceBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information for a specific Service Fabric service - specifying what backup policy is being applied and suspend description, if - any. - - All required parameters must be populated in order to send to Azure. - - :param policy_name: The name of the backup policy which is applicable to - this Service Fabric application or service or partition. - :type policy_name: str - :param policy_inherited_from: Specifies the scope at which the backup - policy is applied. Possible values include: 'Invalid', 'Partition', - 'Service', 'Application' - :type policy_inherited_from: str or - ~azure.servicefabric.models.BackupPolicyScope - :param suspension_info: Describes the backup suspension details. - :type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :param kind: Required. Constant filled by server. - :type kind: str - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, service_name: str=None, **kwargs) -> None: - super(ServiceBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) - self.service_name = service_name - self.kind = 'Service' diff --git a/customSDK/servicefabric/models/service_backup_entity.py b/customSDK/servicefabric/models/service_backup_entity.py deleted file mode 100644 index 3dbc91f4..00000000 --- a/customSDK/servicefabric/models/service_backup_entity.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_entity import BackupEntity - - -class ServiceBackupEntity(BackupEntity): - """Identifies the Service Fabric stateful service which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :param entity_kind: Required. Constant filled by server. - :type entity_kind: str - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceBackupEntity, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.entity_kind = 'Service' diff --git a/customSDK/servicefabric/models/service_backup_entity_py3.py b/customSDK/servicefabric/models/service_backup_entity_py3.py deleted file mode 100644 index 66f6036d..00000000 --- a/customSDK/servicefabric/models/service_backup_entity_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_entity_py3 import BackupEntity - - -class ServiceBackupEntity(BackupEntity): - """Identifies the Service Fabric stateful service which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :param entity_kind: Required. Constant filled by server. - :type entity_kind: str - :param service_name: The full name of the service with 'fabric:' URI - scheme. - :type service_name: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__(self, *, service_name: str=None, **kwargs) -> None: - super(ServiceBackupEntity, self).__init__(**kwargs) - self.service_name = service_name - self.entity_kind = 'Service' diff --git a/customSDK/servicefabric/models/service_correlation_description.py b/customSDK/servicefabric/models/service_correlation_description.py deleted file mode 100644 index 46e9abaa..00000000 --- a/customSDK/servicefabric/models/service_correlation_description.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceCorrelationDescription(Model): - """Creates a particular correlation between services. - - All required parameters must be populated in order to send to Azure. - - :param scheme: Required. The ServiceCorrelationScheme which describes the - relationship between this service and the service specified via - ServiceName. Possible values include: 'Invalid', 'Affinity', - 'AlignedAffinity', 'NonAlignedAffinity' - :type scheme: str or ~azure.servicefabric.models.ServiceCorrelationScheme - :param service_name: Required. The name of the service that the - correlation relationship is established with. - :type service_name: str - """ - - _validation = { - 'scheme': {'required': True}, - 'service_name': {'required': True}, - } - - _attribute_map = { - 'scheme': {'key': 'Scheme', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceCorrelationDescription, self).__init__(**kwargs) - self.scheme = kwargs.get('scheme', None) - self.service_name = kwargs.get('service_name', None) diff --git a/customSDK/servicefabric/models/service_correlation_description_py3.py b/customSDK/servicefabric/models/service_correlation_description_py3.py deleted file mode 100644 index d72db912..00000000 --- a/customSDK/servicefabric/models/service_correlation_description_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceCorrelationDescription(Model): - """Creates a particular correlation between services. - - All required parameters must be populated in order to send to Azure. - - :param scheme: Required. The ServiceCorrelationScheme which describes the - relationship between this service and the service specified via - ServiceName. Possible values include: 'Invalid', 'Affinity', - 'AlignedAffinity', 'NonAlignedAffinity' - :type scheme: str or ~azure.servicefabric.models.ServiceCorrelationScheme - :param service_name: Required. The name of the service that the - correlation relationship is established with. - :type service_name: str - """ - - _validation = { - 'scheme': {'required': True}, - 'service_name': {'required': True}, - } - - _attribute_map = { - 'scheme': {'key': 'Scheme', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__(self, *, scheme, service_name: str, **kwargs) -> None: - super(ServiceCorrelationDescription, self).__init__(**kwargs) - self.scheme = scheme - self.service_name = service_name diff --git a/customSDK/servicefabric/models/service_created_event.py b/customSDK/servicefabric/models/service_created_event.py deleted file mode 100644 index 33d46d28..00000000 --- a/customSDK/servicefabric/models/service_created_event.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_event import ServiceEvent - - -class ServiceCreatedEvent(ServiceEvent): - """Service Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param service_type_name: Required. Service type name. - :type service_type_name: str - :param application_name: Required. Application name. - :type application_name: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param service_instance: Required. Id of Service instance. - :type service_instance: long - :param is_stateful: Required. Indicates if Service is stateful. - :type is_stateful: bool - :param partition_count: Required. Number of partitions. - :type partition_count: int - :param target_replica_set_size: Required. Size of target replicas set. - :type target_replica_set_size: int - :param min_replica_set_size: Required. Minimum size of replicas set. - :type min_replica_set_size: int - :param service_package_version: Required. Version of Service package. - :type service_package_version: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'service_type_name': {'required': True}, - 'application_name': {'required': True}, - 'application_type_name': {'required': True}, - 'service_instance': {'required': True}, - 'is_stateful': {'required': True}, - 'partition_count': {'required': True}, - 'target_replica_set_size': {'required': True}, - 'min_replica_set_size': {'required': True}, - 'service_package_version': {'required': True}, - 'partition_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceCreatedEvent, self).__init__(**kwargs) - self.service_type_name = kwargs.get('service_type_name', None) - self.application_name = kwargs.get('application_name', None) - self.application_type_name = kwargs.get('application_type_name', None) - self.service_instance = kwargs.get('service_instance', None) - self.is_stateful = kwargs.get('is_stateful', None) - self.partition_count = kwargs.get('partition_count', None) - self.target_replica_set_size = kwargs.get('target_replica_set_size', None) - self.min_replica_set_size = kwargs.get('min_replica_set_size', None) - self.service_package_version = kwargs.get('service_package_version', None) - self.partition_id = kwargs.get('partition_id', None) - self.kind = 'ServiceCreated' diff --git a/customSDK/servicefabric/models/service_created_event_py3.py b/customSDK/servicefabric/models/service_created_event_py3.py deleted file mode 100644 index 1843c859..00000000 --- a/customSDK/servicefabric/models/service_created_event_py3.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_event_py3 import ServiceEvent - - -class ServiceCreatedEvent(ServiceEvent): - """Service Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param service_type_name: Required. Service type name. - :type service_type_name: str - :param application_name: Required. Application name. - :type application_name: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param service_instance: Required. Id of Service instance. - :type service_instance: long - :param is_stateful: Required. Indicates if Service is stateful. - :type is_stateful: bool - :param partition_count: Required. Number of partitions. - :type partition_count: int - :param target_replica_set_size: Required. Size of target replicas set. - :type target_replica_set_size: int - :param min_replica_set_size: Required. Minimum size of replicas set. - :type min_replica_set_size: int - :param service_package_version: Required. Version of Service package. - :type service_package_version: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'service_type_name': {'required': True}, - 'application_name': {'required': True}, - 'application_type_name': {'required': True}, - 'service_instance': {'required': True}, - 'is_stateful': {'required': True}, - 'partition_count': {'required': True}, - 'target_replica_set_size': {'required': True}, - 'min_replica_set_size': {'required': True}, - 'service_package_version': {'required': True}, - 'partition_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, service_type_name: str, application_name: str, application_type_name: str, service_instance: int, is_stateful: bool, partition_count: int, target_replica_set_size: int, min_replica_set_size: int, service_package_version: str, partition_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ServiceCreatedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) - self.service_type_name = service_type_name - self.application_name = application_name - self.application_type_name = application_type_name - self.service_instance = service_instance - self.is_stateful = is_stateful - self.partition_count = partition_count - self.target_replica_set_size = target_replica_set_size - self.min_replica_set_size = min_replica_set_size - self.service_package_version = service_package_version - self.partition_id = partition_id - self.kind = 'ServiceCreated' diff --git a/customSDK/servicefabric/models/service_deleted_event.py b/customSDK/servicefabric/models/service_deleted_event.py deleted file mode 100644 index 7b7642f8..00000000 --- a/customSDK/servicefabric/models/service_deleted_event.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_event import ServiceEvent - - -class ServiceDeletedEvent(ServiceEvent): - """Service Deleted event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param service_type_name: Required. Service type name. - :type service_type_name: str - :param application_name: Required. Application name. - :type application_name: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param service_instance: Required. Id of Service instance. - :type service_instance: long - :param is_stateful: Required. Indicates if Service is stateful. - :type is_stateful: bool - :param partition_count: Required. Number of partitions. - :type partition_count: int - :param target_replica_set_size: Required. Size of target replicas set. - :type target_replica_set_size: int - :param min_replica_set_size: Required. Minimum size of replicas set. - :type min_replica_set_size: int - :param service_package_version: Required. Version of Service package. - :type service_package_version: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'service_type_name': {'required': True}, - 'application_name': {'required': True}, - 'application_type_name': {'required': True}, - 'service_instance': {'required': True}, - 'is_stateful': {'required': True}, - 'partition_count': {'required': True}, - 'target_replica_set_size': {'required': True}, - 'min_replica_set_size': {'required': True}, - 'service_package_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceDeletedEvent, self).__init__(**kwargs) - self.service_type_name = kwargs.get('service_type_name', None) - self.application_name = kwargs.get('application_name', None) - self.application_type_name = kwargs.get('application_type_name', None) - self.service_instance = kwargs.get('service_instance', None) - self.is_stateful = kwargs.get('is_stateful', None) - self.partition_count = kwargs.get('partition_count', None) - self.target_replica_set_size = kwargs.get('target_replica_set_size', None) - self.min_replica_set_size = kwargs.get('min_replica_set_size', None) - self.service_package_version = kwargs.get('service_package_version', None) - self.kind = 'ServiceDeleted' diff --git a/customSDK/servicefabric/models/service_deleted_event_py3.py b/customSDK/servicefabric/models/service_deleted_event_py3.py deleted file mode 100644 index 58357e38..00000000 --- a/customSDK/servicefabric/models/service_deleted_event_py3.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_event_py3 import ServiceEvent - - -class ServiceDeletedEvent(ServiceEvent): - """Service Deleted event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param service_type_name: Required. Service type name. - :type service_type_name: str - :param application_name: Required. Application name. - :type application_name: str - :param application_type_name: Required. Application type name. - :type application_type_name: str - :param service_instance: Required. Id of Service instance. - :type service_instance: long - :param is_stateful: Required. Indicates if Service is stateful. - :type is_stateful: bool - :param partition_count: Required. Number of partitions. - :type partition_count: int - :param target_replica_set_size: Required. Size of target replicas set. - :type target_replica_set_size: int - :param min_replica_set_size: Required. Minimum size of replicas set. - :type min_replica_set_size: int - :param service_package_version: Required. Version of Service package. - :type service_package_version: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'service_type_name': {'required': True}, - 'application_name': {'required': True}, - 'application_type_name': {'required': True}, - 'service_instance': {'required': True}, - 'is_stateful': {'required': True}, - 'partition_count': {'required': True}, - 'target_replica_set_size': {'required': True}, - 'min_replica_set_size': {'required': True}, - 'service_package_version': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, service_type_name: str, application_name: str, application_type_name: str, service_instance: int, is_stateful: bool, partition_count: int, target_replica_set_size: int, min_replica_set_size: int, service_package_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ServiceDeletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) - self.service_type_name = service_type_name - self.application_name = application_name - self.application_type_name = application_type_name - self.service_instance = service_instance - self.is_stateful = is_stateful - self.partition_count = partition_count - self.target_replica_set_size = target_replica_set_size - self.min_replica_set_size = min_replica_set_size - self.service_package_version = service_package_version - self.kind = 'ServiceDeleted' diff --git a/customSDK/servicefabric/models/service_description.py b/customSDK/servicefabric/models/service_description.py deleted file mode 100644 index 77cdb09f..00000000 --- a/customSDK/servicefabric/models/service_description.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceDescription(Model): - """A ServiceDescription contains all of the information necessary to create a - service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceDescription, StatelessServiceDescription - - All required parameters must be populated in order to send to Azure. - - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_name: Required. The full name of the service with 'fabric:' - URI scheme. - :type service_name: str - :param service_type_name: Required. Name of the service type as specified - in the service manifest. - :type service_type_name: str - :param initialization_data: The initialization data as an array of bytes. - Initialization data is passed to service instances or replicas when they - are created. - :type initialization_data: list[int] - :param partition_description: Required. The partition description as an - object. - :type partition_description: - ~azure.servicefabric.models.PartitionSchemeDescription - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics. - :type service_load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param is_default_move_cost_specified: Indicates if the DefaultMoveCost - property is specified. - :type is_default_move_cost_specified: bool - :param service_package_activation_mode: The activation mode of service - package to be used for a service. Possible values include: - 'SharedProcess', 'ExclusiveProcess' - :type service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS - system service to be enabled in Service Fabric cluster. - :type service_dns_name: str - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param tags_required_to_place: Tags for placement of this service. - :type tags_required_to_place: - ~azure.servicefabric.models.NodeTagsDescription - :param tags_required_to_run: Tags for running of this service. - :type tags_required_to_run: - ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceDescription', 'Stateless': 'StatelessServiceDescription'} - } - - def __init__(self, **kwargs): - super(ServiceDescription, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.service_name = kwargs.get('service_name', None) - self.service_type_name = kwargs.get('service_type_name', None) - self.initialization_data = kwargs.get('initialization_data', None) - self.partition_description = kwargs.get('partition_description', None) - self.placement_constraints = kwargs.get('placement_constraints', None) - self.correlation_scheme = kwargs.get('correlation_scheme', None) - self.service_load_metrics = kwargs.get('service_load_metrics', None) - self.service_placement_policies = kwargs.get('service_placement_policies', None) - self.default_move_cost = kwargs.get('default_move_cost', None) - self.is_default_move_cost_specified = kwargs.get('is_default_move_cost_specified', None) - self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) - self.service_dns_name = kwargs.get('service_dns_name', None) - self.scaling_policies = kwargs.get('scaling_policies', None) - self.tags_required_to_place = kwargs.get('tags_required_to_place', None) - self.tags_required_to_run = kwargs.get('tags_required_to_run', None) - self.service_kind = None diff --git a/customSDK/servicefabric/models/service_description_py3.py b/customSDK/servicefabric/models/service_description_py3.py deleted file mode 100644 index b11ea508..00000000 --- a/customSDK/servicefabric/models/service_description_py3.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceDescription(Model): - """A ServiceDescription contains all of the information necessary to create a - service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceDescription, StatelessServiceDescription - - All required parameters must be populated in order to send to Azure. - - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_name: Required. The full name of the service with 'fabric:' - URI scheme. - :type service_name: str - :param service_type_name: Required. Name of the service type as specified - in the service manifest. - :type service_type_name: str - :param initialization_data: The initialization data as an array of bytes. - Initialization data is passed to service instances or replicas when they - are created. - :type initialization_data: list[int] - :param partition_description: Required. The partition description as an - object. - :type partition_description: - ~azure.servicefabric.models.PartitionSchemeDescription - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics. - :type service_load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param is_default_move_cost_specified: Indicates if the DefaultMoveCost - property is specified. - :type is_default_move_cost_specified: bool - :param service_package_activation_mode: The activation mode of service - package to be used for a service. Possible values include: - 'SharedProcess', 'ExclusiveProcess' - :type service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS - system service to be enabled in Service Fabric cluster. - :type service_dns_name: str - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param tags_required_to_place: Tags for placement of this service. - :type tags_required_to_place: - ~azure.servicefabric.models.NodeTagsDescription - :param tags_required_to_run: Tags for running of this service. - :type tags_required_to_run: - ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceDescription', 'Stateless': 'StatelessServiceDescription'} - } - - def __init__(self, *, service_name: str, service_type_name: str, partition_description, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, **kwargs) -> None: - super(ServiceDescription, self).__init__(**kwargs) - self.application_name = application_name - self.service_name = service_name - self.service_type_name = service_type_name - self.initialization_data = initialization_data - self.partition_description = partition_description - self.placement_constraints = placement_constraints - self.correlation_scheme = correlation_scheme - self.service_load_metrics = service_load_metrics - self.service_placement_policies = service_placement_policies - self.default_move_cost = default_move_cost - self.is_default_move_cost_specified = is_default_move_cost_specified - self.service_package_activation_mode = service_package_activation_mode - self.service_dns_name = service_dns_name - self.scaling_policies = scaling_policies - self.tags_required_to_place = tags_required_to_place - self.tags_required_to_run = tags_required_to_run - self.service_kind = None diff --git a/customSDK/servicefabric/models/service_event.py b/customSDK/servicefabric/models/service_event.py deleted file mode 100644 index 8babe820..00000000 --- a/customSDK/servicefabric/models/service_event.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .fabric_event import FabricEvent - - -class ServiceEvent(FabricEvent): - """Represents the base for all Service Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServiceCreatedEvent, ServiceDeletedEvent, - ServiceNewHealthReportEvent, ServiceHealthReportExpiredEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ServiceCreated': 'ServiceCreatedEvent', 'ServiceDeleted': 'ServiceDeletedEvent', 'ServiceNewHealthReport': 'ServiceNewHealthReportEvent', 'ServiceHealthReportExpired': 'ServiceHealthReportExpiredEvent'} - } - - def __init__(self, **kwargs): - super(ServiceEvent, self).__init__(**kwargs) - self.service_id = kwargs.get('service_id', None) - self.kind = 'ServiceEvent' diff --git a/customSDK/servicefabric/models/service_event_py3.py b/customSDK/servicefabric/models/service_event_py3.py deleted file mode 100644 index da126aba..00000000 --- a/customSDK/servicefabric/models/service_event_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .fabric_event_py3 import FabricEvent - - -class ServiceEvent(FabricEvent): - """Represents the base for all Service Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServiceCreatedEvent, ServiceDeletedEvent, - ServiceNewHealthReportEvent, ServiceHealthReportExpiredEvent - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ServiceCreated': 'ServiceCreatedEvent', 'ServiceDeleted': 'ServiceDeletedEvent', 'ServiceNewHealthReport': 'ServiceNewHealthReportEvent', 'ServiceHealthReportExpired': 'ServiceHealthReportExpiredEvent'} - } - - def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ServiceEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.service_id = service_id - self.kind = 'ServiceEvent' diff --git a/customSDK/servicefabric/models/service_fabric_client_ap_is_enums.py b/customSDK/servicefabric/models/service_fabric_client_ap_is_enums.py deleted file mode 100644 index ba2eb316..00000000 --- a/customSDK/servicefabric/models/service_fabric_client_ap_is_enums.py +++ /dev/null @@ -1,1115 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class HealthState(str, Enum): - - invalid = "Invalid" #: Indicates an invalid health state. All Service Fabric enumerations have the invalid type. The value is zero. - ok = "Ok" #: Indicates the health state is okay. The value is 1. - warning = "Warning" #: Indicates the health state is at a warning level. The value is 2. - error = "Error" #: Indicates the health state is at an error level. Error health state should be investigated, as they can impact the correct functionality of the cluster. The value is 3. - unknown = "Unknown" #: Indicates an unknown health status. The value is 65535. - - -class FabricErrorCodes(str, Enum): - - fabric_e_invalid_partition_key = "FABRIC_E_INVALID_PARTITION_KEY" - fabric_e_imagebuilder_validation_error = "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" - fabric_e_invalid_address = "FABRIC_E_INVALID_ADDRESS" - fabric_e_application_not_upgrading = "FABRIC_E_APPLICATION_NOT_UPGRADING" - fabric_e_application_upgrade_validation_error = "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" - fabric_e_fabric_not_upgrading = "FABRIC_E_FABRIC_NOT_UPGRADING" - fabric_e_fabric_upgrade_validation_error = "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" - fabric_e_invalid_configuration = "FABRIC_E_INVALID_CONFIGURATION" - fabric_e_invalid_name_uri = "FABRIC_E_INVALID_NAME_URI" - fabric_e_path_too_long = "FABRIC_E_PATH_TOO_LONG" - fabric_e_key_too_large = "FABRIC_E_KEY_TOO_LARGE" - fabric_e_service_affinity_chain_not_supported = "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" - fabric_e_invalid_atomic_group = "FABRIC_E_INVALID_ATOMIC_GROUP" - fabric_e_value_empty = "FABRIC_E_VALUE_EMPTY" - fabric_e_node_not_found = "FABRIC_E_NODE_NOT_FOUND" - fabric_e_application_type_not_found = "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" - fabric_e_application_not_found = "FABRIC_E_APPLICATION_NOT_FOUND" - fabric_e_service_type_not_found = "FABRIC_E_SERVICE_TYPE_NOT_FOUND" - fabric_e_service_does_not_exist = "FABRIC_E_SERVICE_DOES_NOT_EXIST" - fabric_e_service_type_template_not_found = "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" - fabric_e_configuration_section_not_found = "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" - fabric_e_partition_not_found = "FABRIC_E_PARTITION_NOT_FOUND" - fabric_e_replica_does_not_exist = "FABRIC_E_REPLICA_DOES_NOT_EXIST" - fabric_e_service_group_does_not_exist = "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" - fabric_e_configuration_parameter_not_found = "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" - fabric_e_directory_not_found = "FABRIC_E_DIRECTORY_NOT_FOUND" - fabric_e_fabric_version_not_found = "FABRIC_E_FABRIC_VERSION_NOT_FOUND" - fabric_e_file_not_found = "FABRIC_E_FILE_NOT_FOUND" - fabric_e_name_does_not_exist = "FABRIC_E_NAME_DOES_NOT_EXIST" - fabric_e_property_does_not_exist = "FABRIC_E_PROPERTY_DOES_NOT_EXIST" - fabric_e_enumeration_completed = "FABRIC_E_ENUMERATION_COMPLETED" - fabric_e_service_manifest_not_found = "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" - fabric_e_key_not_found = "FABRIC_E_KEY_NOT_FOUND" - fabric_e_health_entity_not_found = "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" - fabric_e_application_type_already_exists = "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" - fabric_e_application_already_exists = "FABRIC_E_APPLICATION_ALREADY_EXISTS" - fabric_e_application_already_in_target_version = "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" - fabric_e_application_type_provision_in_progress = "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" - fabric_e_application_upgrade_in_progress = "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" - fabric_e_service_already_exists = "FABRIC_E_SERVICE_ALREADY_EXISTS" - fabric_e_service_group_already_exists = "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" - fabric_e_application_type_in_use = "FABRIC_E_APPLICATION_TYPE_IN_USE" - fabric_e_fabric_already_in_target_version = "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" - fabric_e_fabric_version_already_exists = "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" - fabric_e_fabric_version_in_use = "FABRIC_E_FABRIC_VERSION_IN_USE" - fabric_e_fabric_upgrade_in_progress = "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" - fabric_e_name_already_exists = "FABRIC_E_NAME_ALREADY_EXISTS" - fabric_e_name_not_empty = "FABRIC_E_NAME_NOT_EMPTY" - fabric_e_property_check_failed = "FABRIC_E_PROPERTY_CHECK_FAILED" - fabric_e_service_metadata_mismatch = "FABRIC_E_SERVICE_METADATA_MISMATCH" - fabric_e_service_type_mismatch = "FABRIC_E_SERVICE_TYPE_MISMATCH" - fabric_e_health_stale_report = "FABRIC_E_HEALTH_STALE_REPORT" - fabric_e_sequence_number_check_failed = "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" - fabric_e_node_has_not_stopped_yet = "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" - fabric_e_instance_id_mismatch = "FABRIC_E_INSTANCE_ID_MISMATCH" - fabric_e_value_too_large = "FABRIC_E_VALUE_TOO_LARGE" - fabric_e_no_write_quorum = "FABRIC_E_NO_WRITE_QUORUM" - fabric_e_not_primary = "FABRIC_E_NOT_PRIMARY" - fabric_e_not_ready = "FABRIC_E_NOT_READY" - fabric_e_reconfiguration_pending = "FABRIC_E_RECONFIGURATION_PENDING" - fabric_e_service_offline = "FABRIC_E_SERVICE_OFFLINE" - e_abort = "E_ABORT" - fabric_e_communication_error = "FABRIC_E_COMMUNICATION_ERROR" - fabric_e_operation_not_complete = "FABRIC_E_OPERATION_NOT_COMPLETE" - fabric_e_timeout = "FABRIC_E_TIMEOUT" - fabric_e_node_is_up = "FABRIC_E_NODE_IS_UP" - e_fail = "E_FAIL" - fabric_e_backup_is_enabled = "FABRIC_E_BACKUP_IS_ENABLED" - fabric_e_restore_source_target_partition_mismatch = "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" - fabric_e_invalid_for_stateless_services = "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" - fabric_e_backup_not_enabled = "FABRIC_E_BACKUP_NOT_ENABLED" - fabric_e_backup_policy_not_existing = "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" - fabric_e_fault_analysis_service_not_existing = "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" - fabric_e_backup_in_progress = "FABRIC_E_BACKUP_IN_PROGRESS" - fabric_e_restore_in_progress = "FABRIC_E_RESTORE_IN_PROGRESS" - 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" - fabric_e_imagebuilder_reserved_directory_error = "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" - - -class ApplicationDefinitionKind(str, Enum): - - invalid = "Invalid" #: Indicates the application definition kind is invalid. All Service Fabric enumerations have the invalid type. The value is 65535. - service_fabric_application_description = "ServiceFabricApplicationDescription" #: Indicates the application is defined by a Service Fabric application description. The value is 0. - compose = "Compose" #: Indicates the application is defined by compose file(s). The value is 1. - - -class ApplicationStatus(str, Enum): - - invalid = "Invalid" #: Indicates the application status is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - ready = "Ready" #: Indicates the application status is ready. The value is 1. - upgrading = "Upgrading" #: Indicates the application status is upgrading. The value is 2. - creating = "Creating" #: Indicates the application status is creating. The value is 3. - deleting = "Deleting" #: Indicates the application status is deleting. The value is 4. - failed = "Failed" #: Indicates the creation or deletion of application was terminated due to persistent failures. Another create/delete request can be accepted to resume a failed application. The value is 5. - - -class ApplicationPackageCleanupPolicy(str, Enum): - - invalid = "Invalid" #: Indicates that the application package cleanup policy is invalid. This value is default. The value is zero. - default = "Default" #: Indicates that the cleanup policy of application packages is based on the cluster setting "CleanupApplicationPackageOnProvisionSuccess." The value is 1. - automatic = "Automatic" #: Indicates that the service fabric runtime determines when to do the application package cleanup. By default, cleanup is done on successful provision. The value is 2. - manual = "Manual" #: Indicates that the user has to explicitly clean up the application package. The value is 3. - - -class ApplicationTypeDefinitionKind(str, Enum): - - invalid = "Invalid" #: Indicates the application type definition kind is invalid. All Service Fabric enumerations have the invalid type. The value is 0. - service_fabric_application_package = "ServiceFabricApplicationPackage" #: Indicates the application type is defined and created by a Service Fabric application package provided by the user. The value is 1. - compose = "Compose" #: Indicates the application type is defined and created implicitly as part of a compose deployment. The value is 2. - - -class ApplicationTypeStatus(str, Enum): - - invalid = "Invalid" #: Indicates the application type status is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - provisioning = "Provisioning" #: Indicates that the application type is being provisioned in the cluster. The value is 1. - available = "Available" #: Indicates that the application type is fully provisioned and is available for use. An application of this type and version can be created. The value is 2. - unprovisioning = "Unprovisioning" #: Indicates that the application type is in process of being unprovisioned from the cluster. The value is 3. - failed = "Failed" #: Indicates that the application type provisioning failed and it is unavailable for use. The failure details can be obtained from the application type information query. The failed application type information remains in the cluster until it is unprovisioned or reprovisioned successfully. The value is 4. - - -class UpgradeKind(str, Enum): - - invalid = "Invalid" #: Indicates the upgrade kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - rolling = "Rolling" #: The upgrade progresses one upgrade domain at a time. The value is 1 - - -class UpgradeMode(str, Enum): - - invalid = "Invalid" #: Indicates the upgrade mode is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - unmonitored_auto = "UnmonitoredAuto" #: The upgrade will proceed automatically without performing any health monitoring. The value is 1 - unmonitored_manual = "UnmonitoredManual" #: The upgrade will stop after completing each upgrade domain, giving the opportunity to manually monitor health before proceeding. The value is 2 - monitored = "Monitored" #: The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. The value is 3 - unmonitored_deferred = "UnmonitoredDeferred" #: Perform a node-by-node upgrade. No action is performed when upgrade starts; upgrade is applied on each node when it is deactivated with intent restart or higher. The value is 4 - - -class UpgradeSortOrder(str, Enum): - - invalid = "Invalid" #: Indicates that this sort order is not valid. All Service Fabric enumerations have the invalid type. The value is 0. - default = "Default" #: Indicates that the default sort order (as specified in cluster manifest) will be used. The value is 1. - numeric = "Numeric" #: Indicates that forward numeric sort order (UD names sorted as numbers) will be used. The value is 2. - lexicographical = "Lexicographical" #: Indicates that forward lexicographical sort order (UD names sorted as strings) will be used. The value is 3. - reverse_numeric = "ReverseNumeric" #: Indicates that reverse numeric sort order (UD names sorted as numbers) will be used. The value is 4. - reverse_lexicographical = "ReverseLexicographical" #: Indicates that reverse lexicographical sort order (UD names sorted as strings) will be used. The value is 5. - - -class FailureAction(str, Enum): - - invalid = "Invalid" #: Indicates the failure action is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - rollback = "Rollback" #: The upgrade will start rolling back automatically. The value is 1 - manual = "Manual" #: The upgrade will switch to UnmonitoredManual upgrade mode. The value is 2 - - -class UpgradeDomainState(str, Enum): - - invalid = "Invalid" #: Indicates the upgrade domain state is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - pending = "Pending" #: The upgrade domain has not started upgrading yet. The value is 1 - in_progress = "InProgress" #: The upgrade domain is being upgraded but not complete yet. The value is 2 - completed = "Completed" #: The upgrade domain has completed upgrade. The value is 3 - - -class UpgradeUnitState(str, Enum): - - invalid = "Invalid" #: Indicates the upgrade unit state is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - pending = "Pending" #: The upgrade unit has not started upgrading yet. The value is 1 - in_progress = "InProgress" #: The upgrade unit is being upgraded but not complete yet. The value is 2 - completed = "Completed" #: The upgrade unit has completed upgrade. The value is 3 - failed = "Failed" #: The upgrade unit has failed to upgrade. The value is 4 - - -class UpgradeState(str, Enum): - - invalid = "Invalid" #: Indicates the upgrade state is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - rolling_back_in_progress = "RollingBackInProgress" #: The upgrade is rolling back to the previous version but is not complete yet. The value is 1 - rolling_back_completed = "RollingBackCompleted" #: The upgrade has finished rolling back. The value is 2 - rolling_forward_pending = "RollingForwardPending" #: The current upgrade domain has finished upgrading. The overall upgrade is waiting for an explicit move next request in UnmonitoredManual mode or performing health checks in Monitored mode. The value is 3 - rolling_forward_in_progress = "RollingForwardInProgress" #: The upgrade is rolling forward to the target version but is not complete yet. The value is 4 - rolling_forward_completed = "RollingForwardCompleted" #: The upgrade has finished rolling forward. The value is 5 - failed = "Failed" #: The upgrade has failed and is unable to execute FailureAction. The value is 6 - - -class NodeUpgradePhase(str, Enum): - - invalid = "Invalid" #: Indicates the upgrade state is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - pre_upgrade_safety_check = "PreUpgradeSafetyCheck" #: The upgrade has not started yet due to pending safety checks. The value is 1 - upgrading = "Upgrading" #: The upgrade is in progress. The value is 2 - post_upgrade_safety_check = "PostUpgradeSafetyCheck" #: The upgrade has completed and post upgrade safety checks are being performed. The value is 3 - - -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 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 - - -class DeactivationIntent(str, Enum): - - pause = "Pause" #: Indicates that the node should be paused. The value is 1. - restart = "Restart" #: Indicates that the intent is for the node to be restarted after a short period of time. The value is 2. - remove_data = "RemoveData" #: Indicates the intent is for the node to remove data. The value is 3. - - -class DeployedApplicationStatus(str, Enum): - - invalid = "Invalid" #: Indicates that deployment status is not valid. All Service Fabric enumerations have the invalid type. The value is zero. - downloading = "Downloading" #: Indicates that the package is downloading from the ImageStore. The value is 1. - activating = "Activating" #: Indicates that the package is activating. The value is 2. - active = "Active" #: Indicates that the package is active. The value is 3. - upgrading = "Upgrading" #: Indicates that the package is upgrading. The value is 4. - deactivating = "Deactivating" #: Indicates that the package is deactivating. The value is 5. - - -class ReplicaStatus(str, Enum): - - invalid = "Invalid" #: Indicates the replica status is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - in_build = "InBuild" #: The replica is being built. This means that a primary replica is seeding this replica. The value is 1. - standby = "Standby" #: The replica is in standby. The value is 2. - ready = "Ready" #: The replica is ready. The value is 3. - down = "Down" #: The replica is down. The value is 4. - dropped = "Dropped" #: Replica is dropped. This means that the replica has been removed from the replica set. If it is persisted, its state has been deleted. The value is 5. - - -class ReplicaRole(str, Enum): - - unknown = "Unknown" #: Indicates the initial role that a replica is created in. The value is zero. - none = "None" #: Specifies that the replica has no responsibility in regard to the replica set. The value is 1 - primary = "Primary" #: Refers to the replica in the set on which all read and write operations are complete in order to enforce strong consistency semantics. Read operations are handled directly by the Primary replica, while write operations must be acknowledged by a quorum of the replicas in the replica set. There can only be one Primary replica in a replica set at a time. The value is 2. - idle_secondary = "IdleSecondary" #: Refers to a replica in the set that receives a state transfer from the Primary replica to prepare for becoming an active Secondary replica. There can be multiple Idle Secondary replicas in a replica set at a time. Idle Secondary replicas do not count as a part of a write quorum. The value is 3. - active_secondary = "ActiveSecondary" #: Refers to a replica in the set that receives state updates from the Primary replica, applies them, and sends acknowledgements back. Secondary replicas must participate in the write quorum for a replica set. There can be multiple active Secondary replicas in a replica set at a time. The number of active Secondary replicas is configurable that the reliability subsystem should maintain. The value is 4. - idle_auxiliary = "IdleAuxiliary" #: Refers to a replica in the set that receives a state transfer from the Primary replica to prepare for becoming an ActiveAuxiliary replica. There can be multiple IdleAuxiliary replicas in a replica set at a time. IdleAuxiliary replicas do not count as a part of a write quorum. The value is 5. - active_auxiliary = "ActiveAuxiliary" #: Refers to a replica in the set that receives state updates from the Primary replica, applies them, and sends acknowledgements back. ActiveAuxiliary replicas must participate in the write quorum for a replica set. There can be multiple active ActiveAuxiliary replicas in a replica set at a time. The number of active ActiveAuxiliary replicas is configurable that the reliability subsystem should maintain. The value is 6. - primary_auxiliary = "PrimaryAuxiliary" #: Refers to the replica in the set that is used to rebuild a new Secondary replica to relinquish primary status to. It cannot field read or write requests. The value is 7. - - -class ReconfigurationPhase(str, Enum): - - unknown = "Unknown" #: Indicates the invalid reconfiguration phase. - none = "None" #: Specifies that there is no reconfiguration in progress. - phase0 = "Phase0" #: Refers to the phase where the reconfiguration is transferring data from the previous primary to the new primary. - phase1 = "Phase1" #: Refers to the phase where the reconfiguration is querying the replica set for the progress. - phase2 = "Phase2" #: Refers to the phase where the reconfiguration is ensuring that data from the current primary is present in a majority of the replica set. - phase3 = "Phase3" #: This phase is for internal use only. - phase4 = "Phase4" #: This phase is for internal use only. - abort_phase_zero = "AbortPhaseZero" #: This phase is for internal use only. - - -class ReconfigurationType(str, Enum): - - unknown = "Unknown" #: Indicates the invalid reconfiguration type. - swap_primary = "SwapPrimary" #: Specifies that the primary replica is being swapped with a different replica. - failover = "Failover" #: Reconfiguration triggered in response to a primary going down. This could be due to many reasons such as primary replica crashing etc. - other = "Other" #: Reconfigurations where the primary replica is not changing. - - -class EntityKind(str, Enum): - - invalid = "Invalid" #: Indicates an invalid entity kind. All Service Fabric enumerations have the invalid type. The value is zero. - node = "Node" #: Indicates the entity is a Service Fabric node. The value is 1. - partition = "Partition" #: Indicates the entity is a Service Fabric partition. The value is 2. - service = "Service" #: Indicates the entity is a Service Fabric service. The value is 3. - application = "Application" #: Indicates the entity is a Service Fabric application. The value is 4. - replica = "Replica" #: Indicates the entity is a Service Fabric replica. The value is 5. - deployed_application = "DeployedApplication" #: Indicates the entity is a Service Fabric deployed application. The value is 6. - deployed_service_package = "DeployedServicePackage" #: Indicates the entity is a Service Fabric deployed service package. The value is 7. - cluster = "Cluster" #: Indicates the entity is a Service Fabric cluster. The value is 8. - - -class FabricEventKind(str, Enum): - - cluster_event = "ClusterEvent" - container_instance_event = "ContainerInstanceEvent" - node_event = "NodeEvent" - application_event = "ApplicationEvent" - service_event = "ServiceEvent" - partition_event = "PartitionEvent" - replica_event = "ReplicaEvent" - partition_analysis_event = "PartitionAnalysisEvent" - application_created = "ApplicationCreated" - application_deleted = "ApplicationDeleted" - application_new_health_report = "ApplicationNewHealthReport" - application_health_report_expired = "ApplicationHealthReportExpired" - application_upgrade_completed = "ApplicationUpgradeCompleted" - application_upgrade_domain_completed = "ApplicationUpgradeDomainCompleted" - application_upgrade_rollback_completed = "ApplicationUpgradeRollbackCompleted" - application_upgrade_rollback_started = "ApplicationUpgradeRollbackStarted" - application_upgrade_started = "ApplicationUpgradeStarted" - deployed_application_new_health_report = "DeployedApplicationNewHealthReport" - deployed_application_health_report_expired = "DeployedApplicationHealthReportExpired" - application_process_exited = "ApplicationProcessExited" - application_container_instance_exited = "ApplicationContainerInstanceExited" - node_aborted = "NodeAborted" - node_added_to_cluster = "NodeAddedToCluster" - node_closed = "NodeClosed" - node_deactivate_completed = "NodeDeactivateCompleted" - node_deactivate_started = "NodeDeactivateStarted" - node_down = "NodeDown" - node_new_health_report = "NodeNewHealthReport" - node_health_report_expired = "NodeHealthReportExpired" - node_open_succeeded = "NodeOpenSucceeded" - node_open_failed = "NodeOpenFailed" - node_removed_from_cluster = "NodeRemovedFromCluster" - node_up = "NodeUp" - partition_new_health_report = "PartitionNewHealthReport" - partition_health_report_expired = "PartitionHealthReportExpired" - partition_reconfigured = "PartitionReconfigured" - partition_primary_move_analysis = "PartitionPrimaryMoveAnalysis" - service_created = "ServiceCreated" - service_deleted = "ServiceDeleted" - service_new_health_report = "ServiceNewHealthReport" - service_health_report_expired = "ServiceHealthReportExpired" - deployed_service_package_new_health_report = "DeployedServicePackageNewHealthReport" - deployed_service_package_health_report_expired = "DeployedServicePackageHealthReportExpired" - stateful_replica_new_health_report = "StatefulReplicaNewHealthReport" - stateful_replica_health_report_expired = "StatefulReplicaHealthReportExpired" - stateless_replica_new_health_report = "StatelessReplicaNewHealthReport" - stateless_replica_health_report_expired = "StatelessReplicaHealthReportExpired" - cluster_new_health_report = "ClusterNewHealthReport" - cluster_health_report_expired = "ClusterHealthReportExpired" - cluster_upgrade_completed = "ClusterUpgradeCompleted" - cluster_upgrade_domain_completed = "ClusterUpgradeDomainCompleted" - cluster_upgrade_rollback_completed = "ClusterUpgradeRollbackCompleted" - cluster_upgrade_rollback_started = "ClusterUpgradeRollbackStarted" - cluster_upgrade_started = "ClusterUpgradeStarted" - chaos_stopped = "ChaosStopped" - chaos_started = "ChaosStarted" - chaos_code_package_restart_scheduled = "ChaosCodePackageRestartScheduled" - chaos_replica_removal_scheduled = "ChaosReplicaRemovalScheduled" - chaos_partition_secondary_move_scheduled = "ChaosPartitionSecondaryMoveScheduled" - chaos_partition_primary_move_scheduled = "ChaosPartitionPrimaryMoveScheduled" - chaos_replica_restart_scheduled = "ChaosReplicaRestartScheduled" - chaos_node_restart_scheduled = "ChaosNodeRestartScheduled" - - -class HealthEvaluationKind(str, Enum): - - invalid = "Invalid" #: Indicates that the health evaluation is invalid. The value is zero. - event = "Event" #: Indicates that the health evaluation is for a health event. The value is 1. - replicas = "Replicas" #: Indicates that the health evaluation is for the replicas of a partition. The value is 2. - partitions = "Partitions" #: Indicates that the health evaluation is for the partitions of a service. The value is 3. - deployed_service_packages = "DeployedServicePackages" #: Indicates that the health evaluation is for the deployed service packages of a deployed application. The value is 4. - deployed_applications = "DeployedApplications" #: Indicates that the health evaluation is for the deployed applications of an application. The value is 5. - services = "Services" #: Indicates that the health evaluation is for services of an application. The value is 6. - nodes = "Nodes" #: Indicates that the health evaluation is for the cluster nodes. The value is 7. - applications = "Applications" #: Indicates that the health evaluation is for the cluster applications. The value is 8. - system_application = "SystemApplication" #: Indicates that the health evaluation is for the system application. The value is 9. - upgrade_domain_deployed_applications = "UpgradeDomainDeployedApplications" #: Indicates that the health evaluation is for the deployed applications of an application in an upgrade domain. The value is 10. - upgrade_domain_nodes = "UpgradeDomainNodes" #: Indicates that the health evaluation is for the cluster nodes in an upgrade domain. The value is 11. - replica = "Replica" #: Indicates that the health evaluation is for a replica. The value is 13. - partition = "Partition" #: Indicates that the health evaluation is for a partition. The value is 14. - deployed_service_package = "DeployedServicePackage" #: Indicates that the health evaluation is for a deployed service package. The value is 16. - deployed_application = "DeployedApplication" #: Indicates that the health evaluation is for a deployed application. The value is 17. - service = "Service" #: Indicates that the health evaluation is for a service. The value is 15. - node = "Node" #: Indicates that the health evaluation is for a node. The value is 12. - application = "Application" #: Indicates that the health evaluation is for an application. The value is 18. - delta_nodes_check = "DeltaNodesCheck" #: Indicates that the health evaluation is for the delta of unhealthy cluster nodes. The value is 19. - upgrade_domain_delta_nodes_check = "UpgradeDomainDeltaNodesCheck" #: Indicates that the health evaluation is for the delta of unhealthy upgrade domain cluster nodes. The value is 20. - application_type_applications = "ApplicationTypeApplications" #: – Indicates that the health evaluation is for applications of an application type. The value is 21. - node_type_nodes = "NodeTypeNodes" #: – Indicates that the health evaluation is for nodes of a node type. The value is 22. - - -class Ordering(str, Enum): - - desc = "Desc" #: Descending sort order. - asc = "Asc" #: Ascending sort order. - - -class NodeDeactivationIntent(str, Enum): - - invalid = "Invalid" #: Indicates the node deactivation intent is invalid. All Service Fabric enumerations have the invalid type. The value is zero. This value is not used. - pause = "Pause" #: Indicates that the node should be paused. The value is 1. - restart = "Restart" #: Indicates that the intent is for the node to be restarted after a short period of time. Service Fabric does not restart the node, this action is done outside of Service Fabric. The value is 2. - remove_data = "RemoveData" #: Indicates that the intent is to reimage the node. Service Fabric does not reimage the node, this action is done outside of Service Fabric. The value is 3. - remove_node = "RemoveNode" #: Indicates that the node is being decommissioned and is not expected to return. Service Fabric does not decommission the node, this action is done outside of Service Fabric. The value is 4. - - -class NodeDeactivationStatus(str, Enum): - - none = "None" #: No status is associated with the task. The value is zero. - safety_check_in_progress = "SafetyCheckInProgress" #: When a node is deactivated Service Fabric performs checks to ensure that the operation is safe to proceed to ensure availability of the service and reliability of the state. This value indicates that one or more safety checks are in progress. The value is 1. - safety_check_complete = "SafetyCheckComplete" #: When a node is deactivated Service Fabric performs checks to ensure that the operation is safe to proceed to ensure availability of the service and reliability of the state. This value indicates that all safety checks have been completed. The value is 2. - completed = "Completed" #: The task is completed. The value is 3. - - -class NodeDeactivationTaskType(str, Enum): - - invalid = "Invalid" #: Indicates the node deactivation task type is invalid. All Service Fabric enumerations have the invalid type. The value is zero. This value is not used. - infrastructure = "Infrastructure" #: Specifies the task created by Infrastructure hosting the nodes. The value is 1. - repair = "Repair" #: Specifies the task that was created by the Repair Manager service. The value is 2. - client = "Client" #: Specifies that the task was created by using the public API. The value is 3. - - -class NodeStatus(str, Enum): - - invalid = "Invalid" #: Indicates the node status is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - up = "Up" #: Indicates the node is up. The value is 1. - down = "Down" #: Indicates the node is down. The value is 2. - enabling = "Enabling" #: Indicates the node is in process of being enabled. The value is 3. - disabling = "Disabling" #: Indicates the node is in the process of being disabled. The value is 4. - disabled = "Disabled" #: Indicates the node is disabled. The value is 5. - unknown = "Unknown" #: Indicates the node is unknown. A node would be in Unknown state if Service Fabric does not have authoritative information about that node. This can happen if the system learns about a node at runtime.The value is 6. - removed = "Removed" #: Indicates the node is removed. A node would be in Removed state if NodeStateRemoved API has been called for this node. In other words, Service Fabric has been informed that the persisted state on the node has been permanently lost. The value is 7. - - -class ServicePartitionStatus(str, Enum): - - invalid = "Invalid" #: Indicates the partition status is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - ready = "Ready" #: Indicates that the partition is ready. This means that for a stateless service partition there is at least one instance that is up and for a stateful service partition the number of ready replicas is greater than or equal to the MinReplicaSetSize. The value is 1. - not_ready = "NotReady" #: Indicates that the partition is not ready. This status is returned when none of the other states apply. The value is 2. - in_quorum_loss = "InQuorumLoss" #: Indicates that the partition is in quorum loss. This means that number of replicas that are up and participating in a replica set is less than MinReplicaSetSize for this partition. The value is 3. - reconfiguring = "Reconfiguring" #: Indicates that the partition is undergoing reconfiguration of its replica sets. This can happen due to failover, upgrade, load balancing or addition or removal of replicas from the replica set. The value is 4. - deleting = "Deleting" #: Indicates that the partition is being deleted. The value is 5. - - -class ServiceStatus(str, Enum): - - unknown = "Unknown" #: Indicates the service status is unknown. The value is zero. - active = "Active" #: Indicates the service status is active. The value is 1. - upgrading = "Upgrading" #: Indicates the service is upgrading. The value is 2. - deleting = "Deleting" #: Indicates the service is being deleted. The value is 3. - creating = "Creating" #: Indicates the service is being created. The value is 4. - failed = "Failed" #: Indicates creation or deletion was terminated due to persistent failures. Another create/delete request can be accepted. The value is 5. - - -class ProvisionApplicationTypeKind(str, Enum): - - invalid = "Invalid" #: Indicates that the provision kind is invalid. This value is default and should not be used. The value is zero. - image_store_path = "ImageStorePath" #: Indicates that the provision is for a package that was previously uploaded to the image store. The value is 1. - external_store = "ExternalStore" #: Indicates that the provision is for an application package that was previously uploaded to an external store. The application package ends with the extension *.sfpkg. The value is 2. - - -class UpgradeType(str, Enum): - - invalid = "Invalid" #: Indicates the upgrade kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - rolling = "Rolling" #: The upgrade progresses one upgrade domain at a time. The value is 1. - rolling_force_restart = "Rolling_ForceRestart" #: The upgrade gets restarted by force. The value is 2. - - -class SafetyCheckKind(str, Enum): - - invalid = "Invalid" #: Indicates that the upgrade safety check kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - ensure_seed_node_quorum = "EnsureSeedNodeQuorum" #: Indicates that if we bring down the node then this will result in global seed node quorum loss. The value is 1. - ensure_partition_quorum = "EnsurePartitionQuorum" #: Indicates that there is some partition for which if we bring down the replica on the node, it will result in quorum loss for that partition. The value is 2. - wait_for_primary_placement = "WaitForPrimaryPlacement" #: Indicates that there is some replica on the node that was moved out of this node due to upgrade. Service Fabric is now waiting for the primary to be moved back to this node. The value is 3. - wait_for_primary_swap = "WaitForPrimarySwap" #: Indicates that Service Fabric is waiting for a primary replica to be moved out of the node before starting upgrade on that node. The value is 4. - wait_for_reconfiguration = "WaitForReconfiguration" #: Indicates that there is some replica on the node that is involved in a reconfiguration. Service Fabric is waiting for the reconfiguration to be complete before staring upgrade on that node. The value is 5. - wait_for_inbuild_replica = "WaitForInbuildReplica" #: Indicates that there is either a replica on the node that is going through copy, or there is a primary replica on the node that is copying data to some other replica. In both cases, bringing down the replica on the node due to upgrade will abort the copy. The value is 6. - ensure_availability = "EnsureAvailability" #: Indicates that there is either a stateless service partition on the node having exactly one instance, or there is a primary replica on the node for which the partition is quorum loss. In both cases, bringing down the replicas due to upgrade will result in loss of availability. The value is 7. - - -class CreateFabricDump(str, Enum): - - false = "False" - true = "True" - - -class ServicePackageActivationMode(str, Enum): - - shared_process = "SharedProcess" #: This is the default activation mode. With this activation mode, replicas or instances from different partition(s) of service, on a given node, will share same activation of service package on a node. The value is zero. - exclusive_process = "ExclusiveProcess" #: With this activation mode, each replica or instance of service, on a given node, will have its own dedicated activation of service package on a node. The value is 1. - - -class ServiceKind(str, Enum): - - invalid = "Invalid" #: Indicates the service kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - stateless = "Stateless" #: Does not use Service Fabric to make its state highly available or reliable. The value is 1. - stateful = "Stateful" #: Uses Service Fabric to make its state or part of its state highly available and reliable. The value is 2. - - -class ServicePartitionKind(str, Enum): - - invalid = "Invalid" #: Indicates the partition kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - singleton = "Singleton" #: Indicates that there is only one partition, and SingletonPartitionSchemeDescription was specified while creating the service. The value is 1. - int64_range = "Int64Range" #: Indicates that the partition is based on Int64 key ranges, and UniformInt64RangePartitionSchemeDescription was specified while creating the service. The value is 2. - named = "Named" #: Indicates that the partition is based on string names, and NamedPartitionInformation was specified while creating the service. The value is 3. - - -class ServicePlacementPolicyType(str, Enum): - - invalid = "Invalid" #: Indicates the type of the placement policy is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - invalid_domain = "InvalidDomain" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementInvalidDomainPolicyDescription, which indicates that a particular fault or upgrade domain cannot be used for placement of this service. The value is 1. - require_domain = "RequireDomain" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription indicating that the replicas of the service must be placed in a specific domain. The value is 2. - prefer_primary_domain = "PreferPrimaryDomain" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the Primary replica for the partitions of the service should be located in a particular domain as an optimization. The value is 3. - require_domain_distribution = "RequireDomainDistribution" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription, indicating that the system will disallow placement of any two replicas from the same partition in the same domain at any time. The value is 4. - non_partially_place_service = "NonPartiallyPlaceService" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible all replicas of a particular partition of the service should be placed atomically. The value is 5. - allow_multiple_stateless_instances_on_node = "AllowMultipleStatelessInstancesOnNode" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, which indicates that multiple stateless instances of a particular partition of the service can be placed on a node. The value is 6. - - -class ServiceLoadMetricWeight(str, Enum): - - zero = "Zero" #: Disables resource balancing for this metric. This value is zero. - low = "Low" #: Specifies the metric weight of the service load as Low. The value is 1. - medium = "Medium" #: Specifies the metric weight of the service load as Medium. The value is 2. - high = "High" #: Specifies the metric weight of the service load as High. The value is 3. - - -class HostType(str, Enum): - - invalid = "Invalid" #: Indicates the type of host is not known or invalid. The value is 0. - exe_host = "ExeHost" #: Indicates the host is an executable. The value is 1. - container_host = "ContainerHost" #: Indicates the host is a container. The value is 2. - - -class HostIsolationMode(str, Enum): - - none = "None" #: Indicates the isolation mode is not applicable for given HostType. The value is 0. - process = "Process" #: This is the default isolation mode for a ContainerHost. The value is 1. - hyper_v = "HyperV" #: Indicates the ContainerHost is a Hyper-V container. This applies to only Windows containers. The value is 2. - - -class DeploymentStatus(str, Enum): - - invalid = "Invalid" #: Indicates status of the application or service package is not known or invalid. The value is 0. - downloading = "Downloading" #: Indicates the application or service package is being downloaded to the node from the ImageStore. The value is 1. - activating = "Activating" #: Indicates the application or service package is being activated. The value is 2. - active = "Active" #: Indicates the application or service package is active the node. The value is 3. - upgrading = "Upgrading" #: Indicates the application or service package is being upgraded. The value is 4. - deactivating = "Deactivating" #: Indicates the application or service package is being deactivated. The value is 5. - ran_to_completion = "RanToCompletion" #: Indicates the application or service package has ran to completion successfully. The value is 6. - failed = "Failed" #: Indicates the application or service package has failed to run to completion. The value is 7. - - -class EntryPointStatus(str, Enum): - - invalid = "Invalid" #: Indicates status of entry point is not known or invalid. The value is 0. - pending = "Pending" #: Indicates the entry point is scheduled to be started. The value is 1. - starting = "Starting" #: Indicates the entry point is being started. The value is 2. - started = "Started" #: Indicates the entry point was started successfully and is running. The value is 3. - stopping = "Stopping" #: Indicates the entry point is being stopped. The value is 4. - stopped = "Stopped" #: Indicates the entry point is not running. The value is 5. - - -class ChaosStatus(str, Enum): - - invalid = "Invalid" #: Indicates an invalid Chaos status. All Service Fabric enumerations have the invalid type. The value is zero. - running = "Running" #: Indicates that Chaos is not stopped. The value is one. - stopped = "Stopped" #: Indicates that Chaos is not scheduling further faults. The value is two. - - -class ChaosScheduleStatus(str, Enum): - - invalid = "Invalid" #: Indicates an invalid Chaos Schedule status. All Service Fabric enumerations have the invalid type. The value is zero. - stopped = "Stopped" #: Indicates that the schedule is stopped and not being used to schedule runs of chaos. The value is one. - active = "Active" #: Indicates that the schedule is active and is being used to schedule runs of Chaos. The value is two. - expired = "Expired" #: Indicates that the schedule is expired and will no longer be used to schedule runs of Chaos. The value is three. - pending = "Pending" #: Indicates that the schedule is pending and is not yet being used to schedule runs of Chaos but will be used when the start time is passed. The value is four. - - -class ChaosEventKind(str, Enum): - - invalid = "Invalid" #: Indicates an invalid Chaos event kind. All Service Fabric enumerations have the invalid type. - started = "Started" #: Indicates a Chaos event that gets generated when Chaos is started. - executing_faults = "ExecutingFaults" #: Indicates a Chaos event that gets generated when Chaos has decided on the faults for an iteration. This Chaos event contains the details of the faults as a list of strings. - waiting = "Waiting" #: Indicates a Chaos event that gets generated when Chaos is waiting for the cluster to become ready for faulting, for example, Chaos may be waiting for the on-going upgrade to finish. - validation_failed = "ValidationFailed" #: Indicates a Chaos event that gets generated when the cluster entities do not become stable and healthy within ChaosParameters.MaxClusterStabilizationTimeoutInSeconds. - test_error = "TestError" #: Indicates a Chaos event that gets generated when an unexpected event has occurred in the Chaos engine, for example, due to the cluster snapshot being inconsistent, while faulting a faultable entity Chaos found that the entity was already faulted. - stopped = "Stopped" #: Indicates a Chaos event that gets generated when Chaos stops because either the user issued a stop or the time to run was up. - - -class ComposeDeploymentStatus(str, Enum): - - invalid = "Invalid" #: Indicates that the compose deployment status is invalid. The value is zero. - provisioning = "Provisioning" #: Indicates that the compose deployment is being provisioned in background. The value is 1. - creating = "Creating" #: Indicates that the compose deployment is being created in background. The value is 2. - ready = "Ready" #: Indicates that the compose deployment has been successfully created or upgraded. The value is 3. - unprovisioning = "Unprovisioning" #: Indicates that the compose deployment is being unprovisioned in background. The value is 4. - deleting = "Deleting" #: Indicates that the compose deployment is being deleted in background. The value is 5. - failed = "Failed" #: Indicates that the compose deployment was terminated due to persistent failures. The value is 6. - upgrading = "Upgrading" #: Indicates that the compose deployment is being upgraded in the background. The value is 7. - - -class ComposeDeploymentUpgradeState(str, Enum): - - invalid = "Invalid" #: Indicates the upgrade state is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - provisioning_target = "ProvisioningTarget" #: The upgrade is in the progress of provisioning target application type version. The value is 1. - rolling_forward_in_progress = "RollingForwardInProgress" #: The upgrade is rolling forward to the target version but is not complete yet. The value is 2. - rolling_forward_pending = "RollingForwardPending" #: The current upgrade domain has finished upgrading. The overall upgrade is waiting for an explicit move next request in UnmonitoredManual mode or performing health checks in Monitored mode. The value is 3 - unprovisioning_current = "UnprovisioningCurrent" #: The upgrade is in the progress of unprovisioning current application type version and rolling forward to the target version is completed. The value is 4. - rolling_forward_completed = "RollingForwardCompleted" #: The upgrade has finished rolling forward. The value is 5. - rolling_back_in_progress = "RollingBackInProgress" #: The upgrade is rolling back to the previous version but is not complete yet. The value is 6. - unprovisioning_target = "UnprovisioningTarget" #: The upgrade is in the progress of unprovisioning target application type version and rolling back to the current version is completed. The value is 7. - rolling_back_completed = "RollingBackCompleted" #: The upgrade has finished rolling back. The value is 8. - failed = "Failed" #: The upgrade has failed and is unable to execute FailureAction. The value is 9. - - -class ServiceCorrelationScheme(str, Enum): - - invalid = "Invalid" #: An invalid correlation scheme. Cannot be used. The value is zero. - affinity = "Affinity" #: Indicates that this service has an affinity relationship with another service. Provided for backwards compatibility, consider preferring the Aligned or NonAlignedAffinity options. The value is 1. - aligned_affinity = "AlignedAffinity" #: Aligned affinity ensures that the primaries of the partitions of the affinitized services are collocated on the same nodes. This is the default and is the same as selecting the Affinity scheme. The value is 2. - non_aligned_affinity = "NonAlignedAffinity" #: Non-Aligned affinity guarantees that all replicas of each service will be placed on the same nodes. Unlike Aligned Affinity, this does not guarantee that replicas of particular role will be collocated. The value is 3. - - -class MoveCost(str, Enum): - - zero = "Zero" #: Zero move cost. This value is zero. - low = "Low" #: Specifies the move cost of the service as Low. The value is 1. - medium = "Medium" #: Specifies the move cost of the service as Medium. The value is 2. - high = "High" #: Specifies the move cost of the service as High. The value is 3. - very_high = "VeryHigh" #: Specifies the move cost of the service as VeryHigh. The value is 4. - - -class PartitionScheme(str, Enum): - - invalid = "Invalid" #: Indicates the partition kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - singleton = "Singleton" #: Indicates that the partition is based on string names, and is a SingletonPartitionSchemeDescription object, The value is 1. - uniform_int64_range = "UniformInt64Range" #: Indicates that the partition is based on Int64 key ranges, and is a UniformInt64RangePartitionSchemeDescription object. The value is 2. - named = "Named" #: Indicates that the partition is based on string names, and is a NamedPartitionSchemeDescription object. The value is 3 - - -class ServiceOperationName(str, Enum): - - unknown = "Unknown" #: Reserved for future use. - none = "None" #: The service replica or instance is not going through any life-cycle changes. - open = "Open" #: The service replica or instance is being opened. - change_role = "ChangeRole" #: The service replica is changing roles. - close = "Close" #: The service replica or instance is being closed. - abort = "Abort" #: The service replica or instance is being aborted. - - -class ReplicatorOperationName(str, Enum): - - invalid = "Invalid" #: Default value if the replicator is not yet ready. - none = "None" #: Replicator is not running any operation from Service Fabric perspective. - open = "Open" #: Replicator is opening. - change_role = "ChangeRole" #: Replicator is in the process of changing its role. - update_epoch = "UpdateEpoch" #: Due to a change in the replica set, replicator is being updated with its Epoch. - close = "Close" #: Replicator is closing. - abort = "Abort" #: Replicator is being aborted. - on_data_loss = "OnDataLoss" #: Replicator is handling the data loss condition, where the user service may potentially be recovering state from an external source. - wait_for_catchup = "WaitForCatchup" #: Replicator is waiting for a quorum of replicas to be caught up to the latest state. - build = "Build" #: Replicator is in the process of building one or more replicas. - - -class PartitionAccessStatus(str, Enum): - - invalid = "Invalid" #: Indicates that the read or write operation access status is not valid. This value is not returned to the caller. - granted = "Granted" #: Indicates that the read or write operation access is granted and the operation is allowed. - reconfiguration_pending = "ReconfigurationPending" #: Indicates that the client should try again later, because a reconfiguration is in progress. - not_primary = "NotPrimary" #: Indicates that this client request was received by a replica that is not a Primary replica. - no_write_quorum = "NoWriteQuorum" #: Indicates that no write quorum is available and, therefore, no write operation can be accepted. - - -class FabricReplicaStatus(str, Enum): - - invalid = "Invalid" #: Indicates that the read or write operation access status is not valid. This value is not returned to the caller. - down = "Down" #: Indicates that the replica is down. - up = "Up" #: Indicates that the replica is up. - - -class ReplicaKind(str, Enum): - - invalid = "Invalid" #: Represents an invalid replica kind. The value is zero. - key_value_store = "KeyValueStore" #: Represents a key value store replica. The value is 1 - - -class ServiceTypeRegistrationStatus(str, Enum): - - invalid = "Invalid" #: Indicates the registration status is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - disabled = "Disabled" #: Indicates that the service type is disabled on this node. A type gets disabled when there are too many failures of the code package hosting the service type. If the service type is disabled, new replicas of that service type will not be placed on the node until it is enabled again. The service type is enabled again after the process hosting it comes up and re-registers the type or a preconfigured time interval has passed. The value is 1. - enabled = "Enabled" #: Indicates that the service type is enabled on this node. Replicas of this service type can be placed on this node when the code package registers the service type. The value is 2. - registered = "Registered" #: Indicates that the service type is enabled and registered on the node by a code package. Replicas of this service type can now be placed on this node. The value is 3. - - -class ServiceEndpointRole(str, Enum): - - invalid = "Invalid" #: Indicates the service endpoint role is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - stateless = "Stateless" #: Indicates that the service endpoint is of a stateless service. The value is 1. - stateful_primary = "StatefulPrimary" #: Indicates that the service endpoint is of a primary replica of a stateful service. The value is 2. - stateful_secondary = "StatefulSecondary" #: Indicates that the service endpoint is of a secondary replica of a stateful service. The value is 3. - - -class OperationState(str, Enum): - - invalid = "Invalid" #: The operation state is invalid. - running = "Running" #: The operation is in progress. - rolling_back = "RollingBack" #: The operation is rolling back internal system state because it encountered a fatal error or was cancelled by the user. "RollingBack" does not refer to user state. For example, if CancelOperation is called on a command of type PartitionDataLoss, state of "RollingBack" does not mean service data is being restored (assuming the command has progressed far enough to cause data loss). It means the system is rolling back/cleaning up internal system state associated with the command. - completed = "Completed" #: The operation has completed successfully and is no longer running. - faulted = "Faulted" #: The operation has failed and is no longer running. - cancelled = "Cancelled" #: The operation was cancelled by the user using CancelOperation, and is no longer running. - force_cancelled = "ForceCancelled" #: The operation was cancelled by the user using CancelOperation, with the force parameter set to true. It is no longer running. Refer to CancelOperation for more details. - - -class OperationType(str, Enum): - - invalid = "Invalid" #: The operation state is invalid. - partition_data_loss = "PartitionDataLoss" #: An operation started using the StartDataLoss API. - partition_quorum_loss = "PartitionQuorumLoss" #: An operation started using the StartQuorumLoss API. - partition_restart = "PartitionRestart" #: An operation started using the StartPartitionRestart API. - node_transition = "NodeTransition" #: An operation started using the StartNodeTransition API. - - -class PackageSharingPolicyScope(str, Enum): - - none = "None" #: No package sharing policy scope. The value is 0. - all = "All" #: Share all code, config and data packages from corresponding service manifest. The value is 1. - code = "Code" #: Share all code packages from corresponding service manifest. The value is 2. - config = "Config" #: Share all config packages from corresponding service manifest. The value is 3. - data = "Data" #: Share all data packages from corresponding service manifest. The value is 4. - - -class PropertyValueKind(str, Enum): - - invalid = "Invalid" #: Indicates the property is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - binary = "Binary" #: The data inside the property is a binary blob. The value is 1. - int64 = "Int64" #: The data inside the property is an int64. The value is 2. - double = "Double" #: The data inside the property is a double. The value is 3. - string = "String" #: The data inside the property is a string. The value is 4. - guid = "Guid" #: The data inside the property is a guid. The value is 5. - - -class PropertyBatchOperationKind(str, Enum): - - invalid = "Invalid" #: Indicates the property operation is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - put = "Put" #: The operation will create or edit a property. The value is 1. - get = "Get" #: The operation will get a property. The value is 2. - check_exists = "CheckExists" #: The operation will check that a property exists or doesn't exists, depending on the provided value. The value is 3. - check_sequence = "CheckSequence" #: The operation will ensure that the sequence number is equal to the provided value. The value is 4. - delete = "Delete" #: The operation will delete a property. The value is 5. - check_value = "CheckValue" #: The operation will ensure that the value of a property is equal to the provided value. The value is 7. - - -class PropertyBatchInfoKind(str, Enum): - - invalid = "Invalid" #: Indicates the property batch info is invalid. All Service Fabric enumerations have the invalid type. - successful = "Successful" #: The property batch succeeded. - failed = "Failed" #: The property batch failed. - - -class RetentionPolicyType(str, Enum): - - basic = "Basic" #: Indicates a basic retention policy type. - invalid = "Invalid" #: Indicates an invalid retention policy type. - - -class BackupStorageKind(str, Enum): - - invalid = "Invalid" #: Indicates an invalid backup storage kind. All Service Fabric enumerations have the invalid type. - file_share = "FileShare" #: Indicates file/ SMB share to be used as backup storage. - azure_blob_store = "AzureBlobStore" #: Indicates Azure blob store to be used as backup storage. - dsms_azure_blob_store = "DsmsAzureBlobStore" #: Indicates Dsms Azure blob store to be used as backup storage. - managed_identity_azure_blob_store = "ManagedIdentityAzureBlobStore" #: Indicates Azure blob store to be used as backup storage using managed identity. - - -class BackupScheduleKind(str, Enum): - - invalid = "Invalid" #: Indicates an invalid backup schedule kind. All Service Fabric enumerations have the invalid type. - time_based = "TimeBased" #: Indicates a time-based backup schedule. - frequency_based = "FrequencyBased" #: Indicates a frequency-based backup schedule. - - -class BackupPolicyScope(str, Enum): - - invalid = "Invalid" #: Indicates an invalid backup policy scope type. All Service Fabric enumerations have the invalid type. - partition = "Partition" #: Indicates the backup policy is applied at partition level. Hence overriding any policy which may have applied at partition's service or application level. - service = "Service" #: Indicates the backup policy is applied at service level. All partitions of the service inherit this policy unless explicitly overridden at partition level. - application = "Application" #: Indicates the backup policy is applied at application level. All services and partitions of the application inherit this policy unless explicitly overridden at service or partition level. - - -class BackupSuspensionScope(str, Enum): - - invalid = "Invalid" #: Indicates an invalid backup suspension scope type also indicating entity is not suspended. All Service Fabric enumerations have the invalid type. - partition = "Partition" #: Indicates the backup suspension is applied at partition level. - service = "Service" #: Indicates the backup suspension is applied at service level. All partitions of the service are hence suspended for backup. - application = "Application" #: Indicates the backup suspension is applied at application level. All services and partitions of the application are hence suspended for backup. - - -class RestoreState(str, Enum): - - invalid = "Invalid" #: Indicates an invalid restore state. All Service Fabric enumerations have the invalid type. - accepted = "Accepted" #: Operation has been validated and accepted. Restore is yet to be triggered. - restore_in_progress = "RestoreInProgress" #: Restore operation has been triggered and is under process. - success = "Success" #: Operation completed with success. - failure = "Failure" #: Operation completed with failure. - timeout = "Timeout" #: Operation timed out. - - -class BackupType(str, Enum): - - invalid = "Invalid" #: Indicates an invalid backup type. All Service Fabric enumerations have the invalid type. - full = "Full" #: Indicates a full backup. - incremental = "Incremental" #: Indicates an incremental backup. A backup chain is comprised of a full backup followed by 0 or more incremental backups. - - -class ManagedIdentityType(str, Enum): - - invalid = "Invalid" #: Indicates an invalid managed identity type. All Service Fabric enumerations have the invalid type. - vmss = "VMSS" #: Indicates VMSS managed identity should be used to connect to Azure blob store. - cluster = "Cluster" #: Indicates cluster managed identity should be used to connect to Azure blob store. - - -class BackupScheduleFrequencyType(str, Enum): - - invalid = "Invalid" #: Indicates an invalid backup schedule frequency type. All Service Fabric enumerations have the invalid type. - daily = "Daily" #: Indicates that the time based backup schedule is repeated at a daily frequency. - weekly = "Weekly" #: Indicates that the time based backup schedule is repeated at a weekly frequency. - - -class DayOfWeek(str, Enum): - - sunday = "Sunday" #: Indicates the Day referred is Sunday. - monday = "Monday" #: Indicates the Day referred is Monday. - tuesday = "Tuesday" #: Indicates the Day referred is Tuesday. - wednesday = "Wednesday" #: Indicates the Day referred is Wednesday. - thursday = "Thursday" #: Indicates the Day referred is Thursday. - friday = "Friday" #: Indicates the Day referred is Friday. - saturday = "Saturday" #: Indicates the Day referred is Saturday. - - -class BackupState(str, Enum): - - invalid = "Invalid" #: Indicates an invalid backup state. All Service Fabric enumerations have the invalid type. - accepted = "Accepted" #: Operation has been validated and accepted. Backup is yet to be triggered. - backup_in_progress = "BackupInProgress" #: Backup operation has been triggered and is under process. - success = "Success" #: Operation completed with success. - failure = "Failure" #: Operation completed with failure. - timeout = "Timeout" #: Operation timed out. - - -class BackupEntityKind(str, Enum): - - invalid = "Invalid" #: Indicates an invalid entity kind. All Service Fabric enumerations have the invalid type. - partition = "Partition" #: Indicates the entity is a Service Fabric partition. - service = "Service" #: Indicates the entity is a Service Fabric service. - application = "Application" #: Indicates the entity is a Service Fabric application. - - -class ImpactLevel(str, Enum): - - invalid = "Invalid" - none = "None" - restart = "Restart" - remove_data = "RemoveData" - remove_node = "RemoveNode" - - -class RepairImpactKind(str, Enum): - - invalid = "Invalid" #: The repair impact is not valid or is of an unknown type. - node = "Node" #: The repair impact affects a set of Service Fabric nodes. - - -class RepairTargetKind(str, Enum): - - invalid = "Invalid" #: The repair target is not valid or is of an unknown type. - node = "Node" #: The repair target is a set of Service Fabric nodes. - - -class State(str, Enum): - - invalid = "Invalid" #: Indicates that the repair task state is invalid. All Service Fabric enumerations have the invalid value. - created = "Created" #: Indicates that the repair task has been created. - claimed = "Claimed" #: Indicates that the repair task has been claimed by a repair executor. - preparing = "Preparing" #: Indicates that the Repair Manager is preparing the system to handle the impact of the repair task, usually by taking resources offline gracefully. - approved = "Approved" #: Indicates that the repair task has been approved by the Repair Manager and is safe to execute. - executing = "Executing" #: Indicates that execution of the repair task is in progress. - restoring = "Restoring" #: Indicates that the Repair Manager is restoring the system to its pre-repair state, usually by bringing resources back online. - completed = "Completed" #: Indicates that the repair task has completed, and no further state changes will occur. - - -class ResultStatus(str, Enum): - - invalid = "Invalid" #: Indicates that the repair task result is invalid. All Service Fabric enumerations have the invalid value. - succeeded = "Succeeded" #: Indicates that the repair task completed execution successfully. - cancelled = "Cancelled" #: Indicates that the repair task was cancelled prior to execution. - interrupted = "Interrupted" #: Indicates that execution of the repair task was interrupted by a cancellation request after some work had already been performed. - failed = "Failed" #: Indicates that there was a failure during execution of the repair task. Some work may have been performed. - pending = "Pending" #: Indicates that the repair task result is not yet available, because the repair task has not finished executing. - - -class RepairTaskHealthCheckState(str, Enum): - - not_started = "NotStarted" #: Indicates that the health check has not started. - in_progress = "InProgress" #: Indicates that the health check is in progress. - succeeded = "Succeeded" #: Indicates that the health check succeeded. - skipped = "Skipped" #: Indicates that the health check was skipped. - timed_out = "TimedOut" #: Indicates that the health check timed out. - - -class ScalingTriggerKind(str, Enum): - - invalid = "Invalid" #: Indicates the scaling trigger is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - average_partition_load = "AveragePartitionLoad" #: Indicates a trigger where scaling decisions are made based on average load of a partition. The value is 1. - average_service_load = "AverageServiceLoad" #: Indicates a trigger where scaling decisions are made based on average load of a service. The value is 2. - - -class ScalingMechanismKind(str, Enum): - - invalid = "Invalid" #: Indicates the scaling mechanism is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - partition_instance_count = "PartitionInstanceCount" #: Indicates a mechanism for scaling where new instances are added or removed from a partition. The value is 1. - 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 ServiceHostUpgradeImpact(str, Enum): - - invalid = "Invalid" #: Indicates the upgrade impact is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - none = "None" #: The upgrade is not expected to cause service host restarts. The value is 1. - service_host_restart = "ServiceHostRestart" #: The upgrade is expected to cause a service host restart. The value is 2. - unexpected_service_host_restart = "UnexpectedServiceHostRestart" #: The upgrade will cause an unexpected service host restart. This indicates a bug in the Service Fabric runtime and proceeding with an upgrade with this impact may lead to skipped safety checks. Running the upgrade with the ForceRestart flag will force proper safety checks. The value is 3. - - -class ResourceStatus(str, Enum): - - unknown = "Unknown" #: Indicates the resource status is unknown. The value is zero. - ready = "Ready" #: Indicates the resource is ready. The value is 1. - upgrading = "Upgrading" #: Indicates the resource is upgrading. The value is 2. - creating = "Creating" #: Indicates the resource is being created. The value is 3. - deleting = "Deleting" #: Indicates the resource is being deleted. The value is 4. - failed = "Failed" #: Indicates the resource is not functional due to persistent failures. See statusDetails property for more details. The value is 5. - - -class SecretKind(str, Enum): - - inlined_value = "inlinedValue" #: A simple secret resource whose plaintext value is provided by the user. - key_vault_versioned_reference = "keyVaultVersionedReference" #: A secret resource that references a specific version of a secret stored in Azure Key Vault; the expected value is a versioned KeyVault URI corresponding to the version of the secret being referenced. - - -class VolumeProvider(str, Enum): - - sf_azure_file = "SFAzureFile" #: Provides volumes that are backed by Azure Files. - - -class SizeTypes(str, Enum): - - small = "Small" - medium = "Medium" - large = "Large" - - -class ApplicationScopedVolumeKind(str, Enum): - - service_fabric_volume_disk = "ServiceFabricVolumeDisk" #: Provides Service Fabric High Availability Volume Disk - - -class NetworkKind(str, Enum): - - local = "Local" #: Indicates a container network local to a single Service Fabric cluster. The value is 1. - - -class HeaderMatchType(str, Enum): - - exact = "exact" - - -class OperatingSystemType(str, Enum): - - linux = "Linux" #: The required operating system is Linux. - windows = "Windows" #: The required operating system is Windows. - - -class ImageRegistryPasswordType(str, Enum): - - clear_text = "ClearText" #: The image registry password in clear text, will not be processed in any way and used directly - key_vault_reference = "KeyVaultReference" #: The URI to a KeyVault secret version, will be resolved using the application's managed identity (this type is only valid if the app was assigned a managed identity) before getting used - secret_value_reference = "SecretValueReference" #: The reference to a SecretValue resource, will be resolved before getting used - - -class EnvironmentVariableType(str, Enum): - - clear_text = "ClearText" #: The environment variable in clear text, will not be processed in any way and passed in as is - key_vault_reference = "KeyVaultReference" #: The URI to a KeyVault secret version, will be resolved using the application's managed identity (this type is only valid if the app was assigned a managed identity) before getting passed in - secret_value_reference = "SecretValueReference" #: The reference to a SecretValue resource, will be resolved before getting passed in - - -class SettingType(str, Enum): - - clear_text = "ClearText" #: The setting in clear text, will not be processed in any way and passed in as is - key_vault_reference = "KeyVaultReference" #: The URI to a KeyVault secret version, will be resolved using the application's managed identity (this type is only valid if the app was assigned a managed identity) before getting passed in - secret_value_reference = "SecretValueReference" #: The reference to a SecretValue resource, will be resolved before getting passed in - - -class Scheme(str, Enum): - - http = "http" #: Indicates that the probe is http. - https = "https" #: Indicates that the probe is https. No cert validation. - - -class ApplicationResourceUpgradeState(str, Enum): - - invalid = "Invalid" #: Indicates the upgrade state is invalid. All Service Fabric enumerations have the invalid type. The value is 0. - provisioning_target = "ProvisioningTarget" #: The upgrade is in the progress of provisioning target application type version. The value is 1. - rolling_forward = "RollingForward" #: The upgrade is rolling forward to the target version but is not complete yet. The value is 2. - unprovisioning_current = "UnprovisioningCurrent" #: The upgrade is in the progress of unprovisioning current application type version and rolling forward to the target version is completed. The value is 3. - completed_rollforward = "CompletedRollforward" #: The upgrade has finished rolling forward. The value is 4. - rolling_back = "RollingBack" #: The upgrade is rolling back to the previous version but is not complete yet. The value is 5. - unprovisioning_target = "UnprovisioningTarget" #: The upgrade is in the progress of unprovisioning target application type version and rolling back to the current version is completed. The value is 6. - completed_rollback = "CompletedRollback" #: The upgrade has finished rolling back. The value is 7. - failed = "Failed" #: The upgrade has failed and is unable to execute FailureAction. The value is 8. - - -class RollingUpgradeMode(str, Enum): - - invalid = "Invalid" #: Indicates the upgrade mode is invalid. All Service Fabric enumerations have the invalid type. The value is zero. - unmonitored_auto = "UnmonitoredAuto" #: The upgrade will proceed automatically without performing any health monitoring. The value is 1 - unmonitored_manual = "UnmonitoredManual" #: The upgrade will stop after completing each upgrade domain, giving the opportunity to manually monitor health before proceeding. The value is 2 - monitored = "Monitored" #: The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. The value is 3 - - -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 AutoScalingMechanismKind(str, Enum): - - add_remove_replica = "AddRemoveReplica" #: Indicates that scaling should be performed by adding or removing replicas. - - -class AutoScalingMetricKind(str, Enum): - - resource = "Resource" #: Indicates that the metric is one of resources, like cpu or memory. - - -class AutoScalingResourceMetricName(str, Enum): - - cpu = "cpu" #: Indicates that the resource is CPU cores. - memory_in_gb = "memoryInGB" #: Indicates that the resource is memory in GB. - - -class AutoScalingTriggerKind(str, Enum): - - average_load = "AverageLoad" #: Indicates that scaling should be performed based on average load of all replicas in the service. - - -class ExecutionPolicyType(str, Enum): - - default = "Default" #: Indicates the default execution policy, always restart the service if an exit occurs. - run_to_completion = "RunToCompletion" #: Indicates that the service will perform its desired operation and complete successfully. If the service encounters failure, it will restarted based on restart policy specified. If the service completes its operation successfully, it will not be restarted again. - - -class RestartPolicy(str, Enum): - - on_failure = "OnFailure" #: Service will be restarted when it encounters a failure. - never = "Never" #: Service will never be restarted. If the service encounters a failure, it will move to Failed state. - - -class NodeStatusFilter(str, Enum): - - default = "default" #: This filter value will match all of the nodes excepts the ones with status as Unknown or Removed. - all = "all" #: This filter value will match all of the nodes. - up = "up" #: This filter value will match nodes that are Up. - down = "down" #: This filter value will match nodes that are Down. - enabling = "enabling" #: This filter value will match nodes that are in the process of being enabled with status as Enabling. - disabling = "disabling" #: This filter value will match nodes that are in the process of being disabled with status as Disabling. - disabled = "disabled" #: This filter value will match nodes that are Disabled. - unknown = "unknown" #: This filter value will match nodes whose status is Unknown. A node would be in Unknown state if Service Fabric does not have authoritative information about that node. This can happen if the system learns about a node at runtime. - removed = "removed" #: This filter value will match nodes whose status is Removed. These are the nodes that are removed from the cluster using the RemoveNodeState API. - - -class ReplicaHealthReportServiceKind(str, Enum): - - stateless = "Stateless" #: Does not use Service Fabric to make its state highly available or reliable. The value is 1 - stateful = "Stateful" #: Uses Service Fabric to make its state or part of its state highly available and reliable. The value is 2. - - -class DataLossMode(str, Enum): - - invalid = "Invalid" #: Reserved. Do not pass into API. - partial_data_loss = "PartialDataLoss" #: PartialDataLoss option will cause a quorum of replicas to go down, triggering an OnDataLoss event in the system for the given partition. - full_data_loss = "FullDataLoss" #: FullDataLoss option will drop all the replicas which means that all the data will be lost. - - -class NodeTransitionType(str, Enum): - - invalid = "Invalid" #: Reserved. Do not pass into API. - start = "Start" #: Transition a stopped node to up. - stop = "Stop" #: Transition an up node to stopped. - - -class QuorumLossMode(str, Enum): - - invalid = "Invalid" #: Reserved. Do not pass into API. - quorum_replicas = "QuorumReplicas" #: Partial Quorum loss mode : Minimum number of replicas for a partition will be down that will cause a quorum loss. - all_replicas = "AllReplicas" - - -class RestartPartitionMode(str, Enum): - - invalid = "Invalid" #: Reserved. Do not pass into API. - all_replicas_or_instances = "AllReplicasOrInstances" #: All replicas or instances in the partition are restarted at once. - only_active_secondaries = "OnlyActiveSecondaries" #: Only the secondary replicas are restarted. diff --git a/customSDK/servicefabric/models/service_from_template_description.py b/customSDK/servicefabric/models/service_from_template_description.py deleted file mode 100644 index 6a3a2903..00000000 --- a/customSDK/servicefabric/models/service_from_template_description.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceFromTemplateDescription(Model): - """Defines description for creating a Service Fabric service from a template - defined in the application manifest. - - All required parameters must be populated in order to send to Azure. - - :param application_name: Required. The name of the application, including - the 'fabric:' URI scheme. - :type application_name: str - :param service_name: Required. The full name of the service with 'fabric:' - URI scheme. - :type service_name: str - :param service_type_name: Required. Name of the service type as specified - in the service manifest. - :type service_type_name: str - :param initialization_data: The initialization data for the newly created - service instance. - :type initialization_data: list[int] - :param service_package_activation_mode: The activation mode of service - package to be used for a service. Possible values include: - 'SharedProcess', 'ExclusiveProcess' - :type service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS - system service to be enabled in Service Fabric cluster. - :type service_dns_name: str - """ - - _validation = { - 'application_name': {'required': True}, - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceFromTemplateDescription, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.service_name = kwargs.get('service_name', None) - self.service_type_name = kwargs.get('service_type_name', None) - self.initialization_data = kwargs.get('initialization_data', None) - self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) - self.service_dns_name = kwargs.get('service_dns_name', None) diff --git a/customSDK/servicefabric/models/service_from_template_description_py3.py b/customSDK/servicefabric/models/service_from_template_description_py3.py deleted file mode 100644 index be8bf5e2..00000000 --- a/customSDK/servicefabric/models/service_from_template_description_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceFromTemplateDescription(Model): - """Defines description for creating a Service Fabric service from a template - defined in the application manifest. - - All required parameters must be populated in order to send to Azure. - - :param application_name: Required. The name of the application, including - the 'fabric:' URI scheme. - :type application_name: str - :param service_name: Required. The full name of the service with 'fabric:' - URI scheme. - :type service_name: str - :param service_type_name: Required. Name of the service type as specified - in the service manifest. - :type service_type_name: str - :param initialization_data: The initialization data for the newly created - service instance. - :type initialization_data: list[int] - :param service_package_activation_mode: The activation mode of service - package to be used for a service. Possible values include: - 'SharedProcess', 'ExclusiveProcess' - :type service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS - system service to be enabled in Service Fabric cluster. - :type service_dns_name: str - """ - - _validation = { - 'application_name': {'required': True}, - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - } - - def __init__(self, *, application_name: str, service_name: str, service_type_name: str, initialization_data=None, service_package_activation_mode=None, service_dns_name: str=None, **kwargs) -> None: - super(ServiceFromTemplateDescription, self).__init__(**kwargs) - self.application_name = application_name - self.service_name = service_name - self.service_type_name = service_type_name - self.initialization_data = initialization_data - self.service_package_activation_mode = service_package_activation_mode - self.service_dns_name = service_dns_name diff --git a/customSDK/servicefabric/models/service_health.py b/customSDK/servicefabric/models/service_health.py deleted file mode 100644 index 885831d1..00000000 --- a/customSDK/servicefabric/models/service_health.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health import EntityHealth - - -class ServiceHealth(EntityHealth): - """Information about the health of a Service Fabric service. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param name: The name of the service whose health information is described - by this object. - :type name: str - :param partition_health_states: The list of partition health states - associated with the service. - :type partition_health_states: - list[~azure.servicefabric.models.PartitionHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'partition_health_states': {'key': 'PartitionHealthStates', 'type': '[PartitionHealthState]'}, - } - - def __init__(self, **kwargs): - super(ServiceHealth, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.partition_health_states = kwargs.get('partition_health_states', None) diff --git a/customSDK/servicefabric/models/service_health_evaluation.py b/customSDK/servicefabric/models/service_health_evaluation.py deleted file mode 100644 index 11fdbba8..00000000 --- a/customSDK/servicefabric/models/service_health_evaluation.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class ServiceHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a service, containing information about - the data and the algorithm used by health store to evaluate health. The - evaluation is returned only when the aggregated health state is either - Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param service_name: Name of the service whose health evaluation is - described by this object. - :type service_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the service. The types of the - unhealthy evaluations can be PartitionsHealthEvaluation or - EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(ServiceHealthEvaluation, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Service' diff --git a/customSDK/servicefabric/models/service_health_evaluation_py3.py b/customSDK/servicefabric/models/service_health_evaluation_py3.py deleted file mode 100644 index 887fbc42..00000000 --- a/customSDK/servicefabric/models/service_health_evaluation_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class ServiceHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a service, containing information about - the data and the algorithm used by health store to evaluate health. The - evaluation is returned only when the aggregated health state is either - Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param service_name: Name of the service whose health evaluation is - described by this object. - :type service_name: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the service. The types of the - unhealthy evaluations can be PartitionsHealthEvaluation or - EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, service_name: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ServiceHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.service_name = service_name - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Service' diff --git a/customSDK/servicefabric/models/service_health_py3.py b/customSDK/servicefabric/models/service_health_py3.py deleted file mode 100644 index 73650307..00000000 --- a/customSDK/servicefabric/models/service_health_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_py3 import EntityHealth - - -class ServiceHealth(EntityHealth): - """Information about the health of a Service Fabric service. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param name: The name of the service whose health information is described - by this object. - :type name: str - :param partition_health_states: The list of partition health states - associated with the service. - :type partition_health_states: - list[~azure.servicefabric.models.PartitionHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'partition_health_states': {'key': 'PartitionHealthStates', 'type': '[PartitionHealthState]'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, partition_health_states=None, **kwargs) -> None: - super(ServiceHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.name = name - self.partition_health_states = partition_health_states diff --git a/customSDK/servicefabric/models/service_health_report_expired_event.py b/customSDK/servicefabric/models/service_health_report_expired_event.py deleted file mode 100644 index 708f5214..00000000 --- a/customSDK/servicefabric/models/service_health_report_expired_event.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_event import ServiceEvent - - -class ServiceHealthReportExpiredEvent(ServiceEvent): - """Service Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param instance_id: Required. Id of Service instance. - :type instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServiceHealthReportExpiredEvent, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ServiceHealthReportExpired' diff --git a/customSDK/servicefabric/models/service_health_report_expired_event_py3.py b/customSDK/servicefabric/models/service_health_report_expired_event_py3.py deleted file mode 100644 index bdde10d7..00000000 --- a/customSDK/servicefabric/models/service_health_report_expired_event_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_event_py3 import ServiceEvent - - -class ServiceHealthReportExpiredEvent(ServiceEvent): - """Service Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param instance_id: Required. Id of Service instance. - :type instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ServiceHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) - self.instance_id = instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ServiceHealthReportExpired' diff --git a/customSDK/servicefabric/models/service_health_state.py b/customSDK/servicefabric/models/service_health_state.py deleted file mode 100644 index 3a3db023..00000000 --- a/customSDK/servicefabric/models/service_health_state.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state import EntityHealthState - - -class ServiceHealthState(EntityHealthState): - """Represents the health state of a service, which contains the service - identifier and its aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param service_name: Name of the service whose health state is represented - by this object. - :type service_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceHealthState, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) diff --git a/customSDK/servicefabric/models/service_health_state_chunk.py b/customSDK/servicefabric/models/service_health_state_chunk.py deleted file mode 100644 index b1bb24cc..00000000 --- a/customSDK/servicefabric/models/service_health_state_chunk.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk import EntityHealthStateChunk - - -class ServiceHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a service, which contains the service - name, its aggregated health state and any partitions that respect the - filters in the cluster health chunk query description. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_name: The name of the service whose health state chunk is - provided in this object. - :type service_name: str - :param partition_health_state_chunks: The list of partition health state - chunks belonging to the service that respect the filters in the cluster - health chunk query description. - :type partition_health_state_chunks: - ~azure.servicefabric.models.PartitionHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_health_state_chunks': {'key': 'PartitionHealthStateChunks', 'type': 'PartitionHealthStateChunkList'}, - } - - def __init__(self, **kwargs): - super(ServiceHealthStateChunk, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_health_state_chunks = kwargs.get('partition_health_state_chunks', None) diff --git a/customSDK/servicefabric/models/service_health_state_chunk_list.py b/customSDK/servicefabric/models/service_health_state_chunk_list.py deleted file mode 100644 index 63511118..00000000 --- a/customSDK/servicefabric/models/service_health_state_chunk_list.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceHealthStateChunkList(Model): - """The list of service health state chunks that respect the input filters in - the chunk query. Returned by get cluster health state chunks query. - - :param items: The list of service health state chunks that respect the - input filters in the chunk query. - :type items: list[~azure.servicefabric.models.ServiceHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[ServiceHealthStateChunk]'}, - } - - def __init__(self, **kwargs): - super(ServiceHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) diff --git a/customSDK/servicefabric/models/service_health_state_chunk_list_py3.py b/customSDK/servicefabric/models/service_health_state_chunk_list_py3.py deleted file mode 100644 index 9f747304..00000000 --- a/customSDK/servicefabric/models/service_health_state_chunk_list_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceHealthStateChunkList(Model): - """The list of service health state chunks that respect the input filters in - the chunk query. Returned by get cluster health state chunks query. - - :param items: The list of service health state chunks that respect the - input filters in the chunk query. - :type items: list[~azure.servicefabric.models.ServiceHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[ServiceHealthStateChunk]'}, - } - - def __init__(self, *, items=None, **kwargs) -> None: - super(ServiceHealthStateChunkList, self).__init__(**kwargs) - self.items = items diff --git a/customSDK/servicefabric/models/service_health_state_chunk_py3.py b/customSDK/servicefabric/models/service_health_state_chunk_py3.py deleted file mode 100644 index 18f343ce..00000000 --- a/customSDK/servicefabric/models/service_health_state_chunk_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_chunk_py3 import EntityHealthStateChunk - - -class ServiceHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a service, which contains the service - name, its aggregated health state and any partitions that respect the - filters in the cluster health chunk query description. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_name: The name of the service whose health state chunk is - provided in this object. - :type service_name: str - :param partition_health_state_chunks: The list of partition health state - chunks belonging to the service that respect the filters in the cluster - health chunk query description. - :type partition_health_state_chunks: - ~azure.servicefabric.models.PartitionHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_health_state_chunks': {'key': 'PartitionHealthStateChunks', 'type': 'PartitionHealthStateChunkList'}, - } - - def __init__(self, *, health_state=None, service_name: str=None, partition_health_state_chunks=None, **kwargs) -> None: - super(ServiceHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.service_name = service_name - self.partition_health_state_chunks = partition_health_state_chunks diff --git a/customSDK/servicefabric/models/service_health_state_filter.py b/customSDK/servicefabric/models/service_health_state_filter.py deleted file mode 100644 index 27b5ce5f..00000000 --- a/customSDK/servicefabric/models/service_health_state_filter.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceHealthStateFilter(Model): - """Defines matching criteria to determine whether a service should be included - as a child of an application in the cluster health chunk. - The services are only returned if the parent application matches a filter - specified in the cluster health chunk query description. - One filter can match zero, one or multiple services, depending on its - properties. - - :param service_name_filter: The name of the service that matches the - filter. The filter is applied only to the specified service, if it exists. - If the service doesn't exist, no service is returned in the cluster health - chunk based on this filter. - If the service exists, it is included as the application's child if the - health state matches the other filter properties. - If not specified, all services that match the parent filters (if any) are - taken into consideration and matched against the other filter members, - like health state filter. - :type service_name_filter: str - :param health_state_filter: The filter for the health state of the - services. It allows selecting services if they match the desired health - states. - The possible values are integer value of one of the following health - states. Only services that match the filter are returned. All services are - used to evaluate the cluster aggregated health state. - If not specified, default value is None, unless the service name is - specified. If the filter has default value and service name is specified, - the matching service is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches services with - HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - :param partition_filters: Defines a list of filters that specify which - partitions to be included in the returned cluster health chunk as children - of the service. The partitions are returned only if the parent service - matches a filter. - If the list is empty, no partitions are returned. All the partitions are - used to evaluate the parent service aggregated health state, regardless of - the input filters. - The service filter may specify multiple partition filters. - For example, it can specify a filter to return all partitions with health - state Error and another filter to always include a partition identified by - its partition ID. - :type partition_filters: - list[~azure.servicefabric.models.PartitionHealthStateFilter] - """ - - _attribute_map = { - 'service_name_filter': {'key': 'ServiceNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'partition_filters': {'key': 'PartitionFilters', 'type': '[PartitionHealthStateFilter]'}, - } - - def __init__(self, **kwargs): - super(ServiceHealthStateFilter, self).__init__(**kwargs) - self.service_name_filter = kwargs.get('service_name_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - self.partition_filters = kwargs.get('partition_filters', None) diff --git a/customSDK/servicefabric/models/service_health_state_filter_py3.py b/customSDK/servicefabric/models/service_health_state_filter_py3.py deleted file mode 100644 index ba9ff59a..00000000 --- a/customSDK/servicefabric/models/service_health_state_filter_py3.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceHealthStateFilter(Model): - """Defines matching criteria to determine whether a service should be included - as a child of an application in the cluster health chunk. - The services are only returned if the parent application matches a filter - specified in the cluster health chunk query description. - One filter can match zero, one or multiple services, depending on its - properties. - - :param service_name_filter: The name of the service that matches the - filter. The filter is applied only to the specified service, if it exists. - If the service doesn't exist, no service is returned in the cluster health - chunk based on this filter. - If the service exists, it is included as the application's child if the - health state matches the other filter properties. - If not specified, all services that match the parent filters (if any) are - taken into consideration and matched against the other filter members, - like health state filter. - :type service_name_filter: str - :param health_state_filter: The filter for the health state of the - services. It allows selecting services if they match the desired health - states. - The possible values are integer value of one of the following health - states. Only services that match the filter are returned. All services are - used to evaluate the cluster aggregated health state. - If not specified, default value is None, unless the service name is - specified. If the filter has default value and service name is specified, - the matching service is returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches services with - HealthState value of OK (2) and Warning (4). - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in order to - return no results on a given collection of states. The value is 1. - - Ok - Filter that matches input with HealthState value Ok. The value is - 2. - - Warning - Filter that matches input with HealthState value Warning. The - value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The value is - 65535. Default value: 0 . - :type health_state_filter: int - :param partition_filters: Defines a list of filters that specify which - partitions to be included in the returned cluster health chunk as children - of the service. The partitions are returned only if the parent service - matches a filter. - If the list is empty, no partitions are returned. All the partitions are - used to evaluate the parent service aggregated health state, regardless of - the input filters. - The service filter may specify multiple partition filters. - For example, it can specify a filter to return all partitions with health - state Error and another filter to always include a partition identified by - its partition ID. - :type partition_filters: - list[~azure.servicefabric.models.PartitionHealthStateFilter] - """ - - _attribute_map = { - 'service_name_filter': {'key': 'ServiceNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'partition_filters': {'key': 'PartitionFilters', 'type': '[PartitionHealthStateFilter]'}, - } - - def __init__(self, *, service_name_filter: str=None, health_state_filter: int=0, partition_filters=None, **kwargs) -> None: - super(ServiceHealthStateFilter, self).__init__(**kwargs) - self.service_name_filter = service_name_filter - self.health_state_filter = health_state_filter - self.partition_filters = partition_filters diff --git a/customSDK/servicefabric/models/service_health_state_py3.py b/customSDK/servicefabric/models/service_health_state_py3.py deleted file mode 100644 index 1d23d027..00000000 --- a/customSDK/servicefabric/models/service_health_state_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .entity_health_state_py3 import EntityHealthState - - -class ServiceHealthState(EntityHealthState): - """Represents the health state of a service, which contains the service - identifier and its aggregated health state. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param service_name: Name of the service whose health state is represented - by this object. - :type service_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, service_name: str=None, **kwargs) -> None: - super(ServiceHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.service_name = service_name diff --git a/customSDK/servicefabric/models/service_identity.py b/customSDK/servicefabric/models/service_identity.py deleted file mode 100644 index c597c3b7..00000000 --- a/customSDK/servicefabric/models/service_identity.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceIdentity(Model): - """Map service identity friendly name to an application identity. - - :param name: The identity friendly name. - :type name: str - :param identity_ref: The application identity name. - :type identity_ref: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'identity_ref': {'key': 'identityRef', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceIdentity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.identity_ref = kwargs.get('identity_ref', None) diff --git a/customSDK/servicefabric/models/service_identity_py3.py b/customSDK/servicefabric/models/service_identity_py3.py deleted file mode 100644 index 2d95be7c..00000000 --- a/customSDK/servicefabric/models/service_identity_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceIdentity(Model): - """Map service identity friendly name to an application identity. - - :param name: The identity friendly name. - :type name: str - :param identity_ref: The application identity name. - :type identity_ref: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'identity_ref': {'key': 'identityRef', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, identity_ref: str=None, **kwargs) -> None: - super(ServiceIdentity, self).__init__(**kwargs) - self.name = name - self.identity_ref = identity_ref diff --git a/customSDK/servicefabric/models/service_info.py b/customSDK/servicefabric/models/service_info.py deleted file mode 100644 index d6e72ba0..00000000 --- a/customSDK/servicefabric/models/service_info.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceInfo(Model): - """Information about a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceInfo, StatelessServiceInfo - - All required parameters must be populated in order to send to Azure. - - :param id: The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to - identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type id: str - :param name: The full name of the service with 'fabric:' URI scheme. - :type name: str - :param type_name: Name of the service type as specified in the service - manifest. - :type type_name: str - :param manifest_version: The version of the service manifest. - :type manifest_version: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_status: The status of the application. Possible values - include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', - 'Failed' - :type service_status: str or ~azure.servicefabric.models.ServiceStatus - :param is_service_group: Whether the service is in a service group. - :type is_service_group: bool - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceInfo', 'Stateless': 'StatelessServiceInfo'} - } - - def __init__(self, **kwargs): - super(ServiceInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.manifest_version = kwargs.get('manifest_version', None) - self.health_state = kwargs.get('health_state', None) - self.service_status = kwargs.get('service_status', None) - self.is_service_group = kwargs.get('is_service_group', None) - self.service_kind = None diff --git a/customSDK/servicefabric/models/service_info_py3.py b/customSDK/servicefabric/models/service_info_py3.py deleted file mode 100644 index 2cba52c5..00000000 --- a/customSDK/servicefabric/models/service_info_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceInfo(Model): - """Information about a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceInfo, StatelessServiceInfo - - All required parameters must be populated in order to send to Azure. - - :param id: The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to - identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type id: str - :param name: The full name of the service with 'fabric:' URI scheme. - :type name: str - :param type_name: Name of the service type as specified in the service - manifest. - :type type_name: str - :param manifest_version: The version of the service manifest. - :type manifest_version: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_status: The status of the application. Possible values - include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', - 'Failed' - :type service_status: str or ~azure.servicefabric.models.ServiceStatus - :param is_service_group: Whether the service is in a service group. - :type is_service_group: bool - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceInfo', 'Stateless': 'StatelessServiceInfo'} - } - - def __init__(self, *, id: str=None, name: str=None, type_name: str=None, manifest_version: str=None, health_state=None, service_status=None, is_service_group: bool=None, **kwargs) -> None: - super(ServiceInfo, self).__init__(**kwargs) - self.id = id - self.name = name - self.type_name = type_name - self.manifest_version = manifest_version - self.health_state = health_state - self.service_status = service_status - self.is_service_group = is_service_group - self.service_kind = None diff --git a/customSDK/servicefabric/models/service_load_metric_description.py b/customSDK/servicefabric/models/service_load_metric_description.py deleted file mode 100644 index 16728651..00000000 --- a/customSDK/servicefabric/models/service_load_metric_description.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceLoadMetricDescription(Model): - """Specifies a metric to load balance a service during runtime. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the metric. If the service chooses to - report load during runtime, the load metric name should match the name - that is specified in Name exactly. Note that metric names are - case-sensitive. - :type name: str - :param weight: The service load metric relative weight, compared to other - metrics configured for this service, as a number. Possible values include: - 'Zero', 'Low', 'Medium', 'High' - :type weight: str or ~azure.servicefabric.models.ServiceLoadMetricWeight - :param primary_default_load: Used only for Stateful services. The default - amount of load, as a number, that this service creates for this metric - when it is a Primary replica. - :type primary_default_load: int - :param secondary_default_load: Used only for Stateful services. The - default amount of load, as a number, that this service creates for this - metric when it is a Secondary replica. - :type secondary_default_load: int - :param auxiliary_default_load: Used only for Stateful services. The - default amount of load, as a number, that this service creates for this - metric when it is an Auxiliary replica. - :type auxiliary_default_load: int - :param default_load: Used only for Stateless services. The default amount - of load, as a number, that this service creates for this metric. - :type default_load: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'weight': {'key': 'Weight', 'type': 'str'}, - 'primary_default_load': {'key': 'PrimaryDefaultLoad', 'type': 'int'}, - 'secondary_default_load': {'key': 'SecondaryDefaultLoad', 'type': 'int'}, - 'auxiliary_default_load': {'key': 'AuxiliaryDefaultLoad', 'type': 'int'}, - 'default_load': {'key': 'DefaultLoad', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ServiceLoadMetricDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.weight = kwargs.get('weight', None) - self.primary_default_load = kwargs.get('primary_default_load', None) - self.secondary_default_load = kwargs.get('secondary_default_load', None) - self.auxiliary_default_load = kwargs.get('auxiliary_default_load', None) - self.default_load = kwargs.get('default_load', None) diff --git a/customSDK/servicefabric/models/service_load_metric_description_py3.py b/customSDK/servicefabric/models/service_load_metric_description_py3.py deleted file mode 100644 index d346b8c0..00000000 --- a/customSDK/servicefabric/models/service_load_metric_description_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceLoadMetricDescription(Model): - """Specifies a metric to load balance a service during runtime. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the metric. If the service chooses to - report load during runtime, the load metric name should match the name - that is specified in Name exactly. Note that metric names are - case-sensitive. - :type name: str - :param weight: The service load metric relative weight, compared to other - metrics configured for this service, as a number. Possible values include: - 'Zero', 'Low', 'Medium', 'High' - :type weight: str or ~azure.servicefabric.models.ServiceLoadMetricWeight - :param primary_default_load: Used only for Stateful services. The default - amount of load, as a number, that this service creates for this metric - when it is a Primary replica. - :type primary_default_load: int - :param secondary_default_load: Used only for Stateful services. The - default amount of load, as a number, that this service creates for this - metric when it is a Secondary replica. - :type secondary_default_load: int - :param auxiliary_default_load: Used only for Stateful services. The - default amount of load, as a number, that this service creates for this - metric when it is an Auxiliary replica. - :type auxiliary_default_load: int - :param default_load: Used only for Stateless services. The default amount - of load, as a number, that this service creates for this metric. - :type default_load: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'weight': {'key': 'Weight', 'type': 'str'}, - 'primary_default_load': {'key': 'PrimaryDefaultLoad', 'type': 'int'}, - 'secondary_default_load': {'key': 'SecondaryDefaultLoad', 'type': 'int'}, - 'auxiliary_default_load': {'key': 'AuxiliaryDefaultLoad', 'type': 'int'}, - 'default_load': {'key': 'DefaultLoad', 'type': 'int'}, - } - - def __init__(self, *, name: str, weight=None, primary_default_load: int=None, secondary_default_load: int=None, auxiliary_default_load: int=None, default_load: int=None, **kwargs) -> None: - super(ServiceLoadMetricDescription, self).__init__(**kwargs) - self.name = name - self.weight = weight - self.primary_default_load = primary_default_load - self.secondary_default_load = secondary_default_load - self.auxiliary_default_load = auxiliary_default_load - self.default_load = default_load diff --git a/customSDK/servicefabric/models/service_name_info.py b/customSDK/servicefabric/models/service_name_info.py deleted file mode 100644 index 75fd440e..00000000 --- a/customSDK/servicefabric/models/service_name_info.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceNameInfo(Model): - """Information about the service name. - - :param id: The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to - identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type id: str - :param name: The full name of the service with 'fabric:' URI scheme. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceNameInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) diff --git a/customSDK/servicefabric/models/service_name_info_py3.py b/customSDK/servicefabric/models/service_name_info_py3.py deleted file mode 100644 index 474752f8..00000000 --- a/customSDK/servicefabric/models/service_name_info_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceNameInfo(Model): - """Information about the service name. - - :param id: The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to - identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type id: str - :param name: The full name of the service with 'fabric:' URI scheme. - :type name: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: - super(ServiceNameInfo, self).__init__(**kwargs) - self.id = id - self.name = name diff --git a/customSDK/servicefabric/models/service_new_health_report_event.py b/customSDK/servicefabric/models/service_new_health_report_event.py deleted file mode 100644 index 138f18a1..00000000 --- a/customSDK/servicefabric/models/service_new_health_report_event.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_event import ServiceEvent - - -class ServiceNewHealthReportEvent(ServiceEvent): - """Service Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param instance_id: Required. Id of Service instance. - :type instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ServiceNewHealthReportEvent, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'ServiceNewHealthReport' diff --git a/customSDK/servicefabric/models/service_new_health_report_event_py3.py b/customSDK/servicefabric/models/service_new_health_report_event_py3.py deleted file mode 100644 index b1e2d6bf..00000000 --- a/customSDK/servicefabric/models/service_new_health_report_event_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_event_py3 import ServiceEvent - - -class ServiceNewHealthReportEvent(ServiceEvent): - """Service Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param service_id: Required. The identity of the service. This ID is an - encoded representation of the service name. This is used in the REST APIs - to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param instance_id: Required. Id of Service instance. - :type instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'service_id': {'required': True}, - 'instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, service_id: str, instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(ServiceNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) - self.instance_id = instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'ServiceNewHealthReport' diff --git a/customSDK/servicefabric/models/service_partition_info.py b/customSDK/servicefabric/models/service_partition_info.py deleted file mode 100644 index 2aaa403e..00000000 --- a/customSDK/servicefabric/models/service_partition_info.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServicePartitionInfo(Model): - """Information about a partition of a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServicePartitionInfo, - StatelessServicePartitionInfo - - All required parameters must be populated in order to send to Azure. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param partition_status: The status of the service fabric service - partition. Possible values include: 'Invalid', 'Ready', 'NotReady', - 'InQuorumLoss', 'Reconfiguring', 'Deleting' - :type partition_status: str or - ~azure.servicefabric.models.ServicePartitionStatus - :param partition_information: Information about the partition identity, - partitioning scheme and keys supported by it. - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServicePartitionInfo', 'Stateless': 'StatelessServicePartitionInfo'} - } - - def __init__(self, **kwargs): - super(ServicePartitionInfo, self).__init__(**kwargs) - self.health_state = kwargs.get('health_state', None) - self.partition_status = kwargs.get('partition_status', None) - self.partition_information = kwargs.get('partition_information', None) - self.service_kind = None diff --git a/customSDK/servicefabric/models/service_partition_info_py3.py b/customSDK/servicefabric/models/service_partition_info_py3.py deleted file mode 100644 index e82a8a1d..00000000 --- a/customSDK/servicefabric/models/service_partition_info_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServicePartitionInfo(Model): - """Information about a partition of a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServicePartitionInfo, - StatelessServicePartitionInfo - - All required parameters must be populated in order to send to Azure. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param partition_status: The status of the service fabric service - partition. Possible values include: 'Invalid', 'Ready', 'NotReady', - 'InQuorumLoss', 'Reconfiguring', 'Deleting' - :type partition_status: str or - ~azure.servicefabric.models.ServicePartitionStatus - :param partition_information: Information about the partition identity, - partitioning scheme and keys supported by it. - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServicePartitionInfo', 'Stateless': 'StatelessServicePartitionInfo'} - } - - def __init__(self, *, health_state=None, partition_status=None, partition_information=None, **kwargs) -> None: - super(ServicePartitionInfo, self).__init__(**kwargs) - self.health_state = health_state - self.partition_status = partition_status - self.partition_information = partition_information - self.service_kind = None diff --git a/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description.py b/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description.py deleted file mode 100644 index 6b8b25dd..00000000 --- a/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_placement_policy_description import ServicePlacementPolicyDescription - - -class ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - allowing multiple stateless instances of a partition of the service to be - placed on a node. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: Holdover from other policy descriptions, not used for - this policy, values are ignored by runtime. Keeping it for any - backwards-compatibility with clients. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.type = 'AllowMultipleStatelessInstancesOnNode' diff --git a/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description_py3.py deleted file mode 100644 index ee18a5e1..00000000 --- a/customSDK/servicefabric/models/service_placement_allow_multiple_stateless_instances_on_node_policy_description_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_placement_policy_description_py3 import ServicePlacementPolicyDescription - - -class ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - allowing multiple stateless instances of a partition of the service to be - placed on a node. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: Holdover from other policy descriptions, not used for - this policy, values are ignored by runtime. Keeping it for any - backwards-compatibility with clients. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, *, domain_name: str=None, **kwargs) -> None: - super(ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, self).__init__(**kwargs) - self.domain_name = domain_name - self.type = 'AllowMultipleStatelessInstancesOnNode' diff --git a/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description.py b/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description.py deleted file mode 100644 index 90958718..00000000 --- a/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_placement_policy_description import ServicePlacementPolicyDescription - - -class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where a particular fault or upgrade domain should not be used for placement - of the instances or replicas of that service. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: The name of the domain that should not be used for - placement. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServicePlacementInvalidDomainPolicyDescription, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.type = 'InvalidDomain' diff --git a/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description_py3.py deleted file mode 100644 index df261879..00000000 --- a/customSDK/servicefabric/models/service_placement_invalid_domain_policy_description_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_placement_policy_description_py3 import ServicePlacementPolicyDescription - - -class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where a particular fault or upgrade domain should not be used for placement - of the instances or replicas of that service. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: The name of the domain that should not be used for - placement. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, *, domain_name: str=None, **kwargs) -> None: - super(ServicePlacementInvalidDomainPolicyDescription, self).__init__(**kwargs) - self.domain_name = domain_name - self.type = 'InvalidDomain' diff --git a/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description.py b/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description.py deleted file mode 100644 index f0eb52e5..00000000 --- a/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_placement_policy_description import ServicePlacementPolicyDescription - - -class ServicePlacementNonPartiallyPlaceServicePolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where all replicas must be able to be placed in order for any replicas to - be created. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServicePlacementNonPartiallyPlaceServicePolicyDescription, self).__init__(**kwargs) - self.type = 'NonPartiallyPlaceService' diff --git a/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description_py3.py deleted file mode 100644 index 1ecf5dcb..00000000 --- a/customSDK/servicefabric/models/service_placement_non_partially_place_service_policy_description_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_placement_policy_description_py3 import ServicePlacementPolicyDescription - - -class ServicePlacementNonPartiallyPlaceServicePolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where all replicas must be able to be placed in order for any replicas to - be created. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ServicePlacementNonPartiallyPlaceServicePolicyDescription, self).__init__(**kwargs) - self.type = 'NonPartiallyPlaceService' diff --git a/customSDK/servicefabric/models/service_placement_policy_description.py b/customSDK/servicefabric/models/service_placement_policy_description.py deleted file mode 100644 index ef550c9d..00000000 --- a/customSDK/servicefabric/models/service_placement_policy_description.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServicePlacementPolicyDescription(Model): - """Describes the policy to be used for placement of a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServicePlacementInvalidDomainPolicyDescription, - ServicePlacementNonPartiallyPlaceServicePolicyDescription, - ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, - ServicePlacementPreferPrimaryDomainPolicyDescription, - ServicePlacementRequiredDomainPolicyDescription, - ServicePlacementRequireDomainDistributionPolicyDescription - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'AllowMultipleStatelessInstancesOnNode': 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} - } - - def __init__(self, **kwargs): - super(ServicePlacementPolicyDescription, self).__init__(**kwargs) - self.type = None diff --git a/customSDK/servicefabric/models/service_placement_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_policy_description_py3.py deleted file mode 100644 index 19b9e7bc..00000000 --- a/customSDK/servicefabric/models/service_placement_policy_description_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServicePlacementPolicyDescription(Model): - """Describes the policy to be used for placement of a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServicePlacementInvalidDomainPolicyDescription, - ServicePlacementNonPartiallyPlaceServicePolicyDescription, - ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, - ServicePlacementPreferPrimaryDomainPolicyDescription, - ServicePlacementRequiredDomainPolicyDescription, - ServicePlacementRequireDomainDistributionPolicyDescription - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'AllowMultipleStatelessInstancesOnNode': 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} - } - - def __init__(self, **kwargs) -> None: - super(ServicePlacementPolicyDescription, self).__init__(**kwargs) - self.type = None diff --git a/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description.py b/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description.py deleted file mode 100644 index 9dbda50f..00000000 --- a/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_placement_policy_description import ServicePlacementPolicyDescription - - -class ServicePlacementPreferPrimaryDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where the service's Primary replicas should optimally be placed in a - particular domain. - This placement policy is usually used with fault domains in scenarios where - the Service Fabric cluster is geographically distributed in order to - indicate that a service's primary replica should be located in a particular - fault domain, which in geo-distributed scenarios usually aligns with - regional or datacenter boundaries. Note that since this is an optimization - it is possible that the Primary replica may not end up located in this - domain due to failures, capacity limits, or other constraints. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: The name of the domain that should used for placement - as per this policy. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServicePlacementPreferPrimaryDomainPolicyDescription, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.type = 'PreferPrimaryDomain' diff --git a/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description_py3.py deleted file mode 100644 index 4f7eb9cc..00000000 --- a/customSDK/servicefabric/models/service_placement_prefer_primary_domain_policy_description_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_placement_policy_description_py3 import ServicePlacementPolicyDescription - - -class ServicePlacementPreferPrimaryDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where the service's Primary replicas should optimally be placed in a - particular domain. - This placement policy is usually used with fault domains in scenarios where - the Service Fabric cluster is geographically distributed in order to - indicate that a service's primary replica should be located in a particular - fault domain, which in geo-distributed scenarios usually aligns with - regional or datacenter boundaries. Note that since this is an optimization - it is possible that the Primary replica may not end up located in this - domain due to failures, capacity limits, or other constraints. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: The name of the domain that should used for placement - as per this policy. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, *, domain_name: str=None, **kwargs) -> None: - super(ServicePlacementPreferPrimaryDomainPolicyDescription, self).__init__(**kwargs) - self.domain_name = domain_name - self.type = 'PreferPrimaryDomain' diff --git a/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description.py b/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description.py deleted file mode 100644 index c1616632..00000000 --- a/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_placement_policy_description import ServicePlacementPolicyDescription - - -class ServicePlacementRequireDomainDistributionPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where two replicas from the same partition should never be placed in the - same fault or upgrade domain. - While this is not common it can expose the service to an increased risk of - concurrent failures due to unplanned outages or other cases of - subsequent/concurrent failures. As an example, consider a case where - replicas are deployed across different data center, with one replica per - location. In the event that one of the datacenters goes offline, normally - the replica that was placed in that datacenter will be packed into one of - the remaining datacenters. If this is not desirable then this policy should - be set. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: The name of the domain that should used for placement - as per this policy. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServicePlacementRequireDomainDistributionPolicyDescription, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.type = 'RequireDomainDistribution' diff --git a/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description_py3.py deleted file mode 100644 index 7b9f301a..00000000 --- a/customSDK/servicefabric/models/service_placement_require_domain_distribution_policy_description_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_placement_policy_description_py3 import ServicePlacementPolicyDescription - - -class ServicePlacementRequireDomainDistributionPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where two replicas from the same partition should never be placed in the - same fault or upgrade domain. - While this is not common it can expose the service to an increased risk of - concurrent failures due to unplanned outages or other cases of - subsequent/concurrent failures. As an example, consider a case where - replicas are deployed across different data center, with one replica per - location. In the event that one of the datacenters goes offline, normally - the replica that was placed in that datacenter will be packed into one of - the remaining datacenters. If this is not desirable then this policy should - be set. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: The name of the domain that should used for placement - as per this policy. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, *, domain_name: str=None, **kwargs) -> None: - super(ServicePlacementRequireDomainDistributionPolicyDescription, self).__init__(**kwargs) - self.domain_name = domain_name - self.type = 'RequireDomainDistribution' diff --git a/customSDK/servicefabric/models/service_placement_required_domain_policy_description.py b/customSDK/servicefabric/models/service_placement_required_domain_policy_description.py deleted file mode 100644 index 0fe9e1a3..00000000 --- a/customSDK/servicefabric/models/service_placement_required_domain_policy_description.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_placement_policy_description import ServicePlacementPolicyDescription - - -class ServicePlacementRequiredDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where the instances or replicas of that service must be placed in a - particular domain. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: The name of the domain that should used for placement - as per this policy. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServicePlacementRequiredDomainPolicyDescription, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.type = 'RequireDomain' diff --git a/customSDK/servicefabric/models/service_placement_required_domain_policy_description_py3.py b/customSDK/servicefabric/models/service_placement_required_domain_policy_description_py3.py deleted file mode 100644 index 7ce9a9d9..00000000 --- a/customSDK/servicefabric/models/service_placement_required_domain_policy_description_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_placement_policy_description_py3 import ServicePlacementPolicyDescription - - -class ServicePlacementRequiredDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service - where the instances or replicas of that service must be placed in a - particular domain. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param domain_name: The name of the domain that should used for placement - as per this policy. - :type domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__(self, *, domain_name: str=None, **kwargs) -> None: - super(ServicePlacementRequiredDomainPolicyDescription, self).__init__(**kwargs) - self.domain_name = domain_name - self.type = 'RequireDomain' diff --git a/customSDK/servicefabric/models/service_properties.py b/customSDK/servicefabric/models/service_properties.py deleted file mode 100644 index 74a8a63e..00000000 --- a/customSDK/servicefabric/models/service_properties.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceProperties(Model): - """Describes properties of a service resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param description: User readable description of the service. - :type description: str - :param replica_count: The number of replicas of the service to create. - Defaults to 1 if not specified. - :type replica_count: int - :param execution_policy: The execution policy of the service - :type execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :param auto_scaling_policies: Auto scaling policies - :type auto_scaling_policies: - list[~azure.servicefabric.models.AutoScalingPolicy] - :ivar status: Status of the service. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the service. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the service's health state is not 'Ok', - this additional details from service fabric Health Manager for the user to - know why the service is marked unhealthy. - :vartype unhealthy_evaluation: str - :param identity_refs: The service identity list. - :type identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :param dns_name: Dns name of the service. - :type dns_name: str - """ - - _validation = { - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'replica_count': {'key': 'replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'health_state': {'key': 'healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.replica_count = kwargs.get('replica_count', None) - self.execution_policy = kwargs.get('execution_policy', None) - self.auto_scaling_policies = kwargs.get('auto_scaling_policies', None) - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity_refs = kwargs.get('identity_refs', None) - self.dns_name = kwargs.get('dns_name', None) diff --git a/customSDK/servicefabric/models/service_properties_py3.py b/customSDK/servicefabric/models/service_properties_py3.py deleted file mode 100644 index 12818cdf..00000000 --- a/customSDK/servicefabric/models/service_properties_py3.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceProperties(Model): - """Describes properties of a service resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param description: User readable description of the service. - :type description: str - :param replica_count: The number of replicas of the service to create. - Defaults to 1 if not specified. - :type replica_count: int - :param execution_policy: The execution policy of the service - :type execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :param auto_scaling_policies: Auto scaling policies - :type auto_scaling_policies: - list[~azure.servicefabric.models.AutoScalingPolicy] - :ivar status: Status of the service. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the service. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the service's health state is not 'Ok', - this additional details from service fabric Health Manager for the user to - know why the service is marked unhealthy. - :vartype unhealthy_evaluation: str - :param identity_refs: The service identity list. - :type identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :param dns_name: Dns name of the service. - :type dns_name: str - """ - - _validation = { - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'replica_count': {'key': 'replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'health_state': {'key': 'healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, replica_count: int=None, execution_policy=None, auto_scaling_policies=None, identity_refs=None, dns_name: str=None, **kwargs) -> None: - super(ServiceProperties, self).__init__(**kwargs) - self.description = description - self.replica_count = replica_count - self.execution_policy = execution_policy - self.auto_scaling_policies = auto_scaling_policies - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity_refs = identity_refs - self.dns_name = dns_name diff --git a/customSDK/servicefabric/models/service_replica_description.py b/customSDK/servicefabric/models/service_replica_description.py deleted file mode 100644 index 5477382d..00000000 --- a/customSDK/servicefabric/models/service_replica_description.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_replica_properties import ServiceReplicaProperties - - -class ServiceReplicaDescription(ServiceReplicaProperties): - """Describes a replica of a service resource. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. The operation system required by the code in - service. Possible values include: 'Linux', 'Windows' - :type os_type: str or ~azure.servicefabric.models.OperatingSystemType - :param code_packages: Required. Describes the set of code packages that - forms the service. A code package describes the container and the - properties for running it. All the code packages are started together on - the same host and share the same context (network, process etc.). - :type code_packages: - list[~azure.servicefabric.models.ContainerCodePackageProperties] - :param network_refs: The names of the private networks that this service - needs to be part of. - :type network_refs: list[~azure.servicefabric.models.NetworkRef] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :param replica_name: Required. Name of the replica. - :type replica_name: str - """ - - _validation = { - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - 'replica_name': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'str'}, - 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - 'replica_name': {'key': 'replicaName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceReplicaDescription, self).__init__(**kwargs) - self.replica_name = kwargs.get('replica_name', None) diff --git a/customSDK/servicefabric/models/service_replica_description_py3.py b/customSDK/servicefabric/models/service_replica_description_py3.py deleted file mode 100644 index 57878576..00000000 --- a/customSDK/servicefabric/models/service_replica_description_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_replica_properties_py3 import ServiceReplicaProperties - - -class ServiceReplicaDescription(ServiceReplicaProperties): - """Describes a replica of a service resource. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. The operation system required by the code in - service. Possible values include: 'Linux', 'Windows' - :type os_type: str or ~azure.servicefabric.models.OperatingSystemType - :param code_packages: Required. Describes the set of code packages that - forms the service. A code package describes the container and the - properties for running it. All the code packages are started together on - the same host and share the same context (network, process etc.). - :type code_packages: - list[~azure.servicefabric.models.ContainerCodePackageProperties] - :param network_refs: The names of the private networks that this service - needs to be part of. - :type network_refs: list[~azure.servicefabric.models.NetworkRef] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :param replica_name: Required. Name of the replica. - :type replica_name: str - """ - - _validation = { - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - 'replica_name': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'str'}, - 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - 'replica_name': {'key': 'replicaName', 'type': 'str'}, - } - - def __init__(self, *, os_type, code_packages, replica_name: str, network_refs=None, diagnostics=None, **kwargs) -> None: - super(ServiceReplicaDescription, self).__init__(os_type=os_type, code_packages=code_packages, network_refs=network_refs, diagnostics=diagnostics, **kwargs) - self.replica_name = replica_name diff --git a/customSDK/servicefabric/models/service_replica_properties.py b/customSDK/servicefabric/models/service_replica_properties.py deleted file mode 100644 index 690a2354..00000000 --- a/customSDK/servicefabric/models/service_replica_properties.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceReplicaProperties(Model): - """Describes the properties of a service replica. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. The operation system required by the code in - service. Possible values include: 'Linux', 'Windows' - :type os_type: str or ~azure.servicefabric.models.OperatingSystemType - :param code_packages: Required. Describes the set of code packages that - forms the service. A code package describes the container and the - properties for running it. All the code packages are started together on - the same host and share the same context (network, process etc.). - :type code_packages: - list[~azure.servicefabric.models.ContainerCodePackageProperties] - :param network_refs: The names of the private networks that this service - needs to be part of. - :type network_refs: list[~azure.servicefabric.models.NetworkRef] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef - """ - - _validation = { - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'str'}, - 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - } - - def __init__(self, **kwargs): - super(ServiceReplicaProperties, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', None) - self.code_packages = kwargs.get('code_packages', None) - self.network_refs = kwargs.get('network_refs', None) - self.diagnostics = kwargs.get('diagnostics', None) diff --git a/customSDK/servicefabric/models/service_replica_properties_py3.py b/customSDK/servicefabric/models/service_replica_properties_py3.py deleted file mode 100644 index 0bbecea6..00000000 --- a/customSDK/servicefabric/models/service_replica_properties_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceReplicaProperties(Model): - """Describes the properties of a service replica. - - All required parameters must be populated in order to send to Azure. - - :param os_type: Required. The operation system required by the code in - service. Possible values include: 'Linux', 'Windows' - :type os_type: str or ~azure.servicefabric.models.OperatingSystemType - :param code_packages: Required. Describes the set of code packages that - forms the service. A code package describes the container and the - properties for running it. All the code packages are started together on - the same host and share the same context (network, process etc.). - :type code_packages: - list[~azure.servicefabric.models.ContainerCodePackageProperties] - :param network_refs: The names of the private networks that this service - needs to be part of. - :type network_refs: list[~azure.servicefabric.models.NetworkRef] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef - """ - - _validation = { - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - } - - _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'str'}, - 'code_packages': {'key': 'codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - } - - def __init__(self, *, os_type, code_packages, network_refs=None, diagnostics=None, **kwargs) -> None: - super(ServiceReplicaProperties, self).__init__(**kwargs) - self.os_type = os_type - self.code_packages = code_packages - self.network_refs = network_refs - self.diagnostics = diagnostics diff --git a/customSDK/servicefabric/models/service_resource_description.py b/customSDK/servicefabric/models/service_resource_description.py deleted file mode 100644 index a70e4db1..00000000 --- a/customSDK/servicefabric/models/service_resource_description.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceResourceDescription(Model): - """This type describes a service resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Service resource. - :type name: str - :param os_type: Required. The operation system required by the code in - service. Possible values include: 'Linux', 'Windows' - :type os_type: str or ~azure.servicefabric.models.OperatingSystemType - :param code_packages: Required. Describes the set of code packages that - forms the service. A code package describes the container and the - properties for running it. All the code packages are started together on - the same host and share the same context (network, process etc.). - :type code_packages: - list[~azure.servicefabric.models.ContainerCodePackageProperties] - :param network_refs: The names of the private networks that this service - needs to be part of. - :type network_refs: list[~azure.servicefabric.models.NetworkRef] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :param description: User readable description of the service. - :type description: str - :param replica_count: The number of replicas of the service to create. - Defaults to 1 if not specified. - :type replica_count: int - :param execution_policy: The execution policy of the service - :type execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :param auto_scaling_policies: Auto scaling policies - :type auto_scaling_policies: - list[~azure.servicefabric.models.AutoScalingPolicy] - :ivar status: Status of the service. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the service. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the service's health state is not 'Ok', - this additional details from service fabric Health Manager for the user to - know why the service is marked unhealthy. - :vartype unhealthy_evaluation: str - :param identity_refs: The service identity list. - :type identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :param dns_name: Dns name of the service. - :type dns_name: str - """ - - _validation = { - 'name': {'required': True}, - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'code_packages': {'key': 'properties.codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'properties.networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsRef'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'properties.executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'properties.autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'properties.identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.os_type = kwargs.get('os_type', None) - self.code_packages = kwargs.get('code_packages', None) - self.network_refs = kwargs.get('network_refs', None) - self.diagnostics = kwargs.get('diagnostics', None) - self.description = kwargs.get('description', None) - self.replica_count = kwargs.get('replica_count', None) - self.execution_policy = kwargs.get('execution_policy', None) - self.auto_scaling_policies = kwargs.get('auto_scaling_policies', None) - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity_refs = kwargs.get('identity_refs', None) - self.dns_name = kwargs.get('dns_name', None) diff --git a/customSDK/servicefabric/models/service_resource_description_py3.py b/customSDK/servicefabric/models/service_resource_description_py3.py deleted file mode 100644 index ea752b58..00000000 --- a/customSDK/servicefabric/models/service_resource_description_py3.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceResourceDescription(Model): - """This type describes a service resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Service resource. - :type name: str - :param os_type: Required. The operation system required by the code in - service. Possible values include: 'Linux', 'Windows' - :type os_type: str or ~azure.servicefabric.models.OperatingSystemType - :param code_packages: Required. Describes the set of code packages that - forms the service. A code package describes the container and the - properties for running it. All the code packages are started together on - the same host and share the same context (network, process etc.). - :type code_packages: - list[~azure.servicefabric.models.ContainerCodePackageProperties] - :param network_refs: The names of the private networks that this service - needs to be part of. - :type network_refs: list[~azure.servicefabric.models.NetworkRef] - :param diagnostics: Reference to sinks in DiagnosticsDescription. - :type diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :param description: User readable description of the service. - :type description: str - :param replica_count: The number of replicas of the service to create. - Defaults to 1 if not specified. - :type replica_count: int - :param execution_policy: The execution policy of the service - :type execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :param auto_scaling_policies: Auto scaling policies - :type auto_scaling_policies: - list[~azure.servicefabric.models.AutoScalingPolicy] - :ivar status: Status of the service. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the service. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. - Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the service's health state is not 'Ok', - this additional details from service fabric Health Manager for the user to - know why the service is marked unhealthy. - :vartype unhealthy_evaluation: str - :param identity_refs: The service identity list. - :type identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :param dns_name: Dns name of the service. - :type dns_name: str - """ - - _validation = { - 'name': {'required': True}, - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'code_packages': {'key': 'properties.codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'properties.networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsRef'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'properties.executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'properties.autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'properties.identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, - } - - def __init__(self, *, name: str, os_type, code_packages, network_refs=None, diagnostics=None, description: str=None, replica_count: int=None, execution_policy=None, auto_scaling_policies=None, identity_refs=None, dns_name: str=None, **kwargs) -> None: - super(ServiceResourceDescription, self).__init__(**kwargs) - self.name = name - self.os_type = os_type - self.code_packages = code_packages - self.network_refs = network_refs - self.diagnostics = diagnostics - self.description = description - self.replica_count = replica_count - self.execution_policy = execution_policy - self.auto_scaling_policies = auto_scaling_policies - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity_refs = identity_refs - self.dns_name = dns_name diff --git a/customSDK/servicefabric/models/service_type_description.py b/customSDK/servicefabric/models/service_type_description.py deleted file mode 100644 index fee4b9fa..00000000 --- a/customSDK/servicefabric/models/service_type_description.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceTypeDescription(Model): - """Describes a service type defined in the service manifest of a provisioned - application type. The properties the ones defined in the service manifest. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceTypeDescription, - StatelessServiceTypeDescription - - All required parameters must be populated in order to send to Azure. - - :param is_stateful: Indicates whether the service type is a stateful - service type or a stateless service type. This property is true if the - service type is a stateful service type, false otherwise. - :type is_stateful: bool - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param placement_constraints: The placement constraint to be used when - instantiating this service in a Service Fabric cluster. - :type placement_constraints: str - :param load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: List of service placement policy - descriptions. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param extensions: List of service type extensions. - :type extensions: - list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Stateful': 'StatefulServiceTypeDescription', 'Stateless': 'StatelessServiceTypeDescription'} - } - - def __init__(self, **kwargs): - super(ServiceTypeDescription, self).__init__(**kwargs) - self.is_stateful = kwargs.get('is_stateful', None) - self.service_type_name = kwargs.get('service_type_name', None) - self.placement_constraints = kwargs.get('placement_constraints', None) - self.load_metrics = kwargs.get('load_metrics', None) - self.service_placement_policies = kwargs.get('service_placement_policies', None) - self.extensions = kwargs.get('extensions', None) - self.kind = None diff --git a/customSDK/servicefabric/models/service_type_description_py3.py b/customSDK/servicefabric/models/service_type_description_py3.py deleted file mode 100644 index e33f2739..00000000 --- a/customSDK/servicefabric/models/service_type_description_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceTypeDescription(Model): - """Describes a service type defined in the service manifest of a provisioned - application type. The properties the ones defined in the service manifest. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceTypeDescription, - StatelessServiceTypeDescription - - All required parameters must be populated in order to send to Azure. - - :param is_stateful: Indicates whether the service type is a stateful - service type or a stateless service type. This property is true if the - service type is a stateful service type, false otherwise. - :type is_stateful: bool - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param placement_constraints: The placement constraint to be used when - instantiating this service in a Service Fabric cluster. - :type placement_constraints: str - :param load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: List of service placement policy - descriptions. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param extensions: List of service type extensions. - :type extensions: - list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :param kind: Required. Constant filled by server. - :type kind: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Stateful': 'StatefulServiceTypeDescription', 'Stateless': 'StatelessServiceTypeDescription'} - } - - def __init__(self, *, is_stateful: bool=None, service_type_name: str=None, placement_constraints: str=None, load_metrics=None, service_placement_policies=None, extensions=None, **kwargs) -> None: - super(ServiceTypeDescription, self).__init__(**kwargs) - self.is_stateful = is_stateful - self.service_type_name = service_type_name - self.placement_constraints = placement_constraints - self.load_metrics = load_metrics - self.service_placement_policies = service_placement_policies - self.extensions = extensions - self.kind = None diff --git a/customSDK/servicefabric/models/service_type_extension_description.py b/customSDK/servicefabric/models/service_type_extension_description.py deleted file mode 100644 index 5eb6e557..00000000 --- a/customSDK/servicefabric/models/service_type_extension_description.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceTypeExtensionDescription(Model): - """Describes extension of a service type defined in the service manifest. - - :param key: The name of the extension. - :type key: str - :param value: The extension value. - :type value: str - """ - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceTypeExtensionDescription, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/service_type_extension_description_py3.py b/customSDK/servicefabric/models/service_type_extension_description_py3.py deleted file mode 100644 index 102934cd..00000000 --- a/customSDK/servicefabric/models/service_type_extension_description_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceTypeExtensionDescription(Model): - """Describes extension of a service type defined in the service manifest. - - :param key: The name of the extension. - :type key: str - :param value: The extension value. - :type value: str - """ - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - } - - def __init__(self, *, key: str=None, value: str=None, **kwargs) -> None: - super(ServiceTypeExtensionDescription, self).__init__(**kwargs) - self.key = key - self.value = value diff --git a/customSDK/servicefabric/models/service_type_health_policy.py b/customSDK/servicefabric/models/service_type_health_policy.py deleted file mode 100644 index ba070169..00000000 --- a/customSDK/servicefabric/models/service_type_health_policy.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceTypeHealthPolicy(Model): - """Represents the health policy used to evaluate the health of services - belonging to a service type. - - :param max_percent_unhealthy_partitions_per_service: The maximum allowed - percentage of unhealthy partitions per service. Allowed values are Byte - values from zero to 100 - The percentage represents the maximum tolerated percentage of partitions - that can be unhealthy before the service is considered in error. - If the percentage is respected but there is at least one unhealthy - partition, the health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy - partitions over the total number of partitions in the service. - The computation rounds up to tolerate one failure on small numbers of - partitions. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_partitions_per_service: int - :param max_percent_unhealthy_replicas_per_partition: The maximum allowed - percentage of unhealthy replicas per partition. Allowed values are Byte - values from zero to 100. - The percentage represents the maximum tolerated percentage of replicas - that can be unhealthy before the partition is considered in error. - If the percentage is respected but there is at least one unhealthy - replica, the health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy replicas - over the total number of replicas in the partition. - The computation rounds up to tolerate one failure on small numbers of - replicas. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_replicas_per_partition: int - :param max_percent_unhealthy_services: The maximum allowed percentage of - unhealthy services. Allowed values are Byte values from zero to 100. - The percentage represents the maximum tolerated percentage of services - that can be unhealthy before the application is considered in error. - If the percentage is respected but there is at least one unhealthy - service, the health is evaluated as Warning. - This is calculated by dividing the number of unhealthy services of the - specific service type over the total number of services of the specific - service type. - The computation rounds up to tolerate one failure on small numbers of - services. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_services: int - """ - - _attribute_map = { - 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, - 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, - 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ServiceTypeHealthPolicy, self).__init__(**kwargs) - self.max_percent_unhealthy_partitions_per_service = kwargs.get('max_percent_unhealthy_partitions_per_service', 0) - self.max_percent_unhealthy_replicas_per_partition = kwargs.get('max_percent_unhealthy_replicas_per_partition', 0) - self.max_percent_unhealthy_services = kwargs.get('max_percent_unhealthy_services', 0) diff --git a/customSDK/servicefabric/models/service_type_health_policy_map_item.py b/customSDK/servicefabric/models/service_type_health_policy_map_item.py deleted file mode 100644 index 6f056b94..00000000 --- a/customSDK/servicefabric/models/service_type_health_policy_map_item.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceTypeHealthPolicyMapItem(Model): - """Defines an item in ServiceTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key of the service type health policy map item. - This is the name of the service type. - :type key: str - :param value: Required. The value of the service type health policy map - item. This is the ServiceTypeHealthPolicy for this service type. - :type value: ~azure.servicefabric.models.ServiceTypeHealthPolicy - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ServiceTypeHealthPolicy'}, - } - - def __init__(self, **kwargs): - super(ServiceTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/service_type_health_policy_map_item_py3.py b/customSDK/servicefabric/models/service_type_health_policy_map_item_py3.py deleted file mode 100644 index 87e5baea..00000000 --- a/customSDK/servicefabric/models/service_type_health_policy_map_item_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceTypeHealthPolicyMapItem(Model): - """Defines an item in ServiceTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key of the service type health policy map item. - This is the name of the service type. - :type key: str - :param value: Required. The value of the service type health policy map - item. This is the ServiceTypeHealthPolicy for this service type. - :type value: ~azure.servicefabric.models.ServiceTypeHealthPolicy - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ServiceTypeHealthPolicy'}, - } - - def __init__(self, *, key: str, value, **kwargs) -> None: - super(ServiceTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = key - self.value = value diff --git a/customSDK/servicefabric/models/service_type_health_policy_py3.py b/customSDK/servicefabric/models/service_type_health_policy_py3.py deleted file mode 100644 index 3cd924d6..00000000 --- a/customSDK/servicefabric/models/service_type_health_policy_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceTypeHealthPolicy(Model): - """Represents the health policy used to evaluate the health of services - belonging to a service type. - - :param max_percent_unhealthy_partitions_per_service: The maximum allowed - percentage of unhealthy partitions per service. Allowed values are Byte - values from zero to 100 - The percentage represents the maximum tolerated percentage of partitions - that can be unhealthy before the service is considered in error. - If the percentage is respected but there is at least one unhealthy - partition, the health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy - partitions over the total number of partitions in the service. - The computation rounds up to tolerate one failure on small numbers of - partitions. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_partitions_per_service: int - :param max_percent_unhealthy_replicas_per_partition: The maximum allowed - percentage of unhealthy replicas per partition. Allowed values are Byte - values from zero to 100. - The percentage represents the maximum tolerated percentage of replicas - that can be unhealthy before the partition is considered in error. - If the percentage is respected but there is at least one unhealthy - replica, the health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy replicas - over the total number of replicas in the partition. - The computation rounds up to tolerate one failure on small numbers of - replicas. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_replicas_per_partition: int - :param max_percent_unhealthy_services: The maximum allowed percentage of - unhealthy services. Allowed values are Byte values from zero to 100. - The percentage represents the maximum tolerated percentage of services - that can be unhealthy before the application is considered in error. - If the percentage is respected but there is at least one unhealthy - service, the health is evaluated as Warning. - This is calculated by dividing the number of unhealthy services of the - specific service type over the total number of services of the specific - service type. - The computation rounds up to tolerate one failure on small numbers of - services. Default percentage is zero. Default value: 0 . - :type max_percent_unhealthy_services: int - """ - - _attribute_map = { - 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, - 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, - 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, - } - - def __init__(self, *, max_percent_unhealthy_partitions_per_service: int=0, max_percent_unhealthy_replicas_per_partition: int=0, max_percent_unhealthy_services: int=0, **kwargs) -> None: - super(ServiceTypeHealthPolicy, self).__init__(**kwargs) - self.max_percent_unhealthy_partitions_per_service = max_percent_unhealthy_partitions_per_service - self.max_percent_unhealthy_replicas_per_partition = max_percent_unhealthy_replicas_per_partition - self.max_percent_unhealthy_services = max_percent_unhealthy_services diff --git a/customSDK/servicefabric/models/service_type_info.py b/customSDK/servicefabric/models/service_type_info.py deleted file mode 100644 index 64866aa2..00000000 --- a/customSDK/servicefabric/models/service_type_info.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceTypeInfo(Model): - """Information about a service type that is defined in a service manifest of a - provisioned application type. - - :param service_type_description: Describes a service type defined in the - service manifest of a provisioned application type. The properties the - ones defined in the service manifest. - :type service_type_description: - ~azure.servicefabric.models.ServiceTypeDescription - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param service_manifest_version: The version of the service manifest in - which this service type is defined. - :type service_manifest_version: str - :param is_service_group: Indicates whether the service is a service group. - If it is, the property value is true otherwise false. - :type is_service_group: bool - """ - - _attribute_map = { - 'service_type_description': {'key': 'ServiceTypeDescription', 'type': 'ServiceTypeDescription'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ServiceTypeInfo, self).__init__(**kwargs) - self.service_type_description = kwargs.get('service_type_description', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_manifest_version = kwargs.get('service_manifest_version', None) - self.is_service_group = kwargs.get('is_service_group', None) diff --git a/customSDK/servicefabric/models/service_type_info_py3.py b/customSDK/servicefabric/models/service_type_info_py3.py deleted file mode 100644 index 9c8bd629..00000000 --- a/customSDK/servicefabric/models/service_type_info_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceTypeInfo(Model): - """Information about a service type that is defined in a service manifest of a - provisioned application type. - - :param service_type_description: Describes a service type defined in the - service manifest of a provisioned application type. The properties the - ones defined in the service manifest. - :type service_type_description: - ~azure.servicefabric.models.ServiceTypeDescription - :param service_manifest_name: The name of the service manifest in which - this service type is defined. - :type service_manifest_name: str - :param service_manifest_version: The version of the service manifest in - which this service type is defined. - :type service_manifest_version: str - :param is_service_group: Indicates whether the service is a service group. - If it is, the property value is true otherwise false. - :type is_service_group: bool - """ - - _attribute_map = { - 'service_type_description': {'key': 'ServiceTypeDescription', 'type': 'ServiceTypeDescription'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - } - - def __init__(self, *, service_type_description=None, service_manifest_name: str=None, service_manifest_version: str=None, is_service_group: bool=None, **kwargs) -> None: - super(ServiceTypeInfo, self).__init__(**kwargs) - self.service_type_description = service_type_description - self.service_manifest_name = service_manifest_name - self.service_manifest_version = service_manifest_version - self.is_service_group = is_service_group diff --git a/customSDK/servicefabric/models/service_type_manifest.py b/customSDK/servicefabric/models/service_type_manifest.py deleted file mode 100644 index 295a4b25..00000000 --- a/customSDK/servicefabric/models/service_type_manifest.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceTypeManifest(Model): - """Contains the manifest describing a service type registered as part of an - application in a Service Fabric cluster. - - :param manifest: The XML manifest as a string. - :type manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceTypeManifest, self).__init__(**kwargs) - self.manifest = kwargs.get('manifest', None) diff --git a/customSDK/servicefabric/models/service_type_manifest_py3.py b/customSDK/servicefabric/models/service_type_manifest_py3.py deleted file mode 100644 index 5ffbd26d..00000000 --- a/customSDK/servicefabric/models/service_type_manifest_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceTypeManifest(Model): - """Contains the manifest describing a service type registered as part of an - application in a Service Fabric cluster. - - :param manifest: The XML manifest as a string. - :type manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__(self, *, manifest: str=None, **kwargs) -> None: - super(ServiceTypeManifest, self).__init__(**kwargs) - self.manifest = manifest diff --git a/customSDK/servicefabric/models/service_update_description.py b/customSDK/servicefabric/models/service_update_description.py deleted file mode 100644 index bd7a1678..00000000 --- a/customSDK/servicefabric/models/service_update_description.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceUpdateDescription(Model): - """A ServiceUpdateDescription contains all of the information necessary to - update a service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceUpdateDescription, - StatelessServiceUpdateDescription - - All required parameters must be populated in order to send to Azure. - - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 6 then the flags for - ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. - - None - Does not indicate any other properties are set. The value is - zero. - - TargetReplicaSetSize/InstanceCount - Indicates whether the - TargetReplicaSetSize property (for Stateful services) or the InstanceCount - property (for Stateless services) is set. The value is 1. - - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - property is set. The value is 2. - - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property - is set. The value is 4. - - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - property is set. The value is 8. - - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The - value is 16. - - PlacementConstraints - Indicates the PlacementConstraints property is - set. The value is 32. - - PlacementPolicyList - Indicates the ServicePlacementPolicies property is - set. The value is 64. - - Correlation - Indicates the CorrelationScheme property is set. The value - is 128. - - Metrics - Indicates the ServiceLoadMetrics property is set. The value is - 256. - - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The - value is 512. - - ScalingPolicy - Indicates the ScalingPolicies property is set. The value - is 1024. - - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit - property is set. The value is 2048. - - MinInstanceCount - Indicates the MinInstanceCount property is set. The - value is 4096. - - MinInstancePercentage - Indicates the MinInstancePercentage property is - set. The value is 8192. - - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 16384. - - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 32768. - - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property - is set. The value is 65536. - - ServiceDnsName - Indicates the ServiceDnsName property is set. The value - is 131072. - - TagsForPlacement - Indicates the TagsForPlacement property is set. The - value is 1048576. - - TagsForRunning - Indicates the TagsForRunning property is set. The value - is 2097152. - :type flags: str - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param load_metrics: The service load metrics. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param service_dns_name: The DNS name of the service. - :type service_dns_name: str - :param tags_for_placement: Tags for placement of this service. - :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :param tags_for_running: Tags for running of this service. - :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceUpdateDescription', 'Stateless': 'StatelessServiceUpdateDescription'} - } - - def __init__(self, **kwargs): - super(ServiceUpdateDescription, self).__init__(**kwargs) - self.flags = kwargs.get('flags', None) - self.placement_constraints = kwargs.get('placement_constraints', None) - self.correlation_scheme = kwargs.get('correlation_scheme', None) - self.load_metrics = kwargs.get('load_metrics', None) - self.service_placement_policies = kwargs.get('service_placement_policies', None) - self.default_move_cost = kwargs.get('default_move_cost', None) - self.scaling_policies = kwargs.get('scaling_policies', None) - self.service_dns_name = kwargs.get('service_dns_name', None) - self.tags_for_placement = kwargs.get('tags_for_placement', None) - self.tags_for_running = kwargs.get('tags_for_running', None) - self.service_kind = None diff --git a/customSDK/servicefabric/models/service_update_description_py3.py b/customSDK/servicefabric/models/service_update_description_py3.py deleted file mode 100644 index 957edcea..00000000 --- a/customSDK/servicefabric/models/service_update_description_py3.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceUpdateDescription(Model): - """A ServiceUpdateDescription contains all of the information necessary to - update a service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceUpdateDescription, - StatelessServiceUpdateDescription - - All required parameters must be populated in order to send to Azure. - - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 6 then the flags for - ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. - - None - Does not indicate any other properties are set. The value is - zero. - - TargetReplicaSetSize/InstanceCount - Indicates whether the - TargetReplicaSetSize property (for Stateful services) or the InstanceCount - property (for Stateless services) is set. The value is 1. - - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - property is set. The value is 2. - - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property - is set. The value is 4. - - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - property is set. The value is 8. - - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The - value is 16. - - PlacementConstraints - Indicates the PlacementConstraints property is - set. The value is 32. - - PlacementPolicyList - Indicates the ServicePlacementPolicies property is - set. The value is 64. - - Correlation - Indicates the CorrelationScheme property is set. The value - is 128. - - Metrics - Indicates the ServiceLoadMetrics property is set. The value is - 256. - - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The - value is 512. - - ScalingPolicy - Indicates the ScalingPolicies property is set. The value - is 1024. - - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit - property is set. The value is 2048. - - MinInstanceCount - Indicates the MinInstanceCount property is set. The - value is 4096. - - MinInstancePercentage - Indicates the MinInstancePercentage property is - set. The value is 8192. - - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 16384. - - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 32768. - - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property - is set. The value is 65536. - - ServiceDnsName - Indicates the ServiceDnsName property is set. The value - is 131072. - - TagsForPlacement - Indicates the TagsForPlacement property is set. The - value is 1048576. - - TagsForRunning - Indicates the TagsForRunning property is set. The value - is 2097152. - :type flags: str - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param load_metrics: The service load metrics. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param service_dns_name: The DNS name of the service. - :type service_dns_name: str - :param tags_for_placement: Tags for placement of this service. - :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :param tags_for_running: Tags for running of this service. - :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceUpdateDescription', 'Stateless': 'StatelessServiceUpdateDescription'} - } - - def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, **kwargs) -> None: - super(ServiceUpdateDescription, self).__init__(**kwargs) - self.flags = flags - self.placement_constraints = placement_constraints - self.correlation_scheme = correlation_scheme - self.load_metrics = load_metrics - self.service_placement_policies = service_placement_policies - self.default_move_cost = default_move_cost - self.scaling_policies = scaling_policies - self.service_dns_name = service_dns_name - self.tags_for_placement = tags_for_placement - self.tags_for_running = tags_for_running - self.service_kind = None diff --git a/customSDK/servicefabric/models/service_upgrade_progress.py b/customSDK/servicefabric/models/service_upgrade_progress.py deleted file mode 100644 index 22c0adc7..00000000 --- a/customSDK/servicefabric/models/service_upgrade_progress.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceUpgradeProgress(Model): - """Information about how many replicas are completed or pending for a specific - service during upgrade. - - :param service_name: Name of the Service resource. - :type service_name: str - :param completed_replica_count: The number of replicas that completes the - upgrade in the service. - :type completed_replica_count: str - :param pending_replica_count: The number of replicas that are waiting to - be upgraded in the service. - :type pending_replica_count: str - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'completed_replica_count': {'key': 'CompletedReplicaCount', 'type': 'str'}, - 'pending_replica_count': {'key': 'PendingReplicaCount', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceUpgradeProgress, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.completed_replica_count = kwargs.get('completed_replica_count', None) - self.pending_replica_count = kwargs.get('pending_replica_count', None) diff --git a/customSDK/servicefabric/models/service_upgrade_progress_py3.py b/customSDK/servicefabric/models/service_upgrade_progress_py3.py deleted file mode 100644 index f060cbb1..00000000 --- a/customSDK/servicefabric/models/service_upgrade_progress_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceUpgradeProgress(Model): - """Information about how many replicas are completed or pending for a specific - service during upgrade. - - :param service_name: Name of the Service resource. - :type service_name: str - :param completed_replica_count: The number of replicas that completes the - upgrade in the service. - :type completed_replica_count: str - :param pending_replica_count: The number of replicas that are waiting to - be upgraded in the service. - :type pending_replica_count: str - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'completed_replica_count': {'key': 'CompletedReplicaCount', 'type': 'str'}, - 'pending_replica_count': {'key': 'PendingReplicaCount', 'type': 'str'}, - } - - def __init__(self, *, service_name: str=None, completed_replica_count: str=None, pending_replica_count: str=None, **kwargs) -> None: - super(ServiceUpgradeProgress, self).__init__(**kwargs) - self.service_name = service_name - self.completed_replica_count = completed_replica_count - self.pending_replica_count = pending_replica_count diff --git a/customSDK/servicefabric/models/services_health_evaluation.py b/customSDK/servicefabric/models/services_health_evaluation.py deleted file mode 100644 index 55a34373..00000000 --- a/customSDK/servicefabric/models/services_health_evaluation.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class ServicesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for services of a certain service type - belonging to an application, containing health evaluations for each - unhealthy service that impacted current aggregated health state. Can be - returned when evaluating application health and the aggregated health state - is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param service_type_name: Name of the service type of the services. - :type service_type_name: str - :param max_percent_unhealthy_services: Maximum allowed percentage of - unhealthy services from the ServiceTypeHealthPolicy. - :type max_percent_unhealthy_services: int - :param total_count: Total number of services of the current service type - in the application from the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - ServiceHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(ServicesHealthEvaluation, self).__init__(**kwargs) - self.service_type_name = kwargs.get('service_type_name', None) - self.max_percent_unhealthy_services = kwargs.get('max_percent_unhealthy_services', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'Services' diff --git a/customSDK/servicefabric/models/services_health_evaluation_py3.py b/customSDK/servicefabric/models/services_health_evaluation_py3.py deleted file mode 100644 index 46e51393..00000000 --- a/customSDK/servicefabric/models/services_health_evaluation_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class ServicesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for services of a certain service type - belonging to an application, containing health evaluations for each - unhealthy service that impacted current aggregated health state. Can be - returned when evaluating application health and the aggregated health state - is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param service_type_name: Name of the service type of the services. - :type service_type_name: str - :param max_percent_unhealthy_services: Maximum allowed percentage of - unhealthy services from the ServiceTypeHealthPolicy. - :type max_percent_unhealthy_services: int - :param total_count: Total number of services of the current service type - in the application from the health store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - ServiceHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, service_type_name: str=None, max_percent_unhealthy_services: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(ServicesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.service_type_name = service_type_name - self.max_percent_unhealthy_services = max_percent_unhealthy_services - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'Services' diff --git a/customSDK/servicefabric/models/setting.py b/customSDK/servicefabric/models/setting.py deleted file mode 100644 index 850ffb06..00000000 --- a/customSDK/servicefabric/models/setting.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Setting(Model): - """Describes a setting for the container. The setting file path can be fetched - from environment variable "Fabric_SettingPath". The path for Windows - container is "C:\\secrets". The path for Linux container is "/var/secrets". - - :param type: The type of the setting being given in value. Possible values - include: 'ClearText', 'KeyVaultReference', 'SecretValueReference'. Default - value: "ClearText" . - :type type: str or ~azure.servicefabric.models.SettingType - :param name: The name of the setting. - :type name: str - :param value: The value of the setting, will be processed based on the - type provided. - :type value: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Setting, self).__init__(**kwargs) - self.type = kwargs.get('type', "ClearText") - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/customSDK/servicefabric/models/setting_py3.py b/customSDK/servicefabric/models/setting_py3.py deleted file mode 100644 index 8e51284c..00000000 --- a/customSDK/servicefabric/models/setting_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Setting(Model): - """Describes a setting for the container. The setting file path can be fetched - from environment variable "Fabric_SettingPath". The path for Windows - container is "C:\\secrets". The path for Linux container is "/var/secrets". - - :param type: The type of the setting being given in value. Possible values - include: 'ClearText', 'KeyVaultReference', 'SecretValueReference'. Default - value: "ClearText" . - :type type: str or ~azure.servicefabric.models.SettingType - :param name: The name of the setting. - :type name: str - :param value: The value of the setting, will be processed based on the - type provided. - :type value: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, type="ClearText", name: str=None, value: str=None, **kwargs) -> None: - super(Setting, self).__init__(**kwargs) - self.type = type - self.name = name - self.value = value diff --git a/customSDK/servicefabric/models/singleton_partition_information.py b/customSDK/servicefabric/models/singleton_partition_information.py deleted file mode 100644 index cb7eceb9..00000000 --- a/customSDK/servicefabric/models/singleton_partition_information.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_information import PartitionInformation - - -class SingletonPartitionInformation(PartitionInformation): - """Information about a partition that is singleton. The services with - singleton partitioning scheme are effectively non-partitioned. They only - have one partition. - - All required parameters must be populated in order to send to Azure. - - :param id: An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. - The partition ID is unique and does not change for the lifetime of the - service. If the same service was deleted and recreated the IDs of its - partitions would be different. - :type id: str - :param service_partition_kind: Required. Constant filled by server. - :type service_partition_kind: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SingletonPartitionInformation, self).__init__(**kwargs) - self.service_partition_kind = 'Singleton' diff --git a/customSDK/servicefabric/models/singleton_partition_information_py3.py b/customSDK/servicefabric/models/singleton_partition_information_py3.py deleted file mode 100644 index d1cc3f76..00000000 --- a/customSDK/servicefabric/models/singleton_partition_information_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_information_py3 import PartitionInformation - - -class SingletonPartitionInformation(PartitionInformation): - """Information about a partition that is singleton. The services with - singleton partitioning scheme are effectively non-partitioned. They only - have one partition. - - All required parameters must be populated in order to send to Azure. - - :param id: An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. - The partition ID is unique and does not change for the lifetime of the - service. If the same service was deleted and recreated the IDs of its - partitions would be different. - :type id: str - :param service_partition_kind: Required. Constant filled by server. - :type service_partition_kind: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SingletonPartitionInformation, self).__init__(id=id, **kwargs) - self.service_partition_kind = 'Singleton' diff --git a/customSDK/servicefabric/models/singleton_partition_scheme_description.py b/customSDK/servicefabric/models/singleton_partition_scheme_description.py deleted file mode 100644 index 992031dc..00000000 --- a/customSDK/servicefabric/models/singleton_partition_scheme_description.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_scheme_description import PartitionSchemeDescription - - -class SingletonPartitionSchemeDescription(PartitionSchemeDescription): - """Describes the partition scheme of a singleton-partitioned, or - non-partitioned service. - - All required parameters must be populated in order to send to Azure. - - :param partition_scheme: Required. Constant filled by server. - :type partition_scheme: str - """ - - _validation = { - 'partition_scheme': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SingletonPartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = 'Singleton' diff --git a/customSDK/servicefabric/models/singleton_partition_scheme_description_py3.py b/customSDK/servicefabric/models/singleton_partition_scheme_description_py3.py deleted file mode 100644 index df9cdb2d..00000000 --- a/customSDK/servicefabric/models/singleton_partition_scheme_description_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_scheme_description_py3 import PartitionSchemeDescription - - -class SingletonPartitionSchemeDescription(PartitionSchemeDescription): - """Describes the partition scheme of a singleton-partitioned, or - non-partitioned service. - - All required parameters must be populated in order to send to Azure. - - :param partition_scheme: Required. Constant filled by server. - :type partition_scheme: str - """ - - _validation = { - 'partition_scheme': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SingletonPartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = 'Singleton' diff --git a/customSDK/servicefabric/models/start_cluster_upgrade_description.py b/customSDK/servicefabric/models/start_cluster_upgrade_description.py deleted file mode 100644 index 68d639e9..00000000 --- a/customSDK/servicefabric/models/start_cluster_upgrade_description.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StartClusterUpgradeDescription(Model): - """Describes the parameters for starting a cluster upgrade. - - :param code_version: The cluster code version. - :type code_version: str - :param config_version: The cluster configuration version. - :type config_version: str - :param upgrade_kind: The kind of upgrade out of the following possible - values. Possible values include: 'Invalid', 'Rolling'. Default value: - "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, - Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', - 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', - 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param sort_order: Defines the order in which an upgrade proceeds through - the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', - 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default - value: "Default" . - :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param enable_delta_health_evaluation: When true, enables delta health - evaluation rather than absolute health evaluation after completion of each - upgrade domain. - :type enable_delta_health_evaluation: bool - :param cluster_upgrade_health_policy: Defines a health policy used to - evaluate the health of the cluster during a cluster upgrade. - :type cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :param application_health_policy_map: Defines the application health - policy map used to evaluate the health of an application or one of its - children entities. - :type application_health_policy_map: - ~azure.servicefabric.models.ApplicationHealthPolicies - :param instance_close_delay_duration_in_seconds: Duration in seconds, to - wait before a stateless instance is closed, to allow the active requests - to drain gracefully. This would be effective when the instance is closing - during the application/cluster - upgrade, only for those instances which have a non-zero delay duration - configured in the service description. See - InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is - 4294967295, which indicates that the behavior will entirely depend on the - delay configured in the stateless service description. - :type instance_close_delay_duration_in_seconds: long - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(StartClusterUpgradeDescription, self).__init__(**kwargs) - self.code_version = kwargs.get('code_version', None) - self.config_version = kwargs.get('config_version', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', None) - self.force_restart = kwargs.get('force_restart', None) - self.sort_order = kwargs.get('sort_order', "Default") - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) - self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) - self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', None) diff --git a/customSDK/servicefabric/models/start_cluster_upgrade_description_py3.py b/customSDK/servicefabric/models/start_cluster_upgrade_description_py3.py deleted file mode 100644 index 719ba635..00000000 --- a/customSDK/servicefabric/models/start_cluster_upgrade_description_py3.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StartClusterUpgradeDescription(Model): - """Describes the parameters for starting a cluster upgrade. - - :param code_version: The cluster code version. - :type code_version: str - :param config_version: The cluster configuration version. - :type config_version: str - :param upgrade_kind: The kind of upgrade out of the following possible - values. Possible values include: 'Invalid', 'Rolling'. Default value: - "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :param rolling_upgrade_mode: The mode used to monitor health during a - rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, - Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', - 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', - 'UnmonitoredDeferred'. Default value: "UnmonitoredAuto" . - :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of - time to block processing of an upgrade domain and prevent loss of - availability when there are unexpected issues. When this timeout expires, - processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. - Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit - integer). - :type upgrade_replica_set_check_timeout_in_seconds: long - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). - :type force_restart: bool - :param sort_order: Defines the order in which an upgrade proceeds through - the cluster. Possible values include: 'Invalid', 'Default', 'Numeric', - 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'. Default - value: "Default" . - :type sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :param monitoring_policy: Describes the parameters for monitoring an - upgrade in Monitored mode. - :type monitoring_policy: - ~azure.servicefabric.models.MonitoringPolicyDescription - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param enable_delta_health_evaluation: When true, enables delta health - evaluation rather than absolute health evaluation after completion of each - upgrade domain. - :type enable_delta_health_evaluation: bool - :param cluster_upgrade_health_policy: Defines a health policy used to - evaluate the health of the cluster during a cluster upgrade. - :type cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :param application_health_policy_map: Defines the application health - policy map used to evaluate the health of an application or one of its - children entities. - :type application_health_policy_map: - ~azure.servicefabric.models.ApplicationHealthPolicies - :param instance_close_delay_duration_in_seconds: Duration in seconds, to - wait before a stateless instance is closed, to allow the active requests - to drain gracefully. This would be effective when the instance is closing - during the application/cluster - upgrade, only for those instances which have a non-zero delay duration - configured in the service description. See - InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is - 4294967295, which indicates that the behavior will entirely depend on the - delay configured in the stateless service description. - :type instance_close_delay_duration_in_seconds: long - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - } - - def __init__(self, *, code_version: str=None, config_version: str=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", monitoring_policy=None, cluster_health_policy=None, enable_delta_health_evaluation: bool=None, cluster_upgrade_health_policy=None, application_health_policy_map=None, instance_close_delay_duration_in_seconds: int=None, **kwargs) -> None: - super(StartClusterUpgradeDescription, self).__init__(**kwargs) - self.code_version = code_version - self.config_version = config_version - self.upgrade_kind = upgrade_kind - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.force_restart = force_restart - self.sort_order = sort_order - self.monitoring_policy = monitoring_policy - self.cluster_health_policy = cluster_health_policy - self.enable_delta_health_evaluation = enable_delta_health_evaluation - self.cluster_upgrade_health_policy = cluster_upgrade_health_policy - self.application_health_policy_map = application_health_policy_map - self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds diff --git a/customSDK/servicefabric/models/started_chaos_event.py b/customSDK/servicefabric/models/started_chaos_event.py deleted file mode 100644 index 49dfaba2..00000000 --- a/customSDK/servicefabric/models/started_chaos_event.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .chaos_event import ChaosEvent - - -class StartedChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos is started. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param chaos_parameters: Defines all the parameters to configure a Chaos - run. - :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, - } - - def __init__(self, **kwargs): - super(StartedChaosEvent, self).__init__(**kwargs) - self.chaos_parameters = kwargs.get('chaos_parameters', None) - self.kind = 'Started' diff --git a/customSDK/servicefabric/models/started_chaos_event_py3.py b/customSDK/servicefabric/models/started_chaos_event_py3.py deleted file mode 100644 index 0aaf9f02..00000000 --- a/customSDK/servicefabric/models/started_chaos_event_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .chaos_event_py3 import ChaosEvent - - -class StartedChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos is started. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param chaos_parameters: Defines all the parameters to configure a Chaos - run. - :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, - } - - def __init__(self, *, time_stamp_utc, chaos_parameters=None, **kwargs) -> None: - super(StartedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.chaos_parameters = chaos_parameters - self.kind = 'Started' diff --git a/customSDK/servicefabric/models/stateful_replica_health_report_expired_event.py b/customSDK/servicefabric/models/stateful_replica_health_report_expired_event.py deleted file mode 100644 index 04171729..00000000 --- a/customSDK/servicefabric/models/stateful_replica_health_report_expired_event.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_event import ReplicaEvent - - -class StatefulReplicaHealthReportExpiredEvent(ReplicaEvent): - """Stateful Replica Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param replica_instance_id: Required. Id of Replica instance. - :type replica_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'replica_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(StatefulReplicaHealthReportExpiredEvent, self).__init__(**kwargs) - self.replica_instance_id = kwargs.get('replica_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'StatefulReplicaHealthReportExpired' diff --git a/customSDK/servicefabric/models/stateful_replica_health_report_expired_event_py3.py b/customSDK/servicefabric/models/stateful_replica_health_report_expired_event_py3.py deleted file mode 100644 index e5880687..00000000 --- a/customSDK/servicefabric/models/stateful_replica_health_report_expired_event_py3.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_event_py3 import ReplicaEvent - - -class StatefulReplicaHealthReportExpiredEvent(ReplicaEvent): - """Stateful Replica Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param replica_instance_id: Required. Id of Replica instance. - :type replica_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'replica_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, replica_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(StatefulReplicaHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.replica_instance_id = replica_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'StatefulReplicaHealthReportExpired' diff --git a/customSDK/servicefabric/models/stateful_replica_new_health_report_event.py b/customSDK/servicefabric/models/stateful_replica_new_health_report_event.py deleted file mode 100644 index ac36335b..00000000 --- a/customSDK/servicefabric/models/stateful_replica_new_health_report_event.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_event import ReplicaEvent - - -class StatefulReplicaNewHealthReportEvent(ReplicaEvent): - """Stateful Replica Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param replica_instance_id: Required. Id of Replica instance. - :type replica_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'replica_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(StatefulReplicaNewHealthReportEvent, self).__init__(**kwargs) - self.replica_instance_id = kwargs.get('replica_instance_id', None) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'StatefulReplicaNewHealthReport' diff --git a/customSDK/servicefabric/models/stateful_replica_new_health_report_event_py3.py b/customSDK/servicefabric/models/stateful_replica_new_health_report_event_py3.py deleted file mode 100644 index 0ce0b6db..00000000 --- a/customSDK/servicefabric/models/stateful_replica_new_health_report_event_py3.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_event_py3 import ReplicaEvent - - -class StatefulReplicaNewHealthReportEvent(ReplicaEvent): - """Stateful Replica Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param replica_instance_id: Required. Id of Replica instance. - :type replica_instance_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'replica_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, replica_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(StatefulReplicaNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.replica_instance_id = replica_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'StatefulReplicaNewHealthReport' diff --git a/customSDK/servicefabric/models/stateful_service_description.py b/customSDK/servicefabric/models/stateful_service_description.py deleted file mode 100644 index 5ebad257..00000000 --- a/customSDK/servicefabric/models/stateful_service_description.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_description import ServiceDescription - - -class StatefulServiceDescription(ServiceDescription): - """Describes a stateful service. - - All required parameters must be populated in order to send to Azure. - - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_name: Required. The full name of the service with 'fabric:' - URI scheme. - :type service_name: str - :param service_type_name: Required. Name of the service type as specified - in the service manifest. - :type service_type_name: str - :param initialization_data: The initialization data as an array of bytes. - Initialization data is passed to service instances or replicas when they - are created. - :type initialization_data: list[int] - :param partition_description: Required. The partition description as an - object. - :type partition_description: - ~azure.servicefabric.models.PartitionSchemeDescription - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics. - :type service_load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param is_default_move_cost_specified: Indicates if the DefaultMoveCost - property is specified. - :type is_default_move_cost_specified: bool - :param service_package_activation_mode: The activation mode of service - package to be used for a service. Possible values include: - 'SharedProcess', 'ExclusiveProcess' - :type service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS - system service to be enabled in Service Fabric cluster. - :type service_dns_name: str - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param tags_required_to_place: Tags for placement of this service. - :type tags_required_to_place: - ~azure.servicefabric.models.NodeTagsDescription - :param tags_required_to_run: Tags for running of this service. - :type tags_required_to_run: - ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param target_replica_set_size: Required. The target replica set size as a - number. - :type target_replica_set_size: int - :param min_replica_set_size: Required. The minimum replica set size as a - number. - :type min_replica_set_size: int - :param has_persisted_state: Required. A flag indicating whether this is a - persistent service which stores states on the local disk. If it is then - the value of this property is true, if not it is false. - :type has_persisted_state: bool - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 6 then the flags for - QuorumLossWaitDuration (2) and StandByReplicaKeepDuration(4) are set. - - None - Does not indicate any other properties are set. The value is - zero. - - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - property is set. The value is 1. - - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property - is set. The value is 2. - - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - property is set. The value is 4. - - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit - property is set. The value is 8. - - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property - is set. The value is 16. - :type flags: int - :param replica_restart_wait_duration_seconds: The duration, in seconds, - between when a replica goes down and when a new replica is created. - :type replica_restart_wait_duration_seconds: long - :param quorum_loss_wait_duration_seconds: The maximum duration, in - seconds, for which a partition is allowed to be in a state of quorum loss. - :type quorum_loss_wait_duration_seconds: long - :param stand_by_replica_keep_duration_seconds: The definition on how long - StandBy replicas should be maintained before being removed. - :type stand_by_replica_keep_duration_seconds: long - :param service_placement_time_limit_seconds: The duration for which - replicas can stay InBuild before reporting that build is stuck. - :type service_placement_time_limit_seconds: long - :param drop_source_replica_on_move: Indicates whether to drop source - Secondary replica even if the target replica has not finished build. If - desired behavior is to drop it as soon as possible the value of this - property is true, if not it is false. - :type drop_source_replica_on_move: bool - :param replica_lifecycle_description: Defines how replicas of this service - will behave during ther lifecycle. - :type replica_lifecycle_description: - ~azure.servicefabric.models.ReplicaLifecycleDescription - :param auxiliary_replica_count: The auxiliary replica count as a number. - To use Auxiliary replicas, the following must be true: - AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :type auxiliary_replica_count: int - """ - - _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, - 'target_replica_set_size': {'required': True, 'minimum': 1}, - 'min_replica_set_size': {'required': True, 'minimum': 1}, - 'has_persisted_state': {'required': True}, - 'replica_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'quorum_loss_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'stand_by_replica_keep_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'service_placement_time_limit_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'auxiliary_replica_count': {'minimum': 0}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'long'}, - 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'long'}, - 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'long'}, - 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'long'}, - 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, - 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(StatefulServiceDescription, self).__init__(**kwargs) - self.target_replica_set_size = kwargs.get('target_replica_set_size', None) - self.min_replica_set_size = kwargs.get('min_replica_set_size', None) - self.has_persisted_state = kwargs.get('has_persisted_state', None) - self.flags = kwargs.get('flags', None) - self.replica_restart_wait_duration_seconds = kwargs.get('replica_restart_wait_duration_seconds', None) - self.quorum_loss_wait_duration_seconds = kwargs.get('quorum_loss_wait_duration_seconds', None) - self.stand_by_replica_keep_duration_seconds = kwargs.get('stand_by_replica_keep_duration_seconds', None) - self.service_placement_time_limit_seconds = kwargs.get('service_placement_time_limit_seconds', None) - self.drop_source_replica_on_move = kwargs.get('drop_source_replica_on_move', None) - self.replica_lifecycle_description = kwargs.get('replica_lifecycle_description', None) - self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_description_py3.py b/customSDK/servicefabric/models/stateful_service_description_py3.py deleted file mode 100644 index ebb9f713..00000000 --- a/customSDK/servicefabric/models/stateful_service_description_py3.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_description_py3 import ServiceDescription - - -class StatefulServiceDescription(ServiceDescription): - """Describes a stateful service. - - All required parameters must be populated in order to send to Azure. - - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_name: Required. The full name of the service with 'fabric:' - URI scheme. - :type service_name: str - :param service_type_name: Required. Name of the service type as specified - in the service manifest. - :type service_type_name: str - :param initialization_data: The initialization data as an array of bytes. - Initialization data is passed to service instances or replicas when they - are created. - :type initialization_data: list[int] - :param partition_description: Required. The partition description as an - object. - :type partition_description: - ~azure.servicefabric.models.PartitionSchemeDescription - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics. - :type service_load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param is_default_move_cost_specified: Indicates if the DefaultMoveCost - property is specified. - :type is_default_move_cost_specified: bool - :param service_package_activation_mode: The activation mode of service - package to be used for a service. Possible values include: - 'SharedProcess', 'ExclusiveProcess' - :type service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS - system service to be enabled in Service Fabric cluster. - :type service_dns_name: str - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param tags_required_to_place: Tags for placement of this service. - :type tags_required_to_place: - ~azure.servicefabric.models.NodeTagsDescription - :param tags_required_to_run: Tags for running of this service. - :type tags_required_to_run: - ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param target_replica_set_size: Required. The target replica set size as a - number. - :type target_replica_set_size: int - :param min_replica_set_size: Required. The minimum replica set size as a - number. - :type min_replica_set_size: int - :param has_persisted_state: Required. A flag indicating whether this is a - persistent service which stores states on the local disk. If it is then - the value of this property is true, if not it is false. - :type has_persisted_state: bool - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 6 then the flags for - QuorumLossWaitDuration (2) and StandByReplicaKeepDuration(4) are set. - - None - Does not indicate any other properties are set. The value is - zero. - - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - property is set. The value is 1. - - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property - is set. The value is 2. - - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - property is set. The value is 4. - - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit - property is set. The value is 8. - - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property - is set. The value is 16. - :type flags: int - :param replica_restart_wait_duration_seconds: The duration, in seconds, - between when a replica goes down and when a new replica is created. - :type replica_restart_wait_duration_seconds: long - :param quorum_loss_wait_duration_seconds: The maximum duration, in - seconds, for which a partition is allowed to be in a state of quorum loss. - :type quorum_loss_wait_duration_seconds: long - :param stand_by_replica_keep_duration_seconds: The definition on how long - StandBy replicas should be maintained before being removed. - :type stand_by_replica_keep_duration_seconds: long - :param service_placement_time_limit_seconds: The duration for which - replicas can stay InBuild before reporting that build is stuck. - :type service_placement_time_limit_seconds: long - :param drop_source_replica_on_move: Indicates whether to drop source - Secondary replica even if the target replica has not finished build. If - desired behavior is to drop it as soon as possible the value of this - property is true, if not it is false. - :type drop_source_replica_on_move: bool - :param replica_lifecycle_description: Defines how replicas of this service - will behave during ther lifecycle. - :type replica_lifecycle_description: - ~azure.servicefabric.models.ReplicaLifecycleDescription - :param auxiliary_replica_count: The auxiliary replica count as a number. - To use Auxiliary replicas, the following must be true: - AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :type auxiliary_replica_count: int - """ - - _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, - 'target_replica_set_size': {'required': True, 'minimum': 1}, - 'min_replica_set_size': {'required': True, 'minimum': 1}, - 'has_persisted_state': {'required': True}, - 'replica_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'quorum_loss_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'stand_by_replica_keep_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'service_placement_time_limit_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'auxiliary_replica_count': {'minimum': 0}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'long'}, - 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'long'}, - 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'long'}, - 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'long'}, - 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, - 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, - } - - def __init__(self, *, service_name: str, service_type_name: str, partition_description, target_replica_set_size: int, min_replica_set_size: int, has_persisted_state: bool, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, flags: int=None, replica_restart_wait_duration_seconds: int=None, quorum_loss_wait_duration_seconds: int=None, stand_by_replica_keep_duration_seconds: int=None, service_placement_time_limit_seconds: int=None, drop_source_replica_on_move: bool=None, replica_lifecycle_description=None, auxiliary_replica_count: int=None, **kwargs) -> None: - super(StatefulServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, tags_required_to_place=tags_required_to_place, tags_required_to_run=tags_required_to_run, **kwargs) - self.target_replica_set_size = target_replica_set_size - self.min_replica_set_size = min_replica_set_size - self.has_persisted_state = has_persisted_state - self.flags = flags - self.replica_restart_wait_duration_seconds = replica_restart_wait_duration_seconds - self.quorum_loss_wait_duration_seconds = quorum_loss_wait_duration_seconds - self.stand_by_replica_keep_duration_seconds = stand_by_replica_keep_duration_seconds - self.service_placement_time_limit_seconds = service_placement_time_limit_seconds - self.drop_source_replica_on_move = drop_source_replica_on_move - self.replica_lifecycle_description = replica_lifecycle_description - self.auxiliary_replica_count = auxiliary_replica_count - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_info.py b/customSDK/servicefabric/models/stateful_service_info.py deleted file mode 100644 index 38bf04d8..00000000 --- a/customSDK/servicefabric/models/stateful_service_info.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_info import ServiceInfo - - -class StatefulServiceInfo(ServiceInfo): - """Information about a stateful Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :param id: The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to - identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type id: str - :param name: The full name of the service with 'fabric:' URI scheme. - :type name: str - :param type_name: Name of the service type as specified in the service - manifest. - :type type_name: str - :param manifest_version: The version of the service manifest. - :type manifest_version: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_status: The status of the application. Possible values - include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', - 'Failed' - :type service_status: str or ~azure.servicefabric.models.ServiceStatus - :param is_service_group: Whether the service is in a service group. - :type is_service_group: bool - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param has_persisted_state: Whether the service has persisted state. - :type has_persisted_state: bool - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(StatefulServiceInfo, self).__init__(**kwargs) - self.has_persisted_state = kwargs.get('has_persisted_state', None) - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_info_py3.py b/customSDK/servicefabric/models/stateful_service_info_py3.py deleted file mode 100644 index 4a0f30fb..00000000 --- a/customSDK/servicefabric/models/stateful_service_info_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_info_py3 import ServiceInfo - - -class StatefulServiceInfo(ServiceInfo): - """Information about a stateful Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :param id: The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to - identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type id: str - :param name: The full name of the service with 'fabric:' URI scheme. - :type name: str - :param type_name: Name of the service type as specified in the service - manifest. - :type type_name: str - :param manifest_version: The version of the service manifest. - :type manifest_version: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_status: The status of the application. Possible values - include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', - 'Failed' - :type service_status: str or ~azure.servicefabric.models.ServiceStatus - :param is_service_group: Whether the service is in a service group. - :type is_service_group: bool - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param has_persisted_state: Whether the service has persisted state. - :type has_persisted_state: bool - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - } - - def __init__(self, *, id: str=None, name: str=None, type_name: str=None, manifest_version: str=None, health_state=None, service_status=None, is_service_group: bool=None, has_persisted_state: bool=None, **kwargs) -> None: - super(StatefulServiceInfo, self).__init__(id=id, name=name, type_name=type_name, manifest_version=manifest_version, health_state=health_state, service_status=service_status, is_service_group=is_service_group, **kwargs) - self.has_persisted_state = has_persisted_state - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_partition_info.py b/customSDK/servicefabric/models/stateful_service_partition_info.py deleted file mode 100644 index 11f39d76..00000000 --- a/customSDK/servicefabric/models/stateful_service_partition_info.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_partition_info import ServicePartitionInfo - - -class StatefulServicePartitionInfo(ServicePartitionInfo): - """Information about a partition of a stateful Service Fabric service.. - - All required parameters must be populated in order to send to Azure. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param partition_status: The status of the service fabric service - partition. Possible values include: 'Invalid', 'Ready', 'NotReady', - 'InQuorumLoss', 'Reconfiguring', 'Deleting' - :type partition_status: str or - ~azure.servicefabric.models.ServicePartitionStatus - :param partition_information: Information about the partition identity, - partitioning scheme and keys supported by it. - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param target_replica_set_size: The target replica set size as a number. - :type target_replica_set_size: long - :param min_replica_set_size: The minimum replica set size as a number. - :type min_replica_set_size: long - :param auxiliary_replica_count: The auxiliary replica count as a number. - To use Auxiliary replicas the following must be true, - AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :type auxiliary_replica_count: long - :param last_quorum_loss_duration: The duration for which this partition - was in quorum loss. If the partition is currently in quorum loss, it - returns the duration since it has been in that state. This field is using - ISO8601 format for specifying the duration. - :type last_quorum_loss_duration: timedelta - :param primary_epoch: An Epoch is a configuration number for the partition - as a whole. When the configuration of the replica set changes, for example - when the Primary replica changes, the operations that are replicated from - the new Primary replica are said to be a new Epoch from the ones which - were sent by the old Primary replica. - :type primary_epoch: ~azure.servicefabric.models.Epoch - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'long'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'long'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'long'}, - 'last_quorum_loss_duration': {'key': 'LastQuorumLossDuration', 'type': 'duration'}, - 'primary_epoch': {'key': 'PrimaryEpoch', 'type': 'Epoch'}, - } - - def __init__(self, **kwargs): - super(StatefulServicePartitionInfo, self).__init__(**kwargs) - self.target_replica_set_size = kwargs.get('target_replica_set_size', None) - self.min_replica_set_size = kwargs.get('min_replica_set_size', None) - self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) - self.last_quorum_loss_duration = kwargs.get('last_quorum_loss_duration', None) - self.primary_epoch = kwargs.get('primary_epoch', None) - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_partition_info_py3.py b/customSDK/servicefabric/models/stateful_service_partition_info_py3.py deleted file mode 100644 index 9c9f2a09..00000000 --- a/customSDK/servicefabric/models/stateful_service_partition_info_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_partition_info_py3 import ServicePartitionInfo - - -class StatefulServicePartitionInfo(ServicePartitionInfo): - """Information about a partition of a stateful Service Fabric service.. - - All required parameters must be populated in order to send to Azure. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param partition_status: The status of the service fabric service - partition. Possible values include: 'Invalid', 'Ready', 'NotReady', - 'InQuorumLoss', 'Reconfiguring', 'Deleting' - :type partition_status: str or - ~azure.servicefabric.models.ServicePartitionStatus - :param partition_information: Information about the partition identity, - partitioning scheme and keys supported by it. - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param target_replica_set_size: The target replica set size as a number. - :type target_replica_set_size: long - :param min_replica_set_size: The minimum replica set size as a number. - :type min_replica_set_size: long - :param auxiliary_replica_count: The auxiliary replica count as a number. - To use Auxiliary replicas the following must be true, - AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :type auxiliary_replica_count: long - :param last_quorum_loss_duration: The duration for which this partition - was in quorum loss. If the partition is currently in quorum loss, it - returns the duration since it has been in that state. This field is using - ISO8601 format for specifying the duration. - :type last_quorum_loss_duration: timedelta - :param primary_epoch: An Epoch is a configuration number for the partition - as a whole. When the configuration of the replica set changes, for example - when the Primary replica changes, the operations that are replicated from - the new Primary replica are said to be a new Epoch from the ones which - were sent by the old Primary replica. - :type primary_epoch: ~azure.servicefabric.models.Epoch - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'long'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'long'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'long'}, - 'last_quorum_loss_duration': {'key': 'LastQuorumLossDuration', 'type': 'duration'}, - 'primary_epoch': {'key': 'PrimaryEpoch', 'type': 'Epoch'}, - } - - def __init__(self, *, health_state=None, partition_status=None, partition_information=None, target_replica_set_size: int=None, min_replica_set_size: int=None, auxiliary_replica_count: int=None, last_quorum_loss_duration=None, primary_epoch=None, **kwargs) -> None: - super(StatefulServicePartitionInfo, self).__init__(health_state=health_state, partition_status=partition_status, partition_information=partition_information, **kwargs) - self.target_replica_set_size = target_replica_set_size - self.min_replica_set_size = min_replica_set_size - self.auxiliary_replica_count = auxiliary_replica_count - self.last_quorum_loss_duration = last_quorum_loss_duration - self.primary_epoch = primary_epoch - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_health.py b/customSDK/servicefabric/models/stateful_service_replica_health.py deleted file mode 100644 index 45dc4c34..00000000 --- a/customSDK/servicefabric/models/stateful_service_replica_health.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_health import ReplicaHealth - - -class StatefulServiceReplicaHealth(ReplicaHealth): - """Represents the health of the stateful service replica. - Contains the replica aggregated health state, the health events and the - unhealthy evaluations. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param partition_id: Id of the partition to which this replica belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StatefulServiceReplicaHealth, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_health_py3.py b/customSDK/servicefabric/models/stateful_service_replica_health_py3.py deleted file mode 100644 index bc07ec80..00000000 --- a/customSDK/servicefabric/models/stateful_service_replica_health_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_health_py3 import ReplicaHealth - - -class StatefulServiceReplicaHealth(ReplicaHealth): - """Represents the health of the stateful service replica. - Contains the replica aggregated health state, the health events and the - unhealthy evaluations. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param partition_id: Id of the partition to which this replica belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, replica_id: str=None, **kwargs) -> None: - super(StatefulServiceReplicaHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, partition_id=partition_id, **kwargs) - self.replica_id = replica_id - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_health_state.py b/customSDK/servicefabric/models/stateful_service_replica_health_state.py deleted file mode 100644 index 67dfe6d0..00000000 --- a/customSDK/servicefabric/models/stateful_service_replica_health_state.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_health_state import ReplicaHealthState - - -class StatefulServiceReplicaHealthState(ReplicaHealthState): - """Represents the health state of the stateful service replica, which contains - the replica ID and the aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param partition_id: The ID of the partition to which this replica - belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StatefulServiceReplicaHealthState, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_health_state_py3.py b/customSDK/servicefabric/models/stateful_service_replica_health_state_py3.py deleted file mode 100644 index 62ada1f2..00000000 --- a/customSDK/servicefabric/models/stateful_service_replica_health_state_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_health_state_py3 import ReplicaHealthState - - -class StatefulServiceReplicaHealthState(ReplicaHealthState): - """Represents the health state of the stateful service replica, which contains - the replica ID and the aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param partition_id: The ID of the partition to which this replica - belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, partition_id: str=None, replica_id: str=None, **kwargs) -> None: - super(StatefulServiceReplicaHealthState, self).__init__(aggregated_health_state=aggregated_health_state, partition_id=partition_id, **kwargs) - self.replica_id = replica_id - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_info.py b/customSDK/servicefabric/models/stateful_service_replica_info.py deleted file mode 100644 index 2fcd842f..00000000 --- a/customSDK/servicefabric/models/stateful_service_replica_info.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_info import ReplicaInfo - - -class StatefulServiceReplicaInfo(ReplicaInfo): - """Represents a stateful service replica. This includes information about the - identity, role, status, health, node name, uptime, and other details about - the replica. - - All required parameters must be populated in order to send to Azure. - - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param address: The address the replica is listening on. - :type address: str - :param last_in_build_duration_in_seconds: The last in build duration of - the replica in seconds. - :type last_in_build_duration_in_seconds: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_role: The role of a replica of a stateful service. Possible - values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', - 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', 'PrimaryAuxiliary' - :type replica_role: str or ~azure.servicefabric.models.ReplicaRole - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StatefulServiceReplicaInfo, self).__init__(**kwargs) - self.replica_role = kwargs.get('replica_role', None) - self.replica_id = kwargs.get('replica_id', None) - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_replica_info_py3.py b/customSDK/servicefabric/models/stateful_service_replica_info_py3.py deleted file mode 100644 index 92e305fd..00000000 --- a/customSDK/servicefabric/models/stateful_service_replica_info_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_info_py3 import ReplicaInfo - - -class StatefulServiceReplicaInfo(ReplicaInfo): - """Represents a stateful service replica. This includes information about the - identity, role, status, health, node name, uptime, and other details about - the replica. - - All required parameters must be populated in order to send to Azure. - - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param address: The address the replica is listening on. - :type address: str - :param last_in_build_duration_in_seconds: The last in build duration of - the replica in seconds. - :type last_in_build_duration_in_seconds: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_role: The role of a replica of a stateful service. Possible - values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', - 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', 'PrimaryAuxiliary' - :type replica_role: str or ~azure.servicefabric.models.ReplicaRole - :param replica_id: Id of a stateful service replica. ReplicaId is used by - Service Fabric to uniquely identify a replica of a partition. It is unique - within a partition and does not change for the lifetime of the replica. If - a replica gets dropped and another replica gets created on the same node - for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a - replica id. - :type replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__(self, *, replica_status=None, health_state=None, node_name: str=None, address: str=None, last_in_build_duration_in_seconds: str=None, replica_role=None, replica_id: str=None, **kwargs) -> None: - super(StatefulServiceReplicaInfo, self).__init__(replica_status=replica_status, health_state=health_state, node_name=node_name, address=address, last_in_build_duration_in_seconds=last_in_build_duration_in_seconds, **kwargs) - self.replica_role = replica_role - self.replica_id = replica_id - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_type_description.py b/customSDK/servicefabric/models/stateful_service_type_description.py deleted file mode 100644 index 383a2342..00000000 --- a/customSDK/servicefabric/models/stateful_service_type_description.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_type_description import ServiceTypeDescription - - -class StatefulServiceTypeDescription(ServiceTypeDescription): - """Describes a stateful service type defined in the service manifest of a - provisioned application type. - - All required parameters must be populated in order to send to Azure. - - :param is_stateful: Indicates whether the service type is a stateful - service type or a stateless service type. This property is true if the - service type is a stateful service type, false otherwise. - :type is_stateful: bool - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param placement_constraints: The placement constraint to be used when - instantiating this service in a Service Fabric cluster. - :type placement_constraints: str - :param load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: List of service placement policy - descriptions. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param extensions: List of service type extensions. - :type extensions: - list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :param kind: Required. Constant filled by server. - :type kind: str - :param has_persisted_state: A flag indicating whether this is a persistent - service which stores states on the local disk. If it is then the value of - this property is true, if not it is false. - :type has_persisted_state: bool - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(StatefulServiceTypeDescription, self).__init__(**kwargs) - self.has_persisted_state = kwargs.get('has_persisted_state', None) - self.kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_type_description_py3.py b/customSDK/servicefabric/models/stateful_service_type_description_py3.py deleted file mode 100644 index 14d8e3ca..00000000 --- a/customSDK/servicefabric/models/stateful_service_type_description_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_type_description_py3 import ServiceTypeDescription - - -class StatefulServiceTypeDescription(ServiceTypeDescription): - """Describes a stateful service type defined in the service manifest of a - provisioned application type. - - All required parameters must be populated in order to send to Azure. - - :param is_stateful: Indicates whether the service type is a stateful - service type or a stateless service type. This property is true if the - service type is a stateful service type, false otherwise. - :type is_stateful: bool - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param placement_constraints: The placement constraint to be used when - instantiating this service in a Service Fabric cluster. - :type placement_constraints: str - :param load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: List of service placement policy - descriptions. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param extensions: List of service type extensions. - :type extensions: - list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :param kind: Required. Constant filled by server. - :type kind: str - :param has_persisted_state: A flag indicating whether this is a persistent - service which stores states on the local disk. If it is then the value of - this property is true, if not it is false. - :type has_persisted_state: bool - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - } - - def __init__(self, *, is_stateful: bool=None, service_type_name: str=None, placement_constraints: str=None, load_metrics=None, service_placement_policies=None, extensions=None, has_persisted_state: bool=None, **kwargs) -> None: - super(StatefulServiceTypeDescription, self).__init__(is_stateful=is_stateful, service_type_name=service_type_name, placement_constraints=placement_constraints, load_metrics=load_metrics, service_placement_policies=service_placement_policies, extensions=extensions, **kwargs) - self.has_persisted_state = has_persisted_state - self.kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_update_description.py b/customSDK/servicefabric/models/stateful_service_update_description.py deleted file mode 100644 index 49b4fdb2..00000000 --- a/customSDK/servicefabric/models/stateful_service_update_description.py +++ /dev/null @@ -1,173 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_update_description import ServiceUpdateDescription - - -class StatefulServiceUpdateDescription(ServiceUpdateDescription): - """Describes an update for a stateful service. - - All required parameters must be populated in order to send to Azure. - - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 6 then the flags for - ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. - - None - Does not indicate any other properties are set. The value is - zero. - - TargetReplicaSetSize/InstanceCount - Indicates whether the - TargetReplicaSetSize property (for Stateful services) or the InstanceCount - property (for Stateless services) is set. The value is 1. - - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - property is set. The value is 2. - - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property - is set. The value is 4. - - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - property is set. The value is 8. - - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The - value is 16. - - PlacementConstraints - Indicates the PlacementConstraints property is - set. The value is 32. - - PlacementPolicyList - Indicates the ServicePlacementPolicies property is - set. The value is 64. - - Correlation - Indicates the CorrelationScheme property is set. The value - is 128. - - Metrics - Indicates the ServiceLoadMetrics property is set. The value is - 256. - - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The - value is 512. - - ScalingPolicy - Indicates the ScalingPolicies property is set. The value - is 1024. - - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit - property is set. The value is 2048. - - MinInstanceCount - Indicates the MinInstanceCount property is set. The - value is 4096. - - MinInstancePercentage - Indicates the MinInstancePercentage property is - set. The value is 8192. - - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 16384. - - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 32768. - - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property - is set. The value is 65536. - - ServiceDnsName - Indicates the ServiceDnsName property is set. The value - is 131072. - - TagsForPlacement - Indicates the TagsForPlacement property is set. The - value is 1048576. - - TagsForRunning - Indicates the TagsForRunning property is set. The value - is 2097152. - :type flags: str - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param load_metrics: The service load metrics. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param service_dns_name: The DNS name of the service. - :type service_dns_name: str - :param tags_for_placement: Tags for placement of this service. - :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :param tags_for_running: Tags for running of this service. - :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param target_replica_set_size: The target replica set size as a number. - :type target_replica_set_size: int - :param min_replica_set_size: The minimum replica set size as a number. - :type min_replica_set_size: int - :param replica_restart_wait_duration_seconds: The duration, in seconds, - between when a replica goes down and when a new replica is created. - :type replica_restart_wait_duration_seconds: str - :param quorum_loss_wait_duration_seconds: The maximum duration, in - seconds, for which a partition is allowed to be in a state of quorum loss. - :type quorum_loss_wait_duration_seconds: str - :param stand_by_replica_keep_duration_seconds: The definition on how long - StandBy replicas should be maintained before being removed. - :type stand_by_replica_keep_duration_seconds: str - :param service_placement_time_limit_seconds: The duration for which - replicas can stay InBuild before reporting that build is stuck. - :type service_placement_time_limit_seconds: str - :param drop_source_replica_on_move: Indicates whether to drop source - Secondary replica even if the target replica has not finished build. If - desired behavior is to drop it as soon as possible the value of this - property is true, if not it is false. - :type drop_source_replica_on_move: bool - :param replica_lifecycle_description: Defines how replicas of this service - will behave during ther lifecycle. - :type replica_lifecycle_description: - ~azure.servicefabric.models.ReplicaLifecycleDescription - :param auxiliary_replica_count: The auxiliary replica count as a number. - To use Auxiliary replicas, the following must be true: - AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :type auxiliary_replica_count: int - """ - - _validation = { - 'service_kind': {'required': True}, - 'target_replica_set_size': {'minimum': 1}, - 'min_replica_set_size': {'minimum': 1}, - 'auxiliary_replica_count': {'minimum': 0}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'str'}, - 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'str'}, - 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'str'}, - 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'str'}, - 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, - 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(StatefulServiceUpdateDescription, self).__init__(**kwargs) - self.target_replica_set_size = kwargs.get('target_replica_set_size', None) - self.min_replica_set_size = kwargs.get('min_replica_set_size', None) - self.replica_restart_wait_duration_seconds = kwargs.get('replica_restart_wait_duration_seconds', None) - self.quorum_loss_wait_duration_seconds = kwargs.get('quorum_loss_wait_duration_seconds', None) - self.stand_by_replica_keep_duration_seconds = kwargs.get('stand_by_replica_keep_duration_seconds', None) - self.service_placement_time_limit_seconds = kwargs.get('service_placement_time_limit_seconds', None) - self.drop_source_replica_on_move = kwargs.get('drop_source_replica_on_move', None) - self.replica_lifecycle_description = kwargs.get('replica_lifecycle_description', None) - self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateful_service_update_description_py3.py b/customSDK/servicefabric/models/stateful_service_update_description_py3.py deleted file mode 100644 index 32b93aa2..00000000 --- a/customSDK/servicefabric/models/stateful_service_update_description_py3.py +++ /dev/null @@ -1,173 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_update_description_py3 import ServiceUpdateDescription - - -class StatefulServiceUpdateDescription(ServiceUpdateDescription): - """Describes an update for a stateful service. - - All required parameters must be populated in order to send to Azure. - - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 6 then the flags for - ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. - - None - Does not indicate any other properties are set. The value is - zero. - - TargetReplicaSetSize/InstanceCount - Indicates whether the - TargetReplicaSetSize property (for Stateful services) or the InstanceCount - property (for Stateless services) is set. The value is 1. - - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - property is set. The value is 2. - - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property - is set. The value is 4. - - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - property is set. The value is 8. - - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The - value is 16. - - PlacementConstraints - Indicates the PlacementConstraints property is - set. The value is 32. - - PlacementPolicyList - Indicates the ServicePlacementPolicies property is - set. The value is 64. - - Correlation - Indicates the CorrelationScheme property is set. The value - is 128. - - Metrics - Indicates the ServiceLoadMetrics property is set. The value is - 256. - - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The - value is 512. - - ScalingPolicy - Indicates the ScalingPolicies property is set. The value - is 1024. - - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit - property is set. The value is 2048. - - MinInstanceCount - Indicates the MinInstanceCount property is set. The - value is 4096. - - MinInstancePercentage - Indicates the MinInstancePercentage property is - set. The value is 8192. - - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 16384. - - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 32768. - - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property - is set. The value is 65536. - - ServiceDnsName - Indicates the ServiceDnsName property is set. The value - is 131072. - - TagsForPlacement - Indicates the TagsForPlacement property is set. The - value is 1048576. - - TagsForRunning - Indicates the TagsForRunning property is set. The value - is 2097152. - :type flags: str - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param load_metrics: The service load metrics. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param service_dns_name: The DNS name of the service. - :type service_dns_name: str - :param tags_for_placement: Tags for placement of this service. - :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :param tags_for_running: Tags for running of this service. - :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param target_replica_set_size: The target replica set size as a number. - :type target_replica_set_size: int - :param min_replica_set_size: The minimum replica set size as a number. - :type min_replica_set_size: int - :param replica_restart_wait_duration_seconds: The duration, in seconds, - between when a replica goes down and when a new replica is created. - :type replica_restart_wait_duration_seconds: str - :param quorum_loss_wait_duration_seconds: The maximum duration, in - seconds, for which a partition is allowed to be in a state of quorum loss. - :type quorum_loss_wait_duration_seconds: str - :param stand_by_replica_keep_duration_seconds: The definition on how long - StandBy replicas should be maintained before being removed. - :type stand_by_replica_keep_duration_seconds: str - :param service_placement_time_limit_seconds: The duration for which - replicas can stay InBuild before reporting that build is stuck. - :type service_placement_time_limit_seconds: str - :param drop_source_replica_on_move: Indicates whether to drop source - Secondary replica even if the target replica has not finished build. If - desired behavior is to drop it as soon as possible the value of this - property is true, if not it is false. - :type drop_source_replica_on_move: bool - :param replica_lifecycle_description: Defines how replicas of this service - will behave during ther lifecycle. - :type replica_lifecycle_description: - ~azure.servicefabric.models.ReplicaLifecycleDescription - :param auxiliary_replica_count: The auxiliary replica count as a number. - To use Auxiliary replicas, the following must be true: - AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :type auxiliary_replica_count: int - """ - - _validation = { - 'service_kind': {'required': True}, - 'target_replica_set_size': {'minimum': 1}, - 'min_replica_set_size': {'minimum': 1}, - 'auxiliary_replica_count': {'minimum': 0}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'str'}, - 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'str'}, - 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'str'}, - 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'str'}, - 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, - 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, - } - - def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, target_replica_set_size: int=None, min_replica_set_size: int=None, replica_restart_wait_duration_seconds: str=None, quorum_loss_wait_duration_seconds: str=None, stand_by_replica_keep_duration_seconds: str=None, service_placement_time_limit_seconds: str=None, drop_source_replica_on_move: bool=None, replica_lifecycle_description=None, auxiliary_replica_count: int=None, **kwargs) -> None: - super(StatefulServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_dns_name=service_dns_name, tags_for_placement=tags_for_placement, tags_for_running=tags_for_running, **kwargs) - self.target_replica_set_size = target_replica_set_size - self.min_replica_set_size = min_replica_set_size - self.replica_restart_wait_duration_seconds = replica_restart_wait_duration_seconds - self.quorum_loss_wait_duration_seconds = quorum_loss_wait_duration_seconds - self.stand_by_replica_keep_duration_seconds = stand_by_replica_keep_duration_seconds - self.service_placement_time_limit_seconds = service_placement_time_limit_seconds - self.drop_source_replica_on_move = drop_source_replica_on_move - self.replica_lifecycle_description = replica_lifecycle_description - self.auxiliary_replica_count = auxiliary_replica_count - self.service_kind = 'Stateful' diff --git a/customSDK/servicefabric/models/stateless_replica_health_report_expired_event.py b/customSDK/servicefabric/models/stateless_replica_health_report_expired_event.py deleted file mode 100644 index 13e3fc19..00000000 --- a/customSDK/servicefabric/models/stateless_replica_health_report_expired_event.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_event import ReplicaEvent - - -class StatelessReplicaHealthReportExpiredEvent(ReplicaEvent): - """Stateless Replica Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(StatelessReplicaHealthReportExpiredEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'StatelessReplicaHealthReportExpired' diff --git a/customSDK/servicefabric/models/stateless_replica_health_report_expired_event_py3.py b/customSDK/servicefabric/models/stateless_replica_health_report_expired_event_py3.py deleted file mode 100644 index dc0c9263..00000000 --- a/customSDK/servicefabric/models/stateless_replica_health_report_expired_event_py3.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_event_py3 import ReplicaEvent - - -class StatelessReplicaHealthReportExpiredEvent(ReplicaEvent): - """Stateless Replica Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(StatelessReplicaHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'StatelessReplicaHealthReportExpired' diff --git a/customSDK/servicefabric/models/stateless_replica_new_health_report_event.py b/customSDK/servicefabric/models/stateless_replica_new_health_report_event.py deleted file mode 100644 index 7f2c8f7f..00000000 --- a/customSDK/servicefabric/models/stateless_replica_new_health_report_event.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_event import ReplicaEvent - - -class StatelessReplicaNewHealthReportEvent(ReplicaEvent): - """Stateless Replica Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(StatelessReplicaNewHealthReportEvent, self).__init__(**kwargs) - self.source_id = kwargs.get('source_id', None) - self.property = kwargs.get('property', None) - self.health_state = kwargs.get('health_state', None) - self.time_to_live_ms = kwargs.get('time_to_live_ms', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.description = kwargs.get('description', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.kind = 'StatelessReplicaNewHealthReport' diff --git a/customSDK/servicefabric/models/stateless_replica_new_health_report_event_py3.py b/customSDK/servicefabric/models/stateless_replica_new_health_report_event_py3.py deleted file mode 100644 index fbaeeb9a..00000000 --- a/customSDK/servicefabric/models/stateless_replica_new_health_report_event_py3.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_event_py3 import ReplicaEvent - - -class StatelessReplicaNewHealthReportEvent(ReplicaEvent): - """Stateless Replica Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :param event_instance_id: Required. The identifier for the FabricEvent - instance. - :type event_instance_id: str - :param category: The category of event. - :type category: str - :param time_stamp: Required. The time event was logged. - :type time_stamp: datetime - :param has_correlated_events: Shows there is existing related events - available. - :type has_correlated_events: bool - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Required. An internal ID used by Service Fabric to - uniquely identify a partition. This is a randomly generated GUID when the - service was created. The partition ID is unique and does not change for - the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :type partition_id: str - :param replica_id: Required. Id of a stateful service replica. ReplicaId - is used by Service Fabric to uniquely identify a replica of a partition. - It is unique within a partition and does not change for the lifetime of - the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for - the id. Sometimes the id of a stateless service instance is also referred - as a replica id. - :type replica_id: long - :param source_id: Required. Id of report source. - :type source_id: str - :param property: Required. Describes the property. - :type property: str - :param health_state: Required. Describes the property health state. - :type health_state: str - :param time_to_live_ms: Required. Time to live in milli-seconds. - :type time_to_live_ms: long - :param sequence_number: Required. Sequence number of report. - :type sequence_number: long - :param description: Required. Description of report. - :type description: str - :param remove_when_expired: Required. Indicates the removal when it - expires. - :type remove_when_expired: bool - :param source_utc_timestamp: Required. Source time. - :type source_utc_timestamp: datetime - """ - - _validation = { - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'kind': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, event_instance_id: str, time_stamp, partition_id: str, replica_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None: - super(StatelessReplicaNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - self.kind = 'StatelessReplicaNewHealthReport' diff --git a/customSDK/servicefabric/models/stateless_service_description.py b/customSDK/servicefabric/models/stateless_service_description.py deleted file mode 100644 index 7ebf6c9a..00000000 --- a/customSDK/servicefabric/models/stateless_service_description.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_description import ServiceDescription - - -class StatelessServiceDescription(ServiceDescription): - """Describes a stateless service. - - All required parameters must be populated in order to send to Azure. - - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_name: Required. The full name of the service with 'fabric:' - URI scheme. - :type service_name: str - :param service_type_name: Required. Name of the service type as specified - in the service manifest. - :type service_type_name: str - :param initialization_data: The initialization data as an array of bytes. - Initialization data is passed to service instances or replicas when they - are created. - :type initialization_data: list[int] - :param partition_description: Required. The partition description as an - object. - :type partition_description: - ~azure.servicefabric.models.PartitionSchemeDescription - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics. - :type service_load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param is_default_move_cost_specified: Indicates if the DefaultMoveCost - property is specified. - :type is_default_move_cost_specified: bool - :param service_package_activation_mode: The activation mode of service - package to be used for a service. Possible values include: - 'SharedProcess', 'ExclusiveProcess' - :type service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS - system service to be enabled in Service Fabric cluster. - :type service_dns_name: str - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param tags_required_to_place: Tags for placement of this service. - :type tags_required_to_place: - ~azure.servicefabric.models.NodeTagsDescription - :param tags_required_to_run: Tags for running of this service. - :type tags_required_to_run: - ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_count: Required. The instance count. - :type instance_count: int - :param min_instance_count: MinInstanceCount is the minimum number of - instances that must be up to meet the EnsureAvailability safety check - during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation - -1 is first converted into the number of nodes on which the instances are - allowed to be placed according to the placement constraints on the - service. - :type min_instance_count: int - :param min_instance_percentage: MinInstancePercentage is the minimum - percentage of InstanceCount that must be up to meet the EnsureAvailability - safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage - computation, -1 is first converted into the number of nodes on which the - instances are allowed to be placed according to the placement constraints - on the service. - :type min_instance_percentage: int - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 1 then the flags for - InstanceCloseDelayDuration is set. - - None - Does not indicate any other properties are set. The value is - zero. - - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 1. - - InstanceRestartWaitDuration - Indicates the - InstanceRestartWaitDurationSeconds property is set. The value is 2. - :type flags: int - :param instance_close_delay_duration_seconds: Duration in seconds, to wait - before a stateless instance is closed, to allow the active requests to - drain gracefully. This would be effective when the instance is closing - during the application/cluster upgrade and disabling node. - The endpoint exposed on this instance is removed prior to starting the - delay, which prevents new connections to this instance. - In addition, clients that have subscribed to service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do - the following upon receiving the endpoint removal notification: - - Stop sending new requests to this instance. - - Close existing connections after in-flight requests have completed. - - Connect to a different instance of the service partition for future - requests. - Note, the default value of InstanceCloseDelayDuration is 0, which - indicates that there won't be any delay or removal of the endpoint prior - to closing the instance. - :type instance_close_delay_duration_seconds: long - :param instance_lifecycle_description: Defines how instances of this - service will behave during their lifecycle. - :type instance_lifecycle_description: - ~azure.servicefabric.models.InstanceLifecycleDescription - :param instance_restart_wait_duration_seconds: When a stateless instance - goes down, this timer starts. When it expires Service Fabric will create a - new instance on any node in the cluster. - This configuration is to reduce unnecessary creation of a new instance in - situations where the instance going down is likely to recover in a short - time. For example, during an upgrade. - The default value is 0, which indicates that when stateless instance goes - down, Service Fabric will immediately start building its replacement. - :type instance_restart_wait_duration_seconds: long - """ - - _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, - 'instance_count': {'required': True, 'minimum': -1}, - 'instance_close_delay_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'instance_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'long'}, - 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, - 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(StatelessServiceDescription, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) - self.min_instance_count = kwargs.get('min_instance_count', None) - self.min_instance_percentage = kwargs.get('min_instance_percentage', None) - self.flags = kwargs.get('flags', None) - self.instance_close_delay_duration_seconds = kwargs.get('instance_close_delay_duration_seconds', None) - self.instance_lifecycle_description = kwargs.get('instance_lifecycle_description', None) - self.instance_restart_wait_duration_seconds = kwargs.get('instance_restart_wait_duration_seconds', None) - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_description_py3.py b/customSDK/servicefabric/models/stateless_service_description_py3.py deleted file mode 100644 index 87109cab..00000000 --- a/customSDK/servicefabric/models/stateless_service_description_py3.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_description_py3 import ServiceDescription - - -class StatelessServiceDescription(ServiceDescription): - """Describes a stateless service. - - All required parameters must be populated in order to send to Azure. - - :param application_name: The name of the application, including the - 'fabric:' URI scheme. - :type application_name: str - :param service_name: Required. The full name of the service with 'fabric:' - URI scheme. - :type service_name: str - :param service_type_name: Required. Name of the service type as specified - in the service manifest. - :type service_type_name: str - :param initialization_data: The initialization data as an array of bytes. - Initialization data is passed to service instances or replicas when they - are created. - :type initialization_data: list[int] - :param partition_description: Required. The partition description as an - object. - :type partition_description: - ~azure.servicefabric.models.PartitionSchemeDescription - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics. - :type service_load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param is_default_move_cost_specified: Indicates if the DefaultMoveCost - property is specified. - :type is_default_move_cost_specified: bool - :param service_package_activation_mode: The activation mode of service - package to be used for a service. Possible values include: - 'SharedProcess', 'ExclusiveProcess' - :type service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :param service_dns_name: The DNS name of the service. It requires the DNS - system service to be enabled in Service Fabric cluster. - :type service_dns_name: str - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param tags_required_to_place: Tags for placement of this service. - :type tags_required_to_place: - ~azure.servicefabric.models.NodeTagsDescription - :param tags_required_to_run: Tags for running of this service. - :type tags_required_to_run: - ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_count: Required. The instance count. - :type instance_count: int - :param min_instance_count: MinInstanceCount is the minimum number of - instances that must be up to meet the EnsureAvailability safety check - during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation - -1 is first converted into the number of nodes on which the instances are - allowed to be placed according to the placement constraints on the - service. - :type min_instance_count: int - :param min_instance_percentage: MinInstancePercentage is the minimum - percentage of InstanceCount that must be up to meet the EnsureAvailability - safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage - computation, -1 is first converted into the number of nodes on which the - instances are allowed to be placed according to the placement constraints - on the service. - :type min_instance_percentage: int - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 1 then the flags for - InstanceCloseDelayDuration is set. - - None - Does not indicate any other properties are set. The value is - zero. - - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 1. - - InstanceRestartWaitDuration - Indicates the - InstanceRestartWaitDurationSeconds property is set. The value is 2. - :type flags: int - :param instance_close_delay_duration_seconds: Duration in seconds, to wait - before a stateless instance is closed, to allow the active requests to - drain gracefully. This would be effective when the instance is closing - during the application/cluster upgrade and disabling node. - The endpoint exposed on this instance is removed prior to starting the - delay, which prevents new connections to this instance. - In addition, clients that have subscribed to service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do - the following upon receiving the endpoint removal notification: - - Stop sending new requests to this instance. - - Close existing connections after in-flight requests have completed. - - Connect to a different instance of the service partition for future - requests. - Note, the default value of InstanceCloseDelayDuration is 0, which - indicates that there won't be any delay or removal of the endpoint prior - to closing the instance. - :type instance_close_delay_duration_seconds: long - :param instance_lifecycle_description: Defines how instances of this - service will behave during their lifecycle. - :type instance_lifecycle_description: - ~azure.servicefabric.models.InstanceLifecycleDescription - :param instance_restart_wait_duration_seconds: When a stateless instance - goes down, this timer starts. When it expires Service Fabric will create a - new instance on any node in the cluster. - This configuration is to reduce unnecessary creation of a new instance in - situations where the instance going down is likely to recover in a short - time. For example, during an upgrade. - The default value is 0, which indicates that when stateless instance goes - down, Service Fabric will immediately start building its replacement. - :type instance_restart_wait_duration_seconds: long - """ - - _validation = { - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'service_kind': {'required': True}, - 'instance_count': {'required': True, 'minimum': -1}, - 'instance_close_delay_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'instance_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'long'}, - 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, - 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'long'}, - } - - def __init__(self, *, service_name: str, service_type_name: str, partition_description, instance_count: int, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, min_instance_count: int=None, min_instance_percentage: int=None, flags: int=None, instance_close_delay_duration_seconds: int=None, instance_lifecycle_description=None, instance_restart_wait_duration_seconds: int=None, **kwargs) -> None: - super(StatelessServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, tags_required_to_place=tags_required_to_place, tags_required_to_run=tags_required_to_run, **kwargs) - self.instance_count = instance_count - self.min_instance_count = min_instance_count - self.min_instance_percentage = min_instance_percentage - self.flags = flags - self.instance_close_delay_duration_seconds = instance_close_delay_duration_seconds - self.instance_lifecycle_description = instance_lifecycle_description - self.instance_restart_wait_duration_seconds = instance_restart_wait_duration_seconds - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_info.py b/customSDK/servicefabric/models/stateless_service_info.py deleted file mode 100644 index 234c4e18..00000000 --- a/customSDK/servicefabric/models/stateless_service_info.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_info import ServiceInfo - - -class StatelessServiceInfo(ServiceInfo): - """Information about a stateless Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :param id: The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to - identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type id: str - :param name: The full name of the service with 'fabric:' URI scheme. - :type name: str - :param type_name: Name of the service type as specified in the service - manifest. - :type type_name: str - :param manifest_version: The version of the service manifest. - :type manifest_version: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_status: The status of the application. Possible values - include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', - 'Failed' - :type service_status: str or ~azure.servicefabric.models.ServiceStatus - :param is_service_group: Whether the service is in a service group. - :type is_service_group: bool - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StatelessServiceInfo, self).__init__(**kwargs) - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_info_py3.py b/customSDK/servicefabric/models/stateless_service_info_py3.py deleted file mode 100644 index 6c09bd4e..00000000 --- a/customSDK/servicefabric/models/stateless_service_info_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_info_py3 import ServiceInfo - - -class StatelessServiceInfo(ServiceInfo): - """Information about a stateless Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :param id: The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to - identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "\\~" - character. For example, if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1\\~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type id: str - :param name: The full name of the service with 'fabric:' URI scheme. - :type name: str - :param type_name: Name of the service type as specified in the service - manifest. - :type type_name: str - :param manifest_version: The version of the service manifest. - :type manifest_version: str - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param service_status: The status of the application. Possible values - include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', - 'Failed' - :type service_status: str or ~azure.servicefabric.models.ServiceStatus - :param is_service_group: Whether the service is in a service group. - :type is_service_group: bool - :param service_kind: Required. Constant filled by server. - :type service_kind: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, name: str=None, type_name: str=None, manifest_version: str=None, health_state=None, service_status=None, is_service_group: bool=None, **kwargs) -> None: - super(StatelessServiceInfo, self).__init__(id=id, name=name, type_name=type_name, manifest_version=manifest_version, health_state=health_state, service_status=service_status, is_service_group=is_service_group, **kwargs) - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_health.py b/customSDK/servicefabric/models/stateless_service_instance_health.py deleted file mode 100644 index aadcd573..00000000 --- a/customSDK/servicefabric/models/stateless_service_instance_health.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_health import ReplicaHealth - - -class StatelessServiceInstanceHealth(ReplicaHealth): - """Represents the health of the stateless service instance. - Contains the instance aggregated health state, the health events and the - unhealthy evaluations. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param partition_id: Id of the partition to which this replica belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_id: Id of a stateless service instance. InstanceId is used - by Service Fabric to uniquely identify an instance of a partition of a - stateless service. It is unique within a partition and does not change for - the lifetime of the instance. If the instance has failed over on the same - or different node, it will get a different value for the InstanceId. - :type instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StatelessServiceInstanceHealth, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_health_py3.py b/customSDK/servicefabric/models/stateless_service_instance_health_py3.py deleted file mode 100644 index ce8448d1..00000000 --- a/customSDK/servicefabric/models/stateless_service_instance_health_py3.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_health_py3 import ReplicaHealth - - -class StatelessServiceInstanceHealth(ReplicaHealth): - """Represents the health of the stateless service instance. - Contains the instance aggregated health state, the health events and the - unhealthy evaluations. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The HealthState representing the - aggregated health state of the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the - entity and its children (if any). - The aggregation is done by applying the desired health policy. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param health_events: The list of health events reported on the entity. - :type health_events: list[~azure.servicefabric.models.HealthEvent] - :param unhealthy_evaluations: The unhealthy evaluations that show why the - current aggregated health state was returned by Health Manager. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :param health_statistics: Shows the health statistics for all children - types of the queried entity. - :type health_statistics: ~azure.servicefabric.models.HealthStatistics - :param partition_id: Id of the partition to which this replica belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_id: Id of a stateless service instance. InstanceId is used - by Service Fabric to uniquely identify an instance of a partition of a - stateless service. It is unique within a partition and does not change for - the lifetime of the instance. If the instance has failed over on the same - or different node, it will get a different value for the InstanceId. - :type instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, partition_id: str=None, instance_id: str=None, **kwargs) -> None: - super(StatelessServiceInstanceHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, partition_id=partition_id, **kwargs) - self.instance_id = instance_id - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_health_state.py b/customSDK/servicefabric/models/stateless_service_instance_health_state.py deleted file mode 100644 index bfd2e8f0..00000000 --- a/customSDK/servicefabric/models/stateless_service_instance_health_state.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_health_state import ReplicaHealthState - - -class StatelessServiceInstanceHealthState(ReplicaHealthState): - """Represents the health state of the stateless service instance, which - contains the instance ID and the aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param partition_id: The ID of the partition to which this replica - belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of the stateless service instance on the wire this - field is called ReplicaId. - :type replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StatelessServiceInstanceHealthState, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_health_state_py3.py b/customSDK/servicefabric/models/stateless_service_instance_health_state_py3.py deleted file mode 100644 index e417aabe..00000000 --- a/customSDK/servicefabric/models/stateless_service_instance_health_state_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_health_state_py3 import ReplicaHealthState - - -class StatelessServiceInstanceHealthState(ReplicaHealthState): - """Represents the health state of the stateless service instance, which - contains the instance ID and the aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param partition_id: The ID of the partition to which this replica - belongs. - :type partition_id: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param replica_id: Id of the stateless service instance on the wire this - field is called ReplicaId. - :type replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__(self, *, aggregated_health_state=None, partition_id: str=None, replica_id: str=None, **kwargs) -> None: - super(StatelessServiceInstanceHealthState, self).__init__(aggregated_health_state=aggregated_health_state, partition_id=partition_id, **kwargs) - self.replica_id = replica_id - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_info.py b/customSDK/servicefabric/models/stateless_service_instance_info.py deleted file mode 100644 index daa9fa1a..00000000 --- a/customSDK/servicefabric/models/stateless_service_instance_info.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_info import ReplicaInfo - - -class StatelessServiceInstanceInfo(ReplicaInfo): - """Represents a stateless service instance. This includes information about - the identity, status, health, node name, uptime, and other details about - the instance. - - All required parameters must be populated in order to send to Azure. - - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param address: The address the replica is listening on. - :type address: str - :param last_in_build_duration_in_seconds: The last in build duration of - the replica in seconds. - :type last_in_build_duration_in_seconds: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_id: Id of a stateless service instance. InstanceId is used - by Service Fabric to uniquely identify an instance of a partition of a - stateless service. It is unique within a partition and does not change for - the lifetime of the instance. If the instance has failed over on the same - or different node, it will get a different value for the InstanceId. - :type instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StatelessServiceInstanceInfo, self).__init__(**kwargs) - self.instance_id = kwargs.get('instance_id', None) - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_instance_info_py3.py b/customSDK/servicefabric/models/stateless_service_instance_info_py3.py deleted file mode 100644 index 74dc0459..00000000 --- a/customSDK/servicefabric/models/stateless_service_instance_info_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .replica_info_py3 import ReplicaInfo - - -class StatelessServiceInstanceInfo(ReplicaInfo): - """Represents a stateless service instance. This includes information about - the identity, status, health, node name, uptime, and other details about - the instance. - - All required parameters must be populated in order to send to Azure. - - :param replica_status: The status of a replica of a service. Possible - values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', - 'Dropped' - :type replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param node_name: The name of a Service Fabric node. - :type node_name: str - :param address: The address the replica is listening on. - :type address: str - :param last_in_build_duration_in_seconds: The last in build duration of - the replica in seconds. - :type last_in_build_duration_in_seconds: str - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_id: Id of a stateless service instance. InstanceId is used - by Service Fabric to uniquely identify an instance of a partition of a - stateless service. It is unique within a partition and does not change for - the lifetime of the instance. If the instance has failed over on the same - or different node, it will get a different value for the InstanceId. - :type instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__(self, *, replica_status=None, health_state=None, node_name: str=None, address: str=None, last_in_build_duration_in_seconds: str=None, instance_id: str=None, **kwargs) -> None: - super(StatelessServiceInstanceInfo, self).__init__(replica_status=replica_status, health_state=health_state, node_name=node_name, address=address, last_in_build_duration_in_seconds=last_in_build_duration_in_seconds, **kwargs) - self.instance_id = instance_id - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_partition_info.py b/customSDK/servicefabric/models/stateless_service_partition_info.py deleted file mode 100644 index 8e95d4d1..00000000 --- a/customSDK/servicefabric/models/stateless_service_partition_info.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_partition_info import ServicePartitionInfo - - -class StatelessServicePartitionInfo(ServicePartitionInfo): - """Information about a partition of a stateless Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param partition_status: The status of the service fabric service - partition. Possible values include: 'Invalid', 'Ready', 'NotReady', - 'InQuorumLoss', 'Reconfiguring', 'Deleting' - :type partition_status: str or - ~azure.servicefabric.models.ServicePartitionStatus - :param partition_information: Information about the partition identity, - partitioning scheme and keys supported by it. - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_count: Number of instances of this partition. - :type instance_count: long - :param min_instance_count: MinInstanceCount is the minimum number of - instances that must be up to meet the EnsureAvailability safety check - during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation - -1 is first converted into the number of nodes on which the instances are - allowed to be placed according to the placement constraints on the - service. - :type min_instance_count: int - :param min_instance_percentage: MinInstancePercentage is the minimum - percentage of InstanceCount that must be up to meet the EnsureAvailability - safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage - computation, -1 is first converted into the number of nodes on which the - instances are allowed to be placed according to the placement constraints - on the service. - :type min_instance_percentage: int - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'long'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(StatelessServicePartitionInfo, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) - self.min_instance_count = kwargs.get('min_instance_count', None) - self.min_instance_percentage = kwargs.get('min_instance_percentage', None) - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_partition_info_py3.py b/customSDK/servicefabric/models/stateless_service_partition_info_py3.py deleted file mode 100644 index 8b976219..00000000 --- a/customSDK/servicefabric/models/stateless_service_partition_info_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_partition_info_py3 import ServicePartitionInfo - - -class StatelessServicePartitionInfo(ServicePartitionInfo): - """Information about a partition of a stateless Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :param health_state: The health state of a Service Fabric entity such as - Cluster, Node, Application, Service, Partition, Replica etc. Possible - values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - :type health_state: str or ~azure.servicefabric.models.HealthState - :param partition_status: The status of the service fabric service - partition. Possible values include: 'Invalid', 'Ready', 'NotReady', - 'InQuorumLoss', 'Reconfiguring', 'Deleting' - :type partition_status: str or - ~azure.servicefabric.models.ServicePartitionStatus - :param partition_information: Information about the partition identity, - partitioning scheme and keys supported by it. - :type partition_information: - ~azure.servicefabric.models.PartitionInformation - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_count: Number of instances of this partition. - :type instance_count: long - :param min_instance_count: MinInstanceCount is the minimum number of - instances that must be up to meet the EnsureAvailability safety check - during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation - -1 is first converted into the number of nodes on which the instances are - allowed to be placed according to the placement constraints on the - service. - :type min_instance_count: int - :param min_instance_percentage: MinInstancePercentage is the minimum - percentage of InstanceCount that must be up to meet the EnsureAvailability - safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage - computation, -1 is first converted into the number of nodes on which the - instances are allowed to be placed according to the placement constraints - on the service. - :type min_instance_percentage: int - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'long'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - } - - def __init__(self, *, health_state=None, partition_status=None, partition_information=None, instance_count: int=None, min_instance_count: int=None, min_instance_percentage: int=None, **kwargs) -> None: - super(StatelessServicePartitionInfo, self).__init__(health_state=health_state, partition_status=partition_status, partition_information=partition_information, **kwargs) - self.instance_count = instance_count - self.min_instance_count = min_instance_count - self.min_instance_percentage = min_instance_percentage - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_type_description.py b/customSDK/servicefabric/models/stateless_service_type_description.py deleted file mode 100644 index 73cd84a2..00000000 --- a/customSDK/servicefabric/models/stateless_service_type_description.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_type_description import ServiceTypeDescription - - -class StatelessServiceTypeDescription(ServiceTypeDescription): - """Describes a stateless service type defined in the service manifest of a - provisioned application type. - - All required parameters must be populated in order to send to Azure. - - :param is_stateful: Indicates whether the service type is a stateful - service type or a stateless service type. This property is true if the - service type is a stateful service type, false otherwise. - :type is_stateful: bool - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param placement_constraints: The placement constraint to be used when - instantiating this service in a Service Fabric cluster. - :type placement_constraints: str - :param load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: List of service placement policy - descriptions. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param extensions: List of service type extensions. - :type extensions: - list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :param kind: Required. Constant filled by server. - :type kind: str - :param use_implicit_host: A flag indicating if this type is not - implemented and hosted by a user service process, but is implicitly hosted - by a system created process. This value is true for services using the - guest executable services, false otherwise. - :type use_implicit_host: bool - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'use_implicit_host': {'key': 'UseImplicitHost', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(StatelessServiceTypeDescription, self).__init__(**kwargs) - self.use_implicit_host = kwargs.get('use_implicit_host', None) - self.kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_type_description_py3.py b/customSDK/servicefabric/models/stateless_service_type_description_py3.py deleted file mode 100644 index bd0aa3e9..00000000 --- a/customSDK/servicefabric/models/stateless_service_type_description_py3.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_type_description_py3 import ServiceTypeDescription - - -class StatelessServiceTypeDescription(ServiceTypeDescription): - """Describes a stateless service type defined in the service manifest of a - provisioned application type. - - All required parameters must be populated in order to send to Azure. - - :param is_stateful: Indicates whether the service type is a stateful - service type or a stateless service type. This property is true if the - service type is a stateful service type, false otherwise. - :type is_stateful: bool - :param service_type_name: Name of the service type as specified in the - service manifest. - :type service_type_name: str - :param placement_constraints: The placement constraint to be used when - instantiating this service in a Service Fabric cluster. - :type placement_constraints: str - :param load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: List of service placement policy - descriptions. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param extensions: List of service type extensions. - :type extensions: - list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :param kind: Required. Constant filled by server. - :type kind: str - :param use_implicit_host: A flag indicating if this type is not - implemented and hosted by a user service process, but is implicitly hosted - by a system created process. This value is true for services using the - guest executable services, false otherwise. - :type use_implicit_host: bool - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'use_implicit_host': {'key': 'UseImplicitHost', 'type': 'bool'}, - } - - def __init__(self, *, is_stateful: bool=None, service_type_name: str=None, placement_constraints: str=None, load_metrics=None, service_placement_policies=None, extensions=None, use_implicit_host: bool=None, **kwargs) -> None: - super(StatelessServiceTypeDescription, self).__init__(is_stateful=is_stateful, service_type_name=service_type_name, placement_constraints=placement_constraints, load_metrics=load_metrics, service_placement_policies=service_placement_policies, extensions=extensions, **kwargs) - self.use_implicit_host = use_implicit_host - self.kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_update_description.py b/customSDK/servicefabric/models/stateless_service_update_description.py deleted file mode 100644 index 4dc99273..00000000 --- a/customSDK/servicefabric/models/stateless_service_update_description.py +++ /dev/null @@ -1,185 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_update_description import ServiceUpdateDescription - - -class StatelessServiceUpdateDescription(ServiceUpdateDescription): - """Describes an update for a stateless service. - - All required parameters must be populated in order to send to Azure. - - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 6 then the flags for - ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. - - None - Does not indicate any other properties are set. The value is - zero. - - TargetReplicaSetSize/InstanceCount - Indicates whether the - TargetReplicaSetSize property (for Stateful services) or the InstanceCount - property (for Stateless services) is set. The value is 1. - - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - property is set. The value is 2. - - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property - is set. The value is 4. - - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - property is set. The value is 8. - - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The - value is 16. - - PlacementConstraints - Indicates the PlacementConstraints property is - set. The value is 32. - - PlacementPolicyList - Indicates the ServicePlacementPolicies property is - set. The value is 64. - - Correlation - Indicates the CorrelationScheme property is set. The value - is 128. - - Metrics - Indicates the ServiceLoadMetrics property is set. The value is - 256. - - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The - value is 512. - - ScalingPolicy - Indicates the ScalingPolicies property is set. The value - is 1024. - - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit - property is set. The value is 2048. - - MinInstanceCount - Indicates the MinInstanceCount property is set. The - value is 4096. - - MinInstancePercentage - Indicates the MinInstancePercentage property is - set. The value is 8192. - - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 16384. - - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 32768. - - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property - is set. The value is 65536. - - ServiceDnsName - Indicates the ServiceDnsName property is set. The value - is 131072. - - TagsForPlacement - Indicates the TagsForPlacement property is set. The - value is 1048576. - - TagsForRunning - Indicates the TagsForRunning property is set. The value - is 2097152. - :type flags: str - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param load_metrics: The service load metrics. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param service_dns_name: The DNS name of the service. - :type service_dns_name: str - :param tags_for_placement: Tags for placement of this service. - :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :param tags_for_running: Tags for running of this service. - :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_count: The instance count. - :type instance_count: int - :param min_instance_count: MinInstanceCount is the minimum number of - instances that must be up to meet the EnsureAvailability safety check - during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation - -1 is first converted into the number of nodes on which the instances are - allowed to be placed according to the placement constraints on the - service. - :type min_instance_count: int - :param min_instance_percentage: MinInstancePercentage is the minimum - percentage of InstanceCount that must be up to meet the EnsureAvailability - safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage - computation, -1 is first converted into the number of nodes on which the - instances are allowed to be placed according to the placement constraints - on the service. - :type min_instance_percentage: int - :param instance_close_delay_duration_seconds: Duration in seconds, to wait - before a stateless instance is closed, to allow the active requests to - drain gracefully. This would be effective when the instance is closing - during the application/cluster upgrade and disabling node. - The endpoint exposed on this instance is removed prior to starting the - delay, which prevents new connections to this instance. - In addition, clients that have subscribed to service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do - the following upon receiving the endpoint removal notification: - - Stop sending new requests to this instance. - - Close existing connections after in-flight requests have completed. - - Connect to a different instance of the service partition for future - requests. - :type instance_close_delay_duration_seconds: str - :param instance_lifecycle_description: Defines how instances of this - service will behave during their lifecycle. - :type instance_lifecycle_description: - ~azure.servicefabric.models.InstanceLifecycleDescription - :param instance_restart_wait_duration_seconds: When a stateless instance - goes down, this timer starts. When it expires Service Fabric will create a - new instance on any node in the cluster. - This configuration is to reduce unnecessary creation of a new instance in - situations where the instance going down is likely to recover in a short - time. For example, during an upgrade. - The default value is 0, which indicates that when stateless instance goes - down, Service Fabric will immediately start building its replacement. - :type instance_restart_wait_duration_seconds: str - """ - - _validation = { - 'service_kind': {'required': True}, - 'instance_count': {'minimum': -1}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'str'}, - 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, - 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StatelessServiceUpdateDescription, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', None) - self.min_instance_count = kwargs.get('min_instance_count', None) - self.min_instance_percentage = kwargs.get('min_instance_percentage', None) - self.instance_close_delay_duration_seconds = kwargs.get('instance_close_delay_duration_seconds', None) - self.instance_lifecycle_description = kwargs.get('instance_lifecycle_description', None) - self.instance_restart_wait_duration_seconds = kwargs.get('instance_restart_wait_duration_seconds', None) - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stateless_service_update_description_py3.py b/customSDK/servicefabric/models/stateless_service_update_description_py3.py deleted file mode 100644 index 0e3ad1a8..00000000 --- a/customSDK/servicefabric/models/stateless_service_update_description_py3.py +++ /dev/null @@ -1,185 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_update_description_py3 import ServiceUpdateDescription - - -class StatelessServiceUpdateDescription(ServiceUpdateDescription): - """Describes an update for a stateless service. - - All required parameters must be populated in order to send to Azure. - - :param flags: Flags indicating whether other properties are set. Each of - the associated properties corresponds to a flag, specified below, which, - if set, indicate that the property is specified. - This property can be a combination of those flags obtained using bitwise - 'OR' operator. - For example, if the provided value is 6 then the flags for - ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. - - None - Does not indicate any other properties are set. The value is - zero. - - TargetReplicaSetSize/InstanceCount - Indicates whether the - TargetReplicaSetSize property (for Stateful services) or the InstanceCount - property (for Stateless services) is set. The value is 1. - - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration - property is set. The value is 2. - - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property - is set. The value is 4. - - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration - property is set. The value is 8. - - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The - value is 16. - - PlacementConstraints - Indicates the PlacementConstraints property is - set. The value is 32. - - PlacementPolicyList - Indicates the ServicePlacementPolicies property is - set. The value is 64. - - Correlation - Indicates the CorrelationScheme property is set. The value - is 128. - - Metrics - Indicates the ServiceLoadMetrics property is set. The value is - 256. - - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The - value is 512. - - ScalingPolicy - Indicates the ScalingPolicies property is set. The value - is 1024. - - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit - property is set. The value is 2048. - - MinInstanceCount - Indicates the MinInstanceCount property is set. The - value is 4096. - - MinInstancePercentage - Indicates the MinInstancePercentage property is - set. The value is 8192. - - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 16384. - - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration - property is set. The value is 32768. - - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property - is set. The value is 65536. - - ServiceDnsName - Indicates the ServiceDnsName property is set. The value - is 131072. - - TagsForPlacement - Indicates the TagsForPlacement property is set. The - value is 1048576. - - TagsForRunning - Indicates the TagsForRunning property is set. The value - is 2097152. - :type flags: str - :param placement_constraints: The placement constraints as a string. - Placement constraints are boolean expressions on node properties and allow - for restricting a service to particular nodes based on the service - requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :type placement_constraints: str - :param correlation_scheme: The correlation scheme. - :type correlation_scheme: - list[~azure.servicefabric.models.ServiceCorrelationDescription] - :param load_metrics: The service load metrics. - :type load_metrics: - list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: The service placement policies. - :type service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: The move cost for the service. Possible values - include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' - :type default_move_cost: str or ~azure.servicefabric.models.MoveCost - :param scaling_policies: Scaling policies for this service. - :type scaling_policies: - list[~azure.servicefabric.models.ScalingPolicyDescription] - :param service_dns_name: The DNS name of the service. - :type service_dns_name: str - :param tags_for_placement: Tags for placement of this service. - :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :param tags_for_running: Tags for running of this service. - :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :param service_kind: Required. Constant filled by server. - :type service_kind: str - :param instance_count: The instance count. - :type instance_count: int - :param min_instance_count: MinInstanceCount is the minimum number of - instances that must be up to meet the EnsureAvailability safety check - during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation - -1 is first converted into the number of nodes on which the instances are - allowed to be placed according to the placement constraints on the - service. - :type min_instance_count: int - :param min_instance_percentage: MinInstancePercentage is the minimum - percentage of InstanceCount that must be up to meet the EnsureAvailability - safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( - MinInstancePercentage/100.0 * InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage - computation, -1 is first converted into the number of nodes on which the - instances are allowed to be placed according to the placement constraints - on the service. - :type min_instance_percentage: int - :param instance_close_delay_duration_seconds: Duration in seconds, to wait - before a stateless instance is closed, to allow the active requests to - drain gracefully. This would be effective when the instance is closing - during the application/cluster upgrade and disabling node. - The endpoint exposed on this instance is removed prior to starting the - delay, which prevents new connections to this instance. - In addition, clients that have subscribed to service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do - the following upon receiving the endpoint removal notification: - - Stop sending new requests to this instance. - - Close existing connections after in-flight requests have completed. - - Connect to a different instance of the service partition for future - requests. - :type instance_close_delay_duration_seconds: str - :param instance_lifecycle_description: Defines how instances of this - service will behave during their lifecycle. - :type instance_lifecycle_description: - ~azure.servicefabric.models.InstanceLifecycleDescription - :param instance_restart_wait_duration_seconds: When a stateless instance - goes down, this timer starts. When it expires Service Fabric will create a - new instance on any node in the cluster. - This configuration is to reduce unnecessary creation of a new instance in - situations where the instance going down is likely to recover in a short - time. For example, during an upgrade. - The default value is 0, which indicates that when stateless instance goes - down, Service Fabric will immediately start building its replacement. - :type instance_restart_wait_duration_seconds: str - """ - - _validation = { - 'service_kind': {'required': True}, - 'instance_count': {'minimum': -1}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'str'}, - 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, - 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'str'}, - } - - def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, instance_count: int=None, min_instance_count: int=None, min_instance_percentage: int=None, instance_close_delay_duration_seconds: str=None, instance_lifecycle_description=None, instance_restart_wait_duration_seconds: str=None, **kwargs) -> None: - super(StatelessServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_dns_name=service_dns_name, tags_for_placement=tags_for_placement, tags_for_running=tags_for_running, **kwargs) - self.instance_count = instance_count - self.min_instance_count = min_instance_count - self.min_instance_percentage = min_instance_percentage - self.instance_close_delay_duration_seconds = instance_close_delay_duration_seconds - self.instance_lifecycle_description = instance_lifecycle_description - self.instance_restart_wait_duration_seconds = instance_restart_wait_duration_seconds - self.service_kind = 'Stateless' diff --git a/customSDK/servicefabric/models/stopped_chaos_event.py b/customSDK/servicefabric/models/stopped_chaos_event.py deleted file mode 100644 index c86b8891..00000000 --- a/customSDK/servicefabric/models/stopped_chaos_event.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .chaos_event import ChaosEvent - - -class StoppedChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos stops because either - the user issued a stop or the time to run was up. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Describes why Chaos stopped. Chaos can stop because of - StopChaos API call or the timeToRun provided in ChaosParameters is over. - :type reason: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StoppedChaosEvent, self).__init__(**kwargs) - self.reason = kwargs.get('reason', None) - self.kind = 'Stopped' diff --git a/customSDK/servicefabric/models/stopped_chaos_event_py3.py b/customSDK/servicefabric/models/stopped_chaos_event_py3.py deleted file mode 100644 index 0390a4ad..00000000 --- a/customSDK/servicefabric/models/stopped_chaos_event_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .chaos_event_py3 import ChaosEvent - - -class StoppedChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos stops because either - the user issued a stop or the time to run was up. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Describes why Chaos stopped. Chaos can stop because of - StopChaos API call or the timeToRun provided in ChaosParameters is over. - :type reason: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: - super(StoppedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.reason = reason - self.kind = 'Stopped' diff --git a/customSDK/servicefabric/models/string_property_value.py b/customSDK/servicefabric/models/string_property_value.py deleted file mode 100644 index 6a4abd86..00000000 --- a/customSDK/servicefabric/models/string_property_value.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_value import PropertyValue - - -class StringPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type String. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. The data of the property value. - :type data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StringPropertyValue, self).__init__(**kwargs) - self.data = kwargs.get('data', None) - self.kind = 'String' diff --git a/customSDK/servicefabric/models/string_property_value_py3.py b/customSDK/servicefabric/models/string_property_value_py3.py deleted file mode 100644 index 65761bce..00000000 --- a/customSDK/servicefabric/models/string_property_value_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_value_py3 import PropertyValue - - -class StringPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type String. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param data: Required. The data of the property value. - :type data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__(self, *, data: str, **kwargs) -> None: - super(StringPropertyValue, self).__init__(**kwargs) - self.data = data - self.kind = 'String' diff --git a/customSDK/servicefabric/models/successful_property_batch_info.py b/customSDK/servicefabric/models/successful_property_batch_info.py deleted file mode 100644 index 5f28d5bc..00000000 --- a/customSDK/servicefabric/models/successful_property_batch_info.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_batch_info import PropertyBatchInfo - - -class SuccessfulPropertyBatchInfo(PropertyBatchInfo): - """Derived from PropertyBatchInfo. Represents the property batch succeeding. - Contains the results of any "Get" operations in the batch. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param properties: A map containing the properties that were requested - through any "Get" property batch operations. The key represents the index - of the "Get" operation in the original request, in string form. The value - is the property. If a property is not found, it will not be in the map. - :type properties: dict[str, ~azure.servicefabric.models.PropertyInfo] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'properties': {'key': 'Properties', 'type': '{PropertyInfo}'}, - } - - def __init__(self, **kwargs): - super(SuccessfulPropertyBatchInfo, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.kind = 'Successful' diff --git a/customSDK/servicefabric/models/successful_property_batch_info_py3.py b/customSDK/servicefabric/models/successful_property_batch_info_py3.py deleted file mode 100644 index 34fc6063..00000000 --- a/customSDK/servicefabric/models/successful_property_batch_info_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .property_batch_info_py3 import PropertyBatchInfo - - -class SuccessfulPropertyBatchInfo(PropertyBatchInfo): - """Derived from PropertyBatchInfo. Represents the property batch succeeding. - Contains the results of any "Get" operations in the batch. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param properties: A map containing the properties that were requested - through any "Get" property batch operations. The key represents the index - of the "Get" operation in the original request, in string form. The value - is the property. If a property is not found, it will not be in the map. - :type properties: dict[str, ~azure.servicefabric.models.PropertyInfo] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'properties': {'key': 'Properties', 'type': '{PropertyInfo}'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(SuccessfulPropertyBatchInfo, self).__init__(**kwargs) - self.properties = properties - self.kind = 'Successful' diff --git a/customSDK/servicefabric/models/system_application_health_evaluation.py b/customSDK/servicefabric/models/system_application_health_evaluation.py deleted file mode 100644 index fb13fb75..00000000 --- a/customSDK/servicefabric/models/system_application_health_evaluation.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class SystemApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for the fabric:/System application, containing - information about the data and the algorithm used by health store to - evaluate health. The evaluation is returned only when the aggregated health - state of the cluster is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the system application. The types - of the unhealthy evaluations can be DeployedApplicationsHealthEvaluation, - ServicesHealthEvaluation or EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(SystemApplicationHealthEvaluation, self).__init__(**kwargs) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'SystemApplication' diff --git a/customSDK/servicefabric/models/system_application_health_evaluation_py3.py b/customSDK/servicefabric/models/system_application_health_evaluation_py3.py deleted file mode 100644 index 5a121021..00000000 --- a/customSDK/servicefabric/models/system_application_health_evaluation_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class SystemApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for the fabric:/System application, containing - information about the data and the algorithm used by health store to - evaluate health. The evaluation is returned only when the aggregated health - state of the cluster is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the current aggregated health state of the system application. The types - of the unhealthy evaluations can be DeployedApplicationsHealthEvaluation, - ServicesHealthEvaluation or EventHealthEvaluation. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, unhealthy_evaluations=None, **kwargs) -> None: - super(SystemApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'SystemApplication' diff --git a/customSDK/servicefabric/models/tcp_config.py b/customSDK/servicefabric/models/tcp_config.py deleted file mode 100644 index 96401697..00000000 --- a/customSDK/servicefabric/models/tcp_config.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TcpConfig(Model): - """Describes the tcp configuration for external connectivity for this network. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. tcp gateway config name. - :type name: str - :param port: Required. Specifies the port at which the service endpoint - below needs to be exposed. - :type port: int - :param destination: Required. Describes destination endpoint for routing - traffic. - :type destination: ~azure.servicefabric.models.GatewayDestination - """ - - _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, - } - - def __init__(self, **kwargs): - super(TcpConfig, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.port = kwargs.get('port', None) - self.destination = kwargs.get('destination', None) diff --git a/customSDK/servicefabric/models/tcp_config_py3.py b/customSDK/servicefabric/models/tcp_config_py3.py deleted file mode 100644 index 7266484b..00000000 --- a/customSDK/servicefabric/models/tcp_config_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TcpConfig(Model): - """Describes the tcp configuration for external connectivity for this network. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. tcp gateway config name. - :type name: str - :param port: Required. Specifies the port at which the service endpoint - below needs to be exposed. - :type port: int - :param destination: Required. Describes destination endpoint for routing - traffic. - :type destination: ~azure.servicefabric.models.GatewayDestination - """ - - _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, - } - - def __init__(self, *, name: str, port: int, destination, **kwargs) -> None: - super(TcpConfig, self).__init__(**kwargs) - self.name = name - self.port = port - self.destination = destination diff --git a/customSDK/servicefabric/models/test_error_chaos_event.py b/customSDK/servicefabric/models/test_error_chaos_event.py deleted file mode 100644 index 70ea29ad..00000000 --- a/customSDK/servicefabric/models/test_error_chaos_event.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .chaos_event import ChaosEvent - - -class TestErrorChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when an unexpected event occurs - in the Chaos engine. - For example, due to the cluster snapshot being inconsistent, while faulting - an entity, Chaos found that the entity was already faulted -- which would - be an unexpected event. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Describes why TestErrorChaosEvent was generated. For - example, Chaos tries to fault a partition but finds that the partition is - no longer fault tolerant, then a TestErrorEvent gets generated with the - reason stating that the partition is not fault tolerant. - :type reason: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TestErrorChaosEvent, self).__init__(**kwargs) - self.reason = kwargs.get('reason', None) - self.kind = 'TestError' diff --git a/customSDK/servicefabric/models/test_error_chaos_event_py3.py b/customSDK/servicefabric/models/test_error_chaos_event_py3.py deleted file mode 100644 index 3ab8f587..00000000 --- a/customSDK/servicefabric/models/test_error_chaos_event_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .chaos_event_py3 import ChaosEvent - - -class TestErrorChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when an unexpected event occurs - in the Chaos engine. - For example, due to the cluster snapshot being inconsistent, while faulting - an entity, Chaos found that the entity was already faulted -- which would - be an unexpected event. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Describes why TestErrorChaosEvent was generated. For - example, Chaos tries to fault a partition but finds that the partition is - no longer fault tolerant, then a TestErrorEvent gets generated with the - reason stating that the partition is not fault tolerant. - :type reason: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: - super(TestErrorChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.reason = reason - self.kind = 'TestError' diff --git a/customSDK/servicefabric/models/time_based_backup_schedule_description.py b/customSDK/servicefabric/models/time_based_backup_schedule_description.py deleted file mode 100644 index b2f36cd7..00000000 --- a/customSDK/servicefabric/models/time_based_backup_schedule_description.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_schedule_description import BackupScheduleDescription - - -class TimeBasedBackupScheduleDescription(BackupScheduleDescription): - """Describes the time based backup schedule. - - All required parameters must be populated in order to send to Azure. - - :param schedule_kind: Required. Constant filled by server. - :type schedule_kind: str - :param schedule_frequency_type: Required. Describes the frequency with - which to run the time based backup schedule. Possible values include: - 'Invalid', 'Daily', 'Weekly' - :type schedule_frequency_type: str or - ~azure.servicefabric.models.BackupScheduleFrequencyType - :param run_days: List of days of a week when to trigger the periodic - backup. This is valid only when the backup schedule frequency type is - weekly. - :type run_days: list[str or ~azure.servicefabric.models.DayOfWeek] - :param run_times: Required. Represents the list of exact time during the - day in ISO8601 format. Like '19:00:00' will represent '7PM' during the - day. Date specified along with time will be ignored. - :type run_times: list[datetime] - """ - - _validation = { - 'schedule_kind': {'required': True}, - 'schedule_frequency_type': {'required': True}, - 'run_times': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - 'schedule_frequency_type': {'key': 'ScheduleFrequencyType', 'type': 'str'}, - 'run_days': {'key': 'RunDays', 'type': '[str]'}, - 'run_times': {'key': 'RunTimes', 'type': '[iso-8601]'}, - } - - def __init__(self, **kwargs): - super(TimeBasedBackupScheduleDescription, self).__init__(**kwargs) - self.schedule_frequency_type = kwargs.get('schedule_frequency_type', None) - self.run_days = kwargs.get('run_days', None) - self.run_times = kwargs.get('run_times', None) - self.schedule_kind = 'TimeBased' diff --git a/customSDK/servicefabric/models/time_based_backup_schedule_description_py3.py b/customSDK/servicefabric/models/time_based_backup_schedule_description_py3.py deleted file mode 100644 index 63b0d0b8..00000000 --- a/customSDK/servicefabric/models/time_based_backup_schedule_description_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .backup_schedule_description_py3 import BackupScheduleDescription - - -class TimeBasedBackupScheduleDescription(BackupScheduleDescription): - """Describes the time based backup schedule. - - All required parameters must be populated in order to send to Azure. - - :param schedule_kind: Required. Constant filled by server. - :type schedule_kind: str - :param schedule_frequency_type: Required. Describes the frequency with - which to run the time based backup schedule. Possible values include: - 'Invalid', 'Daily', 'Weekly' - :type schedule_frequency_type: str or - ~azure.servicefabric.models.BackupScheduleFrequencyType - :param run_days: List of days of a week when to trigger the periodic - backup. This is valid only when the backup schedule frequency type is - weekly. - :type run_days: list[str or ~azure.servicefabric.models.DayOfWeek] - :param run_times: Required. Represents the list of exact time during the - day in ISO8601 format. Like '19:00:00' will represent '7PM' during the - day. Date specified along with time will be ignored. - :type run_times: list[datetime] - """ - - _validation = { - 'schedule_kind': {'required': True}, - 'schedule_frequency_type': {'required': True}, - 'run_times': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - 'schedule_frequency_type': {'key': 'ScheduleFrequencyType', 'type': 'str'}, - 'run_days': {'key': 'RunDays', 'type': '[str]'}, - 'run_times': {'key': 'RunTimes', 'type': '[iso-8601]'}, - } - - def __init__(self, *, schedule_frequency_type, run_times, run_days=None, **kwargs) -> None: - super(TimeBasedBackupScheduleDescription, self).__init__(**kwargs) - self.schedule_frequency_type = schedule_frequency_type - self.run_days = run_days - self.run_times = run_times - self.schedule_kind = 'TimeBased' diff --git a/customSDK/servicefabric/models/time_of_day.py b/customSDK/servicefabric/models/time_of_day.py deleted file mode 100644 index 313c4fd7..00000000 --- a/customSDK/servicefabric/models/time_of_day.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TimeOfDay(Model): - """Defines an hour and minute of the day specified in 24 hour time. - - :param hour: Represents the hour of the day. Value must be between 0 and - 23 inclusive. - :type hour: int - :param minute: Represents the minute of the hour. Value must be between 0 - to 59 inclusive. - :type minute: int - """ - - _validation = { - 'hour': {'maximum': 23, 'minimum': 0}, - 'minute': {'maximum': 59, 'minimum': 0}, - } - - _attribute_map = { - 'hour': {'key': 'Hour', 'type': 'int'}, - 'minute': {'key': 'Minute', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(TimeOfDay, self).__init__(**kwargs) - self.hour = kwargs.get('hour', None) - self.minute = kwargs.get('minute', None) diff --git a/customSDK/servicefabric/models/time_of_day_py3.py b/customSDK/servicefabric/models/time_of_day_py3.py deleted file mode 100644 index 28215d00..00000000 --- a/customSDK/servicefabric/models/time_of_day_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TimeOfDay(Model): - """Defines an hour and minute of the day specified in 24 hour time. - - :param hour: Represents the hour of the day. Value must be between 0 and - 23 inclusive. - :type hour: int - :param minute: Represents the minute of the hour. Value must be between 0 - to 59 inclusive. - :type minute: int - """ - - _validation = { - 'hour': {'maximum': 23, 'minimum': 0}, - 'minute': {'maximum': 59, 'minimum': 0}, - } - - _attribute_map = { - 'hour': {'key': 'Hour', 'type': 'int'}, - 'minute': {'key': 'Minute', 'type': 'int'}, - } - - def __init__(self, *, hour: int=None, minute: int=None, **kwargs) -> None: - super(TimeOfDay, self).__init__(**kwargs) - self.hour = hour - self.minute = minute diff --git a/customSDK/servicefabric/models/time_range.py b/customSDK/servicefabric/models/time_range.py deleted file mode 100644 index 2378d822..00000000 --- a/customSDK/servicefabric/models/time_range.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TimeRange(Model): - """Defines a time range in a 24 hour day specified by a start and end time. - - :param start_time: Defines an hour and minute of the day specified in 24 - hour time. - :type start_time: ~azure.servicefabric.models.TimeOfDay - :param end_time: Defines an hour and minute of the day specified in 24 - hour time. - :type end_time: ~azure.servicefabric.models.TimeOfDay - """ - - _attribute_map = { - 'start_time': {'key': 'StartTime', 'type': 'TimeOfDay'}, - 'end_time': {'key': 'EndTime', 'type': 'TimeOfDay'}, - } - - def __init__(self, **kwargs): - super(TimeRange, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) diff --git a/customSDK/servicefabric/models/time_range_py3.py b/customSDK/servicefabric/models/time_range_py3.py deleted file mode 100644 index 09c72e10..00000000 --- a/customSDK/servicefabric/models/time_range_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TimeRange(Model): - """Defines a time range in a 24 hour day specified by a start and end time. - - :param start_time: Defines an hour and minute of the day specified in 24 - hour time. - :type start_time: ~azure.servicefabric.models.TimeOfDay - :param end_time: Defines an hour and minute of the day specified in 24 - hour time. - :type end_time: ~azure.servicefabric.models.TimeOfDay - """ - - _attribute_map = { - 'start_time': {'key': 'StartTime', 'type': 'TimeOfDay'}, - 'end_time': {'key': 'EndTime', 'type': 'TimeOfDay'}, - } - - def __init__(self, *, start_time=None, end_time=None, **kwargs) -> None: - super(TimeRange, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time diff --git a/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description.py b/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description.py deleted file mode 100644 index 3007da81..00000000 --- a/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_scheme_description import PartitionSchemeDescription - - -class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): - """Describes a partitioning scheme where an integer range is allocated evenly - across a number of partitions. - - All required parameters must be populated in order to send to Azure. - - :param partition_scheme: Required. Constant filled by server. - :type partition_scheme: str - :param count: Required. The number of partitions. - :type count: int - :param low_key: Required. String indicating the lower bound of the - partition key range that - should be split between the partitions. - :type low_key: str - :param high_key: Required. String indicating the upper bound of the - partition key range that - should be split between the partitions. - :type high_key: str - """ - - _validation = { - 'partition_scheme': {'required': True}, - 'count': {'required': True}, - 'low_key': {'required': True}, - 'high_key': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UniformInt64RangePartitionSchemeDescription, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.low_key = kwargs.get('low_key', None) - self.high_key = kwargs.get('high_key', None) - self.partition_scheme = 'UniformInt64Range' diff --git a/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description_py3.py b/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description_py3.py deleted file mode 100644 index 4ad8718e..00000000 --- a/customSDK/servicefabric/models/uniform_int64_range_partition_scheme_description_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_scheme_description_py3 import PartitionSchemeDescription - - -class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): - """Describes a partitioning scheme where an integer range is allocated evenly - across a number of partitions. - - All required parameters must be populated in order to send to Azure. - - :param partition_scheme: Required. Constant filled by server. - :type partition_scheme: str - :param count: Required. The number of partitions. - :type count: int - :param low_key: Required. String indicating the lower bound of the - partition key range that - should be split between the partitions. - :type low_key: str - :param high_key: Required. String indicating the upper bound of the - partition key range that - should be split between the partitions. - :type high_key: str - """ - - _validation = { - 'partition_scheme': {'required': True}, - 'count': {'required': True}, - 'low_key': {'required': True}, - 'high_key': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, - } - - def __init__(self, *, count: int, low_key: str, high_key: str, **kwargs) -> None: - super(UniformInt64RangePartitionSchemeDescription, self).__init__(**kwargs) - self.count = count - self.low_key = low_key - self.high_key = high_key - self.partition_scheme = 'UniformInt64Range' diff --git a/customSDK/servicefabric/models/unplaced_replica_information.py b/customSDK/servicefabric/models/unplaced_replica_information.py deleted file mode 100644 index ed715c2f..00000000 --- a/customSDK/servicefabric/models/unplaced_replica_information.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UnplacedReplicaInformation(Model): - """Contains information for an unplaced replica. - - :param service_name: The name of the service. - :type service_name: str - :param partition_id: The ID of the partition. - :type partition_id: str - :param unplaced_replica_details: List of reasons due to which a replica - cannot be placed. - :type unplaced_replica_details: list[str] - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'unplaced_replica_details': {'key': 'UnplacedReplicaDetails', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(UnplacedReplicaInformation, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.unplaced_replica_details = kwargs.get('unplaced_replica_details', None) diff --git a/customSDK/servicefabric/models/unplaced_replica_information_py3.py b/customSDK/servicefabric/models/unplaced_replica_information_py3.py deleted file mode 100644 index 93e162c6..00000000 --- a/customSDK/servicefabric/models/unplaced_replica_information_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UnplacedReplicaInformation(Model): - """Contains information for an unplaced replica. - - :param service_name: The name of the service. - :type service_name: str - :param partition_id: The ID of the partition. - :type partition_id: str - :param unplaced_replica_details: List of reasons due to which a replica - cannot be placed. - :type unplaced_replica_details: list[str] - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'unplaced_replica_details': {'key': 'UnplacedReplicaDetails', 'type': '[str]'}, - } - - def __init__(self, *, service_name: str=None, partition_id: str=None, unplaced_replica_details=None, **kwargs) -> None: - super(UnplacedReplicaInformation, self).__init__(**kwargs) - self.service_name = service_name - self.partition_id = partition_id - self.unplaced_replica_details = unplaced_replica_details diff --git a/customSDK/servicefabric/models/unprovision_application_type_description_info.py b/customSDK/servicefabric/models/unprovision_application_type_description_info.py deleted file mode 100644 index d946b380..00000000 --- a/customSDK/servicefabric/models/unprovision_application_type_description_info.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UnprovisionApplicationTypeDescriptionInfo(Model): - """Describes the operation to unregister or unprovision an application type - and its version that was registered with the Service Fabric. - - All required parameters must be populated in order to send to Azure. - - :param application_type_version: Required. The version of the application - type as defined in the application manifest. - :type application_type_version: str - :param async_property: The flag indicating whether or not unprovision - should occur asynchronously. When set to true, the unprovision operation - returns when the request is accepted by the system, and the unprovision - operation continues without any timeout limit. The default value is false. - However, we recommend setting it to true for large application packages - that were provisioned. - :type async_property: bool - """ - - _validation = { - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'async_property': {'key': 'Async', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(UnprovisionApplicationTypeDescriptionInfo, self).__init__(**kwargs) - self.application_type_version = kwargs.get('application_type_version', None) - self.async_property = kwargs.get('async_property', None) diff --git a/customSDK/servicefabric/models/unprovision_application_type_description_info_py3.py b/customSDK/servicefabric/models/unprovision_application_type_description_info_py3.py deleted file mode 100644 index abc8598a..00000000 --- a/customSDK/servicefabric/models/unprovision_application_type_description_info_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UnprovisionApplicationTypeDescriptionInfo(Model): - """Describes the operation to unregister or unprovision an application type - and its version that was registered with the Service Fabric. - - All required parameters must be populated in order to send to Azure. - - :param application_type_version: Required. The version of the application - type as defined in the application manifest. - :type application_type_version: str - :param async_property: The flag indicating whether or not unprovision - should occur asynchronously. When set to true, the unprovision operation - returns when the request is accepted by the system, and the unprovision - operation continues without any timeout limit. The default value is false. - However, we recommend setting it to true for large application packages - that were provisioned. - :type async_property: bool - """ - - _validation = { - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'async_property': {'key': 'Async', 'type': 'bool'}, - } - - def __init__(self, *, application_type_version: str, async_property: bool=None, **kwargs) -> None: - super(UnprovisionApplicationTypeDescriptionInfo, self).__init__(**kwargs) - self.application_type_version = application_type_version - self.async_property = async_property diff --git a/customSDK/servicefabric/models/unprovision_fabric_description.py b/customSDK/servicefabric/models/unprovision_fabric_description.py deleted file mode 100644 index c56746bc..00000000 --- a/customSDK/servicefabric/models/unprovision_fabric_description.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UnprovisionFabricDescription(Model): - """Describes the parameters for unprovisioning a cluster. - - :param code_version: The cluster code package version. - :type code_version: str - :param config_version: The cluster manifest version. - :type config_version: str - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UnprovisionFabricDescription, self).__init__(**kwargs) - self.code_version = kwargs.get('code_version', None) - self.config_version = kwargs.get('config_version', None) diff --git a/customSDK/servicefabric/models/unprovision_fabric_description_py3.py b/customSDK/servicefabric/models/unprovision_fabric_description_py3.py deleted file mode 100644 index 02691b03..00000000 --- a/customSDK/servicefabric/models/unprovision_fabric_description_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UnprovisionFabricDescription(Model): - """Describes the parameters for unprovisioning a cluster. - - :param code_version: The cluster code package version. - :type code_version: str - :param config_version: The cluster manifest version. - :type config_version: str - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - } - - def __init__(self, *, code_version: str=None, config_version: str=None, **kwargs) -> None: - super(UnprovisionFabricDescription, self).__init__(**kwargs) - self.code_version = code_version - self.config_version = config_version diff --git a/customSDK/servicefabric/models/update_cluster_upgrade_description.py b/customSDK/servicefabric/models/update_cluster_upgrade_description.py deleted file mode 100644 index 22632ca5..00000000 --- a/customSDK/servicefabric/models/update_cluster_upgrade_description.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateClusterUpgradeDescription(Model): - """Parameters for updating a cluster upgrade. - - :param upgrade_kind: The type of upgrade out of the following possible - values. Possible values include: 'Invalid', 'Rolling', - 'Rolling_ForceRestart'. Default value: "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeType - :param update_description: Describes the parameters for updating a rolling - upgrade of application or cluster. - :type update_description: - ~azure.servicefabric.models.RollingUpgradeUpdateDescription - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param enable_delta_health_evaluation: When true, enables delta health - evaluation rather than absolute health evaluation after completion of each - upgrade domain. - :type enable_delta_health_evaluation: bool - :param cluster_upgrade_health_policy: Defines a health policy used to - evaluate the health of the cluster during a cluster upgrade. - :type cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :param application_health_policy_map: Defines the application health - policy map used to evaluate the health of an application or one of its - children entities. - :type application_health_policy_map: - ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _attribute_map = { - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__(self, **kwargs): - super(UpdateClusterUpgradeDescription, self).__init__(**kwargs) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.update_description = kwargs.get('update_description', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) - self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) diff --git a/customSDK/servicefabric/models/update_cluster_upgrade_description_py3.py b/customSDK/servicefabric/models/update_cluster_upgrade_description_py3.py deleted file mode 100644 index 8e1f16cb..00000000 --- a/customSDK/servicefabric/models/update_cluster_upgrade_description_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdateClusterUpgradeDescription(Model): - """Parameters for updating a cluster upgrade. - - :param upgrade_kind: The type of upgrade out of the following possible - values. Possible values include: 'Invalid', 'Rolling', - 'Rolling_ForceRestart'. Default value: "Rolling" . - :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeType - :param update_description: Describes the parameters for updating a rolling - upgrade of application or cluster. - :type update_description: - ~azure.servicefabric.models.RollingUpgradeUpdateDescription - :param cluster_health_policy: Defines a health policy used to evaluate the - health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param enable_delta_health_evaluation: When true, enables delta health - evaluation rather than absolute health evaluation after completion of each - upgrade domain. - :type enable_delta_health_evaluation: bool - :param cluster_upgrade_health_policy: Defines a health policy used to - evaluate the health of the cluster during a cluster upgrade. - :type cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :param application_health_policy_map: Defines the application health - policy map used to evaluate the health of an application or one of its - children entities. - :type application_health_policy_map: - ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _attribute_map = { - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__(self, *, upgrade_kind="Rolling", update_description=None, cluster_health_policy=None, enable_delta_health_evaluation: bool=None, cluster_upgrade_health_policy=None, application_health_policy_map=None, **kwargs) -> None: - super(UpdateClusterUpgradeDescription, self).__init__(**kwargs) - self.upgrade_kind = upgrade_kind - self.update_description = update_description - self.cluster_health_policy = cluster_health_policy - self.enable_delta_health_evaluation = enable_delta_health_evaluation - self.cluster_upgrade_health_policy = cluster_upgrade_health_policy - self.application_health_policy_map = application_health_policy_map diff --git a/customSDK/servicefabric/models/update_partition_load_result.py b/customSDK/servicefabric/models/update_partition_load_result.py deleted file mode 100644 index 38866a27..00000000 --- a/customSDK/servicefabric/models/update_partition_load_result.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdatePartitionLoadResult(Model): - """Specifies result of updating load for specified partitions. The output will - be ordered based on the partition ID. - - :param partition_id: Id of the partition. - :type partition_id: str - :param partition_error_code: If OperationState is Completed - this is 0. - If OperationState is Faulted - this is an error code indicating the - reason. - :type partition_error_code: int - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'partition_error_code': {'key': 'PartitionErrorCode', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(UpdatePartitionLoadResult, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.partition_error_code = kwargs.get('partition_error_code', None) diff --git a/customSDK/servicefabric/models/update_partition_load_result_py3.py b/customSDK/servicefabric/models/update_partition_load_result_py3.py deleted file mode 100644 index f5991dca..00000000 --- a/customSDK/servicefabric/models/update_partition_load_result_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpdatePartitionLoadResult(Model): - """Specifies result of updating load for specified partitions. The output will - be ordered based on the partition ID. - - :param partition_id: Id of the partition. - :type partition_id: str - :param partition_error_code: If OperationState is Completed - this is 0. - If OperationState is Faulted - this is an error code indicating the - reason. - :type partition_error_code: int - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'partition_error_code': {'key': 'PartitionErrorCode', 'type': 'int'}, - } - - def __init__(self, *, partition_id: str=None, partition_error_code: int=None, **kwargs) -> None: - super(UpdatePartitionLoadResult, self).__init__(**kwargs) - self.partition_id = partition_id - self.partition_error_code = partition_error_code diff --git a/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation.py b/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation.py deleted file mode 100644 index 02d0947d..00000000 --- a/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class UpgradeDomainDeltaNodesCheckHealthEvaluation(HealthEvaluation): - """Represents health evaluation for delta unhealthy cluster nodes in an - upgrade domain, containing health evaluations for each unhealthy node that - impacted current aggregated health state. - Can be returned during cluster upgrade when cluster aggregated health state - is Warning or Error. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param upgrade_domain_name: Name of the upgrade domain where nodes health - is currently evaluated. - :type upgrade_domain_name: str - :param baseline_error_count: Number of upgrade domain nodes with - aggregated heath state Error in the health store at the beginning of the - cluster upgrade. - :type baseline_error_count: long - :param baseline_total_count: Total number of upgrade domain nodes in the - health store at the beginning of the cluster upgrade. - :type baseline_total_count: long - :param max_percent_delta_unhealthy_nodes: Maximum allowed percentage of - upgrade domain delta unhealthy nodes from the ClusterUpgradeHealthPolicy. - :type max_percent_delta_unhealthy_nodes: int - :param total_count: Total number of upgrade domain nodes in the health - store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - NodeHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, - 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(UpgradeDomainDeltaNodesCheckHealthEvaluation, self).__init__(**kwargs) - self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) - self.baseline_error_count = kwargs.get('baseline_error_count', None) - self.baseline_total_count = kwargs.get('baseline_total_count', None) - self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'UpgradeDomainDeltaNodesCheck' diff --git a/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation_py3.py b/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation_py3.py deleted file mode 100644 index 9df9759b..00000000 --- a/customSDK/servicefabric/models/upgrade_domain_delta_nodes_check_health_evaluation_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class UpgradeDomainDeltaNodesCheckHealthEvaluation(HealthEvaluation): - """Represents health evaluation for delta unhealthy cluster nodes in an - upgrade domain, containing health evaluations for each unhealthy node that - impacted current aggregated health state. - Can be returned during cluster upgrade when cluster aggregated health state - is Warning or Error. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param upgrade_domain_name: Name of the upgrade domain where nodes health - is currently evaluated. - :type upgrade_domain_name: str - :param baseline_error_count: Number of upgrade domain nodes with - aggregated heath state Error in the health store at the beginning of the - cluster upgrade. - :type baseline_error_count: long - :param baseline_total_count: Total number of upgrade domain nodes in the - health store at the beginning of the cluster upgrade. - :type baseline_total_count: long - :param max_percent_delta_unhealthy_nodes: Maximum allowed percentage of - upgrade domain delta unhealthy nodes from the ClusterUpgradeHealthPolicy. - :type max_percent_delta_unhealthy_nodes: int - :param total_count: Total number of upgrade domain nodes in the health - store. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - NodeHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, - 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, upgrade_domain_name: str=None, baseline_error_count: int=None, baseline_total_count: int=None, max_percent_delta_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(UpgradeDomainDeltaNodesCheckHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.upgrade_domain_name = upgrade_domain_name - self.baseline_error_count = baseline_error_count - self.baseline_total_count = baseline_total_count - self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'UpgradeDomainDeltaNodesCheck' diff --git a/customSDK/servicefabric/models/upgrade_domain_deployed_applications_health_evaluation.py b/customSDK/servicefabric/models/upgrade_domain_deployed_applications_health_evaluation.py deleted file mode 100644 index 21a74858..00000000 --- a/customSDK/servicefabric/models/upgrade_domain_deployed_applications_health_evaluation.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class UpgradeDomainDeployedApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for deployed applications in an upgrade - domain, containing health evaluations for each unhealthy deployed - application that impacted current aggregated health state. Can be returned - when evaluating cluster health during cluster upgrade and the aggregated - health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param upgrade_domain_name: Name of the upgrade domain where deployed - applications health is currently evaluated. - :type upgrade_domain_name: str - :param max_percent_unhealthy_deployed_applications: Maximum allowed - percentage of unhealthy deployed applications from the - ClusterHealthPolicy. - :type max_percent_unhealthy_deployed_applications: int - :param total_count: Total number of deployed applications in the current - upgrade domain. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - DeployedApplicationHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(UpgradeDomainDeployedApplicationsHealthEvaluation, self).__init__(**kwargs) - self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) - self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'UpgradeDomainDeployedApplications' diff --git a/customSDK/servicefabric/models/upgrade_domain_deployed_applications_health_evaluation_py3.py b/customSDK/servicefabric/models/upgrade_domain_deployed_applications_health_evaluation_py3.py deleted file mode 100644 index 7d5dcc2b..00000000 --- a/customSDK/servicefabric/models/upgrade_domain_deployed_applications_health_evaluation_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class UpgradeDomainDeployedApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for deployed applications in an upgrade - domain, containing health evaluations for each unhealthy deployed - application that impacted current aggregated health state. Can be returned - when evaluating cluster health during cluster upgrade and the aggregated - health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param upgrade_domain_name: Name of the upgrade domain where deployed - applications health is currently evaluated. - :type upgrade_domain_name: str - :param max_percent_unhealthy_deployed_applications: Maximum allowed - percentage of unhealthy deployed applications from the - ClusterHealthPolicy. - :type max_percent_unhealthy_deployed_applications: int - :param total_count: Total number of deployed applications in the current - upgrade domain. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - DeployedApplicationHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, upgrade_domain_name: str=None, max_percent_unhealthy_deployed_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(UpgradeDomainDeployedApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.upgrade_domain_name = upgrade_domain_name - self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'UpgradeDomainDeployedApplications' diff --git a/customSDK/servicefabric/models/upgrade_domain_info.py b/customSDK/servicefabric/models/upgrade_domain_info.py deleted file mode 100644 index 71233ce8..00000000 --- a/customSDK/servicefabric/models/upgrade_domain_info.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeDomainInfo(Model): - """Information about an upgrade domain. - - :param name: The name of the upgrade domain - :type name: str - :param state: The state of the upgrade domain. Possible values include: - 'Invalid', 'Pending', 'InProgress', 'Completed' - :type state: str or ~azure.servicefabric.models.UpgradeDomainState - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UpgradeDomainInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.state = kwargs.get('state', None) diff --git a/customSDK/servicefabric/models/upgrade_domain_info_py3.py b/customSDK/servicefabric/models/upgrade_domain_info_py3.py deleted file mode 100644 index 9edb2cf4..00000000 --- a/customSDK/servicefabric/models/upgrade_domain_info_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeDomainInfo(Model): - """Information about an upgrade domain. - - :param name: The name of the upgrade domain - :type name: str - :param state: The state of the upgrade domain. Possible values include: - 'Invalid', 'Pending', 'InProgress', 'Completed' - :type state: str or ~azure.servicefabric.models.UpgradeDomainState - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, state=None, **kwargs) -> None: - super(UpgradeDomainInfo, self).__init__(**kwargs) - self.name = name - self.state = state diff --git a/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation.py b/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation.py deleted file mode 100644 index dcdfe3d8..00000000 --- a/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation import HealthEvaluation - - -class UpgradeDomainNodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for cluster nodes in an upgrade domain, - containing health evaluations for each unhealthy node that impacted current - aggregated health state. Can be returned when evaluating cluster health - during cluster upgrade and the aggregated health state is either Error or - Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param upgrade_domain_name: Name of the upgrade domain where nodes health - is currently evaluated. - :type upgrade_domain_name: str - :param max_percent_unhealthy_nodes: Maximum allowed percentage of - unhealthy nodes from the ClusterHealthPolicy. - :type max_percent_unhealthy_nodes: int - :param total_count: Total number of nodes in the current upgrade domain. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - NodeHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, **kwargs): - super(UpgradeDomainNodesHealthEvaluation, self).__init__(**kwargs) - self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.kind = 'UpgradeDomainNodes' diff --git a/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation_py3.py b/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation_py3.py deleted file mode 100644 index 547ffab1..00000000 --- a/customSDK/servicefabric/models/upgrade_domain_nodes_health_evaluation_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .health_evaluation_py3 import HealthEvaluation - - -class UpgradeDomainNodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for cluster nodes in an upgrade domain, - containing health evaluations for each unhealthy node that impacted current - aggregated health state. Can be returned when evaluating cluster health - during cluster upgrade and the aggregated health state is either Error or - Warning. - - All required parameters must be populated in order to send to Azure. - - :param aggregated_health_state: The health state of a Service Fabric - entity such as Cluster, Node, Application, Service, Partition, Replica - etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', - 'Unknown' - :type aggregated_health_state: str or - ~azure.servicefabric.models.HealthState - :param description: Description of the health evaluation, which represents - a summary of the evaluation process. - :type description: str - :param kind: Required. Constant filled by server. - :type kind: str - :param upgrade_domain_name: Name of the upgrade domain where nodes health - is currently evaluated. - :type upgrade_domain_name: str - :param max_percent_unhealthy_nodes: Maximum allowed percentage of - unhealthy nodes from the ClusterHealthPolicy. - :type max_percent_unhealthy_nodes: int - :param total_count: Total number of nodes in the current upgrade domain. - :type total_count: long - :param unhealthy_evaluations: List of unhealthy evaluations that led to - the aggregated health state. Includes all the unhealthy - NodeHealthEvaluation that impacted the aggregated health. - :type unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__(self, *, aggregated_health_state=None, description: str=None, upgrade_domain_name: str=None, max_percent_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: - super(UpgradeDomainNodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.upgrade_domain_name = upgrade_domain_name - self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - self.kind = 'UpgradeDomainNodes' diff --git a/customSDK/servicefabric/models/upgrade_orchestration_service_state.py b/customSDK/servicefabric/models/upgrade_orchestration_service_state.py deleted file mode 100644 index 6118fc31..00000000 --- a/customSDK/servicefabric/models/upgrade_orchestration_service_state.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOrchestrationServiceState(Model): - """Service state of Service Fabric Upgrade Orchestration Service. - - :param service_state: The state of Service Fabric Upgrade Orchestration - Service. - :type service_state: str - """ - - _attribute_map = { - 'service_state': {'key': 'ServiceState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UpgradeOrchestrationServiceState, self).__init__(**kwargs) - self.service_state = kwargs.get('service_state', None) diff --git a/customSDK/servicefabric/models/upgrade_orchestration_service_state_py3.py b/customSDK/servicefabric/models/upgrade_orchestration_service_state_py3.py deleted file mode 100644 index 35477c1b..00000000 --- a/customSDK/servicefabric/models/upgrade_orchestration_service_state_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOrchestrationServiceState(Model): - """Service state of Service Fabric Upgrade Orchestration Service. - - :param service_state: The state of Service Fabric Upgrade Orchestration - Service. - :type service_state: str - """ - - _attribute_map = { - 'service_state': {'key': 'ServiceState', 'type': 'str'}, - } - - def __init__(self, *, service_state: str=None, **kwargs) -> None: - super(UpgradeOrchestrationServiceState, self).__init__(**kwargs) - self.service_state = service_state diff --git a/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary.py b/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary.py deleted file mode 100644 index 0f15dd5f..00000000 --- a/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOrchestrationServiceStateSummary(Model): - """Service state summary of Service Fabric Upgrade Orchestration Service. - - :param current_code_version: The current code version of the cluster. - :type current_code_version: str - :param current_manifest_version: The current manifest version of the - cluster. - :type current_manifest_version: str - :param target_code_version: The target code version of the cluster. - :type target_code_version: str - :param target_manifest_version: The target manifest version of the - cluster. - :type target_manifest_version: str - :param pending_upgrade_type: The type of the pending upgrade of the - cluster. - :type pending_upgrade_type: str - """ - - _attribute_map = { - 'current_code_version': {'key': 'CurrentCodeVersion', 'type': 'str'}, - 'current_manifest_version': {'key': 'CurrentManifestVersion', 'type': 'str'}, - 'target_code_version': {'key': 'TargetCodeVersion', 'type': 'str'}, - 'target_manifest_version': {'key': 'TargetManifestVersion', 'type': 'str'}, - 'pending_upgrade_type': {'key': 'PendingUpgradeType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UpgradeOrchestrationServiceStateSummary, self).__init__(**kwargs) - self.current_code_version = kwargs.get('current_code_version', None) - self.current_manifest_version = kwargs.get('current_manifest_version', None) - self.target_code_version = kwargs.get('target_code_version', None) - self.target_manifest_version = kwargs.get('target_manifest_version', None) - self.pending_upgrade_type = kwargs.get('pending_upgrade_type', None) diff --git a/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary_py3.py b/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary_py3.py deleted file mode 100644 index 1a90d312..00000000 --- a/customSDK/servicefabric/models/upgrade_orchestration_service_state_summary_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeOrchestrationServiceStateSummary(Model): - """Service state summary of Service Fabric Upgrade Orchestration Service. - - :param current_code_version: The current code version of the cluster. - :type current_code_version: str - :param current_manifest_version: The current manifest version of the - cluster. - :type current_manifest_version: str - :param target_code_version: The target code version of the cluster. - :type target_code_version: str - :param target_manifest_version: The target manifest version of the - cluster. - :type target_manifest_version: str - :param pending_upgrade_type: The type of the pending upgrade of the - cluster. - :type pending_upgrade_type: str - """ - - _attribute_map = { - 'current_code_version': {'key': 'CurrentCodeVersion', 'type': 'str'}, - 'current_manifest_version': {'key': 'CurrentManifestVersion', 'type': 'str'}, - 'target_code_version': {'key': 'TargetCodeVersion', 'type': 'str'}, - 'target_manifest_version': {'key': 'TargetManifestVersion', 'type': 'str'}, - 'pending_upgrade_type': {'key': 'PendingUpgradeType', 'type': 'str'}, - } - - def __init__(self, *, current_code_version: str=None, current_manifest_version: str=None, target_code_version: str=None, target_manifest_version: str=None, pending_upgrade_type: str=None, **kwargs) -> None: - super(UpgradeOrchestrationServiceStateSummary, self).__init__(**kwargs) - self.current_code_version = current_code_version - self.current_manifest_version = current_manifest_version - self.target_code_version = target_code_version - self.target_manifest_version = target_manifest_version - self.pending_upgrade_type = pending_upgrade_type diff --git a/customSDK/servicefabric/models/upgrade_unit_info.py b/customSDK/servicefabric/models/upgrade_unit_info.py deleted file mode 100644 index 6dff947f..00000000 --- a/customSDK/servicefabric/models/upgrade_unit_info.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeUnitInfo(Model): - """Information about an upgrade unit. - - :param name: The name of the upgrade unit - :type name: str - :param state: The state of the upgrade unit. Possible values include: - 'Invalid', 'Pending', 'InProgress', 'Completed', 'Failed' - :type state: str or ~azure.servicefabric.models.UpgradeUnitState - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UpgradeUnitInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.state = kwargs.get('state', None) diff --git a/customSDK/servicefabric/models/upgrade_unit_info_py3.py b/customSDK/servicefabric/models/upgrade_unit_info_py3.py deleted file mode 100644 index cefc68ab..00000000 --- a/customSDK/servicefabric/models/upgrade_unit_info_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UpgradeUnitInfo(Model): - """Information about an upgrade unit. - - :param name: The name of the upgrade unit - :type name: str - :param state: The state of the upgrade unit. Possible values include: - 'Invalid', 'Pending', 'InProgress', 'Completed', 'Failed' - :type state: str or ~azure.servicefabric.models.UpgradeUnitState - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, state=None, **kwargs) -> None: - super(UpgradeUnitInfo, self).__init__(**kwargs) - self.name = name - self.state = state diff --git a/customSDK/servicefabric/models/upload_chunk_range.py b/customSDK/servicefabric/models/upload_chunk_range.py deleted file mode 100644 index 494aa8de..00000000 --- a/customSDK/servicefabric/models/upload_chunk_range.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UploadChunkRange(Model): - """Information about which portion of the file to upload. - - :param start_position: The start position of the portion of the file. It's - represented by the number of bytes. - :type start_position: str - :param end_position: The end position of the portion of the file. It's - represented by the number of bytes. - :type end_position: str - """ - - _attribute_map = { - 'start_position': {'key': 'StartPosition', 'type': 'str'}, - 'end_position': {'key': 'EndPosition', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UploadChunkRange, self).__init__(**kwargs) - self.start_position = kwargs.get('start_position', None) - self.end_position = kwargs.get('end_position', None) diff --git a/customSDK/servicefabric/models/upload_chunk_range_py3.py b/customSDK/servicefabric/models/upload_chunk_range_py3.py deleted file mode 100644 index a67b3021..00000000 --- a/customSDK/servicefabric/models/upload_chunk_range_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UploadChunkRange(Model): - """Information about which portion of the file to upload. - - :param start_position: The start position of the portion of the file. It's - represented by the number of bytes. - :type start_position: str - :param end_position: The end position of the portion of the file. It's - represented by the number of bytes. - :type end_position: str - """ - - _attribute_map = { - 'start_position': {'key': 'StartPosition', 'type': 'str'}, - 'end_position': {'key': 'EndPosition', 'type': 'str'}, - } - - def __init__(self, *, start_position: str=None, end_position: str=None, **kwargs) -> None: - super(UploadChunkRange, self).__init__(**kwargs) - self.start_position = start_position - self.end_position = end_position diff --git a/customSDK/servicefabric/models/upload_session.py b/customSDK/servicefabric/models/upload_session.py deleted file mode 100644 index a9f2e1ef..00000000 --- a/customSDK/servicefabric/models/upload_session.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UploadSession(Model): - """Information about a image store upload session. - - :param upload_sessions: When querying upload session by upload session ID, - the result contains only one upload session. When querying upload session - by image store relative path, the result might contain multiple upload - sessions. - :type upload_sessions: list[~azure.servicefabric.models.UploadSessionInfo] - """ - - _attribute_map = { - 'upload_sessions': {'key': 'UploadSessions', 'type': '[UploadSessionInfo]'}, - } - - def __init__(self, **kwargs): - super(UploadSession, self).__init__(**kwargs) - self.upload_sessions = kwargs.get('upload_sessions', None) diff --git a/customSDK/servicefabric/models/upload_session_info.py b/customSDK/servicefabric/models/upload_session_info.py deleted file mode 100644 index eb71d201..00000000 --- a/customSDK/servicefabric/models/upload_session_info.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UploadSessionInfo(Model): - """Information about an image store upload session. A session is associated - with a relative path in the image store. - - :param store_relative_path: The remote location within image store. This - path is relative to the image store root. - :type store_relative_path: str - :param session_id: A unique ID of the upload session. A session ID can be - reused only if the session was committed or removed. - :type session_id: str - :param modified_date: The date and time when the upload session was last - modified. - :type modified_date: datetime - :param file_size: The size in bytes of the uploading file. - :type file_size: str - :param expected_ranges: List of chunk ranges that image store has not - received yet. - :type expected_ranges: list[~azure.servicefabric.models.UploadChunkRange] - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'session_id': {'key': 'SessionId', 'type': 'str'}, - 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, - 'file_size': {'key': 'FileSize', 'type': 'str'}, - 'expected_ranges': {'key': 'ExpectedRanges', 'type': '[UploadChunkRange]'}, - } - - def __init__(self, **kwargs): - super(UploadSessionInfo, self).__init__(**kwargs) - self.store_relative_path = kwargs.get('store_relative_path', None) - self.session_id = kwargs.get('session_id', None) - self.modified_date = kwargs.get('modified_date', None) - self.file_size = kwargs.get('file_size', None) - self.expected_ranges = kwargs.get('expected_ranges', None) diff --git a/customSDK/servicefabric/models/upload_session_info_py3.py b/customSDK/servicefabric/models/upload_session_info_py3.py deleted file mode 100644 index 342df6ef..00000000 --- a/customSDK/servicefabric/models/upload_session_info_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UploadSessionInfo(Model): - """Information about an image store upload session. A session is associated - with a relative path in the image store. - - :param store_relative_path: The remote location within image store. This - path is relative to the image store root. - :type store_relative_path: str - :param session_id: A unique ID of the upload session. A session ID can be - reused only if the session was committed or removed. - :type session_id: str - :param modified_date: The date and time when the upload session was last - modified. - :type modified_date: datetime - :param file_size: The size in bytes of the uploading file. - :type file_size: str - :param expected_ranges: List of chunk ranges that image store has not - received yet. - :type expected_ranges: list[~azure.servicefabric.models.UploadChunkRange] - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'session_id': {'key': 'SessionId', 'type': 'str'}, - 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, - 'file_size': {'key': 'FileSize', 'type': 'str'}, - 'expected_ranges': {'key': 'ExpectedRanges', 'type': '[UploadChunkRange]'}, - } - - def __init__(self, *, store_relative_path: str=None, session_id: str=None, modified_date=None, file_size: str=None, expected_ranges=None, **kwargs) -> None: - super(UploadSessionInfo, self).__init__(**kwargs) - self.store_relative_path = store_relative_path - self.session_id = session_id - self.modified_date = modified_date - self.file_size = file_size - self.expected_ranges = expected_ranges diff --git a/customSDK/servicefabric/models/upload_session_py3.py b/customSDK/servicefabric/models/upload_session_py3.py deleted file mode 100644 index 34394b80..00000000 --- a/customSDK/servicefabric/models/upload_session_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UploadSession(Model): - """Information about a image store upload session. - - :param upload_sessions: When querying upload session by upload session ID, - the result contains only one upload session. When querying upload session - by image store relative path, the result might contain multiple upload - sessions. - :type upload_sessions: list[~azure.servicefabric.models.UploadSessionInfo] - """ - - _attribute_map = { - 'upload_sessions': {'key': 'UploadSessions', 'type': '[UploadSessionInfo]'}, - } - - def __init__(self, *, upload_sessions=None, **kwargs) -> None: - super(UploadSession, self).__init__(**kwargs) - self.upload_sessions = upload_sessions diff --git a/customSDK/servicefabric/models/usage_info.py b/customSDK/servicefabric/models/usage_info.py deleted file mode 100644 index 28f9c847..00000000 --- a/customSDK/servicefabric/models/usage_info.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageInfo(Model): - """Information about how much space and how many files in the file system the - ImageStore is using in this category. - - :param used_space: the size of all files in this category - :type used_space: str - :param file_count: the number of all files in this category - :type file_count: str - """ - - _attribute_map = { - 'used_space': {'key': 'UsedSpace', 'type': 'str'}, - 'file_count': {'key': 'FileCount', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageInfo, self).__init__(**kwargs) - self.used_space = kwargs.get('used_space', None) - self.file_count = kwargs.get('file_count', None) diff --git a/customSDK/servicefabric/models/usage_info_py3.py b/customSDK/servicefabric/models/usage_info_py3.py deleted file mode 100644 index 2a28cbc9..00000000 --- a/customSDK/servicefabric/models/usage_info_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UsageInfo(Model): - """Information about how much space and how many files in the file system the - ImageStore is using in this category. - - :param used_space: the size of all files in this category - :type used_space: str - :param file_count: the number of all files in this category - :type file_count: str - """ - - _attribute_map = { - 'used_space': {'key': 'UsedSpace', 'type': 'str'}, - 'file_count': {'key': 'FileCount', 'type': 'str'}, - } - - def __init__(self, *, used_space: str=None, file_count: str=None, **kwargs) -> None: - super(UsageInfo, self).__init__(**kwargs) - self.used_space = used_space - self.file_count = file_count diff --git a/customSDK/servicefabric/models/validate_cluster_upgrade_result.py b/customSDK/servicefabric/models/validate_cluster_upgrade_result.py deleted file mode 100644 index ffde1d09..00000000 --- a/customSDK/servicefabric/models/validate_cluster_upgrade_result.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ValidateClusterUpgradeResult(Model): - """Specifies result of validating a cluster upgrade. - - :param service_host_upgrade_impact: The expected impact of the upgrade. - Possible values include: 'Invalid', 'None', 'ServiceHostRestart', - 'UnexpectedServiceHostRestart' - :type service_host_upgrade_impact: str or - ~azure.servicefabric.models.ServiceHostUpgradeImpact - :param validation_details: A string containing additional details for the - Fabric upgrade validation result. - :type validation_details: str - """ - - _attribute_map = { - 'service_host_upgrade_impact': {'key': 'ServiceHostUpgradeImpact', 'type': 'str'}, - 'validation_details': {'key': 'ValidationDetails', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ValidateClusterUpgradeResult, self).__init__(**kwargs) - self.service_host_upgrade_impact = kwargs.get('service_host_upgrade_impact', None) - self.validation_details = kwargs.get('validation_details', None) diff --git a/customSDK/servicefabric/models/validate_cluster_upgrade_result_py3.py b/customSDK/servicefabric/models/validate_cluster_upgrade_result_py3.py deleted file mode 100644 index 6fc5473c..00000000 --- a/customSDK/servicefabric/models/validate_cluster_upgrade_result_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ValidateClusterUpgradeResult(Model): - """Specifies result of validating a cluster upgrade. - - :param service_host_upgrade_impact: The expected impact of the upgrade. - Possible values include: 'Invalid', 'None', 'ServiceHostRestart', - 'UnexpectedServiceHostRestart' - :type service_host_upgrade_impact: str or - ~azure.servicefabric.models.ServiceHostUpgradeImpact - :param validation_details: A string containing additional details for the - Fabric upgrade validation result. - :type validation_details: str - """ - - _attribute_map = { - 'service_host_upgrade_impact': {'key': 'ServiceHostUpgradeImpact', 'type': 'str'}, - 'validation_details': {'key': 'ValidationDetails', 'type': 'str'}, - } - - def __init__(self, *, service_host_upgrade_impact=None, validation_details: str=None, **kwargs) -> None: - super(ValidateClusterUpgradeResult, self).__init__(**kwargs) - self.service_host_upgrade_impact = service_host_upgrade_impact - self.validation_details = validation_details diff --git a/customSDK/servicefabric/models/validation_failed_chaos_event.py b/customSDK/servicefabric/models/validation_failed_chaos_event.py deleted file mode 100644 index c3944394..00000000 --- a/customSDK/servicefabric/models/validation_failed_chaos_event.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .chaos_event import ChaosEvent - - -class ValidationFailedChaosEvent(ChaosEvent): - """Chaos event corresponding to a failure during validation. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Describes why the ValidationFailedChaosEvent was generated. - This may happen because more than MaxPercentUnhealthyNodes are unhealthy - for more than MaxClusterStabilizationTimeout. This reason will be in the - Reason property of the ValidationFailedChaosEvent as a string. - :type reason: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ValidationFailedChaosEvent, self).__init__(**kwargs) - self.reason = kwargs.get('reason', None) - self.kind = 'ValidationFailed' diff --git a/customSDK/servicefabric/models/validation_failed_chaos_event_py3.py b/customSDK/servicefabric/models/validation_failed_chaos_event_py3.py deleted file mode 100644 index 5d983a06..00000000 --- a/customSDK/servicefabric/models/validation_failed_chaos_event_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .chaos_event_py3 import ChaosEvent - - -class ValidationFailedChaosEvent(ChaosEvent): - """Chaos event corresponding to a failure during validation. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Describes why the ValidationFailedChaosEvent was generated. - This may happen because more than MaxPercentUnhealthyNodes are unhealthy - for more than MaxClusterStabilizationTimeout. This reason will be in the - Reason property of the ValidationFailedChaosEvent as a string. - :type reason: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: - super(ValidationFailedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.reason = reason - self.kind = 'ValidationFailed' diff --git a/customSDK/servicefabric/models/volume_provider_parameters_azure_file.py b/customSDK/servicefabric/models/volume_provider_parameters_azure_file.py deleted file mode 100644 index c10943e9..00000000 --- a/customSDK/servicefabric/models/volume_provider_parameters_azure_file.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VolumeProviderParametersAzureFile(Model): - """This type describes a volume provided by an Azure Files file share. - - All required parameters must be populated in order to send to Azure. - - :param account_name: Required. Name of the Azure storage account for the - File Share. - :type account_name: str - :param account_key: Access key of the Azure storage account for the File - Share. - :type account_key: str - :param share_name: Required. Name of the Azure Files file share that - provides storage for the volume. - :type share_name: str - """ - - _validation = { - 'account_name': {'required': True}, - 'share_name': {'required': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'account_key': {'key': 'accountKey', 'type': 'str'}, - 'share_name': {'key': 'shareName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VolumeProviderParametersAzureFile, self).__init__(**kwargs) - self.account_name = kwargs.get('account_name', None) - self.account_key = kwargs.get('account_key', None) - self.share_name = kwargs.get('share_name', None) diff --git a/customSDK/servicefabric/models/volume_provider_parameters_azure_file_py3.py b/customSDK/servicefabric/models/volume_provider_parameters_azure_file_py3.py deleted file mode 100644 index c8fea05b..00000000 --- a/customSDK/servicefabric/models/volume_provider_parameters_azure_file_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VolumeProviderParametersAzureFile(Model): - """This type describes a volume provided by an Azure Files file share. - - All required parameters must be populated in order to send to Azure. - - :param account_name: Required. Name of the Azure storage account for the - File Share. - :type account_name: str - :param account_key: Access key of the Azure storage account for the File - Share. - :type account_key: str - :param share_name: Required. Name of the Azure Files file share that - provides storage for the volume. - :type share_name: str - """ - - _validation = { - 'account_name': {'required': True}, - 'share_name': {'required': True}, - } - - _attribute_map = { - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'account_key': {'key': 'accountKey', 'type': 'str'}, - 'share_name': {'key': 'shareName', 'type': 'str'}, - } - - def __init__(self, *, account_name: str, share_name: str, account_key: str=None, **kwargs) -> None: - super(VolumeProviderParametersAzureFile, self).__init__(**kwargs) - self.account_name = account_name - self.account_key = account_key - self.share_name = share_name diff --git a/customSDK/servicefabric/models/volume_reference.py b/customSDK/servicefabric/models/volume_reference.py deleted file mode 100644 index 5896c0e8..00000000 --- a/customSDK/servicefabric/models/volume_reference.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VolumeReference(Model): - """Describes a reference to a volume resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the volume being referenced. - :type name: str - :param read_only: The flag indicating whether the volume is read only. - Default is 'false'. - :type read_only: bool - :param destination_path: Required. The path within the container at which - the volume should be mounted. Only valid path characters are allowed. - :type destination_path: str - """ - - _validation = { - 'name': {'required': True}, - 'destination_path': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'destination_path': {'key': 'destinationPath', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VolumeReference, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.read_only = kwargs.get('read_only', None) - self.destination_path = kwargs.get('destination_path', None) diff --git a/customSDK/servicefabric/models/volume_reference_py3.py b/customSDK/servicefabric/models/volume_reference_py3.py deleted file mode 100644 index 78adefae..00000000 --- a/customSDK/servicefabric/models/volume_reference_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VolumeReference(Model): - """Describes a reference to a volume resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the volume being referenced. - :type name: str - :param read_only: The flag indicating whether the volume is read only. - Default is 'false'. - :type read_only: bool - :param destination_path: Required. The path within the container at which - the volume should be mounted. Only valid path characters are allowed. - :type destination_path: str - """ - - _validation = { - 'name': {'required': True}, - 'destination_path': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'destination_path': {'key': 'destinationPath', 'type': 'str'}, - } - - def __init__(self, *, name: str, destination_path: str, read_only: bool=None, **kwargs) -> None: - super(VolumeReference, self).__init__(**kwargs) - self.name = name - self.read_only = read_only - self.destination_path = destination_path diff --git a/customSDK/servicefabric/models/volume_resource_description.py b/customSDK/servicefabric/models/volume_resource_description.py deleted file mode 100644 index 6d7b4180..00000000 --- a/customSDK/servicefabric/models/volume_resource_description.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VolumeResourceDescription(Model): - """This type describes a volume resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Volume resource. - :type name: str - :param description: User readable description of the volume. - :type description: str - :ivar status: Status of the volume. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the volume. - :vartype status_details: str - :ivar provider: Required. Provider of the volume. Default value: - "SFAzureFile" . - :vartype provider: str - :param azure_file_parameters: This type describes a volume provided by an - Azure Files file share. - :type azure_file_parameters: - ~azure.servicefabric.models.VolumeProviderParametersAzureFile - """ - - _validation = { - 'name': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'provider': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'provider': {'key': 'properties.provider', 'type': 'str'}, - 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, - } - - provider = "SFAzureFile" - - def __init__(self, **kwargs): - super(VolumeResourceDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) - self.status = None - self.status_details = None - self.azure_file_parameters = kwargs.get('azure_file_parameters', None) diff --git a/customSDK/servicefabric/models/volume_resource_description_py3.py b/customSDK/servicefabric/models/volume_resource_description_py3.py deleted file mode 100644 index bc275555..00000000 --- a/customSDK/servicefabric/models/volume_resource_description_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class VolumeResourceDescription(Model): - """This type describes a volume resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Name of the Volume resource. - :type name: str - :param description: User readable description of the volume. - :type description: str - :ivar status: Status of the volume. Possible values include: 'Unknown', - 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current - status of the volume. - :vartype status_details: str - :ivar provider: Required. Provider of the volume. Default value: - "SFAzureFile" . - :vartype provider: str - :param azure_file_parameters: This type describes a volume provided by an - Azure Files file share. - :type azure_file_parameters: - ~azure.servicefabric.models.VolumeProviderParametersAzureFile - """ - - _validation = { - 'name': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'provider': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'provider': {'key': 'properties.provider', 'type': 'str'}, - 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, - } - - provider = "SFAzureFile" - - def __init__(self, *, name: str, description: str=None, azure_file_parameters=None, **kwargs) -> None: - super(VolumeResourceDescription, self).__init__(**kwargs) - self.name = name - self.description = description - self.status = None - self.status_details = None - self.azure_file_parameters = azure_file_parameters diff --git a/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check.py b/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check.py deleted file mode 100644 index a9e3c654..00000000 --- a/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_safety_check import PartitionSafetyCheck - - -class WaitForInbuildReplicaSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the replica build operation to finish. This - indicates that there is a replica that is going through the copy or is - providing data for building another replica. Bring the node down will abort - this copy operation which are typically expensive involving data movements. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WaitForInbuildReplicaSafetyCheck, self).__init__(**kwargs) - self.kind = 'WaitForInbuildReplica' diff --git a/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check_py3.py b/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check_py3.py deleted file mode 100644 index 2880f6b1..00000000 --- a/customSDK/servicefabric/models/wait_for_inbuild_replica_safety_check_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_safety_check_py3 import PartitionSafetyCheck - - -class WaitForInbuildReplicaSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the replica build operation to finish. This - indicates that there is a replica that is going through the copy or is - providing data for building another replica. Bring the node down will abort - this copy operation which are typically expensive involving data movements. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, partition_id: str=None, **kwargs) -> None: - super(WaitForInbuildReplicaSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'WaitForInbuildReplica' diff --git a/customSDK/servicefabric/models/wait_for_primary_placement_safety_check.py b/customSDK/servicefabric/models/wait_for_primary_placement_safety_check.py deleted file mode 100644 index 22974a04..00000000 --- a/customSDK/servicefabric/models/wait_for_primary_placement_safety_check.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_safety_check import PartitionSafetyCheck - - -class WaitForPrimaryPlacementSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the primary replica that was moved out of the - node due to upgrade to be placed back again on that node. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WaitForPrimaryPlacementSafetyCheck, self).__init__(**kwargs) - self.kind = 'WaitForPrimaryPlacement' diff --git a/customSDK/servicefabric/models/wait_for_primary_placement_safety_check_py3.py b/customSDK/servicefabric/models/wait_for_primary_placement_safety_check_py3.py deleted file mode 100644 index ff14b6a9..00000000 --- a/customSDK/servicefabric/models/wait_for_primary_placement_safety_check_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_safety_check_py3 import PartitionSafetyCheck - - -class WaitForPrimaryPlacementSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the primary replica that was moved out of the - node due to upgrade to be placed back again on that node. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, partition_id: str=None, **kwargs) -> None: - super(WaitForPrimaryPlacementSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'WaitForPrimaryPlacement' diff --git a/customSDK/servicefabric/models/wait_for_primary_swap_safety_check.py b/customSDK/servicefabric/models/wait_for_primary_swap_safety_check.py deleted file mode 100644 index 9619071b..00000000 --- a/customSDK/servicefabric/models/wait_for_primary_swap_safety_check.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_safety_check import PartitionSafetyCheck - - -class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the primary replica to be moved out of the node - before starting an upgrade to ensure the availability of the primary - replica for the partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WaitForPrimarySwapSafetyCheck, self).__init__(**kwargs) - self.kind = 'WaitForPrimarySwap' diff --git a/customSDK/servicefabric/models/wait_for_primary_swap_safety_check_py3.py b/customSDK/servicefabric/models/wait_for_primary_swap_safety_check_py3.py deleted file mode 100644 index bc895a25..00000000 --- a/customSDK/servicefabric/models/wait_for_primary_swap_safety_check_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_safety_check_py3 import PartitionSafetyCheck - - -class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the primary replica to be moved out of the node - before starting an upgrade to ensure the availability of the primary - replica for the partition. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, partition_id: str=None, **kwargs) -> None: - super(WaitForPrimarySwapSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'WaitForPrimarySwap' diff --git a/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check.py b/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check.py deleted file mode 100644 index 78a6d6db..00000000 --- a/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_safety_check import PartitionSafetyCheck - - -class WaitForReconfigurationSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the current reconfiguration of the partition to - be completed before starting an upgrade. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WaitForReconfigurationSafetyCheck, self).__init__(**kwargs) - self.kind = 'WaitForReconfiguration' diff --git a/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check_py3.py b/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check_py3.py deleted file mode 100644 index e3900dfe..00000000 --- a/customSDK/servicefabric/models/wait_for_reconfiguration_safety_check_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .partition_safety_check_py3 import PartitionSafetyCheck - - -class WaitForReconfigurationSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the current reconfiguration of the partition to - be completed before starting an upgrade. - - All required parameters must be populated in order to send to Azure. - - :param kind: Required. Constant filled by server. - :type kind: str - :param partition_id: Id of the partition which is undergoing the safety - check. - :type partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__(self, *, partition_id: str=None, **kwargs) -> None: - super(WaitForReconfigurationSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'WaitForReconfiguration' diff --git a/customSDK/servicefabric/models/waiting_chaos_event.py b/customSDK/servicefabric/models/waiting_chaos_event.py deleted file mode 100644 index 75ddfc54..00000000 --- a/customSDK/servicefabric/models/waiting_chaos_event.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .chaos_event import ChaosEvent - - -class WaitingChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos is waiting for the - cluster to become ready for faulting, for example, Chaos may be waiting for - the on-going upgrade to finish. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Describes why the WaitingChaosEvent was generated, for - example, due to a cluster upgrade. - :type reason: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WaitingChaosEvent, self).__init__(**kwargs) - self.reason = kwargs.get('reason', None) - self.kind = 'Waiting' diff --git a/customSDK/servicefabric/models/waiting_chaos_event_py3.py b/customSDK/servicefabric/models/waiting_chaos_event_py3.py deleted file mode 100644 index b36fdf69..00000000 --- a/customSDK/servicefabric/models/waiting_chaos_event_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .chaos_event_py3 import ChaosEvent - - -class WaitingChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos is waiting for the - cluster to become ready for faulting, for example, Chaos may be waiting for - the on-going upgrade to finish. - - All required parameters must be populated in order to send to Azure. - - :param time_stamp_utc: Required. The UTC timestamp when this Chaos event - was generated. - :type time_stamp_utc: datetime - :param kind: Required. Constant filled by server. - :type kind: str - :param reason: Describes why the WaitingChaosEvent was generated, for - example, due to a cluster upgrade. - :type reason: str - """ - - _validation = { - 'time_stamp_utc': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'kind': {'key': 'Kind', 'type': 'str'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__(self, *, time_stamp_utc, reason: str=None, **kwargs) -> None: - super(WaitingChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.reason = reason - self.kind = 'Waiting' diff --git a/customSDK/servicefabric/operations/_mesh_application_operations.py b/customSDK/servicefabric/operations/_mesh_application_operations.py index db2b4e3f..9eb04f3f 100644 --- a/customSDK/servicefabric/operations/_mesh_application_operations.py +++ b/customSDK/servicefabric/operations/_mesh_application_operations.py @@ -35,7 +35,7 @@ def build_create_or_update_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -71,7 +71,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -104,7 +104,7 @@ def build_delete_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -136,7 +136,7 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -164,7 +164,7 @@ def build_get_upgrade_progress_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -242,7 +242,7 @@ def create_or_update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(application_resource_description, 'ApplicationResourceDescription') @@ -309,7 +309,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_request( @@ -366,7 +366,7 @@ def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_request( @@ -417,7 +417,7 @@ def list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_list_request( @@ -475,7 +475,7 @@ def get_upgrade_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_upgrade_progress_request( diff --git a/customSDK/servicefabric/operations/_mesh_code_package_operations.py b/customSDK/servicefabric/operations/_mesh_code_package_operations.py index 19039c37..4b627c26 100644 --- a/customSDK/servicefabric/operations/_mesh_code_package_operations.py +++ b/customSDK/servicefabric/operations/_mesh_code_package_operations.py @@ -38,7 +38,7 @@ def build_get_container_logs_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str tail = kwargs.pop('tail', None) # type: Optional[str] accept = "application/json" @@ -129,7 +129,7 @@ def get_container_logs( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_container_logs_request( diff --git a/customSDK/servicefabric/operations/_mesh_gateway_operations.py b/customSDK/servicefabric/operations/_mesh_gateway_operations.py index 59acbe31..c94b2b81 100644 --- a/customSDK/servicefabric/operations/_mesh_gateway_operations.py +++ b/customSDK/servicefabric/operations/_mesh_gateway_operations.py @@ -35,7 +35,7 @@ def build_create_or_update_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -71,7 +71,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -104,7 +104,7 @@ def build_delete_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -136,7 +136,7 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -208,7 +208,7 @@ def create_or_update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(gateway_resource_description, 'GatewayResourceDescription') @@ -275,7 +275,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_request( @@ -332,7 +332,7 @@ def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_request( @@ -383,7 +383,7 @@ def list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_list_request( diff --git a/customSDK/servicefabric/operations/_mesh_network_operations.py b/customSDK/servicefabric/operations/_mesh_network_operations.py index 4b140d1d..37d122f2 100644 --- a/customSDK/servicefabric/operations/_mesh_network_operations.py +++ b/customSDK/servicefabric/operations/_mesh_network_operations.py @@ -35,7 +35,7 @@ def build_create_or_update_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -71,7 +71,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -104,7 +104,7 @@ def build_delete_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -136,7 +136,7 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -211,7 +211,7 @@ def create_or_update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _network_resource_description = _models.NetworkResourceDescription(name=name, properties=properties) @@ -279,7 +279,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_request( @@ -336,7 +336,7 @@ def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_request( @@ -387,7 +387,7 @@ def list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_list_request( diff --git a/customSDK/servicefabric/operations/_mesh_secret_operations.py b/customSDK/servicefabric/operations/_mesh_secret_operations.py index dcdff98c..a6bc6d92 100644 --- a/customSDK/servicefabric/operations/_mesh_secret_operations.py +++ b/customSDK/servicefabric/operations/_mesh_secret_operations.py @@ -35,7 +35,7 @@ def build_create_or_update_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -71,7 +71,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -104,7 +104,7 @@ def build_delete_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -136,7 +136,7 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -211,7 +211,7 @@ def create_or_update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _secret_resource_description = _models.SecretResourceDescription(properties=properties, name=name) @@ -279,7 +279,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_request( @@ -336,7 +336,7 @@ def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_request( @@ -387,7 +387,7 @@ def list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_list_request( diff --git a/customSDK/servicefabric/operations/_mesh_secret_value_operations.py b/customSDK/servicefabric/operations/_mesh_secret_value_operations.py index 9c033a4d..d8a7ee77 100644 --- a/customSDK/servicefabric/operations/_mesh_secret_value_operations.py +++ b/customSDK/servicefabric/operations/_mesh_secret_value_operations.py @@ -36,7 +36,7 @@ def build_add_value_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -74,7 +74,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -109,7 +109,7 @@ def build_delete_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -143,7 +143,7 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -177,7 +177,7 @@ def build_show_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -261,7 +261,7 @@ def add_value( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _secret_value_resource_description = _models.SecretValueResourceDescription(name=name, value=value) @@ -334,7 +334,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_request( @@ -397,7 +397,7 @@ def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_request( @@ -452,7 +452,7 @@ def list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_list_request( @@ -514,7 +514,7 @@ def show( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_show_request( diff --git a/customSDK/servicefabric/operations/_mesh_service_operations.py b/customSDK/servicefabric/operations/_mesh_service_operations.py index ab991c0c..6beff73e 100644 --- a/customSDK/servicefabric/operations/_mesh_service_operations.py +++ b/customSDK/servicefabric/operations/_mesh_service_operations.py @@ -36,7 +36,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -70,7 +70,7 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -146,7 +146,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_request( @@ -205,7 +205,7 @@ def list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_list_request( diff --git a/customSDK/servicefabric/operations/_mesh_service_replica_operations.py b/customSDK/servicefabric/operations/_mesh_service_replica_operations.py index ac8d85ee..81c733f7 100644 --- a/customSDK/servicefabric/operations/_mesh_service_replica_operations.py +++ b/customSDK/servicefabric/operations/_mesh_service_replica_operations.py @@ -37,7 +37,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -73,7 +73,7 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -153,7 +153,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_request( @@ -216,7 +216,7 @@ def list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_list_request( diff --git a/customSDK/servicefabric/operations/_mesh_volume_operations.py b/customSDK/servicefabric/operations/_mesh_volume_operations.py index 2a52d1ba..fd975662 100644 --- a/customSDK/servicefabric/operations/_mesh_volume_operations.py +++ b/customSDK/servicefabric/operations/_mesh_volume_operations.py @@ -35,7 +35,7 @@ def build_create_or_update_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -71,7 +71,7 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -104,7 +104,7 @@ def build_delete_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -136,7 +136,7 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str accept = "application/json" # Construct URL @@ -208,7 +208,7 @@ def create_or_update( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(volume_resource_description, 'VolumeResourceDescription') @@ -275,7 +275,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_request( @@ -332,7 +332,7 @@ def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_request( @@ -383,7 +383,7 @@ def list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_list_request( diff --git a/customSDK/servicefabric/operations/_service_fabric_client_apis_operations.py b/customSDK/servicefabric/operations/_service_fabric_client_apis_operations.py index 16a6bd05..0b468984 100644 --- a/customSDK/servicefabric/operations/_service_fabric_client_apis_operations.py +++ b/customSDK/servicefabric/operations/_service_fabric_client_apis_operations.py @@ -35,7 +35,7 @@ def build_get_cluster_manifest_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -65,7 +65,7 @@ def build_get_cluster_health_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str nodes_health_state_filter = kwargs.pop('nodes_health_state_filter', 0) # type: Optional[int] applications_health_state_filter = kwargs.pop('applications_health_state_filter', 0) # type: Optional[int] events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] @@ -110,7 +110,7 @@ def build_get_cluster_health_using_policy_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] nodes_health_state_filter = kwargs.pop('nodes_health_state_filter', 0) # type: Optional[int] applications_health_state_filter = kwargs.pop('applications_health_state_filter', 0) # type: Optional[int] @@ -158,7 +158,7 @@ def build_get_cluster_health_chunk_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -188,7 +188,7 @@ def build_get_cluster_health_chunk_using_policy_and_advanced_filters_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -221,7 +221,7 @@ def build_report_cluster_health_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] immediate = kwargs.pop('immediate', False) # type: Optional[bool] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -257,7 +257,7 @@ def build_get_provisioned_fabric_code_version_info_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str code_version = kwargs.pop('code_version', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -290,7 +290,7 @@ def build_get_provisioned_fabric_config_version_info_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str config_version = kwargs.pop('config_version', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -323,7 +323,7 @@ def build_get_cluster_upgrade_progress_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -353,7 +353,7 @@ def build_get_cluster_configuration_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str configuration_api_version = kwargs.pop('configuration_api_version') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -385,7 +385,7 @@ def build_get_cluster_configuration_upgrade_status_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -415,7 +415,7 @@ def build_get_upgrade_orchestration_service_state_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -445,7 +445,7 @@ def build_set_upgrade_orchestration_service_state_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -478,7 +478,7 @@ def build_provision_cluster_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -511,7 +511,7 @@ def build_unprovision_cluster_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -544,7 +544,7 @@ def build_rollback_cluster_upgrade_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -574,7 +574,7 @@ def build_resume_cluster_upgrade_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -607,7 +607,7 @@ def build_start_cluster_upgrade_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -640,7 +640,7 @@ def build_start_cluster_configuration_upgrade_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -673,7 +673,7 @@ def build_update_cluster_upgrade_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -706,7 +706,7 @@ def build_get_aad_metadata_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "6.0") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -736,7 +736,7 @@ def build_get_cluster_version_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -766,7 +766,7 @@ def build_get_cluster_load_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -796,7 +796,7 @@ def build_toggle_verbose_service_placement_health_reporting_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str enabled = kwargs.pop('enabled') # type: bool timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -828,7 +828,7 @@ def build_validate_cluster_upgrade_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -861,7 +861,7 @@ def build_get_node_info_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] node_status_filter = kwargs.pop('node_status_filter', "default") # type: Optional[Union[str, "_models.NodeStatusFilter"]] max_results = kwargs.pop('max_results', 0) # type: Optional[int] @@ -901,7 +901,7 @@ def build_get_node_info_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -937,7 +937,7 @@ def build_get_node_health_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -976,7 +976,7 @@ def build_get_node_health_using_policy_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -1018,7 +1018,7 @@ def build_report_node_health_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] immediate = kwargs.pop('immediate', False) # type: Optional[bool] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -1060,7 +1060,7 @@ def build_get_node_load_info_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -1096,7 +1096,7 @@ def build_disable_node_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -1135,7 +1135,7 @@ def build_enable_node_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -1171,7 +1171,7 @@ def build_remove_node_state_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -1207,7 +1207,7 @@ def build_restart_node_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -1246,7 +1246,7 @@ def build_remove_configuration_overrides_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -1282,7 +1282,7 @@ def build_get_configuration_overrides_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -1318,7 +1318,7 @@ def build_add_configuration_parameter_overrides_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] force = kwargs.pop('force', None) # type: Optional[bool] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -1360,7 +1360,7 @@ def build_remove_node_tags_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -1396,7 +1396,7 @@ def build_add_node_tags_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -1431,7 +1431,7 @@ def build_get_application_type_info_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str application_type_definition_kind_filter = kwargs.pop('application_type_definition_kind_filter', 0) # type: Optional[int] exclude_application_parameters = kwargs.pop('exclude_application_parameters', False) # type: Optional[bool] continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] @@ -1474,7 +1474,7 @@ def build_get_application_type_info_list_by_name_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str application_type_version = kwargs.pop('application_type_version', None) # type: Optional[str] exclude_application_parameters = kwargs.pop('exclude_application_parameters', False) # type: Optional[bool] continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] @@ -1521,7 +1521,7 @@ def build_provision_application_type_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -1555,7 +1555,7 @@ def build_unprovision_application_type_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -1594,7 +1594,7 @@ def build_update_application_type_arm_metadata_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] application_type_version = kwargs.pop('application_type_version') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -1638,7 +1638,7 @@ def build_get_service_type_info_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str application_type_version = kwargs.pop('application_type_version') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -1677,7 +1677,7 @@ def build_get_service_type_info_by_name_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str application_type_version = kwargs.pop('application_type_version') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -1716,7 +1716,7 @@ def build_get_service_manifest_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str application_type_version = kwargs.pop('application_type_version') # type: str service_manifest_name = kwargs.pop('service_manifest_name') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -1757,7 +1757,7 @@ def build_get_deployed_service_type_info_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str service_manifest_name = kwargs.pop('service_manifest_name', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -1799,7 +1799,7 @@ def build_get_deployed_service_type_info_by_name_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str service_manifest_name = kwargs.pop('service_manifest_name', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -1839,7 +1839,7 @@ def build_create_application_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -1873,7 +1873,7 @@ def build_delete_application_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str force_remove = kwargs.pop('force_remove', None) # type: Optional[bool] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -1912,7 +1912,7 @@ def build_get_application_load_info_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -1947,7 +1947,7 @@ def build_get_application_info_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str application_definition_kind_filter = kwargs.pop('application_definition_kind_filter', 0) # type: Optional[int] application_type_name = kwargs.pop('application_type_name', None) # type: Optional[str] exclude_application_parameters = kwargs.pop('exclude_application_parameters', False) # type: Optional[bool] @@ -1993,7 +1993,7 @@ def build_get_application_info_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str exclude_application_parameters = kwargs.pop('exclude_application_parameters', False) # type: Optional[bool] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -2032,7 +2032,7 @@ def build_get_application_health_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] deployed_applications_health_state_filter = kwargs.pop('deployed_applications_health_state_filter', 0) # type: Optional[int] services_health_state_filter = kwargs.pop('services_health_state_filter', 0) # type: Optional[int] @@ -2080,7 +2080,7 @@ def build_get_application_health_using_policy_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] deployed_applications_health_state_filter = kwargs.pop('deployed_applications_health_state_filter', 0) # type: Optional[int] @@ -2131,7 +2131,7 @@ def build_report_application_health_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] immediate = kwargs.pop('immediate', False) # type: Optional[bool] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -2173,7 +2173,7 @@ def build_start_application_upgrade_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -2212,7 +2212,7 @@ def build_get_application_upgrade_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -2248,7 +2248,7 @@ def build_update_application_upgrade_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -2287,7 +2287,7 @@ def build_update_application_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -2326,7 +2326,7 @@ def build_resume_application_upgrade_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -2365,7 +2365,7 @@ def build_rollback_application_upgrade_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -2401,7 +2401,7 @@ def build_get_deployed_application_info_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] include_health_state = kwargs.pop('include_health_state', False) # type: Optional[bool] continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] @@ -2447,7 +2447,7 @@ def build_get_deployed_application_info_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] include_health_state = kwargs.pop('include_health_state', False) # type: Optional[bool] @@ -2488,7 +2488,7 @@ def build_get_deployed_application_health_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] deployed_service_packages_health_state_filter = kwargs.pop('deployed_service_packages_health_state_filter', 0) # type: Optional[int] exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] @@ -2535,7 +2535,7 @@ def build_get_deployed_application_health_using_policy_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] deployed_service_packages_health_state_filter = kwargs.pop('deployed_service_packages_health_state_filter', 0) # type: Optional[int] @@ -2585,7 +2585,7 @@ def build_report_deployed_application_health_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] immediate = kwargs.pop('immediate', False) # type: Optional[bool] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -2628,7 +2628,7 @@ def build_get_application_manifest_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str application_type_version = kwargs.pop('application_type_version') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -2666,7 +2666,7 @@ def build_update_application_arm_metadata_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] force = kwargs.pop('force', None) # type: Optional[bool] @@ -2708,7 +2708,7 @@ def build_get_service_info_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str service_type_name = kwargs.pop('service_type_name', None) # type: Optional[str] continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -2751,7 +2751,7 @@ def build_get_service_info_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -2788,7 +2788,7 @@ def build_get_application_name_info_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -2824,7 +2824,7 @@ def build_create_service_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -2863,7 +2863,7 @@ def build_create_service_from_template_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -2902,7 +2902,7 @@ def build_delete_service_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str force_remove = kwargs.pop('force_remove', None) # type: Optional[bool] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -2941,7 +2941,7 @@ def build_update_service_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -2980,7 +2980,7 @@ def build_get_service_description_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -3016,7 +3016,7 @@ def build_get_service_health_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] partitions_health_state_filter = kwargs.pop('partitions_health_state_filter', 0) # type: Optional[int] exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] @@ -3061,7 +3061,7 @@ def build_get_service_health_using_policy_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] partitions_health_state_filter = kwargs.pop('partitions_health_state_filter', 0) # type: Optional[int] @@ -3109,7 +3109,7 @@ def build_report_service_health_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] immediate = kwargs.pop('immediate', False) # type: Optional[bool] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -3151,7 +3151,7 @@ def build_resolve_service_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str partition_key_type = kwargs.pop('partition_key_type', None) # type: Optional[int] partition_key_value = kwargs.pop('partition_key_value', None) # type: Optional[str] previous_rsp_version = kwargs.pop('previous_rsp_version', None) # type: Optional[str] @@ -3196,7 +3196,7 @@ def build_get_unplaced_replica_information_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str partition_id = kwargs.pop('partition_id', None) # type: Optional[str] only_query_primaries = kwargs.pop('only_query_primaries', False) # type: Optional[bool] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -3237,7 +3237,7 @@ def build_get_loaded_partition_info_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str metric_name = kwargs.pop('metric_name') # type: str service_name = kwargs.pop('service_name', None) # type: Optional[str] ordering = kwargs.pop('ordering', None) # type: Optional[Union[str, "_models.Ordering"]] @@ -3279,7 +3279,7 @@ def build_get_partition_info_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -3318,7 +3318,7 @@ def build_get_partition_info_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -3354,7 +3354,7 @@ def build_get_service_name_info_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -3390,7 +3390,7 @@ def build_get_partition_health_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] replicas_health_state_filter = kwargs.pop('replicas_health_state_filter', 0) # type: Optional[int] exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] @@ -3435,7 +3435,7 @@ def build_get_partition_health_using_policy_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] replicas_health_state_filter = kwargs.pop('replicas_health_state_filter', 0) # type: Optional[int] @@ -3483,7 +3483,7 @@ def build_report_partition_health_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] immediate = kwargs.pop('immediate', False) # type: Optional[bool] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -3525,7 +3525,7 @@ def build_get_partition_load_information_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -3561,7 +3561,7 @@ def build_reset_partition_load_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -3597,7 +3597,7 @@ def build_recover_partition_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -3633,7 +3633,7 @@ def build_recover_service_partitions_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -3668,7 +3668,7 @@ def build_recover_system_partitions_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -3698,7 +3698,7 @@ def build_recover_all_partitions_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -3729,7 +3729,7 @@ def build_move_primary_replica_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str node_name = kwargs.pop('node_name', None) # type: Optional[str] ignore_constraints = kwargs.pop('ignore_constraints', False) # type: Optional[bool] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -3771,7 +3771,7 @@ def build_move_secondary_replica_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str current_node_name = kwargs.pop('current_node_name') # type: str new_node_name = kwargs.pop('new_node_name', None) # type: Optional[str] ignore_constraints = kwargs.pop('ignore_constraints', False) # type: Optional[bool] @@ -3814,7 +3814,7 @@ def build_update_partition_load_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] max_results = kwargs.pop('max_results', 0) # type: Optional[int] @@ -3855,7 +3855,7 @@ def build_move_instance_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str current_node_name = kwargs.pop('current_node_name', None) # type: Optional[str] new_node_name = kwargs.pop('new_node_name', None) # type: Optional[str] ignore_constraints = kwargs.pop('ignore_constraints', False) # type: Optional[bool] @@ -3902,7 +3902,7 @@ def build_move_auxiliary_replica_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str current_node_name = kwargs.pop('current_node_name', None) # type: Optional[str] new_node_name = kwargs.pop('new_node_name', None) # type: Optional[str] ignore_constraints = kwargs.pop('ignore_constraints', False) # type: Optional[bool] @@ -3947,7 +3947,7 @@ def build_create_repair_task_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -3977,7 +3977,7 @@ def build_cancel_repair_task_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -4007,7 +4007,7 @@ def build_delete_repair_task_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -4037,7 +4037,7 @@ def build_get_repair_task_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str task_id_filter = kwargs.pop('task_id_filter', None) # type: Optional[str] state_filter = kwargs.pop('state_filter', None) # type: Optional[int] executor_filter = kwargs.pop('executor_filter', None) # type: Optional[str] @@ -4073,7 +4073,7 @@ def build_force_approve_repair_task_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -4103,7 +4103,7 @@ def build_update_repair_task_health_policy_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -4133,7 +4133,7 @@ def build_update_repair_execution_state_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" @@ -4164,7 +4164,7 @@ def build_get_replica_info_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -4204,7 +4204,7 @@ def build_get_replica_info_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -4242,7 +4242,7 @@ def build_get_replica_health_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -4283,7 +4283,7 @@ def build_get_replica_health_using_policy_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -4327,7 +4327,7 @@ def build_report_replica_health_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] service_kind = kwargs.pop('service_kind', "Stateful") # type: Union[str, "_models.ReplicaHealthReportServiceKind"] immediate = kwargs.pop('immediate', False) # type: Optional[bool] @@ -4373,7 +4373,7 @@ def build_get_deployed_service_replica_info_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str partition_id = kwargs.pop('partition_id', None) # type: Optional[str] service_manifest_name = kwargs.pop('service_manifest_name', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -4418,7 +4418,7 @@ def build_get_deployed_service_replica_detail_info_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -4457,7 +4457,7 @@ def build_get_deployed_service_replica_detail_info_by_partition_id_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -4496,7 +4496,7 @@ def build_restart_replica_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -4536,7 +4536,7 @@ def build_remove_replica_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str force_remove = kwargs.pop('force_remove', None) # type: Optional[bool] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -4578,7 +4578,7 @@ def build_get_deployed_service_package_info_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -4617,7 +4617,7 @@ def build_get_deployed_service_package_info_list_by_name_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -4657,7 +4657,7 @@ def build_get_deployed_service_package_health_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -4700,7 +4700,7 @@ def build_get_deployed_service_package_health_using_policy_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -4746,7 +4746,7 @@ def build_report_deployed_service_package_health_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] immediate = kwargs.pop('immediate', False) # type: Optional[bool] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -4790,7 +4790,7 @@ def build_deploy_service_package_to_node_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -4830,7 +4830,7 @@ def build_get_deployed_code_package_info_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str service_manifest_name = kwargs.pop('service_manifest_name', None) # type: Optional[str] code_package_name = kwargs.pop('code_package_name', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -4874,7 +4874,7 @@ def build_restart_deployed_code_package_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -4915,7 +4915,7 @@ def build_get_container_logs_deployed_on_node_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str service_manifest_name = kwargs.pop('service_manifest_name') # type: str code_package_name = kwargs.pop('code_package_name') # type: str tail = kwargs.pop('tail', None) # type: Optional[str] @@ -4963,7 +4963,7 @@ def build_invoke_container_api_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] service_manifest_name = kwargs.pop('service_manifest_name') # type: str code_package_name = kwargs.pop('code_package_name') # type: str @@ -5008,7 +5008,7 @@ def build_create_compose_deployment_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -5042,7 +5042,7 @@ def build_get_compose_deployment_status_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -5077,7 +5077,7 @@ def build_get_compose_deployment_status_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] max_results = kwargs.pop('max_results', 0) # type: Optional[int] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -5114,7 +5114,7 @@ def build_get_compose_deployment_upgrade_progress_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -5150,7 +5150,7 @@ def build_remove_compose_deployment_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -5186,7 +5186,7 @@ def build_start_compose_deployment_upgrade_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -5225,7 +5225,7 @@ def build_start_rollback_compose_deployment_upgrade_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -5260,7 +5260,7 @@ def build_get_chaos_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -5290,7 +5290,7 @@ def build_start_chaos_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -5323,7 +5323,7 @@ def build_stop_chaos_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -5353,7 +5353,7 @@ def build_get_chaos_events_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] start_time_utc = kwargs.pop('start_time_utc', None) # type: Optional[str] end_time_utc = kwargs.pop('end_time_utc', None) # type: Optional[str] @@ -5395,7 +5395,7 @@ def build_get_chaos_schedule_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -5425,7 +5425,7 @@ def build_post_chaos_schedule_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -5459,7 +5459,7 @@ def build_upload_file_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -5495,7 +5495,7 @@ def build_get_image_store_content_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -5531,7 +5531,7 @@ def build_delete_image_store_content_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -5566,7 +5566,7 @@ def build_get_image_store_root_content_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -5596,7 +5596,7 @@ def build_copy_image_store_content_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -5629,7 +5629,7 @@ def build_delete_image_store_upload_session_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str session_id = kwargs.pop('session_id') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -5661,7 +5661,7 @@ def build_commit_image_store_upload_session_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str session_id = kwargs.pop('session_id') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -5693,7 +5693,7 @@ def build_get_image_store_upload_session_by_id_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str session_id = kwargs.pop('session_id') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -5726,7 +5726,7 @@ def build_get_image_store_upload_session_by_path_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -5762,7 +5762,7 @@ def build_upload_file_chunk_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str session_id = kwargs.pop('session_id') # type: str content_range = kwargs.pop('content_range') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -5801,7 +5801,7 @@ def build_get_image_store_root_folder_size_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -5832,7 +5832,7 @@ def build_get_image_store_folder_size_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -5867,7 +5867,7 @@ def build_get_image_store_info_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -5897,7 +5897,7 @@ def build_invoke_infrastructure_command_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str command = kwargs.pop('command') # type: str service_id = kwargs.pop('service_id', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -5932,7 +5932,7 @@ def build_invoke_infrastructure_query_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str command = kwargs.pop('command') # type: str service_id = kwargs.pop('service_id', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -5969,7 +5969,7 @@ def build_start_data_loss_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str operation_id = kwargs.pop('operation_id') # type: str data_loss_mode = kwargs.pop('data_loss_mode') # type: Union[str, "_models.DataLossMode"] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -6011,7 +6011,7 @@ def build_get_data_loss_progress_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str operation_id = kwargs.pop('operation_id') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -6051,7 +6051,7 @@ def build_start_quorum_loss_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str operation_id = kwargs.pop('operation_id') # type: str quorum_loss_mode = kwargs.pop('quorum_loss_mode') # type: Union[str, "_models.QuorumLossMode"] quorum_loss_duration = kwargs.pop('quorum_loss_duration') # type: int @@ -6095,7 +6095,7 @@ def build_get_quorum_loss_progress_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str operation_id = kwargs.pop('operation_id') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -6135,7 +6135,7 @@ def build_start_partition_restart_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str operation_id = kwargs.pop('operation_id') # type: str restart_partition_mode = kwargs.pop('restart_partition_mode') # type: Union[str, "_models.RestartPartitionMode"] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -6177,7 +6177,7 @@ def build_get_partition_restart_progress_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str operation_id = kwargs.pop('operation_id') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -6216,7 +6216,7 @@ def build_start_node_transition_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str operation_id = kwargs.pop('operation_id') # type: str node_transition_type = kwargs.pop('node_transition_type') # type: Union[str, "_models.NodeTransitionType"] node_instance_id = kwargs.pop('node_instance_id') # type: str @@ -6260,7 +6260,7 @@ def build_get_node_transition_progress_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str operation_id = kwargs.pop('operation_id') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -6297,7 +6297,7 @@ def build_get_fault_operation_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str type_filter = kwargs.pop('type_filter', 65535) # type: int state_filter = kwargs.pop('state_filter', 65535) # type: int timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -6331,7 +6331,7 @@ def build_cancel_operation_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str operation_id = kwargs.pop('operation_id') # type: str force = kwargs.pop('force', False) # type: bool timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -6365,7 +6365,7 @@ def build_create_backup_policy_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] validate_connection = kwargs.pop('validate_connection', False) # type: Optional[bool] @@ -6402,7 +6402,7 @@ def build_delete_backup_policy_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -6437,7 +6437,7 @@ def build_get_backup_policy_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] max_results = kwargs.pop('max_results', 0) # type: Optional[int] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -6474,7 +6474,7 @@ def build_get_backup_policy_by_name_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -6510,7 +6510,7 @@ def build_get_all_entities_backed_up_by_policy_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] max_results = kwargs.pop('max_results', 0) # type: Optional[int] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -6552,7 +6552,7 @@ def build_update_backup_policy_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] validate_connection = kwargs.pop('validate_connection', False) # type: Optional[bool] @@ -6594,7 +6594,7 @@ def build_enable_application_backup_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -6633,7 +6633,7 @@ def build_disable_application_backup_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -6672,7 +6672,7 @@ def build_get_application_backup_configuration_info_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] max_results = kwargs.pop('max_results', 0) # type: Optional[int] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -6714,7 +6714,7 @@ def build_get_application_backup_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] latest = kwargs.pop('latest', False) # type: Optional[bool] start_date_time_filter = kwargs.pop('start_date_time_filter', None) # type: Optional[datetime.datetime] @@ -6765,7 +6765,7 @@ def build_suspend_application_backup_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -6801,7 +6801,7 @@ def build_resume_application_backup_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -6837,7 +6837,7 @@ def build_enable_service_backup_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -6876,7 +6876,7 @@ def build_disable_service_backup_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -6915,7 +6915,7 @@ def build_get_service_backup_configuration_info_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] max_results = kwargs.pop('max_results', 0) # type: Optional[int] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -6957,7 +6957,7 @@ def build_get_service_backup_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] latest = kwargs.pop('latest', False) # type: Optional[bool] start_date_time_filter = kwargs.pop('start_date_time_filter', None) # type: Optional[datetime.datetime] @@ -7008,7 +7008,7 @@ def build_suspend_service_backup_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -7044,7 +7044,7 @@ def build_resume_service_backup_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -7080,7 +7080,7 @@ def build_enable_partition_backup_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -7119,7 +7119,7 @@ def build_disable_partition_backup_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -7158,7 +7158,7 @@ def build_get_partition_backup_configuration_info_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -7194,7 +7194,7 @@ def build_get_partition_backup_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] latest = kwargs.pop('latest', False) # type: Optional[bool] start_date_time_filter = kwargs.pop('start_date_time_filter', None) # type: Optional[datetime.datetime] @@ -7239,7 +7239,7 @@ def build_suspend_partition_backup_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -7275,7 +7275,7 @@ def build_resume_partition_backup_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -7311,7 +7311,7 @@ def build_backup_partition_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] backup_timeout = kwargs.pop('backup_timeout', 10) # type: Optional[int] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -7353,7 +7353,7 @@ def build_get_partition_backup_progress_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -7389,7 +7389,7 @@ def build_restore_partition_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] restore_timeout = kwargs.pop('restore_timeout', 10) # type: Optional[int] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -7431,7 +7431,7 @@ def build_get_partition_restore_progress_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -7466,7 +7466,7 @@ def build_get_backups_from_backup_location_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] @@ -7505,7 +7505,7 @@ def build_create_name_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -7539,7 +7539,7 @@ def build_get_name_exists_info_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -7575,7 +7575,7 @@ def build_delete_name_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -7611,7 +7611,7 @@ def build_get_sub_name_info_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str recursive = kwargs.pop('recursive', False) # type: Optional[bool] continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -7653,7 +7653,7 @@ def build_get_property_info_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str include_values = kwargs.pop('include_values', False) # type: Optional[bool] continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -7695,7 +7695,7 @@ def build_put_property_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -7734,7 +7734,7 @@ def build_get_property_info_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str property_name = kwargs.pop('property_name') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -7772,7 +7772,7 @@ def build_delete_property_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str property_name = kwargs.pop('property_name') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -7810,7 +7810,7 @@ def build_submit_property_batch_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -7848,7 +7848,7 @@ def build_get_cluster_event_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str start_time_utc = kwargs.pop('start_time_utc') # type: str end_time_utc = kwargs.pop('end_time_utc') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -7891,7 +7891,7 @@ def build_get_containers_event_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str start_time_utc = kwargs.pop('start_time_utc') # type: str end_time_utc = kwargs.pop('end_time_utc') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -7935,7 +7935,7 @@ def build_get_node_event_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str start_time_utc = kwargs.pop('start_time_utc') # type: str end_time_utc = kwargs.pop('end_time_utc') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -7983,7 +7983,7 @@ def build_get_nodes_event_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str start_time_utc = kwargs.pop('start_time_utc') # type: str end_time_utc = kwargs.pop('end_time_utc') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -8027,7 +8027,7 @@ def build_get_application_event_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str start_time_utc = kwargs.pop('start_time_utc') # type: str end_time_utc = kwargs.pop('end_time_utc') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -8075,7 +8075,7 @@ def build_get_applications_event_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str start_time_utc = kwargs.pop('start_time_utc') # type: str end_time_utc = kwargs.pop('end_time_utc') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -8119,7 +8119,7 @@ def build_get_service_event_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str start_time_utc = kwargs.pop('start_time_utc') # type: str end_time_utc = kwargs.pop('end_time_utc') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -8167,7 +8167,7 @@ def build_get_services_event_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str start_time_utc = kwargs.pop('start_time_utc') # type: str end_time_utc = kwargs.pop('end_time_utc') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -8211,7 +8211,7 @@ def build_get_partition_event_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str start_time_utc = kwargs.pop('start_time_utc') # type: str end_time_utc = kwargs.pop('end_time_utc') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -8259,7 +8259,7 @@ def build_get_partitions_event_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str start_time_utc = kwargs.pop('start_time_utc') # type: str end_time_utc = kwargs.pop('end_time_utc') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -8304,7 +8304,7 @@ def build_get_partition_replica_event_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str start_time_utc = kwargs.pop('start_time_utc') # type: str end_time_utc = kwargs.pop('end_time_utc') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -8354,7 +8354,7 @@ def build_get_partition_replicas_event_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str start_time_utc = kwargs.pop('start_time_utc') # type: str end_time_utc = kwargs.pop('end_time_utc') # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] @@ -8403,7 +8403,7 @@ def build_get_correlated_event_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str timeout = kwargs.pop('timeout', 60) # type: Optional[int] accept = "application/json" @@ -8472,7 +8472,7 @@ def get_cluster_manifest( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_cluster_manifest_request( @@ -8619,7 +8619,7 @@ def get_cluster_health( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "8.2") # type: str request = build_get_cluster_health_request( @@ -8787,7 +8787,7 @@ def get_cluster_health_using_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _cluster_health_policies = _models.ClusterHealthPolicies(application_health_policy_map=application_health_policy_map, cluster_health_policy=cluster_health_policy) @@ -8862,7 +8862,7 @@ def get_cluster_health_chunk( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_cluster_health_chunk_request( @@ -8952,7 +8952,7 @@ def get_cluster_health_chunk_using_policy_and_advanced_filters( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if cluster_health_chunk_query_description is not None: @@ -9046,7 +9046,7 @@ def report_cluster_health( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(health_information, 'HealthInformation') @@ -9111,7 +9111,7 @@ def get_provisioned_fabric_code_version_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_provisioned_fabric_code_version_info_list_request( @@ -9176,7 +9176,7 @@ def get_provisioned_fabric_config_version_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_provisioned_fabric_config_version_info_list_request( @@ -9237,7 +9237,7 @@ def get_cluster_upgrade_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_cluster_upgrade_progress_request( @@ -9301,7 +9301,7 @@ def get_cluster_configuration( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_cluster_configuration_request( @@ -9361,7 +9361,7 @@ def get_cluster_configuration_upgrade_status( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_cluster_configuration_upgrade_status_request( @@ -9421,7 +9421,7 @@ def get_upgrade_orchestration_service_state( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_upgrade_orchestration_service_state_request( @@ -9485,7 +9485,7 @@ def set_upgrade_orchestration_service_state( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _upgrade_orchestration_service_state = _models.UpgradeOrchestrationServiceState(service_state=service_state) @@ -9555,7 +9555,7 @@ def provision_cluster( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _provision_fabric_description = _models.ProvisionFabricDescription(code_file_path=code_file_path, cluster_manifest_file_path=cluster_manifest_file_path) @@ -9621,7 +9621,7 @@ def unprovision_cluster( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _unprovision_fabric_description = _models.UnprovisionFabricDescription(code_version=code_version, config_version=config_version) @@ -9681,7 +9681,7 @@ def rollback_cluster_upgrade( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_rollback_cluster_upgrade_request( @@ -9740,7 +9740,7 @@ def resume_cluster_upgrade( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _resume_cluster_upgrade_description = _models.ResumeClusterUpgradeDescription(upgrade_domain=upgrade_domain) @@ -9806,7 +9806,7 @@ def start_cluster_upgrade( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') @@ -9871,7 +9871,7 @@ def start_cluster_configuration_upgrade( # pylint: disable=inconsistent-return- } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(cluster_configuration_upgrade_description, 'ClusterConfigurationUpgradeDescription') @@ -9934,7 +9934,7 @@ def update_cluster_upgrade( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(update_cluster_upgrade_description, 'UpdateClusterUpgradeDescription') @@ -9995,7 +9995,7 @@ def get_aad_metadata( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "6.0") # type: str request = build_get_aad_metadata_request( @@ -10055,7 +10055,7 @@ def get_cluster_version( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_cluster_version_request( @@ -10115,7 +10115,7 @@ def get_cluster_load( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_cluster_load_request( @@ -10180,7 +10180,7 @@ def toggle_verbose_service_placement_health_reporting( # pylint: disable=incons } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_toggle_verbose_service_placement_health_reporting_request( @@ -10243,7 +10243,7 @@ def validate_cluster_upgrade( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') @@ -10327,7 +10327,7 @@ def get_node_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_node_info_list_request( @@ -10392,7 +10392,7 @@ def get_node_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_node_info_request( @@ -10481,7 +10481,7 @@ def get_node_health( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_node_health_request( @@ -10575,7 +10575,7 @@ def get_node_health_using_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if cluster_health_policy is not None: @@ -10674,7 +10674,7 @@ def report_node_health( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(health_information, 'HealthInformation') @@ -10739,7 +10739,7 @@ def get_node_load_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_node_load_info_request( @@ -10812,7 +10812,7 @@ def disable_node( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _deactivation_intent_description = _models.DeactivationIntentDescription(deactivation_intent=deactivation_intent) @@ -10878,7 +10878,7 @@ def enable_node( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_enable_node_request( @@ -10951,7 +10951,7 @@ def remove_node_state( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_remove_node_state_request( @@ -11020,7 +11020,7 @@ def restart_node( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _restart_node_description = _models.RestartNodeDescription(node_instance_id=node_instance_id, create_fabric_dump=create_fabric_dump) @@ -11084,7 +11084,7 @@ def remove_configuration_overrides( # pylint: disable=inconsistent-return-state } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_remove_configuration_overrides_request( @@ -11143,7 +11143,7 @@ def get_configuration_overrides( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_configuration_overrides_request( @@ -11212,7 +11212,7 @@ def add_configuration_parameter_overrides( # pylint: disable=inconsistent-retur } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(config_parameter_override_list, '[ConfigParameterOverride]') @@ -11274,7 +11274,7 @@ def remove_node_tags( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(node_tags, '[str]') @@ -11334,7 +11334,7 @@ def add_node_tags( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(node_tags, '[str]') @@ -11436,7 +11436,7 @@ def get_application_type_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_type_info_list_request( @@ -11537,7 +11537,7 @@ def get_application_type_info_list_by_name( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_type_info_list_by_name_request( @@ -11611,7 +11611,7 @@ def provision_application_type( # pylint: disable=inconsistent-return-statement } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(provision_application_type_description_base_required_body_param, 'ProvisionApplicationTypeDescriptionBase') @@ -11686,7 +11686,7 @@ def unprovision_application_type( # pylint: disable=inconsistent-return-stateme } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _unprovision_application_type_description_info = _models.UnprovisionApplicationTypeDescriptionInfo(application_type_version=application_type_version, async_property=async_parameter) @@ -11761,7 +11761,7 @@ def update_application_type_arm_metadata( # pylint: disable=inconsistent-return } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _application_type_arm_metadata_update_description = _models.ArmMetadata(arm_resource_id=arm_resource_id) @@ -11833,7 +11833,7 @@ def get_service_type_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_type_info_list_request( @@ -11907,7 +11907,7 @@ def get_service_type_info_by_name( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_type_info_by_name_request( @@ -11982,7 +11982,7 @@ def get_service_manifest( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_manifest_request( @@ -12063,7 +12063,7 @@ def get_deployed_service_type_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_service_type_info_list_request( @@ -12148,7 +12148,7 @@ def get_deployed_service_type_info_by_name( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_service_type_info_by_name_request( @@ -12216,7 +12216,7 @@ def create_application( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(application_description, 'ApplicationDescription') @@ -12293,7 +12293,7 @@ def delete_application( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_application_request( @@ -12361,7 +12361,7 @@ def get_application_load_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_load_info_request( @@ -12467,7 +12467,7 @@ def get_application_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_info_list_request( @@ -12545,7 +12545,7 @@ def get_application_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_info_request( @@ -12690,7 +12690,7 @@ def get_application_health( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_health_request( @@ -12842,7 +12842,7 @@ def get_application_health_using_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if application_health_policy is not None: @@ -12948,7 +12948,7 @@ def report_application_health( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(health_information, 'HealthInformation') @@ -13027,7 +13027,7 @@ def start_application_upgrade( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(application_upgrade_description, 'ApplicationUpgradeDescription') @@ -13095,7 +13095,7 @@ def get_application_upgrade( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_upgrade_request( @@ -13169,7 +13169,7 @@ def update_application_upgrade( # pylint: disable=inconsistent-return-statement } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(application_upgrade_update_description, 'ApplicationUpgradeUpdateDescription') @@ -13241,7 +13241,7 @@ def update_application( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(application_update_description, 'ApplicationUpdateDescription') @@ -13313,7 +13313,7 @@ def resume_application_upgrade( # pylint: disable=inconsistent-return-statement } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _resume_application_upgrade_description = _models.ResumeApplicationUpgradeDescription(upgrade_domain_name=upgrade_domain_name) @@ -13385,7 +13385,7 @@ def rollback_application_upgrade( # pylint: disable=inconsistent-return-stateme } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_rollback_application_upgrade_request( @@ -13471,7 +13471,7 @@ def get_deployed_application_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_application_info_list_request( @@ -13555,7 +13555,7 @@ def get_deployed_application_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_application_info_request( @@ -13684,7 +13684,7 @@ def get_deployed_application_health( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_application_health_request( @@ -13824,7 +13824,7 @@ def get_deployed_application_health_using_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if application_health_policy is not None: @@ -13934,7 +13934,7 @@ def report_deployed_application_health( # pylint: disable=inconsistent-return-s } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(health_information, 'HealthInformation') @@ -14002,7 +14002,7 @@ def get_application_manifest( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_manifest_request( @@ -14078,7 +14078,7 @@ def update_application_arm_metadata( # pylint: disable=inconsistent-return-stat } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _application_arm_metadata_update_description = _models.ArmMetadata(arm_resource_id=arm_resource_id) @@ -14161,7 +14161,7 @@ def get_service_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_info_list_request( @@ -14238,7 +14238,7 @@ def get_service_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_info_request( @@ -14310,7 +14310,7 @@ def get_application_name_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_name_info_request( @@ -14383,7 +14383,7 @@ def create_service( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(service_description, 'ServiceDescription') @@ -14458,7 +14458,7 @@ def create_service_from_template( # pylint: disable=inconsistent-return-stateme } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(service_from_template_description, 'ServiceFromTemplateDescription') @@ -14535,7 +14535,7 @@ def delete_service( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_service_request( @@ -14608,7 +14608,7 @@ def update_service( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(service_update_description, 'ServiceUpdateDescription') @@ -14676,7 +14676,7 @@ def get_service_description( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_description_request( @@ -14798,7 +14798,7 @@ def get_service_health( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_health_request( @@ -14934,7 +14934,7 @@ def get_service_health_using_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if application_health_policy is not None: @@ -15039,7 +15039,7 @@ def report_service_health( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(health_information, 'HealthInformation') @@ -15136,7 +15136,7 @@ def resolve_service( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_resolve_service_request( @@ -15219,7 +15219,7 @@ def get_unplaced_replica_information( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_unplaced_replica_information_request( @@ -15301,7 +15301,7 @@ def get_loaded_partition_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_loaded_partition_info_list_request( @@ -15380,7 +15380,7 @@ def get_partition_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_info_list_request( @@ -15446,7 +15446,7 @@ def get_partition_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_info_request( @@ -15512,7 +15512,7 @@ def get_service_name_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_name_info_request( @@ -15629,7 +15629,7 @@ def get_partition_health( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_health_request( @@ -15763,7 +15763,7 @@ def get_partition_health_using_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if application_health_policy is not None: @@ -15864,7 +15864,7 @@ def report_partition_health( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(health_information, 'HealthInformation') @@ -15930,7 +15930,7 @@ def get_partition_load_information( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_load_information_request( @@ -15993,7 +15993,7 @@ def reset_partition_load( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_reset_partition_load_request( @@ -16054,7 +16054,7 @@ def recover_partition( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_recover_partition_request( @@ -16121,7 +16121,7 @@ def recover_service_partitions( # pylint: disable=inconsistent-return-statement } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_recover_service_partitions_request( @@ -16181,7 +16181,7 @@ def recover_system_partitions( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_recover_system_partitions_request( @@ -16238,7 +16238,7 @@ def recover_all_partitions( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_recover_all_partitions_request( @@ -16310,7 +16310,7 @@ def move_primary_replica( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_move_primary_replica_request( @@ -16388,7 +16388,7 @@ def move_secondary_replica( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_move_secondary_replica_request( @@ -16469,7 +16469,7 @@ def update_partition_load( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(partition_metric_load_description_list, '[PartitionMetricLoadDescription]') @@ -16563,7 +16563,7 @@ def move_instance( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_move_instance_request( @@ -16650,7 +16650,7 @@ def move_auxiliary_replica( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_move_auxiliary_replica_request( @@ -16719,7 +16719,7 @@ def create_repair_task( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(repair_task, 'RepairTask') @@ -16780,7 +16780,7 @@ def cancel_repair_task( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(repair_task_cancel_description, 'RepairTaskCancelDescription') @@ -16846,7 +16846,7 @@ def delete_repair_task( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _repair_task_delete_description = _models.RepairTaskDeleteDescription(task_id=task_id, version=version) @@ -16921,7 +16921,7 @@ def get_repair_task_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_repair_task_list_request( @@ -16986,7 +16986,7 @@ def force_approve_repair_task( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _repair_task_approve_description = _models.RepairTaskApproveDescription(task_id=task_id, version=version) @@ -17050,7 +17050,7 @@ def update_repair_task_health_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(repair_task_update_health_policy_description, 'RepairTaskUpdateHealthPolicyDescription') @@ -17111,7 +17111,7 @@ def update_repair_execution_state( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(repair_task, 'RepairTask') @@ -17186,7 +17186,7 @@ def get_replica_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_replica_info_list_request( @@ -17254,7 +17254,7 @@ def get_replica_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_replica_info_request( @@ -17347,7 +17347,7 @@ def get_replica_health( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_replica_health_request( @@ -17449,7 +17449,7 @@ def get_replica_health_using_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if application_health_policy is not None: @@ -17556,7 +17556,7 @@ def report_replica_health( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(health_information, 'HealthInformation') @@ -17640,7 +17640,7 @@ def get_deployed_service_replica_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_service_replica_info_list_request( @@ -17716,7 +17716,7 @@ def get_deployed_service_replica_detail_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_service_replica_detail_info_request( @@ -17786,7 +17786,7 @@ def get_deployed_service_replica_detail_info_by_partition_id( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_service_replica_detail_info_by_partition_id_request( @@ -17858,7 +17858,7 @@ def restart_replica( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_restart_replica_request( @@ -17937,7 +17937,7 @@ def remove_replica( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_remove_replica_request( @@ -18007,7 +18007,7 @@ def get_deployed_service_package_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_service_package_info_list_request( @@ -18084,7 +18084,7 @@ def get_deployed_service_package_info_list_by_name( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_service_package_info_list_by_name_request( @@ -18186,7 +18186,7 @@ def get_deployed_service_package_health( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_service_package_health_request( @@ -18297,7 +18297,7 @@ def get_deployed_service_package_health_using_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] if application_health_policy is not None: @@ -18409,7 +18409,7 @@ def report_deployed_service_package_health( # pylint: disable=inconsistent-retu } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(health_information, 'HealthInformation') @@ -18485,7 +18485,7 @@ def deploy_service_package_to_node( # pylint: disable=inconsistent-return-state } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deploy_service_package_to_node_description, 'DeployServicePackageToNodeDescription') @@ -18563,7 +18563,7 @@ def get_deployed_code_package_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_deployed_code_package_info_list_request( @@ -18642,7 +18642,7 @@ def restart_deployed_code_package( # pylint: disable=inconsistent-return-statem } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restart_deployed_code_package_description, 'RestartDeployedCodePackageDescription') @@ -18730,7 +18730,7 @@ def get_container_logs_deployed_on_node( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_container_logs_deployed_on_node_request( @@ -18821,7 +18821,7 @@ def invoke_container_api( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(container_api_request_body, 'ContainerApiRequestBody') @@ -18896,7 +18896,7 @@ def create_compose_deployment( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(create_compose_deployment_description, 'CreateComposeDeploymentDescription') @@ -18960,7 +18960,7 @@ def get_compose_deployment_status( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_compose_deployment_status_request( @@ -19040,7 +19040,7 @@ def get_compose_deployment_status_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_compose_deployment_status_list_request( @@ -19105,7 +19105,7 @@ def get_compose_deployment_upgrade_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_compose_deployment_upgrade_progress_request( @@ -19168,7 +19168,7 @@ def remove_compose_deployment( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_remove_compose_deployment_request( @@ -19232,7 +19232,7 @@ def start_compose_deployment_upgrade( # pylint: disable=inconsistent-return-sta } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(compose_deployment_upgrade_description, 'ComposeDeploymentUpgradeDescription') @@ -19295,7 +19295,7 @@ def start_rollback_compose_deployment_upgrade( # pylint: disable=inconsistent-r } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_start_rollback_compose_deployment_upgrade_request( @@ -19352,7 +19352,7 @@ def get_chaos( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_chaos_request( @@ -19420,7 +19420,7 @@ def start_chaos( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(chaos_parameters, 'ChaosParameters') @@ -19482,7 +19482,7 @@ def stop_chaos( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_stop_chaos_request( @@ -19571,7 +19571,7 @@ def get_chaos_events( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_chaos_events_request( @@ -19635,7 +19635,7 @@ def get_chaos_schedule( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_chaos_schedule_request( @@ -19704,7 +19704,7 @@ def post_chaos_schedule( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _chaos_schedule = _models.ChaosScheduleDescription(version=version, schedule=schedule) @@ -19774,7 +19774,7 @@ def upload_file( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_upload_file_request( @@ -19834,7 +19834,7 @@ def get_image_store_content( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_image_store_content_request( @@ -19898,7 +19898,7 @@ def delete_image_store_content( # pylint: disable=inconsistent-return-statement } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_image_store_content_request( @@ -19954,7 +19954,7 @@ def get_image_store_root_content( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_image_store_root_content_request( @@ -20017,7 +20017,7 @@ def copy_image_store_content( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(image_store_copy_description, 'ImageStoreCopyDescription') @@ -20081,7 +20081,7 @@ def delete_image_store_upload_session( # pylint: disable=inconsistent-return-st } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_image_store_upload_session_request( @@ -20143,7 +20143,7 @@ def commit_image_store_upload_session( # pylint: disable=inconsistent-return-st } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_commit_image_store_upload_session_request( @@ -20204,7 +20204,7 @@ def get_image_store_upload_session_by_id( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_image_store_upload_session_by_id_request( @@ -20268,7 +20268,7 @@ def get_image_store_upload_session_by_path( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_image_store_upload_session_by_path_request( @@ -20350,7 +20350,7 @@ def upload_file_chunk( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_upload_file_chunk_request( @@ -20408,7 +20408,7 @@ def get_image_store_root_folder_size( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_image_store_root_folder_size_request( @@ -20471,7 +20471,7 @@ def get_image_store_folder_size( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_image_store_folder_size_request( @@ -20532,7 +20532,7 @@ def get_image_store_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_image_store_info_request( @@ -20609,7 +20609,7 @@ def invoke_infrastructure_command( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_invoke_infrastructure_command_request( @@ -20688,7 +20688,7 @@ def invoke_infrastructure_query( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_invoke_infrastructure_query_request( @@ -20786,7 +20786,7 @@ def start_data_loss( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_start_data_loss_request( @@ -20859,7 +20859,7 @@ def get_data_loss_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_data_loss_progress_request( @@ -20949,7 +20949,7 @@ def start_quorum_loss( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_start_quorum_loss_request( @@ -21025,7 +21025,7 @@ def get_quorum_loss_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_quorum_loss_progress_request( @@ -21109,7 +21109,7 @@ def start_partition_restart( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_start_partition_restart_request( @@ -21183,7 +21183,7 @@ def get_partition_restart_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_restart_progress_request( @@ -21270,7 +21270,7 @@ def start_node_transition( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_start_node_transition_request( @@ -21338,7 +21338,7 @@ def get_node_transition_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_node_transition_progress_request( @@ -21421,7 +21421,7 @@ def get_fault_operation_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_fault_operation_list_request( @@ -21506,7 +21506,7 @@ def cancel_operation( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_cancel_operation_request( @@ -21571,7 +21571,7 @@ def create_backup_policy( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') @@ -21636,7 +21636,7 @@ def delete_backup_policy( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_backup_policy_request( @@ -21708,7 +21708,7 @@ def get_backup_policy_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_backup_policy_list_request( @@ -21772,7 +21772,7 @@ def get_backup_policy_by_name( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_backup_policy_by_name_request( @@ -21852,7 +21852,7 @@ def get_all_entities_backed_up_by_policy( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_all_entities_backed_up_by_policy_request( @@ -21924,7 +21924,7 @@ def update_backup_policy( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') @@ -21999,7 +21999,7 @@ def enable_application_backup( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) @@ -22071,7 +22071,7 @@ def disable_application_backup( # pylint: disable=inconsistent-return-statement } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) @@ -22159,7 +22159,7 @@ def get_application_backup_configuration_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_backup_configuration_info_request( @@ -22263,7 +22263,7 @@ def get_application_backup_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_backup_list_request( @@ -22337,7 +22337,7 @@ def suspend_application_backup( # pylint: disable=inconsistent-return-statement } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_suspend_application_backup_request( @@ -22401,7 +22401,7 @@ def resume_application_backup( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_resume_application_backup_request( @@ -22473,7 +22473,7 @@ def enable_service_backup( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) @@ -22549,7 +22549,7 @@ def disable_service_backup( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) @@ -22637,7 +22637,7 @@ def get_service_backup_configuration_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_backup_configuration_info_request( @@ -22741,7 +22741,7 @@ def get_service_backup_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_backup_list_request( @@ -22815,7 +22815,7 @@ def suspend_service_backup( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_suspend_service_backup_request( @@ -22879,7 +22879,7 @@ def resume_service_backup( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_resume_service_backup_request( @@ -22946,7 +22946,7 @@ def enable_partition_backup( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) @@ -23018,7 +23018,7 @@ def disable_partition_backup( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) @@ -23085,7 +23085,7 @@ def get_partition_backup_configuration_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_backup_configuration_info_request( @@ -23167,7 +23167,7 @@ def get_partition_backup_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_backup_list_request( @@ -23234,7 +23234,7 @@ def suspend_partition_backup( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_suspend_partition_backup_request( @@ -23294,7 +23294,7 @@ def resume_partition_backup( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_resume_partition_backup_request( @@ -23371,7 +23371,7 @@ def backup_partition( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _backup_partition_description = _models.BackupPartitionDescription(backup_storage=backup_storage) @@ -23440,7 +23440,7 @@ def get_partition_backup_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_backup_progress_request( @@ -23522,7 +23522,7 @@ def restore_partition( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_partition_description, 'RestorePartitionDescription') @@ -23587,7 +23587,7 @@ def get_partition_restore_progress( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_restore_progress_request( @@ -23670,7 +23670,7 @@ def get_backups_from_backup_location( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(get_backup_by_storage_query_description, 'GetBackupByStorageQueryDescription') @@ -23738,7 +23738,7 @@ def create_name( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _name_description = _models.NameDescription(name=name) @@ -23801,7 +23801,7 @@ def get_name_exists_info( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_name_exists_info_request( @@ -23861,7 +23861,7 @@ def delete_name( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_name_request( @@ -23934,7 +23934,7 @@ def get_sub_name_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_sub_name_info_list_request( @@ -24014,7 +24014,7 @@ def get_property_info_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_property_info_list_request( @@ -24082,7 +24082,7 @@ def put_property( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(property_description, 'PropertyDescription') @@ -24149,7 +24149,7 @@ def get_property_info( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_property_info_request( @@ -24217,7 +24217,7 @@ def delete_property( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_delete_property_request( @@ -24282,7 +24282,7 @@ def submit_property_batch( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _property_batch_description_list = _models.PropertyBatchDescriptionList(operations=operations) @@ -24370,7 +24370,7 @@ def get_cluster_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_cluster_event_list_request( @@ -24453,7 +24453,7 @@ def get_containers_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_containers_event_list_request( @@ -24539,7 +24539,7 @@ def get_node_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_node_event_list_request( @@ -24623,7 +24623,7 @@ def get_nodes_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_nodes_event_list_request( @@ -24713,7 +24713,7 @@ def get_application_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_application_event_list_request( @@ -24797,7 +24797,7 @@ def get_applications_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_applications_event_list_request( @@ -24887,7 +24887,7 @@ def get_service_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_service_event_list_request( @@ -24971,7 +24971,7 @@ def get_services_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_services_event_list_request( @@ -25057,7 +25057,7 @@ def get_partition_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_event_list_request( @@ -25141,7 +25141,7 @@ def get_partitions_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partitions_event_list_request( @@ -25230,7 +25230,7 @@ def get_partition_replica_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_replica_event_list_request( @@ -25318,7 +25318,7 @@ def get_partition_replicas_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_partition_replicas_event_list_request( @@ -25386,7 +25386,7 @@ def get_correlated_event_list( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "8.2.0.46") # type: str + api_version = kwargs.pop('api_version', "9.0.0.46") # type: str request = build_get_correlated_event_list_request( diff --git a/customSDK/servicefabric/operations/mesh_application_operations.py b/customSDK/servicefabric/operations/mesh_application_operations.py deleted file mode 100644 index a9d3763d..00000000 --- a/customSDK/servicefabric/operations/mesh_application_operations.py +++ /dev/null @@ -1,350 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class MeshApplicationOperations(object): - """MeshApplicationOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - def create_or_update( - self, application_resource_name, application_resource_description, custom_headers=None, raw=False, **operation_config): - """Creates or updates a Application resource. - - Creates a Application resource with the specified name, description and - properties. If Application resource with the same name exists, then it - is updated with the specified description and properties. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param application_resource_description: Description for creating a - Application resource. - :type application_resource_description: - ~azure.servicefabric.models.ApplicationResourceDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationResourceDescription or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.ApplicationResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4-preview" - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(application_resource_description, 'ApplicationResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('ApplicationResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/Resources/Applications/{applicationResourceName}'} - - def get( - self, application_resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the Application resource with the given name. - - Gets the information about the Application resource with the given - name. The information include the description and other properties of - the Application. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationResourceDescription or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.ApplicationResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4-preview" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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.metadata = {'url': '/Resources/Applications/{applicationResourceName}'} - - def delete( - self, application_resource_name, custom_headers=None, raw=False, **operation_config): - """Deletes the Application resource. - - Deletes the Application resource identified by the name. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4-preview" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = 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.metadata = {'url': '/Resources/Applications/{applicationResourceName}'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the application resources. - - Gets the information about all application resources in a given - resource group. The information include the description and other - properties of the Application. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedApplicationResourceDescriptionList or ClientRawResponse - if raw=true - :rtype: - ~azure.servicefabric.models.PagedApplicationResourceDescriptionList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4-preview" - - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedApplicationResourceDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/Resources/Applications'} - - def get_upgrade_progress( - self, application_resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the progress of the latest upgrade performed on this application - resource. - - Gets the upgrade progress information about the Application resource - with the given name. The information include percentage of completion - and other upgrade state information of the Application resource. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationResourceUpgradeProgressInfo or ClientRawResponse - if raw=true - :rtype: - ~azure.servicefabric.models.ApplicationResourceUpgradeProgressInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "7.0" - - # Construct URL - url = self.get_upgrade_progress.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ApplicationResourceUpgradeProgressInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_progress.metadata = {'url': '/Resources/Applications/{applicationResourceName}/$/GetUpgradeProgress'} diff --git a/customSDK/servicefabric/operations/mesh_code_package_operations.py b/customSDK/servicefabric/operations/mesh_code_package_operations.py deleted file mode 100644 index a1d4afaf..00000000 --- a/customSDK/servicefabric/operations/mesh_code_package_operations.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class MeshCodePackageOperations(object): - """MeshCodePackageOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "6.4-preview" - - self.config = config - - def get_container_logs( - self, application_resource_name, service_resource_name, replica_name, code_package_name, tail=None, custom_headers=None, raw=False, **operation_config): - """Gets the logs from the container. - - Gets the logs for the container of the specified code package of the - service replica. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :param replica_name: Service Fabric replica name. - :type replica_name: str - :param code_package_name: The name of code package of the service. - :type code_package_name: str - :param tail: Number of lines to show from the end of the logs. Default - is 100. 'all' to show the complete logs. - :type tail: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContainerLogs or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ContainerLogs or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.get_container_logs.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True), - 'replicaName': self._serialize.url("replica_name", replica_name, 'str', skip_quote=True), - 'codePackageName': self._serialize.url("code_package_name", code_package_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if tail is not None: - query_parameters['Tail'] = self._serialize.query("tail", tail, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ContainerLogs', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_container_logs.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}/CodePackages/{codePackageName}/Logs'} diff --git a/customSDK/servicefabric/operations/mesh_gateway_operations.py b/customSDK/servicefabric/operations/mesh_gateway_operations.py deleted file mode 100644 index a9c2c8ba..00000000 --- a/customSDK/servicefabric/operations/mesh_gateway_operations.py +++ /dev/null @@ -1,277 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class MeshGatewayOperations(object): - """MeshGatewayOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "6.4-preview" - - self.config = config - - def create_or_update( - self, gateway_resource_name, gateway_resource_description, custom_headers=None, raw=False, **operation_config): - """Creates or updates a Gateway resource. - - Creates a Gateway resource with the specified name, description and - properties. If Gateway resource with the same name exists, then it is - updated with the specified description and properties. Use Gateway - resource to provide public connectivity to application services. - - :param gateway_resource_name: The identity of the gateway. - :type gateway_resource_name: str - :param gateway_resource_description: Description for creating a - Gateway resource. - :type gateway_resource_description: - ~azure.servicefabric.models.GatewayResourceDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: GatewayResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.GatewayResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(gateway_resource_description, 'GatewayResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('GatewayResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('GatewayResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/Resources/Gateways/{gatewayResourceName}'} - - def get( - self, gateway_resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the Gateway resource with the given name. - - Gets the information about the Gateway resource with the given name. - The information include the description and other properties of the - Gateway. - - :param gateway_resource_name: The identity of the gateway. - :type gateway_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: GatewayResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.GatewayResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('GatewayResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/Resources/Gateways/{gatewayResourceName}'} - - def delete( - self, gateway_resource_name, custom_headers=None, raw=False, **operation_config): - """Deletes the Gateway resource. - - Deletes the Gateway resource identified by the name. - - :param gateway_resource_name: The identity of the gateway. - :type gateway_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = 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.metadata = {'url': '/Resources/Gateways/{gatewayResourceName}'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the gateway resources. - - Gets the information about all gateway resources in a given resource - group. The information include the description and other properties of - the Gateway. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedGatewayResourceDescriptionList or ClientRawResponse if - raw=true - :rtype: - ~azure.servicefabric.models.PagedGatewayResourceDescriptionList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedGatewayResourceDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/Resources/Gateways'} diff --git a/customSDK/servicefabric/operations/mesh_network_operations.py b/customSDK/servicefabric/operations/mesh_network_operations.py deleted file mode 100644 index 1ff8a556..00000000 --- a/customSDK/servicefabric/operations/mesh_network_operations.py +++ /dev/null @@ -1,280 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class MeshNetworkOperations(object): - """MeshNetworkOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "6.4-preview" - - self.config = config - - def create_or_update( - self, network_resource_name, name, properties, custom_headers=None, raw=False, **operation_config): - """Creates or updates a Network resource. - - Creates a Network resource with the specified name, description and - properties. If Network resource with the same name exists, then it is - updated with the specified description and properties. Network resource - provides connectivity between application services. - - :param network_resource_name: The identity of the network. - :type network_resource_name: str - :param name: Name of the Network resource. - :type name: str - :param properties: Describes properties of a network resource. - :type properties: - ~azure.servicefabric.models.NetworkResourceProperties - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.NetworkResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - network_resource_description = models.NetworkResourceDescription(name=name, properties=properties) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(network_resource_description, 'NetworkResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('NetworkResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('NetworkResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/Resources/Networks/{networkResourceName}'} - - def get( - self, network_resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the Network resource with the given name. - - Gets the information about the Network resource with the given name. - The information include the description and other properties of the - Network. - - :param network_resource_name: The identity of the network. - :type network_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NetworkResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.NetworkResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('NetworkResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/Resources/Networks/{networkResourceName}'} - - def delete( - self, network_resource_name, custom_headers=None, raw=False, **operation_config): - """Deletes the Network resource. - - Deletes the Network resource identified by the name. - - :param network_resource_name: The identity of the network. - :type network_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = 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.metadata = {'url': '/Resources/Networks/{networkResourceName}'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the network resources. - - Gets the information about all network resources in a given resource - group. The information include the description and other properties of - the Network. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedNetworkResourceDescriptionList or ClientRawResponse if - raw=true - :rtype: - ~azure.servicefabric.models.PagedNetworkResourceDescriptionList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedNetworkResourceDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/Resources/Networks'} diff --git a/customSDK/servicefabric/operations/mesh_secret_operations.py b/customSDK/servicefabric/operations/mesh_secret_operations.py deleted file mode 100644 index bf15d6cc..00000000 --- a/customSDK/servicefabric/operations/mesh_secret_operations.py +++ /dev/null @@ -1,277 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class MeshSecretOperations(object): - """MeshSecretOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "6.4-preview" - - self.config = config - - def create_or_update( - self, secret_resource_name, properties, name, custom_headers=None, raw=False, **operation_config): - """Creates or updates a Secret resource. - - Creates a Secret resource with the specified name, description and - properties. If Secret resource with the same name exists, then it is - updated with the specified description and properties. Once created, - the kind and contentType of a secret resource cannot be updated. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param properties: Describes the properties of a secret resource. - :type properties: ~azure.servicefabric.models.SecretResourceProperties - :param name: Name of the Secret resource. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecretResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.SecretResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - secret_resource_description = models.SecretResourceDescription(properties=properties, name=name) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(secret_resource_description, 'SecretResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SecretResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('SecretResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/Resources/Secrets/{secretResourceName}'} - - def get( - self, secret_resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the Secret resource with the given name. - - Gets the information about the Secret resource with the given name. The - information include the description and other properties of the Secret. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecretResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.SecretResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('SecretResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/Resources/Secrets/{secretResourceName}'} - - def delete( - self, secret_resource_name, custom_headers=None, raw=False, **operation_config): - """Deletes the Secret resource. - - Deletes the specified Secret resource and all of its named values. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = 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.metadata = {'url': '/Resources/Secrets/{secretResourceName}'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the secret resources. - - Gets the information about all secret resources in a given resource - group. The information include the description and other properties of - the Secret. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedSecretResourceDescriptionList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedSecretResourceDescriptionList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedSecretResourceDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/Resources/Secrets'} diff --git a/customSDK/servicefabric/operations/mesh_secret_value_operations.py b/customSDK/servicefabric/operations/mesh_secret_value_operations.py deleted file mode 100644 index 9c4fba47..00000000 --- a/customSDK/servicefabric/operations/mesh_secret_value_operations.py +++ /dev/null @@ -1,364 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class MeshSecretValueOperations(object): - """MeshSecretValueOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "6.4-preview" - - self.config = config - - def add_value( - self, secret_resource_name, secret_value_resource_name, name, value=None, custom_headers=None, raw=False, **operation_config): - """Adds the specified value as a new version of the specified secret - resource. - - Creates a new value of the specified secret resource. The name of the - value is typically the version identifier. Once created the value - cannot be changed. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource - value which is typically the version identifier for the value. - :type secret_value_resource_name: str - :param name: Version identifier of the secret value. - :type name: str - :param value: The actual value of the secret. - :type value: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecretValueResourceDescription or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.SecretValueResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - secret_value_resource_description = models.SecretValueResourceDescription(name=name, value=value) - - # Construct URL - url = self.add_value.metadata['url'] - path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(secret_value_resource_description, 'SecretValueResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SecretValueResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('SecretValueResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - add_value.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'} - - def get( - self, secret_resource_name, secret_value_resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the specified secret value resource. - - Get the information about the specified named secret value resources. - The information does not include the actual value of the secret. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource - value which is typically the version identifier for the value. - :type secret_value_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecretValueResourceDescription or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.SecretValueResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('SecretValueResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'} - - def delete( - self, secret_resource_name, secret_value_resource_name, custom_headers=None, raw=False, **operation_config): - """Deletes the specified value of the named secret resource. - - Deletes the secret value resource identified by the name. The name of - the resource is typically the version associated with that value. - Deletion will fail if the specified value is in use. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource - value which is typically the version identifier for the value. - :type secret_value_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = 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.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'} - - def list( - self, secret_resource_name, custom_headers=None, raw=False, **operation_config): - """List names of all values of the specified secret resource. - - Gets information about all secret value resources of the specified - secret resource. The information includes the names of the secret value - resources, but not the actual values. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedSecretValueResourceDescriptionList or ClientRawResponse - if raw=true - :rtype: - ~azure.servicefabric.models.PagedSecretValueResourceDescriptionList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedSecretValueResourceDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values'} - - def show( - self, secret_resource_name, secret_value_resource_name, custom_headers=None, raw=False, **operation_config): - """Lists the specified value of the secret resource. - - Lists the decrypted value of the specified named value of the secret - resource. This is a privileged operation. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource - value which is typically the version identifier for the value. - :type secret_value_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SecretValue or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.SecretValue or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.show.metadata['url'] - path_format_arguments = { - 'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - 'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = 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('SecretValue', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - show.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}/list_value'} diff --git a/customSDK/servicefabric/operations/mesh_service_operations.py b/customSDK/servicefabric/operations/mesh_service_operations.py deleted file mode 100644 index 04a179fc..00000000 --- a/customSDK/servicefabric/operations/mesh_service_operations.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class MeshServiceOperations(object): - """MeshServiceOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "6.4-preview" - - self.config = config - - def get( - self, application_resource_name, service_resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the Service resource with the given name. - - Gets the information about the Service resource with the given name. - The information include the description and other properties of the - Service. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ServiceResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}'} - - def list( - self, application_resource_name, custom_headers=None, raw=False, **operation_config): - """Lists all the service resources. - - Gets the information about all services of an application resource. The - information include the description and other properties of the - Service. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedServiceResourceDescriptionList or ClientRawResponse if - raw=true - :rtype: - ~azure.servicefabric.models.PagedServiceResourceDescriptionList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedServiceResourceDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services'} diff --git a/customSDK/servicefabric/operations/mesh_service_replica_operations.py b/customSDK/servicefabric/operations/mesh_service_replica_operations.py deleted file mode 100644 index 19bea152..00000000 --- a/customSDK/servicefabric/operations/mesh_service_replica_operations.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class MeshServiceReplicaOperations(object): - """MeshServiceReplicaOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "6.4-preview" - - self.config = config - - def get( - self, application_resource_name, service_resource_name, replica_name, custom_headers=None, raw=False, **operation_config): - """Gets the given replica of the service of an application. - - Gets the information about the service replica with the given name. The - information include the description and other properties of the service - replica. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :param replica_name: Service Fabric replica name. - :type replica_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceReplicaDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceReplicaDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True), - 'replicaName': self._serialize.url("replica_name", replica_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ServiceReplicaDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}'} - - def list( - self, application_resource_name, service_resource_name, custom_headers=None, raw=False, **operation_config): - """Lists all the replicas of a service. - - Gets the information about all replicas of a service. The information - include the description and other properties of the service replica. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedServiceReplicaDescriptionList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedServiceReplicaDescriptionList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - 'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedServiceReplicaDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas'} diff --git a/customSDK/servicefabric/operations/mesh_volume_operations.py b/customSDK/servicefabric/operations/mesh_volume_operations.py deleted file mode 100644 index f637bacc..00000000 --- a/customSDK/servicefabric/operations/mesh_volume_operations.py +++ /dev/null @@ -1,274 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class MeshVolumeOperations(object): - """MeshVolumeOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "6.4-preview" - - self.config = config - - def create_or_update( - self, volume_resource_name, volume_resource_description, custom_headers=None, raw=False, **operation_config): - """Creates or updates a Volume resource. - - Creates a Volume resource with the specified name, description and - properties. If Volume resource with the same name exists, then it is - updated with the specified description and properties. - - :param volume_resource_name: The identity of the volume. - :type volume_resource_name: str - :param volume_resource_description: Description for creating a Volume - resource. - :type volume_resource_description: - ~azure.servicefabric.models.VolumeResourceDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VolumeResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.VolumeResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(volume_resource_description, 'VolumeResourceDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('VolumeResourceDescription', response) - if response.status_code == 201: - deserialized = self._deserialize('VolumeResourceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'} - - def get( - self, volume_resource_name, custom_headers=None, raw=False, **operation_config): - """Gets the Volume resource with the given name. - - Gets the information about the Volume resource with the given name. The - information include the description and other properties of the Volume. - - :param volume_resource_name: The identity of the volume. - :type volume_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VolumeResourceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.VolumeResourceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'} - - def delete( - self, volume_resource_name, custom_headers=None, raw=False, **operation_config): - """Deletes the Volume resource. - - Deletes the Volume resource identified by the name. - - :param volume_resource_name: The identity of the volume. - :type volume_resource_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = 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.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the volume resources. - - Gets the information about all volume resources in a given resource - group. The information include the description and other properties of - the Volume. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedVolumeResourceDescriptionList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedVolumeResourceDescriptionList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedVolumeResourceDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list.metadata = {'url': '/Resources/Volumes'} diff --git a/customSDK/servicefabric/service_fabric_client_ap_is.py b/customSDK/servicefabric/service_fabric_client_ap_is.py deleted file mode 100644 index 43bb62de..00000000 --- a/customSDK/servicefabric/service_fabric_client_ap_is.py +++ /dev/null @@ -1,18049 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from msrest.pipeline import ClientRawResponse -import uuid -from .operations.mesh_secret_operations import MeshSecretOperations -from .operations.mesh_secret_value_operations import MeshSecretValueOperations -from .operations.mesh_volume_operations import MeshVolumeOperations -from .operations.mesh_network_operations import MeshNetworkOperations -from .operations.mesh_application_operations import MeshApplicationOperations -from .operations.mesh_service_operations import MeshServiceOperations -from .operations.mesh_code_package_operations import MeshCodePackageOperations -from .operations.mesh_service_replica_operations import MeshServiceReplicaOperations -from .operations.mesh_gateway_operations import MeshGatewayOperations -from . import models - - -class ServiceFabricClientAPIsConfiguration(AzureConfiguration): - """Configuration for ServiceFabricClientAPIs - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param str base_url: Service URL - """ - - def __init__( - self, credentials, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if not base_url: - base_url = 'http://localhost:19080' - - super(ServiceFabricClientAPIsConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-servicefabric/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - - -class ServiceFabricClientAPIs(SDKClient): - """Service Fabric REST Client APIs allows management of Service Fabric clusters, applications and services. - - :ivar config: Configuration for client. - :vartype config: ServiceFabricClientAPIsConfiguration - - :ivar mesh_secret: MeshSecret operations - :vartype mesh_secret: azure.servicefabric.operations.MeshSecretOperations - :ivar mesh_secret_value: MeshSecretValue operations - :vartype mesh_secret_value: azure.servicefabric.operations.MeshSecretValueOperations - :ivar mesh_volume: MeshVolume operations - :vartype mesh_volume: azure.servicefabric.operations.MeshVolumeOperations - :ivar mesh_network: MeshNetwork operations - :vartype mesh_network: azure.servicefabric.operations.MeshNetworkOperations - :ivar mesh_application: MeshApplication operations - :vartype mesh_application: azure.servicefabric.operations.MeshApplicationOperations - :ivar mesh_service: MeshService operations - :vartype mesh_service: azure.servicefabric.operations.MeshServiceOperations - :ivar mesh_code_package: MeshCodePackage operations - :vartype mesh_code_package: azure.servicefabric.operations.MeshCodePackageOperations - :ivar mesh_service_replica: MeshServiceReplica operations - :vartype mesh_service_replica: azure.servicefabric.operations.MeshServiceReplicaOperations - :ivar mesh_gateway: MeshGateway operations - :vartype mesh_gateway: azure.servicefabric.operations.MeshGatewayOperations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param str base_url: Service URL - """ - - def __init__( - self, credentials, base_url=None): - - self.config = ServiceFabricClientAPIsConfiguration(credentials, base_url) - super(ServiceFabricClientAPIs, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '8.2.0.46' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.mesh_secret = MeshSecretOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_secret_value = MeshSecretValueOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_volume = MeshVolumeOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_network = MeshNetworkOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_application = MeshApplicationOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_service = MeshServiceOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_code_package = MeshCodePackageOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_service_replica = MeshServiceReplicaOperations( - self._client, self.config, self._serialize, self._deserialize) - self.mesh_gateway = MeshGatewayOperations( - self._client, self.config, self._serialize, self._deserialize) - - def get_cluster_manifest( - self, timeout=60, custom_headers=None, raw=False, **operation_config): - """Get the Service Fabric cluster manifest. - - Get the Service Fabric cluster manifest. The cluster manifest contains - properties of the cluster that include different node types on the - cluster, - security configurations, fault, and upgrade domain topologies, etc. - These properties are specified as part of the ClusterConfig.JSON file - while deploying a stand-alone cluster. However, most of the information - in the cluster manifest - is generated internally by service fabric during cluster deployment in - other deployment scenarios (e.g. when using Azure portal). - The contents of the cluster manifest are for informational purposes - only and users are not expected to take a dependency on the format of - the file contents or its interpretation. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterManifest or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterManifest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_cluster_manifest.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ClusterManifest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_manifest.metadata = {'url': '/$/GetClusterManifest'} - - def get_cluster_health( - self, nodes_health_state_filter=0, applications_health_state_filter=0, events_health_state_filter=0, exclude_health_statistics=False, include_system_application_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric cluster. - - Use EventsHealthStateFilter to filter the collection of health events - reported on the cluster based on the health state. - Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter - to filter the collection of nodes and applications returned based on - their aggregated health state. - - :param nodes_health_state_filter: Allows filtering of the node health - state objects returned in the result of cluster health query - based on their health state. The possible values for this parameter - include integer value of one of the - following health states. Only nodes that match the filter are - returned. All nodes are used to evaluate the aggregated health state. - If not specified, all entries are returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of nodes - with HealthState value of OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type nodes_health_state_filter: int - :param applications_health_state_filter: Allows filtering of the - application health state objects returned in the result of cluster - health - query based on their health state. - The possible values for this parameter include integer value obtained - from members or bitwise operations - on members of HealthStateFilter enumeration. Only applications that - match the filter are returned. - All applications are used to evaluate the aggregated health state. If - not specified, all entries are returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of - applications with HealthState value of OK (2) and Warning (4) are - returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type applications_health_state_filter: int - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param include_system_application_health_statistics: Indicates whether - the health statistics should include the fabric:/System application - health statistics. False by default. - If IncludeSystemApplicationHealthStatistics is set to true, the health - statistics include the entities that belong to the fabric:/System - application. - Otherwise, the query result includes health statistics only for user - applications. - The health statistics must be included in the query result for this - parameter to be applied. - :type include_system_application_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_cluster_health.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if nodes_health_state_filter is not None: - query_parameters['NodesHealthStateFilter'] = self._serialize.query("nodes_health_state_filter", nodes_health_state_filter, 'int') - if applications_health_state_filter is not None: - query_parameters['ApplicationsHealthStateFilter'] = self._serialize.query("applications_health_state_filter", applications_health_state_filter, 'int') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if include_system_application_health_statistics is not None: - query_parameters['IncludeSystemApplicationHealthStatistics'] = self._serialize.query("include_system_application_health_statistics", include_system_application_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ClusterHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_health.metadata = {'url': '/$/GetClusterHealth'} - - def get_cluster_health_using_policy( - self, nodes_health_state_filter=0, applications_health_state_filter=0, events_health_state_filter=0, exclude_health_statistics=False, include_system_application_health_statistics=False, timeout=60, application_health_policy_map=None, cluster_health_policy=None, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric cluster using the specified policy. - - Use EventsHealthStateFilter to filter the collection of health events - reported on the cluster based on the health state. - Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter - to filter the collection of nodes and applications returned based on - their aggregated health state. - Use ClusterHealthPolicies to override the health policies used to - evaluate the health. - - :param nodes_health_state_filter: Allows filtering of the node health - state objects returned in the result of cluster health query - based on their health state. The possible values for this parameter - include integer value of one of the - following health states. Only nodes that match the filter are - returned. All nodes are used to evaluate the aggregated health state. - If not specified, all entries are returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of nodes - with HealthState value of OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type nodes_health_state_filter: int - :param applications_health_state_filter: Allows filtering of the - application health state objects returned in the result of cluster - health - query based on their health state. - The possible values for this parameter include integer value obtained - from members or bitwise operations - on members of HealthStateFilter enumeration. Only applications that - match the filter are returned. - All applications are used to evaluate the aggregated health state. If - not specified, all entries are returned. - The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of - applications with HealthState value of OK (2) and Warning (4) are - returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type applications_health_state_filter: int - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param include_system_application_health_statistics: Indicates whether - the health statistics should include the fabric:/System application - health statistics. False by default. - If IncludeSystemApplicationHealthStatistics is set to true, the health - statistics include the entities that belong to the fabric:/System - application. - Otherwise, the query result includes health statistics only for user - applications. - The health statistics must be included in the query result for this - parameter to be applied. - :type include_system_application_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param application_health_policy_map: Defines a map that contains - specific application health policies for different applications. - Each entry specifies as key the application name and as value an - ApplicationHealthPolicy used to evaluate the application health. - If an application is not specified in the map, the application health - evaluation uses the ApplicationHealthPolicy found in its application - manifest or the default application health policy (if no health policy - is defined in the manifest). - The map is empty by default. - :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - :param cluster_health_policy: Defines a health policy used to evaluate - the health of the cluster or of a cluster node. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - cluster_health_policies = None - if application_health_policy_map is not None or cluster_health_policy is not None: - cluster_health_policies = models.ClusterHealthPolicies(application_health_policy_map=application_health_policy_map, cluster_health_policy=cluster_health_policy) - - api_version = "6.0" - - # Construct URL - url = self.get_cluster_health_using_policy.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if nodes_health_state_filter is not None: - query_parameters['NodesHealthStateFilter'] = self._serialize.query("nodes_health_state_filter", nodes_health_state_filter, 'int') - if applications_health_state_filter is not None: - query_parameters['ApplicationsHealthStateFilter'] = self._serialize.query("applications_health_state_filter", applications_health_state_filter, 'int') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if include_system_application_health_statistics is not None: - query_parameters['IncludeSystemApplicationHealthStatistics'] = self._serialize.query("include_system_application_health_statistics", include_system_application_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if cluster_health_policies is not None: - body_content = self._serialize.body(cluster_health_policies, 'ClusterHealthPolicies') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('ClusterHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_health_using_policy.metadata = {'url': '/$/GetClusterHealth'} - - def get_cluster_health_chunk( - self, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric cluster using health chunks. - - Gets the health of a Service Fabric cluster using health chunks. - Includes the aggregated health state of the cluster, but none of the - cluster entities. - To expand the cluster health and get the health state of all or some of - the entities, use the POST URI and specify the cluster health chunk - query description. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterHealthChunk or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterHealthChunk or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_cluster_health_chunk.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ClusterHealthChunk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_health_chunk.metadata = {'url': '/$/GetClusterHealthChunk'} - - def get_cluster_health_chunk_using_policy_and_advanced_filters( - self, cluster_health_chunk_query_description=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric cluster using health chunks. - - Gets the health of a Service Fabric cluster using health chunks. The - health evaluation is done based on the input cluster health chunk query - description. - The query description allows users to specify health policies for - evaluating the cluster and its children. - Users can specify very flexible filters to select which cluster - entities to return. The selection can be done based on the entities - health state and based on the hierarchy. - The query can return multi-level children of the entities based on the - specified filters. For example, it can return one application with a - specified name, and for this application, return - only services that are in Error or Warning, and all partitions and - replicas for one of these services. - - :param cluster_health_chunk_query_description: Describes the cluster - and application health policies used to evaluate the cluster health - and the filters to select which cluster entities to be returned. - If the cluster health policy is present, it is used to evaluate the - cluster events and the cluster nodes. If not present, the health - evaluation uses the cluster health policy defined in the cluster - manifest or the default cluster health policy. - By default, each application is evaluated using its specific - application health policy, defined in the application manifest, or the - default health policy, if no policy is defined in manifest. - If the application health policy map is specified, and it has an entry - for an application, the specified application health policy - is used to evaluate the application health. - Users can specify very flexible filters to select which cluster - entities to include in response. The selection can be done based on - the entities health state and based on the hierarchy. - The query can return multi-level children of the entities based on the - specified filters. For example, it can return one application with a - specified name, and for this application, return - only services that are in Error or Warning, and all partitions and - replicas for one of these services. - :type cluster_health_chunk_query_description: - ~azure.servicefabric.models.ClusterHealthChunkQueryDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterHealthChunk or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterHealthChunk or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_cluster_health_chunk_using_policy_and_advanced_filters.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if cluster_health_chunk_query_description is not None: - body_content = self._serialize.body(cluster_health_chunk_query_description, 'ClusterHealthChunkQueryDescription') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('ClusterHealthChunk', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_health_chunk_using_policy_and_advanced_filters.metadata = {'url': '/$/GetClusterHealthChunk'} - - def report_cluster_health( - self, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Sends a health report on the Service Fabric cluster. - - Sends a health report on a Service Fabric cluster. The report must - contain the information about the source of the health report and - property on which it is reported. - The report is sent to a Service Fabric gateway node, which forwards to - the health store. - The report may be accepted by the gateway, but rejected by the health - store after extra validation. - For example, the health store may reject the report because of an - invalid parameter, like a stale sequence number. - To see whether the report was applied in the health store, run - GetClusterHealth and check that the report appears in the HealthEvents - section. - - :param health_information: Describes the health information for the - health report. This information needs to be present in all of the - health reports sent to the health manager. - :type health_information: - ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be - sent immediately. - A health report is sent to a Service Fabric gateway Application, which - forwards to the health store. - If Immediate is set to true, the report is sent immediately from HTTP - Gateway to the health store, regardless of the fabric client settings - that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as - possible. - Depending on timing and other conditions, sending the report may still - fail, for example if the HTTP Gateway is closed or the message doesn't - reach the Gateway. - If Immediate is set to false, the report is sent based on the health - client settings from the HTTP Gateway. Therefore, it will be batched - according to the HealthReportSendInterval configuration. - This is the recommended setting because it allows the health client to - optimize health reporting messages to health store as well as health - report processing. - By default, reports are not sent immediately. - :type immediate: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.report_cluster_health.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - report_cluster_health.metadata = {'url': '/$/ReportClusterHealth'} - - def get_provisioned_fabric_code_version_info_list( - self, code_version=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets a list of fabric code versions that are provisioned in a Service - Fabric cluster. - - Gets a list of information about fabric code versions that are - provisioned in the cluster. The parameter CodeVersion can be used to - optionally filter the output to only that particular version. - - :param code_version: The product version of Service Fabric. - :type code_version: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.FabricCodeVersionInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_provisioned_fabric_code_version_info_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if code_version is not None: - query_parameters['CodeVersion'] = self._serialize.query("code_version", code_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[FabricCodeVersionInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_provisioned_fabric_code_version_info_list.metadata = {'url': '/$/GetProvisionedCodeVersions'} - - def get_provisioned_fabric_config_version_info_list( - self, config_version=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets a list of fabric config versions that are provisioned in a Service - Fabric cluster. - - Gets a list of information about fabric config versions that are - provisioned in the cluster. The parameter ConfigVersion can be used to - optionally filter the output to only that particular version. - - :param config_version: The config version of Service Fabric. - :type config_version: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.FabricConfigVersionInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_provisioned_fabric_config_version_info_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if config_version is not None: - query_parameters['ConfigVersion'] = self._serialize.query("config_version", config_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[FabricConfigVersionInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_provisioned_fabric_config_version_info_list.metadata = {'url': '/$/GetProvisionedConfigVersions'} - - def get_cluster_upgrade_progress( - self, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the progress of the current cluster upgrade. - - Gets the current progress of the ongoing cluster upgrade. If no upgrade - is currently in progress, get the last state of the previous cluster - upgrade. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterUpgradeProgressObject or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterUpgradeProgressObject or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_cluster_upgrade_progress.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ClusterUpgradeProgressObject', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_upgrade_progress.metadata = {'url': '/$/GetUpgradeProgress'} - - def get_cluster_configuration( - self, configuration_api_version, timeout=60, custom_headers=None, raw=False, **operation_config): - """Get the Service Fabric standalone cluster configuration. - - The cluster configuration contains properties of the cluster that - include different node types on the cluster, - security configurations, fault, and upgrade domain topologies, etc. - - :param configuration_api_version: The API version of the Standalone - cluster json configuration. - :type configuration_api_version: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterConfiguration or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterConfiguration or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_cluster_configuration.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ConfigurationApiVersion'] = self._serialize.query("configuration_api_version", configuration_api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ClusterConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_configuration.metadata = {'url': '/$/GetClusterConfiguration'} - - def get_cluster_configuration_upgrade_status( - self, timeout=60, custom_headers=None, raw=False, **operation_config): - """Get the cluster configuration upgrade status of a Service Fabric - standalone cluster. - - Get the cluster configuration upgrade status details of a Service - Fabric standalone cluster. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterConfigurationUpgradeStatusInfo or ClientRawResponse if - raw=true - :rtype: - ~azure.servicefabric.models.ClusterConfigurationUpgradeStatusInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_cluster_configuration_upgrade_status.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ClusterConfigurationUpgradeStatusInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_configuration_upgrade_status.metadata = {'url': '/$/GetClusterConfigurationUpgradeStatus'} - - def get_upgrade_orchestration_service_state( - self, timeout=60, custom_headers=None, raw=False, **operation_config): - """Get the service state of Service Fabric Upgrade Orchestration Service. - - Get the service state of Service Fabric Upgrade Orchestration Service. - This API is internally used for support purposes. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: UpgradeOrchestrationServiceState or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.UpgradeOrchestrationServiceState - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_upgrade_orchestration_service_state.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('UpgradeOrchestrationServiceState', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_upgrade_orchestration_service_state.metadata = {'url': '/$/GetUpgradeOrchestrationServiceState'} - - def set_upgrade_orchestration_service_state( - self, timeout=60, service_state=None, custom_headers=None, raw=False, **operation_config): - """Update the service state of Service Fabric Upgrade Orchestration - Service. - - Update the service state of Service Fabric Upgrade Orchestration - Service. This API is internally used for support purposes. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param service_state: The state of Service Fabric Upgrade - Orchestration Service. - :type service_state: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: UpgradeOrchestrationServiceStateSummary or ClientRawResponse - if raw=true - :rtype: - ~azure.servicefabric.models.UpgradeOrchestrationServiceStateSummary or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - upgrade_orchestration_service_state = models.UpgradeOrchestrationServiceState(service_state=service_state) - - api_version = "6.0" - - # Construct URL - url = self.set_upgrade_orchestration_service_state.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(upgrade_orchestration_service_state, 'UpgradeOrchestrationServiceState') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('UpgradeOrchestrationServiceStateSummary', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - set_upgrade_orchestration_service_state.metadata = {'url': '/$/SetUpgradeOrchestrationServiceState'} - - def provision_cluster( - self, timeout=60, code_file_path=None, cluster_manifest_file_path=None, custom_headers=None, raw=False, **operation_config): - """Provision the code or configuration packages of a Service Fabric - cluster. - - Validate and provision the code or configuration packages of a Service - Fabric cluster. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param code_file_path: The cluster code package file path. - :type code_file_path: str - :param cluster_manifest_file_path: The cluster manifest file path. - :type cluster_manifest_file_path: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - provision_fabric_description = models.ProvisionFabricDescription(code_file_path=code_file_path, cluster_manifest_file_path=cluster_manifest_file_path) - - api_version = "6.0" - - # Construct URL - url = self.provision_cluster.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(provision_fabric_description, 'ProvisionFabricDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - provision_cluster.metadata = {'url': '/$/Provision'} - - def unprovision_cluster( - self, timeout=60, code_version=None, config_version=None, custom_headers=None, raw=False, **operation_config): - """Unprovision the code or configuration packages of a Service Fabric - cluster. - - It is supported to unprovision code and configuration separately. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param code_version: The cluster code package version. - :type code_version: str - :param config_version: The cluster manifest version. - :type config_version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - unprovision_fabric_description = models.UnprovisionFabricDescription(code_version=code_version, config_version=config_version) - - api_version = "6.0" - - # Construct URL - url = self.unprovision_cluster.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(unprovision_fabric_description, 'UnprovisionFabricDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - unprovision_cluster.metadata = {'url': '/$/Unprovision'} - - def rollback_cluster_upgrade( - self, timeout=60, custom_headers=None, raw=False, **operation_config): - """Roll back the upgrade of a Service Fabric cluster. - - Roll back the code or configuration upgrade of a Service Fabric - cluster. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.rollback_cluster_upgrade.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - rollback_cluster_upgrade.metadata = {'url': '/$/RollbackUpgrade'} - - def resume_cluster_upgrade( - self, upgrade_domain, timeout=60, custom_headers=None, raw=False, **operation_config): - """Make the cluster upgrade move on to the next upgrade domain. - - Make the cluster code or configuration upgrade move on to the next - upgrade domain if appropriate. - - :param upgrade_domain: The next upgrade domain for this cluster - upgrade. - :type upgrade_domain: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - resume_cluster_upgrade_description = models.ResumeClusterUpgradeDescription(upgrade_domain=upgrade_domain) - - api_version = "6.0" - - # Construct URL - url = self.resume_cluster_upgrade.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(resume_cluster_upgrade_description, 'ResumeClusterUpgradeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resume_cluster_upgrade.metadata = {'url': '/$/MoveToNextUpgradeDomain'} - - def start_cluster_upgrade( - self, start_cluster_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): - """Start upgrading the code or configuration version of a Service Fabric - cluster. - - Validate the supplied upgrade parameters and start upgrading the code - or configuration version of a Service Fabric cluster if the parameters - are valid. - - :param start_cluster_upgrade_description: Describes the parameters for - starting a cluster upgrade. - :type start_cluster_upgrade_description: - ~azure.servicefabric.models.StartClusterUpgradeDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.start_cluster_upgrade.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_cluster_upgrade.metadata = {'url': '/$/Upgrade'} - - def start_cluster_configuration_upgrade( - self, cluster_configuration_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): - """Start upgrading the configuration of a Service Fabric standalone - cluster. - - Validate the supplied configuration upgrade parameters and start - upgrading the cluster configuration if the parameters are valid. - - :param cluster_configuration_upgrade_description: Parameters for a - standalone cluster configuration upgrade. - :type cluster_configuration_upgrade_description: - ~azure.servicefabric.models.ClusterConfigurationUpgradeDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.start_cluster_configuration_upgrade.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(cluster_configuration_upgrade_description, 'ClusterConfigurationUpgradeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_cluster_configuration_upgrade.metadata = {'url': '/$/StartClusterConfigurationUpgrade'} - - def update_cluster_upgrade( - self, update_cluster_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): - """Update the upgrade parameters of a Service Fabric cluster upgrade. - - Update the upgrade parameters used during a Service Fabric cluster - upgrade. - - :param update_cluster_upgrade_description: Parameters for updating a - cluster upgrade. - :type update_cluster_upgrade_description: - ~azure.servicefabric.models.UpdateClusterUpgradeDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.update_cluster_upgrade.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(update_cluster_upgrade_description, 'UpdateClusterUpgradeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update_cluster_upgrade.metadata = {'url': '/$/UpdateUpgrade'} - - def get_aad_metadata( - self, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the Azure Active Directory metadata used for secured connection to - cluster. - - Gets the Azure Active Directory metadata used for secured connection to - cluster. - This API is not supposed to be called separately. It provides - information needed to set up an Azure Active Directory secured - connection with a Service Fabric cluster. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: AadMetadataObject or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.AadMetadataObject or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_aad_metadata.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('AadMetadataObject', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_aad_metadata.metadata = {'url': '/$/GetAadMetadata'} - - def get_cluster_version( - self, timeout=60, custom_headers=None, raw=False, **operation_config): - """Get the current Service Fabric cluster version. - - If a cluster upgrade is happening, then this API will return the lowest - (older) version of the current and target cluster runtime versions. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterVersion or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterVersion or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_cluster_version.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ClusterVersion', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_version.metadata = {'url': '/$/GetClusterVersion'} - - def get_cluster_load( - self, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the load of a Service Fabric cluster. - - Retrieves the load information of a Service Fabric cluster for all the - metrics that have load or capacity defined. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterLoadInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ClusterLoadInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_cluster_load.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ClusterLoadInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_load.metadata = {'url': '/$/GetLoadInformation'} - - def toggle_verbose_service_placement_health_reporting( - self, enabled, timeout=60, custom_headers=None, raw=False, **operation_config): - """Changes the verbosity of service placement health reporting. - - If verbosity is set to true, then detailed health reports will be - generated when replicas cannot be placed or dropped. - If verbosity is set to false, then no health reports will be generated - when replicas cannot be placed or dropped. - - :param enabled: The verbosity of service placement health reporting. - :type enabled: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.toggle_verbose_service_placement_health_reporting.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['Enabled'] = self._serialize.query("enabled", enabled, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - toggle_verbose_service_placement_health_reporting.metadata = {'url': '/$/ToggleVerboseServicePlacementHealthReporting'} - - def validate_cluster_upgrade( - self, start_cluster_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): - """Validate and assess the impact of a code or configuration version - update of a Service Fabric cluster. - - Validate the supplied upgrade parameters and assess the expected impact - of a code or configuration version upgrade of a Service Fabric cluster. - The upgrade will not be initiated. - - :param start_cluster_upgrade_description: Describes the parameters for - starting a cluster upgrade. - :type start_cluster_upgrade_description: - ~azure.servicefabric.models.StartClusterUpgradeDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ValidateClusterUpgradeResult or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ValidateClusterUpgradeResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "8.2" - - # Construct URL - url = self.validate_cluster_upgrade.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') - - # Construct and send request - 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) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ValidateClusterUpgradeResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - validate_cluster_upgrade.metadata = {'url': '/$/ValidateUpgrade'} - - def get_node_info_list( - self, continuation_token=None, node_status_filter="default", max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the list of nodes in the Service Fabric cluster. - - The response includes the name, status, ID, health, uptime, and other - details about the nodes. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param node_status_filter: Allows filtering the nodes based on the - NodeStatus. Only the nodes that are matching the specified filter - value will be returned. The filter value can be one of the following. - Possible values include: 'default', 'all', 'up', 'down', 'enabling', - 'disabling', 'disabled', 'unknown', 'removed' - :type node_status_filter: str or - ~azure.servicefabric.models.NodeStatusFilter - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedNodeInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedNodeInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.3" - - # Construct URL - url = self.get_node_info_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if node_status_filter is not None: - query_parameters['NodeStatusFilter'] = self._serialize.query("node_status_filter", node_status_filter, 'str') - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedNodeInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_node_info_list.metadata = {'url': '/Nodes'} - - def get_node_info( - self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the information about a specific node in the Service Fabric - cluster. - - The response includes the name, status, ID, health, uptime, and other - details about the node. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NodeInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.NodeInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_node_info.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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 == 200: - deserialized = self._deserialize('NodeInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_node_info.metadata = {'url': '/Nodes/{nodeName}'} - - def get_node_health( - self, node_name, events_health_state_filter=0, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric node. - - Gets the health of a Service Fabric node. Use EventsHealthStateFilter - to filter the collection of health events reported on the node based on - the health state. If the node that you specify by name does not exist - in the health store, this returns an error. - - :param node_name: The name of the node. - :type node_name: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NodeHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.NodeHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_node_health.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('NodeHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_node_health.metadata = {'url': '/Nodes/{nodeName}/$/GetHealth'} - - def get_node_health_using_policy( - self, node_name, events_health_state_filter=0, cluster_health_policy=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric node, by using the specified health - policy. - - Gets the health of a Service Fabric node. Use EventsHealthStateFilter - to filter the collection of health events reported on the node based on - the health state. Use ClusterHealthPolicy in the POST body to override - the health policies used to evaluate the health. If the node that you - specify by name does not exist in the health store, this returns an - error. - - :param node_name: The name of the node. - :type node_name: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param cluster_health_policy: Describes the health policies used to - evaluate the health of a cluster or node. If not present, the health - evaluation uses the health policy from cluster manifest or the default - health policy. - :type cluster_health_policy: - ~azure.servicefabric.models.ClusterHealthPolicy - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NodeHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.NodeHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_node_health_using_policy.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if cluster_health_policy is not None: - body_content = self._serialize.body(cluster_health_policy, 'ClusterHealthPolicy') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('NodeHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_node_health_using_policy.metadata = {'url': '/Nodes/{nodeName}/$/GetHealth'} - - def report_node_health( - self, node_name, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Sends a health report on the Service Fabric node. - - Reports health state of the specified Service Fabric node. The report - must contain the information about the source of the health report and - property on which it is reported. - The report is sent to a Service Fabric gateway node, which forwards to - the health store. - The report may be accepted by the gateway, but rejected by the health - store after extra validation. - For example, the health store may reject the report because of an - invalid parameter, like a stale sequence number. - To see whether the report was applied in the health store, run - GetNodeHealth and check that the report appears in the HealthEvents - section. - - :param node_name: The name of the node. - :type node_name: str - :param health_information: Describes the health information for the - health report. This information needs to be present in all of the - health reports sent to the health manager. - :type health_information: - ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be - sent immediately. - A health report is sent to a Service Fabric gateway Application, which - forwards to the health store. - If Immediate is set to true, the report is sent immediately from HTTP - Gateway to the health store, regardless of the fabric client settings - that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as - possible. - Depending on timing and other conditions, sending the report may still - fail, for example if the HTTP Gateway is closed or the message doesn't - reach the Gateway. - If Immediate is set to false, the report is sent based on the health - client settings from the HTTP Gateway. Therefore, it will be batched - according to the HealthReportSendInterval configuration. - This is the recommended setting because it allows the health client to - optimize health reporting messages to health store as well as health - report processing. - By default, reports are not sent immediately. - :type immediate: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.report_node_health.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - report_node_health.metadata = {'url': '/Nodes/{nodeName}/$/ReportHealth'} - - def get_node_load_info( - self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the load information of a Service Fabric node. - - Retrieves the load information of a Service Fabric node for all the - metrics that have load or capacity defined. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NodeLoadInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.NodeLoadInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_node_load_info.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('NodeLoadInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_node_load_info.metadata = {'url': '/Nodes/{nodeName}/$/GetLoadInformation'} - - def disable_node( - self, node_name, timeout=60, deactivation_intent=None, custom_headers=None, raw=False, **operation_config): - """Deactivate a Service Fabric cluster node with the specified - deactivation intent. - - Deactivate a Service Fabric cluster node with the specified - deactivation intent. Once the deactivation is in progress, the - deactivation intent can be increased, but not decreased (for example, a - node that is deactivated with the Pause intent can be deactivated - further with Restart, but not the other way around. Nodes may be - reactivated using the Activate a node operation any time after they are - deactivated. If the deactivation is not complete, this will cancel the - deactivation. A node that goes down and comes back up while deactivated - will still need to be reactivated before services will be placed on - that node. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param deactivation_intent: Describes the intent or reason for - deactivating the node. The possible values are following. Possible - values include: 'Pause', 'Restart', 'RemoveData' - :type deactivation_intent: str or - ~azure.servicefabric.models.DeactivationIntent - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - deactivation_intent_description = models.DeactivationIntentDescription(deactivation_intent=deactivation_intent) - - api_version = "6.0" - - # Construct URL - url = self.disable_node.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(deactivation_intent_description, 'DeactivationIntentDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_node.metadata = {'url': '/Nodes/{nodeName}/$/Deactivate'} - - def enable_node( - self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Activate a Service Fabric cluster node that is currently deactivated. - - Activates a Service Fabric cluster node that is currently deactivated. - Once activated, the node will again become a viable target for placing - new replicas, and any deactivated replicas remaining on the node will - be reactivated. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.enable_node.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - enable_node.metadata = {'url': '/Nodes/{nodeName}/$/Activate'} - - def remove_node_state( - self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Notifies Service Fabric that the persisted state on a node has been - permanently removed or lost. - - This implies that it is not possible to recover the persisted state of - that node. This generally happens if a hard disk has been wiped clean, - or if a hard disk crashes. The node has to be down for this operation - to be successful. This operation lets Service Fabric know that the - replicas on that node no longer exist, and that Service Fabric should - stop waiting for those replicas to come back up. Do not run this cmdlet - if the state on the node has not been removed and the node can come - back up with its state intact. Starting from Service Fabric 6.5, in - order to use this API for seed nodes, please change the seed nodes to - regular (non-seed) nodes and then invoke this API to remove the node - state. If the cluster is running on Azure, after the seed node goes - down, Service Fabric will try to change it to a non-seed node - automatically. To make this happen, make sure the number of non-seed - nodes in the primary node type is no less than the number of Down seed - nodes. If necessary, add more nodes to the primary node type to achieve - this. For standalone cluster, if the Down seed node is not expected to - come back up with its state intact, please remove the node from the - cluster, see - https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-windows-server-add-remove-nodes. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.remove_node_state.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - remove_node_state.metadata = {'url': '/Nodes/{nodeName}/$/RemoveNodeState'} - - def restart_node( - self, node_name, node_instance_id="0", timeout=60, create_fabric_dump="False", custom_headers=None, raw=False, **operation_config): - """Restarts a Service Fabric cluster node. - - Restarts a Service Fabric cluster node that is already started. - - :param node_name: The name of the node. - :type node_name: str - :param node_instance_id: The instance ID of the target node. If - instance ID is specified the node is restarted only if it matches with - the current instance of the node. A default value of "0" would match - any instance ID. The instance ID can be obtained using get node query. - :type node_instance_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param create_fabric_dump: Specify True to create a dump of the fabric - node process. This is case-sensitive. Possible values include: - 'False', 'True' - :type create_fabric_dump: str or - ~azure.servicefabric.models.CreateFabricDump - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - restart_node_description = models.RestartNodeDescription(node_instance_id=node_instance_id, create_fabric_dump=create_fabric_dump) - - api_version = "6.0" - - # Construct URL - url = self.restart_node.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restart_node_description, 'RestartNodeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_node.metadata = {'url': '/Nodes/{nodeName}/$/Restart'} - - def remove_configuration_overrides( - self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Removes configuration overrides on the specified node. - - This api allows removing all existing configuration overrides on - specified node. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "7.0" - - # Construct URL - url = self.remove_configuration_overrides.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - remove_configuration_overrides.metadata = {'url': '/Nodes/{nodeName}/$/RemoveConfigurationOverrides'} - - def get_configuration_overrides( - self, node_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the list of configuration overrides on the specified node. - - This api allows getting all existing configuration overrides on the - specified node. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ConfigParameterOverride] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "7.0" - - # Construct URL - url = self.get_configuration_overrides.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[ConfigParameterOverride]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_configuration_overrides.metadata = {'url': '/Nodes/{nodeName}/$/GetConfigurationOverrides'} - - def add_configuration_parameter_overrides( - self, node_name, config_parameter_override_list, force=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Adds the list of configuration overrides on the specified node. - - This api allows adding all existing configuration overrides on the - specified node. - - :param node_name: The name of the node. - :type node_name: str - :param config_parameter_override_list: Description for adding list of - configuration overrides. - :type config_parameter_override_list: - list[~azure.servicefabric.models.ConfigParameterOverride] - :param force: Force adding configuration overrides on specified nodes. - :type force: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "7.0" - - # Construct URL - url = self.add_configuration_parameter_overrides.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if force is not None: - query_parameters['Force'] = self._serialize.query("force", force, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(config_parameter_override_list, '[ConfigParameterOverride]') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - add_configuration_parameter_overrides.metadata = {'url': '/Nodes/{nodeName}/$/AddConfigurationParameterOverrides'} - - def remove_node_tags( - self, node_name, node_tags, custom_headers=None, raw=False, **operation_config): - """Removes the list of tags from the specified node. - - This api allows removing set of tags from the specified node. - - :param node_name: The name of the node. - :type node_name: str - :param node_tags: Description for adding list of node tags. - :type node_tags: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "7.0" - - # Construct URL - url = self.remove_node_tags.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(node_tags, '[str]') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - remove_node_tags.metadata = {'url': '/Nodes/{nodeName}/$/RemoveNodeTags'} - - def add_node_tags( - self, node_name, node_tags, custom_headers=None, raw=False, **operation_config): - """Adds the list of tags on the specified node. - - This api allows adding tags to the specified node. - - :param node_name: The name of the node. - :type node_name: str - :param node_tags: Description for adding list of node tags. - :type node_tags: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "7.2" - - # Construct URL - url = self.add_node_tags.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(node_tags, '[str]') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - add_node_tags.metadata = {'url': '/Nodes/{nodeName}/$/AddNodeTags'} - - def get_application_type_info_list( - self, application_type_definition_kind_filter=0, exclude_application_parameters=False, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the list of application types in the Service Fabric cluster. - - Returns the information about the application types that are - provisioned or in the process of being provisioned in the Service - Fabric cluster. Each version of an application type is returned as one - application type. The response includes the name, version, status, and - other details about the application type. This is a paged query, - meaning that if not all of the application types fit in a page, one - page of results is returned as well as a continuation token, which can - be used to get the next page. For example, if there are 10 application - types but a page only fits the first three application types, or if max - results is set to 3, then three is returned. To access the rest of the - results, retrieve subsequent pages by using the returned continuation - token in the next query. An empty continuation token is returned if - there are no subsequent pages. - - :param application_type_definition_kind_filter: Used to filter on - ApplicationTypeDefinitionKind which is the mechanism used to define a - Service Fabric application type. - - Default - Default value, which performs the same function as - selecting "All". The value is 0. - - All - Filter that matches input with any - ApplicationTypeDefinitionKind value. The value is 65535. - - ServiceFabricApplicationPackage - Filter that matches input with - ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. - The value is 1. - - Compose - Filter that matches input with - ApplicationTypeDefinitionKind value Compose. The value is 2. - :type application_type_definition_kind_filter: int - :param exclude_application_parameters: The flag that specifies whether - application parameters will be excluded from the result. - :type exclude_application_parameters: bool - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedApplicationTypeInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedApplicationTypeInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_type_info_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if application_type_definition_kind_filter is not None: - query_parameters['ApplicationTypeDefinitionKindFilter'] = self._serialize.query("application_type_definition_kind_filter", application_type_definition_kind_filter, 'int') - if exclude_application_parameters is not None: - query_parameters['ExcludeApplicationParameters'] = self._serialize.query("exclude_application_parameters", exclude_application_parameters, 'bool') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedApplicationTypeInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_type_info_list.metadata = {'url': '/ApplicationTypes'} - - def get_application_type_info_list_by_name( - self, application_type_name, application_type_version=None, exclude_application_parameters=False, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the list of application types in the Service Fabric cluster - matching exactly the specified name. - - Returns the information about the application types that are - provisioned or in the process of being provisioned in the Service - Fabric cluster. These results are of application types whose name match - exactly the one specified as the parameter, and which comply with the - given query parameters. All versions of the application type matching - the application type name are returned, with each version returned as - one application type. The response includes the name, version, status, - and other details about the application type. This is a paged query, - meaning that if not all of the application types fit in a page, one - page of results is returned as well as a continuation token, which can - be used to get the next page. For example, if there are 10 application - types but a page only fits the first three application types, or if max - results is set to 3, then three is returned. To access the rest of the - results, retrieve subsequent pages by using the returned continuation - token in the next query. An empty continuation token is returned if - there are no subsequent pages. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param exclude_application_parameters: The flag that specifies whether - application parameters will be excluded from the result. - :type exclude_application_parameters: bool - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedApplicationTypeInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedApplicationTypeInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_type_info_list_by_name.metadata['url'] - path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if application_type_version is not None: - query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') - if exclude_application_parameters is not None: - query_parameters['ExcludeApplicationParameters'] = self._serialize.query("exclude_application_parameters", exclude_application_parameters, 'bool') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedApplicationTypeInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_type_info_list_by_name.metadata = {'url': '/ApplicationTypes/{applicationTypeName}'} - - def provision_application_type( - self, provision_application_type_description_base_required_body_param, timeout=60, custom_headers=None, raw=False, **operation_config): - """Provisions or registers a Service Fabric application type with the - cluster using the '.sfpkg' package in the external store or using the - application package in the image store. - - Provisions a Service Fabric application type with the cluster. The - provision is required before any new applications can be instantiated. - The provision operation can be performed either on the application - package specified by the relativePathInImageStore, or by using the URI - of the external '.sfpkg'. - - :param - provision_application_type_description_base_required_body_param: The - base type of provision application type description which supports - either image store-based provision or external store-based provision. - :type provision_application_type_description_base_required_body_param: - ~azure.servicefabric.models.ProvisionApplicationTypeDescriptionBase - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.2" - - # Construct URL - url = self.provision_application_type.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(provision_application_type_description_base_required_body_param, 'ProvisionApplicationTypeDescriptionBase') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - provision_application_type.metadata = {'url': '/ApplicationTypes/$/Provision'} - - def unprovision_application_type( - self, application_type_name, application_type_version, timeout=60, async_parameter=None, custom_headers=None, raw=False, **operation_config): - """Removes or unregisters a Service Fabric application type from the - cluster. - - This operation can only be performed if all application instances of - the application type have been deleted. Once the application type is - unregistered, no new application instances can be created for this - particular application type. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type - as defined in the application manifest. - :type application_type_version: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param async_parameter: The flag indicating whether or not unprovision - should occur asynchronously. When set to true, the unprovision - operation returns when the request is accepted by the system, and the - unprovision operation continues without any timeout limit. The default - value is false. However, we recommend setting it to true for large - application packages that were provisioned. - :type async_parameter: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - unprovision_application_type_description_info = models.UnprovisionApplicationTypeDescriptionInfo(application_type_version=application_type_version, async_property=async_parameter) - - api_version = "6.0" - - # Construct URL - url = self.unprovision_application_type.metadata['url'] - path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(unprovision_application_type_description_info, 'UnprovisionApplicationTypeDescriptionInfo') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - unprovision_application_type.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/Unprovision'} - - def get_service_type_info_list( - self, application_type_name, application_type_version, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the list containing the information about service types that are - supported by a provisioned application type in a Service Fabric - cluster. - - Gets the list containing the information about service types that are - supported by a provisioned application type in a Service Fabric - cluster. The provided application type must exist. Otherwise, a 404 - status is returned. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ServiceTypeInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_type_info_list.metadata['url'] - path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[ServiceTypeInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_type_info_list.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes'} - - def get_service_type_info_by_name( - self, application_type_name, application_type_version, service_type_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the information about a specific service type that is supported by - a provisioned application type in a Service Fabric cluster. - - Gets the information about a specific service type that is supported by - a provisioned application type in a Service Fabric cluster. The - provided application type must exist. Otherwise, a 404 status is - returned. A 204 response is returned if the specified service type is - not found in the cluster. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param service_type_name: Specifies the name of a Service Fabric - service type. - :type service_type_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceTypeInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceTypeInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_type_info_by_name.metadata['url'] - path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str'), - 'serviceTypeName': self._serialize.url("service_type_name", service_type_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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 == 200: - deserialized = self._deserialize('ServiceTypeInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_type_info_by_name.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes/{serviceTypeName}'} - - def get_service_manifest( - self, application_type_name, application_type_version, service_manifest_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the manifest describing a service type. - - Gets the manifest describing a service type. The response contains the - service manifest XML as a string. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param service_manifest_name: The name of a service manifest - registered as part of an application type in a Service Fabric cluster. - :type service_manifest_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceTypeManifest or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceTypeManifest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_manifest.metadata['url'] - path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ServiceTypeManifest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_manifest.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/GetServiceManifest'} - - def get_deployed_service_type_info_list( - self, node_name, application_id, service_manifest_name=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the list containing the information about service types from the - applications deployed on a node in a Service Fabric cluster. - - Gets the list containing the information about service types from the - applications deployed on a node in a Service Fabric cluster. The - response includes the name of the service type, its registration - status, the code package that registered it and activation ID of the - service package. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_manifest_name: The name of the service manifest to - filter the list of deployed service type information. If specified, - the response will only contain the information about service types - that are defined in this service manifest. - :type service_manifest_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.DeployedServiceTypeInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_type_info_list.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if service_manifest_name is not None: - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[DeployedServiceTypeInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_type_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes'} - - def get_deployed_service_type_info_by_name( - self, node_name, application_id, service_type_name, service_manifest_name=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the information about a specified service type of the application - deployed on a node in a Service Fabric cluster. - - Gets the list containing the information about a specific service type - from the applications deployed on a node in a Service Fabric cluster. - The response includes the name of the service type, its registration - status, the code package that registered it and activation ID of the - service package. Each entry represents one activation of a service - type, differentiated by the activation ID. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_type_name: Specifies the name of a Service Fabric - service type. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest to - filter the list of deployed service type information. If specified, - the response will only contain the information about service types - that are defined in this service manifest. - :type service_manifest_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.DeployedServiceTypeInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_type_info_by_name.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'serviceTypeName': self._serialize.url("service_type_name", service_type_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if service_manifest_name is not None: - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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 == 200: - deserialized = self._deserialize('[DeployedServiceTypeInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_type_info_by_name.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes/{serviceTypeName}'} - - def create_application( - self, application_description, timeout=60, custom_headers=None, raw=False, **operation_config): - """Creates a Service Fabric application. - - Creates a Service Fabric application using the specified description. - - :param application_description: Description for creating an - application. - :type application_description: - ~azure.servicefabric.models.ApplicationDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.create_application.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(application_description, 'ApplicationDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - create_application.metadata = {'url': '/Applications/$/Create'} - - def delete_application( - self, application_id, force_remove=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Service Fabric application. - - An application must be created before it can be deleted. Deleting an - application will delete all services that are part of that application. - By default, Service Fabric will try to close service replicas in a - graceful manner and then delete the service. However, if a service is - having issues closing the replica gracefully, the delete operation may - take a long time or get stuck. Use the optional ForceRemove flag to - skip the graceful close sequence and forcefully delete the application - and all of its services. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param force_remove: Remove a Service Fabric application or service - forcefully without going through the graceful shutdown sequence. This - parameter can be used to forcefully delete an application or service - for which delete is timing out due to issues in the service code that - prevents graceful close of replicas. - :type force_remove: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.delete_application.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if force_remove is not None: - query_parameters['ForceRemove'] = self._serialize.query("force_remove", force_remove, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_application.metadata = {'url': '/Applications/{applicationId}/$/Delete'} - - def get_application_load_info( - self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets load information about a Service Fabric application. - - Returns the load information about the application that was created or - in the process of being created in the Service Fabric cluster and whose - name matches the one specified as the parameter. The response includes - the name, minimum nodes, maximum nodes, the number of nodes the - application is occupying currently, and application load metric - information about the application. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationLoadInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ApplicationLoadInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_load_info.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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 == 200: - deserialized = self._deserialize('ApplicationLoadInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_load_info.metadata = {'url': '/Applications/{applicationId}/$/GetLoadInformation'} - - def get_application_info_list( - self, application_definition_kind_filter=0, application_type_name=None, exclude_application_parameters=False, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the list of applications created in the Service Fabric cluster - that match the specified filters. - - Gets the information about the applications that were created or in the - process of being created in the Service Fabric cluster and match the - specified filters. The response includes the name, type, status, - parameters, and other details about the application. If the - applications do not fit in a page, one page of results is returned as - well as a continuation token, which can be used to get the next page. - Filters ApplicationTypeName and ApplicationDefinitionKindFilter cannot - be specified at the same time. - - :param application_definition_kind_filter: Used to filter on - ApplicationDefinitionKind, which is the mechanism used to define a - Service Fabric application. - - Default - Default value, which performs the same function as - selecting "All". The value is 0. - - All - Filter that matches input with any ApplicationDefinitionKind - value. The value is 65535. - - ServiceFabricApplicationDescription - Filter that matches input with - ApplicationDefinitionKind value ServiceFabricApplicationDescription. - The value is 1. - - Compose - Filter that matches input with ApplicationDefinitionKind - value Compose. The value is 2. - :type application_definition_kind_filter: int - :param application_type_name: The application type name used to filter - the applications to query for. This value should not contain the - application type version. - :type application_type_name: str - :param exclude_application_parameters: The flag that specifies whether - application parameters will be excluded from the result. - :type exclude_application_parameters: bool - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedApplicationInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedApplicationInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.1" - - # Construct URL - url = self.get_application_info_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if application_definition_kind_filter is not None: - query_parameters['ApplicationDefinitionKindFilter'] = self._serialize.query("application_definition_kind_filter", application_definition_kind_filter, 'int') - if application_type_name is not None: - query_parameters['ApplicationTypeName'] = self._serialize.query("application_type_name", application_type_name, 'str') - if exclude_application_parameters is not None: - query_parameters['ExcludeApplicationParameters'] = self._serialize.query("exclude_application_parameters", exclude_application_parameters, 'bool') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedApplicationInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_info_list.metadata = {'url': '/Applications'} - - def get_application_info( - self, application_id, exclude_application_parameters=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets information about a Service Fabric application. - - Returns the information about the application that was created or in - the process of being created in the Service Fabric cluster and whose - name matches the one specified as the parameter. The response includes - the name, type, status, parameters, and other details about the - application. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param exclude_application_parameters: The flag that specifies whether - application parameters will be excluded from the result. - :type exclude_application_parameters: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ApplicationInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_info.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if exclude_application_parameters is not None: - query_parameters['ExcludeApplicationParameters'] = self._serialize.query("exclude_application_parameters", exclude_application_parameters, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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 == 200: - deserialized = self._deserialize('ApplicationInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_info.metadata = {'url': '/Applications/{applicationId}'} - - def get_application_health( - self, application_id, events_health_state_filter=0, deployed_applications_health_state_filter=0, services_health_state_filter=0, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the health of the service fabric application. - - Returns the heath state of the service fabric application. The response - reports either Ok, Error or Warning health state. If the entity is not - found in the health store, it will return Error. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param deployed_applications_health_state_filter: Allows filtering of - the deployed applications health state objects returned in the result - of application health query based on their health state. - The possible values for this parameter include integer value of one of - the following health states. Only deployed applications that match the - filter will be returned. - All deployed applications are used to evaluate the aggregated health - state. If not specified, all entries are returned. - The state values are flag-based enumeration, so the value could be a - combination of these values, obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of deployed - applications with HealthState value of OK (2) and Warning (4) are - returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type deployed_applications_health_state_filter: int - :param services_health_state_filter: Allows filtering of the services - health state objects returned in the result of services health query - based on their health state. - The possible values for this parameter include integer value of one of - the following health states. - Only services that match the filter are returned. All services are - used to evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, - obtained using bitwise 'OR' operator. For example, if the provided - value is 6 then health state of services with HealthState value of OK - (2) and Warning (4) will be returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type services_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ApplicationHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_health.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if deployed_applications_health_state_filter is not None: - query_parameters['DeployedApplicationsHealthStateFilter'] = self._serialize.query("deployed_applications_health_state_filter", deployed_applications_health_state_filter, 'int') - if services_health_state_filter is not None: - query_parameters['ServicesHealthStateFilter'] = self._serialize.query("services_health_state_filter", services_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ApplicationHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_health.metadata = {'url': '/Applications/{applicationId}/$/GetHealth'} - - def get_application_health_using_policy( - self, application_id, events_health_state_filter=0, deployed_applications_health_state_filter=0, services_health_state_filter=0, exclude_health_statistics=False, application_health_policy=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric application using the specified - policy. - - Gets the health of a Service Fabric application. Use - EventsHealthStateFilter to filter the collection of health events - reported on the node based on the health state. Use - ClusterHealthPolicies to override the health policies used to evaluate - the health. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param deployed_applications_health_state_filter: Allows filtering of - the deployed applications health state objects returned in the result - of application health query based on their health state. - The possible values for this parameter include integer value of one of - the following health states. Only deployed applications that match the - filter will be returned. - All deployed applications are used to evaluate the aggregated health - state. If not specified, all entries are returned. - The state values are flag-based enumeration, so the value could be a - combination of these values, obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of deployed - applications with HealthState value of OK (2) and Warning (4) are - returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type deployed_applications_health_state_filter: int - :param services_health_state_filter: Allows filtering of the services - health state objects returned in the result of services health query - based on their health state. - The possible values for this parameter include integer value of one of - the following health states. - Only services that match the filter are returned. All services are - used to evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, - obtained using bitwise 'OR' operator. For example, if the provided - value is 6 then health state of services with HealthState value of OK - (2) and Warning (4) will be returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type services_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param application_health_policy: Describes the health policies used - to evaluate the health of an application or one of its children. - If not present, the health evaluation uses the health policy from - application manifest or the default health policy. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ApplicationHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_health_using_policy.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if deployed_applications_health_state_filter is not None: - query_parameters['DeployedApplicationsHealthStateFilter'] = self._serialize.query("deployed_applications_health_state_filter", deployed_applications_health_state_filter, 'int') - if services_health_state_filter is not None: - query_parameters['ServicesHealthStateFilter'] = self._serialize.query("services_health_state_filter", services_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('ApplicationHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_health_using_policy.metadata = {'url': '/Applications/{applicationId}/$/GetHealth'} - - def report_application_health( - self, application_id, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Sends a health report on the Service Fabric application. - - Reports health state of the specified Service Fabric application. The - report must contain the information about the source of the health - report and property on which it is reported. - The report is sent to a Service Fabric gateway Application, which - forwards to the health store. - The report may be accepted by the gateway, but rejected by the health - store after extra validation. - For example, the health store may reject the report because of an - invalid parameter, like a stale sequence number. - To see whether the report was applied in the health store, get - application health and check that the report appears in the - HealthEvents section. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param health_information: Describes the health information for the - health report. This information needs to be present in all of the - health reports sent to the health manager. - :type health_information: - ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be - sent immediately. - A health report is sent to a Service Fabric gateway Application, which - forwards to the health store. - If Immediate is set to true, the report is sent immediately from HTTP - Gateway to the health store, regardless of the fabric client settings - that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as - possible. - Depending on timing and other conditions, sending the report may still - fail, for example if the HTTP Gateway is closed or the message doesn't - reach the Gateway. - If Immediate is set to false, the report is sent based on the health - client settings from the HTTP Gateway. Therefore, it will be batched - according to the HealthReportSendInterval configuration. - This is the recommended setting because it allows the health client to - optimize health reporting messages to health store as well as health - report processing. - By default, reports are not sent immediately. - :type immediate: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.report_application_health.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - report_application_health.metadata = {'url': '/Applications/{applicationId}/$/ReportHealth'} - - def start_application_upgrade( - self, application_id, application_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): - """Starts upgrading an application in the Service Fabric cluster. - - Validates the supplied application upgrade parameters and starts - upgrading the application if the parameters are valid. - Note, - [ApplicationParameter](https://docs.microsoft.com/dotnet/api/system.fabric.description.applicationdescription.applicationparameters)s - are not preserved across an application upgrade. - In order to preserve current application parameters, the user should - get the parameters using [GetApplicationInfo](./GetApplicationInfo.md) - operation first and pass them into the upgrade API call as shown in the - example. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param application_upgrade_description: Parameters for an application - upgrade. - :type application_upgrade_description: - ~azure.servicefabric.models.ApplicationUpgradeDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.start_application_upgrade.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(application_upgrade_description, 'ApplicationUpgradeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/Upgrade'} - - def get_application_upgrade( - self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets details for the latest upgrade performed on this application. - - Returns information about the state of the latest application upgrade - along with details to aid debugging application health issues. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationUpgradeProgressInfo or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.ApplicationUpgradeProgressInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_upgrade.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ApplicationUpgradeProgressInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/GetUpgradeProgress'} - - def update_application_upgrade( - self, application_id, application_upgrade_update_description, timeout=60, custom_headers=None, raw=False, **operation_config): - """Updates an ongoing application upgrade in the Service Fabric cluster. - - Updates the parameters of an ongoing application upgrade from the ones - specified at the time of starting the application upgrade. This may be - required to mitigate stuck application upgrades due to incorrect - parameters or issues in the application to make progress. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param application_upgrade_update_description: Parameters for updating - an existing application upgrade. - :type application_upgrade_update_description: - ~azure.servicefabric.models.ApplicationUpgradeUpdateDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.update_application_upgrade.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(application_upgrade_update_description, 'ApplicationUpgradeUpdateDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/UpdateUpgrade'} - - def update_application( - self, application_id, application_update_description, timeout=60, custom_headers=None, raw=False, **operation_config): - """Updates a Service Fabric application. - - Updates a Service Fabric application instance. The set of properties - that can be updated are a subset of the properties that were specified - at the time of creating the application. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param application_update_description: Parameters for updating an - existing application instance. - :type application_update_description: - ~azure.servicefabric.models.ApplicationUpdateDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "8.1" - - # Construct URL - url = self.update_application.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(application_update_description, 'ApplicationUpdateDescription') - - # Construct and send request - 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) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update_application.metadata = {'url': '/Applications/{applicationId}/$/Update'} - - def resume_application_upgrade( - self, application_id, upgrade_domain_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Resumes upgrading an application in the Service Fabric cluster. - - Resumes an unmonitored manual Service Fabric application upgrade. - Service Fabric upgrades one upgrade domain at a time. For unmonitored - manual upgrades, after Service Fabric finishes an upgrade domain, it - waits for you to call this API before proceeding to the next upgrade - domain. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param upgrade_domain_name: The name of the upgrade domain in which to - resume the upgrade. - :type upgrade_domain_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - resume_application_upgrade_description = models.ResumeApplicationUpgradeDescription(upgrade_domain_name=upgrade_domain_name) - - api_version = "6.0" - - # Construct URL - url = self.resume_application_upgrade.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(resume_application_upgrade_description, 'ResumeApplicationUpgradeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resume_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/MoveToNextUpgradeDomain'} - - def rollback_application_upgrade( - self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Starts rolling back the currently on-going upgrade of an application in - the Service Fabric cluster. - - Starts rolling back the current application upgrade to the previous - version. This API can only be used to roll back the current in-progress - upgrade that is rolling forward to new version. If the application is - not currently being upgraded use StartApplicationUpgrade API to upgrade - it to desired version, including rolling back to a previous version. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.rollback_application_upgrade.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - rollback_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/RollbackUpgrade'} - - def get_deployed_application_info_list( - self, node_name, timeout=60, include_health_state=False, continuation_token=None, max_results=0, custom_headers=None, raw=False, **operation_config): - """Gets the list of applications deployed on a Service Fabric node. - - Gets the list of applications deployed on a Service Fabric node. The - results do not include information about deployed system applications - unless explicitly queried for by ID. Results encompass deployed - applications in active, activating, and downloading states. This query - requires that the node name corresponds to a node on the cluster. The - query fails if the provided node name does not point to any active - Service Fabric nodes on the cluster. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param include_health_state: Include the health state of an entity. - If this parameter is false or not specified, then the health state - returned is "Unknown". - When set to true, the query goes in parallel to the node and the - health system service before the results are merged. - As a result, the query is more expensive and may take a longer time. - :type include_health_state: bool - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedDeployedApplicationInfoList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedDeployedApplicationInfoList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.1" - - # Construct URL - url = self.get_deployed_application_info_list.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if include_health_state is not None: - query_parameters['IncludeHealthState'] = self._serialize.query("include_health_state", include_health_state, 'bool') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedDeployedApplicationInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_application_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications'} - - def get_deployed_application_info( - self, node_name, application_id, timeout=60, include_health_state=False, custom_headers=None, raw=False, **operation_config): - """Gets the information about an application deployed on a Service Fabric - node. - - This query returns system application information if the application ID - provided is for system application. Results encompass deployed - applications in active, activating, and downloading states. This query - requires that the node name corresponds to a node on the cluster. The - query fails if the provided node name does not point to any active - Service Fabric nodes on the cluster. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param include_health_state: Include the health state of an entity. - If this parameter is false or not specified, then the health state - returned is "Unknown". - When set to true, the query goes in parallel to the node and the - health system service before the results are merged. - As a result, the query is more expensive and may take a longer time. - :type include_health_state: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeployedApplicationInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.DeployedApplicationInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.1" - - # Construct URL - url = self.get_deployed_application_info.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if include_health_state is not None: - query_parameters['IncludeHealthState'] = self._serialize.query("include_health_state", include_health_state, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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 == 200: - deserialized = self._deserialize('DeployedApplicationInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_application_info.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}'} - - def get_deployed_application_health( - self, node_name, application_id, events_health_state_filter=0, deployed_service_packages_health_state_filter=0, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the information about health of an application deployed on a - Service Fabric node. - - Gets the information about health of an application deployed on a - Service Fabric node. Use EventsHealthStateFilter to optionally filter - for the collection of HealthEvent objects reported on the deployed - application based on health state. Use - DeployedServicePackagesHealthStateFilter to optionally filter for - DeployedServicePackageHealth children based on health state. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param deployed_service_packages_health_state_filter: Allows filtering - of the deployed service package health state objects returned in the - result of deployed application health query based on their health - state. - The possible values for this parameter include integer value of one of - the following health states. - Only deployed service packages that match the filter are returned. All - deployed service packages are used to evaluate the aggregated health - state of the deployed application. - If not specified, all entries are returned. - The state values are flag-based enumeration, so the value can be a - combination of these values, obtained using the bitwise 'OR' operator. - For example, if the provided value is 6 then health state of service - packages with HealthState value of OK (2) and Warning (4) are - returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type deployed_service_packages_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeployedApplicationHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.DeployedApplicationHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_application_health.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if deployed_service_packages_health_state_filter is not None: - query_parameters['DeployedServicePackagesHealthStateFilter'] = self._serialize.query("deployed_service_packages_health_state_filter", deployed_service_packages_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('DeployedApplicationHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_application_health.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth'} - - def get_deployed_application_health_using_policy( - self, node_name, application_id, events_health_state_filter=0, deployed_service_packages_health_state_filter=0, application_health_policy=None, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the information about health of an application deployed on a - Service Fabric node. using the specified policy. - - Gets the information about health of an application deployed on a - Service Fabric node using the specified policy. Use - EventsHealthStateFilter to optionally filter for the collection of - HealthEvent objects reported on the deployed application based on - health state. Use DeployedServicePackagesHealthStateFilter to - optionally filter for DeployedServicePackageHealth children based on - health state. Use ApplicationHealthPolicy to optionally override the - health policies used to evaluate the health. This API only uses - 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest - of the fields are ignored while evaluating the health of the deployed - application. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param deployed_service_packages_health_state_filter: Allows filtering - of the deployed service package health state objects returned in the - result of deployed application health query based on their health - state. - The possible values for this parameter include integer value of one of - the following health states. - Only deployed service packages that match the filter are returned. All - deployed service packages are used to evaluate the aggregated health - state of the deployed application. - If not specified, all entries are returned. - The state values are flag-based enumeration, so the value can be a - combination of these values, obtained using the bitwise 'OR' operator. - For example, if the provided value is 6 then health state of service - packages with HealthState value of OK (2) and Warning (4) are - returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type deployed_service_packages_health_state_filter: int - :param application_health_policy: Describes the health policies used - to evaluate the health of an application or one of its children. - If not present, the health evaluation uses the health policy from - application manifest or the default health policy. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeployedApplicationHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.DeployedApplicationHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_application_health_using_policy.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if deployed_service_packages_health_state_filter is not None: - query_parameters['DeployedServicePackagesHealthStateFilter'] = self._serialize.query("deployed_service_packages_health_state_filter", deployed_service_packages_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('DeployedApplicationHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_application_health_using_policy.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth'} - - def report_deployed_application_health( - self, node_name, application_id, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Sends a health report on the Service Fabric application deployed on a - Service Fabric node. - - Reports health state of the application deployed on a Service Fabric - node. The report must contain the information about the source of the - health report and property on which it is reported. - The report is sent to a Service Fabric gateway Service, which forwards - to the health store. - The report may be accepted by the gateway, but rejected by the health - store after extra validation. - For example, the health store may reject the report because of an - invalid parameter, like a stale sequence number. - To see whether the report was applied in the health store, get deployed - application health and check that the report appears in the - HealthEvents section. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param health_information: Describes the health information for the - health report. This information needs to be present in all of the - health reports sent to the health manager. - :type health_information: - ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be - sent immediately. - A health report is sent to a Service Fabric gateway Application, which - forwards to the health store. - If Immediate is set to true, the report is sent immediately from HTTP - Gateway to the health store, regardless of the fabric client settings - that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as - possible. - Depending on timing and other conditions, sending the report may still - fail, for example if the HTTP Gateway is closed or the message doesn't - reach the Gateway. - If Immediate is set to false, the report is sent based on the health - client settings from the HTTP Gateway. Therefore, it will be batched - according to the HealthReportSendInterval configuration. - This is the recommended setting because it allows the health client to - optimize health reporting messages to health store as well as health - report processing. - By default, reports are not sent immediately. - :type immediate: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.report_deployed_application_health.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - report_deployed_application_health.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/ReportHealth'} - - def get_application_manifest( - self, application_type_name, application_type_version, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the manifest describing an application type. - - The response contains the application manifest XML as a string. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationTypeManifest or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ApplicationTypeManifest or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_manifest.metadata['url'] - path_format_arguments = { - 'applicationTypeName': self._serialize.url("application_type_name", application_type_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ApplicationTypeVersion'] = self._serialize.query("application_type_version", application_type_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ApplicationTypeManifest', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_manifest.metadata = {'url': '/ApplicationTypes/{applicationTypeName}/$/GetApplicationManifest'} - - def get_service_info_list( - self, application_id, service_type_name=None, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the information about all services belonging to the application - specified by the application ID. - - Returns the information about all services belonging to the application - specified by the application ID. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_type_name: The service type name used to filter the - services to query for. - :type service_type_name: str - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedServiceInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedServiceInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_info_list.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if service_type_name is not None: - query_parameters['ServiceTypeName'] = self._serialize.query("service_type_name", service_type_name, 'str') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedServiceInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_info_list.metadata = {'url': '/Applications/{applicationId}/$/GetServices'} - - def get_service_info( - self, application_id, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the information about the specific service belonging to the - Service Fabric application. - - Returns the information about the specified service belonging to the - specified Service Fabric application. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_info.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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 == 200: - deserialized = self._deserialize('ServiceInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_info.metadata = {'url': '/Applications/{applicationId}/$/GetServices/{serviceId}'} - - def get_application_name_info( - self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the name of the Service Fabric application for a service. - - Gets the name of the application for the specified service. A 404 - FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the - provided service ID does not exist. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ApplicationNameInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ApplicationNameInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_application_name_info.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ApplicationNameInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_name_info.metadata = {'url': '/Services/{serviceId}/$/GetApplicationName'} - - def create_service( - self, application_id, service_description, timeout=60, custom_headers=None, raw=False, **operation_config): - """Creates the specified Service Fabric service. - - This api allows creating a new Service Fabric stateless or stateful - service under a specified Service Fabric application. The description - for creating the service includes partitioning information and optional - properties for placement and load balancing. Some of the properties can - later be modified using `UpdateService` API. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_description: The information necessary to create a - service. - :type service_description: - ~azure.servicefabric.models.ServiceDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.create_service.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(service_description, 'ServiceDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - create_service.metadata = {'url': '/Applications/{applicationId}/$/GetServices/$/Create'} - - def create_service_from_template( - self, application_id, service_from_template_description, timeout=60, custom_headers=None, raw=False, **operation_config): - """Creates a Service Fabric service from the service template. - - Creates a Service Fabric service from the service template defined in - the application manifest. A service template contains the properties - that will be same for the service instance of the same type. The API - allows overriding the properties that are usually different for - different services of the same service type. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_from_template_description: Describes the service that - needs to be created from the template defined in the application - manifest. - :type service_from_template_description: - ~azure.servicefabric.models.ServiceFromTemplateDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.create_service_from_template.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(service_from_template_description, 'ServiceFromTemplateDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - create_service_from_template.metadata = {'url': '/Applications/{applicationId}/$/GetServices/$/CreateFromTemplate'} - - def delete_service( - self, service_id, force_remove=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Service Fabric service. - - A service must be created before it can be deleted. By default, Service - Fabric will try to close service replicas in a graceful manner and then - delete the service. However, if the service is having issues closing - the replica gracefully, the delete operation may take a long time or - get stuck. Use the optional ForceRemove flag to skip the graceful close - sequence and forcefully delete the service. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param force_remove: Remove a Service Fabric application or service - forcefully without going through the graceful shutdown sequence. This - parameter can be used to forcefully delete an application or service - for which delete is timing out due to issues in the service code that - prevents graceful close of replicas. - :type force_remove: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.delete_service.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if force_remove is not None: - query_parameters['ForceRemove'] = self._serialize.query("force_remove", force_remove, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_service.metadata = {'url': '/Services/{serviceId}/$/Delete'} - - def update_service( - self, service_id, service_update_description, timeout=60, custom_headers=None, raw=False, **operation_config): - """Updates a Service Fabric service using the specified update - description. - - This API allows updating properties of a running Service Fabric - service. The set of properties that can be updated are a subset of the - properties that were specified at the time of creating the service. The - current set of properties can be obtained using `GetServiceDescription` - API. Note that updating the properties of a running service is - different than upgrading your application using - `StartApplicationUpgrade` API. The upgrade is a long running background - operation that involves moving the application from one version to - another, one upgrade domain at a time, whereas update applies the new - properties immediately to the service. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param service_update_description: The information necessary to update - a service. - :type service_update_description: - ~azure.servicefabric.models.ServiceUpdateDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.update_service.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(service_update_description, 'ServiceUpdateDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update_service.metadata = {'url': '/Services/{serviceId}/$/Update'} - - def get_service_description( - self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the description of an existing Service Fabric service. - - Gets the description of an existing Service Fabric service. A service - must be created before its description can be obtained. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_description.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ServiceDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_description.metadata = {'url': '/Services/{serviceId}/$/GetDescription'} - - def get_service_health( - self, service_id, events_health_state_filter=0, partitions_health_state_filter=0, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the health of the specified Service Fabric service. - - Gets the health information of the specified service. - Use EventsHealthStateFilter to filter the collection of health events - reported on the service based on the health state. - Use PartitionsHealthStateFilter to filter the collection of partitions - returned. - If you specify a service that does not exist in the health store, this - request returns an error. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param partitions_health_state_filter: Allows filtering of the - partitions health state objects returned in the result of service - health query based on their health state. - The possible values for this parameter include integer value of one of - the following health states. - Only partitions that match the filter are returned. All partitions are - used to evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - value - obtained using bitwise 'OR' operator. For example, if the provided - value is 6 then health state of partitions with HealthState value of - OK (2) and Warning (4) will be returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type partitions_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_health.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if partitions_health_state_filter is not None: - query_parameters['PartitionsHealthStateFilter'] = self._serialize.query("partitions_health_state_filter", partitions_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ServiceHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_health.metadata = {'url': '/Services/{serviceId}/$/GetHealth'} - - def get_service_health_using_policy( - self, service_id, events_health_state_filter=0, partitions_health_state_filter=0, application_health_policy=None, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the health of the specified Service Fabric service, by using the - specified health policy. - - Gets the health information of the specified service. - If the application health policy is specified, the health evaluation - uses it to get the aggregated health state. - If the policy is not specified, the health evaluation uses the - application health policy defined in the application manifest, or the - default health policy, if no policy is defined in the manifest. - Use EventsHealthStateFilter to filter the collection of health events - reported on the service based on the health state. - Use PartitionsHealthStateFilter to filter the collection of partitions - returned. - If you specify a service that does not exist in the health store, this - request returns an error. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param partitions_health_state_filter: Allows filtering of the - partitions health state objects returned in the result of service - health query based on their health state. - The possible values for this parameter include integer value of one of - the following health states. - Only partitions that match the filter are returned. All partitions are - used to evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - value - obtained using bitwise 'OR' operator. For example, if the provided - value is 6 then health state of partitions with HealthState value of - OK (2) and Warning (4) will be returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type partitions_health_state_filter: int - :param application_health_policy: Describes the health policies used - to evaluate the health of an application or one of its children. - If not present, the health evaluation uses the health policy from - application manifest or the default health policy. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_health_using_policy.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if partitions_health_state_filter is not None: - query_parameters['PartitionsHealthStateFilter'] = self._serialize.query("partitions_health_state_filter", partitions_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('ServiceHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_health_using_policy.metadata = {'url': '/Services/{serviceId}/$/GetHealth'} - - def report_service_health( - self, service_id, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Sends a health report on the Service Fabric service. - - Reports health state of the specified Service Fabric service. The - report must contain the information about the source of the health - report and property on which it is reported. - The report is sent to a Service Fabric gateway Service, which forwards - to the health store. - The report may be accepted by the gateway, but rejected by the health - store after extra validation. - For example, the health store may reject the report because of an - invalid parameter, like a stale sequence number. - To see whether the report was applied in the health store, run - GetServiceHealth and check that the report appears in the HealthEvents - section. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param health_information: Describes the health information for the - health report. This information needs to be present in all of the - health reports sent to the health manager. - :type health_information: - ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be - sent immediately. - A health report is sent to a Service Fabric gateway Application, which - forwards to the health store. - If Immediate is set to true, the report is sent immediately from HTTP - Gateway to the health store, regardless of the fabric client settings - that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as - possible. - Depending on timing and other conditions, sending the report may still - fail, for example if the HTTP Gateway is closed or the message doesn't - reach the Gateway. - If Immediate is set to false, the report is sent based on the health - client settings from the HTTP Gateway. Therefore, it will be batched - according to the HealthReportSendInterval configuration. - This is the recommended setting because it allows the health client to - optimize health reporting messages to health store as well as health - report processing. - By default, reports are not sent immediately. - :type immediate: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.report_service_health.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - report_service_health.metadata = {'url': '/Services/{serviceId}/$/ReportHealth'} - - def resolve_service( - self, service_id, partition_key_type=None, partition_key_value=None, previous_rsp_version=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Resolve a Service Fabric partition. - - Resolve a Service Fabric service partition to get the endpoints of the - service replicas. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_key_type: Key type for the partition. This parameter - is required if the partition scheme for the service is Int64Range or - Named. The possible values are following. - - None (1) - Indicates that the PartitionKeyValue parameter is not - specified. This is valid for the partitions with partitioning scheme - as Singleton. This is the default value. The value is 1. - - Int64Range (2) - Indicates that the PartitionKeyValue parameter is - an int64 partition key. This is valid for the partitions with - partitioning scheme as Int64Range. The value is 2. - - Named (3) - Indicates that the PartitionKeyValue parameter is a name - of the partition. This is valid for the partitions with partitioning - scheme as Named. The value is 3. - :type partition_key_type: int - :param partition_key_value: Partition key. This is required if the - partition scheme for the service is Int64Range or Named. - This is not the partition ID, but rather, either the integer key - value, or the name of the partition ID. - For example, if your service is using ranged partitions from 0 to 10, - then they PartitionKeyValue would be an - integer in that range. Query service description to see the range or - name. - :type partition_key_value: str - :param previous_rsp_version: The value in the Version field of the - response that was received previously. This is required if the user - knows that the result that was gotten previously is stale. - :type previous_rsp_version: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResolvedServicePartition or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ResolvedServicePartition or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.resolve_service.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if partition_key_type is not None: - query_parameters['PartitionKeyType'] = self._serialize.query("partition_key_type", partition_key_type, 'int') - if partition_key_value is not None: - query_parameters['PartitionKeyValue'] = self._serialize.query("partition_key_value", partition_key_value, 'str', skip_quote=True) - if previous_rsp_version is not None: - query_parameters['PreviousRspVersion'] = self._serialize.query("previous_rsp_version", previous_rsp_version, 'str', skip_quote=True) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ResolvedServicePartition', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - resolve_service.metadata = {'url': '/Services/{serviceId}/$/ResolvePartition'} - - def get_unplaced_replica_information( - self, service_id, partition_id=None, only_query_primaries=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the information about unplaced replica of the service. - - Returns the information about the unplaced replicas of the service. - If PartitionId is specified, then result will contain information only - about unplaced replicas for that partition. - If PartitionId is not specified, then result will contain information - about unplaced replicas for all partitions of that service. - If OnlyQueryPrimaries is set to true, then result will contain - information only about primary replicas, and will ignore unplaced - secondary replicas. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param only_query_primaries: Indicates that unplaced replica - information will be queries only for primary replicas. - :type only_query_primaries: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: UnplacedReplicaInformation or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.UnplacedReplicaInformation or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_unplaced_replica_information.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if partition_id is not None: - query_parameters['PartitionId'] = self._serialize.query("partition_id", partition_id, 'str') - if only_query_primaries is not None: - query_parameters['OnlyQueryPrimaries'] = self._serialize.query("only_query_primaries", only_query_primaries, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('UnplacedReplicaInformation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_unplaced_replica_information.metadata = {'url': '/Services/{serviceId}/$/GetUnplacedReplicaInformation'} - - def get_loaded_partition_info_list( - self, metric_name, service_name=None, ordering="Desc", max_results=0, continuation_token=None, custom_headers=None, raw=False, **operation_config): - """Gets ordered list of partitions. - - Retrieves partitions which are most/least loaded according to specified - metric. - - :param metric_name: Name of the metric based on which to get ordered - list of partitions. - :type metric_name: str - :param service_name: The name of a service. - :type service_name: str - :param ordering: Ordering of partitions' load. Possible values - include: 'Desc', 'Asc' - :type ordering: str or ~azure.servicefabric.models.Ordering - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: LoadedPartitionInformationResultList or ClientRawResponse if - raw=true - :rtype: - ~azure.servicefabric.models.LoadedPartitionInformationResultList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "8.0" - - # Construct URL - url = self.get_loaded_partition_info_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['MetricName'] = self._serialize.query("metric_name", metric_name, 'str') - if service_name is not None: - query_parameters['ServiceName'] = self._serialize.query("service_name", service_name, 'str') - if ordering is not None: - query_parameters['Ordering'] = self._serialize.query("ordering", ordering, 'str') - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('LoadedPartitionInformationResultList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_loaded_partition_info_list.metadata = {'url': '/$/GetLoadedPartitionInfoList'} - - def get_partition_info_list( - self, service_id, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the list of partitions of a Service Fabric service. - - The response includes the partition ID, partitioning scheme - information, keys supported by the partition, status, health, and other - details about the partition. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedServicePartitionInfoList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedServicePartitionInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partition_info_list.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedServicePartitionInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_info_list.metadata = {'url': '/Services/{serviceId}/$/GetPartitions'} - - def get_partition_info( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the information about a Service Fabric partition. - - Gets the information about the specified partition. The response - includes the partition ID, partitioning scheme information, keys - supported by the partition, status, health, and other details about the - partition. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServicePartitionInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServicePartitionInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_partition_info.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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 == 200: - deserialized = self._deserialize('ServicePartitionInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_info.metadata = {'url': '/Partitions/{partitionId}'} - - def get_service_name_info( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the name of the Service Fabric service for a partition. - - Gets name of the service for the specified partition. A 404 error is - returned if the partition ID does not exist in the cluster. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ServiceNameInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ServiceNameInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_service_name_info.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ServiceNameInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_name_info.metadata = {'url': '/Partitions/{partitionId}/$/GetServiceName'} - - def get_partition_health( - self, partition_id, events_health_state_filter=0, replicas_health_state_filter=0, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the health of the specified Service Fabric partition. - - Use EventsHealthStateFilter to filter the collection of health events - reported on the service based on the health state. - Use ReplicasHealthStateFilter to filter the collection of - ReplicaHealthState objects on the partition. - If you specify a partition that does not exist in the health store, - this request returns an error. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param replicas_health_state_filter: Allows filtering the collection - of ReplicaHealthState objects on the partition. The value can be - obtained from members or bitwise operations on members of - HealthStateFilter. Only replicas that match the filter will be - returned. All replicas will be used to evaluate the aggregated health - state. If not specified, all entries will be returned.The state values - are flag-based enumeration, so the value could be a combination of - these values obtained using bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) will be returned. The possible values for this - parameter include integer value of one of the following health states. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type replicas_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PartitionHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PartitionHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_partition_health.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if replicas_health_state_filter is not None: - query_parameters['ReplicasHealthStateFilter'] = self._serialize.query("replicas_health_state_filter", replicas_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PartitionHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_health.metadata = {'url': '/Partitions/{partitionId}/$/GetHealth'} - - def get_partition_health_using_policy( - self, partition_id, events_health_state_filter=0, replicas_health_state_filter=0, application_health_policy=None, exclude_health_statistics=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the health of the specified Service Fabric partition, by using the - specified health policy. - - Gets the health information of the specified partition. - If the application health policy is specified, the health evaluation - uses it to get the aggregated health state. - If the policy is not specified, the health evaluation uses the - application health policy defined in the application manifest, or the - default health policy, if no policy is defined in the manifest. - Use EventsHealthStateFilter to filter the collection of health events - reported on the partition based on the health state. - Use ReplicasHealthStateFilter to filter the collection of - ReplicaHealthState objects on the partition. Use - ApplicationHealthPolicy in the POST body to override the health - policies used to evaluate the health. - If you specify a partition that does not exist in the health store, - this request returns an error. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param replicas_health_state_filter: Allows filtering the collection - of ReplicaHealthState objects on the partition. The value can be - obtained from members or bitwise operations on members of - HealthStateFilter. Only replicas that match the filter will be - returned. All replicas will be used to evaluate the aggregated health - state. If not specified, all entries will be returned.The state values - are flag-based enumeration, so the value could be a combination of - these values obtained using bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) will be returned. The possible values for this - parameter include integer value of one of the following health states. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type replicas_health_state_filter: int - :param application_health_policy: Describes the health policies used - to evaluate the health of an application or one of its children. - If not present, the health evaluation uses the health policy from - application manifest or the default health policy. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param exclude_health_statistics: Indicates whether the health - statistics should be returned as part of the query result. False by - default. - The statistics show the number of children entities in health state - Ok, Warning, and Error. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PartitionHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PartitionHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_partition_health_using_policy.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if replicas_health_state_filter is not None: - query_parameters['ReplicasHealthStateFilter'] = self._serialize.query("replicas_health_state_filter", replicas_health_state_filter, 'int') - if exclude_health_statistics is not None: - query_parameters['ExcludeHealthStatistics'] = self._serialize.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('PartitionHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_health_using_policy.metadata = {'url': '/Partitions/{partitionId}/$/GetHealth'} - - def report_partition_health( - self, partition_id, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Sends a health report on the Service Fabric partition. - - Reports health state of the specified Service Fabric partition. The - report must contain the information about the source of the health - report and property on which it is reported. - The report is sent to a Service Fabric gateway Partition, which - forwards to the health store. - The report may be accepted by the gateway, but rejected by the health - store after extra validation. - For example, the health store may reject the report because of an - invalid parameter, like a stale sequence number. - To see whether the report was applied in the health store, run - GetPartitionHealth and check that the report appears in the - HealthEvents section. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param health_information: Describes the health information for the - health report. This information needs to be present in all of the - health reports sent to the health manager. - :type health_information: - ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be - sent immediately. - A health report is sent to a Service Fabric gateway Application, which - forwards to the health store. - If Immediate is set to true, the report is sent immediately from HTTP - Gateway to the health store, regardless of the fabric client settings - that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as - possible. - Depending on timing and other conditions, sending the report may still - fail, for example if the HTTP Gateway is closed or the message doesn't - reach the Gateway. - If Immediate is set to false, the report is sent based on the health - client settings from the HTTP Gateway. Therefore, it will be batched - according to the HealthReportSendInterval configuration. - This is the recommended setting because it allows the health client to - optimize health reporting messages to health store as well as health - report processing. - By default, reports are not sent immediately. - :type immediate: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.report_partition_health.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - report_partition_health.metadata = {'url': '/Partitions/{partitionId}/$/ReportHealth'} - - def get_partition_load_information( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the load information of the specified Service Fabric partition. - - Returns information about the load of a specified partition. - The response includes a list of load reports for a Service Fabric - partition. - Each report includes the load metric name, value, and last reported - time in UTC. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PartitionLoadInformation or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PartitionLoadInformation or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_partition_load_information.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PartitionLoadInformation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_load_information.metadata = {'url': '/Partitions/{partitionId}/$/GetLoadInformation'} - - def reset_partition_load( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Resets the current load of a Service Fabric partition. - - Resets the current load of a Service Fabric partition to the default - load for the service. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.reset_partition_load.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - reset_partition_load.metadata = {'url': '/Partitions/{partitionId}/$/ResetLoad'} - - def recover_partition( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Indicates to the Service Fabric cluster that it should attempt to - recover a specific partition that is currently stuck in quorum loss. - - This operation should only be performed if it is known that the - replicas that are down cannot be recovered. Incorrect use of this API - can cause potential data loss. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.recover_partition.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_partition.metadata = {'url': '/Partitions/{partitionId}/$/Recover'} - - def recover_service_partitions( - self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Indicates to the Service Fabric cluster that it should attempt to - recover the specified service that is currently stuck in quorum loss. - - Indicates to the Service Fabric cluster that it should attempt to - recover the specified service that is currently stuck in quorum loss. - This operation should only be performed if it is known that the - replicas that are down cannot be recovered. Incorrect use of this API - can cause potential data loss. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.recover_service_partitions.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_service_partitions.metadata = {'url': '/Services/$/{serviceId}/$/GetPartitions/$/Recover'} - - def recover_system_partitions( - self, timeout=60, custom_headers=None, raw=False, **operation_config): - """Indicates to the Service Fabric cluster that it should attempt to - recover the system services that are currently stuck in quorum loss. - - Indicates to the Service Fabric cluster that it should attempt to - recover the system services that are currently stuck in quorum loss. - This operation should only be performed if it is known that the - replicas that are down cannot be recovered. Incorrect use of this API - can cause potential data loss. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.recover_system_partitions.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_system_partitions.metadata = {'url': '/$/RecoverSystemPartitions'} - - def recover_all_partitions( - self, timeout=60, custom_headers=None, raw=False, **operation_config): - """Indicates to the Service Fabric cluster that it should attempt to - recover any services (including system services) which are currently - stuck in quorum loss. - - This operation should only be performed if it is known that the - replicas that are down cannot be recovered. Incorrect use of this API - can cause potential data loss. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.recover_all_partitions.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - recover_all_partitions.metadata = {'url': '/$/RecoverAllPartitions'} - - def move_primary_replica( - self, partition_id, node_name=None, ignore_constraints=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Moves the primary replica of a partition of a stateful service. - - This command moves the primary replica of a partition of a stateful - service, respecting all constraints. - If NodeName parameter is specified, primary will be moved to the - specified node (if constraints allow it). - If NodeName parameter is not specified, primary replica will be moved - to a random node in the cluster. - If IgnoreConstraints parameter is specified and set to true, then - primary will be moved regardless of the constraints. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param node_name: The name of the node. - :type node_name: str - :param ignore_constraints: Ignore constraints when moving a replica or - instance. If this parameter is not specified, all constraints are - honored. - :type ignore_constraints: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.5" - - # Construct URL - url = self.move_primary_replica.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if node_name is not None: - query_parameters['NodeName'] = self._serialize.query("node_name", node_name, 'str') - if ignore_constraints is not None: - query_parameters['IgnoreConstraints'] = self._serialize.query("ignore_constraints", ignore_constraints, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - move_primary_replica.metadata = {'url': '/Partitions/{partitionId}/$/MovePrimaryReplica'} - - def move_secondary_replica( - self, partition_id, current_node_name, new_node_name=None, ignore_constraints=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Moves the secondary replica of a partition of a stateful service. - - This command moves the secondary replica of a partition of a stateful - service, respecting all constraints. - CurrentNodeName parameter must be specified to identify the replica - that is moved. - Source node name must be specified, but new node name can be omitted, - and in that case replica is moved to a random node. - If IgnoreConstraints parameter is specified and set to true, then - secondary will be moved regardless of the constraints. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param current_node_name: The name of the source node for secondary - replica move. - :type current_node_name: str - :param new_node_name: The name of the target node for secondary - replica or instance move. If not specified, replica or instance is - moved to a random node. - :type new_node_name: str - :param ignore_constraints: Ignore constraints when moving a replica or - instance. If this parameter is not specified, all constraints are - honored. - :type ignore_constraints: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.5" - - # Construct URL - url = self.move_secondary_replica.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['CurrentNodeName'] = self._serialize.query("current_node_name", current_node_name, 'str') - if new_node_name is not None: - query_parameters['NewNodeName'] = self._serialize.query("new_node_name", new_node_name, 'str') - if ignore_constraints is not None: - query_parameters['IgnoreConstraints'] = self._serialize.query("ignore_constraints", ignore_constraints, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - move_secondary_replica.metadata = {'url': '/Partitions/{partitionId}/$/MoveSecondaryReplica'} - - def update_partition_load( - self, partition_metric_load_description_list, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): - """Update the loads of provided partitions for specific metrics. - - Updates the load value and predicted load value for all the partitions - provided for specified metrics. - - :param partition_metric_load_description_list: Description of updating - load for list of partitions. - :type partition_metric_load_description_list: - list[~azure.servicefabric.models.PartitionMetricLoadDescription] - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedUpdatePartitionLoadResultList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedUpdatePartitionLoadResultList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "7.2" - - # Construct URL - url = self.update_partition_load.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(partition_metric_load_description_list, '[PartitionMetricLoadDescription]') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('PagedUpdatePartitionLoadResultList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_partition_load.metadata = {'url': '/$/UpdatePartitionLoad'} - - def move_instance( - self, service_id, partition_id, current_node_name=None, new_node_name=None, ignore_constraints=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Moves the instance of a partition of a stateless service. - - This command moves the instance of a partition of a stateless service, - respecting all constraints. - Partition id and service name must be specified to be able to move the - instance. - CurrentNodeName when specified identifies the instance that is moved. - If not specified, random instance will be moved - New node name can be omitted, and in that case instance is moved to a - random node. - If IgnoreConstraints parameter is specified and set to true, then - instance will be moved regardless of the constraints. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param current_node_name: The name of the source node for instance - move. If not specified, instance is moved from a random node. - :type current_node_name: str - :param new_node_name: The name of the target node for secondary - replica or instance move. If not specified, replica or instance is - moved to a random node. - :type new_node_name: str - :param ignore_constraints: Ignore constraints when moving a replica or - instance. If this parameter is not specified, all constraints are - honored. - :type ignore_constraints: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "8.0" - - # Construct URL - url = self.move_instance.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if current_node_name is not None: - query_parameters['CurrentNodeName'] = self._serialize.query("current_node_name", current_node_name, 'str') - if new_node_name is not None: - query_parameters['NewNodeName'] = self._serialize.query("new_node_name", new_node_name, 'str') - if ignore_constraints is not None: - query_parameters['IgnoreConstraints'] = self._serialize.query("ignore_constraints", ignore_constraints, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - move_instance.metadata = {'url': '/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveInstance'} - - def move_auxiliary_replica( - self, service_id, partition_id, current_node_name=None, new_node_name=None, ignore_constraints=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Moves the auxiliary replica of a partition of a stateful service. - - This command moves the auxiliary replica of a partition of a stateful - service, respecting all constraints. - CurrentNodeName can be omitted, and in that case a random auxiliary - replica is chosen. - NewNodeName can be omitted, and in that case the auxiliary replica is - moved to a random node. - If IgnoreConstraints parameter is specified and set to true, then - auxiliary will be moved regardless of the constraints. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param current_node_name: The name of the source node for instance - move. If not specified, instance is moved from a random node. - :type current_node_name: str - :param new_node_name: The name of the target node for secondary - replica or instance move. If not specified, replica or instance is - moved to a random node. - :type new_node_name: str - :param ignore_constraints: Ignore constraints when moving a replica or - instance. If this parameter is not specified, all constraints are - honored. - :type ignore_constraints: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "8.1" - - # Construct URL - url = self.move_auxiliary_replica.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if current_node_name is not None: - query_parameters['CurrentNodeName'] = self._serialize.query("current_node_name", current_node_name, 'str') - if new_node_name is not None: - query_parameters['NewNodeName'] = self._serialize.query("new_node_name", new_node_name, 'str') - if ignore_constraints is not None: - query_parameters['IgnoreConstraints'] = self._serialize.query("ignore_constraints", ignore_constraints, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - move_auxiliary_replica.metadata = {'url': '/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveAuxiliaryReplica'} - - def create_repair_task( - self, repair_task, custom_headers=None, raw=False, **operation_config): - """Creates a new repair task. - - For clusters that have the Repair Manager Service configured, - this API provides a way to create repair tasks that run automatically - or manually. - For repair tasks that run automatically, an appropriate repair executor - must be running for each repair action to run automatically. - These are currently only available in specially-configured Azure Cloud - Services. - To create a manual repair task, provide the set of impacted node names - and the - expected impact. When the state of the created repair task changes to - approved, - you can safely perform repair actions on those nodes. - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param repair_task: Describes the repair task to be created or - updated. - :type repair_task: ~azure.servicefabric.models.RepairTask - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RepairTaskUpdateInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.create_repair_task.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(repair_task, 'RepairTask') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('RepairTaskUpdateInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_repair_task.metadata = {'url': '/$/CreateRepairTask'} - - def cancel_repair_task( - self, repair_task_cancel_description, custom_headers=None, raw=False, **operation_config): - """Requests the cancellation of the given repair task. - - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param repair_task_cancel_description: Describes the repair task to be - cancelled. - :type repair_task_cancel_description: - ~azure.servicefabric.models.RepairTaskCancelDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RepairTaskUpdateInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.cancel_repair_task.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(repair_task_cancel_description, 'RepairTaskCancelDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('RepairTaskUpdateInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - cancel_repair_task.metadata = {'url': '/$/CancelRepairTask'} - - def delete_repair_task( - self, task_id, version=None, custom_headers=None, raw=False, **operation_config): - """Deletes a completed repair task. - - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param task_id: The ID of the completed repair task to be deleted. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current version of the repair task. If zero, then no version - check is performed. - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - repair_task_delete_description = models.RepairTaskDeleteDescription(task_id=task_id, version=version) - - api_version = "6.0" - - # Construct URL - url = self.delete_repair_task.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(repair_task_delete_description, 'RepairTaskDeleteDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_repair_task.metadata = {'url': '/$/DeleteRepairTask'} - - def get_repair_task_list( - self, task_id_filter=None, state_filter=None, executor_filter=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of repair tasks matching the given filters. - - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param task_id_filter: The repair task ID prefix to be matched. - :type task_id_filter: str - :param state_filter: A bitwise-OR of the following values, specifying - which task states should be included in the result list. - - 1 - Created - - 2 - Claimed - - 4 - Preparing - - 8 - Approved - - 16 - Executing - - 32 - Restoring - - 64 - Completed - :type state_filter: int - :param executor_filter: The name of the repair executor whose claimed - tasks should be included in the list. - :type executor_filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.RepairTask] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_repair_task_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if task_id_filter is not None: - query_parameters['TaskIdFilter'] = self._serialize.query("task_id_filter", task_id_filter, 'str') - if state_filter is not None: - query_parameters['StateFilter'] = self._serialize.query("state_filter", state_filter, 'int') - if executor_filter is not None: - query_parameters['ExecutorFilter'] = self._serialize.query("executor_filter", executor_filter, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[RepairTask]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_repair_task_list.metadata = {'url': '/$/GetRepairTaskList'} - - def force_approve_repair_task( - self, task_id, version=None, custom_headers=None, raw=False, **operation_config): - """Forces the approval of the given repair task. - - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param task_id: The ID of the repair task. - :type task_id: str - :param version: The current version number of the repair task. If - non-zero, then the request will only succeed if this value matches the - actual current version of the repair task. If zero, then no version - check is performed. - :type version: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RepairTaskUpdateInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - repair_task_approve_description = models.RepairTaskApproveDescription(task_id=task_id, version=version) - - api_version = "6.0" - - # Construct URL - url = self.force_approve_repair_task.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(repair_task_approve_description, 'RepairTaskApproveDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('RepairTaskUpdateInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - force_approve_repair_task.metadata = {'url': '/$/ForceApproveRepairTask'} - - def update_repair_task_health_policy( - self, repair_task_update_health_policy_description, custom_headers=None, raw=False, **operation_config): - """Updates the health policy of the given repair task. - - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param repair_task_update_health_policy_description: Describes the - repair task healthy policy to be updated. - :type repair_task_update_health_policy_description: - ~azure.servicefabric.models.RepairTaskUpdateHealthPolicyDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RepairTaskUpdateInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.update_repair_task_health_policy.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(repair_task_update_health_policy_description, 'RepairTaskUpdateHealthPolicyDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('RepairTaskUpdateInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_repair_task_health_policy.metadata = {'url': '/$/UpdateRepairTaskHealthPolicy'} - - def update_repair_execution_state( - self, repair_task, custom_headers=None, raw=False, **operation_config): - """Updates the execution state of a repair task. - - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param repair_task: Describes the repair task to be created or - updated. - :type repair_task: ~azure.servicefabric.models.RepairTask - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RepairTaskUpdateInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.update_repair_execution_state.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(repair_task, 'RepairTask') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('RepairTaskUpdateInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_repair_execution_state.metadata = {'url': '/$/UpdateRepairExecutionState'} - - def get_replica_info_list( - self, partition_id, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the information about replicas of a Service Fabric service - partition. - - The GetReplicas endpoint returns information about the replicas of the - specified partition. The response includes the ID, role, status, - health, node name, uptime, and other details about the replica. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedReplicaInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedReplicaInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_replica_info_list.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedReplicaInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_replica_info_list.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas'} - - def get_replica_info( - self, partition_id, replica_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the information about a replica of a Service Fabric partition. - - The response includes the ID, role, status, health, node name, uptime, - and other details about the replica. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ReplicaInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ReplicaInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_replica_info.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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 == 200: - deserialized = self._deserialize('ReplicaInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_replica_info.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas/{replicaId}'} - - def get_replica_health( - self, partition_id, replica_id, events_health_state_filter=0, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric stateful service replica or - stateless service instance. - - Gets the health of a Service Fabric replica. - Use EventsHealthStateFilter to filter the collection of health events - reported on the replica based on the health state. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ReplicaHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ReplicaHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_replica_health.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ReplicaHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_replica_health.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth'} - - def get_replica_health_using_policy( - self, partition_id, replica_id, events_health_state_filter=0, application_health_policy=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the health of a Service Fabric stateful service replica or - stateless service instance using the specified policy. - - Gets the health of a Service Fabric stateful service replica or - stateless service instance. - Use EventsHealthStateFilter to filter the collection of health events - reported on the cluster based on the health state. - Use ApplicationHealthPolicy to optionally override the health policies - used to evaluate the health. This API only uses - 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest - of the fields are ignored while evaluating the health of the replica. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param application_health_policy: Describes the health policies used - to evaluate the health of an application or one of its children. - If not present, the health evaluation uses the health policy from - application manifest or the default health policy. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ReplicaHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ReplicaHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_replica_health_using_policy.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('ReplicaHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_replica_health_using_policy.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth'} - - def report_replica_health( - self, partition_id, replica_id, health_information, service_kind="Stateful", immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Sends a health report on the Service Fabric replica. - - Reports health state of the specified Service Fabric replica. The - report must contain the information about the source of the health - report and property on which it is reported. - The report is sent to a Service Fabric gateway Replica, which forwards - to the health store. - The report may be accepted by the gateway, but rejected by the health - store after extra validation. - For example, the health store may reject the report because of an - invalid parameter, like a stale sequence number. - To see whether the report was applied in the health store, run - GetReplicaHealth and check that the report appears in the HealthEvents - section. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param service_kind: The kind of service replica (Stateless or - Stateful) for which the health is being reported. Following are the - possible values. Possible values include: 'Stateless', 'Stateful' - :type service_kind: str or - ~azure.servicefabric.models.ReplicaHealthReportServiceKind - :param health_information: Describes the health information for the - health report. This information needs to be present in all of the - health reports sent to the health manager. - :type health_information: - ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be - sent immediately. - A health report is sent to a Service Fabric gateway Application, which - forwards to the health store. - If Immediate is set to true, the report is sent immediately from HTTP - Gateway to the health store, regardless of the fabric client settings - that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as - possible. - Depending on timing and other conditions, sending the report may still - fail, for example if the HTTP Gateway is closed or the message doesn't - reach the Gateway. - If Immediate is set to false, the report is sent based on the health - client settings from the HTTP Gateway. Therefore, it will be batched - according to the HealthReportSendInterval configuration. - This is the recommended setting because it allows the health client to - optimize health reporting messages to health store as well as health - report processing. - By default, reports are not sent immediately. - :type immediate: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.report_replica_health.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ServiceKind'] = self._serialize.query("service_kind", service_kind, 'str') - if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - report_replica_health.metadata = {'url': '/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/ReportHealth'} - - def get_deployed_service_replica_info_list( - self, node_name, application_id, partition_id=None, service_manifest_name=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the list of replicas deployed on a Service Fabric node. - - Gets the list containing the information about replicas deployed on a - Service Fabric node. The information include partition ID, replica ID, - status of the replica, name of the service, name of the service type, - and other information. Use PartitionId or ServiceManifestName query - parameters to return information about the deployed replicas matching - the specified values for those parameters. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param service_manifest_name: The name of a service manifest - registered as part of an application type in a Service Fabric cluster. - :type service_manifest_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.DeployedServiceReplicaInfo] - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_replica_info_list.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if partition_id is not None: - query_parameters['PartitionId'] = self._serialize.query("partition_id", partition_id, 'str') - if service_manifest_name is not None: - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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 == 200: - deserialized = self._deserialize('[DeployedServiceReplicaInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_replica_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetReplicas'} - - def get_deployed_service_replica_detail_info( - self, node_name, partition_id, replica_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the details of replica deployed on a Service Fabric node. - - Gets the details of the replica deployed on a Service Fabric node. The - information includes service kind, service name, current service - operation, current service operation start date time, partition ID, - replica/instance ID, reported load, and other information. - - :param node_name: The name of the node. - :type node_name: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeployedServiceReplicaDetailInfo or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.DeployedServiceReplicaDetailInfo - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_replica_detail_info.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('DeployedServiceReplicaDetailInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_replica_detail_info.metadata = {'url': '/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetDetail'} - - def get_deployed_service_replica_detail_info_by_partition_id( - self, node_name, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the details of replica deployed on a Service Fabric node. - - Gets the details of the replica deployed on a Service Fabric node. The - information includes service kind, service name, current service - operation, current service operation start date time, partition ID, - replica/instance ID, reported load, and other information. - - :param node_name: The name of the node. - :type node_name: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeployedServiceReplicaDetailInfo or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.DeployedServiceReplicaDetailInfo - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_replica_detail_info_by_partition_id.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('DeployedServiceReplicaDetailInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_replica_detail_info_by_partition_id.metadata = {'url': '/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas'} - - def restart_replica( - self, node_name, partition_id, replica_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Restarts a service replica of a persisted service running on a node. - - Restarts a service replica of a persisted service running on a node. - Warning - There are no safety checks performed when this API is used. - Incorrect use of this API can lead to availability loss for stateful - services. - - :param node_name: The name of the node. - :type node_name: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.restart_replica.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_replica.metadata = {'url': '/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Restart'} - - def remove_replica( - self, node_name, partition_id, replica_id, force_remove=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Removes a service replica running on a node. - - This API simulates a Service Fabric replica failure by removing a - replica from a Service Fabric cluster. The removal closes the replica, - transitions the replica to the role None, and then removes all of the - state information of the replica from the cluster. This API tests the - replica state removal path, and simulates the report fault permanent - path through client APIs. Warning - There are no safety checks - performed when this API is used. Incorrect use of this API can lead to - data loss for stateful services. In addition, the forceRemove flag - impacts all other replicas hosted in the same process. - - :param node_name: The name of the node. - :type node_name: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param force_remove: Remove a Service Fabric application or service - forcefully without going through the graceful shutdown sequence. This - parameter can be used to forcefully delete an application or service - for which delete is timing out due to issues in the service code that - prevents graceful close of replicas. - :type force_remove: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.remove_replica.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if force_remove is not None: - query_parameters['ForceRemove'] = self._serialize.query("force_remove", force_remove, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - remove_replica.metadata = {'url': '/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Delete'} - - def get_deployed_service_package_info_list( - self, node_name, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the list of service packages deployed on a Service Fabric node. - - Returns the information about the service packages deployed on a - Service Fabric node for the given application. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.DeployedServicePackageInfo] - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_package_info_list.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[DeployedServicePackageInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_package_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages'} - - def get_deployed_service_package_info_list_by_name( - self, node_name, application_id, service_package_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the list of service packages deployed on a Service Fabric node - matching exactly the specified name. - - Returns the information about the service packages deployed on a - Service Fabric node for the given application. These results are of - service packages whose name match exactly the service package name - specified as the parameter. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_package_name: The name of the service package. - :type service_package_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.DeployedServicePackageInfo] - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_package_info_list_by_name.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'servicePackageName': self._serialize.url("service_package_name", service_package_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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 == 200: - deserialized = self._deserialize('[DeployedServicePackageInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_package_info_list_by_name.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}'} - - def get_deployed_service_package_health( - self, node_name, application_id, service_package_name, events_health_state_filter=0, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the information about health of a service package for a specific - application deployed for a Service Fabric node and application. - - Gets the information about health of a service package for a specific - application deployed on a Service Fabric node. Use - EventsHealthStateFilter to optionally filter for the collection of - HealthEvent objects reported on the deployed service package based on - health state. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_package_name: The name of the service package. - :type service_package_name: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeployedServicePackageHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.DeployedServicePackageHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_package_health.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'servicePackageName': self._serialize.url("service_package_name", service_package_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('DeployedServicePackageHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_package_health.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth'} - - def get_deployed_service_package_health_using_policy( - self, node_name, application_id, service_package_name, events_health_state_filter=0, application_health_policy=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the information about health of service package for a specific - application deployed on a Service Fabric node using the specified - policy. - - Gets the information about health of a service package for a specific - application deployed on a Service Fabric node. using the specified - policy. Use EventsHealthStateFilter to optionally filter for the - collection of HealthEvent objects reported on the deployed service - package based on health state. Use ApplicationHealthPolicy to - optionally override the health policies used to evaluate the health. - This API only uses 'ConsiderWarningAsError' field of the - ApplicationHealthPolicy. The rest of the fields are ignored while - evaluating the health of the deployed service package. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_package_name: The name of the service package. - :type service_package_name: str - :param events_health_state_filter: Allows filtering the collection of - HealthEvent objects returned based on health state. - The possible values for this parameter include integer value of one of - the following health states. - Only events that match the filter are returned. All events are used to - evaluate the aggregated health state. - If not specified, all entries are returned. The state values are - flag-based enumeration, so the value could be a combination of these - values, obtained using the bitwise 'OR' operator. For example, If the - provided value is 6 then all of the events with HealthState value of - OK (2) and Warning (4) are returned. - - Default - Default value. Matches any HealthState. The value is zero. - - None - Filter that doesn't match any HealthState value. Used in - order to return no results on a given collection of states. The value - is 1. - - Ok - Filter that matches input with HealthState value Ok. The value - is 2. - - Warning - Filter that matches input with HealthState value Warning. - The value is 4. - - Error - Filter that matches input with HealthState value Error. The - value is 8. - - All - Filter that matches input with any HealthState value. The - value is 65535. - :type events_health_state_filter: int - :param application_health_policy: Describes the health policies used - to evaluate the health of an application or one of its children. - If not present, the health evaluation uses the health policy from - application manifest or the default health policy. - :type application_health_policy: - ~azure.servicefabric.models.ApplicationHealthPolicy - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DeployedServicePackageHealth or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.DeployedServicePackageHealth or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_service_package_health_using_policy.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'servicePackageName': self._serialize.url("service_package_name", service_package_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - query_parameters['EventsHealthStateFilter'] = self._serialize.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if application_health_policy is not None: - body_content = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('DeployedServicePackageHealth', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_service_package_health_using_policy.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth'} - - def report_deployed_service_package_health( - self, node_name, application_id, service_package_name, health_information, immediate=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Sends a health report on the Service Fabric deployed service package. - - Reports health state of the service package of the application deployed - on a Service Fabric node. The report must contain the information about - the source of the health report and property on which it is reported. - The report is sent to a Service Fabric gateway Service, which forwards - to the health store. - The report may be accepted by the gateway, but rejected by the health - store after extra validation. - For example, the health store may reject the report because of an - invalid parameter, like a stale sequence number. - To see whether the report was applied in the health store, get deployed - service package health and check that the report appears in the - HealthEvents section. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_package_name: The name of the service package. - :type service_package_name: str - :param health_information: Describes the health information for the - health report. This information needs to be present in all of the - health reports sent to the health manager. - :type health_information: - ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be - sent immediately. - A health report is sent to a Service Fabric gateway Application, which - forwards to the health store. - If Immediate is set to true, the report is sent immediately from HTTP - Gateway to the health store, regardless of the fabric client settings - that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as - possible. - Depending on timing and other conditions, sending the report may still - fail, for example if the HTTP Gateway is closed or the message doesn't - reach the Gateway. - If Immediate is set to false, the report is sent based on the health - client settings from the HTTP Gateway. Therefore, it will be batched - according to the HealthReportSendInterval configuration. - This is the recommended setting because it allows the health client to - optimize health reporting messages to health store as well as health - report processing. - By default, reports are not sent immediately. - :type immediate: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.report_deployed_service_package_health.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True), - 'servicePackageName': self._serialize.url("service_package_name", service_package_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if immediate is not None: - query_parameters['Immediate'] = self._serialize.query("immediate", immediate, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(health_information, 'HealthInformation') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - report_deployed_service_package_health.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/ReportHealth'} - - def deploy_service_package_to_node( - self, node_name, deploy_service_package_to_node_description, timeout=60, custom_headers=None, raw=False, **operation_config): - """Downloads all of the code packages associated with specified service - manifest on the specified node. - - This API provides a way to download code packages including the - container images on a specific node outside of the normal application - deployment and upgrade path. This is useful for the large code packages - and container images to be present on the node before the actual - application deployment and upgrade, thus significantly reducing the - total time required for the deployment or upgrade. - - :param node_name: The name of the node. - :type node_name: str - :param deploy_service_package_to_node_description: Describes - information for deploying a service package to a Service Fabric node. - :type deploy_service_package_to_node_description: - ~azure.servicefabric.models.DeployServicePackageToNodeDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.deploy_service_package_to_node.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(deploy_service_package_to_node_description, 'DeployServicePackageToNodeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - deploy_service_package_to_node.metadata = {'url': '/Nodes/{nodeName}/$/DeployServicePackage'} - - def get_deployed_code_package_info_list( - self, node_name, application_id, service_manifest_name=None, code_package_name=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the list of code packages deployed on a Service Fabric node. - - Gets the list of code packages deployed on a Service Fabric node for - the given application. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_manifest_name: The name of a service manifest - registered as part of an application type in a Service Fabric cluster. - :type service_manifest_name: str - :param code_package_name: The name of code package specified in - service manifest registered as part of an application type in a - Service Fabric cluster. - :type code_package_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.DeployedCodePackageInfo] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_deployed_code_package_info_list.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if service_manifest_name is not None: - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') - if code_package_name is not None: - query_parameters['CodePackageName'] = self._serialize.query("code_package_name", code_package_name, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[DeployedCodePackageInfo]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_deployed_code_package_info_list.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages'} - - def restart_deployed_code_package( - self, node_name, application_id, restart_deployed_code_package_description, timeout=60, custom_headers=None, raw=False, **operation_config): - """Restarts a code package deployed on a Service Fabric node in a cluster. - - Restarts a code package deployed on a Service Fabric node in a cluster. - This aborts the code package process, which will restart all the user - service replicas hosted in that process. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param restart_deployed_code_package_description: Describes the - deployed code package on Service Fabric node to restart. - :type restart_deployed_code_package_description: - ~azure.servicefabric.models.RestartDeployedCodePackageDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.restart_deployed_code_package.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restart_deployed_code_package_description, 'RestartDeployedCodePackageDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_deployed_code_package.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/Restart'} - - def get_container_logs_deployed_on_node( - self, node_name, application_id, service_manifest_name, code_package_name, tail=None, previous=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the container logs for container deployed on a Service Fabric - node. - - Gets the container logs for container deployed on a Service Fabric node - for the given code package. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_manifest_name: The name of a service manifest - registered as part of an application type in a Service Fabric cluster. - :type service_manifest_name: str - :param code_package_name: The name of code package specified in - service manifest registered as part of an application type in a - Service Fabric cluster. - :type code_package_name: str - :param tail: Number of lines to show from the end of the logs. Default - is 100. 'all' to show the complete logs. - :type tail: str - :param previous: Specifies whether to get container logs from - exited/dead containers of the code package instance. - :type previous: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContainerLogs or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ContainerLogs or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.2" - - # Construct URL - url = self.get_container_logs_deployed_on_node.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') - query_parameters['CodePackageName'] = self._serialize.query("code_package_name", code_package_name, 'str') - if tail is not None: - query_parameters['Tail'] = self._serialize.query("tail", tail, 'str') - if previous is not None: - query_parameters['Previous'] = self._serialize.query("previous", previous, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ContainerLogs', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_container_logs_deployed_on_node.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerLogs'} - - def invoke_container_api( - self, node_name, application_id, service_manifest_name, code_package_name, code_package_instance_id, container_api_request_body, timeout=60, custom_headers=None, raw=False, **operation_config): - """Invoke container API on a container deployed on a Service Fabric node. - - Invoke container API on a container deployed on a Service Fabric node - for the given code package. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param service_manifest_name: The name of a service manifest - registered as part of an application type in a Service Fabric cluster. - :type service_manifest_name: str - :param code_package_name: The name of code package specified in - service manifest registered as part of an application type in a - Service Fabric cluster. - :type code_package_name: str - :param code_package_instance_id: ID that uniquely identifies a code - package instance deployed on a service fabric node. - :type code_package_instance_id: str - :param container_api_request_body: Parameters for making container API - call - :type container_api_request_body: - ~azure.servicefabric.models.ContainerApiRequestBody - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ContainerApiResponse or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ContainerApiResponse or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.2" - - # Construct URL - url = self.invoke_container_api.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str'), - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['ServiceManifestName'] = self._serialize.query("service_manifest_name", service_manifest_name, 'str') - query_parameters['CodePackageName'] = self._serialize.query("code_package_name", code_package_name, 'str') - query_parameters['CodePackageInstanceId'] = self._serialize.query("code_package_instance_id", code_package_instance_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(container_api_request_body, 'ContainerApiRequestBody') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('ContainerApiResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - invoke_container_api.metadata = {'url': '/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerApi'} - - def create_compose_deployment( - self, create_compose_deployment_description, timeout=60, custom_headers=None, raw=False, **operation_config): - """Creates a Service Fabric compose deployment. - - Compose is a file format that describes multi-container applications. - This API allows deploying container based applications defined in - compose format in a Service Fabric cluster. Once the deployment is - created, its status can be tracked via the `GetComposeDeploymentStatus` - API. - - :param create_compose_deployment_description: Describes the compose - deployment that needs to be created. - :type create_compose_deployment_description: - ~azure.servicefabric.models.CreateComposeDeploymentDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0-preview" - - # Construct URL - url = self.create_compose_deployment.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(create_compose_deployment_description, 'CreateComposeDeploymentDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - create_compose_deployment.metadata = {'url': '/ComposeDeployments/$/Create'} - - def get_compose_deployment_status( - self, deployment_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets information about a Service Fabric compose deployment. - - Returns the status of the compose deployment that was created or in the - process of being created in the Service Fabric cluster and whose name - matches the one specified as the parameter. The response includes the - name, status, and other details about the deployment. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ComposeDeploymentStatusInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ComposeDeploymentStatusInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0-preview" - - # Construct URL - url = self.get_compose_deployment_status.metadata['url'] - path_format_arguments = { - 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ComposeDeploymentStatusInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_compose_deployment_status.metadata = {'url': '/ComposeDeployments/{deploymentName}'} - - def get_compose_deployment_status_list( - self, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the list of compose deployments created in the Service Fabric - cluster. - - Gets the status about the compose deployments that were created or in - the process of being created in the Service Fabric cluster. The - response includes the name, status, and other details about the compose - deployments. If the list of deployments do not fit in a page, one page - of results is returned as well as a continuation token, which can be - used to get the next page. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedComposeDeploymentStatusInfoList or ClientRawResponse if - raw=true - :rtype: - ~azure.servicefabric.models.PagedComposeDeploymentStatusInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0-preview" - - # Construct URL - url = self.get_compose_deployment_status_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedComposeDeploymentStatusInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_compose_deployment_status_list.metadata = {'url': '/ComposeDeployments'} - - def get_compose_deployment_upgrade_progress( - self, deployment_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets details for the latest upgrade performed on this Service Fabric - compose deployment. - - Returns the information about the state of the compose deployment - upgrade along with details to aid debugging application health issues. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ComposeDeploymentUpgradeProgressInfo or ClientRawResponse if - raw=true - :rtype: - ~azure.servicefabric.models.ComposeDeploymentUpgradeProgressInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0-preview" - - # Construct URL - url = self.get_compose_deployment_upgrade_progress.metadata['url'] - path_format_arguments = { - 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ComposeDeploymentUpgradeProgressInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_compose_deployment_upgrade_progress.metadata = {'url': '/ComposeDeployments/{deploymentName}/$/GetUpgradeProgress'} - - def remove_compose_deployment( - self, deployment_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Deletes an existing Service Fabric compose deployment from cluster. - - Deletes an existing Service Fabric compose deployment. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0-preview" - - # Construct URL - url = self.remove_compose_deployment.metadata['url'] - path_format_arguments = { - 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - remove_compose_deployment.metadata = {'url': '/ComposeDeployments/{deploymentName}/$/Delete'} - - def start_compose_deployment_upgrade( - self, deployment_name, compose_deployment_upgrade_description, timeout=60, custom_headers=None, raw=False, **operation_config): - """Starts upgrading a compose deployment in the Service Fabric cluster. - - Validates the supplied upgrade parameters and starts upgrading the - deployment if the parameters are valid. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param compose_deployment_upgrade_description: Parameters for - upgrading compose deployment. - :type compose_deployment_upgrade_description: - ~azure.servicefabric.models.ComposeDeploymentUpgradeDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0-preview" - - # Construct URL - url = self.start_compose_deployment_upgrade.metadata['url'] - path_format_arguments = { - 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(compose_deployment_upgrade_description, 'ComposeDeploymentUpgradeDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_compose_deployment_upgrade.metadata = {'url': '/ComposeDeployments/{deploymentName}/$/Upgrade'} - - def start_rollback_compose_deployment_upgrade( - self, deployment_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Starts rolling back a compose deployment upgrade in the Service Fabric - cluster. - - Rollback a service fabric compose deployment upgrade. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4-preview" - - # Construct URL - url = self.start_rollback_compose_deployment_upgrade.metadata['url'] - path_format_arguments = { - 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_rollback_compose_deployment_upgrade.metadata = {'url': '/ComposeDeployments/{deploymentName}/$/RollbackUpgrade'} - - def get_chaos( - self, timeout=60, custom_headers=None, raw=False, **operation_config): - """Get the status of Chaos. - - Get the status of Chaos indicating whether or not Chaos is running, the - Chaos parameters used for running Chaos and the status of the Chaos - Schedule. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Chaos or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.Chaos or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.2" - - # Construct URL - url = self.get_chaos.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('Chaos', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_chaos.metadata = {'url': '/Tools/Chaos'} - - def start_chaos( - self, chaos_parameters, timeout=60, custom_headers=None, raw=False, **operation_config): - """Starts Chaos in the cluster. - - If Chaos is not already running in the cluster, it starts Chaos with - the passed in Chaos parameters. - If Chaos is already running when this call is made, the call fails with - the error code FABRIC_E_CHAOS_ALREADY_RUNNING. - Refer to the article [Induce controlled Chaos in Service Fabric - clusters](https://docs.microsoft.com/azure/service-fabric/service-fabric-controlled-chaos) - for more details. - - :param chaos_parameters: Describes all the parameters to configure a - Chaos run. - :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.start_chaos.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(chaos_parameters, 'ChaosParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_chaos.metadata = {'url': '/Tools/Chaos/$/Start'} - - def stop_chaos( - self, timeout=60, custom_headers=None, raw=False, **operation_config): - """Stops Chaos if it is running in the cluster and put the Chaos Schedule - in a stopped state. - - Stops Chaos from executing new faults. In-flight faults will continue - to execute until they are complete. The current Chaos Schedule is put - into a stopped state. - Once a schedule is stopped, it will stay in the stopped state and not - be used to Chaos Schedule new runs of Chaos. A new Chaos Schedule must - be set in order to resume scheduling. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.stop_chaos.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - stop_chaos.metadata = {'url': '/Tools/Chaos/$/Stop'} - - def get_chaos_events( - self, continuation_token=None, start_time_utc=None, end_time_utc=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the next segment of the Chaos events based on the continuation - token or the time range. - - To get the next segment of the Chaos events, you can specify the - ContinuationToken. To get the start of a new segment of Chaos events, - you can specify the time range - through StartTimeUtc and EndTimeUtc. You cannot specify both the - ContinuationToken and the time range in the same call. - When there are more than 100 Chaos events, the Chaos events are - returned in multiple segments where a segment contains no more than 100 - Chaos events and to get the next segment you make a call to this API - with the continuation token. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param start_time_utc: The Windows file time representing the start - time of the time range for which a Chaos report is to be generated. - Consult [DateTime.ToFileTimeUtc - Method](https://msdn.microsoft.com/library/system.datetime.tofiletimeutc(v=vs.110).aspx) - for details. - :type start_time_utc: str - :param end_time_utc: The Windows file time representing the end time - of the time range for which a Chaos report is to be generated. Consult - [DateTime.ToFileTimeUtc - Method](https://msdn.microsoft.com/library/system.datetime.tofiletimeutc(v=vs.110).aspx) - for details. - :type end_time_utc: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ChaosEventsSegment or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ChaosEventsSegment or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.2" - - # Construct URL - url = self.get_chaos_events.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if start_time_utc is not None: - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - if end_time_utc is not None: - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ChaosEventsSegment', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_chaos_events.metadata = {'url': '/Tools/Chaos/Events'} - - def get_chaos_schedule( - self, timeout=60, custom_headers=None, raw=False, **operation_config): - """Get the Chaos Schedule defining when and how to run Chaos. - - Gets the version of the Chaos Schedule in use and the Chaos Schedule - that defines when and how to run Chaos. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ChaosScheduleDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ChaosScheduleDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.2" - - # Construct URL - url = self.get_chaos_schedule.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ChaosScheduleDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_chaos_schedule.metadata = {'url': '/Tools/Chaos/Schedule'} - - def post_chaos_schedule( - self, timeout=60, version=None, schedule=None, custom_headers=None, raw=False, **operation_config): - """Set the schedule used by Chaos. - - Chaos will automatically schedule runs based on the Chaos Schedule. - The Chaos Schedule will be updated if the provided version matches the - version on the server. - When updating the Chaos Schedule, the version on the server is - incremented by 1. - The version on the server will wrap back to 0 after reaching a large - number. - If Chaos is running when this call is made, the call will fail. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param version: The version number of the Schedule. - :type version: int - :param schedule: Defines the schedule used by Chaos. - :type schedule: ~azure.servicefabric.models.ChaosSchedule - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - chaos_schedule = models.ChaosScheduleDescription(version=version, schedule=schedule) - - api_version = "6.2" - - # Construct URL - url = self.post_chaos_schedule.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(chaos_schedule, 'ChaosScheduleDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - post_chaos_schedule.metadata = {'url': '/Tools/Chaos/Schedule'} - - def upload_file( - self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): - """Uploads contents of the file to the image store. - - Uploads contents of the file to the image store. Use this API if the - file is small enough to upload again if the connection fails. The - file's data needs to be added to the request body. The contents will be - uploaded to the specified path. Image store service uses a mark file to - indicate the availability of the folder. The mark file is an empty file - named "_.dir". The mark file is generated by the image store service - when all files in a folder are uploaded. When using File-by-File - approach to upload application package in REST, the image store service - isn't aware of the file hierarchy of the application package; you need - to create a mark file per folder and upload it last, to let the image - store service know that the folder is complete. - - :param content_path: Relative path to file or folder in the image - store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.upload_file.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - upload_file.metadata = {'url': '/ImageStore/{contentPath}'} - - def get_image_store_content( - self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the image store content information. - - Returns the information about the image store content at the specified - contentPath. The contentPath is relative to the root of the image - store. - - :param content_path: Relative path to file or folder in the image - store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ImageStoreContent or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ImageStoreContent or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.2" - - # Construct URL - url = self.get_image_store_content.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ImageStoreContent', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_image_store_content.metadata = {'url': '/ImageStore/{contentPath}'} - - def delete_image_store_content( - self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): - """Deletes existing image store content. - - Deletes existing image store content being found within the given image - store relative path. This command can be used to delete uploaded - application packages once they are provisioned. - - :param content_path: Relative path to file or folder in the image - store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.delete_image_store_content.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_image_store_content.metadata = {'url': '/ImageStore/{contentPath}'} - - def get_image_store_root_content( - self, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the content information at the root of the image store. - - Returns the information about the image store content at the root of - the image store. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ImageStoreContent or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ImageStoreContent or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_image_store_root_content.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ImageStoreContent', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_image_store_root_content.metadata = {'url': '/ImageStore'} - - def copy_image_store_content( - self, image_store_copy_description, timeout=60, custom_headers=None, raw=False, **operation_config): - """Copies image store content internally. - - Copies the image store content from the source image store relative - path to the destination image store relative path. - - :param image_store_copy_description: Describes the copy description - for the image store. - :type image_store_copy_description: - ~azure.servicefabric.models.ImageStoreCopyDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.copy_image_store_content.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(image_store_copy_description, 'ImageStoreCopyDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - copy_image_store_content.metadata = {'url': '/ImageStore/$/Copy'} - - def delete_image_store_upload_session( - self, session_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Cancels an image store upload session. - - The DELETE request will cause the existing upload session to expire and - remove any previously uploaded file chunks. - - :param session_id: A GUID generated by the user for a file uploading. - It identifies an image store upload session which keeps track of all - file chunks until it is committed. - :type session_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.delete_image_store_upload_session.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['session-id'] = self._serialize.query("session_id", session_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_image_store_upload_session.metadata = {'url': '/ImageStore/$/DeleteUploadSession'} - - def commit_image_store_upload_session( - self, session_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Commit an image store upload session. - - When all file chunks have been uploaded, the upload session needs to be - committed explicitly to complete the upload. Image store preserves the - upload session until the expiration time, which is 30 minutes after the - last chunk received. . - - :param session_id: A GUID generated by the user for a file uploading. - It identifies an image store upload session which keeps track of all - file chunks until it is committed. - :type session_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.commit_image_store_upload_session.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['session-id'] = self._serialize.query("session_id", session_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - commit_image_store_upload_session.metadata = {'url': '/ImageStore/$/CommitUploadSession'} - - def get_image_store_upload_session_by_id( - self, session_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Get the image store upload session by ID. - - Gets the image store upload session identified by the given ID. User - can query the upload session at any time during uploading. . - - :param session_id: A GUID generated by the user for a file uploading. - It identifies an image store upload session which keeps track of all - file chunks until it is committed. - :type session_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: UploadSession or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.UploadSession or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_image_store_upload_session_by_id.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['session-id'] = self._serialize.query("session_id", session_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('UploadSession', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_image_store_upload_session_by_id.metadata = {'url': '/ImageStore/$/GetUploadSession'} - - def get_image_store_upload_session_by_path( - self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): - """Get the image store upload session by relative path. - - Gets the image store upload session associated with the given image - store relative path. User can query the upload session at any time - during uploading. . - - :param content_path: Relative path to file or folder in the image - store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: UploadSession or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.UploadSession or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_image_store_upload_session_by_path.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('UploadSession', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_image_store_upload_session_by_path.metadata = {'url': '/ImageStore/{contentPath}/$/GetUploadSession'} - - def upload_file_chunk( - self, content_path, session_id, content_range, timeout=60, custom_headers=None, raw=False, **operation_config): - """Uploads a file chunk to the image store relative path. - - Uploads a file chunk to the image store with the specified upload - session ID and image store relative path. This API allows user to - resume the file upload operation. user doesn't have to restart the file - upload from scratch whenever there is a network interruption. Use this - option if the file size is large. - To perform a resumable file upload, user need to break the file into - multiple chunks and upload these chunks to the image store one-by-one. - Chunks don't have to be uploaded in order. If the file represented by - the image store relative path already exists, it will be overwritten - when the upload session commits. - - :param content_path: Relative path to file or folder in the image - store from its root. - :type content_path: str - :param session_id: A GUID generated by the user for a file uploading. - It identifies an image store upload session which keeps track of all - file chunks until it is committed. - :type session_id: str - :param content_range: When uploading file chunks to the image store, - the Content-Range header field need to be configured and sent with a - request. The format should looks like "bytes - {First-Byte-Position}-{Last-Byte-Position}/{File-Length}". For - example, Content-Range:bytes 300-5000/20000 indicates that user is - sending bytes 300 through 5,000 and the total file length is 20,000 - bytes. - :type content_range: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.upload_file_chunk.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['session-id'] = self._serialize.query("session_id", session_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['Content-Range'] = self._serialize.header("content_range", content_range, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - upload_file_chunk.metadata = {'url': '/ImageStore/{contentPath}/$/UploadChunk'} - - def get_image_store_root_folder_size( - self, timeout=60, custom_headers=None, raw=False, **operation_config): - """Get the folder size at the root of the image store. - - Returns the total size of files at the root and children folders in - image store. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FolderSizeInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.FolderSizeInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.5" - - # Construct URL - url = self.get_image_store_root_folder_size.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('FolderSizeInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_image_store_root_folder_size.metadata = {'url': '/ImageStore/$/FolderSize'} - - def get_image_store_folder_size( - self, content_path, timeout=60, custom_headers=None, raw=False, **operation_config): - """Get the size of a folder in image store. - - Gets the total size of file under a image store folder, specified by - contentPath. The contentPath is relative to the root of the image - store. - - :param content_path: Relative path to file or folder in the image - store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: FolderSizeInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.FolderSizeInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.5" - - # Construct URL - url = self.get_image_store_folder_size.metadata['url'] - path_format_arguments = { - 'contentPath': self._serialize.url("content_path", content_path, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('FolderSizeInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_image_store_folder_size.metadata = {'url': '/ImageStore/{contentPath}/$/FolderSize'} - - def get_image_store_info( - self, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the overall ImageStore information. - - Returns information about the primary ImageStore replica, such as disk - capacity and available disk space at the node it is on, and several - categories of the ImageStore's file system usage. - - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ImageStoreInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.ImageStoreInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.5" - - # Construct URL - url = self.get_image_store_info.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('ImageStoreInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_image_store_info.metadata = {'url': '/ImageStore/$/Info'} - - def invoke_infrastructure_command( - self, command, service_id=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Invokes an administrative command on the given Infrastructure Service - instance. - - For clusters that have one or more instances of the Infrastructure - Service configured, - this API provides a way to send infrastructure-specific commands to a - particular - instance of the Infrastructure Service. - Available commands and their corresponding response formats vary - depending upon - the infrastructure on which the cluster is running. - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param command: The text of the command to be invoked. The content of - the command is infrastructure-specific. - :type command: str - :param service_id: The identity of the infrastructure service. This is - the full name of the infrastructure service without the 'fabric:' URI - scheme. This parameter required only for the cluster that has more - than one instance of infrastructure service running. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.invoke_infrastructure_command.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['Command'] = self._serialize.query("command", command, 'str') - if service_id is not None: - query_parameters['ServiceId'] = self._serialize.query("service_id", service_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = 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('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - invoke_infrastructure_command.metadata = {'url': '/$/InvokeInfrastructureCommand'} - - def invoke_infrastructure_query( - self, command, service_id=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Invokes a read-only query on the given infrastructure service instance. - - For clusters that have one or more instances of the Infrastructure - Service configured, - this API provides a way to send infrastructure-specific queries to a - particular - instance of the Infrastructure Service. - Available commands and their corresponding response formats vary - depending upon - the infrastructure on which the cluster is running. - This API supports the Service Fabric platform; it is not meant to be - used directly from your code. - - :param command: The text of the command to be invoked. The content of - the command is infrastructure-specific. - :type command: str - :param service_id: The identity of the infrastructure service. This is - the full name of the infrastructure service without the 'fabric:' URI - scheme. This parameter required only for the cluster that has more - than one instance of infrastructure service running. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.invoke_infrastructure_query.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['Command'] = self._serialize.query("command", command, 'str') - if service_id is not None: - query_parameters['ServiceId'] = self._serialize.query("service_id", service_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('str', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - invoke_infrastructure_query.metadata = {'url': '/$/InvokeInfrastructureQuery'} - - def start_data_loss( - self, service_id, partition_id, operation_id, data_loss_mode, timeout=60, custom_headers=None, raw=False, **operation_config): - """This API will induce data loss for the specified partition. It will - trigger a call to the OnDataLossAsync API of the partition. - - This API will induce data loss for the specified partition. It will - trigger a call to the OnDataLoss API of the partition. - Actual data loss will depend on the specified DataLossMode. - - PartialDataLoss - Only a quorum of replicas are removed and - OnDataLoss is triggered for the partition but actual data loss depends - on the presence of in-flight replication. - - FullDataLoss - All replicas are removed hence all data is lost and - OnDataLoss is triggered. - This API should only be called with a stateful service as the target. - Calling this API with a system service as the target is not advised. - Note: Once this API has been called, it cannot be reversed. Calling - CancelOperation will only stop execution and clean up internal system - state. - It will not restore data if the command has progressed far enough to - cause data loss. - Call the GetDataLossProgress API with the same OperationId to return - information on the operation started with this API. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param data_loss_mode: This enum is passed to the StartDataLoss API to - indicate what type of data loss to induce. Possible values include: - 'Invalid', 'PartialDataLoss', 'FullDataLoss' - :type data_loss_mode: str or ~azure.servicefabric.models.DataLossMode - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.start_data_loss.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - query_parameters['DataLossMode'] = self._serialize.query("data_loss_mode", data_loss_mode, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_data_loss.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartDataLoss'} - - def get_data_loss_progress( - self, service_id, partition_id, operation_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the progress of a partition data loss operation started using the - StartDataLoss API. - - Gets the progress of a data loss operation started with StartDataLoss, - using the OperationId. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PartitionDataLossProgress or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PartitionDataLossProgress or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_data_loss_progress.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PartitionDataLossProgress', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_data_loss_progress.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetDataLossProgress'} - - def start_quorum_loss( - self, service_id, partition_id, operation_id, quorum_loss_mode, quorum_loss_duration, timeout=60, custom_headers=None, raw=False, **operation_config): - """Induces quorum loss for a given stateful service partition. - - This API is useful for a temporary quorum loss situation on your - service. - Call the GetQuorumLossProgress API with the same OperationId to return - information on the operation started with this API. - This can only be called on stateful persisted (HasPersistedState==true) - services. Do not use this API on stateless services or stateful - in-memory only services. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param quorum_loss_mode: This enum is passed to the StartQuorumLoss - API to indicate what type of quorum loss to induce. Possible values - include: 'Invalid', 'QuorumReplicas', 'AllReplicas' - :type quorum_loss_mode: str or - ~azure.servicefabric.models.QuorumLossMode - :param quorum_loss_duration: The amount of time for which the - partition will be kept in quorum loss. This must be specified in - seconds. - :type quorum_loss_duration: int - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.start_quorum_loss.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - query_parameters['QuorumLossMode'] = self._serialize.query("quorum_loss_mode", quorum_loss_mode, 'str') - query_parameters['QuorumLossDuration'] = self._serialize.query("quorum_loss_duration", quorum_loss_duration, 'int') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_quorum_loss.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartQuorumLoss'} - - def get_quorum_loss_progress( - self, service_id, partition_id, operation_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the progress of a quorum loss operation on a partition started - using the StartQuorumLoss API. - - Gets the progress of a quorum loss operation started with - StartQuorumLoss, using the provided OperationId. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PartitionQuorumLossProgress or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PartitionQuorumLossProgress or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_quorum_loss_progress.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PartitionQuorumLossProgress', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_quorum_loss_progress.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetQuorumLossProgress'} - - def start_partition_restart( - self, service_id, partition_id, operation_id, restart_partition_mode, timeout=60, custom_headers=None, raw=False, **operation_config): - """This API will restart some or all replicas or instances of the - specified partition. - - This API is useful for testing failover. - If used to target a stateless service partition, RestartPartitionMode - must be AllReplicasOrInstances. - Call the GetPartitionRestartProgress API using the same OperationId to - get the progress. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param restart_partition_mode: Describe which partitions to restart. - Possible values include: 'Invalid', 'AllReplicasOrInstances', - 'OnlyActiveSecondaries' - :type restart_partition_mode: str or - ~azure.servicefabric.models.RestartPartitionMode - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.start_partition_restart.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - query_parameters['RestartPartitionMode'] = self._serialize.query("restart_partition_mode", restart_partition_mode, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_partition_restart.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartRestart'} - - def get_partition_restart_progress( - self, service_id, partition_id, operation_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the progress of a PartitionRestart operation started using - StartPartitionRestart. - - Gets the progress of a PartitionRestart started with - StartPartitionRestart using the provided OperationId. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PartitionRestartProgress or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PartitionRestartProgress or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_partition_restart_progress.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PartitionRestartProgress', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_restart_progress.metadata = {'url': '/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetRestartProgress'} - - def start_node_transition( - self, node_name, operation_id, node_transition_type, node_instance_id, stop_duration_in_seconds, timeout=60, custom_headers=None, raw=False, **operation_config): - """Starts or stops a cluster node. - - Starts or stops a cluster node. A cluster node is a process, not the - OS instance itself. To start a node, pass in "Start" for the - NodeTransitionType parameter. - To stop a node, pass in "Stop" for the NodeTransitionType parameter. - This API starts the operation - when the API returns the node may not - have finished transitioning yet. - Call GetNodeTransitionProgress with the same OperationId to get the - progress of the operation. - - :param node_name: The name of the node. - :type node_name: str - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param node_transition_type: Indicates the type of transition to - perform. NodeTransitionType.Start will start a stopped node. - NodeTransitionType.Stop will stop a node that is up. Possible values - include: 'Invalid', 'Start', 'Stop' - :type node_transition_type: str or - ~azure.servicefabric.models.NodeTransitionType - :param node_instance_id: The node instance ID of the target node. - This can be determined through GetNodeInfo API. - :type node_instance_id: str - :param stop_duration_in_seconds: The duration, in seconds, to keep the - node stopped. The minimum value is 600, the maximum is 14400. After - this time expires, the node will automatically come back up. - :type stop_duration_in_seconds: int - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.start_node_transition.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - query_parameters['NodeTransitionType'] = self._serialize.query("node_transition_type", node_transition_type, 'str') - query_parameters['NodeInstanceId'] = self._serialize.query("node_instance_id", node_instance_id, 'str') - query_parameters['StopDurationInSeconds'] = self._serialize.query("stop_duration_in_seconds", stop_duration_in_seconds, 'int', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - start_node_transition.metadata = {'url': '/Faults/Nodes/{nodeName}/$/StartTransition/'} - - def get_node_transition_progress( - self, node_name, operation_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the progress of an operation started using StartNodeTransition. - - Gets the progress of an operation started with StartNodeTransition - using the provided OperationId. - - :param node_name: The name of the node. - :type node_name: str - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NodeTransitionProgress or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.NodeTransitionProgress or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_node_transition_progress.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('NodeTransitionProgress', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_node_transition_progress.metadata = {'url': '/Faults/Nodes/{nodeName}/$/GetTransitionProgress'} - - def get_fault_operation_list( - self, type_filter=65535, state_filter=65535, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets a list of user-induced fault operations filtered by provided - input. - - Gets the list of user-induced fault operations filtered by provided - input. - - :param type_filter: Used to filter on OperationType for user-induced - operations. - - 65535 - select all - - 1 - select PartitionDataLoss. - - 2 - select PartitionQuorumLoss. - - 4 - select PartitionRestart. - - 8 - select NodeTransition. - :type type_filter: int - :param state_filter: Used to filter on OperationState's for - user-induced operations. - - 65535 - select All - - 1 - select Running - - 2 - select RollingBack - - 8 - select Completed - - 16 - select Faulted - - 32 - select Cancelled - - 64 - select ForceCancelled - :type state_filter: int - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.OperationStatus] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_fault_operation_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['TypeFilter'] = self._serialize.query("type_filter", type_filter, 'int') - query_parameters['StateFilter'] = self._serialize.query("state_filter", state_filter, 'int') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[OperationStatus]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_fault_operation_list.metadata = {'url': '/Faults/'} - - def cancel_operation( - self, operation_id, force=False, timeout=60, custom_headers=None, raw=False, **operation_config): - """Cancels a user-induced fault operation. - - The following APIs start fault operations that may be cancelled by - using CancelOperation: StartDataLoss, StartQuorumLoss, - StartPartitionRestart, StartNodeTransition. - If force is false, then the specified user-induced operation will be - gracefully stopped and cleaned up. If force is true, the command will - be aborted, and some internal state - may be left behind. Specifying force as true should be used with care. - Calling this API with force set to true is not allowed until this API - has already - been called on the same test command with force set to false first, or - unless the test command already has an OperationState of - OperationState.RollingBack. - Clarification: OperationState.RollingBack means that the system will - be/is cleaning up internal system state caused by executing the - command. It will not restore data if the - test command was to cause data loss. For example, if you call - StartDataLoss then call this API, the system will only clean up - internal state from running the command. - It will not restore the target partition's data, if the command - progressed far enough to cause data loss. - Important note: if this API is invoked with force==true, internal - state may be left behind. - - :param operation_id: A GUID that identifies a call of this API. This - is passed into the corresponding GetProgress API - :type operation_id: str - :param force: Indicates whether to gracefully roll back and clean up - internal system state modified by executing the user-induced - operation. - :type force: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.cancel_operation.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['OperationId'] = self._serialize.query("operation_id", operation_id, 'str') - query_parameters['Force'] = self._serialize.query("force", force, 'bool') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - cancel_operation.metadata = {'url': '/Faults/$/Cancel'} - - def create_backup_policy( - self, backup_policy_description, timeout=60, validate_connection=False, custom_headers=None, raw=False, **operation_config): - """Creates a backup policy. - - Creates a backup policy which can be associated later with a Service - Fabric application, service or a partition for periodic backup. - - :param backup_policy_description: Describes the backup policy. - :type backup_policy_description: - ~azure.servicefabric.models.BackupPolicyDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param validate_connection: Specifies whether to validate the storage - connection and credentials before creating or updating the backup - policies. - :type validate_connection: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.create_backup_policy.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if validate_connection is not None: - query_parameters['ValidateConnection'] = self._serialize.query("validate_connection", validate_connection, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - create_backup_policy.metadata = {'url': '/BackupRestore/BackupPolicies/$/Create'} - - def delete_backup_policy( - self, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Deletes the backup policy. - - Deletes an existing backup policy. A backup policy must be created - before it can be deleted. A currently active backup policy, associated - with any Service Fabric application, service or partition, cannot be - deleted without first deleting the mapping. - - :param backup_policy_name: The name of the backup policy. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.delete_backup_policy.metadata['url'] - path_format_arguments = { - 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_backup_policy.metadata = {'url': '/BackupRestore/BackupPolicies/{backupPolicyName}/$/Delete'} - - def get_backup_policy_list( - self, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets all the backup policies configured. - - Get a list of all the backup policies configured. - - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedBackupPolicyDescriptionList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedBackupPolicyDescriptionList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_backup_policy_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedBackupPolicyDescriptionList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_policy_list.metadata = {'url': '/BackupRestore/BackupPolicies'} - - def get_backup_policy_by_name( - self, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets a particular backup policy by name. - - Gets a particular backup policy identified by {backupPolicyName}. - - :param backup_policy_name: The name of the backup policy. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupPolicyDescription or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.BackupPolicyDescription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_backup_policy_by_name.metadata['url'] - path_format_arguments = { - 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('BackupPolicyDescription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup_policy_by_name.metadata = {'url': '/BackupRestore/BackupPolicies/{backupPolicyName}'} - - def get_all_entities_backed_up_by_policy( - self, backup_policy_name, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the list of backup entities that are associated with this policy. - - Returns a list of Service Fabric application, service or partition - which are associated with this backup policy. - - :param backup_policy_name: The name of the backup policy. - :type backup_policy_name: str - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedBackupEntityList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedBackupEntityList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_all_entities_backed_up_by_policy.metadata['url'] - path_format_arguments = { - 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedBackupEntityList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_all_entities_backed_up_by_policy.metadata = {'url': '/BackupRestore/BackupPolicies/{backupPolicyName}/$/GetBackupEnabledEntities'} - - def update_backup_policy( - self, backup_policy_description, backup_policy_name, timeout=60, validate_connection=False, custom_headers=None, raw=False, **operation_config): - """Updates the backup policy. - - Updates the backup policy identified by {backupPolicyName}. - - :param backup_policy_description: Describes the backup policy. - :type backup_policy_description: - ~azure.servicefabric.models.BackupPolicyDescription - :param backup_policy_name: The name of the backup policy. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param validate_connection: Specifies whether to validate the storage - connection and credentials before creating or updating the backup - policies. - :type validate_connection: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.update_backup_policy.metadata['url'] - path_format_arguments = { - 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if validate_connection is not None: - query_parameters['ValidateConnection'] = self._serialize.query("validate_connection", validate_connection, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - update_backup_policy.metadata = {'url': '/BackupRestore/BackupPolicies/{backupPolicyName}/$/Update'} - - def enable_application_backup( - self, application_id, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Enables periodic backup of stateful partitions under this Service - Fabric application. - - Enables periodic backup of stateful partitions which are part of this - Service Fabric application. Each partition is backed up individually as - per the specified backup policy description. - Note only C# based Reliable Actor and Reliable Stateful services are - currently supported for periodic backup. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param backup_policy_name: Name of the backup policy to be used for - enabling periodic backups. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - enable_backup_description = models.EnableBackupDescription(backup_policy_name=backup_policy_name) - - api_version = "6.4" - - # Construct URL - url = self.enable_application_backup.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(enable_backup_description, 'EnableBackupDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - enable_application_backup.metadata = {'url': '/Applications/{applicationId}/$/EnableBackup'} - - def disable_application_backup( - self, application_id, clean_backup, timeout=60, custom_headers=None, raw=False, **operation_config): - """Disables periodic backup of Service Fabric application. - - Disables periodic backup of Service Fabric application which was - previously enabled. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param clean_backup: Boolean flag to delete backups. It can be set to - true for deleting all the backups which were created for the backup - entity that is getting disabled for backup. - :type clean_backup: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - disable_backup_description = None - if clean_backup is not None: - disable_backup_description = models.DisableBackupDescription(clean_backup=clean_backup) - - api_version = "6.4" - - # Construct URL - url = self.disable_application_backup.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if disable_backup_description is not None: - body_content = self._serialize.body(disable_backup_description, 'DisableBackupDescription') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_application_backup.metadata = {'url': '/Applications/{applicationId}/$/DisableBackup'} - - def get_application_backup_configuration_info( - self, application_id, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the Service Fabric application backup configuration information. - - Gets the Service Fabric backup configuration information for the - application and the services and partitions under this application. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedBackupConfigurationInfoList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedBackupConfigurationInfoList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_application_backup_configuration_info.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedBackupConfigurationInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_backup_configuration_info.metadata = {'url': '/Applications/{applicationId}/$/GetBackupConfigurationInfo'} - - def get_application_backup_list( - self, application_id, timeout=60, latest=False, start_date_time_filter=None, end_date_time_filter=None, continuation_token=None, max_results=0, custom_headers=None, raw=False, **operation_config): - """Gets the list of backups available for every partition in this - application. - - Returns a list of backups available for every partition in this Service - Fabric application. The server enumerates all the backups available at - the backup location configured in the backup policy. It also allows - filtering of the result based on start and end datetime or just - fetching the latest available backup for every partition. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param latest: Specifies whether to get only the most recent backup - available for a partition for the specified time range. - :type latest: bool - :param start_date_time_filter: Specify the start date time from which - to enumerate backups, in datetime format. The date time must be - specified in ISO8601 format. This is an optional parameter. If not - specified, all backups from the beginning are enumerated. - :type start_date_time_filter: datetime - :param end_date_time_filter: Specify the end date time till which to - enumerate backups, in datetime format. The date time must be specified - in ISO8601 format. This is an optional parameter. If not specified, - enumeration is done till the most recent backup. - :type end_date_time_filter: datetime - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedBackupInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedBackupInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_application_backup_list.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if latest is not None: - query_parameters['Latest'] = self._serialize.query("latest", latest, 'bool') - if start_date_time_filter is not None: - query_parameters['StartDateTimeFilter'] = self._serialize.query("start_date_time_filter", start_date_time_filter, 'iso-8601') - if end_date_time_filter is not None: - query_parameters['EndDateTimeFilter'] = self._serialize.query("end_date_time_filter", end_date_time_filter, 'iso-8601') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedBackupInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_backup_list.metadata = {'url': '/Applications/{applicationId}/$/GetBackups'} - - def suspend_application_backup( - self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Suspends periodic backup for the specified Service Fabric application. - - The application which is configured to take periodic backups, is - suspended for taking further backups till it is resumed again. This - operation applies to the entire application's hierarchy. It means all - the services and partitions under this application are now suspended - for backup. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.suspend_application_backup.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - suspend_application_backup.metadata = {'url': '/Applications/{applicationId}/$/SuspendBackup'} - - def resume_application_backup( - self, application_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Resumes periodic backup of a Service Fabric application which was - previously suspended. - - The previously suspended Service Fabric application resumes taking - periodic backup as per the backup policy currently configured for the - same. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.resume_application_backup.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resume_application_backup.metadata = {'url': '/Applications/{applicationId}/$/ResumeBackup'} - - def enable_service_backup( - self, service_id, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Enables periodic backup of stateful partitions under this Service - Fabric service. - - Enables periodic backup of stateful partitions which are part of this - Service Fabric service. Each partition is backed up individually as per - the specified backup policy description. In case the application, which - the service is part of, is already enabled for backup then this - operation would override the policy being used to take the periodic - backup for this service and its partitions (unless explicitly - overridden at the partition level). - Note only C# based Reliable Actor and Reliable Stateful services are - currently supported for periodic backup. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param backup_policy_name: Name of the backup policy to be used for - enabling periodic backups. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - enable_backup_description = models.EnableBackupDescription(backup_policy_name=backup_policy_name) - - api_version = "6.4" - - # Construct URL - url = self.enable_service_backup.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(enable_backup_description, 'EnableBackupDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - enable_service_backup.metadata = {'url': '/Services/{serviceId}/$/EnableBackup'} - - def disable_service_backup( - self, service_id, clean_backup, timeout=60, custom_headers=None, raw=False, **operation_config): - """Disables periodic backup of Service Fabric service which was previously - enabled. - - Disables periodic backup of Service Fabric service which was previously - enabled. Backup must be explicitly enabled before it can be disabled. - In case the backup is enabled for the Service Fabric application, which - this service is part of, this service would continue to be periodically - backed up as per the policy mapped at the application level. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param clean_backup: Boolean flag to delete backups. It can be set to - true for deleting all the backups which were created for the backup - entity that is getting disabled for backup. - :type clean_backup: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - disable_backup_description = None - if clean_backup is not None: - disable_backup_description = models.DisableBackupDescription(clean_backup=clean_backup) - - api_version = "6.4" - - # Construct URL - url = self.disable_service_backup.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if disable_backup_description is not None: - body_content = self._serialize.body(disable_backup_description, 'DisableBackupDescription') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_service_backup.metadata = {'url': '/Services/{serviceId}/$/DisableBackup'} - - def get_service_backup_configuration_info( - self, service_id, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the Service Fabric service backup configuration information. - - Gets the Service Fabric backup configuration information for the - service and the partitions under this service. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedBackupConfigurationInfoList or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PagedBackupConfigurationInfoList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_service_backup_configuration_info.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedBackupConfigurationInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_backup_configuration_info.metadata = {'url': '/Services/{serviceId}/$/GetBackupConfigurationInfo'} - - def get_service_backup_list( - self, service_id, timeout=60, latest=False, start_date_time_filter=None, end_date_time_filter=None, continuation_token=None, max_results=0, custom_headers=None, raw=False, **operation_config): - """Gets the list of backups available for every partition in this service. - - Returns a list of backups available for every partition in this Service - Fabric service. The server enumerates all the backups available in the - backup store configured in the backup policy. It also allows filtering - of the result based on start and end datetime or just fetching the - latest available backup for every partition. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param latest: Specifies whether to get only the most recent backup - available for a partition for the specified time range. - :type latest: bool - :param start_date_time_filter: Specify the start date time from which - to enumerate backups, in datetime format. The date time must be - specified in ISO8601 format. This is an optional parameter. If not - specified, all backups from the beginning are enumerated. - :type start_date_time_filter: datetime - :param end_date_time_filter: Specify the end date time till which to - enumerate backups, in datetime format. The date time must be specified - in ISO8601 format. This is an optional parameter. If not specified, - enumeration is done till the most recent backup. - :type end_date_time_filter: datetime - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedBackupInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedBackupInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_service_backup_list.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if latest is not None: - query_parameters['Latest'] = self._serialize.query("latest", latest, 'bool') - if start_date_time_filter is not None: - query_parameters['StartDateTimeFilter'] = self._serialize.query("start_date_time_filter", start_date_time_filter, 'iso-8601') - if end_date_time_filter is not None: - query_parameters['EndDateTimeFilter'] = self._serialize.query("end_date_time_filter", end_date_time_filter, 'iso-8601') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedBackupInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_backup_list.metadata = {'url': '/Services/{serviceId}/$/GetBackups'} - - def suspend_service_backup( - self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Suspends periodic backup for the specified Service Fabric service. - - The service which is configured to take periodic backups, is suspended - for taking further backups till it is resumed again. This operation - applies to the entire service's hierarchy. It means all the partitions - under this service are now suspended for backup. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.suspend_service_backup.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - suspend_service_backup.metadata = {'url': '/Services/{serviceId}/$/SuspendBackup'} - - def resume_service_backup( - self, service_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Resumes periodic backup of a Service Fabric service which was - previously suspended. - - The previously suspended Service Fabric service resumes taking periodic - backup as per the backup policy currently configured for the same. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.resume_service_backup.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resume_service_backup.metadata = {'url': '/Services/{serviceId}/$/ResumeBackup'} - - def enable_partition_backup( - self, partition_id, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Enables periodic backup of the stateful persisted partition. - - Enables periodic backup of stateful persisted partition. Each partition - is backed up as per the specified backup policy description. In case - the application or service, which is partition is part of, is already - enabled for backup then this operation would override the policy being - used to take the periodic backup of this partition. - Note only C# based Reliable Actor and Reliable Stateful services are - currently supported for periodic backup. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param backup_policy_name: Name of the backup policy to be used for - enabling periodic backups. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - enable_backup_description = models.EnableBackupDescription(backup_policy_name=backup_policy_name) - - api_version = "6.4" - - # Construct URL - url = self.enable_partition_backup.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(enable_backup_description, 'EnableBackupDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - enable_partition_backup.metadata = {'url': '/Partitions/{partitionId}/$/EnableBackup'} - - def disable_partition_backup( - self, partition_id, clean_backup, timeout=60, custom_headers=None, raw=False, **operation_config): - """Disables periodic backup of Service Fabric partition which was - previously enabled. - - Disables periodic backup of partition which was previously enabled. - Backup must be explicitly enabled before it can be disabled. - In case the backup is enabled for the Service Fabric application or - service, which this partition is part of, this partition would continue - to be periodically backed up as per the policy mapped at the higher - level entity. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param clean_backup: Boolean flag to delete backups. It can be set to - true for deleting all the backups which were created for the backup - entity that is getting disabled for backup. - :type clean_backup: bool - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - disable_backup_description = None - if clean_backup is not None: - disable_backup_description = models.DisableBackupDescription(clean_backup=clean_backup) - - api_version = "6.4" - - # Construct URL - url = self.disable_partition_backup.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if disable_backup_description is not None: - body_content = self._serialize.body(disable_backup_description, 'DisableBackupDescription') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_partition_backup.metadata = {'url': '/Partitions/{partitionId}/$/DisableBackup'} - - def get_partition_backup_configuration_info( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the partition backup configuration information. - - Gets the Service Fabric Backup configuration information for the - specified partition. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PartitionBackupConfigurationInfo or ClientRawResponse if - raw=true - :rtype: ~azure.servicefabric.models.PartitionBackupConfigurationInfo - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partition_backup_configuration_info.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PartitionBackupConfigurationInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_backup_configuration_info.metadata = {'url': '/Partitions/{partitionId}/$/GetBackupConfigurationInfo'} - - def get_partition_backup_list( - self, partition_id, timeout=60, latest=False, start_date_time_filter=None, end_date_time_filter=None, custom_headers=None, raw=False, **operation_config): - """Gets the list of backups available for the specified partition. - - Returns a list of backups available for the specified partition. The - server enumerates all the backups available in the backup store - configured in the backup policy. It also allows filtering of the result - based on start and end datetime or just fetching the latest available - backup for the partition. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param latest: Specifies whether to get only the most recent backup - available for a partition for the specified time range. - :type latest: bool - :param start_date_time_filter: Specify the start date time from which - to enumerate backups, in datetime format. The date time must be - specified in ISO8601 format. This is an optional parameter. If not - specified, all backups from the beginning are enumerated. - :type start_date_time_filter: datetime - :param end_date_time_filter: Specify the end date time till which to - enumerate backups, in datetime format. The date time must be specified - in ISO8601 format. This is an optional parameter. If not specified, - enumeration is done till the most recent backup. - :type end_date_time_filter: datetime - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedBackupInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedBackupInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partition_backup_list.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if latest is not None: - query_parameters['Latest'] = self._serialize.query("latest", latest, 'bool') - if start_date_time_filter is not None: - query_parameters['StartDateTimeFilter'] = self._serialize.query("start_date_time_filter", start_date_time_filter, 'iso-8601') - if end_date_time_filter is not None: - query_parameters['EndDateTimeFilter'] = self._serialize.query("end_date_time_filter", end_date_time_filter, 'iso-8601') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedBackupInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_backup_list.metadata = {'url': '/Partitions/{partitionId}/$/GetBackups'} - - def suspend_partition_backup( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Suspends periodic backup for the specified partition. - - The partition which is configured to take periodic backups, is - suspended for taking further backups till it is resumed again. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.suspend_partition_backup.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - suspend_partition_backup.metadata = {'url': '/Partitions/{partitionId}/$/SuspendBackup'} - - def resume_partition_backup( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Resumes periodic backup of partition which was previously suspended. - - The previously suspended partition resumes taking periodic backup as - per the backup policy currently configured for the same. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.resume_partition_backup.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - resume_partition_backup.metadata = {'url': '/Partitions/{partitionId}/$/ResumeBackup'} - - def backup_partition( - self, partition_id, backup_timeout=10, timeout=60, backup_storage=None, custom_headers=None, raw=False, **operation_config): - """Triggers backup of the partition's state. - - Creates a backup of the stateful persisted partition's state. In case - the partition is already being periodically backed up, then by default - the new backup is created at the same backup storage. One can also - override the same by specifying the backup storage details as part of - the request body. Once the backup is initiated, its progress can be - tracked using the GetBackupProgress operation. - In case, the operation times out, specify a greater backup timeout - value in the query parameter. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param backup_timeout: Specifies the maximum amount of time, in - minutes, to wait for the backup operation to complete. Post that, the - operation completes with timeout error. However, in certain corner - cases it could be that though the operation returns back timeout, the - backup actually goes through. In case of timeout error, its - recommended to invoke this operation again with a greater timeout - value. The default value for the same is 10 minutes. - :type backup_timeout: int - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param backup_storage: Specifies the details of the backup storage - where to save the backup. - :type backup_storage: - ~azure.servicefabric.models.BackupStorageDescription - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - backup_partition_description = None - if backup_storage is not None: - backup_partition_description = models.BackupPartitionDescription(backup_storage=backup_storage) - - api_version = "6.4" - - # Construct URL - url = self.backup_partition.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if backup_timeout is not None: - query_parameters['BackupTimeout'] = self._serialize.query("backup_timeout", backup_timeout, 'int') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - if backup_partition_description is not None: - body_content = self._serialize.body(backup_partition_description, 'BackupPartitionDescription') - else: - body_content = None - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - backup_partition.metadata = {'url': '/Partitions/{partitionId}/$/Backup'} - - def get_partition_backup_progress( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets details for the latest backup triggered for this partition. - - Returns information about the state of the latest backup along with - details or failure reason in case of completion. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupProgressInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.BackupProgressInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partition_backup_progress.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('BackupProgressInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_backup_progress.metadata = {'url': '/Partitions/{partitionId}/$/GetBackupProgress'} - - def restore_partition( - self, partition_id, restore_partition_description, restore_timeout=10, timeout=60, custom_headers=None, raw=False, **operation_config): - """Triggers restore of the state of the partition using the specified - restore partition description. - - Restores the state of a of the stateful persisted partition using the - specified backup point. In case the partition is already being - periodically backed up, then by default the backup point is looked for - in the storage specified in backup policy. One can also override the - same by specifying the backup storage details as part of the restore - partition description in body. Once the restore is initiated, its - progress can be tracked using the GetRestoreProgress operation. - In case, the operation times out, specify a greater restore timeout - value in the query parameter. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param restore_partition_description: Describes the parameters to - restore the partition. - :type restore_partition_description: - ~azure.servicefabric.models.RestorePartitionDescription - :param restore_timeout: Specifies the maximum amount of time to wait, - in minutes, for the restore operation to complete. Post that, the - operation returns back with timeout error. However, in certain corner - cases it could be that the restore operation goes through even though - it completes with timeout. In case of timeout error, its recommended - to invoke this operation again with a greater timeout value. the - default value for the same is 10 minutes. - :type restore_timeout: int - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.restore_partition.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if restore_timeout is not None: - query_parameters['RestoreTimeout'] = self._serialize.query("restore_timeout", restore_timeout, 'int') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(restore_partition_description, 'RestorePartitionDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restore_partition.metadata = {'url': '/Partitions/{partitionId}/$/Restore'} - - def get_partition_restore_progress( - self, partition_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets details for the latest restore operation triggered for this - partition. - - Returns information about the state of the latest restore operation - along with details or failure reason in case of completion. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RestoreProgressInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.RestoreProgressInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partition_restore_progress.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('RestoreProgressInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_restore_progress.metadata = {'url': '/Partitions/{partitionId}/$/GetRestoreProgress'} - - def get_backups_from_backup_location( - self, get_backup_by_storage_query_description, timeout=60, continuation_token=None, max_results=0, custom_headers=None, raw=False, **operation_config): - """Gets the list of backups available for the specified backed up entity - at the specified backup location. - - Gets the list of backups available for the specified backed up entity - (Application, Service or Partition) at the specified backup location - (FileShare or Azure Blob Storage). - - :param get_backup_by_storage_query_description: Describes the filters - and backup storage details to be used for enumerating backups. - :type get_backup_by_storage_query_description: - ~azure.servicefabric.models.GetBackupByStorageQueryDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param max_results: The maximum number of results to be returned as - part of the paged queries. This parameter defines the upper bound on - the number of results returned. The results returned can be less than - the specified maximum results if they do not fit in the message as per - the max message size restrictions defined in the configuration. If - this parameter is zero or not specified, the paged query includes as - many results as possible that fit in the return message. - :type max_results: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedBackupInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedBackupInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_backups_from_backup_location.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if max_results is not None: - query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(get_backup_by_storage_query_description, 'GetBackupByStorageQueryDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = 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('PagedBackupInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backups_from_backup_location.metadata = {'url': '/BackupRestore/$/GetBackups'} - - def create_name( - self, name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Creates a Service Fabric name. - - Creates the specified Service Fabric name. - - :param name: The Service Fabric name, including the 'fabric:' URI - scheme. - :type name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - name_description = models.NameDescription(name=name) - - api_version = "6.0" - - # Construct URL - url = self.create_name.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(name_description, 'NameDescription') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - create_name.metadata = {'url': '/Names/$/Create'} - - def get_name_exists_info( - self, name_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Returns whether the Service Fabric name exists. - - Returns whether the specified Service Fabric name exists. - - :param name_id: The Service Fabric name, without the 'fabric:' URI - scheme. - :type name_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_name_exists_info.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - get_name_exists_info.metadata = {'url': '/Names/{nameId}'} - - def delete_name( - self, name_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Deletes a Service Fabric name. - - Deletes the specified Service Fabric name. A name must be created - before it can be deleted. Deleting a name with child properties will - fail. - - :param name_id: The Service Fabric name, without the 'fabric:' URI - scheme. - :type name_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.delete_name.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_name.metadata = {'url': '/Names/{nameId}'} - - def get_sub_name_info_list( - self, name_id, recursive=False, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Enumerates all the Service Fabric names under a given name. - - Enumerates all the Service Fabric names under a given name. If the - subnames do not fit in a page, one page of results is returned as well - as a continuation token, which can be used to get the next page. - Querying a name that doesn't exist will fail. - - :param name_id: The Service Fabric name, without the 'fabric:' URI - scheme. - :type name_id: str - :param recursive: Allows specifying that the search performed should - be recursive. - :type recursive: bool - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedSubNameInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedSubNameInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_sub_name_info_list.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if recursive is not None: - query_parameters['Recursive'] = self._serialize.query("recursive", recursive, 'bool') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedSubNameInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_sub_name_info_list.metadata = {'url': '/Names/{nameId}/$/GetSubNames'} - - def get_property_info_list( - self, name_id, include_values=False, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets information on all Service Fabric properties under a given name. - - A Service Fabric name can have one or more named properties that store - custom information. This operation gets the information about these - properties in a paged list. The information includes name, value, and - metadata about each of the properties. - - :param name_id: The Service Fabric name, without the 'fabric:' URI - scheme. - :type name_id: str - :param include_values: Allows specifying whether to include the values - of the properties returned. True if values should be returned with the - metadata; False to return only property metadata. - :type include_values: bool - :param continuation_token: The continuation token parameter is used to - obtain next set of results. A continuation token with a non-empty - value is included in the response of the API when the results from the - system do not fit in a single response. When this value is passed to - the next API call, the API returns next set of results. If there are - no further results, then the continuation token does not contain a - value. The value of this parameter should not be URL encoded. - :type continuation_token: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PagedPropertyInfoList or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PagedPropertyInfoList or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_property_info_list.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if include_values is not None: - query_parameters['IncludeValues'] = self._serialize.query("include_values", include_values, 'bool') - if continuation_token is not None: - query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PagedPropertyInfoList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_property_info_list.metadata = {'url': '/Names/{nameId}/$/GetProperties'} - - def put_property( - self, name_id, property_description, timeout=60, custom_headers=None, raw=False, **operation_config): - """Creates or updates a Service Fabric property. - - Creates or updates the specified Service Fabric property under a given - name. - - :param name_id: The Service Fabric name, without the 'fabric:' URI - scheme. - :type name_id: str - :param property_description: Describes the Service Fabric property to - be created. - :type property_description: - ~azure.servicefabric.models.PropertyDescription - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.put_property.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(property_description, 'PropertyDescription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - put_property.metadata = {'url': '/Names/{nameId}/$/GetProperty'} - - def get_property_info( - self, name_id, property_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets the specified Service Fabric property. - - Gets the specified Service Fabric property under a given name. This - will always return both value and metadata. - - :param name_id: The Service Fabric name, without the 'fabric:' URI - scheme. - :type name_id: str - :param property_name: Specifies the name of the property to get. - :type property_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PropertyInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PropertyInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.get_property_info.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['PropertyName'] = self._serialize.query("property_name", property_name, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('PropertyInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_property_info.metadata = {'url': '/Names/{nameId}/$/GetProperty'} - - def delete_property( - self, name_id, property_name, timeout=60, custom_headers=None, raw=False, **operation_config): - """Deletes the specified Service Fabric property. - - Deletes the specified Service Fabric property under a given name. A - property must be created before it can be deleted. - - :param name_id: The Service Fabric name, without the 'fabric:' URI - scheme. - :type name_id: str - :param property_name: Specifies the name of the property to get. - :type property_name: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.0" - - # Construct URL - url = self.delete_property.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - query_parameters['PropertyName'] = self._serialize.query("property_name", property_name, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.FabricErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete_property.metadata = {'url': '/Names/{nameId}/$/GetProperty'} - - def submit_property_batch( - self, name_id, timeout=60, operations=None, custom_headers=None, raw=False, **operation_config): - """Submits a property batch. - - Submits a batch of property operations. Either all or none of the - operations will be committed. - - :param name_id: The Service Fabric name, without the 'fabric:' URI - scheme. - :type name_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param operations: A list of the property batch operations to be - executed. - :type operations: - list[~azure.servicefabric.models.PropertyBatchOperation] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PropertyBatchInfo or ClientRawResponse if raw=true - :rtype: ~azure.servicefabric.models.PropertyBatchInfo or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - property_batch_description_list = models.PropertyBatchDescriptionList(operations=operations) - - api_version = "6.0" - - # Construct URL - url = self.submit_property_batch.metadata['url'] - path_format_arguments = { - 'nameId': self._serialize.url("name_id", name_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(property_batch_description_list, 'PropertyBatchDescriptionList') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 409]: - raise models.FabricErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SuccessfulPropertyBatchInfo', response) - if response.status_code == 409: - deserialized = self._deserialize('FailedPropertyBatchInfo', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - submit_property_batch.metadata = {'url': '/Names/{nameId}/$/GetProperties/$/SubmitBatch'} - - def get_cluster_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): - """Gets all Cluster-related events. - - The response is list of ClusterEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ClusterEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_cluster_event_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[ClusterEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cluster_event_list.metadata = {'url': '/EventsStore/Cluster/Events'} - - def get_containers_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): - """Gets all Containers-related events. - - The response is list of ContainerInstanceEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ContainerInstanceEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.2-preview" - - # Construct URL - url = self.get_containers_event_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[ContainerInstanceEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_containers_event_list.metadata = {'url': '/EventsStore/Containers/Events'} - - def get_node_event_list( - self, node_name, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): - """Gets a Node-related events. - - The response is list of NodeEvent objects. - - :param node_name: The name of the node. - :type node_name: str - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.NodeEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_node_event_list.metadata['url'] - path_format_arguments = { - 'nodeName': self._serialize.url("node_name", node_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[NodeEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_node_event_list.metadata = {'url': '/EventsStore/Nodes/{nodeName}/$/Events'} - - def get_nodes_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): - """Gets all Nodes-related Events. - - The response is list of NodeEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.NodeEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_nodes_event_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[NodeEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_nodes_event_list.metadata = {'url': '/EventsStore/Nodes/Events'} - - def get_application_event_list( - self, application_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): - """Gets an Application-related events. - - The response is list of ApplicationEvent objects. - - :param application_id: The identity of the application. This is - typically the full name of the application without the 'fabric:' URI - scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the application name is "fabric:/myapp/app1", the - application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - previous versions. - :type application_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ApplicationEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_application_event_list.metadata['url'] - path_format_arguments = { - 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[ApplicationEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_application_event_list.metadata = {'url': '/EventsStore/Applications/{applicationId}/$/Events'} - - def get_applications_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): - """Gets all Applications-related events. - - The response is list of ApplicationEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ApplicationEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_applications_event_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[ApplicationEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_applications_event_list.metadata = {'url': '/EventsStore/Applications/Events'} - - def get_service_event_list( - self, service_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): - """Gets a Service-related events. - - The response is list of ServiceEvent objects. - - :param service_id: The identity of the service. This ID is typically - the full name of the service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the - "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the - service identity would be "myapp~app1~svc1" in 6.0+ and - "myapp/app1/svc1" in previous versions. - :type service_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ServiceEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_service_event_list.metadata['url'] - path_format_arguments = { - 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[ServiceEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_service_event_list.metadata = {'url': '/EventsStore/Services/{serviceId}/$/Events'} - - def get_services_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): - """Gets all Services-related events. - - The response is list of ServiceEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ServiceEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_services_event_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[ServiceEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_services_event_list.metadata = {'url': '/EventsStore/Services/Events'} - - def get_partition_event_list( - self, partition_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): - """Gets a Partition-related events. - - The response is list of PartitionEvent objects. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.PartitionEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partition_event_list.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[PartitionEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_event_list.metadata = {'url': '/EventsStore/Partitions/{partitionId}/$/Events'} - - def get_partitions_event_list( - self, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): - """Gets all Partitions-related events. - - The response is list of PartitionEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.PartitionEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partitions_event_list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[PartitionEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partitions_event_list.metadata = {'url': '/EventsStore/Partitions/Events'} - - def get_partition_replica_event_list( - self, partition_id, replica_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): - """Gets a Partition Replica-related events. - - The response is list of ReplicaEvent objects. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ReplicaEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partition_replica_event_list.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True), - 'replicaId': self._serialize.url("replica_id", replica_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[ReplicaEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_replica_event_list.metadata = {'url': '/EventsStore/Partitions/{partitionId}/$/Replicas/{replicaId}/$/Events'} - - def get_partition_replicas_event_list( - self, partition_id, start_time_utc, end_time_utc, timeout=60, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, custom_headers=None, raw=False, **operation_config): - """Gets all Replicas-related events for a Partition. - - The response is list of ReplicaEvent objects. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC - yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param events_types_filter: This is a comma separated string - specifying the types of FabricEvents that should only be included in - the response. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of - AnalysisEvents if true is passed. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of - CorrelatedEvents information if true is passed. otherwise the - CorrelationEvents get processed and HasCorrelatedEvents field in every - FabricEvent gets populated. - :type skip_correlation_lookup: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.ReplicaEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_partition_replicas_event_list.metadata['url'] - path_format_arguments = { - 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - query_parameters['StartTimeUtc'] = self._serialize.query("start_time_utc", start_time_utc, 'str') - query_parameters['EndTimeUtc'] = self._serialize.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - query_parameters['EventsTypesFilter'] = self._serialize.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - query_parameters['ExcludeAnalysisEvents'] = self._serialize.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - query_parameters['SkipCorrelationLookup'] = self._serialize.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[ReplicaEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_partition_replicas_event_list.metadata = {'url': '/EventsStore/Partitions/{partitionId}/$/Replicas/Events'} - - def get_correlated_event_list( - self, event_instance_id, timeout=60, custom_headers=None, raw=False, **operation_config): - """Gets all correlated events for a given event. - - The response is list of FabricEvents. - - :param event_instance_id: The EventInstanceId. - :type event_instance_id: str - :param timeout: The server timeout for performing the operation in - seconds. This timeout specifies the time duration that the client is - willing to wait for the requested operation to complete. The default - value for this parameter is 60 seconds. - :type timeout: long - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.servicefabric.models.FabricEvent] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`FabricErrorException` - """ - api_version = "6.4" - - # Construct URL - url = self.get_correlated_event_list.metadata['url'] - path_format_arguments = { - 'eventInstanceId': self._serialize.url("event_instance_id", event_instance_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = 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('[FabricEvent]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_correlated_event_list.metadata = {'url': '/EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events'} diff --git a/customSDK/servicefabric/version.py b/customSDK/servicefabric/version.py deleted file mode 100644 index 5a1c1edc..00000000 --- a/customSDK/servicefabric/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "8.2.0.46" - diff --git a/src/sfctl/apiclient.py b/src/sfctl/apiclient.py index 579e348c..65daadbc 100644 --- a/src/sfctl/apiclient.py +++ b/src/sfctl/apiclient.py @@ -8,22 +8,30 @@ from knack.util import CLIError from azure.servicefabric import ServiceFabricClientAPIs -from azure.core.credentials import TokenCredential +from azure.core.credentials import TokenCredential, AccessToken -from sfctl.auth import (ClientCertAuthentication, AdalAuthentication) +from sfctl.auth import (AdalAuthentication2, ClientCertAuthentication, AdalAuthentication) from sfctl.config import (security_type, ca_cert_info, cert_info, client_endpoint, no_verify_setting) +import logging +from azure.core.pipeline.policies import SansIOHTTPPolicy +from azure.core.pipeline import PipelineRequest + +class MyAuthenticationPolicy(SansIOHTTPPolicy): + def __init__(self): + self class dummmy_protocol(TokenCredential): def __init__(self): self + def get_token(self, scopes): + pass #return AccessToken(token="",expires_on=1111111111) def create(_): """Create a client for Service Fabric APIs.""" endpoint = client_endpoint() - if not endpoint: raise CLIError('Connection endpoint not found. ' 'Before running sfctl commands, connect to a cluster using ' @@ -32,9 +40,13 @@ def create(_): 'you may need to run the command with sudo.') no_verify = no_verify_setting() + logging.info(no_verify) + + headers = {} if security_type() == 'aad': - auth = AdalAuthentication(no_verify) + auth = AdalAuthentication2() + headers['Authorization'] = auth.get_header() else: ca_cert = ca_cert_info() if ca_cert is not None: @@ -42,6 +54,8 @@ def create(_): dummy_credential = dummmy_protocol() - client = ServiceFabricClientAPIs(dummy_credential, base_url=endpoint, retry_total=0, connection_verify=no_verify, connection_cert=cert_info()) + client = ServiceFabricClientAPIs(dummy_credential, base_url=endpoint, retry_total=0, + connection_verify=False, enforce_https=False, + connection_cert=cert_info(), authentication_policy=MyAuthenticationPolicy()) return client diff --git a/src/sfctl/auth.py b/src/sfctl/auth.py index 867e2b13..9c7b6798 100644 --- a/src/sfctl/auth.py +++ b/src/sfctl/auth.py @@ -85,13 +85,13 @@ def get_header(self): from sfctl.config import (aad_metadata, aad_cache) - if session: - session = super(AdalAuthentication, self).signed_session(session) - else: - session = super(AdalAuthentication, self).signed_session() + # if session: + # session = super(AdalAuthentication, self).signed_session(session) + # else: + # session = super(AdalAuthentication, self).signed_session() - if self.no_verify: - session.verify = False + # if self.no_verify: + # session.verify = False authority_uri, cluster_id, client_id = aad_metadata() existing_token, existing_cache = aad_cache() @@ -100,5 +100,5 @@ def get_header(self): new_token = context.acquire_token(cluster_id, existing_token['userId'], client_id) header = "{} {}".format("Bearer", new_token['accessToken']) - # session.headers['Authorization'] = header + return header \ No newline at end of file diff --git a/src/sfctl/custom_cluster.py b/src/sfctl/custom_cluster.py index c885a2bd..928f3c80 100644 --- a/src/sfctl/custom_cluster.py +++ b/src/sfctl/custom_cluster.py @@ -14,6 +14,7 @@ from knack.log import get_logger from azure.servicefabric import ServiceFabricClientAPIs from msrest import ServiceClient, Configuration +from sfctl.apiclient import dummmy_protocol from sfctl.config import client_endpoint, SF_CLI_VERSION_CHECK_INTERVAL, get_cluster_auth, set_aad_cache, set_aad_metadata # pylint: disable=line-too-long from sfctl.state import get_sfctl_version from sfctl.custom_exceptions import SFCTLInternalException @@ -288,9 +289,11 @@ def get_aad_token(endpoint, no_verify): #pylint: disable-msg=too-many-locals """Get AAD token""" - auth = ClientCertAuthentication(None, None, no_verify) + # auth = ClientCertAuthentication(None, None, no_verify) + dummy_credential = dummmy_protocol() - client = ServiceFabricClientAPIs(auth, base_url=endpoint) + + client = ServiceFabricClientAPIs(dummy_credential, base_url=endpoint, connection_verify=False) aad_metadata = client.get_aad_metadata() if aad_metadata.type != "aad": From 3f1b548d57d576452728316f2dba32cd69863b64 Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Wed, 4 May 2022 15:03:01 -0700 Subject: [PATCH 07/20] majority of the changes required for the second track SDK --- .github/workflows/test.yml | 2 +- customSDK/servicefabric/__init__.py | 15 +- ...rvice_fabric_client_apis.py => _client.py} | 80 +- customSDK/servicefabric/_configuration.py | 11 +- customSDK/servicefabric/_patch.py | 67 +- customSDK/servicefabric/_vendor.py | 24 +- customSDK/servicefabric/aio/__init__.py | 15 +- ...rvice_fabric_client_apis.py => _client.py} | 61 +- customSDK/servicefabric/aio/_patch.py | 46 +- customSDK/servicefabric/aio/_vendor.py | 25 + .../servicefabric/aio/operations/__init__.py | 25 +- .../_mesh_application_operations.py | 333 - .../_mesh_code_package_operations.py | 115 - .../operations/_mesh_gateway_operations.py | 274 - .../operations/_mesh_network_operations.py | 278 - .../aio/operations/_mesh_secret_operations.py | 278 - .../_mesh_secret_value_operations.py | 359 - .../operations/_mesh_service_operations.py | 160 - .../_mesh_service_replica_operations.py | 168 - .../aio/operations/_mesh_volume_operations.py | 274 - .../aio/operations/_operations.py | 38973 ++++++++++++ .../servicefabric/aio/operations/_patch.py | 19 + .../_service_fabric_client_apis_operations.py | 16791 ------ customSDK/servicefabric/models/__init__.py | 1826 - customSDK/servicefabric/models/_models.py | 34044 ----------- customSDK/servicefabric/models/_models_py3.py | 36919 ------------ .../_service_fabric_client_apis_enums.py | 2129 - .../servicefabric/operations/__init__.py | 25 +- .../_mesh_application_operations.py | 509 - .../_mesh_code_package_operations.py | 167 - .../operations/_mesh_gateway_operations.py | 416 - .../operations/_mesh_network_operations.py | 420 - .../operations/_mesh_secret_operations.py | 420 - .../_mesh_secret_value_operations.py | 549 - .../operations/_mesh_service_operations.py | 239 - .../_mesh_service_replica_operations.py | 251 - .../operations/_mesh_volume_operations.py | 416 - .../servicefabric/operations/_operations.py | 48995 ++++++++++++++++ customSDK/servicefabric/operations/_patch.py | 19 + .../_service_fabric_client_apis_operations.py | 25421 -------- src/setup.py | 7 +- src/sfctl/apiclient.py | 13 +- src/sfctl/commands.py | 22 +- src/sfctl/custom_app.py | 127 +- src/sfctl/custom_app_type.py | 75 +- src/sfctl/custom_chaos.py | 78 +- src/sfctl/custom_chaos_schedule.py | 48 +- src/sfctl/custom_cluster.py | 46 +- src/sfctl/custom_cluster_upgrade.py | 173 +- src/sfctl/custom_container.py | 36 +- src/sfctl/custom_health.py | 48 +- src/sfctl/custom_is.py | 34 +- src/sfctl/custom_node.py | 30 + src/sfctl/custom_property.py | 7 +- src/sfctl/custom_service.py | 266 +- src/sfctl/tests/app_test.py | 20 +- src/sfctl/tests/chaos_schedule_test.py | 322 +- src/sfctl/tests/chaos_test.py | 24 +- src/sfctl/tests/health_test.py | 24 +- src/sfctl/tests/help_text_test.py | 3 + .../request_generation_body_validation.py | 8 +- src/sfctl/tests/request_generation_test.py | 5 +- src/sfctl/tests/service_test.py | 81 +- 63 files changed, 88936 insertions(+), 123719 deletions(-) rename customSDK/servicefabric/{_service_fabric_client_apis.py => _client.py} (70%) rename customSDK/servicefabric/aio/{_service_fabric_client_apis.py => _client.py} (74%) create mode 100644 customSDK/servicefabric/aio/_vendor.py delete mode 100644 customSDK/servicefabric/aio/operations/_mesh_application_operations.py delete mode 100644 customSDK/servicefabric/aio/operations/_mesh_code_package_operations.py delete mode 100644 customSDK/servicefabric/aio/operations/_mesh_gateway_operations.py delete mode 100644 customSDK/servicefabric/aio/operations/_mesh_network_operations.py delete mode 100644 customSDK/servicefabric/aio/operations/_mesh_secret_operations.py delete mode 100644 customSDK/servicefabric/aio/operations/_mesh_secret_value_operations.py delete mode 100644 customSDK/servicefabric/aio/operations/_mesh_service_operations.py delete mode 100644 customSDK/servicefabric/aio/operations/_mesh_service_replica_operations.py delete mode 100644 customSDK/servicefabric/aio/operations/_mesh_volume_operations.py create mode 100644 customSDK/servicefabric/aio/operations/_operations.py create mode 100644 customSDK/servicefabric/aio/operations/_patch.py delete mode 100644 customSDK/servicefabric/aio/operations/_service_fabric_client_apis_operations.py delete mode 100644 customSDK/servicefabric/models/__init__.py delete mode 100644 customSDK/servicefabric/models/_models.py delete mode 100644 customSDK/servicefabric/models/_models_py3.py delete mode 100644 customSDK/servicefabric/models/_service_fabric_client_apis_enums.py delete mode 100644 customSDK/servicefabric/operations/_mesh_application_operations.py delete mode 100644 customSDK/servicefabric/operations/_mesh_code_package_operations.py delete mode 100644 customSDK/servicefabric/operations/_mesh_gateway_operations.py delete mode 100644 customSDK/servicefabric/operations/_mesh_network_operations.py delete mode 100644 customSDK/servicefabric/operations/_mesh_secret_operations.py delete mode 100644 customSDK/servicefabric/operations/_mesh_secret_value_operations.py delete mode 100644 customSDK/servicefabric/operations/_mesh_service_operations.py delete mode 100644 customSDK/servicefabric/operations/_mesh_service_replica_operations.py delete mode 100644 customSDK/servicefabric/operations/_mesh_volume_operations.py create mode 100644 customSDK/servicefabric/operations/_operations.py create mode 100644 customSDK/servicefabric/operations/_patch.py delete mode 100644 customSDK/servicefabric/operations/_service_fabric_client_apis_operations.py diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ea959545..779d6535 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8] + python-version: [3.7, 3.8, 3.9, 3.10] steps: - uses: actions/checkout@v2 diff --git a/customSDK/servicefabric/__init__.py b/customSDK/servicefabric/__init__.py index dc572712..258ad470 100644 --- a/customSDK/servicefabric/__init__.py +++ b/customSDK/servicefabric/__init__.py @@ -6,10 +6,15 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._service_fabric_client_apis import ServiceFabricClientAPIs +from ._client import ServiceFabricClientAPIs + +try: + from ._patch import __all__ as _patch_all + from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk __all__ = ['ServiceFabricClientAPIs'] +__all__.extend([p for p in _patch_all if p not in __all__]) -# `._patch.py` is used for handwritten extensions to the generated code -# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -from ._patch import patch_sdk -patch_sdk() +_patch_sdk() diff --git a/customSDK/servicefabric/_service_fabric_client_apis.py b/customSDK/servicefabric/_client.py similarity index 70% rename from customSDK/servicefabric/_service_fabric_client_apis.py rename to customSDK/servicefabric/_client.py index 8fb50013..2f78b88e 100644 --- a/customSDK/servicefabric/_service_fabric_client_apis.py +++ b/customSDK/servicefabric/_client.py @@ -7,22 +7,21 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import TYPE_CHECKING +from typing import Any, TYPE_CHECKING from msrest import Deserializer, Serializer +from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient -from . import models from ._configuration import ServiceFabricClientAPIsConfiguration from .operations import MeshApplicationOperations, MeshCodePackageOperations, MeshGatewayOperations, MeshNetworkOperations, MeshSecretOperations, MeshSecretValueOperations, MeshServiceOperations, MeshServiceReplicaOperations, MeshVolumeOperations, ServiceFabricClientAPIsOperationsMixin if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any + from typing import Dict from azure.core.credentials import TokenCredential - from azure.core.rest import HttpRequest, HttpResponse class ServiceFabricClientAPIs(ServiceFabricClientAPIsOperationsMixin): # pylint: disable=too-many-instance-attributes """Service Fabric REST Client APIs allows management of Service Fabric clusters, applications and @@ -48,8 +47,8 @@ class ServiceFabricClientAPIs(ServiceFabricClientAPIsOperationsMixin): # pyli :vartype mesh_gateway: azure.servicefabric.operations.MeshGatewayOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param base_url: Service URL. Default value is "http://localhost:19080/". - :type base_url: str + :keyword endpoint: Service URL. Default value is "http://localhost:19080/". + :paramtype endpoint: str :keyword api_version: Api Version. Default value is "9.0.0.46". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str @@ -57,41 +56,58 @@ class ServiceFabricClientAPIs(ServiceFabricClientAPIsOperationsMixin): # pyli def __init__( self, - credential, # type: "TokenCredential" - base_url="http://localhost:19080/", # type: str - **kwargs # type: Any - ): - # type: (...) -> None + credential: "TokenCredential", + *, + endpoint: str = "http://localhost:19080/", + **kwargs: Any + ) -> None: + self._config = ServiceFabricClientAPIsConfiguration(credential=credential, **kwargs) - self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client = ARMPipelineClient(base_url=endpoint, config=self._config, **kwargs) - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.mesh_secret = MeshSecretOperations(self._client, self._config, self._serialize, self._deserialize) - self.mesh_secret_value = MeshSecretValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.mesh_volume = MeshVolumeOperations(self._client, self._config, self._serialize, self._deserialize) - self.mesh_network = MeshNetworkOperations(self._client, self._config, self._serialize, self._deserialize) - self.mesh_application = MeshApplicationOperations(self._client, self._config, self._serialize, self._deserialize) - self.mesh_service = MeshServiceOperations(self._client, self._config, self._serialize, self._deserialize) - self.mesh_code_package = MeshCodePackageOperations(self._client, self._config, self._serialize, self._deserialize) - self.mesh_service_replica = MeshServiceReplicaOperations(self._client, self._config, self._serialize, self._deserialize) - self.mesh_gateway = MeshGatewayOperations(self._client, self._config, self._serialize, self._deserialize) - - - def _send_request( + self.mesh_secret = MeshSecretOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_secret_value = MeshSecretValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_volume = MeshVolumeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_network = MeshNetworkOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_application = MeshApplicationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_service = MeshServiceOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_code_package = MeshCodePackageOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_service_replica = MeshServiceReplicaOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_gateway = MeshGatewayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + + + def send_request( self, - request, # type: HttpRequest - **kwargs # type: Any - ): - # type: (...) -> HttpResponse + request: HttpRequest, + **kwargs: Any + ) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest >>> request = HttpRequest("GET", "https://www.example.org/") - >>> response = client._send_request(request) + >>> response = client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart diff --git a/customSDK/servicefabric/_configuration.py b/customSDK/servicefabric/_configuration.py index db55caa7..264a2a08 100644 --- a/customSDK/servicefabric/_configuration.py +++ b/customSDK/servicefabric/_configuration.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import TYPE_CHECKING +from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies @@ -14,8 +14,6 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any - from azure.core.credentials import TokenCredential VERSION = "unknown" @@ -35,10 +33,9 @@ class ServiceFabricClientAPIsConfiguration(Configuration): # pylint: disable=to def __init__( self, - credential, # type: "TokenCredential" - **kwargs # type: Any - ): - # type: (...) -> None + credential: "TokenCredential", + **kwargs: Any + ) -> None: super(ServiceFabricClientAPIsConfiguration, self).__init__(**kwargs) api_version = kwargs.pop('api_version', "9.0.0.46") # type: str diff --git a/customSDK/servicefabric/_patch.py b/customSDK/servicefabric/_patch.py index 0f5b2a7c..0ad201a8 100644 --- a/customSDK/servicefabric/_patch.py +++ b/customSDK/servicefabric/_patch.py @@ -1,56 +1,19 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# -------------------------------------------------------------------------- +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. -# This file is used for handwritten extensions to the generated code. Example: -# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -def patch_sdk(): - pass - -# from ._service_fabric_client_apis import ServiceFabricClientAPIs as ServiceClientGenerated -# from azure.core.pipeline import PipelineRequest -# from azure.core.pipeline.policies import SansIOHTTPPolicy - -# class MyAuthenticationPolicy(SansIOHTTPPolicy): +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List -# def __init__(self, key: str): -# self.key = key +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level -# def on_request(self, request: PipelineRequest): -# # request.http_request.headers["Authorization"] = f"My key is {self.key}" -# return super().on_request(request) - -# class ServiceClient(ServiceClientGenerated): - -# def __init__(self, endpoint: str, credential: str, **kwargs): -# super().__init__( -# endpoint=endpoint, -# credential=credential, -# authentication_policy=kwargs.pop("authentication_policy", MyAuthenticationPolicy(credential)), -# **kwargs -# ) +def patch_sdk(): + """Do not remove from this file. -# __all__ = ["ServiceClient"] \ No newline at end of file + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/customSDK/servicefabric/_vendor.py b/customSDK/servicefabric/_vendor.py index 138f663c..4ff1a5f3 100644 --- a/customSDK/servicefabric/_vendor.py +++ b/customSDK/servicefabric/_vendor.py @@ -5,14 +5,17 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from azure.core.pipeline.transport import HttpRequest +from abc import ABC +from typing import TYPE_CHECKING + +from ._configuration import ServiceFabricClientAPIsConfiguration + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from msrest import Deserializer, Serializer + + from azure.core import PipelineClient -def _convert_request(request, files=None): - data = request.content if not files else None - request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) - if files: - request.set_formdata_body(files) - return request def _format_url_section(template, **kwargs): components = template.split("/") @@ -25,3 +28,10 @@ def _format_url_section(template, **kwargs): c for c in formatted_components if "{}".format(key.args[0]) not in c ] template = "/".join(components) + +class MixinABC(ABC): + """DO NOT use this class. It is for internal typing use only.""" + _client: "PipelineClient" + _config: ServiceFabricClientAPIsConfiguration + _serialize: "Serializer" + _deserialize: "Deserializer" diff --git a/customSDK/servicefabric/aio/__init__.py b/customSDK/servicefabric/aio/__init__.py index dc572712..258ad470 100644 --- a/customSDK/servicefabric/aio/__init__.py +++ b/customSDK/servicefabric/aio/__init__.py @@ -6,10 +6,15 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._service_fabric_client_apis import ServiceFabricClientAPIs +from ._client import ServiceFabricClientAPIs + +try: + from ._patch import __all__ as _patch_all + from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk __all__ = ['ServiceFabricClientAPIs'] +__all__.extend([p for p in _patch_all if p not in __all__]) -# `._patch.py` is used for handwritten extensions to the generated code -# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -from ._patch import patch_sdk -patch_sdk() +_patch_sdk() diff --git a/customSDK/servicefabric/aio/_service_fabric_client_apis.py b/customSDK/servicefabric/aio/_client.py similarity index 74% rename from customSDK/servicefabric/aio/_service_fabric_client_apis.py rename to customSDK/servicefabric/aio/_client.py index 20966a86..c8a704fb 100644 --- a/customSDK/servicefabric/aio/_service_fabric_client_apis.py +++ b/customSDK/servicefabric/aio/_client.py @@ -14,12 +14,13 @@ from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient -from .. import models from ._configuration import ServiceFabricClientAPIsConfiguration from .operations import MeshApplicationOperations, MeshCodePackageOperations, MeshGatewayOperations, MeshNetworkOperations, MeshSecretOperations, MeshSecretValueOperations, MeshServiceOperations, MeshServiceReplicaOperations, MeshVolumeOperations, ServiceFabricClientAPIsOperationsMixin if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports + from typing import Dict + from azure.core.credentials_async import AsyncTokenCredential class ServiceFabricClientAPIs(ServiceFabricClientAPIsOperationsMixin): # pylint: disable=too-many-instance-attributes @@ -46,8 +47,8 @@ class ServiceFabricClientAPIs(ServiceFabricClientAPIsOperationsMixin): # pyli :vartype mesh_gateway: azure.servicefabric.aio.operations.MeshGatewayOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param base_url: Service URL. Default value is "http://localhost:19080/". - :type base_url: str + :keyword endpoint: Service URL. Default value is "http://localhost:19080/". + :paramtype endpoint: str :keyword api_version: Api Version. Default value is "9.0.0.46". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str @@ -56,28 +57,46 @@ class ServiceFabricClientAPIs(ServiceFabricClientAPIsOperationsMixin): # pyli def __init__( self, credential: "AsyncTokenCredential", - base_url: str = "http://localhost:19080/", + *, + endpoint: str = "http://localhost:19080/", **kwargs: Any ) -> None: self._config = ServiceFabricClientAPIsConfiguration(credential=credential, **kwargs) - self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client = AsyncARMPipelineClient(base_url=endpoint, config=self._config, **kwargs) - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.mesh_secret = MeshSecretOperations(self._client, self._config, self._serialize, self._deserialize) - self.mesh_secret_value = MeshSecretValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.mesh_volume = MeshVolumeOperations(self._client, self._config, self._serialize, self._deserialize) - self.mesh_network = MeshNetworkOperations(self._client, self._config, self._serialize, self._deserialize) - self.mesh_application = MeshApplicationOperations(self._client, self._config, self._serialize, self._deserialize) - self.mesh_service = MeshServiceOperations(self._client, self._config, self._serialize, self._deserialize) - self.mesh_code_package = MeshCodePackageOperations(self._client, self._config, self._serialize, self._deserialize) - self.mesh_service_replica = MeshServiceReplicaOperations(self._client, self._config, self._serialize, self._deserialize) - self.mesh_gateway = MeshGatewayOperations(self._client, self._config, self._serialize, self._deserialize) - - - def _send_request( + self.mesh_secret = MeshSecretOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_secret_value = MeshSecretValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_volume = MeshVolumeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_network = MeshNetworkOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_application = MeshApplicationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_service = MeshServiceOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_code_package = MeshCodePackageOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_service_replica = MeshServiceReplicaOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_gateway = MeshGatewayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + + + def send_request( self, request: HttpRequest, **kwargs: Any @@ -87,7 +106,7 @@ def _send_request( >>> from azure.core.rest import HttpRequest >>> request = HttpRequest("GET", "https://www.example.org/") - >>> response = await client._send_request(request) + >>> response = await client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart diff --git a/customSDK/servicefabric/aio/_patch.py b/customSDK/servicefabric/aio/_patch.py index 74e48ecd..0ad201a8 100644 --- a/customSDK/servicefabric/aio/_patch.py +++ b/customSDK/servicefabric/aio/_patch.py @@ -1,31 +1,19 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# -------------------------------------------------------------------------- +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level -# This file is used for handwritten extensions to the generated code. Example: -# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): - pass \ No newline at end of file + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/customSDK/servicefabric/aio/_vendor.py b/customSDK/servicefabric/aio/_vendor.py new file mode 100644 index 00000000..d431f000 --- /dev/null +++ b/customSDK/servicefabric/aio/_vendor.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from abc import ABC +from typing import TYPE_CHECKING + +from ._configuration import ServiceFabricClientAPIsConfiguration + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from msrest import Deserializer, Serializer + + from azure.core import AsyncPipelineClient + + +class MixinABC(ABC): + """DO NOT use this class. It is for internal typing use only.""" + _client: "AsyncPipelineClient" + _config: ServiceFabricClientAPIsConfiguration + _serialize: "Serializer" + _deserialize: "Deserializer" diff --git a/customSDK/servicefabric/aio/operations/__init__.py b/customSDK/servicefabric/aio/operations/__init__.py index df6b66c5..645ce759 100644 --- a/customSDK/servicefabric/aio/operations/__init__.py +++ b/customSDK/servicefabric/aio/operations/__init__.py @@ -6,17 +6,20 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._service_fabric_client_apis_operations import ServiceFabricClientAPIsOperationsMixin -from ._mesh_secret_operations import MeshSecretOperations -from ._mesh_secret_value_operations import MeshSecretValueOperations -from ._mesh_volume_operations import MeshVolumeOperations -from ._mesh_network_operations import MeshNetworkOperations -from ._mesh_application_operations import MeshApplicationOperations -from ._mesh_service_operations import MeshServiceOperations -from ._mesh_code_package_operations import MeshCodePackageOperations -from ._mesh_service_replica_operations import MeshServiceReplicaOperations -from ._mesh_gateway_operations import MeshGatewayOperations +from ._operations import ServiceFabricClientAPIsOperationsMixin +from ._operations import MeshSecretOperations +from ._operations import MeshSecretValueOperations +from ._operations import MeshVolumeOperations +from ._operations import MeshNetworkOperations +from ._operations import MeshApplicationOperations +from ._operations import MeshServiceOperations +from ._operations import MeshCodePackageOperations +from ._operations import MeshServiceReplicaOperations +from ._operations import MeshGatewayOperations +from ._patch import __all__ as _patch_all +from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk __all__ = [ 'ServiceFabricClientAPIsOperationsMixin', 'MeshSecretOperations', @@ -29,3 +32,5 @@ 'MeshServiceReplicaOperations', 'MeshGatewayOperations', ] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() \ No newline at end of file diff --git a/customSDK/servicefabric/aio/operations/_mesh_application_operations.py b/customSDK/servicefabric/aio/operations/_mesh_application_operations.py deleted file mode 100644 index 0e07de49..00000000 --- a/customSDK/servicefabric/aio/operations/_mesh_application_operations.py +++ /dev/null @@ -1,333 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._mesh_application_operations import build_create_or_update_request, build_delete_request, build_get_request, build_get_upgrade_progress_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class MeshApplicationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s - :attr:`mesh_application` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace_async - async def create_or_update( - self, - application_resource_name: str, - application_resource_description: "_models.ApplicationResourceDescription", - **kwargs: Any - ) -> Optional["_models.ApplicationResourceDescription"]: - """Creates or updates a Application resource. - - Creates a Application resource with the specified name, description and properties. If - Application resource with the same name exists, then it is updated with the specified - description and properties. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param application_resource_description: Description for creating a Application resource. - :type application_resource_description: - ~azure.servicefabric.models.ApplicationResourceDescription - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationResourceDescription or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationResourceDescription"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(application_resource_description, 'ApplicationResourceDescription') - - request = build_create_or_update_request( - application_resource_name=application_resource_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApplicationResourceDescription', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ApplicationResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_or_update.metadata = {'url': "/Resources/Applications/{applicationResourceName}"} # type: ignore - - - @distributed_trace_async - async def get( - self, - application_resource_name: str, - **kwargs: Any - ) -> "_models.ApplicationResourceDescription": - """Gets the Application resource with the given name. - - Gets the information about the Application resource with the given name. The information - include the description and other properties of the Application. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationResourceDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationResourceDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_request( - application_resource_name=application_resource_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/Resources/Applications/{applicationResourceName}"} # type: ignore - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - application_resource_name: str, - **kwargs: Any - ) -> None: - """Deletes the Application resource. - - Deletes the Application resource identified by the name. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_request( - application_resource_name=application_resource_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': "/Resources/Applications/{applicationResourceName}"} # type: ignore - - - @distributed_trace_async - async def list( - self, - **kwargs: Any - ) -> "_models.PagedApplicationResourceDescriptionList": - """Lists all the application resources. - - Gets the information about all application resources in a given resource group. The information - include the description and other properties of the Application. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedApplicationResourceDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedApplicationResourceDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedApplicationResourceDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_list_request( - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedApplicationResourceDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - list.metadata = {'url': "/Resources/Applications"} # type: ignore - - - @distributed_trace_async - async def get_upgrade_progress( - self, - application_resource_name: str, - **kwargs: Any - ) -> "_models.ApplicationResourceUpgradeProgressInfo": - """Gets the progress of the latest upgrade performed on this application resource. - - Gets the upgrade progress information about the Application resource with the given name. The - information include percentage of completion and other upgrade state information of the - Application resource. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationResourceUpgradeProgressInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationResourceUpgradeProgressInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationResourceUpgradeProgressInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_upgrade_progress_request( - application_resource_name=application_resource_name, - api_version=api_version, - template_url=self.get_upgrade_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationResourceUpgradeProgressInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_upgrade_progress.metadata = {'url': "/Resources/Applications/{applicationResourceName}/$/GetUpgradeProgress"} # type: ignore - diff --git a/customSDK/servicefabric/aio/operations/_mesh_code_package_operations.py b/customSDK/servicefabric/aio/operations/_mesh_code_package_operations.py deleted file mode 100644 index 18f738e8..00000000 --- a/customSDK/servicefabric/aio/operations/_mesh_code_package_operations.py +++ /dev/null @@ -1,115 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._mesh_code_package_operations import build_get_container_logs_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class MeshCodePackageOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s - :attr:`mesh_code_package` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace_async - async def get_container_logs( - self, - application_resource_name: str, - service_resource_name: str, - replica_name: str, - code_package_name: str, - tail: Optional[str] = None, - **kwargs: Any - ) -> "_models.ContainerLogs": - """Gets the logs from the container. - - Gets the logs for the container of the specified code package of the service replica. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :param replica_name: Service Fabric replica name. - :type replica_name: str - :param code_package_name: The name of code package of the service. - :type code_package_name: str - :param tail: Number of lines to show from the end of the logs. Default is 100. 'all' to show - the complete logs. - :type tail: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ContainerLogs, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ContainerLogs - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerLogs"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_container_logs_request( - application_resource_name=application_resource_name, - service_resource_name=service_resource_name, - replica_name=replica_name, - code_package_name=code_package_name, - api_version=api_version, - tail=tail, - template_url=self.get_container_logs.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ContainerLogs', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_container_logs.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}/CodePackages/{codePackageName}/Logs"} # type: ignore - diff --git a/customSDK/servicefabric/aio/operations/_mesh_gateway_operations.py b/customSDK/servicefabric/aio/operations/_mesh_gateway_operations.py deleted file mode 100644 index 901d7b1a..00000000 --- a/customSDK/servicefabric/aio/operations/_mesh_gateway_operations.py +++ /dev/null @@ -1,274 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._mesh_gateway_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class MeshGatewayOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s - :attr:`mesh_gateway` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace_async - async def create_or_update( - self, - gateway_resource_name: str, - gateway_resource_description: "_models.GatewayResourceDescription", - **kwargs: Any - ) -> Optional["_models.GatewayResourceDescription"]: - """Creates or updates a Gateway resource. - - Creates a Gateway resource with the specified name, description and properties. If Gateway - resource with the same name exists, then it is updated with the specified description and - properties. Use Gateway resource to provide public connectivity to application services. - - :param gateway_resource_name: The identity of the gateway. - :type gateway_resource_name: str - :param gateway_resource_description: Description for creating a Gateway resource. - :type gateway_resource_description: ~azure.servicefabric.models.GatewayResourceDescription - :keyword callable cls: A custom type or function that will be passed the direct response - :return: GatewayResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.GatewayResourceDescription or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GatewayResourceDescription"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(gateway_resource_description, 'GatewayResourceDescription') - - request = build_create_or_update_request( - gateway_resource_name=gateway_resource_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('GatewayResourceDescription', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('GatewayResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_or_update.metadata = {'url': "/Resources/Gateways/{gatewayResourceName}"} # type: ignore - - - @distributed_trace_async - async def get( - self, - gateway_resource_name: str, - **kwargs: Any - ) -> "_models.GatewayResourceDescription": - """Gets the Gateway resource with the given name. - - Gets the information about the Gateway resource with the given name. The information include - the description and other properties of the Gateway. - - :param gateway_resource_name: The identity of the gateway. - :type gateway_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: GatewayResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.GatewayResourceDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.GatewayResourceDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_request( - gateway_resource_name=gateway_resource_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('GatewayResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/Resources/Gateways/{gatewayResourceName}"} # type: ignore - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - gateway_resource_name: str, - **kwargs: Any - ) -> None: - """Deletes the Gateway resource. - - Deletes the Gateway resource identified by the name. - - :param gateway_resource_name: The identity of the gateway. - :type gateway_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_request( - gateway_resource_name=gateway_resource_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': "/Resources/Gateways/{gatewayResourceName}"} # type: ignore - - - @distributed_trace_async - async def list( - self, - **kwargs: Any - ) -> "_models.PagedGatewayResourceDescriptionList": - """Lists all the gateway resources. - - Gets the information about all gateway resources in a given resource group. The information - include the description and other properties of the Gateway. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedGatewayResourceDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedGatewayResourceDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedGatewayResourceDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_list_request( - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedGatewayResourceDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - list.metadata = {'url': "/Resources/Gateways"} # type: ignore - diff --git a/customSDK/servicefabric/aio/operations/_mesh_network_operations.py b/customSDK/servicefabric/aio/operations/_mesh_network_operations.py deleted file mode 100644 index ae9ba441..00000000 --- a/customSDK/servicefabric/aio/operations/_mesh_network_operations.py +++ /dev/null @@ -1,278 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._mesh_network_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class MeshNetworkOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s - :attr:`mesh_network` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace_async - async def create_or_update( - self, - network_resource_name: str, - name: str, - properties: "_models.NetworkResourceProperties", - **kwargs: Any - ) -> Optional["_models.NetworkResourceDescription"]: - """Creates or updates a Network resource. - - Creates a Network resource with the specified name, description and properties. If Network - resource with the same name exists, then it is updated with the specified description and - properties. Network resource provides connectivity between application services. - - :param network_resource_name: The identity of the network. - :type network_resource_name: str - :param name: Name of the Network resource. - :type name: str - :param properties: Describes properties of a network resource. - :type properties: ~azure.servicefabric.models.NetworkResourceProperties - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.NetworkResourceDescription or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NetworkResourceDescription"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _network_resource_description = _models.NetworkResourceDescription(name=name, properties=properties) - _json = self._serialize.body(_network_resource_description, 'NetworkResourceDescription') - - request = build_create_or_update_request( - network_resource_name=network_resource_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NetworkResourceDescription', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('NetworkResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_or_update.metadata = {'url': "/Resources/Networks/{networkResourceName}"} # type: ignore - - - @distributed_trace_async - async def get( - self, - network_resource_name: str, - **kwargs: Any - ) -> "_models.NetworkResourceDescription": - """Gets the Network resource with the given name. - - Gets the information about the Network resource with the given name. The information include - the description and other properties of the Network. - - :param network_resource_name: The identity of the network. - :type network_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.NetworkResourceDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkResourceDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_request( - network_resource_name=network_resource_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/Resources/Networks/{networkResourceName}"} # type: ignore - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - network_resource_name: str, - **kwargs: Any - ) -> None: - """Deletes the Network resource. - - Deletes the Network resource identified by the name. - - :param network_resource_name: The identity of the network. - :type network_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_request( - network_resource_name=network_resource_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': "/Resources/Networks/{networkResourceName}"} # type: ignore - - - @distributed_trace_async - async def list( - self, - **kwargs: Any - ) -> "_models.PagedNetworkResourceDescriptionList": - """Lists all the network resources. - - Gets the information about all network resources in a given resource group. The information - include the description and other properties of the Network. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedNetworkResourceDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedNetworkResourceDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedNetworkResourceDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_list_request( - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedNetworkResourceDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - list.metadata = {'url': "/Resources/Networks"} # type: ignore - diff --git a/customSDK/servicefabric/aio/operations/_mesh_secret_operations.py b/customSDK/servicefabric/aio/operations/_mesh_secret_operations.py deleted file mode 100644 index 07a091ad..00000000 --- a/customSDK/servicefabric/aio/operations/_mesh_secret_operations.py +++ /dev/null @@ -1,278 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._mesh_secret_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class MeshSecretOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s - :attr:`mesh_secret` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace_async - async def create_or_update( - self, - secret_resource_name: str, - properties: "_models.SecretResourceProperties", - name: str, - **kwargs: Any - ) -> Optional["_models.SecretResourceDescription"]: - """Creates or updates a Secret resource. - - Creates a Secret resource with the specified name, description and properties. If Secret - resource with the same name exists, then it is updated with the specified description and - properties. Once created, the kind and contentType of a secret resource cannot be updated. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param properties: Describes the properties of a secret resource. - :type properties: ~azure.servicefabric.models.SecretResourceProperties - :param name: Name of the Secret resource. - :type name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecretResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.SecretResourceDescription or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SecretResourceDescription"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _secret_resource_description = _models.SecretResourceDescription(properties=properties, name=name) - _json = self._serialize.body(_secret_resource_description, 'SecretResourceDescription') - - request = build_create_or_update_request( - secret_resource_name=secret_resource_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SecretResourceDescription', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('SecretResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_or_update.metadata = {'url': "/Resources/Secrets/{secretResourceName}"} # type: ignore - - - @distributed_trace_async - async def get( - self, - secret_resource_name: str, - **kwargs: Any - ) -> "_models.SecretResourceDescription": - """Gets the Secret resource with the given name. - - Gets the information about the Secret resource with the given name. The information include the - description and other properties of the Secret. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecretResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.SecretResourceDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretResourceDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_request( - secret_resource_name=secret_resource_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SecretResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/Resources/Secrets/{secretResourceName}"} # type: ignore - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - secret_resource_name: str, - **kwargs: Any - ) -> None: - """Deletes the Secret resource. - - Deletes the specified Secret resource and all of its named values. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_request( - secret_resource_name=secret_resource_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': "/Resources/Secrets/{secretResourceName}"} # type: ignore - - - @distributed_trace_async - async def list( - self, - **kwargs: Any - ) -> "_models.PagedSecretResourceDescriptionList": - """Lists all the secret resources. - - Gets the information about all secret resources in a given resource group. The information - include the description and other properties of the Secret. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedSecretResourceDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedSecretResourceDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedSecretResourceDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_list_request( - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedSecretResourceDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - list.metadata = {'url': "/Resources/Secrets"} # type: ignore - diff --git a/customSDK/servicefabric/aio/operations/_mesh_secret_value_operations.py b/customSDK/servicefabric/aio/operations/_mesh_secret_value_operations.py deleted file mode 100644 index 99fc25ae..00000000 --- a/customSDK/servicefabric/aio/operations/_mesh_secret_value_operations.py +++ /dev/null @@ -1,359 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._mesh_secret_value_operations import build_add_value_request, build_delete_request, build_get_request, build_list_request, build_show_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class MeshSecretValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s - :attr:`mesh_secret_value` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace_async - async def add_value( - self, - secret_resource_name: str, - secret_value_resource_name: str, - name: str, - value: Optional[str] = None, - **kwargs: Any - ) -> Optional["_models.SecretValueResourceDescription"]: - """Adds the specified value as a new version of the specified secret resource. - - Creates a new value of the specified secret resource. The name of the value is typically the - version identifier. Once created the value cannot be changed. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource value which is typically the - version identifier for the value. - :type secret_value_resource_name: str - :param name: Version identifier of the secret value. - :type name: str - :param value: The actual value of the secret. Default value is None. - :type value: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecretValueResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.SecretValueResourceDescription or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SecretValueResourceDescription"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _secret_value_resource_description = _models.SecretValueResourceDescription(name=name, value=value) - _json = self._serialize.body(_secret_value_resource_description, 'SecretValueResourceDescription') - - request = build_add_value_request( - secret_resource_name=secret_resource_name, - secret_value_resource_name=secret_value_resource_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.add_value.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SecretValueResourceDescription', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('SecretValueResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - add_value.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}"} # type: ignore - - - @distributed_trace_async - async def get( - self, - secret_resource_name: str, - secret_value_resource_name: str, - **kwargs: Any - ) -> "_models.SecretValueResourceDescription": - """Gets the specified secret value resource. - - Get the information about the specified named secret value resources. The information does not - include the actual value of the secret. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource value which is typically the - version identifier for the value. - :type secret_value_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecretValueResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.SecretValueResourceDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretValueResourceDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_request( - secret_resource_name=secret_resource_name, - secret_value_resource_name=secret_value_resource_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SecretValueResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}"} # type: ignore - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - secret_resource_name: str, - secret_value_resource_name: str, - **kwargs: Any - ) -> None: - """Deletes the specified value of the named secret resource. - - Deletes the secret value resource identified by the name. The name of the resource is typically - the version associated with that value. Deletion will fail if the specified value is in use. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource value which is typically the - version identifier for the value. - :type secret_value_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_request( - secret_resource_name=secret_resource_name, - secret_value_resource_name=secret_value_resource_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}"} # type: ignore - - - @distributed_trace_async - async def list( - self, - secret_resource_name: str, - **kwargs: Any - ) -> "_models.PagedSecretValueResourceDescriptionList": - """List names of all values of the specified secret resource. - - Gets information about all secret value resources of the specified secret resource. The - information includes the names of the secret value resources, but not the actual values. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedSecretValueResourceDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedSecretValueResourceDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedSecretValueResourceDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_list_request( - secret_resource_name=secret_resource_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedSecretValueResourceDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - list.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values"} # type: ignore - - - @distributed_trace_async - async def show( - self, - secret_resource_name: str, - secret_value_resource_name: str, - **kwargs: Any - ) -> "_models.SecretValue": - """Lists the specified value of the secret resource. - - Lists the decrypted value of the specified named value of the secret resource. This is a - privileged operation. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource value which is typically the - version identifier for the value. - :type secret_value_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecretValue, or the result of cls(response) - :rtype: ~azure.servicefabric.models.SecretValue - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretValue"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_show_request( - secret_resource_name=secret_resource_name, - secret_value_resource_name=secret_value_resource_name, - api_version=api_version, - template_url=self.show.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SecretValue', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - show.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}/list_value"} # type: ignore - diff --git a/customSDK/servicefabric/aio/operations/_mesh_service_operations.py b/customSDK/servicefabric/aio/operations/_mesh_service_operations.py deleted file mode 100644 index 9c635127..00000000 --- a/customSDK/servicefabric/aio/operations/_mesh_service_operations.py +++ /dev/null @@ -1,160 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._mesh_service_operations import build_get_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class MeshServiceOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s - :attr:`mesh_service` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace_async - async def get( - self, - application_resource_name: str, - service_resource_name: str, - **kwargs: Any - ) -> "_models.ServiceResourceDescription": - """Gets the Service resource with the given name. - - Gets the information about the Service resource with the given name. The information include - the description and other properties of the Service. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceResourceDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResourceDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_request( - application_resource_name=application_resource_name, - service_resource_name=service_resource_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ServiceResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}"} # type: ignore - - - @distributed_trace_async - async def list( - self, - application_resource_name: str, - **kwargs: Any - ) -> "_models.PagedServiceResourceDescriptionList": - """Lists all the service resources. - - Gets the information about all services of an application resource. The information include the - description and other properties of the Service. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedServiceResourceDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedServiceResourceDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedServiceResourceDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_list_request( - application_resource_name=application_resource_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedServiceResourceDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - list.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services"} # type: ignore - diff --git a/customSDK/servicefabric/aio/operations/_mesh_service_replica_operations.py b/customSDK/servicefabric/aio/operations/_mesh_service_replica_operations.py deleted file mode 100644 index fa8f5d19..00000000 --- a/customSDK/servicefabric/aio/operations/_mesh_service_replica_operations.py +++ /dev/null @@ -1,168 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._mesh_service_replica_operations import build_get_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class MeshServiceReplicaOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s - :attr:`mesh_service_replica` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace_async - async def get( - self, - application_resource_name: str, - service_resource_name: str, - replica_name: str, - **kwargs: Any - ) -> "_models.ServiceReplicaDescription": - """Gets the given replica of the service of an application. - - Gets the information about the service replica with the given name. The information include the - description and other properties of the service replica. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :param replica_name: Service Fabric replica name. - :type replica_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceReplicaDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceReplicaDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceReplicaDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_request( - application_resource_name=application_resource_name, - service_resource_name=service_resource_name, - replica_name=replica_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ServiceReplicaDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}"} # type: ignore - - - @distributed_trace_async - async def list( - self, - application_resource_name: str, - service_resource_name: str, - **kwargs: Any - ) -> "_models.PagedServiceReplicaDescriptionList": - """Lists all the replicas of a service. - - Gets the information about all replicas of a service. The information include the description - and other properties of the service replica. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedServiceReplicaDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedServiceReplicaDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedServiceReplicaDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_list_request( - application_resource_name=application_resource_name, - service_resource_name=service_resource_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedServiceReplicaDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - list.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas"} # type: ignore - diff --git a/customSDK/servicefabric/aio/operations/_mesh_volume_operations.py b/customSDK/servicefabric/aio/operations/_mesh_volume_operations.py deleted file mode 100644 index 11372894..00000000 --- a/customSDK/servicefabric/aio/operations/_mesh_volume_operations.py +++ /dev/null @@ -1,274 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._mesh_volume_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class MeshVolumeOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s - :attr:`mesh_volume` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace_async - async def create_or_update( - self, - volume_resource_name: str, - volume_resource_description: "_models.VolumeResourceDescription", - **kwargs: Any - ) -> Optional["_models.VolumeResourceDescription"]: - """Creates or updates a Volume resource. - - Creates a Volume resource with the specified name, description and properties. If Volume - resource with the same name exists, then it is updated with the specified description and - properties. - - :param volume_resource_name: The identity of the volume. - :type volume_resource_name: str - :param volume_resource_description: Description for creating a Volume resource. - :type volume_resource_description: ~azure.servicefabric.models.VolumeResourceDescription - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VolumeResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.VolumeResourceDescription or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VolumeResourceDescription"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(volume_resource_description, 'VolumeResourceDescription') - - request = build_create_or_update_request( - volume_resource_name=volume_resource_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VolumeResourceDescription', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('VolumeResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_or_update.metadata = {'url': "/Resources/Volumes/{volumeResourceName}"} # type: ignore - - - @distributed_trace_async - async def get( - self, - volume_resource_name: str, - **kwargs: Any - ) -> "_models.VolumeResourceDescription": - """Gets the Volume resource with the given name. - - Gets the information about the Volume resource with the given name. The information include the - description and other properties of the Volume. - - :param volume_resource_name: The identity of the volume. - :type volume_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VolumeResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.VolumeResourceDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VolumeResourceDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_request( - volume_resource_name=volume_resource_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('VolumeResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/Resources/Volumes/{volumeResourceName}"} # type: ignore - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - volume_resource_name: str, - **kwargs: Any - ) -> None: - """Deletes the Volume resource. - - Deletes the Volume resource identified by the name. - - :param volume_resource_name: The identity of the volume. - :type volume_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_request( - volume_resource_name=volume_resource_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': "/Resources/Volumes/{volumeResourceName}"} # type: ignore - - - @distributed_trace_async - async def list( - self, - **kwargs: Any - ) -> "_models.PagedVolumeResourceDescriptionList": - """Lists all the volume resources. - - Gets the information about all volume resources in a given resource group. The information - include the description and other properties of the Volume. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedVolumeResourceDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedVolumeResourceDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedVolumeResourceDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_list_request( - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedVolumeResourceDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - list.metadata = {'url': "/Resources/Volumes"} # type: ignore - diff --git a/customSDK/servicefabric/aio/operations/_operations.py b/customSDK/servicefabric/aio/operations/_operations.py new file mode 100644 index 00000000..aea72ec1 --- /dev/null +++ b/customSDK/servicefabric/aio/operations/_operations.py @@ -0,0 +1,38973 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +import sys +from typing import Any, Callable, Dict, List, Optional, TypeVar, cast + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ...operations._operations import build_add_configuration_parameter_overrides_request, build_add_node_tags_request, build_backup_partition_request, build_cancel_operation_request, build_cancel_repair_task_request, build_commit_image_store_upload_session_request, build_copy_image_store_content_request, build_create_application_request, build_create_backup_policy_request, build_create_compose_deployment_request, build_create_name_request, build_create_repair_task_request, build_create_service_from_template_request, build_create_service_request, build_delete_application_request, build_delete_backup_policy_request, build_delete_image_store_content_request, build_delete_image_store_upload_session_request, build_delete_name_request, build_delete_property_request, build_delete_repair_task_request, build_delete_service_request, build_deploy_service_package_to_node_request, build_disable_application_backup_request, build_disable_node_request, build_disable_partition_backup_request, build_disable_service_backup_request, build_enable_application_backup_request, build_enable_node_request, build_enable_partition_backup_request, build_enable_service_backup_request, build_force_approve_repair_task_request, build_get_aad_metadata_request, build_get_all_entities_backed_up_by_policy_request, build_get_application_backup_configuration_info_request, build_get_application_backup_list_request, build_get_application_event_list_request, build_get_application_health_request, build_get_application_health_using_policy_request, build_get_application_info_list_request, build_get_application_info_request, build_get_application_load_info_request, build_get_application_manifest_request, build_get_application_name_info_request, build_get_application_type_info_list_by_name_request, build_get_application_type_info_list_request, build_get_application_upgrade_request, build_get_applications_event_list_request, build_get_backup_policy_by_name_request, build_get_backup_policy_list_request, build_get_backups_from_backup_location_request, build_get_chaos_events_request, build_get_chaos_request, build_get_chaos_schedule_request, build_get_cluster_configuration_request, build_get_cluster_configuration_upgrade_status_request, build_get_cluster_event_list_request, build_get_cluster_health_chunk_request, build_get_cluster_health_chunk_using_policy_and_advanced_filters_request, build_get_cluster_health_request, build_get_cluster_health_using_policy_request, build_get_cluster_load_request, build_get_cluster_manifest_request, build_get_cluster_upgrade_progress_request, build_get_cluster_version_request, build_get_compose_deployment_status_list_request, build_get_compose_deployment_status_request, build_get_compose_deployment_upgrade_progress_request, build_get_configuration_overrides_request, build_get_container_logs_deployed_on_node_request, build_get_containers_event_list_request, build_get_correlated_event_list_request, build_get_data_loss_progress_request, build_get_deployed_application_health_request, build_get_deployed_application_health_using_policy_request, build_get_deployed_application_info_list_request, build_get_deployed_application_info_request, build_get_deployed_code_package_info_list_request, build_get_deployed_service_package_health_request, build_get_deployed_service_package_health_using_policy_request, build_get_deployed_service_package_info_list_by_name_request, build_get_deployed_service_package_info_list_request, build_get_deployed_service_replica_detail_info_by_partition_id_request, build_get_deployed_service_replica_detail_info_request, build_get_deployed_service_replica_info_list_request, build_get_deployed_service_type_info_by_name_request, build_get_deployed_service_type_info_list_request, build_get_fault_operation_list_request, build_get_image_store_content_request, build_get_image_store_folder_size_request, build_get_image_store_info_request, build_get_image_store_root_content_request, build_get_image_store_root_folder_size_request, build_get_image_store_upload_session_by_id_request, build_get_image_store_upload_session_by_path_request, build_get_loaded_partition_info_list_request, build_get_name_exists_info_request, build_get_node_event_list_request, build_get_node_health_request, build_get_node_health_using_policy_request, build_get_node_info_list_request, build_get_node_info_request, build_get_node_load_info_request, build_get_node_transition_progress_request, build_get_nodes_event_list_request, build_get_partition_backup_configuration_info_request, build_get_partition_backup_list_request, build_get_partition_backup_progress_request, build_get_partition_event_list_request, build_get_partition_health_request, build_get_partition_health_using_policy_request, build_get_partition_info_list_request, build_get_partition_info_request, build_get_partition_load_information_request, build_get_partition_replica_event_list_request, build_get_partition_replicas_event_list_request, build_get_partition_restart_progress_request, build_get_partition_restore_progress_request, build_get_partitions_event_list_request, build_get_property_info_list_request, build_get_property_info_request, build_get_provisioned_fabric_code_version_info_list_request, build_get_provisioned_fabric_config_version_info_list_request, build_get_quorum_loss_progress_request, build_get_repair_task_list_request, build_get_replica_health_request, build_get_replica_health_using_policy_request, build_get_replica_info_list_request, build_get_replica_info_request, build_get_service_backup_configuration_info_request, build_get_service_backup_list_request, build_get_service_description_request, build_get_service_event_list_request, build_get_service_health_request, build_get_service_health_using_policy_request, build_get_service_info_list_request, build_get_service_info_request, build_get_service_manifest_request, build_get_service_name_info_request, build_get_service_type_info_by_name_request, build_get_service_type_info_list_request, build_get_services_event_list_request, build_get_sub_name_info_list_request, build_get_unplaced_replica_information_request, build_get_upgrade_orchestration_service_state_request, build_invoke_container_api_request, build_invoke_infrastructure_command_request, build_invoke_infrastructure_query_request, build_mesh_application_create_or_update_request, build_mesh_application_delete_request, build_mesh_application_get_request, build_mesh_application_get_upgrade_progress_request, build_mesh_application_list_request, build_mesh_code_package_get_container_logs_request, build_mesh_gateway_create_or_update_request, build_mesh_gateway_delete_request, build_mesh_gateway_get_request, build_mesh_gateway_list_request, build_mesh_network_create_or_update_request, build_mesh_network_delete_request, build_mesh_network_get_request, build_mesh_network_list_request, build_mesh_secret_create_or_update_request, build_mesh_secret_delete_request, build_mesh_secret_get_request, build_mesh_secret_list_request, build_mesh_secret_value_add_value_request, build_mesh_secret_value_delete_request, build_mesh_secret_value_get_request, build_mesh_secret_value_list_request, build_mesh_secret_value_show_request, build_mesh_service_get_request, build_mesh_service_list_request, build_mesh_service_replica_get_request, build_mesh_service_replica_list_request, build_mesh_volume_create_or_update_request, build_mesh_volume_delete_request, build_mesh_volume_get_request, build_mesh_volume_list_request, build_move_auxiliary_replica_request, build_move_instance_request, build_move_primary_replica_request, build_move_secondary_replica_request, build_post_chaos_schedule_request, build_provision_application_type_request, build_provision_cluster_request, build_put_property_request, build_recover_all_partitions_request, build_recover_partition_request, build_recover_service_partitions_request, build_recover_system_partitions_request, build_remove_compose_deployment_request, build_remove_configuration_overrides_request, build_remove_node_state_request, build_remove_node_tags_request, build_remove_replica_request, build_report_application_health_request, build_report_cluster_health_request, build_report_deployed_application_health_request, build_report_deployed_service_package_health_request, build_report_node_health_request, build_report_partition_health_request, build_report_replica_health_request, build_report_service_health_request, build_reset_partition_load_request, build_resolve_service_request, build_restart_deployed_code_package_request, build_restart_node_request, build_restart_replica_request, build_restore_partition_request, build_resume_application_backup_request, build_resume_application_upgrade_request, build_resume_cluster_upgrade_request, build_resume_partition_backup_request, build_resume_service_backup_request, build_rollback_application_upgrade_request, build_rollback_cluster_upgrade_request, build_set_upgrade_orchestration_service_state_request, build_start_application_upgrade_request, build_start_chaos_request, build_start_cluster_configuration_upgrade_request, build_start_cluster_upgrade_request, build_start_compose_deployment_upgrade_request, build_start_data_loss_request, build_start_node_transition_request, build_start_partition_restart_request, build_start_quorum_loss_request, build_start_rollback_compose_deployment_upgrade_request, build_stop_chaos_request, build_submit_property_batch_request, build_suspend_application_backup_request, build_suspend_partition_backup_request, build_suspend_service_backup_request, build_toggle_verbose_service_placement_health_reporting_request, build_unprovision_application_type_request, build_unprovision_cluster_request, build_update_application_arm_metadata_request, build_update_application_request, build_update_application_type_arm_metadata_request, build_update_application_upgrade_request, build_update_backup_policy_request, build_update_cluster_upgrade_request, build_update_partition_load_request, build_update_repair_execution_state_request, build_update_repair_task_health_policy_request, build_update_service_arm_metadata_request, build_update_service_request, build_upload_file_chunk_request, build_upload_file_request, build_validate_cluster_upgrade_request +from .._vendor import MixinABC +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServiceFabricClientAPIsOperationsMixin(MixinABC): # pylint: disable=too-many-public-methods + + @distributed_trace_async + async def get_cluster_manifest( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the Service Fabric cluster manifest. + + Get the Service Fabric cluster manifest. The cluster manifest contains properties of the + cluster that include different node types on the cluster, + security configurations, fault, and upgrade domain topologies, etc. + + These properties are specified as part of the ClusterConfig.JSON file while deploying a + stand-alone cluster. However, most of the information in the cluster manifest + is generated internally by service fabric during cluster deployment in other deployment + scenarios (e.g. when using Azure portal). + + The contents of the cluster manifest are for informational purposes only and users are not + expected to take a dependency on the format of the file contents or its interpretation. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Manifest": "str" # Optional. The contents of the cluster manifest file. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_cluster_manifest_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_cluster_health( + self, + *, + nodes_health_state_filter: Optional[int] = 0, + applications_health_state_filter: Optional[int] = 0, + events_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + include_system_application_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric cluster. + + Use EventsHealthStateFilter to filter the collection of health events reported on the cluster + based on the health state. + Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the + collection of nodes and applications returned based on their aggregated health state. + + :keyword nodes_health_state_filter: Allows filtering of the node health state objects returned + in the result of cluster health query + based on their health state. The possible values for this parameter include integer value of + one of the + following health states. Only nodes that match the filter are returned. All nodes are used to + evaluate the aggregated health state. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of nodes with HealthState value of + OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype nodes_health_state_filter: int + :keyword applications_health_state_filter: Allows filtering of the application health state + objects returned in the result of cluster health + query based on their health state. + The possible values for this parameter include integer value obtained from members or bitwise + operations + on members of HealthStateFilter enumeration. Only applications that match the filter are + returned. + All applications are used to evaluate the aggregated health state. If not specified, all + entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of applications with HealthState + value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype applications_health_state_filter: int + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword include_system_application_health_statistics: Indicates whether the health statistics + should include the fabric:/System application health statistics. False by default. + If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the + entities that belong to the fabric:/System application. + Otherwise, the query result includes health statistics only for user applications. + The health statistics must be included in the query result for this parameter to be applied. + Default value is False. + :paramtype include_system_application_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "ApplicationHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "Name": "str" # Optional. The name of the application, + including the 'fabric:' URI scheme. + } + ], + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "NodeHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "Id": { + "Id": "str" # Optional. Value of the node Id. This + is a 128 bit integer. + }, + "Name": "str" # Optional. The name of a Service Fabric node. + } + ], + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_cluster_health_request( + api_version=api_version, + nodes_health_state_filter=nodes_health_state_filter, + applications_health_state_filter=applications_health_state_filter, + events_health_state_filter=events_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + include_system_application_health_statistics=include_system_application_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_cluster_health_using_policy( + self, + cluster_health_policies: Optional[JSON] = None, + *, + nodes_health_state_filter: Optional[int] = 0, + applications_health_state_filter: Optional[int] = 0, + events_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + include_system_application_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric cluster using the specified policy. + + Use EventsHealthStateFilter to filter the collection of health events reported on the cluster + based on the health state. + Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the + collection of nodes and applications returned based on their aggregated health state. + Use ClusterHealthPolicies to override the health policies used to evaluate the health. + + :param cluster_health_policies: Describes the health policies used to evaluate the cluster + health. + If not present, the health evaluation uses the cluster health policy defined in the cluster + manifest or the default cluster health policy. + By default, each application is evaluated using its specific application health policy, + defined in the application manifest, or the default health policy, if no policy is defined in + manifest. + If the application health policy map is specified, and it has an entry for an application, the + specified application health policy + is used to evaluate the application health. Default value is None. + :type cluster_health_policies: JSON + :keyword nodes_health_state_filter: Allows filtering of the node health state objects returned + in the result of cluster health query + based on their health state. The possible values for this parameter include integer value of + one of the + following health states. Only nodes that match the filter are returned. All nodes are used to + evaluate the aggregated health state. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of nodes with HealthState value of + OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype nodes_health_state_filter: int + :keyword applications_health_state_filter: Allows filtering of the application health state + objects returned in the result of cluster health + query based on their health state. + The possible values for this parameter include integer value obtained from members or bitwise + operations + on members of HealthStateFilter enumeration. Only applications that match the filter are + returned. + All applications are used to evaluate the aggregated health state. If not specified, all + entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of applications with HealthState + value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype applications_health_state_filter: int + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword include_system_application_health_statistics: Indicates whether the health statistics + should include the fabric:/System application health statistics. False by default. + If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the + entities that belong to the fabric:/System application. + Otherwise, the query result includes health statistics only for user applications. + The health statistics must be included in the query result for this parameter to be applied. + Default value is False. + :paramtype include_system_application_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + cluster_health_policies = { + "ApplicationHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application health + policy map item. This is the name of the application. + "Value": { + "ConsiderWarningAsError": bool, # Optional. + Indicates whether warnings are treated with the same severity as + errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, + # Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte values from zero + to 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the service + is considered in error."nIf the percentage is respected but there + is at least one unhealthy partition, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, + # Optional. The maximum allowed percentage of unhealthy replicas + per partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the partition + is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. + The maximum allowed percentage of unhealthy services. Allowed + values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of services that can + be unhealthy before the application is considered in error."nIf + the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated + by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific + service type."nThe computation rounds up to tolerate one failure + on small numbers of services. Default percentage is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # + Optional. The maximum allowed percentage of unhealthy deployed + applications. Allowed values are Byte values from zero to 100."nThe + percentage represents the maximum tolerated percentage of deployed + applications that can be unhealthy before the application is + considered in error."nThis is calculated by dividing the number of + unhealthy deployed applications over the number of nodes where the + application is currently deployed on in the cluster."nThe computation + rounds up to tolerate one failure on small numbers of nodes. Default + percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of + the service type health policy map item. This is the name of + the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte values + from zero to 100"n"nThe percentage represents the maximum + tolerated percentage of partitions that can be unhealthy + before the service is considered in error."nIf the + percentage is respected but there is at least one + unhealthy partition, the health is evaluated as + Warning."nThe percentage is calculated by dividing the + number of unhealthy partitions over the total number of + partitions in the service."nThe computation rounds up to + tolerate one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy + replicas per partition. Allowed values are Byte values + from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of replicas that can be + unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at + least one unhealthy replica, the health is evaluated as + Warning."nThe percentage is calculated by dividing the + number of unhealthy replicas over the total number of + replicas in the partition."nThe computation rounds up to + tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum + allowed percentage of unhealthy services. Allowed values + are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of services + that can be unhealthy before the application is + considered in error."nIf the percentage is respected but + there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the + number of unhealthy services of the specific service type + over the total number of services of the specific service + type."nThe computation rounds up to tolerate one failure + on small numbers of services. Default percentage is zero. + } + } + ] + } + } + ], + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + type health policy map item. This is the name of the application + type. + "Value": 0 # Required. The value of the application + type health policy map item."nThe max percent unhealthy applications + allowed for the application type. Must be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The maximum + allowed percentage of unhealthy applications before reporting an error. For + example, to allow 10% of applications to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated percentage of + applications that can be unhealthy before the cluster is considered in + error."nIf the percentage is respected but there is at least one unhealthy + application, the health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy applications over the total number of + application instances in the cluster, excluding applications of application + types that are included in the ApplicationTypeHealthPolicyMap."nThe + computation rounds up to tolerate one failure on small numbers of + applications. Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of unhealthy nodes before reporting an error. For example, to + allow 10% of nodes to be unhealthy, this value would be 10."n"nThe percentage + represents the maximum tolerated percentage of nodes that can be unhealthy + before the cluster is considered in error."nIf the percentage is respected + but there is at least one unhealthy node, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of unhealthy + nodes over the total number of nodes in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero."n"nIn large clusters, some nodes will always be down or out for + repairs, so this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the node type + health policy map item. This is the name of the node type. + "Value": 0 # Required. The value of the node type + health policy map item."nIf the percentage is respected but there is + at least one unhealthy node in the node type, the health is evaluated + as Warning. "nThe percentage is calculated by dividing the number of + unhealthy nodes over the total number of nodes in the node type. + "nThe computation rounds up to tolerate one failure on small numbers + of nodes."nThe max percent unhealthy nodes allowed for the node type. + Must be between zero and 100. + } + ] + } + } + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "ApplicationHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "Name": "str" # Optional. The name of the application, + including the 'fabric:' URI scheme. + } + ], + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "NodeHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "Id": { + "Id": "str" # Optional. Value of the node Id. This + is a 128 bit integer. + }, + "Name": "str" # Optional. The name of a Service Fabric node. + } + ], + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if cluster_health_policies is not None: + _json = cluster_health_policies + else: + _json = None + + request = build_get_cluster_health_using_policy_request( + api_version=api_version, + content_type=content_type, + json=_json, + nodes_health_state_filter=nodes_health_state_filter, + applications_health_state_filter=applications_health_state_filter, + events_health_state_filter=events_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + include_system_application_health_statistics=include_system_application_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_cluster_health_chunk( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric cluster using health chunks. + + Gets the health of a Service Fabric cluster using health chunks. Includes the aggregated health + state of the cluster, but none of the cluster entities. + To expand the cluster health and get the health state of all or some of the entities, use the + POST URI and specify the cluster health chunk query description. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ApplicationHealthStateChunks": { + "Items": [ + { + "ApplicationName": "str", # Optional. The name of + the application, including the 'fabric:' URI scheme. + "ApplicationTypeName": "str", # Optional. The + application type name as defined in the application manifest. + "DeployedApplicationHealthStateChunks": { + "Items": [ + { + "DeployedServicePackageHealthStateChunks": { + "Items": [ + { + "HealthState": "str", # Optional. The health + state of a Service Fabric entity such as + Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", + "Unknown". + "ServiceManifestName": "str", # Optional. + The name of the service manifest. + "ServicePackageActivationId": "str" # + Optional. The ActivationId of a deployed + service package. If + ServicePackageActivationMode specified at the + time of creating the service"nis + 'SharedProcess' (or if it is not specified, + in which case it defaults to + 'SharedProcess'), then value of + ServicePackageActivationId"nis always an + empty string. + } + ] + }, + "HealthState": "str", # + Optional. The health state of a Service Fabric entity + such as Cluster, Node, Application, Service, Partition, + Replica etc. Known values are: "Invalid", "Ok", + "Warning", "Error", "Unknown". + "NodeName": "str" # + Optional. The name of node where the application is + deployed. + } + ] + }, + "HealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, + Service, Partition, Replica etc. Known values are: "Invalid", "Ok", + "Warning", "Error", "Unknown". + "ServiceHealthStateChunks": { + "Items": [ + { + "HealthState": "str", # + Optional. The health state of a Service Fabric entity + such as Cluster, Node, Application, Service, Partition, + Replica etc. Known values are: "Invalid", "Ok", + "Warning", "Error", "Unknown". + "PartitionHealthStateChunks": + { + "Items": [ + { + "HealthState": "str", # Optional. The health + state of a Service Fabric entity such as + Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", + "Unknown". + "PartitionId": str, # Optional. The Id of + the partition. + "ReplicaHealthStateChunks": { + "Items": [ + { + "HealthState": "str", # + Optional. The health state of a + Service Fabric entity such as + Cluster, Node, Application, + Service, Partition, Replica etc. + Known values are: "Invalid", + "Ok", "Warning", "Error", + "Unknown". + "ReplicaOrInstanceId": "str" # + Optional. Id of a stateful + service replica or a stateless + service instance. This ID is used + in the queries that apply to both + stateful and stateless services. + It is used by Service Fabric to + uniquely identify a replica of a + partition of a stateful service + or an instance of a stateless + service partition. It is unique + within a partition and does not + change for the lifetime of the + replica or the instance. If a + stateful replica gets dropped and + another replica gets created on + the same node for the same + partition, it will get a + different value for the ID. If a + stateless instance is failed over + on the same or different node it + will get a different value for + the ID. + } + ] + } + } + ] + }, + "ServiceName": "str" # + Optional. The name of the service whose health state + chunk is provided in this object. + } + ] + } + } + ], + "TotalCount": 0.0 # Optional. Total number of entity health state + objects that match the specified filters from the cluster health chunk query + description. + }, + "HealthState": "str", # Optional. The HealthState representing the + aggregated health state of the cluster computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired cluster + health policy and the application health policies. Known values are: "Invalid", + "Ok", "Warning", "Error", "Unknown". + "NodeHealthStateChunks": { + "Items": [ + { + "HealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, + Service, Partition, Replica etc. Known values are: "Invalid", "Ok", + "Warning", "Error", "Unknown". + "NodeName": "str" # Optional. The name of a Service + Fabric node. + } + ], + "TotalCount": 0.0 # Optional. Total number of entity health state + objects that match the specified filters from the cluster health chunk query + description. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_cluster_health_chunk_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_cluster_health_chunk_using_policy_and_advanced_filters( + self, + cluster_health_chunk_query_description: Optional[JSON] = None, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric cluster using health chunks. + + Gets the health of a Service Fabric cluster using health chunks. The health evaluation is done + based on the input cluster health chunk query description. + The query description allows users to specify health policies for evaluating the cluster and + its children. + Users can specify very flexible filters to select which cluster entities to return. The + selection can be done based on the entities health state and based on the hierarchy. + The query can return multi-level children of the entities based on the specified filters. For + example, it can return one application with a specified name, and for this application, return + only services that are in Error or Warning, and all partitions and replicas for one of these + services. + + :param cluster_health_chunk_query_description: Describes the cluster and application health + policies used to evaluate the cluster health and the filters to select which cluster entities + to be returned. + If the cluster health policy is present, it is used to evaluate the cluster events and the + cluster nodes. If not present, the health evaluation uses the cluster health policy defined in + the cluster manifest or the default cluster health policy. + By default, each application is evaluated using its specific application health policy, + defined in the application manifest, or the default health policy, if no policy is defined in + manifest. + If the application health policy map is specified, and it has an entry for an application, the + specified application health policy + is used to evaluate the application health. + Users can specify very flexible filters to select which cluster entities to include in + response. The selection can be done based on the entities health state and based on the + hierarchy. + The query can return multi-level children of the entities based on the specified filters. For + example, it can return one application with a specified name, and for this application, return + only services that are in Error or Warning, and all partitions and replicas for one of these + services. Default value is None. + :type cluster_health_chunk_query_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + cluster_health_chunk_query_description = { + "ApplicationFilters": [ + { + "ApplicationNameFilter": "str", # Optional. The name of the + application that matches the filter, as a fabric uri. The filter is + applied only to the specified application, if it exists."nIf the + application doesn't exist, no application is returned in the cluster + health chunk based on this filter."nIf the application exists, it is + included in the cluster health chunk if it respects the other filter + properties."nIf not specified, all applications are matched against the + other filter members, like health state filter. + "ApplicationTypeNameFilter": "str", # Optional. The name of + the application type that matches the filter."nIf specified, the filter + is applied only to applications of the selected application type, if any + exists."nIf no applications of the specified application type exists, no + application is returned in the cluster health chunk based on this + filter."nEach application of the specified application type is included + in the cluster health chunk if it respects the other filter + properties."nIf not specified, all applications are matched against the + other filter members, like health state filter. + "DeployedApplicationFilters": [ + { + "DeployedServicePackageFilters": [ + { + "HealthStateFilter": 0, # + Optional. The filter for the health state of the deployed + service packages. It allows selecting deployed service + packages if they match the desired health states."nThe + possible values are integer value of one of the following + health states. Only deployed service packages that match + the filter are returned. All deployed service packages + are used to evaluate the parent deployed application + aggregated health state."nIf not specified, default value + is None, unless the deployed service package ID is + specified. If the filter has default value and deployed + service package ID is specified, the matching deployed + service package is returned."nThe state values are + flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' + operator."nFor example, if the provided value is 6, it + matches deployed service packages with HealthState value + of OK (2) and Warning (4)."n"n"n* Default - Default + value. Matches any HealthState. The value is zero."n* + None - Filter that doesn't match any HealthState value. + Used in order to return no results on a given collection + of states. The value is 1."n* Ok - Filter that matches + input with HealthState value Ok. The value is 2."n* + Warning - Filter that matches input with HealthState + value Warning. The value is 4."n* Error - Filter that + matches input with HealthState value Error. The value is + 8."n* All - Filter that matches input with any + HealthState value. The value is 65535. + "ServiceManifestNameFilter": + "str", # Optional. The name of the service manifest + which identifies the deployed service packages that + matches the filter."nIf specified, the filter is applied + only to the specified deployed service packages, if + any."nIf no deployed service packages with specified + manifest name exist, nothing is returned in the cluster + health chunk based on this filter."nIf any deployed + service package exists, they are included in the cluster + health chunk if it respects the other filter + properties."nIf not specified, all deployed service + packages that match the parent filters (if any) are taken + into consideration and matched against the other filter + members, like health state filter. + "ServicePackageActivationIdFilter": "str" # Optional. + The activation ID of a deployed service package that + matches the filter."nIf not specified, the filter applies + to all deployed service packages that match the other + parameters."nIf specified, the filter matches only the + deployed service package with the specified activation + ID. + } + ], + "HealthStateFilter": 0, # Optional. The + filter for the health state of the deployed applications. It + allows selecting deployed applications if they match the desired + health states."nThe possible values are integer value of one of + the following health states. Only deployed applications that + match the filter are returned. All deployed applications are used + to evaluate the cluster aggregated health state."nIf 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."nThe + state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' + operator."nFor example, if the provided value is 6, it matches + deployed applications with HealthState value of OK (2) and + Warning (4)."n"n"n* Default - Default value. Matches any + HealthState. The value is zero."n* None - Filter that doesn't + match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1."n* Ok - Filter + that matches input with HealthState value Ok. The value is 2."n* + Warning - Filter that matches input with HealthState value + Warning. The value is 4."n* Error - Filter that matches input + with HealthState value Error. The value is 8."n* All - Filter + that matches input with any HealthState value. The value is + 65535. + "NodeNameFilter": "str" # Optional. The name + of the node where the application is deployed in order to match + the filter."nIf specified, the filter is applied only to the + application deployed on the specified node."nIf the application + is not deployed on the node with the specified name, no deployed + application is returned in the cluster health chunk based on this + filter."nOtherwise, the deployed application is included in the + cluster health chunk if it respects the other filter + properties."nIf not specified, all deployed applications that + match the parent filters (if any) are taken into consideration + and matched against the other filter members, like health state + filter. + } + ], + "HealthStateFilter": 0, # Optional. The filter for the + health state of the applications. It allows selecting applications if + they match the desired health states."nThe possible values are integer + value of one of the following health states. Only applications that match + the filter are returned. All applications are used to evaluate the + cluster aggregated health state."nIf 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."nThe state values are + flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator."nFor example, if the + provided value is 6, it matches applications with HealthState value of OK + (2) and Warning (4)."n"n"n* Default - Default value. Matches any + HealthState. The value is zero."n* None - Filter that doesn't match any + HealthState value. Used in order to return no results on a given + collection of states. The value is 1."n* Ok - Filter that matches input + with HealthState value Ok. The value is 2."n* Warning - Filter that + matches input with HealthState value Warning. The value is 4."n* Error - + Filter that matches input with HealthState value Error. The value is + 8."n* All - Filter that matches input with any HealthState value. The + value is 65535. + "ServiceFilters": [ + { + "HealthStateFilter": 0, # Optional. The + filter for the health state of the services. It allows selecting + services if they match the desired health states."nThe possible + values are integer value of one of the following health states. + Only services that match the filter are returned. All services + are used to evaluate the cluster aggregated health state."nIf 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."nThe state values + are flag-based enumeration, so the value could be a combination + of these values obtained using bitwise 'OR' operator."nFor + example, if the provided value is 6, it matches services with + HealthState value of OK (2) and Warning (4)."n"n"n* Default - + Default value. Matches any HealthState. The value is zero."n* + None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The + value is 1."n* Ok - Filter that matches input with HealthState + value Ok. The value is 2."n* Warning - Filter that matches input + with HealthState value Warning. The value is 4."n* Error - Filter + that matches input with HealthState value Error. The value is + 8."n* All - Filter that matches input with any HealthState value. + The value is 65535. + "PartitionFilters": [ + { + "HealthStateFilter": 0, # + Optional. The filter for the health state of the + partitions. It allows selecting partitions if they match + the desired health states."nThe possible values are + integer value of one of the following health states. Only + partitions that match the filter are returned. All + partitions are used to evaluate the cluster aggregated + health state."nIf 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."nThe state values are flag-based + enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator."nFor + example, if the provided value is 6, it matches + partitions with HealthState value of OK (2) and Warning + (4)."n"n"n* Default - Default value. Matches any + HealthState. The value is zero."n* None - Filter that + doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The + value is 1."n* Ok - Filter that matches input with + HealthState value Ok. The value is 2."n* Warning - Filter + that matches input with HealthState value Warning. The + value is 4."n* Error - Filter that matches input with + HealthState value Error. The value is 8."n* All - Filter + that matches input with any HealthState value. The value + is 65535. + "PartitionIdFilter": str, # + Optional. ID of the partition that matches the filter. + The filter is applied only to the specified partition, if + it exists."nIf the partition doesn't exist, no partition + is returned in the cluster health chunk based on this + filter."nIf the partition exists, it is included in the + cluster health chunk if it respects the other filter + properties."nIf not specified, all partitions that match + the parent filters (if any) are taken into consideration + and matched against the other filter members, like health + state filter. + "ReplicaFilters": [ + { + "HealthStateFilter": 0, # Optional. The filter + for the health state of the replicas. It allows + selecting replicas if they match the desired + health states."nThe possible values are integer + value of one of the following health states. Only + replicas that match the filter are returned. All + replicas are used to evaluate the parent + partition aggregated health state."nIf 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."nThe state values + are flag-based enumeration, so the value could be + a combination of these values obtained using + bitwise 'OR' operator."nFor example, if the + provided value is 6, it matches replicas with + HealthState value of OK (2) and Warning + (4)."n"n"n* Default - Default value. Matches any + HealthState. The value is zero."n* None - Filter + that doesn't match any HealthState value. Used in + order to return no results on a given collection + of states. The value is 1."n* Ok - Filter that + matches input with HealthState value Ok. The + value is 2."n* Warning - Filter that matches + input with HealthState value Warning. The value + is 4."n* Error - Filter that matches input with + HealthState value Error. The value is 8."n* All - + Filter that matches input with any HealthState + value. The value is 65535. + "ReplicaOrInstanceIdFilter": "str" # Optional. + Id of the stateful service replica or stateless + service instance that matches the filter. The + filter is applied only to the specified replica, + if it exists."nIf the replica doesn't exist, no + replica is returned in the cluster health chunk + based on this filter."nIf the replica exists, it + is included in the cluster health chunk if it + respects the other filter properties."nIf not + specified, all replicas that match the parent + filters (if any) are taken into consideration and + matched against the other filter members, like + health state filter. + } + ] + } + ], + "ServiceNameFilter": "str" # Optional. The + name of the service that matches the filter. The filter is + applied only to the specified service, if it exists."nIf the + service doesn't exist, no service is returned in the cluster + health chunk based on this filter."nIf the service exists, it is + included as the application's child if the health state matches + the other filter properties."nIf not specified, all services that + match the parent filters (if any) are taken into consideration + and matched against the other filter members, like health state + filter. + } + ] + } + ], + "ApplicationHealthPolicies": { + "ApplicationHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + health policy map item. This is the name of the application. + "Value": { + "ConsiderWarningAsError": bool, # Optional. + Indicates whether warnings are treated with the same severity as + errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to + 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is + respected but there is at least one unhealthy partition, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over the total + number of partitions in the service."nThe computation rounds + up to tolerate one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is + respected but there is at least one unhealthy replica, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the total + number of replicas in the partition."nThe computation rounds + up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # + Optional. The maximum allowed percentage of unhealthy + services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the + application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the + health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to tolerate + one failure on small numbers of services. Default percentage + is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, + # Optional. The maximum allowed percentage of unhealthy deployed + applications. Allowed values are Byte values from zero to + 100."nThe percentage represents the maximum tolerated percentage + of deployed applications that can be unhealthy before the + application is considered in error."nThis is calculated by + dividing the number of unhealthy deployed applications over the + number of nodes where the application is currently deployed on in + the cluster."nThe computation rounds up to tolerate one failure + on small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. + The key of the service type health policy map item. This + is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte + values from zero to 100"n"nThe percentage represents + the maximum tolerated percentage of partitions that + can be unhealthy before the service is considered in + error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe + computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy + replicas per partition. Allowed values are Byte + values from zero to 100."n"nThe percentage represents + the maximum tolerated percentage of replicas that can + be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is + at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the + total number of replicas in the partition."nThe + computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. + Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum + tolerated percentage of services that can be + unhealthy before the application is considered in + error."nIf the percentage is respected but there is + at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to + tolerate one failure on small numbers of services. + Default percentage is zero. + } + } + ] + } + } + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + type health policy map item. This is the name of the application + type. + "Value": 0 # Required. The value of the application + type health policy map item."nThe max percent unhealthy applications + allowed for the application type. Must be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The maximum + allowed percentage of unhealthy applications before reporting an error. For + example, to allow 10% of applications to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated percentage of + applications that can be unhealthy before the cluster is considered in + error."nIf the percentage is respected but there is at least one unhealthy + application, the health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy applications over the total number of + application instances in the cluster, excluding applications of application + types that are included in the ApplicationTypeHealthPolicyMap."nThe + computation rounds up to tolerate one failure on small numbers of + applications. Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of unhealthy nodes before reporting an error. For example, to + allow 10% of nodes to be unhealthy, this value would be 10."n"nThe percentage + represents the maximum tolerated percentage of nodes that can be unhealthy + before the cluster is considered in error."nIf the percentage is respected + but there is at least one unhealthy node, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of unhealthy + nodes over the total number of nodes in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero."n"nIn large clusters, some nodes will always be down or out for + repairs, so this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the node type + health policy map item. This is the name of the node type. + "Value": 0 # Required. The value of the node type + health policy map item."nIf the percentage is respected but there is + at least one unhealthy node in the node type, the health is evaluated + as Warning. "nThe percentage is calculated by dividing the number of + unhealthy nodes over the total number of nodes in the node type. + "nThe computation rounds up to tolerate one failure on small numbers + of nodes."nThe max percent unhealthy nodes allowed for the node type. + Must be between zero and 100. + } + ] + }, + "NodeFilters": [ + { + "HealthStateFilter": 0, # Optional. The filter for the + health state of the nodes. It allows selecting nodes if they match the + desired health states."nThe possible values are integer value of one of + the following health states. Only nodes that match the filter are + returned. All nodes are used to evaluate the cluster aggregated health + state."nIf 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."nThe state values are flag-based + enumeration, so the value could be a combination of these values obtained + using bitwise 'OR' operator."nFor example, if the provided value is 6, it + matches nodes with HealthState value of OK (2) and Warning (4)."n"n"n* + Default - Default value. Matches any HealthState. The value is zero."n* + None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1."n* Ok + - Filter that matches input with HealthState value Ok. The value is 2."n* + Warning - Filter that matches input with HealthState value Warning. The + value is 4."n* Error - Filter that matches input with HealthState value + Error. The value is 8."n* All - Filter that matches input with any + HealthState value. The value is 65535. + "NodeNameFilter": "str" # Optional. Name of the node that + matches the filter. The filter is applied only to the specified node, if + it exists."nIf the node doesn't exist, no node is returned in the cluster + health chunk based on this filter."nIf the node exists, it is included in + the cluster health chunk if the health state matches the other filter + properties."nIf not specified, all nodes that match the parent filters + (if any) are taken into consideration and matched against the other + filter members, like health state filter. + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "ApplicationHealthStateChunks": { + "Items": [ + { + "ApplicationName": "str", # Optional. The name of + the application, including the 'fabric:' URI scheme. + "ApplicationTypeName": "str", # Optional. The + application type name as defined in the application manifest. + "DeployedApplicationHealthStateChunks": { + "Items": [ + { + "DeployedServicePackageHealthStateChunks": { + "Items": [ + { + "HealthState": "str", # Optional. The health + state of a Service Fabric entity such as + Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", + "Unknown". + "ServiceManifestName": "str", # Optional. + The name of the service manifest. + "ServicePackageActivationId": "str" # + Optional. The ActivationId of a deployed + service package. If + ServicePackageActivationMode specified at the + time of creating the service"nis + 'SharedProcess' (or if it is not specified, + in which case it defaults to + 'SharedProcess'), then value of + ServicePackageActivationId"nis always an + empty string. + } + ] + }, + "HealthState": "str", # + Optional. The health state of a Service Fabric entity + such as Cluster, Node, Application, Service, Partition, + Replica etc. Known values are: "Invalid", "Ok", + "Warning", "Error", "Unknown". + "NodeName": "str" # + Optional. The name of node where the application is + deployed. + } + ] + }, + "HealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, + Service, Partition, Replica etc. Known values are: "Invalid", "Ok", + "Warning", "Error", "Unknown". + "ServiceHealthStateChunks": { + "Items": [ + { + "HealthState": "str", # + Optional. The health state of a Service Fabric entity + such as Cluster, Node, Application, Service, Partition, + Replica etc. Known values are: "Invalid", "Ok", + "Warning", "Error", "Unknown". + "PartitionHealthStateChunks": + { + "Items": [ + { + "HealthState": "str", # Optional. The health + state of a Service Fabric entity such as + Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", + "Unknown". + "PartitionId": str, # Optional. The Id of + the partition. + "ReplicaHealthStateChunks": { + "Items": [ + { + "HealthState": "str", # + Optional. The health state of a + Service Fabric entity such as + Cluster, Node, Application, + Service, Partition, Replica etc. + Known values are: "Invalid", + "Ok", "Warning", "Error", + "Unknown". + "ReplicaOrInstanceId": "str" # + Optional. Id of a stateful + service replica or a stateless + service instance. This ID is used + in the queries that apply to both + stateful and stateless services. + It is used by Service Fabric to + uniquely identify a replica of a + partition of a stateful service + or an instance of a stateless + service partition. It is unique + within a partition and does not + change for the lifetime of the + replica or the instance. If a + stateful replica gets dropped and + another replica gets created on + the same node for the same + partition, it will get a + different value for the ID. If a + stateless instance is failed over + on the same or different node it + will get a different value for + the ID. + } + ] + } + } + ] + }, + "ServiceName": "str" # + Optional. The name of the service whose health state + chunk is provided in this object. + } + ] + } + } + ], + "TotalCount": 0.0 # Optional. Total number of entity health state + objects that match the specified filters from the cluster health chunk query + description. + }, + "HealthState": "str", # Optional. The HealthState representing the + aggregated health state of the cluster computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired cluster + health policy and the application health policies. Known values are: "Invalid", + "Ok", "Warning", "Error", "Unknown". + "NodeHealthStateChunks": { + "Items": [ + { + "HealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, + Service, Partition, Replica etc. Known values are: "Invalid", "Ok", + "Warning", "Error", "Unknown". + "NodeName": "str" # Optional. The name of a Service + Fabric node. + } + ], + "TotalCount": 0.0 # Optional. Total number of entity health state + objects that match the specified filters from the cluster health chunk query + description. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if cluster_health_chunk_query_description is not None: + _json = cluster_health_chunk_query_description + else: + _json = None + + request = build_get_cluster_health_chunk_using_policy_and_advanced_filters_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def report_cluster_health( # pylint: disable=inconsistent-return-statements + self, + health_information: JSON, + *, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric cluster. + + Sends a health report on a Service Fabric cluster. The report must contain the information + about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway node, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetClusterHealth and check that + the report appears in the HealthEvents section. + + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: JSON + :keyword immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :paramtype immediate: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + health_information = { + "Description": "str", # Optional. The description of the health information. + It represents free text used to add human readable information about the + report."nThe maximum string length for the description is 4096 characters."nIf + the provided string is longer, it will be automatically truncated."nWhen + truncated, the last characters of the description contain a marker "[Truncated]", + and total string size is 4096 characters."nThe presence of the marker indicates + to users that truncation occurred."nNote that when truncated, the description has + less than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID which identifies the + health report and can be used to find more detailed information about a specific + health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Property": "str", # Required. The property of the health information. An + entity can have health reports for different properties."nThe property is a + string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report."nFor example, a reporter + with SourceId "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same reporter + can monitor the node connectivity, so it can report a property "Connectivity" on + the same node."nIn the health store, these reports are treated as separate health + events for the specified node."n"nTogether with the SourceId, the property + uniquely identifies the health information. + "RemoveWhenExpired": bool, # Optional. Value that indicates whether the + report is removed from health store when it expires."nIf set to true, the report + is removed from the health store after it expires."nIf set to false, the report + is treated as an error when expired. The value of this property is false by + default."nWhen clients report periodically, they should set RemoveWhenExpired + false (default)."nThis way, if the reporter has issues (e.g. deadlock) and can't + report, the entity is evaluated at error when the health report expires."nThis + flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for this health + report as a numeric string."nThe report sequence number is used by the health + store to detect stale reports."nIf not specified, a sequence number is + auto-generated by the health client when a report is added. + "SourceId": "str", # Required. The source name that identifies the + client/watchdog/system component that generated the health information. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The duration for + which this health report is valid. This field uses ISO8601 format for specifying + the duration."nWhen clients report periodically, they should send reports with + higher frequency than time to live."nIf clients report on transition, they can + set the time to live to infinite."nWhen time to live expires, the health event + that contains the health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = health_information + + request = build_report_cluster_health_request( + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_provisioned_fabric_code_version_info_list( + self, + *, + code_version: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets a list of fabric code versions that are provisioned in a Service Fabric cluster. + + Gets a list of information about fabric code versions that are provisioned in the cluster. The + parameter CodeVersion can be used to optionally filter the output to only that particular + version. + + :keyword code_version: The product version of Service Fabric. Default value is None. + :paramtype code_version: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "CodeVersion": "str" # Optional. The product version of Service + Fabric. + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_provisioned_fabric_code_version_info_list_request( + api_version=api_version, + code_version=code_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def get_provisioned_fabric_config_version_info_list( + self, + *, + config_version: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets a list of fabric config versions that are provisioned in a Service Fabric cluster. + + Gets a list of information about fabric config versions that are provisioned in the cluster. + The parameter ConfigVersion can be used to optionally filter the output to only that particular + version. + + :keyword config_version: The config version of Service Fabric. Default value is None. + :paramtype config_version: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "ConfigVersion": "str" # Optional. The config version of Service + Fabric. + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_provisioned_fabric_config_version_info_list_request( + api_version=api_version, + config_version=config_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def get_cluster_upgrade_progress( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the progress of the current cluster upgrade. + + Gets the current progress of the ongoing cluster upgrade. If no upgrade is currently in + progress, get the last state of the previous cluster upgrade. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "CodeVersion": "str", # Optional. The ServiceFabric code version of the + cluster. + "ConfigVersion": "str", # Optional. The cluster configuration version + (specified in the cluster manifest). + "CurrentUpgradeDomainProgress": { + "DomainName": "str", # Optional. The name of the upgrade domain. + "NodeUpgradeProgressList": [ + { + "NodeName": "str", # Optional. The name of a Service + Fabric node. + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ], + "UpgradeDuration": "str", # Optional. The estimated + time spent processing the node since it was deactivated during a + node-by-node upgrade. + "UpgradePhase": "str" # Optional. The state of the + upgrading node. Known values are: "Invalid", "PreUpgradeSafetyCheck", + "Upgrading", "PostUpgradeSafetyCheck". + } + ] + }, + "CurrentUpgradeUnitsProgress": { + "DomainName": "str", # Optional. The name of the upgrade domain. Not + applicable to node-by-node upgrades. + "NodeUpgradeProgressList": [ + { + "NodeName": "str", # Optional. The name of a Service + Fabric node. + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ], + "UpgradeDuration": "str", # Optional. The estimated + time spent processing the node since it was deactivated during a + node-by-node upgrade. + "UpgradePhase": "str" # Optional. The state of the + upgrading node. Known values are: "Invalid", "PreUpgradeSafetyCheck", + "Upgrading", "PostUpgradeSafetyCheck". + } + ] + }, + "FailureReason": "str", # Optional. The cause of an upgrade failure that + resulted in FailureAction being executed. Known values are: "None", + "Interrupted", "HealthCheck", "UpgradeDomainTimeout", "OverallUpgradeTimeout". + "FailureTimestampUtc": "str", # Optional. The failure time of the upgrade in + UTC. + "IsNodeByNode": bool, # Optional. Indicates whether this upgrade is + node-by-node. + "NextUpgradeDomain": "str", # Optional. The name of the next upgrade domain + to be processed. Not applicable to node-by-node upgrades. + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value is + "UnmonitoredAuto". The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "StartTimestampUtc": "str", # Optional. The start time of the upgrade in + UTC. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ], + "UpgradeDescription": { + "ApplicationHealthPolicyMap": { + "ApplicationHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the + application health policy map item. This is the name of the + application. + "Value": { + "ConsiderWarningAsError": bool, # + Optional. Indicates whether warnings are treated with the + same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte values + from zero to 100"n"nThe percentage represents the maximum + tolerated percentage of partitions that can be unhealthy + before the service is considered in error."nIf the + percentage is respected but there is at least one + unhealthy partition, the health is evaluated as + Warning."nThe percentage is calculated by dividing the + number of unhealthy partitions over the total number of + partitions in the service."nThe computation rounds up to + tolerate one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy + replicas per partition. Allowed values are Byte values + from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of replicas that can be + unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at + least one unhealthy replica, the health is evaluated as + Warning."nThe percentage is calculated by dividing the + number of unhealthy replicas over the total number of + replicas in the partition."nThe computation rounds up to + tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum + allowed percentage of unhealthy services. Allowed values + are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of services + that can be unhealthy before the application is + considered in error."nIf the percentage is respected but + there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the + number of unhealthy services of the specific service type + over the total number of services of the specific service + type."nThe computation rounds up to tolerate one failure + on small numbers of services. Default percentage is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. + The maximum allowed percentage of unhealthy deployed + applications. Allowed values are Byte values from zero to + 100."nThe percentage represents the maximum tolerated + percentage of deployed applications that can be unhealthy + before the application is considered in error."nThis is + calculated by dividing the number of unhealthy deployed + applications over the number of nodes where the application + is currently deployed on in the cluster."nThe computation + rounds up to tolerate one failure on small numbers of nodes. + Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # + Required. The key of the service type health policy + map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of + unhealthy partitions per service. Allowed values + are Byte values from zero to 100"n"nThe + percentage represents the maximum tolerated + percentage of partitions that can be unhealthy + before the service is considered in error."nIf + the percentage is respected but there is at least + one unhealthy partition, the health is evaluated + as Warning."nThe percentage is calculated by + dividing the number of unhealthy partitions over + the total number of partitions in the + service."nThe computation rounds up to tolerate + one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of + unhealthy replicas per partition. Allowed values + are Byte values from zero to 100."n"nThe + percentage represents the maximum tolerated + percentage of replicas that can be unhealthy + before the partition is considered in error."nIf + the percentage is respected but there is at least + one unhealthy replica, the health is evaluated as + Warning."nThe percentage is calculated by + dividing the number of unhealthy replicas over + the total number of replicas in the + partition."nThe computation rounds up to tolerate + one failure on small numbers of replicas. Default + percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. + Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum + tolerated percentage of services that can be + unhealthy before the application is considered in + error."nIf the percentage is respected but there + is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by + dividing the number of unhealthy services of the + specific service type over the total number of + services of the specific service type."nThe + computation rounds up to tolerate one failure on + small numbers of services. Default percentage is + zero. + } + } + ] + } + } + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the + application type health policy map item. This is the name of the + application type. + "Value": 0 # Required. The value of the + application type health policy map item."nThe max percent + unhealthy applications allowed for the application type. Must be + between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates + whether warnings are treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The + maximum allowed percentage of unhealthy applications before reporting an + error. For example, to allow 10% of applications to be unhealthy, this + value would be 10."n"nThe percentage represents the maximum tolerated + percentage of applications that can be unhealthy before the cluster is + considered in error."nIf the percentage is respected but there is at + least one unhealthy application, the health is evaluated as + Warning."nThis is calculated by dividing the number of unhealthy + applications over the total number of application instances in the + cluster, excluding applications of application types that are included in + the ApplicationTypeHealthPolicyMap."nThe computation rounds up to + tolerate one failure on small numbers of applications. Default percentage + is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum + allowed percentage of unhealthy nodes before reporting an error. For + example, to allow 10% of nodes to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated percentage of + nodes that can be unhealthy before the cluster is considered in + error."nIf the percentage is respected but there is at least one + unhealthy node, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy nodes over the total + number of nodes in the cluster."nThe computation rounds up to tolerate + one failure on small numbers of nodes. Default percentage is zero."n"nIn + large clusters, some nodes will always be down or out for repairs, so + this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the + node type health policy map item. This is the name of the node + type. + "Value": 0 # Required. The value of the node + type health policy map item."nIf the percentage is respected but + there is at least one unhealthy node in the node type, the health + is evaluated as Warning. "nThe percentage is calculated by + dividing the number of unhealthy nodes over the total number of + nodes in the node type. "nThe computation rounds up to tolerate + one failure on small numbers of nodes."nThe max percent unhealthy + nodes allowed for the node type. Must be between zero and 100. + } + ] + }, + "ClusterUpgradeHealthPolicy": { + "MaxPercentDeltaUnhealthyNodes": 0, # Optional. The maximum + allowed percentage of nodes health degradation allowed during cluster + upgrades. The delta is measured between the state of the nodes at the + beginning of upgrade and the state of the nodes at the time of the health + evaluation. The check is performed after every upgrade domain upgrade + completion to make sure the global state of the cluster is within + tolerated limits. The default value is 10%. + "MaxPercentUpgradeDomainDeltaUnhealthyNodes": 0 # Optional. + The maximum allowed percentage of upgrade domain nodes health degradation + allowed during cluster upgrades. The delta is measured between the state + of the upgrade domain nodes at the beginning of upgrade and the state of + the upgrade domain nodes at the time of the health evaluation. The check + is performed after every upgrade domain upgrade completion for all + completed upgrade domains to make sure the state of the upgrade domains + is within tolerated limits. The default value is 15%. + }, + "CodeVersion": "str", # Optional. The ServiceFabric code version of + the cluster. + "ConfigVersion": "str", # Optional. The cluster configuration + version (specified in the cluster manifest). + "EnableDeltaHealthEvaluation": bool, # Optional. When true, enables + delta health evaluation rather than absolute health evaluation after + completion of each upgrade domain. + "ForceRestart": bool, # Optional. If true, then processes are + forcefully restarted during upgrade even when the code version has not + changed (the upgrade only changes configuration or data). + "MonitoringPolicy": { + "FailureAction": "str", # Optional. The compensating action + to perform when a Monitored upgrade encounters monitoring policy or + health policy violations."nInvalid indicates the failure action is + invalid. Rollback specifies that the upgrade will start rolling back + automatically."nManual indicates that the upgrade will switch to + UnmonitoredManual upgrade mode. Known values are: "Invalid", "Rollback", + "Manual". + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # + Optional. Default value is "PT0H10M0S". The amount of time to retry + health evaluation when the application or cluster is unhealthy before + FailureAction is executed. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # + Optional. Default value is "PT0H2M0S". The amount of time that the + application or cluster must remain healthy before the upgrade proceeds to + the next upgrade domain. It is first interpreted as a string representing + an ISO 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. + Default value is "0". The amount of time to wait after completing an + upgrade domain before applying health policies. It is first interpreted + as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + "UpgradeDomainTimeoutInMilliseconds": + "P10675199DT02H48M05.4775807S", # Optional. Default value is + "P10675199DT02H48M05.4775807S". The amount of time each upgrade domain + has to complete before FailureAction is executed. It is first interpreted + as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + "UpgradeTimeoutInMilliseconds": + "P10675199DT02H48M05.4775807S" # Optional. Default value is + "P10675199DT02H48M05.4775807S". The amount of time the overall upgrade + has to complete before FailureAction is executed. It is first interpreted + as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + }, + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value + is "UnmonitoredAuto". The mode used to monitor health during a rolling + upgrade. The values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "SortOrder": "Default", # Optional. Default value is "Default". + Defines the order in which an upgrade proceeds through the cluster. Known + values are: "Invalid", "Default", "Numeric", "Lexicographical", + "ReverseNumeric", "ReverseLexicographical". Default value: "Default". + "UpgradeKind": "Rolling", # Optional. Default value is "Rolling". + The kind of upgrade out of the following possible values. Known values are: + "Invalid", "Rolling". Default value: "Rolling". + "UpgradeReplicaSetCheckTimeoutInSeconds": 42949672925 # Optional. + Default value is 42949672925. The maximum amount of time to block processing + of an upgrade domain and prevent loss of availability when there are + unexpected issues. When this timeout expires, processing of the upgrade + domain will proceed regardless of availability loss issues. The timeout is + reset at the start of each upgrade domain. Valid values are between 0 and + 42949672925 inclusive. (unsigned 32-bit integer). + }, + "UpgradeDomainDurationInMilliseconds": "str", # Optional. The estimated + elapsed time spent processing the current upgrade domain. Not applicable to + node-by-node upgrades. + "UpgradeDomainProgressAtFailure": { + "DomainName": "str", # Optional. The name of the upgrade domain. + "NodeUpgradeProgressList": [ + { + "NodeName": "str", # Optional. The name of a Service + Fabric node. + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ], + "UpgradeDuration": "str", # Optional. The estimated + time spent processing the node since it was deactivated during a + node-by-node upgrade. + "UpgradePhase": "str" # Optional. The state of the + upgrading node. Known values are: "Invalid", "PreUpgradeSafetyCheck", + "Upgrading", "PostUpgradeSafetyCheck". + } + ] + }, + "UpgradeDomains": [ + { + "Name": "str", # Optional. The name of the upgrade domain. + "State": "str" # Optional. The state of the upgrade domain. + Known values are: "Invalid", "Pending", "InProgress", "Completed". + } + ], + "UpgradeDurationInMilliseconds": "str", # Optional. The estimated elapsed + time spent processing the current overall upgrade. + "UpgradeState": "str", # Optional. The state of the upgrade domain. Known + values are: "Invalid", "RollingBackInProgress", "RollingBackCompleted", + "RollingForwardPending", "RollingForwardInProgress", "RollingForwardCompleted", + "Failed". + "UpgradeUnits": [ + { + "Name": "str", # Optional. The name of the upgrade unit. + "State": "str" # Optional. The state of the upgrade unit. + Known values are: "Invalid", "Pending", "InProgress", "Completed", + "Failed". + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_cluster_upgrade_progress_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_cluster_configuration( + self, + *, + configuration_api_version: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """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. + + :keyword configuration_api_version: The API version of the Standalone cluster json + configuration. + :paramtype configuration_api_version: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ClusterConfiguration": "str" # Optional. The contents of the cluster + configuration file. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_cluster_configuration_request( + api_version=api_version, + configuration_api_version=configuration_api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_cluster_configuration_upgrade_status( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the cluster configuration upgrade status of a Service Fabric standalone cluster. + + Get the cluster configuration upgrade status details of a Service Fabric standalone cluster. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ConfigVersion": "str", # Optional. The cluster configuration version. + "Details": "str", # Optional. The cluster upgrade status details. + "ProgressStatus": 0, # Optional. The cluster manifest version. + "UpgradeState": "str" # Optional. The state of the upgrade domain. Known + values are: "Invalid", "RollingBackInProgress", "RollingBackCompleted", + "RollingForwardPending", "RollingForwardInProgress", "RollingForwardCompleted", + "Failed". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_cluster_configuration_upgrade_status_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_upgrade_orchestration_service_state( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the service state of Service Fabric Upgrade Orchestration Service. + + Get the service state of Service Fabric Upgrade Orchestration Service. This API is internally + used for support purposes. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ServiceState": "str" # Optional. The state of Service Fabric Upgrade + Orchestration Service. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_upgrade_orchestration_service_state_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def set_upgrade_orchestration_service_state( + self, + upgrade_orchestration_service_state: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Update the service state of Service Fabric Upgrade Orchestration Service. + + Update the service state of Service Fabric Upgrade Orchestration Service. This API is + internally used for support purposes. + + :param upgrade_orchestration_service_state: Service state of Service Fabric Upgrade + Orchestration Service. + :type upgrade_orchestration_service_state: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + upgrade_orchestration_service_state = { + "ServiceState": "str" # Optional. The state of Service Fabric Upgrade + Orchestration Service. + } + + # response body for status code(s): 200 + response.json() == { + "CurrentCodeVersion": "str", # Optional. The current code version of the + cluster. + "CurrentManifestVersion": "str", # Optional. The current manifest version of + the cluster. + "PendingUpgradeType": "str", # Optional. The type of the pending upgrade of + the cluster. + "TargetCodeVersion": "str", # Optional. The target code version of the + cluster. + "TargetManifestVersion": "str" # Optional. The target manifest version of + the cluster. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = upgrade_orchestration_service_state + + request = build_set_upgrade_orchestration_service_state_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def provision_cluster( # pylint: disable=inconsistent-return-statements + self, + provision_fabric_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Provision the code or configuration packages of a Service Fabric cluster. + + Validate and provision the code or configuration packages of a Service Fabric cluster. + + :param provision_fabric_description: Describes the parameters for provisioning a cluster. + :type provision_fabric_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + provision_fabric_description = { + "ClusterManifestFilePath": "str", # Optional. The cluster manifest file + path. + "CodeFilePath": "str" # Optional. The cluster code package file path. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = provision_fabric_description + + request = build_provision_cluster_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def unprovision_cluster( # pylint: disable=inconsistent-return-statements + self, + unprovision_fabric_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Unprovision the code or configuration packages of a Service Fabric cluster. + + It is supported to unprovision code and configuration separately. + + :param unprovision_fabric_description: Describes the parameters for unprovisioning a cluster. + :type unprovision_fabric_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + unprovision_fabric_description = { + "CodeVersion": "str", # Optional. The cluster code package version. + "ConfigVersion": "str" # Optional. The cluster manifest version. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = unprovision_fabric_description + + request = build_unprovision_cluster_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def rollback_cluster_upgrade( # pylint: disable=inconsistent-return-statements + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Roll back the upgrade of a Service Fabric cluster. + + Roll back the code or configuration upgrade of a Service Fabric cluster. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_rollback_cluster_upgrade_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def resume_cluster_upgrade( # pylint: disable=inconsistent-return-statements + self, + resume_cluster_upgrade_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Make the cluster upgrade move on to the next upgrade domain. + + Make the cluster code or configuration upgrade move on to the next upgrade domain if + appropriate. + + :param resume_cluster_upgrade_description: Describes the parameters for resuming a cluster + upgrade. + :type resume_cluster_upgrade_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + resume_cluster_upgrade_description = { + "UpgradeDomain": "str" # Required. The next upgrade domain for this cluster + upgrade. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = resume_cluster_upgrade_description + + request = build_resume_cluster_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def start_cluster_upgrade( # pylint: disable=inconsistent-return-statements + self, + start_cluster_upgrade_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Start upgrading the code or configuration version of a Service Fabric cluster. + + Validate the supplied upgrade parameters and start upgrading the code or configuration version + of a Service Fabric cluster if the parameters are valid. + + :param start_cluster_upgrade_description: Describes the parameters for starting a cluster + upgrade. + :type start_cluster_upgrade_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + start_cluster_upgrade_description = { + "ApplicationHealthPolicyMap": { + "ApplicationHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + health policy map item. This is the name of the application. + "Value": { + "ConsiderWarningAsError": bool, # Optional. + Indicates whether warnings are treated with the same severity as + errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to + 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is + respected but there is at least one unhealthy partition, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over the total + number of partitions in the service."nThe computation rounds + up to tolerate one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is + respected but there is at least one unhealthy replica, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the total + number of replicas in the partition."nThe computation rounds + up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # + Optional. The maximum allowed percentage of unhealthy + services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the + application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the + health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to tolerate + one failure on small numbers of services. Default percentage + is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, + # Optional. The maximum allowed percentage of unhealthy deployed + applications. Allowed values are Byte values from zero to + 100."nThe percentage represents the maximum tolerated percentage + of deployed applications that can be unhealthy before the + application is considered in error."nThis is calculated by + dividing the number of unhealthy deployed applications over the + number of nodes where the application is currently deployed on in + the cluster."nThe computation rounds up to tolerate one failure + on small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. + The key of the service type health policy map item. This + is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte + values from zero to 100"n"nThe percentage represents + the maximum tolerated percentage of partitions that + can be unhealthy before the service is considered in + error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe + computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy + replicas per partition. Allowed values are Byte + values from zero to 100."n"nThe percentage represents + the maximum tolerated percentage of replicas that can + be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is + at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the + total number of replicas in the partition."nThe + computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. + Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum + tolerated percentage of services that can be + unhealthy before the application is considered in + error."nIf the percentage is respected but there is + at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to + tolerate one failure on small numbers of services. + Default percentage is zero. + } + } + ] + } + } + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + type health policy map item. This is the name of the application + type. + "Value": 0 # Required. The value of the application + type health policy map item."nThe max percent unhealthy applications + allowed for the application type. Must be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The maximum + allowed percentage of unhealthy applications before reporting an error. For + example, to allow 10% of applications to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated percentage of + applications that can be unhealthy before the cluster is considered in + error."nIf the percentage is respected but there is at least one unhealthy + application, the health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy applications over the total number of + application instances in the cluster, excluding applications of application + types that are included in the ApplicationTypeHealthPolicyMap."nThe + computation rounds up to tolerate one failure on small numbers of + applications. Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of unhealthy nodes before reporting an error. For example, to + allow 10% of nodes to be unhealthy, this value would be 10."n"nThe percentage + represents the maximum tolerated percentage of nodes that can be unhealthy + before the cluster is considered in error."nIf the percentage is respected + but there is at least one unhealthy node, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of unhealthy + nodes over the total number of nodes in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero."n"nIn large clusters, some nodes will always be down or out for + repairs, so this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the node type + health policy map item. This is the name of the node type. + "Value": 0 # Required. The value of the node type + health policy map item."nIf the percentage is respected but there is + at least one unhealthy node in the node type, the health is evaluated + as Warning. "nThe percentage is calculated by dividing the number of + unhealthy nodes over the total number of nodes in the node type. + "nThe computation rounds up to tolerate one failure on small numbers + of nodes."nThe max percent unhealthy nodes allowed for the node type. + Must be between zero and 100. + } + ] + }, + "ClusterUpgradeHealthPolicy": { + "MaxPercentDeltaUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of nodes health degradation allowed during cluster upgrades. The + delta is measured between the state of the nodes at the beginning of upgrade + and the state of the nodes at the time of the health evaluation. The check is + performed after every upgrade domain upgrade completion to make sure the + global state of the cluster is within tolerated limits. The default value is + 10%. + "MaxPercentUpgradeDomainDeltaUnhealthyNodes": 0 # Optional. The + maximum allowed percentage of upgrade domain nodes health degradation allowed + during cluster upgrades. The delta is measured between the state of the + upgrade domain nodes at the beginning of upgrade and the state of the upgrade + domain nodes at the time of the health evaluation. The check is performed + after every upgrade domain upgrade completion for all completed upgrade + domains to make sure the state of the upgrade domains is within tolerated + limits. The default value is 15%. + }, + "CodeVersion": "str", # Optional. The cluster code version. + "ConfigVersion": "str", # Optional. The cluster configuration version. + "EnableDeltaHealthEvaluation": bool, # Optional. When true, enables delta + health evaluation rather than absolute health evaluation after completion of each + upgrade domain. + "ForceRestart": bool, # Optional. If true, then processes are forcefully + restarted during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + "InstanceCloseDelayDurationInSeconds": 4294967295, # Optional. Default value + is 4294967295. Duration in seconds, to wait before a stateless instance is + closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster"nupgrade, only for + those instances which have a non-zero delay duration configured in the service + description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details."nNote, the default + value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates that + the behavior will entirely depend on the delay configured in the stateless + service description. + "MonitoringPolicy": { + "FailureAction": "str", # Optional. The compensating action to + perform when a Monitored upgrade encounters monitoring policy or health + policy violations."nInvalid indicates the failure action is invalid. Rollback + specifies that the upgrade will start rolling back automatically."nManual + indicates that the upgrade will switch to UnmonitoredManual upgrade mode. + Known values are: "Invalid", "Rollback", "Manual". + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # Optional. + Default value is "PT0H10M0S". The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is + executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # Optional. + Default value is "PT0H2M0S". The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade + domain. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. Default + value is "0". The amount of time to wait after completing an upgrade domain + before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a + number representing the total number of milliseconds. + "UpgradeDomainTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S", + # Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of + time each upgrade domain has to complete before FailureAction is executed. It + is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + "UpgradeTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S" # + Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of time + the overall upgrade has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + }, + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value is + "UnmonitoredAuto". The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "SortOrder": "Default", # Optional. Default value is "Default". Defines the + order in which an upgrade proceeds through the cluster. Known values are: + "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + "UpgradeKind": "Rolling", # Optional. Default value is "Rolling". The kind + of upgrade out of the following possible values. Known values are: "Invalid", + "Rolling". Default value: "Rolling". + "UpgradeReplicaSetCheckTimeoutInSeconds": 42949672925 # Optional. Default + value is 42949672925. The maximum amount of time to block processing of an + upgrade domain and prevent loss of availability when there are unexpected issues. + When this timeout expires, processing of the upgrade domain will proceed + regardless of availability loss issues. The timeout is reset at the start of each + upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + 32-bit integer). + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = start_cluster_upgrade_description + + request = build_start_cluster_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def start_cluster_configuration_upgrade( # pylint: disable=inconsistent-return-statements + self, + cluster_configuration_upgrade_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Start upgrading the configuration of a Service Fabric standalone cluster. + + Validate the supplied configuration upgrade parameters and start upgrading the cluster + configuration if the parameters are valid. + + :param cluster_configuration_upgrade_description: Parameters for a standalone cluster + configuration upgrade. + :type cluster_configuration_upgrade_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + cluster_configuration_upgrade_description = { + "ApplicationHealthPolicies": { + "ApplicationHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + health policy map item. This is the name of the application. + "Value": { + "ConsiderWarningAsError": bool, # Optional. + Indicates whether warnings are treated with the same severity as + errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to + 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is + respected but there is at least one unhealthy partition, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over the total + number of partitions in the service."nThe computation rounds + up to tolerate one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is + respected but there is at least one unhealthy replica, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the total + number of replicas in the partition."nThe computation rounds + up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # + Optional. The maximum allowed percentage of unhealthy + services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the + application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the + health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to tolerate + one failure on small numbers of services. Default percentage + is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, + # Optional. The maximum allowed percentage of unhealthy deployed + applications. Allowed values are Byte values from zero to + 100."nThe percentage represents the maximum tolerated percentage + of deployed applications that can be unhealthy before the + application is considered in error."nThis is calculated by + dividing the number of unhealthy deployed applications over the + number of nodes where the application is currently deployed on in + the cluster."nThe computation rounds up to tolerate one failure + on small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. + The key of the service type health policy map item. This + is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte + values from zero to 100"n"nThe percentage represents + the maximum tolerated percentage of partitions that + can be unhealthy before the service is considered in + error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe + computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy + replicas per partition. Allowed values are Byte + values from zero to 100."n"nThe percentage represents + the maximum tolerated percentage of replicas that can + be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is + at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the + total number of replicas in the partition."nThe + computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. + Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum + tolerated percentage of services that can be + unhealthy before the application is considered in + error."nIf the percentage is respected but there is + at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to + tolerate one failure on small numbers of services. + Default percentage is zero. + } + } + ] + } + } + ] + }, + "ClusterConfig": "str", # Required. The cluster configuration as a JSON + string. For example, `this file + `_ + contains JSON describing the `nodes and other properties of the cluster + `_. + "HealthCheckRetryTimeout": "PT0H0M0S", # Optional. Default value is + "PT0H0M0S". The length of time between attempts to perform health checks if the + application or cluster is not healthy. + "HealthCheckStableDurationInSeconds": "PT0H0M0S", # Optional. Default value + is "PT0H0M0S". The length of time that the application or cluster must remain + healthy before the upgrade proceeds to the next upgrade domain. + "HealthCheckWaitDurationInSeconds": "PT0H0M0S", # Optional. Default value is + "PT0H0M0S". The length of time to wait after completing an upgrade domain before + starting the health checks process. + "MaxPercentDeltaUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of delta health degradation during the upgrade. Allowed values are + integer values from zero to 100. + "MaxPercentUnhealthyApplications": 0, # Optional. The maximum allowed + percentage of unhealthy applications during the upgrade. Allowed values are + integer values from zero to 100. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum allowed percentage of + unhealthy nodes during the upgrade. Allowed values are integer values from zero + to 100. + "MaxPercentUpgradeDomainDeltaUnhealthyNodes": 0, # Optional. The maximum + allowed percentage of upgrade domain delta health degradation during the upgrade. + Allowed values are integer values from zero to 100. + "UpgradeDomainTimeoutInSeconds": "PT0H0M0S", # Optional. Default value is + "PT0H0M0S". The timeout for the upgrade domain. + "UpgradeTimeoutInSeconds": "PT0H0M0S" # Optional. Default value is + "PT0H0M0S". The upgrade timeout. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = cluster_configuration_upgrade_description + + request = build_start_cluster_configuration_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def update_cluster_upgrade( # pylint: disable=inconsistent-return-statements + self, + update_cluster_upgrade_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Update the upgrade parameters of a Service Fabric cluster upgrade. + + Update the upgrade parameters used during a Service Fabric cluster upgrade. + + :param update_cluster_upgrade_description: Parameters for updating a cluster upgrade. + :type update_cluster_upgrade_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + update_cluster_upgrade_description = { + "ApplicationHealthPolicyMap": { + "ApplicationHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + health policy map item. This is the name of the application. + "Value": { + "ConsiderWarningAsError": bool, # Optional. + Indicates whether warnings are treated with the same severity as + errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to + 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is + respected but there is at least one unhealthy partition, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over the total + number of partitions in the service."nThe computation rounds + up to tolerate one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is + respected but there is at least one unhealthy replica, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the total + number of replicas in the partition."nThe computation rounds + up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # + Optional. The maximum allowed percentage of unhealthy + services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the + application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the + health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to tolerate + one failure on small numbers of services. Default percentage + is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, + # Optional. The maximum allowed percentage of unhealthy deployed + applications. Allowed values are Byte values from zero to + 100."nThe percentage represents the maximum tolerated percentage + of deployed applications that can be unhealthy before the + application is considered in error."nThis is calculated by + dividing the number of unhealthy deployed applications over the + number of nodes where the application is currently deployed on in + the cluster."nThe computation rounds up to tolerate one failure + on small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. + The key of the service type health policy map item. This + is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte + values from zero to 100"n"nThe percentage represents + the maximum tolerated percentage of partitions that + can be unhealthy before the service is considered in + error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe + computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy + replicas per partition. Allowed values are Byte + values from zero to 100."n"nThe percentage represents + the maximum tolerated percentage of replicas that can + be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is + at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the + total number of replicas in the partition."nThe + computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. + Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum + tolerated percentage of services that can be + unhealthy before the application is considered in + error."nIf the percentage is respected but there is + at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to + tolerate one failure on small numbers of services. + Default percentage is zero. + } + } + ] + } + } + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + type health policy map item. This is the name of the application + type. + "Value": 0 # Required. The value of the application + type health policy map item."nThe max percent unhealthy applications + allowed for the application type. Must be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The maximum + allowed percentage of unhealthy applications before reporting an error. For + example, to allow 10% of applications to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated percentage of + applications that can be unhealthy before the cluster is considered in + error."nIf the percentage is respected but there is at least one unhealthy + application, the health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy applications over the total number of + application instances in the cluster, excluding applications of application + types that are included in the ApplicationTypeHealthPolicyMap."nThe + computation rounds up to tolerate one failure on small numbers of + applications. Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of unhealthy nodes before reporting an error. For example, to + allow 10% of nodes to be unhealthy, this value would be 10."n"nThe percentage + represents the maximum tolerated percentage of nodes that can be unhealthy + before the cluster is considered in error."nIf the percentage is respected + but there is at least one unhealthy node, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of unhealthy + nodes over the total number of nodes in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero."n"nIn large clusters, some nodes will always be down or out for + repairs, so this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the node type + health policy map item. This is the name of the node type. + "Value": 0 # Required. The value of the node type + health policy map item."nIf the percentage is respected but there is + at least one unhealthy node in the node type, the health is evaluated + as Warning. "nThe percentage is calculated by dividing the number of + unhealthy nodes over the total number of nodes in the node type. + "nThe computation rounds up to tolerate one failure on small numbers + of nodes."nThe max percent unhealthy nodes allowed for the node type. + Must be between zero and 100. + } + ] + }, + "ClusterUpgradeHealthPolicy": { + "MaxPercentDeltaUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of nodes health degradation allowed during cluster upgrades. The + delta is measured between the state of the nodes at the beginning of upgrade + and the state of the nodes at the time of the health evaluation. The check is + performed after every upgrade domain upgrade completion to make sure the + global state of the cluster is within tolerated limits. The default value is + 10%. + "MaxPercentUpgradeDomainDeltaUnhealthyNodes": 0 # Optional. The + maximum allowed percentage of upgrade domain nodes health degradation allowed + during cluster upgrades. The delta is measured between the state of the + upgrade domain nodes at the beginning of upgrade and the state of the upgrade + domain nodes at the time of the health evaluation. The check is performed + after every upgrade domain upgrade completion for all completed upgrade + domains to make sure the state of the upgrade domains is within tolerated + limits. The default value is 15%. + }, + "EnableDeltaHealthEvaluation": bool, # Optional. When true, enables delta + health evaluation rather than absolute health evaluation after completion of each + upgrade domain. + "UpdateDescription": { + "FailureAction": "str", # Optional. The compensating action to + perform when a Monitored upgrade encounters monitoring policy or health + policy violations."nInvalid indicates the failure action is invalid. Rollback + specifies that the upgrade will start rolling back automatically."nManual + indicates that the upgrade will switch to UnmonitoredManual upgrade mode. + Known values are: "Invalid", "Rollback", "Manual". + "ForceRestart": bool, # Optional. If true, then processes are + forcefully restarted during upgrade even when the code version has not + changed (the upgrade only changes configuration or data). + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # Optional. + Default value is "PT0H10M0S". The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is + executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # Optional. + Default value is "PT0H2M0S". The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade + domain. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. Default + value is "0". The amount of time to wait after completing an upgrade domain + before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a + number representing the total number of milliseconds. + "InstanceCloseDelayDurationInSeconds": 4294967295, # Optional. + Default value is 4294967295. Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This + would be effective when the instance is closing during the + application/cluster"nupgrade, only for those instances which have a non-zero + delay duration configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details."nNote, the + default value of InstanceCloseDelayDurationInSeconds is 4294967295, which + indicates that the behavior will entirely depend on the delay configured in + the stateless service description. + "ReplicaSetCheckTimeoutInMilliseconds": 42949672925, # Optional. + Default value is 42949672925. The maximum amount of time to block processing + of an upgrade domain and prevent loss of availability when there are + unexpected issues. When this timeout expires, processing of the upgrade + domain will proceed regardless of availability loss issues. The timeout is + reset at the start of each upgrade domain. Valid values are between 0 and + 42949672925 inclusive. (unsigned 32-bit integer). + "RollingUpgradeMode": "UnmonitoredAuto", # Default value is + "UnmonitoredAuto". Required. The mode used to monitor health during a rolling + upgrade. The values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "UpgradeDomainTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S", + # Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of + time each upgrade domain has to complete before FailureAction is executed. It + is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + "UpgradeTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S" # + Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of time + the overall upgrade has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + }, + "UpgradeKind": "Rolling" # Optional. Default value is "Rolling". The type of + upgrade out of the following possible values. Known values are: "Invalid", + "Rolling", "Rolling_ForceRestart". Default value: "Rolling". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = update_cluster_upgrade_description + + request = build_update_cluster_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_aad_metadata( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the Azure Active Directory metadata used for secured connection to cluster. + + Gets the Azure Active Directory metadata used for secured connection to cluster. + This API is not supposed to be called separately. It provides information needed to set up an + Azure Active Directory secured connection with a Service Fabric cluster. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "metadata": { + "authority": "str", # Optional. The AAD authority url. + "client": "str", # Optional. The AAD client application Id. + "cluster": "str", # Optional. The AAD cluster application Id. + "login": "str", # Optional. The AAD login url. + "redirect": "str", # Optional. The client application redirect + address. + "tenant": "str" # Optional. The AAD tenant Id. + }, + "type": "str" # Optional. The client authentication method. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_aad_metadata_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_cluster_version( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the current Service Fabric cluster version. + + If a cluster upgrade is happening, then this API will return the lowest (older) version of the + current and target cluster runtime versions. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Version": "str" # Optional. The Service Fabric cluster runtime version. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_cluster_version_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_cluster_load( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the load of a Service Fabric cluster. + + Retrieves the load information of a Service Fabric cluster for all the metrics that have load + or capacity defined. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "LastBalancingEndTimeUtc": "2020-02-20 00:00:00", # Optional. The end time + of last resource balancing run. + "LastBalancingStartTimeUtc": "2020-02-20 00:00:00", # Optional. The starting + time of last resource balancing run. + "LoadMetricInformation": [ + { + "Action": "str", # Optional. The current action being taken + with regard to this metric. + "ActivityThreshold": "str", # Optional. The Activity + Threshold specified for this metric in the system Cluster Manifest. + "BalancingThreshold": "str", # Optional. The balancing + threshold for a certain metric. + "BufferedClusterCapacityRemaining": "str", # Optional. + Remaining capacity in the cluster excluding the reserved space. + "ClusterBufferedCapacity": "str", # Optional. Remaining + capacity in the cluster excluding the reserved space. In future releases + of Service Fabric this parameter will be deprecated in favor of + BufferedClusterCapacityRemaining. + "ClusterCapacity": "str", # Optional. The total cluster + capacity for a given metric. + "ClusterCapacityRemaining": "str", # Optional. The remaining + capacity for the metric in the cluster. + "ClusterLoad": "str", # Optional. The total cluster load. In + future releases of Service Fabric this parameter will be deprecated in + favor of CurrentClusterLoad. + "ClusterRemainingBufferedCapacity": "str", # Optional. The + remaining percentage of cluster total capacity for this metric. + "ClusterRemainingCapacity": "str", # Optional. The remaining + capacity for the metric in the cluster. In future releases of Service + Fabric this parameter will be deprecated in favor of + ClusterCapacityRemaining. + "CurrentClusterLoad": "str", # Optional. The total cluster + load. + "DeviationAfter": "str", # Optional. The standard average + deviation of the metrics after resource balancer run. + "DeviationBefore": "str", # Optional. The standard average + deviation of the metrics before resource balancer run. + "IsBalancedAfter": bool, # Optional. Value that indicates + whether the metrics is balanced or not after resource balancer run. + "IsBalancedBefore": bool, # Optional. Value that indicates + whether the metrics is balanced or not before resource balancer run. + "IsClusterCapacityViolation": bool, # Optional. Indicates + that the metric is currently over capacity in the cluster. + "MaxNodeLoadNodeId": { + "Id": "str" # Optional. Value of the node Id. This + is a 128 bit integer. + }, + "MaxNodeLoadValue": "str", # Optional. The maximum load on + any node for this metric. In future releases of Service Fabric this + parameter will be deprecated in favor of MaximumNodeLoad. + "MaximumNodeLoad": "str", # Optional. The maximum load on + any node for this metric. + "MinNodeLoadNodeId": { + "Id": "str" # Optional. Value of the node Id. This + is a 128 bit integer. + }, + "MinNodeLoadValue": "str", # Optional. The minimum load on + any node for this metric. In future releases of Service Fabric this + parameter will be deprecated in favor of MinimumNodeLoad. + "MinimumNodeLoad": "str", # Optional. The minimum load on + any node for this metric. + "Name": "str", # Optional. Name of the metric for which this + load information is provided. + "NodeBufferPercentage": "str", # Optional. The reserved + percentage of total node capacity for this metric. + "PlannedLoadRemoval": "str" # Optional. This value + represents the load of the replicas that are planned to be removed in the + future within the cluster."nThis kind of load is reported for replicas + that are currently being moving to other nodes and for replicas that are + currently being dropped but still use the load on the source node. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_cluster_load_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def toggle_verbose_service_placement_health_reporting( # pylint: disable=inconsistent-return-statements + self, + *, + enabled: bool, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Changes the verbosity of service placement health reporting. + + If verbosity is set to true, then detailed health reports will be generated when replicas + cannot be placed or dropped. + If verbosity is set to false, then no health reports will be generated when replicas cannot be + placed or dropped. + + :keyword enabled: The verbosity of service placement health reporting. + :paramtype enabled: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_toggle_verbose_service_placement_health_reporting_request( + api_version=api_version, + enabled=enabled, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def validate_cluster_upgrade( + self, + start_cluster_upgrade_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Validate and assess the impact of a code or configuration version update of a Service Fabric + cluster. + + Validate the supplied upgrade parameters and assess the expected impact of a code or + configuration version upgrade of a Service Fabric cluster. The upgrade will not be initiated. + + :param start_cluster_upgrade_description: Describes the parameters for starting a cluster + upgrade. + :type start_cluster_upgrade_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '8.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "8.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + start_cluster_upgrade_description = { + "ApplicationHealthPolicyMap": { + "ApplicationHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + health policy map item. This is the name of the application. + "Value": { + "ConsiderWarningAsError": bool, # Optional. + Indicates whether warnings are treated with the same severity as + errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to + 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is + respected but there is at least one unhealthy partition, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over the total + number of partitions in the service."nThe computation rounds + up to tolerate one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is + respected but there is at least one unhealthy replica, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the total + number of replicas in the partition."nThe computation rounds + up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # + Optional. The maximum allowed percentage of unhealthy + services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the + application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the + health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to tolerate + one failure on small numbers of services. Default percentage + is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, + # Optional. The maximum allowed percentage of unhealthy deployed + applications. Allowed values are Byte values from zero to + 100."nThe percentage represents the maximum tolerated percentage + of deployed applications that can be unhealthy before the + application is considered in error."nThis is calculated by + dividing the number of unhealthy deployed applications over the + number of nodes where the application is currently deployed on in + the cluster."nThe computation rounds up to tolerate one failure + on small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. + The key of the service type health policy map item. This + is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte + values from zero to 100"n"nThe percentage represents + the maximum tolerated percentage of partitions that + can be unhealthy before the service is considered in + error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe + computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy + replicas per partition. Allowed values are Byte + values from zero to 100."n"nThe percentage represents + the maximum tolerated percentage of replicas that can + be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is + at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the + total number of replicas in the partition."nThe + computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. + Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum + tolerated percentage of services that can be + unhealthy before the application is considered in + error."nIf the percentage is respected but there is + at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to + tolerate one failure on small numbers of services. + Default percentage is zero. + } + } + ] + } + } + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + type health policy map item. This is the name of the application + type. + "Value": 0 # Required. The value of the application + type health policy map item."nThe max percent unhealthy applications + allowed for the application type. Must be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The maximum + allowed percentage of unhealthy applications before reporting an error. For + example, to allow 10% of applications to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated percentage of + applications that can be unhealthy before the cluster is considered in + error."nIf the percentage is respected but there is at least one unhealthy + application, the health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy applications over the total number of + application instances in the cluster, excluding applications of application + types that are included in the ApplicationTypeHealthPolicyMap."nThe + computation rounds up to tolerate one failure on small numbers of + applications. Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of unhealthy nodes before reporting an error. For example, to + allow 10% of nodes to be unhealthy, this value would be 10."n"nThe percentage + represents the maximum tolerated percentage of nodes that can be unhealthy + before the cluster is considered in error."nIf the percentage is respected + but there is at least one unhealthy node, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of unhealthy + nodes over the total number of nodes in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero."n"nIn large clusters, some nodes will always be down or out for + repairs, so this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the node type + health policy map item. This is the name of the node type. + "Value": 0 # Required. The value of the node type + health policy map item."nIf the percentage is respected but there is + at least one unhealthy node in the node type, the health is evaluated + as Warning. "nThe percentage is calculated by dividing the number of + unhealthy nodes over the total number of nodes in the node type. + "nThe computation rounds up to tolerate one failure on small numbers + of nodes."nThe max percent unhealthy nodes allowed for the node type. + Must be between zero and 100. + } + ] + }, + "ClusterUpgradeHealthPolicy": { + "MaxPercentDeltaUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of nodes health degradation allowed during cluster upgrades. The + delta is measured between the state of the nodes at the beginning of upgrade + and the state of the nodes at the time of the health evaluation. The check is + performed after every upgrade domain upgrade completion to make sure the + global state of the cluster is within tolerated limits. The default value is + 10%. + "MaxPercentUpgradeDomainDeltaUnhealthyNodes": 0 # Optional. The + maximum allowed percentage of upgrade domain nodes health degradation allowed + during cluster upgrades. The delta is measured between the state of the + upgrade domain nodes at the beginning of upgrade and the state of the upgrade + domain nodes at the time of the health evaluation. The check is performed + after every upgrade domain upgrade completion for all completed upgrade + domains to make sure the state of the upgrade domains is within tolerated + limits. The default value is 15%. + }, + "CodeVersion": "str", # Optional. The cluster code version. + "ConfigVersion": "str", # Optional. The cluster configuration version. + "EnableDeltaHealthEvaluation": bool, # Optional. When true, enables delta + health evaluation rather than absolute health evaluation after completion of each + upgrade domain. + "ForceRestart": bool, # Optional. If true, then processes are forcefully + restarted during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + "InstanceCloseDelayDurationInSeconds": 4294967295, # Optional. Default value + is 4294967295. Duration in seconds, to wait before a stateless instance is + closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster"nupgrade, only for + those instances which have a non-zero delay duration configured in the service + description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details."nNote, the default + value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates that + the behavior will entirely depend on the delay configured in the stateless + service description. + "MonitoringPolicy": { + "FailureAction": "str", # Optional. The compensating action to + perform when a Monitored upgrade encounters monitoring policy or health + policy violations."nInvalid indicates the failure action is invalid. Rollback + specifies that the upgrade will start rolling back automatically."nManual + indicates that the upgrade will switch to UnmonitoredManual upgrade mode. + Known values are: "Invalid", "Rollback", "Manual". + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # Optional. + Default value is "PT0H10M0S". The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is + executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # Optional. + Default value is "PT0H2M0S". The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade + domain. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. Default + value is "0". The amount of time to wait after completing an upgrade domain + before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a + number representing the total number of milliseconds. + "UpgradeDomainTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S", + # Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of + time each upgrade domain has to complete before FailureAction is executed. It + is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + "UpgradeTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S" # + Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of time + the overall upgrade has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + }, + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value is + "UnmonitoredAuto". The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "SortOrder": "Default", # Optional. Default value is "Default". Defines the + order in which an upgrade proceeds through the cluster. Known values are: + "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + "UpgradeKind": "Rolling", # Optional. Default value is "Rolling". The kind + of upgrade out of the following possible values. Known values are: "Invalid", + "Rolling". Default value: "Rolling". + "UpgradeReplicaSetCheckTimeoutInSeconds": 42949672925 # Optional. Default + value is 42949672925. The maximum amount of time to block processing of an + upgrade domain and prevent loss of availability when there are unexpected issues. + When this timeout expires, processing of the upgrade domain will proceed + regardless of availability loss issues. The timeout is reset at the start of each + upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + 32-bit integer). + } + + # response body for status code(s): 200 + response.json() == { + "ServiceHostUpgradeImpact": "str", # Optional. The expected impact of the + upgrade. Known values are: "Invalid", "None", "ServiceHostRestart", + "UnexpectedServiceHostRestart". + "ValidationDetails": "str" # Optional. A string containing additional + details for the Fabric upgrade validation result. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "8.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = start_cluster_upgrade_description + + request = build_validate_cluster_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_node_info_list( + self, + *, + continuation_token_parameter: Optional[str] = None, + node_status_filter: Optional[str] = "default", + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the list of nodes in the Service Fabric cluster. + + The response includes the name, status, ID, health, uptime, and other details about the nodes. + + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword node_status_filter: Allows filtering the nodes based on the NodeStatus. Only the nodes + that are matching the specified filter value will be returned. The filter value can be one of + the following. Known values are: "default", "all", "up", "down", "enabling", "disabling", + "disabled", "unknown", and "removed". Default value is "default". + :paramtype node_status_filter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.3'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.3". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "CodeVersion": "str", # Optional. The version of Service + Fabric binaries that the node is running. + "ConfigVersion": "str", # Optional. The version of Service + Fabric cluster manifest that the node is using. + "FaultDomain": "str", # Optional. The fault domain of the + node. + "HealthState": "str", # Optional. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "Id": { + "Id": "str" # Optional. Value of the node Id. This + is a 128 bit integer. + }, + "InfrastructurePlacementID": "str", # Optional. PlacementID + used by the InfrastructureService. + "InstanceId": "str", # Optional. The ID representing the + node instance. While the ID of the node is deterministically generated + from the node name and remains same across restarts, the InstanceId + changes every time node restarts. + "IpAddressOrFQDN": "str", # Optional. The IP address or + fully qualified domain name of the node. + "IsNodeByNodeUpgradeInProgress": bool, # Optional. Indicates + if a node-by-node upgrade is currently being performed on this node. + "IsSeedNode": bool, # Optional. Indicates if the node is a + seed node or not. Returns true if the node is a seed node, otherwise + false. A quorum of seed nodes are required for proper operation of + Service Fabric cluster. + "IsStopped": bool, # Optional. Indicates if the node is + stopped by calling stop node API or not. Returns true if the node is + stopped, otherwise false. + "Name": "str", # Optional. The name of a Service Fabric + node. + "NodeDeactivationInfo": { + "NodeDeactivationIntent": "str", # Optional. The + intent or the reason for deactivating the node. Following are the + possible values for it. Known values are: "Invalid", "Pause", + "Restart", "RemoveData", "RemoveNode". + "NodeDeactivationStatus": "str", # Optional. The + status of node deactivation operation. Following are the possible + values. Known values are: "None", "SafetyCheckInProgress", + "SafetyCheckComplete", "Completed". + "NodeDeactivationTask": [ + { + "NodeDeactivationIntent": "str", # + Optional. The intent or the reason for deactivating the node. + Following are the possible values for it. Known values are: + "Invalid", "Pause", "Restart", "RemoveData", "RemoveNode". + "NodeDeactivationTaskId": { + "Id": "str", # Optional. + Value of the task id. + "NodeDeactivationTaskType": + "str" # Optional. The type of the task that performed + the node deactivation. Following are the possible values. + Known values are: "Invalid", "Infrastructure", "Repair", + "Client". + } + } + ], + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ] + }, + "NodeDownAt": "2020-02-20 00:00:00", # Optional. Date time + in UTC when the node went down. If node has never been down then this + value will be zero date time. + "NodeDownTimeInSeconds": "str", # Optional. Time in seconds + since the node has been in NodeStatus Down. Value zero indicates node is + not NodeStatus Down. + "NodeStatus": "str", # Optional. The status of the node. + Known values are: "Invalid", "Up", "Down", "Enabling", "Disabling", + "Disabled", "Unknown", "Removed". + "NodeTags": [ + "str" # Optional. List that contains tags, which + will be applied to the nodes. + ], + "NodeUpAt": "2020-02-20 00:00:00", # Optional. Date time in + UTC when the node came up. If the node has never been up then this value + will be zero date time. + "NodeUpTimeInSeconds": "str", # Optional. Time in seconds + since the node has been in NodeStatus Up. Value zero indicates that the + node is not Up. + "Type": "str", # Optional. The type of the node. + "UpgradeDomain": "str" # Optional. The upgrade domain of the + node. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.3")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_node_info_list_request( + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + node_status_filter=node_status_filter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_node_info( + self, + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[JSON]: + """Gets the information about a specific node in the Service Fabric cluster. + + The response includes the name, status, ID, health, uptime, and other details about the node. + + :param node_name: The name of the node. + :type node_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "CodeVersion": "str", # Optional. The version of Service Fabric binaries + that the node is running. + "ConfigVersion": "str", # Optional. The version of Service Fabric cluster + manifest that the node is using. + "FaultDomain": "str", # Optional. The fault domain of the node. + "HealthState": "str", # Optional. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Id": { + "Id": "str" # Optional. Value of the node Id. This is a 128 bit + integer. + }, + "InfrastructurePlacementID": "str", # Optional. PlacementID used by the + InfrastructureService. + "InstanceId": "str", # Optional. The ID representing the node instance. + While the ID of the node is deterministically generated from the node name and + remains same across restarts, the InstanceId changes every time node restarts. + "IpAddressOrFQDN": "str", # Optional. The IP address or fully qualified + domain name of the node. + "IsNodeByNodeUpgradeInProgress": bool, # Optional. Indicates if a + node-by-node upgrade is currently being performed on this node. + "IsSeedNode": bool, # Optional. Indicates if the node is a seed node or not. + Returns true if the node is a seed node, otherwise false. A quorum of seed nodes + are required for proper operation of Service Fabric cluster. + "IsStopped": bool, # Optional. Indicates if the node is stopped by calling + stop node API or not. Returns true if the node is stopped, otherwise false. + "Name": "str", # Optional. The name of a Service Fabric node. + "NodeDeactivationInfo": { + "NodeDeactivationIntent": "str", # Optional. The intent or the + reason for deactivating the node. Following are the possible values for it. + Known values are: "Invalid", "Pause", "Restart", "RemoveData", "RemoveNode". + "NodeDeactivationStatus": "str", # Optional. The status of node + deactivation operation. Following are the possible values. Known values are: + "None", "SafetyCheckInProgress", "SafetyCheckComplete", "Completed". + "NodeDeactivationTask": [ + { + "NodeDeactivationIntent": "str", # Optional. The + intent or the reason for deactivating the node. Following are the + possible values for it. Known values are: "Invalid", "Pause", + "Restart", "RemoveData", "RemoveNode". + "NodeDeactivationTaskId": { + "Id": "str", # Optional. Value of the task + id. + "NodeDeactivationTaskType": "str" # + Optional. The type of the task that performed the node + deactivation. Following are the possible values. Known values + are: "Invalid", "Infrastructure", "Repair", "Client". + } + } + ], + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ] + }, + "NodeDownAt": "2020-02-20 00:00:00", # Optional. Date time in UTC when the + node went down. If node has never been down then this value will be zero date + time. + "NodeDownTimeInSeconds": "str", # Optional. Time in seconds since the node + has been in NodeStatus Down. Value zero indicates node is not NodeStatus Down. + "NodeStatus": "str", # Optional. The status of the node. Known values are: + "Invalid", "Up", "Down", "Enabling", "Disabling", "Disabled", "Unknown", + "Removed". + "NodeTags": [ + "str" # Optional. List that contains tags, which will be applied to + the nodes. + ], + "NodeUpAt": "2020-02-20 00:00:00", # Optional. Date time in UTC when the + node came up. If the node has never been up then this value will be zero date + time. + "NodeUpTimeInSeconds": "str", # Optional. Time in seconds since the node has + been in NodeStatus Up. Value zero indicates that the node is not Up. + "Type": "str", # Optional. The type of the node. + "UpgradeDomain": "str" # Optional. The upgrade domain of the node. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + + request = build_get_node_info_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace_async + async def get_node_health( + self, + node_name: str, + *, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric node. + + Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection + of health events reported on the node based on the health state. If the node that you specify + by name does not exist in the health store, this returns an error. + + :param node_name: The name of the node. + :type node_name: str + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "Name": "str", # Optional. Name of the node whose health information is + described by this object. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_node_health_request( + node_name=node_name, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_node_health_using_policy( + self, + node_name: str, + cluster_health_policy: Optional[JSON] = None, + *, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric node, by using the specified health policy. + + Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection + of health events reported on the node based on the health state. Use ClusterHealthPolicy in the + POST body to override the health policies used to evaluate the health. If the node that you + specify by name does not exist in the health store, this returns an error. + + :param node_name: The name of the node. + :type node_name: str + :param cluster_health_policy: Describes the health policies used to evaluate the health of a + cluster or node. If not present, the health evaluation uses the health policy from cluster + manifest or the default health policy. Default value is None. + :type cluster_health_policy: JSON + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + cluster_health_policy = { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application type + health policy map item. This is the name of the application type. + "Value": 0 # Required. The value of the application type + health policy map item."nThe max percent unhealthy applications allowed + for the application type. Must be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates whether warnings are + treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The maximum allowed + percentage of unhealthy applications before reporting an error. For example, to + allow 10% of applications to be unhealthy, this value would be 10."n"nThe + percentage represents the maximum tolerated percentage of applications that can + be unhealthy before the cluster is considered in error."nIf the percentage is + respected but there is at least one unhealthy application, the health is + evaluated as Warning."nThis is calculated by dividing the number of unhealthy + applications over the total number of application instances in the cluster, + excluding applications of application types that are included in the + ApplicationTypeHealthPolicyMap."nThe computation rounds up to tolerate one + failure on small numbers of applications. Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum allowed percentage of + unhealthy nodes before reporting an error. For example, to allow 10% of nodes to + be unhealthy, this value would be 10."n"nThe percentage represents the maximum + tolerated percentage of nodes that can be unhealthy before the cluster is + considered in error."nIf the percentage is respected but there is at least one + unhealthy node, the health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy nodes over the total number of nodes in the + cluster."nThe computation rounds up to tolerate one failure on small numbers of + nodes. Default percentage is zero."n"nIn large clusters, some nodes will always + be down or out for repairs, so this percentage should be configured to tolerate + that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the node type health + policy map item. This is the name of the node type. + "Value": 0 # Required. The value of the node type health + policy map item."nIf the percentage is respected but there is at least + one unhealthy node in the node type, the health is evaluated as Warning. + "nThe percentage is calculated by dividing the number of unhealthy nodes + over the total number of nodes in the node type. "nThe computation rounds + up to tolerate one failure on small numbers of nodes."nThe max percent + unhealthy nodes allowed for the node type. Must be between zero and 100. + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "Name": "str", # Optional. Name of the node whose health information is + described by this object. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if cluster_health_policy is not None: + _json = cluster_health_policy + else: + _json = None + + request = build_get_node_health_using_policy_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def report_node_health( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + health_information: JSON, + *, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric node. + + Reports health state of the specified Service Fabric node. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway node, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetNodeHealth and check that the + report appears in the HealthEvents section. + + :param node_name: The name of the node. + :type node_name: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: JSON + :keyword immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :paramtype immediate: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + health_information = { + "Description": "str", # Optional. The description of the health information. + It represents free text used to add human readable information about the + report."nThe maximum string length for the description is 4096 characters."nIf + the provided string is longer, it will be automatically truncated."nWhen + truncated, the last characters of the description contain a marker "[Truncated]", + and total string size is 4096 characters."nThe presence of the marker indicates + to users that truncation occurred."nNote that when truncated, the description has + less than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID which identifies the + health report and can be used to find more detailed information about a specific + health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Property": "str", # Required. The property of the health information. An + entity can have health reports for different properties."nThe property is a + string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report."nFor example, a reporter + with SourceId "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same reporter + can monitor the node connectivity, so it can report a property "Connectivity" on + the same node."nIn the health store, these reports are treated as separate health + events for the specified node."n"nTogether with the SourceId, the property + uniquely identifies the health information. + "RemoveWhenExpired": bool, # Optional. Value that indicates whether the + report is removed from health store when it expires."nIf set to true, the report + is removed from the health store after it expires."nIf set to false, the report + is treated as an error when expired. The value of this property is false by + default."nWhen clients report periodically, they should set RemoveWhenExpired + false (default)."nThis way, if the reporter has issues (e.g. deadlock) and can't + report, the entity is evaluated at error when the health report expires."nThis + flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for this health + report as a numeric string."nThe report sequence number is used by the health + store to detect stale reports."nIf not specified, a sequence number is + auto-generated by the health client when a report is added. + "SourceId": "str", # Required. The source name that identifies the + client/watchdog/system component that generated the health information. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The duration for + which this health report is valid. This field uses ISO8601 format for specifying + the duration."nWhen clients report periodically, they should send reports with + higher frequency than time to live."nIf clients report on transition, they can + set the time to live to infinite."nWhen time to live expires, the health event + that contains the health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = health_information + + request = build_report_node_health_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_node_load_info( + self, + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the load information of a Service Fabric node. + + Retrieves the load information of a Service Fabric node for all the metrics that have load or + capacity defined. + + :param node_name: The name of the node. + :type node_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "NodeLoadMetricInformation": [ + { + "BufferedNodeCapacityRemaining": "str", # Optional. The + remaining capacity which is not reserved by NodeBufferPercentage for this + metric on the node. + "CurrentNodeLoad": "str", # Optional. Current load on the + node for this metric. + "IsCapacityViolation": bool, # Optional. Indicates if there + is a capacity violation for this metric on the node. + "Name": "str", # Optional. Name of the metric for which this + load information is provided. + "NodeBufferedCapacity": "str", # Optional. The value that + indicates the reserved capacity for this metric on the node. + "NodeCapacity": "str", # Optional. Total capacity on the + node for this metric. + "NodeCapacityRemaining": "str", # Optional. The remaining + capacity on the node for the metric. + "NodeLoad": "str", # Optional. Current load on the node for + this metric. In future releases of Service Fabric this parameter will be + deprecated in favor of CurrentNodeLoad. + "NodeRemainingBufferedCapacity": "str", # Optional. The + remaining reserved capacity for this metric on the node. In future + releases of Service Fabric this parameter will be deprecated in favor of + BufferedNodeCapacityRemaining. + "NodeRemainingCapacity": "str", # Optional. The remaining + capacity on the node for this metric. In future releases of Service + Fabric this parameter will be deprecated in favor of + NodeCapacityRemaining. + "PlannedNodeLoadRemoval": "str" # Optional. This value + represents the load of the replicas that are planned to be removed in the + future."nThis kind of load is reported for replicas that are currently + being moving to other nodes and for replicas that are currently being + dropped but still use the load on the source node. + } + ], + "NodeName": "str" # Optional. Name of the node for which the load + information is provided by this object. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_node_load_info_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def disable_node( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + deactivation_intent_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deactivate a Service Fabric cluster node with the specified deactivation intent. + + Deactivate a Service Fabric cluster node with the specified deactivation intent. Once the + deactivation is in progress, the deactivation intent can be increased, but not decreased (for + example, a node that is deactivated with the Pause intent can be deactivated further with + Restart, but not the other way around. Nodes may be reactivated using the Activate a node + operation any time after they are deactivated. If the deactivation is not complete, this will + cancel the deactivation. A node that goes down and comes back up while deactivated will still + need to be reactivated before services will be placed on that node. + + :param node_name: The name of the node. + :type node_name: str + :param deactivation_intent_description: Describes the intent or reason for deactivating the + node. + :type deactivation_intent_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + deactivation_intent_description = { + "DeactivationIntent": "str" # Optional. Describes the intent or reason for + deactivating the node. The possible values are following. Known values are: + "Pause", "Restart", "RemoveData". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = deactivation_intent_description + + request = build_disable_node_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def enable_node( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Activate a Service Fabric cluster node that is currently deactivated. + + Activates a Service Fabric cluster node that is currently deactivated. Once activated, the node + will again become a viable target for placing new replicas, and any deactivated replicas + remaining on the node will be reactivated. + + :param node_name: The name of the node. + :type node_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_enable_node_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def remove_node_state( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Notifies Service Fabric that the persisted state on a node has been permanently removed or + lost. + + This implies that it is not possible to recover the persisted state of that node. This + generally happens if a hard disk has been wiped clean, or if a hard disk crashes. The node has + to be down for this operation to be successful. This operation lets Service Fabric know that + the replicas on that node no longer exist, and that Service Fabric should stop waiting for + those replicas to come back up. Do not run this cmdlet if the state on the node has not been + removed and the node can come back up with its state intact. Starting from Service Fabric 6.5, + in order to use this API for seed nodes, please change the seed nodes to regular (non-seed) + nodes and then invoke this API to remove the node state. If the cluster is running on Azure, + after the seed node goes down, Service Fabric will try to change it to a non-seed node + automatically. To make this happen, make sure the number of non-seed nodes in the primary node + type is no less than the number of Down seed nodes. If necessary, add more nodes to the primary + node type to achieve this. For standalone cluster, if the Down seed node is not expected to + come back up with its state intact, please remove the node from the cluster, see + https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-windows-server-add-remove-nodes. + + :param node_name: The name of the node. + :type node_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_remove_node_state_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def restart_node( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + restart_node_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Restarts a Service Fabric cluster node. + + Restarts a Service Fabric cluster node that is already started. + + :param node_name: The name of the node. + :type node_name: str + :param restart_node_description: The instance of the node to be restarted and a flag indicating + the need to take dump of the fabric process. + :type restart_node_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + restart_node_description = { + "CreateFabricDump": "False", # Optional. Default value is "False". Specify + True to create a dump of the fabric node process. This is case-sensitive. Known + values are: "False", "True". Default value: "False". + "NodeInstanceId": "0" # Default value is "0". Required. The instance ID of + the target node. If instance ID is specified the node is restarted only if it + matches with the current instance of the node. A default value of "0" would match + any instance ID. The instance ID can be obtained using get node query. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = restart_node_description + + request = build_restart_node_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def remove_configuration_overrides( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Removes configuration overrides on the specified node. + + This api allows removing all existing configuration overrides on specified node. + + :param node_name: The name of the node. + :type node_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '7.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "7.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_remove_configuration_overrides_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_configuration_overrides( + self, + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets the list of configuration overrides on the specified node. + + This api allows getting all existing configuration overrides on the specified node. + + :param node_name: The name of the node. + :type node_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '7.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "7.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "ParameterName": "str", # Required. Name of the parameter that has + been overridden. + "ParameterValue": "str", # Required. Value of the overridden + parameter. + "PersistAcrossUpgrade": bool, # Optional. A value that indicates + whether config override will be removed on upgrade or will still be + considered as valid. + "SectionName": "str", # Required. Name of the section for the + parameter override. + "Timeout": "1 day, 0:00:00" # Optional. The duration until config + override is considered as valid. + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_configuration_overrides_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def add_configuration_parameter_overrides( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + config_parameter_override_list: List[JSON], + *, + force: Optional[bool] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Adds the list of configuration overrides on the specified node. + + This api allows adding all existing configuration overrides on the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param config_parameter_override_list: Description for adding list of configuration overrides. + :type config_parameter_override_list: list[JSON] + :keyword force: Force adding configuration overrides on specified nodes. Default value is None. + :paramtype force: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '7.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "7.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + config_parameter_override_list = [ + { + "ParameterName": "str", # Required. Name of the parameter that has + been overridden. + "ParameterValue": "str", # Required. Value of the overridden + parameter. + "PersistAcrossUpgrade": bool, # Optional. A value that indicates + whether config override will be removed on upgrade or will still be + considered as valid. + "SectionName": "str", # Required. Name of the section for the + parameter override. + "Timeout": "1 day, 0:00:00" # Optional. The duration until config + override is considered as valid. + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = config_parameter_override_list + + request = build_add_configuration_parameter_overrides_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + force=force, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def remove_node_tags( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + node_tags: List[str], + **kwargs: Any + ) -> None: + """Removes the list of tags from the specified node. + + This api allows removing set of tags from the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param node_tags: Description for adding list of node tags. + :type node_tags: list[str] + :keyword api_version: The version of the API. This parameter is required and its value must be + '7.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "7.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + node_tags = [ + "str" # Optional. + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = node_tags + + request = build_remove_node_tags_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def add_node_tags( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + node_tags: List[str], + **kwargs: Any + ) -> None: + """Adds the list of tags on the specified node. + + This api allows adding tags to the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param node_tags: Description for adding list of node tags. + :type node_tags: list[str] + :keyword api_version: The version of the API. This parameter is required and its value must be + '7.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "7.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + node_tags = [ + "str" # Optional. + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = node_tags + + request = build_add_node_tags_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_application_type_info_list( + self, + *, + application_type_definition_kind_filter: Optional[int] = 0, + exclude_application_parameters: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the list of application types in the Service Fabric cluster. + + Returns the information about the application types that are provisioned or in the process of + being provisioned in the Service Fabric cluster. Each version of an application type is + returned as one application type. The response includes the name, version, status, and other + details about the application type. This is a paged query, meaning that if not all of the + application types fit in a page, one page of results is returned as well as a continuation + token, which can be used to get the next page. For example, if there are 10 application types + but a page only fits the first three application types, or if max results is set to 3, then + three is returned. To access the rest of the results, retrieve subsequent pages by using the + returned continuation token in the next query. An empty continuation token is returned if there + are no subsequent pages. + + :keyword application_type_definition_kind_filter: Used to filter on + ApplicationTypeDefinitionKind which is the mechanism used to define a Service Fabric + application type. + + + * Default - Default value, which performs the same function as selecting "All". The value is + 0. + * All - Filter that matches input with any ApplicationTypeDefinitionKind value. The value is + 65535. + * ServiceFabricApplicationPackage - Filter that matches input with + ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. The value is 1. + * Compose - Filter that matches input with ApplicationTypeDefinitionKind value Compose. The + value is 2. Default value is 0. + :paramtype application_type_definition_kind_filter: int + :keyword exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :paramtype exclude_application_parameters: bool + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "ApplicationTypeDefinitionKind": "str", # Optional. The + mechanism used to define a Service Fabric application type. Known values + are: "Invalid", "ServiceFabricApplicationPackage", "Compose". + "ApplicationTypeMetadata": { + "ApplicationTypeProvisionTimestamp": "str", # + Optional. The timestamp when the application type was provisioned. + "ArmMetadata": { + "ArmResourceId": "str" # Optional. A string + containing the ArmResourceId. + } + }, + "DefaultParameterList": [ + { + "Key": "str", # Required. The name of the + parameter. + "Value": "str" # Required. The value of the + parameter. + } + ], + "Name": "str", # Optional. The application type name as + defined in the application manifest. + "Status": "str", # Optional. The status of the application + type. Known values are: "Invalid", "Provisioning", "Available", + "Unprovisioning", "Failed". + "StatusDetails": "str", # Optional. Additional detailed + information about the status of the application type. + "Version": "str" # Optional. The version of the application + type as defined in the application manifest. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_type_info_list_request( + api_version=api_version, + application_type_definition_kind_filter=application_type_definition_kind_filter, + exclude_application_parameters=exclude_application_parameters, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_application_type_info_list_by_name( + self, + application_type_name: str, + *, + application_type_version: Optional[str] = None, + exclude_application_parameters: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the list of application types in the Service Fabric cluster matching exactly the specified + name. + + Returns the information about the application types that are provisioned or in the process of + being provisioned in the Service Fabric cluster. These results are of application types whose + name match exactly the one specified as the parameter, and which comply with the given query + parameters. All versions of the application type matching the application type name are + returned, with each version returned as one application type. The response includes the name, + version, status, and other details about the application type. This is a paged query, meaning + that if not all of the application types fit in a page, one page of results is returned as well + as a continuation token, which can be used to get the next page. For example, if there are 10 + application types but a page only fits the first three application types, or if max results is + set to 3, then three is returned. To access the rest of the results, retrieve subsequent pages + by using the returned continuation token in the next query. An empty continuation token is + returned if there are no subsequent pages. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :keyword application_type_version: The version of the application type. Default value is None. + :paramtype application_type_version: str + :keyword exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :paramtype exclude_application_parameters: bool + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "ApplicationTypeDefinitionKind": "str", # Optional. The + mechanism used to define a Service Fabric application type. Known values + are: "Invalid", "ServiceFabricApplicationPackage", "Compose". + "ApplicationTypeMetadata": { + "ApplicationTypeProvisionTimestamp": "str", # + Optional. The timestamp when the application type was provisioned. + "ArmMetadata": { + "ArmResourceId": "str" # Optional. A string + containing the ArmResourceId. + } + }, + "DefaultParameterList": [ + { + "Key": "str", # Required. The name of the + parameter. + "Value": "str" # Required. The value of the + parameter. + } + ], + "Name": "str", # Optional. The application type name as + defined in the application manifest. + "Status": "str", # Optional. The status of the application + type. Known values are: "Invalid", "Provisioning", "Available", + "Unprovisioning", "Failed". + "StatusDetails": "str", # Optional. Additional detailed + information about the status of the application type. + "Version": "str" # Optional. The version of the application + type as defined in the application manifest. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_type_info_list_by_name_request( + application_type_name=application_type_name, + api_version=api_version, + application_type_version=application_type_version, + exclude_application_parameters=exclude_application_parameters, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def provision_application_type( # pylint: disable=inconsistent-return-statements + self, + provision_application_type_description_base_required_body_param: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Provisions or registers a Service Fabric application type with the cluster using the '.sfpkg' + package in the external store or using the application package in the image store. + + Provisions a Service Fabric application type with the cluster. The provision is required before + any new applications can be instantiated. + The provision operation can be performed either on the application package specified by the + relativePathInImageStore, or by using the URI of the external '.sfpkg'. + + :param provision_application_type_description_base_required_body_param: The base type of + provision application type description which supports either image store-based provision or + external store-based provision. + :type provision_application_type_description_base_required_body_param: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + kind = 'ExternalStoreProvisionApplicationTypeDescription' or + 'ProvisionApplicationTypeDescription' + + # JSON input template you can fill out and use as your body input. + provision_application_type_description_base_required_body_param = { + "Async": bool, # Required. Indicates whether or not provisioning should + occur asynchronously. When set to true, the provision operation returns when the + request is accepted by the system, and the provision operation continues without + any timeout limit. The default value is false. For large application packages, we + recommend setting the value to true. + Kind: Kind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = provision_application_type_description_base_required_body_param + + request = build_provision_application_type_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def unprovision_application_type( # pylint: disable=inconsistent-return-statements + self, + application_type_name: str, + unprovision_application_type_description_info: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Removes or unregisters a Service Fabric application type from the cluster. + + This operation can only be performed if all application instances of the application type have + been deleted. Once the application type is unregistered, no new application instances can be + created for this particular application type. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param unprovision_application_type_description_info: The relative path for the application + package in the image store specified during the prior copy operation. + :type unprovision_application_type_description_info: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + unprovision_application_type_description_info = { + "ApplicationTypeVersion": "str", # Required. The version of the application + type as defined in the application manifest. + "Async": bool # Optional. The flag indicating whether or not unprovision + should occur asynchronously. When set to true, the unprovision operation returns + when the request is accepted by the system, and the unprovision operation + continues without any timeout limit. The default value is false. However, we + recommend setting it to true for large application packages that were + provisioned. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = unprovision_application_type_description_info + + request = build_unprovision_application_type_request( + application_type_name=application_type_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def update_application_type_arm_metadata( # pylint: disable=inconsistent-return-statements + self, + application_type_name: str, + application_type_arm_metadata_update_description: JSON, + *, + application_type_version: str, + timeout: Optional[int] = 60, + force: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Updates the Arm Metadata for a specific Application Type. + + Updates the Arm Metadata for a specific Application Type. Is able to be called immediately + after the provision app type API is called. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_arm_metadata_update_description: The Arm metadata to be assocated with + a specific application type. + :type application_type_arm_metadata_update_description: JSON + :keyword application_type_version: The version of the application type. + :paramtype application_type_version: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword force: Force parameter used to prevent accidental Arm metadata update. Default value + is None. + :paramtype force: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '9.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "9.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_type_arm_metadata_update_description = { + "ArmResourceId": "str" # Optional. A string containing the ArmResourceId. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = application_type_arm_metadata_update_description + + request = build_update_application_type_arm_metadata_request( + application_type_name=application_type_name, + api_version=api_version, + content_type=content_type, + application_type_version=application_type_version, + json=_json, + timeout=timeout, + force=force, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_service_type_info_list( + self, + application_type_name: str, + *, + application_type_version: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets the list containing the information about service types that are supported by a + provisioned application type in a Service Fabric cluster. + + Gets the list containing the information about service types that are supported by a + provisioned application type in a Service Fabric cluster. The provided application type must + exist. Otherwise, a 404 status is returned. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :keyword application_type_version: The version of the application type. + :paramtype application_type_version: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "IsServiceGroup": bool, # Optional. Indicates whether the service is + a service group. If it is, the property value is true otherwise false. + "ServiceManifestName": "str", # Optional. The name of the service + manifest in which this service type is defined. + "ServiceManifestVersion": "str", # Optional. The version of the + service manifest in which this service type is defined. + "ServiceTypeDescription": { + "Extensions": [ + { + "Key": "str", # Optional. The name of the + extension. + "Value": "str" # Optional. The extension + value. + } + ], + "IsStateful": bool, # Optional. Indicates whether the + service type is a stateful service type or a stateless service type. This + property is true if the service type is a stateful service type, false + otherwise. + "LoadMetrics": [ + { + "AuxiliaryDefaultLoad": 0, # Optional. Used + only for Stateful services. The default amount of load, as a + number, that this service creates for this metric when it is an + Auxiliary replica. + "DefaultLoad": 0, # Optional. Used only for + Stateless services. The default amount of load, as a number, that + this service creates for this metric. + "Name": "str", # 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. + "PrimaryDefaultLoad": 0, # Optional. Used + only for Stateful services. The default amount of load, as a + number, that this service creates for this metric when it is a + Primary replica. + "SecondaryDefaultLoad": 0, # Optional. Used + only for Stateful services. The default amount of load, as a + number, that this service creates for this metric when it is a + Secondary replica. + "Weight": "str" # Optional. The service load + metric relative weight, compared to other metrics configured for + this service, as a number. Known values are: "Zero", "Low", + "Medium", "High". + } + ], + "PlacementConstraints": "str", # Optional. The placement + constraint to be used when instantiating this service in a Service Fabric + cluster. + "ServicePlacementPolicies": [ + { + Type: Type + } + ], + "ServiceTypeName": "str", # Optional. Name of the service + type as specified in the service manifest. + Kind: Kind + } + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_service_type_info_list_request( + application_type_name=application_type_name, + api_version=api_version, + application_type_version=application_type_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def get_service_type_info_by_name( + self, + application_type_name: str, + service_type_name: str, + *, + application_type_version: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[JSON]: + """Gets the information about a specific service type that is supported by a provisioned + application type in a Service Fabric cluster. + + Gets the information about a specific service type that is supported by a provisioned + application type in a Service Fabric cluster. The provided application type must exist. + Otherwise, a 404 status is returned. A 204 response is returned if the specified service type + is not found in the cluster. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param service_type_name: Specifies the name of a Service Fabric service type. + :type service_type_name: str + :keyword application_type_version: The version of the application type. + :paramtype application_type_version: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "IsServiceGroup": bool, # Optional. Indicates whether the service is a + service group. If it is, the property value is true otherwise false. + "ServiceManifestName": "str", # Optional. The name of the service manifest + in which this service type is defined. + "ServiceManifestVersion": "str", # Optional. The version of the service + manifest in which this service type is defined. + "ServiceTypeDescription": { + "Extensions": [ + { + "Key": "str", # Optional. The name of the extension. + "Value": "str" # Optional. The extension value. + } + ], + "IsStateful": bool, # Optional. Indicates whether the service type + is a stateful service type or a stateless service type. This property is true + if the service type is a stateful service type, false otherwise. + "LoadMetrics": [ + { + "AuxiliaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is an Auxiliary replica. + "DefaultLoad": 0, # Optional. Used only for + Stateless services. The default amount of load, as a number, that + this service creates for this metric. + "Name": "str", # 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. + "PrimaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is a Primary replica. + "SecondaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is a Secondary replica. + "Weight": "str" # Optional. The service load metric + relative weight, compared to other metrics configured for this + service, as a number. Known values are: "Zero", "Low", "Medium", + "High". + } + ], + "PlacementConstraints": "str", # Optional. The placement constraint + to be used when instantiating this service in a Service Fabric cluster. + "ServicePlacementPolicies": [ + { + Type: Type + } + ], + "ServiceTypeName": "str", # Optional. Name of the service type as + specified in the service manifest. + Kind: Kind + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + + request = build_get_service_type_info_by_name_request( + application_type_name=application_type_name, + service_type_name=service_type_name, + api_version=api_version, + application_type_version=application_type_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace_async + async def get_service_manifest( + self, + application_type_name: str, + *, + application_type_version: str, + service_manifest_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the manifest describing a service type. + + Gets the manifest describing a service type. The response contains the service manifest XML as + a string. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :keyword application_type_version: The version of the application type. + :paramtype application_type_version: str + :keyword service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. + :paramtype service_manifest_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Manifest": "str" # Optional. The XML manifest as a string. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_service_manifest_request( + application_type_name=application_type_name, + api_version=api_version, + application_type_version=application_type_version, + service_manifest_name=service_manifest_name, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_deployed_service_type_info_list( + self, + node_name: str, + application_id: str, + *, + service_manifest_name: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets the list containing the information about service types from the applications deployed on + a node in a Service Fabric cluster. + + Gets the list containing the information about service types from the applications deployed on + a node in a Service Fabric cluster. The response includes the name of the service type, its + registration status, the code package that registered it and activation ID of the service + package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword service_manifest_name: The name of the service manifest to filter the list of deployed + service type information. If specified, the response will only contain the information about + service types that are defined in this service manifest. Default value is None. + :paramtype service_manifest_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "CodePackageName": "str", # Optional. The name of the code package + that registered the service type. + "ServiceManifestName": "str", # Optional. The name of the service + manifest in which this service type is defined. + "ServicePackageActivationId": "str", # Optional. The ActivationId of + a deployed service package. If ServicePackageActivationMode specified at the + time of creating the service"nis 'SharedProcess' (or if it is not specified, + in which case it defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + "ServiceTypeName": "str", # Optional. Name of the service type as + specified in the service manifest. + "Status": "str" # Optional. The status of the service type + registration on the node. Known values are: "Invalid", "Disabled", "Enabled", + "Registered". + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_deployed_service_type_info_list_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + service_manifest_name=service_manifest_name, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def get_deployed_service_type_info_by_name( + self, + node_name: str, + application_id: str, + service_type_name: str, + *, + service_manifest_name: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[List[JSON]]: + """Gets the information about a specified service type of the application deployed on a node in a + Service Fabric cluster. + + Gets the list containing the information about a specific service type from the applications + deployed on a node in a Service Fabric cluster. The response includes the name of the service + type, its registration status, the code package that registered it and activation ID of the + service package. Each entry represents one activation of a service type, differentiated by the + activation ID. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_type_name: Specifies the name of a Service Fabric service type. + :type service_type_name: str + :keyword service_manifest_name: The name of the service manifest to filter the list of deployed + service type information. If specified, the response will only contain the information about + service types that are defined in this service manifest. Default value is None. + :paramtype service_manifest_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "CodePackageName": "str", # Optional. The name of the code package + that registered the service type. + "ServiceManifestName": "str", # Optional. The name of the service + manifest in which this service type is defined. + "ServicePackageActivationId": "str", # Optional. The ActivationId of + a deployed service package. If ServicePackageActivationMode specified at the + time of creating the service"nis 'SharedProcess' (or if it is not specified, + in which case it defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + "ServiceTypeName": "str", # Optional. Name of the service type as + specified in the service manifest. + "Status": "str" # Optional. The status of the service type + registration on the node. Known values are: "Invalid", "Disabled", "Enabled", + "Registered". + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[List[JSON]]] + + + request = build_get_deployed_service_type_info_by_name_request( + node_name=node_name, + application_id=application_id, + service_type_name=service_type_name, + api_version=api_version, + service_manifest_name=service_manifest_name, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace_async + async def create_application( # pylint: disable=inconsistent-return-statements + self, + application_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates a Service Fabric application. + + Creates a Service Fabric application using the specified description. + + :param application_description: Description for creating an application. + :type application_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_description = { + "ApplicationCapacity": { + "ApplicationMetrics": [ + { + "MaximumCapacity": 0.0, # Optional. The maximum node + capacity for Service Fabric application."nThis is the maximum Load + for an instance of this application on a single node. Even if the + capacity of node is greater than this value, Service Fabric will + limit the total load of services within the application on each node + to this value."nIf set to zero, capacity for this metric is unlimited + on each node."nWhen creating a new application with application + capacity defined, the product of MaximumNodes and this value must + always be smaller than or equal to TotalApplicationCapacity."nWhen + updating existing application with application capacity, the product + of MaximumNodes and this value must always be smaller than or equal + to TotalApplicationCapacity. + "Name": "str", # Optional. The name of the metric. + "ReservationCapacity": 0.0, # Optional. The node + reservation capacity for Service Fabric application."nThis is the + amount of load which is reserved on nodes which have instances of + this application."nIf MinimumNodes is specified, then the product of + these values will be the capacity reserved in the cluster for the + application."nIf set to zero, no capacity is reserved for this + metric."nWhen setting application capacity or when updating + application capacity; this value must be smaller than or equal to + MaximumCapacity for each metric. + "TotalApplicationCapacity": 0.0 # Optional. The + total metric capacity for Service Fabric application."nThis is the + total metric capacity for this application in the cluster. Service + Fabric will try to limit the sum of loads of services within the + application to this value."nWhen creating a new application with + application capacity defined, the product of MaximumNodes and + MaximumCapacity must always be smaller than or equal to this value. + } + ], + "MaximumNodes": 0.0, # Optional. The maximum number of nodes where + Service Fabric will reserve capacity for this application. Note that this + does not mean that the services of this application will be placed on all of + those nodes. By default, the value of this property is zero and it means that + the services can be placed on any node. + "MinimumNodes": 0.0 # Optional. The minimum number of nodes where + Service Fabric will reserve capacity for this application. Note that this + does not mean that the services of this application will be placed on all of + those nodes. If this property is set to zero, no capacity will be reserved. + The value of this property cannot be more than the value of the MaximumNodes + property. + }, + "ManagedApplicationIdentity": { + "ManagedIdentities": [ + { + "Name": "str", # Required. The name of the identity. + "PrincipalId": "str" # Optional. The identity's + PrincipalId. + } + ], + "TokenServiceEndpoint": "str" # Optional. Token service endpoint. + }, + "Name": "str", # Required. The name of the application, including the + 'fabric:' URI scheme. + "ParameterList": [ + { + "Key": "str", # Required. The name of the parameter. + "Value": "str" # Required. The value of the parameter. + } + ], + "TypeName": "str", # Required. The application type name as defined in the + application manifest. + "TypeVersion": "str" # Required. The version of the application type as + defined in the application manifest. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = application_description + + request = build_create_application_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def delete_application( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + *, + force_remove: Optional[bool] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes an existing Service Fabric application. + + An application must be created before it can be deleted. Deleting an application will delete + all services that are part of that application. By default, Service Fabric will try to close + service replicas in a graceful manner and then delete the service. However, if a service is + having issues closing the replica gracefully, the delete operation may take a long time or get + stuck. Use the optional ForceRemove flag to skip the graceful close sequence and forcefully + delete the application and all of its services. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword force_remove: Remove a Service Fabric application or service forcefully without going + through the graceful shutdown sequence. This parameter can be used to forcefully delete an + application or service for which delete is timing out due to issues in the service code that + prevents graceful close of replicas. Default value is None. + :paramtype force_remove: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_delete_application_request( + application_id=application_id, + api_version=api_version, + force_remove=force_remove, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_application_load_info( + self, + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[JSON]: + """Gets load information about a Service Fabric application. + + Returns the load information about the application that was created or in the process of being + created in the Service Fabric cluster and whose name matches the one specified as the + parameter. The response includes the name, minimum nodes, maximum nodes, the number of nodes + the application is occupying currently, and application load metric information about the + application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ApplicationLoadMetricInformation": [ + { + "ApplicationCapacity": 0.0, # Optional. Total capacity for + this metric in this application instance. + "ApplicationLoad": 0.0, # Optional. Current load for this + metric in this application instance. + "Name": "str", # Optional. The name of the metric. + "ReservationCapacity": 0.0 # Optional. This is the capacity + reserved in the cluster for the application."nIt's the product of + NodeReservationCapacity and MinimumNodes."nIf set to zero, no capacity is + reserved for this metric."nWhen setting application capacity or when + updating application capacity this value must be smaller than or equal to + MaximumCapacity for each metric. + } + ], + "Id": "str", # Optional. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify + the application resource."nStarting in version 6.0, hierarchical names are + delimited with the "~" character. For example, if the application name is + "fabric:/myapp/app1","nthe application identity would be "myapp~app1" in 6.0+ and + "myapp/app1" in previous versions. + "MaximumNodes": 0.0, # Optional. The maximum number of nodes where this + application can be instantiated."nIt is the number of nodes this application is + allowed to span."nFor applications that do not have application capacity defined + this value will be zero. + "MinimumNodes": 0.0, # Optional. The minimum number of nodes for this + application."nIt is the number of nodes where Service Fabric will reserve + Capacity in the cluster which equals to ReservedLoad * MinimumNodes for this + Application instance."nFor applications that do not have application capacity + defined this value will be zero. + "NodeCount": 0.0 # Optional. The number of nodes on which this application + is instantiated."nFor applications that do not have application capacity defined + this value will be zero. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + + request = build_get_application_load_info_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace_async + async def get_application_info_list( + self, + *, + application_definition_kind_filter: Optional[int] = 0, + application_type_name: Optional[str] = None, + exclude_application_parameters: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the list of applications created in the Service Fabric cluster that match the specified + filters. + + Gets the information about the applications that were created or in the process of being + created in the Service Fabric cluster and match the specified filters. The response includes + the name, type, status, parameters, and other details about the application. If the + applications do not fit in a page, one page of results is returned as well as a continuation + token, which can be used to get the next page. Filters ApplicationTypeName and + ApplicationDefinitionKindFilter cannot be specified at the same time. + + :keyword application_definition_kind_filter: Used to filter on ApplicationDefinitionKind, which + is the mechanism used to define a Service Fabric application. + + + * Default - Default value, which performs the same function as selecting "All". The value is + 0. + * All - Filter that matches input with any ApplicationDefinitionKind value. The value is + 65535. + * ServiceFabricApplicationDescription - Filter that matches input with + ApplicationDefinitionKind value ServiceFabricApplicationDescription. The value is 1. + * Compose - Filter that matches input with ApplicationDefinitionKind value Compose. The value + is 2. Default value is 0. + :paramtype application_definition_kind_filter: int + :keyword application_type_name: The application type name used to filter the applications to + query for. This value should not contain the application type version. Default value is None. + :paramtype application_type_name: str + :keyword exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :paramtype exclude_application_parameters: bool + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.1'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.1". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "ApplicationDefinitionKind": "str", # Optional. The + mechanism used to define a Service Fabric application. Known values are: + "Invalid", "ServiceFabricApplicationDescription", "Compose". + "ApplicationMetadata": { + "ArmMetadata": { + "ArmResourceId": "str" # Optional. A string + containing the ArmResourceId. + } + }, + "HealthState": "str", # Optional. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "Id": "str", # Optional. The identity of the application. + This is an encoded representation of the application name. This is used + in the REST APIs to identify the application resource."nStarting in + version 6.0, hierarchical names are delimited with the "~" character. For + example, if the application name is "fabric:/myapp/app1","nthe + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + "ManagedApplicationIdentity": { + "ManagedIdentities": [ + { + "Name": "str", # Required. The name + of the identity. + "PrincipalId": "str" # Optional. The + identity's PrincipalId. + } + ], + "TokenServiceEndpoint": "str" # Optional. Token + service endpoint. + }, + "Name": "str", # Optional. The name of the application, + including the 'fabric:' URI scheme. + "Parameters": [ + { + "Key": "str", # Required. The name of the + parameter. + "Value": "str" # Required. The value of the + parameter. + } + ], + "Status": "str", # Optional. The status of the application. + Known values are: "Invalid", "Ready", "Upgrading", "Creating", + "Deleting", "Failed". + "TypeName": "str", # Optional. The application type name as + defined in the application manifest. + "TypeVersion": "str" # Optional. The version of the + application type as defined in the application manifest. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.1")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_info_list_request( + api_version=api_version, + application_definition_kind_filter=application_definition_kind_filter, + application_type_name=application_type_name, + exclude_application_parameters=exclude_application_parameters, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_application_info( + self, + application_id: str, + *, + exclude_application_parameters: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[JSON]: + """Gets information about a Service Fabric application. + + Returns the information about the application that was created or in the process of being + created in the Service Fabric cluster and whose name matches the one specified as the + parameter. The response includes the name, type, status, parameters, and other details about + the application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :paramtype exclude_application_parameters: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ApplicationDefinitionKind": "str", # Optional. The mechanism used to define + a Service Fabric application. Known values are: "Invalid", + "ServiceFabricApplicationDescription", "Compose". + "ApplicationMetadata": { + "ArmMetadata": { + "ArmResourceId": "str" # Optional. A string containing the + ArmResourceId. + } + }, + "HealthState": "str", # Optional. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Id": "str", # Optional. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify + the application resource."nStarting in version 6.0, hierarchical names are + delimited with the "~" character. For example, if the application name is + "fabric:/myapp/app1","nthe application identity would be "myapp~app1" in 6.0+ and + "myapp/app1" in previous versions. + "ManagedApplicationIdentity": { + "ManagedIdentities": [ + { + "Name": "str", # Required. The name of the identity. + "PrincipalId": "str" # Optional. The identity's + PrincipalId. + } + ], + "TokenServiceEndpoint": "str" # Optional. Token service endpoint. + }, + "Name": "str", # Optional. The name of the application, including the + 'fabric:' URI scheme. + "Parameters": [ + { + "Key": "str", # Required. The name of the parameter. + "Value": "str" # Required. The value of the parameter. + } + ], + "Status": "str", # Optional. The status of the application. Known values + are: "Invalid", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "TypeName": "str", # Optional. The application type name as defined in the + application manifest. + "TypeVersion": "str" # Optional. The version of the application type as + defined in the application manifest. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + + request = build_get_application_info_request( + application_id=application_id, + api_version=api_version, + exclude_application_parameters=exclude_application_parameters, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace_async + async def get_application_health( + self, + application_id: str, + *, + events_health_state_filter: Optional[int] = 0, + deployed_applications_health_state_filter: Optional[int] = 0, + services_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of the service fabric application. + + Returns the heath state of the service fabric application. The response reports either Ok, + Error or Warning health state. If the entity is not found in the health store, it will return + Error. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword deployed_applications_health_state_filter: Allows filtering of the deployed + applications health state objects returned in the result of application health query based on + their health state. + The possible values for this parameter include integer value of one of the following health + states. Only deployed applications that match the filter will be returned. + All deployed applications are used to evaluate the aggregated health state. If not specified, + all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values, obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of deployed applications with + HealthState value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype deployed_applications_health_state_filter: int + :keyword services_health_state_filter: Allows filtering of the services health state objects + returned in the result of services health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only services that match the filter are returned. All services are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of services with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype services_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "DeployedApplicationHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "ApplicationName": "str", # Optional. The name of the + application, including the 'fabric:' URI scheme. + "NodeName": "str" # Optional. Name of the node on which the + service package is deployed. + } + ], + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "Name": "str", # Optional. The name of the application, including the + 'fabric:' URI scheme. + "ServiceHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "ServiceName": "str" # Optional. Name of the service whose + health state is represented by this object. + } + ], + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_health_request( + application_id=application_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + deployed_applications_health_state_filter=deployed_applications_health_state_filter, + services_health_state_filter=services_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_application_health_using_policy( + self, + application_id: str, + application_health_policy: Optional[JSON] = None, + *, + events_health_state_filter: Optional[int] = 0, + deployed_applications_health_state_filter: Optional[int] = 0, + services_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric application using the specified policy. + + Gets the health of a Service Fabric application. Use EventsHealthStateFilter to filter the + collection of health events reported on the node based on the health state. Use + ClusterHealthPolicies to override the health policies used to evaluate the health. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: JSON + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword deployed_applications_health_state_filter: Allows filtering of the deployed + applications health state objects returned in the result of application health query based on + their health state. + The possible values for this parameter include integer value of one of the following health + states. Only deployed applications that match the filter will be returned. + All deployed applications are used to evaluate the aggregated health state. If not specified, + all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values, obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of deployed applications with + HealthState value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype deployed_applications_health_state_filter: int + :keyword services_health_state_filter: Allows filtering of the services health state objects + returned in the result of services health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only services that match the filter are returned. All services are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of services with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype services_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_health_policy = { + "ConsiderWarningAsError": bool, # Optional. Indicates whether warnings are + treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. The + maximum allowed percentage of unhealthy partitions per service. Allowed + values are Byte values from zero to 100"n"nThe percentage represents the + maximum tolerated percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe computation rounds up to + tolerate one failure on small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. The + maximum allowed percentage of unhealthy replicas per partition. Allowed + values are Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas over + the total number of replicas in the partition."nThe computation rounds up to + tolerate one failure on small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum allowed + percentage of unhealthy services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated percentage of + services that can be unhealthy before the application is considered in + error."nIf the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific service type over the total + number of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default percentage is + zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The maximum + allowed percentage of unhealthy deployed applications. Allowed values are Byte + values from zero to 100."nThe percentage represents the maximum tolerated + percentage of deployed applications that can be unhealthy before the application + is considered in error."nThis is calculated by dividing the number of unhealthy + deployed applications over the number of nodes where the application is currently + deployed on in the cluster."nThe computation rounds up to tolerate one failure on + small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service type health + policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to 100"n"nThe + percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error."nIf + the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy partitions over the + total number of partitions in the service."nThe computation rounds up + to tolerate one failure on small numbers of partitions. Default + percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to 100."n"nThe + percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at least one + unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition."nThe computation + rounds up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. Allowed values are + Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of services that can be unhealthy before + the application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the number of + unhealthy services of the specific service type over the total number + of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default + percentage is zero. + } + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "DeployedApplicationHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "ApplicationName": "str", # Optional. The name of the + application, including the 'fabric:' URI scheme. + "NodeName": "str" # Optional. Name of the node on which the + service package is deployed. + } + ], + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "Name": "str", # Optional. The name of the application, including the + 'fabric:' URI scheme. + "ServiceHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "ServiceName": "str" # Optional. Name of the service whose + health state is represented by this object. + } + ], + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if application_health_policy is not None: + _json = application_health_policy + else: + _json = None + + request = build_get_application_health_using_policy_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + deployed_applications_health_state_filter=deployed_applications_health_state_filter, + services_health_state_filter=services_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def report_application_health( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + health_information: JSON, + *, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric application. + + Reports health state of the specified Service Fabric application. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway Application, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, get application health and check + that the report appears in the HealthEvents section. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: JSON + :keyword immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :paramtype immediate: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + health_information = { + "Description": "str", # Optional. The description of the health information. + It represents free text used to add human readable information about the + report."nThe maximum string length for the description is 4096 characters."nIf + the provided string is longer, it will be automatically truncated."nWhen + truncated, the last characters of the description contain a marker "[Truncated]", + and total string size is 4096 characters."nThe presence of the marker indicates + to users that truncation occurred."nNote that when truncated, the description has + less than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID which identifies the + health report and can be used to find more detailed information about a specific + health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Property": "str", # Required. The property of the health information. An + entity can have health reports for different properties."nThe property is a + string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report."nFor example, a reporter + with SourceId "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same reporter + can monitor the node connectivity, so it can report a property "Connectivity" on + the same node."nIn the health store, these reports are treated as separate health + events for the specified node."n"nTogether with the SourceId, the property + uniquely identifies the health information. + "RemoveWhenExpired": bool, # Optional. Value that indicates whether the + report is removed from health store when it expires."nIf set to true, the report + is removed from the health store after it expires."nIf set to false, the report + is treated as an error when expired. The value of this property is false by + default."nWhen clients report periodically, they should set RemoveWhenExpired + false (default)."nThis way, if the reporter has issues (e.g. deadlock) and can't + report, the entity is evaluated at error when the health report expires."nThis + flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for this health + report as a numeric string."nThe report sequence number is used by the health + store to detect stale reports."nIf not specified, a sequence number is + auto-generated by the health client when a report is added. + "SourceId": "str", # Required. The source name that identifies the + client/watchdog/system component that generated the health information. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The duration for + which this health report is valid. This field uses ISO8601 format for specifying + the duration."nWhen clients report periodically, they should send reports with + higher frequency than time to live."nIf clients report on transition, they can + set the time to live to infinite."nWhen time to live expires, the health event + that contains the health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = health_information + + request = build_report_application_health_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def start_application_upgrade( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + application_upgrade_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts upgrading an application in the Service Fabric cluster. + + Validates the supplied application upgrade parameters and starts upgrading the application if + the parameters are valid. + Note, `ApplicationParameter + `_\ + s are not preserved across an application upgrade. + In order to preserve current application parameters, the user should get the parameters using + `GetApplicationInfo <./GetApplicationInfo.md>`_ operation first and pass them into the upgrade + API call as shown in the example. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_upgrade_description: Parameters for an application upgrade. + :type application_upgrade_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_upgrade_description = { + "ApplicationHealthPolicy": { + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per service. + Allowed values are Byte values from zero to 100"n"nThe percentage + represents the maximum tolerated percentage of partitions that can be + unhealthy before the service is considered in error."nIf the percentage + is respected but there is at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated by dividing the + number of unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on small + numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per partition. + Allowed values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of replicas that can be + unhealthy before the partition is considered in error."nIf the percentage + is respected but there is at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated by dividing the + number of unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on small + numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum + allowed percentage of unhealthy services. Allowed values are Byte values + from zero to 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the application is + considered in error."nIf the percentage is respected but there is at + least one unhealthy service, the health is evaluated as Warning."nThis is + calculated by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific service + type."nThe computation rounds up to tolerate one failure on small numbers + of services. Default percentage is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The + maximum allowed percentage of unhealthy deployed applications. Allowed values + are Byte values from zero to 100."nThe percentage represents the maximum + tolerated percentage of deployed applications that can be unhealthy before + the application is considered in error."nThis is calculated by dividing the + number of unhealthy deployed applications over the number of nodes where the + application is currently deployed on in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service + type health policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, + # Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte values from zero + to 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the service + is considered in error."nIf the percentage is respected but there + is at least one unhealthy partition, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, + # Optional. The maximum allowed percentage of unhealthy replicas + per partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the partition + is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. + The maximum allowed percentage of unhealthy services. Allowed + values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of services that can + be unhealthy before the application is considered in error."nIf + the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated + by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific + service type."nThe computation rounds up to tolerate one failure + on small numbers of services. Default percentage is zero. + } + } + ] + }, + "ForceRestart": bool, # Optional. If true, then processes are forcefully + restarted during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + "InstanceCloseDelayDurationInSeconds": 4294967295, # Optional. Default value + is 4294967295. Duration in seconds, to wait before a stateless instance is + closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster"nupgrade, only for + those instances which have a non-zero delay duration configured in the service + description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details."nNote, the default + value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates that + the behavior will entirely depend on the delay configured in the stateless + service description. + "ManagedApplicationIdentity": { + "ManagedIdentities": [ + { + "Name": "str", # Required. The name of the identity. + "PrincipalId": "str" # Optional. The identity's + PrincipalId. + } + ], + "TokenServiceEndpoint": "str" # Optional. Token service endpoint. + }, + "MonitoringPolicy": { + "FailureAction": "str", # Optional. The compensating action to + perform when a Monitored upgrade encounters monitoring policy or health + policy violations."nInvalid indicates the failure action is invalid. Rollback + specifies that the upgrade will start rolling back automatically."nManual + indicates that the upgrade will switch to UnmonitoredManual upgrade mode. + Known values are: "Invalid", "Rollback", "Manual". + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # Optional. + Default value is "PT0H10M0S". The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is + executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # Optional. + Default value is "PT0H2M0S". The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade + domain. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. Default + value is "0". The amount of time to wait after completing an upgrade domain + before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a + number representing the total number of milliseconds. + "UpgradeDomainTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S", + # Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of + time each upgrade domain has to complete before FailureAction is executed. It + is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + "UpgradeTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S" # + Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of time + the overall upgrade has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + }, + "Name": "str", # Required. The name of the target application, including the + 'fabric:' URI scheme. + "Parameters": [ + { + "Key": "str", # Required. The name of the parameter. + "Value": "str" # Required. The value of the parameter. + } + ], + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value is + "UnmonitoredAuto". The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "SortOrder": "Default", # Optional. Default value is "Default". Defines the + order in which an upgrade proceeds through the cluster. Known values are: + "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + "TargetApplicationTypeVersion": "str", # Required. The target application + type version (found in the application manifest) for the application upgrade. + "UpgradeKind": "Rolling", # Default value is "Rolling". Required. The kind + of upgrade out of the following possible values. Known values are: "Invalid", + "Rolling". Default value: "Rolling". + "UpgradeReplicaSetCheckTimeoutInSeconds": 42949672925 # Optional. Default + value is 42949672925. The maximum amount of time to block processing of an + upgrade domain and prevent loss of availability when there are unexpected issues. + When this timeout expires, processing of the upgrade domain will proceed + regardless of availability loss issues. The timeout is reset at the start of each + upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + 32-bit integer). + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = application_upgrade_description + + request = build_start_application_upgrade_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_application_upgrade( + self, + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets details for the latest upgrade performed on this application. + + Returns information about the state of the latest application upgrade along with details to aid + debugging application health issues. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "CurrentUpgradeDomainProgress": { + "DomainName": "str", # Optional. The name of the upgrade domain. + "NodeUpgradeProgressList": [ + { + "NodeName": "str", # Optional. The name of a Service + Fabric node. + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ], + "UpgradeDuration": "str", # Optional. The estimated + time spent processing the node since it was deactivated during a + node-by-node upgrade. + "UpgradePhase": "str" # Optional. The state of the + upgrading node. Known values are: "Invalid", "PreUpgradeSafetyCheck", + "Upgrading", "PostUpgradeSafetyCheck". + } + ] + }, + "CurrentUpgradeUnitsProgress": { + "DomainName": "str", # Optional. The name of the upgrade domain. Not + applicable to node-by-node upgrades. + "NodeUpgradeProgressList": [ + { + "NodeName": "str", # Optional. The name of a Service + Fabric node. + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ], + "UpgradeDuration": "str", # Optional. The estimated + time spent processing the node since it was deactivated during a + node-by-node upgrade. + "UpgradePhase": "str" # Optional. The state of the + upgrading node. Known values are: "Invalid", "PreUpgradeSafetyCheck", + "Upgrading", "PostUpgradeSafetyCheck". + } + ] + }, + "FailureReason": "str", # Optional. The cause of an upgrade failure that + resulted in FailureAction being executed. Known values are: "None", + "Interrupted", "HealthCheck", "UpgradeDomainTimeout", "OverallUpgradeTimeout". + "FailureTimestampUtc": "str", # Optional. The estimated UTC datetime when + the upgrade failed and FailureAction was executed. + "IsNodeByNode": bool, # Optional. Indicates whether this upgrade is + node-by-node. + "Name": "str", # Optional. The name of the target application, including the + 'fabric:' URI scheme. + "NextUpgradeDomain": "str", # Optional. The name of the next upgrade domain + to be processed. Not applicable to node-by-node upgrades. + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value is + "UnmonitoredAuto". The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "StartTimestampUtc": "str", # Optional. The estimated UTC datetime when the + upgrade started. + "TargetApplicationTypeVersion": "str", # Optional. The target application + type version (found in the application manifest) for the application upgrade. + "TypeName": "str", # Optional. The application type name as defined in the + application manifest. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ], + "UpgradeDescription": { + "ApplicationHealthPolicy": { + "ConsiderWarningAsError": bool, # Optional. Indicates + whether warnings are treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to 100"n"nThe + percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error."nIf + the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy partitions over the + total number of partitions in the service."nThe computation rounds up + to tolerate one failure on small numbers of partitions. Default + percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to 100."n"nThe + percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at least one + unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition."nThe computation + rounds up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. Allowed values are + Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of services that can be unhealthy before + the application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the number of + unhealthy services of the specific service type over the total number + of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default + percentage is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. + The maximum allowed percentage of unhealthy deployed applications. + Allowed values are Byte values from zero to 100."nThe percentage + represents the maximum tolerated percentage of deployed applications that + can be unhealthy before the application is considered in error."nThis is + calculated by dividing the number of unhealthy deployed applications over + the number of nodes where the application is currently deployed on in the + cluster."nThe computation rounds up to tolerate one failure on small + numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the + service type health policy map item. This is the name of the + service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to + 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is + respected but there is at least one unhealthy partition, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over the total + number of partitions in the service."nThe computation rounds + up to tolerate one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is + respected but there is at least one unhealthy replica, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the total + number of replicas in the partition."nThe computation rounds + up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # + Optional. The maximum allowed percentage of unhealthy + services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the + application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the + health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to tolerate + one failure on small numbers of services. Default percentage + is zero. + } + } + ] + }, + "ForceRestart": bool, # Optional. If true, then processes are + forcefully restarted during upgrade even when the code version has not + changed (the upgrade only changes configuration or data). + "InstanceCloseDelayDurationInSeconds": 4294967295, # Optional. + Default value is 4294967295. Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This + would be effective when the instance is closing during the + application/cluster"nupgrade, only for those instances which have a non-zero + delay duration configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details."nNote, the + default value of InstanceCloseDelayDurationInSeconds is 4294967295, which + indicates that the behavior will entirely depend on the delay configured in + the stateless service description. + "ManagedApplicationIdentity": { + "ManagedIdentities": [ + { + "Name": "str", # Required. The name of the + identity. + "PrincipalId": "str" # Optional. The + identity's PrincipalId. + } + ], + "TokenServiceEndpoint": "str" # Optional. Token service + endpoint. + }, + "MonitoringPolicy": { + "FailureAction": "str", # Optional. The compensating action + to perform when a Monitored upgrade encounters monitoring policy or + health policy violations."nInvalid indicates the failure action is + invalid. Rollback specifies that the upgrade will start rolling back + automatically."nManual indicates that the upgrade will switch to + UnmonitoredManual upgrade mode. Known values are: "Invalid", "Rollback", + "Manual". + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # + Optional. Default value is "PT0H10M0S". The amount of time to retry + health evaluation when the application or cluster is unhealthy before + FailureAction is executed. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # + Optional. Default value is "PT0H2M0S". The amount of time that the + application or cluster must remain healthy before the upgrade proceeds to + the next upgrade domain. It is first interpreted as a string representing + an ISO 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. + Default value is "0". The amount of time to wait after completing an + upgrade domain before applying health policies. It is first interpreted + as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + "UpgradeDomainTimeoutInMilliseconds": + "P10675199DT02H48M05.4775807S", # Optional. Default value is + "P10675199DT02H48M05.4775807S". The amount of time each upgrade domain + has to complete before FailureAction is executed. It is first interpreted + as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + "UpgradeTimeoutInMilliseconds": + "P10675199DT02H48M05.4775807S" # Optional. Default value is + "P10675199DT02H48M05.4775807S". The amount of time the overall upgrade + has to complete before FailureAction is executed. It is first interpreted + as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + }, + "Name": "str", # Required. The name of the target application, + including the 'fabric:' URI scheme. + "Parameters": [ + { + "Key": "str", # Required. The name of the parameter. + "Value": "str" # Required. The value of the + parameter. + } + ], + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value + is "UnmonitoredAuto". The mode used to monitor health during a rolling + upgrade. The values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "SortOrder": "Default", # Optional. Default value is "Default". + Defines the order in which an upgrade proceeds through the cluster. Known + values are: "Invalid", "Default", "Numeric", "Lexicographical", + "ReverseNumeric", "ReverseLexicographical". Default value: "Default". + "TargetApplicationTypeVersion": "str", # Required. The target + application type version (found in the application manifest) for the + application upgrade. + "UpgradeKind": "Rolling", # Default value is "Rolling". Required. + The kind of upgrade out of the following possible values. Known values are: + "Invalid", "Rolling". Default value: "Rolling". + "UpgradeReplicaSetCheckTimeoutInSeconds": 42949672925 # Optional. + Default value is 42949672925. The maximum amount of time to block processing + of an upgrade domain and prevent loss of availability when there are + unexpected issues. When this timeout expires, processing of the upgrade + domain will proceed regardless of availability loss issues. The timeout is + reset at the start of each upgrade domain. Valid values are between 0 and + 42949672925 inclusive. (unsigned 32-bit integer). + }, + "UpgradeDomainDurationInMilliseconds": "str", # Optional. The estimated + total amount of time spent processing the current upgrade domain. + "UpgradeDomainProgressAtFailure": { + "DomainName": "str", # Optional. The name of the upgrade domain. + "NodeUpgradeProgressList": [ + { + "NodeName": "str", # Optional. The name of a Service + Fabric node. + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ], + "UpgradeDuration": "str", # Optional. The estimated + time spent processing the node since it was deactivated during a + node-by-node upgrade. + "UpgradePhase": "str" # Optional. The state of the + upgrading node. Known values are: "Invalid", "PreUpgradeSafetyCheck", + "Upgrading", "PostUpgradeSafetyCheck". + } + ] + }, + "UpgradeDomains": [ + { + "Name": "str", # Optional. The name of the upgrade domain. + "State": "str" # Optional. The state of the upgrade domain. + Known values are: "Invalid", "Pending", "InProgress", "Completed". + } + ], + "UpgradeDurationInMilliseconds": "str", # Optional. The estimated total + amount of time spent processing the overall upgrade. + "UpgradeState": "str", # Optional. The state of the upgrade domain. Known + values are: "Invalid", "RollingBackInProgress", "RollingBackCompleted", + "RollingForwardPending", "RollingForwardInProgress", "RollingForwardCompleted", + "Failed". + "UpgradeStatusDetails": "str", # Optional. Additional detailed information + about the status of the pending upgrade. + "UpgradeUnits": [ + { + "Name": "str", # Optional. The name of the upgrade unit. + "State": "str" # Optional. The state of the upgrade unit. + Known values are: "Invalid", "Pending", "InProgress", "Completed", + "Failed". + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_upgrade_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def update_application_upgrade( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + application_upgrade_update_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Updates an ongoing application upgrade in the Service Fabric cluster. + + Updates the parameters of an ongoing application upgrade from the ones specified at the time of + starting the application upgrade. This may be required to mitigate stuck application upgrades + due to incorrect parameters or issues in the application to make progress. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_upgrade_update_description: Parameters for updating an existing application + upgrade. + :type application_upgrade_update_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_upgrade_update_description = { + "ApplicationHealthPolicy": { + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per service. + Allowed values are Byte values from zero to 100"n"nThe percentage + represents the maximum tolerated percentage of partitions that can be + unhealthy before the service is considered in error."nIf the percentage + is respected but there is at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated by dividing the + number of unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on small + numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per partition. + Allowed values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of replicas that can be + unhealthy before the partition is considered in error."nIf the percentage + is respected but there is at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated by dividing the + number of unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on small + numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum + allowed percentage of unhealthy services. Allowed values are Byte values + from zero to 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the application is + considered in error."nIf the percentage is respected but there is at + least one unhealthy service, the health is evaluated as Warning."nThis is + calculated by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific service + type."nThe computation rounds up to tolerate one failure on small numbers + of services. Default percentage is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The + maximum allowed percentage of unhealthy deployed applications. Allowed values + are Byte values from zero to 100."nThe percentage represents the maximum + tolerated percentage of deployed applications that can be unhealthy before + the application is considered in error."nThis is calculated by dividing the + number of unhealthy deployed applications over the number of nodes where the + application is currently deployed on in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service + type health policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, + # Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte values from zero + to 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the service + is considered in error."nIf the percentage is respected but there + is at least one unhealthy partition, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, + # Optional. The maximum allowed percentage of unhealthy replicas + per partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the partition + is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. + The maximum allowed percentage of unhealthy services. Allowed + values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of services that can + be unhealthy before the application is considered in error."nIf + the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated + by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific + service type."nThe computation rounds up to tolerate one failure + on small numbers of services. Default percentage is zero. + } + } + ] + }, + "Name": "str", # Required. The name of the application, including the + 'fabric:' URI scheme. + "UpdateDescription": { + "FailureAction": "str", # Optional. The compensating action to + perform when a Monitored upgrade encounters monitoring policy or health + policy violations."nInvalid indicates the failure action is invalid. Rollback + specifies that the upgrade will start rolling back automatically."nManual + indicates that the upgrade will switch to UnmonitoredManual upgrade mode. + Known values are: "Invalid", "Rollback", "Manual". + "ForceRestart": bool, # Optional. If true, then processes are + forcefully restarted during upgrade even when the code version has not + changed (the upgrade only changes configuration or data). + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # Optional. + Default value is "PT0H10M0S". The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is + executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # Optional. + Default value is "PT0H2M0S". The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade + domain. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. Default + value is "0". The amount of time to wait after completing an upgrade domain + before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a + number representing the total number of milliseconds. + "InstanceCloseDelayDurationInSeconds": 4294967295, # Optional. + Default value is 4294967295. Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This + would be effective when the instance is closing during the + application/cluster"nupgrade, only for those instances which have a non-zero + delay duration configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details."nNote, the + default value of InstanceCloseDelayDurationInSeconds is 4294967295, which + indicates that the behavior will entirely depend on the delay configured in + the stateless service description. + "ReplicaSetCheckTimeoutInMilliseconds": 42949672925, # Optional. + Default value is 42949672925. The maximum amount of time to block processing + of an upgrade domain and prevent loss of availability when there are + unexpected issues. When this timeout expires, processing of the upgrade + domain will proceed regardless of availability loss issues. The timeout is + reset at the start of each upgrade domain. Valid values are between 0 and + 42949672925 inclusive. (unsigned 32-bit integer). + "RollingUpgradeMode": "UnmonitoredAuto", # Default value is + "UnmonitoredAuto". Required. The mode used to monitor health during a rolling + upgrade. The values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "UpgradeDomainTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S", + # Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of + time each upgrade domain has to complete before FailureAction is executed. It + is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + "UpgradeTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S" # + Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of time + the overall upgrade has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + }, + "UpgradeKind": "Rolling" # Default value is "Rolling". Required. The kind of + upgrade out of the following possible values. Known values are: "Invalid", + "Rolling". Default value: "Rolling". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = application_upgrade_update_description + + request = build_update_application_upgrade_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def update_application( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + application_update_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Updates a Service Fabric application. + + Updates a Service Fabric application instance. The set of properties that can be updated are a + subset of the properties that were specified at the time of creating the application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_update_description: Parameters for updating an existing application + instance. + :type application_update_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '8.1'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "8.1". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_update_description = { + "ApplicationMetrics": [ + { + "MaximumCapacity": 0.0, # Optional. The maximum node + capacity for Service Fabric application."nThis is the maximum Load for an + instance of this application on a single node. Even if the capacity of + node is greater than this value, Service Fabric will limit the total load + of services within the application on each node to this value."nIf set to + zero, capacity for this metric is unlimited on each node."nWhen creating + a new application with application capacity defined, the product of + MaximumNodes and this value must always be smaller than or equal to + TotalApplicationCapacity."nWhen updating existing application with + application capacity, the product of MaximumNodes and this value must + always be smaller than or equal to TotalApplicationCapacity. + "Name": "str", # Optional. The name of the metric. + "ReservationCapacity": 0.0, # Optional. The node reservation + capacity for Service Fabric application."nThis is the amount of load + which is reserved on nodes which have instances of this application."nIf + MinimumNodes is specified, then the product of these values will be the + capacity reserved in the cluster for the application."nIf set to zero, no + capacity is reserved for this metric."nWhen setting application capacity + or when updating application capacity; this value must be smaller than or + equal to MaximumCapacity for each metric. + "TotalApplicationCapacity": 0.0 # Optional. The total metric + capacity for Service Fabric application."nThis is the total metric + capacity for this application in the cluster. Service Fabric will try to + limit the sum of loads of services within the application to this + value."nWhen creating a new application with application capacity + defined, the product of MaximumNodes and MaximumCapacity must always be + smaller than or equal to this value. + } + ], + "Flags": "str", # Optional. Flags indicating whether other properties are + set. Each of the associated properties corresponds to a flag, specified below, + which, if set, indicate that the property is specified."nIf flags are not + specified for a certain property, the property will not be updated even if the + new value is provided."nThis property can be a combination of those flags + obtained using bitwise 'OR' operator. Exception is RemoveApplicationCapacity + which cannot be specified along with other parameters."nFor example, if the + provided value is 3 then the flags for MinimumNodes (1) and MaximumNodes (2) are + set."n"n"n* None - Does not indicate any other properties are set. The value is + 0."n* MinimumNodes - Indicates whether the MinimumNodes property is set. The + value is 1."n* MaximumNodes - Indicates whether the MinimumNodes property is set. + The value is 2."n* ApplicationMetrics - Indicates whether the ApplicationMetrics + property is set. The value is 4. + "MaximumNodes": 0.0, # Optional. The maximum number of nodes where Service + Fabric will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those nodes. By + default, the value of this property is zero and it means that the services can be + placed on any node. + "MinimumNodes": 0.0, # Optional. The minimum number of nodes where Service + Fabric will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those nodes. If + this property is set to zero, no capacity will be reserved. The value of this + property cannot be more than the value of the MaximumNodes property. + "RemoveApplicationCapacity": bool # Optional. Used to clear all parameters + related to Application Capacity for this application. |"nIt is not possible to + specify this parameter together with other Application Capacity parameters. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "8.1")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = application_update_description + + request = build_update_application_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def resume_application_upgrade( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + resume_application_upgrade_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Resumes upgrading an application in the Service Fabric cluster. + + Resumes an unmonitored manual Service Fabric application upgrade. Service Fabric upgrades one + upgrade domain at a time. For unmonitored manual upgrades, after Service Fabric finishes an + upgrade domain, it waits for you to call this API before proceeding to the next upgrade domain. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param resume_application_upgrade_description: Describes the parameters for resuming an + application upgrade. + :type resume_application_upgrade_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + resume_application_upgrade_description = { + "UpgradeDomainName": "str" # Required. The name of the upgrade domain in + which to resume the upgrade. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = resume_application_upgrade_description + + request = build_resume_application_upgrade_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def rollback_application_upgrade( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts rolling back the currently on-going upgrade of an application in the Service Fabric + cluster. + + Starts rolling back the current application upgrade to the previous version. This API can only + be used to roll back the current in-progress upgrade that is rolling forward to new version. If + the application is not currently being upgraded use StartApplicationUpgrade API to upgrade it + to desired version, including rolling back to a previous version. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_rollback_application_upgrade_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_deployed_application_info_list( + self, + node_name: str, + *, + timeout: Optional[int] = 60, + include_health_state: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + **kwargs: Any + ) -> JSON: + """Gets the list of applications deployed on a Service Fabric node. + + Gets the list of applications deployed on a Service Fabric node. The results do not include + information about deployed system applications unless explicitly queried for by ID. Results + encompass deployed applications in active, activating, and downloading states. This query + requires that the node name corresponds to a node on the cluster. The query fails if the + provided node name does not point to any active Service Fabric nodes on the cluster. + + :param node_name: The name of the node. + :type node_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword include_health_state: Include the health state of an entity. + If this parameter is false or not specified, then the health state returned is "Unknown". + When set to true, the query goes in parallel to the node and the health system service before + the results are merged. + As a result, the query is more expensive and may take a longer time. Default value is False. + :paramtype include_health_state: bool + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.1'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.1". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "HealthState": "str", # Optional. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "Id": "str", # Optional. The identity of the application. + This is an encoded representation of the application name. This is used + in the REST APIs to identify the application resource."nStarting in + version 6.0, hierarchical names are delimited with the "~" character. For + example, if the application name is "fabric:/myapp/app1","nthe + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + "LogDirectory": "str", # Optional. The log directory of the + application on the node. The log directory can be used to store + application logs. + "Name": "str", # Optional. The name of the application, + including the 'fabric:' URI scheme. + "Status": "str", # Optional. The status of the application + deployed on the node. Following are the possible values. Known values + are: "Invalid", "Downloading", "Activating", "Active", "Upgrading", + "Deactivating". + "TempDirectory": "str", # Optional. The temp directory of + the application on the node. The code packages belonging to the + application are forked with this directory set as their temporary + directory. + "TypeName": "str", # Optional. The application type name as + defined in the application manifest. + "TypeVersion": "str", # Optional. The version of the + application type as defined in the application manifest. + "WorkDirectory": "str" # Optional. The work directory of the + application on the node. The work directory can be used to store + application data. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.1")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_deployed_application_info_list_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + include_health_state=include_health_state, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_deployed_application_info( + self, + node_name: str, + application_id: str, + *, + timeout: Optional[int] = 60, + include_health_state: Optional[bool] = False, + **kwargs: Any + ) -> Optional[JSON]: + """Gets the information about an application deployed on a Service Fabric node. + + This query returns system application information if the application ID provided is for system + application. Results encompass deployed applications in active, activating, and downloading + states. This query requires that the node name corresponds to a node on the cluster. The query + fails if the provided node name does not point to any active Service Fabric nodes on the + cluster. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword include_health_state: Include the health state of an entity. + If this parameter is false or not specified, then the health state returned is "Unknown". + When set to true, the query goes in parallel to the node and the health system service before + the results are merged. + As a result, the query is more expensive and may take a longer time. Default value is False. + :paramtype include_health_state: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.1'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.1". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "HealthState": "str", # Optional. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Id": "str", # Optional. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify + the application resource."nStarting in version 6.0, hierarchical names are + delimited with the "~" character. For example, if the application name is + "fabric:/myapp/app1","nthe application identity would be "myapp~app1" in 6.0+ and + "myapp/app1" in previous versions. + "LogDirectory": "str", # Optional. The log directory of the application on + the node. The log directory can be used to store application logs. + "Name": "str", # Optional. The name of the application, including the + 'fabric:' URI scheme. + "Status": "str", # Optional. The status of the application deployed on the + node. Following are the possible values. Known values are: "Invalid", + "Downloading", "Activating", "Active", "Upgrading", "Deactivating". + "TempDirectory": "str", # Optional. The temp directory of the application on + the node. The code packages belonging to the application are forked with this + directory set as their temporary directory. + "TypeName": "str", # Optional. The application type name as defined in the + application manifest. + "TypeVersion": "str", # Optional. The version of the application type as + defined in the application manifest. + "WorkDirectory": "str" # Optional. The work directory of the application on + the node. The work directory can be used to store application data. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.1")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + + request = build_get_deployed_application_info_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + timeout=timeout, + include_health_state=include_health_state, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace_async + async def get_deployed_application_health( + self, + node_name: str, + application_id: str, + *, + events_health_state_filter: Optional[int] = 0, + deployed_service_packages_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the information about health of an application deployed on a Service Fabric node. + + Gets the information about health of an application deployed on a Service Fabric node. Use + EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported + on the deployed application based on health state. Use DeployedServicePackagesHealthStateFilter + to optionally filter for DeployedServicePackageHealth children based on health state. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword deployed_service_packages_health_state_filter: Allows filtering of the deployed + service package health state objects returned in the result of deployed application health + query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only deployed service packages that match the filter are returned. All deployed service + packages are used to evaluate the aggregated health state of the deployed application. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value can be a combination of these + values, obtained using the bitwise 'OR' operator. + For example, if the provided value is 6 then health state of service packages with HealthState + value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype deployed_service_packages_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "DeployedServicePackageHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "ApplicationName": "str", # Optional. The name of the + application, including the 'fabric:' URI scheme. + "NodeName": "str", # Optional. Name of the node on which the + service package is deployed. + "ServiceManifestName": "str", # Optional. Name of the + manifest describing the service package. + "ServicePackageActivationId": "str" # Optional. The + ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the + service"nis 'SharedProcess' (or if it is not specified, in which case it + defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + } + ], + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "Name": "str", # Optional. Name of the application deployed on the node + whose health information is described by this object. + "NodeName": "str", # Optional. Name of the node where this application is + deployed. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_deployed_application_health_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + deployed_service_packages_health_state_filter=deployed_service_packages_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_deployed_application_health_using_policy( + self, + node_name: str, + application_id: str, + application_health_policy: Optional[JSON] = None, + *, + events_health_state_filter: Optional[int] = 0, + deployed_service_packages_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the information about health of an application deployed on a Service Fabric node. using + the specified policy. + + Gets the information about health of an application deployed on a Service Fabric node using the + specified policy. Use EventsHealthStateFilter to optionally filter for the collection of + HealthEvent objects reported on the deployed application based on health state. Use + DeployedServicePackagesHealthStateFilter to optionally filter for DeployedServicePackageHealth + children based on health state. Use ApplicationHealthPolicy to optionally override the health + policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the + ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the + deployed application. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: JSON + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword deployed_service_packages_health_state_filter: Allows filtering of the deployed + service package health state objects returned in the result of deployed application health + query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only deployed service packages that match the filter are returned. All deployed service + packages are used to evaluate the aggregated health state of the deployed application. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value can be a combination of these + values, obtained using the bitwise 'OR' operator. + For example, if the provided value is 6 then health state of service packages with HealthState + value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype deployed_service_packages_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_health_policy = { + "ConsiderWarningAsError": bool, # Optional. Indicates whether warnings are + treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. The + maximum allowed percentage of unhealthy partitions per service. Allowed + values are Byte values from zero to 100"n"nThe percentage represents the + maximum tolerated percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe computation rounds up to + tolerate one failure on small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. The + maximum allowed percentage of unhealthy replicas per partition. Allowed + values are Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas over + the total number of replicas in the partition."nThe computation rounds up to + tolerate one failure on small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum allowed + percentage of unhealthy services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated percentage of + services that can be unhealthy before the application is considered in + error."nIf the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific service type over the total + number of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default percentage is + zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The maximum + allowed percentage of unhealthy deployed applications. Allowed values are Byte + values from zero to 100."nThe percentage represents the maximum tolerated + percentage of deployed applications that can be unhealthy before the application + is considered in error."nThis is calculated by dividing the number of unhealthy + deployed applications over the number of nodes where the application is currently + deployed on in the cluster."nThe computation rounds up to tolerate one failure on + small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service type health + policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to 100"n"nThe + percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error."nIf + the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy partitions over the + total number of partitions in the service."nThe computation rounds up + to tolerate one failure on small numbers of partitions. Default + percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to 100."n"nThe + percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at least one + unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition."nThe computation + rounds up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. Allowed values are + Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of services that can be unhealthy before + the application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the number of + unhealthy services of the specific service type over the total number + of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default + percentage is zero. + } + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "DeployedServicePackageHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "ApplicationName": "str", # Optional. The name of the + application, including the 'fabric:' URI scheme. + "NodeName": "str", # Optional. Name of the node on which the + service package is deployed. + "ServiceManifestName": "str", # Optional. Name of the + manifest describing the service package. + "ServicePackageActivationId": "str" # Optional. The + ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the + service"nis 'SharedProcess' (or if it is not specified, in which case it + defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + } + ], + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "Name": "str", # Optional. Name of the application deployed on the node + whose health information is described by this object. + "NodeName": "str", # Optional. Name of the node where this application is + deployed. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if application_health_policy is not None: + _json = application_health_policy + else: + _json = None + + request = build_get_deployed_application_health_using_policy_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + deployed_service_packages_health_state_filter=deployed_service_packages_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def report_deployed_application_health( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + application_id: str, + health_information: JSON, + *, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric application deployed on a Service Fabric node. + + Reports health state of the application deployed on a Service Fabric node. The report must + contain the information about the source of the health report and property on which it is + reported. + The report is sent to a Service Fabric gateway Service, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, get deployed application health and + check that the report appears in the HealthEvents section. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: JSON + :keyword immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :paramtype immediate: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + health_information = { + "Description": "str", # Optional. The description of the health information. + It represents free text used to add human readable information about the + report."nThe maximum string length for the description is 4096 characters."nIf + the provided string is longer, it will be automatically truncated."nWhen + truncated, the last characters of the description contain a marker "[Truncated]", + and total string size is 4096 characters."nThe presence of the marker indicates + to users that truncation occurred."nNote that when truncated, the description has + less than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID which identifies the + health report and can be used to find more detailed information about a specific + health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Property": "str", # Required. The property of the health information. An + entity can have health reports for different properties."nThe property is a + string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report."nFor example, a reporter + with SourceId "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same reporter + can monitor the node connectivity, so it can report a property "Connectivity" on + the same node."nIn the health store, these reports are treated as separate health + events for the specified node."n"nTogether with the SourceId, the property + uniquely identifies the health information. + "RemoveWhenExpired": bool, # Optional. Value that indicates whether the + report is removed from health store when it expires."nIf set to true, the report + is removed from the health store after it expires."nIf set to false, the report + is treated as an error when expired. The value of this property is false by + default."nWhen clients report periodically, they should set RemoveWhenExpired + false (default)."nThis way, if the reporter has issues (e.g. deadlock) and can't + report, the entity is evaluated at error when the health report expires."nThis + flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for this health + report as a numeric string."nThe report sequence number is used by the health + store to detect stale reports."nIf not specified, a sequence number is + auto-generated by the health client when a report is added. + "SourceId": "str", # Required. The source name that identifies the + client/watchdog/system component that generated the health information. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The duration for + which this health report is valid. This field uses ISO8601 format for specifying + the duration."nWhen clients report periodically, they should send reports with + higher frequency than time to live."nIf clients report on transition, they can + set the time to live to infinite."nWhen time to live expires, the health event + that contains the health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = health_information + + request = build_report_deployed_application_health_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_application_manifest( + self, + application_type_name: str, + *, + application_type_version: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the manifest describing an application type. + + The response contains the application manifest XML as a string. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :keyword application_type_version: The version of the application type. + :paramtype application_type_version: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Manifest": "str" # Optional. The XML manifest as a string. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_manifest_request( + application_type_name=application_type_name, + api_version=api_version, + application_type_version=application_type_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def update_application_arm_metadata( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + application_arm_metadata_update_description: JSON, + *, + timeout: Optional[int] = 60, + force: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Updates the Arm Metadata for a specific Application. + + Updates the Arm Metadata for a specific Application. Is able to be called immediately after the + create app API is called. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_arm_metadata_update_description: The Arm metadata to be assocated with a + specific application. + :type application_arm_metadata_update_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword force: Force parameter used to prevent accidental Arm metadata update. Default value + is None. + :paramtype force: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '9.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "9.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_arm_metadata_update_description = { + "ArmResourceId": "str" # Optional. A string containing the ArmResourceId. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = application_arm_metadata_update_description + + request = build_update_application_arm_metadata_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + force=force, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_service_info_list( + self, + application_id: str, + *, + service_type_name: Optional[str] = None, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the information about all services belonging to the application specified by the + application ID. + + Returns the information about all services belonging to the application specified by the + application ID. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword service_type_name: The service type name used to filter the services to query for. + Default value is None. + :paramtype service_type_name: str + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "HealthState": "str", # Optional. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "Id": "str", # Optional. 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."nStarting in version 6.0, + hierarchical names are delimited with the "~" character. For example, if + the service name is "fabric:/myapp/app1/svc1","nthe service identity + would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + "IsServiceGroup": bool, # Optional. Whether the service is + in a service group. + "ManifestVersion": "str", # Optional. The version of the + service manifest. + "Name": "str", # Optional. The full name of the service with + 'fabric:' URI scheme. + "ServiceMetadata": { + "ArmMetadata": { + "ArmResourceId": "str" # Optional. A string + containing the ArmResourceId. + } + }, + "ServiceStatus": "str", # Optional. The status of the + application. Known values are: "Unknown", "Active", "Upgrading", + "Deleting", "Creating", "Failed". + "TypeName": "str", # Optional. Name of the service type as + specified in the service manifest. + ServiceKind: ServiceKind + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_service_info_list_request( + application_id=application_id, + api_version=api_version, + service_type_name=service_type_name, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_service_info( + self, + application_id: str, + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[JSON]: + """Gets the information about the specific service belonging to the Service Fabric application. + + Returns the information about the specified service belonging to the specified Service Fabric + application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "HealthState": "str", # Optional. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Id": "str", # Optional. 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."nStarting in version 6.0, hierarchical names are delimited with + the "~" character. For example, if the service name is + "fabric:/myapp/app1/svc1","nthe service identity would be "myapp~app1~svc1" in + 6.0+ and "myapp/app1/svc1" in previous versions. + "IsServiceGroup": bool, # Optional. Whether the service is in a service + group. + "ManifestVersion": "str", # Optional. The version of the service manifest. + "Name": "str", # Optional. The full name of the service with 'fabric:' URI + scheme. + "ServiceMetadata": { + "ArmMetadata": { + "ArmResourceId": "str" # Optional. A string containing the + ArmResourceId. + } + }, + "ServiceStatus": "str", # Optional. The status of the application. Known + values are: "Unknown", "Active", "Upgrading", "Deleting", "Creating", "Failed". + "TypeName": "str", # Optional. Name of the service type as specified in the + service manifest. + ServiceKind: ServiceKind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + + request = build_get_service_info_request( + application_id=application_id, + service_id=service_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace_async + async def get_application_name_info( + self, + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the name of the Service Fabric application for a service. + + Gets the name of the application for the specified service. A 404 + FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the provided service ID + does not exist. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Id": "str", # Optional. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify + the application resource."nStarting in version 6.0, hierarchical names are + delimited with the "~" character. For example, if the application name is + "fabric:/myapp/app1","nthe application identity would be "myapp~app1" in 6.0+ and + "myapp/app1" in previous versions. + "Name": "str" # Optional. The name of the application, including the + 'fabric:' URI scheme. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_name_info_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def create_service( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + service_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates the specified Service Fabric service. + + This api allows creating a new Service Fabric stateless or stateful service under a specified + Service Fabric application. The description for creating the service includes partitioning + information and optional properties for placement and load balancing. Some of the properties + can later be modified using ``UpdateService`` API. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_description: The information necessary to create a service. + :type service_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + service_kind = 'StatefulServiceDescription' or 'StatelessServiceDescription' + + + # JSON input template you can fill out and use as your body input. + service_description = { + "ApplicationName": "str", # Optional. The name of the application, including + the 'fabric:' URI scheme. + "CorrelationScheme": [ + { + "Scheme": "str", # Required. The ServiceCorrelationScheme + which describes the relationship between this service and the service + specified via ServiceName. Known values are: "Invalid", "Affinity", + "AlignedAffinity", "NonAlignedAffinity". + "ServiceName": "str" # Required. The name of the service + that the correlation relationship is established with. + } + ], + "DefaultMoveCost": "str", # Optional. The move cost for the service. Known + values are: "Zero", "Low", "Medium", "High", "VeryHigh". + "InitializationData": [ + 0 # Optional. The initialization data as an array of bytes. + Initialization data is passed to service instances or replicas when they are + created. + ], + "IsDefaultMoveCostSpecified": bool, # Optional. Indicates if the + DefaultMoveCost property is specified. + "PartitionDescription": { + PartitionScheme: PartitionScheme + }, + "PlacementConstraints": "str", # Optional. The placement constraints as a + string. Placement constraints are boolean expressions on node properties and + allow for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is blue + specify the following: "NodeColor == blue)". + "ScalingPolicies": [ + { + "ScalingMechanism": { + Kind: Kind + }, + "ScalingTrigger": { + Kind: Kind + } + } + ], + "ServiceDnsName": "str", # Optional. The DNS name of the service. It + requires the DNS system service to be enabled in Service Fabric cluster. + "ServiceLoadMetrics": [ + { + "AuxiliaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is an Auxiliary replica. + "DefaultLoad": 0, # Optional. Used only for Stateless + services. The default amount of load, as a number, that this service + creates for this metric. + "Name": "str", # 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. + "PrimaryDefaultLoad": 0, # Optional. Used only for Stateful + services. The default amount of load, as a number, that this service + creates for this metric when it is a Primary replica. + "SecondaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is a Secondary replica. + "Weight": "str" # Optional. The service load metric relative + weight, compared to other metrics configured for this service, as a + number. Known values are: "Zero", "Low", "Medium", "High". + } + ], + "ServiceName": "str", # Required. The full name of the service with + 'fabric:' URI scheme. + "ServicePackageActivationMode": "str", # Optional. The activation mode of + service package to be used for a service. Known values are: "SharedProcess", + "ExclusiveProcess". + "ServicePlacementPolicies": [ + { + Type: Type + } + ], + "ServiceTypeName": "str", # Required. Name of the service type as specified + in the service manifest. + "TagsRequiredToPlace": { + "Count": 0, # Required. The number of tags. + "Tags": [ + "str" # Required. A set of tags. Array of size specified by + the "u2018Count"u2019 parameter, for the placement tags of the service. + ] + }, + "TagsRequiredToRun": { + "Count": 0, # Required. The number of tags. + "Tags": [ + "str" # Required. A set of tags. Array of size specified by + the "u2018Count"u2019 parameter, for the placement tags of the service. + ] + }, + ServiceKind: ServiceKind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = service_description + + request = build_create_service_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def create_service_from_template( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + service_from_template_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates a Service Fabric service from the service template. + + Creates a Service Fabric service from the service template defined in the application manifest. + A service template contains the properties that will be same for the service instance of the + same type. The API allows overriding the properties that are usually different for different + services of the same service type. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_from_template_description: Describes the service that needs to be created from + the template defined in the application manifest. + :type service_from_template_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + service_from_template_description = { + "ApplicationName": "str", # Required. The name of the application, including + the 'fabric:' URI scheme. + "InitializationData": [ + 0 # Optional. The initialization data for the newly created service + instance. + ], + "ServiceDnsName": "str", # Optional. The DNS name of the service. It + requires the DNS system service to be enabled in Service Fabric cluster. + "ServiceName": "str", # Required. The full name of the service with + 'fabric:' URI scheme. + "ServicePackageActivationMode": "str", # Optional. The activation mode of + service package to be used for a service. Known values are: "SharedProcess", + "ExclusiveProcess". + "ServiceTypeName": "str" # Required. Name of the service type as specified + in the service manifest. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = service_from_template_description + + request = build_create_service_from_template_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def delete_service( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + *, + force_remove: Optional[bool] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes an existing Service Fabric service. + + A service must be created before it can be deleted. By default, Service Fabric will try to + close service replicas in a graceful manner and then delete the service. However, if the + service is having issues closing the replica gracefully, the delete operation may take a long + time or get stuck. Use the optional ForceRemove flag to skip the graceful close sequence and + forcefully delete the service. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword force_remove: Remove a Service Fabric application or service forcefully without going + through the graceful shutdown sequence. This parameter can be used to forcefully delete an + application or service for which delete is timing out due to issues in the service code that + prevents graceful close of replicas. Default value is None. + :paramtype force_remove: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_delete_service_request( + service_id=service_id, + api_version=api_version, + force_remove=force_remove, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def update_service( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + service_update_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Updates a Service Fabric service using the specified update description. + + This API allows updating properties of a running Service Fabric service. The set of properties + that can be updated are a subset of the properties that were specified at the time of creating + the service. The current set of properties can be obtained using ``GetServiceDescription`` API. + Note that updating the properties of a running service is different than upgrading your + application using ``StartApplicationUpgrade`` API. The upgrade is a long running background + operation that involves moving the application from one version to another, one upgrade domain + at a time, whereas update applies the new properties immediately to the service. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param service_update_description: The information necessary to update a service. + :type service_update_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + service_kind = 'StatefulServiceUpdateDescription' or + 'StatelessServiceUpdateDescription' + + # JSON input template you can fill out and use as your body input. + service_update_description = { + "CorrelationScheme": [ + { + "Scheme": "str", # Required. The ServiceCorrelationScheme + which describes the relationship between this service and the service + specified via ServiceName. Known values are: "Invalid", "Affinity", + "AlignedAffinity", "NonAlignedAffinity". + "ServiceName": "str" # Required. The name of the service + that the correlation relationship is established with. + } + ], + "DefaultMoveCost": "str", # Optional. The move cost for the service. Known + values are: "Zero", "Low", "Medium", "High", "VeryHigh". + "Flags": "str", # Optional. Flags indicating whether other properties are + set. Each of the associated properties corresponds to a flag, specified below, + which, if set, indicate that the property is specified."nThis property can be a + combination of those flags obtained using bitwise 'OR' operator."nFor example, if + the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and + QuorumLossWaitDuration (4) are set."n"n"n* None - Does not indicate any other + properties are set. The value is zero."n* TargetReplicaSetSize/InstanceCount - + Indicates whether the TargetReplicaSetSize property (for Stateful services) or + the InstanceCount property (for Stateless services) is set. The value is 1."n* + ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is + set. The value is 2."n* QuorumLossWaitDuration - Indicates the + QuorumLossWaitDuration property is set. The value is 4."n* + StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is + set. The value is 8."n* MinReplicaSetSize - Indicates the MinReplicaSetSize + property is set. The value is 16."n* PlacementConstraints - Indicates the + PlacementConstraints property is set. The value is 32."n* PlacementPolicyList - + Indicates the ServicePlacementPolicies property is set. The value is 64."n* + Correlation - Indicates the CorrelationScheme property is set. The value is + 128."n* Metrics - Indicates the ServiceLoadMetrics property is set. The value is + 256."n* DefaultMoveCost - Indicates the DefaultMoveCost property is set. The + value is 512."n* ScalingPolicy - Indicates the ScalingPolicies property is set. + The value is 1024."n* ServicePlacementTimeLimit - Indicates the + ServicePlacementTimeLimit property is set. The value is 2048."n* MinInstanceCount + - Indicates the MinInstanceCount property is set. The value is 4096."n* + MinInstancePercentage - Indicates the MinInstancePercentage property is set. The + value is 8192."n* InstanceCloseDelayDuration - Indicates the + InstanceCloseDelayDuration property is set. The value is 16384."n* + InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property + is set. The value is 32768."n* DropSourceReplicaOnMove - Indicates the + DropSourceReplicaOnMove property is set. The value is 65536."n* ServiceDnsName - + Indicates the ServiceDnsName property is set. The value is 131072."n* + TagsForPlacement - Indicates the TagsForPlacement property is set. The value is + 1048576."n* TagsForRunning - Indicates the TagsForRunning property is set. The + value is 2097152. + "LoadMetrics": [ + { + "AuxiliaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is an Auxiliary replica. + "DefaultLoad": 0, # Optional. Used only for Stateless + services. The default amount of load, as a number, that this service + creates for this metric. + "Name": "str", # 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. + "PrimaryDefaultLoad": 0, # Optional. Used only for Stateful + services. The default amount of load, as a number, that this service + creates for this metric when it is a Primary replica. + "SecondaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is a Secondary replica. + "Weight": "str" # Optional. The service load metric relative + weight, compared to other metrics configured for this service, as a + number. Known values are: "Zero", "Low", "Medium", "High". + } + ], + "PlacementConstraints": "str", # Optional. The placement constraints as a + string. Placement constraints are boolean expressions on node properties and + allow for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is blue + specify the following: "NodeColor == blue)". + "ScalingPolicies": [ + { + "ScalingMechanism": { + Kind: Kind + }, + "ScalingTrigger": { + Kind: Kind + } + } + ], + "ServiceDnsName": "str", # Optional. The DNS name of the service. + "ServicePlacementPolicies": [ + { + Type: Type + } + ], + "TagsForPlacement": { + "Count": 0, # Required. The number of tags. + "Tags": [ + "str" # Required. A set of tags. Array of size specified by + the "u2018Count"u2019 parameter, for the placement tags of the service. + ] + }, + "TagsForRunning": { + "Count": 0, # Required. The number of tags. + "Tags": [ + "str" # Required. A set of tags. Array of size specified by + the "u2018Count"u2019 parameter, for the placement tags of the service. + ] + }, + ServiceKind: ServiceKind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = service_update_description + + request = build_update_service_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_service_description( + self, + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the description of an existing Service Fabric service. + + Gets the description of an existing Service Fabric service. A service must be created before + its description can be obtained. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ApplicationName": "str", # Optional. The name of the application, including + the 'fabric:' URI scheme. + "CorrelationScheme": [ + { + "Scheme": "str", # Required. The ServiceCorrelationScheme + which describes the relationship between this service and the service + specified via ServiceName. Known values are: "Invalid", "Affinity", + "AlignedAffinity", "NonAlignedAffinity". + "ServiceName": "str" # Required. The name of the service + that the correlation relationship is established with. + } + ], + "DefaultMoveCost": "str", # Optional. The move cost for the service. Known + values are: "Zero", "Low", "Medium", "High", "VeryHigh". + "InitializationData": [ + 0 # Optional. The initialization data as an array of bytes. + Initialization data is passed to service instances or replicas when they are + created. + ], + "IsDefaultMoveCostSpecified": bool, # Optional. Indicates if the + DefaultMoveCost property is specified. + "PartitionDescription": { + PartitionScheme: PartitionScheme + }, + "PlacementConstraints": "str", # Optional. The placement constraints as a + string. Placement constraints are boolean expressions on node properties and + allow for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is blue + specify the following: "NodeColor == blue)". + "ScalingPolicies": [ + { + "ScalingMechanism": { + Kind: Kind + }, + "ScalingTrigger": { + Kind: Kind + } + } + ], + "ServiceDnsName": "str", # Optional. The DNS name of the service. It + requires the DNS system service to be enabled in Service Fabric cluster. + "ServiceLoadMetrics": [ + { + "AuxiliaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is an Auxiliary replica. + "DefaultLoad": 0, # Optional. Used only for Stateless + services. The default amount of load, as a number, that this service + creates for this metric. + "Name": "str", # 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. + "PrimaryDefaultLoad": 0, # Optional. Used only for Stateful + services. The default amount of load, as a number, that this service + creates for this metric when it is a Primary replica. + "SecondaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is a Secondary replica. + "Weight": "str" # Optional. The service load metric relative + weight, compared to other metrics configured for this service, as a + number. Known values are: "Zero", "Low", "Medium", "High". + } + ], + "ServiceName": "str", # Required. The full name of the service with + 'fabric:' URI scheme. + "ServicePackageActivationMode": "str", # Optional. The activation mode of + service package to be used for a service. Known values are: "SharedProcess", + "ExclusiveProcess". + "ServicePlacementPolicies": [ + { + Type: Type + } + ], + "ServiceTypeName": "str", # Required. Name of the service type as specified + in the service manifest. + "TagsRequiredToPlace": { + "Count": 0, # Required. The number of tags. + "Tags": [ + "str" # Required. A set of tags. Array of size specified by + the "u2018Count"u2019 parameter, for the placement tags of the service. + ] + }, + "TagsRequiredToRun": { + "Count": 0, # Required. The number of tags. + "Tags": [ + "str" # Required. A set of tags. Array of size specified by + the "u2018Count"u2019 parameter, for the placement tags of the service. + ] + }, + ServiceKind: ServiceKind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_service_description_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_service_health( + self, + service_id: str, + *, + events_health_state_filter: Optional[int] = 0, + partitions_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of the specified Service Fabric service. + + Gets the health information of the specified service. + Use EventsHealthStateFilter to filter the collection of health events reported on the service + based on the health state. + Use PartitionsHealthStateFilter to filter the collection of partitions returned. + If you specify a service that does not exist in the health store, this request returns an + error. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword partitions_health_state_filter: Allows filtering of the partitions health state + objects returned in the result of service health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only partitions that match the filter are returned. All partitions are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these value + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of partitions with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype partitions_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "Name": "str", # Optional. The name of the service whose health information + is described by this object. + "PartitionHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "PartitionId": str # Optional. Id of the partition whose + health state is described by this object. + } + ], + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_service_health_request( + service_id=service_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + partitions_health_state_filter=partitions_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_service_health_using_policy( + self, + service_id: str, + application_health_policy: Optional[JSON] = None, + *, + events_health_state_filter: Optional[int] = 0, + partitions_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of the specified Service Fabric service, by using the specified health policy. + + Gets the health information of the specified service. + If the application health policy is specified, the health evaluation uses it to get the + aggregated health state. + If the policy is not specified, the health evaluation uses the application health policy + defined in the application manifest, or the default health policy, if no policy is defined in + the manifest. + Use EventsHealthStateFilter to filter the collection of health events reported on the service + based on the health state. + Use PartitionsHealthStateFilter to filter the collection of partitions returned. + If you specify a service that does not exist in the health store, this request returns an + error. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: JSON + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword partitions_health_state_filter: Allows filtering of the partitions health state + objects returned in the result of service health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only partitions that match the filter are returned. All partitions are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these value + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of partitions with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype partitions_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_health_policy = { + "ConsiderWarningAsError": bool, # Optional. Indicates whether warnings are + treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. The + maximum allowed percentage of unhealthy partitions per service. Allowed + values are Byte values from zero to 100"n"nThe percentage represents the + maximum tolerated percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe computation rounds up to + tolerate one failure on small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. The + maximum allowed percentage of unhealthy replicas per partition. Allowed + values are Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas over + the total number of replicas in the partition."nThe computation rounds up to + tolerate one failure on small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum allowed + percentage of unhealthy services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated percentage of + services that can be unhealthy before the application is considered in + error."nIf the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific service type over the total + number of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default percentage is + zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The maximum + allowed percentage of unhealthy deployed applications. Allowed values are Byte + values from zero to 100."nThe percentage represents the maximum tolerated + percentage of deployed applications that can be unhealthy before the application + is considered in error."nThis is calculated by dividing the number of unhealthy + deployed applications over the number of nodes where the application is currently + deployed on in the cluster."nThe computation rounds up to tolerate one failure on + small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service type health + policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to 100"n"nThe + percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error."nIf + the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy partitions over the + total number of partitions in the service."nThe computation rounds up + to tolerate one failure on small numbers of partitions. Default + percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to 100."n"nThe + percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at least one + unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition."nThe computation + rounds up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. Allowed values are + Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of services that can be unhealthy before + the application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the number of + unhealthy services of the specific service type over the total number + of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default + percentage is zero. + } + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "Name": "str", # Optional. The name of the service whose health information + is described by this object. + "PartitionHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "PartitionId": str # Optional. Id of the partition whose + health state is described by this object. + } + ], + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if application_health_policy is not None: + _json = application_health_policy + else: + _json = None + + request = build_get_service_health_using_policy_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + partitions_health_state_filter=partitions_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def report_service_health( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + health_information: JSON, + *, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric service. + + Reports health state of the specified Service Fabric service. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway Service, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetServiceHealth and check that + the report appears in the HealthEvents section. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: JSON + :keyword immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :paramtype immediate: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + health_information = { + "Description": "str", # Optional. The description of the health information. + It represents free text used to add human readable information about the + report."nThe maximum string length for the description is 4096 characters."nIf + the provided string is longer, it will be automatically truncated."nWhen + truncated, the last characters of the description contain a marker "[Truncated]", + and total string size is 4096 characters."nThe presence of the marker indicates + to users that truncation occurred."nNote that when truncated, the description has + less than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID which identifies the + health report and can be used to find more detailed information about a specific + health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Property": "str", # Required. The property of the health information. An + entity can have health reports for different properties."nThe property is a + string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report."nFor example, a reporter + with SourceId "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same reporter + can monitor the node connectivity, so it can report a property "Connectivity" on + the same node."nIn the health store, these reports are treated as separate health + events for the specified node."n"nTogether with the SourceId, the property + uniquely identifies the health information. + "RemoveWhenExpired": bool, # Optional. Value that indicates whether the + report is removed from health store when it expires."nIf set to true, the report + is removed from the health store after it expires."nIf set to false, the report + is treated as an error when expired. The value of this property is false by + default."nWhen clients report periodically, they should set RemoveWhenExpired + false (default)."nThis way, if the reporter has issues (e.g. deadlock) and can't + report, the entity is evaluated at error when the health report expires."nThis + flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for this health + report as a numeric string."nThe report sequence number is used by the health + store to detect stale reports."nIf not specified, a sequence number is + auto-generated by the health client when a report is added. + "SourceId": "str", # Required. The source name that identifies the + client/watchdog/system component that generated the health information. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The duration for + which this health report is valid. This field uses ISO8601 format for specifying + the duration."nWhen clients report periodically, they should send reports with + higher frequency than time to live."nIf clients report on transition, they can + set the time to live to infinite."nWhen time to live expires, the health event + that contains the health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = health_information + + request = build_report_service_health_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def resolve_service( + self, + service_id: str, + *, + partition_key_type: Optional[int] = None, + partition_key_value: Optional[str] = None, + previous_rsp_version: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Resolve a Service Fabric partition. + + Resolve a Service Fabric service partition to get the endpoints of the service replicas. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword partition_key_type: Key type for the partition. This parameter is required if the + partition scheme for the service is Int64Range or Named. The possible values are following. + + + * None (1) - Indicates that the PartitionKeyValue parameter is not specified. This is valid + for the partitions with partitioning scheme as Singleton. This is the default value. The value + is 1. + * Int64Range (2) - Indicates that the PartitionKeyValue parameter is an int64 partition key. + This is valid for the partitions with partitioning scheme as Int64Range. The value is 2. + * Named (3) - Indicates that the PartitionKeyValue parameter is a name of the partition. This + is valid for the partitions with partitioning scheme as Named. The value is 3. Default value is + None. + :paramtype partition_key_type: int + :keyword partition_key_value: Partition key. This is required if the partition scheme for the + service is Int64Range or Named. + This is not the partition ID, but rather, either the integer key value, or the name of the + partition ID. + For example, if your service is using ranged partitions from 0 to 10, then they + PartitionKeyValue would be an + integer in that range. Query service description to see the range or name. Default value is + None. + :paramtype partition_key_value: str + :keyword previous_rsp_version: The value in the Version field of the response that was received + previously. This is required if the user knows that the result that was gotten previously is + stale. Default value is None. + :paramtype previous_rsp_version: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Endpoints": [ + { + "Address": "str", # Optional. The address of the endpoint. + If the endpoint has multiple listeners the address is a JSON object with + one property per listener with the value as the address of that listener. + "Kind": "str" # Optional. The role of the replica where the + endpoint is reported. Known values are: "Invalid", "Stateless", + "StatefulPrimary", "StatefulSecondary". + } + ], + "Name": "str", # Required. The full name of the service with 'fabric:' URI + scheme. + "PartitionInformation": { + "Id": str, # Optional. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + ServicePartitionKind: ServicePartitionKind + }, + "Version": "str" # Required. The version of this resolved service partition + result. This version should be passed in the next time the ResolveService call is + made via the PreviousRspVersion query parameter. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_resolve_service_request( + service_id=service_id, + api_version=api_version, + partition_key_type=partition_key_type, + partition_key_value=partition_key_value, + previous_rsp_version=previous_rsp_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_unplaced_replica_information( + self, + service_id: str, + *, + partition_id: Optional[str] = None, + only_query_primaries: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the information about unplaced replica of the service. + + Returns the information about the unplaced replicas of the service. + If PartitionId is specified, then result will contain information only about unplaced replicas + for that partition. + If PartitionId is not specified, then result will contain information about unplaced replicas + for all partitions of that service. + If OnlyQueryPrimaries is set to true, then result will contain information only about primary + replicas, and will ignore unplaced secondary replicas. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword partition_id: The identity of the partition. Default value is None. + :paramtype partition_id: str + :keyword only_query_primaries: Indicates that unplaced replica information will be queries only + for primary replicas. Default value is False. + :paramtype only_query_primaries: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "PartitionId": str, # Optional. The ID of the partition. + "ServiceName": "str", # Optional. The name of the service. + "UnplacedReplicaDetails": [ + "str" # Optional. List of reasons due to which a replica cannot be + placed. + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_unplaced_replica_information_request( + service_id=service_id, + api_version=api_version, + partition_id=partition_id, + only_query_primaries=only_query_primaries, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def update_service_arm_metadata( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + service_arm_metadata_update_description: JSON, + *, + timeout: Optional[int] = 60, + force: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Updates the Arm Metadata for a specific service. + + Updates the Arm Metadata for a specific service. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param service_arm_metadata_update_description: The Arm metadata to be assocated with a + specific service. + :type service_arm_metadata_update_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword force: Force parameter used to prevent accidental Arm metadata update. Default value + is None. + :paramtype force: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '9.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "9.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + service_arm_metadata_update_description = { + "ArmResourceId": "str" # Optional. A string containing the ArmResourceId. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = service_arm_metadata_update_description + + request = build_update_service_arm_metadata_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + force=force, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_loaded_partition_info_list( + self, + *, + metric_name: str, + service_name: Optional[str] = None, + ordering: Optional[str] = None, + max_results: Optional[int] = 0, + continuation_token_parameter: Optional[str] = None, + **kwargs: Any + ) -> JSON: + """Gets ordered list of partitions. + + Retrieves partitions which are most/least loaded according to specified metric. + + :keyword metric_name: Name of the metric based on which to get ordered list of partitions. + :paramtype metric_name: str + :keyword service_name: The name of a service. Default value is None. + :paramtype service_name: str + :keyword ordering: Ordering of partitions' load. Known values are: "Desc" or "Asc". Default + value is None. + :paramtype ordering: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword api_version: The version of the API. This parameter is required and its value must be + '8.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "8.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "Load": 0.0, # Required. Load for metric. + "MetricName": "str", # Required. Name of the metric for + which this information is provided. + "PartitionId": str, # Required. Id of the partition. + "ServiceName": "str" # Required. Name of the service this + partition belongs to. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "8.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_loaded_partition_info_list_request( + api_version=api_version, + metric_name=metric_name, + service_name=service_name, + ordering=ordering, + max_results=max_results, + continuation_token_parameter=continuation_token_parameter, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_partition_info_list( + self, + service_id: str, + *, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the list of partitions of a Service Fabric service. + + The response includes the partition ID, partitioning scheme information, keys supported by the + partition, status, health, and other details about the partition. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "HealthState": "str", # Optional. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "PartitionInformation": { + "Id": str, # Optional. An internal ID used by + Service Fabric to uniquely identify a partition. This is a randomly + generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the + same service was deleted and recreated the IDs of its partitions + would be different. + ServicePartitionKind: ServicePartitionKind + }, + "PartitionStatus": "str", # Optional. The status of the + service fabric service partition. Known values are: "Invalid", "Ready", + "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". + ServiceKind: ServiceKind + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_partition_info_list_request( + service_id=service_id, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_partition_info( + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[JSON]: + """Gets the information about a Service Fabric partition. + + Gets the information about the specified partition. The response includes the partition ID, + partitioning scheme information, keys supported by the partition, status, health, and other + details about the partition. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "HealthState": "str", # Optional. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "PartitionInformation": { + "Id": str, # Optional. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + ServicePartitionKind: ServicePartitionKind + }, + "PartitionStatus": "str", # Optional. The status of the service fabric + service partition. Known values are: "Invalid", "Ready", "NotReady", + "InQuorumLoss", "Reconfiguring", "Deleting". + ServiceKind: ServiceKind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + + request = build_get_partition_info_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace_async + async def get_service_name_info( + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the name of the Service Fabric service for a partition. + + Gets name of the service for the specified partition. A 404 error is returned if the partition + ID does not exist in the cluster. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Id": "str", # Optional. 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."nStarting in version 6.0, hierarchical names are delimited with + the "~" character. For example, if the service name is + "fabric:/myapp/app1/svc1","nthe service identity would be "myapp~app1~svc1" in + 6.0+ and "myapp/app1/svc1" in previous versions. + "Name": "str" # Optional. The full name of the service with 'fabric:' URI + scheme. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_service_name_info_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_partition_health( + self, + partition_id: str, + *, + events_health_state_filter: Optional[int] = 0, + replicas_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of the specified Service Fabric partition. + + Use EventsHealthStateFilter to filter the collection of health events reported on the service + based on the health state. + Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the + partition. + If you specify a partition that does not exist in the health store, this request returns an + error. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword replicas_health_state_filter: Allows filtering the collection of ReplicaHealthState + objects on the partition. The value can be obtained from members or bitwise operations on + members of HealthStateFilter. Only replicas that match the filter will be returned. All + replicas will be used to evaluate the aggregated health state. If not specified, all entries + will be returned.The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. For example, If the provided + value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be + returned. The possible values for this parameter include integer value of one of the following + health states. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype replicas_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "PartitionId": str, # Optional. ID of the partition whose health information + is described by this object. + "ReplicaHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "PartitionId": str, # Optional. The ID of the partition to + which this replica belongs. + ServiceKind: ReplicaHealthState + } + ], + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_partition_health_request( + partition_id=partition_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + replicas_health_state_filter=replicas_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_partition_health_using_policy( + self, + partition_id: str, + application_health_policy: Optional[JSON] = None, + *, + events_health_state_filter: Optional[int] = 0, + replicas_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of the specified Service Fabric partition, by using the specified health + policy. + + Gets the health information of the specified partition. + If the application health policy is specified, the health evaluation uses it to get the + aggregated health state. + If the policy is not specified, the health evaluation uses the application health policy + defined in the application manifest, or the default health policy, if no policy is defined in + the manifest. + Use EventsHealthStateFilter to filter the collection of health events reported on the partition + based on the health state. + Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the + partition. Use ApplicationHealthPolicy in the POST body to override the health policies used to + evaluate the health. + If you specify a partition that does not exist in the health store, this request returns an + error. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: JSON + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword replicas_health_state_filter: Allows filtering the collection of ReplicaHealthState + objects on the partition. The value can be obtained from members or bitwise operations on + members of HealthStateFilter. Only replicas that match the filter will be returned. All + replicas will be used to evaluate the aggregated health state. If not specified, all entries + will be returned.The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. For example, If the provided + value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be + returned. The possible values for this parameter include integer value of one of the following + health states. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype replicas_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_health_policy = { + "ConsiderWarningAsError": bool, # Optional. Indicates whether warnings are + treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. The + maximum allowed percentage of unhealthy partitions per service. Allowed + values are Byte values from zero to 100"n"nThe percentage represents the + maximum tolerated percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe computation rounds up to + tolerate one failure on small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. The + maximum allowed percentage of unhealthy replicas per partition. Allowed + values are Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas over + the total number of replicas in the partition."nThe computation rounds up to + tolerate one failure on small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum allowed + percentage of unhealthy services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated percentage of + services that can be unhealthy before the application is considered in + error."nIf the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific service type over the total + number of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default percentage is + zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The maximum + allowed percentage of unhealthy deployed applications. Allowed values are Byte + values from zero to 100."nThe percentage represents the maximum tolerated + percentage of deployed applications that can be unhealthy before the application + is considered in error."nThis is calculated by dividing the number of unhealthy + deployed applications over the number of nodes where the application is currently + deployed on in the cluster."nThe computation rounds up to tolerate one failure on + small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service type health + policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to 100"n"nThe + percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error."nIf + the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy partitions over the + total number of partitions in the service."nThe computation rounds up + to tolerate one failure on small numbers of partitions. Default + percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to 100."n"nThe + percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at least one + unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition."nThe computation + rounds up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. Allowed values are + Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of services that can be unhealthy before + the application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the number of + unhealthy services of the specific service type over the total number + of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default + percentage is zero. + } + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "PartitionId": str, # Optional. ID of the partition whose health information + is described by this object. + "ReplicaHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "PartitionId": str, # Optional. The ID of the partition to + which this replica belongs. + ServiceKind: ReplicaHealthState + } + ], + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if application_health_policy is not None: + _json = application_health_policy + else: + _json = None + + request = build_get_partition_health_using_policy_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + replicas_health_state_filter=replicas_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def report_partition_health( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + health_information: JSON, + *, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric partition. + + Reports health state of the specified Service Fabric partition. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway Partition, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetPartitionHealth and check + that the report appears in the HealthEvents section. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: JSON + :keyword immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :paramtype immediate: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + health_information = { + "Description": "str", # Optional. The description of the health information. + It represents free text used to add human readable information about the + report."nThe maximum string length for the description is 4096 characters."nIf + the provided string is longer, it will be automatically truncated."nWhen + truncated, the last characters of the description contain a marker "[Truncated]", + and total string size is 4096 characters."nThe presence of the marker indicates + to users that truncation occurred."nNote that when truncated, the description has + less than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID which identifies the + health report and can be used to find more detailed information about a specific + health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Property": "str", # Required. The property of the health information. An + entity can have health reports for different properties."nThe property is a + string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report."nFor example, a reporter + with SourceId "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same reporter + can monitor the node connectivity, so it can report a property "Connectivity" on + the same node."nIn the health store, these reports are treated as separate health + events for the specified node."n"nTogether with the SourceId, the property + uniquely identifies the health information. + "RemoveWhenExpired": bool, # Optional. Value that indicates whether the + report is removed from health store when it expires."nIf set to true, the report + is removed from the health store after it expires."nIf set to false, the report + is treated as an error when expired. The value of this property is false by + default."nWhen clients report periodically, they should set RemoveWhenExpired + false (default)."nThis way, if the reporter has issues (e.g. deadlock) and can't + report, the entity is evaluated at error when the health report expires."nThis + flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for this health + report as a numeric string."nThe report sequence number is used by the health + store to detect stale reports."nIf not specified, a sequence number is + auto-generated by the health client when a report is added. + "SourceId": "str", # Required. The source name that identifies the + client/watchdog/system component that generated the health information. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The duration for + which this health report is valid. This field uses ISO8601 format for specifying + the duration."nWhen clients report periodically, they should send reports with + higher frequency than time to live."nIf clients report on transition, they can + set the time to live to infinite."nWhen time to live expires, the health event + that contains the health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = health_information + + request = build_report_partition_health_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_partition_load_information( + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the load information of the specified Service Fabric partition. + + Returns information about the load of a specified partition. + The response includes a list of load reports for a Service Fabric partition. + Each report includes the load metric name, value, and last reported time in UTC. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AuxiliaryLoadMetricReports": [ + { + "CurrentValue": "str", # Optional. The value of the load + metric. + "LastReportedUtc": "2020-02-20 00:00:00", # Optional. Gets + the UTC time when the load was reported. + "Name": "str", # Optional. The name of the load metric. + "Value": "str" # Optional. The value of the load metric. In + future releases of Service Fabric this parameter will be deprecated in + favor of CurrentValue. + } + ], + "PartitionId": str, # Optional. Id of the partition. + "PrimaryLoadMetricReports": [ + { + "CurrentValue": "str", # Optional. The value of the load + metric. + "LastReportedUtc": "2020-02-20 00:00:00", # Optional. Gets + the UTC time when the load was reported. + "Name": "str", # Optional. The name of the load metric. + "Value": "str" # Optional. The value of the load metric. In + future releases of Service Fabric this parameter will be deprecated in + favor of CurrentValue. + } + ], + "SecondaryLoadMetricReports": [ + { + "CurrentValue": "str", # Optional. The value of the load + metric. + "LastReportedUtc": "2020-02-20 00:00:00", # Optional. Gets + the UTC time when the load was reported. + "Name": "str", # Optional. The name of the load metric. + "Value": "str" # Optional. The value of the load metric. In + future releases of Service Fabric this parameter will be deprecated in + favor of CurrentValue. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_partition_load_information_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def reset_partition_load( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Resets the current load of a Service Fabric partition. + + Resets the current load of a Service Fabric partition to the default load for the service. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_reset_partition_load_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def recover_partition( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Indicates to the Service Fabric cluster that it should attempt to recover a specific partition + that is currently stuck in quorum loss. + + This operation should only be performed if it is known that the replicas that are down cannot + be recovered. Incorrect use of this API can cause potential data loss. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_recover_partition_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def recover_service_partitions( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Indicates to the Service Fabric cluster that it should attempt to recover the specified service + that is currently stuck in quorum loss. + + Indicates to the Service Fabric cluster that it should attempt to recover the specified service + that is currently stuck in quorum loss. This operation should only be performed if it is known + that the replicas that are down cannot be recovered. Incorrect use of this API can cause + potential data loss. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_recover_service_partitions_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def recover_system_partitions( # pylint: disable=inconsistent-return-statements + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Indicates to the Service Fabric cluster that it should attempt to recover the system services + that are currently stuck in quorum loss. + + Indicates to the Service Fabric cluster that it should attempt to recover the system services + that are currently stuck in quorum loss. This operation should only be performed if it is known + that the replicas that are down cannot be recovered. Incorrect use of this API can cause + potential data loss. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_recover_system_partitions_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def recover_all_partitions( # pylint: disable=inconsistent-return-statements + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """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. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_recover_all_partitions_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def move_primary_replica( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + *, + node_name: Optional[str] = None, + ignore_constraints: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Moves the primary replica of a partition of a stateful service. + + This command moves the primary replica of a partition of a stateful service, respecting all + constraints. + If NodeName parameter is specified, primary will be moved to the specified node (if constraints + allow it). + If NodeName parameter is not specified, primary replica will be moved to a random node in the + cluster. + If IgnoreConstraints parameter is specified and set to true, then primary will be moved + regardless of the constraints. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword node_name: The name of the node. Default value is None. + :paramtype node_name: str + :keyword ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :paramtype ignore_constraints: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.5'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.5". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.5")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_move_primary_replica_request( + partition_id=partition_id, + api_version=api_version, + node_name=node_name, + ignore_constraints=ignore_constraints, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def move_secondary_replica( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + *, + current_node_name: str, + new_node_name: Optional[str] = None, + ignore_constraints: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Moves the secondary replica of a partition of a stateful service. + + This command moves the secondary replica of a partition of a stateful service, respecting all + constraints. + CurrentNodeName parameter must be specified to identify the replica that is moved. + Source node name must be specified, but new node name can be omitted, and in that case replica + is moved to a random node. + If IgnoreConstraints parameter is specified and set to true, then secondary will be moved + regardless of the constraints. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword current_node_name: The name of the source node for secondary replica move. + :paramtype current_node_name: str + :keyword new_node_name: The name of the target node for secondary replica or instance move. If + not specified, replica or instance is moved to a random node. Default value is None. + :paramtype new_node_name: str + :keyword ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :paramtype ignore_constraints: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.5'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.5". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.5")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_move_secondary_replica_request( + partition_id=partition_id, + api_version=api_version, + current_node_name=current_node_name, + new_node_name=new_node_name, + ignore_constraints=ignore_constraints, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def update_partition_load( + self, + partition_metric_load_description_list: List[JSON], + *, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Update the loads of provided partitions for specific metrics. + + Updates the load value and predicted load value for all the partitions provided for specified + metrics. + + :param partition_metric_load_description_list: Description of updating load for list of + partitions. + :type partition_metric_load_description_list: list[JSON] + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '7.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "7.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + partition_metric_load_description_list = [ + { + "AuxiliaryReplicaLoadEntriesPerNode": [ + { + "NodeName": "str", # Optional. Node name of a + specific secondary replica or instance. + "ReplicaOrInstanceLoadEntries": [ + { + "CurrentLoad": 0.0, # Optional. The + current value of the metric load. + "MetricName": "str", # Optional. The + name of the reported metric. + "PredictedLoad": 0.0 # Optional. The + predicted value of the metric load. Predicted metric load + values is currently a preview feature. It allows predicted + load values to be reported and used at the Service Fabric + side, but that feature is currently not enabled. + } + ] + } + ], + "AuxiliaryReplicasLoadEntries": [ + { + "CurrentLoad": 0.0, # Optional. The current value of + the metric load. + "MetricName": "str", # Optional. The name of the + reported metric. + "PredictedLoad": 0.0 # Optional. The predicted value + of the metric load. Predicted metric load values is currently a + preview feature. It allows predicted load values to be reported and + used at the Service Fabric side, but that feature is currently not + enabled. + } + ], + "PartitionId": str, # Optional. Id of the partition. + "PrimaryReplicaLoadEntries": [ + { + "CurrentLoad": 0.0, # Optional. The current value of + the metric load. + "MetricName": "str", # Optional. The name of the + reported metric. + "PredictedLoad": 0.0 # Optional. The predicted value + of the metric load. Predicted metric load values is currently a + preview feature. It allows predicted load values to be reported and + used at the Service Fabric side, but that feature is currently not + enabled. + } + ], + "SecondaryReplicaOrInstanceLoadEntriesPerNode": [ + { + "NodeName": "str", # Optional. Node name of a + specific secondary replica or instance. + "ReplicaOrInstanceLoadEntries": [ + { + "CurrentLoad": 0.0, # Optional. The + current value of the metric load. + "MetricName": "str", # Optional. The + name of the reported metric. + "PredictedLoad": 0.0 # Optional. The + predicted value of the metric load. Predicted metric load + values is currently a preview feature. It allows predicted + load values to be reported and used at the Service Fabric + side, but that feature is currently not enabled. + } + ] + } + ], + "SecondaryReplicasOrInstancesLoadEntries": [ + { + "CurrentLoad": 0.0, # Optional. The current value of + the metric load. + "MetricName": "str", # Optional. The name of the + reported metric. + "PredictedLoad": 0.0 # Optional. The predicted value + of the metric load. Predicted metric load values is currently a + preview feature. It allows predicted load values to be reported and + used at the Service Fabric side, but that feature is currently not + enabled. + } + ] + } + ] + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "PartitionErrorCode": 0, # Optional. If OperationState is + Completed - this is 0. If OperationState is Faulted - this is an error + code indicating the reason. + "PartitionId": str # Optional. Id of the partition. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = partition_metric_load_description_list + + request = build_update_partition_load_request( + api_version=api_version, + content_type=content_type, + json=_json, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def move_instance( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + partition_id: str, + *, + current_node_name: Optional[str] = None, + new_node_name: Optional[str] = None, + ignore_constraints: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Moves the instance of a partition of a stateless service. + + This command moves the instance of a partition of a stateless service, respecting all + constraints. + Partition id and service name must be specified to be able to move the instance. + CurrentNodeName when specified identifies the instance that is moved. If not specified, random + instance will be moved + New node name can be omitted, and in that case instance is moved to a random node. + If IgnoreConstraints parameter is specified and set to true, then instance will be moved + regardless of the constraints. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword current_node_name: The name of the source node for instance move. If not specified, + instance is moved from a random node. Default value is None. + :paramtype current_node_name: str + :keyword new_node_name: The name of the target node for secondary replica or instance move. If + not specified, replica or instance is moved to a random node. Default value is None. + :paramtype new_node_name: str + :keyword ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :paramtype ignore_constraints: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '8.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "8.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "8.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_move_instance_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + current_node_name=current_node_name, + new_node_name=new_node_name, + ignore_constraints=ignore_constraints, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def move_auxiliary_replica( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + partition_id: str, + *, + current_node_name: Optional[str] = None, + new_node_name: Optional[str] = None, + ignore_constraints: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Moves the auxiliary replica of a partition of a stateful service. + + This command moves the auxiliary replica of a partition of a stateful service, respecting all + constraints. + CurrentNodeName can be omitted, and in that case a random auxiliary replica is chosen. + NewNodeName can be omitted, and in that case the auxiliary replica is moved to a random node. + If IgnoreConstraints parameter is specified and set to true, then auxiliary will be moved + regardless of the constraints. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword current_node_name: The name of the source node for instance move. If not specified, + instance is moved from a random node. Default value is None. + :paramtype current_node_name: str + :keyword new_node_name: The name of the target node for secondary replica or instance move. If + not specified, replica or instance is moved to a random node. Default value is None. + :paramtype new_node_name: str + :keyword ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :paramtype ignore_constraints: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '8.1'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "8.1". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "8.1")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_move_auxiliary_replica_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + current_node_name=current_node_name, + new_node_name=new_node_name, + ignore_constraints=ignore_constraints, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def create_repair_task( + self, + repair_task: JSON, + **kwargs: Any + ) -> JSON: + """Creates a new repair task. + + For clusters that have the Repair Manager Service configured, + this API provides a way to create repair tasks that run automatically or manually. + For repair tasks that run automatically, an appropriate repair executor + must be running for each repair action to run automatically. + These are currently only available in specially-configured Azure Cloud Services. + + To create a manual repair task, provide the set of impacted node names and the + expected impact. When the state of the created repair task changes to approved, + you can safely perform repair actions on those nodes. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task: Describes the repair task to be created or updated. + :type repair_task: JSON + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + repair_task = { + "Action": "str", # Required. The requested repair action. Must be specified + when the repair task is created, and is immutable once set. + "Description": "str", # Optional. A description of the purpose of the repair + task, or other informational details."nMay be set when the repair task is + created, and is immutable once set. + "Executor": "str", # Optional. The name of the repair executor. Must be + specified in Claimed and later states, and is immutable once set. + "ExecutorData": "str", # Optional. A data string that the repair executor + can use to store its internal state. + "Flags": 0, # Optional. A bitwise-OR of the following values, which gives + additional details about the status of the repair task."n"n"n* 1 - Cancellation + of the repair has been requested"n* 2 - Abort of the repair has been requested"n* + 4 - Approval of the repair was forced via client request. + "History": { + "ApprovedUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Approved state. + "ClaimedUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Claimed state. + "CompletedUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Completed state. + "CreatedUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Created state. + "ExecutingUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Executing state. + "PreparingHealthCheckEndUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The time when the repair task completed the health check in the + Preparing state. + "PreparingHealthCheckStartUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The time when the repair task started the health check in the + Preparing state. + "PreparingUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Preparing state. + "RestoringHealthCheckEndUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The time when the repair task completed the health check in the + Restoring state. + "RestoringHealthCheckStartUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The time when the repair task started the health check in the + Restoring state. + "RestoringUtcTimestamp": "2020-02-20 00:00:00" # Optional. The time + when the repair task entered the Restoring state. + }, + "Impact": { + Kind: Kind + }, + "PerformPreparingHealthCheck": bool, # Optional. A value to determine if + health checks will be performed when the repair task enters the Preparing state. + "PerformRestoringHealthCheck": bool, # Optional. A value to determine if + health checks will be performed when the repair task enters the Restoring state. + "PreparingHealthCheckState": "str", # Optional. The workflow state of the + health check when the repair task is in the Preparing state. Known values are: + "NotStarted", "InProgress", "Succeeded", "Skipped", "TimedOut". + "RestoringHealthCheckState": "str", # Optional. The workflow state of the + health check when the repair task is in the Restoring state. Known values are: + "NotStarted", "InProgress", "Succeeded", "Skipped", "TimedOut". + "ResultCode": 0, # Optional. A numeric value providing additional details + about the result of the repair task execution."nMay be specified in the Restoring + and later states, and is immutable once set. + "ResultDetails": "str", # Optional. A string providing additional details + about the result of the repair task execution."nMay be specified in the Restoring + and later states, and is immutable once set. + "ResultStatus": "str", # Optional. A value describing the overall result of + the repair task execution. Must be specified in the Restoring and later states, + and is immutable once set. Known values are: "Invalid", "Succeeded", "Cancelled", + "Interrupted", "Failed", "Pending". + "State": "str", # Required. The workflow state of the repair task. Valid + initial states are Created, Claimed, and Preparing. Known values are: "Invalid", + "Created", "Claimed", "Preparing", "Approved", "Executing", "Restoring", + "Completed". + "Target": { + Kind: Kind + }, + "TaskId": "str", # Required. The ID of the repair task. + "Version": "str" # Optional. The version of the repair task."nWhen creating + a new repair task, the version must be set to zero. When updating a repair + task,"nthe version is used for optimistic concurrency checks. If the version + is"nset to zero, the update will not check for write conflicts. If the version + is set to a non-zero value, then the"nupdate will only succeed if the actual + current version of the repair task matches this value. + } + + # response body for status code(s): 200 + response.json() == { + "Version": "str" # Required. The new version of the repair task. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = repair_task + + request = build_create_repair_task_request( + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def cancel_repair_task( + self, + repair_task_cancel_description: JSON, + **kwargs: Any + ) -> JSON: + """Requests the cancellation of the given repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task_cancel_description: Describes the repair task to be cancelled. + :type repair_task_cancel_description: JSON + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + repair_task_cancel_description = { + "RequestAbort": bool, # Optional. *True* if the repair should be stopped as + soon as possible even if it has already started executing. *False* if the repair + should be cancelled only if execution has not yet started. + "TaskId": "str", # Required. The ID of the repair task. + "Version": "str" # Optional. The current version number of the repair task. + If non-zero, then the request will only succeed if this value matches the actual + current version of the repair task. If zero, then no version check is performed. + } + + # response body for status code(s): 200 + response.json() == { + "Version": "str" # Required. The new version of the repair task. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = repair_task_cancel_description + + request = build_cancel_repair_task_request( + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def delete_repair_task( # pylint: disable=inconsistent-return-statements + self, + repair_task_delete_description: JSON, + **kwargs: Any + ) -> None: + """Deletes a completed repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task_delete_description: Describes the repair task to be deleted. + :type repair_task_delete_description: JSON + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + repair_task_delete_description = { + "TaskId": "str", # Required. The ID of the completed repair task to be + deleted. + "Version": "str" # Optional. The current version number of the repair task. + If non-zero, then the request will only succeed if this value matches the actual + current version of the repair task. If zero, then no version check is performed. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = repair_task_delete_description + + request = build_delete_repair_task_request( + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_repair_task_list( + self, + *, + task_id_filter: Optional[str] = None, + state_filter: Optional[int] = None, + executor_filter: Optional[str] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets a list of repair tasks matching the given filters. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :keyword task_id_filter: The repair task ID prefix to be matched. Default value is None. + :paramtype task_id_filter: str + :keyword state_filter: A bitwise-OR of the following values, specifying which task states + should be included in the result list. + + + * 1 - Created + * 2 - Claimed + * 4 - Preparing + * 8 - Approved + * 16 - Executing + * 32 - Restoring + * 64 - Completed. Default value is None. + :paramtype state_filter: int + :keyword executor_filter: The name of the repair executor whose claimed tasks should be + included in the list. Default value is None. + :paramtype executor_filter: str + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Action": "str", # Required. The requested repair action. Must be + specified when the repair task is created, and is immutable once set. + "Description": "str", # Optional. A description of the purpose of + the repair task, or other informational details."nMay be set when the repair + task is created, and is immutable once set. + "Executor": "str", # Optional. The name of the repair executor. Must + be specified in Claimed and later states, and is immutable once set. + "ExecutorData": "str", # Optional. A data string that the repair + executor can use to store its internal state. + "Flags": 0, # Optional. A bitwise-OR of the following values, which + gives additional details about the status of the repair task."n"n"n* 1 - + Cancellation of the repair has been requested"n* 2 - Abort of the repair has + been requested"n* 4 - Approval of the repair was forced via client request. + "History": { + "ApprovedUtcTimestamp": "2020-02-20 00:00:00", # Optional. + The time when the repair task entered the Approved state. + "ClaimedUtcTimestamp": "2020-02-20 00:00:00", # Optional. + The time when the repair task entered the Claimed state. + "CompletedUtcTimestamp": "2020-02-20 00:00:00", # Optional. + The time when the repair task entered the Completed state. + "CreatedUtcTimestamp": "2020-02-20 00:00:00", # Optional. + The time when the repair task entered the Created state. + "ExecutingUtcTimestamp": "2020-02-20 00:00:00", # Optional. + The time when the repair task entered the Executing state. + "PreparingHealthCheckEndUtcTimestamp": "2020-02-20 00:00:00", + # Optional. The time when the repair task completed the health check in + the Preparing state. + "PreparingHealthCheckStartUtcTimestamp": "2020-02-20 + 00:00:00", # Optional. The time when the repair task started the health + check in the Preparing state. + "PreparingUtcTimestamp": "2020-02-20 00:00:00", # Optional. + The time when the repair task entered the Preparing state. + "RestoringHealthCheckEndUtcTimestamp": "2020-02-20 00:00:00", + # Optional. The time when the repair task completed the health check in + the Restoring state. + "RestoringHealthCheckStartUtcTimestamp": "2020-02-20 + 00:00:00", # Optional. The time when the repair task started the health + check in the Restoring state. + "RestoringUtcTimestamp": "2020-02-20 00:00:00" # Optional. + The time when the repair task entered the Restoring state. + }, + "Impact": { + Kind: Kind + }, + "PerformPreparingHealthCheck": bool, # Optional. A value to + determine if health checks will be performed when the repair task enters the + Preparing state. + "PerformRestoringHealthCheck": bool, # Optional. A value to + determine if health checks will be performed when the repair task enters the + Restoring state. + "PreparingHealthCheckState": "str", # Optional. The workflow state + of the health check when the repair task is in the Preparing state. Known + values are: "NotStarted", "InProgress", "Succeeded", "Skipped", "TimedOut". + "RestoringHealthCheckState": "str", # Optional. The workflow state + of the health check when the repair task is in the Restoring state. Known + values are: "NotStarted", "InProgress", "Succeeded", "Skipped", "TimedOut". + "ResultCode": 0, # Optional. A numeric value providing additional + details about the result of the repair task execution."nMay be specified in + the Restoring and later states, and is immutable once set. + "ResultDetails": "str", # Optional. A string providing additional + details about the result of the repair task execution."nMay be specified in + the Restoring and later states, and is immutable once set. + "ResultStatus": "str", # Optional. A value describing the overall + result of the repair task execution. Must be specified in the Restoring and + later states, and is immutable once set. Known values are: "Invalid", + "Succeeded", "Cancelled", "Interrupted", "Failed", "Pending". + "State": "str", # Required. The workflow state of the repair task. + Valid initial states are Created, Claimed, and Preparing. Known values are: + "Invalid", "Created", "Claimed", "Preparing", "Approved", "Executing", + "Restoring", "Completed". + "Target": { + Kind: Kind + }, + "TaskId": "str", # Required. The ID of the repair task. + "Version": "str" # Optional. The version of the repair task."nWhen + creating a new repair task, the version must be set to zero. When updating a + repair task,"nthe version is used for optimistic concurrency checks. If the + version is"nset to zero, the update will not check for write conflicts. If + the version is set to a non-zero value, then the"nupdate will only succeed if + the actual current version of the repair task matches this value. + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_repair_task_list_request( + api_version=api_version, + task_id_filter=task_id_filter, + state_filter=state_filter, + executor_filter=executor_filter, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def force_approve_repair_task( + self, + repair_task_approve_description: JSON, + **kwargs: Any + ) -> JSON: + """Forces the approval of the given repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task_approve_description: Describes the repair task to be approved. + :type repair_task_approve_description: JSON + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + repair_task_approve_description = { + "TaskId": "str", # Required. The ID of the repair task. + "Version": "str" # Optional. The current version number of the repair task. + If non-zero, then the request will only succeed if this value matches the actual + current version of the repair task. If zero, then no version check is performed. + } + + # response body for status code(s): 200 + response.json() == { + "Version": "str" # Required. The new version of the repair task. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = repair_task_approve_description + + request = build_force_approve_repair_task_request( + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def update_repair_task_health_policy( + self, + repair_task_update_health_policy_description: JSON, + **kwargs: Any + ) -> JSON: + """Updates the health policy of the given repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task_update_health_policy_description: Describes the repair task healthy policy + to be updated. + :type repair_task_update_health_policy_description: JSON + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + repair_task_update_health_policy_description = { + "PerformPreparingHealthCheck": bool, # Optional. A boolean indicating if + health check is to be performed in the Preparing stage of the repair task. If not + specified the existing value should not be altered. Otherwise, specify the + desired new value. + "PerformRestoringHealthCheck": bool, # Optional. A boolean indicating if + health check is to be performed in the Restoring stage of the repair task. If not + specified the existing value should not be altered. Otherwise, specify the + desired new value. + "TaskId": "str", # Required. The ID of the repair task to be updated. + "Version": "str" # Optional. The current version number of the repair task. + If non-zero, then the request will only succeed if this value matches the actual + current value of the repair task. If zero, then no version check is performed. + } + + # response body for status code(s): 200 + response.json() == { + "Version": "str" # Required. The new version of the repair task. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = repair_task_update_health_policy_description + + request = build_update_repair_task_health_policy_request( + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def update_repair_execution_state( + self, + repair_task: JSON, + **kwargs: Any + ) -> JSON: + """Updates the execution state of a repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task: Describes the repair task to be created or updated. + :type repair_task: JSON + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + repair_task = { + "Action": "str", # Required. The requested repair action. Must be specified + when the repair task is created, and is immutable once set. + "Description": "str", # Optional. A description of the purpose of the repair + task, or other informational details."nMay be set when the repair task is + created, and is immutable once set. + "Executor": "str", # Optional. The name of the repair executor. Must be + specified in Claimed and later states, and is immutable once set. + "ExecutorData": "str", # Optional. A data string that the repair executor + can use to store its internal state. + "Flags": 0, # Optional. A bitwise-OR of the following values, which gives + additional details about the status of the repair task."n"n"n* 1 - Cancellation + of the repair has been requested"n* 2 - Abort of the repair has been requested"n* + 4 - Approval of the repair was forced via client request. + "History": { + "ApprovedUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Approved state. + "ClaimedUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Claimed state. + "CompletedUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Completed state. + "CreatedUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Created state. + "ExecutingUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Executing state. + "PreparingHealthCheckEndUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The time when the repair task completed the health check in the + Preparing state. + "PreparingHealthCheckStartUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The time when the repair task started the health check in the + Preparing state. + "PreparingUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Preparing state. + "RestoringHealthCheckEndUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The time when the repair task completed the health check in the + Restoring state. + "RestoringHealthCheckStartUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The time when the repair task started the health check in the + Restoring state. + "RestoringUtcTimestamp": "2020-02-20 00:00:00" # Optional. The time + when the repair task entered the Restoring state. + }, + "Impact": { + Kind: Kind + }, + "PerformPreparingHealthCheck": bool, # Optional. A value to determine if + health checks will be performed when the repair task enters the Preparing state. + "PerformRestoringHealthCheck": bool, # Optional. A value to determine if + health checks will be performed when the repair task enters the Restoring state. + "PreparingHealthCheckState": "str", # Optional. The workflow state of the + health check when the repair task is in the Preparing state. Known values are: + "NotStarted", "InProgress", "Succeeded", "Skipped", "TimedOut". + "RestoringHealthCheckState": "str", # Optional. The workflow state of the + health check when the repair task is in the Restoring state. Known values are: + "NotStarted", "InProgress", "Succeeded", "Skipped", "TimedOut". + "ResultCode": 0, # Optional. A numeric value providing additional details + about the result of the repair task execution."nMay be specified in the Restoring + and later states, and is immutable once set. + "ResultDetails": "str", # Optional. A string providing additional details + about the result of the repair task execution."nMay be specified in the Restoring + and later states, and is immutable once set. + "ResultStatus": "str", # Optional. A value describing the overall result of + the repair task execution. Must be specified in the Restoring and later states, + and is immutable once set. Known values are: "Invalid", "Succeeded", "Cancelled", + "Interrupted", "Failed", "Pending". + "State": "str", # Required. The workflow state of the repair task. Valid + initial states are Created, Claimed, and Preparing. Known values are: "Invalid", + "Created", "Claimed", "Preparing", "Approved", "Executing", "Restoring", + "Completed". + "Target": { + Kind: Kind + }, + "TaskId": "str", # Required. The ID of the repair task. + "Version": "str" # Optional. The version of the repair task."nWhen creating + a new repair task, the version must be set to zero. When updating a repair + task,"nthe version is used for optimistic concurrency checks. If the version + is"nset to zero, the update will not check for write conflicts. If the version + is set to a non-zero value, then the"nupdate will only succeed if the actual + current version of the repair task matches this value. + } + + # response body for status code(s): 200 + response.json() == { + "Version": "str" # Required. The new version of the repair task. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = repair_task + + request = build_update_repair_execution_state_request( + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_replica_info_list( + self, + partition_id: str, + *, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the information about replicas of a Service Fabric service partition. + + The GetReplicas endpoint returns information about the replicas of the specified partition. The + response includes the ID, role, status, health, node name, uptime, and other details about the + replica. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "Address": "str", # Optional. The address the replica is + listening on. + "HealthState": "str", # Optional. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "LastInBuildDurationInSeconds": "str", # Optional. The last + in build duration of the replica in seconds. + "NodeName": "str", # Optional. The name of a Service Fabric + node. + "ReplicaStatus": "str", # Optional. The status of a replica + of a service. Known values are: "Invalid", "InBuild", "Standby", "Ready", + "Down", "Dropped". + ServiceKind: ServiceKind + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_replica_info_list_request( + partition_id=partition_id, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_replica_info( + self, + partition_id: str, + replica_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[JSON]: + """Gets the information about a replica of a Service Fabric partition. + + The response includes the ID, role, status, health, node name, uptime, and other details about + the replica. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Address": "str", # Optional. The address the replica is listening on. + "HealthState": "str", # Optional. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "LastInBuildDurationInSeconds": "str", # Optional. The last in build + duration of the replica in seconds. + "NodeName": "str", # Optional. The name of a Service Fabric node. + "ReplicaStatus": "str", # Optional. The status of a replica of a service. + Known values are: "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". + ServiceKind: ServiceKind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + + request = build_get_replica_info_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace_async + async def get_replica_health( + self, + partition_id: str, + replica_id: str, + *, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric stateful service replica or stateless service instance. + + Gets the health of a Service Fabric replica. + Use EventsHealthStateFilter to filter the collection of health events reported on the replica + based on the health state. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "PartitionId": str, # Optional. Id of the partition to which this replica + belongs. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ], + ServiceKind: ReplicaHealth + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_replica_health_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_replica_health_using_policy( + self, + partition_id: str, + replica_id: str, + application_health_policy: Optional[JSON] = None, + *, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric stateful service replica or stateless service instance + using the specified policy. + + Gets the health of a Service Fabric stateful service replica or stateless service instance. + Use EventsHealthStateFilter to filter the collection of health events reported on the cluster + based on the health state. + Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the + health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The + rest of the fields are ignored while evaluating the health of the replica. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: JSON + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_health_policy = { + "ConsiderWarningAsError": bool, # Optional. Indicates whether warnings are + treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. The + maximum allowed percentage of unhealthy partitions per service. Allowed + values are Byte values from zero to 100"n"nThe percentage represents the + maximum tolerated percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe computation rounds up to + tolerate one failure on small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. The + maximum allowed percentage of unhealthy replicas per partition. Allowed + values are Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas over + the total number of replicas in the partition."nThe computation rounds up to + tolerate one failure on small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum allowed + percentage of unhealthy services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated percentage of + services that can be unhealthy before the application is considered in + error."nIf the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific service type over the total + number of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default percentage is + zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The maximum + allowed percentage of unhealthy deployed applications. Allowed values are Byte + values from zero to 100."nThe percentage represents the maximum tolerated + percentage of deployed applications that can be unhealthy before the application + is considered in error."nThis is calculated by dividing the number of unhealthy + deployed applications over the number of nodes where the application is currently + deployed on in the cluster."nThe computation rounds up to tolerate one failure on + small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service type health + policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to 100"n"nThe + percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error."nIf + the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy partitions over the + total number of partitions in the service."nThe computation rounds up + to tolerate one failure on small numbers of partitions. Default + percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to 100."n"nThe + percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at least one + unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition."nThe computation + rounds up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. Allowed values are + Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of services that can be unhealthy before + the application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the number of + unhealthy services of the specific service type over the total number + of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default + percentage is zero. + } + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "PartitionId": str, # Optional. Id of the partition to which this replica + belongs. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ], + ServiceKind: ReplicaHealth + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if application_health_policy is not None: + _json = application_health_policy + else: + _json = None + + request = build_get_replica_health_using_policy_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def report_replica_health( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + replica_id: str, + health_information: JSON, + *, + service_kind: str = "Stateful", + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric replica. + + Reports health state of the specified Service Fabric replica. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway Replica, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetReplicaHealth and check that + the report appears in the HealthEvents section. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: JSON + :keyword service_kind: The kind of service replica (Stateless or Stateful) for which the health + is being reported. Following are the possible values. Known values are: "Stateless" or + "Stateful". Default value is "Stateful". + :paramtype service_kind: str + :keyword immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :paramtype immediate: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + health_information = { + "Description": "str", # Optional. The description of the health information. + It represents free text used to add human readable information about the + report."nThe maximum string length for the description is 4096 characters."nIf + the provided string is longer, it will be automatically truncated."nWhen + truncated, the last characters of the description contain a marker "[Truncated]", + and total string size is 4096 characters."nThe presence of the marker indicates + to users that truncation occurred."nNote that when truncated, the description has + less than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID which identifies the + health report and can be used to find more detailed information about a specific + health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Property": "str", # Required. The property of the health information. An + entity can have health reports for different properties."nThe property is a + string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report."nFor example, a reporter + with SourceId "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same reporter + can monitor the node connectivity, so it can report a property "Connectivity" on + the same node."nIn the health store, these reports are treated as separate health + events for the specified node."n"nTogether with the SourceId, the property + uniquely identifies the health information. + "RemoveWhenExpired": bool, # Optional. Value that indicates whether the + report is removed from health store when it expires."nIf set to true, the report + is removed from the health store after it expires."nIf set to false, the report + is treated as an error when expired. The value of this property is false by + default."nWhen clients report periodically, they should set RemoveWhenExpired + false (default)."nThis way, if the reporter has issues (e.g. deadlock) and can't + report, the entity is evaluated at error when the health report expires."nThis + flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for this health + report as a numeric string."nThe report sequence number is used by the health + store to detect stale reports."nIf not specified, a sequence number is + auto-generated by the health client when a report is added. + "SourceId": "str", # Required. The source name that identifies the + client/watchdog/system component that generated the health information. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The duration for + which this health report is valid. This field uses ISO8601 format for specifying + the duration."nWhen clients report periodically, they should send reports with + higher frequency than time to live."nIf clients report on transition, they can + set the time to live to infinite."nWhen time to live expires, the health event + that contains the health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = health_information + + request = build_report_replica_health_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + content_type=content_type, + json=_json, + service_kind=service_kind, + immediate=immediate, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_deployed_service_replica_info_list( + self, + node_name: str, + application_id: str, + *, + partition_id: Optional[str] = None, + service_manifest_name: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[List[JSON]]: + """Gets the list of replicas deployed on a Service Fabric node. + + Gets the list containing the information about replicas deployed on a Service Fabric node. The + information include partition ID, replica ID, status of the replica, name of the service, name + of the service type, and other information. Use PartitionId or ServiceManifestName query + parameters to return information about the deployed replicas matching the specified values for + those parameters. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword partition_id: The identity of the partition. Default value is None. + :paramtype partition_id: str + :keyword service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. Default value is None. + :paramtype service_manifest_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Address": "str", # Optional. The last address returned by the + replica in Open or ChangeRole. + "CodePackageName": "str", # Optional. The name of the code package + that hosts this replica. + "HostProcessId": "str", # Optional. Host process ID of the process + that is hosting the replica. This will be zero if the replica is down. In + hyper-v containers this host process ID will be from different kernel. + "PartitionId": str, # Optional. An internal ID used by Service + Fabric to uniquely identify a partition. This is a randomly generated GUID + when the service was created. The partition ID is unique and does not change + for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + "ReplicaStatus": "str", # Optional. The status of a replica of a + service. Known values are: "Invalid", "InBuild", "Standby", "Ready", "Down", + "Dropped". + "ServiceManifestName": "str", # Optional. The name of the service + manifest in which this service type is defined. + "ServiceName": "str", # Optional. The full name of the service with + 'fabric:' URI scheme. + "ServicePackageActivationId": "str", # Optional. The ActivationId of + a deployed service package. If ServicePackageActivationMode specified at the + time of creating the service"nis 'SharedProcess' (or if it is not specified, + in which case it defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + "ServiceTypeName": "str", # Optional. Name of the service type as + specified in the service manifest. + ServiceKind: ServiceKind + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[List[JSON]]] + + + request = build_get_deployed_service_replica_info_list_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + partition_id=partition_id, + service_manifest_name=service_manifest_name, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace_async + async def get_deployed_service_replica_detail_info( + self, + node_name: str, + partition_id: str, + replica_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the details of replica deployed on a Service Fabric node. + + Gets the details of the replica deployed on a Service Fabric node. The information includes + service kind, service name, current service operation, current service operation start date + time, partition ID, replica/instance ID, reported load, and other information. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "CurrentServiceOperation": "str", # Optional. Specifies the current active + life-cycle operation on a stateful service replica or stateless service instance. + Known values are: "Unknown", "None", "Open", "ChangeRole", "Close", "Abort". + "CurrentServiceOperationStartTimeUtc": "2020-02-20 00:00:00", # Optional. + The start time of the current service operation in UTC format. + "PartitionId": str, # Optional. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the lifetime of + the service. If the same service was deleted and recreated the IDs of its + partitions would be different. + "ReportedLoad": [ + { + "CurrentValue": "str", # Optional. The double value of the + load for the metric. + "LastReportedUtc": "2020-02-20 00:00:00", # Optional. The + UTC time when the load is reported. + "Name": "str", # Optional. The name of the metric. + "Value": 0 # Optional. The value of the load for the metric. + In future releases of Service Fabric this parameter will be deprecated in + favor of CurrentValue. + } + ], + "ServiceName": "str", # Optional. Full hierarchical name of the service in + URI format starting with ``fabric:``. + ServiceKind: ServiceKind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_deployed_service_replica_detail_info_request( + node_name=node_name, + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_deployed_service_replica_detail_info_by_partition_id( + self, + node_name: str, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the details of replica deployed on a Service Fabric node. + + Gets the details of the replica deployed on a Service Fabric node. The information includes + service kind, service name, current service operation, current service operation start date + time, partition ID, replica/instance ID, reported load, and other information. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "CurrentServiceOperation": "str", # Optional. Specifies the current active + life-cycle operation on a stateful service replica or stateless service instance. + Known values are: "Unknown", "None", "Open", "ChangeRole", "Close", "Abort". + "CurrentServiceOperationStartTimeUtc": "2020-02-20 00:00:00", # Optional. + The start time of the current service operation in UTC format. + "PartitionId": str, # Optional. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the lifetime of + the service. If the same service was deleted and recreated the IDs of its + partitions would be different. + "ReportedLoad": [ + { + "CurrentValue": "str", # Optional. The double value of the + load for the metric. + "LastReportedUtc": "2020-02-20 00:00:00", # Optional. The + UTC time when the load is reported. + "Name": "str", # Optional. The name of the metric. + "Value": 0 # Optional. The value of the load for the metric. + In future releases of Service Fabric this parameter will be deprecated in + favor of CurrentValue. + } + ], + "ServiceName": "str", # Optional. Full hierarchical name of the service in + URI format starting with ``fabric:``. + ServiceKind: ServiceKind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_deployed_service_replica_detail_info_by_partition_id_request( + node_name=node_name, + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def restart_replica( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + partition_id: str, + replica_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Restarts a service replica of a persisted service running on a node. + + Restarts a service replica of a persisted service running on a node. Warning - There are no + safety checks performed when this API is used. Incorrect use of this API can lead to + availability loss for stateful services. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_restart_replica_request( + node_name=node_name, + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def remove_replica( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + partition_id: str, + replica_id: str, + *, + force_remove: Optional[bool] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Removes a service replica running on a node. + + This API simulates a Service Fabric replica failure by removing a replica from a Service Fabric + cluster. The removal closes the replica, transitions the replica to the role None, and then + removes all of the state information of the replica from the cluster. This API tests the + replica state removal path, and simulates the report fault permanent path through client APIs. + Warning - There are no safety checks performed when this API is used. Incorrect use of this API + can lead to data loss for stateful services. In addition, the forceRemove flag impacts all + other replicas hosted in the same process. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :keyword force_remove: Remove a Service Fabric application or service forcefully without going + through the graceful shutdown sequence. This parameter can be used to forcefully delete an + application or service for which delete is timing out due to issues in the service code that + prevents graceful close of replicas. Default value is None. + :paramtype force_remove: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_remove_replica_request( + node_name=node_name, + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + force_remove=force_remove, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_deployed_service_package_info_list( + self, + node_name: str, + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets the list of service packages deployed on a Service Fabric node. + + Returns the information about the service packages deployed on a Service Fabric node for the + given application. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Name": "str", # Optional. The name of the service package as + specified in the service manifest. + "ServicePackageActivationId": "str", # Optional. The ActivationId of + a deployed service package. If ServicePackageActivationMode specified at the + time of creating the service"nis 'SharedProcess' (or if it is not specified, + in which case it defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + "Status": "str", # Optional. Specifies the status of a deployed + application or service package on a Service Fabric node. Known values are: + "Invalid", "Downloading", "Activating", "Active", "Upgrading", + "Deactivating", "RanToCompletion", "Failed". + "Version": "str" # Optional. The version of the service package + specified in service manifest. + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_deployed_service_package_info_list_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def get_deployed_service_package_info_list_by_name( + self, + node_name: str, + application_id: str, + service_package_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[List[JSON]]: + """Gets the list of service packages deployed on a Service Fabric node matching exactly the + specified name. + + Returns the information about the service packages deployed on a Service Fabric node for the + given application. These results are of service packages whose name match exactly the service + package name specified as the parameter. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Name": "str", # Optional. The name of the service package as + specified in the service manifest. + "ServicePackageActivationId": "str", # Optional. The ActivationId of + a deployed service package. If ServicePackageActivationMode specified at the + time of creating the service"nis 'SharedProcess' (or if it is not specified, + in which case it defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + "Status": "str", # Optional. Specifies the status of a deployed + application or service package on a Service Fabric node. Known values are: + "Invalid", "Downloading", "Activating", "Active", "Upgrading", + "Deactivating", "RanToCompletion", "Failed". + "Version": "str" # Optional. The version of the service package + specified in service manifest. + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[List[JSON]]] + + + request = build_get_deployed_service_package_info_list_by_name_request( + node_name=node_name, + application_id=application_id, + service_package_name=service_package_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace_async + async def get_deployed_service_package_health( + self, + node_name: str, + application_id: str, + service_package_name: str, + *, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the information about health of a service package for a specific application deployed for + a Service Fabric node and application. + + Gets the information about health of a service package for a specific application deployed on a + Service Fabric node. Use EventsHealthStateFilter to optionally filter for the collection of + HealthEvent objects reported on the deployed service package based on health state. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "ApplicationName": "str", # Optional. The name of the application, including + the 'fabric:' URI scheme. + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "NodeName": "str", # Optional. Name of the node where this service package + is deployed. + "ServiceManifestName": "str", # Optional. Name of the service manifest. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_deployed_service_package_health_request( + node_name=node_name, + application_id=application_id, + service_package_name=service_package_name, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_deployed_service_package_health_using_policy( + self, + node_name: str, + application_id: str, + service_package_name: str, + application_health_policy: Optional[JSON] = None, + *, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the information about health of service package for a specific application deployed on a + Service Fabric node using the specified policy. + + Gets the information about health of a service package for a specific application deployed on a + Service Fabric node. using the specified policy. Use EventsHealthStateFilter to optionally + filter for the collection of HealthEvent objects reported on the deployed service package based + on health state. Use ApplicationHealthPolicy to optionally override the health policies used to + evaluate the health. This API only uses 'ConsiderWarningAsError' field of the + ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the + deployed service package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: JSON + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_health_policy = { + "ConsiderWarningAsError": bool, # Optional. Indicates whether warnings are + treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. The + maximum allowed percentage of unhealthy partitions per service. Allowed + values are Byte values from zero to 100"n"nThe percentage represents the + maximum tolerated percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe computation rounds up to + tolerate one failure on small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. The + maximum allowed percentage of unhealthy replicas per partition. Allowed + values are Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas over + the total number of replicas in the partition."nThe computation rounds up to + tolerate one failure on small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum allowed + percentage of unhealthy services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated percentage of + services that can be unhealthy before the application is considered in + error."nIf the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific service type over the total + number of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default percentage is + zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The maximum + allowed percentage of unhealthy deployed applications. Allowed values are Byte + values from zero to 100."nThe percentage represents the maximum tolerated + percentage of deployed applications that can be unhealthy before the application + is considered in error."nThis is calculated by dividing the number of unhealthy + deployed applications over the number of nodes where the application is currently + deployed on in the cluster."nThe computation rounds up to tolerate one failure on + small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service type health + policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to 100"n"nThe + percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error."nIf + the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy partitions over the + total number of partitions in the service."nThe computation rounds up + to tolerate one failure on small numbers of partitions. Default + percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to 100."n"nThe + percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at least one + unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition."nThe computation + rounds up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. Allowed values are + Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of services that can be unhealthy before + the application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the number of + unhealthy services of the specific service type over the total number + of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default + percentage is zero. + } + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "ApplicationName": "str", # Optional. The name of the application, including + the 'fabric:' URI scheme. + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "NodeName": "str", # Optional. Name of the node where this service package + is deployed. + "ServiceManifestName": "str", # Optional. Name of the service manifest. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if application_health_policy is not None: + _json = application_health_policy + else: + _json = None + + request = build_get_deployed_service_package_health_using_policy_request( + node_name=node_name, + application_id=application_id, + service_package_name=service_package_name, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def report_deployed_service_package_health( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + application_id: str, + service_package_name: str, + health_information: JSON, + *, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric deployed service package. + + Reports health state of the service package of the application deployed on a Service Fabric + node. The report must contain the information about the source of the health report and + property on which it is reported. + The report is sent to a Service Fabric gateway Service, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, get deployed service package health + and check that the report appears in the HealthEvents section. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: JSON + :keyword immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :paramtype immediate: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + health_information = { + "Description": "str", # Optional. The description of the health information. + It represents free text used to add human readable information about the + report."nThe maximum string length for the description is 4096 characters."nIf + the provided string is longer, it will be automatically truncated."nWhen + truncated, the last characters of the description contain a marker "[Truncated]", + and total string size is 4096 characters."nThe presence of the marker indicates + to users that truncation occurred."nNote that when truncated, the description has + less than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID which identifies the + health report and can be used to find more detailed information about a specific + health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Property": "str", # Required. The property of the health information. An + entity can have health reports for different properties."nThe property is a + string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report."nFor example, a reporter + with SourceId "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same reporter + can monitor the node connectivity, so it can report a property "Connectivity" on + the same node."nIn the health store, these reports are treated as separate health + events for the specified node."n"nTogether with the SourceId, the property + uniquely identifies the health information. + "RemoveWhenExpired": bool, # Optional. Value that indicates whether the + report is removed from health store when it expires."nIf set to true, the report + is removed from the health store after it expires."nIf set to false, the report + is treated as an error when expired. The value of this property is false by + default."nWhen clients report periodically, they should set RemoveWhenExpired + false (default)."nThis way, if the reporter has issues (e.g. deadlock) and can't + report, the entity is evaluated at error when the health report expires."nThis + flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for this health + report as a numeric string."nThe report sequence number is used by the health + store to detect stale reports."nIf not specified, a sequence number is + auto-generated by the health client when a report is added. + "SourceId": "str", # Required. The source name that identifies the + client/watchdog/system component that generated the health information. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The duration for + which this health report is valid. This field uses ISO8601 format for specifying + the duration."nWhen clients report periodically, they should send reports with + higher frequency than time to live."nIf clients report on transition, they can + set the time to live to infinite."nWhen time to live expires, the health event + that contains the health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = health_information + + request = build_report_deployed_service_package_health_request( + node_name=node_name, + application_id=application_id, + service_package_name=service_package_name, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def deploy_service_package_to_node( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + deploy_service_package_to_node_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Downloads all of the code packages associated with specified service manifest on the specified + node. + + This API provides a way to download code packages including the container images on a specific + node outside of the normal application deployment and upgrade path. This is useful for the + large code packages and container images to be present on the node before the actual + application deployment and upgrade, thus significantly reducing the total time required for the + deployment or upgrade. + + :param node_name: The name of the node. + :type node_name: str + :param deploy_service_package_to_node_description: Describes information for deploying a + service package to a Service Fabric node. + :type deploy_service_package_to_node_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + deploy_service_package_to_node_description = { + "ApplicationTypeName": "str", # Required. The application type name as + defined in the application manifest. + "ApplicationTypeVersion": "str", # Required. The version of the application + type as defined in the application manifest. + "NodeName": "str", # Required. The name of a Service Fabric node. + "PackageSharingPolicy": [ + { + "PackageSharingScope": "str", # Optional. Represents the + scope for PackageSharingPolicy. This is specified during + DeployServicePackageToNode operation. Known values are: "None", "All", + "Code", "Config", "Data". + "SharedPackageName": "str" # Optional. The name of code, + configuration or data package that should be shared. + } + ], + "ServiceManifestName": "str" # Required. The name of service manifest whose + packages need to be downloaded. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = deploy_service_package_to_node_description + + request = build_deploy_service_package_to_node_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_deployed_code_package_info_list( + self, + node_name: str, + application_id: str, + *, + service_manifest_name: Optional[str] = None, + code_package_name: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets the list of code packages deployed on a Service Fabric node. + + Gets the list of code packages deployed on a Service Fabric node for the given application. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. Default value is None. + :paramtype service_manifest_name: str + :keyword code_package_name: The name of code package specified in service manifest registered + as part of an application type in a Service Fabric cluster. Default value is None. + :paramtype code_package_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "HostIsolationMode": "str", # Optional. Specifies the isolation mode + of main entry point of a code package when it's host type is ContainerHost. + This is specified as part of container host policies in application manifest + while importing service manifest. Known values are: "None", "Process", + "HyperV". + "HostType": "str", # Optional. Specifies the type of host for main + entry point of a code package as specified in service manifest. Known values + are: "Invalid", "ExeHost", "ContainerHost". + "MainEntryPoint": { + "CodePackageEntryPointStatistics": { + "ActivationCount": "str", # Optional. Number of + times the entry point has run. + "ActivationFailureCount": "str", # Optional. Number + of times the entry point failed to run. + "ContinuousActivationFailureCount": "str", # + Optional. Number of times the entry point continuously failed to run. + "ContinuousExitFailureCount": "str", # Optional. + Number of times the entry point continuously failed to exit + gracefully. + "ExitCount": "str", # Optional. Number of times the + entry point finished running. + "ExitFailureCount": "str", # Optional. Number of + times the entry point failed to exit gracefully. + "LastActivationTime": "2020-02-20 00:00:00", # + Optional. The last time (in UTC) when Service Fabric attempted to run + the entry point. + "LastExitCode": "str", # Optional. The last exit + code of the entry point. + "LastExitTime": "2020-02-20 00:00:00", # Optional. + The last time (in UTC) when the entry point finished running. + "LastSuccessfulActivationTime": "2020-02-20 + 00:00:00", # Optional. The last time (in UTC) when the entry point + ran successfully. + "LastSuccessfulExitTime": "2020-02-20 00:00:00" # + Optional. The last time (in UTC) when the entry point finished + running gracefully. + }, + "ContainerId": "str", # Optional. The container ID of the + entry point. Only valid for container hosts. + "EntryPointLocation": "str", # Optional. The location of + entry point executable on the node. + "InstanceId": "str", # Optional. The instance ID for current + running entry point. For a code package setup entry point (if specified) + runs first and after it finishes main entry point is started. Each time + entry point executable is run, its instance id will change. + "NextActivationTime": "2020-02-20 00:00:00", # Optional. The + time (in UTC) when the entry point executable will be run next. + "ProcessId": "str", # Optional. The process ID of the entry + point. + "RunAsUserName": "str", # Optional. The user name under + which entry point executable is run on the node. + "Status": "str" # Optional. Specifies the status of the code + package entry point deployed on a Service Fabric node. Known values are: + "Invalid", "Pending", "Starting", "Started", "Stopping", "Stopped". + }, + "Name": "str", # Optional. The name of the code package. + "RunFrequencyInterval": "str", # Optional. The interval at which + code package is run. This is used for periodic code package. + "ServiceManifestName": "str", # Optional. The name of service + manifest that specified this code package. + "ServicePackageActivationId": "str", # Optional. The ActivationId of + a deployed service package. If ServicePackageActivationMode specified at the + time of creating the service"nis 'SharedProcess' (or if it is not specified, + in which case it defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + "SetupEntryPoint": { + "CodePackageEntryPointStatistics": { + "ActivationCount": "str", # Optional. Number of + times the entry point has run. + "ActivationFailureCount": "str", # Optional. Number + of times the entry point failed to run. + "ContinuousActivationFailureCount": "str", # + Optional. Number of times the entry point continuously failed to run. + "ContinuousExitFailureCount": "str", # Optional. + Number of times the entry point continuously failed to exit + gracefully. + "ExitCount": "str", # Optional. Number of times the + entry point finished running. + "ExitFailureCount": "str", # Optional. Number of + times the entry point failed to exit gracefully. + "LastActivationTime": "2020-02-20 00:00:00", # + Optional. The last time (in UTC) when Service Fabric attempted to run + the entry point. + "LastExitCode": "str", # Optional. The last exit + code of the entry point. + "LastExitTime": "2020-02-20 00:00:00", # Optional. + The last time (in UTC) when the entry point finished running. + "LastSuccessfulActivationTime": "2020-02-20 + 00:00:00", # Optional. The last time (in UTC) when the entry point + ran successfully. + "LastSuccessfulExitTime": "2020-02-20 00:00:00" # + Optional. The last time (in UTC) when the entry point finished + running gracefully. + }, + "ContainerId": "str", # Optional. The container ID of the + entry point. Only valid for container hosts. + "EntryPointLocation": "str", # Optional. The location of + entry point executable on the node. + "InstanceId": "str", # Optional. The instance ID for current + running entry point. For a code package setup entry point (if specified) + runs first and after it finishes main entry point is started. Each time + entry point executable is run, its instance id will change. + "NextActivationTime": "2020-02-20 00:00:00", # Optional. The + time (in UTC) when the entry point executable will be run next. + "ProcessId": "str", # Optional. The process ID of the entry + point. + "RunAsUserName": "str", # Optional. The user name under + which entry point executable is run on the node. + "Status": "str" # Optional. Specifies the status of the code + package entry point deployed on a Service Fabric node. Known values are: + "Invalid", "Pending", "Starting", "Started", "Stopping", "Stopped". + }, + "Status": "str", # Optional. Specifies the status of a deployed + application or service package on a Service Fabric node. Known values are: + "Invalid", "Downloading", "Activating", "Active", "Upgrading", + "Deactivating", "RanToCompletion", "Failed". + "Version": "str" # Optional. The version of the code package + specified in service manifest. + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_deployed_code_package_info_list_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def restart_deployed_code_package( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + application_id: str, + restart_deployed_code_package_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Restarts a code package deployed on a Service Fabric node in a cluster. + + Restarts a code package deployed on a Service Fabric node in a cluster. This aborts the code + package process, which will restart all the user service replicas hosted in that process. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param restart_deployed_code_package_description: Describes the deployed code package on + Service Fabric node to restart. + :type restart_deployed_code_package_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + restart_deployed_code_package_description = { + "CodePackageInstanceId": "str", # Required. The instance ID for currently + running entry point. For a code package setup entry point (if specified) runs + first and after it finishes main entry point is started."nEach time entry point + executable is run, its instance ID will change. If 0 is passed in as the code + package instance ID, the API will restart the code package with whatever instance + ID it is currently running."nIf an instance ID other than 0 is passed in, the API + will restart the code package only if the current Instance ID matches the passed + in instance ID."nNote, passing in the exact instance ID (not 0) in the API is + safer, because if ensures at most one restart of the code package. + "CodePackageName": "str", # Required. The name of the code package defined + in the service manifest. + "ServiceManifestName": "str", # Required. The name of service manifest that + specified this code package. + "ServicePackageActivationId": "str" # Optional. The ActivationId of a + deployed service package. If ServicePackageActivationMode specified at the time + of creating the service"nis 'SharedProcess' (or if it is not specified, in which + case it defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = restart_deployed_code_package_description + + request = build_restart_deployed_code_package_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_container_logs_deployed_on_node( + self, + node_name: str, + application_id: str, + *, + service_manifest_name: str, + code_package_name: str, + tail: Optional[str] = None, + previous: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the container logs for container deployed on a Service Fabric node. + + Gets the container logs for container deployed on a Service Fabric node for the given code + package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. + :paramtype service_manifest_name: str + :keyword code_package_name: The name of code package specified in service manifest registered + as part of an application type in a Service Fabric cluster. + :paramtype code_package_name: str + :keyword tail: Number of lines to show from the end of the logs. Default is 100. 'all' to show + the complete logs. + :paramtype tail: str + :keyword previous: Specifies whether to get container logs from exited/dead containers of the + code package instance. Default value is False. + :paramtype previous: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Content": "str" # Optional. Container logs. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_container_logs_deployed_on_node_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, + tail=tail, + previous=previous, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def invoke_container_api( + self, + node_name: str, + application_id: str, + container_api_request_body: JSON, + *, + service_manifest_name: str, + code_package_name: str, + code_package_instance_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Invoke container API on a container deployed on a Service Fabric node. + + Invoke container API on a container deployed on a Service Fabric node for the given code + package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param container_api_request_body: Parameters for making container API call. + :type container_api_request_body: JSON + :keyword service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. + :paramtype service_manifest_name: str + :keyword code_package_name: The name of code package specified in service manifest registered + as part of an application type in a Service Fabric cluster. + :paramtype code_package_name: str + :keyword code_package_instance_id: ID that uniquely identifies a code package instance deployed + on a service fabric node. + :paramtype code_package_instance_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + container_api_request_body = { + "Body": "str", # Optional. HTTP request body of container REST API. + "Content-Type": "str", # Optional. Content type of container REST API + request, defaults to "application/json". + "HttpVerb": "str", # Optional. HTTP verb of container REST API, defaults to + "GET". + "UriPath": "str" # Required. URI path of container REST API. + } + + # response body for status code(s): 200 + response.json() == { + "ContainerApiResult": { + "Body": "str", # Optional. container API result body. + "Content-Encoding": "str", # Optional. HTTP content encoding. + "Content-Type": "str", # Optional. HTTP content type. + "Status": 0 # Required. HTTP status code returned by the target + container API. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = container_api_request_body + + request = build_invoke_container_api_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + content_type=content_type, + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, + code_package_instance_id=code_package_instance_id, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def create_compose_deployment( # pylint: disable=inconsistent-return-statements + self, + create_compose_deployment_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates a Service Fabric compose deployment. + + Compose is a file format that describes multi-container applications. This API allows deploying + container based applications defined in compose format in a Service Fabric cluster. Once the + deployment is created, its status can be tracked via the ``GetComposeDeploymentStatus`` API. + + :param create_compose_deployment_description: Describes the compose deployment that needs to be + created. + :type create_compose_deployment_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '"6.0-preview'. Default value is "6.0-preview". Note that overriding this default value may + result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + create_compose_deployment_description = { + "ComposeFileContent": "str", # Required. The content of the compose file + that describes the deployment to create. + "DeploymentName": "str", # Required. The name of the deployment. + "RegistryCredential": { + "PasswordEncrypted": bool, # Optional. Indicates that supplied + container registry password is encrypted. + "RegistryPassword": "str", # Optional. The password for supplied + username to connect to container registry. + "RegistryUserName": "str" # Optional. The user name to connect to + container registry. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = create_compose_deployment_description + + request = build_create_compose_deployment_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_compose_deployment_status( + self, + deployment_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets information about a Service Fabric compose deployment. + + Returns the status of the compose deployment that was created or in the process of being + created in the Service Fabric cluster and whose name matches the one specified as the + parameter. The response includes the name, status, and other details about the deployment. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '"6.0-preview'. Default value is "6.0-preview". Note that overriding this default value may + result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ApplicationName": "str", # Optional. The name of the application, including + the 'fabric:' URI scheme. + "Name": "str", # Optional. The name of the deployment. + "Status": "str", # Optional. The status of the compose deployment. Known + values are: "Invalid", "Provisioning", "Creating", "Ready", "Unprovisioning", + "Deleting", "Failed", "Upgrading". + "StatusDetails": "str" # Optional. The status details of compose deployment + including failure message. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_compose_deployment_status_request( + deployment_name=deployment_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_compose_deployment_status_list( + self, + *, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the list of compose deployments created in the Service Fabric cluster. + + Gets the status about the compose deployments that were created or in the process of being + created in the Service Fabric cluster. The response includes the name, status, and other + details about the compose deployments. If the list of deployments do not fit in a page, one + page of results is returned as well as a continuation token, which can be used to get the next + page. + + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '"6.0-preview'. Default value is "6.0-preview". Note that overriding this default value may + result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "ApplicationName": "str", # Optional. The name of the + application, including the 'fabric:' URI scheme. + "Name": "str", # Optional. The name of the deployment. + "Status": "str", # Optional. The status of the compose + deployment. Known values are: "Invalid", "Provisioning", "Creating", + "Ready", "Unprovisioning", "Deleting", "Failed", "Upgrading". + "StatusDetails": "str" # Optional. The status details of + compose deployment including failure message. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_compose_deployment_status_list_request( + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_compose_deployment_upgrade_progress( + self, + deployment_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets details for the latest upgrade performed on this Service Fabric compose deployment. + + Returns the information about the state of the compose deployment upgrade along with details to + aid debugging application health issues. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '"6.0-preview'. Default value is "6.0-preview". Note that overriding this default value may + result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ApplicationHealthPolicy": { + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per service. + Allowed values are Byte values from zero to 100"n"nThe percentage + represents the maximum tolerated percentage of partitions that can be + unhealthy before the service is considered in error."nIf the percentage + is respected but there is at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated by dividing the + number of unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on small + numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per partition. + Allowed values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of replicas that can be + unhealthy before the partition is considered in error."nIf the percentage + is respected but there is at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated by dividing the + number of unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on small + numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum + allowed percentage of unhealthy services. Allowed values are Byte values + from zero to 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the application is + considered in error."nIf the percentage is respected but there is at + least one unhealthy service, the health is evaluated as Warning."nThis is + calculated by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific service + type."nThe computation rounds up to tolerate one failure on small numbers + of services. Default percentage is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The + maximum allowed percentage of unhealthy deployed applications. Allowed values + are Byte values from zero to 100."nThe percentage represents the maximum + tolerated percentage of deployed applications that can be unhealthy before + the application is considered in error."nThis is calculated by dividing the + number of unhealthy deployed applications over the number of nodes where the + application is currently deployed on in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service + type health policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, + # Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte values from zero + to 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the service + is considered in error."nIf the percentage is respected but there + is at least one unhealthy partition, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, + # Optional. The maximum allowed percentage of unhealthy replicas + per partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the partition + is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. + The maximum allowed percentage of unhealthy services. Allowed + values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of services that can + be unhealthy before the application is considered in error."nIf + the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated + by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific + service type."nThe computation rounds up to tolerate one failure + on small numbers of services. Default percentage is zero. + } + } + ] + }, + "ApplicationName": "str", # Optional. The name of the target application, + including the 'fabric:' URI scheme. + "ApplicationUnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ], + "ApplicationUpgradeStatusDetails": "str", # Optional. Additional details of + application upgrade including failure message. + "CurrentUpgradeDomainDuration": "PT0H2M0S", # Optional. Default value is + "PT0H2M0S". The estimated amount of time spent processing current Upgrade Domain. + It is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + "CurrentUpgradeDomainProgress": { + "DomainName": "str", # Optional. The name of the upgrade domain. + "NodeUpgradeProgressList": [ + { + "NodeName": "str", # Optional. The name of a Service + Fabric node. + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ], + "UpgradeDuration": "str", # Optional. The estimated + time spent processing the node since it was deactivated during a + node-by-node upgrade. + "UpgradePhase": "str" # Optional. The state of the + upgrading node. Known values are: "Invalid", "PreUpgradeSafetyCheck", + "Upgrading", "PostUpgradeSafetyCheck". + } + ] + }, + "DeploymentName": "str", # Optional. The name of the target deployment. + "FailureReason": "str", # Optional. The cause of an upgrade failure that + resulted in FailureAction being executed. Known values are: "None", + "Interrupted", "HealthCheck", "UpgradeDomainTimeout", "OverallUpgradeTimeout". + "FailureTimestampUtc": "str", # Optional. The estimated UTC datetime when + the upgrade failed and FailureAction was executed. + "ForceRestart": bool, # Optional. If true, then processes are forcefully + restarted during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + "MonitoringPolicy": { + "FailureAction": "str", # Optional. The compensating action to + perform when a Monitored upgrade encounters monitoring policy or health + policy violations."nInvalid indicates the failure action is invalid. Rollback + specifies that the upgrade will start rolling back automatically."nManual + indicates that the upgrade will switch to UnmonitoredManual upgrade mode. + Known values are: "Invalid", "Rollback", "Manual". + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # Optional. + Default value is "PT0H10M0S". The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is + executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # Optional. + Default value is "PT0H2M0S". The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade + domain. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. Default + value is "0". The amount of time to wait after completing an upgrade domain + before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a + number representing the total number of milliseconds. + "UpgradeDomainTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S", + # Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of + time each upgrade domain has to complete before FailureAction is executed. It + is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + "UpgradeTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S" # + Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of time + the overall upgrade has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + }, + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value is + "UnmonitoredAuto". The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "StartTimestampUtc": "str", # Optional. The estimated UTC datetime when the + upgrade started. + "TargetApplicationTypeVersion": "str", # Optional. The target application + type version (found in the application manifest) for the application upgrade. + "UpgradeDomainProgressAtFailure": { + "DomainName": "str", # Optional. The name of the upgrade domain. + "NodeUpgradeProgressList": [ + { + "NodeName": "str", # Optional. The name of a Service + Fabric node. + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ], + "UpgradeDuration": "str", # Optional. The estimated + time spent processing the node since it was deactivated during a + node-by-node upgrade. + "UpgradePhase": "str" # Optional. The state of the + upgrading node. Known values are: "Invalid", "PreUpgradeSafetyCheck", + "Upgrading", "PostUpgradeSafetyCheck". + } + ] + }, + "UpgradeDuration": "PT0H2M0S", # Optional. Default value is "PT0H2M0S". The + estimated amount of time that the overall upgrade elapsed. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, then it + is interpreted as a number representing the total number of milliseconds. + "UpgradeKind": "Rolling", # Optional. Default value is "Rolling". The kind + of upgrade out of the following possible values. Known values are: "Invalid", + "Rolling". Default value: "Rolling". + "UpgradeReplicaSetCheckTimeoutInSeconds": 42949672925, # Optional. Default + value is 42949672925. The maximum amount of time to block processing of an + upgrade domain and prevent loss of availability when there are unexpected issues. + When this timeout expires, processing of the upgrade domain will proceed + regardless of availability loss issues. The timeout is reset at the start of each + upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + 32-bit integer). + "UpgradeState": "str", # Optional. The state of the compose deployment + upgrade. Known values are: "Invalid", "ProvisioningTarget", + "RollingForwardInProgress", "RollingForwardPending", "UnprovisioningCurrent", + "RollingForwardCompleted", "RollingBackInProgress", "UnprovisioningTarget", + "RollingBackCompleted", "Failed". + "UpgradeStatusDetails": "str" # Optional. Additional detailed information + about the status of the pending upgrade. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_compose_deployment_upgrade_progress_request( + deployment_name=deployment_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def remove_compose_deployment( # pylint: disable=inconsistent-return-statements + self, + deployment_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes an existing Service Fabric compose deployment from cluster. + + Deletes an existing Service Fabric compose deployment. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '"6.0-preview'. Default value is "6.0-preview". Note that overriding this default value may + result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_remove_compose_deployment_request( + deployment_name=deployment_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def start_compose_deployment_upgrade( # pylint: disable=inconsistent-return-statements + self, + deployment_name: str, + compose_deployment_upgrade_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts upgrading a compose deployment in the Service Fabric cluster. + + Validates the supplied upgrade parameters and starts upgrading the deployment if the parameters + are valid. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :param compose_deployment_upgrade_description: Parameters for upgrading compose deployment. + :type compose_deployment_upgrade_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '"6.0-preview'. Default value is "6.0-preview". Note that overriding this default value may + result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + compose_deployment_upgrade_description = { + "ApplicationHealthPolicy": { + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per service. + Allowed values are Byte values from zero to 100"n"nThe percentage + represents the maximum tolerated percentage of partitions that can be + unhealthy before the service is considered in error."nIf the percentage + is respected but there is at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated by dividing the + number of unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on small + numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per partition. + Allowed values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of replicas that can be + unhealthy before the partition is considered in error."nIf the percentage + is respected but there is at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated by dividing the + number of unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on small + numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum + allowed percentage of unhealthy services. Allowed values are Byte values + from zero to 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the application is + considered in error."nIf the percentage is respected but there is at + least one unhealthy service, the health is evaluated as Warning."nThis is + calculated by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific service + type."nThe computation rounds up to tolerate one failure on small numbers + of services. Default percentage is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The + maximum allowed percentage of unhealthy deployed applications. Allowed values + are Byte values from zero to 100."nThe percentage represents the maximum + tolerated percentage of deployed applications that can be unhealthy before + the application is considered in error."nThis is calculated by dividing the + number of unhealthy deployed applications over the number of nodes where the + application is currently deployed on in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service + type health policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, + # Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte values from zero + to 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the service + is considered in error."nIf the percentage is respected but there + is at least one unhealthy partition, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, + # Optional. The maximum allowed percentage of unhealthy replicas + per partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the partition + is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. + The maximum allowed percentage of unhealthy services. Allowed + values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of services that can + be unhealthy before the application is considered in error."nIf + the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated + by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific + service type."nThe computation rounds up to tolerate one failure + on small numbers of services. Default percentage is zero. + } + } + ] + }, + "ComposeFileContent": "str", # Required. The content of the compose file + that describes the deployment to create. + "DeploymentName": "str", # Required. The name of the deployment. + "ForceRestart": bool, # Optional. If true, then processes are forcefully + restarted during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + "MonitoringPolicy": { + "FailureAction": "str", # Optional. The compensating action to + perform when a Monitored upgrade encounters monitoring policy or health + policy violations."nInvalid indicates the failure action is invalid. Rollback + specifies that the upgrade will start rolling back automatically."nManual + indicates that the upgrade will switch to UnmonitoredManual upgrade mode. + Known values are: "Invalid", "Rollback", "Manual". + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # Optional. + Default value is "PT0H10M0S". The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is + executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # Optional. + Default value is "PT0H2M0S". The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade + domain. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. Default + value is "0". The amount of time to wait after completing an upgrade domain + before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a + number representing the total number of milliseconds. + "UpgradeDomainTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S", + # Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of + time each upgrade domain has to complete before FailureAction is executed. It + is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + "UpgradeTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S" # + Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of time + the overall upgrade has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + }, + "RegistryCredential": { + "PasswordEncrypted": bool, # Optional. Indicates that supplied + container registry password is encrypted. + "RegistryPassword": "str", # Optional. The password for supplied + username to connect to container registry. + "RegistryUserName": "str" # Optional. The user name to connect to + container registry. + }, + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value is + "UnmonitoredAuto". The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "UpgradeKind": "Rolling", # Default value is "Rolling". Required. The kind + of upgrade out of the following possible values. Known values are: "Invalid", + "Rolling". Default value: "Rolling". + "UpgradeReplicaSetCheckTimeoutInSeconds": 42949672925 # Optional. Default + value is 42949672925. The maximum amount of time to block processing of an + upgrade domain and prevent loss of availability when there are unexpected issues. + When this timeout expires, processing of the upgrade domain will proceed + regardless of availability loss issues. The timeout is reset at the start of each + upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + 32-bit integer). + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = compose_deployment_upgrade_description + + request = build_start_compose_deployment_upgrade_request( + deployment_name=deployment_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def start_rollback_compose_deployment_upgrade( # pylint: disable=inconsistent-return-statements + self, + deployment_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts rolling back a compose deployment upgrade in the Service Fabric cluster. + + Rollback a service fabric compose deployment upgrade. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_start_rollback_compose_deployment_upgrade_request( + deployment_name=deployment_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_chaos( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the status of Chaos. + + Get the status of Chaos indicating whether or not Chaos is running, the Chaos parameters used + for running Chaos and the status of the Chaos Schedule. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ChaosParameters": { + "ChaosTargetFilter": { + "ApplicationInclusionList": [ + "str" # Optional. A list of application URIs to + include in Chaos faults."nAll replicas belonging to services of these + applications are amenable to replica faults (restart replica, remove + replica, move primary, and move secondary) by Chaos."nChaos may + restart a code package only if the code package hosts replicas of + these applications only."nIf an application does not appear in this + list, it can still be faulted in some Chaos iteration if the + application ends up on a node of a node type that is included in + NodeTypeInclusionList."nHowever, if applicationX is tied to nodeTypeY + through placement constraints and applicationX is absent from + ApplicationInclusionList and nodeTypeY is absent from + NodeTypeInclusionList, then applicationX will never be faulted."nAt + most 1000 application names can be included in this list, to increase + this number, a config upgrade is required for + MaxNumberOfApplicationsInChaosEntityFilter configuration. + ], + "NodeTypeInclusionList": [ + "str" # Optional. A list of node types to include in + Chaos faults."nAll types of faults (restart node, restart code + package, remove replica, restart replica, move primary, and move + secondary) are enabled for the nodes of these node types."nIf a node + type (say NodeTypeX) does not appear in the NodeTypeInclusionList, + then node level faults (like NodeRestart) will never be enabled for + the nodes of"nNodeTypeX, but code package and replica faults can + still be enabled for NodeTypeX if an application in the + ApplicationInclusionList."nhappens to reside on a node of + NodeTypeX."nAt most 100 node type names can be included in this list, + to increase this number, a config upgrade is required for + MaxNumberOfNodeTypesInChaosEntityFilter configuration. + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the + application type health policy map item. This is the name of the + application type. + "Value": 0 # Required. The value of the + application type health policy map item."nThe max percent + unhealthy applications allowed for the application type. Must be + between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates + whether warnings are treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The + maximum allowed percentage of unhealthy applications before reporting an + error. For example, to allow 10% of applications to be unhealthy, this + value would be 10."n"nThe percentage represents the maximum tolerated + percentage of applications that can be unhealthy before the cluster is + considered in error."nIf the percentage is respected but there is at + least one unhealthy application, the health is evaluated as + Warning."nThis is calculated by dividing the number of unhealthy + applications over the total number of application instances in the + cluster, excluding applications of application types that are included in + the ApplicationTypeHealthPolicyMap."nThe computation rounds up to + tolerate one failure on small numbers of applications. Default percentage + is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum + allowed percentage of unhealthy nodes before reporting an error. For + example, to allow 10% of nodes to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated percentage of + nodes that can be unhealthy before the cluster is considered in + error."nIf the percentage is respected but there is at least one + unhealthy node, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy nodes over the total + number of nodes in the cluster."nThe computation rounds up to tolerate + one failure on small numbers of nodes. Default percentage is zero."n"nIn + large clusters, some nodes will always be down or out for repairs, so + this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the + node type health policy map item. This is the name of the node + type. + "Value": 0 # Required. The value of the node + type health policy map item."nIf the percentage is respected but + there is at least one unhealthy node in the node type, the health + is evaluated as Warning. "nThe percentage is calculated by + dividing the number of unhealthy nodes over the total number of + nodes in the node type. "nThe computation rounds up to tolerate + one failure on small numbers of nodes."nThe max percent unhealthy + nodes allowed for the node type. Must be between zero and 100. + } + ] + }, + "Context": { + "Map": { + "str": "str" # Optional. Describes a map that + contains a collection of ChaosContextMapItem's. + } + }, + "EnableMoveReplicaFaults": True, # Optional. Default value is True. + Enables or disables the move primary and move secondary faults. + "MaxClusterStabilizationTimeoutInSeconds": 60, # Optional. Default + value is 60. The maximum amount of time to wait for all cluster entities to + become stable and healthy. Chaos executes in iterations and at the start of + each iteration it validates the health of cluster entities."nDuring + validation if a cluster entity is not stable and healthy within + MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed + event. + "MaxConcurrentFaults": 1, # Optional. Default value is 1. + MaxConcurrentFaults is the maximum number of concurrent faults induced per + iteration."nChaos executes in iterations and two consecutive iterations are + separated by a validation phase."nThe higher the concurrency, the more + aggressive the injection of faults, leading to inducing more complex series + of states to uncover bugs."nThe recommendation is to start with a value of 2 + or 3 and to exercise caution while moving up. + "TimeToRunInSeconds": "4294967295", # Optional. Default value is + "4294967295". Total time (in seconds) for which Chaos will run before + automatically stopping. The maximum allowed value is 4,294,967,295 + (System.UInt32.MaxValue). + "WaitTimeBetweenFaultsInSeconds": 20, # Optional. Default value is + 20. Wait time (in seconds) between consecutive faults within a single + iteration."nThe larger the value, the lower the overlapping between faults + and the simpler the sequence of state transitions that the cluster goes + through."nThe recommendation is to start with a value between 1 and 5 and + exercise caution while moving up. + "WaitTimeBetweenIterationsInSeconds": 30 # Optional. Default value + is 30. Time-separation (in seconds) between two consecutive iterations of + Chaos."nThe larger the value, the lower the fault injection rate. + }, + "ScheduleStatus": "str", # Optional. Current status of the schedule. Known + values are: "Invalid", "Stopped", "Active", "Expired", "Pending". + "Status": "str" # Optional. Current status of the Chaos run. Known values + are: "Invalid", "Running", "Stopped". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_chaos_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def start_chaos( # pylint: disable=inconsistent-return-statements + self, + chaos_parameters: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts Chaos in the cluster. + + If Chaos is not already running in the cluster, it starts Chaos with the passed in Chaos + parameters. + If Chaos is already running when this call is made, the call fails with the error code + FABRIC_E_CHAOS_ALREADY_RUNNING. + Refer to the article `Induce controlled Chaos in Service Fabric clusters + `_ for more + details. + + :param chaos_parameters: Describes all the parameters to configure a Chaos run. + :type chaos_parameters: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + chaos_parameters = { + "ChaosTargetFilter": { + "ApplicationInclusionList": [ + "str" # Optional. A list of application URIs to include in + Chaos faults."nAll replicas belonging to services of these applications + are amenable to replica faults (restart replica, remove replica, move + primary, and move secondary) by Chaos."nChaos may restart a code package + only if the code package hosts replicas of these applications only."nIf + an application does not appear in this list, it can still be faulted in + some Chaos iteration if the application ends up on a node of a node type + that is included in NodeTypeInclusionList."nHowever, if applicationX is + tied to nodeTypeY through placement constraints and applicationX is + absent from ApplicationInclusionList and nodeTypeY is absent from + NodeTypeInclusionList, then applicationX will never be faulted."nAt most + 1000 application names can be included in this list, to increase this + number, a config upgrade is required for + MaxNumberOfApplicationsInChaosEntityFilter configuration. + ], + "NodeTypeInclusionList": [ + "str" # Optional. A list of node types to include in Chaos + faults."nAll types of faults (restart node, restart code package, remove + replica, restart replica, move primary, and move secondary) are enabled + for the nodes of these node types."nIf a node type (say NodeTypeX) does + not appear in the NodeTypeInclusionList, then node level faults (like + NodeRestart) will never be enabled for the nodes of"nNodeTypeX, but code + package and replica faults can still be enabled for NodeTypeX if an + application in the ApplicationInclusionList."nhappens to reside on a node + of NodeTypeX."nAt most 100 node type names can be included in this list, + to increase this number, a config upgrade is required for + MaxNumberOfNodeTypesInChaosEntityFilter configuration. + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + type health policy map item. This is the name of the application + type. + "Value": 0 # Required. The value of the application + type health policy map item."nThe max percent unhealthy applications + allowed for the application type. Must be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The maximum + allowed percentage of unhealthy applications before reporting an error. For + example, to allow 10% of applications to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated percentage of + applications that can be unhealthy before the cluster is considered in + error."nIf the percentage is respected but there is at least one unhealthy + application, the health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy applications over the total number of + application instances in the cluster, excluding applications of application + types that are included in the ApplicationTypeHealthPolicyMap."nThe + computation rounds up to tolerate one failure on small numbers of + applications. Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of unhealthy nodes before reporting an error. For example, to + allow 10% of nodes to be unhealthy, this value would be 10."n"nThe percentage + represents the maximum tolerated percentage of nodes that can be unhealthy + before the cluster is considered in error."nIf the percentage is respected + but there is at least one unhealthy node, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of unhealthy + nodes over the total number of nodes in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero."n"nIn large clusters, some nodes will always be down or out for + repairs, so this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the node type + health policy map item. This is the name of the node type. + "Value": 0 # Required. The value of the node type + health policy map item."nIf the percentage is respected but there is + at least one unhealthy node in the node type, the health is evaluated + as Warning. "nThe percentage is calculated by dividing the number of + unhealthy nodes over the total number of nodes in the node type. + "nThe computation rounds up to tolerate one failure on small numbers + of nodes."nThe max percent unhealthy nodes allowed for the node type. + Must be between zero and 100. + } + ] + }, + "Context": { + "Map": { + "str": "str" # Optional. Describes a map that contains a + collection of ChaosContextMapItem's. + } + }, + "EnableMoveReplicaFaults": True, # Optional. Default value is True. Enables + or disables the move primary and move secondary faults. + "MaxClusterStabilizationTimeoutInSeconds": 60, # Optional. Default value is + 60. The maximum amount of time to wait for all cluster entities to become stable + and healthy. Chaos executes in iterations and at the start of each iteration it + validates the health of cluster entities."nDuring validation if a cluster entity + is not stable and healthy within MaxClusterStabilizationTimeoutInSeconds, Chaos + generates a validation failed event. + "MaxConcurrentFaults": 1, # Optional. Default value is 1. + MaxConcurrentFaults is the maximum number of concurrent faults induced per + iteration."nChaos executes in iterations and two consecutive iterations are + separated by a validation phase."nThe higher the concurrency, the more aggressive + the injection of faults, leading to inducing more complex series of states to + uncover bugs."nThe recommendation is to start with a value of 2 or 3 and to + exercise caution while moving up. + "TimeToRunInSeconds": "4294967295", # Optional. Default value is + "4294967295". Total time (in seconds) for which Chaos will run before + automatically stopping. The maximum allowed value is 4,294,967,295 + (System.UInt32.MaxValue). + "WaitTimeBetweenFaultsInSeconds": 20, # Optional. Default value is 20. Wait + time (in seconds) between consecutive faults within a single iteration."nThe + larger the value, the lower the overlapping between faults and the simpler the + sequence of state transitions that the cluster goes through."nThe recommendation + is to start with a value between 1 and 5 and exercise caution while moving up. + "WaitTimeBetweenIterationsInSeconds": 30 # Optional. Default value is 30. + Time-separation (in seconds) between two consecutive iterations of Chaos."nThe + larger the value, the lower the fault injection rate. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = chaos_parameters + + request = build_start_chaos_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def stop_chaos( # pylint: disable=inconsistent-return-statements + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Stops Chaos if it is running in the cluster and put the Chaos Schedule in a stopped state. + + Stops Chaos from executing new faults. In-flight faults will continue to execute until they are + complete. The current Chaos Schedule is put into a stopped state. + Once a schedule is stopped, it will stay in the stopped state and not be used to Chaos Schedule + new runs of Chaos. A new Chaos Schedule must be set in order to resume scheduling. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_stop_chaos_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_chaos_events( + self, + *, + continuation_token_parameter: Optional[str] = None, + start_time_utc: Optional[str] = None, + end_time_utc: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the next segment of the Chaos events based on the continuation token or the time range. + + To get the next segment of the Chaos events, you can specify the ContinuationToken. To get the + start of a new segment of Chaos events, you can specify the time range + through StartTimeUtc and EndTimeUtc. You cannot specify both the ContinuationToken and the time + range in the same call. + When there are more than 100 Chaos events, the Chaos events are returned in multiple segments + where a segment contains no more than 100 Chaos events and to get the next segment you make a + call to this API with the continuation token. + + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword start_time_utc: The Windows file time representing the start time of the time range + for which a Chaos report is to be generated. Consult `DateTime.ToFileTimeUtc Method + `_.aspx) for + details. Default value is None. + :paramtype start_time_utc: str + :keyword end_time_utc: The Windows file time representing the end time of the time range for + which a Chaos report is to be generated. Consult `DateTime.ToFileTimeUtc Method + `_.aspx) for + details. Default value is None. + :paramtype end_time_utc: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "History": [ + { + "ChaosEvent": { + "TimeStampUtc": "2020-02-20 00:00:00", # Required. + The UTC timestamp when this Chaos event was generated. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_chaos_events_request( + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_chaos_schedule( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """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. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Schedule": { + "ChaosParametersDictionary": [ + { + "Key": "str", # Required. The key identifying the + Chaos Parameter in the dictionary. This key is referenced by Chaos + Schedule Jobs. + "Value": { + "ChaosTargetFilter": { + "ApplicationInclusionList": [ + "str" # Optional. A list of + application URIs to include in Chaos faults."nAll + replicas belonging to services of these applications are + amenable to replica faults (restart replica, remove + replica, move primary, and move secondary) by + Chaos."nChaos may restart a code package only if the code + package hosts replicas of these applications only."nIf an + application does not appear in this list, it can still be + faulted in some Chaos iteration if the application ends + up on a node of a node type that is included in + NodeTypeInclusionList."nHowever, if applicationX is tied + to nodeTypeY through placement constraints and + applicationX is absent from ApplicationInclusionList and + nodeTypeY is absent from NodeTypeInclusionList, then + applicationX will never be faulted."nAt most 1000 + application names can be included in this list, to + increase this number, a config upgrade is required for + MaxNumberOfApplicationsInChaosEntityFilter configuration. + ], + "NodeTypeInclusionList": [ + "str" # Optional. A list of + node types to include in Chaos faults."nAll types of + faults (restart node, restart code package, remove + replica, restart replica, move primary, and move + secondary) are enabled for the nodes of these node + types."nIf a node type (say NodeTypeX) does not appear in + the NodeTypeInclusionList, then node level faults (like + NodeRestart) will never be enabled for the nodes + of"nNodeTypeX, but code package and replica faults can + still be enabled for NodeTypeX if an application in the + ApplicationInclusionList."nhappens to reside on a node of + NodeTypeX."nAt most 100 node type names can be included + in this list, to increase this number, a config upgrade + is required for MaxNumberOfNodeTypesInChaosEntityFilter + configuration. + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # + Required. The key of the application type health + policy map item. This is the name of the application + type. + "Value": 0 # + Required. The value of the application type health + policy map item."nThe max percent unhealthy + applications allowed for the application type. Must + be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # + Optional. Indicates whether warnings are treated with the + same severity as errors. + "MaxPercentUnhealthyApplications": 0, + # Optional. The maximum allowed percentage of unhealthy + applications before reporting an error. For example, to allow + 10% of applications to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated + percentage of applications that can be unhealthy before the + cluster is considered in error."nIf the percentage is + respected but there is at least one unhealthy application, + the health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy applications over the total + number of application instances in the cluster, excluding + applications of application types that are included in the + ApplicationTypeHealthPolicyMap."nThe computation rounds up to + tolerate one failure on small numbers of applications. + Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # + Optional. The maximum allowed percentage of unhealthy nodes + before reporting an error. For example, to allow 10% of nodes + to be unhealthy, this value would be 10."n"nThe percentage + represents the maximum tolerated percentage of nodes that can + be unhealthy before the cluster is considered in error."nIf + the percentage is respected but there is at least one + unhealthy node, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy + nodes over the total number of nodes in the cluster."nThe + computation rounds up to tolerate one failure on small + numbers of nodes. Default percentage is zero."n"nIn large + clusters, some nodes will always be down or out for repairs, + so this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # + Required. The key of the node type health policy map + item. This is the name of the node type. + "Value": 0 # + Required. The value of the node type health policy + map item."nIf the percentage is respected but there + is at least one unhealthy node in the node type, the + health is evaluated as Warning. "nThe percentage is + calculated by dividing the number of unhealthy nodes + over the total number of nodes in the node type. + "nThe computation rounds up to tolerate one failure + on small numbers of nodes."nThe max percent unhealthy + nodes allowed for the node type. Must be between zero + and 100. + } + ] + }, + "Context": { + "Map": { + "str": "str" # Optional. + Describes a map that contains a collection of + ChaosContextMapItem's. + } + }, + "EnableMoveReplicaFaults": True, # Optional. + Default value is True. Enables or disables the move primary and + move secondary faults. + "MaxClusterStabilizationTimeoutInSeconds": + 60, # Optional. Default value is 60. The maximum amount of time + to wait for all cluster entities to become stable and healthy. + Chaos executes in iterations and at the start of each iteration + it validates the health of cluster entities."nDuring validation + if a cluster entity is not stable and healthy within + MaxClusterStabilizationTimeoutInSeconds, Chaos generates a + validation failed event. + "MaxConcurrentFaults": 1, # Optional. + Default value is 1. MaxConcurrentFaults is the maximum number of + concurrent faults induced per iteration."nChaos executes in + iterations and two consecutive iterations are separated by a + validation phase."nThe higher the concurrency, the more + aggressive the injection of faults, leading to inducing more + complex series of states to uncover bugs."nThe recommendation is + to start with a value of 2 or 3 and to exercise caution while + moving up. + "TimeToRunInSeconds": "4294967295", # + Optional. Default value is "4294967295". Total time (in seconds) + for which Chaos will run before automatically stopping. The + maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue). + "WaitTimeBetweenFaultsInSeconds": 20, # + Optional. Default value is 20. Wait time (in seconds) between + consecutive faults within a single iteration."nThe larger the + value, the lower the overlapping between faults and the simpler + the sequence of state transitions that the cluster goes + through."nThe recommendation is to start with a value between 1 + and 5 and exercise caution while moving up. + "WaitTimeBetweenIterationsInSeconds": 30 # + Optional. Default value is 30. Time-separation (in seconds) + between two consecutive iterations of Chaos."nThe larger the + value, the lower the fault injection rate. + } + } + ], + "ExpiryDate": "9999-12-31T23:59:59.999Z", # Optional. Default value + is "9999-12-31T23:59:59.999Z". The date and time Chaos will continue to use + this schedule until. + "Jobs": [ + { + "ChaosParameters": "str", # Optional. A reference to + which Chaos Parameters of the Chaos Schedule to use. + "Days": { + "Friday": bool, # Optional. Indicates if the + Chaos Schedule Job will run on Friday. + "Monday": bool, # Optional. Indicates if the + Chaos Schedule Job will run on Monday. + "Saturday": bool, # Optional. Indicates if + the Chaos Schedule Job will run on Saturday. + "Sunday": bool, # Optional. Indicates if the + Chaos Schedule Job will run on Sunday. + "Thursday": bool, # Optional. Indicates if + the Chaos Schedule Job will run on Thursday. + "Tuesday": bool, # Optional. Indicates if + the Chaos Schedule Job will run on Tuesday. + "Wednesday": bool # Optional. Indicates if + the Chaos Schedule Job will run on Wednesday. + }, + "Times": [ + { + "EndTime": { + "Hour": 0, # Optional. + Represents the hour of the day. Value must be between 0 + and 23 inclusive. + "Minute": 0 # Optional. + Represents the minute of the hour. Value must be between + 0 to 59 inclusive. + }, + "StartTime": { + "Hour": 0, # Optional. + Represents the hour of the day. Value must be between 0 + and 23 inclusive. + "Minute": 0 # Optional. + Represents the minute of the hour. Value must be between + 0 to 59 inclusive. + } + } + ] + } + ], + "StartDate": "1601-01-01T00:00:00Z" # Optional. Default value is + "1601-01-01T00:00:00Z". The date and time Chaos will start using this + schedule. + }, + "Version": 0 # Optional. The version number of the Schedule. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_chaos_schedule_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def post_chaos_schedule( # pylint: disable=inconsistent-return-statements + self, + chaos_schedule: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Set the schedule used by Chaos. + + Chaos will automatically schedule runs based on the Chaos Schedule. + The Chaos Schedule will be updated if the provided version matches the version on the server. + When updating the Chaos Schedule, the version on the server is incremented by 1. + The version on the server will wrap back to 0 after reaching a large number. + If Chaos is running when this call is made, the call will fail. + + :param chaos_schedule: Describes the schedule used by Chaos. + :type chaos_schedule: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + chaos_schedule = { + "Schedule": { + "ChaosParametersDictionary": [ + { + "Key": "str", # Required. The key identifying the + Chaos Parameter in the dictionary. This key is referenced by Chaos + Schedule Jobs. + "Value": { + "ChaosTargetFilter": { + "ApplicationInclusionList": [ + "str" # Optional. A list of + application URIs to include in Chaos faults."nAll + replicas belonging to services of these applications are + amenable to replica faults (restart replica, remove + replica, move primary, and move secondary) by + Chaos."nChaos may restart a code package only if the code + package hosts replicas of these applications only."nIf an + application does not appear in this list, it can still be + faulted in some Chaos iteration if the application ends + up on a node of a node type that is included in + NodeTypeInclusionList."nHowever, if applicationX is tied + to nodeTypeY through placement constraints and + applicationX is absent from ApplicationInclusionList and + nodeTypeY is absent from NodeTypeInclusionList, then + applicationX will never be faulted."nAt most 1000 + application names can be included in this list, to + increase this number, a config upgrade is required for + MaxNumberOfApplicationsInChaosEntityFilter configuration. + ], + "NodeTypeInclusionList": [ + "str" # Optional. A list of + node types to include in Chaos faults."nAll types of + faults (restart node, restart code package, remove + replica, restart replica, move primary, and move + secondary) are enabled for the nodes of these node + types."nIf a node type (say NodeTypeX) does not appear in + the NodeTypeInclusionList, then node level faults (like + NodeRestart) will never be enabled for the nodes + of"nNodeTypeX, but code package and replica faults can + still be enabled for NodeTypeX if an application in the + ApplicationInclusionList."nhappens to reside on a node of + NodeTypeX."nAt most 100 node type names can be included + in this list, to increase this number, a config upgrade + is required for MaxNumberOfNodeTypesInChaosEntityFilter + configuration. + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # + Required. The key of the application type health + policy map item. This is the name of the application + type. + "Value": 0 # + Required. The value of the application type health + policy map item."nThe max percent unhealthy + applications allowed for the application type. Must + be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # + Optional. Indicates whether warnings are treated with the + same severity as errors. + "MaxPercentUnhealthyApplications": 0, + # Optional. The maximum allowed percentage of unhealthy + applications before reporting an error. For example, to allow + 10% of applications to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated + percentage of applications that can be unhealthy before the + cluster is considered in error."nIf the percentage is + respected but there is at least one unhealthy application, + the health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy applications over the total + number of application instances in the cluster, excluding + applications of application types that are included in the + ApplicationTypeHealthPolicyMap."nThe computation rounds up to + tolerate one failure on small numbers of applications. + Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # + Optional. The maximum allowed percentage of unhealthy nodes + before reporting an error. For example, to allow 10% of nodes + to be unhealthy, this value would be 10."n"nThe percentage + represents the maximum tolerated percentage of nodes that can + be unhealthy before the cluster is considered in error."nIf + the percentage is respected but there is at least one + unhealthy node, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy + nodes over the total number of nodes in the cluster."nThe + computation rounds up to tolerate one failure on small + numbers of nodes. Default percentage is zero."n"nIn large + clusters, some nodes will always be down or out for repairs, + so this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # + Required. The key of the node type health policy map + item. This is the name of the node type. + "Value": 0 # + Required. The value of the node type health policy + map item."nIf the percentage is respected but there + is at least one unhealthy node in the node type, the + health is evaluated as Warning. "nThe percentage is + calculated by dividing the number of unhealthy nodes + over the total number of nodes in the node type. + "nThe computation rounds up to tolerate one failure + on small numbers of nodes."nThe max percent unhealthy + nodes allowed for the node type. Must be between zero + and 100. + } + ] + }, + "Context": { + "Map": { + "str": "str" # Optional. + Describes a map that contains a collection of + ChaosContextMapItem's. + } + }, + "EnableMoveReplicaFaults": True, # Optional. + Default value is True. Enables or disables the move primary and + move secondary faults. + "MaxClusterStabilizationTimeoutInSeconds": + 60, # Optional. Default value is 60. The maximum amount of time + to wait for all cluster entities to become stable and healthy. + Chaos executes in iterations and at the start of each iteration + it validates the health of cluster entities."nDuring validation + if a cluster entity is not stable and healthy within + MaxClusterStabilizationTimeoutInSeconds, Chaos generates a + validation failed event. + "MaxConcurrentFaults": 1, # Optional. + Default value is 1. MaxConcurrentFaults is the maximum number of + concurrent faults induced per iteration."nChaos executes in + iterations and two consecutive iterations are separated by a + validation phase."nThe higher the concurrency, the more + aggressive the injection of faults, leading to inducing more + complex series of states to uncover bugs."nThe recommendation is + to start with a value of 2 or 3 and to exercise caution while + moving up. + "TimeToRunInSeconds": "4294967295", # + Optional. Default value is "4294967295". Total time (in seconds) + for which Chaos will run before automatically stopping. The + maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue). + "WaitTimeBetweenFaultsInSeconds": 20, # + Optional. Default value is 20. Wait time (in seconds) between + consecutive faults within a single iteration."nThe larger the + value, the lower the overlapping between faults and the simpler + the sequence of state transitions that the cluster goes + through."nThe recommendation is to start with a value between 1 + and 5 and exercise caution while moving up. + "WaitTimeBetweenIterationsInSeconds": 30 # + Optional. Default value is 30. Time-separation (in seconds) + between two consecutive iterations of Chaos."nThe larger the + value, the lower the fault injection rate. + } + } + ], + "ExpiryDate": "9999-12-31T23:59:59.999Z", # Optional. Default value + is "9999-12-31T23:59:59.999Z". The date and time Chaos will continue to use + this schedule until. + "Jobs": [ + { + "ChaosParameters": "str", # Optional. A reference to + which Chaos Parameters of the Chaos Schedule to use. + "Days": { + "Friday": bool, # Optional. Indicates if the + Chaos Schedule Job will run on Friday. + "Monday": bool, # Optional. Indicates if the + Chaos Schedule Job will run on Monday. + "Saturday": bool, # Optional. Indicates if + the Chaos Schedule Job will run on Saturday. + "Sunday": bool, # Optional. Indicates if the + Chaos Schedule Job will run on Sunday. + "Thursday": bool, # Optional. Indicates if + the Chaos Schedule Job will run on Thursday. + "Tuesday": bool, # Optional. Indicates if + the Chaos Schedule Job will run on Tuesday. + "Wednesday": bool # Optional. Indicates if + the Chaos Schedule Job will run on Wednesday. + }, + "Times": [ + { + "EndTime": { + "Hour": 0, # Optional. + Represents the hour of the day. Value must be between 0 + and 23 inclusive. + "Minute": 0 # Optional. + Represents the minute of the hour. Value must be between + 0 to 59 inclusive. + }, + "StartTime": { + "Hour": 0, # Optional. + Represents the hour of the day. Value must be between 0 + and 23 inclusive. + "Minute": 0 # Optional. + Represents the minute of the hour. Value must be between + 0 to 59 inclusive. + } + } + ] + } + ], + "StartDate": "1601-01-01T00:00:00Z" # Optional. Default value is + "1601-01-01T00:00:00Z". The date and time Chaos will start using this + schedule. + }, + "Version": 0 # Optional. The version number of the Schedule. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = chaos_schedule + + request = build_post_chaos_schedule_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def upload_file( # pylint: disable=inconsistent-return-statements + self, + content_path: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Uploads contents of the file to the image store. + + Uploads contents of the file to the image store. Use this API if the file is small enough to + upload again if the connection fails. The file's data needs to be added to the request body. + The contents will be uploaded to the specified path. Image store service uses a mark file to + indicate the availability of the folder. The mark file is an empty file named "_.dir". The mark + file is generated by the image store service when all files in a folder are uploaded. When + using File-by-File approach to upload application package in REST, the image store service + isn't aware of the file hierarchy of the application package; you need to create a mark file + per folder and upload it last, to let the image store service know that the folder is complete. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_upload_file_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_image_store_content( + self, + content_path: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the image store content information. + + Returns the information about the image store content at the specified contentPath. The + contentPath is relative to the root of the image store. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "StoreFiles": [ + { + "FileSize": "str", # Optional. The size of file in bytes. + "FileVersion": { + "EpochConfigurationNumber": "str", # Optional. The + epoch configuration version number of the image store replica when + this file entry was created or updated. + "EpochDataLossNumber": "str", # Optional. The epoch + data loss number of image store replica when this file entry was + updated or created. + "VersionNumber": "str" # Optional. The current image + store version number for the file is used in image store for checking + whether it need to be updated. + }, + "ModifiedDate": "2020-02-20 00:00:00", # Optional. The date + and time when the image store file was last modified. + "StoreRelativePath": "str" # Optional. The file path + relative to the image store root path. + } + ], + "StoreFolders": [ + { + "FileCount": "str", # Optional. The number of files from + within the image store folder. + "StoreRelativePath": "str" # Optional. The remote location + within image store. This path is relative to the image store root. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_image_store_content_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def delete_image_store_content( # pylint: disable=inconsistent-return-statements + self, + content_path: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes existing image store content. + + Deletes existing image store content being found within the given image store relative path. + This command can be used to delete uploaded application packages once they are provisioned. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_delete_image_store_content_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_image_store_root_content( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the content information at the root of the image store. + + Returns the information about the image store content at the root of the image store. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "StoreFiles": [ + { + "FileSize": "str", # Optional. The size of file in bytes. + "FileVersion": { + "EpochConfigurationNumber": "str", # Optional. The + epoch configuration version number of the image store replica when + this file entry was created or updated. + "EpochDataLossNumber": "str", # Optional. The epoch + data loss number of image store replica when this file entry was + updated or created. + "VersionNumber": "str" # Optional. The current image + store version number for the file is used in image store for checking + whether it need to be updated. + }, + "ModifiedDate": "2020-02-20 00:00:00", # Optional. The date + and time when the image store file was last modified. + "StoreRelativePath": "str" # Optional. The file path + relative to the image store root path. + } + ], + "StoreFolders": [ + { + "FileCount": "str", # Optional. The number of files from + within the image store folder. + "StoreRelativePath": "str" # Optional. The remote location + within image store. This path is relative to the image store root. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_image_store_root_content_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def copy_image_store_content( # pylint: disable=inconsistent-return-statements + self, + image_store_copy_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Copies image store content internally. + + Copies the image store content from the source image store relative path to the destination + image store relative path. + + :param image_store_copy_description: Describes the copy description for the image store. + :type image_store_copy_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + image_store_copy_description = { + "CheckMarkFile": bool, # Optional. Indicates whether to check mark file + during copying. The property is true if checking mark file is required, false + otherwise. The mark file is used to check whether the folder is well constructed. + If the property is true and mark file does not exist, the copy is skipped. + "RemoteDestination": "str", # Required. The relative path of destination + image store content to be copied to. + "RemoteSource": "str", # Required. The relative path of source image store + content to be copied from. + "SkipFiles": [ + "str" # Optional. The list of the file names to be skipped for + copying. + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = image_store_copy_description + + request = build_copy_image_store_content_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def delete_image_store_upload_session( # pylint: disable=inconsistent-return-statements + self, + *, + session_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Cancels an image store upload session. + + The DELETE request will cause the existing upload session to expire and remove any previously + uploaded file chunks. + + :keyword session_id: A GUID generated by the user for a file uploading. It identifies an image + store upload session which keeps track of all file chunks until it is committed. + :paramtype session_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_delete_image_store_upload_session_request( + api_version=api_version, + session_id=session_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def commit_image_store_upload_session( # pylint: disable=inconsistent-return-statements + self, + *, + session_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Commit an image store upload session. + + When all file chunks have been uploaded, the upload session needs to be committed explicitly to + complete the upload. Image store preserves the upload session until the expiration time, which + is 30 minutes after the last chunk received. + + :keyword session_id: A GUID generated by the user for a file uploading. It identifies an image + store upload session which keeps track of all file chunks until it is committed. + :paramtype session_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_commit_image_store_upload_session_request( + api_version=api_version, + session_id=session_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_image_store_upload_session_by_id( + self, + *, + session_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the image store upload session by ID. + + Gets the image store upload session identified by the given ID. User can query the upload + session at any time during uploading. + + :keyword session_id: A GUID generated by the user for a file uploading. It identifies an image + store upload session which keeps track of all file chunks until it is committed. + :paramtype session_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "UploadSessions": [ + { + "ExpectedRanges": [ + { + "EndPosition": "str", # Optional. The end + position of the portion of the file. It's represented by the + number of bytes. + "StartPosition": "str" # Optional. The start + position of the portion of the file. It's represented by the + number of bytes. + } + ], + "FileSize": "str", # Optional. The size in bytes of the + uploading file. + "ModifiedDate": "2020-02-20 00:00:00", # Optional. The date + and time when the upload session was last modified. + "SessionId": str, # Optional. A unique ID of the upload + session. A session ID can be reused only if the session was committed or + removed. + "StoreRelativePath": "str" # Optional. The remote location + within image store. This path is relative to the image store root. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_image_store_upload_session_by_id_request( + api_version=api_version, + session_id=session_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_image_store_upload_session_by_path( + self, + content_path: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the image store upload session by relative path. + + Gets the image store upload session associated with the given image store relative path. User + can query the upload session at any time during uploading. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "UploadSessions": [ + { + "ExpectedRanges": [ + { + "EndPosition": "str", # Optional. The end + position of the portion of the file. It's represented by the + number of bytes. + "StartPosition": "str" # Optional. The start + position of the portion of the file. It's represented by the + number of bytes. + } + ], + "FileSize": "str", # Optional. The size in bytes of the + uploading file. + "ModifiedDate": "2020-02-20 00:00:00", # Optional. The date + and time when the upload session was last modified. + "SessionId": str, # Optional. A unique ID of the upload + session. A session ID can be reused only if the session was committed or + removed. + "StoreRelativePath": "str" # Optional. The remote location + within image store. This path is relative to the image store root. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_image_store_upload_session_by_path_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def upload_file_chunk( # pylint: disable=inconsistent-return-statements + self, + content_path: str, + *, + session_id: str, + content_range: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Uploads a file chunk to the image store relative path. + + Uploads a file chunk to the image store with the specified upload session ID and image store + relative path. This API allows user to resume the file upload operation. user doesn't have to + restart the file upload from scratch whenever there is a network interruption. Use this option + if the file size is large. + + To perform a resumable file upload, user need to break the file into multiple chunks and upload + these chunks to the image store one-by-one. Chunks don't have to be uploaded in order. If the + file represented by the image store relative path already exists, it will be overwritten when + the upload session commits. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :keyword session_id: A GUID generated by the user for a file uploading. It identifies an image + store upload session which keeps track of all file chunks until it is committed. + :paramtype session_id: str + :keyword content_range: When uploading file chunks to the image store, the Content-Range header + field need to be configured and sent with a request. The format should looks like "bytes + {First-Byte-Position}-{Last-Byte-Position}/{File-Length}". For example, Content-Range:bytes + 300-5000/20000 indicates that user is sending bytes 300 through 5,000 and the total file length + is 20,000 bytes. + :paramtype content_range: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_upload_file_chunk_request( + content_path=content_path, + api_version=api_version, + session_id=session_id, + content_range=content_range, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_image_store_root_folder_size( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the folder size at the root of the image store. + + Returns the total size of files at the root and children folders in image store. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.5'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.5". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "FolderSize": "str", # Optional. The size of folder in bytes. + "StoreRelativePath": "str" # Optional. The remote location within image + store. This path is relative to the image store root. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.5")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_image_store_root_folder_size_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_image_store_folder_size( + self, + content_path: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the size of a folder in image store. + + Gets the total size of file under a image store folder, specified by contentPath. The + contentPath is relative to the root of the image store. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.5'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.5". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "FolderSize": "str", # Optional. The size of folder in bytes. + "StoreRelativePath": "str" # Optional. The remote location within image + store. This path is relative to the image store root. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.5")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_image_store_folder_size_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_image_store_info( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the overall ImageStore information. + + Returns information about the primary ImageStore replica, such as disk capacity and available + disk space at the node it is on, and several categories of the ImageStore's file system usage. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.5'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.5". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "DiskInfo": { + "AvailableSpace": "str", # Optional. the available disk space in + bytes. + "Capacity": "str" # Optional. the disk size in bytes. + }, + "UsedByCopy": { + "FileCount": "str", # Optional. the number of all files in this + category. + "UsedSpace": "str" # Optional. the size of all files in this + category. + }, + "UsedByMetadata": { + "FileCount": "str", # Optional. the number of all files in this + category. + "UsedSpace": "str" # Optional. the size of all files in this + category. + }, + "UsedByRegister": { + "FileCount": "str", # Optional. the number of all files in this + category. + "UsedSpace": "str" # Optional. the size of all files in this + category. + }, + "UsedByStaging": { + "FileCount": "str", # Optional. the number of all files in this + category. + "UsedSpace": "str" # Optional. the size of all files in this + category. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.5")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_image_store_info_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def invoke_infrastructure_command( + self, + *, + command: str, + service_id: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> str: + """Invokes an administrative command on the given Infrastructure Service instance. + + For clusters that have one or more instances of the Infrastructure Service configured, + this API provides a way to send infrastructure-specific commands to a particular + instance of the Infrastructure Service. + + Available commands and their corresponding response formats vary depending upon + the infrastructure on which the cluster is running. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :keyword command: The text of the command to be invoked. The content of the command is + infrastructure-specific. + :paramtype command: str + :keyword service_id: The identity of the infrastructure service. This is the full name of the + infrastructure service without the 'fabric:' URI scheme. This parameter required only for the + cluster that has more than one instance of infrastructure service running. Default value is + None. + :paramtype service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: str + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[str] + + + request = build_invoke_infrastructure_command_request( + api_version=api_version, + command=command, + service_id=service_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(str, deserialized), {}) + + return cast(str, deserialized) + + + + @distributed_trace_async + async def invoke_infrastructure_query( + self, + *, + command: str, + service_id: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> str: + """Invokes a read-only query on the given infrastructure service instance. + + For clusters that have one or more instances of the Infrastructure Service configured, + this API provides a way to send infrastructure-specific queries to a particular + instance of the Infrastructure Service. + + Available commands and their corresponding response formats vary depending upon + the infrastructure on which the cluster is running. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :keyword command: The text of the command to be invoked. The content of the command is + infrastructure-specific. + :paramtype command: str + :keyword service_id: The identity of the infrastructure service. This is the full name of the + infrastructure service without the 'fabric:' URI scheme. This parameter required only for the + cluster that has more than one instance of infrastructure service running. Default value is + None. + :paramtype service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: str + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[str] + + + request = build_invoke_infrastructure_query_request( + api_version=api_version, + command=command, + service_id=service_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(str, deserialized), {}) + + return cast(str, deserialized) + + + + @distributed_trace_async + async def start_data_loss( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + partition_id: str, + *, + operation_id: str, + data_loss_mode: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """This API will induce data loss for the specified partition. It will trigger a call to the + OnDataLossAsync API of the partition. + + This API will induce data loss for the specified partition. It will trigger a call to the + OnDataLoss API of the partition. + Actual data loss will depend on the specified DataLossMode. + + + * PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is triggered for the + partition but actual data loss depends on the presence of in-flight replication. + * FullDataLoss - All replicas are removed hence all data is lost and OnDataLoss is triggered. + + This API should only be called with a stateful service as the target. + + Calling this API with a system service as the target is not advised. + + Note: Once this API has been called, it cannot be reversed. Calling CancelOperation will only + stop execution and clean up internal system state. + It will not restore data if the command has progressed far enough to cause data loss. + + Call the GetDataLossProgress API with the same OperationId to return information on the + operation started with this API. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword data_loss_mode: This enum is passed to the StartDataLoss API to indicate what type of + data loss to induce. Known values are: "Invalid", "PartialDataLoss", and "FullDataLoss". + :paramtype data_loss_mode: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_start_data_loss_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + data_loss_mode=data_loss_mode, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_data_loss_progress( + self, + service_id: str, + partition_id: str, + *, + operation_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the progress of a partition data loss operation started using the StartDataLoss API. + + Gets the progress of a data loss operation started with StartDataLoss, using the OperationId. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "InvokeDataLossResult": { + "ErrorCode": 0, # Optional. If OperationState is Completed, this is + 0. If OperationState is Faulted, this is an error code indicating the + reason. + "SelectedPartition": { + "PartitionId": str, # Optional. An internal ID used by + Service Fabric to uniquely identify a partition. This is a randomly + generated GUID when the service was created. The partition ID is unique + and does not change for the lifetime of the service. If the same service + was deleted and recreated the IDs of its partitions would be different. + "ServiceName": "str" # Optional. The name of the service the + partition belongs to. + } + }, + "State": "str" # Optional. The state of the operation. Known values are: + "Invalid", "Running", "RollingBack", "Completed", "Faulted", "Cancelled", + "ForceCancelled". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_data_loss_progress_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def start_quorum_loss( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + partition_id: str, + *, + operation_id: str, + quorum_loss_mode: str, + quorum_loss_duration: int, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Induces quorum loss for a given stateful service partition. + + This API is useful for a temporary quorum loss situation on your service. + + Call the GetQuorumLossProgress API with the same OperationId to return information on the + operation started with this API. + + This can only be called on stateful persisted (HasPersistedState==true) services. Do not use + this API on stateless services or stateful in-memory only services. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword quorum_loss_mode: This enum is passed to the StartQuorumLoss API to indicate what type + of quorum loss to induce. Known values are: "Invalid", "QuorumReplicas", and "AllReplicas". + :paramtype quorum_loss_mode: str + :keyword quorum_loss_duration: The amount of time for which the partition will be kept in + quorum loss. This must be specified in seconds. + :paramtype quorum_loss_duration: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_start_quorum_loss_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + quorum_loss_mode=quorum_loss_mode, + quorum_loss_duration=quorum_loss_duration, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_quorum_loss_progress( + self, + service_id: str, + partition_id: str, + *, + operation_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the progress of a quorum loss operation on a partition started using the StartQuorumLoss + API. + + Gets the progress of a quorum loss operation started with StartQuorumLoss, using the provided + OperationId. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "InvokeQuorumLossResult": { + "ErrorCode": 0, # Optional. If OperationState is Completed, this is + 0. If OperationState is Faulted, this is an error code indicating the + reason. + "SelectedPartition": { + "PartitionId": str, # Optional. An internal ID used by + Service Fabric to uniquely identify a partition. This is a randomly + generated GUID when the service was created. The partition ID is unique + and does not change for the lifetime of the service. If the same service + was deleted and recreated the IDs of its partitions would be different. + "ServiceName": "str" # Optional. The name of the service the + partition belongs to. + } + }, + "State": "str" # Optional. The state of the operation. Known values are: + "Invalid", "Running", "RollingBack", "Completed", "Faulted", "Cancelled", + "ForceCancelled". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_quorum_loss_progress_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def start_partition_restart( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + partition_id: str, + *, + operation_id: str, + restart_partition_mode: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """This API will restart some or all replicas or instances of the specified partition. + + This API is useful for testing failover. + + If used to target a stateless service partition, RestartPartitionMode must be + AllReplicasOrInstances. + + Call the GetPartitionRestartProgress API using the same OperationId to get the progress. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword restart_partition_mode: Describe which partitions to restart. Known values are: + "Invalid", "AllReplicasOrInstances", and "OnlyActiveSecondaries". + :paramtype restart_partition_mode: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_start_partition_restart_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + restart_partition_mode=restart_partition_mode, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_partition_restart_progress( + self, + service_id: str, + partition_id: str, + *, + operation_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the progress of a PartitionRestart operation started using StartPartitionRestart. + + Gets the progress of a PartitionRestart started with StartPartitionRestart using the provided + OperationId. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "RestartPartitionResult": { + "ErrorCode": 0, # Optional. If OperationState is Completed, this is + 0. If OperationState is Faulted, this is an error code indicating the + reason. + "SelectedPartition": { + "PartitionId": str, # Optional. An internal ID used by + Service Fabric to uniquely identify a partition. This is a randomly + generated GUID when the service was created. The partition ID is unique + and does not change for the lifetime of the service. If the same service + was deleted and recreated the IDs of its partitions would be different. + "ServiceName": "str" # Optional. The name of the service the + partition belongs to. + } + }, + "State": "str" # Optional. The state of the operation. Known values are: + "Invalid", "Running", "RollingBack", "Completed", "Faulted", "Cancelled", + "ForceCancelled". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_partition_restart_progress_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def start_node_transition( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + *, + operation_id: str, + node_transition_type: str, + node_instance_id: str, + stop_duration_in_seconds: int, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts or stops a cluster node. + + Starts or stops a cluster node. A cluster node is a process, not the OS instance itself. To + start a node, pass in "Start" for the NodeTransitionType parameter. + To stop a node, pass in "Stop" for the NodeTransitionType parameter. This API starts the + operation - when the API returns the node may not have finished transitioning yet. + Call GetNodeTransitionProgress with the same OperationId to get the progress of the operation. + + :param node_name: The name of the node. + :type node_name: str + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword node_transition_type: Indicates the type of transition to perform. + NodeTransitionType.Start will start a stopped node. NodeTransitionType.Stop will stop a node + that is up. Known values are: "Invalid", "Start", and "Stop". + :paramtype node_transition_type: str + :keyword node_instance_id: The node instance ID of the target node. This can be determined + through GetNodeInfo API. + :paramtype node_instance_id: str + :keyword stop_duration_in_seconds: The duration, in seconds, to keep the node stopped. The + minimum value is 600, the maximum is 14400. After this time expires, the node will + automatically come back up. + :paramtype stop_duration_in_seconds: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_start_node_transition_request( + node_name=node_name, + api_version=api_version, + operation_id=operation_id, + node_transition_type=node_transition_type, + node_instance_id=node_instance_id, + stop_duration_in_seconds=stop_duration_in_seconds, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_node_transition_progress( + self, + node_name: str, + *, + operation_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the progress of an operation started using StartNodeTransition. + + Gets the progress of an operation started with StartNodeTransition using the provided + OperationId. + + :param node_name: The name of the node. + :type node_name: str + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "NodeTransitionResult": { + "ErrorCode": 0, # Optional. If OperationState is Completed, this is + 0. If OperationState is Faulted, this is an error code indicating the + reason. + "NodeResult": { + "NodeInstanceId": "str", # Optional. The node instance id. + "NodeName": "str" # Optional. The name of a Service Fabric + node. + } + }, + "State": "str" # Optional. The state of the operation. Known values are: + "Invalid", "Running", "RollingBack", "Completed", "Faulted", "Cancelled", + "ForceCancelled". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_node_transition_progress_request( + node_name=node_name, + api_version=api_version, + operation_id=operation_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_fault_operation_list( + self, + *, + type_filter: int = 65535, + state_filter: int = 65535, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets a list of user-induced fault operations filtered by provided input. + + Gets the list of user-induced fault operations filtered by provided input. + + :keyword 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. Default value is 65535. + :paramtype type_filter: int + :keyword 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. Default value is 65535. + :paramtype state_filter: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "OperationId": str, # Optional. A GUID that identifies a call to + this API. This is also passed into the corresponding GetProgress API. + "State": "str", # Optional. The state of the operation. Known values + are: "Invalid", "Running", "RollingBack", "Completed", "Faulted", + "Cancelled", "ForceCancelled". + "Type": "str" # Optional. The type of the operation. Known values + are: "Invalid", "PartitionDataLoss", "PartitionQuorumLoss", + "PartitionRestart", "NodeTransition". + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_fault_operation_list_request( + api_version=api_version, + type_filter=type_filter, + state_filter=state_filter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def cancel_operation( # pylint: disable=inconsistent-return-statements + self, + *, + operation_id: str, + force: bool = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Cancels a user-induced fault operation. + + The following APIs start fault operations that may be cancelled by using CancelOperation: + StartDataLoss, StartQuorumLoss, StartPartitionRestart, StartNodeTransition. + + If force is false, then the specified user-induced operation will be gracefully stopped and + cleaned up. If force is true, the command will be aborted, and some internal state + may be left behind. Specifying force as true should be used with care. Calling this API with + force set to true is not allowed until this API has already + been called on the same test command with force set to false first, or unless the test command + already has an OperationState of OperationState.RollingBack. + Clarification: OperationState.RollingBack means that the system will be/is cleaning up internal + system state caused by executing the command. It will not restore data if the + test command was to cause data loss. For example, if you call StartDataLoss then call this + API, the system will only clean up internal state from running the command. + It will not restore the target partition's data, if the command progressed far enough to cause + data loss. + + Important note: if this API is invoked with force==true, internal state may be left behind. + + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword force: Indicates whether to gracefully roll back and clean up internal system state + modified by executing the user-induced operation. Default value is False. + :paramtype force: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_cancel_operation_request( + api_version=api_version, + operation_id=operation_id, + force=force, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def create_backup_policy( # pylint: disable=inconsistent-return-statements + self, + backup_policy_description: JSON, + *, + timeout: Optional[int] = 60, + validate_connection: Optional[bool] = False, + **kwargs: Any + ) -> None: + """Creates a backup policy. + + Creates a backup policy which can be associated later with a Service Fabric application, + service or a partition for periodic backup. + + :param backup_policy_description: Describes the backup policy. + :type backup_policy_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword validate_connection: Specifies whether to validate the storage connection and + credentials before creating or updating the backup policies. Default value is False. + :paramtype validate_connection: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + backup_policy_description = { + "AutoRestoreOnDataLoss": bool, # Required. Specifies whether to trigger + restore automatically using the latest available backup in case the partition + experiences a data loss event. + "MaxIncrementalBackups": 0, # Required. Defines the maximum number of + incremental backups to be taken between two full backups. This is just the upper + limit. A full backup may be taken before specified number of incremental backups + are completed in one of the following conditions"n"n"n* The replica has never + taken a full backup since it has become primary,"n* Some of the log records since + the last backup has been truncated, or"n* Replica passed the + MaxAccumulatedBackupLogSizeInMB limit. + "Name": "str", # Required. The unique name identifying this backup policy. + "RetentionPolicy": { + RetentionPolicyType: RetentionPolicyType + }, + "Schedule": { + ScheduleKind: ScheduleKind + }, + "Storage": { + "FriendlyName": "str", # Optional. Friendly name for this backup + storage. + StorageKind: StorageKind + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = backup_policy_description + + request = build_create_backup_policy_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + validate_connection=validate_connection, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def delete_backup_policy( # pylint: disable=inconsistent-return-statements + self, + backup_policy_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes the backup policy. + + Deletes an existing backup policy. A backup policy must be created before it can be deleted. A + currently active backup policy, associated with any Service Fabric application, service or + partition, cannot be deleted without first deleting the mapping. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_delete_backup_policy_request( + backup_policy_name=backup_policy_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_backup_policy_list( + self, + *, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets all the backup policies configured. + + Get a list of all the backup policies configured. + + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "AutoRestoreOnDataLoss": bool, # Required. Specifies whether + to trigger restore automatically using the latest available backup in + case the partition experiences a data loss event. + "MaxIncrementalBackups": 0, # Required. Defines the maximum + number of incremental backups to be taken between two full backups. This + is just the upper limit. A full backup may be taken before specified + number of incremental backups are completed in one of the following + conditions"n"n"n* The replica has never taken a full backup since it has + become primary,"n* Some of the log records since the last backup has been + truncated, or"n* Replica passed the MaxAccumulatedBackupLogSizeInMB + limit. + "Name": "str", # Required. The unique name identifying this + backup policy. + "RetentionPolicy": { + RetentionPolicyType: RetentionPolicyType + }, + "Schedule": { + ScheduleKind: ScheduleKind + }, + "Storage": { + "FriendlyName": "str", # Optional. Friendly name for + this backup storage. + StorageKind: StorageKind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_backup_policy_list_request( + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_backup_policy_by_name( + self, + backup_policy_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets a particular backup policy by name. + + Gets a particular backup policy identified by {backupPolicyName}. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AutoRestoreOnDataLoss": bool, # Required. Specifies whether to trigger + restore automatically using the latest available backup in case the partition + experiences a data loss event. + "MaxIncrementalBackups": 0, # Required. Defines the maximum number of + incremental backups to be taken between two full backups. This is just the upper + limit. A full backup may be taken before specified number of incremental backups + are completed in one of the following conditions"n"n"n* The replica has never + taken a full backup since it has become primary,"n* Some of the log records since + the last backup has been truncated, or"n* Replica passed the + MaxAccumulatedBackupLogSizeInMB limit. + "Name": "str", # Required. The unique name identifying this backup policy. + "RetentionPolicy": { + RetentionPolicyType: RetentionPolicyType + }, + "Schedule": { + ScheduleKind: ScheduleKind + }, + "Storage": { + "FriendlyName": "str", # Optional. Friendly name for this backup + storage. + StorageKind: StorageKind + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_backup_policy_by_name_request( + backup_policy_name=backup_policy_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_all_entities_backed_up_by_policy( + self, + backup_policy_name: str, + *, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the list of backup entities that are associated with this policy. + + Returns a list of Service Fabric application, service or partition which are associated with + this backup policy. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + EntityKind: EntityKind + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_all_entities_backed_up_by_policy_request( + backup_policy_name=backup_policy_name, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def update_backup_policy( # pylint: disable=inconsistent-return-statements + self, + backup_policy_name: str, + backup_policy_description: JSON, + *, + timeout: Optional[int] = 60, + validate_connection: Optional[bool] = False, + **kwargs: Any + ) -> None: + """Updates the backup policy. + + Updates the backup policy identified by {backupPolicyName}. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :param backup_policy_description: Describes the backup policy. + :type backup_policy_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword validate_connection: Specifies whether to validate the storage connection and + credentials before creating or updating the backup policies. Default value is False. + :paramtype validate_connection: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + backup_policy_description = { + "AutoRestoreOnDataLoss": bool, # Required. Specifies whether to trigger + restore automatically using the latest available backup in case the partition + experiences a data loss event. + "MaxIncrementalBackups": 0, # Required. Defines the maximum number of + incremental backups to be taken between two full backups. This is just the upper + limit. A full backup may be taken before specified number of incremental backups + are completed in one of the following conditions"n"n"n* The replica has never + taken a full backup since it has become primary,"n* Some of the log records since + the last backup has been truncated, or"n* Replica passed the + MaxAccumulatedBackupLogSizeInMB limit. + "Name": "str", # Required. The unique name identifying this backup policy. + "RetentionPolicy": { + RetentionPolicyType: RetentionPolicyType + }, + "Schedule": { + ScheduleKind: ScheduleKind + }, + "Storage": { + "FriendlyName": "str", # Optional. Friendly name for this backup + storage. + StorageKind: StorageKind + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = backup_policy_description + + request = build_update_backup_policy_request( + backup_policy_name=backup_policy_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + validate_connection=validate_connection, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def enable_application_backup( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + enable_backup_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Enables periodic backup of stateful partitions under this Service Fabric application. + + Enables periodic backup of stateful partitions which are part of this Service Fabric + application. Each partition is backed up individually as per the specified backup policy + description. + Note only C# based Reliable Actor and Reliable Stateful services are currently supported for + periodic backup. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param enable_backup_description: Specifies the parameters for enabling backup. + :type enable_backup_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + enable_backup_description = { + "BackupPolicyName": "str" # Required. Name of the backup policy to be used + for enabling periodic backups. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = enable_backup_description + + request = build_enable_application_backup_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def disable_application_backup( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + disable_backup_description: Optional[JSON] = None, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Disables periodic backup of Service Fabric application. + + Disables periodic backup of Service Fabric application which was previously enabled. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param disable_backup_description: Specifies the parameters to disable backup for any backup + entity. Default value is None. + :type disable_backup_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + disable_backup_description = { + "CleanBackup": bool # Required. Boolean flag to delete backups. It can be + set to true for deleting all the backups which were created for the backup entity + that is getting disabled for backup. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + if disable_backup_description is not None: + _json = disable_backup_description + else: + _json = None + + request = build_disable_application_backup_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_application_backup_configuration_info( + self, + application_id: str, + *, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the Service Fabric application backup configuration information. + + Gets the Service Fabric backup configuration information for the application and the services + and partitions under this application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "PolicyInheritedFrom": "str", # Optional. Specifies the + scope at which the backup policy is applied. Known values are: "Invalid", + "Partition", "Service", "Application". + "PolicyName": "str", # Optional. The name of the backup + policy which is applicable to this Service Fabric application or service + or partition. + "SuspensionInfo": { + "IsSuspended": bool, # Optional. Indicates whether + periodic backup is suspended at this level or not. + "SuspensionInheritedFrom": "str" # Optional. + Specifies the scope at which the backup suspension was applied. Known + values are: "Invalid", "Partition", "Service", "Application". + }, + Kind: Kind + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_backup_configuration_info_request( + application_id=application_id, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_application_backup_list( + self, + application_id: str, + *, + timeout: Optional[int] = 60, + latest: Optional[bool] = False, + start_date_time_filter: Optional[datetime.datetime] = None, + end_date_time_filter: Optional[datetime.datetime] = None, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + **kwargs: Any + ) -> JSON: + """Gets the list of backups available for every partition in this application. + + Returns a list of backups available for every partition in this Service Fabric application. The + server enumerates all the backups available at the backup location configured in the backup + policy. It also allows filtering of the result based on start and end datetime or just fetching + the latest available backup for every partition. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword latest: Specifies whether to get only the most recent backup available for a partition + for the specified time range. Default value is False. + :paramtype latest: bool + :keyword start_date_time_filter: Specify the start date time from which to enumerate backups, + in datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, all backups from the beginning are enumerated. Default value is + None. + :paramtype start_date_time_filter: ~datetime.datetime + :keyword end_date_time_filter: Specify the end date time till which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, enumeration is done till the most recent backup. Default value is + None. + :paramtype end_date_time_filter: ~datetime.datetime + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "ApplicationName": "str", # Optional. Name of the Service + Fabric application this partition backup belongs to. + "BackupChainId": str, # Optional. Unique backup chain ID. + All backups part of the same chain has the same backup chain id. A backup + chain is comprised of 1 full backup and multiple incremental backups. + "BackupId": str, # Optional. Unique backup ID . + "BackupLocation": "str", # Optional. Location of the backup, + relative to the backup store. + "BackupType": "str", # Optional. Describes the type of + backup, whether its full or incremental. Known values are: "Invalid", + "Full", "Incremental". + "CreationTimeUtc": "2020-02-20 00:00:00", # Optional. The + date time when this backup was taken. + "EpochOfLastBackupRecord": { + "ConfigurationVersion": "str", # Optional. The + current configuration number of this Epoch. The configuration number + is an increasing value that is updated whenever the configuration of + this replica set changes. + "DataLossVersion": "str" # Optional. The current + data loss number of this Epoch. The data loss number property is an + increasing value which is updated whenever data loss is suspected, as + when loss of a quorum of replicas in the replica set that includes + the Primary replica. + }, + "FailureError": { + "Code": "str", # Required. Defines the fabric error + codes that be returned as part of the error object in response to + Service Fabric API operations that are not successful. Following are + the error code values that can be returned for a specific HTTP status + code."n"n"n* "n Possible values of the error code for HTTP status + code 400 (Bad Request)"n"n"n * "FABRIC_E_INVALID_PARTITION_KEY""n * + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_ADDRESS""n * + "FABRIC_E_APPLICATION_NOT_UPGRADING""n * + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_FABRIC_NOT_UPGRADING""n * + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_CONFIGURATION""n * "FABRIC_E_INVALID_NAME_URI""n + * "FABRIC_E_PATH_TOO_LONG""n * "FABRIC_E_KEY_TOO_LARGE""n * + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED""n * + "FABRIC_E_INVALID_ATOMIC_GROUP""n * "FABRIC_E_VALUE_EMPTY""n * + "FABRIC_E_BACKUP_IS_ENABLED""n * + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH""n * + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES""n * + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY""n * "E_INVALIDARG""n"n* "n + Possible values of the error code for HTTP status code 404 (Not + Found)"n"n"n * "FABRIC_E_NODE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_TYPE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_NOT_FOUND""n * + "FABRIC_E_SERVICE_TYPE_NOT_FOUND""n * + "FABRIC_E_SERVICE_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND""n * + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND""n * + "FABRIC_E_PARTITION_NOT_FOUND""n * + "FABRIC_E_REPLICA_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST""n * + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND""n * + "FABRIC_E_DIRECTORY_NOT_FOUND""n * + "FABRIC_E_FABRIC_VERSION_NOT_FOUND""n * "FABRIC_E_FILE_NOT_FOUND""n + * "FABRIC_E_NAME_DOES_NOT_EXIST""n * + "FABRIC_E_PROPERTY_DOES_NOT_EXIST""n * + "FABRIC_E_ENUMERATION_COMPLETED""n * + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND""n * "FABRIC_E_KEY_NOT_FOUND""n + * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND""n * + "FABRIC_E_BACKUP_NOT_ENABLED""n * + "FABRIC_E_BACKUP_POLICY_NOT_EXISTING""n * + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING""n * + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR""n"n* "n Possible + values of the error code for HTTP status code 409 (Conflict)"n"n"n * + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS""n * + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_SERVICE_ALREADY_EXISTS""n * + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_TYPE_IN_USE""n * + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS""n * + "FABRIC_E_FABRIC_VERSION_IN_USE""n * + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_NAME_ALREADY_EXISTS""n * "FABRIC_E_NAME_NOT_EMPTY""n * + "FABRIC_E_PROPERTY_CHECK_FAILED""n * + "FABRIC_E_SERVICE_METADATA_MISMATCH""n * + "FABRIC_E_SERVICE_TYPE_MISMATCH""n * + "FABRIC_E_HEALTH_STALE_REPORT""n * + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED""n * + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET""n * + "FABRIC_E_INSTANCE_ID_MISMATCH""n * "FABRIC_E_BACKUP_IN_PROGRESS""n + * "FABRIC_E_RESTORE_IN_PROGRESS""n * + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING""n"n* "n Possible values of + the error code for HTTP status code 413 (Request Entity Too + Large)"n"n"n * "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values + of the error code for HTTP status code 500 (Internal Server + Error)"n"n"n * "FABRIC_E_NODE_IS_UP""n * "E_FAIL""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND""n * + "FABRIC_E_VOLUME_ALREADY_EXISTS""n * "FABRIC_E_VOLUME_NOT_FOUND""n + * "SerializationError""n * "FABRIC_E_CERTIFICATE_NOT_FOUND""n"n* "n + Possible values of the error code for HTTP status code 503 (Service + Unavailable)"n"n"n * "FABRIC_E_NO_WRITE_QUORUM""n * + "FABRIC_E_NOT_PRIMARY""n * "FABRIC_E_NOT_READY""n * + "FABRIC_E_RECONFIGURATION_PENDING""n * "FABRIC_E_SERVICE_OFFLINE""n + * "E_ABORT""n * "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values + of the error code for HTTP status code 504 (Gateway Timeout)"n"n"n * + "FABRIC_E_COMMUNICATION_ERROR""n * + "FABRIC_E_OPERATION_NOT_COMPLETE""n * "FABRIC_E_TIMEOUT". Known + values are: "FABRIC_E_INVALID_PARTITION_KEY", + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", + "FABRIC_E_APPLICATION_NOT_UPGRADING", + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_FABRIC_NOT_UPGRADING", + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", + "FABRIC_E_PATH_TOO_LONG", "FABRIC_E_KEY_TOO_LARGE", + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", + "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", + "FABRIC_E_NODE_NOT_FOUND", "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", + "FABRIC_E_APPLICATION_NOT_FOUND", "FABRIC_E_SERVICE_TYPE_NOT_FOUND", + "FABRIC_E_SERVICE_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", + "FABRIC_E_PARTITION_NOT_FOUND", "FABRIC_E_REPLICA_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", + "FABRIC_E_DIRECTORY_NOT_FOUND", "FABRIC_E_FABRIC_VERSION_NOT_FOUND", + "FABRIC_E_FILE_NOT_FOUND", "FABRIC_E_NAME_DOES_NOT_EXIST", + "FABRIC_E_PROPERTY_DOES_NOT_EXIST", "FABRIC_E_ENUMERATION_COMPLETED", + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", "FABRIC_E_KEY_NOT_FOUND", + "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", + "FABRIC_E_SERVICE_ALREADY_EXISTS", + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_TYPE_IN_USE", + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", + "FABRIC_E_FABRIC_VERSION_IN_USE", + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", + "FABRIC_E_NAME_ALREADY_EXISTS", "FABRIC_E_NAME_NOT_EMPTY", + "FABRIC_E_PROPERTY_CHECK_FAILED", + "FABRIC_E_SERVICE_METADATA_MISMATCH", + "FABRIC_E_SERVICE_TYPE_MISMATCH", "FABRIC_E_HEALTH_STALE_REPORT", + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", + "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", + "FABRIC_E_NOT_PRIMARY", "FABRIC_E_NOT_READY", + "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", + "E_ABORT", "FABRIC_E_COMMUNICATION_ERROR", + "FABRIC_E_OPERATION_NOT_COMPLETE", "FABRIC_E_TIMEOUT", + "FABRIC_E_NODE_IS_UP", "E_FAIL", "FABRIC_E_BACKUP_IS_ENABLED", + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", + "FABRIC_E_BACKUP_NOT_ENABLED", "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", + "FABRIC_E_BACKUP_IN_PROGRESS", "FABRIC_E_RESTORE_IN_PROGRESS", + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", + "FABRIC_E_VOLUME_ALREADY_EXISTS", "FABRIC_E_VOLUME_NOT_FOUND", + "SerializationError", + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", + "FABRIC_E_CERTIFICATE_NOT_FOUND". + "Message": "str" # Optional. Error message. + }, + "LsnOfLastBackupRecord": "str", # Optional. LSN of the last + record in this backup. + "PartitionInformation": { + "Id": str, # Optional. An internal ID used by + Service Fabric to uniquely identify a partition. This is a randomly + generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the + same service was deleted and recreated the IDs of its partitions + would be different. + ServicePartitionKind: ServicePartitionKind + }, + "ServiceManifestVersion": "str", # Optional. Manifest + Version of the service this partition backup belongs to. + "ServiceName": "str" # Optional. Name of the Service Fabric + service this partition backup belongs to. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_backup_list_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + latest=latest, + start_date_time_filter=start_date_time_filter, + end_date_time_filter=end_date_time_filter, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def suspend_application_backup( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Suspends periodic backup for the specified Service Fabric application. + + The application which is configured to take periodic backups, is suspended for taking further + backups till it is resumed again. This operation applies to the entire application's hierarchy. + It means all the services and partitions under this application are now suspended for backup. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_suspend_application_backup_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def resume_application_backup( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Resumes periodic backup of a Service Fabric application which was previously suspended. + + The previously suspended Service Fabric application resumes taking periodic backup as per the + backup policy currently configured for the same. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_resume_application_backup_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def enable_service_backup( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + enable_backup_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Enables periodic backup of stateful partitions under this Service Fabric service. + + Enables periodic backup of stateful partitions which are part of this Service Fabric service. + Each partition is backed up individually as per the specified backup policy description. In + case the application, which the service is part of, is already enabled for backup then this + operation would override the policy being used to take the periodic backup for this service and + its partitions (unless explicitly overridden at the partition level). + Note only C# based Reliable Actor and Reliable Stateful services are currently supported for + periodic backup. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param enable_backup_description: Specifies the parameters for enabling backup. + :type enable_backup_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + enable_backup_description = { + "BackupPolicyName": "str" # Required. Name of the backup policy to be used + for enabling periodic backups. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = enable_backup_description + + request = build_enable_service_backup_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def disable_service_backup( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + disable_backup_description: Optional[JSON] = None, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Disables periodic backup of Service Fabric service which was previously enabled. + + Disables periodic backup of Service Fabric service which was previously enabled. Backup must be + explicitly enabled before it can be disabled. + In case the backup is enabled for the Service Fabric application, which this service is part + of, this service would continue to be periodically backed up as per the policy mapped at the + application level. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param disable_backup_description: Specifies the parameters to disable backup for any backup + entity. Default value is None. + :type disable_backup_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + disable_backup_description = { + "CleanBackup": bool # Required. Boolean flag to delete backups. It can be + set to true for deleting all the backups which were created for the backup entity + that is getting disabled for backup. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + if disable_backup_description is not None: + _json = disable_backup_description + else: + _json = None + + request = build_disable_service_backup_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_service_backup_configuration_info( + self, + service_id: str, + *, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the Service Fabric service backup configuration information. + + Gets the Service Fabric backup configuration information for the service and the partitions + under this service. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "PolicyInheritedFrom": "str", # Optional. Specifies the + scope at which the backup policy is applied. Known values are: "Invalid", + "Partition", "Service", "Application". + "PolicyName": "str", # Optional. The name of the backup + policy which is applicable to this Service Fabric application or service + or partition. + "SuspensionInfo": { + "IsSuspended": bool, # Optional. Indicates whether + periodic backup is suspended at this level or not. + "SuspensionInheritedFrom": "str" # Optional. + Specifies the scope at which the backup suspension was applied. Known + values are: "Invalid", "Partition", "Service", "Application". + }, + Kind: Kind + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_service_backup_configuration_info_request( + service_id=service_id, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_service_backup_list( + self, + service_id: str, + *, + timeout: Optional[int] = 60, + latest: Optional[bool] = False, + start_date_time_filter: Optional[datetime.datetime] = None, + end_date_time_filter: Optional[datetime.datetime] = None, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + **kwargs: Any + ) -> JSON: + """Gets the list of backups available for every partition in this service. + + Returns a list of backups available for every partition in this Service Fabric service. The + server enumerates all the backups available in the backup store configured in the backup + policy. It also allows filtering of the result based on start and end datetime or just fetching + the latest available backup for every partition. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword latest: Specifies whether to get only the most recent backup available for a partition + for the specified time range. Default value is False. + :paramtype latest: bool + :keyword start_date_time_filter: Specify the start date time from which to enumerate backups, + in datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, all backups from the beginning are enumerated. Default value is + None. + :paramtype start_date_time_filter: ~datetime.datetime + :keyword end_date_time_filter: Specify the end date time till which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, enumeration is done till the most recent backup. Default value is + None. + :paramtype end_date_time_filter: ~datetime.datetime + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "ApplicationName": "str", # Optional. Name of the Service + Fabric application this partition backup belongs to. + "BackupChainId": str, # Optional. Unique backup chain ID. + All backups part of the same chain has the same backup chain id. A backup + chain is comprised of 1 full backup and multiple incremental backups. + "BackupId": str, # Optional. Unique backup ID . + "BackupLocation": "str", # Optional. Location of the backup, + relative to the backup store. + "BackupType": "str", # Optional. Describes the type of + backup, whether its full or incremental. Known values are: "Invalid", + "Full", "Incremental". + "CreationTimeUtc": "2020-02-20 00:00:00", # Optional. The + date time when this backup was taken. + "EpochOfLastBackupRecord": { + "ConfigurationVersion": "str", # Optional. The + current configuration number of this Epoch. The configuration number + is an increasing value that is updated whenever the configuration of + this replica set changes. + "DataLossVersion": "str" # Optional. The current + data loss number of this Epoch. The data loss number property is an + increasing value which is updated whenever data loss is suspected, as + when loss of a quorum of replicas in the replica set that includes + the Primary replica. + }, + "FailureError": { + "Code": "str", # Required. Defines the fabric error + codes that be returned as part of the error object in response to + Service Fabric API operations that are not successful. Following are + the error code values that can be returned for a specific HTTP status + code."n"n"n* "n Possible values of the error code for HTTP status + code 400 (Bad Request)"n"n"n * "FABRIC_E_INVALID_PARTITION_KEY""n * + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_ADDRESS""n * + "FABRIC_E_APPLICATION_NOT_UPGRADING""n * + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_FABRIC_NOT_UPGRADING""n * + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_CONFIGURATION""n * "FABRIC_E_INVALID_NAME_URI""n + * "FABRIC_E_PATH_TOO_LONG""n * "FABRIC_E_KEY_TOO_LARGE""n * + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED""n * + "FABRIC_E_INVALID_ATOMIC_GROUP""n * "FABRIC_E_VALUE_EMPTY""n * + "FABRIC_E_BACKUP_IS_ENABLED""n * + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH""n * + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES""n * + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY""n * "E_INVALIDARG""n"n* "n + Possible values of the error code for HTTP status code 404 (Not + Found)"n"n"n * "FABRIC_E_NODE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_TYPE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_NOT_FOUND""n * + "FABRIC_E_SERVICE_TYPE_NOT_FOUND""n * + "FABRIC_E_SERVICE_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND""n * + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND""n * + "FABRIC_E_PARTITION_NOT_FOUND""n * + "FABRIC_E_REPLICA_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST""n * + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND""n * + "FABRIC_E_DIRECTORY_NOT_FOUND""n * + "FABRIC_E_FABRIC_VERSION_NOT_FOUND""n * "FABRIC_E_FILE_NOT_FOUND""n + * "FABRIC_E_NAME_DOES_NOT_EXIST""n * + "FABRIC_E_PROPERTY_DOES_NOT_EXIST""n * + "FABRIC_E_ENUMERATION_COMPLETED""n * + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND""n * "FABRIC_E_KEY_NOT_FOUND""n + * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND""n * + "FABRIC_E_BACKUP_NOT_ENABLED""n * + "FABRIC_E_BACKUP_POLICY_NOT_EXISTING""n * + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING""n * + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR""n"n* "n Possible + values of the error code for HTTP status code 409 (Conflict)"n"n"n * + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS""n * + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_SERVICE_ALREADY_EXISTS""n * + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_TYPE_IN_USE""n * + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS""n * + "FABRIC_E_FABRIC_VERSION_IN_USE""n * + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_NAME_ALREADY_EXISTS""n * "FABRIC_E_NAME_NOT_EMPTY""n * + "FABRIC_E_PROPERTY_CHECK_FAILED""n * + "FABRIC_E_SERVICE_METADATA_MISMATCH""n * + "FABRIC_E_SERVICE_TYPE_MISMATCH""n * + "FABRIC_E_HEALTH_STALE_REPORT""n * + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED""n * + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET""n * + "FABRIC_E_INSTANCE_ID_MISMATCH""n * "FABRIC_E_BACKUP_IN_PROGRESS""n + * "FABRIC_E_RESTORE_IN_PROGRESS""n * + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING""n"n* "n Possible values of + the error code for HTTP status code 413 (Request Entity Too + Large)"n"n"n * "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values + of the error code for HTTP status code 500 (Internal Server + Error)"n"n"n * "FABRIC_E_NODE_IS_UP""n * "E_FAIL""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND""n * + "FABRIC_E_VOLUME_ALREADY_EXISTS""n * "FABRIC_E_VOLUME_NOT_FOUND""n + * "SerializationError""n * "FABRIC_E_CERTIFICATE_NOT_FOUND""n"n* "n + Possible values of the error code for HTTP status code 503 (Service + Unavailable)"n"n"n * "FABRIC_E_NO_WRITE_QUORUM""n * + "FABRIC_E_NOT_PRIMARY""n * "FABRIC_E_NOT_READY""n * + "FABRIC_E_RECONFIGURATION_PENDING""n * "FABRIC_E_SERVICE_OFFLINE""n + * "E_ABORT""n * "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values + of the error code for HTTP status code 504 (Gateway Timeout)"n"n"n * + "FABRIC_E_COMMUNICATION_ERROR""n * + "FABRIC_E_OPERATION_NOT_COMPLETE""n * "FABRIC_E_TIMEOUT". Known + values are: "FABRIC_E_INVALID_PARTITION_KEY", + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", + "FABRIC_E_APPLICATION_NOT_UPGRADING", + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_FABRIC_NOT_UPGRADING", + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", + "FABRIC_E_PATH_TOO_LONG", "FABRIC_E_KEY_TOO_LARGE", + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", + "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", + "FABRIC_E_NODE_NOT_FOUND", "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", + "FABRIC_E_APPLICATION_NOT_FOUND", "FABRIC_E_SERVICE_TYPE_NOT_FOUND", + "FABRIC_E_SERVICE_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", + "FABRIC_E_PARTITION_NOT_FOUND", "FABRIC_E_REPLICA_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", + "FABRIC_E_DIRECTORY_NOT_FOUND", "FABRIC_E_FABRIC_VERSION_NOT_FOUND", + "FABRIC_E_FILE_NOT_FOUND", "FABRIC_E_NAME_DOES_NOT_EXIST", + "FABRIC_E_PROPERTY_DOES_NOT_EXIST", "FABRIC_E_ENUMERATION_COMPLETED", + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", "FABRIC_E_KEY_NOT_FOUND", + "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", + "FABRIC_E_SERVICE_ALREADY_EXISTS", + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_TYPE_IN_USE", + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", + "FABRIC_E_FABRIC_VERSION_IN_USE", + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", + "FABRIC_E_NAME_ALREADY_EXISTS", "FABRIC_E_NAME_NOT_EMPTY", + "FABRIC_E_PROPERTY_CHECK_FAILED", + "FABRIC_E_SERVICE_METADATA_MISMATCH", + "FABRIC_E_SERVICE_TYPE_MISMATCH", "FABRIC_E_HEALTH_STALE_REPORT", + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", + "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", + "FABRIC_E_NOT_PRIMARY", "FABRIC_E_NOT_READY", + "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", + "E_ABORT", "FABRIC_E_COMMUNICATION_ERROR", + "FABRIC_E_OPERATION_NOT_COMPLETE", "FABRIC_E_TIMEOUT", + "FABRIC_E_NODE_IS_UP", "E_FAIL", "FABRIC_E_BACKUP_IS_ENABLED", + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", + "FABRIC_E_BACKUP_NOT_ENABLED", "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", + "FABRIC_E_BACKUP_IN_PROGRESS", "FABRIC_E_RESTORE_IN_PROGRESS", + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", + "FABRIC_E_VOLUME_ALREADY_EXISTS", "FABRIC_E_VOLUME_NOT_FOUND", + "SerializationError", + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", + "FABRIC_E_CERTIFICATE_NOT_FOUND". + "Message": "str" # Optional. Error message. + }, + "LsnOfLastBackupRecord": "str", # Optional. LSN of the last + record in this backup. + "PartitionInformation": { + "Id": str, # Optional. An internal ID used by + Service Fabric to uniquely identify a partition. This is a randomly + generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the + same service was deleted and recreated the IDs of its partitions + would be different. + ServicePartitionKind: ServicePartitionKind + }, + "ServiceManifestVersion": "str", # Optional. Manifest + Version of the service this partition backup belongs to. + "ServiceName": "str" # Optional. Name of the Service Fabric + service this partition backup belongs to. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_service_backup_list_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + latest=latest, + start_date_time_filter=start_date_time_filter, + end_date_time_filter=end_date_time_filter, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def suspend_service_backup( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Suspends periodic backup for the specified Service Fabric service. + + The service which is configured to take periodic backups, is suspended for taking further + backups till it is resumed again. This operation applies to the entire service's hierarchy. It + means all the partitions under this service are now suspended for backup. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_suspend_service_backup_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def resume_service_backup( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Resumes periodic backup of a Service Fabric service which was previously suspended. + + The previously suspended Service Fabric service resumes taking periodic backup as per the + backup policy currently configured for the same. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_resume_service_backup_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def enable_partition_backup( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + enable_backup_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Enables periodic backup of the stateful persisted partition. + + Enables periodic backup of stateful persisted partition. Each partition is backed up as per the + specified backup policy description. In case the application or service, which is partition is + part of, is already enabled for backup then this operation would override the policy being used + to take the periodic backup of this partition. + Note only C# based Reliable Actor and Reliable Stateful services are currently supported for + periodic backup. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param enable_backup_description: Specifies the parameters for enabling backup. + :type enable_backup_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + enable_backup_description = { + "BackupPolicyName": "str" # Required. Name of the backup policy to be used + for enabling periodic backups. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = enable_backup_description + + request = build_enable_partition_backup_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def disable_partition_backup( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + disable_backup_description: Optional[JSON] = None, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Disables periodic backup of Service Fabric partition which was previously enabled. + + Disables periodic backup of partition which was previously enabled. Backup must be explicitly + enabled before it can be disabled. + In case the backup is enabled for the Service Fabric application or service, which this + partition is part of, this partition would continue to be periodically backed up as per the + policy mapped at the higher level entity. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param disable_backup_description: Specifies the parameters to disable backup for any backup + entity. Default value is None. + :type disable_backup_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + disable_backup_description = { + "CleanBackup": bool # Required. Boolean flag to delete backups. It can be + set to true for deleting all the backups which were created for the backup entity + that is getting disabled for backup. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + if disable_backup_description is not None: + _json = disable_backup_description + else: + _json = None + + request = build_disable_partition_backup_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_partition_backup_configuration_info( + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the partition backup configuration information. + + Gets the Service Fabric Backup configuration information for the specified partition. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "PartitionId": str, # Optional. The partition ID identifying the partition. + "PolicyInheritedFrom": "str", # Optional. Specifies the scope at which the + backup policy is applied. Known values are: "Invalid", "Partition", "Service", + "Application". + "PolicyName": "str", # Optional. The name of the backup policy which is + applicable to this Service Fabric application or service or partition. + "ServiceName": "str", # Optional. The full name of the service with + 'fabric:' URI scheme. + "SuspensionInfo": { + "IsSuspended": bool, # Optional. Indicates whether periodic backup + is suspended at this level or not. + "SuspensionInheritedFrom": "str" # Optional. Specifies the scope at + which the backup suspension was applied. Known values are: "Invalid", + "Partition", "Service", "Application". + }, + Kind: Partition + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_partition_backup_configuration_info_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_partition_backup_list( + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + latest: Optional[bool] = False, + start_date_time_filter: Optional[datetime.datetime] = None, + end_date_time_filter: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> JSON: + """Gets the list of backups available for the specified partition. + + Returns a list of backups available for the specified partition. The server enumerates all the + backups available in the backup store configured in the backup policy. It also allows filtering + of the result based on start and end datetime or just fetching the latest available backup for + the partition. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword latest: Specifies whether to get only the most recent backup available for a partition + for the specified time range. Default value is False. + :paramtype latest: bool + :keyword start_date_time_filter: Specify the start date time from which to enumerate backups, + in datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, all backups from the beginning are enumerated. Default value is + None. + :paramtype start_date_time_filter: ~datetime.datetime + :keyword end_date_time_filter: Specify the end date time till which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, enumeration is done till the most recent backup. Default value is + None. + :paramtype end_date_time_filter: ~datetime.datetime + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "ApplicationName": "str", # Optional. Name of the Service + Fabric application this partition backup belongs to. + "BackupChainId": str, # Optional. Unique backup chain ID. + All backups part of the same chain has the same backup chain id. A backup + chain is comprised of 1 full backup and multiple incremental backups. + "BackupId": str, # Optional. Unique backup ID . + "BackupLocation": "str", # Optional. Location of the backup, + relative to the backup store. + "BackupType": "str", # Optional. Describes the type of + backup, whether its full or incremental. Known values are: "Invalid", + "Full", "Incremental". + "CreationTimeUtc": "2020-02-20 00:00:00", # Optional. The + date time when this backup was taken. + "EpochOfLastBackupRecord": { + "ConfigurationVersion": "str", # Optional. The + current configuration number of this Epoch. The configuration number + is an increasing value that is updated whenever the configuration of + this replica set changes. + "DataLossVersion": "str" # Optional. The current + data loss number of this Epoch. The data loss number property is an + increasing value which is updated whenever data loss is suspected, as + when loss of a quorum of replicas in the replica set that includes + the Primary replica. + }, + "FailureError": { + "Code": "str", # Required. Defines the fabric error + codes that be returned as part of the error object in response to + Service Fabric API operations that are not successful. Following are + the error code values that can be returned for a specific HTTP status + code."n"n"n* "n Possible values of the error code for HTTP status + code 400 (Bad Request)"n"n"n * "FABRIC_E_INVALID_PARTITION_KEY""n * + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_ADDRESS""n * + "FABRIC_E_APPLICATION_NOT_UPGRADING""n * + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_FABRIC_NOT_UPGRADING""n * + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_CONFIGURATION""n * "FABRIC_E_INVALID_NAME_URI""n + * "FABRIC_E_PATH_TOO_LONG""n * "FABRIC_E_KEY_TOO_LARGE""n * + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED""n * + "FABRIC_E_INVALID_ATOMIC_GROUP""n * "FABRIC_E_VALUE_EMPTY""n * + "FABRIC_E_BACKUP_IS_ENABLED""n * + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH""n * + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES""n * + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY""n * "E_INVALIDARG""n"n* "n + Possible values of the error code for HTTP status code 404 (Not + Found)"n"n"n * "FABRIC_E_NODE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_TYPE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_NOT_FOUND""n * + "FABRIC_E_SERVICE_TYPE_NOT_FOUND""n * + "FABRIC_E_SERVICE_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND""n * + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND""n * + "FABRIC_E_PARTITION_NOT_FOUND""n * + "FABRIC_E_REPLICA_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST""n * + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND""n * + "FABRIC_E_DIRECTORY_NOT_FOUND""n * + "FABRIC_E_FABRIC_VERSION_NOT_FOUND""n * "FABRIC_E_FILE_NOT_FOUND""n + * "FABRIC_E_NAME_DOES_NOT_EXIST""n * + "FABRIC_E_PROPERTY_DOES_NOT_EXIST""n * + "FABRIC_E_ENUMERATION_COMPLETED""n * + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND""n * "FABRIC_E_KEY_NOT_FOUND""n + * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND""n * + "FABRIC_E_BACKUP_NOT_ENABLED""n * + "FABRIC_E_BACKUP_POLICY_NOT_EXISTING""n * + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING""n * + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR""n"n* "n Possible + values of the error code for HTTP status code 409 (Conflict)"n"n"n * + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS""n * + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_SERVICE_ALREADY_EXISTS""n * + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_TYPE_IN_USE""n * + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS""n * + "FABRIC_E_FABRIC_VERSION_IN_USE""n * + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_NAME_ALREADY_EXISTS""n * "FABRIC_E_NAME_NOT_EMPTY""n * + "FABRIC_E_PROPERTY_CHECK_FAILED""n * + "FABRIC_E_SERVICE_METADATA_MISMATCH""n * + "FABRIC_E_SERVICE_TYPE_MISMATCH""n * + "FABRIC_E_HEALTH_STALE_REPORT""n * + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED""n * + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET""n * + "FABRIC_E_INSTANCE_ID_MISMATCH""n * "FABRIC_E_BACKUP_IN_PROGRESS""n + * "FABRIC_E_RESTORE_IN_PROGRESS""n * + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING""n"n* "n Possible values of + the error code for HTTP status code 413 (Request Entity Too + Large)"n"n"n * "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values + of the error code for HTTP status code 500 (Internal Server + Error)"n"n"n * "FABRIC_E_NODE_IS_UP""n * "E_FAIL""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND""n * + "FABRIC_E_VOLUME_ALREADY_EXISTS""n * "FABRIC_E_VOLUME_NOT_FOUND""n + * "SerializationError""n * "FABRIC_E_CERTIFICATE_NOT_FOUND""n"n* "n + Possible values of the error code for HTTP status code 503 (Service + Unavailable)"n"n"n * "FABRIC_E_NO_WRITE_QUORUM""n * + "FABRIC_E_NOT_PRIMARY""n * "FABRIC_E_NOT_READY""n * + "FABRIC_E_RECONFIGURATION_PENDING""n * "FABRIC_E_SERVICE_OFFLINE""n + * "E_ABORT""n * "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values + of the error code for HTTP status code 504 (Gateway Timeout)"n"n"n * + "FABRIC_E_COMMUNICATION_ERROR""n * + "FABRIC_E_OPERATION_NOT_COMPLETE""n * "FABRIC_E_TIMEOUT". Known + values are: "FABRIC_E_INVALID_PARTITION_KEY", + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", + "FABRIC_E_APPLICATION_NOT_UPGRADING", + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_FABRIC_NOT_UPGRADING", + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", + "FABRIC_E_PATH_TOO_LONG", "FABRIC_E_KEY_TOO_LARGE", + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", + "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", + "FABRIC_E_NODE_NOT_FOUND", "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", + "FABRIC_E_APPLICATION_NOT_FOUND", "FABRIC_E_SERVICE_TYPE_NOT_FOUND", + "FABRIC_E_SERVICE_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", + "FABRIC_E_PARTITION_NOT_FOUND", "FABRIC_E_REPLICA_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", + "FABRIC_E_DIRECTORY_NOT_FOUND", "FABRIC_E_FABRIC_VERSION_NOT_FOUND", + "FABRIC_E_FILE_NOT_FOUND", "FABRIC_E_NAME_DOES_NOT_EXIST", + "FABRIC_E_PROPERTY_DOES_NOT_EXIST", "FABRIC_E_ENUMERATION_COMPLETED", + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", "FABRIC_E_KEY_NOT_FOUND", + "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", + "FABRIC_E_SERVICE_ALREADY_EXISTS", + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_TYPE_IN_USE", + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", + "FABRIC_E_FABRIC_VERSION_IN_USE", + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", + "FABRIC_E_NAME_ALREADY_EXISTS", "FABRIC_E_NAME_NOT_EMPTY", + "FABRIC_E_PROPERTY_CHECK_FAILED", + "FABRIC_E_SERVICE_METADATA_MISMATCH", + "FABRIC_E_SERVICE_TYPE_MISMATCH", "FABRIC_E_HEALTH_STALE_REPORT", + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", + "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", + "FABRIC_E_NOT_PRIMARY", "FABRIC_E_NOT_READY", + "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", + "E_ABORT", "FABRIC_E_COMMUNICATION_ERROR", + "FABRIC_E_OPERATION_NOT_COMPLETE", "FABRIC_E_TIMEOUT", + "FABRIC_E_NODE_IS_UP", "E_FAIL", "FABRIC_E_BACKUP_IS_ENABLED", + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", + "FABRIC_E_BACKUP_NOT_ENABLED", "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", + "FABRIC_E_BACKUP_IN_PROGRESS", "FABRIC_E_RESTORE_IN_PROGRESS", + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", + "FABRIC_E_VOLUME_ALREADY_EXISTS", "FABRIC_E_VOLUME_NOT_FOUND", + "SerializationError", + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", + "FABRIC_E_CERTIFICATE_NOT_FOUND". + "Message": "str" # Optional. Error message. + }, + "LsnOfLastBackupRecord": "str", # Optional. LSN of the last + record in this backup. + "PartitionInformation": { + "Id": str, # Optional. An internal ID used by + Service Fabric to uniquely identify a partition. This is a randomly + generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the + same service was deleted and recreated the IDs of its partitions + would be different. + ServicePartitionKind: ServicePartitionKind + }, + "ServiceManifestVersion": "str", # Optional. Manifest + Version of the service this partition backup belongs to. + "ServiceName": "str" # Optional. Name of the Service Fabric + service this partition backup belongs to. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_partition_backup_list_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + latest=latest, + start_date_time_filter=start_date_time_filter, + end_date_time_filter=end_date_time_filter, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def suspend_partition_backup( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Suspends periodic backup for the specified partition. + + The partition which is configured to take periodic backups, is suspended for taking further + backups till it is resumed again. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_suspend_partition_backup_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def resume_partition_backup( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Resumes periodic backup of partition which was previously suspended. + + The previously suspended partition resumes taking periodic backup as per the backup policy + currently configured for the same. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_resume_partition_backup_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def backup_partition( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + backup_partition_description: Optional[JSON] = None, + *, + backup_timeout: Optional[int] = 10, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Triggers backup of the partition's state. + + Creates a backup of the stateful persisted partition's state. In case the partition is already + being periodically backed up, then by default the new backup is created at the same backup + storage. One can also override the same by specifying the backup storage details as part of the + request body. Once the backup is initiated, its progress can be tracked using the + GetBackupProgress operation. + In case, the operation times out, specify a greater backup timeout value in the query + parameter. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param backup_partition_description: Describes the parameters to backup the partition now. If + not present, backup operation uses default parameters from the backup policy current associated + with this partition. Default value is None. + :type backup_partition_description: JSON + :keyword backup_timeout: Specifies the maximum amount of time, in minutes, to wait for the + backup operation to complete. Post that, the operation completes with timeout error. However, + in certain corner cases it could be that though the operation returns back timeout, the backup + actually goes through. In case of timeout error, its recommended to invoke this operation again + with a greater timeout value. The default value for the same is 10 minutes. Default value is + 10. + :paramtype backup_timeout: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + backup_partition_description = { + "BackupStorage": { + "FriendlyName": "str", # Optional. Friendly name for this backup + storage. + StorageKind: StorageKind + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + if backup_partition_description is not None: + _json = backup_partition_description + else: + _json = None + + request = build_backup_partition_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + backup_timeout=backup_timeout, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_partition_backup_progress( + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets details for the latest backup triggered for this partition. + + Returns information about the state of the latest backup along with details or failure reason + in case of completion. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "BackupId": str, # Optional. Unique ID of the newly created backup. + "BackupLocation": "str", # Optional. Location, relative to the backup store, + of the newly created backup. + "BackupState": "str", # Optional. Represents the current state of the + partition backup operation. Known values are: "Invalid", "Accepted", + "BackupInProgress", "Success", "Failure", "Timeout". + "EpochOfLastBackupRecord": { + "ConfigurationVersion": "str", # Optional. The current configuration + number of this Epoch. The configuration number is an increasing value that is + updated whenever the configuration of this replica set changes. + "DataLossVersion": "str" # Optional. The current data loss number of + this Epoch. The data loss number property is an increasing value which is + updated whenever data loss is suspected, as when loss of a quorum of replicas + in the replica set that includes the Primary replica. + }, + "FailureError": { + "Code": "str", # Required. Defines the fabric error codes that be + returned as part of the error object in response to Service Fabric API + operations that are not successful. Following are the error code values that + can be returned for a specific HTTP status code."n"n"n* "n Possible values + of the error code for HTTP status code 400 (Bad Request)"n"n"n * + "FABRIC_E_INVALID_PARTITION_KEY""n * + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR""n * "FABRIC_E_INVALID_ADDRESS""n * + "FABRIC_E_APPLICATION_NOT_UPGRADING""n * + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_FABRIC_NOT_UPGRADING""n * + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_CONFIGURATION""n * "FABRIC_E_INVALID_NAME_URI""n * + "FABRIC_E_PATH_TOO_LONG""n * "FABRIC_E_KEY_TOO_LARGE""n * + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED""n * + "FABRIC_E_INVALID_ATOMIC_GROUP""n * "FABRIC_E_VALUE_EMPTY""n * + "FABRIC_E_BACKUP_IS_ENABLED""n * + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH""n * + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES""n * + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY""n * "E_INVALIDARG""n"n* "n + Possible values of the error code for HTTP status code 404 (Not Found)"n"n"n + * "FABRIC_E_NODE_NOT_FOUND""n * "FABRIC_E_APPLICATION_TYPE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_NOT_FOUND""n * "FABRIC_E_SERVICE_TYPE_NOT_FOUND""n * + "FABRIC_E_SERVICE_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND""n * + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND""n * + "FABRIC_E_PARTITION_NOT_FOUND""n * "FABRIC_E_REPLICA_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST""n * + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND""n * + "FABRIC_E_DIRECTORY_NOT_FOUND""n * "FABRIC_E_FABRIC_VERSION_NOT_FOUND""n * + "FABRIC_E_FILE_NOT_FOUND""n * "FABRIC_E_NAME_DOES_NOT_EXIST""n * + "FABRIC_E_PROPERTY_DOES_NOT_EXIST""n * "FABRIC_E_ENUMERATION_COMPLETED""n * + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND""n * "FABRIC_E_KEY_NOT_FOUND""n * + "FABRIC_E_HEALTH_ENTITY_NOT_FOUND""n * "FABRIC_E_BACKUP_NOT_ENABLED""n * + "FABRIC_E_BACKUP_POLICY_NOT_EXISTING""n * + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING""n * + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR""n"n* "n Possible values of + the error code for HTTP status code 409 (Conflict)"n"n"n * + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS""n * + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_SERVICE_ALREADY_EXISTS""n * + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_TYPE_IN_USE""n * + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS""n * + "FABRIC_E_FABRIC_VERSION_IN_USE""n * "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS""n + * "FABRIC_E_NAME_ALREADY_EXISTS""n * "FABRIC_E_NAME_NOT_EMPTY""n * + "FABRIC_E_PROPERTY_CHECK_FAILED""n * "FABRIC_E_SERVICE_METADATA_MISMATCH""n + * "FABRIC_E_SERVICE_TYPE_MISMATCH""n * "FABRIC_E_HEALTH_STALE_REPORT""n * + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED""n * + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET""n * "FABRIC_E_INSTANCE_ID_MISMATCH""n * + "FABRIC_E_BACKUP_IN_PROGRESS""n * "FABRIC_E_RESTORE_IN_PROGRESS""n * + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING""n"n* "n Possible values of the + error code for HTTP status code 413 (Request Entity Too Large)"n"n"n * + "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values of the error code for + HTTP status code 500 (Internal Server Error)"n"n"n * "FABRIC_E_NODE_IS_UP""n + * "E_FAIL""n * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND""n * + "FABRIC_E_VOLUME_ALREADY_EXISTS""n * "FABRIC_E_VOLUME_NOT_FOUND""n * + "SerializationError""n * "FABRIC_E_CERTIFICATE_NOT_FOUND""n"n* "n Possible + values of the error code for HTTP status code 503 (Service Unavailable)"n"n"n + * "FABRIC_E_NO_WRITE_QUORUM""n * "FABRIC_E_NOT_PRIMARY""n * + "FABRIC_E_NOT_READY""n * "FABRIC_E_RECONFIGURATION_PENDING""n * + "FABRIC_E_SERVICE_OFFLINE""n * "E_ABORT""n * + "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values of the error code for + HTTP status code 504 (Gateway Timeout)"n"n"n * + "FABRIC_E_COMMUNICATION_ERROR""n * "FABRIC_E_OPERATION_NOT_COMPLETE""n * + "FABRIC_E_TIMEOUT". Known values are: "FABRIC_E_INVALID_PARTITION_KEY", + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", + "FABRIC_E_APPLICATION_NOT_UPGRADING", + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_FABRIC_NOT_UPGRADING", "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", + "FABRIC_E_PATH_TOO_LONG", "FABRIC_E_KEY_TOO_LARGE", + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", + "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", + "FABRIC_E_NODE_NOT_FOUND", "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", + "FABRIC_E_APPLICATION_NOT_FOUND", "FABRIC_E_SERVICE_TYPE_NOT_FOUND", + "FABRIC_E_SERVICE_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", "FABRIC_E_PARTITION_NOT_FOUND", + "FABRIC_E_REPLICA_DOES_NOT_EXIST", "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", "FABRIC_E_DIRECTORY_NOT_FOUND", + "FABRIC_E_FABRIC_VERSION_NOT_FOUND", "FABRIC_E_FILE_NOT_FOUND", + "FABRIC_E_NAME_DOES_NOT_EXIST", "FABRIC_E_PROPERTY_DOES_NOT_EXIST", + "FABRIC_E_ENUMERATION_COMPLETED", "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", + "FABRIC_E_KEY_NOT_FOUND", "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", + "FABRIC_E_SERVICE_ALREADY_EXISTS", "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_TYPE_IN_USE", + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", "FABRIC_E_FABRIC_VERSION_IN_USE", + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", "FABRIC_E_NAME_ALREADY_EXISTS", + "FABRIC_E_NAME_NOT_EMPTY", "FABRIC_E_PROPERTY_CHECK_FAILED", + "FABRIC_E_SERVICE_METADATA_MISMATCH", "FABRIC_E_SERVICE_TYPE_MISMATCH", + "FABRIC_E_HEALTH_STALE_REPORT", "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", + "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", + "FABRIC_E_NOT_PRIMARY", "FABRIC_E_NOT_READY", + "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", "E_ABORT", + "FABRIC_E_COMMUNICATION_ERROR", "FABRIC_E_OPERATION_NOT_COMPLETE", + "FABRIC_E_TIMEOUT", "FABRIC_E_NODE_IS_UP", "E_FAIL", + "FABRIC_E_BACKUP_IS_ENABLED", + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", "FABRIC_E_BACKUP_NOT_ENABLED", + "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", + "FABRIC_E_BACKUP_IN_PROGRESS", "FABRIC_E_RESTORE_IN_PROGRESS", + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", + "FABRIC_E_VOLUME_ALREADY_EXISTS", "FABRIC_E_VOLUME_NOT_FOUND", + "SerializationError", "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", + "FABRIC_E_CERTIFICATE_NOT_FOUND". + "Message": "str" # Optional. Error message. + }, + "LsnOfLastBackupRecord": "str", # Optional. The LSN of last record included + in backup. + "TimeStampUtc": "2020-02-20 00:00:00" # Optional. TimeStamp in UTC when + operation succeeded or failed. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_partition_backup_progress_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def restore_partition( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + restore_partition_description: JSON, + *, + restore_timeout: Optional[int] = 10, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Triggers restore of the state of the partition using the specified restore partition + description. + + Restores the state of a of the stateful persisted partition using the specified backup point. + In case the partition is already being periodically backed up, then by default the backup point + is looked for in the storage specified in backup policy. One can also override the same by + specifying the backup storage details as part of the restore partition description in body. + Once the restore is initiated, its progress can be tracked using the GetRestoreProgress + operation. + In case, the operation times out, specify a greater restore timeout value in the query + parameter. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param restore_partition_description: Describes the parameters to restore the partition. + :type restore_partition_description: JSON + :keyword restore_timeout: Specifies the maximum amount of time to wait, in minutes, for the + restore operation to complete. Post that, the operation returns back with timeout error. + However, in certain corner cases it could be that the restore operation goes through even + though it completes with timeout. In case of timeout error, its recommended to invoke this + operation again with a greater timeout value. the default value for the same is 10 minutes. + Default value is 10. + :paramtype restore_timeout: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + restore_partition_description = { + "BackupId": str, # Required. Unique backup ID. + "BackupLocation": "str", # Required. Location of the backup relative to the + backup storage specified/ configured. + "BackupStorage": { + "FriendlyName": "str", # Optional. Friendly name for this backup + storage. + StorageKind: StorageKind + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = restore_partition_description + + request = build_restore_partition_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + restore_timeout=restore_timeout, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_partition_restore_progress( + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets details for the latest restore operation triggered for this partition. + + Returns information about the state of the latest restore operation along with details or + failure reason in case of completion. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "FailureError": { + "Code": "str", # Required. Defines the fabric error codes that be + returned as part of the error object in response to Service Fabric API + operations that are not successful. Following are the error code values that + can be returned for a specific HTTP status code."n"n"n* "n Possible values + of the error code for HTTP status code 400 (Bad Request)"n"n"n * + "FABRIC_E_INVALID_PARTITION_KEY""n * + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR""n * "FABRIC_E_INVALID_ADDRESS""n * + "FABRIC_E_APPLICATION_NOT_UPGRADING""n * + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_FABRIC_NOT_UPGRADING""n * + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_CONFIGURATION""n * "FABRIC_E_INVALID_NAME_URI""n * + "FABRIC_E_PATH_TOO_LONG""n * "FABRIC_E_KEY_TOO_LARGE""n * + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED""n * + "FABRIC_E_INVALID_ATOMIC_GROUP""n * "FABRIC_E_VALUE_EMPTY""n * + "FABRIC_E_BACKUP_IS_ENABLED""n * + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH""n * + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES""n * + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY""n * "E_INVALIDARG""n"n* "n + Possible values of the error code for HTTP status code 404 (Not Found)"n"n"n + * "FABRIC_E_NODE_NOT_FOUND""n * "FABRIC_E_APPLICATION_TYPE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_NOT_FOUND""n * "FABRIC_E_SERVICE_TYPE_NOT_FOUND""n * + "FABRIC_E_SERVICE_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND""n * + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND""n * + "FABRIC_E_PARTITION_NOT_FOUND""n * "FABRIC_E_REPLICA_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST""n * + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND""n * + "FABRIC_E_DIRECTORY_NOT_FOUND""n * "FABRIC_E_FABRIC_VERSION_NOT_FOUND""n * + "FABRIC_E_FILE_NOT_FOUND""n * "FABRIC_E_NAME_DOES_NOT_EXIST""n * + "FABRIC_E_PROPERTY_DOES_NOT_EXIST""n * "FABRIC_E_ENUMERATION_COMPLETED""n * + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND""n * "FABRIC_E_KEY_NOT_FOUND""n * + "FABRIC_E_HEALTH_ENTITY_NOT_FOUND""n * "FABRIC_E_BACKUP_NOT_ENABLED""n * + "FABRIC_E_BACKUP_POLICY_NOT_EXISTING""n * + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING""n * + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR""n"n* "n Possible values of + the error code for HTTP status code 409 (Conflict)"n"n"n * + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS""n * + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_SERVICE_ALREADY_EXISTS""n * + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_TYPE_IN_USE""n * + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS""n * + "FABRIC_E_FABRIC_VERSION_IN_USE""n * "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS""n + * "FABRIC_E_NAME_ALREADY_EXISTS""n * "FABRIC_E_NAME_NOT_EMPTY""n * + "FABRIC_E_PROPERTY_CHECK_FAILED""n * "FABRIC_E_SERVICE_METADATA_MISMATCH""n + * "FABRIC_E_SERVICE_TYPE_MISMATCH""n * "FABRIC_E_HEALTH_STALE_REPORT""n * + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED""n * + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET""n * "FABRIC_E_INSTANCE_ID_MISMATCH""n * + "FABRIC_E_BACKUP_IN_PROGRESS""n * "FABRIC_E_RESTORE_IN_PROGRESS""n * + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING""n"n* "n Possible values of the + error code for HTTP status code 413 (Request Entity Too Large)"n"n"n * + "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values of the error code for + HTTP status code 500 (Internal Server Error)"n"n"n * "FABRIC_E_NODE_IS_UP""n + * "E_FAIL""n * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND""n * + "FABRIC_E_VOLUME_ALREADY_EXISTS""n * "FABRIC_E_VOLUME_NOT_FOUND""n * + "SerializationError""n * "FABRIC_E_CERTIFICATE_NOT_FOUND""n"n* "n Possible + values of the error code for HTTP status code 503 (Service Unavailable)"n"n"n + * "FABRIC_E_NO_WRITE_QUORUM""n * "FABRIC_E_NOT_PRIMARY""n * + "FABRIC_E_NOT_READY""n * "FABRIC_E_RECONFIGURATION_PENDING""n * + "FABRIC_E_SERVICE_OFFLINE""n * "E_ABORT""n * + "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values of the error code for + HTTP status code 504 (Gateway Timeout)"n"n"n * + "FABRIC_E_COMMUNICATION_ERROR""n * "FABRIC_E_OPERATION_NOT_COMPLETE""n * + "FABRIC_E_TIMEOUT". Known values are: "FABRIC_E_INVALID_PARTITION_KEY", + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", + "FABRIC_E_APPLICATION_NOT_UPGRADING", + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_FABRIC_NOT_UPGRADING", "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", + "FABRIC_E_PATH_TOO_LONG", "FABRIC_E_KEY_TOO_LARGE", + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", + "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", + "FABRIC_E_NODE_NOT_FOUND", "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", + "FABRIC_E_APPLICATION_NOT_FOUND", "FABRIC_E_SERVICE_TYPE_NOT_FOUND", + "FABRIC_E_SERVICE_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", "FABRIC_E_PARTITION_NOT_FOUND", + "FABRIC_E_REPLICA_DOES_NOT_EXIST", "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", "FABRIC_E_DIRECTORY_NOT_FOUND", + "FABRIC_E_FABRIC_VERSION_NOT_FOUND", "FABRIC_E_FILE_NOT_FOUND", + "FABRIC_E_NAME_DOES_NOT_EXIST", "FABRIC_E_PROPERTY_DOES_NOT_EXIST", + "FABRIC_E_ENUMERATION_COMPLETED", "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", + "FABRIC_E_KEY_NOT_FOUND", "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", + "FABRIC_E_SERVICE_ALREADY_EXISTS", "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_TYPE_IN_USE", + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", "FABRIC_E_FABRIC_VERSION_IN_USE", + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", "FABRIC_E_NAME_ALREADY_EXISTS", + "FABRIC_E_NAME_NOT_EMPTY", "FABRIC_E_PROPERTY_CHECK_FAILED", + "FABRIC_E_SERVICE_METADATA_MISMATCH", "FABRIC_E_SERVICE_TYPE_MISMATCH", + "FABRIC_E_HEALTH_STALE_REPORT", "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", + "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", + "FABRIC_E_NOT_PRIMARY", "FABRIC_E_NOT_READY", + "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", "E_ABORT", + "FABRIC_E_COMMUNICATION_ERROR", "FABRIC_E_OPERATION_NOT_COMPLETE", + "FABRIC_E_TIMEOUT", "FABRIC_E_NODE_IS_UP", "E_FAIL", + "FABRIC_E_BACKUP_IS_ENABLED", + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", "FABRIC_E_BACKUP_NOT_ENABLED", + "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", + "FABRIC_E_BACKUP_IN_PROGRESS", "FABRIC_E_RESTORE_IN_PROGRESS", + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", + "FABRIC_E_VOLUME_ALREADY_EXISTS", "FABRIC_E_VOLUME_NOT_FOUND", + "SerializationError", "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", + "FABRIC_E_CERTIFICATE_NOT_FOUND". + "Message": "str" # Optional. Error message. + }, + "RestoreState": "str", # Optional. Represents the current state of the + partition restore operation. Known values are: "Invalid", "Accepted", + "RestoreInProgress", "Success", "Failure", "Timeout". + "RestoredEpoch": { + "ConfigurationVersion": "str", # Optional. The current configuration + number of this Epoch. The configuration number is an increasing value that is + updated whenever the configuration of this replica set changes. + "DataLossVersion": "str" # Optional. The current data loss number of + this Epoch. The data loss number property is an increasing value which is + updated whenever data loss is suspected, as when loss of a quorum of replicas + in the replica set that includes the Primary replica. + }, + "RestoredLsn": "str", # Optional. Restored LSN. + "TimeStampUtc": "2020-02-20 00:00:00" # Optional. Timestamp when operation + succeeded or failed. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_partition_restore_progress_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_backups_from_backup_location( + self, + get_backup_by_storage_query_description: JSON, + *, + timeout: Optional[int] = 60, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + **kwargs: Any + ) -> JSON: + """Gets the list of backups available for the specified backed up entity at the specified backup + location. + + Gets the list of backups available for the specified backed up entity (Application, Service or + Partition) at the specified backup location (FileShare or Azure Blob Storage). + + :param get_backup_by_storage_query_description: Describes the filters and backup storage + details to be used for enumerating backups. + :type get_backup_by_storage_query_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + get_backup_by_storage_query_description = { + "BackupEntity": { + EntityKind: EntityKind + }, + "EndDateTimeFilter": "2020-02-20 00:00:00", # Optional. Specifies the end + date time in ISO8601 till which to enumerate backups. If not specified, backups + are enumerated till the end. + "Latest": bool, # Optional. If specified as true, gets the most recent + backup (within the specified time range) for every partition under the specified + backup entity. + "StartDateTimeFilter": "2020-02-20 00:00:00", # Optional. Specifies the + start date time in ISO8601 from which to enumerate backups. If not specified, + backups are enumerated from the beginning. + "Storage": { + "FriendlyName": "str", # Optional. Friendly name for this backup + storage. + StorageKind: StorageKind + } + } + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "ApplicationName": "str", # Optional. Name of the Service + Fabric application this partition backup belongs to. + "BackupChainId": str, # Optional. Unique backup chain ID. + All backups part of the same chain has the same backup chain id. A backup + chain is comprised of 1 full backup and multiple incremental backups. + "BackupId": str, # Optional. Unique backup ID . + "BackupLocation": "str", # Optional. Location of the backup, + relative to the backup store. + "BackupType": "str", # Optional. Describes the type of + backup, whether its full or incremental. Known values are: "Invalid", + "Full", "Incremental". + "CreationTimeUtc": "2020-02-20 00:00:00", # Optional. The + date time when this backup was taken. + "EpochOfLastBackupRecord": { + "ConfigurationVersion": "str", # Optional. The + current configuration number of this Epoch. The configuration number + is an increasing value that is updated whenever the configuration of + this replica set changes. + "DataLossVersion": "str" # Optional. The current + data loss number of this Epoch. The data loss number property is an + increasing value which is updated whenever data loss is suspected, as + when loss of a quorum of replicas in the replica set that includes + the Primary replica. + }, + "FailureError": { + "Code": "str", # Required. Defines the fabric error + codes that be returned as part of the error object in response to + Service Fabric API operations that are not successful. Following are + the error code values that can be returned for a specific HTTP status + code."n"n"n* "n Possible values of the error code for HTTP status + code 400 (Bad Request)"n"n"n * "FABRIC_E_INVALID_PARTITION_KEY""n * + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_ADDRESS""n * + "FABRIC_E_APPLICATION_NOT_UPGRADING""n * + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_FABRIC_NOT_UPGRADING""n * + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_CONFIGURATION""n * "FABRIC_E_INVALID_NAME_URI""n + * "FABRIC_E_PATH_TOO_LONG""n * "FABRIC_E_KEY_TOO_LARGE""n * + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED""n * + "FABRIC_E_INVALID_ATOMIC_GROUP""n * "FABRIC_E_VALUE_EMPTY""n * + "FABRIC_E_BACKUP_IS_ENABLED""n * + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH""n * + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES""n * + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY""n * "E_INVALIDARG""n"n* "n + Possible values of the error code for HTTP status code 404 (Not + Found)"n"n"n * "FABRIC_E_NODE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_TYPE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_NOT_FOUND""n * + "FABRIC_E_SERVICE_TYPE_NOT_FOUND""n * + "FABRIC_E_SERVICE_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND""n * + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND""n * + "FABRIC_E_PARTITION_NOT_FOUND""n * + "FABRIC_E_REPLICA_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST""n * + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND""n * + "FABRIC_E_DIRECTORY_NOT_FOUND""n * + "FABRIC_E_FABRIC_VERSION_NOT_FOUND""n * "FABRIC_E_FILE_NOT_FOUND""n + * "FABRIC_E_NAME_DOES_NOT_EXIST""n * + "FABRIC_E_PROPERTY_DOES_NOT_EXIST""n * + "FABRIC_E_ENUMERATION_COMPLETED""n * + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND""n * "FABRIC_E_KEY_NOT_FOUND""n + * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND""n * + "FABRIC_E_BACKUP_NOT_ENABLED""n * + "FABRIC_E_BACKUP_POLICY_NOT_EXISTING""n * + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING""n * + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR""n"n* "n Possible + values of the error code for HTTP status code 409 (Conflict)"n"n"n * + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS""n * + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_SERVICE_ALREADY_EXISTS""n * + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_TYPE_IN_USE""n * + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS""n * + "FABRIC_E_FABRIC_VERSION_IN_USE""n * + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_NAME_ALREADY_EXISTS""n * "FABRIC_E_NAME_NOT_EMPTY""n * + "FABRIC_E_PROPERTY_CHECK_FAILED""n * + "FABRIC_E_SERVICE_METADATA_MISMATCH""n * + "FABRIC_E_SERVICE_TYPE_MISMATCH""n * + "FABRIC_E_HEALTH_STALE_REPORT""n * + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED""n * + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET""n * + "FABRIC_E_INSTANCE_ID_MISMATCH""n * "FABRIC_E_BACKUP_IN_PROGRESS""n + * "FABRIC_E_RESTORE_IN_PROGRESS""n * + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING""n"n* "n Possible values of + the error code for HTTP status code 413 (Request Entity Too + Large)"n"n"n * "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values + of the error code for HTTP status code 500 (Internal Server + Error)"n"n"n * "FABRIC_E_NODE_IS_UP""n * "E_FAIL""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND""n * + "FABRIC_E_VOLUME_ALREADY_EXISTS""n * "FABRIC_E_VOLUME_NOT_FOUND""n + * "SerializationError""n * "FABRIC_E_CERTIFICATE_NOT_FOUND""n"n* "n + Possible values of the error code for HTTP status code 503 (Service + Unavailable)"n"n"n * "FABRIC_E_NO_WRITE_QUORUM""n * + "FABRIC_E_NOT_PRIMARY""n * "FABRIC_E_NOT_READY""n * + "FABRIC_E_RECONFIGURATION_PENDING""n * "FABRIC_E_SERVICE_OFFLINE""n + * "E_ABORT""n * "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values + of the error code for HTTP status code 504 (Gateway Timeout)"n"n"n * + "FABRIC_E_COMMUNICATION_ERROR""n * + "FABRIC_E_OPERATION_NOT_COMPLETE""n * "FABRIC_E_TIMEOUT". Known + values are: "FABRIC_E_INVALID_PARTITION_KEY", + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", + "FABRIC_E_APPLICATION_NOT_UPGRADING", + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_FABRIC_NOT_UPGRADING", + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", + "FABRIC_E_PATH_TOO_LONG", "FABRIC_E_KEY_TOO_LARGE", + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", + "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", + "FABRIC_E_NODE_NOT_FOUND", "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", + "FABRIC_E_APPLICATION_NOT_FOUND", "FABRIC_E_SERVICE_TYPE_NOT_FOUND", + "FABRIC_E_SERVICE_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", + "FABRIC_E_PARTITION_NOT_FOUND", "FABRIC_E_REPLICA_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", + "FABRIC_E_DIRECTORY_NOT_FOUND", "FABRIC_E_FABRIC_VERSION_NOT_FOUND", + "FABRIC_E_FILE_NOT_FOUND", "FABRIC_E_NAME_DOES_NOT_EXIST", + "FABRIC_E_PROPERTY_DOES_NOT_EXIST", "FABRIC_E_ENUMERATION_COMPLETED", + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", "FABRIC_E_KEY_NOT_FOUND", + "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", + "FABRIC_E_SERVICE_ALREADY_EXISTS", + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_TYPE_IN_USE", + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", + "FABRIC_E_FABRIC_VERSION_IN_USE", + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", + "FABRIC_E_NAME_ALREADY_EXISTS", "FABRIC_E_NAME_NOT_EMPTY", + "FABRIC_E_PROPERTY_CHECK_FAILED", + "FABRIC_E_SERVICE_METADATA_MISMATCH", + "FABRIC_E_SERVICE_TYPE_MISMATCH", "FABRIC_E_HEALTH_STALE_REPORT", + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", + "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", + "FABRIC_E_NOT_PRIMARY", "FABRIC_E_NOT_READY", + "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", + "E_ABORT", "FABRIC_E_COMMUNICATION_ERROR", + "FABRIC_E_OPERATION_NOT_COMPLETE", "FABRIC_E_TIMEOUT", + "FABRIC_E_NODE_IS_UP", "E_FAIL", "FABRIC_E_BACKUP_IS_ENABLED", + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", + "FABRIC_E_BACKUP_NOT_ENABLED", "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", + "FABRIC_E_BACKUP_IN_PROGRESS", "FABRIC_E_RESTORE_IN_PROGRESS", + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", + "FABRIC_E_VOLUME_ALREADY_EXISTS", "FABRIC_E_VOLUME_NOT_FOUND", + "SerializationError", + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", + "FABRIC_E_CERTIFICATE_NOT_FOUND". + "Message": "str" # Optional. Error message. + }, + "LsnOfLastBackupRecord": "str", # Optional. LSN of the last + record in this backup. + "PartitionInformation": { + "Id": str, # Optional. An internal ID used by + Service Fabric to uniquely identify a partition. This is a randomly + generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the + same service was deleted and recreated the IDs of its partitions + would be different. + ServicePartitionKind: ServicePartitionKind + }, + "ServiceManifestVersion": "str", # Optional. Manifest + Version of the service this partition backup belongs to. + "ServiceName": "str" # Optional. Name of the Service Fabric + service this partition backup belongs to. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = get_backup_by_storage_query_description + + request = build_get_backups_from_backup_location_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def create_name( # pylint: disable=inconsistent-return-statements + self, + name_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates a Service Fabric name. + + Creates the specified Service Fabric name. + + :param name_description: Describes the Service Fabric name to be created. + :type name_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + name_description = { + "Name": "str" # Required. The Service Fabric name, including the 'fabric:' + URI scheme. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = name_description + + request = build_create_name_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_name_exists_info( # pylint: disable=inconsistent-return-statements + self, + name_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Returns whether the Service Fabric name exists. + + Returns whether the specified Service Fabric name exists. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_get_name_exists_info_request( + name_id=name_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def delete_name( # pylint: disable=inconsistent-return-statements + self, + name_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes a Service Fabric name. + + Deletes the specified Service Fabric name. A name must be created before it can be deleted. + Deleting a name with child properties will fail. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_delete_name_request( + name_id=name_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_sub_name_info_list( + self, + name_id: str, + *, + recursive: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Enumerates all the Service Fabric names under a given name. + + Enumerates all the Service Fabric names under a given name. If the subnames do not fit in a + page, one page of results is returned as well as a continuation token, which can be used to get + the next page. Querying a name that doesn't exist will fail. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :keyword recursive: Allows specifying that the search performed should be recursive. Default + value is False. + :paramtype recursive: bool + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "IsConsistent": bool, # Optional. Indicates whether any name under the given + name has been modified during the enumeration. If there was a modification, this + property value is false. + "SubNames": [ + "str" # Optional. List of the child names. + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_sub_name_info_list_request( + name_id=name_id, + api_version=api_version, + recursive=recursive, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_property_info_list( + self, + name_id: str, + *, + include_values: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets information on all Service Fabric properties under a given name. + + A Service Fabric name can have one or more named properties that store custom information. This + operation gets the information about these properties in a paged list. The information includes + name, value, and metadata about each of the properties. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :keyword include_values: Allows specifying whether to include the values of the properties + returned. True if values should be returned with the metadata; False to return only property + metadata. Default value is False. + :paramtype include_values: bool + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "IsConsistent": bool, # Optional. Indicates whether any property under the + given name has been modified during the enumeration. If there was a modification, + this property value is false. + "Properties": [ + { + "Metadata": { + "CustomTypeId": "str", # Optional. The property's + custom type ID. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. Represents when the Property was last modified. Only write + operations will cause this field to be updated. + "Parent": "str", # Optional. The name of the parent + Service Fabric Name for the property. It could be thought of as the + name-space/table under which the property exists. + "SequenceNumber": "str", # Optional. The version of + the property. Every time a property is modified, its sequence number + is increased. + "SizeInBytes": 0, # Optional. The length of the + serialized property value. + "TypeId": "str" # Optional. The kind of property, + determined by the type of data. Following are the possible values. + Known values are: "Invalid", "Binary", "Int64", "Double", "String", + "Guid". + }, + "Name": "str", # Required. The name of the Service Fabric + property. + "Value": { + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_property_info_list_request( + name_id=name_id, + api_version=api_version, + include_values=include_values, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def put_property( # pylint: disable=inconsistent-return-statements + self, + name_id: str, + property_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates or updates a Service Fabric property. + + Creates or updates the specified Service Fabric property under a given name. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param property_description: Describes the Service Fabric property to be created. + :type property_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + property_description = { + "CustomTypeId": "str", # Optional. The property's custom type ID. Using this + property, the user is able to tag the type of the value of the property. + "PropertyName": "str", # Required. The name of the Service Fabric property. + "Value": { + Kind: Kind + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = property_description + + request = build_put_property_request( + name_id=name_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def get_property_info( + self, + name_id: str, + *, + property_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the specified Service Fabric property. + + Gets the specified Service Fabric property under a given name. This will always return both + value and metadata. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :keyword property_name: Specifies the name of the property to get. + :paramtype property_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Metadata": { + "CustomTypeId": "str", # Optional. The property's custom type ID. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # Optional. + Represents when the Property was last modified. Only write operations will + cause this field to be updated. + "Parent": "str", # Optional. The name of the parent Service Fabric + Name for the property. It could be thought of as the name-space/table under + which the property exists. + "SequenceNumber": "str", # Optional. The version of the property. + Every time a property is modified, its sequence number is increased. + "SizeInBytes": 0, # Optional. The length of the serialized property + value. + "TypeId": "str" # Optional. The kind of property, determined by the + type of data. Following are the possible values. Known values are: "Invalid", + "Binary", "Int64", "Double", "String", "Guid". + }, + "Name": "str", # Required. The name of the Service Fabric property. + "Value": { + Kind: Kind + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_property_info_request( + name_id=name_id, + api_version=api_version, + property_name=property_name, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def delete_property( # pylint: disable=inconsistent-return-statements + self, + name_id: str, + *, + property_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes the specified Service Fabric property. + + Deletes the specified Service Fabric property under a given name. A property must be created + before it can be deleted. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :keyword property_name: Specifies the name of the property to get. + :paramtype property_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_delete_property_request( + name_id=name_id, + api_version=api_version, + property_name=property_name, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def submit_property_batch( + self, + name_id: str, + property_batch_description_list: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Submits a property batch. + + Submits a batch of property operations. Either all or none of the operations will be committed. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param property_batch_description_list: Describes the property batch operations to be + submitted. + :type property_batch_description_list: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + property_batch_description_list = { + "Operations": [ + { + "PropertyName": "str", # Required. The name of the Service + Fabric property. + Kind: Kind + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "Properties": { + "str": { + "Metadata": { + "CustomTypeId": "str", # Optional. The property's + custom type ID. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. Represents when the Property was last modified. Only write + operations will cause this field to be updated. + "Parent": "str", # Optional. The name of the parent + Service Fabric Name for the property. It could be thought of as the + name-space/table under which the property exists. + "SequenceNumber": "str", # Optional. The version of + the property. Every time a property is modified, its sequence number + is increased. + "SizeInBytes": 0, # Optional. The length of the + serialized property value. + "TypeId": "str" # Optional. The kind of property, + determined by the type of data. Following are the possible values. + Known values are: "Invalid", "Binary", "Int64", "Double", "String", + "Guid". + }, + "Name": "str", # Required. The name of the Service Fabric + property. + "Value": { + Kind: Kind + } + } + }, + Kind: Successful + } + # response body for status code(s): 409 + response.json() == { + "ErrorMessage": "str", # Optional. The error message of the failed + operation. Describes the exception thrown due to the first unsuccessful operation + in the property batch. + "OperationIndex": 0, # Optional. The index of the unsuccessful operation in + the property batch. + Kind: Failed + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = property_batch_description_list + + request = build_submit_property_batch_request( + name_id=name_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 409]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 409: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_cluster_event_list( + self, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets all Cluster-related events. + + The response is list of ClusterEvent objects. + + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: ClusterEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_cluster_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def get_containers_event_list( + self, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets all Containers-related events. + + The response is list of ContainerInstanceEvent objects. + + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2-preview'. Default value is "6.2-preview". Note that overriding this default value may + result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: ContainerInstanceEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2-preview")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_containers_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def get_node_event_list( + self, + node_name: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets a Node-related events. + + The response is list of NodeEvent objects. + + :param node_name: The name of the node. + :type node_name: str + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "NodeName": "str", # Required. The name of a Service Fabric node. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: NodeEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_node_event_list_request( + node_name=node_name, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def get_nodes_event_list( + self, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets all Nodes-related Events. + + The response is list of NodeEvent objects. + + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "NodeName": "str", # Required. The name of a Service Fabric node. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: NodeEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_nodes_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def get_application_event_list( + self, + application_id: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets an Application-related events. + + The response is list of ApplicationEvent objects. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "ApplicationId": "str", # Required. The identity of the application. + This is an encoded representation of the application name. This is used in + the REST APIs to identify the application resource."nStarting in version 6.0, + hierarchical names are delimited with the "~" character. For example, if the + application name is "fabric:/myapp/app1","nthe application identity would be + "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: ApplicationEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_application_event_list_request( + application_id=application_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def get_applications_event_list( + self, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets all Applications-related events. + + The response is list of ApplicationEvent objects. + + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "ApplicationId": "str", # Required. The identity of the application. + This is an encoded representation of the application name. This is used in + the REST APIs to identify the application resource."nStarting in version 6.0, + hierarchical names are delimited with the "~" character. For example, if the + application name is "fabric:/myapp/app1","nthe application identity would be + "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: ApplicationEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_applications_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def get_service_event_list( + self, + service_id: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets a Service-related events. + + The response is list of ServiceEvent objects. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "ServiceId": "str", # 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."nStarting in version 6.0, hierarchical + names are delimited with the "~" character. For example, if the service name + is "fabric:/myapp/app1/svc1","nthe service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: ServiceEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_service_event_list_request( + service_id=service_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def get_services_event_list( + self, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets all Services-related events. + + The response is list of ServiceEvent objects. + + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "ServiceId": "str", # 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."nStarting in version 6.0, hierarchical + names are delimited with the "~" character. For example, if the service name + is "fabric:/myapp/app1/svc1","nthe service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: ServiceEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_services_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def get_partition_event_list( + self, + partition_id: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets a Partition-related events. + + The response is list of PartitionEvent objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "PartitionId": str, # Required. An internal ID used by Service + Fabric to uniquely identify a partition. This is a randomly generated GUID + when the service was created. The partition ID is unique and does not change + for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: PartitionEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_partition_event_list_request( + partition_id=partition_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def get_partitions_event_list( + self, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets all Partitions-related events. + + The response is list of PartitionEvent objects. + + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "PartitionId": str, # Required. An internal ID used by Service + Fabric to uniquely identify a partition. This is a randomly generated GUID + when the service was created. The partition ID is unique and does not change + for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: PartitionEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_partitions_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def get_partition_replica_event_list( + self, + partition_id: str, + replica_id: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets a Partition Replica-related events. + + The response is list of ReplicaEvent objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "PartitionId": str, # Required. An internal ID used by Service + Fabric to uniquely identify a partition. This is a randomly generated GUID + when the service was created. The partition ID is unique and does not change + for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + "ReplicaId": 0.0, # Required. Id of a stateful service replica. + ReplicaId is used by Service Fabric to uniquely identify a replica of a + partition. It is unique within a partition and does not change for the + lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different + value for the id. Sometimes the id of a stateless service instance is also + referred as a replica id. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: ReplicaEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_partition_replica_event_list_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def get_partition_replicas_event_list( + self, + partition_id: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets all Replicas-related events for a Partition. + + The response is list of ReplicaEvent objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "PartitionId": str, # Required. An internal ID used by Service + Fabric to uniquely identify a partition. This is a randomly generated GUID + when the service was created. The partition ID is unique and does not change + for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + "ReplicaId": 0.0, # Required. Id of a stateful service replica. + ReplicaId is used by Service Fabric to uniquely identify a replica of a + partition. It is unique within a partition and does not change for the + lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different + value for the id. Sometimes the id of a stateless service instance is also + referred as a replica id. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: ReplicaEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_partition_replicas_event_list_request( + partition_id=partition_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace_async + async def get_correlated_event_list( + self, + event_instance_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets all correlated events for a given event. + + The response is list of FabricEvents. + + :param event_instance_id: The EventInstanceId. + :type event_instance_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: Kind + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_correlated_event_list_request( + event_instance_id=event_instance_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + +class MeshSecretOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_secret` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def create_or_update( + self, + secret_resource_name: str, + secret_resource_description: JSON, + **kwargs: Any + ) -> Optional[JSON]: + """Creates or updates a Secret resource. + + Creates a Secret resource with the specified name, description and properties. If Secret + resource with the same name exists, then it is updated with the specified description and + properties. Once created, the kind and contentType of a secret resource cannot be updated. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_resource_description: Description for creating a secret resource. + :type secret_resource_description: JSON + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + secret_resource_description = { + "name": "str", # Required. Name of the Secret resource. + "properties": { + "contentType": "str", # Optional. The type of the content stored in + the secret value. The value of this property is opaque to Service Fabric. + Once set, the value of this property cannot be changed. + "description": "str", # Optional. User readable description of the + secret. + "status": "str", # Optional. Status of the resource. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the secret. + kind: SecretResourceProperties + } + } + + # response body for status code(s): 200, 201 + response.json() == { + "name": "str", # Required. Name of the Secret resource. + "properties": { + "contentType": "str", # Optional. The type of the content stored in + the secret value. The value of this property is opaque to Service Fabric. + Once set, the value of this property cannot be changed. + "description": "str", # Optional. User readable description of the + secret. + "status": "str", # Optional. Status of the resource. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the secret. + kind: SecretResourceProperties + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + _json = secret_resource_description + + request = build_mesh_secret_create_or_update_request( + secret_resource_name=secret_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 201: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace_async + async def get( + self, + secret_resource_name: str, + **kwargs: Any + ) -> JSON: + """Gets the Secret resource with the given name. + + Gets the information about the Secret resource with the given name. The information include the + description and other properties of the Secret. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "name": "str", # Required. Name of the Secret resource. + "properties": { + "contentType": "str", # Optional. The type of the content stored in + the secret value. The value of this property is opaque to Service Fabric. + Once set, the value of this property cannot be changed. + "description": "str", # Optional. User readable description of the + secret. + "status": "str", # Optional. Status of the resource. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the secret. + kind: SecretResourceProperties + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_secret_get_request( + secret_resource_name=secret_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + secret_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the Secret resource. + + Deletes the specified Secret resource and all of its named values. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_mesh_secret_delete_request( + secret_resource_name=secret_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def list( + self, + **kwargs: Any + ) -> JSON: + """Lists all the secret resources. + + Gets the information about all secret resources in a given resource group. The information + include the description and other properties of the Secret. + + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "name": "str", # Required. Name of the Secret resource. + "properties": { + "contentType": "str", # Optional. The type of the + content stored in the secret value. The value of this property is + opaque to Service Fabric. Once set, the value of this property cannot + be changed. + "description": "str", # Optional. User readable + description of the secret. + "status": "str", # Optional. Status of the resource. + Known values are: "Unknown", "Ready", "Upgrading", "Creating", + "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional + information about the current status of the secret. + kind: SecretResourceProperties + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_secret_list_request( + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + +class MeshSecretValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_secret_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def add_value( + self, + secret_resource_name: str, + secret_value_resource_name: str, + secret_value_resource_description: JSON, + **kwargs: Any + ) -> Optional[JSON]: + """Adds the specified value as a new version of the specified secret resource. + + Creates a new value of the specified secret resource. The name of the value is typically the + version identifier. Once created the value cannot be changed. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource value which is typically the + version identifier for the value. + :type secret_value_resource_name: str + :param secret_value_resource_description: Description for creating a value of a secret + resource. + :type secret_value_resource_description: JSON + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + secret_value_resource_description = { + "name": "str", # Required. Version identifier of the secret value. + "properties": { + "value": "str" # Optional. The actual value of the secret. + } + } + + # response body for status code(s): 200, 201 + response.json() == { + "name": "str", # Required. Version identifier of the secret value. + "properties": { + "value": "str" # Optional. The actual value of the secret. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + _json = secret_value_resource_description + + request = build_mesh_secret_value_add_value_request( + secret_resource_name=secret_resource_name, + secret_value_resource_name=secret_value_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 201: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace_async + async def get( + self, + secret_resource_name: str, + secret_value_resource_name: str, + **kwargs: Any + ) -> JSON: + """Gets the specified secret value resource. + + Get the information about the specified named secret value resources. The information does not + include the actual value of the secret. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource value which is typically the + version identifier for the value. + :type secret_value_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "name": "str", # Required. Version identifier of the secret value. + "properties": { + "value": "str" # Optional. The actual value of the secret. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_secret_value_get_request( + secret_resource_name=secret_resource_name, + secret_value_resource_name=secret_value_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + secret_resource_name: str, + secret_value_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the specified value of the named secret resource. + + Deletes the secret value resource identified by the name. The name of the resource is typically + the version associated with that value. Deletion will fail if the specified value is in use. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource value which is typically the + version identifier for the value. + :type secret_value_resource_name: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_mesh_secret_value_delete_request( + secret_resource_name=secret_resource_name, + secret_value_resource_name=secret_value_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def list( + self, + secret_resource_name: str, + **kwargs: Any + ) -> JSON: + """List names of all values of the specified secret resource. + + Gets information about all secret value resources of the specified secret resource. The + information includes the names of the secret value resources, but not the actual values. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "name": "str", # Required. Version identifier of the secret + value. + "properties": { + "value": "str" # Optional. The actual value of the + secret. + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_secret_value_list_request( + secret_resource_name=secret_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def show( + self, + secret_resource_name: str, + secret_value_resource_name: str, + **kwargs: Any + ) -> JSON: + """Lists the specified value of the secret resource. + + Lists the decrypted value of the specified named value of the secret resource. This is a + privileged operation. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource value which is typically the + version identifier for the value. + :type secret_value_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "value": "str" # Optional. The actual value of the secret. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_secret_value_show_request( + secret_resource_name=secret_resource_name, + secret_value_resource_name=secret_value_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + +class MeshVolumeOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_volume` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def create_or_update( + self, + volume_resource_name: str, + volume_resource_description: JSON, + **kwargs: Any + ) -> Optional[JSON]: + """Creates or updates a Volume resource. + + Creates a Volume resource with the specified name, description and properties. If Volume + resource with the same name exists, then it is updated with the specified description and + properties. + + :param volume_resource_name: The identity of the volume. + :type volume_resource_name: str + :param volume_resource_description: Description for creating a Volume resource. + :type volume_resource_description: JSON + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + volume_resource_description = { + "name": "str", # Required. Name of the Volume resource. + "properties": { + "azureFileParameters": { + "accountKey": "str", # Optional. Access key of the Azure + storage account for the File Share. + "accountName": "str", # Required. Name of the Azure storage + account for the File Share. + "shareName": "str" # Required. Name of the Azure Files file + share that provides storage for the volume. + }, + "description": "str", # Optional. User readable description of the + volume. + "provider": "SFAzureFile", # Default value is "SFAzureFile". + Required. Provider of the volume. Known values are: "SFAzureFile". + "status": "str", # Optional. Status of the volume. Known values are: + "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str" # Optional. Gives additional information + about the current status of the volume. + } + } + + # response body for status code(s): 200, 201 + response.json() == { + "name": "str", # Required. Name of the Volume resource. + "properties": { + "azureFileParameters": { + "accountKey": "str", # Optional. Access key of the Azure + storage account for the File Share. + "accountName": "str", # Required. Name of the Azure storage + account for the File Share. + "shareName": "str" # Required. Name of the Azure Files file + share that provides storage for the volume. + }, + "description": "str", # Optional. User readable description of the + volume. + "provider": "SFAzureFile", # Default value is "SFAzureFile". + Required. Provider of the volume. Known values are: "SFAzureFile". + "status": "str", # Optional. Status of the volume. Known values are: + "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str" # Optional. Gives additional information + about the current status of the volume. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + _json = volume_resource_description + + request = build_mesh_volume_create_or_update_request( + volume_resource_name=volume_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 201: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace_async + async def get( + self, + volume_resource_name: str, + **kwargs: Any + ) -> JSON: + """Gets the Volume resource with the given name. + + Gets the information about the Volume resource with the given name. The information include the + description and other properties of the Volume. + + :param volume_resource_name: The identity of the volume. + :type volume_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "name": "str", # Required. Name of the Volume resource. + "properties": { + "azureFileParameters": { + "accountKey": "str", # Optional. Access key of the Azure + storage account for the File Share. + "accountName": "str", # Required. Name of the Azure storage + account for the File Share. + "shareName": "str" # Required. Name of the Azure Files file + share that provides storage for the volume. + }, + "description": "str", # Optional. User readable description of the + volume. + "provider": "SFAzureFile", # Default value is "SFAzureFile". + Required. Provider of the volume. Known values are: "SFAzureFile". + "status": "str", # Optional. Status of the volume. Known values are: + "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str" # Optional. Gives additional information + about the current status of the volume. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_volume_get_request( + volume_resource_name=volume_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + volume_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the Volume resource. + + Deletes the Volume resource identified by the name. + + :param volume_resource_name: The identity of the volume. + :type volume_resource_name: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_mesh_volume_delete_request( + volume_resource_name=volume_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def list( + self, + **kwargs: Any + ) -> JSON: + """Lists all the volume resources. + + Gets the information about all volume resources in a given resource group. The information + include the description and other properties of the Volume. + + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "name": "str", # Required. Name of the Volume resource. + "properties": { + "azureFileParameters": { + "accountKey": "str", # Optional. Access key + of the Azure storage account for the File Share. + "accountName": "str", # Required. Name of + the Azure storage account for the File Share. + "shareName": "str" # Required. Name of the + Azure Files file share that provides storage for the volume. + }, + "description": "str", # Optional. User readable + description of the volume. + "provider": "SFAzureFile", # Default value is + "SFAzureFile". Required. Provider of the volume. Known values are: + "SFAzureFile". + "status": "str", # Optional. Status of the volume. + Known values are: "Unknown", "Ready", "Upgrading", "Creating", + "Deleting", "Failed". + "statusDetails": "str" # Optional. Gives additional + information about the current status of the volume. + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_volume_list_request( + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + +class MeshNetworkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_network` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def create_or_update( + self, + network_resource_name: str, + network_resource_description: JSON, + **kwargs: Any + ) -> Optional[JSON]: + """Creates or updates a Network resource. + + Creates a Network resource with the specified name, description and properties. If Network + resource with the same name exists, then it is updated with the specified description and + properties. Network resource provides connectivity between application services. + + :param network_resource_name: The identity of the network. + :type network_resource_name: str + :param network_resource_description: Description for creating a Network resource. + :type network_resource_description: JSON + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + network_resource_description = { + "name": "str", # Required. Name of the Network resource. + "properties": { + "description": "str", # Optional. User readable description of the + network. + "status": "str", # Optional. Status of the network. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the network. + kind: NetworkResourceProperties + } + } + + # response body for status code(s): 200, 201 + response.json() == { + "name": "str", # Required. Name of the Network resource. + "properties": { + "description": "str", # Optional. User readable description of the + network. + "status": "str", # Optional. Status of the network. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the network. + kind: NetworkResourceProperties + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + _json = network_resource_description + + request = build_mesh_network_create_or_update_request( + network_resource_name=network_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 201: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace_async + async def get( + self, + network_resource_name: str, + **kwargs: Any + ) -> JSON: + """Gets the Network resource with the given name. + + Gets the information about the Network resource with the given name. The information include + the description and other properties of the Network. + + :param network_resource_name: The identity of the network. + :type network_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "name": "str", # Required. Name of the Network resource. + "properties": { + "description": "str", # Optional. User readable description of the + network. + "status": "str", # Optional. Status of the network. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the network. + kind: NetworkResourceProperties + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_network_get_request( + network_resource_name=network_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + network_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the Network resource. + + Deletes the Network resource identified by the name. + + :param network_resource_name: The identity of the network. + :type network_resource_name: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_mesh_network_delete_request( + network_resource_name=network_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def list( + self, + **kwargs: Any + ) -> JSON: + """Lists all the network resources. + + Gets the information about all network resources in a given resource group. The information + include the description and other properties of the Network. + + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "name": "str", # Required. Name of the Network resource. + "properties": { + "description": "str", # Optional. User readable + description of the network. + "status": "str", # Optional. Status of the network. + Known values are: "Unknown", "Ready", "Upgrading", "Creating", + "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional + information about the current status of the network. + kind: NetworkResourceProperties + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_network_list_request( + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + +class MeshApplicationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_application` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def create_or_update( + self, + application_resource_name: str, + application_resource_description: JSON, + **kwargs: Any + ) -> Optional[JSON]: + """Creates or updates a Application resource. + + Creates a Application resource with the specified name, description and properties. If + Application resource with the same name exists, then it is updated with the specified + description and properties. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param application_resource_description: Description for creating a Application resource. + :type application_resource_description: JSON + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_resource_description = { + "identity": { + "principalId": "str", # Optional. the object identifier of the + Service Principal of the identity associated with this resource. + "tenantId": "str", # Optional. the identifier of the tenant + containing the application's identity. + "tokenServiceEndpoint": "str", # Optional. the endpoint for the + token service managing this identity. + "type": "str", # Required. the types of identities associated with + this resource; currently restricted to 'SystemAssigned and UserAssigned'. + "userAssignedIdentities": { + "str": { + "clientId": "str", # Optional. the client identifier + of the Service Principal which this identity represents. + "principalId": "str" # Optional. the object + identifier of the Service Principal which this identity represents. + } + } + }, + "name": "str", # Required. Name of the Application resource. + "properties": { + "debugParams": "str", # Optional. Internal - used by Visual Studio + to setup the debugging session on the local development environment. + "description": "str", # Optional. User readable description of the + application. + "diagnostics": { + "defaultSinkRefs": [ + "str" # Optional. The sinks to be used if + diagnostics is enabled. Sink choices can be overridden at the service + and code package level. + ], + "enabled": bool, # Optional. Status of whether or not sinks + are enabled. + "sinks": [ + { + "description": "str", # Optional. A + description of the sink. + "name": "str", # Optional. Name of the sink. + This value is referenced by DiagnosticsReferenceDescription. + kind: kind + } + ] + }, + "healthState": "str", # Optional. Describes the health state of an + application resource. Known values are: "Invalid", "Ok", "Warning", "Error", + "Unknown". + "serviceNames": [ + "str" # Optional. Names of the services in the application. + ], + "services": [ + { + "name": "str", # Required. Name of the Service + resource. + "properties": { + "autoScalingPolicies": [ + { + "mechanism": { + kind: kind + }, + "name": "str", # Required. + The name of the auto scaling policy. + "trigger": { + kind: kind + } + } + ], + "codePackages": [ + { + "commands": [ + "str" # Optional. + Command array to execute within the container in exec + form. + ], + "diagnostics": { + "enabled": bool, # + Optional. Status of whether or not sinks are enabled. + "sinkRefs": [ + "str" # + Optional. List of sinks to be used if enabled. + References the list of sinks in + DiagnosticsDescription. + ] + }, + "endpoints": [ + { + "name": + "str", # Required. The name of the endpoint. + "port": 0 # + Optional. Port used by the container. + } + ], + "entryPoint": "str", # + Optional. Override for the default entry point in the + container. + "environmentVariables": [ + { + "name": + "str", # Optional. The name of the environment + variable. + "type": + "ClearText", # Optional. Default value is + "ClearText". The type of the environment variable + being given in value. Known values are: + "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: + "ClearText". + "value": + "str" # Optional. The value of the environment + variable, will be processed based on the type + provided. + } + ], + "image": "str", # Required. + The Container image to use. + "imageRegistryCredential": { + "password": "str", # + Optional. The password for the private registry. The + password is required for create or update operations, + however it is not returned in the get or list + operations. Will be processed based on the type + provided. + "passwordType": + "ClearText", # Optional. Default value is + "ClearText". The type of the image registry password + being given in password. Known values are: + "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: "ClearText". + "server": "str", # + Required. Docker image registry server, without + protocol such as ``http`` and ``https``. + "username": "str" # + Required. The username for the private registry. + }, + "instanceView": { + "currentState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": + "str", # Optional. The container exit code. + "finishTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state finished. + "startTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state started. + "state": + "str" # Optional. The state of this container. + }, + "events": [ + { + "count": 0, # Optional. The count of the + event. + "firstTimestamp": "str", # Optional. + Date/time of the first event. + "lastTimestamp": "str", # Optional. + Date/time of the last event. + "message": "str", # Optional. The event + message. + "name": "str", # Optional. The name of the + container event. + "type": "str" # Optional. The event type. + } + ], + "previousState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": + "str", # Optional. The container exit code. + "finishTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state finished. + "startTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state started. + "state": + "str" # Optional. The state of this container. + }, + "restartCount": 0 # + Optional. The number of times the container has been + restarted. + }, + "labels": [ + { + "name": + "str", # Required. The name of the container + label. + "value": + "str" # Required. The value of the container + label. + } + ], + "livenessProbe": [ + { + "exec": { + "command": "str" # Required. Comma separated + command to run inside the container for + example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. Default value + is 3. The count of failures after which probe is + considered failed. + "httpGet": { + "host": "str", # Optional. Host IP to + connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name + of the header. + "value": "str" # Required. The value + of the header. + } + ], + "path": "str", # Optional. Path to access on + the HTTP request. + "port": 0, # Required. Port to access for + probe. + "scheme": "str" # Optional. Scheme for the + http probe. Can be Http or Https. Known + values are: "http", "https". + }, + "initialDelaySeconds": 0, # Optional. The + initial delay in seconds to start executing probe + once codepackage has started. + "periodSeconds": 10, # Optional. Default value + is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. Default value + is 1. The count of successful probe executions + after which probe is considered success. + "tcpSocket": + { + "port": 0 # Required. Port to access for + probe. + }, + "timeoutSeconds": 1 # Optional. Default value is + 1. Period after which probe is considered as + failed if it hasn't completed successfully. + } + ], + "name": "str", # Required. + The name of the code package. + "readinessProbe": [ + { + "exec": { + "command": "str" # Required. Comma separated + command to run inside the container for + example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. Default value + is 3. The count of failures after which probe is + considered failed. + "httpGet": { + "host": "str", # Optional. Host IP to + connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name + of the header. + "value": "str" # Required. The value + of the header. + } + ], + "path": "str", # Optional. Path to access on + the HTTP request. + "port": 0, # Required. Port to access for + probe. + "scheme": "str" # Optional. Scheme for the + http probe. Can be Http or Https. Known + values are: "http", "https". + }, + "initialDelaySeconds": 0, # Optional. The + initial delay in seconds to start executing probe + once codepackage has started. + "periodSeconds": 10, # Optional. Default value + is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. Default value + is 1. The count of successful probe executions + after which probe is considered success. + "tcpSocket": + { + "port": 0 # Required. Port to access for + probe. + }, + "timeoutSeconds": 1 # Optional. Default value is + 1. Period after which probe is considered as + failed if it hasn't completed successfully. + } + ], + "reliableCollectionsRefs": [ + { + "doNotPersistState": bool, # Optional. False + (the default) if ReliableCollections state is + persisted to disk as usual. True if you do not + want to persist state, in which case replication + is still enabled and you can use + ReliableCollections as distributed cache. + "name": "str" + # Required. Name of ReliableCollection resource. + Right now it's not used and you can use any + string. + } + ], + "resources": { + "limits": { + "cpu": 0.0, + # Optional. CPU limits in cores. At present, only + full cores are supported. + "memoryInGB": + 0.0 # Optional. The memory limit in GB. + }, + "requests": { + "cpu": 0.0, + # Required. Requested number of CPU cores. At + present, only full cores are supported. + "memoryInGB": + 0.0 # Required. The memory request in GB for + this container. + } + }, + "settings": [ + { + "name": + "str", # Optional. The name of the setting. + "type": + "ClearText", # Optional. Default value is + "ClearText". The type of the setting being given + in value. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". + Default value: "ClearText". + "value": + "str" # Optional. The value of the setting, will + be processed based on the type provided. + } + ], + "volumeRefs": [ + { + "destinationPath": "str", # Required. The path + within the container at which the volume should + be mounted. Only valid path characters are + allowed. + "name": + "str", # Required. Name of the volume being + referenced. + "readOnly": + bool # Optional. The flag indicating whether the + volume is read only. Default is 'false'. + } + ], + "volumes": [ + { + "creationParameters": { + "description": "str", # Optional. User + readable description of the volume. + kind: + kind + }, + "destinationPath": "str", # Required. The path + within the container at which the volume should + be mounted. Only valid path characters are + allowed. + "name": + "str", # Required. Name of the volume being + referenced. + "readOnly": + bool # Optional. The flag indicating whether the + volume is read only. Default is 'false'. + } + ] + } + ], + "description": "str", # Optional. User + readable description of the service. + "diagnostics": { + "enabled": bool, # Optional. Status + of whether or not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of + sinks to be used if enabled. References the list of sinks + in DiagnosticsDescription. + ] + }, + "dnsName": "str", # Optional. Dns name of + the service. + "executionPolicy": { + type: type + }, + "healthState": "str", # Optional. Describes + the health state of an application resource. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "identityRefs": [ + { + "identityRef": "str", # + Optional. The application identity name. + "name": "str" # Optional. + The identity friendly name. + } + ], + "networkRefs": [ + { + "endpointRefs": [ + { + "name": "str" + # Optional. Name of the endpoint. + } + ], + "name": "str" # Optional. + Name of the network. + } + ], + "osType": "str", # Required. The operation + system required by the code in service. Known values are: + "Linux", "Windows". + "replicaCount": 0, # Optional. The number of + replicas of the service to create. Defaults to 1 if not + specified. + "status": "str", # Optional. Status of the + service. Known values are: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives + additional information about the current status of the service. + "unhealthyEvaluation": "str" # Optional. + When the service's health state is not 'Ok', this additional + details from service fabric Health Manager for the user to know + why the service is marked unhealthy. + } + } + ], + "status": "str", # Optional. Status of the application. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the application. + "unhealthyEvaluation": "str" # Optional. 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. + } + } + + # response body for status code(s): 200, 201 + response.json() == { + "identity": { + "principalId": "str", # Optional. the object identifier of the + Service Principal of the identity associated with this resource. + "tenantId": "str", # Optional. the identifier of the tenant + containing the application's identity. + "tokenServiceEndpoint": "str", # Optional. the endpoint for the + token service managing this identity. + "type": "str", # Required. the types of identities associated with + this resource; currently restricted to 'SystemAssigned and UserAssigned'. + "userAssignedIdentities": { + "str": { + "clientId": "str", # Optional. the client identifier + of the Service Principal which this identity represents. + "principalId": "str" # Optional. the object + identifier of the Service Principal which this identity represents. + } + } + }, + "name": "str", # Required. Name of the Application resource. + "properties": { + "debugParams": "str", # Optional. Internal - used by Visual Studio + to setup the debugging session on the local development environment. + "description": "str", # Optional. User readable description of the + application. + "diagnostics": { + "defaultSinkRefs": [ + "str" # Optional. The sinks to be used if + diagnostics is enabled. Sink choices can be overridden at the service + and code package level. + ], + "enabled": bool, # Optional. Status of whether or not sinks + are enabled. + "sinks": [ + { + "description": "str", # Optional. A + description of the sink. + "name": "str", # Optional. Name of the sink. + This value is referenced by DiagnosticsReferenceDescription. + kind: kind + } + ] + }, + "healthState": "str", # Optional. Describes the health state of an + application resource. Known values are: "Invalid", "Ok", "Warning", "Error", + "Unknown". + "serviceNames": [ + "str" # Optional. Names of the services in the application. + ], + "services": [ + { + "name": "str", # Required. Name of the Service + resource. + "properties": { + "autoScalingPolicies": [ + { + "mechanism": { + kind: kind + }, + "name": "str", # Required. + The name of the auto scaling policy. + "trigger": { + kind: kind + } + } + ], + "codePackages": [ + { + "commands": [ + "str" # Optional. + Command array to execute within the container in exec + form. + ], + "diagnostics": { + "enabled": bool, # + Optional. Status of whether or not sinks are enabled. + "sinkRefs": [ + "str" # + Optional. List of sinks to be used if enabled. + References the list of sinks in + DiagnosticsDescription. + ] + }, + "endpoints": [ + { + "name": + "str", # Required. The name of the endpoint. + "port": 0 # + Optional. Port used by the container. + } + ], + "entryPoint": "str", # + Optional. Override for the default entry point in the + container. + "environmentVariables": [ + { + "name": + "str", # Optional. The name of the environment + variable. + "type": + "ClearText", # Optional. Default value is + "ClearText". The type of the environment variable + being given in value. Known values are: + "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: + "ClearText". + "value": + "str" # Optional. The value of the environment + variable, will be processed based on the type + provided. + } + ], + "image": "str", # Required. + The Container image to use. + "imageRegistryCredential": { + "password": "str", # + Optional. The password for the private registry. The + password is required for create or update operations, + however it is not returned in the get or list + operations. Will be processed based on the type + provided. + "passwordType": + "ClearText", # Optional. Default value is + "ClearText". The type of the image registry password + being given in password. Known values are: + "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: "ClearText". + "server": "str", # + Required. Docker image registry server, without + protocol such as ``http`` and ``https``. + "username": "str" # + Required. The username for the private registry. + }, + "instanceView": { + "currentState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": + "str", # Optional. The container exit code. + "finishTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state finished. + "startTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state started. + "state": + "str" # Optional. The state of this container. + }, + "events": [ + { + "count": 0, # Optional. The count of the + event. + "firstTimestamp": "str", # Optional. + Date/time of the first event. + "lastTimestamp": "str", # Optional. + Date/time of the last event. + "message": "str", # Optional. The event + message. + "name": "str", # Optional. The name of the + container event. + "type": "str" # Optional. The event type. + } + ], + "previousState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": + "str", # Optional. The container exit code. + "finishTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state finished. + "startTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state started. + "state": + "str" # Optional. The state of this container. + }, + "restartCount": 0 # + Optional. The number of times the container has been + restarted. + }, + "labels": [ + { + "name": + "str", # Required. The name of the container + label. + "value": + "str" # Required. The value of the container + label. + } + ], + "livenessProbe": [ + { + "exec": { + "command": "str" # Required. Comma separated + command to run inside the container for + example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. Default value + is 3. The count of failures after which probe is + considered failed. + "httpGet": { + "host": "str", # Optional. Host IP to + connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name + of the header. + "value": "str" # Required. The value + of the header. + } + ], + "path": "str", # Optional. Path to access on + the HTTP request. + "port": 0, # Required. Port to access for + probe. + "scheme": "str" # Optional. Scheme for the + http probe. Can be Http or Https. Known + values are: "http", "https". + }, + "initialDelaySeconds": 0, # Optional. The + initial delay in seconds to start executing probe + once codepackage has started. + "periodSeconds": 10, # Optional. Default value + is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. Default value + is 1. The count of successful probe executions + after which probe is considered success. + "tcpSocket": + { + "port": 0 # Required. Port to access for + probe. + }, + "timeoutSeconds": 1 # Optional. Default value is + 1. Period after which probe is considered as + failed if it hasn't completed successfully. + } + ], + "name": "str", # Required. + The name of the code package. + "readinessProbe": [ + { + "exec": { + "command": "str" # Required. Comma separated + command to run inside the container for + example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. Default value + is 3. The count of failures after which probe is + considered failed. + "httpGet": { + "host": "str", # Optional. Host IP to + connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name + of the header. + "value": "str" # Required. The value + of the header. + } + ], + "path": "str", # Optional. Path to access on + the HTTP request. + "port": 0, # Required. Port to access for + probe. + "scheme": "str" # Optional. Scheme for the + http probe. Can be Http or Https. Known + values are: "http", "https". + }, + "initialDelaySeconds": 0, # Optional. The + initial delay in seconds to start executing probe + once codepackage has started. + "periodSeconds": 10, # Optional. Default value + is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. Default value + is 1. The count of successful probe executions + after which probe is considered success. + "tcpSocket": + { + "port": 0 # Required. Port to access for + probe. + }, + "timeoutSeconds": 1 # Optional. Default value is + 1. Period after which probe is considered as + failed if it hasn't completed successfully. + } + ], + "reliableCollectionsRefs": [ + { + "doNotPersistState": bool, # Optional. False + (the default) if ReliableCollections state is + persisted to disk as usual. True if you do not + want to persist state, in which case replication + is still enabled and you can use + ReliableCollections as distributed cache. + "name": "str" + # Required. Name of ReliableCollection resource. + Right now it's not used and you can use any + string. + } + ], + "resources": { + "limits": { + "cpu": 0.0, + # Optional. CPU limits in cores. At present, only + full cores are supported. + "memoryInGB": + 0.0 # Optional. The memory limit in GB. + }, + "requests": { + "cpu": 0.0, + # Required. Requested number of CPU cores. At + present, only full cores are supported. + "memoryInGB": + 0.0 # Required. The memory request in GB for + this container. + } + }, + "settings": [ + { + "name": + "str", # Optional. The name of the setting. + "type": + "ClearText", # Optional. Default value is + "ClearText". The type of the setting being given + in value. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". + Default value: "ClearText". + "value": + "str" # Optional. The value of the setting, will + be processed based on the type provided. + } + ], + "volumeRefs": [ + { + "destinationPath": "str", # Required. The path + within the container at which the volume should + be mounted. Only valid path characters are + allowed. + "name": + "str", # Required. Name of the volume being + referenced. + "readOnly": + bool # Optional. The flag indicating whether the + volume is read only. Default is 'false'. + } + ], + "volumes": [ + { + "creationParameters": { + "description": "str", # Optional. User + readable description of the volume. + kind: + kind + }, + "destinationPath": "str", # Required. The path + within the container at which the volume should + be mounted. Only valid path characters are + allowed. + "name": + "str", # Required. Name of the volume being + referenced. + "readOnly": + bool # Optional. The flag indicating whether the + volume is read only. Default is 'false'. + } + ] + } + ], + "description": "str", # Optional. User + readable description of the service. + "diagnostics": { + "enabled": bool, # Optional. Status + of whether or not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of + sinks to be used if enabled. References the list of sinks + in DiagnosticsDescription. + ] + }, + "dnsName": "str", # Optional. Dns name of + the service. + "executionPolicy": { + type: type + }, + "healthState": "str", # Optional. Describes + the health state of an application resource. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "identityRefs": [ + { + "identityRef": "str", # + Optional. The application identity name. + "name": "str" # Optional. + The identity friendly name. + } + ], + "networkRefs": [ + { + "endpointRefs": [ + { + "name": "str" + # Optional. Name of the endpoint. + } + ], + "name": "str" # Optional. + Name of the network. + } + ], + "osType": "str", # Required. The operation + system required by the code in service. Known values are: + "Linux", "Windows". + "replicaCount": 0, # Optional. The number of + replicas of the service to create. Defaults to 1 if not + specified. + "status": "str", # Optional. Status of the + service. Known values are: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives + additional information about the current status of the service. + "unhealthyEvaluation": "str" # Optional. + When the service's health state is not 'Ok', this additional + details from service fabric Health Manager for the user to know + why the service is marked unhealthy. + } + } + ], + "status": "str", # Optional. Status of the application. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the application. + "unhealthyEvaluation": "str" # Optional. 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. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + _json = application_resource_description + + request = build_mesh_application_create_or_update_request( + application_resource_name=application_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 201: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace_async + async def get( + self, + application_resource_name: str, + **kwargs: Any + ) -> JSON: + """Gets the Application resource with the given name. + + Gets the information about the Application resource with the given name. The information + include the description and other properties of the Application. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "identity": { + "principalId": "str", # Optional. the object identifier of the + Service Principal of the identity associated with this resource. + "tenantId": "str", # Optional. the identifier of the tenant + containing the application's identity. + "tokenServiceEndpoint": "str", # Optional. the endpoint for the + token service managing this identity. + "type": "str", # Required. the types of identities associated with + this resource; currently restricted to 'SystemAssigned and UserAssigned'. + "userAssignedIdentities": { + "str": { + "clientId": "str", # Optional. the client identifier + of the Service Principal which this identity represents. + "principalId": "str" # Optional. the object + identifier of the Service Principal which this identity represents. + } + } + }, + "name": "str", # Required. Name of the Application resource. + "properties": { + "debugParams": "str", # Optional. Internal - used by Visual Studio + to setup the debugging session on the local development environment. + "description": "str", # Optional. User readable description of the + application. + "diagnostics": { + "defaultSinkRefs": [ + "str" # Optional. The sinks to be used if + diagnostics is enabled. Sink choices can be overridden at the service + and code package level. + ], + "enabled": bool, # Optional. Status of whether or not sinks + are enabled. + "sinks": [ + { + "description": "str", # Optional. A + description of the sink. + "name": "str", # Optional. Name of the sink. + This value is referenced by DiagnosticsReferenceDescription. + kind: kind + } + ] + }, + "healthState": "str", # Optional. Describes the health state of an + application resource. Known values are: "Invalid", "Ok", "Warning", "Error", + "Unknown". + "serviceNames": [ + "str" # Optional. Names of the services in the application. + ], + "services": [ + { + "name": "str", # Required. Name of the Service + resource. + "properties": { + "autoScalingPolicies": [ + { + "mechanism": { + kind: kind + }, + "name": "str", # Required. + The name of the auto scaling policy. + "trigger": { + kind: kind + } + } + ], + "codePackages": [ + { + "commands": [ + "str" # Optional. + Command array to execute within the container in exec + form. + ], + "diagnostics": { + "enabled": bool, # + Optional. Status of whether or not sinks are enabled. + "sinkRefs": [ + "str" # + Optional. List of sinks to be used if enabled. + References the list of sinks in + DiagnosticsDescription. + ] + }, + "endpoints": [ + { + "name": + "str", # Required. The name of the endpoint. + "port": 0 # + Optional. Port used by the container. + } + ], + "entryPoint": "str", # + Optional. Override for the default entry point in the + container. + "environmentVariables": [ + { + "name": + "str", # Optional. The name of the environment + variable. + "type": + "ClearText", # Optional. Default value is + "ClearText". The type of the environment variable + being given in value. Known values are: + "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: + "ClearText". + "value": + "str" # Optional. The value of the environment + variable, will be processed based on the type + provided. + } + ], + "image": "str", # Required. + The Container image to use. + "imageRegistryCredential": { + "password": "str", # + Optional. The password for the private registry. The + password is required for create or update operations, + however it is not returned in the get or list + operations. Will be processed based on the type + provided. + "passwordType": + "ClearText", # Optional. Default value is + "ClearText". The type of the image registry password + being given in password. Known values are: + "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: "ClearText". + "server": "str", # + Required. Docker image registry server, without + protocol such as ``http`` and ``https``. + "username": "str" # + Required. The username for the private registry. + }, + "instanceView": { + "currentState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": + "str", # Optional. The container exit code. + "finishTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state finished. + "startTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state started. + "state": + "str" # Optional. The state of this container. + }, + "events": [ + { + "count": 0, # Optional. The count of the + event. + "firstTimestamp": "str", # Optional. + Date/time of the first event. + "lastTimestamp": "str", # Optional. + Date/time of the last event. + "message": "str", # Optional. The event + message. + "name": "str", # Optional. The name of the + container event. + "type": "str" # Optional. The event type. + } + ], + "previousState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": + "str", # Optional. The container exit code. + "finishTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state finished. + "startTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state started. + "state": + "str" # Optional. The state of this container. + }, + "restartCount": 0 # + Optional. The number of times the container has been + restarted. + }, + "labels": [ + { + "name": + "str", # Required. The name of the container + label. + "value": + "str" # Required. The value of the container + label. + } + ], + "livenessProbe": [ + { + "exec": { + "command": "str" # Required. Comma separated + command to run inside the container for + example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. Default value + is 3. The count of failures after which probe is + considered failed. + "httpGet": { + "host": "str", # Optional. Host IP to + connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name + of the header. + "value": "str" # Required. The value + of the header. + } + ], + "path": "str", # Optional. Path to access on + the HTTP request. + "port": 0, # Required. Port to access for + probe. + "scheme": "str" # Optional. Scheme for the + http probe. Can be Http or Https. Known + values are: "http", "https". + }, + "initialDelaySeconds": 0, # Optional. The + initial delay in seconds to start executing probe + once codepackage has started. + "periodSeconds": 10, # Optional. Default value + is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. Default value + is 1. The count of successful probe executions + after which probe is considered success. + "tcpSocket": + { + "port": 0 # Required. Port to access for + probe. + }, + "timeoutSeconds": 1 # Optional. Default value is + 1. Period after which probe is considered as + failed if it hasn't completed successfully. + } + ], + "name": "str", # Required. + The name of the code package. + "readinessProbe": [ + { + "exec": { + "command": "str" # Required. Comma separated + command to run inside the container for + example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. Default value + is 3. The count of failures after which probe is + considered failed. + "httpGet": { + "host": "str", # Optional. Host IP to + connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name + of the header. + "value": "str" # Required. The value + of the header. + } + ], + "path": "str", # Optional. Path to access on + the HTTP request. + "port": 0, # Required. Port to access for + probe. + "scheme": "str" # Optional. Scheme for the + http probe. Can be Http or Https. Known + values are: "http", "https". + }, + "initialDelaySeconds": 0, # Optional. The + initial delay in seconds to start executing probe + once codepackage has started. + "periodSeconds": 10, # Optional. Default value + is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. Default value + is 1. The count of successful probe executions + after which probe is considered success. + "tcpSocket": + { + "port": 0 # Required. Port to access for + probe. + }, + "timeoutSeconds": 1 # Optional. Default value is + 1. Period after which probe is considered as + failed if it hasn't completed successfully. + } + ], + "reliableCollectionsRefs": [ + { + "doNotPersistState": bool, # Optional. False + (the default) if ReliableCollections state is + persisted to disk as usual. True if you do not + want to persist state, in which case replication + is still enabled and you can use + ReliableCollections as distributed cache. + "name": "str" + # Required. Name of ReliableCollection resource. + Right now it's not used and you can use any + string. + } + ], + "resources": { + "limits": { + "cpu": 0.0, + # Optional. CPU limits in cores. At present, only + full cores are supported. + "memoryInGB": + 0.0 # Optional. The memory limit in GB. + }, + "requests": { + "cpu": 0.0, + # Required. Requested number of CPU cores. At + present, only full cores are supported. + "memoryInGB": + 0.0 # Required. The memory request in GB for + this container. + } + }, + "settings": [ + { + "name": + "str", # Optional. The name of the setting. + "type": + "ClearText", # Optional. Default value is + "ClearText". The type of the setting being given + in value. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". + Default value: "ClearText". + "value": + "str" # Optional. The value of the setting, will + be processed based on the type provided. + } + ], + "volumeRefs": [ + { + "destinationPath": "str", # Required. The path + within the container at which the volume should + be mounted. Only valid path characters are + allowed. + "name": + "str", # Required. Name of the volume being + referenced. + "readOnly": + bool # Optional. The flag indicating whether the + volume is read only. Default is 'false'. + } + ], + "volumes": [ + { + "creationParameters": { + "description": "str", # Optional. User + readable description of the volume. + kind: + kind + }, + "destinationPath": "str", # Required. The path + within the container at which the volume should + be mounted. Only valid path characters are + allowed. + "name": + "str", # Required. Name of the volume being + referenced. + "readOnly": + bool # Optional. The flag indicating whether the + volume is read only. Default is 'false'. + } + ] + } + ], + "description": "str", # Optional. User + readable description of the service. + "diagnostics": { + "enabled": bool, # Optional. Status + of whether or not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of + sinks to be used if enabled. References the list of sinks + in DiagnosticsDescription. + ] + }, + "dnsName": "str", # Optional. Dns name of + the service. + "executionPolicy": { + type: type + }, + "healthState": "str", # Optional. Describes + the health state of an application resource. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "identityRefs": [ + { + "identityRef": "str", # + Optional. The application identity name. + "name": "str" # Optional. + The identity friendly name. + } + ], + "networkRefs": [ + { + "endpointRefs": [ + { + "name": "str" + # Optional. Name of the endpoint. + } + ], + "name": "str" # Optional. + Name of the network. + } + ], + "osType": "str", # Required. The operation + system required by the code in service. Known values are: + "Linux", "Windows". + "replicaCount": 0, # Optional. The number of + replicas of the service to create. Defaults to 1 if not + specified. + "status": "str", # Optional. Status of the + service. Known values are: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives + additional information about the current status of the service. + "unhealthyEvaluation": "str" # Optional. + When the service's health state is not 'Ok', this additional + details from service fabric Health Manager for the user to know + why the service is marked unhealthy. + } + } + ], + "status": "str", # Optional. Status of the application. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the application. + "unhealthyEvaluation": "str" # Optional. 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. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_application_get_request( + application_resource_name=application_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + application_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the Application resource. + + Deletes the Application resource identified by the name. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_mesh_application_delete_request( + application_resource_name=application_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def list( + self, + **kwargs: Any + ) -> JSON: + """Lists all the application resources. + + Gets the information about all application resources in a given resource group. The information + include the description and other properties of the Application. + + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "identity": { + "principalId": "str", # Optional. the object + identifier of the Service Principal of the identity associated with + this resource. + "tenantId": "str", # Optional. the identifier of the + tenant containing the application's identity. + "tokenServiceEndpoint": "str", # Optional. the + endpoint for the token service managing this identity. + "type": "str", # Required. the types of identities + associated with this resource; currently restricted to + 'SystemAssigned and UserAssigned'. + "userAssignedIdentities": { + "str": { + "clientId": "str", # Optional. the + client identifier of the Service Principal which this + identity represents. + "principalId": "str" # Optional. the + object identifier of the Service Principal which this + identity represents. + } + } + }, + "name": "str", # Required. Name of the Application resource. + "properties": { + "debugParams": "str", # Optional. Internal - used by + Visual Studio to setup the debugging session on the local development + environment. + "description": "str", # Optional. User readable + description of the application. + "diagnostics": { + "defaultSinkRefs": [ + "str" # Optional. The sinks to be + used if diagnostics is enabled. Sink choices can be + overridden at the service and code package level. + ], + "enabled": bool, # Optional. Status of + whether or not sinks are enabled. + "sinks": [ + { + "description": "str", # + Optional. A description of the sink. + "name": "str", # Optional. + Name of the sink. This value is referenced by + DiagnosticsReferenceDescription. + kind: kind + } + ] + }, + "healthState": "str", # Optional. Describes the + health state of an application resource. Known values are: "Invalid", + "Ok", "Warning", "Error", "Unknown". + "serviceNames": [ + "str" # Optional. Names of the services in + the application. + ], + "services": [ + { + "name": "str", # Required. Name of + the Service resource. + "properties": { + "autoScalingPolicies": [ + { + "mechanism": + { + kind: + kind + }, + "name": + "str", # Required. The name of the auto scaling + policy. + "trigger": { + kind: + kind + } + } + ], + "codePackages": [ + { + "commands": [ + "str" + # Optional. Command array to execute within + the container in exec form. + ], + "diagnostics": { + "enabled": bool, # Optional. Status of + whether or not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of sinks to be + used if enabled. References the list of + sinks in DiagnosticsDescription. + ] + }, + "endpoints": + [ + { + "name": "str", # Required. The name of + the endpoint. + "port": 0 # Optional. Port used by the + container. + } + ], + "entryPoint": + "str", # Optional. Override for the default + entry point in the container. + "environmentVariables": [ + { + "name": "str", # Optional. The name of + the environment variable. + "type": "ClearText", # Optional. Default + value is "ClearText". The type of the + environment variable being given in + value. Known values are: "ClearText", + "KeyVaultReference", + "SecretValueReference". Default value: + "ClearText". + "value": "str" # Optional. The value of + the environment variable, will be + processed based on the type provided. + } + ], + "image": + "str", # Required. The Container image to use. + "imageRegistryCredential": { + "password": "str", # Optional. The password + for the private registry. The password is + required for create or update operations, + however it is not returned in the get or list + operations. Will be processed based on the + type provided. + "passwordType": "ClearText", # Optional. + Default value is "ClearText". The type of the + image registry password being given in + password. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". + Default value: "ClearText". + "server": "str", # Required. Docker image + registry server, without protocol such as + ``http`` and ``https``. + "username": "str" # Required. The username + for the private registry. + }, + "instanceView": { + "currentState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": "str", # Optional. The + container exit code. + "finishTime": "2020-02-20 00:00:00", # + Optional. Date/time when the container + state finished. + "startTime": "2020-02-20 00:00:00", # + Optional. Date/time when the container + state started. + "state": "str" # Optional. The state of + this container. + }, + "events": [ + { + "count": 0, # Optional. The count of + the event. + "firstTimestamp": "str", # Optional. + Date/time of the first event. + "lastTimestamp": "str", # Optional. + Date/time of the last event. + "message": "str", # Optional. The + event message. + "name": "str", # Optional. The name + of the container event. + "type": "str" # Optional. The event + type. + } + ], + "previousState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": "str", # Optional. The + container exit code. + "finishTime": "2020-02-20 00:00:00", # + Optional. Date/time when the container + state finished. + "startTime": "2020-02-20 00:00:00", # + Optional. Date/time when the container + state started. + "state": "str" # Optional. The state of + this container. + }, + "restartCount": 0 # Optional. The number of + times the container has been restarted. + }, + "labels": [ + { + "name": "str", # Required. The name of + the container label. + "value": "str" # Required. The value of + the container label. + } + ], + "livenessProbe": [ + { + "exec": { + "command": "str" # Required. Comma + separated command to run inside the + container for example "sh, -c, echo + hello world". + }, + "failureThreshold": 3, # Optional. + Default value is 3. The count of failures + after which probe is considered failed. + "httpGet": { + "host": "str", # Optional. Host IP + to connect to. + "httpHeaders": [ + { + "name": "str", # Required. + The name of the header. + "value": "str" # Required. + The value of the header. + } + ], + "path": "str", # Optional. Path to + access on the HTTP request. + "port": 0, # Required. Port to + access for probe. + "scheme": "str" # Optional. Scheme + for the http probe. Can be Http or + Https. Known values are: "http", + "https". + }, + "initialDelaySeconds": 0, # Optional. + The initial delay in seconds to start + executing probe once codepackage has + started. + "periodSeconds": 10, # Optional. Default + value is 10. Periodic seconds to execute + probe. + "successThreshold": 1, # Optional. + Default value is 1. The count of + successful probe executions after which + probe is considered success. + "tcpSocket": { + "port": 0 # Required. Port to access + for probe. + }, + "timeoutSeconds": 1 # Optional. Default + value is 1. Period after which probe is + considered as failed if it hasn't + completed successfully. + } + ], + "name": + "str", # Required. The name of the code package. + "readinessProbe": [ + { + "exec": { + "command": "str" # Required. Comma + separated command to run inside the + container for example "sh, -c, echo + hello world". + }, + "failureThreshold": 3, # Optional. + Default value is 3. The count of failures + after which probe is considered failed. + "httpGet": { + "host": "str", # Optional. Host IP + to connect to. + "httpHeaders": [ + { + "name": "str", # Required. + The name of the header. + "value": "str" # Required. + The value of the header. + } + ], + "path": "str", # Optional. Path to + access on the HTTP request. + "port": 0, # Required. Port to + access for probe. + "scheme": "str" # Optional. Scheme + for the http probe. Can be Http or + Https. Known values are: "http", + "https". + }, + "initialDelaySeconds": 0, # Optional. + The initial delay in seconds to start + executing probe once codepackage has + started. + "periodSeconds": 10, # Optional. Default + value is 10. Periodic seconds to execute + probe. + "successThreshold": 1, # Optional. + Default value is 1. The count of + successful probe executions after which + probe is considered success. + "tcpSocket": { + "port": 0 # Required. Port to access + for probe. + }, + "timeoutSeconds": 1 # Optional. Default + value is 1. Period after which probe is + considered as failed if it hasn't + completed successfully. + } + ], + "reliableCollectionsRefs": [ + { + "doNotPersistState": bool, # Optional. + False (the default) if + ReliableCollections state is persisted to + disk as usual. True if you do not want to + persist state, in which case replication + is still enabled and you can use + ReliableCollections as distributed cache. + "name": "str" # Required. Name of + ReliableCollection resource. Right now + it's not used and you can use any string. + } + ], + "resources": + { + "limits": { + "cpu": 0.0, # Optional. CPU limits in + cores. At present, only full cores are + supported. + "memoryInGB": 0.0 # Optional. The memory + limit in GB. + }, + "requests": { + "cpu": 0.0, # Required. Requested number + of CPU cores. At present, only full cores + are supported. + "memoryInGB": 0.0 # Required. The memory + request in GB for this container. + } + }, + "settings": [ + { + "name": "str", # Optional. The name of + the setting. + "type": "ClearText", # Optional. Default + value is "ClearText". The type of the + setting being given in value. Known + values are: "ClearText", + "KeyVaultReference", + "SecretValueReference". Default value: + "ClearText". + "value": "str" # Optional. The value of + the setting, will be processed based on + the type provided. + } + ], + "volumeRefs": + [ + { + "destinationPath": "str", # Required. + The path within the container at which + the volume should be mounted. Only valid + path characters are allowed. + "name": "str", # Required. Name of the + volume being referenced. + "readOnly": bool # Optional. The flag + indicating whether the volume is read + only. Default is 'false'. + } + ], + "volumes": [ + { + "creationParameters": { + "description": "str", # Optional. + User readable description of the + volume. + kind: kind + }, + "destinationPath": "str", # Required. + The path within the container at which + the volume should be mounted. Only valid + path characters are allowed. + "name": "str", # Required. Name of the + volume being referenced. + "readOnly": bool # Optional. The flag + indicating whether the volume is read + only. Default is 'false'. + } + ] + } + ], + "description": "str", # + Optional. User readable description of the service. + "diagnostics": { + "enabled": bool, # + Optional. Status of whether or not sinks are enabled. + "sinkRefs": [ + "str" # + Optional. List of sinks to be used if enabled. + References the list of sinks in + DiagnosticsDescription. + ] + }, + "dnsName": "str", # + Optional. Dns name of the service. + "executionPolicy": { + type: type + }, + "healthState": "str", # + Optional. Describes the health state of an application + resource. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "identityRefs": [ + { + "identityRef": "str", # Optional. The + application identity name. + "name": "str" + # Optional. The identity friendly name. + } + ], + "networkRefs": [ + { + "endpointRefs": [ + { + "name": "str" # Optional. Name of the + endpoint. + } + ], + "name": "str" + # Optional. Name of the network. + } + ], + "osType": "str", # Required. + The operation system required by the code in service. + Known values are: "Linux", "Windows". + "replicaCount": 0, # + Optional. The number of replicas of the service to + create. Defaults to 1 if not specified. + "status": "str", # Optional. + Status of the service. Known values are: "Unknown", + "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # + Optional. Gives additional information about the current + status of the service. + "unhealthyEvaluation": "str" + # Optional. When the service's health state is not 'Ok', + this additional details from service fabric Health + Manager for the user to know why the service is marked + unhealthy. + } + } + ], + "status": "str", # Optional. Status of the + application. Known values are: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional + information about the current status of the application. + "unhealthyEvaluation": "str" # Optional. 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. + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_application_list_request( + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def get_upgrade_progress( + self, + application_resource_name: str, + **kwargs: Any + ) -> JSON: + """Gets the progress of the latest upgrade performed on this application resource. + + Gets the upgrade progress information about the Application resource with the given name. The + information include percentage of completion and other upgrade state information of the + Application resource. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :keyword api_version: The version of the API. This parameter is required and its value must be + '7.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "7.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ApplicationUpgradeStatusDetails": "str", # Optional. Additional detailed + information about the status of the pending upgrade. + "FailureTimestampUtc": "str", # Optional. The estimated UTC datetime when + the upgrade failed and FailureAction was executed. + "Name": "str", # Optional. Name of the Application resource. + "PercentCompleted": "str", # Optional. The estimated percent of replicas are + completed in the upgrade. + "RollingUpgradeMode": "Monitored", # Optional. Default value is "Monitored". + The mode used to monitor health during a rolling upgrade. The values are + UnmonitoredAuto, UnmonitoredManual, and Monitored. Known values are: "Invalid", + "UnmonitoredAuto", "UnmonitoredManual", "Monitored". Default value: "Monitored". + "ServiceUpgradeProgress": [ + { + "CompletedReplicaCount": "str", # Optional. The number of + replicas that completes the upgrade in the service. + "PendingReplicaCount": "str", # Optional. The number of + replicas that are waiting to be upgraded in the service. + "ServiceName": "str" # Optional. Name of the Service + resource. + } + ], + "StartTimestampUtc": "str", # Optional. The estimated UTC datetime when the + upgrade started. + "TargetApplicationTypeVersion": "str", # Optional. The target application + version for the application upgrade. + "UpgradeDuration": "PT0H2M0S", # Optional. Default value is "PT0H2M0S". The + estimated amount of time that the overall upgrade elapsed. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, then it + is interpreted as a number representing the total number of milliseconds. + "UpgradeReplicaSetCheckTimeoutInSeconds": 42949672925, # Optional. Default + value is 42949672925. The maximum amount of time to block processing of an + upgrade domain and prevent loss of availability when there are unexpected issues. + When this timeout expires, processing of the upgrade domain will proceed + regardless of availability loss issues. The timeout is reset at the start of each + upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + 32-bit integer). + "UpgradeState": "str" # Optional. The state of the application resource + upgrade. Known values are: "Invalid", "ProvisioningTarget", "RollingForward", + "UnprovisioningCurrent", "CompletedRollforward", "RollingBack", + "UnprovisioningTarget", "CompletedRollback", "Failed". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_application_get_upgrade_progress_request( + application_resource_name=application_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + +class MeshServiceOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_service` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def get( + self, + application_resource_name: str, + service_resource_name: str, + **kwargs: Any + ) -> JSON: + """Gets the Service resource with the given name. + + Gets the information about the Service resource with the given name. The information include + the description and other properties of the Service. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "name": "str", # Required. Name of the Service resource. + "properties": { + "autoScalingPolicies": [ + { + "mechanism": { + kind: kind + }, + "name": "str", # Required. The name of the auto + scaling policy. + "trigger": { + kind: kind + } + } + ], + "codePackages": [ + { + "commands": [ + "str" # Optional. Command array to execute + within the container in exec form. + ], + "diagnostics": { + "enabled": bool, # Optional. Status of + whether or not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of sinks to + be used if enabled. References the list of sinks in + DiagnosticsDescription. + ] + }, + "endpoints": [ + { + "name": "str", # Required. The name + of the endpoint. + "port": 0 # Optional. Port used by + the container. + } + ], + "entryPoint": "str", # Optional. Override for the + default entry point in the container. + "environmentVariables": [ + { + "name": "str", # Optional. The name + of the environment variable. + "type": "ClearText", # Optional. + Default value is "ClearText". The type of the environment + variable being given in value. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". Default value: + "ClearText". + "value": "str" # Optional. The value + of the environment variable, will be processed based on the + type provided. + } + ], + "image": "str", # Required. The Container image to + use. + "imageRegistryCredential": { + "password": "str", # Optional. The password + for the private registry. The password is required for create or + update operations, however it is not returned in the get or list + operations. Will be processed based on the type provided. + "passwordType": "ClearText", # Optional. + Default value is "ClearText". The type of the image registry + password being given in password. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". Default value: + "ClearText". + "server": "str", # Required. Docker image + registry server, without protocol such as ``http`` and ``https``. + "username": "str" # Required. The username + for the private registry. + }, + "instanceView": { + "currentState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": "str", # Optional. The + container exit code. + "finishTime": "2020-02-20 00:00:00", + # Optional. Date/time when the container state finished. + "startTime": "2020-02-20 00:00:00", + # Optional. Date/time when the container state started. + "state": "str" # Optional. The state + of this container. + }, + "events": [ + { + "count": 0, # Optional. The + count of the event. + "firstTimestamp": "str", # + Optional. Date/time of the first event. + "lastTimestamp": "str", # + Optional. Date/time of the last event. + "message": "str", # + Optional. The event message. + "name": "str", # Optional. + The name of the container event. + "type": "str" # Optional. + The event type. + } + ], + "previousState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": "str", # Optional. The + container exit code. + "finishTime": "2020-02-20 00:00:00", + # Optional. Date/time when the container state finished. + "startTime": "2020-02-20 00:00:00", + # Optional. Date/time when the container state started. + "state": "str" # Optional. The state + of this container. + }, + "restartCount": 0 # Optional. The number of + times the container has been restarted. + }, + "labels": [ + { + "name": "str", # Required. The name + of the container label. + "value": "str" # Required. The value + of the container label. + } + ], + "livenessProbe": [ + { + "exec": { + "command": "str" # Required. + Comma separated command to run inside the container for + example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. + Default value is 3. The count of failures after which probe + is considered failed. + "httpGet": { + "host": "str", # Optional. + Host IP to connect to. + "httpHeaders": [ + { + "name": + "str", # Required. The name of the header. + "value": + "str" # Required. The value of the header. + } + ], + "path": "str", # Optional. + Path to access on the HTTP request. + "port": 0, # Required. Port + to access for probe. + "scheme": "str" # Optional. + Scheme for the http probe. Can be Http or Https. Known + values are: "http", "https". + }, + "initialDelaySeconds": 0, # + Optional. The initial delay in seconds to start executing + probe once codepackage has started. + "periodSeconds": 10, # Optional. + Default value is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. + Default value is 1. The count of successful probe executions + after which probe is considered success. + "tcpSocket": { + "port": 0 # Required. Port + to access for probe. + }, + "timeoutSeconds": 1 # Optional. + Default value is 1. Period after which probe is considered as + failed if it hasn't completed successfully. + } + ], + "name": "str", # Required. The name of the code + package. + "readinessProbe": [ + { + "exec": { + "command": "str" # Required. + Comma separated command to run inside the container for + example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. + Default value is 3. The count of failures after which probe + is considered failed. + "httpGet": { + "host": "str", # Optional. + Host IP to connect to. + "httpHeaders": [ + { + "name": + "str", # Required. The name of the header. + "value": + "str" # Required. The value of the header. + } + ], + "path": "str", # Optional. + Path to access on the HTTP request. + "port": 0, # Required. Port + to access for probe. + "scheme": "str" # Optional. + Scheme for the http probe. Can be Http or Https. Known + values are: "http", "https". + }, + "initialDelaySeconds": 0, # + Optional. The initial delay in seconds to start executing + probe once codepackage has started. + "periodSeconds": 10, # Optional. + Default value is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. + Default value is 1. The count of successful probe executions + after which probe is considered success. + "tcpSocket": { + "port": 0 # Required. Port + to access for probe. + }, + "timeoutSeconds": 1 # Optional. + Default value is 1. Period after which probe is considered as + failed if it hasn't completed successfully. + } + ], + "reliableCollectionsRefs": [ + { + "doNotPersistState": bool, # + Optional. False (the default) if ReliableCollections state is + persisted to disk as usual. True if you do not want to + persist state, in which case replication is still enabled and + you can use ReliableCollections as distributed cache. + "name": "str" # Required. Name of + ReliableCollection resource. Right now it's not used and you + can use any string. + } + ], + "resources": { + "limits": { + "cpu": 0.0, # Optional. CPU limits + in cores. At present, only full cores are supported. + "memoryInGB": 0.0 # Optional. The + memory limit in GB. + }, + "requests": { + "cpu": 0.0, # Required. Requested + number of CPU cores. At present, only full cores are + supported. + "memoryInGB": 0.0 # Required. The + memory request in GB for this container. + } + }, + "settings": [ + { + "name": "str", # Optional. The name + of the setting. + "type": "ClearText", # Optional. + Default value is "ClearText". The type of the setting being + given in value. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". Default value: + "ClearText". + "value": "str" # Optional. The value + of the setting, will be processed based on the type provided. + } + ], + "volumeRefs": [ + { + "destinationPath": "str", # + Required. The path within the container at which the volume + should be mounted. Only valid path characters are allowed. + "name": "str", # Required. Name of + the volume being referenced. + "readOnly": bool # Optional. The + flag indicating whether the volume is read only. Default is + 'false'. + } + ], + "volumes": [ + { + "creationParameters": { + "description": "str", # + Optional. User readable description of the volume. + kind: kind + }, + "destinationPath": "str", # + Required. The path within the container at which the volume + should be mounted. Only valid path characters are allowed. + "name": "str", # Required. Name of + the volume being referenced. + "readOnly": bool # Optional. The + flag indicating whether the volume is read only. Default is + 'false'. + } + ] + } + ], + "description": "str", # Optional. User readable description of the + service. + "diagnostics": { + "enabled": bool, # Optional. Status of whether or not sinks + are enabled. + "sinkRefs": [ + "str" # Optional. List of sinks to be used if + enabled. References the list of sinks in DiagnosticsDescription. + ] + }, + "dnsName": "str", # Optional. Dns name of the service. + "executionPolicy": { + type: type + }, + "healthState": "str", # Optional. Describes the health state of an + application resource. Known values are: "Invalid", "Ok", "Warning", "Error", + "Unknown". + "identityRefs": [ + { + "identityRef": "str", # Optional. The application + identity name. + "name": "str" # Optional. The identity friendly + name. + } + ], + "networkRefs": [ + { + "endpointRefs": [ + { + "name": "str" # Optional. Name of + the endpoint. + } + ], + "name": "str" # Optional. Name of the network. + } + ], + "osType": "str", # Required. The operation system required by the + code in service. Known values are: "Linux", "Windows". + "replicaCount": 0, # Optional. The number of replicas of the service + to create. Defaults to 1 if not specified. + "status": "str", # Optional. Status of the service. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the service. + "unhealthyEvaluation": "str" # Optional. When the service's health + state is not 'Ok', this additional details from service fabric Health Manager + for the user to know why the service is marked unhealthy. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_service_get_request( + application_resource_name=application_resource_name, + service_resource_name=service_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def list( + self, + application_resource_name: str, + **kwargs: Any + ) -> JSON: + """Lists all the service resources. + + Gets the information about all services of an application resource. The information include the + description and other properties of the Service. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "name": "str", # Required. Name of the Service resource. + "properties": { + "autoScalingPolicies": [ + { + "mechanism": { + kind: kind + }, + "name": "str", # Required. The name + of the auto scaling policy. + "trigger": { + kind: kind + } + } + ], + "codePackages": [ + { + "commands": [ + "str" # Optional. Command + array to execute within the container in exec form. + ], + "diagnostics": { + "enabled": bool, # Optional. + Status of whether or not sinks are enabled. + "sinkRefs": [ + "str" # Optional. + List of sinks to be used if enabled. References the + list of sinks in DiagnosticsDescription. + ] + }, + "endpoints": [ + { + "name": "str", # + Required. The name of the endpoint. + "port": 0 # + Optional. Port used by the container. + } + ], + "entryPoint": "str", # Optional. + Override for the default entry point in the container. + "environmentVariables": [ + { + "name": "str", # + Optional. The name of the environment variable. + "type": "ClearText", + # Optional. Default value is "ClearText". The type of + the environment variable being given in value. Known + values are: "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: "ClearText". + "value": "str" # + Optional. The value of the environment variable, will + be processed based on the type provided. + } + ], + "image": "str", # Required. The + Container image to use. + "imageRegistryCredential": { + "password": "str", # + Optional. The password for the private registry. The + password is required for create or update operations, + however it is not returned in the get or list operations. + Will be processed based on the type provided. + "passwordType": "ClearText", + # Optional. Default value is "ClearText". The type of the + image registry password being given in password. Known + values are: "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: "ClearText". + "server": "str", # Required. + Docker image registry server, without protocol such as + ``http`` and ``https``. + "username": "str" # + Required. The username for the private registry. + }, + "instanceView": { + "currentState": { + "detailStatus": + "str", # Optional. Human-readable status of this + state. + "exitCode": "str", # + Optional. The container exit code. + "finishTime": + "2020-02-20 00:00:00", # Optional. Date/time when + the container state finished. + "startTime": + "2020-02-20 00:00:00", # Optional. Date/time when + the container state started. + "state": "str" # + Optional. The state of this container. + }, + "events": [ + { + "count": 0, + # Optional. The count of the event. + "firstTimestamp": "str", # Optional. Date/time + of the first event. + "lastTimestamp": "str", # Optional. Date/time of + the last event. + "message": + "str", # Optional. The event message. + "name": + "str", # Optional. The name of the container + event. + "type": "str" + # Optional. The event type. + } + ], + "previousState": { + "detailStatus": + "str", # Optional. Human-readable status of this + state. + "exitCode": "str", # + Optional. The container exit code. + "finishTime": + "2020-02-20 00:00:00", # Optional. Date/time when + the container state finished. + "startTime": + "2020-02-20 00:00:00", # Optional. Date/time when + the container state started. + "state": "str" # + Optional. The state of this container. + }, + "restartCount": 0 # + Optional. The number of times the container has been + restarted. + }, + "labels": [ + { + "name": "str", # + Required. The name of the container label. + "value": "str" # + Required. The value of the container label. + } + ], + "livenessProbe": [ + { + "exec": { + "command": + "str" # Required. Comma separated command to run + inside the container for example "sh, -c, echo + hello world". + }, + "failureThreshold": + 3, # Optional. Default value is 3. The count of + failures after which probe is considered failed. + "httpGet": { + "host": + "str", # Optional. Host IP to connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name of + the header. + "value": "str" # Required. The value of + the header. + } + ], + "path": + "str", # Optional. Path to access on the HTTP + request. + "port": 0, # + Required. Port to access for probe. + "scheme": + "str" # Optional. Scheme for the http probe. Can + be Http or Https. Known values are: "http", + "https". + }, + "initialDelaySeconds": 0, # Optional. The initial + delay in seconds to start executing probe once + codepackage has started. + "periodSeconds": 10, + # Optional. Default value is 10. Periodic seconds to + execute probe. + "successThreshold": + 1, # Optional. Default value is 1. The count of + successful probe executions after which probe is + considered success. + "tcpSocket": { + "port": 0 # + Required. Port to access for probe. + }, + "timeoutSeconds": 1 + # Optional. Default value is 1. Period after which + probe is considered as failed if it hasn't completed + successfully. + } + ], + "name": "str", # Required. The name + of the code package. + "readinessProbe": [ + { + "exec": { + "command": + "str" # Required. Comma separated command to run + inside the container for example "sh, -c, echo + hello world". + }, + "failureThreshold": + 3, # Optional. Default value is 3. The count of + failures after which probe is considered failed. + "httpGet": { + "host": + "str", # Optional. Host IP to connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name of + the header. + "value": "str" # Required. The value of + the header. + } + ], + "path": + "str", # Optional. Path to access on the HTTP + request. + "port": 0, # + Required. Port to access for probe. + "scheme": + "str" # Optional. Scheme for the http probe. Can + be Http or Https. Known values are: "http", + "https". + }, + "initialDelaySeconds": 0, # Optional. The initial + delay in seconds to start executing probe once + codepackage has started. + "periodSeconds": 10, + # Optional. Default value is 10. Periodic seconds to + execute probe. + "successThreshold": + 1, # Optional. Default value is 1. The count of + successful probe executions after which probe is + considered success. + "tcpSocket": { + "port": 0 # + Required. Port to access for probe. + }, + "timeoutSeconds": 1 + # Optional. Default value is 1. Period after which + probe is considered as failed if it hasn't completed + successfully. + } + ], + "reliableCollectionsRefs": [ + { + "doNotPersistState": + bool, # Optional. False (the default) if + ReliableCollections state is persisted to disk as + usual. True if you do not want to persist state, in + which case replication is still enabled and you can + use ReliableCollections as distributed cache. + "name": "str" # + Required. Name of ReliableCollection resource. Right + now it's not used and you can use any string. + } + ], + "resources": { + "limits": { + "cpu": 0.0, # + Optional. CPU limits in cores. At present, only full + cores are supported. + "memoryInGB": 0.0 # + Optional. The memory limit in GB. + }, + "requests": { + "cpu": 0.0, # + Required. Requested number of CPU cores. At present, + only full cores are supported. + "memoryInGB": 0.0 # + Required. The memory request in GB for this + container. + } + }, + "settings": [ + { + "name": "str", # + Optional. The name of the setting. + "type": "ClearText", + # Optional. Default value is "ClearText". The type of + the setting being given in value. Known values are: + "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: "ClearText". + "value": "str" # + Optional. The value of the setting, will be processed + based on the type provided. + } + ], + "volumeRefs": [ + { + "destinationPath": + "str", # Required. The path within the container at + which the volume should be mounted. Only valid path + characters are allowed. + "name": "str", # + Required. Name of the volume being referenced. + "readOnly": bool # + Optional. The flag indicating whether the volume is + read only. Default is 'false'. + } + ], + "volumes": [ + { + "creationParameters": + { + "description": "str", # Optional. User readable + description of the volume. + kind: kind + }, + "destinationPath": + "str", # Required. The path within the container at + which the volume should be mounted. Only valid path + characters are allowed. + "name": "str", # + Required. Name of the volume being referenced. + "readOnly": bool # + Optional. The flag indicating whether the volume is + read only. Default is 'false'. + } + ] + } + ], + "description": "str", # Optional. User readable + description of the service. + "diagnostics": { + "enabled": bool, # Optional. Status of + whether or not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of sinks to + be used if enabled. References the list of sinks in + DiagnosticsDescription. + ] + }, + "dnsName": "str", # Optional. Dns name of the + service. + "executionPolicy": { + type: type + }, + "healthState": "str", # Optional. Describes the + health state of an application resource. Known values are: "Invalid", + "Ok", "Warning", "Error", "Unknown". + "identityRefs": [ + { + "identityRef": "str", # Optional. + The application identity name. + "name": "str" # Optional. The + identity friendly name. + } + ], + "networkRefs": [ + { + "endpointRefs": [ + { + "name": "str" # + Optional. Name of the endpoint. + } + ], + "name": "str" # Optional. Name of + the network. + } + ], + "osType": "str", # Required. The operation system + required by the code in service. Known values are: "Linux", + "Windows". + "replicaCount": 0, # Optional. The number of + replicas of the service to create. Defaults to 1 if not specified. + "status": "str", # Optional. Status of the service. + Known values are: "Unknown", "Ready", "Upgrading", "Creating", + "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional + information about the current status of the service. + "unhealthyEvaluation": "str" # Optional. When the + service's health state is not 'Ok', this additional details from + service fabric Health Manager for the user to know why the service is + marked unhealthy. + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_service_list_request( + application_resource_name=application_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + +class MeshCodePackageOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_code_package` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def get_container_logs( + self, + application_resource_name: str, + service_resource_name: str, + replica_name: str, + code_package_name: str, + *, + tail: Optional[str] = None, + **kwargs: Any + ) -> JSON: + """Gets the logs from the container. + + Gets the logs for the container of the specified code package of the service replica. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :param replica_name: Service Fabric replica name. + :type replica_name: str + :param code_package_name: The name of code package of the service. + :type code_package_name: str + :keyword tail: Number of lines to show from the end of the logs. Default is 100. 'all' to show + the complete logs. + :paramtype tail: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Content": "str" # Optional. Container logs. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_code_package_get_container_logs_request( + application_resource_name=application_resource_name, + service_resource_name=service_resource_name, + replica_name=replica_name, + code_package_name=code_package_name, + api_version=api_version, + tail=tail, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + +class MeshServiceReplicaOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_service_replica` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def get( + self, + application_resource_name: str, + service_resource_name: str, + replica_name: str, + **kwargs: Any + ) -> JSON: + """Gets the given replica of the service of an application. + + Gets the information about the service replica with the given name. The information include the + description and other properties of the service replica. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :param replica_name: Service Fabric replica name. + :type replica_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "codePackages": [ + { + "commands": [ + "str" # Optional. Command array to execute within + the container in exec form. + ], + "diagnostics": { + "enabled": bool, # Optional. Status of whether or + not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of sinks to be used + if enabled. References the list of sinks in + DiagnosticsDescription. + ] + }, + "endpoints": [ + { + "name": "str", # Required. The name of the + endpoint. + "port": 0 # Optional. Port used by the + container. + } + ], + "entryPoint": "str", # Optional. Override for the default + entry point in the container. + "environmentVariables": [ + { + "name": "str", # Optional. The name of the + environment variable. + "type": "ClearText", # Optional. Default + value is "ClearText". The type of the environment variable being + given in value. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". Default value: + "ClearText". + "value": "str" # Optional. The value of the + environment variable, will be processed based on the type + provided. + } + ], + "image": "str", # Required. The Container image to use. + "imageRegistryCredential": { + "password": "str", # Optional. The password for the + private registry. The password is required for create or update + operations, however it is not returned in the get or list operations. + Will be processed based on the type provided. + "passwordType": "ClearText", # Optional. Default + value is "ClearText". The type of the image registry password being + given in password. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". Default value: + "ClearText". + "server": "str", # Required. Docker image registry + server, without protocol such as ``http`` and ``https``. + "username": "str" # Required. The username for the + private registry. + }, + "instanceView": { + "currentState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": "str", # Optional. The container + exit code. + "finishTime": "2020-02-20 00:00:00", # + Optional. Date/time when the container state finished. + "startTime": "2020-02-20 00:00:00", # + Optional. Date/time when the container state started. + "state": "str" # Optional. The state of this + container. + }, + "events": [ + { + "count": 0, # Optional. The count of + the event. + "firstTimestamp": "str", # Optional. + Date/time of the first event. + "lastTimestamp": "str", # Optional. + Date/time of the last event. + "message": "str", # Optional. The + event message. + "name": "str", # Optional. The name + of the container event. + "type": "str" # Optional. The event + type. + } + ], + "previousState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": "str", # Optional. The container + exit code. + "finishTime": "2020-02-20 00:00:00", # + Optional. Date/time when the container state finished. + "startTime": "2020-02-20 00:00:00", # + Optional. Date/time when the container state started. + "state": "str" # Optional. The state of this + container. + }, + "restartCount": 0 # Optional. The number of times + the container has been restarted. + }, + "labels": [ + { + "name": "str", # Required. The name of the + container label. + "value": "str" # Required. The value of the + container label. + } + ], + "livenessProbe": [ + { + "exec": { + "command": "str" # Required. Comma + separated command to run inside the container for example + "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. Default + value is 3. The count of failures after which probe is considered + failed. + "httpGet": { + "host": "str", # Optional. Host IP + to connect to. + "httpHeaders": [ + { + "name": "str", # + Required. The name of the header. + "value": "str" # + Required. The value of the header. + } + ], + "path": "str", # Optional. Path to + access on the HTTP request. + "port": 0, # Required. Port to + access for probe. + "scheme": "str" # Optional. Scheme + for the http probe. Can be Http or Https. Known values are: + "http", "https". + }, + "initialDelaySeconds": 0, # Optional. The + initial delay in seconds to start executing probe once + codepackage has started. + "periodSeconds": 10, # Optional. Default + value is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. Default + value is 1. The count of successful probe executions after which + probe is considered success. + "tcpSocket": { + "port": 0 # Required. Port to access + for probe. + }, + "timeoutSeconds": 1 # Optional. Default + value is 1. Period after which probe is considered as failed if + it hasn't completed successfully. + } + ], + "name": "str", # Required. The name of the code package. + "readinessProbe": [ + { + "exec": { + "command": "str" # Required. Comma + separated command to run inside the container for example + "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. Default + value is 3. The count of failures after which probe is considered + failed. + "httpGet": { + "host": "str", # Optional. Host IP + to connect to. + "httpHeaders": [ + { + "name": "str", # + Required. The name of the header. + "value": "str" # + Required. The value of the header. + } + ], + "path": "str", # Optional. Path to + access on the HTTP request. + "port": 0, # Required. Port to + access for probe. + "scheme": "str" # Optional. Scheme + for the http probe. Can be Http or Https. Known values are: + "http", "https". + }, + "initialDelaySeconds": 0, # Optional. The + initial delay in seconds to start executing probe once + codepackage has started. + "periodSeconds": 10, # Optional. Default + value is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. Default + value is 1. The count of successful probe executions after which + probe is considered success. + "tcpSocket": { + "port": 0 # Required. Port to access + for probe. + }, + "timeoutSeconds": 1 # Optional. Default + value is 1. Period after which probe is considered as failed if + it hasn't completed successfully. + } + ], + "reliableCollectionsRefs": [ + { + "doNotPersistState": bool, # Optional. False + (the default) if ReliableCollections state is persisted to disk + as usual. True if you do not want to persist state, in which case + replication is still enabled and you can use ReliableCollections + as distributed cache. + "name": "str" # Required. Name of + ReliableCollection resource. Right now it's not used and you can + use any string. + } + ], + "resources": { + "limits": { + "cpu": 0.0, # Optional. CPU limits in cores. + At present, only full cores are supported. + "memoryInGB": 0.0 # Optional. The memory + limit in GB. + }, + "requests": { + "cpu": 0.0, # Required. Requested number of + CPU cores. At present, only full cores are supported. + "memoryInGB": 0.0 # Required. The memory + request in GB for this container. + } + }, + "settings": [ + { + "name": "str", # Optional. The name of the + setting. + "type": "ClearText", # Optional. Default + value is "ClearText". The type of the setting being given in + value. Known values are: "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: "ClearText". + "value": "str" # Optional. The value of the + setting, will be processed based on the type provided. + } + ], + "volumeRefs": [ + { + "destinationPath": "str", # Required. The + path within the container at which the volume should be mounted. + Only valid path characters are allowed. + "name": "str", # Required. Name of the + volume being referenced. + "readOnly": bool # Optional. The flag + indicating whether the volume is read only. Default is 'false'. + } + ], + "volumes": [ + { + "creationParameters": { + "description": "str", # Optional. + User readable description of the volume. + kind: kind + }, + "destinationPath": "str", # Required. The + path within the container at which the volume should be mounted. + Only valid path characters are allowed. + "name": "str", # Required. Name of the + volume being referenced. + "readOnly": bool # Optional. The flag + indicating whether the volume is read only. Default is 'false'. + } + ] + } + ], + "diagnostics": { + "enabled": bool, # Optional. Status of whether or not sinks are + enabled. + "sinkRefs": [ + "str" # Optional. List of sinks to be used if enabled. + References the list of sinks in DiagnosticsDescription. + ] + }, + "networkRefs": [ + { + "endpointRefs": [ + { + "name": "str" # Optional. Name of the + endpoint. + } + ], + "name": "str" # Optional. Name of the network. + } + ], + "osType": "str", # Required. The operation system required by the code in + service. Known values are: "Linux", "Windows". + "replicaName": "str" # Required. Name of the replica. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_service_replica_get_request( + application_resource_name=application_resource_name, + service_resource_name=service_resource_name, + replica_name=replica_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def list( + self, + application_resource_name: str, + service_resource_name: str, + **kwargs: Any + ) -> JSON: + """Lists all the replicas of a service. + + Gets the information about all replicas of a service. The information include the description + and other properties of the service replica. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "codePackages": [ + { + "commands": [ + "str" # Optional. Command array to + execute within the container in exec form. + ], + "diagnostics": { + "enabled": bool, # Optional. Status + of whether or not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of + sinks to be used if enabled. References the list of sinks + in DiagnosticsDescription. + ] + }, + "endpoints": [ + { + "name": "str", # Required. + The name of the endpoint. + "port": 0 # Optional. Port + used by the container. + } + ], + "entryPoint": "str", # Optional. Override + for the default entry point in the container. + "environmentVariables": [ + { + "name": "str", # Optional. + The name of the environment variable. + "type": "ClearText", # + Optional. Default value is "ClearText". The type of the + environment variable being given in value. Known values + are: "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: "ClearText". + "value": "str" # Optional. + The value of the environment variable, will be processed + based on the type provided. + } + ], + "image": "str", # Required. The Container + image to use. + "imageRegistryCredential": { + "password": "str", # Optional. The + password for the private registry. The password is required + for create or update operations, however it is not returned + in the get or list operations. Will be processed based on the + type provided. + "passwordType": "ClearText", # + Optional. Default value is "ClearText". The type of the image + registry password being given in password. Known values are: + "ClearText", "KeyVaultReference", "SecretValueReference". + Default value: "ClearText". + "server": "str", # Required. Docker + image registry server, without protocol such as ``http`` and + ``https``. + "username": "str" # Required. The + username for the private registry. + }, + "instanceView": { + "currentState": { + "detailStatus": "str", # + Optional. Human-readable status of this state. + "exitCode": "str", # + Optional. The container exit code. + "finishTime": "2020-02-20 + 00:00:00", # Optional. Date/time when the container + state finished. + "startTime": "2020-02-20 + 00:00:00", # Optional. Date/time when the container + state started. + "state": "str" # Optional. + The state of this container. + }, + "events": [ + { + "count": 0, # + Optional. The count of the event. + "firstTimestamp": + "str", # Optional. Date/time of the first event. + "lastTimestamp": + "str", # Optional. Date/time of the last event. + "message": "str", # + Optional. The event message. + "name": "str", # + Optional. The name of the container event. + "type": "str" # + Optional. The event type. + } + ], + "previousState": { + "detailStatus": "str", # + Optional. Human-readable status of this state. + "exitCode": "str", # + Optional. The container exit code. + "finishTime": "2020-02-20 + 00:00:00", # Optional. Date/time when the container + state finished. + "startTime": "2020-02-20 + 00:00:00", # Optional. Date/time when the container + state started. + "state": "str" # Optional. + The state of this container. + }, + "restartCount": 0 # Optional. The + number of times the container has been restarted. + }, + "labels": [ + { + "name": "str", # Required. + The name of the container label. + "value": "str" # Required. + The value of the container label. + } + ], + "livenessProbe": [ + { + "exec": { + "command": "str" # + Required. Comma separated command to run inside the + container for example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # + Optional. Default value is 3. The count of failures after + which probe is considered failed. + "httpGet": { + "host": "str", # + Optional. Host IP to connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name of the + header. + "value": "str" # Required. The value of the + header. + } + ], + "path": "str", # + Optional. Path to access on the HTTP request. + "port": 0, # + Required. Port to access for probe. + "scheme": "str" # + Optional. Scheme for the http probe. Can be Http or + Https. Known values are: "http", "https". + }, + "initialDelaySeconds": 0, # + Optional. The initial delay in seconds to start executing + probe once codepackage has started. + "periodSeconds": 10, # + Optional. Default value is 10. Periodic seconds to + execute probe. + "successThreshold": 1, # + Optional. Default value is 1. The count of successful + probe executions after which probe is considered success. + "tcpSocket": { + "port": 0 # + Required. Port to access for probe. + }, + "timeoutSeconds": 1 # + Optional. Default value is 1. Period after which probe is + considered as failed if it hasn't completed successfully. + } + ], + "name": "str", # Required. The name of the + code package. + "readinessProbe": [ + { + "exec": { + "command": "str" # + Required. Comma separated command to run inside the + container for example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # + Optional. Default value is 3. The count of failures after + which probe is considered failed. + "httpGet": { + "host": "str", # + Optional. Host IP to connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name of the + header. + "value": "str" # Required. The value of the + header. + } + ], + "path": "str", # + Optional. Path to access on the HTTP request. + "port": 0, # + Required. Port to access for probe. + "scheme": "str" # + Optional. Scheme for the http probe. Can be Http or + Https. Known values are: "http", "https". + }, + "initialDelaySeconds": 0, # + Optional. The initial delay in seconds to start executing + probe once codepackage has started. + "periodSeconds": 10, # + Optional. Default value is 10. Periodic seconds to + execute probe. + "successThreshold": 1, # + Optional. Default value is 1. The count of successful + probe executions after which probe is considered success. + "tcpSocket": { + "port": 0 # + Required. Port to access for probe. + }, + "timeoutSeconds": 1 # + Optional. Default value is 1. Period after which probe is + considered as failed if it hasn't completed successfully. + } + ], + "reliableCollectionsRefs": [ + { + "doNotPersistState": bool, # + Optional. False (the default) if ReliableCollections + state is persisted to disk as usual. True if you do not + want to persist state, in which case replication is still + enabled and you can use ReliableCollections as + distributed cache. + "name": "str" # Required. + Name of ReliableCollection resource. Right now it's not + used and you can use any string. + } + ], + "resources": { + "limits": { + "cpu": 0.0, # Optional. CPU + limits in cores. At present, only full cores are + supported. + "memoryInGB": 0.0 # + Optional. The memory limit in GB. + }, + "requests": { + "cpu": 0.0, # Required. + Requested number of CPU cores. At present, only full + cores are supported. + "memoryInGB": 0.0 # + Required. The memory request in GB for this container. + } + }, + "settings": [ + { + "name": "str", # Optional. + The name of the setting. + "type": "ClearText", # + Optional. Default value is "ClearText". The type of the + setting being given in value. Known values are: + "ClearText", "KeyVaultReference", "SecretValueReference". + Default value: "ClearText". + "value": "str" # Optional. + The value of the setting, will be processed based on the + type provided. + } + ], + "volumeRefs": [ + { + "destinationPath": "str", # + Required. The path within the container at which the + volume should be mounted. Only valid path characters are + allowed. + "name": "str", # Required. + Name of the volume being referenced. + "readOnly": bool # Optional. + The flag indicating whether the volume is read only. + Default is 'false'. + } + ], + "volumes": [ + { + "creationParameters": { + "description": "str", + # Optional. User readable description of the volume. + kind: kind + }, + "destinationPath": "str", # + Required. The path within the container at which the + volume should be mounted. Only valid path characters are + allowed. + "name": "str", # Required. + Name of the volume being referenced. + "readOnly": bool # Optional. + The flag indicating whether the volume is read only. + Default is 'false'. + } + ] + } + ], + "diagnostics": { + "enabled": bool, # Optional. Status of whether or + not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of sinks to be used + if enabled. References the list of sinks in + DiagnosticsDescription. + ] + }, + "networkRefs": [ + { + "endpointRefs": [ + { + "name": "str" # Optional. + Name of the endpoint. + } + ], + "name": "str" # Optional. Name of the + network. + } + ], + "osType": "str", # Required. The operation system required + by the code in service. Known values are: "Linux", "Windows". + "replicaName": "str" # Required. Name of the replica. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_service_replica_list_request( + application_resource_name=application_resource_name, + service_resource_name=service_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + +class MeshGatewayOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.aio.ServiceFabricClientAPIs`'s + :attr:`mesh_gateway` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def create_or_update( + self, + gateway_resource_name: str, + gateway_resource_description: JSON, + **kwargs: Any + ) -> Optional[JSON]: + """Creates or updates a Gateway resource. + + Creates a Gateway resource with the specified name, description and properties. If Gateway + resource with the same name exists, then it is updated with the specified description and + properties. Use Gateway resource to provide public connectivity to application services. + + :param gateway_resource_name: The identity of the gateway. + :type gateway_resource_name: str + :param gateway_resource_description: Description for creating a Gateway resource. + :type gateway_resource_description: JSON + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + gateway_resource_description = { + "name": "str", # Required. Name of the Gateway resource. + "properties": { + "description": "str", # Optional. User readable description of the + gateway. + "destinationNetwork": { + "endpointRefs": [ + { + "name": "str" # Optional. Name of the + endpoint. + } + ], + "name": "str" # Optional. Name of the network. + }, + "http": [ + { + "hosts": [ + { + "name": "str", # Required. http + hostname config name. + "routes": [ + { + "destination": { + "applicationName": "str", # Required. Name of + the service fabric Mesh application. + "endpointName": "str", # Required. name of the + endpoint in the service. + "serviceName": "str" # Required. service that + contains the endpoint. + }, + "match": { + "headers": [ + { + "name": "str", # Required. Name of + header to match in request. + "type": "exact", # Optional. Default + value is "exact". how to match header + value. Known values are: "exact". + "value": "str" # Optional. Value of + header to match in request. + } + ], + "path": { + "rewrite": "str", # Optional. replacement + string for matched part of the Uri. + "type": "prefix", # Default value is + "prefix". Required. how to match value in the + Uri. Known values are: "prefix". + "value": "str" # Required. Uri path to match + for request. + } + }, + "name": "str" # + Required. http route name. + } + ] + } + ], + "name": "str", # Required. http gateway config name. + "port": 0 # Required. Specifies the port at which + the service endpoint below needs to be exposed. + } + ], + "ipAddress": "str", # Optional. IP address of the gateway. This is + populated in the response and is ignored for incoming requests. + "sourceNetwork": { + "endpointRefs": [ + { + "name": "str" # Optional. Name of the + endpoint. + } + ], + "name": "str" # Optional. Name of the network. + }, + "status": "str", # Optional. Status of the resource. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the gateway. + "tcp": [ + { + "destination": { + "applicationName": "str", # Required. Name + of the service fabric Mesh application. + "endpointName": "str", # Required. name of + the endpoint in the service. + "serviceName": "str" # Required. service + that contains the endpoint. + }, + "name": "str", # Required. tcp gateway config name. + "port": 0 # Required. Specifies the port at which + the service endpoint below needs to be exposed. + } + ] + } + } + + # response body for status code(s): 200, 201 + response.json() == { + "name": "str", # Required. Name of the Gateway resource. + "properties": { + "description": "str", # Optional. User readable description of the + gateway. + "destinationNetwork": { + "endpointRefs": [ + { + "name": "str" # Optional. Name of the + endpoint. + } + ], + "name": "str" # Optional. Name of the network. + }, + "http": [ + { + "hosts": [ + { + "name": "str", # Required. http + hostname config name. + "routes": [ + { + "destination": { + "applicationName": "str", # Required. Name of + the service fabric Mesh application. + "endpointName": "str", # Required. name of the + endpoint in the service. + "serviceName": "str" # Required. service that + contains the endpoint. + }, + "match": { + "headers": [ + { + "name": "str", # Required. Name of + header to match in request. + "type": "exact", # Optional. Default + value is "exact". how to match header + value. Known values are: "exact". + "value": "str" # Optional. Value of + header to match in request. + } + ], + "path": { + "rewrite": "str", # Optional. replacement + string for matched part of the Uri. + "type": "prefix", # Default value is + "prefix". Required. how to match value in the + Uri. Known values are: "prefix". + "value": "str" # Required. Uri path to match + for request. + } + }, + "name": "str" # + Required. http route name. + } + ] + } + ], + "name": "str", # Required. http gateway config name. + "port": 0 # Required. Specifies the port at which + the service endpoint below needs to be exposed. + } + ], + "ipAddress": "str", # Optional. IP address of the gateway. This is + populated in the response and is ignored for incoming requests. + "sourceNetwork": { + "endpointRefs": [ + { + "name": "str" # Optional. Name of the + endpoint. + } + ], + "name": "str" # Optional. Name of the network. + }, + "status": "str", # Optional. Status of the resource. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the gateway. + "tcp": [ + { + "destination": { + "applicationName": "str", # Required. Name + of the service fabric Mesh application. + "endpointName": "str", # Required. name of + the endpoint in the service. + "serviceName": "str" # Required. service + that contains the endpoint. + }, + "name": "str", # Required. tcp gateway config name. + "port": 0 # Required. Specifies the port at which + the service endpoint below needs to be exposed. + } + ] + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + _json = gateway_resource_description + + request = build_mesh_gateway_create_or_update_request( + gateway_resource_name=gateway_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 201: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace_async + async def get( + self, + gateway_resource_name: str, + **kwargs: Any + ) -> JSON: + """Gets the Gateway resource with the given name. + + Gets the information about the Gateway resource with the given name. The information include + the description and other properties of the Gateway. + + :param gateway_resource_name: The identity of the gateway. + :type gateway_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "name": "str", # Required. Name of the Gateway resource. + "properties": { + "description": "str", # Optional. User readable description of the + gateway. + "destinationNetwork": { + "endpointRefs": [ + { + "name": "str" # Optional. Name of the + endpoint. + } + ], + "name": "str" # Optional. Name of the network. + }, + "http": [ + { + "hosts": [ + { + "name": "str", # Required. http + hostname config name. + "routes": [ + { + "destination": { + "applicationName": "str", # Required. Name of + the service fabric Mesh application. + "endpointName": "str", # Required. name of the + endpoint in the service. + "serviceName": "str" # Required. service that + contains the endpoint. + }, + "match": { + "headers": [ + { + "name": "str", # Required. Name of + header to match in request. + "type": "exact", # Optional. Default + value is "exact". how to match header + value. Known values are: "exact". + "value": "str" # Optional. Value of + header to match in request. + } + ], + "path": { + "rewrite": "str", # Optional. replacement + string for matched part of the Uri. + "type": "prefix", # Default value is + "prefix". Required. how to match value in the + Uri. Known values are: "prefix". + "value": "str" # Required. Uri path to match + for request. + } + }, + "name": "str" # + Required. http route name. + } + ] + } + ], + "name": "str", # Required. http gateway config name. + "port": 0 # Required. Specifies the port at which + the service endpoint below needs to be exposed. + } + ], + "ipAddress": "str", # Optional. IP address of the gateway. This is + populated in the response and is ignored for incoming requests. + "sourceNetwork": { + "endpointRefs": [ + { + "name": "str" # Optional. Name of the + endpoint. + } + ], + "name": "str" # Optional. Name of the network. + }, + "status": "str", # Optional. Status of the resource. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the gateway. + "tcp": [ + { + "destination": { + "applicationName": "str", # Required. Name + of the service fabric Mesh application. + "endpointName": "str", # Required. name of + the endpoint in the service. + "serviceName": "str" # Required. service + that contains the endpoint. + }, + "name": "str", # Required. tcp gateway config name. + "port": 0 # Required. Specifies the port at which + the service endpoint below needs to be exposed. + } + ] + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_gateway_get_request( + gateway_resource_name=gateway_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + gateway_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the Gateway resource. + + Deletes the Gateway resource identified by the name. + + :param gateway_resource_name: The identity of the gateway. + :type gateway_resource_name: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_mesh_gateway_delete_request( + gateway_resource_name=gateway_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace_async + async def list( + self, + **kwargs: Any + ) -> JSON: + """Lists all the gateway resources. + + Gets the information about all gateway resources in a given resource group. The information + include the description and other properties of the Gateway. + + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "name": "str", # Required. Name of the Gateway resource. + "properties": { + "description": "str", # Optional. User readable + description of the gateway. + "destinationNetwork": { + "endpointRefs": [ + { + "name": "str" # Optional. + Name of the endpoint. + } + ], + "name": "str" # Optional. Name of the + network. + }, + "http": [ + { + "hosts": [ + { + "name": "str", # + Required. http hostname config name. + "routes": [ + { + "destination": { + "applicationName": "str", # Required. + Name of the service fabric Mesh + application. + "endpointName": "str", # Required. name + of the endpoint in the service. + "serviceName": "str" # Required. service + that contains the endpoint. + }, + "match": { + "headers": [ + { + "name": "str", # Required. Name + of header to match in request. + "type": "exact", # Optional. + Default value is "exact". how to + match header value. Known values + are: "exact". + "value": "str" # Optional. Value + of header to match in request. + } + ], + "path": { + "rewrite": "str", # Optional. + replacement string for matched part + of the Uri. + "type": "prefix", # Default value is + "prefix". Required. how to match + value in the Uri. Known values are: + "prefix". + "value": "str" # Required. Uri path + to match for request. + } + }, + "name": "str" # Required. http route name. + } + ] + } + ], + "name": "str", # Required. http + gateway config name. + "port": 0 # Required. Specifies the + port at which the service endpoint below needs to be exposed. + } + ], + "ipAddress": "str", # Optional. IP address of the + gateway. This is populated in the response and is ignored for + incoming requests. + "sourceNetwork": { + "endpointRefs": [ + { + "name": "str" # Optional. + Name of the endpoint. + } + ], + "name": "str" # Optional. Name of the + network. + }, + "status": "str", # Optional. Status of the resource. + Known values are: "Unknown", "Ready", "Upgrading", "Creating", + "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional + information about the current status of the gateway. + "tcp": [ + { + "destination": { + "applicationName": "str", # + Required. Name of the service fabric Mesh application. + "endpointName": "str", # + Required. name of the endpoint in the service. + "serviceName": "str" # + Required. service that contains the endpoint. + }, + "name": "str", # Required. tcp + gateway config name. + "port": 0 # Required. Specifies the + port at which the service endpoint below needs to be exposed. + } + ] + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_gateway_list_request( + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + diff --git a/customSDK/servicefabric/aio/operations/_patch.py b/customSDK/servicefabric/aio/operations/_patch.py new file mode 100644 index 00000000..0ad201a8 --- /dev/null +++ b/customSDK/servicefabric/aio/operations/_patch.py @@ -0,0 +1,19 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/customSDK/servicefabric/aio/operations/_service_fabric_client_apis_operations.py b/customSDK/servicefabric/aio/operations/_service_fabric_client_apis_operations.py deleted file mode 100644 index 13ed9602..00000000 --- a/customSDK/servicefabric/aio/operations/_service_fabric_client_apis_operations.py +++ /dev/null @@ -1,16791 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, List, Optional, TypeVar, Union - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._service_fabric_client_apis_operations import build_add_configuration_parameter_overrides_request, build_add_node_tags_request, build_backup_partition_request, build_cancel_operation_request, build_cancel_repair_task_request, build_commit_image_store_upload_session_request, build_copy_image_store_content_request, build_create_application_request, build_create_backup_policy_request, build_create_compose_deployment_request, build_create_name_request, build_create_repair_task_request, build_create_service_from_template_request, build_create_service_request, build_delete_application_request, build_delete_backup_policy_request, build_delete_image_store_content_request, build_delete_image_store_upload_session_request, build_delete_name_request, build_delete_property_request, build_delete_repair_task_request, build_delete_service_request, build_deploy_service_package_to_node_request, build_disable_application_backup_request, build_disable_node_request, build_disable_partition_backup_request, build_disable_service_backup_request, build_enable_application_backup_request, build_enable_node_request, build_enable_partition_backup_request, build_enable_service_backup_request, build_force_approve_repair_task_request, build_get_aad_metadata_request, build_get_all_entities_backed_up_by_policy_request, build_get_application_backup_configuration_info_request, build_get_application_backup_list_request, build_get_application_event_list_request, build_get_application_health_request, build_get_application_health_using_policy_request, build_get_application_info_list_request, build_get_application_info_request, build_get_application_load_info_request, build_get_application_manifest_request, build_get_application_name_info_request, build_get_application_type_info_list_by_name_request, build_get_application_type_info_list_request, build_get_application_upgrade_request, build_get_applications_event_list_request, build_get_backup_policy_by_name_request, build_get_backup_policy_list_request, build_get_backups_from_backup_location_request, build_get_chaos_events_request, build_get_chaos_request, build_get_chaos_schedule_request, build_get_cluster_configuration_request, build_get_cluster_configuration_upgrade_status_request, build_get_cluster_event_list_request, build_get_cluster_health_chunk_request, build_get_cluster_health_chunk_using_policy_and_advanced_filters_request, build_get_cluster_health_request, build_get_cluster_health_using_policy_request, build_get_cluster_load_request, build_get_cluster_manifest_request, build_get_cluster_upgrade_progress_request, build_get_cluster_version_request, build_get_compose_deployment_status_list_request, build_get_compose_deployment_status_request, build_get_compose_deployment_upgrade_progress_request, build_get_configuration_overrides_request, build_get_container_logs_deployed_on_node_request, build_get_containers_event_list_request, build_get_correlated_event_list_request, build_get_data_loss_progress_request, build_get_deployed_application_health_request, build_get_deployed_application_health_using_policy_request, build_get_deployed_application_info_list_request, build_get_deployed_application_info_request, build_get_deployed_code_package_info_list_request, build_get_deployed_service_package_health_request, build_get_deployed_service_package_health_using_policy_request, build_get_deployed_service_package_info_list_by_name_request, build_get_deployed_service_package_info_list_request, build_get_deployed_service_replica_detail_info_by_partition_id_request, build_get_deployed_service_replica_detail_info_request, build_get_deployed_service_replica_info_list_request, build_get_deployed_service_type_info_by_name_request, build_get_deployed_service_type_info_list_request, build_get_fault_operation_list_request, build_get_image_store_content_request, build_get_image_store_folder_size_request, build_get_image_store_info_request, build_get_image_store_root_content_request, build_get_image_store_root_folder_size_request, build_get_image_store_upload_session_by_id_request, build_get_image_store_upload_session_by_path_request, build_get_loaded_partition_info_list_request, build_get_name_exists_info_request, build_get_node_event_list_request, build_get_node_health_request, build_get_node_health_using_policy_request, build_get_node_info_list_request, build_get_node_info_request, build_get_node_load_info_request, build_get_node_transition_progress_request, build_get_nodes_event_list_request, build_get_partition_backup_configuration_info_request, build_get_partition_backup_list_request, build_get_partition_backup_progress_request, build_get_partition_event_list_request, build_get_partition_health_request, build_get_partition_health_using_policy_request, build_get_partition_info_list_request, build_get_partition_info_request, build_get_partition_load_information_request, build_get_partition_replica_event_list_request, build_get_partition_replicas_event_list_request, build_get_partition_restart_progress_request, build_get_partition_restore_progress_request, build_get_partitions_event_list_request, build_get_property_info_list_request, build_get_property_info_request, build_get_provisioned_fabric_code_version_info_list_request, build_get_provisioned_fabric_config_version_info_list_request, build_get_quorum_loss_progress_request, build_get_repair_task_list_request, build_get_replica_health_request, build_get_replica_health_using_policy_request, build_get_replica_info_list_request, build_get_replica_info_request, build_get_service_backup_configuration_info_request, build_get_service_backup_list_request, build_get_service_description_request, build_get_service_event_list_request, build_get_service_health_request, build_get_service_health_using_policy_request, build_get_service_info_list_request, build_get_service_info_request, build_get_service_manifest_request, build_get_service_name_info_request, build_get_service_type_info_by_name_request, build_get_service_type_info_list_request, build_get_services_event_list_request, build_get_sub_name_info_list_request, build_get_unplaced_replica_information_request, build_get_upgrade_orchestration_service_state_request, build_invoke_container_api_request, build_invoke_infrastructure_command_request, build_invoke_infrastructure_query_request, build_move_auxiliary_replica_request, build_move_instance_request, build_move_primary_replica_request, build_move_secondary_replica_request, build_post_chaos_schedule_request, build_provision_application_type_request, build_provision_cluster_request, build_put_property_request, build_recover_all_partitions_request, build_recover_partition_request, build_recover_service_partitions_request, build_recover_system_partitions_request, build_remove_compose_deployment_request, build_remove_configuration_overrides_request, build_remove_node_state_request, build_remove_node_tags_request, build_remove_replica_request, build_report_application_health_request, build_report_cluster_health_request, build_report_deployed_application_health_request, build_report_deployed_service_package_health_request, build_report_node_health_request, build_report_partition_health_request, build_report_replica_health_request, build_report_service_health_request, build_reset_partition_load_request, build_resolve_service_request, build_restart_deployed_code_package_request, build_restart_node_request, build_restart_replica_request, build_restore_partition_request, build_resume_application_backup_request, build_resume_application_upgrade_request, build_resume_cluster_upgrade_request, build_resume_partition_backup_request, build_resume_service_backup_request, build_rollback_application_upgrade_request, build_rollback_cluster_upgrade_request, build_set_upgrade_orchestration_service_state_request, build_start_application_upgrade_request, build_start_chaos_request, build_start_cluster_configuration_upgrade_request, build_start_cluster_upgrade_request, build_start_compose_deployment_upgrade_request, build_start_data_loss_request, build_start_node_transition_request, build_start_partition_restart_request, build_start_quorum_loss_request, build_start_rollback_compose_deployment_upgrade_request, build_stop_chaos_request, build_submit_property_batch_request, build_suspend_application_backup_request, build_suspend_partition_backup_request, build_suspend_service_backup_request, build_toggle_verbose_service_placement_health_reporting_request, build_unprovision_application_type_request, build_unprovision_cluster_request, build_update_application_arm_metadata_request, build_update_application_request, build_update_application_type_arm_metadata_request, build_update_application_upgrade_request, build_update_backup_policy_request, build_update_cluster_upgrade_request, build_update_partition_load_request, build_update_repair_execution_state_request, build_update_repair_task_health_policy_request, build_update_service_request, build_upload_file_chunk_request, build_upload_file_request, build_validate_cluster_upgrade_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ServiceFabricClientAPIsOperationsMixin: # pylint: disable=too-many-public-methods - - @distributed_trace_async - async def get_cluster_manifest( - self, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ClusterManifest": - """Get the Service Fabric cluster manifest. - - Get the Service Fabric cluster manifest. The cluster manifest contains properties of the - cluster that include different node types on the cluster, - security configurations, fault, and upgrade domain topologies, etc. - - These properties are specified as part of the ClusterConfig.JSON file while deploying a - stand-alone cluster. However, most of the information in the cluster manifest - is generated internally by service fabric during cluster deployment in other deployment - scenarios (e.g. when using Azure portal). - - The contents of the cluster manifest are for informational purposes only and users are not - expected to take a dependency on the format of the file contents or its interpretation. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterManifest, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterManifest - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterManifest"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_cluster_manifest_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_cluster_manifest.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterManifest', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_manifest.metadata = {'url': "/$/GetClusterManifest"} # type: ignore - - - @distributed_trace_async - async def get_cluster_health( - self, - nodes_health_state_filter: Optional[int] = 0, - applications_health_state_filter: Optional[int] = 0, - events_health_state_filter: Optional[int] = 0, - exclude_health_statistics: Optional[bool] = False, - include_system_application_health_statistics: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ClusterHealth": - """Gets the health of a Service Fabric cluster. - - Use EventsHealthStateFilter to filter the collection of health events reported on the cluster - based on the health state. - Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the - collection of nodes and applications returned based on their aggregated health state. - - :param nodes_health_state_filter: Allows filtering of the node health state objects returned in - the result of cluster health query - based on their health state. The possible values for this parameter include integer value of - one of the - following health states. Only nodes that match the filter are returned. All nodes are used to - evaluate the aggregated health state. - If not specified, all entries are returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of nodes with HealthState value of - OK (2) and Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type nodes_health_state_filter: int - :param applications_health_state_filter: Allows filtering of the application health state - objects returned in the result of cluster health - query based on their health state. - The possible values for this parameter include integer value obtained from members or bitwise - operations - on members of HealthStateFilter enumeration. Only applications that match the filter are - returned. - All applications are used to evaluate the aggregated health state. If not specified, all - entries are returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of applications with HealthState - value of OK (2) and Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type applications_health_state_filter: int - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param include_system_application_health_statistics: Indicates whether the health statistics - should include the fabric:/System application health statistics. False by default. - If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the - entities that belong to the fabric:/System application. - Otherwise, the query result includes health statistics only for user applications. - The health statistics must be included in the query result for this parameter to be applied. - Default value is False. - :type include_system_application_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_cluster_health_request( - api_version=api_version, - nodes_health_state_filter=nodes_health_state_filter, - applications_health_state_filter=applications_health_state_filter, - events_health_state_filter=events_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - include_system_application_health_statistics=include_system_application_health_statistics, - timeout=timeout, - template_url=self.get_cluster_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_health.metadata = {'url': "/$/GetClusterHealth"} # type: ignore - - - @distributed_trace_async - async def get_cluster_health_using_policy( - self, - nodes_health_state_filter: Optional[int] = 0, - applications_health_state_filter: Optional[int] = 0, - events_health_state_filter: Optional[int] = 0, - exclude_health_statistics: Optional[bool] = False, - include_system_application_health_statistics: Optional[bool] = False, - timeout: Optional[int] = 60, - application_health_policy_map: Optional[List["_models.ApplicationHealthPolicyMapItem"]] = None, - cluster_health_policy: Optional["_models.ClusterHealthPolicy"] = None, - **kwargs: Any - ) -> "_models.ClusterHealth": - """Gets the health of a Service Fabric cluster using the specified policy. - - Use EventsHealthStateFilter to filter the collection of health events reported on the cluster - based on the health state. - Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the - collection of nodes and applications returned based on their aggregated health state. - Use ClusterHealthPolicies to override the health policies used to evaluate the health. - - :param nodes_health_state_filter: Allows filtering of the node health state objects returned in - the result of cluster health query - based on their health state. The possible values for this parameter include integer value of - one of the - following health states. Only nodes that match the filter are returned. All nodes are used to - evaluate the aggregated health state. - If not specified, all entries are returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of nodes with HealthState value of - OK (2) and Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type nodes_health_state_filter: int - :param applications_health_state_filter: Allows filtering of the application health state - objects returned in the result of cluster health - query based on their health state. - The possible values for this parameter include integer value obtained from members or bitwise - operations - on members of HealthStateFilter enumeration. Only applications that match the filter are - returned. - All applications are used to evaluate the aggregated health state. If not specified, all - entries are returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of applications with HealthState - value of OK (2) and Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type applications_health_state_filter: int - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param include_system_application_health_statistics: Indicates whether the health statistics - should include the fabric:/System application health statistics. False by default. - If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the - entities that belong to the fabric:/System application. - Otherwise, the query result includes health statistics only for user applications. - The health statistics must be included in the query result for this parameter to be applied. - Default value is False. - :type include_system_application_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param application_health_policy_map: Defines a map that contains specific application health - policies for different applications. - Each entry specifies as key the application name and as value an ApplicationHealthPolicy used - to evaluate the application health. - If an application is not specified in the map, the application health evaluation uses the - ApplicationHealthPolicy found in its application manifest or the default application health - policy (if no health policy is defined in the manifest). - The map is empty by default. Default value is None. - :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - :param cluster_health_policy: Defines a health policy used to evaluate the health of the - cluster or of a cluster node. Default value is None. - :type cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _cluster_health_policies = _models.ClusterHealthPolicies(application_health_policy_map=application_health_policy_map, cluster_health_policy=cluster_health_policy) - if _cluster_health_policies is not None: - _json = self._serialize.body(_cluster_health_policies, 'ClusterHealthPolicies') - else: - _json = None - - request = build_get_cluster_health_using_policy_request( - api_version=api_version, - content_type=content_type, - json=_json, - nodes_health_state_filter=nodes_health_state_filter, - applications_health_state_filter=applications_health_state_filter, - events_health_state_filter=events_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - include_system_application_health_statistics=include_system_application_health_statistics, - timeout=timeout, - template_url=self.get_cluster_health_using_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_health_using_policy.metadata = {'url': "/$/GetClusterHealth"} # type: ignore - - - @distributed_trace_async - async def get_cluster_health_chunk( - self, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ClusterHealthChunk": - """Gets the health of a Service Fabric cluster using health chunks. - - Gets the health of a Service Fabric cluster using health chunks. Includes the aggregated health - state of the cluster, but none of the cluster entities. - To expand the cluster health and get the health state of all or some of the entities, use the - POST URI and specify the cluster health chunk query description. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterHealthChunk, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterHealthChunk - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterHealthChunk"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_cluster_health_chunk_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_cluster_health_chunk.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterHealthChunk', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_health_chunk.metadata = {'url': "/$/GetClusterHealthChunk"} # type: ignore - - - @distributed_trace_async - async def get_cluster_health_chunk_using_policy_and_advanced_filters( - self, - timeout: Optional[int] = 60, - cluster_health_chunk_query_description: Optional["_models.ClusterHealthChunkQueryDescription"] = None, - **kwargs: Any - ) -> "_models.ClusterHealthChunk": - """Gets the health of a Service Fabric cluster using health chunks. - - Gets the health of a Service Fabric cluster using health chunks. The health evaluation is done - based on the input cluster health chunk query description. - The query description allows users to specify health policies for evaluating the cluster and - its children. - Users can specify very flexible filters to select which cluster entities to return. The - selection can be done based on the entities health state and based on the hierarchy. - The query can return multi-level children of the entities based on the specified filters. For - example, it can return one application with a specified name, and for this application, return - only services that are in Error or Warning, and all partitions and replicas for one of these - services. - - :param 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. Default value is 60. - :type timeout: long - :param cluster_health_chunk_query_description: Describes the cluster and application health - policies used to evaluate the cluster health and the filters to select which cluster entities - to be returned. - If the cluster health policy is present, it is used to evaluate the cluster events and the - cluster nodes. If not present, the health evaluation uses the cluster health policy defined in - the cluster manifest or the default cluster health policy. - By default, each application is evaluated using its specific application health policy, - defined in the application manifest, or the default health policy, if no policy is defined in - manifest. - If the application health policy map is specified, and it has an entry for an application, the - specified application health policy - is used to evaluate the application health. - Users can specify very flexible filters to select which cluster entities to include in - response. The selection can be done based on the entities health state and based on the - hierarchy. - The query can return multi-level children of the entities based on the specified filters. For - example, it can return one application with a specified name, and for this application, return - only services that are in Error or Warning, and all partitions and replicas for one of these - services. Default value is None. - :type cluster_health_chunk_query_description: - ~azure.servicefabric.models.ClusterHealthChunkQueryDescription - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterHealthChunk, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterHealthChunk - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterHealthChunk"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if cluster_health_chunk_query_description is not None: - _json = self._serialize.body(cluster_health_chunk_query_description, 'ClusterHealthChunkQueryDescription') - else: - _json = None - - request = build_get_cluster_health_chunk_using_policy_and_advanced_filters_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.get_cluster_health_chunk_using_policy_and_advanced_filters.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterHealthChunk', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_health_chunk_using_policy_and_advanced_filters.metadata = {'url': "/$/GetClusterHealthChunk"} # type: ignore - - - @distributed_trace_async - async def report_cluster_health( # pylint: disable=inconsistent-return-statements - self, - health_information: "_models.HealthInformation", - immediate: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Sends a health report on the Service Fabric cluster. - - Sends a health report on a Service Fabric cluster. The report must contain the information - about the source of the health report and property on which it is reported. - The report is sent to a Service Fabric gateway node, which forwards to the health store. - The report may be accepted by the gateway, but rejected by the health store after extra - validation. - For example, the health store may reject the report because of an invalid parameter, like a - stale sequence number. - To see whether the report was applied in the health store, run GetClusterHealth and check that - the report appears in the HealthEvents section. - - :param health_information: Describes the health information for the health report. This - information needs to be present in all of the health reports sent to the health manager. - :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be sent immediately. - A health report is sent to a Service Fabric gateway Application, which forwards to the health - store. - If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health - store, regardless of the fabric client settings that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as possible. - Depending on timing and other conditions, sending the report may still fail, for example if - the HTTP Gateway is closed or the message doesn't reach the Gateway. - If Immediate is set to false, the report is sent based on the health client settings from the - HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval - configuration. - This is the recommended setting because it allows the health client to optimize health - reporting messages to health store as well as health report processing. - By default, reports are not sent immediately. Default value is False. - :type immediate: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(health_information, 'HealthInformation') - - request = build_report_cluster_health_request( - api_version=api_version, - content_type=content_type, - json=_json, - immediate=immediate, - timeout=timeout, - template_url=self.report_cluster_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - report_cluster_health.metadata = {'url': "/$/ReportClusterHealth"} # type: ignore - - - @distributed_trace_async - async def get_provisioned_fabric_code_version_info_list( - self, - code_version: Optional[str] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> List["_models.FabricCodeVersionInfo"]: - """Gets a list of fabric code versions that are provisioned in a Service Fabric cluster. - - Gets a list of information about fabric code versions that are provisioned in the cluster. The - parameter CodeVersion can be used to optionally filter the output to only that particular - version. - - :param code_version: The product version of Service Fabric. Default value is None. - :type code_version: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of FabricCodeVersionInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.FabricCodeVersionInfo] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.FabricCodeVersionInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_provisioned_fabric_code_version_info_list_request( - api_version=api_version, - code_version=code_version, - timeout=timeout, - template_url=self.get_provisioned_fabric_code_version_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[FabricCodeVersionInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_provisioned_fabric_code_version_info_list.metadata = {'url': "/$/GetProvisionedCodeVersions"} # type: ignore - - - @distributed_trace_async - async def get_provisioned_fabric_config_version_info_list( - self, - config_version: Optional[str] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> List["_models.FabricConfigVersionInfo"]: - """Gets a list of fabric config versions that are provisioned in a Service Fabric cluster. - - Gets a list of information about fabric config versions that are provisioned in the cluster. - The parameter ConfigVersion can be used to optionally filter the output to only that particular - version. - - :param config_version: The config version of Service Fabric. Default value is None. - :type config_version: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of FabricConfigVersionInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.FabricConfigVersionInfo] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.FabricConfigVersionInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_provisioned_fabric_config_version_info_list_request( - api_version=api_version, - config_version=config_version, - timeout=timeout, - template_url=self.get_provisioned_fabric_config_version_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[FabricConfigVersionInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_provisioned_fabric_config_version_info_list.metadata = {'url': "/$/GetProvisionedConfigVersions"} # type: ignore - - - @distributed_trace_async - async def get_cluster_upgrade_progress( - self, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ClusterUpgradeProgressObject": - """Gets the progress of the current cluster upgrade. - - Gets the current progress of the ongoing cluster upgrade. If no upgrade is currently in - progress, get the last state of the previous cluster upgrade. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterUpgradeProgressObject, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterUpgradeProgressObject - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterUpgradeProgressObject"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_cluster_upgrade_progress_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_cluster_upgrade_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterUpgradeProgressObject', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_upgrade_progress.metadata = {'url': "/$/GetUpgradeProgress"} # type: ignore - - - @distributed_trace_async - async def get_cluster_configuration( - self, - configuration_api_version: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ClusterConfiguration": - """Get the Service Fabric standalone cluster configuration. - - The cluster configuration contains properties of the cluster that include different node types - on the cluster, - security configurations, fault, and upgrade domain topologies, etc. - - :param configuration_api_version: The API version of the Standalone cluster json configuration. - :type configuration_api_version: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterConfiguration, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterConfiguration"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_cluster_configuration_request( - api_version=api_version, - configuration_api_version=configuration_api_version, - timeout=timeout, - template_url=self.get_cluster_configuration.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_configuration.metadata = {'url': "/$/GetClusterConfiguration"} # type: ignore - - - @distributed_trace_async - async def get_cluster_configuration_upgrade_status( - self, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ClusterConfigurationUpgradeStatusInfo": - """Get the cluster configuration upgrade status of a Service Fabric standalone cluster. - - Get the cluster configuration upgrade status details of a Service Fabric standalone cluster. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterConfigurationUpgradeStatusInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterConfigurationUpgradeStatusInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterConfigurationUpgradeStatusInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_cluster_configuration_upgrade_status_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_cluster_configuration_upgrade_status.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterConfigurationUpgradeStatusInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_configuration_upgrade_status.metadata = {'url': "/$/GetClusterConfigurationUpgradeStatus"} # type: ignore - - - @distributed_trace_async - async def get_upgrade_orchestration_service_state( - self, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.UpgradeOrchestrationServiceState": - """Get the service state of Service Fabric Upgrade Orchestration Service. - - Get the service state of Service Fabric Upgrade Orchestration Service. This API is internally - used for support purposes. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: UpgradeOrchestrationServiceState, or the result of cls(response) - :rtype: ~azure.servicefabric.models.UpgradeOrchestrationServiceState - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.UpgradeOrchestrationServiceState"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_upgrade_orchestration_service_state_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_upgrade_orchestration_service_state.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('UpgradeOrchestrationServiceState', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_upgrade_orchestration_service_state.metadata = {'url': "/$/GetUpgradeOrchestrationServiceState"} # type: ignore - - - @distributed_trace_async - async def set_upgrade_orchestration_service_state( - self, - timeout: Optional[int] = 60, - service_state: Optional[str] = None, - **kwargs: Any - ) -> "_models.UpgradeOrchestrationServiceStateSummary": - """Update the service state of Service Fabric Upgrade Orchestration Service. - - Update the service state of Service Fabric Upgrade Orchestration Service. This API is - internally used for support purposes. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param service_state: The state of Service Fabric Upgrade Orchestration Service. Default value - is None. - :type service_state: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: UpgradeOrchestrationServiceStateSummary, or the result of cls(response) - :rtype: ~azure.servicefabric.models.UpgradeOrchestrationServiceStateSummary - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.UpgradeOrchestrationServiceStateSummary"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _upgrade_orchestration_service_state = _models.UpgradeOrchestrationServiceState(service_state=service_state) - _json = self._serialize.body(_upgrade_orchestration_service_state, 'UpgradeOrchestrationServiceState') - - request = build_set_upgrade_orchestration_service_state_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.set_upgrade_orchestration_service_state.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('UpgradeOrchestrationServiceStateSummary', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - set_upgrade_orchestration_service_state.metadata = {'url': "/$/SetUpgradeOrchestrationServiceState"} # type: ignore - - - @distributed_trace_async - async def provision_cluster( # pylint: disable=inconsistent-return-statements - self, - timeout: Optional[int] = 60, - code_file_path: Optional[str] = None, - cluster_manifest_file_path: Optional[str] = None, - **kwargs: Any - ) -> None: - """Provision the code or configuration packages of a Service Fabric cluster. - - Validate and provision the code or configuration packages of a Service Fabric cluster. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param code_file_path: The cluster code package file path. Default value is None. - :type code_file_path: str - :param cluster_manifest_file_path: The cluster manifest file path. Default value is None. - :type cluster_manifest_file_path: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _provision_fabric_description = _models.ProvisionFabricDescription(code_file_path=code_file_path, cluster_manifest_file_path=cluster_manifest_file_path) - _json = self._serialize.body(_provision_fabric_description, 'ProvisionFabricDescription') - - request = build_provision_cluster_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.provision_cluster.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - provision_cluster.metadata = {'url': "/$/Provision"} # type: ignore - - - @distributed_trace_async - async def unprovision_cluster( # pylint: disable=inconsistent-return-statements - self, - timeout: Optional[int] = 60, - code_version: Optional[str] = None, - config_version: Optional[str] = None, - **kwargs: Any - ) -> None: - """Unprovision the code or configuration packages of a Service Fabric cluster. - - It is supported to unprovision code and configuration separately. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param code_version: The cluster code package version. Default value is None. - :type code_version: str - :param config_version: The cluster manifest version. Default value is None. - :type config_version: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _unprovision_fabric_description = _models.UnprovisionFabricDescription(code_version=code_version, config_version=config_version) - _json = self._serialize.body(_unprovision_fabric_description, 'UnprovisionFabricDescription') - - request = build_unprovision_cluster_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.unprovision_cluster.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - unprovision_cluster.metadata = {'url': "/$/Unprovision"} # type: ignore - - - @distributed_trace_async - async def rollback_cluster_upgrade( # pylint: disable=inconsistent-return-statements - self, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Roll back the upgrade of a Service Fabric cluster. - - Roll back the code or configuration upgrade of a Service Fabric cluster. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_rollback_cluster_upgrade_request( - api_version=api_version, - timeout=timeout, - template_url=self.rollback_cluster_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - rollback_cluster_upgrade.metadata = {'url': "/$/RollbackUpgrade"} # type: ignore - - - @distributed_trace_async - async def resume_cluster_upgrade( # pylint: disable=inconsistent-return-statements - self, - upgrade_domain: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Make the cluster upgrade move on to the next upgrade domain. - - Make the cluster code or configuration upgrade move on to the next upgrade domain if - appropriate. - - :param upgrade_domain: The next upgrade domain for this cluster upgrade. - :type upgrade_domain: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _resume_cluster_upgrade_description = _models.ResumeClusterUpgradeDescription(upgrade_domain=upgrade_domain) - _json = self._serialize.body(_resume_cluster_upgrade_description, 'ResumeClusterUpgradeDescription') - - request = build_resume_cluster_upgrade_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.resume_cluster_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - resume_cluster_upgrade.metadata = {'url': "/$/MoveToNextUpgradeDomain"} # type: ignore - - - @distributed_trace_async - async def start_cluster_upgrade( # pylint: disable=inconsistent-return-statements - self, - start_cluster_upgrade_description: "_models.StartClusterUpgradeDescription", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Start upgrading the code or configuration version of a Service Fabric cluster. - - Validate the supplied upgrade parameters and start upgrading the code or configuration version - of a Service Fabric cluster if the parameters are valid. - - :param start_cluster_upgrade_description: Describes the parameters for starting a cluster - upgrade. - :type start_cluster_upgrade_description: - ~azure.servicefabric.models.StartClusterUpgradeDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') - - request = build_start_cluster_upgrade_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.start_cluster_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_cluster_upgrade.metadata = {'url': "/$/Upgrade"} # type: ignore - - - @distributed_trace_async - async def start_cluster_configuration_upgrade( # pylint: disable=inconsistent-return-statements - self, - cluster_configuration_upgrade_description: "_models.ClusterConfigurationUpgradeDescription", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Start upgrading the configuration of a Service Fabric standalone cluster. - - Validate the supplied configuration upgrade parameters and start upgrading the cluster - configuration if the parameters are valid. - - :param cluster_configuration_upgrade_description: Parameters for a standalone cluster - configuration upgrade. - :type cluster_configuration_upgrade_description: - ~azure.servicefabric.models.ClusterConfigurationUpgradeDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(cluster_configuration_upgrade_description, 'ClusterConfigurationUpgradeDescription') - - request = build_start_cluster_configuration_upgrade_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.start_cluster_configuration_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_cluster_configuration_upgrade.metadata = {'url': "/$/StartClusterConfigurationUpgrade"} # type: ignore - - - @distributed_trace_async - async def update_cluster_upgrade( # pylint: disable=inconsistent-return-statements - self, - update_cluster_upgrade_description: "_models.UpdateClusterUpgradeDescription", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Update the upgrade parameters of a Service Fabric cluster upgrade. - - Update the upgrade parameters used during a Service Fabric cluster upgrade. - - :param update_cluster_upgrade_description: Parameters for updating a cluster upgrade. - :type update_cluster_upgrade_description: - ~azure.servicefabric.models.UpdateClusterUpgradeDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(update_cluster_upgrade_description, 'UpdateClusterUpgradeDescription') - - request = build_update_cluster_upgrade_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.update_cluster_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - update_cluster_upgrade.metadata = {'url': "/$/UpdateUpgrade"} # type: ignore - - - @distributed_trace_async - async def get_aad_metadata( - self, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.AadMetadataObject": - """Gets the Azure Active Directory metadata used for secured connection to cluster. - - Gets the Azure Active Directory metadata used for secured connection to cluster. - This API is not supposed to be called separately. It provides information needed to set up an - Azure Active Directory secured connection with a Service Fabric cluster. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AadMetadataObject, or the result of cls(response) - :rtype: ~azure.servicefabric.models.AadMetadataObject - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AadMetadataObject"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_aad_metadata_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_aad_metadata.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AadMetadataObject', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_aad_metadata.metadata = {'url': "/$/GetAadMetadata"} # type: ignore - - - @distributed_trace_async - async def get_cluster_version( - self, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ClusterVersion": - """Get the current Service Fabric cluster version. - - If a cluster upgrade is happening, then this API will return the lowest (older) version of the - current and target cluster runtime versions. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterVersion, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterVersion - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterVersion"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_cluster_version_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_cluster_version.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterVersion', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_version.metadata = {'url': "/$/GetClusterVersion"} # type: ignore - - - @distributed_trace_async - async def get_cluster_load( - self, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ClusterLoadInfo": - """Gets the load of a Service Fabric cluster. - - Retrieves the load information of a Service Fabric cluster for all the metrics that have load - or capacity defined. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterLoadInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterLoadInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterLoadInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_cluster_load_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_cluster_load.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterLoadInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_load.metadata = {'url': "/$/GetLoadInformation"} # type: ignore - - - @distributed_trace_async - async def toggle_verbose_service_placement_health_reporting( # pylint: disable=inconsistent-return-statements - self, - enabled: bool, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Changes the verbosity of service placement health reporting. - - If verbosity is set to true, then detailed health reports will be generated when replicas - cannot be placed or dropped. - If verbosity is set to false, then no health reports will be generated when replicas cannot be - placed or dropped. - - :param enabled: The verbosity of service placement health reporting. - :type enabled: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_toggle_verbose_service_placement_health_reporting_request( - api_version=api_version, - enabled=enabled, - timeout=timeout, - template_url=self.toggle_verbose_service_placement_health_reporting.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - toggle_verbose_service_placement_health_reporting.metadata = {'url': "/$/ToggleVerboseServicePlacementHealthReporting"} # type: ignore - - - @distributed_trace_async - async def validate_cluster_upgrade( - self, - start_cluster_upgrade_description: "_models.StartClusterUpgradeDescription", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ValidateClusterUpgradeResult": - """Validate and assess the impact of a code or configuration version update of a Service Fabric - cluster. - - Validate the supplied upgrade parameters and assess the expected impact of a code or - configuration version upgrade of a Service Fabric cluster. The upgrade will not be initiated. - - :param start_cluster_upgrade_description: Describes the parameters for starting a cluster - upgrade. - :type start_cluster_upgrade_description: - ~azure.servicefabric.models.StartClusterUpgradeDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ValidateClusterUpgradeResult, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ValidateClusterUpgradeResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidateClusterUpgradeResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') - - request = build_validate_cluster_upgrade_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.validate_cluster_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ValidateClusterUpgradeResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - validate_cluster_upgrade.metadata = {'url': "/$/ValidateUpgrade"} # type: ignore - - - @distributed_trace_async - async def get_node_info_list( - self, - continuation_token_parameter: Optional[str] = None, - node_status_filter: Optional[Union[str, "_models.NodeStatusFilter"]] = "default", - max_results: Optional[int] = 0, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PagedNodeInfoList": - """Gets the list of nodes in the Service Fabric cluster. - - The response includes the name, status, ID, health, uptime, and other details about the nodes. - - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param node_status_filter: Allows filtering the nodes based on the NodeStatus. Only the nodes - that are matching the specified filter value will be returned. The filter value can be one of - the following. Default value is "default". - :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. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedNodeInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedNodeInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedNodeInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_node_info_list_request( - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - node_status_filter=node_status_filter, - max_results=max_results, - timeout=timeout, - template_url=self.get_node_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedNodeInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_node_info_list.metadata = {'url': "/Nodes"} # type: ignore - - - @distributed_trace_async - async def get_node_info( - self, - node_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> Optional["_models.NodeInfo"]: - """Gets the information about a specific node in the Service Fabric cluster. - - The response includes the name, status, ID, health, uptime, and other details about the node. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NodeInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.NodeInfo or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NodeInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_node_info_request( - node_name=node_name, - api_version=api_version, - timeout=timeout, - template_url=self.get_node_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NodeInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_node_info.metadata = {'url': "/Nodes/{nodeName}"} # type: ignore - - - @distributed_trace_async - async def get_node_health( - self, - node_name: str, - events_health_state_filter: Optional[int] = 0, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.NodeHealth": - """Gets the health of a Service Fabric node. - - Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection - of health events reported on the node based on the health state. If the node that you specify - by name does not exist in the health store, this returns an error. - - :param node_name: The name of the node. - :type node_name: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NodeHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.NodeHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_node_health_request( - node_name=node_name, - api_version=api_version, - events_health_state_filter=events_health_state_filter, - timeout=timeout, - template_url=self.get_node_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NodeHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_node_health.metadata = {'url': "/Nodes/{nodeName}/$/GetHealth"} # type: ignore - - - @distributed_trace_async - async def get_node_health_using_policy( - self, - node_name: str, - events_health_state_filter: Optional[int] = 0, - timeout: Optional[int] = 60, - cluster_health_policy: Optional["_models.ClusterHealthPolicy"] = None, - **kwargs: Any - ) -> "_models.NodeHealth": - """Gets the health of a Service Fabric node, by using the specified health policy. - - Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection - of health events reported on the node based on the health state. Use ClusterHealthPolicy in the - POST body to override the health policies used to evaluate the health. If the node that you - specify by name does not exist in the health store, this returns an error. - - :param node_name: The name of the node. - :type node_name: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param cluster_health_policy: Describes the health policies used to evaluate the health of a - cluster or node. If not present, the health evaluation uses the health policy from cluster - manifest or the default health policy. Default value is None. - :type cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NodeHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.NodeHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if cluster_health_policy is not None: - _json = self._serialize.body(cluster_health_policy, 'ClusterHealthPolicy') - else: - _json = None - - request = build_get_node_health_using_policy_request( - node_name=node_name, - api_version=api_version, - content_type=content_type, - json=_json, - events_health_state_filter=events_health_state_filter, - timeout=timeout, - template_url=self.get_node_health_using_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NodeHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_node_health_using_policy.metadata = {'url': "/Nodes/{nodeName}/$/GetHealth"} # type: ignore - - - @distributed_trace_async - async def report_node_health( # pylint: disable=inconsistent-return-statements - self, - node_name: str, - health_information: "_models.HealthInformation", - immediate: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Sends a health report on the Service Fabric node. - - Reports health state of the specified Service Fabric node. The report must contain the - information about the source of the health report and property on which it is reported. - The report is sent to a Service Fabric gateway node, which forwards to the health store. - The report may be accepted by the gateway, but rejected by the health store after extra - validation. - For example, the health store may reject the report because of an invalid parameter, like a - stale sequence number. - To see whether the report was applied in the health store, run GetNodeHealth and check that the - report appears in the HealthEvents section. - - :param node_name: The name of the node. - :type node_name: str - :param health_information: Describes the health information for the health report. This - information needs to be present in all of the health reports sent to the health manager. - :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be sent immediately. - A health report is sent to a Service Fabric gateway Application, which forwards to the health - store. - If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health - store, regardless of the fabric client settings that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as possible. - Depending on timing and other conditions, sending the report may still fail, for example if - the HTTP Gateway is closed or the message doesn't reach the Gateway. - If Immediate is set to false, the report is sent based on the health client settings from the - HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval - configuration. - This is the recommended setting because it allows the health client to optimize health - reporting messages to health store as well as health report processing. - By default, reports are not sent immediately. Default value is False. - :type immediate: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(health_information, 'HealthInformation') - - request = build_report_node_health_request( - node_name=node_name, - api_version=api_version, - content_type=content_type, - json=_json, - immediate=immediate, - timeout=timeout, - template_url=self.report_node_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - report_node_health.metadata = {'url': "/Nodes/{nodeName}/$/ReportHealth"} # type: ignore - - - @distributed_trace_async - async def get_node_load_info( - self, - node_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.NodeLoadInfo": - """Gets the load information of a Service Fabric node. - - Retrieves the load information of a Service Fabric node for all the metrics that have load or - capacity defined. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NodeLoadInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.NodeLoadInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeLoadInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_node_load_info_request( - node_name=node_name, - api_version=api_version, - timeout=timeout, - template_url=self.get_node_load_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NodeLoadInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_node_load_info.metadata = {'url': "/Nodes/{nodeName}/$/GetLoadInformation"} # type: ignore - - - @distributed_trace_async - async def disable_node( # pylint: disable=inconsistent-return-statements - self, - node_name: str, - timeout: Optional[int] = 60, - deactivation_intent: Optional[Union[str, "_models.DeactivationIntent"]] = None, - **kwargs: Any - ) -> None: - """Deactivate a Service Fabric cluster node with the specified deactivation intent. - - Deactivate a Service Fabric cluster node with the specified deactivation intent. Once the - deactivation is in progress, the deactivation intent can be increased, but not decreased (for - example, a node that is deactivated with the Pause intent can be deactivated further with - Restart, but not the other way around. Nodes may be reactivated using the Activate a node - operation any time after they are deactivated. If the deactivation is not complete, this will - cancel the deactivation. A node that goes down and comes back up while deactivated will still - need to be reactivated before services will be placed on that node. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param deactivation_intent: Describes the intent or reason for deactivating the node. The - possible values are following. Default value is None. - :type deactivation_intent: str or ~azure.servicefabric.models.DeactivationIntent - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _deactivation_intent_description = _models.DeactivationIntentDescription(deactivation_intent=deactivation_intent) - _json = self._serialize.body(_deactivation_intent_description, 'DeactivationIntentDescription') - - request = build_disable_node_request( - node_name=node_name, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.disable_node.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - disable_node.metadata = {'url': "/Nodes/{nodeName}/$/Deactivate"} # type: ignore - - - @distributed_trace_async - async def enable_node( # pylint: disable=inconsistent-return-statements - self, - node_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Activate a Service Fabric cluster node that is currently deactivated. - - Activates a Service Fabric cluster node that is currently deactivated. Once activated, the node - will again become a viable target for placing new replicas, and any deactivated replicas - remaining on the node will be reactivated. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_enable_node_request( - node_name=node_name, - api_version=api_version, - timeout=timeout, - template_url=self.enable_node.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - enable_node.metadata = {'url': "/Nodes/{nodeName}/$/Activate"} # type: ignore - - - @distributed_trace_async - async def remove_node_state( # pylint: disable=inconsistent-return-statements - self, - node_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Notifies Service Fabric that the persisted state on a node has been permanently removed or - lost. - - This implies that it is not possible to recover the persisted state of that node. This - generally happens if a hard disk has been wiped clean, or if a hard disk crashes. The node has - to be down for this operation to be successful. This operation lets Service Fabric know that - the replicas on that node no longer exist, and that Service Fabric should stop waiting for - those replicas to come back up. Do not run this cmdlet if the state on the node has not been - removed and the node can come back up with its state intact. Starting from Service Fabric 6.5, - in order to use this API for seed nodes, please change the seed nodes to regular (non-seed) - nodes and then invoke this API to remove the node state. If the cluster is running on Azure, - after the seed node goes down, Service Fabric will try to change it to a non-seed node - automatically. To make this happen, make sure the number of non-seed nodes in the primary node - type is no less than the number of Down seed nodes. If necessary, add more nodes to the primary - node type to achieve this. For standalone cluster, if the Down seed node is not expected to - come back up with its state intact, please remove the node from the cluster, see - https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-windows-server-add-remove-nodes. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_remove_node_state_request( - node_name=node_name, - api_version=api_version, - timeout=timeout, - template_url=self.remove_node_state.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - remove_node_state.metadata = {'url': "/Nodes/{nodeName}/$/RemoveNodeState"} # type: ignore - - - @distributed_trace_async - async def restart_node( # pylint: disable=inconsistent-return-statements - self, - node_name: str, - timeout: Optional[int] = 60, - node_instance_id: str = "0", - create_fabric_dump: Optional[Union[str, "_models.CreateFabricDump"]] = "False", - **kwargs: Any - ) -> None: - """Restarts a Service Fabric cluster node. - - Restarts a Service Fabric cluster node that is already started. - - :param node_name: The name of the node. - :type node_name: str - :param 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. Default value is 60. - :type timeout: long - :param node_instance_id: The instance ID of the target node. If instance ID is specified the - node is restarted only if it matches with the current instance of the node. A default value of - "0" would match any instance ID. The instance ID can be obtained using get node query. Default - value is "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. Default value is "False". - :type create_fabric_dump: str or ~azure.servicefabric.models.CreateFabricDump - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _restart_node_description = _models.RestartNodeDescription(node_instance_id=node_instance_id, create_fabric_dump=create_fabric_dump) - _json = self._serialize.body(_restart_node_description, 'RestartNodeDescription') - - request = build_restart_node_request( - node_name=node_name, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.restart_node.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - restart_node.metadata = {'url': "/Nodes/{nodeName}/$/Restart"} # type: ignore - - - @distributed_trace_async - async def remove_configuration_overrides( # pylint: disable=inconsistent-return-statements - self, - node_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Removes configuration overrides on the specified node. - - This api allows removing all existing configuration overrides on specified node. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_remove_configuration_overrides_request( - node_name=node_name, - api_version=api_version, - timeout=timeout, - template_url=self.remove_configuration_overrides.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - remove_configuration_overrides.metadata = {'url': "/Nodes/{nodeName}/$/RemoveConfigurationOverrides"} # type: ignore - - - @distributed_trace_async - async def get_configuration_overrides( - self, - node_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> List["_models.ConfigParameterOverride"]: - """Gets the list of configuration overrides on the specified node. - - This api allows getting all existing configuration overrides on the specified node. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ConfigParameterOverride, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ConfigParameterOverride] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ConfigParameterOverride"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_configuration_overrides_request( - node_name=node_name, - api_version=api_version, - timeout=timeout, - template_url=self.get_configuration_overrides.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ConfigParameterOverride]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_configuration_overrides.metadata = {'url': "/Nodes/{nodeName}/$/GetConfigurationOverrides"} # type: ignore - - - @distributed_trace_async - async def add_configuration_parameter_overrides( # pylint: disable=inconsistent-return-statements - self, - node_name: str, - config_parameter_override_list: List["_models.ConfigParameterOverride"], - force: Optional[bool] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Adds the list of configuration overrides on the specified node. - - This api allows adding all existing configuration overrides on the specified node. - - :param node_name: The name of the node. - :type node_name: str - :param config_parameter_override_list: Description for adding list of configuration overrides. - :type config_parameter_override_list: list[~azure.servicefabric.models.ConfigParameterOverride] - :param force: Force adding configuration overrides on specified nodes. Default value is None. - :type force: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(config_parameter_override_list, '[ConfigParameterOverride]') - - request = build_add_configuration_parameter_overrides_request( - node_name=node_name, - api_version=api_version, - content_type=content_type, - json=_json, - force=force, - timeout=timeout, - template_url=self.add_configuration_parameter_overrides.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - add_configuration_parameter_overrides.metadata = {'url': "/Nodes/{nodeName}/$/AddConfigurationParameterOverrides"} # type: ignore - - - @distributed_trace_async - async def remove_node_tags( # pylint: disable=inconsistent-return-statements - self, - node_name: str, - node_tags: List[str], - **kwargs: Any - ) -> None: - """Removes the list of tags from the specified node. - - This api allows removing set of tags from the specified node. - - :param node_name: The name of the node. - :type node_name: str - :param node_tags: Description for adding list of node tags. - :type node_tags: list[str] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(node_tags, '[str]') - - request = build_remove_node_tags_request( - node_name=node_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.remove_node_tags.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - remove_node_tags.metadata = {'url': "/Nodes/{nodeName}/$/RemoveNodeTags"} # type: ignore - - - @distributed_trace_async - async def add_node_tags( # pylint: disable=inconsistent-return-statements - self, - node_name: str, - node_tags: List[str], - **kwargs: Any - ) -> None: - """Adds the list of tags on the specified node. - - This api allows adding tags to the specified node. - - :param node_name: The name of the node. - :type node_name: str - :param node_tags: Description for adding list of node tags. - :type node_tags: list[str] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(node_tags, '[str]') - - request = build_add_node_tags_request( - node_name=node_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.add_node_tags.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - add_node_tags.metadata = {'url': "/Nodes/{nodeName}/$/AddNodeTags"} # type: ignore - - - @distributed_trace_async - async def get_application_type_info_list( - self, - application_type_definition_kind_filter: Optional[int] = 0, - exclude_application_parameters: Optional[bool] = False, - continuation_token_parameter: Optional[str] = None, - max_results: Optional[int] = 0, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PagedApplicationTypeInfoList": - """Gets the list of application types in the Service Fabric cluster. - - Returns the information about the application types that are provisioned or in the process of - being provisioned in the Service Fabric cluster. Each version of an application type is - returned as one application type. The response includes the name, version, status, and other - details about the application type. This is a paged query, meaning that if not all of the - application types fit in a page, one page of results is returned as well as a continuation - token, which can be used to get the next page. For example, if there are 10 application types - but a page only fits the first three application types, or if max results is set to 3, then - three is returned. To access the rest of the results, retrieve subsequent pages by using the - returned continuation token in the next query. An empty continuation token is returned if there - are no subsequent pages. - - :param application_type_definition_kind_filter: Used to filter on ApplicationTypeDefinitionKind - which is the mechanism used to define a Service Fabric application type. - - - * Default - Default value, which performs the same function as selecting "All". The value is - 0. - * All - Filter that matches input with any ApplicationTypeDefinitionKind value. The value is - 65535. - * ServiceFabricApplicationPackage - Filter that matches input with - ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. The value is 1. - * Compose - Filter that matches input with ApplicationTypeDefinitionKind value Compose. The - value is 2. Default value is 0. - :type application_type_definition_kind_filter: int - :param exclude_application_parameters: The flag that specifies whether application parameters - will be excluded from the result. Default value is False. - :type exclude_application_parameters: bool - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedApplicationTypeInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedApplicationTypeInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedApplicationTypeInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_type_info_list_request( - api_version=api_version, - application_type_definition_kind_filter=application_type_definition_kind_filter, - exclude_application_parameters=exclude_application_parameters, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.get_application_type_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedApplicationTypeInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_type_info_list.metadata = {'url': "/ApplicationTypes"} # type: ignore - - - @distributed_trace_async - async def get_application_type_info_list_by_name( - self, - application_type_name: str, - application_type_version: Optional[str] = None, - exclude_application_parameters: Optional[bool] = False, - continuation_token_parameter: Optional[str] = None, - max_results: Optional[int] = 0, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PagedApplicationTypeInfoList": - """Gets the list of application types in the Service Fabric cluster matching exactly the specified - name. - - Returns the information about the application types that are provisioned or in the process of - being provisioned in the Service Fabric cluster. These results are of application types whose - name match exactly the one specified as the parameter, and which comply with the given query - parameters. All versions of the application type matching the application type name are - returned, with each version returned as one application type. The response includes the name, - version, status, and other details about the application type. This is a paged query, meaning - that if not all of the application types fit in a page, one page of results is returned as well - as a continuation token, which can be used to get the next page. For example, if there are 10 - application types but a page only fits the first three application types, or if max results is - set to 3, then three is returned. To access the rest of the results, retrieve subsequent pages - by using the returned continuation token in the next query. An empty continuation token is - returned if there are no subsequent pages. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. Default value is None. - :type application_type_version: str - :param exclude_application_parameters: The flag that specifies whether application parameters - will be excluded from the result. Default value is False. - :type exclude_application_parameters: bool - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedApplicationTypeInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedApplicationTypeInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedApplicationTypeInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_type_info_list_by_name_request( - application_type_name=application_type_name, - api_version=api_version, - application_type_version=application_type_version, - exclude_application_parameters=exclude_application_parameters, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.get_application_type_info_list_by_name.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedApplicationTypeInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_type_info_list_by_name.metadata = {'url': "/ApplicationTypes/{applicationTypeName}"} # type: ignore - - - @distributed_trace_async - async def provision_application_type( # pylint: disable=inconsistent-return-statements - self, - provision_application_type_description_base_required_body_param: "_models.ProvisionApplicationTypeDescriptionBase", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Provisions or registers a Service Fabric application type with the cluster using the '.sfpkg' - package in the external store or using the application package in the image store. - - Provisions a Service Fabric application type with the cluster. The provision is required before - any new applications can be instantiated. - The provision operation can be performed either on the application package specified by the - relativePathInImageStore, or by using the URI of the external '.sfpkg'. - - :param provision_application_type_description_base_required_body_param: The base type of - provision application type description which supports either image store-based provision or - external store-based provision. - :type provision_application_type_description_base_required_body_param: - ~azure.servicefabric.models.ProvisionApplicationTypeDescriptionBase - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(provision_application_type_description_base_required_body_param, 'ProvisionApplicationTypeDescriptionBase') - - request = build_provision_application_type_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.provision_application_type.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - provision_application_type.metadata = {'url': "/ApplicationTypes/$/Provision"} # type: ignore - - - @distributed_trace_async - async def unprovision_application_type( # pylint: disable=inconsistent-return-statements - self, - application_type_name: str, - application_type_version: str, - timeout: Optional[int] = 60, - async_parameter: Optional[bool] = None, - **kwargs: Any - ) -> None: - """Removes or unregisters a Service Fabric application type from the cluster. - - This operation can only be performed if all application instances of the application type have - been deleted. Once the application type is unregistered, no new application instances can be - created for this particular application type. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type as defined in the - application manifest. - :type application_type_version: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param async_parameter: The flag indicating whether or not unprovision should occur - asynchronously. When set to true, the unprovision operation returns when the request is - accepted by the system, and the unprovision operation continues without any timeout limit. The - default value is false. However, we recommend setting it to true for large application packages - that were provisioned. - :type async_parameter: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _unprovision_application_type_description_info = _models.UnprovisionApplicationTypeDescriptionInfo(application_type_version=application_type_version, async_property=async_parameter) - _json = self._serialize.body(_unprovision_application_type_description_info, 'UnprovisionApplicationTypeDescriptionInfo') - - request = build_unprovision_application_type_request( - application_type_name=application_type_name, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.unprovision_application_type.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - unprovision_application_type.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/Unprovision"} # type: ignore - - - @distributed_trace_async - async def update_application_type_arm_metadata( # pylint: disable=inconsistent-return-statements - self, - application_type_name: str, - application_type_version: str, - timeout: Optional[int] = 60, - force: Optional[bool] = None, - arm_resource_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """Updates the Arm Metadata for a specific Application Type. - - Updates the Arm Metadata for a specific Application Type. Is able to be called immediately - after the provision app type API is called. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param force: Force parameter used to prevent accidental Arm metadata update. Default value is - None. - :type force: bool - :param arm_resource_id: A string containing the ArmResourceId. Default value is None. - :type arm_resource_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _application_type_arm_metadata_update_description = _models.ArmMetadata(arm_resource_id=arm_resource_id) - _json = self._serialize.body(_application_type_arm_metadata_update_description, 'ArmMetadata') - - request = build_update_application_type_arm_metadata_request( - application_type_name=application_type_name, - api_version=api_version, - content_type=content_type, - application_type_version=application_type_version, - json=_json, - timeout=timeout, - force=force, - template_url=self.update_application_type_arm_metadata.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - update_application_type_arm_metadata.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/UpdateArmMetadata"} # type: ignore - - - @distributed_trace_async - async def get_service_type_info_list( - self, - application_type_name: str, - application_type_version: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> List["_models.ServiceTypeInfo"]: - """Gets the list containing the information about service types that are supported by a - provisioned application type in a Service Fabric cluster. - - Gets the list containing the information about service types that are supported by a - provisioned application type in a Service Fabric cluster. The provided application type must - exist. Otherwise, a 404 status is returned. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ServiceTypeInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ServiceTypeInfo] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ServiceTypeInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_type_info_list_request( - application_type_name=application_type_name, - api_version=api_version, - application_type_version=application_type_version, - timeout=timeout, - template_url=self.get_service_type_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ServiceTypeInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_type_info_list.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes"} # type: ignore - - - @distributed_trace_async - async def get_service_type_info_by_name( - self, - application_type_name: str, - application_type_version: str, - service_type_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> Optional["_models.ServiceTypeInfo"]: - """Gets the information about a specific service type that is supported by a provisioned - application type in a Service Fabric cluster. - - Gets the information about a specific service type that is supported by a provisioned - application type in a Service Fabric cluster. The provided application type must exist. - Otherwise, a 404 status is returned. A 204 response is returned if the specified service type - is not found in the cluster. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param service_type_name: Specifies the name of a Service Fabric service type. - :type service_type_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceTypeInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceTypeInfo or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServiceTypeInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_type_info_by_name_request( - application_type_name=application_type_name, - service_type_name=service_type_name, - api_version=api_version, - application_type_version=application_type_version, - timeout=timeout, - template_url=self.get_service_type_info_by_name.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServiceTypeInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_type_info_by_name.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes/{serviceTypeName}"} # type: ignore - - - @distributed_trace_async - async def get_service_manifest( - self, - application_type_name: str, - application_type_version: str, - service_manifest_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ServiceTypeManifest": - """Gets the manifest describing a service type. - - Gets the manifest describing a service type. The response contains the service manifest XML as - a string. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param service_manifest_name: The name of a service manifest registered as part of an - application type in a Service Fabric cluster. - :type service_manifest_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceTypeManifest, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceTypeManifest - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceTypeManifest"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_manifest_request( - application_type_name=application_type_name, - api_version=api_version, - application_type_version=application_type_version, - service_manifest_name=service_manifest_name, - timeout=timeout, - template_url=self.get_service_manifest.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ServiceTypeManifest', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_manifest.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/GetServiceManifest"} # type: ignore - - - @distributed_trace_async - async def get_deployed_service_type_info_list( - self, - node_name: str, - application_id: str, - service_manifest_name: Optional[str] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> List["_models.DeployedServiceTypeInfo"]: - """Gets the list containing the information about service types from the applications deployed on - a node in a Service Fabric cluster. - - Gets the list containing the information about service types from the applications deployed on - a node in a Service Fabric cluster. The response includes the name of the service type, its - registration status, the code package that registered it and activation ID of the service - package. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_manifest_name: The name of the service manifest to filter the list of deployed - service type information. If specified, the response will only contain the information about - service types that are defined in this service manifest. Default value is None. - :type service_manifest_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of DeployedServiceTypeInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.DeployedServiceTypeInfo] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.DeployedServiceTypeInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_service_type_info_list_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - service_manifest_name=service_manifest_name, - timeout=timeout, - template_url=self.get_deployed_service_type_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[DeployedServiceTypeInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_type_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes"} # type: ignore - - - @distributed_trace_async - async def get_deployed_service_type_info_by_name( - self, - node_name: str, - application_id: str, - service_type_name: str, - service_manifest_name: Optional[str] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> Optional[List["_models.DeployedServiceTypeInfo"]]: - """Gets the information about a specified service type of the application deployed on a node in a - Service Fabric cluster. - - Gets the list containing the information about a specific service type from the applications - deployed on a node in a Service Fabric cluster. The response includes the name of the service - type, its registration status, the code package that registered it and activation ID of the - service package. Each entry represents one activation of a service type, differentiated by the - activation ID. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_type_name: Specifies the name of a Service Fabric service type. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest to filter the list of deployed - service type information. If specified, the response will only contain the information about - service types that are defined in this service manifest. Default value is None. - :type service_manifest_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of DeployedServiceTypeInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.DeployedServiceTypeInfo] or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[List["_models.DeployedServiceTypeInfo"]]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_service_type_info_by_name_request( - node_name=node_name, - application_id=application_id, - service_type_name=service_type_name, - api_version=api_version, - service_manifest_name=service_manifest_name, - timeout=timeout, - template_url=self.get_deployed_service_type_info_by_name.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[DeployedServiceTypeInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_type_info_by_name.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes/{serviceTypeName}"} # type: ignore - - - @distributed_trace_async - async def create_application( # pylint: disable=inconsistent-return-statements - self, - application_description: "_models.ApplicationDescription", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Creates a Service Fabric application. - - Creates a Service Fabric application using the specified description. - - :param application_description: Description for creating an application. - :type application_description: ~azure.servicefabric.models.ApplicationDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(application_description, 'ApplicationDescription') - - request = build_create_application_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.create_application.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - create_application.metadata = {'url': "/Applications/$/Create"} # type: ignore - - - @distributed_trace_async - async def delete_application( # pylint: disable=inconsistent-return-statements - self, - application_id: str, - force_remove: Optional[bool] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Deletes an existing Service Fabric application. - - An application must be created before it can be deleted. Deleting an application will delete - all services that are part of that application. By default, Service Fabric will try to close - service replicas in a graceful manner and then delete the service. However, if a service is - having issues closing the replica gracefully, the delete operation may take a long time or get - stuck. Use the optional ForceRemove flag to skip the graceful close sequence and forcefully - delete the application and all of its services. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param force_remove: Remove a Service Fabric application or service forcefully without going - through the graceful shutdown sequence. This parameter can be used to forcefully delete an - application or service for which delete is timing out due to issues in the service code that - prevents graceful close of replicas. Default value is None. - :type force_remove: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_application_request( - application_id=application_id, - api_version=api_version, - force_remove=force_remove, - timeout=timeout, - template_url=self.delete_application.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete_application.metadata = {'url': "/Applications/{applicationId}/$/Delete"} # type: ignore - - - @distributed_trace_async - async def get_application_load_info( - self, - application_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> Optional["_models.ApplicationLoadInfo"]: - """Gets load information about a Service Fabric application. - - Returns the load information about the application that was created or in the process of being - created in the Service Fabric cluster and whose name matches the one specified as the - parameter. The response includes the name, minimum nodes, maximum nodes, the number of nodes - the application is occupying currently, and application load metric information about the - application. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationLoadInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationLoadInfo or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationLoadInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_load_info_request( - application_id=application_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_application_load_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApplicationLoadInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_load_info.metadata = {'url': "/Applications/{applicationId}/$/GetLoadInformation"} # type: ignore - - - @distributed_trace_async - async def get_application_info_list( - self, - application_definition_kind_filter: Optional[int] = 0, - application_type_name: Optional[str] = None, - exclude_application_parameters: Optional[bool] = False, - continuation_token_parameter: Optional[str] = None, - max_results: Optional[int] = 0, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PagedApplicationInfoList": - """Gets the list of applications created in the Service Fabric cluster that match the specified - filters. - - Gets the information about the applications that were created or in the process of being - created in the Service Fabric cluster and match the specified filters. The response includes - the name, type, status, parameters, and other details about the application. If the - applications do not fit in a page, one page of results is returned as well as a continuation - token, which can be used to get the next page. Filters ApplicationTypeName and - ApplicationDefinitionKindFilter cannot be specified at the same time. - - :param application_definition_kind_filter: Used to filter on ApplicationDefinitionKind, which - is the mechanism used to define a Service Fabric application. - - - * Default - Default value, which performs the same function as selecting "All". The value is - 0. - * All - Filter that matches input with any ApplicationDefinitionKind value. The value is - 65535. - * ServiceFabricApplicationDescription - Filter that matches input with - ApplicationDefinitionKind value ServiceFabricApplicationDescription. The value is 1. - * Compose - Filter that matches input with ApplicationDefinitionKind value Compose. The value - is 2. Default value is 0. - :type application_definition_kind_filter: int - :param application_type_name: The application type name used to filter the applications to - query for. This value should not contain the application type version. Default value is None. - :type application_type_name: str - :param exclude_application_parameters: The flag that specifies whether application parameters - will be excluded from the result. Default value is False. - :type exclude_application_parameters: bool - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedApplicationInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedApplicationInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedApplicationInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_info_list_request( - api_version=api_version, - application_definition_kind_filter=application_definition_kind_filter, - application_type_name=application_type_name, - exclude_application_parameters=exclude_application_parameters, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.get_application_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedApplicationInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_info_list.metadata = {'url': "/Applications"} # type: ignore - - - @distributed_trace_async - async def get_application_info( - self, - application_id: str, - exclude_application_parameters: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> Optional["_models.ApplicationInfo"]: - """Gets information about a Service Fabric application. - - Returns the information about the application that was created or in the process of being - created in the Service Fabric cluster and whose name matches the one specified as the - parameter. The response includes the name, type, status, parameters, and other details about - the application. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param exclude_application_parameters: The flag that specifies whether application parameters - will be excluded from the result. Default value is False. - :type exclude_application_parameters: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationInfo or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_info_request( - application_id=application_id, - api_version=api_version, - exclude_application_parameters=exclude_application_parameters, - timeout=timeout, - template_url=self.get_application_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_info.metadata = {'url': "/Applications/{applicationId}"} # type: ignore - - - @distributed_trace_async - async def get_application_health( - self, - application_id: str, - events_health_state_filter: Optional[int] = 0, - deployed_applications_health_state_filter: Optional[int] = 0, - services_health_state_filter: Optional[int] = 0, - exclude_health_statistics: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ApplicationHealth": - """Gets the health of the service fabric application. - - Returns the heath state of the service fabric application. The response reports either Ok, - Error or Warning health state. If the entity is not found in the health store, it will return - Error. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param deployed_applications_health_state_filter: Allows filtering of the deployed applications - health state objects returned in the result of application health query based on their health - state. - The possible values for this parameter include integer value of one of the following health - states. Only deployed applications that match the filter will be returned. - All deployed applications are used to evaluate the aggregated health state. If not specified, - all entries are returned. - The state values are flag-based enumeration, so the value could be a combination of these - values, obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of deployed applications with - HealthState value of OK (2) and Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type deployed_applications_health_state_filter: int - :param services_health_state_filter: Allows filtering of the services health state objects - returned in the result of services health query based on their health state. - The possible values for this parameter include integer value of one of the following health - states. - Only services that match the filter are returned. All services are used to evaluate the - aggregated health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, - obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health - state of services with HealthState value of OK (2) and Warning (4) will be returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type services_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_health_request( - application_id=application_id, - api_version=api_version, - events_health_state_filter=events_health_state_filter, - deployed_applications_health_state_filter=deployed_applications_health_state_filter, - services_health_state_filter=services_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - timeout=timeout, - template_url=self.get_application_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_health.metadata = {'url': "/Applications/{applicationId}/$/GetHealth"} # type: ignore - - - @distributed_trace_async - async def get_application_health_using_policy( - self, - application_id: str, - events_health_state_filter: Optional[int] = 0, - deployed_applications_health_state_filter: Optional[int] = 0, - services_health_state_filter: Optional[int] = 0, - exclude_health_statistics: Optional[bool] = False, - timeout: Optional[int] = 60, - application_health_policy: Optional["_models.ApplicationHealthPolicy"] = None, - **kwargs: Any - ) -> "_models.ApplicationHealth": - """Gets the health of a Service Fabric application using the specified policy. - - Gets the health of a Service Fabric application. Use EventsHealthStateFilter to filter the - collection of health events reported on the node based on the health state. Use - ClusterHealthPolicies to override the health policies used to evaluate the health. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param deployed_applications_health_state_filter: Allows filtering of the deployed applications - health state objects returned in the result of application health query based on their health - state. - The possible values for this parameter include integer value of one of the following health - states. Only deployed applications that match the filter will be returned. - All deployed applications are used to evaluate the aggregated health state. If not specified, - all entries are returned. - The state values are flag-based enumeration, so the value could be a combination of these - values, obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of deployed applications with - HealthState value of OK (2) and Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type deployed_applications_health_state_filter: int - :param services_health_state_filter: Allows filtering of the services health state objects - returned in the result of services health query based on their health state. - The possible values for this parameter include integer value of one of the following health - states. - Only services that match the filter are returned. All services are used to evaluate the - aggregated health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, - obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health - state of services with HealthState value of OK (2) and Warning (4) will be returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type services_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param application_health_policy: Describes the health policies used to evaluate the health of - an application or one of its children. - If not present, the health evaluation uses the health policy from application manifest or the - default health policy. Default value is None. - :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if application_health_policy is not None: - _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - _json = None - - request = build_get_application_health_using_policy_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - events_health_state_filter=events_health_state_filter, - deployed_applications_health_state_filter=deployed_applications_health_state_filter, - services_health_state_filter=services_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - timeout=timeout, - template_url=self.get_application_health_using_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_health_using_policy.metadata = {'url': "/Applications/{applicationId}/$/GetHealth"} # type: ignore - - - @distributed_trace_async - async def report_application_health( # pylint: disable=inconsistent-return-statements - self, - application_id: str, - health_information: "_models.HealthInformation", - immediate: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Sends a health report on the Service Fabric application. - - Reports health state of the specified Service Fabric application. The report must contain the - information about the source of the health report and property on which it is reported. - The report is sent to a Service Fabric gateway Application, which forwards to the health store. - The report may be accepted by the gateway, but rejected by the health store after extra - validation. - For example, the health store may reject the report because of an invalid parameter, like a - stale sequence number. - To see whether the report was applied in the health store, get application health and check - that the report appears in the HealthEvents section. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param health_information: Describes the health information for the health report. This - information needs to be present in all of the health reports sent to the health manager. - :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be sent immediately. - A health report is sent to a Service Fabric gateway Application, which forwards to the health - store. - If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health - store, regardless of the fabric client settings that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as possible. - Depending on timing and other conditions, sending the report may still fail, for example if - the HTTP Gateway is closed or the message doesn't reach the Gateway. - If Immediate is set to false, the report is sent based on the health client settings from the - HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval - configuration. - This is the recommended setting because it allows the health client to optimize health - reporting messages to health store as well as health report processing. - By default, reports are not sent immediately. Default value is False. - :type immediate: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(health_information, 'HealthInformation') - - request = build_report_application_health_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - immediate=immediate, - timeout=timeout, - template_url=self.report_application_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - report_application_health.metadata = {'url': "/Applications/{applicationId}/$/ReportHealth"} # type: ignore - - - @distributed_trace_async - async def start_application_upgrade( # pylint: disable=inconsistent-return-statements - self, - application_id: str, - application_upgrade_description: "_models.ApplicationUpgradeDescription", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Starts upgrading an application in the Service Fabric cluster. - - Validates the supplied application upgrade parameters and starts upgrading the application if - the parameters are valid. - Note, `ApplicationParameter - `_\ - s are not preserved across an application upgrade. - In order to preserve current application parameters, the user should get the parameters using - `GetApplicationInfo <./GetApplicationInfo.md>`_ operation first and pass them into the upgrade - API call as shown in the example. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param application_upgrade_description: Parameters for an application upgrade. - :type application_upgrade_description: - ~azure.servicefabric.models.ApplicationUpgradeDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(application_upgrade_description, 'ApplicationUpgradeDescription') - - request = build_start_application_upgrade_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.start_application_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/Upgrade"} # type: ignore - - - @distributed_trace_async - async def get_application_upgrade( - self, - application_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ApplicationUpgradeProgressInfo": - """Gets details for the latest upgrade performed on this application. - - Returns information about the state of the latest application upgrade along with details to aid - debugging application health issues. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationUpgradeProgressInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationUpgradeProgressInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationUpgradeProgressInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_upgrade_request( - application_id=application_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_application_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationUpgradeProgressInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/GetUpgradeProgress"} # type: ignore - - - @distributed_trace_async - async def update_application_upgrade( # pylint: disable=inconsistent-return-statements - self, - application_id: str, - application_upgrade_update_description: "_models.ApplicationUpgradeUpdateDescription", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Updates an ongoing application upgrade in the Service Fabric cluster. - - Updates the parameters of an ongoing application upgrade from the ones specified at the time of - starting the application upgrade. This may be required to mitigate stuck application upgrades - due to incorrect parameters or issues in the application to make progress. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param application_upgrade_update_description: Parameters for updating an existing application - upgrade. - :type application_upgrade_update_description: - ~azure.servicefabric.models.ApplicationUpgradeUpdateDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(application_upgrade_update_description, 'ApplicationUpgradeUpdateDescription') - - request = build_update_application_upgrade_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.update_application_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - update_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/UpdateUpgrade"} # type: ignore - - - @distributed_trace_async - async def update_application( # pylint: disable=inconsistent-return-statements - self, - application_id: str, - application_update_description: "_models.ApplicationUpdateDescription", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Updates a Service Fabric application. - - Updates a Service Fabric application instance. The set of properties that can be updated are a - subset of the properties that were specified at the time of creating the application. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param application_update_description: Parameters for updating an existing application - instance. - :type application_update_description: ~azure.servicefabric.models.ApplicationUpdateDescription - :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. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(application_update_description, 'ApplicationUpdateDescription') - - request = build_update_application_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.update_application.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - update_application.metadata = {'url': "/Applications/{applicationId}/$/Update"} # type: ignore - - - @distributed_trace_async - async def resume_application_upgrade( # pylint: disable=inconsistent-return-statements - self, - application_id: str, - upgrade_domain_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Resumes upgrading an application in the Service Fabric cluster. - - Resumes an unmonitored manual Service Fabric application upgrade. Service Fabric upgrades one - upgrade domain at a time. For unmonitored manual upgrades, after Service Fabric finishes an - upgrade domain, it waits for you to call this API before proceeding to the next upgrade domain. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param upgrade_domain_name: The name of the upgrade domain in which to resume the upgrade. - :type upgrade_domain_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _resume_application_upgrade_description = _models.ResumeApplicationUpgradeDescription(upgrade_domain_name=upgrade_domain_name) - _json = self._serialize.body(_resume_application_upgrade_description, 'ResumeApplicationUpgradeDescription') - - request = build_resume_application_upgrade_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.resume_application_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - resume_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/MoveToNextUpgradeDomain"} # type: ignore - - - @distributed_trace_async - async def rollback_application_upgrade( # pylint: disable=inconsistent-return-statements - self, - application_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Starts rolling back the currently on-going upgrade of an application in the Service Fabric - cluster. - - Starts rolling back the current application upgrade to the previous version. This API can only - be used to roll back the current in-progress upgrade that is rolling forward to new version. If - the application is not currently being upgraded use StartApplicationUpgrade API to upgrade it - to desired version, including rolling back to a previous version. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_rollback_application_upgrade_request( - application_id=application_id, - api_version=api_version, - timeout=timeout, - template_url=self.rollback_application_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - rollback_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/RollbackUpgrade"} # type: ignore - - - @distributed_trace_async - async def get_deployed_application_info_list( - self, - node_name: str, - timeout: Optional[int] = 60, - include_health_state: Optional[bool] = False, - continuation_token_parameter: Optional[str] = None, - max_results: Optional[int] = 0, - **kwargs: Any - ) -> "_models.PagedDeployedApplicationInfoList": - """Gets the list of applications deployed on a Service Fabric node. - - Gets the list of applications deployed on a Service Fabric node. The results do not include - information about deployed system applications unless explicitly queried for by ID. Results - encompass deployed applications in active, activating, and downloading states. This query - requires that the node name corresponds to a node on the cluster. The query fails if the - provided node name does not point to any active Service Fabric nodes on the cluster. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param include_health_state: Include the health state of an entity. - If this parameter is false or not specified, then the health state returned is "Unknown". - When set to true, the query goes in parallel to the node and the health system service before - the results are merged. - As a result, the query is more expensive and may take a longer time. Default value is False. - :type include_health_state: bool - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedDeployedApplicationInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedDeployedApplicationInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedDeployedApplicationInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_application_info_list_request( - node_name=node_name, - api_version=api_version, - timeout=timeout, - include_health_state=include_health_state, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - template_url=self.get_deployed_application_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedDeployedApplicationInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_application_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications"} # type: ignore - - - @distributed_trace_async - async def get_deployed_application_info( - self, - node_name: str, - application_id: str, - timeout: Optional[int] = 60, - include_health_state: Optional[bool] = False, - **kwargs: Any - ) -> Optional["_models.DeployedApplicationInfo"]: - """Gets the information about an application deployed on a Service Fabric node. - - This query returns system application information if the application ID provided is for system - application. Results encompass deployed applications in active, activating, and downloading - states. This query requires that the node name corresponds to a node on the cluster. The query - fails if the provided node name does not point to any active Service Fabric nodes on the - cluster. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param include_health_state: Include the health state of an entity. - If this parameter is false or not specified, then the health state returned is "Unknown". - When set to true, the query goes in parallel to the node and the health system service before - the results are merged. - As a result, the query is more expensive and may take a longer time. Default value is False. - :type include_health_state: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeployedApplicationInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.DeployedApplicationInfo or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.DeployedApplicationInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_application_info_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - timeout=timeout, - include_health_state=include_health_state, - template_url=self.get_deployed_application_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeployedApplicationInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_application_info.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}"} # type: ignore - - - @distributed_trace_async - async def get_deployed_application_health( - self, - node_name: str, - application_id: str, - events_health_state_filter: Optional[int] = 0, - deployed_service_packages_health_state_filter: Optional[int] = 0, - exclude_health_statistics: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.DeployedApplicationHealth": - """Gets the information about health of an application deployed on a Service Fabric node. - - Gets the information about health of an application deployed on a Service Fabric node. Use - EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported - on the deployed application based on health state. Use DeployedServicePackagesHealthStateFilter - to optionally filter for DeployedServicePackageHealth children based on health state. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param deployed_service_packages_health_state_filter: Allows filtering of the deployed service - package health state objects returned in the result of deployed application health query based - on their health state. - The possible values for this parameter include integer value of one of the following health - states. - Only deployed service packages that match the filter are returned. All deployed service - packages are used to evaluate the aggregated health state of the deployed application. - If not specified, all entries are returned. - The state values are flag-based enumeration, so the value can be a combination of these - values, obtained using the bitwise 'OR' operator. - For example, if the provided value is 6 then health state of service packages with HealthState - value of OK (2) and Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type deployed_service_packages_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeployedApplicationHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.DeployedApplicationHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedApplicationHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_application_health_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - events_health_state_filter=events_health_state_filter, - deployed_service_packages_health_state_filter=deployed_service_packages_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - timeout=timeout, - template_url=self.get_deployed_application_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('DeployedApplicationHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_application_health.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth"} # type: ignore - - - @distributed_trace_async - async def get_deployed_application_health_using_policy( - self, - node_name: str, - application_id: str, - events_health_state_filter: Optional[int] = 0, - deployed_service_packages_health_state_filter: Optional[int] = 0, - exclude_health_statistics: Optional[bool] = False, - timeout: Optional[int] = 60, - application_health_policy: Optional["_models.ApplicationHealthPolicy"] = None, - **kwargs: Any - ) -> "_models.DeployedApplicationHealth": - """Gets the information about health of an application deployed on a Service Fabric node. using - the specified policy. - - Gets the information about health of an application deployed on a Service Fabric node using the - specified policy. Use EventsHealthStateFilter to optionally filter for the collection of - HealthEvent objects reported on the deployed application based on health state. Use - DeployedServicePackagesHealthStateFilter to optionally filter for DeployedServicePackageHealth - children based on health state. Use ApplicationHealthPolicy to optionally override the health - policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the - ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the - deployed application. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param deployed_service_packages_health_state_filter: Allows filtering of the deployed service - package health state objects returned in the result of deployed application health query based - on their health state. - The possible values for this parameter include integer value of one of the following health - states. - Only deployed service packages that match the filter are returned. All deployed service - packages are used to evaluate the aggregated health state of the deployed application. - If not specified, all entries are returned. - The state values are flag-based enumeration, so the value can be a combination of these - values, obtained using the bitwise 'OR' operator. - For example, if the provided value is 6 then health state of service packages with HealthState - value of OK (2) and Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type deployed_service_packages_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param application_health_policy: Describes the health policies used to evaluate the health of - an application or one of its children. - If not present, the health evaluation uses the health policy from application manifest or the - default health policy. Default value is None. - :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeployedApplicationHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.DeployedApplicationHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedApplicationHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if application_health_policy is not None: - _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - _json = None - - request = build_get_deployed_application_health_using_policy_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - events_health_state_filter=events_health_state_filter, - deployed_service_packages_health_state_filter=deployed_service_packages_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - timeout=timeout, - template_url=self.get_deployed_application_health_using_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('DeployedApplicationHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_application_health_using_policy.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth"} # type: ignore - - - @distributed_trace_async - async def report_deployed_application_health( # pylint: disable=inconsistent-return-statements - self, - node_name: str, - application_id: str, - health_information: "_models.HealthInformation", - immediate: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Sends a health report on the Service Fabric application deployed on a Service Fabric node. - - Reports health state of the application deployed on a Service Fabric node. The report must - contain the information about the source of the health report and property on which it is - reported. - The report is sent to a Service Fabric gateway Service, which forwards to the health store. - The report may be accepted by the gateway, but rejected by the health store after extra - validation. - For example, the health store may reject the report because of an invalid parameter, like a - stale sequence number. - To see whether the report was applied in the health store, get deployed application health and - check that the report appears in the HealthEvents section. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param health_information: Describes the health information for the health report. This - information needs to be present in all of the health reports sent to the health manager. - :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be sent immediately. - A health report is sent to a Service Fabric gateway Application, which forwards to the health - store. - If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health - store, regardless of the fabric client settings that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as possible. - Depending on timing and other conditions, sending the report may still fail, for example if - the HTTP Gateway is closed or the message doesn't reach the Gateway. - If Immediate is set to false, the report is sent based on the health client settings from the - HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval - configuration. - This is the recommended setting because it allows the health client to optimize health - reporting messages to health store as well as health report processing. - By default, reports are not sent immediately. Default value is False. - :type immediate: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(health_information, 'HealthInformation') - - request = build_report_deployed_application_health_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - immediate=immediate, - timeout=timeout, - template_url=self.report_deployed_application_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - report_deployed_application_health.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/ReportHealth"} # type: ignore - - - @distributed_trace_async - async def get_application_manifest( - self, - application_type_name: str, - application_type_version: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ApplicationTypeManifest": - """Gets the manifest describing an application type. - - The response contains the application manifest XML as a string. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationTypeManifest, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationTypeManifest - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationTypeManifest"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_manifest_request( - application_type_name=application_type_name, - api_version=api_version, - application_type_version=application_type_version, - timeout=timeout, - template_url=self.get_application_manifest.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationTypeManifest', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_manifest.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/GetApplicationManifest"} # type: ignore - - - @distributed_trace_async - async def update_application_arm_metadata( # pylint: disable=inconsistent-return-statements - self, - application_id: str, - timeout: Optional[int] = 60, - force: Optional[bool] = None, - arm_resource_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """Updates the Arm Metadata for a specific Application. - - Updates the Arm Metadata for a specific Application. Is able to be called immediately after the - create app API is called. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param force: Force parameter used to prevent accidental Arm metadata update. Default value is - None. - :type force: bool - :param arm_resource_id: A string containing the ArmResourceId. Default value is None. - :type arm_resource_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _application_arm_metadata_update_description = _models.ArmMetadata(arm_resource_id=arm_resource_id) - _json = self._serialize.body(_application_arm_metadata_update_description, 'ArmMetadata') - - request = build_update_application_arm_metadata_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - force=force, - template_url=self.update_application_arm_metadata.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - update_application_arm_metadata.metadata = {'url': "/Applications/{applicationId}/$/UpdateArmMetadata"} # type: ignore - - - @distributed_trace_async - async def get_service_info_list( - self, - application_id: str, - service_type_name: Optional[str] = None, - continuation_token_parameter: Optional[str] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PagedServiceInfoList": - """Gets the information about all services belonging to the application specified by the - application ID. - - Returns the information about all services belonging to the application specified by the - application ID. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_type_name: The service type name used to filter the services to query for. - Default value is None. - :type service_type_name: str - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedServiceInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedServiceInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedServiceInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_info_list_request( - application_id=application_id, - api_version=api_version, - service_type_name=service_type_name, - continuation_token_parameter=continuation_token_parameter, - timeout=timeout, - template_url=self.get_service_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedServiceInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_info_list.metadata = {'url': "/Applications/{applicationId}/$/GetServices"} # type: ignore - - - @distributed_trace_async - async def get_service_info( - self, - application_id: str, - service_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> Optional["_models.ServiceInfo"]: - """Gets the information about the specific service belonging to the Service Fabric application. - - Returns the information about the specified service belonging to the specified Service Fabric - application. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceInfo or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServiceInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_info_request( - application_id=application_id, - service_id=service_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_service_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServiceInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_info.metadata = {'url': "/Applications/{applicationId}/$/GetServices/{serviceId}"} # type: ignore - - - @distributed_trace_async - async def get_application_name_info( - self, - service_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ApplicationNameInfo": - """Gets the name of the Service Fabric application for a service. - - Gets the name of the application for the specified service. A 404 - FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the provided service ID - does not exist. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationNameInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationNameInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationNameInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_name_info_request( - service_id=service_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_application_name_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationNameInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_name_info.metadata = {'url': "/Services/{serviceId}/$/GetApplicationName"} # type: ignore - - - @distributed_trace_async - async def create_service( # pylint: disable=inconsistent-return-statements - self, - application_id: str, - service_description: "_models.ServiceDescription", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Creates the specified Service Fabric service. - - This api allows creating a new Service Fabric stateless or stateful service under a specified - Service Fabric application. The description for creating the service includes partitioning - information and optional properties for placement and load balancing. Some of the properties - can later be modified using ``UpdateService`` API. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_description: The information necessary to create a service. - :type service_description: ~azure.servicefabric.models.ServiceDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(service_description, 'ServiceDescription') - - request = build_create_service_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.create_service.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - create_service.metadata = {'url': "/Applications/{applicationId}/$/GetServices/$/Create"} # type: ignore - - - @distributed_trace_async - async def create_service_from_template( # pylint: disable=inconsistent-return-statements - self, - application_id: str, - service_from_template_description: "_models.ServiceFromTemplateDescription", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Creates a Service Fabric service from the service template. - - Creates a Service Fabric service from the service template defined in the application manifest. - A service template contains the properties that will be same for the service instance of the - same type. The API allows overriding the properties that are usually different for different - services of the same service type. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_from_template_description: Describes the service that needs to be created from - the template defined in the application manifest. - :type service_from_template_description: - ~azure.servicefabric.models.ServiceFromTemplateDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(service_from_template_description, 'ServiceFromTemplateDescription') - - request = build_create_service_from_template_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.create_service_from_template.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - create_service_from_template.metadata = {'url': "/Applications/{applicationId}/$/GetServices/$/CreateFromTemplate"} # type: ignore - - - @distributed_trace_async - async def delete_service( # pylint: disable=inconsistent-return-statements - self, - service_id: str, - force_remove: Optional[bool] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Deletes an existing Service Fabric service. - - A service must be created before it can be deleted. By default, Service Fabric will try to - close service replicas in a graceful manner and then delete the service. However, if the - service is having issues closing the replica gracefully, the delete operation may take a long - time or get stuck. Use the optional ForceRemove flag to skip the graceful close sequence and - forcefully delete the service. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param force_remove: Remove a Service Fabric application or service forcefully without going - through the graceful shutdown sequence. This parameter can be used to forcefully delete an - application or service for which delete is timing out due to issues in the service code that - prevents graceful close of replicas. Default value is None. - :type force_remove: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_service_request( - service_id=service_id, - api_version=api_version, - force_remove=force_remove, - timeout=timeout, - template_url=self.delete_service.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete_service.metadata = {'url': "/Services/{serviceId}/$/Delete"} # type: ignore - - - @distributed_trace_async - async def update_service( # pylint: disable=inconsistent-return-statements - self, - service_id: str, - service_update_description: "_models.ServiceUpdateDescription", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Updates a Service Fabric service using the specified update description. - - This API allows updating properties of a running Service Fabric service. The set of properties - that can be updated are a subset of the properties that were specified at the time of creating - the service. The current set of properties can be obtained using ``GetServiceDescription`` API. - Note that updating the properties of a running service is different than upgrading your - application using ``StartApplicationUpgrade`` API. The upgrade is a long running background - operation that involves moving the application from one version to another, one upgrade domain - at a time, whereas update applies the new properties immediately to the service. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param service_update_description: The information necessary to update a service. - :type service_update_description: ~azure.servicefabric.models.ServiceUpdateDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(service_update_description, 'ServiceUpdateDescription') - - request = build_update_service_request( - service_id=service_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.update_service.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - update_service.metadata = {'url': "/Services/{serviceId}/$/Update"} # type: ignore - - - @distributed_trace_async - async def get_service_description( - self, - service_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ServiceDescription": - """Gets the description of an existing Service Fabric service. - - Gets the description of an existing Service Fabric service. A service must be created before - its description can be obtained. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_description_request( - service_id=service_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_service_description.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ServiceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_description.metadata = {'url': "/Services/{serviceId}/$/GetDescription"} # type: ignore - - - @distributed_trace_async - async def get_service_health( - self, - service_id: str, - events_health_state_filter: Optional[int] = 0, - partitions_health_state_filter: Optional[int] = 0, - exclude_health_statistics: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ServiceHealth": - """Gets the health of the specified Service Fabric service. - - Gets the health information of the specified service. - Use EventsHealthStateFilter to filter the collection of health events reported on the service - based on the health state. - Use PartitionsHealthStateFilter to filter the collection of partitions returned. - If you specify a service that does not exist in the health store, this request returns an - error. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param partitions_health_state_filter: Allows filtering of the partitions health state objects - returned in the result of service health query based on their health state. - The possible values for this parameter include integer value of one of the following health - states. - Only partitions that match the filter are returned. All partitions are used to evaluate the - aggregated health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these value - obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health - state of partitions with HealthState value of OK (2) and Warning (4) will be returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type partitions_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_health_request( - service_id=service_id, - api_version=api_version, - events_health_state_filter=events_health_state_filter, - partitions_health_state_filter=partitions_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - timeout=timeout, - template_url=self.get_service_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ServiceHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_health.metadata = {'url': "/Services/{serviceId}/$/GetHealth"} # type: ignore - - - @distributed_trace_async - async def get_service_health_using_policy( - self, - service_id: str, - events_health_state_filter: Optional[int] = 0, - partitions_health_state_filter: Optional[int] = 0, - exclude_health_statistics: Optional[bool] = False, - timeout: Optional[int] = 60, - application_health_policy: Optional["_models.ApplicationHealthPolicy"] = None, - **kwargs: Any - ) -> "_models.ServiceHealth": - """Gets the health of the specified Service Fabric service, by using the specified health policy. - - Gets the health information of the specified service. - If the application health policy is specified, the health evaluation uses it to get the - aggregated health state. - If the policy is not specified, the health evaluation uses the application health policy - defined in the application manifest, or the default health policy, if no policy is defined in - the manifest. - Use EventsHealthStateFilter to filter the collection of health events reported on the service - based on the health state. - Use PartitionsHealthStateFilter to filter the collection of partitions returned. - If you specify a service that does not exist in the health store, this request returns an - error. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param partitions_health_state_filter: Allows filtering of the partitions health state objects - returned in the result of service health query based on their health state. - The possible values for this parameter include integer value of one of the following health - states. - Only partitions that match the filter are returned. All partitions are used to evaluate the - aggregated health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these value - obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health - state of partitions with HealthState value of OK (2) and Warning (4) will be returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type partitions_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param application_health_policy: Describes the health policies used to evaluate the health of - an application or one of its children. - If not present, the health evaluation uses the health policy from application manifest or the - default health policy. Default value is None. - :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if application_health_policy is not None: - _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - _json = None - - request = build_get_service_health_using_policy_request( - service_id=service_id, - api_version=api_version, - content_type=content_type, - json=_json, - events_health_state_filter=events_health_state_filter, - partitions_health_state_filter=partitions_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - timeout=timeout, - template_url=self.get_service_health_using_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ServiceHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_health_using_policy.metadata = {'url': "/Services/{serviceId}/$/GetHealth"} # type: ignore - - - @distributed_trace_async - async def report_service_health( # pylint: disable=inconsistent-return-statements - self, - service_id: str, - health_information: "_models.HealthInformation", - immediate: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Sends a health report on the Service Fabric service. - - Reports health state of the specified Service Fabric service. The report must contain the - information about the source of the health report and property on which it is reported. - The report is sent to a Service Fabric gateway Service, which forwards to the health store. - The report may be accepted by the gateway, but rejected by the health store after extra - validation. - For example, the health store may reject the report because of an invalid parameter, like a - stale sequence number. - To see whether the report was applied in the health store, run GetServiceHealth and check that - the report appears in the HealthEvents section. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param health_information: Describes the health information for the health report. This - information needs to be present in all of the health reports sent to the health manager. - :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be sent immediately. - A health report is sent to a Service Fabric gateway Application, which forwards to the health - store. - If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health - store, regardless of the fabric client settings that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as possible. - Depending on timing and other conditions, sending the report may still fail, for example if - the HTTP Gateway is closed or the message doesn't reach the Gateway. - If Immediate is set to false, the report is sent based on the health client settings from the - HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval - configuration. - This is the recommended setting because it allows the health client to optimize health - reporting messages to health store as well as health report processing. - By default, reports are not sent immediately. Default value is False. - :type immediate: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(health_information, 'HealthInformation') - - request = build_report_service_health_request( - service_id=service_id, - api_version=api_version, - content_type=content_type, - json=_json, - immediate=immediate, - timeout=timeout, - template_url=self.report_service_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - report_service_health.metadata = {'url': "/Services/{serviceId}/$/ReportHealth"} # type: ignore - - - @distributed_trace_async - async def resolve_service( - self, - service_id: str, - partition_key_type: Optional[int] = None, - partition_key_value: Optional[str] = None, - previous_rsp_version: Optional[str] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ResolvedServicePartition": - """Resolve a Service Fabric partition. - - Resolve a Service Fabric service partition to get the endpoints of the service replicas. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_key_type: Key type for the partition. This parameter is required if the - partition scheme for the service is Int64Range or Named. The possible values are following. - - - * None (1) - Indicates that the PartitionKeyValue parameter is not specified. This is valid - for the partitions with partitioning scheme as Singleton. This is the default value. The value - is 1. - * Int64Range (2) - Indicates that the PartitionKeyValue parameter is an int64 partition key. - This is valid for the partitions with partitioning scheme as Int64Range. The value is 2. - * Named (3) - Indicates that the PartitionKeyValue parameter is a name of the partition. This - is valid for the partitions with partitioning scheme as Named. The value is 3. Default value is - None. - :type partition_key_type: int - :param partition_key_value: Partition key. This is required if the partition scheme for the - service is Int64Range or Named. - This is not the partition ID, but rather, either the integer key value, or the name of the - partition ID. - For example, if your service is using ranged partitions from 0 to 10, then they - PartitionKeyValue would be an - integer in that range. Query service description to see the range or name. Default value is - None. - :type partition_key_value: str - :param previous_rsp_version: The value in the Version field of the response that was received - previously. This is required if the user knows that the result that was gotten previously is - stale. Default value is None. - :type previous_rsp_version: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ResolvedServicePartition, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ResolvedServicePartition - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ResolvedServicePartition"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_resolve_service_request( - service_id=service_id, - api_version=api_version, - partition_key_type=partition_key_type, - partition_key_value=partition_key_value, - previous_rsp_version=previous_rsp_version, - timeout=timeout, - template_url=self.resolve_service.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ResolvedServicePartition', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - resolve_service.metadata = {'url': "/Services/{serviceId}/$/ResolvePartition"} # type: ignore - - - @distributed_trace_async - async def get_unplaced_replica_information( - self, - service_id: str, - partition_id: Optional[str] = None, - only_query_primaries: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.UnplacedReplicaInformation": - """Gets the information about unplaced replica of the service. - - Returns the information about the unplaced replicas of the service. - If PartitionId is specified, then result will contain information only about unplaced replicas - for that partition. - If PartitionId is not specified, then result will contain information about unplaced replicas - for all partitions of that service. - If OnlyQueryPrimaries is set to true, then result will contain information only about primary - replicas, and will ignore unplaced secondary replicas. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. Default value is None. - :type partition_id: str - :param only_query_primaries: Indicates that unplaced replica information will be queries only - for primary replicas. Default value is False. - :type only_query_primaries: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: UnplacedReplicaInformation, or the result of cls(response) - :rtype: ~azure.servicefabric.models.UnplacedReplicaInformation - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.UnplacedReplicaInformation"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_unplaced_replica_information_request( - service_id=service_id, - api_version=api_version, - partition_id=partition_id, - only_query_primaries=only_query_primaries, - timeout=timeout, - template_url=self.get_unplaced_replica_information.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('UnplacedReplicaInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_unplaced_replica_information.metadata = {'url': "/Services/{serviceId}/$/GetUnplacedReplicaInformation"} # type: ignore - - - @distributed_trace_async - async def get_loaded_partition_info_list( - self, - metric_name: str, - service_name: Optional[str] = None, - ordering: Optional[Union[str, "_models.Ordering"]] = None, - max_results: Optional[int] = 0, - continuation_token_parameter: Optional[str] = None, - **kwargs: Any - ) -> "_models.LoadedPartitionInformationResultList": - """Gets ordered list of partitions. - - Retrieves partitions which are most/least loaded according to specified metric. - - :param metric_name: Name of the metric based on which to get ordered list of partitions. - :type metric_name: str - :param service_name: The name of a service. Default value is None. - :type service_name: str - :param ordering: Ordering of partitions' load. Default value is None. - :type ordering: str or ~azure.servicefabric.models.Ordering - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LoadedPartitionInformationResultList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.LoadedPartitionInformationResultList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadedPartitionInformationResultList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_loaded_partition_info_list_request( - api_version=api_version, - metric_name=metric_name, - service_name=service_name, - ordering=ordering, - max_results=max_results, - continuation_token_parameter=continuation_token_parameter, - template_url=self.get_loaded_partition_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('LoadedPartitionInformationResultList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_loaded_partition_info_list.metadata = {'url': "/$/GetLoadedPartitionInfoList"} # type: ignore - - - @distributed_trace_async - async def get_partition_info_list( - self, - service_id: str, - continuation_token_parameter: Optional[str] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PagedServicePartitionInfoList": - """Gets the list of partitions of a Service Fabric service. - - The response includes the partition ID, partitioning scheme information, keys supported by the - partition, status, health, and other details about the partition. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedServicePartitionInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedServicePartitionInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedServicePartitionInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_info_list_request( - service_id=service_id, - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - timeout=timeout, - template_url=self.get_partition_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedServicePartitionInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_info_list.metadata = {'url': "/Services/{serviceId}/$/GetPartitions"} # type: ignore - - - @distributed_trace_async - async def get_partition_info( - self, - partition_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> Optional["_models.ServicePartitionInfo"]: - """Gets the information about a Service Fabric partition. - - Gets the information about the specified partition. The response includes the partition ID, - partitioning scheme information, keys supported by the partition, status, health, and other - details about the partition. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServicePartitionInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServicePartitionInfo or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServicePartitionInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_info_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_partition_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServicePartitionInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_info.metadata = {'url': "/Partitions/{partitionId}"} # type: ignore - - - @distributed_trace_async - async def get_service_name_info( - self, - partition_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ServiceNameInfo": - """Gets the name of the Service Fabric service for a partition. - - Gets name of the service for the specified partition. A 404 error is returned if the partition - ID does not exist in the cluster. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceNameInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceNameInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceNameInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_name_info_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_service_name_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ServiceNameInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_name_info.metadata = {'url': "/Partitions/{partitionId}/$/GetServiceName"} # type: ignore - - - @distributed_trace_async - async def get_partition_health( - self, - partition_id: str, - events_health_state_filter: Optional[int] = 0, - replicas_health_state_filter: Optional[int] = 0, - exclude_health_statistics: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PartitionHealth": - """Gets the health of the specified Service Fabric partition. - - Use EventsHealthStateFilter to filter the collection of health events reported on the service - based on the health state. - Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the - partition. - If you specify a partition that does not exist in the health store, this request returns an - error. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param replicas_health_state_filter: Allows filtering the collection of ReplicaHealthState - objects on the partition. The value can be obtained from members or bitwise operations on - members of HealthStateFilter. Only replicas that match the filter will be returned. All - replicas will be used to evaluate the aggregated health state. If not specified, all entries - will be returned.The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. For example, If the provided - value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be - returned. The possible values for this parameter include integer value of one of the following - health states. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type replicas_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartitionHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PartitionHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_health_request( - partition_id=partition_id, - api_version=api_version, - events_health_state_filter=events_health_state_filter, - replicas_health_state_filter=replicas_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - timeout=timeout, - template_url=self.get_partition_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartitionHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_health.metadata = {'url': "/Partitions/{partitionId}/$/GetHealth"} # type: ignore - - - @distributed_trace_async - async def get_partition_health_using_policy( - self, - partition_id: str, - events_health_state_filter: Optional[int] = 0, - replicas_health_state_filter: Optional[int] = 0, - exclude_health_statistics: Optional[bool] = False, - timeout: Optional[int] = 60, - application_health_policy: Optional["_models.ApplicationHealthPolicy"] = None, - **kwargs: Any - ) -> "_models.PartitionHealth": - """Gets the health of the specified Service Fabric partition, by using the specified health - policy. - - Gets the health information of the specified partition. - If the application health policy is specified, the health evaluation uses it to get the - aggregated health state. - If the policy is not specified, the health evaluation uses the application health policy - defined in the application manifest, or the default health policy, if no policy is defined in - the manifest. - Use EventsHealthStateFilter to filter the collection of health events reported on the partition - based on the health state. - Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the - partition. Use ApplicationHealthPolicy in the POST body to override the health policies used to - evaluate the health. - If you specify a partition that does not exist in the health store, this request returns an - error. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param replicas_health_state_filter: Allows filtering the collection of ReplicaHealthState - objects on the partition. The value can be obtained from members or bitwise operations on - members of HealthStateFilter. Only replicas that match the filter will be returned. All - replicas will be used to evaluate the aggregated health state. If not specified, all entries - will be returned.The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. For example, If the provided - value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be - returned. The possible values for this parameter include integer value of one of the following - health states. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type replicas_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param application_health_policy: Describes the health policies used to evaluate the health of - an application or one of its children. - If not present, the health evaluation uses the health policy from application manifest or the - default health policy. Default value is None. - :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartitionHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PartitionHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if application_health_policy is not None: - _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - _json = None - - request = build_get_partition_health_using_policy_request( - partition_id=partition_id, - api_version=api_version, - content_type=content_type, - json=_json, - events_health_state_filter=events_health_state_filter, - replicas_health_state_filter=replicas_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - timeout=timeout, - template_url=self.get_partition_health_using_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartitionHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_health_using_policy.metadata = {'url': "/Partitions/{partitionId}/$/GetHealth"} # type: ignore - - - @distributed_trace_async - async def report_partition_health( # pylint: disable=inconsistent-return-statements - self, - partition_id: str, - health_information: "_models.HealthInformation", - immediate: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Sends a health report on the Service Fabric partition. - - Reports health state of the specified Service Fabric partition. The report must contain the - information about the source of the health report and property on which it is reported. - The report is sent to a Service Fabric gateway Partition, which forwards to the health store. - The report may be accepted by the gateway, but rejected by the health store after extra - validation. - For example, the health store may reject the report because of an invalid parameter, like a - stale sequence number. - To see whether the report was applied in the health store, run GetPartitionHealth and check - that the report appears in the HealthEvents section. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param health_information: Describes the health information for the health report. This - information needs to be present in all of the health reports sent to the health manager. - :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be sent immediately. - A health report is sent to a Service Fabric gateway Application, which forwards to the health - store. - If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health - store, regardless of the fabric client settings that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as possible. - Depending on timing and other conditions, sending the report may still fail, for example if - the HTTP Gateway is closed or the message doesn't reach the Gateway. - If Immediate is set to false, the report is sent based on the health client settings from the - HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval - configuration. - This is the recommended setting because it allows the health client to optimize health - reporting messages to health store as well as health report processing. - By default, reports are not sent immediately. Default value is False. - :type immediate: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(health_information, 'HealthInformation') - - request = build_report_partition_health_request( - partition_id=partition_id, - api_version=api_version, - content_type=content_type, - json=_json, - immediate=immediate, - timeout=timeout, - template_url=self.report_partition_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - report_partition_health.metadata = {'url': "/Partitions/{partitionId}/$/ReportHealth"} # type: ignore - - - @distributed_trace_async - async def get_partition_load_information( - self, - partition_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PartitionLoadInformation": - """Gets the load information of the specified Service Fabric partition. - - Returns information about the load of a specified partition. - The response includes a list of load reports for a Service Fabric partition. - Each report includes the load metric name, value, and last reported time in UTC. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartitionLoadInformation, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PartitionLoadInformation - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionLoadInformation"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_load_information_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_partition_load_information.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartitionLoadInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_load_information.metadata = {'url': "/Partitions/{partitionId}/$/GetLoadInformation"} # type: ignore - - - @distributed_trace_async - async def reset_partition_load( # pylint: disable=inconsistent-return-statements - self, - partition_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Resets the current load of a Service Fabric partition. - - Resets the current load of a Service Fabric partition to the default load for the service. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_reset_partition_load_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.reset_partition_load.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - reset_partition_load.metadata = {'url': "/Partitions/{partitionId}/$/ResetLoad"} # type: ignore - - - @distributed_trace_async - async def recover_partition( # pylint: disable=inconsistent-return-statements - self, - partition_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Indicates to the Service Fabric cluster that it should attempt to recover a specific partition - that is currently stuck in quorum loss. - - This operation should only be performed if it is known that the replicas that are down cannot - be recovered. Incorrect use of this API can cause potential data loss. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_recover_partition_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.recover_partition.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - recover_partition.metadata = {'url': "/Partitions/{partitionId}/$/Recover"} # type: ignore - - - @distributed_trace_async - async def recover_service_partitions( # pylint: disable=inconsistent-return-statements - self, - service_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Indicates to the Service Fabric cluster that it should attempt to recover the specified service - that is currently stuck in quorum loss. - - Indicates to the Service Fabric cluster that it should attempt to recover the specified service - that is currently stuck in quorum loss. This operation should only be performed if it is known - that the replicas that are down cannot be recovered. Incorrect use of this API can cause - potential data loss. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_recover_service_partitions_request( - service_id=service_id, - api_version=api_version, - timeout=timeout, - template_url=self.recover_service_partitions.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - recover_service_partitions.metadata = {'url': "/Services/$/{serviceId}/$/GetPartitions/$/Recover"} # type: ignore - - - @distributed_trace_async - async def recover_system_partitions( # pylint: disable=inconsistent-return-statements - self, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Indicates to the Service Fabric cluster that it should attempt to recover the system services - that are currently stuck in quorum loss. - - Indicates to the Service Fabric cluster that it should attempt to recover the system services - that are currently stuck in quorum loss. This operation should only be performed if it is known - that the replicas that are down cannot be recovered. Incorrect use of this API can cause - potential data loss. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_recover_system_partitions_request( - api_version=api_version, - timeout=timeout, - template_url=self.recover_system_partitions.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - recover_system_partitions.metadata = {'url': "/$/RecoverSystemPartitions"} # type: ignore - - - @distributed_trace_async - async def recover_all_partitions( # pylint: disable=inconsistent-return-statements - self, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Indicates to the Service Fabric cluster that it should attempt to recover any services - (including system services) which are currently stuck in quorum loss. - - This operation should only be performed if it is known that the replicas that are down cannot - be recovered. Incorrect use of this API can cause potential data loss. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_recover_all_partitions_request( - api_version=api_version, - timeout=timeout, - template_url=self.recover_all_partitions.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - recover_all_partitions.metadata = {'url': "/$/RecoverAllPartitions"} # type: ignore - - - @distributed_trace_async - async def move_primary_replica( # pylint: disable=inconsistent-return-statements - self, - partition_id: str, - node_name: Optional[str] = None, - ignore_constraints: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Moves the primary replica of a partition of a stateful service. - - This command moves the primary replica of a partition of a stateful service, respecting all - constraints. - If NodeName parameter is specified, primary will be moved to the specified node (if constraints - allow it). - If NodeName parameter is not specified, primary replica will be moved to a random node in the - cluster. - If IgnoreConstraints parameter is specified and set to true, then primary will be moved - regardless of the constraints. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param node_name: The name of the node. Default value is None. - :type node_name: str - :param ignore_constraints: Ignore constraints when moving a replica or instance. If this - parameter is not specified, all constraints are honored. Default value is False. - :type ignore_constraints: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_move_primary_replica_request( - partition_id=partition_id, - api_version=api_version, - node_name=node_name, - ignore_constraints=ignore_constraints, - timeout=timeout, - template_url=self.move_primary_replica.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - move_primary_replica.metadata = {'url': "/Partitions/{partitionId}/$/MovePrimaryReplica"} # type: ignore - - - @distributed_trace_async - async def move_secondary_replica( # pylint: disable=inconsistent-return-statements - self, - partition_id: str, - current_node_name: str, - new_node_name: Optional[str] = None, - ignore_constraints: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Moves the secondary replica of a partition of a stateful service. - - This command moves the secondary replica of a partition of a stateful service, respecting all - constraints. - CurrentNodeName parameter must be specified to identify the replica that is moved. - Source node name must be specified, but new node name can be omitted, and in that case replica - is moved to a random node. - If IgnoreConstraints parameter is specified and set to true, then secondary will be moved - regardless of the constraints. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param current_node_name: The name of the source node for secondary replica move. - :type current_node_name: str - :param new_node_name: The name of the target node for secondary replica or instance move. If - not specified, replica or instance is moved to a random node. Default value is None. - :type new_node_name: str - :param ignore_constraints: Ignore constraints when moving a replica or instance. If this - parameter is not specified, all constraints are honored. Default value is False. - :type ignore_constraints: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_move_secondary_replica_request( - partition_id=partition_id, - api_version=api_version, - current_node_name=current_node_name, - new_node_name=new_node_name, - ignore_constraints=ignore_constraints, - timeout=timeout, - template_url=self.move_secondary_replica.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - move_secondary_replica.metadata = {'url': "/Partitions/{partitionId}/$/MoveSecondaryReplica"} # type: ignore - - - @distributed_trace_async - async def update_partition_load( - self, - partition_metric_load_description_list: List["_models.PartitionMetricLoadDescription"], - continuation_token_parameter: Optional[str] = None, - max_results: Optional[int] = 0, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PagedUpdatePartitionLoadResultList": - """Update the loads of provided partitions for specific metrics. - - Updates the load value and predicted load value for all the partitions provided for specified - metrics. - - :param partition_metric_load_description_list: Description of updating load for list of - partitions. - :type partition_metric_load_description_list: - list[~azure.servicefabric.models.PartitionMetricLoadDescription] - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedUpdatePartitionLoadResultList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedUpdatePartitionLoadResultList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedUpdatePartitionLoadResultList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(partition_metric_load_description_list, '[PartitionMetricLoadDescription]') - - request = build_update_partition_load_request( - api_version=api_version, - content_type=content_type, - json=_json, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.update_partition_load.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedUpdatePartitionLoadResultList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - update_partition_load.metadata = {'url': "/$/UpdatePartitionLoad"} # type: ignore - - - @distributed_trace_async - async def move_instance( # pylint: disable=inconsistent-return-statements - self, - service_id: str, - partition_id: str, - current_node_name: Optional[str] = None, - new_node_name: Optional[str] = None, - ignore_constraints: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Moves the instance of a partition of a stateless service. - - This command moves the instance of a partition of a stateless service, respecting all - constraints. - Partition id and service name must be specified to be able to move the instance. - CurrentNodeName when specified identifies the instance that is moved. If not specified, random - instance will be moved - New node name can be omitted, and in that case instance is moved to a random node. - If IgnoreConstraints parameter is specified and set to true, then instance will be moved - regardless of the constraints. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param current_node_name: The name of the source node for instance move. If not specified, - instance is moved from a random node. Default value is None. - :type current_node_name: str - :param new_node_name: The name of the target node for secondary replica or instance move. If - not specified, replica or instance is moved to a random node. Default value is None. - :type new_node_name: str - :param ignore_constraints: Ignore constraints when moving a replica or instance. If this - parameter is not specified, all constraints are honored. Default value is False. - :type ignore_constraints: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_move_instance_request( - service_id=service_id, - partition_id=partition_id, - api_version=api_version, - current_node_name=current_node_name, - new_node_name=new_node_name, - ignore_constraints=ignore_constraints, - timeout=timeout, - template_url=self.move_instance.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - move_instance.metadata = {'url': "/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveInstance"} # type: ignore - - - @distributed_trace_async - async def move_auxiliary_replica( # pylint: disable=inconsistent-return-statements - self, - service_id: str, - partition_id: str, - current_node_name: Optional[str] = None, - new_node_name: Optional[str] = None, - ignore_constraints: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Moves the auxiliary replica of a partition of a stateful service. - - This command moves the auxiliary replica of a partition of a stateful service, respecting all - constraints. - CurrentNodeName can be omitted, and in that case a random auxiliary replica is chosen. - NewNodeName can be omitted, and in that case the auxiliary replica is moved to a random node. - If IgnoreConstraints parameter is specified and set to true, then auxiliary will be moved - regardless of the constraints. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param current_node_name: The name of the source node for instance move. If not specified, - instance is moved from a random node. Default value is None. - :type current_node_name: str - :param new_node_name: The name of the target node for secondary replica or instance move. If - not specified, replica or instance is moved to a random node. Default value is None. - :type new_node_name: str - :param ignore_constraints: Ignore constraints when moving a replica or instance. If this - parameter is not specified, all constraints are honored. Default value is False. - :type ignore_constraints: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_move_auxiliary_replica_request( - service_id=service_id, - partition_id=partition_id, - api_version=api_version, - current_node_name=current_node_name, - new_node_name=new_node_name, - ignore_constraints=ignore_constraints, - timeout=timeout, - template_url=self.move_auxiliary_replica.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - move_auxiliary_replica.metadata = {'url': "/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveAuxiliaryReplica"} # type: ignore - - - @distributed_trace_async - async def create_repair_task( - self, - repair_task: "_models.RepairTask", - **kwargs: Any - ) -> "_models.RepairTaskUpdateInfo": - """Creates a new repair task. - - For clusters that have the Repair Manager Service configured, - this API provides a way to create repair tasks that run automatically or manually. - For repair tasks that run automatically, an appropriate repair executor - must be running for each repair action to run automatically. - These are currently only available in specially-configured Azure Cloud Services. - - To create a manual repair task, provide the set of impacted node names and the - expected impact. When the state of the created repair task changes to approved, - you can safely perform repair actions on those nodes. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param repair_task: Describes the repair task to be created or updated. - :type repair_task: ~azure.servicefabric.models.RepairTask - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepairTaskUpdateInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(repair_task, 'RepairTask') - - request = build_create_repair_task_request( - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_repair_task.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_repair_task.metadata = {'url': "/$/CreateRepairTask"} # type: ignore - - - @distributed_trace_async - async def cancel_repair_task( - self, - repair_task_cancel_description: "_models.RepairTaskCancelDescription", - **kwargs: Any - ) -> "_models.RepairTaskUpdateInfo": - """Requests the cancellation of the given repair task. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param repair_task_cancel_description: Describes the repair task to be cancelled. - :type repair_task_cancel_description: ~azure.servicefabric.models.RepairTaskCancelDescription - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepairTaskUpdateInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(repair_task_cancel_description, 'RepairTaskCancelDescription') - - request = build_cancel_repair_task_request( - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.cancel_repair_task.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - cancel_repair_task.metadata = {'url': "/$/CancelRepairTask"} # type: ignore - - - @distributed_trace_async - async def delete_repair_task( # pylint: disable=inconsistent-return-statements - self, - task_id: str, - version: Optional[str] = None, - **kwargs: Any - ) -> None: - """Deletes a completed repair task. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param task_id: The ID of the completed repair task to be deleted. - :type task_id: str - :param version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current version of the repair task. If zero, - then no version check is performed. Default value is None. - :type version: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _repair_task_delete_description = _models.RepairTaskDeleteDescription(task_id=task_id, version=version) - _json = self._serialize.body(_repair_task_delete_description, 'RepairTaskDeleteDescription') - - request = build_delete_repair_task_request( - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.delete_repair_task.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete_repair_task.metadata = {'url': "/$/DeleteRepairTask"} # type: ignore - - - @distributed_trace_async - async def get_repair_task_list( - self, - task_id_filter: Optional[str] = None, - state_filter: Optional[int] = None, - executor_filter: Optional[str] = None, - **kwargs: Any - ) -> List["_models.RepairTask"]: - """Gets a list of repair tasks matching the given filters. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param task_id_filter: The repair task ID prefix to be matched. Default value is None. - :type task_id_filter: str - :param state_filter: A bitwise-OR of the following values, specifying which task states should - be included in the result list. - - - * 1 - Created - * 2 - Claimed - * 4 - Preparing - * 8 - Approved - * 16 - Executing - * 32 - Restoring - * 64 - Completed. Default value is None. - :type state_filter: int - :param executor_filter: The name of the repair executor whose claimed tasks should be included - in the list. Default value is None. - :type executor_filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of RepairTask, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.RepairTask] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.RepairTask"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_repair_task_list_request( - api_version=api_version, - task_id_filter=task_id_filter, - state_filter=state_filter, - executor_filter=executor_filter, - template_url=self.get_repair_task_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[RepairTask]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_repair_task_list.metadata = {'url': "/$/GetRepairTaskList"} # type: ignore - - - @distributed_trace_async - async def force_approve_repair_task( - self, - task_id: str, - version: Optional[str] = None, - **kwargs: Any - ) -> "_models.RepairTaskUpdateInfo": - """Forces the approval of the given repair task. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param task_id: The ID of the repair task. - :type task_id: str - :param version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current version of the repair task. If zero, - then no version check is performed. Default value is None. - :type version: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepairTaskUpdateInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _repair_task_approve_description = _models.RepairTaskApproveDescription(task_id=task_id, version=version) - _json = self._serialize.body(_repair_task_approve_description, 'RepairTaskApproveDescription') - - request = build_force_approve_repair_task_request( - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.force_approve_repair_task.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - force_approve_repair_task.metadata = {'url': "/$/ForceApproveRepairTask"} # type: ignore - - - @distributed_trace_async - async def update_repair_task_health_policy( - self, - repair_task_update_health_policy_description: "_models.RepairTaskUpdateHealthPolicyDescription", - **kwargs: Any - ) -> "_models.RepairTaskUpdateInfo": - """Updates the health policy of the given repair task. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param repair_task_update_health_policy_description: Describes the repair task healthy policy - to be updated. - :type repair_task_update_health_policy_description: - ~azure.servicefabric.models.RepairTaskUpdateHealthPolicyDescription - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepairTaskUpdateInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(repair_task_update_health_policy_description, 'RepairTaskUpdateHealthPolicyDescription') - - request = build_update_repair_task_health_policy_request( - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.update_repair_task_health_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - update_repair_task_health_policy.metadata = {'url': "/$/UpdateRepairTaskHealthPolicy"} # type: ignore - - - @distributed_trace_async - async def update_repair_execution_state( - self, - repair_task: "_models.RepairTask", - **kwargs: Any - ) -> "_models.RepairTaskUpdateInfo": - """Updates the execution state of a repair task. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param repair_task: Describes the repair task to be created or updated. - :type repair_task: ~azure.servicefabric.models.RepairTask - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepairTaskUpdateInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(repair_task, 'RepairTask') - - request = build_update_repair_execution_state_request( - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.update_repair_execution_state.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - update_repair_execution_state.metadata = {'url': "/$/UpdateRepairExecutionState"} # type: ignore - - - @distributed_trace_async - async def get_replica_info_list( - self, - partition_id: str, - continuation_token_parameter: Optional[str] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PagedReplicaInfoList": - """Gets the information about replicas of a Service Fabric service partition. - - The GetReplicas endpoint returns information about the replicas of the specified partition. The - response includes the ID, role, status, health, node name, uptime, and other details about the - replica. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedReplicaInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedReplicaInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedReplicaInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_replica_info_list_request( - partition_id=partition_id, - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - timeout=timeout, - template_url=self.get_replica_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedReplicaInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_replica_info_list.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas"} # type: ignore - - - @distributed_trace_async - async def get_replica_info( - self, - partition_id: str, - replica_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> Optional["_models.ReplicaInfo"]: - """Gets the information about a replica of a Service Fabric partition. - - The response includes the ID, role, status, health, node name, uptime, and other details about - the replica. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ReplicaInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ReplicaInfo or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ReplicaInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_replica_info_request( - partition_id=partition_id, - replica_id=replica_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_replica_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ReplicaInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_replica_info.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas/{replicaId}"} # type: ignore - - - @distributed_trace_async - async def get_replica_health( - self, - partition_id: str, - replica_id: str, - events_health_state_filter: Optional[int] = 0, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ReplicaHealth": - """Gets the health of a Service Fabric stateful service replica or stateless service instance. - - Gets the health of a Service Fabric replica. - Use EventsHealthStateFilter to filter the collection of health events reported on the replica - based on the health state. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ReplicaHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ReplicaHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicaHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_replica_health_request( - partition_id=partition_id, - replica_id=replica_id, - api_version=api_version, - events_health_state_filter=events_health_state_filter, - timeout=timeout, - template_url=self.get_replica_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ReplicaHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_replica_health.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth"} # type: ignore - - - @distributed_trace_async - async def get_replica_health_using_policy( - self, - partition_id: str, - replica_id: str, - events_health_state_filter: Optional[int] = 0, - timeout: Optional[int] = 60, - application_health_policy: Optional["_models.ApplicationHealthPolicy"] = None, - **kwargs: Any - ) -> "_models.ReplicaHealth": - """Gets the health of a Service Fabric stateful service replica or stateless service instance - using the specified policy. - - Gets the health of a Service Fabric stateful service replica or stateless service instance. - Use EventsHealthStateFilter to filter the collection of health events reported on the cluster - based on the health state. - Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the - health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The - rest of the fields are ignored while evaluating the health of the replica. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param application_health_policy: Describes the health policies used to evaluate the health of - an application or one of its children. - If not present, the health evaluation uses the health policy from application manifest or the - default health policy. Default value is None. - :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ReplicaHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ReplicaHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicaHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if application_health_policy is not None: - _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - _json = None - - request = build_get_replica_health_using_policy_request( - partition_id=partition_id, - replica_id=replica_id, - api_version=api_version, - content_type=content_type, - json=_json, - events_health_state_filter=events_health_state_filter, - timeout=timeout, - template_url=self.get_replica_health_using_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ReplicaHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_replica_health_using_policy.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth"} # type: ignore - - - @distributed_trace_async - async def report_replica_health( # pylint: disable=inconsistent-return-statements - self, - partition_id: str, - replica_id: str, - health_information: "_models.HealthInformation", - service_kind: Union[str, "_models.ReplicaHealthReportServiceKind"] = "Stateful", - immediate: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Sends a health report on the Service Fabric replica. - - Reports health state of the specified Service Fabric replica. The report must contain the - information about the source of the health report and property on which it is reported. - The report is sent to a Service Fabric gateway Replica, which forwards to the health store. - The report may be accepted by the gateway, but rejected by the health store after extra - validation. - For example, the health store may reject the report because of an invalid parameter, like a - stale sequence number. - To see whether the report was applied in the health store, run GetReplicaHealth and check that - the report appears in the HealthEvents section. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param health_information: Describes the health information for the health report. This - information needs to be present in all of the health reports sent to the health manager. - :type health_information: ~azure.servicefabric.models.HealthInformation - :param service_kind: The kind of service replica (Stateless or Stateful) for which the health - is being reported. Following are the possible values. Default value is "Stateful". - :type service_kind: str or ~azure.servicefabric.models.ReplicaHealthReportServiceKind - :param immediate: A flag that indicates whether the report should be sent immediately. - A health report is sent to a Service Fabric gateway Application, which forwards to the health - store. - If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health - store, regardless of the fabric client settings that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as possible. - Depending on timing and other conditions, sending the report may still fail, for example if - the HTTP Gateway is closed or the message doesn't reach the Gateway. - If Immediate is set to false, the report is sent based on the health client settings from the - HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval - configuration. - This is the recommended setting because it allows the health client to optimize health - reporting messages to health store as well as health report processing. - By default, reports are not sent immediately. Default value is False. - :type immediate: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(health_information, 'HealthInformation') - - request = build_report_replica_health_request( - partition_id=partition_id, - replica_id=replica_id, - api_version=api_version, - content_type=content_type, - json=_json, - service_kind=service_kind, - immediate=immediate, - timeout=timeout, - template_url=self.report_replica_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - report_replica_health.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/ReportHealth"} # type: ignore - - - @distributed_trace_async - async def get_deployed_service_replica_info_list( - self, - node_name: str, - application_id: str, - partition_id: Optional[str] = None, - service_manifest_name: Optional[str] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> Optional[List["_models.DeployedServiceReplicaInfo"]]: - """Gets the list of replicas deployed on a Service Fabric node. - - Gets the list containing the information about replicas deployed on a Service Fabric node. The - information include partition ID, replica ID, status of the replica, name of the service, name - of the service type, and other information. Use PartitionId or ServiceManifestName query - parameters to return information about the deployed replicas matching the specified values for - those parameters. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param partition_id: The identity of the partition. Default value is None. - :type partition_id: str - :param service_manifest_name: The name of a service manifest registered as part of an - application type in a Service Fabric cluster. Default value is None. - :type service_manifest_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of DeployedServiceReplicaInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.DeployedServiceReplicaInfo] or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[List["_models.DeployedServiceReplicaInfo"]]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_service_replica_info_list_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - partition_id=partition_id, - service_manifest_name=service_manifest_name, - timeout=timeout, - template_url=self.get_deployed_service_replica_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[DeployedServiceReplicaInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_replica_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetReplicas"} # type: ignore - - - @distributed_trace_async - async def get_deployed_service_replica_detail_info( - self, - node_name: str, - partition_id: str, - replica_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.DeployedServiceReplicaDetailInfo": - """Gets the details of replica deployed on a Service Fabric node. - - Gets the details of the replica deployed on a Service Fabric node. The information includes - service kind, service name, current service operation, current service operation start date - time, partition ID, replica/instance ID, reported load, and other information. - - :param node_name: The name of the node. - :type node_name: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeployedServiceReplicaDetailInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.DeployedServiceReplicaDetailInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedServiceReplicaDetailInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_service_replica_detail_info_request( - node_name=node_name, - partition_id=partition_id, - replica_id=replica_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_deployed_service_replica_detail_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('DeployedServiceReplicaDetailInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_replica_detail_info.metadata = {'url': "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetDetail"} # type: ignore - - - @distributed_trace_async - async def get_deployed_service_replica_detail_info_by_partition_id( - self, - node_name: str, - partition_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.DeployedServiceReplicaDetailInfo": - """Gets the details of replica deployed on a Service Fabric node. - - Gets the details of the replica deployed on a Service Fabric node. The information includes - service kind, service name, current service operation, current service operation start date - time, partition ID, replica/instance ID, reported load, and other information. - - :param node_name: The name of the node. - :type node_name: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeployedServiceReplicaDetailInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.DeployedServiceReplicaDetailInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedServiceReplicaDetailInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_service_replica_detail_info_by_partition_id_request( - node_name=node_name, - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_deployed_service_replica_detail_info_by_partition_id.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('DeployedServiceReplicaDetailInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_replica_detail_info_by_partition_id.metadata = {'url': "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas"} # type: ignore - - - @distributed_trace_async - async def restart_replica( # pylint: disable=inconsistent-return-statements - self, - node_name: str, - partition_id: str, - replica_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Restarts a service replica of a persisted service running on a node. - - Restarts a service replica of a persisted service running on a node. Warning - There are no - safety checks performed when this API is used. Incorrect use of this API can lead to - availability loss for stateful services. - - :param node_name: The name of the node. - :type node_name: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_restart_replica_request( - node_name=node_name, - partition_id=partition_id, - replica_id=replica_id, - api_version=api_version, - timeout=timeout, - template_url=self.restart_replica.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - restart_replica.metadata = {'url': "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Restart"} # type: ignore - - - @distributed_trace_async - async def remove_replica( # pylint: disable=inconsistent-return-statements - self, - node_name: str, - partition_id: str, - replica_id: str, - force_remove: Optional[bool] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Removes a service replica running on a node. - - This API simulates a Service Fabric replica failure by removing a replica from a Service Fabric - cluster. The removal closes the replica, transitions the replica to the role None, and then - removes all of the state information of the replica from the cluster. This API tests the - replica state removal path, and simulates the report fault permanent path through client APIs. - Warning - There are no safety checks performed when this API is used. Incorrect use of this API - can lead to data loss for stateful services. In addition, the forceRemove flag impacts all - other replicas hosted in the same process. - - :param node_name: The name of the node. - :type node_name: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param force_remove: Remove a Service Fabric application or service forcefully without going - through the graceful shutdown sequence. This parameter can be used to forcefully delete an - application or service for which delete is timing out due to issues in the service code that - prevents graceful close of replicas. Default value is None. - :type force_remove: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_remove_replica_request( - node_name=node_name, - partition_id=partition_id, - replica_id=replica_id, - api_version=api_version, - force_remove=force_remove, - timeout=timeout, - template_url=self.remove_replica.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - remove_replica.metadata = {'url': "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Delete"} # type: ignore - - - @distributed_trace_async - async def get_deployed_service_package_info_list( - self, - node_name: str, - application_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> List["_models.DeployedServicePackageInfo"]: - """Gets the list of service packages deployed on a Service Fabric node. - - Returns the information about the service packages deployed on a Service Fabric node for the - given application. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of DeployedServicePackageInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.DeployedServicePackageInfo] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.DeployedServicePackageInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_service_package_info_list_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_deployed_service_package_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[DeployedServicePackageInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_package_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages"} # type: ignore - - - @distributed_trace_async - async def get_deployed_service_package_info_list_by_name( - self, - node_name: str, - application_id: str, - service_package_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> Optional[List["_models.DeployedServicePackageInfo"]]: - """Gets the list of service packages deployed on a Service Fabric node matching exactly the - specified name. - - Returns the information about the service packages deployed on a Service Fabric node for the - given application. These results are of service packages whose name match exactly the service - package name specified as the parameter. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_package_name: The name of the service package. - :type service_package_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of DeployedServicePackageInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.DeployedServicePackageInfo] or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[List["_models.DeployedServicePackageInfo"]]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_service_package_info_list_by_name_request( - node_name=node_name, - application_id=application_id, - service_package_name=service_package_name, - api_version=api_version, - timeout=timeout, - template_url=self.get_deployed_service_package_info_list_by_name.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[DeployedServicePackageInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_package_info_list_by_name.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}"} # type: ignore - - - @distributed_trace_async - async def get_deployed_service_package_health( - self, - node_name: str, - application_id: str, - service_package_name: str, - events_health_state_filter: Optional[int] = 0, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.DeployedServicePackageHealth": - """Gets the information about health of a service package for a specific application deployed for - a Service Fabric node and application. - - Gets the information about health of a service package for a specific application deployed on a - Service Fabric node. Use EventsHealthStateFilter to optionally filter for the collection of - HealthEvent objects reported on the deployed service package based on health state. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_package_name: The name of the service package. - :type service_package_name: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeployedServicePackageHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.DeployedServicePackageHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedServicePackageHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_service_package_health_request( - node_name=node_name, - application_id=application_id, - service_package_name=service_package_name, - api_version=api_version, - events_health_state_filter=events_health_state_filter, - timeout=timeout, - template_url=self.get_deployed_service_package_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('DeployedServicePackageHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_package_health.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth"} # type: ignore - - - @distributed_trace_async - async def get_deployed_service_package_health_using_policy( - self, - node_name: str, - application_id: str, - service_package_name: str, - events_health_state_filter: Optional[int] = 0, - timeout: Optional[int] = 60, - application_health_policy: Optional["_models.ApplicationHealthPolicy"] = None, - **kwargs: Any - ) -> "_models.DeployedServicePackageHealth": - """Gets the information about health of service package for a specific application deployed on a - Service Fabric node using the specified policy. - - Gets the information about health of a service package for a specific application deployed on a - Service Fabric node. using the specified policy. Use EventsHealthStateFilter to optionally - filter for the collection of HealthEvent objects reported on the deployed service package based - on health state. Use ApplicationHealthPolicy to optionally override the health policies used to - evaluate the health. This API only uses 'ConsiderWarningAsError' field of the - ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the - deployed service package. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_package_name: The name of the service package. - :type service_package_name: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param application_health_policy: Describes the health policies used to evaluate the health of - an application or one of its children. - If not present, the health evaluation uses the health policy from application manifest or the - default health policy. Default value is None. - :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeployedServicePackageHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.DeployedServicePackageHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedServicePackageHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if application_health_policy is not None: - _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - _json = None - - request = build_get_deployed_service_package_health_using_policy_request( - node_name=node_name, - application_id=application_id, - service_package_name=service_package_name, - api_version=api_version, - content_type=content_type, - json=_json, - events_health_state_filter=events_health_state_filter, - timeout=timeout, - template_url=self.get_deployed_service_package_health_using_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('DeployedServicePackageHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_package_health_using_policy.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth"} # type: ignore - - - @distributed_trace_async - async def report_deployed_service_package_health( # pylint: disable=inconsistent-return-statements - self, - node_name: str, - application_id: str, - service_package_name: str, - health_information: "_models.HealthInformation", - immediate: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Sends a health report on the Service Fabric deployed service package. - - Reports health state of the service package of the application deployed on a Service Fabric - node. The report must contain the information about the source of the health report and - property on which it is reported. - The report is sent to a Service Fabric gateway Service, which forwards to the health store. - The report may be accepted by the gateway, but rejected by the health store after extra - validation. - For example, the health store may reject the report because of an invalid parameter, like a - stale sequence number. - To see whether the report was applied in the health store, get deployed service package health - and check that the report appears in the HealthEvents section. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_package_name: The name of the service package. - :type service_package_name: str - :param health_information: Describes the health information for the health report. This - information needs to be present in all of the health reports sent to the health manager. - :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be sent immediately. - A health report is sent to a Service Fabric gateway Application, which forwards to the health - store. - If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health - store, regardless of the fabric client settings that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as possible. - Depending on timing and other conditions, sending the report may still fail, for example if - the HTTP Gateway is closed or the message doesn't reach the Gateway. - If Immediate is set to false, the report is sent based on the health client settings from the - HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval - configuration. - This is the recommended setting because it allows the health client to optimize health - reporting messages to health store as well as health report processing. - By default, reports are not sent immediately. Default value is False. - :type immediate: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(health_information, 'HealthInformation') - - request = build_report_deployed_service_package_health_request( - node_name=node_name, - application_id=application_id, - service_package_name=service_package_name, - api_version=api_version, - content_type=content_type, - json=_json, - immediate=immediate, - timeout=timeout, - template_url=self.report_deployed_service_package_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - report_deployed_service_package_health.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/ReportHealth"} # type: ignore - - - @distributed_trace_async - async def deploy_service_package_to_node( # pylint: disable=inconsistent-return-statements - self, - node_name: str, - deploy_service_package_to_node_description: "_models.DeployServicePackageToNodeDescription", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Downloads all of the code packages associated with specified service manifest on the specified - node. - - This API provides a way to download code packages including the container images on a specific - node outside of the normal application deployment and upgrade path. This is useful for the - large code packages and container images to be present on the node before the actual - application deployment and upgrade, thus significantly reducing the total time required for the - deployment or upgrade. - - :param node_name: The name of the node. - :type node_name: str - :param deploy_service_package_to_node_description: Describes information for deploying a - service package to a Service Fabric node. - :type deploy_service_package_to_node_description: - ~azure.servicefabric.models.DeployServicePackageToNodeDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(deploy_service_package_to_node_description, 'DeployServicePackageToNodeDescription') - - request = build_deploy_service_package_to_node_request( - node_name=node_name, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.deploy_service_package_to_node.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - deploy_service_package_to_node.metadata = {'url': "/Nodes/{nodeName}/$/DeployServicePackage"} # type: ignore - - - @distributed_trace_async - async def get_deployed_code_package_info_list( - self, - node_name: str, - application_id: str, - service_manifest_name: Optional[str] = None, - code_package_name: Optional[str] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> List["_models.DeployedCodePackageInfo"]: - """Gets the list of code packages deployed on a Service Fabric node. - - Gets the list of code packages deployed on a Service Fabric node for the given application. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_manifest_name: The name of a service manifest registered as part of an - application type in a Service Fabric cluster. Default value is None. - :type service_manifest_name: str - :param code_package_name: The name of code package specified in service manifest registered as - part of an application type in a Service Fabric cluster. Default value is None. - :type code_package_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of DeployedCodePackageInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.DeployedCodePackageInfo] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.DeployedCodePackageInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_code_package_info_list_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - service_manifest_name=service_manifest_name, - code_package_name=code_package_name, - timeout=timeout, - template_url=self.get_deployed_code_package_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[DeployedCodePackageInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_code_package_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages"} # type: ignore - - - @distributed_trace_async - async def restart_deployed_code_package( # pylint: disable=inconsistent-return-statements - self, - node_name: str, - application_id: str, - restart_deployed_code_package_description: "_models.RestartDeployedCodePackageDescription", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Restarts a code package deployed on a Service Fabric node in a cluster. - - Restarts a code package deployed on a Service Fabric node in a cluster. This aborts the code - package process, which will restart all the user service replicas hosted in that process. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param restart_deployed_code_package_description: Describes the deployed code package on - Service Fabric node to restart. - :type restart_deployed_code_package_description: - ~azure.servicefabric.models.RestartDeployedCodePackageDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(restart_deployed_code_package_description, 'RestartDeployedCodePackageDescription') - - request = build_restart_deployed_code_package_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.restart_deployed_code_package.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - restart_deployed_code_package.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/Restart"} # type: ignore - - - @distributed_trace_async - async def get_container_logs_deployed_on_node( - self, - node_name: str, - application_id: str, - service_manifest_name: str, - code_package_name: str, - tail: Optional[str] = None, - previous: Optional[bool] = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ContainerLogs": - """Gets the container logs for container deployed on a Service Fabric node. - - Gets the container logs for container deployed on a Service Fabric node for the given code - package. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_manifest_name: The name of a service manifest registered as part of an - application type in a Service Fabric cluster. - :type service_manifest_name: str - :param code_package_name: The name of code package specified in service manifest registered as - part of an application type in a Service Fabric cluster. - :type code_package_name: str - :param tail: Number of lines to show from the end of the logs. Default is 100. 'all' to show - the complete logs. - :type tail: str - :param previous: Specifies whether to get container logs from exited/dead containers of the - code package instance. Default value is False. - :type previous: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ContainerLogs, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ContainerLogs - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerLogs"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_container_logs_deployed_on_node_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - service_manifest_name=service_manifest_name, - code_package_name=code_package_name, - tail=tail, - previous=previous, - timeout=timeout, - template_url=self.get_container_logs_deployed_on_node.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ContainerLogs', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_container_logs_deployed_on_node.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerLogs"} # type: ignore - - - @distributed_trace_async - async def invoke_container_api( - self, - node_name: str, - application_id: str, - service_manifest_name: str, - code_package_name: str, - code_package_instance_id: str, - container_api_request_body: "_models.ContainerApiRequestBody", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ContainerApiResponse": - """Invoke container API on a container deployed on a Service Fabric node. - - Invoke container API on a container deployed on a Service Fabric node for the given code - package. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_manifest_name: The name of a service manifest registered as part of an - application type in a Service Fabric cluster. - :type service_manifest_name: str - :param code_package_name: The name of code package specified in service manifest registered as - part of an application type in a Service Fabric cluster. - :type code_package_name: str - :param code_package_instance_id: ID that uniquely identifies a code package instance deployed - on a service fabric node. - :type code_package_instance_id: str - :param container_api_request_body: Parameters for making container API call. - :type container_api_request_body: ~azure.servicefabric.models.ContainerApiRequestBody - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ContainerApiResponse, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ContainerApiResponse - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApiResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(container_api_request_body, 'ContainerApiRequestBody') - - request = build_invoke_container_api_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - content_type=content_type, - service_manifest_name=service_manifest_name, - code_package_name=code_package_name, - code_package_instance_id=code_package_instance_id, - json=_json, - timeout=timeout, - template_url=self.invoke_container_api.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ContainerApiResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - invoke_container_api.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerApi"} # type: ignore - - - @distributed_trace_async - async def create_compose_deployment( # pylint: disable=inconsistent-return-statements - self, - create_compose_deployment_description: "_models.CreateComposeDeploymentDescription", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Creates a Service Fabric compose deployment. - - Compose is a file format that describes multi-container applications. This API allows deploying - container based applications defined in compose format in a Service Fabric cluster. Once the - deployment is created, its status can be tracked via the ``GetComposeDeploymentStatus`` API. - - :param create_compose_deployment_description: Describes the compose deployment that needs to be - created. - :type create_compose_deployment_description: - ~azure.servicefabric.models.CreateComposeDeploymentDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_compose_deployment_description, 'CreateComposeDeploymentDescription') - - request = build_create_compose_deployment_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.create_compose_deployment.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - create_compose_deployment.metadata = {'url': "/ComposeDeployments/$/Create"} # type: ignore - - - @distributed_trace_async - async def get_compose_deployment_status( - self, - deployment_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ComposeDeploymentStatusInfo": - """Gets information about a Service Fabric compose deployment. - - Returns the status of the compose deployment that was created or in the process of being - created in the Service Fabric cluster and whose name matches the one specified as the - parameter. The response includes the name, status, and other details about the deployment. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ComposeDeploymentStatusInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ComposeDeploymentStatusInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ComposeDeploymentStatusInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_compose_deployment_status_request( - deployment_name=deployment_name, - api_version=api_version, - timeout=timeout, - template_url=self.get_compose_deployment_status.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ComposeDeploymentStatusInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_compose_deployment_status.metadata = {'url': "/ComposeDeployments/{deploymentName}"} # type: ignore - - - @distributed_trace_async - async def get_compose_deployment_status_list( - self, - continuation_token_parameter: Optional[str] = None, - max_results: Optional[int] = 0, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PagedComposeDeploymentStatusInfoList": - """Gets the list of compose deployments created in the Service Fabric cluster. - - Gets the status about the compose deployments that were created or in the process of being - created in the Service Fabric cluster. The response includes the name, status, and other - details about the compose deployments. If the list of deployments do not fit in a page, one - page of results is returned as well as a continuation token, which can be used to get the next - page. - - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedComposeDeploymentStatusInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedComposeDeploymentStatusInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedComposeDeploymentStatusInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_compose_deployment_status_list_request( - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.get_compose_deployment_status_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedComposeDeploymentStatusInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_compose_deployment_status_list.metadata = {'url': "/ComposeDeployments"} # type: ignore - - - @distributed_trace_async - async def get_compose_deployment_upgrade_progress( - self, - deployment_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ComposeDeploymentUpgradeProgressInfo": - """Gets details for the latest upgrade performed on this Service Fabric compose deployment. - - Returns the information about the state of the compose deployment upgrade along with details to - aid debugging application health issues. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ComposeDeploymentUpgradeProgressInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ComposeDeploymentUpgradeProgressInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ComposeDeploymentUpgradeProgressInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_compose_deployment_upgrade_progress_request( - deployment_name=deployment_name, - api_version=api_version, - timeout=timeout, - template_url=self.get_compose_deployment_upgrade_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ComposeDeploymentUpgradeProgressInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_compose_deployment_upgrade_progress.metadata = {'url': "/ComposeDeployments/{deploymentName}/$/GetUpgradeProgress"} # type: ignore - - - @distributed_trace_async - async def remove_compose_deployment( # pylint: disable=inconsistent-return-statements - self, - deployment_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Deletes an existing Service Fabric compose deployment from cluster. - - Deletes an existing Service Fabric compose deployment. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_remove_compose_deployment_request( - deployment_name=deployment_name, - api_version=api_version, - timeout=timeout, - template_url=self.remove_compose_deployment.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - remove_compose_deployment.metadata = {'url': "/ComposeDeployments/{deploymentName}/$/Delete"} # type: ignore - - - @distributed_trace_async - async def start_compose_deployment_upgrade( # pylint: disable=inconsistent-return-statements - self, - deployment_name: str, - compose_deployment_upgrade_description: "_models.ComposeDeploymentUpgradeDescription", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Starts upgrading a compose deployment in the Service Fabric cluster. - - Validates the supplied upgrade parameters and starts upgrading the deployment if the parameters - are valid. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param compose_deployment_upgrade_description: Parameters for upgrading compose deployment. - :type compose_deployment_upgrade_description: - ~azure.servicefabric.models.ComposeDeploymentUpgradeDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(compose_deployment_upgrade_description, 'ComposeDeploymentUpgradeDescription') - - request = build_start_compose_deployment_upgrade_request( - deployment_name=deployment_name, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.start_compose_deployment_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_compose_deployment_upgrade.metadata = {'url': "/ComposeDeployments/{deploymentName}/$/Upgrade"} # type: ignore - - - @distributed_trace_async - async def start_rollback_compose_deployment_upgrade( # pylint: disable=inconsistent-return-statements - self, - deployment_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Starts rolling back a compose deployment upgrade in the Service Fabric cluster. - - Rollback a service fabric compose deployment upgrade. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_start_rollback_compose_deployment_upgrade_request( - deployment_name=deployment_name, - api_version=api_version, - timeout=timeout, - template_url=self.start_rollback_compose_deployment_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_rollback_compose_deployment_upgrade.metadata = {'url': "/ComposeDeployments/{deploymentName}/$/RollbackUpgrade"} # type: ignore - - - @distributed_trace_async - async def get_chaos( - self, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.Chaos": - """Get the status of Chaos. - - Get the status of Chaos indicating whether or not Chaos is running, the Chaos parameters used - for running Chaos and the status of the Chaos Schedule. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Chaos, or the result of cls(response) - :rtype: ~azure.servicefabric.models.Chaos - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Chaos"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_chaos_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_chaos.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Chaos', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_chaos.metadata = {'url': "/Tools/Chaos"} # type: ignore - - - @distributed_trace_async - async def start_chaos( # pylint: disable=inconsistent-return-statements - self, - chaos_parameters: "_models.ChaosParameters", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Starts Chaos in the cluster. - - If Chaos is not already running in the cluster, it starts Chaos with the passed in Chaos - parameters. - If Chaos is already running when this call is made, the call fails with the error code - FABRIC_E_CHAOS_ALREADY_RUNNING. - Refer to the article `Induce controlled Chaos in Service Fabric clusters - `_ for more - details. - - :param chaos_parameters: Describes all the parameters to configure a Chaos run. - :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(chaos_parameters, 'ChaosParameters') - - request = build_start_chaos_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.start_chaos.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_chaos.metadata = {'url': "/Tools/Chaos/$/Start"} # type: ignore - - - @distributed_trace_async - async def stop_chaos( # pylint: disable=inconsistent-return-statements - self, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Stops Chaos if it is running in the cluster and put the Chaos Schedule in a stopped state. - - Stops Chaos from executing new faults. In-flight faults will continue to execute until they are - complete. The current Chaos Schedule is put into a stopped state. - Once a schedule is stopped, it will stay in the stopped state and not be used to Chaos Schedule - new runs of Chaos. A new Chaos Schedule must be set in order to resume scheduling. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_stop_chaos_request( - api_version=api_version, - timeout=timeout, - template_url=self.stop_chaos.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - stop_chaos.metadata = {'url': "/Tools/Chaos/$/Stop"} # type: ignore - - - @distributed_trace_async - async def get_chaos_events( - self, - continuation_token_parameter: Optional[str] = None, - start_time_utc: Optional[str] = None, - end_time_utc: Optional[str] = None, - max_results: Optional[int] = 0, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ChaosEventsSegment": - """Gets the next segment of the Chaos events based on the continuation token or the time range. - - To get the next segment of the Chaos events, you can specify the ContinuationToken. To get the - start of a new segment of Chaos events, you can specify the time range - through StartTimeUtc and EndTimeUtc. You cannot specify both the ContinuationToken and the time - range in the same call. - When there are more than 100 Chaos events, the Chaos events are returned in multiple segments - where a segment contains no more than 100 Chaos events and to get the next segment you make a - call to this API with the continuation token. - - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param start_time_utc: The Windows file time representing the start time of the time range for - which a Chaos report is to be generated. Consult `DateTime.ToFileTimeUtc Method - `_.aspx) for - details. Default value is None. - :type start_time_utc: str - :param end_time_utc: The Windows file time representing the end time of the time range for - which a Chaos report is to be generated. Consult `DateTime.ToFileTimeUtc Method - `_.aspx) for - details. Default value is None. - :type end_time_utc: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ChaosEventsSegment, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ChaosEventsSegment - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ChaosEventsSegment"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_chaos_events_request( - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - max_results=max_results, - timeout=timeout, - template_url=self.get_chaos_events.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ChaosEventsSegment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_chaos_events.metadata = {'url': "/Tools/Chaos/Events"} # type: ignore - - - @distributed_trace_async - async def get_chaos_schedule( - self, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ChaosScheduleDescription": - """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. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ChaosScheduleDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ChaosScheduleDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ChaosScheduleDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_chaos_schedule_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_chaos_schedule.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ChaosScheduleDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_chaos_schedule.metadata = {'url': "/Tools/Chaos/Schedule"} # type: ignore - - - @distributed_trace_async - async def post_chaos_schedule( # pylint: disable=inconsistent-return-statements - self, - timeout: Optional[int] = 60, - version: Optional[int] = None, - schedule: Optional["_models.ChaosSchedule"] = None, - **kwargs: Any - ) -> None: - """Set the schedule used by Chaos. - - Chaos will automatically schedule runs based on the Chaos Schedule. - The Chaos Schedule will be updated if the provided version matches the version on the server. - When updating the Chaos Schedule, the version on the server is incremented by 1. - The version on the server will wrap back to 0 after reaching a large number. - If Chaos is running when this call is made, the call will fail. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param version: The version number of the Schedule. Default value is None. - :type version: int - :param schedule: Defines the schedule used by Chaos. Default value is None. - :type schedule: ~azure.servicefabric.models.ChaosSchedule - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _chaos_schedule = _models.ChaosScheduleDescription(version=version, schedule=schedule) - _json = self._serialize.body(_chaos_schedule, 'ChaosScheduleDescription') - - request = build_post_chaos_schedule_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.post_chaos_schedule.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - post_chaos_schedule.metadata = {'url': "/Tools/Chaos/Schedule"} # type: ignore - - - @distributed_trace_async - async def upload_file( # pylint: disable=inconsistent-return-statements - self, - content_path: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Uploads contents of the file to the image store. - - Uploads contents of the file to the image store. Use this API if the file is small enough to - upload again if the connection fails. The file's data needs to be added to the request body. - The contents will be uploaded to the specified path. Image store service uses a mark file to - indicate the availability of the folder. The mark file is an empty file named "_.dir". The mark - file is generated by the image store service when all files in a folder are uploaded. When - using File-by-File approach to upload application package in REST, the image store service - isn't aware of the file hierarchy of the application package; you need to create a mark file - per folder and upload it last, to let the image store service know that the folder is complete. - - :param content_path: Relative path to file or folder in the image store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_upload_file_request( - content_path=content_path, - api_version=api_version, - timeout=timeout, - template_url=self.upload_file.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - upload_file.metadata = {'url': "/ImageStore/{contentPath}"} # type: ignore - - - @distributed_trace_async - async def get_image_store_content( - self, - content_path: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ImageStoreContent": - """Gets the image store content information. - - Returns the information about the image store content at the specified contentPath. The - contentPath is relative to the root of the image store. - - :param content_path: Relative path to file or folder in the image store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ImageStoreContent, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ImageStoreContent - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ImageStoreContent"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_image_store_content_request( - content_path=content_path, - api_version=api_version, - timeout=timeout, - template_url=self.get_image_store_content.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ImageStoreContent', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_image_store_content.metadata = {'url': "/ImageStore/{contentPath}"} # type: ignore - - - @distributed_trace_async - async def delete_image_store_content( # pylint: disable=inconsistent-return-statements - self, - content_path: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Deletes existing image store content. - - Deletes existing image store content being found within the given image store relative path. - This command can be used to delete uploaded application packages once they are provisioned. - - :param content_path: Relative path to file or folder in the image store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_image_store_content_request( - content_path=content_path, - api_version=api_version, - timeout=timeout, - template_url=self.delete_image_store_content.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete_image_store_content.metadata = {'url': "/ImageStore/{contentPath}"} # type: ignore - - - @distributed_trace_async - async def get_image_store_root_content( - self, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ImageStoreContent": - """Gets the content information at the root of the image store. - - Returns the information about the image store content at the root of the image store. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ImageStoreContent, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ImageStoreContent - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ImageStoreContent"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_image_store_root_content_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_image_store_root_content.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ImageStoreContent', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_image_store_root_content.metadata = {'url': "/ImageStore"} # type: ignore - - - @distributed_trace_async - async def copy_image_store_content( # pylint: disable=inconsistent-return-statements - self, - image_store_copy_description: "_models.ImageStoreCopyDescription", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Copies image store content internally. - - Copies the image store content from the source image store relative path to the destination - image store relative path. - - :param image_store_copy_description: Describes the copy description for the image store. - :type image_store_copy_description: ~azure.servicefabric.models.ImageStoreCopyDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(image_store_copy_description, 'ImageStoreCopyDescription') - - request = build_copy_image_store_content_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.copy_image_store_content.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - copy_image_store_content.metadata = {'url': "/ImageStore/$/Copy"} # type: ignore - - - @distributed_trace_async - async def delete_image_store_upload_session( # pylint: disable=inconsistent-return-statements - self, - session_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Cancels an image store upload session. - - The DELETE request will cause the existing upload session to expire and remove any previously - uploaded file chunks. - - :param session_id: A GUID generated by the user for a file uploading. It identifies an image - store upload session which keeps track of all file chunks until it is committed. - :type session_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_image_store_upload_session_request( - api_version=api_version, - session_id=session_id, - timeout=timeout, - template_url=self.delete_image_store_upload_session.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete_image_store_upload_session.metadata = {'url': "/ImageStore/$/DeleteUploadSession"} # type: ignore - - - @distributed_trace_async - async def commit_image_store_upload_session( # pylint: disable=inconsistent-return-statements - self, - session_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Commit an image store upload session. - - When all file chunks have been uploaded, the upload session needs to be committed explicitly to - complete the upload. Image store preserves the upload session until the expiration time, which - is 30 minutes after the last chunk received. - - :param session_id: A GUID generated by the user for a file uploading. It identifies an image - store upload session which keeps track of all file chunks until it is committed. - :type session_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_commit_image_store_upload_session_request( - api_version=api_version, - session_id=session_id, - timeout=timeout, - template_url=self.commit_image_store_upload_session.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - commit_image_store_upload_session.metadata = {'url': "/ImageStore/$/CommitUploadSession"} # type: ignore - - - @distributed_trace_async - async def get_image_store_upload_session_by_id( - self, - session_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.UploadSession": - """Get the image store upload session by ID. - - Gets the image store upload session identified by the given ID. User can query the upload - session at any time during uploading. - - :param session_id: A GUID generated by the user for a file uploading. It identifies an image - store upload session which keeps track of all file chunks until it is committed. - :type session_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: UploadSession, or the result of cls(response) - :rtype: ~azure.servicefabric.models.UploadSession - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.UploadSession"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_image_store_upload_session_by_id_request( - api_version=api_version, - session_id=session_id, - timeout=timeout, - template_url=self.get_image_store_upload_session_by_id.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('UploadSession', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_image_store_upload_session_by_id.metadata = {'url': "/ImageStore/$/GetUploadSession"} # type: ignore - - - @distributed_trace_async - async def get_image_store_upload_session_by_path( - self, - content_path: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.UploadSession": - """Get the image store upload session by relative path. - - Gets the image store upload session associated with the given image store relative path. User - can query the upload session at any time during uploading. - - :param content_path: Relative path to file or folder in the image store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: UploadSession, or the result of cls(response) - :rtype: ~azure.servicefabric.models.UploadSession - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.UploadSession"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_image_store_upload_session_by_path_request( - content_path=content_path, - api_version=api_version, - timeout=timeout, - template_url=self.get_image_store_upload_session_by_path.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('UploadSession', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_image_store_upload_session_by_path.metadata = {'url': "/ImageStore/{contentPath}/$/GetUploadSession"} # type: ignore - - - @distributed_trace_async - async def upload_file_chunk( # pylint: disable=inconsistent-return-statements - self, - content_path: str, - session_id: str, - content_range: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Uploads a file chunk to the image store relative path. - - Uploads a file chunk to the image store with the specified upload session ID and image store - relative path. This API allows user to resume the file upload operation. user doesn't have to - restart the file upload from scratch whenever there is a network interruption. Use this option - if the file size is large. - - To perform a resumable file upload, user need to break the file into multiple chunks and upload - these chunks to the image store one-by-one. Chunks don't have to be uploaded in order. If the - file represented by the image store relative path already exists, it will be overwritten when - the upload session commits. - - :param content_path: Relative path to file or folder in the image store from its root. - :type content_path: str - :param session_id: A GUID generated by the user for a file uploading. It identifies an image - store upload session which keeps track of all file chunks until it is committed. - :type session_id: str - :param content_range: When uploading file chunks to the image store, the Content-Range header - field need to be configured and sent with a request. The format should looks like "bytes - {First-Byte-Position}-{Last-Byte-Position}/{File-Length}". For example, Content-Range:bytes - 300-5000/20000 indicates that user is sending bytes 300 through 5,000 and the total file length - is 20,000 bytes. - :type content_range: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_upload_file_chunk_request( - content_path=content_path, - api_version=api_version, - session_id=session_id, - content_range=content_range, - timeout=timeout, - template_url=self.upload_file_chunk.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - upload_file_chunk.metadata = {'url': "/ImageStore/{contentPath}/$/UploadChunk"} # type: ignore - - - @distributed_trace_async - async def get_image_store_root_folder_size( - self, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.FolderSizeInfo": - """Get the folder size at the root of the image store. - - Returns the total size of files at the root and children folders in image store. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: FolderSizeInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.FolderSizeInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.FolderSizeInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_image_store_root_folder_size_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_image_store_root_folder_size.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('FolderSizeInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_image_store_root_folder_size.metadata = {'url': "/ImageStore/$/FolderSize"} # type: ignore - - - @distributed_trace_async - async def get_image_store_folder_size( - self, - content_path: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.FolderSizeInfo": - """Get the size of a folder in image store. - - Gets the total size of file under a image store folder, specified by contentPath. The - contentPath is relative to the root of the image store. - - :param content_path: Relative path to file or folder in the image store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: FolderSizeInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.FolderSizeInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.FolderSizeInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_image_store_folder_size_request( - content_path=content_path, - api_version=api_version, - timeout=timeout, - template_url=self.get_image_store_folder_size.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('FolderSizeInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_image_store_folder_size.metadata = {'url': "/ImageStore/{contentPath}/$/FolderSize"} # type: ignore - - - @distributed_trace_async - async def get_image_store_info( - self, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.ImageStoreInfo": - """Gets the overall ImageStore information. - - Returns information about the primary ImageStore replica, such as disk capacity and available - disk space at the node it is on, and several categories of the ImageStore's file system usage. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ImageStoreInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ImageStoreInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ImageStoreInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_image_store_info_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_image_store_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ImageStoreInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_image_store_info.metadata = {'url': "/ImageStore/$/Info"} # type: ignore - - - @distributed_trace_async - async def invoke_infrastructure_command( - self, - command: str, - service_id: Optional[str] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> str: - """Invokes an administrative command on the given Infrastructure Service instance. - - For clusters that have one or more instances of the Infrastructure Service configured, - this API provides a way to send infrastructure-specific commands to a particular - instance of the Infrastructure Service. - - Available commands and their corresponding response formats vary depending upon - the infrastructure on which the cluster is running. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param command: The text of the command to be invoked. The content of the command is - infrastructure-specific. - :type command: str - :param service_id: The identity of the infrastructure service. This is the full name of the - infrastructure service without the 'fabric:' URI scheme. This parameter required only for the - cluster that has more than one instance of infrastructure service running. Default value is - None. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) - :rtype: str - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[str] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_invoke_infrastructure_command_request( - api_version=api_version, - command=command, - service_id=service_id, - timeout=timeout, - template_url=self.invoke_infrastructure_command.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - invoke_infrastructure_command.metadata = {'url': "/$/InvokeInfrastructureCommand"} # type: ignore - - - @distributed_trace_async - async def invoke_infrastructure_query( - self, - command: str, - service_id: Optional[str] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> str: - """Invokes a read-only query on the given infrastructure service instance. - - For clusters that have one or more instances of the Infrastructure Service configured, - this API provides a way to send infrastructure-specific queries to a particular - instance of the Infrastructure Service. - - Available commands and their corresponding response formats vary depending upon - the infrastructure on which the cluster is running. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param command: The text of the command to be invoked. The content of the command is - infrastructure-specific. - :type command: str - :param service_id: The identity of the infrastructure service. This is the full name of the - infrastructure service without the 'fabric:' URI scheme. This parameter required only for the - cluster that has more than one instance of infrastructure service running. Default value is - None. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) - :rtype: str - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[str] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_invoke_infrastructure_query_request( - api_version=api_version, - command=command, - service_id=service_id, - timeout=timeout, - template_url=self.invoke_infrastructure_query.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - invoke_infrastructure_query.metadata = {'url': "/$/InvokeInfrastructureQuery"} # type: ignore - - - @distributed_trace_async - async def start_data_loss( # pylint: disable=inconsistent-return-statements - self, - service_id: str, - partition_id: str, - operation_id: str, - data_loss_mode: Union[str, "_models.DataLossMode"], - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """This API will induce data loss for the specified partition. It will trigger a call to the - OnDataLossAsync API of the partition. - - This API will induce data loss for the specified partition. It will trigger a call to the - OnDataLoss API of the partition. - Actual data loss will depend on the specified DataLossMode. - - - * PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is triggered for the - partition but actual data loss depends on the presence of in-flight replication. - * FullDataLoss - All replicas are removed hence all data is lost and OnDataLoss is triggered. - - This API should only be called with a stateful service as the target. - - Calling this API with a system service as the target is not advised. - - Note: Once this API has been called, it cannot be reversed. Calling CancelOperation will only - stop execution and clean up internal system state. - It will not restore data if the command has progressed far enough to cause data loss. - - Call the GetDataLossProgress API with the same OperationId to return information on the - operation started with this API. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param data_loss_mode: This enum is passed to the StartDataLoss API to indicate what type of - data loss to induce. - :type data_loss_mode: str or ~azure.servicefabric.models.DataLossMode - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_start_data_loss_request( - service_id=service_id, - partition_id=partition_id, - api_version=api_version, - operation_id=operation_id, - data_loss_mode=data_loss_mode, - timeout=timeout, - template_url=self.start_data_loss.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_data_loss.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartDataLoss"} # type: ignore - - - @distributed_trace_async - async def get_data_loss_progress( - self, - service_id: str, - partition_id: str, - operation_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PartitionDataLossProgress": - """Gets the progress of a partition data loss operation started using the StartDataLoss API. - - Gets the progress of a data loss operation started with StartDataLoss, using the OperationId. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartitionDataLossProgress, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PartitionDataLossProgress - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionDataLossProgress"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_data_loss_progress_request( - service_id=service_id, - partition_id=partition_id, - api_version=api_version, - operation_id=operation_id, - timeout=timeout, - template_url=self.get_data_loss_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartitionDataLossProgress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_data_loss_progress.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetDataLossProgress"} # type: ignore - - - @distributed_trace_async - async def start_quorum_loss( # pylint: disable=inconsistent-return-statements - self, - service_id: str, - partition_id: str, - operation_id: str, - quorum_loss_mode: Union[str, "_models.QuorumLossMode"], - quorum_loss_duration: int, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Induces quorum loss for a given stateful service partition. - - This API is useful for a temporary quorum loss situation on your service. - - Call the GetQuorumLossProgress API with the same OperationId to return information on the - operation started with this API. - - This can only be called on stateful persisted (HasPersistedState==true) services. Do not use - this API on stateless services or stateful in-memory only services. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param quorum_loss_mode: This enum is passed to the StartQuorumLoss API to indicate what type - of quorum loss to induce. - :type quorum_loss_mode: str or ~azure.servicefabric.models.QuorumLossMode - :param quorum_loss_duration: The amount of time for which the partition will be kept in quorum - loss. This must be specified in seconds. - :type quorum_loss_duration: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_start_quorum_loss_request( - service_id=service_id, - partition_id=partition_id, - api_version=api_version, - operation_id=operation_id, - quorum_loss_mode=quorum_loss_mode, - quorum_loss_duration=quorum_loss_duration, - timeout=timeout, - template_url=self.start_quorum_loss.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_quorum_loss.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartQuorumLoss"} # type: ignore - - - @distributed_trace_async - async def get_quorum_loss_progress( - self, - service_id: str, - partition_id: str, - operation_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PartitionQuorumLossProgress": - """Gets the progress of a quorum loss operation on a partition started using the StartQuorumLoss - API. - - Gets the progress of a quorum loss operation started with StartQuorumLoss, using the provided - OperationId. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartitionQuorumLossProgress, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PartitionQuorumLossProgress - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionQuorumLossProgress"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_quorum_loss_progress_request( - service_id=service_id, - partition_id=partition_id, - api_version=api_version, - operation_id=operation_id, - timeout=timeout, - template_url=self.get_quorum_loss_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartitionQuorumLossProgress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_quorum_loss_progress.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetQuorumLossProgress"} # type: ignore - - - @distributed_trace_async - async def start_partition_restart( # pylint: disable=inconsistent-return-statements - self, - service_id: str, - partition_id: str, - operation_id: str, - restart_partition_mode: Union[str, "_models.RestartPartitionMode"], - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """This API will restart some or all replicas or instances of the specified partition. - - This API is useful for testing failover. - - If used to target a stateless service partition, RestartPartitionMode must be - AllReplicasOrInstances. - - Call the GetPartitionRestartProgress API using the same OperationId to get the progress. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param restart_partition_mode: Describe which partitions to restart. - :type restart_partition_mode: str or ~azure.servicefabric.models.RestartPartitionMode - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_start_partition_restart_request( - service_id=service_id, - partition_id=partition_id, - api_version=api_version, - operation_id=operation_id, - restart_partition_mode=restart_partition_mode, - timeout=timeout, - template_url=self.start_partition_restart.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_partition_restart.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartRestart"} # type: ignore - - - @distributed_trace_async - async def get_partition_restart_progress( - self, - service_id: str, - partition_id: str, - operation_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PartitionRestartProgress": - """Gets the progress of a PartitionRestart operation started using StartPartitionRestart. - - Gets the progress of a PartitionRestart started with StartPartitionRestart using the provided - OperationId. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartitionRestartProgress, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PartitionRestartProgress - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionRestartProgress"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_restart_progress_request( - service_id=service_id, - partition_id=partition_id, - api_version=api_version, - operation_id=operation_id, - timeout=timeout, - template_url=self.get_partition_restart_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartitionRestartProgress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_restart_progress.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetRestartProgress"} # type: ignore - - - @distributed_trace_async - async def start_node_transition( # pylint: disable=inconsistent-return-statements - self, - node_name: str, - operation_id: str, - node_transition_type: Union[str, "_models.NodeTransitionType"], - node_instance_id: str, - stop_duration_in_seconds: int, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Starts or stops a cluster node. - - Starts or stops a cluster node. A cluster node is a process, not the OS instance itself. To - start a node, pass in "Start" for the NodeTransitionType parameter. - To stop a node, pass in "Stop" for the NodeTransitionType parameter. This API starts the - operation - when the API returns the node may not have finished transitioning yet. - Call GetNodeTransitionProgress with the same OperationId to get the progress of the operation. - - :param node_name: The name of the node. - :type node_name: str - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param node_transition_type: Indicates the type of transition to perform. - NodeTransitionType.Start will start a stopped node. NodeTransitionType.Stop will stop a node - that is up. - :type node_transition_type: str or ~azure.servicefabric.models.NodeTransitionType - :param node_instance_id: The node instance ID of the target node. This can be determined - through GetNodeInfo API. - :type node_instance_id: str - :param stop_duration_in_seconds: The duration, in seconds, to keep the node stopped. The - minimum value is 600, the maximum is 14400. After this time expires, the node will - automatically come back up. - :type stop_duration_in_seconds: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_start_node_transition_request( - node_name=node_name, - api_version=api_version, - operation_id=operation_id, - node_transition_type=node_transition_type, - node_instance_id=node_instance_id, - stop_duration_in_seconds=stop_duration_in_seconds, - timeout=timeout, - template_url=self.start_node_transition.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_node_transition.metadata = {'url': "/Faults/Nodes/{nodeName}/$/StartTransition/"} # type: ignore - - - @distributed_trace_async - async def get_node_transition_progress( - self, - node_name: str, - operation_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.NodeTransitionProgress": - """Gets the progress of an operation started using StartNodeTransition. - - Gets the progress of an operation started with StartNodeTransition using the provided - OperationId. - - :param node_name: The name of the node. - :type node_name: str - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NodeTransitionProgress, or the result of cls(response) - :rtype: ~azure.servicefabric.models.NodeTransitionProgress - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeTransitionProgress"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_node_transition_progress_request( - node_name=node_name, - api_version=api_version, - operation_id=operation_id, - timeout=timeout, - template_url=self.get_node_transition_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NodeTransitionProgress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_node_transition_progress.metadata = {'url': "/Faults/Nodes/{nodeName}/$/GetTransitionProgress"} # type: ignore - - - @distributed_trace_async - async def get_fault_operation_list( - self, - type_filter: int = 65535, - state_filter: int = 65535, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> List["_models.OperationStatus"]: - """Gets a list of user-induced fault operations filtered by provided input. - - Gets the list of user-induced fault operations filtered by provided input. - - :param type_filter: Used to filter on OperationType for user-induced operations. - - - * 65535 - select all - * 1 - select PartitionDataLoss. - * 2 - select PartitionQuorumLoss. - * 4 - select PartitionRestart. - * 8 - select NodeTransition. Default value is 65535. - :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. Default value is 65535. - :type state_filter: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of OperationStatus, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.OperationStatus] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.OperationStatus"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_fault_operation_list_request( - api_version=api_version, - type_filter=type_filter, - state_filter=state_filter, - timeout=timeout, - template_url=self.get_fault_operation_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[OperationStatus]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_fault_operation_list.metadata = {'url': "/Faults/"} # type: ignore - - - @distributed_trace_async - async def cancel_operation( # pylint: disable=inconsistent-return-statements - self, - operation_id: str, - force: bool = False, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Cancels a user-induced fault operation. - - The following APIs start fault operations that may be cancelled by using CancelOperation: - StartDataLoss, StartQuorumLoss, StartPartitionRestart, StartNodeTransition. - - If force is false, then the specified user-induced operation will be gracefully stopped and - cleaned up. If force is true, the command will be aborted, and some internal state - may be left behind. Specifying force as true should be used with care. Calling this API with - force set to true is not allowed until this API has already - been called on the same test command with force set to false first, or unless the test command - already has an OperationState of OperationState.RollingBack. - Clarification: OperationState.RollingBack means that the system will be/is cleaning up internal - system state caused by executing the command. It will not restore data if the - test command was to cause data loss. For example, if you call StartDataLoss then call this - API, the system will only clean up internal state from running the command. - It will not restore the target partition's data, if the command progressed far enough to cause - data loss. - - Important note: if this API is invoked with force==true, internal state may be left behind. - - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param force: Indicates whether to gracefully roll back and clean up internal system state - modified by executing the user-induced operation. Default value is False. - :type force: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_cancel_operation_request( - api_version=api_version, - operation_id=operation_id, - force=force, - timeout=timeout, - template_url=self.cancel_operation.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - cancel_operation.metadata = {'url': "/Faults/$/Cancel"} # type: ignore - - - @distributed_trace_async - async def create_backup_policy( # pylint: disable=inconsistent-return-statements - self, - backup_policy_description: "_models.BackupPolicyDescription", - timeout: Optional[int] = 60, - validate_connection: Optional[bool] = False, - **kwargs: Any - ) -> None: - """Creates a backup policy. - - Creates a backup policy which can be associated later with a Service Fabric application, - service or a partition for periodic backup. - - :param backup_policy_description: Describes the backup policy. - :type backup_policy_description: ~azure.servicefabric.models.BackupPolicyDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param validate_connection: Specifies whether to validate the storage connection and - credentials before creating or updating the backup policies. Default value is False. - :type validate_connection: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') - - request = build_create_backup_policy_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - validate_connection=validate_connection, - template_url=self.create_backup_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - create_backup_policy.metadata = {'url': "/BackupRestore/BackupPolicies/$/Create"} # type: ignore - - - @distributed_trace_async - async def delete_backup_policy( # pylint: disable=inconsistent-return-statements - self, - backup_policy_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Deletes the backup policy. - - Deletes an existing backup policy. A backup policy must be created before it can be deleted. A - currently active backup policy, associated with any Service Fabric application, service or - partition, cannot be deleted without first deleting the mapping. - - :param backup_policy_name: The name of the backup policy. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_backup_policy_request( - backup_policy_name=backup_policy_name, - api_version=api_version, - timeout=timeout, - template_url=self.delete_backup_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete_backup_policy.metadata = {'url': "/BackupRestore/BackupPolicies/{backupPolicyName}/$/Delete"} # type: ignore - - - @distributed_trace_async - async def get_backup_policy_list( - self, - continuation_token_parameter: Optional[str] = None, - max_results: Optional[int] = 0, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PagedBackupPolicyDescriptionList": - """Gets all the backup policies configured. - - Get a list of all the backup policies configured. - - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedBackupPolicyDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedBackupPolicyDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupPolicyDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_backup_policy_list_request( - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.get_backup_policy_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedBackupPolicyDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_backup_policy_list.metadata = {'url': "/BackupRestore/BackupPolicies"} # type: ignore - - - @distributed_trace_async - async def get_backup_policy_by_name( - self, - backup_policy_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.BackupPolicyDescription": - """Gets a particular backup policy by name. - - Gets a particular backup policy identified by {backupPolicyName}. - - :param backup_policy_name: The name of the backup policy. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupPolicyDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.BackupPolicyDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupPolicyDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_backup_policy_by_name_request( - backup_policy_name=backup_policy_name, - api_version=api_version, - timeout=timeout, - template_url=self.get_backup_policy_by_name.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupPolicyDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_backup_policy_by_name.metadata = {'url': "/BackupRestore/BackupPolicies/{backupPolicyName}"} # type: ignore - - - @distributed_trace_async - async def get_all_entities_backed_up_by_policy( - self, - backup_policy_name: str, - continuation_token_parameter: Optional[str] = None, - max_results: Optional[int] = 0, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PagedBackupEntityList": - """Gets the list of backup entities that are associated with this policy. - - Returns a list of Service Fabric application, service or partition which are associated with - this backup policy. - - :param backup_policy_name: The name of the backup policy. - :type backup_policy_name: str - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedBackupEntityList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedBackupEntityList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupEntityList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_all_entities_backed_up_by_policy_request( - backup_policy_name=backup_policy_name, - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.get_all_entities_backed_up_by_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedBackupEntityList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_all_entities_backed_up_by_policy.metadata = {'url': "/BackupRestore/BackupPolicies/{backupPolicyName}/$/GetBackupEnabledEntities"} # type: ignore - - - @distributed_trace_async - async def update_backup_policy( # pylint: disable=inconsistent-return-statements - self, - backup_policy_name: str, - backup_policy_description: "_models.BackupPolicyDescription", - timeout: Optional[int] = 60, - validate_connection: Optional[bool] = False, - **kwargs: Any - ) -> None: - """Updates the backup policy. - - Updates the backup policy identified by {backupPolicyName}. - - :param backup_policy_name: The name of the backup policy. - :type backup_policy_name: str - :param backup_policy_description: Describes the backup policy. - :type backup_policy_description: ~azure.servicefabric.models.BackupPolicyDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param validate_connection: Specifies whether to validate the storage connection and - credentials before creating or updating the backup policies. Default value is False. - :type validate_connection: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') - - request = build_update_backup_policy_request( - backup_policy_name=backup_policy_name, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - validate_connection=validate_connection, - template_url=self.update_backup_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - update_backup_policy.metadata = {'url': "/BackupRestore/BackupPolicies/{backupPolicyName}/$/Update"} # type: ignore - - - @distributed_trace_async - async def enable_application_backup( # pylint: disable=inconsistent-return-statements - self, - application_id: str, - backup_policy_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Enables periodic backup of stateful partitions under this Service Fabric application. - - Enables periodic backup of stateful partitions which are part of this Service Fabric - application. Each partition is backed up individually as per the specified backup policy - description. - Note only C# based Reliable Actor and Reliable Stateful services are currently supported for - periodic backup. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param backup_policy_name: Name of the backup policy to be used for enabling periodic backups. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) - _json = self._serialize.body(_enable_backup_description, 'EnableBackupDescription') - - request = build_enable_application_backup_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.enable_application_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - enable_application_backup.metadata = {'url': "/Applications/{applicationId}/$/EnableBackup"} # type: ignore - - - @distributed_trace_async - async def disable_application_backup( # pylint: disable=inconsistent-return-statements - self, - application_id: str, - clean_backup: bool, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Disables periodic backup of Service Fabric application. - - Disables periodic backup of Service Fabric application which was previously enabled. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param clean_backup: Boolean flag to delete backups. It can be set to true for deleting all the - backups which were created for the backup entity that is getting disabled for backup. - :type clean_backup: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) - if _disable_backup_description is not None: - _json = self._serialize.body(_disable_backup_description, 'DisableBackupDescription') - else: - _json = None - - request = build_disable_application_backup_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.disable_application_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - disable_application_backup.metadata = {'url': "/Applications/{applicationId}/$/DisableBackup"} # type: ignore - - - @distributed_trace_async - async def get_application_backup_configuration_info( - self, - application_id: str, - continuation_token_parameter: Optional[str] = None, - max_results: Optional[int] = 0, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PagedBackupConfigurationInfoList": - """Gets the Service Fabric application backup configuration information. - - Gets the Service Fabric backup configuration information for the application and the services - and partitions under this application. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedBackupConfigurationInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedBackupConfigurationInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupConfigurationInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_backup_configuration_info_request( - application_id=application_id, - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.get_application_backup_configuration_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedBackupConfigurationInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_backup_configuration_info.metadata = {'url': "/Applications/{applicationId}/$/GetBackupConfigurationInfo"} # type: ignore - - - @distributed_trace_async - async def get_application_backup_list( - self, - application_id: str, - timeout: Optional[int] = 60, - latest: Optional[bool] = False, - start_date_time_filter: Optional[datetime.datetime] = None, - end_date_time_filter: Optional[datetime.datetime] = None, - continuation_token_parameter: Optional[str] = None, - max_results: Optional[int] = 0, - **kwargs: Any - ) -> "_models.PagedBackupInfoList": - """Gets the list of backups available for every partition in this application. - - Returns a list of backups available for every partition in this Service Fabric application. The - server enumerates all the backups available at the backup location configured in the backup - policy. It also allows filtering of the result based on start and end datetime or just fetching - the latest available backup for every partition. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param latest: Specifies whether to get only the most recent backup available for a partition - for the specified time range. Default value is False. - :type latest: bool - :param start_date_time_filter: Specify the start date time from which to enumerate backups, in - datetime format. The date time must be specified in ISO8601 format. This is an optional - parameter. If not specified, all backups from the beginning are enumerated. Default value is - None. - :type start_date_time_filter: ~datetime.datetime - :param end_date_time_filter: Specify the end date time till which to enumerate backups, in - datetime format. The date time must be specified in ISO8601 format. This is an optional - parameter. If not specified, enumeration is done till the most recent backup. Default value is - None. - :type end_date_time_filter: ~datetime.datetime - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedBackupInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedBackupInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_backup_list_request( - application_id=application_id, - api_version=api_version, - timeout=timeout, - latest=latest, - start_date_time_filter=start_date_time_filter, - end_date_time_filter=end_date_time_filter, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - template_url=self.get_application_backup_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedBackupInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_backup_list.metadata = {'url': "/Applications/{applicationId}/$/GetBackups"} # type: ignore - - - @distributed_trace_async - async def suspend_application_backup( # pylint: disable=inconsistent-return-statements - self, - application_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Suspends periodic backup for the specified Service Fabric application. - - The application which is configured to take periodic backups, is suspended for taking further - backups till it is resumed again. This operation applies to the entire application's hierarchy. - It means all the services and partitions under this application are now suspended for backup. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_suspend_application_backup_request( - application_id=application_id, - api_version=api_version, - timeout=timeout, - template_url=self.suspend_application_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - suspend_application_backup.metadata = {'url': "/Applications/{applicationId}/$/SuspendBackup"} # type: ignore - - - @distributed_trace_async - async def resume_application_backup( # pylint: disable=inconsistent-return-statements - self, - application_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Resumes periodic backup of a Service Fabric application which was previously suspended. - - The previously suspended Service Fabric application resumes taking periodic backup as per the - backup policy currently configured for the same. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_resume_application_backup_request( - application_id=application_id, - api_version=api_version, - timeout=timeout, - template_url=self.resume_application_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - resume_application_backup.metadata = {'url': "/Applications/{applicationId}/$/ResumeBackup"} # type: ignore - - - @distributed_trace_async - async def enable_service_backup( # pylint: disable=inconsistent-return-statements - self, - service_id: str, - backup_policy_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Enables periodic backup of stateful partitions under this Service Fabric service. - - Enables periodic backup of stateful partitions which are part of this Service Fabric service. - Each partition is backed up individually as per the specified backup policy description. In - case the application, which the service is part of, is already enabled for backup then this - operation would override the policy being used to take the periodic backup for this service and - its partitions (unless explicitly overridden at the partition level). - Note only C# based Reliable Actor and Reliable Stateful services are currently supported for - periodic backup. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param backup_policy_name: Name of the backup policy to be used for enabling periodic backups. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) - _json = self._serialize.body(_enable_backup_description, 'EnableBackupDescription') - - request = build_enable_service_backup_request( - service_id=service_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.enable_service_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - enable_service_backup.metadata = {'url': "/Services/{serviceId}/$/EnableBackup"} # type: ignore - - - @distributed_trace_async - async def disable_service_backup( # pylint: disable=inconsistent-return-statements - self, - service_id: str, - clean_backup: bool, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Disables periodic backup of Service Fabric service which was previously enabled. - - Disables periodic backup of Service Fabric service which was previously enabled. Backup must be - explicitly enabled before it can be disabled. - In case the backup is enabled for the Service Fabric application, which this service is part - of, this service would continue to be periodically backed up as per the policy mapped at the - application level. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param clean_backup: Boolean flag to delete backups. It can be set to true for deleting all the - backups which were created for the backup entity that is getting disabled for backup. - :type clean_backup: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) - if _disable_backup_description is not None: - _json = self._serialize.body(_disable_backup_description, 'DisableBackupDescription') - else: - _json = None - - request = build_disable_service_backup_request( - service_id=service_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.disable_service_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - disable_service_backup.metadata = {'url': "/Services/{serviceId}/$/DisableBackup"} # type: ignore - - - @distributed_trace_async - async def get_service_backup_configuration_info( - self, - service_id: str, - continuation_token_parameter: Optional[str] = None, - max_results: Optional[int] = 0, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PagedBackupConfigurationInfoList": - """Gets the Service Fabric service backup configuration information. - - Gets the Service Fabric backup configuration information for the service and the partitions - under this service. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedBackupConfigurationInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedBackupConfigurationInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupConfigurationInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_backup_configuration_info_request( - service_id=service_id, - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.get_service_backup_configuration_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedBackupConfigurationInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_backup_configuration_info.metadata = {'url': "/Services/{serviceId}/$/GetBackupConfigurationInfo"} # type: ignore - - - @distributed_trace_async - async def get_service_backup_list( - self, - service_id: str, - timeout: Optional[int] = 60, - latest: Optional[bool] = False, - start_date_time_filter: Optional[datetime.datetime] = None, - end_date_time_filter: Optional[datetime.datetime] = None, - continuation_token_parameter: Optional[str] = None, - max_results: Optional[int] = 0, - **kwargs: Any - ) -> "_models.PagedBackupInfoList": - """Gets the list of backups available for every partition in this service. - - Returns a list of backups available for every partition in this Service Fabric service. The - server enumerates all the backups available in the backup store configured in the backup - policy. It also allows filtering of the result based on start and end datetime or just fetching - the latest available backup for every partition. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param latest: Specifies whether to get only the most recent backup available for a partition - for the specified time range. Default value is False. - :type latest: bool - :param start_date_time_filter: Specify the start date time from which to enumerate backups, in - datetime format. The date time must be specified in ISO8601 format. This is an optional - parameter. If not specified, all backups from the beginning are enumerated. Default value is - None. - :type start_date_time_filter: ~datetime.datetime - :param end_date_time_filter: Specify the end date time till which to enumerate backups, in - datetime format. The date time must be specified in ISO8601 format. This is an optional - parameter. If not specified, enumeration is done till the most recent backup. Default value is - None. - :type end_date_time_filter: ~datetime.datetime - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedBackupInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedBackupInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_backup_list_request( - service_id=service_id, - api_version=api_version, - timeout=timeout, - latest=latest, - start_date_time_filter=start_date_time_filter, - end_date_time_filter=end_date_time_filter, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - template_url=self.get_service_backup_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedBackupInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_backup_list.metadata = {'url': "/Services/{serviceId}/$/GetBackups"} # type: ignore - - - @distributed_trace_async - async def suspend_service_backup( # pylint: disable=inconsistent-return-statements - self, - service_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Suspends periodic backup for the specified Service Fabric service. - - The service which is configured to take periodic backups, is suspended for taking further - backups till it is resumed again. This operation applies to the entire service's hierarchy. It - means all the partitions under this service are now suspended for backup. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_suspend_service_backup_request( - service_id=service_id, - api_version=api_version, - timeout=timeout, - template_url=self.suspend_service_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - suspend_service_backup.metadata = {'url': "/Services/{serviceId}/$/SuspendBackup"} # type: ignore - - - @distributed_trace_async - async def resume_service_backup( # pylint: disable=inconsistent-return-statements - self, - service_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Resumes periodic backup of a Service Fabric service which was previously suspended. - - The previously suspended Service Fabric service resumes taking periodic backup as per the - backup policy currently configured for the same. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_resume_service_backup_request( - service_id=service_id, - api_version=api_version, - timeout=timeout, - template_url=self.resume_service_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - resume_service_backup.metadata = {'url': "/Services/{serviceId}/$/ResumeBackup"} # type: ignore - - - @distributed_trace_async - async def enable_partition_backup( # pylint: disable=inconsistent-return-statements - self, - partition_id: str, - backup_policy_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Enables periodic backup of the stateful persisted partition. - - Enables periodic backup of stateful persisted partition. Each partition is backed up as per the - specified backup policy description. In case the application or service, which is partition is - part of, is already enabled for backup then this operation would override the policy being used - to take the periodic backup of this partition. - Note only C# based Reliable Actor and Reliable Stateful services are currently supported for - periodic backup. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param backup_policy_name: Name of the backup policy to be used for enabling periodic backups. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) - _json = self._serialize.body(_enable_backup_description, 'EnableBackupDescription') - - request = build_enable_partition_backup_request( - partition_id=partition_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.enable_partition_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - enable_partition_backup.metadata = {'url': "/Partitions/{partitionId}/$/EnableBackup"} # type: ignore - - - @distributed_trace_async - async def disable_partition_backup( # pylint: disable=inconsistent-return-statements - self, - partition_id: str, - clean_backup: bool, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Disables periodic backup of Service Fabric partition which was previously enabled. - - Disables periodic backup of partition which was previously enabled. Backup must be explicitly - enabled before it can be disabled. - In case the backup is enabled for the Service Fabric application or service, which this - partition is part of, this partition would continue to be periodically backed up as per the - policy mapped at the higher level entity. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param clean_backup: Boolean flag to delete backups. It can be set to true for deleting all the - backups which were created for the backup entity that is getting disabled for backup. - :type clean_backup: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) - if _disable_backup_description is not None: - _json = self._serialize.body(_disable_backup_description, 'DisableBackupDescription') - else: - _json = None - - request = build_disable_partition_backup_request( - partition_id=partition_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.disable_partition_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - disable_partition_backup.metadata = {'url': "/Partitions/{partitionId}/$/DisableBackup"} # type: ignore - - - @distributed_trace_async - async def get_partition_backup_configuration_info( - self, - partition_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PartitionBackupConfigurationInfo": - """Gets the partition backup configuration information. - - Gets the Service Fabric Backup configuration information for the specified partition. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartitionBackupConfigurationInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PartitionBackupConfigurationInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionBackupConfigurationInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_backup_configuration_info_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_partition_backup_configuration_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartitionBackupConfigurationInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_backup_configuration_info.metadata = {'url': "/Partitions/{partitionId}/$/GetBackupConfigurationInfo"} # type: ignore - - - @distributed_trace_async - async def get_partition_backup_list( - self, - partition_id: str, - timeout: Optional[int] = 60, - latest: Optional[bool] = False, - start_date_time_filter: Optional[datetime.datetime] = None, - end_date_time_filter: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> "_models.PagedBackupInfoList": - """Gets the list of backups available for the specified partition. - - Returns a list of backups available for the specified partition. The server enumerates all the - backups available in the backup store configured in the backup policy. It also allows filtering - of the result based on start and end datetime or just fetching the latest available backup for - the partition. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param latest: Specifies whether to get only the most recent backup available for a partition - for the specified time range. Default value is False. - :type latest: bool - :param start_date_time_filter: Specify the start date time from which to enumerate backups, in - datetime format. The date time must be specified in ISO8601 format. This is an optional - parameter. If not specified, all backups from the beginning are enumerated. Default value is - None. - :type start_date_time_filter: ~datetime.datetime - :param end_date_time_filter: Specify the end date time till which to enumerate backups, in - datetime format. The date time must be specified in ISO8601 format. This is an optional - parameter. If not specified, enumeration is done till the most recent backup. Default value is - None. - :type end_date_time_filter: ~datetime.datetime - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedBackupInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedBackupInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_backup_list_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - latest=latest, - start_date_time_filter=start_date_time_filter, - end_date_time_filter=end_date_time_filter, - template_url=self.get_partition_backup_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedBackupInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_backup_list.metadata = {'url': "/Partitions/{partitionId}/$/GetBackups"} # type: ignore - - - @distributed_trace_async - async def suspend_partition_backup( # pylint: disable=inconsistent-return-statements - self, - partition_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Suspends periodic backup for the specified partition. - - The partition which is configured to take periodic backups, is suspended for taking further - backups till it is resumed again. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_suspend_partition_backup_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.suspend_partition_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - suspend_partition_backup.metadata = {'url': "/Partitions/{partitionId}/$/SuspendBackup"} # type: ignore - - - @distributed_trace_async - async def resume_partition_backup( # pylint: disable=inconsistent-return-statements - self, - partition_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Resumes periodic backup of partition which was previously suspended. - - The previously suspended partition resumes taking periodic backup as per the backup policy - currently configured for the same. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_resume_partition_backup_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.resume_partition_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - resume_partition_backup.metadata = {'url': "/Partitions/{partitionId}/$/ResumeBackup"} # type: ignore - - - @distributed_trace_async - async def backup_partition( # pylint: disable=inconsistent-return-statements - self, - partition_id: str, - backup_timeout: Optional[int] = 10, - timeout: Optional[int] = 60, - backup_storage: Optional["_models.BackupStorageDescription"] = None, - **kwargs: Any - ) -> None: - """Triggers backup of the partition's state. - - Creates a backup of the stateful persisted partition's state. In case the partition is already - being periodically backed up, then by default the new backup is created at the same backup - storage. One can also override the same by specifying the backup storage details as part of the - request body. Once the backup is initiated, its progress can be tracked using the - GetBackupProgress operation. - In case, the operation times out, specify a greater backup timeout value in the query - parameter. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param backup_timeout: Specifies the maximum amount of time, in minutes, to wait for the backup - operation to complete. Post that, the operation completes with timeout error. However, in - certain corner cases it could be that though the operation returns back timeout, the backup - actually goes through. In case of timeout error, its recommended to invoke this operation again - with a greater timeout value. The default value for the same is 10 minutes. Default value is - 10. - :type backup_timeout: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param backup_storage: Specifies the details of the backup storage where to save the backup. - Default value is None. - :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _backup_partition_description = _models.BackupPartitionDescription(backup_storage=backup_storage) - if _backup_partition_description is not None: - _json = self._serialize.body(_backup_partition_description, 'BackupPartitionDescription') - else: - _json = None - - request = build_backup_partition_request( - partition_id=partition_id, - api_version=api_version, - content_type=content_type, - json=_json, - backup_timeout=backup_timeout, - timeout=timeout, - template_url=self.backup_partition.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - backup_partition.metadata = {'url': "/Partitions/{partitionId}/$/Backup"} # type: ignore - - - @distributed_trace_async - async def get_partition_backup_progress( - self, - partition_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.BackupProgressInfo": - """Gets details for the latest backup triggered for this partition. - - Returns information about the state of the latest backup along with details or failure reason - in case of completion. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupProgressInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.BackupProgressInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupProgressInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_backup_progress_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_partition_backup_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupProgressInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_backup_progress.metadata = {'url': "/Partitions/{partitionId}/$/GetBackupProgress"} # type: ignore - - - @distributed_trace_async - async def restore_partition( # pylint: disable=inconsistent-return-statements - self, - partition_id: str, - restore_partition_description: "_models.RestorePartitionDescription", - restore_timeout: Optional[int] = 10, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Triggers restore of the state of the partition using the specified restore partition - description. - - Restores the state of a of the stateful persisted partition using the specified backup point. - In case the partition is already being periodically backed up, then by default the backup point - is looked for in the storage specified in backup policy. One can also override the same by - specifying the backup storage details as part of the restore partition description in body. - Once the restore is initiated, its progress can be tracked using the GetRestoreProgress - operation. - In case, the operation times out, specify a greater restore timeout value in the query - parameter. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param restore_partition_description: Describes the parameters to restore the partition. - :type restore_partition_description: ~azure.servicefabric.models.RestorePartitionDescription - :param restore_timeout: Specifies the maximum amount of time to wait, in minutes, for the - restore operation to complete. Post that, the operation returns back with timeout error. - However, in certain corner cases it could be that the restore operation goes through even - though it completes with timeout. In case of timeout error, its recommended to invoke this - operation again with a greater timeout value. the default value for the same is 10 minutes. - Default value is 10. - :type restore_timeout: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(restore_partition_description, 'RestorePartitionDescription') - - request = build_restore_partition_request( - partition_id=partition_id, - api_version=api_version, - content_type=content_type, - json=_json, - restore_timeout=restore_timeout, - timeout=timeout, - template_url=self.restore_partition.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - restore_partition.metadata = {'url': "/Partitions/{partitionId}/$/Restore"} # type: ignore - - - @distributed_trace_async - async def get_partition_restore_progress( - self, - partition_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.RestoreProgressInfo": - """Gets details for the latest restore operation triggered for this partition. - - Returns information about the state of the latest restore operation along with details or - failure reason in case of completion. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RestoreProgressInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.RestoreProgressInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreProgressInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_restore_progress_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_partition_restore_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RestoreProgressInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_restore_progress.metadata = {'url': "/Partitions/{partitionId}/$/GetRestoreProgress"} # type: ignore - - - @distributed_trace_async - async def get_backups_from_backup_location( - self, - get_backup_by_storage_query_description: "_models.GetBackupByStorageQueryDescription", - timeout: Optional[int] = 60, - continuation_token_parameter: Optional[str] = None, - max_results: Optional[int] = 0, - **kwargs: Any - ) -> "_models.PagedBackupInfoList": - """Gets the list of backups available for the specified backed up entity at the specified backup - location. - - Gets the list of backups available for the specified backed up entity (Application, Service or - Partition) at the specified backup location (FileShare or Azure Blob Storage). - - :param get_backup_by_storage_query_description: Describes the filters and backup storage - details to be used for enumerating backups. - :type get_backup_by_storage_query_description: - ~azure.servicefabric.models.GetBackupByStorageQueryDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedBackupInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedBackupInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(get_backup_by_storage_query_description, 'GetBackupByStorageQueryDescription') - - request = build_get_backups_from_backup_location_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - template_url=self.get_backups_from_backup_location.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedBackupInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_backups_from_backup_location.metadata = {'url': "/BackupRestore/$/GetBackups"} # type: ignore - - - @distributed_trace_async - async def create_name( # pylint: disable=inconsistent-return-statements - self, - name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Creates a Service Fabric name. - - Creates the specified Service Fabric name. - - :param name: The Service Fabric name, including the 'fabric:' URI scheme. - :type name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _name_description = _models.NameDescription(name=name) - _json = self._serialize.body(_name_description, 'NameDescription') - - request = build_create_name_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.create_name.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - create_name.metadata = {'url': "/Names/$/Create"} # type: ignore - - - @distributed_trace_async - async def get_name_exists_info( # pylint: disable=inconsistent-return-statements - self, - name_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Returns whether the Service Fabric name exists. - - Returns whether the specified Service Fabric name exists. - - :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. - :type name_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_name_exists_info_request( - name_id=name_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_name_exists_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - get_name_exists_info.metadata = {'url': "/Names/{nameId}"} # type: ignore - - - @distributed_trace_async - async def delete_name( # pylint: disable=inconsistent-return-statements - self, - name_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Deletes a Service Fabric name. - - Deletes the specified Service Fabric name. A name must be created before it can be deleted. - Deleting a name with child properties will fail. - - :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. - :type name_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_name_request( - name_id=name_id, - api_version=api_version, - timeout=timeout, - template_url=self.delete_name.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete_name.metadata = {'url': "/Names/{nameId}"} # type: ignore - - - @distributed_trace_async - async def get_sub_name_info_list( - self, - name_id: str, - recursive: Optional[bool] = False, - continuation_token_parameter: Optional[str] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PagedSubNameInfoList": - """Enumerates all the Service Fabric names under a given name. - - Enumerates all the Service Fabric names under a given name. If the subnames do not fit in a - page, one page of results is returned as well as a continuation token, which can be used to get - the next page. Querying a name that doesn't exist will fail. - - :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. - :type name_id: str - :param recursive: Allows specifying that the search performed should be recursive. Default - value is False. - :type recursive: bool - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedSubNameInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedSubNameInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedSubNameInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_sub_name_info_list_request( - name_id=name_id, - api_version=api_version, - recursive=recursive, - continuation_token_parameter=continuation_token_parameter, - timeout=timeout, - template_url=self.get_sub_name_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedSubNameInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_sub_name_info_list.metadata = {'url': "/Names/{nameId}/$/GetSubNames"} # type: ignore - - - @distributed_trace_async - async def get_property_info_list( - self, - name_id: str, - include_values: Optional[bool] = False, - continuation_token_parameter: Optional[str] = None, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PagedPropertyInfoList": - """Gets information on all Service Fabric properties under a given name. - - A Service Fabric name can have one or more named properties that store custom information. This - operation gets the information about these properties in a paged list. The information includes - name, value, and metadata about each of the properties. - - :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. - :type name_id: str - :param include_values: Allows specifying whether to include the values of the properties - returned. True if values should be returned with the metadata; False to return only property - metadata. Default value is False. - :type include_values: bool - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedPropertyInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedPropertyInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedPropertyInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_property_info_list_request( - name_id=name_id, - api_version=api_version, - include_values=include_values, - continuation_token_parameter=continuation_token_parameter, - timeout=timeout, - template_url=self.get_property_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedPropertyInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_property_info_list.metadata = {'url': "/Names/{nameId}/$/GetProperties"} # type: ignore - - - @distributed_trace_async - async def put_property( # pylint: disable=inconsistent-return-statements - self, - name_id: str, - property_description: "_models.PropertyDescription", - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Creates or updates a Service Fabric property. - - Creates or updates the specified Service Fabric property under a given name. - - :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. - :type name_id: str - :param property_description: Describes the Service Fabric property to be created. - :type property_description: ~azure.servicefabric.models.PropertyDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(property_description, 'PropertyDescription') - - request = build_put_property_request( - name_id=name_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.put_property.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - put_property.metadata = {'url': "/Names/{nameId}/$/GetProperty"} # type: ignore - - - @distributed_trace_async - async def get_property_info( - self, - name_id: str, - property_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> "_models.PropertyInfo": - """Gets the specified Service Fabric property. - - Gets the specified Service Fabric property under a given name. This will always return both - value and metadata. - - :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. - :type name_id: str - :param property_name: Specifies the name of the property to get. - :type property_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PropertyInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PropertyInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PropertyInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_property_info_request( - name_id=name_id, - api_version=api_version, - property_name=property_name, - timeout=timeout, - template_url=self.get_property_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PropertyInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_property_info.metadata = {'url': "/Names/{nameId}/$/GetProperty"} # type: ignore - - - @distributed_trace_async - async def delete_property( # pylint: disable=inconsistent-return-statements - self, - name_id: str, - property_name: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> None: - """Deletes the specified Service Fabric property. - - Deletes the specified Service Fabric property under a given name. A property must be created - before it can be deleted. - - :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. - :type name_id: str - :param property_name: Specifies the name of the property to get. - :type property_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_property_request( - name_id=name_id, - api_version=api_version, - property_name=property_name, - timeout=timeout, - template_url=self.delete_property.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete_property.metadata = {'url': "/Names/{nameId}/$/GetProperty"} # type: ignore - - - @distributed_trace_async - async def submit_property_batch( - self, - name_id: str, - timeout: Optional[int] = 60, - operations: Optional[List["_models.PropertyBatchOperation"]] = None, - **kwargs: Any - ) -> Union["_models.SuccessfulPropertyBatchInfo", "_models.FailedPropertyBatchInfo"]: - """Submits a property batch. - - Submits a batch of property operations. Either all or none of the operations will be committed. - - :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. - :type name_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param operations: A list of the property batch operations to be executed. Default value is - None. - :type operations: list[~azure.servicefabric.models.PropertyBatchOperation] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SuccessfulPropertyBatchInfo or FailedPropertyBatchInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.SuccessfulPropertyBatchInfo or - ~azure.servicefabric.models.FailedPropertyBatchInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Union["_models.SuccessfulPropertyBatchInfo", "_models.FailedPropertyBatchInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _property_batch_description_list = _models.PropertyBatchDescriptionList(operations=operations) - _json = self._serialize.body(_property_batch_description_list, 'PropertyBatchDescriptionList') - - request = build_submit_property_batch_request( - name_id=name_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.submit_property_batch.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 409]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('SuccessfulPropertyBatchInfo', pipeline_response) - - if response.status_code == 409: - deserialized = self._deserialize('FailedPropertyBatchInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - submit_property_batch.metadata = {'url': "/Names/{nameId}/$/GetProperties/$/SubmitBatch"} # type: ignore - - - @distributed_trace_async - async def get_cluster_event_list( - self, - start_time_utc: str, - end_time_utc: str, - timeout: Optional[int] = 60, - events_types_filter: Optional[str] = None, - exclude_analysis_events: Optional[bool] = None, - skip_correlation_lookup: Optional[bool] = None, - **kwargs: Any - ) -> List["_models.ClusterEvent"]: - """Gets all Cluster-related events. - - The response is list of ClusterEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ClusterEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ClusterEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ClusterEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_cluster_event_list_request( - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_cluster_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ClusterEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_event_list.metadata = {'url': "/EventsStore/Cluster/Events"} # type: ignore - - - @distributed_trace_async - async def get_containers_event_list( - self, - start_time_utc: str, - end_time_utc: str, - timeout: Optional[int] = 60, - events_types_filter: Optional[str] = None, - exclude_analysis_events: Optional[bool] = None, - skip_correlation_lookup: Optional[bool] = None, - **kwargs: Any - ) -> List["_models.ContainerInstanceEvent"]: - """Gets all Containers-related events. - - The response is list of ContainerInstanceEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ContainerInstanceEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ContainerInstanceEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ContainerInstanceEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_containers_event_list_request( - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_containers_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ContainerInstanceEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_containers_event_list.metadata = {'url': "/EventsStore/Containers/Events"} # type: ignore - - - @distributed_trace_async - async def get_node_event_list( - self, - node_name: str, - start_time_utc: str, - end_time_utc: str, - timeout: Optional[int] = 60, - events_types_filter: Optional[str] = None, - exclude_analysis_events: Optional[bool] = None, - skip_correlation_lookup: Optional[bool] = None, - **kwargs: Any - ) -> List["_models.NodeEvent"]: - """Gets a Node-related events. - - The response is list of NodeEvent objects. - - :param node_name: The name of the node. - :type node_name: str - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of NodeEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.NodeEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NodeEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_node_event_list_request( - node_name=node_name, - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_node_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[NodeEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_node_event_list.metadata = {'url': "/EventsStore/Nodes/{nodeName}/$/Events"} # type: ignore - - - @distributed_trace_async - async def get_nodes_event_list( - self, - start_time_utc: str, - end_time_utc: str, - timeout: Optional[int] = 60, - events_types_filter: Optional[str] = None, - exclude_analysis_events: Optional[bool] = None, - skip_correlation_lookup: Optional[bool] = None, - **kwargs: Any - ) -> List["_models.NodeEvent"]: - """Gets all Nodes-related Events. - - The response is list of NodeEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of NodeEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.NodeEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NodeEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_nodes_event_list_request( - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_nodes_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[NodeEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_nodes_event_list.metadata = {'url': "/EventsStore/Nodes/Events"} # type: ignore - - - @distributed_trace_async - async def get_application_event_list( - self, - application_id: str, - start_time_utc: str, - end_time_utc: str, - timeout: Optional[int] = 60, - events_types_filter: Optional[str] = None, - exclude_analysis_events: Optional[bool] = None, - skip_correlation_lookup: Optional[bool] = None, - **kwargs: Any - ) -> List["_models.ApplicationEvent"]: - """Gets an Application-related events. - - The response is list of ApplicationEvent objects. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ApplicationEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ApplicationEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ApplicationEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_event_list_request( - application_id=application_id, - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_application_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ApplicationEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_event_list.metadata = {'url': "/EventsStore/Applications/{applicationId}/$/Events"} # type: ignore - - - @distributed_trace_async - async def get_applications_event_list( - self, - start_time_utc: str, - end_time_utc: str, - timeout: Optional[int] = 60, - events_types_filter: Optional[str] = None, - exclude_analysis_events: Optional[bool] = None, - skip_correlation_lookup: Optional[bool] = None, - **kwargs: Any - ) -> List["_models.ApplicationEvent"]: - """Gets all Applications-related events. - - The response is list of ApplicationEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ApplicationEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ApplicationEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ApplicationEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_applications_event_list_request( - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_applications_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ApplicationEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_applications_event_list.metadata = {'url': "/EventsStore/Applications/Events"} # type: ignore - - - @distributed_trace_async - async def get_service_event_list( - self, - service_id: str, - start_time_utc: str, - end_time_utc: str, - timeout: Optional[int] = 60, - events_types_filter: Optional[str] = None, - exclude_analysis_events: Optional[bool] = None, - skip_correlation_lookup: Optional[bool] = None, - **kwargs: Any - ) -> List["_models.ServiceEvent"]: - """Gets a Service-related events. - - The response is list of ServiceEvent objects. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ServiceEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ServiceEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ServiceEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_event_list_request( - service_id=service_id, - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_service_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ServiceEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_event_list.metadata = {'url': "/EventsStore/Services/{serviceId}/$/Events"} # type: ignore - - - @distributed_trace_async - async def get_services_event_list( - self, - start_time_utc: str, - end_time_utc: str, - timeout: Optional[int] = 60, - events_types_filter: Optional[str] = None, - exclude_analysis_events: Optional[bool] = None, - skip_correlation_lookup: Optional[bool] = None, - **kwargs: Any - ) -> List["_models.ServiceEvent"]: - """Gets all Services-related events. - - The response is list of ServiceEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ServiceEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ServiceEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ServiceEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_services_event_list_request( - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_services_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ServiceEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_services_event_list.metadata = {'url': "/EventsStore/Services/Events"} # type: ignore - - - @distributed_trace_async - async def get_partition_event_list( - self, - partition_id: str, - start_time_utc: str, - end_time_utc: str, - timeout: Optional[int] = 60, - events_types_filter: Optional[str] = None, - exclude_analysis_events: Optional[bool] = None, - skip_correlation_lookup: Optional[bool] = None, - **kwargs: Any - ) -> List["_models.PartitionEvent"]: - """Gets a Partition-related events. - - The response is list of PartitionEvent objects. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of PartitionEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.PartitionEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.PartitionEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_event_list_request( - partition_id=partition_id, - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_partition_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[PartitionEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_event_list.metadata = {'url': "/EventsStore/Partitions/{partitionId}/$/Events"} # type: ignore - - - @distributed_trace_async - async def get_partitions_event_list( - self, - start_time_utc: str, - end_time_utc: str, - timeout: Optional[int] = 60, - events_types_filter: Optional[str] = None, - exclude_analysis_events: Optional[bool] = None, - skip_correlation_lookup: Optional[bool] = None, - **kwargs: Any - ) -> List["_models.PartitionEvent"]: - """Gets all Partitions-related events. - - The response is list of PartitionEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of PartitionEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.PartitionEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.PartitionEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partitions_event_list_request( - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_partitions_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[PartitionEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partitions_event_list.metadata = {'url': "/EventsStore/Partitions/Events"} # type: ignore - - - @distributed_trace_async - async def get_partition_replica_event_list( - self, - partition_id: str, - replica_id: str, - start_time_utc: str, - end_time_utc: str, - timeout: Optional[int] = 60, - events_types_filter: Optional[str] = None, - exclude_analysis_events: Optional[bool] = None, - skip_correlation_lookup: Optional[bool] = None, - **kwargs: Any - ) -> List["_models.ReplicaEvent"]: - """Gets a Partition Replica-related events. - - The response is list of ReplicaEvent objects. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ReplicaEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ReplicaEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ReplicaEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_replica_event_list_request( - partition_id=partition_id, - replica_id=replica_id, - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_partition_replica_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ReplicaEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_replica_event_list.metadata = {'url': "/EventsStore/Partitions/{partitionId}/$/Replicas/{replicaId}/$/Events"} # type: ignore - - - @distributed_trace_async - async def get_partition_replicas_event_list( - self, - partition_id: str, - start_time_utc: str, - end_time_utc: str, - timeout: Optional[int] = 60, - events_types_filter: Optional[str] = None, - exclude_analysis_events: Optional[bool] = None, - skip_correlation_lookup: Optional[bool] = None, - **kwargs: Any - ) -> List["_models.ReplicaEvent"]: - """Gets all Replicas-related events for a Partition. - - The response is list of ReplicaEvent objects. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ReplicaEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ReplicaEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ReplicaEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_replicas_event_list_request( - partition_id=partition_id, - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_partition_replicas_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ReplicaEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_replicas_event_list.metadata = {'url': "/EventsStore/Partitions/{partitionId}/$/Replicas/Events"} # type: ignore - - - @distributed_trace_async - async def get_correlated_event_list( - self, - event_instance_id: str, - timeout: Optional[int] = 60, - **kwargs: Any - ) -> List["_models.FabricEvent"]: - """Gets all correlated events for a given event. - - The response is list of FabricEvents. - - :param event_instance_id: The EventInstanceId. - :type event_instance_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of FabricEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.FabricEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.FabricEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_correlated_event_list_request( - event_instance_id=event_instance_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_correlated_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[FabricEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_correlated_event_list.metadata = {'url': "/EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events"} # type: ignore - diff --git a/customSDK/servicefabric/models/__init__.py b/customSDK/servicefabric/models/__init__.py deleted file mode 100644 index d8971b0e..00000000 --- a/customSDK/servicefabric/models/__init__.py +++ /dev/null @@ -1,1826 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AadMetadata - from ._models_py3 import AadMetadataObject - from ._models_py3 import AddRemoveIncrementalNamedPartitionScalingMechanism - from ._models_py3 import AddRemoveReplicaScalingMechanism - from ._models_py3 import AnalysisEventMetadata - from ._models_py3 import ApplicationBackupConfigurationInfo - from ._models_py3 import ApplicationBackupEntity - from ._models_py3 import ApplicationCapacityDescription - from ._models_py3 import ApplicationContainerInstanceExitedEvent - from ._models_py3 import ApplicationCreatedEvent - from ._models_py3 import ApplicationDeletedEvent - from ._models_py3 import ApplicationDescription - from ._models_py3 import ApplicationEvent - from ._models_py3 import ApplicationHealth - from ._models_py3 import ApplicationHealthEvaluation - from ._models_py3 import ApplicationHealthPolicies - from ._models_py3 import ApplicationHealthPolicy - from ._models_py3 import ApplicationHealthPolicyMapItem - from ._models_py3 import ApplicationHealthPolicyMapObject - from ._models_py3 import ApplicationHealthReportExpiredEvent - from ._models_py3 import ApplicationHealthState - from ._models_py3 import ApplicationHealthStateChunk - from ._models_py3 import ApplicationHealthStateChunkList - from ._models_py3 import ApplicationHealthStateFilter - from ._models_py3 import ApplicationInfo - from ._models_py3 import ApplicationLoadInfo - from ._models_py3 import ApplicationLoadMetricInformation - from ._models_py3 import ApplicationMetadata - from ._models_py3 import ApplicationMetricDescription - from ._models_py3 import ApplicationNameInfo - from ._models_py3 import ApplicationNewHealthReportEvent - from ._models_py3 import ApplicationParameter - from ._models_py3 import ApplicationProcessExitedEvent - from ._models_py3 import ApplicationResourceDescription - from ._models_py3 import ApplicationResourceUpgradeProgressInfo - from ._models_py3 import ApplicationScopedVolume - from ._models_py3 import ApplicationScopedVolumeCreationParameters - from ._models_py3 import ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk - from ._models_py3 import ApplicationTypeApplicationsHealthEvaluation - from ._models_py3 import ApplicationTypeHealthPolicyMapItem - from ._models_py3 import ApplicationTypeImageStorePath - from ._models_py3 import ApplicationTypeInfo - from ._models_py3 import ApplicationTypeManifest - from ._models_py3 import ApplicationTypeMetadata - from ._models_py3 import ApplicationUpdateDescription - from ._models_py3 import ApplicationUpgradeCompletedEvent - from ._models_py3 import ApplicationUpgradeDescription - from ._models_py3 import ApplicationUpgradeDomainCompletedEvent - from ._models_py3 import ApplicationUpgradeProgressInfo - from ._models_py3 import ApplicationUpgradeRollbackCompletedEvent - from ._models_py3 import ApplicationUpgradeRollbackStartedEvent - from ._models_py3 import ApplicationUpgradeStartedEvent - from ._models_py3 import ApplicationUpgradeUpdateDescription - from ._models_py3 import ApplicationsHealthEvaluation - from ._models_py3 import ArmMetadata - from ._models_py3 import AutoScalingMechanism - from ._models_py3 import AutoScalingMetric - from ._models_py3 import AutoScalingPolicy - from ._models_py3 import AutoScalingResourceMetric - from ._models_py3 import AutoScalingTrigger - from ._models_py3 import AverageLoadScalingTrigger - from ._models_py3 import AveragePartitionLoadScalingTrigger - from ._models_py3 import AverageServiceLoadScalingTrigger - from ._models_py3 import AzureBlobBackupStorageDescription - from ._models_py3 import AzureInternalMonitoringPipelineSinkDescription - from ._models_py3 import BackupConfigurationInfo - from ._models_py3 import BackupEntity - from ._models_py3 import BackupInfo - from ._models_py3 import BackupPartitionDescription - from ._models_py3 import BackupPolicyDescription - from ._models_py3 import BackupProgressInfo - from ._models_py3 import BackupScheduleDescription - from ._models_py3 import BackupStorageDescription - from ._models_py3 import BackupSuspensionInfo - from ._models_py3 import BasicRetentionPolicyDescription - from ._models_py3 import BinaryPropertyValue - from ._models_py3 import Chaos - from ._models_py3 import ChaosCodePackageRestartScheduledEvent - from ._models_py3 import ChaosContext - from ._models_py3 import ChaosEvent - from ._models_py3 import ChaosEventWrapper - from ._models_py3 import ChaosEventsSegment - from ._models_py3 import ChaosNodeRestartScheduledEvent - from ._models_py3 import ChaosParameters - from ._models_py3 import ChaosParametersDictionaryItem - from ._models_py3 import ChaosPartitionPrimaryMoveScheduledEvent - from ._models_py3 import ChaosPartitionSecondaryMoveScheduledEvent - from ._models_py3 import ChaosReplicaRemovalScheduledEvent - from ._models_py3 import ChaosReplicaRestartScheduledEvent - from ._models_py3 import ChaosSchedule - from ._models_py3 import ChaosScheduleDescription - from ._models_py3 import ChaosScheduleJob - from ._models_py3 import ChaosScheduleJobActiveDaysOfWeek - from ._models_py3 import ChaosStartedEvent - from ._models_py3 import ChaosStoppedEvent - from ._models_py3 import ChaosTargetFilter - from ._models_py3 import CheckExistsPropertyBatchOperation - from ._models_py3 import CheckSequencePropertyBatchOperation - from ._models_py3 import CheckValuePropertyBatchOperation - from ._models_py3 import ClusterConfiguration - from ._models_py3 import ClusterConfigurationUpgradeDescription - from ._models_py3 import ClusterConfigurationUpgradeStatusInfo - from ._models_py3 import ClusterEvent - from ._models_py3 import ClusterHealth - from ._models_py3 import ClusterHealthChunk - from ._models_py3 import ClusterHealthChunkQueryDescription - from ._models_py3 import ClusterHealthPolicies - from ._models_py3 import ClusterHealthPolicy - from ._models_py3 import ClusterHealthReportExpiredEvent - from ._models_py3 import ClusterLoadInfo - from ._models_py3 import ClusterManifest - from ._models_py3 import ClusterNewHealthReportEvent - from ._models_py3 import ClusterUpgradeCompletedEvent - from ._models_py3 import ClusterUpgradeDescriptionObject - from ._models_py3 import ClusterUpgradeDomainCompletedEvent - from ._models_py3 import ClusterUpgradeHealthPolicyObject - from ._models_py3 import ClusterUpgradeProgressObject - from ._models_py3 import ClusterUpgradeRollbackCompletedEvent - from ._models_py3 import ClusterUpgradeRollbackStartedEvent - from ._models_py3 import ClusterUpgradeStartedEvent - from ._models_py3 import ClusterVersion - from ._models_py3 import CodePackageEntryPoint - from ._models_py3 import CodePackageEntryPointStatistics - from ._models_py3 import ComposeDeploymentStatusInfo - from ._models_py3 import ComposeDeploymentUpgradeDescription - from ._models_py3 import ComposeDeploymentUpgradeProgressInfo - from ._models_py3 import ConfigParameterOverride - from ._models_py3 import ContainerApiRequestBody - from ._models_py3 import ContainerApiResponse - from ._models_py3 import ContainerApiResult - from ._models_py3 import ContainerCodePackageProperties - from ._models_py3 import ContainerEvent - from ._models_py3 import ContainerInstanceEvent - from ._models_py3 import ContainerInstanceView - from ._models_py3 import ContainerLabel - from ._models_py3 import ContainerLogs - from ._models_py3 import ContainerState - from ._models_py3 import CreateComposeDeploymentDescription - from ._models_py3 import CurrentUpgradeDomainProgressInfo - from ._models_py3 import CurrentUpgradeUnitsProgressInfo - from ._models_py3 import DeactivationIntentDescription - from ._models_py3 import DefaultExecutionPolicy - from ._models_py3 import DeletePropertyBatchOperation - from ._models_py3 import DeltaNodesCheckHealthEvaluation - from ._models_py3 import DeployServicePackageToNodeDescription - from ._models_py3 import DeployedApplicationHealth - from ._models_py3 import DeployedApplicationHealthEvaluation - from ._models_py3 import DeployedApplicationHealthReportExpiredEvent - from ._models_py3 import DeployedApplicationHealthState - from ._models_py3 import DeployedApplicationHealthStateChunk - from ._models_py3 import DeployedApplicationHealthStateChunkList - from ._models_py3 import DeployedApplicationHealthStateFilter - from ._models_py3 import DeployedApplicationInfo - from ._models_py3 import DeployedApplicationNewHealthReportEvent - from ._models_py3 import DeployedApplicationsHealthEvaluation - from ._models_py3 import DeployedCodePackageInfo - from ._models_py3 import DeployedServicePackageHealth - from ._models_py3 import DeployedServicePackageHealthEvaluation - from ._models_py3 import DeployedServicePackageHealthReportExpiredEvent - from ._models_py3 import DeployedServicePackageHealthState - from ._models_py3 import DeployedServicePackageHealthStateChunk - from ._models_py3 import DeployedServicePackageHealthStateChunkList - from ._models_py3 import DeployedServicePackageHealthStateFilter - from ._models_py3 import DeployedServicePackageInfo - from ._models_py3 import DeployedServicePackageNewHealthReportEvent - from ._models_py3 import DeployedServicePackagesHealthEvaluation - from ._models_py3 import DeployedServiceReplicaDetailInfo - from ._models_py3 import DeployedServiceReplicaInfo - from ._models_py3 import DeployedServiceTypeInfo - from ._models_py3 import DeployedStatefulServiceReplicaDetailInfo - from ._models_py3 import DeployedStatefulServiceReplicaInfo - from ._models_py3 import DeployedStatelessServiceInstanceDetailInfo - from ._models_py3 import DeployedStatelessServiceInstanceInfo - from ._models_py3 import DiagnosticsDescription - from ._models_py3 import DiagnosticsRef - from ._models_py3 import DiagnosticsSinkProperties - from ._models_py3 import DisableBackupDescription - from ._models_py3 import DiskInfo - from ._models_py3 import DoublePropertyValue - from ._models_py3 import DsmsAzureBlobBackupStorageDescription - from ._models_py3 import EnableBackupDescription - from ._models_py3 import EndpointProperties - from ._models_py3 import EndpointRef - from ._models_py3 import EnsureAvailabilitySafetyCheck - from ._models_py3 import EnsurePartitionQuorumSafetyCheck - from ._models_py3 import EntityHealth - from ._models_py3 import EntityHealthState - from ._models_py3 import EntityHealthStateChunk - from ._models_py3 import EntityHealthStateChunkList - from ._models_py3 import EntityKindHealthStateCount - from ._models_py3 import EnvironmentVariable - from ._models_py3 import Epoch - from ._models_py3 import EventHealthEvaluation - from ._models_py3 import ExecutingFaultsChaosEvent - from ._models_py3 import ExecutionPolicy - from ._models_py3 import ExternalStoreProvisionApplicationTypeDescription - from ._models_py3 import FabricCodeVersionInfo - from ._models_py3 import FabricConfigVersionInfo - from ._models_py3 import FabricError - from ._models_py3 import FabricErrorError - from ._models_py3 import FabricEvent - from ._models_py3 import FailedPropertyBatchInfo - from ._models_py3 import FailedUpgradeDomainProgressObject - from ._models_py3 import FailureUpgradeDomainProgressInfo - from ._models_py3 import FileInfo - from ._models_py3 import FileShareBackupStorageDescription - from ._models_py3 import FileVersion - from ._models_py3 import FolderInfo - from ._models_py3 import FolderSizeInfo - from ._models_py3 import FrequencyBasedBackupScheduleDescription - from ._models_py3 import GatewayDestination - from ._models_py3 import GatewayResourceDescription - from ._models_py3 import GetBackupByStorageQueryDescription - from ._models_py3 import GetPropertyBatchOperation - from ._models_py3 import GuidPropertyValue - from ._models_py3 import HealthEvaluation - from ._models_py3 import HealthEvaluationWrapper - from ._models_py3 import HealthEvent - from ._models_py3 import HealthInformation - from ._models_py3 import HealthStateCount - from ._models_py3 import HealthStatistics - from ._models_py3 import HttpConfig - from ._models_py3 import HttpHostConfig - from ._models_py3 import HttpRouteConfig - from ._models_py3 import HttpRouteMatchHeader - from ._models_py3 import HttpRouteMatchPath - from ._models_py3 import HttpRouteMatchRule - from ._models_py3 import IdentityDescription - from ._models_py3 import IdentityItemDescription - from ._models_py3 import ImageRegistryCredential - from ._models_py3 import ImageStoreContent - from ._models_py3 import ImageStoreCopyDescription - from ._models_py3 import ImageStoreInfo - from ._models_py3 import InlinedValueSecretResourceProperties - from ._models_py3 import InstanceLifecycleDescription - from ._models_py3 import Int64PropertyValue - from ._models_py3 import Int64RangePartitionInformation - from ._models_py3 import InvokeDataLossResult - from ._models_py3 import InvokeQuorumLossResult - from ._models_py3 import KeyValueStoreReplicaStatus - from ._models_py3 import LoadMetricInformation - from ._models_py3 import LoadMetricReport - from ._models_py3 import LoadMetricReportInfo - from ._models_py3 import LoadedPartitionInformationQueryDescription - from ._models_py3 import LoadedPartitionInformationResult - from ._models_py3 import LoadedPartitionInformationResultList - from ._models_py3 import LocalNetworkResourceProperties - from ._models_py3 import ManagedApplicationIdentity - from ._models_py3 import ManagedApplicationIdentityDescription - from ._models_py3 import ManagedIdentityAzureBlobBackupStorageDescription - from ._models_py3 import MetricLoadDescription - from ._models_py3 import MonitoringPolicyDescription - from ._models_py3 import NameDescription - from ._models_py3 import NamedPartitionInformation - from ._models_py3 import NamedPartitionSchemeDescription - from ._models_py3 import NetworkRef - from ._models_py3 import NetworkResourceDescription - from ._models_py3 import NetworkResourceProperties - from ._models_py3 import NetworkResourcePropertiesBase - from ._models_py3 import NodeAbortedEvent - from ._models_py3 import NodeAddedToClusterEvent - from ._models_py3 import NodeClosedEvent - from ._models_py3 import NodeDeactivateCompletedEvent - from ._models_py3 import NodeDeactivateStartedEvent - from ._models_py3 import NodeDeactivationInfo - from ._models_py3 import NodeDeactivationTask - from ._models_py3 import NodeDeactivationTaskId - from ._models_py3 import NodeDownEvent - from ._models_py3 import NodeEvent - from ._models_py3 import NodeHealth - from ._models_py3 import NodeHealthEvaluation - from ._models_py3 import NodeHealthReportExpiredEvent - from ._models_py3 import NodeHealthState - from ._models_py3 import NodeHealthStateChunk - from ._models_py3 import NodeHealthStateChunkList - from ._models_py3 import NodeHealthStateFilter - from ._models_py3 import NodeId - from ._models_py3 import NodeImpact - from ._models_py3 import NodeInfo - from ._models_py3 import NodeLoadInfo - from ._models_py3 import NodeLoadMetricInformation - from ._models_py3 import NodeNewHealthReportEvent - from ._models_py3 import NodeOpenFailedEvent - from ._models_py3 import NodeOpenSucceededEvent - from ._models_py3 import NodeRemovedFromClusterEvent - from ._models_py3 import NodeRepairImpactDescription - from ._models_py3 import NodeRepairTargetDescription - from ._models_py3 import NodeResult - from ._models_py3 import NodeTagsDescription - from ._models_py3 import NodeTransitionProgress - from ._models_py3 import NodeTransitionResult - from ._models_py3 import NodeTypeHealthPolicyMapItem - from ._models_py3 import NodeTypeNodesHealthEvaluation - from ._models_py3 import NodeUpEvent - from ._models_py3 import NodeUpgradeProgressInfo - from ._models_py3 import NodesHealthEvaluation - from ._models_py3 import OperationStatus - from ._models_py3 import PackageSharingPolicyInfo - from ._models_py3 import PagedApplicationInfoList - from ._models_py3 import PagedApplicationResourceDescriptionList - from ._models_py3 import PagedApplicationTypeInfoList - from ._models_py3 import PagedBackupConfigurationInfoList - from ._models_py3 import PagedBackupEntityList - from ._models_py3 import PagedBackupInfoList - from ._models_py3 import PagedBackupPolicyDescriptionList - from ._models_py3 import PagedComposeDeploymentStatusInfoList - from ._models_py3 import PagedDeployedApplicationInfoList - from ._models_py3 import PagedGatewayResourceDescriptionList - from ._models_py3 import PagedNetworkResourceDescriptionList - from ._models_py3 import PagedNodeInfoList - from ._models_py3 import PagedPropertyInfoList - from ._models_py3 import PagedReplicaInfoList - from ._models_py3 import PagedSecretResourceDescriptionList - from ._models_py3 import PagedSecretValueResourceDescriptionList - from ._models_py3 import PagedServiceInfoList - from ._models_py3 import PagedServicePartitionInfoList - from ._models_py3 import PagedServiceReplicaDescriptionList - from ._models_py3 import PagedServiceResourceDescriptionList - from ._models_py3 import PagedSubNameInfoList - from ._models_py3 import PagedUpdatePartitionLoadResultList - from ._models_py3 import PagedVolumeResourceDescriptionList - from ._models_py3 import PartitionAnalysisEvent - from ._models_py3 import PartitionBackupConfigurationInfo - from ._models_py3 import PartitionBackupEntity - from ._models_py3 import PartitionDataLossProgress - from ._models_py3 import PartitionEvent - from ._models_py3 import PartitionHealth - from ._models_py3 import PartitionHealthEvaluation - from ._models_py3 import PartitionHealthReportExpiredEvent - from ._models_py3 import PartitionHealthState - from ._models_py3 import PartitionHealthStateChunk - from ._models_py3 import PartitionHealthStateChunkList - from ._models_py3 import PartitionHealthStateFilter - from ._models_py3 import PartitionInformation - from ._models_py3 import PartitionInstanceCountScaleMechanism - from ._models_py3 import PartitionLoadInformation - from ._models_py3 import PartitionMetricLoadDescription - from ._models_py3 import PartitionNewHealthReportEvent - from ._models_py3 import PartitionPrimaryMoveAnalysisEvent - from ._models_py3 import PartitionQuorumLossProgress - from ._models_py3 import PartitionReconfiguredEvent - from ._models_py3 import PartitionRestartProgress - from ._models_py3 import PartitionSafetyCheck - from ._models_py3 import PartitionSchemeDescription - from ._models_py3 import PartitionsHealthEvaluation - from ._models_py3 import PrimaryReplicatorStatus - from ._models_py3 import Probe - from ._models_py3 import ProbeExec - from ._models_py3 import ProbeHttpGet - from ._models_py3 import ProbeHttpGetHeaders - from ._models_py3 import ProbeTcpSocket - from ._models_py3 import PropertyBatchDescriptionList - from ._models_py3 import PropertyBatchInfo - from ._models_py3 import PropertyBatchOperation - from ._models_py3 import PropertyDescription - from ._models_py3 import PropertyInfo - from ._models_py3 import PropertyMetadata - from ._models_py3 import PropertyValue - from ._models_py3 import ProvisionApplicationTypeDescription - from ._models_py3 import ProvisionApplicationTypeDescriptionBase - from ._models_py3 import ProvisionFabricDescription - from ._models_py3 import PutPropertyBatchOperation - from ._models_py3 import ReconfigurationInformation - from ._models_py3 import RegistryCredential - from ._models_py3 import ReliableCollectionsRef - from ._models_py3 import RemoteReplicatorAcknowledgementDetail - from ._models_py3 import RemoteReplicatorAcknowledgementStatus - from ._models_py3 import RemoteReplicatorStatus - from ._models_py3 import RepairImpactDescriptionBase - from ._models_py3 import RepairTargetDescriptionBase - from ._models_py3 import RepairTask - from ._models_py3 import RepairTaskApproveDescription - from ._models_py3 import RepairTaskCancelDescription - from ._models_py3 import RepairTaskDeleteDescription - from ._models_py3 import RepairTaskHistory - from ._models_py3 import RepairTaskUpdateHealthPolicyDescription - from ._models_py3 import RepairTaskUpdateInfo - from ._models_py3 import ReplicaEvent - from ._models_py3 import ReplicaHealth - from ._models_py3 import ReplicaHealthEvaluation - from ._models_py3 import ReplicaHealthState - from ._models_py3 import ReplicaHealthStateChunk - from ._models_py3 import ReplicaHealthStateChunkList - from ._models_py3 import ReplicaHealthStateFilter - from ._models_py3 import ReplicaInfo - from ._models_py3 import ReplicaLifecycleDescription - from ._models_py3 import ReplicaMetricLoadDescription - from ._models_py3 import ReplicaStatusBase - from ._models_py3 import ReplicasHealthEvaluation - from ._models_py3 import ReplicatorQueueStatus - from ._models_py3 import ReplicatorStatus - from ._models_py3 import ResolvedServiceEndpoint - from ._models_py3 import ResolvedServicePartition - from ._models_py3 import ResourceLimits - from ._models_py3 import ResourceRequests - from ._models_py3 import ResourceRequirements - from ._models_py3 import RestartDeployedCodePackageDescription - from ._models_py3 import RestartNodeDescription - from ._models_py3 import RestartPartitionResult - from ._models_py3 import RestorePartitionDescription - from ._models_py3 import RestoreProgressInfo - from ._models_py3 import ResumeApplicationUpgradeDescription - from ._models_py3 import ResumeClusterUpgradeDescription - from ._models_py3 import RetentionPolicyDescription - from ._models_py3 import RollingUpgradeUpdateDescription - from ._models_py3 import RunToCompletionExecutionPolicy - from ._models_py3 import SafetyCheck - from ._models_py3 import SafetyCheckWrapper - from ._models_py3 import ScalingMechanismDescription - from ._models_py3 import ScalingPolicyDescription - from ._models_py3 import ScalingTriggerDescription - from ._models_py3 import SecondaryActiveReplicatorStatus - from ._models_py3 import SecondaryIdleReplicatorStatus - from ._models_py3 import SecondaryReplicatorStatus - from ._models_py3 import SecretResourceDescription - from ._models_py3 import SecretResourceProperties - from ._models_py3 import SecretResourcePropertiesBase - from ._models_py3 import SecretValue - from ._models_py3 import SecretValueProperties - from ._models_py3 import SecretValueResourceDescription - from ._models_py3 import SecretValueResourceProperties - from ._models_py3 import SeedNodeSafetyCheck - from ._models_py3 import SelectedPartition - from ._models_py3 import ServiceBackupConfigurationInfo - from ._models_py3 import ServiceBackupEntity - from ._models_py3 import ServiceCorrelationDescription - from ._models_py3 import ServiceCreatedEvent - from ._models_py3 import ServiceDeletedEvent - from ._models_py3 import ServiceDescription - from ._models_py3 import ServiceEvent - from ._models_py3 import ServiceFromTemplateDescription - from ._models_py3 import ServiceHealth - from ._models_py3 import ServiceHealthEvaluation - from ._models_py3 import ServiceHealthReportExpiredEvent - from ._models_py3 import ServiceHealthState - from ._models_py3 import ServiceHealthStateChunk - from ._models_py3 import ServiceHealthStateChunkList - from ._models_py3 import ServiceHealthStateFilter - from ._models_py3 import ServiceIdentity - from ._models_py3 import ServiceInfo - from ._models_py3 import ServiceLoadMetricDescription - from ._models_py3 import ServiceNameInfo - from ._models_py3 import ServiceNewHealthReportEvent - from ._models_py3 import ServicePartitionInfo - from ._models_py3 import ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription - from ._models_py3 import ServicePlacementInvalidDomainPolicyDescription - from ._models_py3 import ServicePlacementNonPartiallyPlaceServicePolicyDescription - from ._models_py3 import ServicePlacementPolicyDescription - from ._models_py3 import ServicePlacementPreferPrimaryDomainPolicyDescription - from ._models_py3 import ServicePlacementRequireDomainDistributionPolicyDescription - from ._models_py3 import ServicePlacementRequiredDomainPolicyDescription - from ._models_py3 import ServiceProperties - from ._models_py3 import ServiceReplicaDescription - from ._models_py3 import ServiceReplicaProperties - from ._models_py3 import ServiceResourceDescription - from ._models_py3 import ServiceResourceProperties - from ._models_py3 import ServiceTypeDescription - from ._models_py3 import ServiceTypeExtensionDescription - from ._models_py3 import ServiceTypeHealthPolicy - from ._models_py3 import ServiceTypeHealthPolicyMapItem - from ._models_py3 import ServiceTypeInfo - from ._models_py3 import ServiceTypeManifest - from ._models_py3 import ServiceUpdateDescription - from ._models_py3 import ServiceUpgradeProgress - from ._models_py3 import ServicesHealthEvaluation - from ._models_py3 import Setting - from ._models_py3 import SingletonPartitionInformation - from ._models_py3 import SingletonPartitionSchemeDescription - from ._models_py3 import StartClusterUpgradeDescription - from ._models_py3 import StartedChaosEvent - from ._models_py3 import StatefulReplicaHealthReportExpiredEvent - from ._models_py3 import StatefulReplicaNewHealthReportEvent - from ._models_py3 import StatefulServiceDescription - from ._models_py3 import StatefulServiceInfo - from ._models_py3 import StatefulServicePartitionInfo - from ._models_py3 import StatefulServiceReplicaHealth - from ._models_py3 import StatefulServiceReplicaHealthState - from ._models_py3 import StatefulServiceReplicaInfo - from ._models_py3 import StatefulServiceTypeDescription - from ._models_py3 import StatefulServiceUpdateDescription - from ._models_py3 import StatelessReplicaHealthReportExpiredEvent - from ._models_py3 import StatelessReplicaNewHealthReportEvent - from ._models_py3 import StatelessServiceDescription - from ._models_py3 import StatelessServiceInfo - from ._models_py3 import StatelessServiceInstanceHealth - from ._models_py3 import StatelessServiceInstanceHealthState - from ._models_py3 import StatelessServiceInstanceInfo - from ._models_py3 import StatelessServicePartitionInfo - from ._models_py3 import StatelessServiceTypeDescription - from ._models_py3 import StatelessServiceUpdateDescription - from ._models_py3 import StoppedChaosEvent - from ._models_py3 import StringPropertyValue - from ._models_py3 import SuccessfulPropertyBatchInfo - from ._models_py3 import SystemApplicationHealthEvaluation - from ._models_py3 import TcpConfig - from ._models_py3 import TestErrorChaosEvent - from ._models_py3 import TimeBasedBackupScheduleDescription - from ._models_py3 import TimeOfDay - from ._models_py3 import TimeRange - from ._models_py3 import UniformInt64RangePartitionSchemeDescription - from ._models_py3 import UnplacedReplicaInformation - from ._models_py3 import UnprovisionApplicationTypeDescriptionInfo - from ._models_py3 import UnprovisionFabricDescription - from ._models_py3 import UpdateClusterUpgradeDescription - from ._models_py3 import UpdatePartitionLoadResult - from ._models_py3 import UpgradeDomainDeltaNodesCheckHealthEvaluation - from ._models_py3 import UpgradeDomainDeployedApplicationsHealthEvaluation - from ._models_py3 import UpgradeDomainInfo - from ._models_py3 import UpgradeDomainNodesHealthEvaluation - from ._models_py3 import UpgradeOrchestrationServiceState - from ._models_py3 import UpgradeOrchestrationServiceStateSummary - from ._models_py3 import UpgradeUnitInfo - from ._models_py3 import UploadChunkRange - from ._models_py3 import UploadSession - from ._models_py3 import UploadSessionInfo - from ._models_py3 import UsageInfo - from ._models_py3 import ValidateClusterUpgradeResult - from ._models_py3 import ValidationFailedChaosEvent - from ._models_py3 import VolumeProviderParametersAzureFile - from ._models_py3 import VolumeReference - from ._models_py3 import VolumeResourceDescription - from ._models_py3 import WaitForInbuildReplicaSafetyCheck - from ._models_py3 import WaitForPrimaryPlacementSafetyCheck - from ._models_py3 import WaitForPrimarySwapSafetyCheck - from ._models_py3 import WaitForReconfigurationSafetyCheck - from ._models_py3 import WaitingChaosEvent -except (SyntaxError, ImportError): - from ._models import AadMetadata # type: ignore - from ._models import AadMetadataObject # type: ignore - from ._models import AddRemoveIncrementalNamedPartitionScalingMechanism # type: ignore - from ._models import AddRemoveReplicaScalingMechanism # type: ignore - from ._models import AnalysisEventMetadata # type: ignore - from ._models import ApplicationBackupConfigurationInfo # type: ignore - from ._models import ApplicationBackupEntity # type: ignore - from ._models import ApplicationCapacityDescription # type: ignore - from ._models import ApplicationContainerInstanceExitedEvent # type: ignore - from ._models import ApplicationCreatedEvent # type: ignore - from ._models import ApplicationDeletedEvent # type: ignore - from ._models import ApplicationDescription # type: ignore - from ._models import ApplicationEvent # type: ignore - from ._models import ApplicationHealth # type: ignore - from ._models import ApplicationHealthEvaluation # type: ignore - from ._models import ApplicationHealthPolicies # type: ignore - from ._models import ApplicationHealthPolicy # type: ignore - from ._models import ApplicationHealthPolicyMapItem # type: ignore - from ._models import ApplicationHealthPolicyMapObject # type: ignore - from ._models import ApplicationHealthReportExpiredEvent # type: ignore - from ._models import ApplicationHealthState # type: ignore - from ._models import ApplicationHealthStateChunk # type: ignore - from ._models import ApplicationHealthStateChunkList # type: ignore - from ._models import ApplicationHealthStateFilter # type: ignore - from ._models import ApplicationInfo # type: ignore - from ._models import ApplicationLoadInfo # type: ignore - from ._models import ApplicationLoadMetricInformation # type: ignore - from ._models import ApplicationMetadata # type: ignore - from ._models import ApplicationMetricDescription # type: ignore - from ._models import ApplicationNameInfo # type: ignore - from ._models import ApplicationNewHealthReportEvent # type: ignore - from ._models import ApplicationParameter # type: ignore - from ._models import ApplicationProcessExitedEvent # type: ignore - from ._models import ApplicationResourceDescription # type: ignore - from ._models import ApplicationResourceUpgradeProgressInfo # type: ignore - from ._models import ApplicationScopedVolume # type: ignore - from ._models import ApplicationScopedVolumeCreationParameters # type: ignore - from ._models import ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk # type: ignore - from ._models import ApplicationTypeApplicationsHealthEvaluation # type: ignore - from ._models import ApplicationTypeHealthPolicyMapItem # type: ignore - from ._models import ApplicationTypeImageStorePath # type: ignore - from ._models import ApplicationTypeInfo # type: ignore - from ._models import ApplicationTypeManifest # type: ignore - from ._models import ApplicationTypeMetadata # type: ignore - from ._models import ApplicationUpdateDescription # type: ignore - from ._models import ApplicationUpgradeCompletedEvent # type: ignore - from ._models import ApplicationUpgradeDescription # type: ignore - from ._models import ApplicationUpgradeDomainCompletedEvent # type: ignore - from ._models import ApplicationUpgradeProgressInfo # type: ignore - from ._models import ApplicationUpgradeRollbackCompletedEvent # type: ignore - from ._models import ApplicationUpgradeRollbackStartedEvent # type: ignore - from ._models import ApplicationUpgradeStartedEvent # type: ignore - from ._models import ApplicationUpgradeUpdateDescription # type: ignore - from ._models import ApplicationsHealthEvaluation # type: ignore - from ._models import ArmMetadata # type: ignore - from ._models import AutoScalingMechanism # type: ignore - from ._models import AutoScalingMetric # type: ignore - from ._models import AutoScalingPolicy # type: ignore - from ._models import AutoScalingResourceMetric # type: ignore - from ._models import AutoScalingTrigger # type: ignore - from ._models import AverageLoadScalingTrigger # type: ignore - from ._models import AveragePartitionLoadScalingTrigger # type: ignore - from ._models import AverageServiceLoadScalingTrigger # type: ignore - from ._models import AzureBlobBackupStorageDescription # type: ignore - from ._models import AzureInternalMonitoringPipelineSinkDescription # type: ignore - from ._models import BackupConfigurationInfo # type: ignore - from ._models import BackupEntity # type: ignore - from ._models import BackupInfo # type: ignore - from ._models import BackupPartitionDescription # type: ignore - from ._models import BackupPolicyDescription # type: ignore - from ._models import BackupProgressInfo # type: ignore - from ._models import BackupScheduleDescription # type: ignore - from ._models import BackupStorageDescription # type: ignore - from ._models import BackupSuspensionInfo # type: ignore - from ._models import BasicRetentionPolicyDescription # type: ignore - from ._models import BinaryPropertyValue # type: ignore - from ._models import Chaos # type: ignore - from ._models import ChaosCodePackageRestartScheduledEvent # type: ignore - from ._models import ChaosContext # type: ignore - from ._models import ChaosEvent # type: ignore - from ._models import ChaosEventWrapper # type: ignore - from ._models import ChaosEventsSegment # type: ignore - from ._models import ChaosNodeRestartScheduledEvent # type: ignore - from ._models import ChaosParameters # type: ignore - from ._models import ChaosParametersDictionaryItem # type: ignore - from ._models import ChaosPartitionPrimaryMoveScheduledEvent # type: ignore - from ._models import ChaosPartitionSecondaryMoveScheduledEvent # type: ignore - from ._models import ChaosReplicaRemovalScheduledEvent # type: ignore - from ._models import ChaosReplicaRestartScheduledEvent # type: ignore - from ._models import ChaosSchedule # type: ignore - from ._models import ChaosScheduleDescription # type: ignore - from ._models import ChaosScheduleJob # type: ignore - from ._models import ChaosScheduleJobActiveDaysOfWeek # type: ignore - from ._models import ChaosStartedEvent # type: ignore - from ._models import ChaosStoppedEvent # type: ignore - from ._models import ChaosTargetFilter # type: ignore - from ._models import CheckExistsPropertyBatchOperation # type: ignore - from ._models import CheckSequencePropertyBatchOperation # type: ignore - from ._models import CheckValuePropertyBatchOperation # type: ignore - from ._models import ClusterConfiguration # type: ignore - from ._models import ClusterConfigurationUpgradeDescription # type: ignore - from ._models import ClusterConfigurationUpgradeStatusInfo # type: ignore - from ._models import ClusterEvent # type: ignore - from ._models import ClusterHealth # type: ignore - from ._models import ClusterHealthChunk # type: ignore - from ._models import ClusterHealthChunkQueryDescription # type: ignore - from ._models import ClusterHealthPolicies # type: ignore - from ._models import ClusterHealthPolicy # type: ignore - from ._models import ClusterHealthReportExpiredEvent # type: ignore - from ._models import ClusterLoadInfo # type: ignore - from ._models import ClusterManifest # type: ignore - from ._models import ClusterNewHealthReportEvent # type: ignore - from ._models import ClusterUpgradeCompletedEvent # type: ignore - from ._models import ClusterUpgradeDescriptionObject # type: ignore - from ._models import ClusterUpgradeDomainCompletedEvent # type: ignore - from ._models import ClusterUpgradeHealthPolicyObject # type: ignore - from ._models import ClusterUpgradeProgressObject # type: ignore - from ._models import ClusterUpgradeRollbackCompletedEvent # type: ignore - from ._models import ClusterUpgradeRollbackStartedEvent # type: ignore - from ._models import ClusterUpgradeStartedEvent # type: ignore - from ._models import ClusterVersion # type: ignore - from ._models import CodePackageEntryPoint # type: ignore - from ._models import CodePackageEntryPointStatistics # type: ignore - from ._models import ComposeDeploymentStatusInfo # type: ignore - from ._models import ComposeDeploymentUpgradeDescription # type: ignore - from ._models import ComposeDeploymentUpgradeProgressInfo # type: ignore - from ._models import ConfigParameterOverride # type: ignore - from ._models import ContainerApiRequestBody # type: ignore - from ._models import ContainerApiResponse # type: ignore - from ._models import ContainerApiResult # type: ignore - from ._models import ContainerCodePackageProperties # type: ignore - from ._models import ContainerEvent # type: ignore - from ._models import ContainerInstanceEvent # type: ignore - from ._models import ContainerInstanceView # type: ignore - from ._models import ContainerLabel # type: ignore - from ._models import ContainerLogs # type: ignore - from ._models import ContainerState # type: ignore - from ._models import CreateComposeDeploymentDescription # type: ignore - from ._models import CurrentUpgradeDomainProgressInfo # type: ignore - from ._models import CurrentUpgradeUnitsProgressInfo # type: ignore - from ._models import DeactivationIntentDescription # type: ignore - from ._models import DefaultExecutionPolicy # type: ignore - from ._models import DeletePropertyBatchOperation # type: ignore - from ._models import DeltaNodesCheckHealthEvaluation # type: ignore - from ._models import DeployServicePackageToNodeDescription # type: ignore - from ._models import DeployedApplicationHealth # type: ignore - from ._models import DeployedApplicationHealthEvaluation # type: ignore - from ._models import DeployedApplicationHealthReportExpiredEvent # type: ignore - from ._models import DeployedApplicationHealthState # type: ignore - from ._models import DeployedApplicationHealthStateChunk # type: ignore - from ._models import DeployedApplicationHealthStateChunkList # type: ignore - from ._models import DeployedApplicationHealthStateFilter # type: ignore - from ._models import DeployedApplicationInfo # type: ignore - from ._models import DeployedApplicationNewHealthReportEvent # type: ignore - from ._models import DeployedApplicationsHealthEvaluation # type: ignore - from ._models import DeployedCodePackageInfo # type: ignore - from ._models import DeployedServicePackageHealth # type: ignore - from ._models import DeployedServicePackageHealthEvaluation # type: ignore - from ._models import DeployedServicePackageHealthReportExpiredEvent # type: ignore - from ._models import DeployedServicePackageHealthState # type: ignore - from ._models import DeployedServicePackageHealthStateChunk # type: ignore - from ._models import DeployedServicePackageHealthStateChunkList # type: ignore - from ._models import DeployedServicePackageHealthStateFilter # type: ignore - from ._models import DeployedServicePackageInfo # type: ignore - from ._models import DeployedServicePackageNewHealthReportEvent # type: ignore - from ._models import DeployedServicePackagesHealthEvaluation # type: ignore - from ._models import DeployedServiceReplicaDetailInfo # type: ignore - from ._models import DeployedServiceReplicaInfo # type: ignore - from ._models import DeployedServiceTypeInfo # type: ignore - from ._models import DeployedStatefulServiceReplicaDetailInfo # type: ignore - from ._models import DeployedStatefulServiceReplicaInfo # type: ignore - from ._models import DeployedStatelessServiceInstanceDetailInfo # type: ignore - from ._models import DeployedStatelessServiceInstanceInfo # type: ignore - from ._models import DiagnosticsDescription # type: ignore - from ._models import DiagnosticsRef # type: ignore - from ._models import DiagnosticsSinkProperties # type: ignore - from ._models import DisableBackupDescription # type: ignore - from ._models import DiskInfo # type: ignore - from ._models import DoublePropertyValue # type: ignore - from ._models import DsmsAzureBlobBackupStorageDescription # type: ignore - from ._models import EnableBackupDescription # type: ignore - from ._models import EndpointProperties # type: ignore - from ._models import EndpointRef # type: ignore - from ._models import EnsureAvailabilitySafetyCheck # type: ignore - from ._models import EnsurePartitionQuorumSafetyCheck # type: ignore - from ._models import EntityHealth # type: ignore - from ._models import EntityHealthState # type: ignore - from ._models import EntityHealthStateChunk # type: ignore - from ._models import EntityHealthStateChunkList # type: ignore - from ._models import EntityKindHealthStateCount # type: ignore - from ._models import EnvironmentVariable # type: ignore - from ._models import Epoch # type: ignore - from ._models import EventHealthEvaluation # type: ignore - from ._models import ExecutingFaultsChaosEvent # type: ignore - from ._models import ExecutionPolicy # type: ignore - from ._models import ExternalStoreProvisionApplicationTypeDescription # type: ignore - from ._models import FabricCodeVersionInfo # type: ignore - from ._models import FabricConfigVersionInfo # type: ignore - from ._models import FabricError # type: ignore - from ._models import FabricErrorError # type: ignore - from ._models import FabricEvent # type: ignore - from ._models import FailedPropertyBatchInfo # type: ignore - from ._models import FailedUpgradeDomainProgressObject # type: ignore - from ._models import FailureUpgradeDomainProgressInfo # type: ignore - from ._models import FileInfo # type: ignore - from ._models import FileShareBackupStorageDescription # type: ignore - from ._models import FileVersion # type: ignore - from ._models import FolderInfo # type: ignore - from ._models import FolderSizeInfo # type: ignore - from ._models import FrequencyBasedBackupScheduleDescription # type: ignore - from ._models import GatewayDestination # type: ignore - from ._models import GatewayResourceDescription # type: ignore - from ._models import GetBackupByStorageQueryDescription # type: ignore - from ._models import GetPropertyBatchOperation # type: ignore - from ._models import GuidPropertyValue # type: ignore - from ._models import HealthEvaluation # type: ignore - from ._models import HealthEvaluationWrapper # type: ignore - from ._models import HealthEvent # type: ignore - from ._models import HealthInformation # type: ignore - from ._models import HealthStateCount # type: ignore - from ._models import HealthStatistics # type: ignore - from ._models import HttpConfig # type: ignore - from ._models import HttpHostConfig # type: ignore - from ._models import HttpRouteConfig # type: ignore - from ._models import HttpRouteMatchHeader # type: ignore - from ._models import HttpRouteMatchPath # type: ignore - from ._models import HttpRouteMatchRule # type: ignore - from ._models import IdentityDescription # type: ignore - from ._models import IdentityItemDescription # type: ignore - from ._models import ImageRegistryCredential # type: ignore - from ._models import ImageStoreContent # type: ignore - from ._models import ImageStoreCopyDescription # type: ignore - from ._models import ImageStoreInfo # type: ignore - from ._models import InlinedValueSecretResourceProperties # type: ignore - from ._models import InstanceLifecycleDescription # type: ignore - from ._models import Int64PropertyValue # type: ignore - from ._models import Int64RangePartitionInformation # type: ignore - from ._models import InvokeDataLossResult # type: ignore - from ._models import InvokeQuorumLossResult # type: ignore - from ._models import KeyValueStoreReplicaStatus # type: ignore - from ._models import LoadMetricInformation # type: ignore - from ._models import LoadMetricReport # type: ignore - from ._models import LoadMetricReportInfo # type: ignore - from ._models import LoadedPartitionInformationQueryDescription # type: ignore - from ._models import LoadedPartitionInformationResult # type: ignore - from ._models import LoadedPartitionInformationResultList # type: ignore - from ._models import LocalNetworkResourceProperties # type: ignore - from ._models import ManagedApplicationIdentity # type: ignore - from ._models import ManagedApplicationIdentityDescription # type: ignore - from ._models import ManagedIdentityAzureBlobBackupStorageDescription # type: ignore - from ._models import MetricLoadDescription # type: ignore - from ._models import MonitoringPolicyDescription # type: ignore - from ._models import NameDescription # type: ignore - from ._models import NamedPartitionInformation # type: ignore - from ._models import NamedPartitionSchemeDescription # type: ignore - from ._models import NetworkRef # type: ignore - from ._models import NetworkResourceDescription # type: ignore - from ._models import NetworkResourceProperties # type: ignore - from ._models import NetworkResourcePropertiesBase # type: ignore - from ._models import NodeAbortedEvent # type: ignore - from ._models import NodeAddedToClusterEvent # type: ignore - from ._models import NodeClosedEvent # type: ignore - from ._models import NodeDeactivateCompletedEvent # type: ignore - from ._models import NodeDeactivateStartedEvent # type: ignore - from ._models import NodeDeactivationInfo # type: ignore - from ._models import NodeDeactivationTask # type: ignore - from ._models import NodeDeactivationTaskId # type: ignore - from ._models import NodeDownEvent # type: ignore - from ._models import NodeEvent # type: ignore - from ._models import NodeHealth # type: ignore - from ._models import NodeHealthEvaluation # type: ignore - from ._models import NodeHealthReportExpiredEvent # type: ignore - from ._models import NodeHealthState # type: ignore - from ._models import NodeHealthStateChunk # type: ignore - from ._models import NodeHealthStateChunkList # type: ignore - from ._models import NodeHealthStateFilter # type: ignore - from ._models import NodeId # type: ignore - from ._models import NodeImpact # type: ignore - from ._models import NodeInfo # type: ignore - from ._models import NodeLoadInfo # type: ignore - from ._models import NodeLoadMetricInformation # type: ignore - from ._models import NodeNewHealthReportEvent # type: ignore - from ._models import NodeOpenFailedEvent # type: ignore - from ._models import NodeOpenSucceededEvent # type: ignore - from ._models import NodeRemovedFromClusterEvent # type: ignore - from ._models import NodeRepairImpactDescription # type: ignore - from ._models import NodeRepairTargetDescription # type: ignore - from ._models import NodeResult # type: ignore - from ._models import NodeTagsDescription # type: ignore - from ._models import NodeTransitionProgress # type: ignore - from ._models import NodeTransitionResult # type: ignore - from ._models import NodeTypeHealthPolicyMapItem # type: ignore - from ._models import NodeTypeNodesHealthEvaluation # type: ignore - from ._models import NodeUpEvent # type: ignore - from ._models import NodeUpgradeProgressInfo # type: ignore - from ._models import NodesHealthEvaluation # type: ignore - from ._models import OperationStatus # type: ignore - from ._models import PackageSharingPolicyInfo # type: ignore - from ._models import PagedApplicationInfoList # type: ignore - from ._models import PagedApplicationResourceDescriptionList # type: ignore - from ._models import PagedApplicationTypeInfoList # type: ignore - from ._models import PagedBackupConfigurationInfoList # type: ignore - from ._models import PagedBackupEntityList # type: ignore - from ._models import PagedBackupInfoList # type: ignore - from ._models import PagedBackupPolicyDescriptionList # type: ignore - from ._models import PagedComposeDeploymentStatusInfoList # type: ignore - from ._models import PagedDeployedApplicationInfoList # type: ignore - from ._models import PagedGatewayResourceDescriptionList # type: ignore - from ._models import PagedNetworkResourceDescriptionList # type: ignore - from ._models import PagedNodeInfoList # type: ignore - from ._models import PagedPropertyInfoList # type: ignore - from ._models import PagedReplicaInfoList # type: ignore - from ._models import PagedSecretResourceDescriptionList # type: ignore - from ._models import PagedSecretValueResourceDescriptionList # type: ignore - from ._models import PagedServiceInfoList # type: ignore - from ._models import PagedServicePartitionInfoList # type: ignore - from ._models import PagedServiceReplicaDescriptionList # type: ignore - from ._models import PagedServiceResourceDescriptionList # type: ignore - from ._models import PagedSubNameInfoList # type: ignore - from ._models import PagedUpdatePartitionLoadResultList # type: ignore - from ._models import PagedVolumeResourceDescriptionList # type: ignore - from ._models import PartitionAnalysisEvent # type: ignore - from ._models import PartitionBackupConfigurationInfo # type: ignore - from ._models import PartitionBackupEntity # type: ignore - from ._models import PartitionDataLossProgress # type: ignore - from ._models import PartitionEvent # type: ignore - from ._models import PartitionHealth # type: ignore - from ._models import PartitionHealthEvaluation # type: ignore - from ._models import PartitionHealthReportExpiredEvent # type: ignore - from ._models import PartitionHealthState # type: ignore - from ._models import PartitionHealthStateChunk # type: ignore - from ._models import PartitionHealthStateChunkList # type: ignore - from ._models import PartitionHealthStateFilter # type: ignore - from ._models import PartitionInformation # type: ignore - from ._models import PartitionInstanceCountScaleMechanism # type: ignore - from ._models import PartitionLoadInformation # type: ignore - from ._models import PartitionMetricLoadDescription # type: ignore - from ._models import PartitionNewHealthReportEvent # type: ignore - from ._models import PartitionPrimaryMoveAnalysisEvent # type: ignore - from ._models import PartitionQuorumLossProgress # type: ignore - from ._models import PartitionReconfiguredEvent # type: ignore - from ._models import PartitionRestartProgress # type: ignore - from ._models import PartitionSafetyCheck # type: ignore - from ._models import PartitionSchemeDescription # type: ignore - from ._models import PartitionsHealthEvaluation # type: ignore - from ._models import PrimaryReplicatorStatus # type: ignore - from ._models import Probe # type: ignore - from ._models import ProbeExec # type: ignore - from ._models import ProbeHttpGet # type: ignore - from ._models import ProbeHttpGetHeaders # type: ignore - from ._models import ProbeTcpSocket # type: ignore - from ._models import PropertyBatchDescriptionList # type: ignore - from ._models import PropertyBatchInfo # type: ignore - from ._models import PropertyBatchOperation # type: ignore - from ._models import PropertyDescription # type: ignore - from ._models import PropertyInfo # type: ignore - from ._models import PropertyMetadata # type: ignore - from ._models import PropertyValue # type: ignore - from ._models import ProvisionApplicationTypeDescription # type: ignore - from ._models import ProvisionApplicationTypeDescriptionBase # type: ignore - from ._models import ProvisionFabricDescription # type: ignore - from ._models import PutPropertyBatchOperation # type: ignore - from ._models import ReconfigurationInformation # type: ignore - from ._models import RegistryCredential # type: ignore - from ._models import ReliableCollectionsRef # type: ignore - from ._models import RemoteReplicatorAcknowledgementDetail # type: ignore - from ._models import RemoteReplicatorAcknowledgementStatus # type: ignore - from ._models import RemoteReplicatorStatus # type: ignore - from ._models import RepairImpactDescriptionBase # type: ignore - from ._models import RepairTargetDescriptionBase # type: ignore - from ._models import RepairTask # type: ignore - from ._models import RepairTaskApproveDescription # type: ignore - from ._models import RepairTaskCancelDescription # type: ignore - from ._models import RepairTaskDeleteDescription # type: ignore - from ._models import RepairTaskHistory # type: ignore - from ._models import RepairTaskUpdateHealthPolicyDescription # type: ignore - from ._models import RepairTaskUpdateInfo # type: ignore - from ._models import ReplicaEvent # type: ignore - from ._models import ReplicaHealth # type: ignore - from ._models import ReplicaHealthEvaluation # type: ignore - from ._models import ReplicaHealthState # type: ignore - from ._models import ReplicaHealthStateChunk # type: ignore - from ._models import ReplicaHealthStateChunkList # type: ignore - from ._models import ReplicaHealthStateFilter # type: ignore - from ._models import ReplicaInfo # type: ignore - from ._models import ReplicaLifecycleDescription # type: ignore - from ._models import ReplicaMetricLoadDescription # type: ignore - from ._models import ReplicaStatusBase # type: ignore - from ._models import ReplicasHealthEvaluation # type: ignore - from ._models import ReplicatorQueueStatus # type: ignore - from ._models import ReplicatorStatus # type: ignore - from ._models import ResolvedServiceEndpoint # type: ignore - from ._models import ResolvedServicePartition # type: ignore - from ._models import ResourceLimits # type: ignore - from ._models import ResourceRequests # type: ignore - from ._models import ResourceRequirements # type: ignore - from ._models import RestartDeployedCodePackageDescription # type: ignore - from ._models import RestartNodeDescription # type: ignore - from ._models import RestartPartitionResult # type: ignore - from ._models import RestorePartitionDescription # type: ignore - from ._models import RestoreProgressInfo # type: ignore - from ._models import ResumeApplicationUpgradeDescription # type: ignore - from ._models import ResumeClusterUpgradeDescription # type: ignore - from ._models import RetentionPolicyDescription # type: ignore - from ._models import RollingUpgradeUpdateDescription # type: ignore - from ._models import RunToCompletionExecutionPolicy # type: ignore - from ._models import SafetyCheck # type: ignore - from ._models import SafetyCheckWrapper # type: ignore - from ._models import ScalingMechanismDescription # type: ignore - from ._models import ScalingPolicyDescription # type: ignore - from ._models import ScalingTriggerDescription # type: ignore - from ._models import SecondaryActiveReplicatorStatus # type: ignore - from ._models import SecondaryIdleReplicatorStatus # type: ignore - from ._models import SecondaryReplicatorStatus # type: ignore - from ._models import SecretResourceDescription # type: ignore - from ._models import SecretResourceProperties # type: ignore - from ._models import SecretResourcePropertiesBase # type: ignore - from ._models import SecretValue # type: ignore - from ._models import SecretValueProperties # type: ignore - from ._models import SecretValueResourceDescription # type: ignore - from ._models import SecretValueResourceProperties # type: ignore - from ._models import SeedNodeSafetyCheck # type: ignore - from ._models import SelectedPartition # type: ignore - from ._models import ServiceBackupConfigurationInfo # type: ignore - from ._models import ServiceBackupEntity # type: ignore - from ._models import ServiceCorrelationDescription # type: ignore - from ._models import ServiceCreatedEvent # type: ignore - from ._models import ServiceDeletedEvent # type: ignore - from ._models import ServiceDescription # type: ignore - from ._models import ServiceEvent # type: ignore - from ._models import ServiceFromTemplateDescription # type: ignore - from ._models import ServiceHealth # type: ignore - from ._models import ServiceHealthEvaluation # type: ignore - from ._models import ServiceHealthReportExpiredEvent # type: ignore - from ._models import ServiceHealthState # type: ignore - from ._models import ServiceHealthStateChunk # type: ignore - from ._models import ServiceHealthStateChunkList # type: ignore - from ._models import ServiceHealthStateFilter # type: ignore - from ._models import ServiceIdentity # type: ignore - from ._models import ServiceInfo # type: ignore - from ._models import ServiceLoadMetricDescription # type: ignore - from ._models import ServiceNameInfo # type: ignore - from ._models import ServiceNewHealthReportEvent # type: ignore - from ._models import ServicePartitionInfo # type: ignore - from ._models import ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription # type: ignore - from ._models import ServicePlacementInvalidDomainPolicyDescription # type: ignore - from ._models import ServicePlacementNonPartiallyPlaceServicePolicyDescription # type: ignore - from ._models import ServicePlacementPolicyDescription # type: ignore - from ._models import ServicePlacementPreferPrimaryDomainPolicyDescription # type: ignore - from ._models import ServicePlacementRequireDomainDistributionPolicyDescription # type: ignore - from ._models import ServicePlacementRequiredDomainPolicyDescription # type: ignore - from ._models import ServiceProperties # type: ignore - from ._models import ServiceReplicaDescription # type: ignore - from ._models import ServiceReplicaProperties # type: ignore - from ._models import ServiceResourceDescription # type: ignore - from ._models import ServiceResourceProperties # type: ignore - from ._models import ServiceTypeDescription # type: ignore - from ._models import ServiceTypeExtensionDescription # type: ignore - from ._models import ServiceTypeHealthPolicy # type: ignore - from ._models import ServiceTypeHealthPolicyMapItem # type: ignore - from ._models import ServiceTypeInfo # type: ignore - from ._models import ServiceTypeManifest # type: ignore - from ._models import ServiceUpdateDescription # type: ignore - from ._models import ServiceUpgradeProgress # type: ignore - from ._models import ServicesHealthEvaluation # type: ignore - from ._models import Setting # type: ignore - from ._models import SingletonPartitionInformation # type: ignore - from ._models import SingletonPartitionSchemeDescription # type: ignore - from ._models import StartClusterUpgradeDescription # type: ignore - from ._models import StartedChaosEvent # type: ignore - from ._models import StatefulReplicaHealthReportExpiredEvent # type: ignore - from ._models import StatefulReplicaNewHealthReportEvent # type: ignore - from ._models import StatefulServiceDescription # type: ignore - from ._models import StatefulServiceInfo # type: ignore - from ._models import StatefulServicePartitionInfo # type: ignore - from ._models import StatefulServiceReplicaHealth # type: ignore - from ._models import StatefulServiceReplicaHealthState # type: ignore - from ._models import StatefulServiceReplicaInfo # type: ignore - from ._models import StatefulServiceTypeDescription # type: ignore - from ._models import StatefulServiceUpdateDescription # type: ignore - from ._models import StatelessReplicaHealthReportExpiredEvent # type: ignore - from ._models import StatelessReplicaNewHealthReportEvent # type: ignore - from ._models import StatelessServiceDescription # type: ignore - from ._models import StatelessServiceInfo # type: ignore - from ._models import StatelessServiceInstanceHealth # type: ignore - from ._models import StatelessServiceInstanceHealthState # type: ignore - from ._models import StatelessServiceInstanceInfo # type: ignore - from ._models import StatelessServicePartitionInfo # type: ignore - from ._models import StatelessServiceTypeDescription # type: ignore - from ._models import StatelessServiceUpdateDescription # type: ignore - from ._models import StoppedChaosEvent # type: ignore - from ._models import StringPropertyValue # type: ignore - from ._models import SuccessfulPropertyBatchInfo # type: ignore - from ._models import SystemApplicationHealthEvaluation # type: ignore - from ._models import TcpConfig # type: ignore - from ._models import TestErrorChaosEvent # type: ignore - from ._models import TimeBasedBackupScheduleDescription # type: ignore - from ._models import TimeOfDay # type: ignore - from ._models import TimeRange # type: ignore - from ._models import UniformInt64RangePartitionSchemeDescription # type: ignore - from ._models import UnplacedReplicaInformation # type: ignore - from ._models import UnprovisionApplicationTypeDescriptionInfo # type: ignore - from ._models import UnprovisionFabricDescription # type: ignore - from ._models import UpdateClusterUpgradeDescription # type: ignore - from ._models import UpdatePartitionLoadResult # type: ignore - from ._models import UpgradeDomainDeltaNodesCheckHealthEvaluation # type: ignore - from ._models import UpgradeDomainDeployedApplicationsHealthEvaluation # type: ignore - from ._models import UpgradeDomainInfo # type: ignore - from ._models import UpgradeDomainNodesHealthEvaluation # type: ignore - from ._models import UpgradeOrchestrationServiceState # type: ignore - from ._models import UpgradeOrchestrationServiceStateSummary # type: ignore - from ._models import UpgradeUnitInfo # type: ignore - from ._models import UploadChunkRange # type: ignore - from ._models import UploadSession # type: ignore - from ._models import UploadSessionInfo # type: ignore - from ._models import UsageInfo # type: ignore - from ._models import ValidateClusterUpgradeResult # type: ignore - from ._models import ValidationFailedChaosEvent # type: ignore - from ._models import VolumeProviderParametersAzureFile # type: ignore - from ._models import VolumeReference # type: ignore - from ._models import VolumeResourceDescription # type: ignore - from ._models import WaitForInbuildReplicaSafetyCheck # type: ignore - from ._models import WaitForPrimaryPlacementSafetyCheck # type: ignore - from ._models import WaitForPrimarySwapSafetyCheck # type: ignore - from ._models import WaitForReconfigurationSafetyCheck # type: ignore - from ._models import WaitingChaosEvent # type: ignore - -from ._service_fabric_client_apis_enums import ( - ApplicationDefinitionKind, - ApplicationPackageCleanupPolicy, - ApplicationResourceUpgradeState, - ApplicationScopedVolumeKind, - ApplicationStatus, - ApplicationTypeDefinitionKind, - ApplicationTypeStatus, - AutoScalingMechanismKind, - AutoScalingMetricKind, - AutoScalingResourceMetricName, - AutoScalingTriggerKind, - BackupEntityKind, - BackupPolicyScope, - BackupScheduleFrequencyType, - BackupScheduleKind, - BackupState, - BackupStorageKind, - BackupSuspensionScope, - BackupType, - ChaosEventKind, - ChaosScheduleStatus, - ChaosStatus, - ComposeDeploymentStatus, - ComposeDeploymentUpgradeState, - CreateFabricDump, - DataLossMode, - DayOfWeek, - DeactivationIntent, - DeployedApplicationStatus, - DeploymentStatus, - DiagnosticsSinkKind, - EntityKind, - EntryPointStatus, - EnvironmentVariableType, - ExecutionPolicyType, - FabricErrorCodes, - FabricEventKind, - FabricReplicaStatus, - FailureAction, - FailureReason, - HeaderMatchType, - HealthEvaluationKind, - HealthState, - HostIsolationMode, - HostOptions, - HostType, - ImageRegistryPasswordType, - ImpactLevel, - ManagedIdentityType, - MoveCost, - NetworkKind, - NodeDeactivationIntent, - NodeDeactivationStatus, - NodeDeactivationTaskType, - NodeStatus, - NodeStatusFilter, - NodeTransitionType, - NodeUpgradePhase, - OperatingSystemType, - OperationState, - OperationType, - Ordering, - PackageSharingPolicyScope, - PartitionAccessStatus, - PartitionScheme, - PathMatchType, - PropertyBatchInfoKind, - PropertyBatchOperationKind, - PropertyValueKind, - ProvisionApplicationTypeKind, - QuorumLossMode, - ReconfigurationPhase, - ReconfigurationType, - RepairImpactKind, - RepairTargetKind, - RepairTaskHealthCheckState, - ReplicaHealthReportServiceKind, - ReplicaKind, - ReplicaRole, - ReplicaStatus, - ReplicatorOperationName, - ResourceStatus, - RestartPartitionMode, - RestartPolicy, - RestoreState, - ResultStatus, - RetentionPolicyType, - RollingUpgradeMode, - SafetyCheckKind, - ScalingMechanismKind, - ScalingTriggerKind, - Scheme, - SecretKind, - ServiceCorrelationScheme, - ServiceEndpointRole, - ServiceHostUpgradeImpact, - ServiceKind, - ServiceLoadMetricWeight, - ServiceOperationName, - ServicePackageActivationMode, - ServicePartitionKind, - ServicePartitionStatus, - ServicePlacementPolicyType, - ServiceStatus, - ServiceTypeRegistrationStatus, - SettingType, - SizeTypes, - State, - UpgradeDomainState, - UpgradeKind, - UpgradeMode, - UpgradeSortOrder, - UpgradeState, - UpgradeType, - UpgradeUnitState, - VolumeProvider, -) - -__all__ = [ - 'AadMetadata', - 'AadMetadataObject', - 'AddRemoveIncrementalNamedPartitionScalingMechanism', - 'AddRemoveReplicaScalingMechanism', - 'AnalysisEventMetadata', - 'ApplicationBackupConfigurationInfo', - 'ApplicationBackupEntity', - 'ApplicationCapacityDescription', - 'ApplicationContainerInstanceExitedEvent', - 'ApplicationCreatedEvent', - 'ApplicationDeletedEvent', - 'ApplicationDescription', - 'ApplicationEvent', - 'ApplicationHealth', - 'ApplicationHealthEvaluation', - 'ApplicationHealthPolicies', - 'ApplicationHealthPolicy', - 'ApplicationHealthPolicyMapItem', - 'ApplicationHealthPolicyMapObject', - 'ApplicationHealthReportExpiredEvent', - 'ApplicationHealthState', - 'ApplicationHealthStateChunk', - 'ApplicationHealthStateChunkList', - 'ApplicationHealthStateFilter', - 'ApplicationInfo', - 'ApplicationLoadInfo', - 'ApplicationLoadMetricInformation', - 'ApplicationMetadata', - 'ApplicationMetricDescription', - 'ApplicationNameInfo', - 'ApplicationNewHealthReportEvent', - 'ApplicationParameter', - 'ApplicationProcessExitedEvent', - 'ApplicationResourceDescription', - 'ApplicationResourceUpgradeProgressInfo', - 'ApplicationScopedVolume', - 'ApplicationScopedVolumeCreationParameters', - 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk', - 'ApplicationTypeApplicationsHealthEvaluation', - 'ApplicationTypeHealthPolicyMapItem', - 'ApplicationTypeImageStorePath', - 'ApplicationTypeInfo', - 'ApplicationTypeManifest', - 'ApplicationTypeMetadata', - 'ApplicationUpdateDescription', - 'ApplicationUpgradeCompletedEvent', - 'ApplicationUpgradeDescription', - 'ApplicationUpgradeDomainCompletedEvent', - 'ApplicationUpgradeProgressInfo', - 'ApplicationUpgradeRollbackCompletedEvent', - 'ApplicationUpgradeRollbackStartedEvent', - 'ApplicationUpgradeStartedEvent', - 'ApplicationUpgradeUpdateDescription', - 'ApplicationsHealthEvaluation', - 'ArmMetadata', - 'AutoScalingMechanism', - 'AutoScalingMetric', - 'AutoScalingPolicy', - 'AutoScalingResourceMetric', - 'AutoScalingTrigger', - 'AverageLoadScalingTrigger', - 'AveragePartitionLoadScalingTrigger', - 'AverageServiceLoadScalingTrigger', - 'AzureBlobBackupStorageDescription', - 'AzureInternalMonitoringPipelineSinkDescription', - 'BackupConfigurationInfo', - 'BackupEntity', - 'BackupInfo', - 'BackupPartitionDescription', - 'BackupPolicyDescription', - 'BackupProgressInfo', - 'BackupScheduleDescription', - 'BackupStorageDescription', - 'BackupSuspensionInfo', - 'BasicRetentionPolicyDescription', - 'BinaryPropertyValue', - 'Chaos', - 'ChaosCodePackageRestartScheduledEvent', - 'ChaosContext', - 'ChaosEvent', - 'ChaosEventWrapper', - 'ChaosEventsSegment', - 'ChaosNodeRestartScheduledEvent', - 'ChaosParameters', - 'ChaosParametersDictionaryItem', - 'ChaosPartitionPrimaryMoveScheduledEvent', - 'ChaosPartitionSecondaryMoveScheduledEvent', - 'ChaosReplicaRemovalScheduledEvent', - 'ChaosReplicaRestartScheduledEvent', - 'ChaosSchedule', - 'ChaosScheduleDescription', - 'ChaosScheduleJob', - 'ChaosScheduleJobActiveDaysOfWeek', - 'ChaosStartedEvent', - 'ChaosStoppedEvent', - 'ChaosTargetFilter', - 'CheckExistsPropertyBatchOperation', - 'CheckSequencePropertyBatchOperation', - 'CheckValuePropertyBatchOperation', - 'ClusterConfiguration', - 'ClusterConfigurationUpgradeDescription', - 'ClusterConfigurationUpgradeStatusInfo', - 'ClusterEvent', - 'ClusterHealth', - 'ClusterHealthChunk', - 'ClusterHealthChunkQueryDescription', - 'ClusterHealthPolicies', - 'ClusterHealthPolicy', - 'ClusterHealthReportExpiredEvent', - 'ClusterLoadInfo', - 'ClusterManifest', - 'ClusterNewHealthReportEvent', - 'ClusterUpgradeCompletedEvent', - 'ClusterUpgradeDescriptionObject', - 'ClusterUpgradeDomainCompletedEvent', - 'ClusterUpgradeHealthPolicyObject', - 'ClusterUpgradeProgressObject', - 'ClusterUpgradeRollbackCompletedEvent', - 'ClusterUpgradeRollbackStartedEvent', - 'ClusterUpgradeStartedEvent', - 'ClusterVersion', - 'CodePackageEntryPoint', - 'CodePackageEntryPointStatistics', - 'ComposeDeploymentStatusInfo', - 'ComposeDeploymentUpgradeDescription', - 'ComposeDeploymentUpgradeProgressInfo', - 'ConfigParameterOverride', - 'ContainerApiRequestBody', - 'ContainerApiResponse', - 'ContainerApiResult', - 'ContainerCodePackageProperties', - 'ContainerEvent', - 'ContainerInstanceEvent', - 'ContainerInstanceView', - 'ContainerLabel', - 'ContainerLogs', - 'ContainerState', - 'CreateComposeDeploymentDescription', - 'CurrentUpgradeDomainProgressInfo', - 'CurrentUpgradeUnitsProgressInfo', - 'DeactivationIntentDescription', - 'DefaultExecutionPolicy', - 'DeletePropertyBatchOperation', - 'DeltaNodesCheckHealthEvaluation', - 'DeployServicePackageToNodeDescription', - 'DeployedApplicationHealth', - 'DeployedApplicationHealthEvaluation', - 'DeployedApplicationHealthReportExpiredEvent', - 'DeployedApplicationHealthState', - 'DeployedApplicationHealthStateChunk', - 'DeployedApplicationHealthStateChunkList', - 'DeployedApplicationHealthStateFilter', - 'DeployedApplicationInfo', - 'DeployedApplicationNewHealthReportEvent', - 'DeployedApplicationsHealthEvaluation', - 'DeployedCodePackageInfo', - 'DeployedServicePackageHealth', - 'DeployedServicePackageHealthEvaluation', - 'DeployedServicePackageHealthReportExpiredEvent', - 'DeployedServicePackageHealthState', - 'DeployedServicePackageHealthStateChunk', - 'DeployedServicePackageHealthStateChunkList', - 'DeployedServicePackageHealthStateFilter', - 'DeployedServicePackageInfo', - 'DeployedServicePackageNewHealthReportEvent', - 'DeployedServicePackagesHealthEvaluation', - 'DeployedServiceReplicaDetailInfo', - 'DeployedServiceReplicaInfo', - 'DeployedServiceTypeInfo', - 'DeployedStatefulServiceReplicaDetailInfo', - 'DeployedStatefulServiceReplicaInfo', - 'DeployedStatelessServiceInstanceDetailInfo', - 'DeployedStatelessServiceInstanceInfo', - 'DiagnosticsDescription', - 'DiagnosticsRef', - 'DiagnosticsSinkProperties', - 'DisableBackupDescription', - 'DiskInfo', - 'DoublePropertyValue', - 'DsmsAzureBlobBackupStorageDescription', - 'EnableBackupDescription', - 'EndpointProperties', - 'EndpointRef', - 'EnsureAvailabilitySafetyCheck', - 'EnsurePartitionQuorumSafetyCheck', - 'EntityHealth', - 'EntityHealthState', - 'EntityHealthStateChunk', - 'EntityHealthStateChunkList', - 'EntityKindHealthStateCount', - 'EnvironmentVariable', - 'Epoch', - 'EventHealthEvaluation', - 'ExecutingFaultsChaosEvent', - 'ExecutionPolicy', - 'ExternalStoreProvisionApplicationTypeDescription', - 'FabricCodeVersionInfo', - 'FabricConfigVersionInfo', - 'FabricError', - 'FabricErrorError', - 'FabricEvent', - 'FailedPropertyBatchInfo', - 'FailedUpgradeDomainProgressObject', - 'FailureUpgradeDomainProgressInfo', - 'FileInfo', - 'FileShareBackupStorageDescription', - 'FileVersion', - 'FolderInfo', - 'FolderSizeInfo', - 'FrequencyBasedBackupScheduleDescription', - 'GatewayDestination', - 'GatewayResourceDescription', - 'GetBackupByStorageQueryDescription', - 'GetPropertyBatchOperation', - 'GuidPropertyValue', - 'HealthEvaluation', - 'HealthEvaluationWrapper', - 'HealthEvent', - 'HealthInformation', - 'HealthStateCount', - 'HealthStatistics', - 'HttpConfig', - 'HttpHostConfig', - 'HttpRouteConfig', - 'HttpRouteMatchHeader', - 'HttpRouteMatchPath', - 'HttpRouteMatchRule', - 'IdentityDescription', - 'IdentityItemDescription', - 'ImageRegistryCredential', - 'ImageStoreContent', - 'ImageStoreCopyDescription', - 'ImageStoreInfo', - 'InlinedValueSecretResourceProperties', - 'InstanceLifecycleDescription', - 'Int64PropertyValue', - 'Int64RangePartitionInformation', - 'InvokeDataLossResult', - 'InvokeQuorumLossResult', - 'KeyValueStoreReplicaStatus', - 'LoadMetricInformation', - 'LoadMetricReport', - 'LoadMetricReportInfo', - 'LoadedPartitionInformationQueryDescription', - 'LoadedPartitionInformationResult', - 'LoadedPartitionInformationResultList', - 'LocalNetworkResourceProperties', - 'ManagedApplicationIdentity', - 'ManagedApplicationIdentityDescription', - 'ManagedIdentityAzureBlobBackupStorageDescription', - 'MetricLoadDescription', - 'MonitoringPolicyDescription', - 'NameDescription', - 'NamedPartitionInformation', - 'NamedPartitionSchemeDescription', - 'NetworkRef', - 'NetworkResourceDescription', - 'NetworkResourceProperties', - 'NetworkResourcePropertiesBase', - 'NodeAbortedEvent', - 'NodeAddedToClusterEvent', - 'NodeClosedEvent', - 'NodeDeactivateCompletedEvent', - 'NodeDeactivateStartedEvent', - 'NodeDeactivationInfo', - 'NodeDeactivationTask', - 'NodeDeactivationTaskId', - 'NodeDownEvent', - 'NodeEvent', - 'NodeHealth', - 'NodeHealthEvaluation', - 'NodeHealthReportExpiredEvent', - 'NodeHealthState', - 'NodeHealthStateChunk', - 'NodeHealthStateChunkList', - 'NodeHealthStateFilter', - 'NodeId', - 'NodeImpact', - 'NodeInfo', - 'NodeLoadInfo', - 'NodeLoadMetricInformation', - 'NodeNewHealthReportEvent', - 'NodeOpenFailedEvent', - 'NodeOpenSucceededEvent', - 'NodeRemovedFromClusterEvent', - 'NodeRepairImpactDescription', - 'NodeRepairTargetDescription', - 'NodeResult', - 'NodeTagsDescription', - 'NodeTransitionProgress', - 'NodeTransitionResult', - 'NodeTypeHealthPolicyMapItem', - 'NodeTypeNodesHealthEvaluation', - 'NodeUpEvent', - 'NodeUpgradeProgressInfo', - 'NodesHealthEvaluation', - 'OperationStatus', - 'PackageSharingPolicyInfo', - 'PagedApplicationInfoList', - 'PagedApplicationResourceDescriptionList', - 'PagedApplicationTypeInfoList', - 'PagedBackupConfigurationInfoList', - 'PagedBackupEntityList', - 'PagedBackupInfoList', - 'PagedBackupPolicyDescriptionList', - 'PagedComposeDeploymentStatusInfoList', - 'PagedDeployedApplicationInfoList', - 'PagedGatewayResourceDescriptionList', - 'PagedNetworkResourceDescriptionList', - 'PagedNodeInfoList', - 'PagedPropertyInfoList', - 'PagedReplicaInfoList', - 'PagedSecretResourceDescriptionList', - 'PagedSecretValueResourceDescriptionList', - 'PagedServiceInfoList', - 'PagedServicePartitionInfoList', - 'PagedServiceReplicaDescriptionList', - 'PagedServiceResourceDescriptionList', - 'PagedSubNameInfoList', - 'PagedUpdatePartitionLoadResultList', - 'PagedVolumeResourceDescriptionList', - 'PartitionAnalysisEvent', - 'PartitionBackupConfigurationInfo', - 'PartitionBackupEntity', - 'PartitionDataLossProgress', - 'PartitionEvent', - 'PartitionHealth', - 'PartitionHealthEvaluation', - 'PartitionHealthReportExpiredEvent', - 'PartitionHealthState', - 'PartitionHealthStateChunk', - 'PartitionHealthStateChunkList', - 'PartitionHealthStateFilter', - 'PartitionInformation', - 'PartitionInstanceCountScaleMechanism', - 'PartitionLoadInformation', - 'PartitionMetricLoadDescription', - 'PartitionNewHealthReportEvent', - 'PartitionPrimaryMoveAnalysisEvent', - 'PartitionQuorumLossProgress', - 'PartitionReconfiguredEvent', - 'PartitionRestartProgress', - 'PartitionSafetyCheck', - 'PartitionSchemeDescription', - 'PartitionsHealthEvaluation', - 'PrimaryReplicatorStatus', - 'Probe', - 'ProbeExec', - 'ProbeHttpGet', - 'ProbeHttpGetHeaders', - 'ProbeTcpSocket', - 'PropertyBatchDescriptionList', - 'PropertyBatchInfo', - 'PropertyBatchOperation', - 'PropertyDescription', - 'PropertyInfo', - 'PropertyMetadata', - 'PropertyValue', - 'ProvisionApplicationTypeDescription', - 'ProvisionApplicationTypeDescriptionBase', - 'ProvisionFabricDescription', - 'PutPropertyBatchOperation', - 'ReconfigurationInformation', - 'RegistryCredential', - 'ReliableCollectionsRef', - 'RemoteReplicatorAcknowledgementDetail', - 'RemoteReplicatorAcknowledgementStatus', - 'RemoteReplicatorStatus', - 'RepairImpactDescriptionBase', - 'RepairTargetDescriptionBase', - 'RepairTask', - 'RepairTaskApproveDescription', - 'RepairTaskCancelDescription', - 'RepairTaskDeleteDescription', - 'RepairTaskHistory', - 'RepairTaskUpdateHealthPolicyDescription', - 'RepairTaskUpdateInfo', - 'ReplicaEvent', - 'ReplicaHealth', - 'ReplicaHealthEvaluation', - 'ReplicaHealthState', - 'ReplicaHealthStateChunk', - 'ReplicaHealthStateChunkList', - 'ReplicaHealthStateFilter', - 'ReplicaInfo', - 'ReplicaLifecycleDescription', - 'ReplicaMetricLoadDescription', - 'ReplicaStatusBase', - 'ReplicasHealthEvaluation', - 'ReplicatorQueueStatus', - 'ReplicatorStatus', - 'ResolvedServiceEndpoint', - 'ResolvedServicePartition', - 'ResourceLimits', - 'ResourceRequests', - 'ResourceRequirements', - 'RestartDeployedCodePackageDescription', - 'RestartNodeDescription', - 'RestartPartitionResult', - 'RestorePartitionDescription', - 'RestoreProgressInfo', - 'ResumeApplicationUpgradeDescription', - 'ResumeClusterUpgradeDescription', - 'RetentionPolicyDescription', - 'RollingUpgradeUpdateDescription', - 'RunToCompletionExecutionPolicy', - 'SafetyCheck', - 'SafetyCheckWrapper', - 'ScalingMechanismDescription', - 'ScalingPolicyDescription', - 'ScalingTriggerDescription', - 'SecondaryActiveReplicatorStatus', - 'SecondaryIdleReplicatorStatus', - 'SecondaryReplicatorStatus', - 'SecretResourceDescription', - 'SecretResourceProperties', - 'SecretResourcePropertiesBase', - 'SecretValue', - 'SecretValueProperties', - 'SecretValueResourceDescription', - 'SecretValueResourceProperties', - 'SeedNodeSafetyCheck', - 'SelectedPartition', - 'ServiceBackupConfigurationInfo', - 'ServiceBackupEntity', - 'ServiceCorrelationDescription', - 'ServiceCreatedEvent', - 'ServiceDeletedEvent', - 'ServiceDescription', - 'ServiceEvent', - 'ServiceFromTemplateDescription', - 'ServiceHealth', - 'ServiceHealthEvaluation', - 'ServiceHealthReportExpiredEvent', - 'ServiceHealthState', - 'ServiceHealthStateChunk', - 'ServiceHealthStateChunkList', - 'ServiceHealthStateFilter', - 'ServiceIdentity', - 'ServiceInfo', - 'ServiceLoadMetricDescription', - 'ServiceNameInfo', - 'ServiceNewHealthReportEvent', - 'ServicePartitionInfo', - 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', - 'ServicePlacementInvalidDomainPolicyDescription', - 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', - 'ServicePlacementPolicyDescription', - 'ServicePlacementPreferPrimaryDomainPolicyDescription', - 'ServicePlacementRequireDomainDistributionPolicyDescription', - 'ServicePlacementRequiredDomainPolicyDescription', - 'ServiceProperties', - 'ServiceReplicaDescription', - 'ServiceReplicaProperties', - 'ServiceResourceDescription', - 'ServiceResourceProperties', - 'ServiceTypeDescription', - 'ServiceTypeExtensionDescription', - 'ServiceTypeHealthPolicy', - 'ServiceTypeHealthPolicyMapItem', - 'ServiceTypeInfo', - 'ServiceTypeManifest', - 'ServiceUpdateDescription', - 'ServiceUpgradeProgress', - 'ServicesHealthEvaluation', - 'Setting', - 'SingletonPartitionInformation', - 'SingletonPartitionSchemeDescription', - 'StartClusterUpgradeDescription', - 'StartedChaosEvent', - 'StatefulReplicaHealthReportExpiredEvent', - 'StatefulReplicaNewHealthReportEvent', - 'StatefulServiceDescription', - 'StatefulServiceInfo', - 'StatefulServicePartitionInfo', - 'StatefulServiceReplicaHealth', - 'StatefulServiceReplicaHealthState', - 'StatefulServiceReplicaInfo', - 'StatefulServiceTypeDescription', - 'StatefulServiceUpdateDescription', - 'StatelessReplicaHealthReportExpiredEvent', - 'StatelessReplicaNewHealthReportEvent', - 'StatelessServiceDescription', - 'StatelessServiceInfo', - 'StatelessServiceInstanceHealth', - 'StatelessServiceInstanceHealthState', - 'StatelessServiceInstanceInfo', - 'StatelessServicePartitionInfo', - 'StatelessServiceTypeDescription', - 'StatelessServiceUpdateDescription', - 'StoppedChaosEvent', - 'StringPropertyValue', - 'SuccessfulPropertyBatchInfo', - 'SystemApplicationHealthEvaluation', - 'TcpConfig', - 'TestErrorChaosEvent', - 'TimeBasedBackupScheduleDescription', - 'TimeOfDay', - 'TimeRange', - 'UniformInt64RangePartitionSchemeDescription', - 'UnplacedReplicaInformation', - 'UnprovisionApplicationTypeDescriptionInfo', - 'UnprovisionFabricDescription', - 'UpdateClusterUpgradeDescription', - 'UpdatePartitionLoadResult', - 'UpgradeDomainDeltaNodesCheckHealthEvaluation', - 'UpgradeDomainDeployedApplicationsHealthEvaluation', - 'UpgradeDomainInfo', - 'UpgradeDomainNodesHealthEvaluation', - 'UpgradeOrchestrationServiceState', - 'UpgradeOrchestrationServiceStateSummary', - 'UpgradeUnitInfo', - 'UploadChunkRange', - 'UploadSession', - 'UploadSessionInfo', - 'UsageInfo', - 'ValidateClusterUpgradeResult', - 'ValidationFailedChaosEvent', - 'VolumeProviderParametersAzureFile', - 'VolumeReference', - 'VolumeResourceDescription', - 'WaitForInbuildReplicaSafetyCheck', - 'WaitForPrimaryPlacementSafetyCheck', - 'WaitForPrimarySwapSafetyCheck', - 'WaitForReconfigurationSafetyCheck', - 'WaitingChaosEvent', - 'ApplicationDefinitionKind', - 'ApplicationPackageCleanupPolicy', - 'ApplicationResourceUpgradeState', - 'ApplicationScopedVolumeKind', - 'ApplicationStatus', - 'ApplicationTypeDefinitionKind', - 'ApplicationTypeStatus', - 'AutoScalingMechanismKind', - 'AutoScalingMetricKind', - 'AutoScalingResourceMetricName', - 'AutoScalingTriggerKind', - 'BackupEntityKind', - 'BackupPolicyScope', - 'BackupScheduleFrequencyType', - 'BackupScheduleKind', - 'BackupState', - 'BackupStorageKind', - 'BackupSuspensionScope', - 'BackupType', - 'ChaosEventKind', - 'ChaosScheduleStatus', - 'ChaosStatus', - 'ComposeDeploymentStatus', - 'ComposeDeploymentUpgradeState', - 'CreateFabricDump', - 'DataLossMode', - 'DayOfWeek', - 'DeactivationIntent', - 'DeployedApplicationStatus', - 'DeploymentStatus', - 'DiagnosticsSinkKind', - 'EntityKind', - 'EntryPointStatus', - 'EnvironmentVariableType', - 'ExecutionPolicyType', - 'FabricErrorCodes', - 'FabricEventKind', - 'FabricReplicaStatus', - 'FailureAction', - 'FailureReason', - 'HeaderMatchType', - 'HealthEvaluationKind', - 'HealthState', - 'HostIsolationMode', - 'HostOptions', - 'HostType', - 'ImageRegistryPasswordType', - 'ImpactLevel', - 'ManagedIdentityType', - 'MoveCost', - 'NetworkKind', - 'NodeDeactivationIntent', - 'NodeDeactivationStatus', - 'NodeDeactivationTaskType', - 'NodeStatus', - 'NodeStatusFilter', - 'NodeTransitionType', - 'NodeUpgradePhase', - 'OperatingSystemType', - 'OperationState', - 'OperationType', - 'Ordering', - 'PackageSharingPolicyScope', - 'PartitionAccessStatus', - 'PartitionScheme', - 'PathMatchType', - 'PropertyBatchInfoKind', - 'PropertyBatchOperationKind', - 'PropertyValueKind', - 'ProvisionApplicationTypeKind', - 'QuorumLossMode', - 'ReconfigurationPhase', - 'ReconfigurationType', - 'RepairImpactKind', - 'RepairTargetKind', - 'RepairTaskHealthCheckState', - 'ReplicaHealthReportServiceKind', - 'ReplicaKind', - 'ReplicaRole', - 'ReplicaStatus', - 'ReplicatorOperationName', - 'ResourceStatus', - 'RestartPartitionMode', - 'RestartPolicy', - 'RestoreState', - 'ResultStatus', - 'RetentionPolicyType', - 'RollingUpgradeMode', - 'SafetyCheckKind', - 'ScalingMechanismKind', - 'ScalingTriggerKind', - 'Scheme', - 'SecretKind', - 'ServiceCorrelationScheme', - 'ServiceEndpointRole', - 'ServiceHostUpgradeImpact', - 'ServiceKind', - 'ServiceLoadMetricWeight', - 'ServiceOperationName', - 'ServicePackageActivationMode', - 'ServicePartitionKind', - 'ServicePartitionStatus', - 'ServicePlacementPolicyType', - 'ServiceStatus', - 'ServiceTypeRegistrationStatus', - 'SettingType', - 'SizeTypes', - 'State', - 'UpgradeDomainState', - 'UpgradeKind', - 'UpgradeMode', - 'UpgradeSortOrder', - 'UpgradeState', - 'UpgradeType', - 'UpgradeUnitState', - 'VolumeProvider', -] diff --git a/customSDK/servicefabric/models/_models.py b/customSDK/servicefabric/models/_models.py deleted file mode 100644 index fb38bb71..00000000 --- a/customSDK/servicefabric/models/_models.py +++ /dev/null @@ -1,34044 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.core.exceptions import HttpResponseError -import msrest.serialization - - -class AadMetadata(msrest.serialization.Model): - """Azure Active Directory metadata used for secured connection to cluster. - - :ivar authority: The AAD authority url. - :vartype authority: str - :ivar client: The AAD client application Id. - :vartype client: str - :ivar cluster: The AAD cluster application Id. - :vartype cluster: str - :ivar login: The AAD login url. - :vartype login: str - :ivar redirect: The client application redirect address. - :vartype redirect: str - :ivar tenant: The AAD tenant Id. - :vartype tenant: str - """ - - _attribute_map = { - 'authority': {'key': 'authority', 'type': 'str'}, - 'client': {'key': 'client', 'type': 'str'}, - 'cluster': {'key': 'cluster', 'type': 'str'}, - 'login': {'key': 'login', 'type': 'str'}, - 'redirect': {'key': 'redirect', 'type': 'str'}, - 'tenant': {'key': 'tenant', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword authority: The AAD authority url. - :paramtype authority: str - :keyword client: The AAD client application Id. - :paramtype client: str - :keyword cluster: The AAD cluster application Id. - :paramtype cluster: str - :keyword login: The AAD login url. - :paramtype login: str - :keyword redirect: The client application redirect address. - :paramtype redirect: str - :keyword tenant: The AAD tenant Id. - :paramtype tenant: str - """ - super(AadMetadata, self).__init__(**kwargs) - self.authority = kwargs.get('authority', None) - self.client = kwargs.get('client', None) - self.cluster = kwargs.get('cluster', None) - self.login = kwargs.get('login', None) - self.redirect = kwargs.get('redirect', None) - self.tenant = kwargs.get('tenant', None) - - -class AadMetadataObject(msrest.serialization.Model): - """Azure Active Directory metadata object used for secured connection to cluster. - - :ivar type: The client authentication method. - :vartype type: str - :ivar metadata: Azure Active Directory metadata used for secured connection to cluster. - :vartype metadata: ~azure.servicefabric.models.AadMetadata - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'metadata': {'key': 'metadata', 'type': 'AadMetadata'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword type: The client authentication method. - :paramtype type: str - :keyword metadata: Azure Active Directory metadata used for secured connection to cluster. - :paramtype metadata: ~azure.servicefabric.models.AadMetadata - """ - super(AadMetadataObject, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.metadata = kwargs.get('metadata', None) - - -class ScalingMechanismDescription(msrest.serialization.Model): - """Describes the mechanism for performing a scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AddRemoveIncrementalNamedPartitionScalingMechanism, PartitionInstanceCountScaleMechanism. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Specifies the kind of scaling mechanism.Constant filled by server. - Possible values include: "Invalid", "PartitionInstanceCount", - "AddRemoveIncrementalNamedPartition". - :vartype kind: str or ~azure.servicefabric.models.ScalingMechanismKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AddRemoveIncrementalNamedPartition': 'AddRemoveIncrementalNamedPartitionScalingMechanism', 'PartitionInstanceCount': 'PartitionInstanceCountScaleMechanism'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ScalingMechanismDescription, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription): - """Represents a scaling mechanism for adding or removing named partitions of a stateless service. Partition names are in the format '0','1''N-1'. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Specifies the kind of scaling mechanism.Constant filled by server. - Possible values include: "Invalid", "PartitionInstanceCount", - "AddRemoveIncrementalNamedPartition". - :vartype kind: str or ~azure.servicefabric.models.ScalingMechanismKind - :ivar min_partition_count: Required. Minimum number of named partitions of the service. - :vartype min_partition_count: int - :ivar max_partition_count: Required. Maximum number of named partitions of the service. - :vartype max_partition_count: int - :ivar scale_increment: Required. The number of instances to add or remove during a scaling - operation. - :vartype scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_partition_count': {'required': True}, - 'max_partition_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'}, - 'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'}, - 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword min_partition_count: Required. Minimum number of named partitions of the service. - :paramtype min_partition_count: int - :keyword max_partition_count: Required. Maximum number of named partitions of the service. - :paramtype max_partition_count: int - :keyword scale_increment: Required. The number of instances to add or remove during a scaling - operation. - :paramtype scale_increment: int - """ - super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs) - self.kind = 'AddRemoveIncrementalNamedPartition' # type: str - self.min_partition_count = kwargs['min_partition_count'] - self.max_partition_count = kwargs['max_partition_count'] - self.scale_increment = kwargs['scale_increment'] - - -class AutoScalingMechanism(msrest.serialization.Model): - """Describes the mechanism for performing auto scaling operation. Derived classes will describe the actual mechanism. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AddRemoveReplicaScalingMechanism. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of auto scaling mechanism.Constant filled by server. Possible - values include: "AddRemoveReplica". - :vartype kind: str or ~azure.servicefabric.models.AutoScalingMechanismKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AddRemoveReplica': 'AddRemoveReplicaScalingMechanism'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(AutoScalingMechanism, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class AddRemoveReplicaScalingMechanism(AutoScalingMechanism): - """Describes the horizontal auto scaling mechanism that adds or removes replicas (containers or container groups). - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of auto scaling mechanism.Constant filled by server. Possible - values include: "AddRemoveReplica". - :vartype kind: str or ~azure.servicefabric.models.AutoScalingMechanismKind - :ivar min_count: Required. Minimum number of containers (scale down won't be performed below - this number). - :vartype min_count: int - :ivar max_count: Required. Maximum number of containers (scale up won't be performed above this - number). - :vartype max_count: int - :ivar scale_increment: Required. Each time auto scaling is performed, this number of containers - will be added or removed. - :vartype scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_count': {'required': True}, - 'max_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'scale_increment': {'key': 'scaleIncrement', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword min_count: Required. Minimum number of containers (scale down won't be performed below - this number). - :paramtype min_count: int - :keyword max_count: Required. Maximum number of containers (scale up won't be performed above - this number). - :paramtype max_count: int - :keyword scale_increment: Required. Each time auto scaling is performed, this number of - containers will be added or removed. - :paramtype scale_increment: int - """ - super(AddRemoveReplicaScalingMechanism, self).__init__(**kwargs) - self.kind = 'AddRemoveReplica' # type: str - self.min_count = kwargs['min_count'] - self.max_count = kwargs['max_count'] - self.scale_increment = kwargs['scale_increment'] - - -class AnalysisEventMetadata(msrest.serialization.Model): - """Metadata about an Analysis Event. - - :ivar delay: The analysis delay. - :vartype delay: ~datetime.timedelta - :ivar duration: The duration of analysis. - :vartype duration: ~datetime.timedelta - """ - - _attribute_map = { - 'delay': {'key': 'Delay', 'type': 'duration'}, - 'duration': {'key': 'Duration', 'type': 'duration'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword delay: The analysis delay. - :paramtype delay: ~datetime.timedelta - :keyword duration: The duration of analysis. - :paramtype duration: ~datetime.timedelta - """ - super(AnalysisEventMetadata, self).__init__(**kwargs) - self.delay = kwargs.get('delay', None) - self.duration = kwargs.get('duration', None) - - -class BackupConfigurationInfo(msrest.serialization.Model): - """Describes the backup configuration information. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationBackupConfigurationInfo, PartitionBackupConfigurationInfo, ServiceBackupConfigurationInfo. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The entity type of a Service Fabric entity such as Application, Service - or a Partition where periodic backups can be enabled.Constant filled by server. Possible values - include: "Invalid", "Partition", "Service", "Application". - :vartype kind: str or ~azure.servicefabric.models.BackupEntityKind - :ivar policy_name: The name of the backup policy which is applicable to this Service Fabric - application or service or partition. - :vartype policy_name: str - :ivar policy_inherited_from: Specifies the scope at which the backup policy is applied. - Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope - :ivar suspension_info: Describes the backup suspension details. - :vartype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - } - - _subtype_map = { - 'kind': {'Application': 'ApplicationBackupConfigurationInfo', 'Partition': 'PartitionBackupConfigurationInfo', 'Service': 'ServiceBackupConfigurationInfo'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword policy_name: The name of the backup policy which is applicable to this Service Fabric - application or service or partition. - :paramtype policy_name: str - :keyword policy_inherited_from: Specifies the scope at which the backup policy is applied. - Possible values include: "Invalid", "Partition", "Service", "Application". - :paramtype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope - :keyword suspension_info: Describes the backup suspension details. - :paramtype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - """ - super(BackupConfigurationInfo, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.policy_name = kwargs.get('policy_name', None) - self.policy_inherited_from = kwargs.get('policy_inherited_from', None) - self.suspension_info = kwargs.get('suspension_info', None) - - -class ApplicationBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information for a specific Service Fabric application specifying what backup policy is being applied and suspend description, if any. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The entity type of a Service Fabric entity such as Application, Service - or a Partition where periodic backups can be enabled.Constant filled by server. Possible values - include: "Invalid", "Partition", "Service", "Application". - :vartype kind: str or ~azure.servicefabric.models.BackupEntityKind - :ivar policy_name: The name of the backup policy which is applicable to this Service Fabric - application or service or partition. - :vartype policy_name: str - :ivar policy_inherited_from: Specifies the scope at which the backup policy is applied. - Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope - :ivar suspension_info: Describes the backup suspension details. - :vartype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword policy_name: The name of the backup policy which is applicable to this Service Fabric - application or service or partition. - :paramtype policy_name: str - :keyword policy_inherited_from: Specifies the scope at which the backup policy is applied. - Possible values include: "Invalid", "Partition", "Service", "Application". - :paramtype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope - :keyword suspension_info: Describes the backup suspension details. - :paramtype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - """ - super(ApplicationBackupConfigurationInfo, self).__init__(**kwargs) - self.kind = 'Application' # type: str - self.application_name = kwargs.get('application_name', None) - - -class BackupEntity(msrest.serialization.Model): - """Describes the Service Fabric entity that is configured for backup. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationBackupEntity, PartitionBackupEntity, ServiceBackupEntity. - - All required parameters must be populated in order to send to Azure. - - :ivar entity_kind: Required. The entity type of a Service Fabric entity such as Application, - Service or a Partition where periodic backups can be enabled.Constant filled by server. - Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype entity_kind: str or ~azure.servicefabric.models.BackupEntityKind - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - } - - _subtype_map = { - 'entity_kind': {'Application': 'ApplicationBackupEntity', 'Partition': 'PartitionBackupEntity', 'Service': 'ServiceBackupEntity'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(BackupEntity, self).__init__(**kwargs) - self.entity_kind = None # type: Optional[str] - - -class ApplicationBackupEntity(BackupEntity): - """Identifies the Service Fabric application which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :ivar entity_kind: Required. The entity type of a Service Fabric entity such as Application, - Service or a Partition where periodic backups can be enabled.Constant filled by server. - Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype entity_kind: str or ~azure.servicefabric.models.BackupEntityKind - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - """ - super(ApplicationBackupEntity, self).__init__(**kwargs) - self.entity_kind = 'Application' # type: str - self.application_name = kwargs.get('application_name', None) - - -class ApplicationCapacityDescription(msrest.serialization.Model): - """Describes capacity information for services of this application. This description can be used for describing the following. - - -* Reserving the capacity for the services on the nodes -* Limiting the total number of nodes that services of this application can run on -* Limiting the custom capacity metrics to limit the total consumption of this metric by the services of this application. - - :ivar minimum_nodes: The minimum number of nodes where Service Fabric will reserve capacity for - this application. Note that this does not mean that the services of this application will be - placed on all of those nodes. If this property is set to zero, no capacity will be reserved. - The value of this property cannot be more than the value of the MaximumNodes property. - :vartype minimum_nodes: long - :ivar maximum_nodes: The maximum number of nodes where Service Fabric will reserve capacity for - this application. Note that this does not mean that the services of this application will be - placed on all of those nodes. By default, the value of this property is zero and it means that - the services can be placed on any node. - :vartype maximum_nodes: long - :ivar application_metrics: List of application capacity metric description. - :vartype application_metrics: list[~azure.servicefabric.models.ApplicationMetricDescription] - """ - - _validation = { - 'minimum_nodes': {'minimum': 0}, - 'maximum_nodes': {'minimum': 0}, - } - - _attribute_map = { - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword minimum_nodes: The minimum number of nodes where Service Fabric will reserve capacity - for this application. Note that this does not mean that the services of this application will - be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. - The value of this property cannot be more than the value of the MaximumNodes property. - :paramtype minimum_nodes: long - :keyword maximum_nodes: The maximum number of nodes where Service Fabric will reserve capacity - for this application. Note that this does not mean that the services of this application will - be placed on all of those nodes. By default, the value of this property is zero and it means - that the services can be placed on any node. - :paramtype maximum_nodes: long - :keyword application_metrics: List of application capacity metric description. - :paramtype application_metrics: list[~azure.servicefabric.models.ApplicationMetricDescription] - """ - super(ApplicationCapacityDescription, self).__init__(**kwargs) - self.minimum_nodes = kwargs.get('minimum_nodes', None) - self.maximum_nodes = kwargs.get('maximum_nodes', 0) - self.application_metrics = kwargs.get('application_metrics', None) - - -class FabricEvent(msrest.serialization.Model): - """Represents the base for all Fabric Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationEvent, ClusterEvent, ContainerInstanceEvent, NodeEvent, PartitionEvent, ReplicaEvent, ServiceEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - } - - _subtype_map = { - 'kind': {'ApplicationEvent': 'ApplicationEvent', 'ClusterEvent': 'ClusterEvent', 'ContainerInstanceEvent': 'ContainerInstanceEvent', 'NodeEvent': 'NodeEvent', 'PartitionEvent': 'PartitionEvent', 'ReplicaEvent': 'ReplicaEvent', 'ServiceEvent': 'ServiceEvent'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - """ - super(FabricEvent, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.event_instance_id = kwargs['event_instance_id'] - self.category = kwargs.get('category', None) - self.time_stamp = kwargs['time_stamp'] - self.has_correlated_events = kwargs.get('has_correlated_events', None) - - -class ApplicationEvent(FabricEvent): - """Represents the base for all Application Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationContainerInstanceExitedEvent, ApplicationCreatedEvent, ApplicationDeletedEvent, ApplicationHealthReportExpiredEvent, ApplicationNewHealthReportEvent, ApplicationProcessExitedEvent, ApplicationUpgradeCompletedEvent, ApplicationUpgradeDomainCompletedEvent, ApplicationUpgradeRollbackCompletedEvent, ApplicationUpgradeRollbackStartedEvent, ApplicationUpgradeStartedEvent, ChaosCodePackageRestartScheduledEvent, DeployedApplicationHealthReportExpiredEvent, DeployedApplicationNewHealthReportEvent, DeployedServicePackageHealthReportExpiredEvent, DeployedServicePackageNewHealthReportEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ApplicationContainerInstanceExited': 'ApplicationContainerInstanceExitedEvent', 'ApplicationCreated': 'ApplicationCreatedEvent', 'ApplicationDeleted': 'ApplicationDeletedEvent', 'ApplicationHealthReportExpired': 'ApplicationHealthReportExpiredEvent', 'ApplicationNewHealthReport': 'ApplicationNewHealthReportEvent', 'ApplicationProcessExited': 'ApplicationProcessExitedEvent', 'ApplicationUpgradeCompleted': 'ApplicationUpgradeCompletedEvent', 'ApplicationUpgradeDomainCompleted': 'ApplicationUpgradeDomainCompletedEvent', 'ApplicationUpgradeRollbackCompleted': 'ApplicationUpgradeRollbackCompletedEvent', 'ApplicationUpgradeRollbackStarted': 'ApplicationUpgradeRollbackStartedEvent', 'ApplicationUpgradeStarted': 'ApplicationUpgradeStartedEvent', 'ChaosCodePackageRestartScheduled': 'ChaosCodePackageRestartScheduledEvent', 'DeployedApplicationHealthReportExpired': 'DeployedApplicationHealthReportExpiredEvent', 'DeployedApplicationNewHealthReport': 'DeployedApplicationNewHealthReportEvent', 'DeployedServicePackageHealthReportExpired': 'DeployedServicePackageHealthReportExpiredEvent', 'DeployedServicePackageNewHealthReport': 'DeployedServicePackageNewHealthReportEvent'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - """ - super(ApplicationEvent, self).__init__(**kwargs) - self.kind = 'ApplicationEvent' # type: str - self.application_id = kwargs['application_id'] - - -class ApplicationContainerInstanceExitedEvent(ApplicationEvent): - """Container Exited event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar service_name: Required. Name of Service. - :vartype service_name: str - :ivar service_package_name: Required. Name of Service package. - :vartype service_package_name: str - :ivar service_package_activation_id: Required. Activation Id of Service package. - :vartype service_package_activation_id: str - :ivar is_exclusive: Required. Indicates IsExclusive flag. - :vartype is_exclusive: bool - :ivar code_package_name: Required. Name of Code package. - :vartype code_package_name: str - :ivar entry_point_type: Required. Type of EntryPoint. - :vartype entry_point_type: str - :ivar image_name: Required. Name of Container image. - :vartype image_name: str - :ivar container_name: Required. Name of Container. - :vartype container_name: str - :ivar host_id: Required. Host Id. - :vartype host_id: str - :ivar exit_code: Required. Exit code of process. - :vartype exit_code: long - :ivar unexpected_termination: Required. Indicates if termination is unexpected. - :vartype unexpected_termination: bool - :ivar start_time: Required. Start time of process. - :vartype start_time: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'service_name': {'required': True}, - 'service_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'is_exclusive': {'required': True}, - 'code_package_name': {'required': True}, - 'entry_point_type': {'required': True}, - 'image_name': {'required': True}, - 'container_name': {'required': True}, - 'host_id': {'required': True}, - 'exit_code': {'required': True}, - 'unexpected_termination': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, - 'image_name': {'key': 'ImageName', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - 'host_id': {'key': 'HostId', 'type': 'str'}, - 'exit_code': {'key': 'ExitCode', 'type': 'long'}, - 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword service_name: Required. Name of Service. - :paramtype service_name: str - :keyword service_package_name: Required. Name of Service package. - :paramtype service_package_name: str - :keyword service_package_activation_id: Required. Activation Id of Service package. - :paramtype service_package_activation_id: str - :keyword is_exclusive: Required. Indicates IsExclusive flag. - :paramtype is_exclusive: bool - :keyword code_package_name: Required. Name of Code package. - :paramtype code_package_name: str - :keyword entry_point_type: Required. Type of EntryPoint. - :paramtype entry_point_type: str - :keyword image_name: Required. Name of Container image. - :paramtype image_name: str - :keyword container_name: Required. Name of Container. - :paramtype container_name: str - :keyword host_id: Required. Host Id. - :paramtype host_id: str - :keyword exit_code: Required. Exit code of process. - :paramtype exit_code: long - :keyword unexpected_termination: Required. Indicates if termination is unexpected. - :paramtype unexpected_termination: bool - :keyword start_time: Required. Start time of process. - :paramtype start_time: ~datetime.datetime - """ - super(ApplicationContainerInstanceExitedEvent, self).__init__(**kwargs) - self.kind = 'ApplicationContainerInstanceExited' # type: str - self.service_name = kwargs['service_name'] - self.service_package_name = kwargs['service_package_name'] - self.service_package_activation_id = kwargs['service_package_activation_id'] - self.is_exclusive = kwargs['is_exclusive'] - self.code_package_name = kwargs['code_package_name'] - self.entry_point_type = kwargs['entry_point_type'] - self.image_name = kwargs['image_name'] - self.container_name = kwargs['container_name'] - self.host_id = kwargs['host_id'] - self.exit_code = kwargs['exit_code'] - self.unexpected_termination = kwargs['unexpected_termination'] - self.start_time = kwargs['start_time'] - - -class ApplicationCreatedEvent(ApplicationEvent): - """Application Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar application_type_version: Required. Application type version. - :vartype application_type_version: str - :ivar application_definition_kind: Required. Application definition kind. - :vartype application_definition_kind: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'application_definition_kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword application_type_version: Required. Application type version. - :paramtype application_type_version: str - :keyword application_definition_kind: Required. Application definition kind. - :paramtype application_definition_kind: str - """ - super(ApplicationCreatedEvent, self).__init__(**kwargs) - self.kind = 'ApplicationCreated' # type: str - self.application_type_name = kwargs['application_type_name'] - self.application_type_version = kwargs['application_type_version'] - self.application_definition_kind = kwargs['application_definition_kind'] - - -class ApplicationDeletedEvent(ApplicationEvent): - """Application Deleted event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar application_type_version: Required. Application type version. - :vartype application_type_version: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword application_type_version: Required. Application type version. - :paramtype application_type_version: str - """ - super(ApplicationDeletedEvent, self).__init__(**kwargs) - self.kind = 'ApplicationDeleted' # type: str - self.application_type_name = kwargs['application_type_name'] - self.application_type_version = kwargs['application_type_version'] - - -class ApplicationDescription(msrest.serialization.Model): - """Describes a Service Fabric application. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the application, including the 'fabric:' URI scheme. - :vartype name: str - :ivar type_name: Required. The application type name as defined in the application manifest. - :vartype type_name: str - :ivar type_version: Required. The version of the application type as defined in the application - manifest. - :vartype type_version: str - :ivar parameter_list: List of application parameters with overridden values from their default - values specified in the application manifest. - :vartype parameter_list: list[~azure.servicefabric.models.ApplicationParameter] - :ivar application_capacity: Describes capacity information for services of this application. - This description can be used for describing the following. - - - * Reserving the capacity for the services on the nodes - * Limiting the total number of nodes that services of this application can run on - * Limiting the custom capacity metrics to limit the total consumption of this metric by the - services of this application. - :vartype application_capacity: ~azure.servicefabric.models.ApplicationCapacityDescription - :ivar managed_application_identity: Managed application identity description. - :vartype managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - - _validation = { - 'name': {'required': True}, - 'type_name': {'required': True}, - 'type_version': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'parameter_list': {'key': 'ParameterList', 'type': '[ApplicationParameter]'}, - 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'ApplicationCapacityDescription'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The name of the application, including the 'fabric:' URI scheme. - :paramtype name: str - :keyword type_name: Required. The application type name as defined in the application manifest. - :paramtype type_name: str - :keyword type_version: Required. The version of the application type as defined in the - application manifest. - :paramtype type_version: str - :keyword parameter_list: List of application parameters with overridden values from their - default values specified in the application manifest. - :paramtype parameter_list: list[~azure.servicefabric.models.ApplicationParameter] - :keyword application_capacity: Describes capacity information for services of this application. - This description can be used for describing the following. - - - * Reserving the capacity for the services on the nodes - * Limiting the total number of nodes that services of this application can run on - * Limiting the custom capacity metrics to limit the total consumption of this metric by the - services of this application. - :paramtype application_capacity: ~azure.servicefabric.models.ApplicationCapacityDescription - :keyword managed_application_identity: Managed application identity description. - :paramtype managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - super(ApplicationDescription, self).__init__(**kwargs) - self.name = kwargs['name'] - self.type_name = kwargs['type_name'] - self.type_version = kwargs['type_version'] - self.parameter_list = kwargs.get('parameter_list', None) - self.application_capacity = kwargs.get('application_capacity', None) - self.managed_application_identity = kwargs.get('managed_application_identity', None) - - -class EntityHealth(msrest.serialization.Model): - """Health information common to all entities in the cluster. It contains the aggregated health state, health events and unhealthy evaluation. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - """ - super(EntityHealth, self).__init__(**kwargs) - self.aggregated_health_state = kwargs.get('aggregated_health_state', None) - self.health_events = kwargs.get('health_events', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.health_statistics = kwargs.get('health_statistics', None) - - -class ApplicationHealth(EntityHealth): - """Represents the health of the application. Contains the application aggregated health state and the service and deployed application health states. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar name: The name of the application, including the 'fabric:' URI scheme. - :vartype name: str - :ivar service_health_states: Service health states as found in the health store. - :vartype service_health_states: list[~azure.servicefabric.models.ServiceHealthState] - :ivar deployed_application_health_states: Deployed application health states as found in the - health store. - :vartype deployed_application_health_states: - list[~azure.servicefabric.models.DeployedApplicationHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'service_health_states': {'key': 'ServiceHealthStates', 'type': '[ServiceHealthState]'}, - 'deployed_application_health_states': {'key': 'DeployedApplicationHealthStates', 'type': '[DeployedApplicationHealthState]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword name: The name of the application, including the 'fabric:' URI scheme. - :paramtype name: str - :keyword service_health_states: Service health states as found in the health store. - :paramtype service_health_states: list[~azure.servicefabric.models.ServiceHealthState] - :keyword deployed_application_health_states: Deployed application health states as found in the - health store. - :paramtype deployed_application_health_states: - list[~azure.servicefabric.models.DeployedApplicationHealthState] - """ - super(ApplicationHealth, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.service_health_states = kwargs.get('service_health_states', None) - self.deployed_application_health_states = kwargs.get('deployed_application_health_states', None) - - -class HealthEvaluation(msrest.serialization.Model): - """Represents a health evaluation which describes the data and the algorithm used by health manager to evaluate the health of an entity. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationHealthEvaluation, ApplicationTypeApplicationsHealthEvaluation, ApplicationsHealthEvaluation, DeltaNodesCheckHealthEvaluation, DeployedApplicationHealthEvaluation, DeployedApplicationsHealthEvaluation, DeployedServicePackageHealthEvaluation, DeployedServicePackagesHealthEvaluation, EventHealthEvaluation, NodeHealthEvaluation, NodeTypeNodesHealthEvaluation, NodesHealthEvaluation, PartitionHealthEvaluation, PartitionsHealthEvaluation, ReplicaHealthEvaluation, ReplicasHealthEvaluation, ServiceHealthEvaluation, ServicesHealthEvaluation, SystemApplicationHealthEvaluation, UpgradeDomainDeltaNodesCheckHealthEvaluation, UpgradeDomainDeployedApplicationsHealthEvaluation, UpgradeDomainNodesHealthEvaluation. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Application': 'ApplicationHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'NodeTypeNodes': 'NodeTypeNodesHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainDeployedApplications': 'UpgradeDomainDeployedApplicationsHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - """ - super(HealthEvaluation, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.aggregated_health_state = kwargs.get('aggregated_health_state', None) - self.description = kwargs.get('description', None) - - -class ApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for an application, containing information about the data and the algorithm used by the health store to evaluate health. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated - health state of the application. The types of the unhealthy evaluations can be - DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current - aggregated health state of the application. The types of the unhealthy evaluations can be - DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(ApplicationHealthEvaluation, self).__init__(**kwargs) - self.kind = 'Application' # type: str - self.application_name = kwargs.get('application_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class ApplicationHealthPolicies(msrest.serialization.Model): - """Defines the application health policy map used to evaluate the health of an application or one of its children entities. - - :ivar application_health_policy_map: The wrapper that contains the map with application health - policies used to evaluate specific applications in the cluster. - :vartype application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword application_health_policy_map: The wrapper that contains the map with application - health policies used to evaluate specific applications in the cluster. - :paramtype application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - """ - super(ApplicationHealthPolicies, self).__init__(**kwargs) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) - - -class ApplicationHealthPolicy(msrest.serialization.Model): - """Defines a health policy used to evaluate the health of an application or one of its children entities. - - :ivar consider_warning_as_error: Indicates whether warnings are treated with the same severity - as errors. - :vartype consider_warning_as_error: bool - :ivar max_percent_unhealthy_deployed_applications: The maximum allowed percentage of unhealthy - deployed applications. Allowed values are Byte values from zero to 100. - The percentage represents the maximum tolerated percentage of deployed applications that can - be unhealthy before the application is considered in error. - This is calculated by dividing the number of unhealthy deployed applications over the number - of nodes where the application is currently deployed on in the cluster. - The computation rounds up to tolerate one failure on small numbers of nodes. Default - percentage is zero. - :vartype max_percent_unhealthy_deployed_applications: int - :ivar default_service_type_health_policy: The health policy used by default to evaluate the - health of a service type. - :vartype default_service_type_health_policy: - ~azure.servicefabric.models.ServiceTypeHealthPolicy - :ivar service_type_health_policy_map: The map with service type health policy per service type - name. The map is empty by default. - :vartype service_type_health_policy_map: - list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem] - """ - - _attribute_map = { - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'default_service_type_health_policy': {'key': 'DefaultServiceTypeHealthPolicy', 'type': 'ServiceTypeHealthPolicy'}, - 'service_type_health_policy_map': {'key': 'ServiceTypeHealthPolicyMap', 'type': '[ServiceTypeHealthPolicyMapItem]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword consider_warning_as_error: Indicates whether warnings are treated with the same - severity as errors. - :paramtype consider_warning_as_error: bool - :keyword max_percent_unhealthy_deployed_applications: The maximum allowed percentage of - unhealthy deployed applications. Allowed values are Byte values from zero to 100. - The percentage represents the maximum tolerated percentage of deployed applications that can - be unhealthy before the application is considered in error. - This is calculated by dividing the number of unhealthy deployed applications over the number - of nodes where the application is currently deployed on in the cluster. - The computation rounds up to tolerate one failure on small numbers of nodes. Default - percentage is zero. - :paramtype max_percent_unhealthy_deployed_applications: int - :keyword default_service_type_health_policy: The health policy used by default to evaluate the - health of a service type. - :paramtype default_service_type_health_policy: - ~azure.servicefabric.models.ServiceTypeHealthPolicy - :keyword service_type_health_policy_map: The map with service type health policy per service - type name. The map is empty by default. - :paramtype service_type_health_policy_map: - list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem] - """ - super(ApplicationHealthPolicy, self).__init__(**kwargs) - self.consider_warning_as_error = kwargs.get('consider_warning_as_error', False) - self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', 0) - self.default_service_type_health_policy = kwargs.get('default_service_type_health_policy', None) - self.service_type_health_policy_map = kwargs.get('service_type_health_policy_map', None) - - -class ApplicationHealthPolicyMapItem(msrest.serialization.Model): - """Defines an item in ApplicationHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :ivar key: Required. The key of the application health policy map item. This is the name of the - application. - :vartype key: str - :ivar value: Required. The value of the application health policy map item. This is the - ApplicationHealthPolicy for this application. - :vartype value: ~azure.servicefabric.models.ApplicationHealthPolicy - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ApplicationHealthPolicy'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: Required. The key of the application health policy map item. This is the name of - the application. - :paramtype key: str - :keyword value: Required. The value of the application health policy map item. This is the - ApplicationHealthPolicy for this application. - :paramtype value: ~azure.servicefabric.models.ApplicationHealthPolicy - """ - super(ApplicationHealthPolicyMapItem, self).__init__(**kwargs) - self.key = kwargs['key'] - self.value = kwargs['value'] - - -class ApplicationHealthPolicyMapObject(msrest.serialization.Model): - """Represents the map of application health policies for a ServiceFabric cluster upgrade. - - :ivar application_health_policy_map: Defines a map that contains specific application health - policies for different applications. - Each entry specifies as key the application name and as value an ApplicationHealthPolicy used - to evaluate the application health. - If an application is not specified in the map, the application health evaluation uses the - ApplicationHealthPolicy found in its application manifest or the default application health - policy (if no health policy is defined in the manifest). - The map is empty by default. - :vartype application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword application_health_policy_map: Defines a map that contains specific application health - policies for different applications. - Each entry specifies as key the application name and as value an ApplicationHealthPolicy used - to evaluate the application health. - If an application is not specified in the map, the application health evaluation uses the - ApplicationHealthPolicy found in its application manifest or the default application health - policy (if no health policy is defined in the manifest). - The map is empty by default. - :paramtype application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - """ - super(ApplicationHealthPolicyMapObject, self).__init__(**kwargs) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) - - -class ApplicationHealthReportExpiredEvent(ApplicationEvent): - """Application Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_instance_id: Required. Id of Application instance. - :vartype application_instance_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_instance_id: Required. Id of Application instance. - :paramtype application_instance_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(ApplicationHealthReportExpiredEvent, self).__init__(**kwargs) - self.kind = 'ApplicationHealthReportExpired' # type: str - self.application_instance_id = kwargs['application_instance_id'] - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class EntityHealthState(msrest.serialization.Model): - """A base type for the health state of various entities in the cluster. It contains the aggregated health state. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - """ - super(EntityHealthState, self).__init__(**kwargs) - self.aggregated_health_state = kwargs.get('aggregated_health_state', None) - - -class ApplicationHealthState(EntityHealthState): - """Represents the health state of an application, which contains the application identifier and the aggregated health state. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar name: The name of the application, including the 'fabric:' URI scheme. - :vartype name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword name: The name of the application, including the 'fabric:' URI scheme. - :paramtype name: str - """ - super(ApplicationHealthState, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class EntityHealthStateChunk(msrest.serialization.Model): - """A base type for the health state chunk of various entities in the cluster. It contains the aggregated health state. - - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - """ - super(EntityHealthStateChunk, self).__init__(**kwargs) - self.health_state = kwargs.get('health_state', None) - - -class ApplicationHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a application. -The application health state chunk contains the application name, its aggregated health state and any children services and deployed applications that respect the filters in cluster health chunk query description. - - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar application_type_name: The application type name as defined in the application manifest. - :vartype application_type_name: str - :ivar service_health_state_chunks: The list of service health state chunks in the cluster that - respect the filters in the cluster health chunk query description. - :vartype service_health_state_chunks: ~azure.servicefabric.models.ServiceHealthStateChunkList - :ivar deployed_application_health_state_chunks: The list of deployed application health state - chunks in the cluster that respect the filters in the cluster health chunk query description. - :vartype deployed_application_health_state_chunks: - ~azure.servicefabric.models.DeployedApplicationHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_health_state_chunks': {'key': 'ServiceHealthStateChunks', 'type': 'ServiceHealthStateChunkList'}, - 'deployed_application_health_state_chunks': {'key': 'DeployedApplicationHealthStateChunks', 'type': 'DeployedApplicationHealthStateChunkList'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword application_type_name: The application type name as defined in the application - manifest. - :paramtype application_type_name: str - :keyword service_health_state_chunks: The list of service health state chunks in the cluster - that respect the filters in the cluster health chunk query description. - :paramtype service_health_state_chunks: ~azure.servicefabric.models.ServiceHealthStateChunkList - :keyword deployed_application_health_state_chunks: The list of deployed application health - state chunks in the cluster that respect the filters in the cluster health chunk query - description. - :paramtype deployed_application_health_state_chunks: - ~azure.servicefabric.models.DeployedApplicationHealthStateChunkList - """ - super(ApplicationHealthStateChunk, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.application_type_name = kwargs.get('application_type_name', None) - self.service_health_state_chunks = kwargs.get('service_health_state_chunks', None) - self.deployed_application_health_state_chunks = kwargs.get('deployed_application_health_state_chunks', None) - - -class EntityHealthStateChunkList(msrest.serialization.Model): - """A base type for the list of health state chunks found in the cluster. It contains the total number of health states that match the input filters. - - :ivar total_count: Total number of entity health state objects that match the specified filters - from the cluster health chunk query description. - :vartype total_count: long - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword total_count: Total number of entity health state objects that match the specified - filters from the cluster health chunk query description. - :paramtype total_count: long - """ - super(EntityHealthStateChunkList, self).__init__(**kwargs) - self.total_count = kwargs.get('total_count', None) - - -class ApplicationHealthStateChunkList(EntityHealthStateChunkList): - """The list of application health state chunks in the cluster that respect the input filters in the chunk query. Returned by get cluster health state chunks query. - - :ivar total_count: Total number of entity health state objects that match the specified filters - from the cluster health chunk query description. - :vartype total_count: long - :ivar items: The list of application health state chunks that respect the input filters in the - chunk query. - :vartype items: list[~azure.servicefabric.models.ApplicationHealthStateChunk] - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'items': {'key': 'Items', 'type': '[ApplicationHealthStateChunk]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword total_count: Total number of entity health state objects that match the specified - filters from the cluster health chunk query description. - :paramtype total_count: long - :keyword items: The list of application health state chunks that respect the input filters in - the chunk query. - :paramtype items: list[~azure.servicefabric.models.ApplicationHealthStateChunk] - """ - super(ApplicationHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) - - -class ApplicationHealthStateFilter(msrest.serialization.Model): - """Defines matching criteria to determine whether a application should be included in the cluster health chunk. -One filter can match zero, one or multiple applications, depending on its properties. - - :ivar application_name_filter: The name of the application that matches the filter, as a fabric - uri. The filter is applied only to the specified application, if it exists. - If the application doesn't exist, no application is returned in the cluster health chunk based - on this filter. - If the application exists, it is included in the cluster health chunk if it respects the other - filter properties. - If not specified, all applications are matched against the other filter members, like health - state filter. - :vartype application_name_filter: str - :ivar application_type_name_filter: The name of the application type that matches the filter. - If specified, the filter is applied only to applications of the selected application type, if - any exists. - If no applications of the specified application type exists, no application is returned in the - cluster health chunk based on this filter. - Each application of the specified application type is included in the cluster health chunk if - it respects the other filter properties. - If not specified, all applications are matched against the other filter members, like health - state filter. - :vartype application_type_name_filter: str - :ivar health_state_filter: The filter for the health state of the applications. It allows - selecting applications if they match the desired health states. - The possible values are integer value of one of the following health states. Only applications - that match the filter are returned. All applications are used to evaluate the cluster - aggregated health state. - If not specified, default value is None, unless the application name or the application type - name are specified. If the filter has default value and application name is specified, the - matching application is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches applications with HealthState value of OK - (2) and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :vartype health_state_filter: int - :ivar service_filters: Defines a list of filters that specify which services to be included in - the returned cluster health chunk as children of the application. The services are returned - only if the parent application matches a filter. - If the list is empty, no services are returned. All the services are used to evaluate the - parent application aggregated health state, regardless of the input filters. - The application filter may specify multiple service filters. - For example, it can specify a filter to return all services with health state Error and - another filter to always include a service identified by its service name. - :vartype service_filters: list[~azure.servicefabric.models.ServiceHealthStateFilter] - :ivar deployed_application_filters: Defines a list of filters that specify which deployed - applications to be included in the returned cluster health chunk as children of the - application. The deployed applications are returned only if the parent application matches a - filter. - If the list is empty, no deployed applications are returned. All the deployed applications are - used to evaluate the parent application aggregated health state, regardless of the input - filters. - The application filter may specify multiple deployed application filters. - For example, it can specify a filter to return all deployed applications with health state - Error and another filter to always include a deployed application on a specified node. - :vartype deployed_application_filters: - list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter] - """ - - _attribute_map = { - 'application_name_filter': {'key': 'ApplicationNameFilter', 'type': 'str'}, - 'application_type_name_filter': {'key': 'ApplicationTypeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'service_filters': {'key': 'ServiceFilters', 'type': '[ServiceHealthStateFilter]'}, - 'deployed_application_filters': {'key': 'DeployedApplicationFilters', 'type': '[DeployedApplicationHealthStateFilter]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword application_name_filter: The name of the application that matches the filter, as a - fabric uri. The filter is applied only to the specified application, if it exists. - If the application doesn't exist, no application is returned in the cluster health chunk based - on this filter. - If the application exists, it is included in the cluster health chunk if it respects the other - filter properties. - If not specified, all applications are matched against the other filter members, like health - state filter. - :paramtype application_name_filter: str - :keyword application_type_name_filter: The name of the application type that matches the - filter. - If specified, the filter is applied only to applications of the selected application type, if - any exists. - If no applications of the specified application type exists, no application is returned in the - cluster health chunk based on this filter. - Each application of the specified application type is included in the cluster health chunk if - it respects the other filter properties. - If not specified, all applications are matched against the other filter members, like health - state filter. - :paramtype application_type_name_filter: str - :keyword health_state_filter: The filter for the health state of the applications. It allows - selecting applications if they match the desired health states. - The possible values are integer value of one of the following health states. Only applications - that match the filter are returned. All applications are used to evaluate the cluster - aggregated health state. - If not specified, default value is None, unless the application name or the application type - name are specified. If the filter has default value and application name is specified, the - matching application is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches applications with HealthState value of OK - (2) and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :paramtype health_state_filter: int - :keyword service_filters: Defines a list of filters that specify which services to be included - in the returned cluster health chunk as children of the application. The services are returned - only if the parent application matches a filter. - If the list is empty, no services are returned. All the services are used to evaluate the - parent application aggregated health state, regardless of the input filters. - The application filter may specify multiple service filters. - For example, it can specify a filter to return all services with health state Error and - another filter to always include a service identified by its service name. - :paramtype service_filters: list[~azure.servicefabric.models.ServiceHealthStateFilter] - :keyword deployed_application_filters: Defines a list of filters that specify which deployed - applications to be included in the returned cluster health chunk as children of the - application. The deployed applications are returned only if the parent application matches a - filter. - If the list is empty, no deployed applications are returned. All the deployed applications are - used to evaluate the parent application aggregated health state, regardless of the input - filters. - The application filter may specify multiple deployed application filters. - For example, it can specify a filter to return all deployed applications with health state - Error and another filter to always include a deployed application on a specified node. - :paramtype deployed_application_filters: - list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter] - """ - super(ApplicationHealthStateFilter, self).__init__(**kwargs) - self.application_name_filter = kwargs.get('application_name_filter', None) - self.application_type_name_filter = kwargs.get('application_type_name_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - self.service_filters = kwargs.get('service_filters', None) - self.deployed_application_filters = kwargs.get('deployed_application_filters', None) - - -class ApplicationInfo(msrest.serialization.Model): - """Information about a Service Fabric application. - - :ivar id: The identity of the application. This is an encoded representation of the application - name. This is used in the REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype id: str - :ivar name: The name of the application, including the 'fabric:' URI scheme. - :vartype name: str - :ivar type_name: The application type name as defined in the application manifest. - :vartype type_name: str - :ivar type_version: The version of the application type as defined in the application manifest. - :vartype type_version: str - :ivar status: The status of the application. Possible values include: "Invalid", "Ready", - "Upgrading", "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ApplicationStatus - :ivar parameters: List of application parameters with overridden values from their default - values specified in the application manifest. - :vartype parameters: list[~azure.servicefabric.models.ApplicationParameter] - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar application_definition_kind: The mechanism used to define a Service Fabric application. - Possible values include: "Invalid", "ServiceFabricApplicationDescription", "Compose". - :vartype application_definition_kind: str or - ~azure.servicefabric.models.ApplicationDefinitionKind - :ivar managed_application_identity: Managed application identity description. - :vartype managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - :ivar application_metadata: Metadata associated with a specific application. - :vartype application_metadata: ~azure.servicefabric.models.ApplicationMetadata - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - 'application_metadata': {'key': 'ApplicationMetadata', 'type': 'ApplicationMetadata'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: The identity of the application. This is an encoded representation of the - application name. This is used in the REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype id: str - :keyword name: The name of the application, including the 'fabric:' URI scheme. - :paramtype name: str - :keyword type_name: The application type name as defined in the application manifest. - :paramtype type_name: str - :keyword type_version: The version of the application type as defined in the application - manifest. - :paramtype type_version: str - :keyword status: The status of the application. Possible values include: "Invalid", "Ready", - "Upgrading", "Creating", "Deleting", "Failed". - :paramtype status: str or ~azure.servicefabric.models.ApplicationStatus - :keyword parameters: List of application parameters with overridden values from their default - values specified in the application manifest. - :paramtype parameters: list[~azure.servicefabric.models.ApplicationParameter] - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword application_definition_kind: The mechanism used to define a Service Fabric - application. Possible values include: "Invalid", "ServiceFabricApplicationDescription", - "Compose". - :paramtype application_definition_kind: str or - ~azure.servicefabric.models.ApplicationDefinitionKind - :keyword managed_application_identity: Managed application identity description. - :paramtype managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - :keyword application_metadata: Metadata associated with a specific application. - :paramtype application_metadata: ~azure.servicefabric.models.ApplicationMetadata - """ - super(ApplicationInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.type_version = kwargs.get('type_version', None) - self.status = kwargs.get('status', None) - self.parameters = kwargs.get('parameters', None) - self.health_state = kwargs.get('health_state', None) - self.application_definition_kind = kwargs.get('application_definition_kind', None) - self.managed_application_identity = kwargs.get('managed_application_identity', None) - self.application_metadata = kwargs.get('application_metadata', None) - - -class ApplicationLoadInfo(msrest.serialization.Model): - """Load Information about a Service Fabric application. - - :ivar id: The identity of the application. This is an encoded representation of the application - name. This is used in the REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype id: str - :ivar minimum_nodes: The minimum number of nodes for this application. - It is the number of nodes where Service Fabric will reserve Capacity in the cluster which - equals to ReservedLoad * MinimumNodes for this Application instance. - For applications that do not have application capacity defined this value will be zero. - :vartype minimum_nodes: long - :ivar maximum_nodes: The maximum number of nodes where this application can be instantiated. - It is the number of nodes this application is allowed to span. - For applications that do not have application capacity defined this value will be zero. - :vartype maximum_nodes: long - :ivar node_count: The number of nodes on which this application is instantiated. - For applications that do not have application capacity defined this value will be zero. - :vartype node_count: long - :ivar application_load_metric_information: List of application load metric information. - :vartype application_load_metric_information: - list[~azure.servicefabric.models.ApplicationLoadMetricInformation] - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'node_count': {'key': 'NodeCount', 'type': 'long'}, - 'application_load_metric_information': {'key': 'ApplicationLoadMetricInformation', 'type': '[ApplicationLoadMetricInformation]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: The identity of the application. This is an encoded representation of the - application name. This is used in the REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype id: str - :keyword minimum_nodes: The minimum number of nodes for this application. - It is the number of nodes where Service Fabric will reserve Capacity in the cluster which - equals to ReservedLoad * MinimumNodes for this Application instance. - For applications that do not have application capacity defined this value will be zero. - :paramtype minimum_nodes: long - :keyword maximum_nodes: The maximum number of nodes where this application can be instantiated. - It is the number of nodes this application is allowed to span. - For applications that do not have application capacity defined this value will be zero. - :paramtype maximum_nodes: long - :keyword node_count: The number of nodes on which this application is instantiated. - For applications that do not have application capacity defined this value will be zero. - :paramtype node_count: long - :keyword application_load_metric_information: List of application load metric information. - :paramtype application_load_metric_information: - list[~azure.servicefabric.models.ApplicationLoadMetricInformation] - """ - super(ApplicationLoadInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.minimum_nodes = kwargs.get('minimum_nodes', None) - self.maximum_nodes = kwargs.get('maximum_nodes', None) - self.node_count = kwargs.get('node_count', None) - self.application_load_metric_information = kwargs.get('application_load_metric_information', None) - - -class ApplicationLoadMetricInformation(msrest.serialization.Model): - """Describes load information for a custom resource balancing metric. This can be used to limit the total consumption of this metric by the services of this application. - - :ivar name: The name of the metric. - :vartype name: str - :ivar reservation_capacity: This is the capacity reserved in the cluster for the application. - It's the product of NodeReservationCapacity and MinimumNodes. - If set to zero, no capacity is reserved for this metric. - When setting application capacity or when updating application capacity this value must be - smaller than or equal to MaximumCapacity for each metric. - :vartype reservation_capacity: long - :ivar application_capacity: Total capacity for this metric in this application instance. - :vartype application_capacity: long - :ivar application_load: Current load for this metric in this application instance. - :vartype application_load: long - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, - 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'long'}, - 'application_load': {'key': 'ApplicationLoad', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The name of the metric. - :paramtype name: str - :keyword reservation_capacity: This is the capacity reserved in the cluster for the - application. - It's the product of NodeReservationCapacity and MinimumNodes. - If set to zero, no capacity is reserved for this metric. - When setting application capacity or when updating application capacity this value must be - smaller than or equal to MaximumCapacity for each metric. - :paramtype reservation_capacity: long - :keyword application_capacity: Total capacity for this metric in this application instance. - :paramtype application_capacity: long - :keyword application_load: Current load for this metric in this application instance. - :paramtype application_load: long - """ - super(ApplicationLoadMetricInformation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.reservation_capacity = kwargs.get('reservation_capacity', None) - self.application_capacity = kwargs.get('application_capacity', None) - self.application_load = kwargs.get('application_load', None) - - -class ApplicationMetadata(msrest.serialization.Model): - """Metadata associated with a specific application. - - :ivar arm_metadata: Common ArmMetadata assocaited with Service Fabric Entities. - :vartype arm_metadata: ~azure.servicefabric.models.ArmMetadata - """ - - _attribute_map = { - 'arm_metadata': {'key': 'ArmMetadata', 'type': 'ArmMetadata'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword arm_metadata: Common ArmMetadata assocaited with Service Fabric Entities. - :paramtype arm_metadata: ~azure.servicefabric.models.ArmMetadata - """ - super(ApplicationMetadata, self).__init__(**kwargs) - self.arm_metadata = kwargs.get('arm_metadata', None) - - -class ApplicationMetricDescription(msrest.serialization.Model): - """Describes capacity information for a custom resource balancing metric. This can be used to limit the total consumption of this metric by the services of this application. - - :ivar name: The name of the metric. - :vartype name: str - :ivar maximum_capacity: The maximum node capacity for Service Fabric application. - This is the maximum Load for an instance of this application on a single node. Even if the - capacity of node is greater than this value, Service Fabric will limit the total load of - services within the application on each node to this value. - If set to zero, capacity for this metric is unlimited on each node. - When creating a new application with application capacity defined, the product of MaximumNodes - and this value must always be smaller than or equal to TotalApplicationCapacity. - When updating existing application with application capacity, the product of MaximumNodes and - this value must always be smaller than or equal to TotalApplicationCapacity. - :vartype maximum_capacity: long - :ivar reservation_capacity: The node reservation capacity for Service Fabric application. - This is the amount of load which is reserved on nodes which have instances of this - application. - If MinimumNodes is specified, then the product of these values will be the capacity reserved - in the cluster for the application. - If set to zero, no capacity is reserved for this metric. - When setting application capacity or when updating application capacity; this value must be - smaller than or equal to MaximumCapacity for each metric. - :vartype reservation_capacity: long - :ivar total_application_capacity: The total metric capacity for Service Fabric application. - This is the total metric capacity for this application in the cluster. Service Fabric will try - to limit the sum of loads of services within the application to this value. - When creating a new application with application capacity defined, the product of MaximumNodes - and MaximumCapacity must always be smaller than or equal to this value. - :vartype total_application_capacity: long - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'maximum_capacity': {'key': 'MaximumCapacity', 'type': 'long'}, - 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, - 'total_application_capacity': {'key': 'TotalApplicationCapacity', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The name of the metric. - :paramtype name: str - :keyword maximum_capacity: The maximum node capacity for Service Fabric application. - This is the maximum Load for an instance of this application on a single node. Even if the - capacity of node is greater than this value, Service Fabric will limit the total load of - services within the application on each node to this value. - If set to zero, capacity for this metric is unlimited on each node. - When creating a new application with application capacity defined, the product of MaximumNodes - and this value must always be smaller than or equal to TotalApplicationCapacity. - When updating existing application with application capacity, the product of MaximumNodes and - this value must always be smaller than or equal to TotalApplicationCapacity. - :paramtype maximum_capacity: long - :keyword reservation_capacity: The node reservation capacity for Service Fabric application. - This is the amount of load which is reserved on nodes which have instances of this - application. - If MinimumNodes is specified, then the product of these values will be the capacity reserved - in the cluster for the application. - If set to zero, no capacity is reserved for this metric. - When setting application capacity or when updating application capacity; this value must be - smaller than or equal to MaximumCapacity for each metric. - :paramtype reservation_capacity: long - :keyword total_application_capacity: The total metric capacity for Service Fabric application. - This is the total metric capacity for this application in the cluster. Service Fabric will try - to limit the sum of loads of services within the application to this value. - When creating a new application with application capacity defined, the product of MaximumNodes - and MaximumCapacity must always be smaller than or equal to this value. - :paramtype total_application_capacity: long - """ - super(ApplicationMetricDescription, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.maximum_capacity = kwargs.get('maximum_capacity', None) - self.reservation_capacity = kwargs.get('reservation_capacity', None) - self.total_application_capacity = kwargs.get('total_application_capacity', None) - - -class ApplicationNameInfo(msrest.serialization.Model): - """Information about the application name. - - :ivar id: The identity of the application. This is an encoded representation of the application - name. This is used in the REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype id: str - :ivar name: The name of the application, including the 'fabric:' URI scheme. - :vartype name: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: The identity of the application. This is an encoded representation of the - application name. This is used in the REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype id: str - :keyword name: The name of the application, including the 'fabric:' URI scheme. - :paramtype name: str - """ - super(ApplicationNameInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - - -class ApplicationNewHealthReportEvent(ApplicationEvent): - """Application Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_instance_id: Required. Id of Application instance. - :vartype application_instance_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_instance_id: Required. Id of Application instance. - :paramtype application_instance_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(ApplicationNewHealthReportEvent, self).__init__(**kwargs) - self.kind = 'ApplicationNewHealthReport' # type: str - self.application_instance_id = kwargs['application_instance_id'] - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class ApplicationParameter(msrest.serialization.Model): - """Describes an application parameter override to be applied when creating or upgrading an application. - - All required parameters must be populated in order to send to Azure. - - :ivar key: Required. The name of the parameter. - :vartype key: str - :ivar value: Required. The value of the parameter. - :vartype value: str - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: Required. The name of the parameter. - :paramtype key: str - :keyword value: Required. The value of the parameter. - :paramtype value: str - """ - super(ApplicationParameter, self).__init__(**kwargs) - self.key = kwargs['key'] - self.value = kwargs['value'] - - -class ApplicationProcessExitedEvent(ApplicationEvent): - """Process Exited event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar service_name: Required. Name of Service. - :vartype service_name: str - :ivar service_package_name: Required. Name of Service package. - :vartype service_package_name: str - :ivar service_package_activation_id: Required. Activation Id of Service package. - :vartype service_package_activation_id: str - :ivar is_exclusive: Required. Indicates IsExclusive flag. - :vartype is_exclusive: bool - :ivar code_package_name: Required. Name of Code package. - :vartype code_package_name: str - :ivar entry_point_type: Required. Type of EntryPoint. - :vartype entry_point_type: str - :ivar exe_name: Required. Name of executable. - :vartype exe_name: str - :ivar process_id: Required. Process Id. - :vartype process_id: long - :ivar host_id: Required. Host Id. - :vartype host_id: str - :ivar exit_code: Required. Exit code of process. - :vartype exit_code: long - :ivar unexpected_termination: Required. Indicates if termination is unexpected. - :vartype unexpected_termination: bool - :ivar start_time: Required. Start time of process. - :vartype start_time: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'service_name': {'required': True}, - 'service_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'is_exclusive': {'required': True}, - 'code_package_name': {'required': True}, - 'entry_point_type': {'required': True}, - 'exe_name': {'required': True}, - 'process_id': {'required': True}, - 'host_id': {'required': True}, - 'exit_code': {'required': True}, - 'unexpected_termination': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, - 'exe_name': {'key': 'ExeName', 'type': 'str'}, - 'process_id': {'key': 'ProcessId', 'type': 'long'}, - 'host_id': {'key': 'HostId', 'type': 'str'}, - 'exit_code': {'key': 'ExitCode', 'type': 'long'}, - 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword service_name: Required. Name of Service. - :paramtype service_name: str - :keyword service_package_name: Required. Name of Service package. - :paramtype service_package_name: str - :keyword service_package_activation_id: Required. Activation Id of Service package. - :paramtype service_package_activation_id: str - :keyword is_exclusive: Required. Indicates IsExclusive flag. - :paramtype is_exclusive: bool - :keyword code_package_name: Required. Name of Code package. - :paramtype code_package_name: str - :keyword entry_point_type: Required. Type of EntryPoint. - :paramtype entry_point_type: str - :keyword exe_name: Required. Name of executable. - :paramtype exe_name: str - :keyword process_id: Required. Process Id. - :paramtype process_id: long - :keyword host_id: Required. Host Id. - :paramtype host_id: str - :keyword exit_code: Required. Exit code of process. - :paramtype exit_code: long - :keyword unexpected_termination: Required. Indicates if termination is unexpected. - :paramtype unexpected_termination: bool - :keyword start_time: Required. Start time of process. - :paramtype start_time: ~datetime.datetime - """ - super(ApplicationProcessExitedEvent, self).__init__(**kwargs) - self.kind = 'ApplicationProcessExited' # type: str - self.service_name = kwargs['service_name'] - self.service_package_name = kwargs['service_package_name'] - self.service_package_activation_id = kwargs['service_package_activation_id'] - self.is_exclusive = kwargs['is_exclusive'] - self.code_package_name = kwargs['code_package_name'] - self.entry_point_type = kwargs['entry_point_type'] - self.exe_name = kwargs['exe_name'] - self.process_id = kwargs['process_id'] - self.host_id = kwargs['host_id'] - self.exit_code = kwargs['exit_code'] - self.unexpected_termination = kwargs['unexpected_termination'] - self.start_time = kwargs['start_time'] - - -class ApplicationResourceDescription(msrest.serialization.Model): - """This type describes a application resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of the Application resource. - :vartype name: str - :ivar identity: Describes the identity of the application. - :vartype identity: ~azure.servicefabric.models.IdentityDescription - :ivar description: User readable description of the application. - :vartype description: str - :ivar services: Describes the services in the application. This property is used to create or - modify services of the application. On get only the name of the service is returned. The - service description can be obtained by querying for the service resource. - :vartype services: list[~azure.servicefabric.models.ServiceResourceDescription] - :ivar diagnostics: Describes the diagnostics definition and usage for an application resource. - :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsDescription - :ivar debug_params: Internal - used by Visual Studio to setup the debugging session on the - local development environment. - :vartype debug_params: str - :ivar service_names: Names of the services in the application. - :vartype service_names: list[str] - :ivar status: Status of the application. Possible values include: "Unknown", "Ready", - "Upgrading", "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the application. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. Possible values - include: "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the application's health state is not 'Ok', this additional - details from service fabric Health Manager for the user to know why the application is marked - unhealthy. - :vartype unhealthy_evaluation: str - """ - - _validation = { - 'name': {'required': True}, - 'service_names': {'readonly': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'IdentityDescription'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, - 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, - 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. Name of the Application resource. - :paramtype name: str - :keyword identity: Describes the identity of the application. - :paramtype identity: ~azure.servicefabric.models.IdentityDescription - :keyword description: User readable description of the application. - :paramtype description: str - :keyword services: Describes the services in the application. This property is used to create - or modify services of the application. On get only the name of the service is returned. The - service description can be obtained by querying for the service resource. - :paramtype services: list[~azure.servicefabric.models.ServiceResourceDescription] - :keyword diagnostics: Describes the diagnostics definition and usage for an application - resource. - :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsDescription - :keyword debug_params: Internal - used by Visual Studio to setup the debugging session on the - local development environment. - :paramtype debug_params: str - """ - super(ApplicationResourceDescription, self).__init__(**kwargs) - self.name = kwargs['name'] - self.identity = kwargs.get('identity', None) - self.description = kwargs.get('description', None) - self.services = kwargs.get('services', None) - self.diagnostics = kwargs.get('diagnostics', None) - self.debug_params = kwargs.get('debug_params', None) - self.service_names = None - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - - -class ApplicationResourceUpgradeProgressInfo(msrest.serialization.Model): - """This type describes an application resource upgrade. - - :ivar name: Name of the Application resource. - :vartype name: str - :ivar target_application_type_version: The target application version for the application - upgrade. - :vartype target_application_type_version: str - :ivar start_timestamp_utc: The estimated UTC datetime when the upgrade started. - :vartype start_timestamp_utc: str - :ivar upgrade_state: The state of the application resource upgrade. Possible values include: - "Invalid", "ProvisioningTarget", "RollingForward", "UnprovisioningCurrent", - "CompletedRollforward", "RollingBack", "UnprovisioningTarget", "CompletedRollback", "Failed". - :vartype upgrade_state: str or ~azure.servicefabric.models.ApplicationResourceUpgradeState - :ivar percent_completed: The estimated percent of replicas are completed in the upgrade. - :vartype percent_completed: str - :ivar service_upgrade_progress: List of service upgrade progresses. - :vartype service_upgrade_progress: list[~azure.servicefabric.models.ServiceUpgradeProgress] - :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: - "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored". Default value: "Monitored". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.RollingUpgradeMode - :ivar upgrade_duration: The estimated amount of time that the overall upgrade elapsed. It is - first interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :vartype upgrade_duration: str - :ivar application_upgrade_status_details: Additional detailed information about the status of - the pending upgrade. - :vartype application_upgrade_status_details: str - :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :vartype upgrade_replica_set_check_timeout_in_seconds: long - :ivar failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and - FailureAction was executed. - :vartype failure_timestamp_utc: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'percent_completed': {'key': 'PercentCompleted', 'type': 'str'}, - 'service_upgrade_progress': {'key': 'ServiceUpgradeProgress', 'type': '[ServiceUpgradeProgress]'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Name of the Application resource. - :paramtype name: str - :keyword target_application_type_version: The target application version for the application - upgrade. - :paramtype target_application_type_version: str - :keyword start_timestamp_utc: The estimated UTC datetime when the upgrade started. - :paramtype start_timestamp_utc: str - :keyword upgrade_state: The state of the application resource upgrade. Possible values include: - "Invalid", "ProvisioningTarget", "RollingForward", "UnprovisioningCurrent", - "CompletedRollforward", "RollingBack", "UnprovisioningTarget", "CompletedRollback", "Failed". - :paramtype upgrade_state: str or ~azure.servicefabric.models.ApplicationResourceUpgradeState - :keyword percent_completed: The estimated percent of replicas are completed in the upgrade. - :paramtype percent_completed: str - :keyword service_upgrade_progress: List of service upgrade progresses. - :paramtype service_upgrade_progress: list[~azure.servicefabric.models.ServiceUpgradeProgress] - :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: - "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored". Default value: "Monitored". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.RollingUpgradeMode - :keyword upgrade_duration: The estimated amount of time that the overall upgrade elapsed. It is - first interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :paramtype upgrade_duration: str - :keyword application_upgrade_status_details: Additional detailed information about the status - of the pending upgrade. - :paramtype application_upgrade_status_details: str - :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :paramtype upgrade_replica_set_check_timeout_in_seconds: long - :keyword failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and - FailureAction was executed. - :paramtype failure_timestamp_utc: str - """ - super(ApplicationResourceUpgradeProgressInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.target_application_type_version = kwargs.get('target_application_type_version', None) - self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.percent_completed = kwargs.get('percent_completed', None) - self.service_upgrade_progress = kwargs.get('service_upgrade_progress', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "Monitored") - self.upgrade_duration = kwargs.get('upgrade_duration', "PT0H2M0S") - self.application_upgrade_status_details = kwargs.get('application_upgrade_status_details', None) - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925) - self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) - - -class VolumeReference(msrest.serialization.Model): - """Describes a reference to a volume resource. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of the volume being referenced. - :vartype name: str - :ivar read_only: The flag indicating whether the volume is read only. Default is 'false'. - :vartype read_only: bool - :ivar destination_path: Required. The path within the container at which the volume should be - mounted. Only valid path characters are allowed. - :vartype 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 - ): - """ - :keyword name: Required. Name of the volume being referenced. - :paramtype name: str - :keyword read_only: The flag indicating whether the volume is read only. Default is 'false'. - :paramtype read_only: bool - :keyword destination_path: Required. The path within the container at which the volume should - be mounted. Only valid path characters are allowed. - :paramtype destination_path: str - """ - super(VolumeReference, self).__init__(**kwargs) - self.name = kwargs['name'] - self.read_only = kwargs.get('read_only', None) - self.destination_path = kwargs['destination_path'] - - -class ApplicationScopedVolume(VolumeReference): - """Describes a volume whose lifetime is scoped to the application's lifetime. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of the volume being referenced. - :vartype name: str - :ivar read_only: The flag indicating whether the volume is read only. Default is 'false'. - :vartype read_only: bool - :ivar destination_path: Required. The path within the container at which the volume should be - mounted. Only valid path characters are allowed. - :vartype destination_path: str - :ivar creation_parameters: Required. Describes parameters for creating application-scoped - volumes. - :vartype creation_parameters: - ~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters - """ - - _validation = { - 'name': {'required': True}, - 'destination_path': {'required': True}, - 'creation_parameters': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'destination_path': {'key': 'destinationPath', 'type': 'str'}, - 'creation_parameters': {'key': 'creationParameters', 'type': 'ApplicationScopedVolumeCreationParameters'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. Name of the volume being referenced. - :paramtype name: str - :keyword read_only: The flag indicating whether the volume is read only. Default is 'false'. - :paramtype read_only: bool - :keyword destination_path: Required. The path within the container at which the volume should - be mounted. Only valid path characters are allowed. - :paramtype destination_path: str - :keyword creation_parameters: Required. Describes parameters for creating application-scoped - volumes. - :paramtype creation_parameters: - ~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters - """ - super(ApplicationScopedVolume, self).__init__(**kwargs) - self.creation_parameters = kwargs['creation_parameters'] - - -class ApplicationScopedVolumeCreationParameters(msrest.serialization.Model): - """Describes parameters for creating application-scoped volumes. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Specifies the application-scoped volume kind.Constant filled by server. - Possible values include: "ServiceFabricVolumeDisk". - :vartype kind: str or ~azure.servicefabric.models.ApplicationScopedVolumeKind - :ivar description: User readable description of the volume. - :vartype description: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ServiceFabricVolumeDisk': 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword description: User readable description of the volume. - :paramtype description: str - """ - super(ApplicationScopedVolumeCreationParameters, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.description = kwargs.get('description', None) - - -class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk(ApplicationScopedVolumeCreationParameters): - """Describes parameters for creating application-scoped volumes provided by Service Fabric Volume Disks. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Specifies the application-scoped volume kind.Constant filled by server. - Possible values include: "ServiceFabricVolumeDisk". - :vartype kind: str or ~azure.servicefabric.models.ApplicationScopedVolumeKind - :ivar description: User readable description of the volume. - :vartype description: str - :ivar size_disk: Required. Volume size. Possible values include: "Small", "Medium", "Large". - :vartype size_disk: str or ~azure.servicefabric.models.SizeTypes - """ - - _validation = { - 'kind': {'required': True}, - 'size_disk': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'size_disk': {'key': 'sizeDisk', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword description: User readable description of the volume. - :paramtype description: str - :keyword size_disk: Required. Volume size. Possible values include: "Small", "Medium", "Large". - :paramtype size_disk: str or ~azure.servicefabric.models.SizeTypes - """ - super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__(**kwargs) - self.kind = 'ServiceFabricVolumeDisk' # type: str - self.size_disk = kwargs['size_disk'] - - -class ApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for applications, containing health evaluations for each unhealthy application that impacted current aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar max_percent_unhealthy_applications: Maximum allowed percentage of unhealthy applications - from the ClusterHealthPolicy. - :vartype max_percent_unhealthy_applications: int - :ivar total_count: Total number of applications from the health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy ApplicationHealthEvaluation that impacted the aggregated - health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword max_percent_unhealthy_applications: Maximum allowed percentage of unhealthy - applications from the ClusterHealthPolicy. - :paramtype max_percent_unhealthy_applications: int - :keyword total_count: Total number of applications from the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy ApplicationHealthEvaluation that impacted the aggregated - health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(ApplicationsHealthEvaluation, self).__init__(**kwargs) - self.kind = 'Applications' # type: str - self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for applications of a particular application type. The application type applications evaluation can be returned when cluster health evaluation returns unhealthy aggregated health state, either Error or Warning. It contains health evaluations for each unhealthy application of the included application type that impacted current aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar application_type_name: The application type name as defined in the application manifest. - :vartype application_type_name: str - :ivar max_percent_unhealthy_applications: Maximum allowed percentage of unhealthy applications - for the application type, specified as an entry in ApplicationTypeHealthPolicyMap. - :vartype max_percent_unhealthy_applications: int - :ivar total_count: Total number of applications of the application type found in the health - store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy ApplicationHealthEvaluation of this application type that - impacted the aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword application_type_name: The application type name as defined in the application - manifest. - :paramtype application_type_name: str - :keyword max_percent_unhealthy_applications: Maximum allowed percentage of unhealthy - applications for the application type, specified as an entry in ApplicationTypeHealthPolicyMap. - :paramtype max_percent_unhealthy_applications: int - :keyword total_count: Total number of applications of the application type found in the health - store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy ApplicationHealthEvaluation of this application type that - impacted the aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(ApplicationTypeApplicationsHealthEvaluation, self).__init__(**kwargs) - self.kind = 'ApplicationTypeApplications' # type: str - self.application_type_name = kwargs.get('application_type_name', None) - self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class ApplicationTypeHealthPolicyMapItem(msrest.serialization.Model): - """Defines an item in ApplicationTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :ivar key: Required. The key of the application type health policy map item. This is the name - of the application type. - :vartype key: str - :ivar value: Required. The value of the application type health policy map item. - The max percent unhealthy applications allowed for the application type. Must be between zero - and 100. - :vartype value: int - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: Required. The key of the application type health policy map item. This is the - name of the application type. - :paramtype key: str - :keyword value: Required. The value of the application type health policy map item. - The max percent unhealthy applications allowed for the application type. Must be between zero - and 100. - :paramtype value: int - """ - super(ApplicationTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = kwargs['key'] - self.value = kwargs['value'] - - -class ApplicationTypeImageStorePath(msrest.serialization.Model): - """Path description for the application package in the image store specified during the prior copy operation. - - All required parameters must be populated in order to send to Azure. - - :ivar application_type_build_path: Required. The relative image store path to the application - package. - :vartype application_type_build_path: str - """ - - _validation = { - 'application_type_build_path': {'required': True}, - } - - _attribute_map = { - 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword application_type_build_path: Required. The relative image store path to the - application package. - :paramtype application_type_build_path: str - """ - super(ApplicationTypeImageStorePath, self).__init__(**kwargs) - self.application_type_build_path = kwargs['application_type_build_path'] - - -class ApplicationTypeInfo(msrest.serialization.Model): - """Information about an application type. - - :ivar name: The application type name as defined in the application manifest. - :vartype name: str - :ivar version: The version of the application type as defined in the application manifest. - :vartype version: str - :ivar default_parameter_list: List of application type parameters that can be overridden when - creating or updating the application. - :vartype default_parameter_list: list[~azure.servicefabric.models.ApplicationParameter] - :ivar status: The status of the application type. Possible values include: "Invalid", - "Provisioning", "Available", "Unprovisioning", "Failed". - :vartype status: str or ~azure.servicefabric.models.ApplicationTypeStatus - :ivar status_details: Additional detailed information about the status of the application type. - :vartype status_details: str - :ivar application_type_definition_kind: The mechanism used to define a Service Fabric - application type. Possible values include: "Invalid", "ServiceFabricApplicationPackage", - "Compose". - :vartype application_type_definition_kind: str or - ~azure.servicefabric.models.ApplicationTypeDefinitionKind - :ivar application_type_metadata: Metadata associated with a specific application type. - :vartype application_type_metadata: ~azure.servicefabric.models.ApplicationTypeMetadata - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'default_parameter_list': {'key': 'DefaultParameterList', 'type': '[ApplicationParameter]'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - 'application_type_definition_kind': {'key': 'ApplicationTypeDefinitionKind', 'type': 'str'}, - 'application_type_metadata': {'key': 'ApplicationTypeMetadata', 'type': 'ApplicationTypeMetadata'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The application type name as defined in the application manifest. - :paramtype name: str - :keyword version: The version of the application type as defined in the application manifest. - :paramtype version: str - :keyword default_parameter_list: List of application type parameters that can be overridden - when creating or updating the application. - :paramtype default_parameter_list: list[~azure.servicefabric.models.ApplicationParameter] - :keyword status: The status of the application type. Possible values include: "Invalid", - "Provisioning", "Available", "Unprovisioning", "Failed". - :paramtype status: str or ~azure.servicefabric.models.ApplicationTypeStatus - :keyword status_details: Additional detailed information about the status of the application - type. - :paramtype status_details: str - :keyword application_type_definition_kind: The mechanism used to define a Service Fabric - application type. Possible values include: "Invalid", "ServiceFabricApplicationPackage", - "Compose". - :paramtype application_type_definition_kind: str or - ~azure.servicefabric.models.ApplicationTypeDefinitionKind - :keyword application_type_metadata: Metadata associated with a specific application type. - :paramtype application_type_metadata: ~azure.servicefabric.models.ApplicationTypeMetadata - """ - super(ApplicationTypeInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) - self.default_parameter_list = kwargs.get('default_parameter_list', None) - self.status = kwargs.get('status', None) - self.status_details = kwargs.get('status_details', None) - self.application_type_definition_kind = kwargs.get('application_type_definition_kind', None) - self.application_type_metadata = kwargs.get('application_type_metadata', None) - - -class ApplicationTypeManifest(msrest.serialization.Model): - """Contains the manifest describing an application type registered in a Service Fabric cluster. - - :ivar manifest: The XML manifest as a string. - :vartype manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword manifest: The XML manifest as a string. - :paramtype manifest: str - """ - super(ApplicationTypeManifest, self).__init__(**kwargs) - self.manifest = kwargs.get('manifest', None) - - -class ApplicationTypeMetadata(msrest.serialization.Model): - """Metadata associated with a specific application type. - - :ivar application_type_provision_timestamp: The timestamp when the application type was - provisioned. - :vartype application_type_provision_timestamp: str - :ivar arm_metadata: Common ArmMetadata assocaited with Service Fabric Entities. - :vartype arm_metadata: ~azure.servicefabric.models.ArmMetadata - """ - - _attribute_map = { - 'application_type_provision_timestamp': {'key': 'ApplicationTypeProvisionTimestamp', 'type': 'str'}, - 'arm_metadata': {'key': 'ArmMetadata', 'type': 'ArmMetadata'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword application_type_provision_timestamp: The timestamp when the application type was - provisioned. - :paramtype application_type_provision_timestamp: str - :keyword arm_metadata: Common ArmMetadata assocaited with Service Fabric Entities. - :paramtype arm_metadata: ~azure.servicefabric.models.ArmMetadata - """ - super(ApplicationTypeMetadata, self).__init__(**kwargs) - self.application_type_provision_timestamp = kwargs.get('application_type_provision_timestamp', None) - self.arm_metadata = kwargs.get('arm_metadata', None) - - -class ApplicationUpdateDescription(msrest.serialization.Model): - """Describes the parameters for updating an application instance. - - :ivar flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - If flags are not specified for a certain property, the property will not be updated even if - the new value is provided. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - Exception is RemoveApplicationCapacity which cannot be specified along with other parameters. - For example, if the provided value is 3 then the flags for MinimumNodes (1) and MaximumNodes - (2) are set. - - - * None - Does not indicate any other properties are set. The value is 0. - * MinimumNodes - Indicates whether the MinimumNodes property is set. The value is 1. - * MaximumNodes - Indicates whether the MinimumNodes property is set. The value is 2. - * ApplicationMetrics - Indicates whether the ApplicationMetrics property is set. The value is - 4. - :vartype flags: str - :ivar remove_application_capacity: Used to clear all parameters related to Application Capacity - for this application. | - It is not possible to specify this parameter together with other Application Capacity - parameters. - :vartype remove_application_capacity: bool - :ivar minimum_nodes: The minimum number of nodes where Service Fabric will reserve capacity for - this application. Note that this does not mean that the services of this application will be - placed on all of those nodes. If this property is set to zero, no capacity will be reserved. - The value of this property cannot be more than the value of the MaximumNodes property. - :vartype minimum_nodes: long - :ivar maximum_nodes: The maximum number of nodes where Service Fabric will reserve capacity for - this application. Note that this does not mean that the services of this application will be - placed on all of those nodes. By default, the value of this property is zero and it means that - the services can be placed on any node. - :vartype maximum_nodes: long - :ivar application_metrics: List of application capacity metric description. - :vartype application_metrics: list[~azure.servicefabric.models.ApplicationMetricDescription] - """ - - _validation = { - 'minimum_nodes': {'minimum': 0}, - 'maximum_nodes': {'minimum': 0}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'remove_application_capacity': {'key': 'RemoveApplicationCapacity', 'type': 'bool'}, - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - If flags are not specified for a certain property, the property will not be updated even if - the new value is provided. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - Exception is RemoveApplicationCapacity which cannot be specified along with other parameters. - For example, if the provided value is 3 then the flags for MinimumNodes (1) and MaximumNodes - (2) are set. - - - * None - Does not indicate any other properties are set. The value is 0. - * MinimumNodes - Indicates whether the MinimumNodes property is set. The value is 1. - * MaximumNodes - Indicates whether the MinimumNodes property is set. The value is 2. - * ApplicationMetrics - Indicates whether the ApplicationMetrics property is set. The value is - 4. - :paramtype flags: str - :keyword remove_application_capacity: Used to clear all parameters related to Application - Capacity for this application. | - It is not possible to specify this parameter together with other Application Capacity - parameters. - :paramtype remove_application_capacity: bool - :keyword minimum_nodes: The minimum number of nodes where Service Fabric will reserve capacity - for this application. Note that this does not mean that the services of this application will - be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. - The value of this property cannot be more than the value of the MaximumNodes property. - :paramtype minimum_nodes: long - :keyword maximum_nodes: The maximum number of nodes where Service Fabric will reserve capacity - for this application. Note that this does not mean that the services of this application will - be placed on all of those nodes. By default, the value of this property is zero and it means - that the services can be placed on any node. - :paramtype maximum_nodes: long - :keyword application_metrics: List of application capacity metric description. - :paramtype application_metrics: list[~azure.servicefabric.models.ApplicationMetricDescription] - """ - super(ApplicationUpdateDescription, self).__init__(**kwargs) - self.flags = kwargs.get('flags', None) - self.remove_application_capacity = kwargs.get('remove_application_capacity', False) - self.minimum_nodes = kwargs.get('minimum_nodes', None) - self.maximum_nodes = kwargs.get('maximum_nodes', 0) - self.application_metrics = kwargs.get('application_metrics', None) - - -class ApplicationUpgradeCompletedEvent(ApplicationEvent): - """Application Upgrade Completed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar application_type_version: Required. Application type version. - :vartype application_type_version: str - :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. - :vartype overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword application_type_version: Required. Application type version. - :paramtype application_type_version: str - :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. - :paramtype overall_upgrade_elapsed_time_in_ms: float - """ - super(ApplicationUpgradeCompletedEvent, self).__init__(**kwargs) - self.kind = 'ApplicationUpgradeCompleted' # type: str - self.application_type_name = kwargs['application_type_name'] - self.application_type_version = kwargs['application_type_version'] - self.overall_upgrade_elapsed_time_in_ms = kwargs['overall_upgrade_elapsed_time_in_ms'] - - -class ApplicationUpgradeDescription(msrest.serialization.Model): - """Describes the parameters for an application upgrade. Note that upgrade description replaces the existing application description. This means that if the parameters are not specified, the existing parameters on the applications will be overwritten with the empty parameters list. This would result in the application using the default value of the parameters from the application manifest. If you do not want to change any existing parameter values, please get the application parameters first using the GetApplicationInfo query and then supply those values as Parameters in this ApplicationUpgradeDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the target application, including the 'fabric:' URI scheme. - :vartype name: str - :ivar target_application_type_version: Required. The target application type version (found in - the application manifest) for the application upgrade. - :vartype target_application_type_version: str - :ivar parameters: List of application parameters with overridden values from their default - values specified in the application manifest. - :vartype parameters: list[~azure.servicefabric.models.ApplicationParameter] - :ivar upgrade_kind: Required. The kind of upgrade out of the following possible values. - Possible values include: "Invalid", "Rolling". Default value: "Rolling". - :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :vartype upgrade_replica_set_check_timeout_in_seconds: long - :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when - the code version has not changed (the upgrade only changes configuration or data). - :vartype force_restart: bool - :ivar sort_order: Defines the order in which an upgrade proceeds through the cluster. Possible - values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", - "ReverseLexicographical". Default value: "Default". - :vartype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. - :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :ivar application_health_policy: Defines a health policy used to evaluate the health of an - application or one of its children entities. - :vartype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :ivar instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a stateless - instance is closed, to allow the active requests to drain gracefully. This would be effective - when the instance is closing during the application/cluster - upgrade, only for those instances which have a non-zero delay duration configured in the - service description. See InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates - that the behavior will entirely depend on the delay configured in the stateless service - description. - :vartype instance_close_delay_duration_in_seconds: long - :ivar managed_application_identity: Managed application identity description. - :vartype managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - - _validation = { - 'name': {'required': True}, - 'target_application_type_version': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The name of the target application, including the 'fabric:' URI - scheme. - :paramtype name: str - :keyword target_application_type_version: Required. The target application type version (found - in the application manifest) for the application upgrade. - :paramtype target_application_type_version: str - :keyword parameters: List of application parameters with overridden values from their default - values specified in the application manifest. - :paramtype parameters: list[~azure.servicefabric.models.ApplicationParameter] - :keyword upgrade_kind: Required. The kind of upgrade out of the following possible values. - Possible values include: "Invalid", "Rolling". Default value: "Rolling". - :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :paramtype upgrade_replica_set_check_timeout_in_seconds: long - :keyword force_restart: If true, then processes are forcefully restarted during upgrade even - when the code version has not changed (the upgrade only changes configuration or data). - :paramtype force_restart: bool - :keyword sort_order: Defines the order in which an upgrade proceeds through the cluster. - Possible values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", - "ReverseLexicographical". Default value: "Default". - :paramtype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored - mode. - :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :keyword application_health_policy: Defines a health policy used to evaluate the health of an - application or one of its children entities. - :paramtype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a - stateless instance is closed, to allow the active requests to drain gracefully. This would be - effective when the instance is closing during the application/cluster - upgrade, only for those instances which have a non-zero delay duration configured in the - service description. See InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates - that the behavior will entirely depend on the delay configured in the stateless service - description. - :paramtype instance_close_delay_duration_in_seconds: long - :keyword managed_application_identity: Managed application identity description. - :paramtype managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - super(ApplicationUpgradeDescription, self).__init__(**kwargs) - self.name = kwargs['name'] - self.target_application_type_version = kwargs['target_application_type_version'] - self.parameters = kwargs.get('parameters', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925) - self.force_restart = kwargs.get('force_restart', False) - self.sort_order = kwargs.get('sort_order', "Default") - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.application_health_policy = kwargs.get('application_health_policy', None) - self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', 4294967295) - self.managed_application_identity = kwargs.get('managed_application_identity', None) - - -class ApplicationUpgradeDomainCompletedEvent(ApplicationEvent): - """Application Upgrade Domain Completed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar current_application_type_version: Required. Current Application type version. - :vartype current_application_type_version: str - :ivar application_type_version: Required. Target Application type version. - :vartype application_type_version: str - :ivar upgrade_state: Required. State of upgrade. - :vartype upgrade_state: str - :ivar upgrade_domains: Required. Upgrade domains. - :vartype upgrade_domains: str - :ivar upgrade_domain_elapsed_time_in_ms: Required. Upgrade time of domain in milli-seconds. - :vartype upgrade_domain_elapsed_time_in_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'upgrade_state': {'required': True}, - 'upgrade_domains': {'required': True}, - 'upgrade_domain_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, - 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword current_application_type_version: Required. Current Application type version. - :paramtype current_application_type_version: str - :keyword application_type_version: Required. Target Application type version. - :paramtype application_type_version: str - :keyword upgrade_state: Required. State of upgrade. - :paramtype upgrade_state: str - :keyword upgrade_domains: Required. Upgrade domains. - :paramtype upgrade_domains: str - :keyword upgrade_domain_elapsed_time_in_ms: Required. Upgrade time of domain in milli-seconds. - :paramtype upgrade_domain_elapsed_time_in_ms: float - """ - super(ApplicationUpgradeDomainCompletedEvent, self).__init__(**kwargs) - self.kind = 'ApplicationUpgradeDomainCompleted' # type: str - self.application_type_name = kwargs['application_type_name'] - self.current_application_type_version = kwargs['current_application_type_version'] - self.application_type_version = kwargs['application_type_version'] - self.upgrade_state = kwargs['upgrade_state'] - self.upgrade_domains = kwargs['upgrade_domains'] - self.upgrade_domain_elapsed_time_in_ms = kwargs['upgrade_domain_elapsed_time_in_ms'] - - -class ApplicationUpgradeProgressInfo(msrest.serialization.Model): - """Describes the parameters for an application upgrade. - - :ivar name: The name of the target application, including the 'fabric:' URI scheme. - :vartype name: str - :ivar type_name: The application type name as defined in the application manifest. - :vartype type_name: str - :ivar target_application_type_version: The target application type version (found in the - application manifest) for the application upgrade. - :vartype target_application_type_version: str - :ivar upgrade_domains: List of upgrade domains and their statuses. Not applicable to - node-by-node upgrades. - :vartype upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] - :ivar upgrade_units: List of upgrade units and their statuses. - :vartype upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] - :ivar upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", - "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", - "RollingForwardInProgress", "RollingForwardCompleted", "Failed". - :vartype upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :ivar next_upgrade_domain: The name of the next upgrade domain to be processed. Not applicable - to node-by-node upgrades. - :vartype next_upgrade_domain: str - :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :ivar upgrade_description: Describes the parameters for an application upgrade. Note that - upgrade description replaces the existing application description. This means that if the - parameters are not specified, the existing parameters on the applications will be overwritten - with the empty parameters list. This would result in the application using the default value of - the parameters from the application manifest. If you do not want to change any existing - parameter values, please get the application parameters first using the GetApplicationInfo - query and then supply those values as Parameters in this ApplicationUpgradeDescription. - :vartype upgrade_description: ~azure.servicefabric.models.ApplicationUpgradeDescription - :ivar upgrade_duration_in_milliseconds: The estimated total amount of time spent processing the - overall upgrade. - :vartype upgrade_duration_in_milliseconds: str - :ivar upgrade_domain_duration_in_milliseconds: The estimated total amount of time spent - processing the current upgrade domain. - :vartype upgrade_domain_duration_in_milliseconds: str - :ivar unhealthy_evaluations: List of health evaluations that resulted in the current aggregated - health state. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar current_upgrade_domain_progress: Information about the current in-progress upgrade - domain. Not applicable to node-by-node upgrades. - :vartype current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :ivar current_upgrade_units_progress: Information about the current in-progress upgrade units. - :vartype current_upgrade_units_progress: - ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo - :ivar start_timestamp_utc: The estimated UTC datetime when the upgrade started. - :vartype start_timestamp_utc: str - :ivar failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and - FailureAction was executed. - :vartype failure_timestamp_utc: str - :ivar failure_reason: The cause of an upgrade failure that resulted in FailureAction being - executed. Possible values include: "None", "Interrupted", "HealthCheck", - "UpgradeDomainTimeout", "OverallUpgradeTimeout". - :vartype failure_reason: str or ~azure.servicefabric.models.FailureReason - :ivar upgrade_domain_progress_at_failure: Information about the upgrade domain progress at the - time of upgrade failure. - :vartype upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo - :ivar upgrade_status_details: Additional detailed information about the status of the pending - upgrade. - :vartype upgrade_status_details: str - :ivar is_node_by_node: Indicates whether this upgrade is node-by-node. - :vartype is_node_by_node: bool - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, - 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ApplicationUpgradeDescription'}, - 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, - 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, - 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, - 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The name of the target application, including the 'fabric:' URI scheme. - :paramtype name: str - :keyword type_name: The application type name as defined in the application manifest. - :paramtype type_name: str - :keyword target_application_type_version: The target application type version (found in the - application manifest) for the application upgrade. - :paramtype target_application_type_version: str - :keyword upgrade_domains: List of upgrade domains and their statuses. Not applicable to - node-by-node upgrades. - :paramtype upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] - :keyword upgrade_units: List of upgrade units and their statuses. - :paramtype upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] - :keyword upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", - "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", - "RollingForwardInProgress", "RollingForwardCompleted", "Failed". - :paramtype upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :keyword next_upgrade_domain: The name of the next upgrade domain to be processed. Not - applicable to node-by-node upgrades. - :paramtype next_upgrade_domain: str - :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :keyword upgrade_description: Describes the parameters for an application upgrade. Note that - upgrade description replaces the existing application description. This means that if the - parameters are not specified, the existing parameters on the applications will be overwritten - with the empty parameters list. This would result in the application using the default value of - the parameters from the application manifest. If you do not want to change any existing - parameter values, please get the application parameters first using the GetApplicationInfo - query and then supply those values as Parameters in this ApplicationUpgradeDescription. - :paramtype upgrade_description: ~azure.servicefabric.models.ApplicationUpgradeDescription - :keyword upgrade_duration_in_milliseconds: The estimated total amount of time spent processing - the overall upgrade. - :paramtype upgrade_duration_in_milliseconds: str - :keyword upgrade_domain_duration_in_milliseconds: The estimated total amount of time spent - processing the current upgrade domain. - :paramtype upgrade_domain_duration_in_milliseconds: str - :keyword unhealthy_evaluations: List of health evaluations that resulted in the current - aggregated health state. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword current_upgrade_domain_progress: Information about the current in-progress upgrade - domain. Not applicable to node-by-node upgrades. - :paramtype current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :keyword current_upgrade_units_progress: Information about the current in-progress upgrade - units. - :paramtype current_upgrade_units_progress: - ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo - :keyword start_timestamp_utc: The estimated UTC datetime when the upgrade started. - :paramtype start_timestamp_utc: str - :keyword failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and - FailureAction was executed. - :paramtype failure_timestamp_utc: str - :keyword failure_reason: The cause of an upgrade failure that resulted in FailureAction being - executed. Possible values include: "None", "Interrupted", "HealthCheck", - "UpgradeDomainTimeout", "OverallUpgradeTimeout". - :paramtype failure_reason: str or ~azure.servicefabric.models.FailureReason - :keyword upgrade_domain_progress_at_failure: Information about the upgrade domain progress at - the time of upgrade failure. - :paramtype upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo - :keyword upgrade_status_details: Additional detailed information about the status of the - pending upgrade. - :paramtype upgrade_status_details: str - :keyword is_node_by_node: Indicates whether this upgrade is node-by-node. - :paramtype is_node_by_node: bool - """ - super(ApplicationUpgradeProgressInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.target_application_type_version = kwargs.get('target_application_type_version', None) - self.upgrade_domains = kwargs.get('upgrade_domains', None) - self.upgrade_units = kwargs.get('upgrade_units', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.next_upgrade_domain = kwargs.get('next_upgrade_domain', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_description = kwargs.get('upgrade_description', None) - self.upgrade_duration_in_milliseconds = kwargs.get('upgrade_duration_in_milliseconds', None) - self.upgrade_domain_duration_in_milliseconds = kwargs.get('upgrade_domain_duration_in_milliseconds', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) - self.current_upgrade_units_progress = kwargs.get('current_upgrade_units_progress', None) - self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) - self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) - self.upgrade_status_details = kwargs.get('upgrade_status_details', None) - self.is_node_by_node = kwargs.get('is_node_by_node', False) - - -class ApplicationUpgradeRollbackCompletedEvent(ApplicationEvent): - """Application Upgrade Rollback Completed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar application_type_version: Required. Application type version. - :vartype application_type_version: str - :ivar failure_reason: Required. Describes reason of failure. - :vartype failure_reason: str - :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. - :vartype overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword application_type_version: Required. Application type version. - :paramtype application_type_version: str - :keyword failure_reason: Required. Describes reason of failure. - :paramtype failure_reason: str - :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. - :paramtype overall_upgrade_elapsed_time_in_ms: float - """ - super(ApplicationUpgradeRollbackCompletedEvent, self).__init__(**kwargs) - self.kind = 'ApplicationUpgradeRollbackCompleted' # type: str - self.application_type_name = kwargs['application_type_name'] - self.application_type_version = kwargs['application_type_version'] - self.failure_reason = kwargs['failure_reason'] - self.overall_upgrade_elapsed_time_in_ms = kwargs['overall_upgrade_elapsed_time_in_ms'] - - -class ApplicationUpgradeRollbackStartedEvent(ApplicationEvent): - """Application Upgrade Rollback Started event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar current_application_type_version: Required. Current Application type version. - :vartype current_application_type_version: str - :ivar application_type_version: Required. Target Application type version. - :vartype application_type_version: str - :ivar failure_reason: Required. Describes reason of failure. - :vartype failure_reason: str - :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. - :vartype overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword current_application_type_version: Required. Current Application type version. - :paramtype current_application_type_version: str - :keyword application_type_version: Required. Target Application type version. - :paramtype application_type_version: str - :keyword failure_reason: Required. Describes reason of failure. - :paramtype failure_reason: str - :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. - :paramtype overall_upgrade_elapsed_time_in_ms: float - """ - super(ApplicationUpgradeRollbackStartedEvent, self).__init__(**kwargs) - self.kind = 'ApplicationUpgradeRollbackStarted' # type: str - self.application_type_name = kwargs['application_type_name'] - self.current_application_type_version = kwargs['current_application_type_version'] - self.application_type_version = kwargs['application_type_version'] - self.failure_reason = kwargs['failure_reason'] - self.overall_upgrade_elapsed_time_in_ms = kwargs['overall_upgrade_elapsed_time_in_ms'] - - -class ApplicationUpgradeStartedEvent(ApplicationEvent): - """Application Upgrade Started event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar current_application_type_version: Required. Current Application type version. - :vartype current_application_type_version: str - :ivar application_type_version: Required. Target Application type version. - :vartype application_type_version: str - :ivar upgrade_type: Required. Type of upgrade. - :vartype upgrade_type: str - :ivar rolling_upgrade_mode: Required. Mode of upgrade. - :vartype rolling_upgrade_mode: str - :ivar failure_action: Required. Action if failed. - :vartype failure_action: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'upgrade_type': {'required': True}, - 'rolling_upgrade_mode': {'required': True}, - 'failure_action': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword current_application_type_version: Required. Current Application type version. - :paramtype current_application_type_version: str - :keyword application_type_version: Required. Target Application type version. - :paramtype application_type_version: str - :keyword upgrade_type: Required. Type of upgrade. - :paramtype upgrade_type: str - :keyword rolling_upgrade_mode: Required. Mode of upgrade. - :paramtype rolling_upgrade_mode: str - :keyword failure_action: Required. Action if failed. - :paramtype failure_action: str - """ - super(ApplicationUpgradeStartedEvent, self).__init__(**kwargs) - self.kind = 'ApplicationUpgradeStarted' # type: str - self.application_type_name = kwargs['application_type_name'] - self.current_application_type_version = kwargs['current_application_type_version'] - self.application_type_version = kwargs['application_type_version'] - self.upgrade_type = kwargs['upgrade_type'] - self.rolling_upgrade_mode = kwargs['rolling_upgrade_mode'] - self.failure_action = kwargs['failure_action'] - - -class ApplicationUpgradeUpdateDescription(msrest.serialization.Model): - """Describes the parameters for updating an ongoing application upgrade. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the application, including the 'fabric:' URI scheme. - :vartype name: str - :ivar upgrade_kind: Required. The kind of upgrade out of the following possible values. - Possible values include: "Invalid", "Rolling". Default value: "Rolling". - :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :ivar application_health_policy: Defines a health policy used to evaluate the health of an - application or one of its children entities. - :vartype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :ivar update_description: Describes the parameters for updating a rolling upgrade of - application or cluster. - :vartype update_description: ~azure.servicefabric.models.RollingUpgradeUpdateDescription - """ - - _validation = { - 'name': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The name of the application, including the 'fabric:' URI scheme. - :paramtype name: str - :keyword upgrade_kind: Required. The kind of upgrade out of the following possible values. - Possible values include: "Invalid", "Rolling". Default value: "Rolling". - :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :keyword application_health_policy: Defines a health policy used to evaluate the health of an - application or one of its children entities. - :paramtype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword update_description: Describes the parameters for updating a rolling upgrade of - application or cluster. - :paramtype update_description: ~azure.servicefabric.models.RollingUpgradeUpdateDescription - """ - super(ApplicationUpgradeUpdateDescription, self).__init__(**kwargs) - self.name = kwargs['name'] - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.application_health_policy = kwargs.get('application_health_policy', None) - self.update_description = kwargs.get('update_description', None) - - -class ArmMetadata(msrest.serialization.Model): - """Common ArmMetadata assocaited with Service Fabric Entities. - - :ivar arm_resource_id: A string containing the ArmResourceId. - :vartype arm_resource_id: str - """ - - _attribute_map = { - 'arm_resource_id': {'key': 'ArmResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword arm_resource_id: A string containing the ArmResourceId. - :paramtype arm_resource_id: str - """ - super(ArmMetadata, self).__init__(**kwargs) - self.arm_resource_id = kwargs.get('arm_resource_id', None) - - -class AutoScalingMetric(msrest.serialization.Model): - """Describes the metric that is used for triggering auto scaling operation. Derived classes will describe resources or metrics. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AutoScalingResourceMetric. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of auto scaling metric.Constant filled by server. Possible - values include: "Resource". - :vartype kind: str or ~azure.servicefabric.models.AutoScalingMetricKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Resource': 'AutoScalingResourceMetric'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(AutoScalingMetric, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class AutoScalingPolicy(msrest.serialization.Model): - """Describes the auto scaling policy. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the auto scaling policy. - :vartype name: str - :ivar trigger: Required. Determines when auto scaling operation will be invoked. - :vartype trigger: ~azure.servicefabric.models.AutoScalingTrigger - :ivar mechanism: Required. The mechanism that is used to scale when auto scaling operation is - invoked. - :vartype mechanism: ~azure.servicefabric.models.AutoScalingMechanism - """ - - _validation = { - 'name': {'required': True}, - 'trigger': {'required': True}, - 'mechanism': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'trigger': {'key': 'trigger', 'type': 'AutoScalingTrigger'}, - 'mechanism': {'key': 'mechanism', 'type': 'AutoScalingMechanism'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The name of the auto scaling policy. - :paramtype name: str - :keyword trigger: Required. Determines when auto scaling operation will be invoked. - :paramtype trigger: ~azure.servicefabric.models.AutoScalingTrigger - :keyword mechanism: Required. The mechanism that is used to scale when auto scaling operation - is invoked. - :paramtype mechanism: ~azure.servicefabric.models.AutoScalingMechanism - """ - super(AutoScalingPolicy, self).__init__(**kwargs) - self.name = kwargs['name'] - self.trigger = kwargs['trigger'] - self.mechanism = kwargs['mechanism'] - - -class AutoScalingResourceMetric(AutoScalingMetric): - """Describes the resource that is used for triggering auto scaling. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of auto scaling metric.Constant filled by server. Possible - values include: "Resource". - :vartype kind: str or ~azure.servicefabric.models.AutoScalingMetricKind - :ivar name: Required. Name of the resource. Possible values include: "cpu", "memoryInGB". - :vartype name: str or ~azure.servicefabric.models.AutoScalingResourceMetricName - """ - - _validation = { - 'kind': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. Name of the resource. Possible values include: "cpu", "memoryInGB". - :paramtype name: str or ~azure.servicefabric.models.AutoScalingResourceMetricName - """ - super(AutoScalingResourceMetric, self).__init__(**kwargs) - self.kind = 'Resource' # type: str - self.name = kwargs['name'] - - -class AutoScalingTrigger(msrest.serialization.Model): - """Describes the trigger for performing auto scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AverageLoadScalingTrigger. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of auto scaling trigger.Constant filled by server. Possible - values include: "AverageLoad". - :vartype kind: str or ~azure.servicefabric.models.AutoScalingTriggerKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AverageLoad': 'AverageLoadScalingTrigger'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(AutoScalingTrigger, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class AverageLoadScalingTrigger(AutoScalingTrigger): - """Describes the average load trigger used for auto scaling. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of auto scaling trigger.Constant filled by server. Possible - values include: "AverageLoad". - :vartype kind: str or ~azure.servicefabric.models.AutoScalingTriggerKind - :ivar metric: Required. Description of the metric that is used for scaling. - :vartype metric: ~azure.servicefabric.models.AutoScalingMetric - :ivar lower_load_threshold: Required. Lower load threshold (if average load is below this - threshold, service will scale down). - :vartype lower_load_threshold: float - :ivar upper_load_threshold: Required. Upper load threshold (if average load is above this - threshold, service will scale up). - :vartype upper_load_threshold: float - :ivar scale_interval_in_seconds: Required. Scale interval that indicates how often will this - trigger be checked. - :vartype scale_interval_in_seconds: int - """ - - _validation = { - 'kind': {'required': True}, - 'metric': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'minimum': 60}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'metric': {'key': 'metric', 'type': 'AutoScalingMetric'}, - 'lower_load_threshold': {'key': 'lowerLoadThreshold', 'type': 'float'}, - 'upper_load_threshold': {'key': 'upperLoadThreshold', 'type': 'float'}, - 'scale_interval_in_seconds': {'key': 'scaleIntervalInSeconds', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword metric: Required. Description of the metric that is used for scaling. - :paramtype metric: ~azure.servicefabric.models.AutoScalingMetric - :keyword lower_load_threshold: Required. Lower load threshold (if average load is below this - threshold, service will scale down). - :paramtype lower_load_threshold: float - :keyword upper_load_threshold: Required. Upper load threshold (if average load is above this - threshold, service will scale up). - :paramtype upper_load_threshold: float - :keyword scale_interval_in_seconds: Required. Scale interval that indicates how often will this - trigger be checked. - :paramtype scale_interval_in_seconds: int - """ - super(AverageLoadScalingTrigger, self).__init__(**kwargs) - self.kind = 'AverageLoad' # type: str - self.metric = kwargs['metric'] - self.lower_load_threshold = kwargs['lower_load_threshold'] - self.upper_load_threshold = kwargs['upper_load_threshold'] - self.scale_interval_in_seconds = kwargs['scale_interval_in_seconds'] - - -class ScalingTriggerDescription(msrest.serialization.Model): - """Describes the trigger for performing a scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AveragePartitionLoadScalingTrigger, AverageServiceLoadScalingTrigger. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Specifies the kind of scaling trigger.Constant filled by server. Possible - values include: "Invalid", "AveragePartitionLoad", "AverageServiceLoad". - :vartype kind: str or ~azure.servicefabric.models.ScalingTriggerKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AveragePartitionLoad': 'AveragePartitionLoadScalingTrigger', 'AverageServiceLoad': 'AverageServiceLoadScalingTrigger'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ScalingTriggerDescription, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class AveragePartitionLoadScalingTrigger(ScalingTriggerDescription): - """Represents a scaling trigger related to an average load of a metric/resource of a partition. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Specifies the kind of scaling trigger.Constant filled by server. Possible - values include: "Invalid", "AveragePartitionLoad", "AverageServiceLoad". - :vartype kind: str or ~azure.servicefabric.models.ScalingTriggerKind - :ivar metric_name: Required. The name of the metric for which usage should be tracked. - :vartype metric_name: str - :ivar lower_load_threshold: Required. The lower limit of the load below which a scale in - operation should be performed. - :vartype lower_load_threshold: str - :ivar upper_load_threshold: Required. The upper limit of the load beyond which a scale out - operation should be performed. - :vartype upper_load_threshold: str - :ivar scale_interval_in_seconds: Required. The period in seconds on which a decision is made - whether to scale or not. - :vartype scale_interval_in_seconds: long - """ - - _validation = { - 'kind': {'required': True}, - 'metric_name': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, - 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, - 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword metric_name: Required. The name of the metric for which usage should be tracked. - :paramtype metric_name: str - :keyword lower_load_threshold: Required. The lower limit of the load below which a scale in - operation should be performed. - :paramtype lower_load_threshold: str - :keyword upper_load_threshold: Required. The upper limit of the load beyond which a scale out - operation should be performed. - :paramtype upper_load_threshold: str - :keyword scale_interval_in_seconds: Required. The period in seconds on which a decision is made - whether to scale or not. - :paramtype scale_interval_in_seconds: long - """ - super(AveragePartitionLoadScalingTrigger, self).__init__(**kwargs) - self.kind = 'AveragePartitionLoad' # type: str - self.metric_name = kwargs['metric_name'] - self.lower_load_threshold = kwargs['lower_load_threshold'] - self.upper_load_threshold = kwargs['upper_load_threshold'] - self.scale_interval_in_seconds = kwargs['scale_interval_in_seconds'] - - -class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): - """Represents a scaling policy related to an average load of a metric/resource of a service. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Specifies the kind of scaling trigger.Constant filled by server. Possible - values include: "Invalid", "AveragePartitionLoad", "AverageServiceLoad". - :vartype kind: str or ~azure.servicefabric.models.ScalingTriggerKind - :ivar metric_name: Required. The name of the metric for which usage should be tracked. - :vartype metric_name: str - :ivar lower_load_threshold: Required. The lower limit of the load below which a scale in - operation should be performed. - :vartype lower_load_threshold: str - :ivar upper_load_threshold: Required. The upper limit of the load beyond which a scale out - operation should be performed. - :vartype upper_load_threshold: str - :ivar scale_interval_in_seconds: Required. The period in seconds on which a decision is made - whether to scale or not. - :vartype scale_interval_in_seconds: long - :ivar use_only_primary_load: Required. Flag determines whether only the load of primary replica - should be considered for scaling. - If set to true, then trigger will only consider the load of primary replicas of stateful - service. - If set to false, trigger will consider load of all replicas. - This parameter cannot be set to true for stateless service. - :vartype use_only_primary_load: bool - """ - - _validation = { - 'kind': {'required': True}, - 'metric_name': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, - 'use_only_primary_load': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, - 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, - 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, - 'use_only_primary_load': {'key': 'UseOnlyPrimaryLoad', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword metric_name: Required. The name of the metric for which usage should be tracked. - :paramtype metric_name: str - :keyword lower_load_threshold: Required. The lower limit of the load below which a scale in - operation should be performed. - :paramtype lower_load_threshold: str - :keyword upper_load_threshold: Required. The upper limit of the load beyond which a scale out - operation should be performed. - :paramtype upper_load_threshold: str - :keyword scale_interval_in_seconds: Required. The period in seconds on which a decision is made - whether to scale or not. - :paramtype scale_interval_in_seconds: long - :keyword use_only_primary_load: Required. Flag determines whether only the load of primary - replica should be considered for scaling. - If set to true, then trigger will only consider the load of primary replicas of stateful - service. - If set to false, trigger will consider load of all replicas. - This parameter cannot be set to true for stateless service. - :paramtype use_only_primary_load: bool - """ - super(AverageServiceLoadScalingTrigger, self).__init__(**kwargs) - self.kind = 'AverageServiceLoad' # type: str - self.metric_name = kwargs['metric_name'] - self.lower_load_threshold = kwargs['lower_load_threshold'] - self.upper_load_threshold = kwargs['upper_load_threshold'] - self.scale_interval_in_seconds = kwargs['scale_interval_in_seconds'] - self.use_only_primary_load = kwargs['use_only_primary_load'] - - -class BackupStorageDescription(msrest.serialization.Model): - """Describes the parameters for the backup storage. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureBlobBackupStorageDescription, DsmsAzureBlobBackupStorageDescription, FileShareBackupStorageDescription, ManagedIdentityAzureBlobBackupStorageDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant - filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", - "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". - :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind - :ivar friendly_name: Friendly name for this backup storage. - :vartype friendly_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - } - - _attribute_map = { - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - } - - _subtype_map = { - 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'ManagedIdentityAzureBlobStore': 'ManagedIdentityAzureBlobBackupStorageDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword friendly_name: Friendly name for this backup storage. - :paramtype friendly_name: str - """ - super(BackupStorageDescription, self).__init__(**kwargs) - self.storage_kind = None # type: Optional[str] - self.friendly_name = kwargs.get('friendly_name', None) - - -class AzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Azure blob store used for storing and enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant - filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", - "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". - :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind - :ivar friendly_name: Friendly name for this backup storage. - :vartype friendly_name: str - :ivar connection_string: Required. The connection string to connect to the Azure blob store. - :vartype connection_string: str - :ivar container_name: Required. The name of the container in the blob store to store and - enumerate backups from. - :vartype container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'connection_string': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'connection_string': {'key': 'ConnectionString', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword friendly_name: Friendly name for this backup storage. - :paramtype friendly_name: str - :keyword connection_string: Required. The connection string to connect to the Azure blob store. - :paramtype connection_string: str - :keyword container_name: Required. The name of the container in the blob store to store and - enumerate backups from. - :paramtype container_name: str - """ - super(AzureBlobBackupStorageDescription, self).__init__(**kwargs) - self.storage_kind = 'AzureBlobStore' # type: str - self.connection_string = kwargs['connection_string'] - self.container_name = kwargs['container_name'] - - -class DiagnosticsSinkProperties(msrest.serialization.Model): - """Properties of a DiagnosticsSink. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureInternalMonitoringPipelineSinkDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of DiagnosticsSink.Constant filled by server. Possible values - include: "Invalid", "AzureInternalMonitoringPipeline". - :vartype kind: str or ~azure.servicefabric.models.DiagnosticsSinkKind - :ivar name: Name of the sink. This value is referenced by DiagnosticsReferenceDescription. - :vartype name: str - :ivar description: A description of the sink. - :vartype description: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AzureInternalMonitoringPipeline': 'AzureInternalMonitoringPipelineSinkDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Name of the sink. This value is referenced by DiagnosticsReferenceDescription. - :paramtype name: str - :keyword description: A description of the sink. - :paramtype description: str - """ - super(DiagnosticsSinkProperties, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) - - -class AzureInternalMonitoringPipelineSinkDescription(DiagnosticsSinkProperties): - """Diagnostics settings for Geneva. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of DiagnosticsSink.Constant filled by server. Possible values - include: "Invalid", "AzureInternalMonitoringPipeline". - :vartype kind: str or ~azure.servicefabric.models.DiagnosticsSinkKind - :ivar name: Name of the sink. This value is referenced by DiagnosticsReferenceDescription. - :vartype name: str - :ivar description: A description of the sink. - :vartype description: str - :ivar account_name: Azure Internal monitoring pipeline account. - :vartype account_name: str - :ivar namespace: Azure Internal monitoring pipeline account namespace. - :vartype namespace: str - :ivar ma_config_url: Azure Internal monitoring agent configuration. - :vartype ma_config_url: str - :ivar fluentd_config_url: Azure Internal monitoring agent fluentd configuration. - :vartype fluentd_config_url: str - :ivar auto_key_config_url: Azure Internal monitoring pipeline autokey associated with the - certificate. - :vartype auto_key_config_url: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'ma_config_url': {'key': 'maConfigUrl', 'type': 'str'}, - 'fluentd_config_url': {'key': 'fluentdConfigUrl', 'type': 'str'}, - 'auto_key_config_url': {'key': 'autoKeyConfigUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Name of the sink. This value is referenced by DiagnosticsReferenceDescription. - :paramtype name: str - :keyword description: A description of the sink. - :paramtype description: str - :keyword account_name: Azure Internal monitoring pipeline account. - :paramtype account_name: str - :keyword namespace: Azure Internal monitoring pipeline account namespace. - :paramtype namespace: str - :keyword ma_config_url: Azure Internal monitoring agent configuration. - :paramtype ma_config_url: str - :keyword fluentd_config_url: Azure Internal monitoring agent fluentd configuration. - :paramtype fluentd_config_url: str - :keyword auto_key_config_url: Azure Internal monitoring pipeline autokey associated with the - certificate. - :paramtype auto_key_config_url: str - """ - super(AzureInternalMonitoringPipelineSinkDescription, self).__init__(**kwargs) - self.kind = 'AzureInternalMonitoringPipeline' # type: str - self.account_name = kwargs.get('account_name', None) - self.namespace = kwargs.get('namespace', None) - self.ma_config_url = kwargs.get('ma_config_url', None) - self.fluentd_config_url = kwargs.get('fluentd_config_url', None) - self.auto_key_config_url = kwargs.get('auto_key_config_url', None) - - -class BackupInfo(msrest.serialization.Model): - """Represents a backup point which can be used to trigger a restore. - - :ivar backup_id: Unique backup ID . - :vartype backup_id: str - :ivar backup_chain_id: Unique backup chain ID. All backups part of the same chain has the same - backup chain id. A backup chain is comprised of 1 full backup and multiple incremental backups. - :vartype backup_chain_id: str - :ivar application_name: Name of the Service Fabric application this partition backup belongs - to. - :vartype application_name: str - :ivar service_name: Name of the Service Fabric service this partition backup belongs to. - :vartype service_name: str - :ivar partition_information: Information about the partition to which this backup belongs to. - :vartype partition_information: ~azure.servicefabric.models.PartitionInformation - :ivar backup_location: Location of the backup, relative to the backup store. - :vartype backup_location: str - :ivar backup_type: Describes the type of backup, whether its full or incremental. Possible - values include: "Invalid", "Full", "Incremental". - :vartype backup_type: str or ~azure.servicefabric.models.BackupType - :ivar epoch_of_last_backup_record: Epoch of the last record in this backup. - :vartype epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch - :ivar lsn_of_last_backup_record: LSN of the last record in this backup. - :vartype lsn_of_last_backup_record: str - :ivar creation_time_utc: The date time when this backup was taken. - :vartype creation_time_utc: ~datetime.datetime - :ivar service_manifest_version: Manifest Version of the service this partition backup belongs - to. - :vartype service_manifest_version: str - :ivar failure_error: Denotes the failure encountered in getting backup point information. - :vartype failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_chain_id': {'key': 'BackupChainId', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'backup_type': {'key': 'BackupType', 'type': 'str'}, - 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, - 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, - 'creation_time_utc': {'key': 'CreationTimeUtc', 'type': 'iso-8601'}, - 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword backup_id: Unique backup ID . - :paramtype backup_id: str - :keyword backup_chain_id: Unique backup chain ID. All backups part of the same chain has the - same backup chain id. A backup chain is comprised of 1 full backup and multiple incremental - backups. - :paramtype backup_chain_id: str - :keyword application_name: Name of the Service Fabric application this partition backup belongs - to. - :paramtype application_name: str - :keyword service_name: Name of the Service Fabric service this partition backup belongs to. - :paramtype service_name: str - :keyword partition_information: Information about the partition to which this backup belongs - to. - :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation - :keyword backup_location: Location of the backup, relative to the backup store. - :paramtype backup_location: str - :keyword backup_type: Describes the type of backup, whether its full or incremental. Possible - values include: "Invalid", "Full", "Incremental". - :paramtype backup_type: str or ~azure.servicefabric.models.BackupType - :keyword epoch_of_last_backup_record: Epoch of the last record in this backup. - :paramtype epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch - :keyword lsn_of_last_backup_record: LSN of the last record in this backup. - :paramtype lsn_of_last_backup_record: str - :keyword creation_time_utc: The date time when this backup was taken. - :paramtype creation_time_utc: ~datetime.datetime - :keyword service_manifest_version: Manifest Version of the service this partition backup - belongs to. - :paramtype service_manifest_version: str - :keyword failure_error: Denotes the failure encountered in getting backup point information. - :paramtype failure_error: ~azure.servicefabric.models.FabricErrorError - """ - super(BackupInfo, self).__init__(**kwargs) - self.backup_id = kwargs.get('backup_id', None) - self.backup_chain_id = kwargs.get('backup_chain_id', None) - self.application_name = kwargs.get('application_name', None) - self.service_name = kwargs.get('service_name', None) - self.partition_information = kwargs.get('partition_information', None) - self.backup_location = kwargs.get('backup_location', None) - self.backup_type = kwargs.get('backup_type', None) - self.epoch_of_last_backup_record = kwargs.get('epoch_of_last_backup_record', None) - self.lsn_of_last_backup_record = kwargs.get('lsn_of_last_backup_record', None) - self.creation_time_utc = kwargs.get('creation_time_utc', None) - self.service_manifest_version = kwargs.get('service_manifest_version', None) - self.failure_error = kwargs.get('failure_error', None) - - -class BackupPartitionDescription(msrest.serialization.Model): - """Describes the parameters for triggering partition's backup. - - :ivar backup_storage: Specifies the details of the backup storage where to save the backup. - :vartype backup_storage: ~azure.servicefabric.models.BackupStorageDescription - """ - - _attribute_map = { - 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword backup_storage: Specifies the details of the backup storage where to save the backup. - :paramtype backup_storage: ~azure.servicefabric.models.BackupStorageDescription - """ - super(BackupPartitionDescription, self).__init__(**kwargs) - self.backup_storage = kwargs.get('backup_storage', None) - - -class BackupPolicyDescription(msrest.serialization.Model): - """Describes a backup policy for configuring periodic backup. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The unique name identifying this backup policy. - :vartype name: str - :ivar auto_restore_on_data_loss: Required. Specifies whether to trigger restore automatically - using the latest available backup in case the partition experiences a data loss event. - :vartype auto_restore_on_data_loss: bool - :ivar max_incremental_backups: Required. Defines the maximum number of incremental backups to - be taken between two full backups. This is just the upper limit. A full backup may be taken - before specified number of incremental backups are completed in one of the following conditions - - - * The replica has never taken a full backup since it has become primary, - * Some of the log records since the last backup has been truncated, or - * Replica passed the MaxAccumulatedBackupLogSizeInMB limit. - :vartype max_incremental_backups: int - :ivar schedule: Required. Describes the backup schedule parameters. - :vartype schedule: ~azure.servicefabric.models.BackupScheduleDescription - :ivar storage: Required. Describes the details of backup storage where to store the periodic - backups. - :vartype storage: ~azure.servicefabric.models.BackupStorageDescription - :ivar retention_policy: Describes the policy to retain backups in storage. - :vartype retention_policy: ~azure.servicefabric.models.RetentionPolicyDescription - """ - - _validation = { - 'name': {'required': True}, - 'auto_restore_on_data_loss': {'required': True}, - 'max_incremental_backups': {'required': True, 'maximum': 255, 'minimum': 0}, - 'schedule': {'required': True}, - 'storage': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'auto_restore_on_data_loss': {'key': 'AutoRestoreOnDataLoss', 'type': 'bool'}, - 'max_incremental_backups': {'key': 'MaxIncrementalBackups', 'type': 'int'}, - 'schedule': {'key': 'Schedule', 'type': 'BackupScheduleDescription'}, - 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, - 'retention_policy': {'key': 'RetentionPolicy', 'type': 'RetentionPolicyDescription'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The unique name identifying this backup policy. - :paramtype name: str - :keyword auto_restore_on_data_loss: Required. Specifies whether to trigger restore - automatically using the latest available backup in case the partition experiences a data loss - event. - :paramtype auto_restore_on_data_loss: bool - :keyword max_incremental_backups: Required. Defines the maximum number of incremental backups - to be taken between two full backups. This is just the upper limit. A full backup may be taken - before specified number of incremental backups are completed in one of the following conditions - - - * The replica has never taken a full backup since it has become primary, - * Some of the log records since the last backup has been truncated, or - * Replica passed the MaxAccumulatedBackupLogSizeInMB limit. - :paramtype max_incremental_backups: int - :keyword schedule: Required. Describes the backup schedule parameters. - :paramtype schedule: ~azure.servicefabric.models.BackupScheduleDescription - :keyword storage: Required. Describes the details of backup storage where to store the periodic - backups. - :paramtype storage: ~azure.servicefabric.models.BackupStorageDescription - :keyword retention_policy: Describes the policy to retain backups in storage. - :paramtype retention_policy: ~azure.servicefabric.models.RetentionPolicyDescription - """ - super(BackupPolicyDescription, self).__init__(**kwargs) - self.name = kwargs['name'] - self.auto_restore_on_data_loss = kwargs['auto_restore_on_data_loss'] - self.max_incremental_backups = kwargs['max_incremental_backups'] - self.schedule = kwargs['schedule'] - self.storage = kwargs['storage'] - self.retention_policy = kwargs.get('retention_policy', None) - - -class BackupProgressInfo(msrest.serialization.Model): - """Describes the progress of a partition's backup. - - :ivar backup_state: Represents the current state of the partition backup operation. Possible - values include: "Invalid", "Accepted", "BackupInProgress", "Success", "Failure", "Timeout". - :vartype backup_state: str or ~azure.servicefabric.models.BackupState - :ivar time_stamp_utc: TimeStamp in UTC when operation succeeded or failed. - :vartype time_stamp_utc: ~datetime.datetime - :ivar backup_id: Unique ID of the newly created backup. - :vartype backup_id: str - :ivar backup_location: Location, relative to the backup store, of the newly created backup. - :vartype backup_location: str - :ivar epoch_of_last_backup_record: Specifies the epoch of the last record included in backup. - :vartype epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch - :ivar lsn_of_last_backup_record: The LSN of last record included in backup. - :vartype lsn_of_last_backup_record: str - :ivar failure_error: Denotes the failure encountered in performing backup operation. - :vartype failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'backup_state': {'key': 'BackupState', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, - 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword backup_state: Represents the current state of the partition backup operation. Possible - values include: "Invalid", "Accepted", "BackupInProgress", "Success", "Failure", "Timeout". - :paramtype backup_state: str or ~azure.servicefabric.models.BackupState - :keyword time_stamp_utc: TimeStamp in UTC when operation succeeded or failed. - :paramtype time_stamp_utc: ~datetime.datetime - :keyword backup_id: Unique ID of the newly created backup. - :paramtype backup_id: str - :keyword backup_location: Location, relative to the backup store, of the newly created backup. - :paramtype backup_location: str - :keyword epoch_of_last_backup_record: Specifies the epoch of the last record included in - backup. - :paramtype epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch - :keyword lsn_of_last_backup_record: The LSN of last record included in backup. - :paramtype lsn_of_last_backup_record: str - :keyword failure_error: Denotes the failure encountered in performing backup operation. - :paramtype failure_error: ~azure.servicefabric.models.FabricErrorError - """ - super(BackupProgressInfo, self).__init__(**kwargs) - self.backup_state = kwargs.get('backup_state', None) - self.time_stamp_utc = kwargs.get('time_stamp_utc', None) - self.backup_id = kwargs.get('backup_id', None) - self.backup_location = kwargs.get('backup_location', None) - self.epoch_of_last_backup_record = kwargs.get('epoch_of_last_backup_record', None) - self.lsn_of_last_backup_record = kwargs.get('lsn_of_last_backup_record', None) - self.failure_error = kwargs.get('failure_error', None) - - -class BackupScheduleDescription(msrest.serialization.Model): - """Describes the backup schedule parameters. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: FrequencyBasedBackupScheduleDescription, TimeBasedBackupScheduleDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar schedule_kind: Required. The kind of backup schedule, time based or frequency - based.Constant filled by server. Possible values include: "Invalid", "TimeBased", - "FrequencyBased". - :vartype schedule_kind: str or ~azure.servicefabric.models.BackupScheduleKind - """ - - _validation = { - 'schedule_kind': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - } - - _subtype_map = { - 'schedule_kind': {'FrequencyBased': 'FrequencyBasedBackupScheduleDescription', 'TimeBased': 'TimeBasedBackupScheduleDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(BackupScheduleDescription, self).__init__(**kwargs) - self.schedule_kind = None # type: Optional[str] - - -class BackupSuspensionInfo(msrest.serialization.Model): - """Describes the backup suspension details. - - :ivar is_suspended: Indicates whether periodic backup is suspended at this level or not. - :vartype is_suspended: bool - :ivar suspension_inherited_from: Specifies the scope at which the backup suspension was - applied. Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype suspension_inherited_from: str or ~azure.servicefabric.models.BackupSuspensionScope - """ - - _attribute_map = { - 'is_suspended': {'key': 'IsSuspended', 'type': 'bool'}, - 'suspension_inherited_from': {'key': 'SuspensionInheritedFrom', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword is_suspended: Indicates whether periodic backup is suspended at this level or not. - :paramtype is_suspended: bool - :keyword suspension_inherited_from: Specifies the scope at which the backup suspension was - applied. Possible values include: "Invalid", "Partition", "Service", "Application". - :paramtype suspension_inherited_from: str or ~azure.servicefabric.models.BackupSuspensionScope - """ - super(BackupSuspensionInfo, self).__init__(**kwargs) - self.is_suspended = kwargs.get('is_suspended', None) - self.suspension_inherited_from = kwargs.get('suspension_inherited_from', None) - - -class RetentionPolicyDescription(msrest.serialization.Model): - """Describes the retention policy configured. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BasicRetentionPolicyDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar retention_policy_type: Required. The type of retention policy. Currently only "Basic" - retention policy is supported.Constant filled by server. Possible values include: "Basic", - "Invalid". - :vartype retention_policy_type: str or ~azure.servicefabric.models.RetentionPolicyType - """ - - _validation = { - 'retention_policy_type': {'required': True}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, - } - - _subtype_map = { - 'retention_policy_type': {'Basic': 'BasicRetentionPolicyDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(RetentionPolicyDescription, self).__init__(**kwargs) - self.retention_policy_type = None # type: Optional[str] - - -class BasicRetentionPolicyDescription(RetentionPolicyDescription): - """Describes basic retention policy. - - All required parameters must be populated in order to send to Azure. - - :ivar retention_policy_type: Required. The type of retention policy. Currently only "Basic" - retention policy is supported.Constant filled by server. Possible values include: "Basic", - "Invalid". - :vartype retention_policy_type: str or ~azure.servicefabric.models.RetentionPolicyType - :ivar retention_duration: Required. It is the minimum duration for which a backup created, will - remain stored in the storage and might get deleted after that span of time. It should be - specified in ISO8601 format. - :vartype retention_duration: ~datetime.timedelta - :ivar minimum_number_of_backups: It is the minimum number of backups to be retained at any - point of time. If specified with a non zero value, backups will not be deleted even if the - backups have gone past retention duration and have number of backups less than or equal to it. - :vartype minimum_number_of_backups: int - """ - - _validation = { - 'retention_policy_type': {'required': True}, - 'retention_duration': {'required': True}, - 'minimum_number_of_backups': {'minimum': 0}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, - 'retention_duration': {'key': 'RetentionDuration', 'type': 'duration'}, - 'minimum_number_of_backups': {'key': 'MinimumNumberOfBackups', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword retention_duration: Required. It is the minimum duration for which a backup created, - will remain stored in the storage and might get deleted after that span of time. It should be - specified in ISO8601 format. - :paramtype retention_duration: ~datetime.timedelta - :keyword minimum_number_of_backups: It is the minimum number of backups to be retained at any - point of time. If specified with a non zero value, backups will not be deleted even if the - backups have gone past retention duration and have number of backups less than or equal to it. - :paramtype minimum_number_of_backups: int - """ - super(BasicRetentionPolicyDescription, self).__init__(**kwargs) - self.retention_policy_type = 'Basic' # type: str - self.retention_duration = kwargs['retention_duration'] - self.minimum_number_of_backups = kwargs.get('minimum_number_of_backups', None) - - -class PropertyValue(msrest.serialization.Model): - """Describes a Service Fabric property value. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BinaryPropertyValue, DoublePropertyValue, GuidPropertyValue, Int64PropertyValue, StringPropertyValue. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property, determined by the type of data. Following are the - possible values.Constant filled by server. Possible values include: "Invalid", "Binary", - "Int64", "Double", "String", "Guid". - :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Binary': 'BinaryPropertyValue', 'Double': 'DoublePropertyValue', 'Guid': 'GuidPropertyValue', 'Int64': 'Int64PropertyValue', 'String': 'StringPropertyValue'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(PropertyValue, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class BinaryPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Binary. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property, determined by the type of data. Following are the - possible values.Constant filled by server. Possible values include: "Invalid", "Binary", - "Int64", "Double", "String", "Guid". - :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind - :ivar data: Required. Array of bytes to be sent as an integer array. Each element of array is a - number between 0 and 255. - :vartype data: list[int] - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': '[int]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword data: Required. Array of bytes to be sent as an integer array. Each element of array - is a number between 0 and 255. - :paramtype data: list[int] - """ - super(BinaryPropertyValue, self).__init__(**kwargs) - self.kind = 'Binary' # type: str - self.data = kwargs['data'] - - -class Chaos(msrest.serialization.Model): - """Contains a description of Chaos. - - :ivar chaos_parameters: If Chaos is running, these are the parameters Chaos is running with. - :vartype chaos_parameters: ~azure.servicefabric.models.ChaosParameters - :ivar status: Current status of the Chaos run. Possible values include: "Invalid", "Running", - "Stopped". - :vartype status: str or ~azure.servicefabric.models.ChaosStatus - :ivar schedule_status: Current status of the schedule. Possible values include: "Invalid", - "Stopped", "Active", "Expired", "Pending". - :vartype schedule_status: str or ~azure.servicefabric.models.ChaosScheduleStatus - """ - - _attribute_map = { - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'schedule_status': {'key': 'ScheduleStatus', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword chaos_parameters: If Chaos is running, these are the parameters Chaos is running with. - :paramtype chaos_parameters: ~azure.servicefabric.models.ChaosParameters - :keyword status: Current status of the Chaos run. Possible values include: "Invalid", - "Running", "Stopped". - :paramtype status: str or ~azure.servicefabric.models.ChaosStatus - :keyword schedule_status: Current status of the schedule. Possible values include: "Invalid", - "Stopped", "Active", "Expired", "Pending". - :paramtype schedule_status: str or ~azure.servicefabric.models.ChaosScheduleStatus - """ - super(Chaos, self).__init__(**kwargs) - self.chaos_parameters = kwargs.get('chaos_parameters', None) - self.status = kwargs.get('status', None) - self.schedule_status = kwargs.get('schedule_status', None) - - -class ChaosCodePackageRestartScheduledEvent(ApplicationEvent): - """Chaos Restart Code Package Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar fault_group_id: Required. Id of fault group. - :vartype fault_group_id: str - :ivar fault_id: Required. Id of fault. - :vartype fault_id: str - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar service_manifest_name: Required. Service manifest name. - :vartype service_manifest_name: str - :ivar code_package_name: Required. Code package name. - :vartype code_package_name: str - :ivar service_package_activation_id: Required. Id of Service package activation. - :vartype service_package_activation_id: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'node_name': {'required': True}, - 'service_manifest_name': {'required': True}, - 'code_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword fault_group_id: Required. Id of fault group. - :paramtype fault_group_id: str - :keyword fault_id: Required. Id of fault. - :paramtype fault_id: str - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword service_manifest_name: Required. Service manifest name. - :paramtype service_manifest_name: str - :keyword code_package_name: Required. Code package name. - :paramtype code_package_name: str - :keyword service_package_activation_id: Required. Id of Service package activation. - :paramtype service_package_activation_id: str - """ - super(ChaosCodePackageRestartScheduledEvent, self).__init__(**kwargs) - self.kind = 'ChaosCodePackageRestartScheduled' # type: str - self.fault_group_id = kwargs['fault_group_id'] - self.fault_id = kwargs['fault_id'] - self.node_name = kwargs['node_name'] - self.service_manifest_name = kwargs['service_manifest_name'] - self.code_package_name = kwargs['code_package_name'] - self.service_package_activation_id = kwargs['service_package_activation_id'] - - -class ChaosContext(msrest.serialization.Model): - """Describes a map, which is a collection of (string, string) type key-value pairs. The map can be used to record information about -the Chaos run. There cannot be more than 100 such pairs and each string (key or value) can be at most 4095 characters long. -This map is set by the starter of the Chaos run to optionally store the context about the specific run. - - :ivar map: Describes a map that contains a collection of ChaosContextMapItem's. - :vartype map: dict[str, str] - """ - - _attribute_map = { - 'map': {'key': 'Map', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword map: Describes a map that contains a collection of ChaosContextMapItem's. - :paramtype map: dict[str, str] - """ - super(ChaosContext, self).__init__(**kwargs) - self.map = kwargs.get('map', None) - - -class ChaosEvent(msrest.serialization.Model): - """Represents an event generated during a Chaos run. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ExecutingFaultsChaosEvent, StartedChaosEvent, StoppedChaosEvent, TestErrorChaosEvent, ValidationFailedChaosEvent, WaitingChaosEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values - include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", - "Stopped". - :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind - :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :vartype time_stamp_utc: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'time_stamp_utc': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - } - - _subtype_map = { - 'kind': {'ExecutingFaults': 'ExecutingFaultsChaosEvent', 'Started': 'StartedChaosEvent', 'Stopped': 'StoppedChaosEvent', 'TestError': 'TestErrorChaosEvent', 'ValidationFailed': 'ValidationFailedChaosEvent', 'Waiting': 'WaitingChaosEvent'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :paramtype time_stamp_utc: ~datetime.datetime - """ - super(ChaosEvent, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.time_stamp_utc = kwargs['time_stamp_utc'] - - -class ChaosEventsSegment(msrest.serialization.Model): - """Contains the list of Chaos events and the continuation token to get the next segment. - - :ivar 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. - :vartype continuation_token: str - :ivar history: List of Chaos events that meet the user-supplied criteria. - :vartype history: list[~azure.servicefabric.models.ChaosEventWrapper] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'history': {'key': 'History', 'type': '[ChaosEventWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword history: List of Chaos events that meet the user-supplied criteria. - :paramtype history: list[~azure.servicefabric.models.ChaosEventWrapper] - """ - super(ChaosEventsSegment, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.history = kwargs.get('history', None) - - -class ChaosEventWrapper(msrest.serialization.Model): - """Wrapper object for Chaos event. - - :ivar chaos_event: Represents an event generated during a Chaos run. - :vartype chaos_event: ~azure.servicefabric.models.ChaosEvent - """ - - _attribute_map = { - 'chaos_event': {'key': 'ChaosEvent', 'type': 'ChaosEvent'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword chaos_event: Represents an event generated during a Chaos run. - :paramtype chaos_event: ~azure.servicefabric.models.ChaosEvent - """ - super(ChaosEventWrapper, self).__init__(**kwargs) - self.chaos_event = kwargs.get('chaos_event', None) - - -class NodeEvent(FabricEvent): - """Represents the base for all Node Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ChaosNodeRestartScheduledEvent, NodeAbortedEvent, NodeAddedToClusterEvent, NodeClosedEvent, NodeDeactivateCompletedEvent, NodeDeactivateStartedEvent, NodeDownEvent, NodeHealthReportExpiredEvent, NodeNewHealthReportEvent, NodeOpenFailedEvent, NodeOpenSucceededEvent, NodeRemovedFromClusterEvent, NodeUpEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ChaosNodeRestartScheduled': 'ChaosNodeRestartScheduledEvent', 'NodeAborted': 'NodeAbortedEvent', 'NodeAddedToCluster': 'NodeAddedToClusterEvent', 'NodeClosed': 'NodeClosedEvent', 'NodeDeactivateCompleted': 'NodeDeactivateCompletedEvent', 'NodeDeactivateStarted': 'NodeDeactivateStartedEvent', 'NodeDown': 'NodeDownEvent', 'NodeHealthReportExpired': 'NodeHealthReportExpiredEvent', 'NodeNewHealthReport': 'NodeNewHealthReportEvent', 'NodeOpenFailed': 'NodeOpenFailedEvent', 'NodeOpenSucceeded': 'NodeOpenSucceededEvent', 'NodeRemovedFromCluster': 'NodeRemovedFromClusterEvent', 'NodeUp': 'NodeUpEvent'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - """ - super(NodeEvent, self).__init__(**kwargs) - self.kind = 'NodeEvent' # type: str - self.node_name = kwargs['node_name'] - - -class ChaosNodeRestartScheduledEvent(NodeEvent): - """Chaos Restart Node Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance_id: Required. Id of Node instance. - :vartype node_instance_id: long - :ivar fault_group_id: Required. Id of fault group. - :vartype fault_group_id: str - :ivar fault_id: Required. Id of fault. - :vartype fault_id: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance_id: Required. Id of Node instance. - :paramtype node_instance_id: long - :keyword fault_group_id: Required. Id of fault group. - :paramtype fault_group_id: str - :keyword fault_id: Required. Id of fault. - :paramtype fault_id: str - """ - super(ChaosNodeRestartScheduledEvent, self).__init__(**kwargs) - self.kind = 'ChaosNodeRestartScheduled' # type: str - self.node_instance_id = kwargs['node_instance_id'] - self.fault_group_id = kwargs['fault_group_id'] - self.fault_id = kwargs['fault_id'] - - -class ChaosParameters(msrest.serialization.Model): - """Defines all the parameters to configure a Chaos run. - - :ivar time_to_run_in_seconds: Total time (in seconds) for which Chaos will run before - automatically stopping. The maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue). - :vartype time_to_run_in_seconds: str - :ivar max_cluster_stabilization_timeout_in_seconds: The maximum amount of time to wait for all - cluster entities to become stable and healthy. Chaos executes in iterations and at the start of - each iteration it validates the health of cluster entities. - During validation if a cluster entity is not stable and healthy within - MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed event. - :vartype max_cluster_stabilization_timeout_in_seconds: long - :ivar max_concurrent_faults: MaxConcurrentFaults is the maximum number of concurrent faults - induced per iteration. - Chaos executes in iterations and two consecutive iterations are separated by a validation - phase. - The higher the concurrency, the more aggressive the injection of faults, leading to inducing - more complex series of states to uncover bugs. - The recommendation is to start with a value of 2 or 3 and to exercise caution while moving up. - :vartype max_concurrent_faults: long - :ivar enable_move_replica_faults: Enables or disables the move primary and move secondary - faults. - :vartype enable_move_replica_faults: bool - :ivar wait_time_between_faults_in_seconds: Wait time (in seconds) between consecutive faults - within a single iteration. - The larger the value, the lower the overlapping between faults and the simpler the sequence of - state transitions that the cluster goes through. - The recommendation is to start with a value between 1 and 5 and exercise caution while moving - up. - :vartype wait_time_between_faults_in_seconds: long - :ivar wait_time_between_iterations_in_seconds: Time-separation (in seconds) between two - consecutive iterations of Chaos. - The larger the value, the lower the fault injection rate. - :vartype wait_time_between_iterations_in_seconds: long - :ivar cluster_health_policy: Passed-in cluster health policy is used to validate health of the - cluster in between Chaos iterations. If the cluster health is in error or if an unexpected - exception happens during fault execution--to provide the cluster with some time to - recuperate--Chaos will wait for 30 minutes before the next health-check. - :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :ivar context: Describes a map, which is a collection of (string, string) type key-value pairs. - The map can be used to record information about - the Chaos run. There cannot be more than 100 such pairs and each string (key or value) can be - at most 4095 characters long. - This map is set by the starter of the Chaos run to optionally store the context about the - specific run. - :vartype context: ~azure.servicefabric.models.ChaosContext - :ivar chaos_target_filter: List of cluster entities to target for Chaos faults. - This filter can be used to target Chaos faults only to certain node types or only to certain - application instances. If ChaosTargetFilter is not used, Chaos faults all cluster entities. - If ChaosTargetFilter is used, Chaos faults only the entities that meet the ChaosTargetFilter - specification. - :vartype chaos_target_filter: ~azure.servicefabric.models.ChaosTargetFilter - """ - - _validation = { - 'max_cluster_stabilization_timeout_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'max_concurrent_faults': {'maximum': 4294967295, 'minimum': 0}, - 'wait_time_between_faults_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'wait_time_between_iterations_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'str'}, - 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'long'}, - 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, - 'enable_move_replica_faults': {'key': 'EnableMoveReplicaFaults', 'type': 'bool'}, - 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'long'}, - 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'long'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'context': {'key': 'Context', 'type': 'ChaosContext'}, - 'chaos_target_filter': {'key': 'ChaosTargetFilter', 'type': 'ChaosTargetFilter'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword time_to_run_in_seconds: Total time (in seconds) for which Chaos will run before - automatically stopping. The maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue). - :paramtype time_to_run_in_seconds: str - :keyword max_cluster_stabilization_timeout_in_seconds: The maximum amount of time to wait for - all cluster entities to become stable and healthy. Chaos executes in iterations and at the - start of each iteration it validates the health of cluster entities. - During validation if a cluster entity is not stable and healthy within - MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed event. - :paramtype max_cluster_stabilization_timeout_in_seconds: long - :keyword max_concurrent_faults: MaxConcurrentFaults is the maximum number of concurrent faults - induced per iteration. - Chaos executes in iterations and two consecutive iterations are separated by a validation - phase. - The higher the concurrency, the more aggressive the injection of faults, leading to inducing - more complex series of states to uncover bugs. - The recommendation is to start with a value of 2 or 3 and to exercise caution while moving up. - :paramtype max_concurrent_faults: long - :keyword enable_move_replica_faults: Enables or disables the move primary and move secondary - faults. - :paramtype enable_move_replica_faults: bool - :keyword wait_time_between_faults_in_seconds: Wait time (in seconds) between consecutive faults - within a single iteration. - The larger the value, the lower the overlapping between faults and the simpler the sequence of - state transitions that the cluster goes through. - The recommendation is to start with a value between 1 and 5 and exercise caution while moving - up. - :paramtype wait_time_between_faults_in_seconds: long - :keyword wait_time_between_iterations_in_seconds: Time-separation (in seconds) between two - consecutive iterations of Chaos. - The larger the value, the lower the fault injection rate. - :paramtype wait_time_between_iterations_in_seconds: long - :keyword cluster_health_policy: Passed-in cluster health policy is used to validate health of - the cluster in between Chaos iterations. If the cluster health is in error or if an unexpected - exception happens during fault execution--to provide the cluster with some time to - recuperate--Chaos will wait for 30 minutes before the next health-check. - :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :keyword context: Describes a map, which is a collection of (string, string) type key-value - pairs. The map can be used to record information about - the Chaos run. There cannot be more than 100 such pairs and each string (key or value) can be - at most 4095 characters long. - This map is set by the starter of the Chaos run to optionally store the context about the - specific run. - :paramtype context: ~azure.servicefabric.models.ChaosContext - :keyword chaos_target_filter: List of cluster entities to target for Chaos faults. - This filter can be used to target Chaos faults only to certain node types or only to certain - application instances. If ChaosTargetFilter is not used, Chaos faults all cluster entities. - If ChaosTargetFilter is used, Chaos faults only the entities that meet the ChaosTargetFilter - specification. - :paramtype chaos_target_filter: ~azure.servicefabric.models.ChaosTargetFilter - """ - super(ChaosParameters, self).__init__(**kwargs) - self.time_to_run_in_seconds = kwargs.get('time_to_run_in_seconds', "4294967295") - self.max_cluster_stabilization_timeout_in_seconds = kwargs.get('max_cluster_stabilization_timeout_in_seconds', 60) - self.max_concurrent_faults = kwargs.get('max_concurrent_faults', 1) - self.enable_move_replica_faults = kwargs.get('enable_move_replica_faults', True) - self.wait_time_between_faults_in_seconds = kwargs.get('wait_time_between_faults_in_seconds', 20) - self.wait_time_between_iterations_in_seconds = kwargs.get('wait_time_between_iterations_in_seconds', 30) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.context = kwargs.get('context', None) - self.chaos_target_filter = kwargs.get('chaos_target_filter', None) - - -class ChaosParametersDictionaryItem(msrest.serialization.Model): - """Defines an item in ChaosParametersDictionary of the Chaos Schedule. - - All required parameters must be populated in order to send to Azure. - - :ivar key: Required. The key identifying the Chaos Parameter in the dictionary. This key is - referenced by Chaos Schedule Jobs. - :vartype key: str - :ivar value: Required. Defines all the parameters to configure a Chaos run. - :vartype value: ~azure.servicefabric.models.ChaosParameters - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ChaosParameters'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: Required. The key identifying the Chaos Parameter in the dictionary. This key is - referenced by Chaos Schedule Jobs. - :paramtype key: str - :keyword value: Required. Defines all the parameters to configure a Chaos run. - :paramtype value: ~azure.servicefabric.models.ChaosParameters - """ - super(ChaosParametersDictionaryItem, self).__init__(**kwargs) - self.key = kwargs['key'] - self.value = kwargs['value'] - - -class PartitionEvent(FabricEvent): - """Represents the base for all Partition Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ChaosPartitionPrimaryMoveScheduledEvent, ChaosPartitionSecondaryMoveScheduledEvent, PartitionAnalysisEvent, PartitionHealthReportExpiredEvent, PartitionNewHealthReportEvent, PartitionReconfiguredEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ChaosPartitionPrimaryMoveScheduled': 'ChaosPartitionPrimaryMoveScheduledEvent', 'ChaosPartitionSecondaryMoveScheduled': 'ChaosPartitionSecondaryMoveScheduledEvent', 'PartitionAnalysisEvent': 'PartitionAnalysisEvent', 'PartitionHealthReportExpired': 'PartitionHealthReportExpiredEvent', 'PartitionNewHealthReport': 'PartitionNewHealthReportEvent', 'PartitionReconfigured': 'PartitionReconfiguredEvent'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - """ - super(PartitionEvent, self).__init__(**kwargs) - self.kind = 'PartitionEvent' # type: str - self.partition_id = kwargs['partition_id'] - - -class ChaosPartitionPrimaryMoveScheduledEvent(PartitionEvent): - """Chaos Move Primary Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar fault_group_id: Required. Id of fault group. - :vartype fault_group_id: str - :ivar fault_id: Required. Id of fault. - :vartype fault_id: str - :ivar service_name: Required. Service name. - :vartype service_name: str - :ivar node_to: Required. The name of a Service Fabric node. - :vartype node_to: str - :ivar forced_move: Required. Indicates a forced move. - :vartype forced_move: bool - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_name': {'required': True}, - 'node_to': {'required': True}, - 'forced_move': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'node_to': {'key': 'NodeTo', 'type': 'str'}, - 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword fault_group_id: Required. Id of fault group. - :paramtype fault_group_id: str - :keyword fault_id: Required. Id of fault. - :paramtype fault_id: str - :keyword service_name: Required. Service name. - :paramtype service_name: str - :keyword node_to: Required. The name of a Service Fabric node. - :paramtype node_to: str - :keyword forced_move: Required. Indicates a forced move. - :paramtype forced_move: bool - """ - super(ChaosPartitionPrimaryMoveScheduledEvent, self).__init__(**kwargs) - self.kind = 'ChaosPartitionPrimaryMoveScheduled' # type: str - self.fault_group_id = kwargs['fault_group_id'] - self.fault_id = kwargs['fault_id'] - self.service_name = kwargs['service_name'] - self.node_to = kwargs['node_to'] - self.forced_move = kwargs['forced_move'] - - -class ChaosPartitionSecondaryMoveScheduledEvent(PartitionEvent): - """Chaos Move Secondary Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar fault_group_id: Required. Id of fault group. - :vartype fault_group_id: str - :ivar fault_id: Required. Id of fault. - :vartype fault_id: str - :ivar service_name: Required. Service name. - :vartype service_name: str - :ivar source_node: Required. The name of a Service Fabric node. - :vartype source_node: str - :ivar destination_node: Required. The name of a Service Fabric node. - :vartype destination_node: str - :ivar forced_move: Required. Indicates a forced move. - :vartype forced_move: bool - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_name': {'required': True}, - 'source_node': {'required': True}, - 'destination_node': {'required': True}, - 'forced_move': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'source_node': {'key': 'SourceNode', 'type': 'str'}, - 'destination_node': {'key': 'DestinationNode', 'type': 'str'}, - 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword fault_group_id: Required. Id of fault group. - :paramtype fault_group_id: str - :keyword fault_id: Required. Id of fault. - :paramtype fault_id: str - :keyword service_name: Required. Service name. - :paramtype service_name: str - :keyword source_node: Required. The name of a Service Fabric node. - :paramtype source_node: str - :keyword destination_node: Required. The name of a Service Fabric node. - :paramtype destination_node: str - :keyword forced_move: Required. Indicates a forced move. - :paramtype forced_move: bool - """ - super(ChaosPartitionSecondaryMoveScheduledEvent, self).__init__(**kwargs) - self.kind = 'ChaosPartitionSecondaryMoveScheduled' # type: str - self.fault_group_id = kwargs['fault_group_id'] - self.fault_id = kwargs['fault_id'] - self.service_name = kwargs['service_name'] - self.source_node = kwargs['source_node'] - self.destination_node = kwargs['destination_node'] - self.forced_move = kwargs['forced_move'] - - -class ReplicaEvent(FabricEvent): - """Represents the base for all Replica Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ChaosReplicaRemovalScheduledEvent, ChaosReplicaRestartScheduledEvent, StatefulReplicaHealthReportExpiredEvent, StatefulReplicaNewHealthReportEvent, StatelessReplicaHealthReportExpiredEvent, StatelessReplicaNewHealthReportEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :vartype replica_id: long - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - } - - _subtype_map = { - 'kind': {'ChaosReplicaRemovalScheduled': 'ChaosReplicaRemovalScheduledEvent', 'ChaosReplicaRestartScheduled': 'ChaosReplicaRestartScheduledEvent', 'StatefulReplicaHealthReportExpired': 'StatefulReplicaHealthReportExpiredEvent', 'StatefulReplicaNewHealthReport': 'StatefulReplicaNewHealthReportEvent', 'StatelessReplicaHealthReportExpired': 'StatelessReplicaHealthReportExpiredEvent', 'StatelessReplicaNewHealthReport': 'StatelessReplicaNewHealthReportEvent'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: long - """ - super(ReplicaEvent, self).__init__(**kwargs) - self.kind = 'ReplicaEvent' # type: str - self.partition_id = kwargs['partition_id'] - self.replica_id = kwargs['replica_id'] - - -class ChaosReplicaRemovalScheduledEvent(ReplicaEvent): - """Chaos Remove Replica Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :vartype replica_id: long - :ivar fault_group_id: Required. Id of fault group. - :vartype fault_group_id: str - :ivar fault_id: Required. Id of fault. - :vartype fault_id: str - :ivar service_uri: Required. Service name. - :vartype service_uri: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_uri': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: long - :keyword fault_group_id: Required. Id of fault group. - :paramtype fault_group_id: str - :keyword fault_id: Required. Id of fault. - :paramtype fault_id: str - :keyword service_uri: Required. Service name. - :paramtype service_uri: str - """ - super(ChaosReplicaRemovalScheduledEvent, self).__init__(**kwargs) - self.kind = 'ChaosReplicaRemovalScheduled' # type: str - self.fault_group_id = kwargs['fault_group_id'] - self.fault_id = kwargs['fault_id'] - self.service_uri = kwargs['service_uri'] - - -class ChaosReplicaRestartScheduledEvent(ReplicaEvent): - """Chaos Restart Replica Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :vartype replica_id: long - :ivar fault_group_id: Required. Id of fault group. - :vartype fault_group_id: str - :ivar fault_id: Required. Id of fault. - :vartype fault_id: str - :ivar service_uri: Required. Service name. - :vartype service_uri: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_uri': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: long - :keyword fault_group_id: Required. Id of fault group. - :paramtype fault_group_id: str - :keyword fault_id: Required. Id of fault. - :paramtype fault_id: str - :keyword service_uri: Required. Service name. - :paramtype service_uri: str - """ - super(ChaosReplicaRestartScheduledEvent, self).__init__(**kwargs) - self.kind = 'ChaosReplicaRestartScheduled' # type: str - self.fault_group_id = kwargs['fault_group_id'] - self.fault_id = kwargs['fault_id'] - self.service_uri = kwargs['service_uri'] - - -class ChaosSchedule(msrest.serialization.Model): - """Defines the schedule used by Chaos. - - :ivar start_date: The date and time Chaos will start using this schedule. - :vartype start_date: ~datetime.datetime - :ivar expiry_date: The date and time Chaos will continue to use this schedule until. - :vartype expiry_date: ~datetime.datetime - :ivar chaos_parameters_dictionary: A mapping of string names to Chaos Parameters to be - referenced by Chaos Schedule Jobs. - :vartype chaos_parameters_dictionary: - list[~azure.servicefabric.models.ChaosParametersDictionaryItem] - :ivar jobs: A list of all Chaos Schedule Jobs that will be automated by the schedule. - :vartype jobs: list[~azure.servicefabric.models.ChaosScheduleJob] - """ - - _attribute_map = { - 'start_date': {'key': 'StartDate', 'type': 'iso-8601'}, - 'expiry_date': {'key': 'ExpiryDate', 'type': 'iso-8601'}, - 'chaos_parameters_dictionary': {'key': 'ChaosParametersDictionary', 'type': '[ChaosParametersDictionaryItem]'}, - 'jobs': {'key': 'Jobs', 'type': '[ChaosScheduleJob]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword start_date: The date and time Chaos will start using this schedule. - :paramtype start_date: ~datetime.datetime - :keyword expiry_date: The date and time Chaos will continue to use this schedule until. - :paramtype expiry_date: ~datetime.datetime - :keyword chaos_parameters_dictionary: A mapping of string names to Chaos Parameters to be - referenced by Chaos Schedule Jobs. - :paramtype chaos_parameters_dictionary: - list[~azure.servicefabric.models.ChaosParametersDictionaryItem] - :keyword jobs: A list of all Chaos Schedule Jobs that will be automated by the schedule. - :paramtype jobs: list[~azure.servicefabric.models.ChaosScheduleJob] - """ - super(ChaosSchedule, self).__init__(**kwargs) - self.start_date = kwargs.get('start_date', "1601-01-01T00:00:00Z") - self.expiry_date = kwargs.get('expiry_date', "9999-12-31T23:59:59.999Z") - self.chaos_parameters_dictionary = kwargs.get('chaos_parameters_dictionary', None) - self.jobs = kwargs.get('jobs', None) - - -class ChaosScheduleDescription(msrest.serialization.Model): - """Defines the Chaos Schedule used by Chaos and the version of the Chaos Schedule. The version value wraps back to 0 after surpassing 2,147,483,647. - - :ivar version: The version number of the Schedule. - :vartype version: int - :ivar schedule: Defines the schedule used by Chaos. - :vartype schedule: ~azure.servicefabric.models.ChaosSchedule - """ - - _validation = { - 'version': {'minimum': 0}, - } - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'int'}, - 'schedule': {'key': 'Schedule', 'type': 'ChaosSchedule'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword version: The version number of the Schedule. - :paramtype version: int - :keyword schedule: Defines the schedule used by Chaos. - :paramtype schedule: ~azure.servicefabric.models.ChaosSchedule - """ - super(ChaosScheduleDescription, self).__init__(**kwargs) - self.version = kwargs.get('version', None) - self.schedule = kwargs.get('schedule', None) - - -class ChaosScheduleJob(msrest.serialization.Model): - """Defines a repetition rule and parameters of Chaos to be used with the Chaos Schedule. - - :ivar chaos_parameters: A reference to which Chaos Parameters of the Chaos Schedule to use. - :vartype chaos_parameters: str - :ivar days: Defines the days of the week that a Chaos Schedule Job will run for. - :vartype days: ~azure.servicefabric.models.ChaosScheduleJobActiveDaysOfWeek - :ivar times: A list of Time Ranges that specify when during active days that this job will run. - The times are interpreted as UTC. - :vartype times: list[~azure.servicefabric.models.TimeRange] - """ - - _attribute_map = { - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'str'}, - 'days': {'key': 'Days', 'type': 'ChaosScheduleJobActiveDaysOfWeek'}, - 'times': {'key': 'Times', 'type': '[TimeRange]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword chaos_parameters: A reference to which Chaos Parameters of the Chaos Schedule to use. - :paramtype chaos_parameters: str - :keyword days: Defines the days of the week that a Chaos Schedule Job will run for. - :paramtype days: ~azure.servicefabric.models.ChaosScheduleJobActiveDaysOfWeek - :keyword times: A list of Time Ranges that specify when during active days that this job will - run. The times are interpreted as UTC. - :paramtype times: list[~azure.servicefabric.models.TimeRange] - """ - super(ChaosScheduleJob, self).__init__(**kwargs) - self.chaos_parameters = kwargs.get('chaos_parameters', None) - self.days = kwargs.get('days', None) - self.times = kwargs.get('times', None) - - -class ChaosScheduleJobActiveDaysOfWeek(msrest.serialization.Model): - """Defines the days of the week that a Chaos Schedule Job will run for. - - :ivar sunday: Indicates if the Chaos Schedule Job will run on Sunday. - :vartype sunday: bool - :ivar monday: Indicates if the Chaos Schedule Job will run on Monday. - :vartype monday: bool - :ivar tuesday: Indicates if the Chaos Schedule Job will run on Tuesday. - :vartype tuesday: bool - :ivar wednesday: Indicates if the Chaos Schedule Job will run on Wednesday. - :vartype wednesday: bool - :ivar thursday: Indicates if the Chaos Schedule Job will run on Thursday. - :vartype thursday: bool - :ivar friday: Indicates if the Chaos Schedule Job will run on Friday. - :vartype friday: bool - :ivar saturday: Indicates if the Chaos Schedule Job will run on Saturday. - :vartype saturday: bool - """ - - _attribute_map = { - 'sunday': {'key': 'Sunday', 'type': 'bool'}, - 'monday': {'key': 'Monday', 'type': 'bool'}, - 'tuesday': {'key': 'Tuesday', 'type': 'bool'}, - 'wednesday': {'key': 'Wednesday', 'type': 'bool'}, - 'thursday': {'key': 'Thursday', 'type': 'bool'}, - 'friday': {'key': 'Friday', 'type': 'bool'}, - 'saturday': {'key': 'Saturday', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword sunday: Indicates if the Chaos Schedule Job will run on Sunday. - :paramtype sunday: bool - :keyword monday: Indicates if the Chaos Schedule Job will run on Monday. - :paramtype monday: bool - :keyword tuesday: Indicates if the Chaos Schedule Job will run on Tuesday. - :paramtype tuesday: bool - :keyword wednesday: Indicates if the Chaos Schedule Job will run on Wednesday. - :paramtype wednesday: bool - :keyword thursday: Indicates if the Chaos Schedule Job will run on Thursday. - :paramtype thursday: bool - :keyword friday: Indicates if the Chaos Schedule Job will run on Friday. - :paramtype friday: bool - :keyword saturday: Indicates if the Chaos Schedule Job will run on Saturday. - :paramtype saturday: bool - """ - super(ChaosScheduleJobActiveDaysOfWeek, self).__init__(**kwargs) - self.sunday = kwargs.get('sunday', False) - self.monday = kwargs.get('monday', False) - self.tuesday = kwargs.get('tuesday', False) - self.wednesday = kwargs.get('wednesday', False) - self.thursday = kwargs.get('thursday', False) - self.friday = kwargs.get('friday', False) - self.saturday = kwargs.get('saturday', False) - - -class ClusterEvent(FabricEvent): - """Represents the base for all Cluster Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ChaosStartedEvent, ChaosStoppedEvent, ClusterHealthReportExpiredEvent, ClusterNewHealthReportEvent, ClusterUpgradeCompletedEvent, ClusterUpgradeDomainCompletedEvent, ClusterUpgradeRollbackCompletedEvent, ClusterUpgradeRollbackStartedEvent, ClusterUpgradeStartedEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - } - - _subtype_map = { - 'kind': {'ChaosStarted': 'ChaosStartedEvent', 'ChaosStopped': 'ChaosStoppedEvent', 'ClusterHealthReportExpired': 'ClusterHealthReportExpiredEvent', 'ClusterNewHealthReport': 'ClusterNewHealthReportEvent', 'ClusterUpgradeCompleted': 'ClusterUpgradeCompletedEvent', 'ClusterUpgradeDomainCompleted': 'ClusterUpgradeDomainCompletedEvent', 'ClusterUpgradeRollbackCompleted': 'ClusterUpgradeRollbackCompletedEvent', 'ClusterUpgradeRollbackStarted': 'ClusterUpgradeRollbackStartedEvent', 'ClusterUpgradeStarted': 'ClusterUpgradeStartedEvent'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - """ - super(ClusterEvent, self).__init__(**kwargs) - self.kind = 'ClusterEvent' # type: str - - -class ChaosStartedEvent(ClusterEvent): - """Chaos Started event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar max_concurrent_faults: Required. Maximum number of concurrent faults. - :vartype max_concurrent_faults: long - :ivar time_to_run_in_seconds: Required. Time to run in seconds. - :vartype time_to_run_in_seconds: float - :ivar max_cluster_stabilization_timeout_in_seconds: Required. Maximum timeout for cluster - stabilization in seconds. - :vartype max_cluster_stabilization_timeout_in_seconds: float - :ivar wait_time_between_iterations_in_seconds: Required. Wait time between iterations in - seconds. - :vartype wait_time_between_iterations_in_seconds: float - :ivar wait_time_between_faults_in_seconds: Required. Wait time between faults in seconds. - :vartype wait_time_between_faults_in_seconds: float - :ivar move_replica_fault_enabled: Required. Indicates MoveReplica fault is enabled. - :vartype move_replica_fault_enabled: bool - :ivar included_node_type_list: Required. List of included Node types. - :vartype included_node_type_list: str - :ivar included_application_list: Required. List of included Applications. - :vartype included_application_list: str - :ivar cluster_health_policy: Required. Health policy. - :vartype cluster_health_policy: str - :ivar chaos_context: Required. Chaos Context. - :vartype chaos_context: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'max_concurrent_faults': {'required': True}, - 'time_to_run_in_seconds': {'required': True}, - 'max_cluster_stabilization_timeout_in_seconds': {'required': True}, - 'wait_time_between_iterations_in_seconds': {'required': True}, - 'wait_time_between_faults_in_seconds': {'required': True}, - 'move_replica_fault_enabled': {'required': True}, - 'included_node_type_list': {'required': True}, - 'included_application_list': {'required': True}, - 'cluster_health_policy': {'required': True}, - 'chaos_context': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, - 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'float'}, - 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'float'}, - 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'float'}, - 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'float'}, - 'move_replica_fault_enabled': {'key': 'MoveReplicaFaultEnabled', 'type': 'bool'}, - 'included_node_type_list': {'key': 'IncludedNodeTypeList', 'type': 'str'}, - 'included_application_list': {'key': 'IncludedApplicationList', 'type': 'str'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'str'}, - 'chaos_context': {'key': 'ChaosContext', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword max_concurrent_faults: Required. Maximum number of concurrent faults. - :paramtype max_concurrent_faults: long - :keyword time_to_run_in_seconds: Required. Time to run in seconds. - :paramtype time_to_run_in_seconds: float - :keyword max_cluster_stabilization_timeout_in_seconds: Required. Maximum timeout for cluster - stabilization in seconds. - :paramtype max_cluster_stabilization_timeout_in_seconds: float - :keyword wait_time_between_iterations_in_seconds: Required. Wait time between iterations in - seconds. - :paramtype wait_time_between_iterations_in_seconds: float - :keyword wait_time_between_faults_in_seconds: Required. Wait time between faults in seconds. - :paramtype wait_time_between_faults_in_seconds: float - :keyword move_replica_fault_enabled: Required. Indicates MoveReplica fault is enabled. - :paramtype move_replica_fault_enabled: bool - :keyword included_node_type_list: Required. List of included Node types. - :paramtype included_node_type_list: str - :keyword included_application_list: Required. List of included Applications. - :paramtype included_application_list: str - :keyword cluster_health_policy: Required. Health policy. - :paramtype cluster_health_policy: str - :keyword chaos_context: Required. Chaos Context. - :paramtype chaos_context: str - """ - super(ChaosStartedEvent, self).__init__(**kwargs) - self.kind = 'ChaosStarted' # type: str - self.max_concurrent_faults = kwargs['max_concurrent_faults'] - self.time_to_run_in_seconds = kwargs['time_to_run_in_seconds'] - self.max_cluster_stabilization_timeout_in_seconds = kwargs['max_cluster_stabilization_timeout_in_seconds'] - self.wait_time_between_iterations_in_seconds = kwargs['wait_time_between_iterations_in_seconds'] - self.wait_time_between_faults_in_seconds = kwargs['wait_time_between_faults_in_seconds'] - self.move_replica_fault_enabled = kwargs['move_replica_fault_enabled'] - self.included_node_type_list = kwargs['included_node_type_list'] - self.included_application_list = kwargs['included_application_list'] - self.cluster_health_policy = kwargs['cluster_health_policy'] - self.chaos_context = kwargs['chaos_context'] - - -class ChaosStoppedEvent(ClusterEvent): - """Chaos Stopped event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar reason: Required. Describes reason. - :vartype reason: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'reason': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword reason: Required. Describes reason. - :paramtype reason: str - """ - super(ChaosStoppedEvent, self).__init__(**kwargs) - self.kind = 'ChaosStopped' # type: str - self.reason = kwargs['reason'] - - -class ChaosTargetFilter(msrest.serialization.Model): - """Defines all filters for targeted Chaos faults, for example, faulting only certain node types or faulting only certain applications. -If ChaosTargetFilter is not used, Chaos faults all cluster entities. If ChaosTargetFilter is used, Chaos faults only the entities that meet the ChaosTargetFilter -specification. NodeTypeInclusionList and ApplicationInclusionList allow a union semantics only. It is not possible to specify an intersection -of NodeTypeInclusionList and ApplicationInclusionList. For example, it is not possible to specify "fault this application only when it is on that node type." -Once an entity is included in either NodeTypeInclusionList or ApplicationInclusionList, that entity cannot be excluded using ChaosTargetFilter. Even if -applicationX does not appear in ApplicationInclusionList, in some Chaos iteration applicationX can be faulted because it happens to be on a node of nodeTypeY that is included -in NodeTypeInclusionList. If both NodeTypeInclusionList and ApplicationInclusionList are null or empty, an ArgumentException is thrown. - - :ivar node_type_inclusion_list: A list of node types to include in Chaos faults. - All types of faults (restart node, restart code package, remove replica, restart replica, move - primary, and move secondary) are enabled for the nodes of these node types. - If a node type (say NodeTypeX) does not appear in the NodeTypeInclusionList, then node level - faults (like NodeRestart) will never be enabled for the nodes of - NodeTypeX, but code package and replica faults can still be enabled for NodeTypeX if an - application in the ApplicationInclusionList. - happens to reside on a node of NodeTypeX. - At most 100 node type names can be included in this list, to increase this number, a config - upgrade is required for MaxNumberOfNodeTypesInChaosEntityFilter configuration. - :vartype node_type_inclusion_list: list[str] - :ivar application_inclusion_list: A list of application URIs to include in Chaos faults. - All replicas belonging to services of these applications are amenable to replica faults - (restart replica, remove replica, move primary, and move secondary) by Chaos. - Chaos may restart a code package only if the code package hosts replicas of these applications - only. - If an application does not appear in this list, it can still be faulted in some Chaos - iteration if the application ends up on a node of a node type that is included in - NodeTypeInclusionList. - However, if applicationX is tied to nodeTypeY through placement constraints and applicationX - is absent from ApplicationInclusionList and nodeTypeY is absent from NodeTypeInclusionList, - then applicationX will never be faulted. - At most 1000 application names can be included in this list, to increase this number, a config - upgrade is required for MaxNumberOfApplicationsInChaosEntityFilter configuration. - :vartype application_inclusion_list: list[str] - """ - - _attribute_map = { - 'node_type_inclusion_list': {'key': 'NodeTypeInclusionList', 'type': '[str]'}, - 'application_inclusion_list': {'key': 'ApplicationInclusionList', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword node_type_inclusion_list: A list of node types to include in Chaos faults. - All types of faults (restart node, restart code package, remove replica, restart replica, move - primary, and move secondary) are enabled for the nodes of these node types. - If a node type (say NodeTypeX) does not appear in the NodeTypeInclusionList, then node level - faults (like NodeRestart) will never be enabled for the nodes of - NodeTypeX, but code package and replica faults can still be enabled for NodeTypeX if an - application in the ApplicationInclusionList. - happens to reside on a node of NodeTypeX. - At most 100 node type names can be included in this list, to increase this number, a config - upgrade is required for MaxNumberOfNodeTypesInChaosEntityFilter configuration. - :paramtype node_type_inclusion_list: list[str] - :keyword application_inclusion_list: A list of application URIs to include in Chaos faults. - All replicas belonging to services of these applications are amenable to replica faults - (restart replica, remove replica, move primary, and move secondary) by Chaos. - Chaos may restart a code package only if the code package hosts replicas of these applications - only. - If an application does not appear in this list, it can still be faulted in some Chaos - iteration if the application ends up on a node of a node type that is included in - NodeTypeInclusionList. - However, if applicationX is tied to nodeTypeY through placement constraints and applicationX - is absent from ApplicationInclusionList and nodeTypeY is absent from NodeTypeInclusionList, - then applicationX will never be faulted. - At most 1000 application names can be included in this list, to increase this number, a config - upgrade is required for MaxNumberOfApplicationsInChaosEntityFilter configuration. - :paramtype application_inclusion_list: list[str] - """ - super(ChaosTargetFilter, self).__init__(**kwargs) - self.node_type_inclusion_list = kwargs.get('node_type_inclusion_list', None) - self.application_inclusion_list = kwargs.get('application_inclusion_list', None) - - -class PropertyBatchOperation(msrest.serialization.Model): - """Represents the base type for property operations that can be put into a batch and submitted. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CheckExistsPropertyBatchOperation, CheckSequencePropertyBatchOperation, CheckValuePropertyBatchOperation, DeletePropertyBatchOperation, GetPropertyBatchOperation, PutPropertyBatchOperation. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch operation, determined by the operation to be - performed. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind - :ivar property_name: Required. The name of the Service Fabric property. - :vartype property_name: str - """ - - _validation = { - 'kind': {'required': True}, - 'property_name': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'CheckExists': 'CheckExistsPropertyBatchOperation', 'CheckSequence': 'CheckSequencePropertyBatchOperation', 'CheckValue': 'CheckValuePropertyBatchOperation', 'Delete': 'DeletePropertyBatchOperation', 'Get': 'GetPropertyBatchOperation', 'Put': 'PutPropertyBatchOperation'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword property_name: Required. The name of the Service Fabric property. - :paramtype property_name: str - """ - super(PropertyBatchOperation, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.property_name = kwargs['property_name'] - - -class CheckExistsPropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that compares the Boolean existence of a property with the Exists argument. -The PropertyBatchOperation operation fails if the property's existence is not equal to the Exists argument. -The CheckExistsPropertyBatchOperation is generally used as a precondition for the write operations in the batch. -Note that if one PropertyBatchOperation in a PropertyBatch fails, -the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch operation, determined by the operation to be - performed. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind - :ivar property_name: Required. The name of the Service Fabric property. - :vartype property_name: str - :ivar exists: Required. Whether or not the property should exist for the operation to pass. - :vartype exists: bool - """ - - _validation = { - 'kind': {'required': True}, - 'property_name': {'required': True}, - 'exists': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'exists': {'key': 'Exists', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword property_name: Required. The name of the Service Fabric property. - :paramtype property_name: str - :keyword exists: Required. Whether or not the property should exist for the operation to pass. - :paramtype exists: bool - """ - super(CheckExistsPropertyBatchOperation, self).__init__(**kwargs) - self.kind = 'CheckExists' # type: str - self.exists = kwargs['exists'] - - -class CheckSequencePropertyBatchOperation(PropertyBatchOperation): - """Compares the Sequence Number of a property with the SequenceNumber argument. -A property's sequence number can be thought of as that property's version. -Every time the property is modified, its sequence number is increased. -The sequence number can be found in a property's metadata. -The comparison fails if the sequence numbers are not equal. -CheckSequencePropertyBatchOperation is generally used as a precondition for the write operations in the batch. -Note that if one PropertyBatchOperation in a PropertyBatch fails, -the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch operation, determined by the operation to be - performed. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind - :ivar property_name: Required. The name of the Service Fabric property. - :vartype property_name: str - :ivar sequence_number: Required. The expected sequence number. - :vartype sequence_number: str - """ - - _validation = { - 'kind': {'required': True}, - 'property_name': {'required': True}, - 'sequence_number': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword property_name: Required. The name of the Service Fabric property. - :paramtype property_name: str - :keyword sequence_number: Required. The expected sequence number. - :paramtype sequence_number: str - """ - super(CheckSequencePropertyBatchOperation, self).__init__(**kwargs) - self.kind = 'CheckSequence' # type: str - self.sequence_number = kwargs['sequence_number'] - - -class CheckValuePropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that compares the value of the property with the expected value. -The CheckValuePropertyBatchOperation is generally used as a precondition for the write operations in the batch. -Note that if one PropertyBatchOperation in a PropertyBatch fails, -the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch operation, determined by the operation to be - performed. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind - :ivar property_name: Required. The name of the Service Fabric property. - :vartype property_name: str - :ivar value: Required. The expected property value. - :vartype value: ~azure.servicefabric.models.PropertyValue - """ - - _validation = { - 'kind': {'required': True}, - 'property_name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword property_name: Required. The name of the Service Fabric property. - :paramtype property_name: str - :keyword value: Required. The expected property value. - :paramtype value: ~azure.servicefabric.models.PropertyValue - """ - super(CheckValuePropertyBatchOperation, self).__init__(**kwargs) - self.kind = 'CheckValue' # type: str - self.value = kwargs['value'] - - -class ClusterConfiguration(msrest.serialization.Model): - """Information about the standalone cluster configuration. - - :ivar cluster_configuration: The contents of the cluster configuration file. - :vartype cluster_configuration: str - """ - - _attribute_map = { - 'cluster_configuration': {'key': 'ClusterConfiguration', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword cluster_configuration: The contents of the cluster configuration file. - :paramtype cluster_configuration: str - """ - super(ClusterConfiguration, self).__init__(**kwargs) - self.cluster_configuration = kwargs.get('cluster_configuration', None) - - -class ClusterConfigurationUpgradeDescription(msrest.serialization.Model): - """Describes the parameters for a standalone cluster configuration upgrade. - - All required parameters must be populated in order to send to Azure. - - :ivar cluster_config: Required. The cluster configuration as a JSON string. For example, `this - file - `_ - contains JSON describing the `nodes and other properties of the cluster - `_. - :vartype cluster_config: str - :ivar health_check_retry_timeout: The length of time between attempts to perform health checks - if the application or cluster is not healthy. - :vartype health_check_retry_timeout: ~datetime.timedelta - :ivar health_check_wait_duration_in_seconds: The length of time to wait after completing an - upgrade domain before starting the health checks process. - :vartype health_check_wait_duration_in_seconds: ~datetime.timedelta - :ivar health_check_stable_duration_in_seconds: The length of time that the application or - cluster must remain healthy before the upgrade proceeds to the next upgrade domain. - :vartype health_check_stable_duration_in_seconds: ~datetime.timedelta - :ivar upgrade_domain_timeout_in_seconds: The timeout for the upgrade domain. - :vartype upgrade_domain_timeout_in_seconds: ~datetime.timedelta - :ivar upgrade_timeout_in_seconds: The upgrade timeout. - :vartype upgrade_timeout_in_seconds: ~datetime.timedelta - :ivar max_percent_unhealthy_applications: The maximum allowed percentage of unhealthy - applications during the upgrade. Allowed values are integer values from zero to 100. - :vartype max_percent_unhealthy_applications: int - :ivar max_percent_unhealthy_nodes: The maximum allowed percentage of unhealthy nodes during the - upgrade. Allowed values are integer values from zero to 100. - :vartype max_percent_unhealthy_nodes: int - :ivar max_percent_delta_unhealthy_nodes: The maximum allowed percentage of delta health - degradation during the upgrade. Allowed values are integer values from zero to 100. - :vartype max_percent_delta_unhealthy_nodes: int - :ivar max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum allowed percentage of - upgrade domain delta health degradation during the upgrade. Allowed values are integer values - from zero to 100. - :vartype max_percent_upgrade_domain_delta_unhealthy_nodes: int - :ivar application_health_policies: Defines the application health policy map used to evaluate - the health of an application or one of its children entities. - :vartype application_health_policies: ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _validation = { - 'cluster_config': {'required': True}, - } - - _attribute_map = { - 'cluster_config': {'key': 'ClusterConfig', 'type': 'str'}, - 'health_check_retry_timeout': {'key': 'HealthCheckRetryTimeout', 'type': 'duration'}, - 'health_check_wait_duration_in_seconds': {'key': 'HealthCheckWaitDurationInSeconds', 'type': 'duration'}, - 'health_check_stable_duration_in_seconds': {'key': 'HealthCheckStableDurationInSeconds', 'type': 'duration'}, - 'upgrade_domain_timeout_in_seconds': {'key': 'UpgradeDomainTimeoutInSeconds', 'type': 'duration'}, - 'upgrade_timeout_in_seconds': {'key': 'UpgradeTimeoutInSeconds', 'type': 'duration'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, - 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword cluster_config: Required. The cluster configuration as a JSON string. For example, - `this file - `_ - contains JSON describing the `nodes and other properties of the cluster - `_. - :paramtype cluster_config: str - :keyword health_check_retry_timeout: The length of time between attempts to perform health - checks if the application or cluster is not healthy. - :paramtype health_check_retry_timeout: ~datetime.timedelta - :keyword health_check_wait_duration_in_seconds: The length of time to wait after completing an - upgrade domain before starting the health checks process. - :paramtype health_check_wait_duration_in_seconds: ~datetime.timedelta - :keyword health_check_stable_duration_in_seconds: The length of time that the application or - cluster must remain healthy before the upgrade proceeds to the next upgrade domain. - :paramtype health_check_stable_duration_in_seconds: ~datetime.timedelta - :keyword upgrade_domain_timeout_in_seconds: The timeout for the upgrade domain. - :paramtype upgrade_domain_timeout_in_seconds: ~datetime.timedelta - :keyword upgrade_timeout_in_seconds: The upgrade timeout. - :paramtype upgrade_timeout_in_seconds: ~datetime.timedelta - :keyword max_percent_unhealthy_applications: The maximum allowed percentage of unhealthy - applications during the upgrade. Allowed values are integer values from zero to 100. - :paramtype max_percent_unhealthy_applications: int - :keyword max_percent_unhealthy_nodes: The maximum allowed percentage of unhealthy nodes during - the upgrade. Allowed values are integer values from zero to 100. - :paramtype max_percent_unhealthy_nodes: int - :keyword max_percent_delta_unhealthy_nodes: The maximum allowed percentage of delta health - degradation during the upgrade. Allowed values are integer values from zero to 100. - :paramtype max_percent_delta_unhealthy_nodes: int - :keyword max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum allowed percentage of - upgrade domain delta health degradation during the upgrade. Allowed values are integer values - from zero to 100. - :paramtype max_percent_upgrade_domain_delta_unhealthy_nodes: int - :keyword application_health_policies: Defines the application health policy map used to - evaluate the health of an application or one of its children entities. - :paramtype application_health_policies: ~azure.servicefabric.models.ApplicationHealthPolicies - """ - super(ClusterConfigurationUpgradeDescription, self).__init__(**kwargs) - self.cluster_config = kwargs['cluster_config'] - self.health_check_retry_timeout = kwargs.get('health_check_retry_timeout', "PT0H0M0S") - self.health_check_wait_duration_in_seconds = kwargs.get('health_check_wait_duration_in_seconds', "PT0H0M0S") - self.health_check_stable_duration_in_seconds = kwargs.get('health_check_stable_duration_in_seconds', "PT0H0M0S") - self.upgrade_domain_timeout_in_seconds = kwargs.get('upgrade_domain_timeout_in_seconds', "PT0H0M0S") - self.upgrade_timeout_in_seconds = kwargs.get('upgrade_timeout_in_seconds', "PT0H0M0S") - self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', 0) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', 0) - self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', 0) - self.max_percent_upgrade_domain_delta_unhealthy_nodes = kwargs.get('max_percent_upgrade_domain_delta_unhealthy_nodes', 0) - self.application_health_policies = kwargs.get('application_health_policies', None) - - -class ClusterConfigurationUpgradeStatusInfo(msrest.serialization.Model): - """Information about a standalone cluster configuration upgrade status. - - :ivar upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", - "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", - "RollingForwardInProgress", "RollingForwardCompleted", "Failed". - :vartype upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :ivar progress_status: The cluster manifest version. - :vartype progress_status: int - :ivar config_version: The cluster configuration version. - :vartype config_version: str - :ivar details: The cluster upgrade status details. - :vartype details: str - """ - - _attribute_map = { - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'progress_status': {'key': 'ProgressStatus', 'type': 'int'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'details': {'key': 'Details', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", - "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", - "RollingForwardInProgress", "RollingForwardCompleted", "Failed". - :paramtype upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :keyword progress_status: The cluster manifest version. - :paramtype progress_status: int - :keyword config_version: The cluster configuration version. - :paramtype config_version: str - :keyword details: The cluster upgrade status details. - :paramtype details: str - """ - super(ClusterConfigurationUpgradeStatusInfo, self).__init__(**kwargs) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.progress_status = kwargs.get('progress_status', None) - self.config_version = kwargs.get('config_version', None) - self.details = kwargs.get('details', None) - - -class ClusterHealth(EntityHealth): - """Represents the health of the cluster. -Contains the cluster aggregated health state, the cluster application and node health states as well as the health events and the unhealthy evaluations. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar node_health_states: Cluster node health states as found in the health store. - :vartype node_health_states: list[~azure.servicefabric.models.NodeHealthState] - :ivar application_health_states: Cluster application health states as found in the health - store. - :vartype application_health_states: list[~azure.servicefabric.models.ApplicationHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'node_health_states': {'key': 'NodeHealthStates', 'type': '[NodeHealthState]'}, - 'application_health_states': {'key': 'ApplicationHealthStates', 'type': '[ApplicationHealthState]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword node_health_states: Cluster node health states as found in the health store. - :paramtype node_health_states: list[~azure.servicefabric.models.NodeHealthState] - :keyword application_health_states: Cluster application health states as found in the health - store. - :paramtype application_health_states: list[~azure.servicefabric.models.ApplicationHealthState] - """ - super(ClusterHealth, self).__init__(**kwargs) - self.node_health_states = kwargs.get('node_health_states', None) - self.application_health_states = kwargs.get('application_health_states', None) - - -class ClusterHealthChunk(msrest.serialization.Model): - """Represents the health chunk of the cluster. -Contains the cluster aggregated health state, and the cluster entities that respect the input filter. - - :ivar health_state: The HealthState representing the aggregated health state of the cluster - computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired cluster health policy and the application - health policies. Possible values include: "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar node_health_state_chunks: The list of node health state chunks in the cluster that - respect the filters in the cluster health chunk query description. - :vartype node_health_state_chunks: ~azure.servicefabric.models.NodeHealthStateChunkList - :ivar application_health_state_chunks: The list of application health state chunks in the - cluster that respect the filters in the cluster health chunk query description. - :vartype application_health_state_chunks: - ~azure.servicefabric.models.ApplicationHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_health_state_chunks': {'key': 'NodeHealthStateChunks', 'type': 'NodeHealthStateChunkList'}, - 'application_health_state_chunks': {'key': 'ApplicationHealthStateChunks', 'type': 'ApplicationHealthStateChunkList'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword health_state: The HealthState representing the aggregated health state of the cluster - computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired cluster health policy and the application - health policies. Possible values include: "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword node_health_state_chunks: The list of node health state chunks in the cluster that - respect the filters in the cluster health chunk query description. - :paramtype node_health_state_chunks: ~azure.servicefabric.models.NodeHealthStateChunkList - :keyword application_health_state_chunks: The list of application health state chunks in the - cluster that respect the filters in the cluster health chunk query description. - :paramtype application_health_state_chunks: - ~azure.servicefabric.models.ApplicationHealthStateChunkList - """ - super(ClusterHealthChunk, self).__init__(**kwargs) - self.health_state = kwargs.get('health_state', None) - self.node_health_state_chunks = kwargs.get('node_health_state_chunks', None) - self.application_health_state_chunks = kwargs.get('application_health_state_chunks', None) - - -class ClusterHealthChunkQueryDescription(msrest.serialization.Model): - """The cluster health chunk query description, which can specify the health policies to evaluate cluster health and very expressive filters to select which cluster entities to include in response. - - :ivar node_filters: Defines a list of filters that specify which nodes to be included in the - returned cluster health chunk. - If no filters are specified, no nodes are returned. All the nodes are used to evaluate the - cluster's aggregated health state, regardless of the input filters. - The cluster health chunk query may specify multiple node filters. - For example, it can specify a filter to return all nodes with health state Error and another - filter to always include a node identified by its NodeName. - :vartype node_filters: list[~azure.servicefabric.models.NodeHealthStateFilter] - :ivar application_filters: Defines a list of filters that specify which applications to be - included in the returned cluster health chunk. - If no filters are specified, no applications are returned. All the applications are used to - evaluate the cluster's aggregated health state, regardless of the input filters. - The cluster health chunk query may specify multiple application filters. - For example, it can specify a filter to return all applications with health state Error and - another filter to always include applications of a specified application type. - :vartype application_filters: list[~azure.servicefabric.models.ApplicationHealthStateFilter] - :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster - or of a cluster node. - :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :ivar application_health_policies: Defines the application health policy map used to evaluate - the health of an application or one of its children entities. - :vartype application_health_policies: ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _attribute_map = { - 'node_filters': {'key': 'NodeFilters', 'type': '[NodeHealthStateFilter]'}, - 'application_filters': {'key': 'ApplicationFilters', 'type': '[ApplicationHealthStateFilter]'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword node_filters: Defines a list of filters that specify which nodes to be included in the - returned cluster health chunk. - If no filters are specified, no nodes are returned. All the nodes are used to evaluate the - cluster's aggregated health state, regardless of the input filters. - The cluster health chunk query may specify multiple node filters. - For example, it can specify a filter to return all nodes with health state Error and another - filter to always include a node identified by its NodeName. - :paramtype node_filters: list[~azure.servicefabric.models.NodeHealthStateFilter] - :keyword application_filters: Defines a list of filters that specify which applications to be - included in the returned cluster health chunk. - If no filters are specified, no applications are returned. All the applications are used to - evaluate the cluster's aggregated health state, regardless of the input filters. - The cluster health chunk query may specify multiple application filters. - For example, it can specify a filter to return all applications with health state Error and - another filter to always include applications of a specified application type. - :paramtype application_filters: list[~azure.servicefabric.models.ApplicationHealthStateFilter] - :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the - cluster or of a cluster node. - :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :keyword application_health_policies: Defines the application health policy map used to - evaluate the health of an application or one of its children entities. - :paramtype application_health_policies: ~azure.servicefabric.models.ApplicationHealthPolicies - """ - super(ClusterHealthChunkQueryDescription, self).__init__(**kwargs) - self.node_filters = kwargs.get('node_filters', None) - self.application_filters = kwargs.get('application_filters', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.application_health_policies = kwargs.get('application_health_policies', None) - - -class ClusterHealthPolicies(msrest.serialization.Model): - """Health policies to evaluate cluster health. - - :ivar application_health_policy_map: Defines a map that contains specific application health - policies for different applications. - Each entry specifies as key the application name and as value an ApplicationHealthPolicy used - to evaluate the application health. - If an application is not specified in the map, the application health evaluation uses the - ApplicationHealthPolicy found in its application manifest or the default application health - policy (if no health policy is defined in the manifest). - The map is empty by default. - :vartype application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster - or of a cluster node. - :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword application_health_policy_map: Defines a map that contains specific application health - policies for different applications. - Each entry specifies as key the application name and as value an ApplicationHealthPolicy used - to evaluate the application health. - If an application is not specified in the map, the application health evaluation uses the - ApplicationHealthPolicy found in its application manifest or the default application health - policy (if no health policy is defined in the manifest). - The map is empty by default. - :paramtype application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the - cluster or of a cluster node. - :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - """ - super(ClusterHealthPolicies, self).__init__(**kwargs) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - - -class ClusterHealthPolicy(msrest.serialization.Model): - """Defines a health policy used to evaluate the health of the cluster or of a cluster node. - - :ivar consider_warning_as_error: Indicates whether warnings are treated with the same severity - as errors. - :vartype consider_warning_as_error: bool - :ivar max_percent_unhealthy_nodes: The maximum allowed percentage of unhealthy nodes before - reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10. - - The percentage represents the maximum tolerated percentage of nodes that can be unhealthy - before the cluster is considered in error. - If the percentage is respected but there is at least one unhealthy node, the health is - evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy nodes over the total number - of nodes in the cluster. - The computation rounds up to tolerate one failure on small numbers of nodes. Default - percentage is zero. - - In large clusters, some nodes will always be down or out for repairs, so this percentage - should be configured to tolerate that. - :vartype max_percent_unhealthy_nodes: int - :ivar max_percent_unhealthy_applications: The maximum allowed percentage of unhealthy - applications before reporting an error. For example, to allow 10% of applications to be - unhealthy, this value would be 10. - - The percentage represents the maximum tolerated percentage of applications that can be - unhealthy before the cluster is considered in error. - If the percentage is respected but there is at least one unhealthy application, the health is - evaluated as Warning. - This is calculated by dividing the number of unhealthy applications over the total number of - application instances in the cluster, excluding applications of application types that are - included in the ApplicationTypeHealthPolicyMap. - The computation rounds up to tolerate one failure on small numbers of applications. Default - percentage is zero. - :vartype max_percent_unhealthy_applications: int - :ivar application_type_health_policy_map: Defines a map with max percentage unhealthy - applications for specific application types. - Each entry specifies as key the application type name and as value an integer that represents - the MaxPercentUnhealthyApplications percentage used to evaluate the applications of the - specified application type. - - The application type health policy map can be used during cluster health evaluation to - describe special application types. - The application types included in the map are evaluated against the percentage specified in - the map, and not with the global MaxPercentUnhealthyApplications defined in the cluster health - policy. - The applications of application types specified in the map are not counted against the global - pool of applications. - For example, if some applications of a type are critical, the cluster administrator can add an - entry to the map for that application type - and assign it a value of 0% (that is, do not tolerate any failures). - All other applications can be evaluated with MaxPercentUnhealthyApplications set to 20% to - tolerate some failures out of the thousands of application instances. - The application type health policy map is used only if the cluster manifest enables - application type health evaluation using the configuration entry for - HealthManager/EnableApplicationTypeHealthEvaluation. - :vartype application_type_health_policy_map: - list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] - :ivar node_type_health_policy_map: Defines a map with max percentage unhealthy nodes for - specific node types. - Each entry specifies as key the node type name and as value an integer that represents the - MaxPercentUnhealthyNodes percentage used to evaluate the nodes of the specified node type. - - The node type health policy map can be used during cluster health evaluation to describe - special node types. - They are evaluated against the percentages associated with their node type name in the map. - Setting this has no impact on the global pool of nodes used for MaxPercentUnhealthyNodes. - The node type health policy map is used only if the cluster manifest enables node type health - evaluation using the configuration entry for HealthManager/EnableNodeTypeHealthEvaluation. - - For example, given a cluster with many nodes of different types, with important work hosted on - node type "SpecialNodeType" that should not tolerate any nodes down. - You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some failures for all - nodes, but for the node type "SpecialNodeType", set the MaxPercentUnhealthyNodes to 0 by - setting the value in the key value pair in NodeTypeHealthPolicyMapItem. The key is the node - type name. - This way, as long as no nodes of type "SpecialNodeType" are in Error state, - even if some of the many nodes in the global pool are in Error state, but below the global - unhealthy percentage, the cluster would be evaluated to Warning. - A Warning health state does not impact cluster upgrade or other monitoring triggered by Error - health state. - But even one node of type SpecialNodeType in Error would make cluster unhealthy (in Error - rather than Warning/Ok), which triggers rollback or pauses the cluster upgrade, depending on - the upgrade configuration. - - Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting SpecialNodeType's - max percent unhealthy nodes to 100, - with one node of type SpecialNodeType in Error state would still put the cluster in an Error - state, since the global restriction is more strict in this case. - :vartype node_type_health_policy_map: - list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] - """ - - _attribute_map = { - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'application_type_health_policy_map': {'key': 'ApplicationTypeHealthPolicyMap', 'type': '[ApplicationTypeHealthPolicyMapItem]'}, - 'node_type_health_policy_map': {'key': 'NodeTypeHealthPolicyMap', 'type': '[NodeTypeHealthPolicyMapItem]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword consider_warning_as_error: Indicates whether warnings are treated with the same - severity as errors. - :paramtype consider_warning_as_error: bool - :keyword max_percent_unhealthy_nodes: The maximum allowed percentage of unhealthy nodes before - reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10. - - The percentage represents the maximum tolerated percentage of nodes that can be unhealthy - before the cluster is considered in error. - If the percentage is respected but there is at least one unhealthy node, the health is - evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy nodes over the total number - of nodes in the cluster. - The computation rounds up to tolerate one failure on small numbers of nodes. Default - percentage is zero. - - In large clusters, some nodes will always be down or out for repairs, so this percentage - should be configured to tolerate that. - :paramtype max_percent_unhealthy_nodes: int - :keyword max_percent_unhealthy_applications: The maximum allowed percentage of unhealthy - applications before reporting an error. For example, to allow 10% of applications to be - unhealthy, this value would be 10. - - The percentage represents the maximum tolerated percentage of applications that can be - unhealthy before the cluster is considered in error. - If the percentage is respected but there is at least one unhealthy application, the health is - evaluated as Warning. - This is calculated by dividing the number of unhealthy applications over the total number of - application instances in the cluster, excluding applications of application types that are - included in the ApplicationTypeHealthPolicyMap. - The computation rounds up to tolerate one failure on small numbers of applications. Default - percentage is zero. - :paramtype max_percent_unhealthy_applications: int - :keyword application_type_health_policy_map: Defines a map with max percentage unhealthy - applications for specific application types. - Each entry specifies as key the application type name and as value an integer that represents - the MaxPercentUnhealthyApplications percentage used to evaluate the applications of the - specified application type. - - The application type health policy map can be used during cluster health evaluation to - describe special application types. - The application types included in the map are evaluated against the percentage specified in - the map, and not with the global MaxPercentUnhealthyApplications defined in the cluster health - policy. - The applications of application types specified in the map are not counted against the global - pool of applications. - For example, if some applications of a type are critical, the cluster administrator can add an - entry to the map for that application type - and assign it a value of 0% (that is, do not tolerate any failures). - All other applications can be evaluated with MaxPercentUnhealthyApplications set to 20% to - tolerate some failures out of the thousands of application instances. - The application type health policy map is used only if the cluster manifest enables - application type health evaluation using the configuration entry for - HealthManager/EnableApplicationTypeHealthEvaluation. - :paramtype application_type_health_policy_map: - list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] - :keyword node_type_health_policy_map: Defines a map with max percentage unhealthy nodes for - specific node types. - Each entry specifies as key the node type name and as value an integer that represents the - MaxPercentUnhealthyNodes percentage used to evaluate the nodes of the specified node type. - - The node type health policy map can be used during cluster health evaluation to describe - special node types. - They are evaluated against the percentages associated with their node type name in the map. - Setting this has no impact on the global pool of nodes used for MaxPercentUnhealthyNodes. - The node type health policy map is used only if the cluster manifest enables node type health - evaluation using the configuration entry for HealthManager/EnableNodeTypeHealthEvaluation. - - For example, given a cluster with many nodes of different types, with important work hosted on - node type "SpecialNodeType" that should not tolerate any nodes down. - You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some failures for all - nodes, but for the node type "SpecialNodeType", set the MaxPercentUnhealthyNodes to 0 by - setting the value in the key value pair in NodeTypeHealthPolicyMapItem. The key is the node - type name. - This way, as long as no nodes of type "SpecialNodeType" are in Error state, - even if some of the many nodes in the global pool are in Error state, but below the global - unhealthy percentage, the cluster would be evaluated to Warning. - A Warning health state does not impact cluster upgrade or other monitoring triggered by Error - health state. - But even one node of type SpecialNodeType in Error would make cluster unhealthy (in Error - rather than Warning/Ok), which triggers rollback or pauses the cluster upgrade, depending on - the upgrade configuration. - - Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting SpecialNodeType's - max percent unhealthy nodes to 100, - with one node of type SpecialNodeType in Error state would still put the cluster in an Error - state, since the global restriction is more strict in this case. - :paramtype node_type_health_policy_map: - list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] - """ - super(ClusterHealthPolicy, self).__init__(**kwargs) - self.consider_warning_as_error = kwargs.get('consider_warning_as_error', False) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', 0) - self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', 0) - self.application_type_health_policy_map = kwargs.get('application_type_health_policy_map', None) - self.node_type_health_policy_map = kwargs.get('node_type_health_policy_map', None) - - -class ClusterHealthReportExpiredEvent(ClusterEvent): - """Cluster Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(ClusterHealthReportExpiredEvent, self).__init__(**kwargs) - self.kind = 'ClusterHealthReportExpired' # type: str - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class ClusterLoadInfo(msrest.serialization.Model): - """Information about load in a Service Fabric cluster. It holds a summary of all metrics and their load in a cluster. - - :ivar last_balancing_start_time_utc: The starting time of last resource balancing run. - :vartype last_balancing_start_time_utc: ~datetime.datetime - :ivar last_balancing_end_time_utc: The end time of last resource balancing run. - :vartype last_balancing_end_time_utc: ~datetime.datetime - :ivar load_metric_information: List that contains metrics and their load information in this - cluster. - :vartype load_metric_information: list[~azure.servicefabric.models.LoadMetricInformation] - """ - - _attribute_map = { - 'last_balancing_start_time_utc': {'key': 'LastBalancingStartTimeUtc', 'type': 'iso-8601'}, - 'last_balancing_end_time_utc': {'key': 'LastBalancingEndTimeUtc', 'type': 'iso-8601'}, - 'load_metric_information': {'key': 'LoadMetricInformation', 'type': '[LoadMetricInformation]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword last_balancing_start_time_utc: The starting time of last resource balancing run. - :paramtype last_balancing_start_time_utc: ~datetime.datetime - :keyword last_balancing_end_time_utc: The end time of last resource balancing run. - :paramtype last_balancing_end_time_utc: ~datetime.datetime - :keyword load_metric_information: List that contains metrics and their load information in this - cluster. - :paramtype load_metric_information: list[~azure.servicefabric.models.LoadMetricInformation] - """ - super(ClusterLoadInfo, self).__init__(**kwargs) - self.last_balancing_start_time_utc = kwargs.get('last_balancing_start_time_utc', None) - self.last_balancing_end_time_utc = kwargs.get('last_balancing_end_time_utc', None) - self.load_metric_information = kwargs.get('load_metric_information', None) - - -class ClusterManifest(msrest.serialization.Model): - """Information about the cluster manifest. - - :ivar manifest: The contents of the cluster manifest file. - :vartype manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword manifest: The contents of the cluster manifest file. - :paramtype manifest: str - """ - super(ClusterManifest, self).__init__(**kwargs) - self.manifest = kwargs.get('manifest', None) - - -class ClusterNewHealthReportEvent(ClusterEvent): - """Cluster Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(ClusterNewHealthReportEvent, self).__init__(**kwargs) - self.kind = 'ClusterNewHealthReport' # type: str - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class ClusterUpgradeCompletedEvent(ClusterEvent): - """Cluster Upgrade Completed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar target_cluster_version: Required. Target Cluster version. - :vartype target_cluster_version: str - :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in - milli-seconds. - :vartype overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'target_cluster_version': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword target_cluster_version: Required. Target Cluster version. - :paramtype target_cluster_version: str - :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in - milli-seconds. - :paramtype overall_upgrade_elapsed_time_in_ms: float - """ - super(ClusterUpgradeCompletedEvent, self).__init__(**kwargs) - self.kind = 'ClusterUpgradeCompleted' # type: str - self.target_cluster_version = kwargs['target_cluster_version'] - self.overall_upgrade_elapsed_time_in_ms = kwargs['overall_upgrade_elapsed_time_in_ms'] - - -class ClusterUpgradeDescriptionObject(msrest.serialization.Model): - """Represents a ServiceFabric cluster upgrade. - - :ivar config_version: The cluster configuration version (specified in the cluster manifest). - :vartype config_version: str - :ivar code_version: The ServiceFabric code version of the cluster. - :vartype code_version: str - :ivar upgrade_kind: The kind of upgrade out of the following possible values. Possible values - include: "Invalid", "Rolling". Default value: "Rolling". - :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :vartype upgrade_replica_set_check_timeout_in_seconds: long - :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when - the code version has not changed (the upgrade only changes configuration or data). - :vartype force_restart: bool - :ivar sort_order: Defines the order in which an upgrade proceeds through the cluster. Possible - values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", - "ReverseLexicographical". Default value: "Default". - :vartype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :ivar enable_delta_health_evaluation: When true, enables delta health evaluation rather than - absolute health evaluation after completion of each upgrade domain. - :vartype enable_delta_health_evaluation: bool - :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. - :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster - or of a cluster node. - :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :ivar cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of the - cluster during a cluster upgrade. - :vartype cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :ivar application_health_policy_map: Represents the map of application health policies for a - ServiceFabric cluster upgrade. - :vartype application_health_policy_map: - ~azure.servicefabric.models.ApplicationHealthPolicyMapObject - """ - - _attribute_map = { - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicyMapObject'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword config_version: The cluster configuration version (specified in the cluster manifest). - :paramtype config_version: str - :keyword code_version: The ServiceFabric code version of the cluster. - :paramtype code_version: str - :keyword upgrade_kind: The kind of upgrade out of the following possible values. Possible - values include: "Invalid", "Rolling". Default value: "Rolling". - :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :paramtype upgrade_replica_set_check_timeout_in_seconds: long - :keyword force_restart: If true, then processes are forcefully restarted during upgrade even - when the code version has not changed (the upgrade only changes configuration or data). - :paramtype force_restart: bool - :keyword sort_order: Defines the order in which an upgrade proceeds through the cluster. - Possible values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", - "ReverseLexicographical". Default value: "Default". - :paramtype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :keyword enable_delta_health_evaluation: When true, enables delta health evaluation rather than - absolute health evaluation after completion of each upgrade domain. - :paramtype enable_delta_health_evaluation: bool - :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored - mode. - :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the - cluster or of a cluster node. - :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :keyword cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of - the cluster during a cluster upgrade. - :paramtype cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :keyword application_health_policy_map: Represents the map of application health policies for a - ServiceFabric cluster upgrade. - :paramtype application_health_policy_map: - ~azure.servicefabric.models.ApplicationHealthPolicyMapObject - """ - super(ClusterUpgradeDescriptionObject, self).__init__(**kwargs) - self.config_version = kwargs.get('config_version', None) - self.code_version = kwargs.get('code_version', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925) - self.force_restart = kwargs.get('force_restart', False) - self.sort_order = kwargs.get('sort_order', "Default") - self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) - - -class ClusterUpgradeDomainCompletedEvent(ClusterEvent): - """Cluster Upgrade Domain Completed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar target_cluster_version: Required. Target Cluster version. - :vartype target_cluster_version: str - :ivar upgrade_state: Required. State of upgrade. - :vartype upgrade_state: str - :ivar upgrade_domains: Required. Upgrade domains. - :vartype upgrade_domains: str - :ivar upgrade_domain_elapsed_time_in_ms: Required. Duration of domain upgrade in milli-seconds. - :vartype upgrade_domain_elapsed_time_in_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'target_cluster_version': {'required': True}, - 'upgrade_state': {'required': True}, - 'upgrade_domains': {'required': True}, - 'upgrade_domain_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, - 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword target_cluster_version: Required. Target Cluster version. - :paramtype target_cluster_version: str - :keyword upgrade_state: Required. State of upgrade. - :paramtype upgrade_state: str - :keyword upgrade_domains: Required. Upgrade domains. - :paramtype upgrade_domains: str - :keyword upgrade_domain_elapsed_time_in_ms: Required. Duration of domain upgrade in - milli-seconds. - :paramtype upgrade_domain_elapsed_time_in_ms: float - """ - super(ClusterUpgradeDomainCompletedEvent, self).__init__(**kwargs) - self.kind = 'ClusterUpgradeDomainCompleted' # type: str - self.target_cluster_version = kwargs['target_cluster_version'] - self.upgrade_state = kwargs['upgrade_state'] - self.upgrade_domains = kwargs['upgrade_domains'] - self.upgrade_domain_elapsed_time_in_ms = kwargs['upgrade_domain_elapsed_time_in_ms'] - - -class ClusterUpgradeHealthPolicyObject(msrest.serialization.Model): - """Defines a health policy used to evaluate the health of the cluster during a cluster upgrade. - - :ivar max_percent_delta_unhealthy_nodes: The maximum allowed percentage of nodes health - degradation allowed during cluster upgrades. The delta is measured between the state of the - nodes at the beginning of upgrade and the state of the nodes at the time of the health - evaluation. The check is performed after every upgrade domain upgrade completion to make sure - the global state of the cluster is within tolerated limits. The default value is 10%. - :vartype max_percent_delta_unhealthy_nodes: int - :ivar max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum allowed percentage of - upgrade domain nodes health degradation allowed during cluster upgrades. The delta is measured - between the state of the upgrade domain nodes at the beginning of upgrade and the state of the - upgrade domain nodes at the time of the health evaluation. The check is performed after every - upgrade domain upgrade completion for all completed upgrade domains to make sure the state of - the upgrade domains is within tolerated limits. The default value is 15%. - :vartype max_percent_upgrade_domain_delta_unhealthy_nodes: int - """ - - _validation = { - 'max_percent_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword max_percent_delta_unhealthy_nodes: The maximum allowed percentage of nodes health - degradation allowed during cluster upgrades. The delta is measured between the state of the - nodes at the beginning of upgrade and the state of the nodes at the time of the health - evaluation. The check is performed after every upgrade domain upgrade completion to make sure - the global state of the cluster is within tolerated limits. The default value is 10%. - :paramtype max_percent_delta_unhealthy_nodes: int - :keyword max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum allowed percentage of - upgrade domain nodes health degradation allowed during cluster upgrades. The delta is measured - between the state of the upgrade domain nodes at the beginning of upgrade and the state of the - upgrade domain nodes at the time of the health evaluation. The check is performed after every - upgrade domain upgrade completion for all completed upgrade domains to make sure the state of - the upgrade domains is within tolerated limits. The default value is 15%. - :paramtype max_percent_upgrade_domain_delta_unhealthy_nodes: int - """ - super(ClusterUpgradeHealthPolicyObject, self).__init__(**kwargs) - self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) - self.max_percent_upgrade_domain_delta_unhealthy_nodes = kwargs.get('max_percent_upgrade_domain_delta_unhealthy_nodes', None) - - -class ClusterUpgradeProgressObject(msrest.serialization.Model): - """Information about a cluster upgrade. - - :ivar code_version: The ServiceFabric code version of the cluster. - :vartype code_version: str - :ivar config_version: The cluster configuration version (specified in the cluster manifest). - :vartype config_version: str - :ivar upgrade_domains: List of upgrade domains and their statuses. Not applicable to - node-by-node upgrades. - :vartype upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] - :ivar upgrade_units: List of upgrade units and their statuses. - :vartype upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] - :ivar upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", - "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", - "RollingForwardInProgress", "RollingForwardCompleted", "Failed". - :vartype upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :ivar next_upgrade_domain: The name of the next upgrade domain to be processed. Not applicable - to node-by-node upgrades. - :vartype next_upgrade_domain: str - :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :ivar upgrade_description: Represents a ServiceFabric cluster upgrade. - :vartype upgrade_description: ~azure.servicefabric.models.ClusterUpgradeDescriptionObject - :ivar upgrade_duration_in_milliseconds: The estimated elapsed time spent processing the current - overall upgrade. - :vartype upgrade_duration_in_milliseconds: str - :ivar upgrade_domain_duration_in_milliseconds: The estimated elapsed time spent processing the - current upgrade domain. Not applicable to node-by-node upgrades. - :vartype upgrade_domain_duration_in_milliseconds: str - :ivar unhealthy_evaluations: List of health evaluations that resulted in the current aggregated - health state. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar current_upgrade_domain_progress: Information about the current in-progress upgrade - domain. Not applicable to node-by-node upgrades. - :vartype current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :ivar current_upgrade_units_progress: Information about the current in-progress upgrade units. - :vartype current_upgrade_units_progress: - ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo - :ivar start_timestamp_utc: The start time of the upgrade in UTC. - :vartype start_timestamp_utc: str - :ivar failure_timestamp_utc: The failure time of the upgrade in UTC. - :vartype failure_timestamp_utc: str - :ivar failure_reason: The cause of an upgrade failure that resulted in FailureAction being - executed. Possible values include: "None", "Interrupted", "HealthCheck", - "UpgradeDomainTimeout", "OverallUpgradeTimeout". - :vartype failure_reason: str or ~azure.servicefabric.models.FailureReason - :ivar upgrade_domain_progress_at_failure: The detailed upgrade progress for nodes in the - current upgrade domain at the point of failure. Not applicable to node-by-node upgrades. - :vartype upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailedUpgradeDomainProgressObject - :ivar is_node_by_node: Indicates whether this upgrade is node-by-node. - :vartype is_node_by_node: bool - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, - 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ClusterUpgradeDescriptionObject'}, - 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, - 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailedUpgradeDomainProgressObject'}, - 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword code_version: The ServiceFabric code version of the cluster. - :paramtype code_version: str - :keyword config_version: The cluster configuration version (specified in the cluster manifest). - :paramtype config_version: str - :keyword upgrade_domains: List of upgrade domains and their statuses. Not applicable to - node-by-node upgrades. - :paramtype upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] - :keyword upgrade_units: List of upgrade units and their statuses. - :paramtype upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] - :keyword upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", - "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", - "RollingForwardInProgress", "RollingForwardCompleted", "Failed". - :paramtype upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :keyword next_upgrade_domain: The name of the next upgrade domain to be processed. Not - applicable to node-by-node upgrades. - :paramtype next_upgrade_domain: str - :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :keyword upgrade_description: Represents a ServiceFabric cluster upgrade. - :paramtype upgrade_description: ~azure.servicefabric.models.ClusterUpgradeDescriptionObject - :keyword upgrade_duration_in_milliseconds: The estimated elapsed time spent processing the - current overall upgrade. - :paramtype upgrade_duration_in_milliseconds: str - :keyword upgrade_domain_duration_in_milliseconds: The estimated elapsed time spent processing - the current upgrade domain. Not applicable to node-by-node upgrades. - :paramtype upgrade_domain_duration_in_milliseconds: str - :keyword unhealthy_evaluations: List of health evaluations that resulted in the current - aggregated health state. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword current_upgrade_domain_progress: Information about the current in-progress upgrade - domain. Not applicable to node-by-node upgrades. - :paramtype current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :keyword current_upgrade_units_progress: Information about the current in-progress upgrade - units. - :paramtype current_upgrade_units_progress: - ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo - :keyword start_timestamp_utc: The start time of the upgrade in UTC. - :paramtype start_timestamp_utc: str - :keyword failure_timestamp_utc: The failure time of the upgrade in UTC. - :paramtype failure_timestamp_utc: str - :keyword failure_reason: The cause of an upgrade failure that resulted in FailureAction being - executed. Possible values include: "None", "Interrupted", "HealthCheck", - "UpgradeDomainTimeout", "OverallUpgradeTimeout". - :paramtype failure_reason: str or ~azure.servicefabric.models.FailureReason - :keyword upgrade_domain_progress_at_failure: The detailed upgrade progress for nodes in the - current upgrade domain at the point of failure. Not applicable to node-by-node upgrades. - :paramtype upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailedUpgradeDomainProgressObject - :keyword is_node_by_node: Indicates whether this upgrade is node-by-node. - :paramtype is_node_by_node: bool - """ - super(ClusterUpgradeProgressObject, self).__init__(**kwargs) - self.code_version = kwargs.get('code_version', None) - self.config_version = kwargs.get('config_version', None) - self.upgrade_domains = kwargs.get('upgrade_domains', None) - self.upgrade_units = kwargs.get('upgrade_units', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.next_upgrade_domain = kwargs.get('next_upgrade_domain', None) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_description = kwargs.get('upgrade_description', None) - self.upgrade_duration_in_milliseconds = kwargs.get('upgrade_duration_in_milliseconds', None) - self.upgrade_domain_duration_in_milliseconds = kwargs.get('upgrade_domain_duration_in_milliseconds', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) - self.current_upgrade_units_progress = kwargs.get('current_upgrade_units_progress', None) - self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) - self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) - self.is_node_by_node = kwargs.get('is_node_by_node', False) - - -class ClusterUpgradeRollbackCompletedEvent(ClusterEvent): - """Cluster Upgrade Rollback Completed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar target_cluster_version: Required. Target Cluster version. - :vartype target_cluster_version: str - :ivar failure_reason: Required. Describes failure. - :vartype failure_reason: str - :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in - milli-seconds. - :vartype overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'target_cluster_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword target_cluster_version: Required. Target Cluster version. - :paramtype target_cluster_version: str - :keyword failure_reason: Required. Describes failure. - :paramtype failure_reason: str - :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in - milli-seconds. - :paramtype overall_upgrade_elapsed_time_in_ms: float - """ - super(ClusterUpgradeRollbackCompletedEvent, self).__init__(**kwargs) - self.kind = 'ClusterUpgradeRollbackCompleted' # type: str - self.target_cluster_version = kwargs['target_cluster_version'] - self.failure_reason = kwargs['failure_reason'] - self.overall_upgrade_elapsed_time_in_ms = kwargs['overall_upgrade_elapsed_time_in_ms'] - - -class ClusterUpgradeRollbackStartedEvent(ClusterEvent): - """Cluster Upgrade Rollback Started event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar target_cluster_version: Required. Target Cluster version. - :vartype target_cluster_version: str - :ivar failure_reason: Required. Describes failure. - :vartype failure_reason: str - :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in - milli-seconds. - :vartype overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'target_cluster_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword target_cluster_version: Required. Target Cluster version. - :paramtype target_cluster_version: str - :keyword failure_reason: Required. Describes failure. - :paramtype failure_reason: str - :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in - milli-seconds. - :paramtype overall_upgrade_elapsed_time_in_ms: float - """ - super(ClusterUpgradeRollbackStartedEvent, self).__init__(**kwargs) - self.kind = 'ClusterUpgradeRollbackStarted' # type: str - self.target_cluster_version = kwargs['target_cluster_version'] - self.failure_reason = kwargs['failure_reason'] - self.overall_upgrade_elapsed_time_in_ms = kwargs['overall_upgrade_elapsed_time_in_ms'] - - -class ClusterUpgradeStartedEvent(ClusterEvent): - """Cluster Upgrade Started event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar current_cluster_version: Required. Current Cluster version. - :vartype current_cluster_version: str - :ivar target_cluster_version: Required. Target Cluster version. - :vartype target_cluster_version: str - :ivar upgrade_type: Required. Type of upgrade. - :vartype upgrade_type: str - :ivar rolling_upgrade_mode: Required. Mode of upgrade. - :vartype rolling_upgrade_mode: str - :ivar failure_action: Required. Action if failed. - :vartype failure_action: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'current_cluster_version': {'required': True}, - 'target_cluster_version': {'required': True}, - 'upgrade_type': {'required': True}, - 'rolling_upgrade_mode': {'required': True}, - 'failure_action': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'current_cluster_version': {'key': 'CurrentClusterVersion', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword current_cluster_version: Required. Current Cluster version. - :paramtype current_cluster_version: str - :keyword target_cluster_version: Required. Target Cluster version. - :paramtype target_cluster_version: str - :keyword upgrade_type: Required. Type of upgrade. - :paramtype upgrade_type: str - :keyword rolling_upgrade_mode: Required. Mode of upgrade. - :paramtype rolling_upgrade_mode: str - :keyword failure_action: Required. Action if failed. - :paramtype failure_action: str - """ - super(ClusterUpgradeStartedEvent, self).__init__(**kwargs) - self.kind = 'ClusterUpgradeStarted' # type: str - self.current_cluster_version = kwargs['current_cluster_version'] - self.target_cluster_version = kwargs['target_cluster_version'] - self.upgrade_type = kwargs['upgrade_type'] - self.rolling_upgrade_mode = kwargs['rolling_upgrade_mode'] - self.failure_action = kwargs['failure_action'] - - -class ClusterVersion(msrest.serialization.Model): - """The cluster version. - - :ivar version: The Service Fabric cluster runtime version. - :vartype version: str - """ - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword version: The Service Fabric cluster runtime version. - :paramtype version: str - """ - super(ClusterVersion, self).__init__(**kwargs) - self.version = kwargs.get('version', None) - - -class CodePackageEntryPoint(msrest.serialization.Model): - """Information about setup or main entry point of a code package deployed on a Service Fabric node. - - :ivar entry_point_location: The location of entry point executable on the node. - :vartype entry_point_location: str - :ivar process_id: The process ID of the entry point. - :vartype process_id: str - :ivar run_as_user_name: The user name under which entry point executable is run on the node. - :vartype run_as_user_name: str - :ivar code_package_entry_point_statistics: Statistics about setup or main entry point of a - code package deployed on a Service Fabric node. - :vartype code_package_entry_point_statistics: - ~azure.servicefabric.models.CodePackageEntryPointStatistics - :ivar status: Specifies the status of the code package entry point deployed on a Service Fabric - node. Possible values include: "Invalid", "Pending", "Starting", "Started", "Stopping", - "Stopped". - :vartype status: str or ~azure.servicefabric.models.EntryPointStatus - :ivar next_activation_time: The time (in UTC) when the entry point executable will be run next. - :vartype next_activation_time: ~datetime.datetime - :ivar instance_id: The instance ID for current running entry point. For a code package setup - entry point (if specified) runs first and after it finishes main entry point is started. Each - time entry point executable is run, its instance id will change. - :vartype instance_id: str - :ivar container_id: The container ID of the entry point. Only valid for container hosts. - :vartype container_id: str - """ - - _attribute_map = { - 'entry_point_location': {'key': 'EntryPointLocation', 'type': 'str'}, - 'process_id': {'key': 'ProcessId', 'type': 'str'}, - 'run_as_user_name': {'key': 'RunAsUserName', 'type': 'str'}, - 'code_package_entry_point_statistics': {'key': 'CodePackageEntryPointStatistics', 'type': 'CodePackageEntryPointStatistics'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'next_activation_time': {'key': 'NextActivationTime', 'type': 'iso-8601'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'container_id': {'key': 'ContainerId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword entry_point_location: The location of entry point executable on the node. - :paramtype entry_point_location: str - :keyword process_id: The process ID of the entry point. - :paramtype process_id: str - :keyword run_as_user_name: The user name under which entry point executable is run on the node. - :paramtype run_as_user_name: str - :keyword code_package_entry_point_statistics: Statistics about setup or main entry point of a - code package deployed on a Service Fabric node. - :paramtype code_package_entry_point_statistics: - ~azure.servicefabric.models.CodePackageEntryPointStatistics - :keyword status: Specifies the status of the code package entry point deployed on a Service - Fabric node. Possible values include: "Invalid", "Pending", "Starting", "Started", "Stopping", - "Stopped". - :paramtype status: str or ~azure.servicefabric.models.EntryPointStatus - :keyword next_activation_time: The time (in UTC) when the entry point executable will be run - next. - :paramtype next_activation_time: ~datetime.datetime - :keyword instance_id: The instance ID for current running entry point. For a code package setup - entry point (if specified) runs first and after it finishes main entry point is started. Each - time entry point executable is run, its instance id will change. - :paramtype instance_id: str - :keyword container_id: The container ID of the entry point. Only valid for container hosts. - :paramtype container_id: str - """ - super(CodePackageEntryPoint, self).__init__(**kwargs) - self.entry_point_location = kwargs.get('entry_point_location', None) - self.process_id = kwargs.get('process_id', None) - self.run_as_user_name = kwargs.get('run_as_user_name', None) - self.code_package_entry_point_statistics = kwargs.get('code_package_entry_point_statistics', None) - self.status = kwargs.get('status', None) - self.next_activation_time = kwargs.get('next_activation_time', None) - self.instance_id = kwargs.get('instance_id', None) - self.container_id = kwargs.get('container_id', None) - - -class CodePackageEntryPointStatistics(msrest.serialization.Model): - """Statistics about setup or main entry point of a code package deployed on a Service Fabric node. - - :ivar last_exit_code: The last exit code of the entry point. - :vartype last_exit_code: str - :ivar last_activation_time: The last time (in UTC) when Service Fabric attempted to run the - entry point. - :vartype last_activation_time: ~datetime.datetime - :ivar last_exit_time: The last time (in UTC) when the entry point finished running. - :vartype last_exit_time: ~datetime.datetime - :ivar last_successful_activation_time: The last time (in UTC) when the entry point ran - successfully. - :vartype last_successful_activation_time: ~datetime.datetime - :ivar last_successful_exit_time: The last time (in UTC) when the entry point finished running - gracefully. - :vartype last_successful_exit_time: ~datetime.datetime - :ivar activation_count: Number of times the entry point has run. - :vartype activation_count: str - :ivar activation_failure_count: Number of times the entry point failed to run. - :vartype activation_failure_count: str - :ivar continuous_activation_failure_count: Number of times the entry point continuously failed - to run. - :vartype continuous_activation_failure_count: str - :ivar exit_count: Number of times the entry point finished running. - :vartype exit_count: str - :ivar exit_failure_count: Number of times the entry point failed to exit gracefully. - :vartype exit_failure_count: str - :ivar continuous_exit_failure_count: Number of times the entry point continuously failed to - exit gracefully. - :vartype continuous_exit_failure_count: str - """ - - _attribute_map = { - 'last_exit_code': {'key': 'LastExitCode', 'type': 'str'}, - 'last_activation_time': {'key': 'LastActivationTime', 'type': 'iso-8601'}, - 'last_exit_time': {'key': 'LastExitTime', 'type': 'iso-8601'}, - 'last_successful_activation_time': {'key': 'LastSuccessfulActivationTime', 'type': 'iso-8601'}, - 'last_successful_exit_time': {'key': 'LastSuccessfulExitTime', 'type': 'iso-8601'}, - 'activation_count': {'key': 'ActivationCount', 'type': 'str'}, - 'activation_failure_count': {'key': 'ActivationFailureCount', 'type': 'str'}, - 'continuous_activation_failure_count': {'key': 'ContinuousActivationFailureCount', 'type': 'str'}, - 'exit_count': {'key': 'ExitCount', 'type': 'str'}, - 'exit_failure_count': {'key': 'ExitFailureCount', 'type': 'str'}, - 'continuous_exit_failure_count': {'key': 'ContinuousExitFailureCount', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword last_exit_code: The last exit code of the entry point. - :paramtype last_exit_code: str - :keyword last_activation_time: The last time (in UTC) when Service Fabric attempted to run the - entry point. - :paramtype last_activation_time: ~datetime.datetime - :keyword last_exit_time: The last time (in UTC) when the entry point finished running. - :paramtype last_exit_time: ~datetime.datetime - :keyword last_successful_activation_time: The last time (in UTC) when the entry point ran - successfully. - :paramtype last_successful_activation_time: ~datetime.datetime - :keyword last_successful_exit_time: The last time (in UTC) when the entry point finished - running gracefully. - :paramtype last_successful_exit_time: ~datetime.datetime - :keyword activation_count: Number of times the entry point has run. - :paramtype activation_count: str - :keyword activation_failure_count: Number of times the entry point failed to run. - :paramtype activation_failure_count: str - :keyword continuous_activation_failure_count: Number of times the entry point continuously - failed to run. - :paramtype continuous_activation_failure_count: str - :keyword exit_count: Number of times the entry point finished running. - :paramtype exit_count: str - :keyword exit_failure_count: Number of times the entry point failed to exit gracefully. - :paramtype exit_failure_count: str - :keyword continuous_exit_failure_count: Number of times the entry point continuously failed to - exit gracefully. - :paramtype continuous_exit_failure_count: str - """ - super(CodePackageEntryPointStatistics, self).__init__(**kwargs) - self.last_exit_code = kwargs.get('last_exit_code', None) - self.last_activation_time = kwargs.get('last_activation_time', None) - self.last_exit_time = kwargs.get('last_exit_time', None) - self.last_successful_activation_time = kwargs.get('last_successful_activation_time', None) - self.last_successful_exit_time = kwargs.get('last_successful_exit_time', None) - self.activation_count = kwargs.get('activation_count', None) - self.activation_failure_count = kwargs.get('activation_failure_count', None) - self.continuous_activation_failure_count = kwargs.get('continuous_activation_failure_count', None) - self.exit_count = kwargs.get('exit_count', None) - self.exit_failure_count = kwargs.get('exit_failure_count', None) - self.continuous_exit_failure_count = kwargs.get('continuous_exit_failure_count', None) - - -class ComposeDeploymentStatusInfo(msrest.serialization.Model): - """Information about a Service Fabric compose deployment. - - :ivar name: The name of the deployment. - :vartype name: str - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar status: The status of the compose deployment. Possible values include: "Invalid", - "Provisioning", "Creating", "Ready", "Unprovisioning", "Deleting", "Failed", "Upgrading". - :vartype status: str or ~azure.servicefabric.models.ComposeDeploymentStatus - :ivar status_details: The status details of compose deployment including failure message. - :vartype status_details: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The name of the deployment. - :paramtype name: str - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword status: The status of the compose deployment. Possible values include: "Invalid", - "Provisioning", "Creating", "Ready", "Unprovisioning", "Deleting", "Failed", "Upgrading". - :paramtype status: str or ~azure.servicefabric.models.ComposeDeploymentStatus - :keyword status_details: The status details of compose deployment including failure message. - :paramtype status_details: str - """ - super(ComposeDeploymentStatusInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.application_name = kwargs.get('application_name', None) - self.status = kwargs.get('status', None) - self.status_details = kwargs.get('status_details', None) - - -class ComposeDeploymentUpgradeDescription(msrest.serialization.Model): - """Describes the parameters for a compose deployment upgrade. - - All required parameters must be populated in order to send to Azure. - - :ivar deployment_name: Required. The name of the deployment. - :vartype deployment_name: str - :ivar compose_file_content: Required. The content of the compose file that describes the - deployment to create. - :vartype compose_file_content: str - :ivar registry_credential: Credential information to connect to container registry. - :vartype registry_credential: ~azure.servicefabric.models.RegistryCredential - :ivar upgrade_kind: Required. The kind of upgrade out of the following possible values. - Possible values include: "Invalid", "Rolling". Default value: "Rolling". - :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :vartype upgrade_replica_set_check_timeout_in_seconds: long - :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when - the code version has not changed (the upgrade only changes configuration or data). - :vartype force_restart: bool - :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. - :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :ivar application_health_policy: Defines a health policy used to evaluate the health of an - application or one of its children entities. - :vartype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - """ - - _validation = { - 'deployment_name': {'required': True}, - 'compose_file_content': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, - 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword deployment_name: Required. The name of the deployment. - :paramtype deployment_name: str - :keyword compose_file_content: Required. The content of the compose file that describes the - deployment to create. - :paramtype compose_file_content: str - :keyword registry_credential: Credential information to connect to container registry. - :paramtype registry_credential: ~azure.servicefabric.models.RegistryCredential - :keyword upgrade_kind: Required. The kind of upgrade out of the following possible values. - Possible values include: "Invalid", "Rolling". Default value: "Rolling". - :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :paramtype upgrade_replica_set_check_timeout_in_seconds: long - :keyword force_restart: If true, then processes are forcefully restarted during upgrade even - when the code version has not changed (the upgrade only changes configuration or data). - :paramtype force_restart: bool - :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored - mode. - :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :keyword application_health_policy: Defines a health policy used to evaluate the health of an - application or one of its children entities. - :paramtype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - """ - super(ComposeDeploymentUpgradeDescription, self).__init__(**kwargs) - self.deployment_name = kwargs['deployment_name'] - self.compose_file_content = kwargs['compose_file_content'] - self.registry_credential = kwargs.get('registry_credential', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925) - self.force_restart = kwargs.get('force_restart', False) - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.application_health_policy = kwargs.get('application_health_policy', None) - - -class ComposeDeploymentUpgradeProgressInfo(msrest.serialization.Model): - """Describes the parameters for a compose deployment upgrade. - - :ivar deployment_name: The name of the target deployment. - :vartype deployment_name: str - :ivar application_name: The name of the target application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar upgrade_state: The state of the compose deployment upgrade. Possible values include: - "Invalid", "ProvisioningTarget", "RollingForwardInProgress", "RollingForwardPending", - "UnprovisioningCurrent", "RollingForwardCompleted", "RollingBackInProgress", - "UnprovisioningTarget", "RollingBackCompleted", "Failed". - :vartype upgrade_state: str or ~azure.servicefabric.models.ComposeDeploymentUpgradeState - :ivar upgrade_status_details: Additional detailed information about the status of the pending - upgrade. - :vartype upgrade_status_details: str - :ivar upgrade_kind: The kind of upgrade out of the following possible values. Possible values - include: "Invalid", "Rolling". Default value: "Rolling". - :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when - the code version has not changed (the upgrade only changes configuration or data). - :vartype force_restart: bool - :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :vartype upgrade_replica_set_check_timeout_in_seconds: long - :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. - :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :ivar application_health_policy: Defines a health policy used to evaluate the health of an - application or one of its children entities. - :vartype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :ivar target_application_type_version: The target application type version (found in the - application manifest) for the application upgrade. - :vartype target_application_type_version: str - :ivar upgrade_duration: The estimated amount of time that the overall upgrade elapsed. It is - first interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :vartype upgrade_duration: str - :ivar current_upgrade_domain_duration: The estimated amount of time spent processing current - Upgrade Domain. It is first interpreted as a string representing an ISO 8601 duration. If that - fails, then it is interpreted as a number representing the total number of milliseconds. - :vartype current_upgrade_domain_duration: str - :ivar application_unhealthy_evaluations: List of health evaluations that resulted in the - current aggregated health state. - :vartype application_unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar current_upgrade_domain_progress: Information about the current in-progress upgrade - domain. Not applicable to node-by-node upgrades. - :vartype current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :ivar start_timestamp_utc: The estimated UTC datetime when the upgrade started. - :vartype start_timestamp_utc: str - :ivar failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and - FailureAction was executed. - :vartype failure_timestamp_utc: str - :ivar failure_reason: The cause of an upgrade failure that resulted in FailureAction being - executed. Possible values include: "None", "Interrupted", "HealthCheck", - "UpgradeDomainTimeout", "OverallUpgradeTimeout". - :vartype failure_reason: str or ~azure.servicefabric.models.FailureReason - :ivar upgrade_domain_progress_at_failure: Information about the upgrade domain progress at the - time of upgrade failure. - :vartype upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo - :ivar application_upgrade_status_details: Additional details of application upgrade including - failure message. - :vartype application_upgrade_status_details: str - """ - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - 'current_upgrade_domain_duration': {'key': 'CurrentUpgradeDomainDuration', 'type': 'str'}, - 'application_unhealthy_evaluations': {'key': 'ApplicationUnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, - 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword deployment_name: The name of the target deployment. - :paramtype deployment_name: str - :keyword application_name: The name of the target application, including the 'fabric:' URI - scheme. - :paramtype application_name: str - :keyword upgrade_state: The state of the compose deployment upgrade. Possible values include: - "Invalid", "ProvisioningTarget", "RollingForwardInProgress", "RollingForwardPending", - "UnprovisioningCurrent", "RollingForwardCompleted", "RollingBackInProgress", - "UnprovisioningTarget", "RollingBackCompleted", "Failed". - :paramtype upgrade_state: str or ~azure.servicefabric.models.ComposeDeploymentUpgradeState - :keyword upgrade_status_details: Additional detailed information about the status of the - pending upgrade. - :paramtype upgrade_status_details: str - :keyword upgrade_kind: The kind of upgrade out of the following possible values. Possible - values include: "Invalid", "Rolling". Default value: "Rolling". - :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :keyword force_restart: If true, then processes are forcefully restarted during upgrade even - when the code version has not changed (the upgrade only changes configuration or data). - :paramtype force_restart: bool - :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :paramtype upgrade_replica_set_check_timeout_in_seconds: long - :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored - mode. - :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :keyword application_health_policy: Defines a health policy used to evaluate the health of an - application or one of its children entities. - :paramtype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword target_application_type_version: The target application type version (found in the - application manifest) for the application upgrade. - :paramtype target_application_type_version: str - :keyword upgrade_duration: The estimated amount of time that the overall upgrade elapsed. It is - first interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :paramtype upgrade_duration: str - :keyword current_upgrade_domain_duration: The estimated amount of time spent processing current - Upgrade Domain. It is first interpreted as a string representing an ISO 8601 duration. If that - fails, then it is interpreted as a number representing the total number of milliseconds. - :paramtype current_upgrade_domain_duration: str - :keyword application_unhealthy_evaluations: List of health evaluations that resulted in the - current aggregated health state. - :paramtype application_unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword current_upgrade_domain_progress: Information about the current in-progress upgrade - domain. Not applicable to node-by-node upgrades. - :paramtype current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :keyword start_timestamp_utc: The estimated UTC datetime when the upgrade started. - :paramtype start_timestamp_utc: str - :keyword failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and - FailureAction was executed. - :paramtype failure_timestamp_utc: str - :keyword failure_reason: The cause of an upgrade failure that resulted in FailureAction being - executed. Possible values include: "None", "Interrupted", "HealthCheck", - "UpgradeDomainTimeout", "OverallUpgradeTimeout". - :paramtype failure_reason: str or ~azure.servicefabric.models.FailureReason - :keyword upgrade_domain_progress_at_failure: Information about the upgrade domain progress at - the time of upgrade failure. - :paramtype upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo - :keyword application_upgrade_status_details: Additional details of application upgrade - including failure message. - :paramtype application_upgrade_status_details: str - """ - super(ComposeDeploymentUpgradeProgressInfo, self).__init__(**kwargs) - self.deployment_name = kwargs.get('deployment_name', None) - self.application_name = kwargs.get('application_name', None) - self.upgrade_state = kwargs.get('upgrade_state', None) - self.upgrade_status_details = kwargs.get('upgrade_status_details', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.force_restart = kwargs.get('force_restart', False) - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925) - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.application_health_policy = kwargs.get('application_health_policy', None) - self.target_application_type_version = kwargs.get('target_application_type_version', None) - self.upgrade_duration = kwargs.get('upgrade_duration', "PT0H2M0S") - self.current_upgrade_domain_duration = kwargs.get('current_upgrade_domain_duration', "PT0H2M0S") - self.application_unhealthy_evaluations = kwargs.get('application_unhealthy_evaluations', None) - self.current_upgrade_domain_progress = kwargs.get('current_upgrade_domain_progress', None) - self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None) - self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.upgrade_domain_progress_at_failure = kwargs.get('upgrade_domain_progress_at_failure', None) - self.application_upgrade_status_details = kwargs.get('application_upgrade_status_details', None) - - -class ConfigParameterOverride(msrest.serialization.Model): - """Information about a configuration parameter override. - - All required parameters must be populated in order to send to Azure. - - :ivar section_name: Required. Name of the section for the parameter override. - :vartype section_name: str - :ivar parameter_name: Required. Name of the parameter that has been overridden. - :vartype parameter_name: str - :ivar parameter_value: Required. Value of the overridden parameter. - :vartype parameter_value: str - :ivar timeout: The duration until config override is considered as valid. - :vartype timeout: ~datetime.timedelta - :ivar persist_across_upgrade: A value that indicates whether config override will be removed on - upgrade or will still be considered as valid. - :vartype persist_across_upgrade: bool - """ - - _validation = { - 'section_name': {'required': True}, - 'parameter_name': {'required': True}, - 'parameter_value': {'required': True}, - } - - _attribute_map = { - 'section_name': {'key': 'SectionName', 'type': 'str'}, - 'parameter_name': {'key': 'ParameterName', 'type': 'str'}, - 'parameter_value': {'key': 'ParameterValue', 'type': 'str'}, - 'timeout': {'key': 'Timeout', 'type': 'duration'}, - 'persist_across_upgrade': {'key': 'PersistAcrossUpgrade', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword section_name: Required. Name of the section for the parameter override. - :paramtype section_name: str - :keyword parameter_name: Required. Name of the parameter that has been overridden. - :paramtype parameter_name: str - :keyword parameter_value: Required. Value of the overridden parameter. - :paramtype parameter_value: str - :keyword timeout: The duration until config override is considered as valid. - :paramtype timeout: ~datetime.timedelta - :keyword persist_across_upgrade: A value that indicates whether config override will be removed - on upgrade or will still be considered as valid. - :paramtype persist_across_upgrade: bool - """ - super(ConfigParameterOverride, self).__init__(**kwargs) - self.section_name = kwargs['section_name'] - self.parameter_name = kwargs['parameter_name'] - self.parameter_value = kwargs['parameter_value'] - self.timeout = kwargs.get('timeout', None) - self.persist_across_upgrade = kwargs.get('persist_across_upgrade', None) - - -class ContainerApiRequestBody(msrest.serialization.Model): - """parameters for making container API call. - - All required parameters must be populated in order to send to Azure. - - :ivar http_verb: HTTP verb of container REST API, defaults to "GET". - :vartype http_verb: str - :ivar uri_path: Required. URI path of container REST API. - :vartype uri_path: str - :ivar content_type: Content type of container REST API request, defaults to "application/json". - :vartype content_type: str - :ivar body: HTTP request body of container REST API. - :vartype body: str - """ - - _validation = { - 'uri_path': {'required': True}, - } - - _attribute_map = { - 'http_verb': {'key': 'HttpVerb', 'type': 'str'}, - 'uri_path': {'key': 'UriPath', 'type': 'str'}, - 'content_type': {'key': 'Content-Type', 'type': 'str'}, - 'body': {'key': 'Body', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword http_verb: HTTP verb of container REST API, defaults to "GET". - :paramtype http_verb: str - :keyword uri_path: Required. URI path of container REST API. - :paramtype uri_path: str - :keyword content_type: Content type of container REST API request, defaults to - "application/json". - :paramtype content_type: str - :keyword body: HTTP request body of container REST API. - :paramtype body: str - """ - super(ContainerApiRequestBody, self).__init__(**kwargs) - self.http_verb = kwargs.get('http_verb', None) - self.uri_path = kwargs['uri_path'] - self.content_type = kwargs.get('content_type', None) - self.body = kwargs.get('body', None) - - -class ContainerApiResponse(msrest.serialization.Model): - """Response body that wraps container API result. - - All required parameters must be populated in order to send to Azure. - - :ivar container_api_result: Required. Container API result. - :vartype container_api_result: ~azure.servicefabric.models.ContainerApiResult - """ - - _validation = { - 'container_api_result': {'required': True}, - } - - _attribute_map = { - 'container_api_result': {'key': 'ContainerApiResult', 'type': 'ContainerApiResult'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword container_api_result: Required. Container API result. - :paramtype container_api_result: ~azure.servicefabric.models.ContainerApiResult - """ - super(ContainerApiResponse, self).__init__(**kwargs) - self.container_api_result = kwargs['container_api_result'] - - -class ContainerApiResult(msrest.serialization.Model): - """Container API result. - - All required parameters must be populated in order to send to Azure. - - :ivar status: Required. HTTP status code returned by the target container API. - :vartype status: int - :ivar content_type: HTTP content type. - :vartype content_type: str - :ivar content_encoding: HTTP content encoding. - :vartype content_encoding: str - :ivar body: container API result body. - :vartype body: str - """ - - _validation = { - 'status': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'Status', 'type': 'int'}, - 'content_type': {'key': 'Content-Type', 'type': 'str'}, - 'content_encoding': {'key': 'Content-Encoding', 'type': 'str'}, - 'body': {'key': 'Body', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword status: Required. HTTP status code returned by the target container API. - :paramtype status: int - :keyword content_type: HTTP content type. - :paramtype content_type: str - :keyword content_encoding: HTTP content encoding. - :paramtype content_encoding: str - :keyword body: container API result body. - :paramtype body: str - """ - super(ContainerApiResult, self).__init__(**kwargs) - self.status = kwargs['status'] - self.content_type = kwargs.get('content_type', None) - self.content_encoding = kwargs.get('content_encoding', None) - self.body = kwargs.get('body', None) - - -class ContainerCodePackageProperties(msrest.serialization.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. - - :ivar name: Required. The name of the code package. - :vartype name: str - :ivar image: Required. The Container image to use. - :vartype image: str - :ivar image_registry_credential: Image registry credential. - :vartype image_registry_credential: ~azure.servicefabric.models.ImageRegistryCredential - :ivar entry_point: Override for the default entry point in the container. - :vartype entry_point: str - :ivar commands: Command array to execute within the container in exec form. - :vartype commands: list[str] - :ivar environment_variables: The environment variables to set in this container. - :vartype environment_variables: list[~azure.servicefabric.models.EnvironmentVariable] - :ivar 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". - :vartype settings: list[~azure.servicefabric.models.Setting] - :ivar labels: The labels to set in this container. - :vartype labels: list[~azure.servicefabric.models.ContainerLabel] - :ivar endpoints: The endpoints exposed by this container. - :vartype endpoints: list[~azure.servicefabric.models.EndpointProperties] - :ivar resources: Required. The resources required by this container. - :vartype resources: ~azure.servicefabric.models.ResourceRequirements - :ivar volume_refs: Volumes to be attached to the container. The lifetime of these volumes is - independent of the application's lifetime. - :vartype volume_refs: list[~azure.servicefabric.models.VolumeReference] - :ivar volumes: Volumes to be attached to the container. The lifetime of these volumes is scoped - to the application's lifetime. - :vartype volumes: list[~azure.servicefabric.models.ApplicationScopedVolume] - :ivar diagnostics: Reference to sinks in DiagnosticsDescription. - :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :ivar reliable_collections_refs: A list of ReliableCollection resources used by this particular - code package. Please refer to ReliableCollectionsRef for more details. - :vartype reliable_collections_refs: list[~azure.servicefabric.models.ReliableCollectionsRef] - :ivar instance_view: Runtime information of a container instance. - :vartype instance_view: ~azure.servicefabric.models.ContainerInstanceView - :ivar liveness_probe: An array of liveness probes for a code package. It determines when to - restart a code package. - :vartype liveness_probe: list[~azure.servicefabric.models.Probe] - :ivar readiness_probe: An array of readiness probes for a code package. It determines when to - unpublish an endpoint. - :vartype readiness_probe: list[~azure.servicefabric.models.Probe] - """ - - _validation = { - 'name': {'required': True}, - 'image': {'required': True}, - 'resources': {'required': True}, - 'instance_view': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'image': {'key': 'image', 'type': 'str'}, - 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, - 'entry_point': {'key': 'entryPoint', 'type': 'str'}, - 'commands': {'key': 'commands', 'type': '[str]'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'}, - 'settings': {'key': 'settings', 'type': '[Setting]'}, - 'labels': {'key': 'labels', 'type': '[ContainerLabel]'}, - 'endpoints': {'key': 'endpoints', 'type': '[EndpointProperties]'}, - 'resources': {'key': 'resources', 'type': 'ResourceRequirements'}, - 'volume_refs': {'key': 'volumeRefs', 'type': '[VolumeReference]'}, - 'volumes': {'key': 'volumes', 'type': '[ApplicationScopedVolume]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - 'reliable_collections_refs': {'key': 'reliableCollectionsRefs', 'type': '[ReliableCollectionsRef]'}, - 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, - 'liveness_probe': {'key': 'livenessProbe', 'type': '[Probe]'}, - 'readiness_probe': {'key': 'readinessProbe', 'type': '[Probe]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The name of the code package. - :paramtype name: str - :keyword image: Required. The Container image to use. - :paramtype image: str - :keyword image_registry_credential: Image registry credential. - :paramtype image_registry_credential: ~azure.servicefabric.models.ImageRegistryCredential - :keyword entry_point: Override for the default entry point in the container. - :paramtype entry_point: str - :keyword commands: Command array to execute within the container in exec form. - :paramtype commands: list[str] - :keyword environment_variables: The environment variables to set in this container. - :paramtype environment_variables: list[~azure.servicefabric.models.EnvironmentVariable] - :keyword 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". - :paramtype settings: list[~azure.servicefabric.models.Setting] - :keyword labels: The labels to set in this container. - :paramtype labels: list[~azure.servicefabric.models.ContainerLabel] - :keyword endpoints: The endpoints exposed by this container. - :paramtype endpoints: list[~azure.servicefabric.models.EndpointProperties] - :keyword resources: Required. The resources required by this container. - :paramtype resources: ~azure.servicefabric.models.ResourceRequirements - :keyword volume_refs: Volumes to be attached to the container. The lifetime of these volumes is - independent of the application's lifetime. - :paramtype volume_refs: list[~azure.servicefabric.models.VolumeReference] - :keyword volumes: Volumes to be attached to the container. The lifetime of these volumes is - scoped to the application's lifetime. - :paramtype volumes: list[~azure.servicefabric.models.ApplicationScopedVolume] - :keyword diagnostics: Reference to sinks in DiagnosticsDescription. - :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :keyword reliable_collections_refs: A list of ReliableCollection resources used by this - particular code package. Please refer to ReliableCollectionsRef for more details. - :paramtype reliable_collections_refs: list[~azure.servicefabric.models.ReliableCollectionsRef] - :keyword liveness_probe: An array of liveness probes for a code package. It determines when to - restart a code package. - :paramtype liveness_probe: list[~azure.servicefabric.models.Probe] - :keyword readiness_probe: An array of readiness probes for a code package. It determines when - to unpublish an endpoint. - :paramtype readiness_probe: list[~azure.servicefabric.models.Probe] - """ - super(ContainerCodePackageProperties, self).__init__(**kwargs) - self.name = kwargs['name'] - self.image = kwargs['image'] - self.image_registry_credential = kwargs.get('image_registry_credential', None) - self.entry_point = kwargs.get('entry_point', None) - self.commands = kwargs.get('commands', None) - self.environment_variables = kwargs.get('environment_variables', None) - self.settings = kwargs.get('settings', None) - self.labels = kwargs.get('labels', None) - self.endpoints = kwargs.get('endpoints', None) - self.resources = kwargs['resources'] - self.volume_refs = kwargs.get('volume_refs', None) - self.volumes = kwargs.get('volumes', None) - self.diagnostics = kwargs.get('diagnostics', None) - self.reliable_collections_refs = kwargs.get('reliable_collections_refs', None) - self.instance_view = None - self.liveness_probe = kwargs.get('liveness_probe', None) - self.readiness_probe = kwargs.get('readiness_probe', None) - - -class ContainerEvent(msrest.serialization.Model): - """A container event. - - :ivar name: The name of the container event. - :vartype name: str - :ivar count: The count of the event. - :vartype count: int - :ivar first_timestamp: Date/time of the first event. - :vartype first_timestamp: str - :ivar last_timestamp: Date/time of the last event. - :vartype last_timestamp: str - :ivar message: The event message. - :vartype message: str - :ivar type: The event type. - :vartype 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 - ): - """ - :keyword name: The name of the container event. - :paramtype name: str - :keyword count: The count of the event. - :paramtype count: int - :keyword first_timestamp: Date/time of the first event. - :paramtype first_timestamp: str - :keyword last_timestamp: Date/time of the last event. - :paramtype last_timestamp: str - :keyword message: The event message. - :paramtype message: str - :keyword type: The event type. - :paramtype type: str - """ - super(ContainerEvent, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.count = kwargs.get('count', None) - self.first_timestamp = kwargs.get('first_timestamp', None) - self.last_timestamp = kwargs.get('last_timestamp', None) - self.message = kwargs.get('message', None) - self.type = kwargs.get('type', None) - - -class ContainerInstanceEvent(FabricEvent): - """Represents the base for all Container Events. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - """ - super(ContainerInstanceEvent, self).__init__(**kwargs) - self.kind = 'ContainerInstanceEvent' # type: str - - -class ContainerInstanceView(msrest.serialization.Model): - """Runtime information of a container instance. - - :ivar restart_count: The number of times the container has been restarted. - :vartype restart_count: int - :ivar current_state: Current container instance state. - :vartype current_state: ~azure.servicefabric.models.ContainerState - :ivar previous_state: Previous container instance state. - :vartype previous_state: ~azure.servicefabric.models.ContainerState - :ivar events: The events of this container instance. - :vartype 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 - ): - """ - :keyword restart_count: The number of times the container has been restarted. - :paramtype restart_count: int - :keyword current_state: Current container instance state. - :paramtype current_state: ~azure.servicefabric.models.ContainerState - :keyword previous_state: Previous container instance state. - :paramtype previous_state: ~azure.servicefabric.models.ContainerState - :keyword events: The events of this container instance. - :paramtype events: list[~azure.servicefabric.models.ContainerEvent] - """ - super(ContainerInstanceView, self).__init__(**kwargs) - self.restart_count = kwargs.get('restart_count', None) - self.current_state = kwargs.get('current_state', None) - self.previous_state = kwargs.get('previous_state', None) - self.events = kwargs.get('events', None) - - -class ContainerLabel(msrest.serialization.Model): - """Describes a container label. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the container label. - :vartype name: str - :ivar value: Required. The value of the container label. - :vartype 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 - ): - """ - :keyword name: Required. The name of the container label. - :paramtype name: str - :keyword value: Required. The value of the container label. - :paramtype value: str - """ - super(ContainerLabel, self).__init__(**kwargs) - self.name = kwargs['name'] - self.value = kwargs['value'] - - -class ContainerLogs(msrest.serialization.Model): - """Container logs. - - :ivar content: Container logs. - :vartype content: str - """ - - _attribute_map = { - 'content': {'key': 'Content', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword content: Container logs. - :paramtype content: str - """ - super(ContainerLogs, self).__init__(**kwargs) - self.content = kwargs.get('content', None) - - -class ContainerState(msrest.serialization.Model): - """The container state. - - :ivar state: The state of this container. - :vartype state: str - :ivar start_time: Date/time when the container state started. - :vartype start_time: ~datetime.datetime - :ivar exit_code: The container exit code. - :vartype exit_code: str - :ivar finish_time: Date/time when the container state finished. - :vartype finish_time: ~datetime.datetime - :ivar detail_status: Human-readable status of this state. - :vartype 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 - ): - """ - :keyword state: The state of this container. - :paramtype state: str - :keyword start_time: Date/time when the container state started. - :paramtype start_time: ~datetime.datetime - :keyword exit_code: The container exit code. - :paramtype exit_code: str - :keyword finish_time: Date/time when the container state finished. - :paramtype finish_time: ~datetime.datetime - :keyword detail_status: Human-readable status of this state. - :paramtype detail_status: str - """ - super(ContainerState, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.start_time = kwargs.get('start_time', None) - self.exit_code = kwargs.get('exit_code', None) - self.finish_time = kwargs.get('finish_time', None) - self.detail_status = kwargs.get('detail_status', None) - - -class CreateComposeDeploymentDescription(msrest.serialization.Model): - """Defines description for creating a Service Fabric compose deployment. - - All required parameters must be populated in order to send to Azure. - - :ivar deployment_name: Required. The name of the deployment. - :vartype deployment_name: str - :ivar compose_file_content: Required. The content of the compose file that describes the - deployment to create. - :vartype compose_file_content: str - :ivar registry_credential: Credential information to connect to container registry. - :vartype registry_credential: ~azure.servicefabric.models.RegistryCredential - """ - - _validation = { - 'deployment_name': {'required': True}, - 'compose_file_content': {'required': True}, - } - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, - 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword deployment_name: Required. The name of the deployment. - :paramtype deployment_name: str - :keyword compose_file_content: Required. The content of the compose file that describes the - deployment to create. - :paramtype compose_file_content: str - :keyword registry_credential: Credential information to connect to container registry. - :paramtype registry_credential: ~azure.servicefabric.models.RegistryCredential - """ - super(CreateComposeDeploymentDescription, self).__init__(**kwargs) - self.deployment_name = kwargs['deployment_name'] - self.compose_file_content = kwargs['compose_file_content'] - self.registry_credential = kwargs.get('registry_credential', None) - - -class CurrentUpgradeDomainProgressInfo(msrest.serialization.Model): - """Information about the current in-progress upgrade domain. Not applicable to node-by-node upgrades. - - :ivar domain_name: The name of the upgrade domain. - :vartype domain_name: str - :ivar node_upgrade_progress_list: List of upgrading nodes and their statuses. - :vartype node_upgrade_progress_list: list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword domain_name: The name of the upgrade domain. - :paramtype domain_name: str - :keyword node_upgrade_progress_list: List of upgrading nodes and their statuses. - :paramtype node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - super(CurrentUpgradeDomainProgressInfo, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) - - -class CurrentUpgradeUnitsProgressInfo(msrest.serialization.Model): - """Information about the current in-progress upgrade units. - - :ivar domain_name: The name of the upgrade domain. Not applicable to node-by-node upgrades. - :vartype domain_name: str - :ivar node_upgrade_progress_list: List of upgrading nodes and their statuses. - :vartype node_upgrade_progress_list: list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword domain_name: The name of the upgrade domain. Not applicable to node-by-node upgrades. - :paramtype domain_name: str - :keyword node_upgrade_progress_list: List of upgrading nodes and their statuses. - :paramtype node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - super(CurrentUpgradeUnitsProgressInfo, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) - - -class DeactivationIntentDescription(msrest.serialization.Model): - """Describes the intent or reason for deactivating the node. - - :ivar deactivation_intent: Describes the intent or reason for deactivating the node. The - possible values are following. Possible values include: "Pause", "Restart", "RemoveData". - :vartype deactivation_intent: str or ~azure.servicefabric.models.DeactivationIntent - """ - - _attribute_map = { - 'deactivation_intent': {'key': 'DeactivationIntent', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword deactivation_intent: Describes the intent or reason for deactivating the node. The - possible values are following. Possible values include: "Pause", "Restart", "RemoveData". - :paramtype deactivation_intent: str or ~azure.servicefabric.models.DeactivationIntent - """ - super(DeactivationIntentDescription, self).__init__(**kwargs) - self.deactivation_intent = kwargs.get('deactivation_intent', None) - - -class ExecutionPolicy(msrest.serialization.Model): - """The execution policy of the service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DefaultExecutionPolicy, RunToCompletionExecutionPolicy. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Enumerates the execution policy types for services.Constant filled by - server. Possible values include: "Default", "RunToCompletion". - :vartype type: str or ~azure.servicefabric.models.ExecutionPolicyType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'Default': 'DefaultExecutionPolicy', 'RunToCompletion': 'RunToCompletionExecutionPolicy'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ExecutionPolicy, self).__init__(**kwargs) - self.type = None # type: Optional[str] - - -class DefaultExecutionPolicy(ExecutionPolicy): - """The default execution policy. Always restart the service if an exit occurs. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Enumerates the execution policy types for services.Constant filled by - server. Possible values include: "Default", "RunToCompletion". - :vartype type: str or ~azure.servicefabric.models.ExecutionPolicyType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(DefaultExecutionPolicy, self).__init__(**kwargs) - self.type = 'Default' # type: str - - -class DeletePropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that deletes a specified property if it exists. -Note that if one PropertyBatchOperation in a PropertyBatch fails, -the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch operation, determined by the operation to be - performed. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind - :ivar property_name: Required. The name of the Service Fabric property. - :vartype property_name: str - """ - - _validation = { - 'kind': {'required': True}, - 'property_name': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword property_name: Required. The name of the Service Fabric property. - :paramtype property_name: str - """ - super(DeletePropertyBatchOperation, self).__init__(**kwargs) - self.kind = 'Delete' # type: str - - -class DeltaNodesCheckHealthEvaluation(HealthEvaluation): - """Represents health evaluation for delta nodes, containing health evaluations for each unhealthy node that impacted current aggregated health state. -Can be returned during cluster upgrade when the aggregated health state of the cluster is Warning or Error. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar baseline_error_count: Number of nodes with aggregated heath state Error in the health - store at the beginning of the cluster upgrade. - :vartype baseline_error_count: long - :ivar baseline_total_count: Total number of nodes in the health store at the beginning of the - cluster upgrade. - :vartype baseline_total_count: long - :ivar max_percent_delta_unhealthy_nodes: Maximum allowed percentage of delta unhealthy nodes - from the ClusterUpgradeHealthPolicy. - :vartype max_percent_delta_unhealthy_nodes: int - :ivar total_count: Total number of nodes in the health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. - Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, - 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword baseline_error_count: Number of nodes with aggregated heath state Error in the health - store at the beginning of the cluster upgrade. - :paramtype baseline_error_count: long - :keyword baseline_total_count: Total number of nodes in the health store at the beginning of - the cluster upgrade. - :paramtype baseline_total_count: long - :keyword max_percent_delta_unhealthy_nodes: Maximum allowed percentage of delta unhealthy nodes - from the ClusterUpgradeHealthPolicy. - :paramtype max_percent_delta_unhealthy_nodes: int - :keyword total_count: Total number of nodes in the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. - Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(DeltaNodesCheckHealthEvaluation, self).__init__(**kwargs) - self.kind = 'DeltaNodesCheck' # type: str - self.baseline_error_count = kwargs.get('baseline_error_count', None) - self.baseline_total_count = kwargs.get('baseline_total_count', None) - self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class DeployedApplicationHealth(EntityHealth): - """Information about the health of an application deployed on a Service Fabric node. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar name: Name of the application deployed on the node whose health information is described - by this object. - :vartype name: str - :ivar node_name: Name of the node where this application is deployed. - :vartype node_name: str - :ivar deployed_service_package_health_states: Deployed service package health states for the - current deployed application as found in the health store. - :vartype deployed_service_package_health_states: - list[~azure.servicefabric.models.DeployedServicePackageHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'deployed_service_package_health_states': {'key': 'DeployedServicePackageHealthStates', 'type': '[DeployedServicePackageHealthState]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword name: Name of the application deployed on the node whose health information is - described by this object. - :paramtype name: str - :keyword node_name: Name of the node where this application is deployed. - :paramtype node_name: str - :keyword deployed_service_package_health_states: Deployed service package health states for the - current deployed application as found in the health store. - :paramtype deployed_service_package_health_states: - list[~azure.servicefabric.models.DeployedServicePackageHealthState] - """ - super(DeployedApplicationHealth, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.node_name = kwargs.get('node_name', None) - self.deployed_service_package_health_states = kwargs.get('deployed_service_package_health_states', None) - - -class DeployedApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a deployed application, containing information about the data and the algorithm used by the health store to evaluate health. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar node_name: Name of the node where the application is deployed to. - :vartype node_name: str - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated - health state of the deployed application. - The types of the unhealthy evaluations can be DeployedServicePackagesHealthEvaluation or - EventHealthEvaluation. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword node_name: Name of the node where the application is deployed to. - :paramtype node_name: str - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current - aggregated health state of the deployed application. - The types of the unhealthy evaluations can be DeployedServicePackagesHealthEvaluation or - EventHealthEvaluation. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(DeployedApplicationHealthEvaluation, self).__init__(**kwargs) - self.kind = 'DeployedApplication' # type: str - self.node_name = kwargs.get('node_name', None) - self.application_name = kwargs.get('application_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class DeployedApplicationHealthReportExpiredEvent(ApplicationEvent): - """Deployed Application Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_instance_id: Required. Id of Application instance. - :vartype application_instance_id: long - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_instance_id: Required. Id of Application instance. - :paramtype application_instance_id: long - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(DeployedApplicationHealthReportExpiredEvent, self).__init__(**kwargs) - self.kind = 'DeployedApplicationHealthReportExpired' # type: str - self.application_instance_id = kwargs['application_instance_id'] - self.node_name = kwargs['node_name'] - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class DeployedApplicationHealthState(EntityHealthState): - """Represents the health state of a deployed application, which contains the entity identifier and the aggregated health state. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar node_name: Name of the node on which the service package is deployed. - :vartype node_name: str - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword node_name: Name of the node on which the service package is deployed. - :paramtype node_name: str - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - """ - super(DeployedApplicationHealthState, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.application_name = kwargs.get('application_name', None) - - -class DeployedApplicationHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a deployed application, which contains the node where the application is deployed, the aggregated health state and any deployed service packages that respect the chunk query description filters. - - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar node_name: The name of node where the application is deployed. - :vartype node_name: str - :ivar deployed_service_package_health_state_chunks: The list of deployed service package health - state chunks belonging to the deployed application that respect the filters in the cluster - health chunk query description. - :vartype deployed_service_package_health_state_chunks: - ~azure.servicefabric.models.DeployedServicePackageHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'deployed_service_package_health_state_chunks': {'key': 'DeployedServicePackageHealthStateChunks', 'type': 'DeployedServicePackageHealthStateChunkList'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword node_name: The name of node where the application is deployed. - :paramtype node_name: str - :keyword deployed_service_package_health_state_chunks: The list of deployed service package - health state chunks belonging to the deployed application that respect the filters in the - cluster health chunk query description. - :paramtype deployed_service_package_health_state_chunks: - ~azure.servicefabric.models.DeployedServicePackageHealthStateChunkList - """ - super(DeployedApplicationHealthStateChunk, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.deployed_service_package_health_state_chunks = kwargs.get('deployed_service_package_health_state_chunks', None) - - -class DeployedApplicationHealthStateChunkList(msrest.serialization.Model): - """The list of deployed application health state chunks that respect the input filters in the chunk query. Returned by get cluster health state chunks query. - - :ivar items: The list of deployed application health state chunks that respect the input - filters in the chunk query. - :vartype items: list[~azure.servicefabric.models.DeployedApplicationHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[DeployedApplicationHealthStateChunk]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword items: The list of deployed application health state chunks that respect the input - filters in the chunk query. - :paramtype items: list[~azure.servicefabric.models.DeployedApplicationHealthStateChunk] - """ - super(DeployedApplicationHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) - - -class DeployedApplicationHealthStateFilter(msrest.serialization.Model): - """Defines matching criteria to determine whether a deployed application should be included as a child of an application in the cluster health chunk. -The deployed applications are only returned if the parent application matches a filter specified in the cluster health chunk query description. -One filter can match zero, one or multiple deployed applications, depending on its properties. - - :ivar node_name_filter: The name of the node where the application is deployed in order to - match the filter. - If specified, the filter is applied only to the application deployed on the specified node. - If the application is not deployed on the node with the specified name, no deployed - application is returned in the cluster health chunk based on this filter. - Otherwise, the deployed application is included in the cluster health chunk if it respects the - other filter properties. - If not specified, all deployed applications that match the parent filters (if any) are taken - into consideration and matched against the other filter members, like health state filter. - :vartype node_name_filter: str - :ivar health_state_filter: The filter for the health state of the deployed applications. It - allows selecting deployed applications if they match the desired health states. - The possible values are integer value of one of the following health states. Only deployed - applications that match the filter are returned. All deployed applications are used to evaluate - the cluster aggregated health state. - If not specified, default value is None, unless the node name is specified. If the filter has - default value and node name is specified, the matching deployed application is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches deployed applications with HealthState - value of OK (2) and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :vartype health_state_filter: int - :ivar deployed_service_package_filters: Defines a list of filters that specify which deployed - service packages to be included in the returned cluster health chunk as children of the parent - deployed application. The deployed service packages are returned only if the parent deployed - application matches a filter. - If the list is empty, no deployed service packages are returned. All the deployed service - packages are used to evaluate the parent deployed application aggregated health state, - regardless of the input filters. - The deployed application filter may specify multiple deployed service package filters. - For example, it can specify a filter to return all deployed service packages with health state - Error and another filter to always include a deployed service package on a node. - :vartype deployed_service_package_filters: - list[~azure.servicefabric.models.DeployedServicePackageHealthStateFilter] - """ - - _attribute_map = { - 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'deployed_service_package_filters': {'key': 'DeployedServicePackageFilters', 'type': '[DeployedServicePackageHealthStateFilter]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword node_name_filter: The name of the node where the application is deployed in order to - match the filter. - If specified, the filter is applied only to the application deployed on the specified node. - If the application is not deployed on the node with the specified name, no deployed - application is returned in the cluster health chunk based on this filter. - Otherwise, the deployed application is included in the cluster health chunk if it respects the - other filter properties. - If not specified, all deployed applications that match the parent filters (if any) are taken - into consideration and matched against the other filter members, like health state filter. - :paramtype node_name_filter: str - :keyword health_state_filter: The filter for the health state of the deployed applications. It - allows selecting deployed applications if they match the desired health states. - The possible values are integer value of one of the following health states. Only deployed - applications that match the filter are returned. All deployed applications are used to evaluate - the cluster aggregated health state. - If not specified, default value is None, unless the node name is specified. If the filter has - default value and node name is specified, the matching deployed application is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches deployed applications with HealthState - value of OK (2) and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :paramtype health_state_filter: int - :keyword deployed_service_package_filters: Defines a list of filters that specify which - deployed service packages to be included in the returned cluster health chunk as children of - the parent deployed application. The deployed service packages are returned only if the parent - deployed application matches a filter. - If the list is empty, no deployed service packages are returned. All the deployed service - packages are used to evaluate the parent deployed application aggregated health state, - regardless of the input filters. - The deployed application filter may specify multiple deployed service package filters. - For example, it can specify a filter to return all deployed service packages with health state - Error and another filter to always include a deployed service package on a node. - :paramtype deployed_service_package_filters: - list[~azure.servicefabric.models.DeployedServicePackageHealthStateFilter] - """ - super(DeployedApplicationHealthStateFilter, self).__init__(**kwargs) - self.node_name_filter = kwargs.get('node_name_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - self.deployed_service_package_filters = kwargs.get('deployed_service_package_filters', None) - - -class DeployedApplicationInfo(msrest.serialization.Model): - """Information about application deployed on the node. - - :ivar id: The identity of the application. This is an encoded representation of the application - name. This is used in the REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype id: str - :ivar name: The name of the application, including the 'fabric:' URI scheme. - :vartype name: str - :ivar type_name: The application type name as defined in the application manifest. - :vartype type_name: str - :ivar type_version: The version of the application type as defined in the application manifest. - :vartype type_version: str - :ivar status: The status of the application deployed on the node. Following are the possible - values. Possible values include: "Invalid", "Downloading", "Activating", "Active", "Upgrading", - "Deactivating". - :vartype status: str or ~azure.servicefabric.models.DeployedApplicationStatus - :ivar work_directory: The work directory of the application on the node. The work directory can - be used to store application data. - :vartype work_directory: str - :ivar log_directory: The log directory of the application on the node. The log directory can be - used to store application logs. - :vartype log_directory: str - :ivar temp_directory: The temp directory of the application on the node. The code packages - belonging to the application are forked with this directory set as their temporary directory. - :vartype temp_directory: str - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'work_directory': {'key': 'WorkDirectory', 'type': 'str'}, - 'log_directory': {'key': 'LogDirectory', 'type': 'str'}, - 'temp_directory': {'key': 'TempDirectory', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: The identity of the application. This is an encoded representation of the - application name. This is used in the REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype id: str - :keyword name: The name of the application, including the 'fabric:' URI scheme. - :paramtype name: str - :keyword type_name: The application type name as defined in the application manifest. - :paramtype type_name: str - :keyword type_version: The version of the application type as defined in the application - manifest. - :paramtype type_version: str - :keyword status: The status of the application deployed on the node. Following are the possible - values. Possible values include: "Invalid", "Downloading", "Activating", "Active", "Upgrading", - "Deactivating". - :paramtype status: str or ~azure.servicefabric.models.DeployedApplicationStatus - :keyword work_directory: The work directory of the application on the node. The work directory - can be used to store application data. - :paramtype work_directory: str - :keyword log_directory: The log directory of the application on the node. The log directory can - be used to store application logs. - :paramtype log_directory: str - :keyword temp_directory: The temp directory of the application on the node. The code packages - belonging to the application are forked with this directory set as their temporary directory. - :paramtype temp_directory: str - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - """ - super(DeployedApplicationInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.type_version = kwargs.get('type_version', None) - self.status = kwargs.get('status', None) - self.work_directory = kwargs.get('work_directory', None) - self.log_directory = kwargs.get('log_directory', None) - self.temp_directory = kwargs.get('temp_directory', None) - self.health_state = kwargs.get('health_state', None) - - -class DeployedApplicationNewHealthReportEvent(ApplicationEvent): - """Deployed Application Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_instance_id: Required. Id of Application instance. - :vartype application_instance_id: long - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_instance_id: Required. Id of Application instance. - :paramtype application_instance_id: long - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(DeployedApplicationNewHealthReportEvent, self).__init__(**kwargs) - self.kind = 'DeployedApplicationNewHealthReport' # type: str - self.application_instance_id = kwargs['application_instance_id'] - self.node_name = kwargs['node_name'] - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class DeployedApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for deployed applications, containing health evaluations for each unhealthy deployed application that impacted current aggregated health state. -Can be returned when evaluating application health and the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar max_percent_unhealthy_deployed_applications: Maximum allowed percentage of unhealthy - deployed applications from the ApplicationHealthPolicy. - :vartype max_percent_unhealthy_deployed_applications: int - :ivar total_count: Total number of deployed applications of the application in the health - store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy DeployedApplicationHealthEvaluation that impacted the - aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword max_percent_unhealthy_deployed_applications: Maximum allowed percentage of unhealthy - deployed applications from the ApplicationHealthPolicy. - :paramtype max_percent_unhealthy_deployed_applications: int - :keyword total_count: Total number of deployed applications of the application in the health - store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy DeployedApplicationHealthEvaluation that impacted the - aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(DeployedApplicationsHealthEvaluation, self).__init__(**kwargs) - self.kind = 'DeployedApplications' # type: str - self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class DeployedCodePackageInfo(msrest.serialization.Model): - """Information about code package deployed on a Service Fabric node. - - :ivar name: The name of the code package. - :vartype name: str - :ivar version: The version of the code package specified in service manifest. - :vartype version: str - :ivar service_manifest_name: The name of service manifest that specified this code package. - :vartype service_manifest_name: str - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - :ivar host_type: Specifies the type of host for main entry point of a code package as specified - in service manifest. Possible values include: "Invalid", "ExeHost", "ContainerHost". - :vartype host_type: str or ~azure.servicefabric.models.HostType - :ivar host_isolation_mode: Specifies the isolation mode of main entry point of a code package - when it's host type is ContainerHost. This is specified as part of container host policies in - application manifest while importing service manifest. Possible values include: "None", - "Process", "HyperV". - :vartype host_isolation_mode: str or ~azure.servicefabric.models.HostIsolationMode - :ivar status: Specifies the status of a deployed application or service package on a Service - Fabric node. Possible values include: "Invalid", "Downloading", "Activating", "Active", - "Upgrading", "Deactivating", "RanToCompletion", "Failed". - :vartype status: str or ~azure.servicefabric.models.DeploymentStatus - :ivar run_frequency_interval: The interval at which code package is run. This is used for - periodic code package. - :vartype run_frequency_interval: str - :ivar setup_entry_point: Information about setup or main entry point of a code package deployed - on a Service Fabric node. - :vartype setup_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint - :ivar main_entry_point: Information about setup or main entry point of a code package deployed - on a Service Fabric node. - :vartype main_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_type': {'key': 'HostType', 'type': 'str'}, - 'host_isolation_mode': {'key': 'HostIsolationMode', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'run_frequency_interval': {'key': 'RunFrequencyInterval', 'type': 'str'}, - 'setup_entry_point': {'key': 'SetupEntryPoint', 'type': 'CodePackageEntryPoint'}, - 'main_entry_point': {'key': 'MainEntryPoint', 'type': 'CodePackageEntryPoint'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The name of the code package. - :paramtype name: str - :keyword version: The version of the code package specified in service manifest. - :paramtype version: str - :keyword service_manifest_name: The name of service manifest that specified this code package. - :paramtype service_manifest_name: str - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - :keyword host_type: Specifies the type of host for main entry point of a code package as - specified in service manifest. Possible values include: "Invalid", "ExeHost", "ContainerHost". - :paramtype host_type: str or ~azure.servicefabric.models.HostType - :keyword host_isolation_mode: Specifies the isolation mode of main entry point of a code - package when it's host type is ContainerHost. This is specified as part of container host - policies in application manifest while importing service manifest. Possible values include: - "None", "Process", "HyperV". - :paramtype host_isolation_mode: str or ~azure.servicefabric.models.HostIsolationMode - :keyword status: Specifies the status of a deployed application or service package on a Service - Fabric node. Possible values include: "Invalid", "Downloading", "Activating", "Active", - "Upgrading", "Deactivating", "RanToCompletion", "Failed". - :paramtype status: str or ~azure.servicefabric.models.DeploymentStatus - :keyword run_frequency_interval: The interval at which code package is run. This is used for - periodic code package. - :paramtype run_frequency_interval: str - :keyword setup_entry_point: Information about setup or main entry point of a code package - deployed on a Service Fabric node. - :paramtype setup_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint - :keyword main_entry_point: Information about setup or main entry point of a code package - deployed on a Service Fabric node. - :paramtype main_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint - """ - super(DeployedCodePackageInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.host_type = kwargs.get('host_type', None) - self.host_isolation_mode = kwargs.get('host_isolation_mode', None) - self.status = kwargs.get('status', None) - self.run_frequency_interval = kwargs.get('run_frequency_interval', None) - self.setup_entry_point = kwargs.get('setup_entry_point', None) - self.main_entry_point = kwargs.get('main_entry_point', None) - - -class DeployedServicePackageHealth(EntityHealth): - """Information about the health of a service package for a specific application deployed on a Service Fabric node. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar service_manifest_name: Name of the service manifest. - :vartype service_manifest_name: str - :ivar node_name: Name of the node where this service package is deployed. - :vartype node_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword service_manifest_name: Name of the service manifest. - :paramtype service_manifest_name: str - :keyword node_name: Name of the node where this service package is deployed. - :paramtype node_name: str - """ - super(DeployedServicePackageHealth, self).__init__(**kwargs) - self.application_name = kwargs.get('application_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.node_name = kwargs.get('node_name', None) - - -class DeployedServicePackageHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a deployed service package, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar node_name: The name of a Service Fabric node. - :vartype node_name: str - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar service_manifest_name: The name of the service manifest. - :vartype service_manifest_name: str - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated - health state. The type of the unhealthy evaluations can be EventHealthEvaluation. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword node_name: The name of a Service Fabric node. - :paramtype node_name: str - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword service_manifest_name: The name of the service manifest. - :paramtype service_manifest_name: str - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current - aggregated health state. The type of the unhealthy evaluations can be EventHealthEvaluation. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(DeployedServicePackageHealthEvaluation, self).__init__(**kwargs) - self.kind = 'DeployedServicePackage' # type: str - self.node_name = kwargs.get('node_name', None) - self.application_name = kwargs.get('application_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class DeployedServicePackageHealthReportExpiredEvent(ApplicationEvent): - """Deployed Service Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar service_manifest: Required. Service manifest name. - :vartype service_manifest: str - :ivar service_package_instance_id: Required. Id of Service package instance. - :vartype service_package_instance_id: long - :ivar service_package_activation_id: Required. Id of Service package activation. - :vartype service_package_activation_id: str - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'service_manifest': {'required': True}, - 'service_package_instance_id': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_manifest': {'key': 'ServiceManifest', 'type': 'str'}, - 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword service_manifest: Required. Service manifest name. - :paramtype service_manifest: str - :keyword service_package_instance_id: Required. Id of Service package instance. - :paramtype service_package_instance_id: long - :keyword service_package_activation_id: Required. Id of Service package activation. - :paramtype service_package_activation_id: str - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(DeployedServicePackageHealthReportExpiredEvent, self).__init__(**kwargs) - self.kind = 'DeployedServicePackageHealthReportExpired' # type: str - self.service_manifest = kwargs['service_manifest'] - self.service_package_instance_id = kwargs['service_package_instance_id'] - self.service_package_activation_id = kwargs['service_package_activation_id'] - self.node_name = kwargs['node_name'] - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class DeployedServicePackageHealthState(EntityHealthState): - """Represents the health state of a deployed service package, containing the entity identifier and the aggregated health state. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar node_name: Name of the node on which the service package is deployed. - :vartype node_name: str - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar service_manifest_name: Name of the manifest describing the service package. - :vartype service_manifest_name: str - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword node_name: Name of the node on which the service package is deployed. - :paramtype node_name: str - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword service_manifest_name: Name of the manifest describing the service package. - :paramtype service_manifest_name: str - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - """ - super(DeployedServicePackageHealthState, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.application_name = kwargs.get('application_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - - -class DeployedServicePackageHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a deployed service package, which contains the service manifest name and the service package aggregated health state. - - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_manifest_name: The name of the service manifest. - :vartype service_manifest_name: str - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword service_manifest_name: The name of the service manifest. - :paramtype service_manifest_name: str - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - """ - super(DeployedServicePackageHealthStateChunk, self).__init__(**kwargs) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - - -class DeployedServicePackageHealthStateChunkList(msrest.serialization.Model): - """The list of deployed service package health state chunks that respect the input filters in the chunk query. Returned by get cluster health state chunks query. - - :ivar items: The list of deployed service package health state chunks that respect the input - filters in the chunk query. - :vartype items: list[~azure.servicefabric.models.DeployedServicePackageHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[DeployedServicePackageHealthStateChunk]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword items: The list of deployed service package health state chunks that respect the input - filters in the chunk query. - :paramtype items: list[~azure.servicefabric.models.DeployedServicePackageHealthStateChunk] - """ - super(DeployedServicePackageHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) - - -class DeployedServicePackageHealthStateFilter(msrest.serialization.Model): - """Defines matching criteria to determine whether a deployed service package should be included as a child of a deployed application in the cluster health chunk. -The deployed service packages are only returned if the parent entities match a filter specified in the cluster health chunk query description. The parent deployed application and its parent application must be included in the cluster health chunk. -One filter can match zero, one or multiple deployed service packages, depending on its properties. - - :ivar service_manifest_name_filter: The name of the service manifest which identifies the - deployed service packages that matches the filter. - If specified, the filter is applied only to the specified deployed service packages, if any. - If no deployed service packages with specified manifest name exist, nothing is returned in the - cluster health chunk based on this filter. - If any deployed service package exists, they are included in the cluster health chunk if it - respects the other filter properties. - If not specified, all deployed service packages that match the parent filters (if any) are - taken into consideration and matched against the other filter members, like health state - filter. - :vartype service_manifest_name_filter: str - :ivar service_package_activation_id_filter: The activation ID of a deployed service package - that matches the filter. - If not specified, the filter applies to all deployed service packages that match the other - parameters. - If specified, the filter matches only the deployed service package with the specified - activation ID. - :vartype service_package_activation_id_filter: str - :ivar health_state_filter: The filter for the health state of the deployed service packages. It - allows selecting deployed service packages if they match the desired health states. - The possible values are integer value of one of the following health states. Only deployed - service packages that match the filter are returned. All deployed service packages are used to - evaluate the parent deployed application aggregated health state. - If not specified, default value is None, unless the deployed service package ID is specified. - If the filter has default value and deployed service package ID is specified, the matching - deployed service package is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches deployed service packages with HealthState - value of OK (2) and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :vartype health_state_filter: int - """ - - _attribute_map = { - 'service_manifest_name_filter': {'key': 'ServiceManifestNameFilter', 'type': 'str'}, - 'service_package_activation_id_filter': {'key': 'ServicePackageActivationIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_manifest_name_filter: The name of the service manifest which identifies the - deployed service packages that matches the filter. - If specified, the filter is applied only to the specified deployed service packages, if any. - If no deployed service packages with specified manifest name exist, nothing is returned in the - cluster health chunk based on this filter. - If any deployed service package exists, they are included in the cluster health chunk if it - respects the other filter properties. - If not specified, all deployed service packages that match the parent filters (if any) are - taken into consideration and matched against the other filter members, like health state - filter. - :paramtype service_manifest_name_filter: str - :keyword service_package_activation_id_filter: The activation ID of a deployed service package - that matches the filter. - If not specified, the filter applies to all deployed service packages that match the other - parameters. - If specified, the filter matches only the deployed service package with the specified - activation ID. - :paramtype service_package_activation_id_filter: str - :keyword health_state_filter: The filter for the health state of the deployed service packages. - It allows selecting deployed service packages if they match the desired health states. - The possible values are integer value of one of the following health states. Only deployed - service packages that match the filter are returned. All deployed service packages are used to - evaluate the parent deployed application aggregated health state. - If not specified, default value is None, unless the deployed service package ID is specified. - If the filter has default value and deployed service package ID is specified, the matching - deployed service package is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches deployed service packages with HealthState - value of OK (2) and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :paramtype health_state_filter: int - """ - super(DeployedServicePackageHealthStateFilter, self).__init__(**kwargs) - self.service_manifest_name_filter = kwargs.get('service_manifest_name_filter', None) - self.service_package_activation_id_filter = kwargs.get('service_package_activation_id_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - - -class DeployedServicePackageInfo(msrest.serialization.Model): - """Information about service package deployed on a Service Fabric node. - - :ivar name: The name of the service package as specified in the service manifest. - :vartype name: str - :ivar version: The version of the service package specified in service manifest. - :vartype version: str - :ivar status: Specifies the status of a deployed application or service package on a Service - Fabric node. Possible values include: "Invalid", "Downloading", "Activating", "Active", - "Upgrading", "Deactivating", "RanToCompletion", "Failed". - :vartype status: str or ~azure.servicefabric.models.DeploymentStatus - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The name of the service package as specified in the service manifest. - :paramtype name: str - :keyword version: The version of the service package specified in service manifest. - :paramtype version: str - :keyword status: Specifies the status of a deployed application or service package on a Service - Fabric node. Possible values include: "Invalid", "Downloading", "Activating", "Active", - "Upgrading", "Deactivating", "RanToCompletion", "Failed". - :paramtype status: str or ~azure.servicefabric.models.DeploymentStatus - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - """ - super(DeployedServicePackageInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) - self.status = kwargs.get('status', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - - -class DeployedServicePackageNewHealthReportEvent(ApplicationEvent): - """Deployed Service Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar service_manifest_name: Required. Service manifest name. - :vartype service_manifest_name: str - :ivar service_package_instance_id: Required. Id of Service package instance. - :vartype service_package_instance_id: long - :ivar service_package_activation_id: Required. Id of Service package activation. - :vartype service_package_activation_id: str - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'service_manifest_name': {'required': True}, - 'service_package_instance_id': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword service_manifest_name: Required. Service manifest name. - :paramtype service_manifest_name: str - :keyword service_package_instance_id: Required. Id of Service package instance. - :paramtype service_package_instance_id: long - :keyword service_package_activation_id: Required. Id of Service package activation. - :paramtype service_package_activation_id: str - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(DeployedServicePackageNewHealthReportEvent, self).__init__(**kwargs) - self.kind = 'DeployedServicePackageNewHealthReport' # type: str - self.service_manifest_name = kwargs['service_manifest_name'] - self.service_package_instance_id = kwargs['service_package_instance_id'] - self.service_package_activation_id = kwargs['service_package_activation_id'] - self.node_name = kwargs['node_name'] - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class DeployedServicePackagesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for deployed service packages, containing health evaluations for each unhealthy deployed service package that impacted current aggregated health state. Can be returned when evaluating deployed application health and the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar total_count: Total number of deployed service packages of the deployed application in the - health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy DeployedServicePackageHealthEvaluation that impacted the - aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword total_count: Total number of deployed service packages of the deployed application in - the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy DeployedServicePackageHealthEvaluation that impacted the - aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(DeployedServicePackagesHealthEvaluation, self).__init__(**kwargs) - self.kind = 'DeployedServicePackages' # type: str - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class DeployedServiceReplicaDetailInfo(msrest.serialization.Model): - """Information about a Service Fabric service replica deployed on a node. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeployedStatefulServiceReplicaDetailInfo, DeployedStatelessServiceInstanceDetailInfo. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar service_name: Full hierarchical name of the service in URI format starting with - ``fabric:``. - :vartype service_name: str - :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :vartype partition_id: str - :ivar current_service_operation: Specifies the current active life-cycle operation on a - stateful service replica or stateless service instance. Possible values include: "Unknown", - "None", "Open", "ChangeRole", "Close", "Abort". - :vartype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName - :ivar current_service_operation_start_time_utc: The start time of the current service operation - in UTC format. - :vartype current_service_operation_start_time_utc: ~datetime.datetime - :ivar reported_load: List of load reported by replica. - :vartype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaDetailInfo', 'Stateless': 'DeployedStatelessServiceInstanceDetailInfo'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_name: Full hierarchical name of the service in URI format starting with - ``fabric:``. - :paramtype service_name: str - :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword current_service_operation: Specifies the current active life-cycle operation on a - stateful service replica or stateless service instance. Possible values include: "Unknown", - "None", "Open", "ChangeRole", "Close", "Abort". - :paramtype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName - :keyword current_service_operation_start_time_utc: The start time of the current service - operation in UTC format. - :paramtype current_service_operation_start_time_utc: ~datetime.datetime - :keyword reported_load: List of load reported by replica. - :paramtype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] - """ - super(DeployedServiceReplicaDetailInfo, self).__init__(**kwargs) - self.service_kind = None # type: Optional[str] - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.current_service_operation = kwargs.get('current_service_operation', None) - self.current_service_operation_start_time_utc = kwargs.get('current_service_operation_start_time_utc', None) - self.reported_load = kwargs.get('reported_load', None) - - -class DeployedServiceReplicaInfo(msrest.serialization.Model): - """Information about a Service Fabric service replica deployed on a node. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeployedStatefulServiceReplicaInfo, DeployedStatelessServiceInstanceInfo. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar service_name: The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar service_type_name: Name of the service type as specified in the service manifest. - :vartype service_type_name: str - :ivar service_manifest_name: The name of the service manifest in which this service type is - defined. - :vartype service_manifest_name: str - :ivar code_package_name: The name of the code package that hosts this replica. - :vartype code_package_name: str - :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", - "InBuild", "Standby", "Ready", "Down", "Dropped". - :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :ivar address: The last address returned by the replica in Open or ChangeRole. - :vartype address: str - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - :ivar host_process_id: Host process ID of the process that is hosting the replica. This will be - zero if the replica is down. In hyper-v containers this host process ID will be from different - kernel. - :vartype host_process_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaInfo', 'Stateless': 'DeployedStatelessServiceInstanceInfo'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_name: The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword service_type_name: Name of the service type as specified in the service manifest. - :paramtype service_type_name: str - :keyword service_manifest_name: The name of the service manifest in which this service type is - defined. - :paramtype service_manifest_name: str - :keyword code_package_name: The name of the code package that hosts this replica. - :paramtype code_package_name: str - :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_status: The status of a replica of a service. Possible values include: - "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". - :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :keyword address: The last address returned by the replica in Open or ChangeRole. - :paramtype address: str - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - :keyword host_process_id: Host process ID of the process that is hosting the replica. This will - be zero if the replica is down. In hyper-v containers this host process ID will be from - different kernel. - :paramtype host_process_id: str - """ - super(DeployedServiceReplicaInfo, self).__init__(**kwargs) - self.service_kind = None # type: Optional[str] - self.service_name = kwargs.get('service_name', None) - self.service_type_name = kwargs.get('service_type_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.replica_status = kwargs.get('replica_status', None) - self.address = kwargs.get('address', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.host_process_id = kwargs.get('host_process_id', None) - - -class DeployedServiceTypeInfo(msrest.serialization.Model): - """Information about service type deployed on a node, information such as the status of the service type registration on a node. - - :ivar service_type_name: Name of the service type as specified in the service manifest. - :vartype service_type_name: str - :ivar service_manifest_name: The name of the service manifest in which this service type is - defined. - :vartype service_manifest_name: str - :ivar code_package_name: The name of the code package that registered the service type. - :vartype code_package_name: str - :ivar status: The status of the service type registration on the node. Possible values include: - "Invalid", "Disabled", "Enabled", "Registered". - :vartype status: str or ~azure.servicefabric.models.ServiceTypeRegistrationStatus - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - """ - - _attribute_map = { - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_type_name: Name of the service type as specified in the service manifest. - :paramtype service_type_name: str - :keyword service_manifest_name: The name of the service manifest in which this service type is - defined. - :paramtype service_manifest_name: str - :keyword code_package_name: The name of the code package that registered the service type. - :paramtype code_package_name: str - :keyword status: The status of the service type registration on the node. Possible values - include: "Invalid", "Disabled", "Enabled", "Registered". - :paramtype status: str or ~azure.servicefabric.models.ServiceTypeRegistrationStatus - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - """ - super(DeployedServiceTypeInfo, self).__init__(**kwargs) - self.service_type_name = kwargs.get('service_type_name', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.code_package_name = kwargs.get('code_package_name', None) - self.status = kwargs.get('status', None) - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - - -class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo): - """Information about a stateful replica running in a code package. Note DeployedServiceReplicaQueryResult will contain duplicate data like ServiceKind, ServiceName, PartitionId and replicaId. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar service_name: Full hierarchical name of the service in URI format starting with - ``fabric:``. - :vartype service_name: str - :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :vartype partition_id: str - :ivar current_service_operation: Specifies the current active life-cycle operation on a - stateful service replica or stateless service instance. Possible values include: "Unknown", - "None", "Open", "ChangeRole", "Close", "Abort". - :vartype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName - :ivar current_service_operation_start_time_utc: The start time of the current service operation - in UTC format. - :vartype current_service_operation_start_time_utc: ~datetime.datetime - :ivar reported_load: List of load reported by replica. - :vartype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] - :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :vartype replica_id: str - :ivar current_replicator_operation: Specifies the operation currently being executed by the - Replicator. Possible values include: "Invalid", "None", "Open", "ChangeRole", "UpdateEpoch", - "Close", "Abort", "OnDataLoss", "WaitForCatchup", "Build". - :vartype current_replicator_operation: str or - ~azure.servicefabric.models.ReplicatorOperationName - :ivar read_status: Specifies the access status of the partition. Possible values include: - "Invalid", "Granted", "ReconfigurationPending", "NotPrimary", "NoWriteQuorum". - :vartype read_status: str or ~azure.servicefabric.models.PartitionAccessStatus - :ivar write_status: Specifies the access status of the partition. Possible values include: - "Invalid", "Granted", "ReconfigurationPending", "NotPrimary", "NoWriteQuorum". - :vartype write_status: str or ~azure.servicefabric.models.PartitionAccessStatus - :ivar replicator_status: Represents a base class for primary or secondary replicator status. - Contains information about the service fabric replicator like the replication/copy queue - utilization, last acknowledgement received timestamp, etc. - :vartype replicator_status: ~azure.servicefabric.models.ReplicatorStatus - :ivar replica_status: Key value store related information for the replica. - :vartype replica_status: ~azure.servicefabric.models.KeyValueStoreReplicaStatus - :ivar deployed_service_replica_query_result: Information about a stateful service replica - deployed on a node. - :vartype deployed_service_replica_query_result: - ~azure.servicefabric.models.DeployedStatefulServiceReplicaInfo - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'current_replicator_operation': {'key': 'CurrentReplicatorOperation', 'type': 'str'}, - 'read_status': {'key': 'ReadStatus', 'type': 'str'}, - 'write_status': {'key': 'WriteStatus', 'type': 'str'}, - 'replicator_status': {'key': 'ReplicatorStatus', 'type': 'ReplicatorStatus'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'KeyValueStoreReplicaStatus'}, - 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatefulServiceReplicaInfo'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_name: Full hierarchical name of the service in URI format starting with - ``fabric:``. - :paramtype service_name: str - :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword current_service_operation: Specifies the current active life-cycle operation on a - stateful service replica or stateless service instance. Possible values include: "Unknown", - "None", "Open", "ChangeRole", "Close", "Abort". - :paramtype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName - :keyword current_service_operation_start_time_utc: The start time of the current service - operation in UTC format. - :paramtype current_service_operation_start_time_utc: ~datetime.datetime - :keyword reported_load: List of load reported by replica. - :paramtype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] - :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: str - :keyword current_replicator_operation: Specifies the operation currently being executed by the - Replicator. Possible values include: "Invalid", "None", "Open", "ChangeRole", "UpdateEpoch", - "Close", "Abort", "OnDataLoss", "WaitForCatchup", "Build". - :paramtype current_replicator_operation: str or - ~azure.servicefabric.models.ReplicatorOperationName - :keyword read_status: Specifies the access status of the partition. Possible values include: - "Invalid", "Granted", "ReconfigurationPending", "NotPrimary", "NoWriteQuorum". - :paramtype read_status: str or ~azure.servicefabric.models.PartitionAccessStatus - :keyword write_status: Specifies the access status of the partition. Possible values include: - "Invalid", "Granted", "ReconfigurationPending", "NotPrimary", "NoWriteQuorum". - :paramtype write_status: str or ~azure.servicefabric.models.PartitionAccessStatus - :keyword replicator_status: Represents a base class for primary or secondary replicator status. - Contains information about the service fabric replicator like the replication/copy queue - utilization, last acknowledgement received timestamp, etc. - :paramtype replicator_status: ~azure.servicefabric.models.ReplicatorStatus - :keyword replica_status: Key value store related information for the replica. - :paramtype replica_status: ~azure.servicefabric.models.KeyValueStoreReplicaStatus - :keyword deployed_service_replica_query_result: Information about a stateful service replica - deployed on a node. - :paramtype deployed_service_replica_query_result: - ~azure.servicefabric.models.DeployedStatefulServiceReplicaInfo - """ - super(DeployedStatefulServiceReplicaDetailInfo, self).__init__(**kwargs) - self.service_kind = 'Stateful' # type: str - self.replica_id = kwargs.get('replica_id', None) - self.current_replicator_operation = kwargs.get('current_replicator_operation', None) - self.read_status = kwargs.get('read_status', None) - self.write_status = kwargs.get('write_status', None) - self.replicator_status = kwargs.get('replicator_status', None) - self.replica_status = kwargs.get('replica_status', None) - self.deployed_service_replica_query_result = kwargs.get('deployed_service_replica_query_result', None) - - -class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): - """Information about a stateful service replica deployed on a node. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar service_name: The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar service_type_name: Name of the service type as specified in the service manifest. - :vartype service_type_name: str - :ivar service_manifest_name: The name of the service manifest in which this service type is - defined. - :vartype service_manifest_name: str - :ivar code_package_name: The name of the code package that hosts this replica. - :vartype code_package_name: str - :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", - "InBuild", "Standby", "Ready", "Down", "Dropped". - :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :ivar address: The last address returned by the replica in Open or ChangeRole. - :vartype address: str - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - :ivar host_process_id: Host process ID of the process that is hosting the replica. This will be - zero if the replica is down. In hyper-v containers this host process ID will be from different - kernel. - :vartype host_process_id: str - :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :vartype replica_id: str - :ivar replica_role: The role of a replica of a stateful service. Possible values include: - "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", - "ActiveAuxiliary", "PrimaryAuxiliary". - :vartype replica_role: str or ~azure.servicefabric.models.ReplicaRole - :ivar reconfiguration_information: Information about current reconfiguration like phase, type, - previous configuration role of replica and reconfiguration start date time. - :vartype reconfiguration_information: ~azure.servicefabric.models.ReconfigurationInformation - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, - 'reconfiguration_information': {'key': 'ReconfigurationInformation', 'type': 'ReconfigurationInformation'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_name: The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword service_type_name: Name of the service type as specified in the service manifest. - :paramtype service_type_name: str - :keyword service_manifest_name: The name of the service manifest in which this service type is - defined. - :paramtype service_manifest_name: str - :keyword code_package_name: The name of the code package that hosts this replica. - :paramtype code_package_name: str - :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_status: The status of a replica of a service. Possible values include: - "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". - :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :keyword address: The last address returned by the replica in Open or ChangeRole. - :paramtype address: str - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - :keyword host_process_id: Host process ID of the process that is hosting the replica. This will - be zero if the replica is down. In hyper-v containers this host process ID will be from - different kernel. - :paramtype host_process_id: str - :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: str - :keyword replica_role: The role of a replica of a stateful service. Possible values include: - "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", - "ActiveAuxiliary", "PrimaryAuxiliary". - :paramtype replica_role: str or ~azure.servicefabric.models.ReplicaRole - :keyword reconfiguration_information: Information about current reconfiguration like phase, - type, previous configuration role of replica and reconfiguration start date time. - :paramtype reconfiguration_information: ~azure.servicefabric.models.ReconfigurationInformation - """ - super(DeployedStatefulServiceReplicaInfo, self).__init__(**kwargs) - self.service_kind = 'Stateful' # type: str - self.replica_id = kwargs.get('replica_id', None) - self.replica_role = kwargs.get('replica_role', None) - self.reconfiguration_information = kwargs.get('reconfiguration_information', None) - - -class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInfo): - """Information about a stateless instance running in a code package. Note that DeployedServiceReplicaQueryResult will contain duplicate data like ServiceKind, ServiceName, PartitionId and InstanceId. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar service_name: Full hierarchical name of the service in URI format starting with - ``fabric:``. - :vartype service_name: str - :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :vartype partition_id: str - :ivar current_service_operation: Specifies the current active life-cycle operation on a - stateful service replica or stateless service instance. Possible values include: "Unknown", - "None", "Open", "ChangeRole", "Close", "Abort". - :vartype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName - :ivar current_service_operation_start_time_utc: The start time of the current service operation - in UTC format. - :vartype current_service_operation_start_time_utc: ~datetime.datetime - :ivar reported_load: List of load reported by replica. - :vartype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] - :ivar instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric to - uniquely identify an instance of a partition of a stateless service. It is unique within a - partition and does not change for the lifetime of the instance. If the instance has failed over - on the same or different node, it will get a different value for the InstanceId. - :vartype instance_id: str - :ivar deployed_service_replica_query_result: Information about a stateless service instance - deployed on a node. - :vartype deployed_service_replica_query_result: - ~azure.servicefabric.models.DeployedStatelessServiceInstanceInfo - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatelessServiceInstanceInfo'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_name: Full hierarchical name of the service in URI format starting with - ``fabric:``. - :paramtype service_name: str - :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword current_service_operation: Specifies the current active life-cycle operation on a - stateful service replica or stateless service instance. Possible values include: "Unknown", - "None", "Open", "ChangeRole", "Close", "Abort". - :paramtype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName - :keyword current_service_operation_start_time_utc: The start time of the current service - operation in UTC format. - :paramtype current_service_operation_start_time_utc: ~datetime.datetime - :keyword reported_load: List of load reported by replica. - :paramtype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] - :keyword instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric - to uniquely identify an instance of a partition of a stateless service. It is unique within a - partition and does not change for the lifetime of the instance. If the instance has failed over - on the same or different node, it will get a different value for the InstanceId. - :paramtype instance_id: str - :keyword deployed_service_replica_query_result: Information about a stateless service instance - deployed on a node. - :paramtype deployed_service_replica_query_result: - ~azure.servicefabric.models.DeployedStatelessServiceInstanceInfo - """ - super(DeployedStatelessServiceInstanceDetailInfo, self).__init__(**kwargs) - self.service_kind = 'Stateless' # type: str - self.instance_id = kwargs.get('instance_id', None) - self.deployed_service_replica_query_result = kwargs.get('deployed_service_replica_query_result', None) - - -class DeployedStatelessServiceInstanceInfo(DeployedServiceReplicaInfo): - """Information about a stateless service instance deployed on a node. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar service_name: The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar service_type_name: Name of the service type as specified in the service manifest. - :vartype service_type_name: str - :ivar service_manifest_name: The name of the service manifest in which this service type is - defined. - :vartype service_manifest_name: str - :ivar code_package_name: The name of the code package that hosts this replica. - :vartype code_package_name: str - :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", - "InBuild", "Standby", "Ready", "Down", "Dropped". - :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :ivar address: The last address returned by the replica in Open or ChangeRole. - :vartype address: str - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - :ivar host_process_id: Host process ID of the process that is hosting the replica. This will be - zero if the replica is down. In hyper-v containers this host process ID will be from different - kernel. - :vartype host_process_id: str - :ivar instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric to - uniquely identify an instance of a partition of a stateless service. It is unique within a - partition and does not change for the lifetime of the instance. If the instance has failed over - on the same or different node, it will get a different value for the InstanceId. - :vartype instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_name: The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword service_type_name: Name of the service type as specified in the service manifest. - :paramtype service_type_name: str - :keyword service_manifest_name: The name of the service manifest in which this service type is - defined. - :paramtype service_manifest_name: str - :keyword code_package_name: The name of the code package that hosts this replica. - :paramtype code_package_name: str - :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_status: The status of a replica of a service. Possible values include: - "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". - :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :keyword address: The last address returned by the replica in Open or ChangeRole. - :paramtype address: str - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - :keyword host_process_id: Host process ID of the process that is hosting the replica. This will - be zero if the replica is down. In hyper-v containers this host process ID will be from - different kernel. - :paramtype host_process_id: str - :keyword instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric - to uniquely identify an instance of a partition of a stateless service. It is unique within a - partition and does not change for the lifetime of the instance. If the instance has failed over - on the same or different node, it will get a different value for the InstanceId. - :paramtype instance_id: str - """ - super(DeployedStatelessServiceInstanceInfo, self).__init__(**kwargs) - self.service_kind = 'Stateless' # type: str - self.instance_id = kwargs.get('instance_id', None) - - -class DeployServicePackageToNodeDescription(msrest.serialization.Model): - """Defines description for downloading packages associated with a service manifest to image cache on a Service Fabric node. - - All required parameters must be populated in order to send to Azure. - - :ivar service_manifest_name: Required. The name of service manifest whose packages need to be - downloaded. - :vartype service_manifest_name: str - :ivar application_type_name: Required. The application type name as defined in the application - manifest. - :vartype application_type_name: str - :ivar application_type_version: Required. The version of the application type as defined in the - application manifest. - :vartype application_type_version: str - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar package_sharing_policy: List of package sharing policy information. - :vartype package_sharing_policy: list[~azure.servicefabric.models.PackageSharingPolicyInfo] - """ - - _validation = { - 'service_manifest_name': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'node_name': {'required': True}, - } - - _attribute_map = { - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'package_sharing_policy': {'key': 'PackageSharingPolicy', 'type': '[PackageSharingPolicyInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_manifest_name: Required. The name of service manifest whose packages need to - be downloaded. - :paramtype service_manifest_name: str - :keyword application_type_name: Required. The application type name as defined in the - application manifest. - :paramtype application_type_name: str - :keyword application_type_version: Required. The version of the application type as defined in - the application manifest. - :paramtype application_type_version: str - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword package_sharing_policy: List of package sharing policy information. - :paramtype package_sharing_policy: list[~azure.servicefabric.models.PackageSharingPolicyInfo] - """ - super(DeployServicePackageToNodeDescription, self).__init__(**kwargs) - self.service_manifest_name = kwargs['service_manifest_name'] - self.application_type_name = kwargs['application_type_name'] - self.application_type_version = kwargs['application_type_version'] - self.node_name = kwargs['node_name'] - self.package_sharing_policy = kwargs.get('package_sharing_policy', None) - - -class DiagnosticsDescription(msrest.serialization.Model): - """Describes the diagnostics options available. - - :ivar sinks: List of supported sinks that can be referenced. - :vartype sinks: list[~azure.servicefabric.models.DiagnosticsSinkProperties] - :ivar enabled: Status of whether or not sinks are enabled. - :vartype enabled: bool - :ivar default_sink_refs: The sinks to be used if diagnostics is enabled. Sink choices can be - overridden at the service and code package level. - :vartype 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 - ): - """ - :keyword sinks: List of supported sinks that can be referenced. - :paramtype sinks: list[~azure.servicefabric.models.DiagnosticsSinkProperties] - :keyword enabled: Status of whether or not sinks are enabled. - :paramtype enabled: bool - :keyword default_sink_refs: The sinks to be used if diagnostics is enabled. Sink choices can be - overridden at the service and code package level. - :paramtype default_sink_refs: list[str] - """ - super(DiagnosticsDescription, self).__init__(**kwargs) - self.sinks = kwargs.get('sinks', None) - self.enabled = kwargs.get('enabled', None) - self.default_sink_refs = kwargs.get('default_sink_refs', None) - - -class DiagnosticsRef(msrest.serialization.Model): - """Reference to sinks in DiagnosticsDescription. - - :ivar enabled: Status of whether or not sinks are enabled. - :vartype enabled: bool - :ivar sink_refs: List of sinks to be used if enabled. References the list of sinks in - DiagnosticsDescription. - :vartype sink_refs: list[str] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'sink_refs': {'key': 'sinkRefs', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword enabled: Status of whether or not sinks are enabled. - :paramtype enabled: bool - :keyword sink_refs: List of sinks to be used if enabled. References the list of sinks in - DiagnosticsDescription. - :paramtype sink_refs: list[str] - """ - super(DiagnosticsRef, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.sink_refs = kwargs.get('sink_refs', None) - - -class DisableBackupDescription(msrest.serialization.Model): - """It describes the body parameters while disabling backup of a backup entity(Application/Service/Partition). - - All required parameters must be populated in order to send to Azure. - - :ivar clean_backup: Required. Boolean flag to delete backups. It can be set to true for - deleting all the backups which were created for the backup entity that is getting disabled for - backup. - :vartype clean_backup: bool - """ - - _validation = { - 'clean_backup': {'required': True}, - } - - _attribute_map = { - 'clean_backup': {'key': 'CleanBackup', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword clean_backup: Required. Boolean flag to delete backups. It can be set to true for - deleting all the backups which were created for the backup entity that is getting disabled for - backup. - :paramtype clean_backup: bool - """ - super(DisableBackupDescription, self).__init__(**kwargs) - self.clean_backup = kwargs['clean_backup'] - - -class DiskInfo(msrest.serialization.Model): - """Information about the disk. - - :ivar capacity: the disk size in bytes. - :vartype capacity: str - :ivar available_space: the available disk space in bytes. - :vartype available_space: str - """ - - _attribute_map = { - 'capacity': {'key': 'Capacity', 'type': 'str'}, - 'available_space': {'key': 'AvailableSpace', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword capacity: the disk size in bytes. - :paramtype capacity: str - :keyword available_space: the available disk space in bytes. - :paramtype available_space: str - """ - super(DiskInfo, self).__init__(**kwargs) - self.capacity = kwargs.get('capacity', None) - self.available_space = kwargs.get('available_space', None) - - -class DoublePropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Double. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property, determined by the type of data. Following are the - possible values.Constant filled by server. Possible values include: "Invalid", "Binary", - "Int64", "Double", "String", "Guid". - :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind - :ivar data: Required. The data of the property value. - :vartype data: float - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword data: Required. The data of the property value. - :paramtype data: float - """ - super(DoublePropertyValue, self).__init__(**kwargs) - self.kind = 'Double' # type: str - self.data = kwargs['data'] - - -class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Dsms Azure blob store used for storing and enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant - filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", - "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". - :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind - :ivar friendly_name: Friendly name for this backup storage. - :vartype friendly_name: str - :ivar storage_credentials_source_location: Required. The source location of the storage - credentials to connect to the Dsms Azure blob store. - :vartype storage_credentials_source_location: str - :ivar container_name: Required. The name of the container in the blob store to store and - enumerate backups from. - :vartype container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'storage_credentials_source_location': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_credentials_source_location': {'key': 'StorageCredentialsSourceLocation', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword friendly_name: Friendly name for this backup storage. - :paramtype friendly_name: str - :keyword storage_credentials_source_location: Required. The source location of the storage - credentials to connect to the Dsms Azure blob store. - :paramtype storage_credentials_source_location: str - :keyword container_name: Required. The name of the container in the blob store to store and - enumerate backups from. - :paramtype container_name: str - """ - super(DsmsAzureBlobBackupStorageDescription, self).__init__(**kwargs) - self.storage_kind = 'DsmsAzureBlobStore' # type: str - self.storage_credentials_source_location = kwargs['storage_credentials_source_location'] - self.container_name = kwargs['container_name'] - - -class EnableBackupDescription(msrest.serialization.Model): - """Specifies the parameters needed to enable periodic backup. - - All required parameters must be populated in order to send to Azure. - - :ivar backup_policy_name: Required. Name of the backup policy to be used for enabling periodic - backups. - :vartype backup_policy_name: str - """ - - _validation = { - 'backup_policy_name': {'required': True}, - } - - _attribute_map = { - 'backup_policy_name': {'key': 'BackupPolicyName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword backup_policy_name: Required. Name of the backup policy to be used for enabling - periodic backups. - :paramtype backup_policy_name: str - """ - super(EnableBackupDescription, self).__init__(**kwargs) - self.backup_policy_name = kwargs['backup_policy_name'] - - -class EndpointProperties(msrest.serialization.Model): - """Describes a container endpoint. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the endpoint. - :vartype name: str - :ivar port: Port used by the container. - :vartype port: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The name of the endpoint. - :paramtype name: str - :keyword port: Port used by the container. - :paramtype port: int - """ - super(EndpointProperties, self).__init__(**kwargs) - self.name = kwargs['name'] - self.port = kwargs.get('port', None) - - -class EndpointRef(msrest.serialization.Model): - """Describes a reference to a service endpoint. - - :ivar name: Name of the endpoint. - :vartype name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Name of the endpoint. - :paramtype name: str - """ - super(EndpointRef, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class SafetyCheck(msrest.serialization.Model): - """Represents a safety check performed by service fabric before continuing with the operations. These checks ensure the availability of the service and the reliability of the state. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SeedNodeSafetyCheck, PartitionSafetyCheck. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'EnsureSeedNodeQuorum': 'SeedNodeSafetyCheck', 'PartitionSafetyCheck': 'PartitionSafetyCheck'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(SafetyCheck, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class PartitionSafetyCheck(SafetyCheck): - """Represents a safety check for the service partition being performed by service fabric before continuing with operations. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: EnsureAvailabilitySafetyCheck, EnsurePartitionQuorumSafetyCheck, WaitForInbuildReplicaSafetyCheck, WaitForPrimaryPlacementSafetyCheck, WaitForPrimarySwapSafetyCheck, WaitForReconfigurationSafetyCheck. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - :ivar partition_id: Id of the partition which is undergoing the safety check. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'EnsureAvailability': 'EnsureAvailabilitySafetyCheck', 'EnsurePartitionQuorum': 'EnsurePartitionQuorumSafetyCheck', 'WaitForInbuildReplica': 'WaitForInbuildReplicaSafetyCheck', 'WaitForPrimaryPlacement': 'WaitForPrimaryPlacementSafetyCheck', 'WaitForPrimarySwap': 'WaitForPrimarySwapSafetyCheck', 'WaitForReconfiguration': 'WaitForReconfigurationSafetyCheck'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword partition_id: Id of the partition which is undergoing the safety check. - :paramtype partition_id: str - """ - super(PartitionSafetyCheck, self).__init__(**kwargs) - self.kind = 'PartitionSafetyCheck' # type: str - self.partition_id = kwargs.get('partition_id', None) - - -class EnsureAvailabilitySafetyCheck(PartitionSafetyCheck): - """Safety check that waits to ensure the availability of the partition. It waits until there are replicas available such that bringing down this replica will not cause availability loss for the partition. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - :ivar partition_id: Id of the partition which is undergoing the safety check. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword partition_id: Id of the partition which is undergoing the safety check. - :paramtype partition_id: str - """ - super(EnsureAvailabilitySafetyCheck, self).__init__(**kwargs) - self.kind = 'EnsureAvailability' # type: str - - -class EnsurePartitionQuorumSafetyCheck(PartitionSafetyCheck): - """Safety check that ensures that a quorum of replicas are not lost for a partition. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - :ivar partition_id: Id of the partition which is undergoing the safety check. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword partition_id: Id of the partition which is undergoing the safety check. - :paramtype partition_id: str - """ - super(EnsurePartitionQuorumSafetyCheck, self).__init__(**kwargs) - self.kind = 'EnsurePartitionQuorum' # type: str - - -class EntityKindHealthStateCount(msrest.serialization.Model): - """Represents health state count for entities of the specified entity kind. - - :ivar entity_kind: The entity kind for which health states are evaluated. Possible values - include: "Invalid", "Node", "Partition", "Service", "Application", "Replica", - "DeployedApplication", "DeployedServicePackage", "Cluster". - :vartype entity_kind: str or ~azure.servicefabric.models.EntityKind - :ivar health_state_count: The health state count for the entities of the specified kind. - :vartype health_state_count: ~azure.servicefabric.models.HealthStateCount - """ - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'health_state_count': {'key': 'HealthStateCount', 'type': 'HealthStateCount'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword entity_kind: The entity kind for which health states are evaluated. Possible values - include: "Invalid", "Node", "Partition", "Service", "Application", "Replica", - "DeployedApplication", "DeployedServicePackage", "Cluster". - :paramtype entity_kind: str or ~azure.servicefabric.models.EntityKind - :keyword health_state_count: The health state count for the entities of the specified kind. - :paramtype health_state_count: ~azure.servicefabric.models.HealthStateCount - """ - super(EntityKindHealthStateCount, self).__init__(**kwargs) - self.entity_kind = kwargs.get('entity_kind', None) - self.health_state_count = kwargs.get('health_state_count', None) - - -class EnvironmentVariable(msrest.serialization.Model): - """Describes an environment variable for the container. - - :ivar type: The type of the environment variable being given in value. Possible values include: - "ClearText", "KeyVaultReference", "SecretValueReference". Default value: "ClearText". - :vartype type: str or ~azure.servicefabric.models.EnvironmentVariableType - :ivar name: The name of the environment variable. - :vartype name: str - :ivar value: The value of the environment variable, will be processed based on the type - provided. - :vartype value: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword type: The type of the environment variable being given in value. Possible values - include: "ClearText", "KeyVaultReference", "SecretValueReference". Default value: "ClearText". - :paramtype type: str or ~azure.servicefabric.models.EnvironmentVariableType - :keyword name: The name of the environment variable. - :paramtype name: str - :keyword value: The value of the environment variable, will be processed based on the type - provided. - :paramtype value: str - """ - super(EnvironmentVariable, self).__init__(**kwargs) - self.type = kwargs.get('type', "ClearText") - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - - -class Epoch(msrest.serialization.Model): - """An Epoch is a configuration number for the partition as a whole. When the configuration of the replica set changes, for example when the Primary replica changes, the operations that are replicated from the new Primary replica are said to be a new Epoch from the ones which were sent by the old Primary replica. - - :ivar configuration_version: The current configuration number of this Epoch. The configuration - number is an increasing value that is updated whenever the configuration of this replica set - changes. - :vartype configuration_version: str - :ivar data_loss_version: The current data loss number of this Epoch. The data loss number - property is an increasing value which is updated whenever data loss is suspected, as when loss - of a quorum of replicas in the replica set that includes the Primary replica. - :vartype data_loss_version: str - """ - - _attribute_map = { - 'configuration_version': {'key': 'ConfigurationVersion', 'type': 'str'}, - 'data_loss_version': {'key': 'DataLossVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword configuration_version: The current configuration number of this Epoch. The - configuration number is an increasing value that is updated whenever the configuration of this - replica set changes. - :paramtype configuration_version: str - :keyword data_loss_version: The current data loss number of this Epoch. The data loss number - property is an increasing value which is updated whenever data loss is suspected, as when loss - of a quorum of replicas in the replica set that includes the Primary replica. - :paramtype data_loss_version: str - """ - super(Epoch, self).__init__(**kwargs) - self.configuration_version = kwargs.get('configuration_version', None) - self.data_loss_version = kwargs.get('data_loss_version', None) - - -class EventHealthEvaluation(HealthEvaluation): - """Represents health evaluation of a HealthEvent that was reported on the entity. -The health evaluation is returned when evaluating health of an entity results in Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar consider_warning_as_error: Indicates whether warnings are treated with the same severity - as errors. The field is specified in the health policy used to evaluate the entity. - :vartype consider_warning_as_error: bool - :ivar unhealthy_event: Represents health information reported on a health entity, such as - cluster, application or node, with additional metadata added by the Health Manager. - :vartype unhealthy_event: ~azure.servicefabric.models.HealthEvent - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'unhealthy_event': {'key': 'UnhealthyEvent', 'type': 'HealthEvent'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword consider_warning_as_error: Indicates whether warnings are treated with the same - severity as errors. The field is specified in the health policy used to evaluate the entity. - :paramtype consider_warning_as_error: bool - :keyword unhealthy_event: Represents health information reported on a health entity, such as - cluster, application or node, with additional metadata added by the Health Manager. - :paramtype unhealthy_event: ~azure.servicefabric.models.HealthEvent - """ - super(EventHealthEvaluation, self).__init__(**kwargs) - self.kind = 'Event' # type: str - self.consider_warning_as_error = kwargs.get('consider_warning_as_error', None) - self.unhealthy_event = kwargs.get('unhealthy_event', None) - - -class ExecutingFaultsChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos has decided on the faults for an iteration. This Chaos event contains the details of the faults as a list of strings. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values - include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", - "Stopped". - :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind - :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :vartype time_stamp_utc: ~datetime.datetime - :ivar faults: List of string description of the faults that Chaos decided to execute in an - iteration. - :vartype faults: list[str] - """ - - _validation = { - 'kind': {'required': True}, - 'time_stamp_utc': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'faults': {'key': 'Faults', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :paramtype time_stamp_utc: ~datetime.datetime - :keyword faults: List of string description of the faults that Chaos decided to execute in an - iteration. - :paramtype faults: list[str] - """ - super(ExecutingFaultsChaosEvent, self).__init__(**kwargs) - self.kind = 'ExecutingFaults' # type: str - self.faults = kwargs.get('faults', None) - - -class ProvisionApplicationTypeDescriptionBase(msrest.serialization.Model): - """Represents the type of registration or provision requested, and if the operation needs to be asynchronous or not. Supported types of provision operations are from either image store or external store. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ExternalStoreProvisionApplicationTypeDescription, ProvisionApplicationTypeDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of application type registration or provision requested. The - application package can be registered or provisioned either from the image store or from an - external store. Following are the kinds of the application type provision.Constant filled by - server. Possible values include: "Invalid", "ImageStorePath", "ExternalStore". - :vartype kind: str or ~azure.servicefabric.models.ProvisionApplicationTypeKind - :ivar async_property: Required. Indicates whether or not provisioning should occur - asynchronously. When set to true, the provision operation returns when the request is accepted - by the system, and the provision operation continues without any timeout limit. The default - value is false. For large application packages, we recommend setting the value to true. - :vartype async_property: bool - """ - - _validation = { - 'kind': {'required': True}, - 'async_property': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'async_property': {'key': 'Async', 'type': 'bool'}, - } - - _subtype_map = { - 'kind': {'ExternalStore': 'ExternalStoreProvisionApplicationTypeDescription', 'ImageStorePath': 'ProvisionApplicationTypeDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword async_property: Required. Indicates whether or not provisioning should occur - asynchronously. When set to true, the provision operation returns when the request is accepted - by the system, and the provision operation continues without any timeout limit. The default - value is false. For large application packages, we recommend setting the value to true. - :paramtype async_property: bool - """ - super(ProvisionApplicationTypeDescriptionBase, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.async_property = kwargs['async_property'] - - -class ExternalStoreProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): - """Describes the operation to register or provision an application type using an application package from an external store instead of a package uploaded to the Service Fabric image store. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of application type registration or provision requested. The - application package can be registered or provisioned either from the image store or from an - external store. Following are the kinds of the application type provision.Constant filled by - server. Possible values include: "Invalid", "ImageStorePath", "ExternalStore". - :vartype kind: str or ~azure.servicefabric.models.ProvisionApplicationTypeKind - :ivar async_property: Required. Indicates whether or not provisioning should occur - asynchronously. When set to true, the provision operation returns when the request is accepted - by the system, and the provision operation continues without any timeout limit. The default - value is false. For large application packages, we recommend setting the value to true. - :vartype async_property: bool - :ivar application_package_download_uri: Required. The path to the '.sfpkg' application package - from where the application package can be downloaded using HTTP or HTTPS protocols. The - application package can be stored in an external store that provides GET operation to download - the file. Supported protocols are HTTP and HTTPS, and the path must allow READ access. - :vartype application_package_download_uri: str - :ivar application_type_name: Required. The application type name represents the name of the - application type found in the application manifest. - :vartype application_type_name: str - :ivar application_type_version: Required. The application type version represents the version - of the application type found in the application manifest. - :vartype application_type_version: str - """ - - _validation = { - 'kind': {'required': True}, - 'async_property': {'required': True}, - 'application_package_download_uri': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'application_package_download_uri': {'key': 'ApplicationPackageDownloadUri', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword async_property: Required. Indicates whether or not provisioning should occur - asynchronously. When set to true, the provision operation returns when the request is accepted - by the system, and the provision operation continues without any timeout limit. The default - value is false. For large application packages, we recommend setting the value to true. - :paramtype async_property: bool - :keyword application_package_download_uri: Required. The path to the '.sfpkg' application - package from where the application package can be downloaded using HTTP or HTTPS protocols. The - application package can be stored in an external store that provides GET operation to download - the file. Supported protocols are HTTP and HTTPS, and the path must allow READ access. - :paramtype application_package_download_uri: str - :keyword application_type_name: Required. The application type name represents the name of the - application type found in the application manifest. - :paramtype application_type_name: str - :keyword application_type_version: Required. The application type version represents the - version of the application type found in the application manifest. - :paramtype application_type_version: str - """ - super(ExternalStoreProvisionApplicationTypeDescription, self).__init__(**kwargs) - self.kind = 'ExternalStore' # type: str - self.application_package_download_uri = kwargs['application_package_download_uri'] - self.application_type_name = kwargs['application_type_name'] - self.application_type_version = kwargs['application_type_version'] - - -class FabricCodeVersionInfo(msrest.serialization.Model): - """Information about a Service Fabric code version. - - :ivar code_version: The product version of Service Fabric. - :vartype code_version: str - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword code_version: The product version of Service Fabric. - :paramtype code_version: str - """ - super(FabricCodeVersionInfo, self).__init__(**kwargs) - self.code_version = kwargs.get('code_version', None) - - -class FabricConfigVersionInfo(msrest.serialization.Model): - """Information about a Service Fabric config version. - - :ivar config_version: The config version of Service Fabric. - :vartype config_version: str - """ - - _attribute_map = { - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword config_version: The config version of Service Fabric. - :paramtype config_version: str - """ - super(FabricConfigVersionInfo, self).__init__(**kwargs) - self.config_version = kwargs.get('config_version', None) - - -class FabricError(msrest.serialization.Model): - """The REST API operations for Service Fabric return standard HTTP status codes. This type defines the additional information returned from the Service Fabric API operations that are not successful. - - All required parameters must be populated in order to send to Azure. - - :ivar error: Required. Error object containing error code and error message. - :vartype error: ~azure.servicefabric.models.FabricErrorError - """ - - _validation = { - 'error': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'Error', 'type': 'FabricErrorError'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword error: Required. Error object containing error code and error message. - :paramtype error: ~azure.servicefabric.models.FabricErrorError - """ - super(FabricError, self).__init__(**kwargs) - self.error = kwargs['error'] - - -class FabricErrorError(msrest.serialization.Model): - """Error object containing error code and error message. - - All required parameters must be populated in order to send to Azure. - - :ivar code: Required. Defines the fabric error codes that be returned as part of the error - object in response to Service Fabric API operations that are not successful. Following are the - error code values that can be returned for a specific HTTP status code. - - - * - Possible values of the error code for HTTP status code 400 (Bad Request) - - - * "FABRIC_E_INVALID_PARTITION_KEY" - * "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" - * "FABRIC_E_INVALID_ADDRESS" - * "FABRIC_E_APPLICATION_NOT_UPGRADING" - * "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" - * "FABRIC_E_FABRIC_NOT_UPGRADING" - * "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" - * "FABRIC_E_INVALID_CONFIGURATION" - * "FABRIC_E_INVALID_NAME_URI" - * "FABRIC_E_PATH_TOO_LONG" - * "FABRIC_E_KEY_TOO_LARGE" - * "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" - * "FABRIC_E_INVALID_ATOMIC_GROUP" - * "FABRIC_E_VALUE_EMPTY" - * "FABRIC_E_BACKUP_IS_ENABLED" - * "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" - * "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" - * "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" - * "E_INVALIDARG" - - * - Possible values of the error code for HTTP status code 404 (Not Found) - - - * "FABRIC_E_NODE_NOT_FOUND" - * "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" - * "FABRIC_E_APPLICATION_NOT_FOUND" - * "FABRIC_E_SERVICE_TYPE_NOT_FOUND" - * "FABRIC_E_SERVICE_DOES_NOT_EXIST" - * "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" - * "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" - * "FABRIC_E_PARTITION_NOT_FOUND" - * "FABRIC_E_REPLICA_DOES_NOT_EXIST" - * "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" - * "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" - * "FABRIC_E_DIRECTORY_NOT_FOUND" - * "FABRIC_E_FABRIC_VERSION_NOT_FOUND" - * "FABRIC_E_FILE_NOT_FOUND" - * "FABRIC_E_NAME_DOES_NOT_EXIST" - * "FABRIC_E_PROPERTY_DOES_NOT_EXIST" - * "FABRIC_E_ENUMERATION_COMPLETED" - * "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" - * "FABRIC_E_KEY_NOT_FOUND" - * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" - * "FABRIC_E_BACKUP_NOT_ENABLED" - * "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" - * "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" - * "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" - - * - Possible values of the error code for HTTP status code 409 (Conflict) - - - * "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" - * "FABRIC_E_APPLICATION_ALREADY_EXISTS" - * "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" - * "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" - * "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" - * "FABRIC_E_SERVICE_ALREADY_EXISTS" - * "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" - * "FABRIC_E_APPLICATION_TYPE_IN_USE" - * "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" - * "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" - * "FABRIC_E_FABRIC_VERSION_IN_USE" - * "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" - * "FABRIC_E_NAME_ALREADY_EXISTS" - * "FABRIC_E_NAME_NOT_EMPTY" - * "FABRIC_E_PROPERTY_CHECK_FAILED" - * "FABRIC_E_SERVICE_METADATA_MISMATCH" - * "FABRIC_E_SERVICE_TYPE_MISMATCH" - * "FABRIC_E_HEALTH_STALE_REPORT" - * "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" - * "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" - * "FABRIC_E_INSTANCE_ID_MISMATCH" - * "FABRIC_E_BACKUP_IN_PROGRESS" - * "FABRIC_E_RESTORE_IN_PROGRESS" - * "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" - - * - Possible values of the error code for HTTP status code 413 (Request Entity Too Large) - - - * "FABRIC_E_VALUE_TOO_LARGE" - - * - Possible values of the error code for HTTP status code 500 (Internal Server Error) - - - * "FABRIC_E_NODE_IS_UP" - * "E_FAIL" - * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" - * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" - * "FABRIC_E_VOLUME_ALREADY_EXISTS" - * "FABRIC_E_VOLUME_NOT_FOUND" - * "SerializationError" - * "FABRIC_E_CERTIFICATE_NOT_FOUND" - - * - Possible values of the error code for HTTP status code 503 (Service Unavailable) - - - * "FABRIC_E_NO_WRITE_QUORUM" - * "FABRIC_E_NOT_PRIMARY" - * "FABRIC_E_NOT_READY" - * "FABRIC_E_RECONFIGURATION_PENDING" - * "FABRIC_E_SERVICE_OFFLINE" - * "E_ABORT" - * "FABRIC_E_VALUE_TOO_LARGE" - - * - Possible values of the error code for HTTP status code 504 (Gateway Timeout) - - - * "FABRIC_E_COMMUNICATION_ERROR" - * "FABRIC_E_OPERATION_NOT_COMPLETE" - * "FABRIC_E_TIMEOUT". Possible values include: "FABRIC_E_INVALID_PARTITION_KEY", - "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", - "FABRIC_E_APPLICATION_NOT_UPGRADING", "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", - "FABRIC_E_FABRIC_NOT_UPGRADING", "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", - "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", "FABRIC_E_PATH_TOO_LONG", - "FABRIC_E_KEY_TOO_LARGE", "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", - "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", "FABRIC_E_NODE_NOT_FOUND", - "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", "FABRIC_E_APPLICATION_NOT_FOUND", - "FABRIC_E_SERVICE_TYPE_NOT_FOUND", "FABRIC_E_SERVICE_DOES_NOT_EXIST", - "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", - "FABRIC_E_PARTITION_NOT_FOUND", "FABRIC_E_REPLICA_DOES_NOT_EXIST", - "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", - "FABRIC_E_DIRECTORY_NOT_FOUND", "FABRIC_E_FABRIC_VERSION_NOT_FOUND", "FABRIC_E_FILE_NOT_FOUND", - "FABRIC_E_NAME_DOES_NOT_EXIST", "FABRIC_E_PROPERTY_DOES_NOT_EXIST", - "FABRIC_E_ENUMERATION_COMPLETED", "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", - "FABRIC_E_KEY_NOT_FOUND", "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", "FABRIC_E_APPLICATION_ALREADY_EXISTS", - "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", - "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", - "FABRIC_E_SERVICE_ALREADY_EXISTS", "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", - "FABRIC_E_APPLICATION_TYPE_IN_USE", "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", - "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", "FABRIC_E_FABRIC_VERSION_IN_USE", - "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", "FABRIC_E_NAME_ALREADY_EXISTS", - "FABRIC_E_NAME_NOT_EMPTY", "FABRIC_E_PROPERTY_CHECK_FAILED", - "FABRIC_E_SERVICE_METADATA_MISMATCH", "FABRIC_E_SERVICE_TYPE_MISMATCH", - "FABRIC_E_HEALTH_STALE_REPORT", "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", - "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", - "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", "FABRIC_E_NOT_PRIMARY", - "FABRIC_E_NOT_READY", "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", - "E_ABORT", "FABRIC_E_COMMUNICATION_ERROR", "FABRIC_E_OPERATION_NOT_COMPLETE", - "FABRIC_E_TIMEOUT", "FABRIC_E_NODE_IS_UP", "E_FAIL", "FABRIC_E_BACKUP_IS_ENABLED", - "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", - "FABRIC_E_BACKUP_NOT_ENABLED", "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", "FABRIC_E_BACKUP_IN_PROGRESS", - "FABRIC_E_RESTORE_IN_PROGRESS", "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", - "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", "FABRIC_E_VOLUME_ALREADY_EXISTS", - "FABRIC_E_VOLUME_NOT_FOUND", "SerializationError", - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", "FABRIC_E_CERTIFICATE_NOT_FOUND". - :vartype code: str or ~azure.servicefabric.models.FabricErrorCodes - :ivar message: Error message. - :vartype message: str - """ - - _validation = { - 'code': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'Code', 'type': 'str'}, - 'message': {'key': 'Message', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword code: Required. Defines the fabric error codes that be returned as part of the error - object in response to Service Fabric API operations that are not successful. Following are the - error code values that can be returned for a specific HTTP status code. - - - * - Possible values of the error code for HTTP status code 400 (Bad Request) - - - * "FABRIC_E_INVALID_PARTITION_KEY" - * "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" - * "FABRIC_E_INVALID_ADDRESS" - * "FABRIC_E_APPLICATION_NOT_UPGRADING" - * "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" - * "FABRIC_E_FABRIC_NOT_UPGRADING" - * "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" - * "FABRIC_E_INVALID_CONFIGURATION" - * "FABRIC_E_INVALID_NAME_URI" - * "FABRIC_E_PATH_TOO_LONG" - * "FABRIC_E_KEY_TOO_LARGE" - * "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" - * "FABRIC_E_INVALID_ATOMIC_GROUP" - * "FABRIC_E_VALUE_EMPTY" - * "FABRIC_E_BACKUP_IS_ENABLED" - * "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" - * "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" - * "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" - * "E_INVALIDARG" - - * - Possible values of the error code for HTTP status code 404 (Not Found) - - - * "FABRIC_E_NODE_NOT_FOUND" - * "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" - * "FABRIC_E_APPLICATION_NOT_FOUND" - * "FABRIC_E_SERVICE_TYPE_NOT_FOUND" - * "FABRIC_E_SERVICE_DOES_NOT_EXIST" - * "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" - * "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" - * "FABRIC_E_PARTITION_NOT_FOUND" - * "FABRIC_E_REPLICA_DOES_NOT_EXIST" - * "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" - * "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" - * "FABRIC_E_DIRECTORY_NOT_FOUND" - * "FABRIC_E_FABRIC_VERSION_NOT_FOUND" - * "FABRIC_E_FILE_NOT_FOUND" - * "FABRIC_E_NAME_DOES_NOT_EXIST" - * "FABRIC_E_PROPERTY_DOES_NOT_EXIST" - * "FABRIC_E_ENUMERATION_COMPLETED" - * "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" - * "FABRIC_E_KEY_NOT_FOUND" - * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" - * "FABRIC_E_BACKUP_NOT_ENABLED" - * "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" - * "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" - * "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" - - * - Possible values of the error code for HTTP status code 409 (Conflict) - - - * "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" - * "FABRIC_E_APPLICATION_ALREADY_EXISTS" - * "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" - * "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" - * "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" - * "FABRIC_E_SERVICE_ALREADY_EXISTS" - * "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" - * "FABRIC_E_APPLICATION_TYPE_IN_USE" - * "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" - * "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" - * "FABRIC_E_FABRIC_VERSION_IN_USE" - * "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" - * "FABRIC_E_NAME_ALREADY_EXISTS" - * "FABRIC_E_NAME_NOT_EMPTY" - * "FABRIC_E_PROPERTY_CHECK_FAILED" - * "FABRIC_E_SERVICE_METADATA_MISMATCH" - * "FABRIC_E_SERVICE_TYPE_MISMATCH" - * "FABRIC_E_HEALTH_STALE_REPORT" - * "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" - * "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" - * "FABRIC_E_INSTANCE_ID_MISMATCH" - * "FABRIC_E_BACKUP_IN_PROGRESS" - * "FABRIC_E_RESTORE_IN_PROGRESS" - * "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" - - * - Possible values of the error code for HTTP status code 413 (Request Entity Too Large) - - - * "FABRIC_E_VALUE_TOO_LARGE" - - * - Possible values of the error code for HTTP status code 500 (Internal Server Error) - - - * "FABRIC_E_NODE_IS_UP" - * "E_FAIL" - * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" - * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" - * "FABRIC_E_VOLUME_ALREADY_EXISTS" - * "FABRIC_E_VOLUME_NOT_FOUND" - * "SerializationError" - * "FABRIC_E_CERTIFICATE_NOT_FOUND" - - * - Possible values of the error code for HTTP status code 503 (Service Unavailable) - - - * "FABRIC_E_NO_WRITE_QUORUM" - * "FABRIC_E_NOT_PRIMARY" - * "FABRIC_E_NOT_READY" - * "FABRIC_E_RECONFIGURATION_PENDING" - * "FABRIC_E_SERVICE_OFFLINE" - * "E_ABORT" - * "FABRIC_E_VALUE_TOO_LARGE" - - * - Possible values of the error code for HTTP status code 504 (Gateway Timeout) - - - * "FABRIC_E_COMMUNICATION_ERROR" - * "FABRIC_E_OPERATION_NOT_COMPLETE" - * "FABRIC_E_TIMEOUT". Possible values include: "FABRIC_E_INVALID_PARTITION_KEY", - "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", - "FABRIC_E_APPLICATION_NOT_UPGRADING", "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", - "FABRIC_E_FABRIC_NOT_UPGRADING", "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", - "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", "FABRIC_E_PATH_TOO_LONG", - "FABRIC_E_KEY_TOO_LARGE", "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", - "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", "FABRIC_E_NODE_NOT_FOUND", - "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", "FABRIC_E_APPLICATION_NOT_FOUND", - "FABRIC_E_SERVICE_TYPE_NOT_FOUND", "FABRIC_E_SERVICE_DOES_NOT_EXIST", - "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", - "FABRIC_E_PARTITION_NOT_FOUND", "FABRIC_E_REPLICA_DOES_NOT_EXIST", - "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", - "FABRIC_E_DIRECTORY_NOT_FOUND", "FABRIC_E_FABRIC_VERSION_NOT_FOUND", "FABRIC_E_FILE_NOT_FOUND", - "FABRIC_E_NAME_DOES_NOT_EXIST", "FABRIC_E_PROPERTY_DOES_NOT_EXIST", - "FABRIC_E_ENUMERATION_COMPLETED", "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", - "FABRIC_E_KEY_NOT_FOUND", "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", "FABRIC_E_APPLICATION_ALREADY_EXISTS", - "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", - "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", - "FABRIC_E_SERVICE_ALREADY_EXISTS", "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", - "FABRIC_E_APPLICATION_TYPE_IN_USE", "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", - "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", "FABRIC_E_FABRIC_VERSION_IN_USE", - "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", "FABRIC_E_NAME_ALREADY_EXISTS", - "FABRIC_E_NAME_NOT_EMPTY", "FABRIC_E_PROPERTY_CHECK_FAILED", - "FABRIC_E_SERVICE_METADATA_MISMATCH", "FABRIC_E_SERVICE_TYPE_MISMATCH", - "FABRIC_E_HEALTH_STALE_REPORT", "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", - "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", - "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", "FABRIC_E_NOT_PRIMARY", - "FABRIC_E_NOT_READY", "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", - "E_ABORT", "FABRIC_E_COMMUNICATION_ERROR", "FABRIC_E_OPERATION_NOT_COMPLETE", - "FABRIC_E_TIMEOUT", "FABRIC_E_NODE_IS_UP", "E_FAIL", "FABRIC_E_BACKUP_IS_ENABLED", - "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", - "FABRIC_E_BACKUP_NOT_ENABLED", "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", "FABRIC_E_BACKUP_IN_PROGRESS", - "FABRIC_E_RESTORE_IN_PROGRESS", "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", - "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", "FABRIC_E_VOLUME_ALREADY_EXISTS", - "FABRIC_E_VOLUME_NOT_FOUND", "SerializationError", - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", "FABRIC_E_CERTIFICATE_NOT_FOUND". - :paramtype code: str or ~azure.servicefabric.models.FabricErrorCodes - :keyword message: Error message. - :paramtype message: str - """ - super(FabricErrorError, self).__init__(**kwargs) - self.code = kwargs['code'] - self.message = kwargs.get('message', None) - - -class PropertyBatchInfo(msrest.serialization.Model): - """Information about the results of a property batch. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: FailedPropertyBatchInfo, SuccessfulPropertyBatchInfo. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch info, determined by the results of a property - batch. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Successful", "Failed". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchInfoKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Failed': 'FailedPropertyBatchInfo', 'Successful': 'SuccessfulPropertyBatchInfo'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(PropertyBatchInfo, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class FailedPropertyBatchInfo(PropertyBatchInfo): - """Derived from PropertyBatchInfo. Represents the property batch failing. Contains information about the specific batch failure. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch info, determined by the results of a property - batch. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Successful", "Failed". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchInfoKind - :ivar error_message: The error message of the failed operation. Describes the exception thrown - due to the first unsuccessful operation in the property batch. - :vartype error_message: str - :ivar operation_index: The index of the unsuccessful operation in the property batch. - :vartype operation_index: int - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'error_message': {'key': 'ErrorMessage', 'type': 'str'}, - 'operation_index': {'key': 'OperationIndex', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword error_message: The error message of the failed operation. Describes the exception - thrown due to the first unsuccessful operation in the property batch. - :paramtype error_message: str - :keyword operation_index: The index of the unsuccessful operation in the property batch. - :paramtype operation_index: int - """ - super(FailedPropertyBatchInfo, self).__init__(**kwargs) - self.kind = 'Failed' # type: str - self.error_message = kwargs.get('error_message', None) - self.operation_index = kwargs.get('operation_index', None) - - -class FailedUpgradeDomainProgressObject(msrest.serialization.Model): - """The detailed upgrade progress for nodes in the current upgrade domain at the point of failure. Not applicable to node-by-node upgrades. - - :ivar domain_name: The name of the upgrade domain. - :vartype domain_name: str - :ivar node_upgrade_progress_list: List of upgrading nodes and their statuses. - :vartype node_upgrade_progress_list: list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword domain_name: The name of the upgrade domain. - :paramtype domain_name: str - :keyword node_upgrade_progress_list: List of upgrading nodes and their statuses. - :paramtype node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - super(FailedUpgradeDomainProgressObject, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) - - -class FailureUpgradeDomainProgressInfo(msrest.serialization.Model): - """Information about the upgrade domain progress at the time of upgrade failure. - - :ivar domain_name: The name of the upgrade domain. - :vartype domain_name: str - :ivar node_upgrade_progress_list: List of upgrading nodes and their statuses. - :vartype node_upgrade_progress_list: list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword domain_name: The name of the upgrade domain. - :paramtype domain_name: str - :keyword node_upgrade_progress_list: List of upgrading nodes and their statuses. - :paramtype node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - super(FailureUpgradeDomainProgressInfo, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.node_upgrade_progress_list = kwargs.get('node_upgrade_progress_list', None) - - -class FileInfo(msrest.serialization.Model): - """Information about a image store file. - - :ivar file_size: The size of file in bytes. - :vartype file_size: str - :ivar file_version: Information about the version of image store file. - :vartype file_version: ~azure.servicefabric.models.FileVersion - :ivar modified_date: The date and time when the image store file was last modified. - :vartype modified_date: ~datetime.datetime - :ivar store_relative_path: The file path relative to the image store root path. - :vartype store_relative_path: str - """ - - _attribute_map = { - 'file_size': {'key': 'FileSize', 'type': 'str'}, - 'file_version': {'key': 'FileVersion', 'type': 'FileVersion'}, - 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword file_size: The size of file in bytes. - :paramtype file_size: str - :keyword file_version: Information about the version of image store file. - :paramtype file_version: ~azure.servicefabric.models.FileVersion - :keyword modified_date: The date and time when the image store file was last modified. - :paramtype modified_date: ~datetime.datetime - :keyword store_relative_path: The file path relative to the image store root path. - :paramtype store_relative_path: str - """ - super(FileInfo, self).__init__(**kwargs) - self.file_size = kwargs.get('file_size', None) - self.file_version = kwargs.get('file_version', None) - self.modified_date = kwargs.get('modified_date', None) - self.store_relative_path = kwargs.get('store_relative_path', None) - - -class FileShareBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for file share storage used for storing or enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant - filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", - "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". - :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind - :ivar friendly_name: Friendly name for this backup storage. - :vartype friendly_name: str - :ivar path: Required. UNC path of the file share where to store or enumerate backups from. - :vartype path: str - :ivar primary_user_name: Primary user name to access the file share. - :vartype primary_user_name: str - :ivar primary_password: Primary password to access the share location. - :vartype primary_password: str - :ivar secondary_user_name: Secondary user name to access the file share. - :vartype secondary_user_name: str - :ivar secondary_password: Secondary password to access the share location. - :vartype secondary_password: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'path': {'required': True}, - } - - _attribute_map = { - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'path': {'key': 'Path', 'type': 'str'}, - 'primary_user_name': {'key': 'PrimaryUserName', 'type': 'str'}, - 'primary_password': {'key': 'PrimaryPassword', 'type': 'str'}, - 'secondary_user_name': {'key': 'SecondaryUserName', 'type': 'str'}, - 'secondary_password': {'key': 'SecondaryPassword', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword friendly_name: Friendly name for this backup storage. - :paramtype friendly_name: str - :keyword path: Required. UNC path of the file share where to store or enumerate backups from. - :paramtype path: str - :keyword primary_user_name: Primary user name to access the file share. - :paramtype primary_user_name: str - :keyword primary_password: Primary password to access the share location. - :paramtype primary_password: str - :keyword secondary_user_name: Secondary user name to access the file share. - :paramtype secondary_user_name: str - :keyword secondary_password: Secondary password to access the share location. - :paramtype secondary_password: str - """ - super(FileShareBackupStorageDescription, self).__init__(**kwargs) - self.storage_kind = 'FileShare' # type: str - self.path = kwargs['path'] - self.primary_user_name = kwargs.get('primary_user_name', None) - self.primary_password = kwargs.get('primary_password', None) - self.secondary_user_name = kwargs.get('secondary_user_name', None) - self.secondary_password = kwargs.get('secondary_password', None) - - -class FileVersion(msrest.serialization.Model): - """Information about the version of image store file. - - :ivar version_number: The current image store version number for the file is used in image - store for checking whether it need to be updated. - :vartype version_number: str - :ivar epoch_data_loss_number: The epoch data loss number of image store replica when this file - entry was updated or created. - :vartype epoch_data_loss_number: str - :ivar epoch_configuration_number: The epoch configuration version number of the image store - replica when this file entry was created or updated. - :vartype epoch_configuration_number: str - """ - - _attribute_map = { - 'version_number': {'key': 'VersionNumber', 'type': 'str'}, - 'epoch_data_loss_number': {'key': 'EpochDataLossNumber', 'type': 'str'}, - 'epoch_configuration_number': {'key': 'EpochConfigurationNumber', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword version_number: The current image store version number for the file is used in image - store for checking whether it need to be updated. - :paramtype version_number: str - :keyword epoch_data_loss_number: The epoch data loss number of image store replica when this - file entry was updated or created. - :paramtype epoch_data_loss_number: str - :keyword epoch_configuration_number: The epoch configuration version number of the image store - replica when this file entry was created or updated. - :paramtype epoch_configuration_number: str - """ - super(FileVersion, self).__init__(**kwargs) - self.version_number = kwargs.get('version_number', None) - self.epoch_data_loss_number = kwargs.get('epoch_data_loss_number', None) - self.epoch_configuration_number = kwargs.get('epoch_configuration_number', None) - - -class FolderInfo(msrest.serialization.Model): - """Information about a image store folder. It includes how many files this folder contains and its image store relative path. - - :ivar store_relative_path: The remote location within image store. This path is relative to the - image store root. - :vartype store_relative_path: str - :ivar file_count: The number of files from within the image store folder. - :vartype file_count: str - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'file_count': {'key': 'FileCount', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword store_relative_path: The remote location within image store. This path is relative to - the image store root. - :paramtype store_relative_path: str - :keyword file_count: The number of files from within the image store folder. - :paramtype file_count: str - """ - super(FolderInfo, self).__init__(**kwargs) - self.store_relative_path = kwargs.get('store_relative_path', None) - self.file_count = kwargs.get('file_count', None) - - -class FolderSizeInfo(msrest.serialization.Model): - """Information of a image store folder size. - - :ivar store_relative_path: The remote location within image store. This path is relative to the - image store root. - :vartype store_relative_path: str - :ivar folder_size: The size of folder in bytes. - :vartype folder_size: str - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'folder_size': {'key': 'FolderSize', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword store_relative_path: The remote location within image store. This path is relative to - the image store root. - :paramtype store_relative_path: str - :keyword folder_size: The size of folder in bytes. - :paramtype folder_size: str - """ - super(FolderSizeInfo, self).__init__(**kwargs) - self.store_relative_path = kwargs.get('store_relative_path', None) - self.folder_size = kwargs.get('folder_size', None) - - -class FrequencyBasedBackupScheduleDescription(BackupScheduleDescription): - """Describes the frequency based backup schedule. - - All required parameters must be populated in order to send to Azure. - - :ivar schedule_kind: Required. The kind of backup schedule, time based or frequency - based.Constant filled by server. Possible values include: "Invalid", "TimeBased", - "FrequencyBased". - :vartype schedule_kind: str or ~azure.servicefabric.models.BackupScheduleKind - :ivar interval: Required. Defines the interval with which backups are periodically taken. It - should be specified in ISO8601 format. Timespan in seconds is not supported and will be ignored - while creating the policy. - :vartype interval: ~datetime.timedelta - """ - - _validation = { - 'schedule_kind': {'required': True}, - 'interval': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - 'interval': {'key': 'Interval', 'type': 'duration'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword interval: Required. Defines the interval with which backups are periodically taken. It - should be specified in ISO8601 format. Timespan in seconds is not supported and will be ignored - while creating the policy. - :paramtype interval: ~datetime.timedelta - """ - super(FrequencyBasedBackupScheduleDescription, self).__init__(**kwargs) - self.schedule_kind = 'FrequencyBased' # type: str - self.interval = kwargs['interval'] - - -class GatewayDestination(msrest.serialization.Model): - """Describes destination endpoint for routing traffic. - - All required parameters must be populated in order to send to Azure. - - :ivar application_name: Required. Name of the service fabric Mesh application. - :vartype application_name: str - :ivar service_name: Required. service that contains the endpoint. - :vartype service_name: str - :ivar endpoint_name: Required. name of the endpoint in the service. - :vartype endpoint_name: str - """ - - _validation = { - 'application_name': {'required': True}, - 'service_name': {'required': True}, - 'endpoint_name': {'required': True}, - } - - _attribute_map = { - 'application_name': {'key': 'applicationName', 'type': 'str'}, - 'service_name': {'key': 'serviceName', 'type': 'str'}, - 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword application_name: Required. Name of the service fabric Mesh application. - :paramtype application_name: str - :keyword service_name: Required. service that contains the endpoint. - :paramtype service_name: str - :keyword endpoint_name: Required. name of the endpoint in the service. - :paramtype endpoint_name: str - """ - super(GatewayDestination, self).__init__(**kwargs) - self.application_name = kwargs['application_name'] - self.service_name = kwargs['service_name'] - self.endpoint_name = kwargs['endpoint_name'] - - -class GatewayResourceDescription(msrest.serialization.Model): - """This type describes a gateway resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of the Gateway resource. - :vartype name: str - :ivar description: User readable description of the gateway. - :vartype description: str - :ivar source_network: Required. Network the gateway should listen on for requests. - :vartype source_network: ~azure.servicefabric.models.NetworkRef - :ivar destination_network: Required. Network that the Application is using. - :vartype destination_network: ~azure.servicefabric.models.NetworkRef - :ivar tcp: Configuration for tcp connectivity for this gateway. - :vartype tcp: list[~azure.servicefabric.models.TcpConfig] - :ivar http: Configuration for http connectivity for this gateway. - :vartype http: list[~azure.servicefabric.models.HttpConfig] - :ivar status: Status of the resource. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the gateway. - :vartype status_details: str - :ivar ip_address: IP address of the gateway. This is populated in the response and is ignored - for incoming requests. - :vartype ip_address: str - """ - - _validation = { - 'name': {'required': True}, - 'source_network': {'required': True}, - 'destination_network': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'ip_address': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'source_network': {'key': 'properties.sourceNetwork', 'type': 'NetworkRef'}, - 'destination_network': {'key': 'properties.destinationNetwork', 'type': 'NetworkRef'}, - 'tcp': {'key': 'properties.tcp', 'type': '[TcpConfig]'}, - 'http': {'key': 'properties.http', 'type': '[HttpConfig]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. Name of the Gateway resource. - :paramtype name: str - :keyword description: User readable description of the gateway. - :paramtype description: str - :keyword source_network: Required. Network the gateway should listen on for requests. - :paramtype source_network: ~azure.servicefabric.models.NetworkRef - :keyword destination_network: Required. Network that the Application is using. - :paramtype destination_network: ~azure.servicefabric.models.NetworkRef - :keyword tcp: Configuration for tcp connectivity for this gateway. - :paramtype tcp: list[~azure.servicefabric.models.TcpConfig] - :keyword http: Configuration for http connectivity for this gateway. - :paramtype http: list[~azure.servicefabric.models.HttpConfig] - """ - super(GatewayResourceDescription, self).__init__(**kwargs) - self.name = kwargs['name'] - self.description = kwargs.get('description', None) - self.source_network = kwargs['source_network'] - self.destination_network = kwargs['destination_network'] - self.tcp = kwargs.get('tcp', None) - self.http = kwargs.get('http', None) - self.status = None - self.status_details = None - self.ip_address = None - - -class GetBackupByStorageQueryDescription(msrest.serialization.Model): - """Describes additional filters to be applied, while listing backups, and backup storage details from where to fetch the backups. - - All required parameters must be populated in order to send to Azure. - - :ivar start_date_time_filter: Specifies the start date time in ISO8601 from which to enumerate - backups. If not specified, backups are enumerated from the beginning. - :vartype start_date_time_filter: ~datetime.datetime - :ivar end_date_time_filter: Specifies the end date time in ISO8601 till which to enumerate - backups. If not specified, backups are enumerated till the end. - :vartype end_date_time_filter: ~datetime.datetime - :ivar latest: If specified as true, gets the most recent backup (within the specified time - range) for every partition under the specified backup entity. - :vartype latest: bool - :ivar storage: Required. Describes the parameters for the backup storage from where to - enumerate backups. This is optional and by default backups are enumerated from the backup - storage where this backup entity is currently being backed up (as specified in backup policy). - This parameter is useful to be able to enumerate backups from another cluster where you may - intend to restore. - :vartype storage: ~azure.servicefabric.models.BackupStorageDescription - :ivar backup_entity: Required. Indicates the entity for which to enumerate backups. - :vartype backup_entity: ~azure.servicefabric.models.BackupEntity - """ - - _validation = { - 'storage': {'required': True}, - 'backup_entity': {'required': True}, - } - - _attribute_map = { - 'start_date_time_filter': {'key': 'StartDateTimeFilter', 'type': 'iso-8601'}, - 'end_date_time_filter': {'key': 'EndDateTimeFilter', 'type': 'iso-8601'}, - 'latest': {'key': 'Latest', 'type': 'bool'}, - 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, - 'backup_entity': {'key': 'BackupEntity', 'type': 'BackupEntity'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword start_date_time_filter: Specifies the start date time in ISO8601 from which to - enumerate backups. If not specified, backups are enumerated from the beginning. - :paramtype start_date_time_filter: ~datetime.datetime - :keyword end_date_time_filter: Specifies the end date time in ISO8601 till which to enumerate - backups. If not specified, backups are enumerated till the end. - :paramtype end_date_time_filter: ~datetime.datetime - :keyword latest: If specified as true, gets the most recent backup (within the specified time - range) for every partition under the specified backup entity. - :paramtype latest: bool - :keyword storage: Required. Describes the parameters for the backup storage from where to - enumerate backups. This is optional and by default backups are enumerated from the backup - storage where this backup entity is currently being backed up (as specified in backup policy). - This parameter is useful to be able to enumerate backups from another cluster where you may - intend to restore. - :paramtype storage: ~azure.servicefabric.models.BackupStorageDescription - :keyword backup_entity: Required. Indicates the entity for which to enumerate backups. - :paramtype backup_entity: ~azure.servicefabric.models.BackupEntity - """ - super(GetBackupByStorageQueryDescription, self).__init__(**kwargs) - self.start_date_time_filter = kwargs.get('start_date_time_filter', None) - self.end_date_time_filter = kwargs.get('end_date_time_filter', None) - self.latest = kwargs.get('latest', False) - self.storage = kwargs['storage'] - self.backup_entity = kwargs['backup_entity'] - - -class GetPropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that gets the specified property if it exists. -Note that if one PropertyBatchOperation in a PropertyBatch fails, -the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch operation, determined by the operation to be - performed. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind - :ivar property_name: Required. The name of the Service Fabric property. - :vartype property_name: str - :ivar include_value: Whether or not to return the property value with the metadata. - True if values should be returned with the metadata; False to return only property metadata. - :vartype include_value: bool - """ - - _validation = { - 'kind': {'required': True}, - 'property_name': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'include_value': {'key': 'IncludeValue', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword property_name: Required. The name of the Service Fabric property. - :paramtype property_name: str - :keyword include_value: Whether or not to return the property value with the metadata. - True if values should be returned with the metadata; False to return only property metadata. - :paramtype include_value: bool - """ - super(GetPropertyBatchOperation, self).__init__(**kwargs) - self.kind = 'Get' # type: str - self.include_value = kwargs.get('include_value', False) - - -class GuidPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Guid. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property, determined by the type of data. Following are the - possible values.Constant filled by server. Possible values include: "Invalid", "Binary", - "Int64", "Double", "String", "Guid". - :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind - :ivar data: Required. The data of the property value. - :vartype data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword data: Required. The data of the property value. - :paramtype data: str - """ - super(GuidPropertyValue, self).__init__(**kwargs) - self.kind = 'Guid' # type: str - self.data = kwargs['data'] - - -class HealthEvaluationWrapper(msrest.serialization.Model): - """Wrapper object for health evaluation. - - :ivar health_evaluation: Represents a health evaluation which describes the data and the - algorithm used by health manager to evaluate the health of an entity. - :vartype health_evaluation: ~azure.servicefabric.models.HealthEvaluation - """ - - _attribute_map = { - 'health_evaluation': {'key': 'HealthEvaluation', 'type': 'HealthEvaluation'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword health_evaluation: Represents a health evaluation which describes the data and the - algorithm used by health manager to evaluate the health of an entity. - :paramtype health_evaluation: ~azure.servicefabric.models.HealthEvaluation - """ - super(HealthEvaluationWrapper, self).__init__(**kwargs) - self.health_evaluation = kwargs.get('health_evaluation', None) - - -class HealthInformation(msrest.serialization.Model): - """Represents common health report information. It is included in all health reports sent to health store and in all health events returned by health queries. - - All required parameters must be populated in order to send to Azure. - - :ivar source_id: Required. The source name that identifies the client/watchdog/system component - that generated the health information. - :vartype source_id: str - :ivar property: Required. The property of the health information. An entity can have health - reports for different properties. - The property is a string and not a fixed enumeration to allow the reporter flexibility to - categorize the state condition that triggers the report. - For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available - disk on a node, - so it can report "AvailableDisk" property on that node. - The same reporter can monitor the node connectivity, so it can report a property - "Connectivity" on the same node. - In the health store, these reports are treated as separate health events for the specified - node. - - Together with the SourceId, the property uniquely identifies the health information. - :vartype property: str - :ivar health_state: Required. The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar time_to_live_in_milli_seconds: The duration for which this health report is valid. This - field uses ISO8601 format for specifying the duration. - When clients report periodically, they should send reports with higher frequency than time to - live. - If clients report on transition, they can set the time to live to infinite. - When time to live expires, the health event that contains the health information - is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if - RemoveWhenExpired false. - - If not specified, time to live defaults to infinite value. - :vartype time_to_live_in_milli_seconds: ~datetime.timedelta - :ivar description: The description of the health information. It represents free text used to - add human readable information about the report. - The maximum string length for the description is 4096 characters. - If the provided string is longer, it will be automatically truncated. - When truncated, the last characters of the description contain a marker "[Truncated]", and - total string size is 4096 characters. - The presence of the marker indicates to users that truncation occurred. - Note that when truncated, the description has less than 4096 characters from the original - string. - :vartype description: str - :ivar sequence_number: The sequence number for this health report as a numeric string. - The report sequence number is used by the health store to detect stale reports. - If not specified, a sequence number is auto-generated by the health client when a report is - added. - :vartype sequence_number: str - :ivar remove_when_expired: Value that indicates whether the report is removed from health store - when it expires. - If set to true, the report is removed from the health store after it expires. - If set to false, the report is treated as an error when expired. The value of this property is - false by default. - When clients report periodically, they should set RemoveWhenExpired false (default). - This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated - at error when the health report expires. - This flags the entity as being in Error health state. - :vartype remove_when_expired: bool - :ivar health_report_id: A health report ID which identifies the health report and can be used - to find more detailed information about a specific health event at - aka.ms/sfhealthid. - :vartype health_report_id: str - """ - - _validation = { - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - } - - _attribute_map = { - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword source_id: Required. The source name that identifies the client/watchdog/system - component that generated the health information. - :paramtype source_id: str - :keyword property: Required. The property of the health information. An entity can have health - reports for different properties. - The property is a string and not a fixed enumeration to allow the reporter flexibility to - categorize the state condition that triggers the report. - For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available - disk on a node, - so it can report "AvailableDisk" property on that node. - The same reporter can monitor the node connectivity, so it can report a property - "Connectivity" on the same node. - In the health store, these reports are treated as separate health events for the specified - node. - - Together with the SourceId, the property uniquely identifies the health information. - :paramtype property: str - :keyword health_state: Required. The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword time_to_live_in_milli_seconds: The duration for which this health report is valid. - This field uses ISO8601 format for specifying the duration. - When clients report periodically, they should send reports with higher frequency than time to - live. - If clients report on transition, they can set the time to live to infinite. - When time to live expires, the health event that contains the health information - is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if - RemoveWhenExpired false. - - If not specified, time to live defaults to infinite value. - :paramtype time_to_live_in_milli_seconds: ~datetime.timedelta - :keyword description: The description of the health information. It represents free text used - to add human readable information about the report. - The maximum string length for the description is 4096 characters. - If the provided string is longer, it will be automatically truncated. - When truncated, the last characters of the description contain a marker "[Truncated]", and - total string size is 4096 characters. - The presence of the marker indicates to users that truncation occurred. - Note that when truncated, the description has less than 4096 characters from the original - string. - :paramtype description: str - :keyword sequence_number: The sequence number for this health report as a numeric string. - The report sequence number is used by the health store to detect stale reports. - If not specified, a sequence number is auto-generated by the health client when a report is - added. - :paramtype sequence_number: str - :keyword remove_when_expired: Value that indicates whether the report is removed from health - store when it expires. - If set to true, the report is removed from the health store after it expires. - If set to false, the report is treated as an error when expired. The value of this property is - false by default. - When clients report periodically, they should set RemoveWhenExpired false (default). - This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated - at error when the health report expires. - This flags the entity as being in Error health state. - :paramtype remove_when_expired: bool - :keyword health_report_id: A health report ID which identifies the health report and can be - used to find more detailed information about a specific health event at - aka.ms/sfhealthid. - :paramtype health_report_id: str - """ - super(HealthInformation, self).__init__(**kwargs) - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_in_milli_seconds = kwargs.get('time_to_live_in_milli_seconds', None) - self.description = kwargs.get('description', None) - self.sequence_number = kwargs.get('sequence_number', None) - self.remove_when_expired = kwargs.get('remove_when_expired', None) - self.health_report_id = kwargs.get('health_report_id', None) - - -class HealthEvent(HealthInformation): - """Represents health information reported on a health entity, such as cluster, application or node, with additional metadata added by the Health Manager. - - All required parameters must be populated in order to send to Azure. - - :ivar source_id: Required. The source name that identifies the client/watchdog/system component - that generated the health information. - :vartype source_id: str - :ivar property: Required. The property of the health information. An entity can have health - reports for different properties. - The property is a string and not a fixed enumeration to allow the reporter flexibility to - categorize the state condition that triggers the report. - For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available - disk on a node, - so it can report "AvailableDisk" property on that node. - The same reporter can monitor the node connectivity, so it can report a property - "Connectivity" on the same node. - In the health store, these reports are treated as separate health events for the specified - node. - - Together with the SourceId, the property uniquely identifies the health information. - :vartype property: str - :ivar health_state: Required. The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar time_to_live_in_milli_seconds: The duration for which this health report is valid. This - field uses ISO8601 format for specifying the duration. - When clients report periodically, they should send reports with higher frequency than time to - live. - If clients report on transition, they can set the time to live to infinite. - When time to live expires, the health event that contains the health information - is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if - RemoveWhenExpired false. - - If not specified, time to live defaults to infinite value. - :vartype time_to_live_in_milli_seconds: ~datetime.timedelta - :ivar description: The description of the health information. It represents free text used to - add human readable information about the report. - The maximum string length for the description is 4096 characters. - If the provided string is longer, it will be automatically truncated. - When truncated, the last characters of the description contain a marker "[Truncated]", and - total string size is 4096 characters. - The presence of the marker indicates to users that truncation occurred. - Note that when truncated, the description has less than 4096 characters from the original - string. - :vartype description: str - :ivar sequence_number: The sequence number for this health report as a numeric string. - The report sequence number is used by the health store to detect stale reports. - If not specified, a sequence number is auto-generated by the health client when a report is - added. - :vartype sequence_number: str - :ivar remove_when_expired: Value that indicates whether the report is removed from health store - when it expires. - If set to true, the report is removed from the health store after it expires. - If set to false, the report is treated as an error when expired. The value of this property is - false by default. - When clients report periodically, they should set RemoveWhenExpired false (default). - This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated - at error when the health report expires. - This flags the entity as being in Error health state. - :vartype remove_when_expired: bool - :ivar health_report_id: A health report ID which identifies the health report and can be used - to find more detailed information about a specific health event at - aka.ms/sfhealthid. - :vartype health_report_id: str - :ivar is_expired: Returns true if the health event is expired, otherwise false. - :vartype is_expired: bool - :ivar source_utc_timestamp: The date and time when the health report was sent by the source. - :vartype source_utc_timestamp: ~datetime.datetime - :ivar last_modified_utc_timestamp: The date and time when the health report was last modified - by the health store. - :vartype last_modified_utc_timestamp: ~datetime.datetime - :ivar last_ok_transition_at: If the current health state is 'Ok', this property returns the - time at which the health report was first reported with 'Ok'. - For periodic reporting, many reports with the same state may have been generated. - This property returns the date and time when the first 'Ok' health report was received. - - If the current health state is 'Error' or 'Warning', returns the date and time at which the - health state was last in 'Ok', before transitioning to a different state. - - If the health state was never 'Ok', the value will be zero date-time. - :vartype last_ok_transition_at: ~datetime.datetime - :ivar last_warning_transition_at: If the current health state is 'Warning', this property - returns the time at which the health report was first reported with 'Warning'. For periodic - reporting, many reports with the same state may have been generated however, this property - returns only the date and time at the first 'Warning' health report was received. - - If the current health state is 'Ok' or 'Error', returns the date and time at which the health - state was last in 'Warning', before transitioning to a different state. - - If the health state was never 'Warning', the value will be zero date-time. - :vartype last_warning_transition_at: ~datetime.datetime - :ivar last_error_transition_at: If the current health state is 'Error', this property returns - the time at which the health report was first reported with 'Error'. For periodic reporting, - many reports with the same state may have been generated however, this property returns only - the date and time at the first 'Error' health report was received. - - If the current health state is 'Ok' or 'Warning', returns the date and time at which the - health state was last in 'Error', before transitioning to a different state. - - If the health state was never 'Error', the value will be zero date-time. - :vartype last_error_transition_at: ~datetime.datetime - """ - - _validation = { - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - } - - _attribute_map = { - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, - 'is_expired': {'key': 'IsExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, - 'last_ok_transition_at': {'key': 'LastOkTransitionAt', 'type': 'iso-8601'}, - 'last_warning_transition_at': {'key': 'LastWarningTransitionAt', 'type': 'iso-8601'}, - 'last_error_transition_at': {'key': 'LastErrorTransitionAt', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword source_id: Required. The source name that identifies the client/watchdog/system - component that generated the health information. - :paramtype source_id: str - :keyword property: Required. The property of the health information. An entity can have health - reports for different properties. - The property is a string and not a fixed enumeration to allow the reporter flexibility to - categorize the state condition that triggers the report. - For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available - disk on a node, - so it can report "AvailableDisk" property on that node. - The same reporter can monitor the node connectivity, so it can report a property - "Connectivity" on the same node. - In the health store, these reports are treated as separate health events for the specified - node. - - Together with the SourceId, the property uniquely identifies the health information. - :paramtype property: str - :keyword health_state: Required. The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword time_to_live_in_milli_seconds: The duration for which this health report is valid. - This field uses ISO8601 format for specifying the duration. - When clients report periodically, they should send reports with higher frequency than time to - live. - If clients report on transition, they can set the time to live to infinite. - When time to live expires, the health event that contains the health information - is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if - RemoveWhenExpired false. - - If not specified, time to live defaults to infinite value. - :paramtype time_to_live_in_milli_seconds: ~datetime.timedelta - :keyword description: The description of the health information. It represents free text used - to add human readable information about the report. - The maximum string length for the description is 4096 characters. - If the provided string is longer, it will be automatically truncated. - When truncated, the last characters of the description contain a marker "[Truncated]", and - total string size is 4096 characters. - The presence of the marker indicates to users that truncation occurred. - Note that when truncated, the description has less than 4096 characters from the original - string. - :paramtype description: str - :keyword sequence_number: The sequence number for this health report as a numeric string. - The report sequence number is used by the health store to detect stale reports. - If not specified, a sequence number is auto-generated by the health client when a report is - added. - :paramtype sequence_number: str - :keyword remove_when_expired: Value that indicates whether the report is removed from health - store when it expires. - If set to true, the report is removed from the health store after it expires. - If set to false, the report is treated as an error when expired. The value of this property is - false by default. - When clients report periodically, they should set RemoveWhenExpired false (default). - This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated - at error when the health report expires. - This flags the entity as being in Error health state. - :paramtype remove_when_expired: bool - :keyword health_report_id: A health report ID which identifies the health report and can be - used to find more detailed information about a specific health event at - aka.ms/sfhealthid. - :paramtype health_report_id: str - :keyword is_expired: Returns true if the health event is expired, otherwise false. - :paramtype is_expired: bool - :keyword source_utc_timestamp: The date and time when the health report was sent by the source. - :paramtype source_utc_timestamp: ~datetime.datetime - :keyword last_modified_utc_timestamp: The date and time when the health report was last - modified by the health store. - :paramtype last_modified_utc_timestamp: ~datetime.datetime - :keyword last_ok_transition_at: If the current health state is 'Ok', this property returns the - time at which the health report was first reported with 'Ok'. - For periodic reporting, many reports with the same state may have been generated. - This property returns the date and time when the first 'Ok' health report was received. - - If the current health state is 'Error' or 'Warning', returns the date and time at which the - health state was last in 'Ok', before transitioning to a different state. - - If the health state was never 'Ok', the value will be zero date-time. - :paramtype last_ok_transition_at: ~datetime.datetime - :keyword last_warning_transition_at: If the current health state is 'Warning', this property - returns the time at which the health report was first reported with 'Warning'. For periodic - reporting, many reports with the same state may have been generated however, this property - returns only the date and time at the first 'Warning' health report was received. - - If the current health state is 'Ok' or 'Error', returns the date and time at which the health - state was last in 'Warning', before transitioning to a different state. - - If the health state was never 'Warning', the value will be zero date-time. - :paramtype last_warning_transition_at: ~datetime.datetime - :keyword last_error_transition_at: If the current health state is 'Error', this property - returns the time at which the health report was first reported with 'Error'. For periodic - reporting, many reports with the same state may have been generated however, this property - returns only the date and time at the first 'Error' health report was received. - - If the current health state is 'Ok' or 'Warning', returns the date and time at which the - health state was last in 'Error', before transitioning to a different state. - - If the health state was never 'Error', the value will be zero date-time. - :paramtype last_error_transition_at: ~datetime.datetime - """ - super(HealthEvent, self).__init__(**kwargs) - self.is_expired = kwargs.get('is_expired', None) - self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None) - self.last_modified_utc_timestamp = kwargs.get('last_modified_utc_timestamp', None) - self.last_ok_transition_at = kwargs.get('last_ok_transition_at', None) - self.last_warning_transition_at = kwargs.get('last_warning_transition_at', None) - self.last_error_transition_at = kwargs.get('last_error_transition_at', None) - - -class HealthStateCount(msrest.serialization.Model): - """Represents information about how many health entities are in Ok, Warning and Error health state. - - :ivar ok_count: The number of health entities with aggregated health state Ok. - :vartype ok_count: long - :ivar warning_count: The number of health entities with aggregated health state Warning. - :vartype warning_count: long - :ivar error_count: The number of health entities with aggregated health state Error. - :vartype error_count: long - """ - - _validation = { - 'ok_count': {'minimum': 0}, - 'warning_count': {'minimum': 0}, - 'error_count': {'minimum': 0}, - } - - _attribute_map = { - 'ok_count': {'key': 'OkCount', 'type': 'long'}, - 'warning_count': {'key': 'WarningCount', 'type': 'long'}, - 'error_count': {'key': 'ErrorCount', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword ok_count: The number of health entities with aggregated health state Ok. - :paramtype ok_count: long - :keyword warning_count: The number of health entities with aggregated health state Warning. - :paramtype warning_count: long - :keyword error_count: The number of health entities with aggregated health state Error. - :paramtype error_count: long - """ - super(HealthStateCount, self).__init__(**kwargs) - self.ok_count = kwargs.get('ok_count', None) - self.warning_count = kwargs.get('warning_count', None) - self.error_count = kwargs.get('error_count', None) - - -class HealthStatistics(msrest.serialization.Model): - """The health statistics of an entity, returned as part of the health query result when the query description is configured to include statistics. -The statistics include health state counts for all children types of the current entity. -For example, for cluster, the health statistics include health state counts for nodes, applications, services, partitions, replicas, deployed applications and deployed service packages. -For partition, the health statistics include health counts for replicas. - - :ivar health_state_count_list: List of health state counts per entity kind, which keeps track - of how many children of the queried entity are in Ok, Warning and Error state. - :vartype health_state_count_list: list[~azure.servicefabric.models.EntityKindHealthStateCount] - """ - - _attribute_map = { - 'health_state_count_list': {'key': 'HealthStateCountList', 'type': '[EntityKindHealthStateCount]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword health_state_count_list: List of health state counts per entity kind, which keeps - track of how many children of the queried entity are in Ok, Warning and Error state. - :paramtype health_state_count_list: - list[~azure.servicefabric.models.EntityKindHealthStateCount] - """ - super(HealthStatistics, self).__init__(**kwargs) - self.health_state_count_list = kwargs.get('health_state_count_list', None) - - -class HttpConfig(msrest.serialization.Model): - """Describes the http configuration for external connectivity for this network. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. http gateway config name. - :vartype name: str - :ivar port: Required. Specifies the port at which the service endpoint below needs to be - exposed. - :vartype port: int - :ivar hosts: Required. description for routing. - :vartype hosts: list[~azure.servicefabric.models.HttpHostConfig] - """ - - _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'hosts': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'hosts': {'key': 'hosts', 'type': '[HttpHostConfig]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. http gateway config name. - :paramtype name: str - :keyword port: Required. Specifies the port at which the service endpoint below needs to be - exposed. - :paramtype port: int - :keyword hosts: Required. description for routing. - :paramtype hosts: list[~azure.servicefabric.models.HttpHostConfig] - """ - super(HttpConfig, self).__init__(**kwargs) - self.name = kwargs['name'] - self.port = kwargs['port'] - self.hosts = kwargs['hosts'] - - -class HttpHostConfig(msrest.serialization.Model): - """Describes the hostname properties for http routing. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. http hostname config name. - :vartype name: str - :ivar routes: Required. Route information to use for routing. Routes are processed in the order - they are specified. Specify routes that are more specific before routes that can handle general - cases. - :vartype routes: list[~azure.servicefabric.models.HttpRouteConfig] - """ - - _validation = { - 'name': {'required': True}, - 'routes': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'routes': {'key': 'routes', 'type': '[HttpRouteConfig]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. http hostname config name. - :paramtype name: str - :keyword routes: Required. Route information to use for routing. Routes are processed in the - order they are specified. Specify routes that are more specific before routes that can handle - general cases. - :paramtype routes: list[~azure.servicefabric.models.HttpRouteConfig] - """ - super(HttpHostConfig, self).__init__(**kwargs) - self.name = kwargs['name'] - self.routes = kwargs['routes'] - - -class HttpRouteConfig(msrest.serialization.Model): - """Describes the hostname properties for http routing. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. http route name. - :vartype name: str - :ivar match: Required. Describes a rule for http route matching. - :vartype match: ~azure.servicefabric.models.HttpRouteMatchRule - :ivar destination: Required. Describes destination endpoint for routing traffic. - :vartype destination: ~azure.servicefabric.models.GatewayDestination - """ - - _validation = { - 'name': {'required': True}, - 'match': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'match': {'key': 'match', 'type': 'HttpRouteMatchRule'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. http route name. - :paramtype name: str - :keyword match: Required. Describes a rule for http route matching. - :paramtype match: ~azure.servicefabric.models.HttpRouteMatchRule - :keyword destination: Required. Describes destination endpoint for routing traffic. - :paramtype destination: ~azure.servicefabric.models.GatewayDestination - """ - super(HttpRouteConfig, self).__init__(**kwargs) - self.name = kwargs['name'] - self.match = kwargs['match'] - self.destination = kwargs['destination'] - - -class HttpRouteMatchHeader(msrest.serialization.Model): - """Describes header information for http route matching. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of header to match in request. - :vartype name: str - :ivar value: Value of header to match in request. - :vartype value: str - :ivar type: how to match header value. Possible values include: "exact". - :vartype type: str or ~azure.servicefabric.models.HeaderMatchType - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. Name of header to match in request. - :paramtype name: str - :keyword value: Value of header to match in request. - :paramtype value: str - :keyword type: how to match header value. Possible values include: "exact". - :paramtype type: str or ~azure.servicefabric.models.HeaderMatchType - """ - super(HttpRouteMatchHeader, self).__init__(**kwargs) - self.name = kwargs['name'] - self.value = kwargs.get('value', None) - self.type = kwargs.get('type', None) - - -class HttpRouteMatchPath(msrest.serialization.Model): - """Path to match for routing. - - All required parameters must be populated in order to send to Azure. - - :ivar value: Required. Uri path to match for request. - :vartype value: str - :ivar rewrite: replacement string for matched part of the Uri. - :vartype rewrite: str - :ivar type: Required. how to match value in the Uri. Possible values include: "prefix". - :vartype type: str or ~azure.servicefabric.models.PathMatchType - """ - - _validation = { - 'value': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'rewrite': {'key': 'rewrite', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: Required. Uri path to match for request. - :paramtype value: str - :keyword rewrite: replacement string for matched part of the Uri. - :paramtype rewrite: str - :keyword type: Required. how to match value in the Uri. Possible values include: "prefix". - :paramtype type: str or ~azure.servicefabric.models.PathMatchType - """ - super(HttpRouteMatchPath, self).__init__(**kwargs) - self.value = kwargs['value'] - self.rewrite = kwargs.get('rewrite', None) - self.type = kwargs['type'] - - -class HttpRouteMatchRule(msrest.serialization.Model): - """Describes a rule for http route matching. - - All required parameters must be populated in order to send to Azure. - - :ivar path: Required. Path to match for routing. - :vartype path: ~azure.servicefabric.models.HttpRouteMatchPath - :ivar headers: headers and their values to match in request. - :vartype headers: list[~azure.servicefabric.models.HttpRouteMatchHeader] - """ - - _validation = { - 'path': {'required': True}, - } - - _attribute_map = { - 'path': {'key': 'path', 'type': 'HttpRouteMatchPath'}, - 'headers': {'key': 'headers', 'type': '[HttpRouteMatchHeader]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword path: Required. Path to match for routing. - :paramtype path: ~azure.servicefabric.models.HttpRouteMatchPath - :keyword headers: headers and their values to match in request. - :paramtype headers: list[~azure.servicefabric.models.HttpRouteMatchHeader] - """ - super(HttpRouteMatchRule, self).__init__(**kwargs) - self.path = kwargs['path'] - self.headers = kwargs.get('headers', None) - - -class IdentityDescription(msrest.serialization.Model): - """Information describing the identities associated with this application. - - All required parameters must be populated in order to send to Azure. - - :ivar token_service_endpoint: the endpoint for the token service managing this identity. - :vartype token_service_endpoint: str - :ivar type: Required. the types of identities associated with this resource; currently - restricted to 'SystemAssigned and UserAssigned'. - :vartype type: str - :ivar tenant_id: the identifier of the tenant containing the application's identity. - :vartype tenant_id: str - :ivar principal_id: the object identifier of the Service Principal of the identity associated - with this resource. - :vartype principal_id: str - :ivar user_assigned_identities: represents user assigned identities map. - :vartype user_assigned_identities: dict[str, - ~azure.servicefabric.models.IdentityItemDescription] - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'token_service_endpoint': {'key': 'tokenServiceEndpoint', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{IdentityItemDescription}'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword token_service_endpoint: the endpoint for the token service managing this identity. - :paramtype token_service_endpoint: str - :keyword type: Required. the types of identities associated with this resource; currently - restricted to 'SystemAssigned and UserAssigned'. - :paramtype type: str - :keyword tenant_id: the identifier of the tenant containing the application's identity. - :paramtype tenant_id: str - :keyword principal_id: the object identifier of the Service Principal of the identity - associated with this resource. - :paramtype principal_id: str - :keyword user_assigned_identities: represents user assigned identities map. - :paramtype user_assigned_identities: dict[str, - ~azure.servicefabric.models.IdentityItemDescription] - """ - super(IdentityDescription, self).__init__(**kwargs) - self.token_service_endpoint = kwargs.get('token_service_endpoint', None) - self.type = kwargs['type'] - self.tenant_id = kwargs.get('tenant_id', None) - self.principal_id = kwargs.get('principal_id', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - - -class IdentityItemDescription(msrest.serialization.Model): - """Describes a single user-assigned identity associated with the application. - - :ivar principal_id: the object identifier of the Service Principal which this identity - represents. - :vartype principal_id: str - :ivar client_id: the client identifier of the Service Principal which this identity represents. - :vartype client_id: str - """ - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword principal_id: the object identifier of the Service Principal which this identity - represents. - :paramtype principal_id: str - :keyword client_id: the client identifier of the Service Principal which this identity - represents. - :paramtype client_id: str - """ - super(IdentityItemDescription, self).__init__(**kwargs) - self.principal_id = kwargs.get('principal_id', None) - self.client_id = kwargs.get('client_id', None) - - -class ImageRegistryCredential(msrest.serialization.Model): - """Image registry credential. - - All required parameters must be populated in order to send to Azure. - - :ivar server: Required. Docker image registry server, without protocol such as ``http`` and - ``https``. - :vartype server: str - :ivar username: Required. The username for the private registry. - :vartype username: str - :ivar password_type: The type of the image registry password being given in password. Possible - values include: "ClearText", "KeyVaultReference", "SecretValueReference". Default value: - "ClearText". - :vartype password_type: str or ~azure.servicefabric.models.ImageRegistryPasswordType - :ivar password: The password for the private registry. The password is required for create or - update operations, however it is not returned in the get or list operations. Will be processed - based on the type provided. - :vartype password: str - """ - - _validation = { - 'server': {'required': True}, - 'username': {'required': True}, - } - - _attribute_map = { - 'server': {'key': 'server', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password_type': {'key': 'passwordType', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword server: Required. Docker image registry server, without protocol such as ``http`` and - ``https``. - :paramtype server: str - :keyword username: Required. The username for the private registry. - :paramtype username: str - :keyword password_type: The type of the image registry password being given in password. - Possible values include: "ClearText", "KeyVaultReference", "SecretValueReference". Default - value: "ClearText". - :paramtype password_type: str or ~azure.servicefabric.models.ImageRegistryPasswordType - :keyword password: The password for the private registry. The password is required for create - or update operations, however it is not returned in the get or list operations. Will be - processed based on the type provided. - :paramtype password: str - """ - super(ImageRegistryCredential, self).__init__(**kwargs) - self.server = kwargs['server'] - self.username = kwargs['username'] - self.password_type = kwargs.get('password_type', "ClearText") - self.password = kwargs.get('password', None) - - -class ImageStoreContent(msrest.serialization.Model): - """Information about the image store content. - - :ivar store_files: The list of image store file info objects represents files found under the - given image store relative path. - :vartype store_files: list[~azure.servicefabric.models.FileInfo] - :ivar store_folders: The list of image store folder info objects represents subfolders found - under the given image store relative path. - :vartype store_folders: list[~azure.servicefabric.models.FolderInfo] - """ - - _attribute_map = { - 'store_files': {'key': 'StoreFiles', 'type': '[FileInfo]'}, - 'store_folders': {'key': 'StoreFolders', 'type': '[FolderInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword store_files: The list of image store file info objects represents files found under - the given image store relative path. - :paramtype store_files: list[~azure.servicefabric.models.FileInfo] - :keyword store_folders: The list of image store folder info objects represents subfolders found - under the given image store relative path. - :paramtype store_folders: list[~azure.servicefabric.models.FolderInfo] - """ - super(ImageStoreContent, self).__init__(**kwargs) - self.store_files = kwargs.get('store_files', None) - self.store_folders = kwargs.get('store_folders', None) - - -class ImageStoreCopyDescription(msrest.serialization.Model): - """Information about how to copy image store content from one image store relative path to another image store relative path. - - All required parameters must be populated in order to send to Azure. - - :ivar remote_source: Required. The relative path of source image store content to be copied - from. - :vartype remote_source: str - :ivar remote_destination: Required. The relative path of destination image store content to be - copied to. - :vartype remote_destination: str - :ivar skip_files: The list of the file names to be skipped for copying. - :vartype skip_files: list[str] - :ivar check_mark_file: Indicates whether to check mark file during copying. The property is - true if checking mark file is required, false otherwise. The mark file is used to check whether - the folder is well constructed. If the property is true and mark file does not exist, the copy - is skipped. - :vartype check_mark_file: bool - """ - - _validation = { - 'remote_source': {'required': True}, - 'remote_destination': {'required': True}, - } - - _attribute_map = { - 'remote_source': {'key': 'RemoteSource', 'type': 'str'}, - 'remote_destination': {'key': 'RemoteDestination', 'type': 'str'}, - 'skip_files': {'key': 'SkipFiles', 'type': '[str]'}, - 'check_mark_file': {'key': 'CheckMarkFile', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword remote_source: Required. The relative path of source image store content to be copied - from. - :paramtype remote_source: str - :keyword remote_destination: Required. The relative path of destination image store content to - be copied to. - :paramtype remote_destination: str - :keyword skip_files: The list of the file names to be skipped for copying. - :paramtype skip_files: list[str] - :keyword check_mark_file: Indicates whether to check mark file during copying. The property is - true if checking mark file is required, false otherwise. The mark file is used to check whether - the folder is well constructed. If the property is true and mark file does not exist, the copy - is skipped. - :paramtype check_mark_file: bool - """ - super(ImageStoreCopyDescription, self).__init__(**kwargs) - self.remote_source = kwargs['remote_source'] - self.remote_destination = kwargs['remote_destination'] - self.skip_files = kwargs.get('skip_files', None) - self.check_mark_file = kwargs.get('check_mark_file', None) - - -class ImageStoreInfo(msrest.serialization.Model): - """Information about the ImageStore's resource usage. - - :ivar disk_info: disk capacity and available disk space on the node where the ImageStore - primary is placed. - :vartype disk_info: ~azure.servicefabric.models.DiskInfo - :ivar used_by_metadata: the ImageStore's file system usage for metadata. - :vartype used_by_metadata: ~azure.servicefabric.models.UsageInfo - :ivar used_by_staging: The ImageStore's file system usage for staging files that are being - uploaded. - :vartype used_by_staging: ~azure.servicefabric.models.UsageInfo - :ivar used_by_copy: the ImageStore's file system usage for copied application and cluster - packages. `Removing application and cluster packages - `_ will - free up this space. - :vartype used_by_copy: ~azure.servicefabric.models.UsageInfo - :ivar used_by_register: the ImageStore's file system usage for registered and cluster packages. - `Unregistering application - `_ - and `cluster packages - `_ - will free up this space. - :vartype used_by_register: ~azure.servicefabric.models.UsageInfo - """ - - _attribute_map = { - 'disk_info': {'key': 'DiskInfo', 'type': 'DiskInfo'}, - 'used_by_metadata': {'key': 'UsedByMetadata', 'type': 'UsageInfo'}, - 'used_by_staging': {'key': 'UsedByStaging', 'type': 'UsageInfo'}, - 'used_by_copy': {'key': 'UsedByCopy', 'type': 'UsageInfo'}, - 'used_by_register': {'key': 'UsedByRegister', 'type': 'UsageInfo'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword disk_info: disk capacity and available disk space on the node where the ImageStore - primary is placed. - :paramtype disk_info: ~azure.servicefabric.models.DiskInfo - :keyword used_by_metadata: the ImageStore's file system usage for metadata. - :paramtype used_by_metadata: ~azure.servicefabric.models.UsageInfo - :keyword used_by_staging: The ImageStore's file system usage for staging files that are being - uploaded. - :paramtype used_by_staging: ~azure.servicefabric.models.UsageInfo - :keyword used_by_copy: the ImageStore's file system usage for copied application and cluster - packages. `Removing application and cluster packages - `_ will - free up this space. - :paramtype used_by_copy: ~azure.servicefabric.models.UsageInfo - :keyword used_by_register: the ImageStore's file system usage for registered and cluster - packages. `Unregistering application - `_ - and `cluster packages - `_ - will free up this space. - :paramtype used_by_register: ~azure.servicefabric.models.UsageInfo - """ - super(ImageStoreInfo, self).__init__(**kwargs) - self.disk_info = kwargs.get('disk_info', None) - self.used_by_metadata = kwargs.get('used_by_metadata', None) - self.used_by_staging = kwargs.get('used_by_staging', None) - self.used_by_copy = kwargs.get('used_by_copy', None) - self.used_by_register = kwargs.get('used_by_register', None) - - -class SecretResourcePropertiesBase(msrest.serialization.Model): - """This type describes the properties of a secret resource, including its kind. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SecretResourceProperties. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Describes the kind of secret.Constant filled by server. Possible values - include: "inlinedValue", "keyVaultVersionedReference". - :vartype kind: str or ~azure.servicefabric.models.SecretKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'SecretResourceProperties': 'SecretResourceProperties'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(SecretResourcePropertiesBase, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class SecretResourceProperties(SecretResourcePropertiesBase): - """Describes the properties of a secret resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: InlinedValueSecretResourceProperties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Describes the kind of secret.Constant filled by server. Possible values - include: "inlinedValue", "keyVaultVersionedReference". - :vartype kind: str or ~azure.servicefabric.models.SecretKind - :ivar description: User readable description of the secret. - :vartype description: str - :ivar status: Status of the resource. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the secret. - :vartype status_details: str - :ivar content_type: The type of the content stored in the secret value. The value of this - property is opaque to Service Fabric. Once set, the value of this property cannot be changed. - :vartype content_type: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'inlinedValue': 'InlinedValueSecretResourceProperties'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword description: User readable description of the secret. - :paramtype description: str - :keyword content_type: The type of the content stored in the secret value. The value of this - property is opaque to Service Fabric. Once set, the value of this property cannot be changed. - :paramtype content_type: str - """ - super(SecretResourceProperties, self).__init__(**kwargs) - self.kind = 'SecretResourceProperties' # type: str - self.description = kwargs.get('description', None) - self.status = None - self.status_details = None - self.content_type = kwargs.get('content_type', None) - - -class InlinedValueSecretResourceProperties(SecretResourceProperties): - """Describes the properties of a secret resource whose value is provided explicitly as plaintext. The secret resource may have multiple values, each being uniquely versioned. The secret value of each version is stored encrypted, and delivered as plaintext into the context of applications referencing it. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Describes the kind of secret.Constant filled by server. Possible values - include: "inlinedValue", "keyVaultVersionedReference". - :vartype kind: str or ~azure.servicefabric.models.SecretKind - :ivar description: User readable description of the secret. - :vartype description: str - :ivar status: Status of the resource. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the secret. - :vartype status_details: str - :ivar content_type: The type of the content stored in the secret value. The value of this - property is opaque to Service Fabric. Once set, the value of this property cannot be changed. - :vartype content_type: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword description: User readable description of the secret. - :paramtype description: str - :keyword content_type: The type of the content stored in the secret value. The value of this - property is opaque to Service Fabric. Once set, the value of this property cannot be changed. - :paramtype content_type: str - """ - super(InlinedValueSecretResourceProperties, self).__init__(**kwargs) - self.kind = 'inlinedValue' # type: str - - -class InstanceLifecycleDescription(msrest.serialization.Model): - """Describes how the instance will behave. - - :ivar restore_replica_location_after_upgrade: If set to true, move/swap replica to original - location after upgrade. - :vartype restore_replica_location_after_upgrade: bool - """ - - _attribute_map = { - 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword restore_replica_location_after_upgrade: If set to true, move/swap replica to original - location after upgrade. - :paramtype restore_replica_location_after_upgrade: bool - """ - super(InstanceLifecycleDescription, self).__init__(**kwargs) - self.restore_replica_location_after_upgrade = kwargs.get('restore_replica_location_after_upgrade', None) - - -class Int64PropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Int64. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property, determined by the type of data. Following are the - possible values.Constant filled by server. Possible values include: "Invalid", "Binary", - "Int64", "Double", "String", "Guid". - :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind - :ivar data: Required. The data of the property value. - :vartype data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword data: Required. The data of the property value. - :paramtype data: str - """ - super(Int64PropertyValue, self).__init__(**kwargs) - self.kind = 'Int64' # type: str - self.data = kwargs['data'] - - -class PartitionInformation(msrest.serialization.Model): - """Information about the partition identity, partitioning scheme and keys supported by it. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Int64RangePartitionInformation, NamedPartitionInformation, SingletonPartitionInformation. - - All required parameters must be populated in order to send to Azure. - - :ivar service_partition_kind: Required. The kind of partitioning scheme used to partition the - service.Constant filled by server. Possible values include: "Invalid", "Singleton", - "Int64Range", "Named". - :vartype service_partition_kind: str or ~azure.servicefabric.models.ServicePartitionKind - :ivar id: An internal ID used by Service Fabric to uniquely identify a partition. This is a - randomly generated GUID when the service was created. The partition ID is unique and does not - change for the lifetime of the service. If the same service was deleted and recreated the IDs - of its partitions would be different. - :vartype id: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'str'}, - } - - _subtype_map = { - 'service_partition_kind': {'Int64Range': 'Int64RangePartitionInformation', 'Named': 'NamedPartitionInformation', 'Singleton': 'SingletonPartitionInformation'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: An internal ID used by Service Fabric to uniquely identify a partition. This is a - randomly generated GUID when the service was created. The partition ID is unique and does not - change for the lifetime of the service. If the same service was deleted and recreated the IDs - of its partitions would be different. - :paramtype id: str - """ - super(PartitionInformation, self).__init__(**kwargs) - self.service_partition_kind = None # type: Optional[str] - self.id = kwargs.get('id', None) - - -class Int64RangePartitionInformation(PartitionInformation): - """Describes the partition information for the integer range that is based on partition schemes. - - All required parameters must be populated in order to send to Azure. - - :ivar service_partition_kind: Required. The kind of partitioning scheme used to partition the - service.Constant filled by server. Possible values include: "Invalid", "Singleton", - "Int64Range", "Named". - :vartype service_partition_kind: str or ~azure.servicefabric.models.ServicePartitionKind - :ivar id: An internal ID used by Service Fabric to uniquely identify a partition. This is a - randomly generated GUID when the service was created. The partition ID is unique and does not - change for the lifetime of the service. If the same service was deleted and recreated the IDs - of its partitions would be different. - :vartype id: str - :ivar low_key: Specifies the minimum key value handled by this partition. - :vartype low_key: str - :ivar high_key: Specifies the maximum key value handled by this partition. - :vartype high_key: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'str'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: An internal ID used by Service Fabric to uniquely identify a partition. This is a - randomly generated GUID when the service was created. The partition ID is unique and does not - change for the lifetime of the service. If the same service was deleted and recreated the IDs - of its partitions would be different. - :paramtype id: str - :keyword low_key: Specifies the minimum key value handled by this partition. - :paramtype low_key: str - :keyword high_key: Specifies the maximum key value handled by this partition. - :paramtype high_key: str - """ - super(Int64RangePartitionInformation, self).__init__(**kwargs) - self.service_partition_kind = 'Int64Range' # type: str - self.low_key = kwargs.get('low_key', None) - self.high_key = kwargs.get('high_key', None) - - -class InvokeDataLossResult(msrest.serialization.Model): - """Represents information about an operation in a terminal state (Completed or Faulted). - - :ivar error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, - this is an error code indicating the reason. - :vartype error_code: int - :ivar selected_partition: This class returns information about the partition that the - user-induced operation acted upon. - :vartype selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, - this is an error code indicating the reason. - :paramtype error_code: int - :keyword selected_partition: This class returns information about the partition that the - user-induced operation acted upon. - :paramtype selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - super(InvokeDataLossResult, self).__init__(**kwargs) - self.error_code = kwargs.get('error_code', None) - self.selected_partition = kwargs.get('selected_partition', None) - - -class InvokeQuorumLossResult(msrest.serialization.Model): - """Represents information about an operation in a terminal state (Completed or Faulted). - - :ivar error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, - this is an error code indicating the reason. - :vartype error_code: int - :ivar selected_partition: This class returns information about the partition that the - user-induced operation acted upon. - :vartype selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, - this is an error code indicating the reason. - :paramtype error_code: int - :keyword selected_partition: This class returns information about the partition that the - user-induced operation acted upon. - :paramtype selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - super(InvokeQuorumLossResult, self).__init__(**kwargs) - self.error_code = kwargs.get('error_code', None) - self.selected_partition = kwargs.get('selected_partition', None) - - -class ReplicaStatusBase(msrest.serialization.Model): - """Information about the replica. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: KeyValueStoreReplicaStatus. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. - Possible values include: "Invalid", "KeyValueStore". - :vartype kind: str or ~azure.servicefabric.models.ReplicaKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'KeyValueStore': 'KeyValueStoreReplicaStatus'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ReplicaStatusBase, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class KeyValueStoreReplicaStatus(ReplicaStatusBase): - """Key value store related information for the replica. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. - Possible values include: "Invalid", "KeyValueStore". - :vartype kind: str or ~azure.servicefabric.models.ReplicaKind - :ivar database_row_count_estimate: Value indicating the estimated number of rows in the - underlying database. - :vartype database_row_count_estimate: str - :ivar database_logical_size_estimate: Value indicating the estimated size of the underlying - database. - :vartype database_logical_size_estimate: str - :ivar copy_notification_current_key_filter: Value indicating the latest key-prefix filter - applied to enumeration during the callback. Null if there is no pending callback. - :vartype copy_notification_current_key_filter: str - :ivar copy_notification_current_progress: Value indicating the latest number of keys enumerated - during the callback. 0 if there is no pending callback. - :vartype copy_notification_current_progress: str - :ivar status_details: Value indicating the current status details of the replica. - :vartype status_details: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'database_row_count_estimate': {'key': 'DatabaseRowCountEstimate', 'type': 'str'}, - 'database_logical_size_estimate': {'key': 'DatabaseLogicalSizeEstimate', 'type': 'str'}, - 'copy_notification_current_key_filter': {'key': 'CopyNotificationCurrentKeyFilter', 'type': 'str'}, - 'copy_notification_current_progress': {'key': 'CopyNotificationCurrentProgress', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword database_row_count_estimate: Value indicating the estimated number of rows in the - underlying database. - :paramtype database_row_count_estimate: str - :keyword database_logical_size_estimate: Value indicating the estimated size of the underlying - database. - :paramtype database_logical_size_estimate: str - :keyword copy_notification_current_key_filter: Value indicating the latest key-prefix filter - applied to enumeration during the callback. Null if there is no pending callback. - :paramtype copy_notification_current_key_filter: str - :keyword copy_notification_current_progress: Value indicating the latest number of keys - enumerated during the callback. 0 if there is no pending callback. - :paramtype copy_notification_current_progress: str - :keyword status_details: Value indicating the current status details of the replica. - :paramtype status_details: str - """ - super(KeyValueStoreReplicaStatus, self).__init__(**kwargs) - self.kind = 'KeyValueStore' # type: str - self.database_row_count_estimate = kwargs.get('database_row_count_estimate', None) - self.database_logical_size_estimate = kwargs.get('database_logical_size_estimate', None) - self.copy_notification_current_key_filter = kwargs.get('copy_notification_current_key_filter', None) - self.copy_notification_current_progress = kwargs.get('copy_notification_current_progress', None) - self.status_details = kwargs.get('status_details', None) - - -class LoadedPartitionInformationQueryDescription(msrest.serialization.Model): - """Represents data structure that contains query information. - - :ivar metric_name: Name of the metric for which this information is provided. - :vartype metric_name: str - :ivar service_name: Name of the service this partition belongs to. - :vartype service_name: str - :ivar ordering: Ordering of partitions' load. Possible values include: "Desc", "Asc". - :vartype ordering: str or ~azure.servicefabric.models.Ordering - :ivar 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. - :vartype max_results: long - :ivar 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. - :vartype continuation_token: str - """ - - _attribute_map = { - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'ordering': {'key': 'Ordering', 'type': 'str'}, - 'max_results': {'key': 'MaxResults', 'type': 'long'}, - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword metric_name: Name of the metric for which this information is provided. - :paramtype metric_name: str - :keyword service_name: Name of the service this partition belongs to. - :paramtype service_name: str - :keyword ordering: Ordering of partitions' load. Possible values include: "Desc", "Asc". - :paramtype ordering: str or ~azure.servicefabric.models.Ordering - :keyword 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. - :paramtype max_results: long - :keyword 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. - :paramtype continuation_token: str - """ - super(LoadedPartitionInformationQueryDescription, self).__init__(**kwargs) - self.metric_name = kwargs.get('metric_name', None) - self.service_name = kwargs.get('service_name', None) - self.ordering = kwargs.get('ordering', None) - self.max_results = kwargs.get('max_results', None) - self.continuation_token = kwargs.get('continuation_token', None) - - -class LoadedPartitionInformationResult(msrest.serialization.Model): - """Represents partition information. - - All required parameters must be populated in order to send to Azure. - - :ivar service_name: Required. Name of the service this partition belongs to. - :vartype service_name: str - :ivar partition_id: Required. Id of the partition. - :vartype partition_id: str - :ivar metric_name: Required. Name of the metric for which this information is provided. - :vartype metric_name: str - :ivar load: Required. Load for metric. - :vartype load: long - """ - - _validation = { - 'service_name': {'required': True}, - 'partition_id': {'required': True}, - 'metric_name': {'required': True}, - 'load': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'load': {'key': 'Load', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_name: Required. Name of the service this partition belongs to. - :paramtype service_name: str - :keyword partition_id: Required. Id of the partition. - :paramtype partition_id: str - :keyword metric_name: Required. Name of the metric for which this information is provided. - :paramtype metric_name: str - :keyword load: Required. Load for metric. - :paramtype load: long - """ - super(LoadedPartitionInformationResult, self).__init__(**kwargs) - self.service_name = kwargs['service_name'] - self.partition_id = kwargs['partition_id'] - self.metric_name = kwargs['metric_name'] - self.load = kwargs['load'] - - -class LoadedPartitionInformationResultList(msrest.serialization.Model): - """Represents data structure that contains top/least loaded partitions for a certain metric. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of application information. - :vartype items: list[~azure.servicefabric.models.LoadedPartitionInformationResult] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[LoadedPartitionInformationResult]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of application information. - :paramtype items: list[~azure.servicefabric.models.LoadedPartitionInformationResult] - """ - super(LoadedPartitionInformationResultList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class LoadMetricInformation(msrest.serialization.Model): - """Represents data structure that contains load information for a certain metric in a cluster. - - :ivar name: Name of the metric for which this load information is provided. - :vartype name: str - :ivar is_balanced_before: Value that indicates whether the metrics is balanced or not before - resource balancer run. - :vartype is_balanced_before: bool - :ivar is_balanced_after: Value that indicates whether the metrics is balanced or not after - resource balancer run. - :vartype is_balanced_after: bool - :ivar deviation_before: The standard average deviation of the metrics before resource balancer - run. - :vartype deviation_before: str - :ivar deviation_after: The standard average deviation of the metrics after resource balancer - run. - :vartype deviation_after: str - :ivar balancing_threshold: The balancing threshold for a certain metric. - :vartype balancing_threshold: str - :ivar action: The current action being taken with regard to this metric. - :vartype action: str - :ivar activity_threshold: The Activity Threshold specified for this metric in the system - Cluster Manifest. - :vartype activity_threshold: str - :ivar cluster_capacity: The total cluster capacity for a given metric. - :vartype cluster_capacity: str - :ivar cluster_load: The total cluster load. In future releases of Service Fabric this parameter - will be deprecated in favor of CurrentClusterLoad. - :vartype cluster_load: str - :ivar current_cluster_load: The total cluster load. - :vartype current_cluster_load: str - :ivar cluster_remaining_capacity: The remaining capacity for the metric in the cluster. In - future releases of Service Fabric this parameter will be deprecated in favor of - ClusterCapacityRemaining. - :vartype cluster_remaining_capacity: str - :ivar cluster_capacity_remaining: The remaining capacity for the metric in the cluster. - :vartype cluster_capacity_remaining: str - :ivar is_cluster_capacity_violation: Indicates that the metric is currently over capacity in - the cluster. - :vartype is_cluster_capacity_violation: bool - :ivar node_buffer_percentage: The reserved percentage of total node capacity for this metric. - :vartype node_buffer_percentage: str - :ivar cluster_buffered_capacity: Remaining capacity in the cluster excluding the reserved - space. In future releases of Service Fabric this parameter will be deprecated in favor of - BufferedClusterCapacityRemaining. - :vartype cluster_buffered_capacity: str - :ivar buffered_cluster_capacity_remaining: Remaining capacity in the cluster excluding the - reserved space. - :vartype buffered_cluster_capacity_remaining: str - :ivar cluster_remaining_buffered_capacity: The remaining percentage of cluster total capacity - for this metric. - :vartype cluster_remaining_buffered_capacity: str - :ivar min_node_load_value: The minimum load on any node for this metric. In future releases of - Service Fabric this parameter will be deprecated in favor of MinimumNodeLoad. - :vartype min_node_load_value: str - :ivar minimum_node_load: The minimum load on any node for this metric. - :vartype minimum_node_load: str - :ivar min_node_load_node_id: The node id of the node with the minimum load for this metric. - :vartype min_node_load_node_id: ~azure.servicefabric.models.NodeId - :ivar max_node_load_value: The maximum load on any node for this metric. In future releases of - Service Fabric this parameter will be deprecated in favor of MaximumNodeLoad. - :vartype max_node_load_value: str - :ivar maximum_node_load: The maximum load on any node for this metric. - :vartype maximum_node_load: str - :ivar max_node_load_node_id: The node id of the node with the maximum load for this metric. - :vartype max_node_load_node_id: ~azure.servicefabric.models.NodeId - :ivar planned_load_removal: This value represents the load of the replicas that are planned to - be removed in the future within the cluster. - This kind of load is reported for replicas that are currently being moving to other nodes and - for replicas that are currently being dropped but still use the load on the source node. - :vartype planned_load_removal: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'is_balanced_before': {'key': 'IsBalancedBefore', 'type': 'bool'}, - 'is_balanced_after': {'key': 'IsBalancedAfter', 'type': 'bool'}, - 'deviation_before': {'key': 'DeviationBefore', 'type': 'str'}, - 'deviation_after': {'key': 'DeviationAfter', 'type': 'str'}, - 'balancing_threshold': {'key': 'BalancingThreshold', 'type': 'str'}, - 'action': {'key': 'Action', 'type': 'str'}, - 'activity_threshold': {'key': 'ActivityThreshold', 'type': 'str'}, - 'cluster_capacity': {'key': 'ClusterCapacity', 'type': 'str'}, - 'cluster_load': {'key': 'ClusterLoad', 'type': 'str'}, - 'current_cluster_load': {'key': 'CurrentClusterLoad', 'type': 'str'}, - 'cluster_remaining_capacity': {'key': 'ClusterRemainingCapacity', 'type': 'str'}, - 'cluster_capacity_remaining': {'key': 'ClusterCapacityRemaining', 'type': 'str'}, - 'is_cluster_capacity_violation': {'key': 'IsClusterCapacityViolation', 'type': 'bool'}, - 'node_buffer_percentage': {'key': 'NodeBufferPercentage', 'type': 'str'}, - 'cluster_buffered_capacity': {'key': 'ClusterBufferedCapacity', 'type': 'str'}, - 'buffered_cluster_capacity_remaining': {'key': 'BufferedClusterCapacityRemaining', 'type': 'str'}, - 'cluster_remaining_buffered_capacity': {'key': 'ClusterRemainingBufferedCapacity', 'type': 'str'}, - 'min_node_load_value': {'key': 'MinNodeLoadValue', 'type': 'str'}, - 'minimum_node_load': {'key': 'MinimumNodeLoad', 'type': 'str'}, - 'min_node_load_node_id': {'key': 'MinNodeLoadNodeId', 'type': 'NodeId'}, - 'max_node_load_value': {'key': 'MaxNodeLoadValue', 'type': 'str'}, - 'maximum_node_load': {'key': 'MaximumNodeLoad', 'type': 'str'}, - 'max_node_load_node_id': {'key': 'MaxNodeLoadNodeId', 'type': 'NodeId'}, - 'planned_load_removal': {'key': 'PlannedLoadRemoval', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Name of the metric for which this load information is provided. - :paramtype name: str - :keyword is_balanced_before: Value that indicates whether the metrics is balanced or not before - resource balancer run. - :paramtype is_balanced_before: bool - :keyword is_balanced_after: Value that indicates whether the metrics is balanced or not after - resource balancer run. - :paramtype is_balanced_after: bool - :keyword deviation_before: The standard average deviation of the metrics before resource - balancer run. - :paramtype deviation_before: str - :keyword deviation_after: The standard average deviation of the metrics after resource balancer - run. - :paramtype deviation_after: str - :keyword balancing_threshold: The balancing threshold for a certain metric. - :paramtype balancing_threshold: str - :keyword action: The current action being taken with regard to this metric. - :paramtype action: str - :keyword activity_threshold: The Activity Threshold specified for this metric in the system - Cluster Manifest. - :paramtype activity_threshold: str - :keyword cluster_capacity: The total cluster capacity for a given metric. - :paramtype cluster_capacity: str - :keyword cluster_load: The total cluster load. In future releases of Service Fabric this - parameter will be deprecated in favor of CurrentClusterLoad. - :paramtype cluster_load: str - :keyword current_cluster_load: The total cluster load. - :paramtype current_cluster_load: str - :keyword cluster_remaining_capacity: The remaining capacity for the metric in the cluster. In - future releases of Service Fabric this parameter will be deprecated in favor of - ClusterCapacityRemaining. - :paramtype cluster_remaining_capacity: str - :keyword cluster_capacity_remaining: The remaining capacity for the metric in the cluster. - :paramtype cluster_capacity_remaining: str - :keyword is_cluster_capacity_violation: Indicates that the metric is currently over capacity in - the cluster. - :paramtype is_cluster_capacity_violation: bool - :keyword node_buffer_percentage: The reserved percentage of total node capacity for this - metric. - :paramtype node_buffer_percentage: str - :keyword cluster_buffered_capacity: Remaining capacity in the cluster excluding the reserved - space. In future releases of Service Fabric this parameter will be deprecated in favor of - BufferedClusterCapacityRemaining. - :paramtype cluster_buffered_capacity: str - :keyword buffered_cluster_capacity_remaining: Remaining capacity in the cluster excluding the - reserved space. - :paramtype buffered_cluster_capacity_remaining: str - :keyword cluster_remaining_buffered_capacity: The remaining percentage of cluster total - capacity for this metric. - :paramtype cluster_remaining_buffered_capacity: str - :keyword min_node_load_value: The minimum load on any node for this metric. In future releases - of Service Fabric this parameter will be deprecated in favor of MinimumNodeLoad. - :paramtype min_node_load_value: str - :keyword minimum_node_load: The minimum load on any node for this metric. - :paramtype minimum_node_load: str - :keyword min_node_load_node_id: The node id of the node with the minimum load for this metric. - :paramtype min_node_load_node_id: ~azure.servicefabric.models.NodeId - :keyword max_node_load_value: The maximum load on any node for this metric. In future releases - of Service Fabric this parameter will be deprecated in favor of MaximumNodeLoad. - :paramtype max_node_load_value: str - :keyword maximum_node_load: The maximum load on any node for this metric. - :paramtype maximum_node_load: str - :keyword max_node_load_node_id: The node id of the node with the maximum load for this metric. - :paramtype max_node_load_node_id: ~azure.servicefabric.models.NodeId - :keyword planned_load_removal: This value represents the load of the replicas that are planned - to be removed in the future within the cluster. - This kind of load is reported for replicas that are currently being moving to other nodes and - for replicas that are currently being dropped but still use the load on the source node. - :paramtype planned_load_removal: str - """ - super(LoadMetricInformation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.is_balanced_before = kwargs.get('is_balanced_before', None) - self.is_balanced_after = kwargs.get('is_balanced_after', None) - self.deviation_before = kwargs.get('deviation_before', None) - self.deviation_after = kwargs.get('deviation_after', None) - self.balancing_threshold = kwargs.get('balancing_threshold', None) - self.action = kwargs.get('action', None) - self.activity_threshold = kwargs.get('activity_threshold', None) - self.cluster_capacity = kwargs.get('cluster_capacity', None) - self.cluster_load = kwargs.get('cluster_load', None) - self.current_cluster_load = kwargs.get('current_cluster_load', None) - self.cluster_remaining_capacity = kwargs.get('cluster_remaining_capacity', None) - self.cluster_capacity_remaining = kwargs.get('cluster_capacity_remaining', None) - self.is_cluster_capacity_violation = kwargs.get('is_cluster_capacity_violation', None) - self.node_buffer_percentage = kwargs.get('node_buffer_percentage', None) - self.cluster_buffered_capacity = kwargs.get('cluster_buffered_capacity', None) - self.buffered_cluster_capacity_remaining = kwargs.get('buffered_cluster_capacity_remaining', None) - self.cluster_remaining_buffered_capacity = kwargs.get('cluster_remaining_buffered_capacity', None) - self.min_node_load_value = kwargs.get('min_node_load_value', None) - self.minimum_node_load = kwargs.get('minimum_node_load', None) - self.min_node_load_node_id = kwargs.get('min_node_load_node_id', None) - self.max_node_load_value = kwargs.get('max_node_load_value', None) - self.maximum_node_load = kwargs.get('maximum_node_load', None) - self.max_node_load_node_id = kwargs.get('max_node_load_node_id', None) - self.planned_load_removal = kwargs.get('planned_load_removal', None) - - -class LoadMetricReport(msrest.serialization.Model): - """Represents the load metric report which contains the time metric was reported, its name and value. - - :ivar last_reported_utc: Gets the UTC time when the load was reported. - :vartype last_reported_utc: ~datetime.datetime - :ivar name: The name of the load metric. - :vartype name: str - :ivar value: The value of the load metric. In future releases of Service Fabric this parameter - will be deprecated in favor of CurrentValue. - :vartype value: str - :ivar current_value: The value of the load metric. - :vartype current_value: str - """ - - _attribute_map = { - 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - 'current_value': {'key': 'CurrentValue', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword last_reported_utc: Gets the UTC time when the load was reported. - :paramtype last_reported_utc: ~datetime.datetime - :keyword name: The name of the load metric. - :paramtype name: str - :keyword value: The value of the load metric. In future releases of Service Fabric this - parameter will be deprecated in favor of CurrentValue. - :paramtype value: str - :keyword current_value: The value of the load metric. - :paramtype current_value: str - """ - super(LoadMetricReport, self).__init__(**kwargs) - self.last_reported_utc = kwargs.get('last_reported_utc', None) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - self.current_value = kwargs.get('current_value', None) - - -class LoadMetricReportInfo(msrest.serialization.Model): - """Information about load reported by replica. - - :ivar name: The name of the metric. - :vartype name: str - :ivar value: The value of the load for the metric. In future releases of Service Fabric this - parameter will be deprecated in favor of CurrentValue. - :vartype value: int - :ivar current_value: The double value of the load for the metric. - :vartype current_value: str - :ivar last_reported_utc: The UTC time when the load is reported. - :vartype last_reported_utc: ~datetime.datetime - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - 'current_value': {'key': 'CurrentValue', 'type': 'str'}, - 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The name of the metric. - :paramtype name: str - :keyword value: The value of the load for the metric. In future releases of Service Fabric this - parameter will be deprecated in favor of CurrentValue. - :paramtype value: int - :keyword current_value: The double value of the load for the metric. - :paramtype current_value: str - :keyword last_reported_utc: The UTC time when the load is reported. - :paramtype last_reported_utc: ~datetime.datetime - """ - super(LoadMetricReportInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - self.current_value = kwargs.get('current_value', None) - self.last_reported_utc = kwargs.get('last_reported_utc', None) - - -class NetworkResourcePropertiesBase(msrest.serialization.Model): - """This type describes the properties of a network resource, including its kind. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NetworkResourceProperties. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of a Service Fabric container network.Constant filled by server. - Possible values include: "Local". - :vartype kind: str or ~azure.servicefabric.models.NetworkKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'NetworkResourceProperties': 'NetworkResourceProperties'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(NetworkResourcePropertiesBase, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class NetworkResourceProperties(NetworkResourcePropertiesBase): - """Describes properties of a network resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LocalNetworkResourceProperties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of a Service Fabric container network.Constant filled by server. - Possible values include: "Local". - :vartype kind: str or ~azure.servicefabric.models.NetworkKind - :ivar description: User readable description of the network. - :vartype description: str - :ivar status: Status of the network. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the network. - :vartype status_details: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Local': 'LocalNetworkResourceProperties'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword description: User readable description of the network. - :paramtype description: str - """ - super(NetworkResourceProperties, self).__init__(**kwargs) - self.kind = 'NetworkResourceProperties' # type: str - self.description = kwargs.get('description', None) - self.status = None - self.status_details = None - - -class LocalNetworkResourceProperties(NetworkResourceProperties): - """Information about a Service Fabric container network local to a single Service Fabric cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of a Service Fabric container network.Constant filled by server. - Possible values include: "Local". - :vartype kind: str or ~azure.servicefabric.models.NetworkKind - :ivar description: User readable description of the network. - :vartype description: str - :ivar status: Status of the network. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the network. - :vartype status_details: str - :ivar network_address_prefix: Address space for the local container network. - :vartype network_address_prefix: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'network_address_prefix': {'key': 'networkAddressPrefix', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword description: User readable description of the network. - :paramtype description: str - :keyword network_address_prefix: Address space for the local container network. - :paramtype network_address_prefix: str - """ - super(LocalNetworkResourceProperties, self).__init__(**kwargs) - self.kind = 'Local' # type: str - self.network_address_prefix = kwargs.get('network_address_prefix', None) - - -class ManagedApplicationIdentity(msrest.serialization.Model): - """Describes a managed application identity. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the identity. - :vartype name: str - :ivar principal_id: The identity's PrincipalId. - :vartype principal_id: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'principal_id': {'key': 'PrincipalId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The name of the identity. - :paramtype name: str - :keyword principal_id: The identity's PrincipalId. - :paramtype principal_id: str - """ - super(ManagedApplicationIdentity, self).__init__(**kwargs) - self.name = kwargs['name'] - self.principal_id = kwargs.get('principal_id', None) - - -class ManagedApplicationIdentityDescription(msrest.serialization.Model): - """Managed application identity description. - - :ivar token_service_endpoint: Token service endpoint. - :vartype token_service_endpoint: str - :ivar managed_identities: A list of managed application identity objects. - :vartype managed_identities: list[~azure.servicefabric.models.ManagedApplicationIdentity] - """ - - _attribute_map = { - 'token_service_endpoint': {'key': 'TokenServiceEndpoint', 'type': 'str'}, - 'managed_identities': {'key': 'ManagedIdentities', 'type': '[ManagedApplicationIdentity]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword token_service_endpoint: Token service endpoint. - :paramtype token_service_endpoint: str - :keyword managed_identities: A list of managed application identity objects. - :paramtype managed_identities: list[~azure.servicefabric.models.ManagedApplicationIdentity] - """ - super(ManagedApplicationIdentityDescription, self).__init__(**kwargs) - self.token_service_endpoint = kwargs.get('token_service_endpoint', None) - self.managed_identities = kwargs.get('managed_identities', None) - - -class ManagedIdentityAzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Azure blob store (connected using managed identity) used for storing and enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant - filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", - "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". - :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind - :ivar friendly_name: Friendly name for this backup storage. - :vartype friendly_name: str - :ivar managed_identity_type: Required. The type of managed identity to be used to connect to - Azure Blob Store via Managed Identity. Possible values include: "Invalid", "VMSS", "Cluster". - :vartype managed_identity_type: str or ~azure.servicefabric.models.ManagedIdentityType - :ivar blob_service_uri: Required. The Blob Service Uri to connect to the Azure blob store.. - :vartype blob_service_uri: str - :ivar container_name: Required. The name of the container in the blob store to store and - enumerate backups from. - :vartype container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'managed_identity_type': {'required': True}, - 'blob_service_uri': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'managed_identity_type': {'key': 'ManagedIdentityType', 'type': 'str'}, - 'blob_service_uri': {'key': 'BlobServiceUri', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword friendly_name: Friendly name for this backup storage. - :paramtype friendly_name: str - :keyword managed_identity_type: Required. The type of managed identity to be used to connect to - Azure Blob Store via Managed Identity. Possible values include: "Invalid", "VMSS", "Cluster". - :paramtype managed_identity_type: str or ~azure.servicefabric.models.ManagedIdentityType - :keyword blob_service_uri: Required. The Blob Service Uri to connect to the Azure blob store.. - :paramtype blob_service_uri: str - :keyword container_name: Required. The name of the container in the blob store to store and - enumerate backups from. - :paramtype container_name: str - """ - super(ManagedIdentityAzureBlobBackupStorageDescription, self).__init__(**kwargs) - self.storage_kind = 'ManagedIdentityAzureBlobStore' # type: str - self.managed_identity_type = kwargs['managed_identity_type'] - self.blob_service_uri = kwargs['blob_service_uri'] - self.container_name = kwargs['container_name'] - - -class MetricLoadDescription(msrest.serialization.Model): - """Specifies metric load information. - - :ivar metric_name: The name of the reported metric. - :vartype metric_name: str - :ivar current_load: The current value of the metric load. - :vartype current_load: long - :ivar predicted_load: The predicted value of the metric load. Predicted metric load values is - currently a preview feature. It allows predicted load values to be reported and used at the - Service Fabric side, but that feature is currently not enabled. - :vartype predicted_load: long - """ - - _attribute_map = { - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'current_load': {'key': 'CurrentLoad', 'type': 'long'}, - 'predicted_load': {'key': 'PredictedLoad', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword metric_name: The name of the reported metric. - :paramtype metric_name: str - :keyword current_load: The current value of the metric load. - :paramtype current_load: long - :keyword predicted_load: The predicted value of the metric load. Predicted metric load values - is currently a preview feature. It allows predicted load values to be reported and used at the - Service Fabric side, but that feature is currently not enabled. - :paramtype predicted_load: long - """ - super(MetricLoadDescription, self).__init__(**kwargs) - self.metric_name = kwargs.get('metric_name', None) - self.current_load = kwargs.get('current_load', None) - self.predicted_load = kwargs.get('predicted_load', None) - - -class MonitoringPolicyDescription(msrest.serialization.Model): - """Describes the parameters for monitoring an upgrade in Monitored mode. - - :ivar failure_action: The compensating action to perform when a Monitored upgrade encounters - monitoring policy or health policy violations. - Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will - start rolling back automatically. - Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible - values include: "Invalid", "Rollback", "Manual". - :vartype failure_action: str or ~azure.servicefabric.models.FailureAction - :ivar health_check_wait_duration_in_milliseconds: The amount of time to wait after completing - an upgrade domain before applying health policies. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted as a number - representing the total number of milliseconds. - :vartype health_check_wait_duration_in_milliseconds: str - :ivar health_check_stable_duration_in_milliseconds: The amount of time that the application or - cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is first - interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :vartype health_check_stable_duration_in_milliseconds: str - :ivar health_check_retry_timeout_in_milliseconds: The amount of time to retry health evaluation - when the application or cluster is unhealthy before FailureAction is executed. It is first - interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :vartype health_check_retry_timeout_in_milliseconds: str - :ivar upgrade_timeout_in_milliseconds: The amount of time the overall upgrade has to complete - before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 - duration. If that fails, then it is interpreted as a number representing the total number of - milliseconds. - :vartype upgrade_timeout_in_milliseconds: str - :ivar upgrade_domain_timeout_in_milliseconds: The amount of time each upgrade domain has to - complete before FailureAction is executed. It is first interpreted as a string representing an - ISO 8601 duration. If that fails, then it is interpreted as a number representing the total - number of milliseconds. - :vartype upgrade_domain_timeout_in_milliseconds: str - """ - - _attribute_map = { - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, - 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, - 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword failure_action: The compensating action to perform when a Monitored upgrade encounters - monitoring policy or health policy violations. - Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will - start rolling back automatically. - Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible - values include: "Invalid", "Rollback", "Manual". - :paramtype failure_action: str or ~azure.servicefabric.models.FailureAction - :keyword health_check_wait_duration_in_milliseconds: The amount of time to wait after - completing an upgrade domain before applying health policies. It is first interpreted as a - string representing an ISO 8601 duration. If that fails, then it is interpreted as a number - representing the total number of milliseconds. - :paramtype health_check_wait_duration_in_milliseconds: str - :keyword health_check_stable_duration_in_milliseconds: The amount of time that the application - or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is - first interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :paramtype health_check_stable_duration_in_milliseconds: str - :keyword health_check_retry_timeout_in_milliseconds: The amount of time to retry health - evaluation when the application or cluster is unhealthy before FailureAction is executed. It is - first interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :paramtype health_check_retry_timeout_in_milliseconds: str - :keyword upgrade_timeout_in_milliseconds: The amount of time the overall upgrade has to - complete before FailureAction is executed. It is first interpreted as a string representing an - ISO 8601 duration. If that fails, then it is interpreted as a number representing the total - number of milliseconds. - :paramtype upgrade_timeout_in_milliseconds: str - :keyword upgrade_domain_timeout_in_milliseconds: The amount of time each upgrade domain has to - complete before FailureAction is executed. It is first interpreted as a string representing an - ISO 8601 duration. If that fails, then it is interpreted as a number representing the total - number of milliseconds. - :paramtype upgrade_domain_timeout_in_milliseconds: str - """ - super(MonitoringPolicyDescription, self).__init__(**kwargs) - self.failure_action = kwargs.get('failure_action', None) - self.health_check_wait_duration_in_milliseconds = kwargs.get('health_check_wait_duration_in_milliseconds', "0") - self.health_check_stable_duration_in_milliseconds = kwargs.get('health_check_stable_duration_in_milliseconds', "PT0H2M0S") - self.health_check_retry_timeout_in_milliseconds = kwargs.get('health_check_retry_timeout_in_milliseconds', "PT0H10M0S") - self.upgrade_timeout_in_milliseconds = kwargs.get('upgrade_timeout_in_milliseconds', "P10675199DT02H48M05.4775807S") - self.upgrade_domain_timeout_in_milliseconds = kwargs.get('upgrade_domain_timeout_in_milliseconds', "P10675199DT02H48M05.4775807S") - - -class NameDescription(msrest.serialization.Model): - """Describes a Service Fabric name. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The Service Fabric name, including the 'fabric:' URI scheme. - :vartype name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The Service Fabric name, including the 'fabric:' URI scheme. - :paramtype name: str - """ - super(NameDescription, self).__init__(**kwargs) - self.name = kwargs['name'] - - -class NamedPartitionInformation(PartitionInformation): - """Describes the partition information for the name as a string that is based on partition schemes. - - All required parameters must be populated in order to send to Azure. - - :ivar service_partition_kind: Required. The kind of partitioning scheme used to partition the - service.Constant filled by server. Possible values include: "Invalid", "Singleton", - "Int64Range", "Named". - :vartype service_partition_kind: str or ~azure.servicefabric.models.ServicePartitionKind - :ivar id: An internal ID used by Service Fabric to uniquely identify a partition. This is a - randomly generated GUID when the service was created. The partition ID is unique and does not - change for the lifetime of the service. If the same service was deleted and recreated the IDs - of its partitions would be different. - :vartype id: str - :ivar name: Name of the partition. - :vartype name: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: An internal ID used by Service Fabric to uniquely identify a partition. This is a - randomly generated GUID when the service was created. The partition ID is unique and does not - change for the lifetime of the service. If the same service was deleted and recreated the IDs - of its partitions would be different. - :paramtype id: str - :keyword name: Name of the partition. - :paramtype name: str - """ - super(NamedPartitionInformation, self).__init__(**kwargs) - self.service_partition_kind = 'Named' # type: str - self.name = kwargs.get('name', None) - - -class PartitionSchemeDescription(msrest.serialization.Model): - """Describes how the service is partitioned. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NamedPartitionSchemeDescription, SingletonPartitionSchemeDescription, UniformInt64RangePartitionSchemeDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar partition_scheme: Required. Specifies how the service is partitioned.Constant filled by - server. Possible values include: "Invalid", "Singleton", "UniformInt64Range", "Named". - :vartype partition_scheme: str or ~azure.servicefabric.models.PartitionScheme - """ - - _validation = { - 'partition_scheme': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - } - - _subtype_map = { - 'partition_scheme': {'Named': 'NamedPartitionSchemeDescription', 'Singleton': 'SingletonPartitionSchemeDescription', 'UniformInt64Range': 'UniformInt64RangePartitionSchemeDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(PartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = None # type: Optional[str] - - -class NamedPartitionSchemeDescription(PartitionSchemeDescription): - """Describes the named partition scheme of the service. - - All required parameters must be populated in order to send to Azure. - - :ivar partition_scheme: Required. Specifies how the service is partitioned.Constant filled by - server. Possible values include: "Invalid", "Singleton", "UniformInt64Range", "Named". - :vartype partition_scheme: str or ~azure.servicefabric.models.PartitionScheme - :ivar count: Required. The number of partitions. - :vartype count: int - :ivar names: Required. Array of size specified by the ‘Count’ parameter, for the names of the - partitions. - :vartype names: list[str] - """ - - _validation = { - 'partition_scheme': {'required': True}, - 'count': {'required': True}, - 'names': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'names': {'key': 'Names', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword count: Required. The number of partitions. - :paramtype count: int - :keyword names: Required. Array of size specified by the ‘Count’ parameter, for the names of - the partitions. - :paramtype names: list[str] - """ - super(NamedPartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = 'Named' # type: str - self.count = kwargs['count'] - self.names = kwargs['names'] - - -class NetworkRef(msrest.serialization.Model): - """Describes a network reference in a service. - - :ivar name: Name of the network. - :vartype name: str - :ivar endpoint_refs: A list of endpoints that are exposed on this network. - :vartype endpoint_refs: list[~azure.servicefabric.models.EndpointRef] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'endpoint_refs': {'key': 'endpointRefs', 'type': '[EndpointRef]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Name of the network. - :paramtype name: str - :keyword endpoint_refs: A list of endpoints that are exposed on this network. - :paramtype endpoint_refs: list[~azure.servicefabric.models.EndpointRef] - """ - super(NetworkRef, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.endpoint_refs = kwargs.get('endpoint_refs', None) - - -class NetworkResourceDescription(msrest.serialization.Model): - """This type describes a network resource. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of the Network resource. - :vartype name: str - :ivar properties: Required. Describes properties of a network resource. - :vartype properties: ~azure.servicefabric.models.NetworkResourceProperties - """ - - _validation = { - 'name': {'required': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'NetworkResourceProperties'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. Name of the Network resource. - :paramtype name: str - :keyword properties: Required. Describes properties of a network resource. - :paramtype properties: ~azure.servicefabric.models.NetworkResourceProperties - """ - super(NetworkResourceDescription, self).__init__(**kwargs) - self.name = kwargs['name'] - self.properties = kwargs['properties'] - - -class NodeAbortedEvent(NodeEvent): - """Node Aborted event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar node_id: Required. Id of Node. - :vartype node_id: str - :ivar upgrade_domain: Required. Upgrade domain of Node. - :vartype upgrade_domain: str - :ivar fault_domain: Required. Fault domain of Node. - :vartype fault_domain: str - :ivar ip_address_or_fqdn: Required. IP address or FQDN. - :vartype ip_address_or_fqdn: str - :ivar hostname: Required. Name of Host. - :vartype hostname: str - :ivar is_seed_node: Required. Indicates if it is seed node. - :vartype is_seed_node: bool - :ivar node_version: Required. Version of Node. - :vartype node_version: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword node_id: Required. Id of Node. - :paramtype node_id: str - :keyword upgrade_domain: Required. Upgrade domain of Node. - :paramtype upgrade_domain: str - :keyword fault_domain: Required. Fault domain of Node. - :paramtype fault_domain: str - :keyword ip_address_or_fqdn: Required. IP address or FQDN. - :paramtype ip_address_or_fqdn: str - :keyword hostname: Required. Name of Host. - :paramtype hostname: str - :keyword is_seed_node: Required. Indicates if it is seed node. - :paramtype is_seed_node: bool - :keyword node_version: Required. Version of Node. - :paramtype node_version: str - """ - super(NodeAbortedEvent, self).__init__(**kwargs) - self.kind = 'NodeAborted' # type: str - self.node_instance = kwargs['node_instance'] - self.node_id = kwargs['node_id'] - self.upgrade_domain = kwargs['upgrade_domain'] - self.fault_domain = kwargs['fault_domain'] - self.ip_address_or_fqdn = kwargs['ip_address_or_fqdn'] - self.hostname = kwargs['hostname'] - self.is_seed_node = kwargs['is_seed_node'] - self.node_version = kwargs['node_version'] - - -class NodeAddedToClusterEvent(NodeEvent): - """Node Added event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_id: Required. Id of Node. - :vartype node_id: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar node_type: Required. Type of Node. - :vartype node_type: str - :ivar fabric_version: Required. Fabric version. - :vartype fabric_version: str - :ivar ip_address_or_fqdn: Required. IP address or FQDN. - :vartype ip_address_or_fqdn: str - :ivar node_capacities: Required. Capacities. - :vartype node_capacities: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'node_type': {'required': True}, - 'fabric_version': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'node_capacities': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_type': {'key': 'NodeType', 'type': 'str'}, - 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_id: Required. Id of Node. - :paramtype node_id: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword node_type: Required. Type of Node. - :paramtype node_type: str - :keyword fabric_version: Required. Fabric version. - :paramtype fabric_version: str - :keyword ip_address_or_fqdn: Required. IP address or FQDN. - :paramtype ip_address_or_fqdn: str - :keyword node_capacities: Required. Capacities. - :paramtype node_capacities: str - """ - super(NodeAddedToClusterEvent, self).__init__(**kwargs) - self.kind = 'NodeAddedToCluster' # type: str - self.node_id = kwargs['node_id'] - self.node_instance = kwargs['node_instance'] - self.node_type = kwargs['node_type'] - self.fabric_version = kwargs['fabric_version'] - self.ip_address_or_fqdn = kwargs['ip_address_or_fqdn'] - self.node_capacities = kwargs['node_capacities'] - - -class NodeClosedEvent(NodeEvent): - """Node Closed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_id: Required. Id of Node. - :vartype node_id: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar error: Required. Describes error. - :vartype error: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'error': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'error': {'key': 'Error', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_id: Required. Id of Node. - :paramtype node_id: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword error: Required. Describes error. - :paramtype error: str - """ - super(NodeClosedEvent, self).__init__(**kwargs) - self.kind = 'NodeClosed' # type: str - self.node_id = kwargs['node_id'] - self.node_instance = kwargs['node_instance'] - self.error = kwargs['error'] - - -class NodeDeactivateCompletedEvent(NodeEvent): - """Node Deactivate Completed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar effective_deactivate_intent: Required. Describes deactivate intent. - :vartype effective_deactivate_intent: str - :ivar batch_ids_with_deactivate_intent: Required. Batch Ids. - :vartype batch_ids_with_deactivate_intent: str - :ivar start_time: Required. Start time. - :vartype start_time: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'effective_deactivate_intent': {'required': True}, - 'batch_ids_with_deactivate_intent': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'effective_deactivate_intent': {'key': 'EffectiveDeactivateIntent', 'type': 'str'}, - 'batch_ids_with_deactivate_intent': {'key': 'BatchIdsWithDeactivateIntent', 'type': 'str'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword effective_deactivate_intent: Required. Describes deactivate intent. - :paramtype effective_deactivate_intent: str - :keyword batch_ids_with_deactivate_intent: Required. Batch Ids. - :paramtype batch_ids_with_deactivate_intent: str - :keyword start_time: Required. Start time. - :paramtype start_time: ~datetime.datetime - """ - super(NodeDeactivateCompletedEvent, self).__init__(**kwargs) - self.kind = 'NodeDeactivateCompleted' # type: str - self.node_instance = kwargs['node_instance'] - self.effective_deactivate_intent = kwargs['effective_deactivate_intent'] - self.batch_ids_with_deactivate_intent = kwargs['batch_ids_with_deactivate_intent'] - self.start_time = kwargs['start_time'] - - -class NodeDeactivateStartedEvent(NodeEvent): - """Node Deactivate Started event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar batch_id: Required. Batch Id. - :vartype batch_id: str - :ivar deactivate_intent: Required. Describes deactivate intent. - :vartype deactivate_intent: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'batch_id': {'required': True}, - 'deactivate_intent': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'batch_id': {'key': 'BatchId', 'type': 'str'}, - 'deactivate_intent': {'key': 'DeactivateIntent', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword batch_id: Required. Batch Id. - :paramtype batch_id: str - :keyword deactivate_intent: Required. Describes deactivate intent. - :paramtype deactivate_intent: str - """ - super(NodeDeactivateStartedEvent, self).__init__(**kwargs) - self.kind = 'NodeDeactivateStarted' # type: str - self.node_instance = kwargs['node_instance'] - self.batch_id = kwargs['batch_id'] - self.deactivate_intent = kwargs['deactivate_intent'] - - -class NodeDeactivationInfo(msrest.serialization.Model): - """Information about the node deactivation. This information is valid for a node that is undergoing deactivation or has already been deactivated. - - :ivar node_deactivation_intent: The intent or the reason for deactivating the node. Following - are the possible values for it. Possible values include: "Invalid", "Pause", "Restart", - "RemoveData", "RemoveNode". - :vartype node_deactivation_intent: str or ~azure.servicefabric.models.NodeDeactivationIntent - :ivar node_deactivation_status: The status of node deactivation operation. Following are the - possible values. Possible values include: "None", "SafetyCheckInProgress", - "SafetyCheckComplete", "Completed". - :vartype node_deactivation_status: str or ~azure.servicefabric.models.NodeDeactivationStatus - :ivar node_deactivation_task: List of tasks representing the deactivation operation on the - node. - :vartype node_deactivation_task: list[~azure.servicefabric.models.NodeDeactivationTask] - :ivar pending_safety_checks: List of pending safety checks. - :vartype pending_safety_checks: list[~azure.servicefabric.models.SafetyCheckWrapper] - """ - - _attribute_map = { - 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, - 'node_deactivation_status': {'key': 'NodeDeactivationStatus', 'type': 'str'}, - 'node_deactivation_task': {'key': 'NodeDeactivationTask', 'type': '[NodeDeactivationTask]'}, - 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword node_deactivation_intent: The intent or the reason for deactivating the node. - Following are the possible values for it. Possible values include: "Invalid", "Pause", - "Restart", "RemoveData", "RemoveNode". - :paramtype node_deactivation_intent: str or ~azure.servicefabric.models.NodeDeactivationIntent - :keyword node_deactivation_status: The status of node deactivation operation. Following are the - possible values. Possible values include: "None", "SafetyCheckInProgress", - "SafetyCheckComplete", "Completed". - :paramtype node_deactivation_status: str or ~azure.servicefabric.models.NodeDeactivationStatus - :keyword node_deactivation_task: List of tasks representing the deactivation operation on the - node. - :paramtype node_deactivation_task: list[~azure.servicefabric.models.NodeDeactivationTask] - :keyword pending_safety_checks: List of pending safety checks. - :paramtype pending_safety_checks: list[~azure.servicefabric.models.SafetyCheckWrapper] - """ - super(NodeDeactivationInfo, self).__init__(**kwargs) - self.node_deactivation_intent = kwargs.get('node_deactivation_intent', None) - self.node_deactivation_status = kwargs.get('node_deactivation_status', None) - self.node_deactivation_task = kwargs.get('node_deactivation_task', None) - self.pending_safety_checks = kwargs.get('pending_safety_checks', None) - - -class NodeDeactivationTask(msrest.serialization.Model): - """The task representing the deactivation operation on the node. - - :ivar node_deactivation_task_id: Identity of the task related to deactivation operation on the - node. - :vartype node_deactivation_task_id: ~azure.servicefabric.models.NodeDeactivationTaskId - :ivar node_deactivation_intent: The intent or the reason for deactivating the node. Following - are the possible values for it. Possible values include: "Invalid", "Pause", "Restart", - "RemoveData", "RemoveNode". - :vartype node_deactivation_intent: str or ~azure.servicefabric.models.NodeDeactivationIntent - """ - - _attribute_map = { - 'node_deactivation_task_id': {'key': 'NodeDeactivationTaskId', 'type': 'NodeDeactivationTaskId'}, - 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword node_deactivation_task_id: Identity of the task related to deactivation operation on - the node. - :paramtype node_deactivation_task_id: ~azure.servicefabric.models.NodeDeactivationTaskId - :keyword node_deactivation_intent: The intent or the reason for deactivating the node. - Following are the possible values for it. Possible values include: "Invalid", "Pause", - "Restart", "RemoveData", "RemoveNode". - :paramtype node_deactivation_intent: str or ~azure.servicefabric.models.NodeDeactivationIntent - """ - super(NodeDeactivationTask, self).__init__(**kwargs) - self.node_deactivation_task_id = kwargs.get('node_deactivation_task_id', None) - self.node_deactivation_intent = kwargs.get('node_deactivation_intent', None) - - -class NodeDeactivationTaskId(msrest.serialization.Model): - """Identity of the task related to deactivation operation on the node. - - :ivar id: Value of the task id. - :vartype id: str - :ivar node_deactivation_task_type: The type of the task that performed the node deactivation. - Following are the possible values. Possible values include: "Invalid", "Infrastructure", - "Repair", "Client". - :vartype node_deactivation_task_type: str or - ~azure.servicefabric.models.NodeDeactivationTaskType - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'node_deactivation_task_type': {'key': 'NodeDeactivationTaskType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: Value of the task id. - :paramtype id: str - :keyword node_deactivation_task_type: The type of the task that performed the node - deactivation. Following are the possible values. Possible values include: "Invalid", - "Infrastructure", "Repair", "Client". - :paramtype node_deactivation_task_type: str or - ~azure.servicefabric.models.NodeDeactivationTaskType - """ - super(NodeDeactivationTaskId, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.node_deactivation_task_type = kwargs.get('node_deactivation_task_type', None) - - -class NodeDownEvent(NodeEvent): - """Node Down event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar last_node_up_at: Required. Time when Node was last up. - :vartype last_node_up_at: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'last_node_up_at': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'last_node_up_at': {'key': 'LastNodeUpAt', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword last_node_up_at: Required. Time when Node was last up. - :paramtype last_node_up_at: ~datetime.datetime - """ - super(NodeDownEvent, self).__init__(**kwargs) - self.kind = 'NodeDown' # type: str - self.node_instance = kwargs['node_instance'] - self.last_node_up_at = kwargs['last_node_up_at'] - - -class NodeHealth(EntityHealth): - """Information about the health of a Service Fabric node. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar name: Name of the node whose health information is described by this object. - :vartype name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword name: Name of the node whose health information is described by this object. - :paramtype name: str - """ - super(NodeHealth, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class NodeHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a node, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar node_name: The name of a Service Fabric node. - :vartype node_name: str - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated - health state of the node. The types of the unhealthy evaluations can be EventHealthEvaluation. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword node_name: The name of a Service Fabric node. - :paramtype node_name: str - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current - aggregated health state of the node. The types of the unhealthy evaluations can be - EventHealthEvaluation. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(NodeHealthEvaluation, self).__init__(**kwargs) - self.kind = 'Node' # type: str - self.node_name = kwargs.get('node_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class NodeHealthReportExpiredEvent(NodeEvent): - """Node Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance_id: Required. Id of Node instance. - :vartype node_instance_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance_id: Required. Id of Node instance. - :paramtype node_instance_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(NodeHealthReportExpiredEvent, self).__init__(**kwargs) - self.kind = 'NodeHealthReportExpired' # type: str - self.node_instance_id = kwargs['node_instance_id'] - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class NodeHealthState(EntityHealthState): - """Represents the health state of a node, which contains the node identifier and its aggregated health state. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar name: The name of a Service Fabric node. - :vartype name: str - :ivar id: An internal ID used by Service Fabric to uniquely identify a node. Node Id is - deterministically generated from node name. - :vartype id: ~azure.servicefabric.models.NodeId - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'NodeId'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword name: The name of a Service Fabric node. - :paramtype name: str - :keyword id: An internal ID used by Service Fabric to uniquely identify a node. Node Id is - deterministically generated from node name. - :paramtype id: ~azure.servicefabric.models.NodeId - """ - super(NodeHealthState, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.id = kwargs.get('id', None) - - -class NodeHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a node, which contains the node name and its aggregated health state. - - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar node_name: The name of a Service Fabric node. - :vartype node_name: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword node_name: The name of a Service Fabric node. - :paramtype node_name: str - """ - super(NodeHealthStateChunk, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - - -class NodeHealthStateChunkList(EntityHealthStateChunkList): - """The list of node health state chunks in the cluster that respect the input filters in the chunk query. Returned by get cluster health state chunks query. - - :ivar total_count: Total number of entity health state objects that match the specified filters - from the cluster health chunk query description. - :vartype total_count: long - :ivar items: The list of node health state chunks that respect the input filters in the chunk - query. - :vartype items: list[~azure.servicefabric.models.NodeHealthStateChunk] - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'items': {'key': 'Items', 'type': '[NodeHealthStateChunk]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword total_count: Total number of entity health state objects that match the specified - filters from the cluster health chunk query description. - :paramtype total_count: long - :keyword items: The list of node health state chunks that respect the input filters in the - chunk query. - :paramtype items: list[~azure.servicefabric.models.NodeHealthStateChunk] - """ - super(NodeHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) - - -class NodeHealthStateFilter(msrest.serialization.Model): - """Defines matching criteria to determine whether a node should be included in the returned cluster health chunk. -One filter can match zero, one or multiple nodes, depending on its properties. -Can be specified in the cluster health chunk query description. - - :ivar node_name_filter: Name of the node that matches the filter. The filter is applied only to - the specified node, if it exists. - If the node doesn't exist, no node is returned in the cluster health chunk based on this - filter. - If the node exists, it is included in the cluster health chunk if the health state matches the - other filter properties. - If not specified, all nodes that match the parent filters (if any) are taken into - consideration and matched against the other filter members, like health state filter. - :vartype node_name_filter: str - :ivar health_state_filter: The filter for the health state of the nodes. It allows selecting - nodes if they match the desired health states. - The possible values are integer value of one of the following health states. Only nodes that - match the filter are returned. All nodes are used to evaluate the cluster aggregated health - state. - If not specified, default value is None, unless the node name is specified. If the filter has - default value and node name is specified, the matching node is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches nodes with HealthState value of OK (2) and - Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :vartype health_state_filter: int - """ - - _attribute_map = { - 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword node_name_filter: Name of the node that matches the filter. The filter is applied only - to the specified node, if it exists. - If the node doesn't exist, no node is returned in the cluster health chunk based on this - filter. - If the node exists, it is included in the cluster health chunk if the health state matches the - other filter properties. - If not specified, all nodes that match the parent filters (if any) are taken into - consideration and matched against the other filter members, like health state filter. - :paramtype node_name_filter: str - :keyword health_state_filter: The filter for the health state of the nodes. It allows selecting - nodes if they match the desired health states. - The possible values are integer value of one of the following health states. Only nodes that - match the filter are returned. All nodes are used to evaluate the cluster aggregated health - state. - If not specified, default value is None, unless the node name is specified. If the filter has - default value and node name is specified, the matching node is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches nodes with HealthState value of OK (2) and - Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :paramtype health_state_filter: int - """ - super(NodeHealthStateFilter, self).__init__(**kwargs) - self.node_name_filter = kwargs.get('node_name_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - - -class NodeId(msrest.serialization.Model): - """An internal ID used by Service Fabric to uniquely identify a node. Node Id is deterministically generated from node name. - - :ivar id: Value of the node Id. This is a 128 bit integer. - :vartype id: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: Value of the node Id. This is a 128 bit integer. - :paramtype id: str - """ - super(NodeId, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class NodeImpact(msrest.serialization.Model): - """Describes the expected impact of a repair to a particular node. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar node_name: Required. The name of the impacted node. - :vartype node_name: str - :ivar impact_level: The level of impact expected. Possible values include: "Invalid", "None", - "Restart", "RemoveData", "RemoveNode". - :vartype impact_level: str or ~azure.servicefabric.models.ImpactLevel - """ - - _validation = { - 'node_name': {'required': True}, - } - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'impact_level': {'key': 'ImpactLevel', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword node_name: Required. The name of the impacted node. - :paramtype node_name: str - :keyword impact_level: The level of impact expected. Possible values include: "Invalid", - "None", "Restart", "RemoveData", "RemoveNode". - :paramtype impact_level: str or ~azure.servicefabric.models.ImpactLevel - """ - super(NodeImpact, self).__init__(**kwargs) - self.node_name = kwargs['node_name'] - self.impact_level = kwargs.get('impact_level', None) - - -class NodeInfo(msrest.serialization.Model): - """Information about a node in Service Fabric cluster. - - :ivar name: The name of a Service Fabric node. - :vartype name: str - :ivar ip_address_or_fqdn: The IP address or fully qualified domain name of the node. - :vartype ip_address_or_fqdn: str - :ivar type: The type of the node. - :vartype type: str - :ivar code_version: The version of Service Fabric binaries that the node is running. - :vartype code_version: str - :ivar config_version: The version of Service Fabric cluster manifest that the node is using. - :vartype config_version: str - :ivar node_status: The status of the node. Possible values include: "Invalid", "Up", "Down", - "Enabling", "Disabling", "Disabled", "Unknown", "Removed". - :vartype node_status: str or ~azure.servicefabric.models.NodeStatus - :ivar node_up_time_in_seconds: Time in seconds since the node has been in NodeStatus Up. Value - zero indicates that the node is not Up. - :vartype node_up_time_in_seconds: str - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar is_seed_node: Indicates if the node is a seed node or not. Returns true if the node is a - seed node, otherwise false. A quorum of seed nodes are required for proper operation of Service - Fabric cluster. - :vartype is_seed_node: bool - :ivar upgrade_domain: The upgrade domain of the node. - :vartype upgrade_domain: str - :ivar fault_domain: The fault domain of the node. - :vartype fault_domain: str - :ivar id: An internal ID used by Service Fabric to uniquely identify a node. Node Id is - deterministically generated from node name. - :vartype id: ~azure.servicefabric.models.NodeId - :ivar instance_id: The ID representing the node instance. While the ID of the node is - deterministically generated from the node name and remains same across restarts, the InstanceId - changes every time node restarts. - :vartype instance_id: str - :ivar node_deactivation_info: Information about the node deactivation. This information is - valid for a node that is undergoing deactivation or has already been deactivated. - :vartype node_deactivation_info: ~azure.servicefabric.models.NodeDeactivationInfo - :ivar is_stopped: Indicates if the node is stopped by calling stop node API or not. Returns - true if the node is stopped, otherwise false. - :vartype is_stopped: bool - :ivar node_down_time_in_seconds: Time in seconds since the node has been in NodeStatus Down. - Value zero indicates node is not NodeStatus Down. - :vartype node_down_time_in_seconds: str - :ivar node_up_at: Date time in UTC when the node came up. If the node has never been up then - this value will be zero date time. - :vartype node_up_at: ~datetime.datetime - :ivar node_down_at: Date time in UTC when the node went down. If node has never been down then - this value will be zero date time. - :vartype node_down_at: ~datetime.datetime - :ivar node_tags: List that contains tags, which will be applied to the nodes. - :vartype node_tags: list[str] - :ivar is_node_by_node_upgrade_in_progress: Indicates if a node-by-node upgrade is currently - being performed on this node. - :vartype is_node_by_node_upgrade_in_progress: bool - :ivar infrastructure_placement_id: PlacementID used by the InfrastructureService. - :vartype infrastructure_placement_id: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'node_status': {'key': 'NodeStatus', 'type': 'str'}, - 'node_up_time_in_seconds': {'key': 'NodeUpTimeInSeconds', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'NodeId'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'node_deactivation_info': {'key': 'NodeDeactivationInfo', 'type': 'NodeDeactivationInfo'}, - 'is_stopped': {'key': 'IsStopped', 'type': 'bool'}, - 'node_down_time_in_seconds': {'key': 'NodeDownTimeInSeconds', 'type': 'str'}, - 'node_up_at': {'key': 'NodeUpAt', 'type': 'iso-8601'}, - 'node_down_at': {'key': 'NodeDownAt', 'type': 'iso-8601'}, - 'node_tags': {'key': 'NodeTags', 'type': '[str]'}, - 'is_node_by_node_upgrade_in_progress': {'key': 'IsNodeByNodeUpgradeInProgress', 'type': 'bool'}, - 'infrastructure_placement_id': {'key': 'InfrastructurePlacementID', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The name of a Service Fabric node. - :paramtype name: str - :keyword ip_address_or_fqdn: The IP address or fully qualified domain name of the node. - :paramtype ip_address_or_fqdn: str - :keyword type: The type of the node. - :paramtype type: str - :keyword code_version: The version of Service Fabric binaries that the node is running. - :paramtype code_version: str - :keyword config_version: The version of Service Fabric cluster manifest that the node is using. - :paramtype config_version: str - :keyword node_status: The status of the node. Possible values include: "Invalid", "Up", "Down", - "Enabling", "Disabling", "Disabled", "Unknown", "Removed". - :paramtype node_status: str or ~azure.servicefabric.models.NodeStatus - :keyword node_up_time_in_seconds: Time in seconds since the node has been in NodeStatus Up. - Value zero indicates that the node is not Up. - :paramtype node_up_time_in_seconds: str - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword is_seed_node: Indicates if the node is a seed node or not. Returns true if the node is - a seed node, otherwise false. A quorum of seed nodes are required for proper operation of - Service Fabric cluster. - :paramtype is_seed_node: bool - :keyword upgrade_domain: The upgrade domain of the node. - :paramtype upgrade_domain: str - :keyword fault_domain: The fault domain of the node. - :paramtype fault_domain: str - :keyword id: An internal ID used by Service Fabric to uniquely identify a node. Node Id is - deterministically generated from node name. - :paramtype id: ~azure.servicefabric.models.NodeId - :keyword instance_id: The ID representing the node instance. While the ID of the node is - deterministically generated from the node name and remains same across restarts, the InstanceId - changes every time node restarts. - :paramtype instance_id: str - :keyword node_deactivation_info: Information about the node deactivation. This information is - valid for a node that is undergoing deactivation or has already been deactivated. - :paramtype node_deactivation_info: ~azure.servicefabric.models.NodeDeactivationInfo - :keyword is_stopped: Indicates if the node is stopped by calling stop node API or not. Returns - true if the node is stopped, otherwise false. - :paramtype is_stopped: bool - :keyword node_down_time_in_seconds: Time in seconds since the node has been in NodeStatus Down. - Value zero indicates node is not NodeStatus Down. - :paramtype node_down_time_in_seconds: str - :keyword node_up_at: Date time in UTC when the node came up. If the node has never been up then - this value will be zero date time. - :paramtype node_up_at: ~datetime.datetime - :keyword node_down_at: Date time in UTC when the node went down. If node has never been down - then this value will be zero date time. - :paramtype node_down_at: ~datetime.datetime - :keyword node_tags: List that contains tags, which will be applied to the nodes. - :paramtype node_tags: list[str] - :keyword is_node_by_node_upgrade_in_progress: Indicates if a node-by-node upgrade is currently - being performed on this node. - :paramtype is_node_by_node_upgrade_in_progress: bool - :keyword infrastructure_placement_id: PlacementID used by the InfrastructureService. - :paramtype infrastructure_placement_id: str - """ - super(NodeInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.ip_address_or_fqdn = kwargs.get('ip_address_or_fqdn', None) - self.type = kwargs.get('type', None) - self.code_version = kwargs.get('code_version', None) - self.config_version = kwargs.get('config_version', None) - self.node_status = kwargs.get('node_status', None) - self.node_up_time_in_seconds = kwargs.get('node_up_time_in_seconds', None) - self.health_state = kwargs.get('health_state', None) - self.is_seed_node = kwargs.get('is_seed_node', None) - self.upgrade_domain = kwargs.get('upgrade_domain', None) - self.fault_domain = kwargs.get('fault_domain', None) - self.id = kwargs.get('id', None) - self.instance_id = kwargs.get('instance_id', None) - self.node_deactivation_info = kwargs.get('node_deactivation_info', None) - self.is_stopped = kwargs.get('is_stopped', None) - self.node_down_time_in_seconds = kwargs.get('node_down_time_in_seconds', None) - self.node_up_at = kwargs.get('node_up_at', None) - self.node_down_at = kwargs.get('node_down_at', None) - self.node_tags = kwargs.get('node_tags', None) - self.is_node_by_node_upgrade_in_progress = kwargs.get('is_node_by_node_upgrade_in_progress', None) - self.infrastructure_placement_id = kwargs.get('infrastructure_placement_id', None) - - -class NodeLoadInfo(msrest.serialization.Model): - """Information about load on a Service Fabric node. It holds a summary of all metrics and their load on a node. - - :ivar node_name: Name of the node for which the load information is provided by this object. - :vartype node_name: str - :ivar node_load_metric_information: List that contains metrics and their load information on - this node. - :vartype node_load_metric_information: - list[~azure.servicefabric.models.NodeLoadMetricInformation] - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_load_metric_information': {'key': 'NodeLoadMetricInformation', 'type': '[NodeLoadMetricInformation]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword node_name: Name of the node for which the load information is provided by this object. - :paramtype node_name: str - :keyword node_load_metric_information: List that contains metrics and their load information on - this node. - :paramtype node_load_metric_information: - list[~azure.servicefabric.models.NodeLoadMetricInformation] - """ - super(NodeLoadInfo, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.node_load_metric_information = kwargs.get('node_load_metric_information', None) - - -class NodeLoadMetricInformation(msrest.serialization.Model): - """Represents data structure that contains load information for a certain metric on a node. - - :ivar name: Name of the metric for which this load information is provided. - :vartype name: str - :ivar node_capacity: Total capacity on the node for this metric. - :vartype node_capacity: str - :ivar node_load: Current load on the node for this metric. In future releases of Service Fabric - this parameter will be deprecated in favor of CurrentNodeLoad. - :vartype node_load: str - :ivar node_remaining_capacity: The remaining capacity on the node for this metric. In future - releases of Service Fabric this parameter will be deprecated in favor of NodeCapacityRemaining. - :vartype node_remaining_capacity: str - :ivar is_capacity_violation: Indicates if there is a capacity violation for this metric on the - node. - :vartype is_capacity_violation: bool - :ivar node_buffered_capacity: The value that indicates the reserved capacity for this metric on - the node. - :vartype node_buffered_capacity: str - :ivar node_remaining_buffered_capacity: The remaining reserved capacity for this metric on the - node. In future releases of Service Fabric this parameter will be deprecated in favor of - BufferedNodeCapacityRemaining. - :vartype node_remaining_buffered_capacity: str - :ivar current_node_load: Current load on the node for this metric. - :vartype current_node_load: str - :ivar node_capacity_remaining: The remaining capacity on the node for the metric. - :vartype node_capacity_remaining: str - :ivar buffered_node_capacity_remaining: The remaining capacity which is not reserved by - NodeBufferPercentage for this metric on the node. - :vartype buffered_node_capacity_remaining: str - :ivar planned_node_load_removal: This value represents the load of the replicas that are - planned to be removed in the future. - This kind of load is reported for replicas that are currently being moving to other nodes and - for replicas that are currently being dropped but still use the load on the source node. - :vartype planned_node_load_removal: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'node_capacity': {'key': 'NodeCapacity', 'type': 'str'}, - 'node_load': {'key': 'NodeLoad', 'type': 'str'}, - 'node_remaining_capacity': {'key': 'NodeRemainingCapacity', 'type': 'str'}, - 'is_capacity_violation': {'key': 'IsCapacityViolation', 'type': 'bool'}, - 'node_buffered_capacity': {'key': 'NodeBufferedCapacity', 'type': 'str'}, - 'node_remaining_buffered_capacity': {'key': 'NodeRemainingBufferedCapacity', 'type': 'str'}, - 'current_node_load': {'key': 'CurrentNodeLoad', 'type': 'str'}, - 'node_capacity_remaining': {'key': 'NodeCapacityRemaining', 'type': 'str'}, - 'buffered_node_capacity_remaining': {'key': 'BufferedNodeCapacityRemaining', 'type': 'str'}, - 'planned_node_load_removal': {'key': 'PlannedNodeLoadRemoval', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Name of the metric for which this load information is provided. - :paramtype name: str - :keyword node_capacity: Total capacity on the node for this metric. - :paramtype node_capacity: str - :keyword node_load: Current load on the node for this metric. In future releases of Service - Fabric this parameter will be deprecated in favor of CurrentNodeLoad. - :paramtype node_load: str - :keyword node_remaining_capacity: The remaining capacity on the node for this metric. In future - releases of Service Fabric this parameter will be deprecated in favor of NodeCapacityRemaining. - :paramtype node_remaining_capacity: str - :keyword is_capacity_violation: Indicates if there is a capacity violation for this metric on - the node. - :paramtype is_capacity_violation: bool - :keyword node_buffered_capacity: The value that indicates the reserved capacity for this metric - on the node. - :paramtype node_buffered_capacity: str - :keyword node_remaining_buffered_capacity: The remaining reserved capacity for this metric on - the node. In future releases of Service Fabric this parameter will be deprecated in favor of - BufferedNodeCapacityRemaining. - :paramtype node_remaining_buffered_capacity: str - :keyword current_node_load: Current load on the node for this metric. - :paramtype current_node_load: str - :keyword node_capacity_remaining: The remaining capacity on the node for the metric. - :paramtype node_capacity_remaining: str - :keyword buffered_node_capacity_remaining: The remaining capacity which is not reserved by - NodeBufferPercentage for this metric on the node. - :paramtype buffered_node_capacity_remaining: str - :keyword planned_node_load_removal: This value represents the load of the replicas that are - planned to be removed in the future. - This kind of load is reported for replicas that are currently being moving to other nodes and - for replicas that are currently being dropped but still use the load on the source node. - :paramtype planned_node_load_removal: str - """ - super(NodeLoadMetricInformation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.node_capacity = kwargs.get('node_capacity', None) - self.node_load = kwargs.get('node_load', None) - self.node_remaining_capacity = kwargs.get('node_remaining_capacity', None) - self.is_capacity_violation = kwargs.get('is_capacity_violation', None) - self.node_buffered_capacity = kwargs.get('node_buffered_capacity', None) - self.node_remaining_buffered_capacity = kwargs.get('node_remaining_buffered_capacity', None) - self.current_node_load = kwargs.get('current_node_load', None) - self.node_capacity_remaining = kwargs.get('node_capacity_remaining', None) - self.buffered_node_capacity_remaining = kwargs.get('buffered_node_capacity_remaining', None) - self.planned_node_load_removal = kwargs.get('planned_node_load_removal', None) - - -class NodeNewHealthReportEvent(NodeEvent): - """Node Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance_id: Required. Id of Node instance. - :vartype node_instance_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance_id: Required. Id of Node instance. - :paramtype node_instance_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(NodeNewHealthReportEvent, self).__init__(**kwargs) - self.kind = 'NodeNewHealthReport' # type: str - self.node_instance_id = kwargs['node_instance_id'] - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class NodeOpenFailedEvent(NodeEvent): - """Node Open Failed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar node_id: Required. Id of Node. - :vartype node_id: str - :ivar upgrade_domain: Required. Upgrade domain of Node. - :vartype upgrade_domain: str - :ivar fault_domain: Required. Fault domain of Node. - :vartype fault_domain: str - :ivar ip_address_or_fqdn: Required. IP address or FQDN. - :vartype ip_address_or_fqdn: str - :ivar hostname: Required. Name of Host. - :vartype hostname: str - :ivar is_seed_node: Required. Indicates if it is seed node. - :vartype is_seed_node: bool - :ivar node_version: Required. Version of Node. - :vartype node_version: str - :ivar error: Required. Describes the error. - :vartype error: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - 'error': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - 'error': {'key': 'Error', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword node_id: Required. Id of Node. - :paramtype node_id: str - :keyword upgrade_domain: Required. Upgrade domain of Node. - :paramtype upgrade_domain: str - :keyword fault_domain: Required. Fault domain of Node. - :paramtype fault_domain: str - :keyword ip_address_or_fqdn: Required. IP address or FQDN. - :paramtype ip_address_or_fqdn: str - :keyword hostname: Required. Name of Host. - :paramtype hostname: str - :keyword is_seed_node: Required. Indicates if it is seed node. - :paramtype is_seed_node: bool - :keyword node_version: Required. Version of Node. - :paramtype node_version: str - :keyword error: Required. Describes the error. - :paramtype error: str - """ - super(NodeOpenFailedEvent, self).__init__(**kwargs) - self.kind = 'NodeOpenFailed' # type: str - self.node_instance = kwargs['node_instance'] - self.node_id = kwargs['node_id'] - self.upgrade_domain = kwargs['upgrade_domain'] - self.fault_domain = kwargs['fault_domain'] - self.ip_address_or_fqdn = kwargs['ip_address_or_fqdn'] - self.hostname = kwargs['hostname'] - self.is_seed_node = kwargs['is_seed_node'] - self.node_version = kwargs['node_version'] - self.error = kwargs['error'] - - -class NodeOpenSucceededEvent(NodeEvent): - """Node Opened Succeeded event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar node_id: Required. Id of Node. - :vartype node_id: str - :ivar upgrade_domain: Required. Upgrade domain of Node. - :vartype upgrade_domain: str - :ivar fault_domain: Required. Fault domain of Node. - :vartype fault_domain: str - :ivar ip_address_or_fqdn: Required. IP address or FQDN. - :vartype ip_address_or_fqdn: str - :ivar hostname: Required. Name of Host. - :vartype hostname: str - :ivar is_seed_node: Required. Indicates if it is seed node. - :vartype is_seed_node: bool - :ivar node_version: Required. Version of Node. - :vartype node_version: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword node_id: Required. Id of Node. - :paramtype node_id: str - :keyword upgrade_domain: Required. Upgrade domain of Node. - :paramtype upgrade_domain: str - :keyword fault_domain: Required. Fault domain of Node. - :paramtype fault_domain: str - :keyword ip_address_or_fqdn: Required. IP address or FQDN. - :paramtype ip_address_or_fqdn: str - :keyword hostname: Required. Name of Host. - :paramtype hostname: str - :keyword is_seed_node: Required. Indicates if it is seed node. - :paramtype is_seed_node: bool - :keyword node_version: Required. Version of Node. - :paramtype node_version: str - """ - super(NodeOpenSucceededEvent, self).__init__(**kwargs) - self.kind = 'NodeOpenSucceeded' # type: str - self.node_instance = kwargs['node_instance'] - self.node_id = kwargs['node_id'] - self.upgrade_domain = kwargs['upgrade_domain'] - self.fault_domain = kwargs['fault_domain'] - self.ip_address_or_fqdn = kwargs['ip_address_or_fqdn'] - self.hostname = kwargs['hostname'] - self.is_seed_node = kwargs['is_seed_node'] - self.node_version = kwargs['node_version'] - - -class NodeRemovedFromClusterEvent(NodeEvent): - """Node Removed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_id: Required. Id of Node. - :vartype node_id: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar node_type: Required. Type of Node. - :vartype node_type: str - :ivar fabric_version: Required. Fabric version. - :vartype fabric_version: str - :ivar ip_address_or_fqdn: Required. IP address or FQDN. - :vartype ip_address_or_fqdn: str - :ivar node_capacities: Required. Capacities. - :vartype node_capacities: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'node_type': {'required': True}, - 'fabric_version': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'node_capacities': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_type': {'key': 'NodeType', 'type': 'str'}, - 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_id: Required. Id of Node. - :paramtype node_id: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword node_type: Required. Type of Node. - :paramtype node_type: str - :keyword fabric_version: Required. Fabric version. - :paramtype fabric_version: str - :keyword ip_address_or_fqdn: Required. IP address or FQDN. - :paramtype ip_address_or_fqdn: str - :keyword node_capacities: Required. Capacities. - :paramtype node_capacities: str - """ - super(NodeRemovedFromClusterEvent, self).__init__(**kwargs) - self.kind = 'NodeRemovedFromCluster' # type: str - self.node_id = kwargs['node_id'] - self.node_instance = kwargs['node_instance'] - self.node_type = kwargs['node_type'] - self.fabric_version = kwargs['fabric_version'] - self.ip_address_or_fqdn = kwargs['ip_address_or_fqdn'] - self.node_capacities = kwargs['node_capacities'] - - -class RepairImpactDescriptionBase(msrest.serialization.Model): - """Describes the expected impact of executing a repair task. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NodeRepairImpactDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of repair impact represented by the current object.Constant - filled by server. Possible values include: "Invalid", "Node". - :vartype kind: str or ~azure.servicefabric.models.RepairImpactKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Node': 'NodeRepairImpactDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(RepairImpactDescriptionBase, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class NodeRepairImpactDescription(RepairImpactDescriptionBase): - """Describes the expected impact of a repair on a set of nodes. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of repair impact represented by the current object.Constant - filled by server. Possible values include: "Invalid", "Node". - :vartype kind: str or ~azure.servicefabric.models.RepairImpactKind - :ivar node_impact_list: The list of nodes impacted by a repair action and their respective - expected impact. - :vartype node_impact_list: list[~azure.servicefabric.models.NodeImpact] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_impact_list': {'key': 'NodeImpactList', 'type': '[NodeImpact]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword node_impact_list: The list of nodes impacted by a repair action and their respective - expected impact. - :paramtype node_impact_list: list[~azure.servicefabric.models.NodeImpact] - """ - super(NodeRepairImpactDescription, self).__init__(**kwargs) - self.kind = 'Node' # type: str - self.node_impact_list = kwargs.get('node_impact_list', None) - - -class RepairTargetDescriptionBase(msrest.serialization.Model): - """Describes the entities targeted by a repair action. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NodeRepairTargetDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of repair target described by the current object.Constant filled - by server. Possible values include: "Invalid", "Node". - :vartype kind: str or ~azure.servicefabric.models.RepairTargetKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Node': 'NodeRepairTargetDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(RepairTargetDescriptionBase, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class NodeRepairTargetDescription(RepairTargetDescriptionBase): - """Describes the list of nodes targeted by a repair action. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of repair target described by the current object.Constant filled - by server. Possible values include: "Invalid", "Node". - :vartype kind: str or ~azure.servicefabric.models.RepairTargetKind - :ivar node_names: The list of nodes targeted by a repair action. - :vartype node_names: list[str] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_names': {'key': 'NodeNames', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword node_names: The list of nodes targeted by a repair action. - :paramtype node_names: list[str] - """ - super(NodeRepairTargetDescription, self).__init__(**kwargs) - self.kind = 'Node' # type: str - self.node_names = kwargs.get('node_names', None) - - -class NodeResult(msrest.serialization.Model): - """Contains information about a node that was targeted by a user-induced operation. - - :ivar node_name: The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance_id: The node instance id. - :vartype node_instance_id: str - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword node_name: The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance_id: The node instance id. - :paramtype node_instance_id: str - """ - super(NodeResult, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.node_instance_id = kwargs.get('node_instance_id', None) - - -class NodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for nodes, containing health evaluations for each unhealthy node that impacted current aggregated health state. Can be returned when evaluating cluster health and the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes from the - ClusterHealthPolicy. - :vartype max_percent_unhealthy_nodes: int - :ivar total_count: Total number of nodes found in the health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes from the - ClusterHealthPolicy. - :paramtype max_percent_unhealthy_nodes: int - :keyword total_count: Total number of nodes found in the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(NodesHealthEvaluation, self).__init__(**kwargs) - self.kind = 'Nodes' # type: str - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class NodeTagsDescription(msrest.serialization.Model): - """Describes the tags required for placement or running of the service. - - All required parameters must be populated in order to send to Azure. - - :ivar count: Required. The number of tags. - :vartype count: int - :ivar tags: Required. A set of tags. Array of size specified by the ‘Count’ parameter, for the - placement tags of the service. - :vartype tags: list[str] - """ - - _validation = { - 'count': {'required': True}, - 'tags': {'required': True}, - } - - _attribute_map = { - 'count': {'key': 'Count', 'type': 'int'}, - 'tags': {'key': 'Tags', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword count: Required. The number of tags. - :paramtype count: int - :keyword tags: Required. A set of tags. Array of size specified by the ‘Count’ parameter, for - the placement tags of the service. - :paramtype tags: list[str] - """ - super(NodeTagsDescription, self).__init__(**kwargs) - self.count = kwargs['count'] - self.tags = kwargs['tags'] - - -class NodeTransitionProgress(msrest.serialization.Model): - """Information about an NodeTransition operation. This class contains an OperationState and a NodeTransitionResult. The NodeTransitionResult is not valid until OperationState -is Completed or Faulted. - - :ivar state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :vartype state: str or ~azure.servicefabric.models.OperationState - :ivar node_transition_result: Represents information about an operation in a terminal state - (Completed or Faulted). - :vartype node_transition_result: ~azure.servicefabric.models.NodeTransitionResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'node_transition_result': {'key': 'NodeTransitionResult', 'type': 'NodeTransitionResult'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :paramtype state: str or ~azure.servicefabric.models.OperationState - :keyword node_transition_result: Represents information about an operation in a terminal state - (Completed or Faulted). - :paramtype node_transition_result: ~azure.servicefabric.models.NodeTransitionResult - """ - super(NodeTransitionProgress, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.node_transition_result = kwargs.get('node_transition_result', None) - - -class NodeTransitionResult(msrest.serialization.Model): - """Represents information about an operation in a terminal state (Completed or Faulted). - - :ivar error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, - this is an error code indicating the reason. - :vartype error_code: int - :ivar node_result: Contains information about a node that was targeted by a user-induced - operation. - :vartype node_result: ~azure.servicefabric.models.NodeResult - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'node_result': {'key': 'NodeResult', 'type': 'NodeResult'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, - this is an error code indicating the reason. - :paramtype error_code: int - :keyword node_result: Contains information about a node that was targeted by a user-induced - operation. - :paramtype node_result: ~azure.servicefabric.models.NodeResult - """ - super(NodeTransitionResult, self).__init__(**kwargs) - self.error_code = kwargs.get('error_code', None) - self.node_result = kwargs.get('node_result', None) - - -class NodeTypeHealthPolicyMapItem(msrest.serialization.Model): - """Defines an item in NodeTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :ivar key: Required. The key of the node type health policy map item. This is the name of the - node type. - :vartype key: str - :ivar value: Required. The value of the node type health policy map item. - If the percentage is respected but there is at least one unhealthy node in the node type, the - health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy nodes over the total number - of nodes in the node type. - The computation rounds up to tolerate one failure on small numbers of nodes. - The max percent unhealthy nodes allowed for the node type. Must be between zero and 100. - :vartype value: int - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: Required. The key of the node type health policy map item. This is the name of - the node type. - :paramtype key: str - :keyword value: Required. The value of the node type health policy map item. - If the percentage is respected but there is at least one unhealthy node in the node type, the - health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy nodes over the total number - of nodes in the node type. - The computation rounds up to tolerate one failure on small numbers of nodes. - The max percent unhealthy nodes allowed for the node type. Must be between zero and 100. - :paramtype value: int - """ - super(NodeTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = kwargs['key'] - self.value = kwargs['value'] - - -class NodeTypeNodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for nodes of a particular node type. The node type nodes evaluation can be returned when cluster health evaluation returns unhealthy aggregated health state, either Error or Warning. It contains health evaluations for each unhealthy node of the included node type that impacted current aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar node_type_name: The node type name as defined in the cluster manifest. - :vartype node_type_name: str - :ivar max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes for the node - type, specified as an entry in NodeTypeHealthPolicyMap. - :vartype max_percent_unhealthy_nodes: int - :ivar total_count: Total number of nodes of the node type found in the health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy NodeHealthEvaluation of this node type that impacted the - aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'node_type_name': {'key': 'NodeTypeName', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword node_type_name: The node type name as defined in the cluster manifest. - :paramtype node_type_name: str - :keyword max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes for the - node type, specified as an entry in NodeTypeHealthPolicyMap. - :paramtype max_percent_unhealthy_nodes: int - :keyword total_count: Total number of nodes of the node type found in the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy NodeHealthEvaluation of this node type that impacted the - aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(NodeTypeNodesHealthEvaluation, self).__init__(**kwargs) - self.kind = 'NodeTypeNodes' # type: str - self.node_type_name = kwargs.get('node_type_name', None) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class NodeUpEvent(NodeEvent): - """Node Up event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar last_node_down_at: Required. Time when Node was last down. - :vartype last_node_down_at: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'last_node_down_at': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'last_node_down_at': {'key': 'LastNodeDownAt', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword last_node_down_at: Required. Time when Node was last down. - :paramtype last_node_down_at: ~datetime.datetime - """ - super(NodeUpEvent, self).__init__(**kwargs) - self.kind = 'NodeUp' # type: str - self.node_instance = kwargs['node_instance'] - self.last_node_down_at = kwargs['last_node_down_at'] - - -class NodeUpgradeProgressInfo(msrest.serialization.Model): - """Information about the upgrading node and its status. - - :ivar node_name: The name of a Service Fabric node. - :vartype node_name: str - :ivar upgrade_phase: The state of the upgrading node. Possible values include: "Invalid", - "PreUpgradeSafetyCheck", "Upgrading", "PostUpgradeSafetyCheck". - :vartype upgrade_phase: str or ~azure.servicefabric.models.NodeUpgradePhase - :ivar pending_safety_checks: List of pending safety checks. - :vartype pending_safety_checks: list[~azure.servicefabric.models.SafetyCheckWrapper] - :ivar upgrade_duration: The estimated time spent processing the node since it was deactivated - during a node-by-node upgrade. - :vartype upgrade_duration: str - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'upgrade_phase': {'key': 'UpgradePhase', 'type': 'str'}, - 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword node_name: The name of a Service Fabric node. - :paramtype node_name: str - :keyword upgrade_phase: The state of the upgrading node. Possible values include: "Invalid", - "PreUpgradeSafetyCheck", "Upgrading", "PostUpgradeSafetyCheck". - :paramtype upgrade_phase: str or ~azure.servicefabric.models.NodeUpgradePhase - :keyword pending_safety_checks: List of pending safety checks. - :paramtype pending_safety_checks: list[~azure.servicefabric.models.SafetyCheckWrapper] - :keyword upgrade_duration: The estimated time spent processing the node since it was - deactivated during a node-by-node upgrade. - :paramtype upgrade_duration: str - """ - super(NodeUpgradeProgressInfo, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.upgrade_phase = kwargs.get('upgrade_phase', None) - self.pending_safety_checks = kwargs.get('pending_safety_checks', None) - self.upgrade_duration = kwargs.get('upgrade_duration', None) - - -class OperationStatus(msrest.serialization.Model): - """Contains the OperationId, OperationState, and OperationType for user-induced operations. - - :ivar operation_id: A GUID that identifies a call to this API. This is also passed into the - corresponding GetProgress API. - :vartype operation_id: str - :ivar state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :vartype state: str or ~azure.servicefabric.models.OperationState - :ivar type: The type of the operation. Possible values include: "Invalid", "PartitionDataLoss", - "PartitionQuorumLoss", "PartitionRestart", "NodeTransition". - :vartype type: str or ~azure.servicefabric.models.OperationType - """ - - _attribute_map = { - 'operation_id': {'key': 'OperationId', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword operation_id: A GUID that identifies a call to this API. This is also passed into the - corresponding GetProgress API. - :paramtype operation_id: str - :keyword state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :paramtype state: str or ~azure.servicefabric.models.OperationState - :keyword type: The type of the operation. Possible values include: "Invalid", - "PartitionDataLoss", "PartitionQuorumLoss", "PartitionRestart", "NodeTransition". - :paramtype type: str or ~azure.servicefabric.models.OperationType - """ - super(OperationStatus, self).__init__(**kwargs) - self.operation_id = kwargs.get('operation_id', None) - self.state = kwargs.get('state', None) - self.type = kwargs.get('type', None) - - -class PackageSharingPolicyInfo(msrest.serialization.Model): - """Represents a policy for the package sharing. - - :ivar shared_package_name: The name of code, configuration or data package that should be - shared. - :vartype shared_package_name: str - :ivar package_sharing_scope: Represents the scope for PackageSharingPolicy. This is specified - during DeployServicePackageToNode operation. Possible values include: "None", "All", "Code", - "Config", "Data". - :vartype package_sharing_scope: str or ~azure.servicefabric.models.PackageSharingPolicyScope - """ - - _attribute_map = { - 'shared_package_name': {'key': 'SharedPackageName', 'type': 'str'}, - 'package_sharing_scope': {'key': 'PackageSharingScope', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword shared_package_name: The name of code, configuration or data package that should be - shared. - :paramtype shared_package_name: str - :keyword package_sharing_scope: Represents the scope for PackageSharingPolicy. This is - specified during DeployServicePackageToNode operation. Possible values include: "None", "All", - "Code", "Config", "Data". - :paramtype package_sharing_scope: str or ~azure.servicefabric.models.PackageSharingPolicyScope - """ - super(PackageSharingPolicyInfo, self).__init__(**kwargs) - self.shared_package_name = kwargs.get('shared_package_name', None) - self.package_sharing_scope = kwargs.get('package_sharing_scope', None) - - -class PagedApplicationInfoList(msrest.serialization.Model): - """The list of applications in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of application information. - :vartype items: list[~azure.servicefabric.models.ApplicationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of application information. - :paramtype items: list[~azure.servicefabric.models.ApplicationInfo] - """ - super(PagedApplicationInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedApplicationResourceDescriptionList(msrest.serialization.Model): - """The list of application resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: One page of the list. - :vartype items: list[~azure.servicefabric.models.ApplicationResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationResourceDescription]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: One page of the list. - :paramtype items: list[~azure.servicefabric.models.ApplicationResourceDescription] - """ - super(PagedApplicationResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedApplicationTypeInfoList(msrest.serialization.Model): - """The list of application types that are provisioned or being provisioned in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of application type information. - :vartype items: list[~azure.servicefabric.models.ApplicationTypeInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationTypeInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of application type information. - :paramtype items: list[~azure.servicefabric.models.ApplicationTypeInfo] - """ - super(PagedApplicationTypeInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedBackupConfigurationInfoList(msrest.serialization.Model): - """The list of backup configuration information. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of backup configuration information. - :vartype items: list[~azure.servicefabric.models.BackupConfigurationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupConfigurationInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of backup configuration information. - :paramtype items: list[~azure.servicefabric.models.BackupConfigurationInfo] - """ - super(PagedBackupConfigurationInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedBackupEntityList(msrest.serialization.Model): - """The list of backup entities that are being periodically backed. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of backup entity information. - :vartype items: list[~azure.servicefabric.models.BackupEntity] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupEntity]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of backup entity information. - :paramtype items: list[~azure.servicefabric.models.BackupEntity] - """ - super(PagedBackupEntityList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedBackupInfoList(msrest.serialization.Model): - """The list of backups. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of backup information. - :vartype items: list[~azure.servicefabric.models.BackupInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of backup information. - :paramtype items: list[~azure.servicefabric.models.BackupInfo] - """ - super(PagedBackupInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedBackupPolicyDescriptionList(msrest.serialization.Model): - """The list of backup policies configured in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: The list of backup policies information. - :vartype items: list[~azure.servicefabric.models.BackupPolicyDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupPolicyDescription]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: The list of backup policies information. - :paramtype items: list[~azure.servicefabric.models.BackupPolicyDescription] - """ - super(PagedBackupPolicyDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedComposeDeploymentStatusInfoList(msrest.serialization.Model): - """The list of compose deployments in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of compose deployment status information. - :vartype items: list[~azure.servicefabric.models.ComposeDeploymentStatusInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ComposeDeploymentStatusInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of compose deployment status information. - :paramtype items: list[~azure.servicefabric.models.ComposeDeploymentStatusInfo] - """ - super(PagedComposeDeploymentStatusInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedDeployedApplicationInfoList(msrest.serialization.Model): - """The list of deployed applications in activating, downloading, or active states on a node. -The list is paged when all of the results cannot fit in a single message. -The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of deployed application information. - :vartype items: list[~azure.servicefabric.models.DeployedApplicationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[DeployedApplicationInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of deployed application information. - :paramtype items: list[~azure.servicefabric.models.DeployedApplicationInfo] - """ - super(PagedDeployedApplicationInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedGatewayResourceDescriptionList(msrest.serialization.Model): - """The list of gateway resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: One page of the list. - :vartype items: list[~azure.servicefabric.models.GatewayResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[GatewayResourceDescription]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: One page of the list. - :paramtype items: list[~azure.servicefabric.models.GatewayResourceDescription] - """ - super(PagedGatewayResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedNetworkResourceDescriptionList(msrest.serialization.Model): - """The list of network resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: One page of the list. - :vartype items: list[~azure.servicefabric.models.NetworkResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[NetworkResourceDescription]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: One page of the list. - :paramtype items: list[~azure.servicefabric.models.NetworkResourceDescription] - """ - super(PagedNetworkResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedNodeInfoList(msrest.serialization.Model): - """The list of nodes in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of node information. - :vartype items: list[~azure.servicefabric.models.NodeInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[NodeInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of node information. - :paramtype items: list[~azure.servicefabric.models.NodeInfo] - """ - super(PagedNodeInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedPropertyInfoList(msrest.serialization.Model): - """The paged list of Service Fabric properties under a given name. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar is_consistent: Indicates whether any property under the given name has been modified - during the enumeration. If there was a modification, this property value is false. - :vartype is_consistent: bool - :ivar properties: List of property information. - :vartype properties: list[~azure.servicefabric.models.PropertyInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, - 'properties': {'key': 'Properties', 'type': '[PropertyInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword is_consistent: Indicates whether any property under the given name has been modified - during the enumeration. If there was a modification, this property value is false. - :paramtype is_consistent: bool - :keyword properties: List of property information. - :paramtype properties: list[~azure.servicefabric.models.PropertyInfo] - """ - super(PagedPropertyInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.is_consistent = kwargs.get('is_consistent', None) - self.properties = kwargs.get('properties', None) - - -class PagedReplicaInfoList(msrest.serialization.Model): - """The list of replicas in the cluster for a given partition. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of replica information. - :vartype items: list[~azure.servicefabric.models.ReplicaInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ReplicaInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of replica information. - :paramtype items: list[~azure.servicefabric.models.ReplicaInfo] - """ - super(PagedReplicaInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedSecretResourceDescriptionList(msrest.serialization.Model): - """The list of secret resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: One page of the list. - :vartype items: list[~azure.servicefabric.models.SecretResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[SecretResourceDescription]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: One page of the list. - :paramtype items: list[~azure.servicefabric.models.SecretResourceDescription] - """ - super(PagedSecretResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedSecretValueResourceDescriptionList(msrest.serialization.Model): - """The list of values of a secret resource, paged if the number of results exceeds the limits of a single message. The next set of results can be obtained by executing the same query with the continuation token provided in the previous page. - - :ivar 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. - :vartype continuation_token: str - :ivar items: One page of the list. - :vartype items: list[~azure.servicefabric.models.SecretValueResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[SecretValueResourceDescription]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: One page of the list. - :paramtype items: list[~azure.servicefabric.models.SecretValueResourceDescription] - """ - super(PagedSecretValueResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedServiceInfoList(msrest.serialization.Model): - """The list of services in the cluster for an application. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of service information. - :vartype items: list[~azure.servicefabric.models.ServiceInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of service information. - :paramtype items: list[~azure.servicefabric.models.ServiceInfo] - """ - super(PagedServiceInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedServicePartitionInfoList(msrest.serialization.Model): - """The list of partition in the cluster for a service. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of service partition information. - :vartype items: list[~azure.servicefabric.models.ServicePartitionInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServicePartitionInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of service partition information. - :paramtype items: list[~azure.servicefabric.models.ServicePartitionInfo] - """ - super(PagedServicePartitionInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedServiceReplicaDescriptionList(msrest.serialization.Model): - """The list of service resource replicas in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of service resource replica description. - :vartype items: list[~azure.servicefabric.models.ServiceReplicaDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceReplicaDescription]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of service resource replica description. - :paramtype items: list[~azure.servicefabric.models.ServiceReplicaDescription] - """ - super(PagedServiceReplicaDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedServiceResourceDescriptionList(msrest.serialization.Model): - """The list of service resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: One page of the list. - :vartype items: list[~azure.servicefabric.models.ServiceResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceResourceDescription]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: One page of the list. - :paramtype items: list[~azure.servicefabric.models.ServiceResourceDescription] - """ - super(PagedServiceResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedSubNameInfoList(msrest.serialization.Model): - """A paged list of Service Fabric names. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar is_consistent: Indicates whether any name under the given name has been modified during - the enumeration. If there was a modification, this property value is false. - :vartype is_consistent: bool - :ivar sub_names: List of the child names. - :vartype sub_names: list[str] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, - 'sub_names': {'key': 'SubNames', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword is_consistent: Indicates whether any name under the given name has been modified - during the enumeration. If there was a modification, this property value is false. - :paramtype is_consistent: bool - :keyword sub_names: List of the child names. - :paramtype sub_names: list[str] - """ - super(PagedSubNameInfoList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.is_consistent = kwargs.get('is_consistent', None) - self.sub_names = kwargs.get('sub_names', None) - - -class PagedUpdatePartitionLoadResultList(msrest.serialization.Model): - """The list of results of the call UpdatePartitionLoad. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of partition load update information. - :vartype items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[UpdatePartitionLoadResult]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of partition load update information. - :paramtype items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] - """ - super(PagedUpdatePartitionLoadResultList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PagedVolumeResourceDescriptionList(msrest.serialization.Model): - """The list of volume resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: One page of the list. - :vartype items: list[~azure.servicefabric.models.VolumeResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[VolumeResourceDescription]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: One page of the list. - :paramtype items: list[~azure.servicefabric.models.VolumeResourceDescription] - """ - super(PagedVolumeResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = kwargs.get('continuation_token', None) - self.items = kwargs.get('items', None) - - -class PartitionAnalysisEvent(PartitionEvent): - """Represents the base for all Partition Analysis Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionPrimaryMoveAnalysisEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar metadata: Required. Metadata about an Analysis Event. - :vartype metadata: ~azure.servicefabric.models.AnalysisEventMetadata - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'metadata': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, - } - - _subtype_map = { - 'kind': {'PartitionPrimaryMoveAnalysis': 'PartitionPrimaryMoveAnalysisEvent'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword metadata: Required. Metadata about an Analysis Event. - :paramtype metadata: ~azure.servicefabric.models.AnalysisEventMetadata - """ - super(PartitionAnalysisEvent, self).__init__(**kwargs) - self.kind = 'PartitionAnalysisEvent' # type: str - self.metadata = kwargs['metadata'] - - -class PartitionBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information, for a specific partition, specifying what backup policy is being applied and suspend description, if any. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The entity type of a Service Fabric entity such as Application, Service - or a Partition where periodic backups can be enabled.Constant filled by server. Possible values - include: "Invalid", "Partition", "Service", "Application". - :vartype kind: str or ~azure.servicefabric.models.BackupEntityKind - :ivar policy_name: The name of the backup policy which is applicable to this Service Fabric - application or service or partition. - :vartype policy_name: str - :ivar policy_inherited_from: Specifies the scope at which the backup policy is applied. - Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope - :ivar suspension_info: Describes the backup suspension details. - :vartype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :ivar service_name: The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar partition_id: The partition ID identifying the partition. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword policy_name: The name of the backup policy which is applicable to this Service Fabric - application or service or partition. - :paramtype policy_name: str - :keyword policy_inherited_from: Specifies the scope at which the backup policy is applied. - Possible values include: "Invalid", "Partition", "Service", "Application". - :paramtype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope - :keyword suspension_info: Describes the backup suspension details. - :paramtype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :keyword service_name: The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword partition_id: The partition ID identifying the partition. - :paramtype partition_id: str - """ - super(PartitionBackupConfigurationInfo, self).__init__(**kwargs) - self.kind = 'Partition' # type: str - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - - -class PartitionBackupEntity(BackupEntity): - """Identifies the Service Fabric stateful partition which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :ivar entity_kind: Required. The entity type of a Service Fabric entity such as Application, - Service or a Partition where periodic backups can be enabled.Constant filled by server. - Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype entity_kind: str or ~azure.servicefabric.models.BackupEntityKind - :ivar service_name: The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar partition_id: The partition ID identifying the partition. - :vartype partition_id: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_name: The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword partition_id: The partition ID identifying the partition. - :paramtype partition_id: str - """ - super(PartitionBackupEntity, self).__init__(**kwargs) - self.entity_kind = 'Partition' # type: str - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - - -class PartitionDataLossProgress(msrest.serialization.Model): - """Information about a partition data loss user-induced operation. - - :ivar state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :vartype state: str or ~azure.servicefabric.models.OperationState - :ivar invoke_data_loss_result: Represents information about an operation in a terminal state - (Completed or Faulted). - :vartype invoke_data_loss_result: ~azure.servicefabric.models.InvokeDataLossResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'invoke_data_loss_result': {'key': 'InvokeDataLossResult', 'type': 'InvokeDataLossResult'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :paramtype state: str or ~azure.servicefabric.models.OperationState - :keyword invoke_data_loss_result: Represents information about an operation in a terminal state - (Completed or Faulted). - :paramtype invoke_data_loss_result: ~azure.servicefabric.models.InvokeDataLossResult - """ - super(PartitionDataLossProgress, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.invoke_data_loss_result = kwargs.get('invoke_data_loss_result', None) - - -class PartitionHealth(EntityHealth): - """Information about the health of a Service Fabric partition. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar partition_id: ID of the partition whose health information is described by this object. - :vartype partition_id: str - :ivar replica_health_states: The list of replica health states associated with the partition. - :vartype replica_health_states: list[~azure.servicefabric.models.ReplicaHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_health_states': {'key': 'ReplicaHealthStates', 'type': '[ReplicaHealthState]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword partition_id: ID of the partition whose health information is described by this - object. - :paramtype partition_id: str - :keyword replica_health_states: The list of replica health states associated with the - partition. - :paramtype replica_health_states: list[~azure.servicefabric.models.ReplicaHealthState] - """ - super(PartitionHealth, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.replica_health_states = kwargs.get('replica_health_states', None) - - -class PartitionHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a partition, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar partition_id: Id of the partition whose health evaluation is described by this object. - :vartype partition_id: str - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated - health state of the partition. The types of the unhealthy evaluations can be - ReplicasHealthEvaluation or EventHealthEvaluation. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword partition_id: Id of the partition whose health evaluation is described by this object. - :paramtype partition_id: str - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current - aggregated health state of the partition. The types of the unhealthy evaluations can be - ReplicasHealthEvaluation or EventHealthEvaluation. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(PartitionHealthEvaluation, self).__init__(**kwargs) - self.kind = 'Partition' # type: str - self.partition_id = kwargs.get('partition_id', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class PartitionHealthReportExpiredEvent(PartitionEvent): - """Partition Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(PartitionHealthReportExpiredEvent, self).__init__(**kwargs) - self.kind = 'PartitionHealthReportExpired' # type: str - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class PartitionHealthState(EntityHealthState): - """Represents the health state of a partition, which contains the partition identifier and its aggregated health state. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar partition_id: Id of the partition whose health state is described by this object. - :vartype partition_id: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword partition_id: Id of the partition whose health state is described by this object. - :paramtype partition_id: str - """ - super(PartitionHealthState, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - - -class PartitionHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a partition, which contains the partition ID, its aggregated health state and any replicas that respect the filters in the cluster health chunk query description. - - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar partition_id: The Id of the partition. - :vartype partition_id: str - :ivar replica_health_state_chunks: The list of replica health state chunks belonging to the - partition that respect the filters in the cluster health chunk query description. - :vartype replica_health_state_chunks: ~azure.servicefabric.models.ReplicaHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_health_state_chunks': {'key': 'ReplicaHealthStateChunks', 'type': 'ReplicaHealthStateChunkList'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword partition_id: The Id of the partition. - :paramtype partition_id: str - :keyword replica_health_state_chunks: The list of replica health state chunks belonging to the - partition that respect the filters in the cluster health chunk query description. - :paramtype replica_health_state_chunks: ~azure.servicefabric.models.ReplicaHealthStateChunkList - """ - super(PartitionHealthStateChunk, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.replica_health_state_chunks = kwargs.get('replica_health_state_chunks', None) - - -class PartitionHealthStateChunkList(msrest.serialization.Model): - """The list of partition health state chunks that respect the input filters in the chunk query description. -Returned by get cluster health state chunks query as part of the parent application hierarchy. - - :ivar items: The list of partition health state chunks that respect the input filters in the - chunk query. - :vartype items: list[~azure.servicefabric.models.PartitionHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[PartitionHealthStateChunk]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword items: The list of partition health state chunks that respect the input filters in the - chunk query. - :paramtype items: list[~azure.servicefabric.models.PartitionHealthStateChunk] - """ - super(PartitionHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) - - -class PartitionHealthStateFilter(msrest.serialization.Model): - """Defines matching criteria to determine whether a partition should be included as a child of a service in the cluster health chunk. -The partitions are only returned if the parent entities match a filter specified in the cluster health chunk query description. The parent service and application must be included in the cluster health chunk. -One filter can match zero, one or multiple partitions, depending on its properties. - - :ivar partition_id_filter: ID of the partition that matches the filter. The filter is applied - only to the specified partition, if it exists. - If the partition doesn't exist, no partition is returned in the cluster health chunk based on - this filter. - If the partition exists, it is included in the cluster health chunk if it respects the other - filter properties. - If not specified, all partitions that match the parent filters (if any) are taken into - consideration and matched against the other filter members, like health state filter. - :vartype partition_id_filter: str - :ivar health_state_filter: The filter for the health state of the partitions. It allows - selecting partitions if they match the desired health states. - The possible values are integer value of one of the following health states. Only partitions - that match the filter are returned. All partitions are used to evaluate the cluster aggregated - health state. - If not specified, default value is None, unless the partition ID is specified. If the filter - has default value and partition ID is specified, the matching partition is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches partitions with HealthState value of OK - (2) and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :vartype health_state_filter: int - :ivar replica_filters: Defines a list of filters that specify which replicas to be included in - the returned cluster health chunk as children of the parent partition. The replicas are - returned only if the parent partition matches a filter. - If the list is empty, no replicas are returned. All the replicas are used to evaluate the - parent partition aggregated health state, regardless of the input filters. - The partition filter may specify multiple replica filters. - For example, it can specify a filter to return all replicas with health state Error and - another filter to always include a replica identified by its replica id. - :vartype replica_filters: list[~azure.servicefabric.models.ReplicaHealthStateFilter] - """ - - _attribute_map = { - 'partition_id_filter': {'key': 'PartitionIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'replica_filters': {'key': 'ReplicaFilters', 'type': '[ReplicaHealthStateFilter]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword partition_id_filter: ID of the partition that matches the filter. The filter is - applied only to the specified partition, if it exists. - If the partition doesn't exist, no partition is returned in the cluster health chunk based on - this filter. - If the partition exists, it is included in the cluster health chunk if it respects the other - filter properties. - If not specified, all partitions that match the parent filters (if any) are taken into - consideration and matched against the other filter members, like health state filter. - :paramtype partition_id_filter: str - :keyword health_state_filter: The filter for the health state of the partitions. It allows - selecting partitions if they match the desired health states. - The possible values are integer value of one of the following health states. Only partitions - that match the filter are returned. All partitions are used to evaluate the cluster aggregated - health state. - If not specified, default value is None, unless the partition ID is specified. If the filter - has default value and partition ID is specified, the matching partition is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches partitions with HealthState value of OK - (2) and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :paramtype health_state_filter: int - :keyword replica_filters: Defines a list of filters that specify which replicas to be included - in the returned cluster health chunk as children of the parent partition. The replicas are - returned only if the parent partition matches a filter. - If the list is empty, no replicas are returned. All the replicas are used to evaluate the - parent partition aggregated health state, regardless of the input filters. - The partition filter may specify multiple replica filters. - For example, it can specify a filter to return all replicas with health state Error and - another filter to always include a replica identified by its replica id. - :paramtype replica_filters: list[~azure.servicefabric.models.ReplicaHealthStateFilter] - """ - super(PartitionHealthStateFilter, self).__init__(**kwargs) - self.partition_id_filter = kwargs.get('partition_id_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - self.replica_filters = kwargs.get('replica_filters', None) - - -class PartitionInstanceCountScaleMechanism(ScalingMechanismDescription): - """Represents a scaling mechanism for adding or removing instances of stateless service partition. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Specifies the kind of scaling mechanism.Constant filled by server. - Possible values include: "Invalid", "PartitionInstanceCount", - "AddRemoveIncrementalNamedPartition". - :vartype kind: str or ~azure.servicefabric.models.ScalingMechanismKind - :ivar min_instance_count: Required. Minimum number of instances of the partition. - :vartype min_instance_count: int - :ivar max_instance_count: Required. Maximum number of instances of the partition. - :vartype max_instance_count: int - :ivar scale_increment: Required. The number of instances to add or remove during a scaling - operation. - :vartype scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_instance_count': {'required': True}, - 'max_instance_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'max_instance_count': {'key': 'MaxInstanceCount', 'type': 'int'}, - 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword min_instance_count: Required. Minimum number of instances of the partition. - :paramtype min_instance_count: int - :keyword max_instance_count: Required. Maximum number of instances of the partition. - :paramtype max_instance_count: int - :keyword scale_increment: Required. The number of instances to add or remove during a scaling - operation. - :paramtype scale_increment: int - """ - super(PartitionInstanceCountScaleMechanism, self).__init__(**kwargs) - self.kind = 'PartitionInstanceCount' # type: str - self.min_instance_count = kwargs['min_instance_count'] - self.max_instance_count = kwargs['max_instance_count'] - self.scale_increment = kwargs['scale_increment'] - - -class PartitionLoadInformation(msrest.serialization.Model): - """Represents load information for a partition, which contains the primary, secondary and auxiliary reported load metrics. -In case there is no load reported, PartitionLoadInformation will contain the default load for the service of the partition. -For default loads, LoadMetricReport's LastReportedUtc is set to 0. - - :ivar partition_id: Id of the partition. - :vartype partition_id: str - :ivar primary_load_metric_reports: Array of load reports from the primary replica for this - partition. - :vartype primary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] - :ivar secondary_load_metric_reports: Array of aggregated load reports from all secondary - replicas for this partition. - Array only contains the latest reported load for each metric. - :vartype secondary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] - :ivar auxiliary_load_metric_reports: Array of aggregated load reports from all auxiliary - replicas for this partition. - Array only contains the latest reported load for each metric. - :vartype auxiliary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'primary_load_metric_reports': {'key': 'PrimaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - 'secondary_load_metric_reports': {'key': 'SecondaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - 'auxiliary_load_metric_reports': {'key': 'AuxiliaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword partition_id: Id of the partition. - :paramtype partition_id: str - :keyword primary_load_metric_reports: Array of load reports from the primary replica for this - partition. - :paramtype primary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] - :keyword secondary_load_metric_reports: Array of aggregated load reports from all secondary - replicas for this partition. - Array only contains the latest reported load for each metric. - :paramtype secondary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] - :keyword auxiliary_load_metric_reports: Array of aggregated load reports from all auxiliary - replicas for this partition. - Array only contains the latest reported load for each metric. - :paramtype auxiliary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] - """ - super(PartitionLoadInformation, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.primary_load_metric_reports = kwargs.get('primary_load_metric_reports', None) - self.secondary_load_metric_reports = kwargs.get('secondary_load_metric_reports', None) - self.auxiliary_load_metric_reports = kwargs.get('auxiliary_load_metric_reports', None) - - -class PartitionMetricLoadDescription(msrest.serialization.Model): - """Represents load information for a partition, which contains the metrics load information about primary, all secondary replicas/instances or a specific secondary replica/instance on a specific node , all auxiliary replicas or a specific auxiliary replica on a specific node. - - :ivar partition_id: Id of the partition. - :vartype partition_id: str - :ivar primary_replica_load_entries: Partition's load information for primary replica, in case - partition is from a stateful service. - :vartype primary_replica_load_entries: list[~azure.servicefabric.models.MetricLoadDescription] - :ivar secondary_replicas_or_instances_load_entries: Partition's load information for all - secondary replicas or instances. - :vartype secondary_replicas_or_instances_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :ivar secondary_replica_or_instance_load_entries_per_node: Partition's load information for a - specific secondary replica or instance located on a specific node. - :vartype secondary_replica_or_instance_load_entries_per_node: - list[~azure.servicefabric.models.ReplicaMetricLoadDescription] - :ivar auxiliary_replicas_load_entries: Partition's load information for all auxiliary replicas. - :vartype auxiliary_replicas_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :ivar auxiliary_replica_load_entries_per_node: Partition's load information for a specific - auxiliary replica located on a specific node. - :vartype auxiliary_replica_load_entries_per_node: - list[~azure.servicefabric.models.ReplicaMetricLoadDescription] - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'primary_replica_load_entries': {'key': 'PrimaryReplicaLoadEntries', 'type': '[MetricLoadDescription]'}, - 'secondary_replicas_or_instances_load_entries': {'key': 'SecondaryReplicasOrInstancesLoadEntries', 'type': '[MetricLoadDescription]'}, - 'secondary_replica_or_instance_load_entries_per_node': {'key': 'SecondaryReplicaOrInstanceLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, - 'auxiliary_replicas_load_entries': {'key': 'AuxiliaryReplicasLoadEntries', 'type': '[MetricLoadDescription]'}, - 'auxiliary_replica_load_entries_per_node': {'key': 'AuxiliaryReplicaLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword partition_id: Id of the partition. - :paramtype partition_id: str - :keyword primary_replica_load_entries: Partition's load information for primary replica, in - case partition is from a stateful service. - :paramtype primary_replica_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :keyword secondary_replicas_or_instances_load_entries: Partition's load information for all - secondary replicas or instances. - :paramtype secondary_replicas_or_instances_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :keyword secondary_replica_or_instance_load_entries_per_node: Partition's load information for - a specific secondary replica or instance located on a specific node. - :paramtype secondary_replica_or_instance_load_entries_per_node: - list[~azure.servicefabric.models.ReplicaMetricLoadDescription] - :keyword auxiliary_replicas_load_entries: Partition's load information for all auxiliary - replicas. - :paramtype auxiliary_replicas_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :keyword auxiliary_replica_load_entries_per_node: Partition's load information for a specific - auxiliary replica located on a specific node. - :paramtype auxiliary_replica_load_entries_per_node: - list[~azure.servicefabric.models.ReplicaMetricLoadDescription] - """ - super(PartitionMetricLoadDescription, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.primary_replica_load_entries = kwargs.get('primary_replica_load_entries', None) - self.secondary_replicas_or_instances_load_entries = kwargs.get('secondary_replicas_or_instances_load_entries', None) - self.secondary_replica_or_instance_load_entries_per_node = kwargs.get('secondary_replica_or_instance_load_entries_per_node', None) - self.auxiliary_replicas_load_entries = kwargs.get('auxiliary_replicas_load_entries', None) - self.auxiliary_replica_load_entries_per_node = kwargs.get('auxiliary_replica_load_entries_per_node', None) - - -class PartitionNewHealthReportEvent(PartitionEvent): - """Partition Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(PartitionNewHealthReportEvent, self).__init__(**kwargs) - self.kind = 'PartitionNewHealthReport' # type: str - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class PartitionPrimaryMoveAnalysisEvent(PartitionAnalysisEvent): - """Partition Primary Move Analysis event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar metadata: Required. Metadata about an Analysis Event. - :vartype metadata: ~azure.servicefabric.models.AnalysisEventMetadata - :ivar when_move_completed: Required. Time when the move was completed. - :vartype when_move_completed: ~datetime.datetime - :ivar previous_node: Required. The name of a Service Fabric node. - :vartype previous_node: str - :ivar current_node: Required. The name of a Service Fabric node. - :vartype current_node: str - :ivar move_reason: Required. Move reason. - :vartype move_reason: str - :ivar relevant_traces: Required. Relevant traces. - :vartype relevant_traces: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'metadata': {'required': True}, - 'when_move_completed': {'required': True}, - 'previous_node': {'required': True}, - 'current_node': {'required': True}, - 'move_reason': {'required': True}, - 'relevant_traces': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, - 'when_move_completed': {'key': 'WhenMoveCompleted', 'type': 'iso-8601'}, - 'previous_node': {'key': 'PreviousNode', 'type': 'str'}, - 'current_node': {'key': 'CurrentNode', 'type': 'str'}, - 'move_reason': {'key': 'MoveReason', 'type': 'str'}, - 'relevant_traces': {'key': 'RelevantTraces', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword metadata: Required. Metadata about an Analysis Event. - :paramtype metadata: ~azure.servicefabric.models.AnalysisEventMetadata - :keyword when_move_completed: Required. Time when the move was completed. - :paramtype when_move_completed: ~datetime.datetime - :keyword previous_node: Required. The name of a Service Fabric node. - :paramtype previous_node: str - :keyword current_node: Required. The name of a Service Fabric node. - :paramtype current_node: str - :keyword move_reason: Required. Move reason. - :paramtype move_reason: str - :keyword relevant_traces: Required. Relevant traces. - :paramtype relevant_traces: str - """ - super(PartitionPrimaryMoveAnalysisEvent, self).__init__(**kwargs) - self.kind = 'PartitionPrimaryMoveAnalysis' # type: str - self.when_move_completed = kwargs['when_move_completed'] - self.previous_node = kwargs['previous_node'] - self.current_node = kwargs['current_node'] - self.move_reason = kwargs['move_reason'] - self.relevant_traces = kwargs['relevant_traces'] - - -class PartitionQuorumLossProgress(msrest.serialization.Model): - """Information about a partition quorum loss user-induced operation. - - :ivar state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :vartype state: str or ~azure.servicefabric.models.OperationState - :ivar invoke_quorum_loss_result: Represents information about an operation in a terminal state - (Completed or Faulted). - :vartype invoke_quorum_loss_result: ~azure.servicefabric.models.InvokeQuorumLossResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'invoke_quorum_loss_result': {'key': 'InvokeQuorumLossResult', 'type': 'InvokeQuorumLossResult'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :paramtype state: str or ~azure.servicefabric.models.OperationState - :keyword invoke_quorum_loss_result: Represents information about an operation in a terminal - state (Completed or Faulted). - :paramtype invoke_quorum_loss_result: ~azure.servicefabric.models.InvokeQuorumLossResult - """ - super(PartitionQuorumLossProgress, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.invoke_quorum_loss_result = kwargs.get('invoke_quorum_loss_result', None) - - -class PartitionReconfiguredEvent(PartitionEvent): - """Partition Reconfiguration event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance_id: Required. Id of Node instance. - :vartype node_instance_id: str - :ivar service_type: Required. Type of Service. - :vartype service_type: str - :ivar cc_epoch_data_loss_version: Required. CcEpochDataLoss version. - :vartype cc_epoch_data_loss_version: long - :ivar cc_epoch_config_version: Required. CcEpochConfig version. - :vartype cc_epoch_config_version: long - :ivar reconfig_type: Required. Type of reconfiguration. - :vartype reconfig_type: str - :ivar result: Required. Describes reconfiguration result. - :vartype result: str - :ivar phase0_duration_ms: Required. Duration of Phase0 in milli-seconds. - :vartype phase0_duration_ms: float - :ivar phase1_duration_ms: Required. Duration of Phase1 in milli-seconds. - :vartype phase1_duration_ms: float - :ivar phase2_duration_ms: Required. Duration of Phase2 in milli-seconds. - :vartype phase2_duration_ms: float - :ivar phase3_duration_ms: Required. Duration of Phase3 in milli-seconds. - :vartype phase3_duration_ms: float - :ivar phase4_duration_ms: Required. Duration of Phase4 in milli-seconds. - :vartype phase4_duration_ms: float - :ivar total_duration_ms: Required. Total duration in milli-seconds. - :vartype total_duration_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'service_type': {'required': True}, - 'cc_epoch_data_loss_version': {'required': True}, - 'cc_epoch_config_version': {'required': True}, - 'reconfig_type': {'required': True}, - 'result': {'required': True}, - 'phase0_duration_ms': {'required': True}, - 'phase1_duration_ms': {'required': True}, - 'phase2_duration_ms': {'required': True}, - 'phase3_duration_ms': {'required': True}, - 'phase4_duration_ms': {'required': True}, - 'total_duration_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - 'service_type': {'key': 'ServiceType', 'type': 'str'}, - 'cc_epoch_data_loss_version': {'key': 'CcEpochDataLossVersion', 'type': 'long'}, - 'cc_epoch_config_version': {'key': 'CcEpochConfigVersion', 'type': 'long'}, - 'reconfig_type': {'key': 'ReconfigType', 'type': 'str'}, - 'result': {'key': 'Result', 'type': 'str'}, - 'phase0_duration_ms': {'key': 'Phase0DurationMs', 'type': 'float'}, - 'phase1_duration_ms': {'key': 'Phase1DurationMs', 'type': 'float'}, - 'phase2_duration_ms': {'key': 'Phase2DurationMs', 'type': 'float'}, - 'phase3_duration_ms': {'key': 'Phase3DurationMs', 'type': 'float'}, - 'phase4_duration_ms': {'key': 'Phase4DurationMs', 'type': 'float'}, - 'total_duration_ms': {'key': 'TotalDurationMs', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance_id: Required. Id of Node instance. - :paramtype node_instance_id: str - :keyword service_type: Required. Type of Service. - :paramtype service_type: str - :keyword cc_epoch_data_loss_version: Required. CcEpochDataLoss version. - :paramtype cc_epoch_data_loss_version: long - :keyword cc_epoch_config_version: Required. CcEpochConfig version. - :paramtype cc_epoch_config_version: long - :keyword reconfig_type: Required. Type of reconfiguration. - :paramtype reconfig_type: str - :keyword result: Required. Describes reconfiguration result. - :paramtype result: str - :keyword phase0_duration_ms: Required. Duration of Phase0 in milli-seconds. - :paramtype phase0_duration_ms: float - :keyword phase1_duration_ms: Required. Duration of Phase1 in milli-seconds. - :paramtype phase1_duration_ms: float - :keyword phase2_duration_ms: Required. Duration of Phase2 in milli-seconds. - :paramtype phase2_duration_ms: float - :keyword phase3_duration_ms: Required. Duration of Phase3 in milli-seconds. - :paramtype phase3_duration_ms: float - :keyword phase4_duration_ms: Required. Duration of Phase4 in milli-seconds. - :paramtype phase4_duration_ms: float - :keyword total_duration_ms: Required. Total duration in milli-seconds. - :paramtype total_duration_ms: float - """ - super(PartitionReconfiguredEvent, self).__init__(**kwargs) - self.kind = 'PartitionReconfigured' # type: str - self.node_name = kwargs['node_name'] - self.node_instance_id = kwargs['node_instance_id'] - self.service_type = kwargs['service_type'] - self.cc_epoch_data_loss_version = kwargs['cc_epoch_data_loss_version'] - self.cc_epoch_config_version = kwargs['cc_epoch_config_version'] - self.reconfig_type = kwargs['reconfig_type'] - self.result = kwargs['result'] - self.phase0_duration_ms = kwargs['phase0_duration_ms'] - self.phase1_duration_ms = kwargs['phase1_duration_ms'] - self.phase2_duration_ms = kwargs['phase2_duration_ms'] - self.phase3_duration_ms = kwargs['phase3_duration_ms'] - self.phase4_duration_ms = kwargs['phase4_duration_ms'] - self.total_duration_ms = kwargs['total_duration_ms'] - - -class PartitionRestartProgress(msrest.serialization.Model): - """Information about a partition restart user-induced operation. - - :ivar state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :vartype state: str or ~azure.servicefabric.models.OperationState - :ivar restart_partition_result: Represents information about an operation in a terminal state - (Completed or Faulted). - :vartype restart_partition_result: ~azure.servicefabric.models.RestartPartitionResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'restart_partition_result': {'key': 'RestartPartitionResult', 'type': 'RestartPartitionResult'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :paramtype state: str or ~azure.servicefabric.models.OperationState - :keyword restart_partition_result: Represents information about an operation in a terminal - state (Completed or Faulted). - :paramtype restart_partition_result: ~azure.servicefabric.models.RestartPartitionResult - """ - super(PartitionRestartProgress, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.restart_partition_result = kwargs.get('restart_partition_result', None) - - -class PartitionsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for the partitions of a service, containing health evaluations for each unhealthy partition that impacts current aggregated health state. Can be returned when evaluating service health and the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar max_percent_unhealthy_partitions_per_service: Maximum allowed percentage of unhealthy - partitions per service from the ServiceTypeHealthPolicy. - :vartype max_percent_unhealthy_partitions_per_service: int - :ivar total_count: Total number of partitions of the service from the health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy PartitionHealthEvaluation that impacted the aggregated - health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword max_percent_unhealthy_partitions_per_service: Maximum allowed percentage of unhealthy - partitions per service from the ServiceTypeHealthPolicy. - :paramtype max_percent_unhealthy_partitions_per_service: int - :keyword total_count: Total number of partitions of the service from the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy PartitionHealthEvaluation that impacted the aggregated - health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(PartitionsHealthEvaluation, self).__init__(**kwargs) - self.kind = 'Partitions' # type: str - self.max_percent_unhealthy_partitions_per_service = kwargs.get('max_percent_unhealthy_partitions_per_service', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class ReplicatorStatus(msrest.serialization.Model): - """Represents a base class for primary or secondary replicator status. -Contains information about the service fabric replicator like the replication/copy queue utilization, last acknowledgement received timestamp, etc. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PrimaryReplicatorStatus, SecondaryReplicatorStatus. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. - Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", - "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". - :vartype kind: str or ~azure.servicefabric.models.ReplicaRole - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Primary': 'PrimaryReplicatorStatus', 'SecondaryReplicatorStatus': 'SecondaryReplicatorStatus'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ReplicatorStatus, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class PrimaryReplicatorStatus(ReplicatorStatus): - """Provides statistics about the Service Fabric Replicator, when it is functioning in a Primary role. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. - Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", - "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". - :vartype kind: str or ~azure.servicefabric.models.ReplicaRole - :ivar replication_queue_status: Details about the replication queue on the primary replicator. - :vartype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :ivar remote_replicators: The status of all the active and idle secondary replicators that the - primary is aware of. - :vartype remote_replicators: list[~azure.servicefabric.models.RemoteReplicatorStatus] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'remote_replicators': {'key': 'RemoteReplicators', 'type': '[RemoteReplicatorStatus]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword replication_queue_status: Details about the replication queue on the primary - replicator. - :paramtype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :keyword remote_replicators: The status of all the active and idle secondary replicators that - the primary is aware of. - :paramtype remote_replicators: list[~azure.servicefabric.models.RemoteReplicatorStatus] - """ - super(PrimaryReplicatorStatus, self).__init__(**kwargs) - self.kind = 'Primary' # type: str - self.replication_queue_status = kwargs.get('replication_queue_status', None) - self.remote_replicators = kwargs.get('remote_replicators', None) - - -class Probe(msrest.serialization.Model): - """Probes have a number of fields that you can use to control their behavior. - - :ivar initial_delay_seconds: The initial delay in seconds to start executing probe once - codepackage has started. - :vartype initial_delay_seconds: int - :ivar period_seconds: Periodic seconds to execute probe. - :vartype period_seconds: int - :ivar timeout_seconds: Period after which probe is considered as failed if it hasn't completed - successfully. - :vartype timeout_seconds: int - :ivar success_threshold: The count of successful probe executions after which probe is - considered success. - :vartype success_threshold: int - :ivar failure_threshold: The count of failures after which probe is considered failed. - :vartype failure_threshold: int - :ivar exec_property: Exec command to run inside the container. - :vartype exec_property: ~azure.servicefabric.models.ProbeExec - :ivar http_get: Http probe for the container. - :vartype http_get: ~azure.servicefabric.models.ProbeHttpGet - :ivar tcp_socket: Tcp port to probe inside the container. - :vartype tcp_socket: ~azure.servicefabric.models.ProbeTcpSocket - """ - - _attribute_map = { - 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, - 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, - 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, - 'exec_property': {'key': 'exec', 'type': 'ProbeExec'}, - 'http_get': {'key': 'httpGet', 'type': 'ProbeHttpGet'}, - 'tcp_socket': {'key': 'tcpSocket', 'type': 'ProbeTcpSocket'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword initial_delay_seconds: The initial delay in seconds to start executing probe once - codepackage has started. - :paramtype initial_delay_seconds: int - :keyword period_seconds: Periodic seconds to execute probe. - :paramtype period_seconds: int - :keyword timeout_seconds: Period after which probe is considered as failed if it hasn't - completed successfully. - :paramtype timeout_seconds: int - :keyword success_threshold: The count of successful probe executions after which probe is - considered success. - :paramtype success_threshold: int - :keyword failure_threshold: The count of failures after which probe is considered failed. - :paramtype failure_threshold: int - :keyword exec_property: Exec command to run inside the container. - :paramtype exec_property: ~azure.servicefabric.models.ProbeExec - :keyword http_get: Http probe for the container. - :paramtype http_get: ~azure.servicefabric.models.ProbeHttpGet - :keyword tcp_socket: Tcp port to probe inside the container. - :paramtype tcp_socket: ~azure.servicefabric.models.ProbeTcpSocket - """ - super(Probe, self).__init__(**kwargs) - self.initial_delay_seconds = kwargs.get('initial_delay_seconds', 0) - self.period_seconds = kwargs.get('period_seconds', 10) - self.timeout_seconds = kwargs.get('timeout_seconds', 1) - self.success_threshold = kwargs.get('success_threshold', 1) - self.failure_threshold = kwargs.get('failure_threshold', 3) - self.exec_property = kwargs.get('exec_property', None) - self.http_get = kwargs.get('http_get', None) - self.tcp_socket = kwargs.get('tcp_socket', None) - - -class ProbeExec(msrest.serialization.Model): - """Exec command to run inside the container. - - All required parameters must be populated in order to send to Azure. - - :ivar command: Required. Comma separated command to run inside the container for example "sh, - -c, echo hello world". - :vartype command: str - """ - - _validation = { - 'command': {'required': True}, - } - - _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword command: Required. Comma separated command to run inside the container for example - "sh, -c, echo hello world". - :paramtype command: str - """ - super(ProbeExec, self).__init__(**kwargs) - self.command = kwargs['command'] - - -class ProbeHttpGet(msrest.serialization.Model): - """Http probe for the container. - - All required parameters must be populated in order to send to Azure. - - :ivar port: Required. Port to access for probe. - :vartype port: int - :ivar path: Path to access on the HTTP request. - :vartype path: str - :ivar host: Host IP to connect to. - :vartype host: str - :ivar http_headers: Headers to set in the request. - :vartype http_headers: list[~azure.servicefabric.models.ProbeHttpGetHeaders] - :ivar scheme: Scheme for the http probe. Can be Http or Https. Possible values include: "http", - "https". - :vartype scheme: str or ~azure.servicefabric.models.Scheme - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'port': {'key': 'port', 'type': 'int'}, - 'path': {'key': 'path', 'type': 'str'}, - 'host': {'key': 'host', 'type': 'str'}, - 'http_headers': {'key': 'httpHeaders', 'type': '[ProbeHttpGetHeaders]'}, - 'scheme': {'key': 'scheme', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword port: Required. Port to access for probe. - :paramtype port: int - :keyword path: Path to access on the HTTP request. - :paramtype path: str - :keyword host: Host IP to connect to. - :paramtype host: str - :keyword http_headers: Headers to set in the request. - :paramtype http_headers: list[~azure.servicefabric.models.ProbeHttpGetHeaders] - :keyword scheme: Scheme for the http probe. Can be Http or Https. Possible values include: - "http", "https". - :paramtype scheme: str or ~azure.servicefabric.models.Scheme - """ - super(ProbeHttpGet, self).__init__(**kwargs) - self.port = kwargs['port'] - self.path = kwargs.get('path', None) - self.host = kwargs.get('host', None) - self.http_headers = kwargs.get('http_headers', None) - self.scheme = kwargs.get('scheme', None) - - -class ProbeHttpGetHeaders(msrest.serialization.Model): - """Http headers. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the header. - :vartype name: str - :ivar value: Required. The value of the header. - :vartype 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 - ): - """ - :keyword name: Required. The name of the header. - :paramtype name: str - :keyword value: Required. The value of the header. - :paramtype value: str - """ - super(ProbeHttpGetHeaders, self).__init__(**kwargs) - self.name = kwargs['name'] - self.value = kwargs['value'] - - -class ProbeTcpSocket(msrest.serialization.Model): - """Tcp port to probe inside the container. - - All required parameters must be populated in order to send to Azure. - - :ivar port: Required. Port to access for probe. - :vartype port: int - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword port: Required. Port to access for probe. - :paramtype port: int - """ - super(ProbeTcpSocket, self).__init__(**kwargs) - self.port = kwargs['port'] - - -class PropertyBatchDescriptionList(msrest.serialization.Model): - """Describes a list of property batch operations to be executed. Either all or none of the operations will be committed. - - :ivar operations: A list of the property batch operations to be executed. - :vartype operations: list[~azure.servicefabric.models.PropertyBatchOperation] - """ - - _attribute_map = { - 'operations': {'key': 'Operations', 'type': '[PropertyBatchOperation]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword operations: A list of the property batch operations to be executed. - :paramtype operations: list[~azure.servicefabric.models.PropertyBatchOperation] - """ - super(PropertyBatchDescriptionList, self).__init__(**kwargs) - self.operations = kwargs.get('operations', None) - - -class PropertyDescription(msrest.serialization.Model): - """Description of a Service Fabric property. - - All required parameters must be populated in order to send to Azure. - - :ivar property_name: Required. The name of the Service Fabric property. - :vartype property_name: str - :ivar 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. - :vartype custom_type_id: str - :ivar value: Required. Describes a Service Fabric property value. - :vartype value: ~azure.servicefabric.models.PropertyValue - """ - - _validation = { - 'property_name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword property_name: Required. The name of the Service Fabric property. - :paramtype property_name: str - :keyword 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. - :paramtype custom_type_id: str - :keyword value: Required. Describes a Service Fabric property value. - :paramtype value: ~azure.servicefabric.models.PropertyValue - """ - super(PropertyDescription, self).__init__(**kwargs) - self.property_name = kwargs['property_name'] - self.custom_type_id = kwargs.get('custom_type_id', None) - self.value = kwargs['value'] - - -class PropertyInfo(msrest.serialization.Model): - """Information about a Service Fabric property. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the Service Fabric property. - :vartype name: str - :ivar value: Describes a Service Fabric property value. - :vartype value: ~azure.servicefabric.models.PropertyValue - :ivar metadata: Required. The metadata associated with a property, including the property's - name. - :vartype metadata: ~azure.servicefabric.models.PropertyMetadata - """ - - _validation = { - 'name': {'required': True}, - 'metadata': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - 'metadata': {'key': 'Metadata', 'type': 'PropertyMetadata'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The name of the Service Fabric property. - :paramtype name: str - :keyword value: Describes a Service Fabric property value. - :paramtype value: ~azure.servicefabric.models.PropertyValue - :keyword metadata: Required. The metadata associated with a property, including the property's - name. - :paramtype metadata: ~azure.servicefabric.models.PropertyMetadata - """ - super(PropertyInfo, self).__init__(**kwargs) - self.name = kwargs['name'] - self.value = kwargs.get('value', None) - self.metadata = kwargs['metadata'] - - -class PropertyMetadata(msrest.serialization.Model): - """The metadata associated with a property, including the property's name. - - :ivar type_id: The kind of property, determined by the type of data. Following are the possible - values. Possible values include: "Invalid", "Binary", "Int64", "Double", "String", "Guid". - :vartype type_id: str or ~azure.servicefabric.models.PropertyValueKind - :ivar custom_type_id: The property's custom type ID. - :vartype custom_type_id: str - :ivar parent: The name of the parent Service Fabric Name for the property. It could be thought - of as the name-space/table under which the property exists. - :vartype parent: str - :ivar size_in_bytes: The length of the serialized property value. - :vartype size_in_bytes: int - :ivar last_modified_utc_timestamp: Represents when the Property was last modified. Only write - operations will cause this field to be updated. - :vartype last_modified_utc_timestamp: ~datetime.datetime - :ivar sequence_number: The version of the property. Every time a property is modified, its - sequence number is increased. - :vartype sequence_number: str - """ - - _attribute_map = { - 'type_id': {'key': 'TypeId', 'type': 'str'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - 'parent': {'key': 'Parent', 'type': 'str'}, - 'size_in_bytes': {'key': 'SizeInBytes', 'type': 'int'}, - 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword type_id: The kind of property, determined by the type of data. Following are the - possible values. Possible values include: "Invalid", "Binary", "Int64", "Double", "String", - "Guid". - :paramtype type_id: str or ~azure.servicefabric.models.PropertyValueKind - :keyword custom_type_id: The property's custom type ID. - :paramtype custom_type_id: str - :keyword parent: The name of the parent Service Fabric Name for the property. It could be - thought of as the name-space/table under which the property exists. - :paramtype parent: str - :keyword size_in_bytes: The length of the serialized property value. - :paramtype size_in_bytes: int - :keyword last_modified_utc_timestamp: Represents when the Property was last modified. Only - write operations will cause this field to be updated. - :paramtype last_modified_utc_timestamp: ~datetime.datetime - :keyword sequence_number: The version of the property. Every time a property is modified, its - sequence number is increased. - :paramtype sequence_number: str - """ - super(PropertyMetadata, self).__init__(**kwargs) - self.type_id = kwargs.get('type_id', None) - self.custom_type_id = kwargs.get('custom_type_id', None) - self.parent = kwargs.get('parent', None) - self.size_in_bytes = kwargs.get('size_in_bytes', None) - self.last_modified_utc_timestamp = kwargs.get('last_modified_utc_timestamp', None) - self.sequence_number = kwargs.get('sequence_number', None) - - -class ProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): - """Describes the operation to register or provision an application type using an application package uploaded to the Service Fabric image store. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of application type registration or provision requested. The - application package can be registered or provisioned either from the image store or from an - external store. Following are the kinds of the application type provision.Constant filled by - server. Possible values include: "Invalid", "ImageStorePath", "ExternalStore". - :vartype kind: str or ~azure.servicefabric.models.ProvisionApplicationTypeKind - :ivar async_property: Required. Indicates whether or not provisioning should occur - asynchronously. When set to true, the provision operation returns when the request is accepted - by the system, and the provision operation continues without any timeout limit. The default - value is false. For large application packages, we recommend setting the value to true. - :vartype async_property: bool - :ivar application_type_build_path: Required. The relative path for the application package in - the image store specified during the prior upload operation. - :vartype application_type_build_path: str - :ivar application_package_cleanup_policy: The kind of action that needs to be taken for - cleaning up the application package after successful provision. Possible values include: - "Invalid", "Default", "Automatic", "Manual". - :vartype application_package_cleanup_policy: str or - ~azure.servicefabric.models.ApplicationPackageCleanupPolicy - """ - - _validation = { - 'kind': {'required': True}, - 'async_property': {'required': True}, - 'application_type_build_path': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, - 'application_package_cleanup_policy': {'key': 'ApplicationPackageCleanupPolicy', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword async_property: Required. Indicates whether or not provisioning should occur - asynchronously. When set to true, the provision operation returns when the request is accepted - by the system, and the provision operation continues without any timeout limit. The default - value is false. For large application packages, we recommend setting the value to true. - :paramtype async_property: bool - :keyword application_type_build_path: Required. The relative path for the application package - in the image store specified during the prior upload operation. - :paramtype application_type_build_path: str - :keyword application_package_cleanup_policy: The kind of action that needs to be taken for - cleaning up the application package after successful provision. Possible values include: - "Invalid", "Default", "Automatic", "Manual". - :paramtype application_package_cleanup_policy: str or - ~azure.servicefabric.models.ApplicationPackageCleanupPolicy - """ - super(ProvisionApplicationTypeDescription, self).__init__(**kwargs) - self.kind = 'ImageStorePath' # type: str - self.application_type_build_path = kwargs['application_type_build_path'] - self.application_package_cleanup_policy = kwargs.get('application_package_cleanup_policy', None) - - -class ProvisionFabricDescription(msrest.serialization.Model): - """Describes the parameters for provisioning a cluster. - - :ivar code_file_path: The cluster code package file path. - :vartype code_file_path: str - :ivar cluster_manifest_file_path: The cluster manifest file path. - :vartype cluster_manifest_file_path: str - """ - - _attribute_map = { - 'code_file_path': {'key': 'CodeFilePath', 'type': 'str'}, - 'cluster_manifest_file_path': {'key': 'ClusterManifestFilePath', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword code_file_path: The cluster code package file path. - :paramtype code_file_path: str - :keyword cluster_manifest_file_path: The cluster manifest file path. - :paramtype cluster_manifest_file_path: str - """ - super(ProvisionFabricDescription, self).__init__(**kwargs) - self.code_file_path = kwargs.get('code_file_path', None) - self.cluster_manifest_file_path = kwargs.get('cluster_manifest_file_path', None) - - -class PutPropertyBatchOperation(PropertyBatchOperation): - """Puts the specified property under the specified name. -Note that if one PropertyBatchOperation in a PropertyBatch fails, -the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch operation, determined by the operation to be - performed. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind - :ivar property_name: Required. The name of the Service Fabric property. - :vartype property_name: str - :ivar value: Required. Describes a Service Fabric property value. - :vartype value: ~azure.servicefabric.models.PropertyValue - :ivar 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. - :vartype custom_type_id: str - """ - - _validation = { - 'kind': {'required': True}, - 'property_name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword property_name: Required. The name of the Service Fabric property. - :paramtype property_name: str - :keyword value: Required. Describes a Service Fabric property value. - :paramtype value: ~azure.servicefabric.models.PropertyValue - :keyword 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. - :paramtype custom_type_id: str - """ - super(PutPropertyBatchOperation, self).__init__(**kwargs) - self.kind = 'Put' # type: str - self.value = kwargs['value'] - self.custom_type_id = kwargs.get('custom_type_id', None) - - -class ReconfigurationInformation(msrest.serialization.Model): - """Information about current reconfiguration like phase, type, previous configuration role of replica and reconfiguration start date time. - - :ivar previous_configuration_role: Replica role before reconfiguration started. Possible values - include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", - "ActiveAuxiliary", "PrimaryAuxiliary". - :vartype previous_configuration_role: str or ~azure.servicefabric.models.ReplicaRole - :ivar reconfiguration_phase: Current phase of ongoing reconfiguration. If no reconfiguration is - taking place then this value will be "None". Possible values include: "Unknown", "None", - "Phase0", "Phase1", "Phase2", "Phase3", "Phase4", "AbortPhaseZero". - :vartype reconfiguration_phase: str or ~azure.servicefabric.models.ReconfigurationPhase - :ivar reconfiguration_type: Type of current ongoing reconfiguration. If no reconfiguration is - taking place then this value will be "None". Possible values include: "Unknown", "SwapPrimary", - "Failover", "Other". - :vartype reconfiguration_type: str or ~azure.servicefabric.models.ReconfigurationType - :ivar reconfiguration_start_time_utc: Start time (in UTC) of the ongoing reconfiguration. If no - reconfiguration is taking place then this value will be zero date-time. - :vartype reconfiguration_start_time_utc: ~datetime.datetime - """ - - _attribute_map = { - 'previous_configuration_role': {'key': 'PreviousConfigurationRole', 'type': 'str'}, - 'reconfiguration_phase': {'key': 'ReconfigurationPhase', 'type': 'str'}, - 'reconfiguration_type': {'key': 'ReconfigurationType', 'type': 'str'}, - 'reconfiguration_start_time_utc': {'key': 'ReconfigurationStartTimeUtc', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword previous_configuration_role: Replica role before reconfiguration started. Possible - values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", - "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". - :paramtype previous_configuration_role: str or ~azure.servicefabric.models.ReplicaRole - :keyword reconfiguration_phase: Current phase of ongoing reconfiguration. If no reconfiguration - is taking place then this value will be "None". Possible values include: "Unknown", "None", - "Phase0", "Phase1", "Phase2", "Phase3", "Phase4", "AbortPhaseZero". - :paramtype reconfiguration_phase: str or ~azure.servicefabric.models.ReconfigurationPhase - :keyword reconfiguration_type: Type of current ongoing reconfiguration. If no reconfiguration - is taking place then this value will be "None". Possible values include: "Unknown", - "SwapPrimary", "Failover", "Other". - :paramtype reconfiguration_type: str or ~azure.servicefabric.models.ReconfigurationType - :keyword reconfiguration_start_time_utc: Start time (in UTC) of the ongoing reconfiguration. If - no reconfiguration is taking place then this value will be zero date-time. - :paramtype reconfiguration_start_time_utc: ~datetime.datetime - """ - super(ReconfigurationInformation, self).__init__(**kwargs) - self.previous_configuration_role = kwargs.get('previous_configuration_role', None) - self.reconfiguration_phase = kwargs.get('reconfiguration_phase', None) - self.reconfiguration_type = kwargs.get('reconfiguration_type', None) - self.reconfiguration_start_time_utc = kwargs.get('reconfiguration_start_time_utc', None) - - -class RegistryCredential(msrest.serialization.Model): - """Credential information to connect to container registry. - - :ivar registry_user_name: The user name to connect to container registry. - :vartype registry_user_name: str - :ivar registry_password: The password for supplied username to connect to container registry. - :vartype registry_password: str - :ivar password_encrypted: Indicates that supplied container registry password is encrypted. - :vartype password_encrypted: bool - """ - - _attribute_map = { - 'registry_user_name': {'key': 'RegistryUserName', 'type': 'str'}, - 'registry_password': {'key': 'RegistryPassword', 'type': 'str'}, - 'password_encrypted': {'key': 'PasswordEncrypted', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword registry_user_name: The user name to connect to container registry. - :paramtype registry_user_name: str - :keyword registry_password: The password for supplied username to connect to container - registry. - :paramtype registry_password: str - :keyword password_encrypted: Indicates that supplied container registry password is encrypted. - :paramtype password_encrypted: bool - """ - super(RegistryCredential, self).__init__(**kwargs) - self.registry_user_name = kwargs.get('registry_user_name', None) - self.registry_password = kwargs.get('registry_password', None) - self.password_encrypted = kwargs.get('password_encrypted', None) - - -class ReliableCollectionsRef(msrest.serialization.Model): - """Specifying this parameter adds support for reliable collections. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of ReliableCollection resource. Right now it's not used and you can - use any string. - :vartype name: str - :ivar do_not_persist_state: False (the default) if ReliableCollections state is persisted to - disk as usual. True if you do not want to persist state, in which case replication is still - enabled and you can use ReliableCollections as distributed cache. - :vartype do_not_persist_state: bool - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'do_not_persist_state': {'key': 'doNotPersistState', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. Name of ReliableCollection resource. Right now it's not used and you - can use any string. - :paramtype name: str - :keyword do_not_persist_state: False (the default) if ReliableCollections state is persisted to - disk as usual. True if you do not want to persist state, in which case replication is still - enabled and you can use ReliableCollections as distributed cache. - :paramtype do_not_persist_state: bool - """ - super(ReliableCollectionsRef, self).__init__(**kwargs) - self.name = kwargs['name'] - self.do_not_persist_state = kwargs.get('do_not_persist_state', None) - - -class RemoteReplicatorAcknowledgementDetail(msrest.serialization.Model): - """Provides various statistics of the acknowledgements that are being received from the remote replicator. - - :ivar average_receive_duration: Represents the average duration it takes for the remote - replicator to receive an operation. - :vartype average_receive_duration: str - :ivar average_apply_duration: Represents the average duration it takes for the remote - replicator to apply an operation. This usually entails writing the operation to disk. - :vartype average_apply_duration: str - :ivar not_received_count: Represents the number of operations not yet received by a remote - replicator. - :vartype not_received_count: str - :ivar received_and_not_applied_count: Represents the number of operations received and not yet - applied by a remote replicator. - :vartype received_and_not_applied_count: str - """ - - _attribute_map = { - 'average_receive_duration': {'key': 'AverageReceiveDuration', 'type': 'str'}, - 'average_apply_duration': {'key': 'AverageApplyDuration', 'type': 'str'}, - 'not_received_count': {'key': 'NotReceivedCount', 'type': 'str'}, - 'received_and_not_applied_count': {'key': 'ReceivedAndNotAppliedCount', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword average_receive_duration: Represents the average duration it takes for the remote - replicator to receive an operation. - :paramtype average_receive_duration: str - :keyword average_apply_duration: Represents the average duration it takes for the remote - replicator to apply an operation. This usually entails writing the operation to disk. - :paramtype average_apply_duration: str - :keyword not_received_count: Represents the number of operations not yet received by a remote - replicator. - :paramtype not_received_count: str - :keyword received_and_not_applied_count: Represents the number of operations received and not - yet applied by a remote replicator. - :paramtype received_and_not_applied_count: str - """ - super(RemoteReplicatorAcknowledgementDetail, self).__init__(**kwargs) - self.average_receive_duration = kwargs.get('average_receive_duration', None) - self.average_apply_duration = kwargs.get('average_apply_duration', None) - self.not_received_count = kwargs.get('not_received_count', None) - self.received_and_not_applied_count = kwargs.get('received_and_not_applied_count', None) - - -class RemoteReplicatorAcknowledgementStatus(msrest.serialization.Model): - """Provides details about the remote replicators from the primary replicator's point of view. - - :ivar replication_stream_acknowledgement_detail: Details about the acknowledgements for - operations that are part of the replication stream data. - :vartype replication_stream_acknowledgement_detail: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail - :ivar copy_stream_acknowledgement_detail: Details about the acknowledgements for operations - that are part of the copy stream data. - :vartype copy_stream_acknowledgement_detail: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail - """ - - _attribute_map = { - 'replication_stream_acknowledgement_detail': {'key': 'ReplicationStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, - 'copy_stream_acknowledgement_detail': {'key': 'CopyStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword replication_stream_acknowledgement_detail: Details about the acknowledgements for - operations that are part of the replication stream data. - :paramtype replication_stream_acknowledgement_detail: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail - :keyword copy_stream_acknowledgement_detail: Details about the acknowledgements for operations - that are part of the copy stream data. - :paramtype copy_stream_acknowledgement_detail: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail - """ - super(RemoteReplicatorAcknowledgementStatus, self).__init__(**kwargs) - self.replication_stream_acknowledgement_detail = kwargs.get('replication_stream_acknowledgement_detail', None) - self.copy_stream_acknowledgement_detail = kwargs.get('copy_stream_acknowledgement_detail', None) - - -class RemoteReplicatorStatus(msrest.serialization.Model): - """Represents the state of the secondary replicator from the primary replicator’s point of view. - - :ivar replica_id: Represents the replica ID of the remote secondary replicator. - :vartype replica_id: str - :ivar last_acknowledgement_processed_time_utc: The last timestamp (in UTC) when an - acknowledgement from the secondary replicator was processed on the primary. - UTC 0 represents an invalid value, indicating that no acknowledgement messages were ever - processed. - :vartype last_acknowledgement_processed_time_utc: ~datetime.datetime - :ivar last_received_replication_sequence_number: The highest replication operation sequence - number that the secondary has received from the primary. - :vartype last_received_replication_sequence_number: str - :ivar last_applied_replication_sequence_number: The highest replication operation sequence - number that the secondary has applied to its state. - :vartype last_applied_replication_sequence_number: str - :ivar is_in_build: A value that indicates whether the secondary replica is in the process of - being built. - :vartype is_in_build: bool - :ivar last_received_copy_sequence_number: The highest copy operation sequence number that the - secondary has received from the primary. - A value of -1 implies that the secondary has received all copy operations. - :vartype last_received_copy_sequence_number: str - :ivar last_applied_copy_sequence_number: The highest copy operation sequence number that the - secondary has applied to its state. - A value of -1 implies that the secondary has applied all copy operations and the copy process - is complete. - :vartype last_applied_copy_sequence_number: str - :ivar remote_replicator_acknowledgement_status: Represents the acknowledgment status for the - remote secondary replicator. - :vartype remote_replicator_acknowledgement_status: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementStatus - """ - - _attribute_map = { - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'last_acknowledgement_processed_time_utc': {'key': 'LastAcknowledgementProcessedTimeUtc', 'type': 'iso-8601'}, - 'last_received_replication_sequence_number': {'key': 'LastReceivedReplicationSequenceNumber', 'type': 'str'}, - 'last_applied_replication_sequence_number': {'key': 'LastAppliedReplicationSequenceNumber', 'type': 'str'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'last_received_copy_sequence_number': {'key': 'LastReceivedCopySequenceNumber', 'type': 'str'}, - 'last_applied_copy_sequence_number': {'key': 'LastAppliedCopySequenceNumber', 'type': 'str'}, - 'remote_replicator_acknowledgement_status': {'key': 'RemoteReplicatorAcknowledgementStatus', 'type': 'RemoteReplicatorAcknowledgementStatus'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword replica_id: Represents the replica ID of the remote secondary replicator. - :paramtype replica_id: str - :keyword last_acknowledgement_processed_time_utc: The last timestamp (in UTC) when an - acknowledgement from the secondary replicator was processed on the primary. - UTC 0 represents an invalid value, indicating that no acknowledgement messages were ever - processed. - :paramtype last_acknowledgement_processed_time_utc: ~datetime.datetime - :keyword last_received_replication_sequence_number: The highest replication operation sequence - number that the secondary has received from the primary. - :paramtype last_received_replication_sequence_number: str - :keyword last_applied_replication_sequence_number: The highest replication operation sequence - number that the secondary has applied to its state. - :paramtype last_applied_replication_sequence_number: str - :keyword is_in_build: A value that indicates whether the secondary replica is in the process of - being built. - :paramtype is_in_build: bool - :keyword last_received_copy_sequence_number: The highest copy operation sequence number that - the secondary has received from the primary. - A value of -1 implies that the secondary has received all copy operations. - :paramtype last_received_copy_sequence_number: str - :keyword last_applied_copy_sequence_number: The highest copy operation sequence number that the - secondary has applied to its state. - A value of -1 implies that the secondary has applied all copy operations and the copy process - is complete. - :paramtype last_applied_copy_sequence_number: str - :keyword remote_replicator_acknowledgement_status: Represents the acknowledgment status for the - remote secondary replicator. - :paramtype remote_replicator_acknowledgement_status: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementStatus - """ - super(RemoteReplicatorStatus, self).__init__(**kwargs) - self.replica_id = kwargs.get('replica_id', None) - self.last_acknowledgement_processed_time_utc = kwargs.get('last_acknowledgement_processed_time_utc', None) - self.last_received_replication_sequence_number = kwargs.get('last_received_replication_sequence_number', None) - self.last_applied_replication_sequence_number = kwargs.get('last_applied_replication_sequence_number', None) - self.is_in_build = kwargs.get('is_in_build', None) - self.last_received_copy_sequence_number = kwargs.get('last_received_copy_sequence_number', None) - self.last_applied_copy_sequence_number = kwargs.get('last_applied_copy_sequence_number', None) - self.remote_replicator_acknowledgement_status = kwargs.get('remote_replicator_acknowledgement_status', None) - - -class RepairTask(msrest.serialization.Model): - """Represents a repair task, which includes information about what kind of repair was requested, what its progress is, and what its final result was. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar task_id: Required. The ID of the repair task. - :vartype task_id: str - :ivar version: The version of the repair task. - When creating a new repair task, the version must be set to zero. When updating a repair - task, - the version is used for optimistic concurrency checks. If the version is - set to zero, the update will not check for write conflicts. If the version is set to a - non-zero value, then the - update will only succeed if the actual current version of the repair task matches this value. - :vartype version: str - :ivar description: A description of the purpose of the repair task, or other informational - details. - May be set when the repair task is created, and is immutable once set. - :vartype description: str - :ivar state: Required. The workflow state of the repair task. Valid initial states are Created, - Claimed, and Preparing. Possible values include: "Invalid", "Created", "Claimed", "Preparing", - "Approved", "Executing", "Restoring", "Completed". - :vartype state: str or ~azure.servicefabric.models.State - :ivar flags: A bitwise-OR of the following values, which gives additional details about the - status of the repair task. - - - * 1 - Cancellation of the repair has been requested - * 2 - Abort of the repair has been requested - * 4 - Approval of the repair was forced via client request. - :vartype flags: int - :ivar action: Required. The requested repair action. Must be specified when the repair task is - created, and is immutable once set. - :vartype action: str - :ivar target: The target object determines what actions the system will take to prepare for the - impact of the repair, prior to approving execution of the repair. - May be set when the repair task is created, and is immutable once set. - :vartype target: ~azure.servicefabric.models.RepairTargetDescriptionBase - :ivar executor: The name of the repair executor. Must be specified in Claimed and later states, - and is immutable once set. - :vartype executor: str - :ivar executor_data: A data string that the repair executor can use to store its internal - state. - :vartype executor_data: str - :ivar impact: The impact object determines what actions the system will take to prepare for the - impact of the repair, prior to approving execution of the repair. - Impact must be specified by the repair executor when transitioning to the Preparing state, and - is immutable once set. - :vartype impact: ~azure.servicefabric.models.RepairImpactDescriptionBase - :ivar result_status: A value describing the overall result of the repair task execution. Must - be specified in the Restoring and later states, and is immutable once set. Possible values - include: "Invalid", "Succeeded", "Cancelled", "Interrupted", "Failed", "Pending". - :vartype result_status: str or ~azure.servicefabric.models.ResultStatus - :ivar result_code: A numeric value providing additional details about the result of the repair - task execution. - May be specified in the Restoring and later states, and is immutable once set. - :vartype result_code: int - :ivar result_details: A string providing additional details about the result of the repair task - execution. - May be specified in the Restoring and later states, and is immutable once set. - :vartype result_details: str - :ivar history: An object that contains timestamps of the repair task's state transitions. - These timestamps are updated by the system, and cannot be directly modified. - :vartype history: ~azure.servicefabric.models.RepairTaskHistory - :ivar preparing_health_check_state: The workflow state of the health check when the repair task - is in the Preparing state. Possible values include: "NotStarted", "InProgress", "Succeeded", - "Skipped", "TimedOut". - :vartype preparing_health_check_state: str or - ~azure.servicefabric.models.RepairTaskHealthCheckState - :ivar restoring_health_check_state: The workflow state of the health check when the repair task - is in the Restoring state. Possible values include: "NotStarted", "InProgress", "Succeeded", - "Skipped", "TimedOut". - :vartype restoring_health_check_state: str or - ~azure.servicefabric.models.RepairTaskHealthCheckState - :ivar perform_preparing_health_check: A value to determine if health checks will be performed - when the repair task enters the Preparing state. - :vartype perform_preparing_health_check: bool - :ivar perform_restoring_health_check: A value to determine if health checks will be performed - when the repair task enters the Restoring state. - :vartype perform_restoring_health_check: bool - """ - - _validation = { - 'task_id': {'required': True}, - 'state': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'action': {'key': 'Action', 'type': 'str'}, - 'target': {'key': 'Target', 'type': 'RepairTargetDescriptionBase'}, - 'executor': {'key': 'Executor', 'type': 'str'}, - 'executor_data': {'key': 'ExecutorData', 'type': 'str'}, - 'impact': {'key': 'Impact', 'type': 'RepairImpactDescriptionBase'}, - 'result_status': {'key': 'ResultStatus', 'type': 'str'}, - 'result_code': {'key': 'ResultCode', 'type': 'int'}, - 'result_details': {'key': 'ResultDetails', 'type': 'str'}, - 'history': {'key': 'History', 'type': 'RepairTaskHistory'}, - 'preparing_health_check_state': {'key': 'PreparingHealthCheckState', 'type': 'str'}, - 'restoring_health_check_state': {'key': 'RestoringHealthCheckState', 'type': 'str'}, - 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, - 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword task_id: Required. The ID of the repair task. - :paramtype task_id: str - :keyword version: The version of the repair task. - When creating a new repair task, the version must be set to zero. When updating a repair - task, - the version is used for optimistic concurrency checks. If the version is - set to zero, the update will not check for write conflicts. If the version is set to a - non-zero value, then the - update will only succeed if the actual current version of the repair task matches this value. - :paramtype version: str - :keyword description: A description of the purpose of the repair task, or other informational - details. - May be set when the repair task is created, and is immutable once set. - :paramtype description: str - :keyword state: Required. The workflow state of the repair task. Valid initial states are - Created, Claimed, and Preparing. Possible values include: "Invalid", "Created", "Claimed", - "Preparing", "Approved", "Executing", "Restoring", "Completed". - :paramtype state: str or ~azure.servicefabric.models.State - :keyword flags: A bitwise-OR of the following values, which gives additional details about the - status of the repair task. - - - * 1 - Cancellation of the repair has been requested - * 2 - Abort of the repair has been requested - * 4 - Approval of the repair was forced via client request. - :paramtype flags: int - :keyword action: Required. The requested repair action. Must be specified when the repair task - is created, and is immutable once set. - :paramtype action: str - :keyword target: The target object determines what actions the system will take to prepare for - the impact of the repair, prior to approving execution of the repair. - May be set when the repair task is created, and is immutable once set. - :paramtype target: ~azure.servicefabric.models.RepairTargetDescriptionBase - :keyword executor: The name of the repair executor. Must be specified in Claimed and later - states, and is immutable once set. - :paramtype executor: str - :keyword executor_data: A data string that the repair executor can use to store its internal - state. - :paramtype executor_data: str - :keyword impact: The impact object determines what actions the system will take to prepare for - the impact of the repair, prior to approving execution of the repair. - Impact must be specified by the repair executor when transitioning to the Preparing state, and - is immutable once set. - :paramtype impact: ~azure.servicefabric.models.RepairImpactDescriptionBase - :keyword result_status: A value describing the overall result of the repair task execution. - Must be specified in the Restoring and later states, and is immutable once set. Possible values - include: "Invalid", "Succeeded", "Cancelled", "Interrupted", "Failed", "Pending". - :paramtype result_status: str or ~azure.servicefabric.models.ResultStatus - :keyword result_code: A numeric value providing additional details about the result of the - repair task execution. - May be specified in the Restoring and later states, and is immutable once set. - :paramtype result_code: int - :keyword result_details: A string providing additional details about the result of the repair - task execution. - May be specified in the Restoring and later states, and is immutable once set. - :paramtype result_details: str - :keyword history: An object that contains timestamps of the repair task's state transitions. - These timestamps are updated by the system, and cannot be directly modified. - :paramtype history: ~azure.servicefabric.models.RepairTaskHistory - :keyword preparing_health_check_state: The workflow state of the health check when the repair - task is in the Preparing state. Possible values include: "NotStarted", "InProgress", - "Succeeded", "Skipped", "TimedOut". - :paramtype preparing_health_check_state: str or - ~azure.servicefabric.models.RepairTaskHealthCheckState - :keyword restoring_health_check_state: The workflow state of the health check when the repair - task is in the Restoring state. Possible values include: "NotStarted", "InProgress", - "Succeeded", "Skipped", "TimedOut". - :paramtype restoring_health_check_state: str or - ~azure.servicefabric.models.RepairTaskHealthCheckState - :keyword perform_preparing_health_check: A value to determine if health checks will be - performed when the repair task enters the Preparing state. - :paramtype perform_preparing_health_check: bool - :keyword perform_restoring_health_check: A value to determine if health checks will be - performed when the repair task enters the Restoring state. - :paramtype perform_restoring_health_check: bool - """ - super(RepairTask, self).__init__(**kwargs) - self.task_id = kwargs['task_id'] - self.version = kwargs.get('version', None) - self.description = kwargs.get('description', None) - self.state = kwargs['state'] - self.flags = kwargs.get('flags', None) - self.action = kwargs['action'] - self.target = kwargs.get('target', None) - self.executor = kwargs.get('executor', None) - self.executor_data = kwargs.get('executor_data', None) - self.impact = kwargs.get('impact', None) - self.result_status = kwargs.get('result_status', None) - self.result_code = kwargs.get('result_code', None) - self.result_details = kwargs.get('result_details', None) - self.history = kwargs.get('history', None) - self.preparing_health_check_state = kwargs.get('preparing_health_check_state', None) - self.restoring_health_check_state = kwargs.get('restoring_health_check_state', None) - self.perform_preparing_health_check = kwargs.get('perform_preparing_health_check', None) - self.perform_restoring_health_check = kwargs.get('perform_restoring_health_check', None) - - -class RepairTaskApproveDescription(msrest.serialization.Model): - """Describes a request for forced approval of a repair task. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar task_id: Required. The ID of the repair task. - :vartype task_id: str - :ivar version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current version of the repair task. If zero, - then no version check is performed. - :vartype version: str - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword task_id: Required. The ID of the repair task. - :paramtype task_id: str - :keyword version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current version of the repair task. If zero, - then no version check is performed. - :paramtype version: str - """ - super(RepairTaskApproveDescription, self).__init__(**kwargs) - self.task_id = kwargs['task_id'] - self.version = kwargs.get('version', None) - - -class RepairTaskCancelDescription(msrest.serialization.Model): - """Describes a request to cancel a repair task. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar task_id: Required. The ID of the repair task. - :vartype task_id: str - :ivar version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current version of the repair task. If zero, - then no version check is performed. - :vartype version: str - :ivar request_abort: *True* if the repair should be stopped as soon as possible even if it has - already started executing. *False* if the repair should be cancelled only if execution has not - yet started. - :vartype request_abort: bool - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'request_abort': {'key': 'RequestAbort', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword task_id: Required. The ID of the repair task. - :paramtype task_id: str - :keyword version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current version of the repair task. If zero, - then no version check is performed. - :paramtype version: str - :keyword request_abort: *True* if the repair should be stopped as soon as possible even if it - has already started executing. *False* if the repair should be cancelled only if execution has - not yet started. - :paramtype request_abort: bool - """ - super(RepairTaskCancelDescription, self).__init__(**kwargs) - self.task_id = kwargs['task_id'] - self.version = kwargs.get('version', None) - self.request_abort = kwargs.get('request_abort', None) - - -class RepairTaskDeleteDescription(msrest.serialization.Model): - """Describes a request to delete a completed repair task. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar task_id: Required. The ID of the completed repair task to be deleted. - :vartype task_id: str - :ivar version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current version of the repair task. If zero, - then no version check is performed. - :vartype version: str - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword task_id: Required. The ID of the completed repair task to be deleted. - :paramtype task_id: str - :keyword version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current version of the repair task. If zero, - then no version check is performed. - :paramtype version: str - """ - super(RepairTaskDeleteDescription, self).__init__(**kwargs) - self.task_id = kwargs['task_id'] - self.version = kwargs.get('version', None) - - -class RepairTaskHistory(msrest.serialization.Model): - """A record of the times when the repair task entered each state. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - :ivar created_utc_timestamp: The time when the repair task entered the Created state. - :vartype created_utc_timestamp: ~datetime.datetime - :ivar claimed_utc_timestamp: The time when the repair task entered the Claimed state. - :vartype claimed_utc_timestamp: ~datetime.datetime - :ivar preparing_utc_timestamp: The time when the repair task entered the Preparing state. - :vartype preparing_utc_timestamp: ~datetime.datetime - :ivar approved_utc_timestamp: The time when the repair task entered the Approved state. - :vartype approved_utc_timestamp: ~datetime.datetime - :ivar executing_utc_timestamp: The time when the repair task entered the Executing state. - :vartype executing_utc_timestamp: ~datetime.datetime - :ivar restoring_utc_timestamp: The time when the repair task entered the Restoring state. - :vartype restoring_utc_timestamp: ~datetime.datetime - :ivar completed_utc_timestamp: The time when the repair task entered the Completed state. - :vartype completed_utc_timestamp: ~datetime.datetime - :ivar preparing_health_check_start_utc_timestamp: The time when the repair task started the - health check in the Preparing state. - :vartype preparing_health_check_start_utc_timestamp: ~datetime.datetime - :ivar preparing_health_check_end_utc_timestamp: The time when the repair task completed the - health check in the Preparing state. - :vartype preparing_health_check_end_utc_timestamp: ~datetime.datetime - :ivar restoring_health_check_start_utc_timestamp: The time when the repair task started the - health check in the Restoring state. - :vartype restoring_health_check_start_utc_timestamp: ~datetime.datetime - :ivar restoring_health_check_end_utc_timestamp: The time when the repair task completed the - health check in the Restoring state. - :vartype restoring_health_check_end_utc_timestamp: ~datetime.datetime - """ - - _attribute_map = { - 'created_utc_timestamp': {'key': 'CreatedUtcTimestamp', 'type': 'iso-8601'}, - 'claimed_utc_timestamp': {'key': 'ClaimedUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_utc_timestamp': {'key': 'PreparingUtcTimestamp', 'type': 'iso-8601'}, - 'approved_utc_timestamp': {'key': 'ApprovedUtcTimestamp', 'type': 'iso-8601'}, - 'executing_utc_timestamp': {'key': 'ExecutingUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_utc_timestamp': {'key': 'RestoringUtcTimestamp', 'type': 'iso-8601'}, - 'completed_utc_timestamp': {'key': 'CompletedUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_health_check_start_utc_timestamp': {'key': 'PreparingHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_health_check_end_utc_timestamp': {'key': 'PreparingHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_health_check_start_utc_timestamp': {'key': 'RestoringHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_health_check_end_utc_timestamp': {'key': 'RestoringHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword created_utc_timestamp: The time when the repair task entered the Created state. - :paramtype created_utc_timestamp: ~datetime.datetime - :keyword claimed_utc_timestamp: The time when the repair task entered the Claimed state. - :paramtype claimed_utc_timestamp: ~datetime.datetime - :keyword preparing_utc_timestamp: The time when the repair task entered the Preparing state. - :paramtype preparing_utc_timestamp: ~datetime.datetime - :keyword approved_utc_timestamp: The time when the repair task entered the Approved state. - :paramtype approved_utc_timestamp: ~datetime.datetime - :keyword executing_utc_timestamp: The time when the repair task entered the Executing state. - :paramtype executing_utc_timestamp: ~datetime.datetime - :keyword restoring_utc_timestamp: The time when the repair task entered the Restoring state. - :paramtype restoring_utc_timestamp: ~datetime.datetime - :keyword completed_utc_timestamp: The time when the repair task entered the Completed state. - :paramtype completed_utc_timestamp: ~datetime.datetime - :keyword preparing_health_check_start_utc_timestamp: The time when the repair task started the - health check in the Preparing state. - :paramtype preparing_health_check_start_utc_timestamp: ~datetime.datetime - :keyword preparing_health_check_end_utc_timestamp: The time when the repair task completed the - health check in the Preparing state. - :paramtype preparing_health_check_end_utc_timestamp: ~datetime.datetime - :keyword restoring_health_check_start_utc_timestamp: The time when the repair task started the - health check in the Restoring state. - :paramtype restoring_health_check_start_utc_timestamp: ~datetime.datetime - :keyword restoring_health_check_end_utc_timestamp: The time when the repair task completed the - health check in the Restoring state. - :paramtype restoring_health_check_end_utc_timestamp: ~datetime.datetime - """ - super(RepairTaskHistory, self).__init__(**kwargs) - self.created_utc_timestamp = kwargs.get('created_utc_timestamp', None) - self.claimed_utc_timestamp = kwargs.get('claimed_utc_timestamp', None) - self.preparing_utc_timestamp = kwargs.get('preparing_utc_timestamp', None) - self.approved_utc_timestamp = kwargs.get('approved_utc_timestamp', None) - self.executing_utc_timestamp = kwargs.get('executing_utc_timestamp', None) - self.restoring_utc_timestamp = kwargs.get('restoring_utc_timestamp', None) - self.completed_utc_timestamp = kwargs.get('completed_utc_timestamp', None) - self.preparing_health_check_start_utc_timestamp = kwargs.get('preparing_health_check_start_utc_timestamp', None) - self.preparing_health_check_end_utc_timestamp = kwargs.get('preparing_health_check_end_utc_timestamp', None) - self.restoring_health_check_start_utc_timestamp = kwargs.get('restoring_health_check_start_utc_timestamp', None) - self.restoring_health_check_end_utc_timestamp = kwargs.get('restoring_health_check_end_utc_timestamp', None) - - -class RepairTaskUpdateHealthPolicyDescription(msrest.serialization.Model): - """Describes a request to update the health policy of a repair task. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar task_id: Required. The ID of the repair task to be updated. - :vartype task_id: str - :ivar version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current value of the repair task. If zero, - then no version check is performed. - :vartype version: str - :ivar perform_preparing_health_check: A boolean indicating if health check is to be performed - in the Preparing stage of the repair task. If not specified the existing value should not be - altered. Otherwise, specify the desired new value. - :vartype perform_preparing_health_check: bool - :ivar perform_restoring_health_check: A boolean indicating if health check is to be performed - in the Restoring stage of the repair task. If not specified the existing value should not be - altered. Otherwise, specify the desired new value. - :vartype perform_restoring_health_check: bool - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, - 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword task_id: Required. The ID of the repair task to be updated. - :paramtype task_id: str - :keyword version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current value of the repair task. If zero, - then no version check is performed. - :paramtype version: str - :keyword perform_preparing_health_check: A boolean indicating if health check is to be - performed in the Preparing stage of the repair task. If not specified the existing value should - not be altered. Otherwise, specify the desired new value. - :paramtype perform_preparing_health_check: bool - :keyword perform_restoring_health_check: A boolean indicating if health check is to be - performed in the Restoring stage of the repair task. If not specified the existing value should - not be altered. Otherwise, specify the desired new value. - :paramtype perform_restoring_health_check: bool - """ - super(RepairTaskUpdateHealthPolicyDescription, self).__init__(**kwargs) - self.task_id = kwargs['task_id'] - self.version = kwargs.get('version', None) - self.perform_preparing_health_check = kwargs.get('perform_preparing_health_check', None) - self.perform_restoring_health_check = kwargs.get('perform_restoring_health_check', None) - - -class RepairTaskUpdateInfo(msrest.serialization.Model): - """Describes the result of an operation that created or updated a repair task. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar version: Required. The new version of the repair task. - :vartype version: str - """ - - _validation = { - 'version': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword version: Required. The new version of the repair task. - :paramtype version: str - """ - super(RepairTaskUpdateInfo, self).__init__(**kwargs) - self.version = kwargs['version'] - - -class ReplicaHealth(EntityHealth): - """Represents a base class for stateful service replica or stateless service instance health. -Contains the replica aggregated health state, the health events and the unhealthy evaluations. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaHealth, StatelessServiceInstanceHealth. - - All required parameters must be populated in order to send to Azure. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar partition_id: Id of the partition to which this replica belongs. - :vartype partition_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaHealth', 'Stateless': 'StatelessServiceInstanceHealth'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword partition_id: Id of the partition to which this replica belongs. - :paramtype partition_id: str - """ - super(ReplicaHealth, self).__init__(**kwargs) - self.service_kind = 'ReplicaHealth' # type: str - self.partition_id = kwargs.get('partition_id', None) - - -class ReplicaHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a replica, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar partition_id: Id of the partition to which the replica belongs. - :vartype partition_id: str - :ivar replica_or_instance_id: Id of a stateful service replica or a stateless service instance. - This ID is used in the queries that apply to both stateful and stateless services. It is used - by Service Fabric to uniquely identify a replica of a partition of a stateful service or an - instance of a stateless service partition. It is unique within a partition and does not change - for the lifetime of the replica or the instance. If a stateful replica gets dropped and another - replica gets created on the same node for the same partition, it will get a different value for - the ID. If a stateless instance is failed over on the same or different node it will get a - different value for the ID. - :vartype replica_or_instance_id: str - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated - health state of the replica. The types of the unhealthy evaluations can be - EventHealthEvaluation. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword partition_id: Id of the partition to which the replica belongs. - :paramtype partition_id: str - :keyword replica_or_instance_id: Id of a stateful service replica or a stateless service - instance. This ID is used in the queries that apply to both stateful and stateless services. It - is used by Service Fabric to uniquely identify a replica of a partition of a stateful service - or an instance of a stateless service partition. It is unique within a partition and does not - change for the lifetime of the replica or the instance. If a stateful replica gets dropped and - another replica gets created on the same node for the same partition, it will get a different - value for the ID. If a stateless instance is failed over on the same or different node it will - get a different value for the ID. - :paramtype replica_or_instance_id: str - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current - aggregated health state of the replica. The types of the unhealthy evaluations can be - EventHealthEvaluation. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(ReplicaHealthEvaluation, self).__init__(**kwargs) - self.kind = 'Replica' # type: str - self.partition_id = kwargs.get('partition_id', None) - self.replica_or_instance_id = kwargs.get('replica_or_instance_id', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class ReplicaHealthState(EntityHealthState): - """Represents a base class for stateful service replica or stateless service instance health state. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaHealthState, StatelessServiceInstanceHealthState. - - All required parameters must be populated in order to send to Azure. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar partition_id: The ID of the partition to which this replica belongs. - :vartype partition_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaHealthState', 'Stateless': 'StatelessServiceInstanceHealthState'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword partition_id: The ID of the partition to which this replica belongs. - :paramtype partition_id: str - """ - super(ReplicaHealthState, self).__init__(**kwargs) - self.service_kind = 'ReplicaHealthState' # type: str - self.partition_id = kwargs.get('partition_id', None) - - -class ReplicaHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a stateful service replica or a stateless service instance. -The replica health state contains the replica ID and its aggregated health state. - - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar replica_or_instance_id: Id of a stateful service replica or a stateless service instance. - This ID is used in the queries that apply to both stateful and stateless services. It is used - by Service Fabric to uniquely identify a replica of a partition of a stateful service or an - instance of a stateless service partition. It is unique within a partition and does not change - for the lifetime of the replica or the instance. If a stateful replica gets dropped and another - replica gets created on the same node for the same partition, it will get a different value for - the ID. If a stateless instance is failed over on the same or different node it will get a - different value for the ID. - :vartype replica_or_instance_id: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword replica_or_instance_id: Id of a stateful service replica or a stateless service - instance. This ID is used in the queries that apply to both stateful and stateless services. It - is used by Service Fabric to uniquely identify a replica of a partition of a stateful service - or an instance of a stateless service partition. It is unique within a partition and does not - change for the lifetime of the replica or the instance. If a stateful replica gets dropped and - another replica gets created on the same node for the same partition, it will get a different - value for the ID. If a stateless instance is failed over on the same or different node it will - get a different value for the ID. - :paramtype replica_or_instance_id: str - """ - super(ReplicaHealthStateChunk, self).__init__(**kwargs) - self.replica_or_instance_id = kwargs.get('replica_or_instance_id', None) - - -class ReplicaHealthStateChunkList(msrest.serialization.Model): - """The list of replica health state chunks that respect the input filters in the chunk query. Returned by get cluster health state chunks query. - - :ivar items: The list of replica health state chunks that respect the input filters in the - chunk query. - :vartype items: list[~azure.servicefabric.models.ReplicaHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[ReplicaHealthStateChunk]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword items: The list of replica health state chunks that respect the input filters in the - chunk query. - :paramtype items: list[~azure.servicefabric.models.ReplicaHealthStateChunk] - """ - super(ReplicaHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) - - -class ReplicaHealthStateFilter(msrest.serialization.Model): - """Defines matching criteria to determine whether a replica should be included as a child of a partition in the cluster health chunk. -The replicas are only returned if the parent entities match a filter specified in the cluster health chunk query description. The parent partition, service and application must be included in the cluster health chunk. -One filter can match zero, one or multiple replicas, depending on its properties. - - :ivar replica_or_instance_id_filter: Id of the stateful service replica or stateless service - instance that matches the filter. The filter is applied only to the specified replica, if it - exists. - If the replica doesn't exist, no replica is returned in the cluster health chunk based on this - filter. - If the replica exists, it is included in the cluster health chunk if it respects the other - filter properties. - If not specified, all replicas that match the parent filters (if any) are taken into - consideration and matched against the other filter members, like health state filter. - :vartype replica_or_instance_id_filter: str - :ivar health_state_filter: The filter for the health state of the replicas. It allows selecting - replicas if they match the desired health states. - The possible values are integer value of one of the following health states. Only replicas - that match the filter are returned. All replicas are used to evaluate the parent partition - aggregated health state. - If not specified, default value is None, unless the replica ID is specified. If the filter has - default value and replica ID is specified, the matching replica is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches replicas with HealthState value of OK (2) - and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :vartype health_state_filter: int - """ - - _attribute_map = { - 'replica_or_instance_id_filter': {'key': 'ReplicaOrInstanceIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword replica_or_instance_id_filter: Id of the stateful service replica or stateless service - instance that matches the filter. The filter is applied only to the specified replica, if it - exists. - If the replica doesn't exist, no replica is returned in the cluster health chunk based on this - filter. - If the replica exists, it is included in the cluster health chunk if it respects the other - filter properties. - If not specified, all replicas that match the parent filters (if any) are taken into - consideration and matched against the other filter members, like health state filter. - :paramtype replica_or_instance_id_filter: str - :keyword health_state_filter: The filter for the health state of the replicas. It allows - selecting replicas if they match the desired health states. - The possible values are integer value of one of the following health states. Only replicas - that match the filter are returned. All replicas are used to evaluate the parent partition - aggregated health state. - If not specified, default value is None, unless the replica ID is specified. If the filter has - default value and replica ID is specified, the matching replica is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches replicas with HealthState value of OK (2) - and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :paramtype health_state_filter: int - """ - super(ReplicaHealthStateFilter, self).__init__(**kwargs) - self.replica_or_instance_id_filter = kwargs.get('replica_or_instance_id_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - - -class ReplicaInfo(msrest.serialization.Model): - """Information about the identity, status, health, node name, uptime, and other details about the replica. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaInfo, StatelessServiceInstanceInfo. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", - "InBuild", "Standby", "Ready", "Down", "Dropped". - :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar node_name: The name of a Service Fabric node. - :vartype node_name: str - :ivar address: The address the replica is listening on. - :vartype address: str - :ivar last_in_build_duration_in_seconds: The last in build duration of the replica in seconds. - :vartype last_in_build_duration_in_seconds: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaInfo', 'Stateless': 'StatelessServiceInstanceInfo'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword replica_status: The status of a replica of a service. Possible values include: - "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". - :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword node_name: The name of a Service Fabric node. - :paramtype node_name: str - :keyword address: The address the replica is listening on. - :paramtype address: str - :keyword last_in_build_duration_in_seconds: The last in build duration of the replica in - seconds. - :paramtype last_in_build_duration_in_seconds: str - """ - super(ReplicaInfo, self).__init__(**kwargs) - self.service_kind = None # type: Optional[str] - self.replica_status = kwargs.get('replica_status', None) - self.health_state = kwargs.get('health_state', None) - self.node_name = kwargs.get('node_name', None) - self.address = kwargs.get('address', None) - self.last_in_build_duration_in_seconds = kwargs.get('last_in_build_duration_in_seconds', None) - - -class ReplicaLifecycleDescription(msrest.serialization.Model): - """Describes how the replica will behave. - - :ivar is_singleton_replica_move_allowed_during_upgrade: If set to true, replicas with a target - replica set size of 1 will be permitted to move during upgrade. - :vartype is_singleton_replica_move_allowed_during_upgrade: bool - :ivar restore_replica_location_after_upgrade: If set to true, move/swap replica to original - location after upgrade. - :vartype restore_replica_location_after_upgrade: bool - """ - - _attribute_map = { - 'is_singleton_replica_move_allowed_during_upgrade': {'key': 'IsSingletonReplicaMoveAllowedDuringUpgrade', 'type': 'bool'}, - 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword is_singleton_replica_move_allowed_during_upgrade: If set to true, replicas with a - target replica set size of 1 will be permitted to move during upgrade. - :paramtype is_singleton_replica_move_allowed_during_upgrade: bool - :keyword restore_replica_location_after_upgrade: If set to true, move/swap replica to original - location after upgrade. - :paramtype restore_replica_location_after_upgrade: bool - """ - super(ReplicaLifecycleDescription, self).__init__(**kwargs) - self.is_singleton_replica_move_allowed_during_upgrade = kwargs.get('is_singleton_replica_move_allowed_during_upgrade', None) - self.restore_replica_location_after_upgrade = kwargs.get('restore_replica_location_after_upgrade', None) - - -class ReplicaMetricLoadDescription(msrest.serialization.Model): - """Specifies metric loads of a partition's specific secondary replica or instance. - - :ivar node_name: Node name of a specific secondary replica or instance. - :vartype node_name: str - :ivar replica_or_instance_load_entries: Loads of a different metrics for a partition's - secondary replica or instance. - :vartype replica_or_instance_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'replica_or_instance_load_entries': {'key': 'ReplicaOrInstanceLoadEntries', 'type': '[MetricLoadDescription]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword node_name: Node name of a specific secondary replica or instance. - :paramtype node_name: str - :keyword replica_or_instance_load_entries: Loads of a different metrics for a partition's - secondary replica or instance. - :paramtype replica_or_instance_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - """ - super(ReplicaMetricLoadDescription, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.replica_or_instance_load_entries = kwargs.get('replica_or_instance_load_entries', None) - - -class ReplicasHealthEvaluation(HealthEvaluation): - """Represents health evaluation for replicas, containing health evaluations for each unhealthy replica that impacted current aggregated health state. Can be returned when evaluating partition health and the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar max_percent_unhealthy_replicas_per_partition: Maximum allowed percentage of unhealthy - replicas per partition from the ApplicationHealthPolicy. - :vartype max_percent_unhealthy_replicas_per_partition: int - :ivar total_count: Total number of replicas in the partition from the health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy ReplicaHealthEvaluation that impacted the aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword max_percent_unhealthy_replicas_per_partition: Maximum allowed percentage of unhealthy - replicas per partition from the ApplicationHealthPolicy. - :paramtype max_percent_unhealthy_replicas_per_partition: int - :keyword total_count: Total number of replicas in the partition from the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy ReplicaHealthEvaluation that impacted the aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(ReplicasHealthEvaluation, self).__init__(**kwargs) - self.kind = 'Replicas' # type: str - self.max_percent_unhealthy_replicas_per_partition = kwargs.get('max_percent_unhealthy_replicas_per_partition', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class ReplicatorQueueStatus(msrest.serialization.Model): - """Provides various statistics of the queue used in the service fabric replicator. -Contains information about the service fabric replicator like the replication/copy queue utilization, last acknowledgement received timestamp, etc. -Depending on the role of the replicator, the properties in this type imply different meanings. - - :ivar queue_utilization_percentage: Represents the utilization of the queue. A value of 0 - indicates that the queue is empty and a value of 100 indicates the queue is full. - :vartype queue_utilization_percentage: int - :ivar queue_memory_size: Represents the virtual memory consumed by the queue in bytes. - :vartype queue_memory_size: str - :ivar first_sequence_number: On a primary replicator, this is semantically the sequence number - of the operation for which all the secondary replicas have sent an acknowledgement. - On a secondary replicator, this is the smallest sequence number of the operation that is - present in the queue. - :vartype first_sequence_number: str - :ivar completed_sequence_number: On a primary replicator, this is semantically the highest - sequence number of the operation for which all the secondary replicas have sent an - acknowledgement. - On a secondary replicator, this is semantically the highest sequence number that has been - applied to the persistent state. - :vartype completed_sequence_number: str - :ivar committed_sequence_number: On a primary replicator, this is semantically the highest - sequence number of the operation for which a write quorum of the secondary replicas have sent - an acknowledgement. - On a secondary replicator, this is semantically the highest sequence number of the in-order - operation received from the primary. - :vartype committed_sequence_number: str - :ivar last_sequence_number: Represents the latest sequence number of the operation that is - available in the queue. - :vartype last_sequence_number: str - """ - - _attribute_map = { - 'queue_utilization_percentage': {'key': 'QueueUtilizationPercentage', 'type': 'int'}, - 'queue_memory_size': {'key': 'QueueMemorySize', 'type': 'str'}, - 'first_sequence_number': {'key': 'FirstSequenceNumber', 'type': 'str'}, - 'completed_sequence_number': {'key': 'CompletedSequenceNumber', 'type': 'str'}, - 'committed_sequence_number': {'key': 'CommittedSequenceNumber', 'type': 'str'}, - 'last_sequence_number': {'key': 'LastSequenceNumber', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword queue_utilization_percentage: Represents the utilization of the queue. A value of 0 - indicates that the queue is empty and a value of 100 indicates the queue is full. - :paramtype queue_utilization_percentage: int - :keyword queue_memory_size: Represents the virtual memory consumed by the queue in bytes. - :paramtype queue_memory_size: str - :keyword first_sequence_number: On a primary replicator, this is semantically the sequence - number of the operation for which all the secondary replicas have sent an acknowledgement. - On a secondary replicator, this is the smallest sequence number of the operation that is - present in the queue. - :paramtype first_sequence_number: str - :keyword completed_sequence_number: On a primary replicator, this is semantically the highest - sequence number of the operation for which all the secondary replicas have sent an - acknowledgement. - On a secondary replicator, this is semantically the highest sequence number that has been - applied to the persistent state. - :paramtype completed_sequence_number: str - :keyword committed_sequence_number: On a primary replicator, this is semantically the highest - sequence number of the operation for which a write quorum of the secondary replicas have sent - an acknowledgement. - On a secondary replicator, this is semantically the highest sequence number of the in-order - operation received from the primary. - :paramtype committed_sequence_number: str - :keyword last_sequence_number: Represents the latest sequence number of the operation that is - available in the queue. - :paramtype last_sequence_number: str - """ - super(ReplicatorQueueStatus, self).__init__(**kwargs) - self.queue_utilization_percentage = kwargs.get('queue_utilization_percentage', None) - self.queue_memory_size = kwargs.get('queue_memory_size', None) - self.first_sequence_number = kwargs.get('first_sequence_number', None) - self.completed_sequence_number = kwargs.get('completed_sequence_number', None) - self.committed_sequence_number = kwargs.get('committed_sequence_number', None) - self.last_sequence_number = kwargs.get('last_sequence_number', None) - - -class ResolvedServiceEndpoint(msrest.serialization.Model): - """Endpoint of a resolved service partition. - - :ivar kind: The role of the replica where the endpoint is reported. Possible values include: - "Invalid", "Stateless", "StatefulPrimary", "StatefulSecondary". - :vartype kind: str or ~azure.servicefabric.models.ServiceEndpointRole - :ivar address: The address of the endpoint. If the endpoint has multiple listeners the address - is a JSON object with one property per listener with the value as the address of that listener. - :vartype address: str - """ - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword kind: The role of the replica where the endpoint is reported. Possible values include: - "Invalid", "Stateless", "StatefulPrimary", "StatefulSecondary". - :paramtype kind: str or ~azure.servicefabric.models.ServiceEndpointRole - :keyword address: The address of the endpoint. If the endpoint has multiple listeners the - address is a JSON object with one property per listener with the value as the address of that - listener. - :paramtype address: str - """ - super(ResolvedServiceEndpoint, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.address = kwargs.get('address', None) - - -class ResolvedServicePartition(msrest.serialization.Model): - """Information about a service partition and its associated endpoints. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The full name of the service with 'fabric:' URI scheme. - :vartype name: str - :ivar partition_information: Required. A representation of the resolved partition. - :vartype partition_information: ~azure.servicefabric.models.PartitionInformation - :ivar endpoints: Required. List of resolved service endpoints of a service partition. - :vartype endpoints: list[~azure.servicefabric.models.ResolvedServiceEndpoint] - :ivar version: Required. The version of this resolved service partition result. This version - should be passed in the next time the ResolveService call is made via the PreviousRspVersion - query parameter. - :vartype version: str - """ - - _validation = { - 'name': {'required': True}, - 'partition_information': {'required': True}, - 'endpoints': {'required': True}, - 'version': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'endpoints': {'key': 'Endpoints', 'type': '[ResolvedServiceEndpoint]'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The full name of the service with 'fabric:' URI scheme. - :paramtype name: str - :keyword partition_information: Required. A representation of the resolved partition. - :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation - :keyword endpoints: Required. List of resolved service endpoints of a service partition. - :paramtype endpoints: list[~azure.servicefabric.models.ResolvedServiceEndpoint] - :keyword version: Required. The version of this resolved service partition result. This version - should be passed in the next time the ResolveService call is made via the PreviousRspVersion - query parameter. - :paramtype version: str - """ - super(ResolvedServicePartition, self).__init__(**kwargs) - self.name = kwargs['name'] - self.partition_information = kwargs['partition_information'] - self.endpoints = kwargs['endpoints'] - self.version = kwargs['version'] - - -class ResourceLimits(msrest.serialization.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. - - :ivar memory_in_gb: The memory limit in GB. - :vartype memory_in_gb: float - :ivar cpu: CPU limits in cores. At present, only full cores are supported. - :vartype cpu: float - """ - - _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword memory_in_gb: The memory limit in GB. - :paramtype memory_in_gb: float - :keyword cpu: CPU limits in cores. At present, only full cores are supported. - :paramtype cpu: float - """ - super(ResourceLimits, self).__init__(**kwargs) - self.memory_in_gb = kwargs.get('memory_in_gb', None) - self.cpu = kwargs.get('cpu', None) - - -class ResourceRequests(msrest.serialization.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. - - :ivar memory_in_gb: Required. The memory request in GB for this container. - :vartype memory_in_gb: float - :ivar cpu: Required. Requested number of CPU cores. At present, only full cores are supported. - :vartype 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 - ): - """ - :keyword memory_in_gb: Required. The memory request in GB for this container. - :paramtype memory_in_gb: float - :keyword cpu: Required. Requested number of CPU cores. At present, only full cores are - supported. - :paramtype cpu: float - """ - super(ResourceRequests, self).__init__(**kwargs) - self.memory_in_gb = kwargs['memory_in_gb'] - self.cpu = kwargs['cpu'] - - -class ResourceRequirements(msrest.serialization.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. - - :ivar requests: Required. Describes the requested resources for a given container. - :vartype requests: ~azure.servicefabric.models.ResourceRequests - :ivar limits: Describes the maximum limits on the resources for a given container. - :vartype 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 - ): - """ - :keyword requests: Required. Describes the requested resources for a given container. - :paramtype requests: ~azure.servicefabric.models.ResourceRequests - :keyword limits: Describes the maximum limits on the resources for a given container. - :paramtype limits: ~azure.servicefabric.models.ResourceLimits - """ - super(ResourceRequirements, self).__init__(**kwargs) - self.requests = kwargs['requests'] - self.limits = kwargs.get('limits', None) - - -class RestartDeployedCodePackageDescription(msrest.serialization.Model): - """Defines description for restarting a deployed code package on Service Fabric node. - - All required parameters must be populated in order to send to Azure. - - :ivar service_manifest_name: Required. The name of service manifest that specified this code - package. - :vartype service_manifest_name: str - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - :ivar code_package_name: Required. The name of the code package defined in the service - manifest. - :vartype code_package_name: str - :ivar code_package_instance_id: Required. The instance ID for currently running entry point. - For a code package setup entry point (if specified) runs first and after it finishes main entry - point is started. - Each time entry point executable is run, its instance ID will change. If 0 is passed in as the - code package instance ID, the API will restart the code package with whatever instance ID it is - currently running. - If an instance ID other than 0 is passed in, the API will restart the code package only if the - current Instance ID matches the passed in instance ID. - Note, passing in the exact instance ID (not 0) in the API is safer, because if ensures at most - one restart of the code package. - :vartype code_package_instance_id: str - """ - - _validation = { - 'service_manifest_name': {'required': True}, - 'code_package_name': {'required': True}, - 'code_package_instance_id': {'required': True}, - } - - _attribute_map = { - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'code_package_instance_id': {'key': 'CodePackageInstanceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_manifest_name: Required. The name of service manifest that specified this code - package. - :paramtype service_manifest_name: str - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - :keyword code_package_name: Required. The name of the code package defined in the service - manifest. - :paramtype code_package_name: str - :keyword code_package_instance_id: Required. The instance ID for currently running entry point. - For a code package setup entry point (if specified) runs first and after it finishes main entry - point is started. - Each time entry point executable is run, its instance ID will change. If 0 is passed in as the - code package instance ID, the API will restart the code package with whatever instance ID it is - currently running. - If an instance ID other than 0 is passed in, the API will restart the code package only if the - current Instance ID matches the passed in instance ID. - Note, passing in the exact instance ID (not 0) in the API is safer, because if ensures at most - one restart of the code package. - :paramtype code_package_instance_id: str - """ - super(RestartDeployedCodePackageDescription, self).__init__(**kwargs) - self.service_manifest_name = kwargs['service_manifest_name'] - self.service_package_activation_id = kwargs.get('service_package_activation_id', None) - self.code_package_name = kwargs['code_package_name'] - self.code_package_instance_id = kwargs['code_package_instance_id'] - - -class RestartNodeDescription(msrest.serialization.Model): - """Describes the parameters to restart a Service Fabric node. - - All required parameters must be populated in order to send to Azure. - - :ivar node_instance_id: Required. The instance ID of the target node. If instance ID is - specified the node is restarted only if it matches with the current instance of the node. A - default value of "0" would match any instance ID. The instance ID can be obtained using get - node query. - :vartype node_instance_id: str - :ivar create_fabric_dump: Specify True to create a dump of the fabric node process. This is - case-sensitive. Possible values include: "False", "True". Default value: "False". - :vartype create_fabric_dump: str or ~azure.servicefabric.models.CreateFabricDump - """ - - _validation = { - 'node_instance_id': {'required': True}, - } - - _attribute_map = { - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - 'create_fabric_dump': {'key': 'CreateFabricDump', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword node_instance_id: Required. The instance ID of the target node. If instance ID is - specified the node is restarted only if it matches with the current instance of the node. A - default value of "0" would match any instance ID. The instance ID can be obtained using get - node query. - :paramtype node_instance_id: str - :keyword create_fabric_dump: Specify True to create a dump of the fabric node process. This is - case-sensitive. Possible values include: "False", "True". Default value: "False". - :paramtype create_fabric_dump: str or ~azure.servicefabric.models.CreateFabricDump - """ - super(RestartNodeDescription, self).__init__(**kwargs) - self.node_instance_id = kwargs.get('node_instance_id', "0") - self.create_fabric_dump = kwargs.get('create_fabric_dump', "False") - - -class RestartPartitionResult(msrest.serialization.Model): - """Represents information about an operation in a terminal state (Completed or Faulted). - - :ivar error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, - this is an error code indicating the reason. - :vartype error_code: int - :ivar selected_partition: This class returns information about the partition that the - user-induced operation acted upon. - :vartype selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, - this is an error code indicating the reason. - :paramtype error_code: int - :keyword selected_partition: This class returns information about the partition that the - user-induced operation acted upon. - :paramtype selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - super(RestartPartitionResult, self).__init__(**kwargs) - self.error_code = kwargs.get('error_code', None) - self.selected_partition = kwargs.get('selected_partition', None) - - -class RestorePartitionDescription(msrest.serialization.Model): - """Specifies the parameters needed to trigger a restore of a specific partition. - - All required parameters must be populated in order to send to Azure. - - :ivar backup_id: Required. Unique backup ID. - :vartype backup_id: str - :ivar backup_location: Required. Location of the backup relative to the backup storage - specified/ configured. - :vartype backup_location: str - :ivar backup_storage: Location of the backup from where the partition will be restored. - :vartype backup_storage: ~azure.servicefabric.models.BackupStorageDescription - """ - - _validation = { - 'backup_id': {'required': True}, - 'backup_location': {'required': True}, - } - - _attribute_map = { - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword backup_id: Required. Unique backup ID. - :paramtype backup_id: str - :keyword backup_location: Required. Location of the backup relative to the backup storage - specified/ configured. - :paramtype backup_location: str - :keyword backup_storage: Location of the backup from where the partition will be restored. - :paramtype backup_storage: ~azure.servicefabric.models.BackupStorageDescription - """ - super(RestorePartitionDescription, self).__init__(**kwargs) - self.backup_id = kwargs['backup_id'] - self.backup_location = kwargs['backup_location'] - self.backup_storage = kwargs.get('backup_storage', None) - - -class RestoreProgressInfo(msrest.serialization.Model): - """Describes the progress of a restore operation on a partition. - - :ivar restore_state: Represents the current state of the partition restore operation. Possible - values include: "Invalid", "Accepted", "RestoreInProgress", "Success", "Failure", "Timeout". - :vartype restore_state: str or ~azure.servicefabric.models.RestoreState - :ivar time_stamp_utc: Timestamp when operation succeeded or failed. - :vartype time_stamp_utc: ~datetime.datetime - :ivar restored_epoch: Describes the epoch at which the partition is restored. - :vartype restored_epoch: ~azure.servicefabric.models.Epoch - :ivar restored_lsn: Restored LSN. - :vartype restored_lsn: str - :ivar failure_error: Denotes the failure encountered in performing restore operation. - :vartype failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'restore_state': {'key': 'RestoreState', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'restored_epoch': {'key': 'RestoredEpoch', 'type': 'Epoch'}, - 'restored_lsn': {'key': 'RestoredLsn', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword restore_state: Represents the current state of the partition restore operation. - Possible values include: "Invalid", "Accepted", "RestoreInProgress", "Success", "Failure", - "Timeout". - :paramtype restore_state: str or ~azure.servicefabric.models.RestoreState - :keyword time_stamp_utc: Timestamp when operation succeeded or failed. - :paramtype time_stamp_utc: ~datetime.datetime - :keyword restored_epoch: Describes the epoch at which the partition is restored. - :paramtype restored_epoch: ~azure.servicefabric.models.Epoch - :keyword restored_lsn: Restored LSN. - :paramtype restored_lsn: str - :keyword failure_error: Denotes the failure encountered in performing restore operation. - :paramtype failure_error: ~azure.servicefabric.models.FabricErrorError - """ - super(RestoreProgressInfo, self).__init__(**kwargs) - self.restore_state = kwargs.get('restore_state', None) - self.time_stamp_utc = kwargs.get('time_stamp_utc', None) - self.restored_epoch = kwargs.get('restored_epoch', None) - self.restored_lsn = kwargs.get('restored_lsn', None) - self.failure_error = kwargs.get('failure_error', None) - - -class ResumeApplicationUpgradeDescription(msrest.serialization.Model): - """Describes the parameters for resuming an unmonitored manual Service Fabric application upgrade. - - All required parameters must be populated in order to send to Azure. - - :ivar upgrade_domain_name: Required. The name of the upgrade domain in which to resume the - upgrade. - :vartype upgrade_domain_name: str - """ - - _validation = { - 'upgrade_domain_name': {'required': True}, - } - - _attribute_map = { - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword upgrade_domain_name: Required. The name of the upgrade domain in which to resume the - upgrade. - :paramtype upgrade_domain_name: str - """ - super(ResumeApplicationUpgradeDescription, self).__init__(**kwargs) - self.upgrade_domain_name = kwargs['upgrade_domain_name'] - - -class ResumeClusterUpgradeDescription(msrest.serialization.Model): - """Describes the parameters for resuming a cluster upgrade. - - All required parameters must be populated in order to send to Azure. - - :ivar upgrade_domain: Required. The next upgrade domain for this cluster upgrade. - :vartype upgrade_domain: str - """ - - _validation = { - 'upgrade_domain': {'required': True}, - } - - _attribute_map = { - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword upgrade_domain: Required. The next upgrade domain for this cluster upgrade. - :paramtype upgrade_domain: str - """ - super(ResumeClusterUpgradeDescription, self).__init__(**kwargs) - self.upgrade_domain = kwargs['upgrade_domain'] - - -class RollingUpgradeUpdateDescription(msrest.serialization.Model): - """Describes the parameters for updating a rolling upgrade of application or cluster. - - All required parameters must be populated in order to send to Azure. - - :ivar rolling_upgrade_mode: Required. The mode used to monitor health during a rolling upgrade. - The values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when - the code version has not changed (the upgrade only changes configuration or data). - :vartype force_restart: bool - :ivar replica_set_check_timeout_in_milliseconds: The maximum amount of time to block processing - of an upgrade domain and prevent loss of availability when there are unexpected issues. When - this timeout expires, processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between - 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :vartype replica_set_check_timeout_in_milliseconds: long - :ivar failure_action: The compensating action to perform when a Monitored upgrade encounters - monitoring policy or health policy violations. - Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will - start rolling back automatically. - Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible - values include: "Invalid", "Rollback", "Manual". - :vartype failure_action: str or ~azure.servicefabric.models.FailureAction - :ivar health_check_wait_duration_in_milliseconds: The amount of time to wait after completing - an upgrade domain before applying health policies. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted as a number - representing the total number of milliseconds. - :vartype health_check_wait_duration_in_milliseconds: str - :ivar health_check_stable_duration_in_milliseconds: The amount of time that the application or - cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is first - interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :vartype health_check_stable_duration_in_milliseconds: str - :ivar health_check_retry_timeout_in_milliseconds: The amount of time to retry health evaluation - when the application or cluster is unhealthy before FailureAction is executed. It is first - interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :vartype health_check_retry_timeout_in_milliseconds: str - :ivar upgrade_timeout_in_milliseconds: The amount of time the overall upgrade has to complete - before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 - duration. If that fails, then it is interpreted as a number representing the total number of - milliseconds. - :vartype upgrade_timeout_in_milliseconds: str - :ivar upgrade_domain_timeout_in_milliseconds: The amount of time each upgrade domain has to - complete before FailureAction is executed. It is first interpreted as a string representing an - ISO 8601 duration. If that fails, then it is interpreted as a number representing the total - number of milliseconds. - :vartype upgrade_domain_timeout_in_milliseconds: str - :ivar instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a stateless - instance is closed, to allow the active requests to drain gracefully. This would be effective - when the instance is closing during the application/cluster - upgrade, only for those instances which have a non-zero delay duration configured in the - service description. See InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates - that the behavior will entirely depend on the delay configured in the stateless service - description. - :vartype instance_close_delay_duration_in_seconds: long - """ - - _validation = { - 'rolling_upgrade_mode': {'required': True}, - } - - _attribute_map = { - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'replica_set_check_timeout_in_milliseconds': {'key': 'ReplicaSetCheckTimeoutInMilliseconds', 'type': 'long'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, - 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, - 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword rolling_upgrade_mode: Required. The mode used to monitor health during a rolling - upgrade. The values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. - Possible values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :keyword force_restart: If true, then processes are forcefully restarted during upgrade even - when the code version has not changed (the upgrade only changes configuration or data). - :paramtype force_restart: bool - :keyword replica_set_check_timeout_in_milliseconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :paramtype replica_set_check_timeout_in_milliseconds: long - :keyword failure_action: The compensating action to perform when a Monitored upgrade encounters - monitoring policy or health policy violations. - Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will - start rolling back automatically. - Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible - values include: "Invalid", "Rollback", "Manual". - :paramtype failure_action: str or ~azure.servicefabric.models.FailureAction - :keyword health_check_wait_duration_in_milliseconds: The amount of time to wait after - completing an upgrade domain before applying health policies. It is first interpreted as a - string representing an ISO 8601 duration. If that fails, then it is interpreted as a number - representing the total number of milliseconds. - :paramtype health_check_wait_duration_in_milliseconds: str - :keyword health_check_stable_duration_in_milliseconds: The amount of time that the application - or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is - first interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :paramtype health_check_stable_duration_in_milliseconds: str - :keyword health_check_retry_timeout_in_milliseconds: The amount of time to retry health - evaluation when the application or cluster is unhealthy before FailureAction is executed. It is - first interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :paramtype health_check_retry_timeout_in_milliseconds: str - :keyword upgrade_timeout_in_milliseconds: The amount of time the overall upgrade has to - complete before FailureAction is executed. It is first interpreted as a string representing an - ISO 8601 duration. If that fails, then it is interpreted as a number representing the total - number of milliseconds. - :paramtype upgrade_timeout_in_milliseconds: str - :keyword upgrade_domain_timeout_in_milliseconds: The amount of time each upgrade domain has to - complete before FailureAction is executed. It is first interpreted as a string representing an - ISO 8601 duration. If that fails, then it is interpreted as a number representing the total - number of milliseconds. - :paramtype upgrade_domain_timeout_in_milliseconds: str - :keyword instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a - stateless instance is closed, to allow the active requests to drain gracefully. This would be - effective when the instance is closing during the application/cluster - upgrade, only for those instances which have a non-zero delay duration configured in the - service description. See InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates - that the behavior will entirely depend on the delay configured in the stateless service - description. - :paramtype instance_close_delay_duration_in_seconds: long - """ - super(RollingUpgradeUpdateDescription, self).__init__(**kwargs) - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.force_restart = kwargs.get('force_restart', False) - self.replica_set_check_timeout_in_milliseconds = kwargs.get('replica_set_check_timeout_in_milliseconds', 42949672925) - self.failure_action = kwargs.get('failure_action', None) - self.health_check_wait_duration_in_milliseconds = kwargs.get('health_check_wait_duration_in_milliseconds', "0") - self.health_check_stable_duration_in_milliseconds = kwargs.get('health_check_stable_duration_in_milliseconds', "PT0H2M0S") - self.health_check_retry_timeout_in_milliseconds = kwargs.get('health_check_retry_timeout_in_milliseconds', "PT0H10M0S") - self.upgrade_timeout_in_milliseconds = kwargs.get('upgrade_timeout_in_milliseconds', "P10675199DT02H48M05.4775807S") - self.upgrade_domain_timeout_in_milliseconds = kwargs.get('upgrade_domain_timeout_in_milliseconds', "P10675199DT02H48M05.4775807S") - self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', 4294967295) - - -class RunToCompletionExecutionPolicy(ExecutionPolicy): - """The run to completion execution policy, the service will perform its desired operation and complete successfully. If the service encounters failure, it will restarted based on restart policy specified. If the service completes its operation successfully, it will not be restarted again. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Enumerates the execution policy types for services.Constant filled by - server. Possible values include: "Default", "RunToCompletion". - :vartype type: str or ~azure.servicefabric.models.ExecutionPolicyType - :ivar restart: Required. Enumerates the restart policy for RunToCompletionExecutionPolicy. - Possible values include: "OnFailure", "Never". - :vartype restart: str or ~azure.servicefabric.models.RestartPolicy - """ - - _validation = { - 'type': {'required': True}, - 'restart': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'restart': {'key': 'restart', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword restart: Required. Enumerates the restart policy for RunToCompletionExecutionPolicy. - Possible values include: "OnFailure", "Never". - :paramtype restart: str or ~azure.servicefabric.models.RestartPolicy - """ - super(RunToCompletionExecutionPolicy, self).__init__(**kwargs) - self.type = 'RunToCompletion' # type: str - self.restart = kwargs['restart'] - - -class SafetyCheckWrapper(msrest.serialization.Model): - """A wrapper for the safety check object. Safety checks are performed by service fabric before continuing with the operations. These checks ensure the availability of the service and the reliability of the state. - - :ivar safety_check: Represents a safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. - :vartype safety_check: ~azure.servicefabric.models.SafetyCheck - """ - - _attribute_map = { - 'safety_check': {'key': 'SafetyCheck', 'type': 'SafetyCheck'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword safety_check: Represents a safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. - :paramtype safety_check: ~azure.servicefabric.models.SafetyCheck - """ - super(SafetyCheckWrapper, self).__init__(**kwargs) - self.safety_check = kwargs.get('safety_check', None) - - -class ScalingPolicyDescription(msrest.serialization.Model): - """Describes how the scaling should be performed. - - All required parameters must be populated in order to send to Azure. - - :ivar scaling_trigger: Required. Specifies the trigger associated with this scaling policy. - :vartype scaling_trigger: ~azure.servicefabric.models.ScalingTriggerDescription - :ivar scaling_mechanism: Required. Specifies the mechanism associated with this scaling policy. - :vartype scaling_mechanism: ~azure.servicefabric.models.ScalingMechanismDescription - """ - - _validation = { - 'scaling_trigger': {'required': True}, - 'scaling_mechanism': {'required': True}, - } - - _attribute_map = { - 'scaling_trigger': {'key': 'ScalingTrigger', 'type': 'ScalingTriggerDescription'}, - 'scaling_mechanism': {'key': 'ScalingMechanism', 'type': 'ScalingMechanismDescription'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword scaling_trigger: Required. Specifies the trigger associated with this scaling policy. - :paramtype scaling_trigger: ~azure.servicefabric.models.ScalingTriggerDescription - :keyword scaling_mechanism: Required. Specifies the mechanism associated with this scaling - policy. - :paramtype scaling_mechanism: ~azure.servicefabric.models.ScalingMechanismDescription - """ - super(ScalingPolicyDescription, self).__init__(**kwargs) - self.scaling_trigger = kwargs['scaling_trigger'] - self.scaling_mechanism = kwargs['scaling_mechanism'] - - -class SecondaryReplicatorStatus(ReplicatorStatus): - """Provides statistics about the Service Fabric Replicator, when it is functioning in a ActiveSecondary role. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SecondaryActiveReplicatorStatus, SecondaryIdleReplicatorStatus. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. - Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", - "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". - :vartype kind: str or ~azure.servicefabric.models.ReplicaRole - :ivar replication_queue_status: Details about the replication queue on the secondary - replicator. - :vartype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :ivar last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a - replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation message was never - received. - :vartype last_replication_operation_received_time_utc: ~datetime.datetime - :ivar is_in_build: Value that indicates whether the replica is currently being built. - :vartype is_in_build: bool - :ivar copy_queue_status: Details about the copy queue on the secondary replicator. - :vartype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :ivar last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy - operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation message was never - received. - :vartype last_copy_operation_received_time_utc: ~datetime.datetime - :ivar last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an acknowledgment - was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. - :vartype last_acknowledgement_sent_time_utc: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - _subtype_map = { - 'kind': {'ActiveSecondary': 'SecondaryActiveReplicatorStatus', 'IdleSecondary': 'SecondaryIdleReplicatorStatus'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword replication_queue_status: Details about the replication queue on the secondary - replicator. - :paramtype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :keyword last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a - replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation message was never - received. - :paramtype last_replication_operation_received_time_utc: ~datetime.datetime - :keyword is_in_build: Value that indicates whether the replica is currently being built. - :paramtype is_in_build: bool - :keyword copy_queue_status: Details about the copy queue on the secondary replicator. - :paramtype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :keyword last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy - operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation message was never - received. - :paramtype last_copy_operation_received_time_utc: ~datetime.datetime - :keyword last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an - acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. - :paramtype last_acknowledgement_sent_time_utc: ~datetime.datetime - """ - super(SecondaryReplicatorStatus, self).__init__(**kwargs) - self.kind = 'SecondaryReplicatorStatus' # type: str - self.replication_queue_status = kwargs.get('replication_queue_status', None) - self.last_replication_operation_received_time_utc = kwargs.get('last_replication_operation_received_time_utc', None) - self.is_in_build = kwargs.get('is_in_build', None) - self.copy_queue_status = kwargs.get('copy_queue_status', None) - self.last_copy_operation_received_time_utc = kwargs.get('last_copy_operation_received_time_utc', None) - self.last_acknowledgement_sent_time_utc = kwargs.get('last_acknowledgement_sent_time_utc', None) - - -class SecondaryActiveReplicatorStatus(SecondaryReplicatorStatus): - """Status of the secondary replicator when it is in active mode and is part of the replica set. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. - Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", - "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". - :vartype kind: str or ~azure.servicefabric.models.ReplicaRole - :ivar replication_queue_status: Details about the replication queue on the secondary - replicator. - :vartype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :ivar last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a - replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation message was never - received. - :vartype last_replication_operation_received_time_utc: ~datetime.datetime - :ivar is_in_build: Value that indicates whether the replica is currently being built. - :vartype is_in_build: bool - :ivar copy_queue_status: Details about the copy queue on the secondary replicator. - :vartype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :ivar last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy - operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation message was never - received. - :vartype last_copy_operation_received_time_utc: ~datetime.datetime - :ivar last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an acknowledgment - was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. - :vartype last_acknowledgement_sent_time_utc: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword replication_queue_status: Details about the replication queue on the secondary - replicator. - :paramtype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :keyword last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a - replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation message was never - received. - :paramtype last_replication_operation_received_time_utc: ~datetime.datetime - :keyword is_in_build: Value that indicates whether the replica is currently being built. - :paramtype is_in_build: bool - :keyword copy_queue_status: Details about the copy queue on the secondary replicator. - :paramtype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :keyword last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy - operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation message was never - received. - :paramtype last_copy_operation_received_time_utc: ~datetime.datetime - :keyword last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an - acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. - :paramtype last_acknowledgement_sent_time_utc: ~datetime.datetime - """ - super(SecondaryActiveReplicatorStatus, self).__init__(**kwargs) - self.kind = 'ActiveSecondary' # type: str - - -class SecondaryIdleReplicatorStatus(SecondaryReplicatorStatus): - """Status of the secondary replicator when it is in idle mode and is being built by the primary. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. - Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", - "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". - :vartype kind: str or ~azure.servicefabric.models.ReplicaRole - :ivar replication_queue_status: Details about the replication queue on the secondary - replicator. - :vartype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :ivar last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a - replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation message was never - received. - :vartype last_replication_operation_received_time_utc: ~datetime.datetime - :ivar is_in_build: Value that indicates whether the replica is currently being built. - :vartype is_in_build: bool - :ivar copy_queue_status: Details about the copy queue on the secondary replicator. - :vartype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :ivar last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy - operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation message was never - received. - :vartype last_copy_operation_received_time_utc: ~datetime.datetime - :ivar last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an acknowledgment - was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. - :vartype last_acknowledgement_sent_time_utc: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword replication_queue_status: Details about the replication queue on the secondary - replicator. - :paramtype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :keyword last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a - replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation message was never - received. - :paramtype last_replication_operation_received_time_utc: ~datetime.datetime - :keyword is_in_build: Value that indicates whether the replica is currently being built. - :paramtype is_in_build: bool - :keyword copy_queue_status: Details about the copy queue on the secondary replicator. - :paramtype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :keyword last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy - operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation message was never - received. - :paramtype last_copy_operation_received_time_utc: ~datetime.datetime - :keyword last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an - acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. - :paramtype last_acknowledgement_sent_time_utc: ~datetime.datetime - """ - super(SecondaryIdleReplicatorStatus, self).__init__(**kwargs) - self.kind = 'IdleSecondary' # type: str - - -class SecretResourceDescription(msrest.serialization.Model): - """This type describes a secret resource. - - All required parameters must be populated in order to send to Azure. - - :ivar properties: Required. Describes the properties of a secret resource. - :vartype properties: ~azure.servicefabric.models.SecretResourceProperties - :ivar name: Required. Name of the Secret resource. - :vartype name: str - """ - - _validation = { - 'properties': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'SecretResourceProperties'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword properties: Required. Describes the properties of a secret resource. - :paramtype properties: ~azure.servicefabric.models.SecretResourceProperties - :keyword name: Required. Name of the Secret resource. - :paramtype name: str - """ - super(SecretResourceDescription, self).__init__(**kwargs) - self.properties = kwargs['properties'] - self.name = kwargs['name'] - - -class SecretValue(msrest.serialization.Model): - """This type represents the unencrypted value of the secret. - - :ivar value: The actual value of the secret. - :vartype value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: The actual value of the secret. - :paramtype value: str - """ - super(SecretValue, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class SecretValueProperties(msrest.serialization.Model): - """This type describes properties of secret value resource. - - :ivar value: The actual value of the secret. - :vartype value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: The actual value of the secret. - :paramtype value: str - """ - super(SecretValueProperties, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class SecretValueResourceDescription(msrest.serialization.Model): - """This type describes a value of a secret resource. The name of this resource is the version identifier corresponding to this secret value. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Version identifier of the secret value. - :vartype name: str - :ivar value: The actual value of the secret. - :vartype value: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. Version identifier of the secret value. - :paramtype name: str - :keyword value: The actual value of the secret. - :paramtype value: str - """ - super(SecretValueResourceDescription, self).__init__(**kwargs) - self.name = kwargs['name'] - self.value = kwargs.get('value', None) - - -class SecretValueResourceProperties(SecretValueProperties): - """This type describes properties of a secret value resource. - - :ivar value: The actual value of the secret. - :vartype value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: The actual value of the secret. - :paramtype value: str - """ - super(SecretValueResourceProperties, self).__init__(**kwargs) - - -class SeedNodeSafetyCheck(SafetyCheck): - """Represents a safety check for the seed nodes being performed by service fabric before continuing with node level operations. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(SeedNodeSafetyCheck, self).__init__(**kwargs) - self.kind = 'EnsureSeedNodeQuorum' # type: str - - -class SelectedPartition(msrest.serialization.Model): - """This class returns information about the partition that the user-induced operation acted upon. - - :ivar service_name: The name of the service the partition belongs to. - :vartype service_name: str - :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :vartype partition_id: str - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_name: The name of the service the partition belongs to. - :paramtype service_name: str - :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :paramtype partition_id: str - """ - super(SelectedPartition, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - - -class ServiceBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information for a specific Service Fabric service specifying what backup policy is being applied and suspend description, if any. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The entity type of a Service Fabric entity such as Application, Service - or a Partition where periodic backups can be enabled.Constant filled by server. Possible values - include: "Invalid", "Partition", "Service", "Application". - :vartype kind: str or ~azure.servicefabric.models.BackupEntityKind - :ivar policy_name: The name of the backup policy which is applicable to this Service Fabric - application or service or partition. - :vartype policy_name: str - :ivar policy_inherited_from: Specifies the scope at which the backup policy is applied. - Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope - :ivar suspension_info: Describes the backup suspension details. - :vartype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :ivar service_name: The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword policy_name: The name of the backup policy which is applicable to this Service Fabric - application or service or partition. - :paramtype policy_name: str - :keyword policy_inherited_from: Specifies the scope at which the backup policy is applied. - Possible values include: "Invalid", "Partition", "Service", "Application". - :paramtype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope - :keyword suspension_info: Describes the backup suspension details. - :paramtype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :keyword service_name: The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - """ - super(ServiceBackupConfigurationInfo, self).__init__(**kwargs) - self.kind = 'Service' # type: str - self.service_name = kwargs.get('service_name', None) - - -class ServiceBackupEntity(BackupEntity): - """Identifies the Service Fabric stateful service which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :ivar entity_kind: Required. The entity type of a Service Fabric entity such as Application, - Service or a Partition where periodic backups can be enabled.Constant filled by server. - Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype entity_kind: str or ~azure.servicefabric.models.BackupEntityKind - :ivar service_name: The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_name: The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - """ - super(ServiceBackupEntity, self).__init__(**kwargs) - self.entity_kind = 'Service' # type: str - self.service_name = kwargs.get('service_name', None) - - -class ServiceCorrelationDescription(msrest.serialization.Model): - """Creates a particular correlation between services. - - All required parameters must be populated in order to send to Azure. - - :ivar scheme: Required. The ServiceCorrelationScheme which describes the relationship between - this service and the service specified via ServiceName. Possible values include: "Invalid", - "Affinity", "AlignedAffinity", "NonAlignedAffinity". - :vartype scheme: str or ~azure.servicefabric.models.ServiceCorrelationScheme - :ivar service_name: Required. The name of the service that the correlation relationship is - established with. - :vartype service_name: str - """ - - _validation = { - 'scheme': {'required': True}, - 'service_name': {'required': True}, - } - - _attribute_map = { - 'scheme': {'key': 'Scheme', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword scheme: Required. The ServiceCorrelationScheme which describes the relationship - between this service and the service specified via ServiceName. Possible values include: - "Invalid", "Affinity", "AlignedAffinity", "NonAlignedAffinity". - :paramtype scheme: str or ~azure.servicefabric.models.ServiceCorrelationScheme - :keyword service_name: Required. The name of the service that the correlation relationship is - established with. - :paramtype service_name: str - """ - super(ServiceCorrelationDescription, self).__init__(**kwargs) - self.scheme = kwargs['scheme'] - self.service_name = kwargs['service_name'] - - -class ServiceEvent(FabricEvent): - """Represents the base for all Service Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServiceCreatedEvent, ServiceDeletedEvent, ServiceHealthReportExpiredEvent, ServiceNewHealthReportEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar service_id: Required. The identity of the service. This ID is an encoded representation - of the service name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype service_id: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'service_id': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ServiceCreated': 'ServiceCreatedEvent', 'ServiceDeleted': 'ServiceDeletedEvent', 'ServiceHealthReportExpired': 'ServiceHealthReportExpiredEvent', 'ServiceNewHealthReport': 'ServiceNewHealthReportEvent'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword service_id: Required. The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to identify the service - resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype service_id: str - """ - super(ServiceEvent, self).__init__(**kwargs) - self.kind = 'ServiceEvent' # type: str - self.service_id = kwargs['service_id'] - - -class ServiceCreatedEvent(ServiceEvent): - """Service Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar service_id: Required. The identity of the service. This ID is an encoded representation - of the service name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype service_id: str - :ivar service_type_name: Required. Service type name. - :vartype service_type_name: str - :ivar application_name: Required. Application name. - :vartype application_name: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar service_instance: Required. Id of Service instance. - :vartype service_instance: long - :ivar is_stateful: Required. Indicates if Service is stateful. - :vartype is_stateful: bool - :ivar partition_count: Required. Number of partitions. - :vartype partition_count: int - :ivar target_replica_set_size: Required. Size of target replicas set. - :vartype target_replica_set_size: int - :ivar min_replica_set_size: Required. Minimum size of replicas set. - :vartype min_replica_set_size: int - :ivar service_package_version: Required. Version of Service package. - :vartype service_package_version: str - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'service_id': {'required': True}, - 'service_type_name': {'required': True}, - 'application_name': {'required': True}, - 'application_type_name': {'required': True}, - 'service_instance': {'required': True}, - 'is_stateful': {'required': True}, - 'partition_count': {'required': True}, - 'target_replica_set_size': {'required': True}, - 'min_replica_set_size': {'required': True}, - 'service_package_version': {'required': True}, - 'partition_id': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword service_id: Required. The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to identify the service - resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype service_id: str - :keyword service_type_name: Required. Service type name. - :paramtype service_type_name: str - :keyword application_name: Required. Application name. - :paramtype application_name: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword service_instance: Required. Id of Service instance. - :paramtype service_instance: long - :keyword is_stateful: Required. Indicates if Service is stateful. - :paramtype is_stateful: bool - :keyword partition_count: Required. Number of partitions. - :paramtype partition_count: int - :keyword target_replica_set_size: Required. Size of target replicas set. - :paramtype target_replica_set_size: int - :keyword min_replica_set_size: Required. Minimum size of replicas set. - :paramtype min_replica_set_size: int - :keyword service_package_version: Required. Version of Service package. - :paramtype service_package_version: str - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - """ - super(ServiceCreatedEvent, self).__init__(**kwargs) - self.kind = 'ServiceCreated' # type: str - self.service_type_name = kwargs['service_type_name'] - self.application_name = kwargs['application_name'] - self.application_type_name = kwargs['application_type_name'] - self.service_instance = kwargs['service_instance'] - self.is_stateful = kwargs['is_stateful'] - self.partition_count = kwargs['partition_count'] - self.target_replica_set_size = kwargs['target_replica_set_size'] - self.min_replica_set_size = kwargs['min_replica_set_size'] - self.service_package_version = kwargs['service_package_version'] - self.partition_id = kwargs['partition_id'] - - -class ServiceDeletedEvent(ServiceEvent): - """Service Deleted event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar service_id: Required. The identity of the service. This ID is an encoded representation - of the service name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype service_id: str - :ivar service_type_name: Required. Service type name. - :vartype service_type_name: str - :ivar application_name: Required. Application name. - :vartype application_name: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar service_instance: Required. Id of Service instance. - :vartype service_instance: long - :ivar is_stateful: Required. Indicates if Service is stateful. - :vartype is_stateful: bool - :ivar partition_count: Required. Number of partitions. - :vartype partition_count: int - :ivar target_replica_set_size: Required. Size of target replicas set. - :vartype target_replica_set_size: int - :ivar min_replica_set_size: Required. Minimum size of replicas set. - :vartype min_replica_set_size: int - :ivar service_package_version: Required. Version of Service package. - :vartype service_package_version: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'service_id': {'required': True}, - 'service_type_name': {'required': True}, - 'application_name': {'required': True}, - 'application_type_name': {'required': True}, - 'service_instance': {'required': True}, - 'is_stateful': {'required': True}, - 'partition_count': {'required': True}, - 'target_replica_set_size': {'required': True}, - 'min_replica_set_size': {'required': True}, - 'service_package_version': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword service_id: Required. The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to identify the service - resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype service_id: str - :keyword service_type_name: Required. Service type name. - :paramtype service_type_name: str - :keyword application_name: Required. Application name. - :paramtype application_name: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword service_instance: Required. Id of Service instance. - :paramtype service_instance: long - :keyword is_stateful: Required. Indicates if Service is stateful. - :paramtype is_stateful: bool - :keyword partition_count: Required. Number of partitions. - :paramtype partition_count: int - :keyword target_replica_set_size: Required. Size of target replicas set. - :paramtype target_replica_set_size: int - :keyword min_replica_set_size: Required. Minimum size of replicas set. - :paramtype min_replica_set_size: int - :keyword service_package_version: Required. Version of Service package. - :paramtype service_package_version: str - """ - super(ServiceDeletedEvent, self).__init__(**kwargs) - self.kind = 'ServiceDeleted' # type: str - self.service_type_name = kwargs['service_type_name'] - self.application_name = kwargs['application_name'] - self.application_type_name = kwargs['application_type_name'] - self.service_instance = kwargs['service_instance'] - self.is_stateful = kwargs['is_stateful'] - self.partition_count = kwargs['partition_count'] - self.target_replica_set_size = kwargs['target_replica_set_size'] - self.min_replica_set_size = kwargs['min_replica_set_size'] - self.service_package_version = kwargs['service_package_version'] - - -class ServiceDescription(msrest.serialization.Model): - """A ServiceDescription contains all of the information necessary to create a service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceDescription, StatelessServiceDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The service kind.Constant filled by server. Possible values - include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar service_name: Required. The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar service_type_name: Required. Name of the service type as specified in the service - manifest. - :vartype service_type_name: str - :ivar initialization_data: The initialization data as an array of bytes. Initialization data is - passed to service instances or replicas when they are created. - :vartype initialization_data: list[int] - :ivar partition_description: Required. The partition description as an object. - :vartype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription - :ivar placement_constraints: The placement constraints as a string. Placement constraints are - boolean expressions on node properties and allow for restricting a service to particular nodes - based on the service requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :vartype placement_constraints: str - :ivar correlation_scheme: The correlation scheme. - :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :ivar service_load_metrics: The service load metrics. - :vartype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: The service placement policies. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", - "Medium", "High", "VeryHigh". - :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :ivar is_default_move_cost_specified: Indicates if the DefaultMoveCost property is specified. - :vartype is_default_move_cost_specified: bool - :ivar service_package_activation_mode: The activation mode of service package to be used for a - service. Possible values include: "SharedProcess", "ExclusiveProcess". - :vartype service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :ivar service_dns_name: The DNS name of the service. It requires the DNS system service to be - enabled in Service Fabric cluster. - :vartype service_dns_name: str - :ivar scaling_policies: Scaling policies for this service. - :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :ivar tags_required_to_place: Tags for placement of this service. - :vartype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription - :ivar tags_required_to_run: Tags for running of this service. - :vartype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription - """ - - _validation = { - 'service_kind': {'required': True}, - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceDescription', 'Stateless': 'StatelessServiceDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword service_name: Required. The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword service_type_name: Required. Name of the service type as specified in the service - manifest. - :paramtype service_type_name: str - :keyword initialization_data: The initialization data as an array of bytes. Initialization data - is passed to service instances or replicas when they are created. - :paramtype initialization_data: list[int] - :keyword partition_description: Required. The partition description as an object. - :paramtype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription - :keyword placement_constraints: The placement constraints as a string. Placement constraints - are boolean expressions on node properties and allow for restricting a service to particular - nodes based on the service requirements. For example, to place a service on nodes where - NodeType is blue specify the following: "NodeColor == blue)". - :paramtype placement_constraints: str - :keyword correlation_scheme: The correlation scheme. - :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :keyword service_load_metrics: The service load metrics. - :paramtype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: The service placement policies. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", - "Low", "Medium", "High", "VeryHigh". - :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :keyword is_default_move_cost_specified: Indicates if the DefaultMoveCost property is - specified. - :paramtype is_default_move_cost_specified: bool - :keyword service_package_activation_mode: The activation mode of service package to be used for - a service. Possible values include: "SharedProcess", "ExclusiveProcess". - :paramtype service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :keyword service_dns_name: The DNS name of the service. It requires the DNS system service to - be enabled in Service Fabric cluster. - :paramtype service_dns_name: str - :keyword scaling_policies: Scaling policies for this service. - :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :keyword tags_required_to_place: Tags for placement of this service. - :paramtype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription - :keyword tags_required_to_run: Tags for running of this service. - :paramtype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription - """ - super(ServiceDescription, self).__init__(**kwargs) - self.service_kind = None # type: Optional[str] - self.application_name = kwargs.get('application_name', None) - self.service_name = kwargs['service_name'] - self.service_type_name = kwargs['service_type_name'] - self.initialization_data = kwargs.get('initialization_data', None) - self.partition_description = kwargs['partition_description'] - self.placement_constraints = kwargs.get('placement_constraints', None) - self.correlation_scheme = kwargs.get('correlation_scheme', None) - self.service_load_metrics = kwargs.get('service_load_metrics', None) - self.service_placement_policies = kwargs.get('service_placement_policies', None) - self.default_move_cost = kwargs.get('default_move_cost', None) - self.is_default_move_cost_specified = kwargs.get('is_default_move_cost_specified', None) - self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) - self.service_dns_name = kwargs.get('service_dns_name', None) - self.scaling_policies = kwargs.get('scaling_policies', None) - self.tags_required_to_place = kwargs.get('tags_required_to_place', None) - self.tags_required_to_run = kwargs.get('tags_required_to_run', None) - - -class ServiceFromTemplateDescription(msrest.serialization.Model): - """Defines description for creating a Service Fabric service from a template defined in the application manifest. - - All required parameters must be populated in order to send to Azure. - - :ivar application_name: Required. The name of the application, including the 'fabric:' URI - scheme. - :vartype application_name: str - :ivar service_name: Required. The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar service_type_name: Required. Name of the service type as specified in the service - manifest. - :vartype service_type_name: str - :ivar initialization_data: The initialization data for the newly created service instance. - :vartype initialization_data: list[int] - :ivar service_package_activation_mode: The activation mode of service package to be used for a - service. Possible values include: "SharedProcess", "ExclusiveProcess". - :vartype service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :ivar service_dns_name: The DNS name of the service. It requires the DNS system service to be - enabled in Service Fabric cluster. - :vartype service_dns_name: str - """ - - _validation = { - 'application_name': {'required': True}, - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword application_name: Required. The name of the application, including the 'fabric:' URI - scheme. - :paramtype application_name: str - :keyword service_name: Required. The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword service_type_name: Required. Name of the service type as specified in the service - manifest. - :paramtype service_type_name: str - :keyword initialization_data: The initialization data for the newly created service instance. - :paramtype initialization_data: list[int] - :keyword service_package_activation_mode: The activation mode of service package to be used for - a service. Possible values include: "SharedProcess", "ExclusiveProcess". - :paramtype service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :keyword service_dns_name: The DNS name of the service. It requires the DNS system service to - be enabled in Service Fabric cluster. - :paramtype service_dns_name: str - """ - super(ServiceFromTemplateDescription, self).__init__(**kwargs) - self.application_name = kwargs['application_name'] - self.service_name = kwargs['service_name'] - self.service_type_name = kwargs['service_type_name'] - self.initialization_data = kwargs.get('initialization_data', None) - self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) - self.service_dns_name = kwargs.get('service_dns_name', None) - - -class ServiceHealth(EntityHealth): - """Information about the health of a Service Fabric service. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar name: The name of the service whose health information is described by this object. - :vartype name: str - :ivar partition_health_states: The list of partition health states associated with the service. - :vartype partition_health_states: list[~azure.servicefabric.models.PartitionHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'partition_health_states': {'key': 'PartitionHealthStates', 'type': '[PartitionHealthState]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword name: The name of the service whose health information is described by this object. - :paramtype name: str - :keyword partition_health_states: The list of partition health states associated with the - service. - :paramtype partition_health_states: list[~azure.servicefabric.models.PartitionHealthState] - """ - super(ServiceHealth, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.partition_health_states = kwargs.get('partition_health_states', None) - - -class ServiceHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a service, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar service_name: Name of the service whose health evaluation is described by this object. - :vartype service_name: str - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated - health state of the service. The types of the unhealthy evaluations can be - PartitionsHealthEvaluation or EventHealthEvaluation. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword service_name: Name of the service whose health evaluation is described by this object. - :paramtype service_name: str - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current - aggregated health state of the service. The types of the unhealthy evaluations can be - PartitionsHealthEvaluation or EventHealthEvaluation. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(ServiceHealthEvaluation, self).__init__(**kwargs) - self.kind = 'Service' # type: str - self.service_name = kwargs.get('service_name', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class ServiceHealthReportExpiredEvent(ServiceEvent): - """Service Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar service_id: Required. The identity of the service. This ID is an encoded representation - of the service name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype service_id: str - :ivar instance_id: Required. Id of Service instance. - :vartype instance_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'service_id': {'required': True}, - 'instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword service_id: Required. The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to identify the service - resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype service_id: str - :keyword instance_id: Required. Id of Service instance. - :paramtype instance_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(ServiceHealthReportExpiredEvent, self).__init__(**kwargs) - self.kind = 'ServiceHealthReportExpired' # type: str - self.instance_id = kwargs['instance_id'] - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class ServiceHealthState(EntityHealthState): - """Represents the health state of a service, which contains the service identifier and its aggregated health state. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_name: Name of the service whose health state is represented by this object. - :vartype service_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword service_name: Name of the service whose health state is represented by this object. - :paramtype service_name: str - """ - super(ServiceHealthState, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - - -class ServiceHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a service, which contains the service name, its aggregated health state and any partitions that respect the filters in the cluster health chunk query description. - - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_name: The name of the service whose health state chunk is provided in this - object. - :vartype service_name: str - :ivar partition_health_state_chunks: The list of partition health state chunks belonging to the - service that respect the filters in the cluster health chunk query description. - :vartype partition_health_state_chunks: - ~azure.servicefabric.models.PartitionHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_health_state_chunks': {'key': 'PartitionHealthStateChunks', 'type': 'PartitionHealthStateChunkList'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword service_name: The name of the service whose health state chunk is provided in this - object. - :paramtype service_name: str - :keyword partition_health_state_chunks: The list of partition health state chunks belonging to - the service that respect the filters in the cluster health chunk query description. - :paramtype partition_health_state_chunks: - ~azure.servicefabric.models.PartitionHealthStateChunkList - """ - super(ServiceHealthStateChunk, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_health_state_chunks = kwargs.get('partition_health_state_chunks', None) - - -class ServiceHealthStateChunkList(msrest.serialization.Model): - """The list of service health state chunks that respect the input filters in the chunk query. Returned by get cluster health state chunks query. - - :ivar items: The list of service health state chunks that respect the input filters in the - chunk query. - :vartype items: list[~azure.servicefabric.models.ServiceHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[ServiceHealthStateChunk]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword items: The list of service health state chunks that respect the input filters in the - chunk query. - :paramtype items: list[~azure.servicefabric.models.ServiceHealthStateChunk] - """ - super(ServiceHealthStateChunkList, self).__init__(**kwargs) - self.items = kwargs.get('items', None) - - -class ServiceHealthStateFilter(msrest.serialization.Model): - """Defines matching criteria to determine whether a service should be included as a child of an application in the cluster health chunk. -The services are only returned if the parent application matches a filter specified in the cluster health chunk query description. -One filter can match zero, one or multiple services, depending on its properties. - - :ivar service_name_filter: The name of the service that matches the filter. The filter is - applied only to the specified service, if it exists. - If the service doesn't exist, no service is returned in the cluster health chunk based on this - filter. - If the service exists, it is included as the application's child if the health state matches - the other filter properties. - If not specified, all services that match the parent filters (if any) are taken into - consideration and matched against the other filter members, like health state filter. - :vartype service_name_filter: str - :ivar health_state_filter: The filter for the health state of the services. It allows selecting - services if they match the desired health states. - The possible values are integer value of one of the following health states. Only services - that match the filter are returned. All services are used to evaluate the cluster aggregated - health state. - If not specified, default value is None, unless the service name is specified. If the filter - has default value and service name is specified, the matching service is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches services with HealthState value of OK (2) - and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :vartype health_state_filter: int - :ivar partition_filters: Defines a list of filters that specify which partitions to be included - in the returned cluster health chunk as children of the service. The partitions are returned - only if the parent service matches a filter. - If the list is empty, no partitions are returned. All the partitions are used to evaluate the - parent service aggregated health state, regardless of the input filters. - The service filter may specify multiple partition filters. - For example, it can specify a filter to return all partitions with health state Error and - another filter to always include a partition identified by its partition ID. - :vartype partition_filters: list[~azure.servicefabric.models.PartitionHealthStateFilter] - """ - - _attribute_map = { - 'service_name_filter': {'key': 'ServiceNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'partition_filters': {'key': 'PartitionFilters', 'type': '[PartitionHealthStateFilter]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_name_filter: The name of the service that matches the filter. The filter is - applied only to the specified service, if it exists. - If the service doesn't exist, no service is returned in the cluster health chunk based on this - filter. - If the service exists, it is included as the application's child if the health state matches - the other filter properties. - If not specified, all services that match the parent filters (if any) are taken into - consideration and matched against the other filter members, like health state filter. - :paramtype service_name_filter: str - :keyword health_state_filter: The filter for the health state of the services. It allows - selecting services if they match the desired health states. - The possible values are integer value of one of the following health states. Only services - that match the filter are returned. All services are used to evaluate the cluster aggregated - health state. - If not specified, default value is None, unless the service name is specified. If the filter - has default value and service name is specified, the matching service is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches services with HealthState value of OK (2) - and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :paramtype health_state_filter: int - :keyword partition_filters: Defines a list of filters that specify which partitions to be - included in the returned cluster health chunk as children of the service. The partitions are - returned only if the parent service matches a filter. - If the list is empty, no partitions are returned. All the partitions are used to evaluate the - parent service aggregated health state, regardless of the input filters. - The service filter may specify multiple partition filters. - For example, it can specify a filter to return all partitions with health state Error and - another filter to always include a partition identified by its partition ID. - :paramtype partition_filters: list[~azure.servicefabric.models.PartitionHealthStateFilter] - """ - super(ServiceHealthStateFilter, self).__init__(**kwargs) - self.service_name_filter = kwargs.get('service_name_filter', None) - self.health_state_filter = kwargs.get('health_state_filter', 0) - self.partition_filters = kwargs.get('partition_filters', None) - - -class ServiceIdentity(msrest.serialization.Model): - """Map service identity friendly name to an application identity. - - :ivar name: The identity friendly name. - :vartype name: str - :ivar identity_ref: The application identity name. - :vartype identity_ref: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'identity_ref': {'key': 'identityRef', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The identity friendly name. - :paramtype name: str - :keyword identity_ref: The application identity name. - :paramtype identity_ref: str - """ - super(ServiceIdentity, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.identity_ref = kwargs.get('identity_ref', None) - - -class ServiceInfo(msrest.serialization.Model): - """Information about a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceInfo, StatelessServiceInfo. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The identity of the service. This ID is an encoded representation of the service - name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype id: str - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar name: The full name of the service with 'fabric:' URI scheme. - :vartype name: str - :ivar type_name: Name of the service type as specified in the service manifest. - :vartype type_name: str - :ivar manifest_version: The version of the service manifest. - :vartype manifest_version: str - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_status: The status of the application. Possible values include: "Unknown", - "Active", "Upgrading", "Deleting", "Creating", "Failed". - :vartype service_status: str or ~azure.servicefabric.models.ServiceStatus - :ivar is_service_group: Whether the service is in a service group. - :vartype is_service_group: bool - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceInfo', 'Stateless': 'StatelessServiceInfo'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: The identity of the service. This ID is an encoded representation of the service - name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype id: str - :keyword name: The full name of the service with 'fabric:' URI scheme. - :paramtype name: str - :keyword type_name: Name of the service type as specified in the service manifest. - :paramtype type_name: str - :keyword manifest_version: The version of the service manifest. - :paramtype manifest_version: str - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword service_status: The status of the application. Possible values include: "Unknown", - "Active", "Upgrading", "Deleting", "Creating", "Failed". - :paramtype service_status: str or ~azure.servicefabric.models.ServiceStatus - :keyword is_service_group: Whether the service is in a service group. - :paramtype is_service_group: bool - """ - super(ServiceInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.service_kind = None # type: Optional[str] - self.name = kwargs.get('name', None) - self.type_name = kwargs.get('type_name', None) - self.manifest_version = kwargs.get('manifest_version', None) - self.health_state = kwargs.get('health_state', None) - self.service_status = kwargs.get('service_status', None) - self.is_service_group = kwargs.get('is_service_group', None) - - -class ServiceLoadMetricDescription(msrest.serialization.Model): - """Specifies a metric to load balance a service during runtime. - - All required parameters must be populated in order to send to Azure. - - :ivar 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. - :vartype name: str - :ivar weight: The service load metric relative weight, compared to other metrics configured for - this service, as a number. Possible values include: "Zero", "Low", "Medium", "High". - :vartype weight: str or ~azure.servicefabric.models.ServiceLoadMetricWeight - :ivar primary_default_load: Used only for Stateful services. The default amount of load, as a - number, that this service creates for this metric when it is a Primary replica. - :vartype primary_default_load: int - :ivar secondary_default_load: Used only for Stateful services. The default amount of load, as a - number, that this service creates for this metric when it is a Secondary replica. - :vartype secondary_default_load: int - :ivar auxiliary_default_load: Used only for Stateful services. The default amount of load, as a - number, that this service creates for this metric when it is an Auxiliary replica. - :vartype auxiliary_default_load: int - :ivar default_load: Used only for Stateless services. The default amount of load, as a number, - that this service creates for this metric. - :vartype default_load: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'weight': {'key': 'Weight', 'type': 'str'}, - 'primary_default_load': {'key': 'PrimaryDefaultLoad', 'type': 'int'}, - 'secondary_default_load': {'key': 'SecondaryDefaultLoad', 'type': 'int'}, - 'auxiliary_default_load': {'key': 'AuxiliaryDefaultLoad', 'type': 'int'}, - 'default_load': {'key': 'DefaultLoad', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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. - :paramtype name: str - :keyword weight: The service load metric relative weight, compared to other metrics configured - for this service, as a number. Possible values include: "Zero", "Low", "Medium", "High". - :paramtype weight: str or ~azure.servicefabric.models.ServiceLoadMetricWeight - :keyword primary_default_load: Used only for Stateful services. The default amount of load, as - a number, that this service creates for this metric when it is a Primary replica. - :paramtype primary_default_load: int - :keyword secondary_default_load: Used only for Stateful services. The default amount of load, - as a number, that this service creates for this metric when it is a Secondary replica. - :paramtype secondary_default_load: int - :keyword auxiliary_default_load: Used only for Stateful services. The default amount of load, - as a number, that this service creates for this metric when it is an Auxiliary replica. - :paramtype auxiliary_default_load: int - :keyword default_load: Used only for Stateless services. The default amount of load, as a - number, that this service creates for this metric. - :paramtype default_load: int - """ - super(ServiceLoadMetricDescription, self).__init__(**kwargs) - self.name = kwargs['name'] - self.weight = kwargs.get('weight', None) - self.primary_default_load = kwargs.get('primary_default_load', None) - self.secondary_default_load = kwargs.get('secondary_default_load', None) - self.auxiliary_default_load = kwargs.get('auxiliary_default_load', None) - self.default_load = kwargs.get('default_load', None) - - -class ServiceNameInfo(msrest.serialization.Model): - """Information about the service name. - - :ivar id: The identity of the service. This ID is an encoded representation of the service - name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype id: str - :ivar name: The full name of the service with 'fabric:' URI scheme. - :vartype name: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: The identity of the service. This ID is an encoded representation of the service - name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype id: str - :keyword name: The full name of the service with 'fabric:' URI scheme. - :paramtype name: str - """ - super(ServiceNameInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - - -class ServiceNewHealthReportEvent(ServiceEvent): - """Service Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar service_id: Required. The identity of the service. This ID is an encoded representation - of the service name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype service_id: str - :ivar instance_id: Required. Id of Service instance. - :vartype instance_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'service_id': {'required': True}, - 'instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword service_id: Required. The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to identify the service - resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype service_id: str - :keyword instance_id: Required. Id of Service instance. - :paramtype instance_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(ServiceNewHealthReportEvent, self).__init__(**kwargs) - self.kind = 'ServiceNewHealthReport' # type: str - self.instance_id = kwargs['instance_id'] - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class ServicePartitionInfo(msrest.serialization.Model): - """Information about a partition of a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServicePartitionInfo, StatelessServicePartitionInfo. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar partition_status: The status of the service fabric service partition. Possible values - include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". - :vartype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus - :ivar partition_information: Information about the partition identity, partitioning scheme and - keys supported by it. - :vartype partition_information: ~azure.servicefabric.models.PartitionInformation - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServicePartitionInfo', 'Stateless': 'StatelessServicePartitionInfo'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword partition_status: The status of the service fabric service partition. Possible values - include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". - :paramtype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus - :keyword partition_information: Information about the partition identity, partitioning scheme - and keys supported by it. - :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation - """ - super(ServicePartitionInfo, self).__init__(**kwargs) - self.service_kind = None # type: Optional[str] - self.health_state = kwargs.get('health_state', None) - self.partition_status = kwargs.get('partition_status', None) - self.partition_information = kwargs.get('partition_information', None) - - -class ServicePlacementPolicyDescription(msrest.serialization.Model): - """Describes the policy to be used for placement of a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, ServicePlacementInvalidDomainPolicyDescription, ServicePlacementNonPartiallyPlaceServicePolicyDescription, ServicePlacementPreferPrimaryDomainPolicyDescription, ServicePlacementRequiredDomainPolicyDescription, ServicePlacementRequireDomainDistributionPolicyDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The type of placement policy for a service fabric service. Following are - the possible values.Constant filled by server. Possible values include: "Invalid", - "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", - "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". - :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'AllowMultipleStatelessInstancesOnNode': 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', 'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ServicePlacementPolicyDescription, self).__init__(**kwargs) - self.type = None # type: Optional[str] - - -class ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service allowing multiple stateless instances of a partition of the service to be placed on a node. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The type of placement policy for a service fabric service. Following are - the possible values.Constant filled by server. Possible values include: "Invalid", - "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", - "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". - :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType - :ivar domain_name: Holdover from other policy descriptions, not used for this policy, values - are ignored by runtime. Keeping it for any backwards-compatibility with clients. - :vartype domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword domain_name: Holdover from other policy descriptions, not used for this policy, values - are ignored by runtime. Keeping it for any backwards-compatibility with clients. - :paramtype domain_name: str - """ - super(ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, self).__init__(**kwargs) - self.type = 'AllowMultipleStatelessInstancesOnNode' # type: str - self.domain_name = kwargs.get('domain_name', None) - - -class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service where a particular fault or upgrade domain should not be used for placement of the instances or replicas of that service. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The type of placement policy for a service fabric service. Following are - the possible values.Constant filled by server. Possible values include: "Invalid", - "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", - "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". - :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType - :ivar domain_name: The name of the domain that should not be used for placement. - :vartype domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword domain_name: The name of the domain that should not be used for placement. - :paramtype domain_name: str - """ - super(ServicePlacementInvalidDomainPolicyDescription, self).__init__(**kwargs) - self.type = 'InvalidDomain' # type: str - self.domain_name = kwargs.get('domain_name', None) - - -class ServicePlacementNonPartiallyPlaceServicePolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service where all replicas must be able to be placed in order for any replicas to be created. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The type of placement policy for a service fabric service. Following are - the possible values.Constant filled by server. Possible values include: "Invalid", - "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", - "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". - :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ServicePlacementNonPartiallyPlaceServicePolicyDescription, self).__init__(**kwargs) - self.type = 'NonPartiallyPlaceService' # type: str - - -class ServicePlacementPreferPrimaryDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service where the service's Primary replicas should optimally be placed in a particular domain. - -This placement policy is usually used with fault domains in scenarios where the Service Fabric cluster is geographically distributed in order to indicate that a service's primary replica should be located in a particular fault domain, which in geo-distributed scenarios usually aligns with regional or datacenter boundaries. Note that since this is an optimization it is possible that the Primary replica may not end up located in this domain due to failures, capacity limits, or other constraints. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The type of placement policy for a service fabric service. Following are - the possible values.Constant filled by server. Possible values include: "Invalid", - "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", - "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". - :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType - :ivar domain_name: The name of the domain that should used for placement as per this policy. - :vartype domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword domain_name: The name of the domain that should used for placement as per this policy. - :paramtype domain_name: str - """ - super(ServicePlacementPreferPrimaryDomainPolicyDescription, self).__init__(**kwargs) - self.type = 'PreferPrimaryDomain' # type: str - self.domain_name = kwargs.get('domain_name', None) - - -class ServicePlacementRequiredDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service where the instances or replicas of that service must be placed in a particular domain. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The type of placement policy for a service fabric service. Following are - the possible values.Constant filled by server. Possible values include: "Invalid", - "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", - "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". - :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType - :ivar domain_name: The name of the domain that should used for placement as per this policy. - :vartype domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword domain_name: The name of the domain that should used for placement as per this policy. - :paramtype domain_name: str - """ - super(ServicePlacementRequiredDomainPolicyDescription, self).__init__(**kwargs) - self.type = 'RequireDomain' # type: str - self.domain_name = kwargs.get('domain_name', None) - - -class ServicePlacementRequireDomainDistributionPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service where two replicas from the same partition should never be placed in the same fault or upgrade domain. - -While this is not common it can expose the service to an increased risk of concurrent failures due to unplanned outages or other cases of subsequent/concurrent failures. As an example, consider a case where replicas are deployed across different data center, with one replica per location. In the event that one of the datacenters goes offline, normally the replica that was placed in that datacenter will be packed into one of the remaining datacenters. If this is not desirable then this policy should be set. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The type of placement policy for a service fabric service. Following are - the possible values.Constant filled by server. Possible values include: "Invalid", - "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", - "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". - :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType - :ivar domain_name: The name of the domain that should used for placement as per this policy. - :vartype domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword domain_name: The name of the domain that should used for placement as per this policy. - :paramtype domain_name: str - """ - super(ServicePlacementRequireDomainDistributionPolicyDescription, self).__init__(**kwargs) - self.type = 'RequireDomainDistribution' # type: str - self.domain_name = kwargs.get('domain_name', None) - - -class ServiceProperties(msrest.serialization.Model): - """Describes properties of a service resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar description: User readable description of the service. - :vartype description: str - :ivar replica_count: The number of replicas of the service to create. Defaults to 1 if not - specified. - :vartype replica_count: int - :ivar execution_policy: The execution policy of the service. - :vartype execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :ivar auto_scaling_policies: Auto scaling policies. - :vartype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] - :ivar status: Status of the service. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the service. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. Possible values - include: "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the service's health state is not 'Ok', this additional - details from service fabric Health Manager for the user to know why the service is marked - unhealthy. - :vartype unhealthy_evaluation: str - :ivar identity_refs: The service identity list. - :vartype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :ivar dns_name: Dns name of the service. - :vartype dns_name: str - """ - - _validation = { - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'replica_count': {'key': 'replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'health_state': {'key': 'healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword description: User readable description of the service. - :paramtype description: str - :keyword replica_count: The number of replicas of the service to create. Defaults to 1 if not - specified. - :paramtype replica_count: int - :keyword execution_policy: The execution policy of the service. - :paramtype execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :keyword auto_scaling_policies: Auto scaling policies. - :paramtype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] - :keyword identity_refs: The service identity list. - :paramtype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :keyword dns_name: Dns name of the service. - :paramtype dns_name: str - """ - super(ServiceProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.replica_count = kwargs.get('replica_count', None) - self.execution_policy = kwargs.get('execution_policy', None) - self.auto_scaling_policies = kwargs.get('auto_scaling_policies', None) - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity_refs = kwargs.get('identity_refs', None) - self.dns_name = kwargs.get('dns_name', None) - - -class ServiceReplicaProperties(msrest.serialization.Model): - """Describes the properties of a service replica. - - All required parameters must be populated in order to send to Azure. - - :ivar os_type: Required. The operation system required by the code in service. Possible values - include: "Linux", "Windows". - :vartype os_type: str or ~azure.servicefabric.models.OperatingSystemType - :ivar 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.). - :vartype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] - :ivar network_refs: The names of the private networks that this service needs to be part of. - :vartype network_refs: list[~azure.servicefabric.models.NetworkRef] - :ivar diagnostics: Reference to sinks in DiagnosticsDescription. - :vartype 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 - ): - """ - :keyword os_type: Required. The operation system required by the code in service. Possible - values include: "Linux", "Windows". - :paramtype os_type: str or ~azure.servicefabric.models.OperatingSystemType - :keyword 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.). - :paramtype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] - :keyword network_refs: The names of the private networks that this service needs to be part of. - :paramtype network_refs: list[~azure.servicefabric.models.NetworkRef] - :keyword diagnostics: Reference to sinks in DiagnosticsDescription. - :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - """ - super(ServiceReplicaProperties, self).__init__(**kwargs) - self.os_type = kwargs['os_type'] - self.code_packages = kwargs['code_packages'] - self.network_refs = kwargs.get('network_refs', None) - self.diagnostics = kwargs.get('diagnostics', None) - - -class ServiceReplicaDescription(ServiceReplicaProperties): - """Describes a replica of a service resource. - - All required parameters must be populated in order to send to Azure. - - :ivar os_type: Required. The operation system required by the code in service. Possible values - include: "Linux", "Windows". - :vartype os_type: str or ~azure.servicefabric.models.OperatingSystemType - :ivar 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.). - :vartype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] - :ivar network_refs: The names of the private networks that this service needs to be part of. - :vartype network_refs: list[~azure.servicefabric.models.NetworkRef] - :ivar diagnostics: Reference to sinks in DiagnosticsDescription. - :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :ivar replica_name: Required. Name of the replica. - :vartype 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 - ): - """ - :keyword os_type: Required. The operation system required by the code in service. Possible - values include: "Linux", "Windows". - :paramtype os_type: str or ~azure.servicefabric.models.OperatingSystemType - :keyword 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.). - :paramtype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] - :keyword network_refs: The names of the private networks that this service needs to be part of. - :paramtype network_refs: list[~azure.servicefabric.models.NetworkRef] - :keyword diagnostics: Reference to sinks in DiagnosticsDescription. - :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :keyword replica_name: Required. Name of the replica. - :paramtype replica_name: str - """ - super(ServiceReplicaDescription, self).__init__(**kwargs) - self.replica_name = kwargs['replica_name'] - - -class ServiceResourceDescription(msrest.serialization.Model): - """This type describes a service resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of the Service resource. - :vartype name: str - :ivar os_type: Required. The operation system required by the code in service. Possible values - include: "Linux", "Windows". - :vartype os_type: str or ~azure.servicefabric.models.OperatingSystemType - :ivar 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.). - :vartype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] - :ivar network_refs: The names of the private networks that this service needs to be part of. - :vartype network_refs: list[~azure.servicefabric.models.NetworkRef] - :ivar diagnostics: Reference to sinks in DiagnosticsDescription. - :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :ivar description: User readable description of the service. - :vartype description: str - :ivar replica_count: The number of replicas of the service to create. Defaults to 1 if not - specified. - :vartype replica_count: int - :ivar execution_policy: The execution policy of the service. - :vartype execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :ivar auto_scaling_policies: Auto scaling policies. - :vartype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] - :ivar status: Status of the service. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the service. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. Possible values - include: "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the service's health state is not 'Ok', this additional - details from service fabric Health Manager for the user to know why the service is marked - unhealthy. - :vartype unhealthy_evaluation: str - :ivar identity_refs: The service identity list. - :vartype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :ivar dns_name: Dns name of the service. - :vartype dns_name: str - """ - - _validation = { - 'name': {'required': True}, - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'code_packages': {'key': 'properties.codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'properties.networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsRef'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'properties.executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'properties.autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'properties.identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. Name of the Service resource. - :paramtype name: str - :keyword os_type: Required. The operation system required by the code in service. Possible - values include: "Linux", "Windows". - :paramtype os_type: str or ~azure.servicefabric.models.OperatingSystemType - :keyword 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.). - :paramtype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] - :keyword network_refs: The names of the private networks that this service needs to be part of. - :paramtype network_refs: list[~azure.servicefabric.models.NetworkRef] - :keyword diagnostics: Reference to sinks in DiagnosticsDescription. - :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :keyword description: User readable description of the service. - :paramtype description: str - :keyword replica_count: The number of replicas of the service to create. Defaults to 1 if not - specified. - :paramtype replica_count: int - :keyword execution_policy: The execution policy of the service. - :paramtype execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :keyword auto_scaling_policies: Auto scaling policies. - :paramtype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] - :keyword identity_refs: The service identity list. - :paramtype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :keyword dns_name: Dns name of the service. - :paramtype dns_name: str - """ - super(ServiceResourceDescription, self).__init__(**kwargs) - self.name = kwargs['name'] - self.os_type = kwargs['os_type'] - self.code_packages = kwargs['code_packages'] - self.network_refs = kwargs.get('network_refs', None) - self.diagnostics = kwargs.get('diagnostics', None) - self.description = kwargs.get('description', None) - self.replica_count = kwargs.get('replica_count', None) - self.execution_policy = kwargs.get('execution_policy', None) - self.auto_scaling_policies = kwargs.get('auto_scaling_policies', None) - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity_refs = kwargs.get('identity_refs', None) - self.dns_name = kwargs.get('dns_name', None) - - -class ServiceResourceProperties(ServiceReplicaProperties, ServiceProperties): - """This type describes properties of a service resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar description: User readable description of the service. - :vartype description: str - :ivar replica_count: The number of replicas of the service to create. Defaults to 1 if not - specified. - :vartype replica_count: int - :ivar execution_policy: The execution policy of the service. - :vartype execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :ivar auto_scaling_policies: Auto scaling policies. - :vartype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] - :ivar status: Status of the service. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the service. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. Possible values - include: "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the service's health state is not 'Ok', this additional - details from service fabric Health Manager for the user to know why the service is marked - unhealthy. - :vartype unhealthy_evaluation: str - :ivar identity_refs: The service identity list. - :vartype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :ivar dns_name: Dns name of the service. - :vartype dns_name: str - :ivar os_type: Required. The operation system required by the code in service. Possible values - include: "Linux", "Windows". - :vartype os_type: str or ~azure.servicefabric.models.OperatingSystemType - :ivar 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.). - :vartype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] - :ivar network_refs: The names of the private networks that this service needs to be part of. - :vartype network_refs: list[~azure.servicefabric.models.NetworkRef] - :ivar diagnostics: Reference to sinks in DiagnosticsDescription. - :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - """ - - _validation = { - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'replica_count': {'key': 'replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'health_state': {'key': 'healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - '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 - ): - """ - :keyword description: User readable description of the service. - :paramtype description: str - :keyword replica_count: The number of replicas of the service to create. Defaults to 1 if not - specified. - :paramtype replica_count: int - :keyword execution_policy: The execution policy of the service. - :paramtype execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :keyword auto_scaling_policies: Auto scaling policies. - :paramtype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] - :keyword identity_refs: The service identity list. - :paramtype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :keyword dns_name: Dns name of the service. - :paramtype dns_name: str - :keyword os_type: Required. The operation system required by the code in service. Possible - values include: "Linux", "Windows". - :paramtype os_type: str or ~azure.servicefabric.models.OperatingSystemType - :keyword 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.). - :paramtype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] - :keyword network_refs: The names of the private networks that this service needs to be part of. - :paramtype network_refs: list[~azure.servicefabric.models.NetworkRef] - :keyword diagnostics: Reference to sinks in DiagnosticsDescription. - :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - """ - super(ServiceResourceProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.replica_count = kwargs.get('replica_count', None) - self.execution_policy = kwargs.get('execution_policy', None) - self.auto_scaling_policies = kwargs.get('auto_scaling_policies', None) - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity_refs = kwargs.get('identity_refs', None) - self.dns_name = kwargs.get('dns_name', None) - self.os_type = kwargs['os_type'] - self.code_packages = kwargs['code_packages'] - self.network_refs = kwargs.get('network_refs', None) - self.diagnostics = kwargs.get('diagnostics', None) - - -class ServicesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for services of a certain service type belonging to an application, containing health evaluations for each unhealthy service that impacted current aggregated health state. Can be returned when evaluating application health and the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar service_type_name: Name of the service type of the services. - :vartype service_type_name: str - :ivar max_percent_unhealthy_services: Maximum allowed percentage of unhealthy services from the - ServiceTypeHealthPolicy. - :vartype max_percent_unhealthy_services: int - :ivar total_count: Total number of services of the current service type in the application from - the health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy ServiceHealthEvaluation that impacted the aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword service_type_name: Name of the service type of the services. - :paramtype service_type_name: str - :keyword max_percent_unhealthy_services: Maximum allowed percentage of unhealthy services from - the ServiceTypeHealthPolicy. - :paramtype max_percent_unhealthy_services: int - :keyword total_count: Total number of services of the current service type in the application - from the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy ServiceHealthEvaluation that impacted the aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(ServicesHealthEvaluation, self).__init__(**kwargs) - self.kind = 'Services' # type: str - self.service_type_name = kwargs.get('service_type_name', None) - self.max_percent_unhealthy_services = kwargs.get('max_percent_unhealthy_services', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class ServiceTypeDescription(msrest.serialization.Model): - """Describes a service type defined in the service manifest of a provisioned application type. The properties the ones defined in the service manifest. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceTypeDescription, StatelessServiceTypeDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of service (Stateless or Stateful).Constant filled by server. - Possible values include: "Invalid", "Stateless", "Stateful". - :vartype kind: str or ~azure.servicefabric.models.ServiceKind - :ivar is_stateful: Indicates whether the service type is a stateful service type or a stateless - service type. This property is true if the service type is a stateful service type, false - otherwise. - :vartype is_stateful: bool - :ivar service_type_name: Name of the service type as specified in the service manifest. - :vartype service_type_name: str - :ivar placement_constraints: The placement constraint to be used when instantiating this - service in a Service Fabric cluster. - :vartype placement_constraints: str - :ivar load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: List of service placement policy descriptions. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar extensions: List of service type extensions. - :vartype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - } - - _subtype_map = { - 'kind': {'Stateful': 'StatefulServiceTypeDescription', 'Stateless': 'StatelessServiceTypeDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword is_stateful: Indicates whether the service type is a stateful service type or a - stateless service type. This property is true if the service type is a stateful service type, - false otherwise. - :paramtype is_stateful: bool - :keyword service_type_name: Name of the service type as specified in the service manifest. - :paramtype service_type_name: str - :keyword placement_constraints: The placement constraint to be used when instantiating this - service in a Service Fabric cluster. - :paramtype placement_constraints: str - :keyword load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: List of service placement policy descriptions. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword extensions: List of service type extensions. - :paramtype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - """ - super(ServiceTypeDescription, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.is_stateful = kwargs.get('is_stateful', None) - self.service_type_name = kwargs.get('service_type_name', None) - self.placement_constraints = kwargs.get('placement_constraints', None) - self.load_metrics = kwargs.get('load_metrics', None) - self.service_placement_policies = kwargs.get('service_placement_policies', None) - self.extensions = kwargs.get('extensions', None) - - -class ServiceTypeExtensionDescription(msrest.serialization.Model): - """Describes extension of a service type defined in the service manifest. - - :ivar key: The name of the extension. - :vartype key: str - :ivar value: The extension value. - :vartype value: str - """ - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: The name of the extension. - :paramtype key: str - :keyword value: The extension value. - :paramtype value: str - """ - super(ServiceTypeExtensionDescription, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) - - -class ServiceTypeHealthPolicy(msrest.serialization.Model): - """Represents the health policy used to evaluate the health of services belonging to a service type. - - :ivar max_percent_unhealthy_partitions_per_service: The maximum allowed percentage of unhealthy - partitions per service. Allowed values are Byte values from zero to 100 - - The percentage represents the maximum tolerated percentage of partitions that can be unhealthy - before the service is considered in error. - If the percentage is respected but there is at least one unhealthy partition, the health is - evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy partitions over the total - number of partitions in the service. - The computation rounds up to tolerate one failure on small numbers of partitions. Default - percentage is zero. - :vartype max_percent_unhealthy_partitions_per_service: int - :ivar max_percent_unhealthy_replicas_per_partition: The maximum allowed percentage of unhealthy - replicas per partition. Allowed values are Byte values from zero to 100. - - The percentage represents the maximum tolerated percentage of replicas that can be unhealthy - before the partition is considered in error. - If the percentage is respected but there is at least one unhealthy replica, the health is - evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy replicas over the total - number of replicas in the partition. - The computation rounds up to tolerate one failure on small numbers of replicas. Default - percentage is zero. - :vartype max_percent_unhealthy_replicas_per_partition: int - :ivar max_percent_unhealthy_services: The maximum allowed percentage of unhealthy services. - Allowed values are Byte values from zero to 100. - - The percentage represents the maximum tolerated percentage of services that can be unhealthy - before the application is considered in error. - If the percentage is respected but there is at least one unhealthy service, the health is - evaluated as Warning. - This is calculated by dividing the number of unhealthy services of the specific service type - over the total number of services of the specific service type. - The computation rounds up to tolerate one failure on small numbers of services. Default - percentage is zero. - :vartype max_percent_unhealthy_services: int - """ - - _attribute_map = { - 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, - 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, - 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword max_percent_unhealthy_partitions_per_service: The maximum allowed percentage of - unhealthy partitions per service. Allowed values are Byte values from zero to 100 - - The percentage represents the maximum tolerated percentage of partitions that can be unhealthy - before the service is considered in error. - If the percentage is respected but there is at least one unhealthy partition, the health is - evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy partitions over the total - number of partitions in the service. - The computation rounds up to tolerate one failure on small numbers of partitions. Default - percentage is zero. - :paramtype max_percent_unhealthy_partitions_per_service: int - :keyword max_percent_unhealthy_replicas_per_partition: The maximum allowed percentage of - unhealthy replicas per partition. Allowed values are Byte values from zero to 100. - - The percentage represents the maximum tolerated percentage of replicas that can be unhealthy - before the partition is considered in error. - If the percentage is respected but there is at least one unhealthy replica, the health is - evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy replicas over the total - number of replicas in the partition. - The computation rounds up to tolerate one failure on small numbers of replicas. Default - percentage is zero. - :paramtype max_percent_unhealthy_replicas_per_partition: int - :keyword max_percent_unhealthy_services: The maximum allowed percentage of unhealthy services. - Allowed values are Byte values from zero to 100. - - The percentage represents the maximum tolerated percentage of services that can be unhealthy - before the application is considered in error. - If the percentage is respected but there is at least one unhealthy service, the health is - evaluated as Warning. - This is calculated by dividing the number of unhealthy services of the specific service type - over the total number of services of the specific service type. - The computation rounds up to tolerate one failure on small numbers of services. Default - percentage is zero. - :paramtype max_percent_unhealthy_services: int - """ - super(ServiceTypeHealthPolicy, self).__init__(**kwargs) - self.max_percent_unhealthy_partitions_per_service = kwargs.get('max_percent_unhealthy_partitions_per_service', 0) - self.max_percent_unhealthy_replicas_per_partition = kwargs.get('max_percent_unhealthy_replicas_per_partition', 0) - self.max_percent_unhealthy_services = kwargs.get('max_percent_unhealthy_services', 0) - - -class ServiceTypeHealthPolicyMapItem(msrest.serialization.Model): - """Defines an item in ServiceTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :ivar key: Required. The key of the service type health policy map item. This is the name of - the service type. - :vartype key: str - :ivar value: Required. The value of the service type health policy map item. This is the - ServiceTypeHealthPolicy for this service type. - :vartype value: ~azure.servicefabric.models.ServiceTypeHealthPolicy - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ServiceTypeHealthPolicy'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key: Required. The key of the service type health policy map item. This is the name of - the service type. - :paramtype key: str - :keyword value: Required. The value of the service type health policy map item. This is the - ServiceTypeHealthPolicy for this service type. - :paramtype value: ~azure.servicefabric.models.ServiceTypeHealthPolicy - """ - super(ServiceTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = kwargs['key'] - self.value = kwargs['value'] - - -class ServiceTypeInfo(msrest.serialization.Model): - """Information about a service type that is defined in a service manifest of a provisioned application type. - - :ivar service_type_description: Describes a service type defined in the service manifest of a - provisioned application type. The properties the ones defined in the service manifest. - :vartype service_type_description: ~azure.servicefabric.models.ServiceTypeDescription - :ivar service_manifest_name: The name of the service manifest in which this service type is - defined. - :vartype service_manifest_name: str - :ivar service_manifest_version: The version of the service manifest in which this service type - is defined. - :vartype service_manifest_version: str - :ivar is_service_group: Indicates whether the service is a service group. If it is, the - property value is true otherwise false. - :vartype is_service_group: bool - """ - - _attribute_map = { - 'service_type_description': {'key': 'ServiceTypeDescription', 'type': 'ServiceTypeDescription'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_type_description: Describes a service type defined in the service manifest of - a provisioned application type. The properties the ones defined in the service manifest. - :paramtype service_type_description: ~azure.servicefabric.models.ServiceTypeDescription - :keyword service_manifest_name: The name of the service manifest in which this service type is - defined. - :paramtype service_manifest_name: str - :keyword service_manifest_version: The version of the service manifest in which this service - type is defined. - :paramtype service_manifest_version: str - :keyword is_service_group: Indicates whether the service is a service group. If it is, the - property value is true otherwise false. - :paramtype is_service_group: bool - """ - super(ServiceTypeInfo, self).__init__(**kwargs) - self.service_type_description = kwargs.get('service_type_description', None) - self.service_manifest_name = kwargs.get('service_manifest_name', None) - self.service_manifest_version = kwargs.get('service_manifest_version', None) - self.is_service_group = kwargs.get('is_service_group', None) - - -class ServiceTypeManifest(msrest.serialization.Model): - """Contains the manifest describing a service type registered as part of an application in a Service Fabric cluster. - - :ivar manifest: The XML manifest as a string. - :vartype manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword manifest: The XML manifest as a string. - :paramtype manifest: str - """ - super(ServiceTypeManifest, self).__init__(**kwargs) - self.manifest = kwargs.get('manifest', None) - - -class ServiceUpdateDescription(msrest.serialization.Model): - """A ServiceUpdateDescription contains all of the information necessary to update a service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceUpdateDescription, StatelessServiceUpdateDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The service kind.Constant filled by server. Possible values - include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and - QuorumLossWaitDuration (4) are set. - - - * None - Does not indicate any other properties are set. The value is zero. - * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property - (for Stateful services) or the InstanceCount property (for Stateless services) is set. The - value is 1. - * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The - value is 2. - * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is - 4. - * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The - value is 8. - * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. - * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. - * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is - 64. - * Correlation - Indicates the CorrelationScheme property is set. The value is 128. - * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. - * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. - * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. - * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The - value is 2048. - * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. - * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is - 8192. - * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 16384. - * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 32768. - * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value - is 65536. - * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. - * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. - * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. - :vartype flags: str - :ivar placement_constraints: The placement constraints as a string. Placement constraints are - boolean expressions on node properties and allow for restricting a service to particular nodes - based on the service requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :vartype placement_constraints: str - :ivar correlation_scheme: The correlation scheme. - :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :ivar load_metrics: The service load metrics. - :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: The service placement policies. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", - "Medium", "High", "VeryHigh". - :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :ivar scaling_policies: Scaling policies for this service. - :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :ivar service_dns_name: The DNS name of the service. - :vartype service_dns_name: str - :ivar tags_for_placement: Tags for placement of this service. - :vartype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :ivar tags_for_running: Tags for running of this service. - :vartype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceUpdateDescription', 'Stateless': 'StatelessServiceUpdateDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and - QuorumLossWaitDuration (4) are set. - - - * None - Does not indicate any other properties are set. The value is zero. - * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property - (for Stateful services) or the InstanceCount property (for Stateless services) is set. The - value is 1. - * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The - value is 2. - * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is - 4. - * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The - value is 8. - * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. - * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. - * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is - 64. - * Correlation - Indicates the CorrelationScheme property is set. The value is 128. - * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. - * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. - * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. - * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The - value is 2048. - * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. - * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is - 8192. - * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 16384. - * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 32768. - * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value - is 65536. - * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. - * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. - * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. - :paramtype flags: str - :keyword placement_constraints: The placement constraints as a string. Placement constraints - are boolean expressions on node properties and allow for restricting a service to particular - nodes based on the service requirements. For example, to place a service on nodes where - NodeType is blue specify the following: "NodeColor == blue)". - :paramtype placement_constraints: str - :keyword correlation_scheme: The correlation scheme. - :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :keyword load_metrics: The service load metrics. - :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: The service placement policies. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", - "Low", "Medium", "High", "VeryHigh". - :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :keyword scaling_policies: Scaling policies for this service. - :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :keyword service_dns_name: The DNS name of the service. - :paramtype service_dns_name: str - :keyword tags_for_placement: Tags for placement of this service. - :paramtype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :keyword tags_for_running: Tags for running of this service. - :paramtype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - """ - super(ServiceUpdateDescription, self).__init__(**kwargs) - self.service_kind = None # type: Optional[str] - self.flags = kwargs.get('flags', None) - self.placement_constraints = kwargs.get('placement_constraints', None) - self.correlation_scheme = kwargs.get('correlation_scheme', None) - self.load_metrics = kwargs.get('load_metrics', None) - self.service_placement_policies = kwargs.get('service_placement_policies', None) - self.default_move_cost = kwargs.get('default_move_cost', None) - self.scaling_policies = kwargs.get('scaling_policies', None) - self.service_dns_name = kwargs.get('service_dns_name', None) - self.tags_for_placement = kwargs.get('tags_for_placement', None) - self.tags_for_running = kwargs.get('tags_for_running', None) - - -class ServiceUpgradeProgress(msrest.serialization.Model): - """Information about how many replicas are completed or pending for a specific service during upgrade. - - :ivar service_name: Name of the Service resource. - :vartype service_name: str - :ivar completed_replica_count: The number of replicas that completes the upgrade in the - service. - :vartype completed_replica_count: str - :ivar pending_replica_count: The number of replicas that are waiting to be upgraded in the - service. - :vartype pending_replica_count: str - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'completed_replica_count': {'key': 'CompletedReplicaCount', 'type': 'str'}, - 'pending_replica_count': {'key': 'PendingReplicaCount', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_name: Name of the Service resource. - :paramtype service_name: str - :keyword completed_replica_count: The number of replicas that completes the upgrade in the - service. - :paramtype completed_replica_count: str - :keyword pending_replica_count: The number of replicas that are waiting to be upgraded in the - service. - :paramtype pending_replica_count: str - """ - super(ServiceUpgradeProgress, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.completed_replica_count = kwargs.get('completed_replica_count', None) - self.pending_replica_count = kwargs.get('pending_replica_count', None) - - -class Setting(msrest.serialization.Model): - """Describes a setting for the container. The setting file path can be fetched from environment variable "Fabric_SettingPath". The path for Windows container is "C:\secrets". The path for Linux container is "/var/secrets". - - :ivar type: The type of the setting being given in value. Possible values include: "ClearText", - "KeyVaultReference", "SecretValueReference". Default value: "ClearText". - :vartype type: str or ~azure.servicefabric.models.SettingType - :ivar name: The name of the setting. - :vartype name: str - :ivar value: The value of the setting, will be processed based on the type provided. - :vartype value: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword type: The type of the setting being given in value. Possible values include: - "ClearText", "KeyVaultReference", "SecretValueReference". Default value: "ClearText". - :paramtype type: str or ~azure.servicefabric.models.SettingType - :keyword name: The name of the setting. - :paramtype name: str - :keyword value: The value of the setting, will be processed based on the type provided. - :paramtype value: str - """ - super(Setting, self).__init__(**kwargs) - self.type = kwargs.get('type', "ClearText") - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - - -class SingletonPartitionInformation(PartitionInformation): - """Information about a partition that is singleton. The services with singleton partitioning scheme are effectively non-partitioned. They only have one partition. - - All required parameters must be populated in order to send to Azure. - - :ivar service_partition_kind: Required. The kind of partitioning scheme used to partition the - service.Constant filled by server. Possible values include: "Invalid", "Singleton", - "Int64Range", "Named". - :vartype service_partition_kind: str or ~azure.servicefabric.models.ServicePartitionKind - :ivar id: An internal ID used by Service Fabric to uniquely identify a partition. This is a - randomly generated GUID when the service was created. The partition ID is unique and does not - change for the lifetime of the service. If the same service was deleted and recreated the IDs - of its partitions would be different. - :vartype id: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: An internal ID used by Service Fabric to uniquely identify a partition. This is a - randomly generated GUID when the service was created. The partition ID is unique and does not - change for the lifetime of the service. If the same service was deleted and recreated the IDs - of its partitions would be different. - :paramtype id: str - """ - super(SingletonPartitionInformation, self).__init__(**kwargs) - self.service_partition_kind = 'Singleton' # type: str - - -class SingletonPartitionSchemeDescription(PartitionSchemeDescription): - """Describes the partition scheme of a singleton-partitioned, or non-partitioned service. - - All required parameters must be populated in order to send to Azure. - - :ivar partition_scheme: Required. Specifies how the service is partitioned.Constant filled by - server. Possible values include: "Invalid", "Singleton", "UniformInt64Range", "Named". - :vartype partition_scheme: str or ~azure.servicefabric.models.PartitionScheme - """ - - _validation = { - 'partition_scheme': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(SingletonPartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = 'Singleton' # type: str - - -class StartClusterUpgradeDescription(msrest.serialization.Model): - """Describes the parameters for starting a cluster upgrade. - - :ivar code_version: The cluster code version. - :vartype code_version: str - :ivar config_version: The cluster configuration version. - :vartype config_version: str - :ivar upgrade_kind: The kind of upgrade out of the following possible values. Possible values - include: "Invalid", "Rolling". Default value: "Rolling". - :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :vartype upgrade_replica_set_check_timeout_in_seconds: long - :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when - the code version has not changed (the upgrade only changes configuration or data). - :vartype force_restart: bool - :ivar sort_order: Defines the order in which an upgrade proceeds through the cluster. Possible - values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", - "ReverseLexicographical". Default value: "Default". - :vartype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. - :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster - or of a cluster node. - :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :ivar enable_delta_health_evaluation: When true, enables delta health evaluation rather than - absolute health evaluation after completion of each upgrade domain. - :vartype enable_delta_health_evaluation: bool - :ivar cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of the - cluster during a cluster upgrade. - :vartype cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :ivar application_health_policy_map: Defines the application health policy map used to evaluate - the health of an application or one of its children entities. - :vartype application_health_policy_map: ~azure.servicefabric.models.ApplicationHealthPolicies - :ivar instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a stateless - instance is closed, to allow the active requests to drain gracefully. This would be effective - when the instance is closing during the application/cluster - upgrade, only for those instances which have a non-zero delay duration configured in the - service description. See InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates - that the behavior will entirely depend on the delay configured in the stateless service - description. - :vartype instance_close_delay_duration_in_seconds: long - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword code_version: The cluster code version. - :paramtype code_version: str - :keyword config_version: The cluster configuration version. - :paramtype config_version: str - :keyword upgrade_kind: The kind of upgrade out of the following possible values. Possible - values include: "Invalid", "Rolling". Default value: "Rolling". - :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :paramtype upgrade_replica_set_check_timeout_in_seconds: long - :keyword force_restart: If true, then processes are forcefully restarted during upgrade even - when the code version has not changed (the upgrade only changes configuration or data). - :paramtype force_restart: bool - :keyword sort_order: Defines the order in which an upgrade proceeds through the cluster. - Possible values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", - "ReverseLexicographical". Default value: "Default". - :paramtype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored - mode. - :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the - cluster or of a cluster node. - :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :keyword enable_delta_health_evaluation: When true, enables delta health evaluation rather than - absolute health evaluation after completion of each upgrade domain. - :paramtype enable_delta_health_evaluation: bool - :keyword cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of - the cluster during a cluster upgrade. - :paramtype cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :keyword application_health_policy_map: Defines the application health policy map used to - evaluate the health of an application or one of its children entities. - :paramtype application_health_policy_map: ~azure.servicefabric.models.ApplicationHealthPolicies - :keyword instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a - stateless instance is closed, to allow the active requests to drain gracefully. This would be - effective when the instance is closing during the application/cluster - upgrade, only for those instances which have a non-zero delay duration configured in the - service description. See InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates - that the behavior will entirely depend on the delay configured in the stateless service - description. - :paramtype instance_close_delay_duration_in_seconds: long - """ - super(StartClusterUpgradeDescription, self).__init__(**kwargs) - self.code_version = kwargs.get('code_version', None) - self.config_version = kwargs.get('config_version', None) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "UnmonitoredAuto") - self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925) - self.force_restart = kwargs.get('force_restart', False) - self.sort_order = kwargs.get('sort_order', "Default") - self.monitoring_policy = kwargs.get('monitoring_policy', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) - self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) - self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', 4294967295) - - -class StartedChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos is started. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values - include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", - "Stopped". - :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind - :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :vartype time_stamp_utc: ~datetime.datetime - :ivar chaos_parameters: Defines all the parameters to configure a Chaos run. - :vartype chaos_parameters: ~azure.servicefabric.models.ChaosParameters - """ - - _validation = { - 'kind': {'required': True}, - 'time_stamp_utc': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :paramtype time_stamp_utc: ~datetime.datetime - :keyword chaos_parameters: Defines all the parameters to configure a Chaos run. - :paramtype chaos_parameters: ~azure.servicefabric.models.ChaosParameters - """ - super(StartedChaosEvent, self).__init__(**kwargs) - self.kind = 'Started' # type: str - self.chaos_parameters = kwargs.get('chaos_parameters', None) - - -class StatefulReplicaHealthReportExpiredEvent(ReplicaEvent): - """Stateful Replica Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :vartype replica_id: long - :ivar replica_instance_id: Required. Id of Replica instance. - :vartype replica_instance_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'replica_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: long - :keyword replica_instance_id: Required. Id of Replica instance. - :paramtype replica_instance_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(StatefulReplicaHealthReportExpiredEvent, self).__init__(**kwargs) - self.kind = 'StatefulReplicaHealthReportExpired' # type: str - self.replica_instance_id = kwargs['replica_instance_id'] - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class StatefulReplicaNewHealthReportEvent(ReplicaEvent): - """Stateful Replica Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :vartype replica_id: long - :ivar replica_instance_id: Required. Id of Replica instance. - :vartype replica_instance_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'replica_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: long - :keyword replica_instance_id: Required. Id of Replica instance. - :paramtype replica_instance_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(StatefulReplicaNewHealthReportEvent, self).__init__(**kwargs) - self.kind = 'StatefulReplicaNewHealthReport' # type: str - self.replica_instance_id = kwargs['replica_instance_id'] - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class StatefulServiceDescription(ServiceDescription): - """Describes a stateful service. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The service kind.Constant filled by server. Possible values - include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar service_name: Required. The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar service_type_name: Required. Name of the service type as specified in the service - manifest. - :vartype service_type_name: str - :ivar initialization_data: The initialization data as an array of bytes. Initialization data is - passed to service instances or replicas when they are created. - :vartype initialization_data: list[int] - :ivar partition_description: Required. The partition description as an object. - :vartype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription - :ivar placement_constraints: The placement constraints as a string. Placement constraints are - boolean expressions on node properties and allow for restricting a service to particular nodes - based on the service requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :vartype placement_constraints: str - :ivar correlation_scheme: The correlation scheme. - :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :ivar service_load_metrics: The service load metrics. - :vartype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: The service placement policies. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", - "Medium", "High", "VeryHigh". - :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :ivar is_default_move_cost_specified: Indicates if the DefaultMoveCost property is specified. - :vartype is_default_move_cost_specified: bool - :ivar service_package_activation_mode: The activation mode of service package to be used for a - service. Possible values include: "SharedProcess", "ExclusiveProcess". - :vartype service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :ivar service_dns_name: The DNS name of the service. It requires the DNS system service to be - enabled in Service Fabric cluster. - :vartype service_dns_name: str - :ivar scaling_policies: Scaling policies for this service. - :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :ivar tags_required_to_place: Tags for placement of this service. - :vartype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription - :ivar tags_required_to_run: Tags for running of this service. - :vartype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription - :ivar target_replica_set_size: Required. The target replica set size as a number. - :vartype target_replica_set_size: int - :ivar min_replica_set_size: Required. The minimum replica set size as a number. - :vartype min_replica_set_size: int - :ivar has_persisted_state: Required. A flag indicating whether this is a persistent service - which stores states on the local disk. If it is then the value of this property is true, if not - it is false. - :vartype has_persisted_state: bool - :ivar flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then the flags for QuorumLossWaitDuration (2) and - StandByReplicaKeepDuration(4) are set. - - - * None - Does not indicate any other properties are set. The value is zero. - * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The - value is 1. - * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is - 2. - * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The - value is 4. - * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The - value is 8. - * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value - is 16. - :vartype flags: int - :ivar replica_restart_wait_duration_seconds: The duration, in seconds, between when a replica - goes down and when a new replica is created. - :vartype replica_restart_wait_duration_seconds: long - :ivar quorum_loss_wait_duration_seconds: The maximum duration, in seconds, for which a - partition is allowed to be in a state of quorum loss. - :vartype quorum_loss_wait_duration_seconds: long - :ivar stand_by_replica_keep_duration_seconds: The definition on how long StandBy replicas - should be maintained before being removed. - :vartype stand_by_replica_keep_duration_seconds: long - :ivar service_placement_time_limit_seconds: The duration for which replicas can stay InBuild - before reporting that build is stuck. - :vartype service_placement_time_limit_seconds: long - :ivar drop_source_replica_on_move: Indicates whether to drop source Secondary replica even if - the target replica has not finished build. If desired behavior is to drop it as soon as - possible the value of this property is true, if not it is false. - :vartype drop_source_replica_on_move: bool - :ivar replica_lifecycle_description: Defines how replicas of this service will behave during - ther lifecycle. - :vartype replica_lifecycle_description: ~azure.servicefabric.models.ReplicaLifecycleDescription - :ivar auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary - replicas, the following must be true: AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :vartype auxiliary_replica_count: int - """ - - _validation = { - 'service_kind': {'required': True}, - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'target_replica_set_size': {'required': True, 'minimum': 1}, - 'min_replica_set_size': {'required': True, 'minimum': 1}, - 'has_persisted_state': {'required': True}, - 'replica_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'quorum_loss_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'stand_by_replica_keep_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'service_placement_time_limit_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'auxiliary_replica_count': {'minimum': 0}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'long'}, - 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'long'}, - 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'long'}, - 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'long'}, - 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, - 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword service_name: Required. The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword service_type_name: Required. Name of the service type as specified in the service - manifest. - :paramtype service_type_name: str - :keyword initialization_data: The initialization data as an array of bytes. Initialization data - is passed to service instances or replicas when they are created. - :paramtype initialization_data: list[int] - :keyword partition_description: Required. The partition description as an object. - :paramtype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription - :keyword placement_constraints: The placement constraints as a string. Placement constraints - are boolean expressions on node properties and allow for restricting a service to particular - nodes based on the service requirements. For example, to place a service on nodes where - NodeType is blue specify the following: "NodeColor == blue)". - :paramtype placement_constraints: str - :keyword correlation_scheme: The correlation scheme. - :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :keyword service_load_metrics: The service load metrics. - :paramtype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: The service placement policies. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", - "Low", "Medium", "High", "VeryHigh". - :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :keyword is_default_move_cost_specified: Indicates if the DefaultMoveCost property is - specified. - :paramtype is_default_move_cost_specified: bool - :keyword service_package_activation_mode: The activation mode of service package to be used for - a service. Possible values include: "SharedProcess", "ExclusiveProcess". - :paramtype service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :keyword service_dns_name: The DNS name of the service. It requires the DNS system service to - be enabled in Service Fabric cluster. - :paramtype service_dns_name: str - :keyword scaling_policies: Scaling policies for this service. - :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :keyword tags_required_to_place: Tags for placement of this service. - :paramtype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription - :keyword tags_required_to_run: Tags for running of this service. - :paramtype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription - :keyword target_replica_set_size: Required. The target replica set size as a number. - :paramtype target_replica_set_size: int - :keyword min_replica_set_size: Required. The minimum replica set size as a number. - :paramtype min_replica_set_size: int - :keyword has_persisted_state: Required. A flag indicating whether this is a persistent service - which stores states on the local disk. If it is then the value of this property is true, if not - it is false. - :paramtype has_persisted_state: bool - :keyword flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then the flags for QuorumLossWaitDuration (2) and - StandByReplicaKeepDuration(4) are set. - - - * None - Does not indicate any other properties are set. The value is zero. - * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The - value is 1. - * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is - 2. - * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The - value is 4. - * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The - value is 8. - * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value - is 16. - :paramtype flags: int - :keyword replica_restart_wait_duration_seconds: The duration, in seconds, between when a - replica goes down and when a new replica is created. - :paramtype replica_restart_wait_duration_seconds: long - :keyword quorum_loss_wait_duration_seconds: The maximum duration, in seconds, for which a - partition is allowed to be in a state of quorum loss. - :paramtype quorum_loss_wait_duration_seconds: long - :keyword stand_by_replica_keep_duration_seconds: The definition on how long StandBy replicas - should be maintained before being removed. - :paramtype stand_by_replica_keep_duration_seconds: long - :keyword service_placement_time_limit_seconds: The duration for which replicas can stay InBuild - before reporting that build is stuck. - :paramtype service_placement_time_limit_seconds: long - :keyword drop_source_replica_on_move: Indicates whether to drop source Secondary replica even - if the target replica has not finished build. If desired behavior is to drop it as soon as - possible the value of this property is true, if not it is false. - :paramtype drop_source_replica_on_move: bool - :keyword replica_lifecycle_description: Defines how replicas of this service will behave during - ther lifecycle. - :paramtype replica_lifecycle_description: - ~azure.servicefabric.models.ReplicaLifecycleDescription - :keyword auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary - replicas, the following must be true: AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :paramtype auxiliary_replica_count: int - """ - super(StatefulServiceDescription, self).__init__(**kwargs) - self.service_kind = 'Stateful' # type: str - self.target_replica_set_size = kwargs['target_replica_set_size'] - self.min_replica_set_size = kwargs['min_replica_set_size'] - self.has_persisted_state = kwargs['has_persisted_state'] - self.flags = kwargs.get('flags', None) - self.replica_restart_wait_duration_seconds = kwargs.get('replica_restart_wait_duration_seconds', None) - self.quorum_loss_wait_duration_seconds = kwargs.get('quorum_loss_wait_duration_seconds', None) - self.stand_by_replica_keep_duration_seconds = kwargs.get('stand_by_replica_keep_duration_seconds', None) - self.service_placement_time_limit_seconds = kwargs.get('service_placement_time_limit_seconds', None) - self.drop_source_replica_on_move = kwargs.get('drop_source_replica_on_move', None) - self.replica_lifecycle_description = kwargs.get('replica_lifecycle_description', None) - self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) - - -class StatefulServiceInfo(ServiceInfo): - """Information about a stateful Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The identity of the service. This ID is an encoded representation of the service - name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype id: str - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar name: The full name of the service with 'fabric:' URI scheme. - :vartype name: str - :ivar type_name: Name of the service type as specified in the service manifest. - :vartype type_name: str - :ivar manifest_version: The version of the service manifest. - :vartype manifest_version: str - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_status: The status of the application. Possible values include: "Unknown", - "Active", "Upgrading", "Deleting", "Creating", "Failed". - :vartype service_status: str or ~azure.servicefabric.models.ServiceStatus - :ivar is_service_group: Whether the service is in a service group. - :vartype is_service_group: bool - :ivar has_persisted_state: Whether the service has persisted state. - :vartype has_persisted_state: bool - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: The identity of the service. This ID is an encoded representation of the service - name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype id: str - :keyword name: The full name of the service with 'fabric:' URI scheme. - :paramtype name: str - :keyword type_name: Name of the service type as specified in the service manifest. - :paramtype type_name: str - :keyword manifest_version: The version of the service manifest. - :paramtype manifest_version: str - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword service_status: The status of the application. Possible values include: "Unknown", - "Active", "Upgrading", "Deleting", "Creating", "Failed". - :paramtype service_status: str or ~azure.servicefabric.models.ServiceStatus - :keyword is_service_group: Whether the service is in a service group. - :paramtype is_service_group: bool - :keyword has_persisted_state: Whether the service has persisted state. - :paramtype has_persisted_state: bool - """ - super(StatefulServiceInfo, self).__init__(**kwargs) - self.service_kind = 'Stateful' # type: str - self.has_persisted_state = kwargs.get('has_persisted_state', None) - - -class StatefulServicePartitionInfo(ServicePartitionInfo): - """Information about a partition of a stateful Service Fabric service.. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar partition_status: The status of the service fabric service partition. Possible values - include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". - :vartype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus - :ivar partition_information: Information about the partition identity, partitioning scheme and - keys supported by it. - :vartype partition_information: ~azure.servicefabric.models.PartitionInformation - :ivar target_replica_set_size: The target replica set size as a number. - :vartype target_replica_set_size: long - :ivar min_replica_set_size: The minimum replica set size as a number. - :vartype min_replica_set_size: long - :ivar auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary - replicas the following must be true, AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :vartype auxiliary_replica_count: long - :ivar last_quorum_loss_duration: The duration for which this partition was in quorum loss. If - the partition is currently in quorum loss, it returns the duration since it has been in that - state. This field is using ISO8601 format for specifying the duration. - :vartype last_quorum_loss_duration: ~datetime.timedelta - :ivar primary_epoch: An Epoch is a configuration number for the partition as a whole. When the - configuration of the replica set changes, for example when the Primary replica changes, the - operations that are replicated from the new Primary replica are said to be a new Epoch from the - ones which were sent by the old Primary replica. - :vartype primary_epoch: ~azure.servicefabric.models.Epoch - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'long'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'long'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'long'}, - 'last_quorum_loss_duration': {'key': 'LastQuorumLossDuration', 'type': 'duration'}, - 'primary_epoch': {'key': 'PrimaryEpoch', 'type': 'Epoch'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword partition_status: The status of the service fabric service partition. Possible values - include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". - :paramtype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus - :keyword partition_information: Information about the partition identity, partitioning scheme - and keys supported by it. - :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation - :keyword target_replica_set_size: The target replica set size as a number. - :paramtype target_replica_set_size: long - :keyword min_replica_set_size: The minimum replica set size as a number. - :paramtype min_replica_set_size: long - :keyword auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary - replicas the following must be true, AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :paramtype auxiliary_replica_count: long - :keyword last_quorum_loss_duration: The duration for which this partition was in quorum loss. - If the partition is currently in quorum loss, it returns the duration since it has been in that - state. This field is using ISO8601 format for specifying the duration. - :paramtype last_quorum_loss_duration: ~datetime.timedelta - :keyword primary_epoch: An Epoch is a configuration number for the partition as a whole. When - the configuration of the replica set changes, for example when the Primary replica changes, the - operations that are replicated from the new Primary replica are said to be a new Epoch from the - ones which were sent by the old Primary replica. - :paramtype primary_epoch: ~azure.servicefabric.models.Epoch - """ - super(StatefulServicePartitionInfo, self).__init__(**kwargs) - self.service_kind = 'Stateful' # type: str - self.target_replica_set_size = kwargs.get('target_replica_set_size', None) - self.min_replica_set_size = kwargs.get('min_replica_set_size', None) - self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) - self.last_quorum_loss_duration = kwargs.get('last_quorum_loss_duration', None) - self.primary_epoch = kwargs.get('primary_epoch', None) - - -class StatefulServiceReplicaHealth(ReplicaHealth): - """Represents the health of the stateful service replica. -Contains the replica aggregated health state, the health events and the unhealthy evaluations. - - All required parameters must be populated in order to send to Azure. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar partition_id: Id of the partition to which this replica belongs. - :vartype partition_id: str - :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :vartype replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword partition_id: Id of the partition to which this replica belongs. - :paramtype partition_id: str - :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: str - """ - super(StatefulServiceReplicaHealth, self).__init__(**kwargs) - self.service_kind = 'Stateful' # type: str - self.replica_id = kwargs.get('replica_id', None) - - -class StatefulServiceReplicaHealthState(ReplicaHealthState): - """Represents the health state of the stateful service replica, which contains the replica ID and the aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar partition_id: The ID of the partition to which this replica belongs. - :vartype partition_id: str - :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :vartype replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword partition_id: The ID of the partition to which this replica belongs. - :paramtype partition_id: str - :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: str - """ - super(StatefulServiceReplicaHealthState, self).__init__(**kwargs) - self.service_kind = 'Stateful' # type: str - self.replica_id = kwargs.get('replica_id', None) - - -class StatefulServiceReplicaInfo(ReplicaInfo): - """Represents a stateful service replica. This includes information about the identity, role, status, health, node name, uptime, and other details about the replica. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", - "InBuild", "Standby", "Ready", "Down", "Dropped". - :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar node_name: The name of a Service Fabric node. - :vartype node_name: str - :ivar address: The address the replica is listening on. - :vartype address: str - :ivar last_in_build_duration_in_seconds: The last in build duration of the replica in seconds. - :vartype last_in_build_duration_in_seconds: str - :ivar replica_role: The role of a replica of a stateful service. Possible values include: - "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", - "ActiveAuxiliary", "PrimaryAuxiliary". - :vartype replica_role: str or ~azure.servicefabric.models.ReplicaRole - :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :vartype replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword replica_status: The status of a replica of a service. Possible values include: - "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". - :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword node_name: The name of a Service Fabric node. - :paramtype node_name: str - :keyword address: The address the replica is listening on. - :paramtype address: str - :keyword last_in_build_duration_in_seconds: The last in build duration of the replica in - seconds. - :paramtype last_in_build_duration_in_seconds: str - :keyword replica_role: The role of a replica of a stateful service. Possible values include: - "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", - "ActiveAuxiliary", "PrimaryAuxiliary". - :paramtype replica_role: str or ~azure.servicefabric.models.ReplicaRole - :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: str - """ - super(StatefulServiceReplicaInfo, self).__init__(**kwargs) - self.service_kind = 'Stateful' # type: str - self.replica_role = kwargs.get('replica_role', None) - self.replica_id = kwargs.get('replica_id', None) - - -class StatefulServiceTypeDescription(ServiceTypeDescription): - """Describes a stateful service type defined in the service manifest of a provisioned application type. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of service (Stateless or Stateful).Constant filled by server. - Possible values include: "Invalid", "Stateless", "Stateful". - :vartype kind: str or ~azure.servicefabric.models.ServiceKind - :ivar is_stateful: Indicates whether the service type is a stateful service type or a stateless - service type. This property is true if the service type is a stateful service type, false - otherwise. - :vartype is_stateful: bool - :ivar service_type_name: Name of the service type as specified in the service manifest. - :vartype service_type_name: str - :ivar placement_constraints: The placement constraint to be used when instantiating this - service in a Service Fabric cluster. - :vartype placement_constraints: str - :ivar load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: List of service placement policy descriptions. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar extensions: List of service type extensions. - :vartype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :ivar has_persisted_state: A flag indicating whether this is a persistent service which stores - states on the local disk. If it is then the value of this property is true, if not it is false. - :vartype has_persisted_state: bool - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword is_stateful: Indicates whether the service type is a stateful service type or a - stateless service type. This property is true if the service type is a stateful service type, - false otherwise. - :paramtype is_stateful: bool - :keyword service_type_name: Name of the service type as specified in the service manifest. - :paramtype service_type_name: str - :keyword placement_constraints: The placement constraint to be used when instantiating this - service in a Service Fabric cluster. - :paramtype placement_constraints: str - :keyword load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: List of service placement policy descriptions. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword extensions: List of service type extensions. - :paramtype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :keyword has_persisted_state: A flag indicating whether this is a persistent service which - stores states on the local disk. If it is then the value of this property is true, if not it is - false. - :paramtype has_persisted_state: bool - """ - super(StatefulServiceTypeDescription, self).__init__(**kwargs) - self.kind = 'Stateful' # type: str - self.has_persisted_state = kwargs.get('has_persisted_state', None) - - -class StatefulServiceUpdateDescription(ServiceUpdateDescription): - """Describes an update for a stateful service. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The service kind.Constant filled by server. Possible values - include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and - QuorumLossWaitDuration (4) are set. - - - * None - Does not indicate any other properties are set. The value is zero. - * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property - (for Stateful services) or the InstanceCount property (for Stateless services) is set. The - value is 1. - * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The - value is 2. - * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is - 4. - * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The - value is 8. - * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. - * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. - * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is - 64. - * Correlation - Indicates the CorrelationScheme property is set. The value is 128. - * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. - * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. - * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. - * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The - value is 2048. - * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. - * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is - 8192. - * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 16384. - * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 32768. - * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value - is 65536. - * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. - * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. - * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. - :vartype flags: str - :ivar placement_constraints: The placement constraints as a string. Placement constraints are - boolean expressions on node properties and allow for restricting a service to particular nodes - based on the service requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :vartype placement_constraints: str - :ivar correlation_scheme: The correlation scheme. - :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :ivar load_metrics: The service load metrics. - :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: The service placement policies. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", - "Medium", "High", "VeryHigh". - :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :ivar scaling_policies: Scaling policies for this service. - :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :ivar service_dns_name: The DNS name of the service. - :vartype service_dns_name: str - :ivar tags_for_placement: Tags for placement of this service. - :vartype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :ivar tags_for_running: Tags for running of this service. - :vartype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :ivar target_replica_set_size: The target replica set size as a number. - :vartype target_replica_set_size: int - :ivar min_replica_set_size: The minimum replica set size as a number. - :vartype min_replica_set_size: int - :ivar replica_restart_wait_duration_seconds: The duration, in seconds, between when a replica - goes down and when a new replica is created. - :vartype replica_restart_wait_duration_seconds: str - :ivar quorum_loss_wait_duration_seconds: The maximum duration, in seconds, for which a - partition is allowed to be in a state of quorum loss. - :vartype quorum_loss_wait_duration_seconds: str - :ivar stand_by_replica_keep_duration_seconds: The definition on how long StandBy replicas - should be maintained before being removed. - :vartype stand_by_replica_keep_duration_seconds: str - :ivar service_placement_time_limit_seconds: The duration for which replicas can stay InBuild - before reporting that build is stuck. - :vartype service_placement_time_limit_seconds: str - :ivar drop_source_replica_on_move: Indicates whether to drop source Secondary replica even if - the target replica has not finished build. If desired behavior is to drop it as soon as - possible the value of this property is true, if not it is false. - :vartype drop_source_replica_on_move: bool - :ivar replica_lifecycle_description: Defines how replicas of this service will behave during - ther lifecycle. - :vartype replica_lifecycle_description: ~azure.servicefabric.models.ReplicaLifecycleDescription - :ivar auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary - replicas, the following must be true: AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :vartype auxiliary_replica_count: int - """ - - _validation = { - 'service_kind': {'required': True}, - 'target_replica_set_size': {'minimum': 1}, - 'min_replica_set_size': {'minimum': 1}, - 'auxiliary_replica_count': {'minimum': 0}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'str'}, - 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'str'}, - 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'str'}, - 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'str'}, - 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, - 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and - QuorumLossWaitDuration (4) are set. - - - * None - Does not indicate any other properties are set. The value is zero. - * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property - (for Stateful services) or the InstanceCount property (for Stateless services) is set. The - value is 1. - * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The - value is 2. - * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is - 4. - * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The - value is 8. - * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. - * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. - * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is - 64. - * Correlation - Indicates the CorrelationScheme property is set. The value is 128. - * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. - * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. - * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. - * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The - value is 2048. - * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. - * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is - 8192. - * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 16384. - * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 32768. - * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value - is 65536. - * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. - * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. - * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. - :paramtype flags: str - :keyword placement_constraints: The placement constraints as a string. Placement constraints - are boolean expressions on node properties and allow for restricting a service to particular - nodes based on the service requirements. For example, to place a service on nodes where - NodeType is blue specify the following: "NodeColor == blue)". - :paramtype placement_constraints: str - :keyword correlation_scheme: The correlation scheme. - :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :keyword load_metrics: The service load metrics. - :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: The service placement policies. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", - "Low", "Medium", "High", "VeryHigh". - :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :keyword scaling_policies: Scaling policies for this service. - :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :keyword service_dns_name: The DNS name of the service. - :paramtype service_dns_name: str - :keyword tags_for_placement: Tags for placement of this service. - :paramtype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :keyword tags_for_running: Tags for running of this service. - :paramtype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :keyword target_replica_set_size: The target replica set size as a number. - :paramtype target_replica_set_size: int - :keyword min_replica_set_size: The minimum replica set size as a number. - :paramtype min_replica_set_size: int - :keyword replica_restart_wait_duration_seconds: The duration, in seconds, between when a - replica goes down and when a new replica is created. - :paramtype replica_restart_wait_duration_seconds: str - :keyword quorum_loss_wait_duration_seconds: The maximum duration, in seconds, for which a - partition is allowed to be in a state of quorum loss. - :paramtype quorum_loss_wait_duration_seconds: str - :keyword stand_by_replica_keep_duration_seconds: The definition on how long StandBy replicas - should be maintained before being removed. - :paramtype stand_by_replica_keep_duration_seconds: str - :keyword service_placement_time_limit_seconds: The duration for which replicas can stay InBuild - before reporting that build is stuck. - :paramtype service_placement_time_limit_seconds: str - :keyword drop_source_replica_on_move: Indicates whether to drop source Secondary replica even - if the target replica has not finished build. If desired behavior is to drop it as soon as - possible the value of this property is true, if not it is false. - :paramtype drop_source_replica_on_move: bool - :keyword replica_lifecycle_description: Defines how replicas of this service will behave during - ther lifecycle. - :paramtype replica_lifecycle_description: - ~azure.servicefabric.models.ReplicaLifecycleDescription - :keyword auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary - replicas, the following must be true: AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :paramtype auxiliary_replica_count: int - """ - super(StatefulServiceUpdateDescription, self).__init__(**kwargs) - self.service_kind = 'Stateful' # type: str - self.target_replica_set_size = kwargs.get('target_replica_set_size', None) - self.min_replica_set_size = kwargs.get('min_replica_set_size', None) - self.replica_restart_wait_duration_seconds = kwargs.get('replica_restart_wait_duration_seconds', None) - self.quorum_loss_wait_duration_seconds = kwargs.get('quorum_loss_wait_duration_seconds', None) - self.stand_by_replica_keep_duration_seconds = kwargs.get('stand_by_replica_keep_duration_seconds', None) - self.service_placement_time_limit_seconds = kwargs.get('service_placement_time_limit_seconds', None) - self.drop_source_replica_on_move = kwargs.get('drop_source_replica_on_move', None) - self.replica_lifecycle_description = kwargs.get('replica_lifecycle_description', None) - self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) - - -class StatelessReplicaHealthReportExpiredEvent(ReplicaEvent): - """Stateless Replica Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :vartype replica_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(StatelessReplicaHealthReportExpiredEvent, self).__init__(**kwargs) - self.kind = 'StatelessReplicaHealthReportExpired' # type: str - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class StatelessReplicaNewHealthReportEvent(ReplicaEvent): - """Stateless Replica Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :vartype replica_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(StatelessReplicaNewHealthReportEvent, self).__init__(**kwargs) - self.kind = 'StatelessReplicaNewHealthReport' # type: str - self.source_id = kwargs['source_id'] - self.property = kwargs['property'] - self.health_state = kwargs['health_state'] - self.time_to_live_ms = kwargs['time_to_live_ms'] - self.sequence_number = kwargs['sequence_number'] - self.description = kwargs['description'] - self.remove_when_expired = kwargs['remove_when_expired'] - self.source_utc_timestamp = kwargs['source_utc_timestamp'] - - -class StatelessServiceDescription(ServiceDescription): - """Describes a stateless service. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The service kind.Constant filled by server. Possible values - include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar service_name: Required. The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar service_type_name: Required. Name of the service type as specified in the service - manifest. - :vartype service_type_name: str - :ivar initialization_data: The initialization data as an array of bytes. Initialization data is - passed to service instances or replicas when they are created. - :vartype initialization_data: list[int] - :ivar partition_description: Required. The partition description as an object. - :vartype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription - :ivar placement_constraints: The placement constraints as a string. Placement constraints are - boolean expressions on node properties and allow for restricting a service to particular nodes - based on the service requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :vartype placement_constraints: str - :ivar correlation_scheme: The correlation scheme. - :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :ivar service_load_metrics: The service load metrics. - :vartype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: The service placement policies. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", - "Medium", "High", "VeryHigh". - :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :ivar is_default_move_cost_specified: Indicates if the DefaultMoveCost property is specified. - :vartype is_default_move_cost_specified: bool - :ivar service_package_activation_mode: The activation mode of service package to be used for a - service. Possible values include: "SharedProcess", "ExclusiveProcess". - :vartype service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :ivar service_dns_name: The DNS name of the service. It requires the DNS system service to be - enabled in Service Fabric cluster. - :vartype service_dns_name: str - :ivar scaling_policies: Scaling policies for this service. - :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :ivar tags_required_to_place: Tags for placement of this service. - :vartype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription - :ivar tags_required_to_run: Tags for running of this service. - :vartype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription - :ivar instance_count: Required. The instance count. - :vartype instance_count: int - :ivar min_instance_count: MinInstanceCount is the minimum number of instances that must be up - to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted - into the number of nodes on which the instances are allowed to be placed according to the - placement constraints on the service. - :vartype min_instance_count: int - :ivar min_instance_percentage: MinInstancePercentage is the minimum percentage of InstanceCount - that must be up to meet the EnsureAvailability safety check during operations like upgrade or - deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first - converted into the number of nodes on which the instances are allowed to be placed according to - the placement constraints on the service. - :vartype min_instance_percentage: int - :ivar flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 1 then the flags for InstanceCloseDelayDuration is set. - - - * None - Does not indicate any other properties are set. The value is zero. - * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 1. - * InstanceRestartWaitDuration - Indicates the InstanceRestartWaitDurationSeconds property is - set. The value is 2. - :vartype flags: int - :ivar instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless - instance is closed, to allow the active requests to drain gracefully. This would be effective - when the instance is closing during the application/cluster upgrade and disabling node. - The endpoint exposed on this instance is removed prior to starting the delay, which prevents - new connections to this instance. - In addition, clients that have subscribed to service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do - the following upon receiving the endpoint removal notification: - - .. code-block:: - - - Stop sending new requests to this instance. - - Close existing connections after in-flight requests have completed. - - Connect to a different instance of the service partition for future requests. - - Note, the default value of InstanceCloseDelayDuration is 0, which indicates that there won't - be any delay or removal of the endpoint prior to closing the instance. - :vartype instance_close_delay_duration_seconds: long - :ivar instance_lifecycle_description: Defines how instances of this service will behave during - their lifecycle. - :vartype instance_lifecycle_description: - ~azure.servicefabric.models.InstanceLifecycleDescription - :ivar instance_restart_wait_duration_seconds: When a stateless instance goes down, this timer - starts. When it expires Service Fabric will create a new instance on any node in the cluster. - This configuration is to reduce unnecessary creation of a new instance in situations where the - instance going down is likely to recover in a short time. For example, during an upgrade. - The default value is 0, which indicates that when stateless instance goes down, Service Fabric - will immediately start building its replacement. - :vartype instance_restart_wait_duration_seconds: long - """ - - _validation = { - 'service_kind': {'required': True}, - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'instance_count': {'required': True, 'minimum': -1}, - 'min_instance_count': {'minimum': 1}, - 'min_instance_percentage': {'maximum': 100, 'minimum': 0}, - 'instance_close_delay_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'instance_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'long'}, - 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, - 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword service_name: Required. The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword service_type_name: Required. Name of the service type as specified in the service - manifest. - :paramtype service_type_name: str - :keyword initialization_data: The initialization data as an array of bytes. Initialization data - is passed to service instances or replicas when they are created. - :paramtype initialization_data: list[int] - :keyword partition_description: Required. The partition description as an object. - :paramtype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription - :keyword placement_constraints: The placement constraints as a string. Placement constraints - are boolean expressions on node properties and allow for restricting a service to particular - nodes based on the service requirements. For example, to place a service on nodes where - NodeType is blue specify the following: "NodeColor == blue)". - :paramtype placement_constraints: str - :keyword correlation_scheme: The correlation scheme. - :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :keyword service_load_metrics: The service load metrics. - :paramtype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: The service placement policies. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", - "Low", "Medium", "High", "VeryHigh". - :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :keyword is_default_move_cost_specified: Indicates if the DefaultMoveCost property is - specified. - :paramtype is_default_move_cost_specified: bool - :keyword service_package_activation_mode: The activation mode of service package to be used for - a service. Possible values include: "SharedProcess", "ExclusiveProcess". - :paramtype service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :keyword service_dns_name: The DNS name of the service. It requires the DNS system service to - be enabled in Service Fabric cluster. - :paramtype service_dns_name: str - :keyword scaling_policies: Scaling policies for this service. - :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :keyword tags_required_to_place: Tags for placement of this service. - :paramtype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription - :keyword tags_required_to_run: Tags for running of this service. - :paramtype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription - :keyword instance_count: Required. The instance count. - :paramtype instance_count: int - :keyword min_instance_count: MinInstanceCount is the minimum number of instances that must be - up to meet the EnsureAvailability safety check during operations like upgrade or deactivate - node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted - into the number of nodes on which the instances are allowed to be placed according to the - placement constraints on the service. - :paramtype min_instance_count: int - :keyword min_instance_percentage: MinInstancePercentage is the minimum percentage of - InstanceCount that must be up to meet the EnsureAvailability safety check during operations - like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first - converted into the number of nodes on which the instances are allowed to be placed according to - the placement constraints on the service. - :paramtype min_instance_percentage: int - :keyword flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 1 then the flags for InstanceCloseDelayDuration is set. - - - * None - Does not indicate any other properties are set. The value is zero. - * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 1. - * InstanceRestartWaitDuration - Indicates the InstanceRestartWaitDurationSeconds property is - set. The value is 2. - :paramtype flags: int - :keyword instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless - instance is closed, to allow the active requests to drain gracefully. This would be effective - when the instance is closing during the application/cluster upgrade and disabling node. - The endpoint exposed on this instance is removed prior to starting the delay, which prevents - new connections to this instance. - In addition, clients that have subscribed to service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do - the following upon receiving the endpoint removal notification: - - .. code-block:: - - - Stop sending new requests to this instance. - - Close existing connections after in-flight requests have completed. - - Connect to a different instance of the service partition for future requests. - - Note, the default value of InstanceCloseDelayDuration is 0, which indicates that there won't - be any delay or removal of the endpoint prior to closing the instance. - :paramtype instance_close_delay_duration_seconds: long - :keyword instance_lifecycle_description: Defines how instances of this service will behave - during their lifecycle. - :paramtype instance_lifecycle_description: - ~azure.servicefabric.models.InstanceLifecycleDescription - :keyword instance_restart_wait_duration_seconds: When a stateless instance goes down, this - timer starts. When it expires Service Fabric will create a new instance on any node in the - cluster. - This configuration is to reduce unnecessary creation of a new instance in situations where the - instance going down is likely to recover in a short time. For example, during an upgrade. - The default value is 0, which indicates that when stateless instance goes down, Service Fabric - will immediately start building its replacement. - :paramtype instance_restart_wait_duration_seconds: long - """ - super(StatelessServiceDescription, self).__init__(**kwargs) - self.service_kind = 'Stateless' # type: str - self.instance_count = kwargs['instance_count'] - self.min_instance_count = kwargs.get('min_instance_count', 1) - self.min_instance_percentage = kwargs.get('min_instance_percentage', 0) - self.flags = kwargs.get('flags', None) - self.instance_close_delay_duration_seconds = kwargs.get('instance_close_delay_duration_seconds', None) - self.instance_lifecycle_description = kwargs.get('instance_lifecycle_description', None) - self.instance_restart_wait_duration_seconds = kwargs.get('instance_restart_wait_duration_seconds', None) - - -class StatelessServiceInfo(ServiceInfo): - """Information about a stateless Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The identity of the service. This ID is an encoded representation of the service - name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype id: str - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar name: The full name of the service with 'fabric:' URI scheme. - :vartype name: str - :ivar type_name: Name of the service type as specified in the service manifest. - :vartype type_name: str - :ivar manifest_version: The version of the service manifest. - :vartype manifest_version: str - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_status: The status of the application. Possible values include: "Unknown", - "Active", "Upgrading", "Deleting", "Creating", "Failed". - :vartype service_status: str or ~azure.servicefabric.models.ServiceStatus - :ivar is_service_group: Whether the service is in a service group. - :vartype is_service_group: bool - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword id: The identity of the service. This ID is an encoded representation of the service - name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype id: str - :keyword name: The full name of the service with 'fabric:' URI scheme. - :paramtype name: str - :keyword type_name: Name of the service type as specified in the service manifest. - :paramtype type_name: str - :keyword manifest_version: The version of the service manifest. - :paramtype manifest_version: str - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword service_status: The status of the application. Possible values include: "Unknown", - "Active", "Upgrading", "Deleting", "Creating", "Failed". - :paramtype service_status: str or ~azure.servicefabric.models.ServiceStatus - :keyword is_service_group: Whether the service is in a service group. - :paramtype is_service_group: bool - """ - super(StatelessServiceInfo, self).__init__(**kwargs) - self.service_kind = 'Stateless' # type: str - - -class StatelessServiceInstanceHealth(ReplicaHealth): - """Represents the health of the stateless service instance. -Contains the instance aggregated health state, the health events and the unhealthy evaluations. - - All required parameters must be populated in order to send to Azure. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar partition_id: Id of the partition to which this replica belongs. - :vartype partition_id: str - :ivar instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric to - uniquely identify an instance of a partition of a stateless service. It is unique within a - partition and does not change for the lifetime of the instance. If the instance has failed over - on the same or different node, it will get a different value for the InstanceId. - :vartype instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword partition_id: Id of the partition to which this replica belongs. - :paramtype partition_id: str - :keyword instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric - to uniquely identify an instance of a partition of a stateless service. It is unique within a - partition and does not change for the lifetime of the instance. If the instance has failed over - on the same or different node, it will get a different value for the InstanceId. - :paramtype instance_id: str - """ - super(StatelessServiceInstanceHealth, self).__init__(**kwargs) - self.service_kind = 'Stateless' # type: str - self.instance_id = kwargs.get('instance_id', None) - - -class StatelessServiceInstanceHealthState(ReplicaHealthState): - """Represents the health state of the stateless service instance, which contains the instance ID and the aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar partition_id: The ID of the partition to which this replica belongs. - :vartype partition_id: str - :ivar replica_id: Id of the stateless service instance on the wire this field is called - ReplicaId. - :vartype replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword partition_id: The ID of the partition to which this replica belongs. - :paramtype partition_id: str - :keyword replica_id: Id of the stateless service instance on the wire this field is called - ReplicaId. - :paramtype replica_id: str - """ - super(StatelessServiceInstanceHealthState, self).__init__(**kwargs) - self.service_kind = 'Stateless' # type: str - self.replica_id = kwargs.get('replica_id', None) - - -class StatelessServiceInstanceInfo(ReplicaInfo): - """Represents a stateless service instance. This includes information about the identity, status, health, node name, uptime, and other details about the instance. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", - "InBuild", "Standby", "Ready", "Down", "Dropped". - :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar node_name: The name of a Service Fabric node. - :vartype node_name: str - :ivar address: The address the replica is listening on. - :vartype address: str - :ivar last_in_build_duration_in_seconds: The last in build duration of the replica in seconds. - :vartype last_in_build_duration_in_seconds: str - :ivar instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric to - uniquely identify an instance of a partition of a stateless service. It is unique within a - partition and does not change for the lifetime of the instance. If the instance has failed over - on the same or different node, it will get a different value for the InstanceId. - :vartype instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword replica_status: The status of a replica of a service. Possible values include: - "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". - :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword node_name: The name of a Service Fabric node. - :paramtype node_name: str - :keyword address: The address the replica is listening on. - :paramtype address: str - :keyword last_in_build_duration_in_seconds: The last in build duration of the replica in - seconds. - :paramtype last_in_build_duration_in_seconds: str - :keyword instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric - to uniquely identify an instance of a partition of a stateless service. It is unique within a - partition and does not change for the lifetime of the instance. If the instance has failed over - on the same or different node, it will get a different value for the InstanceId. - :paramtype instance_id: str - """ - super(StatelessServiceInstanceInfo, self).__init__(**kwargs) - self.service_kind = 'Stateless' # type: str - self.instance_id = kwargs.get('instance_id', None) - - -class StatelessServicePartitionInfo(ServicePartitionInfo): - """Information about a partition of a stateless Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar partition_status: The status of the service fabric service partition. Possible values - include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". - :vartype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus - :ivar partition_information: Information about the partition identity, partitioning scheme and - keys supported by it. - :vartype partition_information: ~azure.servicefabric.models.PartitionInformation - :ivar instance_count: Number of instances of this partition. - :vartype instance_count: long - :ivar min_instance_count: MinInstanceCount is the minimum number of instances that must be up - to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted - into the number of nodes on which the instances are allowed to be placed according to the - placement constraints on the service. - :vartype min_instance_count: int - :ivar min_instance_percentage: MinInstancePercentage is the minimum percentage of InstanceCount - that must be up to meet the EnsureAvailability safety check during operations like upgrade or - deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first - converted into the number of nodes on which the instances are allowed to be placed according to - the placement constraints on the service. - :vartype min_instance_percentage: int - """ - - _validation = { - 'service_kind': {'required': True}, - 'min_instance_count': {'minimum': 1}, - 'min_instance_percentage': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'long'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword partition_status: The status of the service fabric service partition. Possible values - include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". - :paramtype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus - :keyword partition_information: Information about the partition identity, partitioning scheme - and keys supported by it. - :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation - :keyword instance_count: Number of instances of this partition. - :paramtype instance_count: long - :keyword min_instance_count: MinInstanceCount is the minimum number of instances that must be - up to meet the EnsureAvailability safety check during operations like upgrade or deactivate - node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted - into the number of nodes on which the instances are allowed to be placed according to the - placement constraints on the service. - :paramtype min_instance_count: int - :keyword min_instance_percentage: MinInstancePercentage is the minimum percentage of - InstanceCount that must be up to meet the EnsureAvailability safety check during operations - like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first - converted into the number of nodes on which the instances are allowed to be placed according to - the placement constraints on the service. - :paramtype min_instance_percentage: int - """ - super(StatelessServicePartitionInfo, self).__init__(**kwargs) - self.service_kind = 'Stateless' # type: str - self.instance_count = kwargs.get('instance_count', None) - self.min_instance_count = kwargs.get('min_instance_count', 1) - self.min_instance_percentage = kwargs.get('min_instance_percentage', 0) - - -class StatelessServiceTypeDescription(ServiceTypeDescription): - """Describes a stateless service type defined in the service manifest of a provisioned application type. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of service (Stateless or Stateful).Constant filled by server. - Possible values include: "Invalid", "Stateless", "Stateful". - :vartype kind: str or ~azure.servicefabric.models.ServiceKind - :ivar is_stateful: Indicates whether the service type is a stateful service type or a stateless - service type. This property is true if the service type is a stateful service type, false - otherwise. - :vartype is_stateful: bool - :ivar service_type_name: Name of the service type as specified in the service manifest. - :vartype service_type_name: str - :ivar placement_constraints: The placement constraint to be used when instantiating this - service in a Service Fabric cluster. - :vartype placement_constraints: str - :ivar load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: List of service placement policy descriptions. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar extensions: List of service type extensions. - :vartype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :ivar use_implicit_host: A flag indicating if this type is not implemented and hosted by a user - service process, but is implicitly hosted by a system created process. This value is true for - services using the guest executable services, false otherwise. - :vartype use_implicit_host: bool - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'use_implicit_host': {'key': 'UseImplicitHost', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword is_stateful: Indicates whether the service type is a stateful service type or a - stateless service type. This property is true if the service type is a stateful service type, - false otherwise. - :paramtype is_stateful: bool - :keyword service_type_name: Name of the service type as specified in the service manifest. - :paramtype service_type_name: str - :keyword placement_constraints: The placement constraint to be used when instantiating this - service in a Service Fabric cluster. - :paramtype placement_constraints: str - :keyword load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: List of service placement policy descriptions. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword extensions: List of service type extensions. - :paramtype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :keyword use_implicit_host: A flag indicating if this type is not implemented and hosted by a - user service process, but is implicitly hosted by a system created process. This value is true - for services using the guest executable services, false otherwise. - :paramtype use_implicit_host: bool - """ - super(StatelessServiceTypeDescription, self).__init__(**kwargs) - self.kind = 'Stateless' # type: str - self.use_implicit_host = kwargs.get('use_implicit_host', None) - - -class StatelessServiceUpdateDescription(ServiceUpdateDescription): - """Describes an update for a stateless service. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The service kind.Constant filled by server. Possible values - include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and - QuorumLossWaitDuration (4) are set. - - - * None - Does not indicate any other properties are set. The value is zero. - * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property - (for Stateful services) or the InstanceCount property (for Stateless services) is set. The - value is 1. - * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The - value is 2. - * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is - 4. - * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The - value is 8. - * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. - * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. - * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is - 64. - * Correlation - Indicates the CorrelationScheme property is set. The value is 128. - * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. - * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. - * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. - * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The - value is 2048. - * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. - * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is - 8192. - * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 16384. - * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 32768. - * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value - is 65536. - * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. - * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. - * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. - :vartype flags: str - :ivar placement_constraints: The placement constraints as a string. Placement constraints are - boolean expressions on node properties and allow for restricting a service to particular nodes - based on the service requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :vartype placement_constraints: str - :ivar correlation_scheme: The correlation scheme. - :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :ivar load_metrics: The service load metrics. - :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: The service placement policies. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", - "Medium", "High", "VeryHigh". - :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :ivar scaling_policies: Scaling policies for this service. - :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :ivar service_dns_name: The DNS name of the service. - :vartype service_dns_name: str - :ivar tags_for_placement: Tags for placement of this service. - :vartype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :ivar tags_for_running: Tags for running of this service. - :vartype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :ivar instance_count: The instance count. - :vartype instance_count: int - :ivar min_instance_count: MinInstanceCount is the minimum number of instances that must be up - to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted - into the number of nodes on which the instances are allowed to be placed according to the - placement constraints on the service. - :vartype min_instance_count: int - :ivar min_instance_percentage: MinInstancePercentage is the minimum percentage of InstanceCount - that must be up to meet the EnsureAvailability safety check during operations like upgrade or - deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first - converted into the number of nodes on which the instances are allowed to be placed according to - the placement constraints on the service. - :vartype min_instance_percentage: int - :ivar instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless - instance is closed, to allow the active requests to drain gracefully. This would be effective - when the instance is closing during the application/cluster upgrade and disabling node. - The endpoint exposed on this instance is removed prior to starting the delay, which prevents - new connections to this instance. - In addition, clients that have subscribed to service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do - the following upon receiving the endpoint removal notification: - - .. code-block:: - - - Stop sending new requests to this instance. - - Close existing connections after in-flight requests have completed. - - Connect to a different instance of the service partition for future requests. - :vartype instance_close_delay_duration_seconds: str - :ivar instance_lifecycle_description: Defines how instances of this service will behave during - their lifecycle. - :vartype instance_lifecycle_description: - ~azure.servicefabric.models.InstanceLifecycleDescription - :ivar instance_restart_wait_duration_seconds: When a stateless instance goes down, this timer - starts. When it expires Service Fabric will create a new instance on any node in the cluster. - This configuration is to reduce unnecessary creation of a new instance in situations where the - instance going down is likely to recover in a short time. For example, during an upgrade. - The default value is 0, which indicates that when stateless instance goes down, Service Fabric - will immediately start building its replacement. - :vartype instance_restart_wait_duration_seconds: str - """ - - _validation = { - 'service_kind': {'required': True}, - 'instance_count': {'minimum': -1}, - 'min_instance_count': {'minimum': 1}, - 'min_instance_percentage': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'str'}, - 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, - 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and - QuorumLossWaitDuration (4) are set. - - - * None - Does not indicate any other properties are set. The value is zero. - * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property - (for Stateful services) or the InstanceCount property (for Stateless services) is set. The - value is 1. - * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The - value is 2. - * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is - 4. - * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The - value is 8. - * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. - * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. - * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is - 64. - * Correlation - Indicates the CorrelationScheme property is set. The value is 128. - * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. - * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. - * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. - * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The - value is 2048. - * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. - * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is - 8192. - * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 16384. - * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 32768. - * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value - is 65536. - * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. - * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. - * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. - :paramtype flags: str - :keyword placement_constraints: The placement constraints as a string. Placement constraints - are boolean expressions on node properties and allow for restricting a service to particular - nodes based on the service requirements. For example, to place a service on nodes where - NodeType is blue specify the following: "NodeColor == blue)". - :paramtype placement_constraints: str - :keyword correlation_scheme: The correlation scheme. - :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :keyword load_metrics: The service load metrics. - :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: The service placement policies. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", - "Low", "Medium", "High", "VeryHigh". - :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :keyword scaling_policies: Scaling policies for this service. - :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :keyword service_dns_name: The DNS name of the service. - :paramtype service_dns_name: str - :keyword tags_for_placement: Tags for placement of this service. - :paramtype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :keyword tags_for_running: Tags for running of this service. - :paramtype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :keyword instance_count: The instance count. - :paramtype instance_count: int - :keyword min_instance_count: MinInstanceCount is the minimum number of instances that must be - up to meet the EnsureAvailability safety check during operations like upgrade or deactivate - node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted - into the number of nodes on which the instances are allowed to be placed according to the - placement constraints on the service. - :paramtype min_instance_count: int - :keyword min_instance_percentage: MinInstancePercentage is the minimum percentage of - InstanceCount that must be up to meet the EnsureAvailability safety check during operations - like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first - converted into the number of nodes on which the instances are allowed to be placed according to - the placement constraints on the service. - :paramtype min_instance_percentage: int - :keyword instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless - instance is closed, to allow the active requests to drain gracefully. This would be effective - when the instance is closing during the application/cluster upgrade and disabling node. - The endpoint exposed on this instance is removed prior to starting the delay, which prevents - new connections to this instance. - In addition, clients that have subscribed to service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do - the following upon receiving the endpoint removal notification: - - .. code-block:: - - - Stop sending new requests to this instance. - - Close existing connections after in-flight requests have completed. - - Connect to a different instance of the service partition for future requests. - :paramtype instance_close_delay_duration_seconds: str - :keyword instance_lifecycle_description: Defines how instances of this service will behave - during their lifecycle. - :paramtype instance_lifecycle_description: - ~azure.servicefabric.models.InstanceLifecycleDescription - :keyword instance_restart_wait_duration_seconds: When a stateless instance goes down, this - timer starts. When it expires Service Fabric will create a new instance on any node in the - cluster. - This configuration is to reduce unnecessary creation of a new instance in situations where the - instance going down is likely to recover in a short time. For example, during an upgrade. - The default value is 0, which indicates that when stateless instance goes down, Service Fabric - will immediately start building its replacement. - :paramtype instance_restart_wait_duration_seconds: str - """ - super(StatelessServiceUpdateDescription, self).__init__(**kwargs) - self.service_kind = 'Stateless' # type: str - self.instance_count = kwargs.get('instance_count', None) - self.min_instance_count = kwargs.get('min_instance_count', 1) - self.min_instance_percentage = kwargs.get('min_instance_percentage', 0) - self.instance_close_delay_duration_seconds = kwargs.get('instance_close_delay_duration_seconds', None) - self.instance_lifecycle_description = kwargs.get('instance_lifecycle_description', None) - self.instance_restart_wait_duration_seconds = kwargs.get('instance_restart_wait_duration_seconds', None) - - -class StoppedChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos stops because either the user issued a stop or the time to run was up. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values - include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", - "Stopped". - :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind - :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :vartype time_stamp_utc: ~datetime.datetime - :ivar reason: Describes why Chaos stopped. Chaos can stop because of StopChaos API call or the - timeToRun provided in ChaosParameters is over. - :vartype reason: str - """ - - _validation = { - 'kind': {'required': True}, - 'time_stamp_utc': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :paramtype time_stamp_utc: ~datetime.datetime - :keyword reason: Describes why Chaos stopped. Chaos can stop because of StopChaos API call or - the timeToRun provided in ChaosParameters is over. - :paramtype reason: str - """ - super(StoppedChaosEvent, self).__init__(**kwargs) - self.kind = 'Stopped' # type: str - self.reason = kwargs.get('reason', None) - - -class StringPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type String. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property, determined by the type of data. Following are the - possible values.Constant filled by server. Possible values include: "Invalid", "Binary", - "Int64", "Double", "String", "Guid". - :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind - :ivar data: Required. The data of the property value. - :vartype data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword data: Required. The data of the property value. - :paramtype data: str - """ - super(StringPropertyValue, self).__init__(**kwargs) - self.kind = 'String' # type: str - self.data = kwargs['data'] - - -class SuccessfulPropertyBatchInfo(PropertyBatchInfo): - """Derived from PropertyBatchInfo. Represents the property batch succeeding. Contains the results of any "Get" operations in the batch. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch info, determined by the results of a property - batch. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Successful", "Failed". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchInfoKind - :ivar properties: A map containing the properties that were requested through any "Get" - property batch operations. The key represents the index of the "Get" operation in the original - request, in string form. The value is the property. If a property is not found, it will not be - in the map. - :vartype properties: dict[str, ~azure.servicefabric.models.PropertyInfo] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'properties': {'key': 'Properties', 'type': '{PropertyInfo}'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword properties: A map containing the properties that were requested through any "Get" - property batch operations. The key represents the index of the "Get" operation in the original - request, in string form. The value is the property. If a property is not found, it will not be - in the map. - :paramtype properties: dict[str, ~azure.servicefabric.models.PropertyInfo] - """ - super(SuccessfulPropertyBatchInfo, self).__init__(**kwargs) - self.kind = 'Successful' # type: str - self.properties = kwargs.get('properties', None) - - -class SystemApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for the fabric:/System application, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state of the cluster is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated - health state of the system application. The types of the unhealthy evaluations can be - DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current - aggregated health state of the system application. The types of the unhealthy evaluations can - be DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(SystemApplicationHealthEvaluation, self).__init__(**kwargs) - self.kind = 'SystemApplication' # type: str - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class TcpConfig(msrest.serialization.Model): - """Describes the tcp configuration for external connectivity for this network. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. tcp gateway config name. - :vartype name: str - :ivar port: Required. Specifies the port at which the service endpoint below needs to be - exposed. - :vartype port: int - :ivar destination: Required. Describes destination endpoint for routing traffic. - :vartype destination: ~azure.servicefabric.models.GatewayDestination - """ - - _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. tcp gateway config name. - :paramtype name: str - :keyword port: Required. Specifies the port at which the service endpoint below needs to be - exposed. - :paramtype port: int - :keyword destination: Required. Describes destination endpoint for routing traffic. - :paramtype destination: ~azure.servicefabric.models.GatewayDestination - """ - super(TcpConfig, self).__init__(**kwargs) - self.name = kwargs['name'] - self.port = kwargs['port'] - self.destination = kwargs['destination'] - - -class TestErrorChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when an unexpected event occurs in the Chaos engine. -For example, due to the cluster snapshot being inconsistent, while faulting an entity, Chaos found that the entity was already faulted -- which would be an unexpected event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values - include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", - "Stopped". - :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind - :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :vartype time_stamp_utc: ~datetime.datetime - :ivar reason: Describes why TestErrorChaosEvent was generated. For example, Chaos tries to - fault a partition but finds that the partition is no longer fault tolerant, then a - TestErrorEvent gets generated with the reason stating that the partition is not fault tolerant. - :vartype reason: str - """ - - _validation = { - 'kind': {'required': True}, - 'time_stamp_utc': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :paramtype time_stamp_utc: ~datetime.datetime - :keyword reason: Describes why TestErrorChaosEvent was generated. For example, Chaos tries to - fault a partition but finds that the partition is no longer fault tolerant, then a - TestErrorEvent gets generated with the reason stating that the partition is not fault tolerant. - :paramtype reason: str - """ - super(TestErrorChaosEvent, self).__init__(**kwargs) - self.kind = 'TestError' # type: str - self.reason = kwargs.get('reason', None) - - -class TimeBasedBackupScheduleDescription(BackupScheduleDescription): - """Describes the time based backup schedule. - - All required parameters must be populated in order to send to Azure. - - :ivar schedule_kind: Required. The kind of backup schedule, time based or frequency - based.Constant filled by server. Possible values include: "Invalid", "TimeBased", - "FrequencyBased". - :vartype schedule_kind: str or ~azure.servicefabric.models.BackupScheduleKind - :ivar schedule_frequency_type: Required. Describes the frequency with which to run the time - based backup schedule. Possible values include: "Invalid", "Daily", "Weekly". - :vartype schedule_frequency_type: str or - ~azure.servicefabric.models.BackupScheduleFrequencyType - :ivar run_days: List of days of a week when to trigger the periodic backup. This is valid only - when the backup schedule frequency type is weekly. - :vartype run_days: list[str or ~azure.servicefabric.models.DayOfWeek] - :ivar run_times: Required. Represents the list of exact time during the day in ISO8601 format. - Like '19:00:00' will represent '7PM' during the day. Date specified along with time will be - ignored. - :vartype run_times: list[~datetime.datetime] - """ - - _validation = { - 'schedule_kind': {'required': True}, - 'schedule_frequency_type': {'required': True}, - 'run_times': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - 'schedule_frequency_type': {'key': 'ScheduleFrequencyType', 'type': 'str'}, - 'run_days': {'key': 'RunDays', 'type': '[str]'}, - 'run_times': {'key': 'RunTimes', 'type': '[iso-8601]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword schedule_frequency_type: Required. Describes the frequency with which to run the time - based backup schedule. Possible values include: "Invalid", "Daily", "Weekly". - :paramtype schedule_frequency_type: str or - ~azure.servicefabric.models.BackupScheduleFrequencyType - :keyword run_days: List of days of a week when to trigger the periodic backup. This is valid - only when the backup schedule frequency type is weekly. - :paramtype run_days: list[str or ~azure.servicefabric.models.DayOfWeek] - :keyword run_times: Required. Represents the list of exact time during the day in ISO8601 - format. Like '19:00:00' will represent '7PM' during the day. Date specified along with time - will be ignored. - :paramtype run_times: list[~datetime.datetime] - """ - super(TimeBasedBackupScheduleDescription, self).__init__(**kwargs) - self.schedule_kind = 'TimeBased' # type: str - self.schedule_frequency_type = kwargs['schedule_frequency_type'] - self.run_days = kwargs.get('run_days', None) - self.run_times = kwargs['run_times'] - - -class TimeOfDay(msrest.serialization.Model): - """Defines an hour and minute of the day specified in 24 hour time. - - :ivar hour: Represents the hour of the day. Value must be between 0 and 23 inclusive. - :vartype hour: int - :ivar minute: Represents the minute of the hour. Value must be between 0 to 59 inclusive. - :vartype minute: int - """ - - _validation = { - 'hour': {'maximum': 23, 'minimum': 0}, - 'minute': {'maximum': 59, 'minimum': 0}, - } - - _attribute_map = { - 'hour': {'key': 'Hour', 'type': 'int'}, - 'minute': {'key': 'Minute', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword hour: Represents the hour of the day. Value must be between 0 and 23 inclusive. - :paramtype hour: int - :keyword minute: Represents the minute of the hour. Value must be between 0 to 59 inclusive. - :paramtype minute: int - """ - super(TimeOfDay, self).__init__(**kwargs) - self.hour = kwargs.get('hour', None) - self.minute = kwargs.get('minute', None) - - -class TimeRange(msrest.serialization.Model): - """Defines a time range in a 24 hour day specified by a start and end time. - - :ivar start_time: Defines an hour and minute of the day specified in 24 hour time. - :vartype start_time: ~azure.servicefabric.models.TimeOfDay - :ivar end_time: Defines an hour and minute of the day specified in 24 hour time. - :vartype end_time: ~azure.servicefabric.models.TimeOfDay - """ - - _attribute_map = { - 'start_time': {'key': 'StartTime', 'type': 'TimeOfDay'}, - 'end_time': {'key': 'EndTime', 'type': 'TimeOfDay'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword start_time: Defines an hour and minute of the day specified in 24 hour time. - :paramtype start_time: ~azure.servicefabric.models.TimeOfDay - :keyword end_time: Defines an hour and minute of the day specified in 24 hour time. - :paramtype end_time: ~azure.servicefabric.models.TimeOfDay - """ - super(TimeRange, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - - -class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): - """Describes a partitioning scheme where an integer range is allocated evenly across a number of partitions. - - All required parameters must be populated in order to send to Azure. - - :ivar partition_scheme: Required. Specifies how the service is partitioned.Constant filled by - server. Possible values include: "Invalid", "Singleton", "UniformInt64Range", "Named". - :vartype partition_scheme: str or ~azure.servicefabric.models.PartitionScheme - :ivar count: Required. The number of partitions. - :vartype count: int - :ivar low_key: Required. String indicating the lower bound of the partition key range that - should be split between the partitions. - :vartype low_key: str - :ivar high_key: Required. String indicating the upper bound of the partition key range that - should be split between the partitions. - :vartype high_key: str - """ - - _validation = { - 'partition_scheme': {'required': True}, - 'count': {'required': True}, - 'low_key': {'required': True}, - 'high_key': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword count: Required. The number of partitions. - :paramtype count: int - :keyword low_key: Required. String indicating the lower bound of the partition key range that - should be split between the partitions. - :paramtype low_key: str - :keyword high_key: Required. String indicating the upper bound of the partition key range that - should be split between the partitions. - :paramtype high_key: str - """ - super(UniformInt64RangePartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = 'UniformInt64Range' # type: str - self.count = kwargs['count'] - self.low_key = kwargs['low_key'] - self.high_key = kwargs['high_key'] - - -class UnplacedReplicaInformation(msrest.serialization.Model): - """Contains information for an unplaced replica. - - :ivar service_name: The name of the service. - :vartype service_name: str - :ivar partition_id: The ID of the partition. - :vartype partition_id: str - :ivar unplaced_replica_details: List of reasons due to which a replica cannot be placed. - :vartype unplaced_replica_details: list[str] - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'unplaced_replica_details': {'key': 'UnplacedReplicaDetails', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_name: The name of the service. - :paramtype service_name: str - :keyword partition_id: The ID of the partition. - :paramtype partition_id: str - :keyword unplaced_replica_details: List of reasons due to which a replica cannot be placed. - :paramtype unplaced_replica_details: list[str] - """ - super(UnplacedReplicaInformation, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.partition_id = kwargs.get('partition_id', None) - self.unplaced_replica_details = kwargs.get('unplaced_replica_details', None) - - -class UnprovisionApplicationTypeDescriptionInfo(msrest.serialization.Model): - """Describes the operation to unregister or unprovision an application type and its version that was registered with the Service Fabric. - - All required parameters must be populated in order to send to Azure. - - :ivar application_type_version: Required. The version of the application type as defined in the - application manifest. - :vartype application_type_version: str - :ivar async_property: The flag indicating whether or not unprovision should occur - asynchronously. When set to true, the unprovision operation returns when the request is - accepted by the system, and the unprovision operation continues without any timeout limit. The - default value is false. However, we recommend setting it to true for large application packages - that were provisioned. - :vartype async_property: bool - """ - - _validation = { - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'async_property': {'key': 'Async', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword application_type_version: Required. The version of the application type as defined in - the application manifest. - :paramtype application_type_version: str - :keyword async_property: The flag indicating whether or not unprovision should occur - asynchronously. When set to true, the unprovision operation returns when the request is - accepted by the system, and the unprovision operation continues without any timeout limit. The - default value is false. However, we recommend setting it to true for large application packages - that were provisioned. - :paramtype async_property: bool - """ - super(UnprovisionApplicationTypeDescriptionInfo, self).__init__(**kwargs) - self.application_type_version = kwargs['application_type_version'] - self.async_property = kwargs.get('async_property', None) - - -class UnprovisionFabricDescription(msrest.serialization.Model): - """Describes the parameters for unprovisioning a cluster. - - :ivar code_version: The cluster code package version. - :vartype code_version: str - :ivar config_version: The cluster manifest version. - :vartype config_version: str - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword code_version: The cluster code package version. - :paramtype code_version: str - :keyword config_version: The cluster manifest version. - :paramtype config_version: str - """ - super(UnprovisionFabricDescription, self).__init__(**kwargs) - self.code_version = kwargs.get('code_version', None) - self.config_version = kwargs.get('config_version', None) - - -class UpdateClusterUpgradeDescription(msrest.serialization.Model): - """Parameters for updating a cluster upgrade. - - :ivar upgrade_kind: The type of upgrade out of the following possible values. Possible values - include: "Invalid", "Rolling", "Rolling_ForceRestart". Default value: "Rolling". - :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeType - :ivar update_description: Describes the parameters for updating a rolling upgrade of - application or cluster. - :vartype update_description: ~azure.servicefabric.models.RollingUpgradeUpdateDescription - :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster - or of a cluster node. - :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :ivar enable_delta_health_evaluation: When true, enables delta health evaluation rather than - absolute health evaluation after completion of each upgrade domain. - :vartype enable_delta_health_evaluation: bool - :ivar cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of the - cluster during a cluster upgrade. - :vartype cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :ivar application_health_policy_map: Defines the application health policy map used to evaluate - the health of an application or one of its children entities. - :vartype application_health_policy_map: ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _attribute_map = { - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword upgrade_kind: The type of upgrade out of the following possible values. Possible - values include: "Invalid", "Rolling", "Rolling_ForceRestart". Default value: "Rolling". - :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeType - :keyword update_description: Describes the parameters for updating a rolling upgrade of - application or cluster. - :paramtype update_description: ~azure.servicefabric.models.RollingUpgradeUpdateDescription - :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the - cluster or of a cluster node. - :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :keyword enable_delta_health_evaluation: When true, enables delta health evaluation rather than - absolute health evaluation after completion of each upgrade domain. - :paramtype enable_delta_health_evaluation: bool - :keyword cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of - the cluster during a cluster upgrade. - :paramtype cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :keyword application_health_policy_map: Defines the application health policy map used to - evaluate the health of an application or one of its children entities. - :paramtype application_health_policy_map: ~azure.servicefabric.models.ApplicationHealthPolicies - """ - super(UpdateClusterUpgradeDescription, self).__init__(**kwargs) - self.upgrade_kind = kwargs.get('upgrade_kind', "Rolling") - self.update_description = kwargs.get('update_description', None) - self.cluster_health_policy = kwargs.get('cluster_health_policy', None) - self.enable_delta_health_evaluation = kwargs.get('enable_delta_health_evaluation', None) - self.cluster_upgrade_health_policy = kwargs.get('cluster_upgrade_health_policy', None) - self.application_health_policy_map = kwargs.get('application_health_policy_map', None) - - -class UpdatePartitionLoadResult(msrest.serialization.Model): - """Specifies result of updating load for specified partitions. The output will be ordered based on the partition ID. - - :ivar partition_id: Id of the partition. - :vartype partition_id: str - :ivar partition_error_code: If OperationState is Completed - this is 0. If OperationState is - Faulted - this is an error code indicating the reason. - :vartype partition_error_code: int - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'partition_error_code': {'key': 'PartitionErrorCode', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword partition_id: Id of the partition. - :paramtype partition_id: str - :keyword partition_error_code: If OperationState is Completed - this is 0. If OperationState - is Faulted - this is an error code indicating the reason. - :paramtype partition_error_code: int - """ - super(UpdatePartitionLoadResult, self).__init__(**kwargs) - self.partition_id = kwargs.get('partition_id', None) - self.partition_error_code = kwargs.get('partition_error_code', None) - - -class UpgradeDomainDeltaNodesCheckHealthEvaluation(HealthEvaluation): - """Represents health evaluation for delta unhealthy cluster nodes in an upgrade domain, containing health evaluations for each unhealthy node that impacted current aggregated health state. -Can be returned during cluster upgrade when cluster aggregated health state is Warning or Error. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar upgrade_domain_name: Name of the upgrade domain where nodes health is currently - evaluated. - :vartype upgrade_domain_name: str - :ivar baseline_error_count: Number of upgrade domain nodes with aggregated heath state Error in - the health store at the beginning of the cluster upgrade. - :vartype baseline_error_count: long - :ivar baseline_total_count: Total number of upgrade domain nodes in the health store at the - beginning of the cluster upgrade. - :vartype baseline_total_count: long - :ivar max_percent_delta_unhealthy_nodes: Maximum allowed percentage of upgrade domain delta - unhealthy nodes from the ClusterUpgradeHealthPolicy. - :vartype max_percent_delta_unhealthy_nodes: int - :ivar total_count: Total number of upgrade domain nodes in the health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, - 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword upgrade_domain_name: Name of the upgrade domain where nodes health is currently - evaluated. - :paramtype upgrade_domain_name: str - :keyword baseline_error_count: Number of upgrade domain nodes with aggregated heath state Error - in the health store at the beginning of the cluster upgrade. - :paramtype baseline_error_count: long - :keyword baseline_total_count: Total number of upgrade domain nodes in the health store at the - beginning of the cluster upgrade. - :paramtype baseline_total_count: long - :keyword max_percent_delta_unhealthy_nodes: Maximum allowed percentage of upgrade domain delta - unhealthy nodes from the ClusterUpgradeHealthPolicy. - :paramtype max_percent_delta_unhealthy_nodes: int - :keyword total_count: Total number of upgrade domain nodes in the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(UpgradeDomainDeltaNodesCheckHealthEvaluation, self).__init__(**kwargs) - self.kind = 'UpgradeDomainDeltaNodesCheck' # type: str - self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) - self.baseline_error_count = kwargs.get('baseline_error_count', None) - self.baseline_total_count = kwargs.get('baseline_total_count', None) - self.max_percent_delta_unhealthy_nodes = kwargs.get('max_percent_delta_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class UpgradeDomainDeployedApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for deployed applications in an upgrade domain, containing health evaluations for each unhealthy deployed application that impacted current aggregated health state. Can be returned when evaluating cluster health during cluster upgrade and the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar upgrade_domain_name: Name of the upgrade domain where deployed applications health is - currently evaluated. - :vartype upgrade_domain_name: str - :ivar max_percent_unhealthy_deployed_applications: Maximum allowed percentage of unhealthy - deployed applications from the ClusterHealthPolicy. - :vartype max_percent_unhealthy_deployed_applications: int - :ivar total_count: Total number of deployed applications in the current upgrade domain. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy DeployedApplicationHealthEvaluation that impacted the - aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword upgrade_domain_name: Name of the upgrade domain where deployed applications health is - currently evaluated. - :paramtype upgrade_domain_name: str - :keyword max_percent_unhealthy_deployed_applications: Maximum allowed percentage of unhealthy - deployed applications from the ClusterHealthPolicy. - :paramtype max_percent_unhealthy_deployed_applications: int - :keyword total_count: Total number of deployed applications in the current upgrade domain. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy DeployedApplicationHealthEvaluation that impacted the - aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(UpgradeDomainDeployedApplicationsHealthEvaluation, self).__init__(**kwargs) - self.kind = 'UpgradeDomainDeployedApplications' # type: str - self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) - self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class UpgradeDomainInfo(msrest.serialization.Model): - """Information about an upgrade domain. - - :ivar name: The name of the upgrade domain. - :vartype name: str - :ivar state: The state of the upgrade domain. Possible values include: "Invalid", "Pending", - "InProgress", "Completed". - :vartype state: str or ~azure.servicefabric.models.UpgradeDomainState - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The name of the upgrade domain. - :paramtype name: str - :keyword state: The state of the upgrade domain. Possible values include: "Invalid", "Pending", - "InProgress", "Completed". - :paramtype state: str or ~azure.servicefabric.models.UpgradeDomainState - """ - super(UpgradeDomainInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.state = kwargs.get('state', None) - - -class UpgradeDomainNodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for cluster nodes in an upgrade domain, containing health evaluations for each unhealthy node that impacted current aggregated health state. Can be returned when evaluating cluster health during cluster upgrade and the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar upgrade_domain_name: Name of the upgrade domain where nodes health is currently - evaluated. - :vartype upgrade_domain_name: str - :ivar max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes from the - ClusterHealthPolicy. - :vartype max_percent_unhealthy_nodes: int - :ivar total_count: Total number of nodes in the current upgrade domain. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword upgrade_domain_name: Name of the upgrade domain where nodes health is currently - evaluated. - :paramtype upgrade_domain_name: str - :keyword max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes from the - ClusterHealthPolicy. - :paramtype max_percent_unhealthy_nodes: int - :keyword total_count: Total number of nodes in the current upgrade domain. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(UpgradeDomainNodesHealthEvaluation, self).__init__(**kwargs) - self.kind = 'UpgradeDomainNodes' # type: str - self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) - self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) - self.total_count = kwargs.get('total_count', None) - self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) - - -class UpgradeOrchestrationServiceState(msrest.serialization.Model): - """Service state of Service Fabric Upgrade Orchestration Service. - - :ivar service_state: The state of Service Fabric Upgrade Orchestration Service. - :vartype service_state: str - """ - - _attribute_map = { - 'service_state': {'key': 'ServiceState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_state: The state of Service Fabric Upgrade Orchestration Service. - :paramtype service_state: str - """ - super(UpgradeOrchestrationServiceState, self).__init__(**kwargs) - self.service_state = kwargs.get('service_state', None) - - -class UpgradeOrchestrationServiceStateSummary(msrest.serialization.Model): - """Service state summary of Service Fabric Upgrade Orchestration Service. - - :ivar current_code_version: The current code version of the cluster. - :vartype current_code_version: str - :ivar current_manifest_version: The current manifest version of the cluster. - :vartype current_manifest_version: str - :ivar target_code_version: The target code version of the cluster. - :vartype target_code_version: str - :ivar target_manifest_version: The target manifest version of the cluster. - :vartype target_manifest_version: str - :ivar pending_upgrade_type: The type of the pending upgrade of the cluster. - :vartype pending_upgrade_type: str - """ - - _attribute_map = { - 'current_code_version': {'key': 'CurrentCodeVersion', 'type': 'str'}, - 'current_manifest_version': {'key': 'CurrentManifestVersion', 'type': 'str'}, - 'target_code_version': {'key': 'TargetCodeVersion', 'type': 'str'}, - 'target_manifest_version': {'key': 'TargetManifestVersion', 'type': 'str'}, - 'pending_upgrade_type': {'key': 'PendingUpgradeType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword current_code_version: The current code version of the cluster. - :paramtype current_code_version: str - :keyword current_manifest_version: The current manifest version of the cluster. - :paramtype current_manifest_version: str - :keyword target_code_version: The target code version of the cluster. - :paramtype target_code_version: str - :keyword target_manifest_version: The target manifest version of the cluster. - :paramtype target_manifest_version: str - :keyword pending_upgrade_type: The type of the pending upgrade of the cluster. - :paramtype pending_upgrade_type: str - """ - super(UpgradeOrchestrationServiceStateSummary, self).__init__(**kwargs) - self.current_code_version = kwargs.get('current_code_version', None) - self.current_manifest_version = kwargs.get('current_manifest_version', None) - self.target_code_version = kwargs.get('target_code_version', None) - self.target_manifest_version = kwargs.get('target_manifest_version', None) - self.pending_upgrade_type = kwargs.get('pending_upgrade_type', None) - - -class UpgradeUnitInfo(msrest.serialization.Model): - """Information about an upgrade unit. - - :ivar name: The name of the upgrade unit. - :vartype name: str - :ivar state: The state of the upgrade unit. Possible values include: "Invalid", "Pending", - "InProgress", "Completed", "Failed". - :vartype state: str or ~azure.servicefabric.models.UpgradeUnitState - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The name of the upgrade unit. - :paramtype name: str - :keyword state: The state of the upgrade unit. Possible values include: "Invalid", "Pending", - "InProgress", "Completed", "Failed". - :paramtype state: str or ~azure.servicefabric.models.UpgradeUnitState - """ - super(UpgradeUnitInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.state = kwargs.get('state', None) - - -class UploadChunkRange(msrest.serialization.Model): - """Information about which portion of the file to upload. - - :ivar start_position: The start position of the portion of the file. It's represented by the - number of bytes. - :vartype start_position: str - :ivar end_position: The end position of the portion of the file. It's represented by the number - of bytes. - :vartype end_position: str - """ - - _attribute_map = { - 'start_position': {'key': 'StartPosition', 'type': 'str'}, - 'end_position': {'key': 'EndPosition', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword start_position: The start position of the portion of the file. It's represented by the - number of bytes. - :paramtype start_position: str - :keyword end_position: The end position of the portion of the file. It's represented by the - number of bytes. - :paramtype end_position: str - """ - super(UploadChunkRange, self).__init__(**kwargs) - self.start_position = kwargs.get('start_position', None) - self.end_position = kwargs.get('end_position', None) - - -class UploadSession(msrest.serialization.Model): - """Information about a image store upload session. - - :ivar upload_sessions: When querying upload session by upload session ID, the result contains - only one upload session. When querying upload session by image store relative path, the result - might contain multiple upload sessions. - :vartype upload_sessions: list[~azure.servicefabric.models.UploadSessionInfo] - """ - - _attribute_map = { - 'upload_sessions': {'key': 'UploadSessions', 'type': '[UploadSessionInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword upload_sessions: When querying upload session by upload session ID, the result - contains only one upload session. When querying upload session by image store relative path, - the result might contain multiple upload sessions. - :paramtype upload_sessions: list[~azure.servicefabric.models.UploadSessionInfo] - """ - super(UploadSession, self).__init__(**kwargs) - self.upload_sessions = kwargs.get('upload_sessions', None) - - -class UploadSessionInfo(msrest.serialization.Model): - """Information about an image store upload session. A session is associated with a relative path in the image store. - - :ivar store_relative_path: The remote location within image store. This path is relative to the - image store root. - :vartype store_relative_path: str - :ivar session_id: A unique ID of the upload session. A session ID can be reused only if the - session was committed or removed. - :vartype session_id: str - :ivar modified_date: The date and time when the upload session was last modified. - :vartype modified_date: ~datetime.datetime - :ivar file_size: The size in bytes of the uploading file. - :vartype file_size: str - :ivar expected_ranges: List of chunk ranges that image store has not received yet. - :vartype expected_ranges: list[~azure.servicefabric.models.UploadChunkRange] - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'session_id': {'key': 'SessionId', 'type': 'str'}, - 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, - 'file_size': {'key': 'FileSize', 'type': 'str'}, - 'expected_ranges': {'key': 'ExpectedRanges', 'type': '[UploadChunkRange]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword store_relative_path: The remote location within image store. This path is relative to - the image store root. - :paramtype store_relative_path: str - :keyword session_id: A unique ID of the upload session. A session ID can be reused only if the - session was committed or removed. - :paramtype session_id: str - :keyword modified_date: The date and time when the upload session was last modified. - :paramtype modified_date: ~datetime.datetime - :keyword file_size: The size in bytes of the uploading file. - :paramtype file_size: str - :keyword expected_ranges: List of chunk ranges that image store has not received yet. - :paramtype expected_ranges: list[~azure.servicefabric.models.UploadChunkRange] - """ - super(UploadSessionInfo, self).__init__(**kwargs) - self.store_relative_path = kwargs.get('store_relative_path', None) - self.session_id = kwargs.get('session_id', None) - self.modified_date = kwargs.get('modified_date', None) - self.file_size = kwargs.get('file_size', None) - self.expected_ranges = kwargs.get('expected_ranges', None) - - -class UsageInfo(msrest.serialization.Model): - """Information about how much space and how many files in the file system the ImageStore is using in this category. - - :ivar used_space: the size of all files in this category. - :vartype used_space: str - :ivar file_count: the number of all files in this category. - :vartype file_count: str - """ - - _attribute_map = { - 'used_space': {'key': 'UsedSpace', 'type': 'str'}, - 'file_count': {'key': 'FileCount', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword used_space: the size of all files in this category. - :paramtype used_space: str - :keyword file_count: the number of all files in this category. - :paramtype file_count: str - """ - super(UsageInfo, self).__init__(**kwargs) - self.used_space = kwargs.get('used_space', None) - self.file_count = kwargs.get('file_count', None) - - -class ValidateClusterUpgradeResult(msrest.serialization.Model): - """Specifies result of validating a cluster upgrade. - - :ivar service_host_upgrade_impact: The expected impact of the upgrade. Possible values include: - "Invalid", "None", "ServiceHostRestart", "UnexpectedServiceHostRestart". - :vartype service_host_upgrade_impact: str or - ~azure.servicefabric.models.ServiceHostUpgradeImpact - :ivar validation_details: A string containing additional details for the Fabric upgrade - validation result. - :vartype validation_details: str - """ - - _attribute_map = { - 'service_host_upgrade_impact': {'key': 'ServiceHostUpgradeImpact', 'type': 'str'}, - 'validation_details': {'key': 'ValidationDetails', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword service_host_upgrade_impact: The expected impact of the upgrade. Possible values - include: "Invalid", "None", "ServiceHostRestart", "UnexpectedServiceHostRestart". - :paramtype service_host_upgrade_impact: str or - ~azure.servicefabric.models.ServiceHostUpgradeImpact - :keyword validation_details: A string containing additional details for the Fabric upgrade - validation result. - :paramtype validation_details: str - """ - super(ValidateClusterUpgradeResult, self).__init__(**kwargs) - self.service_host_upgrade_impact = kwargs.get('service_host_upgrade_impact', None) - self.validation_details = kwargs.get('validation_details', None) - - -class ValidationFailedChaosEvent(ChaosEvent): - """Chaos event corresponding to a failure during validation. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values - include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", - "Stopped". - :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind - :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :vartype time_stamp_utc: ~datetime.datetime - :ivar reason: Describes why the ValidationFailedChaosEvent was generated. This may happen - because more than MaxPercentUnhealthyNodes are unhealthy for more than - MaxClusterStabilizationTimeout. This reason will be in the Reason property of the - ValidationFailedChaosEvent as a string. - :vartype reason: str - """ - - _validation = { - 'kind': {'required': True}, - 'time_stamp_utc': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :paramtype time_stamp_utc: ~datetime.datetime - :keyword reason: Describes why the ValidationFailedChaosEvent was generated. This may happen - because more than MaxPercentUnhealthyNodes are unhealthy for more than - MaxClusterStabilizationTimeout. This reason will be in the Reason property of the - ValidationFailedChaosEvent as a string. - :paramtype reason: str - """ - super(ValidationFailedChaosEvent, self).__init__(**kwargs) - self.kind = 'ValidationFailed' # type: str - self.reason = kwargs.get('reason', None) - - -class VolumeProviderParametersAzureFile(msrest.serialization.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. - - :ivar account_name: Required. Name of the Azure storage account for the File Share. - :vartype account_name: str - :ivar account_key: Access key of the Azure storage account for the File Share. - :vartype account_key: str - :ivar share_name: Required. Name of the Azure Files file share that provides storage for the - volume. - :vartype 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 - ): - """ - :keyword account_name: Required. Name of the Azure storage account for the File Share. - :paramtype account_name: str - :keyword account_key: Access key of the Azure storage account for the File Share. - :paramtype account_key: str - :keyword share_name: Required. Name of the Azure Files file share that provides storage for the - volume. - :paramtype share_name: str - """ - super(VolumeProviderParametersAzureFile, self).__init__(**kwargs) - self.account_name = kwargs['account_name'] - self.account_key = kwargs.get('account_key', None) - self.share_name = kwargs['share_name'] - - -class VolumeResourceDescription(msrest.serialization.Model): - """This type describes a volume resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of the Volume resource. - :vartype name: str - :ivar description: User readable description of the volume. - :vartype description: str - :ivar status: Status of the volume. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the volume. - :vartype status_details: str - :ivar provider: Required. Provider of the volume. Possible values include: "SFAzureFile". - :vartype provider: str or ~azure.servicefabric.models.VolumeProvider - :ivar azure_file_parameters: This type describes a volume provided by an Azure Files file - share. - :vartype azure_file_parameters: ~azure.servicefabric.models.VolumeProviderParametersAzureFile - """ - - _validation = { - 'name': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'provider': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'provider': {'key': 'properties.provider', 'type': 'str'}, - 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. Name of the Volume resource. - :paramtype name: str - :keyword description: User readable description of the volume. - :paramtype description: str - :keyword provider: Required. Provider of the volume. Possible values include: "SFAzureFile". - :paramtype provider: str or ~azure.servicefabric.models.VolumeProvider - :keyword azure_file_parameters: This type describes a volume provided by an Azure Files file - share. - :paramtype azure_file_parameters: ~azure.servicefabric.models.VolumeProviderParametersAzureFile - """ - super(VolumeResourceDescription, self).__init__(**kwargs) - self.name = kwargs['name'] - self.description = kwargs.get('description', None) - self.status = None - self.status_details = None - self.provider = kwargs['provider'] - self.azure_file_parameters = kwargs.get('azure_file_parameters', None) - - -class WaitForInbuildReplicaSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the replica build operation to finish. This indicates that there is a replica that is going through the copy or is providing data for building another replica. Bring the node down will abort this copy operation which are typically expensive involving data movements. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - :ivar partition_id: Id of the partition which is undergoing the safety check. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword partition_id: Id of the partition which is undergoing the safety check. - :paramtype partition_id: str - """ - super(WaitForInbuildReplicaSafetyCheck, self).__init__(**kwargs) - self.kind = 'WaitForInbuildReplica' # type: str - - -class WaitForPrimaryPlacementSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the primary replica that was moved out of the node due to upgrade to be placed back again on that node. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - :ivar partition_id: Id of the partition which is undergoing the safety check. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword partition_id: Id of the partition which is undergoing the safety check. - :paramtype partition_id: str - """ - super(WaitForPrimaryPlacementSafetyCheck, self).__init__(**kwargs) - self.kind = 'WaitForPrimaryPlacement' # type: str - - -class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the primary replica to be moved out of the node before starting an upgrade to ensure the availability of the primary replica for the partition. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - :ivar partition_id: Id of the partition which is undergoing the safety check. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword partition_id: Id of the partition which is undergoing the safety check. - :paramtype partition_id: str - """ - super(WaitForPrimarySwapSafetyCheck, self).__init__(**kwargs) - self.kind = 'WaitForPrimarySwap' # type: str - - -class WaitForReconfigurationSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the current reconfiguration of the partition to be completed before starting an upgrade. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - :ivar partition_id: Id of the partition which is undergoing the safety check. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword partition_id: Id of the partition which is undergoing the safety check. - :paramtype partition_id: str - """ - super(WaitForReconfigurationSafetyCheck, self).__init__(**kwargs) - self.kind = 'WaitForReconfiguration' # type: str - - -class WaitingChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos is waiting for the cluster to become ready for faulting, for example, Chaos may be waiting for the on-going upgrade to finish. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values - include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", - "Stopped". - :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind - :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :vartype time_stamp_utc: ~datetime.datetime - :ivar reason: Describes why the WaitingChaosEvent was generated, for example, due to a cluster - upgrade. - :vartype reason: str - """ - - _validation = { - 'kind': {'required': True}, - 'time_stamp_utc': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :paramtype time_stamp_utc: ~datetime.datetime - :keyword reason: Describes why the WaitingChaosEvent was generated, for example, due to a - cluster upgrade. - :paramtype reason: str - """ - super(WaitingChaosEvent, self).__init__(**kwargs) - self.kind = 'Waiting' # type: str - self.reason = kwargs.get('reason', None) diff --git a/customSDK/servicefabric/models/_models_py3.py b/customSDK/servicefabric/models/_models_py3.py deleted file mode 100644 index a2f69586..00000000 --- a/customSDK/servicefabric/models/_models_py3.py +++ /dev/null @@ -1,36919 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import datetime -from typing import Dict, List, Optional, Union - -from azure.core.exceptions import HttpResponseError -import msrest.serialization - -from ._service_fabric_client_apis_enums import * - - -class AadMetadata(msrest.serialization.Model): - """Azure Active Directory metadata used for secured connection to cluster. - - :ivar authority: The AAD authority url. - :vartype authority: str - :ivar client: The AAD client application Id. - :vartype client: str - :ivar cluster: The AAD cluster application Id. - :vartype cluster: str - :ivar login: The AAD login url. - :vartype login: str - :ivar redirect: The client application redirect address. - :vartype redirect: str - :ivar tenant: The AAD tenant Id. - :vartype tenant: str - """ - - _attribute_map = { - 'authority': {'key': 'authority', 'type': 'str'}, - 'client': {'key': 'client', 'type': 'str'}, - 'cluster': {'key': 'cluster', 'type': 'str'}, - 'login': {'key': 'login', 'type': 'str'}, - 'redirect': {'key': 'redirect', 'type': 'str'}, - 'tenant': {'key': 'tenant', 'type': 'str'}, - } - - def __init__( - self, - *, - authority: Optional[str] = None, - client: Optional[str] = None, - cluster: Optional[str] = None, - login: Optional[str] = None, - redirect: Optional[str] = None, - tenant: Optional[str] = None, - **kwargs - ): - """ - :keyword authority: The AAD authority url. - :paramtype authority: str - :keyword client: The AAD client application Id. - :paramtype client: str - :keyword cluster: The AAD cluster application Id. - :paramtype cluster: str - :keyword login: The AAD login url. - :paramtype login: str - :keyword redirect: The client application redirect address. - :paramtype redirect: str - :keyword tenant: The AAD tenant Id. - :paramtype tenant: str - """ - super(AadMetadata, self).__init__(**kwargs) - self.authority = authority - self.client = client - self.cluster = cluster - self.login = login - self.redirect = redirect - self.tenant = tenant - - -class AadMetadataObject(msrest.serialization.Model): - """Azure Active Directory metadata object used for secured connection to cluster. - - :ivar type: The client authentication method. - :vartype type: str - :ivar metadata: Azure Active Directory metadata used for secured connection to cluster. - :vartype metadata: ~azure.servicefabric.models.AadMetadata - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'metadata': {'key': 'metadata', 'type': 'AadMetadata'}, - } - - def __init__( - self, - *, - type: Optional[str] = None, - metadata: Optional["AadMetadata"] = None, - **kwargs - ): - """ - :keyword type: The client authentication method. - :paramtype type: str - :keyword metadata: Azure Active Directory metadata used for secured connection to cluster. - :paramtype metadata: ~azure.servicefabric.models.AadMetadata - """ - super(AadMetadataObject, self).__init__(**kwargs) - self.type = type - self.metadata = metadata - - -class ScalingMechanismDescription(msrest.serialization.Model): - """Describes the mechanism for performing a scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AddRemoveIncrementalNamedPartitionScalingMechanism, PartitionInstanceCountScaleMechanism. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Specifies the kind of scaling mechanism.Constant filled by server. - Possible values include: "Invalid", "PartitionInstanceCount", - "AddRemoveIncrementalNamedPartition". - :vartype kind: str or ~azure.servicefabric.models.ScalingMechanismKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AddRemoveIncrementalNamedPartition': 'AddRemoveIncrementalNamedPartitionScalingMechanism', 'PartitionInstanceCount': 'PartitionInstanceCountScaleMechanism'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ScalingMechanismDescription, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription): - """Represents a scaling mechanism for adding or removing named partitions of a stateless service. Partition names are in the format '0','1''N-1'. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Specifies the kind of scaling mechanism.Constant filled by server. - Possible values include: "Invalid", "PartitionInstanceCount", - "AddRemoveIncrementalNamedPartition". - :vartype kind: str or ~azure.servicefabric.models.ScalingMechanismKind - :ivar min_partition_count: Required. Minimum number of named partitions of the service. - :vartype min_partition_count: int - :ivar max_partition_count: Required. Maximum number of named partitions of the service. - :vartype max_partition_count: int - :ivar scale_increment: Required. The number of instances to add or remove during a scaling - operation. - :vartype scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_partition_count': {'required': True}, - 'max_partition_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'}, - 'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'}, - 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, - } - - def __init__( - self, - *, - min_partition_count: int, - max_partition_count: int, - scale_increment: int, - **kwargs - ): - """ - :keyword min_partition_count: Required. Minimum number of named partitions of the service. - :paramtype min_partition_count: int - :keyword max_partition_count: Required. Maximum number of named partitions of the service. - :paramtype max_partition_count: int - :keyword scale_increment: Required. The number of instances to add or remove during a scaling - operation. - :paramtype scale_increment: int - """ - super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs) - self.kind = 'AddRemoveIncrementalNamedPartition' # type: str - self.min_partition_count = min_partition_count - self.max_partition_count = max_partition_count - self.scale_increment = scale_increment - - -class AutoScalingMechanism(msrest.serialization.Model): - """Describes the mechanism for performing auto scaling operation. Derived classes will describe the actual mechanism. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AddRemoveReplicaScalingMechanism. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of auto scaling mechanism.Constant filled by server. Possible - values include: "AddRemoveReplica". - :vartype kind: str or ~azure.servicefabric.models.AutoScalingMechanismKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AddRemoveReplica': 'AddRemoveReplicaScalingMechanism'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(AutoScalingMechanism, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class AddRemoveReplicaScalingMechanism(AutoScalingMechanism): - """Describes the horizontal auto scaling mechanism that adds or removes replicas (containers or container groups). - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of auto scaling mechanism.Constant filled by server. Possible - values include: "AddRemoveReplica". - :vartype kind: str or ~azure.servicefabric.models.AutoScalingMechanismKind - :ivar min_count: Required. Minimum number of containers (scale down won't be performed below - this number). - :vartype min_count: int - :ivar max_count: Required. Maximum number of containers (scale up won't be performed above this - number). - :vartype max_count: int - :ivar scale_increment: Required. Each time auto scaling is performed, this number of containers - will be added or removed. - :vartype scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_count': {'required': True}, - 'max_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'min_count': {'key': 'minCount', 'type': 'int'}, - 'max_count': {'key': 'maxCount', 'type': 'int'}, - 'scale_increment': {'key': 'scaleIncrement', 'type': 'int'}, - } - - def __init__( - self, - *, - min_count: int, - max_count: int, - scale_increment: int, - **kwargs - ): - """ - :keyword min_count: Required. Minimum number of containers (scale down won't be performed below - this number). - :paramtype min_count: int - :keyword max_count: Required. Maximum number of containers (scale up won't be performed above - this number). - :paramtype max_count: int - :keyword scale_increment: Required. Each time auto scaling is performed, this number of - containers will be added or removed. - :paramtype scale_increment: int - """ - super(AddRemoveReplicaScalingMechanism, self).__init__(**kwargs) - self.kind = 'AddRemoveReplica' # type: str - self.min_count = min_count - self.max_count = max_count - self.scale_increment = scale_increment - - -class AnalysisEventMetadata(msrest.serialization.Model): - """Metadata about an Analysis Event. - - :ivar delay: The analysis delay. - :vartype delay: ~datetime.timedelta - :ivar duration: The duration of analysis. - :vartype duration: ~datetime.timedelta - """ - - _attribute_map = { - 'delay': {'key': 'Delay', 'type': 'duration'}, - 'duration': {'key': 'Duration', 'type': 'duration'}, - } - - def __init__( - self, - *, - delay: Optional[datetime.timedelta] = None, - duration: Optional[datetime.timedelta] = None, - **kwargs - ): - """ - :keyword delay: The analysis delay. - :paramtype delay: ~datetime.timedelta - :keyword duration: The duration of analysis. - :paramtype duration: ~datetime.timedelta - """ - super(AnalysisEventMetadata, self).__init__(**kwargs) - self.delay = delay - self.duration = duration - - -class BackupConfigurationInfo(msrest.serialization.Model): - """Describes the backup configuration information. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationBackupConfigurationInfo, PartitionBackupConfigurationInfo, ServiceBackupConfigurationInfo. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The entity type of a Service Fabric entity such as Application, Service - or a Partition where periodic backups can be enabled.Constant filled by server. Possible values - include: "Invalid", "Partition", "Service", "Application". - :vartype kind: str or ~azure.servicefabric.models.BackupEntityKind - :ivar policy_name: The name of the backup policy which is applicable to this Service Fabric - application or service or partition. - :vartype policy_name: str - :ivar policy_inherited_from: Specifies the scope at which the backup policy is applied. - Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope - :ivar suspension_info: Describes the backup suspension details. - :vartype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - } - - _subtype_map = { - 'kind': {'Application': 'ApplicationBackupConfigurationInfo', 'Partition': 'PartitionBackupConfigurationInfo', 'Service': 'ServiceBackupConfigurationInfo'} - } - - def __init__( - self, - *, - policy_name: Optional[str] = None, - policy_inherited_from: Optional[Union[str, "BackupPolicyScope"]] = None, - suspension_info: Optional["BackupSuspensionInfo"] = None, - **kwargs - ): - """ - :keyword policy_name: The name of the backup policy which is applicable to this Service Fabric - application or service or partition. - :paramtype policy_name: str - :keyword policy_inherited_from: Specifies the scope at which the backup policy is applied. - Possible values include: "Invalid", "Partition", "Service", "Application". - :paramtype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope - :keyword suspension_info: Describes the backup suspension details. - :paramtype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - """ - super(BackupConfigurationInfo, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.policy_name = policy_name - self.policy_inherited_from = policy_inherited_from - self.suspension_info = suspension_info - - -class ApplicationBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information for a specific Service Fabric application specifying what backup policy is being applied and suspend description, if any. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The entity type of a Service Fabric entity such as Application, Service - or a Partition where periodic backups can be enabled.Constant filled by server. Possible values - include: "Invalid", "Partition", "Service", "Application". - :vartype kind: str or ~azure.servicefabric.models.BackupEntityKind - :ivar policy_name: The name of the backup policy which is applicable to this Service Fabric - application or service or partition. - :vartype policy_name: str - :ivar policy_inherited_from: Specifies the scope at which the backup policy is applied. - Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope - :ivar suspension_info: Describes the backup suspension details. - :vartype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__( - self, - *, - policy_name: Optional[str] = None, - policy_inherited_from: Optional[Union[str, "BackupPolicyScope"]] = None, - suspension_info: Optional["BackupSuspensionInfo"] = None, - application_name: Optional[str] = None, - **kwargs - ): - """ - :keyword policy_name: The name of the backup policy which is applicable to this Service Fabric - application or service or partition. - :paramtype policy_name: str - :keyword policy_inherited_from: Specifies the scope at which the backup policy is applied. - Possible values include: "Invalid", "Partition", "Service", "Application". - :paramtype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope - :keyword suspension_info: Describes the backup suspension details. - :paramtype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - """ - super(ApplicationBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) - self.kind = 'Application' # type: str - self.application_name = application_name - - -class BackupEntity(msrest.serialization.Model): - """Describes the Service Fabric entity that is configured for backup. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationBackupEntity, PartitionBackupEntity, ServiceBackupEntity. - - All required parameters must be populated in order to send to Azure. - - :ivar entity_kind: Required. The entity type of a Service Fabric entity such as Application, - Service or a Partition where periodic backups can be enabled.Constant filled by server. - Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype entity_kind: str or ~azure.servicefabric.models.BackupEntityKind - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - } - - _subtype_map = { - 'entity_kind': {'Application': 'ApplicationBackupEntity', 'Partition': 'PartitionBackupEntity', 'Service': 'ServiceBackupEntity'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(BackupEntity, self).__init__(**kwargs) - self.entity_kind = None # type: Optional[str] - - -class ApplicationBackupEntity(BackupEntity): - """Identifies the Service Fabric application which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :ivar entity_kind: Required. The entity type of a Service Fabric entity such as Application, - Service or a Partition where periodic backups can be enabled.Constant filled by server. - Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype entity_kind: str or ~azure.servicefabric.models.BackupEntityKind - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__( - self, - *, - application_name: Optional[str] = None, - **kwargs - ): - """ - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - """ - super(ApplicationBackupEntity, self).__init__(**kwargs) - self.entity_kind = 'Application' # type: str - self.application_name = application_name - - -class ApplicationCapacityDescription(msrest.serialization.Model): - """Describes capacity information for services of this application. This description can be used for describing the following. - - -* Reserving the capacity for the services on the nodes -* Limiting the total number of nodes that services of this application can run on -* Limiting the custom capacity metrics to limit the total consumption of this metric by the services of this application. - - :ivar minimum_nodes: The minimum number of nodes where Service Fabric will reserve capacity for - this application. Note that this does not mean that the services of this application will be - placed on all of those nodes. If this property is set to zero, no capacity will be reserved. - The value of this property cannot be more than the value of the MaximumNodes property. - :vartype minimum_nodes: long - :ivar maximum_nodes: The maximum number of nodes where Service Fabric will reserve capacity for - this application. Note that this does not mean that the services of this application will be - placed on all of those nodes. By default, the value of this property is zero and it means that - the services can be placed on any node. - :vartype maximum_nodes: long - :ivar application_metrics: List of application capacity metric description. - :vartype application_metrics: list[~azure.servicefabric.models.ApplicationMetricDescription] - """ - - _validation = { - 'minimum_nodes': {'minimum': 0}, - 'maximum_nodes': {'minimum': 0}, - } - - _attribute_map = { - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, - } - - def __init__( - self, - *, - minimum_nodes: Optional[int] = None, - maximum_nodes: Optional[int] = 0, - application_metrics: Optional[List["ApplicationMetricDescription"]] = None, - **kwargs - ): - """ - :keyword minimum_nodes: The minimum number of nodes where Service Fabric will reserve capacity - for this application. Note that this does not mean that the services of this application will - be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. - The value of this property cannot be more than the value of the MaximumNodes property. - :paramtype minimum_nodes: long - :keyword maximum_nodes: The maximum number of nodes where Service Fabric will reserve capacity - for this application. Note that this does not mean that the services of this application will - be placed on all of those nodes. By default, the value of this property is zero and it means - that the services can be placed on any node. - :paramtype maximum_nodes: long - :keyword application_metrics: List of application capacity metric description. - :paramtype application_metrics: list[~azure.servicefabric.models.ApplicationMetricDescription] - """ - super(ApplicationCapacityDescription, self).__init__(**kwargs) - self.minimum_nodes = minimum_nodes - self.maximum_nodes = maximum_nodes - self.application_metrics = application_metrics - - -class FabricEvent(msrest.serialization.Model): - """Represents the base for all Fabric Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationEvent, ClusterEvent, ContainerInstanceEvent, NodeEvent, PartitionEvent, ReplicaEvent, ServiceEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - } - - _subtype_map = { - 'kind': {'ApplicationEvent': 'ApplicationEvent', 'ClusterEvent': 'ClusterEvent', 'ContainerInstanceEvent': 'ContainerInstanceEvent', 'NodeEvent': 'NodeEvent', 'PartitionEvent': 'PartitionEvent', 'ReplicaEvent': 'ReplicaEvent', 'ServiceEvent': 'ServiceEvent'} - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - """ - super(FabricEvent, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.event_instance_id = event_instance_id - self.category = category - self.time_stamp = time_stamp - self.has_correlated_events = has_correlated_events - - -class ApplicationEvent(FabricEvent): - """Represents the base for all Application Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationContainerInstanceExitedEvent, ApplicationCreatedEvent, ApplicationDeletedEvent, ApplicationHealthReportExpiredEvent, ApplicationNewHealthReportEvent, ApplicationProcessExitedEvent, ApplicationUpgradeCompletedEvent, ApplicationUpgradeDomainCompletedEvent, ApplicationUpgradeRollbackCompletedEvent, ApplicationUpgradeRollbackStartedEvent, ApplicationUpgradeStartedEvent, ChaosCodePackageRestartScheduledEvent, DeployedApplicationHealthReportExpiredEvent, DeployedApplicationNewHealthReportEvent, DeployedServicePackageHealthReportExpiredEvent, DeployedServicePackageNewHealthReportEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ApplicationContainerInstanceExited': 'ApplicationContainerInstanceExitedEvent', 'ApplicationCreated': 'ApplicationCreatedEvent', 'ApplicationDeleted': 'ApplicationDeletedEvent', 'ApplicationHealthReportExpired': 'ApplicationHealthReportExpiredEvent', 'ApplicationNewHealthReport': 'ApplicationNewHealthReportEvent', 'ApplicationProcessExited': 'ApplicationProcessExitedEvent', 'ApplicationUpgradeCompleted': 'ApplicationUpgradeCompletedEvent', 'ApplicationUpgradeDomainCompleted': 'ApplicationUpgradeDomainCompletedEvent', 'ApplicationUpgradeRollbackCompleted': 'ApplicationUpgradeRollbackCompletedEvent', 'ApplicationUpgradeRollbackStarted': 'ApplicationUpgradeRollbackStartedEvent', 'ApplicationUpgradeStarted': 'ApplicationUpgradeStartedEvent', 'ChaosCodePackageRestartScheduled': 'ChaosCodePackageRestartScheduledEvent', 'DeployedApplicationHealthReportExpired': 'DeployedApplicationHealthReportExpiredEvent', 'DeployedApplicationNewHealthReport': 'DeployedApplicationNewHealthReportEvent', 'DeployedServicePackageHealthReportExpired': 'DeployedServicePackageHealthReportExpiredEvent', 'DeployedServicePackageNewHealthReport': 'DeployedServicePackageNewHealthReportEvent'} - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - application_id: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - """ - super(ApplicationEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ApplicationEvent' # type: str - self.application_id = application_id - - -class ApplicationContainerInstanceExitedEvent(ApplicationEvent): - """Container Exited event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar service_name: Required. Name of Service. - :vartype service_name: str - :ivar service_package_name: Required. Name of Service package. - :vartype service_package_name: str - :ivar service_package_activation_id: Required. Activation Id of Service package. - :vartype service_package_activation_id: str - :ivar is_exclusive: Required. Indicates IsExclusive flag. - :vartype is_exclusive: bool - :ivar code_package_name: Required. Name of Code package. - :vartype code_package_name: str - :ivar entry_point_type: Required. Type of EntryPoint. - :vartype entry_point_type: str - :ivar image_name: Required. Name of Container image. - :vartype image_name: str - :ivar container_name: Required. Name of Container. - :vartype container_name: str - :ivar host_id: Required. Host Id. - :vartype host_id: str - :ivar exit_code: Required. Exit code of process. - :vartype exit_code: long - :ivar unexpected_termination: Required. Indicates if termination is unexpected. - :vartype unexpected_termination: bool - :ivar start_time: Required. Start time of process. - :vartype start_time: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'service_name': {'required': True}, - 'service_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'is_exclusive': {'required': True}, - 'code_package_name': {'required': True}, - 'entry_point_type': {'required': True}, - 'image_name': {'required': True}, - 'container_name': {'required': True}, - 'host_id': {'required': True}, - 'exit_code': {'required': True}, - 'unexpected_termination': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, - 'image_name': {'key': 'ImageName', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - 'host_id': {'key': 'HostId', 'type': 'str'}, - 'exit_code': {'key': 'ExitCode', 'type': 'long'}, - 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - application_id: str, - service_name: str, - service_package_name: str, - service_package_activation_id: str, - is_exclusive: bool, - code_package_name: str, - entry_point_type: str, - image_name: str, - container_name: str, - host_id: str, - exit_code: int, - unexpected_termination: bool, - start_time: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword service_name: Required. Name of Service. - :paramtype service_name: str - :keyword service_package_name: Required. Name of Service package. - :paramtype service_package_name: str - :keyword service_package_activation_id: Required. Activation Id of Service package. - :paramtype service_package_activation_id: str - :keyword is_exclusive: Required. Indicates IsExclusive flag. - :paramtype is_exclusive: bool - :keyword code_package_name: Required. Name of Code package. - :paramtype code_package_name: str - :keyword entry_point_type: Required. Type of EntryPoint. - :paramtype entry_point_type: str - :keyword image_name: Required. Name of Container image. - :paramtype image_name: str - :keyword container_name: Required. Name of Container. - :paramtype container_name: str - :keyword host_id: Required. Host Id. - :paramtype host_id: str - :keyword exit_code: Required. Exit code of process. - :paramtype exit_code: long - :keyword unexpected_termination: Required. Indicates if termination is unexpected. - :paramtype unexpected_termination: bool - :keyword start_time: Required. Start time of process. - :paramtype start_time: ~datetime.datetime - """ - super(ApplicationContainerInstanceExitedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.kind = 'ApplicationContainerInstanceExited' # type: str - self.service_name = service_name - self.service_package_name = service_package_name - self.service_package_activation_id = service_package_activation_id - self.is_exclusive = is_exclusive - self.code_package_name = code_package_name - self.entry_point_type = entry_point_type - self.image_name = image_name - self.container_name = container_name - self.host_id = host_id - self.exit_code = exit_code - self.unexpected_termination = unexpected_termination - self.start_time = start_time - - -class ApplicationCreatedEvent(ApplicationEvent): - """Application Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar application_type_version: Required. Application type version. - :vartype application_type_version: str - :ivar application_definition_kind: Required. Application definition kind. - :vartype application_definition_kind: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'application_definition_kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - application_id: str, - application_type_name: str, - application_type_version: str, - application_definition_kind: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword application_type_version: Required. Application type version. - :paramtype application_type_version: str - :keyword application_definition_kind: Required. Application definition kind. - :paramtype application_definition_kind: str - """ - super(ApplicationCreatedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.kind = 'ApplicationCreated' # type: str - self.application_type_name = application_type_name - self.application_type_version = application_type_version - self.application_definition_kind = application_definition_kind - - -class ApplicationDeletedEvent(ApplicationEvent): - """Application Deleted event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar application_type_version: Required. Application type version. - :vartype application_type_version: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - application_id: str, - application_type_name: str, - application_type_version: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword application_type_version: Required. Application type version. - :paramtype application_type_version: str - """ - super(ApplicationDeletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.kind = 'ApplicationDeleted' # type: str - self.application_type_name = application_type_name - self.application_type_version = application_type_version - - -class ApplicationDescription(msrest.serialization.Model): - """Describes a Service Fabric application. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the application, including the 'fabric:' URI scheme. - :vartype name: str - :ivar type_name: Required. The application type name as defined in the application manifest. - :vartype type_name: str - :ivar type_version: Required. The version of the application type as defined in the application - manifest. - :vartype type_version: str - :ivar parameter_list: List of application parameters with overridden values from their default - values specified in the application manifest. - :vartype parameter_list: list[~azure.servicefabric.models.ApplicationParameter] - :ivar application_capacity: Describes capacity information for services of this application. - This description can be used for describing the following. - - - * Reserving the capacity for the services on the nodes - * Limiting the total number of nodes that services of this application can run on - * Limiting the custom capacity metrics to limit the total consumption of this metric by the - services of this application. - :vartype application_capacity: ~azure.servicefabric.models.ApplicationCapacityDescription - :ivar managed_application_identity: Managed application identity description. - :vartype managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - - _validation = { - 'name': {'required': True}, - 'type_name': {'required': True}, - 'type_version': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'parameter_list': {'key': 'ParameterList', 'type': '[ApplicationParameter]'}, - 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'ApplicationCapacityDescription'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__( - self, - *, - name: str, - type_name: str, - type_version: str, - parameter_list: Optional[List["ApplicationParameter"]] = None, - application_capacity: Optional["ApplicationCapacityDescription"] = None, - managed_application_identity: Optional["ManagedApplicationIdentityDescription"] = None, - **kwargs - ): - """ - :keyword name: Required. The name of the application, including the 'fabric:' URI scheme. - :paramtype name: str - :keyword type_name: Required. The application type name as defined in the application manifest. - :paramtype type_name: str - :keyword type_version: Required. The version of the application type as defined in the - application manifest. - :paramtype type_version: str - :keyword parameter_list: List of application parameters with overridden values from their - default values specified in the application manifest. - :paramtype parameter_list: list[~azure.servicefabric.models.ApplicationParameter] - :keyword application_capacity: Describes capacity information for services of this application. - This description can be used for describing the following. - - - * Reserving the capacity for the services on the nodes - * Limiting the total number of nodes that services of this application can run on - * Limiting the custom capacity metrics to limit the total consumption of this metric by the - services of this application. - :paramtype application_capacity: ~azure.servicefabric.models.ApplicationCapacityDescription - :keyword managed_application_identity: Managed application identity description. - :paramtype managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - super(ApplicationDescription, self).__init__(**kwargs) - self.name = name - self.type_name = type_name - self.type_version = type_version - self.parameter_list = parameter_list - self.application_capacity = application_capacity - self.managed_application_identity = managed_application_identity - - -class EntityHealth(msrest.serialization.Model): - """Health information common to all entities in the cluster. It contains the aggregated health state, health events and unhealthy evaluation. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - health_events: Optional[List["HealthEvent"]] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - health_statistics: Optional["HealthStatistics"] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - """ - super(EntityHealth, self).__init__(**kwargs) - self.aggregated_health_state = aggregated_health_state - self.health_events = health_events - self.unhealthy_evaluations = unhealthy_evaluations - self.health_statistics = health_statistics - - -class ApplicationHealth(EntityHealth): - """Represents the health of the application. Contains the application aggregated health state and the service and deployed application health states. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar name: The name of the application, including the 'fabric:' URI scheme. - :vartype name: str - :ivar service_health_states: Service health states as found in the health store. - :vartype service_health_states: list[~azure.servicefabric.models.ServiceHealthState] - :ivar deployed_application_health_states: Deployed application health states as found in the - health store. - :vartype deployed_application_health_states: - list[~azure.servicefabric.models.DeployedApplicationHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'service_health_states': {'key': 'ServiceHealthStates', 'type': '[ServiceHealthState]'}, - 'deployed_application_health_states': {'key': 'DeployedApplicationHealthStates', 'type': '[DeployedApplicationHealthState]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - health_events: Optional[List["HealthEvent"]] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - health_statistics: Optional["HealthStatistics"] = None, - name: Optional[str] = None, - service_health_states: Optional[List["ServiceHealthState"]] = None, - deployed_application_health_states: Optional[List["DeployedApplicationHealthState"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword name: The name of the application, including the 'fabric:' URI scheme. - :paramtype name: str - :keyword service_health_states: Service health states as found in the health store. - :paramtype service_health_states: list[~azure.servicefabric.models.ServiceHealthState] - :keyword deployed_application_health_states: Deployed application health states as found in the - health store. - :paramtype deployed_application_health_states: - list[~azure.servicefabric.models.DeployedApplicationHealthState] - """ - super(ApplicationHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.name = name - self.service_health_states = service_health_states - self.deployed_application_health_states = deployed_application_health_states - - -class HealthEvaluation(msrest.serialization.Model): - """Represents a health evaluation which describes the data and the algorithm used by health manager to evaluate the health of an entity. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationHealthEvaluation, ApplicationTypeApplicationsHealthEvaluation, ApplicationsHealthEvaluation, DeltaNodesCheckHealthEvaluation, DeployedApplicationHealthEvaluation, DeployedApplicationsHealthEvaluation, DeployedServicePackageHealthEvaluation, DeployedServicePackagesHealthEvaluation, EventHealthEvaluation, NodeHealthEvaluation, NodeTypeNodesHealthEvaluation, NodesHealthEvaluation, PartitionHealthEvaluation, PartitionsHealthEvaluation, ReplicaHealthEvaluation, ReplicasHealthEvaluation, ServiceHealthEvaluation, ServicesHealthEvaluation, SystemApplicationHealthEvaluation, UpgradeDomainDeltaNodesCheckHealthEvaluation, UpgradeDomainDeployedApplicationsHealthEvaluation, UpgradeDomainNodesHealthEvaluation. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Application': 'ApplicationHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'NodeTypeNodes': 'NodeTypeNodesHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainDeployedApplications': 'UpgradeDomainDeployedApplicationsHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation'} - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - """ - super(HealthEvaluation, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.aggregated_health_state = aggregated_health_state - self.description = description - - -class ApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for an application, containing information about the data and the algorithm used by the health store to evaluate health. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated - health state of the application. The types of the unhealthy evaluations can be - DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - application_name: Optional[str] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current - aggregated health state of the application. The types of the unhealthy evaluations can be - DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(ApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'Application' # type: str - self.application_name = application_name - self.unhealthy_evaluations = unhealthy_evaluations - - -class ApplicationHealthPolicies(msrest.serialization.Model): - """Defines the application health policy map used to evaluate the health of an application or one of its children entities. - - :ivar application_health_policy_map: The wrapper that contains the map with application health - policies used to evaluate specific applications in the cluster. - :vartype application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - } - - def __init__( - self, - *, - application_health_policy_map: Optional[List["ApplicationHealthPolicyMapItem"]] = None, - **kwargs - ): - """ - :keyword application_health_policy_map: The wrapper that contains the map with application - health policies used to evaluate specific applications in the cluster. - :paramtype application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - """ - super(ApplicationHealthPolicies, self).__init__(**kwargs) - self.application_health_policy_map = application_health_policy_map - - -class ApplicationHealthPolicy(msrest.serialization.Model): - """Defines a health policy used to evaluate the health of an application or one of its children entities. - - :ivar consider_warning_as_error: Indicates whether warnings are treated with the same severity - as errors. - :vartype consider_warning_as_error: bool - :ivar max_percent_unhealthy_deployed_applications: The maximum allowed percentage of unhealthy - deployed applications. Allowed values are Byte values from zero to 100. - The percentage represents the maximum tolerated percentage of deployed applications that can - be unhealthy before the application is considered in error. - This is calculated by dividing the number of unhealthy deployed applications over the number - of nodes where the application is currently deployed on in the cluster. - The computation rounds up to tolerate one failure on small numbers of nodes. Default - percentage is zero. - :vartype max_percent_unhealthy_deployed_applications: int - :ivar default_service_type_health_policy: The health policy used by default to evaluate the - health of a service type. - :vartype default_service_type_health_policy: - ~azure.servicefabric.models.ServiceTypeHealthPolicy - :ivar service_type_health_policy_map: The map with service type health policy per service type - name. The map is empty by default. - :vartype service_type_health_policy_map: - list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem] - """ - - _attribute_map = { - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'default_service_type_health_policy': {'key': 'DefaultServiceTypeHealthPolicy', 'type': 'ServiceTypeHealthPolicy'}, - 'service_type_health_policy_map': {'key': 'ServiceTypeHealthPolicyMap', 'type': '[ServiceTypeHealthPolicyMapItem]'}, - } - - def __init__( - self, - *, - consider_warning_as_error: Optional[bool] = False, - max_percent_unhealthy_deployed_applications: Optional[int] = 0, - default_service_type_health_policy: Optional["ServiceTypeHealthPolicy"] = None, - service_type_health_policy_map: Optional[List["ServiceTypeHealthPolicyMapItem"]] = None, - **kwargs - ): - """ - :keyword consider_warning_as_error: Indicates whether warnings are treated with the same - severity as errors. - :paramtype consider_warning_as_error: bool - :keyword max_percent_unhealthy_deployed_applications: The maximum allowed percentage of - unhealthy deployed applications. Allowed values are Byte values from zero to 100. - The percentage represents the maximum tolerated percentage of deployed applications that can - be unhealthy before the application is considered in error. - This is calculated by dividing the number of unhealthy deployed applications over the number - of nodes where the application is currently deployed on in the cluster. - The computation rounds up to tolerate one failure on small numbers of nodes. Default - percentage is zero. - :paramtype max_percent_unhealthy_deployed_applications: int - :keyword default_service_type_health_policy: The health policy used by default to evaluate the - health of a service type. - :paramtype default_service_type_health_policy: - ~azure.servicefabric.models.ServiceTypeHealthPolicy - :keyword service_type_health_policy_map: The map with service type health policy per service - type name. The map is empty by default. - :paramtype service_type_health_policy_map: - list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem] - """ - super(ApplicationHealthPolicy, self).__init__(**kwargs) - self.consider_warning_as_error = consider_warning_as_error - self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications - self.default_service_type_health_policy = default_service_type_health_policy - self.service_type_health_policy_map = service_type_health_policy_map - - -class ApplicationHealthPolicyMapItem(msrest.serialization.Model): - """Defines an item in ApplicationHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :ivar key: Required. The key of the application health policy map item. This is the name of the - application. - :vartype key: str - :ivar value: Required. The value of the application health policy map item. This is the - ApplicationHealthPolicy for this application. - :vartype value: ~azure.servicefabric.models.ApplicationHealthPolicy - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ApplicationHealthPolicy'}, - } - - def __init__( - self, - *, - key: str, - value: "ApplicationHealthPolicy", - **kwargs - ): - """ - :keyword key: Required. The key of the application health policy map item. This is the name of - the application. - :paramtype key: str - :keyword value: Required. The value of the application health policy map item. This is the - ApplicationHealthPolicy for this application. - :paramtype value: ~azure.servicefabric.models.ApplicationHealthPolicy - """ - super(ApplicationHealthPolicyMapItem, self).__init__(**kwargs) - self.key = key - self.value = value - - -class ApplicationHealthPolicyMapObject(msrest.serialization.Model): - """Represents the map of application health policies for a ServiceFabric cluster upgrade. - - :ivar application_health_policy_map: Defines a map that contains specific application health - policies for different applications. - Each entry specifies as key the application name and as value an ApplicationHealthPolicy used - to evaluate the application health. - If an application is not specified in the map, the application health evaluation uses the - ApplicationHealthPolicy found in its application manifest or the default application health - policy (if no health policy is defined in the manifest). - The map is empty by default. - :vartype application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - } - - def __init__( - self, - *, - application_health_policy_map: Optional[List["ApplicationHealthPolicyMapItem"]] = None, - **kwargs - ): - """ - :keyword application_health_policy_map: Defines a map that contains specific application health - policies for different applications. - Each entry specifies as key the application name and as value an ApplicationHealthPolicy used - to evaluate the application health. - If an application is not specified in the map, the application health evaluation uses the - ApplicationHealthPolicy found in its application manifest or the default application health - policy (if no health policy is defined in the manifest). - The map is empty by default. - :paramtype application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - """ - super(ApplicationHealthPolicyMapObject, self).__init__(**kwargs) - self.application_health_policy_map = application_health_policy_map - - -class ApplicationHealthReportExpiredEvent(ApplicationEvent): - """Application Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_instance_id: Required. Id of Application instance. - :vartype application_instance_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - application_id: str, - application_instance_id: int, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_instance_id: Required. Id of Application instance. - :paramtype application_instance_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(ApplicationHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.kind = 'ApplicationHealthReportExpired' # type: str - self.application_instance_id = application_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class EntityHealthState(msrest.serialization.Model): - """A base type for the health state of various entities in the cluster. It contains the aggregated health state. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - """ - super(EntityHealthState, self).__init__(**kwargs) - self.aggregated_health_state = aggregated_health_state - - -class ApplicationHealthState(EntityHealthState): - """Represents the health state of an application, which contains the application identifier and the aggregated health state. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar name: The name of the application, including the 'fabric:' URI scheme. - :vartype name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - name: Optional[str] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword name: The name of the application, including the 'fabric:' URI scheme. - :paramtype name: str - """ - super(ApplicationHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.name = name - - -class EntityHealthStateChunk(msrest.serialization.Model): - """A base type for the health state chunk of various entities in the cluster. It contains the aggregated health state. - - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - } - - def __init__( - self, - *, - health_state: Optional[Union[str, "HealthState"]] = None, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - """ - super(EntityHealthStateChunk, self).__init__(**kwargs) - self.health_state = health_state - - -class ApplicationHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a application. -The application health state chunk contains the application name, its aggregated health state and any children services and deployed applications that respect the filters in cluster health chunk query description. - - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar application_type_name: The application type name as defined in the application manifest. - :vartype application_type_name: str - :ivar service_health_state_chunks: The list of service health state chunks in the cluster that - respect the filters in the cluster health chunk query description. - :vartype service_health_state_chunks: ~azure.servicefabric.models.ServiceHealthStateChunkList - :ivar deployed_application_health_state_chunks: The list of deployed application health state - chunks in the cluster that respect the filters in the cluster health chunk query description. - :vartype deployed_application_health_state_chunks: - ~azure.servicefabric.models.DeployedApplicationHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_health_state_chunks': {'key': 'ServiceHealthStateChunks', 'type': 'ServiceHealthStateChunkList'}, - 'deployed_application_health_state_chunks': {'key': 'DeployedApplicationHealthStateChunks', 'type': 'DeployedApplicationHealthStateChunkList'}, - } - - def __init__( - self, - *, - health_state: Optional[Union[str, "HealthState"]] = None, - application_name: Optional[str] = None, - application_type_name: Optional[str] = None, - service_health_state_chunks: Optional["ServiceHealthStateChunkList"] = None, - deployed_application_health_state_chunks: Optional["DeployedApplicationHealthStateChunkList"] = None, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword application_type_name: The application type name as defined in the application - manifest. - :paramtype application_type_name: str - :keyword service_health_state_chunks: The list of service health state chunks in the cluster - that respect the filters in the cluster health chunk query description. - :paramtype service_health_state_chunks: ~azure.servicefabric.models.ServiceHealthStateChunkList - :keyword deployed_application_health_state_chunks: The list of deployed application health - state chunks in the cluster that respect the filters in the cluster health chunk query - description. - :paramtype deployed_application_health_state_chunks: - ~azure.servicefabric.models.DeployedApplicationHealthStateChunkList - """ - super(ApplicationHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.application_name = application_name - self.application_type_name = application_type_name - self.service_health_state_chunks = service_health_state_chunks - self.deployed_application_health_state_chunks = deployed_application_health_state_chunks - - -class EntityHealthStateChunkList(msrest.serialization.Model): - """A base type for the list of health state chunks found in the cluster. It contains the total number of health states that match the input filters. - - :ivar total_count: Total number of entity health state objects that match the specified filters - from the cluster health chunk query description. - :vartype total_count: long - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - } - - def __init__( - self, - *, - total_count: Optional[int] = None, - **kwargs - ): - """ - :keyword total_count: Total number of entity health state objects that match the specified - filters from the cluster health chunk query description. - :paramtype total_count: long - """ - super(EntityHealthStateChunkList, self).__init__(**kwargs) - self.total_count = total_count - - -class ApplicationHealthStateChunkList(EntityHealthStateChunkList): - """The list of application health state chunks in the cluster that respect the input filters in the chunk query. Returned by get cluster health state chunks query. - - :ivar total_count: Total number of entity health state objects that match the specified filters - from the cluster health chunk query description. - :vartype total_count: long - :ivar items: The list of application health state chunks that respect the input filters in the - chunk query. - :vartype items: list[~azure.servicefabric.models.ApplicationHealthStateChunk] - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'items': {'key': 'Items', 'type': '[ApplicationHealthStateChunk]'}, - } - - def __init__( - self, - *, - total_count: Optional[int] = None, - items: Optional[List["ApplicationHealthStateChunk"]] = None, - **kwargs - ): - """ - :keyword total_count: Total number of entity health state objects that match the specified - filters from the cluster health chunk query description. - :paramtype total_count: long - :keyword items: The list of application health state chunks that respect the input filters in - the chunk query. - :paramtype items: list[~azure.servicefabric.models.ApplicationHealthStateChunk] - """ - super(ApplicationHealthStateChunkList, self).__init__(total_count=total_count, **kwargs) - self.items = items - - -class ApplicationHealthStateFilter(msrest.serialization.Model): - """Defines matching criteria to determine whether a application should be included in the cluster health chunk. -One filter can match zero, one or multiple applications, depending on its properties. - - :ivar application_name_filter: The name of the application that matches the filter, as a fabric - uri. The filter is applied only to the specified application, if it exists. - If the application doesn't exist, no application is returned in the cluster health chunk based - on this filter. - If the application exists, it is included in the cluster health chunk if it respects the other - filter properties. - If not specified, all applications are matched against the other filter members, like health - state filter. - :vartype application_name_filter: str - :ivar application_type_name_filter: The name of the application type that matches the filter. - If specified, the filter is applied only to applications of the selected application type, if - any exists. - If no applications of the specified application type exists, no application is returned in the - cluster health chunk based on this filter. - Each application of the specified application type is included in the cluster health chunk if - it respects the other filter properties. - If not specified, all applications are matched against the other filter members, like health - state filter. - :vartype application_type_name_filter: str - :ivar health_state_filter: The filter for the health state of the applications. It allows - selecting applications if they match the desired health states. - The possible values are integer value of one of the following health states. Only applications - that match the filter are returned. All applications are used to evaluate the cluster - aggregated health state. - If not specified, default value is None, unless the application name or the application type - name are specified. If the filter has default value and application name is specified, the - matching application is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches applications with HealthState value of OK - (2) and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :vartype health_state_filter: int - :ivar service_filters: Defines a list of filters that specify which services to be included in - the returned cluster health chunk as children of the application. The services are returned - only if the parent application matches a filter. - If the list is empty, no services are returned. All the services are used to evaluate the - parent application aggregated health state, regardless of the input filters. - The application filter may specify multiple service filters. - For example, it can specify a filter to return all services with health state Error and - another filter to always include a service identified by its service name. - :vartype service_filters: list[~azure.servicefabric.models.ServiceHealthStateFilter] - :ivar deployed_application_filters: Defines a list of filters that specify which deployed - applications to be included in the returned cluster health chunk as children of the - application. The deployed applications are returned only if the parent application matches a - filter. - If the list is empty, no deployed applications are returned. All the deployed applications are - used to evaluate the parent application aggregated health state, regardless of the input - filters. - The application filter may specify multiple deployed application filters. - For example, it can specify a filter to return all deployed applications with health state - Error and another filter to always include a deployed application on a specified node. - :vartype deployed_application_filters: - list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter] - """ - - _attribute_map = { - 'application_name_filter': {'key': 'ApplicationNameFilter', 'type': 'str'}, - 'application_type_name_filter': {'key': 'ApplicationTypeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'service_filters': {'key': 'ServiceFilters', 'type': '[ServiceHealthStateFilter]'}, - 'deployed_application_filters': {'key': 'DeployedApplicationFilters', 'type': '[DeployedApplicationHealthStateFilter]'}, - } - - def __init__( - self, - *, - application_name_filter: Optional[str] = None, - application_type_name_filter: Optional[str] = None, - health_state_filter: Optional[int] = 0, - service_filters: Optional[List["ServiceHealthStateFilter"]] = None, - deployed_application_filters: Optional[List["DeployedApplicationHealthStateFilter"]] = None, - **kwargs - ): - """ - :keyword application_name_filter: The name of the application that matches the filter, as a - fabric uri. The filter is applied only to the specified application, if it exists. - If the application doesn't exist, no application is returned in the cluster health chunk based - on this filter. - If the application exists, it is included in the cluster health chunk if it respects the other - filter properties. - If not specified, all applications are matched against the other filter members, like health - state filter. - :paramtype application_name_filter: str - :keyword application_type_name_filter: The name of the application type that matches the - filter. - If specified, the filter is applied only to applications of the selected application type, if - any exists. - If no applications of the specified application type exists, no application is returned in the - cluster health chunk based on this filter. - Each application of the specified application type is included in the cluster health chunk if - it respects the other filter properties. - If not specified, all applications are matched against the other filter members, like health - state filter. - :paramtype application_type_name_filter: str - :keyword health_state_filter: The filter for the health state of the applications. It allows - selecting applications if they match the desired health states. - The possible values are integer value of one of the following health states. Only applications - that match the filter are returned. All applications are used to evaluate the cluster - aggregated health state. - If not specified, default value is None, unless the application name or the application type - name are specified. If the filter has default value and application name is specified, the - matching application is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches applications with HealthState value of OK - (2) and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :paramtype health_state_filter: int - :keyword service_filters: Defines a list of filters that specify which services to be included - in the returned cluster health chunk as children of the application. The services are returned - only if the parent application matches a filter. - If the list is empty, no services are returned. All the services are used to evaluate the - parent application aggregated health state, regardless of the input filters. - The application filter may specify multiple service filters. - For example, it can specify a filter to return all services with health state Error and - another filter to always include a service identified by its service name. - :paramtype service_filters: list[~azure.servicefabric.models.ServiceHealthStateFilter] - :keyword deployed_application_filters: Defines a list of filters that specify which deployed - applications to be included in the returned cluster health chunk as children of the - application. The deployed applications are returned only if the parent application matches a - filter. - If the list is empty, no deployed applications are returned. All the deployed applications are - used to evaluate the parent application aggregated health state, regardless of the input - filters. - The application filter may specify multiple deployed application filters. - For example, it can specify a filter to return all deployed applications with health state - Error and another filter to always include a deployed application on a specified node. - :paramtype deployed_application_filters: - list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter] - """ - super(ApplicationHealthStateFilter, self).__init__(**kwargs) - self.application_name_filter = application_name_filter - self.application_type_name_filter = application_type_name_filter - self.health_state_filter = health_state_filter - self.service_filters = service_filters - self.deployed_application_filters = deployed_application_filters - - -class ApplicationInfo(msrest.serialization.Model): - """Information about a Service Fabric application. - - :ivar id: The identity of the application. This is an encoded representation of the application - name. This is used in the REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype id: str - :ivar name: The name of the application, including the 'fabric:' URI scheme. - :vartype name: str - :ivar type_name: The application type name as defined in the application manifest. - :vartype type_name: str - :ivar type_version: The version of the application type as defined in the application manifest. - :vartype type_version: str - :ivar status: The status of the application. Possible values include: "Invalid", "Ready", - "Upgrading", "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ApplicationStatus - :ivar parameters: List of application parameters with overridden values from their default - values specified in the application manifest. - :vartype parameters: list[~azure.servicefabric.models.ApplicationParameter] - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar application_definition_kind: The mechanism used to define a Service Fabric application. - Possible values include: "Invalid", "ServiceFabricApplicationDescription", "Compose". - :vartype application_definition_kind: str or - ~azure.servicefabric.models.ApplicationDefinitionKind - :ivar managed_application_identity: Managed application identity description. - :vartype managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - :ivar application_metadata: Metadata associated with a specific application. - :vartype application_metadata: ~azure.servicefabric.models.ApplicationMetadata - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - 'application_metadata': {'key': 'ApplicationMetadata', 'type': 'ApplicationMetadata'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - type_name: Optional[str] = None, - type_version: Optional[str] = None, - status: Optional[Union[str, "ApplicationStatus"]] = None, - parameters: Optional[List["ApplicationParameter"]] = None, - health_state: Optional[Union[str, "HealthState"]] = None, - application_definition_kind: Optional[Union[str, "ApplicationDefinitionKind"]] = None, - managed_application_identity: Optional["ManagedApplicationIdentityDescription"] = None, - application_metadata: Optional["ApplicationMetadata"] = None, - **kwargs - ): - """ - :keyword id: The identity of the application. This is an encoded representation of the - application name. This is used in the REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype id: str - :keyword name: The name of the application, including the 'fabric:' URI scheme. - :paramtype name: str - :keyword type_name: The application type name as defined in the application manifest. - :paramtype type_name: str - :keyword type_version: The version of the application type as defined in the application - manifest. - :paramtype type_version: str - :keyword status: The status of the application. Possible values include: "Invalid", "Ready", - "Upgrading", "Creating", "Deleting", "Failed". - :paramtype status: str or ~azure.servicefabric.models.ApplicationStatus - :keyword parameters: List of application parameters with overridden values from their default - values specified in the application manifest. - :paramtype parameters: list[~azure.servicefabric.models.ApplicationParameter] - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword application_definition_kind: The mechanism used to define a Service Fabric - application. Possible values include: "Invalid", "ServiceFabricApplicationDescription", - "Compose". - :paramtype application_definition_kind: str or - ~azure.servicefabric.models.ApplicationDefinitionKind - :keyword managed_application_identity: Managed application identity description. - :paramtype managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - :keyword application_metadata: Metadata associated with a specific application. - :paramtype application_metadata: ~azure.servicefabric.models.ApplicationMetadata - """ - super(ApplicationInfo, self).__init__(**kwargs) - self.id = id - self.name = name - self.type_name = type_name - self.type_version = type_version - self.status = status - self.parameters = parameters - self.health_state = health_state - self.application_definition_kind = application_definition_kind - self.managed_application_identity = managed_application_identity - self.application_metadata = application_metadata - - -class ApplicationLoadInfo(msrest.serialization.Model): - """Load Information about a Service Fabric application. - - :ivar id: The identity of the application. This is an encoded representation of the application - name. This is used in the REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype id: str - :ivar minimum_nodes: The minimum number of nodes for this application. - It is the number of nodes where Service Fabric will reserve Capacity in the cluster which - equals to ReservedLoad * MinimumNodes for this Application instance. - For applications that do not have application capacity defined this value will be zero. - :vartype minimum_nodes: long - :ivar maximum_nodes: The maximum number of nodes where this application can be instantiated. - It is the number of nodes this application is allowed to span. - For applications that do not have application capacity defined this value will be zero. - :vartype maximum_nodes: long - :ivar node_count: The number of nodes on which this application is instantiated. - For applications that do not have application capacity defined this value will be zero. - :vartype node_count: long - :ivar application_load_metric_information: List of application load metric information. - :vartype application_load_metric_information: - list[~azure.servicefabric.models.ApplicationLoadMetricInformation] - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'node_count': {'key': 'NodeCount', 'type': 'long'}, - 'application_load_metric_information': {'key': 'ApplicationLoadMetricInformation', 'type': '[ApplicationLoadMetricInformation]'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - minimum_nodes: Optional[int] = None, - maximum_nodes: Optional[int] = None, - node_count: Optional[int] = None, - application_load_metric_information: Optional[List["ApplicationLoadMetricInformation"]] = None, - **kwargs - ): - """ - :keyword id: The identity of the application. This is an encoded representation of the - application name. This is used in the REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype id: str - :keyword minimum_nodes: The minimum number of nodes for this application. - It is the number of nodes where Service Fabric will reserve Capacity in the cluster which - equals to ReservedLoad * MinimumNodes for this Application instance. - For applications that do not have application capacity defined this value will be zero. - :paramtype minimum_nodes: long - :keyword maximum_nodes: The maximum number of nodes where this application can be instantiated. - It is the number of nodes this application is allowed to span. - For applications that do not have application capacity defined this value will be zero. - :paramtype maximum_nodes: long - :keyword node_count: The number of nodes on which this application is instantiated. - For applications that do not have application capacity defined this value will be zero. - :paramtype node_count: long - :keyword application_load_metric_information: List of application load metric information. - :paramtype application_load_metric_information: - list[~azure.servicefabric.models.ApplicationLoadMetricInformation] - """ - super(ApplicationLoadInfo, self).__init__(**kwargs) - self.id = id - self.minimum_nodes = minimum_nodes - self.maximum_nodes = maximum_nodes - self.node_count = node_count - self.application_load_metric_information = application_load_metric_information - - -class ApplicationLoadMetricInformation(msrest.serialization.Model): - """Describes load information for a custom resource balancing metric. This can be used to limit the total consumption of this metric by the services of this application. - - :ivar name: The name of the metric. - :vartype name: str - :ivar reservation_capacity: This is the capacity reserved in the cluster for the application. - It's the product of NodeReservationCapacity and MinimumNodes. - If set to zero, no capacity is reserved for this metric. - When setting application capacity or when updating application capacity this value must be - smaller than or equal to MaximumCapacity for each metric. - :vartype reservation_capacity: long - :ivar application_capacity: Total capacity for this metric in this application instance. - :vartype application_capacity: long - :ivar application_load: Current load for this metric in this application instance. - :vartype application_load: long - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, - 'application_capacity': {'key': 'ApplicationCapacity', 'type': 'long'}, - 'application_load': {'key': 'ApplicationLoad', 'type': 'long'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - reservation_capacity: Optional[int] = None, - application_capacity: Optional[int] = None, - application_load: Optional[int] = None, - **kwargs - ): - """ - :keyword name: The name of the metric. - :paramtype name: str - :keyword reservation_capacity: This is the capacity reserved in the cluster for the - application. - It's the product of NodeReservationCapacity and MinimumNodes. - If set to zero, no capacity is reserved for this metric. - When setting application capacity or when updating application capacity this value must be - smaller than or equal to MaximumCapacity for each metric. - :paramtype reservation_capacity: long - :keyword application_capacity: Total capacity for this metric in this application instance. - :paramtype application_capacity: long - :keyword application_load: Current load for this metric in this application instance. - :paramtype application_load: long - """ - super(ApplicationLoadMetricInformation, self).__init__(**kwargs) - self.name = name - self.reservation_capacity = reservation_capacity - self.application_capacity = application_capacity - self.application_load = application_load - - -class ApplicationMetadata(msrest.serialization.Model): - """Metadata associated with a specific application. - - :ivar arm_metadata: Common ArmMetadata assocaited with Service Fabric Entities. - :vartype arm_metadata: ~azure.servicefabric.models.ArmMetadata - """ - - _attribute_map = { - 'arm_metadata': {'key': 'ArmMetadata', 'type': 'ArmMetadata'}, - } - - def __init__( - self, - *, - arm_metadata: Optional["ArmMetadata"] = None, - **kwargs - ): - """ - :keyword arm_metadata: Common ArmMetadata assocaited with Service Fabric Entities. - :paramtype arm_metadata: ~azure.servicefabric.models.ArmMetadata - """ - super(ApplicationMetadata, self).__init__(**kwargs) - self.arm_metadata = arm_metadata - - -class ApplicationMetricDescription(msrest.serialization.Model): - """Describes capacity information for a custom resource balancing metric. This can be used to limit the total consumption of this metric by the services of this application. - - :ivar name: The name of the metric. - :vartype name: str - :ivar maximum_capacity: The maximum node capacity for Service Fabric application. - This is the maximum Load for an instance of this application on a single node. Even if the - capacity of node is greater than this value, Service Fabric will limit the total load of - services within the application on each node to this value. - If set to zero, capacity for this metric is unlimited on each node. - When creating a new application with application capacity defined, the product of MaximumNodes - and this value must always be smaller than or equal to TotalApplicationCapacity. - When updating existing application with application capacity, the product of MaximumNodes and - this value must always be smaller than or equal to TotalApplicationCapacity. - :vartype maximum_capacity: long - :ivar reservation_capacity: The node reservation capacity for Service Fabric application. - This is the amount of load which is reserved on nodes which have instances of this - application. - If MinimumNodes is specified, then the product of these values will be the capacity reserved - in the cluster for the application. - If set to zero, no capacity is reserved for this metric. - When setting application capacity or when updating application capacity; this value must be - smaller than or equal to MaximumCapacity for each metric. - :vartype reservation_capacity: long - :ivar total_application_capacity: The total metric capacity for Service Fabric application. - This is the total metric capacity for this application in the cluster. Service Fabric will try - to limit the sum of loads of services within the application to this value. - When creating a new application with application capacity defined, the product of MaximumNodes - and MaximumCapacity must always be smaller than or equal to this value. - :vartype total_application_capacity: long - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'maximum_capacity': {'key': 'MaximumCapacity', 'type': 'long'}, - 'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'}, - 'total_application_capacity': {'key': 'TotalApplicationCapacity', 'type': 'long'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - maximum_capacity: Optional[int] = None, - reservation_capacity: Optional[int] = None, - total_application_capacity: Optional[int] = None, - **kwargs - ): - """ - :keyword name: The name of the metric. - :paramtype name: str - :keyword maximum_capacity: The maximum node capacity for Service Fabric application. - This is the maximum Load for an instance of this application on a single node. Even if the - capacity of node is greater than this value, Service Fabric will limit the total load of - services within the application on each node to this value. - If set to zero, capacity for this metric is unlimited on each node. - When creating a new application with application capacity defined, the product of MaximumNodes - and this value must always be smaller than or equal to TotalApplicationCapacity. - When updating existing application with application capacity, the product of MaximumNodes and - this value must always be smaller than or equal to TotalApplicationCapacity. - :paramtype maximum_capacity: long - :keyword reservation_capacity: The node reservation capacity for Service Fabric application. - This is the amount of load which is reserved on nodes which have instances of this - application. - If MinimumNodes is specified, then the product of these values will be the capacity reserved - in the cluster for the application. - If set to zero, no capacity is reserved for this metric. - When setting application capacity or when updating application capacity; this value must be - smaller than or equal to MaximumCapacity for each metric. - :paramtype reservation_capacity: long - :keyword total_application_capacity: The total metric capacity for Service Fabric application. - This is the total metric capacity for this application in the cluster. Service Fabric will try - to limit the sum of loads of services within the application to this value. - When creating a new application with application capacity defined, the product of MaximumNodes - and MaximumCapacity must always be smaller than or equal to this value. - :paramtype total_application_capacity: long - """ - super(ApplicationMetricDescription, self).__init__(**kwargs) - self.name = name - self.maximum_capacity = maximum_capacity - self.reservation_capacity = reservation_capacity - self.total_application_capacity = total_application_capacity - - -class ApplicationNameInfo(msrest.serialization.Model): - """Information about the application name. - - :ivar id: The identity of the application. This is an encoded representation of the application - name. This is used in the REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype id: str - :ivar name: The name of the application, including the 'fabric:' URI scheme. - :vartype name: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - **kwargs - ): - """ - :keyword id: The identity of the application. This is an encoded representation of the - application name. This is used in the REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype id: str - :keyword name: The name of the application, including the 'fabric:' URI scheme. - :paramtype name: str - """ - super(ApplicationNameInfo, self).__init__(**kwargs) - self.id = id - self.name = name - - -class ApplicationNewHealthReportEvent(ApplicationEvent): - """Application Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_instance_id: Required. Id of Application instance. - :vartype application_instance_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - application_id: str, - application_instance_id: int, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_instance_id: Required. Id of Application instance. - :paramtype application_instance_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(ApplicationNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.kind = 'ApplicationNewHealthReport' # type: str - self.application_instance_id = application_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class ApplicationParameter(msrest.serialization.Model): - """Describes an application parameter override to be applied when creating or upgrading an application. - - All required parameters must be populated in order to send to Azure. - - :ivar key: Required. The name of the parameter. - :vartype key: str - :ivar value: Required. The value of the parameter. - :vartype value: str - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - } - - def __init__( - self, - *, - key: str, - value: str, - **kwargs - ): - """ - :keyword key: Required. The name of the parameter. - :paramtype key: str - :keyword value: Required. The value of the parameter. - :paramtype value: str - """ - super(ApplicationParameter, self).__init__(**kwargs) - self.key = key - self.value = value - - -class ApplicationProcessExitedEvent(ApplicationEvent): - """Process Exited event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar service_name: Required. Name of Service. - :vartype service_name: str - :ivar service_package_name: Required. Name of Service package. - :vartype service_package_name: str - :ivar service_package_activation_id: Required. Activation Id of Service package. - :vartype service_package_activation_id: str - :ivar is_exclusive: Required. Indicates IsExclusive flag. - :vartype is_exclusive: bool - :ivar code_package_name: Required. Name of Code package. - :vartype code_package_name: str - :ivar entry_point_type: Required. Type of EntryPoint. - :vartype entry_point_type: str - :ivar exe_name: Required. Name of executable. - :vartype exe_name: str - :ivar process_id: Required. Process Id. - :vartype process_id: long - :ivar host_id: Required. Host Id. - :vartype host_id: str - :ivar exit_code: Required. Exit code of process. - :vartype exit_code: long - :ivar unexpected_termination: Required. Indicates if termination is unexpected. - :vartype unexpected_termination: bool - :ivar start_time: Required. Start time of process. - :vartype start_time: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'service_name': {'required': True}, - 'service_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'is_exclusive': {'required': True}, - 'code_package_name': {'required': True}, - 'entry_point_type': {'required': True}, - 'exe_name': {'required': True}, - 'process_id': {'required': True}, - 'host_id': {'required': True}, - 'exit_code': {'required': True}, - 'unexpected_termination': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_package_name': {'key': 'ServicePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'entry_point_type': {'key': 'EntryPointType', 'type': 'str'}, - 'exe_name': {'key': 'ExeName', 'type': 'str'}, - 'process_id': {'key': 'ProcessId', 'type': 'long'}, - 'host_id': {'key': 'HostId', 'type': 'str'}, - 'exit_code': {'key': 'ExitCode', 'type': 'long'}, - 'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - application_id: str, - service_name: str, - service_package_name: str, - service_package_activation_id: str, - is_exclusive: bool, - code_package_name: str, - entry_point_type: str, - exe_name: str, - process_id: int, - host_id: str, - exit_code: int, - unexpected_termination: bool, - start_time: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword service_name: Required. Name of Service. - :paramtype service_name: str - :keyword service_package_name: Required. Name of Service package. - :paramtype service_package_name: str - :keyword service_package_activation_id: Required. Activation Id of Service package. - :paramtype service_package_activation_id: str - :keyword is_exclusive: Required. Indicates IsExclusive flag. - :paramtype is_exclusive: bool - :keyword code_package_name: Required. Name of Code package. - :paramtype code_package_name: str - :keyword entry_point_type: Required. Type of EntryPoint. - :paramtype entry_point_type: str - :keyword exe_name: Required. Name of executable. - :paramtype exe_name: str - :keyword process_id: Required. Process Id. - :paramtype process_id: long - :keyword host_id: Required. Host Id. - :paramtype host_id: str - :keyword exit_code: Required. Exit code of process. - :paramtype exit_code: long - :keyword unexpected_termination: Required. Indicates if termination is unexpected. - :paramtype unexpected_termination: bool - :keyword start_time: Required. Start time of process. - :paramtype start_time: ~datetime.datetime - """ - super(ApplicationProcessExitedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.kind = 'ApplicationProcessExited' # type: str - self.service_name = service_name - self.service_package_name = service_package_name - self.service_package_activation_id = service_package_activation_id - self.is_exclusive = is_exclusive - self.code_package_name = code_package_name - self.entry_point_type = entry_point_type - self.exe_name = exe_name - self.process_id = process_id - self.host_id = host_id - self.exit_code = exit_code - self.unexpected_termination = unexpected_termination - self.start_time = start_time - - -class ApplicationResourceDescription(msrest.serialization.Model): - """This type describes a application resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of the Application resource. - :vartype name: str - :ivar identity: Describes the identity of the application. - :vartype identity: ~azure.servicefabric.models.IdentityDescription - :ivar description: User readable description of the application. - :vartype description: str - :ivar services: Describes the services in the application. This property is used to create or - modify services of the application. On get only the name of the service is returned. The - service description can be obtained by querying for the service resource. - :vartype services: list[~azure.servicefabric.models.ServiceResourceDescription] - :ivar diagnostics: Describes the diagnostics definition and usage for an application resource. - :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsDescription - :ivar debug_params: Internal - used by Visual Studio to setup the debugging session on the - local development environment. - :vartype debug_params: str - :ivar service_names: Names of the services in the application. - :vartype service_names: list[str] - :ivar status: Status of the application. Possible values include: "Unknown", "Ready", - "Upgrading", "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the application. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. Possible values - include: "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the application's health state is not 'Ok', this additional - details from service fabric Health Manager for the user to know why the application is marked - unhealthy. - :vartype unhealthy_evaluation: str - """ - - _validation = { - 'name': {'required': True}, - 'service_names': {'readonly': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'IdentityDescription'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'}, - 'debug_params': {'key': 'properties.debugParams', 'type': 'str'}, - 'service_names': {'key': 'properties.serviceNames', 'type': '[str]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - } - - def __init__( - self, - *, - name: str, - identity: Optional["IdentityDescription"] = None, - description: Optional[str] = None, - services: Optional[List["ServiceResourceDescription"]] = None, - diagnostics: Optional["DiagnosticsDescription"] = None, - debug_params: Optional[str] = None, - **kwargs - ): - """ - :keyword name: Required. Name of the Application resource. - :paramtype name: str - :keyword identity: Describes the identity of the application. - :paramtype identity: ~azure.servicefabric.models.IdentityDescription - :keyword description: User readable description of the application. - :paramtype description: str - :keyword services: Describes the services in the application. This property is used to create - or modify services of the application. On get only the name of the service is returned. The - service description can be obtained by querying for the service resource. - :paramtype services: list[~azure.servicefabric.models.ServiceResourceDescription] - :keyword diagnostics: Describes the diagnostics definition and usage for an application - resource. - :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsDescription - :keyword debug_params: Internal - used by Visual Studio to setup the debugging session on the - local development environment. - :paramtype debug_params: str - """ - super(ApplicationResourceDescription, self).__init__(**kwargs) - self.name = name - self.identity = identity - self.description = description - self.services = services - self.diagnostics = diagnostics - self.debug_params = debug_params - self.service_names = None - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - - -class ApplicationResourceUpgradeProgressInfo(msrest.serialization.Model): - """This type describes an application resource upgrade. - - :ivar name: Name of the Application resource. - :vartype name: str - :ivar target_application_type_version: The target application version for the application - upgrade. - :vartype target_application_type_version: str - :ivar start_timestamp_utc: The estimated UTC datetime when the upgrade started. - :vartype start_timestamp_utc: str - :ivar upgrade_state: The state of the application resource upgrade. Possible values include: - "Invalid", "ProvisioningTarget", "RollingForward", "UnprovisioningCurrent", - "CompletedRollforward", "RollingBack", "UnprovisioningTarget", "CompletedRollback", "Failed". - :vartype upgrade_state: str or ~azure.servicefabric.models.ApplicationResourceUpgradeState - :ivar percent_completed: The estimated percent of replicas are completed in the upgrade. - :vartype percent_completed: str - :ivar service_upgrade_progress: List of service upgrade progresses. - :vartype service_upgrade_progress: list[~azure.servicefabric.models.ServiceUpgradeProgress] - :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: - "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored". Default value: "Monitored". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.RollingUpgradeMode - :ivar upgrade_duration: The estimated amount of time that the overall upgrade elapsed. It is - first interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :vartype upgrade_duration: str - :ivar application_upgrade_status_details: Additional detailed information about the status of - the pending upgrade. - :vartype application_upgrade_status_details: str - :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :vartype upgrade_replica_set_check_timeout_in_seconds: long - :ivar failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and - FailureAction was executed. - :vartype failure_timestamp_utc: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'percent_completed': {'key': 'PercentCompleted', 'type': 'str'}, - 'service_upgrade_progress': {'key': 'ServiceUpgradeProgress', 'type': '[ServiceUpgradeProgress]'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - target_application_type_version: Optional[str] = None, - start_timestamp_utc: Optional[str] = None, - upgrade_state: Optional[Union[str, "ApplicationResourceUpgradeState"]] = None, - percent_completed: Optional[str] = None, - service_upgrade_progress: Optional[List["ServiceUpgradeProgress"]] = None, - rolling_upgrade_mode: Optional[Union[str, "RollingUpgradeMode"]] = "Monitored", - upgrade_duration: Optional[str] = "PT0H2M0S", - application_upgrade_status_details: Optional[str] = None, - upgrade_replica_set_check_timeout_in_seconds: Optional[int] = 42949672925, - failure_timestamp_utc: Optional[str] = None, - **kwargs - ): - """ - :keyword name: Name of the Application resource. - :paramtype name: str - :keyword target_application_type_version: The target application version for the application - upgrade. - :paramtype target_application_type_version: str - :keyword start_timestamp_utc: The estimated UTC datetime when the upgrade started. - :paramtype start_timestamp_utc: str - :keyword upgrade_state: The state of the application resource upgrade. Possible values include: - "Invalid", "ProvisioningTarget", "RollingForward", "UnprovisioningCurrent", - "CompletedRollforward", "RollingBack", "UnprovisioningTarget", "CompletedRollback", "Failed". - :paramtype upgrade_state: str or ~azure.servicefabric.models.ApplicationResourceUpgradeState - :keyword percent_completed: The estimated percent of replicas are completed in the upgrade. - :paramtype percent_completed: str - :keyword service_upgrade_progress: List of service upgrade progresses. - :paramtype service_upgrade_progress: list[~azure.servicefabric.models.ServiceUpgradeProgress] - :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: - "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored". Default value: "Monitored". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.RollingUpgradeMode - :keyword upgrade_duration: The estimated amount of time that the overall upgrade elapsed. It is - first interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :paramtype upgrade_duration: str - :keyword application_upgrade_status_details: Additional detailed information about the status - of the pending upgrade. - :paramtype application_upgrade_status_details: str - :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :paramtype upgrade_replica_set_check_timeout_in_seconds: long - :keyword failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and - FailureAction was executed. - :paramtype failure_timestamp_utc: str - """ - super(ApplicationResourceUpgradeProgressInfo, self).__init__(**kwargs) - self.name = name - self.target_application_type_version = target_application_type_version - self.start_timestamp_utc = start_timestamp_utc - self.upgrade_state = upgrade_state - self.percent_completed = percent_completed - self.service_upgrade_progress = service_upgrade_progress - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_duration = upgrade_duration - self.application_upgrade_status_details = application_upgrade_status_details - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.failure_timestamp_utc = failure_timestamp_utc - - -class VolumeReference(msrest.serialization.Model): - """Describes a reference to a volume resource. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of the volume being referenced. - :vartype name: str - :ivar read_only: The flag indicating whether the volume is read only. Default is 'false'. - :vartype read_only: bool - :ivar destination_path: Required. The path within the container at which the volume should be - mounted. Only valid path characters are allowed. - :vartype 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: Optional[bool] = None, - **kwargs - ): - """ - :keyword name: Required. Name of the volume being referenced. - :paramtype name: str - :keyword read_only: The flag indicating whether the volume is read only. Default is 'false'. - :paramtype read_only: bool - :keyword destination_path: Required. The path within the container at which the volume should - be mounted. Only valid path characters are allowed. - :paramtype destination_path: str - """ - super(VolumeReference, self).__init__(**kwargs) - self.name = name - self.read_only = read_only - self.destination_path = destination_path - - -class ApplicationScopedVolume(VolumeReference): - """Describes a volume whose lifetime is scoped to the application's lifetime. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of the volume being referenced. - :vartype name: str - :ivar read_only: The flag indicating whether the volume is read only. Default is 'false'. - :vartype read_only: bool - :ivar destination_path: Required. The path within the container at which the volume should be - mounted. Only valid path characters are allowed. - :vartype destination_path: str - :ivar creation_parameters: Required. Describes parameters for creating application-scoped - volumes. - :vartype creation_parameters: - ~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters - """ - - _validation = { - 'name': {'required': True}, - 'destination_path': {'required': True}, - 'creation_parameters': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'destination_path': {'key': 'destinationPath', 'type': 'str'}, - 'creation_parameters': {'key': 'creationParameters', 'type': 'ApplicationScopedVolumeCreationParameters'}, - } - - def __init__( - self, - *, - name: str, - destination_path: str, - creation_parameters: "ApplicationScopedVolumeCreationParameters", - read_only: Optional[bool] = None, - **kwargs - ): - """ - :keyword name: Required. Name of the volume being referenced. - :paramtype name: str - :keyword read_only: The flag indicating whether the volume is read only. Default is 'false'. - :paramtype read_only: bool - :keyword destination_path: Required. The path within the container at which the volume should - be mounted. Only valid path characters are allowed. - :paramtype destination_path: str - :keyword creation_parameters: Required. Describes parameters for creating application-scoped - volumes. - :paramtype creation_parameters: - ~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters - """ - super(ApplicationScopedVolume, self).__init__(name=name, read_only=read_only, destination_path=destination_path, **kwargs) - self.creation_parameters = creation_parameters - - -class ApplicationScopedVolumeCreationParameters(msrest.serialization.Model): - """Describes parameters for creating application-scoped volumes. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Specifies the application-scoped volume kind.Constant filled by server. - Possible values include: "ServiceFabricVolumeDisk". - :vartype kind: str or ~azure.servicefabric.models.ApplicationScopedVolumeKind - :ivar description: User readable description of the volume. - :vartype description: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ServiceFabricVolumeDisk': 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk'} - } - - def __init__( - self, - *, - description: Optional[str] = None, - **kwargs - ): - """ - :keyword description: User readable description of the volume. - :paramtype description: str - """ - super(ApplicationScopedVolumeCreationParameters, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.description = description - - -class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk(ApplicationScopedVolumeCreationParameters): - """Describes parameters for creating application-scoped volumes provided by Service Fabric Volume Disks. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Specifies the application-scoped volume kind.Constant filled by server. - Possible values include: "ServiceFabricVolumeDisk". - :vartype kind: str or ~azure.servicefabric.models.ApplicationScopedVolumeKind - :ivar description: User readable description of the volume. - :vartype description: str - :ivar size_disk: Required. Volume size. Possible values include: "Small", "Medium", "Large". - :vartype size_disk: str or ~azure.servicefabric.models.SizeTypes - """ - - _validation = { - 'kind': {'required': True}, - 'size_disk': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'size_disk': {'key': 'sizeDisk', 'type': 'str'}, - } - - def __init__( - self, - *, - size_disk: Union[str, "SizeTypes"], - description: Optional[str] = None, - **kwargs - ): - """ - :keyword description: User readable description of the volume. - :paramtype description: str - :keyword size_disk: Required. Volume size. Possible values include: "Small", "Medium", "Large". - :paramtype size_disk: str or ~azure.servicefabric.models.SizeTypes - """ - super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__(description=description, **kwargs) - self.kind = 'ServiceFabricVolumeDisk' # type: str - self.size_disk = size_disk - - -class ApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for applications, containing health evaluations for each unhealthy application that impacted current aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar max_percent_unhealthy_applications: Maximum allowed percentage of unhealthy applications - from the ClusterHealthPolicy. - :vartype max_percent_unhealthy_applications: int - :ivar total_count: Total number of applications from the health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy ApplicationHealthEvaluation that impacted the aggregated - health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - max_percent_unhealthy_applications: Optional[int] = None, - total_count: Optional[int] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword max_percent_unhealthy_applications: Maximum allowed percentage of unhealthy - applications from the ClusterHealthPolicy. - :paramtype max_percent_unhealthy_applications: int - :keyword total_count: Total number of applications from the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy ApplicationHealthEvaluation that impacted the aggregated - health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(ApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'Applications' # type: str - self.max_percent_unhealthy_applications = max_percent_unhealthy_applications - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - - -class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for applications of a particular application type. The application type applications evaluation can be returned when cluster health evaluation returns unhealthy aggregated health state, either Error or Warning. It contains health evaluations for each unhealthy application of the included application type that impacted current aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar application_type_name: The application type name as defined in the application manifest. - :vartype application_type_name: str - :ivar max_percent_unhealthy_applications: Maximum allowed percentage of unhealthy applications - for the application type, specified as an entry in ApplicationTypeHealthPolicyMap. - :vartype max_percent_unhealthy_applications: int - :ivar total_count: Total number of applications of the application type found in the health - store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy ApplicationHealthEvaluation of this application type that - impacted the aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - application_type_name: Optional[str] = None, - max_percent_unhealthy_applications: Optional[int] = None, - total_count: Optional[int] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword application_type_name: The application type name as defined in the application - manifest. - :paramtype application_type_name: str - :keyword max_percent_unhealthy_applications: Maximum allowed percentage of unhealthy - applications for the application type, specified as an entry in ApplicationTypeHealthPolicyMap. - :paramtype max_percent_unhealthy_applications: int - :keyword total_count: Total number of applications of the application type found in the health - store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy ApplicationHealthEvaluation of this application type that - impacted the aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(ApplicationTypeApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'ApplicationTypeApplications' # type: str - self.application_type_name = application_type_name - self.max_percent_unhealthy_applications = max_percent_unhealthy_applications - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - - -class ApplicationTypeHealthPolicyMapItem(msrest.serialization.Model): - """Defines an item in ApplicationTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :ivar key: Required. The key of the application type health policy map item. This is the name - of the application type. - :vartype key: str - :ivar value: Required. The value of the application type health policy map item. - The max percent unhealthy applications allowed for the application type. Must be between zero - and 100. - :vartype value: int - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - } - - def __init__( - self, - *, - key: str, - value: int, - **kwargs - ): - """ - :keyword key: Required. The key of the application type health policy map item. This is the - name of the application type. - :paramtype key: str - :keyword value: Required. The value of the application type health policy map item. - The max percent unhealthy applications allowed for the application type. Must be between zero - and 100. - :paramtype value: int - """ - super(ApplicationTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = key - self.value = value - - -class ApplicationTypeImageStorePath(msrest.serialization.Model): - """Path description for the application package in the image store specified during the prior copy operation. - - All required parameters must be populated in order to send to Azure. - - :ivar application_type_build_path: Required. The relative image store path to the application - package. - :vartype application_type_build_path: str - """ - - _validation = { - 'application_type_build_path': {'required': True}, - } - - _attribute_map = { - 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, - } - - def __init__( - self, - *, - application_type_build_path: str, - **kwargs - ): - """ - :keyword application_type_build_path: Required. The relative image store path to the - application package. - :paramtype application_type_build_path: str - """ - super(ApplicationTypeImageStorePath, self).__init__(**kwargs) - self.application_type_build_path = application_type_build_path - - -class ApplicationTypeInfo(msrest.serialization.Model): - """Information about an application type. - - :ivar name: The application type name as defined in the application manifest. - :vartype name: str - :ivar version: The version of the application type as defined in the application manifest. - :vartype version: str - :ivar default_parameter_list: List of application type parameters that can be overridden when - creating or updating the application. - :vartype default_parameter_list: list[~azure.servicefabric.models.ApplicationParameter] - :ivar status: The status of the application type. Possible values include: "Invalid", - "Provisioning", "Available", "Unprovisioning", "Failed". - :vartype status: str or ~azure.servicefabric.models.ApplicationTypeStatus - :ivar status_details: Additional detailed information about the status of the application type. - :vartype status_details: str - :ivar application_type_definition_kind: The mechanism used to define a Service Fabric - application type. Possible values include: "Invalid", "ServiceFabricApplicationPackage", - "Compose". - :vartype application_type_definition_kind: str or - ~azure.servicefabric.models.ApplicationTypeDefinitionKind - :ivar application_type_metadata: Metadata associated with a specific application type. - :vartype application_type_metadata: ~azure.servicefabric.models.ApplicationTypeMetadata - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'default_parameter_list': {'key': 'DefaultParameterList', 'type': '[ApplicationParameter]'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - 'application_type_definition_kind': {'key': 'ApplicationTypeDefinitionKind', 'type': 'str'}, - 'application_type_metadata': {'key': 'ApplicationTypeMetadata', 'type': 'ApplicationTypeMetadata'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - version: Optional[str] = None, - default_parameter_list: Optional[List["ApplicationParameter"]] = None, - status: Optional[Union[str, "ApplicationTypeStatus"]] = None, - status_details: Optional[str] = None, - application_type_definition_kind: Optional[Union[str, "ApplicationTypeDefinitionKind"]] = None, - application_type_metadata: Optional["ApplicationTypeMetadata"] = None, - **kwargs - ): - """ - :keyword name: The application type name as defined in the application manifest. - :paramtype name: str - :keyword version: The version of the application type as defined in the application manifest. - :paramtype version: str - :keyword default_parameter_list: List of application type parameters that can be overridden - when creating or updating the application. - :paramtype default_parameter_list: list[~azure.servicefabric.models.ApplicationParameter] - :keyword status: The status of the application type. Possible values include: "Invalid", - "Provisioning", "Available", "Unprovisioning", "Failed". - :paramtype status: str or ~azure.servicefabric.models.ApplicationTypeStatus - :keyword status_details: Additional detailed information about the status of the application - type. - :paramtype status_details: str - :keyword application_type_definition_kind: The mechanism used to define a Service Fabric - application type. Possible values include: "Invalid", "ServiceFabricApplicationPackage", - "Compose". - :paramtype application_type_definition_kind: str or - ~azure.servicefabric.models.ApplicationTypeDefinitionKind - :keyword application_type_metadata: Metadata associated with a specific application type. - :paramtype application_type_metadata: ~azure.servicefabric.models.ApplicationTypeMetadata - """ - super(ApplicationTypeInfo, self).__init__(**kwargs) - self.name = name - self.version = version - self.default_parameter_list = default_parameter_list - self.status = status - self.status_details = status_details - self.application_type_definition_kind = application_type_definition_kind - self.application_type_metadata = application_type_metadata - - -class ApplicationTypeManifest(msrest.serialization.Model): - """Contains the manifest describing an application type registered in a Service Fabric cluster. - - :ivar manifest: The XML manifest as a string. - :vartype manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__( - self, - *, - manifest: Optional[str] = None, - **kwargs - ): - """ - :keyword manifest: The XML manifest as a string. - :paramtype manifest: str - """ - super(ApplicationTypeManifest, self).__init__(**kwargs) - self.manifest = manifest - - -class ApplicationTypeMetadata(msrest.serialization.Model): - """Metadata associated with a specific application type. - - :ivar application_type_provision_timestamp: The timestamp when the application type was - provisioned. - :vartype application_type_provision_timestamp: str - :ivar arm_metadata: Common ArmMetadata assocaited with Service Fabric Entities. - :vartype arm_metadata: ~azure.servicefabric.models.ArmMetadata - """ - - _attribute_map = { - 'application_type_provision_timestamp': {'key': 'ApplicationTypeProvisionTimestamp', 'type': 'str'}, - 'arm_metadata': {'key': 'ArmMetadata', 'type': 'ArmMetadata'}, - } - - def __init__( - self, - *, - application_type_provision_timestamp: Optional[str] = None, - arm_metadata: Optional["ArmMetadata"] = None, - **kwargs - ): - """ - :keyword application_type_provision_timestamp: The timestamp when the application type was - provisioned. - :paramtype application_type_provision_timestamp: str - :keyword arm_metadata: Common ArmMetadata assocaited with Service Fabric Entities. - :paramtype arm_metadata: ~azure.servicefabric.models.ArmMetadata - """ - super(ApplicationTypeMetadata, self).__init__(**kwargs) - self.application_type_provision_timestamp = application_type_provision_timestamp - self.arm_metadata = arm_metadata - - -class ApplicationUpdateDescription(msrest.serialization.Model): - """Describes the parameters for updating an application instance. - - :ivar flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - If flags are not specified for a certain property, the property will not be updated even if - the new value is provided. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - Exception is RemoveApplicationCapacity which cannot be specified along with other parameters. - For example, if the provided value is 3 then the flags for MinimumNodes (1) and MaximumNodes - (2) are set. - - - * None - Does not indicate any other properties are set. The value is 0. - * MinimumNodes - Indicates whether the MinimumNodes property is set. The value is 1. - * MaximumNodes - Indicates whether the MinimumNodes property is set. The value is 2. - * ApplicationMetrics - Indicates whether the ApplicationMetrics property is set. The value is - 4. - :vartype flags: str - :ivar remove_application_capacity: Used to clear all parameters related to Application Capacity - for this application. | - It is not possible to specify this parameter together with other Application Capacity - parameters. - :vartype remove_application_capacity: bool - :ivar minimum_nodes: The minimum number of nodes where Service Fabric will reserve capacity for - this application. Note that this does not mean that the services of this application will be - placed on all of those nodes. If this property is set to zero, no capacity will be reserved. - The value of this property cannot be more than the value of the MaximumNodes property. - :vartype minimum_nodes: long - :ivar maximum_nodes: The maximum number of nodes where Service Fabric will reserve capacity for - this application. Note that this does not mean that the services of this application will be - placed on all of those nodes. By default, the value of this property is zero and it means that - the services can be placed on any node. - :vartype maximum_nodes: long - :ivar application_metrics: List of application capacity metric description. - :vartype application_metrics: list[~azure.servicefabric.models.ApplicationMetricDescription] - """ - - _validation = { - 'minimum_nodes': {'minimum': 0}, - 'maximum_nodes': {'minimum': 0}, - } - - _attribute_map = { - 'flags': {'key': 'Flags', 'type': 'str'}, - 'remove_application_capacity': {'key': 'RemoveApplicationCapacity', 'type': 'bool'}, - 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, - 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, - 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, - } - - def __init__( - self, - *, - flags: Optional[str] = None, - remove_application_capacity: Optional[bool] = False, - minimum_nodes: Optional[int] = None, - maximum_nodes: Optional[int] = 0, - application_metrics: Optional[List["ApplicationMetricDescription"]] = None, - **kwargs - ): - """ - :keyword flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - If flags are not specified for a certain property, the property will not be updated even if - the new value is provided. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - Exception is RemoveApplicationCapacity which cannot be specified along with other parameters. - For example, if the provided value is 3 then the flags for MinimumNodes (1) and MaximumNodes - (2) are set. - - - * None - Does not indicate any other properties are set. The value is 0. - * MinimumNodes - Indicates whether the MinimumNodes property is set. The value is 1. - * MaximumNodes - Indicates whether the MinimumNodes property is set. The value is 2. - * ApplicationMetrics - Indicates whether the ApplicationMetrics property is set. The value is - 4. - :paramtype flags: str - :keyword remove_application_capacity: Used to clear all parameters related to Application - Capacity for this application. | - It is not possible to specify this parameter together with other Application Capacity - parameters. - :paramtype remove_application_capacity: bool - :keyword minimum_nodes: The minimum number of nodes where Service Fabric will reserve capacity - for this application. Note that this does not mean that the services of this application will - be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. - The value of this property cannot be more than the value of the MaximumNodes property. - :paramtype minimum_nodes: long - :keyword maximum_nodes: The maximum number of nodes where Service Fabric will reserve capacity - for this application. Note that this does not mean that the services of this application will - be placed on all of those nodes. By default, the value of this property is zero and it means - that the services can be placed on any node. - :paramtype maximum_nodes: long - :keyword application_metrics: List of application capacity metric description. - :paramtype application_metrics: list[~azure.servicefabric.models.ApplicationMetricDescription] - """ - super(ApplicationUpdateDescription, self).__init__(**kwargs) - self.flags = flags - self.remove_application_capacity = remove_application_capacity - self.minimum_nodes = minimum_nodes - self.maximum_nodes = maximum_nodes - self.application_metrics = application_metrics - - -class ApplicationUpgradeCompletedEvent(ApplicationEvent): - """Application Upgrade Completed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar application_type_version: Required. Application type version. - :vartype application_type_version: str - :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. - :vartype overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - application_id: str, - application_type_name: str, - application_type_version: str, - overall_upgrade_elapsed_time_in_ms: float, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword application_type_version: Required. Application type version. - :paramtype application_type_version: str - :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. - :paramtype overall_upgrade_elapsed_time_in_ms: float - """ - super(ApplicationUpgradeCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.kind = 'ApplicationUpgradeCompleted' # type: str - self.application_type_name = application_type_name - self.application_type_version = application_type_version - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - - -class ApplicationUpgradeDescription(msrest.serialization.Model): - """Describes the parameters for an application upgrade. Note that upgrade description replaces the existing application description. This means that if the parameters are not specified, the existing parameters on the applications will be overwritten with the empty parameters list. This would result in the application using the default value of the parameters from the application manifest. If you do not want to change any existing parameter values, please get the application parameters first using the GetApplicationInfo query and then supply those values as Parameters in this ApplicationUpgradeDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the target application, including the 'fabric:' URI scheme. - :vartype name: str - :ivar target_application_type_version: Required. The target application type version (found in - the application manifest) for the application upgrade. - :vartype target_application_type_version: str - :ivar parameters: List of application parameters with overridden values from their default - values specified in the application manifest. - :vartype parameters: list[~azure.servicefabric.models.ApplicationParameter] - :ivar upgrade_kind: Required. The kind of upgrade out of the following possible values. - Possible values include: "Invalid", "Rolling". Default value: "Rolling". - :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :vartype upgrade_replica_set_check_timeout_in_seconds: long - :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when - the code version has not changed (the upgrade only changes configuration or data). - :vartype force_restart: bool - :ivar sort_order: Defines the order in which an upgrade proceeds through the cluster. Possible - values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", - "ReverseLexicographical". Default value: "Default". - :vartype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. - :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :ivar application_health_policy: Defines a health policy used to evaluate the health of an - application or one of its children entities. - :vartype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :ivar instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a stateless - instance is closed, to allow the active requests to drain gracefully. This would be effective - when the instance is closing during the application/cluster - upgrade, only for those instances which have a non-zero delay duration configured in the - service description. See InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates - that the behavior will entirely depend on the delay configured in the stateless service - description. - :vartype instance_close_delay_duration_in_seconds: long - :ivar managed_application_identity: Managed application identity description. - :vartype managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - - _validation = { - 'name': {'required': True}, - 'target_application_type_version': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, - } - - def __init__( - self, - *, - name: str, - target_application_type_version: str, - upgrade_kind: Union[str, "UpgradeKind"] = "Rolling", - parameters: Optional[List["ApplicationParameter"]] = None, - rolling_upgrade_mode: Optional[Union[str, "UpgradeMode"]] = "UnmonitoredAuto", - upgrade_replica_set_check_timeout_in_seconds: Optional[int] = 42949672925, - force_restart: Optional[bool] = False, - sort_order: Optional[Union[str, "UpgradeSortOrder"]] = "Default", - monitoring_policy: Optional["MonitoringPolicyDescription"] = None, - application_health_policy: Optional["ApplicationHealthPolicy"] = None, - instance_close_delay_duration_in_seconds: Optional[int] = 4294967295, - managed_application_identity: Optional["ManagedApplicationIdentityDescription"] = None, - **kwargs - ): - """ - :keyword name: Required. The name of the target application, including the 'fabric:' URI - scheme. - :paramtype name: str - :keyword target_application_type_version: Required. The target application type version (found - in the application manifest) for the application upgrade. - :paramtype target_application_type_version: str - :keyword parameters: List of application parameters with overridden values from their default - values specified in the application manifest. - :paramtype parameters: list[~azure.servicefabric.models.ApplicationParameter] - :keyword upgrade_kind: Required. The kind of upgrade out of the following possible values. - Possible values include: "Invalid", "Rolling". Default value: "Rolling". - :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :paramtype upgrade_replica_set_check_timeout_in_seconds: long - :keyword force_restart: If true, then processes are forcefully restarted during upgrade even - when the code version has not changed (the upgrade only changes configuration or data). - :paramtype force_restart: bool - :keyword sort_order: Defines the order in which an upgrade proceeds through the cluster. - Possible values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", - "ReverseLexicographical". Default value: "Default". - :paramtype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored - mode. - :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :keyword application_health_policy: Defines a health policy used to evaluate the health of an - application or one of its children entities. - :paramtype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a - stateless instance is closed, to allow the active requests to drain gracefully. This would be - effective when the instance is closing during the application/cluster - upgrade, only for those instances which have a non-zero delay duration configured in the - service description. See InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates - that the behavior will entirely depend on the delay configured in the stateless service - description. - :paramtype instance_close_delay_duration_in_seconds: long - :keyword managed_application_identity: Managed application identity description. - :paramtype managed_application_identity: - ~azure.servicefabric.models.ManagedApplicationIdentityDescription - """ - super(ApplicationUpgradeDescription, self).__init__(**kwargs) - self.name = name - self.target_application_type_version = target_application_type_version - self.parameters = parameters - self.upgrade_kind = upgrade_kind - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.force_restart = force_restart - self.sort_order = sort_order - self.monitoring_policy = monitoring_policy - self.application_health_policy = application_health_policy - self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds - self.managed_application_identity = managed_application_identity - - -class ApplicationUpgradeDomainCompletedEvent(ApplicationEvent): - """Application Upgrade Domain Completed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar current_application_type_version: Required. Current Application type version. - :vartype current_application_type_version: str - :ivar application_type_version: Required. Target Application type version. - :vartype application_type_version: str - :ivar upgrade_state: Required. State of upgrade. - :vartype upgrade_state: str - :ivar upgrade_domains: Required. Upgrade domains. - :vartype upgrade_domains: str - :ivar upgrade_domain_elapsed_time_in_ms: Required. Upgrade time of domain in milli-seconds. - :vartype upgrade_domain_elapsed_time_in_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'upgrade_state': {'required': True}, - 'upgrade_domains': {'required': True}, - 'upgrade_domain_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, - 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - application_id: str, - application_type_name: str, - current_application_type_version: str, - application_type_version: str, - upgrade_state: str, - upgrade_domains: str, - upgrade_domain_elapsed_time_in_ms: float, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword current_application_type_version: Required. Current Application type version. - :paramtype current_application_type_version: str - :keyword application_type_version: Required. Target Application type version. - :paramtype application_type_version: str - :keyword upgrade_state: Required. State of upgrade. - :paramtype upgrade_state: str - :keyword upgrade_domains: Required. Upgrade domains. - :paramtype upgrade_domains: str - :keyword upgrade_domain_elapsed_time_in_ms: Required. Upgrade time of domain in milli-seconds. - :paramtype upgrade_domain_elapsed_time_in_ms: float - """ - super(ApplicationUpgradeDomainCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.kind = 'ApplicationUpgradeDomainCompleted' # type: str - self.application_type_name = application_type_name - self.current_application_type_version = current_application_type_version - self.application_type_version = application_type_version - self.upgrade_state = upgrade_state - self.upgrade_domains = upgrade_domains - self.upgrade_domain_elapsed_time_in_ms = upgrade_domain_elapsed_time_in_ms - - -class ApplicationUpgradeProgressInfo(msrest.serialization.Model): - """Describes the parameters for an application upgrade. - - :ivar name: The name of the target application, including the 'fabric:' URI scheme. - :vartype name: str - :ivar type_name: The application type name as defined in the application manifest. - :vartype type_name: str - :ivar target_application_type_version: The target application type version (found in the - application manifest) for the application upgrade. - :vartype target_application_type_version: str - :ivar upgrade_domains: List of upgrade domains and their statuses. Not applicable to - node-by-node upgrades. - :vartype upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] - :ivar upgrade_units: List of upgrade units and their statuses. - :vartype upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] - :ivar upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", - "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", - "RollingForwardInProgress", "RollingForwardCompleted", "Failed". - :vartype upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :ivar next_upgrade_domain: The name of the next upgrade domain to be processed. Not applicable - to node-by-node upgrades. - :vartype next_upgrade_domain: str - :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :ivar upgrade_description: Describes the parameters for an application upgrade. Note that - upgrade description replaces the existing application description. This means that if the - parameters are not specified, the existing parameters on the applications will be overwritten - with the empty parameters list. This would result in the application using the default value of - the parameters from the application manifest. If you do not want to change any existing - parameter values, please get the application parameters first using the GetApplicationInfo - query and then supply those values as Parameters in this ApplicationUpgradeDescription. - :vartype upgrade_description: ~azure.servicefabric.models.ApplicationUpgradeDescription - :ivar upgrade_duration_in_milliseconds: The estimated total amount of time spent processing the - overall upgrade. - :vartype upgrade_duration_in_milliseconds: str - :ivar upgrade_domain_duration_in_milliseconds: The estimated total amount of time spent - processing the current upgrade domain. - :vartype upgrade_domain_duration_in_milliseconds: str - :ivar unhealthy_evaluations: List of health evaluations that resulted in the current aggregated - health state. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar current_upgrade_domain_progress: Information about the current in-progress upgrade - domain. Not applicable to node-by-node upgrades. - :vartype current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :ivar current_upgrade_units_progress: Information about the current in-progress upgrade units. - :vartype current_upgrade_units_progress: - ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo - :ivar start_timestamp_utc: The estimated UTC datetime when the upgrade started. - :vartype start_timestamp_utc: str - :ivar failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and - FailureAction was executed. - :vartype failure_timestamp_utc: str - :ivar failure_reason: The cause of an upgrade failure that resulted in FailureAction being - executed. Possible values include: "None", "Interrupted", "HealthCheck", - "UpgradeDomainTimeout", "OverallUpgradeTimeout". - :vartype failure_reason: str or ~azure.servicefabric.models.FailureReason - :ivar upgrade_domain_progress_at_failure: Information about the upgrade domain progress at the - time of upgrade failure. - :vartype upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo - :ivar upgrade_status_details: Additional detailed information about the status of the pending - upgrade. - :vartype upgrade_status_details: str - :ivar is_node_by_node: Indicates whether this upgrade is node-by-node. - :vartype is_node_by_node: bool - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, - 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ApplicationUpgradeDescription'}, - 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, - 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, - 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, - 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - type_name: Optional[str] = None, - target_application_type_version: Optional[str] = None, - upgrade_domains: Optional[List["UpgradeDomainInfo"]] = None, - upgrade_units: Optional[List["UpgradeUnitInfo"]] = None, - upgrade_state: Optional[Union[str, "UpgradeState"]] = None, - next_upgrade_domain: Optional[str] = None, - rolling_upgrade_mode: Optional[Union[str, "UpgradeMode"]] = "UnmonitoredAuto", - upgrade_description: Optional["ApplicationUpgradeDescription"] = None, - upgrade_duration_in_milliseconds: Optional[str] = None, - upgrade_domain_duration_in_milliseconds: Optional[str] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - current_upgrade_domain_progress: Optional["CurrentUpgradeDomainProgressInfo"] = None, - current_upgrade_units_progress: Optional["CurrentUpgradeUnitsProgressInfo"] = None, - start_timestamp_utc: Optional[str] = None, - failure_timestamp_utc: Optional[str] = None, - failure_reason: Optional[Union[str, "FailureReason"]] = None, - upgrade_domain_progress_at_failure: Optional["FailureUpgradeDomainProgressInfo"] = None, - upgrade_status_details: Optional[str] = None, - is_node_by_node: Optional[bool] = False, - **kwargs - ): - """ - :keyword name: The name of the target application, including the 'fabric:' URI scheme. - :paramtype name: str - :keyword type_name: The application type name as defined in the application manifest. - :paramtype type_name: str - :keyword target_application_type_version: The target application type version (found in the - application manifest) for the application upgrade. - :paramtype target_application_type_version: str - :keyword upgrade_domains: List of upgrade domains and their statuses. Not applicable to - node-by-node upgrades. - :paramtype upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] - :keyword upgrade_units: List of upgrade units and their statuses. - :paramtype upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] - :keyword upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", - "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", - "RollingForwardInProgress", "RollingForwardCompleted", "Failed". - :paramtype upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :keyword next_upgrade_domain: The name of the next upgrade domain to be processed. Not - applicable to node-by-node upgrades. - :paramtype next_upgrade_domain: str - :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :keyword upgrade_description: Describes the parameters for an application upgrade. Note that - upgrade description replaces the existing application description. This means that if the - parameters are not specified, the existing parameters on the applications will be overwritten - with the empty parameters list. This would result in the application using the default value of - the parameters from the application manifest. If you do not want to change any existing - parameter values, please get the application parameters first using the GetApplicationInfo - query and then supply those values as Parameters in this ApplicationUpgradeDescription. - :paramtype upgrade_description: ~azure.servicefabric.models.ApplicationUpgradeDescription - :keyword upgrade_duration_in_milliseconds: The estimated total amount of time spent processing - the overall upgrade. - :paramtype upgrade_duration_in_milliseconds: str - :keyword upgrade_domain_duration_in_milliseconds: The estimated total amount of time spent - processing the current upgrade domain. - :paramtype upgrade_domain_duration_in_milliseconds: str - :keyword unhealthy_evaluations: List of health evaluations that resulted in the current - aggregated health state. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword current_upgrade_domain_progress: Information about the current in-progress upgrade - domain. Not applicable to node-by-node upgrades. - :paramtype current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :keyword current_upgrade_units_progress: Information about the current in-progress upgrade - units. - :paramtype current_upgrade_units_progress: - ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo - :keyword start_timestamp_utc: The estimated UTC datetime when the upgrade started. - :paramtype start_timestamp_utc: str - :keyword failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and - FailureAction was executed. - :paramtype failure_timestamp_utc: str - :keyword failure_reason: The cause of an upgrade failure that resulted in FailureAction being - executed. Possible values include: "None", "Interrupted", "HealthCheck", - "UpgradeDomainTimeout", "OverallUpgradeTimeout". - :paramtype failure_reason: str or ~azure.servicefabric.models.FailureReason - :keyword upgrade_domain_progress_at_failure: Information about the upgrade domain progress at - the time of upgrade failure. - :paramtype upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo - :keyword upgrade_status_details: Additional detailed information about the status of the - pending upgrade. - :paramtype upgrade_status_details: str - :keyword is_node_by_node: Indicates whether this upgrade is node-by-node. - :paramtype is_node_by_node: bool - """ - super(ApplicationUpgradeProgressInfo, self).__init__(**kwargs) - self.name = name - self.type_name = type_name - self.target_application_type_version = target_application_type_version - self.upgrade_domains = upgrade_domains - self.upgrade_units = upgrade_units - self.upgrade_state = upgrade_state - self.next_upgrade_domain = next_upgrade_domain - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_description = upgrade_description - self.upgrade_duration_in_milliseconds = upgrade_duration_in_milliseconds - self.upgrade_domain_duration_in_milliseconds = upgrade_domain_duration_in_milliseconds - self.unhealthy_evaluations = unhealthy_evaluations - self.current_upgrade_domain_progress = current_upgrade_domain_progress - self.current_upgrade_units_progress = current_upgrade_units_progress - self.start_timestamp_utc = start_timestamp_utc - self.failure_timestamp_utc = failure_timestamp_utc - self.failure_reason = failure_reason - self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure - self.upgrade_status_details = upgrade_status_details - self.is_node_by_node = is_node_by_node - - -class ApplicationUpgradeRollbackCompletedEvent(ApplicationEvent): - """Application Upgrade Rollback Completed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar application_type_version: Required. Application type version. - :vartype application_type_version: str - :ivar failure_reason: Required. Describes reason of failure. - :vartype failure_reason: str - :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. - :vartype overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - application_id: str, - application_type_name: str, - application_type_version: str, - failure_reason: str, - overall_upgrade_elapsed_time_in_ms: float, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword application_type_version: Required. Application type version. - :paramtype application_type_version: str - :keyword failure_reason: Required. Describes reason of failure. - :paramtype failure_reason: str - :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. - :paramtype overall_upgrade_elapsed_time_in_ms: float - """ - super(ApplicationUpgradeRollbackCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.kind = 'ApplicationUpgradeRollbackCompleted' # type: str - self.application_type_name = application_type_name - self.application_type_version = application_type_version - self.failure_reason = failure_reason - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - - -class ApplicationUpgradeRollbackStartedEvent(ApplicationEvent): - """Application Upgrade Rollback Started event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar current_application_type_version: Required. Current Application type version. - :vartype current_application_type_version: str - :ivar application_type_version: Required. Target Application type version. - :vartype application_type_version: str - :ivar failure_reason: Required. Describes reason of failure. - :vartype failure_reason: str - :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. - :vartype overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - application_id: str, - application_type_name: str, - current_application_type_version: str, - application_type_version: str, - failure_reason: str, - overall_upgrade_elapsed_time_in_ms: float, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword current_application_type_version: Required. Current Application type version. - :paramtype current_application_type_version: str - :keyword application_type_version: Required. Target Application type version. - :paramtype application_type_version: str - :keyword failure_reason: Required. Describes reason of failure. - :paramtype failure_reason: str - :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall upgrade time in milli-seconds. - :paramtype overall_upgrade_elapsed_time_in_ms: float - """ - super(ApplicationUpgradeRollbackStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.kind = 'ApplicationUpgradeRollbackStarted' # type: str - self.application_type_name = application_type_name - self.current_application_type_version = current_application_type_version - self.application_type_version = application_type_version - self.failure_reason = failure_reason - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - - -class ApplicationUpgradeStartedEvent(ApplicationEvent): - """Application Upgrade Started event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar current_application_type_version: Required. Current Application type version. - :vartype current_application_type_version: str - :ivar application_type_version: Required. Target Application type version. - :vartype application_type_version: str - :ivar upgrade_type: Required. Type of upgrade. - :vartype upgrade_type: str - :ivar rolling_upgrade_mode: Required. Mode of upgrade. - :vartype rolling_upgrade_mode: str - :ivar failure_action: Required. Action if failed. - :vartype failure_action: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_type_name': {'required': True}, - 'current_application_type_version': {'required': True}, - 'application_type_version': {'required': True}, - 'upgrade_type': {'required': True}, - 'rolling_upgrade_mode': {'required': True}, - 'failure_action': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'current_application_type_version': {'key': 'CurrentApplicationTypeVersion', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - application_id: str, - application_type_name: str, - current_application_type_version: str, - application_type_version: str, - upgrade_type: str, - rolling_upgrade_mode: str, - failure_action: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword current_application_type_version: Required. Current Application type version. - :paramtype current_application_type_version: str - :keyword application_type_version: Required. Target Application type version. - :paramtype application_type_version: str - :keyword upgrade_type: Required. Type of upgrade. - :paramtype upgrade_type: str - :keyword rolling_upgrade_mode: Required. Mode of upgrade. - :paramtype rolling_upgrade_mode: str - :keyword failure_action: Required. Action if failed. - :paramtype failure_action: str - """ - super(ApplicationUpgradeStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.kind = 'ApplicationUpgradeStarted' # type: str - self.application_type_name = application_type_name - self.current_application_type_version = current_application_type_version - self.application_type_version = application_type_version - self.upgrade_type = upgrade_type - self.rolling_upgrade_mode = rolling_upgrade_mode - self.failure_action = failure_action - - -class ApplicationUpgradeUpdateDescription(msrest.serialization.Model): - """Describes the parameters for updating an ongoing application upgrade. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the application, including the 'fabric:' URI scheme. - :vartype name: str - :ivar upgrade_kind: Required. The kind of upgrade out of the following possible values. - Possible values include: "Invalid", "Rolling". Default value: "Rolling". - :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :ivar application_health_policy: Defines a health policy used to evaluate the health of an - application or one of its children entities. - :vartype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :ivar update_description: Describes the parameters for updating a rolling upgrade of - application or cluster. - :vartype update_description: ~azure.servicefabric.models.RollingUpgradeUpdateDescription - """ - - _validation = { - 'name': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, - } - - def __init__( - self, - *, - name: str, - upgrade_kind: Union[str, "UpgradeKind"] = "Rolling", - application_health_policy: Optional["ApplicationHealthPolicy"] = None, - update_description: Optional["RollingUpgradeUpdateDescription"] = None, - **kwargs - ): - """ - :keyword name: Required. The name of the application, including the 'fabric:' URI scheme. - :paramtype name: str - :keyword upgrade_kind: Required. The kind of upgrade out of the following possible values. - Possible values include: "Invalid", "Rolling". Default value: "Rolling". - :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :keyword application_health_policy: Defines a health policy used to evaluate the health of an - application or one of its children entities. - :paramtype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword update_description: Describes the parameters for updating a rolling upgrade of - application or cluster. - :paramtype update_description: ~azure.servicefabric.models.RollingUpgradeUpdateDescription - """ - super(ApplicationUpgradeUpdateDescription, self).__init__(**kwargs) - self.name = name - self.upgrade_kind = upgrade_kind - self.application_health_policy = application_health_policy - self.update_description = update_description - - -class ArmMetadata(msrest.serialization.Model): - """Common ArmMetadata assocaited with Service Fabric Entities. - - :ivar arm_resource_id: A string containing the ArmResourceId. - :vartype arm_resource_id: str - """ - - _attribute_map = { - 'arm_resource_id': {'key': 'ArmResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - arm_resource_id: Optional[str] = None, - **kwargs - ): - """ - :keyword arm_resource_id: A string containing the ArmResourceId. - :paramtype arm_resource_id: str - """ - super(ArmMetadata, self).__init__(**kwargs) - self.arm_resource_id = arm_resource_id - - -class AutoScalingMetric(msrest.serialization.Model): - """Describes the metric that is used for triggering auto scaling operation. Derived classes will describe resources or metrics. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AutoScalingResourceMetric. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of auto scaling metric.Constant filled by server. Possible - values include: "Resource". - :vartype kind: str or ~azure.servicefabric.models.AutoScalingMetricKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Resource': 'AutoScalingResourceMetric'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(AutoScalingMetric, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class AutoScalingPolicy(msrest.serialization.Model): - """Describes the auto scaling policy. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the auto scaling policy. - :vartype name: str - :ivar trigger: Required. Determines when auto scaling operation will be invoked. - :vartype trigger: ~azure.servicefabric.models.AutoScalingTrigger - :ivar mechanism: Required. The mechanism that is used to scale when auto scaling operation is - invoked. - :vartype mechanism: ~azure.servicefabric.models.AutoScalingMechanism - """ - - _validation = { - 'name': {'required': True}, - 'trigger': {'required': True}, - 'mechanism': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'trigger': {'key': 'trigger', 'type': 'AutoScalingTrigger'}, - 'mechanism': {'key': 'mechanism', 'type': 'AutoScalingMechanism'}, - } - - def __init__( - self, - *, - name: str, - trigger: "AutoScalingTrigger", - mechanism: "AutoScalingMechanism", - **kwargs - ): - """ - :keyword name: Required. The name of the auto scaling policy. - :paramtype name: str - :keyword trigger: Required. Determines when auto scaling operation will be invoked. - :paramtype trigger: ~azure.servicefabric.models.AutoScalingTrigger - :keyword mechanism: Required. The mechanism that is used to scale when auto scaling operation - is invoked. - :paramtype mechanism: ~azure.servicefabric.models.AutoScalingMechanism - """ - super(AutoScalingPolicy, self).__init__(**kwargs) - self.name = name - self.trigger = trigger - self.mechanism = mechanism - - -class AutoScalingResourceMetric(AutoScalingMetric): - """Describes the resource that is used for triggering auto scaling. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of auto scaling metric.Constant filled by server. Possible - values include: "Resource". - :vartype kind: str or ~azure.servicefabric.models.AutoScalingMetricKind - :ivar name: Required. Name of the resource. Possible values include: "cpu", "memoryInGB". - :vartype name: str or ~azure.servicefabric.models.AutoScalingResourceMetricName - """ - - _validation = { - 'kind': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Union[str, "AutoScalingResourceMetricName"], - **kwargs - ): - """ - :keyword name: Required. Name of the resource. Possible values include: "cpu", "memoryInGB". - :paramtype name: str or ~azure.servicefabric.models.AutoScalingResourceMetricName - """ - super(AutoScalingResourceMetric, self).__init__(**kwargs) - self.kind = 'Resource' # type: str - self.name = name - - -class AutoScalingTrigger(msrest.serialization.Model): - """Describes the trigger for performing auto scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AverageLoadScalingTrigger. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of auto scaling trigger.Constant filled by server. Possible - values include: "AverageLoad". - :vartype kind: str or ~azure.servicefabric.models.AutoScalingTriggerKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AverageLoad': 'AverageLoadScalingTrigger'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(AutoScalingTrigger, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class AverageLoadScalingTrigger(AutoScalingTrigger): - """Describes the average load trigger used for auto scaling. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of auto scaling trigger.Constant filled by server. Possible - values include: "AverageLoad". - :vartype kind: str or ~azure.servicefabric.models.AutoScalingTriggerKind - :ivar metric: Required. Description of the metric that is used for scaling. - :vartype metric: ~azure.servicefabric.models.AutoScalingMetric - :ivar lower_load_threshold: Required. Lower load threshold (if average load is below this - threshold, service will scale down). - :vartype lower_load_threshold: float - :ivar upper_load_threshold: Required. Upper load threshold (if average load is above this - threshold, service will scale up). - :vartype upper_load_threshold: float - :ivar scale_interval_in_seconds: Required. Scale interval that indicates how often will this - trigger be checked. - :vartype scale_interval_in_seconds: int - """ - - _validation = { - 'kind': {'required': True}, - 'metric': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'minimum': 60}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'metric': {'key': 'metric', 'type': 'AutoScalingMetric'}, - 'lower_load_threshold': {'key': 'lowerLoadThreshold', 'type': 'float'}, - 'upper_load_threshold': {'key': 'upperLoadThreshold', 'type': 'float'}, - 'scale_interval_in_seconds': {'key': 'scaleIntervalInSeconds', 'type': 'int'}, - } - - def __init__( - self, - *, - metric: "AutoScalingMetric", - lower_load_threshold: float, - upper_load_threshold: float, - scale_interval_in_seconds: int, - **kwargs - ): - """ - :keyword metric: Required. Description of the metric that is used for scaling. - :paramtype metric: ~azure.servicefabric.models.AutoScalingMetric - :keyword lower_load_threshold: Required. Lower load threshold (if average load is below this - threshold, service will scale down). - :paramtype lower_load_threshold: float - :keyword upper_load_threshold: Required. Upper load threshold (if average load is above this - threshold, service will scale up). - :paramtype upper_load_threshold: float - :keyword scale_interval_in_seconds: Required. Scale interval that indicates how often will this - trigger be checked. - :paramtype scale_interval_in_seconds: int - """ - super(AverageLoadScalingTrigger, self).__init__(**kwargs) - self.kind = 'AverageLoad' # type: str - self.metric = metric - self.lower_load_threshold = lower_load_threshold - self.upper_load_threshold = upper_load_threshold - self.scale_interval_in_seconds = scale_interval_in_seconds - - -class ScalingTriggerDescription(msrest.serialization.Model): - """Describes the trigger for performing a scaling operation. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AveragePartitionLoadScalingTrigger, AverageServiceLoadScalingTrigger. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Specifies the kind of scaling trigger.Constant filled by server. Possible - values include: "Invalid", "AveragePartitionLoad", "AverageServiceLoad". - :vartype kind: str or ~azure.servicefabric.models.ScalingTriggerKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AveragePartitionLoad': 'AveragePartitionLoadScalingTrigger', 'AverageServiceLoad': 'AverageServiceLoadScalingTrigger'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ScalingTriggerDescription, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class AveragePartitionLoadScalingTrigger(ScalingTriggerDescription): - """Represents a scaling trigger related to an average load of a metric/resource of a partition. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Specifies the kind of scaling trigger.Constant filled by server. Possible - values include: "Invalid", "AveragePartitionLoad", "AverageServiceLoad". - :vartype kind: str or ~azure.servicefabric.models.ScalingTriggerKind - :ivar metric_name: Required. The name of the metric for which usage should be tracked. - :vartype metric_name: str - :ivar lower_load_threshold: Required. The lower limit of the load below which a scale in - operation should be performed. - :vartype lower_load_threshold: str - :ivar upper_load_threshold: Required. The upper limit of the load beyond which a scale out - operation should be performed. - :vartype upper_load_threshold: str - :ivar scale_interval_in_seconds: Required. The period in seconds on which a decision is made - whether to scale or not. - :vartype scale_interval_in_seconds: long - """ - - _validation = { - 'kind': {'required': True}, - 'metric_name': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, - 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, - 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, - } - - def __init__( - self, - *, - metric_name: str, - lower_load_threshold: str, - upper_load_threshold: str, - scale_interval_in_seconds: int, - **kwargs - ): - """ - :keyword metric_name: Required. The name of the metric for which usage should be tracked. - :paramtype metric_name: str - :keyword lower_load_threshold: Required. The lower limit of the load below which a scale in - operation should be performed. - :paramtype lower_load_threshold: str - :keyword upper_load_threshold: Required. The upper limit of the load beyond which a scale out - operation should be performed. - :paramtype upper_load_threshold: str - :keyword scale_interval_in_seconds: Required. The period in seconds on which a decision is made - whether to scale or not. - :paramtype scale_interval_in_seconds: long - """ - super(AveragePartitionLoadScalingTrigger, self).__init__(**kwargs) - self.kind = 'AveragePartitionLoad' # type: str - self.metric_name = metric_name - self.lower_load_threshold = lower_load_threshold - self.upper_load_threshold = upper_load_threshold - self.scale_interval_in_seconds = scale_interval_in_seconds - - -class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): - """Represents a scaling policy related to an average load of a metric/resource of a service. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Specifies the kind of scaling trigger.Constant filled by server. Possible - values include: "Invalid", "AveragePartitionLoad", "AverageServiceLoad". - :vartype kind: str or ~azure.servicefabric.models.ScalingTriggerKind - :ivar metric_name: Required. The name of the metric for which usage should be tracked. - :vartype metric_name: str - :ivar lower_load_threshold: Required. The lower limit of the load below which a scale in - operation should be performed. - :vartype lower_load_threshold: str - :ivar upper_load_threshold: Required. The upper limit of the load beyond which a scale out - operation should be performed. - :vartype upper_load_threshold: str - :ivar scale_interval_in_seconds: Required. The period in seconds on which a decision is made - whether to scale or not. - :vartype scale_interval_in_seconds: long - :ivar use_only_primary_load: Required. Flag determines whether only the load of primary replica - should be considered for scaling. - If set to true, then trigger will only consider the load of primary replicas of stateful - service. - If set to false, trigger will consider load of all replicas. - This parameter cannot be set to true for stateless service. - :vartype use_only_primary_load: bool - """ - - _validation = { - 'kind': {'required': True}, - 'metric_name': {'required': True}, - 'lower_load_threshold': {'required': True}, - 'upper_load_threshold': {'required': True}, - 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, - 'use_only_primary_load': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, - 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, - 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, - 'use_only_primary_load': {'key': 'UseOnlyPrimaryLoad', 'type': 'bool'}, - } - - def __init__( - self, - *, - metric_name: str, - lower_load_threshold: str, - upper_load_threshold: str, - scale_interval_in_seconds: int, - use_only_primary_load: bool, - **kwargs - ): - """ - :keyword metric_name: Required. The name of the metric for which usage should be tracked. - :paramtype metric_name: str - :keyword lower_load_threshold: Required. The lower limit of the load below which a scale in - operation should be performed. - :paramtype lower_load_threshold: str - :keyword upper_load_threshold: Required. The upper limit of the load beyond which a scale out - operation should be performed. - :paramtype upper_load_threshold: str - :keyword scale_interval_in_seconds: Required. The period in seconds on which a decision is made - whether to scale or not. - :paramtype scale_interval_in_seconds: long - :keyword use_only_primary_load: Required. Flag determines whether only the load of primary - replica should be considered for scaling. - If set to true, then trigger will only consider the load of primary replicas of stateful - service. - If set to false, trigger will consider load of all replicas. - This parameter cannot be set to true for stateless service. - :paramtype use_only_primary_load: bool - """ - super(AverageServiceLoadScalingTrigger, self).__init__(**kwargs) - self.kind = 'AverageServiceLoad' # type: str - self.metric_name = metric_name - self.lower_load_threshold = lower_load_threshold - self.upper_load_threshold = upper_load_threshold - self.scale_interval_in_seconds = scale_interval_in_seconds - self.use_only_primary_load = use_only_primary_load - - -class BackupStorageDescription(msrest.serialization.Model): - """Describes the parameters for the backup storage. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureBlobBackupStorageDescription, DsmsAzureBlobBackupStorageDescription, FileShareBackupStorageDescription, ManagedIdentityAzureBlobBackupStorageDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant - filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", - "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". - :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind - :ivar friendly_name: Friendly name for this backup storage. - :vartype friendly_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - } - - _attribute_map = { - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - } - - _subtype_map = { - 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'ManagedIdentityAzureBlobStore': 'ManagedIdentityAzureBlobBackupStorageDescription'} - } - - def __init__( - self, - *, - friendly_name: Optional[str] = None, - **kwargs - ): - """ - :keyword friendly_name: Friendly name for this backup storage. - :paramtype friendly_name: str - """ - super(BackupStorageDescription, self).__init__(**kwargs) - self.storage_kind = None # type: Optional[str] - self.friendly_name = friendly_name - - -class AzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Azure blob store used for storing and enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant - filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", - "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". - :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind - :ivar friendly_name: Friendly name for this backup storage. - :vartype friendly_name: str - :ivar connection_string: Required. The connection string to connect to the Azure blob store. - :vartype connection_string: str - :ivar container_name: Required. The name of the container in the blob store to store and - enumerate backups from. - :vartype container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'connection_string': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'connection_string': {'key': 'ConnectionString', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__( - self, - *, - connection_string: str, - container_name: str, - friendly_name: Optional[str] = None, - **kwargs - ): - """ - :keyword friendly_name: Friendly name for this backup storage. - :paramtype friendly_name: str - :keyword connection_string: Required. The connection string to connect to the Azure blob store. - :paramtype connection_string: str - :keyword container_name: Required. The name of the container in the blob store to store and - enumerate backups from. - :paramtype container_name: str - """ - super(AzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) - self.storage_kind = 'AzureBlobStore' # type: str - self.connection_string = connection_string - self.container_name = container_name - - -class DiagnosticsSinkProperties(msrest.serialization.Model): - """Properties of a DiagnosticsSink. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureInternalMonitoringPipelineSinkDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of DiagnosticsSink.Constant filled by server. Possible values - include: "Invalid", "AzureInternalMonitoringPipeline". - :vartype kind: str or ~azure.servicefabric.models.DiagnosticsSinkKind - :ivar name: Name of the sink. This value is referenced by DiagnosticsReferenceDescription. - :vartype name: str - :ivar description: A description of the sink. - :vartype description: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'AzureInternalMonitoringPipeline': 'AzureInternalMonitoringPipelineSinkDescription'} - } - - def __init__( - self, - *, - name: Optional[str] = None, - description: Optional[str] = None, - **kwargs - ): - """ - :keyword name: Name of the sink. This value is referenced by DiagnosticsReferenceDescription. - :paramtype name: str - :keyword description: A description of the sink. - :paramtype description: str - """ - super(DiagnosticsSinkProperties, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.name = name - self.description = description - - -class AzureInternalMonitoringPipelineSinkDescription(DiagnosticsSinkProperties): - """Diagnostics settings for Geneva. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of DiagnosticsSink.Constant filled by server. Possible values - include: "Invalid", "AzureInternalMonitoringPipeline". - :vartype kind: str or ~azure.servicefabric.models.DiagnosticsSinkKind - :ivar name: Name of the sink. This value is referenced by DiagnosticsReferenceDescription. - :vartype name: str - :ivar description: A description of the sink. - :vartype description: str - :ivar account_name: Azure Internal monitoring pipeline account. - :vartype account_name: str - :ivar namespace: Azure Internal monitoring pipeline account namespace. - :vartype namespace: str - :ivar ma_config_url: Azure Internal monitoring agent configuration. - :vartype ma_config_url: str - :ivar fluentd_config_url: Azure Internal monitoring agent fluentd configuration. - :vartype fluentd_config_url: str - :ivar auto_key_config_url: Azure Internal monitoring pipeline autokey associated with the - certificate. - :vartype auto_key_config_url: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'ma_config_url': {'key': 'maConfigUrl', 'type': 'str'}, - 'fluentd_config_url': {'key': 'fluentdConfigUrl', 'type': 'str'}, - 'auto_key_config_url': {'key': 'autoKeyConfigUrl', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - description: Optional[str] = None, - account_name: Optional[str] = None, - namespace: Optional[str] = None, - ma_config_url: Optional[str] = None, - fluentd_config_url: Optional[str] = None, - auto_key_config_url: Optional[str] = None, - **kwargs - ): - """ - :keyword name: Name of the sink. This value is referenced by DiagnosticsReferenceDescription. - :paramtype name: str - :keyword description: A description of the sink. - :paramtype description: str - :keyword account_name: Azure Internal monitoring pipeline account. - :paramtype account_name: str - :keyword namespace: Azure Internal monitoring pipeline account namespace. - :paramtype namespace: str - :keyword ma_config_url: Azure Internal monitoring agent configuration. - :paramtype ma_config_url: str - :keyword fluentd_config_url: Azure Internal monitoring agent fluentd configuration. - :paramtype fluentd_config_url: str - :keyword auto_key_config_url: Azure Internal monitoring pipeline autokey associated with the - certificate. - :paramtype auto_key_config_url: str - """ - super(AzureInternalMonitoringPipelineSinkDescription, self).__init__(name=name, description=description, **kwargs) - self.kind = 'AzureInternalMonitoringPipeline' # type: str - self.account_name = account_name - self.namespace = namespace - self.ma_config_url = ma_config_url - self.fluentd_config_url = fluentd_config_url - self.auto_key_config_url = auto_key_config_url - - -class BackupInfo(msrest.serialization.Model): - """Represents a backup point which can be used to trigger a restore. - - :ivar backup_id: Unique backup ID . - :vartype backup_id: str - :ivar backup_chain_id: Unique backup chain ID. All backups part of the same chain has the same - backup chain id. A backup chain is comprised of 1 full backup and multiple incremental backups. - :vartype backup_chain_id: str - :ivar application_name: Name of the Service Fabric application this partition backup belongs - to. - :vartype application_name: str - :ivar service_name: Name of the Service Fabric service this partition backup belongs to. - :vartype service_name: str - :ivar partition_information: Information about the partition to which this backup belongs to. - :vartype partition_information: ~azure.servicefabric.models.PartitionInformation - :ivar backup_location: Location of the backup, relative to the backup store. - :vartype backup_location: str - :ivar backup_type: Describes the type of backup, whether its full or incremental. Possible - values include: "Invalid", "Full", "Incremental". - :vartype backup_type: str or ~azure.servicefabric.models.BackupType - :ivar epoch_of_last_backup_record: Epoch of the last record in this backup. - :vartype epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch - :ivar lsn_of_last_backup_record: LSN of the last record in this backup. - :vartype lsn_of_last_backup_record: str - :ivar creation_time_utc: The date time when this backup was taken. - :vartype creation_time_utc: ~datetime.datetime - :ivar service_manifest_version: Manifest Version of the service this partition backup belongs - to. - :vartype service_manifest_version: str - :ivar failure_error: Denotes the failure encountered in getting backup point information. - :vartype failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_chain_id': {'key': 'BackupChainId', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'backup_type': {'key': 'BackupType', 'type': 'str'}, - 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, - 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, - 'creation_time_utc': {'key': 'CreationTimeUtc', 'type': 'iso-8601'}, - 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__( - self, - *, - backup_id: Optional[str] = None, - backup_chain_id: Optional[str] = None, - application_name: Optional[str] = None, - service_name: Optional[str] = None, - partition_information: Optional["PartitionInformation"] = None, - backup_location: Optional[str] = None, - backup_type: Optional[Union[str, "BackupType"]] = None, - epoch_of_last_backup_record: Optional["Epoch"] = None, - lsn_of_last_backup_record: Optional[str] = None, - creation_time_utc: Optional[datetime.datetime] = None, - service_manifest_version: Optional[str] = None, - failure_error: Optional["FabricErrorError"] = None, - **kwargs - ): - """ - :keyword backup_id: Unique backup ID . - :paramtype backup_id: str - :keyword backup_chain_id: Unique backup chain ID. All backups part of the same chain has the - same backup chain id. A backup chain is comprised of 1 full backup and multiple incremental - backups. - :paramtype backup_chain_id: str - :keyword application_name: Name of the Service Fabric application this partition backup belongs - to. - :paramtype application_name: str - :keyword service_name: Name of the Service Fabric service this partition backup belongs to. - :paramtype service_name: str - :keyword partition_information: Information about the partition to which this backup belongs - to. - :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation - :keyword backup_location: Location of the backup, relative to the backup store. - :paramtype backup_location: str - :keyword backup_type: Describes the type of backup, whether its full or incremental. Possible - values include: "Invalid", "Full", "Incremental". - :paramtype backup_type: str or ~azure.servicefabric.models.BackupType - :keyword epoch_of_last_backup_record: Epoch of the last record in this backup. - :paramtype epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch - :keyword lsn_of_last_backup_record: LSN of the last record in this backup. - :paramtype lsn_of_last_backup_record: str - :keyword creation_time_utc: The date time when this backup was taken. - :paramtype creation_time_utc: ~datetime.datetime - :keyword service_manifest_version: Manifest Version of the service this partition backup - belongs to. - :paramtype service_manifest_version: str - :keyword failure_error: Denotes the failure encountered in getting backup point information. - :paramtype failure_error: ~azure.servicefabric.models.FabricErrorError - """ - super(BackupInfo, self).__init__(**kwargs) - self.backup_id = backup_id - self.backup_chain_id = backup_chain_id - self.application_name = application_name - self.service_name = service_name - self.partition_information = partition_information - self.backup_location = backup_location - self.backup_type = backup_type - self.epoch_of_last_backup_record = epoch_of_last_backup_record - self.lsn_of_last_backup_record = lsn_of_last_backup_record - self.creation_time_utc = creation_time_utc - self.service_manifest_version = service_manifest_version - self.failure_error = failure_error - - -class BackupPartitionDescription(msrest.serialization.Model): - """Describes the parameters for triggering partition's backup. - - :ivar backup_storage: Specifies the details of the backup storage where to save the backup. - :vartype backup_storage: ~azure.servicefabric.models.BackupStorageDescription - """ - - _attribute_map = { - 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, - } - - def __init__( - self, - *, - backup_storage: Optional["BackupStorageDescription"] = None, - **kwargs - ): - """ - :keyword backup_storage: Specifies the details of the backup storage where to save the backup. - :paramtype backup_storage: ~azure.servicefabric.models.BackupStorageDescription - """ - super(BackupPartitionDescription, self).__init__(**kwargs) - self.backup_storage = backup_storage - - -class BackupPolicyDescription(msrest.serialization.Model): - """Describes a backup policy for configuring periodic backup. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The unique name identifying this backup policy. - :vartype name: str - :ivar auto_restore_on_data_loss: Required. Specifies whether to trigger restore automatically - using the latest available backup in case the partition experiences a data loss event. - :vartype auto_restore_on_data_loss: bool - :ivar max_incremental_backups: Required. Defines the maximum number of incremental backups to - be taken between two full backups. This is just the upper limit. A full backup may be taken - before specified number of incremental backups are completed in one of the following conditions - - - * The replica has never taken a full backup since it has become primary, - * Some of the log records since the last backup has been truncated, or - * Replica passed the MaxAccumulatedBackupLogSizeInMB limit. - :vartype max_incremental_backups: int - :ivar schedule: Required. Describes the backup schedule parameters. - :vartype schedule: ~azure.servicefabric.models.BackupScheduleDescription - :ivar storage: Required. Describes the details of backup storage where to store the periodic - backups. - :vartype storage: ~azure.servicefabric.models.BackupStorageDescription - :ivar retention_policy: Describes the policy to retain backups in storage. - :vartype retention_policy: ~azure.servicefabric.models.RetentionPolicyDescription - """ - - _validation = { - 'name': {'required': True}, - 'auto_restore_on_data_loss': {'required': True}, - 'max_incremental_backups': {'required': True, 'maximum': 255, 'minimum': 0}, - 'schedule': {'required': True}, - 'storage': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'auto_restore_on_data_loss': {'key': 'AutoRestoreOnDataLoss', 'type': 'bool'}, - 'max_incremental_backups': {'key': 'MaxIncrementalBackups', 'type': 'int'}, - 'schedule': {'key': 'Schedule', 'type': 'BackupScheduleDescription'}, - 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, - 'retention_policy': {'key': 'RetentionPolicy', 'type': 'RetentionPolicyDescription'}, - } - - def __init__( - self, - *, - name: str, - auto_restore_on_data_loss: bool, - max_incremental_backups: int, - schedule: "BackupScheduleDescription", - storage: "BackupStorageDescription", - retention_policy: Optional["RetentionPolicyDescription"] = None, - **kwargs - ): - """ - :keyword name: Required. The unique name identifying this backup policy. - :paramtype name: str - :keyword auto_restore_on_data_loss: Required. Specifies whether to trigger restore - automatically using the latest available backup in case the partition experiences a data loss - event. - :paramtype auto_restore_on_data_loss: bool - :keyword max_incremental_backups: Required. Defines the maximum number of incremental backups - to be taken between two full backups. This is just the upper limit. A full backup may be taken - before specified number of incremental backups are completed in one of the following conditions - - - * The replica has never taken a full backup since it has become primary, - * Some of the log records since the last backup has been truncated, or - * Replica passed the MaxAccumulatedBackupLogSizeInMB limit. - :paramtype max_incremental_backups: int - :keyword schedule: Required. Describes the backup schedule parameters. - :paramtype schedule: ~azure.servicefabric.models.BackupScheduleDescription - :keyword storage: Required. Describes the details of backup storage where to store the periodic - backups. - :paramtype storage: ~azure.servicefabric.models.BackupStorageDescription - :keyword retention_policy: Describes the policy to retain backups in storage. - :paramtype retention_policy: ~azure.servicefabric.models.RetentionPolicyDescription - """ - super(BackupPolicyDescription, self).__init__(**kwargs) - self.name = name - self.auto_restore_on_data_loss = auto_restore_on_data_loss - self.max_incremental_backups = max_incremental_backups - self.schedule = schedule - self.storage = storage - self.retention_policy = retention_policy - - -class BackupProgressInfo(msrest.serialization.Model): - """Describes the progress of a partition's backup. - - :ivar backup_state: Represents the current state of the partition backup operation. Possible - values include: "Invalid", "Accepted", "BackupInProgress", "Success", "Failure", "Timeout". - :vartype backup_state: str or ~azure.servicefabric.models.BackupState - :ivar time_stamp_utc: TimeStamp in UTC when operation succeeded or failed. - :vartype time_stamp_utc: ~datetime.datetime - :ivar backup_id: Unique ID of the newly created backup. - :vartype backup_id: str - :ivar backup_location: Location, relative to the backup store, of the newly created backup. - :vartype backup_location: str - :ivar epoch_of_last_backup_record: Specifies the epoch of the last record included in backup. - :vartype epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch - :ivar lsn_of_last_backup_record: The LSN of last record included in backup. - :vartype lsn_of_last_backup_record: str - :ivar failure_error: Denotes the failure encountered in performing backup operation. - :vartype failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'backup_state': {'key': 'BackupState', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'epoch_of_last_backup_record': {'key': 'EpochOfLastBackupRecord', 'type': 'Epoch'}, - 'lsn_of_last_backup_record': {'key': 'LsnOfLastBackupRecord', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__( - self, - *, - backup_state: Optional[Union[str, "BackupState"]] = None, - time_stamp_utc: Optional[datetime.datetime] = None, - backup_id: Optional[str] = None, - backup_location: Optional[str] = None, - epoch_of_last_backup_record: Optional["Epoch"] = None, - lsn_of_last_backup_record: Optional[str] = None, - failure_error: Optional["FabricErrorError"] = None, - **kwargs - ): - """ - :keyword backup_state: Represents the current state of the partition backup operation. Possible - values include: "Invalid", "Accepted", "BackupInProgress", "Success", "Failure", "Timeout". - :paramtype backup_state: str or ~azure.servicefabric.models.BackupState - :keyword time_stamp_utc: TimeStamp in UTC when operation succeeded or failed. - :paramtype time_stamp_utc: ~datetime.datetime - :keyword backup_id: Unique ID of the newly created backup. - :paramtype backup_id: str - :keyword backup_location: Location, relative to the backup store, of the newly created backup. - :paramtype backup_location: str - :keyword epoch_of_last_backup_record: Specifies the epoch of the last record included in - backup. - :paramtype epoch_of_last_backup_record: ~azure.servicefabric.models.Epoch - :keyword lsn_of_last_backup_record: The LSN of last record included in backup. - :paramtype lsn_of_last_backup_record: str - :keyword failure_error: Denotes the failure encountered in performing backup operation. - :paramtype failure_error: ~azure.servicefabric.models.FabricErrorError - """ - super(BackupProgressInfo, self).__init__(**kwargs) - self.backup_state = backup_state - self.time_stamp_utc = time_stamp_utc - self.backup_id = backup_id - self.backup_location = backup_location - self.epoch_of_last_backup_record = epoch_of_last_backup_record - self.lsn_of_last_backup_record = lsn_of_last_backup_record - self.failure_error = failure_error - - -class BackupScheduleDescription(msrest.serialization.Model): - """Describes the backup schedule parameters. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: FrequencyBasedBackupScheduleDescription, TimeBasedBackupScheduleDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar schedule_kind: Required. The kind of backup schedule, time based or frequency - based.Constant filled by server. Possible values include: "Invalid", "TimeBased", - "FrequencyBased". - :vartype schedule_kind: str or ~azure.servicefabric.models.BackupScheduleKind - """ - - _validation = { - 'schedule_kind': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - } - - _subtype_map = { - 'schedule_kind': {'FrequencyBased': 'FrequencyBasedBackupScheduleDescription', 'TimeBased': 'TimeBasedBackupScheduleDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(BackupScheduleDescription, self).__init__(**kwargs) - self.schedule_kind = None # type: Optional[str] - - -class BackupSuspensionInfo(msrest.serialization.Model): - """Describes the backup suspension details. - - :ivar is_suspended: Indicates whether periodic backup is suspended at this level or not. - :vartype is_suspended: bool - :ivar suspension_inherited_from: Specifies the scope at which the backup suspension was - applied. Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype suspension_inherited_from: str or ~azure.servicefabric.models.BackupSuspensionScope - """ - - _attribute_map = { - 'is_suspended': {'key': 'IsSuspended', 'type': 'bool'}, - 'suspension_inherited_from': {'key': 'SuspensionInheritedFrom', 'type': 'str'}, - } - - def __init__( - self, - *, - is_suspended: Optional[bool] = None, - suspension_inherited_from: Optional[Union[str, "BackupSuspensionScope"]] = None, - **kwargs - ): - """ - :keyword is_suspended: Indicates whether periodic backup is suspended at this level or not. - :paramtype is_suspended: bool - :keyword suspension_inherited_from: Specifies the scope at which the backup suspension was - applied. Possible values include: "Invalid", "Partition", "Service", "Application". - :paramtype suspension_inherited_from: str or ~azure.servicefabric.models.BackupSuspensionScope - """ - super(BackupSuspensionInfo, self).__init__(**kwargs) - self.is_suspended = is_suspended - self.suspension_inherited_from = suspension_inherited_from - - -class RetentionPolicyDescription(msrest.serialization.Model): - """Describes the retention policy configured. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BasicRetentionPolicyDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar retention_policy_type: Required. The type of retention policy. Currently only "Basic" - retention policy is supported.Constant filled by server. Possible values include: "Basic", - "Invalid". - :vartype retention_policy_type: str or ~azure.servicefabric.models.RetentionPolicyType - """ - - _validation = { - 'retention_policy_type': {'required': True}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, - } - - _subtype_map = { - 'retention_policy_type': {'Basic': 'BasicRetentionPolicyDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(RetentionPolicyDescription, self).__init__(**kwargs) - self.retention_policy_type = None # type: Optional[str] - - -class BasicRetentionPolicyDescription(RetentionPolicyDescription): - """Describes basic retention policy. - - All required parameters must be populated in order to send to Azure. - - :ivar retention_policy_type: Required. The type of retention policy. Currently only "Basic" - retention policy is supported.Constant filled by server. Possible values include: "Basic", - "Invalid". - :vartype retention_policy_type: str or ~azure.servicefabric.models.RetentionPolicyType - :ivar retention_duration: Required. It is the minimum duration for which a backup created, will - remain stored in the storage and might get deleted after that span of time. It should be - specified in ISO8601 format. - :vartype retention_duration: ~datetime.timedelta - :ivar minimum_number_of_backups: It is the minimum number of backups to be retained at any - point of time. If specified with a non zero value, backups will not be deleted even if the - backups have gone past retention duration and have number of backups less than or equal to it. - :vartype minimum_number_of_backups: int - """ - - _validation = { - 'retention_policy_type': {'required': True}, - 'retention_duration': {'required': True}, - 'minimum_number_of_backups': {'minimum': 0}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'RetentionPolicyType', 'type': 'str'}, - 'retention_duration': {'key': 'RetentionDuration', 'type': 'duration'}, - 'minimum_number_of_backups': {'key': 'MinimumNumberOfBackups', 'type': 'int'}, - } - - def __init__( - self, - *, - retention_duration: datetime.timedelta, - minimum_number_of_backups: Optional[int] = None, - **kwargs - ): - """ - :keyword retention_duration: Required. It is the minimum duration for which a backup created, - will remain stored in the storage and might get deleted after that span of time. It should be - specified in ISO8601 format. - :paramtype retention_duration: ~datetime.timedelta - :keyword minimum_number_of_backups: It is the minimum number of backups to be retained at any - point of time. If specified with a non zero value, backups will not be deleted even if the - backups have gone past retention duration and have number of backups less than or equal to it. - :paramtype minimum_number_of_backups: int - """ - super(BasicRetentionPolicyDescription, self).__init__(**kwargs) - self.retention_policy_type = 'Basic' # type: str - self.retention_duration = retention_duration - self.minimum_number_of_backups = minimum_number_of_backups - - -class PropertyValue(msrest.serialization.Model): - """Describes a Service Fabric property value. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BinaryPropertyValue, DoublePropertyValue, GuidPropertyValue, Int64PropertyValue, StringPropertyValue. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property, determined by the type of data. Following are the - possible values.Constant filled by server. Possible values include: "Invalid", "Binary", - "Int64", "Double", "String", "Guid". - :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Binary': 'BinaryPropertyValue', 'Double': 'DoublePropertyValue', 'Guid': 'GuidPropertyValue', 'Int64': 'Int64PropertyValue', 'String': 'StringPropertyValue'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(PropertyValue, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class BinaryPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Binary. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property, determined by the type of data. Following are the - possible values.Constant filled by server. Possible values include: "Invalid", "Binary", - "Int64", "Double", "String", "Guid". - :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind - :ivar data: Required. Array of bytes to be sent as an integer array. Each element of array is a - number between 0 and 255. - :vartype data: list[int] - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': '[int]'}, - } - - def __init__( - self, - *, - data: List[int], - **kwargs - ): - """ - :keyword data: Required. Array of bytes to be sent as an integer array. Each element of array - is a number between 0 and 255. - :paramtype data: list[int] - """ - super(BinaryPropertyValue, self).__init__(**kwargs) - self.kind = 'Binary' # type: str - self.data = data - - -class Chaos(msrest.serialization.Model): - """Contains a description of Chaos. - - :ivar chaos_parameters: If Chaos is running, these are the parameters Chaos is running with. - :vartype chaos_parameters: ~azure.servicefabric.models.ChaosParameters - :ivar status: Current status of the Chaos run. Possible values include: "Invalid", "Running", - "Stopped". - :vartype status: str or ~azure.servicefabric.models.ChaosStatus - :ivar schedule_status: Current status of the schedule. Possible values include: "Invalid", - "Stopped", "Active", "Expired", "Pending". - :vartype schedule_status: str or ~azure.servicefabric.models.ChaosScheduleStatus - """ - - _attribute_map = { - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'schedule_status': {'key': 'ScheduleStatus', 'type': 'str'}, - } - - def __init__( - self, - *, - chaos_parameters: Optional["ChaosParameters"] = None, - status: Optional[Union[str, "ChaosStatus"]] = None, - schedule_status: Optional[Union[str, "ChaosScheduleStatus"]] = None, - **kwargs - ): - """ - :keyword chaos_parameters: If Chaos is running, these are the parameters Chaos is running with. - :paramtype chaos_parameters: ~azure.servicefabric.models.ChaosParameters - :keyword status: Current status of the Chaos run. Possible values include: "Invalid", - "Running", "Stopped". - :paramtype status: str or ~azure.servicefabric.models.ChaosStatus - :keyword schedule_status: Current status of the schedule. Possible values include: "Invalid", - "Stopped", "Active", "Expired", "Pending". - :paramtype schedule_status: str or ~azure.servicefabric.models.ChaosScheduleStatus - """ - super(Chaos, self).__init__(**kwargs) - self.chaos_parameters = chaos_parameters - self.status = status - self.schedule_status = schedule_status - - -class ChaosCodePackageRestartScheduledEvent(ApplicationEvent): - """Chaos Restart Code Package Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar fault_group_id: Required. Id of fault group. - :vartype fault_group_id: str - :ivar fault_id: Required. Id of fault. - :vartype fault_id: str - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar service_manifest_name: Required. Service manifest name. - :vartype service_manifest_name: str - :ivar code_package_name: Required. Code package name. - :vartype code_package_name: str - :ivar service_package_activation_id: Required. Id of Service package activation. - :vartype service_package_activation_id: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'node_name': {'required': True}, - 'service_manifest_name': {'required': True}, - 'code_package_name': {'required': True}, - 'service_package_activation_id': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - application_id: str, - fault_group_id: str, - fault_id: str, - node_name: str, - service_manifest_name: str, - code_package_name: str, - service_package_activation_id: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword fault_group_id: Required. Id of fault group. - :paramtype fault_group_id: str - :keyword fault_id: Required. Id of fault. - :paramtype fault_id: str - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword service_manifest_name: Required. Service manifest name. - :paramtype service_manifest_name: str - :keyword code_package_name: Required. Code package name. - :paramtype code_package_name: str - :keyword service_package_activation_id: Required. Id of Service package activation. - :paramtype service_package_activation_id: str - """ - super(ChaosCodePackageRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.kind = 'ChaosCodePackageRestartScheduled' # type: str - self.fault_group_id = fault_group_id - self.fault_id = fault_id - self.node_name = node_name - self.service_manifest_name = service_manifest_name - self.code_package_name = code_package_name - self.service_package_activation_id = service_package_activation_id - - -class ChaosContext(msrest.serialization.Model): - """Describes a map, which is a collection of (string, string) type key-value pairs. The map can be used to record information about -the Chaos run. There cannot be more than 100 such pairs and each string (key or value) can be at most 4095 characters long. -This map is set by the starter of the Chaos run to optionally store the context about the specific run. - - :ivar map: Describes a map that contains a collection of ChaosContextMapItem's. - :vartype map: dict[str, str] - """ - - _attribute_map = { - 'map': {'key': 'Map', 'type': '{str}'}, - } - - def __init__( - self, - *, - map: Optional[Dict[str, str]] = None, - **kwargs - ): - """ - :keyword map: Describes a map that contains a collection of ChaosContextMapItem's. - :paramtype map: dict[str, str] - """ - super(ChaosContext, self).__init__(**kwargs) - self.map = map - - -class ChaosEvent(msrest.serialization.Model): - """Represents an event generated during a Chaos run. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ExecutingFaultsChaosEvent, StartedChaosEvent, StoppedChaosEvent, TestErrorChaosEvent, ValidationFailedChaosEvent, WaitingChaosEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values - include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", - "Stopped". - :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind - :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :vartype time_stamp_utc: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'time_stamp_utc': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - } - - _subtype_map = { - 'kind': {'ExecutingFaults': 'ExecutingFaultsChaosEvent', 'Started': 'StartedChaosEvent', 'Stopped': 'StoppedChaosEvent', 'TestError': 'TestErrorChaosEvent', 'ValidationFailed': 'ValidationFailedChaosEvent', 'Waiting': 'WaitingChaosEvent'} - } - - def __init__( - self, - *, - time_stamp_utc: datetime.datetime, - **kwargs - ): - """ - :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :paramtype time_stamp_utc: ~datetime.datetime - """ - super(ChaosEvent, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.time_stamp_utc = time_stamp_utc - - -class ChaosEventsSegment(msrest.serialization.Model): - """Contains the list of Chaos events and the continuation token to get the next segment. - - :ivar 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. - :vartype continuation_token: str - :ivar history: List of Chaos events that meet the user-supplied criteria. - :vartype history: list[~azure.servicefabric.models.ChaosEventWrapper] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'history': {'key': 'History', 'type': '[ChaosEventWrapper]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - history: Optional[List["ChaosEventWrapper"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword history: List of Chaos events that meet the user-supplied criteria. - :paramtype history: list[~azure.servicefabric.models.ChaosEventWrapper] - """ - super(ChaosEventsSegment, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.history = history - - -class ChaosEventWrapper(msrest.serialization.Model): - """Wrapper object for Chaos event. - - :ivar chaos_event: Represents an event generated during a Chaos run. - :vartype chaos_event: ~azure.servicefabric.models.ChaosEvent - """ - - _attribute_map = { - 'chaos_event': {'key': 'ChaosEvent', 'type': 'ChaosEvent'}, - } - - def __init__( - self, - *, - chaos_event: Optional["ChaosEvent"] = None, - **kwargs - ): - """ - :keyword chaos_event: Represents an event generated during a Chaos run. - :paramtype chaos_event: ~azure.servicefabric.models.ChaosEvent - """ - super(ChaosEventWrapper, self).__init__(**kwargs) - self.chaos_event = chaos_event - - -class NodeEvent(FabricEvent): - """Represents the base for all Node Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ChaosNodeRestartScheduledEvent, NodeAbortedEvent, NodeAddedToClusterEvent, NodeClosedEvent, NodeDeactivateCompletedEvent, NodeDeactivateStartedEvent, NodeDownEvent, NodeHealthReportExpiredEvent, NodeNewHealthReportEvent, NodeOpenFailedEvent, NodeOpenSucceededEvent, NodeRemovedFromClusterEvent, NodeUpEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ChaosNodeRestartScheduled': 'ChaosNodeRestartScheduledEvent', 'NodeAborted': 'NodeAbortedEvent', 'NodeAddedToCluster': 'NodeAddedToClusterEvent', 'NodeClosed': 'NodeClosedEvent', 'NodeDeactivateCompleted': 'NodeDeactivateCompletedEvent', 'NodeDeactivateStarted': 'NodeDeactivateStartedEvent', 'NodeDown': 'NodeDownEvent', 'NodeHealthReportExpired': 'NodeHealthReportExpiredEvent', 'NodeNewHealthReport': 'NodeNewHealthReportEvent', 'NodeOpenFailed': 'NodeOpenFailedEvent', 'NodeOpenSucceeded': 'NodeOpenSucceededEvent', 'NodeRemovedFromCluster': 'NodeRemovedFromClusterEvent', 'NodeUp': 'NodeUpEvent'} - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - node_name: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - """ - super(NodeEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'NodeEvent' # type: str - self.node_name = node_name - - -class ChaosNodeRestartScheduledEvent(NodeEvent): - """Chaos Restart Node Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance_id: Required. Id of Node instance. - :vartype node_instance_id: long - :ivar fault_group_id: Required. Id of fault group. - :vartype fault_group_id: str - :ivar fault_id: Required. Id of fault. - :vartype fault_id: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - node_name: str, - node_instance_id: int, - fault_group_id: str, - fault_id: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance_id: Required. Id of Node instance. - :paramtype node_instance_id: long - :keyword fault_group_id: Required. Id of fault group. - :paramtype fault_group_id: str - :keyword fault_id: Required. Id of fault. - :paramtype fault_id: str - """ - super(ChaosNodeRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.kind = 'ChaosNodeRestartScheduled' # type: str - self.node_instance_id = node_instance_id - self.fault_group_id = fault_group_id - self.fault_id = fault_id - - -class ChaosParameters(msrest.serialization.Model): - """Defines all the parameters to configure a Chaos run. - - :ivar time_to_run_in_seconds: Total time (in seconds) for which Chaos will run before - automatically stopping. The maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue). - :vartype time_to_run_in_seconds: str - :ivar max_cluster_stabilization_timeout_in_seconds: The maximum amount of time to wait for all - cluster entities to become stable and healthy. Chaos executes in iterations and at the start of - each iteration it validates the health of cluster entities. - During validation if a cluster entity is not stable and healthy within - MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed event. - :vartype max_cluster_stabilization_timeout_in_seconds: long - :ivar max_concurrent_faults: MaxConcurrentFaults is the maximum number of concurrent faults - induced per iteration. - Chaos executes in iterations and two consecutive iterations are separated by a validation - phase. - The higher the concurrency, the more aggressive the injection of faults, leading to inducing - more complex series of states to uncover bugs. - The recommendation is to start with a value of 2 or 3 and to exercise caution while moving up. - :vartype max_concurrent_faults: long - :ivar enable_move_replica_faults: Enables or disables the move primary and move secondary - faults. - :vartype enable_move_replica_faults: bool - :ivar wait_time_between_faults_in_seconds: Wait time (in seconds) between consecutive faults - within a single iteration. - The larger the value, the lower the overlapping between faults and the simpler the sequence of - state transitions that the cluster goes through. - The recommendation is to start with a value between 1 and 5 and exercise caution while moving - up. - :vartype wait_time_between_faults_in_seconds: long - :ivar wait_time_between_iterations_in_seconds: Time-separation (in seconds) between two - consecutive iterations of Chaos. - The larger the value, the lower the fault injection rate. - :vartype wait_time_between_iterations_in_seconds: long - :ivar cluster_health_policy: Passed-in cluster health policy is used to validate health of the - cluster in between Chaos iterations. If the cluster health is in error or if an unexpected - exception happens during fault execution--to provide the cluster with some time to - recuperate--Chaos will wait for 30 minutes before the next health-check. - :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :ivar context: Describes a map, which is a collection of (string, string) type key-value pairs. - The map can be used to record information about - the Chaos run. There cannot be more than 100 such pairs and each string (key or value) can be - at most 4095 characters long. - This map is set by the starter of the Chaos run to optionally store the context about the - specific run. - :vartype context: ~azure.servicefabric.models.ChaosContext - :ivar chaos_target_filter: List of cluster entities to target for Chaos faults. - This filter can be used to target Chaos faults only to certain node types or only to certain - application instances. If ChaosTargetFilter is not used, Chaos faults all cluster entities. - If ChaosTargetFilter is used, Chaos faults only the entities that meet the ChaosTargetFilter - specification. - :vartype chaos_target_filter: ~azure.servicefabric.models.ChaosTargetFilter - """ - - _validation = { - 'max_cluster_stabilization_timeout_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'max_concurrent_faults': {'maximum': 4294967295, 'minimum': 0}, - 'wait_time_between_faults_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'wait_time_between_iterations_in_seconds': {'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'str'}, - 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'long'}, - 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, - 'enable_move_replica_faults': {'key': 'EnableMoveReplicaFaults', 'type': 'bool'}, - 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'long'}, - 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'long'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'context': {'key': 'Context', 'type': 'ChaosContext'}, - 'chaos_target_filter': {'key': 'ChaosTargetFilter', 'type': 'ChaosTargetFilter'}, - } - - def __init__( - self, - *, - time_to_run_in_seconds: Optional[str] = "4294967295", - max_cluster_stabilization_timeout_in_seconds: Optional[int] = 60, - max_concurrent_faults: Optional[int] = 1, - enable_move_replica_faults: Optional[bool] = True, - wait_time_between_faults_in_seconds: Optional[int] = 20, - wait_time_between_iterations_in_seconds: Optional[int] = 30, - cluster_health_policy: Optional["ClusterHealthPolicy"] = None, - context: Optional["ChaosContext"] = None, - chaos_target_filter: Optional["ChaosTargetFilter"] = None, - **kwargs - ): - """ - :keyword time_to_run_in_seconds: Total time (in seconds) for which Chaos will run before - automatically stopping. The maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue). - :paramtype time_to_run_in_seconds: str - :keyword max_cluster_stabilization_timeout_in_seconds: The maximum amount of time to wait for - all cluster entities to become stable and healthy. Chaos executes in iterations and at the - start of each iteration it validates the health of cluster entities. - During validation if a cluster entity is not stable and healthy within - MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed event. - :paramtype max_cluster_stabilization_timeout_in_seconds: long - :keyword max_concurrent_faults: MaxConcurrentFaults is the maximum number of concurrent faults - induced per iteration. - Chaos executes in iterations and two consecutive iterations are separated by a validation - phase. - The higher the concurrency, the more aggressive the injection of faults, leading to inducing - more complex series of states to uncover bugs. - The recommendation is to start with a value of 2 or 3 and to exercise caution while moving up. - :paramtype max_concurrent_faults: long - :keyword enable_move_replica_faults: Enables or disables the move primary and move secondary - faults. - :paramtype enable_move_replica_faults: bool - :keyword wait_time_between_faults_in_seconds: Wait time (in seconds) between consecutive faults - within a single iteration. - The larger the value, the lower the overlapping between faults and the simpler the sequence of - state transitions that the cluster goes through. - The recommendation is to start with a value between 1 and 5 and exercise caution while moving - up. - :paramtype wait_time_between_faults_in_seconds: long - :keyword wait_time_between_iterations_in_seconds: Time-separation (in seconds) between two - consecutive iterations of Chaos. - The larger the value, the lower the fault injection rate. - :paramtype wait_time_between_iterations_in_seconds: long - :keyword cluster_health_policy: Passed-in cluster health policy is used to validate health of - the cluster in between Chaos iterations. If the cluster health is in error or if an unexpected - exception happens during fault execution--to provide the cluster with some time to - recuperate--Chaos will wait for 30 minutes before the next health-check. - :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :keyword context: Describes a map, which is a collection of (string, string) type key-value - pairs. The map can be used to record information about - the Chaos run. There cannot be more than 100 such pairs and each string (key or value) can be - at most 4095 characters long. - This map is set by the starter of the Chaos run to optionally store the context about the - specific run. - :paramtype context: ~azure.servicefabric.models.ChaosContext - :keyword chaos_target_filter: List of cluster entities to target for Chaos faults. - This filter can be used to target Chaos faults only to certain node types or only to certain - application instances. If ChaosTargetFilter is not used, Chaos faults all cluster entities. - If ChaosTargetFilter is used, Chaos faults only the entities that meet the ChaosTargetFilter - specification. - :paramtype chaos_target_filter: ~azure.servicefabric.models.ChaosTargetFilter - """ - super(ChaosParameters, self).__init__(**kwargs) - self.time_to_run_in_seconds = time_to_run_in_seconds - self.max_cluster_stabilization_timeout_in_seconds = max_cluster_stabilization_timeout_in_seconds - self.max_concurrent_faults = max_concurrent_faults - self.enable_move_replica_faults = enable_move_replica_faults - self.wait_time_between_faults_in_seconds = wait_time_between_faults_in_seconds - self.wait_time_between_iterations_in_seconds = wait_time_between_iterations_in_seconds - self.cluster_health_policy = cluster_health_policy - self.context = context - self.chaos_target_filter = chaos_target_filter - - -class ChaosParametersDictionaryItem(msrest.serialization.Model): - """Defines an item in ChaosParametersDictionary of the Chaos Schedule. - - All required parameters must be populated in order to send to Azure. - - :ivar key: Required. The key identifying the Chaos Parameter in the dictionary. This key is - referenced by Chaos Schedule Jobs. - :vartype key: str - :ivar value: Required. Defines all the parameters to configure a Chaos run. - :vartype value: ~azure.servicefabric.models.ChaosParameters - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ChaosParameters'}, - } - - def __init__( - self, - *, - key: str, - value: "ChaosParameters", - **kwargs - ): - """ - :keyword key: Required. The key identifying the Chaos Parameter in the dictionary. This key is - referenced by Chaos Schedule Jobs. - :paramtype key: str - :keyword value: Required. Defines all the parameters to configure a Chaos run. - :paramtype value: ~azure.servicefabric.models.ChaosParameters - """ - super(ChaosParametersDictionaryItem, self).__init__(**kwargs) - self.key = key - self.value = value - - -class PartitionEvent(FabricEvent): - """Represents the base for all Partition Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ChaosPartitionPrimaryMoveScheduledEvent, ChaosPartitionSecondaryMoveScheduledEvent, PartitionAnalysisEvent, PartitionHealthReportExpiredEvent, PartitionNewHealthReportEvent, PartitionReconfiguredEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ChaosPartitionPrimaryMoveScheduled': 'ChaosPartitionPrimaryMoveScheduledEvent', 'ChaosPartitionSecondaryMoveScheduled': 'ChaosPartitionSecondaryMoveScheduledEvent', 'PartitionAnalysisEvent': 'PartitionAnalysisEvent', 'PartitionHealthReportExpired': 'PartitionHealthReportExpiredEvent', 'PartitionNewHealthReport': 'PartitionNewHealthReportEvent', 'PartitionReconfigured': 'PartitionReconfiguredEvent'} - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - partition_id: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - """ - super(PartitionEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'PartitionEvent' # type: str - self.partition_id = partition_id - - -class ChaosPartitionPrimaryMoveScheduledEvent(PartitionEvent): - """Chaos Move Primary Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar fault_group_id: Required. Id of fault group. - :vartype fault_group_id: str - :ivar fault_id: Required. Id of fault. - :vartype fault_id: str - :ivar service_name: Required. Service name. - :vartype service_name: str - :ivar node_to: Required. The name of a Service Fabric node. - :vartype node_to: str - :ivar forced_move: Required. Indicates a forced move. - :vartype forced_move: bool - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_name': {'required': True}, - 'node_to': {'required': True}, - 'forced_move': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'node_to': {'key': 'NodeTo', 'type': 'str'}, - 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - partition_id: str, - fault_group_id: str, - fault_id: str, - service_name: str, - node_to: str, - forced_move: bool, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword fault_group_id: Required. Id of fault group. - :paramtype fault_group_id: str - :keyword fault_id: Required. Id of fault. - :paramtype fault_id: str - :keyword service_name: Required. Service name. - :paramtype service_name: str - :keyword node_to: Required. The name of a Service Fabric node. - :paramtype node_to: str - :keyword forced_move: Required. Indicates a forced move. - :paramtype forced_move: bool - """ - super(ChaosPartitionPrimaryMoveScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.kind = 'ChaosPartitionPrimaryMoveScheduled' # type: str - self.fault_group_id = fault_group_id - self.fault_id = fault_id - self.service_name = service_name - self.node_to = node_to - self.forced_move = forced_move - - -class ChaosPartitionSecondaryMoveScheduledEvent(PartitionEvent): - """Chaos Move Secondary Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar fault_group_id: Required. Id of fault group. - :vartype fault_group_id: str - :ivar fault_id: Required. Id of fault. - :vartype fault_id: str - :ivar service_name: Required. Service name. - :vartype service_name: str - :ivar source_node: Required. The name of a Service Fabric node. - :vartype source_node: str - :ivar destination_node: Required. The name of a Service Fabric node. - :vartype destination_node: str - :ivar forced_move: Required. Indicates a forced move. - :vartype forced_move: bool - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_name': {'required': True}, - 'source_node': {'required': True}, - 'destination_node': {'required': True}, - 'forced_move': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'source_node': {'key': 'SourceNode', 'type': 'str'}, - 'destination_node': {'key': 'DestinationNode', 'type': 'str'}, - 'forced_move': {'key': 'ForcedMove', 'type': 'bool'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - partition_id: str, - fault_group_id: str, - fault_id: str, - service_name: str, - source_node: str, - destination_node: str, - forced_move: bool, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword fault_group_id: Required. Id of fault group. - :paramtype fault_group_id: str - :keyword fault_id: Required. Id of fault. - :paramtype fault_id: str - :keyword service_name: Required. Service name. - :paramtype service_name: str - :keyword source_node: Required. The name of a Service Fabric node. - :paramtype source_node: str - :keyword destination_node: Required. The name of a Service Fabric node. - :paramtype destination_node: str - :keyword forced_move: Required. Indicates a forced move. - :paramtype forced_move: bool - """ - super(ChaosPartitionSecondaryMoveScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.kind = 'ChaosPartitionSecondaryMoveScheduled' # type: str - self.fault_group_id = fault_group_id - self.fault_id = fault_id - self.service_name = service_name - self.source_node = source_node - self.destination_node = destination_node - self.forced_move = forced_move - - -class ReplicaEvent(FabricEvent): - """Represents the base for all Replica Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ChaosReplicaRemovalScheduledEvent, ChaosReplicaRestartScheduledEvent, StatefulReplicaHealthReportExpiredEvent, StatefulReplicaNewHealthReportEvent, StatelessReplicaHealthReportExpiredEvent, StatelessReplicaNewHealthReportEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :vartype replica_id: long - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - } - - _subtype_map = { - 'kind': {'ChaosReplicaRemovalScheduled': 'ChaosReplicaRemovalScheduledEvent', 'ChaosReplicaRestartScheduled': 'ChaosReplicaRestartScheduledEvent', 'StatefulReplicaHealthReportExpired': 'StatefulReplicaHealthReportExpiredEvent', 'StatefulReplicaNewHealthReport': 'StatefulReplicaNewHealthReportEvent', 'StatelessReplicaHealthReportExpired': 'StatelessReplicaHealthReportExpiredEvent', 'StatelessReplicaNewHealthReport': 'StatelessReplicaNewHealthReportEvent'} - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - partition_id: str, - replica_id: int, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: long - """ - super(ReplicaEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ReplicaEvent' # type: str - self.partition_id = partition_id - self.replica_id = replica_id - - -class ChaosReplicaRemovalScheduledEvent(ReplicaEvent): - """Chaos Remove Replica Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :vartype replica_id: long - :ivar fault_group_id: Required. Id of fault group. - :vartype fault_group_id: str - :ivar fault_id: Required. Id of fault. - :vartype fault_id: str - :ivar service_uri: Required. Service name. - :vartype service_uri: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_uri': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - partition_id: str, - replica_id: int, - fault_group_id: str, - fault_id: str, - service_uri: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: long - :keyword fault_group_id: Required. Id of fault group. - :paramtype fault_group_id: str - :keyword fault_id: Required. Id of fault. - :paramtype fault_id: str - :keyword service_uri: Required. Service name. - :paramtype service_uri: str - """ - super(ChaosReplicaRemovalScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.kind = 'ChaosReplicaRemovalScheduled' # type: str - self.fault_group_id = fault_group_id - self.fault_id = fault_id - self.service_uri = service_uri - - -class ChaosReplicaRestartScheduledEvent(ReplicaEvent): - """Chaos Restart Replica Fault Scheduled event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :vartype replica_id: long - :ivar fault_group_id: Required. Id of fault group. - :vartype fault_group_id: str - :ivar fault_id: Required. Id of fault. - :vartype fault_id: str - :ivar service_uri: Required. Service name. - :vartype service_uri: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'fault_group_id': {'required': True}, - 'fault_id': {'required': True}, - 'service_uri': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'fault_group_id': {'key': 'FaultGroupId', 'type': 'str'}, - 'fault_id': {'key': 'FaultId', 'type': 'str'}, - 'service_uri': {'key': 'ServiceUri', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - partition_id: str, - replica_id: int, - fault_group_id: str, - fault_id: str, - service_uri: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: long - :keyword fault_group_id: Required. Id of fault group. - :paramtype fault_group_id: str - :keyword fault_id: Required. Id of fault. - :paramtype fault_id: str - :keyword service_uri: Required. Service name. - :paramtype service_uri: str - """ - super(ChaosReplicaRestartScheduledEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.kind = 'ChaosReplicaRestartScheduled' # type: str - self.fault_group_id = fault_group_id - self.fault_id = fault_id - self.service_uri = service_uri - - -class ChaosSchedule(msrest.serialization.Model): - """Defines the schedule used by Chaos. - - :ivar start_date: The date and time Chaos will start using this schedule. - :vartype start_date: ~datetime.datetime - :ivar expiry_date: The date and time Chaos will continue to use this schedule until. - :vartype expiry_date: ~datetime.datetime - :ivar chaos_parameters_dictionary: A mapping of string names to Chaos Parameters to be - referenced by Chaos Schedule Jobs. - :vartype chaos_parameters_dictionary: - list[~azure.servicefabric.models.ChaosParametersDictionaryItem] - :ivar jobs: A list of all Chaos Schedule Jobs that will be automated by the schedule. - :vartype jobs: list[~azure.servicefabric.models.ChaosScheduleJob] - """ - - _attribute_map = { - 'start_date': {'key': 'StartDate', 'type': 'iso-8601'}, - 'expiry_date': {'key': 'ExpiryDate', 'type': 'iso-8601'}, - 'chaos_parameters_dictionary': {'key': 'ChaosParametersDictionary', 'type': '[ChaosParametersDictionaryItem]'}, - 'jobs': {'key': 'Jobs', 'type': '[ChaosScheduleJob]'}, - } - - def __init__( - self, - *, - start_date: Optional[datetime.datetime] = "1601-01-01T00:00:00Z", - expiry_date: Optional[datetime.datetime] = "9999-12-31T23:59:59.999Z", - chaos_parameters_dictionary: Optional[List["ChaosParametersDictionaryItem"]] = None, - jobs: Optional[List["ChaosScheduleJob"]] = None, - **kwargs - ): - """ - :keyword start_date: The date and time Chaos will start using this schedule. - :paramtype start_date: ~datetime.datetime - :keyword expiry_date: The date and time Chaos will continue to use this schedule until. - :paramtype expiry_date: ~datetime.datetime - :keyword chaos_parameters_dictionary: A mapping of string names to Chaos Parameters to be - referenced by Chaos Schedule Jobs. - :paramtype chaos_parameters_dictionary: - list[~azure.servicefabric.models.ChaosParametersDictionaryItem] - :keyword jobs: A list of all Chaos Schedule Jobs that will be automated by the schedule. - :paramtype jobs: list[~azure.servicefabric.models.ChaosScheduleJob] - """ - super(ChaosSchedule, self).__init__(**kwargs) - self.start_date = start_date - self.expiry_date = expiry_date - self.chaos_parameters_dictionary = chaos_parameters_dictionary - self.jobs = jobs - - -class ChaosScheduleDescription(msrest.serialization.Model): - """Defines the Chaos Schedule used by Chaos and the version of the Chaos Schedule. The version value wraps back to 0 after surpassing 2,147,483,647. - - :ivar version: The version number of the Schedule. - :vartype version: int - :ivar schedule: Defines the schedule used by Chaos. - :vartype schedule: ~azure.servicefabric.models.ChaosSchedule - """ - - _validation = { - 'version': {'minimum': 0}, - } - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'int'}, - 'schedule': {'key': 'Schedule', 'type': 'ChaosSchedule'}, - } - - def __init__( - self, - *, - version: Optional[int] = None, - schedule: Optional["ChaosSchedule"] = None, - **kwargs - ): - """ - :keyword version: The version number of the Schedule. - :paramtype version: int - :keyword schedule: Defines the schedule used by Chaos. - :paramtype schedule: ~azure.servicefabric.models.ChaosSchedule - """ - super(ChaosScheduleDescription, self).__init__(**kwargs) - self.version = version - self.schedule = schedule - - -class ChaosScheduleJob(msrest.serialization.Model): - """Defines a repetition rule and parameters of Chaos to be used with the Chaos Schedule. - - :ivar chaos_parameters: A reference to which Chaos Parameters of the Chaos Schedule to use. - :vartype chaos_parameters: str - :ivar days: Defines the days of the week that a Chaos Schedule Job will run for. - :vartype days: ~azure.servicefabric.models.ChaosScheduleJobActiveDaysOfWeek - :ivar times: A list of Time Ranges that specify when during active days that this job will run. - The times are interpreted as UTC. - :vartype times: list[~azure.servicefabric.models.TimeRange] - """ - - _attribute_map = { - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'str'}, - 'days': {'key': 'Days', 'type': 'ChaosScheduleJobActiveDaysOfWeek'}, - 'times': {'key': 'Times', 'type': '[TimeRange]'}, - } - - def __init__( - self, - *, - chaos_parameters: Optional[str] = None, - days: Optional["ChaosScheduleJobActiveDaysOfWeek"] = None, - times: Optional[List["TimeRange"]] = None, - **kwargs - ): - """ - :keyword chaos_parameters: A reference to which Chaos Parameters of the Chaos Schedule to use. - :paramtype chaos_parameters: str - :keyword days: Defines the days of the week that a Chaos Schedule Job will run for. - :paramtype days: ~azure.servicefabric.models.ChaosScheduleJobActiveDaysOfWeek - :keyword times: A list of Time Ranges that specify when during active days that this job will - run. The times are interpreted as UTC. - :paramtype times: list[~azure.servicefabric.models.TimeRange] - """ - super(ChaosScheduleJob, self).__init__(**kwargs) - self.chaos_parameters = chaos_parameters - self.days = days - self.times = times - - -class ChaosScheduleJobActiveDaysOfWeek(msrest.serialization.Model): - """Defines the days of the week that a Chaos Schedule Job will run for. - - :ivar sunday: Indicates if the Chaos Schedule Job will run on Sunday. - :vartype sunday: bool - :ivar monday: Indicates if the Chaos Schedule Job will run on Monday. - :vartype monday: bool - :ivar tuesday: Indicates if the Chaos Schedule Job will run on Tuesday. - :vartype tuesday: bool - :ivar wednesday: Indicates if the Chaos Schedule Job will run on Wednesday. - :vartype wednesday: bool - :ivar thursday: Indicates if the Chaos Schedule Job will run on Thursday. - :vartype thursday: bool - :ivar friday: Indicates if the Chaos Schedule Job will run on Friday. - :vartype friday: bool - :ivar saturday: Indicates if the Chaos Schedule Job will run on Saturday. - :vartype saturday: bool - """ - - _attribute_map = { - 'sunday': {'key': 'Sunday', 'type': 'bool'}, - 'monday': {'key': 'Monday', 'type': 'bool'}, - 'tuesday': {'key': 'Tuesday', 'type': 'bool'}, - 'wednesday': {'key': 'Wednesday', 'type': 'bool'}, - 'thursday': {'key': 'Thursday', 'type': 'bool'}, - 'friday': {'key': 'Friday', 'type': 'bool'}, - 'saturday': {'key': 'Saturday', 'type': 'bool'}, - } - - def __init__( - self, - *, - sunday: Optional[bool] = False, - monday: Optional[bool] = False, - tuesday: Optional[bool] = False, - wednesday: Optional[bool] = False, - thursday: Optional[bool] = False, - friday: Optional[bool] = False, - saturday: Optional[bool] = False, - **kwargs - ): - """ - :keyword sunday: Indicates if the Chaos Schedule Job will run on Sunday. - :paramtype sunday: bool - :keyword monday: Indicates if the Chaos Schedule Job will run on Monday. - :paramtype monday: bool - :keyword tuesday: Indicates if the Chaos Schedule Job will run on Tuesday. - :paramtype tuesday: bool - :keyword wednesday: Indicates if the Chaos Schedule Job will run on Wednesday. - :paramtype wednesday: bool - :keyword thursday: Indicates if the Chaos Schedule Job will run on Thursday. - :paramtype thursday: bool - :keyword friday: Indicates if the Chaos Schedule Job will run on Friday. - :paramtype friday: bool - :keyword saturday: Indicates if the Chaos Schedule Job will run on Saturday. - :paramtype saturday: bool - """ - super(ChaosScheduleJobActiveDaysOfWeek, self).__init__(**kwargs) - self.sunday = sunday - self.monday = monday - self.tuesday = tuesday - self.wednesday = wednesday - self.thursday = thursday - self.friday = friday - self.saturday = saturday - - -class ClusterEvent(FabricEvent): - """Represents the base for all Cluster Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ChaosStartedEvent, ChaosStoppedEvent, ClusterHealthReportExpiredEvent, ClusterNewHealthReportEvent, ClusterUpgradeCompletedEvent, ClusterUpgradeDomainCompletedEvent, ClusterUpgradeRollbackCompletedEvent, ClusterUpgradeRollbackStartedEvent, ClusterUpgradeStartedEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - } - - _subtype_map = { - 'kind': {'ChaosStarted': 'ChaosStartedEvent', 'ChaosStopped': 'ChaosStoppedEvent', 'ClusterHealthReportExpired': 'ClusterHealthReportExpiredEvent', 'ClusterNewHealthReport': 'ClusterNewHealthReportEvent', 'ClusterUpgradeCompleted': 'ClusterUpgradeCompletedEvent', 'ClusterUpgradeDomainCompleted': 'ClusterUpgradeDomainCompletedEvent', 'ClusterUpgradeRollbackCompleted': 'ClusterUpgradeRollbackCompletedEvent', 'ClusterUpgradeRollbackStarted': 'ClusterUpgradeRollbackStartedEvent', 'ClusterUpgradeStarted': 'ClusterUpgradeStartedEvent'} - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - """ - super(ClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ClusterEvent' # type: str - - -class ChaosStartedEvent(ClusterEvent): - """Chaos Started event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar max_concurrent_faults: Required. Maximum number of concurrent faults. - :vartype max_concurrent_faults: long - :ivar time_to_run_in_seconds: Required. Time to run in seconds. - :vartype time_to_run_in_seconds: float - :ivar max_cluster_stabilization_timeout_in_seconds: Required. Maximum timeout for cluster - stabilization in seconds. - :vartype max_cluster_stabilization_timeout_in_seconds: float - :ivar wait_time_between_iterations_in_seconds: Required. Wait time between iterations in - seconds. - :vartype wait_time_between_iterations_in_seconds: float - :ivar wait_time_between_faults_in_seconds: Required. Wait time between faults in seconds. - :vartype wait_time_between_faults_in_seconds: float - :ivar move_replica_fault_enabled: Required. Indicates MoveReplica fault is enabled. - :vartype move_replica_fault_enabled: bool - :ivar included_node_type_list: Required. List of included Node types. - :vartype included_node_type_list: str - :ivar included_application_list: Required. List of included Applications. - :vartype included_application_list: str - :ivar cluster_health_policy: Required. Health policy. - :vartype cluster_health_policy: str - :ivar chaos_context: Required. Chaos Context. - :vartype chaos_context: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'max_concurrent_faults': {'required': True}, - 'time_to_run_in_seconds': {'required': True}, - 'max_cluster_stabilization_timeout_in_seconds': {'required': True}, - 'wait_time_between_iterations_in_seconds': {'required': True}, - 'wait_time_between_faults_in_seconds': {'required': True}, - 'move_replica_fault_enabled': {'required': True}, - 'included_node_type_list': {'required': True}, - 'included_application_list': {'required': True}, - 'cluster_health_policy': {'required': True}, - 'chaos_context': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'max_concurrent_faults': {'key': 'MaxConcurrentFaults', 'type': 'long'}, - 'time_to_run_in_seconds': {'key': 'TimeToRunInSeconds', 'type': 'float'}, - 'max_cluster_stabilization_timeout_in_seconds': {'key': 'MaxClusterStabilizationTimeoutInSeconds', 'type': 'float'}, - 'wait_time_between_iterations_in_seconds': {'key': 'WaitTimeBetweenIterationsInSeconds', 'type': 'float'}, - 'wait_time_between_faults_in_seconds': {'key': 'WaitTimeBetweenFaultsInSeconds', 'type': 'float'}, - 'move_replica_fault_enabled': {'key': 'MoveReplicaFaultEnabled', 'type': 'bool'}, - 'included_node_type_list': {'key': 'IncludedNodeTypeList', 'type': 'str'}, - 'included_application_list': {'key': 'IncludedApplicationList', 'type': 'str'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'str'}, - 'chaos_context': {'key': 'ChaosContext', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - max_concurrent_faults: int, - time_to_run_in_seconds: float, - max_cluster_stabilization_timeout_in_seconds: float, - wait_time_between_iterations_in_seconds: float, - wait_time_between_faults_in_seconds: float, - move_replica_fault_enabled: bool, - included_node_type_list: str, - included_application_list: str, - cluster_health_policy: str, - chaos_context: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword max_concurrent_faults: Required. Maximum number of concurrent faults. - :paramtype max_concurrent_faults: long - :keyword time_to_run_in_seconds: Required. Time to run in seconds. - :paramtype time_to_run_in_seconds: float - :keyword max_cluster_stabilization_timeout_in_seconds: Required. Maximum timeout for cluster - stabilization in seconds. - :paramtype max_cluster_stabilization_timeout_in_seconds: float - :keyword wait_time_between_iterations_in_seconds: Required. Wait time between iterations in - seconds. - :paramtype wait_time_between_iterations_in_seconds: float - :keyword wait_time_between_faults_in_seconds: Required. Wait time between faults in seconds. - :paramtype wait_time_between_faults_in_seconds: float - :keyword move_replica_fault_enabled: Required. Indicates MoveReplica fault is enabled. - :paramtype move_replica_fault_enabled: bool - :keyword included_node_type_list: Required. List of included Node types. - :paramtype included_node_type_list: str - :keyword included_application_list: Required. List of included Applications. - :paramtype included_application_list: str - :keyword cluster_health_policy: Required. Health policy. - :paramtype cluster_health_policy: str - :keyword chaos_context: Required. Chaos Context. - :paramtype chaos_context: str - """ - super(ChaosStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ChaosStarted' # type: str - self.max_concurrent_faults = max_concurrent_faults - self.time_to_run_in_seconds = time_to_run_in_seconds - self.max_cluster_stabilization_timeout_in_seconds = max_cluster_stabilization_timeout_in_seconds - self.wait_time_between_iterations_in_seconds = wait_time_between_iterations_in_seconds - self.wait_time_between_faults_in_seconds = wait_time_between_faults_in_seconds - self.move_replica_fault_enabled = move_replica_fault_enabled - self.included_node_type_list = included_node_type_list - self.included_application_list = included_application_list - self.cluster_health_policy = cluster_health_policy - self.chaos_context = chaos_context - - -class ChaosStoppedEvent(ClusterEvent): - """Chaos Stopped event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar reason: Required. Describes reason. - :vartype reason: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'reason': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - reason: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword reason: Required. Describes reason. - :paramtype reason: str - """ - super(ChaosStoppedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ChaosStopped' # type: str - self.reason = reason - - -class ChaosTargetFilter(msrest.serialization.Model): - """Defines all filters for targeted Chaos faults, for example, faulting only certain node types or faulting only certain applications. -If ChaosTargetFilter is not used, Chaos faults all cluster entities. If ChaosTargetFilter is used, Chaos faults only the entities that meet the ChaosTargetFilter -specification. NodeTypeInclusionList and ApplicationInclusionList allow a union semantics only. It is not possible to specify an intersection -of NodeTypeInclusionList and ApplicationInclusionList. For example, it is not possible to specify "fault this application only when it is on that node type." -Once an entity is included in either NodeTypeInclusionList or ApplicationInclusionList, that entity cannot be excluded using ChaosTargetFilter. Even if -applicationX does not appear in ApplicationInclusionList, in some Chaos iteration applicationX can be faulted because it happens to be on a node of nodeTypeY that is included -in NodeTypeInclusionList. If both NodeTypeInclusionList and ApplicationInclusionList are null or empty, an ArgumentException is thrown. - - :ivar node_type_inclusion_list: A list of node types to include in Chaos faults. - All types of faults (restart node, restart code package, remove replica, restart replica, move - primary, and move secondary) are enabled for the nodes of these node types. - If a node type (say NodeTypeX) does not appear in the NodeTypeInclusionList, then node level - faults (like NodeRestart) will never be enabled for the nodes of - NodeTypeX, but code package and replica faults can still be enabled for NodeTypeX if an - application in the ApplicationInclusionList. - happens to reside on a node of NodeTypeX. - At most 100 node type names can be included in this list, to increase this number, a config - upgrade is required for MaxNumberOfNodeTypesInChaosEntityFilter configuration. - :vartype node_type_inclusion_list: list[str] - :ivar application_inclusion_list: A list of application URIs to include in Chaos faults. - All replicas belonging to services of these applications are amenable to replica faults - (restart replica, remove replica, move primary, and move secondary) by Chaos. - Chaos may restart a code package only if the code package hosts replicas of these applications - only. - If an application does not appear in this list, it can still be faulted in some Chaos - iteration if the application ends up on a node of a node type that is included in - NodeTypeInclusionList. - However, if applicationX is tied to nodeTypeY through placement constraints and applicationX - is absent from ApplicationInclusionList and nodeTypeY is absent from NodeTypeInclusionList, - then applicationX will never be faulted. - At most 1000 application names can be included in this list, to increase this number, a config - upgrade is required for MaxNumberOfApplicationsInChaosEntityFilter configuration. - :vartype application_inclusion_list: list[str] - """ - - _attribute_map = { - 'node_type_inclusion_list': {'key': 'NodeTypeInclusionList', 'type': '[str]'}, - 'application_inclusion_list': {'key': 'ApplicationInclusionList', 'type': '[str]'}, - } - - def __init__( - self, - *, - node_type_inclusion_list: Optional[List[str]] = None, - application_inclusion_list: Optional[List[str]] = None, - **kwargs - ): - """ - :keyword node_type_inclusion_list: A list of node types to include in Chaos faults. - All types of faults (restart node, restart code package, remove replica, restart replica, move - primary, and move secondary) are enabled for the nodes of these node types. - If a node type (say NodeTypeX) does not appear in the NodeTypeInclusionList, then node level - faults (like NodeRestart) will never be enabled for the nodes of - NodeTypeX, but code package and replica faults can still be enabled for NodeTypeX if an - application in the ApplicationInclusionList. - happens to reside on a node of NodeTypeX. - At most 100 node type names can be included in this list, to increase this number, a config - upgrade is required for MaxNumberOfNodeTypesInChaosEntityFilter configuration. - :paramtype node_type_inclusion_list: list[str] - :keyword application_inclusion_list: A list of application URIs to include in Chaos faults. - All replicas belonging to services of these applications are amenable to replica faults - (restart replica, remove replica, move primary, and move secondary) by Chaos. - Chaos may restart a code package only if the code package hosts replicas of these applications - only. - If an application does not appear in this list, it can still be faulted in some Chaos - iteration if the application ends up on a node of a node type that is included in - NodeTypeInclusionList. - However, if applicationX is tied to nodeTypeY through placement constraints and applicationX - is absent from ApplicationInclusionList and nodeTypeY is absent from NodeTypeInclusionList, - then applicationX will never be faulted. - At most 1000 application names can be included in this list, to increase this number, a config - upgrade is required for MaxNumberOfApplicationsInChaosEntityFilter configuration. - :paramtype application_inclusion_list: list[str] - """ - super(ChaosTargetFilter, self).__init__(**kwargs) - self.node_type_inclusion_list = node_type_inclusion_list - self.application_inclusion_list = application_inclusion_list - - -class PropertyBatchOperation(msrest.serialization.Model): - """Represents the base type for property operations that can be put into a batch and submitted. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CheckExistsPropertyBatchOperation, CheckSequencePropertyBatchOperation, CheckValuePropertyBatchOperation, DeletePropertyBatchOperation, GetPropertyBatchOperation, PutPropertyBatchOperation. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch operation, determined by the operation to be - performed. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind - :ivar property_name: Required. The name of the Service Fabric property. - :vartype property_name: str - """ - - _validation = { - 'kind': {'required': True}, - 'property_name': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'CheckExists': 'CheckExistsPropertyBatchOperation', 'CheckSequence': 'CheckSequencePropertyBatchOperation', 'CheckValue': 'CheckValuePropertyBatchOperation', 'Delete': 'DeletePropertyBatchOperation', 'Get': 'GetPropertyBatchOperation', 'Put': 'PutPropertyBatchOperation'} - } - - def __init__( - self, - *, - property_name: str, - **kwargs - ): - """ - :keyword property_name: Required. The name of the Service Fabric property. - :paramtype property_name: str - """ - super(PropertyBatchOperation, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.property_name = property_name - - -class CheckExistsPropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that compares the Boolean existence of a property with the Exists argument. -The PropertyBatchOperation operation fails if the property's existence is not equal to the Exists argument. -The CheckExistsPropertyBatchOperation is generally used as a precondition for the write operations in the batch. -Note that if one PropertyBatchOperation in a PropertyBatch fails, -the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch operation, determined by the operation to be - performed. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind - :ivar property_name: Required. The name of the Service Fabric property. - :vartype property_name: str - :ivar exists: Required. Whether or not the property should exist for the operation to pass. - :vartype exists: bool - """ - - _validation = { - 'kind': {'required': True}, - 'property_name': {'required': True}, - 'exists': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'exists': {'key': 'Exists', 'type': 'bool'}, - } - - def __init__( - self, - *, - property_name: str, - exists: bool, - **kwargs - ): - """ - :keyword property_name: Required. The name of the Service Fabric property. - :paramtype property_name: str - :keyword exists: Required. Whether or not the property should exist for the operation to pass. - :paramtype exists: bool - """ - super(CheckExistsPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.kind = 'CheckExists' # type: str - self.exists = exists - - -class CheckSequencePropertyBatchOperation(PropertyBatchOperation): - """Compares the Sequence Number of a property with the SequenceNumber argument. -A property's sequence number can be thought of as that property's version. -Every time the property is modified, its sequence number is increased. -The sequence number can be found in a property's metadata. -The comparison fails if the sequence numbers are not equal. -CheckSequencePropertyBatchOperation is generally used as a precondition for the write operations in the batch. -Note that if one PropertyBatchOperation in a PropertyBatch fails, -the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch operation, determined by the operation to be - performed. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind - :ivar property_name: Required. The name of the Service Fabric property. - :vartype property_name: str - :ivar sequence_number: Required. The expected sequence number. - :vartype sequence_number: str - """ - - _validation = { - 'kind': {'required': True}, - 'property_name': {'required': True}, - 'sequence_number': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - } - - def __init__( - self, - *, - property_name: str, - sequence_number: str, - **kwargs - ): - """ - :keyword property_name: Required. The name of the Service Fabric property. - :paramtype property_name: str - :keyword sequence_number: Required. The expected sequence number. - :paramtype sequence_number: str - """ - super(CheckSequencePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.kind = 'CheckSequence' # type: str - self.sequence_number = sequence_number - - -class CheckValuePropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that compares the value of the property with the expected value. -The CheckValuePropertyBatchOperation is generally used as a precondition for the write operations in the batch. -Note that if one PropertyBatchOperation in a PropertyBatch fails, -the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch operation, determined by the operation to be - performed. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind - :ivar property_name: Required. The name of the Service Fabric property. - :vartype property_name: str - :ivar value: Required. The expected property value. - :vartype value: ~azure.servicefabric.models.PropertyValue - """ - - _validation = { - 'kind': {'required': True}, - 'property_name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - } - - def __init__( - self, - *, - property_name: str, - value: "PropertyValue", - **kwargs - ): - """ - :keyword property_name: Required. The name of the Service Fabric property. - :paramtype property_name: str - :keyword value: Required. The expected property value. - :paramtype value: ~azure.servicefabric.models.PropertyValue - """ - super(CheckValuePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.kind = 'CheckValue' # type: str - self.value = value - - -class ClusterConfiguration(msrest.serialization.Model): - """Information about the standalone cluster configuration. - - :ivar cluster_configuration: The contents of the cluster configuration file. - :vartype cluster_configuration: str - """ - - _attribute_map = { - 'cluster_configuration': {'key': 'ClusterConfiguration', 'type': 'str'}, - } - - def __init__( - self, - *, - cluster_configuration: Optional[str] = None, - **kwargs - ): - """ - :keyword cluster_configuration: The contents of the cluster configuration file. - :paramtype cluster_configuration: str - """ - super(ClusterConfiguration, self).__init__(**kwargs) - self.cluster_configuration = cluster_configuration - - -class ClusterConfigurationUpgradeDescription(msrest.serialization.Model): - """Describes the parameters for a standalone cluster configuration upgrade. - - All required parameters must be populated in order to send to Azure. - - :ivar cluster_config: Required. The cluster configuration as a JSON string. For example, `this - file - `_ - contains JSON describing the `nodes and other properties of the cluster - `_. - :vartype cluster_config: str - :ivar health_check_retry_timeout: The length of time between attempts to perform health checks - if the application or cluster is not healthy. - :vartype health_check_retry_timeout: ~datetime.timedelta - :ivar health_check_wait_duration_in_seconds: The length of time to wait after completing an - upgrade domain before starting the health checks process. - :vartype health_check_wait_duration_in_seconds: ~datetime.timedelta - :ivar health_check_stable_duration_in_seconds: The length of time that the application or - cluster must remain healthy before the upgrade proceeds to the next upgrade domain. - :vartype health_check_stable_duration_in_seconds: ~datetime.timedelta - :ivar upgrade_domain_timeout_in_seconds: The timeout for the upgrade domain. - :vartype upgrade_domain_timeout_in_seconds: ~datetime.timedelta - :ivar upgrade_timeout_in_seconds: The upgrade timeout. - :vartype upgrade_timeout_in_seconds: ~datetime.timedelta - :ivar max_percent_unhealthy_applications: The maximum allowed percentage of unhealthy - applications during the upgrade. Allowed values are integer values from zero to 100. - :vartype max_percent_unhealthy_applications: int - :ivar max_percent_unhealthy_nodes: The maximum allowed percentage of unhealthy nodes during the - upgrade. Allowed values are integer values from zero to 100. - :vartype max_percent_unhealthy_nodes: int - :ivar max_percent_delta_unhealthy_nodes: The maximum allowed percentage of delta health - degradation during the upgrade. Allowed values are integer values from zero to 100. - :vartype max_percent_delta_unhealthy_nodes: int - :ivar max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum allowed percentage of - upgrade domain delta health degradation during the upgrade. Allowed values are integer values - from zero to 100. - :vartype max_percent_upgrade_domain_delta_unhealthy_nodes: int - :ivar application_health_policies: Defines the application health policy map used to evaluate - the health of an application or one of its children entities. - :vartype application_health_policies: ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _validation = { - 'cluster_config': {'required': True}, - } - - _attribute_map = { - 'cluster_config': {'key': 'ClusterConfig', 'type': 'str'}, - 'health_check_retry_timeout': {'key': 'HealthCheckRetryTimeout', 'type': 'duration'}, - 'health_check_wait_duration_in_seconds': {'key': 'HealthCheckWaitDurationInSeconds', 'type': 'duration'}, - 'health_check_stable_duration_in_seconds': {'key': 'HealthCheckStableDurationInSeconds', 'type': 'duration'}, - 'upgrade_domain_timeout_in_seconds': {'key': 'UpgradeDomainTimeoutInSeconds', 'type': 'duration'}, - 'upgrade_timeout_in_seconds': {'key': 'UpgradeTimeoutInSeconds', 'type': 'duration'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, - 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__( - self, - *, - cluster_config: str, - health_check_retry_timeout: Optional[datetime.timedelta] = "PT0H0M0S", - health_check_wait_duration_in_seconds: Optional[datetime.timedelta] = "PT0H0M0S", - health_check_stable_duration_in_seconds: Optional[datetime.timedelta] = "PT0H0M0S", - upgrade_domain_timeout_in_seconds: Optional[datetime.timedelta] = "PT0H0M0S", - upgrade_timeout_in_seconds: Optional[datetime.timedelta] = "PT0H0M0S", - max_percent_unhealthy_applications: Optional[int] = 0, - max_percent_unhealthy_nodes: Optional[int] = 0, - max_percent_delta_unhealthy_nodes: Optional[int] = 0, - max_percent_upgrade_domain_delta_unhealthy_nodes: Optional[int] = 0, - application_health_policies: Optional["ApplicationHealthPolicies"] = None, - **kwargs - ): - """ - :keyword cluster_config: Required. The cluster configuration as a JSON string. For example, - `this file - `_ - contains JSON describing the `nodes and other properties of the cluster - `_. - :paramtype cluster_config: str - :keyword health_check_retry_timeout: The length of time between attempts to perform health - checks if the application or cluster is not healthy. - :paramtype health_check_retry_timeout: ~datetime.timedelta - :keyword health_check_wait_duration_in_seconds: The length of time to wait after completing an - upgrade domain before starting the health checks process. - :paramtype health_check_wait_duration_in_seconds: ~datetime.timedelta - :keyword health_check_stable_duration_in_seconds: The length of time that the application or - cluster must remain healthy before the upgrade proceeds to the next upgrade domain. - :paramtype health_check_stable_duration_in_seconds: ~datetime.timedelta - :keyword upgrade_domain_timeout_in_seconds: The timeout for the upgrade domain. - :paramtype upgrade_domain_timeout_in_seconds: ~datetime.timedelta - :keyword upgrade_timeout_in_seconds: The upgrade timeout. - :paramtype upgrade_timeout_in_seconds: ~datetime.timedelta - :keyword max_percent_unhealthy_applications: The maximum allowed percentage of unhealthy - applications during the upgrade. Allowed values are integer values from zero to 100. - :paramtype max_percent_unhealthy_applications: int - :keyword max_percent_unhealthy_nodes: The maximum allowed percentage of unhealthy nodes during - the upgrade. Allowed values are integer values from zero to 100. - :paramtype max_percent_unhealthy_nodes: int - :keyword max_percent_delta_unhealthy_nodes: The maximum allowed percentage of delta health - degradation during the upgrade. Allowed values are integer values from zero to 100. - :paramtype max_percent_delta_unhealthy_nodes: int - :keyword max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum allowed percentage of - upgrade domain delta health degradation during the upgrade. Allowed values are integer values - from zero to 100. - :paramtype max_percent_upgrade_domain_delta_unhealthy_nodes: int - :keyword application_health_policies: Defines the application health policy map used to - evaluate the health of an application or one of its children entities. - :paramtype application_health_policies: ~azure.servicefabric.models.ApplicationHealthPolicies - """ - super(ClusterConfigurationUpgradeDescription, self).__init__(**kwargs) - self.cluster_config = cluster_config - self.health_check_retry_timeout = health_check_retry_timeout - self.health_check_wait_duration_in_seconds = health_check_wait_duration_in_seconds - self.health_check_stable_duration_in_seconds = health_check_stable_duration_in_seconds - self.upgrade_domain_timeout_in_seconds = upgrade_domain_timeout_in_seconds - self.upgrade_timeout_in_seconds = upgrade_timeout_in_seconds - self.max_percent_unhealthy_applications = max_percent_unhealthy_applications - self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes - self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes - self.max_percent_upgrade_domain_delta_unhealthy_nodes = max_percent_upgrade_domain_delta_unhealthy_nodes - self.application_health_policies = application_health_policies - - -class ClusterConfigurationUpgradeStatusInfo(msrest.serialization.Model): - """Information about a standalone cluster configuration upgrade status. - - :ivar upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", - "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", - "RollingForwardInProgress", "RollingForwardCompleted", "Failed". - :vartype upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :ivar progress_status: The cluster manifest version. - :vartype progress_status: int - :ivar config_version: The cluster configuration version. - :vartype config_version: str - :ivar details: The cluster upgrade status details. - :vartype details: str - """ - - _attribute_map = { - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'progress_status': {'key': 'ProgressStatus', 'type': 'int'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'details': {'key': 'Details', 'type': 'str'}, - } - - def __init__( - self, - *, - upgrade_state: Optional[Union[str, "UpgradeState"]] = None, - progress_status: Optional[int] = None, - config_version: Optional[str] = None, - details: Optional[str] = None, - **kwargs - ): - """ - :keyword upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", - "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", - "RollingForwardInProgress", "RollingForwardCompleted", "Failed". - :paramtype upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :keyword progress_status: The cluster manifest version. - :paramtype progress_status: int - :keyword config_version: The cluster configuration version. - :paramtype config_version: str - :keyword details: The cluster upgrade status details. - :paramtype details: str - """ - super(ClusterConfigurationUpgradeStatusInfo, self).__init__(**kwargs) - self.upgrade_state = upgrade_state - self.progress_status = progress_status - self.config_version = config_version - self.details = details - - -class ClusterHealth(EntityHealth): - """Represents the health of the cluster. -Contains the cluster aggregated health state, the cluster application and node health states as well as the health events and the unhealthy evaluations. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar node_health_states: Cluster node health states as found in the health store. - :vartype node_health_states: list[~azure.servicefabric.models.NodeHealthState] - :ivar application_health_states: Cluster application health states as found in the health - store. - :vartype application_health_states: list[~azure.servicefabric.models.ApplicationHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'node_health_states': {'key': 'NodeHealthStates', 'type': '[NodeHealthState]'}, - 'application_health_states': {'key': 'ApplicationHealthStates', 'type': '[ApplicationHealthState]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - health_events: Optional[List["HealthEvent"]] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - health_statistics: Optional["HealthStatistics"] = None, - node_health_states: Optional[List["NodeHealthState"]] = None, - application_health_states: Optional[List["ApplicationHealthState"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword node_health_states: Cluster node health states as found in the health store. - :paramtype node_health_states: list[~azure.servicefabric.models.NodeHealthState] - :keyword application_health_states: Cluster application health states as found in the health - store. - :paramtype application_health_states: list[~azure.servicefabric.models.ApplicationHealthState] - """ - super(ClusterHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.node_health_states = node_health_states - self.application_health_states = application_health_states - - -class ClusterHealthChunk(msrest.serialization.Model): - """Represents the health chunk of the cluster. -Contains the cluster aggregated health state, and the cluster entities that respect the input filter. - - :ivar health_state: The HealthState representing the aggregated health state of the cluster - computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired cluster health policy and the application - health policies. Possible values include: "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar node_health_state_chunks: The list of node health state chunks in the cluster that - respect the filters in the cluster health chunk query description. - :vartype node_health_state_chunks: ~azure.servicefabric.models.NodeHealthStateChunkList - :ivar application_health_state_chunks: The list of application health state chunks in the - cluster that respect the filters in the cluster health chunk query description. - :vartype application_health_state_chunks: - ~azure.servicefabric.models.ApplicationHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_health_state_chunks': {'key': 'NodeHealthStateChunks', 'type': 'NodeHealthStateChunkList'}, - 'application_health_state_chunks': {'key': 'ApplicationHealthStateChunks', 'type': 'ApplicationHealthStateChunkList'}, - } - - def __init__( - self, - *, - health_state: Optional[Union[str, "HealthState"]] = None, - node_health_state_chunks: Optional["NodeHealthStateChunkList"] = None, - application_health_state_chunks: Optional["ApplicationHealthStateChunkList"] = None, - **kwargs - ): - """ - :keyword health_state: The HealthState representing the aggregated health state of the cluster - computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired cluster health policy and the application - health policies. Possible values include: "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword node_health_state_chunks: The list of node health state chunks in the cluster that - respect the filters in the cluster health chunk query description. - :paramtype node_health_state_chunks: ~azure.servicefabric.models.NodeHealthStateChunkList - :keyword application_health_state_chunks: The list of application health state chunks in the - cluster that respect the filters in the cluster health chunk query description. - :paramtype application_health_state_chunks: - ~azure.servicefabric.models.ApplicationHealthStateChunkList - """ - super(ClusterHealthChunk, self).__init__(**kwargs) - self.health_state = health_state - self.node_health_state_chunks = node_health_state_chunks - self.application_health_state_chunks = application_health_state_chunks - - -class ClusterHealthChunkQueryDescription(msrest.serialization.Model): - """The cluster health chunk query description, which can specify the health policies to evaluate cluster health and very expressive filters to select which cluster entities to include in response. - - :ivar node_filters: Defines a list of filters that specify which nodes to be included in the - returned cluster health chunk. - If no filters are specified, no nodes are returned. All the nodes are used to evaluate the - cluster's aggregated health state, regardless of the input filters. - The cluster health chunk query may specify multiple node filters. - For example, it can specify a filter to return all nodes with health state Error and another - filter to always include a node identified by its NodeName. - :vartype node_filters: list[~azure.servicefabric.models.NodeHealthStateFilter] - :ivar application_filters: Defines a list of filters that specify which applications to be - included in the returned cluster health chunk. - If no filters are specified, no applications are returned. All the applications are used to - evaluate the cluster's aggregated health state, regardless of the input filters. - The cluster health chunk query may specify multiple application filters. - For example, it can specify a filter to return all applications with health state Error and - another filter to always include applications of a specified application type. - :vartype application_filters: list[~azure.servicefabric.models.ApplicationHealthStateFilter] - :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster - or of a cluster node. - :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :ivar application_health_policies: Defines the application health policy map used to evaluate - the health of an application or one of its children entities. - :vartype application_health_policies: ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _attribute_map = { - 'node_filters': {'key': 'NodeFilters', 'type': '[NodeHealthStateFilter]'}, - 'application_filters': {'key': 'ApplicationFilters', 'type': '[ApplicationHealthStateFilter]'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'application_health_policies': {'key': 'ApplicationHealthPolicies', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__( - self, - *, - node_filters: Optional[List["NodeHealthStateFilter"]] = None, - application_filters: Optional[List["ApplicationHealthStateFilter"]] = None, - cluster_health_policy: Optional["ClusterHealthPolicy"] = None, - application_health_policies: Optional["ApplicationHealthPolicies"] = None, - **kwargs - ): - """ - :keyword node_filters: Defines a list of filters that specify which nodes to be included in the - returned cluster health chunk. - If no filters are specified, no nodes are returned. All the nodes are used to evaluate the - cluster's aggregated health state, regardless of the input filters. - The cluster health chunk query may specify multiple node filters. - For example, it can specify a filter to return all nodes with health state Error and another - filter to always include a node identified by its NodeName. - :paramtype node_filters: list[~azure.servicefabric.models.NodeHealthStateFilter] - :keyword application_filters: Defines a list of filters that specify which applications to be - included in the returned cluster health chunk. - If no filters are specified, no applications are returned. All the applications are used to - evaluate the cluster's aggregated health state, regardless of the input filters. - The cluster health chunk query may specify multiple application filters. - For example, it can specify a filter to return all applications with health state Error and - another filter to always include applications of a specified application type. - :paramtype application_filters: list[~azure.servicefabric.models.ApplicationHealthStateFilter] - :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the - cluster or of a cluster node. - :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :keyword application_health_policies: Defines the application health policy map used to - evaluate the health of an application or one of its children entities. - :paramtype application_health_policies: ~azure.servicefabric.models.ApplicationHealthPolicies - """ - super(ClusterHealthChunkQueryDescription, self).__init__(**kwargs) - self.node_filters = node_filters - self.application_filters = application_filters - self.cluster_health_policy = cluster_health_policy - self.application_health_policies = application_health_policies - - -class ClusterHealthPolicies(msrest.serialization.Model): - """Health policies to evaluate cluster health. - - :ivar application_health_policy_map: Defines a map that contains specific application health - policies for different applications. - Each entry specifies as key the application name and as value an ApplicationHealthPolicy used - to evaluate the application health. - If an application is not specified in the map, the application health evaluation uses the - ApplicationHealthPolicy found in its application manifest or the default application health - policy (if no health policy is defined in the manifest). - The map is empty by default. - :vartype application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster - or of a cluster node. - :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - """ - - _attribute_map = { - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - } - - def __init__( - self, - *, - application_health_policy_map: Optional[List["ApplicationHealthPolicyMapItem"]] = None, - cluster_health_policy: Optional["ClusterHealthPolicy"] = None, - **kwargs - ): - """ - :keyword application_health_policy_map: Defines a map that contains specific application health - policies for different applications. - Each entry specifies as key the application name and as value an ApplicationHealthPolicy used - to evaluate the application health. - If an application is not specified in the map, the application health evaluation uses the - ApplicationHealthPolicy found in its application manifest or the default application health - policy (if no health policy is defined in the manifest). - The map is empty by default. - :paramtype application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the - cluster or of a cluster node. - :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - """ - super(ClusterHealthPolicies, self).__init__(**kwargs) - self.application_health_policy_map = application_health_policy_map - self.cluster_health_policy = cluster_health_policy - - -class ClusterHealthPolicy(msrest.serialization.Model): - """Defines a health policy used to evaluate the health of the cluster or of a cluster node. - - :ivar consider_warning_as_error: Indicates whether warnings are treated with the same severity - as errors. - :vartype consider_warning_as_error: bool - :ivar max_percent_unhealthy_nodes: The maximum allowed percentage of unhealthy nodes before - reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10. - - The percentage represents the maximum tolerated percentage of nodes that can be unhealthy - before the cluster is considered in error. - If the percentage is respected but there is at least one unhealthy node, the health is - evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy nodes over the total number - of nodes in the cluster. - The computation rounds up to tolerate one failure on small numbers of nodes. Default - percentage is zero. - - In large clusters, some nodes will always be down or out for repairs, so this percentage - should be configured to tolerate that. - :vartype max_percent_unhealthy_nodes: int - :ivar max_percent_unhealthy_applications: The maximum allowed percentage of unhealthy - applications before reporting an error. For example, to allow 10% of applications to be - unhealthy, this value would be 10. - - The percentage represents the maximum tolerated percentage of applications that can be - unhealthy before the cluster is considered in error. - If the percentage is respected but there is at least one unhealthy application, the health is - evaluated as Warning. - This is calculated by dividing the number of unhealthy applications over the total number of - application instances in the cluster, excluding applications of application types that are - included in the ApplicationTypeHealthPolicyMap. - The computation rounds up to tolerate one failure on small numbers of applications. Default - percentage is zero. - :vartype max_percent_unhealthy_applications: int - :ivar application_type_health_policy_map: Defines a map with max percentage unhealthy - applications for specific application types. - Each entry specifies as key the application type name and as value an integer that represents - the MaxPercentUnhealthyApplications percentage used to evaluate the applications of the - specified application type. - - The application type health policy map can be used during cluster health evaluation to - describe special application types. - The application types included in the map are evaluated against the percentage specified in - the map, and not with the global MaxPercentUnhealthyApplications defined in the cluster health - policy. - The applications of application types specified in the map are not counted against the global - pool of applications. - For example, if some applications of a type are critical, the cluster administrator can add an - entry to the map for that application type - and assign it a value of 0% (that is, do not tolerate any failures). - All other applications can be evaluated with MaxPercentUnhealthyApplications set to 20% to - tolerate some failures out of the thousands of application instances. - The application type health policy map is used only if the cluster manifest enables - application type health evaluation using the configuration entry for - HealthManager/EnableApplicationTypeHealthEvaluation. - :vartype application_type_health_policy_map: - list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] - :ivar node_type_health_policy_map: Defines a map with max percentage unhealthy nodes for - specific node types. - Each entry specifies as key the node type name and as value an integer that represents the - MaxPercentUnhealthyNodes percentage used to evaluate the nodes of the specified node type. - - The node type health policy map can be used during cluster health evaluation to describe - special node types. - They are evaluated against the percentages associated with their node type name in the map. - Setting this has no impact on the global pool of nodes used for MaxPercentUnhealthyNodes. - The node type health policy map is used only if the cluster manifest enables node type health - evaluation using the configuration entry for HealthManager/EnableNodeTypeHealthEvaluation. - - For example, given a cluster with many nodes of different types, with important work hosted on - node type "SpecialNodeType" that should not tolerate any nodes down. - You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some failures for all - nodes, but for the node type "SpecialNodeType", set the MaxPercentUnhealthyNodes to 0 by - setting the value in the key value pair in NodeTypeHealthPolicyMapItem. The key is the node - type name. - This way, as long as no nodes of type "SpecialNodeType" are in Error state, - even if some of the many nodes in the global pool are in Error state, but below the global - unhealthy percentage, the cluster would be evaluated to Warning. - A Warning health state does not impact cluster upgrade or other monitoring triggered by Error - health state. - But even one node of type SpecialNodeType in Error would make cluster unhealthy (in Error - rather than Warning/Ok), which triggers rollback or pauses the cluster upgrade, depending on - the upgrade configuration. - - Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting SpecialNodeType's - max percent unhealthy nodes to 100, - with one node of type SpecialNodeType in Error state would still put the cluster in an Error - state, since the global restriction is more strict in this case. - :vartype node_type_health_policy_map: - list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] - """ - - _attribute_map = { - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, - 'application_type_health_policy_map': {'key': 'ApplicationTypeHealthPolicyMap', 'type': '[ApplicationTypeHealthPolicyMapItem]'}, - 'node_type_health_policy_map': {'key': 'NodeTypeHealthPolicyMap', 'type': '[NodeTypeHealthPolicyMapItem]'}, - } - - def __init__( - self, - *, - consider_warning_as_error: Optional[bool] = False, - max_percent_unhealthy_nodes: Optional[int] = 0, - max_percent_unhealthy_applications: Optional[int] = 0, - application_type_health_policy_map: Optional[List["ApplicationTypeHealthPolicyMapItem"]] = None, - node_type_health_policy_map: Optional[List["NodeTypeHealthPolicyMapItem"]] = None, - **kwargs - ): - """ - :keyword consider_warning_as_error: Indicates whether warnings are treated with the same - severity as errors. - :paramtype consider_warning_as_error: bool - :keyword max_percent_unhealthy_nodes: The maximum allowed percentage of unhealthy nodes before - reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10. - - The percentage represents the maximum tolerated percentage of nodes that can be unhealthy - before the cluster is considered in error. - If the percentage is respected but there is at least one unhealthy node, the health is - evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy nodes over the total number - of nodes in the cluster. - The computation rounds up to tolerate one failure on small numbers of nodes. Default - percentage is zero. - - In large clusters, some nodes will always be down or out for repairs, so this percentage - should be configured to tolerate that. - :paramtype max_percent_unhealthy_nodes: int - :keyword max_percent_unhealthy_applications: The maximum allowed percentage of unhealthy - applications before reporting an error. For example, to allow 10% of applications to be - unhealthy, this value would be 10. - - The percentage represents the maximum tolerated percentage of applications that can be - unhealthy before the cluster is considered in error. - If the percentage is respected but there is at least one unhealthy application, the health is - evaluated as Warning. - This is calculated by dividing the number of unhealthy applications over the total number of - application instances in the cluster, excluding applications of application types that are - included in the ApplicationTypeHealthPolicyMap. - The computation rounds up to tolerate one failure on small numbers of applications. Default - percentage is zero. - :paramtype max_percent_unhealthy_applications: int - :keyword application_type_health_policy_map: Defines a map with max percentage unhealthy - applications for specific application types. - Each entry specifies as key the application type name and as value an integer that represents - the MaxPercentUnhealthyApplications percentage used to evaluate the applications of the - specified application type. - - The application type health policy map can be used during cluster health evaluation to - describe special application types. - The application types included in the map are evaluated against the percentage specified in - the map, and not with the global MaxPercentUnhealthyApplications defined in the cluster health - policy. - The applications of application types specified in the map are not counted against the global - pool of applications. - For example, if some applications of a type are critical, the cluster administrator can add an - entry to the map for that application type - and assign it a value of 0% (that is, do not tolerate any failures). - All other applications can be evaluated with MaxPercentUnhealthyApplications set to 20% to - tolerate some failures out of the thousands of application instances. - The application type health policy map is used only if the cluster manifest enables - application type health evaluation using the configuration entry for - HealthManager/EnableApplicationTypeHealthEvaluation. - :paramtype application_type_health_policy_map: - list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] - :keyword node_type_health_policy_map: Defines a map with max percentage unhealthy nodes for - specific node types. - Each entry specifies as key the node type name and as value an integer that represents the - MaxPercentUnhealthyNodes percentage used to evaluate the nodes of the specified node type. - - The node type health policy map can be used during cluster health evaluation to describe - special node types. - They are evaluated against the percentages associated with their node type name in the map. - Setting this has no impact on the global pool of nodes used for MaxPercentUnhealthyNodes. - The node type health policy map is used only if the cluster manifest enables node type health - evaluation using the configuration entry for HealthManager/EnableNodeTypeHealthEvaluation. - - For example, given a cluster with many nodes of different types, with important work hosted on - node type "SpecialNodeType" that should not tolerate any nodes down. - You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some failures for all - nodes, but for the node type "SpecialNodeType", set the MaxPercentUnhealthyNodes to 0 by - setting the value in the key value pair in NodeTypeHealthPolicyMapItem. The key is the node - type name. - This way, as long as no nodes of type "SpecialNodeType" are in Error state, - even if some of the many nodes in the global pool are in Error state, but below the global - unhealthy percentage, the cluster would be evaluated to Warning. - A Warning health state does not impact cluster upgrade or other monitoring triggered by Error - health state. - But even one node of type SpecialNodeType in Error would make cluster unhealthy (in Error - rather than Warning/Ok), which triggers rollback or pauses the cluster upgrade, depending on - the upgrade configuration. - - Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting SpecialNodeType's - max percent unhealthy nodes to 100, - with one node of type SpecialNodeType in Error state would still put the cluster in an Error - state, since the global restriction is more strict in this case. - :paramtype node_type_health_policy_map: - list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] - """ - super(ClusterHealthPolicy, self).__init__(**kwargs) - self.consider_warning_as_error = consider_warning_as_error - self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes - self.max_percent_unhealthy_applications = max_percent_unhealthy_applications - self.application_type_health_policy_map = application_type_health_policy_map - self.node_type_health_policy_map = node_type_health_policy_map - - -class ClusterHealthReportExpiredEvent(ClusterEvent): - """Cluster Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(ClusterHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ClusterHealthReportExpired' # type: str - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class ClusterLoadInfo(msrest.serialization.Model): - """Information about load in a Service Fabric cluster. It holds a summary of all metrics and their load in a cluster. - - :ivar last_balancing_start_time_utc: The starting time of last resource balancing run. - :vartype last_balancing_start_time_utc: ~datetime.datetime - :ivar last_balancing_end_time_utc: The end time of last resource balancing run. - :vartype last_balancing_end_time_utc: ~datetime.datetime - :ivar load_metric_information: List that contains metrics and their load information in this - cluster. - :vartype load_metric_information: list[~azure.servicefabric.models.LoadMetricInformation] - """ - - _attribute_map = { - 'last_balancing_start_time_utc': {'key': 'LastBalancingStartTimeUtc', 'type': 'iso-8601'}, - 'last_balancing_end_time_utc': {'key': 'LastBalancingEndTimeUtc', 'type': 'iso-8601'}, - 'load_metric_information': {'key': 'LoadMetricInformation', 'type': '[LoadMetricInformation]'}, - } - - def __init__( - self, - *, - last_balancing_start_time_utc: Optional[datetime.datetime] = None, - last_balancing_end_time_utc: Optional[datetime.datetime] = None, - load_metric_information: Optional[List["LoadMetricInformation"]] = None, - **kwargs - ): - """ - :keyword last_balancing_start_time_utc: The starting time of last resource balancing run. - :paramtype last_balancing_start_time_utc: ~datetime.datetime - :keyword last_balancing_end_time_utc: The end time of last resource balancing run. - :paramtype last_balancing_end_time_utc: ~datetime.datetime - :keyword load_metric_information: List that contains metrics and their load information in this - cluster. - :paramtype load_metric_information: list[~azure.servicefabric.models.LoadMetricInformation] - """ - super(ClusterLoadInfo, self).__init__(**kwargs) - self.last_balancing_start_time_utc = last_balancing_start_time_utc - self.last_balancing_end_time_utc = last_balancing_end_time_utc - self.load_metric_information = load_metric_information - - -class ClusterManifest(msrest.serialization.Model): - """Information about the cluster manifest. - - :ivar manifest: The contents of the cluster manifest file. - :vartype manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__( - self, - *, - manifest: Optional[str] = None, - **kwargs - ): - """ - :keyword manifest: The contents of the cluster manifest file. - :paramtype manifest: str - """ - super(ClusterManifest, self).__init__(**kwargs) - self.manifest = manifest - - -class ClusterNewHealthReportEvent(ClusterEvent): - """Cluster Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(ClusterNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ClusterNewHealthReport' # type: str - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class ClusterUpgradeCompletedEvent(ClusterEvent): - """Cluster Upgrade Completed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar target_cluster_version: Required. Target Cluster version. - :vartype target_cluster_version: str - :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in - milli-seconds. - :vartype overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'target_cluster_version': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - target_cluster_version: str, - overall_upgrade_elapsed_time_in_ms: float, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword target_cluster_version: Required. Target Cluster version. - :paramtype target_cluster_version: str - :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in - milli-seconds. - :paramtype overall_upgrade_elapsed_time_in_ms: float - """ - super(ClusterUpgradeCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ClusterUpgradeCompleted' # type: str - self.target_cluster_version = target_cluster_version - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - - -class ClusterUpgradeDescriptionObject(msrest.serialization.Model): - """Represents a ServiceFabric cluster upgrade. - - :ivar config_version: The cluster configuration version (specified in the cluster manifest). - :vartype config_version: str - :ivar code_version: The ServiceFabric code version of the cluster. - :vartype code_version: str - :ivar upgrade_kind: The kind of upgrade out of the following possible values. Possible values - include: "Invalid", "Rolling". Default value: "Rolling". - :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :vartype upgrade_replica_set_check_timeout_in_seconds: long - :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when - the code version has not changed (the upgrade only changes configuration or data). - :vartype force_restart: bool - :ivar sort_order: Defines the order in which an upgrade proceeds through the cluster. Possible - values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", - "ReverseLexicographical". Default value: "Default". - :vartype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :ivar enable_delta_health_evaluation: When true, enables delta health evaluation rather than - absolute health evaluation after completion of each upgrade domain. - :vartype enable_delta_health_evaluation: bool - :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. - :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster - or of a cluster node. - :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :ivar cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of the - cluster during a cluster upgrade. - :vartype cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :ivar application_health_policy_map: Represents the map of application health policies for a - ServiceFabric cluster upgrade. - :vartype application_health_policy_map: - ~azure.servicefabric.models.ApplicationHealthPolicyMapObject - """ - - _attribute_map = { - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicyMapObject'}, - } - - def __init__( - self, - *, - config_version: Optional[str] = None, - code_version: Optional[str] = None, - upgrade_kind: Optional[Union[str, "UpgradeKind"]] = "Rolling", - rolling_upgrade_mode: Optional[Union[str, "UpgradeMode"]] = "UnmonitoredAuto", - upgrade_replica_set_check_timeout_in_seconds: Optional[int] = 42949672925, - force_restart: Optional[bool] = False, - sort_order: Optional[Union[str, "UpgradeSortOrder"]] = "Default", - enable_delta_health_evaluation: Optional[bool] = None, - monitoring_policy: Optional["MonitoringPolicyDescription"] = None, - cluster_health_policy: Optional["ClusterHealthPolicy"] = None, - cluster_upgrade_health_policy: Optional["ClusterUpgradeHealthPolicyObject"] = None, - application_health_policy_map: Optional["ApplicationHealthPolicyMapObject"] = None, - **kwargs - ): - """ - :keyword config_version: The cluster configuration version (specified in the cluster manifest). - :paramtype config_version: str - :keyword code_version: The ServiceFabric code version of the cluster. - :paramtype code_version: str - :keyword upgrade_kind: The kind of upgrade out of the following possible values. Possible - values include: "Invalid", "Rolling". Default value: "Rolling". - :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :paramtype upgrade_replica_set_check_timeout_in_seconds: long - :keyword force_restart: If true, then processes are forcefully restarted during upgrade even - when the code version has not changed (the upgrade only changes configuration or data). - :paramtype force_restart: bool - :keyword sort_order: Defines the order in which an upgrade proceeds through the cluster. - Possible values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", - "ReverseLexicographical". Default value: "Default". - :paramtype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :keyword enable_delta_health_evaluation: When true, enables delta health evaluation rather than - absolute health evaluation after completion of each upgrade domain. - :paramtype enable_delta_health_evaluation: bool - :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored - mode. - :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the - cluster or of a cluster node. - :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :keyword cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of - the cluster during a cluster upgrade. - :paramtype cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :keyword application_health_policy_map: Represents the map of application health policies for a - ServiceFabric cluster upgrade. - :paramtype application_health_policy_map: - ~azure.servicefabric.models.ApplicationHealthPolicyMapObject - """ - super(ClusterUpgradeDescriptionObject, self).__init__(**kwargs) - self.config_version = config_version - self.code_version = code_version - self.upgrade_kind = upgrade_kind - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.force_restart = force_restart - self.sort_order = sort_order - self.enable_delta_health_evaluation = enable_delta_health_evaluation - self.monitoring_policy = monitoring_policy - self.cluster_health_policy = cluster_health_policy - self.cluster_upgrade_health_policy = cluster_upgrade_health_policy - self.application_health_policy_map = application_health_policy_map - - -class ClusterUpgradeDomainCompletedEvent(ClusterEvent): - """Cluster Upgrade Domain Completed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar target_cluster_version: Required. Target Cluster version. - :vartype target_cluster_version: str - :ivar upgrade_state: Required. State of upgrade. - :vartype upgrade_state: str - :ivar upgrade_domains: Required. Upgrade domains. - :vartype upgrade_domains: str - :ivar upgrade_domain_elapsed_time_in_ms: Required. Duration of domain upgrade in milli-seconds. - :vartype upgrade_domain_elapsed_time_in_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'target_cluster_version': {'required': True}, - 'upgrade_state': {'required': True}, - 'upgrade_domains': {'required': True}, - 'upgrade_domain_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': 'str'}, - 'upgrade_domain_elapsed_time_in_ms': {'key': 'UpgradeDomainElapsedTimeInMs', 'type': 'float'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - target_cluster_version: str, - upgrade_state: str, - upgrade_domains: str, - upgrade_domain_elapsed_time_in_ms: float, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword target_cluster_version: Required. Target Cluster version. - :paramtype target_cluster_version: str - :keyword upgrade_state: Required. State of upgrade. - :paramtype upgrade_state: str - :keyword upgrade_domains: Required. Upgrade domains. - :paramtype upgrade_domains: str - :keyword upgrade_domain_elapsed_time_in_ms: Required. Duration of domain upgrade in - milli-seconds. - :paramtype upgrade_domain_elapsed_time_in_ms: float - """ - super(ClusterUpgradeDomainCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ClusterUpgradeDomainCompleted' # type: str - self.target_cluster_version = target_cluster_version - self.upgrade_state = upgrade_state - self.upgrade_domains = upgrade_domains - self.upgrade_domain_elapsed_time_in_ms = upgrade_domain_elapsed_time_in_ms - - -class ClusterUpgradeHealthPolicyObject(msrest.serialization.Model): - """Defines a health policy used to evaluate the health of the cluster during a cluster upgrade. - - :ivar max_percent_delta_unhealthy_nodes: The maximum allowed percentage of nodes health - degradation allowed during cluster upgrades. The delta is measured between the state of the - nodes at the beginning of upgrade and the state of the nodes at the time of the health - evaluation. The check is performed after every upgrade domain upgrade completion to make sure - the global state of the cluster is within tolerated limits. The default value is 10%. - :vartype max_percent_delta_unhealthy_nodes: int - :ivar max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum allowed percentage of - upgrade domain nodes health degradation allowed during cluster upgrades. The delta is measured - between the state of the upgrade domain nodes at the beginning of upgrade and the state of the - upgrade domain nodes at the time of the health evaluation. The check is performed after every - upgrade domain upgrade completion for all completed upgrade domains to make sure the state of - the upgrade domains is within tolerated limits. The default value is 15%. - :vartype max_percent_upgrade_domain_delta_unhealthy_nodes: int - """ - - _validation = { - 'max_percent_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'max_percent_upgrade_domain_delta_unhealthy_nodes': {'key': 'MaxPercentUpgradeDomainDeltaUnhealthyNodes', 'type': 'int'}, - } - - def __init__( - self, - *, - max_percent_delta_unhealthy_nodes: Optional[int] = None, - max_percent_upgrade_domain_delta_unhealthy_nodes: Optional[int] = None, - **kwargs - ): - """ - :keyword max_percent_delta_unhealthy_nodes: The maximum allowed percentage of nodes health - degradation allowed during cluster upgrades. The delta is measured between the state of the - nodes at the beginning of upgrade and the state of the nodes at the time of the health - evaluation. The check is performed after every upgrade domain upgrade completion to make sure - the global state of the cluster is within tolerated limits. The default value is 10%. - :paramtype max_percent_delta_unhealthy_nodes: int - :keyword max_percent_upgrade_domain_delta_unhealthy_nodes: The maximum allowed percentage of - upgrade domain nodes health degradation allowed during cluster upgrades. The delta is measured - between the state of the upgrade domain nodes at the beginning of upgrade and the state of the - upgrade domain nodes at the time of the health evaluation. The check is performed after every - upgrade domain upgrade completion for all completed upgrade domains to make sure the state of - the upgrade domains is within tolerated limits. The default value is 15%. - :paramtype max_percent_upgrade_domain_delta_unhealthy_nodes: int - """ - super(ClusterUpgradeHealthPolicyObject, self).__init__(**kwargs) - self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes - self.max_percent_upgrade_domain_delta_unhealthy_nodes = max_percent_upgrade_domain_delta_unhealthy_nodes - - -class ClusterUpgradeProgressObject(msrest.serialization.Model): - """Information about a cluster upgrade. - - :ivar code_version: The ServiceFabric code version of the cluster. - :vartype code_version: str - :ivar config_version: The cluster configuration version (specified in the cluster manifest). - :vartype config_version: str - :ivar upgrade_domains: List of upgrade domains and their statuses. Not applicable to - node-by-node upgrades. - :vartype upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] - :ivar upgrade_units: List of upgrade units and their statuses. - :vartype upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] - :ivar upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", - "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", - "RollingForwardInProgress", "RollingForwardCompleted", "Failed". - :vartype upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :ivar next_upgrade_domain: The name of the next upgrade domain to be processed. Not applicable - to node-by-node upgrades. - :vartype next_upgrade_domain: str - :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :ivar upgrade_description: Represents a ServiceFabric cluster upgrade. - :vartype upgrade_description: ~azure.servicefabric.models.ClusterUpgradeDescriptionObject - :ivar upgrade_duration_in_milliseconds: The estimated elapsed time spent processing the current - overall upgrade. - :vartype upgrade_duration_in_milliseconds: str - :ivar upgrade_domain_duration_in_milliseconds: The estimated elapsed time spent processing the - current upgrade domain. Not applicable to node-by-node upgrades. - :vartype upgrade_domain_duration_in_milliseconds: str - :ivar unhealthy_evaluations: List of health evaluations that resulted in the current aggregated - health state. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar current_upgrade_domain_progress: Information about the current in-progress upgrade - domain. Not applicable to node-by-node upgrades. - :vartype current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :ivar current_upgrade_units_progress: Information about the current in-progress upgrade units. - :vartype current_upgrade_units_progress: - ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo - :ivar start_timestamp_utc: The start time of the upgrade in UTC. - :vartype start_timestamp_utc: str - :ivar failure_timestamp_utc: The failure time of the upgrade in UTC. - :vartype failure_timestamp_utc: str - :ivar failure_reason: The cause of an upgrade failure that resulted in FailureAction being - executed. Possible values include: "None", "Interrupted", "HealthCheck", - "UpgradeDomainTimeout", "OverallUpgradeTimeout". - :vartype failure_reason: str or ~azure.servicefabric.models.FailureReason - :ivar upgrade_domain_progress_at_failure: The detailed upgrade progress for nodes in the - current upgrade domain at the point of failure. Not applicable to node-by-node upgrades. - :vartype upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailedUpgradeDomainProgressObject - :ivar is_node_by_node: Indicates whether this upgrade is node-by-node. - :vartype is_node_by_node: bool - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'upgrade_domains': {'key': 'UpgradeDomains', 'type': '[UpgradeDomainInfo]'}, - 'upgrade_units': {'key': 'UpgradeUnits', 'type': '[UpgradeUnitInfo]'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'next_upgrade_domain': {'key': 'NextUpgradeDomain', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_description': {'key': 'UpgradeDescription', 'type': 'ClusterUpgradeDescriptionObject'}, - 'upgrade_duration_in_milliseconds': {'key': 'UpgradeDurationInMilliseconds', 'type': 'str'}, - 'upgrade_domain_duration_in_milliseconds': {'key': 'UpgradeDomainDurationInMilliseconds', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'current_upgrade_units_progress': {'key': 'CurrentUpgradeUnitsProgress', 'type': 'CurrentUpgradeUnitsProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailedUpgradeDomainProgressObject'}, - 'is_node_by_node': {'key': 'IsNodeByNode', 'type': 'bool'}, - } - - def __init__( - self, - *, - code_version: Optional[str] = None, - config_version: Optional[str] = None, - upgrade_domains: Optional[List["UpgradeDomainInfo"]] = None, - upgrade_units: Optional[List["UpgradeUnitInfo"]] = None, - upgrade_state: Optional[Union[str, "UpgradeState"]] = None, - next_upgrade_domain: Optional[str] = None, - rolling_upgrade_mode: Optional[Union[str, "UpgradeMode"]] = "UnmonitoredAuto", - upgrade_description: Optional["ClusterUpgradeDescriptionObject"] = None, - upgrade_duration_in_milliseconds: Optional[str] = None, - upgrade_domain_duration_in_milliseconds: Optional[str] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - current_upgrade_domain_progress: Optional["CurrentUpgradeDomainProgressInfo"] = None, - current_upgrade_units_progress: Optional["CurrentUpgradeUnitsProgressInfo"] = None, - start_timestamp_utc: Optional[str] = None, - failure_timestamp_utc: Optional[str] = None, - failure_reason: Optional[Union[str, "FailureReason"]] = None, - upgrade_domain_progress_at_failure: Optional["FailedUpgradeDomainProgressObject"] = None, - is_node_by_node: Optional[bool] = False, - **kwargs - ): - """ - :keyword code_version: The ServiceFabric code version of the cluster. - :paramtype code_version: str - :keyword config_version: The cluster configuration version (specified in the cluster manifest). - :paramtype config_version: str - :keyword upgrade_domains: List of upgrade domains and their statuses. Not applicable to - node-by-node upgrades. - :paramtype upgrade_domains: list[~azure.servicefabric.models.UpgradeDomainInfo] - :keyword upgrade_units: List of upgrade units and their statuses. - :paramtype upgrade_units: list[~azure.servicefabric.models.UpgradeUnitInfo] - :keyword upgrade_state: The state of the upgrade domain. Possible values include: "Invalid", - "RollingBackInProgress", "RollingBackCompleted", "RollingForwardPending", - "RollingForwardInProgress", "RollingForwardCompleted", "Failed". - :paramtype upgrade_state: str or ~azure.servicefabric.models.UpgradeState - :keyword next_upgrade_domain: The name of the next upgrade domain to be processed. Not - applicable to node-by-node upgrades. - :paramtype next_upgrade_domain: str - :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :keyword upgrade_description: Represents a ServiceFabric cluster upgrade. - :paramtype upgrade_description: ~azure.servicefabric.models.ClusterUpgradeDescriptionObject - :keyword upgrade_duration_in_milliseconds: The estimated elapsed time spent processing the - current overall upgrade. - :paramtype upgrade_duration_in_milliseconds: str - :keyword upgrade_domain_duration_in_milliseconds: The estimated elapsed time spent processing - the current upgrade domain. Not applicable to node-by-node upgrades. - :paramtype upgrade_domain_duration_in_milliseconds: str - :keyword unhealthy_evaluations: List of health evaluations that resulted in the current - aggregated health state. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword current_upgrade_domain_progress: Information about the current in-progress upgrade - domain. Not applicable to node-by-node upgrades. - :paramtype current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :keyword current_upgrade_units_progress: Information about the current in-progress upgrade - units. - :paramtype current_upgrade_units_progress: - ~azure.servicefabric.models.CurrentUpgradeUnitsProgressInfo - :keyword start_timestamp_utc: The start time of the upgrade in UTC. - :paramtype start_timestamp_utc: str - :keyword failure_timestamp_utc: The failure time of the upgrade in UTC. - :paramtype failure_timestamp_utc: str - :keyword failure_reason: The cause of an upgrade failure that resulted in FailureAction being - executed. Possible values include: "None", "Interrupted", "HealthCheck", - "UpgradeDomainTimeout", "OverallUpgradeTimeout". - :paramtype failure_reason: str or ~azure.servicefabric.models.FailureReason - :keyword upgrade_domain_progress_at_failure: The detailed upgrade progress for nodes in the - current upgrade domain at the point of failure. Not applicable to node-by-node upgrades. - :paramtype upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailedUpgradeDomainProgressObject - :keyword is_node_by_node: Indicates whether this upgrade is node-by-node. - :paramtype is_node_by_node: bool - """ - super(ClusterUpgradeProgressObject, self).__init__(**kwargs) - self.code_version = code_version - self.config_version = config_version - self.upgrade_domains = upgrade_domains - self.upgrade_units = upgrade_units - self.upgrade_state = upgrade_state - self.next_upgrade_domain = next_upgrade_domain - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_description = upgrade_description - self.upgrade_duration_in_milliseconds = upgrade_duration_in_milliseconds - self.upgrade_domain_duration_in_milliseconds = upgrade_domain_duration_in_milliseconds - self.unhealthy_evaluations = unhealthy_evaluations - self.current_upgrade_domain_progress = current_upgrade_domain_progress - self.current_upgrade_units_progress = current_upgrade_units_progress - self.start_timestamp_utc = start_timestamp_utc - self.failure_timestamp_utc = failure_timestamp_utc - self.failure_reason = failure_reason - self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure - self.is_node_by_node = is_node_by_node - - -class ClusterUpgradeRollbackCompletedEvent(ClusterEvent): - """Cluster Upgrade Rollback Completed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar target_cluster_version: Required. Target Cluster version. - :vartype target_cluster_version: str - :ivar failure_reason: Required. Describes failure. - :vartype failure_reason: str - :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in - milli-seconds. - :vartype overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'target_cluster_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - target_cluster_version: str, - failure_reason: str, - overall_upgrade_elapsed_time_in_ms: float, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword target_cluster_version: Required. Target Cluster version. - :paramtype target_cluster_version: str - :keyword failure_reason: Required. Describes failure. - :paramtype failure_reason: str - :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in - milli-seconds. - :paramtype overall_upgrade_elapsed_time_in_ms: float - """ - super(ClusterUpgradeRollbackCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ClusterUpgradeRollbackCompleted' # type: str - self.target_cluster_version = target_cluster_version - self.failure_reason = failure_reason - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - - -class ClusterUpgradeRollbackStartedEvent(ClusterEvent): - """Cluster Upgrade Rollback Started event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar target_cluster_version: Required. Target Cluster version. - :vartype target_cluster_version: str - :ivar failure_reason: Required. Describes failure. - :vartype failure_reason: str - :ivar overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in - milli-seconds. - :vartype overall_upgrade_elapsed_time_in_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'target_cluster_version': {'required': True}, - 'failure_reason': {'required': True}, - 'overall_upgrade_elapsed_time_in_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'overall_upgrade_elapsed_time_in_ms': {'key': 'OverallUpgradeElapsedTimeInMs', 'type': 'float'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - target_cluster_version: str, - failure_reason: str, - overall_upgrade_elapsed_time_in_ms: float, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword target_cluster_version: Required. Target Cluster version. - :paramtype target_cluster_version: str - :keyword failure_reason: Required. Describes failure. - :paramtype failure_reason: str - :keyword overall_upgrade_elapsed_time_in_ms: Required. Overall duration of upgrade in - milli-seconds. - :paramtype overall_upgrade_elapsed_time_in_ms: float - """ - super(ClusterUpgradeRollbackStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ClusterUpgradeRollbackStarted' # type: str - self.target_cluster_version = target_cluster_version - self.failure_reason = failure_reason - self.overall_upgrade_elapsed_time_in_ms = overall_upgrade_elapsed_time_in_ms - - -class ClusterUpgradeStartedEvent(ClusterEvent): - """Cluster Upgrade Started event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar current_cluster_version: Required. Current Cluster version. - :vartype current_cluster_version: str - :ivar target_cluster_version: Required. Target Cluster version. - :vartype target_cluster_version: str - :ivar upgrade_type: Required. Type of upgrade. - :vartype upgrade_type: str - :ivar rolling_upgrade_mode: Required. Mode of upgrade. - :vartype rolling_upgrade_mode: str - :ivar failure_action: Required. Action if failed. - :vartype failure_action: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'current_cluster_version': {'required': True}, - 'target_cluster_version': {'required': True}, - 'upgrade_type': {'required': True}, - 'rolling_upgrade_mode': {'required': True}, - 'failure_action': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'current_cluster_version': {'key': 'CurrentClusterVersion', 'type': 'str'}, - 'target_cluster_version': {'key': 'TargetClusterVersion', 'type': 'str'}, - 'upgrade_type': {'key': 'UpgradeType', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - current_cluster_version: str, - target_cluster_version: str, - upgrade_type: str, - rolling_upgrade_mode: str, - failure_action: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword current_cluster_version: Required. Current Cluster version. - :paramtype current_cluster_version: str - :keyword target_cluster_version: Required. Target Cluster version. - :paramtype target_cluster_version: str - :keyword upgrade_type: Required. Type of upgrade. - :paramtype upgrade_type: str - :keyword rolling_upgrade_mode: Required. Mode of upgrade. - :paramtype rolling_upgrade_mode: str - :keyword failure_action: Required. Action if failed. - :paramtype failure_action: str - """ - super(ClusterUpgradeStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ClusterUpgradeStarted' # type: str - self.current_cluster_version = current_cluster_version - self.target_cluster_version = target_cluster_version - self.upgrade_type = upgrade_type - self.rolling_upgrade_mode = rolling_upgrade_mode - self.failure_action = failure_action - - -class ClusterVersion(msrest.serialization.Model): - """The cluster version. - - :ivar version: The Service Fabric cluster runtime version. - :vartype version: str - """ - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__( - self, - *, - version: Optional[str] = None, - **kwargs - ): - """ - :keyword version: The Service Fabric cluster runtime version. - :paramtype version: str - """ - super(ClusterVersion, self).__init__(**kwargs) - self.version = version - - -class CodePackageEntryPoint(msrest.serialization.Model): - """Information about setup or main entry point of a code package deployed on a Service Fabric node. - - :ivar entry_point_location: The location of entry point executable on the node. - :vartype entry_point_location: str - :ivar process_id: The process ID of the entry point. - :vartype process_id: str - :ivar run_as_user_name: The user name under which entry point executable is run on the node. - :vartype run_as_user_name: str - :ivar code_package_entry_point_statistics: Statistics about setup or main entry point of a - code package deployed on a Service Fabric node. - :vartype code_package_entry_point_statistics: - ~azure.servicefabric.models.CodePackageEntryPointStatistics - :ivar status: Specifies the status of the code package entry point deployed on a Service Fabric - node. Possible values include: "Invalid", "Pending", "Starting", "Started", "Stopping", - "Stopped". - :vartype status: str or ~azure.servicefabric.models.EntryPointStatus - :ivar next_activation_time: The time (in UTC) when the entry point executable will be run next. - :vartype next_activation_time: ~datetime.datetime - :ivar instance_id: The instance ID for current running entry point. For a code package setup - entry point (if specified) runs first and after it finishes main entry point is started. Each - time entry point executable is run, its instance id will change. - :vartype instance_id: str - :ivar container_id: The container ID of the entry point. Only valid for container hosts. - :vartype container_id: str - """ - - _attribute_map = { - 'entry_point_location': {'key': 'EntryPointLocation', 'type': 'str'}, - 'process_id': {'key': 'ProcessId', 'type': 'str'}, - 'run_as_user_name': {'key': 'RunAsUserName', 'type': 'str'}, - 'code_package_entry_point_statistics': {'key': 'CodePackageEntryPointStatistics', 'type': 'CodePackageEntryPointStatistics'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'next_activation_time': {'key': 'NextActivationTime', 'type': 'iso-8601'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'container_id': {'key': 'ContainerId', 'type': 'str'}, - } - - def __init__( - self, - *, - entry_point_location: Optional[str] = None, - process_id: Optional[str] = None, - run_as_user_name: Optional[str] = None, - code_package_entry_point_statistics: Optional["CodePackageEntryPointStatistics"] = None, - status: Optional[Union[str, "EntryPointStatus"]] = None, - next_activation_time: Optional[datetime.datetime] = None, - instance_id: Optional[str] = None, - container_id: Optional[str] = None, - **kwargs - ): - """ - :keyword entry_point_location: The location of entry point executable on the node. - :paramtype entry_point_location: str - :keyword process_id: The process ID of the entry point. - :paramtype process_id: str - :keyword run_as_user_name: The user name under which entry point executable is run on the node. - :paramtype run_as_user_name: str - :keyword code_package_entry_point_statistics: Statistics about setup or main entry point of a - code package deployed on a Service Fabric node. - :paramtype code_package_entry_point_statistics: - ~azure.servicefabric.models.CodePackageEntryPointStatistics - :keyword status: Specifies the status of the code package entry point deployed on a Service - Fabric node. Possible values include: "Invalid", "Pending", "Starting", "Started", "Stopping", - "Stopped". - :paramtype status: str or ~azure.servicefabric.models.EntryPointStatus - :keyword next_activation_time: The time (in UTC) when the entry point executable will be run - next. - :paramtype next_activation_time: ~datetime.datetime - :keyword instance_id: The instance ID for current running entry point. For a code package setup - entry point (if specified) runs first and after it finishes main entry point is started. Each - time entry point executable is run, its instance id will change. - :paramtype instance_id: str - :keyword container_id: The container ID of the entry point. Only valid for container hosts. - :paramtype container_id: str - """ - super(CodePackageEntryPoint, self).__init__(**kwargs) - self.entry_point_location = entry_point_location - self.process_id = process_id - self.run_as_user_name = run_as_user_name - self.code_package_entry_point_statistics = code_package_entry_point_statistics - self.status = status - self.next_activation_time = next_activation_time - self.instance_id = instance_id - self.container_id = container_id - - -class CodePackageEntryPointStatistics(msrest.serialization.Model): - """Statistics about setup or main entry point of a code package deployed on a Service Fabric node. - - :ivar last_exit_code: The last exit code of the entry point. - :vartype last_exit_code: str - :ivar last_activation_time: The last time (in UTC) when Service Fabric attempted to run the - entry point. - :vartype last_activation_time: ~datetime.datetime - :ivar last_exit_time: The last time (in UTC) when the entry point finished running. - :vartype last_exit_time: ~datetime.datetime - :ivar last_successful_activation_time: The last time (in UTC) when the entry point ran - successfully. - :vartype last_successful_activation_time: ~datetime.datetime - :ivar last_successful_exit_time: The last time (in UTC) when the entry point finished running - gracefully. - :vartype last_successful_exit_time: ~datetime.datetime - :ivar activation_count: Number of times the entry point has run. - :vartype activation_count: str - :ivar activation_failure_count: Number of times the entry point failed to run. - :vartype activation_failure_count: str - :ivar continuous_activation_failure_count: Number of times the entry point continuously failed - to run. - :vartype continuous_activation_failure_count: str - :ivar exit_count: Number of times the entry point finished running. - :vartype exit_count: str - :ivar exit_failure_count: Number of times the entry point failed to exit gracefully. - :vartype exit_failure_count: str - :ivar continuous_exit_failure_count: Number of times the entry point continuously failed to - exit gracefully. - :vartype continuous_exit_failure_count: str - """ - - _attribute_map = { - 'last_exit_code': {'key': 'LastExitCode', 'type': 'str'}, - 'last_activation_time': {'key': 'LastActivationTime', 'type': 'iso-8601'}, - 'last_exit_time': {'key': 'LastExitTime', 'type': 'iso-8601'}, - 'last_successful_activation_time': {'key': 'LastSuccessfulActivationTime', 'type': 'iso-8601'}, - 'last_successful_exit_time': {'key': 'LastSuccessfulExitTime', 'type': 'iso-8601'}, - 'activation_count': {'key': 'ActivationCount', 'type': 'str'}, - 'activation_failure_count': {'key': 'ActivationFailureCount', 'type': 'str'}, - 'continuous_activation_failure_count': {'key': 'ContinuousActivationFailureCount', 'type': 'str'}, - 'exit_count': {'key': 'ExitCount', 'type': 'str'}, - 'exit_failure_count': {'key': 'ExitFailureCount', 'type': 'str'}, - 'continuous_exit_failure_count': {'key': 'ContinuousExitFailureCount', 'type': 'str'}, - } - - def __init__( - self, - *, - last_exit_code: Optional[str] = None, - last_activation_time: Optional[datetime.datetime] = None, - last_exit_time: Optional[datetime.datetime] = None, - last_successful_activation_time: Optional[datetime.datetime] = None, - last_successful_exit_time: Optional[datetime.datetime] = None, - activation_count: Optional[str] = None, - activation_failure_count: Optional[str] = None, - continuous_activation_failure_count: Optional[str] = None, - exit_count: Optional[str] = None, - exit_failure_count: Optional[str] = None, - continuous_exit_failure_count: Optional[str] = None, - **kwargs - ): - """ - :keyword last_exit_code: The last exit code of the entry point. - :paramtype last_exit_code: str - :keyword last_activation_time: The last time (in UTC) when Service Fabric attempted to run the - entry point. - :paramtype last_activation_time: ~datetime.datetime - :keyword last_exit_time: The last time (in UTC) when the entry point finished running. - :paramtype last_exit_time: ~datetime.datetime - :keyword last_successful_activation_time: The last time (in UTC) when the entry point ran - successfully. - :paramtype last_successful_activation_time: ~datetime.datetime - :keyword last_successful_exit_time: The last time (in UTC) when the entry point finished - running gracefully. - :paramtype last_successful_exit_time: ~datetime.datetime - :keyword activation_count: Number of times the entry point has run. - :paramtype activation_count: str - :keyword activation_failure_count: Number of times the entry point failed to run. - :paramtype activation_failure_count: str - :keyword continuous_activation_failure_count: Number of times the entry point continuously - failed to run. - :paramtype continuous_activation_failure_count: str - :keyword exit_count: Number of times the entry point finished running. - :paramtype exit_count: str - :keyword exit_failure_count: Number of times the entry point failed to exit gracefully. - :paramtype exit_failure_count: str - :keyword continuous_exit_failure_count: Number of times the entry point continuously failed to - exit gracefully. - :paramtype continuous_exit_failure_count: str - """ - super(CodePackageEntryPointStatistics, self).__init__(**kwargs) - self.last_exit_code = last_exit_code - self.last_activation_time = last_activation_time - self.last_exit_time = last_exit_time - self.last_successful_activation_time = last_successful_activation_time - self.last_successful_exit_time = last_successful_exit_time - self.activation_count = activation_count - self.activation_failure_count = activation_failure_count - self.continuous_activation_failure_count = continuous_activation_failure_count - self.exit_count = exit_count - self.exit_failure_count = exit_failure_count - self.continuous_exit_failure_count = continuous_exit_failure_count - - -class ComposeDeploymentStatusInfo(msrest.serialization.Model): - """Information about a Service Fabric compose deployment. - - :ivar name: The name of the deployment. - :vartype name: str - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar status: The status of the compose deployment. Possible values include: "Invalid", - "Provisioning", "Creating", "Ready", "Unprovisioning", "Deleting", "Failed", "Upgrading". - :vartype status: str or ~azure.servicefabric.models.ComposeDeploymentStatus - :ivar status_details: The status details of compose deployment including failure message. - :vartype status_details: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - application_name: Optional[str] = None, - status: Optional[Union[str, "ComposeDeploymentStatus"]] = None, - status_details: Optional[str] = None, - **kwargs - ): - """ - :keyword name: The name of the deployment. - :paramtype name: str - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword status: The status of the compose deployment. Possible values include: "Invalid", - "Provisioning", "Creating", "Ready", "Unprovisioning", "Deleting", "Failed", "Upgrading". - :paramtype status: str or ~azure.servicefabric.models.ComposeDeploymentStatus - :keyword status_details: The status details of compose deployment including failure message. - :paramtype status_details: str - """ - super(ComposeDeploymentStatusInfo, self).__init__(**kwargs) - self.name = name - self.application_name = application_name - self.status = status - self.status_details = status_details - - -class ComposeDeploymentUpgradeDescription(msrest.serialization.Model): - """Describes the parameters for a compose deployment upgrade. - - All required parameters must be populated in order to send to Azure. - - :ivar deployment_name: Required. The name of the deployment. - :vartype deployment_name: str - :ivar compose_file_content: Required. The content of the compose file that describes the - deployment to create. - :vartype compose_file_content: str - :ivar registry_credential: Credential information to connect to container registry. - :vartype registry_credential: ~azure.servicefabric.models.RegistryCredential - :ivar upgrade_kind: Required. The kind of upgrade out of the following possible values. - Possible values include: "Invalid", "Rolling". Default value: "Rolling". - :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :vartype upgrade_replica_set_check_timeout_in_seconds: long - :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when - the code version has not changed (the upgrade only changes configuration or data). - :vartype force_restart: bool - :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. - :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :ivar application_health_policy: Defines a health policy used to evaluate the health of an - application or one of its children entities. - :vartype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - """ - - _validation = { - 'deployment_name': {'required': True}, - 'compose_file_content': {'required': True}, - 'upgrade_kind': {'required': True}, - } - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, - 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - } - - def __init__( - self, - *, - deployment_name: str, - compose_file_content: str, - upgrade_kind: Union[str, "UpgradeKind"] = "Rolling", - registry_credential: Optional["RegistryCredential"] = None, - rolling_upgrade_mode: Optional[Union[str, "UpgradeMode"]] = "UnmonitoredAuto", - upgrade_replica_set_check_timeout_in_seconds: Optional[int] = 42949672925, - force_restart: Optional[bool] = False, - monitoring_policy: Optional["MonitoringPolicyDescription"] = None, - application_health_policy: Optional["ApplicationHealthPolicy"] = None, - **kwargs - ): - """ - :keyword deployment_name: Required. The name of the deployment. - :paramtype deployment_name: str - :keyword compose_file_content: Required. The content of the compose file that describes the - deployment to create. - :paramtype compose_file_content: str - :keyword registry_credential: Credential information to connect to container registry. - :paramtype registry_credential: ~azure.servicefabric.models.RegistryCredential - :keyword upgrade_kind: Required. The kind of upgrade out of the following possible values. - Possible values include: "Invalid", "Rolling". Default value: "Rolling". - :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :paramtype upgrade_replica_set_check_timeout_in_seconds: long - :keyword force_restart: If true, then processes are forcefully restarted during upgrade even - when the code version has not changed (the upgrade only changes configuration or data). - :paramtype force_restart: bool - :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored - mode. - :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :keyword application_health_policy: Defines a health policy used to evaluate the health of an - application or one of its children entities. - :paramtype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - """ - super(ComposeDeploymentUpgradeDescription, self).__init__(**kwargs) - self.deployment_name = deployment_name - self.compose_file_content = compose_file_content - self.registry_credential = registry_credential - self.upgrade_kind = upgrade_kind - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.force_restart = force_restart - self.monitoring_policy = monitoring_policy - self.application_health_policy = application_health_policy - - -class ComposeDeploymentUpgradeProgressInfo(msrest.serialization.Model): - """Describes the parameters for a compose deployment upgrade. - - :ivar deployment_name: The name of the target deployment. - :vartype deployment_name: str - :ivar application_name: The name of the target application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar upgrade_state: The state of the compose deployment upgrade. Possible values include: - "Invalid", "ProvisioningTarget", "RollingForwardInProgress", "RollingForwardPending", - "UnprovisioningCurrent", "RollingForwardCompleted", "RollingBackInProgress", - "UnprovisioningTarget", "RollingBackCompleted", "Failed". - :vartype upgrade_state: str or ~azure.servicefabric.models.ComposeDeploymentUpgradeState - :ivar upgrade_status_details: Additional detailed information about the status of the pending - upgrade. - :vartype upgrade_status_details: str - :ivar upgrade_kind: The kind of upgrade out of the following possible values. Possible values - include: "Invalid", "Rolling". Default value: "Rolling". - :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when - the code version has not changed (the upgrade only changes configuration or data). - :vartype force_restart: bool - :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :vartype upgrade_replica_set_check_timeout_in_seconds: long - :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. - :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :ivar application_health_policy: Defines a health policy used to evaluate the health of an - application or one of its children entities. - :vartype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :ivar target_application_type_version: The target application type version (found in the - application manifest) for the application upgrade. - :vartype target_application_type_version: str - :ivar upgrade_duration: The estimated amount of time that the overall upgrade elapsed. It is - first interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :vartype upgrade_duration: str - :ivar current_upgrade_domain_duration: The estimated amount of time spent processing current - Upgrade Domain. It is first interpreted as a string representing an ISO 8601 duration. If that - fails, then it is interpreted as a number representing the total number of milliseconds. - :vartype current_upgrade_domain_duration: str - :ivar application_unhealthy_evaluations: List of health evaluations that resulted in the - current aggregated health state. - :vartype application_unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar current_upgrade_domain_progress: Information about the current in-progress upgrade - domain. Not applicable to node-by-node upgrades. - :vartype current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :ivar start_timestamp_utc: The estimated UTC datetime when the upgrade started. - :vartype start_timestamp_utc: str - :ivar failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and - FailureAction was executed. - :vartype failure_timestamp_utc: str - :ivar failure_reason: The cause of an upgrade failure that resulted in FailureAction being - executed. Possible values include: "None", "Interrupted", "HealthCheck", - "UpgradeDomainTimeout", "OverallUpgradeTimeout". - :vartype failure_reason: str or ~azure.servicefabric.models.FailureReason - :ivar upgrade_domain_progress_at_failure: Information about the upgrade domain progress at the - time of upgrade failure. - :vartype upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo - :ivar application_upgrade_status_details: Additional details of application upgrade including - failure message. - :vartype application_upgrade_status_details: str - """ - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'upgrade_state': {'key': 'UpgradeState', 'type': 'str'}, - 'upgrade_status_details': {'key': 'UpgradeStatusDetails', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, - 'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - 'current_upgrade_domain_duration': {'key': 'CurrentUpgradeDomainDuration', 'type': 'str'}, - 'application_unhealthy_evaluations': {'key': 'ApplicationUnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'current_upgrade_domain_progress': {'key': 'CurrentUpgradeDomainProgress', 'type': 'CurrentUpgradeDomainProgressInfo'}, - 'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'}, - 'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'}, - 'failure_reason': {'key': 'FailureReason', 'type': 'str'}, - 'upgrade_domain_progress_at_failure': {'key': 'UpgradeDomainProgressAtFailure', 'type': 'FailureUpgradeDomainProgressInfo'}, - 'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'}, - } - - def __init__( - self, - *, - deployment_name: Optional[str] = None, - application_name: Optional[str] = None, - upgrade_state: Optional[Union[str, "ComposeDeploymentUpgradeState"]] = None, - upgrade_status_details: Optional[str] = None, - upgrade_kind: Optional[Union[str, "UpgradeKind"]] = "Rolling", - rolling_upgrade_mode: Optional[Union[str, "UpgradeMode"]] = "UnmonitoredAuto", - force_restart: Optional[bool] = False, - upgrade_replica_set_check_timeout_in_seconds: Optional[int] = 42949672925, - monitoring_policy: Optional["MonitoringPolicyDescription"] = None, - application_health_policy: Optional["ApplicationHealthPolicy"] = None, - target_application_type_version: Optional[str] = None, - upgrade_duration: Optional[str] = "PT0H2M0S", - current_upgrade_domain_duration: Optional[str] = "PT0H2M0S", - application_unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - current_upgrade_domain_progress: Optional["CurrentUpgradeDomainProgressInfo"] = None, - start_timestamp_utc: Optional[str] = None, - failure_timestamp_utc: Optional[str] = None, - failure_reason: Optional[Union[str, "FailureReason"]] = None, - upgrade_domain_progress_at_failure: Optional["FailureUpgradeDomainProgressInfo"] = None, - application_upgrade_status_details: Optional[str] = None, - **kwargs - ): - """ - :keyword deployment_name: The name of the target deployment. - :paramtype deployment_name: str - :keyword application_name: The name of the target application, including the 'fabric:' URI - scheme. - :paramtype application_name: str - :keyword upgrade_state: The state of the compose deployment upgrade. Possible values include: - "Invalid", "ProvisioningTarget", "RollingForwardInProgress", "RollingForwardPending", - "UnprovisioningCurrent", "RollingForwardCompleted", "RollingBackInProgress", - "UnprovisioningTarget", "RollingBackCompleted", "Failed". - :paramtype upgrade_state: str or ~azure.servicefabric.models.ComposeDeploymentUpgradeState - :keyword upgrade_status_details: Additional detailed information about the status of the - pending upgrade. - :paramtype upgrade_status_details: str - :keyword upgrade_kind: The kind of upgrade out of the following possible values. Possible - values include: "Invalid", "Rolling". Default value: "Rolling". - :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :keyword force_restart: If true, then processes are forcefully restarted during upgrade even - when the code version has not changed (the upgrade only changes configuration or data). - :paramtype force_restart: bool - :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :paramtype upgrade_replica_set_check_timeout_in_seconds: long - :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored - mode. - :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :keyword application_health_policy: Defines a health policy used to evaluate the health of an - application or one of its children entities. - :paramtype application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword target_application_type_version: The target application type version (found in the - application manifest) for the application upgrade. - :paramtype target_application_type_version: str - :keyword upgrade_duration: The estimated amount of time that the overall upgrade elapsed. It is - first interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :paramtype upgrade_duration: str - :keyword current_upgrade_domain_duration: The estimated amount of time spent processing current - Upgrade Domain. It is first interpreted as a string representing an ISO 8601 duration. If that - fails, then it is interpreted as a number representing the total number of milliseconds. - :paramtype current_upgrade_domain_duration: str - :keyword application_unhealthy_evaluations: List of health evaluations that resulted in the - current aggregated health state. - :paramtype application_unhealthy_evaluations: - list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword current_upgrade_domain_progress: Information about the current in-progress upgrade - domain. Not applicable to node-by-node upgrades. - :paramtype current_upgrade_domain_progress: - ~azure.servicefabric.models.CurrentUpgradeDomainProgressInfo - :keyword start_timestamp_utc: The estimated UTC datetime when the upgrade started. - :paramtype start_timestamp_utc: str - :keyword failure_timestamp_utc: The estimated UTC datetime when the upgrade failed and - FailureAction was executed. - :paramtype failure_timestamp_utc: str - :keyword failure_reason: The cause of an upgrade failure that resulted in FailureAction being - executed. Possible values include: "None", "Interrupted", "HealthCheck", - "UpgradeDomainTimeout", "OverallUpgradeTimeout". - :paramtype failure_reason: str or ~azure.servicefabric.models.FailureReason - :keyword upgrade_domain_progress_at_failure: Information about the upgrade domain progress at - the time of upgrade failure. - :paramtype upgrade_domain_progress_at_failure: - ~azure.servicefabric.models.FailureUpgradeDomainProgressInfo - :keyword application_upgrade_status_details: Additional details of application upgrade - including failure message. - :paramtype application_upgrade_status_details: str - """ - super(ComposeDeploymentUpgradeProgressInfo, self).__init__(**kwargs) - self.deployment_name = deployment_name - self.application_name = application_name - self.upgrade_state = upgrade_state - self.upgrade_status_details = upgrade_status_details - self.upgrade_kind = upgrade_kind - self.rolling_upgrade_mode = rolling_upgrade_mode - self.force_restart = force_restart - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.monitoring_policy = monitoring_policy - self.application_health_policy = application_health_policy - self.target_application_type_version = target_application_type_version - self.upgrade_duration = upgrade_duration - self.current_upgrade_domain_duration = current_upgrade_domain_duration - self.application_unhealthy_evaluations = application_unhealthy_evaluations - self.current_upgrade_domain_progress = current_upgrade_domain_progress - self.start_timestamp_utc = start_timestamp_utc - self.failure_timestamp_utc = failure_timestamp_utc - self.failure_reason = failure_reason - self.upgrade_domain_progress_at_failure = upgrade_domain_progress_at_failure - self.application_upgrade_status_details = application_upgrade_status_details - - -class ConfigParameterOverride(msrest.serialization.Model): - """Information about a configuration parameter override. - - All required parameters must be populated in order to send to Azure. - - :ivar section_name: Required. Name of the section for the parameter override. - :vartype section_name: str - :ivar parameter_name: Required. Name of the parameter that has been overridden. - :vartype parameter_name: str - :ivar parameter_value: Required. Value of the overridden parameter. - :vartype parameter_value: str - :ivar timeout: The duration until config override is considered as valid. - :vartype timeout: ~datetime.timedelta - :ivar persist_across_upgrade: A value that indicates whether config override will be removed on - upgrade or will still be considered as valid. - :vartype persist_across_upgrade: bool - """ - - _validation = { - 'section_name': {'required': True}, - 'parameter_name': {'required': True}, - 'parameter_value': {'required': True}, - } - - _attribute_map = { - 'section_name': {'key': 'SectionName', 'type': 'str'}, - 'parameter_name': {'key': 'ParameterName', 'type': 'str'}, - 'parameter_value': {'key': 'ParameterValue', 'type': 'str'}, - 'timeout': {'key': 'Timeout', 'type': 'duration'}, - 'persist_across_upgrade': {'key': 'PersistAcrossUpgrade', 'type': 'bool'}, - } - - def __init__( - self, - *, - section_name: str, - parameter_name: str, - parameter_value: str, - timeout: Optional[datetime.timedelta] = None, - persist_across_upgrade: Optional[bool] = None, - **kwargs - ): - """ - :keyword section_name: Required. Name of the section for the parameter override. - :paramtype section_name: str - :keyword parameter_name: Required. Name of the parameter that has been overridden. - :paramtype parameter_name: str - :keyword parameter_value: Required. Value of the overridden parameter. - :paramtype parameter_value: str - :keyword timeout: The duration until config override is considered as valid. - :paramtype timeout: ~datetime.timedelta - :keyword persist_across_upgrade: A value that indicates whether config override will be removed - on upgrade or will still be considered as valid. - :paramtype persist_across_upgrade: bool - """ - super(ConfigParameterOverride, self).__init__(**kwargs) - self.section_name = section_name - self.parameter_name = parameter_name - self.parameter_value = parameter_value - self.timeout = timeout - self.persist_across_upgrade = persist_across_upgrade - - -class ContainerApiRequestBody(msrest.serialization.Model): - """parameters for making container API call. - - All required parameters must be populated in order to send to Azure. - - :ivar http_verb: HTTP verb of container REST API, defaults to "GET". - :vartype http_verb: str - :ivar uri_path: Required. URI path of container REST API. - :vartype uri_path: str - :ivar content_type: Content type of container REST API request, defaults to "application/json". - :vartype content_type: str - :ivar body: HTTP request body of container REST API. - :vartype body: str - """ - - _validation = { - 'uri_path': {'required': True}, - } - - _attribute_map = { - 'http_verb': {'key': 'HttpVerb', 'type': 'str'}, - 'uri_path': {'key': 'UriPath', 'type': 'str'}, - 'content_type': {'key': 'Content-Type', 'type': 'str'}, - 'body': {'key': 'Body', 'type': 'str'}, - } - - def __init__( - self, - *, - uri_path: str, - http_verb: Optional[str] = None, - content_type: Optional[str] = None, - body: Optional[str] = None, - **kwargs - ): - """ - :keyword http_verb: HTTP verb of container REST API, defaults to "GET". - :paramtype http_verb: str - :keyword uri_path: Required. URI path of container REST API. - :paramtype uri_path: str - :keyword content_type: Content type of container REST API request, defaults to - "application/json". - :paramtype content_type: str - :keyword body: HTTP request body of container REST API. - :paramtype body: str - """ - super(ContainerApiRequestBody, self).__init__(**kwargs) - self.http_verb = http_verb - self.uri_path = uri_path - self.content_type = content_type - self.body = body - - -class ContainerApiResponse(msrest.serialization.Model): - """Response body that wraps container API result. - - All required parameters must be populated in order to send to Azure. - - :ivar container_api_result: Required. Container API result. - :vartype container_api_result: ~azure.servicefabric.models.ContainerApiResult - """ - - _validation = { - 'container_api_result': {'required': True}, - } - - _attribute_map = { - 'container_api_result': {'key': 'ContainerApiResult', 'type': 'ContainerApiResult'}, - } - - def __init__( - self, - *, - container_api_result: "ContainerApiResult", - **kwargs - ): - """ - :keyword container_api_result: Required. Container API result. - :paramtype container_api_result: ~azure.servicefabric.models.ContainerApiResult - """ - super(ContainerApiResponse, self).__init__(**kwargs) - self.container_api_result = container_api_result - - -class ContainerApiResult(msrest.serialization.Model): - """Container API result. - - All required parameters must be populated in order to send to Azure. - - :ivar status: Required. HTTP status code returned by the target container API. - :vartype status: int - :ivar content_type: HTTP content type. - :vartype content_type: str - :ivar content_encoding: HTTP content encoding. - :vartype content_encoding: str - :ivar body: container API result body. - :vartype body: str - """ - - _validation = { - 'status': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'Status', 'type': 'int'}, - 'content_type': {'key': 'Content-Type', 'type': 'str'}, - 'content_encoding': {'key': 'Content-Encoding', 'type': 'str'}, - 'body': {'key': 'Body', 'type': 'str'}, - } - - def __init__( - self, - *, - status: int, - content_type: Optional[str] = None, - content_encoding: Optional[str] = None, - body: Optional[str] = None, - **kwargs - ): - """ - :keyword status: Required. HTTP status code returned by the target container API. - :paramtype status: int - :keyword content_type: HTTP content type. - :paramtype content_type: str - :keyword content_encoding: HTTP content encoding. - :paramtype content_encoding: str - :keyword body: container API result body. - :paramtype body: str - """ - super(ContainerApiResult, self).__init__(**kwargs) - self.status = status - self.content_type = content_type - self.content_encoding = content_encoding - self.body = body - - -class ContainerCodePackageProperties(msrest.serialization.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. - - :ivar name: Required. The name of the code package. - :vartype name: str - :ivar image: Required. The Container image to use. - :vartype image: str - :ivar image_registry_credential: Image registry credential. - :vartype image_registry_credential: ~azure.servicefabric.models.ImageRegistryCredential - :ivar entry_point: Override for the default entry point in the container. - :vartype entry_point: str - :ivar commands: Command array to execute within the container in exec form. - :vartype commands: list[str] - :ivar environment_variables: The environment variables to set in this container. - :vartype environment_variables: list[~azure.servicefabric.models.EnvironmentVariable] - :ivar 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". - :vartype settings: list[~azure.servicefabric.models.Setting] - :ivar labels: The labels to set in this container. - :vartype labels: list[~azure.servicefabric.models.ContainerLabel] - :ivar endpoints: The endpoints exposed by this container. - :vartype endpoints: list[~azure.servicefabric.models.EndpointProperties] - :ivar resources: Required. The resources required by this container. - :vartype resources: ~azure.servicefabric.models.ResourceRequirements - :ivar volume_refs: Volumes to be attached to the container. The lifetime of these volumes is - independent of the application's lifetime. - :vartype volume_refs: list[~azure.servicefabric.models.VolumeReference] - :ivar volumes: Volumes to be attached to the container. The lifetime of these volumes is scoped - to the application's lifetime. - :vartype volumes: list[~azure.servicefabric.models.ApplicationScopedVolume] - :ivar diagnostics: Reference to sinks in DiagnosticsDescription. - :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :ivar reliable_collections_refs: A list of ReliableCollection resources used by this particular - code package. Please refer to ReliableCollectionsRef for more details. - :vartype reliable_collections_refs: list[~azure.servicefabric.models.ReliableCollectionsRef] - :ivar instance_view: Runtime information of a container instance. - :vartype instance_view: ~azure.servicefabric.models.ContainerInstanceView - :ivar liveness_probe: An array of liveness probes for a code package. It determines when to - restart a code package. - :vartype liveness_probe: list[~azure.servicefabric.models.Probe] - :ivar readiness_probe: An array of readiness probes for a code package. It determines when to - unpublish an endpoint. - :vartype readiness_probe: list[~azure.servicefabric.models.Probe] - """ - - _validation = { - 'name': {'required': True}, - 'image': {'required': True}, - 'resources': {'required': True}, - 'instance_view': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'image': {'key': 'image', 'type': 'str'}, - 'image_registry_credential': {'key': 'imageRegistryCredential', 'type': 'ImageRegistryCredential'}, - 'entry_point': {'key': 'entryPoint', 'type': 'str'}, - 'commands': {'key': 'commands', 'type': '[str]'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '[EnvironmentVariable]'}, - 'settings': {'key': 'settings', 'type': '[Setting]'}, - 'labels': {'key': 'labels', 'type': '[ContainerLabel]'}, - 'endpoints': {'key': 'endpoints', 'type': '[EndpointProperties]'}, - 'resources': {'key': 'resources', 'type': 'ResourceRequirements'}, - 'volume_refs': {'key': 'volumeRefs', 'type': '[VolumeReference]'}, - 'volumes': {'key': 'volumes', 'type': '[ApplicationScopedVolume]'}, - 'diagnostics': {'key': 'diagnostics', 'type': 'DiagnosticsRef'}, - 'reliable_collections_refs': {'key': 'reliableCollectionsRefs', 'type': '[ReliableCollectionsRef]'}, - 'instance_view': {'key': 'instanceView', 'type': 'ContainerInstanceView'}, - 'liveness_probe': {'key': 'livenessProbe', 'type': '[Probe]'}, - 'readiness_probe': {'key': 'readinessProbe', 'type': '[Probe]'}, - } - - def __init__( - self, - *, - name: str, - image: str, - resources: "ResourceRequirements", - image_registry_credential: Optional["ImageRegistryCredential"] = None, - entry_point: Optional[str] = None, - commands: Optional[List[str]] = None, - environment_variables: Optional[List["EnvironmentVariable"]] = None, - settings: Optional[List["Setting"]] = None, - labels: Optional[List["ContainerLabel"]] = None, - endpoints: Optional[List["EndpointProperties"]] = None, - volume_refs: Optional[List["VolumeReference"]] = None, - volumes: Optional[List["ApplicationScopedVolume"]] = None, - diagnostics: Optional["DiagnosticsRef"] = None, - reliable_collections_refs: Optional[List["ReliableCollectionsRef"]] = None, - liveness_probe: Optional[List["Probe"]] = None, - readiness_probe: Optional[List["Probe"]] = None, - **kwargs - ): - """ - :keyword name: Required. The name of the code package. - :paramtype name: str - :keyword image: Required. The Container image to use. - :paramtype image: str - :keyword image_registry_credential: Image registry credential. - :paramtype image_registry_credential: ~azure.servicefabric.models.ImageRegistryCredential - :keyword entry_point: Override for the default entry point in the container. - :paramtype entry_point: str - :keyword commands: Command array to execute within the container in exec form. - :paramtype commands: list[str] - :keyword environment_variables: The environment variables to set in this container. - :paramtype environment_variables: list[~azure.servicefabric.models.EnvironmentVariable] - :keyword 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". - :paramtype settings: list[~azure.servicefabric.models.Setting] - :keyword labels: The labels to set in this container. - :paramtype labels: list[~azure.servicefabric.models.ContainerLabel] - :keyword endpoints: The endpoints exposed by this container. - :paramtype endpoints: list[~azure.servicefabric.models.EndpointProperties] - :keyword resources: Required. The resources required by this container. - :paramtype resources: ~azure.servicefabric.models.ResourceRequirements - :keyword volume_refs: Volumes to be attached to the container. The lifetime of these volumes is - independent of the application's lifetime. - :paramtype volume_refs: list[~azure.servicefabric.models.VolumeReference] - :keyword volumes: Volumes to be attached to the container. The lifetime of these volumes is - scoped to the application's lifetime. - :paramtype volumes: list[~azure.servicefabric.models.ApplicationScopedVolume] - :keyword diagnostics: Reference to sinks in DiagnosticsDescription. - :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :keyword reliable_collections_refs: A list of ReliableCollection resources used by this - particular code package. Please refer to ReliableCollectionsRef for more details. - :paramtype reliable_collections_refs: list[~azure.servicefabric.models.ReliableCollectionsRef] - :keyword liveness_probe: An array of liveness probes for a code package. It determines when to - restart a code package. - :paramtype liveness_probe: list[~azure.servicefabric.models.Probe] - :keyword readiness_probe: An array of readiness probes for a code package. It determines when - to unpublish an endpoint. - :paramtype readiness_probe: list[~azure.servicefabric.models.Probe] - """ - super(ContainerCodePackageProperties, self).__init__(**kwargs) - self.name = name - self.image = image - self.image_registry_credential = image_registry_credential - self.entry_point = entry_point - self.commands = commands - self.environment_variables = environment_variables - self.settings = settings - self.labels = labels - self.endpoints = endpoints - self.resources = resources - self.volume_refs = volume_refs - self.volumes = volumes - self.diagnostics = diagnostics - self.reliable_collections_refs = reliable_collections_refs - self.instance_view = None - self.liveness_probe = liveness_probe - self.readiness_probe = readiness_probe - - -class ContainerEvent(msrest.serialization.Model): - """A container event. - - :ivar name: The name of the container event. - :vartype name: str - :ivar count: The count of the event. - :vartype count: int - :ivar first_timestamp: Date/time of the first event. - :vartype first_timestamp: str - :ivar last_timestamp: Date/time of the last event. - :vartype last_timestamp: str - :ivar message: The event message. - :vartype message: str - :ivar type: The event type. - :vartype 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: Optional[str] = None, - count: Optional[int] = None, - first_timestamp: Optional[str] = None, - last_timestamp: Optional[str] = None, - message: Optional[str] = None, - type: Optional[str] = None, - **kwargs - ): - """ - :keyword name: The name of the container event. - :paramtype name: str - :keyword count: The count of the event. - :paramtype count: int - :keyword first_timestamp: Date/time of the first event. - :paramtype first_timestamp: str - :keyword last_timestamp: Date/time of the last event. - :paramtype last_timestamp: str - :keyword message: The event message. - :paramtype message: str - :keyword type: The event type. - :paramtype type: str - """ - super(ContainerEvent, self).__init__(**kwargs) - self.name = name - self.count = count - self.first_timestamp = first_timestamp - self.last_timestamp = last_timestamp - self.message = message - self.type = type - - -class ContainerInstanceEvent(FabricEvent): - """Represents the base for all Container Events. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - """ - super(ContainerInstanceEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ContainerInstanceEvent' # type: str - - -class ContainerInstanceView(msrest.serialization.Model): - """Runtime information of a container instance. - - :ivar restart_count: The number of times the container has been restarted. - :vartype restart_count: int - :ivar current_state: Current container instance state. - :vartype current_state: ~azure.servicefabric.models.ContainerState - :ivar previous_state: Previous container instance state. - :vartype previous_state: ~azure.servicefabric.models.ContainerState - :ivar events: The events of this container instance. - :vartype 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: Optional[int] = None, - current_state: Optional["ContainerState"] = None, - previous_state: Optional["ContainerState"] = None, - events: Optional[List["ContainerEvent"]] = None, - **kwargs - ): - """ - :keyword restart_count: The number of times the container has been restarted. - :paramtype restart_count: int - :keyword current_state: Current container instance state. - :paramtype current_state: ~azure.servicefabric.models.ContainerState - :keyword previous_state: Previous container instance state. - :paramtype previous_state: ~azure.servicefabric.models.ContainerState - :keyword events: The events of this container instance. - :paramtype events: list[~azure.servicefabric.models.ContainerEvent] - """ - super(ContainerInstanceView, self).__init__(**kwargs) - self.restart_count = restart_count - self.current_state = current_state - self.previous_state = previous_state - self.events = events - - -class ContainerLabel(msrest.serialization.Model): - """Describes a container label. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the container label. - :vartype name: str - :ivar value: Required. The value of the container label. - :vartype 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 - ): - """ - :keyword name: Required. The name of the container label. - :paramtype name: str - :keyword value: Required. The value of the container label. - :paramtype value: str - """ - super(ContainerLabel, self).__init__(**kwargs) - self.name = name - self.value = value - - -class ContainerLogs(msrest.serialization.Model): - """Container logs. - - :ivar content: Container logs. - :vartype content: str - """ - - _attribute_map = { - 'content': {'key': 'Content', 'type': 'str'}, - } - - def __init__( - self, - *, - content: Optional[str] = None, - **kwargs - ): - """ - :keyword content: Container logs. - :paramtype content: str - """ - super(ContainerLogs, self).__init__(**kwargs) - self.content = content - - -class ContainerState(msrest.serialization.Model): - """The container state. - - :ivar state: The state of this container. - :vartype state: str - :ivar start_time: Date/time when the container state started. - :vartype start_time: ~datetime.datetime - :ivar exit_code: The container exit code. - :vartype exit_code: str - :ivar finish_time: Date/time when the container state finished. - :vartype finish_time: ~datetime.datetime - :ivar detail_status: Human-readable status of this state. - :vartype 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: Optional[str] = None, - start_time: Optional[datetime.datetime] = None, - exit_code: Optional[str] = None, - finish_time: Optional[datetime.datetime] = None, - detail_status: Optional[str] = None, - **kwargs - ): - """ - :keyword state: The state of this container. - :paramtype state: str - :keyword start_time: Date/time when the container state started. - :paramtype start_time: ~datetime.datetime - :keyword exit_code: The container exit code. - :paramtype exit_code: str - :keyword finish_time: Date/time when the container state finished. - :paramtype finish_time: ~datetime.datetime - :keyword detail_status: Human-readable status of this state. - :paramtype detail_status: str - """ - super(ContainerState, self).__init__(**kwargs) - self.state = state - self.start_time = start_time - self.exit_code = exit_code - self.finish_time = finish_time - self.detail_status = detail_status - - -class CreateComposeDeploymentDescription(msrest.serialization.Model): - """Defines description for creating a Service Fabric compose deployment. - - All required parameters must be populated in order to send to Azure. - - :ivar deployment_name: Required. The name of the deployment. - :vartype deployment_name: str - :ivar compose_file_content: Required. The content of the compose file that describes the - deployment to create. - :vartype compose_file_content: str - :ivar registry_credential: Credential information to connect to container registry. - :vartype registry_credential: ~azure.servicefabric.models.RegistryCredential - """ - - _validation = { - 'deployment_name': {'required': True}, - 'compose_file_content': {'required': True}, - } - - _attribute_map = { - 'deployment_name': {'key': 'DeploymentName', 'type': 'str'}, - 'compose_file_content': {'key': 'ComposeFileContent', 'type': 'str'}, - 'registry_credential': {'key': 'RegistryCredential', 'type': 'RegistryCredential'}, - } - - def __init__( - self, - *, - deployment_name: str, - compose_file_content: str, - registry_credential: Optional["RegistryCredential"] = None, - **kwargs - ): - """ - :keyword deployment_name: Required. The name of the deployment. - :paramtype deployment_name: str - :keyword compose_file_content: Required. The content of the compose file that describes the - deployment to create. - :paramtype compose_file_content: str - :keyword registry_credential: Credential information to connect to container registry. - :paramtype registry_credential: ~azure.servicefabric.models.RegistryCredential - """ - super(CreateComposeDeploymentDescription, self).__init__(**kwargs) - self.deployment_name = deployment_name - self.compose_file_content = compose_file_content - self.registry_credential = registry_credential - - -class CurrentUpgradeDomainProgressInfo(msrest.serialization.Model): - """Information about the current in-progress upgrade domain. Not applicable to node-by-node upgrades. - - :ivar domain_name: The name of the upgrade domain. - :vartype domain_name: str - :ivar node_upgrade_progress_list: List of upgrading nodes and their statuses. - :vartype node_upgrade_progress_list: list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__( - self, - *, - domain_name: Optional[str] = None, - node_upgrade_progress_list: Optional[List["NodeUpgradeProgressInfo"]] = None, - **kwargs - ): - """ - :keyword domain_name: The name of the upgrade domain. - :paramtype domain_name: str - :keyword node_upgrade_progress_list: List of upgrading nodes and their statuses. - :paramtype node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - super(CurrentUpgradeDomainProgressInfo, self).__init__(**kwargs) - self.domain_name = domain_name - self.node_upgrade_progress_list = node_upgrade_progress_list - - -class CurrentUpgradeUnitsProgressInfo(msrest.serialization.Model): - """Information about the current in-progress upgrade units. - - :ivar domain_name: The name of the upgrade domain. Not applicable to node-by-node upgrades. - :vartype domain_name: str - :ivar node_upgrade_progress_list: List of upgrading nodes and their statuses. - :vartype node_upgrade_progress_list: list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__( - self, - *, - domain_name: Optional[str] = None, - node_upgrade_progress_list: Optional[List["NodeUpgradeProgressInfo"]] = None, - **kwargs - ): - """ - :keyword domain_name: The name of the upgrade domain. Not applicable to node-by-node upgrades. - :paramtype domain_name: str - :keyword node_upgrade_progress_list: List of upgrading nodes and their statuses. - :paramtype node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - super(CurrentUpgradeUnitsProgressInfo, self).__init__(**kwargs) - self.domain_name = domain_name - self.node_upgrade_progress_list = node_upgrade_progress_list - - -class DeactivationIntentDescription(msrest.serialization.Model): - """Describes the intent or reason for deactivating the node. - - :ivar deactivation_intent: Describes the intent or reason for deactivating the node. The - possible values are following. Possible values include: "Pause", "Restart", "RemoveData". - :vartype deactivation_intent: str or ~azure.servicefabric.models.DeactivationIntent - """ - - _attribute_map = { - 'deactivation_intent': {'key': 'DeactivationIntent', 'type': 'str'}, - } - - def __init__( - self, - *, - deactivation_intent: Optional[Union[str, "DeactivationIntent"]] = None, - **kwargs - ): - """ - :keyword deactivation_intent: Describes the intent or reason for deactivating the node. The - possible values are following. Possible values include: "Pause", "Restart", "RemoveData". - :paramtype deactivation_intent: str or ~azure.servicefabric.models.DeactivationIntent - """ - super(DeactivationIntentDescription, self).__init__(**kwargs) - self.deactivation_intent = deactivation_intent - - -class ExecutionPolicy(msrest.serialization.Model): - """The execution policy of the service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DefaultExecutionPolicy, RunToCompletionExecutionPolicy. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Enumerates the execution policy types for services.Constant filled by - server. Possible values include: "Default", "RunToCompletion". - :vartype type: str or ~azure.servicefabric.models.ExecutionPolicyType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'Default': 'DefaultExecutionPolicy', 'RunToCompletion': 'RunToCompletionExecutionPolicy'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ExecutionPolicy, self).__init__(**kwargs) - self.type = None # type: Optional[str] - - -class DefaultExecutionPolicy(ExecutionPolicy): - """The default execution policy. Always restart the service if an exit occurs. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Enumerates the execution policy types for services.Constant filled by - server. Possible values include: "Default", "RunToCompletion". - :vartype type: str or ~azure.servicefabric.models.ExecutionPolicyType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(DefaultExecutionPolicy, self).__init__(**kwargs) - self.type = 'Default' # type: str - - -class DeletePropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that deletes a specified property if it exists. -Note that if one PropertyBatchOperation in a PropertyBatch fails, -the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch operation, determined by the operation to be - performed. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind - :ivar property_name: Required. The name of the Service Fabric property. - :vartype property_name: str - """ - - _validation = { - 'kind': {'required': True}, - 'property_name': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - } - - def __init__( - self, - *, - property_name: str, - **kwargs - ): - """ - :keyword property_name: Required. The name of the Service Fabric property. - :paramtype property_name: str - """ - super(DeletePropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.kind = 'Delete' # type: str - - -class DeltaNodesCheckHealthEvaluation(HealthEvaluation): - """Represents health evaluation for delta nodes, containing health evaluations for each unhealthy node that impacted current aggregated health state. -Can be returned during cluster upgrade when the aggregated health state of the cluster is Warning or Error. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar baseline_error_count: Number of nodes with aggregated heath state Error in the health - store at the beginning of the cluster upgrade. - :vartype baseline_error_count: long - :ivar baseline_total_count: Total number of nodes in the health store at the beginning of the - cluster upgrade. - :vartype baseline_total_count: long - :ivar max_percent_delta_unhealthy_nodes: Maximum allowed percentage of delta unhealthy nodes - from the ClusterUpgradeHealthPolicy. - :vartype max_percent_delta_unhealthy_nodes: int - :ivar total_count: Total number of nodes in the health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. - Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, - 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - baseline_error_count: Optional[int] = None, - baseline_total_count: Optional[int] = None, - max_percent_delta_unhealthy_nodes: Optional[int] = None, - total_count: Optional[int] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword baseline_error_count: Number of nodes with aggregated heath state Error in the health - store at the beginning of the cluster upgrade. - :paramtype baseline_error_count: long - :keyword baseline_total_count: Total number of nodes in the health store at the beginning of - the cluster upgrade. - :paramtype baseline_total_count: long - :keyword max_percent_delta_unhealthy_nodes: Maximum allowed percentage of delta unhealthy nodes - from the ClusterUpgradeHealthPolicy. - :paramtype max_percent_delta_unhealthy_nodes: int - :keyword total_count: Total number of nodes in the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. - Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(DeltaNodesCheckHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'DeltaNodesCheck' # type: str - self.baseline_error_count = baseline_error_count - self.baseline_total_count = baseline_total_count - self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - - -class DeployedApplicationHealth(EntityHealth): - """Information about the health of an application deployed on a Service Fabric node. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar name: Name of the application deployed on the node whose health information is described - by this object. - :vartype name: str - :ivar node_name: Name of the node where this application is deployed. - :vartype node_name: str - :ivar deployed_service_package_health_states: Deployed service package health states for the - current deployed application as found in the health store. - :vartype deployed_service_package_health_states: - list[~azure.servicefabric.models.DeployedServicePackageHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'deployed_service_package_health_states': {'key': 'DeployedServicePackageHealthStates', 'type': '[DeployedServicePackageHealthState]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - health_events: Optional[List["HealthEvent"]] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - health_statistics: Optional["HealthStatistics"] = None, - name: Optional[str] = None, - node_name: Optional[str] = None, - deployed_service_package_health_states: Optional[List["DeployedServicePackageHealthState"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword name: Name of the application deployed on the node whose health information is - described by this object. - :paramtype name: str - :keyword node_name: Name of the node where this application is deployed. - :paramtype node_name: str - :keyword deployed_service_package_health_states: Deployed service package health states for the - current deployed application as found in the health store. - :paramtype deployed_service_package_health_states: - list[~azure.servicefabric.models.DeployedServicePackageHealthState] - """ - super(DeployedApplicationHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.name = name - self.node_name = node_name - self.deployed_service_package_health_states = deployed_service_package_health_states - - -class DeployedApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a deployed application, containing information about the data and the algorithm used by the health store to evaluate health. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar node_name: Name of the node where the application is deployed to. - :vartype node_name: str - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated - health state of the deployed application. - The types of the unhealthy evaluations can be DeployedServicePackagesHealthEvaluation or - EventHealthEvaluation. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - node_name: Optional[str] = None, - application_name: Optional[str] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword node_name: Name of the node where the application is deployed to. - :paramtype node_name: str - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current - aggregated health state of the deployed application. - The types of the unhealthy evaluations can be DeployedServicePackagesHealthEvaluation or - EventHealthEvaluation. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(DeployedApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'DeployedApplication' # type: str - self.node_name = node_name - self.application_name = application_name - self.unhealthy_evaluations = unhealthy_evaluations - - -class DeployedApplicationHealthReportExpiredEvent(ApplicationEvent): - """Deployed Application Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_instance_id: Required. Id of Application instance. - :vartype application_instance_id: long - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - application_id: str, - application_instance_id: int, - node_name: str, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_instance_id: Required. Id of Application instance. - :paramtype application_instance_id: long - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(DeployedApplicationHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.kind = 'DeployedApplicationHealthReportExpired' # type: str - self.application_instance_id = application_instance_id - self.node_name = node_name - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class DeployedApplicationHealthState(EntityHealthState): - """Represents the health state of a deployed application, which contains the entity identifier and the aggregated health state. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar node_name: Name of the node on which the service package is deployed. - :vartype node_name: str - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - node_name: Optional[str] = None, - application_name: Optional[str] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword node_name: Name of the node on which the service package is deployed. - :paramtype node_name: str - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - """ - super(DeployedApplicationHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.node_name = node_name - self.application_name = application_name - - -class DeployedApplicationHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a deployed application, which contains the node where the application is deployed, the aggregated health state and any deployed service packages that respect the chunk query description filters. - - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar node_name: The name of node where the application is deployed. - :vartype node_name: str - :ivar deployed_service_package_health_state_chunks: The list of deployed service package health - state chunks belonging to the deployed application that respect the filters in the cluster - health chunk query description. - :vartype deployed_service_package_health_state_chunks: - ~azure.servicefabric.models.DeployedServicePackageHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'deployed_service_package_health_state_chunks': {'key': 'DeployedServicePackageHealthStateChunks', 'type': 'DeployedServicePackageHealthStateChunkList'}, - } - - def __init__( - self, - *, - health_state: Optional[Union[str, "HealthState"]] = None, - node_name: Optional[str] = None, - deployed_service_package_health_state_chunks: Optional["DeployedServicePackageHealthStateChunkList"] = None, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword node_name: The name of node where the application is deployed. - :paramtype node_name: str - :keyword deployed_service_package_health_state_chunks: The list of deployed service package - health state chunks belonging to the deployed application that respect the filters in the - cluster health chunk query description. - :paramtype deployed_service_package_health_state_chunks: - ~azure.servicefabric.models.DeployedServicePackageHealthStateChunkList - """ - super(DeployedApplicationHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.node_name = node_name - self.deployed_service_package_health_state_chunks = deployed_service_package_health_state_chunks - - -class DeployedApplicationHealthStateChunkList(msrest.serialization.Model): - """The list of deployed application health state chunks that respect the input filters in the chunk query. Returned by get cluster health state chunks query. - - :ivar items: The list of deployed application health state chunks that respect the input - filters in the chunk query. - :vartype items: list[~azure.servicefabric.models.DeployedApplicationHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[DeployedApplicationHealthStateChunk]'}, - } - - def __init__( - self, - *, - items: Optional[List["DeployedApplicationHealthStateChunk"]] = None, - **kwargs - ): - """ - :keyword items: The list of deployed application health state chunks that respect the input - filters in the chunk query. - :paramtype items: list[~azure.servicefabric.models.DeployedApplicationHealthStateChunk] - """ - super(DeployedApplicationHealthStateChunkList, self).__init__(**kwargs) - self.items = items - - -class DeployedApplicationHealthStateFilter(msrest.serialization.Model): - """Defines matching criteria to determine whether a deployed application should be included as a child of an application in the cluster health chunk. -The deployed applications are only returned if the parent application matches a filter specified in the cluster health chunk query description. -One filter can match zero, one or multiple deployed applications, depending on its properties. - - :ivar node_name_filter: The name of the node where the application is deployed in order to - match the filter. - If specified, the filter is applied only to the application deployed on the specified node. - If the application is not deployed on the node with the specified name, no deployed - application is returned in the cluster health chunk based on this filter. - Otherwise, the deployed application is included in the cluster health chunk if it respects the - other filter properties. - If not specified, all deployed applications that match the parent filters (if any) are taken - into consideration and matched against the other filter members, like health state filter. - :vartype node_name_filter: str - :ivar health_state_filter: The filter for the health state of the deployed applications. It - allows selecting deployed applications if they match the desired health states. - The possible values are integer value of one of the following health states. Only deployed - applications that match the filter are returned. All deployed applications are used to evaluate - the cluster aggregated health state. - If not specified, default value is None, unless the node name is specified. If the filter has - default value and node name is specified, the matching deployed application is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches deployed applications with HealthState - value of OK (2) and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :vartype health_state_filter: int - :ivar deployed_service_package_filters: Defines a list of filters that specify which deployed - service packages to be included in the returned cluster health chunk as children of the parent - deployed application. The deployed service packages are returned only if the parent deployed - application matches a filter. - If the list is empty, no deployed service packages are returned. All the deployed service - packages are used to evaluate the parent deployed application aggregated health state, - regardless of the input filters. - The deployed application filter may specify multiple deployed service package filters. - For example, it can specify a filter to return all deployed service packages with health state - Error and another filter to always include a deployed service package on a node. - :vartype deployed_service_package_filters: - list[~azure.servicefabric.models.DeployedServicePackageHealthStateFilter] - """ - - _attribute_map = { - 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'deployed_service_package_filters': {'key': 'DeployedServicePackageFilters', 'type': '[DeployedServicePackageHealthStateFilter]'}, - } - - def __init__( - self, - *, - node_name_filter: Optional[str] = None, - health_state_filter: Optional[int] = 0, - deployed_service_package_filters: Optional[List["DeployedServicePackageHealthStateFilter"]] = None, - **kwargs - ): - """ - :keyword node_name_filter: The name of the node where the application is deployed in order to - match the filter. - If specified, the filter is applied only to the application deployed on the specified node. - If the application is not deployed on the node with the specified name, no deployed - application is returned in the cluster health chunk based on this filter. - Otherwise, the deployed application is included in the cluster health chunk if it respects the - other filter properties. - If not specified, all deployed applications that match the parent filters (if any) are taken - into consideration and matched against the other filter members, like health state filter. - :paramtype node_name_filter: str - :keyword health_state_filter: The filter for the health state of the deployed applications. It - allows selecting deployed applications if they match the desired health states. - The possible values are integer value of one of the following health states. Only deployed - applications that match the filter are returned. All deployed applications are used to evaluate - the cluster aggregated health state. - If not specified, default value is None, unless the node name is specified. If the filter has - default value and node name is specified, the matching deployed application is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches deployed applications with HealthState - value of OK (2) and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :paramtype health_state_filter: int - :keyword deployed_service_package_filters: Defines a list of filters that specify which - deployed service packages to be included in the returned cluster health chunk as children of - the parent deployed application. The deployed service packages are returned only if the parent - deployed application matches a filter. - If the list is empty, no deployed service packages are returned. All the deployed service - packages are used to evaluate the parent deployed application aggregated health state, - regardless of the input filters. - The deployed application filter may specify multiple deployed service package filters. - For example, it can specify a filter to return all deployed service packages with health state - Error and another filter to always include a deployed service package on a node. - :paramtype deployed_service_package_filters: - list[~azure.servicefabric.models.DeployedServicePackageHealthStateFilter] - """ - super(DeployedApplicationHealthStateFilter, self).__init__(**kwargs) - self.node_name_filter = node_name_filter - self.health_state_filter = health_state_filter - self.deployed_service_package_filters = deployed_service_package_filters - - -class DeployedApplicationInfo(msrest.serialization.Model): - """Information about application deployed on the node. - - :ivar id: The identity of the application. This is an encoded representation of the application - name. This is used in the REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype id: str - :ivar name: The name of the application, including the 'fabric:' URI scheme. - :vartype name: str - :ivar type_name: The application type name as defined in the application manifest. - :vartype type_name: str - :ivar type_version: The version of the application type as defined in the application manifest. - :vartype type_version: str - :ivar status: The status of the application deployed on the node. Following are the possible - values. Possible values include: "Invalid", "Downloading", "Activating", "Active", "Upgrading", - "Deactivating". - :vartype status: str or ~azure.servicefabric.models.DeployedApplicationStatus - :ivar work_directory: The work directory of the application on the node. The work directory can - be used to store application data. - :vartype work_directory: str - :ivar log_directory: The log directory of the application on the node. The log directory can be - used to store application logs. - :vartype log_directory: str - :ivar temp_directory: The temp directory of the application on the node. The code packages - belonging to the application are forked with this directory set as their temporary directory. - :vartype temp_directory: str - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'type_version': {'key': 'TypeVersion', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'work_directory': {'key': 'WorkDirectory', 'type': 'str'}, - 'log_directory': {'key': 'LogDirectory', 'type': 'str'}, - 'temp_directory': {'key': 'TempDirectory', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - type_name: Optional[str] = None, - type_version: Optional[str] = None, - status: Optional[Union[str, "DeployedApplicationStatus"]] = None, - work_directory: Optional[str] = None, - log_directory: Optional[str] = None, - temp_directory: Optional[str] = None, - health_state: Optional[Union[str, "HealthState"]] = None, - **kwargs - ): - """ - :keyword id: The identity of the application. This is an encoded representation of the - application name. This is used in the REST APIs to identify the application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype id: str - :keyword name: The name of the application, including the 'fabric:' URI scheme. - :paramtype name: str - :keyword type_name: The application type name as defined in the application manifest. - :paramtype type_name: str - :keyword type_version: The version of the application type as defined in the application - manifest. - :paramtype type_version: str - :keyword status: The status of the application deployed on the node. Following are the possible - values. Possible values include: "Invalid", "Downloading", "Activating", "Active", "Upgrading", - "Deactivating". - :paramtype status: str or ~azure.servicefabric.models.DeployedApplicationStatus - :keyword work_directory: The work directory of the application on the node. The work directory - can be used to store application data. - :paramtype work_directory: str - :keyword log_directory: The log directory of the application on the node. The log directory can - be used to store application logs. - :paramtype log_directory: str - :keyword temp_directory: The temp directory of the application on the node. The code packages - belonging to the application are forked with this directory set as their temporary directory. - :paramtype temp_directory: str - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - """ - super(DeployedApplicationInfo, self).__init__(**kwargs) - self.id = id - self.name = name - self.type_name = type_name - self.type_version = type_version - self.status = status - self.work_directory = work_directory - self.log_directory = log_directory - self.temp_directory = temp_directory - self.health_state = health_state - - -class DeployedApplicationNewHealthReportEvent(ApplicationEvent): - """Deployed Application Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar application_instance_id: Required. Id of Application instance. - :vartype application_instance_id: long - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'application_instance_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - application_id: str, - application_instance_id: int, - node_name: str, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword application_instance_id: Required. Id of Application instance. - :paramtype application_instance_id: long - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(DeployedApplicationNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.kind = 'DeployedApplicationNewHealthReport' # type: str - self.application_instance_id = application_instance_id - self.node_name = node_name - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class DeployedApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for deployed applications, containing health evaluations for each unhealthy deployed application that impacted current aggregated health state. -Can be returned when evaluating application health and the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar max_percent_unhealthy_deployed_applications: Maximum allowed percentage of unhealthy - deployed applications from the ApplicationHealthPolicy. - :vartype max_percent_unhealthy_deployed_applications: int - :ivar total_count: Total number of deployed applications of the application in the health - store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy DeployedApplicationHealthEvaluation that impacted the - aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - max_percent_unhealthy_deployed_applications: Optional[int] = None, - total_count: Optional[int] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword max_percent_unhealthy_deployed_applications: Maximum allowed percentage of unhealthy - deployed applications from the ApplicationHealthPolicy. - :paramtype max_percent_unhealthy_deployed_applications: int - :keyword total_count: Total number of deployed applications of the application in the health - store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy DeployedApplicationHealthEvaluation that impacted the - aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(DeployedApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'DeployedApplications' # type: str - self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - - -class DeployedCodePackageInfo(msrest.serialization.Model): - """Information about code package deployed on a Service Fabric node. - - :ivar name: The name of the code package. - :vartype name: str - :ivar version: The version of the code package specified in service manifest. - :vartype version: str - :ivar service_manifest_name: The name of service manifest that specified this code package. - :vartype service_manifest_name: str - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - :ivar host_type: Specifies the type of host for main entry point of a code package as specified - in service manifest. Possible values include: "Invalid", "ExeHost", "ContainerHost". - :vartype host_type: str or ~azure.servicefabric.models.HostType - :ivar host_isolation_mode: Specifies the isolation mode of main entry point of a code package - when it's host type is ContainerHost. This is specified as part of container host policies in - application manifest while importing service manifest. Possible values include: "None", - "Process", "HyperV". - :vartype host_isolation_mode: str or ~azure.servicefabric.models.HostIsolationMode - :ivar status: Specifies the status of a deployed application or service package on a Service - Fabric node. Possible values include: "Invalid", "Downloading", "Activating", "Active", - "Upgrading", "Deactivating", "RanToCompletion", "Failed". - :vartype status: str or ~azure.servicefabric.models.DeploymentStatus - :ivar run_frequency_interval: The interval at which code package is run. This is used for - periodic code package. - :vartype run_frequency_interval: str - :ivar setup_entry_point: Information about setup or main entry point of a code package deployed - on a Service Fabric node. - :vartype setup_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint - :ivar main_entry_point: Information about setup or main entry point of a code package deployed - on a Service Fabric node. - :vartype main_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_type': {'key': 'HostType', 'type': 'str'}, - 'host_isolation_mode': {'key': 'HostIsolationMode', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'run_frequency_interval': {'key': 'RunFrequencyInterval', 'type': 'str'}, - 'setup_entry_point': {'key': 'SetupEntryPoint', 'type': 'CodePackageEntryPoint'}, - 'main_entry_point': {'key': 'MainEntryPoint', 'type': 'CodePackageEntryPoint'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - version: Optional[str] = None, - service_manifest_name: Optional[str] = None, - service_package_activation_id: Optional[str] = None, - host_type: Optional[Union[str, "HostType"]] = None, - host_isolation_mode: Optional[Union[str, "HostIsolationMode"]] = None, - status: Optional[Union[str, "DeploymentStatus"]] = None, - run_frequency_interval: Optional[str] = None, - setup_entry_point: Optional["CodePackageEntryPoint"] = None, - main_entry_point: Optional["CodePackageEntryPoint"] = None, - **kwargs - ): - """ - :keyword name: The name of the code package. - :paramtype name: str - :keyword version: The version of the code package specified in service manifest. - :paramtype version: str - :keyword service_manifest_name: The name of service manifest that specified this code package. - :paramtype service_manifest_name: str - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - :keyword host_type: Specifies the type of host for main entry point of a code package as - specified in service manifest. Possible values include: "Invalid", "ExeHost", "ContainerHost". - :paramtype host_type: str or ~azure.servicefabric.models.HostType - :keyword host_isolation_mode: Specifies the isolation mode of main entry point of a code - package when it's host type is ContainerHost. This is specified as part of container host - policies in application manifest while importing service manifest. Possible values include: - "None", "Process", "HyperV". - :paramtype host_isolation_mode: str or ~azure.servicefabric.models.HostIsolationMode - :keyword status: Specifies the status of a deployed application or service package on a Service - Fabric node. Possible values include: "Invalid", "Downloading", "Activating", "Active", - "Upgrading", "Deactivating", "RanToCompletion", "Failed". - :paramtype status: str or ~azure.servicefabric.models.DeploymentStatus - :keyword run_frequency_interval: The interval at which code package is run. This is used for - periodic code package. - :paramtype run_frequency_interval: str - :keyword setup_entry_point: Information about setup or main entry point of a code package - deployed on a Service Fabric node. - :paramtype setup_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint - :keyword main_entry_point: Information about setup or main entry point of a code package - deployed on a Service Fabric node. - :paramtype main_entry_point: ~azure.servicefabric.models.CodePackageEntryPoint - """ - super(DeployedCodePackageInfo, self).__init__(**kwargs) - self.name = name - self.version = version - self.service_manifest_name = service_manifest_name - self.service_package_activation_id = service_package_activation_id - self.host_type = host_type - self.host_isolation_mode = host_isolation_mode - self.status = status - self.run_frequency_interval = run_frequency_interval - self.setup_entry_point = setup_entry_point - self.main_entry_point = main_entry_point - - -class DeployedServicePackageHealth(EntityHealth): - """Information about the health of a service package for a specific application deployed on a Service Fabric node. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar service_manifest_name: Name of the service manifest. - :vartype service_manifest_name: str - :ivar node_name: Name of the node where this service package is deployed. - :vartype node_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - health_events: Optional[List["HealthEvent"]] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - health_statistics: Optional["HealthStatistics"] = None, - application_name: Optional[str] = None, - service_manifest_name: Optional[str] = None, - node_name: Optional[str] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword service_manifest_name: Name of the service manifest. - :paramtype service_manifest_name: str - :keyword node_name: Name of the node where this service package is deployed. - :paramtype node_name: str - """ - super(DeployedServicePackageHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.application_name = application_name - self.service_manifest_name = service_manifest_name - self.node_name = node_name - - -class DeployedServicePackageHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a deployed service package, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar node_name: The name of a Service Fabric node. - :vartype node_name: str - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar service_manifest_name: The name of the service manifest. - :vartype service_manifest_name: str - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated - health state. The type of the unhealthy evaluations can be EventHealthEvaluation. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - node_name: Optional[str] = None, - application_name: Optional[str] = None, - service_manifest_name: Optional[str] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword node_name: The name of a Service Fabric node. - :paramtype node_name: str - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword service_manifest_name: The name of the service manifest. - :paramtype service_manifest_name: str - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current - aggregated health state. The type of the unhealthy evaluations can be EventHealthEvaluation. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(DeployedServicePackageHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'DeployedServicePackage' # type: str - self.node_name = node_name - self.application_name = application_name - self.service_manifest_name = service_manifest_name - self.unhealthy_evaluations = unhealthy_evaluations - - -class DeployedServicePackageHealthReportExpiredEvent(ApplicationEvent): - """Deployed Service Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar service_manifest: Required. Service manifest name. - :vartype service_manifest: str - :ivar service_package_instance_id: Required. Id of Service package instance. - :vartype service_package_instance_id: long - :ivar service_package_activation_id: Required. Id of Service package activation. - :vartype service_package_activation_id: str - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'service_manifest': {'required': True}, - 'service_package_instance_id': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_manifest': {'key': 'ServiceManifest', 'type': 'str'}, - 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - application_id: str, - service_manifest: str, - service_package_instance_id: int, - service_package_activation_id: str, - node_name: str, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword service_manifest: Required. Service manifest name. - :paramtype service_manifest: str - :keyword service_package_instance_id: Required. Id of Service package instance. - :paramtype service_package_instance_id: long - :keyword service_package_activation_id: Required. Id of Service package activation. - :paramtype service_package_activation_id: str - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(DeployedServicePackageHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.kind = 'DeployedServicePackageHealthReportExpired' # type: str - self.service_manifest = service_manifest - self.service_package_instance_id = service_package_instance_id - self.service_package_activation_id = service_package_activation_id - self.node_name = node_name - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class DeployedServicePackageHealthState(EntityHealthState): - """Represents the health state of a deployed service package, containing the entity identifier and the aggregated health state. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar node_name: Name of the node on which the service package is deployed. - :vartype node_name: str - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar service_manifest_name: Name of the manifest describing the service package. - :vartype service_manifest_name: str - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - node_name: Optional[str] = None, - application_name: Optional[str] = None, - service_manifest_name: Optional[str] = None, - service_package_activation_id: Optional[str] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword node_name: Name of the node on which the service package is deployed. - :paramtype node_name: str - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword service_manifest_name: Name of the manifest describing the service package. - :paramtype service_manifest_name: str - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - """ - super(DeployedServicePackageHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.node_name = node_name - self.application_name = application_name - self.service_manifest_name = service_manifest_name - self.service_package_activation_id = service_package_activation_id - - -class DeployedServicePackageHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a deployed service package, which contains the service manifest name and the service package aggregated health state. - - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_manifest_name: The name of the service manifest. - :vartype service_manifest_name: str - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__( - self, - *, - health_state: Optional[Union[str, "HealthState"]] = None, - service_manifest_name: Optional[str] = None, - service_package_activation_id: Optional[str] = None, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword service_manifest_name: The name of the service manifest. - :paramtype service_manifest_name: str - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - """ - super(DeployedServicePackageHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.service_manifest_name = service_manifest_name - self.service_package_activation_id = service_package_activation_id - - -class DeployedServicePackageHealthStateChunkList(msrest.serialization.Model): - """The list of deployed service package health state chunks that respect the input filters in the chunk query. Returned by get cluster health state chunks query. - - :ivar items: The list of deployed service package health state chunks that respect the input - filters in the chunk query. - :vartype items: list[~azure.servicefabric.models.DeployedServicePackageHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[DeployedServicePackageHealthStateChunk]'}, - } - - def __init__( - self, - *, - items: Optional[List["DeployedServicePackageHealthStateChunk"]] = None, - **kwargs - ): - """ - :keyword items: The list of deployed service package health state chunks that respect the input - filters in the chunk query. - :paramtype items: list[~azure.servicefabric.models.DeployedServicePackageHealthStateChunk] - """ - super(DeployedServicePackageHealthStateChunkList, self).__init__(**kwargs) - self.items = items - - -class DeployedServicePackageHealthStateFilter(msrest.serialization.Model): - """Defines matching criteria to determine whether a deployed service package should be included as a child of a deployed application in the cluster health chunk. -The deployed service packages are only returned if the parent entities match a filter specified in the cluster health chunk query description. The parent deployed application and its parent application must be included in the cluster health chunk. -One filter can match zero, one or multiple deployed service packages, depending on its properties. - - :ivar service_manifest_name_filter: The name of the service manifest which identifies the - deployed service packages that matches the filter. - If specified, the filter is applied only to the specified deployed service packages, if any. - If no deployed service packages with specified manifest name exist, nothing is returned in the - cluster health chunk based on this filter. - If any deployed service package exists, they are included in the cluster health chunk if it - respects the other filter properties. - If not specified, all deployed service packages that match the parent filters (if any) are - taken into consideration and matched against the other filter members, like health state - filter. - :vartype service_manifest_name_filter: str - :ivar service_package_activation_id_filter: The activation ID of a deployed service package - that matches the filter. - If not specified, the filter applies to all deployed service packages that match the other - parameters. - If specified, the filter matches only the deployed service package with the specified - activation ID. - :vartype service_package_activation_id_filter: str - :ivar health_state_filter: The filter for the health state of the deployed service packages. It - allows selecting deployed service packages if they match the desired health states. - The possible values are integer value of one of the following health states. Only deployed - service packages that match the filter are returned. All deployed service packages are used to - evaluate the parent deployed application aggregated health state. - If not specified, default value is None, unless the deployed service package ID is specified. - If the filter has default value and deployed service package ID is specified, the matching - deployed service package is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches deployed service packages with HealthState - value of OK (2) and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :vartype health_state_filter: int - """ - - _attribute_map = { - 'service_manifest_name_filter': {'key': 'ServiceManifestNameFilter', 'type': 'str'}, - 'service_package_activation_id_filter': {'key': 'ServicePackageActivationIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__( - self, - *, - service_manifest_name_filter: Optional[str] = None, - service_package_activation_id_filter: Optional[str] = None, - health_state_filter: Optional[int] = 0, - **kwargs - ): - """ - :keyword service_manifest_name_filter: The name of the service manifest which identifies the - deployed service packages that matches the filter. - If specified, the filter is applied only to the specified deployed service packages, if any. - If no deployed service packages with specified manifest name exist, nothing is returned in the - cluster health chunk based on this filter. - If any deployed service package exists, they are included in the cluster health chunk if it - respects the other filter properties. - If not specified, all deployed service packages that match the parent filters (if any) are - taken into consideration and matched against the other filter members, like health state - filter. - :paramtype service_manifest_name_filter: str - :keyword service_package_activation_id_filter: The activation ID of a deployed service package - that matches the filter. - If not specified, the filter applies to all deployed service packages that match the other - parameters. - If specified, the filter matches only the deployed service package with the specified - activation ID. - :paramtype service_package_activation_id_filter: str - :keyword health_state_filter: The filter for the health state of the deployed service packages. - It allows selecting deployed service packages if they match the desired health states. - The possible values are integer value of one of the following health states. Only deployed - service packages that match the filter are returned. All deployed service packages are used to - evaluate the parent deployed application aggregated health state. - If not specified, default value is None, unless the deployed service package ID is specified. - If the filter has default value and deployed service package ID is specified, the matching - deployed service package is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches deployed service packages with HealthState - value of OK (2) and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :paramtype health_state_filter: int - """ - super(DeployedServicePackageHealthStateFilter, self).__init__(**kwargs) - self.service_manifest_name_filter = service_manifest_name_filter - self.service_package_activation_id_filter = service_package_activation_id_filter - self.health_state_filter = health_state_filter - - -class DeployedServicePackageInfo(msrest.serialization.Model): - """Information about service package deployed on a Service Fabric node. - - :ivar name: The name of the service package as specified in the service manifest. - :vartype name: str - :ivar version: The version of the service package specified in service manifest. - :vartype version: str - :ivar status: Specifies the status of a deployed application or service package on a Service - Fabric node. Possible values include: "Invalid", "Downloading", "Activating", "Active", - "Upgrading", "Deactivating", "RanToCompletion", "Failed". - :vartype status: str or ~azure.servicefabric.models.DeploymentStatus - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - version: Optional[str] = None, - status: Optional[Union[str, "DeploymentStatus"]] = None, - service_package_activation_id: Optional[str] = None, - **kwargs - ): - """ - :keyword name: The name of the service package as specified in the service manifest. - :paramtype name: str - :keyword version: The version of the service package specified in service manifest. - :paramtype version: str - :keyword status: Specifies the status of a deployed application or service package on a Service - Fabric node. Possible values include: "Invalid", "Downloading", "Activating", "Active", - "Upgrading", "Deactivating", "RanToCompletion", "Failed". - :paramtype status: str or ~azure.servicefabric.models.DeploymentStatus - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - """ - super(DeployedServicePackageInfo, self).__init__(**kwargs) - self.name = name - self.version = version - self.status = status - self.service_package_activation_id = service_package_activation_id - - -class DeployedServicePackageNewHealthReportEvent(ApplicationEvent): - """Deployed Service Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :vartype application_id: str - :ivar service_manifest_name: Required. Service manifest name. - :vartype service_manifest_name: str - :ivar service_package_instance_id: Required. Id of Service package instance. - :vartype service_package_instance_id: long - :ivar service_package_activation_id: Required. Id of Service package activation. - :vartype service_package_activation_id: str - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'application_id': {'required': True}, - 'service_manifest_name': {'required': True}, - 'service_package_instance_id': {'required': True}, - 'service_package_activation_id': {'required': True}, - 'node_name': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'application_id': {'key': 'ApplicationId', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_instance_id': {'key': 'ServicePackageInstanceId', 'type': 'long'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - application_id: str, - service_manifest_name: str, - service_package_instance_id: int, - service_package_activation_id: str, - node_name: str, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword application_id: Required. The identity of the application. This is an encoded - representation of the application name. This is used in the REST APIs to identify the - application resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the application name is "fabric:/myapp/app1", - the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :paramtype application_id: str - :keyword service_manifest_name: Required. Service manifest name. - :paramtype service_manifest_name: str - :keyword service_package_instance_id: Required. Id of Service package instance. - :paramtype service_package_instance_id: long - :keyword service_package_activation_id: Required. Id of Service package activation. - :paramtype service_package_activation_id: str - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(DeployedServicePackageNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs) - self.kind = 'DeployedServicePackageNewHealthReport' # type: str - self.service_manifest_name = service_manifest_name - self.service_package_instance_id = service_package_instance_id - self.service_package_activation_id = service_package_activation_id - self.node_name = node_name - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class DeployedServicePackagesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for deployed service packages, containing health evaluations for each unhealthy deployed service package that impacted current aggregated health state. Can be returned when evaluating deployed application health and the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar total_count: Total number of deployed service packages of the deployed application in the - health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy DeployedServicePackageHealthEvaluation that impacted the - aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - total_count: Optional[int] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword total_count: Total number of deployed service packages of the deployed application in - the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy DeployedServicePackageHealthEvaluation that impacted the - aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(DeployedServicePackagesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'DeployedServicePackages' # type: str - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - - -class DeployedServiceReplicaDetailInfo(msrest.serialization.Model): - """Information about a Service Fabric service replica deployed on a node. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeployedStatefulServiceReplicaDetailInfo, DeployedStatelessServiceInstanceDetailInfo. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar service_name: Full hierarchical name of the service in URI format starting with - ``fabric:``. - :vartype service_name: str - :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :vartype partition_id: str - :ivar current_service_operation: Specifies the current active life-cycle operation on a - stateful service replica or stateless service instance. Possible values include: "Unknown", - "None", "Open", "ChangeRole", "Close", "Abort". - :vartype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName - :ivar current_service_operation_start_time_utc: The start time of the current service operation - in UTC format. - :vartype current_service_operation_start_time_utc: ~datetime.datetime - :ivar reported_load: List of load reported by replica. - :vartype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaDetailInfo', 'Stateless': 'DeployedStatelessServiceInstanceDetailInfo'} - } - - def __init__( - self, - *, - service_name: Optional[str] = None, - partition_id: Optional[str] = None, - current_service_operation: Optional[Union[str, "ServiceOperationName"]] = None, - current_service_operation_start_time_utc: Optional[datetime.datetime] = None, - reported_load: Optional[List["LoadMetricReportInfo"]] = None, - **kwargs - ): - """ - :keyword service_name: Full hierarchical name of the service in URI format starting with - ``fabric:``. - :paramtype service_name: str - :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword current_service_operation: Specifies the current active life-cycle operation on a - stateful service replica or stateless service instance. Possible values include: "Unknown", - "None", "Open", "ChangeRole", "Close", "Abort". - :paramtype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName - :keyword current_service_operation_start_time_utc: The start time of the current service - operation in UTC format. - :paramtype current_service_operation_start_time_utc: ~datetime.datetime - :keyword reported_load: List of load reported by replica. - :paramtype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] - """ - super(DeployedServiceReplicaDetailInfo, self).__init__(**kwargs) - self.service_kind = None # type: Optional[str] - self.service_name = service_name - self.partition_id = partition_id - self.current_service_operation = current_service_operation - self.current_service_operation_start_time_utc = current_service_operation_start_time_utc - self.reported_load = reported_load - - -class DeployedServiceReplicaInfo(msrest.serialization.Model): - """Information about a Service Fabric service replica deployed on a node. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeployedStatefulServiceReplicaInfo, DeployedStatelessServiceInstanceInfo. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar service_name: The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar service_type_name: Name of the service type as specified in the service manifest. - :vartype service_type_name: str - :ivar service_manifest_name: The name of the service manifest in which this service type is - defined. - :vartype service_manifest_name: str - :ivar code_package_name: The name of the code package that hosts this replica. - :vartype code_package_name: str - :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", - "InBuild", "Standby", "Ready", "Down", "Dropped". - :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :ivar address: The last address returned by the replica in Open or ChangeRole. - :vartype address: str - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - :ivar host_process_id: Host process ID of the process that is hosting the replica. This will be - zero if the replica is down. In hyper-v containers this host process ID will be from different - kernel. - :vartype host_process_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'DeployedStatefulServiceReplicaInfo', 'Stateless': 'DeployedStatelessServiceInstanceInfo'} - } - - def __init__( - self, - *, - service_name: Optional[str] = None, - service_type_name: Optional[str] = None, - service_manifest_name: Optional[str] = None, - code_package_name: Optional[str] = None, - partition_id: Optional[str] = None, - replica_status: Optional[Union[str, "ReplicaStatus"]] = None, - address: Optional[str] = None, - service_package_activation_id: Optional[str] = None, - host_process_id: Optional[str] = None, - **kwargs - ): - """ - :keyword service_name: The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword service_type_name: Name of the service type as specified in the service manifest. - :paramtype service_type_name: str - :keyword service_manifest_name: The name of the service manifest in which this service type is - defined. - :paramtype service_manifest_name: str - :keyword code_package_name: The name of the code package that hosts this replica. - :paramtype code_package_name: str - :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_status: The status of a replica of a service. Possible values include: - "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". - :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :keyword address: The last address returned by the replica in Open or ChangeRole. - :paramtype address: str - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - :keyword host_process_id: Host process ID of the process that is hosting the replica. This will - be zero if the replica is down. In hyper-v containers this host process ID will be from - different kernel. - :paramtype host_process_id: str - """ - super(DeployedServiceReplicaInfo, self).__init__(**kwargs) - self.service_kind = None # type: Optional[str] - self.service_name = service_name - self.service_type_name = service_type_name - self.service_manifest_name = service_manifest_name - self.code_package_name = code_package_name - self.partition_id = partition_id - self.replica_status = replica_status - self.address = address - self.service_package_activation_id = service_package_activation_id - self.host_process_id = host_process_id - - -class DeployedServiceTypeInfo(msrest.serialization.Model): - """Information about service type deployed on a node, information such as the status of the service type registration on a node. - - :ivar service_type_name: Name of the service type as specified in the service manifest. - :vartype service_type_name: str - :ivar service_manifest_name: The name of the service manifest in which this service type is - defined. - :vartype service_manifest_name: str - :ivar code_package_name: The name of the code package that registered the service type. - :vartype code_package_name: str - :ivar status: The status of the service type registration on the node. Possible values include: - "Invalid", "Disabled", "Enabled", "Registered". - :vartype status: str or ~azure.servicefabric.models.ServiceTypeRegistrationStatus - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - """ - - _attribute_map = { - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'status': {'key': 'Status', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - } - - def __init__( - self, - *, - service_type_name: Optional[str] = None, - service_manifest_name: Optional[str] = None, - code_package_name: Optional[str] = None, - status: Optional[Union[str, "ServiceTypeRegistrationStatus"]] = None, - service_package_activation_id: Optional[str] = None, - **kwargs - ): - """ - :keyword service_type_name: Name of the service type as specified in the service manifest. - :paramtype service_type_name: str - :keyword service_manifest_name: The name of the service manifest in which this service type is - defined. - :paramtype service_manifest_name: str - :keyword code_package_name: The name of the code package that registered the service type. - :paramtype code_package_name: str - :keyword status: The status of the service type registration on the node. Possible values - include: "Invalid", "Disabled", "Enabled", "Registered". - :paramtype status: str or ~azure.servicefabric.models.ServiceTypeRegistrationStatus - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - """ - super(DeployedServiceTypeInfo, self).__init__(**kwargs) - self.service_type_name = service_type_name - self.service_manifest_name = service_manifest_name - self.code_package_name = code_package_name - self.status = status - self.service_package_activation_id = service_package_activation_id - - -class DeployedStatefulServiceReplicaDetailInfo(DeployedServiceReplicaDetailInfo): - """Information about a stateful replica running in a code package. Note DeployedServiceReplicaQueryResult will contain duplicate data like ServiceKind, ServiceName, PartitionId and replicaId. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar service_name: Full hierarchical name of the service in URI format starting with - ``fabric:``. - :vartype service_name: str - :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :vartype partition_id: str - :ivar current_service_operation: Specifies the current active life-cycle operation on a - stateful service replica or stateless service instance. Possible values include: "Unknown", - "None", "Open", "ChangeRole", "Close", "Abort". - :vartype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName - :ivar current_service_operation_start_time_utc: The start time of the current service operation - in UTC format. - :vartype current_service_operation_start_time_utc: ~datetime.datetime - :ivar reported_load: List of load reported by replica. - :vartype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] - :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :vartype replica_id: str - :ivar current_replicator_operation: Specifies the operation currently being executed by the - Replicator. Possible values include: "Invalid", "None", "Open", "ChangeRole", "UpdateEpoch", - "Close", "Abort", "OnDataLoss", "WaitForCatchup", "Build". - :vartype current_replicator_operation: str or - ~azure.servicefabric.models.ReplicatorOperationName - :ivar read_status: Specifies the access status of the partition. Possible values include: - "Invalid", "Granted", "ReconfigurationPending", "NotPrimary", "NoWriteQuorum". - :vartype read_status: str or ~azure.servicefabric.models.PartitionAccessStatus - :ivar write_status: Specifies the access status of the partition. Possible values include: - "Invalid", "Granted", "ReconfigurationPending", "NotPrimary", "NoWriteQuorum". - :vartype write_status: str or ~azure.servicefabric.models.PartitionAccessStatus - :ivar replicator_status: Represents a base class for primary or secondary replicator status. - Contains information about the service fabric replicator like the replication/copy queue - utilization, last acknowledgement received timestamp, etc. - :vartype replicator_status: ~azure.servicefabric.models.ReplicatorStatus - :ivar replica_status: Key value store related information for the replica. - :vartype replica_status: ~azure.servicefabric.models.KeyValueStoreReplicaStatus - :ivar deployed_service_replica_query_result: Information about a stateful service replica - deployed on a node. - :vartype deployed_service_replica_query_result: - ~azure.servicefabric.models.DeployedStatefulServiceReplicaInfo - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'current_replicator_operation': {'key': 'CurrentReplicatorOperation', 'type': 'str'}, - 'read_status': {'key': 'ReadStatus', 'type': 'str'}, - 'write_status': {'key': 'WriteStatus', 'type': 'str'}, - 'replicator_status': {'key': 'ReplicatorStatus', 'type': 'ReplicatorStatus'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'KeyValueStoreReplicaStatus'}, - 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatefulServiceReplicaInfo'}, - } - - def __init__( - self, - *, - service_name: Optional[str] = None, - partition_id: Optional[str] = None, - current_service_operation: Optional[Union[str, "ServiceOperationName"]] = None, - current_service_operation_start_time_utc: Optional[datetime.datetime] = None, - reported_load: Optional[List["LoadMetricReportInfo"]] = None, - replica_id: Optional[str] = None, - current_replicator_operation: Optional[Union[str, "ReplicatorOperationName"]] = None, - read_status: Optional[Union[str, "PartitionAccessStatus"]] = None, - write_status: Optional[Union[str, "PartitionAccessStatus"]] = None, - replicator_status: Optional["ReplicatorStatus"] = None, - replica_status: Optional["KeyValueStoreReplicaStatus"] = None, - deployed_service_replica_query_result: Optional["DeployedStatefulServiceReplicaInfo"] = None, - **kwargs - ): - """ - :keyword service_name: Full hierarchical name of the service in URI format starting with - ``fabric:``. - :paramtype service_name: str - :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword current_service_operation: Specifies the current active life-cycle operation on a - stateful service replica or stateless service instance. Possible values include: "Unknown", - "None", "Open", "ChangeRole", "Close", "Abort". - :paramtype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName - :keyword current_service_operation_start_time_utc: The start time of the current service - operation in UTC format. - :paramtype current_service_operation_start_time_utc: ~datetime.datetime - :keyword reported_load: List of load reported by replica. - :paramtype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] - :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: str - :keyword current_replicator_operation: Specifies the operation currently being executed by the - Replicator. Possible values include: "Invalid", "None", "Open", "ChangeRole", "UpdateEpoch", - "Close", "Abort", "OnDataLoss", "WaitForCatchup", "Build". - :paramtype current_replicator_operation: str or - ~azure.servicefabric.models.ReplicatorOperationName - :keyword read_status: Specifies the access status of the partition. Possible values include: - "Invalid", "Granted", "ReconfigurationPending", "NotPrimary", "NoWriteQuorum". - :paramtype read_status: str or ~azure.servicefabric.models.PartitionAccessStatus - :keyword write_status: Specifies the access status of the partition. Possible values include: - "Invalid", "Granted", "ReconfigurationPending", "NotPrimary", "NoWriteQuorum". - :paramtype write_status: str or ~azure.servicefabric.models.PartitionAccessStatus - :keyword replicator_status: Represents a base class for primary or secondary replicator status. - Contains information about the service fabric replicator like the replication/copy queue - utilization, last acknowledgement received timestamp, etc. - :paramtype replicator_status: ~azure.servicefabric.models.ReplicatorStatus - :keyword replica_status: Key value store related information for the replica. - :paramtype replica_status: ~azure.servicefabric.models.KeyValueStoreReplicaStatus - :keyword deployed_service_replica_query_result: Information about a stateful service replica - deployed on a node. - :paramtype deployed_service_replica_query_result: - ~azure.servicefabric.models.DeployedStatefulServiceReplicaInfo - """ - super(DeployedStatefulServiceReplicaDetailInfo, self).__init__(service_name=service_name, partition_id=partition_id, current_service_operation=current_service_operation, current_service_operation_start_time_utc=current_service_operation_start_time_utc, reported_load=reported_load, **kwargs) - self.service_kind = 'Stateful' # type: str - self.replica_id = replica_id - self.current_replicator_operation = current_replicator_operation - self.read_status = read_status - self.write_status = write_status - self.replicator_status = replicator_status - self.replica_status = replica_status - self.deployed_service_replica_query_result = deployed_service_replica_query_result - - -class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): - """Information about a stateful service replica deployed on a node. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar service_name: The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar service_type_name: Name of the service type as specified in the service manifest. - :vartype service_type_name: str - :ivar service_manifest_name: The name of the service manifest in which this service type is - defined. - :vartype service_manifest_name: str - :ivar code_package_name: The name of the code package that hosts this replica. - :vartype code_package_name: str - :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", - "InBuild", "Standby", "Ready", "Down", "Dropped". - :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :ivar address: The last address returned by the replica in Open or ChangeRole. - :vartype address: str - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - :ivar host_process_id: Host process ID of the process that is hosting the replica. This will be - zero if the replica is down. In hyper-v containers this host process ID will be from different - kernel. - :vartype host_process_id: str - :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :vartype replica_id: str - :ivar replica_role: The role of a replica of a stateful service. Possible values include: - "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", - "ActiveAuxiliary", "PrimaryAuxiliary". - :vartype replica_role: str or ~azure.servicefabric.models.ReplicaRole - :ivar reconfiguration_information: Information about current reconfiguration like phase, type, - previous configuration role of replica and reconfiguration start date time. - :vartype reconfiguration_information: ~azure.servicefabric.models.ReconfigurationInformation - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, - 'reconfiguration_information': {'key': 'ReconfigurationInformation', 'type': 'ReconfigurationInformation'}, - } - - def __init__( - self, - *, - service_name: Optional[str] = None, - service_type_name: Optional[str] = None, - service_manifest_name: Optional[str] = None, - code_package_name: Optional[str] = None, - partition_id: Optional[str] = None, - replica_status: Optional[Union[str, "ReplicaStatus"]] = None, - address: Optional[str] = None, - service_package_activation_id: Optional[str] = None, - host_process_id: Optional[str] = None, - replica_id: Optional[str] = None, - replica_role: Optional[Union[str, "ReplicaRole"]] = None, - reconfiguration_information: Optional["ReconfigurationInformation"] = None, - **kwargs - ): - """ - :keyword service_name: The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword service_type_name: Name of the service type as specified in the service manifest. - :paramtype service_type_name: str - :keyword service_manifest_name: The name of the service manifest in which this service type is - defined. - :paramtype service_manifest_name: str - :keyword code_package_name: The name of the code package that hosts this replica. - :paramtype code_package_name: str - :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_status: The status of a replica of a service. Possible values include: - "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". - :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :keyword address: The last address returned by the replica in Open or ChangeRole. - :paramtype address: str - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - :keyword host_process_id: Host process ID of the process that is hosting the replica. This will - be zero if the replica is down. In hyper-v containers this host process ID will be from - different kernel. - :paramtype host_process_id: str - :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: str - :keyword replica_role: The role of a replica of a stateful service. Possible values include: - "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", - "ActiveAuxiliary", "PrimaryAuxiliary". - :paramtype replica_role: str or ~azure.servicefabric.models.ReplicaRole - :keyword reconfiguration_information: Information about current reconfiguration like phase, - type, previous configuration role of replica and reconfiguration start date time. - :paramtype reconfiguration_information: ~azure.servicefabric.models.ReconfigurationInformation - """ - super(DeployedStatefulServiceReplicaInfo, self).__init__(service_name=service_name, service_type_name=service_type_name, service_manifest_name=service_manifest_name, code_package_name=code_package_name, partition_id=partition_id, replica_status=replica_status, address=address, service_package_activation_id=service_package_activation_id, host_process_id=host_process_id, **kwargs) - self.service_kind = 'Stateful' # type: str - self.replica_id = replica_id - self.replica_role = replica_role - self.reconfiguration_information = reconfiguration_information - - -class DeployedStatelessServiceInstanceDetailInfo(DeployedServiceReplicaDetailInfo): - """Information about a stateless instance running in a code package. Note that DeployedServiceReplicaQueryResult will contain duplicate data like ServiceKind, ServiceName, PartitionId and InstanceId. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar service_name: Full hierarchical name of the service in URI format starting with - ``fabric:``. - :vartype service_name: str - :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :vartype partition_id: str - :ivar current_service_operation: Specifies the current active life-cycle operation on a - stateful service replica or stateless service instance. Possible values include: "Unknown", - "None", "Open", "ChangeRole", "Close", "Abort". - :vartype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName - :ivar current_service_operation_start_time_utc: The start time of the current service operation - in UTC format. - :vartype current_service_operation_start_time_utc: ~datetime.datetime - :ivar reported_load: List of load reported by replica. - :vartype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] - :ivar instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric to - uniquely identify an instance of a partition of a stateless service. It is unique within a - partition and does not change for the lifetime of the instance. If the instance has failed over - on the same or different node, it will get a different value for the InstanceId. - :vartype instance_id: str - :ivar deployed_service_replica_query_result: Information about a stateless service instance - deployed on a node. - :vartype deployed_service_replica_query_result: - ~azure.servicefabric.models.DeployedStatelessServiceInstanceInfo - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'current_service_operation': {'key': 'CurrentServiceOperation', 'type': 'str'}, - 'current_service_operation_start_time_utc': {'key': 'CurrentServiceOperationStartTimeUtc', 'type': 'iso-8601'}, - 'reported_load': {'key': 'ReportedLoad', 'type': '[LoadMetricReportInfo]'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'deployed_service_replica_query_result': {'key': 'DeployedServiceReplicaQueryResult', 'type': 'DeployedStatelessServiceInstanceInfo'}, - } - - def __init__( - self, - *, - service_name: Optional[str] = None, - partition_id: Optional[str] = None, - current_service_operation: Optional[Union[str, "ServiceOperationName"]] = None, - current_service_operation_start_time_utc: Optional[datetime.datetime] = None, - reported_load: Optional[List["LoadMetricReportInfo"]] = None, - instance_id: Optional[str] = None, - deployed_service_replica_query_result: Optional["DeployedStatelessServiceInstanceInfo"] = None, - **kwargs - ): - """ - :keyword service_name: Full hierarchical name of the service in URI format starting with - ``fabric:``. - :paramtype service_name: str - :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword current_service_operation: Specifies the current active life-cycle operation on a - stateful service replica or stateless service instance. Possible values include: "Unknown", - "None", "Open", "ChangeRole", "Close", "Abort". - :paramtype current_service_operation: str or ~azure.servicefabric.models.ServiceOperationName - :keyword current_service_operation_start_time_utc: The start time of the current service - operation in UTC format. - :paramtype current_service_operation_start_time_utc: ~datetime.datetime - :keyword reported_load: List of load reported by replica. - :paramtype reported_load: list[~azure.servicefabric.models.LoadMetricReportInfo] - :keyword instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric - to uniquely identify an instance of a partition of a stateless service. It is unique within a - partition and does not change for the lifetime of the instance. If the instance has failed over - on the same or different node, it will get a different value for the InstanceId. - :paramtype instance_id: str - :keyword deployed_service_replica_query_result: Information about a stateless service instance - deployed on a node. - :paramtype deployed_service_replica_query_result: - ~azure.servicefabric.models.DeployedStatelessServiceInstanceInfo - """ - super(DeployedStatelessServiceInstanceDetailInfo, self).__init__(service_name=service_name, partition_id=partition_id, current_service_operation=current_service_operation, current_service_operation_start_time_utc=current_service_operation_start_time_utc, reported_load=reported_load, **kwargs) - self.service_kind = 'Stateless' # type: str - self.instance_id = instance_id - self.deployed_service_replica_query_result = deployed_service_replica_query_result - - -class DeployedStatelessServiceInstanceInfo(DeployedServiceReplicaInfo): - """Information about a stateless service instance deployed on a node. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar service_name: The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar service_type_name: Name of the service type as specified in the service manifest. - :vartype service_type_name: str - :ivar service_manifest_name: The name of the service manifest in which this service type is - defined. - :vartype service_manifest_name: str - :ivar code_package_name: The name of the code package that hosts this replica. - :vartype code_package_name: str - :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", - "InBuild", "Standby", "Ready", "Down", "Dropped". - :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :ivar address: The last address returned by the replica in Open or ChangeRole. - :vartype address: str - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - :ivar host_process_id: Host process ID of the process that is hosting the replica. This will be - zero if the replica is down. In hyper-v containers this host process ID will be from different - kernel. - :vartype host_process_id: str - :ivar instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric to - uniquely identify an instance of a partition of a stateless service. It is unique within a - partition and does not change for the lifetime of the instance. If the instance has failed over - on the same or different node, it will get a different value for the InstanceId. - :vartype instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'host_process_id': {'key': 'HostProcessId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__( - self, - *, - service_name: Optional[str] = None, - service_type_name: Optional[str] = None, - service_manifest_name: Optional[str] = None, - code_package_name: Optional[str] = None, - partition_id: Optional[str] = None, - replica_status: Optional[Union[str, "ReplicaStatus"]] = None, - address: Optional[str] = None, - service_package_activation_id: Optional[str] = None, - host_process_id: Optional[str] = None, - instance_id: Optional[str] = None, - **kwargs - ): - """ - :keyword service_name: The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword service_type_name: Name of the service type as specified in the service manifest. - :paramtype service_type_name: str - :keyword service_manifest_name: The name of the service manifest in which this service type is - defined. - :paramtype service_manifest_name: str - :keyword code_package_name: The name of the code package that hosts this replica. - :paramtype code_package_name: str - :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_status: The status of a replica of a service. Possible values include: - "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". - :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :keyword address: The last address returned by the replica in Open or ChangeRole. - :paramtype address: str - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - :keyword host_process_id: Host process ID of the process that is hosting the replica. This will - be zero if the replica is down. In hyper-v containers this host process ID will be from - different kernel. - :paramtype host_process_id: str - :keyword instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric - to uniquely identify an instance of a partition of a stateless service. It is unique within a - partition and does not change for the lifetime of the instance. If the instance has failed over - on the same or different node, it will get a different value for the InstanceId. - :paramtype instance_id: str - """ - super(DeployedStatelessServiceInstanceInfo, self).__init__(service_name=service_name, service_type_name=service_type_name, service_manifest_name=service_manifest_name, code_package_name=code_package_name, partition_id=partition_id, replica_status=replica_status, address=address, service_package_activation_id=service_package_activation_id, host_process_id=host_process_id, **kwargs) - self.service_kind = 'Stateless' # type: str - self.instance_id = instance_id - - -class DeployServicePackageToNodeDescription(msrest.serialization.Model): - """Defines description for downloading packages associated with a service manifest to image cache on a Service Fabric node. - - All required parameters must be populated in order to send to Azure. - - :ivar service_manifest_name: Required. The name of service manifest whose packages need to be - downloaded. - :vartype service_manifest_name: str - :ivar application_type_name: Required. The application type name as defined in the application - manifest. - :vartype application_type_name: str - :ivar application_type_version: Required. The version of the application type as defined in the - application manifest. - :vartype application_type_version: str - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar package_sharing_policy: List of package sharing policy information. - :vartype package_sharing_policy: list[~azure.servicefabric.models.PackageSharingPolicyInfo] - """ - - _validation = { - 'service_manifest_name': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - 'node_name': {'required': True}, - } - - _attribute_map = { - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'package_sharing_policy': {'key': 'PackageSharingPolicy', 'type': '[PackageSharingPolicyInfo]'}, - } - - def __init__( - self, - *, - service_manifest_name: str, - application_type_name: str, - application_type_version: str, - node_name: str, - package_sharing_policy: Optional[List["PackageSharingPolicyInfo"]] = None, - **kwargs - ): - """ - :keyword service_manifest_name: Required. The name of service manifest whose packages need to - be downloaded. - :paramtype service_manifest_name: str - :keyword application_type_name: Required. The application type name as defined in the - application manifest. - :paramtype application_type_name: str - :keyword application_type_version: Required. The version of the application type as defined in - the application manifest. - :paramtype application_type_version: str - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword package_sharing_policy: List of package sharing policy information. - :paramtype package_sharing_policy: list[~azure.servicefabric.models.PackageSharingPolicyInfo] - """ - super(DeployServicePackageToNodeDescription, self).__init__(**kwargs) - self.service_manifest_name = service_manifest_name - self.application_type_name = application_type_name - self.application_type_version = application_type_version - self.node_name = node_name - self.package_sharing_policy = package_sharing_policy - - -class DiagnosticsDescription(msrest.serialization.Model): - """Describes the diagnostics options available. - - :ivar sinks: List of supported sinks that can be referenced. - :vartype sinks: list[~azure.servicefabric.models.DiagnosticsSinkProperties] - :ivar enabled: Status of whether or not sinks are enabled. - :vartype enabled: bool - :ivar default_sink_refs: The sinks to be used if diagnostics is enabled. Sink choices can be - overridden at the service and code package level. - :vartype 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: Optional[List["DiagnosticsSinkProperties"]] = None, - enabled: Optional[bool] = None, - default_sink_refs: Optional[List[str]] = None, - **kwargs - ): - """ - :keyword sinks: List of supported sinks that can be referenced. - :paramtype sinks: list[~azure.servicefabric.models.DiagnosticsSinkProperties] - :keyword enabled: Status of whether or not sinks are enabled. - :paramtype enabled: bool - :keyword default_sink_refs: The sinks to be used if diagnostics is enabled. Sink choices can be - overridden at the service and code package level. - :paramtype default_sink_refs: list[str] - """ - super(DiagnosticsDescription, self).__init__(**kwargs) - self.sinks = sinks - self.enabled = enabled - self.default_sink_refs = default_sink_refs - - -class DiagnosticsRef(msrest.serialization.Model): - """Reference to sinks in DiagnosticsDescription. - - :ivar enabled: Status of whether or not sinks are enabled. - :vartype enabled: bool - :ivar sink_refs: List of sinks to be used if enabled. References the list of sinks in - DiagnosticsDescription. - :vartype sink_refs: list[str] - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'sink_refs': {'key': 'sinkRefs', 'type': '[str]'}, - } - - def __init__( - self, - *, - enabled: Optional[bool] = None, - sink_refs: Optional[List[str]] = None, - **kwargs - ): - """ - :keyword enabled: Status of whether or not sinks are enabled. - :paramtype enabled: bool - :keyword sink_refs: List of sinks to be used if enabled. References the list of sinks in - DiagnosticsDescription. - :paramtype sink_refs: list[str] - """ - super(DiagnosticsRef, self).__init__(**kwargs) - self.enabled = enabled - self.sink_refs = sink_refs - - -class DisableBackupDescription(msrest.serialization.Model): - """It describes the body parameters while disabling backup of a backup entity(Application/Service/Partition). - - All required parameters must be populated in order to send to Azure. - - :ivar clean_backup: Required. Boolean flag to delete backups. It can be set to true for - deleting all the backups which were created for the backup entity that is getting disabled for - backup. - :vartype clean_backup: bool - """ - - _validation = { - 'clean_backup': {'required': True}, - } - - _attribute_map = { - 'clean_backup': {'key': 'CleanBackup', 'type': 'bool'}, - } - - def __init__( - self, - *, - clean_backup: bool, - **kwargs - ): - """ - :keyword clean_backup: Required. Boolean flag to delete backups. It can be set to true for - deleting all the backups which were created for the backup entity that is getting disabled for - backup. - :paramtype clean_backup: bool - """ - super(DisableBackupDescription, self).__init__(**kwargs) - self.clean_backup = clean_backup - - -class DiskInfo(msrest.serialization.Model): - """Information about the disk. - - :ivar capacity: the disk size in bytes. - :vartype capacity: str - :ivar available_space: the available disk space in bytes. - :vartype available_space: str - """ - - _attribute_map = { - 'capacity': {'key': 'Capacity', 'type': 'str'}, - 'available_space': {'key': 'AvailableSpace', 'type': 'str'}, - } - - def __init__( - self, - *, - capacity: Optional[str] = None, - available_space: Optional[str] = None, - **kwargs - ): - """ - :keyword capacity: the disk size in bytes. - :paramtype capacity: str - :keyword available_space: the available disk space in bytes. - :paramtype available_space: str - """ - super(DiskInfo, self).__init__(**kwargs) - self.capacity = capacity - self.available_space = available_space - - -class DoublePropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Double. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property, determined by the type of data. Following are the - possible values.Constant filled by server. Possible values include: "Invalid", "Binary", - "Int64", "Double", "String", "Guid". - :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind - :ivar data: Required. The data of the property value. - :vartype data: float - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'float'}, - } - - def __init__( - self, - *, - data: float, - **kwargs - ): - """ - :keyword data: Required. The data of the property value. - :paramtype data: float - """ - super(DoublePropertyValue, self).__init__(**kwargs) - self.kind = 'Double' # type: str - self.data = data - - -class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Dsms Azure blob store used for storing and enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant - filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", - "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". - :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind - :ivar friendly_name: Friendly name for this backup storage. - :vartype friendly_name: str - :ivar storage_credentials_source_location: Required. The source location of the storage - credentials to connect to the Dsms Azure blob store. - :vartype storage_credentials_source_location: str - :ivar container_name: Required. The name of the container in the blob store to store and - enumerate backups from. - :vartype container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'storage_credentials_source_location': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'storage_credentials_source_location': {'key': 'StorageCredentialsSourceLocation', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__( - self, - *, - storage_credentials_source_location: str, - container_name: str, - friendly_name: Optional[str] = None, - **kwargs - ): - """ - :keyword friendly_name: Friendly name for this backup storage. - :paramtype friendly_name: str - :keyword storage_credentials_source_location: Required. The source location of the storage - credentials to connect to the Dsms Azure blob store. - :paramtype storage_credentials_source_location: str - :keyword container_name: Required. The name of the container in the blob store to store and - enumerate backups from. - :paramtype container_name: str - """ - super(DsmsAzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) - self.storage_kind = 'DsmsAzureBlobStore' # type: str - self.storage_credentials_source_location = storage_credentials_source_location - self.container_name = container_name - - -class EnableBackupDescription(msrest.serialization.Model): - """Specifies the parameters needed to enable periodic backup. - - All required parameters must be populated in order to send to Azure. - - :ivar backup_policy_name: Required. Name of the backup policy to be used for enabling periodic - backups. - :vartype backup_policy_name: str - """ - - _validation = { - 'backup_policy_name': {'required': True}, - } - - _attribute_map = { - 'backup_policy_name': {'key': 'BackupPolicyName', 'type': 'str'}, - } - - def __init__( - self, - *, - backup_policy_name: str, - **kwargs - ): - """ - :keyword backup_policy_name: Required. Name of the backup policy to be used for enabling - periodic backups. - :paramtype backup_policy_name: str - """ - super(EnableBackupDescription, self).__init__(**kwargs) - self.backup_policy_name = backup_policy_name - - -class EndpointProperties(msrest.serialization.Model): - """Describes a container endpoint. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the endpoint. - :vartype name: str - :ivar port: Port used by the container. - :vartype port: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - *, - name: str, - port: Optional[int] = None, - **kwargs - ): - """ - :keyword name: Required. The name of the endpoint. - :paramtype name: str - :keyword port: Port used by the container. - :paramtype port: int - """ - super(EndpointProperties, self).__init__(**kwargs) - self.name = name - self.port = port - - -class EndpointRef(msrest.serialization.Model): - """Describes a reference to a service endpoint. - - :ivar name: Name of the endpoint. - :vartype name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - **kwargs - ): - """ - :keyword name: Name of the endpoint. - :paramtype name: str - """ - super(EndpointRef, self).__init__(**kwargs) - self.name = name - - -class SafetyCheck(msrest.serialization.Model): - """Represents a safety check performed by service fabric before continuing with the operations. These checks ensure the availability of the service and the reliability of the state. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SeedNodeSafetyCheck, PartitionSafetyCheck. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'EnsureSeedNodeQuorum': 'SeedNodeSafetyCheck', 'PartitionSafetyCheck': 'PartitionSafetyCheck'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(SafetyCheck, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class PartitionSafetyCheck(SafetyCheck): - """Represents a safety check for the service partition being performed by service fabric before continuing with operations. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: EnsureAvailabilitySafetyCheck, EnsurePartitionQuorumSafetyCheck, WaitForInbuildReplicaSafetyCheck, WaitForPrimaryPlacementSafetyCheck, WaitForPrimarySwapSafetyCheck, WaitForReconfigurationSafetyCheck. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - :ivar partition_id: Id of the partition which is undergoing the safety check. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'EnsureAvailability': 'EnsureAvailabilitySafetyCheck', 'EnsurePartitionQuorum': 'EnsurePartitionQuorumSafetyCheck', 'WaitForInbuildReplica': 'WaitForInbuildReplicaSafetyCheck', 'WaitForPrimaryPlacement': 'WaitForPrimaryPlacementSafetyCheck', 'WaitForPrimarySwap': 'WaitForPrimarySwapSafetyCheck', 'WaitForReconfiguration': 'WaitForReconfigurationSafetyCheck'} - } - - def __init__( - self, - *, - partition_id: Optional[str] = None, - **kwargs - ): - """ - :keyword partition_id: Id of the partition which is undergoing the safety check. - :paramtype partition_id: str - """ - super(PartitionSafetyCheck, self).__init__(**kwargs) - self.kind = 'PartitionSafetyCheck' # type: str - self.partition_id = partition_id - - -class EnsureAvailabilitySafetyCheck(PartitionSafetyCheck): - """Safety check that waits to ensure the availability of the partition. It waits until there are replicas available such that bringing down this replica will not cause availability loss for the partition. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - :ivar partition_id: Id of the partition which is undergoing the safety check. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - *, - partition_id: Optional[str] = None, - **kwargs - ): - """ - :keyword partition_id: Id of the partition which is undergoing the safety check. - :paramtype partition_id: str - """ - super(EnsureAvailabilitySafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'EnsureAvailability' # type: str - - -class EnsurePartitionQuorumSafetyCheck(PartitionSafetyCheck): - """Safety check that ensures that a quorum of replicas are not lost for a partition. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - :ivar partition_id: Id of the partition which is undergoing the safety check. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - *, - partition_id: Optional[str] = None, - **kwargs - ): - """ - :keyword partition_id: Id of the partition which is undergoing the safety check. - :paramtype partition_id: str - """ - super(EnsurePartitionQuorumSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'EnsurePartitionQuorum' # type: str - - -class EntityKindHealthStateCount(msrest.serialization.Model): - """Represents health state count for entities of the specified entity kind. - - :ivar entity_kind: The entity kind for which health states are evaluated. Possible values - include: "Invalid", "Node", "Partition", "Service", "Application", "Replica", - "DeployedApplication", "DeployedServicePackage", "Cluster". - :vartype entity_kind: str or ~azure.servicefabric.models.EntityKind - :ivar health_state_count: The health state count for the entities of the specified kind. - :vartype health_state_count: ~azure.servicefabric.models.HealthStateCount - """ - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'health_state_count': {'key': 'HealthStateCount', 'type': 'HealthStateCount'}, - } - - def __init__( - self, - *, - entity_kind: Optional[Union[str, "EntityKind"]] = None, - health_state_count: Optional["HealthStateCount"] = None, - **kwargs - ): - """ - :keyword entity_kind: The entity kind for which health states are evaluated. Possible values - include: "Invalid", "Node", "Partition", "Service", "Application", "Replica", - "DeployedApplication", "DeployedServicePackage", "Cluster". - :paramtype entity_kind: str or ~azure.servicefabric.models.EntityKind - :keyword health_state_count: The health state count for the entities of the specified kind. - :paramtype health_state_count: ~azure.servicefabric.models.HealthStateCount - """ - super(EntityKindHealthStateCount, self).__init__(**kwargs) - self.entity_kind = entity_kind - self.health_state_count = health_state_count - - -class EnvironmentVariable(msrest.serialization.Model): - """Describes an environment variable for the container. - - :ivar type: The type of the environment variable being given in value. Possible values include: - "ClearText", "KeyVaultReference", "SecretValueReference". Default value: "ClearText". - :vartype type: str or ~azure.servicefabric.models.EnvironmentVariableType - :ivar name: The name of the environment variable. - :vartype name: str - :ivar value: The value of the environment variable, will be processed based on the type - provided. - :vartype value: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "EnvironmentVariableType"]] = "ClearText", - name: Optional[str] = None, - value: Optional[str] = None, - **kwargs - ): - """ - :keyword type: The type of the environment variable being given in value. Possible values - include: "ClearText", "KeyVaultReference", "SecretValueReference". Default value: "ClearText". - :paramtype type: str or ~azure.servicefabric.models.EnvironmentVariableType - :keyword name: The name of the environment variable. - :paramtype name: str - :keyword value: The value of the environment variable, will be processed based on the type - provided. - :paramtype value: str - """ - super(EnvironmentVariable, self).__init__(**kwargs) - self.type = type - self.name = name - self.value = value - - -class Epoch(msrest.serialization.Model): - """An Epoch is a configuration number for the partition as a whole. When the configuration of the replica set changes, for example when the Primary replica changes, the operations that are replicated from the new Primary replica are said to be a new Epoch from the ones which were sent by the old Primary replica. - - :ivar configuration_version: The current configuration number of this Epoch. The configuration - number is an increasing value that is updated whenever the configuration of this replica set - changes. - :vartype configuration_version: str - :ivar data_loss_version: The current data loss number of this Epoch. The data loss number - property is an increasing value which is updated whenever data loss is suspected, as when loss - of a quorum of replicas in the replica set that includes the Primary replica. - :vartype data_loss_version: str - """ - - _attribute_map = { - 'configuration_version': {'key': 'ConfigurationVersion', 'type': 'str'}, - 'data_loss_version': {'key': 'DataLossVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - configuration_version: Optional[str] = None, - data_loss_version: Optional[str] = None, - **kwargs - ): - """ - :keyword configuration_version: The current configuration number of this Epoch. The - configuration number is an increasing value that is updated whenever the configuration of this - replica set changes. - :paramtype configuration_version: str - :keyword data_loss_version: The current data loss number of this Epoch. The data loss number - property is an increasing value which is updated whenever data loss is suspected, as when loss - of a quorum of replicas in the replica set that includes the Primary replica. - :paramtype data_loss_version: str - """ - super(Epoch, self).__init__(**kwargs) - self.configuration_version = configuration_version - self.data_loss_version = data_loss_version - - -class EventHealthEvaluation(HealthEvaluation): - """Represents health evaluation of a HealthEvent that was reported on the entity. -The health evaluation is returned when evaluating health of an entity results in Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar consider_warning_as_error: Indicates whether warnings are treated with the same severity - as errors. The field is specified in the health policy used to evaluate the entity. - :vartype consider_warning_as_error: bool - :ivar unhealthy_event: Represents health information reported on a health entity, such as - cluster, application or node, with additional metadata added by the Health Manager. - :vartype unhealthy_event: ~azure.servicefabric.models.HealthEvent - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'}, - 'unhealthy_event': {'key': 'UnhealthyEvent', 'type': 'HealthEvent'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - consider_warning_as_error: Optional[bool] = None, - unhealthy_event: Optional["HealthEvent"] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword consider_warning_as_error: Indicates whether warnings are treated with the same - severity as errors. The field is specified in the health policy used to evaluate the entity. - :paramtype consider_warning_as_error: bool - :keyword unhealthy_event: Represents health information reported on a health entity, such as - cluster, application or node, with additional metadata added by the Health Manager. - :paramtype unhealthy_event: ~azure.servicefabric.models.HealthEvent - """ - super(EventHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'Event' # type: str - self.consider_warning_as_error = consider_warning_as_error - self.unhealthy_event = unhealthy_event - - -class ExecutingFaultsChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos has decided on the faults for an iteration. This Chaos event contains the details of the faults as a list of strings. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values - include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", - "Stopped". - :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind - :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :vartype time_stamp_utc: ~datetime.datetime - :ivar faults: List of string description of the faults that Chaos decided to execute in an - iteration. - :vartype faults: list[str] - """ - - _validation = { - 'kind': {'required': True}, - 'time_stamp_utc': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'faults': {'key': 'Faults', 'type': '[str]'}, - } - - def __init__( - self, - *, - time_stamp_utc: datetime.datetime, - faults: Optional[List[str]] = None, - **kwargs - ): - """ - :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :paramtype time_stamp_utc: ~datetime.datetime - :keyword faults: List of string description of the faults that Chaos decided to execute in an - iteration. - :paramtype faults: list[str] - """ - super(ExecutingFaultsChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.kind = 'ExecutingFaults' # type: str - self.faults = faults - - -class ProvisionApplicationTypeDescriptionBase(msrest.serialization.Model): - """Represents the type of registration or provision requested, and if the operation needs to be asynchronous or not. Supported types of provision operations are from either image store or external store. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ExternalStoreProvisionApplicationTypeDescription, ProvisionApplicationTypeDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of application type registration or provision requested. The - application package can be registered or provisioned either from the image store or from an - external store. Following are the kinds of the application type provision.Constant filled by - server. Possible values include: "Invalid", "ImageStorePath", "ExternalStore". - :vartype kind: str or ~azure.servicefabric.models.ProvisionApplicationTypeKind - :ivar async_property: Required. Indicates whether or not provisioning should occur - asynchronously. When set to true, the provision operation returns when the request is accepted - by the system, and the provision operation continues without any timeout limit. The default - value is false. For large application packages, we recommend setting the value to true. - :vartype async_property: bool - """ - - _validation = { - 'kind': {'required': True}, - 'async_property': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'async_property': {'key': 'Async', 'type': 'bool'}, - } - - _subtype_map = { - 'kind': {'ExternalStore': 'ExternalStoreProvisionApplicationTypeDescription', 'ImageStorePath': 'ProvisionApplicationTypeDescription'} - } - - def __init__( - self, - *, - async_property: bool, - **kwargs - ): - """ - :keyword async_property: Required. Indicates whether or not provisioning should occur - asynchronously. When set to true, the provision operation returns when the request is accepted - by the system, and the provision operation continues without any timeout limit. The default - value is false. For large application packages, we recommend setting the value to true. - :paramtype async_property: bool - """ - super(ProvisionApplicationTypeDescriptionBase, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.async_property = async_property - - -class ExternalStoreProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): - """Describes the operation to register or provision an application type using an application package from an external store instead of a package uploaded to the Service Fabric image store. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of application type registration or provision requested. The - application package can be registered or provisioned either from the image store or from an - external store. Following are the kinds of the application type provision.Constant filled by - server. Possible values include: "Invalid", "ImageStorePath", "ExternalStore". - :vartype kind: str or ~azure.servicefabric.models.ProvisionApplicationTypeKind - :ivar async_property: Required. Indicates whether or not provisioning should occur - asynchronously. When set to true, the provision operation returns when the request is accepted - by the system, and the provision operation continues without any timeout limit. The default - value is false. For large application packages, we recommend setting the value to true. - :vartype async_property: bool - :ivar application_package_download_uri: Required. The path to the '.sfpkg' application package - from where the application package can be downloaded using HTTP or HTTPS protocols. The - application package can be stored in an external store that provides GET operation to download - the file. Supported protocols are HTTP and HTTPS, and the path must allow READ access. - :vartype application_package_download_uri: str - :ivar application_type_name: Required. The application type name represents the name of the - application type found in the application manifest. - :vartype application_type_name: str - :ivar application_type_version: Required. The application type version represents the version - of the application type found in the application manifest. - :vartype application_type_version: str - """ - - _validation = { - 'kind': {'required': True}, - 'async_property': {'required': True}, - 'application_package_download_uri': {'required': True}, - 'application_type_name': {'required': True}, - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'application_package_download_uri': {'key': 'ApplicationPackageDownloadUri', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - async_property: bool, - application_package_download_uri: str, - application_type_name: str, - application_type_version: str, - **kwargs - ): - """ - :keyword async_property: Required. Indicates whether or not provisioning should occur - asynchronously. When set to true, the provision operation returns when the request is accepted - by the system, and the provision operation continues without any timeout limit. The default - value is false. For large application packages, we recommend setting the value to true. - :paramtype async_property: bool - :keyword application_package_download_uri: Required. The path to the '.sfpkg' application - package from where the application package can be downloaded using HTTP or HTTPS protocols. The - application package can be stored in an external store that provides GET operation to download - the file. Supported protocols are HTTP and HTTPS, and the path must allow READ access. - :paramtype application_package_download_uri: str - :keyword application_type_name: Required. The application type name represents the name of the - application type found in the application manifest. - :paramtype application_type_name: str - :keyword application_type_version: Required. The application type version represents the - version of the application type found in the application manifest. - :paramtype application_type_version: str - """ - super(ExternalStoreProvisionApplicationTypeDescription, self).__init__(async_property=async_property, **kwargs) - self.kind = 'ExternalStore' # type: str - self.application_package_download_uri = application_package_download_uri - self.application_type_name = application_type_name - self.application_type_version = application_type_version - - -class FabricCodeVersionInfo(msrest.serialization.Model): - """Information about a Service Fabric code version. - - :ivar code_version: The product version of Service Fabric. - :vartype code_version: str - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - code_version: Optional[str] = None, - **kwargs - ): - """ - :keyword code_version: The product version of Service Fabric. - :paramtype code_version: str - """ - super(FabricCodeVersionInfo, self).__init__(**kwargs) - self.code_version = code_version - - -class FabricConfigVersionInfo(msrest.serialization.Model): - """Information about a Service Fabric config version. - - :ivar config_version: The config version of Service Fabric. - :vartype config_version: str - """ - - _attribute_map = { - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - config_version: Optional[str] = None, - **kwargs - ): - """ - :keyword config_version: The config version of Service Fabric. - :paramtype config_version: str - """ - super(FabricConfigVersionInfo, self).__init__(**kwargs) - self.config_version = config_version - - -class FabricError(msrest.serialization.Model): - """The REST API operations for Service Fabric return standard HTTP status codes. This type defines the additional information returned from the Service Fabric API operations that are not successful. - - All required parameters must be populated in order to send to Azure. - - :ivar error: Required. Error object containing error code and error message. - :vartype error: ~azure.servicefabric.models.FabricErrorError - """ - - _validation = { - 'error': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'Error', 'type': 'FabricErrorError'}, - } - - def __init__( - self, - *, - error: "FabricErrorError", - **kwargs - ): - """ - :keyword error: Required. Error object containing error code and error message. - :paramtype error: ~azure.servicefabric.models.FabricErrorError - """ - super(FabricError, self).__init__(**kwargs) - self.error = error - - -class FabricErrorError(msrest.serialization.Model): - """Error object containing error code and error message. - - All required parameters must be populated in order to send to Azure. - - :ivar code: Required. Defines the fabric error codes that be returned as part of the error - object in response to Service Fabric API operations that are not successful. Following are the - error code values that can be returned for a specific HTTP status code. - - - * - Possible values of the error code for HTTP status code 400 (Bad Request) - - - * "FABRIC_E_INVALID_PARTITION_KEY" - * "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" - * "FABRIC_E_INVALID_ADDRESS" - * "FABRIC_E_APPLICATION_NOT_UPGRADING" - * "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" - * "FABRIC_E_FABRIC_NOT_UPGRADING" - * "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" - * "FABRIC_E_INVALID_CONFIGURATION" - * "FABRIC_E_INVALID_NAME_URI" - * "FABRIC_E_PATH_TOO_LONG" - * "FABRIC_E_KEY_TOO_LARGE" - * "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" - * "FABRIC_E_INVALID_ATOMIC_GROUP" - * "FABRIC_E_VALUE_EMPTY" - * "FABRIC_E_BACKUP_IS_ENABLED" - * "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" - * "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" - * "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" - * "E_INVALIDARG" - - * - Possible values of the error code for HTTP status code 404 (Not Found) - - - * "FABRIC_E_NODE_NOT_FOUND" - * "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" - * "FABRIC_E_APPLICATION_NOT_FOUND" - * "FABRIC_E_SERVICE_TYPE_NOT_FOUND" - * "FABRIC_E_SERVICE_DOES_NOT_EXIST" - * "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" - * "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" - * "FABRIC_E_PARTITION_NOT_FOUND" - * "FABRIC_E_REPLICA_DOES_NOT_EXIST" - * "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" - * "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" - * "FABRIC_E_DIRECTORY_NOT_FOUND" - * "FABRIC_E_FABRIC_VERSION_NOT_FOUND" - * "FABRIC_E_FILE_NOT_FOUND" - * "FABRIC_E_NAME_DOES_NOT_EXIST" - * "FABRIC_E_PROPERTY_DOES_NOT_EXIST" - * "FABRIC_E_ENUMERATION_COMPLETED" - * "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" - * "FABRIC_E_KEY_NOT_FOUND" - * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" - * "FABRIC_E_BACKUP_NOT_ENABLED" - * "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" - * "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" - * "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" - - * - Possible values of the error code for HTTP status code 409 (Conflict) - - - * "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" - * "FABRIC_E_APPLICATION_ALREADY_EXISTS" - * "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" - * "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" - * "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" - * "FABRIC_E_SERVICE_ALREADY_EXISTS" - * "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" - * "FABRIC_E_APPLICATION_TYPE_IN_USE" - * "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" - * "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" - * "FABRIC_E_FABRIC_VERSION_IN_USE" - * "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" - * "FABRIC_E_NAME_ALREADY_EXISTS" - * "FABRIC_E_NAME_NOT_EMPTY" - * "FABRIC_E_PROPERTY_CHECK_FAILED" - * "FABRIC_E_SERVICE_METADATA_MISMATCH" - * "FABRIC_E_SERVICE_TYPE_MISMATCH" - * "FABRIC_E_HEALTH_STALE_REPORT" - * "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" - * "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" - * "FABRIC_E_INSTANCE_ID_MISMATCH" - * "FABRIC_E_BACKUP_IN_PROGRESS" - * "FABRIC_E_RESTORE_IN_PROGRESS" - * "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" - - * - Possible values of the error code for HTTP status code 413 (Request Entity Too Large) - - - * "FABRIC_E_VALUE_TOO_LARGE" - - * - Possible values of the error code for HTTP status code 500 (Internal Server Error) - - - * "FABRIC_E_NODE_IS_UP" - * "E_FAIL" - * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" - * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" - * "FABRIC_E_VOLUME_ALREADY_EXISTS" - * "FABRIC_E_VOLUME_NOT_FOUND" - * "SerializationError" - * "FABRIC_E_CERTIFICATE_NOT_FOUND" - - * - Possible values of the error code for HTTP status code 503 (Service Unavailable) - - - * "FABRIC_E_NO_WRITE_QUORUM" - * "FABRIC_E_NOT_PRIMARY" - * "FABRIC_E_NOT_READY" - * "FABRIC_E_RECONFIGURATION_PENDING" - * "FABRIC_E_SERVICE_OFFLINE" - * "E_ABORT" - * "FABRIC_E_VALUE_TOO_LARGE" - - * - Possible values of the error code for HTTP status code 504 (Gateway Timeout) - - - * "FABRIC_E_COMMUNICATION_ERROR" - * "FABRIC_E_OPERATION_NOT_COMPLETE" - * "FABRIC_E_TIMEOUT". Possible values include: "FABRIC_E_INVALID_PARTITION_KEY", - "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", - "FABRIC_E_APPLICATION_NOT_UPGRADING", "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", - "FABRIC_E_FABRIC_NOT_UPGRADING", "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", - "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", "FABRIC_E_PATH_TOO_LONG", - "FABRIC_E_KEY_TOO_LARGE", "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", - "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", "FABRIC_E_NODE_NOT_FOUND", - "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", "FABRIC_E_APPLICATION_NOT_FOUND", - "FABRIC_E_SERVICE_TYPE_NOT_FOUND", "FABRIC_E_SERVICE_DOES_NOT_EXIST", - "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", - "FABRIC_E_PARTITION_NOT_FOUND", "FABRIC_E_REPLICA_DOES_NOT_EXIST", - "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", - "FABRIC_E_DIRECTORY_NOT_FOUND", "FABRIC_E_FABRIC_VERSION_NOT_FOUND", "FABRIC_E_FILE_NOT_FOUND", - "FABRIC_E_NAME_DOES_NOT_EXIST", "FABRIC_E_PROPERTY_DOES_NOT_EXIST", - "FABRIC_E_ENUMERATION_COMPLETED", "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", - "FABRIC_E_KEY_NOT_FOUND", "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", "FABRIC_E_APPLICATION_ALREADY_EXISTS", - "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", - "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", - "FABRIC_E_SERVICE_ALREADY_EXISTS", "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", - "FABRIC_E_APPLICATION_TYPE_IN_USE", "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", - "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", "FABRIC_E_FABRIC_VERSION_IN_USE", - "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", "FABRIC_E_NAME_ALREADY_EXISTS", - "FABRIC_E_NAME_NOT_EMPTY", "FABRIC_E_PROPERTY_CHECK_FAILED", - "FABRIC_E_SERVICE_METADATA_MISMATCH", "FABRIC_E_SERVICE_TYPE_MISMATCH", - "FABRIC_E_HEALTH_STALE_REPORT", "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", - "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", - "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", "FABRIC_E_NOT_PRIMARY", - "FABRIC_E_NOT_READY", "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", - "E_ABORT", "FABRIC_E_COMMUNICATION_ERROR", "FABRIC_E_OPERATION_NOT_COMPLETE", - "FABRIC_E_TIMEOUT", "FABRIC_E_NODE_IS_UP", "E_FAIL", "FABRIC_E_BACKUP_IS_ENABLED", - "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", - "FABRIC_E_BACKUP_NOT_ENABLED", "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", "FABRIC_E_BACKUP_IN_PROGRESS", - "FABRIC_E_RESTORE_IN_PROGRESS", "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", - "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", "FABRIC_E_VOLUME_ALREADY_EXISTS", - "FABRIC_E_VOLUME_NOT_FOUND", "SerializationError", - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", "FABRIC_E_CERTIFICATE_NOT_FOUND". - :vartype code: str or ~azure.servicefabric.models.FabricErrorCodes - :ivar message: Error message. - :vartype message: str - """ - - _validation = { - 'code': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'Code', 'type': 'str'}, - 'message': {'key': 'Message', 'type': 'str'}, - } - - def __init__( - self, - *, - code: Union[str, "FabricErrorCodes"], - message: Optional[str] = None, - **kwargs - ): - """ - :keyword code: Required. Defines the fabric error codes that be returned as part of the error - object in response to Service Fabric API operations that are not successful. Following are the - error code values that can be returned for a specific HTTP status code. - - - * - Possible values of the error code for HTTP status code 400 (Bad Request) - - - * "FABRIC_E_INVALID_PARTITION_KEY" - * "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" - * "FABRIC_E_INVALID_ADDRESS" - * "FABRIC_E_APPLICATION_NOT_UPGRADING" - * "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" - * "FABRIC_E_FABRIC_NOT_UPGRADING" - * "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" - * "FABRIC_E_INVALID_CONFIGURATION" - * "FABRIC_E_INVALID_NAME_URI" - * "FABRIC_E_PATH_TOO_LONG" - * "FABRIC_E_KEY_TOO_LARGE" - * "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" - * "FABRIC_E_INVALID_ATOMIC_GROUP" - * "FABRIC_E_VALUE_EMPTY" - * "FABRIC_E_BACKUP_IS_ENABLED" - * "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" - * "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" - * "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" - * "E_INVALIDARG" - - * - Possible values of the error code for HTTP status code 404 (Not Found) - - - * "FABRIC_E_NODE_NOT_FOUND" - * "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" - * "FABRIC_E_APPLICATION_NOT_FOUND" - * "FABRIC_E_SERVICE_TYPE_NOT_FOUND" - * "FABRIC_E_SERVICE_DOES_NOT_EXIST" - * "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" - * "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" - * "FABRIC_E_PARTITION_NOT_FOUND" - * "FABRIC_E_REPLICA_DOES_NOT_EXIST" - * "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" - * "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" - * "FABRIC_E_DIRECTORY_NOT_FOUND" - * "FABRIC_E_FABRIC_VERSION_NOT_FOUND" - * "FABRIC_E_FILE_NOT_FOUND" - * "FABRIC_E_NAME_DOES_NOT_EXIST" - * "FABRIC_E_PROPERTY_DOES_NOT_EXIST" - * "FABRIC_E_ENUMERATION_COMPLETED" - * "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" - * "FABRIC_E_KEY_NOT_FOUND" - * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" - * "FABRIC_E_BACKUP_NOT_ENABLED" - * "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" - * "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" - * "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" - - * - Possible values of the error code for HTTP status code 409 (Conflict) - - - * "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" - * "FABRIC_E_APPLICATION_ALREADY_EXISTS" - * "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" - * "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" - * "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" - * "FABRIC_E_SERVICE_ALREADY_EXISTS" - * "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" - * "FABRIC_E_APPLICATION_TYPE_IN_USE" - * "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" - * "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" - * "FABRIC_E_FABRIC_VERSION_IN_USE" - * "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" - * "FABRIC_E_NAME_ALREADY_EXISTS" - * "FABRIC_E_NAME_NOT_EMPTY" - * "FABRIC_E_PROPERTY_CHECK_FAILED" - * "FABRIC_E_SERVICE_METADATA_MISMATCH" - * "FABRIC_E_SERVICE_TYPE_MISMATCH" - * "FABRIC_E_HEALTH_STALE_REPORT" - * "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" - * "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" - * "FABRIC_E_INSTANCE_ID_MISMATCH" - * "FABRIC_E_BACKUP_IN_PROGRESS" - * "FABRIC_E_RESTORE_IN_PROGRESS" - * "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" - - * - Possible values of the error code for HTTP status code 413 (Request Entity Too Large) - - - * "FABRIC_E_VALUE_TOO_LARGE" - - * - Possible values of the error code for HTTP status code 500 (Internal Server Error) - - - * "FABRIC_E_NODE_IS_UP" - * "E_FAIL" - * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" - * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" - * "FABRIC_E_VOLUME_ALREADY_EXISTS" - * "FABRIC_E_VOLUME_NOT_FOUND" - * "SerializationError" - * "FABRIC_E_CERTIFICATE_NOT_FOUND" - - * - Possible values of the error code for HTTP status code 503 (Service Unavailable) - - - * "FABRIC_E_NO_WRITE_QUORUM" - * "FABRIC_E_NOT_PRIMARY" - * "FABRIC_E_NOT_READY" - * "FABRIC_E_RECONFIGURATION_PENDING" - * "FABRIC_E_SERVICE_OFFLINE" - * "E_ABORT" - * "FABRIC_E_VALUE_TOO_LARGE" - - * - Possible values of the error code for HTTP status code 504 (Gateway Timeout) - - - * "FABRIC_E_COMMUNICATION_ERROR" - * "FABRIC_E_OPERATION_NOT_COMPLETE" - * "FABRIC_E_TIMEOUT". Possible values include: "FABRIC_E_INVALID_PARTITION_KEY", - "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", - "FABRIC_E_APPLICATION_NOT_UPGRADING", "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", - "FABRIC_E_FABRIC_NOT_UPGRADING", "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", - "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", "FABRIC_E_PATH_TOO_LONG", - "FABRIC_E_KEY_TOO_LARGE", "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", - "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", "FABRIC_E_NODE_NOT_FOUND", - "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", "FABRIC_E_APPLICATION_NOT_FOUND", - "FABRIC_E_SERVICE_TYPE_NOT_FOUND", "FABRIC_E_SERVICE_DOES_NOT_EXIST", - "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", - "FABRIC_E_PARTITION_NOT_FOUND", "FABRIC_E_REPLICA_DOES_NOT_EXIST", - "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", - "FABRIC_E_DIRECTORY_NOT_FOUND", "FABRIC_E_FABRIC_VERSION_NOT_FOUND", "FABRIC_E_FILE_NOT_FOUND", - "FABRIC_E_NAME_DOES_NOT_EXIST", "FABRIC_E_PROPERTY_DOES_NOT_EXIST", - "FABRIC_E_ENUMERATION_COMPLETED", "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", - "FABRIC_E_KEY_NOT_FOUND", "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", "FABRIC_E_APPLICATION_ALREADY_EXISTS", - "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", - "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", - "FABRIC_E_SERVICE_ALREADY_EXISTS", "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", - "FABRIC_E_APPLICATION_TYPE_IN_USE", "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", - "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", "FABRIC_E_FABRIC_VERSION_IN_USE", - "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", "FABRIC_E_NAME_ALREADY_EXISTS", - "FABRIC_E_NAME_NOT_EMPTY", "FABRIC_E_PROPERTY_CHECK_FAILED", - "FABRIC_E_SERVICE_METADATA_MISMATCH", "FABRIC_E_SERVICE_TYPE_MISMATCH", - "FABRIC_E_HEALTH_STALE_REPORT", "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", - "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", - "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", "FABRIC_E_NOT_PRIMARY", - "FABRIC_E_NOT_READY", "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", - "E_ABORT", "FABRIC_E_COMMUNICATION_ERROR", "FABRIC_E_OPERATION_NOT_COMPLETE", - "FABRIC_E_TIMEOUT", "FABRIC_E_NODE_IS_UP", "E_FAIL", "FABRIC_E_BACKUP_IS_ENABLED", - "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", - "FABRIC_E_BACKUP_NOT_ENABLED", "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", "FABRIC_E_BACKUP_IN_PROGRESS", - "FABRIC_E_RESTORE_IN_PROGRESS", "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", - "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", "FABRIC_E_VOLUME_ALREADY_EXISTS", - "FABRIC_E_VOLUME_NOT_FOUND", "SerializationError", - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", "FABRIC_E_CERTIFICATE_NOT_FOUND". - :paramtype code: str or ~azure.servicefabric.models.FabricErrorCodes - :keyword message: Error message. - :paramtype message: str - """ - super(FabricErrorError, self).__init__(**kwargs) - self.code = code - self.message = message - - -class PropertyBatchInfo(msrest.serialization.Model): - """Information about the results of a property batch. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: FailedPropertyBatchInfo, SuccessfulPropertyBatchInfo. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch info, determined by the results of a property - batch. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Successful", "Failed". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchInfoKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Failed': 'FailedPropertyBatchInfo', 'Successful': 'SuccessfulPropertyBatchInfo'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(PropertyBatchInfo, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class FailedPropertyBatchInfo(PropertyBatchInfo): - """Derived from PropertyBatchInfo. Represents the property batch failing. Contains information about the specific batch failure. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch info, determined by the results of a property - batch. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Successful", "Failed". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchInfoKind - :ivar error_message: The error message of the failed operation. Describes the exception thrown - due to the first unsuccessful operation in the property batch. - :vartype error_message: str - :ivar operation_index: The index of the unsuccessful operation in the property batch. - :vartype operation_index: int - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'error_message': {'key': 'ErrorMessage', 'type': 'str'}, - 'operation_index': {'key': 'OperationIndex', 'type': 'int'}, - } - - def __init__( - self, - *, - error_message: Optional[str] = None, - operation_index: Optional[int] = None, - **kwargs - ): - """ - :keyword error_message: The error message of the failed operation. Describes the exception - thrown due to the first unsuccessful operation in the property batch. - :paramtype error_message: str - :keyword operation_index: The index of the unsuccessful operation in the property batch. - :paramtype operation_index: int - """ - super(FailedPropertyBatchInfo, self).__init__(**kwargs) - self.kind = 'Failed' # type: str - self.error_message = error_message - self.operation_index = operation_index - - -class FailedUpgradeDomainProgressObject(msrest.serialization.Model): - """The detailed upgrade progress for nodes in the current upgrade domain at the point of failure. Not applicable to node-by-node upgrades. - - :ivar domain_name: The name of the upgrade domain. - :vartype domain_name: str - :ivar node_upgrade_progress_list: List of upgrading nodes and their statuses. - :vartype node_upgrade_progress_list: list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__( - self, - *, - domain_name: Optional[str] = None, - node_upgrade_progress_list: Optional[List["NodeUpgradeProgressInfo"]] = None, - **kwargs - ): - """ - :keyword domain_name: The name of the upgrade domain. - :paramtype domain_name: str - :keyword node_upgrade_progress_list: List of upgrading nodes and their statuses. - :paramtype node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - super(FailedUpgradeDomainProgressObject, self).__init__(**kwargs) - self.domain_name = domain_name - self.node_upgrade_progress_list = node_upgrade_progress_list - - -class FailureUpgradeDomainProgressInfo(msrest.serialization.Model): - """Information about the upgrade domain progress at the time of upgrade failure. - - :ivar domain_name: The name of the upgrade domain. - :vartype domain_name: str - :ivar node_upgrade_progress_list: List of upgrading nodes and their statuses. - :vartype node_upgrade_progress_list: list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - - _attribute_map = { - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - 'node_upgrade_progress_list': {'key': 'NodeUpgradeProgressList', 'type': '[NodeUpgradeProgressInfo]'}, - } - - def __init__( - self, - *, - domain_name: Optional[str] = None, - node_upgrade_progress_list: Optional[List["NodeUpgradeProgressInfo"]] = None, - **kwargs - ): - """ - :keyword domain_name: The name of the upgrade domain. - :paramtype domain_name: str - :keyword node_upgrade_progress_list: List of upgrading nodes and their statuses. - :paramtype node_upgrade_progress_list: - list[~azure.servicefabric.models.NodeUpgradeProgressInfo] - """ - super(FailureUpgradeDomainProgressInfo, self).__init__(**kwargs) - self.domain_name = domain_name - self.node_upgrade_progress_list = node_upgrade_progress_list - - -class FileInfo(msrest.serialization.Model): - """Information about a image store file. - - :ivar file_size: The size of file in bytes. - :vartype file_size: str - :ivar file_version: Information about the version of image store file. - :vartype file_version: ~azure.servicefabric.models.FileVersion - :ivar modified_date: The date and time when the image store file was last modified. - :vartype modified_date: ~datetime.datetime - :ivar store_relative_path: The file path relative to the image store root path. - :vartype store_relative_path: str - """ - - _attribute_map = { - 'file_size': {'key': 'FileSize', 'type': 'str'}, - 'file_version': {'key': 'FileVersion', 'type': 'FileVersion'}, - 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - } - - def __init__( - self, - *, - file_size: Optional[str] = None, - file_version: Optional["FileVersion"] = None, - modified_date: Optional[datetime.datetime] = None, - store_relative_path: Optional[str] = None, - **kwargs - ): - """ - :keyword file_size: The size of file in bytes. - :paramtype file_size: str - :keyword file_version: Information about the version of image store file. - :paramtype file_version: ~azure.servicefabric.models.FileVersion - :keyword modified_date: The date and time when the image store file was last modified. - :paramtype modified_date: ~datetime.datetime - :keyword store_relative_path: The file path relative to the image store root path. - :paramtype store_relative_path: str - """ - super(FileInfo, self).__init__(**kwargs) - self.file_size = file_size - self.file_version = file_version - self.modified_date = modified_date - self.store_relative_path = store_relative_path - - -class FileShareBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for file share storage used for storing or enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant - filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", - "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". - :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind - :ivar friendly_name: Friendly name for this backup storage. - :vartype friendly_name: str - :ivar path: Required. UNC path of the file share where to store or enumerate backups from. - :vartype path: str - :ivar primary_user_name: Primary user name to access the file share. - :vartype primary_user_name: str - :ivar primary_password: Primary password to access the share location. - :vartype primary_password: str - :ivar secondary_user_name: Secondary user name to access the file share. - :vartype secondary_user_name: str - :ivar secondary_password: Secondary password to access the share location. - :vartype secondary_password: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'path': {'required': True}, - } - - _attribute_map = { - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'path': {'key': 'Path', 'type': 'str'}, - 'primary_user_name': {'key': 'PrimaryUserName', 'type': 'str'}, - 'primary_password': {'key': 'PrimaryPassword', 'type': 'str'}, - 'secondary_user_name': {'key': 'SecondaryUserName', 'type': 'str'}, - 'secondary_password': {'key': 'SecondaryPassword', 'type': 'str'}, - } - - def __init__( - self, - *, - path: str, - friendly_name: Optional[str] = None, - primary_user_name: Optional[str] = None, - primary_password: Optional[str] = None, - secondary_user_name: Optional[str] = None, - secondary_password: Optional[str] = None, - **kwargs - ): - """ - :keyword friendly_name: Friendly name for this backup storage. - :paramtype friendly_name: str - :keyword path: Required. UNC path of the file share where to store or enumerate backups from. - :paramtype path: str - :keyword primary_user_name: Primary user name to access the file share. - :paramtype primary_user_name: str - :keyword primary_password: Primary password to access the share location. - :paramtype primary_password: str - :keyword secondary_user_name: Secondary user name to access the file share. - :paramtype secondary_user_name: str - :keyword secondary_password: Secondary password to access the share location. - :paramtype secondary_password: str - """ - super(FileShareBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) - self.storage_kind = 'FileShare' # type: str - self.path = path - self.primary_user_name = primary_user_name - self.primary_password = primary_password - self.secondary_user_name = secondary_user_name - self.secondary_password = secondary_password - - -class FileVersion(msrest.serialization.Model): - """Information about the version of image store file. - - :ivar version_number: The current image store version number for the file is used in image - store for checking whether it need to be updated. - :vartype version_number: str - :ivar epoch_data_loss_number: The epoch data loss number of image store replica when this file - entry was updated or created. - :vartype epoch_data_loss_number: str - :ivar epoch_configuration_number: The epoch configuration version number of the image store - replica when this file entry was created or updated. - :vartype epoch_configuration_number: str - """ - - _attribute_map = { - 'version_number': {'key': 'VersionNumber', 'type': 'str'}, - 'epoch_data_loss_number': {'key': 'EpochDataLossNumber', 'type': 'str'}, - 'epoch_configuration_number': {'key': 'EpochConfigurationNumber', 'type': 'str'}, - } - - def __init__( - self, - *, - version_number: Optional[str] = None, - epoch_data_loss_number: Optional[str] = None, - epoch_configuration_number: Optional[str] = None, - **kwargs - ): - """ - :keyword version_number: The current image store version number for the file is used in image - store for checking whether it need to be updated. - :paramtype version_number: str - :keyword epoch_data_loss_number: The epoch data loss number of image store replica when this - file entry was updated or created. - :paramtype epoch_data_loss_number: str - :keyword epoch_configuration_number: The epoch configuration version number of the image store - replica when this file entry was created or updated. - :paramtype epoch_configuration_number: str - """ - super(FileVersion, self).__init__(**kwargs) - self.version_number = version_number - self.epoch_data_loss_number = epoch_data_loss_number - self.epoch_configuration_number = epoch_configuration_number - - -class FolderInfo(msrest.serialization.Model): - """Information about a image store folder. It includes how many files this folder contains and its image store relative path. - - :ivar store_relative_path: The remote location within image store. This path is relative to the - image store root. - :vartype store_relative_path: str - :ivar file_count: The number of files from within the image store folder. - :vartype file_count: str - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'file_count': {'key': 'FileCount', 'type': 'str'}, - } - - def __init__( - self, - *, - store_relative_path: Optional[str] = None, - file_count: Optional[str] = None, - **kwargs - ): - """ - :keyword store_relative_path: The remote location within image store. This path is relative to - the image store root. - :paramtype store_relative_path: str - :keyword file_count: The number of files from within the image store folder. - :paramtype file_count: str - """ - super(FolderInfo, self).__init__(**kwargs) - self.store_relative_path = store_relative_path - self.file_count = file_count - - -class FolderSizeInfo(msrest.serialization.Model): - """Information of a image store folder size. - - :ivar store_relative_path: The remote location within image store. This path is relative to the - image store root. - :vartype store_relative_path: str - :ivar folder_size: The size of folder in bytes. - :vartype folder_size: str - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'folder_size': {'key': 'FolderSize', 'type': 'str'}, - } - - def __init__( - self, - *, - store_relative_path: Optional[str] = None, - folder_size: Optional[str] = None, - **kwargs - ): - """ - :keyword store_relative_path: The remote location within image store. This path is relative to - the image store root. - :paramtype store_relative_path: str - :keyword folder_size: The size of folder in bytes. - :paramtype folder_size: str - """ - super(FolderSizeInfo, self).__init__(**kwargs) - self.store_relative_path = store_relative_path - self.folder_size = folder_size - - -class FrequencyBasedBackupScheduleDescription(BackupScheduleDescription): - """Describes the frequency based backup schedule. - - All required parameters must be populated in order to send to Azure. - - :ivar schedule_kind: Required. The kind of backup schedule, time based or frequency - based.Constant filled by server. Possible values include: "Invalid", "TimeBased", - "FrequencyBased". - :vartype schedule_kind: str or ~azure.servicefabric.models.BackupScheduleKind - :ivar interval: Required. Defines the interval with which backups are periodically taken. It - should be specified in ISO8601 format. Timespan in seconds is not supported and will be ignored - while creating the policy. - :vartype interval: ~datetime.timedelta - """ - - _validation = { - 'schedule_kind': {'required': True}, - 'interval': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - 'interval': {'key': 'Interval', 'type': 'duration'}, - } - - def __init__( - self, - *, - interval: datetime.timedelta, - **kwargs - ): - """ - :keyword interval: Required. Defines the interval with which backups are periodically taken. It - should be specified in ISO8601 format. Timespan in seconds is not supported and will be ignored - while creating the policy. - :paramtype interval: ~datetime.timedelta - """ - super(FrequencyBasedBackupScheduleDescription, self).__init__(**kwargs) - self.schedule_kind = 'FrequencyBased' # type: str - self.interval = interval - - -class GatewayDestination(msrest.serialization.Model): - """Describes destination endpoint for routing traffic. - - All required parameters must be populated in order to send to Azure. - - :ivar application_name: Required. Name of the service fabric Mesh application. - :vartype application_name: str - :ivar service_name: Required. service that contains the endpoint. - :vartype service_name: str - :ivar endpoint_name: Required. name of the endpoint in the service. - :vartype endpoint_name: str - """ - - _validation = { - 'application_name': {'required': True}, - 'service_name': {'required': True}, - 'endpoint_name': {'required': True}, - } - - _attribute_map = { - 'application_name': {'key': 'applicationName', 'type': 'str'}, - 'service_name': {'key': 'serviceName', 'type': 'str'}, - 'endpoint_name': {'key': 'endpointName', 'type': 'str'}, - } - - def __init__( - self, - *, - application_name: str, - service_name: str, - endpoint_name: str, - **kwargs - ): - """ - :keyword application_name: Required. Name of the service fabric Mesh application. - :paramtype application_name: str - :keyword service_name: Required. service that contains the endpoint. - :paramtype service_name: str - :keyword endpoint_name: Required. name of the endpoint in the service. - :paramtype endpoint_name: str - """ - super(GatewayDestination, self).__init__(**kwargs) - self.application_name = application_name - self.service_name = service_name - self.endpoint_name = endpoint_name - - -class GatewayResourceDescription(msrest.serialization.Model): - """This type describes a gateway resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of the Gateway resource. - :vartype name: str - :ivar description: User readable description of the gateway. - :vartype description: str - :ivar source_network: Required. Network the gateway should listen on for requests. - :vartype source_network: ~azure.servicefabric.models.NetworkRef - :ivar destination_network: Required. Network that the Application is using. - :vartype destination_network: ~azure.servicefabric.models.NetworkRef - :ivar tcp: Configuration for tcp connectivity for this gateway. - :vartype tcp: list[~azure.servicefabric.models.TcpConfig] - :ivar http: Configuration for http connectivity for this gateway. - :vartype http: list[~azure.servicefabric.models.HttpConfig] - :ivar status: Status of the resource. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the gateway. - :vartype status_details: str - :ivar ip_address: IP address of the gateway. This is populated in the response and is ignored - for incoming requests. - :vartype ip_address: str - """ - - _validation = { - 'name': {'required': True}, - 'source_network': {'required': True}, - 'destination_network': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'ip_address': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'source_network': {'key': 'properties.sourceNetwork', 'type': 'NetworkRef'}, - 'destination_network': {'key': 'properties.destinationNetwork', 'type': 'NetworkRef'}, - 'tcp': {'key': 'properties.tcp', 'type': '[TcpConfig]'}, - 'http': {'key': 'properties.http', 'type': '[HttpConfig]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, - } - - def __init__( - self, - *, - name: str, - source_network: "NetworkRef", - destination_network: "NetworkRef", - description: Optional[str] = None, - tcp: Optional[List["TcpConfig"]] = None, - http: Optional[List["HttpConfig"]] = None, - **kwargs - ): - """ - :keyword name: Required. Name of the Gateway resource. - :paramtype name: str - :keyword description: User readable description of the gateway. - :paramtype description: str - :keyword source_network: Required. Network the gateway should listen on for requests. - :paramtype source_network: ~azure.servicefabric.models.NetworkRef - :keyword destination_network: Required. Network that the Application is using. - :paramtype destination_network: ~azure.servicefabric.models.NetworkRef - :keyword tcp: Configuration for tcp connectivity for this gateway. - :paramtype tcp: list[~azure.servicefabric.models.TcpConfig] - :keyword http: Configuration for http connectivity for this gateway. - :paramtype http: list[~azure.servicefabric.models.HttpConfig] - """ - super(GatewayResourceDescription, self).__init__(**kwargs) - self.name = name - self.description = description - self.source_network = source_network - self.destination_network = destination_network - self.tcp = tcp - self.http = http - self.status = None - self.status_details = None - self.ip_address = None - - -class GetBackupByStorageQueryDescription(msrest.serialization.Model): - """Describes additional filters to be applied, while listing backups, and backup storage details from where to fetch the backups. - - All required parameters must be populated in order to send to Azure. - - :ivar start_date_time_filter: Specifies the start date time in ISO8601 from which to enumerate - backups. If not specified, backups are enumerated from the beginning. - :vartype start_date_time_filter: ~datetime.datetime - :ivar end_date_time_filter: Specifies the end date time in ISO8601 till which to enumerate - backups. If not specified, backups are enumerated till the end. - :vartype end_date_time_filter: ~datetime.datetime - :ivar latest: If specified as true, gets the most recent backup (within the specified time - range) for every partition under the specified backup entity. - :vartype latest: bool - :ivar storage: Required. Describes the parameters for the backup storage from where to - enumerate backups. This is optional and by default backups are enumerated from the backup - storage where this backup entity is currently being backed up (as specified in backup policy). - This parameter is useful to be able to enumerate backups from another cluster where you may - intend to restore. - :vartype storage: ~azure.servicefabric.models.BackupStorageDescription - :ivar backup_entity: Required. Indicates the entity for which to enumerate backups. - :vartype backup_entity: ~azure.servicefabric.models.BackupEntity - """ - - _validation = { - 'storage': {'required': True}, - 'backup_entity': {'required': True}, - } - - _attribute_map = { - 'start_date_time_filter': {'key': 'StartDateTimeFilter', 'type': 'iso-8601'}, - 'end_date_time_filter': {'key': 'EndDateTimeFilter', 'type': 'iso-8601'}, - 'latest': {'key': 'Latest', 'type': 'bool'}, - 'storage': {'key': 'Storage', 'type': 'BackupStorageDescription'}, - 'backup_entity': {'key': 'BackupEntity', 'type': 'BackupEntity'}, - } - - def __init__( - self, - *, - storage: "BackupStorageDescription", - backup_entity: "BackupEntity", - start_date_time_filter: Optional[datetime.datetime] = None, - end_date_time_filter: Optional[datetime.datetime] = None, - latest: Optional[bool] = False, - **kwargs - ): - """ - :keyword start_date_time_filter: Specifies the start date time in ISO8601 from which to - enumerate backups. If not specified, backups are enumerated from the beginning. - :paramtype start_date_time_filter: ~datetime.datetime - :keyword end_date_time_filter: Specifies the end date time in ISO8601 till which to enumerate - backups. If not specified, backups are enumerated till the end. - :paramtype end_date_time_filter: ~datetime.datetime - :keyword latest: If specified as true, gets the most recent backup (within the specified time - range) for every partition under the specified backup entity. - :paramtype latest: bool - :keyword storage: Required. Describes the parameters for the backup storage from where to - enumerate backups. This is optional and by default backups are enumerated from the backup - storage where this backup entity is currently being backed up (as specified in backup policy). - This parameter is useful to be able to enumerate backups from another cluster where you may - intend to restore. - :paramtype storage: ~azure.servicefabric.models.BackupStorageDescription - :keyword backup_entity: Required. Indicates the entity for which to enumerate backups. - :paramtype backup_entity: ~azure.servicefabric.models.BackupEntity - """ - super(GetBackupByStorageQueryDescription, self).__init__(**kwargs) - self.start_date_time_filter = start_date_time_filter - self.end_date_time_filter = end_date_time_filter - self.latest = latest - self.storage = storage - self.backup_entity = backup_entity - - -class GetPropertyBatchOperation(PropertyBatchOperation): - """Represents a PropertyBatchOperation that gets the specified property if it exists. -Note that if one PropertyBatchOperation in a PropertyBatch fails, -the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch operation, determined by the operation to be - performed. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind - :ivar property_name: Required. The name of the Service Fabric property. - :vartype property_name: str - :ivar include_value: Whether or not to return the property value with the metadata. - True if values should be returned with the metadata; False to return only property metadata. - :vartype include_value: bool - """ - - _validation = { - 'kind': {'required': True}, - 'property_name': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'include_value': {'key': 'IncludeValue', 'type': 'bool'}, - } - - def __init__( - self, - *, - property_name: str, - include_value: Optional[bool] = False, - **kwargs - ): - """ - :keyword property_name: Required. The name of the Service Fabric property. - :paramtype property_name: str - :keyword include_value: Whether or not to return the property value with the metadata. - True if values should be returned with the metadata; False to return only property metadata. - :paramtype include_value: bool - """ - super(GetPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.kind = 'Get' # type: str - self.include_value = include_value - - -class GuidPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Guid. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property, determined by the type of data. Following are the - possible values.Constant filled by server. Possible values include: "Invalid", "Binary", - "Int64", "Double", "String", "Guid". - :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind - :ivar data: Required. The data of the property value. - :vartype data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__( - self, - *, - data: str, - **kwargs - ): - """ - :keyword data: Required. The data of the property value. - :paramtype data: str - """ - super(GuidPropertyValue, self).__init__(**kwargs) - self.kind = 'Guid' # type: str - self.data = data - - -class HealthEvaluationWrapper(msrest.serialization.Model): - """Wrapper object for health evaluation. - - :ivar health_evaluation: Represents a health evaluation which describes the data and the - algorithm used by health manager to evaluate the health of an entity. - :vartype health_evaluation: ~azure.servicefabric.models.HealthEvaluation - """ - - _attribute_map = { - 'health_evaluation': {'key': 'HealthEvaluation', 'type': 'HealthEvaluation'}, - } - - def __init__( - self, - *, - health_evaluation: Optional["HealthEvaluation"] = None, - **kwargs - ): - """ - :keyword health_evaluation: Represents a health evaluation which describes the data and the - algorithm used by health manager to evaluate the health of an entity. - :paramtype health_evaluation: ~azure.servicefabric.models.HealthEvaluation - """ - super(HealthEvaluationWrapper, self).__init__(**kwargs) - self.health_evaluation = health_evaluation - - -class HealthInformation(msrest.serialization.Model): - """Represents common health report information. It is included in all health reports sent to health store and in all health events returned by health queries. - - All required parameters must be populated in order to send to Azure. - - :ivar source_id: Required. The source name that identifies the client/watchdog/system component - that generated the health information. - :vartype source_id: str - :ivar property: Required. The property of the health information. An entity can have health - reports for different properties. - The property is a string and not a fixed enumeration to allow the reporter flexibility to - categorize the state condition that triggers the report. - For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available - disk on a node, - so it can report "AvailableDisk" property on that node. - The same reporter can monitor the node connectivity, so it can report a property - "Connectivity" on the same node. - In the health store, these reports are treated as separate health events for the specified - node. - - Together with the SourceId, the property uniquely identifies the health information. - :vartype property: str - :ivar health_state: Required. The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar time_to_live_in_milli_seconds: The duration for which this health report is valid. This - field uses ISO8601 format for specifying the duration. - When clients report periodically, they should send reports with higher frequency than time to - live. - If clients report on transition, they can set the time to live to infinite. - When time to live expires, the health event that contains the health information - is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if - RemoveWhenExpired false. - - If not specified, time to live defaults to infinite value. - :vartype time_to_live_in_milli_seconds: ~datetime.timedelta - :ivar description: The description of the health information. It represents free text used to - add human readable information about the report. - The maximum string length for the description is 4096 characters. - If the provided string is longer, it will be automatically truncated. - When truncated, the last characters of the description contain a marker "[Truncated]", and - total string size is 4096 characters. - The presence of the marker indicates to users that truncation occurred. - Note that when truncated, the description has less than 4096 characters from the original - string. - :vartype description: str - :ivar sequence_number: The sequence number for this health report as a numeric string. - The report sequence number is used by the health store to detect stale reports. - If not specified, a sequence number is auto-generated by the health client when a report is - added. - :vartype sequence_number: str - :ivar remove_when_expired: Value that indicates whether the report is removed from health store - when it expires. - If set to true, the report is removed from the health store after it expires. - If set to false, the report is treated as an error when expired. The value of this property is - false by default. - When clients report periodically, they should set RemoveWhenExpired false (default). - This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated - at error when the health report expires. - This flags the entity as being in Error health state. - :vartype remove_when_expired: bool - :ivar health_report_id: A health report ID which identifies the health report and can be used - to find more detailed information about a specific health event at - aka.ms/sfhealthid. - :vartype health_report_id: str - """ - - _validation = { - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - } - - _attribute_map = { - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, - } - - def __init__( - self, - *, - source_id: str, - property: str, - health_state: Union[str, "HealthState"], - time_to_live_in_milli_seconds: Optional[datetime.timedelta] = None, - description: Optional[str] = None, - sequence_number: Optional[str] = None, - remove_when_expired: Optional[bool] = None, - health_report_id: Optional[str] = None, - **kwargs - ): - """ - :keyword source_id: Required. The source name that identifies the client/watchdog/system - component that generated the health information. - :paramtype source_id: str - :keyword property: Required. The property of the health information. An entity can have health - reports for different properties. - The property is a string and not a fixed enumeration to allow the reporter flexibility to - categorize the state condition that triggers the report. - For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available - disk on a node, - so it can report "AvailableDisk" property on that node. - The same reporter can monitor the node connectivity, so it can report a property - "Connectivity" on the same node. - In the health store, these reports are treated as separate health events for the specified - node. - - Together with the SourceId, the property uniquely identifies the health information. - :paramtype property: str - :keyword health_state: Required. The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword time_to_live_in_milli_seconds: The duration for which this health report is valid. - This field uses ISO8601 format for specifying the duration. - When clients report periodically, they should send reports with higher frequency than time to - live. - If clients report on transition, they can set the time to live to infinite. - When time to live expires, the health event that contains the health information - is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if - RemoveWhenExpired false. - - If not specified, time to live defaults to infinite value. - :paramtype time_to_live_in_milli_seconds: ~datetime.timedelta - :keyword description: The description of the health information. It represents free text used - to add human readable information about the report. - The maximum string length for the description is 4096 characters. - If the provided string is longer, it will be automatically truncated. - When truncated, the last characters of the description contain a marker "[Truncated]", and - total string size is 4096 characters. - The presence of the marker indicates to users that truncation occurred. - Note that when truncated, the description has less than 4096 characters from the original - string. - :paramtype description: str - :keyword sequence_number: The sequence number for this health report as a numeric string. - The report sequence number is used by the health store to detect stale reports. - If not specified, a sequence number is auto-generated by the health client when a report is - added. - :paramtype sequence_number: str - :keyword remove_when_expired: Value that indicates whether the report is removed from health - store when it expires. - If set to true, the report is removed from the health store after it expires. - If set to false, the report is treated as an error when expired. The value of this property is - false by default. - When clients report periodically, they should set RemoveWhenExpired false (default). - This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated - at error when the health report expires. - This flags the entity as being in Error health state. - :paramtype remove_when_expired: bool - :keyword health_report_id: A health report ID which identifies the health report and can be - used to find more detailed information about a specific health event at - aka.ms/sfhealthid. - :paramtype health_report_id: str - """ - super(HealthInformation, self).__init__(**kwargs) - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_in_milli_seconds = time_to_live_in_milli_seconds - self.description = description - self.sequence_number = sequence_number - self.remove_when_expired = remove_when_expired - self.health_report_id = health_report_id - - -class HealthEvent(HealthInformation): - """Represents health information reported on a health entity, such as cluster, application or node, with additional metadata added by the Health Manager. - - All required parameters must be populated in order to send to Azure. - - :ivar source_id: Required. The source name that identifies the client/watchdog/system component - that generated the health information. - :vartype source_id: str - :ivar property: Required. The property of the health information. An entity can have health - reports for different properties. - The property is a string and not a fixed enumeration to allow the reporter flexibility to - categorize the state condition that triggers the report. - For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available - disk on a node, - so it can report "AvailableDisk" property on that node. - The same reporter can monitor the node connectivity, so it can report a property - "Connectivity" on the same node. - In the health store, these reports are treated as separate health events for the specified - node. - - Together with the SourceId, the property uniquely identifies the health information. - :vartype property: str - :ivar health_state: Required. The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar time_to_live_in_milli_seconds: The duration for which this health report is valid. This - field uses ISO8601 format for specifying the duration. - When clients report periodically, they should send reports with higher frequency than time to - live. - If clients report on transition, they can set the time to live to infinite. - When time to live expires, the health event that contains the health information - is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if - RemoveWhenExpired false. - - If not specified, time to live defaults to infinite value. - :vartype time_to_live_in_milli_seconds: ~datetime.timedelta - :ivar description: The description of the health information. It represents free text used to - add human readable information about the report. - The maximum string length for the description is 4096 characters. - If the provided string is longer, it will be automatically truncated. - When truncated, the last characters of the description contain a marker "[Truncated]", and - total string size is 4096 characters. - The presence of the marker indicates to users that truncation occurred. - Note that when truncated, the description has less than 4096 characters from the original - string. - :vartype description: str - :ivar sequence_number: The sequence number for this health report as a numeric string. - The report sequence number is used by the health store to detect stale reports. - If not specified, a sequence number is auto-generated by the health client when a report is - added. - :vartype sequence_number: str - :ivar remove_when_expired: Value that indicates whether the report is removed from health store - when it expires. - If set to true, the report is removed from the health store after it expires. - If set to false, the report is treated as an error when expired. The value of this property is - false by default. - When clients report periodically, they should set RemoveWhenExpired false (default). - This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated - at error when the health report expires. - This flags the entity as being in Error health state. - :vartype remove_when_expired: bool - :ivar health_report_id: A health report ID which identifies the health report and can be used - to find more detailed information about a specific health event at - aka.ms/sfhealthid. - :vartype health_report_id: str - :ivar is_expired: Returns true if the health event is expired, otherwise false. - :vartype is_expired: bool - :ivar source_utc_timestamp: The date and time when the health report was sent by the source. - :vartype source_utc_timestamp: ~datetime.datetime - :ivar last_modified_utc_timestamp: The date and time when the health report was last modified - by the health store. - :vartype last_modified_utc_timestamp: ~datetime.datetime - :ivar last_ok_transition_at: If the current health state is 'Ok', this property returns the - time at which the health report was first reported with 'Ok'. - For periodic reporting, many reports with the same state may have been generated. - This property returns the date and time when the first 'Ok' health report was received. - - If the current health state is 'Error' or 'Warning', returns the date and time at which the - health state was last in 'Ok', before transitioning to a different state. - - If the health state was never 'Ok', the value will be zero date-time. - :vartype last_ok_transition_at: ~datetime.datetime - :ivar last_warning_transition_at: If the current health state is 'Warning', this property - returns the time at which the health report was first reported with 'Warning'. For periodic - reporting, many reports with the same state may have been generated however, this property - returns only the date and time at the first 'Warning' health report was received. - - If the current health state is 'Ok' or 'Error', returns the date and time at which the health - state was last in 'Warning', before transitioning to a different state. - - If the health state was never 'Warning', the value will be zero date-time. - :vartype last_warning_transition_at: ~datetime.datetime - :ivar last_error_transition_at: If the current health state is 'Error', this property returns - the time at which the health report was first reported with 'Error'. For periodic reporting, - many reports with the same state may have been generated however, this property returns only - the date and time at the first 'Error' health report was received. - - If the current health state is 'Ok' or 'Warning', returns the date and time at which the - health state was last in 'Error', before transitioning to a different state. - - If the health state was never 'Error', the value will be zero date-time. - :vartype last_error_transition_at: ~datetime.datetime - """ - - _validation = { - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - } - - _attribute_map = { - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_in_milli_seconds': {'key': 'TimeToLiveInMilliSeconds', 'type': 'duration'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'health_report_id': {'key': 'HealthReportId', 'type': 'str'}, - 'is_expired': {'key': 'IsExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, - 'last_ok_transition_at': {'key': 'LastOkTransitionAt', 'type': 'iso-8601'}, - 'last_warning_transition_at': {'key': 'LastWarningTransitionAt', 'type': 'iso-8601'}, - 'last_error_transition_at': {'key': 'LastErrorTransitionAt', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - source_id: str, - property: str, - health_state: Union[str, "HealthState"], - time_to_live_in_milli_seconds: Optional[datetime.timedelta] = None, - description: Optional[str] = None, - sequence_number: Optional[str] = None, - remove_when_expired: Optional[bool] = None, - health_report_id: Optional[str] = None, - is_expired: Optional[bool] = None, - source_utc_timestamp: Optional[datetime.datetime] = None, - last_modified_utc_timestamp: Optional[datetime.datetime] = None, - last_ok_transition_at: Optional[datetime.datetime] = None, - last_warning_transition_at: Optional[datetime.datetime] = None, - last_error_transition_at: Optional[datetime.datetime] = None, - **kwargs - ): - """ - :keyword source_id: Required. The source name that identifies the client/watchdog/system - component that generated the health information. - :paramtype source_id: str - :keyword property: Required. The property of the health information. An entity can have health - reports for different properties. - The property is a string and not a fixed enumeration to allow the reporter flexibility to - categorize the state condition that triggers the report. - For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available - disk on a node, - so it can report "AvailableDisk" property on that node. - The same reporter can monitor the node connectivity, so it can report a property - "Connectivity" on the same node. - In the health store, these reports are treated as separate health events for the specified - node. - - Together with the SourceId, the property uniquely identifies the health information. - :paramtype property: str - :keyword health_state: Required. The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword time_to_live_in_milli_seconds: The duration for which this health report is valid. - This field uses ISO8601 format for specifying the duration. - When clients report periodically, they should send reports with higher frequency than time to - live. - If clients report on transition, they can set the time to live to infinite. - When time to live expires, the health event that contains the health information - is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if - RemoveWhenExpired false. - - If not specified, time to live defaults to infinite value. - :paramtype time_to_live_in_milli_seconds: ~datetime.timedelta - :keyword description: The description of the health information. It represents free text used - to add human readable information about the report. - The maximum string length for the description is 4096 characters. - If the provided string is longer, it will be automatically truncated. - When truncated, the last characters of the description contain a marker "[Truncated]", and - total string size is 4096 characters. - The presence of the marker indicates to users that truncation occurred. - Note that when truncated, the description has less than 4096 characters from the original - string. - :paramtype description: str - :keyword sequence_number: The sequence number for this health report as a numeric string. - The report sequence number is used by the health store to detect stale reports. - If not specified, a sequence number is auto-generated by the health client when a report is - added. - :paramtype sequence_number: str - :keyword remove_when_expired: Value that indicates whether the report is removed from health - store when it expires. - If set to true, the report is removed from the health store after it expires. - If set to false, the report is treated as an error when expired. The value of this property is - false by default. - When clients report periodically, they should set RemoveWhenExpired false (default). - This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated - at error when the health report expires. - This flags the entity as being in Error health state. - :paramtype remove_when_expired: bool - :keyword health_report_id: A health report ID which identifies the health report and can be - used to find more detailed information about a specific health event at - aka.ms/sfhealthid. - :paramtype health_report_id: str - :keyword is_expired: Returns true if the health event is expired, otherwise false. - :paramtype is_expired: bool - :keyword source_utc_timestamp: The date and time when the health report was sent by the source. - :paramtype source_utc_timestamp: ~datetime.datetime - :keyword last_modified_utc_timestamp: The date and time when the health report was last - modified by the health store. - :paramtype last_modified_utc_timestamp: ~datetime.datetime - :keyword last_ok_transition_at: If the current health state is 'Ok', this property returns the - time at which the health report was first reported with 'Ok'. - For periodic reporting, many reports with the same state may have been generated. - This property returns the date and time when the first 'Ok' health report was received. - - If the current health state is 'Error' or 'Warning', returns the date and time at which the - health state was last in 'Ok', before transitioning to a different state. - - If the health state was never 'Ok', the value will be zero date-time. - :paramtype last_ok_transition_at: ~datetime.datetime - :keyword last_warning_transition_at: If the current health state is 'Warning', this property - returns the time at which the health report was first reported with 'Warning'. For periodic - reporting, many reports with the same state may have been generated however, this property - returns only the date and time at the first 'Warning' health report was received. - - If the current health state is 'Ok' or 'Error', returns the date and time at which the health - state was last in 'Warning', before transitioning to a different state. - - If the health state was never 'Warning', the value will be zero date-time. - :paramtype last_warning_transition_at: ~datetime.datetime - :keyword last_error_transition_at: If the current health state is 'Error', this property - returns the time at which the health report was first reported with 'Error'. For periodic - reporting, many reports with the same state may have been generated however, this property - returns only the date and time at the first 'Error' health report was received. - - If the current health state is 'Ok' or 'Warning', returns the date and time at which the - health state was last in 'Error', before transitioning to a different state. - - If the health state was never 'Error', the value will be zero date-time. - :paramtype last_error_transition_at: ~datetime.datetime - """ - super(HealthEvent, self).__init__(source_id=source_id, property=property, health_state=health_state, time_to_live_in_milli_seconds=time_to_live_in_milli_seconds, description=description, sequence_number=sequence_number, remove_when_expired=remove_when_expired, health_report_id=health_report_id, **kwargs) - self.is_expired = is_expired - self.source_utc_timestamp = source_utc_timestamp - self.last_modified_utc_timestamp = last_modified_utc_timestamp - self.last_ok_transition_at = last_ok_transition_at - self.last_warning_transition_at = last_warning_transition_at - self.last_error_transition_at = last_error_transition_at - - -class HealthStateCount(msrest.serialization.Model): - """Represents information about how many health entities are in Ok, Warning and Error health state. - - :ivar ok_count: The number of health entities with aggregated health state Ok. - :vartype ok_count: long - :ivar warning_count: The number of health entities with aggregated health state Warning. - :vartype warning_count: long - :ivar error_count: The number of health entities with aggregated health state Error. - :vartype error_count: long - """ - - _validation = { - 'ok_count': {'minimum': 0}, - 'warning_count': {'minimum': 0}, - 'error_count': {'minimum': 0}, - } - - _attribute_map = { - 'ok_count': {'key': 'OkCount', 'type': 'long'}, - 'warning_count': {'key': 'WarningCount', 'type': 'long'}, - 'error_count': {'key': 'ErrorCount', 'type': 'long'}, - } - - def __init__( - self, - *, - ok_count: Optional[int] = None, - warning_count: Optional[int] = None, - error_count: Optional[int] = None, - **kwargs - ): - """ - :keyword ok_count: The number of health entities with aggregated health state Ok. - :paramtype ok_count: long - :keyword warning_count: The number of health entities with aggregated health state Warning. - :paramtype warning_count: long - :keyword error_count: The number of health entities with aggregated health state Error. - :paramtype error_count: long - """ - super(HealthStateCount, self).__init__(**kwargs) - self.ok_count = ok_count - self.warning_count = warning_count - self.error_count = error_count - - -class HealthStatistics(msrest.serialization.Model): - """The health statistics of an entity, returned as part of the health query result when the query description is configured to include statistics. -The statistics include health state counts for all children types of the current entity. -For example, for cluster, the health statistics include health state counts for nodes, applications, services, partitions, replicas, deployed applications and deployed service packages. -For partition, the health statistics include health counts for replicas. - - :ivar health_state_count_list: List of health state counts per entity kind, which keeps track - of how many children of the queried entity are in Ok, Warning and Error state. - :vartype health_state_count_list: list[~azure.servicefabric.models.EntityKindHealthStateCount] - """ - - _attribute_map = { - 'health_state_count_list': {'key': 'HealthStateCountList', 'type': '[EntityKindHealthStateCount]'}, - } - - def __init__( - self, - *, - health_state_count_list: Optional[List["EntityKindHealthStateCount"]] = None, - **kwargs - ): - """ - :keyword health_state_count_list: List of health state counts per entity kind, which keeps - track of how many children of the queried entity are in Ok, Warning and Error state. - :paramtype health_state_count_list: - list[~azure.servicefabric.models.EntityKindHealthStateCount] - """ - super(HealthStatistics, self).__init__(**kwargs) - self.health_state_count_list = health_state_count_list - - -class HttpConfig(msrest.serialization.Model): - """Describes the http configuration for external connectivity for this network. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. http gateway config name. - :vartype name: str - :ivar port: Required. Specifies the port at which the service endpoint below needs to be - exposed. - :vartype port: int - :ivar hosts: Required. description for routing. - :vartype hosts: list[~azure.servicefabric.models.HttpHostConfig] - """ - - _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'hosts': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'hosts': {'key': 'hosts', 'type': '[HttpHostConfig]'}, - } - - def __init__( - self, - *, - name: str, - port: int, - hosts: List["HttpHostConfig"], - **kwargs - ): - """ - :keyword name: Required. http gateway config name. - :paramtype name: str - :keyword port: Required. Specifies the port at which the service endpoint below needs to be - exposed. - :paramtype port: int - :keyword hosts: Required. description for routing. - :paramtype hosts: list[~azure.servicefabric.models.HttpHostConfig] - """ - super(HttpConfig, self).__init__(**kwargs) - self.name = name - self.port = port - self.hosts = hosts - - -class HttpHostConfig(msrest.serialization.Model): - """Describes the hostname properties for http routing. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. http hostname config name. - :vartype name: str - :ivar routes: Required. Route information to use for routing. Routes are processed in the order - they are specified. Specify routes that are more specific before routes that can handle general - cases. - :vartype routes: list[~azure.servicefabric.models.HttpRouteConfig] - """ - - _validation = { - 'name': {'required': True}, - 'routes': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'routes': {'key': 'routes', 'type': '[HttpRouteConfig]'}, - } - - def __init__( - self, - *, - name: str, - routes: List["HttpRouteConfig"], - **kwargs - ): - """ - :keyword name: Required. http hostname config name. - :paramtype name: str - :keyword routes: Required. Route information to use for routing. Routes are processed in the - order they are specified. Specify routes that are more specific before routes that can handle - general cases. - :paramtype routes: list[~azure.servicefabric.models.HttpRouteConfig] - """ - super(HttpHostConfig, self).__init__(**kwargs) - self.name = name - self.routes = routes - - -class HttpRouteConfig(msrest.serialization.Model): - """Describes the hostname properties for http routing. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. http route name. - :vartype name: str - :ivar match: Required. Describes a rule for http route matching. - :vartype match: ~azure.servicefabric.models.HttpRouteMatchRule - :ivar destination: Required. Describes destination endpoint for routing traffic. - :vartype destination: ~azure.servicefabric.models.GatewayDestination - """ - - _validation = { - 'name': {'required': True}, - 'match': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'match': {'key': 'match', 'type': 'HttpRouteMatchRule'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, - } - - def __init__( - self, - *, - name: str, - match: "HttpRouteMatchRule", - destination: "GatewayDestination", - **kwargs - ): - """ - :keyword name: Required. http route name. - :paramtype name: str - :keyword match: Required. Describes a rule for http route matching. - :paramtype match: ~azure.servicefabric.models.HttpRouteMatchRule - :keyword destination: Required. Describes destination endpoint for routing traffic. - :paramtype destination: ~azure.servicefabric.models.GatewayDestination - """ - super(HttpRouteConfig, self).__init__(**kwargs) - self.name = name - self.match = match - self.destination = destination - - -class HttpRouteMatchHeader(msrest.serialization.Model): - """Describes header information for http route matching. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of header to match in request. - :vartype name: str - :ivar value: Value of header to match in request. - :vartype value: str - :ivar type: how to match header value. Possible values include: "exact". - :vartype type: str or ~azure.servicefabric.models.HeaderMatchType - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - *, - name: str, - value: Optional[str] = None, - type: Optional[Union[str, "HeaderMatchType"]] = None, - **kwargs - ): - """ - :keyword name: Required. Name of header to match in request. - :paramtype name: str - :keyword value: Value of header to match in request. - :paramtype value: str - :keyword type: how to match header value. Possible values include: "exact". - :paramtype type: str or ~azure.servicefabric.models.HeaderMatchType - """ - super(HttpRouteMatchHeader, self).__init__(**kwargs) - self.name = name - self.value = value - self.type = type - - -class HttpRouteMatchPath(msrest.serialization.Model): - """Path to match for routing. - - All required parameters must be populated in order to send to Azure. - - :ivar value: Required. Uri path to match for request. - :vartype value: str - :ivar rewrite: replacement string for matched part of the Uri. - :vartype rewrite: str - :ivar type: Required. how to match value in the Uri. Possible values include: "prefix". - :vartype type: str or ~azure.servicefabric.models.PathMatchType - """ - - _validation = { - 'value': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'rewrite': {'key': 'rewrite', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - *, - value: str, - type: Union[str, "PathMatchType"], - rewrite: Optional[str] = None, - **kwargs - ): - """ - :keyword value: Required. Uri path to match for request. - :paramtype value: str - :keyword rewrite: replacement string for matched part of the Uri. - :paramtype rewrite: str - :keyword type: Required. how to match value in the Uri. Possible values include: "prefix". - :paramtype type: str or ~azure.servicefabric.models.PathMatchType - """ - super(HttpRouteMatchPath, self).__init__(**kwargs) - self.value = value - self.rewrite = rewrite - self.type = type - - -class HttpRouteMatchRule(msrest.serialization.Model): - """Describes a rule for http route matching. - - All required parameters must be populated in order to send to Azure. - - :ivar path: Required. Path to match for routing. - :vartype path: ~azure.servicefabric.models.HttpRouteMatchPath - :ivar headers: headers and their values to match in request. - :vartype headers: list[~azure.servicefabric.models.HttpRouteMatchHeader] - """ - - _validation = { - 'path': {'required': True}, - } - - _attribute_map = { - 'path': {'key': 'path', 'type': 'HttpRouteMatchPath'}, - 'headers': {'key': 'headers', 'type': '[HttpRouteMatchHeader]'}, - } - - def __init__( - self, - *, - path: "HttpRouteMatchPath", - headers: Optional[List["HttpRouteMatchHeader"]] = None, - **kwargs - ): - """ - :keyword path: Required. Path to match for routing. - :paramtype path: ~azure.servicefabric.models.HttpRouteMatchPath - :keyword headers: headers and their values to match in request. - :paramtype headers: list[~azure.servicefabric.models.HttpRouteMatchHeader] - """ - super(HttpRouteMatchRule, self).__init__(**kwargs) - self.path = path - self.headers = headers - - -class IdentityDescription(msrest.serialization.Model): - """Information describing the identities associated with this application. - - All required parameters must be populated in order to send to Azure. - - :ivar token_service_endpoint: the endpoint for the token service managing this identity. - :vartype token_service_endpoint: str - :ivar type: Required. the types of identities associated with this resource; currently - restricted to 'SystemAssigned and UserAssigned'. - :vartype type: str - :ivar tenant_id: the identifier of the tenant containing the application's identity. - :vartype tenant_id: str - :ivar principal_id: the object identifier of the Service Principal of the identity associated - with this resource. - :vartype principal_id: str - :ivar user_assigned_identities: represents user assigned identities map. - :vartype user_assigned_identities: dict[str, - ~azure.servicefabric.models.IdentityItemDescription] - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'token_service_endpoint': {'key': 'tokenServiceEndpoint', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{IdentityItemDescription}'}, - } - - def __init__( - self, - *, - type: str, - token_service_endpoint: Optional[str] = None, - tenant_id: Optional[str] = None, - principal_id: Optional[str] = None, - user_assigned_identities: Optional[Dict[str, "IdentityItemDescription"]] = None, - **kwargs - ): - """ - :keyword token_service_endpoint: the endpoint for the token service managing this identity. - :paramtype token_service_endpoint: str - :keyword type: Required. the types of identities associated with this resource; currently - restricted to 'SystemAssigned and UserAssigned'. - :paramtype type: str - :keyword tenant_id: the identifier of the tenant containing the application's identity. - :paramtype tenant_id: str - :keyword principal_id: the object identifier of the Service Principal of the identity - associated with this resource. - :paramtype principal_id: str - :keyword user_assigned_identities: represents user assigned identities map. - :paramtype user_assigned_identities: dict[str, - ~azure.servicefabric.models.IdentityItemDescription] - """ - super(IdentityDescription, self).__init__(**kwargs) - self.token_service_endpoint = token_service_endpoint - self.type = type - self.tenant_id = tenant_id - self.principal_id = principal_id - self.user_assigned_identities = user_assigned_identities - - -class IdentityItemDescription(msrest.serialization.Model): - """Describes a single user-assigned identity associated with the application. - - :ivar principal_id: the object identifier of the Service Principal which this identity - represents. - :vartype principal_id: str - :ivar client_id: the client identifier of the Service Principal which this identity represents. - :vartype client_id: str - """ - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__( - self, - *, - principal_id: Optional[str] = None, - client_id: Optional[str] = None, - **kwargs - ): - """ - :keyword principal_id: the object identifier of the Service Principal which this identity - represents. - :paramtype principal_id: str - :keyword client_id: the client identifier of the Service Principal which this identity - represents. - :paramtype client_id: str - """ - super(IdentityItemDescription, self).__init__(**kwargs) - self.principal_id = principal_id - self.client_id = client_id - - -class ImageRegistryCredential(msrest.serialization.Model): - """Image registry credential. - - All required parameters must be populated in order to send to Azure. - - :ivar server: Required. Docker image registry server, without protocol such as ``http`` and - ``https``. - :vartype server: str - :ivar username: Required. The username for the private registry. - :vartype username: str - :ivar password_type: The type of the image registry password being given in password. Possible - values include: "ClearText", "KeyVaultReference", "SecretValueReference". Default value: - "ClearText". - :vartype password_type: str or ~azure.servicefabric.models.ImageRegistryPasswordType - :ivar password: The password for the private registry. The password is required for create or - update operations, however it is not returned in the get or list operations. Will be processed - based on the type provided. - :vartype password: str - """ - - _validation = { - 'server': {'required': True}, - 'username': {'required': True}, - } - - _attribute_map = { - 'server': {'key': 'server', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password_type': {'key': 'passwordType', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__( - self, - *, - server: str, - username: str, - password_type: Optional[Union[str, "ImageRegistryPasswordType"]] = "ClearText", - password: Optional[str] = None, - **kwargs - ): - """ - :keyword server: Required. Docker image registry server, without protocol such as ``http`` and - ``https``. - :paramtype server: str - :keyword username: Required. The username for the private registry. - :paramtype username: str - :keyword password_type: The type of the image registry password being given in password. - Possible values include: "ClearText", "KeyVaultReference", "SecretValueReference". Default - value: "ClearText". - :paramtype password_type: str or ~azure.servicefabric.models.ImageRegistryPasswordType - :keyword password: The password for the private registry. The password is required for create - or update operations, however it is not returned in the get or list operations. Will be - processed based on the type provided. - :paramtype password: str - """ - super(ImageRegistryCredential, self).__init__(**kwargs) - self.server = server - self.username = username - self.password_type = password_type - self.password = password - - -class ImageStoreContent(msrest.serialization.Model): - """Information about the image store content. - - :ivar store_files: The list of image store file info objects represents files found under the - given image store relative path. - :vartype store_files: list[~azure.servicefabric.models.FileInfo] - :ivar store_folders: The list of image store folder info objects represents subfolders found - under the given image store relative path. - :vartype store_folders: list[~azure.servicefabric.models.FolderInfo] - """ - - _attribute_map = { - 'store_files': {'key': 'StoreFiles', 'type': '[FileInfo]'}, - 'store_folders': {'key': 'StoreFolders', 'type': '[FolderInfo]'}, - } - - def __init__( - self, - *, - store_files: Optional[List["FileInfo"]] = None, - store_folders: Optional[List["FolderInfo"]] = None, - **kwargs - ): - """ - :keyword store_files: The list of image store file info objects represents files found under - the given image store relative path. - :paramtype store_files: list[~azure.servicefabric.models.FileInfo] - :keyword store_folders: The list of image store folder info objects represents subfolders found - under the given image store relative path. - :paramtype store_folders: list[~azure.servicefabric.models.FolderInfo] - """ - super(ImageStoreContent, self).__init__(**kwargs) - self.store_files = store_files - self.store_folders = store_folders - - -class ImageStoreCopyDescription(msrest.serialization.Model): - """Information about how to copy image store content from one image store relative path to another image store relative path. - - All required parameters must be populated in order to send to Azure. - - :ivar remote_source: Required. The relative path of source image store content to be copied - from. - :vartype remote_source: str - :ivar remote_destination: Required. The relative path of destination image store content to be - copied to. - :vartype remote_destination: str - :ivar skip_files: The list of the file names to be skipped for copying. - :vartype skip_files: list[str] - :ivar check_mark_file: Indicates whether to check mark file during copying. The property is - true if checking mark file is required, false otherwise. The mark file is used to check whether - the folder is well constructed. If the property is true and mark file does not exist, the copy - is skipped. - :vartype check_mark_file: bool - """ - - _validation = { - 'remote_source': {'required': True}, - 'remote_destination': {'required': True}, - } - - _attribute_map = { - 'remote_source': {'key': 'RemoteSource', 'type': 'str'}, - 'remote_destination': {'key': 'RemoteDestination', 'type': 'str'}, - 'skip_files': {'key': 'SkipFiles', 'type': '[str]'}, - 'check_mark_file': {'key': 'CheckMarkFile', 'type': 'bool'}, - } - - def __init__( - self, - *, - remote_source: str, - remote_destination: str, - skip_files: Optional[List[str]] = None, - check_mark_file: Optional[bool] = None, - **kwargs - ): - """ - :keyword remote_source: Required. The relative path of source image store content to be copied - from. - :paramtype remote_source: str - :keyword remote_destination: Required. The relative path of destination image store content to - be copied to. - :paramtype remote_destination: str - :keyword skip_files: The list of the file names to be skipped for copying. - :paramtype skip_files: list[str] - :keyword check_mark_file: Indicates whether to check mark file during copying. The property is - true if checking mark file is required, false otherwise. The mark file is used to check whether - the folder is well constructed. If the property is true and mark file does not exist, the copy - is skipped. - :paramtype check_mark_file: bool - """ - super(ImageStoreCopyDescription, self).__init__(**kwargs) - self.remote_source = remote_source - self.remote_destination = remote_destination - self.skip_files = skip_files - self.check_mark_file = check_mark_file - - -class ImageStoreInfo(msrest.serialization.Model): - """Information about the ImageStore's resource usage. - - :ivar disk_info: disk capacity and available disk space on the node where the ImageStore - primary is placed. - :vartype disk_info: ~azure.servicefabric.models.DiskInfo - :ivar used_by_metadata: the ImageStore's file system usage for metadata. - :vartype used_by_metadata: ~azure.servicefabric.models.UsageInfo - :ivar used_by_staging: The ImageStore's file system usage for staging files that are being - uploaded. - :vartype used_by_staging: ~azure.servicefabric.models.UsageInfo - :ivar used_by_copy: the ImageStore's file system usage for copied application and cluster - packages. `Removing application and cluster packages - `_ will - free up this space. - :vartype used_by_copy: ~azure.servicefabric.models.UsageInfo - :ivar used_by_register: the ImageStore's file system usage for registered and cluster packages. - `Unregistering application - `_ - and `cluster packages - `_ - will free up this space. - :vartype used_by_register: ~azure.servicefabric.models.UsageInfo - """ - - _attribute_map = { - 'disk_info': {'key': 'DiskInfo', 'type': 'DiskInfo'}, - 'used_by_metadata': {'key': 'UsedByMetadata', 'type': 'UsageInfo'}, - 'used_by_staging': {'key': 'UsedByStaging', 'type': 'UsageInfo'}, - 'used_by_copy': {'key': 'UsedByCopy', 'type': 'UsageInfo'}, - 'used_by_register': {'key': 'UsedByRegister', 'type': 'UsageInfo'}, - } - - def __init__( - self, - *, - disk_info: Optional["DiskInfo"] = None, - used_by_metadata: Optional["UsageInfo"] = None, - used_by_staging: Optional["UsageInfo"] = None, - used_by_copy: Optional["UsageInfo"] = None, - used_by_register: Optional["UsageInfo"] = None, - **kwargs - ): - """ - :keyword disk_info: disk capacity and available disk space on the node where the ImageStore - primary is placed. - :paramtype disk_info: ~azure.servicefabric.models.DiskInfo - :keyword used_by_metadata: the ImageStore's file system usage for metadata. - :paramtype used_by_metadata: ~azure.servicefabric.models.UsageInfo - :keyword used_by_staging: The ImageStore's file system usage for staging files that are being - uploaded. - :paramtype used_by_staging: ~azure.servicefabric.models.UsageInfo - :keyword used_by_copy: the ImageStore's file system usage for copied application and cluster - packages. `Removing application and cluster packages - `_ will - free up this space. - :paramtype used_by_copy: ~azure.servicefabric.models.UsageInfo - :keyword used_by_register: the ImageStore's file system usage for registered and cluster - packages. `Unregistering application - `_ - and `cluster packages - `_ - will free up this space. - :paramtype used_by_register: ~azure.servicefabric.models.UsageInfo - """ - super(ImageStoreInfo, self).__init__(**kwargs) - self.disk_info = disk_info - self.used_by_metadata = used_by_metadata - self.used_by_staging = used_by_staging - self.used_by_copy = used_by_copy - self.used_by_register = used_by_register - - -class SecretResourcePropertiesBase(msrest.serialization.Model): - """This type describes the properties of a secret resource, including its kind. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SecretResourceProperties. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Describes the kind of secret.Constant filled by server. Possible values - include: "inlinedValue", "keyVaultVersionedReference". - :vartype kind: str or ~azure.servicefabric.models.SecretKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'SecretResourceProperties': 'SecretResourceProperties'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(SecretResourcePropertiesBase, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class SecretResourceProperties(SecretResourcePropertiesBase): - """Describes the properties of a secret resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: InlinedValueSecretResourceProperties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Describes the kind of secret.Constant filled by server. Possible values - include: "inlinedValue", "keyVaultVersionedReference". - :vartype kind: str or ~azure.servicefabric.models.SecretKind - :ivar description: User readable description of the secret. - :vartype description: str - :ivar status: Status of the resource. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the secret. - :vartype status_details: str - :ivar content_type: The type of the content stored in the secret value. The value of this - property is opaque to Service Fabric. Once set, the value of this property cannot be changed. - :vartype content_type: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'inlinedValue': 'InlinedValueSecretResourceProperties'} - } - - def __init__( - self, - *, - description: Optional[str] = None, - content_type: Optional[str] = None, - **kwargs - ): - """ - :keyword description: User readable description of the secret. - :paramtype description: str - :keyword content_type: The type of the content stored in the secret value. The value of this - property is opaque to Service Fabric. Once set, the value of this property cannot be changed. - :paramtype content_type: str - """ - super(SecretResourceProperties, self).__init__(**kwargs) - self.kind = 'SecretResourceProperties' # type: str - self.description = description - self.status = None - self.status_details = None - self.content_type = content_type - - -class InlinedValueSecretResourceProperties(SecretResourceProperties): - """Describes the properties of a secret resource whose value is provided explicitly as plaintext. The secret resource may have multiple values, each being uniquely versioned. The secret value of each version is stored encrypted, and delivered as plaintext into the context of applications referencing it. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Describes the kind of secret.Constant filled by server. Possible values - include: "inlinedValue", "keyVaultVersionedReference". - :vartype kind: str or ~azure.servicefabric.models.SecretKind - :ivar description: User readable description of the secret. - :vartype description: str - :ivar status: Status of the resource. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the secret. - :vartype status_details: str - :ivar content_type: The type of the content stored in the secret value. The value of this - property is opaque to Service Fabric. Once set, the value of this property cannot be changed. - :vartype content_type: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - content_type: Optional[str] = None, - **kwargs - ): - """ - :keyword description: User readable description of the secret. - :paramtype description: str - :keyword content_type: The type of the content stored in the secret value. The value of this - property is opaque to Service Fabric. Once set, the value of this property cannot be changed. - :paramtype content_type: str - """ - super(InlinedValueSecretResourceProperties, self).__init__(description=description, content_type=content_type, **kwargs) - self.kind = 'inlinedValue' # type: str - - -class InstanceLifecycleDescription(msrest.serialization.Model): - """Describes how the instance will behave. - - :ivar restore_replica_location_after_upgrade: If set to true, move/swap replica to original - location after upgrade. - :vartype restore_replica_location_after_upgrade: bool - """ - - _attribute_map = { - 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, - } - - def __init__( - self, - *, - restore_replica_location_after_upgrade: Optional[bool] = None, - **kwargs - ): - """ - :keyword restore_replica_location_after_upgrade: If set to true, move/swap replica to original - location after upgrade. - :paramtype restore_replica_location_after_upgrade: bool - """ - super(InstanceLifecycleDescription, self).__init__(**kwargs) - self.restore_replica_location_after_upgrade = restore_replica_location_after_upgrade - - -class Int64PropertyValue(PropertyValue): - """Describes a Service Fabric property value of type Int64. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property, determined by the type of data. Following are the - possible values.Constant filled by server. Possible values include: "Invalid", "Binary", - "Int64", "Double", "String", "Guid". - :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind - :ivar data: Required. The data of the property value. - :vartype data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__( - self, - *, - data: str, - **kwargs - ): - """ - :keyword data: Required. The data of the property value. - :paramtype data: str - """ - super(Int64PropertyValue, self).__init__(**kwargs) - self.kind = 'Int64' # type: str - self.data = data - - -class PartitionInformation(msrest.serialization.Model): - """Information about the partition identity, partitioning scheme and keys supported by it. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Int64RangePartitionInformation, NamedPartitionInformation, SingletonPartitionInformation. - - All required parameters must be populated in order to send to Azure. - - :ivar service_partition_kind: Required. The kind of partitioning scheme used to partition the - service.Constant filled by server. Possible values include: "Invalid", "Singleton", - "Int64Range", "Named". - :vartype service_partition_kind: str or ~azure.servicefabric.models.ServicePartitionKind - :ivar id: An internal ID used by Service Fabric to uniquely identify a partition. This is a - randomly generated GUID when the service was created. The partition ID is unique and does not - change for the lifetime of the service. If the same service was deleted and recreated the IDs - of its partitions would be different. - :vartype id: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'str'}, - } - - _subtype_map = { - 'service_partition_kind': {'Int64Range': 'Int64RangePartitionInformation', 'Named': 'NamedPartitionInformation', 'Singleton': 'SingletonPartitionInformation'} - } - - def __init__( - self, - *, - id: Optional[str] = None, - **kwargs - ): - """ - :keyword id: An internal ID used by Service Fabric to uniquely identify a partition. This is a - randomly generated GUID when the service was created. The partition ID is unique and does not - change for the lifetime of the service. If the same service was deleted and recreated the IDs - of its partitions would be different. - :paramtype id: str - """ - super(PartitionInformation, self).__init__(**kwargs) - self.service_partition_kind = None # type: Optional[str] - self.id = id - - -class Int64RangePartitionInformation(PartitionInformation): - """Describes the partition information for the integer range that is based on partition schemes. - - All required parameters must be populated in order to send to Azure. - - :ivar service_partition_kind: Required. The kind of partitioning scheme used to partition the - service.Constant filled by server. Possible values include: "Invalid", "Singleton", - "Int64Range", "Named". - :vartype service_partition_kind: str or ~azure.servicefabric.models.ServicePartitionKind - :ivar id: An internal ID used by Service Fabric to uniquely identify a partition. This is a - randomly generated GUID when the service was created. The partition ID is unique and does not - change for the lifetime of the service. If the same service was deleted and recreated the IDs - of its partitions would be different. - :vartype id: str - :ivar low_key: Specifies the minimum key value handled by this partition. - :vartype low_key: str - :ivar high_key: Specifies the maximum key value handled by this partition. - :vartype high_key: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'str'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - low_key: Optional[str] = None, - high_key: Optional[str] = None, - **kwargs - ): - """ - :keyword id: An internal ID used by Service Fabric to uniquely identify a partition. This is a - randomly generated GUID when the service was created. The partition ID is unique and does not - change for the lifetime of the service. If the same service was deleted and recreated the IDs - of its partitions would be different. - :paramtype id: str - :keyword low_key: Specifies the minimum key value handled by this partition. - :paramtype low_key: str - :keyword high_key: Specifies the maximum key value handled by this partition. - :paramtype high_key: str - """ - super(Int64RangePartitionInformation, self).__init__(id=id, **kwargs) - self.service_partition_kind = 'Int64Range' # type: str - self.low_key = low_key - self.high_key = high_key - - -class InvokeDataLossResult(msrest.serialization.Model): - """Represents information about an operation in a terminal state (Completed or Faulted). - - :ivar error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, - this is an error code indicating the reason. - :vartype error_code: int - :ivar selected_partition: This class returns information about the partition that the - user-induced operation acted upon. - :vartype selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__( - self, - *, - error_code: Optional[int] = None, - selected_partition: Optional["SelectedPartition"] = None, - **kwargs - ): - """ - :keyword error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, - this is an error code indicating the reason. - :paramtype error_code: int - :keyword selected_partition: This class returns information about the partition that the - user-induced operation acted upon. - :paramtype selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - super(InvokeDataLossResult, self).__init__(**kwargs) - self.error_code = error_code - self.selected_partition = selected_partition - - -class InvokeQuorumLossResult(msrest.serialization.Model): - """Represents information about an operation in a terminal state (Completed or Faulted). - - :ivar error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, - this is an error code indicating the reason. - :vartype error_code: int - :ivar selected_partition: This class returns information about the partition that the - user-induced operation acted upon. - :vartype selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__( - self, - *, - error_code: Optional[int] = None, - selected_partition: Optional["SelectedPartition"] = None, - **kwargs - ): - """ - :keyword error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, - this is an error code indicating the reason. - :paramtype error_code: int - :keyword selected_partition: This class returns information about the partition that the - user-induced operation acted upon. - :paramtype selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - super(InvokeQuorumLossResult, self).__init__(**kwargs) - self.error_code = error_code - self.selected_partition = selected_partition - - -class ReplicaStatusBase(msrest.serialization.Model): - """Information about the replica. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: KeyValueStoreReplicaStatus. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. - Possible values include: "Invalid", "KeyValueStore". - :vartype kind: str or ~azure.servicefabric.models.ReplicaKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'KeyValueStore': 'KeyValueStoreReplicaStatus'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ReplicaStatusBase, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class KeyValueStoreReplicaStatus(ReplicaStatusBase): - """Key value store related information for the replica. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. - Possible values include: "Invalid", "KeyValueStore". - :vartype kind: str or ~azure.servicefabric.models.ReplicaKind - :ivar database_row_count_estimate: Value indicating the estimated number of rows in the - underlying database. - :vartype database_row_count_estimate: str - :ivar database_logical_size_estimate: Value indicating the estimated size of the underlying - database. - :vartype database_logical_size_estimate: str - :ivar copy_notification_current_key_filter: Value indicating the latest key-prefix filter - applied to enumeration during the callback. Null if there is no pending callback. - :vartype copy_notification_current_key_filter: str - :ivar copy_notification_current_progress: Value indicating the latest number of keys enumerated - during the callback. 0 if there is no pending callback. - :vartype copy_notification_current_progress: str - :ivar status_details: Value indicating the current status details of the replica. - :vartype status_details: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'database_row_count_estimate': {'key': 'DatabaseRowCountEstimate', 'type': 'str'}, - 'database_logical_size_estimate': {'key': 'DatabaseLogicalSizeEstimate', 'type': 'str'}, - 'copy_notification_current_key_filter': {'key': 'CopyNotificationCurrentKeyFilter', 'type': 'str'}, - 'copy_notification_current_progress': {'key': 'CopyNotificationCurrentProgress', 'type': 'str'}, - 'status_details': {'key': 'StatusDetails', 'type': 'str'}, - } - - def __init__( - self, - *, - database_row_count_estimate: Optional[str] = None, - database_logical_size_estimate: Optional[str] = None, - copy_notification_current_key_filter: Optional[str] = None, - copy_notification_current_progress: Optional[str] = None, - status_details: Optional[str] = None, - **kwargs - ): - """ - :keyword database_row_count_estimate: Value indicating the estimated number of rows in the - underlying database. - :paramtype database_row_count_estimate: str - :keyword database_logical_size_estimate: Value indicating the estimated size of the underlying - database. - :paramtype database_logical_size_estimate: str - :keyword copy_notification_current_key_filter: Value indicating the latest key-prefix filter - applied to enumeration during the callback. Null if there is no pending callback. - :paramtype copy_notification_current_key_filter: str - :keyword copy_notification_current_progress: Value indicating the latest number of keys - enumerated during the callback. 0 if there is no pending callback. - :paramtype copy_notification_current_progress: str - :keyword status_details: Value indicating the current status details of the replica. - :paramtype status_details: str - """ - super(KeyValueStoreReplicaStatus, self).__init__(**kwargs) - self.kind = 'KeyValueStore' # type: str - self.database_row_count_estimate = database_row_count_estimate - self.database_logical_size_estimate = database_logical_size_estimate - self.copy_notification_current_key_filter = copy_notification_current_key_filter - self.copy_notification_current_progress = copy_notification_current_progress - self.status_details = status_details - - -class LoadedPartitionInformationQueryDescription(msrest.serialization.Model): - """Represents data structure that contains query information. - - :ivar metric_name: Name of the metric for which this information is provided. - :vartype metric_name: str - :ivar service_name: Name of the service this partition belongs to. - :vartype service_name: str - :ivar ordering: Ordering of partitions' load. Possible values include: "Desc", "Asc". - :vartype ordering: str or ~azure.servicefabric.models.Ordering - :ivar 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. - :vartype max_results: long - :ivar 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. - :vartype continuation_token: str - """ - - _attribute_map = { - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'ordering': {'key': 'Ordering', 'type': 'str'}, - 'max_results': {'key': 'MaxResults', 'type': 'long'}, - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - } - - def __init__( - self, - *, - metric_name: Optional[str] = None, - service_name: Optional[str] = None, - ordering: Optional[Union[str, "Ordering"]] = None, - max_results: Optional[int] = None, - continuation_token: Optional[str] = None, - **kwargs - ): - """ - :keyword metric_name: Name of the metric for which this information is provided. - :paramtype metric_name: str - :keyword service_name: Name of the service this partition belongs to. - :paramtype service_name: str - :keyword ordering: Ordering of partitions' load. Possible values include: "Desc", "Asc". - :paramtype ordering: str or ~azure.servicefabric.models.Ordering - :keyword 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. - :paramtype max_results: long - :keyword 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. - :paramtype continuation_token: str - """ - super(LoadedPartitionInformationQueryDescription, self).__init__(**kwargs) - self.metric_name = metric_name - self.service_name = service_name - self.ordering = ordering - self.max_results = max_results - self.continuation_token = continuation_token - - -class LoadedPartitionInformationResult(msrest.serialization.Model): - """Represents partition information. - - All required parameters must be populated in order to send to Azure. - - :ivar service_name: Required. Name of the service this partition belongs to. - :vartype service_name: str - :ivar partition_id: Required. Id of the partition. - :vartype partition_id: str - :ivar metric_name: Required. Name of the metric for which this information is provided. - :vartype metric_name: str - :ivar load: Required. Load for metric. - :vartype load: long - """ - - _validation = { - 'service_name': {'required': True}, - 'partition_id': {'required': True}, - 'metric_name': {'required': True}, - 'load': {'required': True}, - } - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'load': {'key': 'Load', 'type': 'long'}, - } - - def __init__( - self, - *, - service_name: str, - partition_id: str, - metric_name: str, - load: int, - **kwargs - ): - """ - :keyword service_name: Required. Name of the service this partition belongs to. - :paramtype service_name: str - :keyword partition_id: Required. Id of the partition. - :paramtype partition_id: str - :keyword metric_name: Required. Name of the metric for which this information is provided. - :paramtype metric_name: str - :keyword load: Required. Load for metric. - :paramtype load: long - """ - super(LoadedPartitionInformationResult, self).__init__(**kwargs) - self.service_name = service_name - self.partition_id = partition_id - self.metric_name = metric_name - self.load = load - - -class LoadedPartitionInformationResultList(msrest.serialization.Model): - """Represents data structure that contains top/least loaded partitions for a certain metric. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of application information. - :vartype items: list[~azure.servicefabric.models.LoadedPartitionInformationResult] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[LoadedPartitionInformationResult]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["LoadedPartitionInformationResult"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of application information. - :paramtype items: list[~azure.servicefabric.models.LoadedPartitionInformationResult] - """ - super(LoadedPartitionInformationResultList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class LoadMetricInformation(msrest.serialization.Model): - """Represents data structure that contains load information for a certain metric in a cluster. - - :ivar name: Name of the metric for which this load information is provided. - :vartype name: str - :ivar is_balanced_before: Value that indicates whether the metrics is balanced or not before - resource balancer run. - :vartype is_balanced_before: bool - :ivar is_balanced_after: Value that indicates whether the metrics is balanced or not after - resource balancer run. - :vartype is_balanced_after: bool - :ivar deviation_before: The standard average deviation of the metrics before resource balancer - run. - :vartype deviation_before: str - :ivar deviation_after: The standard average deviation of the metrics after resource balancer - run. - :vartype deviation_after: str - :ivar balancing_threshold: The balancing threshold for a certain metric. - :vartype balancing_threshold: str - :ivar action: The current action being taken with regard to this metric. - :vartype action: str - :ivar activity_threshold: The Activity Threshold specified for this metric in the system - Cluster Manifest. - :vartype activity_threshold: str - :ivar cluster_capacity: The total cluster capacity for a given metric. - :vartype cluster_capacity: str - :ivar cluster_load: The total cluster load. In future releases of Service Fabric this parameter - will be deprecated in favor of CurrentClusterLoad. - :vartype cluster_load: str - :ivar current_cluster_load: The total cluster load. - :vartype current_cluster_load: str - :ivar cluster_remaining_capacity: The remaining capacity for the metric in the cluster. In - future releases of Service Fabric this parameter will be deprecated in favor of - ClusterCapacityRemaining. - :vartype cluster_remaining_capacity: str - :ivar cluster_capacity_remaining: The remaining capacity for the metric in the cluster. - :vartype cluster_capacity_remaining: str - :ivar is_cluster_capacity_violation: Indicates that the metric is currently over capacity in - the cluster. - :vartype is_cluster_capacity_violation: bool - :ivar node_buffer_percentage: The reserved percentage of total node capacity for this metric. - :vartype node_buffer_percentage: str - :ivar cluster_buffered_capacity: Remaining capacity in the cluster excluding the reserved - space. In future releases of Service Fabric this parameter will be deprecated in favor of - BufferedClusterCapacityRemaining. - :vartype cluster_buffered_capacity: str - :ivar buffered_cluster_capacity_remaining: Remaining capacity in the cluster excluding the - reserved space. - :vartype buffered_cluster_capacity_remaining: str - :ivar cluster_remaining_buffered_capacity: The remaining percentage of cluster total capacity - for this metric. - :vartype cluster_remaining_buffered_capacity: str - :ivar min_node_load_value: The minimum load on any node for this metric. In future releases of - Service Fabric this parameter will be deprecated in favor of MinimumNodeLoad. - :vartype min_node_load_value: str - :ivar minimum_node_load: The minimum load on any node for this metric. - :vartype minimum_node_load: str - :ivar min_node_load_node_id: The node id of the node with the minimum load for this metric. - :vartype min_node_load_node_id: ~azure.servicefabric.models.NodeId - :ivar max_node_load_value: The maximum load on any node for this metric. In future releases of - Service Fabric this parameter will be deprecated in favor of MaximumNodeLoad. - :vartype max_node_load_value: str - :ivar maximum_node_load: The maximum load on any node for this metric. - :vartype maximum_node_load: str - :ivar max_node_load_node_id: The node id of the node with the maximum load for this metric. - :vartype max_node_load_node_id: ~azure.servicefabric.models.NodeId - :ivar planned_load_removal: This value represents the load of the replicas that are planned to - be removed in the future within the cluster. - This kind of load is reported for replicas that are currently being moving to other nodes and - for replicas that are currently being dropped but still use the load on the source node. - :vartype planned_load_removal: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'is_balanced_before': {'key': 'IsBalancedBefore', 'type': 'bool'}, - 'is_balanced_after': {'key': 'IsBalancedAfter', 'type': 'bool'}, - 'deviation_before': {'key': 'DeviationBefore', 'type': 'str'}, - 'deviation_after': {'key': 'DeviationAfter', 'type': 'str'}, - 'balancing_threshold': {'key': 'BalancingThreshold', 'type': 'str'}, - 'action': {'key': 'Action', 'type': 'str'}, - 'activity_threshold': {'key': 'ActivityThreshold', 'type': 'str'}, - 'cluster_capacity': {'key': 'ClusterCapacity', 'type': 'str'}, - 'cluster_load': {'key': 'ClusterLoad', 'type': 'str'}, - 'current_cluster_load': {'key': 'CurrentClusterLoad', 'type': 'str'}, - 'cluster_remaining_capacity': {'key': 'ClusterRemainingCapacity', 'type': 'str'}, - 'cluster_capacity_remaining': {'key': 'ClusterCapacityRemaining', 'type': 'str'}, - 'is_cluster_capacity_violation': {'key': 'IsClusterCapacityViolation', 'type': 'bool'}, - 'node_buffer_percentage': {'key': 'NodeBufferPercentage', 'type': 'str'}, - 'cluster_buffered_capacity': {'key': 'ClusterBufferedCapacity', 'type': 'str'}, - 'buffered_cluster_capacity_remaining': {'key': 'BufferedClusterCapacityRemaining', 'type': 'str'}, - 'cluster_remaining_buffered_capacity': {'key': 'ClusterRemainingBufferedCapacity', 'type': 'str'}, - 'min_node_load_value': {'key': 'MinNodeLoadValue', 'type': 'str'}, - 'minimum_node_load': {'key': 'MinimumNodeLoad', 'type': 'str'}, - 'min_node_load_node_id': {'key': 'MinNodeLoadNodeId', 'type': 'NodeId'}, - 'max_node_load_value': {'key': 'MaxNodeLoadValue', 'type': 'str'}, - 'maximum_node_load': {'key': 'MaximumNodeLoad', 'type': 'str'}, - 'max_node_load_node_id': {'key': 'MaxNodeLoadNodeId', 'type': 'NodeId'}, - 'planned_load_removal': {'key': 'PlannedLoadRemoval', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - is_balanced_before: Optional[bool] = None, - is_balanced_after: Optional[bool] = None, - deviation_before: Optional[str] = None, - deviation_after: Optional[str] = None, - balancing_threshold: Optional[str] = None, - action: Optional[str] = None, - activity_threshold: Optional[str] = None, - cluster_capacity: Optional[str] = None, - cluster_load: Optional[str] = None, - current_cluster_load: Optional[str] = None, - cluster_remaining_capacity: Optional[str] = None, - cluster_capacity_remaining: Optional[str] = None, - is_cluster_capacity_violation: Optional[bool] = None, - node_buffer_percentage: Optional[str] = None, - cluster_buffered_capacity: Optional[str] = None, - buffered_cluster_capacity_remaining: Optional[str] = None, - cluster_remaining_buffered_capacity: Optional[str] = None, - min_node_load_value: Optional[str] = None, - minimum_node_load: Optional[str] = None, - min_node_load_node_id: Optional["NodeId"] = None, - max_node_load_value: Optional[str] = None, - maximum_node_load: Optional[str] = None, - max_node_load_node_id: Optional["NodeId"] = None, - planned_load_removal: Optional[str] = None, - **kwargs - ): - """ - :keyword name: Name of the metric for which this load information is provided. - :paramtype name: str - :keyword is_balanced_before: Value that indicates whether the metrics is balanced or not before - resource balancer run. - :paramtype is_balanced_before: bool - :keyword is_balanced_after: Value that indicates whether the metrics is balanced or not after - resource balancer run. - :paramtype is_balanced_after: bool - :keyword deviation_before: The standard average deviation of the metrics before resource - balancer run. - :paramtype deviation_before: str - :keyword deviation_after: The standard average deviation of the metrics after resource balancer - run. - :paramtype deviation_after: str - :keyword balancing_threshold: The balancing threshold for a certain metric. - :paramtype balancing_threshold: str - :keyword action: The current action being taken with regard to this metric. - :paramtype action: str - :keyword activity_threshold: The Activity Threshold specified for this metric in the system - Cluster Manifest. - :paramtype activity_threshold: str - :keyword cluster_capacity: The total cluster capacity for a given metric. - :paramtype cluster_capacity: str - :keyword cluster_load: The total cluster load. In future releases of Service Fabric this - parameter will be deprecated in favor of CurrentClusterLoad. - :paramtype cluster_load: str - :keyword current_cluster_load: The total cluster load. - :paramtype current_cluster_load: str - :keyword cluster_remaining_capacity: The remaining capacity for the metric in the cluster. In - future releases of Service Fabric this parameter will be deprecated in favor of - ClusterCapacityRemaining. - :paramtype cluster_remaining_capacity: str - :keyword cluster_capacity_remaining: The remaining capacity for the metric in the cluster. - :paramtype cluster_capacity_remaining: str - :keyword is_cluster_capacity_violation: Indicates that the metric is currently over capacity in - the cluster. - :paramtype is_cluster_capacity_violation: bool - :keyword node_buffer_percentage: The reserved percentage of total node capacity for this - metric. - :paramtype node_buffer_percentage: str - :keyword cluster_buffered_capacity: Remaining capacity in the cluster excluding the reserved - space. In future releases of Service Fabric this parameter will be deprecated in favor of - BufferedClusterCapacityRemaining. - :paramtype cluster_buffered_capacity: str - :keyword buffered_cluster_capacity_remaining: Remaining capacity in the cluster excluding the - reserved space. - :paramtype buffered_cluster_capacity_remaining: str - :keyword cluster_remaining_buffered_capacity: The remaining percentage of cluster total - capacity for this metric. - :paramtype cluster_remaining_buffered_capacity: str - :keyword min_node_load_value: The minimum load on any node for this metric. In future releases - of Service Fabric this parameter will be deprecated in favor of MinimumNodeLoad. - :paramtype min_node_load_value: str - :keyword minimum_node_load: The minimum load on any node for this metric. - :paramtype minimum_node_load: str - :keyword min_node_load_node_id: The node id of the node with the minimum load for this metric. - :paramtype min_node_load_node_id: ~azure.servicefabric.models.NodeId - :keyword max_node_load_value: The maximum load on any node for this metric. In future releases - of Service Fabric this parameter will be deprecated in favor of MaximumNodeLoad. - :paramtype max_node_load_value: str - :keyword maximum_node_load: The maximum load on any node for this metric. - :paramtype maximum_node_load: str - :keyword max_node_load_node_id: The node id of the node with the maximum load for this metric. - :paramtype max_node_load_node_id: ~azure.servicefabric.models.NodeId - :keyword planned_load_removal: This value represents the load of the replicas that are planned - to be removed in the future within the cluster. - This kind of load is reported for replicas that are currently being moving to other nodes and - for replicas that are currently being dropped but still use the load on the source node. - :paramtype planned_load_removal: str - """ - super(LoadMetricInformation, self).__init__(**kwargs) - self.name = name - self.is_balanced_before = is_balanced_before - self.is_balanced_after = is_balanced_after - self.deviation_before = deviation_before - self.deviation_after = deviation_after - self.balancing_threshold = balancing_threshold - self.action = action - self.activity_threshold = activity_threshold - self.cluster_capacity = cluster_capacity - self.cluster_load = cluster_load - self.current_cluster_load = current_cluster_load - self.cluster_remaining_capacity = cluster_remaining_capacity - self.cluster_capacity_remaining = cluster_capacity_remaining - self.is_cluster_capacity_violation = is_cluster_capacity_violation - self.node_buffer_percentage = node_buffer_percentage - self.cluster_buffered_capacity = cluster_buffered_capacity - self.buffered_cluster_capacity_remaining = buffered_cluster_capacity_remaining - self.cluster_remaining_buffered_capacity = cluster_remaining_buffered_capacity - self.min_node_load_value = min_node_load_value - self.minimum_node_load = minimum_node_load - self.min_node_load_node_id = min_node_load_node_id - self.max_node_load_value = max_node_load_value - self.maximum_node_load = maximum_node_load - self.max_node_load_node_id = max_node_load_node_id - self.planned_load_removal = planned_load_removal - - -class LoadMetricReport(msrest.serialization.Model): - """Represents the load metric report which contains the time metric was reported, its name and value. - - :ivar last_reported_utc: Gets the UTC time when the load was reported. - :vartype last_reported_utc: ~datetime.datetime - :ivar name: The name of the load metric. - :vartype name: str - :ivar value: The value of the load metric. In future releases of Service Fabric this parameter - will be deprecated in favor of CurrentValue. - :vartype value: str - :ivar current_value: The value of the load metric. - :vartype current_value: str - """ - - _attribute_map = { - 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - 'current_value': {'key': 'CurrentValue', 'type': 'str'}, - } - - def __init__( - self, - *, - last_reported_utc: Optional[datetime.datetime] = None, - name: Optional[str] = None, - value: Optional[str] = None, - current_value: Optional[str] = None, - **kwargs - ): - """ - :keyword last_reported_utc: Gets the UTC time when the load was reported. - :paramtype last_reported_utc: ~datetime.datetime - :keyword name: The name of the load metric. - :paramtype name: str - :keyword value: The value of the load metric. In future releases of Service Fabric this - parameter will be deprecated in favor of CurrentValue. - :paramtype value: str - :keyword current_value: The value of the load metric. - :paramtype current_value: str - """ - super(LoadMetricReport, self).__init__(**kwargs) - self.last_reported_utc = last_reported_utc - self.name = name - self.value = value - self.current_value = current_value - - -class LoadMetricReportInfo(msrest.serialization.Model): - """Information about load reported by replica. - - :ivar name: The name of the metric. - :vartype name: str - :ivar value: The value of the load for the metric. In future releases of Service Fabric this - parameter will be deprecated in favor of CurrentValue. - :vartype value: int - :ivar current_value: The double value of the load for the metric. - :vartype current_value: str - :ivar last_reported_utc: The UTC time when the load is reported. - :vartype last_reported_utc: ~datetime.datetime - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - 'current_value': {'key': 'CurrentValue', 'type': 'str'}, - 'last_reported_utc': {'key': 'LastReportedUtc', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - value: Optional[int] = None, - current_value: Optional[str] = None, - last_reported_utc: Optional[datetime.datetime] = None, - **kwargs - ): - """ - :keyword name: The name of the metric. - :paramtype name: str - :keyword value: The value of the load for the metric. In future releases of Service Fabric this - parameter will be deprecated in favor of CurrentValue. - :paramtype value: int - :keyword current_value: The double value of the load for the metric. - :paramtype current_value: str - :keyword last_reported_utc: The UTC time when the load is reported. - :paramtype last_reported_utc: ~datetime.datetime - """ - super(LoadMetricReportInfo, self).__init__(**kwargs) - self.name = name - self.value = value - self.current_value = current_value - self.last_reported_utc = last_reported_utc - - -class NetworkResourcePropertiesBase(msrest.serialization.Model): - """This type describes the properties of a network resource, including its kind. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NetworkResourceProperties. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of a Service Fabric container network.Constant filled by server. - Possible values include: "Local". - :vartype kind: str or ~azure.servicefabric.models.NetworkKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'NetworkResourceProperties': 'NetworkResourceProperties'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(NetworkResourcePropertiesBase, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class NetworkResourceProperties(NetworkResourcePropertiesBase): - """Describes properties of a network resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LocalNetworkResourceProperties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of a Service Fabric container network.Constant filled by server. - Possible values include: "Local". - :vartype kind: str or ~azure.servicefabric.models.NetworkKind - :ivar description: User readable description of the network. - :vartype description: str - :ivar status: Status of the network. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the network. - :vartype status_details: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Local': 'LocalNetworkResourceProperties'} - } - - def __init__( - self, - *, - description: Optional[str] = None, - **kwargs - ): - """ - :keyword description: User readable description of the network. - :paramtype description: str - """ - super(NetworkResourceProperties, self).__init__(**kwargs) - self.kind = 'NetworkResourceProperties' # type: str - self.description = description - self.status = None - self.status_details = None - - -class LocalNetworkResourceProperties(NetworkResourceProperties): - """Information about a Service Fabric container network local to a single Service Fabric cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The type of a Service Fabric container network.Constant filled by server. - Possible values include: "Local". - :vartype kind: str or ~azure.servicefabric.models.NetworkKind - :ivar description: User readable description of the network. - :vartype description: str - :ivar status: Status of the network. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the network. - :vartype status_details: str - :ivar network_address_prefix: Address space for the local container network. - :vartype network_address_prefix: str - """ - - _validation = { - 'kind': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - } - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'network_address_prefix': {'key': 'networkAddressPrefix', 'type': 'str'}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - network_address_prefix: Optional[str] = None, - **kwargs - ): - """ - :keyword description: User readable description of the network. - :paramtype description: str - :keyword network_address_prefix: Address space for the local container network. - :paramtype network_address_prefix: str - """ - super(LocalNetworkResourceProperties, self).__init__(description=description, **kwargs) - self.kind = 'Local' # type: str - self.network_address_prefix = network_address_prefix - - -class ManagedApplicationIdentity(msrest.serialization.Model): - """Describes a managed application identity. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the identity. - :vartype name: str - :ivar principal_id: The identity's PrincipalId. - :vartype principal_id: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'principal_id': {'key': 'PrincipalId', 'type': 'str'}, - } - - def __init__( - self, - *, - name: str, - principal_id: Optional[str] = None, - **kwargs - ): - """ - :keyword name: Required. The name of the identity. - :paramtype name: str - :keyword principal_id: The identity's PrincipalId. - :paramtype principal_id: str - """ - super(ManagedApplicationIdentity, self).__init__(**kwargs) - self.name = name - self.principal_id = principal_id - - -class ManagedApplicationIdentityDescription(msrest.serialization.Model): - """Managed application identity description. - - :ivar token_service_endpoint: Token service endpoint. - :vartype token_service_endpoint: str - :ivar managed_identities: A list of managed application identity objects. - :vartype managed_identities: list[~azure.servicefabric.models.ManagedApplicationIdentity] - """ - - _attribute_map = { - 'token_service_endpoint': {'key': 'TokenServiceEndpoint', 'type': 'str'}, - 'managed_identities': {'key': 'ManagedIdentities', 'type': '[ManagedApplicationIdentity]'}, - } - - def __init__( - self, - *, - token_service_endpoint: Optional[str] = None, - managed_identities: Optional[List["ManagedApplicationIdentity"]] = None, - **kwargs - ): - """ - :keyword token_service_endpoint: Token service endpoint. - :paramtype token_service_endpoint: str - :keyword managed_identities: A list of managed application identity objects. - :paramtype managed_identities: list[~azure.servicefabric.models.ManagedApplicationIdentity] - """ - super(ManagedApplicationIdentityDescription, self).__init__(**kwargs) - self.token_service_endpoint = token_service_endpoint - self.managed_identities = managed_identities - - -class ManagedIdentityAzureBlobBackupStorageDescription(BackupStorageDescription): - """Describes the parameters for Azure blob store (connected using managed identity) used for storing and enumerating backups. - - All required parameters must be populated in order to send to Azure. - - :ivar storage_kind: Required. The kind of backup storage, where backups are saved.Constant - filled by server. Possible values include: "Invalid", "FileShare", "AzureBlobStore", - "DsmsAzureBlobStore", "ManagedIdentityAzureBlobStore". - :vartype storage_kind: str or ~azure.servicefabric.models.BackupStorageKind - :ivar friendly_name: Friendly name for this backup storage. - :vartype friendly_name: str - :ivar managed_identity_type: Required. The type of managed identity to be used to connect to - Azure Blob Store via Managed Identity. Possible values include: "Invalid", "VMSS", "Cluster". - :vartype managed_identity_type: str or ~azure.servicefabric.models.ManagedIdentityType - :ivar blob_service_uri: Required. The Blob Service Uri to connect to the Azure blob store.. - :vartype blob_service_uri: str - :ivar container_name: Required. The name of the container in the blob store to store and - enumerate backups from. - :vartype container_name: str - """ - - _validation = { - 'storage_kind': {'required': True}, - 'managed_identity_type': {'required': True}, - 'blob_service_uri': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, - 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, - 'managed_identity_type': {'key': 'ManagedIdentityType', 'type': 'str'}, - 'blob_service_uri': {'key': 'BlobServiceUri', 'type': 'str'}, - 'container_name': {'key': 'ContainerName', 'type': 'str'}, - } - - def __init__( - self, - *, - managed_identity_type: Union[str, "ManagedIdentityType"], - blob_service_uri: str, - container_name: str, - friendly_name: Optional[str] = None, - **kwargs - ): - """ - :keyword friendly_name: Friendly name for this backup storage. - :paramtype friendly_name: str - :keyword managed_identity_type: Required. The type of managed identity to be used to connect to - Azure Blob Store via Managed Identity. Possible values include: "Invalid", "VMSS", "Cluster". - :paramtype managed_identity_type: str or ~azure.servicefabric.models.ManagedIdentityType - :keyword blob_service_uri: Required. The Blob Service Uri to connect to the Azure blob store.. - :paramtype blob_service_uri: str - :keyword container_name: Required. The name of the container in the blob store to store and - enumerate backups from. - :paramtype container_name: str - """ - super(ManagedIdentityAzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) - self.storage_kind = 'ManagedIdentityAzureBlobStore' # type: str - self.managed_identity_type = managed_identity_type - self.blob_service_uri = blob_service_uri - self.container_name = container_name - - -class MetricLoadDescription(msrest.serialization.Model): - """Specifies metric load information. - - :ivar metric_name: The name of the reported metric. - :vartype metric_name: str - :ivar current_load: The current value of the metric load. - :vartype current_load: long - :ivar predicted_load: The predicted value of the metric load. Predicted metric load values is - currently a preview feature. It allows predicted load values to be reported and used at the - Service Fabric side, but that feature is currently not enabled. - :vartype predicted_load: long - """ - - _attribute_map = { - 'metric_name': {'key': 'MetricName', 'type': 'str'}, - 'current_load': {'key': 'CurrentLoad', 'type': 'long'}, - 'predicted_load': {'key': 'PredictedLoad', 'type': 'long'}, - } - - def __init__( - self, - *, - metric_name: Optional[str] = None, - current_load: Optional[int] = None, - predicted_load: Optional[int] = None, - **kwargs - ): - """ - :keyword metric_name: The name of the reported metric. - :paramtype metric_name: str - :keyword current_load: The current value of the metric load. - :paramtype current_load: long - :keyword predicted_load: The predicted value of the metric load. Predicted metric load values - is currently a preview feature. It allows predicted load values to be reported and used at the - Service Fabric side, but that feature is currently not enabled. - :paramtype predicted_load: long - """ - super(MetricLoadDescription, self).__init__(**kwargs) - self.metric_name = metric_name - self.current_load = current_load - self.predicted_load = predicted_load - - -class MonitoringPolicyDescription(msrest.serialization.Model): - """Describes the parameters for monitoring an upgrade in Monitored mode. - - :ivar failure_action: The compensating action to perform when a Monitored upgrade encounters - monitoring policy or health policy violations. - Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will - start rolling back automatically. - Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible - values include: "Invalid", "Rollback", "Manual". - :vartype failure_action: str or ~azure.servicefabric.models.FailureAction - :ivar health_check_wait_duration_in_milliseconds: The amount of time to wait after completing - an upgrade domain before applying health policies. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted as a number - representing the total number of milliseconds. - :vartype health_check_wait_duration_in_milliseconds: str - :ivar health_check_stable_duration_in_milliseconds: The amount of time that the application or - cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is first - interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :vartype health_check_stable_duration_in_milliseconds: str - :ivar health_check_retry_timeout_in_milliseconds: The amount of time to retry health evaluation - when the application or cluster is unhealthy before FailureAction is executed. It is first - interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :vartype health_check_retry_timeout_in_milliseconds: str - :ivar upgrade_timeout_in_milliseconds: The amount of time the overall upgrade has to complete - before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 - duration. If that fails, then it is interpreted as a number representing the total number of - milliseconds. - :vartype upgrade_timeout_in_milliseconds: str - :ivar upgrade_domain_timeout_in_milliseconds: The amount of time each upgrade domain has to - complete before FailureAction is executed. It is first interpreted as a string representing an - ISO 8601 duration. If that fails, then it is interpreted as a number representing the total - number of milliseconds. - :vartype upgrade_domain_timeout_in_milliseconds: str - """ - - _attribute_map = { - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, - 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, - 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, - } - - def __init__( - self, - *, - failure_action: Optional[Union[str, "FailureAction"]] = None, - health_check_wait_duration_in_milliseconds: Optional[str] = "0", - health_check_stable_duration_in_milliseconds: Optional[str] = "PT0H2M0S", - health_check_retry_timeout_in_milliseconds: Optional[str] = "PT0H10M0S", - upgrade_timeout_in_milliseconds: Optional[str] = "P10675199DT02H48M05.4775807S", - upgrade_domain_timeout_in_milliseconds: Optional[str] = "P10675199DT02H48M05.4775807S", - **kwargs - ): - """ - :keyword failure_action: The compensating action to perform when a Monitored upgrade encounters - monitoring policy or health policy violations. - Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will - start rolling back automatically. - Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible - values include: "Invalid", "Rollback", "Manual". - :paramtype failure_action: str or ~azure.servicefabric.models.FailureAction - :keyword health_check_wait_duration_in_milliseconds: The amount of time to wait after - completing an upgrade domain before applying health policies. It is first interpreted as a - string representing an ISO 8601 duration. If that fails, then it is interpreted as a number - representing the total number of milliseconds. - :paramtype health_check_wait_duration_in_milliseconds: str - :keyword health_check_stable_duration_in_milliseconds: The amount of time that the application - or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is - first interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :paramtype health_check_stable_duration_in_milliseconds: str - :keyword health_check_retry_timeout_in_milliseconds: The amount of time to retry health - evaluation when the application or cluster is unhealthy before FailureAction is executed. It is - first interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :paramtype health_check_retry_timeout_in_milliseconds: str - :keyword upgrade_timeout_in_milliseconds: The amount of time the overall upgrade has to - complete before FailureAction is executed. It is first interpreted as a string representing an - ISO 8601 duration. If that fails, then it is interpreted as a number representing the total - number of milliseconds. - :paramtype upgrade_timeout_in_milliseconds: str - :keyword upgrade_domain_timeout_in_milliseconds: The amount of time each upgrade domain has to - complete before FailureAction is executed. It is first interpreted as a string representing an - ISO 8601 duration. If that fails, then it is interpreted as a number representing the total - number of milliseconds. - :paramtype upgrade_domain_timeout_in_milliseconds: str - """ - super(MonitoringPolicyDescription, self).__init__(**kwargs) - self.failure_action = failure_action - self.health_check_wait_duration_in_milliseconds = health_check_wait_duration_in_milliseconds - self.health_check_stable_duration_in_milliseconds = health_check_stable_duration_in_milliseconds - self.health_check_retry_timeout_in_milliseconds = health_check_retry_timeout_in_milliseconds - self.upgrade_timeout_in_milliseconds = upgrade_timeout_in_milliseconds - self.upgrade_domain_timeout_in_milliseconds = upgrade_domain_timeout_in_milliseconds - - -class NameDescription(msrest.serialization.Model): - """Describes a Service Fabric name. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The Service Fabric name, including the 'fabric:' URI scheme. - :vartype name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__( - self, - *, - name: str, - **kwargs - ): - """ - :keyword name: Required. The Service Fabric name, including the 'fabric:' URI scheme. - :paramtype name: str - """ - super(NameDescription, self).__init__(**kwargs) - self.name = name - - -class NamedPartitionInformation(PartitionInformation): - """Describes the partition information for the name as a string that is based on partition schemes. - - All required parameters must be populated in order to send to Azure. - - :ivar service_partition_kind: Required. The kind of partitioning scheme used to partition the - service.Constant filled by server. Possible values include: "Invalid", "Singleton", - "Int64Range", "Named". - :vartype service_partition_kind: str or ~azure.servicefabric.models.ServicePartitionKind - :ivar id: An internal ID used by Service Fabric to uniquely identify a partition. This is a - randomly generated GUID when the service was created. The partition ID is unique and does not - change for the lifetime of the service. If the same service was deleted and recreated the IDs - of its partitions would be different. - :vartype id: str - :ivar name: Name of the partition. - :vartype name: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - **kwargs - ): - """ - :keyword id: An internal ID used by Service Fabric to uniquely identify a partition. This is a - randomly generated GUID when the service was created. The partition ID is unique and does not - change for the lifetime of the service. If the same service was deleted and recreated the IDs - of its partitions would be different. - :paramtype id: str - :keyword name: Name of the partition. - :paramtype name: str - """ - super(NamedPartitionInformation, self).__init__(id=id, **kwargs) - self.service_partition_kind = 'Named' # type: str - self.name = name - - -class PartitionSchemeDescription(msrest.serialization.Model): - """Describes how the service is partitioned. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NamedPartitionSchemeDescription, SingletonPartitionSchemeDescription, UniformInt64RangePartitionSchemeDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar partition_scheme: Required. Specifies how the service is partitioned.Constant filled by - server. Possible values include: "Invalid", "Singleton", "UniformInt64Range", "Named". - :vartype partition_scheme: str or ~azure.servicefabric.models.PartitionScheme - """ - - _validation = { - 'partition_scheme': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - } - - _subtype_map = { - 'partition_scheme': {'Named': 'NamedPartitionSchemeDescription', 'Singleton': 'SingletonPartitionSchemeDescription', 'UniformInt64Range': 'UniformInt64RangePartitionSchemeDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(PartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = None # type: Optional[str] - - -class NamedPartitionSchemeDescription(PartitionSchemeDescription): - """Describes the named partition scheme of the service. - - All required parameters must be populated in order to send to Azure. - - :ivar partition_scheme: Required. Specifies how the service is partitioned.Constant filled by - server. Possible values include: "Invalid", "Singleton", "UniformInt64Range", "Named". - :vartype partition_scheme: str or ~azure.servicefabric.models.PartitionScheme - :ivar count: Required. The number of partitions. - :vartype count: int - :ivar names: Required. Array of size specified by the ‘Count’ parameter, for the names of the - partitions. - :vartype names: list[str] - """ - - _validation = { - 'partition_scheme': {'required': True}, - 'count': {'required': True}, - 'names': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'names': {'key': 'Names', 'type': '[str]'}, - } - - def __init__( - self, - *, - count: int, - names: List[str], - **kwargs - ): - """ - :keyword count: Required. The number of partitions. - :paramtype count: int - :keyword names: Required. Array of size specified by the ‘Count’ parameter, for the names of - the partitions. - :paramtype names: list[str] - """ - super(NamedPartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = 'Named' # type: str - self.count = count - self.names = names - - -class NetworkRef(msrest.serialization.Model): - """Describes a network reference in a service. - - :ivar name: Name of the network. - :vartype name: str - :ivar endpoint_refs: A list of endpoints that are exposed on this network. - :vartype endpoint_refs: list[~azure.servicefabric.models.EndpointRef] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'endpoint_refs': {'key': 'endpointRefs', 'type': '[EndpointRef]'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - endpoint_refs: Optional[List["EndpointRef"]] = None, - **kwargs - ): - """ - :keyword name: Name of the network. - :paramtype name: str - :keyword endpoint_refs: A list of endpoints that are exposed on this network. - :paramtype endpoint_refs: list[~azure.servicefabric.models.EndpointRef] - """ - super(NetworkRef, self).__init__(**kwargs) - self.name = name - self.endpoint_refs = endpoint_refs - - -class NetworkResourceDescription(msrest.serialization.Model): - """This type describes a network resource. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of the Network resource. - :vartype name: str - :ivar properties: Required. Describes properties of a network resource. - :vartype properties: ~azure.servicefabric.models.NetworkResourceProperties - """ - - _validation = { - 'name': {'required': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'NetworkResourceProperties'}, - } - - def __init__( - self, - *, - name: str, - properties: "NetworkResourceProperties", - **kwargs - ): - """ - :keyword name: Required. Name of the Network resource. - :paramtype name: str - :keyword properties: Required. Describes properties of a network resource. - :paramtype properties: ~azure.servicefabric.models.NetworkResourceProperties - """ - super(NetworkResourceDescription, self).__init__(**kwargs) - self.name = name - self.properties = properties - - -class NodeAbortedEvent(NodeEvent): - """Node Aborted event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar node_id: Required. Id of Node. - :vartype node_id: str - :ivar upgrade_domain: Required. Upgrade domain of Node. - :vartype upgrade_domain: str - :ivar fault_domain: Required. Fault domain of Node. - :vartype fault_domain: str - :ivar ip_address_or_fqdn: Required. IP address or FQDN. - :vartype ip_address_or_fqdn: str - :ivar hostname: Required. Name of Host. - :vartype hostname: str - :ivar is_seed_node: Required. Indicates if it is seed node. - :vartype is_seed_node: bool - :ivar node_version: Required. Version of Node. - :vartype node_version: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - node_name: str, - node_instance: int, - node_id: str, - upgrade_domain: str, - fault_domain: str, - ip_address_or_fqdn: str, - hostname: str, - is_seed_node: bool, - node_version: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword node_id: Required. Id of Node. - :paramtype node_id: str - :keyword upgrade_domain: Required. Upgrade domain of Node. - :paramtype upgrade_domain: str - :keyword fault_domain: Required. Fault domain of Node. - :paramtype fault_domain: str - :keyword ip_address_or_fqdn: Required. IP address or FQDN. - :paramtype ip_address_or_fqdn: str - :keyword hostname: Required. Name of Host. - :paramtype hostname: str - :keyword is_seed_node: Required. Indicates if it is seed node. - :paramtype is_seed_node: bool - :keyword node_version: Required. Version of Node. - :paramtype node_version: str - """ - super(NodeAbortedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.kind = 'NodeAborted' # type: str - self.node_instance = node_instance - self.node_id = node_id - self.upgrade_domain = upgrade_domain - self.fault_domain = fault_domain - self.ip_address_or_fqdn = ip_address_or_fqdn - self.hostname = hostname - self.is_seed_node = is_seed_node - self.node_version = node_version - - -class NodeAddedToClusterEvent(NodeEvent): - """Node Added event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_id: Required. Id of Node. - :vartype node_id: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar node_type: Required. Type of Node. - :vartype node_type: str - :ivar fabric_version: Required. Fabric version. - :vartype fabric_version: str - :ivar ip_address_or_fqdn: Required. IP address or FQDN. - :vartype ip_address_or_fqdn: str - :ivar node_capacities: Required. Capacities. - :vartype node_capacities: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'node_type': {'required': True}, - 'fabric_version': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'node_capacities': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_type': {'key': 'NodeType', 'type': 'str'}, - 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - node_name: str, - node_id: str, - node_instance: int, - node_type: str, - fabric_version: str, - ip_address_or_fqdn: str, - node_capacities: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_id: Required. Id of Node. - :paramtype node_id: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword node_type: Required. Type of Node. - :paramtype node_type: str - :keyword fabric_version: Required. Fabric version. - :paramtype fabric_version: str - :keyword ip_address_or_fqdn: Required. IP address or FQDN. - :paramtype ip_address_or_fqdn: str - :keyword node_capacities: Required. Capacities. - :paramtype node_capacities: str - """ - super(NodeAddedToClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.kind = 'NodeAddedToCluster' # type: str - self.node_id = node_id - self.node_instance = node_instance - self.node_type = node_type - self.fabric_version = fabric_version - self.ip_address_or_fqdn = ip_address_or_fqdn - self.node_capacities = node_capacities - - -class NodeClosedEvent(NodeEvent): - """Node Closed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_id: Required. Id of Node. - :vartype node_id: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar error: Required. Describes error. - :vartype error: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'error': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'error': {'key': 'Error', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - node_name: str, - node_id: str, - node_instance: int, - error: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_id: Required. Id of Node. - :paramtype node_id: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword error: Required. Describes error. - :paramtype error: str - """ - super(NodeClosedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.kind = 'NodeClosed' # type: str - self.node_id = node_id - self.node_instance = node_instance - self.error = error - - -class NodeDeactivateCompletedEvent(NodeEvent): - """Node Deactivate Completed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar effective_deactivate_intent: Required. Describes deactivate intent. - :vartype effective_deactivate_intent: str - :ivar batch_ids_with_deactivate_intent: Required. Batch Ids. - :vartype batch_ids_with_deactivate_intent: str - :ivar start_time: Required. Start time. - :vartype start_time: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'effective_deactivate_intent': {'required': True}, - 'batch_ids_with_deactivate_intent': {'required': True}, - 'start_time': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'effective_deactivate_intent': {'key': 'EffectiveDeactivateIntent', 'type': 'str'}, - 'batch_ids_with_deactivate_intent': {'key': 'BatchIdsWithDeactivateIntent', 'type': 'str'}, - 'start_time': {'key': 'StartTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - node_name: str, - node_instance: int, - effective_deactivate_intent: str, - batch_ids_with_deactivate_intent: str, - start_time: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword effective_deactivate_intent: Required. Describes deactivate intent. - :paramtype effective_deactivate_intent: str - :keyword batch_ids_with_deactivate_intent: Required. Batch Ids. - :paramtype batch_ids_with_deactivate_intent: str - :keyword start_time: Required. Start time. - :paramtype start_time: ~datetime.datetime - """ - super(NodeDeactivateCompletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.kind = 'NodeDeactivateCompleted' # type: str - self.node_instance = node_instance - self.effective_deactivate_intent = effective_deactivate_intent - self.batch_ids_with_deactivate_intent = batch_ids_with_deactivate_intent - self.start_time = start_time - - -class NodeDeactivateStartedEvent(NodeEvent): - """Node Deactivate Started event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar batch_id: Required. Batch Id. - :vartype batch_id: str - :ivar deactivate_intent: Required. Describes deactivate intent. - :vartype deactivate_intent: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'batch_id': {'required': True}, - 'deactivate_intent': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'batch_id': {'key': 'BatchId', 'type': 'str'}, - 'deactivate_intent': {'key': 'DeactivateIntent', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - node_name: str, - node_instance: int, - batch_id: str, - deactivate_intent: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword batch_id: Required. Batch Id. - :paramtype batch_id: str - :keyword deactivate_intent: Required. Describes deactivate intent. - :paramtype deactivate_intent: str - """ - super(NodeDeactivateStartedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.kind = 'NodeDeactivateStarted' # type: str - self.node_instance = node_instance - self.batch_id = batch_id - self.deactivate_intent = deactivate_intent - - -class NodeDeactivationInfo(msrest.serialization.Model): - """Information about the node deactivation. This information is valid for a node that is undergoing deactivation or has already been deactivated. - - :ivar node_deactivation_intent: The intent or the reason for deactivating the node. Following - are the possible values for it. Possible values include: "Invalid", "Pause", "Restart", - "RemoveData", "RemoveNode". - :vartype node_deactivation_intent: str or ~azure.servicefabric.models.NodeDeactivationIntent - :ivar node_deactivation_status: The status of node deactivation operation. Following are the - possible values. Possible values include: "None", "SafetyCheckInProgress", - "SafetyCheckComplete", "Completed". - :vartype node_deactivation_status: str or ~azure.servicefabric.models.NodeDeactivationStatus - :ivar node_deactivation_task: List of tasks representing the deactivation operation on the - node. - :vartype node_deactivation_task: list[~azure.servicefabric.models.NodeDeactivationTask] - :ivar pending_safety_checks: List of pending safety checks. - :vartype pending_safety_checks: list[~azure.servicefabric.models.SafetyCheckWrapper] - """ - - _attribute_map = { - 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, - 'node_deactivation_status': {'key': 'NodeDeactivationStatus', 'type': 'str'}, - 'node_deactivation_task': {'key': 'NodeDeactivationTask', 'type': '[NodeDeactivationTask]'}, - 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, - } - - def __init__( - self, - *, - node_deactivation_intent: Optional[Union[str, "NodeDeactivationIntent"]] = None, - node_deactivation_status: Optional[Union[str, "NodeDeactivationStatus"]] = None, - node_deactivation_task: Optional[List["NodeDeactivationTask"]] = None, - pending_safety_checks: Optional[List["SafetyCheckWrapper"]] = None, - **kwargs - ): - """ - :keyword node_deactivation_intent: The intent or the reason for deactivating the node. - Following are the possible values for it. Possible values include: "Invalid", "Pause", - "Restart", "RemoveData", "RemoveNode". - :paramtype node_deactivation_intent: str or ~azure.servicefabric.models.NodeDeactivationIntent - :keyword node_deactivation_status: The status of node deactivation operation. Following are the - possible values. Possible values include: "None", "SafetyCheckInProgress", - "SafetyCheckComplete", "Completed". - :paramtype node_deactivation_status: str or ~azure.servicefabric.models.NodeDeactivationStatus - :keyword node_deactivation_task: List of tasks representing the deactivation operation on the - node. - :paramtype node_deactivation_task: list[~azure.servicefabric.models.NodeDeactivationTask] - :keyword pending_safety_checks: List of pending safety checks. - :paramtype pending_safety_checks: list[~azure.servicefabric.models.SafetyCheckWrapper] - """ - super(NodeDeactivationInfo, self).__init__(**kwargs) - self.node_deactivation_intent = node_deactivation_intent - self.node_deactivation_status = node_deactivation_status - self.node_deactivation_task = node_deactivation_task - self.pending_safety_checks = pending_safety_checks - - -class NodeDeactivationTask(msrest.serialization.Model): - """The task representing the deactivation operation on the node. - - :ivar node_deactivation_task_id: Identity of the task related to deactivation operation on the - node. - :vartype node_deactivation_task_id: ~azure.servicefabric.models.NodeDeactivationTaskId - :ivar node_deactivation_intent: The intent or the reason for deactivating the node. Following - are the possible values for it. Possible values include: "Invalid", "Pause", "Restart", - "RemoveData", "RemoveNode". - :vartype node_deactivation_intent: str or ~azure.servicefabric.models.NodeDeactivationIntent - """ - - _attribute_map = { - 'node_deactivation_task_id': {'key': 'NodeDeactivationTaskId', 'type': 'NodeDeactivationTaskId'}, - 'node_deactivation_intent': {'key': 'NodeDeactivationIntent', 'type': 'str'}, - } - - def __init__( - self, - *, - node_deactivation_task_id: Optional["NodeDeactivationTaskId"] = None, - node_deactivation_intent: Optional[Union[str, "NodeDeactivationIntent"]] = None, - **kwargs - ): - """ - :keyword node_deactivation_task_id: Identity of the task related to deactivation operation on - the node. - :paramtype node_deactivation_task_id: ~azure.servicefabric.models.NodeDeactivationTaskId - :keyword node_deactivation_intent: The intent or the reason for deactivating the node. - Following are the possible values for it. Possible values include: "Invalid", "Pause", - "Restart", "RemoveData", "RemoveNode". - :paramtype node_deactivation_intent: str or ~azure.servicefabric.models.NodeDeactivationIntent - """ - super(NodeDeactivationTask, self).__init__(**kwargs) - self.node_deactivation_task_id = node_deactivation_task_id - self.node_deactivation_intent = node_deactivation_intent - - -class NodeDeactivationTaskId(msrest.serialization.Model): - """Identity of the task related to deactivation operation on the node. - - :ivar id: Value of the task id. - :vartype id: str - :ivar node_deactivation_task_type: The type of the task that performed the node deactivation. - Following are the possible values. Possible values include: "Invalid", "Infrastructure", - "Repair", "Client". - :vartype node_deactivation_task_type: str or - ~azure.servicefabric.models.NodeDeactivationTaskType - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'node_deactivation_task_type': {'key': 'NodeDeactivationTaskType', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - node_deactivation_task_type: Optional[Union[str, "NodeDeactivationTaskType"]] = None, - **kwargs - ): - """ - :keyword id: Value of the task id. - :paramtype id: str - :keyword node_deactivation_task_type: The type of the task that performed the node - deactivation. Following are the possible values. Possible values include: "Invalid", - "Infrastructure", "Repair", "Client". - :paramtype node_deactivation_task_type: str or - ~azure.servicefabric.models.NodeDeactivationTaskType - """ - super(NodeDeactivationTaskId, self).__init__(**kwargs) - self.id = id - self.node_deactivation_task_type = node_deactivation_task_type - - -class NodeDownEvent(NodeEvent): - """Node Down event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar last_node_up_at: Required. Time when Node was last up. - :vartype last_node_up_at: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'last_node_up_at': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'last_node_up_at': {'key': 'LastNodeUpAt', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - node_name: str, - node_instance: int, - last_node_up_at: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword last_node_up_at: Required. Time when Node was last up. - :paramtype last_node_up_at: ~datetime.datetime - """ - super(NodeDownEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.kind = 'NodeDown' # type: str - self.node_instance = node_instance - self.last_node_up_at = last_node_up_at - - -class NodeHealth(EntityHealth): - """Information about the health of a Service Fabric node. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar name: Name of the node whose health information is described by this object. - :vartype name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - health_events: Optional[List["HealthEvent"]] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - health_statistics: Optional["HealthStatistics"] = None, - name: Optional[str] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword name: Name of the node whose health information is described by this object. - :paramtype name: str - """ - super(NodeHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.name = name - - -class NodeHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a node, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar node_name: The name of a Service Fabric node. - :vartype node_name: str - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated - health state of the node. The types of the unhealthy evaluations can be EventHealthEvaluation. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - node_name: Optional[str] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword node_name: The name of a Service Fabric node. - :paramtype node_name: str - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current - aggregated health state of the node. The types of the unhealthy evaluations can be - EventHealthEvaluation. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(NodeHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'Node' # type: str - self.node_name = node_name - self.unhealthy_evaluations = unhealthy_evaluations - - -class NodeHealthReportExpiredEvent(NodeEvent): - """Node Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance_id: Required. Id of Node instance. - :vartype node_instance_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - node_name: str, - node_instance_id: int, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance_id: Required. Id of Node instance. - :paramtype node_instance_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(NodeHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.kind = 'NodeHealthReportExpired' # type: str - self.node_instance_id = node_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class NodeHealthState(EntityHealthState): - """Represents the health state of a node, which contains the node identifier and its aggregated health state. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar name: The name of a Service Fabric node. - :vartype name: str - :ivar id: An internal ID used by Service Fabric to uniquely identify a node. Node Id is - deterministically generated from node name. - :vartype id: ~azure.servicefabric.models.NodeId - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'NodeId'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - name: Optional[str] = None, - id: Optional["NodeId"] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword name: The name of a Service Fabric node. - :paramtype name: str - :keyword id: An internal ID used by Service Fabric to uniquely identify a node. Node Id is - deterministically generated from node name. - :paramtype id: ~azure.servicefabric.models.NodeId - """ - super(NodeHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.name = name - self.id = id - - -class NodeHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a node, which contains the node name and its aggregated health state. - - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar node_name: The name of a Service Fabric node. - :vartype node_name: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - } - - def __init__( - self, - *, - health_state: Optional[Union[str, "HealthState"]] = None, - node_name: Optional[str] = None, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword node_name: The name of a Service Fabric node. - :paramtype node_name: str - """ - super(NodeHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.node_name = node_name - - -class NodeHealthStateChunkList(EntityHealthStateChunkList): - """The list of node health state chunks in the cluster that respect the input filters in the chunk query. Returned by get cluster health state chunks query. - - :ivar total_count: Total number of entity health state objects that match the specified filters - from the cluster health chunk query description. - :vartype total_count: long - :ivar items: The list of node health state chunks that respect the input filters in the chunk - query. - :vartype items: list[~azure.servicefabric.models.NodeHealthStateChunk] - """ - - _attribute_map = { - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'items': {'key': 'Items', 'type': '[NodeHealthStateChunk]'}, - } - - def __init__( - self, - *, - total_count: Optional[int] = None, - items: Optional[List["NodeHealthStateChunk"]] = None, - **kwargs - ): - """ - :keyword total_count: Total number of entity health state objects that match the specified - filters from the cluster health chunk query description. - :paramtype total_count: long - :keyword items: The list of node health state chunks that respect the input filters in the - chunk query. - :paramtype items: list[~azure.servicefabric.models.NodeHealthStateChunk] - """ - super(NodeHealthStateChunkList, self).__init__(total_count=total_count, **kwargs) - self.items = items - - -class NodeHealthStateFilter(msrest.serialization.Model): - """Defines matching criteria to determine whether a node should be included in the returned cluster health chunk. -One filter can match zero, one or multiple nodes, depending on its properties. -Can be specified in the cluster health chunk query description. - - :ivar node_name_filter: Name of the node that matches the filter. The filter is applied only to - the specified node, if it exists. - If the node doesn't exist, no node is returned in the cluster health chunk based on this - filter. - If the node exists, it is included in the cluster health chunk if the health state matches the - other filter properties. - If not specified, all nodes that match the parent filters (if any) are taken into - consideration and matched against the other filter members, like health state filter. - :vartype node_name_filter: str - :ivar health_state_filter: The filter for the health state of the nodes. It allows selecting - nodes if they match the desired health states. - The possible values are integer value of one of the following health states. Only nodes that - match the filter are returned. All nodes are used to evaluate the cluster aggregated health - state. - If not specified, default value is None, unless the node name is specified. If the filter has - default value and node name is specified, the matching node is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches nodes with HealthState value of OK (2) and - Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :vartype health_state_filter: int - """ - - _attribute_map = { - 'node_name_filter': {'key': 'NodeNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__( - self, - *, - node_name_filter: Optional[str] = None, - health_state_filter: Optional[int] = 0, - **kwargs - ): - """ - :keyword node_name_filter: Name of the node that matches the filter. The filter is applied only - to the specified node, if it exists. - If the node doesn't exist, no node is returned in the cluster health chunk based on this - filter. - If the node exists, it is included in the cluster health chunk if the health state matches the - other filter properties. - If not specified, all nodes that match the parent filters (if any) are taken into - consideration and matched against the other filter members, like health state filter. - :paramtype node_name_filter: str - :keyword health_state_filter: The filter for the health state of the nodes. It allows selecting - nodes if they match the desired health states. - The possible values are integer value of one of the following health states. Only nodes that - match the filter are returned. All nodes are used to evaluate the cluster aggregated health - state. - If not specified, default value is None, unless the node name is specified. If the filter has - default value and node name is specified, the matching node is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches nodes with HealthState value of OK (2) and - Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :paramtype health_state_filter: int - """ - super(NodeHealthStateFilter, self).__init__(**kwargs) - self.node_name_filter = node_name_filter - self.health_state_filter = health_state_filter - - -class NodeId(msrest.serialization.Model): - """An internal ID used by Service Fabric to uniquely identify a node. Node Id is deterministically generated from node name. - - :ivar id: Value of the node Id. This is a 128 bit integer. - :vartype id: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - **kwargs - ): - """ - :keyword id: Value of the node Id. This is a 128 bit integer. - :paramtype id: str - """ - super(NodeId, self).__init__(**kwargs) - self.id = id - - -class NodeImpact(msrest.serialization.Model): - """Describes the expected impact of a repair to a particular node. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar node_name: Required. The name of the impacted node. - :vartype node_name: str - :ivar impact_level: The level of impact expected. Possible values include: "Invalid", "None", - "Restart", "RemoveData", "RemoveNode". - :vartype impact_level: str or ~azure.servicefabric.models.ImpactLevel - """ - - _validation = { - 'node_name': {'required': True}, - } - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'impact_level': {'key': 'ImpactLevel', 'type': 'str'}, - } - - def __init__( - self, - *, - node_name: str, - impact_level: Optional[Union[str, "ImpactLevel"]] = None, - **kwargs - ): - """ - :keyword node_name: Required. The name of the impacted node. - :paramtype node_name: str - :keyword impact_level: The level of impact expected. Possible values include: "Invalid", - "None", "Restart", "RemoveData", "RemoveNode". - :paramtype impact_level: str or ~azure.servicefabric.models.ImpactLevel - """ - super(NodeImpact, self).__init__(**kwargs) - self.node_name = node_name - self.impact_level = impact_level - - -class NodeInfo(msrest.serialization.Model): - """Information about a node in Service Fabric cluster. - - :ivar name: The name of a Service Fabric node. - :vartype name: str - :ivar ip_address_or_fqdn: The IP address or fully qualified domain name of the node. - :vartype ip_address_or_fqdn: str - :ivar type: The type of the node. - :vartype type: str - :ivar code_version: The version of Service Fabric binaries that the node is running. - :vartype code_version: str - :ivar config_version: The version of Service Fabric cluster manifest that the node is using. - :vartype config_version: str - :ivar node_status: The status of the node. Possible values include: "Invalid", "Up", "Down", - "Enabling", "Disabling", "Disabled", "Unknown", "Removed". - :vartype node_status: str or ~azure.servicefabric.models.NodeStatus - :ivar node_up_time_in_seconds: Time in seconds since the node has been in NodeStatus Up. Value - zero indicates that the node is not Up. - :vartype node_up_time_in_seconds: str - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar is_seed_node: Indicates if the node is a seed node or not. Returns true if the node is a - seed node, otherwise false. A quorum of seed nodes are required for proper operation of Service - Fabric cluster. - :vartype is_seed_node: bool - :ivar upgrade_domain: The upgrade domain of the node. - :vartype upgrade_domain: str - :ivar fault_domain: The fault domain of the node. - :vartype fault_domain: str - :ivar id: An internal ID used by Service Fabric to uniquely identify a node. Node Id is - deterministically generated from node name. - :vartype id: ~azure.servicefabric.models.NodeId - :ivar instance_id: The ID representing the node instance. While the ID of the node is - deterministically generated from the node name and remains same across restarts, the InstanceId - changes every time node restarts. - :vartype instance_id: str - :ivar node_deactivation_info: Information about the node deactivation. This information is - valid for a node that is undergoing deactivation or has already been deactivated. - :vartype node_deactivation_info: ~azure.servicefabric.models.NodeDeactivationInfo - :ivar is_stopped: Indicates if the node is stopped by calling stop node API or not. Returns - true if the node is stopped, otherwise false. - :vartype is_stopped: bool - :ivar node_down_time_in_seconds: Time in seconds since the node has been in NodeStatus Down. - Value zero indicates node is not NodeStatus Down. - :vartype node_down_time_in_seconds: str - :ivar node_up_at: Date time in UTC when the node came up. If the node has never been up then - this value will be zero date time. - :vartype node_up_at: ~datetime.datetime - :ivar node_down_at: Date time in UTC when the node went down. If node has never been down then - this value will be zero date time. - :vartype node_down_at: ~datetime.datetime - :ivar node_tags: List that contains tags, which will be applied to the nodes. - :vartype node_tags: list[str] - :ivar is_node_by_node_upgrade_in_progress: Indicates if a node-by-node upgrade is currently - being performed on this node. - :vartype is_node_by_node_upgrade_in_progress: bool - :ivar infrastructure_placement_id: PlacementID used by the InfrastructureService. - :vartype infrastructure_placement_id: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'node_status': {'key': 'NodeStatus', 'type': 'str'}, - 'node_up_time_in_seconds': {'key': 'NodeUpTimeInSeconds', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'NodeId'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - 'node_deactivation_info': {'key': 'NodeDeactivationInfo', 'type': 'NodeDeactivationInfo'}, - 'is_stopped': {'key': 'IsStopped', 'type': 'bool'}, - 'node_down_time_in_seconds': {'key': 'NodeDownTimeInSeconds', 'type': 'str'}, - 'node_up_at': {'key': 'NodeUpAt', 'type': 'iso-8601'}, - 'node_down_at': {'key': 'NodeDownAt', 'type': 'iso-8601'}, - 'node_tags': {'key': 'NodeTags', 'type': '[str]'}, - 'is_node_by_node_upgrade_in_progress': {'key': 'IsNodeByNodeUpgradeInProgress', 'type': 'bool'}, - 'infrastructure_placement_id': {'key': 'InfrastructurePlacementID', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - ip_address_or_fqdn: Optional[str] = None, - type: Optional[str] = None, - code_version: Optional[str] = None, - config_version: Optional[str] = None, - node_status: Optional[Union[str, "NodeStatus"]] = None, - node_up_time_in_seconds: Optional[str] = None, - health_state: Optional[Union[str, "HealthState"]] = None, - is_seed_node: Optional[bool] = None, - upgrade_domain: Optional[str] = None, - fault_domain: Optional[str] = None, - id: Optional["NodeId"] = None, - instance_id: Optional[str] = None, - node_deactivation_info: Optional["NodeDeactivationInfo"] = None, - is_stopped: Optional[bool] = None, - node_down_time_in_seconds: Optional[str] = None, - node_up_at: Optional[datetime.datetime] = None, - node_down_at: Optional[datetime.datetime] = None, - node_tags: Optional[List[str]] = None, - is_node_by_node_upgrade_in_progress: Optional[bool] = None, - infrastructure_placement_id: Optional[str] = None, - **kwargs - ): - """ - :keyword name: The name of a Service Fabric node. - :paramtype name: str - :keyword ip_address_or_fqdn: The IP address or fully qualified domain name of the node. - :paramtype ip_address_or_fqdn: str - :keyword type: The type of the node. - :paramtype type: str - :keyword code_version: The version of Service Fabric binaries that the node is running. - :paramtype code_version: str - :keyword config_version: The version of Service Fabric cluster manifest that the node is using. - :paramtype config_version: str - :keyword node_status: The status of the node. Possible values include: "Invalid", "Up", "Down", - "Enabling", "Disabling", "Disabled", "Unknown", "Removed". - :paramtype node_status: str or ~azure.servicefabric.models.NodeStatus - :keyword node_up_time_in_seconds: Time in seconds since the node has been in NodeStatus Up. - Value zero indicates that the node is not Up. - :paramtype node_up_time_in_seconds: str - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword is_seed_node: Indicates if the node is a seed node or not. Returns true if the node is - a seed node, otherwise false. A quorum of seed nodes are required for proper operation of - Service Fabric cluster. - :paramtype is_seed_node: bool - :keyword upgrade_domain: The upgrade domain of the node. - :paramtype upgrade_domain: str - :keyword fault_domain: The fault domain of the node. - :paramtype fault_domain: str - :keyword id: An internal ID used by Service Fabric to uniquely identify a node. Node Id is - deterministically generated from node name. - :paramtype id: ~azure.servicefabric.models.NodeId - :keyword instance_id: The ID representing the node instance. While the ID of the node is - deterministically generated from the node name and remains same across restarts, the InstanceId - changes every time node restarts. - :paramtype instance_id: str - :keyword node_deactivation_info: Information about the node deactivation. This information is - valid for a node that is undergoing deactivation or has already been deactivated. - :paramtype node_deactivation_info: ~azure.servicefabric.models.NodeDeactivationInfo - :keyword is_stopped: Indicates if the node is stopped by calling stop node API or not. Returns - true if the node is stopped, otherwise false. - :paramtype is_stopped: bool - :keyword node_down_time_in_seconds: Time in seconds since the node has been in NodeStatus Down. - Value zero indicates node is not NodeStatus Down. - :paramtype node_down_time_in_seconds: str - :keyword node_up_at: Date time in UTC when the node came up. If the node has never been up then - this value will be zero date time. - :paramtype node_up_at: ~datetime.datetime - :keyword node_down_at: Date time in UTC when the node went down. If node has never been down - then this value will be zero date time. - :paramtype node_down_at: ~datetime.datetime - :keyword node_tags: List that contains tags, which will be applied to the nodes. - :paramtype node_tags: list[str] - :keyword is_node_by_node_upgrade_in_progress: Indicates if a node-by-node upgrade is currently - being performed on this node. - :paramtype is_node_by_node_upgrade_in_progress: bool - :keyword infrastructure_placement_id: PlacementID used by the InfrastructureService. - :paramtype infrastructure_placement_id: str - """ - super(NodeInfo, self).__init__(**kwargs) - self.name = name - self.ip_address_or_fqdn = ip_address_or_fqdn - self.type = type - self.code_version = code_version - self.config_version = config_version - self.node_status = node_status - self.node_up_time_in_seconds = node_up_time_in_seconds - self.health_state = health_state - self.is_seed_node = is_seed_node - self.upgrade_domain = upgrade_domain - self.fault_domain = fault_domain - self.id = id - self.instance_id = instance_id - self.node_deactivation_info = node_deactivation_info - self.is_stopped = is_stopped - self.node_down_time_in_seconds = node_down_time_in_seconds - self.node_up_at = node_up_at - self.node_down_at = node_down_at - self.node_tags = node_tags - self.is_node_by_node_upgrade_in_progress = is_node_by_node_upgrade_in_progress - self.infrastructure_placement_id = infrastructure_placement_id - - -class NodeLoadInfo(msrest.serialization.Model): - """Information about load on a Service Fabric node. It holds a summary of all metrics and their load on a node. - - :ivar node_name: Name of the node for which the load information is provided by this object. - :vartype node_name: str - :ivar node_load_metric_information: List that contains metrics and their load information on - this node. - :vartype node_load_metric_information: - list[~azure.servicefabric.models.NodeLoadMetricInformation] - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_load_metric_information': {'key': 'NodeLoadMetricInformation', 'type': '[NodeLoadMetricInformation]'}, - } - - def __init__( - self, - *, - node_name: Optional[str] = None, - node_load_metric_information: Optional[List["NodeLoadMetricInformation"]] = None, - **kwargs - ): - """ - :keyword node_name: Name of the node for which the load information is provided by this object. - :paramtype node_name: str - :keyword node_load_metric_information: List that contains metrics and their load information on - this node. - :paramtype node_load_metric_information: - list[~azure.servicefabric.models.NodeLoadMetricInformation] - """ - super(NodeLoadInfo, self).__init__(**kwargs) - self.node_name = node_name - self.node_load_metric_information = node_load_metric_information - - -class NodeLoadMetricInformation(msrest.serialization.Model): - """Represents data structure that contains load information for a certain metric on a node. - - :ivar name: Name of the metric for which this load information is provided. - :vartype name: str - :ivar node_capacity: Total capacity on the node for this metric. - :vartype node_capacity: str - :ivar node_load: Current load on the node for this metric. In future releases of Service Fabric - this parameter will be deprecated in favor of CurrentNodeLoad. - :vartype node_load: str - :ivar node_remaining_capacity: The remaining capacity on the node for this metric. In future - releases of Service Fabric this parameter will be deprecated in favor of NodeCapacityRemaining. - :vartype node_remaining_capacity: str - :ivar is_capacity_violation: Indicates if there is a capacity violation for this metric on the - node. - :vartype is_capacity_violation: bool - :ivar node_buffered_capacity: The value that indicates the reserved capacity for this metric on - the node. - :vartype node_buffered_capacity: str - :ivar node_remaining_buffered_capacity: The remaining reserved capacity for this metric on the - node. In future releases of Service Fabric this parameter will be deprecated in favor of - BufferedNodeCapacityRemaining. - :vartype node_remaining_buffered_capacity: str - :ivar current_node_load: Current load on the node for this metric. - :vartype current_node_load: str - :ivar node_capacity_remaining: The remaining capacity on the node for the metric. - :vartype node_capacity_remaining: str - :ivar buffered_node_capacity_remaining: The remaining capacity which is not reserved by - NodeBufferPercentage for this metric on the node. - :vartype buffered_node_capacity_remaining: str - :ivar planned_node_load_removal: This value represents the load of the replicas that are - planned to be removed in the future. - This kind of load is reported for replicas that are currently being moving to other nodes and - for replicas that are currently being dropped but still use the load on the source node. - :vartype planned_node_load_removal: str - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'node_capacity': {'key': 'NodeCapacity', 'type': 'str'}, - 'node_load': {'key': 'NodeLoad', 'type': 'str'}, - 'node_remaining_capacity': {'key': 'NodeRemainingCapacity', 'type': 'str'}, - 'is_capacity_violation': {'key': 'IsCapacityViolation', 'type': 'bool'}, - 'node_buffered_capacity': {'key': 'NodeBufferedCapacity', 'type': 'str'}, - 'node_remaining_buffered_capacity': {'key': 'NodeRemainingBufferedCapacity', 'type': 'str'}, - 'current_node_load': {'key': 'CurrentNodeLoad', 'type': 'str'}, - 'node_capacity_remaining': {'key': 'NodeCapacityRemaining', 'type': 'str'}, - 'buffered_node_capacity_remaining': {'key': 'BufferedNodeCapacityRemaining', 'type': 'str'}, - 'planned_node_load_removal': {'key': 'PlannedNodeLoadRemoval', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - node_capacity: Optional[str] = None, - node_load: Optional[str] = None, - node_remaining_capacity: Optional[str] = None, - is_capacity_violation: Optional[bool] = None, - node_buffered_capacity: Optional[str] = None, - node_remaining_buffered_capacity: Optional[str] = None, - current_node_load: Optional[str] = None, - node_capacity_remaining: Optional[str] = None, - buffered_node_capacity_remaining: Optional[str] = None, - planned_node_load_removal: Optional[str] = None, - **kwargs - ): - """ - :keyword name: Name of the metric for which this load information is provided. - :paramtype name: str - :keyword node_capacity: Total capacity on the node for this metric. - :paramtype node_capacity: str - :keyword node_load: Current load on the node for this metric. In future releases of Service - Fabric this parameter will be deprecated in favor of CurrentNodeLoad. - :paramtype node_load: str - :keyword node_remaining_capacity: The remaining capacity on the node for this metric. In future - releases of Service Fabric this parameter will be deprecated in favor of NodeCapacityRemaining. - :paramtype node_remaining_capacity: str - :keyword is_capacity_violation: Indicates if there is a capacity violation for this metric on - the node. - :paramtype is_capacity_violation: bool - :keyword node_buffered_capacity: The value that indicates the reserved capacity for this metric - on the node. - :paramtype node_buffered_capacity: str - :keyword node_remaining_buffered_capacity: The remaining reserved capacity for this metric on - the node. In future releases of Service Fabric this parameter will be deprecated in favor of - BufferedNodeCapacityRemaining. - :paramtype node_remaining_buffered_capacity: str - :keyword current_node_load: Current load on the node for this metric. - :paramtype current_node_load: str - :keyword node_capacity_remaining: The remaining capacity on the node for the metric. - :paramtype node_capacity_remaining: str - :keyword buffered_node_capacity_remaining: The remaining capacity which is not reserved by - NodeBufferPercentage for this metric on the node. - :paramtype buffered_node_capacity_remaining: str - :keyword planned_node_load_removal: This value represents the load of the replicas that are - planned to be removed in the future. - This kind of load is reported for replicas that are currently being moving to other nodes and - for replicas that are currently being dropped but still use the load on the source node. - :paramtype planned_node_load_removal: str - """ - super(NodeLoadMetricInformation, self).__init__(**kwargs) - self.name = name - self.node_capacity = node_capacity - self.node_load = node_load - self.node_remaining_capacity = node_remaining_capacity - self.is_capacity_violation = is_capacity_violation - self.node_buffered_capacity = node_buffered_capacity - self.node_remaining_buffered_capacity = node_remaining_buffered_capacity - self.current_node_load = current_node_load - self.node_capacity_remaining = node_capacity_remaining - self.buffered_node_capacity_remaining = buffered_node_capacity_remaining - self.planned_node_load_removal = planned_node_load_removal - - -class NodeNewHealthReportEvent(NodeEvent): - """Node Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance_id: Required. Id of Node instance. - :vartype node_instance_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - node_name: str, - node_instance_id: int, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance_id: Required. Id of Node instance. - :paramtype node_instance_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(NodeNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.kind = 'NodeNewHealthReport' # type: str - self.node_instance_id = node_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class NodeOpenFailedEvent(NodeEvent): - """Node Open Failed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar node_id: Required. Id of Node. - :vartype node_id: str - :ivar upgrade_domain: Required. Upgrade domain of Node. - :vartype upgrade_domain: str - :ivar fault_domain: Required. Fault domain of Node. - :vartype fault_domain: str - :ivar ip_address_or_fqdn: Required. IP address or FQDN. - :vartype ip_address_or_fqdn: str - :ivar hostname: Required. Name of Host. - :vartype hostname: str - :ivar is_seed_node: Required. Indicates if it is seed node. - :vartype is_seed_node: bool - :ivar node_version: Required. Version of Node. - :vartype node_version: str - :ivar error: Required. Describes the error. - :vartype error: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - 'error': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - 'error': {'key': 'Error', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - node_name: str, - node_instance: int, - node_id: str, - upgrade_domain: str, - fault_domain: str, - ip_address_or_fqdn: str, - hostname: str, - is_seed_node: bool, - node_version: str, - error: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword node_id: Required. Id of Node. - :paramtype node_id: str - :keyword upgrade_domain: Required. Upgrade domain of Node. - :paramtype upgrade_domain: str - :keyword fault_domain: Required. Fault domain of Node. - :paramtype fault_domain: str - :keyword ip_address_or_fqdn: Required. IP address or FQDN. - :paramtype ip_address_or_fqdn: str - :keyword hostname: Required. Name of Host. - :paramtype hostname: str - :keyword is_seed_node: Required. Indicates if it is seed node. - :paramtype is_seed_node: bool - :keyword node_version: Required. Version of Node. - :paramtype node_version: str - :keyword error: Required. Describes the error. - :paramtype error: str - """ - super(NodeOpenFailedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.kind = 'NodeOpenFailed' # type: str - self.node_instance = node_instance - self.node_id = node_id - self.upgrade_domain = upgrade_domain - self.fault_domain = fault_domain - self.ip_address_or_fqdn = ip_address_or_fqdn - self.hostname = hostname - self.is_seed_node = is_seed_node - self.node_version = node_version - self.error = error - - -class NodeOpenSucceededEvent(NodeEvent): - """Node Opened Succeeded event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar node_id: Required. Id of Node. - :vartype node_id: str - :ivar upgrade_domain: Required. Upgrade domain of Node. - :vartype upgrade_domain: str - :ivar fault_domain: Required. Fault domain of Node. - :vartype fault_domain: str - :ivar ip_address_or_fqdn: Required. IP address or FQDN. - :vartype ip_address_or_fqdn: str - :ivar hostname: Required. Name of Host. - :vartype hostname: str - :ivar is_seed_node: Required. Indicates if it is seed node. - :vartype is_seed_node: bool - :ivar node_version: Required. Version of Node. - :vartype node_version: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'node_id': {'required': True}, - 'upgrade_domain': {'required': True}, - 'fault_domain': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'hostname': {'required': True}, - 'is_seed_node': {'required': True}, - 'node_version': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - 'fault_domain': {'key': 'FaultDomain', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'hostname': {'key': 'Hostname', 'type': 'str'}, - 'is_seed_node': {'key': 'IsSeedNode', 'type': 'bool'}, - 'node_version': {'key': 'NodeVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - node_name: str, - node_instance: int, - node_id: str, - upgrade_domain: str, - fault_domain: str, - ip_address_or_fqdn: str, - hostname: str, - is_seed_node: bool, - node_version: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword node_id: Required. Id of Node. - :paramtype node_id: str - :keyword upgrade_domain: Required. Upgrade domain of Node. - :paramtype upgrade_domain: str - :keyword fault_domain: Required. Fault domain of Node. - :paramtype fault_domain: str - :keyword ip_address_or_fqdn: Required. IP address or FQDN. - :paramtype ip_address_or_fqdn: str - :keyword hostname: Required. Name of Host. - :paramtype hostname: str - :keyword is_seed_node: Required. Indicates if it is seed node. - :paramtype is_seed_node: bool - :keyword node_version: Required. Version of Node. - :paramtype node_version: str - """ - super(NodeOpenSucceededEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.kind = 'NodeOpenSucceeded' # type: str - self.node_instance = node_instance - self.node_id = node_id - self.upgrade_domain = upgrade_domain - self.fault_domain = fault_domain - self.ip_address_or_fqdn = ip_address_or_fqdn - self.hostname = hostname - self.is_seed_node = is_seed_node - self.node_version = node_version - - -class NodeRemovedFromClusterEvent(NodeEvent): - """Node Removed event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_id: Required. Id of Node. - :vartype node_id: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar node_type: Required. Type of Node. - :vartype node_type: str - :ivar fabric_version: Required. Fabric version. - :vartype fabric_version: str - :ivar ip_address_or_fqdn: Required. IP address or FQDN. - :vartype ip_address_or_fqdn: str - :ivar node_capacities: Required. Capacities. - :vartype node_capacities: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_id': {'required': True}, - 'node_instance': {'required': True}, - 'node_type': {'required': True}, - 'fabric_version': {'required': True}, - 'ip_address_or_fqdn': {'required': True}, - 'node_capacities': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_id': {'key': 'NodeId', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'node_type': {'key': 'NodeType', 'type': 'str'}, - 'fabric_version': {'key': 'FabricVersion', 'type': 'str'}, - 'ip_address_or_fqdn': {'key': 'IpAddressOrFQDN', 'type': 'str'}, - 'node_capacities': {'key': 'NodeCapacities', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - node_name: str, - node_id: str, - node_instance: int, - node_type: str, - fabric_version: str, - ip_address_or_fqdn: str, - node_capacities: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_id: Required. Id of Node. - :paramtype node_id: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword node_type: Required. Type of Node. - :paramtype node_type: str - :keyword fabric_version: Required. Fabric version. - :paramtype fabric_version: str - :keyword ip_address_or_fqdn: Required. IP address or FQDN. - :paramtype ip_address_or_fqdn: str - :keyword node_capacities: Required. Capacities. - :paramtype node_capacities: str - """ - super(NodeRemovedFromClusterEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.kind = 'NodeRemovedFromCluster' # type: str - self.node_id = node_id - self.node_instance = node_instance - self.node_type = node_type - self.fabric_version = fabric_version - self.ip_address_or_fqdn = ip_address_or_fqdn - self.node_capacities = node_capacities - - -class RepairImpactDescriptionBase(msrest.serialization.Model): - """Describes the expected impact of executing a repair task. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NodeRepairImpactDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of repair impact represented by the current object.Constant - filled by server. Possible values include: "Invalid", "Node". - :vartype kind: str or ~azure.servicefabric.models.RepairImpactKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Node': 'NodeRepairImpactDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(RepairImpactDescriptionBase, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class NodeRepairImpactDescription(RepairImpactDescriptionBase): - """Describes the expected impact of a repair on a set of nodes. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of repair impact represented by the current object.Constant - filled by server. Possible values include: "Invalid", "Node". - :vartype kind: str or ~azure.servicefabric.models.RepairImpactKind - :ivar node_impact_list: The list of nodes impacted by a repair action and their respective - expected impact. - :vartype node_impact_list: list[~azure.servicefabric.models.NodeImpact] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_impact_list': {'key': 'NodeImpactList', 'type': '[NodeImpact]'}, - } - - def __init__( - self, - *, - node_impact_list: Optional[List["NodeImpact"]] = None, - **kwargs - ): - """ - :keyword node_impact_list: The list of nodes impacted by a repair action and their respective - expected impact. - :paramtype node_impact_list: list[~azure.servicefabric.models.NodeImpact] - """ - super(NodeRepairImpactDescription, self).__init__(**kwargs) - self.kind = 'Node' # type: str - self.node_impact_list = node_impact_list - - -class RepairTargetDescriptionBase(msrest.serialization.Model): - """Describes the entities targeted by a repair action. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: NodeRepairTargetDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of repair target described by the current object.Constant filled - by server. Possible values include: "Invalid", "Node". - :vartype kind: str or ~azure.servicefabric.models.RepairTargetKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Node': 'NodeRepairTargetDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(RepairTargetDescriptionBase, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class NodeRepairTargetDescription(RepairTargetDescriptionBase): - """Describes the list of nodes targeted by a repair action. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of repair target described by the current object.Constant filled - by server. Possible values include: "Invalid", "Node". - :vartype kind: str or ~azure.servicefabric.models.RepairTargetKind - :ivar node_names: The list of nodes targeted by a repair action. - :vartype node_names: list[str] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'node_names': {'key': 'NodeNames', 'type': '[str]'}, - } - - def __init__( - self, - *, - node_names: Optional[List[str]] = None, - **kwargs - ): - """ - :keyword node_names: The list of nodes targeted by a repair action. - :paramtype node_names: list[str] - """ - super(NodeRepairTargetDescription, self).__init__(**kwargs) - self.kind = 'Node' # type: str - self.node_names = node_names - - -class NodeResult(msrest.serialization.Model): - """Contains information about a node that was targeted by a user-induced operation. - - :ivar node_name: The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance_id: The node instance id. - :vartype node_instance_id: str - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - } - - def __init__( - self, - *, - node_name: Optional[str] = None, - node_instance_id: Optional[str] = None, - **kwargs - ): - """ - :keyword node_name: The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance_id: The node instance id. - :paramtype node_instance_id: str - """ - super(NodeResult, self).__init__(**kwargs) - self.node_name = node_name - self.node_instance_id = node_instance_id - - -class NodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for nodes, containing health evaluations for each unhealthy node that impacted current aggregated health state. Can be returned when evaluating cluster health and the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes from the - ClusterHealthPolicy. - :vartype max_percent_unhealthy_nodes: int - :ivar total_count: Total number of nodes found in the health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - max_percent_unhealthy_nodes: Optional[int] = None, - total_count: Optional[int] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes from the - ClusterHealthPolicy. - :paramtype max_percent_unhealthy_nodes: int - :keyword total_count: Total number of nodes found in the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(NodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'Nodes' # type: str - self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - - -class NodeTagsDescription(msrest.serialization.Model): - """Describes the tags required for placement or running of the service. - - All required parameters must be populated in order to send to Azure. - - :ivar count: Required. The number of tags. - :vartype count: int - :ivar tags: Required. A set of tags. Array of size specified by the ‘Count’ parameter, for the - placement tags of the service. - :vartype tags: list[str] - """ - - _validation = { - 'count': {'required': True}, - 'tags': {'required': True}, - } - - _attribute_map = { - 'count': {'key': 'Count', 'type': 'int'}, - 'tags': {'key': 'Tags', 'type': '[str]'}, - } - - def __init__( - self, - *, - count: int, - tags: List[str], - **kwargs - ): - """ - :keyword count: Required. The number of tags. - :paramtype count: int - :keyword tags: Required. A set of tags. Array of size specified by the ‘Count’ parameter, for - the placement tags of the service. - :paramtype tags: list[str] - """ - super(NodeTagsDescription, self).__init__(**kwargs) - self.count = count - self.tags = tags - - -class NodeTransitionProgress(msrest.serialization.Model): - """Information about an NodeTransition operation. This class contains an OperationState and a NodeTransitionResult. The NodeTransitionResult is not valid until OperationState -is Completed or Faulted. - - :ivar state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :vartype state: str or ~azure.servicefabric.models.OperationState - :ivar node_transition_result: Represents information about an operation in a terminal state - (Completed or Faulted). - :vartype node_transition_result: ~azure.servicefabric.models.NodeTransitionResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'node_transition_result': {'key': 'NodeTransitionResult', 'type': 'NodeTransitionResult'}, - } - - def __init__( - self, - *, - state: Optional[Union[str, "OperationState"]] = None, - node_transition_result: Optional["NodeTransitionResult"] = None, - **kwargs - ): - """ - :keyword state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :paramtype state: str or ~azure.servicefabric.models.OperationState - :keyword node_transition_result: Represents information about an operation in a terminal state - (Completed or Faulted). - :paramtype node_transition_result: ~azure.servicefabric.models.NodeTransitionResult - """ - super(NodeTransitionProgress, self).__init__(**kwargs) - self.state = state - self.node_transition_result = node_transition_result - - -class NodeTransitionResult(msrest.serialization.Model): - """Represents information about an operation in a terminal state (Completed or Faulted). - - :ivar error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, - this is an error code indicating the reason. - :vartype error_code: int - :ivar node_result: Contains information about a node that was targeted by a user-induced - operation. - :vartype node_result: ~azure.servicefabric.models.NodeResult - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'node_result': {'key': 'NodeResult', 'type': 'NodeResult'}, - } - - def __init__( - self, - *, - error_code: Optional[int] = None, - node_result: Optional["NodeResult"] = None, - **kwargs - ): - """ - :keyword error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, - this is an error code indicating the reason. - :paramtype error_code: int - :keyword node_result: Contains information about a node that was targeted by a user-induced - operation. - :paramtype node_result: ~azure.servicefabric.models.NodeResult - """ - super(NodeTransitionResult, self).__init__(**kwargs) - self.error_code = error_code - self.node_result = node_result - - -class NodeTypeHealthPolicyMapItem(msrest.serialization.Model): - """Defines an item in NodeTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :ivar key: Required. The key of the node type health policy map item. This is the name of the - node type. - :vartype key: str - :ivar value: Required. The value of the node type health policy map item. - If the percentage is respected but there is at least one unhealthy node in the node type, the - health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy nodes over the total number - of nodes in the node type. - The computation rounds up to tolerate one failure on small numbers of nodes. - The max percent unhealthy nodes allowed for the node type. Must be between zero and 100. - :vartype value: int - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'int'}, - } - - def __init__( - self, - *, - key: str, - value: int, - **kwargs - ): - """ - :keyword key: Required. The key of the node type health policy map item. This is the name of - the node type. - :paramtype key: str - :keyword value: Required. The value of the node type health policy map item. - If the percentage is respected but there is at least one unhealthy node in the node type, the - health is evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy nodes over the total number - of nodes in the node type. - The computation rounds up to tolerate one failure on small numbers of nodes. - The max percent unhealthy nodes allowed for the node type. Must be between zero and 100. - :paramtype value: int - """ - super(NodeTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = key - self.value = value - - -class NodeTypeNodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for nodes of a particular node type. The node type nodes evaluation can be returned when cluster health evaluation returns unhealthy aggregated health state, either Error or Warning. It contains health evaluations for each unhealthy node of the included node type that impacted current aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar node_type_name: The node type name as defined in the cluster manifest. - :vartype node_type_name: str - :ivar max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes for the node - type, specified as an entry in NodeTypeHealthPolicyMap. - :vartype max_percent_unhealthy_nodes: int - :ivar total_count: Total number of nodes of the node type found in the health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy NodeHealthEvaluation of this node type that impacted the - aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'node_type_name': {'key': 'NodeTypeName', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - node_type_name: Optional[str] = None, - max_percent_unhealthy_nodes: Optional[int] = None, - total_count: Optional[int] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword node_type_name: The node type name as defined in the cluster manifest. - :paramtype node_type_name: str - :keyword max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes for the - node type, specified as an entry in NodeTypeHealthPolicyMap. - :paramtype max_percent_unhealthy_nodes: int - :keyword total_count: Total number of nodes of the node type found in the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy NodeHealthEvaluation of this node type that impacted the - aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(NodeTypeNodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'NodeTypeNodes' # type: str - self.node_type_name = node_type_name - self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - - -class NodeUpEvent(NodeEvent): - """Node Up event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance: Required. Id of Node instance. - :vartype node_instance: long - :ivar last_node_down_at: Required. Time when Node was last down. - :vartype last_node_down_at: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'node_name': {'required': True}, - 'node_instance': {'required': True}, - 'last_node_down_at': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance': {'key': 'NodeInstance', 'type': 'long'}, - 'last_node_down_at': {'key': 'LastNodeDownAt', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - node_name: str, - node_instance: int, - last_node_down_at: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance: Required. Id of Node instance. - :paramtype node_instance: long - :keyword last_node_down_at: Required. Time when Node was last down. - :paramtype last_node_down_at: ~datetime.datetime - """ - super(NodeUpEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, node_name=node_name, **kwargs) - self.kind = 'NodeUp' # type: str - self.node_instance = node_instance - self.last_node_down_at = last_node_down_at - - -class NodeUpgradeProgressInfo(msrest.serialization.Model): - """Information about the upgrading node and its status. - - :ivar node_name: The name of a Service Fabric node. - :vartype node_name: str - :ivar upgrade_phase: The state of the upgrading node. Possible values include: "Invalid", - "PreUpgradeSafetyCheck", "Upgrading", "PostUpgradeSafetyCheck". - :vartype upgrade_phase: str or ~azure.servicefabric.models.NodeUpgradePhase - :ivar pending_safety_checks: List of pending safety checks. - :vartype pending_safety_checks: list[~azure.servicefabric.models.SafetyCheckWrapper] - :ivar upgrade_duration: The estimated time spent processing the node since it was deactivated - during a node-by-node upgrade. - :vartype upgrade_duration: str - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'upgrade_phase': {'key': 'UpgradePhase', 'type': 'str'}, - 'pending_safety_checks': {'key': 'PendingSafetyChecks', 'type': '[SafetyCheckWrapper]'}, - 'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'}, - } - - def __init__( - self, - *, - node_name: Optional[str] = None, - upgrade_phase: Optional[Union[str, "NodeUpgradePhase"]] = None, - pending_safety_checks: Optional[List["SafetyCheckWrapper"]] = None, - upgrade_duration: Optional[str] = None, - **kwargs - ): - """ - :keyword node_name: The name of a Service Fabric node. - :paramtype node_name: str - :keyword upgrade_phase: The state of the upgrading node. Possible values include: "Invalid", - "PreUpgradeSafetyCheck", "Upgrading", "PostUpgradeSafetyCheck". - :paramtype upgrade_phase: str or ~azure.servicefabric.models.NodeUpgradePhase - :keyword pending_safety_checks: List of pending safety checks. - :paramtype pending_safety_checks: list[~azure.servicefabric.models.SafetyCheckWrapper] - :keyword upgrade_duration: The estimated time spent processing the node since it was - deactivated during a node-by-node upgrade. - :paramtype upgrade_duration: str - """ - super(NodeUpgradeProgressInfo, self).__init__(**kwargs) - self.node_name = node_name - self.upgrade_phase = upgrade_phase - self.pending_safety_checks = pending_safety_checks - self.upgrade_duration = upgrade_duration - - -class OperationStatus(msrest.serialization.Model): - """Contains the OperationId, OperationState, and OperationType for user-induced operations. - - :ivar operation_id: A GUID that identifies a call to this API. This is also passed into the - corresponding GetProgress API. - :vartype operation_id: str - :ivar state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :vartype state: str or ~azure.servicefabric.models.OperationState - :ivar type: The type of the operation. Possible values include: "Invalid", "PartitionDataLoss", - "PartitionQuorumLoss", "PartitionRestart", "NodeTransition". - :vartype type: str or ~azure.servicefabric.models.OperationType - """ - - _attribute_map = { - 'operation_id': {'key': 'OperationId', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, - } - - def __init__( - self, - *, - operation_id: Optional[str] = None, - state: Optional[Union[str, "OperationState"]] = None, - type: Optional[Union[str, "OperationType"]] = None, - **kwargs - ): - """ - :keyword operation_id: A GUID that identifies a call to this API. This is also passed into the - corresponding GetProgress API. - :paramtype operation_id: str - :keyword state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :paramtype state: str or ~azure.servicefabric.models.OperationState - :keyword type: The type of the operation. Possible values include: "Invalid", - "PartitionDataLoss", "PartitionQuorumLoss", "PartitionRestart", "NodeTransition". - :paramtype type: str or ~azure.servicefabric.models.OperationType - """ - super(OperationStatus, self).__init__(**kwargs) - self.operation_id = operation_id - self.state = state - self.type = type - - -class PackageSharingPolicyInfo(msrest.serialization.Model): - """Represents a policy for the package sharing. - - :ivar shared_package_name: The name of code, configuration or data package that should be - shared. - :vartype shared_package_name: str - :ivar package_sharing_scope: Represents the scope for PackageSharingPolicy. This is specified - during DeployServicePackageToNode operation. Possible values include: "None", "All", "Code", - "Config", "Data". - :vartype package_sharing_scope: str or ~azure.servicefabric.models.PackageSharingPolicyScope - """ - - _attribute_map = { - 'shared_package_name': {'key': 'SharedPackageName', 'type': 'str'}, - 'package_sharing_scope': {'key': 'PackageSharingScope', 'type': 'str'}, - } - - def __init__( - self, - *, - shared_package_name: Optional[str] = None, - package_sharing_scope: Optional[Union[str, "PackageSharingPolicyScope"]] = None, - **kwargs - ): - """ - :keyword shared_package_name: The name of code, configuration or data package that should be - shared. - :paramtype shared_package_name: str - :keyword package_sharing_scope: Represents the scope for PackageSharingPolicy. This is - specified during DeployServicePackageToNode operation. Possible values include: "None", "All", - "Code", "Config", "Data". - :paramtype package_sharing_scope: str or ~azure.servicefabric.models.PackageSharingPolicyScope - """ - super(PackageSharingPolicyInfo, self).__init__(**kwargs) - self.shared_package_name = shared_package_name - self.package_sharing_scope = package_sharing_scope - - -class PagedApplicationInfoList(msrest.serialization.Model): - """The list of applications in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of application information. - :vartype items: list[~azure.servicefabric.models.ApplicationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationInfo]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["ApplicationInfo"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of application information. - :paramtype items: list[~azure.servicefabric.models.ApplicationInfo] - """ - super(PagedApplicationInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedApplicationResourceDescriptionList(msrest.serialization.Model): - """The list of application resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: One page of the list. - :vartype items: list[~azure.servicefabric.models.ApplicationResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationResourceDescription]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["ApplicationResourceDescription"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: One page of the list. - :paramtype items: list[~azure.servicefabric.models.ApplicationResourceDescription] - """ - super(PagedApplicationResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedApplicationTypeInfoList(msrest.serialization.Model): - """The list of application types that are provisioned or being provisioned in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of application type information. - :vartype items: list[~azure.servicefabric.models.ApplicationTypeInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ApplicationTypeInfo]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["ApplicationTypeInfo"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of application type information. - :paramtype items: list[~azure.servicefabric.models.ApplicationTypeInfo] - """ - super(PagedApplicationTypeInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedBackupConfigurationInfoList(msrest.serialization.Model): - """The list of backup configuration information. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of backup configuration information. - :vartype items: list[~azure.servicefabric.models.BackupConfigurationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupConfigurationInfo]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["BackupConfigurationInfo"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of backup configuration information. - :paramtype items: list[~azure.servicefabric.models.BackupConfigurationInfo] - """ - super(PagedBackupConfigurationInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedBackupEntityList(msrest.serialization.Model): - """The list of backup entities that are being periodically backed. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of backup entity information. - :vartype items: list[~azure.servicefabric.models.BackupEntity] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupEntity]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["BackupEntity"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of backup entity information. - :paramtype items: list[~azure.servicefabric.models.BackupEntity] - """ - super(PagedBackupEntityList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedBackupInfoList(msrest.serialization.Model): - """The list of backups. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of backup information. - :vartype items: list[~azure.servicefabric.models.BackupInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupInfo]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["BackupInfo"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of backup information. - :paramtype items: list[~azure.servicefabric.models.BackupInfo] - """ - super(PagedBackupInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedBackupPolicyDescriptionList(msrest.serialization.Model): - """The list of backup policies configured in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: The list of backup policies information. - :vartype items: list[~azure.servicefabric.models.BackupPolicyDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[BackupPolicyDescription]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["BackupPolicyDescription"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: The list of backup policies information. - :paramtype items: list[~azure.servicefabric.models.BackupPolicyDescription] - """ - super(PagedBackupPolicyDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedComposeDeploymentStatusInfoList(msrest.serialization.Model): - """The list of compose deployments in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of compose deployment status information. - :vartype items: list[~azure.servicefabric.models.ComposeDeploymentStatusInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ComposeDeploymentStatusInfo]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["ComposeDeploymentStatusInfo"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of compose deployment status information. - :paramtype items: list[~azure.servicefabric.models.ComposeDeploymentStatusInfo] - """ - super(PagedComposeDeploymentStatusInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedDeployedApplicationInfoList(msrest.serialization.Model): - """The list of deployed applications in activating, downloading, or active states on a node. -The list is paged when all of the results cannot fit in a single message. -The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of deployed application information. - :vartype items: list[~azure.servicefabric.models.DeployedApplicationInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[DeployedApplicationInfo]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["DeployedApplicationInfo"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of deployed application information. - :paramtype items: list[~azure.servicefabric.models.DeployedApplicationInfo] - """ - super(PagedDeployedApplicationInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedGatewayResourceDescriptionList(msrest.serialization.Model): - """The list of gateway resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: One page of the list. - :vartype items: list[~azure.servicefabric.models.GatewayResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[GatewayResourceDescription]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["GatewayResourceDescription"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: One page of the list. - :paramtype items: list[~azure.servicefabric.models.GatewayResourceDescription] - """ - super(PagedGatewayResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedNetworkResourceDescriptionList(msrest.serialization.Model): - """The list of network resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: One page of the list. - :vartype items: list[~azure.servicefabric.models.NetworkResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[NetworkResourceDescription]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["NetworkResourceDescription"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: One page of the list. - :paramtype items: list[~azure.servicefabric.models.NetworkResourceDescription] - """ - super(PagedNetworkResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedNodeInfoList(msrest.serialization.Model): - """The list of nodes in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of node information. - :vartype items: list[~azure.servicefabric.models.NodeInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[NodeInfo]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["NodeInfo"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of node information. - :paramtype items: list[~azure.servicefabric.models.NodeInfo] - """ - super(PagedNodeInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedPropertyInfoList(msrest.serialization.Model): - """The paged list of Service Fabric properties under a given name. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar is_consistent: Indicates whether any property under the given name has been modified - during the enumeration. If there was a modification, this property value is false. - :vartype is_consistent: bool - :ivar properties: List of property information. - :vartype properties: list[~azure.servicefabric.models.PropertyInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, - 'properties': {'key': 'Properties', 'type': '[PropertyInfo]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - is_consistent: Optional[bool] = None, - properties: Optional[List["PropertyInfo"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword is_consistent: Indicates whether any property under the given name has been modified - during the enumeration. If there was a modification, this property value is false. - :paramtype is_consistent: bool - :keyword properties: List of property information. - :paramtype properties: list[~azure.servicefabric.models.PropertyInfo] - """ - super(PagedPropertyInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.is_consistent = is_consistent - self.properties = properties - - -class PagedReplicaInfoList(msrest.serialization.Model): - """The list of replicas in the cluster for a given partition. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of replica information. - :vartype items: list[~azure.servicefabric.models.ReplicaInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ReplicaInfo]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["ReplicaInfo"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of replica information. - :paramtype items: list[~azure.servicefabric.models.ReplicaInfo] - """ - super(PagedReplicaInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedSecretResourceDescriptionList(msrest.serialization.Model): - """The list of secret resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: One page of the list. - :vartype items: list[~azure.servicefabric.models.SecretResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[SecretResourceDescription]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["SecretResourceDescription"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: One page of the list. - :paramtype items: list[~azure.servicefabric.models.SecretResourceDescription] - """ - super(PagedSecretResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedSecretValueResourceDescriptionList(msrest.serialization.Model): - """The list of values of a secret resource, paged if the number of results exceeds the limits of a single message. The next set of results can be obtained by executing the same query with the continuation token provided in the previous page. - - :ivar 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. - :vartype continuation_token: str - :ivar items: One page of the list. - :vartype items: list[~azure.servicefabric.models.SecretValueResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[SecretValueResourceDescription]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["SecretValueResourceDescription"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: One page of the list. - :paramtype items: list[~azure.servicefabric.models.SecretValueResourceDescription] - """ - super(PagedSecretValueResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedServiceInfoList(msrest.serialization.Model): - """The list of services in the cluster for an application. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of service information. - :vartype items: list[~azure.servicefabric.models.ServiceInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceInfo]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["ServiceInfo"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of service information. - :paramtype items: list[~azure.servicefabric.models.ServiceInfo] - """ - super(PagedServiceInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedServicePartitionInfoList(msrest.serialization.Model): - """The list of partition in the cluster for a service. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of service partition information. - :vartype items: list[~azure.servicefabric.models.ServicePartitionInfo] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServicePartitionInfo]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["ServicePartitionInfo"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of service partition information. - :paramtype items: list[~azure.servicefabric.models.ServicePartitionInfo] - """ - super(PagedServicePartitionInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedServiceReplicaDescriptionList(msrest.serialization.Model): - """The list of service resource replicas in the cluster. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of service resource replica description. - :vartype items: list[~azure.servicefabric.models.ServiceReplicaDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceReplicaDescription]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["ServiceReplicaDescription"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of service resource replica description. - :paramtype items: list[~azure.servicefabric.models.ServiceReplicaDescription] - """ - super(PagedServiceReplicaDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedServiceResourceDescriptionList(msrest.serialization.Model): - """The list of service resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: One page of the list. - :vartype items: list[~azure.servicefabric.models.ServiceResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[ServiceResourceDescription]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["ServiceResourceDescription"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: One page of the list. - :paramtype items: list[~azure.servicefabric.models.ServiceResourceDescription] - """ - super(PagedServiceResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedSubNameInfoList(msrest.serialization.Model): - """A paged list of Service Fabric names. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar is_consistent: Indicates whether any name under the given name has been modified during - the enumeration. If there was a modification, this property value is false. - :vartype is_consistent: bool - :ivar sub_names: List of the child names. - :vartype sub_names: list[str] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'is_consistent': {'key': 'IsConsistent', 'type': 'bool'}, - 'sub_names': {'key': 'SubNames', 'type': '[str]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - is_consistent: Optional[bool] = None, - sub_names: Optional[List[str]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword is_consistent: Indicates whether any name under the given name has been modified - during the enumeration. If there was a modification, this property value is false. - :paramtype is_consistent: bool - :keyword sub_names: List of the child names. - :paramtype sub_names: list[str] - """ - super(PagedSubNameInfoList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.is_consistent = is_consistent - self.sub_names = sub_names - - -class PagedUpdatePartitionLoadResultList(msrest.serialization.Model): - """The list of results of the call UpdatePartitionLoad. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: List of partition load update information. - :vartype items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[UpdatePartitionLoadResult]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["UpdatePartitionLoadResult"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: List of partition load update information. - :paramtype items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] - """ - super(PagedUpdatePartitionLoadResultList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PagedVolumeResourceDescriptionList(msrest.serialization.Model): - """The list of volume resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by executing the same query with the continuation token provided in this list. - - :ivar 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. - :vartype continuation_token: str - :ivar items: One page of the list. - :vartype items: list[~azure.servicefabric.models.VolumeResourceDescription] - """ - - _attribute_map = { - 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, - 'items': {'key': 'Items', 'type': '[VolumeResourceDescription]'}, - } - - def __init__( - self, - *, - continuation_token: Optional[str] = None, - items: Optional[List["VolumeResourceDescription"]] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype continuation_token: str - :keyword items: One page of the list. - :paramtype items: list[~azure.servicefabric.models.VolumeResourceDescription] - """ - super(PagedVolumeResourceDescriptionList, self).__init__(**kwargs) - self.continuation_token = continuation_token - self.items = items - - -class PartitionAnalysisEvent(PartitionEvent): - """Represents the base for all Partition Analysis Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PartitionPrimaryMoveAnalysisEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar metadata: Required. Metadata about an Analysis Event. - :vartype metadata: ~azure.servicefabric.models.AnalysisEventMetadata - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'metadata': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, - } - - _subtype_map = { - 'kind': {'PartitionPrimaryMoveAnalysis': 'PartitionPrimaryMoveAnalysisEvent'} - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - partition_id: str, - metadata: "AnalysisEventMetadata", - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword metadata: Required. Metadata about an Analysis Event. - :paramtype metadata: ~azure.servicefabric.models.AnalysisEventMetadata - """ - super(PartitionAnalysisEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.kind = 'PartitionAnalysisEvent' # type: str - self.metadata = metadata - - -class PartitionBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information, for a specific partition, specifying what backup policy is being applied and suspend description, if any. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The entity type of a Service Fabric entity such as Application, Service - or a Partition where periodic backups can be enabled.Constant filled by server. Possible values - include: "Invalid", "Partition", "Service", "Application". - :vartype kind: str or ~azure.servicefabric.models.BackupEntityKind - :ivar policy_name: The name of the backup policy which is applicable to this Service Fabric - application or service or partition. - :vartype policy_name: str - :ivar policy_inherited_from: Specifies the scope at which the backup policy is applied. - Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope - :ivar suspension_info: Describes the backup suspension details. - :vartype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :ivar service_name: The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar partition_id: The partition ID identifying the partition. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - *, - policy_name: Optional[str] = None, - policy_inherited_from: Optional[Union[str, "BackupPolicyScope"]] = None, - suspension_info: Optional["BackupSuspensionInfo"] = None, - service_name: Optional[str] = None, - partition_id: Optional[str] = None, - **kwargs - ): - """ - :keyword policy_name: The name of the backup policy which is applicable to this Service Fabric - application or service or partition. - :paramtype policy_name: str - :keyword policy_inherited_from: Specifies the scope at which the backup policy is applied. - Possible values include: "Invalid", "Partition", "Service", "Application". - :paramtype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope - :keyword suspension_info: Describes the backup suspension details. - :paramtype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :keyword service_name: The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword partition_id: The partition ID identifying the partition. - :paramtype partition_id: str - """ - super(PartitionBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) - self.kind = 'Partition' # type: str - self.service_name = service_name - self.partition_id = partition_id - - -class PartitionBackupEntity(BackupEntity): - """Identifies the Service Fabric stateful partition which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :ivar entity_kind: Required. The entity type of a Service Fabric entity such as Application, - Service or a Partition where periodic backups can be enabled.Constant filled by server. - Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype entity_kind: str or ~azure.servicefabric.models.BackupEntityKind - :ivar service_name: The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar partition_id: The partition ID identifying the partition. - :vartype partition_id: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - *, - service_name: Optional[str] = None, - partition_id: Optional[str] = None, - **kwargs - ): - """ - :keyword service_name: The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword partition_id: The partition ID identifying the partition. - :paramtype partition_id: str - """ - super(PartitionBackupEntity, self).__init__(**kwargs) - self.entity_kind = 'Partition' # type: str - self.service_name = service_name - self.partition_id = partition_id - - -class PartitionDataLossProgress(msrest.serialization.Model): - """Information about a partition data loss user-induced operation. - - :ivar state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :vartype state: str or ~azure.servicefabric.models.OperationState - :ivar invoke_data_loss_result: Represents information about an operation in a terminal state - (Completed or Faulted). - :vartype invoke_data_loss_result: ~azure.servicefabric.models.InvokeDataLossResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'invoke_data_loss_result': {'key': 'InvokeDataLossResult', 'type': 'InvokeDataLossResult'}, - } - - def __init__( - self, - *, - state: Optional[Union[str, "OperationState"]] = None, - invoke_data_loss_result: Optional["InvokeDataLossResult"] = None, - **kwargs - ): - """ - :keyword state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :paramtype state: str or ~azure.servicefabric.models.OperationState - :keyword invoke_data_loss_result: Represents information about an operation in a terminal state - (Completed or Faulted). - :paramtype invoke_data_loss_result: ~azure.servicefabric.models.InvokeDataLossResult - """ - super(PartitionDataLossProgress, self).__init__(**kwargs) - self.state = state - self.invoke_data_loss_result = invoke_data_loss_result - - -class PartitionHealth(EntityHealth): - """Information about the health of a Service Fabric partition. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar partition_id: ID of the partition whose health information is described by this object. - :vartype partition_id: str - :ivar replica_health_states: The list of replica health states associated with the partition. - :vartype replica_health_states: list[~azure.servicefabric.models.ReplicaHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_health_states': {'key': 'ReplicaHealthStates', 'type': '[ReplicaHealthState]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - health_events: Optional[List["HealthEvent"]] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - health_statistics: Optional["HealthStatistics"] = None, - partition_id: Optional[str] = None, - replica_health_states: Optional[List["ReplicaHealthState"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword partition_id: ID of the partition whose health information is described by this - object. - :paramtype partition_id: str - :keyword replica_health_states: The list of replica health states associated with the - partition. - :paramtype replica_health_states: list[~azure.servicefabric.models.ReplicaHealthState] - """ - super(PartitionHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.partition_id = partition_id - self.replica_health_states = replica_health_states - - -class PartitionHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a partition, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar partition_id: Id of the partition whose health evaluation is described by this object. - :vartype partition_id: str - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated - health state of the partition. The types of the unhealthy evaluations can be - ReplicasHealthEvaluation or EventHealthEvaluation. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - partition_id: Optional[str] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword partition_id: Id of the partition whose health evaluation is described by this object. - :paramtype partition_id: str - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current - aggregated health state of the partition. The types of the unhealthy evaluations can be - ReplicasHealthEvaluation or EventHealthEvaluation. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(PartitionHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'Partition' # type: str - self.partition_id = partition_id - self.unhealthy_evaluations = unhealthy_evaluations - - -class PartitionHealthReportExpiredEvent(PartitionEvent): - """Partition Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - partition_id: str, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(PartitionHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.kind = 'PartitionHealthReportExpired' # type: str - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class PartitionHealthState(EntityHealthState): - """Represents the health state of a partition, which contains the partition identifier and its aggregated health state. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar partition_id: Id of the partition whose health state is described by this object. - :vartype partition_id: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - partition_id: Optional[str] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword partition_id: Id of the partition whose health state is described by this object. - :paramtype partition_id: str - """ - super(PartitionHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.partition_id = partition_id - - -class PartitionHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a partition, which contains the partition ID, its aggregated health state and any replicas that respect the filters in the cluster health chunk query description. - - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar partition_id: The Id of the partition. - :vartype partition_id: str - :ivar replica_health_state_chunks: The list of replica health state chunks belonging to the - partition that respect the filters in the cluster health chunk query description. - :vartype replica_health_state_chunks: ~azure.servicefabric.models.ReplicaHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_health_state_chunks': {'key': 'ReplicaHealthStateChunks', 'type': 'ReplicaHealthStateChunkList'}, - } - - def __init__( - self, - *, - health_state: Optional[Union[str, "HealthState"]] = None, - partition_id: Optional[str] = None, - replica_health_state_chunks: Optional["ReplicaHealthStateChunkList"] = None, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword partition_id: The Id of the partition. - :paramtype partition_id: str - :keyword replica_health_state_chunks: The list of replica health state chunks belonging to the - partition that respect the filters in the cluster health chunk query description. - :paramtype replica_health_state_chunks: ~azure.servicefabric.models.ReplicaHealthStateChunkList - """ - super(PartitionHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.partition_id = partition_id - self.replica_health_state_chunks = replica_health_state_chunks - - -class PartitionHealthStateChunkList(msrest.serialization.Model): - """The list of partition health state chunks that respect the input filters in the chunk query description. -Returned by get cluster health state chunks query as part of the parent application hierarchy. - - :ivar items: The list of partition health state chunks that respect the input filters in the - chunk query. - :vartype items: list[~azure.servicefabric.models.PartitionHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[PartitionHealthStateChunk]'}, - } - - def __init__( - self, - *, - items: Optional[List["PartitionHealthStateChunk"]] = None, - **kwargs - ): - """ - :keyword items: The list of partition health state chunks that respect the input filters in the - chunk query. - :paramtype items: list[~azure.servicefabric.models.PartitionHealthStateChunk] - """ - super(PartitionHealthStateChunkList, self).__init__(**kwargs) - self.items = items - - -class PartitionHealthStateFilter(msrest.serialization.Model): - """Defines matching criteria to determine whether a partition should be included as a child of a service in the cluster health chunk. -The partitions are only returned if the parent entities match a filter specified in the cluster health chunk query description. The parent service and application must be included in the cluster health chunk. -One filter can match zero, one or multiple partitions, depending on its properties. - - :ivar partition_id_filter: ID of the partition that matches the filter. The filter is applied - only to the specified partition, if it exists. - If the partition doesn't exist, no partition is returned in the cluster health chunk based on - this filter. - If the partition exists, it is included in the cluster health chunk if it respects the other - filter properties. - If not specified, all partitions that match the parent filters (if any) are taken into - consideration and matched against the other filter members, like health state filter. - :vartype partition_id_filter: str - :ivar health_state_filter: The filter for the health state of the partitions. It allows - selecting partitions if they match the desired health states. - The possible values are integer value of one of the following health states. Only partitions - that match the filter are returned. All partitions are used to evaluate the cluster aggregated - health state. - If not specified, default value is None, unless the partition ID is specified. If the filter - has default value and partition ID is specified, the matching partition is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches partitions with HealthState value of OK - (2) and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :vartype health_state_filter: int - :ivar replica_filters: Defines a list of filters that specify which replicas to be included in - the returned cluster health chunk as children of the parent partition. The replicas are - returned only if the parent partition matches a filter. - If the list is empty, no replicas are returned. All the replicas are used to evaluate the - parent partition aggregated health state, regardless of the input filters. - The partition filter may specify multiple replica filters. - For example, it can specify a filter to return all replicas with health state Error and - another filter to always include a replica identified by its replica id. - :vartype replica_filters: list[~azure.servicefabric.models.ReplicaHealthStateFilter] - """ - - _attribute_map = { - 'partition_id_filter': {'key': 'PartitionIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'replica_filters': {'key': 'ReplicaFilters', 'type': '[ReplicaHealthStateFilter]'}, - } - - def __init__( - self, - *, - partition_id_filter: Optional[str] = None, - health_state_filter: Optional[int] = 0, - replica_filters: Optional[List["ReplicaHealthStateFilter"]] = None, - **kwargs - ): - """ - :keyword partition_id_filter: ID of the partition that matches the filter. The filter is - applied only to the specified partition, if it exists. - If the partition doesn't exist, no partition is returned in the cluster health chunk based on - this filter. - If the partition exists, it is included in the cluster health chunk if it respects the other - filter properties. - If not specified, all partitions that match the parent filters (if any) are taken into - consideration and matched against the other filter members, like health state filter. - :paramtype partition_id_filter: str - :keyword health_state_filter: The filter for the health state of the partitions. It allows - selecting partitions if they match the desired health states. - The possible values are integer value of one of the following health states. Only partitions - that match the filter are returned. All partitions are used to evaluate the cluster aggregated - health state. - If not specified, default value is None, unless the partition ID is specified. If the filter - has default value and partition ID is specified, the matching partition is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches partitions with HealthState value of OK - (2) and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :paramtype health_state_filter: int - :keyword replica_filters: Defines a list of filters that specify which replicas to be included - in the returned cluster health chunk as children of the parent partition. The replicas are - returned only if the parent partition matches a filter. - If the list is empty, no replicas are returned. All the replicas are used to evaluate the - parent partition aggregated health state, regardless of the input filters. - The partition filter may specify multiple replica filters. - For example, it can specify a filter to return all replicas with health state Error and - another filter to always include a replica identified by its replica id. - :paramtype replica_filters: list[~azure.servicefabric.models.ReplicaHealthStateFilter] - """ - super(PartitionHealthStateFilter, self).__init__(**kwargs) - self.partition_id_filter = partition_id_filter - self.health_state_filter = health_state_filter - self.replica_filters = replica_filters - - -class PartitionInstanceCountScaleMechanism(ScalingMechanismDescription): - """Represents a scaling mechanism for adding or removing instances of stateless service partition. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. Specifies the kind of scaling mechanism.Constant filled by server. - Possible values include: "Invalid", "PartitionInstanceCount", - "AddRemoveIncrementalNamedPartition". - :vartype kind: str or ~azure.servicefabric.models.ScalingMechanismKind - :ivar min_instance_count: Required. Minimum number of instances of the partition. - :vartype min_instance_count: int - :ivar max_instance_count: Required. Maximum number of instances of the partition. - :vartype max_instance_count: int - :ivar scale_increment: Required. The number of instances to add or remove during a scaling - operation. - :vartype scale_increment: int - """ - - _validation = { - 'kind': {'required': True}, - 'min_instance_count': {'required': True}, - 'max_instance_count': {'required': True}, - 'scale_increment': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'max_instance_count': {'key': 'MaxInstanceCount', 'type': 'int'}, - 'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'}, - } - - def __init__( - self, - *, - min_instance_count: int, - max_instance_count: int, - scale_increment: int, - **kwargs - ): - """ - :keyword min_instance_count: Required. Minimum number of instances of the partition. - :paramtype min_instance_count: int - :keyword max_instance_count: Required. Maximum number of instances of the partition. - :paramtype max_instance_count: int - :keyword scale_increment: Required. The number of instances to add or remove during a scaling - operation. - :paramtype scale_increment: int - """ - super(PartitionInstanceCountScaleMechanism, self).__init__(**kwargs) - self.kind = 'PartitionInstanceCount' # type: str - self.min_instance_count = min_instance_count - self.max_instance_count = max_instance_count - self.scale_increment = scale_increment - - -class PartitionLoadInformation(msrest.serialization.Model): - """Represents load information for a partition, which contains the primary, secondary and auxiliary reported load metrics. -In case there is no load reported, PartitionLoadInformation will contain the default load for the service of the partition. -For default loads, LoadMetricReport's LastReportedUtc is set to 0. - - :ivar partition_id: Id of the partition. - :vartype partition_id: str - :ivar primary_load_metric_reports: Array of load reports from the primary replica for this - partition. - :vartype primary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] - :ivar secondary_load_metric_reports: Array of aggregated load reports from all secondary - replicas for this partition. - Array only contains the latest reported load for each metric. - :vartype secondary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] - :ivar auxiliary_load_metric_reports: Array of aggregated load reports from all auxiliary - replicas for this partition. - Array only contains the latest reported load for each metric. - :vartype auxiliary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'primary_load_metric_reports': {'key': 'PrimaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - 'secondary_load_metric_reports': {'key': 'SecondaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - 'auxiliary_load_metric_reports': {'key': 'AuxiliaryLoadMetricReports', 'type': '[LoadMetricReport]'}, - } - - def __init__( - self, - *, - partition_id: Optional[str] = None, - primary_load_metric_reports: Optional[List["LoadMetricReport"]] = None, - secondary_load_metric_reports: Optional[List["LoadMetricReport"]] = None, - auxiliary_load_metric_reports: Optional[List["LoadMetricReport"]] = None, - **kwargs - ): - """ - :keyword partition_id: Id of the partition. - :paramtype partition_id: str - :keyword primary_load_metric_reports: Array of load reports from the primary replica for this - partition. - :paramtype primary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] - :keyword secondary_load_metric_reports: Array of aggregated load reports from all secondary - replicas for this partition. - Array only contains the latest reported load for each metric. - :paramtype secondary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] - :keyword auxiliary_load_metric_reports: Array of aggregated load reports from all auxiliary - replicas for this partition. - Array only contains the latest reported load for each metric. - :paramtype auxiliary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] - """ - super(PartitionLoadInformation, self).__init__(**kwargs) - self.partition_id = partition_id - self.primary_load_metric_reports = primary_load_metric_reports - self.secondary_load_metric_reports = secondary_load_metric_reports - self.auxiliary_load_metric_reports = auxiliary_load_metric_reports - - -class PartitionMetricLoadDescription(msrest.serialization.Model): - """Represents load information for a partition, which contains the metrics load information about primary, all secondary replicas/instances or a specific secondary replica/instance on a specific node , all auxiliary replicas or a specific auxiliary replica on a specific node. - - :ivar partition_id: Id of the partition. - :vartype partition_id: str - :ivar primary_replica_load_entries: Partition's load information for primary replica, in case - partition is from a stateful service. - :vartype primary_replica_load_entries: list[~azure.servicefabric.models.MetricLoadDescription] - :ivar secondary_replicas_or_instances_load_entries: Partition's load information for all - secondary replicas or instances. - :vartype secondary_replicas_or_instances_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :ivar secondary_replica_or_instance_load_entries_per_node: Partition's load information for a - specific secondary replica or instance located on a specific node. - :vartype secondary_replica_or_instance_load_entries_per_node: - list[~azure.servicefabric.models.ReplicaMetricLoadDescription] - :ivar auxiliary_replicas_load_entries: Partition's load information for all auxiliary replicas. - :vartype auxiliary_replicas_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :ivar auxiliary_replica_load_entries_per_node: Partition's load information for a specific - auxiliary replica located on a specific node. - :vartype auxiliary_replica_load_entries_per_node: - list[~azure.servicefabric.models.ReplicaMetricLoadDescription] - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'primary_replica_load_entries': {'key': 'PrimaryReplicaLoadEntries', 'type': '[MetricLoadDescription]'}, - 'secondary_replicas_or_instances_load_entries': {'key': 'SecondaryReplicasOrInstancesLoadEntries', 'type': '[MetricLoadDescription]'}, - 'secondary_replica_or_instance_load_entries_per_node': {'key': 'SecondaryReplicaOrInstanceLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, - 'auxiliary_replicas_load_entries': {'key': 'AuxiliaryReplicasLoadEntries', 'type': '[MetricLoadDescription]'}, - 'auxiliary_replica_load_entries_per_node': {'key': 'AuxiliaryReplicaLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, - } - - def __init__( - self, - *, - partition_id: Optional[str] = None, - primary_replica_load_entries: Optional[List["MetricLoadDescription"]] = None, - secondary_replicas_or_instances_load_entries: Optional[List["MetricLoadDescription"]] = None, - secondary_replica_or_instance_load_entries_per_node: Optional[List["ReplicaMetricLoadDescription"]] = None, - auxiliary_replicas_load_entries: Optional[List["MetricLoadDescription"]] = None, - auxiliary_replica_load_entries_per_node: Optional[List["ReplicaMetricLoadDescription"]] = None, - **kwargs - ): - """ - :keyword partition_id: Id of the partition. - :paramtype partition_id: str - :keyword primary_replica_load_entries: Partition's load information for primary replica, in - case partition is from a stateful service. - :paramtype primary_replica_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :keyword secondary_replicas_or_instances_load_entries: Partition's load information for all - secondary replicas or instances. - :paramtype secondary_replicas_or_instances_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :keyword secondary_replica_or_instance_load_entries_per_node: Partition's load information for - a specific secondary replica or instance located on a specific node. - :paramtype secondary_replica_or_instance_load_entries_per_node: - list[~azure.servicefabric.models.ReplicaMetricLoadDescription] - :keyword auxiliary_replicas_load_entries: Partition's load information for all auxiliary - replicas. - :paramtype auxiliary_replicas_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - :keyword auxiliary_replica_load_entries_per_node: Partition's load information for a specific - auxiliary replica located on a specific node. - :paramtype auxiliary_replica_load_entries_per_node: - list[~azure.servicefabric.models.ReplicaMetricLoadDescription] - """ - super(PartitionMetricLoadDescription, self).__init__(**kwargs) - self.partition_id = partition_id - self.primary_replica_load_entries = primary_replica_load_entries - self.secondary_replicas_or_instances_load_entries = secondary_replicas_or_instances_load_entries - self.secondary_replica_or_instance_load_entries_per_node = secondary_replica_or_instance_load_entries_per_node - self.auxiliary_replicas_load_entries = auxiliary_replicas_load_entries - self.auxiliary_replica_load_entries_per_node = auxiliary_replica_load_entries_per_node - - -class PartitionNewHealthReportEvent(PartitionEvent): - """Partition Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - partition_id: str, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(PartitionNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.kind = 'PartitionNewHealthReport' # type: str - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class PartitionPrimaryMoveAnalysisEvent(PartitionAnalysisEvent): - """Partition Primary Move Analysis event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar metadata: Required. Metadata about an Analysis Event. - :vartype metadata: ~azure.servicefabric.models.AnalysisEventMetadata - :ivar when_move_completed: Required. Time when the move was completed. - :vartype when_move_completed: ~datetime.datetime - :ivar previous_node: Required. The name of a Service Fabric node. - :vartype previous_node: str - :ivar current_node: Required. The name of a Service Fabric node. - :vartype current_node: str - :ivar move_reason: Required. Move reason. - :vartype move_reason: str - :ivar relevant_traces: Required. Relevant traces. - :vartype relevant_traces: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'metadata': {'required': True}, - 'when_move_completed': {'required': True}, - 'previous_node': {'required': True}, - 'current_node': {'required': True}, - 'move_reason': {'required': True}, - 'relevant_traces': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'metadata': {'key': 'Metadata', 'type': 'AnalysisEventMetadata'}, - 'when_move_completed': {'key': 'WhenMoveCompleted', 'type': 'iso-8601'}, - 'previous_node': {'key': 'PreviousNode', 'type': 'str'}, - 'current_node': {'key': 'CurrentNode', 'type': 'str'}, - 'move_reason': {'key': 'MoveReason', 'type': 'str'}, - 'relevant_traces': {'key': 'RelevantTraces', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - partition_id: str, - metadata: "AnalysisEventMetadata", - when_move_completed: datetime.datetime, - previous_node: str, - current_node: str, - move_reason: str, - relevant_traces: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword metadata: Required. Metadata about an Analysis Event. - :paramtype metadata: ~azure.servicefabric.models.AnalysisEventMetadata - :keyword when_move_completed: Required. Time when the move was completed. - :paramtype when_move_completed: ~datetime.datetime - :keyword previous_node: Required. The name of a Service Fabric node. - :paramtype previous_node: str - :keyword current_node: Required. The name of a Service Fabric node. - :paramtype current_node: str - :keyword move_reason: Required. Move reason. - :paramtype move_reason: str - :keyword relevant_traces: Required. Relevant traces. - :paramtype relevant_traces: str - """ - super(PartitionPrimaryMoveAnalysisEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, metadata=metadata, **kwargs) - self.kind = 'PartitionPrimaryMoveAnalysis' # type: str - self.when_move_completed = when_move_completed - self.previous_node = previous_node - self.current_node = current_node - self.move_reason = move_reason - self.relevant_traces = relevant_traces - - -class PartitionQuorumLossProgress(msrest.serialization.Model): - """Information about a partition quorum loss user-induced operation. - - :ivar state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :vartype state: str or ~azure.servicefabric.models.OperationState - :ivar invoke_quorum_loss_result: Represents information about an operation in a terminal state - (Completed or Faulted). - :vartype invoke_quorum_loss_result: ~azure.servicefabric.models.InvokeQuorumLossResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'invoke_quorum_loss_result': {'key': 'InvokeQuorumLossResult', 'type': 'InvokeQuorumLossResult'}, - } - - def __init__( - self, - *, - state: Optional[Union[str, "OperationState"]] = None, - invoke_quorum_loss_result: Optional["InvokeQuorumLossResult"] = None, - **kwargs - ): - """ - :keyword state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :paramtype state: str or ~azure.servicefabric.models.OperationState - :keyword invoke_quorum_loss_result: Represents information about an operation in a terminal - state (Completed or Faulted). - :paramtype invoke_quorum_loss_result: ~azure.servicefabric.models.InvokeQuorumLossResult - """ - super(PartitionQuorumLossProgress, self).__init__(**kwargs) - self.state = state - self.invoke_quorum_loss_result = invoke_quorum_loss_result - - -class PartitionReconfiguredEvent(PartitionEvent): - """Partition Reconfiguration event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar node_name: Required. The name of a Service Fabric node. - :vartype node_name: str - :ivar node_instance_id: Required. Id of Node instance. - :vartype node_instance_id: str - :ivar service_type: Required. Type of Service. - :vartype service_type: str - :ivar cc_epoch_data_loss_version: Required. CcEpochDataLoss version. - :vartype cc_epoch_data_loss_version: long - :ivar cc_epoch_config_version: Required. CcEpochConfig version. - :vartype cc_epoch_config_version: long - :ivar reconfig_type: Required. Type of reconfiguration. - :vartype reconfig_type: str - :ivar result: Required. Describes reconfiguration result. - :vartype result: str - :ivar phase0_duration_ms: Required. Duration of Phase0 in milli-seconds. - :vartype phase0_duration_ms: float - :ivar phase1_duration_ms: Required. Duration of Phase1 in milli-seconds. - :vartype phase1_duration_ms: float - :ivar phase2_duration_ms: Required. Duration of Phase2 in milli-seconds. - :vartype phase2_duration_ms: float - :ivar phase3_duration_ms: Required. Duration of Phase3 in milli-seconds. - :vartype phase3_duration_ms: float - :ivar phase4_duration_ms: Required. Duration of Phase4 in milli-seconds. - :vartype phase4_duration_ms: float - :ivar total_duration_ms: Required. Total duration in milli-seconds. - :vartype total_duration_ms: float - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'node_name': {'required': True}, - 'node_instance_id': {'required': True}, - 'service_type': {'required': True}, - 'cc_epoch_data_loss_version': {'required': True}, - 'cc_epoch_config_version': {'required': True}, - 'reconfig_type': {'required': True}, - 'result': {'required': True}, - 'phase0_duration_ms': {'required': True}, - 'phase1_duration_ms': {'required': True}, - 'phase2_duration_ms': {'required': True}, - 'phase3_duration_ms': {'required': True}, - 'phase4_duration_ms': {'required': True}, - 'total_duration_ms': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - 'service_type': {'key': 'ServiceType', 'type': 'str'}, - 'cc_epoch_data_loss_version': {'key': 'CcEpochDataLossVersion', 'type': 'long'}, - 'cc_epoch_config_version': {'key': 'CcEpochConfigVersion', 'type': 'long'}, - 'reconfig_type': {'key': 'ReconfigType', 'type': 'str'}, - 'result': {'key': 'Result', 'type': 'str'}, - 'phase0_duration_ms': {'key': 'Phase0DurationMs', 'type': 'float'}, - 'phase1_duration_ms': {'key': 'Phase1DurationMs', 'type': 'float'}, - 'phase2_duration_ms': {'key': 'Phase2DurationMs', 'type': 'float'}, - 'phase3_duration_ms': {'key': 'Phase3DurationMs', 'type': 'float'}, - 'phase4_duration_ms': {'key': 'Phase4DurationMs', 'type': 'float'}, - 'total_duration_ms': {'key': 'TotalDurationMs', 'type': 'float'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - partition_id: str, - node_name: str, - node_instance_id: str, - service_type: str, - cc_epoch_data_loss_version: int, - cc_epoch_config_version: int, - reconfig_type: str, - result: str, - phase0_duration_ms: float, - phase1_duration_ms: float, - phase2_duration_ms: float, - phase3_duration_ms: float, - phase4_duration_ms: float, - total_duration_ms: float, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword node_name: Required. The name of a Service Fabric node. - :paramtype node_name: str - :keyword node_instance_id: Required. Id of Node instance. - :paramtype node_instance_id: str - :keyword service_type: Required. Type of Service. - :paramtype service_type: str - :keyword cc_epoch_data_loss_version: Required. CcEpochDataLoss version. - :paramtype cc_epoch_data_loss_version: long - :keyword cc_epoch_config_version: Required. CcEpochConfig version. - :paramtype cc_epoch_config_version: long - :keyword reconfig_type: Required. Type of reconfiguration. - :paramtype reconfig_type: str - :keyword result: Required. Describes reconfiguration result. - :paramtype result: str - :keyword phase0_duration_ms: Required. Duration of Phase0 in milli-seconds. - :paramtype phase0_duration_ms: float - :keyword phase1_duration_ms: Required. Duration of Phase1 in milli-seconds. - :paramtype phase1_duration_ms: float - :keyword phase2_duration_ms: Required. Duration of Phase2 in milli-seconds. - :paramtype phase2_duration_ms: float - :keyword phase3_duration_ms: Required. Duration of Phase3 in milli-seconds. - :paramtype phase3_duration_ms: float - :keyword phase4_duration_ms: Required. Duration of Phase4 in milli-seconds. - :paramtype phase4_duration_ms: float - :keyword total_duration_ms: Required. Total duration in milli-seconds. - :paramtype total_duration_ms: float - """ - super(PartitionReconfiguredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, **kwargs) - self.kind = 'PartitionReconfigured' # type: str - self.node_name = node_name - self.node_instance_id = node_instance_id - self.service_type = service_type - self.cc_epoch_data_loss_version = cc_epoch_data_loss_version - self.cc_epoch_config_version = cc_epoch_config_version - self.reconfig_type = reconfig_type - self.result = result - self.phase0_duration_ms = phase0_duration_ms - self.phase1_duration_ms = phase1_duration_ms - self.phase2_duration_ms = phase2_duration_ms - self.phase3_duration_ms = phase3_duration_ms - self.phase4_duration_ms = phase4_duration_ms - self.total_duration_ms = total_duration_ms - - -class PartitionRestartProgress(msrest.serialization.Model): - """Information about a partition restart user-induced operation. - - :ivar state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :vartype state: str or ~azure.servicefabric.models.OperationState - :ivar restart_partition_result: Represents information about an operation in a terminal state - (Completed or Faulted). - :vartype restart_partition_result: ~azure.servicefabric.models.RestartPartitionResult - """ - - _attribute_map = { - 'state': {'key': 'State', 'type': 'str'}, - 'restart_partition_result': {'key': 'RestartPartitionResult', 'type': 'RestartPartitionResult'}, - } - - def __init__( - self, - *, - state: Optional[Union[str, "OperationState"]] = None, - restart_partition_result: Optional["RestartPartitionResult"] = None, - **kwargs - ): - """ - :keyword state: The state of the operation. Possible values include: "Invalid", "Running", - "RollingBack", "Completed", "Faulted", "Cancelled", "ForceCancelled". - :paramtype state: str or ~azure.servicefabric.models.OperationState - :keyword restart_partition_result: Represents information about an operation in a terminal - state (Completed or Faulted). - :paramtype restart_partition_result: ~azure.servicefabric.models.RestartPartitionResult - """ - super(PartitionRestartProgress, self).__init__(**kwargs) - self.state = state - self.restart_partition_result = restart_partition_result - - -class PartitionsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for the partitions of a service, containing health evaluations for each unhealthy partition that impacts current aggregated health state. Can be returned when evaluating service health and the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar max_percent_unhealthy_partitions_per_service: Maximum allowed percentage of unhealthy - partitions per service from the ServiceTypeHealthPolicy. - :vartype max_percent_unhealthy_partitions_per_service: int - :ivar total_count: Total number of partitions of the service from the health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy PartitionHealthEvaluation that impacted the aggregated - health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - max_percent_unhealthy_partitions_per_service: Optional[int] = None, - total_count: Optional[int] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword max_percent_unhealthy_partitions_per_service: Maximum allowed percentage of unhealthy - partitions per service from the ServiceTypeHealthPolicy. - :paramtype max_percent_unhealthy_partitions_per_service: int - :keyword total_count: Total number of partitions of the service from the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy PartitionHealthEvaluation that impacted the aggregated - health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(PartitionsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'Partitions' # type: str - self.max_percent_unhealthy_partitions_per_service = max_percent_unhealthy_partitions_per_service - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - - -class ReplicatorStatus(msrest.serialization.Model): - """Represents a base class for primary or secondary replicator status. -Contains information about the service fabric replicator like the replication/copy queue utilization, last acknowledgement received timestamp, etc. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PrimaryReplicatorStatus, SecondaryReplicatorStatus. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. - Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", - "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". - :vartype kind: str or ~azure.servicefabric.models.ReplicaRole - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'Primary': 'PrimaryReplicatorStatus', 'SecondaryReplicatorStatus': 'SecondaryReplicatorStatus'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ReplicatorStatus, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - - -class PrimaryReplicatorStatus(ReplicatorStatus): - """Provides statistics about the Service Fabric Replicator, when it is functioning in a Primary role. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. - Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", - "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". - :vartype kind: str or ~azure.servicefabric.models.ReplicaRole - :ivar replication_queue_status: Details about the replication queue on the primary replicator. - :vartype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :ivar remote_replicators: The status of all the active and idle secondary replicators that the - primary is aware of. - :vartype remote_replicators: list[~azure.servicefabric.models.RemoteReplicatorStatus] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'remote_replicators': {'key': 'RemoteReplicators', 'type': '[RemoteReplicatorStatus]'}, - } - - def __init__( - self, - *, - replication_queue_status: Optional["ReplicatorQueueStatus"] = None, - remote_replicators: Optional[List["RemoteReplicatorStatus"]] = None, - **kwargs - ): - """ - :keyword replication_queue_status: Details about the replication queue on the primary - replicator. - :paramtype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :keyword remote_replicators: The status of all the active and idle secondary replicators that - the primary is aware of. - :paramtype remote_replicators: list[~azure.servicefabric.models.RemoteReplicatorStatus] - """ - super(PrimaryReplicatorStatus, self).__init__(**kwargs) - self.kind = 'Primary' # type: str - self.replication_queue_status = replication_queue_status - self.remote_replicators = remote_replicators - - -class Probe(msrest.serialization.Model): - """Probes have a number of fields that you can use to control their behavior. - - :ivar initial_delay_seconds: The initial delay in seconds to start executing probe once - codepackage has started. - :vartype initial_delay_seconds: int - :ivar period_seconds: Periodic seconds to execute probe. - :vartype period_seconds: int - :ivar timeout_seconds: Period after which probe is considered as failed if it hasn't completed - successfully. - :vartype timeout_seconds: int - :ivar success_threshold: The count of successful probe executions after which probe is - considered success. - :vartype success_threshold: int - :ivar failure_threshold: The count of failures after which probe is considered failed. - :vartype failure_threshold: int - :ivar exec_property: Exec command to run inside the container. - :vartype exec_property: ~azure.servicefabric.models.ProbeExec - :ivar http_get: Http probe for the container. - :vartype http_get: ~azure.servicefabric.models.ProbeHttpGet - :ivar tcp_socket: Tcp port to probe inside the container. - :vartype tcp_socket: ~azure.servicefabric.models.ProbeTcpSocket - """ - - _attribute_map = { - 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, - 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, - 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, - 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, - 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, - 'exec_property': {'key': 'exec', 'type': 'ProbeExec'}, - 'http_get': {'key': 'httpGet', 'type': 'ProbeHttpGet'}, - 'tcp_socket': {'key': 'tcpSocket', 'type': 'ProbeTcpSocket'}, - } - - def __init__( - self, - *, - initial_delay_seconds: Optional[int] = 0, - period_seconds: Optional[int] = 10, - timeout_seconds: Optional[int] = 1, - success_threshold: Optional[int] = 1, - failure_threshold: Optional[int] = 3, - exec_property: Optional["ProbeExec"] = None, - http_get: Optional["ProbeHttpGet"] = None, - tcp_socket: Optional["ProbeTcpSocket"] = None, - **kwargs - ): - """ - :keyword initial_delay_seconds: The initial delay in seconds to start executing probe once - codepackage has started. - :paramtype initial_delay_seconds: int - :keyword period_seconds: Periodic seconds to execute probe. - :paramtype period_seconds: int - :keyword timeout_seconds: Period after which probe is considered as failed if it hasn't - completed successfully. - :paramtype timeout_seconds: int - :keyword success_threshold: The count of successful probe executions after which probe is - considered success. - :paramtype success_threshold: int - :keyword failure_threshold: The count of failures after which probe is considered failed. - :paramtype failure_threshold: int - :keyword exec_property: Exec command to run inside the container. - :paramtype exec_property: ~azure.servicefabric.models.ProbeExec - :keyword http_get: Http probe for the container. - :paramtype http_get: ~azure.servicefabric.models.ProbeHttpGet - :keyword tcp_socket: Tcp port to probe inside the container. - :paramtype tcp_socket: ~azure.servicefabric.models.ProbeTcpSocket - """ - super(Probe, self).__init__(**kwargs) - self.initial_delay_seconds = initial_delay_seconds - self.period_seconds = period_seconds - self.timeout_seconds = timeout_seconds - self.success_threshold = success_threshold - self.failure_threshold = failure_threshold - self.exec_property = exec_property - self.http_get = http_get - self.tcp_socket = tcp_socket - - -class ProbeExec(msrest.serialization.Model): - """Exec command to run inside the container. - - All required parameters must be populated in order to send to Azure. - - :ivar command: Required. Comma separated command to run inside the container for example "sh, - -c, echo hello world". - :vartype command: str - """ - - _validation = { - 'command': {'required': True}, - } - - _attribute_map = { - 'command': {'key': 'command', 'type': 'str'}, - } - - def __init__( - self, - *, - command: str, - **kwargs - ): - """ - :keyword command: Required. Comma separated command to run inside the container for example - "sh, -c, echo hello world". - :paramtype command: str - """ - super(ProbeExec, self).__init__(**kwargs) - self.command = command - - -class ProbeHttpGet(msrest.serialization.Model): - """Http probe for the container. - - All required parameters must be populated in order to send to Azure. - - :ivar port: Required. Port to access for probe. - :vartype port: int - :ivar path: Path to access on the HTTP request. - :vartype path: str - :ivar host: Host IP to connect to. - :vartype host: str - :ivar http_headers: Headers to set in the request. - :vartype http_headers: list[~azure.servicefabric.models.ProbeHttpGetHeaders] - :ivar scheme: Scheme for the http probe. Can be Http or Https. Possible values include: "http", - "https". - :vartype scheme: str or ~azure.servicefabric.models.Scheme - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'port': {'key': 'port', 'type': 'int'}, - 'path': {'key': 'path', 'type': 'str'}, - 'host': {'key': 'host', 'type': 'str'}, - 'http_headers': {'key': 'httpHeaders', 'type': '[ProbeHttpGetHeaders]'}, - 'scheme': {'key': 'scheme', 'type': 'str'}, - } - - def __init__( - self, - *, - port: int, - path: Optional[str] = None, - host: Optional[str] = None, - http_headers: Optional[List["ProbeHttpGetHeaders"]] = None, - scheme: Optional[Union[str, "Scheme"]] = None, - **kwargs - ): - """ - :keyword port: Required. Port to access for probe. - :paramtype port: int - :keyword path: Path to access on the HTTP request. - :paramtype path: str - :keyword host: Host IP to connect to. - :paramtype host: str - :keyword http_headers: Headers to set in the request. - :paramtype http_headers: list[~azure.servicefabric.models.ProbeHttpGetHeaders] - :keyword scheme: Scheme for the http probe. Can be Http or Https. Possible values include: - "http", "https". - :paramtype scheme: str or ~azure.servicefabric.models.Scheme - """ - super(ProbeHttpGet, self).__init__(**kwargs) - self.port = port - self.path = path - self.host = host - self.http_headers = http_headers - self.scheme = scheme - - -class ProbeHttpGetHeaders(msrest.serialization.Model): - """Http headers. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the header. - :vartype name: str - :ivar value: Required. The value of the header. - :vartype 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 - ): - """ - :keyword name: Required. The name of the header. - :paramtype name: str - :keyword value: Required. The value of the header. - :paramtype value: str - """ - super(ProbeHttpGetHeaders, self).__init__(**kwargs) - self.name = name - self.value = value - - -class ProbeTcpSocket(msrest.serialization.Model): - """Tcp port to probe inside the container. - - All required parameters must be populated in order to send to Azure. - - :ivar port: Required. Port to access for probe. - :vartype port: int - """ - - _validation = { - 'port': {'required': True}, - } - - _attribute_map = { - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - *, - port: int, - **kwargs - ): - """ - :keyword port: Required. Port to access for probe. - :paramtype port: int - """ - super(ProbeTcpSocket, self).__init__(**kwargs) - self.port = port - - -class PropertyBatchDescriptionList(msrest.serialization.Model): - """Describes a list of property batch operations to be executed. Either all or none of the operations will be committed. - - :ivar operations: A list of the property batch operations to be executed. - :vartype operations: list[~azure.servicefabric.models.PropertyBatchOperation] - """ - - _attribute_map = { - 'operations': {'key': 'Operations', 'type': '[PropertyBatchOperation]'}, - } - - def __init__( - self, - *, - operations: Optional[List["PropertyBatchOperation"]] = None, - **kwargs - ): - """ - :keyword operations: A list of the property batch operations to be executed. - :paramtype operations: list[~azure.servicefabric.models.PropertyBatchOperation] - """ - super(PropertyBatchDescriptionList, self).__init__(**kwargs) - self.operations = operations - - -class PropertyDescription(msrest.serialization.Model): - """Description of a Service Fabric property. - - All required parameters must be populated in order to send to Azure. - - :ivar property_name: Required. The name of the Service Fabric property. - :vartype property_name: str - :ivar 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. - :vartype custom_type_id: str - :ivar value: Required. Describes a Service Fabric property value. - :vartype value: ~azure.servicefabric.models.PropertyValue - """ - - _validation = { - 'property_name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - } - - def __init__( - self, - *, - property_name: str, - value: "PropertyValue", - custom_type_id: Optional[str] = None, - **kwargs - ): - """ - :keyword property_name: Required. The name of the Service Fabric property. - :paramtype property_name: str - :keyword 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. - :paramtype custom_type_id: str - :keyword value: Required. Describes a Service Fabric property value. - :paramtype value: ~azure.servicefabric.models.PropertyValue - """ - super(PropertyDescription, self).__init__(**kwargs) - self.property_name = property_name - self.custom_type_id = custom_type_id - self.value = value - - -class PropertyInfo(msrest.serialization.Model): - """Information about a Service Fabric property. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the Service Fabric property. - :vartype name: str - :ivar value: Describes a Service Fabric property value. - :vartype value: ~azure.servicefabric.models.PropertyValue - :ivar metadata: Required. The metadata associated with a property, including the property's - name. - :vartype metadata: ~azure.servicefabric.models.PropertyMetadata - """ - - _validation = { - 'name': {'required': True}, - 'metadata': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - 'metadata': {'key': 'Metadata', 'type': 'PropertyMetadata'}, - } - - def __init__( - self, - *, - name: str, - metadata: "PropertyMetadata", - value: Optional["PropertyValue"] = None, - **kwargs - ): - """ - :keyword name: Required. The name of the Service Fabric property. - :paramtype name: str - :keyword value: Describes a Service Fabric property value. - :paramtype value: ~azure.servicefabric.models.PropertyValue - :keyword metadata: Required. The metadata associated with a property, including the property's - name. - :paramtype metadata: ~azure.servicefabric.models.PropertyMetadata - """ - super(PropertyInfo, self).__init__(**kwargs) - self.name = name - self.value = value - self.metadata = metadata - - -class PropertyMetadata(msrest.serialization.Model): - """The metadata associated with a property, including the property's name. - - :ivar type_id: The kind of property, determined by the type of data. Following are the possible - values. Possible values include: "Invalid", "Binary", "Int64", "Double", "String", "Guid". - :vartype type_id: str or ~azure.servicefabric.models.PropertyValueKind - :ivar custom_type_id: The property's custom type ID. - :vartype custom_type_id: str - :ivar parent: The name of the parent Service Fabric Name for the property. It could be thought - of as the name-space/table under which the property exists. - :vartype parent: str - :ivar size_in_bytes: The length of the serialized property value. - :vartype size_in_bytes: int - :ivar last_modified_utc_timestamp: Represents when the Property was last modified. Only write - operations will cause this field to be updated. - :vartype last_modified_utc_timestamp: ~datetime.datetime - :ivar sequence_number: The version of the property. Every time a property is modified, its - sequence number is increased. - :vartype sequence_number: str - """ - - _attribute_map = { - 'type_id': {'key': 'TypeId', 'type': 'str'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - 'parent': {'key': 'Parent', 'type': 'str'}, - 'size_in_bytes': {'key': 'SizeInBytes', 'type': 'int'}, - 'last_modified_utc_timestamp': {'key': 'LastModifiedUtcTimestamp', 'type': 'iso-8601'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'str'}, - } - - def __init__( - self, - *, - type_id: Optional[Union[str, "PropertyValueKind"]] = None, - custom_type_id: Optional[str] = None, - parent: Optional[str] = None, - size_in_bytes: Optional[int] = None, - last_modified_utc_timestamp: Optional[datetime.datetime] = None, - sequence_number: Optional[str] = None, - **kwargs - ): - """ - :keyword type_id: The kind of property, determined by the type of data. Following are the - possible values. Possible values include: "Invalid", "Binary", "Int64", "Double", "String", - "Guid". - :paramtype type_id: str or ~azure.servicefabric.models.PropertyValueKind - :keyword custom_type_id: The property's custom type ID. - :paramtype custom_type_id: str - :keyword parent: The name of the parent Service Fabric Name for the property. It could be - thought of as the name-space/table under which the property exists. - :paramtype parent: str - :keyword size_in_bytes: The length of the serialized property value. - :paramtype size_in_bytes: int - :keyword last_modified_utc_timestamp: Represents when the Property was last modified. Only - write operations will cause this field to be updated. - :paramtype last_modified_utc_timestamp: ~datetime.datetime - :keyword sequence_number: The version of the property. Every time a property is modified, its - sequence number is increased. - :paramtype sequence_number: str - """ - super(PropertyMetadata, self).__init__(**kwargs) - self.type_id = type_id - self.custom_type_id = custom_type_id - self.parent = parent - self.size_in_bytes = size_in_bytes - self.last_modified_utc_timestamp = last_modified_utc_timestamp - self.sequence_number = sequence_number - - -class ProvisionApplicationTypeDescription(ProvisionApplicationTypeDescriptionBase): - """Describes the operation to register or provision an application type using an application package uploaded to the Service Fabric image store. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of application type registration or provision requested. The - application package can be registered or provisioned either from the image store or from an - external store. Following are the kinds of the application type provision.Constant filled by - server. Possible values include: "Invalid", "ImageStorePath", "ExternalStore". - :vartype kind: str or ~azure.servicefabric.models.ProvisionApplicationTypeKind - :ivar async_property: Required. Indicates whether or not provisioning should occur - asynchronously. When set to true, the provision operation returns when the request is accepted - by the system, and the provision operation continues without any timeout limit. The default - value is false. For large application packages, we recommend setting the value to true. - :vartype async_property: bool - :ivar application_type_build_path: Required. The relative path for the application package in - the image store specified during the prior upload operation. - :vartype application_type_build_path: str - :ivar application_package_cleanup_policy: The kind of action that needs to be taken for - cleaning up the application package after successful provision. Possible values include: - "Invalid", "Default", "Automatic", "Manual". - :vartype application_package_cleanup_policy: str or - ~azure.servicefabric.models.ApplicationPackageCleanupPolicy - """ - - _validation = { - 'kind': {'required': True}, - 'async_property': {'required': True}, - 'application_type_build_path': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'async_property': {'key': 'Async', 'type': 'bool'}, - 'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'}, - 'application_package_cleanup_policy': {'key': 'ApplicationPackageCleanupPolicy', 'type': 'str'}, - } - - def __init__( - self, - *, - async_property: bool, - application_type_build_path: str, - application_package_cleanup_policy: Optional[Union[str, "ApplicationPackageCleanupPolicy"]] = None, - **kwargs - ): - """ - :keyword async_property: Required. Indicates whether or not provisioning should occur - asynchronously. When set to true, the provision operation returns when the request is accepted - by the system, and the provision operation continues without any timeout limit. The default - value is false. For large application packages, we recommend setting the value to true. - :paramtype async_property: bool - :keyword application_type_build_path: Required. The relative path for the application package - in the image store specified during the prior upload operation. - :paramtype application_type_build_path: str - :keyword application_package_cleanup_policy: The kind of action that needs to be taken for - cleaning up the application package after successful provision. Possible values include: - "Invalid", "Default", "Automatic", "Manual". - :paramtype application_package_cleanup_policy: str or - ~azure.servicefabric.models.ApplicationPackageCleanupPolicy - """ - super(ProvisionApplicationTypeDescription, self).__init__(async_property=async_property, **kwargs) - self.kind = 'ImageStorePath' # type: str - self.application_type_build_path = application_type_build_path - self.application_package_cleanup_policy = application_package_cleanup_policy - - -class ProvisionFabricDescription(msrest.serialization.Model): - """Describes the parameters for provisioning a cluster. - - :ivar code_file_path: The cluster code package file path. - :vartype code_file_path: str - :ivar cluster_manifest_file_path: The cluster manifest file path. - :vartype cluster_manifest_file_path: str - """ - - _attribute_map = { - 'code_file_path': {'key': 'CodeFilePath', 'type': 'str'}, - 'cluster_manifest_file_path': {'key': 'ClusterManifestFilePath', 'type': 'str'}, - } - - def __init__( - self, - *, - code_file_path: Optional[str] = None, - cluster_manifest_file_path: Optional[str] = None, - **kwargs - ): - """ - :keyword code_file_path: The cluster code package file path. - :paramtype code_file_path: str - :keyword cluster_manifest_file_path: The cluster manifest file path. - :paramtype cluster_manifest_file_path: str - """ - super(ProvisionFabricDescription, self).__init__(**kwargs) - self.code_file_path = code_file_path - self.cluster_manifest_file_path = cluster_manifest_file_path - - -class PutPropertyBatchOperation(PropertyBatchOperation): - """Puts the specified property under the specified name. -Note that if one PropertyBatchOperation in a PropertyBatch fails, -the entire batch fails and cannot be committed in a transactional manner. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch operation, determined by the operation to be - performed. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Put", "Get", "CheckExists", "CheckSequence", "Delete", "CheckValue". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchOperationKind - :ivar property_name: Required. The name of the Service Fabric property. - :vartype property_name: str - :ivar value: Required. Describes a Service Fabric property value. - :vartype value: ~azure.servicefabric.models.PropertyValue - :ivar 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. - :vartype custom_type_id: str - """ - - _validation = { - 'kind': {'required': True}, - 'property_name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'property_name': {'key': 'PropertyName', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'PropertyValue'}, - 'custom_type_id': {'key': 'CustomTypeId', 'type': 'str'}, - } - - def __init__( - self, - *, - property_name: str, - value: "PropertyValue", - custom_type_id: Optional[str] = None, - **kwargs - ): - """ - :keyword property_name: Required. The name of the Service Fabric property. - :paramtype property_name: str - :keyword value: Required. Describes a Service Fabric property value. - :paramtype value: ~azure.servicefabric.models.PropertyValue - :keyword 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. - :paramtype custom_type_id: str - """ - super(PutPropertyBatchOperation, self).__init__(property_name=property_name, **kwargs) - self.kind = 'Put' # type: str - self.value = value - self.custom_type_id = custom_type_id - - -class ReconfigurationInformation(msrest.serialization.Model): - """Information about current reconfiguration like phase, type, previous configuration role of replica and reconfiguration start date time. - - :ivar previous_configuration_role: Replica role before reconfiguration started. Possible values - include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", - "ActiveAuxiliary", "PrimaryAuxiliary". - :vartype previous_configuration_role: str or ~azure.servicefabric.models.ReplicaRole - :ivar reconfiguration_phase: Current phase of ongoing reconfiguration. If no reconfiguration is - taking place then this value will be "None". Possible values include: "Unknown", "None", - "Phase0", "Phase1", "Phase2", "Phase3", "Phase4", "AbortPhaseZero". - :vartype reconfiguration_phase: str or ~azure.servicefabric.models.ReconfigurationPhase - :ivar reconfiguration_type: Type of current ongoing reconfiguration. If no reconfiguration is - taking place then this value will be "None". Possible values include: "Unknown", "SwapPrimary", - "Failover", "Other". - :vartype reconfiguration_type: str or ~azure.servicefabric.models.ReconfigurationType - :ivar reconfiguration_start_time_utc: Start time (in UTC) of the ongoing reconfiguration. If no - reconfiguration is taking place then this value will be zero date-time. - :vartype reconfiguration_start_time_utc: ~datetime.datetime - """ - - _attribute_map = { - 'previous_configuration_role': {'key': 'PreviousConfigurationRole', 'type': 'str'}, - 'reconfiguration_phase': {'key': 'ReconfigurationPhase', 'type': 'str'}, - 'reconfiguration_type': {'key': 'ReconfigurationType', 'type': 'str'}, - 'reconfiguration_start_time_utc': {'key': 'ReconfigurationStartTimeUtc', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - previous_configuration_role: Optional[Union[str, "ReplicaRole"]] = None, - reconfiguration_phase: Optional[Union[str, "ReconfigurationPhase"]] = None, - reconfiguration_type: Optional[Union[str, "ReconfigurationType"]] = None, - reconfiguration_start_time_utc: Optional[datetime.datetime] = None, - **kwargs - ): - """ - :keyword previous_configuration_role: Replica role before reconfiguration started. Possible - values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", - "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". - :paramtype previous_configuration_role: str or ~azure.servicefabric.models.ReplicaRole - :keyword reconfiguration_phase: Current phase of ongoing reconfiguration. If no reconfiguration - is taking place then this value will be "None". Possible values include: "Unknown", "None", - "Phase0", "Phase1", "Phase2", "Phase3", "Phase4", "AbortPhaseZero". - :paramtype reconfiguration_phase: str or ~azure.servicefabric.models.ReconfigurationPhase - :keyword reconfiguration_type: Type of current ongoing reconfiguration. If no reconfiguration - is taking place then this value will be "None". Possible values include: "Unknown", - "SwapPrimary", "Failover", "Other". - :paramtype reconfiguration_type: str or ~azure.servicefabric.models.ReconfigurationType - :keyword reconfiguration_start_time_utc: Start time (in UTC) of the ongoing reconfiguration. If - no reconfiguration is taking place then this value will be zero date-time. - :paramtype reconfiguration_start_time_utc: ~datetime.datetime - """ - super(ReconfigurationInformation, self).__init__(**kwargs) - self.previous_configuration_role = previous_configuration_role - self.reconfiguration_phase = reconfiguration_phase - self.reconfiguration_type = reconfiguration_type - self.reconfiguration_start_time_utc = reconfiguration_start_time_utc - - -class RegistryCredential(msrest.serialization.Model): - """Credential information to connect to container registry. - - :ivar registry_user_name: The user name to connect to container registry. - :vartype registry_user_name: str - :ivar registry_password: The password for supplied username to connect to container registry. - :vartype registry_password: str - :ivar password_encrypted: Indicates that supplied container registry password is encrypted. - :vartype password_encrypted: bool - """ - - _attribute_map = { - 'registry_user_name': {'key': 'RegistryUserName', 'type': 'str'}, - 'registry_password': {'key': 'RegistryPassword', 'type': 'str'}, - 'password_encrypted': {'key': 'PasswordEncrypted', 'type': 'bool'}, - } - - def __init__( - self, - *, - registry_user_name: Optional[str] = None, - registry_password: Optional[str] = None, - password_encrypted: Optional[bool] = None, - **kwargs - ): - """ - :keyword registry_user_name: The user name to connect to container registry. - :paramtype registry_user_name: str - :keyword registry_password: The password for supplied username to connect to container - registry. - :paramtype registry_password: str - :keyword password_encrypted: Indicates that supplied container registry password is encrypted. - :paramtype password_encrypted: bool - """ - super(RegistryCredential, self).__init__(**kwargs) - self.registry_user_name = registry_user_name - self.registry_password = registry_password - self.password_encrypted = password_encrypted - - -class ReliableCollectionsRef(msrest.serialization.Model): - """Specifying this parameter adds support for reliable collections. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of ReliableCollection resource. Right now it's not used and you can - use any string. - :vartype name: str - :ivar do_not_persist_state: False (the default) if ReliableCollections state is persisted to - disk as usual. True if you do not want to persist state, in which case replication is still - enabled and you can use ReliableCollections as distributed cache. - :vartype do_not_persist_state: bool - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'do_not_persist_state': {'key': 'doNotPersistState', 'type': 'bool'}, - } - - def __init__( - self, - *, - name: str, - do_not_persist_state: Optional[bool] = None, - **kwargs - ): - """ - :keyword name: Required. Name of ReliableCollection resource. Right now it's not used and you - can use any string. - :paramtype name: str - :keyword do_not_persist_state: False (the default) if ReliableCollections state is persisted to - disk as usual. True if you do not want to persist state, in which case replication is still - enabled and you can use ReliableCollections as distributed cache. - :paramtype do_not_persist_state: bool - """ - super(ReliableCollectionsRef, self).__init__(**kwargs) - self.name = name - self.do_not_persist_state = do_not_persist_state - - -class RemoteReplicatorAcknowledgementDetail(msrest.serialization.Model): - """Provides various statistics of the acknowledgements that are being received from the remote replicator. - - :ivar average_receive_duration: Represents the average duration it takes for the remote - replicator to receive an operation. - :vartype average_receive_duration: str - :ivar average_apply_duration: Represents the average duration it takes for the remote - replicator to apply an operation. This usually entails writing the operation to disk. - :vartype average_apply_duration: str - :ivar not_received_count: Represents the number of operations not yet received by a remote - replicator. - :vartype not_received_count: str - :ivar received_and_not_applied_count: Represents the number of operations received and not yet - applied by a remote replicator. - :vartype received_and_not_applied_count: str - """ - - _attribute_map = { - 'average_receive_duration': {'key': 'AverageReceiveDuration', 'type': 'str'}, - 'average_apply_duration': {'key': 'AverageApplyDuration', 'type': 'str'}, - 'not_received_count': {'key': 'NotReceivedCount', 'type': 'str'}, - 'received_and_not_applied_count': {'key': 'ReceivedAndNotAppliedCount', 'type': 'str'}, - } - - def __init__( - self, - *, - average_receive_duration: Optional[str] = None, - average_apply_duration: Optional[str] = None, - not_received_count: Optional[str] = None, - received_and_not_applied_count: Optional[str] = None, - **kwargs - ): - """ - :keyword average_receive_duration: Represents the average duration it takes for the remote - replicator to receive an operation. - :paramtype average_receive_duration: str - :keyword average_apply_duration: Represents the average duration it takes for the remote - replicator to apply an operation. This usually entails writing the operation to disk. - :paramtype average_apply_duration: str - :keyword not_received_count: Represents the number of operations not yet received by a remote - replicator. - :paramtype not_received_count: str - :keyword received_and_not_applied_count: Represents the number of operations received and not - yet applied by a remote replicator. - :paramtype received_and_not_applied_count: str - """ - super(RemoteReplicatorAcknowledgementDetail, self).__init__(**kwargs) - self.average_receive_duration = average_receive_duration - self.average_apply_duration = average_apply_duration - self.not_received_count = not_received_count - self.received_and_not_applied_count = received_and_not_applied_count - - -class RemoteReplicatorAcknowledgementStatus(msrest.serialization.Model): - """Provides details about the remote replicators from the primary replicator's point of view. - - :ivar replication_stream_acknowledgement_detail: Details about the acknowledgements for - operations that are part of the replication stream data. - :vartype replication_stream_acknowledgement_detail: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail - :ivar copy_stream_acknowledgement_detail: Details about the acknowledgements for operations - that are part of the copy stream data. - :vartype copy_stream_acknowledgement_detail: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail - """ - - _attribute_map = { - 'replication_stream_acknowledgement_detail': {'key': 'ReplicationStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, - 'copy_stream_acknowledgement_detail': {'key': 'CopyStreamAcknowledgementDetail', 'type': 'RemoteReplicatorAcknowledgementDetail'}, - } - - def __init__( - self, - *, - replication_stream_acknowledgement_detail: Optional["RemoteReplicatorAcknowledgementDetail"] = None, - copy_stream_acknowledgement_detail: Optional["RemoteReplicatorAcknowledgementDetail"] = None, - **kwargs - ): - """ - :keyword replication_stream_acknowledgement_detail: Details about the acknowledgements for - operations that are part of the replication stream data. - :paramtype replication_stream_acknowledgement_detail: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail - :keyword copy_stream_acknowledgement_detail: Details about the acknowledgements for operations - that are part of the copy stream data. - :paramtype copy_stream_acknowledgement_detail: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementDetail - """ - super(RemoteReplicatorAcknowledgementStatus, self).__init__(**kwargs) - self.replication_stream_acknowledgement_detail = replication_stream_acknowledgement_detail - self.copy_stream_acknowledgement_detail = copy_stream_acknowledgement_detail - - -class RemoteReplicatorStatus(msrest.serialization.Model): - """Represents the state of the secondary replicator from the primary replicator’s point of view. - - :ivar replica_id: Represents the replica ID of the remote secondary replicator. - :vartype replica_id: str - :ivar last_acknowledgement_processed_time_utc: The last timestamp (in UTC) when an - acknowledgement from the secondary replicator was processed on the primary. - UTC 0 represents an invalid value, indicating that no acknowledgement messages were ever - processed. - :vartype last_acknowledgement_processed_time_utc: ~datetime.datetime - :ivar last_received_replication_sequence_number: The highest replication operation sequence - number that the secondary has received from the primary. - :vartype last_received_replication_sequence_number: str - :ivar last_applied_replication_sequence_number: The highest replication operation sequence - number that the secondary has applied to its state. - :vartype last_applied_replication_sequence_number: str - :ivar is_in_build: A value that indicates whether the secondary replica is in the process of - being built. - :vartype is_in_build: bool - :ivar last_received_copy_sequence_number: The highest copy operation sequence number that the - secondary has received from the primary. - A value of -1 implies that the secondary has received all copy operations. - :vartype last_received_copy_sequence_number: str - :ivar last_applied_copy_sequence_number: The highest copy operation sequence number that the - secondary has applied to its state. - A value of -1 implies that the secondary has applied all copy operations and the copy process - is complete. - :vartype last_applied_copy_sequence_number: str - :ivar remote_replicator_acknowledgement_status: Represents the acknowledgment status for the - remote secondary replicator. - :vartype remote_replicator_acknowledgement_status: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementStatus - """ - - _attribute_map = { - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - 'last_acknowledgement_processed_time_utc': {'key': 'LastAcknowledgementProcessedTimeUtc', 'type': 'iso-8601'}, - 'last_received_replication_sequence_number': {'key': 'LastReceivedReplicationSequenceNumber', 'type': 'str'}, - 'last_applied_replication_sequence_number': {'key': 'LastAppliedReplicationSequenceNumber', 'type': 'str'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'last_received_copy_sequence_number': {'key': 'LastReceivedCopySequenceNumber', 'type': 'str'}, - 'last_applied_copy_sequence_number': {'key': 'LastAppliedCopySequenceNumber', 'type': 'str'}, - 'remote_replicator_acknowledgement_status': {'key': 'RemoteReplicatorAcknowledgementStatus', 'type': 'RemoteReplicatorAcknowledgementStatus'}, - } - - def __init__( - self, - *, - replica_id: Optional[str] = None, - last_acknowledgement_processed_time_utc: Optional[datetime.datetime] = None, - last_received_replication_sequence_number: Optional[str] = None, - last_applied_replication_sequence_number: Optional[str] = None, - is_in_build: Optional[bool] = None, - last_received_copy_sequence_number: Optional[str] = None, - last_applied_copy_sequence_number: Optional[str] = None, - remote_replicator_acknowledgement_status: Optional["RemoteReplicatorAcknowledgementStatus"] = None, - **kwargs - ): - """ - :keyword replica_id: Represents the replica ID of the remote secondary replicator. - :paramtype replica_id: str - :keyword last_acknowledgement_processed_time_utc: The last timestamp (in UTC) when an - acknowledgement from the secondary replicator was processed on the primary. - UTC 0 represents an invalid value, indicating that no acknowledgement messages were ever - processed. - :paramtype last_acknowledgement_processed_time_utc: ~datetime.datetime - :keyword last_received_replication_sequence_number: The highest replication operation sequence - number that the secondary has received from the primary. - :paramtype last_received_replication_sequence_number: str - :keyword last_applied_replication_sequence_number: The highest replication operation sequence - number that the secondary has applied to its state. - :paramtype last_applied_replication_sequence_number: str - :keyword is_in_build: A value that indicates whether the secondary replica is in the process of - being built. - :paramtype is_in_build: bool - :keyword last_received_copy_sequence_number: The highest copy operation sequence number that - the secondary has received from the primary. - A value of -1 implies that the secondary has received all copy operations. - :paramtype last_received_copy_sequence_number: str - :keyword last_applied_copy_sequence_number: The highest copy operation sequence number that the - secondary has applied to its state. - A value of -1 implies that the secondary has applied all copy operations and the copy process - is complete. - :paramtype last_applied_copy_sequence_number: str - :keyword remote_replicator_acknowledgement_status: Represents the acknowledgment status for the - remote secondary replicator. - :paramtype remote_replicator_acknowledgement_status: - ~azure.servicefabric.models.RemoteReplicatorAcknowledgementStatus - """ - super(RemoteReplicatorStatus, self).__init__(**kwargs) - self.replica_id = replica_id - self.last_acknowledgement_processed_time_utc = last_acknowledgement_processed_time_utc - self.last_received_replication_sequence_number = last_received_replication_sequence_number - self.last_applied_replication_sequence_number = last_applied_replication_sequence_number - self.is_in_build = is_in_build - self.last_received_copy_sequence_number = last_received_copy_sequence_number - self.last_applied_copy_sequence_number = last_applied_copy_sequence_number - self.remote_replicator_acknowledgement_status = remote_replicator_acknowledgement_status - - -class RepairTask(msrest.serialization.Model): - """Represents a repair task, which includes information about what kind of repair was requested, what its progress is, and what its final result was. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar task_id: Required. The ID of the repair task. - :vartype task_id: str - :ivar version: The version of the repair task. - When creating a new repair task, the version must be set to zero. When updating a repair - task, - the version is used for optimistic concurrency checks. If the version is - set to zero, the update will not check for write conflicts. If the version is set to a - non-zero value, then the - update will only succeed if the actual current version of the repair task matches this value. - :vartype version: str - :ivar description: A description of the purpose of the repair task, or other informational - details. - May be set when the repair task is created, and is immutable once set. - :vartype description: str - :ivar state: Required. The workflow state of the repair task. Valid initial states are Created, - Claimed, and Preparing. Possible values include: "Invalid", "Created", "Claimed", "Preparing", - "Approved", "Executing", "Restoring", "Completed". - :vartype state: str or ~azure.servicefabric.models.State - :ivar flags: A bitwise-OR of the following values, which gives additional details about the - status of the repair task. - - - * 1 - Cancellation of the repair has been requested - * 2 - Abort of the repair has been requested - * 4 - Approval of the repair was forced via client request. - :vartype flags: int - :ivar action: Required. The requested repair action. Must be specified when the repair task is - created, and is immutable once set. - :vartype action: str - :ivar target: The target object determines what actions the system will take to prepare for the - impact of the repair, prior to approving execution of the repair. - May be set when the repair task is created, and is immutable once set. - :vartype target: ~azure.servicefabric.models.RepairTargetDescriptionBase - :ivar executor: The name of the repair executor. Must be specified in Claimed and later states, - and is immutable once set. - :vartype executor: str - :ivar executor_data: A data string that the repair executor can use to store its internal - state. - :vartype executor_data: str - :ivar impact: The impact object determines what actions the system will take to prepare for the - impact of the repair, prior to approving execution of the repair. - Impact must be specified by the repair executor when transitioning to the Preparing state, and - is immutable once set. - :vartype impact: ~azure.servicefabric.models.RepairImpactDescriptionBase - :ivar result_status: A value describing the overall result of the repair task execution. Must - be specified in the Restoring and later states, and is immutable once set. Possible values - include: "Invalid", "Succeeded", "Cancelled", "Interrupted", "Failed", "Pending". - :vartype result_status: str or ~azure.servicefabric.models.ResultStatus - :ivar result_code: A numeric value providing additional details about the result of the repair - task execution. - May be specified in the Restoring and later states, and is immutable once set. - :vartype result_code: int - :ivar result_details: A string providing additional details about the result of the repair task - execution. - May be specified in the Restoring and later states, and is immutable once set. - :vartype result_details: str - :ivar history: An object that contains timestamps of the repair task's state transitions. - These timestamps are updated by the system, and cannot be directly modified. - :vartype history: ~azure.servicefabric.models.RepairTaskHistory - :ivar preparing_health_check_state: The workflow state of the health check when the repair task - is in the Preparing state. Possible values include: "NotStarted", "InProgress", "Succeeded", - "Skipped", "TimedOut". - :vartype preparing_health_check_state: str or - ~azure.servicefabric.models.RepairTaskHealthCheckState - :ivar restoring_health_check_state: The workflow state of the health check when the repair task - is in the Restoring state. Possible values include: "NotStarted", "InProgress", "Succeeded", - "Skipped", "TimedOut". - :vartype restoring_health_check_state: str or - ~azure.servicefabric.models.RepairTaskHealthCheckState - :ivar perform_preparing_health_check: A value to determine if health checks will be performed - when the repair task enters the Preparing state. - :vartype perform_preparing_health_check: bool - :ivar perform_restoring_health_check: A value to determine if health checks will be performed - when the repair task enters the Restoring state. - :vartype perform_restoring_health_check: bool - """ - - _validation = { - 'task_id': {'required': True}, - 'state': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'action': {'key': 'Action', 'type': 'str'}, - 'target': {'key': 'Target', 'type': 'RepairTargetDescriptionBase'}, - 'executor': {'key': 'Executor', 'type': 'str'}, - 'executor_data': {'key': 'ExecutorData', 'type': 'str'}, - 'impact': {'key': 'Impact', 'type': 'RepairImpactDescriptionBase'}, - 'result_status': {'key': 'ResultStatus', 'type': 'str'}, - 'result_code': {'key': 'ResultCode', 'type': 'int'}, - 'result_details': {'key': 'ResultDetails', 'type': 'str'}, - 'history': {'key': 'History', 'type': 'RepairTaskHistory'}, - 'preparing_health_check_state': {'key': 'PreparingHealthCheckState', 'type': 'str'}, - 'restoring_health_check_state': {'key': 'RestoringHealthCheckState', 'type': 'str'}, - 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, - 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, - } - - def __init__( - self, - *, - task_id: str, - state: Union[str, "State"], - action: str, - version: Optional[str] = None, - description: Optional[str] = None, - flags: Optional[int] = None, - target: Optional["RepairTargetDescriptionBase"] = None, - executor: Optional[str] = None, - executor_data: Optional[str] = None, - impact: Optional["RepairImpactDescriptionBase"] = None, - result_status: Optional[Union[str, "ResultStatus"]] = None, - result_code: Optional[int] = None, - result_details: Optional[str] = None, - history: Optional["RepairTaskHistory"] = None, - preparing_health_check_state: Optional[Union[str, "RepairTaskHealthCheckState"]] = None, - restoring_health_check_state: Optional[Union[str, "RepairTaskHealthCheckState"]] = None, - perform_preparing_health_check: Optional[bool] = None, - perform_restoring_health_check: Optional[bool] = None, - **kwargs - ): - """ - :keyword task_id: Required. The ID of the repair task. - :paramtype task_id: str - :keyword version: The version of the repair task. - When creating a new repair task, the version must be set to zero. When updating a repair - task, - the version is used for optimistic concurrency checks. If the version is - set to zero, the update will not check for write conflicts. If the version is set to a - non-zero value, then the - update will only succeed if the actual current version of the repair task matches this value. - :paramtype version: str - :keyword description: A description of the purpose of the repair task, or other informational - details. - May be set when the repair task is created, and is immutable once set. - :paramtype description: str - :keyword state: Required. The workflow state of the repair task. Valid initial states are - Created, Claimed, and Preparing. Possible values include: "Invalid", "Created", "Claimed", - "Preparing", "Approved", "Executing", "Restoring", "Completed". - :paramtype state: str or ~azure.servicefabric.models.State - :keyword flags: A bitwise-OR of the following values, which gives additional details about the - status of the repair task. - - - * 1 - Cancellation of the repair has been requested - * 2 - Abort of the repair has been requested - * 4 - Approval of the repair was forced via client request. - :paramtype flags: int - :keyword action: Required. The requested repair action. Must be specified when the repair task - is created, and is immutable once set. - :paramtype action: str - :keyword target: The target object determines what actions the system will take to prepare for - the impact of the repair, prior to approving execution of the repair. - May be set when the repair task is created, and is immutable once set. - :paramtype target: ~azure.servicefabric.models.RepairTargetDescriptionBase - :keyword executor: The name of the repair executor. Must be specified in Claimed and later - states, and is immutable once set. - :paramtype executor: str - :keyword executor_data: A data string that the repair executor can use to store its internal - state. - :paramtype executor_data: str - :keyword impact: The impact object determines what actions the system will take to prepare for - the impact of the repair, prior to approving execution of the repair. - Impact must be specified by the repair executor when transitioning to the Preparing state, and - is immutable once set. - :paramtype impact: ~azure.servicefabric.models.RepairImpactDescriptionBase - :keyword result_status: A value describing the overall result of the repair task execution. - Must be specified in the Restoring and later states, and is immutable once set. Possible values - include: "Invalid", "Succeeded", "Cancelled", "Interrupted", "Failed", "Pending". - :paramtype result_status: str or ~azure.servicefabric.models.ResultStatus - :keyword result_code: A numeric value providing additional details about the result of the - repair task execution. - May be specified in the Restoring and later states, and is immutable once set. - :paramtype result_code: int - :keyword result_details: A string providing additional details about the result of the repair - task execution. - May be specified in the Restoring and later states, and is immutable once set. - :paramtype result_details: str - :keyword history: An object that contains timestamps of the repair task's state transitions. - These timestamps are updated by the system, and cannot be directly modified. - :paramtype history: ~azure.servicefabric.models.RepairTaskHistory - :keyword preparing_health_check_state: The workflow state of the health check when the repair - task is in the Preparing state. Possible values include: "NotStarted", "InProgress", - "Succeeded", "Skipped", "TimedOut". - :paramtype preparing_health_check_state: str or - ~azure.servicefabric.models.RepairTaskHealthCheckState - :keyword restoring_health_check_state: The workflow state of the health check when the repair - task is in the Restoring state. Possible values include: "NotStarted", "InProgress", - "Succeeded", "Skipped", "TimedOut". - :paramtype restoring_health_check_state: str or - ~azure.servicefabric.models.RepairTaskHealthCheckState - :keyword perform_preparing_health_check: A value to determine if health checks will be - performed when the repair task enters the Preparing state. - :paramtype perform_preparing_health_check: bool - :keyword perform_restoring_health_check: A value to determine if health checks will be - performed when the repair task enters the Restoring state. - :paramtype perform_restoring_health_check: bool - """ - super(RepairTask, self).__init__(**kwargs) - self.task_id = task_id - self.version = version - self.description = description - self.state = state - self.flags = flags - self.action = action - self.target = target - self.executor = executor - self.executor_data = executor_data - self.impact = impact - self.result_status = result_status - self.result_code = result_code - self.result_details = result_details - self.history = history - self.preparing_health_check_state = preparing_health_check_state - self.restoring_health_check_state = restoring_health_check_state - self.perform_preparing_health_check = perform_preparing_health_check - self.perform_restoring_health_check = perform_restoring_health_check - - -class RepairTaskApproveDescription(msrest.serialization.Model): - """Describes a request for forced approval of a repair task. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar task_id: Required. The ID of the repair task. - :vartype task_id: str - :ivar version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current version of the repair task. If zero, - then no version check is performed. - :vartype version: str - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__( - self, - *, - task_id: str, - version: Optional[str] = None, - **kwargs - ): - """ - :keyword task_id: Required. The ID of the repair task. - :paramtype task_id: str - :keyword version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current version of the repair task. If zero, - then no version check is performed. - :paramtype version: str - """ - super(RepairTaskApproveDescription, self).__init__(**kwargs) - self.task_id = task_id - self.version = version - - -class RepairTaskCancelDescription(msrest.serialization.Model): - """Describes a request to cancel a repair task. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar task_id: Required. The ID of the repair task. - :vartype task_id: str - :ivar version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current version of the repair task. If zero, - then no version check is performed. - :vartype version: str - :ivar request_abort: *True* if the repair should be stopped as soon as possible even if it has - already started executing. *False* if the repair should be cancelled only if execution has not - yet started. - :vartype request_abort: bool - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'request_abort': {'key': 'RequestAbort', 'type': 'bool'}, - } - - def __init__( - self, - *, - task_id: str, - version: Optional[str] = None, - request_abort: Optional[bool] = None, - **kwargs - ): - """ - :keyword task_id: Required. The ID of the repair task. - :paramtype task_id: str - :keyword version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current version of the repair task. If zero, - then no version check is performed. - :paramtype version: str - :keyword request_abort: *True* if the repair should be stopped as soon as possible even if it - has already started executing. *False* if the repair should be cancelled only if execution has - not yet started. - :paramtype request_abort: bool - """ - super(RepairTaskCancelDescription, self).__init__(**kwargs) - self.task_id = task_id - self.version = version - self.request_abort = request_abort - - -class RepairTaskDeleteDescription(msrest.serialization.Model): - """Describes a request to delete a completed repair task. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar task_id: Required. The ID of the completed repair task to be deleted. - :vartype task_id: str - :ivar version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current version of the repair task. If zero, - then no version check is performed. - :vartype version: str - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__( - self, - *, - task_id: str, - version: Optional[str] = None, - **kwargs - ): - """ - :keyword task_id: Required. The ID of the completed repair task to be deleted. - :paramtype task_id: str - :keyword version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current version of the repair task. If zero, - then no version check is performed. - :paramtype version: str - """ - super(RepairTaskDeleteDescription, self).__init__(**kwargs) - self.task_id = task_id - self.version = version - - -class RepairTaskHistory(msrest.serialization.Model): - """A record of the times when the repair task entered each state. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - :ivar created_utc_timestamp: The time when the repair task entered the Created state. - :vartype created_utc_timestamp: ~datetime.datetime - :ivar claimed_utc_timestamp: The time when the repair task entered the Claimed state. - :vartype claimed_utc_timestamp: ~datetime.datetime - :ivar preparing_utc_timestamp: The time when the repair task entered the Preparing state. - :vartype preparing_utc_timestamp: ~datetime.datetime - :ivar approved_utc_timestamp: The time when the repair task entered the Approved state. - :vartype approved_utc_timestamp: ~datetime.datetime - :ivar executing_utc_timestamp: The time when the repair task entered the Executing state. - :vartype executing_utc_timestamp: ~datetime.datetime - :ivar restoring_utc_timestamp: The time when the repair task entered the Restoring state. - :vartype restoring_utc_timestamp: ~datetime.datetime - :ivar completed_utc_timestamp: The time when the repair task entered the Completed state. - :vartype completed_utc_timestamp: ~datetime.datetime - :ivar preparing_health_check_start_utc_timestamp: The time when the repair task started the - health check in the Preparing state. - :vartype preparing_health_check_start_utc_timestamp: ~datetime.datetime - :ivar preparing_health_check_end_utc_timestamp: The time when the repair task completed the - health check in the Preparing state. - :vartype preparing_health_check_end_utc_timestamp: ~datetime.datetime - :ivar restoring_health_check_start_utc_timestamp: The time when the repair task started the - health check in the Restoring state. - :vartype restoring_health_check_start_utc_timestamp: ~datetime.datetime - :ivar restoring_health_check_end_utc_timestamp: The time when the repair task completed the - health check in the Restoring state. - :vartype restoring_health_check_end_utc_timestamp: ~datetime.datetime - """ - - _attribute_map = { - 'created_utc_timestamp': {'key': 'CreatedUtcTimestamp', 'type': 'iso-8601'}, - 'claimed_utc_timestamp': {'key': 'ClaimedUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_utc_timestamp': {'key': 'PreparingUtcTimestamp', 'type': 'iso-8601'}, - 'approved_utc_timestamp': {'key': 'ApprovedUtcTimestamp', 'type': 'iso-8601'}, - 'executing_utc_timestamp': {'key': 'ExecutingUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_utc_timestamp': {'key': 'RestoringUtcTimestamp', 'type': 'iso-8601'}, - 'completed_utc_timestamp': {'key': 'CompletedUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_health_check_start_utc_timestamp': {'key': 'PreparingHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, - 'preparing_health_check_end_utc_timestamp': {'key': 'PreparingHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_health_check_start_utc_timestamp': {'key': 'RestoringHealthCheckStartUtcTimestamp', 'type': 'iso-8601'}, - 'restoring_health_check_end_utc_timestamp': {'key': 'RestoringHealthCheckEndUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - created_utc_timestamp: Optional[datetime.datetime] = None, - claimed_utc_timestamp: Optional[datetime.datetime] = None, - preparing_utc_timestamp: Optional[datetime.datetime] = None, - approved_utc_timestamp: Optional[datetime.datetime] = None, - executing_utc_timestamp: Optional[datetime.datetime] = None, - restoring_utc_timestamp: Optional[datetime.datetime] = None, - completed_utc_timestamp: Optional[datetime.datetime] = None, - preparing_health_check_start_utc_timestamp: Optional[datetime.datetime] = None, - preparing_health_check_end_utc_timestamp: Optional[datetime.datetime] = None, - restoring_health_check_start_utc_timestamp: Optional[datetime.datetime] = None, - restoring_health_check_end_utc_timestamp: Optional[datetime.datetime] = None, - **kwargs - ): - """ - :keyword created_utc_timestamp: The time when the repair task entered the Created state. - :paramtype created_utc_timestamp: ~datetime.datetime - :keyword claimed_utc_timestamp: The time when the repair task entered the Claimed state. - :paramtype claimed_utc_timestamp: ~datetime.datetime - :keyword preparing_utc_timestamp: The time when the repair task entered the Preparing state. - :paramtype preparing_utc_timestamp: ~datetime.datetime - :keyword approved_utc_timestamp: The time when the repair task entered the Approved state. - :paramtype approved_utc_timestamp: ~datetime.datetime - :keyword executing_utc_timestamp: The time when the repair task entered the Executing state. - :paramtype executing_utc_timestamp: ~datetime.datetime - :keyword restoring_utc_timestamp: The time when the repair task entered the Restoring state. - :paramtype restoring_utc_timestamp: ~datetime.datetime - :keyword completed_utc_timestamp: The time when the repair task entered the Completed state. - :paramtype completed_utc_timestamp: ~datetime.datetime - :keyword preparing_health_check_start_utc_timestamp: The time when the repair task started the - health check in the Preparing state. - :paramtype preparing_health_check_start_utc_timestamp: ~datetime.datetime - :keyword preparing_health_check_end_utc_timestamp: The time when the repair task completed the - health check in the Preparing state. - :paramtype preparing_health_check_end_utc_timestamp: ~datetime.datetime - :keyword restoring_health_check_start_utc_timestamp: The time when the repair task started the - health check in the Restoring state. - :paramtype restoring_health_check_start_utc_timestamp: ~datetime.datetime - :keyword restoring_health_check_end_utc_timestamp: The time when the repair task completed the - health check in the Restoring state. - :paramtype restoring_health_check_end_utc_timestamp: ~datetime.datetime - """ - super(RepairTaskHistory, self).__init__(**kwargs) - self.created_utc_timestamp = created_utc_timestamp - self.claimed_utc_timestamp = claimed_utc_timestamp - self.preparing_utc_timestamp = preparing_utc_timestamp - self.approved_utc_timestamp = approved_utc_timestamp - self.executing_utc_timestamp = executing_utc_timestamp - self.restoring_utc_timestamp = restoring_utc_timestamp - self.completed_utc_timestamp = completed_utc_timestamp - self.preparing_health_check_start_utc_timestamp = preparing_health_check_start_utc_timestamp - self.preparing_health_check_end_utc_timestamp = preparing_health_check_end_utc_timestamp - self.restoring_health_check_start_utc_timestamp = restoring_health_check_start_utc_timestamp - self.restoring_health_check_end_utc_timestamp = restoring_health_check_end_utc_timestamp - - -class RepairTaskUpdateHealthPolicyDescription(msrest.serialization.Model): - """Describes a request to update the health policy of a repair task. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar task_id: Required. The ID of the repair task to be updated. - :vartype task_id: str - :ivar version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current value of the repair task. If zero, - then no version check is performed. - :vartype version: str - :ivar perform_preparing_health_check: A boolean indicating if health check is to be performed - in the Preparing stage of the repair task. If not specified the existing value should not be - altered. Otherwise, specify the desired new value. - :vartype perform_preparing_health_check: bool - :ivar perform_restoring_health_check: A boolean indicating if health check is to be performed - in the Restoring stage of the repair task. If not specified the existing value should not be - altered. Otherwise, specify the desired new value. - :vartype perform_restoring_health_check: bool - """ - - _validation = { - 'task_id': {'required': True}, - } - - _attribute_map = { - 'task_id': {'key': 'TaskId', 'type': 'str'}, - 'version': {'key': 'Version', 'type': 'str'}, - 'perform_preparing_health_check': {'key': 'PerformPreparingHealthCheck', 'type': 'bool'}, - 'perform_restoring_health_check': {'key': 'PerformRestoringHealthCheck', 'type': 'bool'}, - } - - def __init__( - self, - *, - task_id: str, - version: Optional[str] = None, - perform_preparing_health_check: Optional[bool] = None, - perform_restoring_health_check: Optional[bool] = None, - **kwargs - ): - """ - :keyword task_id: Required. The ID of the repair task to be updated. - :paramtype task_id: str - :keyword version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current value of the repair task. If zero, - then no version check is performed. - :paramtype version: str - :keyword perform_preparing_health_check: A boolean indicating if health check is to be - performed in the Preparing stage of the repair task. If not specified the existing value should - not be altered. Otherwise, specify the desired new value. - :paramtype perform_preparing_health_check: bool - :keyword perform_restoring_health_check: A boolean indicating if health check is to be - performed in the Restoring stage of the repair task. If not specified the existing value should - not be altered. Otherwise, specify the desired new value. - :paramtype perform_restoring_health_check: bool - """ - super(RepairTaskUpdateHealthPolicyDescription, self).__init__(**kwargs) - self.task_id = task_id - self.version = version - self.perform_preparing_health_check = perform_preparing_health_check - self.perform_restoring_health_check = perform_restoring_health_check - - -class RepairTaskUpdateInfo(msrest.serialization.Model): - """Describes the result of an operation that created or updated a repair task. - -This type supports the Service Fabric platform; it is not meant to be used directly from your code. - - All required parameters must be populated in order to send to Azure. - - :ivar version: Required. The new version of the repair task. - :vartype version: str - """ - - _validation = { - 'version': {'required': True}, - } - - _attribute_map = { - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__( - self, - *, - version: str, - **kwargs - ): - """ - :keyword version: Required. The new version of the repair task. - :paramtype version: str - """ - super(RepairTaskUpdateInfo, self).__init__(**kwargs) - self.version = version - - -class ReplicaHealth(EntityHealth): - """Represents a base class for stateful service replica or stateless service instance health. -Contains the replica aggregated health state, the health events and the unhealthy evaluations. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaHealth, StatelessServiceInstanceHealth. - - All required parameters must be populated in order to send to Azure. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar partition_id: Id of the partition to which this replica belongs. - :vartype partition_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaHealth', 'Stateless': 'StatelessServiceInstanceHealth'} - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - health_events: Optional[List["HealthEvent"]] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - health_statistics: Optional["HealthStatistics"] = None, - partition_id: Optional[str] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword partition_id: Id of the partition to which this replica belongs. - :paramtype partition_id: str - """ - super(ReplicaHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.service_kind = 'ReplicaHealth' # type: str - self.partition_id = partition_id - - -class ReplicaHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a replica, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar partition_id: Id of the partition to which the replica belongs. - :vartype partition_id: str - :ivar replica_or_instance_id: Id of a stateful service replica or a stateless service instance. - This ID is used in the queries that apply to both stateful and stateless services. It is used - by Service Fabric to uniquely identify a replica of a partition of a stateful service or an - instance of a stateless service partition. It is unique within a partition and does not change - for the lifetime of the replica or the instance. If a stateful replica gets dropped and another - replica gets created on the same node for the same partition, it will get a different value for - the ID. If a stateless instance is failed over on the same or different node it will get a - different value for the ID. - :vartype replica_or_instance_id: str - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated - health state of the replica. The types of the unhealthy evaluations can be - EventHealthEvaluation. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - partition_id: Optional[str] = None, - replica_or_instance_id: Optional[str] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword partition_id: Id of the partition to which the replica belongs. - :paramtype partition_id: str - :keyword replica_or_instance_id: Id of a stateful service replica or a stateless service - instance. This ID is used in the queries that apply to both stateful and stateless services. It - is used by Service Fabric to uniquely identify a replica of a partition of a stateful service - or an instance of a stateless service partition. It is unique within a partition and does not - change for the lifetime of the replica or the instance. If a stateful replica gets dropped and - another replica gets created on the same node for the same partition, it will get a different - value for the ID. If a stateless instance is failed over on the same or different node it will - get a different value for the ID. - :paramtype replica_or_instance_id: str - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current - aggregated health state of the replica. The types of the unhealthy evaluations can be - EventHealthEvaluation. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(ReplicaHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'Replica' # type: str - self.partition_id = partition_id - self.replica_or_instance_id = replica_or_instance_id - self.unhealthy_evaluations = unhealthy_evaluations - - -class ReplicaHealthState(EntityHealthState): - """Represents a base class for stateful service replica or stateless service instance health state. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaHealthState, StatelessServiceInstanceHealthState. - - All required parameters must be populated in order to send to Azure. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar partition_id: The ID of the partition to which this replica belongs. - :vartype partition_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaHealthState', 'Stateless': 'StatelessServiceInstanceHealthState'} - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - partition_id: Optional[str] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword partition_id: The ID of the partition to which this replica belongs. - :paramtype partition_id: str - """ - super(ReplicaHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.service_kind = 'ReplicaHealthState' # type: str - self.partition_id = partition_id - - -class ReplicaHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a stateful service replica or a stateless service instance. -The replica health state contains the replica ID and its aggregated health state. - - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar replica_or_instance_id: Id of a stateful service replica or a stateless service instance. - This ID is used in the queries that apply to both stateful and stateless services. It is used - by Service Fabric to uniquely identify a replica of a partition of a stateful service or an - instance of a stateless service partition. It is unique within a partition and does not change - for the lifetime of the replica or the instance. If a stateful replica gets dropped and another - replica gets created on the same node for the same partition, it will get a different value for - the ID. If a stateless instance is failed over on the same or different node it will get a - different value for the ID. - :vartype replica_or_instance_id: str - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'replica_or_instance_id': {'key': 'ReplicaOrInstanceId', 'type': 'str'}, - } - - def __init__( - self, - *, - health_state: Optional[Union[str, "HealthState"]] = None, - replica_or_instance_id: Optional[str] = None, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword replica_or_instance_id: Id of a stateful service replica or a stateless service - instance. This ID is used in the queries that apply to both stateful and stateless services. It - is used by Service Fabric to uniquely identify a replica of a partition of a stateful service - or an instance of a stateless service partition. It is unique within a partition and does not - change for the lifetime of the replica or the instance. If a stateful replica gets dropped and - another replica gets created on the same node for the same partition, it will get a different - value for the ID. If a stateless instance is failed over on the same or different node it will - get a different value for the ID. - :paramtype replica_or_instance_id: str - """ - super(ReplicaHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.replica_or_instance_id = replica_or_instance_id - - -class ReplicaHealthStateChunkList(msrest.serialization.Model): - """The list of replica health state chunks that respect the input filters in the chunk query. Returned by get cluster health state chunks query. - - :ivar items: The list of replica health state chunks that respect the input filters in the - chunk query. - :vartype items: list[~azure.servicefabric.models.ReplicaHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[ReplicaHealthStateChunk]'}, - } - - def __init__( - self, - *, - items: Optional[List["ReplicaHealthStateChunk"]] = None, - **kwargs - ): - """ - :keyword items: The list of replica health state chunks that respect the input filters in the - chunk query. - :paramtype items: list[~azure.servicefabric.models.ReplicaHealthStateChunk] - """ - super(ReplicaHealthStateChunkList, self).__init__(**kwargs) - self.items = items - - -class ReplicaHealthStateFilter(msrest.serialization.Model): - """Defines matching criteria to determine whether a replica should be included as a child of a partition in the cluster health chunk. -The replicas are only returned if the parent entities match a filter specified in the cluster health chunk query description. The parent partition, service and application must be included in the cluster health chunk. -One filter can match zero, one or multiple replicas, depending on its properties. - - :ivar replica_or_instance_id_filter: Id of the stateful service replica or stateless service - instance that matches the filter. The filter is applied only to the specified replica, if it - exists. - If the replica doesn't exist, no replica is returned in the cluster health chunk based on this - filter. - If the replica exists, it is included in the cluster health chunk if it respects the other - filter properties. - If not specified, all replicas that match the parent filters (if any) are taken into - consideration and matched against the other filter members, like health state filter. - :vartype replica_or_instance_id_filter: str - :ivar health_state_filter: The filter for the health state of the replicas. It allows selecting - replicas if they match the desired health states. - The possible values are integer value of one of the following health states. Only replicas - that match the filter are returned. All replicas are used to evaluate the parent partition - aggregated health state. - If not specified, default value is None, unless the replica ID is specified. If the filter has - default value and replica ID is specified, the matching replica is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches replicas with HealthState value of OK (2) - and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :vartype health_state_filter: int - """ - - _attribute_map = { - 'replica_or_instance_id_filter': {'key': 'ReplicaOrInstanceIdFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - } - - def __init__( - self, - *, - replica_or_instance_id_filter: Optional[str] = None, - health_state_filter: Optional[int] = 0, - **kwargs - ): - """ - :keyword replica_or_instance_id_filter: Id of the stateful service replica or stateless service - instance that matches the filter. The filter is applied only to the specified replica, if it - exists. - If the replica doesn't exist, no replica is returned in the cluster health chunk based on this - filter. - If the replica exists, it is included in the cluster health chunk if it respects the other - filter properties. - If not specified, all replicas that match the parent filters (if any) are taken into - consideration and matched against the other filter members, like health state filter. - :paramtype replica_or_instance_id_filter: str - :keyword health_state_filter: The filter for the health state of the replicas. It allows - selecting replicas if they match the desired health states. - The possible values are integer value of one of the following health states. Only replicas - that match the filter are returned. All replicas are used to evaluate the parent partition - aggregated health state. - If not specified, default value is None, unless the replica ID is specified. If the filter has - default value and replica ID is specified, the matching replica is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches replicas with HealthState value of OK (2) - and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :paramtype health_state_filter: int - """ - super(ReplicaHealthStateFilter, self).__init__(**kwargs) - self.replica_or_instance_id_filter = replica_or_instance_id_filter - self.health_state_filter = health_state_filter - - -class ReplicaInfo(msrest.serialization.Model): - """Information about the identity, status, health, node name, uptime, and other details about the replica. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceReplicaInfo, StatelessServiceInstanceInfo. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", - "InBuild", "Standby", "Ready", "Down", "Dropped". - :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar node_name: The name of a Service Fabric node. - :vartype node_name: str - :ivar address: The address the replica is listening on. - :vartype address: str - :ivar last_in_build_duration_in_seconds: The last in build duration of the replica in seconds. - :vartype last_in_build_duration_in_seconds: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceReplicaInfo', 'Stateless': 'StatelessServiceInstanceInfo'} - } - - def __init__( - self, - *, - replica_status: Optional[Union[str, "ReplicaStatus"]] = None, - health_state: Optional[Union[str, "HealthState"]] = None, - node_name: Optional[str] = None, - address: Optional[str] = None, - last_in_build_duration_in_seconds: Optional[str] = None, - **kwargs - ): - """ - :keyword replica_status: The status of a replica of a service. Possible values include: - "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". - :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword node_name: The name of a Service Fabric node. - :paramtype node_name: str - :keyword address: The address the replica is listening on. - :paramtype address: str - :keyword last_in_build_duration_in_seconds: The last in build duration of the replica in - seconds. - :paramtype last_in_build_duration_in_seconds: str - """ - super(ReplicaInfo, self).__init__(**kwargs) - self.service_kind = None # type: Optional[str] - self.replica_status = replica_status - self.health_state = health_state - self.node_name = node_name - self.address = address - self.last_in_build_duration_in_seconds = last_in_build_duration_in_seconds - - -class ReplicaLifecycleDescription(msrest.serialization.Model): - """Describes how the replica will behave. - - :ivar is_singleton_replica_move_allowed_during_upgrade: If set to true, replicas with a target - replica set size of 1 will be permitted to move during upgrade. - :vartype is_singleton_replica_move_allowed_during_upgrade: bool - :ivar restore_replica_location_after_upgrade: If set to true, move/swap replica to original - location after upgrade. - :vartype restore_replica_location_after_upgrade: bool - """ - - _attribute_map = { - 'is_singleton_replica_move_allowed_during_upgrade': {'key': 'IsSingletonReplicaMoveAllowedDuringUpgrade', 'type': 'bool'}, - 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, - } - - def __init__( - self, - *, - is_singleton_replica_move_allowed_during_upgrade: Optional[bool] = None, - restore_replica_location_after_upgrade: Optional[bool] = None, - **kwargs - ): - """ - :keyword is_singleton_replica_move_allowed_during_upgrade: If set to true, replicas with a - target replica set size of 1 will be permitted to move during upgrade. - :paramtype is_singleton_replica_move_allowed_during_upgrade: bool - :keyword restore_replica_location_after_upgrade: If set to true, move/swap replica to original - location after upgrade. - :paramtype restore_replica_location_after_upgrade: bool - """ - super(ReplicaLifecycleDescription, self).__init__(**kwargs) - self.is_singleton_replica_move_allowed_during_upgrade = is_singleton_replica_move_allowed_during_upgrade - self.restore_replica_location_after_upgrade = restore_replica_location_after_upgrade - - -class ReplicaMetricLoadDescription(msrest.serialization.Model): - """Specifies metric loads of a partition's specific secondary replica or instance. - - :ivar node_name: Node name of a specific secondary replica or instance. - :vartype node_name: str - :ivar replica_or_instance_load_entries: Loads of a different metrics for a partition's - secondary replica or instance. - :vartype replica_or_instance_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - """ - - _attribute_map = { - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'replica_or_instance_load_entries': {'key': 'ReplicaOrInstanceLoadEntries', 'type': '[MetricLoadDescription]'}, - } - - def __init__( - self, - *, - node_name: Optional[str] = None, - replica_or_instance_load_entries: Optional[List["MetricLoadDescription"]] = None, - **kwargs - ): - """ - :keyword node_name: Node name of a specific secondary replica or instance. - :paramtype node_name: str - :keyword replica_or_instance_load_entries: Loads of a different metrics for a partition's - secondary replica or instance. - :paramtype replica_or_instance_load_entries: - list[~azure.servicefabric.models.MetricLoadDescription] - """ - super(ReplicaMetricLoadDescription, self).__init__(**kwargs) - self.node_name = node_name - self.replica_or_instance_load_entries = replica_or_instance_load_entries - - -class ReplicasHealthEvaluation(HealthEvaluation): - """Represents health evaluation for replicas, containing health evaluations for each unhealthy replica that impacted current aggregated health state. Can be returned when evaluating partition health and the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar max_percent_unhealthy_replicas_per_partition: Maximum allowed percentage of unhealthy - replicas per partition from the ApplicationHealthPolicy. - :vartype max_percent_unhealthy_replicas_per_partition: int - :ivar total_count: Total number of replicas in the partition from the health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy ReplicaHealthEvaluation that impacted the aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - max_percent_unhealthy_replicas_per_partition: Optional[int] = None, - total_count: Optional[int] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword max_percent_unhealthy_replicas_per_partition: Maximum allowed percentage of unhealthy - replicas per partition from the ApplicationHealthPolicy. - :paramtype max_percent_unhealthy_replicas_per_partition: int - :keyword total_count: Total number of replicas in the partition from the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy ReplicaHealthEvaluation that impacted the aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(ReplicasHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'Replicas' # type: str - self.max_percent_unhealthy_replicas_per_partition = max_percent_unhealthy_replicas_per_partition - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - - -class ReplicatorQueueStatus(msrest.serialization.Model): - """Provides various statistics of the queue used in the service fabric replicator. -Contains information about the service fabric replicator like the replication/copy queue utilization, last acknowledgement received timestamp, etc. -Depending on the role of the replicator, the properties in this type imply different meanings. - - :ivar queue_utilization_percentage: Represents the utilization of the queue. A value of 0 - indicates that the queue is empty and a value of 100 indicates the queue is full. - :vartype queue_utilization_percentage: int - :ivar queue_memory_size: Represents the virtual memory consumed by the queue in bytes. - :vartype queue_memory_size: str - :ivar first_sequence_number: On a primary replicator, this is semantically the sequence number - of the operation for which all the secondary replicas have sent an acknowledgement. - On a secondary replicator, this is the smallest sequence number of the operation that is - present in the queue. - :vartype first_sequence_number: str - :ivar completed_sequence_number: On a primary replicator, this is semantically the highest - sequence number of the operation for which all the secondary replicas have sent an - acknowledgement. - On a secondary replicator, this is semantically the highest sequence number that has been - applied to the persistent state. - :vartype completed_sequence_number: str - :ivar committed_sequence_number: On a primary replicator, this is semantically the highest - sequence number of the operation for which a write quorum of the secondary replicas have sent - an acknowledgement. - On a secondary replicator, this is semantically the highest sequence number of the in-order - operation received from the primary. - :vartype committed_sequence_number: str - :ivar last_sequence_number: Represents the latest sequence number of the operation that is - available in the queue. - :vartype last_sequence_number: str - """ - - _attribute_map = { - 'queue_utilization_percentage': {'key': 'QueueUtilizationPercentage', 'type': 'int'}, - 'queue_memory_size': {'key': 'QueueMemorySize', 'type': 'str'}, - 'first_sequence_number': {'key': 'FirstSequenceNumber', 'type': 'str'}, - 'completed_sequence_number': {'key': 'CompletedSequenceNumber', 'type': 'str'}, - 'committed_sequence_number': {'key': 'CommittedSequenceNumber', 'type': 'str'}, - 'last_sequence_number': {'key': 'LastSequenceNumber', 'type': 'str'}, - } - - def __init__( - self, - *, - queue_utilization_percentage: Optional[int] = None, - queue_memory_size: Optional[str] = None, - first_sequence_number: Optional[str] = None, - completed_sequence_number: Optional[str] = None, - committed_sequence_number: Optional[str] = None, - last_sequence_number: Optional[str] = None, - **kwargs - ): - """ - :keyword queue_utilization_percentage: Represents the utilization of the queue. A value of 0 - indicates that the queue is empty and a value of 100 indicates the queue is full. - :paramtype queue_utilization_percentage: int - :keyword queue_memory_size: Represents the virtual memory consumed by the queue in bytes. - :paramtype queue_memory_size: str - :keyword first_sequence_number: On a primary replicator, this is semantically the sequence - number of the operation for which all the secondary replicas have sent an acknowledgement. - On a secondary replicator, this is the smallest sequence number of the operation that is - present in the queue. - :paramtype first_sequence_number: str - :keyword completed_sequence_number: On a primary replicator, this is semantically the highest - sequence number of the operation for which all the secondary replicas have sent an - acknowledgement. - On a secondary replicator, this is semantically the highest sequence number that has been - applied to the persistent state. - :paramtype completed_sequence_number: str - :keyword committed_sequence_number: On a primary replicator, this is semantically the highest - sequence number of the operation for which a write quorum of the secondary replicas have sent - an acknowledgement. - On a secondary replicator, this is semantically the highest sequence number of the in-order - operation received from the primary. - :paramtype committed_sequence_number: str - :keyword last_sequence_number: Represents the latest sequence number of the operation that is - available in the queue. - :paramtype last_sequence_number: str - """ - super(ReplicatorQueueStatus, self).__init__(**kwargs) - self.queue_utilization_percentage = queue_utilization_percentage - self.queue_memory_size = queue_memory_size - self.first_sequence_number = first_sequence_number - self.completed_sequence_number = completed_sequence_number - self.committed_sequence_number = committed_sequence_number - self.last_sequence_number = last_sequence_number - - -class ResolvedServiceEndpoint(msrest.serialization.Model): - """Endpoint of a resolved service partition. - - :ivar kind: The role of the replica where the endpoint is reported. Possible values include: - "Invalid", "Stateless", "StatefulPrimary", "StatefulSecondary". - :vartype kind: str or ~azure.servicefabric.models.ServiceEndpointRole - :ivar address: The address of the endpoint. If the endpoint has multiple listeners the address - is a JSON object with one property per listener with the value as the address of that listener. - :vartype address: str - """ - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - } - - def __init__( - self, - *, - kind: Optional[Union[str, "ServiceEndpointRole"]] = None, - address: Optional[str] = None, - **kwargs - ): - """ - :keyword kind: The role of the replica where the endpoint is reported. Possible values include: - "Invalid", "Stateless", "StatefulPrimary", "StatefulSecondary". - :paramtype kind: str or ~azure.servicefabric.models.ServiceEndpointRole - :keyword address: The address of the endpoint. If the endpoint has multiple listeners the - address is a JSON object with one property per listener with the value as the address of that - listener. - :paramtype address: str - """ - super(ResolvedServiceEndpoint, self).__init__(**kwargs) - self.kind = kind - self.address = address - - -class ResolvedServicePartition(msrest.serialization.Model): - """Information about a service partition and its associated endpoints. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The full name of the service with 'fabric:' URI scheme. - :vartype name: str - :ivar partition_information: Required. A representation of the resolved partition. - :vartype partition_information: ~azure.servicefabric.models.PartitionInformation - :ivar endpoints: Required. List of resolved service endpoints of a service partition. - :vartype endpoints: list[~azure.servicefabric.models.ResolvedServiceEndpoint] - :ivar version: Required. The version of this resolved service partition result. This version - should be passed in the next time the ResolveService call is made via the PreviousRspVersion - query parameter. - :vartype version: str - """ - - _validation = { - 'name': {'required': True}, - 'partition_information': {'required': True}, - 'endpoints': {'required': True}, - 'version': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'endpoints': {'key': 'Endpoints', 'type': '[ResolvedServiceEndpoint]'}, - 'version': {'key': 'Version', 'type': 'str'}, - } - - def __init__( - self, - *, - name: str, - partition_information: "PartitionInformation", - endpoints: List["ResolvedServiceEndpoint"], - version: str, - **kwargs - ): - """ - :keyword name: Required. The full name of the service with 'fabric:' URI scheme. - :paramtype name: str - :keyword partition_information: Required. A representation of the resolved partition. - :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation - :keyword endpoints: Required. List of resolved service endpoints of a service partition. - :paramtype endpoints: list[~azure.servicefabric.models.ResolvedServiceEndpoint] - :keyword version: Required. The version of this resolved service partition result. This version - should be passed in the next time the ResolveService call is made via the PreviousRspVersion - query parameter. - :paramtype version: str - """ - super(ResolvedServicePartition, self).__init__(**kwargs) - self.name = name - self.partition_information = partition_information - self.endpoints = endpoints - self.version = version - - -class ResourceLimits(msrest.serialization.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. - - :ivar memory_in_gb: The memory limit in GB. - :vartype memory_in_gb: float - :ivar cpu: CPU limits in cores. At present, only full cores are supported. - :vartype cpu: float - """ - - _attribute_map = { - 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, - 'cpu': {'key': 'cpu', 'type': 'float'}, - } - - def __init__( - self, - *, - memory_in_gb: Optional[float] = None, - cpu: Optional[float] = None, - **kwargs - ): - """ - :keyword memory_in_gb: The memory limit in GB. - :paramtype memory_in_gb: float - :keyword cpu: CPU limits in cores. At present, only full cores are supported. - :paramtype cpu: float - """ - super(ResourceLimits, self).__init__(**kwargs) - self.memory_in_gb = memory_in_gb - self.cpu = cpu - - -class ResourceRequests(msrest.serialization.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. - - :ivar memory_in_gb: Required. The memory request in GB for this container. - :vartype memory_in_gb: float - :ivar cpu: Required. Requested number of CPU cores. At present, only full cores are supported. - :vartype 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 - ): - """ - :keyword memory_in_gb: Required. The memory request in GB for this container. - :paramtype memory_in_gb: float - :keyword cpu: Required. Requested number of CPU cores. At present, only full cores are - supported. - :paramtype cpu: float - """ - super(ResourceRequests, self).__init__(**kwargs) - self.memory_in_gb = memory_in_gb - self.cpu = cpu - - -class ResourceRequirements(msrest.serialization.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. - - :ivar requests: Required. Describes the requested resources for a given container. - :vartype requests: ~azure.servicefabric.models.ResourceRequests - :ivar limits: Describes the maximum limits on the resources for a given container. - :vartype 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: "ResourceRequests", - limits: Optional["ResourceLimits"] = None, - **kwargs - ): - """ - :keyword requests: Required. Describes the requested resources for a given container. - :paramtype requests: ~azure.servicefabric.models.ResourceRequests - :keyword limits: Describes the maximum limits on the resources for a given container. - :paramtype limits: ~azure.servicefabric.models.ResourceLimits - """ - super(ResourceRequirements, self).__init__(**kwargs) - self.requests = requests - self.limits = limits - - -class RestartDeployedCodePackageDescription(msrest.serialization.Model): - """Defines description for restarting a deployed code package on Service Fabric node. - - All required parameters must be populated in order to send to Azure. - - :ivar service_manifest_name: Required. The name of service manifest that specified this code - package. - :vartype service_manifest_name: str - :ivar service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :vartype service_package_activation_id: str - :ivar code_package_name: Required. The name of the code package defined in the service - manifest. - :vartype code_package_name: str - :ivar code_package_instance_id: Required. The instance ID for currently running entry point. - For a code package setup entry point (if specified) runs first and after it finishes main entry - point is started. - Each time entry point executable is run, its instance ID will change. If 0 is passed in as the - code package instance ID, the API will restart the code package with whatever instance ID it is - currently running. - If an instance ID other than 0 is passed in, the API will restart the code package only if the - current Instance ID matches the passed in instance ID. - Note, passing in the exact instance ID (not 0) in the API is safer, because if ensures at most - one restart of the code package. - :vartype code_package_instance_id: str - """ - - _validation = { - 'service_manifest_name': {'required': True}, - 'code_package_name': {'required': True}, - 'code_package_instance_id': {'required': True}, - } - - _attribute_map = { - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'}, - 'code_package_name': {'key': 'CodePackageName', 'type': 'str'}, - 'code_package_instance_id': {'key': 'CodePackageInstanceId', 'type': 'str'}, - } - - def __init__( - self, - *, - service_manifest_name: str, - code_package_name: str, - code_package_instance_id: str, - service_package_activation_id: Optional[str] = None, - **kwargs - ): - """ - :keyword service_manifest_name: Required. The name of service manifest that specified this code - package. - :paramtype service_manifest_name: str - :keyword service_package_activation_id: The ActivationId of a deployed service package. If - ServicePackageActivationMode specified at the time of creating the service - is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), - then value of ServicePackageActivationId - is always an empty string. - :paramtype service_package_activation_id: str - :keyword code_package_name: Required. The name of the code package defined in the service - manifest. - :paramtype code_package_name: str - :keyword code_package_instance_id: Required. The instance ID for currently running entry point. - For a code package setup entry point (if specified) runs first and after it finishes main entry - point is started. - Each time entry point executable is run, its instance ID will change. If 0 is passed in as the - code package instance ID, the API will restart the code package with whatever instance ID it is - currently running. - If an instance ID other than 0 is passed in, the API will restart the code package only if the - current Instance ID matches the passed in instance ID. - Note, passing in the exact instance ID (not 0) in the API is safer, because if ensures at most - one restart of the code package. - :paramtype code_package_instance_id: str - """ - super(RestartDeployedCodePackageDescription, self).__init__(**kwargs) - self.service_manifest_name = service_manifest_name - self.service_package_activation_id = service_package_activation_id - self.code_package_name = code_package_name - self.code_package_instance_id = code_package_instance_id - - -class RestartNodeDescription(msrest.serialization.Model): - """Describes the parameters to restart a Service Fabric node. - - All required parameters must be populated in order to send to Azure. - - :ivar node_instance_id: Required. The instance ID of the target node. If instance ID is - specified the node is restarted only if it matches with the current instance of the node. A - default value of "0" would match any instance ID. The instance ID can be obtained using get - node query. - :vartype node_instance_id: str - :ivar create_fabric_dump: Specify True to create a dump of the fabric node process. This is - case-sensitive. Possible values include: "False", "True". Default value: "False". - :vartype create_fabric_dump: str or ~azure.servicefabric.models.CreateFabricDump - """ - - _validation = { - 'node_instance_id': {'required': True}, - } - - _attribute_map = { - 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, - 'create_fabric_dump': {'key': 'CreateFabricDump', 'type': 'str'}, - } - - def __init__( - self, - *, - node_instance_id: str = "0", - create_fabric_dump: Optional[Union[str, "CreateFabricDump"]] = "False", - **kwargs - ): - """ - :keyword node_instance_id: Required. The instance ID of the target node. If instance ID is - specified the node is restarted only if it matches with the current instance of the node. A - default value of "0" would match any instance ID. The instance ID can be obtained using get - node query. - :paramtype node_instance_id: str - :keyword create_fabric_dump: Specify True to create a dump of the fabric node process. This is - case-sensitive. Possible values include: "False", "True". Default value: "False". - :paramtype create_fabric_dump: str or ~azure.servicefabric.models.CreateFabricDump - """ - super(RestartNodeDescription, self).__init__(**kwargs) - self.node_instance_id = node_instance_id - self.create_fabric_dump = create_fabric_dump - - -class RestartPartitionResult(msrest.serialization.Model): - """Represents information about an operation in a terminal state (Completed or Faulted). - - :ivar error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, - this is an error code indicating the reason. - :vartype error_code: int - :ivar selected_partition: This class returns information about the partition that the - user-induced operation acted upon. - :vartype selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - - _attribute_map = { - 'error_code': {'key': 'ErrorCode', 'type': 'int'}, - 'selected_partition': {'key': 'SelectedPartition', 'type': 'SelectedPartition'}, - } - - def __init__( - self, - *, - error_code: Optional[int] = None, - selected_partition: Optional["SelectedPartition"] = None, - **kwargs - ): - """ - :keyword error_code: If OperationState is Completed, this is 0. If OperationState is Faulted, - this is an error code indicating the reason. - :paramtype error_code: int - :keyword selected_partition: This class returns information about the partition that the - user-induced operation acted upon. - :paramtype selected_partition: ~azure.servicefabric.models.SelectedPartition - """ - super(RestartPartitionResult, self).__init__(**kwargs) - self.error_code = error_code - self.selected_partition = selected_partition - - -class RestorePartitionDescription(msrest.serialization.Model): - """Specifies the parameters needed to trigger a restore of a specific partition. - - All required parameters must be populated in order to send to Azure. - - :ivar backup_id: Required. Unique backup ID. - :vartype backup_id: str - :ivar backup_location: Required. Location of the backup relative to the backup storage - specified/ configured. - :vartype backup_location: str - :ivar backup_storage: Location of the backup from where the partition will be restored. - :vartype backup_storage: ~azure.servicefabric.models.BackupStorageDescription - """ - - _validation = { - 'backup_id': {'required': True}, - 'backup_location': {'required': True}, - } - - _attribute_map = { - 'backup_id': {'key': 'BackupId', 'type': 'str'}, - 'backup_location': {'key': 'BackupLocation', 'type': 'str'}, - 'backup_storage': {'key': 'BackupStorage', 'type': 'BackupStorageDescription'}, - } - - def __init__( - self, - *, - backup_id: str, - backup_location: str, - backup_storage: Optional["BackupStorageDescription"] = None, - **kwargs - ): - """ - :keyword backup_id: Required. Unique backup ID. - :paramtype backup_id: str - :keyword backup_location: Required. Location of the backup relative to the backup storage - specified/ configured. - :paramtype backup_location: str - :keyword backup_storage: Location of the backup from where the partition will be restored. - :paramtype backup_storage: ~azure.servicefabric.models.BackupStorageDescription - """ - super(RestorePartitionDescription, self).__init__(**kwargs) - self.backup_id = backup_id - self.backup_location = backup_location - self.backup_storage = backup_storage - - -class RestoreProgressInfo(msrest.serialization.Model): - """Describes the progress of a restore operation on a partition. - - :ivar restore_state: Represents the current state of the partition restore operation. Possible - values include: "Invalid", "Accepted", "RestoreInProgress", "Success", "Failure", "Timeout". - :vartype restore_state: str or ~azure.servicefabric.models.RestoreState - :ivar time_stamp_utc: Timestamp when operation succeeded or failed. - :vartype time_stamp_utc: ~datetime.datetime - :ivar restored_epoch: Describes the epoch at which the partition is restored. - :vartype restored_epoch: ~azure.servicefabric.models.Epoch - :ivar restored_lsn: Restored LSN. - :vartype restored_lsn: str - :ivar failure_error: Denotes the failure encountered in performing restore operation. - :vartype failure_error: ~azure.servicefabric.models.FabricErrorError - """ - - _attribute_map = { - 'restore_state': {'key': 'RestoreState', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'restored_epoch': {'key': 'RestoredEpoch', 'type': 'Epoch'}, - 'restored_lsn': {'key': 'RestoredLsn', 'type': 'str'}, - 'failure_error': {'key': 'FailureError', 'type': 'FabricErrorError'}, - } - - def __init__( - self, - *, - restore_state: Optional[Union[str, "RestoreState"]] = None, - time_stamp_utc: Optional[datetime.datetime] = None, - restored_epoch: Optional["Epoch"] = None, - restored_lsn: Optional[str] = None, - failure_error: Optional["FabricErrorError"] = None, - **kwargs - ): - """ - :keyword restore_state: Represents the current state of the partition restore operation. - Possible values include: "Invalid", "Accepted", "RestoreInProgress", "Success", "Failure", - "Timeout". - :paramtype restore_state: str or ~azure.servicefabric.models.RestoreState - :keyword time_stamp_utc: Timestamp when operation succeeded or failed. - :paramtype time_stamp_utc: ~datetime.datetime - :keyword restored_epoch: Describes the epoch at which the partition is restored. - :paramtype restored_epoch: ~azure.servicefabric.models.Epoch - :keyword restored_lsn: Restored LSN. - :paramtype restored_lsn: str - :keyword failure_error: Denotes the failure encountered in performing restore operation. - :paramtype failure_error: ~azure.servicefabric.models.FabricErrorError - """ - super(RestoreProgressInfo, self).__init__(**kwargs) - self.restore_state = restore_state - self.time_stamp_utc = time_stamp_utc - self.restored_epoch = restored_epoch - self.restored_lsn = restored_lsn - self.failure_error = failure_error - - -class ResumeApplicationUpgradeDescription(msrest.serialization.Model): - """Describes the parameters for resuming an unmonitored manual Service Fabric application upgrade. - - All required parameters must be populated in order to send to Azure. - - :ivar upgrade_domain_name: Required. The name of the upgrade domain in which to resume the - upgrade. - :vartype upgrade_domain_name: str - """ - - _validation = { - 'upgrade_domain_name': {'required': True}, - } - - _attribute_map = { - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - } - - def __init__( - self, - *, - upgrade_domain_name: str, - **kwargs - ): - """ - :keyword upgrade_domain_name: Required. The name of the upgrade domain in which to resume the - upgrade. - :paramtype upgrade_domain_name: str - """ - super(ResumeApplicationUpgradeDescription, self).__init__(**kwargs) - self.upgrade_domain_name = upgrade_domain_name - - -class ResumeClusterUpgradeDescription(msrest.serialization.Model): - """Describes the parameters for resuming a cluster upgrade. - - All required parameters must be populated in order to send to Azure. - - :ivar upgrade_domain: Required. The next upgrade domain for this cluster upgrade. - :vartype upgrade_domain: str - """ - - _validation = { - 'upgrade_domain': {'required': True}, - } - - _attribute_map = { - 'upgrade_domain': {'key': 'UpgradeDomain', 'type': 'str'}, - } - - def __init__( - self, - *, - upgrade_domain: str, - **kwargs - ): - """ - :keyword upgrade_domain: Required. The next upgrade domain for this cluster upgrade. - :paramtype upgrade_domain: str - """ - super(ResumeClusterUpgradeDescription, self).__init__(**kwargs) - self.upgrade_domain = upgrade_domain - - -class RollingUpgradeUpdateDescription(msrest.serialization.Model): - """Describes the parameters for updating a rolling upgrade of application or cluster. - - All required parameters must be populated in order to send to Azure. - - :ivar rolling_upgrade_mode: Required. The mode used to monitor health during a rolling upgrade. - The values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when - the code version has not changed (the upgrade only changes configuration or data). - :vartype force_restart: bool - :ivar replica_set_check_timeout_in_milliseconds: The maximum amount of time to block processing - of an upgrade domain and prevent loss of availability when there are unexpected issues. When - this timeout expires, processing of the upgrade domain will proceed regardless of availability - loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between - 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :vartype replica_set_check_timeout_in_milliseconds: long - :ivar failure_action: The compensating action to perform when a Monitored upgrade encounters - monitoring policy or health policy violations. - Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will - start rolling back automatically. - Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible - values include: "Invalid", "Rollback", "Manual". - :vartype failure_action: str or ~azure.servicefabric.models.FailureAction - :ivar health_check_wait_duration_in_milliseconds: The amount of time to wait after completing - an upgrade domain before applying health policies. It is first interpreted as a string - representing an ISO 8601 duration. If that fails, then it is interpreted as a number - representing the total number of milliseconds. - :vartype health_check_wait_duration_in_milliseconds: str - :ivar health_check_stable_duration_in_milliseconds: The amount of time that the application or - cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is first - interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :vartype health_check_stable_duration_in_milliseconds: str - :ivar health_check_retry_timeout_in_milliseconds: The amount of time to retry health evaluation - when the application or cluster is unhealthy before FailureAction is executed. It is first - interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :vartype health_check_retry_timeout_in_milliseconds: str - :ivar upgrade_timeout_in_milliseconds: The amount of time the overall upgrade has to complete - before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 - duration. If that fails, then it is interpreted as a number representing the total number of - milliseconds. - :vartype upgrade_timeout_in_milliseconds: str - :ivar upgrade_domain_timeout_in_milliseconds: The amount of time each upgrade domain has to - complete before FailureAction is executed. It is first interpreted as a string representing an - ISO 8601 duration. If that fails, then it is interpreted as a number representing the total - number of milliseconds. - :vartype upgrade_domain_timeout_in_milliseconds: str - :ivar instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a stateless - instance is closed, to allow the active requests to drain gracefully. This would be effective - when the instance is closing during the application/cluster - upgrade, only for those instances which have a non-zero delay duration configured in the - service description. See InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates - that the behavior will entirely depend on the delay configured in the stateless service - description. - :vartype instance_close_delay_duration_in_seconds: long - """ - - _validation = { - 'rolling_upgrade_mode': {'required': True}, - } - - _attribute_map = { - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'replica_set_check_timeout_in_milliseconds': {'key': 'ReplicaSetCheckTimeoutInMilliseconds', 'type': 'long'}, - 'failure_action': {'key': 'FailureAction', 'type': 'str'}, - 'health_check_wait_duration_in_milliseconds': {'key': 'HealthCheckWaitDurationInMilliseconds', 'type': 'str'}, - 'health_check_stable_duration_in_milliseconds': {'key': 'HealthCheckStableDurationInMilliseconds', 'type': 'str'}, - 'health_check_retry_timeout_in_milliseconds': {'key': 'HealthCheckRetryTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_timeout_in_milliseconds': {'key': 'UpgradeTimeoutInMilliseconds', 'type': 'str'}, - 'upgrade_domain_timeout_in_milliseconds': {'key': 'UpgradeDomainTimeoutInMilliseconds', 'type': 'str'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - } - - def __init__( - self, - *, - rolling_upgrade_mode: Union[str, "UpgradeMode"] = "UnmonitoredAuto", - force_restart: Optional[bool] = False, - replica_set_check_timeout_in_milliseconds: Optional[int] = 42949672925, - failure_action: Optional[Union[str, "FailureAction"]] = None, - health_check_wait_duration_in_milliseconds: Optional[str] = "0", - health_check_stable_duration_in_milliseconds: Optional[str] = "PT0H2M0S", - health_check_retry_timeout_in_milliseconds: Optional[str] = "PT0H10M0S", - upgrade_timeout_in_milliseconds: Optional[str] = "P10675199DT02H48M05.4775807S", - upgrade_domain_timeout_in_milliseconds: Optional[str] = "P10675199DT02H48M05.4775807S", - instance_close_delay_duration_in_seconds: Optional[int] = 4294967295, - **kwargs - ): - """ - :keyword rolling_upgrade_mode: Required. The mode used to monitor health during a rolling - upgrade. The values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. - Possible values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :keyword force_restart: If true, then processes are forcefully restarted during upgrade even - when the code version has not changed (the upgrade only changes configuration or data). - :paramtype force_restart: bool - :keyword replica_set_check_timeout_in_milliseconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :paramtype replica_set_check_timeout_in_milliseconds: long - :keyword failure_action: The compensating action to perform when a Monitored upgrade encounters - monitoring policy or health policy violations. - Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will - start rolling back automatically. - Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible - values include: "Invalid", "Rollback", "Manual". - :paramtype failure_action: str or ~azure.servicefabric.models.FailureAction - :keyword health_check_wait_duration_in_milliseconds: The amount of time to wait after - completing an upgrade domain before applying health policies. It is first interpreted as a - string representing an ISO 8601 duration. If that fails, then it is interpreted as a number - representing the total number of milliseconds. - :paramtype health_check_wait_duration_in_milliseconds: str - :keyword health_check_stable_duration_in_milliseconds: The amount of time that the application - or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is - first interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :paramtype health_check_stable_duration_in_milliseconds: str - :keyword health_check_retry_timeout_in_milliseconds: The amount of time to retry health - evaluation when the application or cluster is unhealthy before FailureAction is executed. It is - first interpreted as a string representing an ISO 8601 duration. If that fails, then it is - interpreted as a number representing the total number of milliseconds. - :paramtype health_check_retry_timeout_in_milliseconds: str - :keyword upgrade_timeout_in_milliseconds: The amount of time the overall upgrade has to - complete before FailureAction is executed. It is first interpreted as a string representing an - ISO 8601 duration. If that fails, then it is interpreted as a number representing the total - number of milliseconds. - :paramtype upgrade_timeout_in_milliseconds: str - :keyword upgrade_domain_timeout_in_milliseconds: The amount of time each upgrade domain has to - complete before FailureAction is executed. It is first interpreted as a string representing an - ISO 8601 duration. If that fails, then it is interpreted as a number representing the total - number of milliseconds. - :paramtype upgrade_domain_timeout_in_milliseconds: str - :keyword instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a - stateless instance is closed, to allow the active requests to drain gracefully. This would be - effective when the instance is closing during the application/cluster - upgrade, only for those instances which have a non-zero delay duration configured in the - service description. See InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates - that the behavior will entirely depend on the delay configured in the stateless service - description. - :paramtype instance_close_delay_duration_in_seconds: long - """ - super(RollingUpgradeUpdateDescription, self).__init__(**kwargs) - self.rolling_upgrade_mode = rolling_upgrade_mode - self.force_restart = force_restart - self.replica_set_check_timeout_in_milliseconds = replica_set_check_timeout_in_milliseconds - self.failure_action = failure_action - self.health_check_wait_duration_in_milliseconds = health_check_wait_duration_in_milliseconds - self.health_check_stable_duration_in_milliseconds = health_check_stable_duration_in_milliseconds - self.health_check_retry_timeout_in_milliseconds = health_check_retry_timeout_in_milliseconds - self.upgrade_timeout_in_milliseconds = upgrade_timeout_in_milliseconds - self.upgrade_domain_timeout_in_milliseconds = upgrade_domain_timeout_in_milliseconds - self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds - - -class RunToCompletionExecutionPolicy(ExecutionPolicy): - """The run to completion execution policy, the service will perform its desired operation and complete successfully. If the service encounters failure, it will restarted based on restart policy specified. If the service completes its operation successfully, it will not be restarted again. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. Enumerates the execution policy types for services.Constant filled by - server. Possible values include: "Default", "RunToCompletion". - :vartype type: str or ~azure.servicefabric.models.ExecutionPolicyType - :ivar restart: Required. Enumerates the restart policy for RunToCompletionExecutionPolicy. - Possible values include: "OnFailure", "Never". - :vartype restart: str or ~azure.servicefabric.models.RestartPolicy - """ - - _validation = { - 'type': {'required': True}, - 'restart': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'restart': {'key': 'restart', 'type': 'str'}, - } - - def __init__( - self, - *, - restart: Union[str, "RestartPolicy"], - **kwargs - ): - """ - :keyword restart: Required. Enumerates the restart policy for RunToCompletionExecutionPolicy. - Possible values include: "OnFailure", "Never". - :paramtype restart: str or ~azure.servicefabric.models.RestartPolicy - """ - super(RunToCompletionExecutionPolicy, self).__init__(**kwargs) - self.type = 'RunToCompletion' # type: str - self.restart = restart - - -class SafetyCheckWrapper(msrest.serialization.Model): - """A wrapper for the safety check object. Safety checks are performed by service fabric before continuing with the operations. These checks ensure the availability of the service and the reliability of the state. - - :ivar safety_check: Represents a safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. - :vartype safety_check: ~azure.servicefabric.models.SafetyCheck - """ - - _attribute_map = { - 'safety_check': {'key': 'SafetyCheck', 'type': 'SafetyCheck'}, - } - - def __init__( - self, - *, - safety_check: Optional["SafetyCheck"] = None, - **kwargs - ): - """ - :keyword safety_check: Represents a safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. - :paramtype safety_check: ~azure.servicefabric.models.SafetyCheck - """ - super(SafetyCheckWrapper, self).__init__(**kwargs) - self.safety_check = safety_check - - -class ScalingPolicyDescription(msrest.serialization.Model): - """Describes how the scaling should be performed. - - All required parameters must be populated in order to send to Azure. - - :ivar scaling_trigger: Required. Specifies the trigger associated with this scaling policy. - :vartype scaling_trigger: ~azure.servicefabric.models.ScalingTriggerDescription - :ivar scaling_mechanism: Required. Specifies the mechanism associated with this scaling policy. - :vartype scaling_mechanism: ~azure.servicefabric.models.ScalingMechanismDescription - """ - - _validation = { - 'scaling_trigger': {'required': True}, - 'scaling_mechanism': {'required': True}, - } - - _attribute_map = { - 'scaling_trigger': {'key': 'ScalingTrigger', 'type': 'ScalingTriggerDescription'}, - 'scaling_mechanism': {'key': 'ScalingMechanism', 'type': 'ScalingMechanismDescription'}, - } - - def __init__( - self, - *, - scaling_trigger: "ScalingTriggerDescription", - scaling_mechanism: "ScalingMechanismDescription", - **kwargs - ): - """ - :keyword scaling_trigger: Required. Specifies the trigger associated with this scaling policy. - :paramtype scaling_trigger: ~azure.servicefabric.models.ScalingTriggerDescription - :keyword scaling_mechanism: Required. Specifies the mechanism associated with this scaling - policy. - :paramtype scaling_mechanism: ~azure.servicefabric.models.ScalingMechanismDescription - """ - super(ScalingPolicyDescription, self).__init__(**kwargs) - self.scaling_trigger = scaling_trigger - self.scaling_mechanism = scaling_mechanism - - -class SecondaryReplicatorStatus(ReplicatorStatus): - """Provides statistics about the Service Fabric Replicator, when it is functioning in a ActiveSecondary role. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SecondaryActiveReplicatorStatus, SecondaryIdleReplicatorStatus. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. - Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", - "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". - :vartype kind: str or ~azure.servicefabric.models.ReplicaRole - :ivar replication_queue_status: Details about the replication queue on the secondary - replicator. - :vartype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :ivar last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a - replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation message was never - received. - :vartype last_replication_operation_received_time_utc: ~datetime.datetime - :ivar is_in_build: Value that indicates whether the replica is currently being built. - :vartype is_in_build: bool - :ivar copy_queue_status: Details about the copy queue on the secondary replicator. - :vartype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :ivar last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy - operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation message was never - received. - :vartype last_copy_operation_received_time_utc: ~datetime.datetime - :ivar last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an acknowledgment - was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. - :vartype last_acknowledgement_sent_time_utc: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - _subtype_map = { - 'kind': {'ActiveSecondary': 'SecondaryActiveReplicatorStatus', 'IdleSecondary': 'SecondaryIdleReplicatorStatus'} - } - - def __init__( - self, - *, - replication_queue_status: Optional["ReplicatorQueueStatus"] = None, - last_replication_operation_received_time_utc: Optional[datetime.datetime] = None, - is_in_build: Optional[bool] = None, - copy_queue_status: Optional["ReplicatorQueueStatus"] = None, - last_copy_operation_received_time_utc: Optional[datetime.datetime] = None, - last_acknowledgement_sent_time_utc: Optional[datetime.datetime] = None, - **kwargs - ): - """ - :keyword replication_queue_status: Details about the replication queue on the secondary - replicator. - :paramtype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :keyword last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a - replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation message was never - received. - :paramtype last_replication_operation_received_time_utc: ~datetime.datetime - :keyword is_in_build: Value that indicates whether the replica is currently being built. - :paramtype is_in_build: bool - :keyword copy_queue_status: Details about the copy queue on the secondary replicator. - :paramtype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :keyword last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy - operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation message was never - received. - :paramtype last_copy_operation_received_time_utc: ~datetime.datetime - :keyword last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an - acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. - :paramtype last_acknowledgement_sent_time_utc: ~datetime.datetime - """ - super(SecondaryReplicatorStatus, self).__init__(**kwargs) - self.kind = 'SecondaryReplicatorStatus' # type: str - self.replication_queue_status = replication_queue_status - self.last_replication_operation_received_time_utc = last_replication_operation_received_time_utc - self.is_in_build = is_in_build - self.copy_queue_status = copy_queue_status - self.last_copy_operation_received_time_utc = last_copy_operation_received_time_utc - self.last_acknowledgement_sent_time_utc = last_acknowledgement_sent_time_utc - - -class SecondaryActiveReplicatorStatus(SecondaryReplicatorStatus): - """Status of the secondary replicator when it is in active mode and is part of the replica set. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. - Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", - "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". - :vartype kind: str or ~azure.servicefabric.models.ReplicaRole - :ivar replication_queue_status: Details about the replication queue on the secondary - replicator. - :vartype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :ivar last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a - replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation message was never - received. - :vartype last_replication_operation_received_time_utc: ~datetime.datetime - :ivar is_in_build: Value that indicates whether the replica is currently being built. - :vartype is_in_build: bool - :ivar copy_queue_status: Details about the copy queue on the secondary replicator. - :vartype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :ivar last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy - operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation message was never - received. - :vartype last_copy_operation_received_time_utc: ~datetime.datetime - :ivar last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an acknowledgment - was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. - :vartype last_acknowledgement_sent_time_utc: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - replication_queue_status: Optional["ReplicatorQueueStatus"] = None, - last_replication_operation_received_time_utc: Optional[datetime.datetime] = None, - is_in_build: Optional[bool] = None, - copy_queue_status: Optional["ReplicatorQueueStatus"] = None, - last_copy_operation_received_time_utc: Optional[datetime.datetime] = None, - last_acknowledgement_sent_time_utc: Optional[datetime.datetime] = None, - **kwargs - ): - """ - :keyword replication_queue_status: Details about the replication queue on the secondary - replicator. - :paramtype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :keyword last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a - replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation message was never - received. - :paramtype last_replication_operation_received_time_utc: ~datetime.datetime - :keyword is_in_build: Value that indicates whether the replica is currently being built. - :paramtype is_in_build: bool - :keyword copy_queue_status: Details about the copy queue on the secondary replicator. - :paramtype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :keyword last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy - operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation message was never - received. - :paramtype last_copy_operation_received_time_utc: ~datetime.datetime - :keyword last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an - acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. - :paramtype last_acknowledgement_sent_time_utc: ~datetime.datetime - """ - super(SecondaryActiveReplicatorStatus, self).__init__(replication_queue_status=replication_queue_status, last_replication_operation_received_time_utc=last_replication_operation_received_time_utc, is_in_build=is_in_build, copy_queue_status=copy_queue_status, last_copy_operation_received_time_utc=last_copy_operation_received_time_utc, last_acknowledgement_sent_time_utc=last_acknowledgement_sent_time_utc, **kwargs) - self.kind = 'ActiveSecondary' # type: str - - -class SecondaryIdleReplicatorStatus(SecondaryReplicatorStatus): - """Status of the secondary replicator when it is in idle mode and is being built by the primary. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The role of a replica of a stateful service.Constant filled by server. - Possible values include: "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", - "IdleAuxiliary", "ActiveAuxiliary", "PrimaryAuxiliary". - :vartype kind: str or ~azure.servicefabric.models.ReplicaRole - :ivar replication_queue_status: Details about the replication queue on the secondary - replicator. - :vartype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :ivar last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a - replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation message was never - received. - :vartype last_replication_operation_received_time_utc: ~datetime.datetime - :ivar is_in_build: Value that indicates whether the replica is currently being built. - :vartype is_in_build: bool - :ivar copy_queue_status: Details about the copy queue on the secondary replicator. - :vartype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :ivar last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy - operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation message was never - received. - :vartype last_copy_operation_received_time_utc: ~datetime.datetime - :ivar last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an acknowledgment - was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. - :vartype last_acknowledgement_sent_time_utc: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'replication_queue_status': {'key': 'ReplicationQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_replication_operation_received_time_utc': {'key': 'LastReplicationOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'is_in_build': {'key': 'IsInBuild', 'type': 'bool'}, - 'copy_queue_status': {'key': 'CopyQueueStatus', 'type': 'ReplicatorQueueStatus'}, - 'last_copy_operation_received_time_utc': {'key': 'LastCopyOperationReceivedTimeUtc', 'type': 'iso-8601'}, - 'last_acknowledgement_sent_time_utc': {'key': 'LastAcknowledgementSentTimeUtc', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - replication_queue_status: Optional["ReplicatorQueueStatus"] = None, - last_replication_operation_received_time_utc: Optional[datetime.datetime] = None, - is_in_build: Optional[bool] = None, - copy_queue_status: Optional["ReplicatorQueueStatus"] = None, - last_copy_operation_received_time_utc: Optional[datetime.datetime] = None, - last_acknowledgement_sent_time_utc: Optional[datetime.datetime] = None, - **kwargs - ): - """ - :keyword replication_queue_status: Details about the replication queue on the secondary - replicator. - :paramtype replication_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :keyword last_replication_operation_received_time_utc: The last time-stamp (UTC) at which a - replication operation was received from the primary. - UTC 0 represents an invalid value, indicating that a replication operation message was never - received. - :paramtype last_replication_operation_received_time_utc: ~datetime.datetime - :keyword is_in_build: Value that indicates whether the replica is currently being built. - :paramtype is_in_build: bool - :keyword copy_queue_status: Details about the copy queue on the secondary replicator. - :paramtype copy_queue_status: ~azure.servicefabric.models.ReplicatorQueueStatus - :keyword last_copy_operation_received_time_utc: The last time-stamp (UTC) at which a copy - operation was received from the primary. - UTC 0 represents an invalid value, indicating that a copy operation message was never - received. - :paramtype last_copy_operation_received_time_utc: ~datetime.datetime - :keyword last_acknowledgement_sent_time_utc: The last time-stamp (UTC) at which an - acknowledgment was sent to the primary replicator. - UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. - :paramtype last_acknowledgement_sent_time_utc: ~datetime.datetime - """ - super(SecondaryIdleReplicatorStatus, self).__init__(replication_queue_status=replication_queue_status, last_replication_operation_received_time_utc=last_replication_operation_received_time_utc, is_in_build=is_in_build, copy_queue_status=copy_queue_status, last_copy_operation_received_time_utc=last_copy_operation_received_time_utc, last_acknowledgement_sent_time_utc=last_acknowledgement_sent_time_utc, **kwargs) - self.kind = 'IdleSecondary' # type: str - - -class SecretResourceDescription(msrest.serialization.Model): - """This type describes a secret resource. - - All required parameters must be populated in order to send to Azure. - - :ivar properties: Required. Describes the properties of a secret resource. - :vartype properties: ~azure.servicefabric.models.SecretResourceProperties - :ivar name: Required. Name of the Secret resource. - :vartype name: str - """ - - _validation = { - 'properties': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'SecretResourceProperties'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - *, - properties: "SecretResourceProperties", - name: str, - **kwargs - ): - """ - :keyword properties: Required. Describes the properties of a secret resource. - :paramtype properties: ~azure.servicefabric.models.SecretResourceProperties - :keyword name: Required. Name of the Secret resource. - :paramtype name: str - """ - super(SecretResourceDescription, self).__init__(**kwargs) - self.properties = properties - self.name = name - - -class SecretValue(msrest.serialization.Model): - """This type represents the unencrypted value of the secret. - - :ivar value: The actual value of the secret. - :vartype value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[str] = None, - **kwargs - ): - """ - :keyword value: The actual value of the secret. - :paramtype value: str - """ - super(SecretValue, self).__init__(**kwargs) - self.value = value - - -class SecretValueProperties(msrest.serialization.Model): - """This type describes properties of secret value resource. - - :ivar value: The actual value of the secret. - :vartype value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[str] = None, - **kwargs - ): - """ - :keyword value: The actual value of the secret. - :paramtype value: str - """ - super(SecretValueProperties, self).__init__(**kwargs) - self.value = value - - -class SecretValueResourceDescription(msrest.serialization.Model): - """This type describes a value of a secret resource. The name of this resource is the version identifier corresponding to this secret value. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Version identifier of the secret value. - :vartype name: str - :ivar value: The actual value of the secret. - :vartype value: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'properties.value', 'type': 'str'}, - } - - def __init__( - self, - *, - name: str, - value: Optional[str] = None, - **kwargs - ): - """ - :keyword name: Required. Version identifier of the secret value. - :paramtype name: str - :keyword value: The actual value of the secret. - :paramtype value: str - """ - super(SecretValueResourceDescription, self).__init__(**kwargs) - self.name = name - self.value = value - - -class SecretValueResourceProperties(SecretValueProperties): - """This type describes properties of a secret value resource. - - :ivar value: The actual value of the secret. - :vartype value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[str] = None, - **kwargs - ): - """ - :keyword value: The actual value of the secret. - :paramtype value: str - """ - super(SecretValueResourceProperties, self).__init__(value=value, **kwargs) - - -class SeedNodeSafetyCheck(SafetyCheck): - """Represents a safety check for the seed nodes being performed by service fabric before continuing with node level operations. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(SeedNodeSafetyCheck, self).__init__(**kwargs) - self.kind = 'EnsureSeedNodeQuorum' # type: str - - -class SelectedPartition(msrest.serialization.Model): - """This class returns information about the partition that the user-induced operation acted upon. - - :ivar service_name: The name of the service the partition belongs to. - :vartype service_name: str - :ivar partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :vartype partition_id: str - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - *, - service_name: Optional[str] = None, - partition_id: Optional[str] = None, - **kwargs - ): - """ - :keyword service_name: The name of the service the partition belongs to. - :paramtype service_name: str - :keyword partition_id: An internal ID used by Service Fabric to uniquely identify a partition. - This is a randomly generated GUID when the service was created. The partition ID is unique and - does not change for the lifetime of the service. If the same service was deleted and recreated - the IDs of its partitions would be different. - :paramtype partition_id: str - """ - super(SelectedPartition, self).__init__(**kwargs) - self.service_name = service_name - self.partition_id = partition_id - - -class ServiceBackupConfigurationInfo(BackupConfigurationInfo): - """Backup configuration information for a specific Service Fabric service specifying what backup policy is being applied and suspend description, if any. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The entity type of a Service Fabric entity such as Application, Service - or a Partition where periodic backups can be enabled.Constant filled by server. Possible values - include: "Invalid", "Partition", "Service", "Application". - :vartype kind: str or ~azure.servicefabric.models.BackupEntityKind - :ivar policy_name: The name of the backup policy which is applicable to this Service Fabric - application or service or partition. - :vartype policy_name: str - :ivar policy_inherited_from: Specifies the scope at which the backup policy is applied. - Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope - :ivar suspension_info: Describes the backup suspension details. - :vartype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :ivar service_name: The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'policy_name': {'key': 'PolicyName', 'type': 'str'}, - 'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'}, - 'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__( - self, - *, - policy_name: Optional[str] = None, - policy_inherited_from: Optional[Union[str, "BackupPolicyScope"]] = None, - suspension_info: Optional["BackupSuspensionInfo"] = None, - service_name: Optional[str] = None, - **kwargs - ): - """ - :keyword policy_name: The name of the backup policy which is applicable to this Service Fabric - application or service or partition. - :paramtype policy_name: str - :keyword policy_inherited_from: Specifies the scope at which the backup policy is applied. - Possible values include: "Invalid", "Partition", "Service", "Application". - :paramtype policy_inherited_from: str or ~azure.servicefabric.models.BackupPolicyScope - :keyword suspension_info: Describes the backup suspension details. - :paramtype suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo - :keyword service_name: The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - """ - super(ServiceBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs) - self.kind = 'Service' # type: str - self.service_name = service_name - - -class ServiceBackupEntity(BackupEntity): - """Identifies the Service Fabric stateful service which is being backed up. - - All required parameters must be populated in order to send to Azure. - - :ivar entity_kind: Required. The entity type of a Service Fabric entity such as Application, - Service or a Partition where periodic backups can be enabled.Constant filled by server. - Possible values include: "Invalid", "Partition", "Service", "Application". - :vartype entity_kind: str or ~azure.servicefabric.models.BackupEntityKind - :ivar service_name: The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - """ - - _validation = { - 'entity_kind': {'required': True}, - } - - _attribute_map = { - 'entity_kind': {'key': 'EntityKind', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__( - self, - *, - service_name: Optional[str] = None, - **kwargs - ): - """ - :keyword service_name: The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - """ - super(ServiceBackupEntity, self).__init__(**kwargs) - self.entity_kind = 'Service' # type: str - self.service_name = service_name - - -class ServiceCorrelationDescription(msrest.serialization.Model): - """Creates a particular correlation between services. - - All required parameters must be populated in order to send to Azure. - - :ivar scheme: Required. The ServiceCorrelationScheme which describes the relationship between - this service and the service specified via ServiceName. Possible values include: "Invalid", - "Affinity", "AlignedAffinity", "NonAlignedAffinity". - :vartype scheme: str or ~azure.servicefabric.models.ServiceCorrelationScheme - :ivar service_name: Required. The name of the service that the correlation relationship is - established with. - :vartype service_name: str - """ - - _validation = { - 'scheme': {'required': True}, - 'service_name': {'required': True}, - } - - _attribute_map = { - 'scheme': {'key': 'Scheme', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__( - self, - *, - scheme: Union[str, "ServiceCorrelationScheme"], - service_name: str, - **kwargs - ): - """ - :keyword scheme: Required. The ServiceCorrelationScheme which describes the relationship - between this service and the service specified via ServiceName. Possible values include: - "Invalid", "Affinity", "AlignedAffinity", "NonAlignedAffinity". - :paramtype scheme: str or ~azure.servicefabric.models.ServiceCorrelationScheme - :keyword service_name: Required. The name of the service that the correlation relationship is - established with. - :paramtype service_name: str - """ - super(ServiceCorrelationDescription, self).__init__(**kwargs) - self.scheme = scheme - self.service_name = service_name - - -class ServiceEvent(FabricEvent): - """Represents the base for all Service Events. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServiceCreatedEvent, ServiceDeletedEvent, ServiceHealthReportExpiredEvent, ServiceNewHealthReportEvent. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar service_id: Required. The identity of the service. This ID is an encoded representation - of the service name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype service_id: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'service_id': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - } - - _subtype_map = { - 'kind': {'ServiceCreated': 'ServiceCreatedEvent', 'ServiceDeleted': 'ServiceDeletedEvent', 'ServiceHealthReportExpired': 'ServiceHealthReportExpiredEvent', 'ServiceNewHealthReport': 'ServiceNewHealthReportEvent'} - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - service_id: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword service_id: Required. The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to identify the service - resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype service_id: str - """ - super(ServiceEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs) - self.kind = 'ServiceEvent' # type: str - self.service_id = service_id - - -class ServiceCreatedEvent(ServiceEvent): - """Service Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar service_id: Required. The identity of the service. This ID is an encoded representation - of the service name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype service_id: str - :ivar service_type_name: Required. Service type name. - :vartype service_type_name: str - :ivar application_name: Required. Application name. - :vartype application_name: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar service_instance: Required. Id of Service instance. - :vartype service_instance: long - :ivar is_stateful: Required. Indicates if Service is stateful. - :vartype is_stateful: bool - :ivar partition_count: Required. Number of partitions. - :vartype partition_count: int - :ivar target_replica_set_size: Required. Size of target replicas set. - :vartype target_replica_set_size: int - :ivar min_replica_set_size: Required. Minimum size of replicas set. - :vartype min_replica_set_size: int - :ivar service_package_version: Required. Version of Service package. - :vartype service_package_version: str - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'service_id': {'required': True}, - 'service_type_name': {'required': True}, - 'application_name': {'required': True}, - 'application_type_name': {'required': True}, - 'service_instance': {'required': True}, - 'is_stateful': {'required': True}, - 'partition_count': {'required': True}, - 'target_replica_set_size': {'required': True}, - 'min_replica_set_size': {'required': True}, - 'service_package_version': {'required': True}, - 'partition_id': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - service_id: str, - service_type_name: str, - application_name: str, - application_type_name: str, - service_instance: int, - is_stateful: bool, - partition_count: int, - target_replica_set_size: int, - min_replica_set_size: int, - service_package_version: str, - partition_id: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword service_id: Required. The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to identify the service - resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype service_id: str - :keyword service_type_name: Required. Service type name. - :paramtype service_type_name: str - :keyword application_name: Required. Application name. - :paramtype application_name: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword service_instance: Required. Id of Service instance. - :paramtype service_instance: long - :keyword is_stateful: Required. Indicates if Service is stateful. - :paramtype is_stateful: bool - :keyword partition_count: Required. Number of partitions. - :paramtype partition_count: int - :keyword target_replica_set_size: Required. Size of target replicas set. - :paramtype target_replica_set_size: int - :keyword min_replica_set_size: Required. Minimum size of replicas set. - :paramtype min_replica_set_size: int - :keyword service_package_version: Required. Version of Service package. - :paramtype service_package_version: str - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - """ - super(ServiceCreatedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) - self.kind = 'ServiceCreated' # type: str - self.service_type_name = service_type_name - self.application_name = application_name - self.application_type_name = application_type_name - self.service_instance = service_instance - self.is_stateful = is_stateful - self.partition_count = partition_count - self.target_replica_set_size = target_replica_set_size - self.min_replica_set_size = min_replica_set_size - self.service_package_version = service_package_version - self.partition_id = partition_id - - -class ServiceDeletedEvent(ServiceEvent): - """Service Deleted event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar service_id: Required. The identity of the service. This ID is an encoded representation - of the service name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype service_id: str - :ivar service_type_name: Required. Service type name. - :vartype service_type_name: str - :ivar application_name: Required. Application name. - :vartype application_name: str - :ivar application_type_name: Required. Application type name. - :vartype application_type_name: str - :ivar service_instance: Required. Id of Service instance. - :vartype service_instance: long - :ivar is_stateful: Required. Indicates if Service is stateful. - :vartype is_stateful: bool - :ivar partition_count: Required. Number of partitions. - :vartype partition_count: int - :ivar target_replica_set_size: Required. Size of target replicas set. - :vartype target_replica_set_size: int - :ivar min_replica_set_size: Required. Minimum size of replicas set. - :vartype min_replica_set_size: int - :ivar service_package_version: Required. Version of Service package. - :vartype service_package_version: str - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'service_id': {'required': True}, - 'service_type_name': {'required': True}, - 'application_name': {'required': True}, - 'application_type_name': {'required': True}, - 'service_instance': {'required': True}, - 'is_stateful': {'required': True}, - 'partition_count': {'required': True}, - 'target_replica_set_size': {'required': True}, - 'min_replica_set_size': {'required': True}, - 'service_package_version': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'}, - 'service_instance': {'key': 'ServiceInstance', 'type': 'long'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'partition_count': {'key': 'PartitionCount', 'type': 'int'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'service_package_version': {'key': 'ServicePackageVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - service_id: str, - service_type_name: str, - application_name: str, - application_type_name: str, - service_instance: int, - is_stateful: bool, - partition_count: int, - target_replica_set_size: int, - min_replica_set_size: int, - service_package_version: str, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword service_id: Required. The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to identify the service - resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype service_id: str - :keyword service_type_name: Required. Service type name. - :paramtype service_type_name: str - :keyword application_name: Required. Application name. - :paramtype application_name: str - :keyword application_type_name: Required. Application type name. - :paramtype application_type_name: str - :keyword service_instance: Required. Id of Service instance. - :paramtype service_instance: long - :keyword is_stateful: Required. Indicates if Service is stateful. - :paramtype is_stateful: bool - :keyword partition_count: Required. Number of partitions. - :paramtype partition_count: int - :keyword target_replica_set_size: Required. Size of target replicas set. - :paramtype target_replica_set_size: int - :keyword min_replica_set_size: Required. Minimum size of replicas set. - :paramtype min_replica_set_size: int - :keyword service_package_version: Required. Version of Service package. - :paramtype service_package_version: str - """ - super(ServiceDeletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) - self.kind = 'ServiceDeleted' # type: str - self.service_type_name = service_type_name - self.application_name = application_name - self.application_type_name = application_type_name - self.service_instance = service_instance - self.is_stateful = is_stateful - self.partition_count = partition_count - self.target_replica_set_size = target_replica_set_size - self.min_replica_set_size = min_replica_set_size - self.service_package_version = service_package_version - - -class ServiceDescription(msrest.serialization.Model): - """A ServiceDescription contains all of the information necessary to create a service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceDescription, StatelessServiceDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The service kind.Constant filled by server. Possible values - include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar service_name: Required. The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar service_type_name: Required. Name of the service type as specified in the service - manifest. - :vartype service_type_name: str - :ivar initialization_data: The initialization data as an array of bytes. Initialization data is - passed to service instances or replicas when they are created. - :vartype initialization_data: list[int] - :ivar partition_description: Required. The partition description as an object. - :vartype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription - :ivar placement_constraints: The placement constraints as a string. Placement constraints are - boolean expressions on node properties and allow for restricting a service to particular nodes - based on the service requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :vartype placement_constraints: str - :ivar correlation_scheme: The correlation scheme. - :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :ivar service_load_metrics: The service load metrics. - :vartype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: The service placement policies. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", - "Medium", "High", "VeryHigh". - :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :ivar is_default_move_cost_specified: Indicates if the DefaultMoveCost property is specified. - :vartype is_default_move_cost_specified: bool - :ivar service_package_activation_mode: The activation mode of service package to be used for a - service. Possible values include: "SharedProcess", "ExclusiveProcess". - :vartype service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :ivar service_dns_name: The DNS name of the service. It requires the DNS system service to be - enabled in Service Fabric cluster. - :vartype service_dns_name: str - :ivar scaling_policies: Scaling policies for this service. - :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :ivar tags_required_to_place: Tags for placement of this service. - :vartype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription - :ivar tags_required_to_run: Tags for running of this service. - :vartype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription - """ - - _validation = { - 'service_kind': {'required': True}, - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceDescription', 'Stateless': 'StatelessServiceDescription'} - } - - def __init__( - self, - *, - service_name: str, - service_type_name: str, - partition_description: "PartitionSchemeDescription", - application_name: Optional[str] = None, - initialization_data: Optional[List[int]] = None, - placement_constraints: Optional[str] = None, - correlation_scheme: Optional[List["ServiceCorrelationDescription"]] = None, - service_load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, - service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, - default_move_cost: Optional[Union[str, "MoveCost"]] = None, - is_default_move_cost_specified: Optional[bool] = None, - service_package_activation_mode: Optional[Union[str, "ServicePackageActivationMode"]] = None, - service_dns_name: Optional[str] = None, - scaling_policies: Optional[List["ScalingPolicyDescription"]] = None, - tags_required_to_place: Optional["NodeTagsDescription"] = None, - tags_required_to_run: Optional["NodeTagsDescription"] = None, - **kwargs - ): - """ - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword service_name: Required. The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword service_type_name: Required. Name of the service type as specified in the service - manifest. - :paramtype service_type_name: str - :keyword initialization_data: The initialization data as an array of bytes. Initialization data - is passed to service instances or replicas when they are created. - :paramtype initialization_data: list[int] - :keyword partition_description: Required. The partition description as an object. - :paramtype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription - :keyword placement_constraints: The placement constraints as a string. Placement constraints - are boolean expressions on node properties and allow for restricting a service to particular - nodes based on the service requirements. For example, to place a service on nodes where - NodeType is blue specify the following: "NodeColor == blue)". - :paramtype placement_constraints: str - :keyword correlation_scheme: The correlation scheme. - :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :keyword service_load_metrics: The service load metrics. - :paramtype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: The service placement policies. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", - "Low", "Medium", "High", "VeryHigh". - :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :keyword is_default_move_cost_specified: Indicates if the DefaultMoveCost property is - specified. - :paramtype is_default_move_cost_specified: bool - :keyword service_package_activation_mode: The activation mode of service package to be used for - a service. Possible values include: "SharedProcess", "ExclusiveProcess". - :paramtype service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :keyword service_dns_name: The DNS name of the service. It requires the DNS system service to - be enabled in Service Fabric cluster. - :paramtype service_dns_name: str - :keyword scaling_policies: Scaling policies for this service. - :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :keyword tags_required_to_place: Tags for placement of this service. - :paramtype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription - :keyword tags_required_to_run: Tags for running of this service. - :paramtype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription - """ - super(ServiceDescription, self).__init__(**kwargs) - self.service_kind = None # type: Optional[str] - self.application_name = application_name - self.service_name = service_name - self.service_type_name = service_type_name - self.initialization_data = initialization_data - self.partition_description = partition_description - self.placement_constraints = placement_constraints - self.correlation_scheme = correlation_scheme - self.service_load_metrics = service_load_metrics - self.service_placement_policies = service_placement_policies - self.default_move_cost = default_move_cost - self.is_default_move_cost_specified = is_default_move_cost_specified - self.service_package_activation_mode = service_package_activation_mode - self.service_dns_name = service_dns_name - self.scaling_policies = scaling_policies - self.tags_required_to_place = tags_required_to_place - self.tags_required_to_run = tags_required_to_run - - -class ServiceFromTemplateDescription(msrest.serialization.Model): - """Defines description for creating a Service Fabric service from a template defined in the application manifest. - - All required parameters must be populated in order to send to Azure. - - :ivar application_name: Required. The name of the application, including the 'fabric:' URI - scheme. - :vartype application_name: str - :ivar service_name: Required. The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar service_type_name: Required. Name of the service type as specified in the service - manifest. - :vartype service_type_name: str - :ivar initialization_data: The initialization data for the newly created service instance. - :vartype initialization_data: list[int] - :ivar service_package_activation_mode: The activation mode of service package to be used for a - service. Possible values include: "SharedProcess", "ExclusiveProcess". - :vartype service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :ivar service_dns_name: The DNS name of the service. It requires the DNS system service to be - enabled in Service Fabric cluster. - :vartype service_dns_name: str - """ - - _validation = { - 'application_name': {'required': True}, - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - } - - _attribute_map = { - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - } - - def __init__( - self, - *, - application_name: str, - service_name: str, - service_type_name: str, - initialization_data: Optional[List[int]] = None, - service_package_activation_mode: Optional[Union[str, "ServicePackageActivationMode"]] = None, - service_dns_name: Optional[str] = None, - **kwargs - ): - """ - :keyword application_name: Required. The name of the application, including the 'fabric:' URI - scheme. - :paramtype application_name: str - :keyword service_name: Required. The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword service_type_name: Required. Name of the service type as specified in the service - manifest. - :paramtype service_type_name: str - :keyword initialization_data: The initialization data for the newly created service instance. - :paramtype initialization_data: list[int] - :keyword service_package_activation_mode: The activation mode of service package to be used for - a service. Possible values include: "SharedProcess", "ExclusiveProcess". - :paramtype service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :keyword service_dns_name: The DNS name of the service. It requires the DNS system service to - be enabled in Service Fabric cluster. - :paramtype service_dns_name: str - """ - super(ServiceFromTemplateDescription, self).__init__(**kwargs) - self.application_name = application_name - self.service_name = service_name - self.service_type_name = service_type_name - self.initialization_data = initialization_data - self.service_package_activation_mode = service_package_activation_mode - self.service_dns_name = service_dns_name - - -class ServiceHealth(EntityHealth): - """Information about the health of a Service Fabric service. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar name: The name of the service whose health information is described by this object. - :vartype name: str - :ivar partition_health_states: The list of partition health states associated with the service. - :vartype partition_health_states: list[~azure.servicefabric.models.PartitionHealthState] - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'partition_health_states': {'key': 'PartitionHealthStates', 'type': '[PartitionHealthState]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - health_events: Optional[List["HealthEvent"]] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - health_statistics: Optional["HealthStatistics"] = None, - name: Optional[str] = None, - partition_health_states: Optional[List["PartitionHealthState"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword name: The name of the service whose health information is described by this object. - :paramtype name: str - :keyword partition_health_states: The list of partition health states associated with the - service. - :paramtype partition_health_states: list[~azure.servicefabric.models.PartitionHealthState] - """ - super(ServiceHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs) - self.name = name - self.partition_health_states = partition_health_states - - -class ServiceHealthEvaluation(HealthEvaluation): - """Represents health evaluation for a service, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar service_name: Name of the service whose health evaluation is described by this object. - :vartype service_name: str - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated - health state of the service. The types of the unhealthy evaluations can be - PartitionsHealthEvaluation or EventHealthEvaluation. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - service_name: Optional[str] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword service_name: Name of the service whose health evaluation is described by this object. - :paramtype service_name: str - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current - aggregated health state of the service. The types of the unhealthy evaluations can be - PartitionsHealthEvaluation or EventHealthEvaluation. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(ServiceHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'Service' # type: str - self.service_name = service_name - self.unhealthy_evaluations = unhealthy_evaluations - - -class ServiceHealthReportExpiredEvent(ServiceEvent): - """Service Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar service_id: Required. The identity of the service. This ID is an encoded representation - of the service name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype service_id: str - :ivar instance_id: Required. Id of Service instance. - :vartype instance_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'service_id': {'required': True}, - 'instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - service_id: str, - instance_id: int, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword service_id: Required. The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to identify the service - resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype service_id: str - :keyword instance_id: Required. Id of Service instance. - :paramtype instance_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(ServiceHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) - self.kind = 'ServiceHealthReportExpired' # type: str - self.instance_id = instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class ServiceHealthState(EntityHealthState): - """Represents the health state of a service, which contains the service identifier and its aggregated health state. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_name: Name of the service whose health state is represented by this object. - :vartype service_name: str - """ - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - service_name: Optional[str] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword service_name: Name of the service whose health state is represented by this object. - :paramtype service_name: str - """ - super(ServiceHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs) - self.service_name = service_name - - -class ServiceHealthStateChunk(EntityHealthStateChunk): - """Represents the health state chunk of a service, which contains the service name, its aggregated health state and any partitions that respect the filters in the cluster health chunk query description. - - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_name: The name of the service whose health state chunk is provided in this - object. - :vartype service_name: str - :ivar partition_health_state_chunks: The list of partition health state chunks belonging to the - service that respect the filters in the cluster health chunk query description. - :vartype partition_health_state_chunks: - ~azure.servicefabric.models.PartitionHealthStateChunkList - """ - - _attribute_map = { - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_health_state_chunks': {'key': 'PartitionHealthStateChunks', 'type': 'PartitionHealthStateChunkList'}, - } - - def __init__( - self, - *, - health_state: Optional[Union[str, "HealthState"]] = None, - service_name: Optional[str] = None, - partition_health_state_chunks: Optional["PartitionHealthStateChunkList"] = None, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword service_name: The name of the service whose health state chunk is provided in this - object. - :paramtype service_name: str - :keyword partition_health_state_chunks: The list of partition health state chunks belonging to - the service that respect the filters in the cluster health chunk query description. - :paramtype partition_health_state_chunks: - ~azure.servicefabric.models.PartitionHealthStateChunkList - """ - super(ServiceHealthStateChunk, self).__init__(health_state=health_state, **kwargs) - self.service_name = service_name - self.partition_health_state_chunks = partition_health_state_chunks - - -class ServiceHealthStateChunkList(msrest.serialization.Model): - """The list of service health state chunks that respect the input filters in the chunk query. Returned by get cluster health state chunks query. - - :ivar items: The list of service health state chunks that respect the input filters in the - chunk query. - :vartype items: list[~azure.servicefabric.models.ServiceHealthStateChunk] - """ - - _attribute_map = { - 'items': {'key': 'Items', 'type': '[ServiceHealthStateChunk]'}, - } - - def __init__( - self, - *, - items: Optional[List["ServiceHealthStateChunk"]] = None, - **kwargs - ): - """ - :keyword items: The list of service health state chunks that respect the input filters in the - chunk query. - :paramtype items: list[~azure.servicefabric.models.ServiceHealthStateChunk] - """ - super(ServiceHealthStateChunkList, self).__init__(**kwargs) - self.items = items - - -class ServiceHealthStateFilter(msrest.serialization.Model): - """Defines matching criteria to determine whether a service should be included as a child of an application in the cluster health chunk. -The services are only returned if the parent application matches a filter specified in the cluster health chunk query description. -One filter can match zero, one or multiple services, depending on its properties. - - :ivar service_name_filter: The name of the service that matches the filter. The filter is - applied only to the specified service, if it exists. - If the service doesn't exist, no service is returned in the cluster health chunk based on this - filter. - If the service exists, it is included as the application's child if the health state matches - the other filter properties. - If not specified, all services that match the parent filters (if any) are taken into - consideration and matched against the other filter members, like health state filter. - :vartype service_name_filter: str - :ivar health_state_filter: The filter for the health state of the services. It allows selecting - services if they match the desired health states. - The possible values are integer value of one of the following health states. Only services - that match the filter are returned. All services are used to evaluate the cluster aggregated - health state. - If not specified, default value is None, unless the service name is specified. If the filter - has default value and service name is specified, the matching service is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches services with HealthState value of OK (2) - and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :vartype health_state_filter: int - :ivar partition_filters: Defines a list of filters that specify which partitions to be included - in the returned cluster health chunk as children of the service. The partitions are returned - only if the parent service matches a filter. - If the list is empty, no partitions are returned. All the partitions are used to evaluate the - parent service aggregated health state, regardless of the input filters. - The service filter may specify multiple partition filters. - For example, it can specify a filter to return all partitions with health state Error and - another filter to always include a partition identified by its partition ID. - :vartype partition_filters: list[~azure.servicefabric.models.PartitionHealthStateFilter] - """ - - _attribute_map = { - 'service_name_filter': {'key': 'ServiceNameFilter', 'type': 'str'}, - 'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'}, - 'partition_filters': {'key': 'PartitionFilters', 'type': '[PartitionHealthStateFilter]'}, - } - - def __init__( - self, - *, - service_name_filter: Optional[str] = None, - health_state_filter: Optional[int] = 0, - partition_filters: Optional[List["PartitionHealthStateFilter"]] = None, - **kwargs - ): - """ - :keyword service_name_filter: The name of the service that matches the filter. The filter is - applied only to the specified service, if it exists. - If the service doesn't exist, no service is returned in the cluster health chunk based on this - filter. - If the service exists, it is included as the application's child if the health state matches - the other filter properties. - If not specified, all services that match the parent filters (if any) are taken into - consideration and matched against the other filter members, like health state filter. - :paramtype service_name_filter: str - :keyword health_state_filter: The filter for the health state of the services. It allows - selecting services if they match the desired health states. - The possible values are integer value of one of the following health states. Only services - that match the filter are returned. All services are used to evaluate the cluster aggregated - health state. - If not specified, default value is None, unless the service name is specified. If the filter - has default value and service name is specified, the matching service is returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6, it matches services with HealthState value of OK (2) - and Warning (4). - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. - :paramtype health_state_filter: int - :keyword partition_filters: Defines a list of filters that specify which partitions to be - included in the returned cluster health chunk as children of the service. The partitions are - returned only if the parent service matches a filter. - If the list is empty, no partitions are returned. All the partitions are used to evaluate the - parent service aggregated health state, regardless of the input filters. - The service filter may specify multiple partition filters. - For example, it can specify a filter to return all partitions with health state Error and - another filter to always include a partition identified by its partition ID. - :paramtype partition_filters: list[~azure.servicefabric.models.PartitionHealthStateFilter] - """ - super(ServiceHealthStateFilter, self).__init__(**kwargs) - self.service_name_filter = service_name_filter - self.health_state_filter = health_state_filter - self.partition_filters = partition_filters - - -class ServiceIdentity(msrest.serialization.Model): - """Map service identity friendly name to an application identity. - - :ivar name: The identity friendly name. - :vartype name: str - :ivar identity_ref: The application identity name. - :vartype identity_ref: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'identity_ref': {'key': 'identityRef', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - identity_ref: Optional[str] = None, - **kwargs - ): - """ - :keyword name: The identity friendly name. - :paramtype name: str - :keyword identity_ref: The application identity name. - :paramtype identity_ref: str - """ - super(ServiceIdentity, self).__init__(**kwargs) - self.name = name - self.identity_ref = identity_ref - - -class ServiceInfo(msrest.serialization.Model): - """Information about a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceInfo, StatelessServiceInfo. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The identity of the service. This ID is an encoded representation of the service - name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype id: str - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar name: The full name of the service with 'fabric:' URI scheme. - :vartype name: str - :ivar type_name: Name of the service type as specified in the service manifest. - :vartype type_name: str - :ivar manifest_version: The version of the service manifest. - :vartype manifest_version: str - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_status: The status of the application. Possible values include: "Unknown", - "Active", "Upgrading", "Deleting", "Creating", "Failed". - :vartype service_status: str or ~azure.servicefabric.models.ServiceStatus - :ivar is_service_group: Whether the service is in a service group. - :vartype is_service_group: bool - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceInfo', 'Stateless': 'StatelessServiceInfo'} - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - type_name: Optional[str] = None, - manifest_version: Optional[str] = None, - health_state: Optional[Union[str, "HealthState"]] = None, - service_status: Optional[Union[str, "ServiceStatus"]] = None, - is_service_group: Optional[bool] = None, - **kwargs - ): - """ - :keyword id: The identity of the service. This ID is an encoded representation of the service - name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype id: str - :keyword name: The full name of the service with 'fabric:' URI scheme. - :paramtype name: str - :keyword type_name: Name of the service type as specified in the service manifest. - :paramtype type_name: str - :keyword manifest_version: The version of the service manifest. - :paramtype manifest_version: str - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword service_status: The status of the application. Possible values include: "Unknown", - "Active", "Upgrading", "Deleting", "Creating", "Failed". - :paramtype service_status: str or ~azure.servicefabric.models.ServiceStatus - :keyword is_service_group: Whether the service is in a service group. - :paramtype is_service_group: bool - """ - super(ServiceInfo, self).__init__(**kwargs) - self.id = id - self.service_kind = None # type: Optional[str] - self.name = name - self.type_name = type_name - self.manifest_version = manifest_version - self.health_state = health_state - self.service_status = service_status - self.is_service_group = is_service_group - - -class ServiceLoadMetricDescription(msrest.serialization.Model): - """Specifies a metric to load balance a service during runtime. - - All required parameters must be populated in order to send to Azure. - - :ivar 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. - :vartype name: str - :ivar weight: The service load metric relative weight, compared to other metrics configured for - this service, as a number. Possible values include: "Zero", "Low", "Medium", "High". - :vartype weight: str or ~azure.servicefabric.models.ServiceLoadMetricWeight - :ivar primary_default_load: Used only for Stateful services. The default amount of load, as a - number, that this service creates for this metric when it is a Primary replica. - :vartype primary_default_load: int - :ivar secondary_default_load: Used only for Stateful services. The default amount of load, as a - number, that this service creates for this metric when it is a Secondary replica. - :vartype secondary_default_load: int - :ivar auxiliary_default_load: Used only for Stateful services. The default amount of load, as a - number, that this service creates for this metric when it is an Auxiliary replica. - :vartype auxiliary_default_load: int - :ivar default_load: Used only for Stateless services. The default amount of load, as a number, - that this service creates for this metric. - :vartype default_load: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'weight': {'key': 'Weight', 'type': 'str'}, - 'primary_default_load': {'key': 'PrimaryDefaultLoad', 'type': 'int'}, - 'secondary_default_load': {'key': 'SecondaryDefaultLoad', 'type': 'int'}, - 'auxiliary_default_load': {'key': 'AuxiliaryDefaultLoad', 'type': 'int'}, - 'default_load': {'key': 'DefaultLoad', 'type': 'int'}, - } - - def __init__( - self, - *, - name: str, - weight: Optional[Union[str, "ServiceLoadMetricWeight"]] = None, - primary_default_load: Optional[int] = None, - secondary_default_load: Optional[int] = None, - auxiliary_default_load: Optional[int] = None, - default_load: Optional[int] = None, - **kwargs - ): - """ - :keyword 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. - :paramtype name: str - :keyword weight: The service load metric relative weight, compared to other metrics configured - for this service, as a number. Possible values include: "Zero", "Low", "Medium", "High". - :paramtype weight: str or ~azure.servicefabric.models.ServiceLoadMetricWeight - :keyword primary_default_load: Used only for Stateful services. The default amount of load, as - a number, that this service creates for this metric when it is a Primary replica. - :paramtype primary_default_load: int - :keyword secondary_default_load: Used only for Stateful services. The default amount of load, - as a number, that this service creates for this metric when it is a Secondary replica. - :paramtype secondary_default_load: int - :keyword auxiliary_default_load: Used only for Stateful services. The default amount of load, - as a number, that this service creates for this metric when it is an Auxiliary replica. - :paramtype auxiliary_default_load: int - :keyword default_load: Used only for Stateless services. The default amount of load, as a - number, that this service creates for this metric. - :paramtype default_load: int - """ - super(ServiceLoadMetricDescription, self).__init__(**kwargs) - self.name = name - self.weight = weight - self.primary_default_load = primary_default_load - self.secondary_default_load = secondary_default_load - self.auxiliary_default_load = auxiliary_default_load - self.default_load = default_load - - -class ServiceNameInfo(msrest.serialization.Model): - """Information about the service name. - - :ivar id: The identity of the service. This ID is an encoded representation of the service - name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype id: str - :ivar name: The full name of the service with 'fabric:' URI scheme. - :vartype name: str - """ - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - **kwargs - ): - """ - :keyword id: The identity of the service. This ID is an encoded representation of the service - name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype id: str - :keyword name: The full name of the service with 'fabric:' URI scheme. - :paramtype name: str - """ - super(ServiceNameInfo, self).__init__(**kwargs) - self.id = id - self.name = name - - -class ServiceNewHealthReportEvent(ServiceEvent): - """Service Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar service_id: Required. The identity of the service. This ID is an encoded representation - of the service name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype service_id: str - :ivar instance_id: Required. Id of Service instance. - :vartype instance_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'service_id': {'required': True}, - 'instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'service_id': {'key': 'ServiceId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - service_id: str, - instance_id: int, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword service_id: Required. The identity of the service. This ID is an encoded - representation of the service name. This is used in the REST APIs to identify the service - resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype service_id: str - :keyword instance_id: Required. Id of Service instance. - :paramtype instance_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(ServiceNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, service_id=service_id, **kwargs) - self.kind = 'ServiceNewHealthReport' # type: str - self.instance_id = instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class ServicePartitionInfo(msrest.serialization.Model): - """Information about a partition of a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServicePartitionInfo, StatelessServicePartitionInfo. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar partition_status: The status of the service fabric service partition. Possible values - include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". - :vartype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus - :ivar partition_information: Information about the partition identity, partitioning scheme and - keys supported by it. - :vartype partition_information: ~azure.servicefabric.models.PartitionInformation - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServicePartitionInfo', 'Stateless': 'StatelessServicePartitionInfo'} - } - - def __init__( - self, - *, - health_state: Optional[Union[str, "HealthState"]] = None, - partition_status: Optional[Union[str, "ServicePartitionStatus"]] = None, - partition_information: Optional["PartitionInformation"] = None, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword partition_status: The status of the service fabric service partition. Possible values - include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". - :paramtype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus - :keyword partition_information: Information about the partition identity, partitioning scheme - and keys supported by it. - :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation - """ - super(ServicePartitionInfo, self).__init__(**kwargs) - self.service_kind = None # type: Optional[str] - self.health_state = health_state - self.partition_status = partition_status - self.partition_information = partition_information - - -class ServicePlacementPolicyDescription(msrest.serialization.Model): - """Describes the policy to be used for placement of a Service Fabric service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, ServicePlacementInvalidDomainPolicyDescription, ServicePlacementNonPartiallyPlaceServicePolicyDescription, ServicePlacementPreferPrimaryDomainPolicyDescription, ServicePlacementRequiredDomainPolicyDescription, ServicePlacementRequireDomainDistributionPolicyDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The type of placement policy for a service fabric service. Following are - the possible values.Constant filled by server. Possible values include: "Invalid", - "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", - "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". - :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'AllowMultipleStatelessInstancesOnNode': 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', 'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ServicePlacementPolicyDescription, self).__init__(**kwargs) - self.type = None # type: Optional[str] - - -class ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service allowing multiple stateless instances of a partition of the service to be placed on a node. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The type of placement policy for a service fabric service. Following are - the possible values.Constant filled by server. Possible values include: "Invalid", - "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", - "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". - :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType - :ivar domain_name: Holdover from other policy descriptions, not used for this policy, values - are ignored by runtime. Keeping it for any backwards-compatibility with clients. - :vartype domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__( - self, - *, - domain_name: Optional[str] = None, - **kwargs - ): - """ - :keyword domain_name: Holdover from other policy descriptions, not used for this policy, values - are ignored by runtime. Keeping it for any backwards-compatibility with clients. - :paramtype domain_name: str - """ - super(ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, self).__init__(**kwargs) - self.type = 'AllowMultipleStatelessInstancesOnNode' # type: str - self.domain_name = domain_name - - -class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service where a particular fault or upgrade domain should not be used for placement of the instances or replicas of that service. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The type of placement policy for a service fabric service. Following are - the possible values.Constant filled by server. Possible values include: "Invalid", - "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", - "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". - :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType - :ivar domain_name: The name of the domain that should not be used for placement. - :vartype domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__( - self, - *, - domain_name: Optional[str] = None, - **kwargs - ): - """ - :keyword domain_name: The name of the domain that should not be used for placement. - :paramtype domain_name: str - """ - super(ServicePlacementInvalidDomainPolicyDescription, self).__init__(**kwargs) - self.type = 'InvalidDomain' # type: str - self.domain_name = domain_name - - -class ServicePlacementNonPartiallyPlaceServicePolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service where all replicas must be able to be placed in order for any replicas to be created. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The type of placement policy for a service fabric service. Following are - the possible values.Constant filled by server. Possible values include: "Invalid", - "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", - "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". - :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ServicePlacementNonPartiallyPlaceServicePolicyDescription, self).__init__(**kwargs) - self.type = 'NonPartiallyPlaceService' # type: str - - -class ServicePlacementPreferPrimaryDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service where the service's Primary replicas should optimally be placed in a particular domain. - -This placement policy is usually used with fault domains in scenarios where the Service Fabric cluster is geographically distributed in order to indicate that a service's primary replica should be located in a particular fault domain, which in geo-distributed scenarios usually aligns with regional or datacenter boundaries. Note that since this is an optimization it is possible that the Primary replica may not end up located in this domain due to failures, capacity limits, or other constraints. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The type of placement policy for a service fabric service. Following are - the possible values.Constant filled by server. Possible values include: "Invalid", - "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", - "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". - :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType - :ivar domain_name: The name of the domain that should used for placement as per this policy. - :vartype domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__( - self, - *, - domain_name: Optional[str] = None, - **kwargs - ): - """ - :keyword domain_name: The name of the domain that should used for placement as per this policy. - :paramtype domain_name: str - """ - super(ServicePlacementPreferPrimaryDomainPolicyDescription, self).__init__(**kwargs) - self.type = 'PreferPrimaryDomain' # type: str - self.domain_name = domain_name - - -class ServicePlacementRequiredDomainPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service where the instances or replicas of that service must be placed in a particular domain. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The type of placement policy for a service fabric service. Following are - the possible values.Constant filled by server. Possible values include: "Invalid", - "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", - "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". - :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType - :ivar domain_name: The name of the domain that should used for placement as per this policy. - :vartype domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__( - self, - *, - domain_name: Optional[str] = None, - **kwargs - ): - """ - :keyword domain_name: The name of the domain that should used for placement as per this policy. - :paramtype domain_name: str - """ - super(ServicePlacementRequiredDomainPolicyDescription, self).__init__(**kwargs) - self.type = 'RequireDomain' # type: str - self.domain_name = domain_name - - -class ServicePlacementRequireDomainDistributionPolicyDescription(ServicePlacementPolicyDescription): - """Describes the policy to be used for placement of a Service Fabric service where two replicas from the same partition should never be placed in the same fault or upgrade domain. - -While this is not common it can expose the service to an increased risk of concurrent failures due to unplanned outages or other cases of subsequent/concurrent failures. As an example, consider a case where replicas are deployed across different data center, with one replica per location. In the event that one of the datacenters goes offline, normally the replica that was placed in that datacenter will be packed into one of the remaining datacenters. If this is not desirable then this policy should be set. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The type of placement policy for a service fabric service. Following are - the possible values.Constant filled by server. Possible values include: "Invalid", - "InvalidDomain", "RequireDomain", "PreferPrimaryDomain", "RequireDomainDistribution", - "NonPartiallyPlaceService", "AllowMultipleStatelessInstancesOnNode". - :vartype type: str or ~azure.servicefabric.models.ServicePlacementPolicyType - :ivar domain_name: The name of the domain that should used for placement as per this policy. - :vartype domain_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, - 'domain_name': {'key': 'DomainName', 'type': 'str'}, - } - - def __init__( - self, - *, - domain_name: Optional[str] = None, - **kwargs - ): - """ - :keyword domain_name: The name of the domain that should used for placement as per this policy. - :paramtype domain_name: str - """ - super(ServicePlacementRequireDomainDistributionPolicyDescription, self).__init__(**kwargs) - self.type = 'RequireDomainDistribution' # type: str - self.domain_name = domain_name - - -class ServiceProperties(msrest.serialization.Model): - """Describes properties of a service resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar description: User readable description of the service. - :vartype description: str - :ivar replica_count: The number of replicas of the service to create. Defaults to 1 if not - specified. - :vartype replica_count: int - :ivar execution_policy: The execution policy of the service. - :vartype execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :ivar auto_scaling_policies: Auto scaling policies. - :vartype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] - :ivar status: Status of the service. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the service. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. Possible values - include: "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the service's health state is not 'Ok', this additional - details from service fabric Health Manager for the user to know why the service is marked - unhealthy. - :vartype unhealthy_evaluation: str - :ivar identity_refs: The service identity list. - :vartype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :ivar dns_name: Dns name of the service. - :vartype dns_name: str - """ - - _validation = { - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'replica_count': {'key': 'replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'health_state': {'key': 'healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - } - - def __init__( - self, - *, - description: Optional[str] = None, - replica_count: Optional[int] = None, - execution_policy: Optional["ExecutionPolicy"] = None, - auto_scaling_policies: Optional[List["AutoScalingPolicy"]] = None, - identity_refs: Optional[List["ServiceIdentity"]] = None, - dns_name: Optional[str] = None, - **kwargs - ): - """ - :keyword description: User readable description of the service. - :paramtype description: str - :keyword replica_count: The number of replicas of the service to create. Defaults to 1 if not - specified. - :paramtype replica_count: int - :keyword execution_policy: The execution policy of the service. - :paramtype execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :keyword auto_scaling_policies: Auto scaling policies. - :paramtype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] - :keyword identity_refs: The service identity list. - :paramtype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :keyword dns_name: Dns name of the service. - :paramtype dns_name: str - """ - super(ServiceProperties, self).__init__(**kwargs) - self.description = description - self.replica_count = replica_count - self.execution_policy = execution_policy - self.auto_scaling_policies = auto_scaling_policies - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity_refs = identity_refs - self.dns_name = dns_name - - -class ServiceReplicaProperties(msrest.serialization.Model): - """Describes the properties of a service replica. - - All required parameters must be populated in order to send to Azure. - - :ivar os_type: Required. The operation system required by the code in service. Possible values - include: "Linux", "Windows". - :vartype os_type: str or ~azure.servicefabric.models.OperatingSystemType - :ivar 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.). - :vartype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] - :ivar network_refs: The names of the private networks that this service needs to be part of. - :vartype network_refs: list[~azure.servicefabric.models.NetworkRef] - :ivar diagnostics: Reference to sinks in DiagnosticsDescription. - :vartype 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: Union[str, "OperatingSystemType"], - code_packages: List["ContainerCodePackageProperties"], - network_refs: Optional[List["NetworkRef"]] = None, - diagnostics: Optional["DiagnosticsRef"] = None, - **kwargs - ): - """ - :keyword os_type: Required. The operation system required by the code in service. Possible - values include: "Linux", "Windows". - :paramtype os_type: str or ~azure.servicefabric.models.OperatingSystemType - :keyword 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.). - :paramtype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] - :keyword network_refs: The names of the private networks that this service needs to be part of. - :paramtype network_refs: list[~azure.servicefabric.models.NetworkRef] - :keyword diagnostics: Reference to sinks in DiagnosticsDescription. - :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - """ - super(ServiceReplicaProperties, self).__init__(**kwargs) - self.os_type = os_type - self.code_packages = code_packages - self.network_refs = network_refs - self.diagnostics = diagnostics - - -class ServiceReplicaDescription(ServiceReplicaProperties): - """Describes a replica of a service resource. - - All required parameters must be populated in order to send to Azure. - - :ivar os_type: Required. The operation system required by the code in service. Possible values - include: "Linux", "Windows". - :vartype os_type: str or ~azure.servicefabric.models.OperatingSystemType - :ivar 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.). - :vartype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] - :ivar network_refs: The names of the private networks that this service needs to be part of. - :vartype network_refs: list[~azure.servicefabric.models.NetworkRef] - :ivar diagnostics: Reference to sinks in DiagnosticsDescription. - :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :ivar replica_name: Required. Name of the replica. - :vartype 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: Union[str, "OperatingSystemType"], - code_packages: List["ContainerCodePackageProperties"], - replica_name: str, - network_refs: Optional[List["NetworkRef"]] = None, - diagnostics: Optional["DiagnosticsRef"] = None, - **kwargs - ): - """ - :keyword os_type: Required. The operation system required by the code in service. Possible - values include: "Linux", "Windows". - :paramtype os_type: str or ~azure.servicefabric.models.OperatingSystemType - :keyword 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.). - :paramtype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] - :keyword network_refs: The names of the private networks that this service needs to be part of. - :paramtype network_refs: list[~azure.servicefabric.models.NetworkRef] - :keyword diagnostics: Reference to sinks in DiagnosticsDescription. - :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :keyword replica_name: Required. Name of the replica. - :paramtype replica_name: str - """ - super(ServiceReplicaDescription, self).__init__(os_type=os_type, code_packages=code_packages, network_refs=network_refs, diagnostics=diagnostics, **kwargs) - self.replica_name = replica_name - - -class ServiceResourceDescription(msrest.serialization.Model): - """This type describes a service resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of the Service resource. - :vartype name: str - :ivar os_type: Required. The operation system required by the code in service. Possible values - include: "Linux", "Windows". - :vartype os_type: str or ~azure.servicefabric.models.OperatingSystemType - :ivar 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.). - :vartype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] - :ivar network_refs: The names of the private networks that this service needs to be part of. - :vartype network_refs: list[~azure.servicefabric.models.NetworkRef] - :ivar diagnostics: Reference to sinks in DiagnosticsDescription. - :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :ivar description: User readable description of the service. - :vartype description: str - :ivar replica_count: The number of replicas of the service to create. Defaults to 1 if not - specified. - :vartype replica_count: int - :ivar execution_policy: The execution policy of the service. - :vartype execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :ivar auto_scaling_policies: Auto scaling policies. - :vartype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] - :ivar status: Status of the service. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the service. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. Possible values - include: "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the service's health state is not 'Ok', this additional - details from service fabric Health Manager for the user to know why the service is marked - unhealthy. - :vartype unhealthy_evaluation: str - :ivar identity_refs: The service identity list. - :vartype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :ivar dns_name: Dns name of the service. - :vartype dns_name: str - """ - - _validation = { - 'name': {'required': True}, - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'os_type': {'key': 'properties.osType', 'type': 'str'}, - 'code_packages': {'key': 'properties.codePackages', 'type': '[ContainerCodePackageProperties]'}, - 'network_refs': {'key': 'properties.networkRefs', 'type': '[NetworkRef]'}, - 'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsRef'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'properties.executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'properties.autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'health_state': {'key': 'properties.healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'properties.identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, - } - - def __init__( - self, - *, - name: str, - os_type: Union[str, "OperatingSystemType"], - code_packages: List["ContainerCodePackageProperties"], - network_refs: Optional[List["NetworkRef"]] = None, - diagnostics: Optional["DiagnosticsRef"] = None, - description: Optional[str] = None, - replica_count: Optional[int] = None, - execution_policy: Optional["ExecutionPolicy"] = None, - auto_scaling_policies: Optional[List["AutoScalingPolicy"]] = None, - identity_refs: Optional[List["ServiceIdentity"]] = None, - dns_name: Optional[str] = None, - **kwargs - ): - """ - :keyword name: Required. Name of the Service resource. - :paramtype name: str - :keyword os_type: Required. The operation system required by the code in service. Possible - values include: "Linux", "Windows". - :paramtype os_type: str or ~azure.servicefabric.models.OperatingSystemType - :keyword 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.). - :paramtype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] - :keyword network_refs: The names of the private networks that this service needs to be part of. - :paramtype network_refs: list[~azure.servicefabric.models.NetworkRef] - :keyword diagnostics: Reference to sinks in DiagnosticsDescription. - :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - :keyword description: User readable description of the service. - :paramtype description: str - :keyword replica_count: The number of replicas of the service to create. Defaults to 1 if not - specified. - :paramtype replica_count: int - :keyword execution_policy: The execution policy of the service. - :paramtype execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :keyword auto_scaling_policies: Auto scaling policies. - :paramtype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] - :keyword identity_refs: The service identity list. - :paramtype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :keyword dns_name: Dns name of the service. - :paramtype dns_name: str - """ - super(ServiceResourceDescription, self).__init__(**kwargs) - self.name = name - self.os_type = os_type - self.code_packages = code_packages - self.network_refs = network_refs - self.diagnostics = diagnostics - self.description = description - self.replica_count = replica_count - self.execution_policy = execution_policy - self.auto_scaling_policies = auto_scaling_policies - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity_refs = identity_refs - self.dns_name = dns_name - - -class ServiceResourceProperties(ServiceReplicaProperties, ServiceProperties): - """This type describes properties of a service resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar description: User readable description of the service. - :vartype description: str - :ivar replica_count: The number of replicas of the service to create. Defaults to 1 if not - specified. - :vartype replica_count: int - :ivar execution_policy: The execution policy of the service. - :vartype execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :ivar auto_scaling_policies: Auto scaling policies. - :vartype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] - :ivar status: Status of the service. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the service. - :vartype status_details: str - :ivar health_state: Describes the health state of an application resource. Possible values - include: "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar unhealthy_evaluation: When the service's health state is not 'Ok', this additional - details from service fabric Health Manager for the user to know why the service is marked - unhealthy. - :vartype unhealthy_evaluation: str - :ivar identity_refs: The service identity list. - :vartype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :ivar dns_name: Dns name of the service. - :vartype dns_name: str - :ivar os_type: Required. The operation system required by the code in service. Possible values - include: "Linux", "Windows". - :vartype os_type: str or ~azure.servicefabric.models.OperatingSystemType - :ivar 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.). - :vartype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] - :ivar network_refs: The names of the private networks that this service needs to be part of. - :vartype network_refs: list[~azure.servicefabric.models.NetworkRef] - :ivar diagnostics: Reference to sinks in DiagnosticsDescription. - :vartype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - """ - - _validation = { - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'health_state': {'readonly': True}, - 'unhealthy_evaluation': {'readonly': True}, - 'os_type': {'required': True}, - 'code_packages': {'required': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'replica_count': {'key': 'replicaCount', 'type': 'int'}, - 'execution_policy': {'key': 'executionPolicy', 'type': 'ExecutionPolicy'}, - 'auto_scaling_policies': {'key': 'autoScalingPolicies', 'type': '[AutoScalingPolicy]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_details': {'key': 'statusDetails', 'type': 'str'}, - 'health_state': {'key': 'healthState', 'type': 'str'}, - 'unhealthy_evaluation': {'key': 'unhealthyEvaluation', 'type': 'str'}, - 'identity_refs': {'key': 'identityRefs', 'type': '[ServiceIdentity]'}, - 'dns_name': {'key': 'dnsName', 'type': 'str'}, - '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: Union[str, "OperatingSystemType"], - code_packages: List["ContainerCodePackageProperties"], - description: Optional[str] = None, - replica_count: Optional[int] = None, - execution_policy: Optional["ExecutionPolicy"] = None, - auto_scaling_policies: Optional[List["AutoScalingPolicy"]] = None, - identity_refs: Optional[List["ServiceIdentity"]] = None, - dns_name: Optional[str] = None, - network_refs: Optional[List["NetworkRef"]] = None, - diagnostics: Optional["DiagnosticsRef"] = None, - **kwargs - ): - """ - :keyword description: User readable description of the service. - :paramtype description: str - :keyword replica_count: The number of replicas of the service to create. Defaults to 1 if not - specified. - :paramtype replica_count: int - :keyword execution_policy: The execution policy of the service. - :paramtype execution_policy: ~azure.servicefabric.models.ExecutionPolicy - :keyword auto_scaling_policies: Auto scaling policies. - :paramtype auto_scaling_policies: list[~azure.servicefabric.models.AutoScalingPolicy] - :keyword identity_refs: The service identity list. - :paramtype identity_refs: list[~azure.servicefabric.models.ServiceIdentity] - :keyword dns_name: Dns name of the service. - :paramtype dns_name: str - :keyword os_type: Required. The operation system required by the code in service. Possible - values include: "Linux", "Windows". - :paramtype os_type: str or ~azure.servicefabric.models.OperatingSystemType - :keyword 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.). - :paramtype code_packages: list[~azure.servicefabric.models.ContainerCodePackageProperties] - :keyword network_refs: The names of the private networks that this service needs to be part of. - :paramtype network_refs: list[~azure.servicefabric.models.NetworkRef] - :keyword diagnostics: Reference to sinks in DiagnosticsDescription. - :paramtype diagnostics: ~azure.servicefabric.models.DiagnosticsRef - """ - super(ServiceResourceProperties, self).__init__(os_type=os_type, code_packages=code_packages, network_refs=network_refs, diagnostics=diagnostics, description=description, replica_count=replica_count, execution_policy=execution_policy, auto_scaling_policies=auto_scaling_policies, identity_refs=identity_refs, dns_name=dns_name, **kwargs) - self.description = description - self.replica_count = replica_count - self.execution_policy = execution_policy - self.auto_scaling_policies = auto_scaling_policies - self.status = None - self.status_details = None - self.health_state = None - self.unhealthy_evaluation = None - self.identity_refs = identity_refs - self.dns_name = dns_name - self.os_type = os_type - self.code_packages = code_packages - self.network_refs = network_refs - self.diagnostics = diagnostics - - -class ServicesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for services of a certain service type belonging to an application, containing health evaluations for each unhealthy service that impacted current aggregated health state. Can be returned when evaluating application health and the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar service_type_name: Name of the service type of the services. - :vartype service_type_name: str - :ivar max_percent_unhealthy_services: Maximum allowed percentage of unhealthy services from the - ServiceTypeHealthPolicy. - :vartype max_percent_unhealthy_services: int - :ivar total_count: Total number of services of the current service type in the application from - the health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy ServiceHealthEvaluation that impacted the aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - service_type_name: Optional[str] = None, - max_percent_unhealthy_services: Optional[int] = None, - total_count: Optional[int] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword service_type_name: Name of the service type of the services. - :paramtype service_type_name: str - :keyword max_percent_unhealthy_services: Maximum allowed percentage of unhealthy services from - the ServiceTypeHealthPolicy. - :paramtype max_percent_unhealthy_services: int - :keyword total_count: Total number of services of the current service type in the application - from the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy ServiceHealthEvaluation that impacted the aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(ServicesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'Services' # type: str - self.service_type_name = service_type_name - self.max_percent_unhealthy_services = max_percent_unhealthy_services - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - - -class ServiceTypeDescription(msrest.serialization.Model): - """Describes a service type defined in the service manifest of a provisioned application type. The properties the ones defined in the service manifest. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceTypeDescription, StatelessServiceTypeDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of service (Stateless or Stateful).Constant filled by server. - Possible values include: "Invalid", "Stateless", "Stateful". - :vartype kind: str or ~azure.servicefabric.models.ServiceKind - :ivar is_stateful: Indicates whether the service type is a stateful service type or a stateless - service type. This property is true if the service type is a stateful service type, false - otherwise. - :vartype is_stateful: bool - :ivar service_type_name: Name of the service type as specified in the service manifest. - :vartype service_type_name: str - :ivar placement_constraints: The placement constraint to be used when instantiating this - service in a Service Fabric cluster. - :vartype placement_constraints: str - :ivar load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: List of service placement policy descriptions. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar extensions: List of service type extensions. - :vartype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - } - - _subtype_map = { - 'kind': {'Stateful': 'StatefulServiceTypeDescription', 'Stateless': 'StatelessServiceTypeDescription'} - } - - def __init__( - self, - *, - is_stateful: Optional[bool] = None, - service_type_name: Optional[str] = None, - placement_constraints: Optional[str] = None, - load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, - service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, - extensions: Optional[List["ServiceTypeExtensionDescription"]] = None, - **kwargs - ): - """ - :keyword is_stateful: Indicates whether the service type is a stateful service type or a - stateless service type. This property is true if the service type is a stateful service type, - false otherwise. - :paramtype is_stateful: bool - :keyword service_type_name: Name of the service type as specified in the service manifest. - :paramtype service_type_name: str - :keyword placement_constraints: The placement constraint to be used when instantiating this - service in a Service Fabric cluster. - :paramtype placement_constraints: str - :keyword load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: List of service placement policy descriptions. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword extensions: List of service type extensions. - :paramtype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - """ - super(ServiceTypeDescription, self).__init__(**kwargs) - self.kind = None # type: Optional[str] - self.is_stateful = is_stateful - self.service_type_name = service_type_name - self.placement_constraints = placement_constraints - self.load_metrics = load_metrics - self.service_placement_policies = service_placement_policies - self.extensions = extensions - - -class ServiceTypeExtensionDescription(msrest.serialization.Model): - """Describes extension of a service type defined in the service manifest. - - :ivar key: The name of the extension. - :vartype key: str - :ivar value: The extension value. - :vartype value: str - """ - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, - } - - def __init__( - self, - *, - key: Optional[str] = None, - value: Optional[str] = None, - **kwargs - ): - """ - :keyword key: The name of the extension. - :paramtype key: str - :keyword value: The extension value. - :paramtype value: str - """ - super(ServiceTypeExtensionDescription, self).__init__(**kwargs) - self.key = key - self.value = value - - -class ServiceTypeHealthPolicy(msrest.serialization.Model): - """Represents the health policy used to evaluate the health of services belonging to a service type. - - :ivar max_percent_unhealthy_partitions_per_service: The maximum allowed percentage of unhealthy - partitions per service. Allowed values are Byte values from zero to 100 - - The percentage represents the maximum tolerated percentage of partitions that can be unhealthy - before the service is considered in error. - If the percentage is respected but there is at least one unhealthy partition, the health is - evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy partitions over the total - number of partitions in the service. - The computation rounds up to tolerate one failure on small numbers of partitions. Default - percentage is zero. - :vartype max_percent_unhealthy_partitions_per_service: int - :ivar max_percent_unhealthy_replicas_per_partition: The maximum allowed percentage of unhealthy - replicas per partition. Allowed values are Byte values from zero to 100. - - The percentage represents the maximum tolerated percentage of replicas that can be unhealthy - before the partition is considered in error. - If the percentage is respected but there is at least one unhealthy replica, the health is - evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy replicas over the total - number of replicas in the partition. - The computation rounds up to tolerate one failure on small numbers of replicas. Default - percentage is zero. - :vartype max_percent_unhealthy_replicas_per_partition: int - :ivar max_percent_unhealthy_services: The maximum allowed percentage of unhealthy services. - Allowed values are Byte values from zero to 100. - - The percentage represents the maximum tolerated percentage of services that can be unhealthy - before the application is considered in error. - If the percentage is respected but there is at least one unhealthy service, the health is - evaluated as Warning. - This is calculated by dividing the number of unhealthy services of the specific service type - over the total number of services of the specific service type. - The computation rounds up to tolerate one failure on small numbers of services. Default - percentage is zero. - :vartype max_percent_unhealthy_services: int - """ - - _attribute_map = { - 'max_percent_unhealthy_partitions_per_service': {'key': 'MaxPercentUnhealthyPartitionsPerService', 'type': 'int'}, - 'max_percent_unhealthy_replicas_per_partition': {'key': 'MaxPercentUnhealthyReplicasPerPartition', 'type': 'int'}, - 'max_percent_unhealthy_services': {'key': 'MaxPercentUnhealthyServices', 'type': 'int'}, - } - - def __init__( - self, - *, - max_percent_unhealthy_partitions_per_service: Optional[int] = 0, - max_percent_unhealthy_replicas_per_partition: Optional[int] = 0, - max_percent_unhealthy_services: Optional[int] = 0, - **kwargs - ): - """ - :keyword max_percent_unhealthy_partitions_per_service: The maximum allowed percentage of - unhealthy partitions per service. Allowed values are Byte values from zero to 100 - - The percentage represents the maximum tolerated percentage of partitions that can be unhealthy - before the service is considered in error. - If the percentage is respected but there is at least one unhealthy partition, the health is - evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy partitions over the total - number of partitions in the service. - The computation rounds up to tolerate one failure on small numbers of partitions. Default - percentage is zero. - :paramtype max_percent_unhealthy_partitions_per_service: int - :keyword max_percent_unhealthy_replicas_per_partition: The maximum allowed percentage of - unhealthy replicas per partition. Allowed values are Byte values from zero to 100. - - The percentage represents the maximum tolerated percentage of replicas that can be unhealthy - before the partition is considered in error. - If the percentage is respected but there is at least one unhealthy replica, the health is - evaluated as Warning. - The percentage is calculated by dividing the number of unhealthy replicas over the total - number of replicas in the partition. - The computation rounds up to tolerate one failure on small numbers of replicas. Default - percentage is zero. - :paramtype max_percent_unhealthy_replicas_per_partition: int - :keyword max_percent_unhealthy_services: The maximum allowed percentage of unhealthy services. - Allowed values are Byte values from zero to 100. - - The percentage represents the maximum tolerated percentage of services that can be unhealthy - before the application is considered in error. - If the percentage is respected but there is at least one unhealthy service, the health is - evaluated as Warning. - This is calculated by dividing the number of unhealthy services of the specific service type - over the total number of services of the specific service type. - The computation rounds up to tolerate one failure on small numbers of services. Default - percentage is zero. - :paramtype max_percent_unhealthy_services: int - """ - super(ServiceTypeHealthPolicy, self).__init__(**kwargs) - self.max_percent_unhealthy_partitions_per_service = max_percent_unhealthy_partitions_per_service - self.max_percent_unhealthy_replicas_per_partition = max_percent_unhealthy_replicas_per_partition - self.max_percent_unhealthy_services = max_percent_unhealthy_services - - -class ServiceTypeHealthPolicyMapItem(msrest.serialization.Model): - """Defines an item in ServiceTypeHealthPolicyMap. - - All required parameters must be populated in order to send to Azure. - - :ivar key: Required. The key of the service type health policy map item. This is the name of - the service type. - :vartype key: str - :ivar value: Required. The value of the service type health policy map item. This is the - ServiceTypeHealthPolicy for this service type. - :vartype value: ~azure.servicefabric.models.ServiceTypeHealthPolicy - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'key': {'key': 'Key', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'ServiceTypeHealthPolicy'}, - } - - def __init__( - self, - *, - key: str, - value: "ServiceTypeHealthPolicy", - **kwargs - ): - """ - :keyword key: Required. The key of the service type health policy map item. This is the name of - the service type. - :paramtype key: str - :keyword value: Required. The value of the service type health policy map item. This is the - ServiceTypeHealthPolicy for this service type. - :paramtype value: ~azure.servicefabric.models.ServiceTypeHealthPolicy - """ - super(ServiceTypeHealthPolicyMapItem, self).__init__(**kwargs) - self.key = key - self.value = value - - -class ServiceTypeInfo(msrest.serialization.Model): - """Information about a service type that is defined in a service manifest of a provisioned application type. - - :ivar service_type_description: Describes a service type defined in the service manifest of a - provisioned application type. The properties the ones defined in the service manifest. - :vartype service_type_description: ~azure.servicefabric.models.ServiceTypeDescription - :ivar service_manifest_name: The name of the service manifest in which this service type is - defined. - :vartype service_manifest_name: str - :ivar service_manifest_version: The version of the service manifest in which this service type - is defined. - :vartype service_manifest_version: str - :ivar is_service_group: Indicates whether the service is a service group. If it is, the - property value is true otherwise false. - :vartype is_service_group: bool - """ - - _attribute_map = { - 'service_type_description': {'key': 'ServiceTypeDescription', 'type': 'ServiceTypeDescription'}, - 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, - 'service_manifest_version': {'key': 'ServiceManifestVersion', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - } - - def __init__( - self, - *, - service_type_description: Optional["ServiceTypeDescription"] = None, - service_manifest_name: Optional[str] = None, - service_manifest_version: Optional[str] = None, - is_service_group: Optional[bool] = None, - **kwargs - ): - """ - :keyword service_type_description: Describes a service type defined in the service manifest of - a provisioned application type. The properties the ones defined in the service manifest. - :paramtype service_type_description: ~azure.servicefabric.models.ServiceTypeDescription - :keyword service_manifest_name: The name of the service manifest in which this service type is - defined. - :paramtype service_manifest_name: str - :keyword service_manifest_version: The version of the service manifest in which this service - type is defined. - :paramtype service_manifest_version: str - :keyword is_service_group: Indicates whether the service is a service group. If it is, the - property value is true otherwise false. - :paramtype is_service_group: bool - """ - super(ServiceTypeInfo, self).__init__(**kwargs) - self.service_type_description = service_type_description - self.service_manifest_name = service_manifest_name - self.service_manifest_version = service_manifest_version - self.is_service_group = is_service_group - - -class ServiceTypeManifest(msrest.serialization.Model): - """Contains the manifest describing a service type registered as part of an application in a Service Fabric cluster. - - :ivar manifest: The XML manifest as a string. - :vartype manifest: str - """ - - _attribute_map = { - 'manifest': {'key': 'Manifest', 'type': 'str'}, - } - - def __init__( - self, - *, - manifest: Optional[str] = None, - **kwargs - ): - """ - :keyword manifest: The XML manifest as a string. - :paramtype manifest: str - """ - super(ServiceTypeManifest, self).__init__(**kwargs) - self.manifest = manifest - - -class ServiceUpdateDescription(msrest.serialization.Model): - """A ServiceUpdateDescription contains all of the information necessary to update a service. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StatefulServiceUpdateDescription, StatelessServiceUpdateDescription. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The service kind.Constant filled by server. Possible values - include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and - QuorumLossWaitDuration (4) are set. - - - * None - Does not indicate any other properties are set. The value is zero. - * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property - (for Stateful services) or the InstanceCount property (for Stateless services) is set. The - value is 1. - * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The - value is 2. - * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is - 4. - * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The - value is 8. - * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. - * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. - * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is - 64. - * Correlation - Indicates the CorrelationScheme property is set. The value is 128. - * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. - * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. - * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. - * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The - value is 2048. - * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. - * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is - 8192. - * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 16384. - * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 32768. - * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value - is 65536. - * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. - * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. - * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. - :vartype flags: str - :ivar placement_constraints: The placement constraints as a string. Placement constraints are - boolean expressions on node properties and allow for restricting a service to particular nodes - based on the service requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :vartype placement_constraints: str - :ivar correlation_scheme: The correlation scheme. - :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :ivar load_metrics: The service load metrics. - :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: The service placement policies. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", - "Medium", "High", "VeryHigh". - :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :ivar scaling_policies: Scaling policies for this service. - :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :ivar service_dns_name: The DNS name of the service. - :vartype service_dns_name: str - :ivar tags_for_placement: Tags for placement of this service. - :vartype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :ivar tags_for_running: Tags for running of this service. - :vartype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - } - - _subtype_map = { - 'service_kind': {'Stateful': 'StatefulServiceUpdateDescription', 'Stateless': 'StatelessServiceUpdateDescription'} - } - - def __init__( - self, - *, - flags: Optional[str] = None, - placement_constraints: Optional[str] = None, - correlation_scheme: Optional[List["ServiceCorrelationDescription"]] = None, - load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, - service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, - default_move_cost: Optional[Union[str, "MoveCost"]] = None, - scaling_policies: Optional[List["ScalingPolicyDescription"]] = None, - service_dns_name: Optional[str] = None, - tags_for_placement: Optional["NodeTagsDescription"] = None, - tags_for_running: Optional["NodeTagsDescription"] = None, - **kwargs - ): - """ - :keyword flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and - QuorumLossWaitDuration (4) are set. - - - * None - Does not indicate any other properties are set. The value is zero. - * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property - (for Stateful services) or the InstanceCount property (for Stateless services) is set. The - value is 1. - * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The - value is 2. - * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is - 4. - * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The - value is 8. - * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. - * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. - * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is - 64. - * Correlation - Indicates the CorrelationScheme property is set. The value is 128. - * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. - * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. - * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. - * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The - value is 2048. - * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. - * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is - 8192. - * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 16384. - * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 32768. - * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value - is 65536. - * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. - * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. - * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. - :paramtype flags: str - :keyword placement_constraints: The placement constraints as a string. Placement constraints - are boolean expressions on node properties and allow for restricting a service to particular - nodes based on the service requirements. For example, to place a service on nodes where - NodeType is blue specify the following: "NodeColor == blue)". - :paramtype placement_constraints: str - :keyword correlation_scheme: The correlation scheme. - :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :keyword load_metrics: The service load metrics. - :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: The service placement policies. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", - "Low", "Medium", "High", "VeryHigh". - :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :keyword scaling_policies: Scaling policies for this service. - :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :keyword service_dns_name: The DNS name of the service. - :paramtype service_dns_name: str - :keyword tags_for_placement: Tags for placement of this service. - :paramtype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :keyword tags_for_running: Tags for running of this service. - :paramtype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - """ - super(ServiceUpdateDescription, self).__init__(**kwargs) - self.service_kind = None # type: Optional[str] - self.flags = flags - self.placement_constraints = placement_constraints - self.correlation_scheme = correlation_scheme - self.load_metrics = load_metrics - self.service_placement_policies = service_placement_policies - self.default_move_cost = default_move_cost - self.scaling_policies = scaling_policies - self.service_dns_name = service_dns_name - self.tags_for_placement = tags_for_placement - self.tags_for_running = tags_for_running - - -class ServiceUpgradeProgress(msrest.serialization.Model): - """Information about how many replicas are completed or pending for a specific service during upgrade. - - :ivar service_name: Name of the Service resource. - :vartype service_name: str - :ivar completed_replica_count: The number of replicas that completes the upgrade in the - service. - :vartype completed_replica_count: str - :ivar pending_replica_count: The number of replicas that are waiting to be upgraded in the - service. - :vartype pending_replica_count: str - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'completed_replica_count': {'key': 'CompletedReplicaCount', 'type': 'str'}, - 'pending_replica_count': {'key': 'PendingReplicaCount', 'type': 'str'}, - } - - def __init__( - self, - *, - service_name: Optional[str] = None, - completed_replica_count: Optional[str] = None, - pending_replica_count: Optional[str] = None, - **kwargs - ): - """ - :keyword service_name: Name of the Service resource. - :paramtype service_name: str - :keyword completed_replica_count: The number of replicas that completes the upgrade in the - service. - :paramtype completed_replica_count: str - :keyword pending_replica_count: The number of replicas that are waiting to be upgraded in the - service. - :paramtype pending_replica_count: str - """ - super(ServiceUpgradeProgress, self).__init__(**kwargs) - self.service_name = service_name - self.completed_replica_count = completed_replica_count - self.pending_replica_count = pending_replica_count - - -class Setting(msrest.serialization.Model): - """Describes a setting for the container. The setting file path can be fetched from environment variable "Fabric_SettingPath". The path for Windows container is "C:\secrets". The path for Linux container is "/var/secrets". - - :ivar type: The type of the setting being given in value. Possible values include: "ClearText", - "KeyVaultReference", "SecretValueReference". Default value: "ClearText". - :vartype type: str or ~azure.servicefabric.models.SettingType - :ivar name: The name of the setting. - :vartype name: str - :ivar value: The value of the setting, will be processed based on the type provided. - :vartype value: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "SettingType"]] = "ClearText", - name: Optional[str] = None, - value: Optional[str] = None, - **kwargs - ): - """ - :keyword type: The type of the setting being given in value. Possible values include: - "ClearText", "KeyVaultReference", "SecretValueReference". Default value: "ClearText". - :paramtype type: str or ~azure.servicefabric.models.SettingType - :keyword name: The name of the setting. - :paramtype name: str - :keyword value: The value of the setting, will be processed based on the type provided. - :paramtype value: str - """ - super(Setting, self).__init__(**kwargs) - self.type = type - self.name = name - self.value = value - - -class SingletonPartitionInformation(PartitionInformation): - """Information about a partition that is singleton. The services with singleton partitioning scheme are effectively non-partitioned. They only have one partition. - - All required parameters must be populated in order to send to Azure. - - :ivar service_partition_kind: Required. The kind of partitioning scheme used to partition the - service.Constant filled by server. Possible values include: "Invalid", "Singleton", - "Int64Range", "Named". - :vartype service_partition_kind: str or ~azure.servicefabric.models.ServicePartitionKind - :ivar id: An internal ID used by Service Fabric to uniquely identify a partition. This is a - randomly generated GUID when the service was created. The partition ID is unique and does not - change for the lifetime of the service. If the same service was deleted and recreated the IDs - of its partitions would be different. - :vartype id: str - """ - - _validation = { - 'service_partition_kind': {'required': True}, - } - - _attribute_map = { - 'service_partition_kind': {'key': 'ServicePartitionKind', 'type': 'str'}, - 'id': {'key': 'Id', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - **kwargs - ): - """ - :keyword id: An internal ID used by Service Fabric to uniquely identify a partition. This is a - randomly generated GUID when the service was created. The partition ID is unique and does not - change for the lifetime of the service. If the same service was deleted and recreated the IDs - of its partitions would be different. - :paramtype id: str - """ - super(SingletonPartitionInformation, self).__init__(id=id, **kwargs) - self.service_partition_kind = 'Singleton' # type: str - - -class SingletonPartitionSchemeDescription(PartitionSchemeDescription): - """Describes the partition scheme of a singleton-partitioned, or non-partitioned service. - - All required parameters must be populated in order to send to Azure. - - :ivar partition_scheme: Required. Specifies how the service is partitioned.Constant filled by - server. Possible values include: "Invalid", "Singleton", "UniformInt64Range", "Named". - :vartype partition_scheme: str or ~azure.servicefabric.models.PartitionScheme - """ - - _validation = { - 'partition_scheme': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(SingletonPartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = 'Singleton' # type: str - - -class StartClusterUpgradeDescription(msrest.serialization.Model): - """Describes the parameters for starting a cluster upgrade. - - :ivar code_version: The cluster code version. - :vartype code_version: str - :ivar config_version: The cluster configuration version. - :vartype config_version: str - :ivar upgrade_kind: The kind of upgrade out of the following possible values. Possible values - include: "Invalid", "Rolling". Default value: "Rolling". - :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :ivar rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :vartype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :ivar upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :vartype upgrade_replica_set_check_timeout_in_seconds: long - :ivar force_restart: If true, then processes are forcefully restarted during upgrade even when - the code version has not changed (the upgrade only changes configuration or data). - :vartype force_restart: bool - :ivar sort_order: Defines the order in which an upgrade proceeds through the cluster. Possible - values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", - "ReverseLexicographical". Default value: "Default". - :vartype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :ivar monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored mode. - :vartype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster - or of a cluster node. - :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :ivar enable_delta_health_evaluation: When true, enables delta health evaluation rather than - absolute health evaluation after completion of each upgrade domain. - :vartype enable_delta_health_evaluation: bool - :ivar cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of the - cluster during a cluster upgrade. - :vartype cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :ivar application_health_policy_map: Defines the application health policy map used to evaluate - the health of an application or one of its children entities. - :vartype application_health_policy_map: ~azure.servicefabric.models.ApplicationHealthPolicies - :ivar instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a stateless - instance is closed, to allow the active requests to drain gracefully. This would be effective - when the instance is closing during the application/cluster - upgrade, only for those instances which have a non-zero delay duration configured in the - service description. See InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates - that the behavior will entirely depend on the delay configured in the stateless service - description. - :vartype instance_close_delay_duration_in_seconds: long - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'}, - 'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'}, - 'force_restart': {'key': 'ForceRestart', 'type': 'bool'}, - 'sort_order': {'key': 'SortOrder', 'type': 'str'}, - 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, - 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, - } - - def __init__( - self, - *, - code_version: Optional[str] = None, - config_version: Optional[str] = None, - upgrade_kind: Optional[Union[str, "UpgradeKind"]] = "Rolling", - rolling_upgrade_mode: Optional[Union[str, "UpgradeMode"]] = "UnmonitoredAuto", - upgrade_replica_set_check_timeout_in_seconds: Optional[int] = 42949672925, - force_restart: Optional[bool] = False, - sort_order: Optional[Union[str, "UpgradeSortOrder"]] = "Default", - monitoring_policy: Optional["MonitoringPolicyDescription"] = None, - cluster_health_policy: Optional["ClusterHealthPolicy"] = None, - enable_delta_health_evaluation: Optional[bool] = None, - cluster_upgrade_health_policy: Optional["ClusterUpgradeHealthPolicyObject"] = None, - application_health_policy_map: Optional["ApplicationHealthPolicies"] = None, - instance_close_delay_duration_in_seconds: Optional[int] = 4294967295, - **kwargs - ): - """ - :keyword code_version: The cluster code version. - :paramtype code_version: str - :keyword config_version: The cluster configuration version. - :paramtype config_version: str - :keyword upgrade_kind: The kind of upgrade out of the following possible values. Possible - values include: "Invalid", "Rolling". Default value: "Rolling". - :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind - :keyword rolling_upgrade_mode: The mode used to monitor health during a rolling upgrade. The - values are UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible - values include: "Invalid", "UnmonitoredAuto", "UnmonitoredManual", "Monitored", - "UnmonitoredDeferred". Default value: "UnmonitoredAuto". - :paramtype rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode - :keyword upgrade_replica_set_check_timeout_in_seconds: The maximum amount of time to block - processing of an upgrade domain and prevent loss of availability when there are unexpected - issues. When this timeout expires, processing of the upgrade domain will proceed regardless of - availability loss issues. The timeout is reset at the start of each upgrade domain. Valid - values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). - :paramtype upgrade_replica_set_check_timeout_in_seconds: long - :keyword force_restart: If true, then processes are forcefully restarted during upgrade even - when the code version has not changed (the upgrade only changes configuration or data). - :paramtype force_restart: bool - :keyword sort_order: Defines the order in which an upgrade proceeds through the cluster. - Possible values include: "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", - "ReverseLexicographical". Default value: "Default". - :paramtype sort_order: str or ~azure.servicefabric.models.UpgradeSortOrder - :keyword monitoring_policy: Describes the parameters for monitoring an upgrade in Monitored - mode. - :paramtype monitoring_policy: ~azure.servicefabric.models.MonitoringPolicyDescription - :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the - cluster or of a cluster node. - :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :keyword enable_delta_health_evaluation: When true, enables delta health evaluation rather than - absolute health evaluation after completion of each upgrade domain. - :paramtype enable_delta_health_evaluation: bool - :keyword cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of - the cluster during a cluster upgrade. - :paramtype cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :keyword application_health_policy_map: Defines the application health policy map used to - evaluate the health of an application or one of its children entities. - :paramtype application_health_policy_map: ~azure.servicefabric.models.ApplicationHealthPolicies - :keyword instance_close_delay_duration_in_seconds: Duration in seconds, to wait before a - stateless instance is closed, to allow the active requests to drain gracefully. This would be - effective when the instance is closing during the application/cluster - upgrade, only for those instances which have a non-zero delay duration configured in the - service description. See InstanceCloseDelayDurationSeconds property in $ref: - "#/definitions/StatelessServiceDescription.yaml" for details. - Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates - that the behavior will entirely depend on the delay configured in the stateless service - description. - :paramtype instance_close_delay_duration_in_seconds: long - """ - super(StartClusterUpgradeDescription, self).__init__(**kwargs) - self.code_version = code_version - self.config_version = config_version - self.upgrade_kind = upgrade_kind - self.rolling_upgrade_mode = rolling_upgrade_mode - self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds - self.force_restart = force_restart - self.sort_order = sort_order - self.monitoring_policy = monitoring_policy - self.cluster_health_policy = cluster_health_policy - self.enable_delta_health_evaluation = enable_delta_health_evaluation - self.cluster_upgrade_health_policy = cluster_upgrade_health_policy - self.application_health_policy_map = application_health_policy_map - self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds - - -class StartedChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos is started. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values - include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", - "Stopped". - :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind - :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :vartype time_stamp_utc: ~datetime.datetime - :ivar chaos_parameters: Defines all the parameters to configure a Chaos run. - :vartype chaos_parameters: ~azure.servicefabric.models.ChaosParameters - """ - - _validation = { - 'kind': {'required': True}, - 'time_stamp_utc': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'chaos_parameters': {'key': 'ChaosParameters', 'type': 'ChaosParameters'}, - } - - def __init__( - self, - *, - time_stamp_utc: datetime.datetime, - chaos_parameters: Optional["ChaosParameters"] = None, - **kwargs - ): - """ - :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :paramtype time_stamp_utc: ~datetime.datetime - :keyword chaos_parameters: Defines all the parameters to configure a Chaos run. - :paramtype chaos_parameters: ~azure.servicefabric.models.ChaosParameters - """ - super(StartedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.kind = 'Started' # type: str - self.chaos_parameters = chaos_parameters - - -class StatefulReplicaHealthReportExpiredEvent(ReplicaEvent): - """Stateful Replica Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :vartype replica_id: long - :ivar replica_instance_id: Required. Id of Replica instance. - :vartype replica_instance_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'replica_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - partition_id: str, - replica_id: int, - replica_instance_id: int, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: long - :keyword replica_instance_id: Required. Id of Replica instance. - :paramtype replica_instance_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(StatefulReplicaHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.kind = 'StatefulReplicaHealthReportExpired' # type: str - self.replica_instance_id = replica_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class StatefulReplicaNewHealthReportEvent(ReplicaEvent): - """Stateful Replica Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :vartype replica_id: long - :ivar replica_instance_id: Required. Id of Replica instance. - :vartype replica_instance_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'replica_instance_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'replica_instance_id': {'key': 'ReplicaInstanceId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - partition_id: str, - replica_id: int, - replica_instance_id: int, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: long - :keyword replica_instance_id: Required. Id of Replica instance. - :paramtype replica_instance_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(StatefulReplicaNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.kind = 'StatefulReplicaNewHealthReport' # type: str - self.replica_instance_id = replica_instance_id - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class StatefulServiceDescription(ServiceDescription): - """Describes a stateful service. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The service kind.Constant filled by server. Possible values - include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar service_name: Required. The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar service_type_name: Required. Name of the service type as specified in the service - manifest. - :vartype service_type_name: str - :ivar initialization_data: The initialization data as an array of bytes. Initialization data is - passed to service instances or replicas when they are created. - :vartype initialization_data: list[int] - :ivar partition_description: Required. The partition description as an object. - :vartype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription - :ivar placement_constraints: The placement constraints as a string. Placement constraints are - boolean expressions on node properties and allow for restricting a service to particular nodes - based on the service requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :vartype placement_constraints: str - :ivar correlation_scheme: The correlation scheme. - :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :ivar service_load_metrics: The service load metrics. - :vartype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: The service placement policies. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", - "Medium", "High", "VeryHigh". - :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :ivar is_default_move_cost_specified: Indicates if the DefaultMoveCost property is specified. - :vartype is_default_move_cost_specified: bool - :ivar service_package_activation_mode: The activation mode of service package to be used for a - service. Possible values include: "SharedProcess", "ExclusiveProcess". - :vartype service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :ivar service_dns_name: The DNS name of the service. It requires the DNS system service to be - enabled in Service Fabric cluster. - :vartype service_dns_name: str - :ivar scaling_policies: Scaling policies for this service. - :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :ivar tags_required_to_place: Tags for placement of this service. - :vartype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription - :ivar tags_required_to_run: Tags for running of this service. - :vartype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription - :ivar target_replica_set_size: Required. The target replica set size as a number. - :vartype target_replica_set_size: int - :ivar min_replica_set_size: Required. The minimum replica set size as a number. - :vartype min_replica_set_size: int - :ivar has_persisted_state: Required. A flag indicating whether this is a persistent service - which stores states on the local disk. If it is then the value of this property is true, if not - it is false. - :vartype has_persisted_state: bool - :ivar flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then the flags for QuorumLossWaitDuration (2) and - StandByReplicaKeepDuration(4) are set. - - - * None - Does not indicate any other properties are set. The value is zero. - * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The - value is 1. - * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is - 2. - * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The - value is 4. - * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The - value is 8. - * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value - is 16. - :vartype flags: int - :ivar replica_restart_wait_duration_seconds: The duration, in seconds, between when a replica - goes down and when a new replica is created. - :vartype replica_restart_wait_duration_seconds: long - :ivar quorum_loss_wait_duration_seconds: The maximum duration, in seconds, for which a - partition is allowed to be in a state of quorum loss. - :vartype quorum_loss_wait_duration_seconds: long - :ivar stand_by_replica_keep_duration_seconds: The definition on how long StandBy replicas - should be maintained before being removed. - :vartype stand_by_replica_keep_duration_seconds: long - :ivar service_placement_time_limit_seconds: The duration for which replicas can stay InBuild - before reporting that build is stuck. - :vartype service_placement_time_limit_seconds: long - :ivar drop_source_replica_on_move: Indicates whether to drop source Secondary replica even if - the target replica has not finished build. If desired behavior is to drop it as soon as - possible the value of this property is true, if not it is false. - :vartype drop_source_replica_on_move: bool - :ivar replica_lifecycle_description: Defines how replicas of this service will behave during - ther lifecycle. - :vartype replica_lifecycle_description: ~azure.servicefabric.models.ReplicaLifecycleDescription - :ivar auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary - replicas, the following must be true: AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :vartype auxiliary_replica_count: int - """ - - _validation = { - 'service_kind': {'required': True}, - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'target_replica_set_size': {'required': True, 'minimum': 1}, - 'min_replica_set_size': {'required': True, 'minimum': 1}, - 'has_persisted_state': {'required': True}, - 'replica_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'quorum_loss_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'stand_by_replica_keep_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'service_placement_time_limit_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'auxiliary_replica_count': {'minimum': 0}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'long'}, - 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'long'}, - 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'long'}, - 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'long'}, - 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, - 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, - } - - def __init__( - self, - *, - service_name: str, - service_type_name: str, - partition_description: "PartitionSchemeDescription", - target_replica_set_size: int, - min_replica_set_size: int, - has_persisted_state: bool, - application_name: Optional[str] = None, - initialization_data: Optional[List[int]] = None, - placement_constraints: Optional[str] = None, - correlation_scheme: Optional[List["ServiceCorrelationDescription"]] = None, - service_load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, - service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, - default_move_cost: Optional[Union[str, "MoveCost"]] = None, - is_default_move_cost_specified: Optional[bool] = None, - service_package_activation_mode: Optional[Union[str, "ServicePackageActivationMode"]] = None, - service_dns_name: Optional[str] = None, - scaling_policies: Optional[List["ScalingPolicyDescription"]] = None, - tags_required_to_place: Optional["NodeTagsDescription"] = None, - tags_required_to_run: Optional["NodeTagsDescription"] = None, - flags: Optional[int] = None, - replica_restart_wait_duration_seconds: Optional[int] = None, - quorum_loss_wait_duration_seconds: Optional[int] = None, - stand_by_replica_keep_duration_seconds: Optional[int] = None, - service_placement_time_limit_seconds: Optional[int] = None, - drop_source_replica_on_move: Optional[bool] = None, - replica_lifecycle_description: Optional["ReplicaLifecycleDescription"] = None, - auxiliary_replica_count: Optional[int] = None, - **kwargs - ): - """ - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword service_name: Required. The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword service_type_name: Required. Name of the service type as specified in the service - manifest. - :paramtype service_type_name: str - :keyword initialization_data: The initialization data as an array of bytes. Initialization data - is passed to service instances or replicas when they are created. - :paramtype initialization_data: list[int] - :keyword partition_description: Required. The partition description as an object. - :paramtype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription - :keyword placement_constraints: The placement constraints as a string. Placement constraints - are boolean expressions on node properties and allow for restricting a service to particular - nodes based on the service requirements. For example, to place a service on nodes where - NodeType is blue specify the following: "NodeColor == blue)". - :paramtype placement_constraints: str - :keyword correlation_scheme: The correlation scheme. - :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :keyword service_load_metrics: The service load metrics. - :paramtype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: The service placement policies. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", - "Low", "Medium", "High", "VeryHigh". - :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :keyword is_default_move_cost_specified: Indicates if the DefaultMoveCost property is - specified. - :paramtype is_default_move_cost_specified: bool - :keyword service_package_activation_mode: The activation mode of service package to be used for - a service. Possible values include: "SharedProcess", "ExclusiveProcess". - :paramtype service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :keyword service_dns_name: The DNS name of the service. It requires the DNS system service to - be enabled in Service Fabric cluster. - :paramtype service_dns_name: str - :keyword scaling_policies: Scaling policies for this service. - :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :keyword tags_required_to_place: Tags for placement of this service. - :paramtype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription - :keyword tags_required_to_run: Tags for running of this service. - :paramtype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription - :keyword target_replica_set_size: Required. The target replica set size as a number. - :paramtype target_replica_set_size: int - :keyword min_replica_set_size: Required. The minimum replica set size as a number. - :paramtype min_replica_set_size: int - :keyword has_persisted_state: Required. A flag indicating whether this is a persistent service - which stores states on the local disk. If it is then the value of this property is true, if not - it is false. - :paramtype has_persisted_state: bool - :keyword flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then the flags for QuorumLossWaitDuration (2) and - StandByReplicaKeepDuration(4) are set. - - - * None - Does not indicate any other properties are set. The value is zero. - * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The - value is 1. - * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is - 2. - * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The - value is 4. - * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The - value is 8. - * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value - is 16. - :paramtype flags: int - :keyword replica_restart_wait_duration_seconds: The duration, in seconds, between when a - replica goes down and when a new replica is created. - :paramtype replica_restart_wait_duration_seconds: long - :keyword quorum_loss_wait_duration_seconds: The maximum duration, in seconds, for which a - partition is allowed to be in a state of quorum loss. - :paramtype quorum_loss_wait_duration_seconds: long - :keyword stand_by_replica_keep_duration_seconds: The definition on how long StandBy replicas - should be maintained before being removed. - :paramtype stand_by_replica_keep_duration_seconds: long - :keyword service_placement_time_limit_seconds: The duration for which replicas can stay InBuild - before reporting that build is stuck. - :paramtype service_placement_time_limit_seconds: long - :keyword drop_source_replica_on_move: Indicates whether to drop source Secondary replica even - if the target replica has not finished build. If desired behavior is to drop it as soon as - possible the value of this property is true, if not it is false. - :paramtype drop_source_replica_on_move: bool - :keyword replica_lifecycle_description: Defines how replicas of this service will behave during - ther lifecycle. - :paramtype replica_lifecycle_description: - ~azure.servicefabric.models.ReplicaLifecycleDescription - :keyword auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary - replicas, the following must be true: AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :paramtype auxiliary_replica_count: int - """ - super(StatefulServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, tags_required_to_place=tags_required_to_place, tags_required_to_run=tags_required_to_run, **kwargs) - self.service_kind = 'Stateful' # type: str - self.target_replica_set_size = target_replica_set_size - self.min_replica_set_size = min_replica_set_size - self.has_persisted_state = has_persisted_state - self.flags = flags - self.replica_restart_wait_duration_seconds = replica_restart_wait_duration_seconds - self.quorum_loss_wait_duration_seconds = quorum_loss_wait_duration_seconds - self.stand_by_replica_keep_duration_seconds = stand_by_replica_keep_duration_seconds - self.service_placement_time_limit_seconds = service_placement_time_limit_seconds - self.drop_source_replica_on_move = drop_source_replica_on_move - self.replica_lifecycle_description = replica_lifecycle_description - self.auxiliary_replica_count = auxiliary_replica_count - - -class StatefulServiceInfo(ServiceInfo): - """Information about a stateful Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The identity of the service. This ID is an encoded representation of the service - name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype id: str - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar name: The full name of the service with 'fabric:' URI scheme. - :vartype name: str - :ivar type_name: Name of the service type as specified in the service manifest. - :vartype type_name: str - :ivar manifest_version: The version of the service manifest. - :vartype manifest_version: str - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_status: The status of the application. Possible values include: "Unknown", - "Active", "Upgrading", "Deleting", "Creating", "Failed". - :vartype service_status: str or ~azure.servicefabric.models.ServiceStatus - :ivar is_service_group: Whether the service is in a service group. - :vartype is_service_group: bool - :ivar has_persisted_state: Whether the service has persisted state. - :vartype has_persisted_state: bool - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - type_name: Optional[str] = None, - manifest_version: Optional[str] = None, - health_state: Optional[Union[str, "HealthState"]] = None, - service_status: Optional[Union[str, "ServiceStatus"]] = None, - is_service_group: Optional[bool] = None, - has_persisted_state: Optional[bool] = None, - **kwargs - ): - """ - :keyword id: The identity of the service. This ID is an encoded representation of the service - name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype id: str - :keyword name: The full name of the service with 'fabric:' URI scheme. - :paramtype name: str - :keyword type_name: Name of the service type as specified in the service manifest. - :paramtype type_name: str - :keyword manifest_version: The version of the service manifest. - :paramtype manifest_version: str - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword service_status: The status of the application. Possible values include: "Unknown", - "Active", "Upgrading", "Deleting", "Creating", "Failed". - :paramtype service_status: str or ~azure.servicefabric.models.ServiceStatus - :keyword is_service_group: Whether the service is in a service group. - :paramtype is_service_group: bool - :keyword has_persisted_state: Whether the service has persisted state. - :paramtype has_persisted_state: bool - """ - super(StatefulServiceInfo, self).__init__(id=id, name=name, type_name=type_name, manifest_version=manifest_version, health_state=health_state, service_status=service_status, is_service_group=is_service_group, **kwargs) - self.service_kind = 'Stateful' # type: str - self.has_persisted_state = has_persisted_state - - -class StatefulServicePartitionInfo(ServicePartitionInfo): - """Information about a partition of a stateful Service Fabric service.. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar partition_status: The status of the service fabric service partition. Possible values - include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". - :vartype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus - :ivar partition_information: Information about the partition identity, partitioning scheme and - keys supported by it. - :vartype partition_information: ~azure.servicefabric.models.PartitionInformation - :ivar target_replica_set_size: The target replica set size as a number. - :vartype target_replica_set_size: long - :ivar min_replica_set_size: The minimum replica set size as a number. - :vartype min_replica_set_size: long - :ivar auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary - replicas the following must be true, AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :vartype auxiliary_replica_count: long - :ivar last_quorum_loss_duration: The duration for which this partition was in quorum loss. If - the partition is currently in quorum loss, it returns the duration since it has been in that - state. This field is using ISO8601 format for specifying the duration. - :vartype last_quorum_loss_duration: ~datetime.timedelta - :ivar primary_epoch: An Epoch is a configuration number for the partition as a whole. When the - configuration of the replica set changes, for example when the Primary replica changes, the - operations that are replicated from the new Primary replica are said to be a new Epoch from the - ones which were sent by the old Primary replica. - :vartype primary_epoch: ~azure.servicefabric.models.Epoch - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'long'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'long'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'long'}, - 'last_quorum_loss_duration': {'key': 'LastQuorumLossDuration', 'type': 'duration'}, - 'primary_epoch': {'key': 'PrimaryEpoch', 'type': 'Epoch'}, - } - - def __init__( - self, - *, - health_state: Optional[Union[str, "HealthState"]] = None, - partition_status: Optional[Union[str, "ServicePartitionStatus"]] = None, - partition_information: Optional["PartitionInformation"] = None, - target_replica_set_size: Optional[int] = None, - min_replica_set_size: Optional[int] = None, - auxiliary_replica_count: Optional[int] = None, - last_quorum_loss_duration: Optional[datetime.timedelta] = None, - primary_epoch: Optional["Epoch"] = None, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword partition_status: The status of the service fabric service partition. Possible values - include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". - :paramtype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus - :keyword partition_information: Information about the partition identity, partitioning scheme - and keys supported by it. - :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation - :keyword target_replica_set_size: The target replica set size as a number. - :paramtype target_replica_set_size: long - :keyword min_replica_set_size: The minimum replica set size as a number. - :paramtype min_replica_set_size: long - :keyword auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary - replicas the following must be true, AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :paramtype auxiliary_replica_count: long - :keyword last_quorum_loss_duration: The duration for which this partition was in quorum loss. - If the partition is currently in quorum loss, it returns the duration since it has been in that - state. This field is using ISO8601 format for specifying the duration. - :paramtype last_quorum_loss_duration: ~datetime.timedelta - :keyword primary_epoch: An Epoch is a configuration number for the partition as a whole. When - the configuration of the replica set changes, for example when the Primary replica changes, the - operations that are replicated from the new Primary replica are said to be a new Epoch from the - ones which were sent by the old Primary replica. - :paramtype primary_epoch: ~azure.servicefabric.models.Epoch - """ - super(StatefulServicePartitionInfo, self).__init__(health_state=health_state, partition_status=partition_status, partition_information=partition_information, **kwargs) - self.service_kind = 'Stateful' # type: str - self.target_replica_set_size = target_replica_set_size - self.min_replica_set_size = min_replica_set_size - self.auxiliary_replica_count = auxiliary_replica_count - self.last_quorum_loss_duration = last_quorum_loss_duration - self.primary_epoch = primary_epoch - - -class StatefulServiceReplicaHealth(ReplicaHealth): - """Represents the health of the stateful service replica. -Contains the replica aggregated health state, the health events and the unhealthy evaluations. - - All required parameters must be populated in order to send to Azure. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar partition_id: Id of the partition to which this replica belongs. - :vartype partition_id: str - :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :vartype replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - health_events: Optional[List["HealthEvent"]] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - health_statistics: Optional["HealthStatistics"] = None, - partition_id: Optional[str] = None, - replica_id: Optional[str] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword partition_id: Id of the partition to which this replica belongs. - :paramtype partition_id: str - :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: str - """ - super(StatefulServiceReplicaHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, partition_id=partition_id, **kwargs) - self.service_kind = 'Stateful' # type: str - self.replica_id = replica_id - - -class StatefulServiceReplicaHealthState(ReplicaHealthState): - """Represents the health state of the stateful service replica, which contains the replica ID and the aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar partition_id: The ID of the partition to which this replica belongs. - :vartype partition_id: str - :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :vartype replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - partition_id: Optional[str] = None, - replica_id: Optional[str] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword partition_id: The ID of the partition to which this replica belongs. - :paramtype partition_id: str - :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: str - """ - super(StatefulServiceReplicaHealthState, self).__init__(aggregated_health_state=aggregated_health_state, partition_id=partition_id, **kwargs) - self.service_kind = 'Stateful' # type: str - self.replica_id = replica_id - - -class StatefulServiceReplicaInfo(ReplicaInfo): - """Represents a stateful service replica. This includes information about the identity, role, status, health, node name, uptime, and other details about the replica. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", - "InBuild", "Standby", "Ready", "Down", "Dropped". - :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar node_name: The name of a Service Fabric node. - :vartype node_name: str - :ivar address: The address the replica is listening on. - :vartype address: str - :ivar last_in_build_duration_in_seconds: The last in build duration of the replica in seconds. - :vartype last_in_build_duration_in_seconds: str - :ivar replica_role: The role of a replica of a stateful service. Possible values include: - "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", - "ActiveAuxiliary", "PrimaryAuxiliary". - :vartype replica_role: str or ~azure.servicefabric.models.ReplicaRole - :ivar replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :vartype replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'replica_role': {'key': 'ReplicaRole', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__( - self, - *, - replica_status: Optional[Union[str, "ReplicaStatus"]] = None, - health_state: Optional[Union[str, "HealthState"]] = None, - node_name: Optional[str] = None, - address: Optional[str] = None, - last_in_build_duration_in_seconds: Optional[str] = None, - replica_role: Optional[Union[str, "ReplicaRole"]] = None, - replica_id: Optional[str] = None, - **kwargs - ): - """ - :keyword replica_status: The status of a replica of a service. Possible values include: - "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". - :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword node_name: The name of a Service Fabric node. - :paramtype node_name: str - :keyword address: The address the replica is listening on. - :paramtype address: str - :keyword last_in_build_duration_in_seconds: The last in build duration of the replica in - seconds. - :paramtype last_in_build_duration_in_seconds: str - :keyword replica_role: The role of a replica of a stateful service. Possible values include: - "Unknown", "None", "Primary", "IdleSecondary", "ActiveSecondary", "IdleAuxiliary", - "ActiveAuxiliary", "PrimaryAuxiliary". - :paramtype replica_role: str or ~azure.servicefabric.models.ReplicaRole - :keyword replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to - uniquely identify a replica of a partition. It is unique within a partition and does not change - for the lifetime of the replica. If a replica gets dropped and another replica gets created on - the same node for the same partition, it will get a different value for the id. Sometimes the - id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: str - """ - super(StatefulServiceReplicaInfo, self).__init__(replica_status=replica_status, health_state=health_state, node_name=node_name, address=address, last_in_build_duration_in_seconds=last_in_build_duration_in_seconds, **kwargs) - self.service_kind = 'Stateful' # type: str - self.replica_role = replica_role - self.replica_id = replica_id - - -class StatefulServiceTypeDescription(ServiceTypeDescription): - """Describes a stateful service type defined in the service manifest of a provisioned application type. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of service (Stateless or Stateful).Constant filled by server. - Possible values include: "Invalid", "Stateless", "Stateful". - :vartype kind: str or ~azure.servicefabric.models.ServiceKind - :ivar is_stateful: Indicates whether the service type is a stateful service type or a stateless - service type. This property is true if the service type is a stateful service type, false - otherwise. - :vartype is_stateful: bool - :ivar service_type_name: Name of the service type as specified in the service manifest. - :vartype service_type_name: str - :ivar placement_constraints: The placement constraint to be used when instantiating this - service in a Service Fabric cluster. - :vartype placement_constraints: str - :ivar load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: List of service placement policy descriptions. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar extensions: List of service type extensions. - :vartype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :ivar has_persisted_state: A flag indicating whether this is a persistent service which stores - states on the local disk. If it is then the value of this property is true, if not it is false. - :vartype has_persisted_state: bool - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'has_persisted_state': {'key': 'HasPersistedState', 'type': 'bool'}, - } - - def __init__( - self, - *, - is_stateful: Optional[bool] = None, - service_type_name: Optional[str] = None, - placement_constraints: Optional[str] = None, - load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, - service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, - extensions: Optional[List["ServiceTypeExtensionDescription"]] = None, - has_persisted_state: Optional[bool] = None, - **kwargs - ): - """ - :keyword is_stateful: Indicates whether the service type is a stateful service type or a - stateless service type. This property is true if the service type is a stateful service type, - false otherwise. - :paramtype is_stateful: bool - :keyword service_type_name: Name of the service type as specified in the service manifest. - :paramtype service_type_name: str - :keyword placement_constraints: The placement constraint to be used when instantiating this - service in a Service Fabric cluster. - :paramtype placement_constraints: str - :keyword load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: List of service placement policy descriptions. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword extensions: List of service type extensions. - :paramtype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :keyword has_persisted_state: A flag indicating whether this is a persistent service which - stores states on the local disk. If it is then the value of this property is true, if not it is - false. - :paramtype has_persisted_state: bool - """ - super(StatefulServiceTypeDescription, self).__init__(is_stateful=is_stateful, service_type_name=service_type_name, placement_constraints=placement_constraints, load_metrics=load_metrics, service_placement_policies=service_placement_policies, extensions=extensions, **kwargs) - self.kind = 'Stateful' # type: str - self.has_persisted_state = has_persisted_state - - -class StatefulServiceUpdateDescription(ServiceUpdateDescription): - """Describes an update for a stateful service. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The service kind.Constant filled by server. Possible values - include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and - QuorumLossWaitDuration (4) are set. - - - * None - Does not indicate any other properties are set. The value is zero. - * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property - (for Stateful services) or the InstanceCount property (for Stateless services) is set. The - value is 1. - * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The - value is 2. - * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is - 4. - * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The - value is 8. - * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. - * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. - * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is - 64. - * Correlation - Indicates the CorrelationScheme property is set. The value is 128. - * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. - * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. - * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. - * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The - value is 2048. - * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. - * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is - 8192. - * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 16384. - * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 32768. - * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value - is 65536. - * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. - * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. - * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. - :vartype flags: str - :ivar placement_constraints: The placement constraints as a string. Placement constraints are - boolean expressions on node properties and allow for restricting a service to particular nodes - based on the service requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :vartype placement_constraints: str - :ivar correlation_scheme: The correlation scheme. - :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :ivar load_metrics: The service load metrics. - :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: The service placement policies. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", - "Medium", "High", "VeryHigh". - :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :ivar scaling_policies: Scaling policies for this service. - :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :ivar service_dns_name: The DNS name of the service. - :vartype service_dns_name: str - :ivar tags_for_placement: Tags for placement of this service. - :vartype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :ivar tags_for_running: Tags for running of this service. - :vartype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :ivar target_replica_set_size: The target replica set size as a number. - :vartype target_replica_set_size: int - :ivar min_replica_set_size: The minimum replica set size as a number. - :vartype min_replica_set_size: int - :ivar replica_restart_wait_duration_seconds: The duration, in seconds, between when a replica - goes down and when a new replica is created. - :vartype replica_restart_wait_duration_seconds: str - :ivar quorum_loss_wait_duration_seconds: The maximum duration, in seconds, for which a - partition is allowed to be in a state of quorum loss. - :vartype quorum_loss_wait_duration_seconds: str - :ivar stand_by_replica_keep_duration_seconds: The definition on how long StandBy replicas - should be maintained before being removed. - :vartype stand_by_replica_keep_duration_seconds: str - :ivar service_placement_time_limit_seconds: The duration for which replicas can stay InBuild - before reporting that build is stuck. - :vartype service_placement_time_limit_seconds: str - :ivar drop_source_replica_on_move: Indicates whether to drop source Secondary replica even if - the target replica has not finished build. If desired behavior is to drop it as soon as - possible the value of this property is true, if not it is false. - :vartype drop_source_replica_on_move: bool - :ivar replica_lifecycle_description: Defines how replicas of this service will behave during - ther lifecycle. - :vartype replica_lifecycle_description: ~azure.servicefabric.models.ReplicaLifecycleDescription - :ivar auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary - replicas, the following must be true: AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :vartype auxiliary_replica_count: int - """ - - _validation = { - 'service_kind': {'required': True}, - 'target_replica_set_size': {'minimum': 1}, - 'min_replica_set_size': {'minimum': 1}, - 'auxiliary_replica_count': {'minimum': 0}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, - 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, - 'replica_restart_wait_duration_seconds': {'key': 'ReplicaRestartWaitDurationSeconds', 'type': 'str'}, - 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'str'}, - 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'str'}, - 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'str'}, - 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, - 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, - 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, - } - - def __init__( - self, - *, - flags: Optional[str] = None, - placement_constraints: Optional[str] = None, - correlation_scheme: Optional[List["ServiceCorrelationDescription"]] = None, - load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, - service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, - default_move_cost: Optional[Union[str, "MoveCost"]] = None, - scaling_policies: Optional[List["ScalingPolicyDescription"]] = None, - service_dns_name: Optional[str] = None, - tags_for_placement: Optional["NodeTagsDescription"] = None, - tags_for_running: Optional["NodeTagsDescription"] = None, - target_replica_set_size: Optional[int] = None, - min_replica_set_size: Optional[int] = None, - replica_restart_wait_duration_seconds: Optional[str] = None, - quorum_loss_wait_duration_seconds: Optional[str] = None, - stand_by_replica_keep_duration_seconds: Optional[str] = None, - service_placement_time_limit_seconds: Optional[str] = None, - drop_source_replica_on_move: Optional[bool] = None, - replica_lifecycle_description: Optional["ReplicaLifecycleDescription"] = None, - auxiliary_replica_count: Optional[int] = None, - **kwargs - ): - """ - :keyword flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and - QuorumLossWaitDuration (4) are set. - - - * None - Does not indicate any other properties are set. The value is zero. - * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property - (for Stateful services) or the InstanceCount property (for Stateless services) is set. The - value is 1. - * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The - value is 2. - * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is - 4. - * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The - value is 8. - * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. - * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. - * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is - 64. - * Correlation - Indicates the CorrelationScheme property is set. The value is 128. - * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. - * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. - * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. - * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The - value is 2048. - * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. - * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is - 8192. - * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 16384. - * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 32768. - * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value - is 65536. - * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. - * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. - * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. - :paramtype flags: str - :keyword placement_constraints: The placement constraints as a string. Placement constraints - are boolean expressions on node properties and allow for restricting a service to particular - nodes based on the service requirements. For example, to place a service on nodes where - NodeType is blue specify the following: "NodeColor == blue)". - :paramtype placement_constraints: str - :keyword correlation_scheme: The correlation scheme. - :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :keyword load_metrics: The service load metrics. - :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: The service placement policies. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", - "Low", "Medium", "High", "VeryHigh". - :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :keyword scaling_policies: Scaling policies for this service. - :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :keyword service_dns_name: The DNS name of the service. - :paramtype service_dns_name: str - :keyword tags_for_placement: Tags for placement of this service. - :paramtype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :keyword tags_for_running: Tags for running of this service. - :paramtype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :keyword target_replica_set_size: The target replica set size as a number. - :paramtype target_replica_set_size: int - :keyword min_replica_set_size: The minimum replica set size as a number. - :paramtype min_replica_set_size: int - :keyword replica_restart_wait_duration_seconds: The duration, in seconds, between when a - replica goes down and when a new replica is created. - :paramtype replica_restart_wait_duration_seconds: str - :keyword quorum_loss_wait_duration_seconds: The maximum duration, in seconds, for which a - partition is allowed to be in a state of quorum loss. - :paramtype quorum_loss_wait_duration_seconds: str - :keyword stand_by_replica_keep_duration_seconds: The definition on how long StandBy replicas - should be maintained before being removed. - :paramtype stand_by_replica_keep_duration_seconds: str - :keyword service_placement_time_limit_seconds: The duration for which replicas can stay InBuild - before reporting that build is stuck. - :paramtype service_placement_time_limit_seconds: str - :keyword drop_source_replica_on_move: Indicates whether to drop source Secondary replica even - if the target replica has not finished build. If desired behavior is to drop it as soon as - possible the value of this property is true, if not it is false. - :paramtype drop_source_replica_on_move: bool - :keyword replica_lifecycle_description: Defines how replicas of this service will behave during - ther lifecycle. - :paramtype replica_lifecycle_description: - ~azure.servicefabric.models.ReplicaLifecycleDescription - :keyword auxiliary_replica_count: The auxiliary replica count as a number. To use Auxiliary - replicas, the following must be true: AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and - TargetReplicaSetSize >=3. - :paramtype auxiliary_replica_count: int - """ - super(StatefulServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_dns_name=service_dns_name, tags_for_placement=tags_for_placement, tags_for_running=tags_for_running, **kwargs) - self.service_kind = 'Stateful' # type: str - self.target_replica_set_size = target_replica_set_size - self.min_replica_set_size = min_replica_set_size - self.replica_restart_wait_duration_seconds = replica_restart_wait_duration_seconds - self.quorum_loss_wait_duration_seconds = quorum_loss_wait_duration_seconds - self.stand_by_replica_keep_duration_seconds = stand_by_replica_keep_duration_seconds - self.service_placement_time_limit_seconds = service_placement_time_limit_seconds - self.drop_source_replica_on_move = drop_source_replica_on_move - self.replica_lifecycle_description = replica_lifecycle_description - self.auxiliary_replica_count = auxiliary_replica_count - - -class StatelessReplicaHealthReportExpiredEvent(ReplicaEvent): - """Stateless Replica Health Report Expired event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :vartype replica_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - partition_id: str, - replica_id: int, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(StatelessReplicaHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.kind = 'StatelessReplicaHealthReportExpired' # type: str - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class StatelessReplicaNewHealthReportEvent(ReplicaEvent): - """Stateless Replica Health Report Created event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of FabricEvent.Constant filled by server. Possible values - include: "ClusterEvent", "ContainerInstanceEvent", "NodeEvent", "ApplicationEvent", - "ServiceEvent", "PartitionEvent", "ReplicaEvent", "PartitionAnalysisEvent", - "ApplicationCreated", "ApplicationDeleted", "ApplicationNewHealthReport", - "ApplicationHealthReportExpired", "ApplicationUpgradeCompleted", - "ApplicationUpgradeDomainCompleted", "ApplicationUpgradeRollbackCompleted", - "ApplicationUpgradeRollbackStarted", "ApplicationUpgradeStarted", - "DeployedApplicationNewHealthReport", "DeployedApplicationHealthReportExpired", - "ApplicationProcessExited", "ApplicationContainerInstanceExited", "NodeAborted", - "NodeAddedToCluster", "NodeClosed", "NodeDeactivateCompleted", "NodeDeactivateStarted", - "NodeDown", "NodeNewHealthReport", "NodeHealthReportExpired", "NodeOpenSucceeded", - "NodeOpenFailed", "NodeRemovedFromCluster", "NodeUp", "PartitionNewHealthReport", - "PartitionHealthReportExpired", "PartitionReconfigured", "PartitionPrimaryMoveAnalysis", - "ServiceCreated", "ServiceDeleted", "ServiceNewHealthReport", "ServiceHealthReportExpired", - "DeployedServicePackageNewHealthReport", "DeployedServicePackageHealthReportExpired", - "StatefulReplicaNewHealthReport", "StatefulReplicaHealthReportExpired", - "StatelessReplicaNewHealthReport", "StatelessReplicaHealthReportExpired", - "ClusterNewHealthReport", "ClusterHealthReportExpired", "ClusterUpgradeCompleted", - "ClusterUpgradeDomainCompleted", "ClusterUpgradeRollbackCompleted", - "ClusterUpgradeRollbackStarted", "ClusterUpgradeStarted", "ChaosStopped", "ChaosStarted", - "ChaosCodePackageRestartScheduled", "ChaosReplicaRemovalScheduled", - "ChaosPartitionSecondaryMoveScheduled", "ChaosPartitionPrimaryMoveScheduled", - "ChaosReplicaRestartScheduled", "ChaosNodeRestartScheduled". - :vartype kind: str or ~azure.servicefabric.models.FabricEventKind - :ivar event_instance_id: Required. The identifier for the FabricEvent instance. - :vartype event_instance_id: str - :ivar category: The category of event. - :vartype category: str - :ivar time_stamp: Required. The time event was logged. - :vartype time_stamp: ~datetime.datetime - :ivar has_correlated_events: Shows there is existing related events available. - :vartype has_correlated_events: bool - :ivar partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :vartype partition_id: str - :ivar replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :vartype replica_id: long - :ivar source_id: Required. Id of report source. - :vartype source_id: str - :ivar property: Required. Describes the property. - :vartype property: str - :ivar health_state: Required. Describes the property health state. - :vartype health_state: str - :ivar time_to_live_ms: Required. Time to live in milli-seconds. - :vartype time_to_live_ms: long - :ivar sequence_number: Required. Sequence number of report. - :vartype sequence_number: long - :ivar description: Required. Description of report. - :vartype description: str - :ivar remove_when_expired: Required. Indicates the removal when it expires. - :vartype remove_when_expired: bool - :ivar source_utc_timestamp: Required. Source time. - :vartype source_utc_timestamp: ~datetime.datetime - """ - - _validation = { - 'kind': {'required': True}, - 'event_instance_id': {'required': True}, - 'time_stamp': {'required': True}, - 'partition_id': {'required': True}, - 'replica_id': {'required': True}, - 'source_id': {'required': True}, - 'property': {'required': True}, - 'health_state': {'required': True}, - 'time_to_live_ms': {'required': True}, - 'sequence_number': {'required': True}, - 'description': {'required': True}, - 'remove_when_expired': {'required': True}, - 'source_utc_timestamp': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'}, - 'category': {'key': 'Category', 'type': 'str'}, - 'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'}, - 'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'long'}, - 'source_id': {'key': 'SourceId', 'type': 'str'}, - 'property': {'key': 'Property', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'}, - 'sequence_number': {'key': 'SequenceNumber', 'type': 'long'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'}, - 'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - event_instance_id: str, - time_stamp: datetime.datetime, - partition_id: str, - replica_id: int, - source_id: str, - property: str, - health_state: str, - time_to_live_ms: int, - sequence_number: int, - description: str, - remove_when_expired: bool, - source_utc_timestamp: datetime.datetime, - category: Optional[str] = None, - has_correlated_events: Optional[bool] = None, - **kwargs - ): - """ - :keyword event_instance_id: Required. The identifier for the FabricEvent instance. - :paramtype event_instance_id: str - :keyword category: The category of event. - :paramtype category: str - :keyword time_stamp: Required. The time event was logged. - :paramtype time_stamp: ~datetime.datetime - :keyword has_correlated_events: Shows there is existing related events available. - :paramtype has_correlated_events: bool - :keyword partition_id: Required. An internal ID used by Service Fabric to uniquely identify a - partition. This is a randomly generated GUID when the service was created. The partition ID is - unique and does not change for the lifetime of the service. If the same service was deleted and - recreated the IDs of its partitions would be different. - :paramtype partition_id: str - :keyword replica_id: Required. Id of a stateful service replica. ReplicaId is used by Service - Fabric to uniquely identify a replica of a partition. It is unique within a partition and does - not change for the lifetime of the replica. If a replica gets dropped and another replica gets - created on the same node for the same partition, it will get a different value for the id. - Sometimes the id of a stateless service instance is also referred as a replica id. - :paramtype replica_id: long - :keyword source_id: Required. Id of report source. - :paramtype source_id: str - :keyword property: Required. Describes the property. - :paramtype property: str - :keyword health_state: Required. Describes the property health state. - :paramtype health_state: str - :keyword time_to_live_ms: Required. Time to live in milli-seconds. - :paramtype time_to_live_ms: long - :keyword sequence_number: Required. Sequence number of report. - :paramtype sequence_number: long - :keyword description: Required. Description of report. - :paramtype description: str - :keyword remove_when_expired: Required. Indicates the removal when it expires. - :paramtype remove_when_expired: bool - :keyword source_utc_timestamp: Required. Source time. - :paramtype source_utc_timestamp: ~datetime.datetime - """ - super(StatelessReplicaNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, partition_id=partition_id, replica_id=replica_id, **kwargs) - self.kind = 'StatelessReplicaNewHealthReport' # type: str - self.source_id = source_id - self.property = property - self.health_state = health_state - self.time_to_live_ms = time_to_live_ms - self.sequence_number = sequence_number - self.description = description - self.remove_when_expired = remove_when_expired - self.source_utc_timestamp = source_utc_timestamp - - -class StatelessServiceDescription(ServiceDescription): - """Describes a stateless service. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The service kind.Constant filled by server. Possible values - include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar application_name: The name of the application, including the 'fabric:' URI scheme. - :vartype application_name: str - :ivar service_name: Required. The full name of the service with 'fabric:' URI scheme. - :vartype service_name: str - :ivar service_type_name: Required. Name of the service type as specified in the service - manifest. - :vartype service_type_name: str - :ivar initialization_data: The initialization data as an array of bytes. Initialization data is - passed to service instances or replicas when they are created. - :vartype initialization_data: list[int] - :ivar partition_description: Required. The partition description as an object. - :vartype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription - :ivar placement_constraints: The placement constraints as a string. Placement constraints are - boolean expressions on node properties and allow for restricting a service to particular nodes - based on the service requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :vartype placement_constraints: str - :ivar correlation_scheme: The correlation scheme. - :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :ivar service_load_metrics: The service load metrics. - :vartype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: The service placement policies. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", - "Medium", "High", "VeryHigh". - :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :ivar is_default_move_cost_specified: Indicates if the DefaultMoveCost property is specified. - :vartype is_default_move_cost_specified: bool - :ivar service_package_activation_mode: The activation mode of service package to be used for a - service. Possible values include: "SharedProcess", "ExclusiveProcess". - :vartype service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :ivar service_dns_name: The DNS name of the service. It requires the DNS system service to be - enabled in Service Fabric cluster. - :vartype service_dns_name: str - :ivar scaling_policies: Scaling policies for this service. - :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :ivar tags_required_to_place: Tags for placement of this service. - :vartype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription - :ivar tags_required_to_run: Tags for running of this service. - :vartype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription - :ivar instance_count: Required. The instance count. - :vartype instance_count: int - :ivar min_instance_count: MinInstanceCount is the minimum number of instances that must be up - to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted - into the number of nodes on which the instances are allowed to be placed according to the - placement constraints on the service. - :vartype min_instance_count: int - :ivar min_instance_percentage: MinInstancePercentage is the minimum percentage of InstanceCount - that must be up to meet the EnsureAvailability safety check during operations like upgrade or - deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first - converted into the number of nodes on which the instances are allowed to be placed according to - the placement constraints on the service. - :vartype min_instance_percentage: int - :ivar flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 1 then the flags for InstanceCloseDelayDuration is set. - - - * None - Does not indicate any other properties are set. The value is zero. - * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 1. - * InstanceRestartWaitDuration - Indicates the InstanceRestartWaitDurationSeconds property is - set. The value is 2. - :vartype flags: int - :ivar instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless - instance is closed, to allow the active requests to drain gracefully. This would be effective - when the instance is closing during the application/cluster upgrade and disabling node. - The endpoint exposed on this instance is removed prior to starting the delay, which prevents - new connections to this instance. - In addition, clients that have subscribed to service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do - the following upon receiving the endpoint removal notification: - - .. code-block:: - - - Stop sending new requests to this instance. - - Close existing connections after in-flight requests have completed. - - Connect to a different instance of the service partition for future requests. - - Note, the default value of InstanceCloseDelayDuration is 0, which indicates that there won't - be any delay or removal of the endpoint prior to closing the instance. - :vartype instance_close_delay_duration_seconds: long - :ivar instance_lifecycle_description: Defines how instances of this service will behave during - their lifecycle. - :vartype instance_lifecycle_description: - ~azure.servicefabric.models.InstanceLifecycleDescription - :ivar instance_restart_wait_duration_seconds: When a stateless instance goes down, this timer - starts. When it expires Service Fabric will create a new instance on any node in the cluster. - This configuration is to reduce unnecessary creation of a new instance in situations where the - instance going down is likely to recover in a short time. For example, during an upgrade. - The default value is 0, which indicates that when stateless instance goes down, Service Fabric - will immediately start building its replacement. - :vartype instance_restart_wait_duration_seconds: long - """ - - _validation = { - 'service_kind': {'required': True}, - 'service_name': {'required': True}, - 'service_type_name': {'required': True}, - 'partition_description': {'required': True}, - 'instance_count': {'required': True, 'minimum': -1}, - 'min_instance_count': {'minimum': 1}, - 'min_instance_percentage': {'maximum': 100, 'minimum': 0}, - 'instance_close_delay_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - 'instance_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'application_name': {'key': 'ApplicationName', 'type': 'str'}, - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'initialization_data': {'key': 'InitializationData', 'type': '[int]'}, - 'partition_description': {'key': 'PartitionDescription', 'type': 'PartitionSchemeDescription'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'service_load_metrics': {'key': 'ServiceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'is_default_move_cost_specified': {'key': 'IsDefaultMoveCostSpecified', 'type': 'bool'}, - 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, - 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - 'flags': {'key': 'Flags', 'type': 'int'}, - 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'long'}, - 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, - 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'long'}, - } - - def __init__( - self, - *, - service_name: str, - service_type_name: str, - partition_description: "PartitionSchemeDescription", - instance_count: int, - application_name: Optional[str] = None, - initialization_data: Optional[List[int]] = None, - placement_constraints: Optional[str] = None, - correlation_scheme: Optional[List["ServiceCorrelationDescription"]] = None, - service_load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, - service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, - default_move_cost: Optional[Union[str, "MoveCost"]] = None, - is_default_move_cost_specified: Optional[bool] = None, - service_package_activation_mode: Optional[Union[str, "ServicePackageActivationMode"]] = None, - service_dns_name: Optional[str] = None, - scaling_policies: Optional[List["ScalingPolicyDescription"]] = None, - tags_required_to_place: Optional["NodeTagsDescription"] = None, - tags_required_to_run: Optional["NodeTagsDescription"] = None, - min_instance_count: Optional[int] = 1, - min_instance_percentage: Optional[int] = 0, - flags: Optional[int] = None, - instance_close_delay_duration_seconds: Optional[int] = None, - instance_lifecycle_description: Optional["InstanceLifecycleDescription"] = None, - instance_restart_wait_duration_seconds: Optional[int] = None, - **kwargs - ): - """ - :keyword application_name: The name of the application, including the 'fabric:' URI scheme. - :paramtype application_name: str - :keyword service_name: Required. The full name of the service with 'fabric:' URI scheme. - :paramtype service_name: str - :keyword service_type_name: Required. Name of the service type as specified in the service - manifest. - :paramtype service_type_name: str - :keyword initialization_data: The initialization data as an array of bytes. Initialization data - is passed to service instances or replicas when they are created. - :paramtype initialization_data: list[int] - :keyword partition_description: Required. The partition description as an object. - :paramtype partition_description: ~azure.servicefabric.models.PartitionSchemeDescription - :keyword placement_constraints: The placement constraints as a string. Placement constraints - are boolean expressions on node properties and allow for restricting a service to particular - nodes based on the service requirements. For example, to place a service on nodes where - NodeType is blue specify the following: "NodeColor == blue)". - :paramtype placement_constraints: str - :keyword correlation_scheme: The correlation scheme. - :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :keyword service_load_metrics: The service load metrics. - :paramtype service_load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: The service placement policies. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", - "Low", "Medium", "High", "VeryHigh". - :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :keyword is_default_move_cost_specified: Indicates if the DefaultMoveCost property is - specified. - :paramtype is_default_move_cost_specified: bool - :keyword service_package_activation_mode: The activation mode of service package to be used for - a service. Possible values include: "SharedProcess", "ExclusiveProcess". - :paramtype service_package_activation_mode: str or - ~azure.servicefabric.models.ServicePackageActivationMode - :keyword service_dns_name: The DNS name of the service. It requires the DNS system service to - be enabled in Service Fabric cluster. - :paramtype service_dns_name: str - :keyword scaling_policies: Scaling policies for this service. - :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :keyword tags_required_to_place: Tags for placement of this service. - :paramtype tags_required_to_place: ~azure.servicefabric.models.NodeTagsDescription - :keyword tags_required_to_run: Tags for running of this service. - :paramtype tags_required_to_run: ~azure.servicefabric.models.NodeTagsDescription - :keyword instance_count: Required. The instance count. - :paramtype instance_count: int - :keyword min_instance_count: MinInstanceCount is the minimum number of instances that must be - up to meet the EnsureAvailability safety check during operations like upgrade or deactivate - node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted - into the number of nodes on which the instances are allowed to be placed according to the - placement constraints on the service. - :paramtype min_instance_count: int - :keyword min_instance_percentage: MinInstancePercentage is the minimum percentage of - InstanceCount that must be up to meet the EnsureAvailability safety check during operations - like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first - converted into the number of nodes on which the instances are allowed to be placed according to - the placement constraints on the service. - :paramtype min_instance_percentage: int - :keyword flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 1 then the flags for InstanceCloseDelayDuration is set. - - - * None - Does not indicate any other properties are set. The value is zero. - * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 1. - * InstanceRestartWaitDuration - Indicates the InstanceRestartWaitDurationSeconds property is - set. The value is 2. - :paramtype flags: int - :keyword instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless - instance is closed, to allow the active requests to drain gracefully. This would be effective - when the instance is closing during the application/cluster upgrade and disabling node. - The endpoint exposed on this instance is removed prior to starting the delay, which prevents - new connections to this instance. - In addition, clients that have subscribed to service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do - the following upon receiving the endpoint removal notification: - - .. code-block:: - - - Stop sending new requests to this instance. - - Close existing connections after in-flight requests have completed. - - Connect to a different instance of the service partition for future requests. - - Note, the default value of InstanceCloseDelayDuration is 0, which indicates that there won't - be any delay or removal of the endpoint prior to closing the instance. - :paramtype instance_close_delay_duration_seconds: long - :keyword instance_lifecycle_description: Defines how instances of this service will behave - during their lifecycle. - :paramtype instance_lifecycle_description: - ~azure.servicefabric.models.InstanceLifecycleDescription - :keyword instance_restart_wait_duration_seconds: When a stateless instance goes down, this - timer starts. When it expires Service Fabric will create a new instance on any node in the - cluster. - This configuration is to reduce unnecessary creation of a new instance in situations where the - instance going down is likely to recover in a short time. For example, during an upgrade. - The default value is 0, which indicates that when stateless instance goes down, Service Fabric - will immediately start building its replacement. - :paramtype instance_restart_wait_duration_seconds: long - """ - super(StatelessServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, tags_required_to_place=tags_required_to_place, tags_required_to_run=tags_required_to_run, **kwargs) - self.service_kind = 'Stateless' # type: str - self.instance_count = instance_count - self.min_instance_count = min_instance_count - self.min_instance_percentage = min_instance_percentage - self.flags = flags - self.instance_close_delay_duration_seconds = instance_close_delay_duration_seconds - self.instance_lifecycle_description = instance_lifecycle_description - self.instance_restart_wait_duration_seconds = instance_restart_wait_duration_seconds - - -class StatelessServiceInfo(ServiceInfo): - """Information about a stateless Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The identity of the service. This ID is an encoded representation of the service - name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :vartype id: str - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar name: The full name of the service with 'fabric:' URI scheme. - :vartype name: str - :ivar type_name: Name of the service type as specified in the service manifest. - :vartype type_name: str - :ivar manifest_version: The version of the service manifest. - :vartype manifest_version: str - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_status: The status of the application. Possible values include: "Unknown", - "Active", "Upgrading", "Deleting", "Creating", "Failed". - :vartype service_status: str or ~azure.servicefabric.models.ServiceStatus - :ivar is_service_group: Whether the service is in a service group. - :vartype is_service_group: bool - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'Id', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'name': {'key': 'Name', 'type': 'str'}, - 'type_name': {'key': 'TypeName', 'type': 'str'}, - 'manifest_version': {'key': 'ManifestVersion', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'service_status': {'key': 'ServiceStatus', 'type': 'str'}, - 'is_service_group': {'key': 'IsServiceGroup', 'type': 'bool'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - type_name: Optional[str] = None, - manifest_version: Optional[str] = None, - health_state: Optional[Union[str, "HealthState"]] = None, - service_status: Optional[Union[str, "ServiceStatus"]] = None, - is_service_group: Optional[bool] = None, - **kwargs - ): - """ - :keyword id: The identity of the service. This ID is an encoded representation of the service - name. This is used in the REST APIs to identify the service resource. - Starting in version 6.0, hierarchical names are delimited with the "~" character. For example, - if the service name is "fabric:/myapp/app1/svc1", - the service identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous - versions. - :paramtype id: str - :keyword name: The full name of the service with 'fabric:' URI scheme. - :paramtype name: str - :keyword type_name: Name of the service type as specified in the service manifest. - :paramtype type_name: str - :keyword manifest_version: The version of the service manifest. - :paramtype manifest_version: str - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword service_status: The status of the application. Possible values include: "Unknown", - "Active", "Upgrading", "Deleting", "Creating", "Failed". - :paramtype service_status: str or ~azure.servicefabric.models.ServiceStatus - :keyword is_service_group: Whether the service is in a service group. - :paramtype is_service_group: bool - """ - super(StatelessServiceInfo, self).__init__(id=id, name=name, type_name=type_name, manifest_version=manifest_version, health_state=health_state, service_status=service_status, is_service_group=is_service_group, **kwargs) - self.service_kind = 'Stateless' # type: str - - -class StatelessServiceInstanceHealth(ReplicaHealth): - """Represents the health of the stateless service instance. -Contains the instance aggregated health state, the health events and the unhealthy evaluations. - - All required parameters must be populated in order to send to Azure. - - :ivar aggregated_health_state: The HealthState representing the aggregated health state of the - entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar health_events: The list of health events reported on the entity. - :vartype health_events: list[~azure.servicefabric.models.HealthEvent] - :ivar unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :ivar health_statistics: Shows the health statistics for all children types of the queried - entity. - :vartype health_statistics: ~azure.servicefabric.models.HealthStatistics - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar partition_id: Id of the partition to which this replica belongs. - :vartype partition_id: str - :ivar instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric to - uniquely identify an instance of a partition of a stateless service. It is unique within a - partition and does not change for the lifetime of the instance. If the instance has failed over - on the same or different node, it will get a different value for the InstanceId. - :vartype instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - 'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - health_events: Optional[List["HealthEvent"]] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - health_statistics: Optional["HealthStatistics"] = None, - partition_id: Optional[str] = None, - instance_id: Optional[str] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The HealthState representing the aggregated health state of - the entity computed by Health Manager. - The health evaluation of the entity reflects all events reported on the entity and its - children (if any). - The aggregation is done by applying the desired health policy. Possible values include: - "Invalid", "Ok", "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword health_events: The list of health events reported on the entity. - :paramtype health_events: list[~azure.servicefabric.models.HealthEvent] - :keyword unhealthy_evaluations: The unhealthy evaluations that show why the current aggregated - health state was returned by Health Manager. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - :keyword health_statistics: Shows the health statistics for all children types of the queried - entity. - :paramtype health_statistics: ~azure.servicefabric.models.HealthStatistics - :keyword partition_id: Id of the partition to which this replica belongs. - :paramtype partition_id: str - :keyword instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric - to uniquely identify an instance of a partition of a stateless service. It is unique within a - partition and does not change for the lifetime of the instance. If the instance has failed over - on the same or different node, it will get a different value for the InstanceId. - :paramtype instance_id: str - """ - super(StatelessServiceInstanceHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, partition_id=partition_id, **kwargs) - self.service_kind = 'Stateless' # type: str - self.instance_id = instance_id - - -class StatelessServiceInstanceHealthState(ReplicaHealthState): - """Represents the health state of the stateless service instance, which contains the instance ID and the aggregated health state. - - All required parameters must be populated in order to send to Azure. - - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar partition_id: The ID of the partition to which this replica belongs. - :vartype partition_id: str - :ivar replica_id: Id of the stateless service instance on the wire this field is called - ReplicaId. - :vartype replica_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'replica_id': {'key': 'ReplicaId', 'type': 'str'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - partition_id: Optional[str] = None, - replica_id: Optional[str] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword partition_id: The ID of the partition to which this replica belongs. - :paramtype partition_id: str - :keyword replica_id: Id of the stateless service instance on the wire this field is called - ReplicaId. - :paramtype replica_id: str - """ - super(StatelessServiceInstanceHealthState, self).__init__(aggregated_health_state=aggregated_health_state, partition_id=partition_id, **kwargs) - self.service_kind = 'Stateless' # type: str - self.replica_id = replica_id - - -class StatelessServiceInstanceInfo(ReplicaInfo): - """Represents a stateless service instance. This includes information about the identity, status, health, node name, uptime, and other details about the instance. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar replica_status: The status of a replica of a service. Possible values include: "Invalid", - "InBuild", "Standby", "Ready", "Down", "Dropped". - :vartype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar node_name: The name of a Service Fabric node. - :vartype node_name: str - :ivar address: The address the replica is listening on. - :vartype address: str - :ivar last_in_build_duration_in_seconds: The last in build duration of the replica in seconds. - :vartype last_in_build_duration_in_seconds: str - :ivar instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric to - uniquely identify an instance of a partition of a stateless service. It is unique within a - partition and does not change for the lifetime of the instance. If the instance has failed over - on the same or different node, it will get a different value for the InstanceId. - :vartype instance_id: str - """ - - _validation = { - 'service_kind': {'required': True}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'replica_status': {'key': 'ReplicaStatus', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'node_name': {'key': 'NodeName', 'type': 'str'}, - 'address': {'key': 'Address', 'type': 'str'}, - 'last_in_build_duration_in_seconds': {'key': 'LastInBuildDurationInSeconds', 'type': 'str'}, - 'instance_id': {'key': 'InstanceId', 'type': 'str'}, - } - - def __init__( - self, - *, - replica_status: Optional[Union[str, "ReplicaStatus"]] = None, - health_state: Optional[Union[str, "HealthState"]] = None, - node_name: Optional[str] = None, - address: Optional[str] = None, - last_in_build_duration_in_seconds: Optional[str] = None, - instance_id: Optional[str] = None, - **kwargs - ): - """ - :keyword replica_status: The status of a replica of a service. Possible values include: - "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". - :paramtype replica_status: str or ~azure.servicefabric.models.ReplicaStatus - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword node_name: The name of a Service Fabric node. - :paramtype node_name: str - :keyword address: The address the replica is listening on. - :paramtype address: str - :keyword last_in_build_duration_in_seconds: The last in build duration of the replica in - seconds. - :paramtype last_in_build_duration_in_seconds: str - :keyword instance_id: Id of a stateless service instance. InstanceId is used by Service Fabric - to uniquely identify an instance of a partition of a stateless service. It is unique within a - partition and does not change for the lifetime of the instance. If the instance has failed over - on the same or different node, it will get a different value for the InstanceId. - :paramtype instance_id: str - """ - super(StatelessServiceInstanceInfo, self).__init__(replica_status=replica_status, health_state=health_state, node_name=node_name, address=address, last_in_build_duration_in_seconds=last_in_build_duration_in_seconds, **kwargs) - self.service_kind = 'Stateless' # type: str - self.instance_id = instance_id - - -class StatelessServicePartitionInfo(ServicePartitionInfo): - """Information about a partition of a stateless Service Fabric service. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The kind of service (Stateless or Stateful).Constant filled by - server. Possible values include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar 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". - :vartype health_state: str or ~azure.servicefabric.models.HealthState - :ivar partition_status: The status of the service fabric service partition. Possible values - include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". - :vartype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus - :ivar partition_information: Information about the partition identity, partitioning scheme and - keys supported by it. - :vartype partition_information: ~azure.servicefabric.models.PartitionInformation - :ivar instance_count: Number of instances of this partition. - :vartype instance_count: long - :ivar min_instance_count: MinInstanceCount is the minimum number of instances that must be up - to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted - into the number of nodes on which the instances are allowed to be placed according to the - placement constraints on the service. - :vartype min_instance_count: int - :ivar min_instance_percentage: MinInstancePercentage is the minimum percentage of InstanceCount - that must be up to meet the EnsureAvailability safety check during operations like upgrade or - deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first - converted into the number of nodes on which the instances are allowed to be placed according to - the placement constraints on the service. - :vartype min_instance_percentage: int - """ - - _validation = { - 'service_kind': {'required': True}, - 'min_instance_count': {'minimum': 1}, - 'min_instance_percentage': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'health_state': {'key': 'HealthState', 'type': 'str'}, - 'partition_status': {'key': 'PartitionStatus', 'type': 'str'}, - 'partition_information': {'key': 'PartitionInformation', 'type': 'PartitionInformation'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'long'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - } - - def __init__( - self, - *, - health_state: Optional[Union[str, "HealthState"]] = None, - partition_status: Optional[Union[str, "ServicePartitionStatus"]] = None, - partition_information: Optional["PartitionInformation"] = None, - instance_count: Optional[int] = None, - min_instance_count: Optional[int] = 1, - min_instance_percentage: Optional[int] = 0, - **kwargs - ): - """ - :keyword 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". - :paramtype health_state: str or ~azure.servicefabric.models.HealthState - :keyword partition_status: The status of the service fabric service partition. Possible values - include: "Invalid", "Ready", "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". - :paramtype partition_status: str or ~azure.servicefabric.models.ServicePartitionStatus - :keyword partition_information: Information about the partition identity, partitioning scheme - and keys supported by it. - :paramtype partition_information: ~azure.servicefabric.models.PartitionInformation - :keyword instance_count: Number of instances of this partition. - :paramtype instance_count: long - :keyword min_instance_count: MinInstanceCount is the minimum number of instances that must be - up to meet the EnsureAvailability safety check during operations like upgrade or deactivate - node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted - into the number of nodes on which the instances are allowed to be placed according to the - placement constraints on the service. - :paramtype min_instance_count: int - :keyword min_instance_percentage: MinInstancePercentage is the minimum percentage of - InstanceCount that must be up to meet the EnsureAvailability safety check during operations - like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first - converted into the number of nodes on which the instances are allowed to be placed according to - the placement constraints on the service. - :paramtype min_instance_percentage: int - """ - super(StatelessServicePartitionInfo, self).__init__(health_state=health_state, partition_status=partition_status, partition_information=partition_information, **kwargs) - self.service_kind = 'Stateless' # type: str - self.instance_count = instance_count - self.min_instance_count = min_instance_count - self.min_instance_percentage = min_instance_percentage - - -class StatelessServiceTypeDescription(ServiceTypeDescription): - """Describes a stateless service type defined in the service manifest of a provisioned application type. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of service (Stateless or Stateful).Constant filled by server. - Possible values include: "Invalid", "Stateless", "Stateful". - :vartype kind: str or ~azure.servicefabric.models.ServiceKind - :ivar is_stateful: Indicates whether the service type is a stateful service type or a stateless - service type. This property is true if the service type is a stateful service type, false - otherwise. - :vartype is_stateful: bool - :ivar service_type_name: Name of the service type as specified in the service manifest. - :vartype service_type_name: str - :ivar placement_constraints: The placement constraint to be used when instantiating this - service in a Service Fabric cluster. - :vartype placement_constraints: str - :ivar load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: List of service placement policy descriptions. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar extensions: List of service type extensions. - :vartype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :ivar use_implicit_host: A flag indicating if this type is not implemented and hosted by a user - service process, but is implicitly hosted by a system created process. This value is true for - services using the guest executable services, false otherwise. - :vartype use_implicit_host: bool - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'is_stateful': {'key': 'IsStateful', 'type': 'bool'}, - 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'extensions': {'key': 'Extensions', 'type': '[ServiceTypeExtensionDescription]'}, - 'use_implicit_host': {'key': 'UseImplicitHost', 'type': 'bool'}, - } - - def __init__( - self, - *, - is_stateful: Optional[bool] = None, - service_type_name: Optional[str] = None, - placement_constraints: Optional[str] = None, - load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, - service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, - extensions: Optional[List["ServiceTypeExtensionDescription"]] = None, - use_implicit_host: Optional[bool] = None, - **kwargs - ): - """ - :keyword is_stateful: Indicates whether the service type is a stateful service type or a - stateless service type. This property is true if the service type is a stateful service type, - false otherwise. - :paramtype is_stateful: bool - :keyword service_type_name: Name of the service type as specified in the service manifest. - :paramtype service_type_name: str - :keyword placement_constraints: The placement constraint to be used when instantiating this - service in a Service Fabric cluster. - :paramtype placement_constraints: str - :keyword load_metrics: The service load metrics is given as an array of - ServiceLoadMetricDescription objects. - :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: List of service placement policy descriptions. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword extensions: List of service type extensions. - :paramtype extensions: list[~azure.servicefabric.models.ServiceTypeExtensionDescription] - :keyword use_implicit_host: A flag indicating if this type is not implemented and hosted by a - user service process, but is implicitly hosted by a system created process. This value is true - for services using the guest executable services, false otherwise. - :paramtype use_implicit_host: bool - """ - super(StatelessServiceTypeDescription, self).__init__(is_stateful=is_stateful, service_type_name=service_type_name, placement_constraints=placement_constraints, load_metrics=load_metrics, service_placement_policies=service_placement_policies, extensions=extensions, **kwargs) - self.kind = 'Stateless' # type: str - self.use_implicit_host = use_implicit_host - - -class StatelessServiceUpdateDescription(ServiceUpdateDescription): - """Describes an update for a stateless service. - - All required parameters must be populated in order to send to Azure. - - :ivar service_kind: Required. The service kind.Constant filled by server. Possible values - include: "Invalid", "Stateless", "Stateful". - :vartype service_kind: str or ~azure.servicefabric.models.ServiceKind - :ivar flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and - QuorumLossWaitDuration (4) are set. - - - * None - Does not indicate any other properties are set. The value is zero. - * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property - (for Stateful services) or the InstanceCount property (for Stateless services) is set. The - value is 1. - * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The - value is 2. - * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is - 4. - * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The - value is 8. - * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. - * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. - * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is - 64. - * Correlation - Indicates the CorrelationScheme property is set. The value is 128. - * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. - * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. - * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. - * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The - value is 2048. - * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. - * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is - 8192. - * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 16384. - * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 32768. - * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value - is 65536. - * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. - * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. - * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. - :vartype flags: str - :ivar placement_constraints: The placement constraints as a string. Placement constraints are - boolean expressions on node properties and allow for restricting a service to particular nodes - based on the service requirements. For example, to place a service on nodes where NodeType is - blue specify the following: "NodeColor == blue)". - :vartype placement_constraints: str - :ivar correlation_scheme: The correlation scheme. - :vartype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :ivar load_metrics: The service load metrics. - :vartype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :ivar service_placement_policies: The service placement policies. - :vartype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :ivar default_move_cost: The move cost for the service. Possible values include: "Zero", "Low", - "Medium", "High", "VeryHigh". - :vartype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :ivar scaling_policies: Scaling policies for this service. - :vartype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :ivar service_dns_name: The DNS name of the service. - :vartype service_dns_name: str - :ivar tags_for_placement: Tags for placement of this service. - :vartype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :ivar tags_for_running: Tags for running of this service. - :vartype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :ivar instance_count: The instance count. - :vartype instance_count: int - :ivar min_instance_count: MinInstanceCount is the minimum number of instances that must be up - to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted - into the number of nodes on which the instances are allowed to be placed according to the - placement constraints on the service. - :vartype min_instance_count: int - :ivar min_instance_percentage: MinInstancePercentage is the minimum percentage of InstanceCount - that must be up to meet the EnsureAvailability safety check during operations like upgrade or - deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first - converted into the number of nodes on which the instances are allowed to be placed according to - the placement constraints on the service. - :vartype min_instance_percentage: int - :ivar instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless - instance is closed, to allow the active requests to drain gracefully. This would be effective - when the instance is closing during the application/cluster upgrade and disabling node. - The endpoint exposed on this instance is removed prior to starting the delay, which prevents - new connections to this instance. - In addition, clients that have subscribed to service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do - the following upon receiving the endpoint removal notification: - - .. code-block:: - - - Stop sending new requests to this instance. - - Close existing connections after in-flight requests have completed. - - Connect to a different instance of the service partition for future requests. - :vartype instance_close_delay_duration_seconds: str - :ivar instance_lifecycle_description: Defines how instances of this service will behave during - their lifecycle. - :vartype instance_lifecycle_description: - ~azure.servicefabric.models.InstanceLifecycleDescription - :ivar instance_restart_wait_duration_seconds: When a stateless instance goes down, this timer - starts. When it expires Service Fabric will create a new instance on any node in the cluster. - This configuration is to reduce unnecessary creation of a new instance in situations where the - instance going down is likely to recover in a short time. For example, during an upgrade. - The default value is 0, which indicates that when stateless instance goes down, Service Fabric - will immediately start building its replacement. - :vartype instance_restart_wait_duration_seconds: str - """ - - _validation = { - 'service_kind': {'required': True}, - 'instance_count': {'minimum': -1}, - 'min_instance_count': {'minimum': 1}, - 'min_instance_percentage': {'maximum': 100, 'minimum': 0}, - } - - _attribute_map = { - 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, - 'flags': {'key': 'Flags', 'type': 'str'}, - 'placement_constraints': {'key': 'PlacementConstraints', 'type': 'str'}, - 'correlation_scheme': {'key': 'CorrelationScheme', 'type': '[ServiceCorrelationDescription]'}, - 'load_metrics': {'key': 'LoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, - 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, - 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, - 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, - 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, - 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, - 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, - 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, - 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, - 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, - 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'str'}, - 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, - 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'str'}, - } - - def __init__( - self, - *, - flags: Optional[str] = None, - placement_constraints: Optional[str] = None, - correlation_scheme: Optional[List["ServiceCorrelationDescription"]] = None, - load_metrics: Optional[List["ServiceLoadMetricDescription"]] = None, - service_placement_policies: Optional[List["ServicePlacementPolicyDescription"]] = None, - default_move_cost: Optional[Union[str, "MoveCost"]] = None, - scaling_policies: Optional[List["ScalingPolicyDescription"]] = None, - service_dns_name: Optional[str] = None, - tags_for_placement: Optional["NodeTagsDescription"] = None, - tags_for_running: Optional["NodeTagsDescription"] = None, - instance_count: Optional[int] = None, - min_instance_count: Optional[int] = 1, - min_instance_percentage: Optional[int] = 0, - instance_close_delay_duration_seconds: Optional[str] = None, - instance_lifecycle_description: Optional["InstanceLifecycleDescription"] = None, - instance_restart_wait_duration_seconds: Optional[str] = None, - **kwargs - ): - """ - :keyword flags: Flags indicating whether other properties are set. Each of the associated - properties corresponds to a flag, specified below, which, if set, indicate that the property is - specified. - This property can be a combination of those flags obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and - QuorumLossWaitDuration (4) are set. - - - * None - Does not indicate any other properties are set. The value is zero. - * TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property - (for Stateful services) or the InstanceCount property (for Stateless services) is set. The - value is 1. - * ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The - value is 2. - * QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is - 4. - * StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The - value is 8. - * MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. - * PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. - * PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is - 64. - * Correlation - Indicates the CorrelationScheme property is set. The value is 128. - * Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. - * DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. - * ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. - * ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The - value is 2048. - * MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. - * MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is - 8192. - * InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 16384. - * InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property is set. The - value is 32768. - * DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property is set. The value - is 65536. - * ServiceDnsName - Indicates the ServiceDnsName property is set. The value is 131072. - * TagsForPlacement - Indicates the TagsForPlacement property is set. The value is 1048576. - * TagsForRunning - Indicates the TagsForRunning property is set. The value is 2097152. - :paramtype flags: str - :keyword placement_constraints: The placement constraints as a string. Placement constraints - are boolean expressions on node properties and allow for restricting a service to particular - nodes based on the service requirements. For example, to place a service on nodes where - NodeType is blue specify the following: "NodeColor == blue)". - :paramtype placement_constraints: str - :keyword correlation_scheme: The correlation scheme. - :paramtype correlation_scheme: list[~azure.servicefabric.models.ServiceCorrelationDescription] - :keyword load_metrics: The service load metrics. - :paramtype load_metrics: list[~azure.servicefabric.models.ServiceLoadMetricDescription] - :keyword service_placement_policies: The service placement policies. - :paramtype service_placement_policies: - list[~azure.servicefabric.models.ServicePlacementPolicyDescription] - :keyword default_move_cost: The move cost for the service. Possible values include: "Zero", - "Low", "Medium", "High", "VeryHigh". - :paramtype default_move_cost: str or ~azure.servicefabric.models.MoveCost - :keyword scaling_policies: Scaling policies for this service. - :paramtype scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] - :keyword service_dns_name: The DNS name of the service. - :paramtype service_dns_name: str - :keyword tags_for_placement: Tags for placement of this service. - :paramtype tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription - :keyword tags_for_running: Tags for running of this service. - :paramtype tags_for_running: ~azure.servicefabric.models.NodeTagsDescription - :keyword instance_count: The instance count. - :paramtype instance_count: int - :keyword min_instance_count: MinInstanceCount is the minimum number of instances that must be - up to meet the EnsureAvailability safety check during operations like upgrade or deactivate - node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted - into the number of nodes on which the instances are allowed to be placed according to the - placement constraints on the service. - :paramtype min_instance_count: int - :keyword min_instance_percentage: MinInstancePercentage is the minimum percentage of - InstanceCount that must be up to meet the EnsureAvailability safety check during operations - like upgrade or deactivate node. - The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * - InstanceCount) ). - Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first - converted into the number of nodes on which the instances are allowed to be placed according to - the placement constraints on the service. - :paramtype min_instance_percentage: int - :keyword instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless - instance is closed, to allow the active requests to drain gracefully. This would be effective - when the instance is closing during the application/cluster upgrade and disabling node. - The endpoint exposed on this instance is removed prior to starting the delay, which prevents - new connections to this instance. - In addition, clients that have subscribed to service endpoint change - events(https://docs.microsoft.com/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), - can do - the following upon receiving the endpoint removal notification: - - .. code-block:: - - - Stop sending new requests to this instance. - - Close existing connections after in-flight requests have completed. - - Connect to a different instance of the service partition for future requests. - :paramtype instance_close_delay_duration_seconds: str - :keyword instance_lifecycle_description: Defines how instances of this service will behave - during their lifecycle. - :paramtype instance_lifecycle_description: - ~azure.servicefabric.models.InstanceLifecycleDescription - :keyword instance_restart_wait_duration_seconds: When a stateless instance goes down, this - timer starts. When it expires Service Fabric will create a new instance on any node in the - cluster. - This configuration is to reduce unnecessary creation of a new instance in situations where the - instance going down is likely to recover in a short time. For example, during an upgrade. - The default value is 0, which indicates that when stateless instance goes down, Service Fabric - will immediately start building its replacement. - :paramtype instance_restart_wait_duration_seconds: str - """ - super(StatelessServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_dns_name=service_dns_name, tags_for_placement=tags_for_placement, tags_for_running=tags_for_running, **kwargs) - self.service_kind = 'Stateless' # type: str - self.instance_count = instance_count - self.min_instance_count = min_instance_count - self.min_instance_percentage = min_instance_percentage - self.instance_close_delay_duration_seconds = instance_close_delay_duration_seconds - self.instance_lifecycle_description = instance_lifecycle_description - self.instance_restart_wait_duration_seconds = instance_restart_wait_duration_seconds - - -class StoppedChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos stops because either the user issued a stop or the time to run was up. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values - include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", - "Stopped". - :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind - :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :vartype time_stamp_utc: ~datetime.datetime - :ivar reason: Describes why Chaos stopped. Chaos can stop because of StopChaos API call or the - timeToRun provided in ChaosParameters is over. - :vartype reason: str - """ - - _validation = { - 'kind': {'required': True}, - 'time_stamp_utc': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__( - self, - *, - time_stamp_utc: datetime.datetime, - reason: Optional[str] = None, - **kwargs - ): - """ - :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :paramtype time_stamp_utc: ~datetime.datetime - :keyword reason: Describes why Chaos stopped. Chaos can stop because of StopChaos API call or - the timeToRun provided in ChaosParameters is over. - :paramtype reason: str - """ - super(StoppedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.kind = 'Stopped' # type: str - self.reason = reason - - -class StringPropertyValue(PropertyValue): - """Describes a Service Fabric property value of type String. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property, determined by the type of data. Following are the - possible values.Constant filled by server. Possible values include: "Invalid", "Binary", - "Int64", "Double", "String", "Guid". - :vartype kind: str or ~azure.servicefabric.models.PropertyValueKind - :ivar data: Required. The data of the property value. - :vartype data: str - """ - - _validation = { - 'kind': {'required': True}, - 'data': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'data': {'key': 'Data', 'type': 'str'}, - } - - def __init__( - self, - *, - data: str, - **kwargs - ): - """ - :keyword data: Required. The data of the property value. - :paramtype data: str - """ - super(StringPropertyValue, self).__init__(**kwargs) - self.kind = 'String' # type: str - self.data = data - - -class SuccessfulPropertyBatchInfo(PropertyBatchInfo): - """Derived from PropertyBatchInfo. Represents the property batch succeeding. Contains the results of any "Get" operations in the batch. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of property batch info, determined by the results of a property - batch. The following are the possible values.Constant filled by server. Possible values - include: "Invalid", "Successful", "Failed". - :vartype kind: str or ~azure.servicefabric.models.PropertyBatchInfoKind - :ivar properties: A map containing the properties that were requested through any "Get" - property batch operations. The key represents the index of the "Get" operation in the original - request, in string form. The value is the property. If a property is not found, it will not be - in the map. - :vartype properties: dict[str, ~azure.servicefabric.models.PropertyInfo] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'properties': {'key': 'Properties', 'type': '{PropertyInfo}'}, - } - - def __init__( - self, - *, - properties: Optional[Dict[str, "PropertyInfo"]] = None, - **kwargs - ): - """ - :keyword properties: A map containing the properties that were requested through any "Get" - property batch operations. The key represents the index of the "Get" operation in the original - request, in string form. The value is the property. If a property is not found, it will not be - in the map. - :paramtype properties: dict[str, ~azure.servicefabric.models.PropertyInfo] - """ - super(SuccessfulPropertyBatchInfo, self).__init__(**kwargs) - self.kind = 'Successful' # type: str - self.properties = properties - - -class SystemApplicationHealthEvaluation(HealthEvaluation): - """Represents health evaluation for the fabric:/System application, containing information about the data and the algorithm used by health store to evaluate health. The evaluation is returned only when the aggregated health state of the cluster is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the current aggregated - health state of the system application. The types of the unhealthy evaluations can be - DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the current - aggregated health state of the system application. The types of the unhealthy evaluations can - be DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(SystemApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'SystemApplication' # type: str - self.unhealthy_evaluations = unhealthy_evaluations - - -class TcpConfig(msrest.serialization.Model): - """Describes the tcp configuration for external connectivity for this network. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. tcp gateway config name. - :vartype name: str - :ivar port: Required. Specifies the port at which the service endpoint below needs to be - exposed. - :vartype port: int - :ivar destination: Required. Describes destination endpoint for routing traffic. - :vartype destination: ~azure.servicefabric.models.GatewayDestination - """ - - _validation = { - 'name': {'required': True}, - 'port': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'destination': {'key': 'destination', 'type': 'GatewayDestination'}, - } - - def __init__( - self, - *, - name: str, - port: int, - destination: "GatewayDestination", - **kwargs - ): - """ - :keyword name: Required. tcp gateway config name. - :paramtype name: str - :keyword port: Required. Specifies the port at which the service endpoint below needs to be - exposed. - :paramtype port: int - :keyword destination: Required. Describes destination endpoint for routing traffic. - :paramtype destination: ~azure.servicefabric.models.GatewayDestination - """ - super(TcpConfig, self).__init__(**kwargs) - self.name = name - self.port = port - self.destination = destination - - -class TestErrorChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when an unexpected event occurs in the Chaos engine. -For example, due to the cluster snapshot being inconsistent, while faulting an entity, Chaos found that the entity was already faulted -- which would be an unexpected event. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values - include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", - "Stopped". - :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind - :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :vartype time_stamp_utc: ~datetime.datetime - :ivar reason: Describes why TestErrorChaosEvent was generated. For example, Chaos tries to - fault a partition but finds that the partition is no longer fault tolerant, then a - TestErrorEvent gets generated with the reason stating that the partition is not fault tolerant. - :vartype reason: str - """ - - _validation = { - 'kind': {'required': True}, - 'time_stamp_utc': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__( - self, - *, - time_stamp_utc: datetime.datetime, - reason: Optional[str] = None, - **kwargs - ): - """ - :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :paramtype time_stamp_utc: ~datetime.datetime - :keyword reason: Describes why TestErrorChaosEvent was generated. For example, Chaos tries to - fault a partition but finds that the partition is no longer fault tolerant, then a - TestErrorEvent gets generated with the reason stating that the partition is not fault tolerant. - :paramtype reason: str - """ - super(TestErrorChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.kind = 'TestError' # type: str - self.reason = reason - - -class TimeBasedBackupScheduleDescription(BackupScheduleDescription): - """Describes the time based backup schedule. - - All required parameters must be populated in order to send to Azure. - - :ivar schedule_kind: Required. The kind of backup schedule, time based or frequency - based.Constant filled by server. Possible values include: "Invalid", "TimeBased", - "FrequencyBased". - :vartype schedule_kind: str or ~azure.servicefabric.models.BackupScheduleKind - :ivar schedule_frequency_type: Required. Describes the frequency with which to run the time - based backup schedule. Possible values include: "Invalid", "Daily", "Weekly". - :vartype schedule_frequency_type: str or - ~azure.servicefabric.models.BackupScheduleFrequencyType - :ivar run_days: List of days of a week when to trigger the periodic backup. This is valid only - when the backup schedule frequency type is weekly. - :vartype run_days: list[str or ~azure.servicefabric.models.DayOfWeek] - :ivar run_times: Required. Represents the list of exact time during the day in ISO8601 format. - Like '19:00:00' will represent '7PM' during the day. Date specified along with time will be - ignored. - :vartype run_times: list[~datetime.datetime] - """ - - _validation = { - 'schedule_kind': {'required': True}, - 'schedule_frequency_type': {'required': True}, - 'run_times': {'required': True}, - } - - _attribute_map = { - 'schedule_kind': {'key': 'ScheduleKind', 'type': 'str'}, - 'schedule_frequency_type': {'key': 'ScheduleFrequencyType', 'type': 'str'}, - 'run_days': {'key': 'RunDays', 'type': '[str]'}, - 'run_times': {'key': 'RunTimes', 'type': '[iso-8601]'}, - } - - def __init__( - self, - *, - schedule_frequency_type: Union[str, "BackupScheduleFrequencyType"], - run_times: List[datetime.datetime], - run_days: Optional[List[Union[str, "DayOfWeek"]]] = None, - **kwargs - ): - """ - :keyword schedule_frequency_type: Required. Describes the frequency with which to run the time - based backup schedule. Possible values include: "Invalid", "Daily", "Weekly". - :paramtype schedule_frequency_type: str or - ~azure.servicefabric.models.BackupScheduleFrequencyType - :keyword run_days: List of days of a week when to trigger the periodic backup. This is valid - only when the backup schedule frequency type is weekly. - :paramtype run_days: list[str or ~azure.servicefabric.models.DayOfWeek] - :keyword run_times: Required. Represents the list of exact time during the day in ISO8601 - format. Like '19:00:00' will represent '7PM' during the day. Date specified along with time - will be ignored. - :paramtype run_times: list[~datetime.datetime] - """ - super(TimeBasedBackupScheduleDescription, self).__init__(**kwargs) - self.schedule_kind = 'TimeBased' # type: str - self.schedule_frequency_type = schedule_frequency_type - self.run_days = run_days - self.run_times = run_times - - -class TimeOfDay(msrest.serialization.Model): - """Defines an hour and minute of the day specified in 24 hour time. - - :ivar hour: Represents the hour of the day. Value must be between 0 and 23 inclusive. - :vartype hour: int - :ivar minute: Represents the minute of the hour. Value must be between 0 to 59 inclusive. - :vartype minute: int - """ - - _validation = { - 'hour': {'maximum': 23, 'minimum': 0}, - 'minute': {'maximum': 59, 'minimum': 0}, - } - - _attribute_map = { - 'hour': {'key': 'Hour', 'type': 'int'}, - 'minute': {'key': 'Minute', 'type': 'int'}, - } - - def __init__( - self, - *, - hour: Optional[int] = None, - minute: Optional[int] = None, - **kwargs - ): - """ - :keyword hour: Represents the hour of the day. Value must be between 0 and 23 inclusive. - :paramtype hour: int - :keyword minute: Represents the minute of the hour. Value must be between 0 to 59 inclusive. - :paramtype minute: int - """ - super(TimeOfDay, self).__init__(**kwargs) - self.hour = hour - self.minute = minute - - -class TimeRange(msrest.serialization.Model): - """Defines a time range in a 24 hour day specified by a start and end time. - - :ivar start_time: Defines an hour and minute of the day specified in 24 hour time. - :vartype start_time: ~azure.servicefabric.models.TimeOfDay - :ivar end_time: Defines an hour and minute of the day specified in 24 hour time. - :vartype end_time: ~azure.servicefabric.models.TimeOfDay - """ - - _attribute_map = { - 'start_time': {'key': 'StartTime', 'type': 'TimeOfDay'}, - 'end_time': {'key': 'EndTime', 'type': 'TimeOfDay'}, - } - - def __init__( - self, - *, - start_time: Optional["TimeOfDay"] = None, - end_time: Optional["TimeOfDay"] = None, - **kwargs - ): - """ - :keyword start_time: Defines an hour and minute of the day specified in 24 hour time. - :paramtype start_time: ~azure.servicefabric.models.TimeOfDay - :keyword end_time: Defines an hour and minute of the day specified in 24 hour time. - :paramtype end_time: ~azure.servicefabric.models.TimeOfDay - """ - super(TimeRange, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - - -class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): - """Describes a partitioning scheme where an integer range is allocated evenly across a number of partitions. - - All required parameters must be populated in order to send to Azure. - - :ivar partition_scheme: Required. Specifies how the service is partitioned.Constant filled by - server. Possible values include: "Invalid", "Singleton", "UniformInt64Range", "Named". - :vartype partition_scheme: str or ~azure.servicefabric.models.PartitionScheme - :ivar count: Required. The number of partitions. - :vartype count: int - :ivar low_key: Required. String indicating the lower bound of the partition key range that - should be split between the partitions. - :vartype low_key: str - :ivar high_key: Required. String indicating the upper bound of the partition key range that - should be split between the partitions. - :vartype high_key: str - """ - - _validation = { - 'partition_scheme': {'required': True}, - 'count': {'required': True}, - 'low_key': {'required': True}, - 'high_key': {'required': True}, - } - - _attribute_map = { - 'partition_scheme': {'key': 'PartitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, - } - - def __init__( - self, - *, - count: int, - low_key: str, - high_key: str, - **kwargs - ): - """ - :keyword count: Required. The number of partitions. - :paramtype count: int - :keyword low_key: Required. String indicating the lower bound of the partition key range that - should be split between the partitions. - :paramtype low_key: str - :keyword high_key: Required. String indicating the upper bound of the partition key range that - should be split between the partitions. - :paramtype high_key: str - """ - super(UniformInt64RangePartitionSchemeDescription, self).__init__(**kwargs) - self.partition_scheme = 'UniformInt64Range' # type: str - self.count = count - self.low_key = low_key - self.high_key = high_key - - -class UnplacedReplicaInformation(msrest.serialization.Model): - """Contains information for an unplaced replica. - - :ivar service_name: The name of the service. - :vartype service_name: str - :ivar partition_id: The ID of the partition. - :vartype partition_id: str - :ivar unplaced_replica_details: List of reasons due to which a replica cannot be placed. - :vartype unplaced_replica_details: list[str] - """ - - _attribute_map = { - 'service_name': {'key': 'ServiceName', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'unplaced_replica_details': {'key': 'UnplacedReplicaDetails', 'type': '[str]'}, - } - - def __init__( - self, - *, - service_name: Optional[str] = None, - partition_id: Optional[str] = None, - unplaced_replica_details: Optional[List[str]] = None, - **kwargs - ): - """ - :keyword service_name: The name of the service. - :paramtype service_name: str - :keyword partition_id: The ID of the partition. - :paramtype partition_id: str - :keyword unplaced_replica_details: List of reasons due to which a replica cannot be placed. - :paramtype unplaced_replica_details: list[str] - """ - super(UnplacedReplicaInformation, self).__init__(**kwargs) - self.service_name = service_name - self.partition_id = partition_id - self.unplaced_replica_details = unplaced_replica_details - - -class UnprovisionApplicationTypeDescriptionInfo(msrest.serialization.Model): - """Describes the operation to unregister or unprovision an application type and its version that was registered with the Service Fabric. - - All required parameters must be populated in order to send to Azure. - - :ivar application_type_version: Required. The version of the application type as defined in the - application manifest. - :vartype application_type_version: str - :ivar async_property: The flag indicating whether or not unprovision should occur - asynchronously. When set to true, the unprovision operation returns when the request is - accepted by the system, and the unprovision operation continues without any timeout limit. The - default value is false. However, we recommend setting it to true for large application packages - that were provisioned. - :vartype async_property: bool - """ - - _validation = { - 'application_type_version': {'required': True}, - } - - _attribute_map = { - 'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'}, - 'async_property': {'key': 'Async', 'type': 'bool'}, - } - - def __init__( - self, - *, - application_type_version: str, - async_property: Optional[bool] = None, - **kwargs - ): - """ - :keyword application_type_version: Required. The version of the application type as defined in - the application manifest. - :paramtype application_type_version: str - :keyword async_property: The flag indicating whether or not unprovision should occur - asynchronously. When set to true, the unprovision operation returns when the request is - accepted by the system, and the unprovision operation continues without any timeout limit. The - default value is false. However, we recommend setting it to true for large application packages - that were provisioned. - :paramtype async_property: bool - """ - super(UnprovisionApplicationTypeDescriptionInfo, self).__init__(**kwargs) - self.application_type_version = application_type_version - self.async_property = async_property - - -class UnprovisionFabricDescription(msrest.serialization.Model): - """Describes the parameters for unprovisioning a cluster. - - :ivar code_version: The cluster code package version. - :vartype code_version: str - :ivar config_version: The cluster manifest version. - :vartype config_version: str - """ - - _attribute_map = { - 'code_version': {'key': 'CodeVersion', 'type': 'str'}, - 'config_version': {'key': 'ConfigVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - code_version: Optional[str] = None, - config_version: Optional[str] = None, - **kwargs - ): - """ - :keyword code_version: The cluster code package version. - :paramtype code_version: str - :keyword config_version: The cluster manifest version. - :paramtype config_version: str - """ - super(UnprovisionFabricDescription, self).__init__(**kwargs) - self.code_version = code_version - self.config_version = config_version - - -class UpdateClusterUpgradeDescription(msrest.serialization.Model): - """Parameters for updating a cluster upgrade. - - :ivar upgrade_kind: The type of upgrade out of the following possible values. Possible values - include: "Invalid", "Rolling", "Rolling_ForceRestart". Default value: "Rolling". - :vartype upgrade_kind: str or ~azure.servicefabric.models.UpgradeType - :ivar update_description: Describes the parameters for updating a rolling upgrade of - application or cluster. - :vartype update_description: ~azure.servicefabric.models.RollingUpgradeUpdateDescription - :ivar cluster_health_policy: Defines a health policy used to evaluate the health of the cluster - or of a cluster node. - :vartype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :ivar enable_delta_health_evaluation: When true, enables delta health evaluation rather than - absolute health evaluation after completion of each upgrade domain. - :vartype enable_delta_health_evaluation: bool - :ivar cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of the - cluster during a cluster upgrade. - :vartype cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :ivar application_health_policy_map: Defines the application health policy map used to evaluate - the health of an application or one of its children entities. - :vartype application_health_policy_map: ~azure.servicefabric.models.ApplicationHealthPolicies - """ - - _attribute_map = { - 'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'}, - 'update_description': {'key': 'UpdateDescription', 'type': 'RollingUpgradeUpdateDescription'}, - 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, - 'enable_delta_health_evaluation': {'key': 'EnableDeltaHealthEvaluation', 'type': 'bool'}, - 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicies'}, - } - - def __init__( - self, - *, - upgrade_kind: Optional[Union[str, "UpgradeType"]] = "Rolling", - update_description: Optional["RollingUpgradeUpdateDescription"] = None, - cluster_health_policy: Optional["ClusterHealthPolicy"] = None, - enable_delta_health_evaluation: Optional[bool] = None, - cluster_upgrade_health_policy: Optional["ClusterUpgradeHealthPolicyObject"] = None, - application_health_policy_map: Optional["ApplicationHealthPolicies"] = None, - **kwargs - ): - """ - :keyword upgrade_kind: The type of upgrade out of the following possible values. Possible - values include: "Invalid", "Rolling", "Rolling_ForceRestart". Default value: "Rolling". - :paramtype upgrade_kind: str or ~azure.servicefabric.models.UpgradeType - :keyword update_description: Describes the parameters for updating a rolling upgrade of - application or cluster. - :paramtype update_description: ~azure.servicefabric.models.RollingUpgradeUpdateDescription - :keyword cluster_health_policy: Defines a health policy used to evaluate the health of the - cluster or of a cluster node. - :paramtype cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :keyword enable_delta_health_evaluation: When true, enables delta health evaluation rather than - absolute health evaluation after completion of each upgrade domain. - :paramtype enable_delta_health_evaluation: bool - :keyword cluster_upgrade_health_policy: Defines a health policy used to evaluate the health of - the cluster during a cluster upgrade. - :paramtype cluster_upgrade_health_policy: - ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :keyword application_health_policy_map: Defines the application health policy map used to - evaluate the health of an application or one of its children entities. - :paramtype application_health_policy_map: ~azure.servicefabric.models.ApplicationHealthPolicies - """ - super(UpdateClusterUpgradeDescription, self).__init__(**kwargs) - self.upgrade_kind = upgrade_kind - self.update_description = update_description - self.cluster_health_policy = cluster_health_policy - self.enable_delta_health_evaluation = enable_delta_health_evaluation - self.cluster_upgrade_health_policy = cluster_upgrade_health_policy - self.application_health_policy_map = application_health_policy_map - - -class UpdatePartitionLoadResult(msrest.serialization.Model): - """Specifies result of updating load for specified partitions. The output will be ordered based on the partition ID. - - :ivar partition_id: Id of the partition. - :vartype partition_id: str - :ivar partition_error_code: If OperationState is Completed - this is 0. If OperationState is - Faulted - this is an error code indicating the reason. - :vartype partition_error_code: int - """ - - _attribute_map = { - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - 'partition_error_code': {'key': 'PartitionErrorCode', 'type': 'int'}, - } - - def __init__( - self, - *, - partition_id: Optional[str] = None, - partition_error_code: Optional[int] = None, - **kwargs - ): - """ - :keyword partition_id: Id of the partition. - :paramtype partition_id: str - :keyword partition_error_code: If OperationState is Completed - this is 0. If OperationState - is Faulted - this is an error code indicating the reason. - :paramtype partition_error_code: int - """ - super(UpdatePartitionLoadResult, self).__init__(**kwargs) - self.partition_id = partition_id - self.partition_error_code = partition_error_code - - -class UpgradeDomainDeltaNodesCheckHealthEvaluation(HealthEvaluation): - """Represents health evaluation for delta unhealthy cluster nodes in an upgrade domain, containing health evaluations for each unhealthy node that impacted current aggregated health state. -Can be returned during cluster upgrade when cluster aggregated health state is Warning or Error. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar upgrade_domain_name: Name of the upgrade domain where nodes health is currently - evaluated. - :vartype upgrade_domain_name: str - :ivar baseline_error_count: Number of upgrade domain nodes with aggregated heath state Error in - the health store at the beginning of the cluster upgrade. - :vartype baseline_error_count: long - :ivar baseline_total_count: Total number of upgrade domain nodes in the health store at the - beginning of the cluster upgrade. - :vartype baseline_total_count: long - :ivar max_percent_delta_unhealthy_nodes: Maximum allowed percentage of upgrade domain delta - unhealthy nodes from the ClusterUpgradeHealthPolicy. - :vartype max_percent_delta_unhealthy_nodes: int - :ivar total_count: Total number of upgrade domain nodes in the health store. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'baseline_error_count': {'key': 'BaselineErrorCount', 'type': 'long'}, - 'baseline_total_count': {'key': 'BaselineTotalCount', 'type': 'long'}, - 'max_percent_delta_unhealthy_nodes': {'key': 'MaxPercentDeltaUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - upgrade_domain_name: Optional[str] = None, - baseline_error_count: Optional[int] = None, - baseline_total_count: Optional[int] = None, - max_percent_delta_unhealthy_nodes: Optional[int] = None, - total_count: Optional[int] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword upgrade_domain_name: Name of the upgrade domain where nodes health is currently - evaluated. - :paramtype upgrade_domain_name: str - :keyword baseline_error_count: Number of upgrade domain nodes with aggregated heath state Error - in the health store at the beginning of the cluster upgrade. - :paramtype baseline_error_count: long - :keyword baseline_total_count: Total number of upgrade domain nodes in the health store at the - beginning of the cluster upgrade. - :paramtype baseline_total_count: long - :keyword max_percent_delta_unhealthy_nodes: Maximum allowed percentage of upgrade domain delta - unhealthy nodes from the ClusterUpgradeHealthPolicy. - :paramtype max_percent_delta_unhealthy_nodes: int - :keyword total_count: Total number of upgrade domain nodes in the health store. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(UpgradeDomainDeltaNodesCheckHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'UpgradeDomainDeltaNodesCheck' # type: str - self.upgrade_domain_name = upgrade_domain_name - self.baseline_error_count = baseline_error_count - self.baseline_total_count = baseline_total_count - self.max_percent_delta_unhealthy_nodes = max_percent_delta_unhealthy_nodes - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - - -class UpgradeDomainDeployedApplicationsHealthEvaluation(HealthEvaluation): - """Represents health evaluation for deployed applications in an upgrade domain, containing health evaluations for each unhealthy deployed application that impacted current aggregated health state. Can be returned when evaluating cluster health during cluster upgrade and the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar upgrade_domain_name: Name of the upgrade domain where deployed applications health is - currently evaluated. - :vartype upgrade_domain_name: str - :ivar max_percent_unhealthy_deployed_applications: Maximum allowed percentage of unhealthy - deployed applications from the ClusterHealthPolicy. - :vartype max_percent_unhealthy_deployed_applications: int - :ivar total_count: Total number of deployed applications in the current upgrade domain. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy DeployedApplicationHealthEvaluation that impacted the - aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - upgrade_domain_name: Optional[str] = None, - max_percent_unhealthy_deployed_applications: Optional[int] = None, - total_count: Optional[int] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword upgrade_domain_name: Name of the upgrade domain where deployed applications health is - currently evaluated. - :paramtype upgrade_domain_name: str - :keyword max_percent_unhealthy_deployed_applications: Maximum allowed percentage of unhealthy - deployed applications from the ClusterHealthPolicy. - :paramtype max_percent_unhealthy_deployed_applications: int - :keyword total_count: Total number of deployed applications in the current upgrade domain. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy DeployedApplicationHealthEvaluation that impacted the - aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(UpgradeDomainDeployedApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'UpgradeDomainDeployedApplications' # type: str - self.upgrade_domain_name = upgrade_domain_name - self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - - -class UpgradeDomainInfo(msrest.serialization.Model): - """Information about an upgrade domain. - - :ivar name: The name of the upgrade domain. - :vartype name: str - :ivar state: The state of the upgrade domain. Possible values include: "Invalid", "Pending", - "InProgress", "Completed". - :vartype state: str or ~azure.servicefabric.models.UpgradeDomainState - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - state: Optional[Union[str, "UpgradeDomainState"]] = None, - **kwargs - ): - """ - :keyword name: The name of the upgrade domain. - :paramtype name: str - :keyword state: The state of the upgrade domain. Possible values include: "Invalid", "Pending", - "InProgress", "Completed". - :paramtype state: str or ~azure.servicefabric.models.UpgradeDomainState - """ - super(UpgradeDomainInfo, self).__init__(**kwargs) - self.name = name - self.state = state - - -class UpgradeDomainNodesHealthEvaluation(HealthEvaluation): - """Represents health evaluation for cluster nodes in an upgrade domain, containing health evaluations for each unhealthy node that impacted current aggregated health state. Can be returned when evaluating cluster health during cluster upgrade and the aggregated health state is either Error or Warning. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The health manager in the cluster performs health evaluations in - determining the aggregated health state of an entity. This enumeration provides information on - the kind of evaluation that was performed. Following are the possible values.Constant filled by - server. Possible values include: "Invalid", "Event", "Replicas", "Partitions", - "DeployedServicePackages", "DeployedApplications", "Services", "Nodes", "Applications", - "SystemApplication", "UpgradeDomainDeployedApplications", "UpgradeDomainNodes", "Replica", - "Partition", "DeployedServicePackage", "DeployedApplication", "Service", "Node", "Application", - "DeltaNodesCheck", "UpgradeDomainDeltaNodesCheck", "ApplicationTypeApplications", - "NodeTypeNodes". - :vartype kind: str or ~azure.servicefabric.models.HealthEvaluationKind - :ivar aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :vartype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :ivar description: Description of the health evaluation, which represents a summary of the - evaluation process. - :vartype description: str - :ivar upgrade_domain_name: Name of the upgrade domain where nodes health is currently - evaluated. - :vartype upgrade_domain_name: str - :ivar max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes from the - ClusterHealthPolicy. - :vartype max_percent_unhealthy_nodes: int - :ivar total_count: Total number of nodes in the current upgrade domain. - :vartype total_count: long - :ivar unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. - :vartype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, - 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, - 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, - 'total_count': {'key': 'TotalCount', 'type': 'long'}, - 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, - } - - def __init__( - self, - *, - aggregated_health_state: Optional[Union[str, "HealthState"]] = None, - description: Optional[str] = None, - upgrade_domain_name: Optional[str] = None, - max_percent_unhealthy_nodes: Optional[int] = None, - total_count: Optional[int] = None, - unhealthy_evaluations: Optional[List["HealthEvaluationWrapper"]] = None, - **kwargs - ): - """ - :keyword aggregated_health_state: The health state of a Service Fabric entity such as Cluster, - Node, Application, Service, Partition, Replica etc. Possible values include: "Invalid", "Ok", - "Warning", "Error", "Unknown". - :paramtype aggregated_health_state: str or ~azure.servicefabric.models.HealthState - :keyword description: Description of the health evaluation, which represents a summary of the - evaluation process. - :paramtype description: str - :keyword upgrade_domain_name: Name of the upgrade domain where nodes health is currently - evaluated. - :paramtype upgrade_domain_name: str - :keyword max_percent_unhealthy_nodes: Maximum allowed percentage of unhealthy nodes from the - ClusterHealthPolicy. - :paramtype max_percent_unhealthy_nodes: int - :keyword total_count: Total number of nodes in the current upgrade domain. - :paramtype total_count: long - :keyword unhealthy_evaluations: List of unhealthy evaluations that led to the aggregated health - state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. - :paramtype unhealthy_evaluations: list[~azure.servicefabric.models.HealthEvaluationWrapper] - """ - super(UpgradeDomainNodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) - self.kind = 'UpgradeDomainNodes' # type: str - self.upgrade_domain_name = upgrade_domain_name - self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes - self.total_count = total_count - self.unhealthy_evaluations = unhealthy_evaluations - - -class UpgradeOrchestrationServiceState(msrest.serialization.Model): - """Service state of Service Fabric Upgrade Orchestration Service. - - :ivar service_state: The state of Service Fabric Upgrade Orchestration Service. - :vartype service_state: str - """ - - _attribute_map = { - 'service_state': {'key': 'ServiceState', 'type': 'str'}, - } - - def __init__( - self, - *, - service_state: Optional[str] = None, - **kwargs - ): - """ - :keyword service_state: The state of Service Fabric Upgrade Orchestration Service. - :paramtype service_state: str - """ - super(UpgradeOrchestrationServiceState, self).__init__(**kwargs) - self.service_state = service_state - - -class UpgradeOrchestrationServiceStateSummary(msrest.serialization.Model): - """Service state summary of Service Fabric Upgrade Orchestration Service. - - :ivar current_code_version: The current code version of the cluster. - :vartype current_code_version: str - :ivar current_manifest_version: The current manifest version of the cluster. - :vartype current_manifest_version: str - :ivar target_code_version: The target code version of the cluster. - :vartype target_code_version: str - :ivar target_manifest_version: The target manifest version of the cluster. - :vartype target_manifest_version: str - :ivar pending_upgrade_type: The type of the pending upgrade of the cluster. - :vartype pending_upgrade_type: str - """ - - _attribute_map = { - 'current_code_version': {'key': 'CurrentCodeVersion', 'type': 'str'}, - 'current_manifest_version': {'key': 'CurrentManifestVersion', 'type': 'str'}, - 'target_code_version': {'key': 'TargetCodeVersion', 'type': 'str'}, - 'target_manifest_version': {'key': 'TargetManifestVersion', 'type': 'str'}, - 'pending_upgrade_type': {'key': 'PendingUpgradeType', 'type': 'str'}, - } - - def __init__( - self, - *, - current_code_version: Optional[str] = None, - current_manifest_version: Optional[str] = None, - target_code_version: Optional[str] = None, - target_manifest_version: Optional[str] = None, - pending_upgrade_type: Optional[str] = None, - **kwargs - ): - """ - :keyword current_code_version: The current code version of the cluster. - :paramtype current_code_version: str - :keyword current_manifest_version: The current manifest version of the cluster. - :paramtype current_manifest_version: str - :keyword target_code_version: The target code version of the cluster. - :paramtype target_code_version: str - :keyword target_manifest_version: The target manifest version of the cluster. - :paramtype target_manifest_version: str - :keyword pending_upgrade_type: The type of the pending upgrade of the cluster. - :paramtype pending_upgrade_type: str - """ - super(UpgradeOrchestrationServiceStateSummary, self).__init__(**kwargs) - self.current_code_version = current_code_version - self.current_manifest_version = current_manifest_version - self.target_code_version = target_code_version - self.target_manifest_version = target_manifest_version - self.pending_upgrade_type = pending_upgrade_type - - -class UpgradeUnitInfo(msrest.serialization.Model): - """Information about an upgrade unit. - - :ivar name: The name of the upgrade unit. - :vartype name: str - :ivar state: The state of the upgrade unit. Possible values include: "Invalid", "Pending", - "InProgress", "Completed", "Failed". - :vartype state: str or ~azure.servicefabric.models.UpgradeUnitState - """ - - _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'state': {'key': 'State', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - state: Optional[Union[str, "UpgradeUnitState"]] = None, - **kwargs - ): - """ - :keyword name: The name of the upgrade unit. - :paramtype name: str - :keyword state: The state of the upgrade unit. Possible values include: "Invalid", "Pending", - "InProgress", "Completed", "Failed". - :paramtype state: str or ~azure.servicefabric.models.UpgradeUnitState - """ - super(UpgradeUnitInfo, self).__init__(**kwargs) - self.name = name - self.state = state - - -class UploadChunkRange(msrest.serialization.Model): - """Information about which portion of the file to upload. - - :ivar start_position: The start position of the portion of the file. It's represented by the - number of bytes. - :vartype start_position: str - :ivar end_position: The end position of the portion of the file. It's represented by the number - of bytes. - :vartype end_position: str - """ - - _attribute_map = { - 'start_position': {'key': 'StartPosition', 'type': 'str'}, - 'end_position': {'key': 'EndPosition', 'type': 'str'}, - } - - def __init__( - self, - *, - start_position: Optional[str] = None, - end_position: Optional[str] = None, - **kwargs - ): - """ - :keyword start_position: The start position of the portion of the file. It's represented by the - number of bytes. - :paramtype start_position: str - :keyword end_position: The end position of the portion of the file. It's represented by the - number of bytes. - :paramtype end_position: str - """ - super(UploadChunkRange, self).__init__(**kwargs) - self.start_position = start_position - self.end_position = end_position - - -class UploadSession(msrest.serialization.Model): - """Information about a image store upload session. - - :ivar upload_sessions: When querying upload session by upload session ID, the result contains - only one upload session. When querying upload session by image store relative path, the result - might contain multiple upload sessions. - :vartype upload_sessions: list[~azure.servicefabric.models.UploadSessionInfo] - """ - - _attribute_map = { - 'upload_sessions': {'key': 'UploadSessions', 'type': '[UploadSessionInfo]'}, - } - - def __init__( - self, - *, - upload_sessions: Optional[List["UploadSessionInfo"]] = None, - **kwargs - ): - """ - :keyword upload_sessions: When querying upload session by upload session ID, the result - contains only one upload session. When querying upload session by image store relative path, - the result might contain multiple upload sessions. - :paramtype upload_sessions: list[~azure.servicefabric.models.UploadSessionInfo] - """ - super(UploadSession, self).__init__(**kwargs) - self.upload_sessions = upload_sessions - - -class UploadSessionInfo(msrest.serialization.Model): - """Information about an image store upload session. A session is associated with a relative path in the image store. - - :ivar store_relative_path: The remote location within image store. This path is relative to the - image store root. - :vartype store_relative_path: str - :ivar session_id: A unique ID of the upload session. A session ID can be reused only if the - session was committed or removed. - :vartype session_id: str - :ivar modified_date: The date and time when the upload session was last modified. - :vartype modified_date: ~datetime.datetime - :ivar file_size: The size in bytes of the uploading file. - :vartype file_size: str - :ivar expected_ranges: List of chunk ranges that image store has not received yet. - :vartype expected_ranges: list[~azure.servicefabric.models.UploadChunkRange] - """ - - _attribute_map = { - 'store_relative_path': {'key': 'StoreRelativePath', 'type': 'str'}, - 'session_id': {'key': 'SessionId', 'type': 'str'}, - 'modified_date': {'key': 'ModifiedDate', 'type': 'iso-8601'}, - 'file_size': {'key': 'FileSize', 'type': 'str'}, - 'expected_ranges': {'key': 'ExpectedRanges', 'type': '[UploadChunkRange]'}, - } - - def __init__( - self, - *, - store_relative_path: Optional[str] = None, - session_id: Optional[str] = None, - modified_date: Optional[datetime.datetime] = None, - file_size: Optional[str] = None, - expected_ranges: Optional[List["UploadChunkRange"]] = None, - **kwargs - ): - """ - :keyword store_relative_path: The remote location within image store. This path is relative to - the image store root. - :paramtype store_relative_path: str - :keyword session_id: A unique ID of the upload session. A session ID can be reused only if the - session was committed or removed. - :paramtype session_id: str - :keyword modified_date: The date and time when the upload session was last modified. - :paramtype modified_date: ~datetime.datetime - :keyword file_size: The size in bytes of the uploading file. - :paramtype file_size: str - :keyword expected_ranges: List of chunk ranges that image store has not received yet. - :paramtype expected_ranges: list[~azure.servicefabric.models.UploadChunkRange] - """ - super(UploadSessionInfo, self).__init__(**kwargs) - self.store_relative_path = store_relative_path - self.session_id = session_id - self.modified_date = modified_date - self.file_size = file_size - self.expected_ranges = expected_ranges - - -class UsageInfo(msrest.serialization.Model): - """Information about how much space and how many files in the file system the ImageStore is using in this category. - - :ivar used_space: the size of all files in this category. - :vartype used_space: str - :ivar file_count: the number of all files in this category. - :vartype file_count: str - """ - - _attribute_map = { - 'used_space': {'key': 'UsedSpace', 'type': 'str'}, - 'file_count': {'key': 'FileCount', 'type': 'str'}, - } - - def __init__( - self, - *, - used_space: Optional[str] = None, - file_count: Optional[str] = None, - **kwargs - ): - """ - :keyword used_space: the size of all files in this category. - :paramtype used_space: str - :keyword file_count: the number of all files in this category. - :paramtype file_count: str - """ - super(UsageInfo, self).__init__(**kwargs) - self.used_space = used_space - self.file_count = file_count - - -class ValidateClusterUpgradeResult(msrest.serialization.Model): - """Specifies result of validating a cluster upgrade. - - :ivar service_host_upgrade_impact: The expected impact of the upgrade. Possible values include: - "Invalid", "None", "ServiceHostRestart", "UnexpectedServiceHostRestart". - :vartype service_host_upgrade_impact: str or - ~azure.servicefabric.models.ServiceHostUpgradeImpact - :ivar validation_details: A string containing additional details for the Fabric upgrade - validation result. - :vartype validation_details: str - """ - - _attribute_map = { - 'service_host_upgrade_impact': {'key': 'ServiceHostUpgradeImpact', 'type': 'str'}, - 'validation_details': {'key': 'ValidationDetails', 'type': 'str'}, - } - - def __init__( - self, - *, - service_host_upgrade_impact: Optional[Union[str, "ServiceHostUpgradeImpact"]] = None, - validation_details: Optional[str] = None, - **kwargs - ): - """ - :keyword service_host_upgrade_impact: The expected impact of the upgrade. Possible values - include: "Invalid", "None", "ServiceHostRestart", "UnexpectedServiceHostRestart". - :paramtype service_host_upgrade_impact: str or - ~azure.servicefabric.models.ServiceHostUpgradeImpact - :keyword validation_details: A string containing additional details for the Fabric upgrade - validation result. - :paramtype validation_details: str - """ - super(ValidateClusterUpgradeResult, self).__init__(**kwargs) - self.service_host_upgrade_impact = service_host_upgrade_impact - self.validation_details = validation_details - - -class ValidationFailedChaosEvent(ChaosEvent): - """Chaos event corresponding to a failure during validation. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values - include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", - "Stopped". - :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind - :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :vartype time_stamp_utc: ~datetime.datetime - :ivar reason: Describes why the ValidationFailedChaosEvent was generated. This may happen - because more than MaxPercentUnhealthyNodes are unhealthy for more than - MaxClusterStabilizationTimeout. This reason will be in the Reason property of the - ValidationFailedChaosEvent as a string. - :vartype reason: str - """ - - _validation = { - 'kind': {'required': True}, - 'time_stamp_utc': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__( - self, - *, - time_stamp_utc: datetime.datetime, - reason: Optional[str] = None, - **kwargs - ): - """ - :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :paramtype time_stamp_utc: ~datetime.datetime - :keyword reason: Describes why the ValidationFailedChaosEvent was generated. This may happen - because more than MaxPercentUnhealthyNodes are unhealthy for more than - MaxClusterStabilizationTimeout. This reason will be in the Reason property of the - ValidationFailedChaosEvent as a string. - :paramtype reason: str - """ - super(ValidationFailedChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.kind = 'ValidationFailed' # type: str - self.reason = reason - - -class VolumeProviderParametersAzureFile(msrest.serialization.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. - - :ivar account_name: Required. Name of the Azure storage account for the File Share. - :vartype account_name: str - :ivar account_key: Access key of the Azure storage account for the File Share. - :vartype account_key: str - :ivar share_name: Required. Name of the Azure Files file share that provides storage for the - volume. - :vartype 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: Optional[str] = None, - **kwargs - ): - """ - :keyword account_name: Required. Name of the Azure storage account for the File Share. - :paramtype account_name: str - :keyword account_key: Access key of the Azure storage account for the File Share. - :paramtype account_key: str - :keyword share_name: Required. Name of the Azure Files file share that provides storage for the - volume. - :paramtype share_name: str - """ - super(VolumeProviderParametersAzureFile, self).__init__(**kwargs) - self.account_name = account_name - self.account_key = account_key - self.share_name = share_name - - -class VolumeResourceDescription(msrest.serialization.Model): - """This type describes a volume resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Name of the Volume resource. - :vartype name: str - :ivar description: User readable description of the volume. - :vartype description: str - :ivar status: Status of the volume. Possible values include: "Unknown", "Ready", "Upgrading", - "Creating", "Deleting", "Failed". - :vartype status: str or ~azure.servicefabric.models.ResourceStatus - :ivar status_details: Gives additional information about the current status of the volume. - :vartype status_details: str - :ivar provider: Required. Provider of the volume. Possible values include: "SFAzureFile". - :vartype provider: str or ~azure.servicefabric.models.VolumeProvider - :ivar azure_file_parameters: This type describes a volume provided by an Azure Files file - share. - :vartype azure_file_parameters: ~azure.servicefabric.models.VolumeProviderParametersAzureFile - """ - - _validation = { - 'name': {'required': True}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'provider': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'provider': {'key': 'properties.provider', 'type': 'str'}, - 'azure_file_parameters': {'key': 'properties.azureFileParameters', 'type': 'VolumeProviderParametersAzureFile'}, - } - - def __init__( - self, - *, - name: str, - provider: Union[str, "VolumeProvider"], - description: Optional[str] = None, - azure_file_parameters: Optional["VolumeProviderParametersAzureFile"] = None, - **kwargs - ): - """ - :keyword name: Required. Name of the Volume resource. - :paramtype name: str - :keyword description: User readable description of the volume. - :paramtype description: str - :keyword provider: Required. Provider of the volume. Possible values include: "SFAzureFile". - :paramtype provider: str or ~azure.servicefabric.models.VolumeProvider - :keyword azure_file_parameters: This type describes a volume provided by an Azure Files file - share. - :paramtype azure_file_parameters: ~azure.servicefabric.models.VolumeProviderParametersAzureFile - """ - super(VolumeResourceDescription, self).__init__(**kwargs) - self.name = name - self.description = description - self.status = None - self.status_details = None - self.provider = provider - self.azure_file_parameters = azure_file_parameters - - -class WaitForInbuildReplicaSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the replica build operation to finish. This indicates that there is a replica that is going through the copy or is providing data for building another replica. Bring the node down will abort this copy operation which are typically expensive involving data movements. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - :ivar partition_id: Id of the partition which is undergoing the safety check. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - *, - partition_id: Optional[str] = None, - **kwargs - ): - """ - :keyword partition_id: Id of the partition which is undergoing the safety check. - :paramtype partition_id: str - """ - super(WaitForInbuildReplicaSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'WaitForInbuildReplica' # type: str - - -class WaitForPrimaryPlacementSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the primary replica that was moved out of the node due to upgrade to be placed back again on that node. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - :ivar partition_id: Id of the partition which is undergoing the safety check. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - *, - partition_id: Optional[str] = None, - **kwargs - ): - """ - :keyword partition_id: Id of the partition which is undergoing the safety check. - :paramtype partition_id: str - """ - super(WaitForPrimaryPlacementSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'WaitForPrimaryPlacement' # type: str - - -class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the primary replica to be moved out of the node before starting an upgrade to ensure the availability of the primary replica for the partition. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - :ivar partition_id: Id of the partition which is undergoing the safety check. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - *, - partition_id: Optional[str] = None, - **kwargs - ): - """ - :keyword partition_id: Id of the partition which is undergoing the safety check. - :paramtype partition_id: str - """ - super(WaitForPrimarySwapSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'WaitForPrimarySwap' # type: str - - -class WaitForReconfigurationSafetyCheck(PartitionSafetyCheck): - """Safety check that waits for the current reconfiguration of the partition to be completed before starting an upgrade. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of safety check performed by service fabric before continuing - with the operations. These checks ensure the availability of the service and the reliability of - the state. Following are the kinds of safety checks.Constant filled by server. Possible values - include: "Invalid", "EnsureSeedNodeQuorum", "EnsurePartitionQuorum", "WaitForPrimaryPlacement", - "WaitForPrimarySwap", "WaitForReconfiguration", "WaitForInbuildReplica", "EnsureAvailability". - :vartype kind: str or ~azure.servicefabric.models.SafetyCheckKind - :ivar partition_id: Id of the partition which is undergoing the safety check. - :vartype partition_id: str - """ - - _validation = { - 'kind': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'partition_id': {'key': 'PartitionId', 'type': 'str'}, - } - - def __init__( - self, - *, - partition_id: Optional[str] = None, - **kwargs - ): - """ - :keyword partition_id: Id of the partition which is undergoing the safety check. - :paramtype partition_id: str - """ - super(WaitForReconfigurationSafetyCheck, self).__init__(partition_id=partition_id, **kwargs) - self.kind = 'WaitForReconfiguration' # type: str - - -class WaitingChaosEvent(ChaosEvent): - """Describes a Chaos event that gets generated when Chaos is waiting for the cluster to become ready for faulting, for example, Chaos may be waiting for the on-going upgrade to finish. - - All required parameters must be populated in order to send to Azure. - - :ivar kind: Required. The kind of Chaos event.Constant filled by server. Possible values - include: "Invalid", "Started", "ExecutingFaults", "Waiting", "ValidationFailed", "TestError", - "Stopped". - :vartype kind: str or ~azure.servicefabric.models.ChaosEventKind - :ivar time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :vartype time_stamp_utc: ~datetime.datetime - :ivar reason: Describes why the WaitingChaosEvent was generated, for example, due to a cluster - upgrade. - :vartype reason: str - """ - - _validation = { - 'kind': {'required': True}, - 'time_stamp_utc': {'required': True}, - } - - _attribute_map = { - 'kind': {'key': 'Kind', 'type': 'str'}, - 'time_stamp_utc': {'key': 'TimeStampUtc', 'type': 'iso-8601'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - } - - def __init__( - self, - *, - time_stamp_utc: datetime.datetime, - reason: Optional[str] = None, - **kwargs - ): - """ - :keyword time_stamp_utc: Required. The UTC timestamp when this Chaos event was generated. - :paramtype time_stamp_utc: ~datetime.datetime - :keyword reason: Describes why the WaitingChaosEvent was generated, for example, due to a - cluster upgrade. - :paramtype reason: str - """ - super(WaitingChaosEvent, self).__init__(time_stamp_utc=time_stamp_utc, **kwargs) - self.kind = 'Waiting' # type: str - self.reason = reason diff --git a/customSDK/servicefabric/models/_service_fabric_client_apis_enums.py b/customSDK/servicefabric/models/_service_fabric_client_apis_enums.py deleted file mode 100644 index 852a8882..00000000 --- a/customSDK/servicefabric/models/_service_fabric_client_apis_enums.py +++ /dev/null @@ -1,2129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum -from six import with_metaclass -from azure.core import CaseInsensitiveEnumMeta - - -class ApplicationDefinitionKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The mechanism used to define a Service Fabric application. - """ - - #: Indicates the application definition kind is invalid. All Service Fabric enumerations have the - #: invalid type. The value is 65535. - INVALID = "Invalid" - #: Indicates the application is defined by a Service Fabric application description. The value is - #: 0. - SERVICE_FABRIC_APPLICATION_DESCRIPTION = "ServiceFabricApplicationDescription" - #: Indicates the application is defined by compose file(s). The value is 1. - COMPOSE = "Compose" - -class ApplicationPackageCleanupPolicy(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The kind of action that needs to be taken for cleaning up the application package after - successful provision. - """ - - #: Indicates that the application package cleanup policy is invalid. This value is default. The - #: value is zero. - INVALID = "Invalid" - #: Indicates that the cleanup policy of application packages is based on the cluster setting - #: "CleanupApplicationPackageOnProvisionSuccess." The value is 1. - DEFAULT = "Default" - #: Indicates that the service fabric runtime determines when to do the application package - #: cleanup. By default, cleanup is done on successful provision. The value is 2. - AUTOMATIC = "Automatic" - #: Indicates that the user has to explicitly clean up the application package. The value is 3. - MANUAL = "Manual" - -class ApplicationResourceUpgradeState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The state of the application resource upgrade. - """ - - #: Indicates the upgrade state is invalid. All Service Fabric enumerations have the invalid type. - #: The value is 0. - INVALID = "Invalid" - #: The upgrade is in the progress of provisioning target application type version. The value is 1. - PROVISIONING_TARGET = "ProvisioningTarget" - #: The upgrade is rolling forward to the target version but is not complete yet. The value is 2. - ROLLING_FORWARD = "RollingForward" - #: The upgrade is in the progress of unprovisioning current application type version and rolling - #: forward to the target version is completed. The value is 3. - UNPROVISIONING_CURRENT = "UnprovisioningCurrent" - #: The upgrade has finished rolling forward. The value is 4. - COMPLETED_ROLLFORWARD = "CompletedRollforward" - #: The upgrade is rolling back to the previous version but is not complete yet. The value is 5. - ROLLING_BACK = "RollingBack" - #: The upgrade is in the progress of unprovisioning target application type version and rolling - #: back to the current version is completed. The value is 6. - UNPROVISIONING_TARGET = "UnprovisioningTarget" - #: The upgrade has finished rolling back. The value is 7. - COMPLETED_ROLLBACK = "CompletedRollback" - #: The upgrade has failed and is unable to execute FailureAction. The value is 8. - FAILED = "Failed" - -class ApplicationScopedVolumeKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the application-scoped volume kind. - """ - - #: Provides Service Fabric High Availability Volume Disk. - SERVICE_FABRIC_VOLUME_DISK = "ServiceFabricVolumeDisk" - -class ApplicationStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The status of the application. - """ - - #: Indicates the application status is invalid. All Service Fabric enumerations have the invalid - #: type. The value is zero. - INVALID = "Invalid" - #: Indicates the application status is ready. The value is 1. - READY = "Ready" - #: Indicates the application status is upgrading. The value is 2. - UPGRADING = "Upgrading" - #: Indicates the application status is creating. The value is 3. - CREATING = "Creating" - #: Indicates the application status is deleting. The value is 4. - DELETING = "Deleting" - #: Indicates the creation or deletion of application was terminated due to persistent failures. - #: Another create/delete request can be accepted to resume a failed application. The value is 5. - FAILED = "Failed" - -class ApplicationTypeDefinitionKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The mechanism used to define a Service Fabric application type. - """ - - #: Indicates the application type definition kind is invalid. All Service Fabric enumerations have - #: the invalid type. The value is 0. - INVALID = "Invalid" - #: Indicates the application type is defined and created by a Service Fabric application package - #: provided by the user. The value is 1. - SERVICE_FABRIC_APPLICATION_PACKAGE = "ServiceFabricApplicationPackage" - #: Indicates the application type is defined and created implicitly as part of a compose - #: deployment. The value is 2. - COMPOSE = "Compose" - -class ApplicationTypeStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The status of the application type. - """ - - #: Indicates the application type status is invalid. All Service Fabric enumerations have the - #: invalid type. The value is zero. - INVALID = "Invalid" - #: Indicates that the application type is being provisioned in the cluster. The value is 1. - PROVISIONING = "Provisioning" - #: Indicates that the application type is fully provisioned and is available for use. An - #: application of this type and version can be created. The value is 2. - AVAILABLE = "Available" - #: Indicates that the application type is in process of being unprovisioned from the cluster. The - #: value is 3. - UNPROVISIONING = "Unprovisioning" - #: Indicates that the application type provisioning failed and it is unavailable for use. The - #: failure details can be obtained from the application type information query. The failed - #: application type information remains in the cluster until it is unprovisioned or reprovisioned - #: successfully. The value is 4. - FAILED = "Failed" - -class AutoScalingMechanismKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Enumerates the mechanisms for auto scaling. - """ - - #: Indicates that scaling should be performed by adding or removing replicas. - ADD_REMOVE_REPLICA = "AddRemoveReplica" - -class AutoScalingMetricKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Enumerates the metrics that are used for triggering auto scaling. - """ - - #: Indicates that the metric is one of resources, like cpu or memory. - RESOURCE = "Resource" - -class AutoScalingResourceMetricName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Enumerates the resources that are used for triggering auto scaling. - """ - - #: Indicates that the resource is CPU cores. - CPU = "cpu" - #: Indicates that the resource is memory in GB. - MEMORY_IN_GB = "memoryInGB" - -class AutoScalingTriggerKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Enumerates the triggers for auto scaling. - """ - - #: Indicates that scaling should be performed based on average load of all replicas in the - #: service. - AVERAGE_LOAD = "AverageLoad" - -class BackupEntityKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The entity type of a Service Fabric entity such as Application, Service or a Partition where - periodic backups can be enabled. - """ - - #: Indicates an invalid entity kind. All Service Fabric enumerations have the invalid type. - INVALID = "Invalid" - #: Indicates the entity is a Service Fabric partition. - PARTITION = "Partition" - #: Indicates the entity is a Service Fabric service. - SERVICE = "Service" - #: Indicates the entity is a Service Fabric application. - APPLICATION = "Application" - -class BackupPolicyScope(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the scope at which the backup policy is applied. - """ - - #: Indicates an invalid backup policy scope type. All Service Fabric enumerations have the invalid - #: type. - INVALID = "Invalid" - #: Indicates the backup policy is applied at partition level. Hence overriding any policy which - #: may have applied at partition's service or application level. - PARTITION = "Partition" - #: Indicates the backup policy is applied at service level. All partitions of the service inherit - #: this policy unless explicitly overridden at partition level. - SERVICE = "Service" - #: Indicates the backup policy is applied at application level. All services and partitions of the - #: application inherit this policy unless explicitly overridden at service or partition level. - APPLICATION = "Application" - -class BackupScheduleFrequencyType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Describes the frequency with which to run the time based backup schedule. - """ - - #: Indicates an invalid backup schedule frequency type. All Service Fabric enumerations have the - #: invalid type. - INVALID = "Invalid" - #: Indicates that the time based backup schedule is repeated at a daily frequency. - DAILY = "Daily" - #: Indicates that the time based backup schedule is repeated at a weekly frequency. - WEEKLY = "Weekly" - -class BackupScheduleKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The kind of backup schedule, time based or frequency based. - """ - - #: Indicates an invalid backup schedule kind. All Service Fabric enumerations have the invalid - #: type. - INVALID = "Invalid" - #: Indicates a time-based backup schedule. - TIME_BASED = "TimeBased" - #: Indicates a frequency-based backup schedule. - FREQUENCY_BASED = "FrequencyBased" - -class BackupState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Represents the current state of the partition backup operation. - """ - - #: Indicates an invalid backup state. All Service Fabric enumerations have the invalid type. - INVALID = "Invalid" - #: Operation has been validated and accepted. Backup is yet to be triggered. - ACCEPTED = "Accepted" - #: Backup operation has been triggered and is under process. - BACKUP_IN_PROGRESS = "BackupInProgress" - #: Operation completed with success. - SUCCESS = "Success" - #: Operation completed with failure. - FAILURE = "Failure" - #: Operation timed out. - TIMEOUT = "Timeout" - -class BackupStorageKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The kind of backup storage, where backups are saved. - """ - - #: Indicates an invalid backup storage kind. All Service Fabric enumerations have the invalid - #: type. - INVALID = "Invalid" - #: Indicates file/ SMB share to be used as backup storage. - FILE_SHARE = "FileShare" - #: Indicates Azure blob store to be used as backup storage. - AZURE_BLOB_STORE = "AzureBlobStore" - #: Indicates Dsms Azure blob store to be used as backup storage. - DSMS_AZURE_BLOB_STORE = "DsmsAzureBlobStore" - #: Indicates Azure blob store to be used as backup storage using managed identity. - MANAGED_IDENTITY_AZURE_BLOB_STORE = "ManagedIdentityAzureBlobStore" - -class BackupSuspensionScope(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the scope at which the backup suspension was applied. - """ - - #: Indicates an invalid backup suspension scope type also indicating entity is not suspended. All - #: Service Fabric enumerations have the invalid type. - INVALID = "Invalid" - #: Indicates the backup suspension is applied at partition level. - PARTITION = "Partition" - #: Indicates the backup suspension is applied at service level. All partitions of the service are - #: hence suspended for backup. - SERVICE = "Service" - #: Indicates the backup suspension is applied at application level. All services and partitions of - #: the application are hence suspended for backup. - APPLICATION = "Application" - -class BackupType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Describes the type of backup, whether its full or incremental. - """ - - #: Indicates an invalid backup type. All Service Fabric enumerations have the invalid type. - INVALID = "Invalid" - #: Indicates a full backup. - FULL = "Full" - #: Indicates an incremental backup. A backup chain is comprised of a full backup followed by 0 or - #: more incremental backups. - INCREMENTAL = "Incremental" - -class ChaosEventKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The kind of Chaos event. - """ - - #: Indicates an invalid Chaos event kind. All Service Fabric enumerations have the invalid type. - INVALID = "Invalid" - #: Indicates a Chaos event that gets generated when Chaos is started. - STARTED = "Started" - #: Indicates a Chaos event that gets generated when Chaos has decided on the faults for an - #: iteration. This Chaos event contains the details of the faults as a list of strings. - EXECUTING_FAULTS = "ExecutingFaults" - #: Indicates a Chaos event that gets generated when Chaos is waiting for the cluster to become - #: ready for faulting, for example, Chaos may be waiting for the on-going upgrade to finish. - WAITING = "Waiting" - #: Indicates a Chaos event that gets generated when the cluster entities do not become stable and - #: healthy within ChaosParameters.MaxClusterStabilizationTimeoutInSeconds. - VALIDATION_FAILED = "ValidationFailed" - #: Indicates a Chaos event that gets generated when an unexpected event has occurred in the Chaos - #: engine, for example, due to the cluster snapshot being inconsistent, while faulting a faultable - #: entity Chaos found that the entity was already faulted. - TEST_ERROR = "TestError" - #: Indicates a Chaos event that gets generated when Chaos stops because either the user issued a - #: stop or the time to run was up. - STOPPED = "Stopped" - -class ChaosScheduleStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Current status of the schedule. - """ - - #: Indicates an invalid Chaos Schedule status. All Service Fabric enumerations have the invalid - #: type. The value is zero. - INVALID = "Invalid" - #: Indicates that the schedule is stopped and not being used to schedule runs of chaos. The value - #: is one. - STOPPED = "Stopped" - #: Indicates that the schedule is active and is being used to schedule runs of Chaos. The value is - #: two. - ACTIVE = "Active" - #: Indicates that the schedule is expired and will no longer be used to schedule runs of Chaos. - #: The value is three. - EXPIRED = "Expired" - #: Indicates that the schedule is pending and is not yet being used to schedule runs of Chaos but - #: will be used when the start time is passed. The value is four. - PENDING = "Pending" - -class ChaosStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Current status of the Chaos run. - """ - - #: Indicates an invalid Chaos status. All Service Fabric enumerations have the invalid type. The - #: value is zero. - INVALID = "Invalid" - #: Indicates that Chaos is not stopped. The value is one. - RUNNING = "Running" - #: Indicates that Chaos is not scheduling further faults. The value is two. - STOPPED = "Stopped" - -class ComposeDeploymentStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The status of the compose deployment. - """ - - #: Indicates that the compose deployment status is invalid. The value is zero. - INVALID = "Invalid" - #: Indicates that the compose deployment is being provisioned in background. The value is 1. - PROVISIONING = "Provisioning" - #: Indicates that the compose deployment is being created in background. The value is 2. - CREATING = "Creating" - #: Indicates that the compose deployment has been successfully created or upgraded. The value is - #: 3. - READY = "Ready" - #: Indicates that the compose deployment is being unprovisioned in background. The value is 4. - UNPROVISIONING = "Unprovisioning" - #: Indicates that the compose deployment is being deleted in background. The value is 5. - DELETING = "Deleting" - #: Indicates that the compose deployment was terminated due to persistent failures. The value is - #: 6. - FAILED = "Failed" - #: Indicates that the compose deployment is being upgraded in the background. The value is 7. - UPGRADING = "Upgrading" - -class ComposeDeploymentUpgradeState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The state of the compose deployment upgrade. - """ - - #: Indicates the upgrade state is invalid. All Service Fabric enumerations have the invalid type. - #: The value is zero. - INVALID = "Invalid" - #: The upgrade is in the progress of provisioning target application type version. The value is 1. - PROVISIONING_TARGET = "ProvisioningTarget" - #: The upgrade is rolling forward to the target version but is not complete yet. The value is 2. - ROLLING_FORWARD_IN_PROGRESS = "RollingForwardInProgress" - #: The current upgrade domain has finished upgrading. The overall upgrade is waiting for an - #: explicit move next request in UnmonitoredManual mode or performing health checks in Monitored - #: mode. The value is 3. - ROLLING_FORWARD_PENDING = "RollingForwardPending" - #: The upgrade is in the progress of unprovisioning current application type version and rolling - #: forward to the target version is completed. The value is 4. - UNPROVISIONING_CURRENT = "UnprovisioningCurrent" - #: The upgrade has finished rolling forward. The value is 5. - ROLLING_FORWARD_COMPLETED = "RollingForwardCompleted" - #: The upgrade is rolling back to the previous version but is not complete yet. The value is 6. - ROLLING_BACK_IN_PROGRESS = "RollingBackInProgress" - #: The upgrade is in the progress of unprovisioning target application type version and rolling - #: back to the current version is completed. The value is 7. - UNPROVISIONING_TARGET = "UnprovisioningTarget" - #: The upgrade has finished rolling back. The value is 8. - ROLLING_BACK_COMPLETED = "RollingBackCompleted" - #: The upgrade has failed and is unable to execute FailureAction. The value is 9. - FAILED = "Failed" - -class CreateFabricDump(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Specify True to create a dump of the fabric node process. This is case-sensitive. - """ - - FALSE = "False" - TRUE = "True" - -class DataLossMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - - #: Reserved. Do not pass into API. - INVALID = "Invalid" - #: PartialDataLoss option will cause a quorum of replicas to go down, triggering an OnDataLoss - #: event in the system for the given partition. - PARTIAL_DATA_LOSS = "PartialDataLoss" - #: FullDataLoss option will drop all the replicas which means that all the data will be lost. - FULL_DATA_LOSS = "FullDataLoss" - -class DayOfWeek(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Describes the days in a week. - """ - - #: Indicates the Day referred is Sunday. - SUNDAY = "Sunday" - #: Indicates the Day referred is Monday. - MONDAY = "Monday" - #: Indicates the Day referred is Tuesday. - TUESDAY = "Tuesday" - #: Indicates the Day referred is Wednesday. - WEDNESDAY = "Wednesday" - #: Indicates the Day referred is Thursday. - THURSDAY = "Thursday" - #: Indicates the Day referred is Friday. - FRIDAY = "Friday" - #: Indicates the Day referred is Saturday. - SATURDAY = "Saturday" - -class DeactivationIntent(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Describes the intent or reason for deactivating the node. The possible values are following. - """ - - #: Indicates that the node should be paused. The value is 1. - PAUSE = "Pause" - #: Indicates that the intent is for the node to be restarted after a short period of time. The - #: value is 2. - RESTART = "Restart" - #: Indicates the intent is for the node to remove data. The value is 3. - REMOVE_DATA = "RemoveData" - -class DeployedApplicationStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The status of the application deployed on the node. Following are the possible values. - """ - - #: Indicates that deployment status is not valid. All Service Fabric enumerations have the invalid - #: type. The value is zero. - INVALID = "Invalid" - #: Indicates that the package is downloading from the ImageStore. The value is 1. - DOWNLOADING = "Downloading" - #: Indicates that the package is activating. The value is 2. - ACTIVATING = "Activating" - #: Indicates that the package is active. The value is 3. - ACTIVE = "Active" - #: Indicates that the package is upgrading. The value is 4. - UPGRADING = "Upgrading" - #: Indicates that the package is deactivating. The value is 5. - DEACTIVATING = "Deactivating" - -class DeploymentStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the status of a deployed application or service package on a Service Fabric node. - """ - - #: Indicates status of the application or service package is not known or invalid. The value is 0. - INVALID = "Invalid" - #: Indicates the application or service package is being downloaded to the node from the - #: ImageStore. The value is 1. - DOWNLOADING = "Downloading" - #: Indicates the application or service package is being activated. The value is 2. - ACTIVATING = "Activating" - #: Indicates the application or service package is active the node. The value is 3. - ACTIVE = "Active" - #: Indicates the application or service package is being upgraded. The value is 4. - UPGRADING = "Upgrading" - #: Indicates the application or service package is being deactivated. The value is 5. - DEACTIVATING = "Deactivating" - #: Indicates the application or service package has ran to completion successfully. The value is - #: 6. - RAN_TO_COMPLETION = "RanToCompletion" - #: Indicates the application or service package has failed to run to completion. The value is 7. - FAILED = "Failed" - -class DiagnosticsSinkKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The kind of DiagnosticsSink. - """ - - #: Indicates an invalid sink kind. All Service Fabric enumerations have the invalid type. - INVALID = "Invalid" - #: Diagnostics settings for Geneva. - AZURE_INTERNAL_MONITORING_PIPELINE = "AzureInternalMonitoringPipeline" - -class EntityKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The entity type of a Service Fabric entity such as Cluster, Node, Application, Service, - Partition, Replica etc. - """ - - #: Indicates an invalid entity kind. All Service Fabric enumerations have the invalid type. The - #: value is zero. - INVALID = "Invalid" - #: Indicates the entity is a Service Fabric node. The value is 1. - NODE = "Node" - #: Indicates the entity is a Service Fabric partition. The value is 2. - PARTITION = "Partition" - #: Indicates the entity is a Service Fabric service. The value is 3. - SERVICE = "Service" - #: Indicates the entity is a Service Fabric application. The value is 4. - APPLICATION = "Application" - #: Indicates the entity is a Service Fabric replica. The value is 5. - REPLICA = "Replica" - #: Indicates the entity is a Service Fabric deployed application. The value is 6. - DEPLOYED_APPLICATION = "DeployedApplication" - #: Indicates the entity is a Service Fabric deployed service package. The value is 7. - DEPLOYED_SERVICE_PACKAGE = "DeployedServicePackage" - #: Indicates the entity is a Service Fabric cluster. The value is 8. - CLUSTER = "Cluster" - -class EntryPointStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the status of the code package entry point deployed on a Service Fabric node. - """ - - #: Indicates status of entry point is not known or invalid. The value is 0. - INVALID = "Invalid" - #: Indicates the entry point is scheduled to be started. The value is 1. - PENDING = "Pending" - #: Indicates the entry point is being started. The value is 2. - STARTING = "Starting" - #: Indicates the entry point was started successfully and is running. The value is 3. - STARTED = "Started" - #: Indicates the entry point is being stopped. The value is 4. - STOPPING = "Stopping" - #: Indicates the entry point is not running. The value is 5. - STOPPED = "Stopped" - -class EnvironmentVariableType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The type of the environment variable being given in value - """ - - #: The environment variable in clear text, will not be processed in any way and passed in as is. - CLEAR_TEXT = "ClearText" - #: The URI to a KeyVault secret version, will be resolved using the application's managed identity - #: (this type is only valid if the app was assigned a managed identity) before getting passed in. - KEY_VAULT_REFERENCE = "KeyVaultReference" - #: The reference to a SecretValue resource, will be resolved before getting passed in. - SECRET_VALUE_REFERENCE = "SecretValueReference" - -class ExecutionPolicyType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Enumerates the execution policy types for services. - """ - - #: Indicates the default execution policy, always restart the service if an exit occurs. - DEFAULT = "Default" - #: Indicates that the service will perform its desired operation and complete successfully. If the - #: service encounters failure, it will restarted based on restart policy specified. If the service - #: completes its operation successfully, it will not be restarted again. - RUN_TO_COMPLETION = "RunToCompletion" - -class FabricErrorCodes(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Defines the fabric error codes that be returned as part of the error object in response to - Service Fabric API operations that are not successful. Following are the error code values that - can be returned for a specific HTTP status code. - - - * - Possible values of the error code for HTTP status code 400 (Bad Request) - - - * "FABRIC_E_INVALID_PARTITION_KEY" - * "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" - * "FABRIC_E_INVALID_ADDRESS" - * "FABRIC_E_APPLICATION_NOT_UPGRADING" - * "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" - * "FABRIC_E_FABRIC_NOT_UPGRADING" - * "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" - * "FABRIC_E_INVALID_CONFIGURATION" - * "FABRIC_E_INVALID_NAME_URI" - * "FABRIC_E_PATH_TOO_LONG" - * "FABRIC_E_KEY_TOO_LARGE" - * "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" - * "FABRIC_E_INVALID_ATOMIC_GROUP" - * "FABRIC_E_VALUE_EMPTY" - * "FABRIC_E_BACKUP_IS_ENABLED" - * "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" - * "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" - * "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" - * "E_INVALIDARG" - - * - Possible values of the error code for HTTP status code 404 (Not Found) - - - * "FABRIC_E_NODE_NOT_FOUND" - * "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" - * "FABRIC_E_APPLICATION_NOT_FOUND" - * "FABRIC_E_SERVICE_TYPE_NOT_FOUND" - * "FABRIC_E_SERVICE_DOES_NOT_EXIST" - * "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" - * "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" - * "FABRIC_E_PARTITION_NOT_FOUND" - * "FABRIC_E_REPLICA_DOES_NOT_EXIST" - * "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" - * "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" - * "FABRIC_E_DIRECTORY_NOT_FOUND" - * "FABRIC_E_FABRIC_VERSION_NOT_FOUND" - * "FABRIC_E_FILE_NOT_FOUND" - * "FABRIC_E_NAME_DOES_NOT_EXIST" - * "FABRIC_E_PROPERTY_DOES_NOT_EXIST" - * "FABRIC_E_ENUMERATION_COMPLETED" - * "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" - * "FABRIC_E_KEY_NOT_FOUND" - * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" - * "FABRIC_E_BACKUP_NOT_ENABLED" - * "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" - * "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" - * "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" - - * - Possible values of the error code for HTTP status code 409 (Conflict) - - - * "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" - * "FABRIC_E_APPLICATION_ALREADY_EXISTS" - * "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" - * "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" - * "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" - * "FABRIC_E_SERVICE_ALREADY_EXISTS" - * "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" - * "FABRIC_E_APPLICATION_TYPE_IN_USE" - * "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" - * "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" - * "FABRIC_E_FABRIC_VERSION_IN_USE" - * "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" - * "FABRIC_E_NAME_ALREADY_EXISTS" - * "FABRIC_E_NAME_NOT_EMPTY" - * "FABRIC_E_PROPERTY_CHECK_FAILED" - * "FABRIC_E_SERVICE_METADATA_MISMATCH" - * "FABRIC_E_SERVICE_TYPE_MISMATCH" - * "FABRIC_E_HEALTH_STALE_REPORT" - * "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" - * "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" - * "FABRIC_E_INSTANCE_ID_MISMATCH" - * "FABRIC_E_BACKUP_IN_PROGRESS" - * "FABRIC_E_RESTORE_IN_PROGRESS" - * "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" - - * - Possible values of the error code for HTTP status code 413 (Request Entity Too Large) - - - * "FABRIC_E_VALUE_TOO_LARGE" - - * - Possible values of the error code for HTTP status code 500 (Internal Server Error) - - - * "FABRIC_E_NODE_IS_UP" - * "E_FAIL" - * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" - * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" - * "FABRIC_E_VOLUME_ALREADY_EXISTS" - * "FABRIC_E_VOLUME_NOT_FOUND" - * "SerializationError" - * "FABRIC_E_CERTIFICATE_NOT_FOUND" - - * - Possible values of the error code for HTTP status code 503 (Service Unavailable) - - - * "FABRIC_E_NO_WRITE_QUORUM" - * "FABRIC_E_NOT_PRIMARY" - * "FABRIC_E_NOT_READY" - * "FABRIC_E_RECONFIGURATION_PENDING" - * "FABRIC_E_SERVICE_OFFLINE" - * "E_ABORT" - * "FABRIC_E_VALUE_TOO_LARGE" - - * - Possible values of the error code for HTTP status code 504 (Gateway Timeout) - - - * "FABRIC_E_COMMUNICATION_ERROR" - * "FABRIC_E_OPERATION_NOT_COMPLETE" - * "FABRIC_E_TIMEOUT" - """ - - FABRIC_E_INVALID_PARTITION_KEY = "FABRIC_E_INVALID_PARTITION_KEY" - FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR = "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" - FABRIC_E_INVALID_ADDRESS = "FABRIC_E_INVALID_ADDRESS" - FABRIC_E_APPLICATION_NOT_UPGRADING = "FABRIC_E_APPLICATION_NOT_UPGRADING" - FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR = "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" - FABRIC_E_FABRIC_NOT_UPGRADING = "FABRIC_E_FABRIC_NOT_UPGRADING" - FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR = "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" - FABRIC_E_INVALID_CONFIGURATION = "FABRIC_E_INVALID_CONFIGURATION" - FABRIC_E_INVALID_NAME_URI = "FABRIC_E_INVALID_NAME_URI" - FABRIC_E_PATH_TOO_LONG = "FABRIC_E_PATH_TOO_LONG" - FABRIC_E_KEY_TOO_LARGE = "FABRIC_E_KEY_TOO_LARGE" - FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED = "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" - FABRIC_E_INVALID_ATOMIC_GROUP = "FABRIC_E_INVALID_ATOMIC_GROUP" - FABRIC_E_VALUE_EMPTY = "FABRIC_E_VALUE_EMPTY" - FABRIC_E_NODE_NOT_FOUND = "FABRIC_E_NODE_NOT_FOUND" - FABRIC_E_APPLICATION_TYPE_NOT_FOUND = "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" - FABRIC_E_APPLICATION_NOT_FOUND = "FABRIC_E_APPLICATION_NOT_FOUND" - FABRIC_E_SERVICE_TYPE_NOT_FOUND = "FABRIC_E_SERVICE_TYPE_NOT_FOUND" - FABRIC_E_SERVICE_DOES_NOT_EXIST = "FABRIC_E_SERVICE_DOES_NOT_EXIST" - FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND = "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" - FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND = "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" - FABRIC_E_PARTITION_NOT_FOUND = "FABRIC_E_PARTITION_NOT_FOUND" - FABRIC_E_REPLICA_DOES_NOT_EXIST = "FABRIC_E_REPLICA_DOES_NOT_EXIST" - FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST = "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" - FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND = "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" - FABRIC_E_DIRECTORY_NOT_FOUND = "FABRIC_E_DIRECTORY_NOT_FOUND" - FABRIC_E_FABRIC_VERSION_NOT_FOUND = "FABRIC_E_FABRIC_VERSION_NOT_FOUND" - FABRIC_E_FILE_NOT_FOUND = "FABRIC_E_FILE_NOT_FOUND" - FABRIC_E_NAME_DOES_NOT_EXIST = "FABRIC_E_NAME_DOES_NOT_EXIST" - FABRIC_E_PROPERTY_DOES_NOT_EXIST = "FABRIC_E_PROPERTY_DOES_NOT_EXIST" - FABRIC_E_ENUMERATION_COMPLETED = "FABRIC_E_ENUMERATION_COMPLETED" - FABRIC_E_SERVICE_MANIFEST_NOT_FOUND = "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" - FABRIC_E_KEY_NOT_FOUND = "FABRIC_E_KEY_NOT_FOUND" - FABRIC_E_HEALTH_ENTITY_NOT_FOUND = "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" - FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS = "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" - FABRIC_E_APPLICATION_ALREADY_EXISTS = "FABRIC_E_APPLICATION_ALREADY_EXISTS" - FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION = "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" - FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS = "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" - FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS = "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" - FABRIC_E_SERVICE_ALREADY_EXISTS = "FABRIC_E_SERVICE_ALREADY_EXISTS" - FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS = "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" - FABRIC_E_APPLICATION_TYPE_IN_USE = "FABRIC_E_APPLICATION_TYPE_IN_USE" - FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION = "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" - FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS = "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" - FABRIC_E_FABRIC_VERSION_IN_USE = "FABRIC_E_FABRIC_VERSION_IN_USE" - FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS = "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" - FABRIC_E_NAME_ALREADY_EXISTS = "FABRIC_E_NAME_ALREADY_EXISTS" - FABRIC_E_NAME_NOT_EMPTY = "FABRIC_E_NAME_NOT_EMPTY" - FABRIC_E_PROPERTY_CHECK_FAILED = "FABRIC_E_PROPERTY_CHECK_FAILED" - FABRIC_E_SERVICE_METADATA_MISMATCH = "FABRIC_E_SERVICE_METADATA_MISMATCH" - FABRIC_E_SERVICE_TYPE_MISMATCH = "FABRIC_E_SERVICE_TYPE_MISMATCH" - FABRIC_E_HEALTH_STALE_REPORT = "FABRIC_E_HEALTH_STALE_REPORT" - FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED = "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" - FABRIC_E_NODE_HAS_NOT_STOPPED_YET = "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" - FABRIC_E_INSTANCE_ID_MISMATCH = "FABRIC_E_INSTANCE_ID_MISMATCH" - FABRIC_E_VALUE_TOO_LARGE = "FABRIC_E_VALUE_TOO_LARGE" - FABRIC_E_NO_WRITE_QUORUM = "FABRIC_E_NO_WRITE_QUORUM" - FABRIC_E_NOT_PRIMARY = "FABRIC_E_NOT_PRIMARY" - FABRIC_E_NOT_READY = "FABRIC_E_NOT_READY" - FABRIC_E_RECONFIGURATION_PENDING = "FABRIC_E_RECONFIGURATION_PENDING" - FABRIC_E_SERVICE_OFFLINE = "FABRIC_E_SERVICE_OFFLINE" - E_ABORT = "E_ABORT" - FABRIC_E_COMMUNICATION_ERROR = "FABRIC_E_COMMUNICATION_ERROR" - FABRIC_E_OPERATION_NOT_COMPLETE = "FABRIC_E_OPERATION_NOT_COMPLETE" - FABRIC_E_TIMEOUT = "FABRIC_E_TIMEOUT" - FABRIC_E_NODE_IS_UP = "FABRIC_E_NODE_IS_UP" - E_FAIL = "E_FAIL" - FABRIC_E_BACKUP_IS_ENABLED = "FABRIC_E_BACKUP_IS_ENABLED" - FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH = "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" - FABRIC_E_INVALID_FOR_STATELESS_SERVICES = "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" - FABRIC_E_BACKUP_NOT_ENABLED = "FABRIC_E_BACKUP_NOT_ENABLED" - FABRIC_E_BACKUP_POLICY_NOT_EXISTING = "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" - FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING = "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" - FABRIC_E_BACKUP_IN_PROGRESS = "FABRIC_E_BACKUP_IN_PROGRESS" - FABRIC_E_RESTORE_IN_PROGRESS = "FABRIC_E_RESTORE_IN_PROGRESS" - 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" - FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR = "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" - FABRIC_E_CERTIFICATE_NOT_FOUND = "FABRIC_E_CERTIFICATE_NOT_FOUND" - -class FabricEventKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The kind of FabricEvent. - """ - - CLUSTER_EVENT = "ClusterEvent" - CONTAINER_INSTANCE_EVENT = "ContainerInstanceEvent" - NODE_EVENT = "NodeEvent" - APPLICATION_EVENT = "ApplicationEvent" - SERVICE_EVENT = "ServiceEvent" - PARTITION_EVENT = "PartitionEvent" - REPLICA_EVENT = "ReplicaEvent" - PARTITION_ANALYSIS_EVENT = "PartitionAnalysisEvent" - APPLICATION_CREATED = "ApplicationCreated" - APPLICATION_DELETED = "ApplicationDeleted" - APPLICATION_NEW_HEALTH_REPORT = "ApplicationNewHealthReport" - APPLICATION_HEALTH_REPORT_EXPIRED = "ApplicationHealthReportExpired" - APPLICATION_UPGRADE_COMPLETED = "ApplicationUpgradeCompleted" - APPLICATION_UPGRADE_DOMAIN_COMPLETED = "ApplicationUpgradeDomainCompleted" - APPLICATION_UPGRADE_ROLLBACK_COMPLETED = "ApplicationUpgradeRollbackCompleted" - APPLICATION_UPGRADE_ROLLBACK_STARTED = "ApplicationUpgradeRollbackStarted" - APPLICATION_UPGRADE_STARTED = "ApplicationUpgradeStarted" - DEPLOYED_APPLICATION_NEW_HEALTH_REPORT = "DeployedApplicationNewHealthReport" - DEPLOYED_APPLICATION_HEALTH_REPORT_EXPIRED = "DeployedApplicationHealthReportExpired" - APPLICATION_PROCESS_EXITED = "ApplicationProcessExited" - APPLICATION_CONTAINER_INSTANCE_EXITED = "ApplicationContainerInstanceExited" - NODE_ABORTED = "NodeAborted" - NODE_ADDED_TO_CLUSTER = "NodeAddedToCluster" - NODE_CLOSED = "NodeClosed" - NODE_DEACTIVATE_COMPLETED = "NodeDeactivateCompleted" - NODE_DEACTIVATE_STARTED = "NodeDeactivateStarted" - NODE_DOWN = "NodeDown" - NODE_NEW_HEALTH_REPORT = "NodeNewHealthReport" - NODE_HEALTH_REPORT_EXPIRED = "NodeHealthReportExpired" - NODE_OPEN_SUCCEEDED = "NodeOpenSucceeded" - NODE_OPEN_FAILED = "NodeOpenFailed" - NODE_REMOVED_FROM_CLUSTER = "NodeRemovedFromCluster" - NODE_UP = "NodeUp" - PARTITION_NEW_HEALTH_REPORT = "PartitionNewHealthReport" - PARTITION_HEALTH_REPORT_EXPIRED = "PartitionHealthReportExpired" - PARTITION_RECONFIGURED = "PartitionReconfigured" - PARTITION_PRIMARY_MOVE_ANALYSIS = "PartitionPrimaryMoveAnalysis" - SERVICE_CREATED = "ServiceCreated" - SERVICE_DELETED = "ServiceDeleted" - SERVICE_NEW_HEALTH_REPORT = "ServiceNewHealthReport" - SERVICE_HEALTH_REPORT_EXPIRED = "ServiceHealthReportExpired" - DEPLOYED_SERVICE_PACKAGE_NEW_HEALTH_REPORT = "DeployedServicePackageNewHealthReport" - DEPLOYED_SERVICE_PACKAGE_HEALTH_REPORT_EXPIRED = "DeployedServicePackageHealthReportExpired" - STATEFUL_REPLICA_NEW_HEALTH_REPORT = "StatefulReplicaNewHealthReport" - STATEFUL_REPLICA_HEALTH_REPORT_EXPIRED = "StatefulReplicaHealthReportExpired" - STATELESS_REPLICA_NEW_HEALTH_REPORT = "StatelessReplicaNewHealthReport" - STATELESS_REPLICA_HEALTH_REPORT_EXPIRED = "StatelessReplicaHealthReportExpired" - CLUSTER_NEW_HEALTH_REPORT = "ClusterNewHealthReport" - CLUSTER_HEALTH_REPORT_EXPIRED = "ClusterHealthReportExpired" - CLUSTER_UPGRADE_COMPLETED = "ClusterUpgradeCompleted" - CLUSTER_UPGRADE_DOMAIN_COMPLETED = "ClusterUpgradeDomainCompleted" - CLUSTER_UPGRADE_ROLLBACK_COMPLETED = "ClusterUpgradeRollbackCompleted" - CLUSTER_UPGRADE_ROLLBACK_STARTED = "ClusterUpgradeRollbackStarted" - CLUSTER_UPGRADE_STARTED = "ClusterUpgradeStarted" - CHAOS_STOPPED = "ChaosStopped" - CHAOS_STARTED = "ChaosStarted" - CHAOS_CODE_PACKAGE_RESTART_SCHEDULED = "ChaosCodePackageRestartScheduled" - CHAOS_REPLICA_REMOVAL_SCHEDULED = "ChaosReplicaRemovalScheduled" - CHAOS_PARTITION_SECONDARY_MOVE_SCHEDULED = "ChaosPartitionSecondaryMoveScheduled" - CHAOS_PARTITION_PRIMARY_MOVE_SCHEDULED = "ChaosPartitionPrimaryMoveScheduled" - CHAOS_REPLICA_RESTART_SCHEDULED = "ChaosReplicaRestartScheduled" - CHAOS_NODE_RESTART_SCHEDULED = "ChaosNodeRestartScheduled" - -class FabricReplicaStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the status of the replica. - """ - - #: Indicates that the read or write operation access status is not valid. This value is not - #: returned to the caller. - INVALID = "Invalid" - #: Indicates that the replica is down. - DOWN = "Down" - #: Indicates that the replica is up. - UP = "Up" - -class FailureAction(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The compensating action to perform when a Monitored upgrade encounters monitoring policy or - health policy violations. - Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start - rolling back automatically. - Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. - """ - - #: Indicates the failure action is invalid. All Service Fabric enumerations have the invalid type. - #: The value is zero. - INVALID = "Invalid" - #: The upgrade will start rolling back automatically. The value is 1. - ROLLBACK = "Rollback" - #: The upgrade will switch to UnmonitoredManual upgrade mode. The value is 2. - MANUAL = "Manual" - -class FailureReason(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The cause of an upgrade failure that resulted in FailureAction being executed. - """ - - #: Indicates the reason is invalid or unknown. All Service Fabric enumerations have the invalid - #: type. The value is zero. - NONE = "None" - #: There was an external request to roll back the upgrade. The value is 1. - INTERRUPTED = "Interrupted" - #: The upgrade failed due to health policy violations. The value is 2. - HEALTH_CHECK = "HealthCheck" - #: An upgrade domain took longer than the allowed upgrade domain timeout to process. The value is - #: 3. - UPGRADE_DOMAIN_TIMEOUT = "UpgradeDomainTimeout" - #: The overall upgrade took longer than the allowed upgrade timeout to process. The value is 4. - OVERALL_UPGRADE_TIMEOUT = "OverallUpgradeTimeout" - -class HeaderMatchType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """how to match header value - """ - - EXACT = "exact" - -class HealthEvaluationKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The health manager in the cluster performs health evaluations in determining the aggregated - health state of an entity. This enumeration provides information on the kind of evaluation that - was performed. Following are the possible values. - """ - - #: Indicates that the health evaluation is invalid. The value is zero. - INVALID = "Invalid" - #: Indicates that the health evaluation is for a health event. The value is 1. - EVENT = "Event" - #: Indicates that the health evaluation is for the replicas of a partition. The value is 2. - REPLICAS = "Replicas" - #: Indicates that the health evaluation is for the partitions of a service. The value is 3. - PARTITIONS = "Partitions" - #: Indicates that the health evaluation is for the deployed service packages of a deployed - #: application. The value is 4. - DEPLOYED_SERVICE_PACKAGES = "DeployedServicePackages" - #: Indicates that the health evaluation is for the deployed applications of an application. The - #: value is 5. - DEPLOYED_APPLICATIONS = "DeployedApplications" - #: Indicates that the health evaluation is for services of an application. The value is 6. - SERVICES = "Services" - #: Indicates that the health evaluation is for the cluster nodes. The value is 7. - NODES = "Nodes" - #: Indicates that the health evaluation is for the cluster applications. The value is 8. - APPLICATIONS = "Applications" - #: Indicates that the health evaluation is for the system application. The value is 9. - SYSTEM_APPLICATION = "SystemApplication" - #: Indicates that the health evaluation is for the deployed applications of an application in an - #: upgrade domain. The value is 10. - UPGRADE_DOMAIN_DEPLOYED_APPLICATIONS = "UpgradeDomainDeployedApplications" - #: Indicates that the health evaluation is for the cluster nodes in an upgrade domain. The value - #: is 11. - UPGRADE_DOMAIN_NODES = "UpgradeDomainNodes" - #: Indicates that the health evaluation is for a replica. The value is 13. - REPLICA = "Replica" - #: Indicates that the health evaluation is for a partition. The value is 14. - PARTITION = "Partition" - #: Indicates that the health evaluation is for a deployed service package. The value is 16. - DEPLOYED_SERVICE_PACKAGE = "DeployedServicePackage" - #: Indicates that the health evaluation is for a deployed application. The value is 17. - DEPLOYED_APPLICATION = "DeployedApplication" - #: Indicates that the health evaluation is for a service. The value is 15. - SERVICE = "Service" - #: Indicates that the health evaluation is for a node. The value is 12. - NODE = "Node" - #: Indicates that the health evaluation is for an application. The value is 18. - APPLICATION = "Application" - #: Indicates that the health evaluation is for the delta of unhealthy cluster nodes. The value is - #: 19. - DELTA_NODES_CHECK = "DeltaNodesCheck" - #: Indicates that the health evaluation is for the delta of unhealthy upgrade domain cluster - #: nodes. The value is 20. - UPGRADE_DOMAIN_DELTA_NODES_CHECK = "UpgradeDomainDeltaNodesCheck" - #: – Indicates that the health evaluation is for applications of an application type. The value is - #: 21. - APPLICATION_TYPE_APPLICATIONS = "ApplicationTypeApplications" - #: – Indicates that the health evaluation is for nodes of a node type. The value is 22. - NODE_TYPE_NODES = "NodeTypeNodes" - -class HealthState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The health state of a Service Fabric entity such as Cluster, Node, Application, Service, - Partition, Replica etc. - """ - - #: Indicates an invalid health state. All Service Fabric enumerations have the invalid type. The - #: value is zero. - INVALID = "Invalid" - #: Indicates the health state is okay. The value is 1. - OK = "Ok" - #: Indicates the health state is at a warning level. The value is 2. - WARNING = "Warning" - #: Indicates the health state is at an error level. Error health state should be investigated, as - #: they can impact the correct functionality of the cluster. The value is 3. - ERROR = "Error" - #: Indicates an unknown health status. The value is 65535. - UNKNOWN = "Unknown" - -class HostIsolationMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the isolation mode of main entry point of a code package when it's host type is - ContainerHost. This is specified as part of container host policies in application manifest - while importing service manifest. - """ - - #: Indicates the isolation mode is not applicable for given HostType. The value is 0. - NONE = "None" - #: This is the default isolation mode for a ContainerHost. The value is 1. - PROCESS = "Process" - #: Indicates the ContainerHost is a Hyper-V container. This applies to only Windows containers. - #: The value is 2. - HYPER_V = "HyperV" - -class HostOptions(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """choices for server host - """ - - #: host: http://localhost:19080/. - HTTP_LOCALHOST19080_ = "http://localhost:19080/" - #: host: https://localhost:19080/. - HTTPS_LOCALHOST19080_ = "https://localhost:19080/" - -class HostType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the type of host for main entry point of a code package as specified in service - manifest. - """ - - #: Indicates the type of host is not known or invalid. The value is 0. - INVALID = "Invalid" - #: Indicates the host is an executable. The value is 1. - EXE_HOST = "ExeHost" - #: Indicates the host is a container. The value is 2. - CONTAINER_HOST = "ContainerHost" - -class ImageRegistryPasswordType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The type of the image registry password being given in password - """ - - #: The image registry password in clear text, will not be processed in any way and used directly. - CLEAR_TEXT = "ClearText" - #: The URI to a KeyVault secret version, will be resolved using the application's managed identity - #: (this type is only valid if the app was assigned a managed identity) before getting used. - KEY_VAULT_REFERENCE = "KeyVaultReference" - #: The reference to a SecretValue resource, will be resolved before getting used. - SECRET_VALUE_REFERENCE = "SecretValueReference" - -class ImpactLevel(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The level of impact expected. - """ - - INVALID = "Invalid" - NONE = "None" - RESTART = "Restart" - REMOVE_DATA = "RemoveData" - REMOVE_NODE = "RemoveNode" - -class ManagedIdentityType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The type of managed identity to be used to connect to Azure Blob Store via Managed Identity. - """ - - #: Indicates an invalid managed identity type. All Service Fabric enumerations have the invalid - #: type. - INVALID = "Invalid" - #: Indicates VMSS managed identity should be used to connect to Azure blob store. - VMSS = "VMSS" - #: Indicates cluster managed identity should be used to connect to Azure blob store. - CLUSTER = "Cluster" - -class MoveCost(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the move cost for the service. - """ - - #: Zero move cost. This value is zero. - ZERO = "Zero" - #: Specifies the move cost of the service as Low. The value is 1. - LOW = "Low" - #: Specifies the move cost of the service as Medium. The value is 2. - MEDIUM = "Medium" - #: Specifies the move cost of the service as High. The value is 3. - HIGH = "High" - #: Specifies the move cost of the service as VeryHigh. The value is 4. - VERY_HIGH = "VeryHigh" - -class NetworkKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The type of a Service Fabric container network. - """ - - #: Indicates a container network local to a single Service Fabric cluster. The value is 1. - LOCAL = "Local" - -class NodeDeactivationIntent(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The intent or the reason for deactivating the node. Following are the possible values for it. - """ - - #: Indicates the node deactivation intent is invalid. All Service Fabric enumerations have the - #: invalid type. The value is zero. This value is not used. - INVALID = "Invalid" - #: Indicates that the node should be paused. The value is 1. - PAUSE = "Pause" - #: Indicates that the intent is for the node to be restarted after a short period of time. Service - #: Fabric does not restart the node, this action is done outside of Service Fabric. The value is - #: 2. - RESTART = "Restart" - #: Indicates that the intent is to reimage the node. Service Fabric does not reimage the node, - #: this action is done outside of Service Fabric. The value is 3. - REMOVE_DATA = "RemoveData" - #: Indicates that the node is being decommissioned and is not expected to return. Service Fabric - #: does not decommission the node, this action is done outside of Service Fabric. The value is 4. - REMOVE_NODE = "RemoveNode" - -class NodeDeactivationStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The status of node deactivation operation. Following are the possible values. - """ - - #: No status is associated with the task. The value is zero. - NONE = "None" - #: When a node is deactivated Service Fabric performs checks to ensure that the operation is safe - #: to proceed to ensure availability of the service and reliability of the state. This value - #: indicates that one or more safety checks are in progress. The value is 1. - SAFETY_CHECK_IN_PROGRESS = "SafetyCheckInProgress" - #: When a node is deactivated Service Fabric performs checks to ensure that the operation is safe - #: to proceed to ensure availability of the service and reliability of the state. This value - #: indicates that all safety checks have been completed. The value is 2. - SAFETY_CHECK_COMPLETE = "SafetyCheckComplete" - #: The task is completed. The value is 3. - COMPLETED = "Completed" - -class NodeDeactivationTaskType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The type of the task that performed the node deactivation. Following are the possible values. - """ - - #: Indicates the node deactivation task type is invalid. All Service Fabric enumerations have the - #: invalid type. The value is zero. This value is not used. - INVALID = "Invalid" - #: Specifies the task created by Infrastructure hosting the nodes. The value is 1. - INFRASTRUCTURE = "Infrastructure" - #: Specifies the task that was created by the Repair Manager service. The value is 2. - REPAIR = "Repair" - #: Specifies that the task was created by using the public API. The value is 3. - CLIENT = "Client" - -class NodeStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The status of the node. - """ - - #: Indicates the node status is invalid. All Service Fabric enumerations have the invalid type. - #: The value is zero. - INVALID = "Invalid" - #: Indicates the node is up. The value is 1. - UP = "Up" - #: Indicates the node is down. The value is 2. - DOWN = "Down" - #: Indicates the node is in process of being enabled. The value is 3. - ENABLING = "Enabling" - #: Indicates the node is in the process of being disabled. The value is 4. - DISABLING = "Disabling" - #: Indicates the node is disabled. The value is 5. - DISABLED = "Disabled" - #: Indicates the node is unknown. A node would be in Unknown state if Service Fabric does not have - #: authoritative information about that node. This can happen if the system learns about a node at - #: runtime.The value is 6. - UNKNOWN = "Unknown" - #: Indicates the node is removed. A node would be in Removed state if NodeStateRemoved API has - #: been called for this node. In other words, Service Fabric has been informed that the persisted - #: state on the node has been permanently lost. The value is 7. - REMOVED = "Removed" - -class NodeStatusFilter(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - - #: This filter value will match all of the nodes excepts the ones with status as Unknown or - #: Removed. - DEFAULT = "default" - #: This filter value will match all of the nodes. - ALL = "all" - #: This filter value will match nodes that are Up. - UP = "up" - #: This filter value will match nodes that are Down. - DOWN = "down" - #: This filter value will match nodes that are in the process of being enabled with status as - #: Enabling. - ENABLING = "enabling" - #: This filter value will match nodes that are in the process of being disabled with status as - #: Disabling. - DISABLING = "disabling" - #: This filter value will match nodes that are Disabled. - DISABLED = "disabled" - #: This filter value will match nodes whose status is Unknown. A node would be in Unknown state if - #: Service Fabric does not have authoritative information about that node. This can happen if the - #: system learns about a node at runtime. - UNKNOWN = "unknown" - #: This filter value will match nodes whose status is Removed. These are the nodes that are - #: removed from the cluster using the RemoveNodeState API. - REMOVED = "removed" - -class NodeTransitionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - - #: Reserved. Do not pass into API. - INVALID = "Invalid" - #: Transition a stopped node to up. - START = "Start" - #: Transition an up node to stopped. - STOP = "Stop" - -class NodeUpgradePhase(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The state of the upgrading node. - """ - - #: Indicates the upgrade state is invalid. All Service Fabric enumerations have the invalid type. - #: The value is zero. - INVALID = "Invalid" - #: The upgrade has not started yet due to pending safety checks. The value is 1. - PRE_UPGRADE_SAFETY_CHECK = "PreUpgradeSafetyCheck" - #: The upgrade is in progress. The value is 2. - UPGRADING = "Upgrading" - #: The upgrade has completed and post upgrade safety checks are being performed. The value is 3. - POST_UPGRADE_SAFETY_CHECK = "PostUpgradeSafetyCheck" - -class OperatingSystemType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The operation system required by the code in service. - """ - - #: The required operating system is Linux. - LINUX = "Linux" - #: The required operating system is Windows. - WINDOWS = "Windows" - -class OperationState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The state of the operation. - """ - - #: The operation state is invalid. - INVALID = "Invalid" - #: The operation is in progress. - RUNNING = "Running" - #: The operation is rolling back internal system state because it encountered a fatal error or was - #: cancelled by the user. "RollingBack" does not refer to user state. For example, if - #: CancelOperation is called on a command of type PartitionDataLoss, state of "RollingBack" does - #: not mean service data is being restored (assuming the command has progressed far enough to - #: cause data loss). It means the system is rolling back/cleaning up internal system state - #: associated with the command. - ROLLING_BACK = "RollingBack" - #: The operation has completed successfully and is no longer running. - COMPLETED = "Completed" - #: The operation has failed and is no longer running. - FAULTED = "Faulted" - #: The operation was cancelled by the user using CancelOperation, and is no longer running. - CANCELLED = "Cancelled" - #: The operation was cancelled by the user using CancelOperation, with the force parameter set to - #: true. It is no longer running. Refer to CancelOperation for more details. - FORCE_CANCELLED = "ForceCancelled" - -class OperationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The type of the operation. - """ - - #: The operation state is invalid. - INVALID = "Invalid" - #: An operation started using the StartDataLoss API. - PARTITION_DATA_LOSS = "PartitionDataLoss" - #: An operation started using the StartQuorumLoss API. - PARTITION_QUORUM_LOSS = "PartitionQuorumLoss" - #: An operation started using the StartPartitionRestart API. - PARTITION_RESTART = "PartitionRestart" - #: An operation started using the StartNodeTransition API. - NODE_TRANSITION = "NodeTransition" - -class Ordering(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Defines the order. - """ - - #: Descending sort order. - DESC = "Desc" - #: Ascending sort order. - ASC = "Asc" - -class PackageSharingPolicyScope(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Represents the scope for PackageSharingPolicy. This is specified during - DeployServicePackageToNode operation. - """ - - #: No package sharing policy scope. The value is 0. - NONE = "None" - #: Share all code, config and data packages from corresponding service manifest. The value is 1. - ALL = "All" - #: Share all code packages from corresponding service manifest. The value is 2. - CODE = "Code" - #: Share all config packages from corresponding service manifest. The value is 3. - CONFIG = "Config" - #: Share all data packages from corresponding service manifest. The value is 4. - DATA = "Data" - -class PartitionAccessStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the access status of the partition. - """ - - #: Indicates that the read or write operation access status is not valid. This value is not - #: returned to the caller. - INVALID = "Invalid" - #: Indicates that the read or write operation access is granted and the operation is allowed. - GRANTED = "Granted" - #: Indicates that the client should try again later, because a reconfiguration is in progress. - RECONFIGURATION_PENDING = "ReconfigurationPending" - #: Indicates that this client request was received by a replica that is not a Primary replica. - NOT_PRIMARY = "NotPrimary" - #: Indicates that no write quorum is available and, therefore, no write operation can be accepted. - NO_WRITE_QUORUM = "NoWriteQuorum" - -class PartitionScheme(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Enumerates the ways that a service can be partitioned. - """ - - #: Indicates the partition kind is invalid. All Service Fabric enumerations have the invalid type. - #: The value is zero. - INVALID = "Invalid" - #: Indicates that the partition is based on string names, and is a - #: SingletonPartitionSchemeDescription object, The value is 1. - SINGLETON = "Singleton" - #: Indicates that the partition is based on Int64 key ranges, and is a - #: UniformInt64RangePartitionSchemeDescription object. The value is 2. - UNIFORM_INT64_RANGE = "UniformInt64Range" - #: Indicates that the partition is based on string names, and is a NamedPartitionSchemeDescription - #: object. The value is 3. - NAMED = "Named" - -class PathMatchType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """how to match value in the Uri - """ - - PREFIX = "prefix" - -class PropertyBatchInfoKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The kind of property batch info, determined by the results of a property batch. The following - are the possible values. - """ - - #: Indicates the property batch info is invalid. All Service Fabric enumerations have the invalid - #: type. - INVALID = "Invalid" - #: The property batch succeeded. - SUCCESSFUL = "Successful" - #: The property batch failed. - FAILED = "Failed" - -class PropertyBatchOperationKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The kind of property batch operation, determined by the operation to be performed. The - following are the possible values. - """ - - #: Indicates the property operation is invalid. All Service Fabric enumerations have the invalid - #: type. The value is zero. - INVALID = "Invalid" - #: The operation will create or edit a property. The value is 1. - PUT = "Put" - #: The operation will get a property. The value is 2. - GET = "Get" - #: The operation will check that a property exists or doesn't exists, depending on the provided - #: value. The value is 3. - CHECK_EXISTS = "CheckExists" - #: The operation will ensure that the sequence number is equal to the provided value. The value is - #: 4. - CHECK_SEQUENCE = "CheckSequence" - #: The operation will delete a property. The value is 5. - DELETE = "Delete" - #: The operation will ensure that the value of a property is equal to the provided value. The - #: value is 7. - CHECK_VALUE = "CheckValue" - -class PropertyValueKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The kind of property, determined by the type of data. Following are the possible values. - """ - - #: Indicates the property is invalid. All Service Fabric enumerations have the invalid type. The - #: value is zero. - INVALID = "Invalid" - #: The data inside the property is a binary blob. The value is 1. - BINARY = "Binary" - #: The data inside the property is an int64. The value is 2. - INT64 = "Int64" - #: The data inside the property is a double. The value is 3. - DOUBLE = "Double" - #: The data inside the property is a string. The value is 4. - STRING = "String" - #: The data inside the property is a guid. The value is 5. - GUID = "Guid" - -class ProvisionApplicationTypeKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The kind of application type registration or provision requested. The application package can - be registered or provisioned either from the image store or from an external store. Following - are the kinds of the application type provision. - """ - - #: Indicates that the provision kind is invalid. This value is default and should not be used. The - #: value is zero. - INVALID = "Invalid" - #: Indicates that the provision is for a package that was previously uploaded to the image store. - #: The value is 1. - IMAGE_STORE_PATH = "ImageStorePath" - #: Indicates that the provision is for an application package that was previously uploaded to an - #: external store. The application package ends with the extension *.sfpkg. The value is 2. - EXTERNAL_STORE = "ExternalStore" - -class QuorumLossMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - - #: Reserved. Do not pass into API. - INVALID = "Invalid" - #: Partial Quorum loss mode : Minimum number of replicas for a partition will be down that will - #: cause a quorum loss. - QUORUM_REPLICAS = "QuorumReplicas" - ALL_REPLICAS = "AllReplicas" - -class ReconfigurationPhase(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The reconfiguration phase of a replica of a stateful service. - """ - - #: Indicates the invalid reconfiguration phase. - UNKNOWN = "Unknown" - #: Specifies that there is no reconfiguration in progress. - NONE = "None" - #: Refers to the phase where the reconfiguration is transferring data from the previous primary to - #: the new primary. - PHASE0 = "Phase0" - #: Refers to the phase where the reconfiguration is querying the replica set for the progress. - PHASE1 = "Phase1" - #: Refers to the phase where the reconfiguration is ensuring that data from the current primary is - #: present in a majority of the replica set. - PHASE2 = "Phase2" - #: This phase is for internal use only. - PHASE3 = "Phase3" - #: This phase is for internal use only. - PHASE4 = "Phase4" - #: This phase is for internal use only. - ABORT_PHASE_ZERO = "AbortPhaseZero" - -class ReconfigurationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The type of reconfiguration for replica of a stateful service. - """ - - #: Indicates the invalid reconfiguration type. - UNKNOWN = "Unknown" - #: Specifies that the primary replica is being swapped with a different replica. - SWAP_PRIMARY = "SwapPrimary" - #: Reconfiguration triggered in response to a primary going down. This could be due to many - #: reasons such as primary replica crashing etc. - FAILOVER = "Failover" - #: Reconfigurations where the primary replica is not changing. - OTHER = "Other" - -class RepairImpactKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the kind of the impact. This type supports the Service Fabric platform; it is not - meant to be used directly from your code.' - """ - - #: The repair impact is not valid or is of an unknown type. - INVALID = "Invalid" - #: The repair impact affects a set of Service Fabric nodes. - NODE = "Node" - -class RepairTargetKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the kind of the repair target. This type supports the Service Fabric platform; it is - not meant to be used directly from your code.' - """ - - #: The repair target is not valid or is of an unknown type. - INVALID = "Invalid" - #: The repair target is a set of Service Fabric nodes. - NODE = "Node" - -class RepairTaskHealthCheckState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the workflow state of a repair task's health check. This type supports the Service - Fabric platform; it is not meant to be used directly from your code. - """ - - #: Indicates that the health check has not started. - NOT_STARTED = "NotStarted" - #: Indicates that the health check is in progress. - IN_PROGRESS = "InProgress" - #: Indicates that the health check succeeded. - SUCCEEDED = "Succeeded" - #: Indicates that the health check was skipped. - SKIPPED = "Skipped" - #: Indicates that the health check timed out. - TIMED_OUT = "TimedOut" - -class ReplicaHealthReportServiceKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - - #: Does not use Service Fabric to make its state highly available or reliable. The value is 1. - STATELESS = "Stateless" - #: Uses Service Fabric to make its state or part of its state highly available and reliable. The - #: value is 2. - STATEFUL = "Stateful" - -class ReplicaKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The role of a replica of a stateful service. - """ - - #: Represents an invalid replica kind. The value is zero. - INVALID = "Invalid" - #: Represents a key value store replica. The value is 1. - KEY_VALUE_STORE = "KeyValueStore" - -class ReplicaRole(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The role of a replica of a stateful service. - """ - - #: Indicates the initial role that a replica is created in. The value is zero. - UNKNOWN = "Unknown" - #: Specifies that the replica has no responsibility in regard to the replica set. The value is 1. - NONE = "None" - #: Refers to the replica in the set on which all read and write operations are complete in order - #: to enforce strong consistency semantics. Read operations are handled directly by the Primary - #: replica, while write operations must be acknowledged by a quorum of the replicas in the replica - #: set. There can only be one Primary replica in a replica set at a time. The value is 2. - PRIMARY = "Primary" - #: Refers to a replica in the set that receives a state transfer from the Primary replica to - #: prepare for becoming an active Secondary replica. There can be multiple Idle Secondary replicas - #: in a replica set at a time. Idle Secondary replicas do not count as a part of a write quorum. - #: The value is 3. - IDLE_SECONDARY = "IdleSecondary" - #: Refers to a replica in the set that receives state updates from the Primary replica, applies - #: them, and sends acknowledgements back. Secondary replicas must participate in the write quorum - #: for a replica set. There can be multiple active Secondary replicas in a replica set at a time. - #: The number of active Secondary replicas is configurable that the reliability subsystem should - #: maintain. The value is 4. - ACTIVE_SECONDARY = "ActiveSecondary" - #: Refers to a replica in the set that receives a state transfer from the Primary replica to - #: prepare for becoming an ActiveAuxiliary replica. There can be multiple IdleAuxiliary replicas - #: in a replica set at a time. IdleAuxiliary replicas do not count as a part of a write quorum. - #: The value is 5. - IDLE_AUXILIARY = "IdleAuxiliary" - #: Refers to a replica in the set that receives state updates from the Primary replica, applies - #: them, and sends acknowledgements back. ActiveAuxiliary replicas must participate in the write - #: quorum for a replica set. There can be multiple active ActiveAuxiliary replicas in a replica - #: set at a time. The number of active ActiveAuxiliary replicas is configurable that the - #: reliability subsystem should maintain. The value is 6. - ACTIVE_AUXILIARY = "ActiveAuxiliary" - #: Refers to the replica in the set that is used to rebuild a new Secondary replica to relinquish - #: primary status to. It cannot field read or write requests. The value is 7. - PRIMARY_AUXILIARY = "PrimaryAuxiliary" - -class ReplicaStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The status of a replica of a service. - """ - - #: Indicates the replica status is invalid. All Service Fabric enumerations have the invalid type. - #: The value is zero. - INVALID = "Invalid" - #: The replica is being built. This means that a primary replica is seeding this replica. The - #: value is 1. - IN_BUILD = "InBuild" - #: The replica is in standby. The value is 2. - STANDBY = "Standby" - #: The replica is ready. The value is 3. - READY = "Ready" - #: The replica is down. The value is 4. - DOWN = "Down" - #: Replica is dropped. This means that the replica has been removed from the replica set. If it is - #: persisted, its state has been deleted. The value is 5. - DROPPED = "Dropped" - -class ReplicatorOperationName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the operation currently being executed by the Replicator. - """ - - #: Default value if the replicator is not yet ready. - INVALID = "Invalid" - #: Replicator is not running any operation from Service Fabric perspective. - NONE = "None" - #: Replicator is opening. - OPEN = "Open" - #: Replicator is in the process of changing its role. - CHANGE_ROLE = "ChangeRole" - #: Due to a change in the replica set, replicator is being updated with its Epoch. - UPDATE_EPOCH = "UpdateEpoch" - #: Replicator is closing. - CLOSE = "Close" - #: Replicator is being aborted. - ABORT = "Abort" - #: Replicator is handling the data loss condition, where the user service may potentially be - #: recovering state from an external source. - ON_DATA_LOSS = "OnDataLoss" - #: Replicator is waiting for a quorum of replicas to be caught up to the latest state. - WAIT_FOR_CATCHUP = "WaitForCatchup" - #: Replicator is in the process of building one or more replicas. - BUILD = "Build" - -class ResourceStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Status of the resource. - """ - - #: Indicates the resource status is unknown. The value is zero. - UNKNOWN = "Unknown" - #: Indicates the resource is ready. The value is 1. - READY = "Ready" - #: Indicates the resource is upgrading. The value is 2. - UPGRADING = "Upgrading" - #: Indicates the resource is being created. The value is 3. - CREATING = "Creating" - #: Indicates the resource is being deleted. The value is 4. - DELETING = "Deleting" - #: Indicates the resource is not functional due to persistent failures. See statusDetails property - #: for more details. The value is 5. - FAILED = "Failed" - -class RestartPartitionMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - - #: Reserved. Do not pass into API. - INVALID = "Invalid" - #: All replicas or instances in the partition are restarted at once. - ALL_REPLICAS_OR_INSTANCES = "AllReplicasOrInstances" - #: Only the secondary replicas are restarted. - ONLY_ACTIVE_SECONDARIES = "OnlyActiveSecondaries" - -class RestartPolicy(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Enumerates the restart policy for RunToCompletionExecutionPolicy - """ - - #: Service will be restarted when it encounters a failure. - ON_FAILURE = "OnFailure" - #: Service will never be restarted. If the service encounters a failure, it will move to Failed - #: state. - NEVER = "Never" - -class RestoreState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Represents the current state of the partition restore operation. - """ - - #: Indicates an invalid restore state. All Service Fabric enumerations have the invalid type. - INVALID = "Invalid" - #: Operation has been validated and accepted. Restore is yet to be triggered. - ACCEPTED = "Accepted" - #: Restore operation has been triggered and is under process. - RESTORE_IN_PROGRESS = "RestoreInProgress" - #: Operation completed with success. - SUCCESS = "Success" - #: Operation completed with failure. - FAILURE = "Failure" - #: Operation timed out. - TIMEOUT = "Timeout" - -class ResultStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """A value describing the overall result of the repair task execution. Must be specified in the - Restoring and later states, and is immutable once set. - """ - - #: Indicates that the repair task result is invalid. All Service Fabric enumerations have the - #: invalid value. - INVALID = "Invalid" - #: Indicates that the repair task completed execution successfully. - SUCCEEDED = "Succeeded" - #: Indicates that the repair task was cancelled prior to execution. - CANCELLED = "Cancelled" - #: Indicates that execution of the repair task was interrupted by a cancellation request after - #: some work had already been performed. - INTERRUPTED = "Interrupted" - #: Indicates that there was a failure during execution of the repair task. Some work may have been - #: performed. - FAILED = "Failed" - #: Indicates that the repair task result is not yet available, because the repair task has not - #: finished executing. - PENDING = "Pending" - -class RetentionPolicyType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The type of retention policy. Currently only "Basic" retention policy is supported. - """ - - #: Indicates a basic retention policy type. - BASIC = "Basic" - #: Indicates an invalid retention policy type. - INVALID = "Invalid" - -class RollingUpgradeMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, - UnmonitoredManual, and Monitored. - """ - - #: Indicates the upgrade mode is invalid. All Service Fabric enumerations have the invalid type. - #: The value is zero. - INVALID = "Invalid" - #: The upgrade will proceed automatically without performing any health monitoring. The value is - #: 1. - UNMONITORED_AUTO = "UnmonitoredAuto" - #: The upgrade will stop after completing each upgrade domain, giving the opportunity to manually - #: monitor health before proceeding. The value is 2. - UNMONITORED_MANUAL = "UnmonitoredManual" - #: The upgrade will stop after completing each upgrade domain and automatically monitor health - #: before proceeding. The value is 3. - MONITORED = "Monitored" - -class SafetyCheckKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The kind of safety check performed by service fabric before continuing with the operations. - These checks ensure the availability of the service and the reliability of the state. Following - are the kinds of safety checks. - """ - - #: Indicates that the upgrade safety check kind is invalid. All Service Fabric enumerations have - #: the invalid type. The value is zero. - INVALID = "Invalid" - #: Indicates that if we bring down the node then this will result in global seed node quorum loss. - #: The value is 1. - ENSURE_SEED_NODE_QUORUM = "EnsureSeedNodeQuorum" - #: Indicates that there is some partition for which if we bring down the replica on the node, it - #: will result in quorum loss for that partition. The value is 2. - ENSURE_PARTITION_QUORUM = "EnsurePartitionQuorum" - #: Indicates that there is some replica on the node that was moved out of this node due to - #: upgrade. Service Fabric is now waiting for the primary to be moved back to this node. The value - #: is 3. - WAIT_FOR_PRIMARY_PLACEMENT = "WaitForPrimaryPlacement" - #: Indicates that Service Fabric is waiting for a primary replica to be moved out of the node - #: before starting upgrade on that node. The value is 4. - WAIT_FOR_PRIMARY_SWAP = "WaitForPrimarySwap" - #: Indicates that there is some replica on the node that is involved in a reconfiguration. Service - #: Fabric is waiting for the reconfiguration to be complete before staring upgrade on that node. - #: The value is 5. - WAIT_FOR_RECONFIGURATION = "WaitForReconfiguration" - #: Indicates that there is either a replica on the node that is going through copy, or there is a - #: primary replica on the node that is copying data to some other replica. In both cases, bringing - #: down the replica on the node due to upgrade will abort the copy. The value is 6. - WAIT_FOR_INBUILD_REPLICA = "WaitForInbuildReplica" - #: Indicates that there is either a stateless service partition on the node having exactly one - #: instance, or there is a primary replica on the node for which the partition is quorum loss. In - #: both cases, bringing down the replicas due to upgrade will result in loss of availability. The - #: value is 7. - ENSURE_AVAILABILITY = "EnsureAvailability" - -class ScalingMechanismKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Enumerates the ways that a service can be scaled. - """ - - #: Indicates the scaling mechanism is invalid. All Service Fabric enumerations have the invalid - #: type. The value is zero. - INVALID = "Invalid" - #: Indicates a mechanism for scaling where new instances are added or removed from a partition. - #: The value is 1. - PARTITION_INSTANCE_COUNT = "PartitionInstanceCount" - #: Indicates a mechanism for scaling where new named partitions are added or removed from a - #: service. The value is 2. - ADD_REMOVE_INCREMENTAL_NAMED_PARTITION = "AddRemoveIncrementalNamedPartition" - -class ScalingTriggerKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Enumerates the ways that a service can be scaled. - """ - - #: Indicates the scaling trigger is invalid. All Service Fabric enumerations have the invalid - #: type. The value is zero. - INVALID = "Invalid" - #: Indicates a trigger where scaling decisions are made based on average load of a partition. The - #: value is 1. - AVERAGE_PARTITION_LOAD = "AveragePartitionLoad" - #: Indicates a trigger where scaling decisions are made based on average load of a service. The - #: value is 2. - AVERAGE_SERVICE_LOAD = "AverageServiceLoad" - -class Scheme(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Scheme for the http probe. Can be Http or Https. - """ - - #: Indicates that the probe is http. - HTTP = "http" - #: Indicates that the probe is https. No cert validation. - HTTPS = "https" - -class SecretKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Describes the kind of secret. - """ - - #: A simple secret resource whose plaintext value is provided by the user. - INLINED_VALUE = "inlinedValue" - #: A secret resource that references a specific version of a secret stored in Azure Key Vault; the - #: expected value is a versioned KeyVault URI corresponding to the version of the secret being - #: referenced. - KEY_VAULT_VERSIONED_REFERENCE = "keyVaultVersionedReference" - -class ServiceCorrelationScheme(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The service correlation scheme. - """ - - #: An invalid correlation scheme. Cannot be used. The value is zero. - INVALID = "Invalid" - #: Indicates that this service has an affinity relationship with another service. Provided for - #: backwards compatibility, consider preferring the Aligned or NonAlignedAffinity options. The - #: value is 1. - AFFINITY = "Affinity" - #: Aligned affinity ensures that the primaries of the partitions of the affinitized services are - #: collocated on the same nodes. This is the default and is the same as selecting the Affinity - #: scheme. The value is 2. - ALIGNED_AFFINITY = "AlignedAffinity" - #: Non-Aligned affinity guarantees that all replicas of each service will be placed on the same - #: nodes. Unlike Aligned Affinity, this does not guarantee that replicas of particular role will - #: be collocated. The value is 3. - NON_ALIGNED_AFFINITY = "NonAlignedAffinity" - -class ServiceEndpointRole(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The role of the replica where the endpoint is reported. - """ - - #: Indicates the service endpoint role is invalid. All Service Fabric enumerations have the - #: invalid type. The value is zero. - INVALID = "Invalid" - #: Indicates that the service endpoint is of a stateless service. The value is 1. - STATELESS = "Stateless" - #: Indicates that the service endpoint is of a primary replica of a stateful service. The value is - #: 2. - STATEFUL_PRIMARY = "StatefulPrimary" - #: Indicates that the service endpoint is of a secondary replica of a stateful service. The value - #: is 3. - STATEFUL_SECONDARY = "StatefulSecondary" - -class ServiceHostUpgradeImpact(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The expected impact of the upgrade. - """ - - #: Indicates the upgrade impact is invalid. All Service Fabric enumerations have the invalid type. - #: The value is zero. - INVALID = "Invalid" - #: The upgrade is not expected to cause service host restarts. The value is 1. - NONE = "None" - #: The upgrade is expected to cause a service host restart. The value is 2. - SERVICE_HOST_RESTART = "ServiceHostRestart" - #: The upgrade will cause an unexpected service host restart. This indicates a bug in the Service - #: Fabric runtime and proceeding with an upgrade with this impact may lead to skipped safety - #: checks. Running the upgrade with the ForceRestart flag will force proper safety checks. The - #: value is 3. - UNEXPECTED_SERVICE_HOST_RESTART = "UnexpectedServiceHostRestart" - -class ServiceKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The kind of service (Stateless or Stateful). - """ - - #: Indicates the service kind is invalid. All Service Fabric enumerations have the invalid type. - #: The value is zero. - INVALID = "Invalid" - #: Does not use Service Fabric to make its state highly available or reliable. The value is 1. - STATELESS = "Stateless" - #: Uses Service Fabric to make its state or part of its state highly available and reliable. The - #: value is 2. - STATEFUL = "Stateful" - -class ServiceLoadMetricWeight(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Determines the metric weight relative to the other metrics that are configured for this - service. During runtime, if two metrics end up in conflict, the Cluster Resource Manager - prefers the metric with the higher weight. - """ - - #: Disables resource balancing for this metric. This value is zero. - ZERO = "Zero" - #: Specifies the metric weight of the service load as Low. The value is 1. - LOW = "Low" - #: Specifies the metric weight of the service load as Medium. The value is 2. - MEDIUM = "Medium" - #: Specifies the metric weight of the service load as High. The value is 3. - HIGH = "High" - -class ServiceOperationName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Specifies the current active life-cycle operation on a stateful service replica or stateless - service instance. - """ - - #: Reserved for future use. - UNKNOWN = "Unknown" - #: The service replica or instance is not going through any life-cycle changes. - NONE = "None" - #: The service replica or instance is being opened. - OPEN = "Open" - #: The service replica is changing roles. - CHANGE_ROLE = "ChangeRole" - #: The service replica or instance is being closed. - CLOSE = "Close" - #: The service replica or instance is being aborted. - ABORT = "Abort" - -class ServicePackageActivationMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The activation mode of service package to be used for a Service Fabric service. This is - specified at the time of creating the Service. - """ - - #: This is the default activation mode. With this activation mode, replicas or instances from - #: different partition(s) of service, on a given node, will share same activation of service - #: package on a node. The value is zero. - SHARED_PROCESS = "SharedProcess" - #: With this activation mode, each replica or instance of service, on a given node, will have its - #: own dedicated activation of service package on a node. The value is 1. - EXCLUSIVE_PROCESS = "ExclusiveProcess" - -class ServicePartitionKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The kind of partitioning scheme used to partition the service. - """ - - #: Indicates the partition kind is invalid. All Service Fabric enumerations have the invalid type. - #: The value is zero. - INVALID = "Invalid" - #: Indicates that there is only one partition, and SingletonPartitionSchemeDescription was - #: specified while creating the service. The value is 1. - SINGLETON = "Singleton" - #: Indicates that the partition is based on Int64 key ranges, and - #: UniformInt64RangePartitionSchemeDescription was specified while creating the service. The value - #: is 2. - INT64_RANGE = "Int64Range" - #: Indicates that the partition is based on string names, and NamedPartitionInformation was - #: specified while creating the service. The value is 3. - NAMED = "Named" - -class ServicePartitionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The status of the service fabric service partition. - """ - - #: Indicates the partition status is invalid. All Service Fabric enumerations have the invalid - #: type. The value is zero. - INVALID = "Invalid" - #: Indicates that the partition is ready. This means that for a stateless service partition there - #: is at least one instance that is up and for a stateful service partition the number of ready - #: replicas is greater than or equal to the MinReplicaSetSize. The value is 1. - READY = "Ready" - #: Indicates that the partition is not ready. This status is returned when none of the other - #: states apply. The value is 2. - NOT_READY = "NotReady" - #: Indicates that the partition is in quorum loss. This means that number of replicas that are up - #: and participating in a replica set is less than MinReplicaSetSize for this partition. The value - #: is 3. - IN_QUORUM_LOSS = "InQuorumLoss" - #: Indicates that the partition is undergoing reconfiguration of its replica sets. This can happen - #: due to failover, upgrade, load balancing or addition or removal of replicas from the replica - #: set. The value is 4. - RECONFIGURING = "Reconfiguring" - #: Indicates that the partition is being deleted. The value is 5. - DELETING = "Deleting" - -class ServicePlacementPolicyType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The type of placement policy for a service fabric service. Following are the possible values. - """ - - #: Indicates the type of the placement policy is invalid. All Service Fabric enumerations have the - #: invalid type. The value is zero. - INVALID = "Invalid" - #: Indicates that the ServicePlacementPolicyDescription is of type - #: ServicePlacementInvalidDomainPolicyDescription, which indicates that a particular fault or - #: upgrade domain cannot be used for placement of this service. The value is 1. - INVALID_DOMAIN = "InvalidDomain" - #: Indicates that the ServicePlacementPolicyDescription is of type - #: ServicePlacementRequireDomainDistributionPolicyDescription indicating that the replicas of the - #: service must be placed in a specific domain. The value is 2. - REQUIRE_DOMAIN = "RequireDomain" - #: Indicates that the ServicePlacementPolicyDescription is of type - #: ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the - #: Primary replica for the partitions of the service should be located in a particular domain as - #: an optimization. The value is 3. - PREFER_PRIMARY_DOMAIN = "PreferPrimaryDomain" - #: Indicates that the ServicePlacementPolicyDescription is of type - #: ServicePlacementRequireDomainDistributionPolicyDescription, indicating that the system will - #: disallow placement of any two replicas from the same partition in the same domain at any time. - #: The value is 4. - REQUIRE_DOMAIN_DISTRIBUTION = "RequireDomainDistribution" - #: Indicates that the ServicePlacementPolicyDescription is of type - #: ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible all - #: replicas of a particular partition of the service should be placed atomically. The value is 5. - NON_PARTIALLY_PLACE_SERVICE = "NonPartiallyPlaceService" - #: Indicates that the ServicePlacementPolicyDescription is of type - #: ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, which indicates that - #: multiple stateless instances of a particular partition of the service can be placed on a node. - #: The value is 6. - ALLOW_MULTIPLE_STATELESS_INSTANCES_ON_NODE = "AllowMultipleStatelessInstancesOnNode" - -class ServiceStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The status of the application. - """ - - #: Indicates the service status is unknown. The value is zero. - UNKNOWN = "Unknown" - #: Indicates the service status is active. The value is 1. - ACTIVE = "Active" - #: Indicates the service is upgrading. The value is 2. - UPGRADING = "Upgrading" - #: Indicates the service is being deleted. The value is 3. - DELETING = "Deleting" - #: Indicates the service is being created. The value is 4. - CREATING = "Creating" - #: Indicates creation or deletion was terminated due to persistent failures. Another create/delete - #: request can be accepted. The value is 5. - FAILED = "Failed" - -class ServiceTypeRegistrationStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The status of the service type registration on the node. - """ - - #: Indicates the registration status is invalid. All Service Fabric enumerations have the invalid - #: type. The value is zero. - INVALID = "Invalid" - #: Indicates that the service type is disabled on this node. A type gets disabled when there are - #: too many failures of the code package hosting the service type. If the service type is - #: disabled, new replicas of that service type will not be placed on the node until it is enabled - #: again. The service type is enabled again after the process hosting it comes up and re-registers - #: the type or a preconfigured time interval has passed. The value is 1. - DISABLED = "Disabled" - #: Indicates that the service type is enabled on this node. Replicas of this service type can be - #: placed on this node when the code package registers the service type. The value is 2. - ENABLED = "Enabled" - #: Indicates that the service type is enabled and registered on the node by a code package. - #: Replicas of this service type can now be placed on this node. The value is 3. - REGISTERED = "Registered" - -class SettingType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The type of the setting being given in value - """ - - #: The setting in clear text, will not be processed in any way and passed in as is. - CLEAR_TEXT = "ClearText" - #: The URI to a KeyVault secret version, will be resolved using the application's managed identity - #: (this type is only valid if the app was assigned a managed identity) before getting passed in. - KEY_VAULT_REFERENCE = "KeyVaultReference" - #: The reference to a SecretValue resource, will be resolved before getting passed in. - SECRET_VALUE_REFERENCE = "SecretValueReference" - -class SizeTypes(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Volume size - """ - - SMALL = "Small" - MEDIUM = "Medium" - LARGE = "Large" - -class State(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The workflow state of the repair task. Valid initial states are Created, Claimed, and - Preparing. - """ - - #: Indicates that the repair task state is invalid. All Service Fabric enumerations have the - #: invalid value. - INVALID = "Invalid" - #: Indicates that the repair task has been created. - CREATED = "Created" - #: Indicates that the repair task has been claimed by a repair executor. - CLAIMED = "Claimed" - #: Indicates that the Repair Manager is preparing the system to handle the impact of the repair - #: task, usually by taking resources offline gracefully. - PREPARING = "Preparing" - #: Indicates that the repair task has been approved by the Repair Manager and is safe to execute. - APPROVED = "Approved" - #: Indicates that execution of the repair task is in progress. - EXECUTING = "Executing" - #: Indicates that the Repair Manager is restoring the system to its pre-repair state, usually by - #: bringing resources back online. - RESTORING = "Restoring" - #: Indicates that the repair task has completed, and no further state changes will occur. - COMPLETED = "Completed" - -class UpgradeDomainState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The state of the upgrade domain. - """ - - #: Indicates the upgrade domain state is invalid. All Service Fabric enumerations have the invalid - #: type. The value is zero. - INVALID = "Invalid" - #: The upgrade domain has not started upgrading yet. The value is 1. - PENDING = "Pending" - #: The upgrade domain is being upgraded but not complete yet. The value is 2. - IN_PROGRESS = "InProgress" - #: The upgrade domain has completed upgrade. The value is 3. - COMPLETED = "Completed" - -class UpgradeKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The kind of upgrade out of the following possible values. - """ - - #: Indicates the upgrade kind is invalid. All Service Fabric enumerations have the invalid type. - #: The value is zero. - INVALID = "Invalid" - #: The upgrade progresses one upgrade domain at a time. The value is 1. - ROLLING = "Rolling" - -class UpgradeMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, - UnmonitoredManual, Monitored, and UnmonitoredDeferred. - """ - - #: Indicates the upgrade mode is invalid. All Service Fabric enumerations have the invalid type. - #: The value is zero. - INVALID = "Invalid" - #: The upgrade will proceed automatically without performing any health monitoring. The value is - #: 1. - UNMONITORED_AUTO = "UnmonitoredAuto" - #: The upgrade will stop after completing each upgrade domain, giving the opportunity to manually - #: monitor health before proceeding. The value is 2. - UNMONITORED_MANUAL = "UnmonitoredManual" - #: The upgrade will stop after completing each upgrade domain and automatically monitor health - #: before proceeding. The value is 3. - MONITORED = "Monitored" - #: Perform a node-by-node upgrade. No action is performed when upgrade starts; upgrade is applied - #: on each node when it is deactivated with intent restart or higher. The value is 4. - UNMONITORED_DEFERRED = "UnmonitoredDeferred" - -class UpgradeSortOrder(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Defines the order in which an upgrade proceeds through the cluster. - """ - - #: Indicates that this sort order is not valid. All Service Fabric enumerations have the invalid - #: type. The value is 0. - INVALID = "Invalid" - #: Indicates that the default sort order (as specified in cluster manifest) will be used. The - #: value is 1. - DEFAULT = "Default" - #: Indicates that forward numeric sort order (UD names sorted as numbers) will be used. The value - #: is 2. - NUMERIC = "Numeric" - #: Indicates that forward lexicographical sort order (UD names sorted as strings) will be used. - #: The value is 3. - LEXICOGRAPHICAL = "Lexicographical" - #: Indicates that reverse numeric sort order (UD names sorted as numbers) will be used. The value - #: is 4. - REVERSE_NUMERIC = "ReverseNumeric" - #: Indicates that reverse lexicographical sort order (UD names sorted as strings) will be used. - #: The value is 5. - REVERSE_LEXICOGRAPHICAL = "ReverseLexicographical" - -class UpgradeState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The state of the upgrade domain. - """ - - #: Indicates the upgrade state is invalid. All Service Fabric enumerations have the invalid type. - #: The value is zero. - INVALID = "Invalid" - #: The upgrade is rolling back to the previous version but is not complete yet. The value is 1. - ROLLING_BACK_IN_PROGRESS = "RollingBackInProgress" - #: The upgrade has finished rolling back. The value is 2. - ROLLING_BACK_COMPLETED = "RollingBackCompleted" - #: The current upgrade domain has finished upgrading. The overall upgrade is waiting for an - #: explicit move next request in UnmonitoredManual mode or performing health checks in Monitored - #: mode. The value is 3. - ROLLING_FORWARD_PENDING = "RollingForwardPending" - #: The upgrade is rolling forward to the target version but is not complete yet. The value is 4. - ROLLING_FORWARD_IN_PROGRESS = "RollingForwardInProgress" - #: The upgrade has finished rolling forward. The value is 5. - ROLLING_FORWARD_COMPLETED = "RollingForwardCompleted" - #: The upgrade has failed and is unable to execute FailureAction. The value is 6. - FAILED = "Failed" - -class UpgradeType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The type of upgrade out of the following possible values. - """ - - #: Indicates the upgrade kind is invalid. All Service Fabric enumerations have the invalid type. - #: The value is zero. - INVALID = "Invalid" - #: The upgrade progresses one upgrade domain at a time. The value is 1. - ROLLING = "Rolling" - #: The upgrade gets restarted by force. The value is 2. - ROLLING_FORCE_RESTART = "Rolling_ForceRestart" - -class UpgradeUnitState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The state of the upgrade unit. - """ - - #: Indicates the upgrade unit state is invalid. All Service Fabric enumerations have the invalid - #: type. The value is zero. - INVALID = "Invalid" - #: The upgrade unit has not started upgrading yet. The value is 1. - PENDING = "Pending" - #: The upgrade unit is being upgraded but not complete yet. The value is 2. - IN_PROGRESS = "InProgress" - #: The upgrade unit has completed upgrade. The value is 3. - COMPLETED = "Completed" - #: The upgrade unit has failed to upgrade. The value is 4. - FAILED = "Failed" - -class VolumeProvider(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Describes the provider of the volume resource. - """ - - #: Provides volumes that are backed by Azure Files. - SF_AZURE_FILE = "SFAzureFile" diff --git a/customSDK/servicefabric/operations/__init__.py b/customSDK/servicefabric/operations/__init__.py index df6b66c5..645ce759 100644 --- a/customSDK/servicefabric/operations/__init__.py +++ b/customSDK/servicefabric/operations/__init__.py @@ -6,17 +6,20 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._service_fabric_client_apis_operations import ServiceFabricClientAPIsOperationsMixin -from ._mesh_secret_operations import MeshSecretOperations -from ._mesh_secret_value_operations import MeshSecretValueOperations -from ._mesh_volume_operations import MeshVolumeOperations -from ._mesh_network_operations import MeshNetworkOperations -from ._mesh_application_operations import MeshApplicationOperations -from ._mesh_service_operations import MeshServiceOperations -from ._mesh_code_package_operations import MeshCodePackageOperations -from ._mesh_service_replica_operations import MeshServiceReplicaOperations -from ._mesh_gateway_operations import MeshGatewayOperations +from ._operations import ServiceFabricClientAPIsOperationsMixin +from ._operations import MeshSecretOperations +from ._operations import MeshSecretValueOperations +from ._operations import MeshVolumeOperations +from ._operations import MeshNetworkOperations +from ._operations import MeshApplicationOperations +from ._operations import MeshServiceOperations +from ._operations import MeshCodePackageOperations +from ._operations import MeshServiceReplicaOperations +from ._operations import MeshGatewayOperations +from ._patch import __all__ as _patch_all +from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk __all__ = [ 'ServiceFabricClientAPIsOperationsMixin', 'MeshSecretOperations', @@ -29,3 +32,5 @@ 'MeshServiceReplicaOperations', 'MeshGatewayOperations', ] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() \ No newline at end of file diff --git a/customSDK/servicefabric/operations/_mesh_application_operations.py b/customSDK/servicefabric/operations/_mesh_application_operations.py deleted file mode 100644 index 9eb04f3f..00000000 --- a/customSDK/servicefabric/operations/_mesh_application_operations.py +++ /dev/null @@ -1,509 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_create_or_update_request( - application_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}") - path_format_arguments = { - "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - application_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}") - path_format_arguments = { - "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_request( - application_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}") - path_format_arguments = { - "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Applications") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_upgrade_progress_request( - application_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}/$/GetUpgradeProgress") - path_format_arguments = { - "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on -class MeshApplicationOperations(object): - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s - :attr:`mesh_application` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace - def create_or_update( - self, - application_resource_name, # type: str - application_resource_description, # type: "_models.ApplicationResourceDescription" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.ApplicationResourceDescription"] - """Creates or updates a Application resource. - - Creates a Application resource with the specified name, description and properties. If - Application resource with the same name exists, then it is updated with the specified - description and properties. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param application_resource_description: Description for creating a Application resource. - :type application_resource_description: - ~azure.servicefabric.models.ApplicationResourceDescription - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationResourceDescription or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationResourceDescription"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(application_resource_description, 'ApplicationResourceDescription') - - request = build_create_or_update_request( - application_resource_name=application_resource_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApplicationResourceDescription', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ApplicationResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_or_update.metadata = {'url': "/Resources/Applications/{applicationResourceName}"} # type: ignore - - - @distributed_trace - def get( - self, - application_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ApplicationResourceDescription" - """Gets the Application resource with the given name. - - Gets the information about the Application resource with the given name. The information - include the description and other properties of the Application. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationResourceDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationResourceDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_request( - application_resource_name=application_resource_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/Resources/Applications/{applicationResourceName}"} # type: ignore - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - application_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes the Application resource. - - Deletes the Application resource identified by the name. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_request( - application_resource_name=application_resource_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': "/Resources/Applications/{applicationResourceName}"} # type: ignore - - - @distributed_trace - def list( - self, - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedApplicationResourceDescriptionList" - """Lists all the application resources. - - Gets the information about all application resources in a given resource group. The information - include the description and other properties of the Application. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedApplicationResourceDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedApplicationResourceDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedApplicationResourceDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_list_request( - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedApplicationResourceDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - list.metadata = {'url': "/Resources/Applications"} # type: ignore - - - @distributed_trace - def get_upgrade_progress( - self, - application_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ApplicationResourceUpgradeProgressInfo" - """Gets the progress of the latest upgrade performed on this application resource. - - Gets the upgrade progress information about the Application resource with the given name. The - information include percentage of completion and other upgrade state information of the - Application resource. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationResourceUpgradeProgressInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationResourceUpgradeProgressInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationResourceUpgradeProgressInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_upgrade_progress_request( - application_resource_name=application_resource_name, - api_version=api_version, - template_url=self.get_upgrade_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationResourceUpgradeProgressInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_upgrade_progress.metadata = {'url': "/Resources/Applications/{applicationResourceName}/$/GetUpgradeProgress"} # type: ignore - diff --git a/customSDK/servicefabric/operations/_mesh_code_package_operations.py b/customSDK/servicefabric/operations/_mesh_code_package_operations.py deleted file mode 100644 index 4b627c26..00000000 --- a/customSDK/servicefabric/operations/_mesh_code_package_operations.py +++ /dev/null @@ -1,167 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_get_container_logs_request( - application_resource_name, # type: str - service_resource_name, # type: str - replica_name, # type: str - code_package_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - tail = kwargs.pop('tail', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}/CodePackages/{codePackageName}/Logs") # pylint: disable=line-too-long - path_format_arguments = { - "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - "serviceResourceName": _SERIALIZER.url("service_resource_name", service_resource_name, 'str', skip_quote=True), - "replicaName": _SERIALIZER.url("replica_name", replica_name, 'str', skip_quote=True), - "codePackageName": _SERIALIZER.url("code_package_name", code_package_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if tail is not None: - _query_parameters['Tail'] = _SERIALIZER.query("tail", tail, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on -class MeshCodePackageOperations(object): - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s - :attr:`mesh_code_package` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace - def get_container_logs( - self, - application_resource_name, # type: str - service_resource_name, # type: str - replica_name, # type: str - code_package_name, # type: str - tail=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.ContainerLogs" - """Gets the logs from the container. - - Gets the logs for the container of the specified code package of the service replica. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :param replica_name: Service Fabric replica name. - :type replica_name: str - :param code_package_name: The name of code package of the service. - :type code_package_name: str - :param tail: Number of lines to show from the end of the logs. Default is 100. 'all' to show - the complete logs. - :type tail: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ContainerLogs, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ContainerLogs - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerLogs"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_container_logs_request( - application_resource_name=application_resource_name, - service_resource_name=service_resource_name, - replica_name=replica_name, - code_package_name=code_package_name, - api_version=api_version, - tail=tail, - template_url=self.get_container_logs.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ContainerLogs', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_container_logs.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}/CodePackages/{codePackageName}/Logs"} # type: ignore - diff --git a/customSDK/servicefabric/operations/_mesh_gateway_operations.py b/customSDK/servicefabric/operations/_mesh_gateway_operations.py deleted file mode 100644 index c94b2b81..00000000 --- a/customSDK/servicefabric/operations/_mesh_gateway_operations.py +++ /dev/null @@ -1,416 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_create_or_update_request( - gateway_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Gateways/{gatewayResourceName}") - path_format_arguments = { - "gatewayResourceName": _SERIALIZER.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - gateway_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Gateways/{gatewayResourceName}") - path_format_arguments = { - "gatewayResourceName": _SERIALIZER.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_request( - gateway_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Gateways/{gatewayResourceName}") - path_format_arguments = { - "gatewayResourceName": _SERIALIZER.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Gateways") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on -class MeshGatewayOperations(object): - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s - :attr:`mesh_gateway` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace - def create_or_update( - self, - gateway_resource_name, # type: str - gateway_resource_description, # type: "_models.GatewayResourceDescription" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.GatewayResourceDescription"] - """Creates or updates a Gateway resource. - - Creates a Gateway resource with the specified name, description and properties. If Gateway - resource with the same name exists, then it is updated with the specified description and - properties. Use Gateway resource to provide public connectivity to application services. - - :param gateway_resource_name: The identity of the gateway. - :type gateway_resource_name: str - :param gateway_resource_description: Description for creating a Gateway resource. - :type gateway_resource_description: ~azure.servicefabric.models.GatewayResourceDescription - :keyword callable cls: A custom type or function that will be passed the direct response - :return: GatewayResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.GatewayResourceDescription or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GatewayResourceDescription"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(gateway_resource_description, 'GatewayResourceDescription') - - request = build_create_or_update_request( - gateway_resource_name=gateway_resource_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('GatewayResourceDescription', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('GatewayResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_or_update.metadata = {'url': "/Resources/Gateways/{gatewayResourceName}"} # type: ignore - - - @distributed_trace - def get( - self, - gateway_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.GatewayResourceDescription" - """Gets the Gateway resource with the given name. - - Gets the information about the Gateway resource with the given name. The information include - the description and other properties of the Gateway. - - :param gateway_resource_name: The identity of the gateway. - :type gateway_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: GatewayResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.GatewayResourceDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.GatewayResourceDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_request( - gateway_resource_name=gateway_resource_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('GatewayResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/Resources/Gateways/{gatewayResourceName}"} # type: ignore - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - gateway_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes the Gateway resource. - - Deletes the Gateway resource identified by the name. - - :param gateway_resource_name: The identity of the gateway. - :type gateway_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_request( - gateway_resource_name=gateway_resource_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': "/Resources/Gateways/{gatewayResourceName}"} # type: ignore - - - @distributed_trace - def list( - self, - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedGatewayResourceDescriptionList" - """Lists all the gateway resources. - - Gets the information about all gateway resources in a given resource group. The information - include the description and other properties of the Gateway. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedGatewayResourceDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedGatewayResourceDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedGatewayResourceDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_list_request( - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedGatewayResourceDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - list.metadata = {'url': "/Resources/Gateways"} # type: ignore - diff --git a/customSDK/servicefabric/operations/_mesh_network_operations.py b/customSDK/servicefabric/operations/_mesh_network_operations.py deleted file mode 100644 index 37d122f2..00000000 --- a/customSDK/servicefabric/operations/_mesh_network_operations.py +++ /dev/null @@ -1,420 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_create_or_update_request( - network_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Networks/{networkResourceName}") - path_format_arguments = { - "networkResourceName": _SERIALIZER.url("network_resource_name", network_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - network_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Networks/{networkResourceName}") - path_format_arguments = { - "networkResourceName": _SERIALIZER.url("network_resource_name", network_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_request( - network_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Networks/{networkResourceName}") - path_format_arguments = { - "networkResourceName": _SERIALIZER.url("network_resource_name", network_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Networks") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on -class MeshNetworkOperations(object): - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s - :attr:`mesh_network` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace - def create_or_update( - self, - network_resource_name, # type: str - name, # type: str - properties, # type: "_models.NetworkResourceProperties" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.NetworkResourceDescription"] - """Creates or updates a Network resource. - - Creates a Network resource with the specified name, description and properties. If Network - resource with the same name exists, then it is updated with the specified description and - properties. Network resource provides connectivity between application services. - - :param network_resource_name: The identity of the network. - :type network_resource_name: str - :param name: Name of the Network resource. - :type name: str - :param properties: Describes properties of a network resource. - :type properties: ~azure.servicefabric.models.NetworkResourceProperties - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.NetworkResourceDescription or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NetworkResourceDescription"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _network_resource_description = _models.NetworkResourceDescription(name=name, properties=properties) - _json = self._serialize.body(_network_resource_description, 'NetworkResourceDescription') - - request = build_create_or_update_request( - network_resource_name=network_resource_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NetworkResourceDescription', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('NetworkResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_or_update.metadata = {'url': "/Resources/Networks/{networkResourceName}"} # type: ignore - - - @distributed_trace - def get( - self, - network_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.NetworkResourceDescription" - """Gets the Network resource with the given name. - - Gets the information about the Network resource with the given name. The information include - the description and other properties of the Network. - - :param network_resource_name: The identity of the network. - :type network_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.NetworkResourceDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkResourceDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_request( - network_resource_name=network_resource_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/Resources/Networks/{networkResourceName}"} # type: ignore - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - network_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes the Network resource. - - Deletes the Network resource identified by the name. - - :param network_resource_name: The identity of the network. - :type network_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_request( - network_resource_name=network_resource_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': "/Resources/Networks/{networkResourceName}"} # type: ignore - - - @distributed_trace - def list( - self, - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedNetworkResourceDescriptionList" - """Lists all the network resources. - - Gets the information about all network resources in a given resource group. The information - include the description and other properties of the Network. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedNetworkResourceDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedNetworkResourceDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedNetworkResourceDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_list_request( - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedNetworkResourceDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - list.metadata = {'url': "/Resources/Networks"} # type: ignore - diff --git a/customSDK/servicefabric/operations/_mesh_secret_operations.py b/customSDK/servicefabric/operations/_mesh_secret_operations.py deleted file mode 100644 index a6bc6d92..00000000 --- a/customSDK/servicefabric/operations/_mesh_secret_operations.py +++ /dev/null @@ -1,420 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_create_or_update_request( - secret_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Secrets/{secretResourceName}") - path_format_arguments = { - "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - secret_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Secrets/{secretResourceName}") - path_format_arguments = { - "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_request( - secret_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Secrets/{secretResourceName}") - path_format_arguments = { - "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Secrets") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on -class MeshSecretOperations(object): - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s - :attr:`mesh_secret` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace - def create_or_update( - self, - secret_resource_name, # type: str - properties, # type: "_models.SecretResourceProperties" - name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.SecretResourceDescription"] - """Creates or updates a Secret resource. - - Creates a Secret resource with the specified name, description and properties. If Secret - resource with the same name exists, then it is updated with the specified description and - properties. Once created, the kind and contentType of a secret resource cannot be updated. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param properties: Describes the properties of a secret resource. - :type properties: ~azure.servicefabric.models.SecretResourceProperties - :param name: Name of the Secret resource. - :type name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecretResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.SecretResourceDescription or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SecretResourceDescription"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _secret_resource_description = _models.SecretResourceDescription(properties=properties, name=name) - _json = self._serialize.body(_secret_resource_description, 'SecretResourceDescription') - - request = build_create_or_update_request( - secret_resource_name=secret_resource_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SecretResourceDescription', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('SecretResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_or_update.metadata = {'url': "/Resources/Secrets/{secretResourceName}"} # type: ignore - - - @distributed_trace - def get( - self, - secret_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.SecretResourceDescription" - """Gets the Secret resource with the given name. - - Gets the information about the Secret resource with the given name. The information include the - description and other properties of the Secret. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecretResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.SecretResourceDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretResourceDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_request( - secret_resource_name=secret_resource_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SecretResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/Resources/Secrets/{secretResourceName}"} # type: ignore - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - secret_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes the Secret resource. - - Deletes the specified Secret resource and all of its named values. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_request( - secret_resource_name=secret_resource_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': "/Resources/Secrets/{secretResourceName}"} # type: ignore - - - @distributed_trace - def list( - self, - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedSecretResourceDescriptionList" - """Lists all the secret resources. - - Gets the information about all secret resources in a given resource group. The information - include the description and other properties of the Secret. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedSecretResourceDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedSecretResourceDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedSecretResourceDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_list_request( - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedSecretResourceDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - list.metadata = {'url': "/Resources/Secrets"} # type: ignore - diff --git a/customSDK/servicefabric/operations/_mesh_secret_value_operations.py b/customSDK/servicefabric/operations/_mesh_secret_value_operations.py deleted file mode 100644 index d8a7ee77..00000000 --- a/customSDK/servicefabric/operations/_mesh_secret_value_operations.py +++ /dev/null @@ -1,549 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_add_value_request( - secret_resource_name, # type: str - secret_value_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}") - path_format_arguments = { - "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - "secretValueResourceName": _SERIALIZER.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - secret_resource_name, # type: str - secret_value_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}") - path_format_arguments = { - "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - "secretValueResourceName": _SERIALIZER.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_request( - secret_resource_name, # type: str - secret_value_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}") - path_format_arguments = { - "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - "secretValueResourceName": _SERIALIZER.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_request( - secret_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Secrets/{secretResourceName}/values") - path_format_arguments = { - "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_show_request( - secret_resource_name, # type: str - secret_value_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}/list_value") - path_format_arguments = { - "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), - "secretValueResourceName": _SERIALIZER.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on -class MeshSecretValueOperations(object): - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s - :attr:`mesh_secret_value` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace - def add_value( - self, - secret_resource_name, # type: str - secret_value_resource_name, # type: str - name, # type: str - value=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.SecretValueResourceDescription"] - """Adds the specified value as a new version of the specified secret resource. - - Creates a new value of the specified secret resource. The name of the value is typically the - version identifier. Once created the value cannot be changed. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource value which is typically the - version identifier for the value. - :type secret_value_resource_name: str - :param name: Version identifier of the secret value. - :type name: str - :param value: The actual value of the secret. Default value is None. - :type value: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecretValueResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.SecretValueResourceDescription or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SecretValueResourceDescription"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _secret_value_resource_description = _models.SecretValueResourceDescription(name=name, value=value) - _json = self._serialize.body(_secret_value_resource_description, 'SecretValueResourceDescription') - - request = build_add_value_request( - secret_resource_name=secret_resource_name, - secret_value_resource_name=secret_value_resource_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.add_value.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SecretValueResourceDescription', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('SecretValueResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - add_value.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}"} # type: ignore - - - @distributed_trace - def get( - self, - secret_resource_name, # type: str - secret_value_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.SecretValueResourceDescription" - """Gets the specified secret value resource. - - Get the information about the specified named secret value resources. The information does not - include the actual value of the secret. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource value which is typically the - version identifier for the value. - :type secret_value_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecretValueResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.SecretValueResourceDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretValueResourceDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_request( - secret_resource_name=secret_resource_name, - secret_value_resource_name=secret_value_resource_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SecretValueResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}"} # type: ignore - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - secret_resource_name, # type: str - secret_value_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes the specified value of the named secret resource. - - Deletes the secret value resource identified by the name. The name of the resource is typically - the version associated with that value. Deletion will fail if the specified value is in use. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource value which is typically the - version identifier for the value. - :type secret_value_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_request( - secret_resource_name=secret_resource_name, - secret_value_resource_name=secret_value_resource_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}"} # type: ignore - - - @distributed_trace - def list( - self, - secret_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedSecretValueResourceDescriptionList" - """List names of all values of the specified secret resource. - - Gets information about all secret value resources of the specified secret resource. The - information includes the names of the secret value resources, but not the actual values. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedSecretValueResourceDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedSecretValueResourceDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedSecretValueResourceDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_list_request( - secret_resource_name=secret_resource_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedSecretValueResourceDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - list.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values"} # type: ignore - - - @distributed_trace - def show( - self, - secret_resource_name, # type: str - secret_value_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.SecretValue" - """Lists the specified value of the secret resource. - - Lists the decrypted value of the specified named value of the secret resource. This is a - privileged operation. - - :param secret_resource_name: The name of the secret resource. - :type secret_resource_name: str - :param secret_value_resource_name: The name of the secret resource value which is typically the - version identifier for the value. - :type secret_value_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecretValue, or the result of cls(response) - :rtype: ~azure.servicefabric.models.SecretValue - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretValue"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_show_request( - secret_resource_name=secret_resource_name, - secret_value_resource_name=secret_value_resource_name, - api_version=api_version, - template_url=self.show.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SecretValue', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - show.metadata = {'url': "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}/list_value"} # type: ignore - diff --git a/customSDK/servicefabric/operations/_mesh_service_operations.py b/customSDK/servicefabric/operations/_mesh_service_operations.py deleted file mode 100644 index 6beff73e..00000000 --- a/customSDK/servicefabric/operations/_mesh_service_operations.py +++ /dev/null @@ -1,239 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_get_request( - application_resource_name, # type: str - service_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}") - path_format_arguments = { - "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - "serviceResourceName": _SERIALIZER.url("service_resource_name", service_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_request( - application_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}/Services") - path_format_arguments = { - "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on -class MeshServiceOperations(object): - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s - :attr:`mesh_service` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace - def get( - self, - application_resource_name, # type: str - service_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ServiceResourceDescription" - """Gets the Service resource with the given name. - - Gets the information about the Service resource with the given name. The information include - the description and other properties of the Service. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceResourceDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceResourceDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_request( - application_resource_name=application_resource_name, - service_resource_name=service_resource_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ServiceResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}"} # type: ignore - - - @distributed_trace - def list( - self, - application_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedServiceResourceDescriptionList" - """Lists all the service resources. - - Gets the information about all services of an application resource. The information include the - description and other properties of the Service. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedServiceResourceDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedServiceResourceDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedServiceResourceDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_list_request( - application_resource_name=application_resource_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedServiceResourceDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - list.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services"} # type: ignore - diff --git a/customSDK/servicefabric/operations/_mesh_service_replica_operations.py b/customSDK/servicefabric/operations/_mesh_service_replica_operations.py deleted file mode 100644 index 81c733f7..00000000 --- a/customSDK/servicefabric/operations/_mesh_service_replica_operations.py +++ /dev/null @@ -1,251 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_get_request( - application_resource_name, # type: str - service_resource_name, # type: str - replica_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}") # pylint: disable=line-too-long - path_format_arguments = { - "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - "serviceResourceName": _SERIALIZER.url("service_resource_name", service_resource_name, 'str', skip_quote=True), - "replicaName": _SERIALIZER.url("replica_name", replica_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_request( - application_resource_name, # type: str - service_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas") # pylint: disable=line-too-long - path_format_arguments = { - "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), - "serviceResourceName": _SERIALIZER.url("service_resource_name", service_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on -class MeshServiceReplicaOperations(object): - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s - :attr:`mesh_service_replica` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace - def get( - self, - application_resource_name, # type: str - service_resource_name, # type: str - replica_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ServiceReplicaDescription" - """Gets the given replica of the service of an application. - - Gets the information about the service replica with the given name. The information include the - description and other properties of the service replica. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :param replica_name: Service Fabric replica name. - :type replica_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceReplicaDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceReplicaDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceReplicaDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_request( - application_resource_name=application_resource_name, - service_resource_name=service_resource_name, - replica_name=replica_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ServiceReplicaDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}"} # type: ignore - - - @distributed_trace - def list( - self, - application_resource_name, # type: str - service_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedServiceReplicaDescriptionList" - """Lists all the replicas of a service. - - Gets the information about all replicas of a service. The information include the description - and other properties of the service replica. - - :param application_resource_name: The identity of the application. - :type application_resource_name: str - :param service_resource_name: The identity of the service. - :type service_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedServiceReplicaDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedServiceReplicaDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedServiceReplicaDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_list_request( - application_resource_name=application_resource_name, - service_resource_name=service_resource_name, - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedServiceReplicaDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - list.metadata = {'url': "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas"} # type: ignore - diff --git a/customSDK/servicefabric/operations/_mesh_volume_operations.py b/customSDK/servicefabric/operations/_mesh_volume_operations.py deleted file mode 100644 index fd975662..00000000 --- a/customSDK/servicefabric/operations/_mesh_volume_operations.py +++ /dev/null @@ -1,416 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_create_or_update_request( - volume_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Volumes/{volumeResourceName}") - path_format_arguments = { - "volumeResourceName": _SERIALIZER.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - volume_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Volumes/{volumeResourceName}") - path_format_arguments = { - "volumeResourceName": _SERIALIZER.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_request( - volume_resource_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Volumes/{volumeResourceName}") - path_format_arguments = { - "volumeResourceName": _SERIALIZER.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Resources/Volumes") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on -class MeshVolumeOperations(object): - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s - :attr:`mesh_volume` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - args = list(args) - self._client = args.pop(0) if args else kwargs.pop("client") - self._config = args.pop(0) if args else kwargs.pop("config") - self._serialize = args.pop(0) if args else kwargs.pop("serializer") - self._deserialize = args.pop(0) if args else kwargs.pop("deserializer") - - - @distributed_trace - def create_or_update( - self, - volume_resource_name, # type: str - volume_resource_description, # type: "_models.VolumeResourceDescription" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.VolumeResourceDescription"] - """Creates or updates a Volume resource. - - Creates a Volume resource with the specified name, description and properties. If Volume - resource with the same name exists, then it is updated with the specified description and - properties. - - :param volume_resource_name: The identity of the volume. - :type volume_resource_name: str - :param volume_resource_description: Description for creating a Volume resource. - :type volume_resource_description: ~azure.servicefabric.models.VolumeResourceDescription - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VolumeResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.VolumeResourceDescription or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VolumeResourceDescription"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(volume_resource_description, 'VolumeResourceDescription') - - request = build_create_or_update_request( - volume_resource_name=volume_resource_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VolumeResourceDescription', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('VolumeResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_or_update.metadata = {'url': "/Resources/Volumes/{volumeResourceName}"} # type: ignore - - - @distributed_trace - def get( - self, - volume_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.VolumeResourceDescription" - """Gets the Volume resource with the given name. - - Gets the information about the Volume resource with the given name. The information include the - description and other properties of the Volume. - - :param volume_resource_name: The identity of the volume. - :type volume_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VolumeResourceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.VolumeResourceDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VolumeResourceDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_request( - volume_resource_name=volume_resource_name, - api_version=api_version, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('VolumeResourceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/Resources/Volumes/{volumeResourceName}"} # type: ignore - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - volume_resource_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes the Volume resource. - - Deletes the Volume resource identified by the name. - - :param volume_resource_name: The identity of the volume. - :type volume_resource_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_request( - volume_resource_name=volume_resource_name, - api_version=api_version, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': "/Resources/Volumes/{volumeResourceName}"} # type: ignore - - - @distributed_trace - def list( - self, - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedVolumeResourceDescriptionList" - """Lists all the volume resources. - - Gets the information about all volume resources in a given resource group. The information - include the description and other properties of the Volume. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedVolumeResourceDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedVolumeResourceDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedVolumeResourceDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_list_request( - api_version=api_version, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedVolumeResourceDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - list.metadata = {'url': "/Resources/Volumes"} # type: ignore - diff --git a/customSDK/servicefabric/operations/_operations.py b/customSDK/servicefabric/operations/_operations.py new file mode 100644 index 00000000..ef0580c2 --- /dev/null +++ b/customSDK/servicefabric/operations/_operations.py @@ -0,0 +1,48995 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +import sys +from typing import Any, Callable, Dict, List, Optional, TypeVar, cast + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .._vendor import MixinABC, _format_url_section +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_get_cluster_manifest_request( + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/GetClusterManifest" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_cluster_health_request( + *, + nodes_health_state_filter: Optional[int] = 0, + applications_health_state_filter: Optional[int] = 0, + events_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + include_system_application_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/GetClusterHealth" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if nodes_health_state_filter is not None: + _params['NodesHealthStateFilter'] = _SERIALIZER.query("nodes_health_state_filter", nodes_health_state_filter, 'int') + if applications_health_state_filter is not None: + _params['ApplicationsHealthStateFilter'] = _SERIALIZER.query("applications_health_state_filter", applications_health_state_filter, 'int') + if events_health_state_filter is not None: + _params['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if exclude_health_statistics is not None: + _params['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if include_system_application_health_statistics is not None: + _params['IncludeSystemApplicationHealthStatistics'] = _SERIALIZER.query("include_system_application_health_statistics", include_system_application_health_statistics, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_cluster_health_using_policy_request( + *, + json: Optional[JSON] = None, + content: Any = None, + nodes_health_state_filter: Optional[int] = 0, + applications_health_state_filter: Optional[int] = 0, + events_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + include_system_application_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/GetClusterHealth" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if nodes_health_state_filter is not None: + _params['NodesHealthStateFilter'] = _SERIALIZER.query("nodes_health_state_filter", nodes_health_state_filter, 'int') + if applications_health_state_filter is not None: + _params['ApplicationsHealthStateFilter'] = _SERIALIZER.query("applications_health_state_filter", applications_health_state_filter, 'int') + if events_health_state_filter is not None: + _params['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if exclude_health_statistics is not None: + _params['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if include_system_application_health_statistics is not None: + _params['IncludeSystemApplicationHealthStatistics'] = _SERIALIZER.query("include_system_application_health_statistics", include_system_application_health_statistics, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_cluster_health_chunk_request( + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/GetClusterHealthChunk" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_cluster_health_chunk_using_policy_and_advanced_filters_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/GetClusterHealthChunk" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_report_cluster_health_request( + *, + json: Optional[JSON] = None, + content: Any = None, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/ReportClusterHealth" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if immediate is not None: + _params['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_provisioned_fabric_code_version_info_list_request( + *, + code_version: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/GetProvisionedCodeVersions" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if code_version is not None: + _params['CodeVersion'] = _SERIALIZER.query("code_version", code_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_provisioned_fabric_config_version_info_list_request( + *, + config_version: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/GetProvisionedConfigVersions" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if config_version is not None: + _params['ConfigVersion'] = _SERIALIZER.query("config_version", config_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_cluster_upgrade_progress_request( + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/GetUpgradeProgress" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_cluster_configuration_request( + *, + configuration_api_version: str, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/GetClusterConfiguration" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['ConfigurationApiVersion'] = _SERIALIZER.query("configuration_api_version", configuration_api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_cluster_configuration_upgrade_status_request( + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/GetClusterConfigurationUpgradeStatus" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_upgrade_orchestration_service_state_request( + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/GetUpgradeOrchestrationServiceState" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_set_upgrade_orchestration_service_state_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/SetUpgradeOrchestrationServiceState" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_provision_cluster_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/Provision" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_unprovision_cluster_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/Unprovision" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_rollback_cluster_upgrade_request( + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/RollbackUpgrade" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_resume_cluster_upgrade_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/MoveToNextUpgradeDomain" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_start_cluster_upgrade_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/Upgrade" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_start_cluster_configuration_upgrade_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/StartClusterConfigurationUpgrade" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_update_cluster_upgrade_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/UpdateUpgrade" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_aad_metadata_request( + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/GetAadMetadata" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_cluster_version_request( + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/GetClusterVersion" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_cluster_load_request( + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/GetLoadInformation" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_toggle_verbose_service_placement_health_reporting_request( + *, + enabled: bool, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/ToggleVerboseServicePlacementHealthReporting" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['Enabled'] = _SERIALIZER.query("enabled", enabled, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_validate_cluster_upgrade_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "8.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/ValidateUpgrade" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_node_info_list_request( + *, + continuation_token_parameter: Optional[str] = None, + node_status_filter: Optional[str] = "default", + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.3")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if node_status_filter is not None: + _params['NodeStatusFilter'] = _SERIALIZER.query("node_status_filter", node_status_filter, 'str') + if max_results is not None: + _params['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_node_info_request( + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_node_health_request( + node_name: str, + *, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetHealth" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _params['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_node_health_using_policy_request( + node_name: str, + *, + json: Optional[JSON] = None, + content: Any = None, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetHealth" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _params['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_report_node_health_request( + node_name: str, + *, + json: Optional[JSON] = None, + content: Any = None, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/ReportHealth" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if immediate is not None: + _params['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_node_load_info_request( + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetLoadInformation" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_disable_node_request( + node_name: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/Deactivate" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_enable_node_request( + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/Activate" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_remove_node_state_request( + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/RemoveNodeState" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_restart_node_request( + node_name: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/Restart" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_remove_configuration_overrides_request( + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/RemoveConfigurationOverrides" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_configuration_overrides_request( + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetConfigurationOverrides" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_add_configuration_parameter_overrides_request( + node_name: str, + *, + json: Optional[List[JSON]] = None, + content: Any = None, + force: Optional[bool] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/AddConfigurationParameterOverrides" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if force is not None: + _params['Force'] = _SERIALIZER.query("force", force, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_remove_node_tags_request( + node_name: str, + *, + json: Optional[List[str]] = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/RemoveNodeTags" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_add_node_tags_request( + node_name: str, + *, + json: Optional[List[str]] = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/AddNodeTags" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_application_type_info_list_request( + *, + application_type_definition_kind_filter: Optional[int] = 0, + exclude_application_parameters: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ApplicationTypes" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if application_type_definition_kind_filter is not None: + _params['ApplicationTypeDefinitionKindFilter'] = _SERIALIZER.query("application_type_definition_kind_filter", application_type_definition_kind_filter, 'int') + if exclude_application_parameters is not None: + _params['ExcludeApplicationParameters'] = _SERIALIZER.query("exclude_application_parameters", exclude_application_parameters, 'bool') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _params['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_application_type_info_list_by_name_request( + application_type_name: str, + *, + application_type_version: Optional[str] = None, + exclude_application_parameters: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ApplicationTypes/{applicationTypeName}" + path_format_arguments = { + "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if application_type_version is not None: + _params['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') + if exclude_application_parameters is not None: + _params['ExcludeApplicationParameters'] = _SERIALIZER.query("exclude_application_parameters", exclude_application_parameters, 'bool') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _params['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_provision_application_type_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ApplicationTypes/$/Provision" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_unprovision_application_type_request( + application_type_name: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ApplicationTypes/{applicationTypeName}/$/Unprovision" + path_format_arguments = { + "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_update_application_type_arm_metadata_request( + application_type_name: str, + *, + application_type_version: str, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + force: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ApplicationTypes/{applicationTypeName}/$/UpdateArmMetadata" + path_format_arguments = { + "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if force is not None: + _params['Force'] = _SERIALIZER.query("force", force, 'bool') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_service_type_info_list_request( + application_type_name: str, + *, + application_type_version: str, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes" + path_format_arguments = { + "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_service_type_info_by_name_request( + application_type_name: str, + service_type_name: str, + *, + application_type_version: str, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes/{serviceTypeName}" + path_format_arguments = { + "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), + "serviceTypeName": _SERIALIZER.url("service_type_name", service_type_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_service_manifest_request( + application_type_name: str, + *, + application_type_version: str, + service_manifest_name: str, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ApplicationTypes/{applicationTypeName}/$/GetServiceManifest" + path_format_arguments = { + "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') + _params['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_deployed_service_type_info_list_request( + node_name: str, + application_id: str, + *, + service_manifest_name: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if service_manifest_name is not None: + _params['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_deployed_service_type_info_by_name_request( + node_name: str, + application_id: str, + service_type_name: str, + *, + service_manifest_name: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes/{serviceTypeName}" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + "serviceTypeName": _SERIALIZER.url("service_type_name", service_type_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if service_manifest_name is not None: + _params['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_create_application_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/$/Create" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_delete_application_request( + application_id: str, + *, + force_remove: Optional[bool] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/Delete" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if force_remove is not None: + _params['ForceRemove'] = _SERIALIZER.query("force_remove", force_remove, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_application_load_info_request( + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/GetLoadInformation" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_application_info_list_request( + *, + application_definition_kind_filter: Optional[int] = 0, + application_type_name: Optional[str] = None, + exclude_application_parameters: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.1")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if application_definition_kind_filter is not None: + _params['ApplicationDefinitionKindFilter'] = _SERIALIZER.query("application_definition_kind_filter", application_definition_kind_filter, 'int') + if application_type_name is not None: + _params['ApplicationTypeName'] = _SERIALIZER.query("application_type_name", application_type_name, 'str') + if exclude_application_parameters is not None: + _params['ExcludeApplicationParameters'] = _SERIALIZER.query("exclude_application_parameters", exclude_application_parameters, 'bool') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _params['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_application_info_request( + application_id: str, + *, + exclude_application_parameters: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if exclude_application_parameters is not None: + _params['ExcludeApplicationParameters'] = _SERIALIZER.query("exclude_application_parameters", exclude_application_parameters, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_application_health_request( + application_id: str, + *, + events_health_state_filter: Optional[int] = 0, + deployed_applications_health_state_filter: Optional[int] = 0, + services_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/GetHealth" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _params['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if deployed_applications_health_state_filter is not None: + _params['DeployedApplicationsHealthStateFilter'] = _SERIALIZER.query("deployed_applications_health_state_filter", deployed_applications_health_state_filter, 'int') + if services_health_state_filter is not None: + _params['ServicesHealthStateFilter'] = _SERIALIZER.query("services_health_state_filter", services_health_state_filter, 'int') + if exclude_health_statistics is not None: + _params['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_application_health_using_policy_request( + application_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + events_health_state_filter: Optional[int] = 0, + deployed_applications_health_state_filter: Optional[int] = 0, + services_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/GetHealth" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _params['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if deployed_applications_health_state_filter is not None: + _params['DeployedApplicationsHealthStateFilter'] = _SERIALIZER.query("deployed_applications_health_state_filter", deployed_applications_health_state_filter, 'int') + if services_health_state_filter is not None: + _params['ServicesHealthStateFilter'] = _SERIALIZER.query("services_health_state_filter", services_health_state_filter, 'int') + if exclude_health_statistics is not None: + _params['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_report_application_health_request( + application_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/ReportHealth" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if immediate is not None: + _params['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_start_application_upgrade_request( + application_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/Upgrade" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_application_upgrade_request( + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/GetUpgradeProgress" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_update_application_upgrade_request( + application_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/UpdateUpgrade" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_update_application_request( + application_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "8.1")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/Update" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_resume_application_upgrade_request( + application_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/MoveToNextUpgradeDomain" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_rollback_application_upgrade_request( + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/RollbackUpgrade" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_deployed_application_info_list_request( + node_name: str, + *, + timeout: Optional[int] = 60, + include_health_state: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.1")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetApplications" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if include_health_state is not None: + _params['IncludeHealthState'] = _SERIALIZER.query("include_health_state", include_health_state, 'bool') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _params['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_deployed_application_info_request( + node_name: str, + application_id: str, + *, + timeout: Optional[int] = 60, + include_health_state: Optional[bool] = False, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.1")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetApplications/{applicationId}" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if include_health_state is not None: + _params['IncludeHealthState'] = _SERIALIZER.query("include_health_state", include_health_state, 'bool') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_deployed_application_health_request( + node_name: str, + application_id: str, + *, + events_health_state_filter: Optional[int] = 0, + deployed_service_packages_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _params['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if deployed_service_packages_health_state_filter is not None: + _params['DeployedServicePackagesHealthStateFilter'] = _SERIALIZER.query("deployed_service_packages_health_state_filter", deployed_service_packages_health_state_filter, 'int') + if exclude_health_statistics is not None: + _params['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_deployed_application_health_using_policy_request( + node_name: str, + application_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + events_health_state_filter: Optional[int] = 0, + deployed_service_packages_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _params['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if deployed_service_packages_health_state_filter is not None: + _params['DeployedServicePackagesHealthStateFilter'] = _SERIALIZER.query("deployed_service_packages_health_state_filter", deployed_service_packages_health_state_filter, 'int') + if exclude_health_statistics is not None: + _params['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_report_deployed_application_health_request( + node_name: str, + application_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/ReportHealth" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if immediate is not None: + _params['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_application_manifest_request( + application_type_name: str, + *, + application_type_version: str, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ApplicationTypes/{applicationTypeName}/$/GetApplicationManifest" + path_format_arguments = { + "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_update_application_arm_metadata_request( + application_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + force: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/UpdateArmMetadata" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if force is not None: + _params['Force'] = _SERIALIZER.query("force", force, 'bool') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_service_info_list_request( + application_id: str, + *, + service_type_name: Optional[str] = None, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/GetServices" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + if service_type_name is not None: + _params['ServiceTypeName'] = _SERIALIZER.query("service_type_name", service_type_name, 'str') + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_service_info_request( + application_id: str, + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/GetServices/{serviceId}" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_application_name_info_request( + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/GetApplicationName" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_create_service_request( + application_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/GetServices/$/Create" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_create_service_from_template_request( + application_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/GetServices/$/CreateFromTemplate" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_delete_service_request( + service_id: str, + *, + force_remove: Optional[bool] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/Delete" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if force_remove is not None: + _params['ForceRemove'] = _SERIALIZER.query("force_remove", force_remove, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_update_service_request( + service_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/Update" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_service_description_request( + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/GetDescription" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_service_health_request( + service_id: str, + *, + events_health_state_filter: Optional[int] = 0, + partitions_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/GetHealth" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _params['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if partitions_health_state_filter is not None: + _params['PartitionsHealthStateFilter'] = _SERIALIZER.query("partitions_health_state_filter", partitions_health_state_filter, 'int') + if exclude_health_statistics is not None: + _params['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_service_health_using_policy_request( + service_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + events_health_state_filter: Optional[int] = 0, + partitions_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/GetHealth" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _params['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if partitions_health_state_filter is not None: + _params['PartitionsHealthStateFilter'] = _SERIALIZER.query("partitions_health_state_filter", partitions_health_state_filter, 'int') + if exclude_health_statistics is not None: + _params['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_report_service_health_request( + service_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/ReportHealth" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if immediate is not None: + _params['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_resolve_service_request( + service_id: str, + *, + partition_key_type: Optional[int] = None, + partition_key_value: Optional[str] = None, + previous_rsp_version: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/ResolvePartition" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if partition_key_type is not None: + _params['PartitionKeyType'] = _SERIALIZER.query("partition_key_type", partition_key_type, 'int') + if partition_key_value is not None: + _params['PartitionKeyValue'] = _SERIALIZER.query("partition_key_value", partition_key_value, 'str', skip_quote=True) + if previous_rsp_version is not None: + _params['PreviousRspVersion'] = _SERIALIZER.query("previous_rsp_version", previous_rsp_version, 'str', skip_quote=True) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_unplaced_replica_information_request( + service_id: str, + *, + partition_id: Optional[str] = None, + only_query_primaries: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/GetUnplacedReplicaInformation" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if partition_id is not None: + _params['PartitionId'] = _SERIALIZER.query("partition_id", partition_id, 'str') + if only_query_primaries is not None: + _params['OnlyQueryPrimaries'] = _SERIALIZER.query("only_query_primaries", only_query_primaries, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_update_service_arm_metadata_request( + service_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + force: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/UpdateArmMetadata" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if force is not None: + _params['Force'] = _SERIALIZER.query("force", force, 'bool') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_loaded_partition_info_list_request( + *, + metric_name: str, + service_name: Optional[str] = None, + ordering: Optional[str] = None, + max_results: Optional[int] = 0, + continuation_token_parameter: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "8.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/GetLoadedPartitionInfoList" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['MetricName'] = _SERIALIZER.query("metric_name", metric_name, 'str') + if service_name is not None: + _params['ServiceName'] = _SERIALIZER.query("service_name", service_name, 'str') + if ordering is not None: + _params['Ordering'] = _SERIALIZER.query("ordering", ordering, 'str') + if max_results is not None: + _params['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_partition_info_list_request( + service_id: str, + *, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/GetPartitions" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_partition_info_request( + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_service_name_info_request( + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/GetServiceName" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_partition_health_request( + partition_id: str, + *, + events_health_state_filter: Optional[int] = 0, + replicas_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/GetHealth" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _params['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if replicas_health_state_filter is not None: + _params['ReplicasHealthStateFilter'] = _SERIALIZER.query("replicas_health_state_filter", replicas_health_state_filter, 'int') + if exclude_health_statistics is not None: + _params['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_partition_health_using_policy_request( + partition_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + events_health_state_filter: Optional[int] = 0, + replicas_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/GetHealth" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _params['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if replicas_health_state_filter is not None: + _params['ReplicasHealthStateFilter'] = _SERIALIZER.query("replicas_health_state_filter", replicas_health_state_filter, 'int') + if exclude_health_statistics is not None: + _params['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_report_partition_health_request( + partition_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/ReportHealth" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if immediate is not None: + _params['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_partition_load_information_request( + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/GetLoadInformation" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_reset_partition_load_request( + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/ResetLoad" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_recover_partition_request( + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/Recover" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_recover_service_partitions_request( + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/$/{serviceId}/$/GetPartitions/$/Recover" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_recover_system_partitions_request( + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/RecoverSystemPartitions" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_recover_all_partitions_request( + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/RecoverAllPartitions" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_move_primary_replica_request( + partition_id: str, + *, + node_name: Optional[str] = None, + ignore_constraints: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.5")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/MovePrimaryReplica" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if node_name is not None: + _params['NodeName'] = _SERIALIZER.query("node_name", node_name, 'str') + if ignore_constraints is not None: + _params['IgnoreConstraints'] = _SERIALIZER.query("ignore_constraints", ignore_constraints, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_move_secondary_replica_request( + partition_id: str, + *, + current_node_name: str, + new_node_name: Optional[str] = None, + ignore_constraints: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.5")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/MoveSecondaryReplica" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['CurrentNodeName'] = _SERIALIZER.query("current_node_name", current_node_name, 'str') + if new_node_name is not None: + _params['NewNodeName'] = _SERIALIZER.query("new_node_name", new_node_name, 'str') + if ignore_constraints is not None: + _params['IgnoreConstraints'] = _SERIALIZER.query("ignore_constraints", ignore_constraints, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_update_partition_load_request( + *, + json: Optional[List[JSON]] = None, + content: Any = None, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/UpdatePartitionLoad" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _params['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_move_instance_request( + service_id: str, + partition_id: str, + *, + current_node_name: Optional[str] = None, + new_node_name: Optional[str] = None, + ignore_constraints: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "8.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveInstance" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if current_node_name is not None: + _params['CurrentNodeName'] = _SERIALIZER.query("current_node_name", current_node_name, 'str') + if new_node_name is not None: + _params['NewNodeName'] = _SERIALIZER.query("new_node_name", new_node_name, 'str') + if ignore_constraints is not None: + _params['IgnoreConstraints'] = _SERIALIZER.query("ignore_constraints", ignore_constraints, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_move_auxiliary_replica_request( + service_id: str, + partition_id: str, + *, + current_node_name: Optional[str] = None, + new_node_name: Optional[str] = None, + ignore_constraints: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "8.1")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveAuxiliaryReplica" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if current_node_name is not None: + _params['CurrentNodeName'] = _SERIALIZER.query("current_node_name", current_node_name, 'str') + if new_node_name is not None: + _params['NewNodeName'] = _SERIALIZER.query("new_node_name", new_node_name, 'str') + if ignore_constraints is not None: + _params['IgnoreConstraints'] = _SERIALIZER.query("ignore_constraints", ignore_constraints, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_create_repair_task_request( + *, + json: Optional[JSON] = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/CreateRepairTask" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_cancel_repair_task_request( + *, + json: Optional[JSON] = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/CancelRepairTask" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_delete_repair_task_request( + *, + json: Optional[JSON] = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/DeleteRepairTask" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_repair_task_list_request( + *, + task_id_filter: Optional[str] = None, + state_filter: Optional[int] = None, + executor_filter: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/GetRepairTaskList" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if task_id_filter is not None: + _params['TaskIdFilter'] = _SERIALIZER.query("task_id_filter", task_id_filter, 'str') + if state_filter is not None: + _params['StateFilter'] = _SERIALIZER.query("state_filter", state_filter, 'int') + if executor_filter is not None: + _params['ExecutorFilter'] = _SERIALIZER.query("executor_filter", executor_filter, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_force_approve_repair_task_request( + *, + json: Optional[JSON] = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/ForceApproveRepairTask" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_update_repair_task_health_policy_request( + *, + json: Optional[JSON] = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/UpdateRepairTaskHealthPolicy" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_update_repair_execution_state_request( + *, + json: Optional[JSON] = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/UpdateRepairExecutionState" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_replica_info_list_request( + partition_id: str, + *, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/GetReplicas" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_replica_info_request( + partition_id: str, + replica_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/GetReplicas/{replicaId}" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_replica_health_request( + partition_id: str, + replica_id: str, + *, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _params['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_replica_health_using_policy_request( + partition_id: str, + replica_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _params['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_report_replica_health_request( + partition_id: str, + replica_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + service_kind: str = "Stateful", + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/ReportHealth" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['ServiceKind'] = _SERIALIZER.query("service_kind", service_kind, 'str') + if immediate is not None: + _params['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_deployed_service_replica_info_list_request( + node_name: str, + application_id: str, + *, + partition_id: Optional[str] = None, + service_manifest_name: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetReplicas" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if partition_id is not None: + _params['PartitionId'] = _SERIALIZER.query("partition_id", partition_id, 'str') + if service_manifest_name is not None: + _params['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_deployed_service_replica_detail_info_request( + node_name: str, + partition_id: str, + replica_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetDetail" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_deployed_service_replica_detail_info_by_partition_id_request( + node_name: str, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_restart_replica_request( + node_name: str, + partition_id: str, + replica_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Restart" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_remove_replica_request( + node_name: str, + partition_id: str, + replica_id: str, + *, + force_remove: Optional[bool] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Delete" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if force_remove is not None: + _params['ForceRemove'] = _SERIALIZER.query("force_remove", force_remove, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_deployed_service_package_info_list_request( + node_name: str, + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_deployed_service_package_info_list_by_name_request( + node_name: str, + application_id: str, + service_package_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + "servicePackageName": _SERIALIZER.url("service_package_name", service_package_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_deployed_service_package_health_request( + node_name: str, + application_id: str, + service_package_name: str, + *, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + "servicePackageName": _SERIALIZER.url("service_package_name", service_package_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _params['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_deployed_service_package_health_using_policy_request( + node_name: str, + application_id: str, + service_package_name: str, + *, + json: Optional[JSON] = None, + content: Any = None, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + "servicePackageName": _SERIALIZER.url("service_package_name", service_package_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if events_health_state_filter is not None: + _params['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_report_deployed_service_package_health_request( + node_name: str, + application_id: str, + service_package_name: str, + *, + json: Optional[JSON] = None, + content: Any = None, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/ReportHealth" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + "servicePackageName": _SERIALIZER.url("service_package_name", service_package_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if immediate is not None: + _params['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_deploy_service_package_to_node_request( + node_name: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/DeployServicePackage" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_deployed_code_package_info_list_request( + node_name: str, + application_id: str, + *, + service_manifest_name: Optional[str] = None, + code_package_name: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if service_manifest_name is not None: + _params['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') + if code_package_name is not None: + _params['CodePackageName'] = _SERIALIZER.query("code_package_name", code_package_name, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_restart_deployed_code_package_request( + node_name: str, + application_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/Restart" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_container_logs_deployed_on_node_request( + node_name: str, + application_id: str, + *, + service_manifest_name: str, + code_package_name: str, + tail: Optional[str] = None, + previous: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerLogs" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') + _params['CodePackageName'] = _SERIALIZER.query("code_package_name", code_package_name, 'str') + if tail is not None: + _params['Tail'] = _SERIALIZER.query("tail", tail, 'str') + if previous is not None: + _params['Previous'] = _SERIALIZER.query("previous", previous, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_invoke_container_api_request( + node_name: str, + application_id: str, + *, + service_manifest_name: str, + code_package_name: str, + code_package_instance_id: str, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerApi" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') + _params['CodePackageName'] = _SERIALIZER.query("code_package_name", code_package_name, 'str') + _params['CodePackageInstanceId'] = _SERIALIZER.query("code_package_instance_id", code_package_instance_id, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_create_compose_deployment_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ComposeDeployments/$/Create" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_compose_deployment_status_request( + deployment_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ComposeDeployments/{deploymentName}" + path_format_arguments = { + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_compose_deployment_status_list_request( + *, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ComposeDeployments" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _params['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_compose_deployment_upgrade_progress_request( + deployment_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ComposeDeployments/{deploymentName}/$/GetUpgradeProgress" + path_format_arguments = { + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_remove_compose_deployment_request( + deployment_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ComposeDeployments/{deploymentName}/$/Delete" + path_format_arguments = { + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_start_compose_deployment_upgrade_request( + deployment_name: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ComposeDeployments/{deploymentName}/$/Upgrade" + path_format_arguments = { + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_start_rollback_compose_deployment_upgrade_request( + deployment_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4-preview")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ComposeDeployments/{deploymentName}/$/RollbackUpgrade" + path_format_arguments = { + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_chaos_request( + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Tools/Chaos" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_start_chaos_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Tools/Chaos/$/Start" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_stop_chaos_request( + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Tools/Chaos/$/Stop" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_chaos_events_request( + *, + continuation_token_parameter: Optional[str] = None, + start_time_utc: Optional[str] = None, + end_time_utc: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Tools/Chaos/Events" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if start_time_utc is not None: + _params['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + if end_time_utc is not None: + _params['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if max_results is not None: + _params['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_chaos_schedule_request( + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Tools/Chaos/Schedule" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_post_chaos_schedule_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Tools/Chaos/Schedule" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_upload_file_request( + content_path: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ImageStore/{contentPath}" + path_format_arguments = { + "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_image_store_content_request( + content_path: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ImageStore/{contentPath}" + path_format_arguments = { + "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_delete_image_store_content_request( + content_path: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ImageStore/{contentPath}" + path_format_arguments = { + "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_image_store_root_content_request( + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ImageStore" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_copy_image_store_content_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ImageStore/$/Copy" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_delete_image_store_upload_session_request( + *, + session_id: str, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ImageStore/$/DeleteUploadSession" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['session-id'] = _SERIALIZER.query("session_id", session_id, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_commit_image_store_upload_session_request( + *, + session_id: str, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ImageStore/$/CommitUploadSession" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['session-id'] = _SERIALIZER.query("session_id", session_id, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_image_store_upload_session_by_id_request( + *, + session_id: str, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ImageStore/$/GetUploadSession" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['session-id'] = _SERIALIZER.query("session_id", session_id, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_image_store_upload_session_by_path_request( + content_path: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ImageStore/{contentPath}/$/GetUploadSession" + path_format_arguments = { + "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_upload_file_chunk_request( + content_path: str, + *, + session_id: str, + content_range: str, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ImageStore/{contentPath}/$/UploadChunk" + path_format_arguments = { + "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['session-id'] = _SERIALIZER.query("session_id", session_id, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Content-Range'] = _SERIALIZER.header("content_range", content_range, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_image_store_root_folder_size_request( + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.5")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ImageStore/$/FolderSize" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_image_store_folder_size_request( + content_path: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.5")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ImageStore/{contentPath}/$/FolderSize" + path_format_arguments = { + "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_image_store_info_request( + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.5")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/ImageStore/$/Info" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_invoke_infrastructure_command_request( + *, + command: str, + service_id: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/InvokeInfrastructureCommand" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['Command'] = _SERIALIZER.query("command", command, 'str') + if service_id is not None: + _params['ServiceId'] = _SERIALIZER.query("service_id", service_id, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_invoke_infrastructure_query_request( + *, + command: str, + service_id: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/$/InvokeInfrastructureQuery" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['Command'] = _SERIALIZER.query("command", command, 'str') + if service_id is not None: + _params['ServiceId'] = _SERIALIZER.query("service_id", service_id, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_start_data_loss_request( + service_id: str, + partition_id: str, + *, + operation_id: str, + data_loss_mode: str, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartDataLoss" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + _params['DataLossMode'] = _SERIALIZER.query("data_loss_mode", data_loss_mode, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_data_loss_progress_request( + service_id: str, + partition_id: str, + *, + operation_id: str, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetDataLossProgress" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_start_quorum_loss_request( + service_id: str, + partition_id: str, + *, + operation_id: str, + quorum_loss_mode: str, + quorum_loss_duration: int, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartQuorumLoss" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + _params['QuorumLossMode'] = _SERIALIZER.query("quorum_loss_mode", quorum_loss_mode, 'str') + _params['QuorumLossDuration'] = _SERIALIZER.query("quorum_loss_duration", quorum_loss_duration, 'int') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_quorum_loss_progress_request( + service_id: str, + partition_id: str, + *, + operation_id: str, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetQuorumLossProgress" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_start_partition_restart_request( + service_id: str, + partition_id: str, + *, + operation_id: str, + restart_partition_mode: str, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartRestart" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + _params['RestartPartitionMode'] = _SERIALIZER.query("restart_partition_mode", restart_partition_mode, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_partition_restart_progress_request( + service_id: str, + partition_id: str, + *, + operation_id: str, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetRestartProgress" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_start_node_transition_request( + node_name: str, + *, + operation_id: str, + node_transition_type: str, + node_instance_id: str, + stop_duration_in_seconds: int, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Faults/Nodes/{nodeName}/$/StartTransition/" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + _params['NodeTransitionType'] = _SERIALIZER.query("node_transition_type", node_transition_type, 'str') + _params['NodeInstanceId'] = _SERIALIZER.query("node_instance_id", node_instance_id, 'str') + _params['StopDurationInSeconds'] = _SERIALIZER.query("stop_duration_in_seconds", stop_duration_in_seconds, 'int', minimum=0) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_node_transition_progress_request( + node_name: str, + *, + operation_id: str, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Faults/Nodes/{nodeName}/$/GetTransitionProgress" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_fault_operation_list_request( + *, + type_filter: int = 65535, + state_filter: int = 65535, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Faults/" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['TypeFilter'] = _SERIALIZER.query("type_filter", type_filter, 'int') + _params['StateFilter'] = _SERIALIZER.query("state_filter", state_filter, 'int') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_cancel_operation_request( + *, + operation_id: str, + force: bool = False, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Faults/$/Cancel" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') + _params['Force'] = _SERIALIZER.query("force", force, 'bool') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_create_backup_policy_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + validate_connection: Optional[bool] = False, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/BackupRestore/BackupPolicies/$/Create" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if validate_connection is not None: + _params['ValidateConnection'] = _SERIALIZER.query("validate_connection", validate_connection, 'bool') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_delete_backup_policy_request( + backup_policy_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/BackupRestore/BackupPolicies/{backupPolicyName}/$/Delete" + path_format_arguments = { + "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_backup_policy_list_request( + *, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/BackupRestore/BackupPolicies" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _params['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_backup_policy_by_name_request( + backup_policy_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/BackupRestore/BackupPolicies/{backupPolicyName}" + path_format_arguments = { + "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_all_entities_backed_up_by_policy_request( + backup_policy_name: str, + *, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/BackupRestore/BackupPolicies/{backupPolicyName}/$/GetBackupEnabledEntities" + path_format_arguments = { + "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _params['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_update_backup_policy_request( + backup_policy_name: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + validate_connection: Optional[bool] = False, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/BackupRestore/BackupPolicies/{backupPolicyName}/$/Update" + path_format_arguments = { + "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if validate_connection is not None: + _params['ValidateConnection'] = _SERIALIZER.query("validate_connection", validate_connection, 'bool') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_enable_application_backup_request( + application_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/EnableBackup" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_disable_application_backup_request( + application_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/DisableBackup" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_application_backup_configuration_info_request( + application_id: str, + *, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/GetBackupConfigurationInfo" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _params['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_application_backup_list_request( + application_id: str, + *, + timeout: Optional[int] = 60, + latest: Optional[bool] = False, + start_date_time_filter: Optional[datetime.datetime] = None, + end_date_time_filter: Optional[datetime.datetime] = None, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/GetBackups" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if latest is not None: + _params['Latest'] = _SERIALIZER.query("latest", latest, 'bool') + if start_date_time_filter is not None: + _params['StartDateTimeFilter'] = _SERIALIZER.query("start_date_time_filter", start_date_time_filter, 'iso-8601') + if end_date_time_filter is not None: + _params['EndDateTimeFilter'] = _SERIALIZER.query("end_date_time_filter", end_date_time_filter, 'iso-8601') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _params['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_suspend_application_backup_request( + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/SuspendBackup" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_resume_application_backup_request( + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Applications/{applicationId}/$/ResumeBackup" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_enable_service_backup_request( + service_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/EnableBackup" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_disable_service_backup_request( + service_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/DisableBackup" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_service_backup_configuration_info_request( + service_id: str, + *, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/GetBackupConfigurationInfo" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _params['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_service_backup_list_request( + service_id: str, + *, + timeout: Optional[int] = 60, + latest: Optional[bool] = False, + start_date_time_filter: Optional[datetime.datetime] = None, + end_date_time_filter: Optional[datetime.datetime] = None, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/GetBackups" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if latest is not None: + _params['Latest'] = _SERIALIZER.query("latest", latest, 'bool') + if start_date_time_filter is not None: + _params['StartDateTimeFilter'] = _SERIALIZER.query("start_date_time_filter", start_date_time_filter, 'iso-8601') + if end_date_time_filter is not None: + _params['EndDateTimeFilter'] = _SERIALIZER.query("end_date_time_filter", end_date_time_filter, 'iso-8601') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _params['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_suspend_service_backup_request( + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/SuspendBackup" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_resume_service_backup_request( + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Services/{serviceId}/$/ResumeBackup" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_enable_partition_backup_request( + partition_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/EnableBackup" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_disable_partition_backup_request( + partition_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/DisableBackup" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_partition_backup_configuration_info_request( + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/GetBackupConfigurationInfo" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_partition_backup_list_request( + partition_id: str, + *, + timeout: Optional[int] = 60, + latest: Optional[bool] = False, + start_date_time_filter: Optional[datetime.datetime] = None, + end_date_time_filter: Optional[datetime.datetime] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/GetBackups" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if latest is not None: + _params['Latest'] = _SERIALIZER.query("latest", latest, 'bool') + if start_date_time_filter is not None: + _params['StartDateTimeFilter'] = _SERIALIZER.query("start_date_time_filter", start_date_time_filter, 'iso-8601') + if end_date_time_filter is not None: + _params['EndDateTimeFilter'] = _SERIALIZER.query("end_date_time_filter", end_date_time_filter, 'iso-8601') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_suspend_partition_backup_request( + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/SuspendBackup" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_resume_partition_backup_request( + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/ResumeBackup" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_backup_partition_request( + partition_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + backup_timeout: Optional[int] = 10, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/Backup" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + if backup_timeout is not None: + _params['BackupTimeout'] = _SERIALIZER.query("backup_timeout", backup_timeout, 'int') + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_partition_backup_progress_request( + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/GetBackupProgress" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_restore_partition_request( + partition_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + restore_timeout: Optional[int] = 10, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/Restore" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + if restore_timeout is not None: + _params['RestoreTimeout'] = _SERIALIZER.query("restore_timeout", restore_timeout, 'int') + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_partition_restore_progress_request( + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Partitions/{partitionId}/$/GetRestoreProgress" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_backups_from_backup_location_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/BackupRestore/$/GetBackups" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if max_results is not None: + _params['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_create_name_request( + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Names/$/Create" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_name_exists_info_request( + name_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Names/{nameId}" + path_format_arguments = { + "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_delete_name_request( + name_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Names/{nameId}" + path_format_arguments = { + "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_sub_name_info_list_request( + name_id: str, + *, + recursive: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Names/{nameId}/$/GetSubNames" + path_format_arguments = { + "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if recursive is not None: + _params['Recursive'] = _SERIALIZER.query("recursive", recursive, 'bool') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_property_info_list_request( + name_id: str, + *, + include_values: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Names/{nameId}/$/GetProperties" + path_format_arguments = { + "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if include_values is not None: + _params['IncludeValues'] = _SERIALIZER.query("include_values", include_values, 'bool') + if continuation_token_parameter is not None: + _params['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_put_property_request( + name_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Names/{nameId}/$/GetProperty" + path_format_arguments = { + "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_property_info_request( + name_id: str, + *, + property_name: str, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Names/{nameId}/$/GetProperty" + path_format_arguments = { + "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['PropertyName'] = _SERIALIZER.query("property_name", property_name, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_delete_property_request( + name_id: str, + *, + property_name: str, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Names/{nameId}/$/GetProperty" + path_format_arguments = { + "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _params['PropertyName'] = _SERIALIZER.query("property_name", property_name, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_submit_property_batch_request( + name_id: str, + *, + json: Optional[JSON] = None, + content: Any = None, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Names/{nameId}/$/GetProperties/$/SubmitBatch" + path_format_arguments = { + "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_get_cluster_event_list_request( + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/EventsStore/Cluster/Events" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _params['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _params['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _params['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _params['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _params['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_containers_event_list_request( + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2-preview")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/EventsStore/Containers/Events" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _params['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _params['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _params['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _params['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _params['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_node_event_list_request( + node_name: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/EventsStore/Nodes/{nodeName}/$/Events" + path_format_arguments = { + "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _params['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _params['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _params['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _params['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _params['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_nodes_event_list_request( + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/EventsStore/Nodes/Events" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _params['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _params['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _params['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _params['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _params['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_application_event_list_request( + application_id: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/EventsStore/Applications/{applicationId}/$/Events" + path_format_arguments = { + "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _params['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _params['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _params['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _params['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _params['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_applications_event_list_request( + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/EventsStore/Applications/Events" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _params['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _params['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _params['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _params['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _params['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_service_event_list_request( + service_id: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/EventsStore/Services/{serviceId}/$/Events" + path_format_arguments = { + "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _params['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _params['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _params['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _params['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _params['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_services_event_list_request( + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/EventsStore/Services/Events" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _params['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _params['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _params['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _params['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _params['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_partition_event_list_request( + partition_id: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/EventsStore/Partitions/{partitionId}/$/Events" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _params['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _params['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _params['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _params['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _params['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_partitions_event_list_request( + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/EventsStore/Partitions/Events" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _params['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _params['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _params['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _params['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _params['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_partition_replica_event_list_request( + partition_id: str, + replica_id: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/EventsStore/Partitions/{partitionId}/$/Replicas/{replicaId}/$/Events" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _params['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _params['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _params['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _params['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _params['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_partition_replicas_event_list_request( + partition_id: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/EventsStore/Partitions/{partitionId}/$/Replicas/Events" + path_format_arguments = { + "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + _params['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') + _params['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') + if events_types_filter is not None: + _params['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') + if exclude_analysis_events is not None: + _params['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') + if skip_correlation_lookup is not None: + _params['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_get_correlated_event_list_request( + event_instance_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events" + path_format_arguments = { + "eventInstanceId": _SERIALIZER.url("event_instance_id", event_instance_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if timeout is not None: + _params['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_secret_create_or_update_request( + secret_resource_name: str, + *, + json: Optional[JSON] = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Secrets/{secretResourceName}" + path_format_arguments = { + "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_mesh_secret_get_request( + secret_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Secrets/{secretResourceName}" + path_format_arguments = { + "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_secret_delete_request( + secret_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Secrets/{secretResourceName}" + path_format_arguments = { + "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_secret_list_request( + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Secrets" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_secret_value_add_value_request( + secret_resource_name: str, + secret_value_resource_name: str, + *, + json: Optional[JSON] = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}" + path_format_arguments = { + "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + "secretValueResourceName": _SERIALIZER.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_mesh_secret_value_get_request( + secret_resource_name: str, + secret_value_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}" + path_format_arguments = { + "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + "secretValueResourceName": _SERIALIZER.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_secret_value_delete_request( + secret_resource_name: str, + secret_value_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}" + path_format_arguments = { + "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + "secretValueResourceName": _SERIALIZER.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_secret_value_list_request( + secret_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Secrets/{secretResourceName}/values" + path_format_arguments = { + "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_secret_value_show_request( + secret_resource_name: str, + secret_value_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}/list_value" + path_format_arguments = { + "secretResourceName": _SERIALIZER.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True), + "secretValueResourceName": _SERIALIZER.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_volume_create_or_update_request( + volume_resource_name: str, + *, + json: Optional[JSON] = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Volumes/{volumeResourceName}" + path_format_arguments = { + "volumeResourceName": _SERIALIZER.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_mesh_volume_get_request( + volume_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Volumes/{volumeResourceName}" + path_format_arguments = { + "volumeResourceName": _SERIALIZER.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_volume_delete_request( + volume_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Volumes/{volumeResourceName}" + path_format_arguments = { + "volumeResourceName": _SERIALIZER.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_volume_list_request( + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Volumes" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_network_create_or_update_request( + network_resource_name: str, + *, + json: Optional[JSON] = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Networks/{networkResourceName}" + path_format_arguments = { + "networkResourceName": _SERIALIZER.url("network_resource_name", network_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_mesh_network_get_request( + network_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Networks/{networkResourceName}" + path_format_arguments = { + "networkResourceName": _SERIALIZER.url("network_resource_name", network_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_network_delete_request( + network_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Networks/{networkResourceName}" + path_format_arguments = { + "networkResourceName": _SERIALIZER.url("network_resource_name", network_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_network_list_request( + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Networks" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_application_create_or_update_request( + application_resource_name: str, + *, + json: Optional[JSON] = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Applications/{applicationResourceName}" + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_mesh_application_get_request( + application_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Applications/{applicationResourceName}" + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_application_delete_request( + application_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Applications/{applicationResourceName}" + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_application_list_request( + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Applications" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_application_get_upgrade_progress_request( + application_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.0")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Applications/{applicationResourceName}/$/GetUpgradeProgress" + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_service_get_request( + application_resource_name: str, + service_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}" + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + "serviceResourceName": _SERIALIZER.url("service_resource_name", service_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_service_list_request( + application_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Applications/{applicationResourceName}/Services" + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_code_package_get_container_logs_request( + application_resource_name: str, + service_resource_name: str, + replica_name: str, + code_package_name: str, + *, + tail: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}/CodePackages/{codePackageName}/Logs" # pylint: disable=line-too-long + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + "serviceResourceName": _SERIALIZER.url("service_resource_name", service_resource_name, 'str', skip_quote=True), + "replicaName": _SERIALIZER.url("replica_name", replica_name, 'str', skip_quote=True), + "codePackageName": _SERIALIZER.url("code_package_name", code_package_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if tail is not None: + _params['Tail'] = _SERIALIZER.query("tail", tail, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_service_replica_get_request( + application_resource_name: str, + service_resource_name: str, + replica_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}" + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + "serviceResourceName": _SERIALIZER.url("service_resource_name", service_resource_name, 'str', skip_quote=True), + "replicaName": _SERIALIZER.url("replica_name", replica_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_service_replica_list_request( + application_resource_name: str, + service_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas" + path_format_arguments = { + "applicationResourceName": _SERIALIZER.url("application_resource_name", application_resource_name, 'str', skip_quote=True), + "serviceResourceName": _SERIALIZER.url("service_resource_name", service_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_gateway_create_or_update_request( + gateway_resource_name: str, + *, + json: Optional[JSON] = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Gateways/{gatewayResourceName}" + path_format_arguments = { + "gatewayResourceName": _SERIALIZER.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_params, + headers=_headers, + json=json, + content=content, + **kwargs + ) + + +def build_mesh_gateway_get_request( + gateway_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Gateways/{gatewayResourceName}" + path_format_arguments = { + "gatewayResourceName": _SERIALIZER.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_gateway_delete_request( + gateway_resource_name: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Gateways/{gatewayResourceName}" + path_format_arguments = { + "gatewayResourceName": _SERIALIZER.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_mesh_gateway_list_request( + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = "/Resources/Gateways" + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + +class ServiceFabricClientAPIsOperationsMixin(MixinABC): # pylint: disable=too-many-public-methods + + @distributed_trace + def get_cluster_manifest( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the Service Fabric cluster manifest. + + Get the Service Fabric cluster manifest. The cluster manifest contains properties of the + cluster that include different node types on the cluster, + security configurations, fault, and upgrade domain topologies, etc. + + These properties are specified as part of the ClusterConfig.JSON file while deploying a + stand-alone cluster. However, most of the information in the cluster manifest + is generated internally by service fabric during cluster deployment in other deployment + scenarios (e.g. when using Azure portal). + + The contents of the cluster manifest are for informational purposes only and users are not + expected to take a dependency on the format of the file contents or its interpretation. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Manifest": "str" # Optional. The contents of the cluster manifest file. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_cluster_manifest_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_cluster_health( + self, + *, + nodes_health_state_filter: Optional[int] = 0, + applications_health_state_filter: Optional[int] = 0, + events_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + include_system_application_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric cluster. + + Use EventsHealthStateFilter to filter the collection of health events reported on the cluster + based on the health state. + Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the + collection of nodes and applications returned based on their aggregated health state. + + :keyword nodes_health_state_filter: Allows filtering of the node health state objects returned + in the result of cluster health query + based on their health state. The possible values for this parameter include integer value of + one of the + following health states. Only nodes that match the filter are returned. All nodes are used to + evaluate the aggregated health state. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of nodes with HealthState value of + OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype nodes_health_state_filter: int + :keyword applications_health_state_filter: Allows filtering of the application health state + objects returned in the result of cluster health + query based on their health state. + The possible values for this parameter include integer value obtained from members or bitwise + operations + on members of HealthStateFilter enumeration. Only applications that match the filter are + returned. + All applications are used to evaluate the aggregated health state. If not specified, all + entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of applications with HealthState + value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype applications_health_state_filter: int + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword include_system_application_health_statistics: Indicates whether the health statistics + should include the fabric:/System application health statistics. False by default. + If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the + entities that belong to the fabric:/System application. + Otherwise, the query result includes health statistics only for user applications. + The health statistics must be included in the query result for this parameter to be applied. + Default value is False. + :paramtype include_system_application_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "ApplicationHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "Name": "str" # Optional. The name of the application, + including the 'fabric:' URI scheme. + } + ], + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "NodeHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "Id": { + "Id": "str" # Optional. Value of the node Id. This + is a 128 bit integer. + }, + "Name": "str" # Optional. The name of a Service Fabric node. + } + ], + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_cluster_health_request( + api_version=api_version, + nodes_health_state_filter=nodes_health_state_filter, + applications_health_state_filter=applications_health_state_filter, + events_health_state_filter=events_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + include_system_application_health_statistics=include_system_application_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_cluster_health_using_policy( + self, + cluster_health_policies: Optional[JSON] = None, + *, + nodes_health_state_filter: Optional[int] = 0, + applications_health_state_filter: Optional[int] = 0, + events_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + include_system_application_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric cluster using the specified policy. + + Use EventsHealthStateFilter to filter the collection of health events reported on the cluster + based on the health state. + Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the + collection of nodes and applications returned based on their aggregated health state. + Use ClusterHealthPolicies to override the health policies used to evaluate the health. + + :param cluster_health_policies: Describes the health policies used to evaluate the cluster + health. + If not present, the health evaluation uses the cluster health policy defined in the cluster + manifest or the default cluster health policy. + By default, each application is evaluated using its specific application health policy, + defined in the application manifest, or the default health policy, if no policy is defined in + manifest. + If the application health policy map is specified, and it has an entry for an application, the + specified application health policy + is used to evaluate the application health. Default value is None. + :type cluster_health_policies: JSON + :keyword nodes_health_state_filter: Allows filtering of the node health state objects returned + in the result of cluster health query + based on their health state. The possible values for this parameter include integer value of + one of the + following health states. Only nodes that match the filter are returned. All nodes are used to + evaluate the aggregated health state. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of nodes with HealthState value of + OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype nodes_health_state_filter: int + :keyword applications_health_state_filter: Allows filtering of the application health state + objects returned in the result of cluster health + query based on their health state. + The possible values for this parameter include integer value obtained from members or bitwise + operations + on members of HealthStateFilter enumeration. Only applications that match the filter are + returned. + All applications are used to evaluate the aggregated health state. If not specified, all + entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of applications with HealthState + value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype applications_health_state_filter: int + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword include_system_application_health_statistics: Indicates whether the health statistics + should include the fabric:/System application health statistics. False by default. + If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the + entities that belong to the fabric:/System application. + Otherwise, the query result includes health statistics only for user applications. + The health statistics must be included in the query result for this parameter to be applied. + Default value is False. + :paramtype include_system_application_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + cluster_health_policies = { + "ApplicationHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application health + policy map item. This is the name of the application. + "Value": { + "ConsiderWarningAsError": bool, # Optional. + Indicates whether warnings are treated with the same severity as + errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, + # Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte values from zero + to 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the service + is considered in error."nIf the percentage is respected but there + is at least one unhealthy partition, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, + # Optional. The maximum allowed percentage of unhealthy replicas + per partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the partition + is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. + The maximum allowed percentage of unhealthy services. Allowed + values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of services that can + be unhealthy before the application is considered in error."nIf + the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated + by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific + service type."nThe computation rounds up to tolerate one failure + on small numbers of services. Default percentage is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # + Optional. The maximum allowed percentage of unhealthy deployed + applications. Allowed values are Byte values from zero to 100."nThe + percentage represents the maximum tolerated percentage of deployed + applications that can be unhealthy before the application is + considered in error."nThis is calculated by dividing the number of + unhealthy deployed applications over the number of nodes where the + application is currently deployed on in the cluster."nThe computation + rounds up to tolerate one failure on small numbers of nodes. Default + percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of + the service type health policy map item. This is the name of + the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte values + from zero to 100"n"nThe percentage represents the maximum + tolerated percentage of partitions that can be unhealthy + before the service is considered in error."nIf the + percentage is respected but there is at least one + unhealthy partition, the health is evaluated as + Warning."nThe percentage is calculated by dividing the + number of unhealthy partitions over the total number of + partitions in the service."nThe computation rounds up to + tolerate one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy + replicas per partition. Allowed values are Byte values + from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of replicas that can be + unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at + least one unhealthy replica, the health is evaluated as + Warning."nThe percentage is calculated by dividing the + number of unhealthy replicas over the total number of + replicas in the partition."nThe computation rounds up to + tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum + allowed percentage of unhealthy services. Allowed values + are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of services + that can be unhealthy before the application is + considered in error."nIf the percentage is respected but + there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the + number of unhealthy services of the specific service type + over the total number of services of the specific service + type."nThe computation rounds up to tolerate one failure + on small numbers of services. Default percentage is zero. + } + } + ] + } + } + ], + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + type health policy map item. This is the name of the application + type. + "Value": 0 # Required. The value of the application + type health policy map item."nThe max percent unhealthy applications + allowed for the application type. Must be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The maximum + allowed percentage of unhealthy applications before reporting an error. For + example, to allow 10% of applications to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated percentage of + applications that can be unhealthy before the cluster is considered in + error."nIf the percentage is respected but there is at least one unhealthy + application, the health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy applications over the total number of + application instances in the cluster, excluding applications of application + types that are included in the ApplicationTypeHealthPolicyMap."nThe + computation rounds up to tolerate one failure on small numbers of + applications. Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of unhealthy nodes before reporting an error. For example, to + allow 10% of nodes to be unhealthy, this value would be 10."n"nThe percentage + represents the maximum tolerated percentage of nodes that can be unhealthy + before the cluster is considered in error."nIf the percentage is respected + but there is at least one unhealthy node, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of unhealthy + nodes over the total number of nodes in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero."n"nIn large clusters, some nodes will always be down or out for + repairs, so this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the node type + health policy map item. This is the name of the node type. + "Value": 0 # Required. The value of the node type + health policy map item."nIf the percentage is respected but there is + at least one unhealthy node in the node type, the health is evaluated + as Warning. "nThe percentage is calculated by dividing the number of + unhealthy nodes over the total number of nodes in the node type. + "nThe computation rounds up to tolerate one failure on small numbers + of nodes."nThe max percent unhealthy nodes allowed for the node type. + Must be between zero and 100. + } + ] + } + } + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "ApplicationHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "Name": "str" # Optional. The name of the application, + including the 'fabric:' URI scheme. + } + ], + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "NodeHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "Id": { + "Id": "str" # Optional. Value of the node Id. This + is a 128 bit integer. + }, + "Name": "str" # Optional. The name of a Service Fabric node. + } + ], + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if cluster_health_policies is not None: + _json = cluster_health_policies + else: + _json = None + + request = build_get_cluster_health_using_policy_request( + api_version=api_version, + content_type=content_type, + json=_json, + nodes_health_state_filter=nodes_health_state_filter, + applications_health_state_filter=applications_health_state_filter, + events_health_state_filter=events_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + include_system_application_health_statistics=include_system_application_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_cluster_health_chunk( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric cluster using health chunks. + + Gets the health of a Service Fabric cluster using health chunks. Includes the aggregated health + state of the cluster, but none of the cluster entities. + To expand the cluster health and get the health state of all or some of the entities, use the + POST URI and specify the cluster health chunk query description. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ApplicationHealthStateChunks": { + "Items": [ + { + "ApplicationName": "str", # Optional. The name of + the application, including the 'fabric:' URI scheme. + "ApplicationTypeName": "str", # Optional. The + application type name as defined in the application manifest. + "DeployedApplicationHealthStateChunks": { + "Items": [ + { + "DeployedServicePackageHealthStateChunks": { + "Items": [ + { + "HealthState": "str", # Optional. The health + state of a Service Fabric entity such as + Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", + "Unknown". + "ServiceManifestName": "str", # Optional. + The name of the service manifest. + "ServicePackageActivationId": "str" # + Optional. The ActivationId of a deployed + service package. If + ServicePackageActivationMode specified at the + time of creating the service"nis + 'SharedProcess' (or if it is not specified, + in which case it defaults to + 'SharedProcess'), then value of + ServicePackageActivationId"nis always an + empty string. + } + ] + }, + "HealthState": "str", # + Optional. The health state of a Service Fabric entity + such as Cluster, Node, Application, Service, Partition, + Replica etc. Known values are: "Invalid", "Ok", + "Warning", "Error", "Unknown". + "NodeName": "str" # + Optional. The name of node where the application is + deployed. + } + ] + }, + "HealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, + Service, Partition, Replica etc. Known values are: "Invalid", "Ok", + "Warning", "Error", "Unknown". + "ServiceHealthStateChunks": { + "Items": [ + { + "HealthState": "str", # + Optional. The health state of a Service Fabric entity + such as Cluster, Node, Application, Service, Partition, + Replica etc. Known values are: "Invalid", "Ok", + "Warning", "Error", "Unknown". + "PartitionHealthStateChunks": + { + "Items": [ + { + "HealthState": "str", # Optional. The health + state of a Service Fabric entity such as + Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", + "Unknown". + "PartitionId": str, # Optional. The Id of + the partition. + "ReplicaHealthStateChunks": { + "Items": [ + { + "HealthState": "str", # + Optional. The health state of a + Service Fabric entity such as + Cluster, Node, Application, + Service, Partition, Replica etc. + Known values are: "Invalid", + "Ok", "Warning", "Error", + "Unknown". + "ReplicaOrInstanceId": "str" # + Optional. Id of a stateful + service replica or a stateless + service instance. This ID is used + in the queries that apply to both + stateful and stateless services. + It is used by Service Fabric to + uniquely identify a replica of a + partition of a stateful service + or an instance of a stateless + service partition. It is unique + within a partition and does not + change for the lifetime of the + replica or the instance. If a + stateful replica gets dropped and + another replica gets created on + the same node for the same + partition, it will get a + different value for the ID. If a + stateless instance is failed over + on the same or different node it + will get a different value for + the ID. + } + ] + } + } + ] + }, + "ServiceName": "str" # + Optional. The name of the service whose health state + chunk is provided in this object. + } + ] + } + } + ], + "TotalCount": 0.0 # Optional. Total number of entity health state + objects that match the specified filters from the cluster health chunk query + description. + }, + "HealthState": "str", # Optional. The HealthState representing the + aggregated health state of the cluster computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired cluster + health policy and the application health policies. Known values are: "Invalid", + "Ok", "Warning", "Error", "Unknown". + "NodeHealthStateChunks": { + "Items": [ + { + "HealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, + Service, Partition, Replica etc. Known values are: "Invalid", "Ok", + "Warning", "Error", "Unknown". + "NodeName": "str" # Optional. The name of a Service + Fabric node. + } + ], + "TotalCount": 0.0 # Optional. Total number of entity health state + objects that match the specified filters from the cluster health chunk query + description. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_cluster_health_chunk_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_cluster_health_chunk_using_policy_and_advanced_filters( + self, + cluster_health_chunk_query_description: Optional[JSON] = None, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric cluster using health chunks. + + Gets the health of a Service Fabric cluster using health chunks. The health evaluation is done + based on the input cluster health chunk query description. + The query description allows users to specify health policies for evaluating the cluster and + its children. + Users can specify very flexible filters to select which cluster entities to return. The + selection can be done based on the entities health state and based on the hierarchy. + The query can return multi-level children of the entities based on the specified filters. For + example, it can return one application with a specified name, and for this application, return + only services that are in Error or Warning, and all partitions and replicas for one of these + services. + + :param cluster_health_chunk_query_description: Describes the cluster and application health + policies used to evaluate the cluster health and the filters to select which cluster entities + to be returned. + If the cluster health policy is present, it is used to evaluate the cluster events and the + cluster nodes. If not present, the health evaluation uses the cluster health policy defined in + the cluster manifest or the default cluster health policy. + By default, each application is evaluated using its specific application health policy, + defined in the application manifest, or the default health policy, if no policy is defined in + manifest. + If the application health policy map is specified, and it has an entry for an application, the + specified application health policy + is used to evaluate the application health. + Users can specify very flexible filters to select which cluster entities to include in + response. The selection can be done based on the entities health state and based on the + hierarchy. + The query can return multi-level children of the entities based on the specified filters. For + example, it can return one application with a specified name, and for this application, return + only services that are in Error or Warning, and all partitions and replicas for one of these + services. Default value is None. + :type cluster_health_chunk_query_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + cluster_health_chunk_query_description = { + "ApplicationFilters": [ + { + "ApplicationNameFilter": "str", # Optional. The name of the + application that matches the filter, as a fabric uri. The filter is + applied only to the specified application, if it exists."nIf the + application doesn't exist, no application is returned in the cluster + health chunk based on this filter."nIf the application exists, it is + included in the cluster health chunk if it respects the other filter + properties."nIf not specified, all applications are matched against the + other filter members, like health state filter. + "ApplicationTypeNameFilter": "str", # Optional. The name of + the application type that matches the filter."nIf specified, the filter + is applied only to applications of the selected application type, if any + exists."nIf no applications of the specified application type exists, no + application is returned in the cluster health chunk based on this + filter."nEach application of the specified application type is included + in the cluster health chunk if it respects the other filter + properties."nIf not specified, all applications are matched against the + other filter members, like health state filter. + "DeployedApplicationFilters": [ + { + "DeployedServicePackageFilters": [ + { + "HealthStateFilter": 0, # + Optional. The filter for the health state of the deployed + service packages. It allows selecting deployed service + packages if they match the desired health states."nThe + possible values are integer value of one of the following + health states. Only deployed service packages that match + the filter are returned. All deployed service packages + are used to evaluate the parent deployed application + aggregated health state."nIf not specified, default value + is None, unless the deployed service package ID is + specified. If the filter has default value and deployed + service package ID is specified, the matching deployed + service package is returned."nThe state values are + flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' + operator."nFor example, if the provided value is 6, it + matches deployed service packages with HealthState value + of OK (2) and Warning (4)."n"n"n* Default - Default + value. Matches any HealthState. The value is zero."n* + None - Filter that doesn't match any HealthState value. + Used in order to return no results on a given collection + of states. The value is 1."n* Ok - Filter that matches + input with HealthState value Ok. The value is 2."n* + Warning - Filter that matches input with HealthState + value Warning. The value is 4."n* Error - Filter that + matches input with HealthState value Error. The value is + 8."n* All - Filter that matches input with any + HealthState value. The value is 65535. + "ServiceManifestNameFilter": + "str", # Optional. The name of the service manifest + which identifies the deployed service packages that + matches the filter."nIf specified, the filter is applied + only to the specified deployed service packages, if + any."nIf no deployed service packages with specified + manifest name exist, nothing is returned in the cluster + health chunk based on this filter."nIf any deployed + service package exists, they are included in the cluster + health chunk if it respects the other filter + properties."nIf not specified, all deployed service + packages that match the parent filters (if any) are taken + into consideration and matched against the other filter + members, like health state filter. + "ServicePackageActivationIdFilter": "str" # Optional. + The activation ID of a deployed service package that + matches the filter."nIf not specified, the filter applies + to all deployed service packages that match the other + parameters."nIf specified, the filter matches only the + deployed service package with the specified activation + ID. + } + ], + "HealthStateFilter": 0, # Optional. The + filter for the health state of the deployed applications. It + allows selecting deployed applications if they match the desired + health states."nThe possible values are integer value of one of + the following health states. Only deployed applications that + match the filter are returned. All deployed applications are used + to evaluate the cluster aggregated health state."nIf 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."nThe + state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' + operator."nFor example, if the provided value is 6, it matches + deployed applications with HealthState value of OK (2) and + Warning (4)."n"n"n* Default - Default value. Matches any + HealthState. The value is zero."n* None - Filter that doesn't + match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1."n* Ok - Filter + that matches input with HealthState value Ok. The value is 2."n* + Warning - Filter that matches input with HealthState value + Warning. The value is 4."n* Error - Filter that matches input + with HealthState value Error. The value is 8."n* All - Filter + that matches input with any HealthState value. The value is + 65535. + "NodeNameFilter": "str" # Optional. The name + of the node where the application is deployed in order to match + the filter."nIf specified, the filter is applied only to the + application deployed on the specified node."nIf the application + is not deployed on the node with the specified name, no deployed + application is returned in the cluster health chunk based on this + filter."nOtherwise, the deployed application is included in the + cluster health chunk if it respects the other filter + properties."nIf not specified, all deployed applications that + match the parent filters (if any) are taken into consideration + and matched against the other filter members, like health state + filter. + } + ], + "HealthStateFilter": 0, # Optional. The filter for the + health state of the applications. It allows selecting applications if + they match the desired health states."nThe possible values are integer + value of one of the following health states. Only applications that match + the filter are returned. All applications are used to evaluate the + cluster aggregated health state."nIf 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."nThe state values are + flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator."nFor example, if the + provided value is 6, it matches applications with HealthState value of OK + (2) and Warning (4)."n"n"n* Default - Default value. Matches any + HealthState. The value is zero."n* None - Filter that doesn't match any + HealthState value. Used in order to return no results on a given + collection of states. The value is 1."n* Ok - Filter that matches input + with HealthState value Ok. The value is 2."n* Warning - Filter that + matches input with HealthState value Warning. The value is 4."n* Error - + Filter that matches input with HealthState value Error. The value is + 8."n* All - Filter that matches input with any HealthState value. The + value is 65535. + "ServiceFilters": [ + { + "HealthStateFilter": 0, # Optional. The + filter for the health state of the services. It allows selecting + services if they match the desired health states."nThe possible + values are integer value of one of the following health states. + Only services that match the filter are returned. All services + are used to evaluate the cluster aggregated health state."nIf 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."nThe state values + are flag-based enumeration, so the value could be a combination + of these values obtained using bitwise 'OR' operator."nFor + example, if the provided value is 6, it matches services with + HealthState value of OK (2) and Warning (4)."n"n"n* Default - + Default value. Matches any HealthState. The value is zero."n* + None - Filter that doesn't match any HealthState value. Used in + order to return no results on a given collection of states. The + value is 1."n* Ok - Filter that matches input with HealthState + value Ok. The value is 2."n* Warning - Filter that matches input + with HealthState value Warning. The value is 4."n* Error - Filter + that matches input with HealthState value Error. The value is + 8."n* All - Filter that matches input with any HealthState value. + The value is 65535. + "PartitionFilters": [ + { + "HealthStateFilter": 0, # + Optional. The filter for the health state of the + partitions. It allows selecting partitions if they match + the desired health states."nThe possible values are + integer value of one of the following health states. Only + partitions that match the filter are returned. All + partitions are used to evaluate the cluster aggregated + health state."nIf 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."nThe state values are flag-based + enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator."nFor + example, if the provided value is 6, it matches + partitions with HealthState value of OK (2) and Warning + (4)."n"n"n* Default - Default value. Matches any + HealthState. The value is zero."n* None - Filter that + doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The + value is 1."n* Ok - Filter that matches input with + HealthState value Ok. The value is 2."n* Warning - Filter + that matches input with HealthState value Warning. The + value is 4."n* Error - Filter that matches input with + HealthState value Error. The value is 8."n* All - Filter + that matches input with any HealthState value. The value + is 65535. + "PartitionIdFilter": str, # + Optional. ID of the partition that matches the filter. + The filter is applied only to the specified partition, if + it exists."nIf the partition doesn't exist, no partition + is returned in the cluster health chunk based on this + filter."nIf the partition exists, it is included in the + cluster health chunk if it respects the other filter + properties."nIf not specified, all partitions that match + the parent filters (if any) are taken into consideration + and matched against the other filter members, like health + state filter. + "ReplicaFilters": [ + { + "HealthStateFilter": 0, # Optional. The filter + for the health state of the replicas. It allows + selecting replicas if they match the desired + health states."nThe possible values are integer + value of one of the following health states. Only + replicas that match the filter are returned. All + replicas are used to evaluate the parent + partition aggregated health state."nIf 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."nThe state values + are flag-based enumeration, so the value could be + a combination of these values obtained using + bitwise 'OR' operator."nFor example, if the + provided value is 6, it matches replicas with + HealthState value of OK (2) and Warning + (4)."n"n"n* Default - Default value. Matches any + HealthState. The value is zero."n* None - Filter + that doesn't match any HealthState value. Used in + order to return no results on a given collection + of states. The value is 1."n* Ok - Filter that + matches input with HealthState value Ok. The + value is 2."n* Warning - Filter that matches + input with HealthState value Warning. The value + is 4."n* Error - Filter that matches input with + HealthState value Error. The value is 8."n* All - + Filter that matches input with any HealthState + value. The value is 65535. + "ReplicaOrInstanceIdFilter": "str" # Optional. + Id of the stateful service replica or stateless + service instance that matches the filter. The + filter is applied only to the specified replica, + if it exists."nIf the replica doesn't exist, no + replica is returned in the cluster health chunk + based on this filter."nIf the replica exists, it + is included in the cluster health chunk if it + respects the other filter properties."nIf not + specified, all replicas that match the parent + filters (if any) are taken into consideration and + matched against the other filter members, like + health state filter. + } + ] + } + ], + "ServiceNameFilter": "str" # Optional. The + name of the service that matches the filter. The filter is + applied only to the specified service, if it exists."nIf the + service doesn't exist, no service is returned in the cluster + health chunk based on this filter."nIf the service exists, it is + included as the application's child if the health state matches + the other filter properties."nIf not specified, all services that + match the parent filters (if any) are taken into consideration + and matched against the other filter members, like health state + filter. + } + ] + } + ], + "ApplicationHealthPolicies": { + "ApplicationHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + health policy map item. This is the name of the application. + "Value": { + "ConsiderWarningAsError": bool, # Optional. + Indicates whether warnings are treated with the same severity as + errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to + 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is + respected but there is at least one unhealthy partition, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over the total + number of partitions in the service."nThe computation rounds + up to tolerate one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is + respected but there is at least one unhealthy replica, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the total + number of replicas in the partition."nThe computation rounds + up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # + Optional. The maximum allowed percentage of unhealthy + services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the + application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the + health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to tolerate + one failure on small numbers of services. Default percentage + is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, + # Optional. The maximum allowed percentage of unhealthy deployed + applications. Allowed values are Byte values from zero to + 100."nThe percentage represents the maximum tolerated percentage + of deployed applications that can be unhealthy before the + application is considered in error."nThis is calculated by + dividing the number of unhealthy deployed applications over the + number of nodes where the application is currently deployed on in + the cluster."nThe computation rounds up to tolerate one failure + on small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. + The key of the service type health policy map item. This + is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte + values from zero to 100"n"nThe percentage represents + the maximum tolerated percentage of partitions that + can be unhealthy before the service is considered in + error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe + computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy + replicas per partition. Allowed values are Byte + values from zero to 100."n"nThe percentage represents + the maximum tolerated percentage of replicas that can + be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is + at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the + total number of replicas in the partition."nThe + computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. + Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum + tolerated percentage of services that can be + unhealthy before the application is considered in + error."nIf the percentage is respected but there is + at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to + tolerate one failure on small numbers of services. + Default percentage is zero. + } + } + ] + } + } + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + type health policy map item. This is the name of the application + type. + "Value": 0 # Required. The value of the application + type health policy map item."nThe max percent unhealthy applications + allowed for the application type. Must be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The maximum + allowed percentage of unhealthy applications before reporting an error. For + example, to allow 10% of applications to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated percentage of + applications that can be unhealthy before the cluster is considered in + error."nIf the percentage is respected but there is at least one unhealthy + application, the health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy applications over the total number of + application instances in the cluster, excluding applications of application + types that are included in the ApplicationTypeHealthPolicyMap."nThe + computation rounds up to tolerate one failure on small numbers of + applications. Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of unhealthy nodes before reporting an error. For example, to + allow 10% of nodes to be unhealthy, this value would be 10."n"nThe percentage + represents the maximum tolerated percentage of nodes that can be unhealthy + before the cluster is considered in error."nIf the percentage is respected + but there is at least one unhealthy node, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of unhealthy + nodes over the total number of nodes in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero."n"nIn large clusters, some nodes will always be down or out for + repairs, so this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the node type + health policy map item. This is the name of the node type. + "Value": 0 # Required. The value of the node type + health policy map item."nIf the percentage is respected but there is + at least one unhealthy node in the node type, the health is evaluated + as Warning. "nThe percentage is calculated by dividing the number of + unhealthy nodes over the total number of nodes in the node type. + "nThe computation rounds up to tolerate one failure on small numbers + of nodes."nThe max percent unhealthy nodes allowed for the node type. + Must be between zero and 100. + } + ] + }, + "NodeFilters": [ + { + "HealthStateFilter": 0, # Optional. The filter for the + health state of the nodes. It allows selecting nodes if they match the + desired health states."nThe possible values are integer value of one of + the following health states. Only nodes that match the filter are + returned. All nodes are used to evaluate the cluster aggregated health + state."nIf 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."nThe state values are flag-based + enumeration, so the value could be a combination of these values obtained + using bitwise 'OR' operator."nFor example, if the provided value is 6, it + matches nodes with HealthState value of OK (2) and Warning (4)."n"n"n* + Default - Default value. Matches any HealthState. The value is zero."n* + None - Filter that doesn't match any HealthState value. Used in order to + return no results on a given collection of states. The value is 1."n* Ok + - Filter that matches input with HealthState value Ok. The value is 2."n* + Warning - Filter that matches input with HealthState value Warning. The + value is 4."n* Error - Filter that matches input with HealthState value + Error. The value is 8."n* All - Filter that matches input with any + HealthState value. The value is 65535. + "NodeNameFilter": "str" # Optional. Name of the node that + matches the filter. The filter is applied only to the specified node, if + it exists."nIf the node doesn't exist, no node is returned in the cluster + health chunk based on this filter."nIf the node exists, it is included in + the cluster health chunk if the health state matches the other filter + properties."nIf not specified, all nodes that match the parent filters + (if any) are taken into consideration and matched against the other + filter members, like health state filter. + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "ApplicationHealthStateChunks": { + "Items": [ + { + "ApplicationName": "str", # Optional. The name of + the application, including the 'fabric:' URI scheme. + "ApplicationTypeName": "str", # Optional. The + application type name as defined in the application manifest. + "DeployedApplicationHealthStateChunks": { + "Items": [ + { + "DeployedServicePackageHealthStateChunks": { + "Items": [ + { + "HealthState": "str", # Optional. The health + state of a Service Fabric entity such as + Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", + "Unknown". + "ServiceManifestName": "str", # Optional. + The name of the service manifest. + "ServicePackageActivationId": "str" # + Optional. The ActivationId of a deployed + service package. If + ServicePackageActivationMode specified at the + time of creating the service"nis + 'SharedProcess' (or if it is not specified, + in which case it defaults to + 'SharedProcess'), then value of + ServicePackageActivationId"nis always an + empty string. + } + ] + }, + "HealthState": "str", # + Optional. The health state of a Service Fabric entity + such as Cluster, Node, Application, Service, Partition, + Replica etc. Known values are: "Invalid", "Ok", + "Warning", "Error", "Unknown". + "NodeName": "str" # + Optional. The name of node where the application is + deployed. + } + ] + }, + "HealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, + Service, Partition, Replica etc. Known values are: "Invalid", "Ok", + "Warning", "Error", "Unknown". + "ServiceHealthStateChunks": { + "Items": [ + { + "HealthState": "str", # + Optional. The health state of a Service Fabric entity + such as Cluster, Node, Application, Service, Partition, + Replica etc. Known values are: "Invalid", "Ok", + "Warning", "Error", "Unknown". + "PartitionHealthStateChunks": + { + "Items": [ + { + "HealthState": "str", # Optional. The health + state of a Service Fabric entity such as + Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", + "Unknown". + "PartitionId": str, # Optional. The Id of + the partition. + "ReplicaHealthStateChunks": { + "Items": [ + { + "HealthState": "str", # + Optional. The health state of a + Service Fabric entity such as + Cluster, Node, Application, + Service, Partition, Replica etc. + Known values are: "Invalid", + "Ok", "Warning", "Error", + "Unknown". + "ReplicaOrInstanceId": "str" # + Optional. Id of a stateful + service replica or a stateless + service instance. This ID is used + in the queries that apply to both + stateful and stateless services. + It is used by Service Fabric to + uniquely identify a replica of a + partition of a stateful service + or an instance of a stateless + service partition. It is unique + within a partition and does not + change for the lifetime of the + replica or the instance. If a + stateful replica gets dropped and + another replica gets created on + the same node for the same + partition, it will get a + different value for the ID. If a + stateless instance is failed over + on the same or different node it + will get a different value for + the ID. + } + ] + } + } + ] + }, + "ServiceName": "str" # + Optional. The name of the service whose health state + chunk is provided in this object. + } + ] + } + } + ], + "TotalCount": 0.0 # Optional. Total number of entity health state + objects that match the specified filters from the cluster health chunk query + description. + }, + "HealthState": "str", # Optional. The HealthState representing the + aggregated health state of the cluster computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired cluster + health policy and the application health policies. Known values are: "Invalid", + "Ok", "Warning", "Error", "Unknown". + "NodeHealthStateChunks": { + "Items": [ + { + "HealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, + Service, Partition, Replica etc. Known values are: "Invalid", "Ok", + "Warning", "Error", "Unknown". + "NodeName": "str" # Optional. The name of a Service + Fabric node. + } + ], + "TotalCount": 0.0 # Optional. Total number of entity health state + objects that match the specified filters from the cluster health chunk query + description. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if cluster_health_chunk_query_description is not None: + _json = cluster_health_chunk_query_description + else: + _json = None + + request = build_get_cluster_health_chunk_using_policy_and_advanced_filters_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def report_cluster_health( # pylint: disable=inconsistent-return-statements + self, + health_information: JSON, + *, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric cluster. + + Sends a health report on a Service Fabric cluster. The report must contain the information + about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway node, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetClusterHealth and check that + the report appears in the HealthEvents section. + + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: JSON + :keyword immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :paramtype immediate: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + health_information = { + "Description": "str", # Optional. The description of the health information. + It represents free text used to add human readable information about the + report."nThe maximum string length for the description is 4096 characters."nIf + the provided string is longer, it will be automatically truncated."nWhen + truncated, the last characters of the description contain a marker "[Truncated]", + and total string size is 4096 characters."nThe presence of the marker indicates + to users that truncation occurred."nNote that when truncated, the description has + less than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID which identifies the + health report and can be used to find more detailed information about a specific + health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Property": "str", # Required. The property of the health information. An + entity can have health reports for different properties."nThe property is a + string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report."nFor example, a reporter + with SourceId "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same reporter + can monitor the node connectivity, so it can report a property "Connectivity" on + the same node."nIn the health store, these reports are treated as separate health + events for the specified node."n"nTogether with the SourceId, the property + uniquely identifies the health information. + "RemoveWhenExpired": bool, # Optional. Value that indicates whether the + report is removed from health store when it expires."nIf set to true, the report + is removed from the health store after it expires."nIf set to false, the report + is treated as an error when expired. The value of this property is false by + default."nWhen clients report periodically, they should set RemoveWhenExpired + false (default)."nThis way, if the reporter has issues (e.g. deadlock) and can't + report, the entity is evaluated at error when the health report expires."nThis + flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for this health + report as a numeric string."nThe report sequence number is used by the health + store to detect stale reports."nIf not specified, a sequence number is + auto-generated by the health client when a report is added. + "SourceId": "str", # Required. The source name that identifies the + client/watchdog/system component that generated the health information. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The duration for + which this health report is valid. This field uses ISO8601 format for specifying + the duration."nWhen clients report periodically, they should send reports with + higher frequency than time to live."nIf clients report on transition, they can + set the time to live to infinite."nWhen time to live expires, the health event + that contains the health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = health_information + + request = build_report_cluster_health_request( + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_provisioned_fabric_code_version_info_list( + self, + *, + code_version: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets a list of fabric code versions that are provisioned in a Service Fabric cluster. + + Gets a list of information about fabric code versions that are provisioned in the cluster. The + parameter CodeVersion can be used to optionally filter the output to only that particular + version. + + :keyword code_version: The product version of Service Fabric. Default value is None. + :paramtype code_version: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "CodeVersion": "str" # Optional. The product version of Service + Fabric. + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_provisioned_fabric_code_version_info_list_request( + api_version=api_version, + code_version=code_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def get_provisioned_fabric_config_version_info_list( + self, + *, + config_version: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets a list of fabric config versions that are provisioned in a Service Fabric cluster. + + Gets a list of information about fabric config versions that are provisioned in the cluster. + The parameter ConfigVersion can be used to optionally filter the output to only that particular + version. + + :keyword config_version: The config version of Service Fabric. Default value is None. + :paramtype config_version: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "ConfigVersion": "str" # Optional. The config version of Service + Fabric. + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_provisioned_fabric_config_version_info_list_request( + api_version=api_version, + config_version=config_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def get_cluster_upgrade_progress( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the progress of the current cluster upgrade. + + Gets the current progress of the ongoing cluster upgrade. If no upgrade is currently in + progress, get the last state of the previous cluster upgrade. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "CodeVersion": "str", # Optional. The ServiceFabric code version of the + cluster. + "ConfigVersion": "str", # Optional. The cluster configuration version + (specified in the cluster manifest). + "CurrentUpgradeDomainProgress": { + "DomainName": "str", # Optional. The name of the upgrade domain. + "NodeUpgradeProgressList": [ + { + "NodeName": "str", # Optional. The name of a Service + Fabric node. + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ], + "UpgradeDuration": "str", # Optional. The estimated + time spent processing the node since it was deactivated during a + node-by-node upgrade. + "UpgradePhase": "str" # Optional. The state of the + upgrading node. Known values are: "Invalid", "PreUpgradeSafetyCheck", + "Upgrading", "PostUpgradeSafetyCheck". + } + ] + }, + "CurrentUpgradeUnitsProgress": { + "DomainName": "str", # Optional. The name of the upgrade domain. Not + applicable to node-by-node upgrades. + "NodeUpgradeProgressList": [ + { + "NodeName": "str", # Optional. The name of a Service + Fabric node. + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ], + "UpgradeDuration": "str", # Optional. The estimated + time spent processing the node since it was deactivated during a + node-by-node upgrade. + "UpgradePhase": "str" # Optional. The state of the + upgrading node. Known values are: "Invalid", "PreUpgradeSafetyCheck", + "Upgrading", "PostUpgradeSafetyCheck". + } + ] + }, + "FailureReason": "str", # Optional. The cause of an upgrade failure that + resulted in FailureAction being executed. Known values are: "None", + "Interrupted", "HealthCheck", "UpgradeDomainTimeout", "OverallUpgradeTimeout". + "FailureTimestampUtc": "str", # Optional. The failure time of the upgrade in + UTC. + "IsNodeByNode": bool, # Optional. Indicates whether this upgrade is + node-by-node. + "NextUpgradeDomain": "str", # Optional. The name of the next upgrade domain + to be processed. Not applicable to node-by-node upgrades. + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value is + "UnmonitoredAuto". The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "StartTimestampUtc": "str", # Optional. The start time of the upgrade in + UTC. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ], + "UpgradeDescription": { + "ApplicationHealthPolicyMap": { + "ApplicationHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the + application health policy map item. This is the name of the + application. + "Value": { + "ConsiderWarningAsError": bool, # + Optional. Indicates whether warnings are treated with the + same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte values + from zero to 100"n"nThe percentage represents the maximum + tolerated percentage of partitions that can be unhealthy + before the service is considered in error."nIf the + percentage is respected but there is at least one + unhealthy partition, the health is evaluated as + Warning."nThe percentage is calculated by dividing the + number of unhealthy partitions over the total number of + partitions in the service."nThe computation rounds up to + tolerate one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy + replicas per partition. Allowed values are Byte values + from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of replicas that can be + unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at + least one unhealthy replica, the health is evaluated as + Warning."nThe percentage is calculated by dividing the + number of unhealthy replicas over the total number of + replicas in the partition."nThe computation rounds up to + tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum + allowed percentage of unhealthy services. Allowed values + are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of services + that can be unhealthy before the application is + considered in error."nIf the percentage is respected but + there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the + number of unhealthy services of the specific service type + over the total number of services of the specific service + type."nThe computation rounds up to tolerate one failure + on small numbers of services. Default percentage is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. + The maximum allowed percentage of unhealthy deployed + applications. Allowed values are Byte values from zero to + 100."nThe percentage represents the maximum tolerated + percentage of deployed applications that can be unhealthy + before the application is considered in error."nThis is + calculated by dividing the number of unhealthy deployed + applications over the number of nodes where the application + is currently deployed on in the cluster."nThe computation + rounds up to tolerate one failure on small numbers of nodes. + Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # + Required. The key of the service type health policy + map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of + unhealthy partitions per service. Allowed values + are Byte values from zero to 100"n"nThe + percentage represents the maximum tolerated + percentage of partitions that can be unhealthy + before the service is considered in error."nIf + the percentage is respected but there is at least + one unhealthy partition, the health is evaluated + as Warning."nThe percentage is calculated by + dividing the number of unhealthy partitions over + the total number of partitions in the + service."nThe computation rounds up to tolerate + one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of + unhealthy replicas per partition. Allowed values + are Byte values from zero to 100."n"nThe + percentage represents the maximum tolerated + percentage of replicas that can be unhealthy + before the partition is considered in error."nIf + the percentage is respected but there is at least + one unhealthy replica, the health is evaluated as + Warning."nThe percentage is calculated by + dividing the number of unhealthy replicas over + the total number of replicas in the + partition."nThe computation rounds up to tolerate + one failure on small numbers of replicas. Default + percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. + Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum + tolerated percentage of services that can be + unhealthy before the application is considered in + error."nIf the percentage is respected but there + is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by + dividing the number of unhealthy services of the + specific service type over the total number of + services of the specific service type."nThe + computation rounds up to tolerate one failure on + small numbers of services. Default percentage is + zero. + } + } + ] + } + } + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the + application type health policy map item. This is the name of the + application type. + "Value": 0 # Required. The value of the + application type health policy map item."nThe max percent + unhealthy applications allowed for the application type. Must be + between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates + whether warnings are treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The + maximum allowed percentage of unhealthy applications before reporting an + error. For example, to allow 10% of applications to be unhealthy, this + value would be 10."n"nThe percentage represents the maximum tolerated + percentage of applications that can be unhealthy before the cluster is + considered in error."nIf the percentage is respected but there is at + least one unhealthy application, the health is evaluated as + Warning."nThis is calculated by dividing the number of unhealthy + applications over the total number of application instances in the + cluster, excluding applications of application types that are included in + the ApplicationTypeHealthPolicyMap."nThe computation rounds up to + tolerate one failure on small numbers of applications. Default percentage + is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum + allowed percentage of unhealthy nodes before reporting an error. For + example, to allow 10% of nodes to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated percentage of + nodes that can be unhealthy before the cluster is considered in + error."nIf the percentage is respected but there is at least one + unhealthy node, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy nodes over the total + number of nodes in the cluster."nThe computation rounds up to tolerate + one failure on small numbers of nodes. Default percentage is zero."n"nIn + large clusters, some nodes will always be down or out for repairs, so + this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the + node type health policy map item. This is the name of the node + type. + "Value": 0 # Required. The value of the node + type health policy map item."nIf the percentage is respected but + there is at least one unhealthy node in the node type, the health + is evaluated as Warning. "nThe percentage is calculated by + dividing the number of unhealthy nodes over the total number of + nodes in the node type. "nThe computation rounds up to tolerate + one failure on small numbers of nodes."nThe max percent unhealthy + nodes allowed for the node type. Must be between zero and 100. + } + ] + }, + "ClusterUpgradeHealthPolicy": { + "MaxPercentDeltaUnhealthyNodes": 0, # Optional. The maximum + allowed percentage of nodes health degradation allowed during cluster + upgrades. The delta is measured between the state of the nodes at the + beginning of upgrade and the state of the nodes at the time of the health + evaluation. The check is performed after every upgrade domain upgrade + completion to make sure the global state of the cluster is within + tolerated limits. The default value is 10%. + "MaxPercentUpgradeDomainDeltaUnhealthyNodes": 0 # Optional. + The maximum allowed percentage of upgrade domain nodes health degradation + allowed during cluster upgrades. The delta is measured between the state + of the upgrade domain nodes at the beginning of upgrade and the state of + the upgrade domain nodes at the time of the health evaluation. The check + is performed after every upgrade domain upgrade completion for all + completed upgrade domains to make sure the state of the upgrade domains + is within tolerated limits. The default value is 15%. + }, + "CodeVersion": "str", # Optional. The ServiceFabric code version of + the cluster. + "ConfigVersion": "str", # Optional. The cluster configuration + version (specified in the cluster manifest). + "EnableDeltaHealthEvaluation": bool, # Optional. When true, enables + delta health evaluation rather than absolute health evaluation after + completion of each upgrade domain. + "ForceRestart": bool, # Optional. If true, then processes are + forcefully restarted during upgrade even when the code version has not + changed (the upgrade only changes configuration or data). + "MonitoringPolicy": { + "FailureAction": "str", # Optional. The compensating action + to perform when a Monitored upgrade encounters monitoring policy or + health policy violations."nInvalid indicates the failure action is + invalid. Rollback specifies that the upgrade will start rolling back + automatically."nManual indicates that the upgrade will switch to + UnmonitoredManual upgrade mode. Known values are: "Invalid", "Rollback", + "Manual". + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # + Optional. Default value is "PT0H10M0S". The amount of time to retry + health evaluation when the application or cluster is unhealthy before + FailureAction is executed. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # + Optional. Default value is "PT0H2M0S". The amount of time that the + application or cluster must remain healthy before the upgrade proceeds to + the next upgrade domain. It is first interpreted as a string representing + an ISO 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. + Default value is "0". The amount of time to wait after completing an + upgrade domain before applying health policies. It is first interpreted + as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + "UpgradeDomainTimeoutInMilliseconds": + "P10675199DT02H48M05.4775807S", # Optional. Default value is + "P10675199DT02H48M05.4775807S". The amount of time each upgrade domain + has to complete before FailureAction is executed. It is first interpreted + as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + "UpgradeTimeoutInMilliseconds": + "P10675199DT02H48M05.4775807S" # Optional. Default value is + "P10675199DT02H48M05.4775807S". The amount of time the overall upgrade + has to complete before FailureAction is executed. It is first interpreted + as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + }, + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value + is "UnmonitoredAuto". The mode used to monitor health during a rolling + upgrade. The values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "SortOrder": "Default", # Optional. Default value is "Default". + Defines the order in which an upgrade proceeds through the cluster. Known + values are: "Invalid", "Default", "Numeric", "Lexicographical", + "ReverseNumeric", "ReverseLexicographical". Default value: "Default". + "UpgradeKind": "Rolling", # Optional. Default value is "Rolling". + The kind of upgrade out of the following possible values. Known values are: + "Invalid", "Rolling". Default value: "Rolling". + "UpgradeReplicaSetCheckTimeoutInSeconds": 42949672925 # Optional. + Default value is 42949672925. The maximum amount of time to block processing + of an upgrade domain and prevent loss of availability when there are + unexpected issues. When this timeout expires, processing of the upgrade + domain will proceed regardless of availability loss issues. The timeout is + reset at the start of each upgrade domain. Valid values are between 0 and + 42949672925 inclusive. (unsigned 32-bit integer). + }, + "UpgradeDomainDurationInMilliseconds": "str", # Optional. The estimated + elapsed time spent processing the current upgrade domain. Not applicable to + node-by-node upgrades. + "UpgradeDomainProgressAtFailure": { + "DomainName": "str", # Optional. The name of the upgrade domain. + "NodeUpgradeProgressList": [ + { + "NodeName": "str", # Optional. The name of a Service + Fabric node. + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ], + "UpgradeDuration": "str", # Optional. The estimated + time spent processing the node since it was deactivated during a + node-by-node upgrade. + "UpgradePhase": "str" # Optional. The state of the + upgrading node. Known values are: "Invalid", "PreUpgradeSafetyCheck", + "Upgrading", "PostUpgradeSafetyCheck". + } + ] + }, + "UpgradeDomains": [ + { + "Name": "str", # Optional. The name of the upgrade domain. + "State": "str" # Optional. The state of the upgrade domain. + Known values are: "Invalid", "Pending", "InProgress", "Completed". + } + ], + "UpgradeDurationInMilliseconds": "str", # Optional. The estimated elapsed + time spent processing the current overall upgrade. + "UpgradeState": "str", # Optional. The state of the upgrade domain. Known + values are: "Invalid", "RollingBackInProgress", "RollingBackCompleted", + "RollingForwardPending", "RollingForwardInProgress", "RollingForwardCompleted", + "Failed". + "UpgradeUnits": [ + { + "Name": "str", # Optional. The name of the upgrade unit. + "State": "str" # Optional. The state of the upgrade unit. + Known values are: "Invalid", "Pending", "InProgress", "Completed", + "Failed". + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_cluster_upgrade_progress_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_cluster_configuration( + self, + *, + configuration_api_version: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """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. + + :keyword configuration_api_version: The API version of the Standalone cluster json + configuration. + :paramtype configuration_api_version: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ClusterConfiguration": "str" # Optional. The contents of the cluster + configuration file. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_cluster_configuration_request( + api_version=api_version, + configuration_api_version=configuration_api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_cluster_configuration_upgrade_status( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the cluster configuration upgrade status of a Service Fabric standalone cluster. + + Get the cluster configuration upgrade status details of a Service Fabric standalone cluster. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ConfigVersion": "str", # Optional. The cluster configuration version. + "Details": "str", # Optional. The cluster upgrade status details. + "ProgressStatus": 0, # Optional. The cluster manifest version. + "UpgradeState": "str" # Optional. The state of the upgrade domain. Known + values are: "Invalid", "RollingBackInProgress", "RollingBackCompleted", + "RollingForwardPending", "RollingForwardInProgress", "RollingForwardCompleted", + "Failed". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_cluster_configuration_upgrade_status_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_upgrade_orchestration_service_state( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the service state of Service Fabric Upgrade Orchestration Service. + + Get the service state of Service Fabric Upgrade Orchestration Service. This API is internally + used for support purposes. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ServiceState": "str" # Optional. The state of Service Fabric Upgrade + Orchestration Service. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_upgrade_orchestration_service_state_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def set_upgrade_orchestration_service_state( + self, + upgrade_orchestration_service_state: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Update the service state of Service Fabric Upgrade Orchestration Service. + + Update the service state of Service Fabric Upgrade Orchestration Service. This API is + internally used for support purposes. + + :param upgrade_orchestration_service_state: Service state of Service Fabric Upgrade + Orchestration Service. + :type upgrade_orchestration_service_state: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + upgrade_orchestration_service_state = { + "ServiceState": "str" # Optional. The state of Service Fabric Upgrade + Orchestration Service. + } + + # response body for status code(s): 200 + response.json() == { + "CurrentCodeVersion": "str", # Optional. The current code version of the + cluster. + "CurrentManifestVersion": "str", # Optional. The current manifest version of + the cluster. + "PendingUpgradeType": "str", # Optional. The type of the pending upgrade of + the cluster. + "TargetCodeVersion": "str", # Optional. The target code version of the + cluster. + "TargetManifestVersion": "str" # Optional. The target manifest version of + the cluster. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = upgrade_orchestration_service_state + + request = build_set_upgrade_orchestration_service_state_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def provision_cluster( # pylint: disable=inconsistent-return-statements + self, + provision_fabric_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Provision the code or configuration packages of a Service Fabric cluster. + + Validate and provision the code or configuration packages of a Service Fabric cluster. + + :param provision_fabric_description: Describes the parameters for provisioning a cluster. + :type provision_fabric_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + provision_fabric_description = { + "ClusterManifestFilePath": "str", # Optional. The cluster manifest file + path. + "CodeFilePath": "str" # Optional. The cluster code package file path. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = provision_fabric_description + + request = build_provision_cluster_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def unprovision_cluster( # pylint: disable=inconsistent-return-statements + self, + unprovision_fabric_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Unprovision the code or configuration packages of a Service Fabric cluster. + + It is supported to unprovision code and configuration separately. + + :param unprovision_fabric_description: Describes the parameters for unprovisioning a cluster. + :type unprovision_fabric_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + unprovision_fabric_description = { + "CodeVersion": "str", # Optional. The cluster code package version. + "ConfigVersion": "str" # Optional. The cluster manifest version. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = unprovision_fabric_description + + request = build_unprovision_cluster_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def rollback_cluster_upgrade( # pylint: disable=inconsistent-return-statements + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Roll back the upgrade of a Service Fabric cluster. + + Roll back the code or configuration upgrade of a Service Fabric cluster. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_rollback_cluster_upgrade_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def resume_cluster_upgrade( # pylint: disable=inconsistent-return-statements + self, + resume_cluster_upgrade_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Make the cluster upgrade move on to the next upgrade domain. + + Make the cluster code or configuration upgrade move on to the next upgrade domain if + appropriate. + + :param resume_cluster_upgrade_description: Describes the parameters for resuming a cluster + upgrade. + :type resume_cluster_upgrade_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + resume_cluster_upgrade_description = { + "UpgradeDomain": "str" # Required. The next upgrade domain for this cluster + upgrade. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = resume_cluster_upgrade_description + + request = build_resume_cluster_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def start_cluster_upgrade( # pylint: disable=inconsistent-return-statements + self, + start_cluster_upgrade_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Start upgrading the code or configuration version of a Service Fabric cluster. + + Validate the supplied upgrade parameters and start upgrading the code or configuration version + of a Service Fabric cluster if the parameters are valid. + + :param start_cluster_upgrade_description: Describes the parameters for starting a cluster + upgrade. + :type start_cluster_upgrade_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + start_cluster_upgrade_description = { + "ApplicationHealthPolicyMap": { + "ApplicationHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + health policy map item. This is the name of the application. + "Value": { + "ConsiderWarningAsError": bool, # Optional. + Indicates whether warnings are treated with the same severity as + errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to + 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is + respected but there is at least one unhealthy partition, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over the total + number of partitions in the service."nThe computation rounds + up to tolerate one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is + respected but there is at least one unhealthy replica, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the total + number of replicas in the partition."nThe computation rounds + up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # + Optional. The maximum allowed percentage of unhealthy + services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the + application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the + health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to tolerate + one failure on small numbers of services. Default percentage + is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, + # Optional. The maximum allowed percentage of unhealthy deployed + applications. Allowed values are Byte values from zero to + 100."nThe percentage represents the maximum tolerated percentage + of deployed applications that can be unhealthy before the + application is considered in error."nThis is calculated by + dividing the number of unhealthy deployed applications over the + number of nodes where the application is currently deployed on in + the cluster."nThe computation rounds up to tolerate one failure + on small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. + The key of the service type health policy map item. This + is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte + values from zero to 100"n"nThe percentage represents + the maximum tolerated percentage of partitions that + can be unhealthy before the service is considered in + error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe + computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy + replicas per partition. Allowed values are Byte + values from zero to 100."n"nThe percentage represents + the maximum tolerated percentage of replicas that can + be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is + at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the + total number of replicas in the partition."nThe + computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. + Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum + tolerated percentage of services that can be + unhealthy before the application is considered in + error."nIf the percentage is respected but there is + at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to + tolerate one failure on small numbers of services. + Default percentage is zero. + } + } + ] + } + } + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + type health policy map item. This is the name of the application + type. + "Value": 0 # Required. The value of the application + type health policy map item."nThe max percent unhealthy applications + allowed for the application type. Must be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The maximum + allowed percentage of unhealthy applications before reporting an error. For + example, to allow 10% of applications to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated percentage of + applications that can be unhealthy before the cluster is considered in + error."nIf the percentage is respected but there is at least one unhealthy + application, the health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy applications over the total number of + application instances in the cluster, excluding applications of application + types that are included in the ApplicationTypeHealthPolicyMap."nThe + computation rounds up to tolerate one failure on small numbers of + applications. Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of unhealthy nodes before reporting an error. For example, to + allow 10% of nodes to be unhealthy, this value would be 10."n"nThe percentage + represents the maximum tolerated percentage of nodes that can be unhealthy + before the cluster is considered in error."nIf the percentage is respected + but there is at least one unhealthy node, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of unhealthy + nodes over the total number of nodes in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero."n"nIn large clusters, some nodes will always be down or out for + repairs, so this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the node type + health policy map item. This is the name of the node type. + "Value": 0 # Required. The value of the node type + health policy map item."nIf the percentage is respected but there is + at least one unhealthy node in the node type, the health is evaluated + as Warning. "nThe percentage is calculated by dividing the number of + unhealthy nodes over the total number of nodes in the node type. + "nThe computation rounds up to tolerate one failure on small numbers + of nodes."nThe max percent unhealthy nodes allowed for the node type. + Must be between zero and 100. + } + ] + }, + "ClusterUpgradeHealthPolicy": { + "MaxPercentDeltaUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of nodes health degradation allowed during cluster upgrades. The + delta is measured between the state of the nodes at the beginning of upgrade + and the state of the nodes at the time of the health evaluation. The check is + performed after every upgrade domain upgrade completion to make sure the + global state of the cluster is within tolerated limits. The default value is + 10%. + "MaxPercentUpgradeDomainDeltaUnhealthyNodes": 0 # Optional. The + maximum allowed percentage of upgrade domain nodes health degradation allowed + during cluster upgrades. The delta is measured between the state of the + upgrade domain nodes at the beginning of upgrade and the state of the upgrade + domain nodes at the time of the health evaluation. The check is performed + after every upgrade domain upgrade completion for all completed upgrade + domains to make sure the state of the upgrade domains is within tolerated + limits. The default value is 15%. + }, + "CodeVersion": "str", # Optional. The cluster code version. + "ConfigVersion": "str", # Optional. The cluster configuration version. + "EnableDeltaHealthEvaluation": bool, # Optional. When true, enables delta + health evaluation rather than absolute health evaluation after completion of each + upgrade domain. + "ForceRestart": bool, # Optional. If true, then processes are forcefully + restarted during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + "InstanceCloseDelayDurationInSeconds": 4294967295, # Optional. Default value + is 4294967295. Duration in seconds, to wait before a stateless instance is + closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster"nupgrade, only for + those instances which have a non-zero delay duration configured in the service + description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details."nNote, the default + value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates that + the behavior will entirely depend on the delay configured in the stateless + service description. + "MonitoringPolicy": { + "FailureAction": "str", # Optional. The compensating action to + perform when a Monitored upgrade encounters monitoring policy or health + policy violations."nInvalid indicates the failure action is invalid. Rollback + specifies that the upgrade will start rolling back automatically."nManual + indicates that the upgrade will switch to UnmonitoredManual upgrade mode. + Known values are: "Invalid", "Rollback", "Manual". + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # Optional. + Default value is "PT0H10M0S". The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is + executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # Optional. + Default value is "PT0H2M0S". The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade + domain. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. Default + value is "0". The amount of time to wait after completing an upgrade domain + before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a + number representing the total number of milliseconds. + "UpgradeDomainTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S", + # Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of + time each upgrade domain has to complete before FailureAction is executed. It + is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + "UpgradeTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S" # + Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of time + the overall upgrade has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + }, + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value is + "UnmonitoredAuto". The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "SortOrder": "Default", # Optional. Default value is "Default". Defines the + order in which an upgrade proceeds through the cluster. Known values are: + "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + "UpgradeKind": "Rolling", # Optional. Default value is "Rolling". The kind + of upgrade out of the following possible values. Known values are: "Invalid", + "Rolling". Default value: "Rolling". + "UpgradeReplicaSetCheckTimeoutInSeconds": 42949672925 # Optional. Default + value is 42949672925. The maximum amount of time to block processing of an + upgrade domain and prevent loss of availability when there are unexpected issues. + When this timeout expires, processing of the upgrade domain will proceed + regardless of availability loss issues. The timeout is reset at the start of each + upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + 32-bit integer). + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = start_cluster_upgrade_description + + request = build_start_cluster_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def start_cluster_configuration_upgrade( # pylint: disable=inconsistent-return-statements + self, + cluster_configuration_upgrade_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Start upgrading the configuration of a Service Fabric standalone cluster. + + Validate the supplied configuration upgrade parameters and start upgrading the cluster + configuration if the parameters are valid. + + :param cluster_configuration_upgrade_description: Parameters for a standalone cluster + configuration upgrade. + :type cluster_configuration_upgrade_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + cluster_configuration_upgrade_description = { + "ApplicationHealthPolicies": { + "ApplicationHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + health policy map item. This is the name of the application. + "Value": { + "ConsiderWarningAsError": bool, # Optional. + Indicates whether warnings are treated with the same severity as + errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to + 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is + respected but there is at least one unhealthy partition, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over the total + number of partitions in the service."nThe computation rounds + up to tolerate one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is + respected but there is at least one unhealthy replica, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the total + number of replicas in the partition."nThe computation rounds + up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # + Optional. The maximum allowed percentage of unhealthy + services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the + application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the + health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to tolerate + one failure on small numbers of services. Default percentage + is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, + # Optional. The maximum allowed percentage of unhealthy deployed + applications. Allowed values are Byte values from zero to + 100."nThe percentage represents the maximum tolerated percentage + of deployed applications that can be unhealthy before the + application is considered in error."nThis is calculated by + dividing the number of unhealthy deployed applications over the + number of nodes where the application is currently deployed on in + the cluster."nThe computation rounds up to tolerate one failure + on small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. + The key of the service type health policy map item. This + is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte + values from zero to 100"n"nThe percentage represents + the maximum tolerated percentage of partitions that + can be unhealthy before the service is considered in + error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe + computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy + replicas per partition. Allowed values are Byte + values from zero to 100."n"nThe percentage represents + the maximum tolerated percentage of replicas that can + be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is + at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the + total number of replicas in the partition."nThe + computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. + Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum + tolerated percentage of services that can be + unhealthy before the application is considered in + error."nIf the percentage is respected but there is + at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to + tolerate one failure on small numbers of services. + Default percentage is zero. + } + } + ] + } + } + ] + }, + "ClusterConfig": "str", # Required. The cluster configuration as a JSON + string. For example, `this file + `_ + contains JSON describing the `nodes and other properties of the cluster + `_. + "HealthCheckRetryTimeout": "PT0H0M0S", # Optional. Default value is + "PT0H0M0S". The length of time between attempts to perform health checks if the + application or cluster is not healthy. + "HealthCheckStableDurationInSeconds": "PT0H0M0S", # Optional. Default value + is "PT0H0M0S". The length of time that the application or cluster must remain + healthy before the upgrade proceeds to the next upgrade domain. + "HealthCheckWaitDurationInSeconds": "PT0H0M0S", # Optional. Default value is + "PT0H0M0S". The length of time to wait after completing an upgrade domain before + starting the health checks process. + "MaxPercentDeltaUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of delta health degradation during the upgrade. Allowed values are + integer values from zero to 100. + "MaxPercentUnhealthyApplications": 0, # Optional. The maximum allowed + percentage of unhealthy applications during the upgrade. Allowed values are + integer values from zero to 100. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum allowed percentage of + unhealthy nodes during the upgrade. Allowed values are integer values from zero + to 100. + "MaxPercentUpgradeDomainDeltaUnhealthyNodes": 0, # Optional. The maximum + allowed percentage of upgrade domain delta health degradation during the upgrade. + Allowed values are integer values from zero to 100. + "UpgradeDomainTimeoutInSeconds": "PT0H0M0S", # Optional. Default value is + "PT0H0M0S". The timeout for the upgrade domain. + "UpgradeTimeoutInSeconds": "PT0H0M0S" # Optional. Default value is + "PT0H0M0S". The upgrade timeout. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = cluster_configuration_upgrade_description + + request = build_start_cluster_configuration_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def update_cluster_upgrade( # pylint: disable=inconsistent-return-statements + self, + update_cluster_upgrade_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Update the upgrade parameters of a Service Fabric cluster upgrade. + + Update the upgrade parameters used during a Service Fabric cluster upgrade. + + :param update_cluster_upgrade_description: Parameters for updating a cluster upgrade. + :type update_cluster_upgrade_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + update_cluster_upgrade_description = { + "ApplicationHealthPolicyMap": { + "ApplicationHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + health policy map item. This is the name of the application. + "Value": { + "ConsiderWarningAsError": bool, # Optional. + Indicates whether warnings are treated with the same severity as + errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to + 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is + respected but there is at least one unhealthy partition, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over the total + number of partitions in the service."nThe computation rounds + up to tolerate one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is + respected but there is at least one unhealthy replica, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the total + number of replicas in the partition."nThe computation rounds + up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # + Optional. The maximum allowed percentage of unhealthy + services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the + application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the + health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to tolerate + one failure on small numbers of services. Default percentage + is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, + # Optional. The maximum allowed percentage of unhealthy deployed + applications. Allowed values are Byte values from zero to + 100."nThe percentage represents the maximum tolerated percentage + of deployed applications that can be unhealthy before the + application is considered in error."nThis is calculated by + dividing the number of unhealthy deployed applications over the + number of nodes where the application is currently deployed on in + the cluster."nThe computation rounds up to tolerate one failure + on small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. + The key of the service type health policy map item. This + is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte + values from zero to 100"n"nThe percentage represents + the maximum tolerated percentage of partitions that + can be unhealthy before the service is considered in + error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe + computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy + replicas per partition. Allowed values are Byte + values from zero to 100."n"nThe percentage represents + the maximum tolerated percentage of replicas that can + be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is + at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the + total number of replicas in the partition."nThe + computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. + Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum + tolerated percentage of services that can be + unhealthy before the application is considered in + error."nIf the percentage is respected but there is + at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to + tolerate one failure on small numbers of services. + Default percentage is zero. + } + } + ] + } + } + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + type health policy map item. This is the name of the application + type. + "Value": 0 # Required. The value of the application + type health policy map item."nThe max percent unhealthy applications + allowed for the application type. Must be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The maximum + allowed percentage of unhealthy applications before reporting an error. For + example, to allow 10% of applications to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated percentage of + applications that can be unhealthy before the cluster is considered in + error."nIf the percentage is respected but there is at least one unhealthy + application, the health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy applications over the total number of + application instances in the cluster, excluding applications of application + types that are included in the ApplicationTypeHealthPolicyMap."nThe + computation rounds up to tolerate one failure on small numbers of + applications. Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of unhealthy nodes before reporting an error. For example, to + allow 10% of nodes to be unhealthy, this value would be 10."n"nThe percentage + represents the maximum tolerated percentage of nodes that can be unhealthy + before the cluster is considered in error."nIf the percentage is respected + but there is at least one unhealthy node, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of unhealthy + nodes over the total number of nodes in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero."n"nIn large clusters, some nodes will always be down or out for + repairs, so this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the node type + health policy map item. This is the name of the node type. + "Value": 0 # Required. The value of the node type + health policy map item."nIf the percentage is respected but there is + at least one unhealthy node in the node type, the health is evaluated + as Warning. "nThe percentage is calculated by dividing the number of + unhealthy nodes over the total number of nodes in the node type. + "nThe computation rounds up to tolerate one failure on small numbers + of nodes."nThe max percent unhealthy nodes allowed for the node type. + Must be between zero and 100. + } + ] + }, + "ClusterUpgradeHealthPolicy": { + "MaxPercentDeltaUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of nodes health degradation allowed during cluster upgrades. The + delta is measured between the state of the nodes at the beginning of upgrade + and the state of the nodes at the time of the health evaluation. The check is + performed after every upgrade domain upgrade completion to make sure the + global state of the cluster is within tolerated limits. The default value is + 10%. + "MaxPercentUpgradeDomainDeltaUnhealthyNodes": 0 # Optional. The + maximum allowed percentage of upgrade domain nodes health degradation allowed + during cluster upgrades. The delta is measured between the state of the + upgrade domain nodes at the beginning of upgrade and the state of the upgrade + domain nodes at the time of the health evaluation. The check is performed + after every upgrade domain upgrade completion for all completed upgrade + domains to make sure the state of the upgrade domains is within tolerated + limits. The default value is 15%. + }, + "EnableDeltaHealthEvaluation": bool, # Optional. When true, enables delta + health evaluation rather than absolute health evaluation after completion of each + upgrade domain. + "UpdateDescription": { + "FailureAction": "str", # Optional. The compensating action to + perform when a Monitored upgrade encounters monitoring policy or health + policy violations."nInvalid indicates the failure action is invalid. Rollback + specifies that the upgrade will start rolling back automatically."nManual + indicates that the upgrade will switch to UnmonitoredManual upgrade mode. + Known values are: "Invalid", "Rollback", "Manual". + "ForceRestart": bool, # Optional. If true, then processes are + forcefully restarted during upgrade even when the code version has not + changed (the upgrade only changes configuration or data). + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # Optional. + Default value is "PT0H10M0S". The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is + executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # Optional. + Default value is "PT0H2M0S". The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade + domain. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. Default + value is "0". The amount of time to wait after completing an upgrade domain + before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a + number representing the total number of milliseconds. + "InstanceCloseDelayDurationInSeconds": 4294967295, # Optional. + Default value is 4294967295. Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This + would be effective when the instance is closing during the + application/cluster"nupgrade, only for those instances which have a non-zero + delay duration configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details."nNote, the + default value of InstanceCloseDelayDurationInSeconds is 4294967295, which + indicates that the behavior will entirely depend on the delay configured in + the stateless service description. + "ReplicaSetCheckTimeoutInMilliseconds": 42949672925, # Optional. + Default value is 42949672925. The maximum amount of time to block processing + of an upgrade domain and prevent loss of availability when there are + unexpected issues. When this timeout expires, processing of the upgrade + domain will proceed regardless of availability loss issues. The timeout is + reset at the start of each upgrade domain. Valid values are between 0 and + 42949672925 inclusive. (unsigned 32-bit integer). + "RollingUpgradeMode": "UnmonitoredAuto", # Default value is + "UnmonitoredAuto". Required. The mode used to monitor health during a rolling + upgrade. The values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "UpgradeDomainTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S", + # Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of + time each upgrade domain has to complete before FailureAction is executed. It + is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + "UpgradeTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S" # + Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of time + the overall upgrade has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + }, + "UpgradeKind": "Rolling" # Optional. Default value is "Rolling". The type of + upgrade out of the following possible values. Known values are: "Invalid", + "Rolling", "Rolling_ForceRestart". Default value: "Rolling". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = update_cluster_upgrade_description + + request = build_update_cluster_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_aad_metadata( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the Azure Active Directory metadata used for secured connection to cluster. + + Gets the Azure Active Directory metadata used for secured connection to cluster. + This API is not supposed to be called separately. It provides information needed to set up an + Azure Active Directory secured connection with a Service Fabric cluster. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "metadata": { + "authority": "str", # Optional. The AAD authority url. + "client": "str", # Optional. The AAD client application Id. + "cluster": "str", # Optional. The AAD cluster application Id. + "login": "str", # Optional. The AAD login url. + "redirect": "str", # Optional. The client application redirect + address. + "tenant": "str" # Optional. The AAD tenant Id. + }, + "type": "str" # Optional. The client authentication method. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_aad_metadata_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_cluster_version( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the current Service Fabric cluster version. + + If a cluster upgrade is happening, then this API will return the lowest (older) version of the + current and target cluster runtime versions. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Version": "str" # Optional. The Service Fabric cluster runtime version. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_cluster_version_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_cluster_load( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the load of a Service Fabric cluster. + + Retrieves the load information of a Service Fabric cluster for all the metrics that have load + or capacity defined. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "LastBalancingEndTimeUtc": "2020-02-20 00:00:00", # Optional. The end time + of last resource balancing run. + "LastBalancingStartTimeUtc": "2020-02-20 00:00:00", # Optional. The starting + time of last resource balancing run. + "LoadMetricInformation": [ + { + "Action": "str", # Optional. The current action being taken + with regard to this metric. + "ActivityThreshold": "str", # Optional. The Activity + Threshold specified for this metric in the system Cluster Manifest. + "BalancingThreshold": "str", # Optional. The balancing + threshold for a certain metric. + "BufferedClusterCapacityRemaining": "str", # Optional. + Remaining capacity in the cluster excluding the reserved space. + "ClusterBufferedCapacity": "str", # Optional. Remaining + capacity in the cluster excluding the reserved space. In future releases + of Service Fabric this parameter will be deprecated in favor of + BufferedClusterCapacityRemaining. + "ClusterCapacity": "str", # Optional. The total cluster + capacity for a given metric. + "ClusterCapacityRemaining": "str", # Optional. The remaining + capacity for the metric in the cluster. + "ClusterLoad": "str", # Optional. The total cluster load. In + future releases of Service Fabric this parameter will be deprecated in + favor of CurrentClusterLoad. + "ClusterRemainingBufferedCapacity": "str", # Optional. The + remaining percentage of cluster total capacity for this metric. + "ClusterRemainingCapacity": "str", # Optional. The remaining + capacity for the metric in the cluster. In future releases of Service + Fabric this parameter will be deprecated in favor of + ClusterCapacityRemaining. + "CurrentClusterLoad": "str", # Optional. The total cluster + load. + "DeviationAfter": "str", # Optional. The standard average + deviation of the metrics after resource balancer run. + "DeviationBefore": "str", # Optional. The standard average + deviation of the metrics before resource balancer run. + "IsBalancedAfter": bool, # Optional. Value that indicates + whether the metrics is balanced or not after resource balancer run. + "IsBalancedBefore": bool, # Optional. Value that indicates + whether the metrics is balanced or not before resource balancer run. + "IsClusterCapacityViolation": bool, # Optional. Indicates + that the metric is currently over capacity in the cluster. + "MaxNodeLoadNodeId": { + "Id": "str" # Optional. Value of the node Id. This + is a 128 bit integer. + }, + "MaxNodeLoadValue": "str", # Optional. The maximum load on + any node for this metric. In future releases of Service Fabric this + parameter will be deprecated in favor of MaximumNodeLoad. + "MaximumNodeLoad": "str", # Optional. The maximum load on + any node for this metric. + "MinNodeLoadNodeId": { + "Id": "str" # Optional. Value of the node Id. This + is a 128 bit integer. + }, + "MinNodeLoadValue": "str", # Optional. The minimum load on + any node for this metric. In future releases of Service Fabric this + parameter will be deprecated in favor of MinimumNodeLoad. + "MinimumNodeLoad": "str", # Optional. The minimum load on + any node for this metric. + "Name": "str", # Optional. Name of the metric for which this + load information is provided. + "NodeBufferPercentage": "str", # Optional. The reserved + percentage of total node capacity for this metric. + "PlannedLoadRemoval": "str" # Optional. This value + represents the load of the replicas that are planned to be removed in the + future within the cluster."nThis kind of load is reported for replicas + that are currently being moving to other nodes and for replicas that are + currently being dropped but still use the load on the source node. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_cluster_load_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def toggle_verbose_service_placement_health_reporting( # pylint: disable=inconsistent-return-statements + self, + *, + enabled: bool, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Changes the verbosity of service placement health reporting. + + If verbosity is set to true, then detailed health reports will be generated when replicas + cannot be placed or dropped. + If verbosity is set to false, then no health reports will be generated when replicas cannot be + placed or dropped. + + :keyword enabled: The verbosity of service placement health reporting. + :paramtype enabled: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_toggle_verbose_service_placement_health_reporting_request( + api_version=api_version, + enabled=enabled, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def validate_cluster_upgrade( + self, + start_cluster_upgrade_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Validate and assess the impact of a code or configuration version update of a Service Fabric + cluster. + + Validate the supplied upgrade parameters and assess the expected impact of a code or + configuration version upgrade of a Service Fabric cluster. The upgrade will not be initiated. + + :param start_cluster_upgrade_description: Describes the parameters for starting a cluster + upgrade. + :type start_cluster_upgrade_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '8.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "8.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + start_cluster_upgrade_description = { + "ApplicationHealthPolicyMap": { + "ApplicationHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + health policy map item. This is the name of the application. + "Value": { + "ConsiderWarningAsError": bool, # Optional. + Indicates whether warnings are treated with the same severity as + errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to + 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is + respected but there is at least one unhealthy partition, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over the total + number of partitions in the service."nThe computation rounds + up to tolerate one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is + respected but there is at least one unhealthy replica, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the total + number of replicas in the partition."nThe computation rounds + up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # + Optional. The maximum allowed percentage of unhealthy + services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the + application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the + health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to tolerate + one failure on small numbers of services. Default percentage + is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, + # Optional. The maximum allowed percentage of unhealthy deployed + applications. Allowed values are Byte values from zero to + 100."nThe percentage represents the maximum tolerated percentage + of deployed applications that can be unhealthy before the + application is considered in error."nThis is calculated by + dividing the number of unhealthy deployed applications over the + number of nodes where the application is currently deployed on in + the cluster."nThe computation rounds up to tolerate one failure + on small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. + The key of the service type health policy map item. This + is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte + values from zero to 100"n"nThe percentage represents + the maximum tolerated percentage of partitions that + can be unhealthy before the service is considered in + error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe + computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy + replicas per partition. Allowed values are Byte + values from zero to 100."n"nThe percentage represents + the maximum tolerated percentage of replicas that can + be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is + at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the + total number of replicas in the partition."nThe + computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. + Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum + tolerated percentage of services that can be + unhealthy before the application is considered in + error."nIf the percentage is respected but there is + at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to + tolerate one failure on small numbers of services. + Default percentage is zero. + } + } + ] + } + } + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + type health policy map item. This is the name of the application + type. + "Value": 0 # Required. The value of the application + type health policy map item."nThe max percent unhealthy applications + allowed for the application type. Must be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The maximum + allowed percentage of unhealthy applications before reporting an error. For + example, to allow 10% of applications to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated percentage of + applications that can be unhealthy before the cluster is considered in + error."nIf the percentage is respected but there is at least one unhealthy + application, the health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy applications over the total number of + application instances in the cluster, excluding applications of application + types that are included in the ApplicationTypeHealthPolicyMap."nThe + computation rounds up to tolerate one failure on small numbers of + applications. Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of unhealthy nodes before reporting an error. For example, to + allow 10% of nodes to be unhealthy, this value would be 10."n"nThe percentage + represents the maximum tolerated percentage of nodes that can be unhealthy + before the cluster is considered in error."nIf the percentage is respected + but there is at least one unhealthy node, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of unhealthy + nodes over the total number of nodes in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero."n"nIn large clusters, some nodes will always be down or out for + repairs, so this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the node type + health policy map item. This is the name of the node type. + "Value": 0 # Required. The value of the node type + health policy map item."nIf the percentage is respected but there is + at least one unhealthy node in the node type, the health is evaluated + as Warning. "nThe percentage is calculated by dividing the number of + unhealthy nodes over the total number of nodes in the node type. + "nThe computation rounds up to tolerate one failure on small numbers + of nodes."nThe max percent unhealthy nodes allowed for the node type. + Must be between zero and 100. + } + ] + }, + "ClusterUpgradeHealthPolicy": { + "MaxPercentDeltaUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of nodes health degradation allowed during cluster upgrades. The + delta is measured between the state of the nodes at the beginning of upgrade + and the state of the nodes at the time of the health evaluation. The check is + performed after every upgrade domain upgrade completion to make sure the + global state of the cluster is within tolerated limits. The default value is + 10%. + "MaxPercentUpgradeDomainDeltaUnhealthyNodes": 0 # Optional. The + maximum allowed percentage of upgrade domain nodes health degradation allowed + during cluster upgrades. The delta is measured between the state of the + upgrade domain nodes at the beginning of upgrade and the state of the upgrade + domain nodes at the time of the health evaluation. The check is performed + after every upgrade domain upgrade completion for all completed upgrade + domains to make sure the state of the upgrade domains is within tolerated + limits. The default value is 15%. + }, + "CodeVersion": "str", # Optional. The cluster code version. + "ConfigVersion": "str", # Optional. The cluster configuration version. + "EnableDeltaHealthEvaluation": bool, # Optional. When true, enables delta + health evaluation rather than absolute health evaluation after completion of each + upgrade domain. + "ForceRestart": bool, # Optional. If true, then processes are forcefully + restarted during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + "InstanceCloseDelayDurationInSeconds": 4294967295, # Optional. Default value + is 4294967295. Duration in seconds, to wait before a stateless instance is + closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster"nupgrade, only for + those instances which have a non-zero delay duration configured in the service + description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details."nNote, the default + value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates that + the behavior will entirely depend on the delay configured in the stateless + service description. + "MonitoringPolicy": { + "FailureAction": "str", # Optional. The compensating action to + perform when a Monitored upgrade encounters monitoring policy or health + policy violations."nInvalid indicates the failure action is invalid. Rollback + specifies that the upgrade will start rolling back automatically."nManual + indicates that the upgrade will switch to UnmonitoredManual upgrade mode. + Known values are: "Invalid", "Rollback", "Manual". + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # Optional. + Default value is "PT0H10M0S". The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is + executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # Optional. + Default value is "PT0H2M0S". The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade + domain. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. Default + value is "0". The amount of time to wait after completing an upgrade domain + before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a + number representing the total number of milliseconds. + "UpgradeDomainTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S", + # Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of + time each upgrade domain has to complete before FailureAction is executed. It + is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + "UpgradeTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S" # + Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of time + the overall upgrade has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + }, + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value is + "UnmonitoredAuto". The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "SortOrder": "Default", # Optional. Default value is "Default". Defines the + order in which an upgrade proceeds through the cluster. Known values are: + "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + "UpgradeKind": "Rolling", # Optional. Default value is "Rolling". The kind + of upgrade out of the following possible values. Known values are: "Invalid", + "Rolling". Default value: "Rolling". + "UpgradeReplicaSetCheckTimeoutInSeconds": 42949672925 # Optional. Default + value is 42949672925. The maximum amount of time to block processing of an + upgrade domain and prevent loss of availability when there are unexpected issues. + When this timeout expires, processing of the upgrade domain will proceed + regardless of availability loss issues. The timeout is reset at the start of each + upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + 32-bit integer). + } + + # response body for status code(s): 200 + response.json() == { + "ServiceHostUpgradeImpact": "str", # Optional. The expected impact of the + upgrade. Known values are: "Invalid", "None", "ServiceHostRestart", + "UnexpectedServiceHostRestart". + "ValidationDetails": "str" # Optional. A string containing additional + details for the Fabric upgrade validation result. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "8.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = start_cluster_upgrade_description + + request = build_validate_cluster_upgrade_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_node_info_list( + self, + *, + continuation_token_parameter: Optional[str] = None, + node_status_filter: Optional[str] = "default", + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the list of nodes in the Service Fabric cluster. + + The response includes the name, status, ID, health, uptime, and other details about the nodes. + + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword node_status_filter: Allows filtering the nodes based on the NodeStatus. Only the nodes + that are matching the specified filter value will be returned. The filter value can be one of + the following. Known values are: "default", "all", "up", "down", "enabling", "disabling", + "disabled", "unknown", and "removed". Default value is "default". + :paramtype node_status_filter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.3'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.3". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "CodeVersion": "str", # Optional. The version of Service + Fabric binaries that the node is running. + "ConfigVersion": "str", # Optional. The version of Service + Fabric cluster manifest that the node is using. + "FaultDomain": "str", # Optional. The fault domain of the + node. + "HealthState": "str", # Optional. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "Id": { + "Id": "str" # Optional. Value of the node Id. This + is a 128 bit integer. + }, + "InfrastructurePlacementID": "str", # Optional. PlacementID + used by the InfrastructureService. + "InstanceId": "str", # Optional. The ID representing the + node instance. While the ID of the node is deterministically generated + from the node name and remains same across restarts, the InstanceId + changes every time node restarts. + "IpAddressOrFQDN": "str", # Optional. The IP address or + fully qualified domain name of the node. + "IsNodeByNodeUpgradeInProgress": bool, # Optional. Indicates + if a node-by-node upgrade is currently being performed on this node. + "IsSeedNode": bool, # Optional. Indicates if the node is a + seed node or not. Returns true if the node is a seed node, otherwise + false. A quorum of seed nodes are required for proper operation of + Service Fabric cluster. + "IsStopped": bool, # Optional. Indicates if the node is + stopped by calling stop node API or not. Returns true if the node is + stopped, otherwise false. + "Name": "str", # Optional. The name of a Service Fabric + node. + "NodeDeactivationInfo": { + "NodeDeactivationIntent": "str", # Optional. The + intent or the reason for deactivating the node. Following are the + possible values for it. Known values are: "Invalid", "Pause", + "Restart", "RemoveData", "RemoveNode". + "NodeDeactivationStatus": "str", # Optional. The + status of node deactivation operation. Following are the possible + values. Known values are: "None", "SafetyCheckInProgress", + "SafetyCheckComplete", "Completed". + "NodeDeactivationTask": [ + { + "NodeDeactivationIntent": "str", # + Optional. The intent or the reason for deactivating the node. + Following are the possible values for it. Known values are: + "Invalid", "Pause", "Restart", "RemoveData", "RemoveNode". + "NodeDeactivationTaskId": { + "Id": "str", # Optional. + Value of the task id. + "NodeDeactivationTaskType": + "str" # Optional. The type of the task that performed + the node deactivation. Following are the possible values. + Known values are: "Invalid", "Infrastructure", "Repair", + "Client". + } + } + ], + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ] + }, + "NodeDownAt": "2020-02-20 00:00:00", # Optional. Date time + in UTC when the node went down. If node has never been down then this + value will be zero date time. + "NodeDownTimeInSeconds": "str", # Optional. Time in seconds + since the node has been in NodeStatus Down. Value zero indicates node is + not NodeStatus Down. + "NodeStatus": "str", # Optional. The status of the node. + Known values are: "Invalid", "Up", "Down", "Enabling", "Disabling", + "Disabled", "Unknown", "Removed". + "NodeTags": [ + "str" # Optional. List that contains tags, which + will be applied to the nodes. + ], + "NodeUpAt": "2020-02-20 00:00:00", # Optional. Date time in + UTC when the node came up. If the node has never been up then this value + will be zero date time. + "NodeUpTimeInSeconds": "str", # Optional. Time in seconds + since the node has been in NodeStatus Up. Value zero indicates that the + node is not Up. + "Type": "str", # Optional. The type of the node. + "UpgradeDomain": "str" # Optional. The upgrade domain of the + node. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.3")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_node_info_list_request( + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + node_status_filter=node_status_filter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_node_info( + self, + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[JSON]: + """Gets the information about a specific node in the Service Fabric cluster. + + The response includes the name, status, ID, health, uptime, and other details about the node. + + :param node_name: The name of the node. + :type node_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "CodeVersion": "str", # Optional. The version of Service Fabric binaries + that the node is running. + "ConfigVersion": "str", # Optional. The version of Service Fabric cluster + manifest that the node is using. + "FaultDomain": "str", # Optional. The fault domain of the node. + "HealthState": "str", # Optional. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Id": { + "Id": "str" # Optional. Value of the node Id. This is a 128 bit + integer. + }, + "InfrastructurePlacementID": "str", # Optional. PlacementID used by the + InfrastructureService. + "InstanceId": "str", # Optional. The ID representing the node instance. + While the ID of the node is deterministically generated from the node name and + remains same across restarts, the InstanceId changes every time node restarts. + "IpAddressOrFQDN": "str", # Optional. The IP address or fully qualified + domain name of the node. + "IsNodeByNodeUpgradeInProgress": bool, # Optional. Indicates if a + node-by-node upgrade is currently being performed on this node. + "IsSeedNode": bool, # Optional. Indicates if the node is a seed node or not. + Returns true if the node is a seed node, otherwise false. A quorum of seed nodes + are required for proper operation of Service Fabric cluster. + "IsStopped": bool, # Optional. Indicates if the node is stopped by calling + stop node API or not. Returns true if the node is stopped, otherwise false. + "Name": "str", # Optional. The name of a Service Fabric node. + "NodeDeactivationInfo": { + "NodeDeactivationIntent": "str", # Optional. The intent or the + reason for deactivating the node. Following are the possible values for it. + Known values are: "Invalid", "Pause", "Restart", "RemoveData", "RemoveNode". + "NodeDeactivationStatus": "str", # Optional. The status of node + deactivation operation. Following are the possible values. Known values are: + "None", "SafetyCheckInProgress", "SafetyCheckComplete", "Completed". + "NodeDeactivationTask": [ + { + "NodeDeactivationIntent": "str", # Optional. The + intent or the reason for deactivating the node. Following are the + possible values for it. Known values are: "Invalid", "Pause", + "Restart", "RemoveData", "RemoveNode". + "NodeDeactivationTaskId": { + "Id": "str", # Optional. Value of the task + id. + "NodeDeactivationTaskType": "str" # + Optional. The type of the task that performed the node + deactivation. Following are the possible values. Known values + are: "Invalid", "Infrastructure", "Repair", "Client". + } + } + ], + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ] + }, + "NodeDownAt": "2020-02-20 00:00:00", # Optional. Date time in UTC when the + node went down. If node has never been down then this value will be zero date + time. + "NodeDownTimeInSeconds": "str", # Optional. Time in seconds since the node + has been in NodeStatus Down. Value zero indicates node is not NodeStatus Down. + "NodeStatus": "str", # Optional. The status of the node. Known values are: + "Invalid", "Up", "Down", "Enabling", "Disabling", "Disabled", "Unknown", + "Removed". + "NodeTags": [ + "str" # Optional. List that contains tags, which will be applied to + the nodes. + ], + "NodeUpAt": "2020-02-20 00:00:00", # Optional. Date time in UTC when the + node came up. If the node has never been up then this value will be zero date + time. + "NodeUpTimeInSeconds": "str", # Optional. Time in seconds since the node has + been in NodeStatus Up. Value zero indicates that the node is not Up. + "Type": "str", # Optional. The type of the node. + "UpgradeDomain": "str" # Optional. The upgrade domain of the node. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + + request = build_get_node_info_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace + def get_node_health( + self, + node_name: str, + *, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric node. + + Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection + of health events reported on the node based on the health state. If the node that you specify + by name does not exist in the health store, this returns an error. + + :param node_name: The name of the node. + :type node_name: str + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "Name": "str", # Optional. Name of the node whose health information is + described by this object. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_node_health_request( + node_name=node_name, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_node_health_using_policy( + self, + node_name: str, + cluster_health_policy: Optional[JSON] = None, + *, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric node, by using the specified health policy. + + Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection + of health events reported on the node based on the health state. Use ClusterHealthPolicy in the + POST body to override the health policies used to evaluate the health. If the node that you + specify by name does not exist in the health store, this returns an error. + + :param node_name: The name of the node. + :type node_name: str + :param cluster_health_policy: Describes the health policies used to evaluate the health of a + cluster or node. If not present, the health evaluation uses the health policy from cluster + manifest or the default health policy. Default value is None. + :type cluster_health_policy: JSON + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + cluster_health_policy = { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application type + health policy map item. This is the name of the application type. + "Value": 0 # Required. The value of the application type + health policy map item."nThe max percent unhealthy applications allowed + for the application type. Must be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates whether warnings are + treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The maximum allowed + percentage of unhealthy applications before reporting an error. For example, to + allow 10% of applications to be unhealthy, this value would be 10."n"nThe + percentage represents the maximum tolerated percentage of applications that can + be unhealthy before the cluster is considered in error."nIf the percentage is + respected but there is at least one unhealthy application, the health is + evaluated as Warning."nThis is calculated by dividing the number of unhealthy + applications over the total number of application instances in the cluster, + excluding applications of application types that are included in the + ApplicationTypeHealthPolicyMap."nThe computation rounds up to tolerate one + failure on small numbers of applications. Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum allowed percentage of + unhealthy nodes before reporting an error. For example, to allow 10% of nodes to + be unhealthy, this value would be 10."n"nThe percentage represents the maximum + tolerated percentage of nodes that can be unhealthy before the cluster is + considered in error."nIf the percentage is respected but there is at least one + unhealthy node, the health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy nodes over the total number of nodes in the + cluster."nThe computation rounds up to tolerate one failure on small numbers of + nodes. Default percentage is zero."n"nIn large clusters, some nodes will always + be down or out for repairs, so this percentage should be configured to tolerate + that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the node type health + policy map item. This is the name of the node type. + "Value": 0 # Required. The value of the node type health + policy map item."nIf the percentage is respected but there is at least + one unhealthy node in the node type, the health is evaluated as Warning. + "nThe percentage is calculated by dividing the number of unhealthy nodes + over the total number of nodes in the node type. "nThe computation rounds + up to tolerate one failure on small numbers of nodes."nThe max percent + unhealthy nodes allowed for the node type. Must be between zero and 100. + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "Name": "str", # Optional. Name of the node whose health information is + described by this object. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if cluster_health_policy is not None: + _json = cluster_health_policy + else: + _json = None + + request = build_get_node_health_using_policy_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def report_node_health( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + health_information: JSON, + *, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric node. + + Reports health state of the specified Service Fabric node. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway node, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetNodeHealth and check that the + report appears in the HealthEvents section. + + :param node_name: The name of the node. + :type node_name: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: JSON + :keyword immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :paramtype immediate: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + health_information = { + "Description": "str", # Optional. The description of the health information. + It represents free text used to add human readable information about the + report."nThe maximum string length for the description is 4096 characters."nIf + the provided string is longer, it will be automatically truncated."nWhen + truncated, the last characters of the description contain a marker "[Truncated]", + and total string size is 4096 characters."nThe presence of the marker indicates + to users that truncation occurred."nNote that when truncated, the description has + less than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID which identifies the + health report and can be used to find more detailed information about a specific + health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Property": "str", # Required. The property of the health information. An + entity can have health reports for different properties."nThe property is a + string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report."nFor example, a reporter + with SourceId "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same reporter + can monitor the node connectivity, so it can report a property "Connectivity" on + the same node."nIn the health store, these reports are treated as separate health + events for the specified node."n"nTogether with the SourceId, the property + uniquely identifies the health information. + "RemoveWhenExpired": bool, # Optional. Value that indicates whether the + report is removed from health store when it expires."nIf set to true, the report + is removed from the health store after it expires."nIf set to false, the report + is treated as an error when expired. The value of this property is false by + default."nWhen clients report periodically, they should set RemoveWhenExpired + false (default)."nThis way, if the reporter has issues (e.g. deadlock) and can't + report, the entity is evaluated at error when the health report expires."nThis + flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for this health + report as a numeric string."nThe report sequence number is used by the health + store to detect stale reports."nIf not specified, a sequence number is + auto-generated by the health client when a report is added. + "SourceId": "str", # Required. The source name that identifies the + client/watchdog/system component that generated the health information. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The duration for + which this health report is valid. This field uses ISO8601 format for specifying + the duration."nWhen clients report periodically, they should send reports with + higher frequency than time to live."nIf clients report on transition, they can + set the time to live to infinite."nWhen time to live expires, the health event + that contains the health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = health_information + + request = build_report_node_health_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_node_load_info( + self, + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the load information of a Service Fabric node. + + Retrieves the load information of a Service Fabric node for all the metrics that have load or + capacity defined. + + :param node_name: The name of the node. + :type node_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "NodeLoadMetricInformation": [ + { + "BufferedNodeCapacityRemaining": "str", # Optional. The + remaining capacity which is not reserved by NodeBufferPercentage for this + metric on the node. + "CurrentNodeLoad": "str", # Optional. Current load on the + node for this metric. + "IsCapacityViolation": bool, # Optional. Indicates if there + is a capacity violation for this metric on the node. + "Name": "str", # Optional. Name of the metric for which this + load information is provided. + "NodeBufferedCapacity": "str", # Optional. The value that + indicates the reserved capacity for this metric on the node. + "NodeCapacity": "str", # Optional. Total capacity on the + node for this metric. + "NodeCapacityRemaining": "str", # Optional. The remaining + capacity on the node for the metric. + "NodeLoad": "str", # Optional. Current load on the node for + this metric. In future releases of Service Fabric this parameter will be + deprecated in favor of CurrentNodeLoad. + "NodeRemainingBufferedCapacity": "str", # Optional. The + remaining reserved capacity for this metric on the node. In future + releases of Service Fabric this parameter will be deprecated in favor of + BufferedNodeCapacityRemaining. + "NodeRemainingCapacity": "str", # Optional. The remaining + capacity on the node for this metric. In future releases of Service + Fabric this parameter will be deprecated in favor of + NodeCapacityRemaining. + "PlannedNodeLoadRemoval": "str" # Optional. This value + represents the load of the replicas that are planned to be removed in the + future."nThis kind of load is reported for replicas that are currently + being moving to other nodes and for replicas that are currently being + dropped but still use the load on the source node. + } + ], + "NodeName": "str" # Optional. Name of the node for which the load + information is provided by this object. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_node_load_info_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def disable_node( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + deactivation_intent_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deactivate a Service Fabric cluster node with the specified deactivation intent. + + Deactivate a Service Fabric cluster node with the specified deactivation intent. Once the + deactivation is in progress, the deactivation intent can be increased, but not decreased (for + example, a node that is deactivated with the Pause intent can be deactivated further with + Restart, but not the other way around. Nodes may be reactivated using the Activate a node + operation any time after they are deactivated. If the deactivation is not complete, this will + cancel the deactivation. A node that goes down and comes back up while deactivated will still + need to be reactivated before services will be placed on that node. + + :param node_name: The name of the node. + :type node_name: str + :param deactivation_intent_description: Describes the intent or reason for deactivating the + node. + :type deactivation_intent_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + deactivation_intent_description = { + "DeactivationIntent": "str" # Optional. Describes the intent or reason for + deactivating the node. The possible values are following. Known values are: + "Pause", "Restart", "RemoveData". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = deactivation_intent_description + + request = build_disable_node_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def enable_node( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Activate a Service Fabric cluster node that is currently deactivated. + + Activates a Service Fabric cluster node that is currently deactivated. Once activated, the node + will again become a viable target for placing new replicas, and any deactivated replicas + remaining on the node will be reactivated. + + :param node_name: The name of the node. + :type node_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_enable_node_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def remove_node_state( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Notifies Service Fabric that the persisted state on a node has been permanently removed or + lost. + + This implies that it is not possible to recover the persisted state of that node. This + generally happens if a hard disk has been wiped clean, or if a hard disk crashes. The node has + to be down for this operation to be successful. This operation lets Service Fabric know that + the replicas on that node no longer exist, and that Service Fabric should stop waiting for + those replicas to come back up. Do not run this cmdlet if the state on the node has not been + removed and the node can come back up with its state intact. Starting from Service Fabric 6.5, + in order to use this API for seed nodes, please change the seed nodes to regular (non-seed) + nodes and then invoke this API to remove the node state. If the cluster is running on Azure, + after the seed node goes down, Service Fabric will try to change it to a non-seed node + automatically. To make this happen, make sure the number of non-seed nodes in the primary node + type is no less than the number of Down seed nodes. If necessary, add more nodes to the primary + node type to achieve this. For standalone cluster, if the Down seed node is not expected to + come back up with its state intact, please remove the node from the cluster, see + https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-windows-server-add-remove-nodes. + + :param node_name: The name of the node. + :type node_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_remove_node_state_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def restart_node( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + restart_node_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Restarts a Service Fabric cluster node. + + Restarts a Service Fabric cluster node that is already started. + + :param node_name: The name of the node. + :type node_name: str + :param restart_node_description: The instance of the node to be restarted and a flag indicating + the need to take dump of the fabric process. + :type restart_node_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + restart_node_description = { + "CreateFabricDump": "False", # Optional. Default value is "False". Specify + True to create a dump of the fabric node process. This is case-sensitive. Known + values are: "False", "True". Default value: "False". + "NodeInstanceId": "0" # Default value is "0". Required. The instance ID of + the target node. If instance ID is specified the node is restarted only if it + matches with the current instance of the node. A default value of "0" would match + any instance ID. The instance ID can be obtained using get node query. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = restart_node_description + + request = build_restart_node_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def remove_configuration_overrides( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Removes configuration overrides on the specified node. + + This api allows removing all existing configuration overrides on specified node. + + :param node_name: The name of the node. + :type node_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '7.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "7.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_remove_configuration_overrides_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_configuration_overrides( + self, + node_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets the list of configuration overrides on the specified node. + + This api allows getting all existing configuration overrides on the specified node. + + :param node_name: The name of the node. + :type node_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '7.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "7.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "ParameterName": "str", # Required. Name of the parameter that has + been overridden. + "ParameterValue": "str", # Required. Value of the overridden + parameter. + "PersistAcrossUpgrade": bool, # Optional. A value that indicates + whether config override will be removed on upgrade or will still be + considered as valid. + "SectionName": "str", # Required. Name of the section for the + parameter override. + "Timeout": "1 day, 0:00:00" # Optional. The duration until config + override is considered as valid. + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_configuration_overrides_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def add_configuration_parameter_overrides( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + config_parameter_override_list: List[JSON], + *, + force: Optional[bool] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Adds the list of configuration overrides on the specified node. + + This api allows adding all existing configuration overrides on the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param config_parameter_override_list: Description for adding list of configuration overrides. + :type config_parameter_override_list: list[JSON] + :keyword force: Force adding configuration overrides on specified nodes. Default value is None. + :paramtype force: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '7.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "7.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + config_parameter_override_list = [ + { + "ParameterName": "str", # Required. Name of the parameter that has + been overridden. + "ParameterValue": "str", # Required. Value of the overridden + parameter. + "PersistAcrossUpgrade": bool, # Optional. A value that indicates + whether config override will be removed on upgrade or will still be + considered as valid. + "SectionName": "str", # Required. Name of the section for the + parameter override. + "Timeout": "1 day, 0:00:00" # Optional. The duration until config + override is considered as valid. + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = config_parameter_override_list + + request = build_add_configuration_parameter_overrides_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + force=force, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def remove_node_tags( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + node_tags: List[str], + **kwargs: Any + ) -> None: + """Removes the list of tags from the specified node. + + This api allows removing set of tags from the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param node_tags: Description for adding list of node tags. + :type node_tags: list[str] + :keyword api_version: The version of the API. This parameter is required and its value must be + '7.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "7.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + node_tags = [ + "str" # Optional. + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = node_tags + + request = build_remove_node_tags_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def add_node_tags( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + node_tags: List[str], + **kwargs: Any + ) -> None: + """Adds the list of tags on the specified node. + + This api allows adding tags to the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param node_tags: Description for adding list of node tags. + :type node_tags: list[str] + :keyword api_version: The version of the API. This parameter is required and its value must be + '7.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "7.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + node_tags = [ + "str" # Optional. + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = node_tags + + request = build_add_node_tags_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_application_type_info_list( + self, + *, + application_type_definition_kind_filter: Optional[int] = 0, + exclude_application_parameters: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the list of application types in the Service Fabric cluster. + + Returns the information about the application types that are provisioned or in the process of + being provisioned in the Service Fabric cluster. Each version of an application type is + returned as one application type. The response includes the name, version, status, and other + details about the application type. This is a paged query, meaning that if not all of the + application types fit in a page, one page of results is returned as well as a continuation + token, which can be used to get the next page. For example, if there are 10 application types + but a page only fits the first three application types, or if max results is set to 3, then + three is returned. To access the rest of the results, retrieve subsequent pages by using the + returned continuation token in the next query. An empty continuation token is returned if there + are no subsequent pages. + + :keyword application_type_definition_kind_filter: Used to filter on + ApplicationTypeDefinitionKind which is the mechanism used to define a Service Fabric + application type. + + + * Default - Default value, which performs the same function as selecting "All". The value is + 0. + * All - Filter that matches input with any ApplicationTypeDefinitionKind value. The value is + 65535. + * ServiceFabricApplicationPackage - Filter that matches input with + ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. The value is 1. + * Compose - Filter that matches input with ApplicationTypeDefinitionKind value Compose. The + value is 2. Default value is 0. + :paramtype application_type_definition_kind_filter: int + :keyword exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :paramtype exclude_application_parameters: bool + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "ApplicationTypeDefinitionKind": "str", # Optional. The + mechanism used to define a Service Fabric application type. Known values + are: "Invalid", "ServiceFabricApplicationPackage", "Compose". + "ApplicationTypeMetadata": { + "ApplicationTypeProvisionTimestamp": "str", # + Optional. The timestamp when the application type was provisioned. + "ArmMetadata": { + "ArmResourceId": "str" # Optional. A string + containing the ArmResourceId. + } + }, + "DefaultParameterList": [ + { + "Key": "str", # Required. The name of the + parameter. + "Value": "str" # Required. The value of the + parameter. + } + ], + "Name": "str", # Optional. The application type name as + defined in the application manifest. + "Status": "str", # Optional. The status of the application + type. Known values are: "Invalid", "Provisioning", "Available", + "Unprovisioning", "Failed". + "StatusDetails": "str", # Optional. Additional detailed + information about the status of the application type. + "Version": "str" # Optional. The version of the application + type as defined in the application manifest. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_type_info_list_request( + api_version=api_version, + application_type_definition_kind_filter=application_type_definition_kind_filter, + exclude_application_parameters=exclude_application_parameters, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_application_type_info_list_by_name( + self, + application_type_name: str, + *, + application_type_version: Optional[str] = None, + exclude_application_parameters: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the list of application types in the Service Fabric cluster matching exactly the specified + name. + + Returns the information about the application types that are provisioned or in the process of + being provisioned in the Service Fabric cluster. These results are of application types whose + name match exactly the one specified as the parameter, and which comply with the given query + parameters. All versions of the application type matching the application type name are + returned, with each version returned as one application type. The response includes the name, + version, status, and other details about the application type. This is a paged query, meaning + that if not all of the application types fit in a page, one page of results is returned as well + as a continuation token, which can be used to get the next page. For example, if there are 10 + application types but a page only fits the first three application types, or if max results is + set to 3, then three is returned. To access the rest of the results, retrieve subsequent pages + by using the returned continuation token in the next query. An empty continuation token is + returned if there are no subsequent pages. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :keyword application_type_version: The version of the application type. Default value is None. + :paramtype application_type_version: str + :keyword exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :paramtype exclude_application_parameters: bool + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "ApplicationTypeDefinitionKind": "str", # Optional. The + mechanism used to define a Service Fabric application type. Known values + are: "Invalid", "ServiceFabricApplicationPackage", "Compose". + "ApplicationTypeMetadata": { + "ApplicationTypeProvisionTimestamp": "str", # + Optional. The timestamp when the application type was provisioned. + "ArmMetadata": { + "ArmResourceId": "str" # Optional. A string + containing the ArmResourceId. + } + }, + "DefaultParameterList": [ + { + "Key": "str", # Required. The name of the + parameter. + "Value": "str" # Required. The value of the + parameter. + } + ], + "Name": "str", # Optional. The application type name as + defined in the application manifest. + "Status": "str", # Optional. The status of the application + type. Known values are: "Invalid", "Provisioning", "Available", + "Unprovisioning", "Failed". + "StatusDetails": "str", # Optional. Additional detailed + information about the status of the application type. + "Version": "str" # Optional. The version of the application + type as defined in the application manifest. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_type_info_list_by_name_request( + application_type_name=application_type_name, + api_version=api_version, + application_type_version=application_type_version, + exclude_application_parameters=exclude_application_parameters, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def provision_application_type( # pylint: disable=inconsistent-return-statements + self, + provision_application_type_description_base_required_body_param: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Provisions or registers a Service Fabric application type with the cluster using the '.sfpkg' + package in the external store or using the application package in the image store. + + Provisions a Service Fabric application type with the cluster. The provision is required before + any new applications can be instantiated. + The provision operation can be performed either on the application package specified by the + relativePathInImageStore, or by using the URI of the external '.sfpkg'. + + :param provision_application_type_description_base_required_body_param: The base type of + provision application type description which supports either image store-based provision or + external store-based provision. + :type provision_application_type_description_base_required_body_param: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + kind = 'ExternalStoreProvisionApplicationTypeDescription' or + 'ProvisionApplicationTypeDescription' + + # JSON input template you can fill out and use as your body input. + provision_application_type_description_base_required_body_param = { + "Async": bool, # Required. Indicates whether or not provisioning should + occur asynchronously. When set to true, the provision operation returns when the + request is accepted by the system, and the provision operation continues without + any timeout limit. The default value is false. For large application packages, we + recommend setting the value to true. + Kind: Kind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = provision_application_type_description_base_required_body_param + + request = build_provision_application_type_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def unprovision_application_type( # pylint: disable=inconsistent-return-statements + self, + application_type_name: str, + unprovision_application_type_description_info: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Removes or unregisters a Service Fabric application type from the cluster. + + This operation can only be performed if all application instances of the application type have + been deleted. Once the application type is unregistered, no new application instances can be + created for this particular application type. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param unprovision_application_type_description_info: The relative path for the application + package in the image store specified during the prior copy operation. + :type unprovision_application_type_description_info: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + unprovision_application_type_description_info = { + "ApplicationTypeVersion": "str", # Required. The version of the application + type as defined in the application manifest. + "Async": bool # Optional. The flag indicating whether or not unprovision + should occur asynchronously. When set to true, the unprovision operation returns + when the request is accepted by the system, and the unprovision operation + continues without any timeout limit. The default value is false. However, we + recommend setting it to true for large application packages that were + provisioned. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = unprovision_application_type_description_info + + request = build_unprovision_application_type_request( + application_type_name=application_type_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def update_application_type_arm_metadata( # pylint: disable=inconsistent-return-statements + self, + application_type_name: str, + application_type_arm_metadata_update_description: JSON, + *, + application_type_version: str, + timeout: Optional[int] = 60, + force: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Updates the Arm Metadata for a specific Application Type. + + Updates the Arm Metadata for a specific Application Type. Is able to be called immediately + after the provision app type API is called. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_arm_metadata_update_description: The Arm metadata to be assocated with + a specific application type. + :type application_type_arm_metadata_update_description: JSON + :keyword application_type_version: The version of the application type. + :paramtype application_type_version: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword force: Force parameter used to prevent accidental Arm metadata update. Default value + is None. + :paramtype force: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '9.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "9.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_type_arm_metadata_update_description = { + "ArmResourceId": "str" # Optional. A string containing the ArmResourceId. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = application_type_arm_metadata_update_description + + request = build_update_application_type_arm_metadata_request( + application_type_name=application_type_name, + api_version=api_version, + content_type=content_type, + application_type_version=application_type_version, + json=_json, + timeout=timeout, + force=force, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_service_type_info_list( + self, + application_type_name: str, + *, + application_type_version: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets the list containing the information about service types that are supported by a + provisioned application type in a Service Fabric cluster. + + Gets the list containing the information about service types that are supported by a + provisioned application type in a Service Fabric cluster. The provided application type must + exist. Otherwise, a 404 status is returned. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :keyword application_type_version: The version of the application type. + :paramtype application_type_version: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "IsServiceGroup": bool, # Optional. Indicates whether the service is + a service group. If it is, the property value is true otherwise false. + "ServiceManifestName": "str", # Optional. The name of the service + manifest in which this service type is defined. + "ServiceManifestVersion": "str", # Optional. The version of the + service manifest in which this service type is defined. + "ServiceTypeDescription": { + "Extensions": [ + { + "Key": "str", # Optional. The name of the + extension. + "Value": "str" # Optional. The extension + value. + } + ], + "IsStateful": bool, # Optional. Indicates whether the + service type is a stateful service type or a stateless service type. This + property is true if the service type is a stateful service type, false + otherwise. + "LoadMetrics": [ + { + "AuxiliaryDefaultLoad": 0, # Optional. Used + only for Stateful services. The default amount of load, as a + number, that this service creates for this metric when it is an + Auxiliary replica. + "DefaultLoad": 0, # Optional. Used only for + Stateless services. The default amount of load, as a number, that + this service creates for this metric. + "Name": "str", # 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. + "PrimaryDefaultLoad": 0, # Optional. Used + only for Stateful services. The default amount of load, as a + number, that this service creates for this metric when it is a + Primary replica. + "SecondaryDefaultLoad": 0, # Optional. Used + only for Stateful services. The default amount of load, as a + number, that this service creates for this metric when it is a + Secondary replica. + "Weight": "str" # Optional. The service load + metric relative weight, compared to other metrics configured for + this service, as a number. Known values are: "Zero", "Low", + "Medium", "High". + } + ], + "PlacementConstraints": "str", # Optional. The placement + constraint to be used when instantiating this service in a Service Fabric + cluster. + "ServicePlacementPolicies": [ + { + Type: Type + } + ], + "ServiceTypeName": "str", # Optional. Name of the service + type as specified in the service manifest. + Kind: Kind + } + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_service_type_info_list_request( + application_type_name=application_type_name, + api_version=api_version, + application_type_version=application_type_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def get_service_type_info_by_name( + self, + application_type_name: str, + service_type_name: str, + *, + application_type_version: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[JSON]: + """Gets the information about a specific service type that is supported by a provisioned + application type in a Service Fabric cluster. + + Gets the information about a specific service type that is supported by a provisioned + application type in a Service Fabric cluster. The provided application type must exist. + Otherwise, a 404 status is returned. A 204 response is returned if the specified service type + is not found in the cluster. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param service_type_name: Specifies the name of a Service Fabric service type. + :type service_type_name: str + :keyword application_type_version: The version of the application type. + :paramtype application_type_version: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "IsServiceGroup": bool, # Optional. Indicates whether the service is a + service group. If it is, the property value is true otherwise false. + "ServiceManifestName": "str", # Optional. The name of the service manifest + in which this service type is defined. + "ServiceManifestVersion": "str", # Optional. The version of the service + manifest in which this service type is defined. + "ServiceTypeDescription": { + "Extensions": [ + { + "Key": "str", # Optional. The name of the extension. + "Value": "str" # Optional. The extension value. + } + ], + "IsStateful": bool, # Optional. Indicates whether the service type + is a stateful service type or a stateless service type. This property is true + if the service type is a stateful service type, false otherwise. + "LoadMetrics": [ + { + "AuxiliaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is an Auxiliary replica. + "DefaultLoad": 0, # Optional. Used only for + Stateless services. The default amount of load, as a number, that + this service creates for this metric. + "Name": "str", # 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. + "PrimaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is a Primary replica. + "SecondaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is a Secondary replica. + "Weight": "str" # Optional. The service load metric + relative weight, compared to other metrics configured for this + service, as a number. Known values are: "Zero", "Low", "Medium", + "High". + } + ], + "PlacementConstraints": "str", # Optional. The placement constraint + to be used when instantiating this service in a Service Fabric cluster. + "ServicePlacementPolicies": [ + { + Type: Type + } + ], + "ServiceTypeName": "str", # Optional. Name of the service type as + specified in the service manifest. + Kind: Kind + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + + request = build_get_service_type_info_by_name_request( + application_type_name=application_type_name, + service_type_name=service_type_name, + api_version=api_version, + application_type_version=application_type_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace + def get_service_manifest( + self, + application_type_name: str, + *, + application_type_version: str, + service_manifest_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the manifest describing a service type. + + Gets the manifest describing a service type. The response contains the service manifest XML as + a string. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :keyword application_type_version: The version of the application type. + :paramtype application_type_version: str + :keyword service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. + :paramtype service_manifest_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Manifest": "str" # Optional. The XML manifest as a string. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_service_manifest_request( + application_type_name=application_type_name, + api_version=api_version, + application_type_version=application_type_version, + service_manifest_name=service_manifest_name, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_deployed_service_type_info_list( + self, + node_name: str, + application_id: str, + *, + service_manifest_name: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets the list containing the information about service types from the applications deployed on + a node in a Service Fabric cluster. + + Gets the list containing the information about service types from the applications deployed on + a node in a Service Fabric cluster. The response includes the name of the service type, its + registration status, the code package that registered it and activation ID of the service + package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword service_manifest_name: The name of the service manifest to filter the list of deployed + service type information. If specified, the response will only contain the information about + service types that are defined in this service manifest. Default value is None. + :paramtype service_manifest_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "CodePackageName": "str", # Optional. The name of the code package + that registered the service type. + "ServiceManifestName": "str", # Optional. The name of the service + manifest in which this service type is defined. + "ServicePackageActivationId": "str", # Optional. The ActivationId of + a deployed service package. If ServicePackageActivationMode specified at the + time of creating the service"nis 'SharedProcess' (or if it is not specified, + in which case it defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + "ServiceTypeName": "str", # Optional. Name of the service type as + specified in the service manifest. + "Status": "str" # Optional. The status of the service type + registration on the node. Known values are: "Invalid", "Disabled", "Enabled", + "Registered". + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_deployed_service_type_info_list_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + service_manifest_name=service_manifest_name, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def get_deployed_service_type_info_by_name( + self, + node_name: str, + application_id: str, + service_type_name: str, + *, + service_manifest_name: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[List[JSON]]: + """Gets the information about a specified service type of the application deployed on a node in a + Service Fabric cluster. + + Gets the list containing the information about a specific service type from the applications + deployed on a node in a Service Fabric cluster. The response includes the name of the service + type, its registration status, the code package that registered it and activation ID of the + service package. Each entry represents one activation of a service type, differentiated by the + activation ID. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_type_name: Specifies the name of a Service Fabric service type. + :type service_type_name: str + :keyword service_manifest_name: The name of the service manifest to filter the list of deployed + service type information. If specified, the response will only contain the information about + service types that are defined in this service manifest. Default value is None. + :paramtype service_manifest_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "CodePackageName": "str", # Optional. The name of the code package + that registered the service type. + "ServiceManifestName": "str", # Optional. The name of the service + manifest in which this service type is defined. + "ServicePackageActivationId": "str", # Optional. The ActivationId of + a deployed service package. If ServicePackageActivationMode specified at the + time of creating the service"nis 'SharedProcess' (or if it is not specified, + in which case it defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + "ServiceTypeName": "str", # Optional. Name of the service type as + specified in the service manifest. + "Status": "str" # Optional. The status of the service type + registration on the node. Known values are: "Invalid", "Disabled", "Enabled", + "Registered". + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[List[JSON]]] + + + request = build_get_deployed_service_type_info_by_name_request( + node_name=node_name, + application_id=application_id, + service_type_name=service_type_name, + api_version=api_version, + service_manifest_name=service_manifest_name, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace + def create_application( # pylint: disable=inconsistent-return-statements + self, + application_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates a Service Fabric application. + + Creates a Service Fabric application using the specified description. + + :param application_description: Description for creating an application. + :type application_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_description = { + "ApplicationCapacity": { + "ApplicationMetrics": [ + { + "MaximumCapacity": 0.0, # Optional. The maximum node + capacity for Service Fabric application."nThis is the maximum Load + for an instance of this application on a single node. Even if the + capacity of node is greater than this value, Service Fabric will + limit the total load of services within the application on each node + to this value."nIf set to zero, capacity for this metric is unlimited + on each node."nWhen creating a new application with application + capacity defined, the product of MaximumNodes and this value must + always be smaller than or equal to TotalApplicationCapacity."nWhen + updating existing application with application capacity, the product + of MaximumNodes and this value must always be smaller than or equal + to TotalApplicationCapacity. + "Name": "str", # Optional. The name of the metric. + "ReservationCapacity": 0.0, # Optional. The node + reservation capacity for Service Fabric application."nThis is the + amount of load which is reserved on nodes which have instances of + this application."nIf MinimumNodes is specified, then the product of + these values will be the capacity reserved in the cluster for the + application."nIf set to zero, no capacity is reserved for this + metric."nWhen setting application capacity or when updating + application capacity; this value must be smaller than or equal to + MaximumCapacity for each metric. + "TotalApplicationCapacity": 0.0 # Optional. The + total metric capacity for Service Fabric application."nThis is the + total metric capacity for this application in the cluster. Service + Fabric will try to limit the sum of loads of services within the + application to this value."nWhen creating a new application with + application capacity defined, the product of MaximumNodes and + MaximumCapacity must always be smaller than or equal to this value. + } + ], + "MaximumNodes": 0.0, # Optional. The maximum number of nodes where + Service Fabric will reserve capacity for this application. Note that this + does not mean that the services of this application will be placed on all of + those nodes. By default, the value of this property is zero and it means that + the services can be placed on any node. + "MinimumNodes": 0.0 # Optional. The minimum number of nodes where + Service Fabric will reserve capacity for this application. Note that this + does not mean that the services of this application will be placed on all of + those nodes. If this property is set to zero, no capacity will be reserved. + The value of this property cannot be more than the value of the MaximumNodes + property. + }, + "ManagedApplicationIdentity": { + "ManagedIdentities": [ + { + "Name": "str", # Required. The name of the identity. + "PrincipalId": "str" # Optional. The identity's + PrincipalId. + } + ], + "TokenServiceEndpoint": "str" # Optional. Token service endpoint. + }, + "Name": "str", # Required. The name of the application, including the + 'fabric:' URI scheme. + "ParameterList": [ + { + "Key": "str", # Required. The name of the parameter. + "Value": "str" # Required. The value of the parameter. + } + ], + "TypeName": "str", # Required. The application type name as defined in the + application manifest. + "TypeVersion": "str" # Required. The version of the application type as + defined in the application manifest. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = application_description + + request = build_create_application_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def delete_application( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + *, + force_remove: Optional[bool] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes an existing Service Fabric application. + + An application must be created before it can be deleted. Deleting an application will delete + all services that are part of that application. By default, Service Fabric will try to close + service replicas in a graceful manner and then delete the service. However, if a service is + having issues closing the replica gracefully, the delete operation may take a long time or get + stuck. Use the optional ForceRemove flag to skip the graceful close sequence and forcefully + delete the application and all of its services. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword force_remove: Remove a Service Fabric application or service forcefully without going + through the graceful shutdown sequence. This parameter can be used to forcefully delete an + application or service for which delete is timing out due to issues in the service code that + prevents graceful close of replicas. Default value is None. + :paramtype force_remove: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_delete_application_request( + application_id=application_id, + api_version=api_version, + force_remove=force_remove, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_application_load_info( + self, + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[JSON]: + """Gets load information about a Service Fabric application. + + Returns the load information about the application that was created or in the process of being + created in the Service Fabric cluster and whose name matches the one specified as the + parameter. The response includes the name, minimum nodes, maximum nodes, the number of nodes + the application is occupying currently, and application load metric information about the + application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ApplicationLoadMetricInformation": [ + { + "ApplicationCapacity": 0.0, # Optional. Total capacity for + this metric in this application instance. + "ApplicationLoad": 0.0, # Optional. Current load for this + metric in this application instance. + "Name": "str", # Optional. The name of the metric. + "ReservationCapacity": 0.0 # Optional. This is the capacity + reserved in the cluster for the application."nIt's the product of + NodeReservationCapacity and MinimumNodes."nIf set to zero, no capacity is + reserved for this metric."nWhen setting application capacity or when + updating application capacity this value must be smaller than or equal to + MaximumCapacity for each metric. + } + ], + "Id": "str", # Optional. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify + the application resource."nStarting in version 6.0, hierarchical names are + delimited with the "~" character. For example, if the application name is + "fabric:/myapp/app1","nthe application identity would be "myapp~app1" in 6.0+ and + "myapp/app1" in previous versions. + "MaximumNodes": 0.0, # Optional. The maximum number of nodes where this + application can be instantiated."nIt is the number of nodes this application is + allowed to span."nFor applications that do not have application capacity defined + this value will be zero. + "MinimumNodes": 0.0, # Optional. The minimum number of nodes for this + application."nIt is the number of nodes where Service Fabric will reserve + Capacity in the cluster which equals to ReservedLoad * MinimumNodes for this + Application instance."nFor applications that do not have application capacity + defined this value will be zero. + "NodeCount": 0.0 # Optional. The number of nodes on which this application + is instantiated."nFor applications that do not have application capacity defined + this value will be zero. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + + request = build_get_application_load_info_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace + def get_application_info_list( + self, + *, + application_definition_kind_filter: Optional[int] = 0, + application_type_name: Optional[str] = None, + exclude_application_parameters: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the list of applications created in the Service Fabric cluster that match the specified + filters. + + Gets the information about the applications that were created or in the process of being + created in the Service Fabric cluster and match the specified filters. The response includes + the name, type, status, parameters, and other details about the application. If the + applications do not fit in a page, one page of results is returned as well as a continuation + token, which can be used to get the next page. Filters ApplicationTypeName and + ApplicationDefinitionKindFilter cannot be specified at the same time. + + :keyword application_definition_kind_filter: Used to filter on ApplicationDefinitionKind, which + is the mechanism used to define a Service Fabric application. + + + * Default - Default value, which performs the same function as selecting "All". The value is + 0. + * All - Filter that matches input with any ApplicationDefinitionKind value. The value is + 65535. + * ServiceFabricApplicationDescription - Filter that matches input with + ApplicationDefinitionKind value ServiceFabricApplicationDescription. The value is 1. + * Compose - Filter that matches input with ApplicationDefinitionKind value Compose. The value + is 2. Default value is 0. + :paramtype application_definition_kind_filter: int + :keyword application_type_name: The application type name used to filter the applications to + query for. This value should not contain the application type version. Default value is None. + :paramtype application_type_name: str + :keyword exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :paramtype exclude_application_parameters: bool + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.1'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.1". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "ApplicationDefinitionKind": "str", # Optional. The + mechanism used to define a Service Fabric application. Known values are: + "Invalid", "ServiceFabricApplicationDescription", "Compose". + "ApplicationMetadata": { + "ArmMetadata": { + "ArmResourceId": "str" # Optional. A string + containing the ArmResourceId. + } + }, + "HealthState": "str", # Optional. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "Id": "str", # Optional. The identity of the application. + This is an encoded representation of the application name. This is used + in the REST APIs to identify the application resource."nStarting in + version 6.0, hierarchical names are delimited with the "~" character. For + example, if the application name is "fabric:/myapp/app1","nthe + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + "ManagedApplicationIdentity": { + "ManagedIdentities": [ + { + "Name": "str", # Required. The name + of the identity. + "PrincipalId": "str" # Optional. The + identity's PrincipalId. + } + ], + "TokenServiceEndpoint": "str" # Optional. Token + service endpoint. + }, + "Name": "str", # Optional. The name of the application, + including the 'fabric:' URI scheme. + "Parameters": [ + { + "Key": "str", # Required. The name of the + parameter. + "Value": "str" # Required. The value of the + parameter. + } + ], + "Status": "str", # Optional. The status of the application. + Known values are: "Invalid", "Ready", "Upgrading", "Creating", + "Deleting", "Failed". + "TypeName": "str", # Optional. The application type name as + defined in the application manifest. + "TypeVersion": "str" # Optional. The version of the + application type as defined in the application manifest. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.1")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_info_list_request( + api_version=api_version, + application_definition_kind_filter=application_definition_kind_filter, + application_type_name=application_type_name, + exclude_application_parameters=exclude_application_parameters, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_application_info( + self, + application_id: str, + *, + exclude_application_parameters: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[JSON]: + """Gets information about a Service Fabric application. + + Returns the information about the application that was created or in the process of being + created in the Service Fabric cluster and whose name matches the one specified as the + parameter. The response includes the name, type, status, parameters, and other details about + the application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :paramtype exclude_application_parameters: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ApplicationDefinitionKind": "str", # Optional. The mechanism used to define + a Service Fabric application. Known values are: "Invalid", + "ServiceFabricApplicationDescription", "Compose". + "ApplicationMetadata": { + "ArmMetadata": { + "ArmResourceId": "str" # Optional. A string containing the + ArmResourceId. + } + }, + "HealthState": "str", # Optional. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Id": "str", # Optional. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify + the application resource."nStarting in version 6.0, hierarchical names are + delimited with the "~" character. For example, if the application name is + "fabric:/myapp/app1","nthe application identity would be "myapp~app1" in 6.0+ and + "myapp/app1" in previous versions. + "ManagedApplicationIdentity": { + "ManagedIdentities": [ + { + "Name": "str", # Required. The name of the identity. + "PrincipalId": "str" # Optional. The identity's + PrincipalId. + } + ], + "TokenServiceEndpoint": "str" # Optional. Token service endpoint. + }, + "Name": "str", # Optional. The name of the application, including the + 'fabric:' URI scheme. + "Parameters": [ + { + "Key": "str", # Required. The name of the parameter. + "Value": "str" # Required. The value of the parameter. + } + ], + "Status": "str", # Optional. The status of the application. Known values + are: "Invalid", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "TypeName": "str", # Optional. The application type name as defined in the + application manifest. + "TypeVersion": "str" # Optional. The version of the application type as + defined in the application manifest. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + + request = build_get_application_info_request( + application_id=application_id, + api_version=api_version, + exclude_application_parameters=exclude_application_parameters, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace + def get_application_health( + self, + application_id: str, + *, + events_health_state_filter: Optional[int] = 0, + deployed_applications_health_state_filter: Optional[int] = 0, + services_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of the service fabric application. + + Returns the heath state of the service fabric application. The response reports either Ok, + Error or Warning health state. If the entity is not found in the health store, it will return + Error. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword deployed_applications_health_state_filter: Allows filtering of the deployed + applications health state objects returned in the result of application health query based on + their health state. + The possible values for this parameter include integer value of one of the following health + states. Only deployed applications that match the filter will be returned. + All deployed applications are used to evaluate the aggregated health state. If not specified, + all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values, obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of deployed applications with + HealthState value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype deployed_applications_health_state_filter: int + :keyword services_health_state_filter: Allows filtering of the services health state objects + returned in the result of services health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only services that match the filter are returned. All services are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of services with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype services_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "DeployedApplicationHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "ApplicationName": "str", # Optional. The name of the + application, including the 'fabric:' URI scheme. + "NodeName": "str" # Optional. Name of the node on which the + service package is deployed. + } + ], + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "Name": "str", # Optional. The name of the application, including the + 'fabric:' URI scheme. + "ServiceHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "ServiceName": "str" # Optional. Name of the service whose + health state is represented by this object. + } + ], + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_health_request( + application_id=application_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + deployed_applications_health_state_filter=deployed_applications_health_state_filter, + services_health_state_filter=services_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_application_health_using_policy( + self, + application_id: str, + application_health_policy: Optional[JSON] = None, + *, + events_health_state_filter: Optional[int] = 0, + deployed_applications_health_state_filter: Optional[int] = 0, + services_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric application using the specified policy. + + Gets the health of a Service Fabric application. Use EventsHealthStateFilter to filter the + collection of health events reported on the node based on the health state. Use + ClusterHealthPolicies to override the health policies used to evaluate the health. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: JSON + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword deployed_applications_health_state_filter: Allows filtering of the deployed + applications health state objects returned in the result of application health query based on + their health state. + The possible values for this parameter include integer value of one of the following health + states. Only deployed applications that match the filter will be returned. + All deployed applications are used to evaluate the aggregated health state. If not specified, + all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values, obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of deployed applications with + HealthState value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype deployed_applications_health_state_filter: int + :keyword services_health_state_filter: Allows filtering of the services health state objects + returned in the result of services health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only services that match the filter are returned. All services are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of services with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype services_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_health_policy = { + "ConsiderWarningAsError": bool, # Optional. Indicates whether warnings are + treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. The + maximum allowed percentage of unhealthy partitions per service. Allowed + values are Byte values from zero to 100"n"nThe percentage represents the + maximum tolerated percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe computation rounds up to + tolerate one failure on small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. The + maximum allowed percentage of unhealthy replicas per partition. Allowed + values are Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas over + the total number of replicas in the partition."nThe computation rounds up to + tolerate one failure on small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum allowed + percentage of unhealthy services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated percentage of + services that can be unhealthy before the application is considered in + error."nIf the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific service type over the total + number of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default percentage is + zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The maximum + allowed percentage of unhealthy deployed applications. Allowed values are Byte + values from zero to 100."nThe percentage represents the maximum tolerated + percentage of deployed applications that can be unhealthy before the application + is considered in error."nThis is calculated by dividing the number of unhealthy + deployed applications over the number of nodes where the application is currently + deployed on in the cluster."nThe computation rounds up to tolerate one failure on + small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service type health + policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to 100"n"nThe + percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error."nIf + the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy partitions over the + total number of partitions in the service."nThe computation rounds up + to tolerate one failure on small numbers of partitions. Default + percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to 100."n"nThe + percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at least one + unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition."nThe computation + rounds up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. Allowed values are + Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of services that can be unhealthy before + the application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the number of + unhealthy services of the specific service type over the total number + of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default + percentage is zero. + } + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "DeployedApplicationHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "ApplicationName": "str", # Optional. The name of the + application, including the 'fabric:' URI scheme. + "NodeName": "str" # Optional. Name of the node on which the + service package is deployed. + } + ], + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "Name": "str", # Optional. The name of the application, including the + 'fabric:' URI scheme. + "ServiceHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "ServiceName": "str" # Optional. Name of the service whose + health state is represented by this object. + } + ], + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if application_health_policy is not None: + _json = application_health_policy + else: + _json = None + + request = build_get_application_health_using_policy_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + deployed_applications_health_state_filter=deployed_applications_health_state_filter, + services_health_state_filter=services_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def report_application_health( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + health_information: JSON, + *, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric application. + + Reports health state of the specified Service Fabric application. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway Application, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, get application health and check + that the report appears in the HealthEvents section. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: JSON + :keyword immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :paramtype immediate: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + health_information = { + "Description": "str", # Optional. The description of the health information. + It represents free text used to add human readable information about the + report."nThe maximum string length for the description is 4096 characters."nIf + the provided string is longer, it will be automatically truncated."nWhen + truncated, the last characters of the description contain a marker "[Truncated]", + and total string size is 4096 characters."nThe presence of the marker indicates + to users that truncation occurred."nNote that when truncated, the description has + less than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID which identifies the + health report and can be used to find more detailed information about a specific + health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Property": "str", # Required. The property of the health information. An + entity can have health reports for different properties."nThe property is a + string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report."nFor example, a reporter + with SourceId "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same reporter + can monitor the node connectivity, so it can report a property "Connectivity" on + the same node."nIn the health store, these reports are treated as separate health + events for the specified node."n"nTogether with the SourceId, the property + uniquely identifies the health information. + "RemoveWhenExpired": bool, # Optional. Value that indicates whether the + report is removed from health store when it expires."nIf set to true, the report + is removed from the health store after it expires."nIf set to false, the report + is treated as an error when expired. The value of this property is false by + default."nWhen clients report periodically, they should set RemoveWhenExpired + false (default)."nThis way, if the reporter has issues (e.g. deadlock) and can't + report, the entity is evaluated at error when the health report expires."nThis + flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for this health + report as a numeric string."nThe report sequence number is used by the health + store to detect stale reports."nIf not specified, a sequence number is + auto-generated by the health client when a report is added. + "SourceId": "str", # Required. The source name that identifies the + client/watchdog/system component that generated the health information. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The duration for + which this health report is valid. This field uses ISO8601 format for specifying + the duration."nWhen clients report periodically, they should send reports with + higher frequency than time to live."nIf clients report on transition, they can + set the time to live to infinite."nWhen time to live expires, the health event + that contains the health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = health_information + + request = build_report_application_health_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def start_application_upgrade( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + application_upgrade_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts upgrading an application in the Service Fabric cluster. + + Validates the supplied application upgrade parameters and starts upgrading the application if + the parameters are valid. + Note, `ApplicationParameter + `_\ + s are not preserved across an application upgrade. + In order to preserve current application parameters, the user should get the parameters using + `GetApplicationInfo <./GetApplicationInfo.md>`_ operation first and pass them into the upgrade + API call as shown in the example. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_upgrade_description: Parameters for an application upgrade. + :type application_upgrade_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_upgrade_description = { + "ApplicationHealthPolicy": { + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per service. + Allowed values are Byte values from zero to 100"n"nThe percentage + represents the maximum tolerated percentage of partitions that can be + unhealthy before the service is considered in error."nIf the percentage + is respected but there is at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated by dividing the + number of unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on small + numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per partition. + Allowed values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of replicas that can be + unhealthy before the partition is considered in error."nIf the percentage + is respected but there is at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated by dividing the + number of unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on small + numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum + allowed percentage of unhealthy services. Allowed values are Byte values + from zero to 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the application is + considered in error."nIf the percentage is respected but there is at + least one unhealthy service, the health is evaluated as Warning."nThis is + calculated by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific service + type."nThe computation rounds up to tolerate one failure on small numbers + of services. Default percentage is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The + maximum allowed percentage of unhealthy deployed applications. Allowed values + are Byte values from zero to 100."nThe percentage represents the maximum + tolerated percentage of deployed applications that can be unhealthy before + the application is considered in error."nThis is calculated by dividing the + number of unhealthy deployed applications over the number of nodes where the + application is currently deployed on in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service + type health policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, + # Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte values from zero + to 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the service + is considered in error."nIf the percentage is respected but there + is at least one unhealthy partition, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, + # Optional. The maximum allowed percentage of unhealthy replicas + per partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the partition + is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. + The maximum allowed percentage of unhealthy services. Allowed + values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of services that can + be unhealthy before the application is considered in error."nIf + the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated + by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific + service type."nThe computation rounds up to tolerate one failure + on small numbers of services. Default percentage is zero. + } + } + ] + }, + "ForceRestart": bool, # Optional. If true, then processes are forcefully + restarted during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + "InstanceCloseDelayDurationInSeconds": 4294967295, # Optional. Default value + is 4294967295. Duration in seconds, to wait before a stateless instance is + closed, to allow the active requests to drain gracefully. This would be effective + when the instance is closing during the application/cluster"nupgrade, only for + those instances which have a non-zero delay duration configured in the service + description. See InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details."nNote, the default + value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates that + the behavior will entirely depend on the delay configured in the stateless + service description. + "ManagedApplicationIdentity": { + "ManagedIdentities": [ + { + "Name": "str", # Required. The name of the identity. + "PrincipalId": "str" # Optional. The identity's + PrincipalId. + } + ], + "TokenServiceEndpoint": "str" # Optional. Token service endpoint. + }, + "MonitoringPolicy": { + "FailureAction": "str", # Optional. The compensating action to + perform when a Monitored upgrade encounters monitoring policy or health + policy violations."nInvalid indicates the failure action is invalid. Rollback + specifies that the upgrade will start rolling back automatically."nManual + indicates that the upgrade will switch to UnmonitoredManual upgrade mode. + Known values are: "Invalid", "Rollback", "Manual". + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # Optional. + Default value is "PT0H10M0S". The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is + executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # Optional. + Default value is "PT0H2M0S". The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade + domain. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. Default + value is "0". The amount of time to wait after completing an upgrade domain + before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a + number representing the total number of milliseconds. + "UpgradeDomainTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S", + # Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of + time each upgrade domain has to complete before FailureAction is executed. It + is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + "UpgradeTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S" # + Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of time + the overall upgrade has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + }, + "Name": "str", # Required. The name of the target application, including the + 'fabric:' URI scheme. + "Parameters": [ + { + "Key": "str", # Required. The name of the parameter. + "Value": "str" # Required. The value of the parameter. + } + ], + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value is + "UnmonitoredAuto". The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "SortOrder": "Default", # Optional. Default value is "Default". Defines the + order in which an upgrade proceeds through the cluster. Known values are: + "Invalid", "Default", "Numeric", "Lexicographical", "ReverseNumeric", + "ReverseLexicographical". Default value: "Default". + "TargetApplicationTypeVersion": "str", # Required. The target application + type version (found in the application manifest) for the application upgrade. + "UpgradeKind": "Rolling", # Default value is "Rolling". Required. The kind + of upgrade out of the following possible values. Known values are: "Invalid", + "Rolling". Default value: "Rolling". + "UpgradeReplicaSetCheckTimeoutInSeconds": 42949672925 # Optional. Default + value is 42949672925. The maximum amount of time to block processing of an + upgrade domain and prevent loss of availability when there are unexpected issues. + When this timeout expires, processing of the upgrade domain will proceed + regardless of availability loss issues. The timeout is reset at the start of each + upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + 32-bit integer). + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = application_upgrade_description + + request = build_start_application_upgrade_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_application_upgrade( + self, + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets details for the latest upgrade performed on this application. + + Returns information about the state of the latest application upgrade along with details to aid + debugging application health issues. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "CurrentUpgradeDomainProgress": { + "DomainName": "str", # Optional. The name of the upgrade domain. + "NodeUpgradeProgressList": [ + { + "NodeName": "str", # Optional. The name of a Service + Fabric node. + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ], + "UpgradeDuration": "str", # Optional. The estimated + time spent processing the node since it was deactivated during a + node-by-node upgrade. + "UpgradePhase": "str" # Optional. The state of the + upgrading node. Known values are: "Invalid", "PreUpgradeSafetyCheck", + "Upgrading", "PostUpgradeSafetyCheck". + } + ] + }, + "CurrentUpgradeUnitsProgress": { + "DomainName": "str", # Optional. The name of the upgrade domain. Not + applicable to node-by-node upgrades. + "NodeUpgradeProgressList": [ + { + "NodeName": "str", # Optional. The name of a Service + Fabric node. + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ], + "UpgradeDuration": "str", # Optional. The estimated + time spent processing the node since it was deactivated during a + node-by-node upgrade. + "UpgradePhase": "str" # Optional. The state of the + upgrading node. Known values are: "Invalid", "PreUpgradeSafetyCheck", + "Upgrading", "PostUpgradeSafetyCheck". + } + ] + }, + "FailureReason": "str", # Optional. The cause of an upgrade failure that + resulted in FailureAction being executed. Known values are: "None", + "Interrupted", "HealthCheck", "UpgradeDomainTimeout", "OverallUpgradeTimeout". + "FailureTimestampUtc": "str", # Optional. The estimated UTC datetime when + the upgrade failed and FailureAction was executed. + "IsNodeByNode": bool, # Optional. Indicates whether this upgrade is + node-by-node. + "Name": "str", # Optional. The name of the target application, including the + 'fabric:' URI scheme. + "NextUpgradeDomain": "str", # Optional. The name of the next upgrade domain + to be processed. Not applicable to node-by-node upgrades. + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value is + "UnmonitoredAuto". The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "StartTimestampUtc": "str", # Optional. The estimated UTC datetime when the + upgrade started. + "TargetApplicationTypeVersion": "str", # Optional. The target application + type version (found in the application manifest) for the application upgrade. + "TypeName": "str", # Optional. The application type name as defined in the + application manifest. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ], + "UpgradeDescription": { + "ApplicationHealthPolicy": { + "ConsiderWarningAsError": bool, # Optional. Indicates + whether warnings are treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to 100"n"nThe + percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error."nIf + the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy partitions over the + total number of partitions in the service."nThe computation rounds up + to tolerate one failure on small numbers of partitions. Default + percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to 100."n"nThe + percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at least one + unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition."nThe computation + rounds up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. Allowed values are + Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of services that can be unhealthy before + the application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the number of + unhealthy services of the specific service type over the total number + of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default + percentage is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. + The maximum allowed percentage of unhealthy deployed applications. + Allowed values are Byte values from zero to 100."nThe percentage + represents the maximum tolerated percentage of deployed applications that + can be unhealthy before the application is considered in error."nThis is + calculated by dividing the number of unhealthy deployed applications over + the number of nodes where the application is currently deployed on in the + cluster."nThe computation rounds up to tolerate one failure on small + numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the + service type health policy map item. This is the name of the + service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to + 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is + respected but there is at least one unhealthy partition, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy partitions over the total + number of partitions in the service."nThe computation rounds + up to tolerate one failure on small numbers of partitions. + Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is + respected but there is at least one unhealthy replica, the + health is evaluated as Warning."nThe percentage is calculated + by dividing the number of unhealthy replicas over the total + number of replicas in the partition."nThe computation rounds + up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # + Optional. The maximum allowed percentage of unhealthy + services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the + application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the + health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy services of the specific + service type over the total number of services of the + specific service type."nThe computation rounds up to tolerate + one failure on small numbers of services. Default percentage + is zero. + } + } + ] + }, + "ForceRestart": bool, # Optional. If true, then processes are + forcefully restarted during upgrade even when the code version has not + changed (the upgrade only changes configuration or data). + "InstanceCloseDelayDurationInSeconds": 4294967295, # Optional. + Default value is 4294967295. Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This + would be effective when the instance is closing during the + application/cluster"nupgrade, only for those instances which have a non-zero + delay duration configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details."nNote, the + default value of InstanceCloseDelayDurationInSeconds is 4294967295, which + indicates that the behavior will entirely depend on the delay configured in + the stateless service description. + "ManagedApplicationIdentity": { + "ManagedIdentities": [ + { + "Name": "str", # Required. The name of the + identity. + "PrincipalId": "str" # Optional. The + identity's PrincipalId. + } + ], + "TokenServiceEndpoint": "str" # Optional. Token service + endpoint. + }, + "MonitoringPolicy": { + "FailureAction": "str", # Optional. The compensating action + to perform when a Monitored upgrade encounters monitoring policy or + health policy violations."nInvalid indicates the failure action is + invalid. Rollback specifies that the upgrade will start rolling back + automatically."nManual indicates that the upgrade will switch to + UnmonitoredManual upgrade mode. Known values are: "Invalid", "Rollback", + "Manual". + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # + Optional. Default value is "PT0H10M0S". The amount of time to retry + health evaluation when the application or cluster is unhealthy before + FailureAction is executed. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted + as a number representing the total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # + Optional. Default value is "PT0H2M0S". The amount of time that the + application or cluster must remain healthy before the upgrade proceeds to + the next upgrade domain. It is first interpreted as a string representing + an ISO 8601 duration. If that fails, then it is interpreted as a number + representing the total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. + Default value is "0". The amount of time to wait after completing an + upgrade domain before applying health policies. It is first interpreted + as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + "UpgradeDomainTimeoutInMilliseconds": + "P10675199DT02H48M05.4775807S", # Optional. Default value is + "P10675199DT02H48M05.4775807S". The amount of time each upgrade domain + has to complete before FailureAction is executed. It is first interpreted + as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + "UpgradeTimeoutInMilliseconds": + "P10675199DT02H48M05.4775807S" # Optional. Default value is + "P10675199DT02H48M05.4775807S". The amount of time the overall upgrade + has to complete before FailureAction is executed. It is first interpreted + as a string representing an ISO 8601 duration. If that fails, then it is + interpreted as a number representing the total number of milliseconds. + }, + "Name": "str", # Required. The name of the target application, + including the 'fabric:' URI scheme. + "Parameters": [ + { + "Key": "str", # Required. The name of the parameter. + "Value": "str" # Required. The value of the + parameter. + } + ], + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value + is "UnmonitoredAuto". The mode used to monitor health during a rolling + upgrade. The values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "SortOrder": "Default", # Optional. Default value is "Default". + Defines the order in which an upgrade proceeds through the cluster. Known + values are: "Invalid", "Default", "Numeric", "Lexicographical", + "ReverseNumeric", "ReverseLexicographical". Default value: "Default". + "TargetApplicationTypeVersion": "str", # Required. The target + application type version (found in the application manifest) for the + application upgrade. + "UpgradeKind": "Rolling", # Default value is "Rolling". Required. + The kind of upgrade out of the following possible values. Known values are: + "Invalid", "Rolling". Default value: "Rolling". + "UpgradeReplicaSetCheckTimeoutInSeconds": 42949672925 # Optional. + Default value is 42949672925. The maximum amount of time to block processing + of an upgrade domain and prevent loss of availability when there are + unexpected issues. When this timeout expires, processing of the upgrade + domain will proceed regardless of availability loss issues. The timeout is + reset at the start of each upgrade domain. Valid values are between 0 and + 42949672925 inclusive. (unsigned 32-bit integer). + }, + "UpgradeDomainDurationInMilliseconds": "str", # Optional. The estimated + total amount of time spent processing the current upgrade domain. + "UpgradeDomainProgressAtFailure": { + "DomainName": "str", # Optional. The name of the upgrade domain. + "NodeUpgradeProgressList": [ + { + "NodeName": "str", # Optional. The name of a Service + Fabric node. + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ], + "UpgradeDuration": "str", # Optional. The estimated + time spent processing the node since it was deactivated during a + node-by-node upgrade. + "UpgradePhase": "str" # Optional. The state of the + upgrading node. Known values are: "Invalid", "PreUpgradeSafetyCheck", + "Upgrading", "PostUpgradeSafetyCheck". + } + ] + }, + "UpgradeDomains": [ + { + "Name": "str", # Optional. The name of the upgrade domain. + "State": "str" # Optional. The state of the upgrade domain. + Known values are: "Invalid", "Pending", "InProgress", "Completed". + } + ], + "UpgradeDurationInMilliseconds": "str", # Optional. The estimated total + amount of time spent processing the overall upgrade. + "UpgradeState": "str", # Optional. The state of the upgrade domain. Known + values are: "Invalid", "RollingBackInProgress", "RollingBackCompleted", + "RollingForwardPending", "RollingForwardInProgress", "RollingForwardCompleted", + "Failed". + "UpgradeStatusDetails": "str", # Optional. Additional detailed information + about the status of the pending upgrade. + "UpgradeUnits": [ + { + "Name": "str", # Optional. The name of the upgrade unit. + "State": "str" # Optional. The state of the upgrade unit. + Known values are: "Invalid", "Pending", "InProgress", "Completed", + "Failed". + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_upgrade_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def update_application_upgrade( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + application_upgrade_update_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Updates an ongoing application upgrade in the Service Fabric cluster. + + Updates the parameters of an ongoing application upgrade from the ones specified at the time of + starting the application upgrade. This may be required to mitigate stuck application upgrades + due to incorrect parameters or issues in the application to make progress. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_upgrade_update_description: Parameters for updating an existing application + upgrade. + :type application_upgrade_update_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_upgrade_update_description = { + "ApplicationHealthPolicy": { + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per service. + Allowed values are Byte values from zero to 100"n"nThe percentage + represents the maximum tolerated percentage of partitions that can be + unhealthy before the service is considered in error."nIf the percentage + is respected but there is at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated by dividing the + number of unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on small + numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per partition. + Allowed values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of replicas that can be + unhealthy before the partition is considered in error."nIf the percentage + is respected but there is at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated by dividing the + number of unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on small + numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum + allowed percentage of unhealthy services. Allowed values are Byte values + from zero to 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the application is + considered in error."nIf the percentage is respected but there is at + least one unhealthy service, the health is evaluated as Warning."nThis is + calculated by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific service + type."nThe computation rounds up to tolerate one failure on small numbers + of services. Default percentage is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The + maximum allowed percentage of unhealthy deployed applications. Allowed values + are Byte values from zero to 100."nThe percentage represents the maximum + tolerated percentage of deployed applications that can be unhealthy before + the application is considered in error."nThis is calculated by dividing the + number of unhealthy deployed applications over the number of nodes where the + application is currently deployed on in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service + type health policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, + # Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte values from zero + to 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the service + is considered in error."nIf the percentage is respected but there + is at least one unhealthy partition, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, + # Optional. The maximum allowed percentage of unhealthy replicas + per partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the partition + is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. + The maximum allowed percentage of unhealthy services. Allowed + values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of services that can + be unhealthy before the application is considered in error."nIf + the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated + by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific + service type."nThe computation rounds up to tolerate one failure + on small numbers of services. Default percentage is zero. + } + } + ] + }, + "Name": "str", # Required. The name of the application, including the + 'fabric:' URI scheme. + "UpdateDescription": { + "FailureAction": "str", # Optional. The compensating action to + perform when a Monitored upgrade encounters monitoring policy or health + policy violations."nInvalid indicates the failure action is invalid. Rollback + specifies that the upgrade will start rolling back automatically."nManual + indicates that the upgrade will switch to UnmonitoredManual upgrade mode. + Known values are: "Invalid", "Rollback", "Manual". + "ForceRestart": bool, # Optional. If true, then processes are + forcefully restarted during upgrade even when the code version has not + changed (the upgrade only changes configuration or data). + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # Optional. + Default value is "PT0H10M0S". The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is + executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # Optional. + Default value is "PT0H2M0S". The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade + domain. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. Default + value is "0". The amount of time to wait after completing an upgrade domain + before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a + number representing the total number of milliseconds. + "InstanceCloseDelayDurationInSeconds": 4294967295, # Optional. + Default value is 4294967295. Duration in seconds, to wait before a stateless + instance is closed, to allow the active requests to drain gracefully. This + would be effective when the instance is closing during the + application/cluster"nupgrade, only for those instances which have a non-zero + delay duration configured in the service description. See + InstanceCloseDelayDurationSeconds property in $ref: + "#/definitions/StatelessServiceDescription.yaml" for details."nNote, the + default value of InstanceCloseDelayDurationInSeconds is 4294967295, which + indicates that the behavior will entirely depend on the delay configured in + the stateless service description. + "ReplicaSetCheckTimeoutInMilliseconds": 42949672925, # Optional. + Default value is 42949672925. The maximum amount of time to block processing + of an upgrade domain and prevent loss of availability when there are + unexpected issues. When this timeout expires, processing of the upgrade + domain will proceed regardless of availability loss issues. The timeout is + reset at the start of each upgrade domain. Valid values are between 0 and + 42949672925 inclusive. (unsigned 32-bit integer). + "RollingUpgradeMode": "UnmonitoredAuto", # Default value is + "UnmonitoredAuto". Required. The mode used to monitor health during a rolling + upgrade. The values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "UpgradeDomainTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S", + # Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of + time each upgrade domain has to complete before FailureAction is executed. It + is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + "UpgradeTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S" # + Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of time + the overall upgrade has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + }, + "UpgradeKind": "Rolling" # Default value is "Rolling". Required. The kind of + upgrade out of the following possible values. Known values are: "Invalid", + "Rolling". Default value: "Rolling". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = application_upgrade_update_description + + request = build_update_application_upgrade_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def update_application( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + application_update_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Updates a Service Fabric application. + + Updates a Service Fabric application instance. The set of properties that can be updated are a + subset of the properties that were specified at the time of creating the application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_update_description: Parameters for updating an existing application + instance. + :type application_update_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '8.1'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "8.1". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_update_description = { + "ApplicationMetrics": [ + { + "MaximumCapacity": 0.0, # Optional. The maximum node + capacity for Service Fabric application."nThis is the maximum Load for an + instance of this application on a single node. Even if the capacity of + node is greater than this value, Service Fabric will limit the total load + of services within the application on each node to this value."nIf set to + zero, capacity for this metric is unlimited on each node."nWhen creating + a new application with application capacity defined, the product of + MaximumNodes and this value must always be smaller than or equal to + TotalApplicationCapacity."nWhen updating existing application with + application capacity, the product of MaximumNodes and this value must + always be smaller than or equal to TotalApplicationCapacity. + "Name": "str", # Optional. The name of the metric. + "ReservationCapacity": 0.0, # Optional. The node reservation + capacity for Service Fabric application."nThis is the amount of load + which is reserved on nodes which have instances of this application."nIf + MinimumNodes is specified, then the product of these values will be the + capacity reserved in the cluster for the application."nIf set to zero, no + capacity is reserved for this metric."nWhen setting application capacity + or when updating application capacity; this value must be smaller than or + equal to MaximumCapacity for each metric. + "TotalApplicationCapacity": 0.0 # Optional. The total metric + capacity for Service Fabric application."nThis is the total metric + capacity for this application in the cluster. Service Fabric will try to + limit the sum of loads of services within the application to this + value."nWhen creating a new application with application capacity + defined, the product of MaximumNodes and MaximumCapacity must always be + smaller than or equal to this value. + } + ], + "Flags": "str", # Optional. Flags indicating whether other properties are + set. Each of the associated properties corresponds to a flag, specified below, + which, if set, indicate that the property is specified."nIf flags are not + specified for a certain property, the property will not be updated even if the + new value is provided."nThis property can be a combination of those flags + obtained using bitwise 'OR' operator. Exception is RemoveApplicationCapacity + which cannot be specified along with other parameters."nFor example, if the + provided value is 3 then the flags for MinimumNodes (1) and MaximumNodes (2) are + set."n"n"n* None - Does not indicate any other properties are set. The value is + 0."n* MinimumNodes - Indicates whether the MinimumNodes property is set. The + value is 1."n* MaximumNodes - Indicates whether the MinimumNodes property is set. + The value is 2."n* ApplicationMetrics - Indicates whether the ApplicationMetrics + property is set. The value is 4. + "MaximumNodes": 0.0, # Optional. The maximum number of nodes where Service + Fabric will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those nodes. By + default, the value of this property is zero and it means that the services can be + placed on any node. + "MinimumNodes": 0.0, # Optional. The minimum number of nodes where Service + Fabric will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those nodes. If + this property is set to zero, no capacity will be reserved. The value of this + property cannot be more than the value of the MaximumNodes property. + "RemoveApplicationCapacity": bool # Optional. Used to clear all parameters + related to Application Capacity for this application. |"nIt is not possible to + specify this parameter together with other Application Capacity parameters. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "8.1")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = application_update_description + + request = build_update_application_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def resume_application_upgrade( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + resume_application_upgrade_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Resumes upgrading an application in the Service Fabric cluster. + + Resumes an unmonitored manual Service Fabric application upgrade. Service Fabric upgrades one + upgrade domain at a time. For unmonitored manual upgrades, after Service Fabric finishes an + upgrade domain, it waits for you to call this API before proceeding to the next upgrade domain. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param resume_application_upgrade_description: Describes the parameters for resuming an + application upgrade. + :type resume_application_upgrade_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + resume_application_upgrade_description = { + "UpgradeDomainName": "str" # Required. The name of the upgrade domain in + which to resume the upgrade. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = resume_application_upgrade_description + + request = build_resume_application_upgrade_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def rollback_application_upgrade( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts rolling back the currently on-going upgrade of an application in the Service Fabric + cluster. + + Starts rolling back the current application upgrade to the previous version. This API can only + be used to roll back the current in-progress upgrade that is rolling forward to new version. If + the application is not currently being upgraded use StartApplicationUpgrade API to upgrade it + to desired version, including rolling back to a previous version. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_rollback_application_upgrade_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_deployed_application_info_list( + self, + node_name: str, + *, + timeout: Optional[int] = 60, + include_health_state: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + **kwargs: Any + ) -> JSON: + """Gets the list of applications deployed on a Service Fabric node. + + Gets the list of applications deployed on a Service Fabric node. The results do not include + information about deployed system applications unless explicitly queried for by ID. Results + encompass deployed applications in active, activating, and downloading states. This query + requires that the node name corresponds to a node on the cluster. The query fails if the + provided node name does not point to any active Service Fabric nodes on the cluster. + + :param node_name: The name of the node. + :type node_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword include_health_state: Include the health state of an entity. + If this parameter is false or not specified, then the health state returned is "Unknown". + When set to true, the query goes in parallel to the node and the health system service before + the results are merged. + As a result, the query is more expensive and may take a longer time. Default value is False. + :paramtype include_health_state: bool + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.1'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.1". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "HealthState": "str", # Optional. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "Id": "str", # Optional. The identity of the application. + This is an encoded representation of the application name. This is used + in the REST APIs to identify the application resource."nStarting in + version 6.0, hierarchical names are delimited with the "~" character. For + example, if the application name is "fabric:/myapp/app1","nthe + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + "LogDirectory": "str", # Optional. The log directory of the + application on the node. The log directory can be used to store + application logs. + "Name": "str", # Optional. The name of the application, + including the 'fabric:' URI scheme. + "Status": "str", # Optional. The status of the application + deployed on the node. Following are the possible values. Known values + are: "Invalid", "Downloading", "Activating", "Active", "Upgrading", + "Deactivating". + "TempDirectory": "str", # Optional. The temp directory of + the application on the node. The code packages belonging to the + application are forked with this directory set as their temporary + directory. + "TypeName": "str", # Optional. The application type name as + defined in the application manifest. + "TypeVersion": "str", # Optional. The version of the + application type as defined in the application manifest. + "WorkDirectory": "str" # Optional. The work directory of the + application on the node. The work directory can be used to store + application data. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.1")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_deployed_application_info_list_request( + node_name=node_name, + api_version=api_version, + timeout=timeout, + include_health_state=include_health_state, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_deployed_application_info( + self, + node_name: str, + application_id: str, + *, + timeout: Optional[int] = 60, + include_health_state: Optional[bool] = False, + **kwargs: Any + ) -> Optional[JSON]: + """Gets the information about an application deployed on a Service Fabric node. + + This query returns system application information if the application ID provided is for system + application. Results encompass deployed applications in active, activating, and downloading + states. This query requires that the node name corresponds to a node on the cluster. The query + fails if the provided node name does not point to any active Service Fabric nodes on the + cluster. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword include_health_state: Include the health state of an entity. + If this parameter is false or not specified, then the health state returned is "Unknown". + When set to true, the query goes in parallel to the node and the health system service before + the results are merged. + As a result, the query is more expensive and may take a longer time. Default value is False. + :paramtype include_health_state: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.1'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.1". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "HealthState": "str", # Optional. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Id": "str", # Optional. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify + the application resource."nStarting in version 6.0, hierarchical names are + delimited with the "~" character. For example, if the application name is + "fabric:/myapp/app1","nthe application identity would be "myapp~app1" in 6.0+ and + "myapp/app1" in previous versions. + "LogDirectory": "str", # Optional. The log directory of the application on + the node. The log directory can be used to store application logs. + "Name": "str", # Optional. The name of the application, including the + 'fabric:' URI scheme. + "Status": "str", # Optional. The status of the application deployed on the + node. Following are the possible values. Known values are: "Invalid", + "Downloading", "Activating", "Active", "Upgrading", "Deactivating". + "TempDirectory": "str", # Optional. The temp directory of the application on + the node. The code packages belonging to the application are forked with this + directory set as their temporary directory. + "TypeName": "str", # Optional. The application type name as defined in the + application manifest. + "TypeVersion": "str", # Optional. The version of the application type as + defined in the application manifest. + "WorkDirectory": "str" # Optional. The work directory of the application on + the node. The work directory can be used to store application data. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.1")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + + request = build_get_deployed_application_info_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + timeout=timeout, + include_health_state=include_health_state, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace + def get_deployed_application_health( + self, + node_name: str, + application_id: str, + *, + events_health_state_filter: Optional[int] = 0, + deployed_service_packages_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the information about health of an application deployed on a Service Fabric node. + + Gets the information about health of an application deployed on a Service Fabric node. Use + EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported + on the deployed application based on health state. Use DeployedServicePackagesHealthStateFilter + to optionally filter for DeployedServicePackageHealth children based on health state. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword deployed_service_packages_health_state_filter: Allows filtering of the deployed + service package health state objects returned in the result of deployed application health + query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only deployed service packages that match the filter are returned. All deployed service + packages are used to evaluate the aggregated health state of the deployed application. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value can be a combination of these + values, obtained using the bitwise 'OR' operator. + For example, if the provided value is 6 then health state of service packages with HealthState + value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype deployed_service_packages_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "DeployedServicePackageHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "ApplicationName": "str", # Optional. The name of the + application, including the 'fabric:' URI scheme. + "NodeName": "str", # Optional. Name of the node on which the + service package is deployed. + "ServiceManifestName": "str", # Optional. Name of the + manifest describing the service package. + "ServicePackageActivationId": "str" # Optional. The + ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the + service"nis 'SharedProcess' (or if it is not specified, in which case it + defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + } + ], + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "Name": "str", # Optional. Name of the application deployed on the node + whose health information is described by this object. + "NodeName": "str", # Optional. Name of the node where this application is + deployed. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_deployed_application_health_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + deployed_service_packages_health_state_filter=deployed_service_packages_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_deployed_application_health_using_policy( + self, + node_name: str, + application_id: str, + application_health_policy: Optional[JSON] = None, + *, + events_health_state_filter: Optional[int] = 0, + deployed_service_packages_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the information about health of an application deployed on a Service Fabric node. using + the specified policy. + + Gets the information about health of an application deployed on a Service Fabric node using the + specified policy. Use EventsHealthStateFilter to optionally filter for the collection of + HealthEvent objects reported on the deployed application based on health state. Use + DeployedServicePackagesHealthStateFilter to optionally filter for DeployedServicePackageHealth + children based on health state. Use ApplicationHealthPolicy to optionally override the health + policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the + ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the + deployed application. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: JSON + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword deployed_service_packages_health_state_filter: Allows filtering of the deployed + service package health state objects returned in the result of deployed application health + query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only deployed service packages that match the filter are returned. All deployed service + packages are used to evaluate the aggregated health state of the deployed application. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value can be a combination of these + values, obtained using the bitwise 'OR' operator. + For example, if the provided value is 6 then health state of service packages with HealthState + value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype deployed_service_packages_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_health_policy = { + "ConsiderWarningAsError": bool, # Optional. Indicates whether warnings are + treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. The + maximum allowed percentage of unhealthy partitions per service. Allowed + values are Byte values from zero to 100"n"nThe percentage represents the + maximum tolerated percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe computation rounds up to + tolerate one failure on small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. The + maximum allowed percentage of unhealthy replicas per partition. Allowed + values are Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas over + the total number of replicas in the partition."nThe computation rounds up to + tolerate one failure on small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum allowed + percentage of unhealthy services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated percentage of + services that can be unhealthy before the application is considered in + error."nIf the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific service type over the total + number of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default percentage is + zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The maximum + allowed percentage of unhealthy deployed applications. Allowed values are Byte + values from zero to 100."nThe percentage represents the maximum tolerated + percentage of deployed applications that can be unhealthy before the application + is considered in error."nThis is calculated by dividing the number of unhealthy + deployed applications over the number of nodes where the application is currently + deployed on in the cluster."nThe computation rounds up to tolerate one failure on + small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service type health + policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to 100"n"nThe + percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error."nIf + the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy partitions over the + total number of partitions in the service."nThe computation rounds up + to tolerate one failure on small numbers of partitions. Default + percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to 100."n"nThe + percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at least one + unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition."nThe computation + rounds up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. Allowed values are + Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of services that can be unhealthy before + the application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the number of + unhealthy services of the specific service type over the total number + of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default + percentage is zero. + } + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "DeployedServicePackageHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "ApplicationName": "str", # Optional. The name of the + application, including the 'fabric:' URI scheme. + "NodeName": "str", # Optional. Name of the node on which the + service package is deployed. + "ServiceManifestName": "str", # Optional. Name of the + manifest describing the service package. + "ServicePackageActivationId": "str" # Optional. The + ActivationId of a deployed service package. If + ServicePackageActivationMode specified at the time of creating the + service"nis 'SharedProcess' (or if it is not specified, in which case it + defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + } + ], + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "Name": "str", # Optional. Name of the application deployed on the node + whose health information is described by this object. + "NodeName": "str", # Optional. Name of the node where this application is + deployed. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if application_health_policy is not None: + _json = application_health_policy + else: + _json = None + + request = build_get_deployed_application_health_using_policy_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + deployed_service_packages_health_state_filter=deployed_service_packages_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def report_deployed_application_health( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + application_id: str, + health_information: JSON, + *, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric application deployed on a Service Fabric node. + + Reports health state of the application deployed on a Service Fabric node. The report must + contain the information about the source of the health report and property on which it is + reported. + The report is sent to a Service Fabric gateway Service, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, get deployed application health and + check that the report appears in the HealthEvents section. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: JSON + :keyword immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :paramtype immediate: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + health_information = { + "Description": "str", # Optional. The description of the health information. + It represents free text used to add human readable information about the + report."nThe maximum string length for the description is 4096 characters."nIf + the provided string is longer, it will be automatically truncated."nWhen + truncated, the last characters of the description contain a marker "[Truncated]", + and total string size is 4096 characters."nThe presence of the marker indicates + to users that truncation occurred."nNote that when truncated, the description has + less than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID which identifies the + health report and can be used to find more detailed information about a specific + health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Property": "str", # Required. The property of the health information. An + entity can have health reports for different properties."nThe property is a + string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report."nFor example, a reporter + with SourceId "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same reporter + can monitor the node connectivity, so it can report a property "Connectivity" on + the same node."nIn the health store, these reports are treated as separate health + events for the specified node."n"nTogether with the SourceId, the property + uniquely identifies the health information. + "RemoveWhenExpired": bool, # Optional. Value that indicates whether the + report is removed from health store when it expires."nIf set to true, the report + is removed from the health store after it expires."nIf set to false, the report + is treated as an error when expired. The value of this property is false by + default."nWhen clients report periodically, they should set RemoveWhenExpired + false (default)."nThis way, if the reporter has issues (e.g. deadlock) and can't + report, the entity is evaluated at error when the health report expires."nThis + flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for this health + report as a numeric string."nThe report sequence number is used by the health + store to detect stale reports."nIf not specified, a sequence number is + auto-generated by the health client when a report is added. + "SourceId": "str", # Required. The source name that identifies the + client/watchdog/system component that generated the health information. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The duration for + which this health report is valid. This field uses ISO8601 format for specifying + the duration."nWhen clients report periodically, they should send reports with + higher frequency than time to live."nIf clients report on transition, they can + set the time to live to infinite."nWhen time to live expires, the health event + that contains the health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = health_information + + request = build_report_deployed_application_health_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_application_manifest( + self, + application_type_name: str, + *, + application_type_version: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the manifest describing an application type. + + The response contains the application manifest XML as a string. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :keyword application_type_version: The version of the application type. + :paramtype application_type_version: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Manifest": "str" # Optional. The XML manifest as a string. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_manifest_request( + application_type_name=application_type_name, + api_version=api_version, + application_type_version=application_type_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def update_application_arm_metadata( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + application_arm_metadata_update_description: JSON, + *, + timeout: Optional[int] = 60, + force: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Updates the Arm Metadata for a specific Application. + + Updates the Arm Metadata for a specific Application. Is able to be called immediately after the + create app API is called. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param application_arm_metadata_update_description: The Arm metadata to be assocated with a + specific application. + :type application_arm_metadata_update_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword force: Force parameter used to prevent accidental Arm metadata update. Default value + is None. + :paramtype force: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '9.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "9.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_arm_metadata_update_description = { + "ArmResourceId": "str" # Optional. A string containing the ArmResourceId. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = application_arm_metadata_update_description + + request = build_update_application_arm_metadata_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + force=force, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_service_info_list( + self, + application_id: str, + *, + service_type_name: Optional[str] = None, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the information about all services belonging to the application specified by the + application ID. + + Returns the information about all services belonging to the application specified by the + application ID. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword service_type_name: The service type name used to filter the services to query for. + Default value is None. + :paramtype service_type_name: str + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "HealthState": "str", # Optional. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "Id": "str", # Optional. 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."nStarting in version 6.0, + hierarchical names are delimited with the "~" character. For example, if + the service name is "fabric:/myapp/app1/svc1","nthe service identity + would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous + versions. + "IsServiceGroup": bool, # Optional. Whether the service is + in a service group. + "ManifestVersion": "str", # Optional. The version of the + service manifest. + "Name": "str", # Optional. The full name of the service with + 'fabric:' URI scheme. + "ServiceMetadata": { + "ArmMetadata": { + "ArmResourceId": "str" # Optional. A string + containing the ArmResourceId. + } + }, + "ServiceStatus": "str", # Optional. The status of the + application. Known values are: "Unknown", "Active", "Upgrading", + "Deleting", "Creating", "Failed". + "TypeName": "str", # Optional. Name of the service type as + specified in the service manifest. + ServiceKind: ServiceKind + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_service_info_list_request( + application_id=application_id, + api_version=api_version, + service_type_name=service_type_name, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_service_info( + self, + application_id: str, + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[JSON]: + """Gets the information about the specific service belonging to the Service Fabric application. + + Returns the information about the specified service belonging to the specified Service Fabric + application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "HealthState": "str", # Optional. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Id": "str", # Optional. 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."nStarting in version 6.0, hierarchical names are delimited with + the "~" character. For example, if the service name is + "fabric:/myapp/app1/svc1","nthe service identity would be "myapp~app1~svc1" in + 6.0+ and "myapp/app1/svc1" in previous versions. + "IsServiceGroup": bool, # Optional. Whether the service is in a service + group. + "ManifestVersion": "str", # Optional. The version of the service manifest. + "Name": "str", # Optional. The full name of the service with 'fabric:' URI + scheme. + "ServiceMetadata": { + "ArmMetadata": { + "ArmResourceId": "str" # Optional. A string containing the + ArmResourceId. + } + }, + "ServiceStatus": "str", # Optional. The status of the application. Known + values are: "Unknown", "Active", "Upgrading", "Deleting", "Creating", "Failed". + "TypeName": "str", # Optional. Name of the service type as specified in the + service manifest. + ServiceKind: ServiceKind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + + request = build_get_service_info_request( + application_id=application_id, + service_id=service_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace + def get_application_name_info( + self, + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the name of the Service Fabric application for a service. + + Gets the name of the application for the specified service. A 404 + FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the provided service ID + does not exist. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Id": "str", # Optional. The identity of the application. This is an encoded + representation of the application name. This is used in the REST APIs to identify + the application resource."nStarting in version 6.0, hierarchical names are + delimited with the "~" character. For example, if the application name is + "fabric:/myapp/app1","nthe application identity would be "myapp~app1" in 6.0+ and + "myapp/app1" in previous versions. + "Name": "str" # Optional. The name of the application, including the + 'fabric:' URI scheme. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_name_info_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def create_service( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + service_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates the specified Service Fabric service. + + This api allows creating a new Service Fabric stateless or stateful service under a specified + Service Fabric application. The description for creating the service includes partitioning + information and optional properties for placement and load balancing. Some of the properties + can later be modified using ``UpdateService`` API. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_description: The information necessary to create a service. + :type service_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + service_kind = 'StatefulServiceDescription' or 'StatelessServiceDescription' + + + # JSON input template you can fill out and use as your body input. + service_description = { + "ApplicationName": "str", # Optional. The name of the application, including + the 'fabric:' URI scheme. + "CorrelationScheme": [ + { + "Scheme": "str", # Required. The ServiceCorrelationScheme + which describes the relationship between this service and the service + specified via ServiceName. Known values are: "Invalid", "Affinity", + "AlignedAffinity", "NonAlignedAffinity". + "ServiceName": "str" # Required. The name of the service + that the correlation relationship is established with. + } + ], + "DefaultMoveCost": "str", # Optional. The move cost for the service. Known + values are: "Zero", "Low", "Medium", "High", "VeryHigh". + "InitializationData": [ + 0 # Optional. The initialization data as an array of bytes. + Initialization data is passed to service instances or replicas when they are + created. + ], + "IsDefaultMoveCostSpecified": bool, # Optional. Indicates if the + DefaultMoveCost property is specified. + "PartitionDescription": { + PartitionScheme: PartitionScheme + }, + "PlacementConstraints": "str", # Optional. The placement constraints as a + string. Placement constraints are boolean expressions on node properties and + allow for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is blue + specify the following: "NodeColor == blue)". + "ScalingPolicies": [ + { + "ScalingMechanism": { + Kind: Kind + }, + "ScalingTrigger": { + Kind: Kind + } + } + ], + "ServiceDnsName": "str", # Optional. The DNS name of the service. It + requires the DNS system service to be enabled in Service Fabric cluster. + "ServiceLoadMetrics": [ + { + "AuxiliaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is an Auxiliary replica. + "DefaultLoad": 0, # Optional. Used only for Stateless + services. The default amount of load, as a number, that this service + creates for this metric. + "Name": "str", # 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. + "PrimaryDefaultLoad": 0, # Optional. Used only for Stateful + services. The default amount of load, as a number, that this service + creates for this metric when it is a Primary replica. + "SecondaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is a Secondary replica. + "Weight": "str" # Optional. The service load metric relative + weight, compared to other metrics configured for this service, as a + number. Known values are: "Zero", "Low", "Medium", "High". + } + ], + "ServiceName": "str", # Required. The full name of the service with + 'fabric:' URI scheme. + "ServicePackageActivationMode": "str", # Optional. The activation mode of + service package to be used for a service. Known values are: "SharedProcess", + "ExclusiveProcess". + "ServicePlacementPolicies": [ + { + Type: Type + } + ], + "ServiceTypeName": "str", # Required. Name of the service type as specified + in the service manifest. + "TagsRequiredToPlace": { + "Count": 0, # Required. The number of tags. + "Tags": [ + "str" # Required. A set of tags. Array of size specified by + the "u2018Count"u2019 parameter, for the placement tags of the service. + ] + }, + "TagsRequiredToRun": { + "Count": 0, # Required. The number of tags. + "Tags": [ + "str" # Required. A set of tags. Array of size specified by + the "u2018Count"u2019 parameter, for the placement tags of the service. + ] + }, + ServiceKind: ServiceKind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = service_description + + request = build_create_service_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def create_service_from_template( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + service_from_template_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates a Service Fabric service from the service template. + + Creates a Service Fabric service from the service template defined in the application manifest. + A service template contains the properties that will be same for the service instance of the + same type. The API allows overriding the properties that are usually different for different + services of the same service type. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_from_template_description: Describes the service that needs to be created from + the template defined in the application manifest. + :type service_from_template_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + service_from_template_description = { + "ApplicationName": "str", # Required. The name of the application, including + the 'fabric:' URI scheme. + "InitializationData": [ + 0 # Optional. The initialization data for the newly created service + instance. + ], + "ServiceDnsName": "str", # Optional. The DNS name of the service. It + requires the DNS system service to be enabled in Service Fabric cluster. + "ServiceName": "str", # Required. The full name of the service with + 'fabric:' URI scheme. + "ServicePackageActivationMode": "str", # Optional. The activation mode of + service package to be used for a service. Known values are: "SharedProcess", + "ExclusiveProcess". + "ServiceTypeName": "str" # Required. Name of the service type as specified + in the service manifest. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = service_from_template_description + + request = build_create_service_from_template_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def delete_service( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + *, + force_remove: Optional[bool] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes an existing Service Fabric service. + + A service must be created before it can be deleted. By default, Service Fabric will try to + close service replicas in a graceful manner and then delete the service. However, if the + service is having issues closing the replica gracefully, the delete operation may take a long + time or get stuck. Use the optional ForceRemove flag to skip the graceful close sequence and + forcefully delete the service. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword force_remove: Remove a Service Fabric application or service forcefully without going + through the graceful shutdown sequence. This parameter can be used to forcefully delete an + application or service for which delete is timing out due to issues in the service code that + prevents graceful close of replicas. Default value is None. + :paramtype force_remove: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_delete_service_request( + service_id=service_id, + api_version=api_version, + force_remove=force_remove, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def update_service( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + service_update_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Updates a Service Fabric service using the specified update description. + + This API allows updating properties of a running Service Fabric service. The set of properties + that can be updated are a subset of the properties that were specified at the time of creating + the service. The current set of properties can be obtained using ``GetServiceDescription`` API. + Note that updating the properties of a running service is different than upgrading your + application using ``StartApplicationUpgrade`` API. The upgrade is a long running background + operation that involves moving the application from one version to another, one upgrade domain + at a time, whereas update applies the new properties immediately to the service. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param service_update_description: The information necessary to update a service. + :type service_update_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + service_kind = 'StatefulServiceUpdateDescription' or + 'StatelessServiceUpdateDescription' + + # JSON input template you can fill out and use as your body input. + service_update_description = { + "CorrelationScheme": [ + { + "Scheme": "str", # Required. The ServiceCorrelationScheme + which describes the relationship between this service and the service + specified via ServiceName. Known values are: "Invalid", "Affinity", + "AlignedAffinity", "NonAlignedAffinity". + "ServiceName": "str" # Required. The name of the service + that the correlation relationship is established with. + } + ], + "DefaultMoveCost": "str", # Optional. The move cost for the service. Known + values are: "Zero", "Low", "Medium", "High", "VeryHigh". + "Flags": "str", # Optional. Flags indicating whether other properties are + set. Each of the associated properties corresponds to a flag, specified below, + which, if set, indicate that the property is specified."nThis property can be a + combination of those flags obtained using bitwise 'OR' operator."nFor example, if + the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and + QuorumLossWaitDuration (4) are set."n"n"n* None - Does not indicate any other + properties are set. The value is zero."n* TargetReplicaSetSize/InstanceCount - + Indicates whether the TargetReplicaSetSize property (for Stateful services) or + the InstanceCount property (for Stateless services) is set. The value is 1."n* + ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is + set. The value is 2."n* QuorumLossWaitDuration - Indicates the + QuorumLossWaitDuration property is set. The value is 4."n* + StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is + set. The value is 8."n* MinReplicaSetSize - Indicates the MinReplicaSetSize + property is set. The value is 16."n* PlacementConstraints - Indicates the + PlacementConstraints property is set. The value is 32."n* PlacementPolicyList - + Indicates the ServicePlacementPolicies property is set. The value is 64."n* + Correlation - Indicates the CorrelationScheme property is set. The value is + 128."n* Metrics - Indicates the ServiceLoadMetrics property is set. The value is + 256."n* DefaultMoveCost - Indicates the DefaultMoveCost property is set. The + value is 512."n* ScalingPolicy - Indicates the ScalingPolicies property is set. + The value is 1024."n* ServicePlacementTimeLimit - Indicates the + ServicePlacementTimeLimit property is set. The value is 2048."n* MinInstanceCount + - Indicates the MinInstanceCount property is set. The value is 4096."n* + MinInstancePercentage - Indicates the MinInstancePercentage property is set. The + value is 8192."n* InstanceCloseDelayDuration - Indicates the + InstanceCloseDelayDuration property is set. The value is 16384."n* + InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration property + is set. The value is 32768."n* DropSourceReplicaOnMove - Indicates the + DropSourceReplicaOnMove property is set. The value is 65536."n* ServiceDnsName - + Indicates the ServiceDnsName property is set. The value is 131072."n* + TagsForPlacement - Indicates the TagsForPlacement property is set. The value is + 1048576."n* TagsForRunning - Indicates the TagsForRunning property is set. The + value is 2097152. + "LoadMetrics": [ + { + "AuxiliaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is an Auxiliary replica. + "DefaultLoad": 0, # Optional. Used only for Stateless + services. The default amount of load, as a number, that this service + creates for this metric. + "Name": "str", # 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. + "PrimaryDefaultLoad": 0, # Optional. Used only for Stateful + services. The default amount of load, as a number, that this service + creates for this metric when it is a Primary replica. + "SecondaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is a Secondary replica. + "Weight": "str" # Optional. The service load metric relative + weight, compared to other metrics configured for this service, as a + number. Known values are: "Zero", "Low", "Medium", "High". + } + ], + "PlacementConstraints": "str", # Optional. The placement constraints as a + string. Placement constraints are boolean expressions on node properties and + allow for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is blue + specify the following: "NodeColor == blue)". + "ScalingPolicies": [ + { + "ScalingMechanism": { + Kind: Kind + }, + "ScalingTrigger": { + Kind: Kind + } + } + ], + "ServiceDnsName": "str", # Optional. The DNS name of the service. + "ServicePlacementPolicies": [ + { + Type: Type + } + ], + "TagsForPlacement": { + "Count": 0, # Required. The number of tags. + "Tags": [ + "str" # Required. A set of tags. Array of size specified by + the "u2018Count"u2019 parameter, for the placement tags of the service. + ] + }, + "TagsForRunning": { + "Count": 0, # Required. The number of tags. + "Tags": [ + "str" # Required. A set of tags. Array of size specified by + the "u2018Count"u2019 parameter, for the placement tags of the service. + ] + }, + ServiceKind: ServiceKind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = service_update_description + + request = build_update_service_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_service_description( + self, + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the description of an existing Service Fabric service. + + Gets the description of an existing Service Fabric service. A service must be created before + its description can be obtained. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ApplicationName": "str", # Optional. The name of the application, including + the 'fabric:' URI scheme. + "CorrelationScheme": [ + { + "Scheme": "str", # Required. The ServiceCorrelationScheme + which describes the relationship between this service and the service + specified via ServiceName. Known values are: "Invalid", "Affinity", + "AlignedAffinity", "NonAlignedAffinity". + "ServiceName": "str" # Required. The name of the service + that the correlation relationship is established with. + } + ], + "DefaultMoveCost": "str", # Optional. The move cost for the service. Known + values are: "Zero", "Low", "Medium", "High", "VeryHigh". + "InitializationData": [ + 0 # Optional. The initialization data as an array of bytes. + Initialization data is passed to service instances or replicas when they are + created. + ], + "IsDefaultMoveCostSpecified": bool, # Optional. Indicates if the + DefaultMoveCost property is specified. + "PartitionDescription": { + PartitionScheme: PartitionScheme + }, + "PlacementConstraints": "str", # Optional. The placement constraints as a + string. Placement constraints are boolean expressions on node properties and + allow for restricting a service to particular nodes based on the service + requirements. For example, to place a service on nodes where NodeType is blue + specify the following: "NodeColor == blue)". + "ScalingPolicies": [ + { + "ScalingMechanism": { + Kind: Kind + }, + "ScalingTrigger": { + Kind: Kind + } + } + ], + "ServiceDnsName": "str", # Optional. The DNS name of the service. It + requires the DNS system service to be enabled in Service Fabric cluster. + "ServiceLoadMetrics": [ + { + "AuxiliaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is an Auxiliary replica. + "DefaultLoad": 0, # Optional. Used only for Stateless + services. The default amount of load, as a number, that this service + creates for this metric. + "Name": "str", # 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. + "PrimaryDefaultLoad": 0, # Optional. Used only for Stateful + services. The default amount of load, as a number, that this service + creates for this metric when it is a Primary replica. + "SecondaryDefaultLoad": 0, # Optional. Used only for + Stateful services. The default amount of load, as a number, that this + service creates for this metric when it is a Secondary replica. + "Weight": "str" # Optional. The service load metric relative + weight, compared to other metrics configured for this service, as a + number. Known values are: "Zero", "Low", "Medium", "High". + } + ], + "ServiceName": "str", # Required. The full name of the service with + 'fabric:' URI scheme. + "ServicePackageActivationMode": "str", # Optional. The activation mode of + service package to be used for a service. Known values are: "SharedProcess", + "ExclusiveProcess". + "ServicePlacementPolicies": [ + { + Type: Type + } + ], + "ServiceTypeName": "str", # Required. Name of the service type as specified + in the service manifest. + "TagsRequiredToPlace": { + "Count": 0, # Required. The number of tags. + "Tags": [ + "str" # Required. A set of tags. Array of size specified by + the "u2018Count"u2019 parameter, for the placement tags of the service. + ] + }, + "TagsRequiredToRun": { + "Count": 0, # Required. The number of tags. + "Tags": [ + "str" # Required. A set of tags. Array of size specified by + the "u2018Count"u2019 parameter, for the placement tags of the service. + ] + }, + ServiceKind: ServiceKind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_service_description_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_service_health( + self, + service_id: str, + *, + events_health_state_filter: Optional[int] = 0, + partitions_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of the specified Service Fabric service. + + Gets the health information of the specified service. + Use EventsHealthStateFilter to filter the collection of health events reported on the service + based on the health state. + Use PartitionsHealthStateFilter to filter the collection of partitions returned. + If you specify a service that does not exist in the health store, this request returns an + error. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword partitions_health_state_filter: Allows filtering of the partitions health state + objects returned in the result of service health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only partitions that match the filter are returned. All partitions are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these value + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of partitions with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype partitions_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "Name": "str", # Optional. The name of the service whose health information + is described by this object. + "PartitionHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "PartitionId": str # Optional. Id of the partition whose + health state is described by this object. + } + ], + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_service_health_request( + service_id=service_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + partitions_health_state_filter=partitions_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_service_health_using_policy( + self, + service_id: str, + application_health_policy: Optional[JSON] = None, + *, + events_health_state_filter: Optional[int] = 0, + partitions_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of the specified Service Fabric service, by using the specified health policy. + + Gets the health information of the specified service. + If the application health policy is specified, the health evaluation uses it to get the + aggregated health state. + If the policy is not specified, the health evaluation uses the application health policy + defined in the application manifest, or the default health policy, if no policy is defined in + the manifest. + Use EventsHealthStateFilter to filter the collection of health events reported on the service + based on the health state. + Use PartitionsHealthStateFilter to filter the collection of partitions returned. + If you specify a service that does not exist in the health store, this request returns an + error. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: JSON + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword partitions_health_state_filter: Allows filtering of the partitions health state + objects returned in the result of service health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only partitions that match the filter are returned. All partitions are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these value + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of partitions with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype partitions_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_health_policy = { + "ConsiderWarningAsError": bool, # Optional. Indicates whether warnings are + treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. The + maximum allowed percentage of unhealthy partitions per service. Allowed + values are Byte values from zero to 100"n"nThe percentage represents the + maximum tolerated percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe computation rounds up to + tolerate one failure on small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. The + maximum allowed percentage of unhealthy replicas per partition. Allowed + values are Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas over + the total number of replicas in the partition."nThe computation rounds up to + tolerate one failure on small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum allowed + percentage of unhealthy services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated percentage of + services that can be unhealthy before the application is considered in + error."nIf the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific service type over the total + number of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default percentage is + zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The maximum + allowed percentage of unhealthy deployed applications. Allowed values are Byte + values from zero to 100."nThe percentage represents the maximum tolerated + percentage of deployed applications that can be unhealthy before the application + is considered in error."nThis is calculated by dividing the number of unhealthy + deployed applications over the number of nodes where the application is currently + deployed on in the cluster."nThe computation rounds up to tolerate one failure on + small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service type health + policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to 100"n"nThe + percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error."nIf + the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy partitions over the + total number of partitions in the service."nThe computation rounds up + to tolerate one failure on small numbers of partitions. Default + percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to 100."n"nThe + percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at least one + unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition."nThe computation + rounds up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. Allowed values are + Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of services that can be unhealthy before + the application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the number of + unhealthy services of the specific service type over the total number + of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default + percentage is zero. + } + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "Name": "str", # Optional. The name of the service whose health information + is described by this object. + "PartitionHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "PartitionId": str # Optional. Id of the partition whose + health state is described by this object. + } + ], + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if application_health_policy is not None: + _json = application_health_policy + else: + _json = None + + request = build_get_service_health_using_policy_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + partitions_health_state_filter=partitions_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def report_service_health( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + health_information: JSON, + *, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric service. + + Reports health state of the specified Service Fabric service. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway Service, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetServiceHealth and check that + the report appears in the HealthEvents section. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: JSON + :keyword immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :paramtype immediate: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + health_information = { + "Description": "str", # Optional. The description of the health information. + It represents free text used to add human readable information about the + report."nThe maximum string length for the description is 4096 characters."nIf + the provided string is longer, it will be automatically truncated."nWhen + truncated, the last characters of the description contain a marker "[Truncated]", + and total string size is 4096 characters."nThe presence of the marker indicates + to users that truncation occurred."nNote that when truncated, the description has + less than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID which identifies the + health report and can be used to find more detailed information about a specific + health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Property": "str", # Required. The property of the health information. An + entity can have health reports for different properties."nThe property is a + string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report."nFor example, a reporter + with SourceId "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same reporter + can monitor the node connectivity, so it can report a property "Connectivity" on + the same node."nIn the health store, these reports are treated as separate health + events for the specified node."n"nTogether with the SourceId, the property + uniquely identifies the health information. + "RemoveWhenExpired": bool, # Optional. Value that indicates whether the + report is removed from health store when it expires."nIf set to true, the report + is removed from the health store after it expires."nIf set to false, the report + is treated as an error when expired. The value of this property is false by + default."nWhen clients report periodically, they should set RemoveWhenExpired + false (default)."nThis way, if the reporter has issues (e.g. deadlock) and can't + report, the entity is evaluated at error when the health report expires."nThis + flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for this health + report as a numeric string."nThe report sequence number is used by the health + store to detect stale reports."nIf not specified, a sequence number is + auto-generated by the health client when a report is added. + "SourceId": "str", # Required. The source name that identifies the + client/watchdog/system component that generated the health information. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The duration for + which this health report is valid. This field uses ISO8601 format for specifying + the duration."nWhen clients report periodically, they should send reports with + higher frequency than time to live."nIf clients report on transition, they can + set the time to live to infinite."nWhen time to live expires, the health event + that contains the health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = health_information + + request = build_report_service_health_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def resolve_service( + self, + service_id: str, + *, + partition_key_type: Optional[int] = None, + partition_key_value: Optional[str] = None, + previous_rsp_version: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Resolve a Service Fabric partition. + + Resolve a Service Fabric service partition to get the endpoints of the service replicas. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword partition_key_type: Key type for the partition. This parameter is required if the + partition scheme for the service is Int64Range or Named. The possible values are following. + + + * None (1) - Indicates that the PartitionKeyValue parameter is not specified. This is valid + for the partitions with partitioning scheme as Singleton. This is the default value. The value + is 1. + * Int64Range (2) - Indicates that the PartitionKeyValue parameter is an int64 partition key. + This is valid for the partitions with partitioning scheme as Int64Range. The value is 2. + * Named (3) - Indicates that the PartitionKeyValue parameter is a name of the partition. This + is valid for the partitions with partitioning scheme as Named. The value is 3. Default value is + None. + :paramtype partition_key_type: int + :keyword partition_key_value: Partition key. This is required if the partition scheme for the + service is Int64Range or Named. + This is not the partition ID, but rather, either the integer key value, or the name of the + partition ID. + For example, if your service is using ranged partitions from 0 to 10, then they + PartitionKeyValue would be an + integer in that range. Query service description to see the range or name. Default value is + None. + :paramtype partition_key_value: str + :keyword previous_rsp_version: The value in the Version field of the response that was received + previously. This is required if the user knows that the result that was gotten previously is + stale. Default value is None. + :paramtype previous_rsp_version: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Endpoints": [ + { + "Address": "str", # Optional. The address of the endpoint. + If the endpoint has multiple listeners the address is a JSON object with + one property per listener with the value as the address of that listener. + "Kind": "str" # Optional. The role of the replica where the + endpoint is reported. Known values are: "Invalid", "Stateless", + "StatefulPrimary", "StatefulSecondary". + } + ], + "Name": "str", # Required. The full name of the service with 'fabric:' URI + scheme. + "PartitionInformation": { + "Id": str, # Optional. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + ServicePartitionKind: ServicePartitionKind + }, + "Version": "str" # Required. The version of this resolved service partition + result. This version should be passed in the next time the ResolveService call is + made via the PreviousRspVersion query parameter. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_resolve_service_request( + service_id=service_id, + api_version=api_version, + partition_key_type=partition_key_type, + partition_key_value=partition_key_value, + previous_rsp_version=previous_rsp_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_unplaced_replica_information( + self, + service_id: str, + *, + partition_id: Optional[str] = None, + only_query_primaries: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the information about unplaced replica of the service. + + Returns the information about the unplaced replicas of the service. + If PartitionId is specified, then result will contain information only about unplaced replicas + for that partition. + If PartitionId is not specified, then result will contain information about unplaced replicas + for all partitions of that service. + If OnlyQueryPrimaries is set to true, then result will contain information only about primary + replicas, and will ignore unplaced secondary replicas. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword partition_id: The identity of the partition. Default value is None. + :paramtype partition_id: str + :keyword only_query_primaries: Indicates that unplaced replica information will be queries only + for primary replicas. Default value is False. + :paramtype only_query_primaries: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "PartitionId": str, # Optional. The ID of the partition. + "ServiceName": "str", # Optional. The name of the service. + "UnplacedReplicaDetails": [ + "str" # Optional. List of reasons due to which a replica cannot be + placed. + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_unplaced_replica_information_request( + service_id=service_id, + api_version=api_version, + partition_id=partition_id, + only_query_primaries=only_query_primaries, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def update_service_arm_metadata( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + service_arm_metadata_update_description: JSON, + *, + timeout: Optional[int] = 60, + force: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Updates the Arm Metadata for a specific service. + + Updates the Arm Metadata for a specific service. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param service_arm_metadata_update_description: The Arm metadata to be assocated with a + specific service. + :type service_arm_metadata_update_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword force: Force parameter used to prevent accidental Arm metadata update. Default value + is None. + :paramtype force: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '9.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "9.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + service_arm_metadata_update_description = { + "ArmResourceId": "str" # Optional. A string containing the ArmResourceId. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = service_arm_metadata_update_description + + request = build_update_service_arm_metadata_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + force=force, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_loaded_partition_info_list( + self, + *, + metric_name: str, + service_name: Optional[str] = None, + ordering: Optional[str] = None, + max_results: Optional[int] = 0, + continuation_token_parameter: Optional[str] = None, + **kwargs: Any + ) -> JSON: + """Gets ordered list of partitions. + + Retrieves partitions which are most/least loaded according to specified metric. + + :keyword metric_name: Name of the metric based on which to get ordered list of partitions. + :paramtype metric_name: str + :keyword service_name: The name of a service. Default value is None. + :paramtype service_name: str + :keyword ordering: Ordering of partitions' load. Known values are: "Desc" or "Asc". Default + value is None. + :paramtype ordering: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword api_version: The version of the API. This parameter is required and its value must be + '8.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "8.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "Load": 0.0, # Required. Load for metric. + "MetricName": "str", # Required. Name of the metric for + which this information is provided. + "PartitionId": str, # Required. Id of the partition. + "ServiceName": "str" # Required. Name of the service this + partition belongs to. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "8.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_loaded_partition_info_list_request( + api_version=api_version, + metric_name=metric_name, + service_name=service_name, + ordering=ordering, + max_results=max_results, + continuation_token_parameter=continuation_token_parameter, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_partition_info_list( + self, + service_id: str, + *, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the list of partitions of a Service Fabric service. + + The response includes the partition ID, partitioning scheme information, keys supported by the + partition, status, health, and other details about the partition. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "HealthState": "str", # Optional. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "PartitionInformation": { + "Id": str, # Optional. An internal ID used by + Service Fabric to uniquely identify a partition. This is a randomly + generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the + same service was deleted and recreated the IDs of its partitions + would be different. + ServicePartitionKind: ServicePartitionKind + }, + "PartitionStatus": "str", # Optional. The status of the + service fabric service partition. Known values are: "Invalid", "Ready", + "NotReady", "InQuorumLoss", "Reconfiguring", "Deleting". + ServiceKind: ServiceKind + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_partition_info_list_request( + service_id=service_id, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_partition_info( + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[JSON]: + """Gets the information about a Service Fabric partition. + + Gets the information about the specified partition. The response includes the partition ID, + partitioning scheme information, keys supported by the partition, status, health, and other + details about the partition. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "HealthState": "str", # Optional. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "PartitionInformation": { + "Id": str, # Optional. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the + service was created. The partition ID is unique and does not change for the + lifetime of the service. If the same service was deleted and recreated the + IDs of its partitions would be different. + ServicePartitionKind: ServicePartitionKind + }, + "PartitionStatus": "str", # Optional. The status of the service fabric + service partition. Known values are: "Invalid", "Ready", "NotReady", + "InQuorumLoss", "Reconfiguring", "Deleting". + ServiceKind: ServiceKind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + + request = build_get_partition_info_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace + def get_service_name_info( + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the name of the Service Fabric service for a partition. + + Gets name of the service for the specified partition. A 404 error is returned if the partition + ID does not exist in the cluster. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Id": "str", # Optional. 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."nStarting in version 6.0, hierarchical names are delimited with + the "~" character. For example, if the service name is + "fabric:/myapp/app1/svc1","nthe service identity would be "myapp~app1~svc1" in + 6.0+ and "myapp/app1/svc1" in previous versions. + "Name": "str" # Optional. The full name of the service with 'fabric:' URI + scheme. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_service_name_info_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_partition_health( + self, + partition_id: str, + *, + events_health_state_filter: Optional[int] = 0, + replicas_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of the specified Service Fabric partition. + + Use EventsHealthStateFilter to filter the collection of health events reported on the service + based on the health state. + Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the + partition. + If you specify a partition that does not exist in the health store, this request returns an + error. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword replicas_health_state_filter: Allows filtering the collection of ReplicaHealthState + objects on the partition. The value can be obtained from members or bitwise operations on + members of HealthStateFilter. Only replicas that match the filter will be returned. All + replicas will be used to evaluate the aggregated health state. If not specified, all entries + will be returned.The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. For example, If the provided + value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be + returned. The possible values for this parameter include integer value of one of the following + health states. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype replicas_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "PartitionId": str, # Optional. ID of the partition whose health information + is described by this object. + "ReplicaHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "PartitionId": str, # Optional. The ID of the partition to + which this replica belongs. + ServiceKind: ReplicaHealthState + } + ], + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_partition_health_request( + partition_id=partition_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + replicas_health_state_filter=replicas_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_partition_health_using_policy( + self, + partition_id: str, + application_health_policy: Optional[JSON] = None, + *, + events_health_state_filter: Optional[int] = 0, + replicas_health_state_filter: Optional[int] = 0, + exclude_health_statistics: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of the specified Service Fabric partition, by using the specified health + policy. + + Gets the health information of the specified partition. + If the application health policy is specified, the health evaluation uses it to get the + aggregated health state. + If the policy is not specified, the health evaluation uses the application health policy + defined in the application manifest, or the default health policy, if no policy is defined in + the manifest. + Use EventsHealthStateFilter to filter the collection of health events reported on the partition + based on the health state. + Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the + partition. Use ApplicationHealthPolicy in the POST body to override the health policies used to + evaluate the health. + If you specify a partition that does not exist in the health store, this request returns an + error. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: JSON + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword replicas_health_state_filter: Allows filtering the collection of ReplicaHealthState + objects on the partition. The value can be obtained from members or bitwise operations on + members of HealthStateFilter. Only replicas that match the filter will be returned. All + replicas will be used to evaluate the aggregated health state. If not specified, all entries + will be returned.The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. For example, If the provided + value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be + returned. The possible values for this parameter include integer value of one of the following + health states. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype replicas_health_state_filter: int + :keyword exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_health_policy = { + "ConsiderWarningAsError": bool, # Optional. Indicates whether warnings are + treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. The + maximum allowed percentage of unhealthy partitions per service. Allowed + values are Byte values from zero to 100"n"nThe percentage represents the + maximum tolerated percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe computation rounds up to + tolerate one failure on small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. The + maximum allowed percentage of unhealthy replicas per partition. Allowed + values are Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas over + the total number of replicas in the partition."nThe computation rounds up to + tolerate one failure on small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum allowed + percentage of unhealthy services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated percentage of + services that can be unhealthy before the application is considered in + error."nIf the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific service type over the total + number of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default percentage is + zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The maximum + allowed percentage of unhealthy deployed applications. Allowed values are Byte + values from zero to 100."nThe percentage represents the maximum tolerated + percentage of deployed applications that can be unhealthy before the application + is considered in error."nThis is calculated by dividing the number of unhealthy + deployed applications over the number of nodes where the application is currently + deployed on in the cluster."nThe computation rounds up to tolerate one failure on + small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service type health + policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to 100"n"nThe + percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error."nIf + the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy partitions over the + total number of partitions in the service."nThe computation rounds up + to tolerate one failure on small numbers of partitions. Default + percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to 100."n"nThe + percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at least one + unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition."nThe computation + rounds up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. Allowed values are + Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of services that can be unhealthy before + the application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the number of + unhealthy services of the specific service type over the total number + of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default + percentage is zero. + } + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "PartitionId": str, # Optional. ID of the partition whose health information + is described by this object. + "ReplicaHealthStates": [ + { + "AggregatedHealthState": "str", # Optional. The health state + of a Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "PartitionId": str, # Optional. The ID of the partition to + which this replica belongs. + ServiceKind: ReplicaHealthState + } + ], + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if application_health_policy is not None: + _json = application_health_policy + else: + _json = None + + request = build_get_partition_health_using_policy_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + replicas_health_state_filter=replicas_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def report_partition_health( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + health_information: JSON, + *, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric partition. + + Reports health state of the specified Service Fabric partition. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway Partition, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetPartitionHealth and check + that the report appears in the HealthEvents section. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: JSON + :keyword immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :paramtype immediate: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + health_information = { + "Description": "str", # Optional. The description of the health information. + It represents free text used to add human readable information about the + report."nThe maximum string length for the description is 4096 characters."nIf + the provided string is longer, it will be automatically truncated."nWhen + truncated, the last characters of the description contain a marker "[Truncated]", + and total string size is 4096 characters."nThe presence of the marker indicates + to users that truncation occurred."nNote that when truncated, the description has + less than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID which identifies the + health report and can be used to find more detailed information about a specific + health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Property": "str", # Required. The property of the health information. An + entity can have health reports for different properties."nThe property is a + string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report."nFor example, a reporter + with SourceId "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same reporter + can monitor the node connectivity, so it can report a property "Connectivity" on + the same node."nIn the health store, these reports are treated as separate health + events for the specified node."n"nTogether with the SourceId, the property + uniquely identifies the health information. + "RemoveWhenExpired": bool, # Optional. Value that indicates whether the + report is removed from health store when it expires."nIf set to true, the report + is removed from the health store after it expires."nIf set to false, the report + is treated as an error when expired. The value of this property is false by + default."nWhen clients report periodically, they should set RemoveWhenExpired + false (default)."nThis way, if the reporter has issues (e.g. deadlock) and can't + report, the entity is evaluated at error when the health report expires."nThis + flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for this health + report as a numeric string."nThe report sequence number is used by the health + store to detect stale reports."nIf not specified, a sequence number is + auto-generated by the health client when a report is added. + "SourceId": "str", # Required. The source name that identifies the + client/watchdog/system component that generated the health information. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The duration for + which this health report is valid. This field uses ISO8601 format for specifying + the duration."nWhen clients report periodically, they should send reports with + higher frequency than time to live."nIf clients report on transition, they can + set the time to live to infinite."nWhen time to live expires, the health event + that contains the health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = health_information + + request = build_report_partition_health_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_partition_load_information( + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the load information of the specified Service Fabric partition. + + Returns information about the load of a specified partition. + The response includes a list of load reports for a Service Fabric partition. + Each report includes the load metric name, value, and last reported time in UTC. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AuxiliaryLoadMetricReports": [ + { + "CurrentValue": "str", # Optional. The value of the load + metric. + "LastReportedUtc": "2020-02-20 00:00:00", # Optional. Gets + the UTC time when the load was reported. + "Name": "str", # Optional. The name of the load metric. + "Value": "str" # Optional. The value of the load metric. In + future releases of Service Fabric this parameter will be deprecated in + favor of CurrentValue. + } + ], + "PartitionId": str, # Optional. Id of the partition. + "PrimaryLoadMetricReports": [ + { + "CurrentValue": "str", # Optional. The value of the load + metric. + "LastReportedUtc": "2020-02-20 00:00:00", # Optional. Gets + the UTC time when the load was reported. + "Name": "str", # Optional. The name of the load metric. + "Value": "str" # Optional. The value of the load metric. In + future releases of Service Fabric this parameter will be deprecated in + favor of CurrentValue. + } + ], + "SecondaryLoadMetricReports": [ + { + "CurrentValue": "str", # Optional. The value of the load + metric. + "LastReportedUtc": "2020-02-20 00:00:00", # Optional. Gets + the UTC time when the load was reported. + "Name": "str", # Optional. The name of the load metric. + "Value": "str" # Optional. The value of the load metric. In + future releases of Service Fabric this parameter will be deprecated in + favor of CurrentValue. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_partition_load_information_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def reset_partition_load( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Resets the current load of a Service Fabric partition. + + Resets the current load of a Service Fabric partition to the default load for the service. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_reset_partition_load_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def recover_partition( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Indicates to the Service Fabric cluster that it should attempt to recover a specific partition + that is currently stuck in quorum loss. + + This operation should only be performed if it is known that the replicas that are down cannot + be recovered. Incorrect use of this API can cause potential data loss. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_recover_partition_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def recover_service_partitions( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Indicates to the Service Fabric cluster that it should attempt to recover the specified service + that is currently stuck in quorum loss. + + Indicates to the Service Fabric cluster that it should attempt to recover the specified service + that is currently stuck in quorum loss. This operation should only be performed if it is known + that the replicas that are down cannot be recovered. Incorrect use of this API can cause + potential data loss. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_recover_service_partitions_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def recover_system_partitions( # pylint: disable=inconsistent-return-statements + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Indicates to the Service Fabric cluster that it should attempt to recover the system services + that are currently stuck in quorum loss. + + Indicates to the Service Fabric cluster that it should attempt to recover the system services + that are currently stuck in quorum loss. This operation should only be performed if it is known + that the replicas that are down cannot be recovered. Incorrect use of this API can cause + potential data loss. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_recover_system_partitions_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def recover_all_partitions( # pylint: disable=inconsistent-return-statements + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """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. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_recover_all_partitions_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def move_primary_replica( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + *, + node_name: Optional[str] = None, + ignore_constraints: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Moves the primary replica of a partition of a stateful service. + + This command moves the primary replica of a partition of a stateful service, respecting all + constraints. + If NodeName parameter is specified, primary will be moved to the specified node (if constraints + allow it). + If NodeName parameter is not specified, primary replica will be moved to a random node in the + cluster. + If IgnoreConstraints parameter is specified and set to true, then primary will be moved + regardless of the constraints. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword node_name: The name of the node. Default value is None. + :paramtype node_name: str + :keyword ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :paramtype ignore_constraints: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.5'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.5". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.5")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_move_primary_replica_request( + partition_id=partition_id, + api_version=api_version, + node_name=node_name, + ignore_constraints=ignore_constraints, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def move_secondary_replica( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + *, + current_node_name: str, + new_node_name: Optional[str] = None, + ignore_constraints: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Moves the secondary replica of a partition of a stateful service. + + This command moves the secondary replica of a partition of a stateful service, respecting all + constraints. + CurrentNodeName parameter must be specified to identify the replica that is moved. + Source node name must be specified, but new node name can be omitted, and in that case replica + is moved to a random node. + If IgnoreConstraints parameter is specified and set to true, then secondary will be moved + regardless of the constraints. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword current_node_name: The name of the source node for secondary replica move. + :paramtype current_node_name: str + :keyword new_node_name: The name of the target node for secondary replica or instance move. If + not specified, replica or instance is moved to a random node. Default value is None. + :paramtype new_node_name: str + :keyword ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :paramtype ignore_constraints: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.5'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.5". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.5")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_move_secondary_replica_request( + partition_id=partition_id, + api_version=api_version, + current_node_name=current_node_name, + new_node_name=new_node_name, + ignore_constraints=ignore_constraints, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def update_partition_load( + self, + partition_metric_load_description_list: List[JSON], + *, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Update the loads of provided partitions for specific metrics. + + Updates the load value and predicted load value for all the partitions provided for specified + metrics. + + :param partition_metric_load_description_list: Description of updating load for list of + partitions. + :type partition_metric_load_description_list: list[JSON] + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '7.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "7.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + partition_metric_load_description_list = [ + { + "AuxiliaryReplicaLoadEntriesPerNode": [ + { + "NodeName": "str", # Optional. Node name of a + specific secondary replica or instance. + "ReplicaOrInstanceLoadEntries": [ + { + "CurrentLoad": 0.0, # Optional. The + current value of the metric load. + "MetricName": "str", # Optional. The + name of the reported metric. + "PredictedLoad": 0.0 # Optional. The + predicted value of the metric load. Predicted metric load + values is currently a preview feature. It allows predicted + load values to be reported and used at the Service Fabric + side, but that feature is currently not enabled. + } + ] + } + ], + "AuxiliaryReplicasLoadEntries": [ + { + "CurrentLoad": 0.0, # Optional. The current value of + the metric load. + "MetricName": "str", # Optional. The name of the + reported metric. + "PredictedLoad": 0.0 # Optional. The predicted value + of the metric load. Predicted metric load values is currently a + preview feature. It allows predicted load values to be reported and + used at the Service Fabric side, but that feature is currently not + enabled. + } + ], + "PartitionId": str, # Optional. Id of the partition. + "PrimaryReplicaLoadEntries": [ + { + "CurrentLoad": 0.0, # Optional. The current value of + the metric load. + "MetricName": "str", # Optional. The name of the + reported metric. + "PredictedLoad": 0.0 # Optional. The predicted value + of the metric load. Predicted metric load values is currently a + preview feature. It allows predicted load values to be reported and + used at the Service Fabric side, but that feature is currently not + enabled. + } + ], + "SecondaryReplicaOrInstanceLoadEntriesPerNode": [ + { + "NodeName": "str", # Optional. Node name of a + specific secondary replica or instance. + "ReplicaOrInstanceLoadEntries": [ + { + "CurrentLoad": 0.0, # Optional. The + current value of the metric load. + "MetricName": "str", # Optional. The + name of the reported metric. + "PredictedLoad": 0.0 # Optional. The + predicted value of the metric load. Predicted metric load + values is currently a preview feature. It allows predicted + load values to be reported and used at the Service Fabric + side, but that feature is currently not enabled. + } + ] + } + ], + "SecondaryReplicasOrInstancesLoadEntries": [ + { + "CurrentLoad": 0.0, # Optional. The current value of + the metric load. + "MetricName": "str", # Optional. The name of the + reported metric. + "PredictedLoad": 0.0 # Optional. The predicted value + of the metric load. Predicted metric load values is currently a + preview feature. It allows predicted load values to be reported and + used at the Service Fabric side, but that feature is currently not + enabled. + } + ] + } + ] + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "PartitionErrorCode": 0, # Optional. If OperationState is + Completed - this is 0. If OperationState is Faulted - this is an error + code indicating the reason. + "PartitionId": str # Optional. Id of the partition. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = partition_metric_load_description_list + + request = build_update_partition_load_request( + api_version=api_version, + content_type=content_type, + json=_json, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def move_instance( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + partition_id: str, + *, + current_node_name: Optional[str] = None, + new_node_name: Optional[str] = None, + ignore_constraints: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Moves the instance of a partition of a stateless service. + + This command moves the instance of a partition of a stateless service, respecting all + constraints. + Partition id and service name must be specified to be able to move the instance. + CurrentNodeName when specified identifies the instance that is moved. If not specified, random + instance will be moved + New node name can be omitted, and in that case instance is moved to a random node. + If IgnoreConstraints parameter is specified and set to true, then instance will be moved + regardless of the constraints. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword current_node_name: The name of the source node for instance move. If not specified, + instance is moved from a random node. Default value is None. + :paramtype current_node_name: str + :keyword new_node_name: The name of the target node for secondary replica or instance move. If + not specified, replica or instance is moved to a random node. Default value is None. + :paramtype new_node_name: str + :keyword ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :paramtype ignore_constraints: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '8.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "8.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "8.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_move_instance_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + current_node_name=current_node_name, + new_node_name=new_node_name, + ignore_constraints=ignore_constraints, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def move_auxiliary_replica( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + partition_id: str, + *, + current_node_name: Optional[str] = None, + new_node_name: Optional[str] = None, + ignore_constraints: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Moves the auxiliary replica of a partition of a stateful service. + + This command moves the auxiliary replica of a partition of a stateful service, respecting all + constraints. + CurrentNodeName can be omitted, and in that case a random auxiliary replica is chosen. + NewNodeName can be omitted, and in that case the auxiliary replica is moved to a random node. + If IgnoreConstraints parameter is specified and set to true, then auxiliary will be moved + regardless of the constraints. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword current_node_name: The name of the source node for instance move. If not specified, + instance is moved from a random node. Default value is None. + :paramtype current_node_name: str + :keyword new_node_name: The name of the target node for secondary replica or instance move. If + not specified, replica or instance is moved to a random node. Default value is None. + :paramtype new_node_name: str + :keyword ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :paramtype ignore_constraints: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '8.1'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "8.1". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "8.1")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_move_auxiliary_replica_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + current_node_name=current_node_name, + new_node_name=new_node_name, + ignore_constraints=ignore_constraints, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def create_repair_task( + self, + repair_task: JSON, + **kwargs: Any + ) -> JSON: + """Creates a new repair task. + + For clusters that have the Repair Manager Service configured, + this API provides a way to create repair tasks that run automatically or manually. + For repair tasks that run automatically, an appropriate repair executor + must be running for each repair action to run automatically. + These are currently only available in specially-configured Azure Cloud Services. + + To create a manual repair task, provide the set of impacted node names and the + expected impact. When the state of the created repair task changes to approved, + you can safely perform repair actions on those nodes. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task: Describes the repair task to be created or updated. + :type repair_task: JSON + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + repair_task = { + "Action": "str", # Required. The requested repair action. Must be specified + when the repair task is created, and is immutable once set. + "Description": "str", # Optional. A description of the purpose of the repair + task, or other informational details."nMay be set when the repair task is + created, and is immutable once set. + "Executor": "str", # Optional. The name of the repair executor. Must be + specified in Claimed and later states, and is immutable once set. + "ExecutorData": "str", # Optional. A data string that the repair executor + can use to store its internal state. + "Flags": 0, # Optional. A bitwise-OR of the following values, which gives + additional details about the status of the repair task."n"n"n* 1 - Cancellation + of the repair has been requested"n* 2 - Abort of the repair has been requested"n* + 4 - Approval of the repair was forced via client request. + "History": { + "ApprovedUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Approved state. + "ClaimedUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Claimed state. + "CompletedUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Completed state. + "CreatedUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Created state. + "ExecutingUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Executing state. + "PreparingHealthCheckEndUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The time when the repair task completed the health check in the + Preparing state. + "PreparingHealthCheckStartUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The time when the repair task started the health check in the + Preparing state. + "PreparingUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Preparing state. + "RestoringHealthCheckEndUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The time when the repair task completed the health check in the + Restoring state. + "RestoringHealthCheckStartUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The time when the repair task started the health check in the + Restoring state. + "RestoringUtcTimestamp": "2020-02-20 00:00:00" # Optional. The time + when the repair task entered the Restoring state. + }, + "Impact": { + Kind: Kind + }, + "PerformPreparingHealthCheck": bool, # Optional. A value to determine if + health checks will be performed when the repair task enters the Preparing state. + "PerformRestoringHealthCheck": bool, # Optional. A value to determine if + health checks will be performed when the repair task enters the Restoring state. + "PreparingHealthCheckState": "str", # Optional. The workflow state of the + health check when the repair task is in the Preparing state. Known values are: + "NotStarted", "InProgress", "Succeeded", "Skipped", "TimedOut". + "RestoringHealthCheckState": "str", # Optional. The workflow state of the + health check when the repair task is in the Restoring state. Known values are: + "NotStarted", "InProgress", "Succeeded", "Skipped", "TimedOut". + "ResultCode": 0, # Optional. A numeric value providing additional details + about the result of the repair task execution."nMay be specified in the Restoring + and later states, and is immutable once set. + "ResultDetails": "str", # Optional. A string providing additional details + about the result of the repair task execution."nMay be specified in the Restoring + and later states, and is immutable once set. + "ResultStatus": "str", # Optional. A value describing the overall result of + the repair task execution. Must be specified in the Restoring and later states, + and is immutable once set. Known values are: "Invalid", "Succeeded", "Cancelled", + "Interrupted", "Failed", "Pending". + "State": "str", # Required. The workflow state of the repair task. Valid + initial states are Created, Claimed, and Preparing. Known values are: "Invalid", + "Created", "Claimed", "Preparing", "Approved", "Executing", "Restoring", + "Completed". + "Target": { + Kind: Kind + }, + "TaskId": "str", # Required. The ID of the repair task. + "Version": "str" # Optional. The version of the repair task."nWhen creating + a new repair task, the version must be set to zero. When updating a repair + task,"nthe version is used for optimistic concurrency checks. If the version + is"nset to zero, the update will not check for write conflicts. If the version + is set to a non-zero value, then the"nupdate will only succeed if the actual + current version of the repair task matches this value. + } + + # response body for status code(s): 200 + response.json() == { + "Version": "str" # Required. The new version of the repair task. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = repair_task + + request = build_create_repair_task_request( + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def cancel_repair_task( + self, + repair_task_cancel_description: JSON, + **kwargs: Any + ) -> JSON: + """Requests the cancellation of the given repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task_cancel_description: Describes the repair task to be cancelled. + :type repair_task_cancel_description: JSON + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + repair_task_cancel_description = { + "RequestAbort": bool, # Optional. *True* if the repair should be stopped as + soon as possible even if it has already started executing. *False* if the repair + should be cancelled only if execution has not yet started. + "TaskId": "str", # Required. The ID of the repair task. + "Version": "str" # Optional. The current version number of the repair task. + If non-zero, then the request will only succeed if this value matches the actual + current version of the repair task. If zero, then no version check is performed. + } + + # response body for status code(s): 200 + response.json() == { + "Version": "str" # Required. The new version of the repair task. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = repair_task_cancel_description + + request = build_cancel_repair_task_request( + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def delete_repair_task( # pylint: disable=inconsistent-return-statements + self, + repair_task_delete_description: JSON, + **kwargs: Any + ) -> None: + """Deletes a completed repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task_delete_description: Describes the repair task to be deleted. + :type repair_task_delete_description: JSON + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + repair_task_delete_description = { + "TaskId": "str", # Required. The ID of the completed repair task to be + deleted. + "Version": "str" # Optional. The current version number of the repair task. + If non-zero, then the request will only succeed if this value matches the actual + current version of the repair task. If zero, then no version check is performed. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = repair_task_delete_description + + request = build_delete_repair_task_request( + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_repair_task_list( + self, + *, + task_id_filter: Optional[str] = None, + state_filter: Optional[int] = None, + executor_filter: Optional[str] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets a list of repair tasks matching the given filters. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :keyword task_id_filter: The repair task ID prefix to be matched. Default value is None. + :paramtype task_id_filter: str + :keyword state_filter: A bitwise-OR of the following values, specifying which task states + should be included in the result list. + + + * 1 - Created + * 2 - Claimed + * 4 - Preparing + * 8 - Approved + * 16 - Executing + * 32 - Restoring + * 64 - Completed. Default value is None. + :paramtype state_filter: int + :keyword executor_filter: The name of the repair executor whose claimed tasks should be + included in the list. Default value is None. + :paramtype executor_filter: str + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Action": "str", # Required. The requested repair action. Must be + specified when the repair task is created, and is immutable once set. + "Description": "str", # Optional. A description of the purpose of + the repair task, or other informational details."nMay be set when the repair + task is created, and is immutable once set. + "Executor": "str", # Optional. The name of the repair executor. Must + be specified in Claimed and later states, and is immutable once set. + "ExecutorData": "str", # Optional. A data string that the repair + executor can use to store its internal state. + "Flags": 0, # Optional. A bitwise-OR of the following values, which + gives additional details about the status of the repair task."n"n"n* 1 - + Cancellation of the repair has been requested"n* 2 - Abort of the repair has + been requested"n* 4 - Approval of the repair was forced via client request. + "History": { + "ApprovedUtcTimestamp": "2020-02-20 00:00:00", # Optional. + The time when the repair task entered the Approved state. + "ClaimedUtcTimestamp": "2020-02-20 00:00:00", # Optional. + The time when the repair task entered the Claimed state. + "CompletedUtcTimestamp": "2020-02-20 00:00:00", # Optional. + The time when the repair task entered the Completed state. + "CreatedUtcTimestamp": "2020-02-20 00:00:00", # Optional. + The time when the repair task entered the Created state. + "ExecutingUtcTimestamp": "2020-02-20 00:00:00", # Optional. + The time when the repair task entered the Executing state. + "PreparingHealthCheckEndUtcTimestamp": "2020-02-20 00:00:00", + # Optional. The time when the repair task completed the health check in + the Preparing state. + "PreparingHealthCheckStartUtcTimestamp": "2020-02-20 + 00:00:00", # Optional. The time when the repair task started the health + check in the Preparing state. + "PreparingUtcTimestamp": "2020-02-20 00:00:00", # Optional. + The time when the repair task entered the Preparing state. + "RestoringHealthCheckEndUtcTimestamp": "2020-02-20 00:00:00", + # Optional. The time when the repair task completed the health check in + the Restoring state. + "RestoringHealthCheckStartUtcTimestamp": "2020-02-20 + 00:00:00", # Optional. The time when the repair task started the health + check in the Restoring state. + "RestoringUtcTimestamp": "2020-02-20 00:00:00" # Optional. + The time when the repair task entered the Restoring state. + }, + "Impact": { + Kind: Kind + }, + "PerformPreparingHealthCheck": bool, # Optional. A value to + determine if health checks will be performed when the repair task enters the + Preparing state. + "PerformRestoringHealthCheck": bool, # Optional. A value to + determine if health checks will be performed when the repair task enters the + Restoring state. + "PreparingHealthCheckState": "str", # Optional. The workflow state + of the health check when the repair task is in the Preparing state. Known + values are: "NotStarted", "InProgress", "Succeeded", "Skipped", "TimedOut". + "RestoringHealthCheckState": "str", # Optional. The workflow state + of the health check when the repair task is in the Restoring state. Known + values are: "NotStarted", "InProgress", "Succeeded", "Skipped", "TimedOut". + "ResultCode": 0, # Optional. A numeric value providing additional + details about the result of the repair task execution."nMay be specified in + the Restoring and later states, and is immutable once set. + "ResultDetails": "str", # Optional. A string providing additional + details about the result of the repair task execution."nMay be specified in + the Restoring and later states, and is immutable once set. + "ResultStatus": "str", # Optional. A value describing the overall + result of the repair task execution. Must be specified in the Restoring and + later states, and is immutable once set. Known values are: "Invalid", + "Succeeded", "Cancelled", "Interrupted", "Failed", "Pending". + "State": "str", # Required. The workflow state of the repair task. + Valid initial states are Created, Claimed, and Preparing. Known values are: + "Invalid", "Created", "Claimed", "Preparing", "Approved", "Executing", + "Restoring", "Completed". + "Target": { + Kind: Kind + }, + "TaskId": "str", # Required. The ID of the repair task. + "Version": "str" # Optional. The version of the repair task."nWhen + creating a new repair task, the version must be set to zero. When updating a + repair task,"nthe version is used for optimistic concurrency checks. If the + version is"nset to zero, the update will not check for write conflicts. If + the version is set to a non-zero value, then the"nupdate will only succeed if + the actual current version of the repair task matches this value. + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_repair_task_list_request( + api_version=api_version, + task_id_filter=task_id_filter, + state_filter=state_filter, + executor_filter=executor_filter, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def force_approve_repair_task( + self, + repair_task_approve_description: JSON, + **kwargs: Any + ) -> JSON: + """Forces the approval of the given repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task_approve_description: Describes the repair task to be approved. + :type repair_task_approve_description: JSON + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + repair_task_approve_description = { + "TaskId": "str", # Required. The ID of the repair task. + "Version": "str" # Optional. The current version number of the repair task. + If non-zero, then the request will only succeed if this value matches the actual + current version of the repair task. If zero, then no version check is performed. + } + + # response body for status code(s): 200 + response.json() == { + "Version": "str" # Required. The new version of the repair task. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = repair_task_approve_description + + request = build_force_approve_repair_task_request( + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def update_repair_task_health_policy( + self, + repair_task_update_health_policy_description: JSON, + **kwargs: Any + ) -> JSON: + """Updates the health policy of the given repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task_update_health_policy_description: Describes the repair task healthy policy + to be updated. + :type repair_task_update_health_policy_description: JSON + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + repair_task_update_health_policy_description = { + "PerformPreparingHealthCheck": bool, # Optional. A boolean indicating if + health check is to be performed in the Preparing stage of the repair task. If not + specified the existing value should not be altered. Otherwise, specify the + desired new value. + "PerformRestoringHealthCheck": bool, # Optional. A boolean indicating if + health check is to be performed in the Restoring stage of the repair task. If not + specified the existing value should not be altered. Otherwise, specify the + desired new value. + "TaskId": "str", # Required. The ID of the repair task to be updated. + "Version": "str" # Optional. The current version number of the repair task. + If non-zero, then the request will only succeed if this value matches the actual + current value of the repair task. If zero, then no version check is performed. + } + + # response body for status code(s): 200 + response.json() == { + "Version": "str" # Required. The new version of the repair task. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = repair_task_update_health_policy_description + + request = build_update_repair_task_health_policy_request( + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def update_repair_execution_state( + self, + repair_task: JSON, + **kwargs: Any + ) -> JSON: + """Updates the execution state of a repair task. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param repair_task: Describes the repair task to be created or updated. + :type repair_task: JSON + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + repair_task = { + "Action": "str", # Required. The requested repair action. Must be specified + when the repair task is created, and is immutable once set. + "Description": "str", # Optional. A description of the purpose of the repair + task, or other informational details."nMay be set when the repair task is + created, and is immutable once set. + "Executor": "str", # Optional. The name of the repair executor. Must be + specified in Claimed and later states, and is immutable once set. + "ExecutorData": "str", # Optional. A data string that the repair executor + can use to store its internal state. + "Flags": 0, # Optional. A bitwise-OR of the following values, which gives + additional details about the status of the repair task."n"n"n* 1 - Cancellation + of the repair has been requested"n* 2 - Abort of the repair has been requested"n* + 4 - Approval of the repair was forced via client request. + "History": { + "ApprovedUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Approved state. + "ClaimedUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Claimed state. + "CompletedUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Completed state. + "CreatedUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Created state. + "ExecutingUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Executing state. + "PreparingHealthCheckEndUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The time when the repair task completed the health check in the + Preparing state. + "PreparingHealthCheckStartUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The time when the repair task started the health check in the + Preparing state. + "PreparingUtcTimestamp": "2020-02-20 00:00:00", # Optional. The time + when the repair task entered the Preparing state. + "RestoringHealthCheckEndUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The time when the repair task completed the health check in the + Restoring state. + "RestoringHealthCheckStartUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The time when the repair task started the health check in the + Restoring state. + "RestoringUtcTimestamp": "2020-02-20 00:00:00" # Optional. The time + when the repair task entered the Restoring state. + }, + "Impact": { + Kind: Kind + }, + "PerformPreparingHealthCheck": bool, # Optional. A value to determine if + health checks will be performed when the repair task enters the Preparing state. + "PerformRestoringHealthCheck": bool, # Optional. A value to determine if + health checks will be performed when the repair task enters the Restoring state. + "PreparingHealthCheckState": "str", # Optional. The workflow state of the + health check when the repair task is in the Preparing state. Known values are: + "NotStarted", "InProgress", "Succeeded", "Skipped", "TimedOut". + "RestoringHealthCheckState": "str", # Optional. The workflow state of the + health check when the repair task is in the Restoring state. Known values are: + "NotStarted", "InProgress", "Succeeded", "Skipped", "TimedOut". + "ResultCode": 0, # Optional. A numeric value providing additional details + about the result of the repair task execution."nMay be specified in the Restoring + and later states, and is immutable once set. + "ResultDetails": "str", # Optional. A string providing additional details + about the result of the repair task execution."nMay be specified in the Restoring + and later states, and is immutable once set. + "ResultStatus": "str", # Optional. A value describing the overall result of + the repair task execution. Must be specified in the Restoring and later states, + and is immutable once set. Known values are: "Invalid", "Succeeded", "Cancelled", + "Interrupted", "Failed", "Pending". + "State": "str", # Required. The workflow state of the repair task. Valid + initial states are Created, Claimed, and Preparing. Known values are: "Invalid", + "Created", "Claimed", "Preparing", "Approved", "Executing", "Restoring", + "Completed". + "Target": { + Kind: Kind + }, + "TaskId": "str", # Required. The ID of the repair task. + "Version": "str" # Optional. The version of the repair task."nWhen creating + a new repair task, the version must be set to zero. When updating a repair + task,"nthe version is used for optimistic concurrency checks. If the version + is"nset to zero, the update will not check for write conflicts. If the version + is set to a non-zero value, then the"nupdate will only succeed if the actual + current version of the repair task matches this value. + } + + # response body for status code(s): 200 + response.json() == { + "Version": "str" # Required. The new version of the repair task. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = repair_task + + request = build_update_repair_execution_state_request( + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_replica_info_list( + self, + partition_id: str, + *, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the information about replicas of a Service Fabric service partition. + + The GetReplicas endpoint returns information about the replicas of the specified partition. The + response includes the ID, role, status, health, node name, uptime, and other details about the + replica. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "Address": "str", # Optional. The address the replica is + listening on. + "HealthState": "str", # Optional. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "LastInBuildDurationInSeconds": "str", # Optional. The last + in build duration of the replica in seconds. + "NodeName": "str", # Optional. The name of a Service Fabric + node. + "ReplicaStatus": "str", # Optional. The status of a replica + of a service. Known values are: "Invalid", "InBuild", "Standby", "Ready", + "Down", "Dropped". + ServiceKind: ServiceKind + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_replica_info_list_request( + partition_id=partition_id, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_replica_info( + self, + partition_id: str, + replica_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[JSON]: + """Gets the information about a replica of a Service Fabric partition. + + The response includes the ID, role, status, health, node name, uptime, and other details about + the replica. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Address": "str", # Optional. The address the replica is listening on. + "HealthState": "str", # Optional. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "LastInBuildDurationInSeconds": "str", # Optional. The last in build + duration of the replica in seconds. + "NodeName": "str", # Optional. The name of a Service Fabric node. + "ReplicaStatus": "str", # Optional. The status of a replica of a service. + Known values are: "Invalid", "InBuild", "Standby", "Ready", "Down", "Dropped". + ServiceKind: ServiceKind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + + request = build_get_replica_info_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace + def get_replica_health( + self, + partition_id: str, + replica_id: str, + *, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric stateful service replica or stateless service instance. + + Gets the health of a Service Fabric replica. + Use EventsHealthStateFilter to filter the collection of health events reported on the replica + based on the health state. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "PartitionId": str, # Optional. Id of the partition to which this replica + belongs. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ], + ServiceKind: ReplicaHealth + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_replica_health_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_replica_health_using_policy( + self, + partition_id: str, + replica_id: str, + application_health_policy: Optional[JSON] = None, + *, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the health of a Service Fabric stateful service replica or stateless service instance + using the specified policy. + + Gets the health of a Service Fabric stateful service replica or stateless service instance. + Use EventsHealthStateFilter to filter the collection of health events reported on the cluster + based on the health state. + Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the + health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The + rest of the fields are ignored while evaluating the health of the replica. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: JSON + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_health_policy = { + "ConsiderWarningAsError": bool, # Optional. Indicates whether warnings are + treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. The + maximum allowed percentage of unhealthy partitions per service. Allowed + values are Byte values from zero to 100"n"nThe percentage represents the + maximum tolerated percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe computation rounds up to + tolerate one failure on small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. The + maximum allowed percentage of unhealthy replicas per partition. Allowed + values are Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas over + the total number of replicas in the partition."nThe computation rounds up to + tolerate one failure on small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum allowed + percentage of unhealthy services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated percentage of + services that can be unhealthy before the application is considered in + error."nIf the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific service type over the total + number of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default percentage is + zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The maximum + allowed percentage of unhealthy deployed applications. Allowed values are Byte + values from zero to 100."nThe percentage represents the maximum tolerated + percentage of deployed applications that can be unhealthy before the application + is considered in error."nThis is calculated by dividing the number of unhealthy + deployed applications over the number of nodes where the application is currently + deployed on in the cluster."nThe computation rounds up to tolerate one failure on + small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service type health + policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to 100"n"nThe + percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error."nIf + the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy partitions over the + total number of partitions in the service."nThe computation rounds up + to tolerate one failure on small numbers of partitions. Default + percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to 100."n"nThe + percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at least one + unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition."nThe computation + rounds up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. Allowed values are + Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of services that can be unhealthy before + the application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the number of + unhealthy services of the specific service type over the total number + of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default + percentage is zero. + } + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "PartitionId": str, # Optional. Id of the partition to which this replica + belongs. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ], + ServiceKind: ReplicaHealth + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if application_health_policy is not None: + _json = application_health_policy + else: + _json = None + + request = build_get_replica_health_using_policy_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def report_replica_health( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + replica_id: str, + health_information: JSON, + *, + service_kind: str = "Stateful", + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric replica. + + Reports health state of the specified Service Fabric replica. The report must contain the + information about the source of the health report and property on which it is reported. + The report is sent to a Service Fabric gateway Replica, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, run GetReplicaHealth and check that + the report appears in the HealthEvents section. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: JSON + :keyword service_kind: The kind of service replica (Stateless or Stateful) for which the health + is being reported. Following are the possible values. Known values are: "Stateless" or + "Stateful". Default value is "Stateful". + :paramtype service_kind: str + :keyword immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :paramtype immediate: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + health_information = { + "Description": "str", # Optional. The description of the health information. + It represents free text used to add human readable information about the + report."nThe maximum string length for the description is 4096 characters."nIf + the provided string is longer, it will be automatically truncated."nWhen + truncated, the last characters of the description contain a marker "[Truncated]", + and total string size is 4096 characters."nThe presence of the marker indicates + to users that truncation occurred."nNote that when truncated, the description has + less than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID which identifies the + health report and can be used to find more detailed information about a specific + health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Property": "str", # Required. The property of the health information. An + entity can have health reports for different properties."nThe property is a + string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report."nFor example, a reporter + with SourceId "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same reporter + can monitor the node connectivity, so it can report a property "Connectivity" on + the same node."nIn the health store, these reports are treated as separate health + events for the specified node."n"nTogether with the SourceId, the property + uniquely identifies the health information. + "RemoveWhenExpired": bool, # Optional. Value that indicates whether the + report is removed from health store when it expires."nIf set to true, the report + is removed from the health store after it expires."nIf set to false, the report + is treated as an error when expired. The value of this property is false by + default."nWhen clients report periodically, they should set RemoveWhenExpired + false (default)."nThis way, if the reporter has issues (e.g. deadlock) and can't + report, the entity is evaluated at error when the health report expires."nThis + flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for this health + report as a numeric string."nThe report sequence number is used by the health + store to detect stale reports."nIf not specified, a sequence number is + auto-generated by the health client when a report is added. + "SourceId": "str", # Required. The source name that identifies the + client/watchdog/system component that generated the health information. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The duration for + which this health report is valid. This field uses ISO8601 format for specifying + the duration."nWhen clients report periodically, they should send reports with + higher frequency than time to live."nIf clients report on transition, they can + set the time to live to infinite."nWhen time to live expires, the health event + that contains the health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = health_information + + request = build_report_replica_health_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + content_type=content_type, + json=_json, + service_kind=service_kind, + immediate=immediate, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_deployed_service_replica_info_list( + self, + node_name: str, + application_id: str, + *, + partition_id: Optional[str] = None, + service_manifest_name: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[List[JSON]]: + """Gets the list of replicas deployed on a Service Fabric node. + + Gets the list containing the information about replicas deployed on a Service Fabric node. The + information include partition ID, replica ID, status of the replica, name of the service, name + of the service type, and other information. Use PartitionId or ServiceManifestName query + parameters to return information about the deployed replicas matching the specified values for + those parameters. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword partition_id: The identity of the partition. Default value is None. + :paramtype partition_id: str + :keyword service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. Default value is None. + :paramtype service_manifest_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Address": "str", # Optional. The last address returned by the + replica in Open or ChangeRole. + "CodePackageName": "str", # Optional. The name of the code package + that hosts this replica. + "HostProcessId": "str", # Optional. Host process ID of the process + that is hosting the replica. This will be zero if the replica is down. In + hyper-v containers this host process ID will be from different kernel. + "PartitionId": str, # Optional. An internal ID used by Service + Fabric to uniquely identify a partition. This is a randomly generated GUID + when the service was created. The partition ID is unique and does not change + for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + "ReplicaStatus": "str", # Optional. The status of a replica of a + service. Known values are: "Invalid", "InBuild", "Standby", "Ready", "Down", + "Dropped". + "ServiceManifestName": "str", # Optional. The name of the service + manifest in which this service type is defined. + "ServiceName": "str", # Optional. The full name of the service with + 'fabric:' URI scheme. + "ServicePackageActivationId": "str", # Optional. The ActivationId of + a deployed service package. If ServicePackageActivationMode specified at the + time of creating the service"nis 'SharedProcess' (or if it is not specified, + in which case it defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + "ServiceTypeName": "str", # Optional. Name of the service type as + specified in the service manifest. + ServiceKind: ServiceKind + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[List[JSON]]] + + + request = build_get_deployed_service_replica_info_list_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + partition_id=partition_id, + service_manifest_name=service_manifest_name, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace + def get_deployed_service_replica_detail_info( + self, + node_name: str, + partition_id: str, + replica_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the details of replica deployed on a Service Fabric node. + + Gets the details of the replica deployed on a Service Fabric node. The information includes + service kind, service name, current service operation, current service operation start date + time, partition ID, replica/instance ID, reported load, and other information. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "CurrentServiceOperation": "str", # Optional. Specifies the current active + life-cycle operation on a stateful service replica or stateless service instance. + Known values are: "Unknown", "None", "Open", "ChangeRole", "Close", "Abort". + "CurrentServiceOperationStartTimeUtc": "2020-02-20 00:00:00", # Optional. + The start time of the current service operation in UTC format. + "PartitionId": str, # Optional. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the lifetime of + the service. If the same service was deleted and recreated the IDs of its + partitions would be different. + "ReportedLoad": [ + { + "CurrentValue": "str", # Optional. The double value of the + load for the metric. + "LastReportedUtc": "2020-02-20 00:00:00", # Optional. The + UTC time when the load is reported. + "Name": "str", # Optional. The name of the metric. + "Value": 0 # Optional. The value of the load for the metric. + In future releases of Service Fabric this parameter will be deprecated in + favor of CurrentValue. + } + ], + "ServiceName": "str", # Optional. Full hierarchical name of the service in + URI format starting with ``fabric:``. + ServiceKind: ServiceKind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_deployed_service_replica_detail_info_request( + node_name=node_name, + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_deployed_service_replica_detail_info_by_partition_id( + self, + node_name: str, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the details of replica deployed on a Service Fabric node. + + Gets the details of the replica deployed on a Service Fabric node. The information includes + service kind, service name, current service operation, current service operation start date + time, partition ID, replica/instance ID, reported load, and other information. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "CurrentServiceOperation": "str", # Optional. Specifies the current active + life-cycle operation on a stateful service replica or stateless service instance. + Known values are: "Unknown", "None", "Open", "ChangeRole", "Close", "Abort". + "CurrentServiceOperationStartTimeUtc": "2020-02-20 00:00:00", # Optional. + The start time of the current service operation in UTC format. + "PartitionId": str, # Optional. An internal ID used by Service Fabric to + uniquely identify a partition. This is a randomly generated GUID when the service + was created. The partition ID is unique and does not change for the lifetime of + the service. If the same service was deleted and recreated the IDs of its + partitions would be different. + "ReportedLoad": [ + { + "CurrentValue": "str", # Optional. The double value of the + load for the metric. + "LastReportedUtc": "2020-02-20 00:00:00", # Optional. The + UTC time when the load is reported. + "Name": "str", # Optional. The name of the metric. + "Value": 0 # Optional. The value of the load for the metric. + In future releases of Service Fabric this parameter will be deprecated in + favor of CurrentValue. + } + ], + "ServiceName": "str", # Optional. Full hierarchical name of the service in + URI format starting with ``fabric:``. + ServiceKind: ServiceKind + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_deployed_service_replica_detail_info_by_partition_id_request( + node_name=node_name, + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def restart_replica( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + partition_id: str, + replica_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Restarts a service replica of a persisted service running on a node. + + Restarts a service replica of a persisted service running on a node. Warning - There are no + safety checks performed when this API is used. Incorrect use of this API can lead to + availability loss for stateful services. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_restart_replica_request( + node_name=node_name, + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def remove_replica( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + partition_id: str, + replica_id: str, + *, + force_remove: Optional[bool] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Removes a service replica running on a node. + + This API simulates a Service Fabric replica failure by removing a replica from a Service Fabric + cluster. The removal closes the replica, transitions the replica to the role None, and then + removes all of the state information of the replica from the cluster. This API tests the + replica state removal path, and simulates the report fault permanent path through client APIs. + Warning - There are no safety checks performed when this API is used. Incorrect use of this API + can lead to data loss for stateful services. In addition, the forceRemove flag impacts all + other replicas hosted in the same process. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :keyword force_remove: Remove a Service Fabric application or service forcefully without going + through the graceful shutdown sequence. This parameter can be used to forcefully delete an + application or service for which delete is timing out due to issues in the service code that + prevents graceful close of replicas. Default value is None. + :paramtype force_remove: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_remove_replica_request( + node_name=node_name, + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + force_remove=force_remove, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_deployed_service_package_info_list( + self, + node_name: str, + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets the list of service packages deployed on a Service Fabric node. + + Returns the information about the service packages deployed on a Service Fabric node for the + given application. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Name": "str", # Optional. The name of the service package as + specified in the service manifest. + "ServicePackageActivationId": "str", # Optional. The ActivationId of + a deployed service package. If ServicePackageActivationMode specified at the + time of creating the service"nis 'SharedProcess' (or if it is not specified, + in which case it defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + "Status": "str", # Optional. Specifies the status of a deployed + application or service package on a Service Fabric node. Known values are: + "Invalid", "Downloading", "Activating", "Active", "Upgrading", + "Deactivating", "RanToCompletion", "Failed". + "Version": "str" # Optional. The version of the service package + specified in service manifest. + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_deployed_service_package_info_list_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def get_deployed_service_package_info_list_by_name( + self, + node_name: str, + application_id: str, + service_package_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> Optional[List[JSON]]: + """Gets the list of service packages deployed on a Service Fabric node matching exactly the + specified name. + + Returns the information about the service packages deployed on a Service Fabric node for the + given application. These results are of service packages whose name match exactly the service + package name specified as the parameter. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Name": "str", # Optional. The name of the service package as + specified in the service manifest. + "ServicePackageActivationId": "str", # Optional. The ActivationId of + a deployed service package. If ServicePackageActivationMode specified at the + time of creating the service"nis 'SharedProcess' (or if it is not specified, + in which case it defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + "Status": "str", # Optional. Specifies the status of a deployed + application or service package on a Service Fabric node. Known values are: + "Invalid", "Downloading", "Activating", "Active", "Upgrading", + "Deactivating", "RanToCompletion", "Failed". + "Version": "str" # Optional. The version of the service package + specified in service manifest. + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[Optional[List[JSON]]] + + + request = build_get_deployed_service_package_info_list_by_name_request( + node_name=node_name, + application_id=application_id, + service_package_name=service_package_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace + def get_deployed_service_package_health( + self, + node_name: str, + application_id: str, + service_package_name: str, + *, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the information about health of a service package for a specific application deployed for + a Service Fabric node and application. + + Gets the information about health of a service package for a specific application deployed on a + Service Fabric node. Use EventsHealthStateFilter to optionally filter for the collection of + HealthEvent objects reported on the deployed service package based on health state. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "ApplicationName": "str", # Optional. The name of the application, including + the 'fabric:' URI scheme. + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "NodeName": "str", # Optional. Name of the node where this service package + is deployed. + "ServiceManifestName": "str", # Optional. Name of the service manifest. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_deployed_service_package_health_request( + node_name=node_name, + application_id=application_id, + service_package_name=service_package_name, + api_version=api_version, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_deployed_service_package_health_using_policy( + self, + node_name: str, + application_id: str, + service_package_name: str, + application_health_policy: Optional[JSON] = None, + *, + events_health_state_filter: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the information about health of service package for a specific application deployed on a + Service Fabric node using the specified policy. + + Gets the information about health of a service package for a specific application deployed on a + Service Fabric node. using the specified policy. Use EventsHealthStateFilter to optionally + filter for the collection of HealthEvent objects reported on the deployed service package based + on health state. Use ApplicationHealthPolicy to optionally override the health policies used to + evaluate the health. This API only uses 'ConsiderWarningAsError' field of the + ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the + deployed service package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :param application_health_policy: Describes the health policies used to evaluate the health of + an application or one of its children. + If not present, the health evaluation uses the health policy from application manifest or the + default health policy. Default value is None. + :type application_health_policy: JSON + :keyword events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_health_policy = { + "ConsiderWarningAsError": bool, # Optional. Indicates whether warnings are + treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. The + maximum allowed percentage of unhealthy partitions per service. Allowed + values are Byte values from zero to 100"n"nThe percentage represents the + maximum tolerated percentage of partitions that can be unhealthy before the + service is considered in error."nIf the percentage is respected but there is + at least one unhealthy partition, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy partitions over + the total number of partitions in the service."nThe computation rounds up to + tolerate one failure on small numbers of partitions. Default percentage is + zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. The + maximum allowed percentage of unhealthy replicas per partition. Allowed + values are Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of replicas that can be unhealthy before the + partition is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas over + the total number of replicas in the partition."nThe computation rounds up to + tolerate one failure on small numbers of replicas. Default percentage is + zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum allowed + percentage of unhealthy services. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated percentage of + services that can be unhealthy before the application is considered in + error."nIf the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated by dividing + the number of unhealthy services of the specific service type over the total + number of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default percentage is + zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The maximum + allowed percentage of unhealthy deployed applications. Allowed values are Byte + values from zero to 100."nThe percentage represents the maximum tolerated + percentage of deployed applications that can be unhealthy before the application + is considered in error."nThis is calculated by dividing the number of unhealthy + deployed applications over the number of nodes where the application is currently + deployed on in the cluster."nThe computation rounds up to tolerate one failure on + small numbers of nodes. Default percentage is zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service type health + policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, # + Optional. The maximum allowed percentage of unhealthy partitions per + service. Allowed values are Byte values from zero to 100"n"nThe + percentage represents the maximum tolerated percentage of partitions + that can be unhealthy before the service is considered in error."nIf + the percentage is respected but there is at least one unhealthy + partition, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy partitions over the + total number of partitions in the service."nThe computation rounds up + to tolerate one failure on small numbers of partitions. Default + percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # + Optional. The maximum allowed percentage of unhealthy replicas per + partition. Allowed values are Byte values from zero to 100."n"nThe + percentage represents the maximum tolerated percentage of replicas + that can be unhealthy before the partition is considered in + error."nIf the percentage is respected but there is at least one + unhealthy replica, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy replicas + over the total number of replicas in the partition."nThe computation + rounds up to tolerate one failure on small numbers of replicas. + Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The + maximum allowed percentage of unhealthy services. Allowed values are + Byte values from zero to 100."n"nThe percentage represents the + maximum tolerated percentage of services that can be unhealthy before + the application is considered in error."nIf the percentage is + respected but there is at least one unhealthy service, the health is + evaluated as Warning."nThis is calculated by dividing the number of + unhealthy services of the specific service type over the total number + of services of the specific service type."nThe computation rounds up + to tolerate one failure on small numbers of services. Default + percentage is zero. + } + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "AggregatedHealthState": "str", # Optional. The HealthState representing the + aggregated health state of the entity computed by Health Manager."nThe health + evaluation of the entity reflects all events reported on the entity and its + children (if any)."nThe aggregation is done by applying the desired health + policy. Known values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "ApplicationName": "str", # Optional. The name of the application, including + the 'fabric:' URI scheme. + "HealthEvents": [ + { + "Description": "str", # Optional. The description of the + health information. It represents free text used to add human readable + information about the report."nThe maximum string length for the + description is 4096 characters."nIf the provided string is longer, it + will be automatically truncated."nWhen truncated, the last characters of + the description contain a marker "[Truncated]", and total string size is + 4096 characters."nThe presence of the marker indicates to users that + truncation occurred."nNote that when truncated, the description has less + than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID + which identifies the health report and can be used to find more detailed + information about a specific health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a + Service Fabric entity such as Cluster, Node, Application, Service, + Partition, Replica etc. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "IsExpired": bool, # Optional. Returns true if the health + event is expired, otherwise false. + "LastErrorTransitionAt": "2020-02-20 00:00:00", # Optional. + If the current health state is 'Error', this property returns the time at + which the health report was first reported with 'Error'. For periodic + reporting, many reports with the same state may have been generated + however, this property returns only the date and time at the first + 'Error' health report was received."n"nIf the current health state is + 'Ok' or 'Warning', returns the date and time at which the health state + was last in 'Error', before transitioning to a different state."n"nIf the + health state was never 'Error', the value will be zero date-time. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. The date and time when the health report was last modified by + the health store. + "LastOkTransitionAt": "2020-02-20 00:00:00", # Optional. If + the current health state is 'Ok', this property returns the time at which + the health report was first reported with 'Ok'."nFor periodic reporting, + many reports with the same state may have been generated."nThis property + returns the date and time when the first 'Ok' health report was + received."n"nIf the current health state is 'Error' or 'Warning', returns + the date and time at which the health state was last in 'Ok', before + transitioning to a different state."n"nIf the health state was never + 'Ok', the value will be zero date-time. + "LastWarningTransitionAt": "2020-02-20 00:00:00", # + Optional. If the current health state is 'Warning', this property returns + the time at which the health report was first reported with 'Warning'. + For periodic reporting, many reports with the same state may have been + generated however, this property returns only the date and time at the + first 'Warning' health report was received."n"nIf the current health + state is 'Ok' or 'Error', returns the date and time at which the health + state was last in 'Warning', before transitioning to a different + state."n"nIf the health state was never 'Warning', the value will be zero + date-time. + "Property": "str", # Required. The property of the health + information. An entity can have health reports for different + properties."nThe property is a string and not a fixed enumeration to + allow the reporter flexibility to categorize the state condition that + triggers the report."nFor example, a reporter with SourceId + "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same + reporter can monitor the node connectivity, so it can report a property + "Connectivity" on the same node."nIn the health store, these reports are + treated as separate health events for the specified node."n"nTogether + with the SourceId, the property uniquely identifies the health + information. + "RemoveWhenExpired": bool, # Optional. Value that indicates + whether the report is removed from health store when it expires."nIf set + to true, the report is removed from the health store after it + expires."nIf set to false, the report is treated as an error when + expired. The value of this property is false by default."nWhen clients + report periodically, they should set RemoveWhenExpired false + (default)."nThis way, if the reporter has issues (e.g. deadlock) and + can't report, the entity is evaluated at error when the health report + expires."nThis flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for + this health report as a numeric string."nThe report sequence number is + used by the health store to detect stale reports."nIf not specified, a + sequence number is auto-generated by the health client when a report is + added. + "SourceId": "str", # Required. The source name that + identifies the client/watchdog/system component that generated the health + information. + "SourceUtcTimestamp": "2020-02-20 00:00:00", # Optional. The + date and time when the health report was sent by the source. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The + duration for which this health report is valid. This field uses ISO8601 + format for specifying the duration."nWhen clients report periodically, + they should send reports with higher frequency than time to live."nIf + clients report on transition, they can set the time to live to + infinite."nWhen time to live expires, the health event that contains the + health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + ], + "HealthStatistics": { + "HealthStateCountList": [ + { + "EntityKind": "str", # Optional. The entity kind for + which health states are evaluated. Known values are: "Invalid", + "Node", "Partition", "Service", "Application", "Replica", + "DeployedApplication", "DeployedServicePackage", "Cluster". + "HealthStateCount": { + "ErrorCount": 0.0, # Optional. The number of + health entities with aggregated health state Error. + "OkCount": 0.0, # Optional. The number of + health entities with aggregated health state Ok. + "WarningCount": 0.0 # Optional. The number + of health entities with aggregated health state Warning. + } + } + ] + }, + "NodeName": "str", # Optional. Name of the node where this service package + is deployed. + "ServiceManifestName": "str", # Optional. Name of the service manifest. + "UnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + if application_health_policy is not None: + _json = application_health_policy + else: + _json = None + + request = build_get_deployed_service_package_health_using_policy_request( + node_name=node_name, + application_id=application_id, + service_package_name=service_package_name, + api_version=api_version, + content_type=content_type, + json=_json, + events_health_state_filter=events_health_state_filter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def report_deployed_service_package_health( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + application_id: str, + service_package_name: str, + health_information: JSON, + *, + immediate: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Sends a health report on the Service Fabric deployed service package. + + Reports health state of the service package of the application deployed on a Service Fabric + node. The report must contain the information about the source of the health report and + property on which it is reported. + The report is sent to a Service Fabric gateway Service, which forwards to the health store. + The report may be accepted by the gateway, but rejected by the health store after extra + validation. + For example, the health store may reject the report because of an invalid parameter, like a + stale sequence number. + To see whether the report was applied in the health store, get deployed service package health + and check that the report appears in the HealthEvents section. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :param health_information: Describes the health information for the health report. This + information needs to be present in all of the health reports sent to the health manager. + :type health_information: JSON + :keyword immediate: A flag that indicates whether the report should be sent immediately. + A health report is sent to a Service Fabric gateway Application, which forwards to the health + store. + If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health + store, regardless of the fabric client settings that the HTTP Gateway Application is using. + This is useful for critical reports that should be sent as soon as possible. + Depending on timing and other conditions, sending the report may still fail, for example if + the HTTP Gateway is closed or the message doesn't reach the Gateway. + If Immediate is set to false, the report is sent based on the health client settings from the + HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval + configuration. + This is the recommended setting because it allows the health client to optimize health + reporting messages to health store as well as health report processing. + By default, reports are not sent immediately. Default value is False. + :paramtype immediate: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + health_information = { + "Description": "str", # Optional. The description of the health information. + It represents free text used to add human readable information about the + report."nThe maximum string length for the description is 4096 characters."nIf + the provided string is longer, it will be automatically truncated."nWhen + truncated, the last characters of the description contain a marker "[Truncated]", + and total string size is 4096 characters."nThe presence of the marker indicates + to users that truncation occurred."nNote that when truncated, the description has + less than 4096 characters from the original string. + "HealthReportId": "str", # Optional. A health report ID which identifies the + health report and can be used to find more detailed information about a specific + health event at"naka.ms/sfhealthid. + "HealthState": "str", # Required. The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica etc. Known + values are: "Invalid", "Ok", "Warning", "Error", "Unknown". + "Property": "str", # Required. The property of the health information. An + entity can have health reports for different properties."nThe property is a + string and not a fixed enumeration to allow the reporter flexibility to + categorize the state condition that triggers the report."nFor example, a reporter + with SourceId "LocalWatchdog" can monitor the state of the available disk on a + node,"nso it can report "AvailableDisk" property on that node."nThe same reporter + can monitor the node connectivity, so it can report a property "Connectivity" on + the same node."nIn the health store, these reports are treated as separate health + events for the specified node."n"nTogether with the SourceId, the property + uniquely identifies the health information. + "RemoveWhenExpired": bool, # Optional. Value that indicates whether the + report is removed from health store when it expires."nIf set to true, the report + is removed from the health store after it expires."nIf set to false, the report + is treated as an error when expired. The value of this property is false by + default."nWhen clients report periodically, they should set RemoveWhenExpired + false (default)."nThis way, if the reporter has issues (e.g. deadlock) and can't + report, the entity is evaluated at error when the health report expires."nThis + flags the entity as being in Error health state. + "SequenceNumber": "str", # Optional. The sequence number for this health + report as a numeric string."nThe report sequence number is used by the health + store to detect stale reports."nIf not specified, a sequence number is + auto-generated by the health client when a report is added. + "SourceId": "str", # Required. The source name that identifies the + client/watchdog/system component that generated the health information. + "TimeToLiveInMilliSeconds": "1 day, 0:00:00" # Optional. The duration for + which this health report is valid. This field uses ISO8601 format for specifying + the duration."nWhen clients report periodically, they should send reports with + higher frequency than time to live."nIf clients report on transition, they can + set the time to live to infinite."nWhen time to live expires, the health event + that contains the health information"nis either removed from health store, if + RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired + false."n"nIf not specified, time to live defaults to infinite value. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = health_information + + request = build_report_deployed_service_package_health_request( + node_name=node_name, + application_id=application_id, + service_package_name=service_package_name, + api_version=api_version, + content_type=content_type, + json=_json, + immediate=immediate, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def deploy_service_package_to_node( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + deploy_service_package_to_node_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Downloads all of the code packages associated with specified service manifest on the specified + node. + + This API provides a way to download code packages including the container images on a specific + node outside of the normal application deployment and upgrade path. This is useful for the + large code packages and container images to be present on the node before the actual + application deployment and upgrade, thus significantly reducing the total time required for the + deployment or upgrade. + + :param node_name: The name of the node. + :type node_name: str + :param deploy_service_package_to_node_description: Describes information for deploying a + service package to a Service Fabric node. + :type deploy_service_package_to_node_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + deploy_service_package_to_node_description = { + "ApplicationTypeName": "str", # Required. The application type name as + defined in the application manifest. + "ApplicationTypeVersion": "str", # Required. The version of the application + type as defined in the application manifest. + "NodeName": "str", # Required. The name of a Service Fabric node. + "PackageSharingPolicy": [ + { + "PackageSharingScope": "str", # Optional. Represents the + scope for PackageSharingPolicy. This is specified during + DeployServicePackageToNode operation. Known values are: "None", "All", + "Code", "Config", "Data". + "SharedPackageName": "str" # Optional. The name of code, + configuration or data package that should be shared. + } + ], + "ServiceManifestName": "str" # Required. The name of service manifest whose + packages need to be downloaded. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = deploy_service_package_to_node_description + + request = build_deploy_service_package_to_node_request( + node_name=node_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_deployed_code_package_info_list( + self, + node_name: str, + application_id: str, + *, + service_manifest_name: Optional[str] = None, + code_package_name: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets the list of code packages deployed on a Service Fabric node. + + Gets the list of code packages deployed on a Service Fabric node for the given application. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. Default value is None. + :paramtype service_manifest_name: str + :keyword code_package_name: The name of code package specified in service manifest registered + as part of an application type in a Service Fabric cluster. Default value is None. + :paramtype code_package_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "HostIsolationMode": "str", # Optional. Specifies the isolation mode + of main entry point of a code package when it's host type is ContainerHost. + This is specified as part of container host policies in application manifest + while importing service manifest. Known values are: "None", "Process", + "HyperV". + "HostType": "str", # Optional. Specifies the type of host for main + entry point of a code package as specified in service manifest. Known values + are: "Invalid", "ExeHost", "ContainerHost". + "MainEntryPoint": { + "CodePackageEntryPointStatistics": { + "ActivationCount": "str", # Optional. Number of + times the entry point has run. + "ActivationFailureCount": "str", # Optional. Number + of times the entry point failed to run. + "ContinuousActivationFailureCount": "str", # + Optional. Number of times the entry point continuously failed to run. + "ContinuousExitFailureCount": "str", # Optional. + Number of times the entry point continuously failed to exit + gracefully. + "ExitCount": "str", # Optional. Number of times the + entry point finished running. + "ExitFailureCount": "str", # Optional. Number of + times the entry point failed to exit gracefully. + "LastActivationTime": "2020-02-20 00:00:00", # + Optional. The last time (in UTC) when Service Fabric attempted to run + the entry point. + "LastExitCode": "str", # Optional. The last exit + code of the entry point. + "LastExitTime": "2020-02-20 00:00:00", # Optional. + The last time (in UTC) when the entry point finished running. + "LastSuccessfulActivationTime": "2020-02-20 + 00:00:00", # Optional. The last time (in UTC) when the entry point + ran successfully. + "LastSuccessfulExitTime": "2020-02-20 00:00:00" # + Optional. The last time (in UTC) when the entry point finished + running gracefully. + }, + "ContainerId": "str", # Optional. The container ID of the + entry point. Only valid for container hosts. + "EntryPointLocation": "str", # Optional. The location of + entry point executable on the node. + "InstanceId": "str", # Optional. The instance ID for current + running entry point. For a code package setup entry point (if specified) + runs first and after it finishes main entry point is started. Each time + entry point executable is run, its instance id will change. + "NextActivationTime": "2020-02-20 00:00:00", # Optional. The + time (in UTC) when the entry point executable will be run next. + "ProcessId": "str", # Optional. The process ID of the entry + point. + "RunAsUserName": "str", # Optional. The user name under + which entry point executable is run on the node. + "Status": "str" # Optional. Specifies the status of the code + package entry point deployed on a Service Fabric node. Known values are: + "Invalid", "Pending", "Starting", "Started", "Stopping", "Stopped". + }, + "Name": "str", # Optional. The name of the code package. + "RunFrequencyInterval": "str", # Optional. The interval at which + code package is run. This is used for periodic code package. + "ServiceManifestName": "str", # Optional. The name of service + manifest that specified this code package. + "ServicePackageActivationId": "str", # Optional. The ActivationId of + a deployed service package. If ServicePackageActivationMode specified at the + time of creating the service"nis 'SharedProcess' (or if it is not specified, + in which case it defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + "SetupEntryPoint": { + "CodePackageEntryPointStatistics": { + "ActivationCount": "str", # Optional. Number of + times the entry point has run. + "ActivationFailureCount": "str", # Optional. Number + of times the entry point failed to run. + "ContinuousActivationFailureCount": "str", # + Optional. Number of times the entry point continuously failed to run. + "ContinuousExitFailureCount": "str", # Optional. + Number of times the entry point continuously failed to exit + gracefully. + "ExitCount": "str", # Optional. Number of times the + entry point finished running. + "ExitFailureCount": "str", # Optional. Number of + times the entry point failed to exit gracefully. + "LastActivationTime": "2020-02-20 00:00:00", # + Optional. The last time (in UTC) when Service Fabric attempted to run + the entry point. + "LastExitCode": "str", # Optional. The last exit + code of the entry point. + "LastExitTime": "2020-02-20 00:00:00", # Optional. + The last time (in UTC) when the entry point finished running. + "LastSuccessfulActivationTime": "2020-02-20 + 00:00:00", # Optional. The last time (in UTC) when the entry point + ran successfully. + "LastSuccessfulExitTime": "2020-02-20 00:00:00" # + Optional. The last time (in UTC) when the entry point finished + running gracefully. + }, + "ContainerId": "str", # Optional. The container ID of the + entry point. Only valid for container hosts. + "EntryPointLocation": "str", # Optional. The location of + entry point executable on the node. + "InstanceId": "str", # Optional. The instance ID for current + running entry point. For a code package setup entry point (if specified) + runs first and after it finishes main entry point is started. Each time + entry point executable is run, its instance id will change. + "NextActivationTime": "2020-02-20 00:00:00", # Optional. The + time (in UTC) when the entry point executable will be run next. + "ProcessId": "str", # Optional. The process ID of the entry + point. + "RunAsUserName": "str", # Optional. The user name under + which entry point executable is run on the node. + "Status": "str" # Optional. Specifies the status of the code + package entry point deployed on a Service Fabric node. Known values are: + "Invalid", "Pending", "Starting", "Started", "Stopping", "Stopped". + }, + "Status": "str", # Optional. Specifies the status of a deployed + application or service package on a Service Fabric node. Known values are: + "Invalid", "Downloading", "Activating", "Active", "Upgrading", + "Deactivating", "RanToCompletion", "Failed". + "Version": "str" # Optional. The version of the code package + specified in service manifest. + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_deployed_code_package_info_list_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def restart_deployed_code_package( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + application_id: str, + restart_deployed_code_package_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Restarts a code package deployed on a Service Fabric node in a cluster. + + Restarts a code package deployed on a Service Fabric node in a cluster. This aborts the code + package process, which will restart all the user service replicas hosted in that process. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param restart_deployed_code_package_description: Describes the deployed code package on + Service Fabric node to restart. + :type restart_deployed_code_package_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + restart_deployed_code_package_description = { + "CodePackageInstanceId": "str", # Required. The instance ID for currently + running entry point. For a code package setup entry point (if specified) runs + first and after it finishes main entry point is started."nEach time entry point + executable is run, its instance ID will change. If 0 is passed in as the code + package instance ID, the API will restart the code package with whatever instance + ID it is currently running."nIf an instance ID other than 0 is passed in, the API + will restart the code package only if the current Instance ID matches the passed + in instance ID."nNote, passing in the exact instance ID (not 0) in the API is + safer, because if ensures at most one restart of the code package. + "CodePackageName": "str", # Required. The name of the code package defined + in the service manifest. + "ServiceManifestName": "str", # Required. The name of service manifest that + specified this code package. + "ServicePackageActivationId": "str" # Optional. The ActivationId of a + deployed service package. If ServicePackageActivationMode specified at the time + of creating the service"nis 'SharedProcess' (or if it is not specified, in which + case it defaults to 'SharedProcess'), then value of + ServicePackageActivationId"nis always an empty string. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = restart_deployed_code_package_description + + request = build_restart_deployed_code_package_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_container_logs_deployed_on_node( + self, + node_name: str, + application_id: str, + *, + service_manifest_name: str, + code_package_name: str, + tail: Optional[str] = None, + previous: Optional[bool] = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the container logs for container deployed on a Service Fabric node. + + Gets the container logs for container deployed on a Service Fabric node for the given code + package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. + :paramtype service_manifest_name: str + :keyword code_package_name: The name of code package specified in service manifest registered + as part of an application type in a Service Fabric cluster. + :paramtype code_package_name: str + :keyword tail: Number of lines to show from the end of the logs. Default is 100. 'all' to show + the complete logs. + :paramtype tail: str + :keyword previous: Specifies whether to get container logs from exited/dead containers of the + code package instance. Default value is False. + :paramtype previous: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Content": "str" # Optional. Container logs. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_container_logs_deployed_on_node_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, + tail=tail, + previous=previous, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def invoke_container_api( + self, + node_name: str, + application_id: str, + container_api_request_body: JSON, + *, + service_manifest_name: str, + code_package_name: str, + code_package_instance_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Invoke container API on a container deployed on a Service Fabric node. + + Invoke container API on a container deployed on a Service Fabric node for the given code + package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param container_api_request_body: Parameters for making container API call. + :type container_api_request_body: JSON + :keyword service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. + :paramtype service_manifest_name: str + :keyword code_package_name: The name of code package specified in service manifest registered + as part of an application type in a Service Fabric cluster. + :paramtype code_package_name: str + :keyword code_package_instance_id: ID that uniquely identifies a code package instance deployed + on a service fabric node. + :paramtype code_package_instance_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + container_api_request_body = { + "Body": "str", # Optional. HTTP request body of container REST API. + "Content-Type": "str", # Optional. Content type of container REST API + request, defaults to "application/json". + "HttpVerb": "str", # Optional. HTTP verb of container REST API, defaults to + "GET". + "UriPath": "str" # Required. URI path of container REST API. + } + + # response body for status code(s): 200 + response.json() == { + "ContainerApiResult": { + "Body": "str", # Optional. container API result body. + "Content-Encoding": "str", # Optional. HTTP content encoding. + "Content-Type": "str", # Optional. HTTP content type. + "Status": 0 # Required. HTTP status code returned by the target + container API. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = container_api_request_body + + request = build_invoke_container_api_request( + node_name=node_name, + application_id=application_id, + api_version=api_version, + content_type=content_type, + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, + code_package_instance_id=code_package_instance_id, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def create_compose_deployment( # pylint: disable=inconsistent-return-statements + self, + create_compose_deployment_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates a Service Fabric compose deployment. + + Compose is a file format that describes multi-container applications. This API allows deploying + container based applications defined in compose format in a Service Fabric cluster. Once the + deployment is created, its status can be tracked via the ``GetComposeDeploymentStatus`` API. + + :param create_compose_deployment_description: Describes the compose deployment that needs to be + created. + :type create_compose_deployment_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '"6.0-preview'. Default value is "6.0-preview". Note that overriding this default value may + result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + create_compose_deployment_description = { + "ComposeFileContent": "str", # Required. The content of the compose file + that describes the deployment to create. + "DeploymentName": "str", # Required. The name of the deployment. + "RegistryCredential": { + "PasswordEncrypted": bool, # Optional. Indicates that supplied + container registry password is encrypted. + "RegistryPassword": "str", # Optional. The password for supplied + username to connect to container registry. + "RegistryUserName": "str" # Optional. The user name to connect to + container registry. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = create_compose_deployment_description + + request = build_create_compose_deployment_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_compose_deployment_status( + self, + deployment_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets information about a Service Fabric compose deployment. + + Returns the status of the compose deployment that was created or in the process of being + created in the Service Fabric cluster and whose name matches the one specified as the + parameter. The response includes the name, status, and other details about the deployment. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '"6.0-preview'. Default value is "6.0-preview". Note that overriding this default value may + result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ApplicationName": "str", # Optional. The name of the application, including + the 'fabric:' URI scheme. + "Name": "str", # Optional. The name of the deployment. + "Status": "str", # Optional. The status of the compose deployment. Known + values are: "Invalid", "Provisioning", "Creating", "Ready", "Unprovisioning", + "Deleting", "Failed", "Upgrading". + "StatusDetails": "str" # Optional. The status details of compose deployment + including failure message. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_compose_deployment_status_request( + deployment_name=deployment_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_compose_deployment_status_list( + self, + *, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the list of compose deployments created in the Service Fabric cluster. + + Gets the status about the compose deployments that were created or in the process of being + created in the Service Fabric cluster. The response includes the name, status, and other + details about the compose deployments. If the list of deployments do not fit in a page, one + page of results is returned as well as a continuation token, which can be used to get the next + page. + + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '"6.0-preview'. Default value is "6.0-preview". Note that overriding this default value may + result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "ApplicationName": "str", # Optional. The name of the + application, including the 'fabric:' URI scheme. + "Name": "str", # Optional. The name of the deployment. + "Status": "str", # Optional. The status of the compose + deployment. Known values are: "Invalid", "Provisioning", "Creating", + "Ready", "Unprovisioning", "Deleting", "Failed", "Upgrading". + "StatusDetails": "str" # Optional. The status details of + compose deployment including failure message. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_compose_deployment_status_list_request( + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_compose_deployment_upgrade_progress( + self, + deployment_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets details for the latest upgrade performed on this Service Fabric compose deployment. + + Returns the information about the state of the compose deployment upgrade along with details to + aid debugging application health issues. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '"6.0-preview'. Default value is "6.0-preview". Note that overriding this default value may + result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ApplicationHealthPolicy": { + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per service. + Allowed values are Byte values from zero to 100"n"nThe percentage + represents the maximum tolerated percentage of partitions that can be + unhealthy before the service is considered in error."nIf the percentage + is respected but there is at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated by dividing the + number of unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on small + numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per partition. + Allowed values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of replicas that can be + unhealthy before the partition is considered in error."nIf the percentage + is respected but there is at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated by dividing the + number of unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on small + numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum + allowed percentage of unhealthy services. Allowed values are Byte values + from zero to 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the application is + considered in error."nIf the percentage is respected but there is at + least one unhealthy service, the health is evaluated as Warning."nThis is + calculated by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific service + type."nThe computation rounds up to tolerate one failure on small numbers + of services. Default percentage is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The + maximum allowed percentage of unhealthy deployed applications. Allowed values + are Byte values from zero to 100."nThe percentage represents the maximum + tolerated percentage of deployed applications that can be unhealthy before + the application is considered in error."nThis is calculated by dividing the + number of unhealthy deployed applications over the number of nodes where the + application is currently deployed on in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service + type health policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, + # Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte values from zero + to 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the service + is considered in error."nIf the percentage is respected but there + is at least one unhealthy partition, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, + # Optional. The maximum allowed percentage of unhealthy replicas + per partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the partition + is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. + The maximum allowed percentage of unhealthy services. Allowed + values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of services that can + be unhealthy before the application is considered in error."nIf + the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated + by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific + service type."nThe computation rounds up to tolerate one failure + on small numbers of services. Default percentage is zero. + } + } + ] + }, + "ApplicationName": "str", # Optional. The name of the target application, + including the 'fabric:' URI scheme. + "ApplicationUnhealthyEvaluations": [ + { + "HealthEvaluation": { + "AggregatedHealthState": "str", # Optional. The + health state of a Service Fabric entity such as Cluster, Node, + Application, Service, Partition, Replica etc. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "Description": "str", # Optional. Description of the + health evaluation, which represents a summary of the evaluation + process. + Kind: Kind + } + } + ], + "ApplicationUpgradeStatusDetails": "str", # Optional. Additional details of + application upgrade including failure message. + "CurrentUpgradeDomainDuration": "PT0H2M0S", # Optional. Default value is + "PT0H2M0S". The estimated amount of time spent processing current Upgrade Domain. + It is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + "CurrentUpgradeDomainProgress": { + "DomainName": "str", # Optional. The name of the upgrade domain. + "NodeUpgradeProgressList": [ + { + "NodeName": "str", # Optional. The name of a Service + Fabric node. + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ], + "UpgradeDuration": "str", # Optional. The estimated + time spent processing the node since it was deactivated during a + node-by-node upgrade. + "UpgradePhase": "str" # Optional. The state of the + upgrading node. Known values are: "Invalid", "PreUpgradeSafetyCheck", + "Upgrading", "PostUpgradeSafetyCheck". + } + ] + }, + "DeploymentName": "str", # Optional. The name of the target deployment. + "FailureReason": "str", # Optional. The cause of an upgrade failure that + resulted in FailureAction being executed. Known values are: "None", + "Interrupted", "HealthCheck", "UpgradeDomainTimeout", "OverallUpgradeTimeout". + "FailureTimestampUtc": "str", # Optional. The estimated UTC datetime when + the upgrade failed and FailureAction was executed. + "ForceRestart": bool, # Optional. If true, then processes are forcefully + restarted during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + "MonitoringPolicy": { + "FailureAction": "str", # Optional. The compensating action to + perform when a Monitored upgrade encounters monitoring policy or health + policy violations."nInvalid indicates the failure action is invalid. Rollback + specifies that the upgrade will start rolling back automatically."nManual + indicates that the upgrade will switch to UnmonitoredManual upgrade mode. + Known values are: "Invalid", "Rollback", "Manual". + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # Optional. + Default value is "PT0H10M0S". The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is + executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # Optional. + Default value is "PT0H2M0S". The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade + domain. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. Default + value is "0". The amount of time to wait after completing an upgrade domain + before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a + number representing the total number of milliseconds. + "UpgradeDomainTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S", + # Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of + time each upgrade domain has to complete before FailureAction is executed. It + is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + "UpgradeTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S" # + Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of time + the overall upgrade has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + }, + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value is + "UnmonitoredAuto". The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "StartTimestampUtc": "str", # Optional. The estimated UTC datetime when the + upgrade started. + "TargetApplicationTypeVersion": "str", # Optional. The target application + type version (found in the application manifest) for the application upgrade. + "UpgradeDomainProgressAtFailure": { + "DomainName": "str", # Optional. The name of the upgrade domain. + "NodeUpgradeProgressList": [ + { + "NodeName": "str", # Optional. The name of a Service + Fabric node. + "PendingSafetyChecks": [ + { + "SafetyCheck": { + Kind: Kind + } + } + ], + "UpgradeDuration": "str", # Optional. The estimated + time spent processing the node since it was deactivated during a + node-by-node upgrade. + "UpgradePhase": "str" # Optional. The state of the + upgrading node. Known values are: "Invalid", "PreUpgradeSafetyCheck", + "Upgrading", "PostUpgradeSafetyCheck". + } + ] + }, + "UpgradeDuration": "PT0H2M0S", # Optional. Default value is "PT0H2M0S". The + estimated amount of time that the overall upgrade elapsed. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, then it + is interpreted as a number representing the total number of milliseconds. + "UpgradeKind": "Rolling", # Optional. Default value is "Rolling". The kind + of upgrade out of the following possible values. Known values are: "Invalid", + "Rolling". Default value: "Rolling". + "UpgradeReplicaSetCheckTimeoutInSeconds": 42949672925, # Optional. Default + value is 42949672925. The maximum amount of time to block processing of an + upgrade domain and prevent loss of availability when there are unexpected issues. + When this timeout expires, processing of the upgrade domain will proceed + regardless of availability loss issues. The timeout is reset at the start of each + upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + 32-bit integer). + "UpgradeState": "str", # Optional. The state of the compose deployment + upgrade. Known values are: "Invalid", "ProvisioningTarget", + "RollingForwardInProgress", "RollingForwardPending", "UnprovisioningCurrent", + "RollingForwardCompleted", "RollingBackInProgress", "UnprovisioningTarget", + "RollingBackCompleted", "Failed". + "UpgradeStatusDetails": "str" # Optional. Additional detailed information + about the status of the pending upgrade. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_compose_deployment_upgrade_progress_request( + deployment_name=deployment_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def remove_compose_deployment( # pylint: disable=inconsistent-return-statements + self, + deployment_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes an existing Service Fabric compose deployment from cluster. + + Deletes an existing Service Fabric compose deployment. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '"6.0-preview'. Default value is "6.0-preview". Note that overriding this default value may + result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_remove_compose_deployment_request( + deployment_name=deployment_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def start_compose_deployment_upgrade( # pylint: disable=inconsistent-return-statements + self, + deployment_name: str, + compose_deployment_upgrade_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts upgrading a compose deployment in the Service Fabric cluster. + + Validates the supplied upgrade parameters and starts upgrading the deployment if the parameters + are valid. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :param compose_deployment_upgrade_description: Parameters for upgrading compose deployment. + :type compose_deployment_upgrade_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '"6.0-preview'. Default value is "6.0-preview". Note that overriding this default value may + result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + compose_deployment_upgrade_description = { + "ApplicationHealthPolicy": { + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "DefaultServiceTypeHealthPolicy": { + "MaxPercentUnhealthyPartitionsPerService": 0, # Optional. + The maximum allowed percentage of unhealthy partitions per service. + Allowed values are Byte values from zero to 100"n"nThe percentage + represents the maximum tolerated percentage of partitions that can be + unhealthy before the service is considered in error."nIf the percentage + is respected but there is at least one unhealthy partition, the health is + evaluated as Warning."nThe percentage is calculated by dividing the + number of unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on small + numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, # Optional. + The maximum allowed percentage of unhealthy replicas per partition. + Allowed values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of replicas that can be + unhealthy before the partition is considered in error."nIf the percentage + is respected but there is at least one unhealthy replica, the health is + evaluated as Warning."nThe percentage is calculated by dividing the + number of unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on small + numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. The maximum + allowed percentage of unhealthy services. Allowed values are Byte values + from zero to 100."n"nThe percentage represents the maximum tolerated + percentage of services that can be unhealthy before the application is + considered in error."nIf the percentage is respected but there is at + least one unhealthy service, the health is evaluated as Warning."nThis is + calculated by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific service + type."nThe computation rounds up to tolerate one failure on small numbers + of services. Default percentage is zero. + }, + "MaxPercentUnhealthyDeployedApplications": 0, # Optional. The + maximum allowed percentage of unhealthy deployed applications. Allowed values + are Byte values from zero to 100."nThe percentage represents the maximum + tolerated percentage of deployed applications that can be unhealthy before + the application is considered in error."nThis is calculated by dividing the + number of unhealthy deployed applications over the number of nodes where the + application is currently deployed on in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero. + "ServiceTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the service + type health policy map item. This is the name of the service type. + "Value": { + "MaxPercentUnhealthyPartitionsPerService": 0, + # Optional. The maximum allowed percentage of unhealthy + partitions per service. Allowed values are Byte values from zero + to 100"n"nThe percentage represents the maximum tolerated + percentage of partitions that can be unhealthy before the service + is considered in error."nIf the percentage is respected but there + is at least one unhealthy partition, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy partitions over the total number of partitions in the + service."nThe computation rounds up to tolerate one failure on + small numbers of partitions. Default percentage is zero. + "MaxPercentUnhealthyReplicasPerPartition": 0, + # Optional. The maximum allowed percentage of unhealthy replicas + per partition. Allowed values are Byte values from zero to + 100."n"nThe percentage represents the maximum tolerated + percentage of replicas that can be unhealthy before the partition + is considered in error."nIf the percentage is respected but there + is at least one unhealthy replica, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of + unhealthy replicas over the total number of replicas in the + partition."nThe computation rounds up to tolerate one failure on + small numbers of replicas. Default percentage is zero. + "MaxPercentUnhealthyServices": 0 # Optional. + The maximum allowed percentage of unhealthy services. Allowed + values are Byte values from zero to 100."n"nThe percentage + represents the maximum tolerated percentage of services that can + be unhealthy before the application is considered in error."nIf + the percentage is respected but there is at least one unhealthy + service, the health is evaluated as Warning."nThis is calculated + by dividing the number of unhealthy services of the specific + service type over the total number of services of the specific + service type."nThe computation rounds up to tolerate one failure + on small numbers of services. Default percentage is zero. + } + } + ] + }, + "ComposeFileContent": "str", # Required. The content of the compose file + that describes the deployment to create. + "DeploymentName": "str", # Required. The name of the deployment. + "ForceRestart": bool, # Optional. If true, then processes are forcefully + restarted during upgrade even when the code version has not changed (the upgrade + only changes configuration or data). + "MonitoringPolicy": { + "FailureAction": "str", # Optional. The compensating action to + perform when a Monitored upgrade encounters monitoring policy or health + policy violations."nInvalid indicates the failure action is invalid. Rollback + specifies that the upgrade will start rolling back automatically."nManual + indicates that the upgrade will switch to UnmonitoredManual upgrade mode. + Known values are: "Invalid", "Rollback", "Manual". + "HealthCheckRetryTimeoutInMilliseconds": "PT0H10M0S", # Optional. + Default value is "PT0H10M0S". The amount of time to retry health evaluation + when the application or cluster is unhealthy before FailureAction is + executed. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckStableDurationInMilliseconds": "PT0H2M0S", # Optional. + Default value is "PT0H2M0S". The amount of time that the application or + cluster must remain healthy before the upgrade proceeds to the next upgrade + domain. It is first interpreted as a string representing an ISO 8601 + duration. If that fails, then it is interpreted as a number representing the + total number of milliseconds. + "HealthCheckWaitDurationInMilliseconds": "0", # Optional. Default + value is "0". The amount of time to wait after completing an upgrade domain + before applying health policies. It is first interpreted as a string + representing an ISO 8601 duration. If that fails, then it is interpreted as a + number representing the total number of milliseconds. + "UpgradeDomainTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S", + # Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of + time each upgrade domain has to complete before FailureAction is executed. It + is first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + "UpgradeTimeoutInMilliseconds": "P10675199DT02H48M05.4775807S" # + Optional. Default value is "P10675199DT02H48M05.4775807S". The amount of time + the overall upgrade has to complete before FailureAction is executed. It is + first interpreted as a string representing an ISO 8601 duration. If that + fails, then it is interpreted as a number representing the total number of + milliseconds. + }, + "RegistryCredential": { + "PasswordEncrypted": bool, # Optional. Indicates that supplied + container registry password is encrypted. + "RegistryPassword": "str", # Optional. The password for supplied + username to connect to container registry. + "RegistryUserName": "str" # Optional. The user name to connect to + container registry. + }, + "RollingUpgradeMode": "UnmonitoredAuto", # Optional. Default value is + "UnmonitoredAuto". The mode used to monitor health during a rolling upgrade. The + values are UnmonitoredAuto, UnmonitoredManual, Monitored, and + UnmonitoredDeferred. Known values are: "Invalid", "UnmonitoredAuto", + "UnmonitoredManual", "Monitored", "UnmonitoredDeferred". Default value: + "UnmonitoredAuto". + "UpgradeKind": "Rolling", # Default value is "Rolling". Required. The kind + of upgrade out of the following possible values. Known values are: "Invalid", + "Rolling". Default value: "Rolling". + "UpgradeReplicaSetCheckTimeoutInSeconds": 42949672925 # Optional. Default + value is 42949672925. The maximum amount of time to block processing of an + upgrade domain and prevent loss of availability when there are unexpected issues. + When this timeout expires, processing of the upgrade domain will proceed + regardless of availability loss issues. The timeout is reset at the start of each + upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + 32-bit integer). + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0-preview")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = compose_deployment_upgrade_description + + request = build_start_compose_deployment_upgrade_request( + deployment_name=deployment_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def start_rollback_compose_deployment_upgrade( # pylint: disable=inconsistent-return-statements + self, + deployment_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts rolling back a compose deployment upgrade in the Service Fabric cluster. + + Rollback a service fabric compose deployment upgrade. + + :param deployment_name: The identity of the deployment. + :type deployment_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4-preview")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_start_rollback_compose_deployment_upgrade_request( + deployment_name=deployment_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_chaos( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the status of Chaos. + + Get the status of Chaos indicating whether or not Chaos is running, the Chaos parameters used + for running Chaos and the status of the Chaos Schedule. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ChaosParameters": { + "ChaosTargetFilter": { + "ApplicationInclusionList": [ + "str" # Optional. A list of application URIs to + include in Chaos faults."nAll replicas belonging to services of these + applications are amenable to replica faults (restart replica, remove + replica, move primary, and move secondary) by Chaos."nChaos may + restart a code package only if the code package hosts replicas of + these applications only."nIf an application does not appear in this + list, it can still be faulted in some Chaos iteration if the + application ends up on a node of a node type that is included in + NodeTypeInclusionList."nHowever, if applicationX is tied to nodeTypeY + through placement constraints and applicationX is absent from + ApplicationInclusionList and nodeTypeY is absent from + NodeTypeInclusionList, then applicationX will never be faulted."nAt + most 1000 application names can be included in this list, to increase + this number, a config upgrade is required for + MaxNumberOfApplicationsInChaosEntityFilter configuration. + ], + "NodeTypeInclusionList": [ + "str" # Optional. A list of node types to include in + Chaos faults."nAll types of faults (restart node, restart code + package, remove replica, restart replica, move primary, and move + secondary) are enabled for the nodes of these node types."nIf a node + type (say NodeTypeX) does not appear in the NodeTypeInclusionList, + then node level faults (like NodeRestart) will never be enabled for + the nodes of"nNodeTypeX, but code package and replica faults can + still be enabled for NodeTypeX if an application in the + ApplicationInclusionList."nhappens to reside on a node of + NodeTypeX."nAt most 100 node type names can be included in this list, + to increase this number, a config upgrade is required for + MaxNumberOfNodeTypesInChaosEntityFilter configuration. + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the + application type health policy map item. This is the name of the + application type. + "Value": 0 # Required. The value of the + application type health policy map item."nThe max percent + unhealthy applications allowed for the application type. Must be + between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates + whether warnings are treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The + maximum allowed percentage of unhealthy applications before reporting an + error. For example, to allow 10% of applications to be unhealthy, this + value would be 10."n"nThe percentage represents the maximum tolerated + percentage of applications that can be unhealthy before the cluster is + considered in error."nIf the percentage is respected but there is at + least one unhealthy application, the health is evaluated as + Warning."nThis is calculated by dividing the number of unhealthy + applications over the total number of application instances in the + cluster, excluding applications of application types that are included in + the ApplicationTypeHealthPolicyMap."nThe computation rounds up to + tolerate one failure on small numbers of applications. Default percentage + is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum + allowed percentage of unhealthy nodes before reporting an error. For + example, to allow 10% of nodes to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated percentage of + nodes that can be unhealthy before the cluster is considered in + error."nIf the percentage is respected but there is at least one + unhealthy node, the health is evaluated as Warning."nThe percentage is + calculated by dividing the number of unhealthy nodes over the total + number of nodes in the cluster."nThe computation rounds up to tolerate + one failure on small numbers of nodes. Default percentage is zero."n"nIn + large clusters, some nodes will always be down or out for repairs, so + this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the + node type health policy map item. This is the name of the node + type. + "Value": 0 # Required. The value of the node + type health policy map item."nIf the percentage is respected but + there is at least one unhealthy node in the node type, the health + is evaluated as Warning. "nThe percentage is calculated by + dividing the number of unhealthy nodes over the total number of + nodes in the node type. "nThe computation rounds up to tolerate + one failure on small numbers of nodes."nThe max percent unhealthy + nodes allowed for the node type. Must be between zero and 100. + } + ] + }, + "Context": { + "Map": { + "str": "str" # Optional. Describes a map that + contains a collection of ChaosContextMapItem's. + } + }, + "EnableMoveReplicaFaults": True, # Optional. Default value is True. + Enables or disables the move primary and move secondary faults. + "MaxClusterStabilizationTimeoutInSeconds": 60, # Optional. Default + value is 60. The maximum amount of time to wait for all cluster entities to + become stable and healthy. Chaos executes in iterations and at the start of + each iteration it validates the health of cluster entities."nDuring + validation if a cluster entity is not stable and healthy within + MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed + event. + "MaxConcurrentFaults": 1, # Optional. Default value is 1. + MaxConcurrentFaults is the maximum number of concurrent faults induced per + iteration."nChaos executes in iterations and two consecutive iterations are + separated by a validation phase."nThe higher the concurrency, the more + aggressive the injection of faults, leading to inducing more complex series + of states to uncover bugs."nThe recommendation is to start with a value of 2 + or 3 and to exercise caution while moving up. + "TimeToRunInSeconds": "4294967295", # Optional. Default value is + "4294967295". Total time (in seconds) for which Chaos will run before + automatically stopping. The maximum allowed value is 4,294,967,295 + (System.UInt32.MaxValue). + "WaitTimeBetweenFaultsInSeconds": 20, # Optional. Default value is + 20. Wait time (in seconds) between consecutive faults within a single + iteration."nThe larger the value, the lower the overlapping between faults + and the simpler the sequence of state transitions that the cluster goes + through."nThe recommendation is to start with a value between 1 and 5 and + exercise caution while moving up. + "WaitTimeBetweenIterationsInSeconds": 30 # Optional. Default value + is 30. Time-separation (in seconds) between two consecutive iterations of + Chaos."nThe larger the value, the lower the fault injection rate. + }, + "ScheduleStatus": "str", # Optional. Current status of the schedule. Known + values are: "Invalid", "Stopped", "Active", "Expired", "Pending". + "Status": "str" # Optional. Current status of the Chaos run. Known values + are: "Invalid", "Running", "Stopped". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_chaos_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def start_chaos( # pylint: disable=inconsistent-return-statements + self, + chaos_parameters: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts Chaos in the cluster. + + If Chaos is not already running in the cluster, it starts Chaos with the passed in Chaos + parameters. + If Chaos is already running when this call is made, the call fails with the error code + FABRIC_E_CHAOS_ALREADY_RUNNING. + Refer to the article `Induce controlled Chaos in Service Fabric clusters + `_ for more + details. + + :param chaos_parameters: Describes all the parameters to configure a Chaos run. + :type chaos_parameters: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + chaos_parameters = { + "ChaosTargetFilter": { + "ApplicationInclusionList": [ + "str" # Optional. A list of application URIs to include in + Chaos faults."nAll replicas belonging to services of these applications + are amenable to replica faults (restart replica, remove replica, move + primary, and move secondary) by Chaos."nChaos may restart a code package + only if the code package hosts replicas of these applications only."nIf + an application does not appear in this list, it can still be faulted in + some Chaos iteration if the application ends up on a node of a node type + that is included in NodeTypeInclusionList."nHowever, if applicationX is + tied to nodeTypeY through placement constraints and applicationX is + absent from ApplicationInclusionList and nodeTypeY is absent from + NodeTypeInclusionList, then applicationX will never be faulted."nAt most + 1000 application names can be included in this list, to increase this + number, a config upgrade is required for + MaxNumberOfApplicationsInChaosEntityFilter configuration. + ], + "NodeTypeInclusionList": [ + "str" # Optional. A list of node types to include in Chaos + faults."nAll types of faults (restart node, restart code package, remove + replica, restart replica, move primary, and move secondary) are enabled + for the nodes of these node types."nIf a node type (say NodeTypeX) does + not appear in the NodeTypeInclusionList, then node level faults (like + NodeRestart) will never be enabled for the nodes of"nNodeTypeX, but code + package and replica faults can still be enabled for NodeTypeX if an + application in the ApplicationInclusionList."nhappens to reside on a node + of NodeTypeX."nAt most 100 node type names can be included in this list, + to increase this number, a config upgrade is required for + MaxNumberOfNodeTypesInChaosEntityFilter configuration. + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the application + type health policy map item. This is the name of the application + type. + "Value": 0 # Required. The value of the application + type health policy map item."nThe max percent unhealthy applications + allowed for the application type. Must be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # Optional. Indicates whether + warnings are treated with the same severity as errors. + "MaxPercentUnhealthyApplications": 0, # Optional. The maximum + allowed percentage of unhealthy applications before reporting an error. For + example, to allow 10% of applications to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated percentage of + applications that can be unhealthy before the cluster is considered in + error."nIf the percentage is respected but there is at least one unhealthy + application, the health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy applications over the total number of + application instances in the cluster, excluding applications of application + types that are included in the ApplicationTypeHealthPolicyMap."nThe + computation rounds up to tolerate one failure on small numbers of + applications. Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # Optional. The maximum allowed + percentage of unhealthy nodes before reporting an error. For example, to + allow 10% of nodes to be unhealthy, this value would be 10."n"nThe percentage + represents the maximum tolerated percentage of nodes that can be unhealthy + before the cluster is considered in error."nIf the percentage is respected + but there is at least one unhealthy node, the health is evaluated as + Warning."nThe percentage is calculated by dividing the number of unhealthy + nodes over the total number of nodes in the cluster."nThe computation rounds + up to tolerate one failure on small numbers of nodes. Default percentage is + zero."n"nIn large clusters, some nodes will always be down or out for + repairs, so this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # Required. The key of the node type + health policy map item. This is the name of the node type. + "Value": 0 # Required. The value of the node type + health policy map item."nIf the percentage is respected but there is + at least one unhealthy node in the node type, the health is evaluated + as Warning. "nThe percentage is calculated by dividing the number of + unhealthy nodes over the total number of nodes in the node type. + "nThe computation rounds up to tolerate one failure on small numbers + of nodes."nThe max percent unhealthy nodes allowed for the node type. + Must be between zero and 100. + } + ] + }, + "Context": { + "Map": { + "str": "str" # Optional. Describes a map that contains a + collection of ChaosContextMapItem's. + } + }, + "EnableMoveReplicaFaults": True, # Optional. Default value is True. Enables + or disables the move primary and move secondary faults. + "MaxClusterStabilizationTimeoutInSeconds": 60, # Optional. Default value is + 60. The maximum amount of time to wait for all cluster entities to become stable + and healthy. Chaos executes in iterations and at the start of each iteration it + validates the health of cluster entities."nDuring validation if a cluster entity + is not stable and healthy within MaxClusterStabilizationTimeoutInSeconds, Chaos + generates a validation failed event. + "MaxConcurrentFaults": 1, # Optional. Default value is 1. + MaxConcurrentFaults is the maximum number of concurrent faults induced per + iteration."nChaos executes in iterations and two consecutive iterations are + separated by a validation phase."nThe higher the concurrency, the more aggressive + the injection of faults, leading to inducing more complex series of states to + uncover bugs."nThe recommendation is to start with a value of 2 or 3 and to + exercise caution while moving up. + "TimeToRunInSeconds": "4294967295", # Optional. Default value is + "4294967295". Total time (in seconds) for which Chaos will run before + automatically stopping. The maximum allowed value is 4,294,967,295 + (System.UInt32.MaxValue). + "WaitTimeBetweenFaultsInSeconds": 20, # Optional. Default value is 20. Wait + time (in seconds) between consecutive faults within a single iteration."nThe + larger the value, the lower the overlapping between faults and the simpler the + sequence of state transitions that the cluster goes through."nThe recommendation + is to start with a value between 1 and 5 and exercise caution while moving up. + "WaitTimeBetweenIterationsInSeconds": 30 # Optional. Default value is 30. + Time-separation (in seconds) between two consecutive iterations of Chaos."nThe + larger the value, the lower the fault injection rate. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = chaos_parameters + + request = build_start_chaos_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def stop_chaos( # pylint: disable=inconsistent-return-statements + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Stops Chaos if it is running in the cluster and put the Chaos Schedule in a stopped state. + + Stops Chaos from executing new faults. In-flight faults will continue to execute until they are + complete. The current Chaos Schedule is put into a stopped state. + Once a schedule is stopped, it will stay in the stopped state and not be used to Chaos Schedule + new runs of Chaos. A new Chaos Schedule must be set in order to resume scheduling. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_stop_chaos_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_chaos_events( + self, + *, + continuation_token_parameter: Optional[str] = None, + start_time_utc: Optional[str] = None, + end_time_utc: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the next segment of the Chaos events based on the continuation token or the time range. + + To get the next segment of the Chaos events, you can specify the ContinuationToken. To get the + start of a new segment of Chaos events, you can specify the time range + through StartTimeUtc and EndTimeUtc. You cannot specify both the ContinuationToken and the time + range in the same call. + When there are more than 100 Chaos events, the Chaos events are returned in multiple segments + where a segment contains no more than 100 Chaos events and to get the next segment you make a + call to this API with the continuation token. + + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword start_time_utc: The Windows file time representing the start time of the time range + for which a Chaos report is to be generated. Consult `DateTime.ToFileTimeUtc Method + `_.aspx) for + details. Default value is None. + :paramtype start_time_utc: str + :keyword end_time_utc: The Windows file time representing the end time of the time range for + which a Chaos report is to be generated. Consult `DateTime.ToFileTimeUtc Method + `_.aspx) for + details. Default value is None. + :paramtype end_time_utc: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "History": [ + { + "ChaosEvent": { + "TimeStampUtc": "2020-02-20 00:00:00", # Required. + The UTC timestamp when this Chaos event was generated. + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_chaos_events_request( + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_chaos_schedule( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """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. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Schedule": { + "ChaosParametersDictionary": [ + { + "Key": "str", # Required. The key identifying the + Chaos Parameter in the dictionary. This key is referenced by Chaos + Schedule Jobs. + "Value": { + "ChaosTargetFilter": { + "ApplicationInclusionList": [ + "str" # Optional. A list of + application URIs to include in Chaos faults."nAll + replicas belonging to services of these applications are + amenable to replica faults (restart replica, remove + replica, move primary, and move secondary) by + Chaos."nChaos may restart a code package only if the code + package hosts replicas of these applications only."nIf an + application does not appear in this list, it can still be + faulted in some Chaos iteration if the application ends + up on a node of a node type that is included in + NodeTypeInclusionList."nHowever, if applicationX is tied + to nodeTypeY through placement constraints and + applicationX is absent from ApplicationInclusionList and + nodeTypeY is absent from NodeTypeInclusionList, then + applicationX will never be faulted."nAt most 1000 + application names can be included in this list, to + increase this number, a config upgrade is required for + MaxNumberOfApplicationsInChaosEntityFilter configuration. + ], + "NodeTypeInclusionList": [ + "str" # Optional. A list of + node types to include in Chaos faults."nAll types of + faults (restart node, restart code package, remove + replica, restart replica, move primary, and move + secondary) are enabled for the nodes of these node + types."nIf a node type (say NodeTypeX) does not appear in + the NodeTypeInclusionList, then node level faults (like + NodeRestart) will never be enabled for the nodes + of"nNodeTypeX, but code package and replica faults can + still be enabled for NodeTypeX if an application in the + ApplicationInclusionList."nhappens to reside on a node of + NodeTypeX."nAt most 100 node type names can be included + in this list, to increase this number, a config upgrade + is required for MaxNumberOfNodeTypesInChaosEntityFilter + configuration. + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # + Required. The key of the application type health + policy map item. This is the name of the application + type. + "Value": 0 # + Required. The value of the application type health + policy map item."nThe max percent unhealthy + applications allowed for the application type. Must + be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # + Optional. Indicates whether warnings are treated with the + same severity as errors. + "MaxPercentUnhealthyApplications": 0, + # Optional. The maximum allowed percentage of unhealthy + applications before reporting an error. For example, to allow + 10% of applications to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated + percentage of applications that can be unhealthy before the + cluster is considered in error."nIf the percentage is + respected but there is at least one unhealthy application, + the health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy applications over the total + number of application instances in the cluster, excluding + applications of application types that are included in the + ApplicationTypeHealthPolicyMap."nThe computation rounds up to + tolerate one failure on small numbers of applications. + Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # + Optional. The maximum allowed percentage of unhealthy nodes + before reporting an error. For example, to allow 10% of nodes + to be unhealthy, this value would be 10."n"nThe percentage + represents the maximum tolerated percentage of nodes that can + be unhealthy before the cluster is considered in error."nIf + the percentage is respected but there is at least one + unhealthy node, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy + nodes over the total number of nodes in the cluster."nThe + computation rounds up to tolerate one failure on small + numbers of nodes. Default percentage is zero."n"nIn large + clusters, some nodes will always be down or out for repairs, + so this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # + Required. The key of the node type health policy map + item. This is the name of the node type. + "Value": 0 # + Required. The value of the node type health policy + map item."nIf the percentage is respected but there + is at least one unhealthy node in the node type, the + health is evaluated as Warning. "nThe percentage is + calculated by dividing the number of unhealthy nodes + over the total number of nodes in the node type. + "nThe computation rounds up to tolerate one failure + on small numbers of nodes."nThe max percent unhealthy + nodes allowed for the node type. Must be between zero + and 100. + } + ] + }, + "Context": { + "Map": { + "str": "str" # Optional. + Describes a map that contains a collection of + ChaosContextMapItem's. + } + }, + "EnableMoveReplicaFaults": True, # Optional. + Default value is True. Enables or disables the move primary and + move secondary faults. + "MaxClusterStabilizationTimeoutInSeconds": + 60, # Optional. Default value is 60. The maximum amount of time + to wait for all cluster entities to become stable and healthy. + Chaos executes in iterations and at the start of each iteration + it validates the health of cluster entities."nDuring validation + if a cluster entity is not stable and healthy within + MaxClusterStabilizationTimeoutInSeconds, Chaos generates a + validation failed event. + "MaxConcurrentFaults": 1, # Optional. + Default value is 1. MaxConcurrentFaults is the maximum number of + concurrent faults induced per iteration."nChaos executes in + iterations and two consecutive iterations are separated by a + validation phase."nThe higher the concurrency, the more + aggressive the injection of faults, leading to inducing more + complex series of states to uncover bugs."nThe recommendation is + to start with a value of 2 or 3 and to exercise caution while + moving up. + "TimeToRunInSeconds": "4294967295", # + Optional. Default value is "4294967295". Total time (in seconds) + for which Chaos will run before automatically stopping. The + maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue). + "WaitTimeBetweenFaultsInSeconds": 20, # + Optional. Default value is 20. Wait time (in seconds) between + consecutive faults within a single iteration."nThe larger the + value, the lower the overlapping between faults and the simpler + the sequence of state transitions that the cluster goes + through."nThe recommendation is to start with a value between 1 + and 5 and exercise caution while moving up. + "WaitTimeBetweenIterationsInSeconds": 30 # + Optional. Default value is 30. Time-separation (in seconds) + between two consecutive iterations of Chaos."nThe larger the + value, the lower the fault injection rate. + } + } + ], + "ExpiryDate": "9999-12-31T23:59:59.999Z", # Optional. Default value + is "9999-12-31T23:59:59.999Z". The date and time Chaos will continue to use + this schedule until. + "Jobs": [ + { + "ChaosParameters": "str", # Optional. A reference to + which Chaos Parameters of the Chaos Schedule to use. + "Days": { + "Friday": bool, # Optional. Indicates if the + Chaos Schedule Job will run on Friday. + "Monday": bool, # Optional. Indicates if the + Chaos Schedule Job will run on Monday. + "Saturday": bool, # Optional. Indicates if + the Chaos Schedule Job will run on Saturday. + "Sunday": bool, # Optional. Indicates if the + Chaos Schedule Job will run on Sunday. + "Thursday": bool, # Optional. Indicates if + the Chaos Schedule Job will run on Thursday. + "Tuesday": bool, # Optional. Indicates if + the Chaos Schedule Job will run on Tuesday. + "Wednesday": bool # Optional. Indicates if + the Chaos Schedule Job will run on Wednesday. + }, + "Times": [ + { + "EndTime": { + "Hour": 0, # Optional. + Represents the hour of the day. Value must be between 0 + and 23 inclusive. + "Minute": 0 # Optional. + Represents the minute of the hour. Value must be between + 0 to 59 inclusive. + }, + "StartTime": { + "Hour": 0, # Optional. + Represents the hour of the day. Value must be between 0 + and 23 inclusive. + "Minute": 0 # Optional. + Represents the minute of the hour. Value must be between + 0 to 59 inclusive. + } + } + ] + } + ], + "StartDate": "1601-01-01T00:00:00Z" # Optional. Default value is + "1601-01-01T00:00:00Z". The date and time Chaos will start using this + schedule. + }, + "Version": 0 # Optional. The version number of the Schedule. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_chaos_schedule_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def post_chaos_schedule( # pylint: disable=inconsistent-return-statements + self, + chaos_schedule: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Set the schedule used by Chaos. + + Chaos will automatically schedule runs based on the Chaos Schedule. + The Chaos Schedule will be updated if the provided version matches the version on the server. + When updating the Chaos Schedule, the version on the server is incremented by 1. + The version on the server will wrap back to 0 after reaching a large number. + If Chaos is running when this call is made, the call will fail. + + :param chaos_schedule: Describes the schedule used by Chaos. + :type chaos_schedule: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + chaos_schedule = { + "Schedule": { + "ChaosParametersDictionary": [ + { + "Key": "str", # Required. The key identifying the + Chaos Parameter in the dictionary. This key is referenced by Chaos + Schedule Jobs. + "Value": { + "ChaosTargetFilter": { + "ApplicationInclusionList": [ + "str" # Optional. A list of + application URIs to include in Chaos faults."nAll + replicas belonging to services of these applications are + amenable to replica faults (restart replica, remove + replica, move primary, and move secondary) by + Chaos."nChaos may restart a code package only if the code + package hosts replicas of these applications only."nIf an + application does not appear in this list, it can still be + faulted in some Chaos iteration if the application ends + up on a node of a node type that is included in + NodeTypeInclusionList."nHowever, if applicationX is tied + to nodeTypeY through placement constraints and + applicationX is absent from ApplicationInclusionList and + nodeTypeY is absent from NodeTypeInclusionList, then + applicationX will never be faulted."nAt most 1000 + application names can be included in this list, to + increase this number, a config upgrade is required for + MaxNumberOfApplicationsInChaosEntityFilter configuration. + ], + "NodeTypeInclusionList": [ + "str" # Optional. A list of + node types to include in Chaos faults."nAll types of + faults (restart node, restart code package, remove + replica, restart replica, move primary, and move + secondary) are enabled for the nodes of these node + types."nIf a node type (say NodeTypeX) does not appear in + the NodeTypeInclusionList, then node level faults (like + NodeRestart) will never be enabled for the nodes + of"nNodeTypeX, but code package and replica faults can + still be enabled for NodeTypeX if an application in the + ApplicationInclusionList."nhappens to reside on a node of + NodeTypeX."nAt most 100 node type names can be included + in this list, to increase this number, a config upgrade + is required for MaxNumberOfNodeTypesInChaosEntityFilter + configuration. + ] + }, + "ClusterHealthPolicy": { + "ApplicationTypeHealthPolicyMap": [ + { + "Key": "str", # + Required. The key of the application type health + policy map item. This is the name of the application + type. + "Value": 0 # + Required. The value of the application type health + policy map item."nThe max percent unhealthy + applications allowed for the application type. Must + be between zero and 100. + } + ], + "ConsiderWarningAsError": bool, # + Optional. Indicates whether warnings are treated with the + same severity as errors. + "MaxPercentUnhealthyApplications": 0, + # Optional. The maximum allowed percentage of unhealthy + applications before reporting an error. For example, to allow + 10% of applications to be unhealthy, this value would be + 10."n"nThe percentage represents the maximum tolerated + percentage of applications that can be unhealthy before the + cluster is considered in error."nIf the percentage is + respected but there is at least one unhealthy application, + the health is evaluated as Warning."nThis is calculated by + dividing the number of unhealthy applications over the total + number of application instances in the cluster, excluding + applications of application types that are included in the + ApplicationTypeHealthPolicyMap."nThe computation rounds up to + tolerate one failure on small numbers of applications. + Default percentage is zero. + "MaxPercentUnhealthyNodes": 0, # + Optional. The maximum allowed percentage of unhealthy nodes + before reporting an error. For example, to allow 10% of nodes + to be unhealthy, this value would be 10."n"nThe percentage + represents the maximum tolerated percentage of nodes that can + be unhealthy before the cluster is considered in error."nIf + the percentage is respected but there is at least one + unhealthy node, the health is evaluated as Warning."nThe + percentage is calculated by dividing the number of unhealthy + nodes over the total number of nodes in the cluster."nThe + computation rounds up to tolerate one failure on small + numbers of nodes. Default percentage is zero."n"nIn large + clusters, some nodes will always be down or out for repairs, + so this percentage should be configured to tolerate that. + "NodeTypeHealthPolicyMap": [ + { + "Key": "str", # + Required. The key of the node type health policy map + item. This is the name of the node type. + "Value": 0 # + Required. The value of the node type health policy + map item."nIf the percentage is respected but there + is at least one unhealthy node in the node type, the + health is evaluated as Warning. "nThe percentage is + calculated by dividing the number of unhealthy nodes + over the total number of nodes in the node type. + "nThe computation rounds up to tolerate one failure + on small numbers of nodes."nThe max percent unhealthy + nodes allowed for the node type. Must be between zero + and 100. + } + ] + }, + "Context": { + "Map": { + "str": "str" # Optional. + Describes a map that contains a collection of + ChaosContextMapItem's. + } + }, + "EnableMoveReplicaFaults": True, # Optional. + Default value is True. Enables or disables the move primary and + move secondary faults. + "MaxClusterStabilizationTimeoutInSeconds": + 60, # Optional. Default value is 60. The maximum amount of time + to wait for all cluster entities to become stable and healthy. + Chaos executes in iterations and at the start of each iteration + it validates the health of cluster entities."nDuring validation + if a cluster entity is not stable and healthy within + MaxClusterStabilizationTimeoutInSeconds, Chaos generates a + validation failed event. + "MaxConcurrentFaults": 1, # Optional. + Default value is 1. MaxConcurrentFaults is the maximum number of + concurrent faults induced per iteration."nChaos executes in + iterations and two consecutive iterations are separated by a + validation phase."nThe higher the concurrency, the more + aggressive the injection of faults, leading to inducing more + complex series of states to uncover bugs."nThe recommendation is + to start with a value of 2 or 3 and to exercise caution while + moving up. + "TimeToRunInSeconds": "4294967295", # + Optional. Default value is "4294967295". Total time (in seconds) + for which Chaos will run before automatically stopping. The + maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue). + "WaitTimeBetweenFaultsInSeconds": 20, # + Optional. Default value is 20. Wait time (in seconds) between + consecutive faults within a single iteration."nThe larger the + value, the lower the overlapping between faults and the simpler + the sequence of state transitions that the cluster goes + through."nThe recommendation is to start with a value between 1 + and 5 and exercise caution while moving up. + "WaitTimeBetweenIterationsInSeconds": 30 # + Optional. Default value is 30. Time-separation (in seconds) + between two consecutive iterations of Chaos."nThe larger the + value, the lower the fault injection rate. + } + } + ], + "ExpiryDate": "9999-12-31T23:59:59.999Z", # Optional. Default value + is "9999-12-31T23:59:59.999Z". The date and time Chaos will continue to use + this schedule until. + "Jobs": [ + { + "ChaosParameters": "str", # Optional. A reference to + which Chaos Parameters of the Chaos Schedule to use. + "Days": { + "Friday": bool, # Optional. Indicates if the + Chaos Schedule Job will run on Friday. + "Monday": bool, # Optional. Indicates if the + Chaos Schedule Job will run on Monday. + "Saturday": bool, # Optional. Indicates if + the Chaos Schedule Job will run on Saturday. + "Sunday": bool, # Optional. Indicates if the + Chaos Schedule Job will run on Sunday. + "Thursday": bool, # Optional. Indicates if + the Chaos Schedule Job will run on Thursday. + "Tuesday": bool, # Optional. Indicates if + the Chaos Schedule Job will run on Tuesday. + "Wednesday": bool # Optional. Indicates if + the Chaos Schedule Job will run on Wednesday. + }, + "Times": [ + { + "EndTime": { + "Hour": 0, # Optional. + Represents the hour of the day. Value must be between 0 + and 23 inclusive. + "Minute": 0 # Optional. + Represents the minute of the hour. Value must be between + 0 to 59 inclusive. + }, + "StartTime": { + "Hour": 0, # Optional. + Represents the hour of the day. Value must be between 0 + and 23 inclusive. + "Minute": 0 # Optional. + Represents the minute of the hour. Value must be between + 0 to 59 inclusive. + } + } + ] + } + ], + "StartDate": "1601-01-01T00:00:00Z" # Optional. Default value is + "1601-01-01T00:00:00Z". The date and time Chaos will start using this + schedule. + }, + "Version": 0 # Optional. The version number of the Schedule. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = chaos_schedule + + request = build_post_chaos_schedule_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def upload_file( # pylint: disable=inconsistent-return-statements + self, + content_path: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Uploads contents of the file to the image store. + + Uploads contents of the file to the image store. Use this API if the file is small enough to + upload again if the connection fails. The file's data needs to be added to the request body. + The contents will be uploaded to the specified path. Image store service uses a mark file to + indicate the availability of the folder. The mark file is an empty file named "_.dir". The mark + file is generated by the image store service when all files in a folder are uploaded. When + using File-by-File approach to upload application package in REST, the image store service + isn't aware of the file hierarchy of the application package; you need to create a mark file + per folder and upload it last, to let the image store service know that the folder is complete. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_upload_file_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_image_store_content( + self, + content_path: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the image store content information. + + Returns the information about the image store content at the specified contentPath. The + contentPath is relative to the root of the image store. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.2". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "StoreFiles": [ + { + "FileSize": "str", # Optional. The size of file in bytes. + "FileVersion": { + "EpochConfigurationNumber": "str", # Optional. The + epoch configuration version number of the image store replica when + this file entry was created or updated. + "EpochDataLossNumber": "str", # Optional. The epoch + data loss number of image store replica when this file entry was + updated or created. + "VersionNumber": "str" # Optional. The current image + store version number for the file is used in image store for checking + whether it need to be updated. + }, + "ModifiedDate": "2020-02-20 00:00:00", # Optional. The date + and time when the image store file was last modified. + "StoreRelativePath": "str" # Optional. The file path + relative to the image store root path. + } + ], + "StoreFolders": [ + { + "FileCount": "str", # Optional. The number of files from + within the image store folder. + "StoreRelativePath": "str" # Optional. The remote location + within image store. This path is relative to the image store root. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_image_store_content_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def delete_image_store_content( # pylint: disable=inconsistent-return-statements + self, + content_path: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes existing image store content. + + Deletes existing image store content being found within the given image store relative path. + This command can be used to delete uploaded application packages once they are provisioned. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_delete_image_store_content_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_image_store_root_content( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the content information at the root of the image store. + + Returns the information about the image store content at the root of the image store. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "StoreFiles": [ + { + "FileSize": "str", # Optional. The size of file in bytes. + "FileVersion": { + "EpochConfigurationNumber": "str", # Optional. The + epoch configuration version number of the image store replica when + this file entry was created or updated. + "EpochDataLossNumber": "str", # Optional. The epoch + data loss number of image store replica when this file entry was + updated or created. + "VersionNumber": "str" # Optional. The current image + store version number for the file is used in image store for checking + whether it need to be updated. + }, + "ModifiedDate": "2020-02-20 00:00:00", # Optional. The date + and time when the image store file was last modified. + "StoreRelativePath": "str" # Optional. The file path + relative to the image store root path. + } + ], + "StoreFolders": [ + { + "FileCount": "str", # Optional. The number of files from + within the image store folder. + "StoreRelativePath": "str" # Optional. The remote location + within image store. This path is relative to the image store root. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_image_store_root_content_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def copy_image_store_content( # pylint: disable=inconsistent-return-statements + self, + image_store_copy_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Copies image store content internally. + + Copies the image store content from the source image store relative path to the destination + image store relative path. + + :param image_store_copy_description: Describes the copy description for the image store. + :type image_store_copy_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + image_store_copy_description = { + "CheckMarkFile": bool, # Optional. Indicates whether to check mark file + during copying. The property is true if checking mark file is required, false + otherwise. The mark file is used to check whether the folder is well constructed. + If the property is true and mark file does not exist, the copy is skipped. + "RemoteDestination": "str", # Required. The relative path of destination + image store content to be copied to. + "RemoteSource": "str", # Required. The relative path of source image store + content to be copied from. + "SkipFiles": [ + "str" # Optional. The list of the file names to be skipped for + copying. + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = image_store_copy_description + + request = build_copy_image_store_content_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def delete_image_store_upload_session( # pylint: disable=inconsistent-return-statements + self, + *, + session_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Cancels an image store upload session. + + The DELETE request will cause the existing upload session to expire and remove any previously + uploaded file chunks. + + :keyword session_id: A GUID generated by the user for a file uploading. It identifies an image + store upload session which keeps track of all file chunks until it is committed. + :paramtype session_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_delete_image_store_upload_session_request( + api_version=api_version, + session_id=session_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def commit_image_store_upload_session( # pylint: disable=inconsistent-return-statements + self, + *, + session_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Commit an image store upload session. + + When all file chunks have been uploaded, the upload session needs to be committed explicitly to + complete the upload. Image store preserves the upload session until the expiration time, which + is 30 minutes after the last chunk received. + + :keyword session_id: A GUID generated by the user for a file uploading. It identifies an image + store upload session which keeps track of all file chunks until it is committed. + :paramtype session_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_commit_image_store_upload_session_request( + api_version=api_version, + session_id=session_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_image_store_upload_session_by_id( + self, + *, + session_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the image store upload session by ID. + + Gets the image store upload session identified by the given ID. User can query the upload + session at any time during uploading. + + :keyword session_id: A GUID generated by the user for a file uploading. It identifies an image + store upload session which keeps track of all file chunks until it is committed. + :paramtype session_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "UploadSessions": [ + { + "ExpectedRanges": [ + { + "EndPosition": "str", # Optional. The end + position of the portion of the file. It's represented by the + number of bytes. + "StartPosition": "str" # Optional. The start + position of the portion of the file. It's represented by the + number of bytes. + } + ], + "FileSize": "str", # Optional. The size in bytes of the + uploading file. + "ModifiedDate": "2020-02-20 00:00:00", # Optional. The date + and time when the upload session was last modified. + "SessionId": str, # Optional. A unique ID of the upload + session. A session ID can be reused only if the session was committed or + removed. + "StoreRelativePath": "str" # Optional. The remote location + within image store. This path is relative to the image store root. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_image_store_upload_session_by_id_request( + api_version=api_version, + session_id=session_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_image_store_upload_session_by_path( + self, + content_path: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the image store upload session by relative path. + + Gets the image store upload session associated with the given image store relative path. User + can query the upload session at any time during uploading. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "UploadSessions": [ + { + "ExpectedRanges": [ + { + "EndPosition": "str", # Optional. The end + position of the portion of the file. It's represented by the + number of bytes. + "StartPosition": "str" # Optional. The start + position of the portion of the file. It's represented by the + number of bytes. + } + ], + "FileSize": "str", # Optional. The size in bytes of the + uploading file. + "ModifiedDate": "2020-02-20 00:00:00", # Optional. The date + and time when the upload session was last modified. + "SessionId": str, # Optional. A unique ID of the upload + session. A session ID can be reused only if the session was committed or + removed. + "StoreRelativePath": "str" # Optional. The remote location + within image store. This path is relative to the image store root. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_image_store_upload_session_by_path_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def upload_file_chunk( # pylint: disable=inconsistent-return-statements + self, + content_path: str, + *, + session_id: str, + content_range: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Uploads a file chunk to the image store relative path. + + Uploads a file chunk to the image store with the specified upload session ID and image store + relative path. This API allows user to resume the file upload operation. user doesn't have to + restart the file upload from scratch whenever there is a network interruption. Use this option + if the file size is large. + + To perform a resumable file upload, user need to break the file into multiple chunks and upload + these chunks to the image store one-by-one. Chunks don't have to be uploaded in order. If the + file represented by the image store relative path already exists, it will be overwritten when + the upload session commits. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :keyword session_id: A GUID generated by the user for a file uploading. It identifies an image + store upload session which keeps track of all file chunks until it is committed. + :paramtype session_id: str + :keyword content_range: When uploading file chunks to the image store, the Content-Range header + field need to be configured and sent with a request. The format should looks like "bytes + {First-Byte-Position}-{Last-Byte-Position}/{File-Length}". For example, Content-Range:bytes + 300-5000/20000 indicates that user is sending bytes 300 through 5,000 and the total file length + is 20,000 bytes. + :paramtype content_range: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_upload_file_chunk_request( + content_path=content_path, + api_version=api_version, + session_id=session_id, + content_range=content_range, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_image_store_root_folder_size( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the folder size at the root of the image store. + + Returns the total size of files at the root and children folders in image store. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.5'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.5". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "FolderSize": "str", # Optional. The size of folder in bytes. + "StoreRelativePath": "str" # Optional. The remote location within image + store. This path is relative to the image store root. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.5")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_image_store_root_folder_size_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_image_store_folder_size( + self, + content_path: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Get the size of a folder in image store. + + Gets the total size of file under a image store folder, specified by contentPath. The + contentPath is relative to the root of the image store. + + :param content_path: Relative path to file or folder in the image store from its root. + :type content_path: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.5'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.5". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "FolderSize": "str", # Optional. The size of folder in bytes. + "StoreRelativePath": "str" # Optional. The remote location within image + store. This path is relative to the image store root. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.5")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_image_store_folder_size_request( + content_path=content_path, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_image_store_info( + self, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the overall ImageStore information. + + Returns information about the primary ImageStore replica, such as disk capacity and available + disk space at the node it is on, and several categories of the ImageStore's file system usage. + + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.5'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.5". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "DiskInfo": { + "AvailableSpace": "str", # Optional. the available disk space in + bytes. + "Capacity": "str" # Optional. the disk size in bytes. + }, + "UsedByCopy": { + "FileCount": "str", # Optional. the number of all files in this + category. + "UsedSpace": "str" # Optional. the size of all files in this + category. + }, + "UsedByMetadata": { + "FileCount": "str", # Optional. the number of all files in this + category. + "UsedSpace": "str" # Optional. the size of all files in this + category. + }, + "UsedByRegister": { + "FileCount": "str", # Optional. the number of all files in this + category. + "UsedSpace": "str" # Optional. the size of all files in this + category. + }, + "UsedByStaging": { + "FileCount": "str", # Optional. the number of all files in this + category. + "UsedSpace": "str" # Optional. the size of all files in this + category. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.5")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_image_store_info_request( + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def invoke_infrastructure_command( + self, + *, + command: str, + service_id: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> str: + """Invokes an administrative command on the given Infrastructure Service instance. + + For clusters that have one or more instances of the Infrastructure Service configured, + this API provides a way to send infrastructure-specific commands to a particular + instance of the Infrastructure Service. + + Available commands and their corresponding response formats vary depending upon + the infrastructure on which the cluster is running. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :keyword command: The text of the command to be invoked. The content of the command is + infrastructure-specific. + :paramtype command: str + :keyword service_id: The identity of the infrastructure service. This is the full name of the + infrastructure service without the 'fabric:' URI scheme. This parameter required only for the + cluster that has more than one instance of infrastructure service running. Default value is + None. + :paramtype service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: str + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[str] + + + request = build_invoke_infrastructure_command_request( + api_version=api_version, + command=command, + service_id=service_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(str, deserialized), {}) + + return cast(str, deserialized) + + + + @distributed_trace + def invoke_infrastructure_query( + self, + *, + command: str, + service_id: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> str: + """Invokes a read-only query on the given infrastructure service instance. + + For clusters that have one or more instances of the Infrastructure Service configured, + this API provides a way to send infrastructure-specific queries to a particular + instance of the Infrastructure Service. + + Available commands and their corresponding response formats vary depending upon + the infrastructure on which the cluster is running. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :keyword command: The text of the command to be invoked. The content of the command is + infrastructure-specific. + :paramtype command: str + :keyword service_id: The identity of the infrastructure service. This is the full name of the + infrastructure service without the 'fabric:' URI scheme. This parameter required only for the + cluster that has more than one instance of infrastructure service running. Default value is + None. + :paramtype service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: str + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[str] + + + request = build_invoke_infrastructure_query_request( + api_version=api_version, + command=command, + service_id=service_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(str, deserialized), {}) + + return cast(str, deserialized) + + + + @distributed_trace + def start_data_loss( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + partition_id: str, + *, + operation_id: str, + data_loss_mode: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """This API will induce data loss for the specified partition. It will trigger a call to the + OnDataLossAsync API of the partition. + + This API will induce data loss for the specified partition. It will trigger a call to the + OnDataLoss API of the partition. + Actual data loss will depend on the specified DataLossMode. + + + * PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is triggered for the + partition but actual data loss depends on the presence of in-flight replication. + * FullDataLoss - All replicas are removed hence all data is lost and OnDataLoss is triggered. + + This API should only be called with a stateful service as the target. + + Calling this API with a system service as the target is not advised. + + Note: Once this API has been called, it cannot be reversed. Calling CancelOperation will only + stop execution and clean up internal system state. + It will not restore data if the command has progressed far enough to cause data loss. + + Call the GetDataLossProgress API with the same OperationId to return information on the + operation started with this API. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword data_loss_mode: This enum is passed to the StartDataLoss API to indicate what type of + data loss to induce. Known values are: "Invalid", "PartialDataLoss", and "FullDataLoss". + :paramtype data_loss_mode: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_start_data_loss_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + data_loss_mode=data_loss_mode, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_data_loss_progress( + self, + service_id: str, + partition_id: str, + *, + operation_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the progress of a partition data loss operation started using the StartDataLoss API. + + Gets the progress of a data loss operation started with StartDataLoss, using the OperationId. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "InvokeDataLossResult": { + "ErrorCode": 0, # Optional. If OperationState is Completed, this is + 0. If OperationState is Faulted, this is an error code indicating the + reason. + "SelectedPartition": { + "PartitionId": str, # Optional. An internal ID used by + Service Fabric to uniquely identify a partition. This is a randomly + generated GUID when the service was created. The partition ID is unique + and does not change for the lifetime of the service. If the same service + was deleted and recreated the IDs of its partitions would be different. + "ServiceName": "str" # Optional. The name of the service the + partition belongs to. + } + }, + "State": "str" # Optional. The state of the operation. Known values are: + "Invalid", "Running", "RollingBack", "Completed", "Faulted", "Cancelled", + "ForceCancelled". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_data_loss_progress_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def start_quorum_loss( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + partition_id: str, + *, + operation_id: str, + quorum_loss_mode: str, + quorum_loss_duration: int, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Induces quorum loss for a given stateful service partition. + + This API is useful for a temporary quorum loss situation on your service. + + Call the GetQuorumLossProgress API with the same OperationId to return information on the + operation started with this API. + + This can only be called on stateful persisted (HasPersistedState==true) services. Do not use + this API on stateless services or stateful in-memory only services. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword quorum_loss_mode: This enum is passed to the StartQuorumLoss API to indicate what type + of quorum loss to induce. Known values are: "Invalid", "QuorumReplicas", and "AllReplicas". + :paramtype quorum_loss_mode: str + :keyword quorum_loss_duration: The amount of time for which the partition will be kept in + quorum loss. This must be specified in seconds. + :paramtype quorum_loss_duration: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_start_quorum_loss_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + quorum_loss_mode=quorum_loss_mode, + quorum_loss_duration=quorum_loss_duration, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_quorum_loss_progress( + self, + service_id: str, + partition_id: str, + *, + operation_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the progress of a quorum loss operation on a partition started using the StartQuorumLoss + API. + + Gets the progress of a quorum loss operation started with StartQuorumLoss, using the provided + OperationId. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "InvokeQuorumLossResult": { + "ErrorCode": 0, # Optional. If OperationState is Completed, this is + 0. If OperationState is Faulted, this is an error code indicating the + reason. + "SelectedPartition": { + "PartitionId": str, # Optional. An internal ID used by + Service Fabric to uniquely identify a partition. This is a randomly + generated GUID when the service was created. The partition ID is unique + and does not change for the lifetime of the service. If the same service + was deleted and recreated the IDs of its partitions would be different. + "ServiceName": "str" # Optional. The name of the service the + partition belongs to. + } + }, + "State": "str" # Optional. The state of the operation. Known values are: + "Invalid", "Running", "RollingBack", "Completed", "Faulted", "Cancelled", + "ForceCancelled". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_quorum_loss_progress_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def start_partition_restart( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + partition_id: str, + *, + operation_id: str, + restart_partition_mode: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """This API will restart some or all replicas or instances of the specified partition. + + This API is useful for testing failover. + + If used to target a stateless service partition, RestartPartitionMode must be + AllReplicasOrInstances. + + Call the GetPartitionRestartProgress API using the same OperationId to get the progress. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword restart_partition_mode: Describe which partitions to restart. Known values are: + "Invalid", "AllReplicasOrInstances", and "OnlyActiveSecondaries". + :paramtype restart_partition_mode: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_start_partition_restart_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + restart_partition_mode=restart_partition_mode, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_partition_restart_progress( + self, + service_id: str, + partition_id: str, + *, + operation_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the progress of a PartitionRestart operation started using StartPartitionRestart. + + Gets the progress of a PartitionRestart started with StartPartitionRestart using the provided + OperationId. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "RestartPartitionResult": { + "ErrorCode": 0, # Optional. If OperationState is Completed, this is + 0. If OperationState is Faulted, this is an error code indicating the + reason. + "SelectedPartition": { + "PartitionId": str, # Optional. An internal ID used by + Service Fabric to uniquely identify a partition. This is a randomly + generated GUID when the service was created. The partition ID is unique + and does not change for the lifetime of the service. If the same service + was deleted and recreated the IDs of its partitions would be different. + "ServiceName": "str" # Optional. The name of the service the + partition belongs to. + } + }, + "State": "str" # Optional. The state of the operation. Known values are: + "Invalid", "Running", "RollingBack", "Completed", "Faulted", "Cancelled", + "ForceCancelled". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_partition_restart_progress_request( + service_id=service_id, + partition_id=partition_id, + api_version=api_version, + operation_id=operation_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def start_node_transition( # pylint: disable=inconsistent-return-statements + self, + node_name: str, + *, + operation_id: str, + node_transition_type: str, + node_instance_id: str, + stop_duration_in_seconds: int, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Starts or stops a cluster node. + + Starts or stops a cluster node. A cluster node is a process, not the OS instance itself. To + start a node, pass in "Start" for the NodeTransitionType parameter. + To stop a node, pass in "Stop" for the NodeTransitionType parameter. This API starts the + operation - when the API returns the node may not have finished transitioning yet. + Call GetNodeTransitionProgress with the same OperationId to get the progress of the operation. + + :param node_name: The name of the node. + :type node_name: str + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword node_transition_type: Indicates the type of transition to perform. + NodeTransitionType.Start will start a stopped node. NodeTransitionType.Stop will stop a node + that is up. Known values are: "Invalid", "Start", and "Stop". + :paramtype node_transition_type: str + :keyword node_instance_id: The node instance ID of the target node. This can be determined + through GetNodeInfo API. + :paramtype node_instance_id: str + :keyword stop_duration_in_seconds: The duration, in seconds, to keep the node stopped. The + minimum value is 600, the maximum is 14400. After this time expires, the node will + automatically come back up. + :paramtype stop_duration_in_seconds: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_start_node_transition_request( + node_name=node_name, + api_version=api_version, + operation_id=operation_id, + node_transition_type=node_transition_type, + node_instance_id=node_instance_id, + stop_duration_in_seconds=stop_duration_in_seconds, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_node_transition_progress( + self, + node_name: str, + *, + operation_id: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the progress of an operation started using StartNodeTransition. + + Gets the progress of an operation started with StartNodeTransition using the provided + OperationId. + + :param node_name: The name of the node. + :type node_name: str + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "NodeTransitionResult": { + "ErrorCode": 0, # Optional. If OperationState is Completed, this is + 0. If OperationState is Faulted, this is an error code indicating the + reason. + "NodeResult": { + "NodeInstanceId": "str", # Optional. The node instance id. + "NodeName": "str" # Optional. The name of a Service Fabric + node. + } + }, + "State": "str" # Optional. The state of the operation. Known values are: + "Invalid", "Running", "RollingBack", "Completed", "Faulted", "Cancelled", + "ForceCancelled". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_node_transition_progress_request( + node_name=node_name, + api_version=api_version, + operation_id=operation_id, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_fault_operation_list( + self, + *, + type_filter: int = 65535, + state_filter: int = 65535, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets a list of user-induced fault operations filtered by provided input. + + Gets the list of user-induced fault operations filtered by provided input. + + :keyword 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. Default value is 65535. + :paramtype type_filter: int + :keyword 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. Default value is 65535. + :paramtype state_filter: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "OperationId": str, # Optional. A GUID that identifies a call to + this API. This is also passed into the corresponding GetProgress API. + "State": "str", # Optional. The state of the operation. Known values + are: "Invalid", "Running", "RollingBack", "Completed", "Faulted", + "Cancelled", "ForceCancelled". + "Type": "str" # Optional. The type of the operation. Known values + are: "Invalid", "PartitionDataLoss", "PartitionQuorumLoss", + "PartitionRestart", "NodeTransition". + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_fault_operation_list_request( + api_version=api_version, + type_filter=type_filter, + state_filter=state_filter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def cancel_operation( # pylint: disable=inconsistent-return-statements + self, + *, + operation_id: str, + force: bool = False, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Cancels a user-induced fault operation. + + The following APIs start fault operations that may be cancelled by using CancelOperation: + StartDataLoss, StartQuorumLoss, StartPartitionRestart, StartNodeTransition. + + If force is false, then the specified user-induced operation will be gracefully stopped and + cleaned up. If force is true, the command will be aborted, and some internal state + may be left behind. Specifying force as true should be used with care. Calling this API with + force set to true is not allowed until this API has already + been called on the same test command with force set to false first, or unless the test command + already has an OperationState of OperationState.RollingBack. + Clarification: OperationState.RollingBack means that the system will be/is cleaning up internal + system state caused by executing the command. It will not restore data if the + test command was to cause data loss. For example, if you call StartDataLoss then call this + API, the system will only clean up internal state from running the command. + It will not restore the target partition's data, if the command progressed far enough to cause + data loss. + + Important note: if this API is invoked with force==true, internal state may be left behind. + + :keyword operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :keyword force: Indicates whether to gracefully roll back and clean up internal system state + modified by executing the user-induced operation. Default value is False. + :paramtype force: bool + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_cancel_operation_request( + api_version=api_version, + operation_id=operation_id, + force=force, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def create_backup_policy( # pylint: disable=inconsistent-return-statements + self, + backup_policy_description: JSON, + *, + timeout: Optional[int] = 60, + validate_connection: Optional[bool] = False, + **kwargs: Any + ) -> None: + """Creates a backup policy. + + Creates a backup policy which can be associated later with a Service Fabric application, + service or a partition for periodic backup. + + :param backup_policy_description: Describes the backup policy. + :type backup_policy_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword validate_connection: Specifies whether to validate the storage connection and + credentials before creating or updating the backup policies. Default value is False. + :paramtype validate_connection: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + backup_policy_description = { + "AutoRestoreOnDataLoss": bool, # Required. Specifies whether to trigger + restore automatically using the latest available backup in case the partition + experiences a data loss event. + "MaxIncrementalBackups": 0, # Required. Defines the maximum number of + incremental backups to be taken between two full backups. This is just the upper + limit. A full backup may be taken before specified number of incremental backups + are completed in one of the following conditions"n"n"n* The replica has never + taken a full backup since it has become primary,"n* Some of the log records since + the last backup has been truncated, or"n* Replica passed the + MaxAccumulatedBackupLogSizeInMB limit. + "Name": "str", # Required. The unique name identifying this backup policy. + "RetentionPolicy": { + RetentionPolicyType: RetentionPolicyType + }, + "Schedule": { + ScheduleKind: ScheduleKind + }, + "Storage": { + "FriendlyName": "str", # Optional. Friendly name for this backup + storage. + StorageKind: StorageKind + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = backup_policy_description + + request = build_create_backup_policy_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + validate_connection=validate_connection, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def delete_backup_policy( # pylint: disable=inconsistent-return-statements + self, + backup_policy_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes the backup policy. + + Deletes an existing backup policy. A backup policy must be created before it can be deleted. A + currently active backup policy, associated with any Service Fabric application, service or + partition, cannot be deleted without first deleting the mapping. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_delete_backup_policy_request( + backup_policy_name=backup_policy_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_backup_policy_list( + self, + *, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets all the backup policies configured. + + Get a list of all the backup policies configured. + + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "AutoRestoreOnDataLoss": bool, # Required. Specifies whether + to trigger restore automatically using the latest available backup in + case the partition experiences a data loss event. + "MaxIncrementalBackups": 0, # Required. Defines the maximum + number of incremental backups to be taken between two full backups. This + is just the upper limit. A full backup may be taken before specified + number of incremental backups are completed in one of the following + conditions"n"n"n* The replica has never taken a full backup since it has + become primary,"n* Some of the log records since the last backup has been + truncated, or"n* Replica passed the MaxAccumulatedBackupLogSizeInMB + limit. + "Name": "str", # Required. The unique name identifying this + backup policy. + "RetentionPolicy": { + RetentionPolicyType: RetentionPolicyType + }, + "Schedule": { + ScheduleKind: ScheduleKind + }, + "Storage": { + "FriendlyName": "str", # Optional. Friendly name for + this backup storage. + StorageKind: StorageKind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_backup_policy_list_request( + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_backup_policy_by_name( + self, + backup_policy_name: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets a particular backup policy by name. + + Gets a particular backup policy identified by {backupPolicyName}. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "AutoRestoreOnDataLoss": bool, # Required. Specifies whether to trigger + restore automatically using the latest available backup in case the partition + experiences a data loss event. + "MaxIncrementalBackups": 0, # Required. Defines the maximum number of + incremental backups to be taken between two full backups. This is just the upper + limit. A full backup may be taken before specified number of incremental backups + are completed in one of the following conditions"n"n"n* The replica has never + taken a full backup since it has become primary,"n* Some of the log records since + the last backup has been truncated, or"n* Replica passed the + MaxAccumulatedBackupLogSizeInMB limit. + "Name": "str", # Required. The unique name identifying this backup policy. + "RetentionPolicy": { + RetentionPolicyType: RetentionPolicyType + }, + "Schedule": { + ScheduleKind: ScheduleKind + }, + "Storage": { + "FriendlyName": "str", # Optional. Friendly name for this backup + storage. + StorageKind: StorageKind + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_backup_policy_by_name_request( + backup_policy_name=backup_policy_name, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_all_entities_backed_up_by_policy( + self, + backup_policy_name: str, + *, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the list of backup entities that are associated with this policy. + + Returns a list of Service Fabric application, service or partition which are associated with + this backup policy. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + EntityKind: EntityKind + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_all_entities_backed_up_by_policy_request( + backup_policy_name=backup_policy_name, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def update_backup_policy( # pylint: disable=inconsistent-return-statements + self, + backup_policy_name: str, + backup_policy_description: JSON, + *, + timeout: Optional[int] = 60, + validate_connection: Optional[bool] = False, + **kwargs: Any + ) -> None: + """Updates the backup policy. + + Updates the backup policy identified by {backupPolicyName}. + + :param backup_policy_name: The name of the backup policy. + :type backup_policy_name: str + :param backup_policy_description: Describes the backup policy. + :type backup_policy_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword validate_connection: Specifies whether to validate the storage connection and + credentials before creating or updating the backup policies. Default value is False. + :paramtype validate_connection: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + backup_policy_description = { + "AutoRestoreOnDataLoss": bool, # Required. Specifies whether to trigger + restore automatically using the latest available backup in case the partition + experiences a data loss event. + "MaxIncrementalBackups": 0, # Required. Defines the maximum number of + incremental backups to be taken between two full backups. This is just the upper + limit. A full backup may be taken before specified number of incremental backups + are completed in one of the following conditions"n"n"n* The replica has never + taken a full backup since it has become primary,"n* Some of the log records since + the last backup has been truncated, or"n* Replica passed the + MaxAccumulatedBackupLogSizeInMB limit. + "Name": "str", # Required. The unique name identifying this backup policy. + "RetentionPolicy": { + RetentionPolicyType: RetentionPolicyType + }, + "Schedule": { + ScheduleKind: ScheduleKind + }, + "Storage": { + "FriendlyName": "str", # Optional. Friendly name for this backup + storage. + StorageKind: StorageKind + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = backup_policy_description + + request = build_update_backup_policy_request( + backup_policy_name=backup_policy_name, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + validate_connection=validate_connection, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def enable_application_backup( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + enable_backup_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Enables periodic backup of stateful partitions under this Service Fabric application. + + Enables periodic backup of stateful partitions which are part of this Service Fabric + application. Each partition is backed up individually as per the specified backup policy + description. + Note only C# based Reliable Actor and Reliable Stateful services are currently supported for + periodic backup. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param enable_backup_description: Specifies the parameters for enabling backup. + :type enable_backup_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + enable_backup_description = { + "BackupPolicyName": "str" # Required. Name of the backup policy to be used + for enabling periodic backups. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = enable_backup_description + + request = build_enable_application_backup_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def disable_application_backup( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + disable_backup_description: Optional[JSON] = None, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Disables periodic backup of Service Fabric application. + + Disables periodic backup of Service Fabric application which was previously enabled. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param disable_backup_description: Specifies the parameters to disable backup for any backup + entity. Default value is None. + :type disable_backup_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + disable_backup_description = { + "CleanBackup": bool # Required. Boolean flag to delete backups. It can be + set to true for deleting all the backups which were created for the backup entity + that is getting disabled for backup. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + if disable_backup_description is not None: + _json = disable_backup_description + else: + _json = None + + request = build_disable_application_backup_request( + application_id=application_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_application_backup_configuration_info( + self, + application_id: str, + *, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the Service Fabric application backup configuration information. + + Gets the Service Fabric backup configuration information for the application and the services + and partitions under this application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "PolicyInheritedFrom": "str", # Optional. Specifies the + scope at which the backup policy is applied. Known values are: "Invalid", + "Partition", "Service", "Application". + "PolicyName": "str", # Optional. The name of the backup + policy which is applicable to this Service Fabric application or service + or partition. + "SuspensionInfo": { + "IsSuspended": bool, # Optional. Indicates whether + periodic backup is suspended at this level or not. + "SuspensionInheritedFrom": "str" # Optional. + Specifies the scope at which the backup suspension was applied. Known + values are: "Invalid", "Partition", "Service", "Application". + }, + Kind: Kind + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_backup_configuration_info_request( + application_id=application_id, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_application_backup_list( + self, + application_id: str, + *, + timeout: Optional[int] = 60, + latest: Optional[bool] = False, + start_date_time_filter: Optional[datetime.datetime] = None, + end_date_time_filter: Optional[datetime.datetime] = None, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + **kwargs: Any + ) -> JSON: + """Gets the list of backups available for every partition in this application. + + Returns a list of backups available for every partition in this Service Fabric application. The + server enumerates all the backups available at the backup location configured in the backup + policy. It also allows filtering of the result based on start and end datetime or just fetching + the latest available backup for every partition. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword latest: Specifies whether to get only the most recent backup available for a partition + for the specified time range. Default value is False. + :paramtype latest: bool + :keyword start_date_time_filter: Specify the start date time from which to enumerate backups, + in datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, all backups from the beginning are enumerated. Default value is + None. + :paramtype start_date_time_filter: ~datetime.datetime + :keyword end_date_time_filter: Specify the end date time till which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, enumeration is done till the most recent backup. Default value is + None. + :paramtype end_date_time_filter: ~datetime.datetime + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "ApplicationName": "str", # Optional. Name of the Service + Fabric application this partition backup belongs to. + "BackupChainId": str, # Optional. Unique backup chain ID. + All backups part of the same chain has the same backup chain id. A backup + chain is comprised of 1 full backup and multiple incremental backups. + "BackupId": str, # Optional. Unique backup ID . + "BackupLocation": "str", # Optional. Location of the backup, + relative to the backup store. + "BackupType": "str", # Optional. Describes the type of + backup, whether its full or incremental. Known values are: "Invalid", + "Full", "Incremental". + "CreationTimeUtc": "2020-02-20 00:00:00", # Optional. The + date time when this backup was taken. + "EpochOfLastBackupRecord": { + "ConfigurationVersion": "str", # Optional. The + current configuration number of this Epoch. The configuration number + is an increasing value that is updated whenever the configuration of + this replica set changes. + "DataLossVersion": "str" # Optional. The current + data loss number of this Epoch. The data loss number property is an + increasing value which is updated whenever data loss is suspected, as + when loss of a quorum of replicas in the replica set that includes + the Primary replica. + }, + "FailureError": { + "Code": "str", # Required. Defines the fabric error + codes that be returned as part of the error object in response to + Service Fabric API operations that are not successful. Following are + the error code values that can be returned for a specific HTTP status + code."n"n"n* "n Possible values of the error code for HTTP status + code 400 (Bad Request)"n"n"n * "FABRIC_E_INVALID_PARTITION_KEY""n * + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_ADDRESS""n * + "FABRIC_E_APPLICATION_NOT_UPGRADING""n * + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_FABRIC_NOT_UPGRADING""n * + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_CONFIGURATION""n * "FABRIC_E_INVALID_NAME_URI""n + * "FABRIC_E_PATH_TOO_LONG""n * "FABRIC_E_KEY_TOO_LARGE""n * + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED""n * + "FABRIC_E_INVALID_ATOMIC_GROUP""n * "FABRIC_E_VALUE_EMPTY""n * + "FABRIC_E_BACKUP_IS_ENABLED""n * + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH""n * + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES""n * + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY""n * "E_INVALIDARG""n"n* "n + Possible values of the error code for HTTP status code 404 (Not + Found)"n"n"n * "FABRIC_E_NODE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_TYPE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_NOT_FOUND""n * + "FABRIC_E_SERVICE_TYPE_NOT_FOUND""n * + "FABRIC_E_SERVICE_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND""n * + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND""n * + "FABRIC_E_PARTITION_NOT_FOUND""n * + "FABRIC_E_REPLICA_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST""n * + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND""n * + "FABRIC_E_DIRECTORY_NOT_FOUND""n * + "FABRIC_E_FABRIC_VERSION_NOT_FOUND""n * "FABRIC_E_FILE_NOT_FOUND""n + * "FABRIC_E_NAME_DOES_NOT_EXIST""n * + "FABRIC_E_PROPERTY_DOES_NOT_EXIST""n * + "FABRIC_E_ENUMERATION_COMPLETED""n * + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND""n * "FABRIC_E_KEY_NOT_FOUND""n + * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND""n * + "FABRIC_E_BACKUP_NOT_ENABLED""n * + "FABRIC_E_BACKUP_POLICY_NOT_EXISTING""n * + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING""n * + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR""n"n* "n Possible + values of the error code for HTTP status code 409 (Conflict)"n"n"n * + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS""n * + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_SERVICE_ALREADY_EXISTS""n * + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_TYPE_IN_USE""n * + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS""n * + "FABRIC_E_FABRIC_VERSION_IN_USE""n * + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_NAME_ALREADY_EXISTS""n * "FABRIC_E_NAME_NOT_EMPTY""n * + "FABRIC_E_PROPERTY_CHECK_FAILED""n * + "FABRIC_E_SERVICE_METADATA_MISMATCH""n * + "FABRIC_E_SERVICE_TYPE_MISMATCH""n * + "FABRIC_E_HEALTH_STALE_REPORT""n * + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED""n * + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET""n * + "FABRIC_E_INSTANCE_ID_MISMATCH""n * "FABRIC_E_BACKUP_IN_PROGRESS""n + * "FABRIC_E_RESTORE_IN_PROGRESS""n * + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING""n"n* "n Possible values of + the error code for HTTP status code 413 (Request Entity Too + Large)"n"n"n * "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values + of the error code for HTTP status code 500 (Internal Server + Error)"n"n"n * "FABRIC_E_NODE_IS_UP""n * "E_FAIL""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND""n * + "FABRIC_E_VOLUME_ALREADY_EXISTS""n * "FABRIC_E_VOLUME_NOT_FOUND""n + * "SerializationError""n * "FABRIC_E_CERTIFICATE_NOT_FOUND""n"n* "n + Possible values of the error code for HTTP status code 503 (Service + Unavailable)"n"n"n * "FABRIC_E_NO_WRITE_QUORUM""n * + "FABRIC_E_NOT_PRIMARY""n * "FABRIC_E_NOT_READY""n * + "FABRIC_E_RECONFIGURATION_PENDING""n * "FABRIC_E_SERVICE_OFFLINE""n + * "E_ABORT""n * "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values + of the error code for HTTP status code 504 (Gateway Timeout)"n"n"n * + "FABRIC_E_COMMUNICATION_ERROR""n * + "FABRIC_E_OPERATION_NOT_COMPLETE""n * "FABRIC_E_TIMEOUT". Known + values are: "FABRIC_E_INVALID_PARTITION_KEY", + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", + "FABRIC_E_APPLICATION_NOT_UPGRADING", + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_FABRIC_NOT_UPGRADING", + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", + "FABRIC_E_PATH_TOO_LONG", "FABRIC_E_KEY_TOO_LARGE", + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", + "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", + "FABRIC_E_NODE_NOT_FOUND", "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", + "FABRIC_E_APPLICATION_NOT_FOUND", "FABRIC_E_SERVICE_TYPE_NOT_FOUND", + "FABRIC_E_SERVICE_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", + "FABRIC_E_PARTITION_NOT_FOUND", "FABRIC_E_REPLICA_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", + "FABRIC_E_DIRECTORY_NOT_FOUND", "FABRIC_E_FABRIC_VERSION_NOT_FOUND", + "FABRIC_E_FILE_NOT_FOUND", "FABRIC_E_NAME_DOES_NOT_EXIST", + "FABRIC_E_PROPERTY_DOES_NOT_EXIST", "FABRIC_E_ENUMERATION_COMPLETED", + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", "FABRIC_E_KEY_NOT_FOUND", + "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", + "FABRIC_E_SERVICE_ALREADY_EXISTS", + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_TYPE_IN_USE", + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", + "FABRIC_E_FABRIC_VERSION_IN_USE", + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", + "FABRIC_E_NAME_ALREADY_EXISTS", "FABRIC_E_NAME_NOT_EMPTY", + "FABRIC_E_PROPERTY_CHECK_FAILED", + "FABRIC_E_SERVICE_METADATA_MISMATCH", + "FABRIC_E_SERVICE_TYPE_MISMATCH", "FABRIC_E_HEALTH_STALE_REPORT", + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", + "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", + "FABRIC_E_NOT_PRIMARY", "FABRIC_E_NOT_READY", + "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", + "E_ABORT", "FABRIC_E_COMMUNICATION_ERROR", + "FABRIC_E_OPERATION_NOT_COMPLETE", "FABRIC_E_TIMEOUT", + "FABRIC_E_NODE_IS_UP", "E_FAIL", "FABRIC_E_BACKUP_IS_ENABLED", + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", + "FABRIC_E_BACKUP_NOT_ENABLED", "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", + "FABRIC_E_BACKUP_IN_PROGRESS", "FABRIC_E_RESTORE_IN_PROGRESS", + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", + "FABRIC_E_VOLUME_ALREADY_EXISTS", "FABRIC_E_VOLUME_NOT_FOUND", + "SerializationError", + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", + "FABRIC_E_CERTIFICATE_NOT_FOUND". + "Message": "str" # Optional. Error message. + }, + "LsnOfLastBackupRecord": "str", # Optional. LSN of the last + record in this backup. + "PartitionInformation": { + "Id": str, # Optional. An internal ID used by + Service Fabric to uniquely identify a partition. This is a randomly + generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the + same service was deleted and recreated the IDs of its partitions + would be different. + ServicePartitionKind: ServicePartitionKind + }, + "ServiceManifestVersion": "str", # Optional. Manifest + Version of the service this partition backup belongs to. + "ServiceName": "str" # Optional. Name of the Service Fabric + service this partition backup belongs to. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_application_backup_list_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + latest=latest, + start_date_time_filter=start_date_time_filter, + end_date_time_filter=end_date_time_filter, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def suspend_application_backup( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Suspends periodic backup for the specified Service Fabric application. + + The application which is configured to take periodic backups, is suspended for taking further + backups till it is resumed again. This operation applies to the entire application's hierarchy. + It means all the services and partitions under this application are now suspended for backup. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_suspend_application_backup_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def resume_application_backup( # pylint: disable=inconsistent-return-statements + self, + application_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Resumes periodic backup of a Service Fabric application which was previously suspended. + + The previously suspended Service Fabric application resumes taking periodic backup as per the + backup policy currently configured for the same. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_resume_application_backup_request( + application_id=application_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def enable_service_backup( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + enable_backup_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Enables periodic backup of stateful partitions under this Service Fabric service. + + Enables periodic backup of stateful partitions which are part of this Service Fabric service. + Each partition is backed up individually as per the specified backup policy description. In + case the application, which the service is part of, is already enabled for backup then this + operation would override the policy being used to take the periodic backup for this service and + its partitions (unless explicitly overridden at the partition level). + Note only C# based Reliable Actor and Reliable Stateful services are currently supported for + periodic backup. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param enable_backup_description: Specifies the parameters for enabling backup. + :type enable_backup_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + enable_backup_description = { + "BackupPolicyName": "str" # Required. Name of the backup policy to be used + for enabling periodic backups. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = enable_backup_description + + request = build_enable_service_backup_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def disable_service_backup( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + disable_backup_description: Optional[JSON] = None, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Disables periodic backup of Service Fabric service which was previously enabled. + + Disables periodic backup of Service Fabric service which was previously enabled. Backup must be + explicitly enabled before it can be disabled. + In case the backup is enabled for the Service Fabric application, which this service is part + of, this service would continue to be periodically backed up as per the policy mapped at the + application level. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param disable_backup_description: Specifies the parameters to disable backup for any backup + entity. Default value is None. + :type disable_backup_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + disable_backup_description = { + "CleanBackup": bool # Required. Boolean flag to delete backups. It can be + set to true for deleting all the backups which were created for the backup entity + that is getting disabled for backup. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + if disable_backup_description is not None: + _json = disable_backup_description + else: + _json = None + + request = build_disable_service_backup_request( + service_id=service_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_service_backup_configuration_info( + self, + service_id: str, + *, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the Service Fabric service backup configuration information. + + Gets the Service Fabric backup configuration information for the service and the partitions + under this service. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "PolicyInheritedFrom": "str", # Optional. Specifies the + scope at which the backup policy is applied. Known values are: "Invalid", + "Partition", "Service", "Application". + "PolicyName": "str", # Optional. The name of the backup + policy which is applicable to this Service Fabric application or service + or partition. + "SuspensionInfo": { + "IsSuspended": bool, # Optional. Indicates whether + periodic backup is suspended at this level or not. + "SuspensionInheritedFrom": "str" # Optional. + Specifies the scope at which the backup suspension was applied. Known + values are: "Invalid", "Partition", "Service", "Application". + }, + Kind: Kind + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_service_backup_configuration_info_request( + service_id=service_id, + api_version=api_version, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_service_backup_list( + self, + service_id: str, + *, + timeout: Optional[int] = 60, + latest: Optional[bool] = False, + start_date_time_filter: Optional[datetime.datetime] = None, + end_date_time_filter: Optional[datetime.datetime] = None, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + **kwargs: Any + ) -> JSON: + """Gets the list of backups available for every partition in this service. + + Returns a list of backups available for every partition in this Service Fabric service. The + server enumerates all the backups available in the backup store configured in the backup + policy. It also allows filtering of the result based on start and end datetime or just fetching + the latest available backup for every partition. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword latest: Specifies whether to get only the most recent backup available for a partition + for the specified time range. Default value is False. + :paramtype latest: bool + :keyword start_date_time_filter: Specify the start date time from which to enumerate backups, + in datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, all backups from the beginning are enumerated. Default value is + None. + :paramtype start_date_time_filter: ~datetime.datetime + :keyword end_date_time_filter: Specify the end date time till which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, enumeration is done till the most recent backup. Default value is + None. + :paramtype end_date_time_filter: ~datetime.datetime + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "ApplicationName": "str", # Optional. Name of the Service + Fabric application this partition backup belongs to. + "BackupChainId": str, # Optional. Unique backup chain ID. + All backups part of the same chain has the same backup chain id. A backup + chain is comprised of 1 full backup and multiple incremental backups. + "BackupId": str, # Optional. Unique backup ID . + "BackupLocation": "str", # Optional. Location of the backup, + relative to the backup store. + "BackupType": "str", # Optional. Describes the type of + backup, whether its full or incremental. Known values are: "Invalid", + "Full", "Incremental". + "CreationTimeUtc": "2020-02-20 00:00:00", # Optional. The + date time when this backup was taken. + "EpochOfLastBackupRecord": { + "ConfigurationVersion": "str", # Optional. The + current configuration number of this Epoch. The configuration number + is an increasing value that is updated whenever the configuration of + this replica set changes. + "DataLossVersion": "str" # Optional. The current + data loss number of this Epoch. The data loss number property is an + increasing value which is updated whenever data loss is suspected, as + when loss of a quorum of replicas in the replica set that includes + the Primary replica. + }, + "FailureError": { + "Code": "str", # Required. Defines the fabric error + codes that be returned as part of the error object in response to + Service Fabric API operations that are not successful. Following are + the error code values that can be returned for a specific HTTP status + code."n"n"n* "n Possible values of the error code for HTTP status + code 400 (Bad Request)"n"n"n * "FABRIC_E_INVALID_PARTITION_KEY""n * + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_ADDRESS""n * + "FABRIC_E_APPLICATION_NOT_UPGRADING""n * + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_FABRIC_NOT_UPGRADING""n * + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_CONFIGURATION""n * "FABRIC_E_INVALID_NAME_URI""n + * "FABRIC_E_PATH_TOO_LONG""n * "FABRIC_E_KEY_TOO_LARGE""n * + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED""n * + "FABRIC_E_INVALID_ATOMIC_GROUP""n * "FABRIC_E_VALUE_EMPTY""n * + "FABRIC_E_BACKUP_IS_ENABLED""n * + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH""n * + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES""n * + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY""n * "E_INVALIDARG""n"n* "n + Possible values of the error code for HTTP status code 404 (Not + Found)"n"n"n * "FABRIC_E_NODE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_TYPE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_NOT_FOUND""n * + "FABRIC_E_SERVICE_TYPE_NOT_FOUND""n * + "FABRIC_E_SERVICE_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND""n * + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND""n * + "FABRIC_E_PARTITION_NOT_FOUND""n * + "FABRIC_E_REPLICA_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST""n * + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND""n * + "FABRIC_E_DIRECTORY_NOT_FOUND""n * + "FABRIC_E_FABRIC_VERSION_NOT_FOUND""n * "FABRIC_E_FILE_NOT_FOUND""n + * "FABRIC_E_NAME_DOES_NOT_EXIST""n * + "FABRIC_E_PROPERTY_DOES_NOT_EXIST""n * + "FABRIC_E_ENUMERATION_COMPLETED""n * + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND""n * "FABRIC_E_KEY_NOT_FOUND""n + * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND""n * + "FABRIC_E_BACKUP_NOT_ENABLED""n * + "FABRIC_E_BACKUP_POLICY_NOT_EXISTING""n * + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING""n * + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR""n"n* "n Possible + values of the error code for HTTP status code 409 (Conflict)"n"n"n * + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS""n * + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_SERVICE_ALREADY_EXISTS""n * + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_TYPE_IN_USE""n * + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS""n * + "FABRIC_E_FABRIC_VERSION_IN_USE""n * + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_NAME_ALREADY_EXISTS""n * "FABRIC_E_NAME_NOT_EMPTY""n * + "FABRIC_E_PROPERTY_CHECK_FAILED""n * + "FABRIC_E_SERVICE_METADATA_MISMATCH""n * + "FABRIC_E_SERVICE_TYPE_MISMATCH""n * + "FABRIC_E_HEALTH_STALE_REPORT""n * + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED""n * + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET""n * + "FABRIC_E_INSTANCE_ID_MISMATCH""n * "FABRIC_E_BACKUP_IN_PROGRESS""n + * "FABRIC_E_RESTORE_IN_PROGRESS""n * + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING""n"n* "n Possible values of + the error code for HTTP status code 413 (Request Entity Too + Large)"n"n"n * "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values + of the error code for HTTP status code 500 (Internal Server + Error)"n"n"n * "FABRIC_E_NODE_IS_UP""n * "E_FAIL""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND""n * + "FABRIC_E_VOLUME_ALREADY_EXISTS""n * "FABRIC_E_VOLUME_NOT_FOUND""n + * "SerializationError""n * "FABRIC_E_CERTIFICATE_NOT_FOUND""n"n* "n + Possible values of the error code for HTTP status code 503 (Service + Unavailable)"n"n"n * "FABRIC_E_NO_WRITE_QUORUM""n * + "FABRIC_E_NOT_PRIMARY""n * "FABRIC_E_NOT_READY""n * + "FABRIC_E_RECONFIGURATION_PENDING""n * "FABRIC_E_SERVICE_OFFLINE""n + * "E_ABORT""n * "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values + of the error code for HTTP status code 504 (Gateway Timeout)"n"n"n * + "FABRIC_E_COMMUNICATION_ERROR""n * + "FABRIC_E_OPERATION_NOT_COMPLETE""n * "FABRIC_E_TIMEOUT". Known + values are: "FABRIC_E_INVALID_PARTITION_KEY", + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", + "FABRIC_E_APPLICATION_NOT_UPGRADING", + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_FABRIC_NOT_UPGRADING", + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", + "FABRIC_E_PATH_TOO_LONG", "FABRIC_E_KEY_TOO_LARGE", + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", + "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", + "FABRIC_E_NODE_NOT_FOUND", "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", + "FABRIC_E_APPLICATION_NOT_FOUND", "FABRIC_E_SERVICE_TYPE_NOT_FOUND", + "FABRIC_E_SERVICE_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", + "FABRIC_E_PARTITION_NOT_FOUND", "FABRIC_E_REPLICA_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", + "FABRIC_E_DIRECTORY_NOT_FOUND", "FABRIC_E_FABRIC_VERSION_NOT_FOUND", + "FABRIC_E_FILE_NOT_FOUND", "FABRIC_E_NAME_DOES_NOT_EXIST", + "FABRIC_E_PROPERTY_DOES_NOT_EXIST", "FABRIC_E_ENUMERATION_COMPLETED", + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", "FABRIC_E_KEY_NOT_FOUND", + "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", + "FABRIC_E_SERVICE_ALREADY_EXISTS", + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_TYPE_IN_USE", + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", + "FABRIC_E_FABRIC_VERSION_IN_USE", + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", + "FABRIC_E_NAME_ALREADY_EXISTS", "FABRIC_E_NAME_NOT_EMPTY", + "FABRIC_E_PROPERTY_CHECK_FAILED", + "FABRIC_E_SERVICE_METADATA_MISMATCH", + "FABRIC_E_SERVICE_TYPE_MISMATCH", "FABRIC_E_HEALTH_STALE_REPORT", + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", + "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", + "FABRIC_E_NOT_PRIMARY", "FABRIC_E_NOT_READY", + "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", + "E_ABORT", "FABRIC_E_COMMUNICATION_ERROR", + "FABRIC_E_OPERATION_NOT_COMPLETE", "FABRIC_E_TIMEOUT", + "FABRIC_E_NODE_IS_UP", "E_FAIL", "FABRIC_E_BACKUP_IS_ENABLED", + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", + "FABRIC_E_BACKUP_NOT_ENABLED", "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", + "FABRIC_E_BACKUP_IN_PROGRESS", "FABRIC_E_RESTORE_IN_PROGRESS", + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", + "FABRIC_E_VOLUME_ALREADY_EXISTS", "FABRIC_E_VOLUME_NOT_FOUND", + "SerializationError", + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", + "FABRIC_E_CERTIFICATE_NOT_FOUND". + "Message": "str" # Optional. Error message. + }, + "LsnOfLastBackupRecord": "str", # Optional. LSN of the last + record in this backup. + "PartitionInformation": { + "Id": str, # Optional. An internal ID used by + Service Fabric to uniquely identify a partition. This is a randomly + generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the + same service was deleted and recreated the IDs of its partitions + would be different. + ServicePartitionKind: ServicePartitionKind + }, + "ServiceManifestVersion": "str", # Optional. Manifest + Version of the service this partition backup belongs to. + "ServiceName": "str" # Optional. Name of the Service Fabric + service this partition backup belongs to. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_service_backup_list_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + latest=latest, + start_date_time_filter=start_date_time_filter, + end_date_time_filter=end_date_time_filter, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def suspend_service_backup( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Suspends periodic backup for the specified Service Fabric service. + + The service which is configured to take periodic backups, is suspended for taking further + backups till it is resumed again. This operation applies to the entire service's hierarchy. It + means all the partitions under this service are now suspended for backup. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_suspend_service_backup_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def resume_service_backup( # pylint: disable=inconsistent-return-statements + self, + service_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Resumes periodic backup of a Service Fabric service which was previously suspended. + + The previously suspended Service Fabric service resumes taking periodic backup as per the + backup policy currently configured for the same. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_resume_service_backup_request( + service_id=service_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def enable_partition_backup( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + enable_backup_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Enables periodic backup of the stateful persisted partition. + + Enables periodic backup of stateful persisted partition. Each partition is backed up as per the + specified backup policy description. In case the application or service, which is partition is + part of, is already enabled for backup then this operation would override the policy being used + to take the periodic backup of this partition. + Note only C# based Reliable Actor and Reliable Stateful services are currently supported for + periodic backup. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param enable_backup_description: Specifies the parameters for enabling backup. + :type enable_backup_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + enable_backup_description = { + "BackupPolicyName": "str" # Required. Name of the backup policy to be used + for enabling periodic backups. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = enable_backup_description + + request = build_enable_partition_backup_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def disable_partition_backup( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + disable_backup_description: Optional[JSON] = None, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Disables periodic backup of Service Fabric partition which was previously enabled. + + Disables periodic backup of partition which was previously enabled. Backup must be explicitly + enabled before it can be disabled. + In case the backup is enabled for the Service Fabric application or service, which this + partition is part of, this partition would continue to be periodically backed up as per the + policy mapped at the higher level entity. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param disable_backup_description: Specifies the parameters to disable backup for any backup + entity. Default value is None. + :type disable_backup_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + disable_backup_description = { + "CleanBackup": bool # Required. Boolean flag to delete backups. It can be + set to true for deleting all the backups which were created for the backup entity + that is getting disabled for backup. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + if disable_backup_description is not None: + _json = disable_backup_description + else: + _json = None + + request = build_disable_partition_backup_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_partition_backup_configuration_info( + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the partition backup configuration information. + + Gets the Service Fabric Backup configuration information for the specified partition. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "PartitionId": str, # Optional. The partition ID identifying the partition. + "PolicyInheritedFrom": "str", # Optional. Specifies the scope at which the + backup policy is applied. Known values are: "Invalid", "Partition", "Service", + "Application". + "PolicyName": "str", # Optional. The name of the backup policy which is + applicable to this Service Fabric application or service or partition. + "ServiceName": "str", # Optional. The full name of the service with + 'fabric:' URI scheme. + "SuspensionInfo": { + "IsSuspended": bool, # Optional. Indicates whether periodic backup + is suspended at this level or not. + "SuspensionInheritedFrom": "str" # Optional. Specifies the scope at + which the backup suspension was applied. Known values are: "Invalid", + "Partition", "Service", "Application". + }, + Kind: Partition + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_partition_backup_configuration_info_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_partition_backup_list( + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + latest: Optional[bool] = False, + start_date_time_filter: Optional[datetime.datetime] = None, + end_date_time_filter: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> JSON: + """Gets the list of backups available for the specified partition. + + Returns a list of backups available for the specified partition. The server enumerates all the + backups available in the backup store configured in the backup policy. It also allows filtering + of the result based on start and end datetime or just fetching the latest available backup for + the partition. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword latest: Specifies whether to get only the most recent backup available for a partition + for the specified time range. Default value is False. + :paramtype latest: bool + :keyword start_date_time_filter: Specify the start date time from which to enumerate backups, + in datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, all backups from the beginning are enumerated. Default value is + None. + :paramtype start_date_time_filter: ~datetime.datetime + :keyword end_date_time_filter: Specify the end date time till which to enumerate backups, in + datetime format. The date time must be specified in ISO8601 format. This is an optional + parameter. If not specified, enumeration is done till the most recent backup. Default value is + None. + :paramtype end_date_time_filter: ~datetime.datetime + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "ApplicationName": "str", # Optional. Name of the Service + Fabric application this partition backup belongs to. + "BackupChainId": str, # Optional. Unique backup chain ID. + All backups part of the same chain has the same backup chain id. A backup + chain is comprised of 1 full backup and multiple incremental backups. + "BackupId": str, # Optional. Unique backup ID . + "BackupLocation": "str", # Optional. Location of the backup, + relative to the backup store. + "BackupType": "str", # Optional. Describes the type of + backup, whether its full or incremental. Known values are: "Invalid", + "Full", "Incremental". + "CreationTimeUtc": "2020-02-20 00:00:00", # Optional. The + date time when this backup was taken. + "EpochOfLastBackupRecord": { + "ConfigurationVersion": "str", # Optional. The + current configuration number of this Epoch. The configuration number + is an increasing value that is updated whenever the configuration of + this replica set changes. + "DataLossVersion": "str" # Optional. The current + data loss number of this Epoch. The data loss number property is an + increasing value which is updated whenever data loss is suspected, as + when loss of a quorum of replicas in the replica set that includes + the Primary replica. + }, + "FailureError": { + "Code": "str", # Required. Defines the fabric error + codes that be returned as part of the error object in response to + Service Fabric API operations that are not successful. Following are + the error code values that can be returned for a specific HTTP status + code."n"n"n* "n Possible values of the error code for HTTP status + code 400 (Bad Request)"n"n"n * "FABRIC_E_INVALID_PARTITION_KEY""n * + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_ADDRESS""n * + "FABRIC_E_APPLICATION_NOT_UPGRADING""n * + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_FABRIC_NOT_UPGRADING""n * + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_CONFIGURATION""n * "FABRIC_E_INVALID_NAME_URI""n + * "FABRIC_E_PATH_TOO_LONG""n * "FABRIC_E_KEY_TOO_LARGE""n * + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED""n * + "FABRIC_E_INVALID_ATOMIC_GROUP""n * "FABRIC_E_VALUE_EMPTY""n * + "FABRIC_E_BACKUP_IS_ENABLED""n * + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH""n * + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES""n * + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY""n * "E_INVALIDARG""n"n* "n + Possible values of the error code for HTTP status code 404 (Not + Found)"n"n"n * "FABRIC_E_NODE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_TYPE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_NOT_FOUND""n * + "FABRIC_E_SERVICE_TYPE_NOT_FOUND""n * + "FABRIC_E_SERVICE_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND""n * + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND""n * + "FABRIC_E_PARTITION_NOT_FOUND""n * + "FABRIC_E_REPLICA_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST""n * + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND""n * + "FABRIC_E_DIRECTORY_NOT_FOUND""n * + "FABRIC_E_FABRIC_VERSION_NOT_FOUND""n * "FABRIC_E_FILE_NOT_FOUND""n + * "FABRIC_E_NAME_DOES_NOT_EXIST""n * + "FABRIC_E_PROPERTY_DOES_NOT_EXIST""n * + "FABRIC_E_ENUMERATION_COMPLETED""n * + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND""n * "FABRIC_E_KEY_NOT_FOUND""n + * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND""n * + "FABRIC_E_BACKUP_NOT_ENABLED""n * + "FABRIC_E_BACKUP_POLICY_NOT_EXISTING""n * + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING""n * + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR""n"n* "n Possible + values of the error code for HTTP status code 409 (Conflict)"n"n"n * + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS""n * + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_SERVICE_ALREADY_EXISTS""n * + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_TYPE_IN_USE""n * + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS""n * + "FABRIC_E_FABRIC_VERSION_IN_USE""n * + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_NAME_ALREADY_EXISTS""n * "FABRIC_E_NAME_NOT_EMPTY""n * + "FABRIC_E_PROPERTY_CHECK_FAILED""n * + "FABRIC_E_SERVICE_METADATA_MISMATCH""n * + "FABRIC_E_SERVICE_TYPE_MISMATCH""n * + "FABRIC_E_HEALTH_STALE_REPORT""n * + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED""n * + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET""n * + "FABRIC_E_INSTANCE_ID_MISMATCH""n * "FABRIC_E_BACKUP_IN_PROGRESS""n + * "FABRIC_E_RESTORE_IN_PROGRESS""n * + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING""n"n* "n Possible values of + the error code for HTTP status code 413 (Request Entity Too + Large)"n"n"n * "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values + of the error code for HTTP status code 500 (Internal Server + Error)"n"n"n * "FABRIC_E_NODE_IS_UP""n * "E_FAIL""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND""n * + "FABRIC_E_VOLUME_ALREADY_EXISTS""n * "FABRIC_E_VOLUME_NOT_FOUND""n + * "SerializationError""n * "FABRIC_E_CERTIFICATE_NOT_FOUND""n"n* "n + Possible values of the error code for HTTP status code 503 (Service + Unavailable)"n"n"n * "FABRIC_E_NO_WRITE_QUORUM""n * + "FABRIC_E_NOT_PRIMARY""n * "FABRIC_E_NOT_READY""n * + "FABRIC_E_RECONFIGURATION_PENDING""n * "FABRIC_E_SERVICE_OFFLINE""n + * "E_ABORT""n * "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values + of the error code for HTTP status code 504 (Gateway Timeout)"n"n"n * + "FABRIC_E_COMMUNICATION_ERROR""n * + "FABRIC_E_OPERATION_NOT_COMPLETE""n * "FABRIC_E_TIMEOUT". Known + values are: "FABRIC_E_INVALID_PARTITION_KEY", + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", + "FABRIC_E_APPLICATION_NOT_UPGRADING", + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_FABRIC_NOT_UPGRADING", + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", + "FABRIC_E_PATH_TOO_LONG", "FABRIC_E_KEY_TOO_LARGE", + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", + "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", + "FABRIC_E_NODE_NOT_FOUND", "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", + "FABRIC_E_APPLICATION_NOT_FOUND", "FABRIC_E_SERVICE_TYPE_NOT_FOUND", + "FABRIC_E_SERVICE_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", + "FABRIC_E_PARTITION_NOT_FOUND", "FABRIC_E_REPLICA_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", + "FABRIC_E_DIRECTORY_NOT_FOUND", "FABRIC_E_FABRIC_VERSION_NOT_FOUND", + "FABRIC_E_FILE_NOT_FOUND", "FABRIC_E_NAME_DOES_NOT_EXIST", + "FABRIC_E_PROPERTY_DOES_NOT_EXIST", "FABRIC_E_ENUMERATION_COMPLETED", + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", "FABRIC_E_KEY_NOT_FOUND", + "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", + "FABRIC_E_SERVICE_ALREADY_EXISTS", + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_TYPE_IN_USE", + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", + "FABRIC_E_FABRIC_VERSION_IN_USE", + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", + "FABRIC_E_NAME_ALREADY_EXISTS", "FABRIC_E_NAME_NOT_EMPTY", + "FABRIC_E_PROPERTY_CHECK_FAILED", + "FABRIC_E_SERVICE_METADATA_MISMATCH", + "FABRIC_E_SERVICE_TYPE_MISMATCH", "FABRIC_E_HEALTH_STALE_REPORT", + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", + "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", + "FABRIC_E_NOT_PRIMARY", "FABRIC_E_NOT_READY", + "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", + "E_ABORT", "FABRIC_E_COMMUNICATION_ERROR", + "FABRIC_E_OPERATION_NOT_COMPLETE", "FABRIC_E_TIMEOUT", + "FABRIC_E_NODE_IS_UP", "E_FAIL", "FABRIC_E_BACKUP_IS_ENABLED", + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", + "FABRIC_E_BACKUP_NOT_ENABLED", "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", + "FABRIC_E_BACKUP_IN_PROGRESS", "FABRIC_E_RESTORE_IN_PROGRESS", + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", + "FABRIC_E_VOLUME_ALREADY_EXISTS", "FABRIC_E_VOLUME_NOT_FOUND", + "SerializationError", + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", + "FABRIC_E_CERTIFICATE_NOT_FOUND". + "Message": "str" # Optional. Error message. + }, + "LsnOfLastBackupRecord": "str", # Optional. LSN of the last + record in this backup. + "PartitionInformation": { + "Id": str, # Optional. An internal ID used by + Service Fabric to uniquely identify a partition. This is a randomly + generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the + same service was deleted and recreated the IDs of its partitions + would be different. + ServicePartitionKind: ServicePartitionKind + }, + "ServiceManifestVersion": "str", # Optional. Manifest + Version of the service this partition backup belongs to. + "ServiceName": "str" # Optional. Name of the Service Fabric + service this partition backup belongs to. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_partition_backup_list_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + latest=latest, + start_date_time_filter=start_date_time_filter, + end_date_time_filter=end_date_time_filter, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def suspend_partition_backup( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Suspends periodic backup for the specified partition. + + The partition which is configured to take periodic backups, is suspended for taking further + backups till it is resumed again. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_suspend_partition_backup_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def resume_partition_backup( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Resumes periodic backup of partition which was previously suspended. + + The previously suspended partition resumes taking periodic backup as per the backup policy + currently configured for the same. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_resume_partition_backup_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def backup_partition( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + backup_partition_description: Optional[JSON] = None, + *, + backup_timeout: Optional[int] = 10, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Triggers backup of the partition's state. + + Creates a backup of the stateful persisted partition's state. In case the partition is already + being periodically backed up, then by default the new backup is created at the same backup + storage. One can also override the same by specifying the backup storage details as part of the + request body. Once the backup is initiated, its progress can be tracked using the + GetBackupProgress operation. + In case, the operation times out, specify a greater backup timeout value in the query + parameter. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param backup_partition_description: Describes the parameters to backup the partition now. If + not present, backup operation uses default parameters from the backup policy current associated + with this partition. Default value is None. + :type backup_partition_description: JSON + :keyword backup_timeout: Specifies the maximum amount of time, in minutes, to wait for the + backup operation to complete. Post that, the operation completes with timeout error. However, + in certain corner cases it could be that though the operation returns back timeout, the backup + actually goes through. In case of timeout error, its recommended to invoke this operation again + with a greater timeout value. The default value for the same is 10 minutes. Default value is + 10. + :paramtype backup_timeout: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + backup_partition_description = { + "BackupStorage": { + "FriendlyName": "str", # Optional. Friendly name for this backup + storage. + StorageKind: StorageKind + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + if backup_partition_description is not None: + _json = backup_partition_description + else: + _json = None + + request = build_backup_partition_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + backup_timeout=backup_timeout, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_partition_backup_progress( + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets details for the latest backup triggered for this partition. + + Returns information about the state of the latest backup along with details or failure reason + in case of completion. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "BackupId": str, # Optional. Unique ID of the newly created backup. + "BackupLocation": "str", # Optional. Location, relative to the backup store, + of the newly created backup. + "BackupState": "str", # Optional. Represents the current state of the + partition backup operation. Known values are: "Invalid", "Accepted", + "BackupInProgress", "Success", "Failure", "Timeout". + "EpochOfLastBackupRecord": { + "ConfigurationVersion": "str", # Optional. The current configuration + number of this Epoch. The configuration number is an increasing value that is + updated whenever the configuration of this replica set changes. + "DataLossVersion": "str" # Optional. The current data loss number of + this Epoch. The data loss number property is an increasing value which is + updated whenever data loss is suspected, as when loss of a quorum of replicas + in the replica set that includes the Primary replica. + }, + "FailureError": { + "Code": "str", # Required. Defines the fabric error codes that be + returned as part of the error object in response to Service Fabric API + operations that are not successful. Following are the error code values that + can be returned for a specific HTTP status code."n"n"n* "n Possible values + of the error code for HTTP status code 400 (Bad Request)"n"n"n * + "FABRIC_E_INVALID_PARTITION_KEY""n * + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR""n * "FABRIC_E_INVALID_ADDRESS""n * + "FABRIC_E_APPLICATION_NOT_UPGRADING""n * + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_FABRIC_NOT_UPGRADING""n * + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_CONFIGURATION""n * "FABRIC_E_INVALID_NAME_URI""n * + "FABRIC_E_PATH_TOO_LONG""n * "FABRIC_E_KEY_TOO_LARGE""n * + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED""n * + "FABRIC_E_INVALID_ATOMIC_GROUP""n * "FABRIC_E_VALUE_EMPTY""n * + "FABRIC_E_BACKUP_IS_ENABLED""n * + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH""n * + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES""n * + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY""n * "E_INVALIDARG""n"n* "n + Possible values of the error code for HTTP status code 404 (Not Found)"n"n"n + * "FABRIC_E_NODE_NOT_FOUND""n * "FABRIC_E_APPLICATION_TYPE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_NOT_FOUND""n * "FABRIC_E_SERVICE_TYPE_NOT_FOUND""n * + "FABRIC_E_SERVICE_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND""n * + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND""n * + "FABRIC_E_PARTITION_NOT_FOUND""n * "FABRIC_E_REPLICA_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST""n * + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND""n * + "FABRIC_E_DIRECTORY_NOT_FOUND""n * "FABRIC_E_FABRIC_VERSION_NOT_FOUND""n * + "FABRIC_E_FILE_NOT_FOUND""n * "FABRIC_E_NAME_DOES_NOT_EXIST""n * + "FABRIC_E_PROPERTY_DOES_NOT_EXIST""n * "FABRIC_E_ENUMERATION_COMPLETED""n * + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND""n * "FABRIC_E_KEY_NOT_FOUND""n * + "FABRIC_E_HEALTH_ENTITY_NOT_FOUND""n * "FABRIC_E_BACKUP_NOT_ENABLED""n * + "FABRIC_E_BACKUP_POLICY_NOT_EXISTING""n * + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING""n * + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR""n"n* "n Possible values of + the error code for HTTP status code 409 (Conflict)"n"n"n * + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS""n * + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_SERVICE_ALREADY_EXISTS""n * + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_TYPE_IN_USE""n * + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS""n * + "FABRIC_E_FABRIC_VERSION_IN_USE""n * "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS""n + * "FABRIC_E_NAME_ALREADY_EXISTS""n * "FABRIC_E_NAME_NOT_EMPTY""n * + "FABRIC_E_PROPERTY_CHECK_FAILED""n * "FABRIC_E_SERVICE_METADATA_MISMATCH""n + * "FABRIC_E_SERVICE_TYPE_MISMATCH""n * "FABRIC_E_HEALTH_STALE_REPORT""n * + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED""n * + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET""n * "FABRIC_E_INSTANCE_ID_MISMATCH""n * + "FABRIC_E_BACKUP_IN_PROGRESS""n * "FABRIC_E_RESTORE_IN_PROGRESS""n * + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING""n"n* "n Possible values of the + error code for HTTP status code 413 (Request Entity Too Large)"n"n"n * + "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values of the error code for + HTTP status code 500 (Internal Server Error)"n"n"n * "FABRIC_E_NODE_IS_UP""n + * "E_FAIL""n * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND""n * + "FABRIC_E_VOLUME_ALREADY_EXISTS""n * "FABRIC_E_VOLUME_NOT_FOUND""n * + "SerializationError""n * "FABRIC_E_CERTIFICATE_NOT_FOUND""n"n* "n Possible + values of the error code for HTTP status code 503 (Service Unavailable)"n"n"n + * "FABRIC_E_NO_WRITE_QUORUM""n * "FABRIC_E_NOT_PRIMARY""n * + "FABRIC_E_NOT_READY""n * "FABRIC_E_RECONFIGURATION_PENDING""n * + "FABRIC_E_SERVICE_OFFLINE""n * "E_ABORT""n * + "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values of the error code for + HTTP status code 504 (Gateway Timeout)"n"n"n * + "FABRIC_E_COMMUNICATION_ERROR""n * "FABRIC_E_OPERATION_NOT_COMPLETE""n * + "FABRIC_E_TIMEOUT". Known values are: "FABRIC_E_INVALID_PARTITION_KEY", + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", + "FABRIC_E_APPLICATION_NOT_UPGRADING", + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_FABRIC_NOT_UPGRADING", "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", + "FABRIC_E_PATH_TOO_LONG", "FABRIC_E_KEY_TOO_LARGE", + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", + "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", + "FABRIC_E_NODE_NOT_FOUND", "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", + "FABRIC_E_APPLICATION_NOT_FOUND", "FABRIC_E_SERVICE_TYPE_NOT_FOUND", + "FABRIC_E_SERVICE_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", "FABRIC_E_PARTITION_NOT_FOUND", + "FABRIC_E_REPLICA_DOES_NOT_EXIST", "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", "FABRIC_E_DIRECTORY_NOT_FOUND", + "FABRIC_E_FABRIC_VERSION_NOT_FOUND", "FABRIC_E_FILE_NOT_FOUND", + "FABRIC_E_NAME_DOES_NOT_EXIST", "FABRIC_E_PROPERTY_DOES_NOT_EXIST", + "FABRIC_E_ENUMERATION_COMPLETED", "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", + "FABRIC_E_KEY_NOT_FOUND", "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", + "FABRIC_E_SERVICE_ALREADY_EXISTS", "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_TYPE_IN_USE", + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", "FABRIC_E_FABRIC_VERSION_IN_USE", + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", "FABRIC_E_NAME_ALREADY_EXISTS", + "FABRIC_E_NAME_NOT_EMPTY", "FABRIC_E_PROPERTY_CHECK_FAILED", + "FABRIC_E_SERVICE_METADATA_MISMATCH", "FABRIC_E_SERVICE_TYPE_MISMATCH", + "FABRIC_E_HEALTH_STALE_REPORT", "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", + "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", + "FABRIC_E_NOT_PRIMARY", "FABRIC_E_NOT_READY", + "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", "E_ABORT", + "FABRIC_E_COMMUNICATION_ERROR", "FABRIC_E_OPERATION_NOT_COMPLETE", + "FABRIC_E_TIMEOUT", "FABRIC_E_NODE_IS_UP", "E_FAIL", + "FABRIC_E_BACKUP_IS_ENABLED", + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", "FABRIC_E_BACKUP_NOT_ENABLED", + "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", + "FABRIC_E_BACKUP_IN_PROGRESS", "FABRIC_E_RESTORE_IN_PROGRESS", + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", + "FABRIC_E_VOLUME_ALREADY_EXISTS", "FABRIC_E_VOLUME_NOT_FOUND", + "SerializationError", "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", + "FABRIC_E_CERTIFICATE_NOT_FOUND". + "Message": "str" # Optional. Error message. + }, + "LsnOfLastBackupRecord": "str", # Optional. The LSN of last record included + in backup. + "TimeStampUtc": "2020-02-20 00:00:00" # Optional. TimeStamp in UTC when + operation succeeded or failed. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_partition_backup_progress_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def restore_partition( # pylint: disable=inconsistent-return-statements + self, + partition_id: str, + restore_partition_description: JSON, + *, + restore_timeout: Optional[int] = 10, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Triggers restore of the state of the partition using the specified restore partition + description. + + Restores the state of a of the stateful persisted partition using the specified backup point. + In case the partition is already being periodically backed up, then by default the backup point + is looked for in the storage specified in backup policy. One can also override the same by + specifying the backup storage details as part of the restore partition description in body. + Once the restore is initiated, its progress can be tracked using the GetRestoreProgress + operation. + In case, the operation times out, specify a greater restore timeout value in the query + parameter. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param restore_partition_description: Describes the parameters to restore the partition. + :type restore_partition_description: JSON + :keyword restore_timeout: Specifies the maximum amount of time to wait, in minutes, for the + restore operation to complete. Post that, the operation returns back with timeout error. + However, in certain corner cases it could be that the restore operation goes through even + though it completes with timeout. In case of timeout error, its recommended to invoke this + operation again with a greater timeout value. the default value for the same is 10 minutes. + Default value is 10. + :paramtype restore_timeout: int + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + restore_partition_description = { + "BackupId": str, # Required. Unique backup ID. + "BackupLocation": "str", # Required. Location of the backup relative to the + backup storage specified/ configured. + "BackupStorage": { + "FriendlyName": "str", # Optional. Friendly name for this backup + storage. + StorageKind: StorageKind + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = restore_partition_description + + request = build_restore_partition_request( + partition_id=partition_id, + api_version=api_version, + content_type=content_type, + json=_json, + restore_timeout=restore_timeout, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_partition_restore_progress( + self, + partition_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets details for the latest restore operation triggered for this partition. + + Returns information about the state of the latest restore operation along with details or + failure reason in case of completion. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "FailureError": { + "Code": "str", # Required. Defines the fabric error codes that be + returned as part of the error object in response to Service Fabric API + operations that are not successful. Following are the error code values that + can be returned for a specific HTTP status code."n"n"n* "n Possible values + of the error code for HTTP status code 400 (Bad Request)"n"n"n * + "FABRIC_E_INVALID_PARTITION_KEY""n * + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR""n * "FABRIC_E_INVALID_ADDRESS""n * + "FABRIC_E_APPLICATION_NOT_UPGRADING""n * + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_FABRIC_NOT_UPGRADING""n * + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_CONFIGURATION""n * "FABRIC_E_INVALID_NAME_URI""n * + "FABRIC_E_PATH_TOO_LONG""n * "FABRIC_E_KEY_TOO_LARGE""n * + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED""n * + "FABRIC_E_INVALID_ATOMIC_GROUP""n * "FABRIC_E_VALUE_EMPTY""n * + "FABRIC_E_BACKUP_IS_ENABLED""n * + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH""n * + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES""n * + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY""n * "E_INVALIDARG""n"n* "n + Possible values of the error code for HTTP status code 404 (Not Found)"n"n"n + * "FABRIC_E_NODE_NOT_FOUND""n * "FABRIC_E_APPLICATION_TYPE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_NOT_FOUND""n * "FABRIC_E_SERVICE_TYPE_NOT_FOUND""n * + "FABRIC_E_SERVICE_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND""n * + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND""n * + "FABRIC_E_PARTITION_NOT_FOUND""n * "FABRIC_E_REPLICA_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST""n * + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND""n * + "FABRIC_E_DIRECTORY_NOT_FOUND""n * "FABRIC_E_FABRIC_VERSION_NOT_FOUND""n * + "FABRIC_E_FILE_NOT_FOUND""n * "FABRIC_E_NAME_DOES_NOT_EXIST""n * + "FABRIC_E_PROPERTY_DOES_NOT_EXIST""n * "FABRIC_E_ENUMERATION_COMPLETED""n * + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND""n * "FABRIC_E_KEY_NOT_FOUND""n * + "FABRIC_E_HEALTH_ENTITY_NOT_FOUND""n * "FABRIC_E_BACKUP_NOT_ENABLED""n * + "FABRIC_E_BACKUP_POLICY_NOT_EXISTING""n * + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING""n * + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR""n"n* "n Possible values of + the error code for HTTP status code 409 (Conflict)"n"n"n * + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS""n * + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_SERVICE_ALREADY_EXISTS""n * + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_TYPE_IN_USE""n * + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS""n * + "FABRIC_E_FABRIC_VERSION_IN_USE""n * "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS""n + * "FABRIC_E_NAME_ALREADY_EXISTS""n * "FABRIC_E_NAME_NOT_EMPTY""n * + "FABRIC_E_PROPERTY_CHECK_FAILED""n * "FABRIC_E_SERVICE_METADATA_MISMATCH""n + * "FABRIC_E_SERVICE_TYPE_MISMATCH""n * "FABRIC_E_HEALTH_STALE_REPORT""n * + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED""n * + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET""n * "FABRIC_E_INSTANCE_ID_MISMATCH""n * + "FABRIC_E_BACKUP_IN_PROGRESS""n * "FABRIC_E_RESTORE_IN_PROGRESS""n * + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING""n"n* "n Possible values of the + error code for HTTP status code 413 (Request Entity Too Large)"n"n"n * + "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values of the error code for + HTTP status code 500 (Internal Server Error)"n"n"n * "FABRIC_E_NODE_IS_UP""n + * "E_FAIL""n * "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND""n * + "FABRIC_E_VOLUME_ALREADY_EXISTS""n * "FABRIC_E_VOLUME_NOT_FOUND""n * + "SerializationError""n * "FABRIC_E_CERTIFICATE_NOT_FOUND""n"n* "n Possible + values of the error code for HTTP status code 503 (Service Unavailable)"n"n"n + * "FABRIC_E_NO_WRITE_QUORUM""n * "FABRIC_E_NOT_PRIMARY""n * + "FABRIC_E_NOT_READY""n * "FABRIC_E_RECONFIGURATION_PENDING""n * + "FABRIC_E_SERVICE_OFFLINE""n * "E_ABORT""n * + "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values of the error code for + HTTP status code 504 (Gateway Timeout)"n"n"n * + "FABRIC_E_COMMUNICATION_ERROR""n * "FABRIC_E_OPERATION_NOT_COMPLETE""n * + "FABRIC_E_TIMEOUT". Known values are: "FABRIC_E_INVALID_PARTITION_KEY", + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", + "FABRIC_E_APPLICATION_NOT_UPGRADING", + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_FABRIC_NOT_UPGRADING", "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", + "FABRIC_E_PATH_TOO_LONG", "FABRIC_E_KEY_TOO_LARGE", + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", + "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", + "FABRIC_E_NODE_NOT_FOUND", "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", + "FABRIC_E_APPLICATION_NOT_FOUND", "FABRIC_E_SERVICE_TYPE_NOT_FOUND", + "FABRIC_E_SERVICE_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", "FABRIC_E_PARTITION_NOT_FOUND", + "FABRIC_E_REPLICA_DOES_NOT_EXIST", "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", "FABRIC_E_DIRECTORY_NOT_FOUND", + "FABRIC_E_FABRIC_VERSION_NOT_FOUND", "FABRIC_E_FILE_NOT_FOUND", + "FABRIC_E_NAME_DOES_NOT_EXIST", "FABRIC_E_PROPERTY_DOES_NOT_EXIST", + "FABRIC_E_ENUMERATION_COMPLETED", "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", + "FABRIC_E_KEY_NOT_FOUND", "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", + "FABRIC_E_SERVICE_ALREADY_EXISTS", "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_TYPE_IN_USE", + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", "FABRIC_E_FABRIC_VERSION_IN_USE", + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", "FABRIC_E_NAME_ALREADY_EXISTS", + "FABRIC_E_NAME_NOT_EMPTY", "FABRIC_E_PROPERTY_CHECK_FAILED", + "FABRIC_E_SERVICE_METADATA_MISMATCH", "FABRIC_E_SERVICE_TYPE_MISMATCH", + "FABRIC_E_HEALTH_STALE_REPORT", "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", + "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", + "FABRIC_E_NOT_PRIMARY", "FABRIC_E_NOT_READY", + "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", "E_ABORT", + "FABRIC_E_COMMUNICATION_ERROR", "FABRIC_E_OPERATION_NOT_COMPLETE", + "FABRIC_E_TIMEOUT", "FABRIC_E_NODE_IS_UP", "E_FAIL", + "FABRIC_E_BACKUP_IS_ENABLED", + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", "FABRIC_E_BACKUP_NOT_ENABLED", + "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", + "FABRIC_E_BACKUP_IN_PROGRESS", "FABRIC_E_RESTORE_IN_PROGRESS", + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", + "FABRIC_E_VOLUME_ALREADY_EXISTS", "FABRIC_E_VOLUME_NOT_FOUND", + "SerializationError", "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", + "FABRIC_E_CERTIFICATE_NOT_FOUND". + "Message": "str" # Optional. Error message. + }, + "RestoreState": "str", # Optional. Represents the current state of the + partition restore operation. Known values are: "Invalid", "Accepted", + "RestoreInProgress", "Success", "Failure", "Timeout". + "RestoredEpoch": { + "ConfigurationVersion": "str", # Optional. The current configuration + number of this Epoch. The configuration number is an increasing value that is + updated whenever the configuration of this replica set changes. + "DataLossVersion": "str" # Optional. The current data loss number of + this Epoch. The data loss number property is an increasing value which is + updated whenever data loss is suspected, as when loss of a quorum of replicas + in the replica set that includes the Primary replica. + }, + "RestoredLsn": "str", # Optional. Restored LSN. + "TimeStampUtc": "2020-02-20 00:00:00" # Optional. Timestamp when operation + succeeded or failed. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_partition_restore_progress_request( + partition_id=partition_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_backups_from_backup_location( + self, + get_backup_by_storage_query_description: JSON, + *, + timeout: Optional[int] = 60, + continuation_token_parameter: Optional[str] = None, + max_results: Optional[int] = 0, + **kwargs: Any + ) -> JSON: + """Gets the list of backups available for the specified backed up entity at the specified backup + location. + + Gets the list of backups available for the specified backed up entity (Application, Service or + Partition) at the specified backup location (FileShare or Azure Blob Storage). + + :param get_backup_by_storage_query_description: Describes the filters and backup storage + details to be used for enumerating backups. + :type get_backup_by_storage_query_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 0. + :paramtype max_results: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + get_backup_by_storage_query_description = { + "BackupEntity": { + EntityKind: EntityKind + }, + "EndDateTimeFilter": "2020-02-20 00:00:00", # Optional. Specifies the end + date time in ISO8601 till which to enumerate backups. If not specified, backups + are enumerated till the end. + "Latest": bool, # Optional. If specified as true, gets the most recent + backup (within the specified time range) for every partition under the specified + backup entity. + "StartDateTimeFilter": "2020-02-20 00:00:00", # Optional. Specifies the + start date time in ISO8601 from which to enumerate backups. If not specified, + backups are enumerated from the beginning. + "Storage": { + "FriendlyName": "str", # Optional. Friendly name for this backup + storage. + StorageKind: StorageKind + } + } + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "ApplicationName": "str", # Optional. Name of the Service + Fabric application this partition backup belongs to. + "BackupChainId": str, # Optional. Unique backup chain ID. + All backups part of the same chain has the same backup chain id. A backup + chain is comprised of 1 full backup and multiple incremental backups. + "BackupId": str, # Optional. Unique backup ID . + "BackupLocation": "str", # Optional. Location of the backup, + relative to the backup store. + "BackupType": "str", # Optional. Describes the type of + backup, whether its full or incremental. Known values are: "Invalid", + "Full", "Incremental". + "CreationTimeUtc": "2020-02-20 00:00:00", # Optional. The + date time when this backup was taken. + "EpochOfLastBackupRecord": { + "ConfigurationVersion": "str", # Optional. The + current configuration number of this Epoch. The configuration number + is an increasing value that is updated whenever the configuration of + this replica set changes. + "DataLossVersion": "str" # Optional. The current + data loss number of this Epoch. The data loss number property is an + increasing value which is updated whenever data loss is suspected, as + when loss of a quorum of replicas in the replica set that includes + the Primary replica. + }, + "FailureError": { + "Code": "str", # Required. Defines the fabric error + codes that be returned as part of the error object in response to + Service Fabric API operations that are not successful. Following are + the error code values that can be returned for a specific HTTP status + code."n"n"n* "n Possible values of the error code for HTTP status + code 400 (Bad Request)"n"n"n * "FABRIC_E_INVALID_PARTITION_KEY""n * + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_ADDRESS""n * + "FABRIC_E_APPLICATION_NOT_UPGRADING""n * + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_FABRIC_NOT_UPGRADING""n * + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR""n * + "FABRIC_E_INVALID_CONFIGURATION""n * "FABRIC_E_INVALID_NAME_URI""n + * "FABRIC_E_PATH_TOO_LONG""n * "FABRIC_E_KEY_TOO_LARGE""n * + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED""n * + "FABRIC_E_INVALID_ATOMIC_GROUP""n * "FABRIC_E_VALUE_EMPTY""n * + "FABRIC_E_BACKUP_IS_ENABLED""n * + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH""n * + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES""n * + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY""n * "E_INVALIDARG""n"n* "n + Possible values of the error code for HTTP status code 404 (Not + Found)"n"n"n * "FABRIC_E_NODE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_TYPE_NOT_FOUND""n * + "FABRIC_E_APPLICATION_NOT_FOUND""n * + "FABRIC_E_SERVICE_TYPE_NOT_FOUND""n * + "FABRIC_E_SERVICE_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND""n * + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND""n * + "FABRIC_E_PARTITION_NOT_FOUND""n * + "FABRIC_E_REPLICA_DOES_NOT_EXIST""n * + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST""n * + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND""n * + "FABRIC_E_DIRECTORY_NOT_FOUND""n * + "FABRIC_E_FABRIC_VERSION_NOT_FOUND""n * "FABRIC_E_FILE_NOT_FOUND""n + * "FABRIC_E_NAME_DOES_NOT_EXIST""n * + "FABRIC_E_PROPERTY_DOES_NOT_EXIST""n * + "FABRIC_E_ENUMERATION_COMPLETED""n * + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND""n * "FABRIC_E_KEY_NOT_FOUND""n + * "FABRIC_E_HEALTH_ENTITY_NOT_FOUND""n * + "FABRIC_E_BACKUP_NOT_ENABLED""n * + "FABRIC_E_BACKUP_POLICY_NOT_EXISTING""n * + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING""n * + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR""n"n* "n Possible + values of the error code for HTTP status code 409 (Conflict)"n"n"n * + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS""n * + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_SERVICE_ALREADY_EXISTS""n * + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS""n * + "FABRIC_E_APPLICATION_TYPE_IN_USE""n * + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION""n * + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS""n * + "FABRIC_E_FABRIC_VERSION_IN_USE""n * + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS""n * + "FABRIC_E_NAME_ALREADY_EXISTS""n * "FABRIC_E_NAME_NOT_EMPTY""n * + "FABRIC_E_PROPERTY_CHECK_FAILED""n * + "FABRIC_E_SERVICE_METADATA_MISMATCH""n * + "FABRIC_E_SERVICE_TYPE_MISMATCH""n * + "FABRIC_E_HEALTH_STALE_REPORT""n * + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED""n * + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET""n * + "FABRIC_E_INSTANCE_ID_MISMATCH""n * "FABRIC_E_BACKUP_IN_PROGRESS""n + * "FABRIC_E_RESTORE_IN_PROGRESS""n * + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING""n"n* "n Possible values of + the error code for HTTP status code 413 (Request Entity Too + Large)"n"n"n * "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values + of the error code for HTTP status code 500 (Internal Server + Error)"n"n"n * "FABRIC_E_NODE_IS_UP""n * "E_FAIL""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS""n * + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND""n * + "FABRIC_E_VOLUME_ALREADY_EXISTS""n * "FABRIC_E_VOLUME_NOT_FOUND""n + * "SerializationError""n * "FABRIC_E_CERTIFICATE_NOT_FOUND""n"n* "n + Possible values of the error code for HTTP status code 503 (Service + Unavailable)"n"n"n * "FABRIC_E_NO_WRITE_QUORUM""n * + "FABRIC_E_NOT_PRIMARY""n * "FABRIC_E_NOT_READY""n * + "FABRIC_E_RECONFIGURATION_PENDING""n * "FABRIC_E_SERVICE_OFFLINE""n + * "E_ABORT""n * "FABRIC_E_VALUE_TOO_LARGE""n"n* "n Possible values + of the error code for HTTP status code 504 (Gateway Timeout)"n"n"n * + "FABRIC_E_COMMUNICATION_ERROR""n * + "FABRIC_E_OPERATION_NOT_COMPLETE""n * "FABRIC_E_TIMEOUT". Known + values are: "FABRIC_E_INVALID_PARTITION_KEY", + "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR", "FABRIC_E_INVALID_ADDRESS", + "FABRIC_E_APPLICATION_NOT_UPGRADING", + "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_FABRIC_NOT_UPGRADING", + "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR", + "FABRIC_E_INVALID_CONFIGURATION", "FABRIC_E_INVALID_NAME_URI", + "FABRIC_E_PATH_TOO_LONG", "FABRIC_E_KEY_TOO_LARGE", + "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED", + "FABRIC_E_INVALID_ATOMIC_GROUP", "FABRIC_E_VALUE_EMPTY", + "FABRIC_E_NODE_NOT_FOUND", "FABRIC_E_APPLICATION_TYPE_NOT_FOUND", + "FABRIC_E_APPLICATION_NOT_FOUND", "FABRIC_E_SERVICE_TYPE_NOT_FOUND", + "FABRIC_E_SERVICE_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND", + "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND", + "FABRIC_E_PARTITION_NOT_FOUND", "FABRIC_E_REPLICA_DOES_NOT_EXIST", + "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST", + "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND", + "FABRIC_E_DIRECTORY_NOT_FOUND", "FABRIC_E_FABRIC_VERSION_NOT_FOUND", + "FABRIC_E_FILE_NOT_FOUND", "FABRIC_E_NAME_DOES_NOT_EXIST", + "FABRIC_E_PROPERTY_DOES_NOT_EXIST", "FABRIC_E_ENUMERATION_COMPLETED", + "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND", "FABRIC_E_KEY_NOT_FOUND", + "FABRIC_E_HEALTH_ENTITY_NOT_FOUND", + "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS", + "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS", + "FABRIC_E_SERVICE_ALREADY_EXISTS", + "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS", + "FABRIC_E_APPLICATION_TYPE_IN_USE", + "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION", + "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS", + "FABRIC_E_FABRIC_VERSION_IN_USE", + "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS", + "FABRIC_E_NAME_ALREADY_EXISTS", "FABRIC_E_NAME_NOT_EMPTY", + "FABRIC_E_PROPERTY_CHECK_FAILED", + "FABRIC_E_SERVICE_METADATA_MISMATCH", + "FABRIC_E_SERVICE_TYPE_MISMATCH", "FABRIC_E_HEALTH_STALE_REPORT", + "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED", + "FABRIC_E_NODE_HAS_NOT_STOPPED_YET", "FABRIC_E_INSTANCE_ID_MISMATCH", + "FABRIC_E_VALUE_TOO_LARGE", "FABRIC_E_NO_WRITE_QUORUM", + "FABRIC_E_NOT_PRIMARY", "FABRIC_E_NOT_READY", + "FABRIC_E_RECONFIGURATION_PENDING", "FABRIC_E_SERVICE_OFFLINE", + "E_ABORT", "FABRIC_E_COMMUNICATION_ERROR", + "FABRIC_E_OPERATION_NOT_COMPLETE", "FABRIC_E_TIMEOUT", + "FABRIC_E_NODE_IS_UP", "E_FAIL", "FABRIC_E_BACKUP_IS_ENABLED", + "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH", + "FABRIC_E_INVALID_FOR_STATELESS_SERVICES", + "FABRIC_E_BACKUP_NOT_ENABLED", "FABRIC_E_BACKUP_POLICY_NOT_EXISTING", + "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING", + "FABRIC_E_BACKUP_IN_PROGRESS", "FABRIC_E_RESTORE_IN_PROGRESS", + "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING", + "FABRIC_E_INVALID_SERVICE_SCALING_POLICY", "E_INVALIDARG", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS", + "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND", + "FABRIC_E_VOLUME_ALREADY_EXISTS", "FABRIC_E_VOLUME_NOT_FOUND", + "SerializationError", + "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR", + "FABRIC_E_CERTIFICATE_NOT_FOUND". + "Message": "str" # Optional. Error message. + }, + "LsnOfLastBackupRecord": "str", # Optional. LSN of the last + record in this backup. + "PartitionInformation": { + "Id": str, # Optional. An internal ID used by + Service Fabric to uniquely identify a partition. This is a randomly + generated GUID when the service was created. The partition ID is + unique and does not change for the lifetime of the service. If the + same service was deleted and recreated the IDs of its partitions + would be different. + ServicePartitionKind: ServicePartitionKind + }, + "ServiceManifestVersion": "str", # Optional. Manifest + Version of the service this partition backup belongs to. + "ServiceName": "str" # Optional. Name of the Service Fabric + service this partition backup belongs to. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = get_backup_by_storage_query_description + + request = build_get_backups_from_backup_location_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + continuation_token_parameter=continuation_token_parameter, + max_results=max_results, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def create_name( # pylint: disable=inconsistent-return-statements + self, + name_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates a Service Fabric name. + + Creates the specified Service Fabric name. + + :param name_description: Describes the Service Fabric name to be created. + :type name_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + name_description = { + "Name": "str" # Required. The Service Fabric name, including the 'fabric:' + URI scheme. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = name_description + + request = build_create_name_request( + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_name_exists_info( # pylint: disable=inconsistent-return-statements + self, + name_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Returns whether the Service Fabric name exists. + + Returns whether the specified Service Fabric name exists. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_get_name_exists_info_request( + name_id=name_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def delete_name( # pylint: disable=inconsistent-return-statements + self, + name_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes a Service Fabric name. + + Deletes the specified Service Fabric name. A name must be created before it can be deleted. + Deleting a name with child properties will fail. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_delete_name_request( + name_id=name_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_sub_name_info_list( + self, + name_id: str, + *, + recursive: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Enumerates all the Service Fabric names under a given name. + + Enumerates all the Service Fabric names under a given name. If the subnames do not fit in a + page, one page of results is returned as well as a continuation token, which can be used to get + the next page. Querying a name that doesn't exist will fail. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :keyword recursive: Allows specifying that the search performed should be recursive. Default + value is False. + :paramtype recursive: bool + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "IsConsistent": bool, # Optional. Indicates whether any name under the given + name has been modified during the enumeration. If there was a modification, this + property value is false. + "SubNames": [ + "str" # Optional. List of the child names. + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_sub_name_info_list_request( + name_id=name_id, + api_version=api_version, + recursive=recursive, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_property_info_list( + self, + name_id: str, + *, + include_values: Optional[bool] = False, + continuation_token_parameter: Optional[str] = None, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets information on all Service Fabric properties under a given name. + + A Service Fabric name can have one or more named properties that store custom information. This + operation gets the information about these properties in a paged list. The information includes + name, value, and metadata about each of the properties. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :keyword include_values: Allows specifying whether to include the values of the properties + returned. True if values should be returned with the metadata; False to return only property + metadata. Default value is False. + :paramtype include_values: bool + :keyword continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "IsConsistent": bool, # Optional. Indicates whether any property under the + given name has been modified during the enumeration. If there was a modification, + this property value is false. + "Properties": [ + { + "Metadata": { + "CustomTypeId": "str", # Optional. The property's + custom type ID. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. Represents when the Property was last modified. Only write + operations will cause this field to be updated. + "Parent": "str", # Optional. The name of the parent + Service Fabric Name for the property. It could be thought of as the + name-space/table under which the property exists. + "SequenceNumber": "str", # Optional. The version of + the property. Every time a property is modified, its sequence number + is increased. + "SizeInBytes": 0, # Optional. The length of the + serialized property value. + "TypeId": "str" # Optional. The kind of property, + determined by the type of data. Following are the possible values. + Known values are: "Invalid", "Binary", "Int64", "Double", "String", + "Guid". + }, + "Name": "str", # Required. The name of the Service Fabric + property. + "Value": { + Kind: Kind + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_property_info_list_request( + name_id=name_id, + api_version=api_version, + include_values=include_values, + continuation_token_parameter=continuation_token_parameter, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def put_property( # pylint: disable=inconsistent-return-statements + self, + name_id: str, + property_description: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Creates or updates a Service Fabric property. + + Creates or updates the specified Service Fabric property under a given name. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param property_description: Describes the Service Fabric property to be created. + :type property_description: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + property_description = { + "CustomTypeId": "str", # Optional. The property's custom type ID. Using this + property, the user is able to tag the type of the value of the property. + "PropertyName": "str", # Required. The name of the Service Fabric property. + "Value": { + Kind: Kind + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[None] + + _json = property_description + + request = build_put_property_request( + name_id=name_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def get_property_info( + self, + name_id: str, + *, + property_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Gets the specified Service Fabric property. + + Gets the specified Service Fabric property under a given name. This will always return both + value and metadata. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :keyword property_name: Specifies the name of the property to get. + :paramtype property_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Metadata": { + "CustomTypeId": "str", # Optional. The property's custom type ID. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # Optional. + Represents when the Property was last modified. Only write operations will + cause this field to be updated. + "Parent": "str", # Optional. The name of the parent Service Fabric + Name for the property. It could be thought of as the name-space/table under + which the property exists. + "SequenceNumber": "str", # Optional. The version of the property. + Every time a property is modified, its sequence number is increased. + "SizeInBytes": 0, # Optional. The length of the serialized property + value. + "TypeId": "str" # Optional. The kind of property, determined by the + type of data. Following are the possible values. Known values are: "Invalid", + "Binary", "Int64", "Double", "String", "Guid". + }, + "Name": "str", # Required. The name of the Service Fabric property. + "Value": { + Kind: Kind + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_get_property_info_request( + name_id=name_id, + api_version=api_version, + property_name=property_name, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def delete_property( # pylint: disable=inconsistent-return-statements + self, + name_id: str, + *, + property_name: str, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> None: + """Deletes the specified Service Fabric property. + + Deletes the specified Service Fabric property under a given name. A property must be created + before it can be deleted. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :keyword property_name: Specifies the name of the property to get. + :paramtype property_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_delete_property_request( + name_id=name_id, + api_version=api_version, + property_name=property_name, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def submit_property_batch( + self, + name_id: str, + property_batch_description_list: JSON, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> JSON: + """Submits a property batch. + + Submits a batch of property operations. Either all or none of the operations will be committed. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param property_batch_description_list: Describes the property batch operations to be + submitted. + :type property_batch_description_list: JSON + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This is the latest supported version of the API. If a lower API version is passed, the returned + response may be different from the one documented in this specification. + + Additionally the runtime accept any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0, but if the + runtime is 6.1, in order to make it easier to write the clients, the runtime will accept + version 6.1 for that API. However the behavior of the API will be as per the documented 6.0 + version. Default value is "6.0". Note that overriding this default value may result in + unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + property_batch_description_list = { + "Operations": [ + { + "PropertyName": "str", # Required. The name of the Service + Fabric property. + Kind: Kind + } + ] + } + + # response body for status code(s): 200 + response.json() == { + "Properties": { + "str": { + "Metadata": { + "CustomTypeId": "str", # Optional. The property's + custom type ID. + "LastModifiedUtcTimestamp": "2020-02-20 00:00:00", # + Optional. Represents when the Property was last modified. Only write + operations will cause this field to be updated. + "Parent": "str", # Optional. The name of the parent + Service Fabric Name for the property. It could be thought of as the + name-space/table under which the property exists. + "SequenceNumber": "str", # Optional. The version of + the property. Every time a property is modified, its sequence number + is increased. + "SizeInBytes": 0, # Optional. The length of the + serialized property value. + "TypeId": "str" # Optional. The kind of property, + determined by the type of data. Following are the possible values. + Known values are: "Invalid", "Binary", "Int64", "Double", "String", + "Guid". + }, + "Name": "str", # Required. The name of the Service Fabric + property. + "Value": { + Kind: Kind + } + } + }, + Kind: Successful + } + # response body for status code(s): 409 + response.json() == { + "ErrorMessage": "str", # Optional. The error message of the failed + operation. Describes the exception thrown due to the first unsuccessful operation + in the property batch. + "OperationIndex": 0, # Optional. The index of the unsuccessful operation in + the property batch. + Kind: Failed + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.0")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + _json = property_batch_description_list + + request = build_submit_property_batch_request( + name_id=name_id, + api_version=api_version, + content_type=content_type, + json=_json, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 409]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 409: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_cluster_event_list( + self, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets all Cluster-related events. + + The response is list of ClusterEvent objects. + + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: ClusterEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_cluster_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def get_containers_event_list( + self, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets all Containers-related events. + + The response is list of ContainerInstanceEvent objects. + + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.2-preview'. Default value is "6.2-preview". Note that overriding this default value may + result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: ContainerInstanceEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.2-preview")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_containers_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def get_node_event_list( + self, + node_name: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets a Node-related events. + + The response is list of NodeEvent objects. + + :param node_name: The name of the node. + :type node_name: str + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "NodeName": "str", # Required. The name of a Service Fabric node. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: NodeEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_node_event_list_request( + node_name=node_name, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def get_nodes_event_list( + self, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets all Nodes-related Events. + + The response is list of NodeEvent objects. + + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "NodeName": "str", # Required. The name of a Service Fabric node. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: NodeEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_nodes_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def get_application_event_list( + self, + application_id: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets an Application-related events. + + The response is list of ApplicationEvent objects. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "ApplicationId": "str", # Required. The identity of the application. + This is an encoded representation of the application name. This is used in + the REST APIs to identify the application resource."nStarting in version 6.0, + hierarchical names are delimited with the "~" character. For example, if the + application name is "fabric:/myapp/app1","nthe application identity would be + "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: ApplicationEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_application_event_list_request( + application_id=application_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def get_applications_event_list( + self, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets all Applications-related events. + + The response is list of ApplicationEvent objects. + + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "ApplicationId": "str", # Required. The identity of the application. + This is an encoded representation of the application name. This is used in + the REST APIs to identify the application resource."nStarting in version 6.0, + hierarchical names are delimited with the "~" character. For example, if the + application name is "fabric:/myapp/app1","nthe application identity would be + "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: ApplicationEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_applications_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def get_service_event_list( + self, + service_id: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets a Service-related events. + + The response is list of ServiceEvent objects. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "ServiceId": "str", # 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."nStarting in version 6.0, hierarchical + names are delimited with the "~" character. For example, if the service name + is "fabric:/myapp/app1/svc1","nthe service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: ServiceEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_service_event_list_request( + service_id=service_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def get_services_event_list( + self, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets all Services-related events. + + The response is list of ServiceEvent objects. + + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "ServiceId": "str", # 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."nStarting in version 6.0, hierarchical + names are delimited with the "~" character. For example, if the service name + is "fabric:/myapp/app1/svc1","nthe service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: ServiceEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_services_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def get_partition_event_list( + self, + partition_id: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets a Partition-related events. + + The response is list of PartitionEvent objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "PartitionId": str, # Required. An internal ID used by Service + Fabric to uniquely identify a partition. This is a randomly generated GUID + when the service was created. The partition ID is unique and does not change + for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: PartitionEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_partition_event_list_request( + partition_id=partition_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def get_partitions_event_list( + self, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets all Partitions-related events. + + The response is list of PartitionEvent objects. + + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "PartitionId": str, # Required. An internal ID used by Service + Fabric to uniquely identify a partition. This is a randomly generated GUID + when the service was created. The partition ID is unique and does not change + for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: PartitionEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_partitions_event_list_request( + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def get_partition_replica_event_list( + self, + partition_id: str, + replica_id: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets a Partition Replica-related events. + + The response is list of ReplicaEvent objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "PartitionId": str, # Required. An internal ID used by Service + Fabric to uniquely identify a partition. This is a randomly generated GUID + when the service was created. The partition ID is unique and does not change + for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + "ReplicaId": 0.0, # Required. Id of a stateful service replica. + ReplicaId is used by Service Fabric to uniquely identify a replica of a + partition. It is unique within a partition and does not change for the + lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different + value for the id. Sometimes the id of a stateless service instance is also + referred as a replica id. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: ReplicaEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_partition_replica_event_list_request( + partition_id=partition_id, + replica_id=replica_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def get_partition_replicas_event_list( + self, + partition_id: str, + *, + start_time_utc: str, + end_time_utc: str, + timeout: Optional[int] = 60, + events_types_filter: Optional[str] = None, + exclude_analysis_events: Optional[bool] = None, + skip_correlation_lookup: Optional[bool] = None, + **kwargs: Any + ) -> List[JSON]: + """Gets all Replicas-related events for a Partition. + + The response is list of ReplicaEvent objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :keyword start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :keyword end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :keyword exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :keyword skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + :paramtype skip_correlation_lookup: bool + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "PartitionId": str, # Required. An internal ID used by Service + Fabric to uniquely identify a partition. This is a randomly generated GUID + when the service was created. The partition ID is unique and does not change + for the lifetime of the service. If the same service was deleted and + recreated the IDs of its partitions would be different. + "ReplicaId": 0.0, # Required. Id of a stateful service replica. + ReplicaId is used by Service Fabric to uniquely identify a replica of a + partition. It is unique within a partition and does not change for the + lifetime of the replica. If a replica gets dropped and another replica gets + created on the same node for the same partition, it will get a different + value for the id. Sometimes the id of a stateless service instance is also + referred as a replica id. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: ReplicaEvent + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_partition_replicas_event_list_request( + partition_id=partition_id, + api_version=api_version, + start_time_utc=start_time_utc, + end_time_utc=end_time_utc, + timeout=timeout, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + + + @distributed_trace + def get_correlated_event_list( + self, + event_instance_id: str, + *, + timeout: Optional[int] = 60, + **kwargs: Any + ) -> List[JSON]: + """Gets all correlated events for a given event. + + The response is list of FabricEvents. + + :param event_instance_id: The EventInstanceId. + :type event_instance_id: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :keyword api_version: The version of the API. This parameter is required and its value must be + '6.4'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "6.4". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: list of JSON object + :rtype: list[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == [ + { + "Category": "str", # Optional. The category of event. + "EventInstanceId": str, # Required. The identifier for the + FabricEvent instance. + "HasCorrelatedEvents": bool, # Optional. Shows there is existing + related events available. + "TimeStamp": "2020-02-20 00:00:00", # Required. The time event was + logged. + Kind: Kind + } + ] + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "6.4")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[List[JSON]] + + + request = build_get_correlated_event_list_request( + event_instance_id=event_instance_id, + api_version=api_version, + timeout=timeout, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(List[JSON], deserialized), {}) + + return cast(List[JSON], deserialized) + + +class MeshSecretOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_secret` attribute. + """ + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace + def create_or_update( + self, + secret_resource_name: str, + secret_resource_description: JSON, + **kwargs: Any + ) -> Optional[JSON]: + """Creates or updates a Secret resource. + + Creates a Secret resource with the specified name, description and properties. If Secret + resource with the same name exists, then it is updated with the specified description and + properties. Once created, the kind and contentType of a secret resource cannot be updated. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_resource_description: Description for creating a secret resource. + :type secret_resource_description: JSON + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + secret_resource_description = { + "name": "str", # Required. Name of the Secret resource. + "properties": { + "contentType": "str", # Optional. The type of the content stored in + the secret value. The value of this property is opaque to Service Fabric. + Once set, the value of this property cannot be changed. + "description": "str", # Optional. User readable description of the + secret. + "status": "str", # Optional. Status of the resource. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the secret. + kind: SecretResourceProperties + } + } + + # response body for status code(s): 200, 201 + response.json() == { + "name": "str", # Required. Name of the Secret resource. + "properties": { + "contentType": "str", # Optional. The type of the content stored in + the secret value. The value of this property is opaque to Service Fabric. + Once set, the value of this property cannot be changed. + "description": "str", # Optional. User readable description of the + secret. + "status": "str", # Optional. Status of the resource. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the secret. + kind: SecretResourceProperties + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + _json = secret_resource_description + + request = build_mesh_secret_create_or_update_request( + secret_resource_name=secret_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 201: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace + def get( + self, + secret_resource_name: str, + **kwargs: Any + ) -> JSON: + """Gets the Secret resource with the given name. + + Gets the information about the Secret resource with the given name. The information include the + description and other properties of the Secret. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "name": "str", # Required. Name of the Secret resource. + "properties": { + "contentType": "str", # Optional. The type of the content stored in + the secret value. The value of this property is opaque to Service Fabric. + Once set, the value of this property cannot be changed. + "description": "str", # Optional. User readable description of the + secret. + "status": "str", # Optional. Status of the resource. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the secret. + kind: SecretResourceProperties + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_secret_get_request( + secret_resource_name=secret_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + secret_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the Secret resource. + + Deletes the specified Secret resource and all of its named values. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_mesh_secret_delete_request( + secret_resource_name=secret_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> JSON: + """Lists all the secret resources. + + Gets the information about all secret resources in a given resource group. The information + include the description and other properties of the Secret. + + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "name": "str", # Required. Name of the Secret resource. + "properties": { + "contentType": "str", # Optional. The type of the + content stored in the secret value. The value of this property is + opaque to Service Fabric. Once set, the value of this property cannot + be changed. + "description": "str", # Optional. User readable + description of the secret. + "status": "str", # Optional. Status of the resource. + Known values are: "Unknown", "Ready", "Upgrading", "Creating", + "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional + information about the current status of the secret. + kind: SecretResourceProperties + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_secret_list_request( + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + +class MeshSecretValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_secret_value` attribute. + """ + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace + def add_value( + self, + secret_resource_name: str, + secret_value_resource_name: str, + secret_value_resource_description: JSON, + **kwargs: Any + ) -> Optional[JSON]: + """Adds the specified value as a new version of the specified secret resource. + + Creates a new value of the specified secret resource. The name of the value is typically the + version identifier. Once created the value cannot be changed. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource value which is typically the + version identifier for the value. + :type secret_value_resource_name: str + :param secret_value_resource_description: Description for creating a value of a secret + resource. + :type secret_value_resource_description: JSON + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + secret_value_resource_description = { + "name": "str", # Required. Version identifier of the secret value. + "properties": { + "value": "str" # Optional. The actual value of the secret. + } + } + + # response body for status code(s): 200, 201 + response.json() == { + "name": "str", # Required. Version identifier of the secret value. + "properties": { + "value": "str" # Optional. The actual value of the secret. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + _json = secret_value_resource_description + + request = build_mesh_secret_value_add_value_request( + secret_resource_name=secret_resource_name, + secret_value_resource_name=secret_value_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 201: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace + def get( + self, + secret_resource_name: str, + secret_value_resource_name: str, + **kwargs: Any + ) -> JSON: + """Gets the specified secret value resource. + + Get the information about the specified named secret value resources. The information does not + include the actual value of the secret. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource value which is typically the + version identifier for the value. + :type secret_value_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "name": "str", # Required. Version identifier of the secret value. + "properties": { + "value": "str" # Optional. The actual value of the secret. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_secret_value_get_request( + secret_resource_name=secret_resource_name, + secret_value_resource_name=secret_value_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + secret_resource_name: str, + secret_value_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the specified value of the named secret resource. + + Deletes the secret value resource identified by the name. The name of the resource is typically + the version associated with that value. Deletion will fail if the specified value is in use. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource value which is typically the + version identifier for the value. + :type secret_value_resource_name: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_mesh_secret_value_delete_request( + secret_resource_name=secret_resource_name, + secret_value_resource_name=secret_value_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def list( + self, + secret_resource_name: str, + **kwargs: Any + ) -> JSON: + """List names of all values of the specified secret resource. + + Gets information about all secret value resources of the specified secret resource. The + information includes the names of the secret value resources, but not the actual values. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "name": "str", # Required. Version identifier of the secret + value. + "properties": { + "value": "str" # Optional. The actual value of the + secret. + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_secret_value_list_request( + secret_resource_name=secret_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def show( + self, + secret_resource_name: str, + secret_value_resource_name: str, + **kwargs: Any + ) -> JSON: + """Lists the specified value of the secret resource. + + Lists the decrypted value of the specified named value of the secret resource. This is a + privileged operation. + + :param secret_resource_name: The name of the secret resource. + :type secret_resource_name: str + :param secret_value_resource_name: The name of the secret resource value which is typically the + version identifier for the value. + :type secret_value_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "value": "str" # Optional. The actual value of the secret. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_secret_value_show_request( + secret_resource_name=secret_resource_name, + secret_value_resource_name=secret_value_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + +class MeshVolumeOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_volume` attribute. + """ + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace + def create_or_update( + self, + volume_resource_name: str, + volume_resource_description: JSON, + **kwargs: Any + ) -> Optional[JSON]: + """Creates or updates a Volume resource. + + Creates a Volume resource with the specified name, description and properties. If Volume + resource with the same name exists, then it is updated with the specified description and + properties. + + :param volume_resource_name: The identity of the volume. + :type volume_resource_name: str + :param volume_resource_description: Description for creating a Volume resource. + :type volume_resource_description: JSON + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + volume_resource_description = { + "name": "str", # Required. Name of the Volume resource. + "properties": { + "azureFileParameters": { + "accountKey": "str", # Optional. Access key of the Azure + storage account for the File Share. + "accountName": "str", # Required. Name of the Azure storage + account for the File Share. + "shareName": "str" # Required. Name of the Azure Files file + share that provides storage for the volume. + }, + "description": "str", # Optional. User readable description of the + volume. + "provider": "SFAzureFile", # Default value is "SFAzureFile". + Required. Provider of the volume. Known values are: "SFAzureFile". + "status": "str", # Optional. Status of the volume. Known values are: + "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str" # Optional. Gives additional information + about the current status of the volume. + } + } + + # response body for status code(s): 200, 201 + response.json() == { + "name": "str", # Required. Name of the Volume resource. + "properties": { + "azureFileParameters": { + "accountKey": "str", # Optional. Access key of the Azure + storage account for the File Share. + "accountName": "str", # Required. Name of the Azure storage + account for the File Share. + "shareName": "str" # Required. Name of the Azure Files file + share that provides storage for the volume. + }, + "description": "str", # Optional. User readable description of the + volume. + "provider": "SFAzureFile", # Default value is "SFAzureFile". + Required. Provider of the volume. Known values are: "SFAzureFile". + "status": "str", # Optional. Status of the volume. Known values are: + "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str" # Optional. Gives additional information + about the current status of the volume. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + _json = volume_resource_description + + request = build_mesh_volume_create_or_update_request( + volume_resource_name=volume_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 201: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace + def get( + self, + volume_resource_name: str, + **kwargs: Any + ) -> JSON: + """Gets the Volume resource with the given name. + + Gets the information about the Volume resource with the given name. The information include the + description and other properties of the Volume. + + :param volume_resource_name: The identity of the volume. + :type volume_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "name": "str", # Required. Name of the Volume resource. + "properties": { + "azureFileParameters": { + "accountKey": "str", # Optional. Access key of the Azure + storage account for the File Share. + "accountName": "str", # Required. Name of the Azure storage + account for the File Share. + "shareName": "str" # Required. Name of the Azure Files file + share that provides storage for the volume. + }, + "description": "str", # Optional. User readable description of the + volume. + "provider": "SFAzureFile", # Default value is "SFAzureFile". + Required. Provider of the volume. Known values are: "SFAzureFile". + "status": "str", # Optional. Status of the volume. Known values are: + "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str" # Optional. Gives additional information + about the current status of the volume. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_volume_get_request( + volume_resource_name=volume_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + volume_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the Volume resource. + + Deletes the Volume resource identified by the name. + + :param volume_resource_name: The identity of the volume. + :type volume_resource_name: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_mesh_volume_delete_request( + volume_resource_name=volume_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> JSON: + """Lists all the volume resources. + + Gets the information about all volume resources in a given resource group. The information + include the description and other properties of the Volume. + + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "name": "str", # Required. Name of the Volume resource. + "properties": { + "azureFileParameters": { + "accountKey": "str", # Optional. Access key + of the Azure storage account for the File Share. + "accountName": "str", # Required. Name of + the Azure storage account for the File Share. + "shareName": "str" # Required. Name of the + Azure Files file share that provides storage for the volume. + }, + "description": "str", # Optional. User readable + description of the volume. + "provider": "SFAzureFile", # Default value is + "SFAzureFile". Required. Provider of the volume. Known values are: + "SFAzureFile". + "status": "str", # Optional. Status of the volume. + Known values are: "Unknown", "Ready", "Upgrading", "Creating", + "Deleting", "Failed". + "statusDetails": "str" # Optional. Gives additional + information about the current status of the volume. + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_volume_list_request( + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + +class MeshNetworkOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_network` attribute. + """ + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace + def create_or_update( + self, + network_resource_name: str, + network_resource_description: JSON, + **kwargs: Any + ) -> Optional[JSON]: + """Creates or updates a Network resource. + + Creates a Network resource with the specified name, description and properties. If Network + resource with the same name exists, then it is updated with the specified description and + properties. Network resource provides connectivity between application services. + + :param network_resource_name: The identity of the network. + :type network_resource_name: str + :param network_resource_description: Description for creating a Network resource. + :type network_resource_description: JSON + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + + # JSON input template you can fill out and use as your body input. + network_resource_description = { + "name": "str", # Required. Name of the Network resource. + "properties": { + "description": "str", # Optional. User readable description of the + network. + "status": "str", # Optional. Status of the network. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the network. + kind: NetworkResourceProperties + } + } + + # response body for status code(s): 200, 201 + response.json() == { + "name": "str", # Required. Name of the Network resource. + "properties": { + "description": "str", # Optional. User readable description of the + network. + "status": "str", # Optional. Status of the network. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the network. + kind: NetworkResourceProperties + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + _json = network_resource_description + + request = build_mesh_network_create_or_update_request( + network_resource_name=network_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 201: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace + def get( + self, + network_resource_name: str, + **kwargs: Any + ) -> JSON: + """Gets the Network resource with the given name. + + Gets the information about the Network resource with the given name. The information include + the description and other properties of the Network. + + :param network_resource_name: The identity of the network. + :type network_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "name": "str", # Required. Name of the Network resource. + "properties": { + "description": "str", # Optional. User readable description of the + network. + "status": "str", # Optional. Status of the network. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the network. + kind: NetworkResourceProperties + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_network_get_request( + network_resource_name=network_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + network_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the Network resource. + + Deletes the Network resource identified by the name. + + :param network_resource_name: The identity of the network. + :type network_resource_name: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_mesh_network_delete_request( + network_resource_name=network_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> JSON: + """Lists all the network resources. + + Gets the information about all network resources in a given resource group. The information + include the description and other properties of the Network. + + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "name": "str", # Required. Name of the Network resource. + "properties": { + "description": "str", # Optional. User readable + description of the network. + "status": "str", # Optional. Status of the network. + Known values are: "Unknown", "Ready", "Upgrading", "Creating", + "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional + information about the current status of the network. + kind: NetworkResourceProperties + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_network_list_request( + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + +class MeshApplicationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_application` attribute. + """ + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace + def create_or_update( + self, + application_resource_name: str, + application_resource_description: JSON, + **kwargs: Any + ) -> Optional[JSON]: + """Creates or updates a Application resource. + + Creates a Application resource with the specified name, description and properties. If + Application resource with the same name exists, then it is updated with the specified + description and properties. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param application_resource_description: Description for creating a Application resource. + :type application_resource_description: JSON + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + application_resource_description = { + "identity": { + "principalId": "str", # Optional. the object identifier of the + Service Principal of the identity associated with this resource. + "tenantId": "str", # Optional. the identifier of the tenant + containing the application's identity. + "tokenServiceEndpoint": "str", # Optional. the endpoint for the + token service managing this identity. + "type": "str", # Required. the types of identities associated with + this resource; currently restricted to 'SystemAssigned and UserAssigned'. + "userAssignedIdentities": { + "str": { + "clientId": "str", # Optional. the client identifier + of the Service Principal which this identity represents. + "principalId": "str" # Optional. the object + identifier of the Service Principal which this identity represents. + } + } + }, + "name": "str", # Required. Name of the Application resource. + "properties": { + "debugParams": "str", # Optional. Internal - used by Visual Studio + to setup the debugging session on the local development environment. + "description": "str", # Optional. User readable description of the + application. + "diagnostics": { + "defaultSinkRefs": [ + "str" # Optional. The sinks to be used if + diagnostics is enabled. Sink choices can be overridden at the service + and code package level. + ], + "enabled": bool, # Optional. Status of whether or not sinks + are enabled. + "sinks": [ + { + "description": "str", # Optional. A + description of the sink. + "name": "str", # Optional. Name of the sink. + This value is referenced by DiagnosticsReferenceDescription. + kind: kind + } + ] + }, + "healthState": "str", # Optional. Describes the health state of an + application resource. Known values are: "Invalid", "Ok", "Warning", "Error", + "Unknown". + "serviceNames": [ + "str" # Optional. Names of the services in the application. + ], + "services": [ + { + "name": "str", # Required. Name of the Service + resource. + "properties": { + "autoScalingPolicies": [ + { + "mechanism": { + kind: kind + }, + "name": "str", # Required. + The name of the auto scaling policy. + "trigger": { + kind: kind + } + } + ], + "codePackages": [ + { + "commands": [ + "str" # Optional. + Command array to execute within the container in exec + form. + ], + "diagnostics": { + "enabled": bool, # + Optional. Status of whether or not sinks are enabled. + "sinkRefs": [ + "str" # + Optional. List of sinks to be used if enabled. + References the list of sinks in + DiagnosticsDescription. + ] + }, + "endpoints": [ + { + "name": + "str", # Required. The name of the endpoint. + "port": 0 # + Optional. Port used by the container. + } + ], + "entryPoint": "str", # + Optional. Override for the default entry point in the + container. + "environmentVariables": [ + { + "name": + "str", # Optional. The name of the environment + variable. + "type": + "ClearText", # Optional. Default value is + "ClearText". The type of the environment variable + being given in value. Known values are: + "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: + "ClearText". + "value": + "str" # Optional. The value of the environment + variable, will be processed based on the type + provided. + } + ], + "image": "str", # Required. + The Container image to use. + "imageRegistryCredential": { + "password": "str", # + Optional. The password for the private registry. The + password is required for create or update operations, + however it is not returned in the get or list + operations. Will be processed based on the type + provided. + "passwordType": + "ClearText", # Optional. Default value is + "ClearText". The type of the image registry password + being given in password. Known values are: + "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: "ClearText". + "server": "str", # + Required. Docker image registry server, without + protocol such as ``http`` and ``https``. + "username": "str" # + Required. The username for the private registry. + }, + "instanceView": { + "currentState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": + "str", # Optional. The container exit code. + "finishTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state finished. + "startTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state started. + "state": + "str" # Optional. The state of this container. + }, + "events": [ + { + "count": 0, # Optional. The count of the + event. + "firstTimestamp": "str", # Optional. + Date/time of the first event. + "lastTimestamp": "str", # Optional. + Date/time of the last event. + "message": "str", # Optional. The event + message. + "name": "str", # Optional. The name of the + container event. + "type": "str" # Optional. The event type. + } + ], + "previousState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": + "str", # Optional. The container exit code. + "finishTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state finished. + "startTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state started. + "state": + "str" # Optional. The state of this container. + }, + "restartCount": 0 # + Optional. The number of times the container has been + restarted. + }, + "labels": [ + { + "name": + "str", # Required. The name of the container + label. + "value": + "str" # Required. The value of the container + label. + } + ], + "livenessProbe": [ + { + "exec": { + "command": "str" # Required. Comma separated + command to run inside the container for + example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. Default value + is 3. The count of failures after which probe is + considered failed. + "httpGet": { + "host": "str", # Optional. Host IP to + connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name + of the header. + "value": "str" # Required. The value + of the header. + } + ], + "path": "str", # Optional. Path to access on + the HTTP request. + "port": 0, # Required. Port to access for + probe. + "scheme": "str" # Optional. Scheme for the + http probe. Can be Http or Https. Known + values are: "http", "https". + }, + "initialDelaySeconds": 0, # Optional. The + initial delay in seconds to start executing probe + once codepackage has started. + "periodSeconds": 10, # Optional. Default value + is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. Default value + is 1. The count of successful probe executions + after which probe is considered success. + "tcpSocket": + { + "port": 0 # Required. Port to access for + probe. + }, + "timeoutSeconds": 1 # Optional. Default value is + 1. Period after which probe is considered as + failed if it hasn't completed successfully. + } + ], + "name": "str", # Required. + The name of the code package. + "readinessProbe": [ + { + "exec": { + "command": "str" # Required. Comma separated + command to run inside the container for + example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. Default value + is 3. The count of failures after which probe is + considered failed. + "httpGet": { + "host": "str", # Optional. Host IP to + connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name + of the header. + "value": "str" # Required. The value + of the header. + } + ], + "path": "str", # Optional. Path to access on + the HTTP request. + "port": 0, # Required. Port to access for + probe. + "scheme": "str" # Optional. Scheme for the + http probe. Can be Http or Https. Known + values are: "http", "https". + }, + "initialDelaySeconds": 0, # Optional. The + initial delay in seconds to start executing probe + once codepackage has started. + "periodSeconds": 10, # Optional. Default value + is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. Default value + is 1. The count of successful probe executions + after which probe is considered success. + "tcpSocket": + { + "port": 0 # Required. Port to access for + probe. + }, + "timeoutSeconds": 1 # Optional. Default value is + 1. Period after which probe is considered as + failed if it hasn't completed successfully. + } + ], + "reliableCollectionsRefs": [ + { + "doNotPersistState": bool, # Optional. False + (the default) if ReliableCollections state is + persisted to disk as usual. True if you do not + want to persist state, in which case replication + is still enabled and you can use + ReliableCollections as distributed cache. + "name": "str" + # Required. Name of ReliableCollection resource. + Right now it's not used and you can use any + string. + } + ], + "resources": { + "limits": { + "cpu": 0.0, + # Optional. CPU limits in cores. At present, only + full cores are supported. + "memoryInGB": + 0.0 # Optional. The memory limit in GB. + }, + "requests": { + "cpu": 0.0, + # Required. Requested number of CPU cores. At + present, only full cores are supported. + "memoryInGB": + 0.0 # Required. The memory request in GB for + this container. + } + }, + "settings": [ + { + "name": + "str", # Optional. The name of the setting. + "type": + "ClearText", # Optional. Default value is + "ClearText". The type of the setting being given + in value. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". + Default value: "ClearText". + "value": + "str" # Optional. The value of the setting, will + be processed based on the type provided. + } + ], + "volumeRefs": [ + { + "destinationPath": "str", # Required. The path + within the container at which the volume should + be mounted. Only valid path characters are + allowed. + "name": + "str", # Required. Name of the volume being + referenced. + "readOnly": + bool # Optional. The flag indicating whether the + volume is read only. Default is 'false'. + } + ], + "volumes": [ + { + "creationParameters": { + "description": "str", # Optional. User + readable description of the volume. + kind: + kind + }, + "destinationPath": "str", # Required. The path + within the container at which the volume should + be mounted. Only valid path characters are + allowed. + "name": + "str", # Required. Name of the volume being + referenced. + "readOnly": + bool # Optional. The flag indicating whether the + volume is read only. Default is 'false'. + } + ] + } + ], + "description": "str", # Optional. User + readable description of the service. + "diagnostics": { + "enabled": bool, # Optional. Status + of whether or not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of + sinks to be used if enabled. References the list of sinks + in DiagnosticsDescription. + ] + }, + "dnsName": "str", # Optional. Dns name of + the service. + "executionPolicy": { + type: type + }, + "healthState": "str", # Optional. Describes + the health state of an application resource. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "identityRefs": [ + { + "identityRef": "str", # + Optional. The application identity name. + "name": "str" # Optional. + The identity friendly name. + } + ], + "networkRefs": [ + { + "endpointRefs": [ + { + "name": "str" + # Optional. Name of the endpoint. + } + ], + "name": "str" # Optional. + Name of the network. + } + ], + "osType": "str", # Required. The operation + system required by the code in service. Known values are: + "Linux", "Windows". + "replicaCount": 0, # Optional. The number of + replicas of the service to create. Defaults to 1 if not + specified. + "status": "str", # Optional. Status of the + service. Known values are: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives + additional information about the current status of the service. + "unhealthyEvaluation": "str" # Optional. + When the service's health state is not 'Ok', this additional + details from service fabric Health Manager for the user to know + why the service is marked unhealthy. + } + } + ], + "status": "str", # Optional. Status of the application. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the application. + "unhealthyEvaluation": "str" # Optional. 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. + } + } + + # response body for status code(s): 200, 201 + response.json() == { + "identity": { + "principalId": "str", # Optional. the object identifier of the + Service Principal of the identity associated with this resource. + "tenantId": "str", # Optional. the identifier of the tenant + containing the application's identity. + "tokenServiceEndpoint": "str", # Optional. the endpoint for the + token service managing this identity. + "type": "str", # Required. the types of identities associated with + this resource; currently restricted to 'SystemAssigned and UserAssigned'. + "userAssignedIdentities": { + "str": { + "clientId": "str", # Optional. the client identifier + of the Service Principal which this identity represents. + "principalId": "str" # Optional. the object + identifier of the Service Principal which this identity represents. + } + } + }, + "name": "str", # Required. Name of the Application resource. + "properties": { + "debugParams": "str", # Optional. Internal - used by Visual Studio + to setup the debugging session on the local development environment. + "description": "str", # Optional. User readable description of the + application. + "diagnostics": { + "defaultSinkRefs": [ + "str" # Optional. The sinks to be used if + diagnostics is enabled. Sink choices can be overridden at the service + and code package level. + ], + "enabled": bool, # Optional. Status of whether or not sinks + are enabled. + "sinks": [ + { + "description": "str", # Optional. A + description of the sink. + "name": "str", # Optional. Name of the sink. + This value is referenced by DiagnosticsReferenceDescription. + kind: kind + } + ] + }, + "healthState": "str", # Optional. Describes the health state of an + application resource. Known values are: "Invalid", "Ok", "Warning", "Error", + "Unknown". + "serviceNames": [ + "str" # Optional. Names of the services in the application. + ], + "services": [ + { + "name": "str", # Required. Name of the Service + resource. + "properties": { + "autoScalingPolicies": [ + { + "mechanism": { + kind: kind + }, + "name": "str", # Required. + The name of the auto scaling policy. + "trigger": { + kind: kind + } + } + ], + "codePackages": [ + { + "commands": [ + "str" # Optional. + Command array to execute within the container in exec + form. + ], + "diagnostics": { + "enabled": bool, # + Optional. Status of whether or not sinks are enabled. + "sinkRefs": [ + "str" # + Optional. List of sinks to be used if enabled. + References the list of sinks in + DiagnosticsDescription. + ] + }, + "endpoints": [ + { + "name": + "str", # Required. The name of the endpoint. + "port": 0 # + Optional. Port used by the container. + } + ], + "entryPoint": "str", # + Optional. Override for the default entry point in the + container. + "environmentVariables": [ + { + "name": + "str", # Optional. The name of the environment + variable. + "type": + "ClearText", # Optional. Default value is + "ClearText". The type of the environment variable + being given in value. Known values are: + "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: + "ClearText". + "value": + "str" # Optional. The value of the environment + variable, will be processed based on the type + provided. + } + ], + "image": "str", # Required. + The Container image to use. + "imageRegistryCredential": { + "password": "str", # + Optional. The password for the private registry. The + password is required for create or update operations, + however it is not returned in the get or list + operations. Will be processed based on the type + provided. + "passwordType": + "ClearText", # Optional. Default value is + "ClearText". The type of the image registry password + being given in password. Known values are: + "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: "ClearText". + "server": "str", # + Required. Docker image registry server, without + protocol such as ``http`` and ``https``. + "username": "str" # + Required. The username for the private registry. + }, + "instanceView": { + "currentState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": + "str", # Optional. The container exit code. + "finishTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state finished. + "startTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state started. + "state": + "str" # Optional. The state of this container. + }, + "events": [ + { + "count": 0, # Optional. The count of the + event. + "firstTimestamp": "str", # Optional. + Date/time of the first event. + "lastTimestamp": "str", # Optional. + Date/time of the last event. + "message": "str", # Optional. The event + message. + "name": "str", # Optional. The name of the + container event. + "type": "str" # Optional. The event type. + } + ], + "previousState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": + "str", # Optional. The container exit code. + "finishTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state finished. + "startTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state started. + "state": + "str" # Optional. The state of this container. + }, + "restartCount": 0 # + Optional. The number of times the container has been + restarted. + }, + "labels": [ + { + "name": + "str", # Required. The name of the container + label. + "value": + "str" # Required. The value of the container + label. + } + ], + "livenessProbe": [ + { + "exec": { + "command": "str" # Required. Comma separated + command to run inside the container for + example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. Default value + is 3. The count of failures after which probe is + considered failed. + "httpGet": { + "host": "str", # Optional. Host IP to + connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name + of the header. + "value": "str" # Required. The value + of the header. + } + ], + "path": "str", # Optional. Path to access on + the HTTP request. + "port": 0, # Required. Port to access for + probe. + "scheme": "str" # Optional. Scheme for the + http probe. Can be Http or Https. Known + values are: "http", "https". + }, + "initialDelaySeconds": 0, # Optional. The + initial delay in seconds to start executing probe + once codepackage has started. + "periodSeconds": 10, # Optional. Default value + is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. Default value + is 1. The count of successful probe executions + after which probe is considered success. + "tcpSocket": + { + "port": 0 # Required. Port to access for + probe. + }, + "timeoutSeconds": 1 # Optional. Default value is + 1. Period after which probe is considered as + failed if it hasn't completed successfully. + } + ], + "name": "str", # Required. + The name of the code package. + "readinessProbe": [ + { + "exec": { + "command": "str" # Required. Comma separated + command to run inside the container for + example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. Default value + is 3. The count of failures after which probe is + considered failed. + "httpGet": { + "host": "str", # Optional. Host IP to + connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name + of the header. + "value": "str" # Required. The value + of the header. + } + ], + "path": "str", # Optional. Path to access on + the HTTP request. + "port": 0, # Required. Port to access for + probe. + "scheme": "str" # Optional. Scheme for the + http probe. Can be Http or Https. Known + values are: "http", "https". + }, + "initialDelaySeconds": 0, # Optional. The + initial delay in seconds to start executing probe + once codepackage has started. + "periodSeconds": 10, # Optional. Default value + is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. Default value + is 1. The count of successful probe executions + after which probe is considered success. + "tcpSocket": + { + "port": 0 # Required. Port to access for + probe. + }, + "timeoutSeconds": 1 # Optional. Default value is + 1. Period after which probe is considered as + failed if it hasn't completed successfully. + } + ], + "reliableCollectionsRefs": [ + { + "doNotPersistState": bool, # Optional. False + (the default) if ReliableCollections state is + persisted to disk as usual. True if you do not + want to persist state, in which case replication + is still enabled and you can use + ReliableCollections as distributed cache. + "name": "str" + # Required. Name of ReliableCollection resource. + Right now it's not used and you can use any + string. + } + ], + "resources": { + "limits": { + "cpu": 0.0, + # Optional. CPU limits in cores. At present, only + full cores are supported. + "memoryInGB": + 0.0 # Optional. The memory limit in GB. + }, + "requests": { + "cpu": 0.0, + # Required. Requested number of CPU cores. At + present, only full cores are supported. + "memoryInGB": + 0.0 # Required. The memory request in GB for + this container. + } + }, + "settings": [ + { + "name": + "str", # Optional. The name of the setting. + "type": + "ClearText", # Optional. Default value is + "ClearText". The type of the setting being given + in value. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". + Default value: "ClearText". + "value": + "str" # Optional. The value of the setting, will + be processed based on the type provided. + } + ], + "volumeRefs": [ + { + "destinationPath": "str", # Required. The path + within the container at which the volume should + be mounted. Only valid path characters are + allowed. + "name": + "str", # Required. Name of the volume being + referenced. + "readOnly": + bool # Optional. The flag indicating whether the + volume is read only. Default is 'false'. + } + ], + "volumes": [ + { + "creationParameters": { + "description": "str", # Optional. User + readable description of the volume. + kind: + kind + }, + "destinationPath": "str", # Required. The path + within the container at which the volume should + be mounted. Only valid path characters are + allowed. + "name": + "str", # Required. Name of the volume being + referenced. + "readOnly": + bool # Optional. The flag indicating whether the + volume is read only. Default is 'false'. + } + ] + } + ], + "description": "str", # Optional. User + readable description of the service. + "diagnostics": { + "enabled": bool, # Optional. Status + of whether or not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of + sinks to be used if enabled. References the list of sinks + in DiagnosticsDescription. + ] + }, + "dnsName": "str", # Optional. Dns name of + the service. + "executionPolicy": { + type: type + }, + "healthState": "str", # Optional. Describes + the health state of an application resource. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "identityRefs": [ + { + "identityRef": "str", # + Optional. The application identity name. + "name": "str" # Optional. + The identity friendly name. + } + ], + "networkRefs": [ + { + "endpointRefs": [ + { + "name": "str" + # Optional. Name of the endpoint. + } + ], + "name": "str" # Optional. + Name of the network. + } + ], + "osType": "str", # Required. The operation + system required by the code in service. Known values are: + "Linux", "Windows". + "replicaCount": 0, # Optional. The number of + replicas of the service to create. Defaults to 1 if not + specified. + "status": "str", # Optional. Status of the + service. Known values are: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives + additional information about the current status of the service. + "unhealthyEvaluation": "str" # Optional. + When the service's health state is not 'Ok', this additional + details from service fabric Health Manager for the user to know + why the service is marked unhealthy. + } + } + ], + "status": "str", # Optional. Status of the application. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the application. + "unhealthyEvaluation": "str" # Optional. 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. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + _json = application_resource_description + + request = build_mesh_application_create_or_update_request( + application_resource_name=application_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 201: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace + def get( + self, + application_resource_name: str, + **kwargs: Any + ) -> JSON: + """Gets the Application resource with the given name. + + Gets the information about the Application resource with the given name. The information + include the description and other properties of the Application. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "identity": { + "principalId": "str", # Optional. the object identifier of the + Service Principal of the identity associated with this resource. + "tenantId": "str", # Optional. the identifier of the tenant + containing the application's identity. + "tokenServiceEndpoint": "str", # Optional. the endpoint for the + token service managing this identity. + "type": "str", # Required. the types of identities associated with + this resource; currently restricted to 'SystemAssigned and UserAssigned'. + "userAssignedIdentities": { + "str": { + "clientId": "str", # Optional. the client identifier + of the Service Principal which this identity represents. + "principalId": "str" # Optional. the object + identifier of the Service Principal which this identity represents. + } + } + }, + "name": "str", # Required. Name of the Application resource. + "properties": { + "debugParams": "str", # Optional. Internal - used by Visual Studio + to setup the debugging session on the local development environment. + "description": "str", # Optional. User readable description of the + application. + "diagnostics": { + "defaultSinkRefs": [ + "str" # Optional. The sinks to be used if + diagnostics is enabled. Sink choices can be overridden at the service + and code package level. + ], + "enabled": bool, # Optional. Status of whether or not sinks + are enabled. + "sinks": [ + { + "description": "str", # Optional. A + description of the sink. + "name": "str", # Optional. Name of the sink. + This value is referenced by DiagnosticsReferenceDescription. + kind: kind + } + ] + }, + "healthState": "str", # Optional. Describes the health state of an + application resource. Known values are: "Invalid", "Ok", "Warning", "Error", + "Unknown". + "serviceNames": [ + "str" # Optional. Names of the services in the application. + ], + "services": [ + { + "name": "str", # Required. Name of the Service + resource. + "properties": { + "autoScalingPolicies": [ + { + "mechanism": { + kind: kind + }, + "name": "str", # Required. + The name of the auto scaling policy. + "trigger": { + kind: kind + } + } + ], + "codePackages": [ + { + "commands": [ + "str" # Optional. + Command array to execute within the container in exec + form. + ], + "diagnostics": { + "enabled": bool, # + Optional. Status of whether or not sinks are enabled. + "sinkRefs": [ + "str" # + Optional. List of sinks to be used if enabled. + References the list of sinks in + DiagnosticsDescription. + ] + }, + "endpoints": [ + { + "name": + "str", # Required. The name of the endpoint. + "port": 0 # + Optional. Port used by the container. + } + ], + "entryPoint": "str", # + Optional. Override for the default entry point in the + container. + "environmentVariables": [ + { + "name": + "str", # Optional. The name of the environment + variable. + "type": + "ClearText", # Optional. Default value is + "ClearText". The type of the environment variable + being given in value. Known values are: + "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: + "ClearText". + "value": + "str" # Optional. The value of the environment + variable, will be processed based on the type + provided. + } + ], + "image": "str", # Required. + The Container image to use. + "imageRegistryCredential": { + "password": "str", # + Optional. The password for the private registry. The + password is required for create or update operations, + however it is not returned in the get or list + operations. Will be processed based on the type + provided. + "passwordType": + "ClearText", # Optional. Default value is + "ClearText". The type of the image registry password + being given in password. Known values are: + "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: "ClearText". + "server": "str", # + Required. Docker image registry server, without + protocol such as ``http`` and ``https``. + "username": "str" # + Required. The username for the private registry. + }, + "instanceView": { + "currentState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": + "str", # Optional. The container exit code. + "finishTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state finished. + "startTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state started. + "state": + "str" # Optional. The state of this container. + }, + "events": [ + { + "count": 0, # Optional. The count of the + event. + "firstTimestamp": "str", # Optional. + Date/time of the first event. + "lastTimestamp": "str", # Optional. + Date/time of the last event. + "message": "str", # Optional. The event + message. + "name": "str", # Optional. The name of the + container event. + "type": "str" # Optional. The event type. + } + ], + "previousState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": + "str", # Optional. The container exit code. + "finishTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state finished. + "startTime": + "2020-02-20 00:00:00", # Optional. Date/time + when the container state started. + "state": + "str" # Optional. The state of this container. + }, + "restartCount": 0 # + Optional. The number of times the container has been + restarted. + }, + "labels": [ + { + "name": + "str", # Required. The name of the container + label. + "value": + "str" # Required. The value of the container + label. + } + ], + "livenessProbe": [ + { + "exec": { + "command": "str" # Required. Comma separated + command to run inside the container for + example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. Default value + is 3. The count of failures after which probe is + considered failed. + "httpGet": { + "host": "str", # Optional. Host IP to + connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name + of the header. + "value": "str" # Required. The value + of the header. + } + ], + "path": "str", # Optional. Path to access on + the HTTP request. + "port": 0, # Required. Port to access for + probe. + "scheme": "str" # Optional. Scheme for the + http probe. Can be Http or Https. Known + values are: "http", "https". + }, + "initialDelaySeconds": 0, # Optional. The + initial delay in seconds to start executing probe + once codepackage has started. + "periodSeconds": 10, # Optional. Default value + is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. Default value + is 1. The count of successful probe executions + after which probe is considered success. + "tcpSocket": + { + "port": 0 # Required. Port to access for + probe. + }, + "timeoutSeconds": 1 # Optional. Default value is + 1. Period after which probe is considered as + failed if it hasn't completed successfully. + } + ], + "name": "str", # Required. + The name of the code package. + "readinessProbe": [ + { + "exec": { + "command": "str" # Required. Comma separated + command to run inside the container for + example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. Default value + is 3. The count of failures after which probe is + considered failed. + "httpGet": { + "host": "str", # Optional. Host IP to + connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name + of the header. + "value": "str" # Required. The value + of the header. + } + ], + "path": "str", # Optional. Path to access on + the HTTP request. + "port": 0, # Required. Port to access for + probe. + "scheme": "str" # Optional. Scheme for the + http probe. Can be Http or Https. Known + values are: "http", "https". + }, + "initialDelaySeconds": 0, # Optional. The + initial delay in seconds to start executing probe + once codepackage has started. + "periodSeconds": 10, # Optional. Default value + is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. Default value + is 1. The count of successful probe executions + after which probe is considered success. + "tcpSocket": + { + "port": 0 # Required. Port to access for + probe. + }, + "timeoutSeconds": 1 # Optional. Default value is + 1. Period after which probe is considered as + failed if it hasn't completed successfully. + } + ], + "reliableCollectionsRefs": [ + { + "doNotPersistState": bool, # Optional. False + (the default) if ReliableCollections state is + persisted to disk as usual. True if you do not + want to persist state, in which case replication + is still enabled and you can use + ReliableCollections as distributed cache. + "name": "str" + # Required. Name of ReliableCollection resource. + Right now it's not used and you can use any + string. + } + ], + "resources": { + "limits": { + "cpu": 0.0, + # Optional. CPU limits in cores. At present, only + full cores are supported. + "memoryInGB": + 0.0 # Optional. The memory limit in GB. + }, + "requests": { + "cpu": 0.0, + # Required. Requested number of CPU cores. At + present, only full cores are supported. + "memoryInGB": + 0.0 # Required. The memory request in GB for + this container. + } + }, + "settings": [ + { + "name": + "str", # Optional. The name of the setting. + "type": + "ClearText", # Optional. Default value is + "ClearText". The type of the setting being given + in value. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". + Default value: "ClearText". + "value": + "str" # Optional. The value of the setting, will + be processed based on the type provided. + } + ], + "volumeRefs": [ + { + "destinationPath": "str", # Required. The path + within the container at which the volume should + be mounted. Only valid path characters are + allowed. + "name": + "str", # Required. Name of the volume being + referenced. + "readOnly": + bool # Optional. The flag indicating whether the + volume is read only. Default is 'false'. + } + ], + "volumes": [ + { + "creationParameters": { + "description": "str", # Optional. User + readable description of the volume. + kind: + kind + }, + "destinationPath": "str", # Required. The path + within the container at which the volume should + be mounted. Only valid path characters are + allowed. + "name": + "str", # Required. Name of the volume being + referenced. + "readOnly": + bool # Optional. The flag indicating whether the + volume is read only. Default is 'false'. + } + ] + } + ], + "description": "str", # Optional. User + readable description of the service. + "diagnostics": { + "enabled": bool, # Optional. Status + of whether or not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of + sinks to be used if enabled. References the list of sinks + in DiagnosticsDescription. + ] + }, + "dnsName": "str", # Optional. Dns name of + the service. + "executionPolicy": { + type: type + }, + "healthState": "str", # Optional. Describes + the health state of an application resource. Known values are: + "Invalid", "Ok", "Warning", "Error", "Unknown". + "identityRefs": [ + { + "identityRef": "str", # + Optional. The application identity name. + "name": "str" # Optional. + The identity friendly name. + } + ], + "networkRefs": [ + { + "endpointRefs": [ + { + "name": "str" + # Optional. Name of the endpoint. + } + ], + "name": "str" # Optional. + Name of the network. + } + ], + "osType": "str", # Required. The operation + system required by the code in service. Known values are: + "Linux", "Windows". + "replicaCount": 0, # Optional. The number of + replicas of the service to create. Defaults to 1 if not + specified. + "status": "str", # Optional. Status of the + service. Known values are: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives + additional information about the current status of the service. + "unhealthyEvaluation": "str" # Optional. + When the service's health state is not 'Ok', this additional + details from service fabric Health Manager for the user to know + why the service is marked unhealthy. + } + } + ], + "status": "str", # Optional. Status of the application. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the application. + "unhealthyEvaluation": "str" # Optional. 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. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_application_get_request( + application_resource_name=application_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + application_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the Application resource. + + Deletes the Application resource identified by the name. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_mesh_application_delete_request( + application_resource_name=application_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> JSON: + """Lists all the application resources. + + Gets the information about all application resources in a given resource group. The information + include the description and other properties of the Application. + + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "identity": { + "principalId": "str", # Optional. the object + identifier of the Service Principal of the identity associated with + this resource. + "tenantId": "str", # Optional. the identifier of the + tenant containing the application's identity. + "tokenServiceEndpoint": "str", # Optional. the + endpoint for the token service managing this identity. + "type": "str", # Required. the types of identities + associated with this resource; currently restricted to + 'SystemAssigned and UserAssigned'. + "userAssignedIdentities": { + "str": { + "clientId": "str", # Optional. the + client identifier of the Service Principal which this + identity represents. + "principalId": "str" # Optional. the + object identifier of the Service Principal which this + identity represents. + } + } + }, + "name": "str", # Required. Name of the Application resource. + "properties": { + "debugParams": "str", # Optional. Internal - used by + Visual Studio to setup the debugging session on the local development + environment. + "description": "str", # Optional. User readable + description of the application. + "diagnostics": { + "defaultSinkRefs": [ + "str" # Optional. The sinks to be + used if diagnostics is enabled. Sink choices can be + overridden at the service and code package level. + ], + "enabled": bool, # Optional. Status of + whether or not sinks are enabled. + "sinks": [ + { + "description": "str", # + Optional. A description of the sink. + "name": "str", # Optional. + Name of the sink. This value is referenced by + DiagnosticsReferenceDescription. + kind: kind + } + ] + }, + "healthState": "str", # Optional. Describes the + health state of an application resource. Known values are: "Invalid", + "Ok", "Warning", "Error", "Unknown". + "serviceNames": [ + "str" # Optional. Names of the services in + the application. + ], + "services": [ + { + "name": "str", # Required. Name of + the Service resource. + "properties": { + "autoScalingPolicies": [ + { + "mechanism": + { + kind: + kind + }, + "name": + "str", # Required. The name of the auto scaling + policy. + "trigger": { + kind: + kind + } + } + ], + "codePackages": [ + { + "commands": [ + "str" + # Optional. Command array to execute within + the container in exec form. + ], + "diagnostics": { + "enabled": bool, # Optional. Status of + whether or not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of sinks to be + used if enabled. References the list of + sinks in DiagnosticsDescription. + ] + }, + "endpoints": + [ + { + "name": "str", # Required. The name of + the endpoint. + "port": 0 # Optional. Port used by the + container. + } + ], + "entryPoint": + "str", # Optional. Override for the default + entry point in the container. + "environmentVariables": [ + { + "name": "str", # Optional. The name of + the environment variable. + "type": "ClearText", # Optional. Default + value is "ClearText". The type of the + environment variable being given in + value. Known values are: "ClearText", + "KeyVaultReference", + "SecretValueReference". Default value: + "ClearText". + "value": "str" # Optional. The value of + the environment variable, will be + processed based on the type provided. + } + ], + "image": + "str", # Required. The Container image to use. + "imageRegistryCredential": { + "password": "str", # Optional. The password + for the private registry. The password is + required for create or update operations, + however it is not returned in the get or list + operations. Will be processed based on the + type provided. + "passwordType": "ClearText", # Optional. + Default value is "ClearText". The type of the + image registry password being given in + password. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". + Default value: "ClearText". + "server": "str", # Required. Docker image + registry server, without protocol such as + ``http`` and ``https``. + "username": "str" # Required. The username + for the private registry. + }, + "instanceView": { + "currentState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": "str", # Optional. The + container exit code. + "finishTime": "2020-02-20 00:00:00", # + Optional. Date/time when the container + state finished. + "startTime": "2020-02-20 00:00:00", # + Optional. Date/time when the container + state started. + "state": "str" # Optional. The state of + this container. + }, + "events": [ + { + "count": 0, # Optional. The count of + the event. + "firstTimestamp": "str", # Optional. + Date/time of the first event. + "lastTimestamp": "str", # Optional. + Date/time of the last event. + "message": "str", # Optional. The + event message. + "name": "str", # Optional. The name + of the container event. + "type": "str" # Optional. The event + type. + } + ], + "previousState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": "str", # Optional. The + container exit code. + "finishTime": "2020-02-20 00:00:00", # + Optional. Date/time when the container + state finished. + "startTime": "2020-02-20 00:00:00", # + Optional. Date/time when the container + state started. + "state": "str" # Optional. The state of + this container. + }, + "restartCount": 0 # Optional. The number of + times the container has been restarted. + }, + "labels": [ + { + "name": "str", # Required. The name of + the container label. + "value": "str" # Required. The value of + the container label. + } + ], + "livenessProbe": [ + { + "exec": { + "command": "str" # Required. Comma + separated command to run inside the + container for example "sh, -c, echo + hello world". + }, + "failureThreshold": 3, # Optional. + Default value is 3. The count of failures + after which probe is considered failed. + "httpGet": { + "host": "str", # Optional. Host IP + to connect to. + "httpHeaders": [ + { + "name": "str", # Required. + The name of the header. + "value": "str" # Required. + The value of the header. + } + ], + "path": "str", # Optional. Path to + access on the HTTP request. + "port": 0, # Required. Port to + access for probe. + "scheme": "str" # Optional. Scheme + for the http probe. Can be Http or + Https. Known values are: "http", + "https". + }, + "initialDelaySeconds": 0, # Optional. + The initial delay in seconds to start + executing probe once codepackage has + started. + "periodSeconds": 10, # Optional. Default + value is 10. Periodic seconds to execute + probe. + "successThreshold": 1, # Optional. + Default value is 1. The count of + successful probe executions after which + probe is considered success. + "tcpSocket": { + "port": 0 # Required. Port to access + for probe. + }, + "timeoutSeconds": 1 # Optional. Default + value is 1. Period after which probe is + considered as failed if it hasn't + completed successfully. + } + ], + "name": + "str", # Required. The name of the code package. + "readinessProbe": [ + { + "exec": { + "command": "str" # Required. Comma + separated command to run inside the + container for example "sh, -c, echo + hello world". + }, + "failureThreshold": 3, # Optional. + Default value is 3. The count of failures + after which probe is considered failed. + "httpGet": { + "host": "str", # Optional. Host IP + to connect to. + "httpHeaders": [ + { + "name": "str", # Required. + The name of the header. + "value": "str" # Required. + The value of the header. + } + ], + "path": "str", # Optional. Path to + access on the HTTP request. + "port": 0, # Required. Port to + access for probe. + "scheme": "str" # Optional. Scheme + for the http probe. Can be Http or + Https. Known values are: "http", + "https". + }, + "initialDelaySeconds": 0, # Optional. + The initial delay in seconds to start + executing probe once codepackage has + started. + "periodSeconds": 10, # Optional. Default + value is 10. Periodic seconds to execute + probe. + "successThreshold": 1, # Optional. + Default value is 1. The count of + successful probe executions after which + probe is considered success. + "tcpSocket": { + "port": 0 # Required. Port to access + for probe. + }, + "timeoutSeconds": 1 # Optional. Default + value is 1. Period after which probe is + considered as failed if it hasn't + completed successfully. + } + ], + "reliableCollectionsRefs": [ + { + "doNotPersistState": bool, # Optional. + False (the default) if + ReliableCollections state is persisted to + disk as usual. True if you do not want to + persist state, in which case replication + is still enabled and you can use + ReliableCollections as distributed cache. + "name": "str" # Required. Name of + ReliableCollection resource. Right now + it's not used and you can use any string. + } + ], + "resources": + { + "limits": { + "cpu": 0.0, # Optional. CPU limits in + cores. At present, only full cores are + supported. + "memoryInGB": 0.0 # Optional. The memory + limit in GB. + }, + "requests": { + "cpu": 0.0, # Required. Requested number + of CPU cores. At present, only full cores + are supported. + "memoryInGB": 0.0 # Required. The memory + request in GB for this container. + } + }, + "settings": [ + { + "name": "str", # Optional. The name of + the setting. + "type": "ClearText", # Optional. Default + value is "ClearText". The type of the + setting being given in value. Known + values are: "ClearText", + "KeyVaultReference", + "SecretValueReference". Default value: + "ClearText". + "value": "str" # Optional. The value of + the setting, will be processed based on + the type provided. + } + ], + "volumeRefs": + [ + { + "destinationPath": "str", # Required. + The path within the container at which + the volume should be mounted. Only valid + path characters are allowed. + "name": "str", # Required. Name of the + volume being referenced. + "readOnly": bool # Optional. The flag + indicating whether the volume is read + only. Default is 'false'. + } + ], + "volumes": [ + { + "creationParameters": { + "description": "str", # Optional. + User readable description of the + volume. + kind: kind + }, + "destinationPath": "str", # Required. + The path within the container at which + the volume should be mounted. Only valid + path characters are allowed. + "name": "str", # Required. Name of the + volume being referenced. + "readOnly": bool # Optional. The flag + indicating whether the volume is read + only. Default is 'false'. + } + ] + } + ], + "description": "str", # + Optional. User readable description of the service. + "diagnostics": { + "enabled": bool, # + Optional. Status of whether or not sinks are enabled. + "sinkRefs": [ + "str" # + Optional. List of sinks to be used if enabled. + References the list of sinks in + DiagnosticsDescription. + ] + }, + "dnsName": "str", # + Optional. Dns name of the service. + "executionPolicy": { + type: type + }, + "healthState": "str", # + Optional. Describes the health state of an application + resource. Known values are: "Invalid", "Ok", "Warning", + "Error", "Unknown". + "identityRefs": [ + { + "identityRef": "str", # Optional. The + application identity name. + "name": "str" + # Optional. The identity friendly name. + } + ], + "networkRefs": [ + { + "endpointRefs": [ + { + "name": "str" # Optional. Name of the + endpoint. + } + ], + "name": "str" + # Optional. Name of the network. + } + ], + "osType": "str", # Required. + The operation system required by the code in service. + Known values are: "Linux", "Windows". + "replicaCount": 0, # + Optional. The number of replicas of the service to + create. Defaults to 1 if not specified. + "status": "str", # Optional. + Status of the service. Known values are: "Unknown", + "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # + Optional. Gives additional information about the current + status of the service. + "unhealthyEvaluation": "str" + # Optional. When the service's health state is not 'Ok', + this additional details from service fabric Health + Manager for the user to know why the service is marked + unhealthy. + } + } + ], + "status": "str", # Optional. Status of the + application. Known values are: "Unknown", "Ready", "Upgrading", + "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional + information about the current status of the application. + "unhealthyEvaluation": "str" # Optional. 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. + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_application_list_request( + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def get_upgrade_progress( + self, + application_resource_name: str, + **kwargs: Any + ) -> JSON: + """Gets the progress of the latest upgrade performed on this application resource. + + Gets the upgrade progress information about the Application resource with the given name. The + information include percentage of completion and other upgrade state information of the + Application resource. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :keyword api_version: The version of the API. This parameter is required and its value must be + '7.0'. + + Service Fabric REST API version is based on the runtime version in which the API was + introduced or was changed. Service Fabric runtime supports more than one version of the API. + This version is the latest supported version of the API. If a lower API version is passed, the + returned response may be different from the one documented in this specification. + + Additionally the runtime accepts any version that is higher than the latest supported version + up to the current version of the runtime. So if the latest API version is 6.0 and the runtime + is 6.1, the runtime will accept version 6.1 for that API. However the behavior of the API will + be as per the documented 6.0 version. Default value is "7.0". Note that overriding this default + value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ApplicationUpgradeStatusDetails": "str", # Optional. Additional detailed + information about the status of the pending upgrade. + "FailureTimestampUtc": "str", # Optional. The estimated UTC datetime when + the upgrade failed and FailureAction was executed. + "Name": "str", # Optional. Name of the Application resource. + "PercentCompleted": "str", # Optional. The estimated percent of replicas are + completed in the upgrade. + "RollingUpgradeMode": "Monitored", # Optional. Default value is "Monitored". + The mode used to monitor health during a rolling upgrade. The values are + UnmonitoredAuto, UnmonitoredManual, and Monitored. Known values are: "Invalid", + "UnmonitoredAuto", "UnmonitoredManual", "Monitored". Default value: "Monitored". + "ServiceUpgradeProgress": [ + { + "CompletedReplicaCount": "str", # Optional. The number of + replicas that completes the upgrade in the service. + "PendingReplicaCount": "str", # Optional. The number of + replicas that are waiting to be upgraded in the service. + "ServiceName": "str" # Optional. Name of the Service + resource. + } + ], + "StartTimestampUtc": "str", # Optional. The estimated UTC datetime when the + upgrade started. + "TargetApplicationTypeVersion": "str", # Optional. The target application + version for the application upgrade. + "UpgradeDuration": "PT0H2M0S", # Optional. Default value is "PT0H2M0S". The + estimated amount of time that the overall upgrade elapsed. It is first + interpreted as a string representing an ISO 8601 duration. If that fails, then it + is interpreted as a number representing the total number of milliseconds. + "UpgradeReplicaSetCheckTimeoutInSeconds": 42949672925, # Optional. Default + value is 42949672925. The maximum amount of time to block processing of an + upgrade domain and prevent loss of availability when there are unexpected issues. + When this timeout expires, processing of the upgrade domain will proceed + regardless of availability loss issues. The timeout is reset at the start of each + upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned + 32-bit integer). + "UpgradeState": "str" # Optional. The state of the application resource + upgrade. Known values are: "Invalid", "ProvisioningTarget", "RollingForward", + "UnprovisioningCurrent", "CompletedRollforward", "RollingBack", + "UnprovisioningTarget", "CompletedRollback", "Failed". + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "7.0")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_application_get_upgrade_progress_request( + application_resource_name=application_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + +class MeshServiceOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_service` attribute. + """ + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace + def get( + self, + application_resource_name: str, + service_resource_name: str, + **kwargs: Any + ) -> JSON: + """Gets the Service resource with the given name. + + Gets the information about the Service resource with the given name. The information include + the description and other properties of the Service. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "name": "str", # Required. Name of the Service resource. + "properties": { + "autoScalingPolicies": [ + { + "mechanism": { + kind: kind + }, + "name": "str", # Required. The name of the auto + scaling policy. + "trigger": { + kind: kind + } + } + ], + "codePackages": [ + { + "commands": [ + "str" # Optional. Command array to execute + within the container in exec form. + ], + "diagnostics": { + "enabled": bool, # Optional. Status of + whether or not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of sinks to + be used if enabled. References the list of sinks in + DiagnosticsDescription. + ] + }, + "endpoints": [ + { + "name": "str", # Required. The name + of the endpoint. + "port": 0 # Optional. Port used by + the container. + } + ], + "entryPoint": "str", # Optional. Override for the + default entry point in the container. + "environmentVariables": [ + { + "name": "str", # Optional. The name + of the environment variable. + "type": "ClearText", # Optional. + Default value is "ClearText". The type of the environment + variable being given in value. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". Default value: + "ClearText". + "value": "str" # Optional. The value + of the environment variable, will be processed based on the + type provided. + } + ], + "image": "str", # Required. The Container image to + use. + "imageRegistryCredential": { + "password": "str", # Optional. The password + for the private registry. The password is required for create or + update operations, however it is not returned in the get or list + operations. Will be processed based on the type provided. + "passwordType": "ClearText", # Optional. + Default value is "ClearText". The type of the image registry + password being given in password. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". Default value: + "ClearText". + "server": "str", # Required. Docker image + registry server, without protocol such as ``http`` and ``https``. + "username": "str" # Required. The username + for the private registry. + }, + "instanceView": { + "currentState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": "str", # Optional. The + container exit code. + "finishTime": "2020-02-20 00:00:00", + # Optional. Date/time when the container state finished. + "startTime": "2020-02-20 00:00:00", + # Optional. Date/time when the container state started. + "state": "str" # Optional. The state + of this container. + }, + "events": [ + { + "count": 0, # Optional. The + count of the event. + "firstTimestamp": "str", # + Optional. Date/time of the first event. + "lastTimestamp": "str", # + Optional. Date/time of the last event. + "message": "str", # + Optional. The event message. + "name": "str", # Optional. + The name of the container event. + "type": "str" # Optional. + The event type. + } + ], + "previousState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": "str", # Optional. The + container exit code. + "finishTime": "2020-02-20 00:00:00", + # Optional. Date/time when the container state finished. + "startTime": "2020-02-20 00:00:00", + # Optional. Date/time when the container state started. + "state": "str" # Optional. The state + of this container. + }, + "restartCount": 0 # Optional. The number of + times the container has been restarted. + }, + "labels": [ + { + "name": "str", # Required. The name + of the container label. + "value": "str" # Required. The value + of the container label. + } + ], + "livenessProbe": [ + { + "exec": { + "command": "str" # Required. + Comma separated command to run inside the container for + example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. + Default value is 3. The count of failures after which probe + is considered failed. + "httpGet": { + "host": "str", # Optional. + Host IP to connect to. + "httpHeaders": [ + { + "name": + "str", # Required. The name of the header. + "value": + "str" # Required. The value of the header. + } + ], + "path": "str", # Optional. + Path to access on the HTTP request. + "port": 0, # Required. Port + to access for probe. + "scheme": "str" # Optional. + Scheme for the http probe. Can be Http or Https. Known + values are: "http", "https". + }, + "initialDelaySeconds": 0, # + Optional. The initial delay in seconds to start executing + probe once codepackage has started. + "periodSeconds": 10, # Optional. + Default value is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. + Default value is 1. The count of successful probe executions + after which probe is considered success. + "tcpSocket": { + "port": 0 # Required. Port + to access for probe. + }, + "timeoutSeconds": 1 # Optional. + Default value is 1. Period after which probe is considered as + failed if it hasn't completed successfully. + } + ], + "name": "str", # Required. The name of the code + package. + "readinessProbe": [ + { + "exec": { + "command": "str" # Required. + Comma separated command to run inside the container for + example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. + Default value is 3. The count of failures after which probe + is considered failed. + "httpGet": { + "host": "str", # Optional. + Host IP to connect to. + "httpHeaders": [ + { + "name": + "str", # Required. The name of the header. + "value": + "str" # Required. The value of the header. + } + ], + "path": "str", # Optional. + Path to access on the HTTP request. + "port": 0, # Required. Port + to access for probe. + "scheme": "str" # Optional. + Scheme for the http probe. Can be Http or Https. Known + values are: "http", "https". + }, + "initialDelaySeconds": 0, # + Optional. The initial delay in seconds to start executing + probe once codepackage has started. + "periodSeconds": 10, # Optional. + Default value is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. + Default value is 1. The count of successful probe executions + after which probe is considered success. + "tcpSocket": { + "port": 0 # Required. Port + to access for probe. + }, + "timeoutSeconds": 1 # Optional. + Default value is 1. Period after which probe is considered as + failed if it hasn't completed successfully. + } + ], + "reliableCollectionsRefs": [ + { + "doNotPersistState": bool, # + Optional. False (the default) if ReliableCollections state is + persisted to disk as usual. True if you do not want to + persist state, in which case replication is still enabled and + you can use ReliableCollections as distributed cache. + "name": "str" # Required. Name of + ReliableCollection resource. Right now it's not used and you + can use any string. + } + ], + "resources": { + "limits": { + "cpu": 0.0, # Optional. CPU limits + in cores. At present, only full cores are supported. + "memoryInGB": 0.0 # Optional. The + memory limit in GB. + }, + "requests": { + "cpu": 0.0, # Required. Requested + number of CPU cores. At present, only full cores are + supported. + "memoryInGB": 0.0 # Required. The + memory request in GB for this container. + } + }, + "settings": [ + { + "name": "str", # Optional. The name + of the setting. + "type": "ClearText", # Optional. + Default value is "ClearText". The type of the setting being + given in value. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". Default value: + "ClearText". + "value": "str" # Optional. The value + of the setting, will be processed based on the type provided. + } + ], + "volumeRefs": [ + { + "destinationPath": "str", # + Required. The path within the container at which the volume + should be mounted. Only valid path characters are allowed. + "name": "str", # Required. Name of + the volume being referenced. + "readOnly": bool # Optional. The + flag indicating whether the volume is read only. Default is + 'false'. + } + ], + "volumes": [ + { + "creationParameters": { + "description": "str", # + Optional. User readable description of the volume. + kind: kind + }, + "destinationPath": "str", # + Required. The path within the container at which the volume + should be mounted. Only valid path characters are allowed. + "name": "str", # Required. Name of + the volume being referenced. + "readOnly": bool # Optional. The + flag indicating whether the volume is read only. Default is + 'false'. + } + ] + } + ], + "description": "str", # Optional. User readable description of the + service. + "diagnostics": { + "enabled": bool, # Optional. Status of whether or not sinks + are enabled. + "sinkRefs": [ + "str" # Optional. List of sinks to be used if + enabled. References the list of sinks in DiagnosticsDescription. + ] + }, + "dnsName": "str", # Optional. Dns name of the service. + "executionPolicy": { + type: type + }, + "healthState": "str", # Optional. Describes the health state of an + application resource. Known values are: "Invalid", "Ok", "Warning", "Error", + "Unknown". + "identityRefs": [ + { + "identityRef": "str", # Optional. The application + identity name. + "name": "str" # Optional. The identity friendly + name. + } + ], + "networkRefs": [ + { + "endpointRefs": [ + { + "name": "str" # Optional. Name of + the endpoint. + } + ], + "name": "str" # Optional. Name of the network. + } + ], + "osType": "str", # Required. The operation system required by the + code in service. Known values are: "Linux", "Windows". + "replicaCount": 0, # Optional. The number of replicas of the service + to create. Defaults to 1 if not specified. + "status": "str", # Optional. Status of the service. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the service. + "unhealthyEvaluation": "str" # Optional. When the service's health + state is not 'Ok', this additional details from service fabric Health Manager + for the user to know why the service is marked unhealthy. + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_service_get_request( + application_resource_name=application_resource_name, + service_resource_name=service_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def list( + self, + application_resource_name: str, + **kwargs: Any + ) -> JSON: + """Lists all the service resources. + + Gets the information about all services of an application resource. The information include the + description and other properties of the Service. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "name": "str", # Required. Name of the Service resource. + "properties": { + "autoScalingPolicies": [ + { + "mechanism": { + kind: kind + }, + "name": "str", # Required. The name + of the auto scaling policy. + "trigger": { + kind: kind + } + } + ], + "codePackages": [ + { + "commands": [ + "str" # Optional. Command + array to execute within the container in exec form. + ], + "diagnostics": { + "enabled": bool, # Optional. + Status of whether or not sinks are enabled. + "sinkRefs": [ + "str" # Optional. + List of sinks to be used if enabled. References the + list of sinks in DiagnosticsDescription. + ] + }, + "endpoints": [ + { + "name": "str", # + Required. The name of the endpoint. + "port": 0 # + Optional. Port used by the container. + } + ], + "entryPoint": "str", # Optional. + Override for the default entry point in the container. + "environmentVariables": [ + { + "name": "str", # + Optional. The name of the environment variable. + "type": "ClearText", + # Optional. Default value is "ClearText". The type of + the environment variable being given in value. Known + values are: "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: "ClearText". + "value": "str" # + Optional. The value of the environment variable, will + be processed based on the type provided. + } + ], + "image": "str", # Required. The + Container image to use. + "imageRegistryCredential": { + "password": "str", # + Optional. The password for the private registry. The + password is required for create or update operations, + however it is not returned in the get or list operations. + Will be processed based on the type provided. + "passwordType": "ClearText", + # Optional. Default value is "ClearText". The type of the + image registry password being given in password. Known + values are: "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: "ClearText". + "server": "str", # Required. + Docker image registry server, without protocol such as + ``http`` and ``https``. + "username": "str" # + Required. The username for the private registry. + }, + "instanceView": { + "currentState": { + "detailStatus": + "str", # Optional. Human-readable status of this + state. + "exitCode": "str", # + Optional. The container exit code. + "finishTime": + "2020-02-20 00:00:00", # Optional. Date/time when + the container state finished. + "startTime": + "2020-02-20 00:00:00", # Optional. Date/time when + the container state started. + "state": "str" # + Optional. The state of this container. + }, + "events": [ + { + "count": 0, + # Optional. The count of the event. + "firstTimestamp": "str", # Optional. Date/time + of the first event. + "lastTimestamp": "str", # Optional. Date/time of + the last event. + "message": + "str", # Optional. The event message. + "name": + "str", # Optional. The name of the container + event. + "type": "str" + # Optional. The event type. + } + ], + "previousState": { + "detailStatus": + "str", # Optional. Human-readable status of this + state. + "exitCode": "str", # + Optional. The container exit code. + "finishTime": + "2020-02-20 00:00:00", # Optional. Date/time when + the container state finished. + "startTime": + "2020-02-20 00:00:00", # Optional. Date/time when + the container state started. + "state": "str" # + Optional. The state of this container. + }, + "restartCount": 0 # + Optional. The number of times the container has been + restarted. + }, + "labels": [ + { + "name": "str", # + Required. The name of the container label. + "value": "str" # + Required. The value of the container label. + } + ], + "livenessProbe": [ + { + "exec": { + "command": + "str" # Required. Comma separated command to run + inside the container for example "sh, -c, echo + hello world". + }, + "failureThreshold": + 3, # Optional. Default value is 3. The count of + failures after which probe is considered failed. + "httpGet": { + "host": + "str", # Optional. Host IP to connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name of + the header. + "value": "str" # Required. The value of + the header. + } + ], + "path": + "str", # Optional. Path to access on the HTTP + request. + "port": 0, # + Required. Port to access for probe. + "scheme": + "str" # Optional. Scheme for the http probe. Can + be Http or Https. Known values are: "http", + "https". + }, + "initialDelaySeconds": 0, # Optional. The initial + delay in seconds to start executing probe once + codepackage has started. + "periodSeconds": 10, + # Optional. Default value is 10. Periodic seconds to + execute probe. + "successThreshold": + 1, # Optional. Default value is 1. The count of + successful probe executions after which probe is + considered success. + "tcpSocket": { + "port": 0 # + Required. Port to access for probe. + }, + "timeoutSeconds": 1 + # Optional. Default value is 1. Period after which + probe is considered as failed if it hasn't completed + successfully. + } + ], + "name": "str", # Required. The name + of the code package. + "readinessProbe": [ + { + "exec": { + "command": + "str" # Required. Comma separated command to run + inside the container for example "sh, -c, echo + hello world". + }, + "failureThreshold": + 3, # Optional. Default value is 3. The count of + failures after which probe is considered failed. + "httpGet": { + "host": + "str", # Optional. Host IP to connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name of + the header. + "value": "str" # Required. The value of + the header. + } + ], + "path": + "str", # Optional. Path to access on the HTTP + request. + "port": 0, # + Required. Port to access for probe. + "scheme": + "str" # Optional. Scheme for the http probe. Can + be Http or Https. Known values are: "http", + "https". + }, + "initialDelaySeconds": 0, # Optional. The initial + delay in seconds to start executing probe once + codepackage has started. + "periodSeconds": 10, + # Optional. Default value is 10. Periodic seconds to + execute probe. + "successThreshold": + 1, # Optional. Default value is 1. The count of + successful probe executions after which probe is + considered success. + "tcpSocket": { + "port": 0 # + Required. Port to access for probe. + }, + "timeoutSeconds": 1 + # Optional. Default value is 1. Period after which + probe is considered as failed if it hasn't completed + successfully. + } + ], + "reliableCollectionsRefs": [ + { + "doNotPersistState": + bool, # Optional. False (the default) if + ReliableCollections state is persisted to disk as + usual. True if you do not want to persist state, in + which case replication is still enabled and you can + use ReliableCollections as distributed cache. + "name": "str" # + Required. Name of ReliableCollection resource. Right + now it's not used and you can use any string. + } + ], + "resources": { + "limits": { + "cpu": 0.0, # + Optional. CPU limits in cores. At present, only full + cores are supported. + "memoryInGB": 0.0 # + Optional. The memory limit in GB. + }, + "requests": { + "cpu": 0.0, # + Required. Requested number of CPU cores. At present, + only full cores are supported. + "memoryInGB": 0.0 # + Required. The memory request in GB for this + container. + } + }, + "settings": [ + { + "name": "str", # + Optional. The name of the setting. + "type": "ClearText", + # Optional. Default value is "ClearText". The type of + the setting being given in value. Known values are: + "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: "ClearText". + "value": "str" # + Optional. The value of the setting, will be processed + based on the type provided. + } + ], + "volumeRefs": [ + { + "destinationPath": + "str", # Required. The path within the container at + which the volume should be mounted. Only valid path + characters are allowed. + "name": "str", # + Required. Name of the volume being referenced. + "readOnly": bool # + Optional. The flag indicating whether the volume is + read only. Default is 'false'. + } + ], + "volumes": [ + { + "creationParameters": + { + "description": "str", # Optional. User readable + description of the volume. + kind: kind + }, + "destinationPath": + "str", # Required. The path within the container at + which the volume should be mounted. Only valid path + characters are allowed. + "name": "str", # + Required. Name of the volume being referenced. + "readOnly": bool # + Optional. The flag indicating whether the volume is + read only. Default is 'false'. + } + ] + } + ], + "description": "str", # Optional. User readable + description of the service. + "diagnostics": { + "enabled": bool, # Optional. Status of + whether or not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of sinks to + be used if enabled. References the list of sinks in + DiagnosticsDescription. + ] + }, + "dnsName": "str", # Optional. Dns name of the + service. + "executionPolicy": { + type: type + }, + "healthState": "str", # Optional. Describes the + health state of an application resource. Known values are: "Invalid", + "Ok", "Warning", "Error", "Unknown". + "identityRefs": [ + { + "identityRef": "str", # Optional. + The application identity name. + "name": "str" # Optional. The + identity friendly name. + } + ], + "networkRefs": [ + { + "endpointRefs": [ + { + "name": "str" # + Optional. Name of the endpoint. + } + ], + "name": "str" # Optional. Name of + the network. + } + ], + "osType": "str", # Required. The operation system + required by the code in service. Known values are: "Linux", + "Windows". + "replicaCount": 0, # Optional. The number of + replicas of the service to create. Defaults to 1 if not specified. + "status": "str", # Optional. Status of the service. + Known values are: "Unknown", "Ready", "Upgrading", "Creating", + "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional + information about the current status of the service. + "unhealthyEvaluation": "str" # Optional. When the + service's health state is not 'Ok', this additional details from + service fabric Health Manager for the user to know why the service is + marked unhealthy. + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_service_list_request( + application_resource_name=application_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + +class MeshCodePackageOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_code_package` attribute. + """ + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace + def get_container_logs( + self, + application_resource_name: str, + service_resource_name: str, + replica_name: str, + code_package_name: str, + *, + tail: Optional[str] = None, + **kwargs: Any + ) -> JSON: + """Gets the logs from the container. + + Gets the logs for the container of the specified code package of the service replica. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :param replica_name: Service Fabric replica name. + :type replica_name: str + :param code_package_name: The name of code package of the service. + :type code_package_name: str + :keyword tail: Number of lines to show from the end of the logs. Default is 100. 'all' to show + the complete logs. + :paramtype tail: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "Content": "str" # Optional. Container logs. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_code_package_get_container_logs_request( + application_resource_name=application_resource_name, + service_resource_name=service_resource_name, + replica_name=replica_name, + code_package_name=code_package_name, + api_version=api_version, + tail=tail, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + +class MeshServiceReplicaOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_service_replica` attribute. + """ + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace + def get( + self, + application_resource_name: str, + service_resource_name: str, + replica_name: str, + **kwargs: Any + ) -> JSON: + """Gets the given replica of the service of an application. + + Gets the information about the service replica with the given name. The information include the + description and other properties of the service replica. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :param replica_name: Service Fabric replica name. + :type replica_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "codePackages": [ + { + "commands": [ + "str" # Optional. Command array to execute within + the container in exec form. + ], + "diagnostics": { + "enabled": bool, # Optional. Status of whether or + not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of sinks to be used + if enabled. References the list of sinks in + DiagnosticsDescription. + ] + }, + "endpoints": [ + { + "name": "str", # Required. The name of the + endpoint. + "port": 0 # Optional. Port used by the + container. + } + ], + "entryPoint": "str", # Optional. Override for the default + entry point in the container. + "environmentVariables": [ + { + "name": "str", # Optional. The name of the + environment variable. + "type": "ClearText", # Optional. Default + value is "ClearText". The type of the environment variable being + given in value. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". Default value: + "ClearText". + "value": "str" # Optional. The value of the + environment variable, will be processed based on the type + provided. + } + ], + "image": "str", # Required. The Container image to use. + "imageRegistryCredential": { + "password": "str", # Optional. The password for the + private registry. The password is required for create or update + operations, however it is not returned in the get or list operations. + Will be processed based on the type provided. + "passwordType": "ClearText", # Optional. Default + value is "ClearText". The type of the image registry password being + given in password. Known values are: "ClearText", + "KeyVaultReference", "SecretValueReference". Default value: + "ClearText". + "server": "str", # Required. Docker image registry + server, without protocol such as ``http`` and ``https``. + "username": "str" # Required. The username for the + private registry. + }, + "instanceView": { + "currentState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": "str", # Optional. The container + exit code. + "finishTime": "2020-02-20 00:00:00", # + Optional. Date/time when the container state finished. + "startTime": "2020-02-20 00:00:00", # + Optional. Date/time when the container state started. + "state": "str" # Optional. The state of this + container. + }, + "events": [ + { + "count": 0, # Optional. The count of + the event. + "firstTimestamp": "str", # Optional. + Date/time of the first event. + "lastTimestamp": "str", # Optional. + Date/time of the last event. + "message": "str", # Optional. The + event message. + "name": "str", # Optional. The name + of the container event. + "type": "str" # Optional. The event + type. + } + ], + "previousState": { + "detailStatus": "str", # Optional. + Human-readable status of this state. + "exitCode": "str", # Optional. The container + exit code. + "finishTime": "2020-02-20 00:00:00", # + Optional. Date/time when the container state finished. + "startTime": "2020-02-20 00:00:00", # + Optional. Date/time when the container state started. + "state": "str" # Optional. The state of this + container. + }, + "restartCount": 0 # Optional. The number of times + the container has been restarted. + }, + "labels": [ + { + "name": "str", # Required. The name of the + container label. + "value": "str" # Required. The value of the + container label. + } + ], + "livenessProbe": [ + { + "exec": { + "command": "str" # Required. Comma + separated command to run inside the container for example + "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. Default + value is 3. The count of failures after which probe is considered + failed. + "httpGet": { + "host": "str", # Optional. Host IP + to connect to. + "httpHeaders": [ + { + "name": "str", # + Required. The name of the header. + "value": "str" # + Required. The value of the header. + } + ], + "path": "str", # Optional. Path to + access on the HTTP request. + "port": 0, # Required. Port to + access for probe. + "scheme": "str" # Optional. Scheme + for the http probe. Can be Http or Https. Known values are: + "http", "https". + }, + "initialDelaySeconds": 0, # Optional. The + initial delay in seconds to start executing probe once + codepackage has started. + "periodSeconds": 10, # Optional. Default + value is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. Default + value is 1. The count of successful probe executions after which + probe is considered success. + "tcpSocket": { + "port": 0 # Required. Port to access + for probe. + }, + "timeoutSeconds": 1 # Optional. Default + value is 1. Period after which probe is considered as failed if + it hasn't completed successfully. + } + ], + "name": "str", # Required. The name of the code package. + "readinessProbe": [ + { + "exec": { + "command": "str" # Required. Comma + separated command to run inside the container for example + "sh, -c, echo hello world". + }, + "failureThreshold": 3, # Optional. Default + value is 3. The count of failures after which probe is considered + failed. + "httpGet": { + "host": "str", # Optional. Host IP + to connect to. + "httpHeaders": [ + { + "name": "str", # + Required. The name of the header. + "value": "str" # + Required. The value of the header. + } + ], + "path": "str", # Optional. Path to + access on the HTTP request. + "port": 0, # Required. Port to + access for probe. + "scheme": "str" # Optional. Scheme + for the http probe. Can be Http or Https. Known values are: + "http", "https". + }, + "initialDelaySeconds": 0, # Optional. The + initial delay in seconds to start executing probe once + codepackage has started. + "periodSeconds": 10, # Optional. Default + value is 10. Periodic seconds to execute probe. + "successThreshold": 1, # Optional. Default + value is 1. The count of successful probe executions after which + probe is considered success. + "tcpSocket": { + "port": 0 # Required. Port to access + for probe. + }, + "timeoutSeconds": 1 # Optional. Default + value is 1. Period after which probe is considered as failed if + it hasn't completed successfully. + } + ], + "reliableCollectionsRefs": [ + { + "doNotPersistState": bool, # Optional. False + (the default) if ReliableCollections state is persisted to disk + as usual. True if you do not want to persist state, in which case + replication is still enabled and you can use ReliableCollections + as distributed cache. + "name": "str" # Required. Name of + ReliableCollection resource. Right now it's not used and you can + use any string. + } + ], + "resources": { + "limits": { + "cpu": 0.0, # Optional. CPU limits in cores. + At present, only full cores are supported. + "memoryInGB": 0.0 # Optional. The memory + limit in GB. + }, + "requests": { + "cpu": 0.0, # Required. Requested number of + CPU cores. At present, only full cores are supported. + "memoryInGB": 0.0 # Required. The memory + request in GB for this container. + } + }, + "settings": [ + { + "name": "str", # Optional. The name of the + setting. + "type": "ClearText", # Optional. Default + value is "ClearText". The type of the setting being given in + value. Known values are: "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: "ClearText". + "value": "str" # Optional. The value of the + setting, will be processed based on the type provided. + } + ], + "volumeRefs": [ + { + "destinationPath": "str", # Required. The + path within the container at which the volume should be mounted. + Only valid path characters are allowed. + "name": "str", # Required. Name of the + volume being referenced. + "readOnly": bool # Optional. The flag + indicating whether the volume is read only. Default is 'false'. + } + ], + "volumes": [ + { + "creationParameters": { + "description": "str", # Optional. + User readable description of the volume. + kind: kind + }, + "destinationPath": "str", # Required. The + path within the container at which the volume should be mounted. + Only valid path characters are allowed. + "name": "str", # Required. Name of the + volume being referenced. + "readOnly": bool # Optional. The flag + indicating whether the volume is read only. Default is 'false'. + } + ] + } + ], + "diagnostics": { + "enabled": bool, # Optional. Status of whether or not sinks are + enabled. + "sinkRefs": [ + "str" # Optional. List of sinks to be used if enabled. + References the list of sinks in DiagnosticsDescription. + ] + }, + "networkRefs": [ + { + "endpointRefs": [ + { + "name": "str" # Optional. Name of the + endpoint. + } + ], + "name": "str" # Optional. Name of the network. + } + ], + "osType": "str", # Required. The operation system required by the code in + service. Known values are: "Linux", "Windows". + "replicaName": "str" # Required. Name of the replica. + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_service_replica_get_request( + application_resource_name=application_resource_name, + service_resource_name=service_resource_name, + replica_name=replica_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def list( + self, + application_resource_name: str, + service_resource_name: str, + **kwargs: Any + ) -> JSON: + """Lists all the replicas of a service. + + Gets the information about all replicas of a service. The information include the description + and other properties of the service replica. + + :param application_resource_name: The identity of the application. + :type application_resource_name: str + :param service_resource_name: The identity of the service. + :type service_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "codePackages": [ + { + "commands": [ + "str" # Optional. Command array to + execute within the container in exec form. + ], + "diagnostics": { + "enabled": bool, # Optional. Status + of whether or not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of + sinks to be used if enabled. References the list of sinks + in DiagnosticsDescription. + ] + }, + "endpoints": [ + { + "name": "str", # Required. + The name of the endpoint. + "port": 0 # Optional. Port + used by the container. + } + ], + "entryPoint": "str", # Optional. Override + for the default entry point in the container. + "environmentVariables": [ + { + "name": "str", # Optional. + The name of the environment variable. + "type": "ClearText", # + Optional. Default value is "ClearText". The type of the + environment variable being given in value. Known values + are: "ClearText", "KeyVaultReference", + "SecretValueReference". Default value: "ClearText". + "value": "str" # Optional. + The value of the environment variable, will be processed + based on the type provided. + } + ], + "image": "str", # Required. The Container + image to use. + "imageRegistryCredential": { + "password": "str", # Optional. The + password for the private registry. The password is required + for create or update operations, however it is not returned + in the get or list operations. Will be processed based on the + type provided. + "passwordType": "ClearText", # + Optional. Default value is "ClearText". The type of the image + registry password being given in password. Known values are: + "ClearText", "KeyVaultReference", "SecretValueReference". + Default value: "ClearText". + "server": "str", # Required. Docker + image registry server, without protocol such as ``http`` and + ``https``. + "username": "str" # Required. The + username for the private registry. + }, + "instanceView": { + "currentState": { + "detailStatus": "str", # + Optional. Human-readable status of this state. + "exitCode": "str", # + Optional. The container exit code. + "finishTime": "2020-02-20 + 00:00:00", # Optional. Date/time when the container + state finished. + "startTime": "2020-02-20 + 00:00:00", # Optional. Date/time when the container + state started. + "state": "str" # Optional. + The state of this container. + }, + "events": [ + { + "count": 0, # + Optional. The count of the event. + "firstTimestamp": + "str", # Optional. Date/time of the first event. + "lastTimestamp": + "str", # Optional. Date/time of the last event. + "message": "str", # + Optional. The event message. + "name": "str", # + Optional. The name of the container event. + "type": "str" # + Optional. The event type. + } + ], + "previousState": { + "detailStatus": "str", # + Optional. Human-readable status of this state. + "exitCode": "str", # + Optional. The container exit code. + "finishTime": "2020-02-20 + 00:00:00", # Optional. Date/time when the container + state finished. + "startTime": "2020-02-20 + 00:00:00", # Optional. Date/time when the container + state started. + "state": "str" # Optional. + The state of this container. + }, + "restartCount": 0 # Optional. The + number of times the container has been restarted. + }, + "labels": [ + { + "name": "str", # Required. + The name of the container label. + "value": "str" # Required. + The value of the container label. + } + ], + "livenessProbe": [ + { + "exec": { + "command": "str" # + Required. Comma separated command to run inside the + container for example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # + Optional. Default value is 3. The count of failures after + which probe is considered failed. + "httpGet": { + "host": "str", # + Optional. Host IP to connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name of the + header. + "value": "str" # Required. The value of the + header. + } + ], + "path": "str", # + Optional. Path to access on the HTTP request. + "port": 0, # + Required. Port to access for probe. + "scheme": "str" # + Optional. Scheme for the http probe. Can be Http or + Https. Known values are: "http", "https". + }, + "initialDelaySeconds": 0, # + Optional. The initial delay in seconds to start executing + probe once codepackage has started. + "periodSeconds": 10, # + Optional. Default value is 10. Periodic seconds to + execute probe. + "successThreshold": 1, # + Optional. Default value is 1. The count of successful + probe executions after which probe is considered success. + "tcpSocket": { + "port": 0 # + Required. Port to access for probe. + }, + "timeoutSeconds": 1 # + Optional. Default value is 1. Period after which probe is + considered as failed if it hasn't completed successfully. + } + ], + "name": "str", # Required. The name of the + code package. + "readinessProbe": [ + { + "exec": { + "command": "str" # + Required. Comma separated command to run inside the + container for example "sh, -c, echo hello world". + }, + "failureThreshold": 3, # + Optional. Default value is 3. The count of failures after + which probe is considered failed. + "httpGet": { + "host": "str", # + Optional. Host IP to connect to. + "httpHeaders": [ + { + "name": "str", # Required. The name of the + header. + "value": "str" # Required. The value of the + header. + } + ], + "path": "str", # + Optional. Path to access on the HTTP request. + "port": 0, # + Required. Port to access for probe. + "scheme": "str" # + Optional. Scheme for the http probe. Can be Http or + Https. Known values are: "http", "https". + }, + "initialDelaySeconds": 0, # + Optional. The initial delay in seconds to start executing + probe once codepackage has started. + "periodSeconds": 10, # + Optional. Default value is 10. Periodic seconds to + execute probe. + "successThreshold": 1, # + Optional. Default value is 1. The count of successful + probe executions after which probe is considered success. + "tcpSocket": { + "port": 0 # + Required. Port to access for probe. + }, + "timeoutSeconds": 1 # + Optional. Default value is 1. Period after which probe is + considered as failed if it hasn't completed successfully. + } + ], + "reliableCollectionsRefs": [ + { + "doNotPersistState": bool, # + Optional. False (the default) if ReliableCollections + state is persisted to disk as usual. True if you do not + want to persist state, in which case replication is still + enabled and you can use ReliableCollections as + distributed cache. + "name": "str" # Required. + Name of ReliableCollection resource. Right now it's not + used and you can use any string. + } + ], + "resources": { + "limits": { + "cpu": 0.0, # Optional. CPU + limits in cores. At present, only full cores are + supported. + "memoryInGB": 0.0 # + Optional. The memory limit in GB. + }, + "requests": { + "cpu": 0.0, # Required. + Requested number of CPU cores. At present, only full + cores are supported. + "memoryInGB": 0.0 # + Required. The memory request in GB for this container. + } + }, + "settings": [ + { + "name": "str", # Optional. + The name of the setting. + "type": "ClearText", # + Optional. Default value is "ClearText". The type of the + setting being given in value. Known values are: + "ClearText", "KeyVaultReference", "SecretValueReference". + Default value: "ClearText". + "value": "str" # Optional. + The value of the setting, will be processed based on the + type provided. + } + ], + "volumeRefs": [ + { + "destinationPath": "str", # + Required. The path within the container at which the + volume should be mounted. Only valid path characters are + allowed. + "name": "str", # Required. + Name of the volume being referenced. + "readOnly": bool # Optional. + The flag indicating whether the volume is read only. + Default is 'false'. + } + ], + "volumes": [ + { + "creationParameters": { + "description": "str", + # Optional. User readable description of the volume. + kind: kind + }, + "destinationPath": "str", # + Required. The path within the container at which the + volume should be mounted. Only valid path characters are + allowed. + "name": "str", # Required. + Name of the volume being referenced. + "readOnly": bool # Optional. + The flag indicating whether the volume is read only. + Default is 'false'. + } + ] + } + ], + "diagnostics": { + "enabled": bool, # Optional. Status of whether or + not sinks are enabled. + "sinkRefs": [ + "str" # Optional. List of sinks to be used + if enabled. References the list of sinks in + DiagnosticsDescription. + ] + }, + "networkRefs": [ + { + "endpointRefs": [ + { + "name": "str" # Optional. + Name of the endpoint. + } + ], + "name": "str" # Optional. Name of the + network. + } + ], + "osType": "str", # Required. The operation system required + by the code in service. Known values are: "Linux", "Windows". + "replicaName": "str" # Required. Name of the replica. + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_service_replica_list_request( + application_resource_name=application_resource_name, + service_resource_name=service_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + +class MeshGatewayOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.servicefabric.ServiceFabricClientAPIs`'s + :attr:`mesh_gateway` attribute. + """ + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace + def create_or_update( + self, + gateway_resource_name: str, + gateway_resource_description: JSON, + **kwargs: Any + ) -> Optional[JSON]: + """Creates or updates a Gateway resource. + + Creates a Gateway resource with the specified name, description and properties. If Gateway + resource with the same name exists, then it is updated with the specified description and + properties. Use Gateway resource to provide public connectivity to application services. + + :param gateway_resource_name: The identity of the gateway. + :type gateway_resource_name: str + :param gateway_resource_description: Description for creating a Gateway resource. + :type gateway_resource_description: JSON + :return: JSON object + :rtype: JSON or None + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + gateway_resource_description = { + "name": "str", # Required. Name of the Gateway resource. + "properties": { + "description": "str", # Optional. User readable description of the + gateway. + "destinationNetwork": { + "endpointRefs": [ + { + "name": "str" # Optional. Name of the + endpoint. + } + ], + "name": "str" # Optional. Name of the network. + }, + "http": [ + { + "hosts": [ + { + "name": "str", # Required. http + hostname config name. + "routes": [ + { + "destination": { + "applicationName": "str", # Required. Name of + the service fabric Mesh application. + "endpointName": "str", # Required. name of the + endpoint in the service. + "serviceName": "str" # Required. service that + contains the endpoint. + }, + "match": { + "headers": [ + { + "name": "str", # Required. Name of + header to match in request. + "type": "exact", # Optional. Default + value is "exact". how to match header + value. Known values are: "exact". + "value": "str" # Optional. Value of + header to match in request. + } + ], + "path": { + "rewrite": "str", # Optional. replacement + string for matched part of the Uri. + "type": "prefix", # Default value is + "prefix". Required. how to match value in the + Uri. Known values are: "prefix". + "value": "str" # Required. Uri path to match + for request. + } + }, + "name": "str" # + Required. http route name. + } + ] + } + ], + "name": "str", # Required. http gateway config name. + "port": 0 # Required. Specifies the port at which + the service endpoint below needs to be exposed. + } + ], + "ipAddress": "str", # Optional. IP address of the gateway. This is + populated in the response and is ignored for incoming requests. + "sourceNetwork": { + "endpointRefs": [ + { + "name": "str" # Optional. Name of the + endpoint. + } + ], + "name": "str" # Optional. Name of the network. + }, + "status": "str", # Optional. Status of the resource. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the gateway. + "tcp": [ + { + "destination": { + "applicationName": "str", # Required. Name + of the service fabric Mesh application. + "endpointName": "str", # Required. name of + the endpoint in the service. + "serviceName": "str" # Required. service + that contains the endpoint. + }, + "name": "str", # Required. tcp gateway config name. + "port": 0 # Required. Specifies the port at which + the service endpoint below needs to be exposed. + } + ] + } + } + + # response body for status code(s): 200, 201 + response.json() == { + "name": "str", # Required. Name of the Gateway resource. + "properties": { + "description": "str", # Optional. User readable description of the + gateway. + "destinationNetwork": { + "endpointRefs": [ + { + "name": "str" # Optional. Name of the + endpoint. + } + ], + "name": "str" # Optional. Name of the network. + }, + "http": [ + { + "hosts": [ + { + "name": "str", # Required. http + hostname config name. + "routes": [ + { + "destination": { + "applicationName": "str", # Required. Name of + the service fabric Mesh application. + "endpointName": "str", # Required. name of the + endpoint in the service. + "serviceName": "str" # Required. service that + contains the endpoint. + }, + "match": { + "headers": [ + { + "name": "str", # Required. Name of + header to match in request. + "type": "exact", # Optional. Default + value is "exact". how to match header + value. Known values are: "exact". + "value": "str" # Optional. Value of + header to match in request. + } + ], + "path": { + "rewrite": "str", # Optional. replacement + string for matched part of the Uri. + "type": "prefix", # Default value is + "prefix". Required. how to match value in the + Uri. Known values are: "prefix". + "value": "str" # Required. Uri path to match + for request. + } + }, + "name": "str" # + Required. http route name. + } + ] + } + ], + "name": "str", # Required. http gateway config name. + "port": 0 # Required. Specifies the port at which + the service endpoint below needs to be exposed. + } + ], + "ipAddress": "str", # Optional. IP address of the gateway. This is + populated in the response and is ignored for incoming requests. + "sourceNetwork": { + "endpointRefs": [ + { + "name": "str" # Optional. Name of the + endpoint. + } + ], + "name": "str" # Optional. Name of the network. + }, + "status": "str", # Optional. Status of the resource. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the gateway. + "tcp": [ + { + "destination": { + "applicationName": "str", # Required. Name + of the service fabric Mesh application. + "endpointName": "str", # Required. name of + the endpoint in the service. + "serviceName": "str" # Required. service + that contains the endpoint. + }, + "name": "str", # Required. tcp gateway config name. + "port": 0 # Required. Specifies the port at which + the service endpoint below needs to be exposed. + } + ] + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[JSON]] + + _json = gateway_resource_description + + request = build_mesh_gateway_create_or_update_request( + gateway_resource_name=gateway_resource_name, + api_version=api_version, + content_type=content_type, + json=_json, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if response.status_code == 201: + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + + + @distributed_trace + def get( + self, + gateway_resource_name: str, + **kwargs: Any + ) -> JSON: + """Gets the Gateway resource with the given name. + + Gets the information about the Gateway resource with the given name. The information include + the description and other properties of the Gateway. + + :param gateway_resource_name: The identity of the gateway. + :type gateway_resource_name: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "name": "str", # Required. Name of the Gateway resource. + "properties": { + "description": "str", # Optional. User readable description of the + gateway. + "destinationNetwork": { + "endpointRefs": [ + { + "name": "str" # Optional. Name of the + endpoint. + } + ], + "name": "str" # Optional. Name of the network. + }, + "http": [ + { + "hosts": [ + { + "name": "str", # Required. http + hostname config name. + "routes": [ + { + "destination": { + "applicationName": "str", # Required. Name of + the service fabric Mesh application. + "endpointName": "str", # Required. name of the + endpoint in the service. + "serviceName": "str" # Required. service that + contains the endpoint. + }, + "match": { + "headers": [ + { + "name": "str", # Required. Name of + header to match in request. + "type": "exact", # Optional. Default + value is "exact". how to match header + value. Known values are: "exact". + "value": "str" # Optional. Value of + header to match in request. + } + ], + "path": { + "rewrite": "str", # Optional. replacement + string for matched part of the Uri. + "type": "prefix", # Default value is + "prefix". Required. how to match value in the + Uri. Known values are: "prefix". + "value": "str" # Required. Uri path to match + for request. + } + }, + "name": "str" # + Required. http route name. + } + ] + } + ], + "name": "str", # Required. http gateway config name. + "port": 0 # Required. Specifies the port at which + the service endpoint below needs to be exposed. + } + ], + "ipAddress": "str", # Optional. IP address of the gateway. This is + populated in the response and is ignored for incoming requests. + "sourceNetwork": { + "endpointRefs": [ + { + "name": "str" # Optional. Name of the + endpoint. + } + ], + "name": "str" # Optional. Name of the network. + }, + "status": "str", # Optional. Status of the resource. Known values + are: "Unknown", "Ready", "Upgrading", "Creating", "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional information + about the current status of the gateway. + "tcp": [ + { + "destination": { + "applicationName": "str", # Required. Name + of the service fabric Mesh application. + "endpointName": "str", # Required. name of + the endpoint in the service. + "serviceName": "str" # Required. service + that contains the endpoint. + }, + "name": "str", # Required. tcp gateway config name. + "port": 0 # Required. Specifies the port at which + the service endpoint below needs to be exposed. + } + ] + } + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_gateway_get_request( + gateway_resource_name=gateway_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + gateway_resource_name: str, + **kwargs: Any + ) -> None: + """Deletes the Gateway resource. + + Deletes the Gateway resource identified by the name. + + :param gateway_resource_name: The identity of the gateway. + :type gateway_resource_name: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[None] + + + request = build_mesh_gateway_delete_request( + gateway_resource_name=gateway_resource_name, + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> JSON: + """Lists all the gateway resources. + + Gets the information about all gateway resources in a given resource group. The information + include the description and other properties of the Gateway. + + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "ContinuationToken": "str", # Optional. 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. + "Items": [ + { + "name": "str", # Required. Name of the Gateway resource. + "properties": { + "description": "str", # Optional. User readable + description of the gateway. + "destinationNetwork": { + "endpointRefs": [ + { + "name": "str" # Optional. + Name of the endpoint. + } + ], + "name": "str" # Optional. Name of the + network. + }, + "http": [ + { + "hosts": [ + { + "name": "str", # + Required. http hostname config name. + "routes": [ + { + "destination": { + "applicationName": "str", # Required. + Name of the service fabric Mesh + application. + "endpointName": "str", # Required. name + of the endpoint in the service. + "serviceName": "str" # Required. service + that contains the endpoint. + }, + "match": { + "headers": [ + { + "name": "str", # Required. Name + of header to match in request. + "type": "exact", # Optional. + Default value is "exact". how to + match header value. Known values + are: "exact". + "value": "str" # Optional. Value + of header to match in request. + } + ], + "path": { + "rewrite": "str", # Optional. + replacement string for matched part + of the Uri. + "type": "prefix", # Default value is + "prefix". Required. how to match + value in the Uri. Known values are: + "prefix". + "value": "str" # Required. Uri path + to match for request. + } + }, + "name": "str" # Required. http route name. + } + ] + } + ], + "name": "str", # Required. http + gateway config name. + "port": 0 # Required. Specifies the + port at which the service endpoint below needs to be exposed. + } + ], + "ipAddress": "str", # Optional. IP address of the + gateway. This is populated in the response and is ignored for + incoming requests. + "sourceNetwork": { + "endpointRefs": [ + { + "name": "str" # Optional. + Name of the endpoint. + } + ], + "name": "str" # Optional. Name of the + network. + }, + "status": "str", # Optional. Status of the resource. + Known values are: "Unknown", "Ready", "Upgrading", "Creating", + "Deleting", "Failed". + "statusDetails": "str", # Optional. Gives additional + information about the current status of the gateway. + "tcp": [ + { + "destination": { + "applicationName": "str", # + Required. Name of the service fabric Mesh application. + "endpointName": "str", # + Required. name of the endpoint in the service. + "serviceName": "str" # + Required. service that contains the endpoint. + }, + "name": "str", # Required. tcp + gateway config name. + "port": 0 # Required. Specifies the + port at which the service endpoint below needs to be exposed. + } + ] + } + } + ] + } + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop('api_version', _params.pop('api-version', "9.0.0.46")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[JSON] + + + request = build_mesh_gateway_list_request( + api_version=api_version, + headers=_headers, + params=_params, + ) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + diff --git a/customSDK/servicefabric/operations/_patch.py b/customSDK/servicefabric/operations/_patch.py new file mode 100644 index 00000000..0ad201a8 --- /dev/null +++ b/customSDK/servicefabric/operations/_patch.py @@ -0,0 +1,19 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/customSDK/servicefabric/operations/_service_fabric_client_apis_operations.py b/customSDK/servicefabric/operations/_service_fabric_client_apis_operations.py deleted file mode 100644 index 0b468984..00000000 --- a/customSDK/servicefabric/operations/_service_fabric_client_apis_operations.py +++ /dev/null @@ -1,25421 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import TYPE_CHECKING - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, List, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_get_cluster_manifest_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/GetClusterManifest") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_cluster_health_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - nodes_health_state_filter = kwargs.pop('nodes_health_state_filter', 0) # type: Optional[int] - applications_health_state_filter = kwargs.pop('applications_health_state_filter', 0) # type: Optional[int] - events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] - exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] - include_system_application_health_statistics = kwargs.pop('include_system_application_health_statistics', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/GetClusterHealth") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if nodes_health_state_filter is not None: - _query_parameters['NodesHealthStateFilter'] = _SERIALIZER.query("nodes_health_state_filter", nodes_health_state_filter, 'int') - if applications_health_state_filter is not None: - _query_parameters['ApplicationsHealthStateFilter'] = _SERIALIZER.query("applications_health_state_filter", applications_health_state_filter, 'int') - if events_health_state_filter is not None: - _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') - if exclude_health_statistics is not None: - _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if include_system_application_health_statistics is not None: - _query_parameters['IncludeSystemApplicationHealthStatistics'] = _SERIALIZER.query("include_system_application_health_statistics", include_system_application_health_statistics, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_cluster_health_using_policy_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - nodes_health_state_filter = kwargs.pop('nodes_health_state_filter', 0) # type: Optional[int] - applications_health_state_filter = kwargs.pop('applications_health_state_filter', 0) # type: Optional[int] - events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] - exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] - include_system_application_health_statistics = kwargs.pop('include_system_application_health_statistics', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/GetClusterHealth") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if nodes_health_state_filter is not None: - _query_parameters['NodesHealthStateFilter'] = _SERIALIZER.query("nodes_health_state_filter", nodes_health_state_filter, 'int') - if applications_health_state_filter is not None: - _query_parameters['ApplicationsHealthStateFilter'] = _SERIALIZER.query("applications_health_state_filter", applications_health_state_filter, 'int') - if events_health_state_filter is not None: - _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') - if exclude_health_statistics is not None: - _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if include_system_application_health_statistics is not None: - _query_parameters['IncludeSystemApplicationHealthStatistics'] = _SERIALIZER.query("include_system_application_health_statistics", include_system_application_health_statistics, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_cluster_health_chunk_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/GetClusterHealthChunk") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_cluster_health_chunk_using_policy_and_advanced_filters_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/GetClusterHealthChunk") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_report_cluster_health_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - immediate = kwargs.pop('immediate', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/ReportClusterHealth") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if immediate is not None: - _query_parameters['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_provisioned_fabric_code_version_info_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - code_version = kwargs.pop('code_version', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/GetProvisionedCodeVersions") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if code_version is not None: - _query_parameters['CodeVersion'] = _SERIALIZER.query("code_version", code_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_provisioned_fabric_config_version_info_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - config_version = kwargs.pop('config_version', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/GetProvisionedConfigVersions") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if config_version is not None: - _query_parameters['ConfigVersion'] = _SERIALIZER.query("config_version", config_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_cluster_upgrade_progress_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/GetUpgradeProgress") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_cluster_configuration_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - configuration_api_version = kwargs.pop('configuration_api_version') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/GetClusterConfiguration") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['ConfigurationApiVersion'] = _SERIALIZER.query("configuration_api_version", configuration_api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_cluster_configuration_upgrade_status_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/GetClusterConfigurationUpgradeStatus") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_upgrade_orchestration_service_state_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/GetUpgradeOrchestrationServiceState") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_set_upgrade_orchestration_service_state_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/SetUpgradeOrchestrationServiceState") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_provision_cluster_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/Provision") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_unprovision_cluster_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/Unprovision") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_rollback_cluster_upgrade_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/RollbackUpgrade") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_resume_cluster_upgrade_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/MoveToNextUpgradeDomain") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_start_cluster_upgrade_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/Upgrade") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_start_cluster_configuration_upgrade_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/StartClusterConfigurationUpgrade") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_update_cluster_upgrade_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/UpdateUpgrade") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_aad_metadata_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "6.0") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/GetAadMetadata") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_cluster_version_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/GetClusterVersion") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_cluster_load_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/GetLoadInformation") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_toggle_verbose_service_placement_health_reporting_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - enabled = kwargs.pop('enabled') # type: bool - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/ToggleVerboseServicePlacementHealthReporting") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['Enabled'] = _SERIALIZER.query("enabled", enabled, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_validate_cluster_upgrade_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/ValidateUpgrade") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_node_info_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - node_status_filter = kwargs.pop('node_status_filter', "default") # type: Optional[Union[str, "_models.NodeStatusFilter"]] - max_results = kwargs.pop('max_results', 0) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if node_status_filter is not None: - _query_parameters['NodeStatusFilter'] = _SERIALIZER.query("node_status_filter", node_status_filter, 'str') - if max_results is not None: - _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_node_info_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_node_health_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetHealth") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_node_health_using_policy_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetHealth") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_report_node_health_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - immediate = kwargs.pop('immediate', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/ReportHealth") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if immediate is not None: - _query_parameters['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_node_load_info_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetLoadInformation") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_disable_node_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/Deactivate") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_enable_node_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/Activate") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_remove_node_state_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/RemoveNodeState") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_restart_node_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/Restart") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_remove_configuration_overrides_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/RemoveConfigurationOverrides") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_configuration_overrides_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetConfigurationOverrides") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_add_configuration_parameter_overrides_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - force = kwargs.pop('force', None) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/AddConfigurationParameterOverrides") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if force is not None: - _query_parameters['Force'] = _SERIALIZER.query("force", force, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_remove_node_tags_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/RemoveNodeTags") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_add_node_tags_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/AddNodeTags") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_application_type_info_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - application_type_definition_kind_filter = kwargs.pop('application_type_definition_kind_filter', 0) # type: Optional[int] - exclude_application_parameters = kwargs.pop('exclude_application_parameters', False) # type: Optional[bool] - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - max_results = kwargs.pop('max_results', 0) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ApplicationTypes") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if application_type_definition_kind_filter is not None: - _query_parameters['ApplicationTypeDefinitionKindFilter'] = _SERIALIZER.query("application_type_definition_kind_filter", application_type_definition_kind_filter, 'int') - if exclude_application_parameters is not None: - _query_parameters['ExcludeApplicationParameters'] = _SERIALIZER.query("exclude_application_parameters", exclude_application_parameters, 'bool') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if max_results is not None: - _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_application_type_info_list_by_name_request( - application_type_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - application_type_version = kwargs.pop('application_type_version', None) # type: Optional[str] - exclude_application_parameters = kwargs.pop('exclude_application_parameters', False) # type: Optional[bool] - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - max_results = kwargs.pop('max_results', 0) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ApplicationTypes/{applicationTypeName}") - path_format_arguments = { - "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if application_type_version is not None: - _query_parameters['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') - if exclude_application_parameters is not None: - _query_parameters['ExcludeApplicationParameters'] = _SERIALIZER.query("exclude_application_parameters", exclude_application_parameters, 'bool') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if max_results is not None: - _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_provision_application_type_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ApplicationTypes/$/Provision") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_unprovision_application_type_request( - application_type_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ApplicationTypes/{applicationTypeName}/$/Unprovision") - path_format_arguments = { - "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_update_application_type_arm_metadata_request( - application_type_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - application_type_version = kwargs.pop('application_type_version') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - force = kwargs.pop('force', None) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ApplicationTypes/{applicationTypeName}/$/UpdateArmMetadata") - path_format_arguments = { - "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if force is not None: - _query_parameters['Force'] = _SERIALIZER.query("force", force, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_service_type_info_list_request( - application_type_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - application_type_version = kwargs.pop('application_type_version') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes") - path_format_arguments = { - "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_service_type_info_by_name_request( - application_type_name, # type: str - service_type_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - application_type_version = kwargs.pop('application_type_version') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes/{serviceTypeName}") - path_format_arguments = { - "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), - "serviceTypeName": _SERIALIZER.url("service_type_name", service_type_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_service_manifest_request( - application_type_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - application_type_version = kwargs.pop('application_type_version') # type: str - service_manifest_name = kwargs.pop('service_manifest_name') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ApplicationTypes/{applicationTypeName}/$/GetServiceManifest") - path_format_arguments = { - "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') - _query_parameters['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_deployed_service_type_info_list_request( - node_name, # type: str - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - service_manifest_name = kwargs.pop('service_manifest_name', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if service_manifest_name is not None: - _query_parameters['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_deployed_service_type_info_by_name_request( - node_name, # type: str - application_id, # type: str - service_type_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - service_manifest_name = kwargs.pop('service_manifest_name', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes/{serviceTypeName}") # pylint: disable=line-too-long - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - "serviceTypeName": _SERIALIZER.url("service_type_name", service_type_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if service_manifest_name is not None: - _query_parameters['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_application_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/$/Create") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_application_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - force_remove = kwargs.pop('force_remove', None) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/Delete") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if force_remove is not None: - _query_parameters['ForceRemove'] = _SERIALIZER.query("force_remove", force_remove, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_application_load_info_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetLoadInformation") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_application_info_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - application_definition_kind_filter = kwargs.pop('application_definition_kind_filter', 0) # type: Optional[int] - application_type_name = kwargs.pop('application_type_name', None) # type: Optional[str] - exclude_application_parameters = kwargs.pop('exclude_application_parameters', False) # type: Optional[bool] - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - max_results = kwargs.pop('max_results', 0) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if application_definition_kind_filter is not None: - _query_parameters['ApplicationDefinitionKindFilter'] = _SERIALIZER.query("application_definition_kind_filter", application_definition_kind_filter, 'int') - if application_type_name is not None: - _query_parameters['ApplicationTypeName'] = _SERIALIZER.query("application_type_name", application_type_name, 'str') - if exclude_application_parameters is not None: - _query_parameters['ExcludeApplicationParameters'] = _SERIALIZER.query("exclude_application_parameters", exclude_application_parameters, 'bool') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if max_results is not None: - _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_application_info_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - exclude_application_parameters = kwargs.pop('exclude_application_parameters', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if exclude_application_parameters is not None: - _query_parameters['ExcludeApplicationParameters'] = _SERIALIZER.query("exclude_application_parameters", exclude_application_parameters, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_application_health_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] - deployed_applications_health_state_filter = kwargs.pop('deployed_applications_health_state_filter', 0) # type: Optional[int] - services_health_state_filter = kwargs.pop('services_health_state_filter', 0) # type: Optional[int] - exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetHealth") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') - if deployed_applications_health_state_filter is not None: - _query_parameters['DeployedApplicationsHealthStateFilter'] = _SERIALIZER.query("deployed_applications_health_state_filter", deployed_applications_health_state_filter, 'int') - if services_health_state_filter is not None: - _query_parameters['ServicesHealthStateFilter'] = _SERIALIZER.query("services_health_state_filter", services_health_state_filter, 'int') - if exclude_health_statistics is not None: - _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_application_health_using_policy_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] - deployed_applications_health_state_filter = kwargs.pop('deployed_applications_health_state_filter', 0) # type: Optional[int] - services_health_state_filter = kwargs.pop('services_health_state_filter', 0) # type: Optional[int] - exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetHealth") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') - if deployed_applications_health_state_filter is not None: - _query_parameters['DeployedApplicationsHealthStateFilter'] = _SERIALIZER.query("deployed_applications_health_state_filter", deployed_applications_health_state_filter, 'int') - if services_health_state_filter is not None: - _query_parameters['ServicesHealthStateFilter'] = _SERIALIZER.query("services_health_state_filter", services_health_state_filter, 'int') - if exclude_health_statistics is not None: - _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_report_application_health_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - immediate = kwargs.pop('immediate', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/ReportHealth") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if immediate is not None: - _query_parameters['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_start_application_upgrade_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/Upgrade") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_application_upgrade_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetUpgradeProgress") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_update_application_upgrade_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/UpdateUpgrade") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_update_application_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/Update") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_resume_application_upgrade_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/MoveToNextUpgradeDomain") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_rollback_application_upgrade_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/RollbackUpgrade") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_deployed_application_info_list_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - include_health_state = kwargs.pop('include_health_state', False) # type: Optional[bool] - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - max_results = kwargs.pop('max_results', 0) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if include_health_state is not None: - _query_parameters['IncludeHealthState'] = _SERIALIZER.query("include_health_state", include_health_state, 'bool') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if max_results is not None: - _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_deployed_application_info_request( - node_name, # type: str - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - include_health_state = kwargs.pop('include_health_state', False) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if include_health_state is not None: - _query_parameters['IncludeHealthState'] = _SERIALIZER.query("include_health_state", include_health_state, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_deployed_application_health_request( - node_name, # type: str - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] - deployed_service_packages_health_state_filter = kwargs.pop('deployed_service_packages_health_state_filter', 0) # type: Optional[int] - exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') - if deployed_service_packages_health_state_filter is not None: - _query_parameters['DeployedServicePackagesHealthStateFilter'] = _SERIALIZER.query("deployed_service_packages_health_state_filter", deployed_service_packages_health_state_filter, 'int') - if exclude_health_statistics is not None: - _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_deployed_application_health_using_policy_request( - node_name, # type: str - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] - deployed_service_packages_health_state_filter = kwargs.pop('deployed_service_packages_health_state_filter', 0) # type: Optional[int] - exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') - if deployed_service_packages_health_state_filter is not None: - _query_parameters['DeployedServicePackagesHealthStateFilter'] = _SERIALIZER.query("deployed_service_packages_health_state_filter", deployed_service_packages_health_state_filter, 'int') - if exclude_health_statistics is not None: - _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_report_deployed_application_health_request( - node_name, # type: str - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - immediate = kwargs.pop('immediate', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/ReportHealth") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if immediate is not None: - _query_parameters['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_application_manifest_request( - application_type_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - application_type_version = kwargs.pop('application_type_version') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ApplicationTypes/{applicationTypeName}/$/GetApplicationManifest") - path_format_arguments = { - "applicationTypeName": _SERIALIZER.url("application_type_name", application_type_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['ApplicationTypeVersion'] = _SERIALIZER.query("application_type_version", application_type_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_update_application_arm_metadata_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - force = kwargs.pop('force', None) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/UpdateArmMetadata") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if force is not None: - _query_parameters['Force'] = _SERIALIZER.query("force", force, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_service_info_list_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - service_type_name = kwargs.pop('service_type_name', None) # type: Optional[str] - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetServices") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if service_type_name is not None: - _query_parameters['ServiceTypeName'] = _SERIALIZER.query("service_type_name", service_type_name, 'str') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_service_info_request( - application_id, # type: str - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetServices/{serviceId}") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_application_name_info_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetApplicationName") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_service_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetServices/$/Create") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_service_from_template_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetServices/$/CreateFromTemplate") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_service_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - force_remove = kwargs.pop('force_remove', None) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/Delete") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if force_remove is not None: - _query_parameters['ForceRemove'] = _SERIALIZER.query("force_remove", force_remove, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_update_service_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/Update") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_service_description_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetDescription") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_service_health_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] - partitions_health_state_filter = kwargs.pop('partitions_health_state_filter', 0) # type: Optional[int] - exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetHealth") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') - if partitions_health_state_filter is not None: - _query_parameters['PartitionsHealthStateFilter'] = _SERIALIZER.query("partitions_health_state_filter", partitions_health_state_filter, 'int') - if exclude_health_statistics is not None: - _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_service_health_using_policy_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] - partitions_health_state_filter = kwargs.pop('partitions_health_state_filter', 0) # type: Optional[int] - exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetHealth") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') - if partitions_health_state_filter is not None: - _query_parameters['PartitionsHealthStateFilter'] = _SERIALIZER.query("partitions_health_state_filter", partitions_health_state_filter, 'int') - if exclude_health_statistics is not None: - _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_report_service_health_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - immediate = kwargs.pop('immediate', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/ReportHealth") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if immediate is not None: - _query_parameters['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_resolve_service_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - partition_key_type = kwargs.pop('partition_key_type', None) # type: Optional[int] - partition_key_value = kwargs.pop('partition_key_value', None) # type: Optional[str] - previous_rsp_version = kwargs.pop('previous_rsp_version', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/ResolvePartition") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if partition_key_type is not None: - _query_parameters['PartitionKeyType'] = _SERIALIZER.query("partition_key_type", partition_key_type, 'int') - if partition_key_value is not None: - _query_parameters['PartitionKeyValue'] = _SERIALIZER.query("partition_key_value", partition_key_value, 'str', skip_quote=True) - if previous_rsp_version is not None: - _query_parameters['PreviousRspVersion'] = _SERIALIZER.query("previous_rsp_version", previous_rsp_version, 'str', skip_quote=True) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_unplaced_replica_information_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - partition_id = kwargs.pop('partition_id', None) # type: Optional[str] - only_query_primaries = kwargs.pop('only_query_primaries', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetUnplacedReplicaInformation") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if partition_id is not None: - _query_parameters['PartitionId'] = _SERIALIZER.query("partition_id", partition_id, 'str') - if only_query_primaries is not None: - _query_parameters['OnlyQueryPrimaries'] = _SERIALIZER.query("only_query_primaries", only_query_primaries, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_loaded_partition_info_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - metric_name = kwargs.pop('metric_name') # type: str - service_name = kwargs.pop('service_name', None) # type: Optional[str] - ordering = kwargs.pop('ordering', None) # type: Optional[Union[str, "_models.Ordering"]] - max_results = kwargs.pop('max_results', 0) # type: Optional[int] - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/GetLoadedPartitionInfoList") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['MetricName'] = _SERIALIZER.query("metric_name", metric_name, 'str') - if service_name is not None: - _query_parameters['ServiceName'] = _SERIALIZER.query("service_name", service_name, 'str') - if ordering is not None: - _query_parameters['Ordering'] = _SERIALIZER.query("ordering", ordering, 'str') - if max_results is not None: - _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_partition_info_list_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetPartitions") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_partition_info_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_service_name_info_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetServiceName") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_partition_health_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] - replicas_health_state_filter = kwargs.pop('replicas_health_state_filter', 0) # type: Optional[int] - exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetHealth") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') - if replicas_health_state_filter is not None: - _query_parameters['ReplicasHealthStateFilter'] = _SERIALIZER.query("replicas_health_state_filter", replicas_health_state_filter, 'int') - if exclude_health_statistics is not None: - _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_partition_health_using_policy_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] - replicas_health_state_filter = kwargs.pop('replicas_health_state_filter', 0) # type: Optional[int] - exclude_health_statistics = kwargs.pop('exclude_health_statistics', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetHealth") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') - if replicas_health_state_filter is not None: - _query_parameters['ReplicasHealthStateFilter'] = _SERIALIZER.query("replicas_health_state_filter", replicas_health_state_filter, 'int') - if exclude_health_statistics is not None: - _query_parameters['ExcludeHealthStatistics'] = _SERIALIZER.query("exclude_health_statistics", exclude_health_statistics, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_report_partition_health_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - immediate = kwargs.pop('immediate', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/ReportHealth") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if immediate is not None: - _query_parameters['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_partition_load_information_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetLoadInformation") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_reset_partition_load_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/ResetLoad") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_recover_partition_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/Recover") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_recover_service_partitions_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/$/{serviceId}/$/GetPartitions/$/Recover") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_recover_system_partitions_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/RecoverSystemPartitions") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_recover_all_partitions_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/RecoverAllPartitions") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_move_primary_replica_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - node_name = kwargs.pop('node_name', None) # type: Optional[str] - ignore_constraints = kwargs.pop('ignore_constraints', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/MovePrimaryReplica") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if node_name is not None: - _query_parameters['NodeName'] = _SERIALIZER.query("node_name", node_name, 'str') - if ignore_constraints is not None: - _query_parameters['IgnoreConstraints'] = _SERIALIZER.query("ignore_constraints", ignore_constraints, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_move_secondary_replica_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - current_node_name = kwargs.pop('current_node_name') # type: str - new_node_name = kwargs.pop('new_node_name', None) # type: Optional[str] - ignore_constraints = kwargs.pop('ignore_constraints', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/MoveSecondaryReplica") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['CurrentNodeName'] = _SERIALIZER.query("current_node_name", current_node_name, 'str') - if new_node_name is not None: - _query_parameters['NewNodeName'] = _SERIALIZER.query("new_node_name", new_node_name, 'str') - if ignore_constraints is not None: - _query_parameters['IgnoreConstraints'] = _SERIALIZER.query("ignore_constraints", ignore_constraints, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_update_partition_load_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - max_results = kwargs.pop('max_results', 0) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/UpdatePartitionLoad") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if max_results is not None: - _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_move_instance_request( - service_id, # type: str - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - current_node_name = kwargs.pop('current_node_name', None) # type: Optional[str] - new_node_name = kwargs.pop('new_node_name', None) # type: Optional[str] - ignore_constraints = kwargs.pop('ignore_constraints', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveInstance") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if current_node_name is not None: - _query_parameters['CurrentNodeName'] = _SERIALIZER.query("current_node_name", current_node_name, 'str') - if new_node_name is not None: - _query_parameters['NewNodeName'] = _SERIALIZER.query("new_node_name", new_node_name, 'str') - if ignore_constraints is not None: - _query_parameters['IgnoreConstraints'] = _SERIALIZER.query("ignore_constraints", ignore_constraints, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_move_auxiliary_replica_request( - service_id, # type: str - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - current_node_name = kwargs.pop('current_node_name', None) # type: Optional[str] - new_node_name = kwargs.pop('new_node_name', None) # type: Optional[str] - ignore_constraints = kwargs.pop('ignore_constraints', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveAuxiliaryReplica") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if current_node_name is not None: - _query_parameters['CurrentNodeName'] = _SERIALIZER.query("current_node_name", current_node_name, 'str') - if new_node_name is not None: - _query_parameters['NewNodeName'] = _SERIALIZER.query("new_node_name", new_node_name, 'str') - if ignore_constraints is not None: - _query_parameters['IgnoreConstraints'] = _SERIALIZER.query("ignore_constraints", ignore_constraints, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_repair_task_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/CreateRepairTask") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_cancel_repair_task_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/CancelRepairTask") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_repair_task_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/DeleteRepairTask") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_repair_task_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - task_id_filter = kwargs.pop('task_id_filter', None) # type: Optional[str] - state_filter = kwargs.pop('state_filter', None) # type: Optional[int] - executor_filter = kwargs.pop('executor_filter', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/GetRepairTaskList") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if task_id_filter is not None: - _query_parameters['TaskIdFilter'] = _SERIALIZER.query("task_id_filter", task_id_filter, 'str') - if state_filter is not None: - _query_parameters['StateFilter'] = _SERIALIZER.query("state_filter", state_filter, 'int') - if executor_filter is not None: - _query_parameters['ExecutorFilter'] = _SERIALIZER.query("executor_filter", executor_filter, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_force_approve_repair_task_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/ForceApproveRepairTask") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_update_repair_task_health_policy_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/UpdateRepairTaskHealthPolicy") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_update_repair_execution_state_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/UpdateRepairExecutionState") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_replica_info_list_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetReplicas") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_replica_info_request( - partition_id, # type: str - replica_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetReplicas/{replicaId}") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_replica_health_request( - partition_id, # type: str - replica_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_replica_health_using_policy_request( - partition_id, # type: str - replica_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_report_replica_health_request( - partition_id, # type: str - replica_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - service_kind = kwargs.pop('service_kind', "Stateful") # type: Union[str, "_models.ReplicaHealthReportServiceKind"] - immediate = kwargs.pop('immediate', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/ReportHealth") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['ServiceKind'] = _SERIALIZER.query("service_kind", service_kind, 'str') - if immediate is not None: - _query_parameters['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_deployed_service_replica_info_list_request( - node_name, # type: str - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - partition_id = kwargs.pop('partition_id', None) # type: Optional[str] - service_manifest_name = kwargs.pop('service_manifest_name', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetReplicas") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if partition_id is not None: - _query_parameters['PartitionId'] = _SERIALIZER.query("partition_id", partition_id, 'str') - if service_manifest_name is not None: - _query_parameters['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_deployed_service_replica_detail_info_request( - node_name, # type: str - partition_id, # type: str - replica_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetDetail") # pylint: disable=line-too-long - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_deployed_service_replica_detail_info_by_partition_id_request( - node_name, # type: str - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_restart_replica_request( - node_name, # type: str - partition_id, # type: str - replica_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Restart") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_remove_replica_request( - node_name, # type: str - partition_id, # type: str - replica_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - force_remove = kwargs.pop('force_remove', None) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Delete") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if force_remove is not None: - _query_parameters['ForceRemove'] = _SERIALIZER.query("force_remove", force_remove, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_deployed_service_package_info_list_request( - node_name, # type: str - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_deployed_service_package_info_list_by_name_request( - node_name, # type: str - application_id, # type: str - service_package_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}") # pylint: disable=line-too-long - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - "servicePackageName": _SERIALIZER.url("service_package_name", service_package_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_deployed_service_package_health_request( - node_name, # type: str - application_id, # type: str - service_package_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth") # pylint: disable=line-too-long - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - "servicePackageName": _SERIALIZER.url("service_package_name", service_package_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_deployed_service_package_health_using_policy_request( - node_name, # type: str - application_id, # type: str - service_package_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - events_health_state_filter = kwargs.pop('events_health_state_filter', 0) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth") # pylint: disable=line-too-long - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - "servicePackageName": _SERIALIZER.url("service_package_name", service_package_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if events_health_state_filter is not None: - _query_parameters['EventsHealthStateFilter'] = _SERIALIZER.query("events_health_state_filter", events_health_state_filter, 'int') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_report_deployed_service_package_health_request( - node_name, # type: str - application_id, # type: str - service_package_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - immediate = kwargs.pop('immediate', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/ReportHealth") # pylint: disable=line-too-long - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - "servicePackageName": _SERIALIZER.url("service_package_name", service_package_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if immediate is not None: - _query_parameters['Immediate'] = _SERIALIZER.query("immediate", immediate, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_deploy_service_package_to_node_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/DeployServicePackage") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_deployed_code_package_info_list_request( - node_name, # type: str - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - service_manifest_name = kwargs.pop('service_manifest_name', None) # type: Optional[str] - code_package_name = kwargs.pop('code_package_name', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if service_manifest_name is not None: - _query_parameters['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') - if code_package_name is not None: - _query_parameters['CodePackageName'] = _SERIALIZER.query("code_package_name", code_package_name, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_restart_deployed_code_package_request( - node_name, # type: str - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/Restart") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_container_logs_deployed_on_node_request( - node_name, # type: str - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - service_manifest_name = kwargs.pop('service_manifest_name') # type: str - code_package_name = kwargs.pop('code_package_name') # type: str - tail = kwargs.pop('tail', None) # type: Optional[str] - previous = kwargs.pop('previous', False) # type: Optional[bool] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerLogs") # pylint: disable=line-too-long - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') - _query_parameters['CodePackageName'] = _SERIALIZER.query("code_package_name", code_package_name, 'str') - if tail is not None: - _query_parameters['Tail'] = _SERIALIZER.query("tail", tail, 'str') - if previous is not None: - _query_parameters['Previous'] = _SERIALIZER.query("previous", previous, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_invoke_container_api_request( - node_name, # type: str - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - service_manifest_name = kwargs.pop('service_manifest_name') # type: str - code_package_name = kwargs.pop('code_package_name') # type: str - code_package_instance_id = kwargs.pop('code_package_instance_id') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerApi") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['ServiceManifestName'] = _SERIALIZER.query("service_manifest_name", service_manifest_name, 'str') - _query_parameters['CodePackageName'] = _SERIALIZER.query("code_package_name", code_package_name, 'str') - _query_parameters['CodePackageInstanceId'] = _SERIALIZER.query("code_package_instance_id", code_package_instance_id, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_compose_deployment_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ComposeDeployments/$/Create") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_compose_deployment_status_request( - deployment_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ComposeDeployments/{deploymentName}") - path_format_arguments = { - "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_compose_deployment_status_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - max_results = kwargs.pop('max_results', 0) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ComposeDeployments") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if max_results is not None: - _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_compose_deployment_upgrade_progress_request( - deployment_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ComposeDeployments/{deploymentName}/$/GetUpgradeProgress") - path_format_arguments = { - "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_remove_compose_deployment_request( - deployment_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ComposeDeployments/{deploymentName}/$/Delete") - path_format_arguments = { - "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_start_compose_deployment_upgrade_request( - deployment_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ComposeDeployments/{deploymentName}/$/Upgrade") - path_format_arguments = { - "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_start_rollback_compose_deployment_upgrade_request( - deployment_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ComposeDeployments/{deploymentName}/$/RollbackUpgrade") - path_format_arguments = { - "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_chaos_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Tools/Chaos") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_start_chaos_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Tools/Chaos/$/Start") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_stop_chaos_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Tools/Chaos/$/Stop") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_chaos_events_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - start_time_utc = kwargs.pop('start_time_utc', None) # type: Optional[str] - end_time_utc = kwargs.pop('end_time_utc', None) # type: Optional[str] - max_results = kwargs.pop('max_results', 0) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Tools/Chaos/Events") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if start_time_utc is not None: - _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') - if end_time_utc is not None: - _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') - if max_results is not None: - _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_chaos_schedule_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Tools/Chaos/Schedule") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_post_chaos_schedule_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Tools/Chaos/Schedule") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_upload_file_request( - content_path, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ImageStore/{contentPath}") - path_format_arguments = { - "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_image_store_content_request( - content_path, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ImageStore/{contentPath}") - path_format_arguments = { - "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_image_store_content_request( - content_path, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ImageStore/{contentPath}") - path_format_arguments = { - "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_image_store_root_content_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ImageStore") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_copy_image_store_content_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ImageStore/$/Copy") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_image_store_upload_session_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - session_id = kwargs.pop('session_id') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ImageStore/$/DeleteUploadSession") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['session-id'] = _SERIALIZER.query("session_id", session_id, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_commit_image_store_upload_session_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - session_id = kwargs.pop('session_id') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ImageStore/$/CommitUploadSession") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['session-id'] = _SERIALIZER.query("session_id", session_id, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_image_store_upload_session_by_id_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - session_id = kwargs.pop('session_id') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ImageStore/$/GetUploadSession") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['session-id'] = _SERIALIZER.query("session_id", session_id, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_image_store_upload_session_by_path_request( - content_path, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ImageStore/{contentPath}/$/GetUploadSession") - path_format_arguments = { - "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_upload_file_chunk_request( - content_path, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - session_id = kwargs.pop('session_id') # type: str - content_range = kwargs.pop('content_range') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ImageStore/{contentPath}/$/UploadChunk") - path_format_arguments = { - "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['session-id'] = _SERIALIZER.query("session_id", session_id, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Content-Range'] = _SERIALIZER.header("content_range", content_range, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_image_store_root_folder_size_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ImageStore/$/FolderSize") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_image_store_folder_size_request( - content_path, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ImageStore/{contentPath}/$/FolderSize") - path_format_arguments = { - "contentPath": _SERIALIZER.url("content_path", content_path, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_image_store_info_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/ImageStore/$/Info") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_invoke_infrastructure_command_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - command = kwargs.pop('command') # type: str - service_id = kwargs.pop('service_id', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/InvokeInfrastructureCommand") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['Command'] = _SERIALIZER.query("command", command, 'str') - if service_id is not None: - _query_parameters['ServiceId'] = _SERIALIZER.query("service_id", service_id, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_invoke_infrastructure_query_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - command = kwargs.pop('command') # type: str - service_id = kwargs.pop('service_id', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/$/InvokeInfrastructureQuery") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['Command'] = _SERIALIZER.query("command", command, 'str') - if service_id is not None: - _query_parameters['ServiceId'] = _SERIALIZER.query("service_id", service_id, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_start_data_loss_request( - service_id, # type: str - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - operation_id = kwargs.pop('operation_id') # type: str - data_loss_mode = kwargs.pop('data_loss_mode') # type: Union[str, "_models.DataLossMode"] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartDataLoss") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') - _query_parameters['DataLossMode'] = _SERIALIZER.query("data_loss_mode", data_loss_mode, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_data_loss_progress_request( - service_id, # type: str - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - operation_id = kwargs.pop('operation_id') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetDataLossProgress") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_start_quorum_loss_request( - service_id, # type: str - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - operation_id = kwargs.pop('operation_id') # type: str - quorum_loss_mode = kwargs.pop('quorum_loss_mode') # type: Union[str, "_models.QuorumLossMode"] - quorum_loss_duration = kwargs.pop('quorum_loss_duration') # type: int - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartQuorumLoss") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') - _query_parameters['QuorumLossMode'] = _SERIALIZER.query("quorum_loss_mode", quorum_loss_mode, 'str') - _query_parameters['QuorumLossDuration'] = _SERIALIZER.query("quorum_loss_duration", quorum_loss_duration, 'int') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_quorum_loss_progress_request( - service_id, # type: str - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - operation_id = kwargs.pop('operation_id') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetQuorumLossProgress") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_start_partition_restart_request( - service_id, # type: str - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - operation_id = kwargs.pop('operation_id') # type: str - restart_partition_mode = kwargs.pop('restart_partition_mode') # type: Union[str, "_models.RestartPartitionMode"] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartRestart") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') - _query_parameters['RestartPartitionMode'] = _SERIALIZER.query("restart_partition_mode", restart_partition_mode, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_partition_restart_progress_request( - service_id, # type: str - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - operation_id = kwargs.pop('operation_id') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetRestartProgress") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_start_node_transition_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - operation_id = kwargs.pop('operation_id') # type: str - node_transition_type = kwargs.pop('node_transition_type') # type: Union[str, "_models.NodeTransitionType"] - node_instance_id = kwargs.pop('node_instance_id') # type: str - stop_duration_in_seconds = kwargs.pop('stop_duration_in_seconds') # type: int - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Faults/Nodes/{nodeName}/$/StartTransition/") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') - _query_parameters['NodeTransitionType'] = _SERIALIZER.query("node_transition_type", node_transition_type, 'str') - _query_parameters['NodeInstanceId'] = _SERIALIZER.query("node_instance_id", node_instance_id, 'str') - _query_parameters['StopDurationInSeconds'] = _SERIALIZER.query("stop_duration_in_seconds", stop_duration_in_seconds, 'int', minimum=0) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_node_transition_progress_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - operation_id = kwargs.pop('operation_id') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Faults/Nodes/{nodeName}/$/GetTransitionProgress") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_fault_operation_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - type_filter = kwargs.pop('type_filter', 65535) # type: int - state_filter = kwargs.pop('state_filter', 65535) # type: int - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Faults/") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['TypeFilter'] = _SERIALIZER.query("type_filter", type_filter, 'int') - _query_parameters['StateFilter'] = _SERIALIZER.query("state_filter", state_filter, 'int') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_cancel_operation_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - operation_id = kwargs.pop('operation_id') # type: str - force = kwargs.pop('force', False) # type: bool - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Faults/$/Cancel") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['OperationId'] = _SERIALIZER.query("operation_id", operation_id, 'str') - _query_parameters['Force'] = _SERIALIZER.query("force", force, 'bool') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_backup_policy_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - validate_connection = kwargs.pop('validate_connection', False) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/BackupRestore/BackupPolicies/$/Create") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if validate_connection is not None: - _query_parameters['ValidateConnection'] = _SERIALIZER.query("validate_connection", validate_connection, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_backup_policy_request( - backup_policy_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/BackupRestore/BackupPolicies/{backupPolicyName}/$/Delete") - path_format_arguments = { - "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_backup_policy_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - max_results = kwargs.pop('max_results', 0) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/BackupRestore/BackupPolicies") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if max_results is not None: - _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_backup_policy_by_name_request( - backup_policy_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/BackupRestore/BackupPolicies/{backupPolicyName}") - path_format_arguments = { - "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_all_entities_backed_up_by_policy_request( - backup_policy_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - max_results = kwargs.pop('max_results', 0) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/BackupRestore/BackupPolicies/{backupPolicyName}/$/GetBackupEnabledEntities") - path_format_arguments = { - "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if max_results is not None: - _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_update_backup_policy_request( - backup_policy_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - validate_connection = kwargs.pop('validate_connection', False) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/BackupRestore/BackupPolicies/{backupPolicyName}/$/Update") - path_format_arguments = { - "backupPolicyName": _SERIALIZER.url("backup_policy_name", backup_policy_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if validate_connection is not None: - _query_parameters['ValidateConnection'] = _SERIALIZER.query("validate_connection", validate_connection, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_enable_application_backup_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/EnableBackup") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_disable_application_backup_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/DisableBackup") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_application_backup_configuration_info_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - max_results = kwargs.pop('max_results', 0) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetBackupConfigurationInfo") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if max_results is not None: - _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_application_backup_list_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - latest = kwargs.pop('latest', False) # type: Optional[bool] - start_date_time_filter = kwargs.pop('start_date_time_filter', None) # type: Optional[datetime.datetime] - end_date_time_filter = kwargs.pop('end_date_time_filter', None) # type: Optional[datetime.datetime] - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - max_results = kwargs.pop('max_results', 0) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/GetBackups") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if latest is not None: - _query_parameters['Latest'] = _SERIALIZER.query("latest", latest, 'bool') - if start_date_time_filter is not None: - _query_parameters['StartDateTimeFilter'] = _SERIALIZER.query("start_date_time_filter", start_date_time_filter, 'iso-8601') - if end_date_time_filter is not None: - _query_parameters['EndDateTimeFilter'] = _SERIALIZER.query("end_date_time_filter", end_date_time_filter, 'iso-8601') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if max_results is not None: - _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_suspend_application_backup_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/SuspendBackup") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_resume_application_backup_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Applications/{applicationId}/$/ResumeBackup") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_enable_service_backup_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/EnableBackup") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_disable_service_backup_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/DisableBackup") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_service_backup_configuration_info_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - max_results = kwargs.pop('max_results', 0) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetBackupConfigurationInfo") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if max_results is not None: - _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_service_backup_list_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - latest = kwargs.pop('latest', False) # type: Optional[bool] - start_date_time_filter = kwargs.pop('start_date_time_filter', None) # type: Optional[datetime.datetime] - end_date_time_filter = kwargs.pop('end_date_time_filter', None) # type: Optional[datetime.datetime] - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - max_results = kwargs.pop('max_results', 0) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/GetBackups") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if latest is not None: - _query_parameters['Latest'] = _SERIALIZER.query("latest", latest, 'bool') - if start_date_time_filter is not None: - _query_parameters['StartDateTimeFilter'] = _SERIALIZER.query("start_date_time_filter", start_date_time_filter, 'iso-8601') - if end_date_time_filter is not None: - _query_parameters['EndDateTimeFilter'] = _SERIALIZER.query("end_date_time_filter", end_date_time_filter, 'iso-8601') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if max_results is not None: - _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_suspend_service_backup_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/SuspendBackup") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_resume_service_backup_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Services/{serviceId}/$/ResumeBackup") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_enable_partition_backup_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/EnableBackup") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_disable_partition_backup_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/DisableBackup") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_partition_backup_configuration_info_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetBackupConfigurationInfo") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_partition_backup_list_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - latest = kwargs.pop('latest', False) # type: Optional[bool] - start_date_time_filter = kwargs.pop('start_date_time_filter', None) # type: Optional[datetime.datetime] - end_date_time_filter = kwargs.pop('end_date_time_filter', None) # type: Optional[datetime.datetime] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetBackups") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if latest is not None: - _query_parameters['Latest'] = _SERIALIZER.query("latest", latest, 'bool') - if start_date_time_filter is not None: - _query_parameters['StartDateTimeFilter'] = _SERIALIZER.query("start_date_time_filter", start_date_time_filter, 'iso-8601') - if end_date_time_filter is not None: - _query_parameters['EndDateTimeFilter'] = _SERIALIZER.query("end_date_time_filter", end_date_time_filter, 'iso-8601') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_suspend_partition_backup_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/SuspendBackup") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_resume_partition_backup_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/ResumeBackup") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_backup_partition_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - backup_timeout = kwargs.pop('backup_timeout', 10) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/Backup") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if backup_timeout is not None: - _query_parameters['BackupTimeout'] = _SERIALIZER.query("backup_timeout", backup_timeout, 'int') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_partition_backup_progress_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetBackupProgress") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_restore_partition_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - restore_timeout = kwargs.pop('restore_timeout', 10) # type: Optional[int] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/Restore") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if restore_timeout is not None: - _query_parameters['RestoreTimeout'] = _SERIALIZER.query("restore_timeout", restore_timeout, 'int') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_partition_restore_progress_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Partitions/{partitionId}/$/GetRestoreProgress") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_backups_from_backup_location_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - max_results = kwargs.pop('max_results', 0) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/BackupRestore/$/GetBackups") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if max_results is not None: - _query_parameters['MaxResults'] = _SERIALIZER.query("max_results", max_results, 'long', minimum=0) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_name_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Names/$/Create") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_name_exists_info_request( - name_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Names/{nameId}") - path_format_arguments = { - "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_name_request( - name_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Names/{nameId}") - path_format_arguments = { - "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_sub_name_info_list_request( - name_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - recursive = kwargs.pop('recursive', False) # type: Optional[bool] - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Names/{nameId}/$/GetSubNames") - path_format_arguments = { - "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if recursive is not None: - _query_parameters['Recursive'] = _SERIALIZER.query("recursive", recursive, 'bool') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_property_info_list_request( - name_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - include_values = kwargs.pop('include_values', False) # type: Optional[bool] - continuation_token_parameter = kwargs.pop('continuation_token_parameter', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Names/{nameId}/$/GetProperties") - path_format_arguments = { - "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if include_values is not None: - _query_parameters['IncludeValues'] = _SERIALIZER.query("include_values", include_values, 'bool') - if continuation_token_parameter is not None: - _query_parameters['ContinuationToken'] = _SERIALIZER.query("continuation_token_parameter", continuation_token_parameter, 'str', skip_quote=True) - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_put_property_request( - name_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Names/{nameId}/$/GetProperty") - path_format_arguments = { - "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_property_info_request( - name_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - property_name = kwargs.pop('property_name') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Names/{nameId}/$/GetProperty") - path_format_arguments = { - "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['PropertyName'] = _SERIALIZER.query("property_name", property_name, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_property_request( - name_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - property_name = kwargs.pop('property_name') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Names/{nameId}/$/GetProperty") - path_format_arguments = { - "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['PropertyName'] = _SERIALIZER.query("property_name", property_name, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_submit_property_batch_request( - name_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/Names/{nameId}/$/GetProperties/$/SubmitBatch") - path_format_arguments = { - "nameId": _SERIALIZER.url("name_id", name_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_cluster_event_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - start_time_utc = kwargs.pop('start_time_utc') # type: str - end_time_utc = kwargs.pop('end_time_utc') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] - exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] - skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/EventsStore/Cluster/Events") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') - _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_containers_event_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - start_time_utc = kwargs.pop('start_time_utc') # type: str - end_time_utc = kwargs.pop('end_time_utc') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] - exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] - skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/EventsStore/Containers/Events") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') - _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_node_event_list_request( - node_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - start_time_utc = kwargs.pop('start_time_utc') # type: str - end_time_utc = kwargs.pop('end_time_utc') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] - exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] - skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/EventsStore/Nodes/{nodeName}/$/Events") - path_format_arguments = { - "nodeName": _SERIALIZER.url("node_name", node_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') - _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_nodes_event_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - start_time_utc = kwargs.pop('start_time_utc') # type: str - end_time_utc = kwargs.pop('end_time_utc') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] - exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] - skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/EventsStore/Nodes/Events") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') - _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_application_event_list_request( - application_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - start_time_utc = kwargs.pop('start_time_utc') # type: str - end_time_utc = kwargs.pop('end_time_utc') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] - exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] - skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/EventsStore/Applications/{applicationId}/$/Events") - path_format_arguments = { - "applicationId": _SERIALIZER.url("application_id", application_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') - _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_applications_event_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - start_time_utc = kwargs.pop('start_time_utc') # type: str - end_time_utc = kwargs.pop('end_time_utc') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] - exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] - skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/EventsStore/Applications/Events") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') - _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_service_event_list_request( - service_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - start_time_utc = kwargs.pop('start_time_utc') # type: str - end_time_utc = kwargs.pop('end_time_utc') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] - exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] - skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/EventsStore/Services/{serviceId}/$/Events") - path_format_arguments = { - "serviceId": _SERIALIZER.url("service_id", service_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') - _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_services_event_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - start_time_utc = kwargs.pop('start_time_utc') # type: str - end_time_utc = kwargs.pop('end_time_utc') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] - exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] - skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/EventsStore/Services/Events") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') - _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_partition_event_list_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - start_time_utc = kwargs.pop('start_time_utc') # type: str - end_time_utc = kwargs.pop('end_time_utc') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] - exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] - skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/EventsStore/Partitions/{partitionId}/$/Events") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') - _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_partitions_event_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - start_time_utc = kwargs.pop('start_time_utc') # type: str - end_time_utc = kwargs.pop('end_time_utc') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] - exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] - skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/EventsStore/Partitions/Events") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') - _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_partition_replica_event_list_request( - partition_id, # type: str - replica_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - start_time_utc = kwargs.pop('start_time_utc') # type: str - end_time_utc = kwargs.pop('end_time_utc') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] - exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] - skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/EventsStore/Partitions/{partitionId}/$/Replicas/{replicaId}/$/Events") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - "replicaId": _SERIALIZER.url("replica_id", replica_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') - _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_partition_replicas_event_list_request( - partition_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - start_time_utc = kwargs.pop('start_time_utc') # type: str - end_time_utc = kwargs.pop('end_time_utc') # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - events_types_filter = kwargs.pop('events_types_filter', None) # type: Optional[str] - exclude_analysis_events = kwargs.pop('exclude_analysis_events', None) # type: Optional[bool] - skip_correlation_lookup = kwargs.pop('skip_correlation_lookup', None) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/EventsStore/Partitions/{partitionId}/$/Replicas/Events") - path_format_arguments = { - "partitionId": _SERIALIZER.url("partition_id", partition_id, 'str', skip_quote=True), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - _query_parameters['StartTimeUtc'] = _SERIALIZER.query("start_time_utc", start_time_utc, 'str') - _query_parameters['EndTimeUtc'] = _SERIALIZER.query("end_time_utc", end_time_utc, 'str') - if events_types_filter is not None: - _query_parameters['EventsTypesFilter'] = _SERIALIZER.query("events_types_filter", events_types_filter, 'str') - if exclude_analysis_events is not None: - _query_parameters['ExcludeAnalysisEvents'] = _SERIALIZER.query("exclude_analysis_events", exclude_analysis_events, 'bool') - if skip_correlation_lookup is not None: - _query_parameters['SkipCorrelationLookup'] = _SERIALIZER.query("skip_correlation_lookup", skip_correlation_lookup, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_correlated_event_list_request( - event_instance_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - timeout = kwargs.pop('timeout', 60) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events") - path_format_arguments = { - "eventInstanceId": _SERIALIZER.url("event_instance_id", event_instance_id, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if timeout is not None: - _query_parameters['timeout'] = _SERIALIZER.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on -class ServiceFabricClientAPIsOperationsMixin(object): # pylint: disable=too-many-public-methods - - @distributed_trace - def get_cluster_manifest( - self, - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ClusterManifest" - """Get the Service Fabric cluster manifest. - - Get the Service Fabric cluster manifest. The cluster manifest contains properties of the - cluster that include different node types on the cluster, - security configurations, fault, and upgrade domain topologies, etc. - - These properties are specified as part of the ClusterConfig.JSON file while deploying a - stand-alone cluster. However, most of the information in the cluster manifest - is generated internally by service fabric during cluster deployment in other deployment - scenarios (e.g. when using Azure portal). - - The contents of the cluster manifest are for informational purposes only and users are not - expected to take a dependency on the format of the file contents or its interpretation. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterManifest, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterManifest - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterManifest"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_cluster_manifest_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_cluster_manifest.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterManifest', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_manifest.metadata = {'url': "/$/GetClusterManifest"} # type: ignore - - - @distributed_trace - def get_cluster_health( - self, - nodes_health_state_filter=0, # type: Optional[int] - applications_health_state_filter=0, # type: Optional[int] - events_health_state_filter=0, # type: Optional[int] - exclude_health_statistics=False, # type: Optional[bool] - include_system_application_health_statistics=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ClusterHealth" - """Gets the health of a Service Fabric cluster. - - Use EventsHealthStateFilter to filter the collection of health events reported on the cluster - based on the health state. - Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the - collection of nodes and applications returned based on their aggregated health state. - - :param nodes_health_state_filter: Allows filtering of the node health state objects returned in - the result of cluster health query - based on their health state. The possible values for this parameter include integer value of - one of the - following health states. Only nodes that match the filter are returned. All nodes are used to - evaluate the aggregated health state. - If not specified, all entries are returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of nodes with HealthState value of - OK (2) and Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type nodes_health_state_filter: int - :param applications_health_state_filter: Allows filtering of the application health state - objects returned in the result of cluster health - query based on their health state. - The possible values for this parameter include integer value obtained from members or bitwise - operations - on members of HealthStateFilter enumeration. Only applications that match the filter are - returned. - All applications are used to evaluate the aggregated health state. If not specified, all - entries are returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of applications with HealthState - value of OK (2) and Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type applications_health_state_filter: int - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param include_system_application_health_statistics: Indicates whether the health statistics - should include the fabric:/System application health statistics. False by default. - If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the - entities that belong to the fabric:/System application. - Otherwise, the query result includes health statistics only for user applications. - The health statistics must be included in the query result for this parameter to be applied. - Default value is False. - :type include_system_application_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "8.2") # type: str - - - request = build_get_cluster_health_request( - api_version=api_version, - nodes_health_state_filter=nodes_health_state_filter, - applications_health_state_filter=applications_health_state_filter, - events_health_state_filter=events_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - include_system_application_health_statistics=include_system_application_health_statistics, - timeout=timeout, - template_url=self.get_cluster_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_health.metadata = {'url': "/$/GetClusterHealth"} # type: ignore - - - @distributed_trace - def get_cluster_health_using_policy( - self, - nodes_health_state_filter=0, # type: Optional[int] - applications_health_state_filter=0, # type: Optional[int] - events_health_state_filter=0, # type: Optional[int] - exclude_health_statistics=False, # type: Optional[bool] - include_system_application_health_statistics=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - application_health_policy_map=None, # type: Optional[List["_models.ApplicationHealthPolicyMapItem"]] - cluster_health_policy=None, # type: Optional["_models.ClusterHealthPolicy"] - **kwargs # type: Any - ): - # type: (...) -> "_models.ClusterHealth" - """Gets the health of a Service Fabric cluster using the specified policy. - - Use EventsHealthStateFilter to filter the collection of health events reported on the cluster - based on the health state. - Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the - collection of nodes and applications returned based on their aggregated health state. - Use ClusterHealthPolicies to override the health policies used to evaluate the health. - - :param nodes_health_state_filter: Allows filtering of the node health state objects returned in - the result of cluster health query - based on their health state. The possible values for this parameter include integer value of - one of the - following health states. Only nodes that match the filter are returned. All nodes are used to - evaluate the aggregated health state. - If not specified, all entries are returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of nodes with HealthState value of - OK (2) and Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type nodes_health_state_filter: int - :param applications_health_state_filter: Allows filtering of the application health state - objects returned in the result of cluster health - query based on their health state. - The possible values for this parameter include integer value obtained from members or bitwise - operations - on members of HealthStateFilter enumeration. Only applications that match the filter are - returned. - All applications are used to evaluate the aggregated health state. If not specified, all - entries are returned. - The state values are flag-based enumeration, so the value could be a combination of these - values obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of applications with HealthState - value of OK (2) and Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type applications_health_state_filter: int - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param include_system_application_health_statistics: Indicates whether the health statistics - should include the fabric:/System application health statistics. False by default. - If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the - entities that belong to the fabric:/System application. - Otherwise, the query result includes health statistics only for user applications. - The health statistics must be included in the query result for this parameter to be applied. - Default value is False. - :type include_system_application_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param application_health_policy_map: Defines a map that contains specific application health - policies for different applications. - Each entry specifies as key the application name and as value an ApplicationHealthPolicy used - to evaluate the application health. - If an application is not specified in the map, the application health evaluation uses the - ApplicationHealthPolicy found in its application manifest or the default application health - policy (if no health policy is defined in the manifest). - The map is empty by default. Default value is None. - :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] - :param cluster_health_policy: Defines a health policy used to evaluate the health of the - cluster or of a cluster node. Default value is None. - :type cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _cluster_health_policies = _models.ClusterHealthPolicies(application_health_policy_map=application_health_policy_map, cluster_health_policy=cluster_health_policy) - if _cluster_health_policies is not None: - _json = self._serialize.body(_cluster_health_policies, 'ClusterHealthPolicies') - else: - _json = None - - request = build_get_cluster_health_using_policy_request( - api_version=api_version, - content_type=content_type, - json=_json, - nodes_health_state_filter=nodes_health_state_filter, - applications_health_state_filter=applications_health_state_filter, - events_health_state_filter=events_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - include_system_application_health_statistics=include_system_application_health_statistics, - timeout=timeout, - template_url=self.get_cluster_health_using_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_health_using_policy.metadata = {'url': "/$/GetClusterHealth"} # type: ignore - - - @distributed_trace - def get_cluster_health_chunk( - self, - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ClusterHealthChunk" - """Gets the health of a Service Fabric cluster using health chunks. - - Gets the health of a Service Fabric cluster using health chunks. Includes the aggregated health - state of the cluster, but none of the cluster entities. - To expand the cluster health and get the health state of all or some of the entities, use the - POST URI and specify the cluster health chunk query description. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterHealthChunk, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterHealthChunk - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterHealthChunk"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_cluster_health_chunk_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_cluster_health_chunk.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterHealthChunk', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_health_chunk.metadata = {'url': "/$/GetClusterHealthChunk"} # type: ignore - - - @distributed_trace - def get_cluster_health_chunk_using_policy_and_advanced_filters( - self, - timeout=60, # type: Optional[int] - cluster_health_chunk_query_description=None, # type: Optional["_models.ClusterHealthChunkQueryDescription"] - **kwargs # type: Any - ): - # type: (...) -> "_models.ClusterHealthChunk" - """Gets the health of a Service Fabric cluster using health chunks. - - Gets the health of a Service Fabric cluster using health chunks. The health evaluation is done - based on the input cluster health chunk query description. - The query description allows users to specify health policies for evaluating the cluster and - its children. - Users can specify very flexible filters to select which cluster entities to return. The - selection can be done based on the entities health state and based on the hierarchy. - The query can return multi-level children of the entities based on the specified filters. For - example, it can return one application with a specified name, and for this application, return - only services that are in Error or Warning, and all partitions and replicas for one of these - services. - - :param 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. Default value is 60. - :type timeout: long - :param cluster_health_chunk_query_description: Describes the cluster and application health - policies used to evaluate the cluster health and the filters to select which cluster entities - to be returned. - If the cluster health policy is present, it is used to evaluate the cluster events and the - cluster nodes. If not present, the health evaluation uses the cluster health policy defined in - the cluster manifest or the default cluster health policy. - By default, each application is evaluated using its specific application health policy, - defined in the application manifest, or the default health policy, if no policy is defined in - manifest. - If the application health policy map is specified, and it has an entry for an application, the - specified application health policy - is used to evaluate the application health. - Users can specify very flexible filters to select which cluster entities to include in - response. The selection can be done based on the entities health state and based on the - hierarchy. - The query can return multi-level children of the entities based on the specified filters. For - example, it can return one application with a specified name, and for this application, return - only services that are in Error or Warning, and all partitions and replicas for one of these - services. Default value is None. - :type cluster_health_chunk_query_description: - ~azure.servicefabric.models.ClusterHealthChunkQueryDescription - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterHealthChunk, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterHealthChunk - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterHealthChunk"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if cluster_health_chunk_query_description is not None: - _json = self._serialize.body(cluster_health_chunk_query_description, 'ClusterHealthChunkQueryDescription') - else: - _json = None - - request = build_get_cluster_health_chunk_using_policy_and_advanced_filters_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.get_cluster_health_chunk_using_policy_and_advanced_filters.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterHealthChunk', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_health_chunk_using_policy_and_advanced_filters.metadata = {'url': "/$/GetClusterHealthChunk"} # type: ignore - - - @distributed_trace - def report_cluster_health( # pylint: disable=inconsistent-return-statements - self, - health_information, # type: "_models.HealthInformation" - immediate=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Sends a health report on the Service Fabric cluster. - - Sends a health report on a Service Fabric cluster. The report must contain the information - about the source of the health report and property on which it is reported. - The report is sent to a Service Fabric gateway node, which forwards to the health store. - The report may be accepted by the gateway, but rejected by the health store after extra - validation. - For example, the health store may reject the report because of an invalid parameter, like a - stale sequence number. - To see whether the report was applied in the health store, run GetClusterHealth and check that - the report appears in the HealthEvents section. - - :param health_information: Describes the health information for the health report. This - information needs to be present in all of the health reports sent to the health manager. - :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be sent immediately. - A health report is sent to a Service Fabric gateway Application, which forwards to the health - store. - If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health - store, regardless of the fabric client settings that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as possible. - Depending on timing and other conditions, sending the report may still fail, for example if - the HTTP Gateway is closed or the message doesn't reach the Gateway. - If Immediate is set to false, the report is sent based on the health client settings from the - HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval - configuration. - This is the recommended setting because it allows the health client to optimize health - reporting messages to health store as well as health report processing. - By default, reports are not sent immediately. Default value is False. - :type immediate: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(health_information, 'HealthInformation') - - request = build_report_cluster_health_request( - api_version=api_version, - content_type=content_type, - json=_json, - immediate=immediate, - timeout=timeout, - template_url=self.report_cluster_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - report_cluster_health.metadata = {'url': "/$/ReportClusterHealth"} # type: ignore - - - @distributed_trace - def get_provisioned_fabric_code_version_info_list( - self, - code_version=None, # type: Optional[str] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> List["_models.FabricCodeVersionInfo"] - """Gets a list of fabric code versions that are provisioned in a Service Fabric cluster. - - Gets a list of information about fabric code versions that are provisioned in the cluster. The - parameter CodeVersion can be used to optionally filter the output to only that particular - version. - - :param code_version: The product version of Service Fabric. Default value is None. - :type code_version: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of FabricCodeVersionInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.FabricCodeVersionInfo] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.FabricCodeVersionInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_provisioned_fabric_code_version_info_list_request( - api_version=api_version, - code_version=code_version, - timeout=timeout, - template_url=self.get_provisioned_fabric_code_version_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[FabricCodeVersionInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_provisioned_fabric_code_version_info_list.metadata = {'url': "/$/GetProvisionedCodeVersions"} # type: ignore - - - @distributed_trace - def get_provisioned_fabric_config_version_info_list( - self, - config_version=None, # type: Optional[str] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> List["_models.FabricConfigVersionInfo"] - """Gets a list of fabric config versions that are provisioned in a Service Fabric cluster. - - Gets a list of information about fabric config versions that are provisioned in the cluster. - The parameter ConfigVersion can be used to optionally filter the output to only that particular - version. - - :param config_version: The config version of Service Fabric. Default value is None. - :type config_version: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of FabricConfigVersionInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.FabricConfigVersionInfo] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.FabricConfigVersionInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_provisioned_fabric_config_version_info_list_request( - api_version=api_version, - config_version=config_version, - timeout=timeout, - template_url=self.get_provisioned_fabric_config_version_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[FabricConfigVersionInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_provisioned_fabric_config_version_info_list.metadata = {'url': "/$/GetProvisionedConfigVersions"} # type: ignore - - - @distributed_trace - def get_cluster_upgrade_progress( - self, - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ClusterUpgradeProgressObject" - """Gets the progress of the current cluster upgrade. - - Gets the current progress of the ongoing cluster upgrade. If no upgrade is currently in - progress, get the last state of the previous cluster upgrade. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterUpgradeProgressObject, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterUpgradeProgressObject - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterUpgradeProgressObject"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_cluster_upgrade_progress_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_cluster_upgrade_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterUpgradeProgressObject', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_upgrade_progress.metadata = {'url': "/$/GetUpgradeProgress"} # type: ignore - - - @distributed_trace - def get_cluster_configuration( - self, - configuration_api_version, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ClusterConfiguration" - """Get the Service Fabric standalone cluster configuration. - - The cluster configuration contains properties of the cluster that include different node types - on the cluster, - security configurations, fault, and upgrade domain topologies, etc. - - :param configuration_api_version: The API version of the Standalone cluster json configuration. - :type configuration_api_version: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterConfiguration, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterConfiguration"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_cluster_configuration_request( - api_version=api_version, - configuration_api_version=configuration_api_version, - timeout=timeout, - template_url=self.get_cluster_configuration.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_configuration.metadata = {'url': "/$/GetClusterConfiguration"} # type: ignore - - - @distributed_trace - def get_cluster_configuration_upgrade_status( - self, - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ClusterConfigurationUpgradeStatusInfo" - """Get the cluster configuration upgrade status of a Service Fabric standalone cluster. - - Get the cluster configuration upgrade status details of a Service Fabric standalone cluster. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterConfigurationUpgradeStatusInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterConfigurationUpgradeStatusInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterConfigurationUpgradeStatusInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_cluster_configuration_upgrade_status_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_cluster_configuration_upgrade_status.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterConfigurationUpgradeStatusInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_configuration_upgrade_status.metadata = {'url': "/$/GetClusterConfigurationUpgradeStatus"} # type: ignore - - - @distributed_trace - def get_upgrade_orchestration_service_state( - self, - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.UpgradeOrchestrationServiceState" - """Get the service state of Service Fabric Upgrade Orchestration Service. - - Get the service state of Service Fabric Upgrade Orchestration Service. This API is internally - used for support purposes. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: UpgradeOrchestrationServiceState, or the result of cls(response) - :rtype: ~azure.servicefabric.models.UpgradeOrchestrationServiceState - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.UpgradeOrchestrationServiceState"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_upgrade_orchestration_service_state_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_upgrade_orchestration_service_state.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('UpgradeOrchestrationServiceState', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_upgrade_orchestration_service_state.metadata = {'url': "/$/GetUpgradeOrchestrationServiceState"} # type: ignore - - - @distributed_trace - def set_upgrade_orchestration_service_state( - self, - timeout=60, # type: Optional[int] - service_state=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.UpgradeOrchestrationServiceStateSummary" - """Update the service state of Service Fabric Upgrade Orchestration Service. - - Update the service state of Service Fabric Upgrade Orchestration Service. This API is - internally used for support purposes. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param service_state: The state of Service Fabric Upgrade Orchestration Service. Default value - is None. - :type service_state: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: UpgradeOrchestrationServiceStateSummary, or the result of cls(response) - :rtype: ~azure.servicefabric.models.UpgradeOrchestrationServiceStateSummary - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.UpgradeOrchestrationServiceStateSummary"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _upgrade_orchestration_service_state = _models.UpgradeOrchestrationServiceState(service_state=service_state) - _json = self._serialize.body(_upgrade_orchestration_service_state, 'UpgradeOrchestrationServiceState') - - request = build_set_upgrade_orchestration_service_state_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.set_upgrade_orchestration_service_state.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('UpgradeOrchestrationServiceStateSummary', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - set_upgrade_orchestration_service_state.metadata = {'url': "/$/SetUpgradeOrchestrationServiceState"} # type: ignore - - - @distributed_trace - def provision_cluster( # pylint: disable=inconsistent-return-statements - self, - timeout=60, # type: Optional[int] - code_file_path=None, # type: Optional[str] - cluster_manifest_file_path=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - """Provision the code or configuration packages of a Service Fabric cluster. - - Validate and provision the code or configuration packages of a Service Fabric cluster. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param code_file_path: The cluster code package file path. Default value is None. - :type code_file_path: str - :param cluster_manifest_file_path: The cluster manifest file path. Default value is None. - :type cluster_manifest_file_path: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _provision_fabric_description = _models.ProvisionFabricDescription(code_file_path=code_file_path, cluster_manifest_file_path=cluster_manifest_file_path) - _json = self._serialize.body(_provision_fabric_description, 'ProvisionFabricDescription') - - request = build_provision_cluster_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.provision_cluster.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - provision_cluster.metadata = {'url': "/$/Provision"} # type: ignore - - - @distributed_trace - def unprovision_cluster( # pylint: disable=inconsistent-return-statements - self, - timeout=60, # type: Optional[int] - code_version=None, # type: Optional[str] - config_version=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - """Unprovision the code or configuration packages of a Service Fabric cluster. - - It is supported to unprovision code and configuration separately. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param code_version: The cluster code package version. Default value is None. - :type code_version: str - :param config_version: The cluster manifest version. Default value is None. - :type config_version: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _unprovision_fabric_description = _models.UnprovisionFabricDescription(code_version=code_version, config_version=config_version) - _json = self._serialize.body(_unprovision_fabric_description, 'UnprovisionFabricDescription') - - request = build_unprovision_cluster_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.unprovision_cluster.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - unprovision_cluster.metadata = {'url': "/$/Unprovision"} # type: ignore - - - @distributed_trace - def rollback_cluster_upgrade( # pylint: disable=inconsistent-return-statements - self, - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Roll back the upgrade of a Service Fabric cluster. - - Roll back the code or configuration upgrade of a Service Fabric cluster. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_rollback_cluster_upgrade_request( - api_version=api_version, - timeout=timeout, - template_url=self.rollback_cluster_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - rollback_cluster_upgrade.metadata = {'url': "/$/RollbackUpgrade"} # type: ignore - - - @distributed_trace - def resume_cluster_upgrade( # pylint: disable=inconsistent-return-statements - self, - upgrade_domain, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Make the cluster upgrade move on to the next upgrade domain. - - Make the cluster code or configuration upgrade move on to the next upgrade domain if - appropriate. - - :param upgrade_domain: The next upgrade domain for this cluster upgrade. - :type upgrade_domain: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _resume_cluster_upgrade_description = _models.ResumeClusterUpgradeDescription(upgrade_domain=upgrade_domain) - _json = self._serialize.body(_resume_cluster_upgrade_description, 'ResumeClusterUpgradeDescription') - - request = build_resume_cluster_upgrade_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.resume_cluster_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - resume_cluster_upgrade.metadata = {'url': "/$/MoveToNextUpgradeDomain"} # type: ignore - - - @distributed_trace - def start_cluster_upgrade( # pylint: disable=inconsistent-return-statements - self, - start_cluster_upgrade_description, # type: "_models.StartClusterUpgradeDescription" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Start upgrading the code or configuration version of a Service Fabric cluster. - - Validate the supplied upgrade parameters and start upgrading the code or configuration version - of a Service Fabric cluster if the parameters are valid. - - :param start_cluster_upgrade_description: Describes the parameters for starting a cluster - upgrade. - :type start_cluster_upgrade_description: - ~azure.servicefabric.models.StartClusterUpgradeDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') - - request = build_start_cluster_upgrade_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.start_cluster_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_cluster_upgrade.metadata = {'url': "/$/Upgrade"} # type: ignore - - - @distributed_trace - def start_cluster_configuration_upgrade( # pylint: disable=inconsistent-return-statements - self, - cluster_configuration_upgrade_description, # type: "_models.ClusterConfigurationUpgradeDescription" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Start upgrading the configuration of a Service Fabric standalone cluster. - - Validate the supplied configuration upgrade parameters and start upgrading the cluster - configuration if the parameters are valid. - - :param cluster_configuration_upgrade_description: Parameters for a standalone cluster - configuration upgrade. - :type cluster_configuration_upgrade_description: - ~azure.servicefabric.models.ClusterConfigurationUpgradeDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(cluster_configuration_upgrade_description, 'ClusterConfigurationUpgradeDescription') - - request = build_start_cluster_configuration_upgrade_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.start_cluster_configuration_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_cluster_configuration_upgrade.metadata = {'url': "/$/StartClusterConfigurationUpgrade"} # type: ignore - - - @distributed_trace - def update_cluster_upgrade( # pylint: disable=inconsistent-return-statements - self, - update_cluster_upgrade_description, # type: "_models.UpdateClusterUpgradeDescription" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Update the upgrade parameters of a Service Fabric cluster upgrade. - - Update the upgrade parameters used during a Service Fabric cluster upgrade. - - :param update_cluster_upgrade_description: Parameters for updating a cluster upgrade. - :type update_cluster_upgrade_description: - ~azure.servicefabric.models.UpdateClusterUpgradeDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(update_cluster_upgrade_description, 'UpdateClusterUpgradeDescription') - - request = build_update_cluster_upgrade_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.update_cluster_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - update_cluster_upgrade.metadata = {'url': "/$/UpdateUpgrade"} # type: ignore - - - @distributed_trace - def get_aad_metadata( - self, - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.AadMetadataObject" - """Gets the Azure Active Directory metadata used for secured connection to cluster. - - Gets the Azure Active Directory metadata used for secured connection to cluster. - This API is not supposed to be called separately. It provides information needed to set up an - Azure Active Directory secured connection with a Service Fabric cluster. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AadMetadataObject, or the result of cls(response) - :rtype: ~azure.servicefabric.models.AadMetadataObject - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AadMetadataObject"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "6.0") # type: str - - - request = build_get_aad_metadata_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_aad_metadata.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AadMetadataObject', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_aad_metadata.metadata = {'url': "/$/GetAadMetadata"} # type: ignore - - - @distributed_trace - def get_cluster_version( - self, - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ClusterVersion" - """Get the current Service Fabric cluster version. - - If a cluster upgrade is happening, then this API will return the lowest (older) version of the - current and target cluster runtime versions. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterVersion, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterVersion - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterVersion"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_cluster_version_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_cluster_version.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterVersion', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_version.metadata = {'url': "/$/GetClusterVersion"} # type: ignore - - - @distributed_trace - def get_cluster_load( - self, - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ClusterLoadInfo" - """Gets the load of a Service Fabric cluster. - - Retrieves the load information of a Service Fabric cluster for all the metrics that have load - or capacity defined. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ClusterLoadInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ClusterLoadInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterLoadInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_cluster_load_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_cluster_load.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ClusterLoadInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_load.metadata = {'url': "/$/GetLoadInformation"} # type: ignore - - - @distributed_trace - def toggle_verbose_service_placement_health_reporting( # pylint: disable=inconsistent-return-statements - self, - enabled, # type: bool - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Changes the verbosity of service placement health reporting. - - If verbosity is set to true, then detailed health reports will be generated when replicas - cannot be placed or dropped. - If verbosity is set to false, then no health reports will be generated when replicas cannot be - placed or dropped. - - :param enabled: The verbosity of service placement health reporting. - :type enabled: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_toggle_verbose_service_placement_health_reporting_request( - api_version=api_version, - enabled=enabled, - timeout=timeout, - template_url=self.toggle_verbose_service_placement_health_reporting.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - toggle_verbose_service_placement_health_reporting.metadata = {'url': "/$/ToggleVerboseServicePlacementHealthReporting"} # type: ignore - - - @distributed_trace - def validate_cluster_upgrade( - self, - start_cluster_upgrade_description, # type: "_models.StartClusterUpgradeDescription" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ValidateClusterUpgradeResult" - """Validate and assess the impact of a code or configuration version update of a Service Fabric - cluster. - - Validate the supplied upgrade parameters and assess the expected impact of a code or - configuration version upgrade of a Service Fabric cluster. The upgrade will not be initiated. - - :param start_cluster_upgrade_description: Describes the parameters for starting a cluster - upgrade. - :type start_cluster_upgrade_description: - ~azure.servicefabric.models.StartClusterUpgradeDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ValidateClusterUpgradeResult, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ValidateClusterUpgradeResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidateClusterUpgradeResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(start_cluster_upgrade_description, 'StartClusterUpgradeDescription') - - request = build_validate_cluster_upgrade_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.validate_cluster_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ValidateClusterUpgradeResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - validate_cluster_upgrade.metadata = {'url': "/$/ValidateUpgrade"} # type: ignore - - - @distributed_trace - def get_node_info_list( - self, - continuation_token_parameter=None, # type: Optional[str] - node_status_filter="default", # type: Optional[Union[str, "_models.NodeStatusFilter"]] - max_results=0, # type: Optional[int] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedNodeInfoList" - """Gets the list of nodes in the Service Fabric cluster. - - The response includes the name, status, ID, health, uptime, and other details about the nodes. - - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param node_status_filter: Allows filtering the nodes based on the NodeStatus. Only the nodes - that are matching the specified filter value will be returned. The filter value can be one of - the following. Default value is "default". - :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. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedNodeInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedNodeInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedNodeInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_node_info_list_request( - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - node_status_filter=node_status_filter, - max_results=max_results, - timeout=timeout, - template_url=self.get_node_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedNodeInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_node_info_list.metadata = {'url': "/Nodes"} # type: ignore - - - @distributed_trace - def get_node_info( - self, - node_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.NodeInfo"] - """Gets the information about a specific node in the Service Fabric cluster. - - The response includes the name, status, ID, health, uptime, and other details about the node. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NodeInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.NodeInfo or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NodeInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_node_info_request( - node_name=node_name, - api_version=api_version, - timeout=timeout, - template_url=self.get_node_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NodeInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_node_info.metadata = {'url': "/Nodes/{nodeName}"} # type: ignore - - - @distributed_trace - def get_node_health( - self, - node_name, # type: str - events_health_state_filter=0, # type: Optional[int] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.NodeHealth" - """Gets the health of a Service Fabric node. - - Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection - of health events reported on the node based on the health state. If the node that you specify - by name does not exist in the health store, this returns an error. - - :param node_name: The name of the node. - :type node_name: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NodeHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.NodeHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_node_health_request( - node_name=node_name, - api_version=api_version, - events_health_state_filter=events_health_state_filter, - timeout=timeout, - template_url=self.get_node_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NodeHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_node_health.metadata = {'url': "/Nodes/{nodeName}/$/GetHealth"} # type: ignore - - - @distributed_trace - def get_node_health_using_policy( - self, - node_name, # type: str - events_health_state_filter=0, # type: Optional[int] - timeout=60, # type: Optional[int] - cluster_health_policy=None, # type: Optional["_models.ClusterHealthPolicy"] - **kwargs # type: Any - ): - # type: (...) -> "_models.NodeHealth" - """Gets the health of a Service Fabric node, by using the specified health policy. - - Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection - of health events reported on the node based on the health state. Use ClusterHealthPolicy in the - POST body to override the health policies used to evaluate the health. If the node that you - specify by name does not exist in the health store, this returns an error. - - :param node_name: The name of the node. - :type node_name: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param cluster_health_policy: Describes the health policies used to evaluate the health of a - cluster or node. If not present, the health evaluation uses the health policy from cluster - manifest or the default health policy. Default value is None. - :type cluster_health_policy: ~azure.servicefabric.models.ClusterHealthPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NodeHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.NodeHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if cluster_health_policy is not None: - _json = self._serialize.body(cluster_health_policy, 'ClusterHealthPolicy') - else: - _json = None - - request = build_get_node_health_using_policy_request( - node_name=node_name, - api_version=api_version, - content_type=content_type, - json=_json, - events_health_state_filter=events_health_state_filter, - timeout=timeout, - template_url=self.get_node_health_using_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NodeHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_node_health_using_policy.metadata = {'url': "/Nodes/{nodeName}/$/GetHealth"} # type: ignore - - - @distributed_trace - def report_node_health( # pylint: disable=inconsistent-return-statements - self, - node_name, # type: str - health_information, # type: "_models.HealthInformation" - immediate=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Sends a health report on the Service Fabric node. - - Reports health state of the specified Service Fabric node. The report must contain the - information about the source of the health report and property on which it is reported. - The report is sent to a Service Fabric gateway node, which forwards to the health store. - The report may be accepted by the gateway, but rejected by the health store after extra - validation. - For example, the health store may reject the report because of an invalid parameter, like a - stale sequence number. - To see whether the report was applied in the health store, run GetNodeHealth and check that the - report appears in the HealthEvents section. - - :param node_name: The name of the node. - :type node_name: str - :param health_information: Describes the health information for the health report. This - information needs to be present in all of the health reports sent to the health manager. - :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be sent immediately. - A health report is sent to a Service Fabric gateway Application, which forwards to the health - store. - If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health - store, regardless of the fabric client settings that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as possible. - Depending on timing and other conditions, sending the report may still fail, for example if - the HTTP Gateway is closed or the message doesn't reach the Gateway. - If Immediate is set to false, the report is sent based on the health client settings from the - HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval - configuration. - This is the recommended setting because it allows the health client to optimize health - reporting messages to health store as well as health report processing. - By default, reports are not sent immediately. Default value is False. - :type immediate: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(health_information, 'HealthInformation') - - request = build_report_node_health_request( - node_name=node_name, - api_version=api_version, - content_type=content_type, - json=_json, - immediate=immediate, - timeout=timeout, - template_url=self.report_node_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - report_node_health.metadata = {'url': "/Nodes/{nodeName}/$/ReportHealth"} # type: ignore - - - @distributed_trace - def get_node_load_info( - self, - node_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.NodeLoadInfo" - """Gets the load information of a Service Fabric node. - - Retrieves the load information of a Service Fabric node for all the metrics that have load or - capacity defined. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NodeLoadInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.NodeLoadInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeLoadInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_node_load_info_request( - node_name=node_name, - api_version=api_version, - timeout=timeout, - template_url=self.get_node_load_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NodeLoadInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_node_load_info.metadata = {'url': "/Nodes/{nodeName}/$/GetLoadInformation"} # type: ignore - - - @distributed_trace - def disable_node( # pylint: disable=inconsistent-return-statements - self, - node_name, # type: str - timeout=60, # type: Optional[int] - deactivation_intent=None, # type: Optional[Union[str, "_models.DeactivationIntent"]] - **kwargs # type: Any - ): - # type: (...) -> None - """Deactivate a Service Fabric cluster node with the specified deactivation intent. - - Deactivate a Service Fabric cluster node with the specified deactivation intent. Once the - deactivation is in progress, the deactivation intent can be increased, but not decreased (for - example, a node that is deactivated with the Pause intent can be deactivated further with - Restart, but not the other way around. Nodes may be reactivated using the Activate a node - operation any time after they are deactivated. If the deactivation is not complete, this will - cancel the deactivation. A node that goes down and comes back up while deactivated will still - need to be reactivated before services will be placed on that node. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param deactivation_intent: Describes the intent or reason for deactivating the node. The - possible values are following. Default value is None. - :type deactivation_intent: str or ~azure.servicefabric.models.DeactivationIntent - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _deactivation_intent_description = _models.DeactivationIntentDescription(deactivation_intent=deactivation_intent) - _json = self._serialize.body(_deactivation_intent_description, 'DeactivationIntentDescription') - - request = build_disable_node_request( - node_name=node_name, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.disable_node.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - disable_node.metadata = {'url': "/Nodes/{nodeName}/$/Deactivate"} # type: ignore - - - @distributed_trace - def enable_node( # pylint: disable=inconsistent-return-statements - self, - node_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Activate a Service Fabric cluster node that is currently deactivated. - - Activates a Service Fabric cluster node that is currently deactivated. Once activated, the node - will again become a viable target for placing new replicas, and any deactivated replicas - remaining on the node will be reactivated. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_enable_node_request( - node_name=node_name, - api_version=api_version, - timeout=timeout, - template_url=self.enable_node.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - enable_node.metadata = {'url': "/Nodes/{nodeName}/$/Activate"} # type: ignore - - - @distributed_trace - def remove_node_state( # pylint: disable=inconsistent-return-statements - self, - node_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Notifies Service Fabric that the persisted state on a node has been permanently removed or - lost. - - This implies that it is not possible to recover the persisted state of that node. This - generally happens if a hard disk has been wiped clean, or if a hard disk crashes. The node has - to be down for this operation to be successful. This operation lets Service Fabric know that - the replicas on that node no longer exist, and that Service Fabric should stop waiting for - those replicas to come back up. Do not run this cmdlet if the state on the node has not been - removed and the node can come back up with its state intact. Starting from Service Fabric 6.5, - in order to use this API for seed nodes, please change the seed nodes to regular (non-seed) - nodes and then invoke this API to remove the node state. If the cluster is running on Azure, - after the seed node goes down, Service Fabric will try to change it to a non-seed node - automatically. To make this happen, make sure the number of non-seed nodes in the primary node - type is no less than the number of Down seed nodes. If necessary, add more nodes to the primary - node type to achieve this. For standalone cluster, if the Down seed node is not expected to - come back up with its state intact, please remove the node from the cluster, see - https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-windows-server-add-remove-nodes. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_remove_node_state_request( - node_name=node_name, - api_version=api_version, - timeout=timeout, - template_url=self.remove_node_state.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - remove_node_state.metadata = {'url': "/Nodes/{nodeName}/$/RemoveNodeState"} # type: ignore - - - @distributed_trace - def restart_node( # pylint: disable=inconsistent-return-statements - self, - node_name, # type: str - timeout=60, # type: Optional[int] - node_instance_id="0", # type: str - create_fabric_dump="False", # type: Optional[Union[str, "_models.CreateFabricDump"]] - **kwargs # type: Any - ): - # type: (...) -> None - """Restarts a Service Fabric cluster node. - - Restarts a Service Fabric cluster node that is already started. - - :param node_name: The name of the node. - :type node_name: str - :param 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. Default value is 60. - :type timeout: long - :param node_instance_id: The instance ID of the target node. If instance ID is specified the - node is restarted only if it matches with the current instance of the node. A default value of - "0" would match any instance ID. The instance ID can be obtained using get node query. Default - value is "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. Default value is "False". - :type create_fabric_dump: str or ~azure.servicefabric.models.CreateFabricDump - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _restart_node_description = _models.RestartNodeDescription(node_instance_id=node_instance_id, create_fabric_dump=create_fabric_dump) - _json = self._serialize.body(_restart_node_description, 'RestartNodeDescription') - - request = build_restart_node_request( - node_name=node_name, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.restart_node.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - restart_node.metadata = {'url': "/Nodes/{nodeName}/$/Restart"} # type: ignore - - - @distributed_trace - def remove_configuration_overrides( # pylint: disable=inconsistent-return-statements - self, - node_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Removes configuration overrides on the specified node. - - This api allows removing all existing configuration overrides on specified node. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_remove_configuration_overrides_request( - node_name=node_name, - api_version=api_version, - timeout=timeout, - template_url=self.remove_configuration_overrides.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - remove_configuration_overrides.metadata = {'url': "/Nodes/{nodeName}/$/RemoveConfigurationOverrides"} # type: ignore - - - @distributed_trace - def get_configuration_overrides( - self, - node_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> List["_models.ConfigParameterOverride"] - """Gets the list of configuration overrides on the specified node. - - This api allows getting all existing configuration overrides on the specified node. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ConfigParameterOverride, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ConfigParameterOverride] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ConfigParameterOverride"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_configuration_overrides_request( - node_name=node_name, - api_version=api_version, - timeout=timeout, - template_url=self.get_configuration_overrides.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ConfigParameterOverride]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_configuration_overrides.metadata = {'url': "/Nodes/{nodeName}/$/GetConfigurationOverrides"} # type: ignore - - - @distributed_trace - def add_configuration_parameter_overrides( # pylint: disable=inconsistent-return-statements - self, - node_name, # type: str - config_parameter_override_list, # type: List["_models.ConfigParameterOverride"] - force=None, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Adds the list of configuration overrides on the specified node. - - This api allows adding all existing configuration overrides on the specified node. - - :param node_name: The name of the node. - :type node_name: str - :param config_parameter_override_list: Description for adding list of configuration overrides. - :type config_parameter_override_list: list[~azure.servicefabric.models.ConfigParameterOverride] - :param force: Force adding configuration overrides on specified nodes. Default value is None. - :type force: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(config_parameter_override_list, '[ConfigParameterOverride]') - - request = build_add_configuration_parameter_overrides_request( - node_name=node_name, - api_version=api_version, - content_type=content_type, - json=_json, - force=force, - timeout=timeout, - template_url=self.add_configuration_parameter_overrides.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - add_configuration_parameter_overrides.metadata = {'url': "/Nodes/{nodeName}/$/AddConfigurationParameterOverrides"} # type: ignore - - - @distributed_trace - def remove_node_tags( # pylint: disable=inconsistent-return-statements - self, - node_name, # type: str - node_tags, # type: List[str] - **kwargs # type: Any - ): - # type: (...) -> None - """Removes the list of tags from the specified node. - - This api allows removing set of tags from the specified node. - - :param node_name: The name of the node. - :type node_name: str - :param node_tags: Description for adding list of node tags. - :type node_tags: list[str] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(node_tags, '[str]') - - request = build_remove_node_tags_request( - node_name=node_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.remove_node_tags.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - remove_node_tags.metadata = {'url': "/Nodes/{nodeName}/$/RemoveNodeTags"} # type: ignore - - - @distributed_trace - def add_node_tags( # pylint: disable=inconsistent-return-statements - self, - node_name, # type: str - node_tags, # type: List[str] - **kwargs # type: Any - ): - # type: (...) -> None - """Adds the list of tags on the specified node. - - This api allows adding tags to the specified node. - - :param node_name: The name of the node. - :type node_name: str - :param node_tags: Description for adding list of node tags. - :type node_tags: list[str] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(node_tags, '[str]') - - request = build_add_node_tags_request( - node_name=node_name, - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.add_node_tags.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - add_node_tags.metadata = {'url': "/Nodes/{nodeName}/$/AddNodeTags"} # type: ignore - - - @distributed_trace - def get_application_type_info_list( - self, - application_type_definition_kind_filter=0, # type: Optional[int] - exclude_application_parameters=False, # type: Optional[bool] - continuation_token_parameter=None, # type: Optional[str] - max_results=0, # type: Optional[int] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedApplicationTypeInfoList" - """Gets the list of application types in the Service Fabric cluster. - - Returns the information about the application types that are provisioned or in the process of - being provisioned in the Service Fabric cluster. Each version of an application type is - returned as one application type. The response includes the name, version, status, and other - details about the application type. This is a paged query, meaning that if not all of the - application types fit in a page, one page of results is returned as well as a continuation - token, which can be used to get the next page. For example, if there are 10 application types - but a page only fits the first three application types, or if max results is set to 3, then - three is returned. To access the rest of the results, retrieve subsequent pages by using the - returned continuation token in the next query. An empty continuation token is returned if there - are no subsequent pages. - - :param application_type_definition_kind_filter: Used to filter on ApplicationTypeDefinitionKind - which is the mechanism used to define a Service Fabric application type. - - - * Default - Default value, which performs the same function as selecting "All". The value is - 0. - * All - Filter that matches input with any ApplicationTypeDefinitionKind value. The value is - 65535. - * ServiceFabricApplicationPackage - Filter that matches input with - ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. The value is 1. - * Compose - Filter that matches input with ApplicationTypeDefinitionKind value Compose. The - value is 2. Default value is 0. - :type application_type_definition_kind_filter: int - :param exclude_application_parameters: The flag that specifies whether application parameters - will be excluded from the result. Default value is False. - :type exclude_application_parameters: bool - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedApplicationTypeInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedApplicationTypeInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedApplicationTypeInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_type_info_list_request( - api_version=api_version, - application_type_definition_kind_filter=application_type_definition_kind_filter, - exclude_application_parameters=exclude_application_parameters, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.get_application_type_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedApplicationTypeInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_type_info_list.metadata = {'url': "/ApplicationTypes"} # type: ignore - - - @distributed_trace - def get_application_type_info_list_by_name( - self, - application_type_name, # type: str - application_type_version=None, # type: Optional[str] - exclude_application_parameters=False, # type: Optional[bool] - continuation_token_parameter=None, # type: Optional[str] - max_results=0, # type: Optional[int] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedApplicationTypeInfoList" - """Gets the list of application types in the Service Fabric cluster matching exactly the specified - name. - - Returns the information about the application types that are provisioned or in the process of - being provisioned in the Service Fabric cluster. These results are of application types whose - name match exactly the one specified as the parameter, and which comply with the given query - parameters. All versions of the application type matching the application type name are - returned, with each version returned as one application type. The response includes the name, - version, status, and other details about the application type. This is a paged query, meaning - that if not all of the application types fit in a page, one page of results is returned as well - as a continuation token, which can be used to get the next page. For example, if there are 10 - application types but a page only fits the first three application types, or if max results is - set to 3, then three is returned. To access the rest of the results, retrieve subsequent pages - by using the returned continuation token in the next query. An empty continuation token is - returned if there are no subsequent pages. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. Default value is None. - :type application_type_version: str - :param exclude_application_parameters: The flag that specifies whether application parameters - will be excluded from the result. Default value is False. - :type exclude_application_parameters: bool - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedApplicationTypeInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedApplicationTypeInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedApplicationTypeInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_type_info_list_by_name_request( - application_type_name=application_type_name, - api_version=api_version, - application_type_version=application_type_version, - exclude_application_parameters=exclude_application_parameters, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.get_application_type_info_list_by_name.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedApplicationTypeInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_type_info_list_by_name.metadata = {'url': "/ApplicationTypes/{applicationTypeName}"} # type: ignore - - - @distributed_trace - def provision_application_type( # pylint: disable=inconsistent-return-statements - self, - provision_application_type_description_base_required_body_param, # type: "_models.ProvisionApplicationTypeDescriptionBase" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Provisions or registers a Service Fabric application type with the cluster using the '.sfpkg' - package in the external store or using the application package in the image store. - - Provisions a Service Fabric application type with the cluster. The provision is required before - any new applications can be instantiated. - The provision operation can be performed either on the application package specified by the - relativePathInImageStore, or by using the URI of the external '.sfpkg'. - - :param provision_application_type_description_base_required_body_param: The base type of - provision application type description which supports either image store-based provision or - external store-based provision. - :type provision_application_type_description_base_required_body_param: - ~azure.servicefabric.models.ProvisionApplicationTypeDescriptionBase - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(provision_application_type_description_base_required_body_param, 'ProvisionApplicationTypeDescriptionBase') - - request = build_provision_application_type_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.provision_application_type.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - provision_application_type.metadata = {'url': "/ApplicationTypes/$/Provision"} # type: ignore - - - @distributed_trace - def unprovision_application_type( # pylint: disable=inconsistent-return-statements - self, - application_type_name, # type: str - application_type_version, # type: str - timeout=60, # type: Optional[int] - async_parameter=None, # type: Optional[bool] - **kwargs # type: Any - ): - # type: (...) -> None - """Removes or unregisters a Service Fabric application type from the cluster. - - This operation can only be performed if all application instances of the application type have - been deleted. Once the application type is unregistered, no new application instances can be - created for this particular application type. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type as defined in the - application manifest. - :type application_type_version: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param async_parameter: The flag indicating whether or not unprovision should occur - asynchronously. When set to true, the unprovision operation returns when the request is - accepted by the system, and the unprovision operation continues without any timeout limit. The - default value is false. However, we recommend setting it to true for large application packages - that were provisioned. - :type async_parameter: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _unprovision_application_type_description_info = _models.UnprovisionApplicationTypeDescriptionInfo(application_type_version=application_type_version, async_property=async_parameter) - _json = self._serialize.body(_unprovision_application_type_description_info, 'UnprovisionApplicationTypeDescriptionInfo') - - request = build_unprovision_application_type_request( - application_type_name=application_type_name, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.unprovision_application_type.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - unprovision_application_type.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/Unprovision"} # type: ignore - - - @distributed_trace - def update_application_type_arm_metadata( # pylint: disable=inconsistent-return-statements - self, - application_type_name, # type: str - application_type_version, # type: str - timeout=60, # type: Optional[int] - force=None, # type: Optional[bool] - arm_resource_id=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - """Updates the Arm Metadata for a specific Application Type. - - Updates the Arm Metadata for a specific Application Type. Is able to be called immediately - after the provision app type API is called. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param force: Force parameter used to prevent accidental Arm metadata update. Default value is - None. - :type force: bool - :param arm_resource_id: A string containing the ArmResourceId. Default value is None. - :type arm_resource_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _application_type_arm_metadata_update_description = _models.ArmMetadata(arm_resource_id=arm_resource_id) - _json = self._serialize.body(_application_type_arm_metadata_update_description, 'ArmMetadata') - - request = build_update_application_type_arm_metadata_request( - application_type_name=application_type_name, - api_version=api_version, - content_type=content_type, - application_type_version=application_type_version, - json=_json, - timeout=timeout, - force=force, - template_url=self.update_application_type_arm_metadata.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - update_application_type_arm_metadata.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/UpdateArmMetadata"} # type: ignore - - - @distributed_trace - def get_service_type_info_list( - self, - application_type_name, # type: str - application_type_version, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> List["_models.ServiceTypeInfo"] - """Gets the list containing the information about service types that are supported by a - provisioned application type in a Service Fabric cluster. - - Gets the list containing the information about service types that are supported by a - provisioned application type in a Service Fabric cluster. The provided application type must - exist. Otherwise, a 404 status is returned. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ServiceTypeInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ServiceTypeInfo] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ServiceTypeInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_type_info_list_request( - application_type_name=application_type_name, - api_version=api_version, - application_type_version=application_type_version, - timeout=timeout, - template_url=self.get_service_type_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ServiceTypeInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_type_info_list.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes"} # type: ignore - - - @distributed_trace - def get_service_type_info_by_name( - self, - application_type_name, # type: str - application_type_version, # type: str - service_type_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.ServiceTypeInfo"] - """Gets the information about a specific service type that is supported by a provisioned - application type in a Service Fabric cluster. - - Gets the information about a specific service type that is supported by a provisioned - application type in a Service Fabric cluster. The provided application type must exist. - Otherwise, a 404 status is returned. A 204 response is returned if the specified service type - is not found in the cluster. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param service_type_name: Specifies the name of a Service Fabric service type. - :type service_type_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceTypeInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceTypeInfo or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServiceTypeInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_type_info_by_name_request( - application_type_name=application_type_name, - service_type_name=service_type_name, - api_version=api_version, - application_type_version=application_type_version, - timeout=timeout, - template_url=self.get_service_type_info_by_name.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServiceTypeInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_type_info_by_name.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes/{serviceTypeName}"} # type: ignore - - - @distributed_trace - def get_service_manifest( - self, - application_type_name, # type: str - application_type_version, # type: str - service_manifest_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ServiceTypeManifest" - """Gets the manifest describing a service type. - - Gets the manifest describing a service type. The response contains the service manifest XML as - a string. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param service_manifest_name: The name of a service manifest registered as part of an - application type in a Service Fabric cluster. - :type service_manifest_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceTypeManifest, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceTypeManifest - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceTypeManifest"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_manifest_request( - application_type_name=application_type_name, - api_version=api_version, - application_type_version=application_type_version, - service_manifest_name=service_manifest_name, - timeout=timeout, - template_url=self.get_service_manifest.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ServiceTypeManifest', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_manifest.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/GetServiceManifest"} # type: ignore - - - @distributed_trace - def get_deployed_service_type_info_list( - self, - node_name, # type: str - application_id, # type: str - service_manifest_name=None, # type: Optional[str] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> List["_models.DeployedServiceTypeInfo"] - """Gets the list containing the information about service types from the applications deployed on - a node in a Service Fabric cluster. - - Gets the list containing the information about service types from the applications deployed on - a node in a Service Fabric cluster. The response includes the name of the service type, its - registration status, the code package that registered it and activation ID of the service - package. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_manifest_name: The name of the service manifest to filter the list of deployed - service type information. If specified, the response will only contain the information about - service types that are defined in this service manifest. Default value is None. - :type service_manifest_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of DeployedServiceTypeInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.DeployedServiceTypeInfo] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.DeployedServiceTypeInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_service_type_info_list_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - service_manifest_name=service_manifest_name, - timeout=timeout, - template_url=self.get_deployed_service_type_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[DeployedServiceTypeInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_type_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes"} # type: ignore - - - @distributed_trace - def get_deployed_service_type_info_by_name( - self, - node_name, # type: str - application_id, # type: str - service_type_name, # type: str - service_manifest_name=None, # type: Optional[str] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Optional[List["_models.DeployedServiceTypeInfo"]] - """Gets the information about a specified service type of the application deployed on a node in a - Service Fabric cluster. - - Gets the list containing the information about a specific service type from the applications - deployed on a node in a Service Fabric cluster. The response includes the name of the service - type, its registration status, the code package that registered it and activation ID of the - service package. Each entry represents one activation of a service type, differentiated by the - activation ID. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_type_name: Specifies the name of a Service Fabric service type. - :type service_type_name: str - :param service_manifest_name: The name of the service manifest to filter the list of deployed - service type information. If specified, the response will only contain the information about - service types that are defined in this service manifest. Default value is None. - :type service_manifest_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of DeployedServiceTypeInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.DeployedServiceTypeInfo] or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[List["_models.DeployedServiceTypeInfo"]]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_service_type_info_by_name_request( - node_name=node_name, - application_id=application_id, - service_type_name=service_type_name, - api_version=api_version, - service_manifest_name=service_manifest_name, - timeout=timeout, - template_url=self.get_deployed_service_type_info_by_name.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[DeployedServiceTypeInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_type_info_by_name.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes/{serviceTypeName}"} # type: ignore - - - @distributed_trace - def create_application( # pylint: disable=inconsistent-return-statements - self, - application_description, # type: "_models.ApplicationDescription" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Creates a Service Fabric application. - - Creates a Service Fabric application using the specified description. - - :param application_description: Description for creating an application. - :type application_description: ~azure.servicefabric.models.ApplicationDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(application_description, 'ApplicationDescription') - - request = build_create_application_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.create_application.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - create_application.metadata = {'url': "/Applications/$/Create"} # type: ignore - - - @distributed_trace - def delete_application( # pylint: disable=inconsistent-return-statements - self, - application_id, # type: str - force_remove=None, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes an existing Service Fabric application. - - An application must be created before it can be deleted. Deleting an application will delete - all services that are part of that application. By default, Service Fabric will try to close - service replicas in a graceful manner and then delete the service. However, if a service is - having issues closing the replica gracefully, the delete operation may take a long time or get - stuck. Use the optional ForceRemove flag to skip the graceful close sequence and forcefully - delete the application and all of its services. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param force_remove: Remove a Service Fabric application or service forcefully without going - through the graceful shutdown sequence. This parameter can be used to forcefully delete an - application or service for which delete is timing out due to issues in the service code that - prevents graceful close of replicas. Default value is None. - :type force_remove: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_application_request( - application_id=application_id, - api_version=api_version, - force_remove=force_remove, - timeout=timeout, - template_url=self.delete_application.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete_application.metadata = {'url': "/Applications/{applicationId}/$/Delete"} # type: ignore - - - @distributed_trace - def get_application_load_info( - self, - application_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.ApplicationLoadInfo"] - """Gets load information about a Service Fabric application. - - Returns the load information about the application that was created or in the process of being - created in the Service Fabric cluster and whose name matches the one specified as the - parameter. The response includes the name, minimum nodes, maximum nodes, the number of nodes - the application is occupying currently, and application load metric information about the - application. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationLoadInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationLoadInfo or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationLoadInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_load_info_request( - application_id=application_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_application_load_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApplicationLoadInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_load_info.metadata = {'url': "/Applications/{applicationId}/$/GetLoadInformation"} # type: ignore - - - @distributed_trace - def get_application_info_list( - self, - application_definition_kind_filter=0, # type: Optional[int] - application_type_name=None, # type: Optional[str] - exclude_application_parameters=False, # type: Optional[bool] - continuation_token_parameter=None, # type: Optional[str] - max_results=0, # type: Optional[int] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedApplicationInfoList" - """Gets the list of applications created in the Service Fabric cluster that match the specified - filters. - - Gets the information about the applications that were created or in the process of being - created in the Service Fabric cluster and match the specified filters. The response includes - the name, type, status, parameters, and other details about the application. If the - applications do not fit in a page, one page of results is returned as well as a continuation - token, which can be used to get the next page. Filters ApplicationTypeName and - ApplicationDefinitionKindFilter cannot be specified at the same time. - - :param application_definition_kind_filter: Used to filter on ApplicationDefinitionKind, which - is the mechanism used to define a Service Fabric application. - - - * Default - Default value, which performs the same function as selecting "All". The value is - 0. - * All - Filter that matches input with any ApplicationDefinitionKind value. The value is - 65535. - * ServiceFabricApplicationDescription - Filter that matches input with - ApplicationDefinitionKind value ServiceFabricApplicationDescription. The value is 1. - * Compose - Filter that matches input with ApplicationDefinitionKind value Compose. The value - is 2. Default value is 0. - :type application_definition_kind_filter: int - :param application_type_name: The application type name used to filter the applications to - query for. This value should not contain the application type version. Default value is None. - :type application_type_name: str - :param exclude_application_parameters: The flag that specifies whether application parameters - will be excluded from the result. Default value is False. - :type exclude_application_parameters: bool - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedApplicationInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedApplicationInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedApplicationInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_info_list_request( - api_version=api_version, - application_definition_kind_filter=application_definition_kind_filter, - application_type_name=application_type_name, - exclude_application_parameters=exclude_application_parameters, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.get_application_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedApplicationInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_info_list.metadata = {'url': "/Applications"} # type: ignore - - - @distributed_trace - def get_application_info( - self, - application_id, # type: str - exclude_application_parameters=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.ApplicationInfo"] - """Gets information about a Service Fabric application. - - Returns the information about the application that was created or in the process of being - created in the Service Fabric cluster and whose name matches the one specified as the - parameter. The response includes the name, type, status, parameters, and other details about - the application. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param exclude_application_parameters: The flag that specifies whether application parameters - will be excluded from the result. Default value is False. - :type exclude_application_parameters: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationInfo or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_info_request( - application_id=application_id, - api_version=api_version, - exclude_application_parameters=exclude_application_parameters, - timeout=timeout, - template_url=self.get_application_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ApplicationInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_info.metadata = {'url': "/Applications/{applicationId}"} # type: ignore - - - @distributed_trace - def get_application_health( - self, - application_id, # type: str - events_health_state_filter=0, # type: Optional[int] - deployed_applications_health_state_filter=0, # type: Optional[int] - services_health_state_filter=0, # type: Optional[int] - exclude_health_statistics=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ApplicationHealth" - """Gets the health of the service fabric application. - - Returns the heath state of the service fabric application. The response reports either Ok, - Error or Warning health state. If the entity is not found in the health store, it will return - Error. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param deployed_applications_health_state_filter: Allows filtering of the deployed applications - health state objects returned in the result of application health query based on their health - state. - The possible values for this parameter include integer value of one of the following health - states. Only deployed applications that match the filter will be returned. - All deployed applications are used to evaluate the aggregated health state. If not specified, - all entries are returned. - The state values are flag-based enumeration, so the value could be a combination of these - values, obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of deployed applications with - HealthState value of OK (2) and Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type deployed_applications_health_state_filter: int - :param services_health_state_filter: Allows filtering of the services health state objects - returned in the result of services health query based on their health state. - The possible values for this parameter include integer value of one of the following health - states. - Only services that match the filter are returned. All services are used to evaluate the - aggregated health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, - obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health - state of services with HealthState value of OK (2) and Warning (4) will be returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type services_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_health_request( - application_id=application_id, - api_version=api_version, - events_health_state_filter=events_health_state_filter, - deployed_applications_health_state_filter=deployed_applications_health_state_filter, - services_health_state_filter=services_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - timeout=timeout, - template_url=self.get_application_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_health.metadata = {'url': "/Applications/{applicationId}/$/GetHealth"} # type: ignore - - - @distributed_trace - def get_application_health_using_policy( - self, - application_id, # type: str - events_health_state_filter=0, # type: Optional[int] - deployed_applications_health_state_filter=0, # type: Optional[int] - services_health_state_filter=0, # type: Optional[int] - exclude_health_statistics=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - application_health_policy=None, # type: Optional["_models.ApplicationHealthPolicy"] - **kwargs # type: Any - ): - # type: (...) -> "_models.ApplicationHealth" - """Gets the health of a Service Fabric application using the specified policy. - - Gets the health of a Service Fabric application. Use EventsHealthStateFilter to filter the - collection of health events reported on the node based on the health state. Use - ClusterHealthPolicies to override the health policies used to evaluate the health. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param deployed_applications_health_state_filter: Allows filtering of the deployed applications - health state objects returned in the result of application health query based on their health - state. - The possible values for this parameter include integer value of one of the following health - states. Only deployed applications that match the filter will be returned. - All deployed applications are used to evaluate the aggregated health state. If not specified, - all entries are returned. - The state values are flag-based enumeration, so the value could be a combination of these - values, obtained using bitwise 'OR' operator. - For example, if the provided value is 6 then health state of deployed applications with - HealthState value of OK (2) and Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type deployed_applications_health_state_filter: int - :param services_health_state_filter: Allows filtering of the services health state objects - returned in the result of services health query based on their health state. - The possible values for this parameter include integer value of one of the following health - states. - Only services that match the filter are returned. All services are used to evaluate the - aggregated health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, - obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health - state of services with HealthState value of OK (2) and Warning (4) will be returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type services_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param application_health_policy: Describes the health policies used to evaluate the health of - an application or one of its children. - If not present, the health evaluation uses the health policy from application manifest or the - default health policy. Default value is None. - :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if application_health_policy is not None: - _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - _json = None - - request = build_get_application_health_using_policy_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - events_health_state_filter=events_health_state_filter, - deployed_applications_health_state_filter=deployed_applications_health_state_filter, - services_health_state_filter=services_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - timeout=timeout, - template_url=self.get_application_health_using_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_health_using_policy.metadata = {'url': "/Applications/{applicationId}/$/GetHealth"} # type: ignore - - - @distributed_trace - def report_application_health( # pylint: disable=inconsistent-return-statements - self, - application_id, # type: str - health_information, # type: "_models.HealthInformation" - immediate=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Sends a health report on the Service Fabric application. - - Reports health state of the specified Service Fabric application. The report must contain the - information about the source of the health report and property on which it is reported. - The report is sent to a Service Fabric gateway Application, which forwards to the health store. - The report may be accepted by the gateway, but rejected by the health store after extra - validation. - For example, the health store may reject the report because of an invalid parameter, like a - stale sequence number. - To see whether the report was applied in the health store, get application health and check - that the report appears in the HealthEvents section. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param health_information: Describes the health information for the health report. This - information needs to be present in all of the health reports sent to the health manager. - :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be sent immediately. - A health report is sent to a Service Fabric gateway Application, which forwards to the health - store. - If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health - store, regardless of the fabric client settings that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as possible. - Depending on timing and other conditions, sending the report may still fail, for example if - the HTTP Gateway is closed or the message doesn't reach the Gateway. - If Immediate is set to false, the report is sent based on the health client settings from the - HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval - configuration. - This is the recommended setting because it allows the health client to optimize health - reporting messages to health store as well as health report processing. - By default, reports are not sent immediately. Default value is False. - :type immediate: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(health_information, 'HealthInformation') - - request = build_report_application_health_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - immediate=immediate, - timeout=timeout, - template_url=self.report_application_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - report_application_health.metadata = {'url': "/Applications/{applicationId}/$/ReportHealth"} # type: ignore - - - @distributed_trace - def start_application_upgrade( # pylint: disable=inconsistent-return-statements - self, - application_id, # type: str - application_upgrade_description, # type: "_models.ApplicationUpgradeDescription" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Starts upgrading an application in the Service Fabric cluster. - - Validates the supplied application upgrade parameters and starts upgrading the application if - the parameters are valid. - Note, `ApplicationParameter - `_\ - s are not preserved across an application upgrade. - In order to preserve current application parameters, the user should get the parameters using - `GetApplicationInfo <./GetApplicationInfo.md>`_ operation first and pass them into the upgrade - API call as shown in the example. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param application_upgrade_description: Parameters for an application upgrade. - :type application_upgrade_description: - ~azure.servicefabric.models.ApplicationUpgradeDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(application_upgrade_description, 'ApplicationUpgradeDescription') - - request = build_start_application_upgrade_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.start_application_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/Upgrade"} # type: ignore - - - @distributed_trace - def get_application_upgrade( - self, - application_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ApplicationUpgradeProgressInfo" - """Gets details for the latest upgrade performed on this application. - - Returns information about the state of the latest application upgrade along with details to aid - debugging application health issues. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationUpgradeProgressInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationUpgradeProgressInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationUpgradeProgressInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_upgrade_request( - application_id=application_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_application_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationUpgradeProgressInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/GetUpgradeProgress"} # type: ignore - - - @distributed_trace - def update_application_upgrade( # pylint: disable=inconsistent-return-statements - self, - application_id, # type: str - application_upgrade_update_description, # type: "_models.ApplicationUpgradeUpdateDescription" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Updates an ongoing application upgrade in the Service Fabric cluster. - - Updates the parameters of an ongoing application upgrade from the ones specified at the time of - starting the application upgrade. This may be required to mitigate stuck application upgrades - due to incorrect parameters or issues in the application to make progress. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param application_upgrade_update_description: Parameters for updating an existing application - upgrade. - :type application_upgrade_update_description: - ~azure.servicefabric.models.ApplicationUpgradeUpdateDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(application_upgrade_update_description, 'ApplicationUpgradeUpdateDescription') - - request = build_update_application_upgrade_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.update_application_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - update_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/UpdateUpgrade"} # type: ignore - - - @distributed_trace - def update_application( # pylint: disable=inconsistent-return-statements - self, - application_id, # type: str - application_update_description, # type: "_models.ApplicationUpdateDescription" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Updates a Service Fabric application. - - Updates a Service Fabric application instance. The set of properties that can be updated are a - subset of the properties that were specified at the time of creating the application. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param application_update_description: Parameters for updating an existing application - instance. - :type application_update_description: ~azure.servicefabric.models.ApplicationUpdateDescription - :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. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(application_update_description, 'ApplicationUpdateDescription') - - request = build_update_application_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.update_application.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - update_application.metadata = {'url': "/Applications/{applicationId}/$/Update"} # type: ignore - - - @distributed_trace - def resume_application_upgrade( # pylint: disable=inconsistent-return-statements - self, - application_id, # type: str - upgrade_domain_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Resumes upgrading an application in the Service Fabric cluster. - - Resumes an unmonitored manual Service Fabric application upgrade. Service Fabric upgrades one - upgrade domain at a time. For unmonitored manual upgrades, after Service Fabric finishes an - upgrade domain, it waits for you to call this API before proceeding to the next upgrade domain. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param upgrade_domain_name: The name of the upgrade domain in which to resume the upgrade. - :type upgrade_domain_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _resume_application_upgrade_description = _models.ResumeApplicationUpgradeDescription(upgrade_domain_name=upgrade_domain_name) - _json = self._serialize.body(_resume_application_upgrade_description, 'ResumeApplicationUpgradeDescription') - - request = build_resume_application_upgrade_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.resume_application_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - resume_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/MoveToNextUpgradeDomain"} # type: ignore - - - @distributed_trace - def rollback_application_upgrade( # pylint: disable=inconsistent-return-statements - self, - application_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Starts rolling back the currently on-going upgrade of an application in the Service Fabric - cluster. - - Starts rolling back the current application upgrade to the previous version. This API can only - be used to roll back the current in-progress upgrade that is rolling forward to new version. If - the application is not currently being upgraded use StartApplicationUpgrade API to upgrade it - to desired version, including rolling back to a previous version. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_rollback_application_upgrade_request( - application_id=application_id, - api_version=api_version, - timeout=timeout, - template_url=self.rollback_application_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - rollback_application_upgrade.metadata = {'url': "/Applications/{applicationId}/$/RollbackUpgrade"} # type: ignore - - - @distributed_trace - def get_deployed_application_info_list( - self, - node_name, # type: str - timeout=60, # type: Optional[int] - include_health_state=False, # type: Optional[bool] - continuation_token_parameter=None, # type: Optional[str] - max_results=0, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedDeployedApplicationInfoList" - """Gets the list of applications deployed on a Service Fabric node. - - Gets the list of applications deployed on a Service Fabric node. The results do not include - information about deployed system applications unless explicitly queried for by ID. Results - encompass deployed applications in active, activating, and downloading states. This query - requires that the node name corresponds to a node on the cluster. The query fails if the - provided node name does not point to any active Service Fabric nodes on the cluster. - - :param node_name: The name of the node. - :type node_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param include_health_state: Include the health state of an entity. - If this parameter is false or not specified, then the health state returned is "Unknown". - When set to true, the query goes in parallel to the node and the health system service before - the results are merged. - As a result, the query is more expensive and may take a longer time. Default value is False. - :type include_health_state: bool - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedDeployedApplicationInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedDeployedApplicationInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedDeployedApplicationInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_application_info_list_request( - node_name=node_name, - api_version=api_version, - timeout=timeout, - include_health_state=include_health_state, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - template_url=self.get_deployed_application_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedDeployedApplicationInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_application_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications"} # type: ignore - - - @distributed_trace - def get_deployed_application_info( - self, - node_name, # type: str - application_id, # type: str - timeout=60, # type: Optional[int] - include_health_state=False, # type: Optional[bool] - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.DeployedApplicationInfo"] - """Gets the information about an application deployed on a Service Fabric node. - - This query returns system application information if the application ID provided is for system - application. Results encompass deployed applications in active, activating, and downloading - states. This query requires that the node name corresponds to a node on the cluster. The query - fails if the provided node name does not point to any active Service Fabric nodes on the - cluster. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param include_health_state: Include the health state of an entity. - If this parameter is false or not specified, then the health state returned is "Unknown". - When set to true, the query goes in parallel to the node and the health system service before - the results are merged. - As a result, the query is more expensive and may take a longer time. Default value is False. - :type include_health_state: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeployedApplicationInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.DeployedApplicationInfo or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.DeployedApplicationInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_application_info_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - timeout=timeout, - include_health_state=include_health_state, - template_url=self.get_deployed_application_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DeployedApplicationInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_application_info.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}"} # type: ignore - - - @distributed_trace - def get_deployed_application_health( - self, - node_name, # type: str - application_id, # type: str - events_health_state_filter=0, # type: Optional[int] - deployed_service_packages_health_state_filter=0, # type: Optional[int] - exclude_health_statistics=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.DeployedApplicationHealth" - """Gets the information about health of an application deployed on a Service Fabric node. - - Gets the information about health of an application deployed on a Service Fabric node. Use - EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported - on the deployed application based on health state. Use DeployedServicePackagesHealthStateFilter - to optionally filter for DeployedServicePackageHealth children based on health state. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param deployed_service_packages_health_state_filter: Allows filtering of the deployed service - package health state objects returned in the result of deployed application health query based - on their health state. - The possible values for this parameter include integer value of one of the following health - states. - Only deployed service packages that match the filter are returned. All deployed service - packages are used to evaluate the aggregated health state of the deployed application. - If not specified, all entries are returned. - The state values are flag-based enumeration, so the value can be a combination of these - values, obtained using the bitwise 'OR' operator. - For example, if the provided value is 6 then health state of service packages with HealthState - value of OK (2) and Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type deployed_service_packages_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeployedApplicationHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.DeployedApplicationHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedApplicationHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_application_health_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - events_health_state_filter=events_health_state_filter, - deployed_service_packages_health_state_filter=deployed_service_packages_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - timeout=timeout, - template_url=self.get_deployed_application_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('DeployedApplicationHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_application_health.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth"} # type: ignore - - - @distributed_trace - def get_deployed_application_health_using_policy( - self, - node_name, # type: str - application_id, # type: str - events_health_state_filter=0, # type: Optional[int] - deployed_service_packages_health_state_filter=0, # type: Optional[int] - exclude_health_statistics=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - application_health_policy=None, # type: Optional["_models.ApplicationHealthPolicy"] - **kwargs # type: Any - ): - # type: (...) -> "_models.DeployedApplicationHealth" - """Gets the information about health of an application deployed on a Service Fabric node. using - the specified policy. - - Gets the information about health of an application deployed on a Service Fabric node using the - specified policy. Use EventsHealthStateFilter to optionally filter for the collection of - HealthEvent objects reported on the deployed application based on health state. Use - DeployedServicePackagesHealthStateFilter to optionally filter for DeployedServicePackageHealth - children based on health state. Use ApplicationHealthPolicy to optionally override the health - policies used to evaluate the health. This API only uses 'ConsiderWarningAsError' field of the - ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the - deployed application. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param deployed_service_packages_health_state_filter: Allows filtering of the deployed service - package health state objects returned in the result of deployed application health query based - on their health state. - The possible values for this parameter include integer value of one of the following health - states. - Only deployed service packages that match the filter are returned. All deployed service - packages are used to evaluate the aggregated health state of the deployed application. - If not specified, all entries are returned. - The state values are flag-based enumeration, so the value can be a combination of these - values, obtained using the bitwise 'OR' operator. - For example, if the provided value is 6 then health state of service packages with HealthState - value of OK (2) and Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type deployed_service_packages_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param application_health_policy: Describes the health policies used to evaluate the health of - an application or one of its children. - If not present, the health evaluation uses the health policy from application manifest or the - default health policy. Default value is None. - :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeployedApplicationHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.DeployedApplicationHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedApplicationHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if application_health_policy is not None: - _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - _json = None - - request = build_get_deployed_application_health_using_policy_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - events_health_state_filter=events_health_state_filter, - deployed_service_packages_health_state_filter=deployed_service_packages_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - timeout=timeout, - template_url=self.get_deployed_application_health_using_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('DeployedApplicationHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_application_health_using_policy.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth"} # type: ignore - - - @distributed_trace - def report_deployed_application_health( # pylint: disable=inconsistent-return-statements - self, - node_name, # type: str - application_id, # type: str - health_information, # type: "_models.HealthInformation" - immediate=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Sends a health report on the Service Fabric application deployed on a Service Fabric node. - - Reports health state of the application deployed on a Service Fabric node. The report must - contain the information about the source of the health report and property on which it is - reported. - The report is sent to a Service Fabric gateway Service, which forwards to the health store. - The report may be accepted by the gateway, but rejected by the health store after extra - validation. - For example, the health store may reject the report because of an invalid parameter, like a - stale sequence number. - To see whether the report was applied in the health store, get deployed application health and - check that the report appears in the HealthEvents section. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param health_information: Describes the health information for the health report. This - information needs to be present in all of the health reports sent to the health manager. - :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be sent immediately. - A health report is sent to a Service Fabric gateway Application, which forwards to the health - store. - If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health - store, regardless of the fabric client settings that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as possible. - Depending on timing and other conditions, sending the report may still fail, for example if - the HTTP Gateway is closed or the message doesn't reach the Gateway. - If Immediate is set to false, the report is sent based on the health client settings from the - HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval - configuration. - This is the recommended setting because it allows the health client to optimize health - reporting messages to health store as well as health report processing. - By default, reports are not sent immediately. Default value is False. - :type immediate: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(health_information, 'HealthInformation') - - request = build_report_deployed_application_health_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - immediate=immediate, - timeout=timeout, - template_url=self.report_deployed_application_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - report_deployed_application_health.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/ReportHealth"} # type: ignore - - - @distributed_trace - def get_application_manifest( - self, - application_type_name, # type: str - application_type_version, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ApplicationTypeManifest" - """Gets the manifest describing an application type. - - The response contains the application manifest XML as a string. - - :param application_type_name: The name of the application type. - :type application_type_name: str - :param application_type_version: The version of the application type. - :type application_type_version: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationTypeManifest, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationTypeManifest - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationTypeManifest"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_manifest_request( - application_type_name=application_type_name, - api_version=api_version, - application_type_version=application_type_version, - timeout=timeout, - template_url=self.get_application_manifest.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationTypeManifest', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_manifest.metadata = {'url': "/ApplicationTypes/{applicationTypeName}/$/GetApplicationManifest"} # type: ignore - - - @distributed_trace - def update_application_arm_metadata( # pylint: disable=inconsistent-return-statements - self, - application_id, # type: str - timeout=60, # type: Optional[int] - force=None, # type: Optional[bool] - arm_resource_id=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - """Updates the Arm Metadata for a specific Application. - - Updates the Arm Metadata for a specific Application. Is able to be called immediately after the - create app API is called. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param force: Force parameter used to prevent accidental Arm metadata update. Default value is - None. - :type force: bool - :param arm_resource_id: A string containing the ArmResourceId. Default value is None. - :type arm_resource_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _application_arm_metadata_update_description = _models.ArmMetadata(arm_resource_id=arm_resource_id) - _json = self._serialize.body(_application_arm_metadata_update_description, 'ArmMetadata') - - request = build_update_application_arm_metadata_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - force=force, - template_url=self.update_application_arm_metadata.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - update_application_arm_metadata.metadata = {'url': "/Applications/{applicationId}/$/UpdateArmMetadata"} # type: ignore - - - @distributed_trace - def get_service_info_list( - self, - application_id, # type: str - service_type_name=None, # type: Optional[str] - continuation_token_parameter=None, # type: Optional[str] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedServiceInfoList" - """Gets the information about all services belonging to the application specified by the - application ID. - - Returns the information about all services belonging to the application specified by the - application ID. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_type_name: The service type name used to filter the services to query for. - Default value is None. - :type service_type_name: str - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedServiceInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedServiceInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedServiceInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_info_list_request( - application_id=application_id, - api_version=api_version, - service_type_name=service_type_name, - continuation_token_parameter=continuation_token_parameter, - timeout=timeout, - template_url=self.get_service_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedServiceInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_info_list.metadata = {'url': "/Applications/{applicationId}/$/GetServices"} # type: ignore - - - @distributed_trace - def get_service_info( - self, - application_id, # type: str - service_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.ServiceInfo"] - """Gets the information about the specific service belonging to the Service Fabric application. - - Returns the information about the specified service belonging to the specified Service Fabric - application. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceInfo or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServiceInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_info_request( - application_id=application_id, - service_id=service_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_service_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServiceInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_info.metadata = {'url': "/Applications/{applicationId}/$/GetServices/{serviceId}"} # type: ignore - - - @distributed_trace - def get_application_name_info( - self, - service_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ApplicationNameInfo" - """Gets the name of the Service Fabric application for a service. - - Gets the name of the application for the specified service. A 404 - FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the provided service ID - does not exist. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationNameInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ApplicationNameInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationNameInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_name_info_request( - service_id=service_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_application_name_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationNameInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_name_info.metadata = {'url': "/Services/{serviceId}/$/GetApplicationName"} # type: ignore - - - @distributed_trace - def create_service( # pylint: disable=inconsistent-return-statements - self, - application_id, # type: str - service_description, # type: "_models.ServiceDescription" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Creates the specified Service Fabric service. - - This api allows creating a new Service Fabric stateless or stateful service under a specified - Service Fabric application. The description for creating the service includes partitioning - information and optional properties for placement and load balancing. Some of the properties - can later be modified using ``UpdateService`` API. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_description: The information necessary to create a service. - :type service_description: ~azure.servicefabric.models.ServiceDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(service_description, 'ServiceDescription') - - request = build_create_service_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.create_service.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - create_service.metadata = {'url': "/Applications/{applicationId}/$/GetServices/$/Create"} # type: ignore - - - @distributed_trace - def create_service_from_template( # pylint: disable=inconsistent-return-statements - self, - application_id, # type: str - service_from_template_description, # type: "_models.ServiceFromTemplateDescription" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Creates a Service Fabric service from the service template. - - Creates a Service Fabric service from the service template defined in the application manifest. - A service template contains the properties that will be same for the service instance of the - same type. The API allows overriding the properties that are usually different for different - services of the same service type. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_from_template_description: Describes the service that needs to be created from - the template defined in the application manifest. - :type service_from_template_description: - ~azure.servicefabric.models.ServiceFromTemplateDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(service_from_template_description, 'ServiceFromTemplateDescription') - - request = build_create_service_from_template_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.create_service_from_template.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - create_service_from_template.metadata = {'url': "/Applications/{applicationId}/$/GetServices/$/CreateFromTemplate"} # type: ignore - - - @distributed_trace - def delete_service( # pylint: disable=inconsistent-return-statements - self, - service_id, # type: str - force_remove=None, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes an existing Service Fabric service. - - A service must be created before it can be deleted. By default, Service Fabric will try to - close service replicas in a graceful manner and then delete the service. However, if the - service is having issues closing the replica gracefully, the delete operation may take a long - time or get stuck. Use the optional ForceRemove flag to skip the graceful close sequence and - forcefully delete the service. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param force_remove: Remove a Service Fabric application or service forcefully without going - through the graceful shutdown sequence. This parameter can be used to forcefully delete an - application or service for which delete is timing out due to issues in the service code that - prevents graceful close of replicas. Default value is None. - :type force_remove: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_service_request( - service_id=service_id, - api_version=api_version, - force_remove=force_remove, - timeout=timeout, - template_url=self.delete_service.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete_service.metadata = {'url': "/Services/{serviceId}/$/Delete"} # type: ignore - - - @distributed_trace - def update_service( # pylint: disable=inconsistent-return-statements - self, - service_id, # type: str - service_update_description, # type: "_models.ServiceUpdateDescription" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Updates a Service Fabric service using the specified update description. - - This API allows updating properties of a running Service Fabric service. The set of properties - that can be updated are a subset of the properties that were specified at the time of creating - the service. The current set of properties can be obtained using ``GetServiceDescription`` API. - Note that updating the properties of a running service is different than upgrading your - application using ``StartApplicationUpgrade`` API. The upgrade is a long running background - operation that involves moving the application from one version to another, one upgrade domain - at a time, whereas update applies the new properties immediately to the service. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param service_update_description: The information necessary to update a service. - :type service_update_description: ~azure.servicefabric.models.ServiceUpdateDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(service_update_description, 'ServiceUpdateDescription') - - request = build_update_service_request( - service_id=service_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.update_service.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - update_service.metadata = {'url': "/Services/{serviceId}/$/Update"} # type: ignore - - - @distributed_trace - def get_service_description( - self, - service_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ServiceDescription" - """Gets the description of an existing Service Fabric service. - - Gets the description of an existing Service Fabric service. A service must be created before - its description can be obtained. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_description_request( - service_id=service_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_service_description.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ServiceDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_description.metadata = {'url': "/Services/{serviceId}/$/GetDescription"} # type: ignore - - - @distributed_trace - def get_service_health( - self, - service_id, # type: str - events_health_state_filter=0, # type: Optional[int] - partitions_health_state_filter=0, # type: Optional[int] - exclude_health_statistics=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ServiceHealth" - """Gets the health of the specified Service Fabric service. - - Gets the health information of the specified service. - Use EventsHealthStateFilter to filter the collection of health events reported on the service - based on the health state. - Use PartitionsHealthStateFilter to filter the collection of partitions returned. - If you specify a service that does not exist in the health store, this request returns an - error. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param partitions_health_state_filter: Allows filtering of the partitions health state objects - returned in the result of service health query based on their health state. - The possible values for this parameter include integer value of one of the following health - states. - Only partitions that match the filter are returned. All partitions are used to evaluate the - aggregated health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these value - obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health - state of partitions with HealthState value of OK (2) and Warning (4) will be returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type partitions_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_health_request( - service_id=service_id, - api_version=api_version, - events_health_state_filter=events_health_state_filter, - partitions_health_state_filter=partitions_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - timeout=timeout, - template_url=self.get_service_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ServiceHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_health.metadata = {'url': "/Services/{serviceId}/$/GetHealth"} # type: ignore - - - @distributed_trace - def get_service_health_using_policy( - self, - service_id, # type: str - events_health_state_filter=0, # type: Optional[int] - partitions_health_state_filter=0, # type: Optional[int] - exclude_health_statistics=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - application_health_policy=None, # type: Optional["_models.ApplicationHealthPolicy"] - **kwargs # type: Any - ): - # type: (...) -> "_models.ServiceHealth" - """Gets the health of the specified Service Fabric service, by using the specified health policy. - - Gets the health information of the specified service. - If the application health policy is specified, the health evaluation uses it to get the - aggregated health state. - If the policy is not specified, the health evaluation uses the application health policy - defined in the application manifest, or the default health policy, if no policy is defined in - the manifest. - Use EventsHealthStateFilter to filter the collection of health events reported on the service - based on the health state. - Use PartitionsHealthStateFilter to filter the collection of partitions returned. - If you specify a service that does not exist in the health store, this request returns an - error. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param partitions_health_state_filter: Allows filtering of the partitions health state objects - returned in the result of service health query based on their health state. - The possible values for this parameter include integer value of one of the following health - states. - Only partitions that match the filter are returned. All partitions are used to evaluate the - aggregated health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these value - obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health - state of partitions with HealthState value of OK (2) and Warning (4) will be returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type partitions_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param application_health_policy: Describes the health policies used to evaluate the health of - an application or one of its children. - If not present, the health evaluation uses the health policy from application manifest or the - default health policy. Default value is None. - :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if application_health_policy is not None: - _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - _json = None - - request = build_get_service_health_using_policy_request( - service_id=service_id, - api_version=api_version, - content_type=content_type, - json=_json, - events_health_state_filter=events_health_state_filter, - partitions_health_state_filter=partitions_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - timeout=timeout, - template_url=self.get_service_health_using_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ServiceHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_health_using_policy.metadata = {'url': "/Services/{serviceId}/$/GetHealth"} # type: ignore - - - @distributed_trace - def report_service_health( # pylint: disable=inconsistent-return-statements - self, - service_id, # type: str - health_information, # type: "_models.HealthInformation" - immediate=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Sends a health report on the Service Fabric service. - - Reports health state of the specified Service Fabric service. The report must contain the - information about the source of the health report and property on which it is reported. - The report is sent to a Service Fabric gateway Service, which forwards to the health store. - The report may be accepted by the gateway, but rejected by the health store after extra - validation. - For example, the health store may reject the report because of an invalid parameter, like a - stale sequence number. - To see whether the report was applied in the health store, run GetServiceHealth and check that - the report appears in the HealthEvents section. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param health_information: Describes the health information for the health report. This - information needs to be present in all of the health reports sent to the health manager. - :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be sent immediately. - A health report is sent to a Service Fabric gateway Application, which forwards to the health - store. - If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health - store, regardless of the fabric client settings that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as possible. - Depending on timing and other conditions, sending the report may still fail, for example if - the HTTP Gateway is closed or the message doesn't reach the Gateway. - If Immediate is set to false, the report is sent based on the health client settings from the - HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval - configuration. - This is the recommended setting because it allows the health client to optimize health - reporting messages to health store as well as health report processing. - By default, reports are not sent immediately. Default value is False. - :type immediate: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(health_information, 'HealthInformation') - - request = build_report_service_health_request( - service_id=service_id, - api_version=api_version, - content_type=content_type, - json=_json, - immediate=immediate, - timeout=timeout, - template_url=self.report_service_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - report_service_health.metadata = {'url': "/Services/{serviceId}/$/ReportHealth"} # type: ignore - - - @distributed_trace - def resolve_service( - self, - service_id, # type: str - partition_key_type=None, # type: Optional[int] - partition_key_value=None, # type: Optional[str] - previous_rsp_version=None, # type: Optional[str] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ResolvedServicePartition" - """Resolve a Service Fabric partition. - - Resolve a Service Fabric service partition to get the endpoints of the service replicas. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_key_type: Key type for the partition. This parameter is required if the - partition scheme for the service is Int64Range or Named. The possible values are following. - - - * None (1) - Indicates that the PartitionKeyValue parameter is not specified. This is valid - for the partitions with partitioning scheme as Singleton. This is the default value. The value - is 1. - * Int64Range (2) - Indicates that the PartitionKeyValue parameter is an int64 partition key. - This is valid for the partitions with partitioning scheme as Int64Range. The value is 2. - * Named (3) - Indicates that the PartitionKeyValue parameter is a name of the partition. This - is valid for the partitions with partitioning scheme as Named. The value is 3. Default value is - None. - :type partition_key_type: int - :param partition_key_value: Partition key. This is required if the partition scheme for the - service is Int64Range or Named. - This is not the partition ID, but rather, either the integer key value, or the name of the - partition ID. - For example, if your service is using ranged partitions from 0 to 10, then they - PartitionKeyValue would be an - integer in that range. Query service description to see the range or name. Default value is - None. - :type partition_key_value: str - :param previous_rsp_version: The value in the Version field of the response that was received - previously. This is required if the user knows that the result that was gotten previously is - stale. Default value is None. - :type previous_rsp_version: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ResolvedServicePartition, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ResolvedServicePartition - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ResolvedServicePartition"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_resolve_service_request( - service_id=service_id, - api_version=api_version, - partition_key_type=partition_key_type, - partition_key_value=partition_key_value, - previous_rsp_version=previous_rsp_version, - timeout=timeout, - template_url=self.resolve_service.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ResolvedServicePartition', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - resolve_service.metadata = {'url': "/Services/{serviceId}/$/ResolvePartition"} # type: ignore - - - @distributed_trace - def get_unplaced_replica_information( - self, - service_id, # type: str - partition_id=None, # type: Optional[str] - only_query_primaries=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.UnplacedReplicaInformation" - """Gets the information about unplaced replica of the service. - - Returns the information about the unplaced replicas of the service. - If PartitionId is specified, then result will contain information only about unplaced replicas - for that partition. - If PartitionId is not specified, then result will contain information about unplaced replicas - for all partitions of that service. - If OnlyQueryPrimaries is set to true, then result will contain information only about primary - replicas, and will ignore unplaced secondary replicas. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. Default value is None. - :type partition_id: str - :param only_query_primaries: Indicates that unplaced replica information will be queries only - for primary replicas. Default value is False. - :type only_query_primaries: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: UnplacedReplicaInformation, or the result of cls(response) - :rtype: ~azure.servicefabric.models.UnplacedReplicaInformation - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.UnplacedReplicaInformation"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_unplaced_replica_information_request( - service_id=service_id, - api_version=api_version, - partition_id=partition_id, - only_query_primaries=only_query_primaries, - timeout=timeout, - template_url=self.get_unplaced_replica_information.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('UnplacedReplicaInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_unplaced_replica_information.metadata = {'url': "/Services/{serviceId}/$/GetUnplacedReplicaInformation"} # type: ignore - - - @distributed_trace - def get_loaded_partition_info_list( - self, - metric_name, # type: str - service_name=None, # type: Optional[str] - ordering=None, # type: Optional[Union[str, "_models.Ordering"]] - max_results=0, # type: Optional[int] - continuation_token_parameter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.LoadedPartitionInformationResultList" - """Gets ordered list of partitions. - - Retrieves partitions which are most/least loaded according to specified metric. - - :param metric_name: Name of the metric based on which to get ordered list of partitions. - :type metric_name: str - :param service_name: The name of a service. Default value is None. - :type service_name: str - :param ordering: Ordering of partitions' load. Default value is None. - :type ordering: str or ~azure.servicefabric.models.Ordering - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LoadedPartitionInformationResultList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.LoadedPartitionInformationResultList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadedPartitionInformationResultList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_loaded_partition_info_list_request( - api_version=api_version, - metric_name=metric_name, - service_name=service_name, - ordering=ordering, - max_results=max_results, - continuation_token_parameter=continuation_token_parameter, - template_url=self.get_loaded_partition_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('LoadedPartitionInformationResultList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_loaded_partition_info_list.metadata = {'url': "/$/GetLoadedPartitionInfoList"} # type: ignore - - - @distributed_trace - def get_partition_info_list( - self, - service_id, # type: str - continuation_token_parameter=None, # type: Optional[str] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedServicePartitionInfoList" - """Gets the list of partitions of a Service Fabric service. - - The response includes the partition ID, partitioning scheme information, keys supported by the - partition, status, health, and other details about the partition. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedServicePartitionInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedServicePartitionInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedServicePartitionInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_info_list_request( - service_id=service_id, - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - timeout=timeout, - template_url=self.get_partition_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedServicePartitionInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_info_list.metadata = {'url': "/Services/{serviceId}/$/GetPartitions"} # type: ignore - - - @distributed_trace - def get_partition_info( - self, - partition_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.ServicePartitionInfo"] - """Gets the information about a Service Fabric partition. - - Gets the information about the specified partition. The response includes the partition ID, - partitioning scheme information, keys supported by the partition, status, health, and other - details about the partition. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServicePartitionInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServicePartitionInfo or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServicePartitionInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_info_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_partition_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ServicePartitionInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_info.metadata = {'url': "/Partitions/{partitionId}"} # type: ignore - - - @distributed_trace - def get_service_name_info( - self, - partition_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ServiceNameInfo" - """Gets the name of the Service Fabric service for a partition. - - Gets name of the service for the specified partition. A 404 error is returned if the partition - ID does not exist in the cluster. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ServiceNameInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ServiceNameInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceNameInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_name_info_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_service_name_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ServiceNameInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_name_info.metadata = {'url': "/Partitions/{partitionId}/$/GetServiceName"} # type: ignore - - - @distributed_trace - def get_partition_health( - self, - partition_id, # type: str - events_health_state_filter=0, # type: Optional[int] - replicas_health_state_filter=0, # type: Optional[int] - exclude_health_statistics=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PartitionHealth" - """Gets the health of the specified Service Fabric partition. - - Use EventsHealthStateFilter to filter the collection of health events reported on the service - based on the health state. - Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the - partition. - If you specify a partition that does not exist in the health store, this request returns an - error. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param replicas_health_state_filter: Allows filtering the collection of ReplicaHealthState - objects on the partition. The value can be obtained from members or bitwise operations on - members of HealthStateFilter. Only replicas that match the filter will be returned. All - replicas will be used to evaluate the aggregated health state. If not specified, all entries - will be returned.The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. For example, If the provided - value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be - returned. The possible values for this parameter include integer value of one of the following - health states. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type replicas_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartitionHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PartitionHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_health_request( - partition_id=partition_id, - api_version=api_version, - events_health_state_filter=events_health_state_filter, - replicas_health_state_filter=replicas_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - timeout=timeout, - template_url=self.get_partition_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartitionHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_health.metadata = {'url': "/Partitions/{partitionId}/$/GetHealth"} # type: ignore - - - @distributed_trace - def get_partition_health_using_policy( - self, - partition_id, # type: str - events_health_state_filter=0, # type: Optional[int] - replicas_health_state_filter=0, # type: Optional[int] - exclude_health_statistics=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - application_health_policy=None, # type: Optional["_models.ApplicationHealthPolicy"] - **kwargs # type: Any - ): - # type: (...) -> "_models.PartitionHealth" - """Gets the health of the specified Service Fabric partition, by using the specified health - policy. - - Gets the health information of the specified partition. - If the application health policy is specified, the health evaluation uses it to get the - aggregated health state. - If the policy is not specified, the health evaluation uses the application health policy - defined in the application manifest, or the default health policy, if no policy is defined in - the manifest. - Use EventsHealthStateFilter to filter the collection of health events reported on the partition - based on the health state. - Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the - partition. Use ApplicationHealthPolicy in the POST body to override the health policies used to - evaluate the health. - If you specify a partition that does not exist in the health store, this request returns an - error. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param replicas_health_state_filter: Allows filtering the collection of ReplicaHealthState - objects on the partition. The value can be obtained from members or bitwise operations on - members of HealthStateFilter. Only replicas that match the filter will be returned. All - replicas will be used to evaluate the aggregated health state. If not specified, all entries - will be returned.The state values are flag-based enumeration, so the value could be a - combination of these values obtained using bitwise 'OR' operator. For example, If the provided - value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be - returned. The possible values for this parameter include integer value of one of the following - health states. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type replicas_health_state_filter: int - :param exclude_health_statistics: Indicates whether the health statistics should be returned as - part of the query result. False by default. - The statistics show the number of children entities in health state Ok, Warning, and Error. - Default value is False. - :type exclude_health_statistics: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param application_health_policy: Describes the health policies used to evaluate the health of - an application or one of its children. - If not present, the health evaluation uses the health policy from application manifest or the - default health policy. Default value is None. - :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartitionHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PartitionHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if application_health_policy is not None: - _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - _json = None - - request = build_get_partition_health_using_policy_request( - partition_id=partition_id, - api_version=api_version, - content_type=content_type, - json=_json, - events_health_state_filter=events_health_state_filter, - replicas_health_state_filter=replicas_health_state_filter, - exclude_health_statistics=exclude_health_statistics, - timeout=timeout, - template_url=self.get_partition_health_using_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartitionHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_health_using_policy.metadata = {'url': "/Partitions/{partitionId}/$/GetHealth"} # type: ignore - - - @distributed_trace - def report_partition_health( # pylint: disable=inconsistent-return-statements - self, - partition_id, # type: str - health_information, # type: "_models.HealthInformation" - immediate=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Sends a health report on the Service Fabric partition. - - Reports health state of the specified Service Fabric partition. The report must contain the - information about the source of the health report and property on which it is reported. - The report is sent to a Service Fabric gateway Partition, which forwards to the health store. - The report may be accepted by the gateway, but rejected by the health store after extra - validation. - For example, the health store may reject the report because of an invalid parameter, like a - stale sequence number. - To see whether the report was applied in the health store, run GetPartitionHealth and check - that the report appears in the HealthEvents section. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param health_information: Describes the health information for the health report. This - information needs to be present in all of the health reports sent to the health manager. - :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be sent immediately. - A health report is sent to a Service Fabric gateway Application, which forwards to the health - store. - If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health - store, regardless of the fabric client settings that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as possible. - Depending on timing and other conditions, sending the report may still fail, for example if - the HTTP Gateway is closed or the message doesn't reach the Gateway. - If Immediate is set to false, the report is sent based on the health client settings from the - HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval - configuration. - This is the recommended setting because it allows the health client to optimize health - reporting messages to health store as well as health report processing. - By default, reports are not sent immediately. Default value is False. - :type immediate: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(health_information, 'HealthInformation') - - request = build_report_partition_health_request( - partition_id=partition_id, - api_version=api_version, - content_type=content_type, - json=_json, - immediate=immediate, - timeout=timeout, - template_url=self.report_partition_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - report_partition_health.metadata = {'url': "/Partitions/{partitionId}/$/ReportHealth"} # type: ignore - - - @distributed_trace - def get_partition_load_information( - self, - partition_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PartitionLoadInformation" - """Gets the load information of the specified Service Fabric partition. - - Returns information about the load of a specified partition. - The response includes a list of load reports for a Service Fabric partition. - Each report includes the load metric name, value, and last reported time in UTC. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartitionLoadInformation, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PartitionLoadInformation - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionLoadInformation"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_load_information_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_partition_load_information.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartitionLoadInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_load_information.metadata = {'url': "/Partitions/{partitionId}/$/GetLoadInformation"} # type: ignore - - - @distributed_trace - def reset_partition_load( # pylint: disable=inconsistent-return-statements - self, - partition_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Resets the current load of a Service Fabric partition. - - Resets the current load of a Service Fabric partition to the default load for the service. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_reset_partition_load_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.reset_partition_load.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - reset_partition_load.metadata = {'url': "/Partitions/{partitionId}/$/ResetLoad"} # type: ignore - - - @distributed_trace - def recover_partition( # pylint: disable=inconsistent-return-statements - self, - partition_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Indicates to the Service Fabric cluster that it should attempt to recover a specific partition - that is currently stuck in quorum loss. - - This operation should only be performed if it is known that the replicas that are down cannot - be recovered. Incorrect use of this API can cause potential data loss. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_recover_partition_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.recover_partition.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - recover_partition.metadata = {'url': "/Partitions/{partitionId}/$/Recover"} # type: ignore - - - @distributed_trace - def recover_service_partitions( # pylint: disable=inconsistent-return-statements - self, - service_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Indicates to the Service Fabric cluster that it should attempt to recover the specified service - that is currently stuck in quorum loss. - - Indicates to the Service Fabric cluster that it should attempt to recover the specified service - that is currently stuck in quorum loss. This operation should only be performed if it is known - that the replicas that are down cannot be recovered. Incorrect use of this API can cause - potential data loss. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_recover_service_partitions_request( - service_id=service_id, - api_version=api_version, - timeout=timeout, - template_url=self.recover_service_partitions.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - recover_service_partitions.metadata = {'url': "/Services/$/{serviceId}/$/GetPartitions/$/Recover"} # type: ignore - - - @distributed_trace - def recover_system_partitions( # pylint: disable=inconsistent-return-statements - self, - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Indicates to the Service Fabric cluster that it should attempt to recover the system services - that are currently stuck in quorum loss. - - Indicates to the Service Fabric cluster that it should attempt to recover the system services - that are currently stuck in quorum loss. This operation should only be performed if it is known - that the replicas that are down cannot be recovered. Incorrect use of this API can cause - potential data loss. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_recover_system_partitions_request( - api_version=api_version, - timeout=timeout, - template_url=self.recover_system_partitions.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - recover_system_partitions.metadata = {'url': "/$/RecoverSystemPartitions"} # type: ignore - - - @distributed_trace - def recover_all_partitions( # pylint: disable=inconsistent-return-statements - self, - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Indicates to the Service Fabric cluster that it should attempt to recover any services - (including system services) which are currently stuck in quorum loss. - - This operation should only be performed if it is known that the replicas that are down cannot - be recovered. Incorrect use of this API can cause potential data loss. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_recover_all_partitions_request( - api_version=api_version, - timeout=timeout, - template_url=self.recover_all_partitions.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - recover_all_partitions.metadata = {'url': "/$/RecoverAllPartitions"} # type: ignore - - - @distributed_trace - def move_primary_replica( # pylint: disable=inconsistent-return-statements - self, - partition_id, # type: str - node_name=None, # type: Optional[str] - ignore_constraints=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Moves the primary replica of a partition of a stateful service. - - This command moves the primary replica of a partition of a stateful service, respecting all - constraints. - If NodeName parameter is specified, primary will be moved to the specified node (if constraints - allow it). - If NodeName parameter is not specified, primary replica will be moved to a random node in the - cluster. - If IgnoreConstraints parameter is specified and set to true, then primary will be moved - regardless of the constraints. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param node_name: The name of the node. Default value is None. - :type node_name: str - :param ignore_constraints: Ignore constraints when moving a replica or instance. If this - parameter is not specified, all constraints are honored. Default value is False. - :type ignore_constraints: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_move_primary_replica_request( - partition_id=partition_id, - api_version=api_version, - node_name=node_name, - ignore_constraints=ignore_constraints, - timeout=timeout, - template_url=self.move_primary_replica.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - move_primary_replica.metadata = {'url': "/Partitions/{partitionId}/$/MovePrimaryReplica"} # type: ignore - - - @distributed_trace - def move_secondary_replica( # pylint: disable=inconsistent-return-statements - self, - partition_id, # type: str - current_node_name, # type: str - new_node_name=None, # type: Optional[str] - ignore_constraints=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Moves the secondary replica of a partition of a stateful service. - - This command moves the secondary replica of a partition of a stateful service, respecting all - constraints. - CurrentNodeName parameter must be specified to identify the replica that is moved. - Source node name must be specified, but new node name can be omitted, and in that case replica - is moved to a random node. - If IgnoreConstraints parameter is specified and set to true, then secondary will be moved - regardless of the constraints. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param current_node_name: The name of the source node for secondary replica move. - :type current_node_name: str - :param new_node_name: The name of the target node for secondary replica or instance move. If - not specified, replica or instance is moved to a random node. Default value is None. - :type new_node_name: str - :param ignore_constraints: Ignore constraints when moving a replica or instance. If this - parameter is not specified, all constraints are honored. Default value is False. - :type ignore_constraints: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_move_secondary_replica_request( - partition_id=partition_id, - api_version=api_version, - current_node_name=current_node_name, - new_node_name=new_node_name, - ignore_constraints=ignore_constraints, - timeout=timeout, - template_url=self.move_secondary_replica.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - move_secondary_replica.metadata = {'url': "/Partitions/{partitionId}/$/MoveSecondaryReplica"} # type: ignore - - - @distributed_trace - def update_partition_load( - self, - partition_metric_load_description_list, # type: List["_models.PartitionMetricLoadDescription"] - continuation_token_parameter=None, # type: Optional[str] - max_results=0, # type: Optional[int] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedUpdatePartitionLoadResultList" - """Update the loads of provided partitions for specific metrics. - - Updates the load value and predicted load value for all the partitions provided for specified - metrics. - - :param partition_metric_load_description_list: Description of updating load for list of - partitions. - :type partition_metric_load_description_list: - list[~azure.servicefabric.models.PartitionMetricLoadDescription] - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedUpdatePartitionLoadResultList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedUpdatePartitionLoadResultList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedUpdatePartitionLoadResultList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(partition_metric_load_description_list, '[PartitionMetricLoadDescription]') - - request = build_update_partition_load_request( - api_version=api_version, - content_type=content_type, - json=_json, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.update_partition_load.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedUpdatePartitionLoadResultList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - update_partition_load.metadata = {'url': "/$/UpdatePartitionLoad"} # type: ignore - - - @distributed_trace - def move_instance( # pylint: disable=inconsistent-return-statements - self, - service_id, # type: str - partition_id, # type: str - current_node_name=None, # type: Optional[str] - new_node_name=None, # type: Optional[str] - ignore_constraints=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Moves the instance of a partition of a stateless service. - - This command moves the instance of a partition of a stateless service, respecting all - constraints. - Partition id and service name must be specified to be able to move the instance. - CurrentNodeName when specified identifies the instance that is moved. If not specified, random - instance will be moved - New node name can be omitted, and in that case instance is moved to a random node. - If IgnoreConstraints parameter is specified and set to true, then instance will be moved - regardless of the constraints. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param current_node_name: The name of the source node for instance move. If not specified, - instance is moved from a random node. Default value is None. - :type current_node_name: str - :param new_node_name: The name of the target node for secondary replica or instance move. If - not specified, replica or instance is moved to a random node. Default value is None. - :type new_node_name: str - :param ignore_constraints: Ignore constraints when moving a replica or instance. If this - parameter is not specified, all constraints are honored. Default value is False. - :type ignore_constraints: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_move_instance_request( - service_id=service_id, - partition_id=partition_id, - api_version=api_version, - current_node_name=current_node_name, - new_node_name=new_node_name, - ignore_constraints=ignore_constraints, - timeout=timeout, - template_url=self.move_instance.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - move_instance.metadata = {'url': "/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveInstance"} # type: ignore - - - @distributed_trace - def move_auxiliary_replica( # pylint: disable=inconsistent-return-statements - self, - service_id, # type: str - partition_id, # type: str - current_node_name=None, # type: Optional[str] - new_node_name=None, # type: Optional[str] - ignore_constraints=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Moves the auxiliary replica of a partition of a stateful service. - - This command moves the auxiliary replica of a partition of a stateful service, respecting all - constraints. - CurrentNodeName can be omitted, and in that case a random auxiliary replica is chosen. - NewNodeName can be omitted, and in that case the auxiliary replica is moved to a random node. - If IgnoreConstraints parameter is specified and set to true, then auxiliary will be moved - regardless of the constraints. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param current_node_name: The name of the source node for instance move. If not specified, - instance is moved from a random node. Default value is None. - :type current_node_name: str - :param new_node_name: The name of the target node for secondary replica or instance move. If - not specified, replica or instance is moved to a random node. Default value is None. - :type new_node_name: str - :param ignore_constraints: Ignore constraints when moving a replica or instance. If this - parameter is not specified, all constraints are honored. Default value is False. - :type ignore_constraints: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_move_auxiliary_replica_request( - service_id=service_id, - partition_id=partition_id, - api_version=api_version, - current_node_name=current_node_name, - new_node_name=new_node_name, - ignore_constraints=ignore_constraints, - timeout=timeout, - template_url=self.move_auxiliary_replica.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - move_auxiliary_replica.metadata = {'url': "/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveAuxiliaryReplica"} # type: ignore - - - @distributed_trace - def create_repair_task( - self, - repair_task, # type: "_models.RepairTask" - **kwargs # type: Any - ): - # type: (...) -> "_models.RepairTaskUpdateInfo" - """Creates a new repair task. - - For clusters that have the Repair Manager Service configured, - this API provides a way to create repair tasks that run automatically or manually. - For repair tasks that run automatically, an appropriate repair executor - must be running for each repair action to run automatically. - These are currently only available in specially-configured Azure Cloud Services. - - To create a manual repair task, provide the set of impacted node names and the - expected impact. When the state of the created repair task changes to approved, - you can safely perform repair actions on those nodes. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param repair_task: Describes the repair task to be created or updated. - :type repair_task: ~azure.servicefabric.models.RepairTask - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepairTaskUpdateInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(repair_task, 'RepairTask') - - request = build_create_repair_task_request( - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.create_repair_task.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_repair_task.metadata = {'url': "/$/CreateRepairTask"} # type: ignore - - - @distributed_trace - def cancel_repair_task( - self, - repair_task_cancel_description, # type: "_models.RepairTaskCancelDescription" - **kwargs # type: Any - ): - # type: (...) -> "_models.RepairTaskUpdateInfo" - """Requests the cancellation of the given repair task. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param repair_task_cancel_description: Describes the repair task to be cancelled. - :type repair_task_cancel_description: ~azure.servicefabric.models.RepairTaskCancelDescription - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepairTaskUpdateInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(repair_task_cancel_description, 'RepairTaskCancelDescription') - - request = build_cancel_repair_task_request( - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.cancel_repair_task.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - cancel_repair_task.metadata = {'url': "/$/CancelRepairTask"} # type: ignore - - - @distributed_trace - def delete_repair_task( # pylint: disable=inconsistent-return-statements - self, - task_id, # type: str - version=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes a completed repair task. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param task_id: The ID of the completed repair task to be deleted. - :type task_id: str - :param version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current version of the repair task. If zero, - then no version check is performed. Default value is None. - :type version: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _repair_task_delete_description = _models.RepairTaskDeleteDescription(task_id=task_id, version=version) - _json = self._serialize.body(_repair_task_delete_description, 'RepairTaskDeleteDescription') - - request = build_delete_repair_task_request( - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.delete_repair_task.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete_repair_task.metadata = {'url': "/$/DeleteRepairTask"} # type: ignore - - - @distributed_trace - def get_repair_task_list( - self, - task_id_filter=None, # type: Optional[str] - state_filter=None, # type: Optional[int] - executor_filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> List["_models.RepairTask"] - """Gets a list of repair tasks matching the given filters. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param task_id_filter: The repair task ID prefix to be matched. Default value is None. - :type task_id_filter: str - :param state_filter: A bitwise-OR of the following values, specifying which task states should - be included in the result list. - - - * 1 - Created - * 2 - Claimed - * 4 - Preparing - * 8 - Approved - * 16 - Executing - * 32 - Restoring - * 64 - Completed. Default value is None. - :type state_filter: int - :param executor_filter: The name of the repair executor whose claimed tasks should be included - in the list. Default value is None. - :type executor_filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of RepairTask, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.RepairTask] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.RepairTask"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_repair_task_list_request( - api_version=api_version, - task_id_filter=task_id_filter, - state_filter=state_filter, - executor_filter=executor_filter, - template_url=self.get_repair_task_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[RepairTask]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_repair_task_list.metadata = {'url': "/$/GetRepairTaskList"} # type: ignore - - - @distributed_trace - def force_approve_repair_task( - self, - task_id, # type: str - version=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.RepairTaskUpdateInfo" - """Forces the approval of the given repair task. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param task_id: The ID of the repair task. - :type task_id: str - :param version: The current version number of the repair task. If non-zero, then the request - will only succeed if this value matches the actual current version of the repair task. If zero, - then no version check is performed. Default value is None. - :type version: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepairTaskUpdateInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _repair_task_approve_description = _models.RepairTaskApproveDescription(task_id=task_id, version=version) - _json = self._serialize.body(_repair_task_approve_description, 'RepairTaskApproveDescription') - - request = build_force_approve_repair_task_request( - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.force_approve_repair_task.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - force_approve_repair_task.metadata = {'url': "/$/ForceApproveRepairTask"} # type: ignore - - - @distributed_trace - def update_repair_task_health_policy( - self, - repair_task_update_health_policy_description, # type: "_models.RepairTaskUpdateHealthPolicyDescription" - **kwargs # type: Any - ): - # type: (...) -> "_models.RepairTaskUpdateInfo" - """Updates the health policy of the given repair task. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param repair_task_update_health_policy_description: Describes the repair task healthy policy - to be updated. - :type repair_task_update_health_policy_description: - ~azure.servicefabric.models.RepairTaskUpdateHealthPolicyDescription - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepairTaskUpdateInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(repair_task_update_health_policy_description, 'RepairTaskUpdateHealthPolicyDescription') - - request = build_update_repair_task_health_policy_request( - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.update_repair_task_health_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - update_repair_task_health_policy.metadata = {'url': "/$/UpdateRepairTaskHealthPolicy"} # type: ignore - - - @distributed_trace - def update_repair_execution_state( - self, - repair_task, # type: "_models.RepairTask" - **kwargs # type: Any - ): - # type: (...) -> "_models.RepairTaskUpdateInfo" - """Updates the execution state of a repair task. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param repair_task: Describes the repair task to be created or updated. - :type repair_task: ~azure.servicefabric.models.RepairTask - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepairTaskUpdateInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.RepairTaskUpdateInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepairTaskUpdateInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(repair_task, 'RepairTask') - - request = build_update_repair_execution_state_request( - api_version=api_version, - content_type=content_type, - json=_json, - template_url=self.update_repair_execution_state.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RepairTaskUpdateInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - update_repair_execution_state.metadata = {'url': "/$/UpdateRepairExecutionState"} # type: ignore - - - @distributed_trace - def get_replica_info_list( - self, - partition_id, # type: str - continuation_token_parameter=None, # type: Optional[str] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedReplicaInfoList" - """Gets the information about replicas of a Service Fabric service partition. - - The GetReplicas endpoint returns information about the replicas of the specified partition. The - response includes the ID, role, status, health, node name, uptime, and other details about the - replica. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedReplicaInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedReplicaInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedReplicaInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_replica_info_list_request( - partition_id=partition_id, - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - timeout=timeout, - template_url=self.get_replica_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedReplicaInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_replica_info_list.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas"} # type: ignore - - - @distributed_trace - def get_replica_info( - self, - partition_id, # type: str - replica_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.ReplicaInfo"] - """Gets the information about a replica of a Service Fabric partition. - - The response includes the ID, role, status, health, node name, uptime, and other details about - the replica. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ReplicaInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ReplicaInfo or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ReplicaInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_replica_info_request( - partition_id=partition_id, - replica_id=replica_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_replica_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ReplicaInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_replica_info.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas/{replicaId}"} # type: ignore - - - @distributed_trace - def get_replica_health( - self, - partition_id, # type: str - replica_id, # type: str - events_health_state_filter=0, # type: Optional[int] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ReplicaHealth" - """Gets the health of a Service Fabric stateful service replica or stateless service instance. - - Gets the health of a Service Fabric replica. - Use EventsHealthStateFilter to filter the collection of health events reported on the replica - based on the health state. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ReplicaHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ReplicaHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicaHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_replica_health_request( - partition_id=partition_id, - replica_id=replica_id, - api_version=api_version, - events_health_state_filter=events_health_state_filter, - timeout=timeout, - template_url=self.get_replica_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ReplicaHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_replica_health.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth"} # type: ignore - - - @distributed_trace - def get_replica_health_using_policy( - self, - partition_id, # type: str - replica_id, # type: str - events_health_state_filter=0, # type: Optional[int] - timeout=60, # type: Optional[int] - application_health_policy=None, # type: Optional["_models.ApplicationHealthPolicy"] - **kwargs # type: Any - ): - # type: (...) -> "_models.ReplicaHealth" - """Gets the health of a Service Fabric stateful service replica or stateless service instance - using the specified policy. - - Gets the health of a Service Fabric stateful service replica or stateless service instance. - Use EventsHealthStateFilter to filter the collection of health events reported on the cluster - based on the health state. - Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the - health. This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The - rest of the fields are ignored while evaluating the health of the replica. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param application_health_policy: Describes the health policies used to evaluate the health of - an application or one of its children. - If not present, the health evaluation uses the health policy from application manifest or the - default health policy. Default value is None. - :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ReplicaHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ReplicaHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicaHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if application_health_policy is not None: - _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - _json = None - - request = build_get_replica_health_using_policy_request( - partition_id=partition_id, - replica_id=replica_id, - api_version=api_version, - content_type=content_type, - json=_json, - events_health_state_filter=events_health_state_filter, - timeout=timeout, - template_url=self.get_replica_health_using_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ReplicaHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_replica_health_using_policy.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth"} # type: ignore - - - @distributed_trace - def report_replica_health( # pylint: disable=inconsistent-return-statements - self, - partition_id, # type: str - replica_id, # type: str - health_information, # type: "_models.HealthInformation" - service_kind="Stateful", # type: Union[str, "_models.ReplicaHealthReportServiceKind"] - immediate=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Sends a health report on the Service Fabric replica. - - Reports health state of the specified Service Fabric replica. The report must contain the - information about the source of the health report and property on which it is reported. - The report is sent to a Service Fabric gateway Replica, which forwards to the health store. - The report may be accepted by the gateway, but rejected by the health store after extra - validation. - For example, the health store may reject the report because of an invalid parameter, like a - stale sequence number. - To see whether the report was applied in the health store, run GetReplicaHealth and check that - the report appears in the HealthEvents section. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param health_information: Describes the health information for the health report. This - information needs to be present in all of the health reports sent to the health manager. - :type health_information: ~azure.servicefabric.models.HealthInformation - :param service_kind: The kind of service replica (Stateless or Stateful) for which the health - is being reported. Following are the possible values. Default value is "Stateful". - :type service_kind: str or ~azure.servicefabric.models.ReplicaHealthReportServiceKind - :param immediate: A flag that indicates whether the report should be sent immediately. - A health report is sent to a Service Fabric gateway Application, which forwards to the health - store. - If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health - store, regardless of the fabric client settings that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as possible. - Depending on timing and other conditions, sending the report may still fail, for example if - the HTTP Gateway is closed or the message doesn't reach the Gateway. - If Immediate is set to false, the report is sent based on the health client settings from the - HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval - configuration. - This is the recommended setting because it allows the health client to optimize health - reporting messages to health store as well as health report processing. - By default, reports are not sent immediately. Default value is False. - :type immediate: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(health_information, 'HealthInformation') - - request = build_report_replica_health_request( - partition_id=partition_id, - replica_id=replica_id, - api_version=api_version, - content_type=content_type, - json=_json, - service_kind=service_kind, - immediate=immediate, - timeout=timeout, - template_url=self.report_replica_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - report_replica_health.metadata = {'url': "/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/ReportHealth"} # type: ignore - - - @distributed_trace - def get_deployed_service_replica_info_list( - self, - node_name, # type: str - application_id, # type: str - partition_id=None, # type: Optional[str] - service_manifest_name=None, # type: Optional[str] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Optional[List["_models.DeployedServiceReplicaInfo"]] - """Gets the list of replicas deployed on a Service Fabric node. - - Gets the list containing the information about replicas deployed on a Service Fabric node. The - information include partition ID, replica ID, status of the replica, name of the service, name - of the service type, and other information. Use PartitionId or ServiceManifestName query - parameters to return information about the deployed replicas matching the specified values for - those parameters. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param partition_id: The identity of the partition. Default value is None. - :type partition_id: str - :param service_manifest_name: The name of a service manifest registered as part of an - application type in a Service Fabric cluster. Default value is None. - :type service_manifest_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of DeployedServiceReplicaInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.DeployedServiceReplicaInfo] or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[List["_models.DeployedServiceReplicaInfo"]]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_service_replica_info_list_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - partition_id=partition_id, - service_manifest_name=service_manifest_name, - timeout=timeout, - template_url=self.get_deployed_service_replica_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[DeployedServiceReplicaInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_replica_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetReplicas"} # type: ignore - - - @distributed_trace - def get_deployed_service_replica_detail_info( - self, - node_name, # type: str - partition_id, # type: str - replica_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.DeployedServiceReplicaDetailInfo" - """Gets the details of replica deployed on a Service Fabric node. - - Gets the details of the replica deployed on a Service Fabric node. The information includes - service kind, service name, current service operation, current service operation start date - time, partition ID, replica/instance ID, reported load, and other information. - - :param node_name: The name of the node. - :type node_name: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeployedServiceReplicaDetailInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.DeployedServiceReplicaDetailInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedServiceReplicaDetailInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_service_replica_detail_info_request( - node_name=node_name, - partition_id=partition_id, - replica_id=replica_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_deployed_service_replica_detail_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('DeployedServiceReplicaDetailInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_replica_detail_info.metadata = {'url': "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetDetail"} # type: ignore - - - @distributed_trace - def get_deployed_service_replica_detail_info_by_partition_id( - self, - node_name, # type: str - partition_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.DeployedServiceReplicaDetailInfo" - """Gets the details of replica deployed on a Service Fabric node. - - Gets the details of the replica deployed on a Service Fabric node. The information includes - service kind, service name, current service operation, current service operation start date - time, partition ID, replica/instance ID, reported load, and other information. - - :param node_name: The name of the node. - :type node_name: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeployedServiceReplicaDetailInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.DeployedServiceReplicaDetailInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedServiceReplicaDetailInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_service_replica_detail_info_by_partition_id_request( - node_name=node_name, - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_deployed_service_replica_detail_info_by_partition_id.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('DeployedServiceReplicaDetailInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_replica_detail_info_by_partition_id.metadata = {'url': "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas"} # type: ignore - - - @distributed_trace - def restart_replica( # pylint: disable=inconsistent-return-statements - self, - node_name, # type: str - partition_id, # type: str - replica_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Restarts a service replica of a persisted service running on a node. - - Restarts a service replica of a persisted service running on a node. Warning - There are no - safety checks performed when this API is used. Incorrect use of this API can lead to - availability loss for stateful services. - - :param node_name: The name of the node. - :type node_name: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_restart_replica_request( - node_name=node_name, - partition_id=partition_id, - replica_id=replica_id, - api_version=api_version, - timeout=timeout, - template_url=self.restart_replica.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - restart_replica.metadata = {'url': "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Restart"} # type: ignore - - - @distributed_trace - def remove_replica( # pylint: disable=inconsistent-return-statements - self, - node_name, # type: str - partition_id, # type: str - replica_id, # type: str - force_remove=None, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Removes a service replica running on a node. - - This API simulates a Service Fabric replica failure by removing a replica from a Service Fabric - cluster. The removal closes the replica, transitions the replica to the role None, and then - removes all of the state information of the replica from the cluster. This API tests the - replica state removal path, and simulates the report fault permanent path through client APIs. - Warning - There are no safety checks performed when this API is used. Incorrect use of this API - can lead to data loss for stateful services. In addition, the forceRemove flag impacts all - other replicas hosted in the same process. - - :param node_name: The name of the node. - :type node_name: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param force_remove: Remove a Service Fabric application or service forcefully without going - through the graceful shutdown sequence. This parameter can be used to forcefully delete an - application or service for which delete is timing out due to issues in the service code that - prevents graceful close of replicas. Default value is None. - :type force_remove: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_remove_replica_request( - node_name=node_name, - partition_id=partition_id, - replica_id=replica_id, - api_version=api_version, - force_remove=force_remove, - timeout=timeout, - template_url=self.remove_replica.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - remove_replica.metadata = {'url': "/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Delete"} # type: ignore - - - @distributed_trace - def get_deployed_service_package_info_list( - self, - node_name, # type: str - application_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> List["_models.DeployedServicePackageInfo"] - """Gets the list of service packages deployed on a Service Fabric node. - - Returns the information about the service packages deployed on a Service Fabric node for the - given application. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of DeployedServicePackageInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.DeployedServicePackageInfo] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.DeployedServicePackageInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_service_package_info_list_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_deployed_service_package_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[DeployedServicePackageInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_package_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages"} # type: ignore - - - @distributed_trace - def get_deployed_service_package_info_list_by_name( - self, - node_name, # type: str - application_id, # type: str - service_package_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Optional[List["_models.DeployedServicePackageInfo"]] - """Gets the list of service packages deployed on a Service Fabric node matching exactly the - specified name. - - Returns the information about the service packages deployed on a Service Fabric node for the - given application. These results are of service packages whose name match exactly the service - package name specified as the parameter. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_package_name: The name of the service package. - :type service_package_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of DeployedServicePackageInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.DeployedServicePackageInfo] or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional[List["_models.DeployedServicePackageInfo"]]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_service_package_info_list_by_name_request( - node_name=node_name, - application_id=application_id, - service_package_name=service_package_name, - api_version=api_version, - timeout=timeout, - template_url=self.get_deployed_service_package_info_list_by_name.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[DeployedServicePackageInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_package_info_list_by_name.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}"} # type: ignore - - - @distributed_trace - def get_deployed_service_package_health( - self, - node_name, # type: str - application_id, # type: str - service_package_name, # type: str - events_health_state_filter=0, # type: Optional[int] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.DeployedServicePackageHealth" - """Gets the information about health of a service package for a specific application deployed for - a Service Fabric node and application. - - Gets the information about health of a service package for a specific application deployed on a - Service Fabric node. Use EventsHealthStateFilter to optionally filter for the collection of - HealthEvent objects reported on the deployed service package based on health state. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_package_name: The name of the service package. - :type service_package_name: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeployedServicePackageHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.DeployedServicePackageHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedServicePackageHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_service_package_health_request( - node_name=node_name, - application_id=application_id, - service_package_name=service_package_name, - api_version=api_version, - events_health_state_filter=events_health_state_filter, - timeout=timeout, - template_url=self.get_deployed_service_package_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('DeployedServicePackageHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_package_health.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth"} # type: ignore - - - @distributed_trace - def get_deployed_service_package_health_using_policy( - self, - node_name, # type: str - application_id, # type: str - service_package_name, # type: str - events_health_state_filter=0, # type: Optional[int] - timeout=60, # type: Optional[int] - application_health_policy=None, # type: Optional["_models.ApplicationHealthPolicy"] - **kwargs # type: Any - ): - # type: (...) -> "_models.DeployedServicePackageHealth" - """Gets the information about health of service package for a specific application deployed on a - Service Fabric node using the specified policy. - - Gets the information about health of a service package for a specific application deployed on a - Service Fabric node. using the specified policy. Use EventsHealthStateFilter to optionally - filter for the collection of HealthEvent objects reported on the deployed service package based - on health state. Use ApplicationHealthPolicy to optionally override the health policies used to - evaluate the health. This API only uses 'ConsiderWarningAsError' field of the - ApplicationHealthPolicy. The rest of the fields are ignored while evaluating the health of the - deployed service package. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_package_name: The name of the service package. - :type service_package_name: str - :param events_health_state_filter: Allows filtering the collection of HealthEvent objects - returned based on health state. - The possible values for this parameter include integer value of one of the following health - states. - Only events that match the filter are returned. All events are used to evaluate the aggregated - health state. - If not specified, all entries are returned. The state values are flag-based enumeration, so - the value could be a combination of these values, obtained using the bitwise 'OR' operator. For - example, If the provided value is 6 then all of the events with HealthState value of OK (2) and - Warning (4) are returned. - - - * Default - Default value. Matches any HealthState. The value is zero. - * None - Filter that doesn't match any HealthState value. Used in order to return no results - on a given collection of states. The value is 1. - * Ok - Filter that matches input with HealthState value Ok. The value is 2. - * Warning - Filter that matches input with HealthState value Warning. The value is 4. - * Error - Filter that matches input with HealthState value Error. The value is 8. - * All - Filter that matches input with any HealthState value. The value is 65535. Default - value is 0. - :type events_health_state_filter: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param application_health_policy: Describes the health policies used to evaluate the health of - an application or one of its children. - If not present, the health evaluation uses the health policy from application manifest or the - default health policy. Default value is None. - :type application_health_policy: ~azure.servicefabric.models.ApplicationHealthPolicy - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeployedServicePackageHealth, or the result of cls(response) - :rtype: ~azure.servicefabric.models.DeployedServicePackageHealth - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeployedServicePackageHealth"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - if application_health_policy is not None: - _json = self._serialize.body(application_health_policy, 'ApplicationHealthPolicy') - else: - _json = None - - request = build_get_deployed_service_package_health_using_policy_request( - node_name=node_name, - application_id=application_id, - service_package_name=service_package_name, - api_version=api_version, - content_type=content_type, - json=_json, - events_health_state_filter=events_health_state_filter, - timeout=timeout, - template_url=self.get_deployed_service_package_health_using_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('DeployedServicePackageHealth', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_service_package_health_using_policy.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth"} # type: ignore - - - @distributed_trace - def report_deployed_service_package_health( # pylint: disable=inconsistent-return-statements - self, - node_name, # type: str - application_id, # type: str - service_package_name, # type: str - health_information, # type: "_models.HealthInformation" - immediate=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Sends a health report on the Service Fabric deployed service package. - - Reports health state of the service package of the application deployed on a Service Fabric - node. The report must contain the information about the source of the health report and - property on which it is reported. - The report is sent to a Service Fabric gateway Service, which forwards to the health store. - The report may be accepted by the gateway, but rejected by the health store after extra - validation. - For example, the health store may reject the report because of an invalid parameter, like a - stale sequence number. - To see whether the report was applied in the health store, get deployed service package health - and check that the report appears in the HealthEvents section. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_package_name: The name of the service package. - :type service_package_name: str - :param health_information: Describes the health information for the health report. This - information needs to be present in all of the health reports sent to the health manager. - :type health_information: ~azure.servicefabric.models.HealthInformation - :param immediate: A flag that indicates whether the report should be sent immediately. - A health report is sent to a Service Fabric gateway Application, which forwards to the health - store. - If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health - store, regardless of the fabric client settings that the HTTP Gateway Application is using. - This is useful for critical reports that should be sent as soon as possible. - Depending on timing and other conditions, sending the report may still fail, for example if - the HTTP Gateway is closed or the message doesn't reach the Gateway. - If Immediate is set to false, the report is sent based on the health client settings from the - HTTP Gateway. Therefore, it will be batched according to the HealthReportSendInterval - configuration. - This is the recommended setting because it allows the health client to optimize health - reporting messages to health store as well as health report processing. - By default, reports are not sent immediately. Default value is False. - :type immediate: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(health_information, 'HealthInformation') - - request = build_report_deployed_service_package_health_request( - node_name=node_name, - application_id=application_id, - service_package_name=service_package_name, - api_version=api_version, - content_type=content_type, - json=_json, - immediate=immediate, - timeout=timeout, - template_url=self.report_deployed_service_package_health.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - report_deployed_service_package_health.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/ReportHealth"} # type: ignore - - - @distributed_trace - def deploy_service_package_to_node( # pylint: disable=inconsistent-return-statements - self, - node_name, # type: str - deploy_service_package_to_node_description, # type: "_models.DeployServicePackageToNodeDescription" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Downloads all of the code packages associated with specified service manifest on the specified - node. - - This API provides a way to download code packages including the container images on a specific - node outside of the normal application deployment and upgrade path. This is useful for the - large code packages and container images to be present on the node before the actual - application deployment and upgrade, thus significantly reducing the total time required for the - deployment or upgrade. - - :param node_name: The name of the node. - :type node_name: str - :param deploy_service_package_to_node_description: Describes information for deploying a - service package to a Service Fabric node. - :type deploy_service_package_to_node_description: - ~azure.servicefabric.models.DeployServicePackageToNodeDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(deploy_service_package_to_node_description, 'DeployServicePackageToNodeDescription') - - request = build_deploy_service_package_to_node_request( - node_name=node_name, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.deploy_service_package_to_node.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - deploy_service_package_to_node.metadata = {'url': "/Nodes/{nodeName}/$/DeployServicePackage"} # type: ignore - - - @distributed_trace - def get_deployed_code_package_info_list( - self, - node_name, # type: str - application_id, # type: str - service_manifest_name=None, # type: Optional[str] - code_package_name=None, # type: Optional[str] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> List["_models.DeployedCodePackageInfo"] - """Gets the list of code packages deployed on a Service Fabric node. - - Gets the list of code packages deployed on a Service Fabric node for the given application. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_manifest_name: The name of a service manifest registered as part of an - application type in a Service Fabric cluster. Default value is None. - :type service_manifest_name: str - :param code_package_name: The name of code package specified in service manifest registered as - part of an application type in a Service Fabric cluster. Default value is None. - :type code_package_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of DeployedCodePackageInfo, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.DeployedCodePackageInfo] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.DeployedCodePackageInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_deployed_code_package_info_list_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - service_manifest_name=service_manifest_name, - code_package_name=code_package_name, - timeout=timeout, - template_url=self.get_deployed_code_package_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[DeployedCodePackageInfo]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_deployed_code_package_info_list.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages"} # type: ignore - - - @distributed_trace - def restart_deployed_code_package( # pylint: disable=inconsistent-return-statements - self, - node_name, # type: str - application_id, # type: str - restart_deployed_code_package_description, # type: "_models.RestartDeployedCodePackageDescription" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Restarts a code package deployed on a Service Fabric node in a cluster. - - Restarts a code package deployed on a Service Fabric node in a cluster. This aborts the code - package process, which will restart all the user service replicas hosted in that process. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param restart_deployed_code_package_description: Describes the deployed code package on - Service Fabric node to restart. - :type restart_deployed_code_package_description: - ~azure.servicefabric.models.RestartDeployedCodePackageDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(restart_deployed_code_package_description, 'RestartDeployedCodePackageDescription') - - request = build_restart_deployed_code_package_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.restart_deployed_code_package.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - restart_deployed_code_package.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/Restart"} # type: ignore - - - @distributed_trace - def get_container_logs_deployed_on_node( - self, - node_name, # type: str - application_id, # type: str - service_manifest_name, # type: str - code_package_name, # type: str - tail=None, # type: Optional[str] - previous=False, # type: Optional[bool] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ContainerLogs" - """Gets the container logs for container deployed on a Service Fabric node. - - Gets the container logs for container deployed on a Service Fabric node for the given code - package. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_manifest_name: The name of a service manifest registered as part of an - application type in a Service Fabric cluster. - :type service_manifest_name: str - :param code_package_name: The name of code package specified in service manifest registered as - part of an application type in a Service Fabric cluster. - :type code_package_name: str - :param tail: Number of lines to show from the end of the logs. Default is 100. 'all' to show - the complete logs. - :type tail: str - :param previous: Specifies whether to get container logs from exited/dead containers of the - code package instance. Default value is False. - :type previous: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ContainerLogs, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ContainerLogs - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerLogs"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_container_logs_deployed_on_node_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - service_manifest_name=service_manifest_name, - code_package_name=code_package_name, - tail=tail, - previous=previous, - timeout=timeout, - template_url=self.get_container_logs_deployed_on_node.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ContainerLogs', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_container_logs_deployed_on_node.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerLogs"} # type: ignore - - - @distributed_trace - def invoke_container_api( - self, - node_name, # type: str - application_id, # type: str - service_manifest_name, # type: str - code_package_name, # type: str - code_package_instance_id, # type: str - container_api_request_body, # type: "_models.ContainerApiRequestBody" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ContainerApiResponse" - """Invoke container API on a container deployed on a Service Fabric node. - - Invoke container API on a container deployed on a Service Fabric node for the given code - package. - - :param node_name: The name of the node. - :type node_name: str - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param service_manifest_name: The name of a service manifest registered as part of an - application type in a Service Fabric cluster. - :type service_manifest_name: str - :param code_package_name: The name of code package specified in service manifest registered as - part of an application type in a Service Fabric cluster. - :type code_package_name: str - :param code_package_instance_id: ID that uniquely identifies a code package instance deployed - on a service fabric node. - :type code_package_instance_id: str - :param container_api_request_body: Parameters for making container API call. - :type container_api_request_body: ~azure.servicefabric.models.ContainerApiRequestBody - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ContainerApiResponse, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ContainerApiResponse - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApiResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(container_api_request_body, 'ContainerApiRequestBody') - - request = build_invoke_container_api_request( - node_name=node_name, - application_id=application_id, - api_version=api_version, - content_type=content_type, - service_manifest_name=service_manifest_name, - code_package_name=code_package_name, - code_package_instance_id=code_package_instance_id, - json=_json, - timeout=timeout, - template_url=self.invoke_container_api.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ContainerApiResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - invoke_container_api.metadata = {'url': "/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerApi"} # type: ignore - - - @distributed_trace - def create_compose_deployment( # pylint: disable=inconsistent-return-statements - self, - create_compose_deployment_description, # type: "_models.CreateComposeDeploymentDescription" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Creates a Service Fabric compose deployment. - - Compose is a file format that describes multi-container applications. This API allows deploying - container based applications defined in compose format in a Service Fabric cluster. Once the - deployment is created, its status can be tracked via the ``GetComposeDeploymentStatus`` API. - - :param create_compose_deployment_description: Describes the compose deployment that needs to be - created. - :type create_compose_deployment_description: - ~azure.servicefabric.models.CreateComposeDeploymentDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(create_compose_deployment_description, 'CreateComposeDeploymentDescription') - - request = build_create_compose_deployment_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.create_compose_deployment.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - create_compose_deployment.metadata = {'url': "/ComposeDeployments/$/Create"} # type: ignore - - - @distributed_trace - def get_compose_deployment_status( - self, - deployment_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ComposeDeploymentStatusInfo" - """Gets information about a Service Fabric compose deployment. - - Returns the status of the compose deployment that was created or in the process of being - created in the Service Fabric cluster and whose name matches the one specified as the - parameter. The response includes the name, status, and other details about the deployment. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ComposeDeploymentStatusInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ComposeDeploymentStatusInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ComposeDeploymentStatusInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_compose_deployment_status_request( - deployment_name=deployment_name, - api_version=api_version, - timeout=timeout, - template_url=self.get_compose_deployment_status.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ComposeDeploymentStatusInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_compose_deployment_status.metadata = {'url': "/ComposeDeployments/{deploymentName}"} # type: ignore - - - @distributed_trace - def get_compose_deployment_status_list( - self, - continuation_token_parameter=None, # type: Optional[str] - max_results=0, # type: Optional[int] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedComposeDeploymentStatusInfoList" - """Gets the list of compose deployments created in the Service Fabric cluster. - - Gets the status about the compose deployments that were created or in the process of being - created in the Service Fabric cluster. The response includes the name, status, and other - details about the compose deployments. If the list of deployments do not fit in a page, one - page of results is returned as well as a continuation token, which can be used to get the next - page. - - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedComposeDeploymentStatusInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedComposeDeploymentStatusInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedComposeDeploymentStatusInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_compose_deployment_status_list_request( - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.get_compose_deployment_status_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedComposeDeploymentStatusInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_compose_deployment_status_list.metadata = {'url': "/ComposeDeployments"} # type: ignore - - - @distributed_trace - def get_compose_deployment_upgrade_progress( - self, - deployment_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ComposeDeploymentUpgradeProgressInfo" - """Gets details for the latest upgrade performed on this Service Fabric compose deployment. - - Returns the information about the state of the compose deployment upgrade along with details to - aid debugging application health issues. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ComposeDeploymentUpgradeProgressInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ComposeDeploymentUpgradeProgressInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ComposeDeploymentUpgradeProgressInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_compose_deployment_upgrade_progress_request( - deployment_name=deployment_name, - api_version=api_version, - timeout=timeout, - template_url=self.get_compose_deployment_upgrade_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ComposeDeploymentUpgradeProgressInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_compose_deployment_upgrade_progress.metadata = {'url': "/ComposeDeployments/{deploymentName}/$/GetUpgradeProgress"} # type: ignore - - - @distributed_trace - def remove_compose_deployment( # pylint: disable=inconsistent-return-statements - self, - deployment_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes an existing Service Fabric compose deployment from cluster. - - Deletes an existing Service Fabric compose deployment. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_remove_compose_deployment_request( - deployment_name=deployment_name, - api_version=api_version, - timeout=timeout, - template_url=self.remove_compose_deployment.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - remove_compose_deployment.metadata = {'url': "/ComposeDeployments/{deploymentName}/$/Delete"} # type: ignore - - - @distributed_trace - def start_compose_deployment_upgrade( # pylint: disable=inconsistent-return-statements - self, - deployment_name, # type: str - compose_deployment_upgrade_description, # type: "_models.ComposeDeploymentUpgradeDescription" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Starts upgrading a compose deployment in the Service Fabric cluster. - - Validates the supplied upgrade parameters and starts upgrading the deployment if the parameters - are valid. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param compose_deployment_upgrade_description: Parameters for upgrading compose deployment. - :type compose_deployment_upgrade_description: - ~azure.servicefabric.models.ComposeDeploymentUpgradeDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(compose_deployment_upgrade_description, 'ComposeDeploymentUpgradeDescription') - - request = build_start_compose_deployment_upgrade_request( - deployment_name=deployment_name, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.start_compose_deployment_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_compose_deployment_upgrade.metadata = {'url': "/ComposeDeployments/{deploymentName}/$/Upgrade"} # type: ignore - - - @distributed_trace - def start_rollback_compose_deployment_upgrade( # pylint: disable=inconsistent-return-statements - self, - deployment_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Starts rolling back a compose deployment upgrade in the Service Fabric cluster. - - Rollback a service fabric compose deployment upgrade. - - :param deployment_name: The identity of the deployment. - :type deployment_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_start_rollback_compose_deployment_upgrade_request( - deployment_name=deployment_name, - api_version=api_version, - timeout=timeout, - template_url=self.start_rollback_compose_deployment_upgrade.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_rollback_compose_deployment_upgrade.metadata = {'url': "/ComposeDeployments/{deploymentName}/$/RollbackUpgrade"} # type: ignore - - - @distributed_trace - def get_chaos( - self, - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.Chaos" - """Get the status of Chaos. - - Get the status of Chaos indicating whether or not Chaos is running, the Chaos parameters used - for running Chaos and the status of the Chaos Schedule. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Chaos, or the result of cls(response) - :rtype: ~azure.servicefabric.models.Chaos - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Chaos"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_chaos_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_chaos.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Chaos', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_chaos.metadata = {'url': "/Tools/Chaos"} # type: ignore - - - @distributed_trace - def start_chaos( # pylint: disable=inconsistent-return-statements - self, - chaos_parameters, # type: "_models.ChaosParameters" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Starts Chaos in the cluster. - - If Chaos is not already running in the cluster, it starts Chaos with the passed in Chaos - parameters. - If Chaos is already running when this call is made, the call fails with the error code - FABRIC_E_CHAOS_ALREADY_RUNNING. - Refer to the article `Induce controlled Chaos in Service Fabric clusters - `_ for more - details. - - :param chaos_parameters: Describes all the parameters to configure a Chaos run. - :type chaos_parameters: ~azure.servicefabric.models.ChaosParameters - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(chaos_parameters, 'ChaosParameters') - - request = build_start_chaos_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.start_chaos.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_chaos.metadata = {'url': "/Tools/Chaos/$/Start"} # type: ignore - - - @distributed_trace - def stop_chaos( # pylint: disable=inconsistent-return-statements - self, - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Stops Chaos if it is running in the cluster and put the Chaos Schedule in a stopped state. - - Stops Chaos from executing new faults. In-flight faults will continue to execute until they are - complete. The current Chaos Schedule is put into a stopped state. - Once a schedule is stopped, it will stay in the stopped state and not be used to Chaos Schedule - new runs of Chaos. A new Chaos Schedule must be set in order to resume scheduling. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_stop_chaos_request( - api_version=api_version, - timeout=timeout, - template_url=self.stop_chaos.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - stop_chaos.metadata = {'url': "/Tools/Chaos/$/Stop"} # type: ignore - - - @distributed_trace - def get_chaos_events( - self, - continuation_token_parameter=None, # type: Optional[str] - start_time_utc=None, # type: Optional[str] - end_time_utc=None, # type: Optional[str] - max_results=0, # type: Optional[int] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ChaosEventsSegment" - """Gets the next segment of the Chaos events based on the continuation token or the time range. - - To get the next segment of the Chaos events, you can specify the ContinuationToken. To get the - start of a new segment of Chaos events, you can specify the time range - through StartTimeUtc and EndTimeUtc. You cannot specify both the ContinuationToken and the time - range in the same call. - When there are more than 100 Chaos events, the Chaos events are returned in multiple segments - where a segment contains no more than 100 Chaos events and to get the next segment you make a - call to this API with the continuation token. - - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param start_time_utc: The Windows file time representing the start time of the time range for - which a Chaos report is to be generated. Consult `DateTime.ToFileTimeUtc Method - `_.aspx) for - details. Default value is None. - :type start_time_utc: str - :param end_time_utc: The Windows file time representing the end time of the time range for - which a Chaos report is to be generated. Consult `DateTime.ToFileTimeUtc Method - `_.aspx) for - details. Default value is None. - :type end_time_utc: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ChaosEventsSegment, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ChaosEventsSegment - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ChaosEventsSegment"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_chaos_events_request( - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - max_results=max_results, - timeout=timeout, - template_url=self.get_chaos_events.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ChaosEventsSegment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_chaos_events.metadata = {'url': "/Tools/Chaos/Events"} # type: ignore - - - @distributed_trace - def get_chaos_schedule( - self, - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ChaosScheduleDescription" - """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. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ChaosScheduleDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ChaosScheduleDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ChaosScheduleDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_chaos_schedule_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_chaos_schedule.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ChaosScheduleDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_chaos_schedule.metadata = {'url': "/Tools/Chaos/Schedule"} # type: ignore - - - @distributed_trace - def post_chaos_schedule( # pylint: disable=inconsistent-return-statements - self, - timeout=60, # type: Optional[int] - version=None, # type: Optional[int] - schedule=None, # type: Optional["_models.ChaosSchedule"] - **kwargs # type: Any - ): - # type: (...) -> None - """Set the schedule used by Chaos. - - Chaos will automatically schedule runs based on the Chaos Schedule. - The Chaos Schedule will be updated if the provided version matches the version on the server. - When updating the Chaos Schedule, the version on the server is incremented by 1. - The version on the server will wrap back to 0 after reaching a large number. - If Chaos is running when this call is made, the call will fail. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param version: The version number of the Schedule. Default value is None. - :type version: int - :param schedule: Defines the schedule used by Chaos. Default value is None. - :type schedule: ~azure.servicefabric.models.ChaosSchedule - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _chaos_schedule = _models.ChaosScheduleDescription(version=version, schedule=schedule) - _json = self._serialize.body(_chaos_schedule, 'ChaosScheduleDescription') - - request = build_post_chaos_schedule_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.post_chaos_schedule.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - post_chaos_schedule.metadata = {'url': "/Tools/Chaos/Schedule"} # type: ignore - - - @distributed_trace - def upload_file( # pylint: disable=inconsistent-return-statements - self, - content_path, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Uploads contents of the file to the image store. - - Uploads contents of the file to the image store. Use this API if the file is small enough to - upload again if the connection fails. The file's data needs to be added to the request body. - The contents will be uploaded to the specified path. Image store service uses a mark file to - indicate the availability of the folder. The mark file is an empty file named "_.dir". The mark - file is generated by the image store service when all files in a folder are uploaded. When - using File-by-File approach to upload application package in REST, the image store service - isn't aware of the file hierarchy of the application package; you need to create a mark file - per folder and upload it last, to let the image store service know that the folder is complete. - - :param content_path: Relative path to file or folder in the image store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_upload_file_request( - content_path=content_path, - api_version=api_version, - timeout=timeout, - template_url=self.upload_file.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - upload_file.metadata = {'url': "/ImageStore/{contentPath}"} # type: ignore - - - @distributed_trace - def get_image_store_content( - self, - content_path, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ImageStoreContent" - """Gets the image store content information. - - Returns the information about the image store content at the specified contentPath. The - contentPath is relative to the root of the image store. - - :param content_path: Relative path to file or folder in the image store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ImageStoreContent, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ImageStoreContent - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ImageStoreContent"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_image_store_content_request( - content_path=content_path, - api_version=api_version, - timeout=timeout, - template_url=self.get_image_store_content.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ImageStoreContent', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_image_store_content.metadata = {'url': "/ImageStore/{contentPath}"} # type: ignore - - - @distributed_trace - def delete_image_store_content( # pylint: disable=inconsistent-return-statements - self, - content_path, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes existing image store content. - - Deletes existing image store content being found within the given image store relative path. - This command can be used to delete uploaded application packages once they are provisioned. - - :param content_path: Relative path to file or folder in the image store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_image_store_content_request( - content_path=content_path, - api_version=api_version, - timeout=timeout, - template_url=self.delete_image_store_content.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete_image_store_content.metadata = {'url': "/ImageStore/{contentPath}"} # type: ignore - - - @distributed_trace - def get_image_store_root_content( - self, - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ImageStoreContent" - """Gets the content information at the root of the image store. - - Returns the information about the image store content at the root of the image store. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ImageStoreContent, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ImageStoreContent - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ImageStoreContent"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_image_store_root_content_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_image_store_root_content.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ImageStoreContent', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_image_store_root_content.metadata = {'url': "/ImageStore"} # type: ignore - - - @distributed_trace - def copy_image_store_content( # pylint: disable=inconsistent-return-statements - self, - image_store_copy_description, # type: "_models.ImageStoreCopyDescription" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Copies image store content internally. - - Copies the image store content from the source image store relative path to the destination - image store relative path. - - :param image_store_copy_description: Describes the copy description for the image store. - :type image_store_copy_description: ~azure.servicefabric.models.ImageStoreCopyDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(image_store_copy_description, 'ImageStoreCopyDescription') - - request = build_copy_image_store_content_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.copy_image_store_content.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - copy_image_store_content.metadata = {'url': "/ImageStore/$/Copy"} # type: ignore - - - @distributed_trace - def delete_image_store_upload_session( # pylint: disable=inconsistent-return-statements - self, - session_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Cancels an image store upload session. - - The DELETE request will cause the existing upload session to expire and remove any previously - uploaded file chunks. - - :param session_id: A GUID generated by the user for a file uploading. It identifies an image - store upload session which keeps track of all file chunks until it is committed. - :type session_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_image_store_upload_session_request( - api_version=api_version, - session_id=session_id, - timeout=timeout, - template_url=self.delete_image_store_upload_session.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete_image_store_upload_session.metadata = {'url': "/ImageStore/$/DeleteUploadSession"} # type: ignore - - - @distributed_trace - def commit_image_store_upload_session( # pylint: disable=inconsistent-return-statements - self, - session_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Commit an image store upload session. - - When all file chunks have been uploaded, the upload session needs to be committed explicitly to - complete the upload. Image store preserves the upload session until the expiration time, which - is 30 minutes after the last chunk received. - - :param session_id: A GUID generated by the user for a file uploading. It identifies an image - store upload session which keeps track of all file chunks until it is committed. - :type session_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_commit_image_store_upload_session_request( - api_version=api_version, - session_id=session_id, - timeout=timeout, - template_url=self.commit_image_store_upload_session.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - commit_image_store_upload_session.metadata = {'url': "/ImageStore/$/CommitUploadSession"} # type: ignore - - - @distributed_trace - def get_image_store_upload_session_by_id( - self, - session_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.UploadSession" - """Get the image store upload session by ID. - - Gets the image store upload session identified by the given ID. User can query the upload - session at any time during uploading. - - :param session_id: A GUID generated by the user for a file uploading. It identifies an image - store upload session which keeps track of all file chunks until it is committed. - :type session_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: UploadSession, or the result of cls(response) - :rtype: ~azure.servicefabric.models.UploadSession - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.UploadSession"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_image_store_upload_session_by_id_request( - api_version=api_version, - session_id=session_id, - timeout=timeout, - template_url=self.get_image_store_upload_session_by_id.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('UploadSession', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_image_store_upload_session_by_id.metadata = {'url': "/ImageStore/$/GetUploadSession"} # type: ignore - - - @distributed_trace - def get_image_store_upload_session_by_path( - self, - content_path, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.UploadSession" - """Get the image store upload session by relative path. - - Gets the image store upload session associated with the given image store relative path. User - can query the upload session at any time during uploading. - - :param content_path: Relative path to file or folder in the image store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: UploadSession, or the result of cls(response) - :rtype: ~azure.servicefabric.models.UploadSession - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.UploadSession"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_image_store_upload_session_by_path_request( - content_path=content_path, - api_version=api_version, - timeout=timeout, - template_url=self.get_image_store_upload_session_by_path.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('UploadSession', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_image_store_upload_session_by_path.metadata = {'url': "/ImageStore/{contentPath}/$/GetUploadSession"} # type: ignore - - - @distributed_trace - def upload_file_chunk( # pylint: disable=inconsistent-return-statements - self, - content_path, # type: str - session_id, # type: str - content_range, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Uploads a file chunk to the image store relative path. - - Uploads a file chunk to the image store with the specified upload session ID and image store - relative path. This API allows user to resume the file upload operation. user doesn't have to - restart the file upload from scratch whenever there is a network interruption. Use this option - if the file size is large. - - To perform a resumable file upload, user need to break the file into multiple chunks and upload - these chunks to the image store one-by-one. Chunks don't have to be uploaded in order. If the - file represented by the image store relative path already exists, it will be overwritten when - the upload session commits. - - :param content_path: Relative path to file or folder in the image store from its root. - :type content_path: str - :param session_id: A GUID generated by the user for a file uploading. It identifies an image - store upload session which keeps track of all file chunks until it is committed. - :type session_id: str - :param content_range: When uploading file chunks to the image store, the Content-Range header - field need to be configured and sent with a request. The format should looks like "bytes - {First-Byte-Position}-{Last-Byte-Position}/{File-Length}". For example, Content-Range:bytes - 300-5000/20000 indicates that user is sending bytes 300 through 5,000 and the total file length - is 20,000 bytes. - :type content_range: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_upload_file_chunk_request( - content_path=content_path, - api_version=api_version, - session_id=session_id, - content_range=content_range, - timeout=timeout, - template_url=self.upload_file_chunk.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - upload_file_chunk.metadata = {'url': "/ImageStore/{contentPath}/$/UploadChunk"} # type: ignore - - - @distributed_trace - def get_image_store_root_folder_size( - self, - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.FolderSizeInfo" - """Get the folder size at the root of the image store. - - Returns the total size of files at the root and children folders in image store. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: FolderSizeInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.FolderSizeInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.FolderSizeInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_image_store_root_folder_size_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_image_store_root_folder_size.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('FolderSizeInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_image_store_root_folder_size.metadata = {'url': "/ImageStore/$/FolderSize"} # type: ignore - - - @distributed_trace - def get_image_store_folder_size( - self, - content_path, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.FolderSizeInfo" - """Get the size of a folder in image store. - - Gets the total size of file under a image store folder, specified by contentPath. The - contentPath is relative to the root of the image store. - - :param content_path: Relative path to file or folder in the image store from its root. - :type content_path: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: FolderSizeInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.FolderSizeInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.FolderSizeInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_image_store_folder_size_request( - content_path=content_path, - api_version=api_version, - timeout=timeout, - template_url=self.get_image_store_folder_size.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('FolderSizeInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_image_store_folder_size.metadata = {'url': "/ImageStore/{contentPath}/$/FolderSize"} # type: ignore - - - @distributed_trace - def get_image_store_info( - self, - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.ImageStoreInfo" - """Gets the overall ImageStore information. - - Returns information about the primary ImageStore replica, such as disk capacity and available - disk space at the node it is on, and several categories of the ImageStore's file system usage. - - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ImageStoreInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.ImageStoreInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ImageStoreInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_image_store_info_request( - api_version=api_version, - timeout=timeout, - template_url=self.get_image_store_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ImageStoreInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_image_store_info.metadata = {'url': "/ImageStore/$/Info"} # type: ignore - - - @distributed_trace - def invoke_infrastructure_command( - self, - command, # type: str - service_id=None, # type: Optional[str] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> str - """Invokes an administrative command on the given Infrastructure Service instance. - - For clusters that have one or more instances of the Infrastructure Service configured, - this API provides a way to send infrastructure-specific commands to a particular - instance of the Infrastructure Service. - - Available commands and their corresponding response formats vary depending upon - the infrastructure on which the cluster is running. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param command: The text of the command to be invoked. The content of the command is - infrastructure-specific. - :type command: str - :param service_id: The identity of the infrastructure service. This is the full name of the - infrastructure service without the 'fabric:' URI scheme. This parameter required only for the - cluster that has more than one instance of infrastructure service running. Default value is - None. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) - :rtype: str - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[str] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_invoke_infrastructure_command_request( - api_version=api_version, - command=command, - service_id=service_id, - timeout=timeout, - template_url=self.invoke_infrastructure_command.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - invoke_infrastructure_command.metadata = {'url': "/$/InvokeInfrastructureCommand"} # type: ignore - - - @distributed_trace - def invoke_infrastructure_query( - self, - command, # type: str - service_id=None, # type: Optional[str] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> str - """Invokes a read-only query on the given infrastructure service instance. - - For clusters that have one or more instances of the Infrastructure Service configured, - this API provides a way to send infrastructure-specific queries to a particular - instance of the Infrastructure Service. - - Available commands and their corresponding response formats vary depending upon - the infrastructure on which the cluster is running. - - This API supports the Service Fabric platform; it is not meant to be used directly from your - code. - - :param command: The text of the command to be invoked. The content of the command is - infrastructure-specific. - :type command: str - :param service_id: The identity of the infrastructure service. This is the full name of the - infrastructure service without the 'fabric:' URI scheme. This parameter required only for the - cluster that has more than one instance of infrastructure service running. Default value is - None. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) - :rtype: str - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[str] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_invoke_infrastructure_query_request( - api_version=api_version, - command=command, - service_id=service_id, - timeout=timeout, - template_url=self.invoke_infrastructure_query.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - invoke_infrastructure_query.metadata = {'url': "/$/InvokeInfrastructureQuery"} # type: ignore - - - @distributed_trace - def start_data_loss( # pylint: disable=inconsistent-return-statements - self, - service_id, # type: str - partition_id, # type: str - operation_id, # type: str - data_loss_mode, # type: Union[str, "_models.DataLossMode"] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """This API will induce data loss for the specified partition. It will trigger a call to the - OnDataLossAsync API of the partition. - - This API will induce data loss for the specified partition. It will trigger a call to the - OnDataLoss API of the partition. - Actual data loss will depend on the specified DataLossMode. - - - * PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is triggered for the - partition but actual data loss depends on the presence of in-flight replication. - * FullDataLoss - All replicas are removed hence all data is lost and OnDataLoss is triggered. - - This API should only be called with a stateful service as the target. - - Calling this API with a system service as the target is not advised. - - Note: Once this API has been called, it cannot be reversed. Calling CancelOperation will only - stop execution and clean up internal system state. - It will not restore data if the command has progressed far enough to cause data loss. - - Call the GetDataLossProgress API with the same OperationId to return information on the - operation started with this API. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param data_loss_mode: This enum is passed to the StartDataLoss API to indicate what type of - data loss to induce. - :type data_loss_mode: str or ~azure.servicefabric.models.DataLossMode - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_start_data_loss_request( - service_id=service_id, - partition_id=partition_id, - api_version=api_version, - operation_id=operation_id, - data_loss_mode=data_loss_mode, - timeout=timeout, - template_url=self.start_data_loss.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_data_loss.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartDataLoss"} # type: ignore - - - @distributed_trace - def get_data_loss_progress( - self, - service_id, # type: str - partition_id, # type: str - operation_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PartitionDataLossProgress" - """Gets the progress of a partition data loss operation started using the StartDataLoss API. - - Gets the progress of a data loss operation started with StartDataLoss, using the OperationId. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartitionDataLossProgress, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PartitionDataLossProgress - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionDataLossProgress"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_data_loss_progress_request( - service_id=service_id, - partition_id=partition_id, - api_version=api_version, - operation_id=operation_id, - timeout=timeout, - template_url=self.get_data_loss_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartitionDataLossProgress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_data_loss_progress.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetDataLossProgress"} # type: ignore - - - @distributed_trace - def start_quorum_loss( # pylint: disable=inconsistent-return-statements - self, - service_id, # type: str - partition_id, # type: str - operation_id, # type: str - quorum_loss_mode, # type: Union[str, "_models.QuorumLossMode"] - quorum_loss_duration, # type: int - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Induces quorum loss for a given stateful service partition. - - This API is useful for a temporary quorum loss situation on your service. - - Call the GetQuorumLossProgress API with the same OperationId to return information on the - operation started with this API. - - This can only be called on stateful persisted (HasPersistedState==true) services. Do not use - this API on stateless services or stateful in-memory only services. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param quorum_loss_mode: This enum is passed to the StartQuorumLoss API to indicate what type - of quorum loss to induce. - :type quorum_loss_mode: str or ~azure.servicefabric.models.QuorumLossMode - :param quorum_loss_duration: The amount of time for which the partition will be kept in quorum - loss. This must be specified in seconds. - :type quorum_loss_duration: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_start_quorum_loss_request( - service_id=service_id, - partition_id=partition_id, - api_version=api_version, - operation_id=operation_id, - quorum_loss_mode=quorum_loss_mode, - quorum_loss_duration=quorum_loss_duration, - timeout=timeout, - template_url=self.start_quorum_loss.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_quorum_loss.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartQuorumLoss"} # type: ignore - - - @distributed_trace - def get_quorum_loss_progress( - self, - service_id, # type: str - partition_id, # type: str - operation_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PartitionQuorumLossProgress" - """Gets the progress of a quorum loss operation on a partition started using the StartQuorumLoss - API. - - Gets the progress of a quorum loss operation started with StartQuorumLoss, using the provided - OperationId. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartitionQuorumLossProgress, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PartitionQuorumLossProgress - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionQuorumLossProgress"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_quorum_loss_progress_request( - service_id=service_id, - partition_id=partition_id, - api_version=api_version, - operation_id=operation_id, - timeout=timeout, - template_url=self.get_quorum_loss_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartitionQuorumLossProgress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_quorum_loss_progress.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetQuorumLossProgress"} # type: ignore - - - @distributed_trace - def start_partition_restart( # pylint: disable=inconsistent-return-statements - self, - service_id, # type: str - partition_id, # type: str - operation_id, # type: str - restart_partition_mode, # type: Union[str, "_models.RestartPartitionMode"] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """This API will restart some or all replicas or instances of the specified partition. - - This API is useful for testing failover. - - If used to target a stateless service partition, RestartPartitionMode must be - AllReplicasOrInstances. - - Call the GetPartitionRestartProgress API using the same OperationId to get the progress. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param restart_partition_mode: Describe which partitions to restart. - :type restart_partition_mode: str or ~azure.servicefabric.models.RestartPartitionMode - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_start_partition_restart_request( - service_id=service_id, - partition_id=partition_id, - api_version=api_version, - operation_id=operation_id, - restart_partition_mode=restart_partition_mode, - timeout=timeout, - template_url=self.start_partition_restart.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_partition_restart.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartRestart"} # type: ignore - - - @distributed_trace - def get_partition_restart_progress( - self, - service_id, # type: str - partition_id, # type: str - operation_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PartitionRestartProgress" - """Gets the progress of a PartitionRestart operation started using StartPartitionRestart. - - Gets the progress of a PartitionRestart started with StartPartitionRestart using the provided - OperationId. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param partition_id: The identity of the partition. - :type partition_id: str - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartitionRestartProgress, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PartitionRestartProgress - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionRestartProgress"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_restart_progress_request( - service_id=service_id, - partition_id=partition_id, - api_version=api_version, - operation_id=operation_id, - timeout=timeout, - template_url=self.get_partition_restart_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartitionRestartProgress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_restart_progress.metadata = {'url': "/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetRestartProgress"} # type: ignore - - - @distributed_trace - def start_node_transition( # pylint: disable=inconsistent-return-statements - self, - node_name, # type: str - operation_id, # type: str - node_transition_type, # type: Union[str, "_models.NodeTransitionType"] - node_instance_id, # type: str - stop_duration_in_seconds, # type: int - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Starts or stops a cluster node. - - Starts or stops a cluster node. A cluster node is a process, not the OS instance itself. To - start a node, pass in "Start" for the NodeTransitionType parameter. - To stop a node, pass in "Stop" for the NodeTransitionType parameter. This API starts the - operation - when the API returns the node may not have finished transitioning yet. - Call GetNodeTransitionProgress with the same OperationId to get the progress of the operation. - - :param node_name: The name of the node. - :type node_name: str - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param node_transition_type: Indicates the type of transition to perform. - NodeTransitionType.Start will start a stopped node. NodeTransitionType.Stop will stop a node - that is up. - :type node_transition_type: str or ~azure.servicefabric.models.NodeTransitionType - :param node_instance_id: The node instance ID of the target node. This can be determined - through GetNodeInfo API. - :type node_instance_id: str - :param stop_duration_in_seconds: The duration, in seconds, to keep the node stopped. The - minimum value is 600, the maximum is 14400. After this time expires, the node will - automatically come back up. - :type stop_duration_in_seconds: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_start_node_transition_request( - node_name=node_name, - api_version=api_version, - operation_id=operation_id, - node_transition_type=node_transition_type, - node_instance_id=node_instance_id, - stop_duration_in_seconds=stop_duration_in_seconds, - timeout=timeout, - template_url=self.start_node_transition.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - start_node_transition.metadata = {'url': "/Faults/Nodes/{nodeName}/$/StartTransition/"} # type: ignore - - - @distributed_trace - def get_node_transition_progress( - self, - node_name, # type: str - operation_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.NodeTransitionProgress" - """Gets the progress of an operation started using StartNodeTransition. - - Gets the progress of an operation started with StartNodeTransition using the provided - OperationId. - - :param node_name: The name of the node. - :type node_name: str - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NodeTransitionProgress, or the result of cls(response) - :rtype: ~azure.servicefabric.models.NodeTransitionProgress - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NodeTransitionProgress"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_node_transition_progress_request( - node_name=node_name, - api_version=api_version, - operation_id=operation_id, - timeout=timeout, - template_url=self.get_node_transition_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NodeTransitionProgress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_node_transition_progress.metadata = {'url': "/Faults/Nodes/{nodeName}/$/GetTransitionProgress"} # type: ignore - - - @distributed_trace - def get_fault_operation_list( - self, - type_filter=65535, # type: int - state_filter=65535, # type: int - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> List["_models.OperationStatus"] - """Gets a list of user-induced fault operations filtered by provided input. - - Gets the list of user-induced fault operations filtered by provided input. - - :param type_filter: Used to filter on OperationType for user-induced operations. - - - * 65535 - select all - * 1 - select PartitionDataLoss. - * 2 - select PartitionQuorumLoss. - * 4 - select PartitionRestart. - * 8 - select NodeTransition. Default value is 65535. - :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. Default value is 65535. - :type state_filter: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of OperationStatus, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.OperationStatus] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.OperationStatus"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_fault_operation_list_request( - api_version=api_version, - type_filter=type_filter, - state_filter=state_filter, - timeout=timeout, - template_url=self.get_fault_operation_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[OperationStatus]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_fault_operation_list.metadata = {'url': "/Faults/"} # type: ignore - - - @distributed_trace - def cancel_operation( # pylint: disable=inconsistent-return-statements - self, - operation_id, # type: str - force=False, # type: bool - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Cancels a user-induced fault operation. - - The following APIs start fault operations that may be cancelled by using CancelOperation: - StartDataLoss, StartQuorumLoss, StartPartitionRestart, StartNodeTransition. - - If force is false, then the specified user-induced operation will be gracefully stopped and - cleaned up. If force is true, the command will be aborted, and some internal state - may be left behind. Specifying force as true should be used with care. Calling this API with - force set to true is not allowed until this API has already - been called on the same test command with force set to false first, or unless the test command - already has an OperationState of OperationState.RollingBack. - Clarification: OperationState.RollingBack means that the system will be/is cleaning up internal - system state caused by executing the command. It will not restore data if the - test command was to cause data loss. For example, if you call StartDataLoss then call this - API, the system will only clean up internal state from running the command. - It will not restore the target partition's data, if the command progressed far enough to cause - data loss. - - Important note: if this API is invoked with force==true, internal state may be left behind. - - :param operation_id: A GUID that identifies a call of this API. This is passed into the - corresponding GetProgress API. - :type operation_id: str - :param force: Indicates whether to gracefully roll back and clean up internal system state - modified by executing the user-induced operation. Default value is False. - :type force: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_cancel_operation_request( - api_version=api_version, - operation_id=operation_id, - force=force, - timeout=timeout, - template_url=self.cancel_operation.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - cancel_operation.metadata = {'url': "/Faults/$/Cancel"} # type: ignore - - - @distributed_trace - def create_backup_policy( # pylint: disable=inconsistent-return-statements - self, - backup_policy_description, # type: "_models.BackupPolicyDescription" - timeout=60, # type: Optional[int] - validate_connection=False, # type: Optional[bool] - **kwargs # type: Any - ): - # type: (...) -> None - """Creates a backup policy. - - Creates a backup policy which can be associated later with a Service Fabric application, - service or a partition for periodic backup. - - :param backup_policy_description: Describes the backup policy. - :type backup_policy_description: ~azure.servicefabric.models.BackupPolicyDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param validate_connection: Specifies whether to validate the storage connection and - credentials before creating or updating the backup policies. Default value is False. - :type validate_connection: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') - - request = build_create_backup_policy_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - validate_connection=validate_connection, - template_url=self.create_backup_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - create_backup_policy.metadata = {'url': "/BackupRestore/BackupPolicies/$/Create"} # type: ignore - - - @distributed_trace - def delete_backup_policy( # pylint: disable=inconsistent-return-statements - self, - backup_policy_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes the backup policy. - - Deletes an existing backup policy. A backup policy must be created before it can be deleted. A - currently active backup policy, associated with any Service Fabric application, service or - partition, cannot be deleted without first deleting the mapping. - - :param backup_policy_name: The name of the backup policy. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_backup_policy_request( - backup_policy_name=backup_policy_name, - api_version=api_version, - timeout=timeout, - template_url=self.delete_backup_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete_backup_policy.metadata = {'url': "/BackupRestore/BackupPolicies/{backupPolicyName}/$/Delete"} # type: ignore - - - @distributed_trace - def get_backup_policy_list( - self, - continuation_token_parameter=None, # type: Optional[str] - max_results=0, # type: Optional[int] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedBackupPolicyDescriptionList" - """Gets all the backup policies configured. - - Get a list of all the backup policies configured. - - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedBackupPolicyDescriptionList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedBackupPolicyDescriptionList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupPolicyDescriptionList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_backup_policy_list_request( - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.get_backup_policy_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedBackupPolicyDescriptionList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_backup_policy_list.metadata = {'url': "/BackupRestore/BackupPolicies"} # type: ignore - - - @distributed_trace - def get_backup_policy_by_name( - self, - backup_policy_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.BackupPolicyDescription" - """Gets a particular backup policy by name. - - Gets a particular backup policy identified by {backupPolicyName}. - - :param backup_policy_name: The name of the backup policy. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupPolicyDescription, or the result of cls(response) - :rtype: ~azure.servicefabric.models.BackupPolicyDescription - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupPolicyDescription"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_backup_policy_by_name_request( - backup_policy_name=backup_policy_name, - api_version=api_version, - timeout=timeout, - template_url=self.get_backup_policy_by_name.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupPolicyDescription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_backup_policy_by_name.metadata = {'url': "/BackupRestore/BackupPolicies/{backupPolicyName}"} # type: ignore - - - @distributed_trace - def get_all_entities_backed_up_by_policy( - self, - backup_policy_name, # type: str - continuation_token_parameter=None, # type: Optional[str] - max_results=0, # type: Optional[int] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedBackupEntityList" - """Gets the list of backup entities that are associated with this policy. - - Returns a list of Service Fabric application, service or partition which are associated with - this backup policy. - - :param backup_policy_name: The name of the backup policy. - :type backup_policy_name: str - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedBackupEntityList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedBackupEntityList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupEntityList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_all_entities_backed_up_by_policy_request( - backup_policy_name=backup_policy_name, - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.get_all_entities_backed_up_by_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedBackupEntityList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_all_entities_backed_up_by_policy.metadata = {'url': "/BackupRestore/BackupPolicies/{backupPolicyName}/$/GetBackupEnabledEntities"} # type: ignore - - - @distributed_trace - def update_backup_policy( # pylint: disable=inconsistent-return-statements - self, - backup_policy_name, # type: str - backup_policy_description, # type: "_models.BackupPolicyDescription" - timeout=60, # type: Optional[int] - validate_connection=False, # type: Optional[bool] - **kwargs # type: Any - ): - # type: (...) -> None - """Updates the backup policy. - - Updates the backup policy identified by {backupPolicyName}. - - :param backup_policy_name: The name of the backup policy. - :type backup_policy_name: str - :param backup_policy_description: Describes the backup policy. - :type backup_policy_description: ~azure.servicefabric.models.BackupPolicyDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param validate_connection: Specifies whether to validate the storage connection and - credentials before creating or updating the backup policies. Default value is False. - :type validate_connection: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(backup_policy_description, 'BackupPolicyDescription') - - request = build_update_backup_policy_request( - backup_policy_name=backup_policy_name, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - validate_connection=validate_connection, - template_url=self.update_backup_policy.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - update_backup_policy.metadata = {'url': "/BackupRestore/BackupPolicies/{backupPolicyName}/$/Update"} # type: ignore - - - @distributed_trace - def enable_application_backup( # pylint: disable=inconsistent-return-statements - self, - application_id, # type: str - backup_policy_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Enables periodic backup of stateful partitions under this Service Fabric application. - - Enables periodic backup of stateful partitions which are part of this Service Fabric - application. Each partition is backed up individually as per the specified backup policy - description. - Note only C# based Reliable Actor and Reliable Stateful services are currently supported for - periodic backup. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param backup_policy_name: Name of the backup policy to be used for enabling periodic backups. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) - _json = self._serialize.body(_enable_backup_description, 'EnableBackupDescription') - - request = build_enable_application_backup_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.enable_application_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - enable_application_backup.metadata = {'url': "/Applications/{applicationId}/$/EnableBackup"} # type: ignore - - - @distributed_trace - def disable_application_backup( # pylint: disable=inconsistent-return-statements - self, - application_id, # type: str - clean_backup, # type: bool - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Disables periodic backup of Service Fabric application. - - Disables periodic backup of Service Fabric application which was previously enabled. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param clean_backup: Boolean flag to delete backups. It can be set to true for deleting all the - backups which were created for the backup entity that is getting disabled for backup. - :type clean_backup: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) - if _disable_backup_description is not None: - _json = self._serialize.body(_disable_backup_description, 'DisableBackupDescription') - else: - _json = None - - request = build_disable_application_backup_request( - application_id=application_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.disable_application_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - disable_application_backup.metadata = {'url': "/Applications/{applicationId}/$/DisableBackup"} # type: ignore - - - @distributed_trace - def get_application_backup_configuration_info( - self, - application_id, # type: str - continuation_token_parameter=None, # type: Optional[str] - max_results=0, # type: Optional[int] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedBackupConfigurationInfoList" - """Gets the Service Fabric application backup configuration information. - - Gets the Service Fabric backup configuration information for the application and the services - and partitions under this application. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedBackupConfigurationInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedBackupConfigurationInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupConfigurationInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_backup_configuration_info_request( - application_id=application_id, - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.get_application_backup_configuration_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedBackupConfigurationInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_backup_configuration_info.metadata = {'url': "/Applications/{applicationId}/$/GetBackupConfigurationInfo"} # type: ignore - - - @distributed_trace - def get_application_backup_list( - self, - application_id, # type: str - timeout=60, # type: Optional[int] - latest=False, # type: Optional[bool] - start_date_time_filter=None, # type: Optional[datetime.datetime] - end_date_time_filter=None, # type: Optional[datetime.datetime] - continuation_token_parameter=None, # type: Optional[str] - max_results=0, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedBackupInfoList" - """Gets the list of backups available for every partition in this application. - - Returns a list of backups available for every partition in this Service Fabric application. The - server enumerates all the backups available at the backup location configured in the backup - policy. It also allows filtering of the result based on start and end datetime or just fetching - the latest available backup for every partition. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param latest: Specifies whether to get only the most recent backup available for a partition - for the specified time range. Default value is False. - :type latest: bool - :param start_date_time_filter: Specify the start date time from which to enumerate backups, in - datetime format. The date time must be specified in ISO8601 format. This is an optional - parameter. If not specified, all backups from the beginning are enumerated. Default value is - None. - :type start_date_time_filter: ~datetime.datetime - :param end_date_time_filter: Specify the end date time till which to enumerate backups, in - datetime format. The date time must be specified in ISO8601 format. This is an optional - parameter. If not specified, enumeration is done till the most recent backup. Default value is - None. - :type end_date_time_filter: ~datetime.datetime - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedBackupInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedBackupInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_backup_list_request( - application_id=application_id, - api_version=api_version, - timeout=timeout, - latest=latest, - start_date_time_filter=start_date_time_filter, - end_date_time_filter=end_date_time_filter, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - template_url=self.get_application_backup_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedBackupInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_backup_list.metadata = {'url': "/Applications/{applicationId}/$/GetBackups"} # type: ignore - - - @distributed_trace - def suspend_application_backup( # pylint: disable=inconsistent-return-statements - self, - application_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Suspends periodic backup for the specified Service Fabric application. - - The application which is configured to take periodic backups, is suspended for taking further - backups till it is resumed again. This operation applies to the entire application's hierarchy. - It means all the services and partitions under this application are now suspended for backup. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_suspend_application_backup_request( - application_id=application_id, - api_version=api_version, - timeout=timeout, - template_url=self.suspend_application_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - suspend_application_backup.metadata = {'url': "/Applications/{applicationId}/$/SuspendBackup"} # type: ignore - - - @distributed_trace - def resume_application_backup( # pylint: disable=inconsistent-return-statements - self, - application_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Resumes periodic backup of a Service Fabric application which was previously suspended. - - The previously suspended Service Fabric application resumes taking periodic backup as per the - backup policy currently configured for the same. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_resume_application_backup_request( - application_id=application_id, - api_version=api_version, - timeout=timeout, - template_url=self.resume_application_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - resume_application_backup.metadata = {'url': "/Applications/{applicationId}/$/ResumeBackup"} # type: ignore - - - @distributed_trace - def enable_service_backup( # pylint: disable=inconsistent-return-statements - self, - service_id, # type: str - backup_policy_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Enables periodic backup of stateful partitions under this Service Fabric service. - - Enables periodic backup of stateful partitions which are part of this Service Fabric service. - Each partition is backed up individually as per the specified backup policy description. In - case the application, which the service is part of, is already enabled for backup then this - operation would override the policy being used to take the periodic backup for this service and - its partitions (unless explicitly overridden at the partition level). - Note only C# based Reliable Actor and Reliable Stateful services are currently supported for - periodic backup. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param backup_policy_name: Name of the backup policy to be used for enabling periodic backups. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) - _json = self._serialize.body(_enable_backup_description, 'EnableBackupDescription') - - request = build_enable_service_backup_request( - service_id=service_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.enable_service_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - enable_service_backup.metadata = {'url': "/Services/{serviceId}/$/EnableBackup"} # type: ignore - - - @distributed_trace - def disable_service_backup( # pylint: disable=inconsistent-return-statements - self, - service_id, # type: str - clean_backup, # type: bool - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Disables periodic backup of Service Fabric service which was previously enabled. - - Disables periodic backup of Service Fabric service which was previously enabled. Backup must be - explicitly enabled before it can be disabled. - In case the backup is enabled for the Service Fabric application, which this service is part - of, this service would continue to be periodically backed up as per the policy mapped at the - application level. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param clean_backup: Boolean flag to delete backups. It can be set to true for deleting all the - backups which were created for the backup entity that is getting disabled for backup. - :type clean_backup: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) - if _disable_backup_description is not None: - _json = self._serialize.body(_disable_backup_description, 'DisableBackupDescription') - else: - _json = None - - request = build_disable_service_backup_request( - service_id=service_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.disable_service_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - disable_service_backup.metadata = {'url': "/Services/{serviceId}/$/DisableBackup"} # type: ignore - - - @distributed_trace - def get_service_backup_configuration_info( - self, - service_id, # type: str - continuation_token_parameter=None, # type: Optional[str] - max_results=0, # type: Optional[int] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedBackupConfigurationInfoList" - """Gets the Service Fabric service backup configuration information. - - Gets the Service Fabric backup configuration information for the service and the partitions - under this service. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedBackupConfigurationInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedBackupConfigurationInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupConfigurationInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_backup_configuration_info_request( - service_id=service_id, - api_version=api_version, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - timeout=timeout, - template_url=self.get_service_backup_configuration_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedBackupConfigurationInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_backup_configuration_info.metadata = {'url': "/Services/{serviceId}/$/GetBackupConfigurationInfo"} # type: ignore - - - @distributed_trace - def get_service_backup_list( - self, - service_id, # type: str - timeout=60, # type: Optional[int] - latest=False, # type: Optional[bool] - start_date_time_filter=None, # type: Optional[datetime.datetime] - end_date_time_filter=None, # type: Optional[datetime.datetime] - continuation_token_parameter=None, # type: Optional[str] - max_results=0, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedBackupInfoList" - """Gets the list of backups available for every partition in this service. - - Returns a list of backups available for every partition in this Service Fabric service. The - server enumerates all the backups available in the backup store configured in the backup - policy. It also allows filtering of the result based on start and end datetime or just fetching - the latest available backup for every partition. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param latest: Specifies whether to get only the most recent backup available for a partition - for the specified time range. Default value is False. - :type latest: bool - :param start_date_time_filter: Specify the start date time from which to enumerate backups, in - datetime format. The date time must be specified in ISO8601 format. This is an optional - parameter. If not specified, all backups from the beginning are enumerated. Default value is - None. - :type start_date_time_filter: ~datetime.datetime - :param end_date_time_filter: Specify the end date time till which to enumerate backups, in - datetime format. The date time must be specified in ISO8601 format. This is an optional - parameter. If not specified, enumeration is done till the most recent backup. Default value is - None. - :type end_date_time_filter: ~datetime.datetime - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedBackupInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedBackupInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_backup_list_request( - service_id=service_id, - api_version=api_version, - timeout=timeout, - latest=latest, - start_date_time_filter=start_date_time_filter, - end_date_time_filter=end_date_time_filter, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - template_url=self.get_service_backup_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedBackupInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_backup_list.metadata = {'url': "/Services/{serviceId}/$/GetBackups"} # type: ignore - - - @distributed_trace - def suspend_service_backup( # pylint: disable=inconsistent-return-statements - self, - service_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Suspends periodic backup for the specified Service Fabric service. - - The service which is configured to take periodic backups, is suspended for taking further - backups till it is resumed again. This operation applies to the entire service's hierarchy. It - means all the partitions under this service are now suspended for backup. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_suspend_service_backup_request( - service_id=service_id, - api_version=api_version, - timeout=timeout, - template_url=self.suspend_service_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - suspend_service_backup.metadata = {'url': "/Services/{serviceId}/$/SuspendBackup"} # type: ignore - - - @distributed_trace - def resume_service_backup( # pylint: disable=inconsistent-return-statements - self, - service_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Resumes periodic backup of a Service Fabric service which was previously suspended. - - The previously suspended Service Fabric service resumes taking periodic backup as per the - backup policy currently configured for the same. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_resume_service_backup_request( - service_id=service_id, - api_version=api_version, - timeout=timeout, - template_url=self.resume_service_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - resume_service_backup.metadata = {'url': "/Services/{serviceId}/$/ResumeBackup"} # type: ignore - - - @distributed_trace - def enable_partition_backup( # pylint: disable=inconsistent-return-statements - self, - partition_id, # type: str - backup_policy_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Enables periodic backup of the stateful persisted partition. - - Enables periodic backup of stateful persisted partition. Each partition is backed up as per the - specified backup policy description. In case the application or service, which is partition is - part of, is already enabled for backup then this operation would override the policy being used - to take the periodic backup of this partition. - Note only C# based Reliable Actor and Reliable Stateful services are currently supported for - periodic backup. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param backup_policy_name: Name of the backup policy to be used for enabling periodic backups. - :type backup_policy_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _enable_backup_description = _models.EnableBackupDescription(backup_policy_name=backup_policy_name) - _json = self._serialize.body(_enable_backup_description, 'EnableBackupDescription') - - request = build_enable_partition_backup_request( - partition_id=partition_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.enable_partition_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - enable_partition_backup.metadata = {'url': "/Partitions/{partitionId}/$/EnableBackup"} # type: ignore - - - @distributed_trace - def disable_partition_backup( # pylint: disable=inconsistent-return-statements - self, - partition_id, # type: str - clean_backup, # type: bool - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Disables periodic backup of Service Fabric partition which was previously enabled. - - Disables periodic backup of partition which was previously enabled. Backup must be explicitly - enabled before it can be disabled. - In case the backup is enabled for the Service Fabric application or service, which this - partition is part of, this partition would continue to be periodically backed up as per the - policy mapped at the higher level entity. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param clean_backup: Boolean flag to delete backups. It can be set to true for deleting all the - backups which were created for the backup entity that is getting disabled for backup. - :type clean_backup: bool - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _disable_backup_description = _models.DisableBackupDescription(clean_backup=clean_backup) - if _disable_backup_description is not None: - _json = self._serialize.body(_disable_backup_description, 'DisableBackupDescription') - else: - _json = None - - request = build_disable_partition_backup_request( - partition_id=partition_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.disable_partition_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - disable_partition_backup.metadata = {'url': "/Partitions/{partitionId}/$/DisableBackup"} # type: ignore - - - @distributed_trace - def get_partition_backup_configuration_info( - self, - partition_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PartitionBackupConfigurationInfo" - """Gets the partition backup configuration information. - - Gets the Service Fabric Backup configuration information for the specified partition. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartitionBackupConfigurationInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PartitionBackupConfigurationInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartitionBackupConfigurationInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_backup_configuration_info_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_partition_backup_configuration_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartitionBackupConfigurationInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_backup_configuration_info.metadata = {'url': "/Partitions/{partitionId}/$/GetBackupConfigurationInfo"} # type: ignore - - - @distributed_trace - def get_partition_backup_list( - self, - partition_id, # type: str - timeout=60, # type: Optional[int] - latest=False, # type: Optional[bool] - start_date_time_filter=None, # type: Optional[datetime.datetime] - end_date_time_filter=None, # type: Optional[datetime.datetime] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedBackupInfoList" - """Gets the list of backups available for the specified partition. - - Returns a list of backups available for the specified partition. The server enumerates all the - backups available in the backup store configured in the backup policy. It also allows filtering - of the result based on start and end datetime or just fetching the latest available backup for - the partition. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param latest: Specifies whether to get only the most recent backup available for a partition - for the specified time range. Default value is False. - :type latest: bool - :param start_date_time_filter: Specify the start date time from which to enumerate backups, in - datetime format. The date time must be specified in ISO8601 format. This is an optional - parameter. If not specified, all backups from the beginning are enumerated. Default value is - None. - :type start_date_time_filter: ~datetime.datetime - :param end_date_time_filter: Specify the end date time till which to enumerate backups, in - datetime format. The date time must be specified in ISO8601 format. This is an optional - parameter. If not specified, enumeration is done till the most recent backup. Default value is - None. - :type end_date_time_filter: ~datetime.datetime - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedBackupInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedBackupInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_backup_list_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - latest=latest, - start_date_time_filter=start_date_time_filter, - end_date_time_filter=end_date_time_filter, - template_url=self.get_partition_backup_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedBackupInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_backup_list.metadata = {'url': "/Partitions/{partitionId}/$/GetBackups"} # type: ignore - - - @distributed_trace - def suspend_partition_backup( # pylint: disable=inconsistent-return-statements - self, - partition_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Suspends periodic backup for the specified partition. - - The partition which is configured to take periodic backups, is suspended for taking further - backups till it is resumed again. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_suspend_partition_backup_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.suspend_partition_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - suspend_partition_backup.metadata = {'url': "/Partitions/{partitionId}/$/SuspendBackup"} # type: ignore - - - @distributed_trace - def resume_partition_backup( # pylint: disable=inconsistent-return-statements - self, - partition_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Resumes periodic backup of partition which was previously suspended. - - The previously suspended partition resumes taking periodic backup as per the backup policy - currently configured for the same. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_resume_partition_backup_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.resume_partition_backup.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - resume_partition_backup.metadata = {'url': "/Partitions/{partitionId}/$/ResumeBackup"} # type: ignore - - - @distributed_trace - def backup_partition( # pylint: disable=inconsistent-return-statements - self, - partition_id, # type: str - backup_timeout=10, # type: Optional[int] - timeout=60, # type: Optional[int] - backup_storage=None, # type: Optional["_models.BackupStorageDescription"] - **kwargs # type: Any - ): - # type: (...) -> None - """Triggers backup of the partition's state. - - Creates a backup of the stateful persisted partition's state. In case the partition is already - being periodically backed up, then by default the new backup is created at the same backup - storage. One can also override the same by specifying the backup storage details as part of the - request body. Once the backup is initiated, its progress can be tracked using the - GetBackupProgress operation. - In case, the operation times out, specify a greater backup timeout value in the query - parameter. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param backup_timeout: Specifies the maximum amount of time, in minutes, to wait for the backup - operation to complete. Post that, the operation completes with timeout error. However, in - certain corner cases it could be that though the operation returns back timeout, the backup - actually goes through. In case of timeout error, its recommended to invoke this operation again - with a greater timeout value. The default value for the same is 10 minutes. Default value is - 10. - :type backup_timeout: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param backup_storage: Specifies the details of the backup storage where to save the backup. - Default value is None. - :type backup_storage: ~azure.servicefabric.models.BackupStorageDescription - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _backup_partition_description = _models.BackupPartitionDescription(backup_storage=backup_storage) - if _backup_partition_description is not None: - _json = self._serialize.body(_backup_partition_description, 'BackupPartitionDescription') - else: - _json = None - - request = build_backup_partition_request( - partition_id=partition_id, - api_version=api_version, - content_type=content_type, - json=_json, - backup_timeout=backup_timeout, - timeout=timeout, - template_url=self.backup_partition.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - backup_partition.metadata = {'url': "/Partitions/{partitionId}/$/Backup"} # type: ignore - - - @distributed_trace - def get_partition_backup_progress( - self, - partition_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.BackupProgressInfo" - """Gets details for the latest backup triggered for this partition. - - Returns information about the state of the latest backup along with details or failure reason - in case of completion. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupProgressInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.BackupProgressInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupProgressInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_backup_progress_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_partition_backup_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupProgressInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_backup_progress.metadata = {'url': "/Partitions/{partitionId}/$/GetBackupProgress"} # type: ignore - - - @distributed_trace - def restore_partition( # pylint: disable=inconsistent-return-statements - self, - partition_id, # type: str - restore_partition_description, # type: "_models.RestorePartitionDescription" - restore_timeout=10, # type: Optional[int] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Triggers restore of the state of the partition using the specified restore partition - description. - - Restores the state of a of the stateful persisted partition using the specified backup point. - In case the partition is already being periodically backed up, then by default the backup point - is looked for in the storage specified in backup policy. One can also override the same by - specifying the backup storage details as part of the restore partition description in body. - Once the restore is initiated, its progress can be tracked using the GetRestoreProgress - operation. - In case, the operation times out, specify a greater restore timeout value in the query - parameter. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param restore_partition_description: Describes the parameters to restore the partition. - :type restore_partition_description: ~azure.servicefabric.models.RestorePartitionDescription - :param restore_timeout: Specifies the maximum amount of time to wait, in minutes, for the - restore operation to complete. Post that, the operation returns back with timeout error. - However, in certain corner cases it could be that the restore operation goes through even - though it completes with timeout. In case of timeout error, its recommended to invoke this - operation again with a greater timeout value. the default value for the same is 10 minutes. - Default value is 10. - :type restore_timeout: int - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(restore_partition_description, 'RestorePartitionDescription') - - request = build_restore_partition_request( - partition_id=partition_id, - api_version=api_version, - content_type=content_type, - json=_json, - restore_timeout=restore_timeout, - timeout=timeout, - template_url=self.restore_partition.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - restore_partition.metadata = {'url': "/Partitions/{partitionId}/$/Restore"} # type: ignore - - - @distributed_trace - def get_partition_restore_progress( - self, - partition_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.RestoreProgressInfo" - """Gets details for the latest restore operation triggered for this partition. - - Returns information about the state of the latest restore operation along with details or - failure reason in case of completion. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RestoreProgressInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.RestoreProgressInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreProgressInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_restore_progress_request( - partition_id=partition_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_partition_restore_progress.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RestoreProgressInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_restore_progress.metadata = {'url': "/Partitions/{partitionId}/$/GetRestoreProgress"} # type: ignore - - - @distributed_trace - def get_backups_from_backup_location( - self, - get_backup_by_storage_query_description, # type: "_models.GetBackupByStorageQueryDescription" - timeout=60, # type: Optional[int] - continuation_token_parameter=None, # type: Optional[str] - max_results=0, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedBackupInfoList" - """Gets the list of backups available for the specified backed up entity at the specified backup - location. - - Gets the list of backups available for the specified backed up entity (Application, Service or - Partition) at the specified backup location (FileShare or Azure Blob Storage). - - :param get_backup_by_storage_query_description: Describes the filters and backup storage - details to be used for enumerating backups. - :type get_backup_by_storage_query_description: - ~azure.servicefabric.models.GetBackupByStorageQueryDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param max_results: The maximum number of results to be returned as part of the paged queries. - This parameter defines the upper bound on the number of results returned. The results returned - can be less than the specified maximum results if they do not fit in the message as per the max - message size restrictions defined in the configuration. If this parameter is zero or not - specified, the paged query includes as many results as possible that fit in the return message. - Default value is 0. - :type max_results: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedBackupInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedBackupInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedBackupInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(get_backup_by_storage_query_description, 'GetBackupByStorageQueryDescription') - - request = build_get_backups_from_backup_location_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - continuation_token_parameter=continuation_token_parameter, - max_results=max_results, - template_url=self.get_backups_from_backup_location.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedBackupInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_backups_from_backup_location.metadata = {'url': "/BackupRestore/$/GetBackups"} # type: ignore - - - @distributed_trace - def create_name( # pylint: disable=inconsistent-return-statements - self, - name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Creates a Service Fabric name. - - Creates the specified Service Fabric name. - - :param name: The Service Fabric name, including the 'fabric:' URI scheme. - :type name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _name_description = _models.NameDescription(name=name) - _json = self._serialize.body(_name_description, 'NameDescription') - - request = build_create_name_request( - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.create_name.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - create_name.metadata = {'url': "/Names/$/Create"} # type: ignore - - - @distributed_trace - def get_name_exists_info( # pylint: disable=inconsistent-return-statements - self, - name_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Returns whether the Service Fabric name exists. - - Returns whether the specified Service Fabric name exists. - - :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. - :type name_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_name_exists_info_request( - name_id=name_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_name_exists_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - get_name_exists_info.metadata = {'url': "/Names/{nameId}"} # type: ignore - - - @distributed_trace - def delete_name( # pylint: disable=inconsistent-return-statements - self, - name_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes a Service Fabric name. - - Deletes the specified Service Fabric name. A name must be created before it can be deleted. - Deleting a name with child properties will fail. - - :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. - :type name_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_name_request( - name_id=name_id, - api_version=api_version, - timeout=timeout, - template_url=self.delete_name.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete_name.metadata = {'url': "/Names/{nameId}"} # type: ignore - - - @distributed_trace - def get_sub_name_info_list( - self, - name_id, # type: str - recursive=False, # type: Optional[bool] - continuation_token_parameter=None, # type: Optional[str] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedSubNameInfoList" - """Enumerates all the Service Fabric names under a given name. - - Enumerates all the Service Fabric names under a given name. If the subnames do not fit in a - page, one page of results is returned as well as a continuation token, which can be used to get - the next page. Querying a name that doesn't exist will fail. - - :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. - :type name_id: str - :param recursive: Allows specifying that the search performed should be recursive. Default - value is False. - :type recursive: bool - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedSubNameInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedSubNameInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedSubNameInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_sub_name_info_list_request( - name_id=name_id, - api_version=api_version, - recursive=recursive, - continuation_token_parameter=continuation_token_parameter, - timeout=timeout, - template_url=self.get_sub_name_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedSubNameInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_sub_name_info_list.metadata = {'url': "/Names/{nameId}/$/GetSubNames"} # type: ignore - - - @distributed_trace - def get_property_info_list( - self, - name_id, # type: str - include_values=False, # type: Optional[bool] - continuation_token_parameter=None, # type: Optional[str] - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PagedPropertyInfoList" - """Gets information on all Service Fabric properties under a given name. - - A Service Fabric name can have one or more named properties that store custom information. This - operation gets the information about these properties in a paged list. The information includes - name, value, and metadata about each of the properties. - - :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. - :type name_id: str - :param include_values: Allows specifying whether to include the values of the properties - returned. True if values should be returned with the metadata; False to return only property - metadata. Default value is False. - :type include_values: bool - :param continuation_token_parameter: The continuation token parameter is used to obtain next - set of results. A continuation token with a non-empty value is included in the response of the - API when the results from the system do not fit in a single response. When this value is passed - to the next API call, the API returns next set of results. If there are no further results, - then the continuation token does not contain a value. The value of this parameter should not be - URL encoded. Default value is None. - :type continuation_token_parameter: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PagedPropertyInfoList, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PagedPropertyInfoList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedPropertyInfoList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_property_info_list_request( - name_id=name_id, - api_version=api_version, - include_values=include_values, - continuation_token_parameter=continuation_token_parameter, - timeout=timeout, - template_url=self.get_property_info_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PagedPropertyInfoList', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_property_info_list.metadata = {'url': "/Names/{nameId}/$/GetProperties"} # type: ignore - - - @distributed_trace - def put_property( # pylint: disable=inconsistent-return-statements - self, - name_id, # type: str - property_description, # type: "_models.PropertyDescription" - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Creates or updates a Service Fabric property. - - Creates or updates the specified Service Fabric property under a given name. - - :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. - :type name_id: str - :param property_description: Describes the Service Fabric property to be created. - :type property_description: ~azure.servicefabric.models.PropertyDescription - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(property_description, 'PropertyDescription') - - request = build_put_property_request( - name_id=name_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.put_property.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - put_property.metadata = {'url': "/Names/{nameId}/$/GetProperty"} # type: ignore - - - @distributed_trace - def get_property_info( - self, - name_id, # type: str - property_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "_models.PropertyInfo" - """Gets the specified Service Fabric property. - - Gets the specified Service Fabric property under a given name. This will always return both - value and metadata. - - :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. - :type name_id: str - :param property_name: Specifies the name of the property to get. - :type property_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PropertyInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.PropertyInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PropertyInfo"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_property_info_request( - name_id=name_id, - api_version=api_version, - property_name=property_name, - timeout=timeout, - template_url=self.get_property_info.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PropertyInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_property_info.metadata = {'url': "/Names/{nameId}/$/GetProperty"} # type: ignore - - - @distributed_trace - def delete_property( # pylint: disable=inconsistent-return-statements - self, - name_id, # type: str - property_name, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes the specified Service Fabric property. - - Deletes the specified Service Fabric property under a given name. A property must be created - before it can be deleted. - - :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. - :type name_id: str - :param property_name: Specifies the name of the property to get. - :type property_name: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_delete_property_request( - name_id=name_id, - api_version=api_version, - property_name=property_name, - timeout=timeout, - template_url=self.delete_property.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - delete_property.metadata = {'url': "/Names/{nameId}/$/GetProperty"} # type: ignore - - - @distributed_trace - def submit_property_batch( - self, - name_id, # type: str - timeout=60, # type: Optional[int] - operations=None, # type: Optional[List["_models.PropertyBatchOperation"]] - **kwargs # type: Any - ): - # type: (...) -> Union["_models.SuccessfulPropertyBatchInfo", "_models.FailedPropertyBatchInfo"] - """Submits a property batch. - - Submits a batch of property operations. Either all or none of the operations will be committed. - - :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. - :type name_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param operations: A list of the property batch operations to be executed. Default value is - None. - :type operations: list[~azure.servicefabric.models.PropertyBatchOperation] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SuccessfulPropertyBatchInfo or FailedPropertyBatchInfo, or the result of cls(response) - :rtype: ~azure.servicefabric.models.SuccessfulPropertyBatchInfo or - ~azure.servicefabric.models.FailedPropertyBatchInfo - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Union["_models.SuccessfulPropertyBatchInfo", "_models.FailedPropertyBatchInfo"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _property_batch_description_list = _models.PropertyBatchDescriptionList(operations=operations) - _json = self._serialize.body(_property_batch_description_list, 'PropertyBatchDescriptionList') - - request = build_submit_property_batch_request( - name_id=name_id, - api_version=api_version, - content_type=content_type, - json=_json, - timeout=timeout, - template_url=self.submit_property_batch.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 409]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('SuccessfulPropertyBatchInfo', pipeline_response) - - if response.status_code == 409: - deserialized = self._deserialize('FailedPropertyBatchInfo', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - submit_property_batch.metadata = {'url': "/Names/{nameId}/$/GetProperties/$/SubmitBatch"} # type: ignore - - - @distributed_trace - def get_cluster_event_list( - self, - start_time_utc, # type: str - end_time_utc, # type: str - timeout=60, # type: Optional[int] - events_types_filter=None, # type: Optional[str] - exclude_analysis_events=None, # type: Optional[bool] - skip_correlation_lookup=None, # type: Optional[bool] - **kwargs # type: Any - ): - # type: (...) -> List["_models.ClusterEvent"] - """Gets all Cluster-related events. - - The response is list of ClusterEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ClusterEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ClusterEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ClusterEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_cluster_event_list_request( - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_cluster_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ClusterEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_cluster_event_list.metadata = {'url': "/EventsStore/Cluster/Events"} # type: ignore - - - @distributed_trace - def get_containers_event_list( - self, - start_time_utc, # type: str - end_time_utc, # type: str - timeout=60, # type: Optional[int] - events_types_filter=None, # type: Optional[str] - exclude_analysis_events=None, # type: Optional[bool] - skip_correlation_lookup=None, # type: Optional[bool] - **kwargs # type: Any - ): - # type: (...) -> List["_models.ContainerInstanceEvent"] - """Gets all Containers-related events. - - The response is list of ContainerInstanceEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ContainerInstanceEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ContainerInstanceEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ContainerInstanceEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_containers_event_list_request( - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_containers_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ContainerInstanceEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_containers_event_list.metadata = {'url': "/EventsStore/Containers/Events"} # type: ignore - - - @distributed_trace - def get_node_event_list( - self, - node_name, # type: str - start_time_utc, # type: str - end_time_utc, # type: str - timeout=60, # type: Optional[int] - events_types_filter=None, # type: Optional[str] - exclude_analysis_events=None, # type: Optional[bool] - skip_correlation_lookup=None, # type: Optional[bool] - **kwargs # type: Any - ): - # type: (...) -> List["_models.NodeEvent"] - """Gets a Node-related events. - - The response is list of NodeEvent objects. - - :param node_name: The name of the node. - :type node_name: str - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of NodeEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.NodeEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NodeEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_node_event_list_request( - node_name=node_name, - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_node_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[NodeEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_node_event_list.metadata = {'url': "/EventsStore/Nodes/{nodeName}/$/Events"} # type: ignore - - - @distributed_trace - def get_nodes_event_list( - self, - start_time_utc, # type: str - end_time_utc, # type: str - timeout=60, # type: Optional[int] - events_types_filter=None, # type: Optional[str] - exclude_analysis_events=None, # type: Optional[bool] - skip_correlation_lookup=None, # type: Optional[bool] - **kwargs # type: Any - ): - # type: (...) -> List["_models.NodeEvent"] - """Gets all Nodes-related Events. - - The response is list of NodeEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of NodeEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.NodeEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NodeEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_nodes_event_list_request( - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_nodes_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[NodeEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_nodes_event_list.metadata = {'url': "/EventsStore/Nodes/Events"} # type: ignore - - - @distributed_trace - def get_application_event_list( - self, - application_id, # type: str - start_time_utc, # type: str - end_time_utc, # type: str - timeout=60, # type: Optional[int] - events_types_filter=None, # type: Optional[str] - exclude_analysis_events=None, # type: Optional[bool] - skip_correlation_lookup=None, # type: Optional[bool] - **kwargs # type: Any - ): - # type: (...) -> List["_models.ApplicationEvent"] - """Gets an Application-related events. - - The response is list of ApplicationEvent objects. - - :param application_id: The identity of the application. This is typically the full name of the - application without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the application name is "fabric:/myapp/app1", the application identity would - be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. - :type application_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ApplicationEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ApplicationEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ApplicationEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_application_event_list_request( - application_id=application_id, - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_application_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ApplicationEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_application_event_list.metadata = {'url': "/EventsStore/Applications/{applicationId}/$/Events"} # type: ignore - - - @distributed_trace - def get_applications_event_list( - self, - start_time_utc, # type: str - end_time_utc, # type: str - timeout=60, # type: Optional[int] - events_types_filter=None, # type: Optional[str] - exclude_analysis_events=None, # type: Optional[bool] - skip_correlation_lookup=None, # type: Optional[bool] - **kwargs # type: Any - ): - # type: (...) -> List["_models.ApplicationEvent"] - """Gets all Applications-related events. - - The response is list of ApplicationEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ApplicationEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ApplicationEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ApplicationEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_applications_event_list_request( - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_applications_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ApplicationEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_applications_event_list.metadata = {'url': "/EventsStore/Applications/Events"} # type: ignore - - - @distributed_trace - def get_service_event_list( - self, - service_id, # type: str - start_time_utc, # type: str - end_time_utc, # type: str - timeout=60, # type: Optional[int] - events_types_filter=None, # type: Optional[str] - exclude_analysis_events=None, # type: Optional[bool] - skip_correlation_lookup=None, # type: Optional[bool] - **kwargs # type: Any - ): - # type: (...) -> List["_models.ServiceEvent"] - """Gets a Service-related events. - - The response is list of ServiceEvent objects. - - :param service_id: The identity of the service. This ID is typically the full name of the - service without the 'fabric:' URI scheme. - Starting from version 6.0, hierarchical names are delimited with the "~" character. - For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be - "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. - :type service_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ServiceEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ServiceEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ServiceEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_service_event_list_request( - service_id=service_id, - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_service_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ServiceEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_service_event_list.metadata = {'url': "/EventsStore/Services/{serviceId}/$/Events"} # type: ignore - - - @distributed_trace - def get_services_event_list( - self, - start_time_utc, # type: str - end_time_utc, # type: str - timeout=60, # type: Optional[int] - events_types_filter=None, # type: Optional[str] - exclude_analysis_events=None, # type: Optional[bool] - skip_correlation_lookup=None, # type: Optional[bool] - **kwargs # type: Any - ): - # type: (...) -> List["_models.ServiceEvent"] - """Gets all Services-related events. - - The response is list of ServiceEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ServiceEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ServiceEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ServiceEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_services_event_list_request( - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_services_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ServiceEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_services_event_list.metadata = {'url': "/EventsStore/Services/Events"} # type: ignore - - - @distributed_trace - def get_partition_event_list( - self, - partition_id, # type: str - start_time_utc, # type: str - end_time_utc, # type: str - timeout=60, # type: Optional[int] - events_types_filter=None, # type: Optional[str] - exclude_analysis_events=None, # type: Optional[bool] - skip_correlation_lookup=None, # type: Optional[bool] - **kwargs # type: Any - ): - # type: (...) -> List["_models.PartitionEvent"] - """Gets a Partition-related events. - - The response is list of PartitionEvent objects. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of PartitionEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.PartitionEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.PartitionEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_event_list_request( - partition_id=partition_id, - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_partition_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[PartitionEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_event_list.metadata = {'url': "/EventsStore/Partitions/{partitionId}/$/Events"} # type: ignore - - - @distributed_trace - def get_partitions_event_list( - self, - start_time_utc, # type: str - end_time_utc, # type: str - timeout=60, # type: Optional[int] - events_types_filter=None, # type: Optional[str] - exclude_analysis_events=None, # type: Optional[bool] - skip_correlation_lookup=None, # type: Optional[bool] - **kwargs # type: Any - ): - # type: (...) -> List["_models.PartitionEvent"] - """Gets all Partitions-related events. - - The response is list of PartitionEvent objects. - - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of PartitionEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.PartitionEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.PartitionEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partitions_event_list_request( - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_partitions_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[PartitionEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partitions_event_list.metadata = {'url': "/EventsStore/Partitions/Events"} # type: ignore - - - @distributed_trace - def get_partition_replica_event_list( - self, - partition_id, # type: str - replica_id, # type: str - start_time_utc, # type: str - end_time_utc, # type: str - timeout=60, # type: Optional[int] - events_types_filter=None, # type: Optional[str] - exclude_analysis_events=None, # type: Optional[bool] - skip_correlation_lookup=None, # type: Optional[bool] - **kwargs # type: Any - ): - # type: (...) -> List["_models.ReplicaEvent"] - """Gets a Partition Replica-related events. - - The response is list of ReplicaEvent objects. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param replica_id: The identifier of the replica. - :type replica_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ReplicaEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ReplicaEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ReplicaEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_replica_event_list_request( - partition_id=partition_id, - replica_id=replica_id, - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_partition_replica_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ReplicaEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_replica_event_list.metadata = {'url': "/EventsStore/Partitions/{partitionId}/$/Replicas/{replicaId}/$/Events"} # type: ignore - - - @distributed_trace - def get_partition_replicas_event_list( - self, - partition_id, # type: str - start_time_utc, # type: str - end_time_utc, # type: str - timeout=60, # type: Optional[int] - events_types_filter=None, # type: Optional[str] - exclude_analysis_events=None, # type: Optional[bool] - skip_correlation_lookup=None, # type: Optional[bool] - **kwargs # type: Any - ): - # type: (...) -> List["_models.ReplicaEvent"] - """Gets all Replicas-related events for a Partition. - - The response is list of ReplicaEvent objects. - - :param partition_id: The identity of the partition. - :type partition_id: str - :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type start_time_utc: str - :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. - :type end_time_utc: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :param events_types_filter: This is a comma separated string specifying the types of - FabricEvents that should only be included in the response. Default value is None. - :type events_types_filter: str - :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true is - passed. Default value is None. - :type exclude_analysis_events: bool - :param skip_correlation_lookup: This param disables the search of CorrelatedEvents information - if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field - in every FabricEvent gets populated. Default value is None. - :type skip_correlation_lookup: bool - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of ReplicaEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.ReplicaEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.ReplicaEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_partition_replicas_event_list_request( - partition_id=partition_id, - api_version=api_version, - start_time_utc=start_time_utc, - end_time_utc=end_time_utc, - timeout=timeout, - events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, - template_url=self.get_partition_replicas_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[ReplicaEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_partition_replicas_event_list.metadata = {'url': "/EventsStore/Partitions/{partitionId}/$/Replicas/Events"} # type: ignore - - - @distributed_trace - def get_correlated_event_list( - self, - event_instance_id, # type: str - timeout=60, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> List["_models.FabricEvent"] - """Gets all correlated events for a given event. - - The response is list of FabricEvents. - - :param event_instance_id: The EventInstanceId. - :type event_instance_id: str - :param timeout: The server timeout for performing the operation in seconds. This timeout - specifies the time duration that the client is willing to wait for the requested operation to - complete. The default value for this parameter is 60 seconds. Default value is 60. - :type timeout: long - :keyword callable cls: A custom type or function that will be passed the direct response - :return: list of FabricEvent, or the result of cls(response) - :rtype: list[~azure.servicefabric.models.FabricEvent] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[List["_models.FabricEvent"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "9.0.0.46") # type: str - - - request = build_get_correlated_event_list_request( - event_instance_id=event_instance_id, - api_version=api_version, - timeout=timeout, - template_url=self.get_correlated_event_list.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.FabricError, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('[FabricEvent]', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_correlated_event_list.metadata = {'url': "/EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events"} # type: ignore - diff --git a/src/setup.py b/src/setup.py index f7510174..71a5ce0b 100644 --- a/src/setup.py +++ b/src/setup.py @@ -31,12 +31,13 @@ def read(fname): 'Environment :: Console', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8' + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', ], keywords='servicefabric azure', - python_requires='>3.5, <4', + python_requires='>3.6, <4', packages=[ 'sfctl', 'sfctl.helps', diff --git a/src/sfctl/apiclient.py b/src/sfctl/apiclient.py index 65daadbc..28269052 100644 --- a/src/sfctl/apiclient.py +++ b/src/sfctl/apiclient.py @@ -17,16 +17,16 @@ from azure.core.pipeline.policies import SansIOHTTPPolicy from azure.core.pipeline import PipelineRequest -class MyAuthenticationPolicy(SansIOHTTPPolicy): +class FakeAuthenticationPolicy(SansIOHTTPPolicy): def __init__(self): self -class dummmy_protocol(TokenCredential): +class FakeCredentialProtocol(TokenCredential): def __init__(self): self def get_token(self, scopes): - pass #return AccessToken(token="",expires_on=1111111111) + pass def create(_): """Create a client for Service Fabric APIs.""" @@ -40,7 +40,6 @@ def create(_): 'you may need to run the command with sudo.') no_verify = no_verify_setting() - logging.info(no_verify) headers = {} @@ -51,11 +50,9 @@ def create(_): ca_cert = ca_cert_info() if ca_cert is not None: no_verify = ca_cert - - dummy_credential = dummmy_protocol() - client = ServiceFabricClientAPIs(dummy_credential, base_url=endpoint, retry_total=0, + client = ServiceFabricClientAPIs(FakeCredentialProtocol(), endpoint=endpoint, retry_total=0, connection_verify=False, enforce_https=False, - connection_cert=cert_info(), authentication_policy=MyAuthenticationPolicy()) + connection_cert=cert_info(), authentication_policy=FakeAuthenticationPolicy()) return client diff --git a/src/sfctl/commands.py b/src/sfctl/commands.py index 85f1bc44..04fd3df6 100644 --- a/src/sfctl/commands.py +++ b/src/sfctl/commands.py @@ -61,9 +61,7 @@ def load_command_table(self, args): # pylint: disable=too-many-statements with CommandGroup(self, 'rpm', client_func_path, client_factory=client_create) as group: - group.command('delete', 'delete_repair_task') group.command('list', 'get_repair_task_list') - group.command('approve-force', 'force_approve_repair_task') with CommandGroup(self, 'sa-cluster', client_func_path, client_factory=client_create) as group: @@ -87,10 +85,7 @@ def load_command_table(self, args): # pylint: disable=too-many-statements group.command('recover-system', 'recover_system_partitions') group.command('operation-list', 'get_fault_operation_list') group.command('operation-cancel', 'cancel_operation') - group.command('provision', 'provision_cluster') - group.command('unprovision', 'unprovision_cluster') group.command('upgrade-rollback', 'rollback_cluster_upgrade') - group.command('upgrade-resume', 'resume_cluster_upgrade') with CommandGroup(self, 'node', client_func_path, client_factory=client_create) as group: @@ -98,10 +93,8 @@ def load_command_table(self, args): # pylint: disable=too-many-statements group.command('info', 'get_node_info') group.command('health', 'get_node_health') group.command('load', 'get_node_load_info') - group.command('disable', 'disable_node') group.command('enable', 'enable_node') group.command('remove-state', 'remove_node_state') - group.command('restart', 'restart_node') group.command('transition', 'start_node_transition') group.command( 'transition-status', @@ -125,12 +118,10 @@ def load_command_table(self, args): # pylint: disable=too-many-statements group.command('type-list', 'get_application_type_info_list') group.command('type', 'get_application_type_info_list_by_name') group.command('unprovision', 'unprovision_application_type') - group.command('delete', 'delete_application') group.command('list', 'get_application_info_list') group.command('info', 'get_application_info') group.command('health', 'get_application_health') group.command('upgrade-status', 'get_application_upgrade') - group.command('upgrade-resume', 'resume_application_upgrade') group.command( 'upgrade-rollback', 'rollback_application_upgrade' @@ -298,6 +289,9 @@ def load_command_table(self, args): # pylint: disable=too-many-statements client_factory=client_create) as group: group.command('upgrade', 'upgrade') group.command('upgrade-update', 'update_upgrade') + group.command('provision', 'provision') + group.command('unprovision', 'unprovision_cluster') + group.command('upgrade-resume', 'resume_cluster_upgrade') with CommandGroup(self, 'sa-cluster', 'sfctl.custom_cluster_upgrade#{}', client_factory=client_create) as group: @@ -312,6 +306,8 @@ def load_command_table(self, args): # pylint: disable=too-many-statements client_factory=client_create) as group: group.command('create', 'create') group.command('upgrade', 'upgrade') + group.command('delete', 'delete_application') + group.command('upgrade-resume', 'resume_application_upgrade') with CommandGroup(self, 'application', 'sfctl.custom_app#{}') as group: group.command('upload', 'upload') @@ -340,6 +336,11 @@ def load_command_table(self, args): # pylint: disable=too-many-statements group.command('command', 'is_command') group.command('query', 'is_query') + with CommandGroup(self, 'rpm', 'sfctl.custom_is#{}', + client_factory=client_create) as group: + group.command('approve-force', 'force_approve_repair_task') + group.command('delete', 'delete_repair_task') + with CommandGroup(self, 'property', 'sfctl.custom_property#{}', client_factory=client_create) as group: group.command('put', 'naming_property_put') @@ -378,6 +379,9 @@ def load_command_table(self, args): # pylint: disable=too-many-statements client_factory=client_create) as group: group.command('add-node-tags', 'add_node_tags') group.command('remove-node-tags', 'remove_node_tags') + group.command('disable', 'disable_node') + group.command('restart', 'restart_node') + # --------------- # Settings diff --git a/src/sfctl/custom_app.py b/src/sfctl/custom_app.py index 6d0109de..64df730a 100644 --- a/src/sfctl/custom_app.py +++ b/src/sfctl/custom_app.py @@ -614,21 +614,18 @@ def upload(path, imagestore_string='fabric:ImageStore', show_progress=False, tim def parse_app_params(formatted_params): """Parse application parameters from string""" - from azure.servicefabric.models import ApplicationParameter - if formatted_params is None: return None res = [] for k in formatted_params: - param = ApplicationParameter(key=k, value=formatted_params[k]) + param = {"Key": k, "Value": formatted_params[k]} res.append(param) return res def parse_app_metrics(formatted_metrics): """Parse application metrics description from string""" - from azure.servicefabric.models import ApplicationMetricDescription if formatted_metrics is None: return None @@ -645,11 +642,11 @@ def parse_app_metrics(formatted_metrics): reservation_capacity = metric.get('reservation_capacity', None) total_application_capacity = metric.get('total_application_capacity', None) - res.append(ApplicationMetricDescription( - name=metric_name, - maximum_capacity=maximum_capacity, - reservation_capacity=reservation_capacity, - total_application_capacity=total_application_capacity)) + res.append({ + "Name": metric_name, + "MaximumCapacity": maximum_capacity, + "ReservationCapacity": reservation_capacity, + "TotalApplicationCapacity": total_application_capacity}) return res @@ -679,7 +676,6 @@ def create(client, # pylint: disable=too-many-locals,too-many-arguments descriptions. A metric is defined as a name, associated with a set of capacities for each node that the application exists on. """ - from azure.servicefabric.models import ApplicationDescription, ApplicationCapacityDescription if (any([min_node_count, max_node_count]) and not all([min_node_count, max_node_count])): @@ -694,17 +690,17 @@ def create(client, # pylint: disable=too-many-locals,too-many-arguments app_metrics = parse_app_metrics(metrics) - app_cap_desc = ApplicationCapacityDescription(minimum_nodes=min_node_count, - maximum_nodes=max_node_count, - application_metrics=app_metrics) + app_cap_desc = {"MinimumNodes": min_node_count, + "MaximumNodes": max_node_count, + "ApplicationMetrics": app_metrics} - app_desc = ApplicationDescription(name=app_name, - type_name=app_type, - type_version=app_version, - parameter_list=app_params, - application_capacity=app_cap_desc) + app_desc = {"Name": app_name, + "TypeName": app_type, + "TypeVersion": app_version, + "ParameterList": app_params, + "ApplicationCapacity": app_cap_desc} - client.create_application(app_desc, timeout) + client.create_application(app_desc, timeout=timeout) def upgrade( # pylint: disable=too-many-arguments,too-many-locals,missing-docstring client, application_id, application_version, parameters, @@ -718,21 +714,18 @@ def upgrade( # pylint: disable=too-many-arguments,too-many-locals,missing-docst warning_as_error=False, max_unhealthy_apps=0, default_service_health_policy=None, service_health_policy=None, timeout=60): - from azure.servicefabric.models import (ApplicationUpgradeDescription, - MonitoringPolicyDescription, - ApplicationHealthPolicy) from sfctl.custom_health import (parse_service_health_policy_map, parse_service_health_policy) - monitoring_policy = MonitoringPolicyDescription( - failure_action=failure_action, - health_check_wait_duration_in_milliseconds=health_check_wait_duration, - health_check_stable_duration_in_milliseconds=health_check_stable_duration, - health_check_retry_timeout_in_milliseconds=health_check_retry_timeout, - upgrade_timeout_in_milliseconds=upgrade_timeout, - upgrade_domain_timeout_in_milliseconds=upgrade_domain_timeout - ) + monitoring_policy = { + "FailureAction": failure_action, + "HealthCheckWaitDurationInMilliseconds": health_check_wait_duration, + "HealthCheckStableDurationInMilliseconds": health_check_stable_duration, + "healthCheckRetryTimeoutInMilliseconds": health_check_retry_timeout, + "UpgradeTimeoutInMilliseconds": upgrade_timeout, + "UpgradeDomainTimeoutInMilliseconds": upgrade_domain_timeout + } # Must always have empty list app_params = parse_app_params(parameters) @@ -743,21 +736,59 @@ def upgrade( # pylint: disable=too-many-arguments,too-many-locals,missing-docst map_shp = parse_service_health_policy_map(service_health_policy) - app_health_policy = ApplicationHealthPolicy( - consider_warning_as_error=warning_as_error, - max_percent_unhealthy_deployed_applications=max_unhealthy_apps, - default_service_type_health_policy=def_shp, - service_type_health_policy_map=map_shp) - - desc = ApplicationUpgradeDescription( - name='fabric:/' + application_id, - target_application_type_version=application_version, - parameters=app_params, - upgrade_kind='Rolling', - rolling_upgrade_mode=mode, - upgrade_replica_set_check_timeout_in_seconds=replica_set_check_timeout, - force_restart=force_restart, - monitoring_policy=monitoring_policy, - application_health_policy=app_health_policy) - - client.start_application_upgrade(application_id, desc, timeout) + app_health_policy = { + "ConsiderWarningAsError": warning_as_error, + "MaxPercentUnhealthyDeployedApplications": max_unhealthy_apps, + "DefaultServiceTypeHealthPolicy": def_shp, + "ServiceTypeHealthPolicyMap": map_shp + } + + desc = { + "Name": 'fabric:/' + application_id, + "TargetApplicationTypeVersion": application_version, + "Parameters": app_params, + "UpgradeKind": 'Rolling', + "RollingUpgradeMode": mode, + "UpgradeReplicaSetCheckTimeoutInSeconds": replica_set_check_timeout, + "ForceRestart": force_restart, + "MonitoringPolicy": monitoring_policy, + "ApplicationHealthPolicy": app_health_policy} + + client.start_application_upgrade(application_id, desc, timeout=timeout) + + +def resume_application_upgrade(client, application_id, upgrade_domain_name, timeout=60): + """Resumes upgrading an application in the Service Fabric cluster. + :param str application_id: The identity of the application. This is typically the full name + of the application without the 'fabric:' URI scheme. Starting from + version 6.0, hierarchical names are delimited with the "~" + character. For example, if the application name is + "fabric:/myapp/app1", the application identity would be + "myapp~app1" in 6.0+ and "myapp/app1" in previous versions + + :param str upgrade_domain_name: The name of the upgrade domain in which to resume the + upgrade. + """ + payload = { + "UpgradeDomainName": upgrade_domain_name + } + + client.resume_application_upgrade(application_id, payload, timeout=timeout) + + +def delete_application(client, application_id, force_remove, timeout=60): + """Deletes an existing Service Fabric application. + + :param str application_id: The identity of the application. This is typically the full name + of the application without the 'fabric:' URI scheme. Starting from + version 6.0, hierarchical names are delimited with the "~" + character. For example, if the application name is + "fabric:/myapp/app1", the application identity would be + "myapp~app1" in 6.0+ and "myapp/app1" in previous versions + :param bool force_remove: Remove a Service Fabric application or service forcefully without + going through the graceful shutdown sequence. This parameter can + be used to forcefully delete an application or service for which + delete is timing out due to issues in the service code that + prevents graceful close of replicas. + """ + client.delete_application(application_id, force_remove=force_remove, timeout=timeout) \ No newline at end of file diff --git a/src/sfctl/custom_app_type.py b/src/sfctl/custom_app_type.py index 28f6e420..064f5117 100644 --- a/src/sfctl/custom_app_type.py +++ b/src/sfctl/custom_app_type.py @@ -6,9 +6,7 @@ """Custom application type related commands""" -from collections import OrderedDict from knack.util import CLIError -from sfctl.custom_exceptions import SFCTLInternalException # We are disabling some W0212 (protected-access) lint warnings in the following function # because of a problem with the generated SDK that does not allow this @@ -29,10 +27,6 @@ def provision_application_type(client, #pylint: disable=too-many-locals,invalid- application package in the image store. """ - from azure.servicefabric.models import (ProvisionApplicationTypeDescription, - ExternalStoreProvisionApplicationTypeDescription, - FabricErrorException) - provision_description = None # Validate inputs @@ -46,11 +40,13 @@ def provision_application_type(client, #pylint: disable=too-many-locals,invalid- raise CLIError('Missing required parameters. The following are required: ' '--application-package-download-uri, --application-type-name, ' '--application-type-version.') - provision_description = ExternalStoreProvisionApplicationTypeDescription( - async_property=no_wait, - application_package_download_uri=application_package_download_uri, - application_type_name=application_type_name, - application_type_version=application_type_version) + provision_description = { + "Kind": "ExternalStore", + "Async": no_wait, + 'ApplicationPackageDownloadUri': application_package_download_uri, + 'ApplicationTypeName': application_type_name, + 'ApplicationTypeVersion': application_type_version + } else: if not application_type_build_path: raise CLIError('Missing required parameter ' @@ -62,56 +58,11 @@ def provision_application_type(client, #pylint: disable=too-many-locals,invalid- '--application-package-download-uri, --application-type-name, ' '--application-type-version.') - provision_description = ProvisionApplicationTypeDescription( - async_property=no_wait, - application_type_build_path=application_type_build_path) - - api_version = "6.2" - - # Construct URLs - url = '/ApplicationTypes/$/Provision' - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = client._serialize.query( - "api_version", api_version, 'str') - - query_parameters['timeout'] = client._serialize.query( - "timeout", - timeout, - 'long', - maximum=4294967295, - minimum=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - - # Construct body - body_content = None - if not external_provision: - body_content = client._serialize.body( - provision_description, - 'ProvisionApplicationTypeDescription') - else: - body_content = client._serialize.body( - provision_description, - 'ExternalStoreProvisionApplicationTypeDescription') - - # Create a new sorted dictionary since we don't have move_to_end in python 2 - body_content_sorted = OrderedDict([('Kind', body_content['Kind'])]) - for key in body_content: - if key != 'Kind': - body_content_sorted[key] = body_content[key] - - if list(body_content_sorted.keys())[0] != "Kind": - raise SFCTLInternalException( - 'provision_application_type: Kind must be the first item to be serialized.') + provision_description = { + "Kind": "ImageStorePath", + 'Async': no_wait, + 'ApplicationTypeBuildPath': application_type_build_path + } - # Construct and send request - request = client._client.post(url, query_parameters) - response = client._client.send( - request, header_parameters, body_content_sorted) + return client.provision_application_type(provision_description) - if response.status_code not in [200, 202]: - raise FabricErrorException(client._deserialize, response) diff --git a/src/sfctl/custom_chaos.py b/src/sfctl/custom_chaos.py index cea84d3b..552c8f8a 100644 --- a/src/sfctl/custom_chaos.py +++ b/src/sfctl/custom_chaos.py @@ -8,8 +8,6 @@ def parse_chaos_parameters(chaos_parameters): #pylint: disable=too-many-locals """Parse ChaosParameters from string""" - from azure.servicefabric.models import ChaosParameters, ChaosContext, ChaosTargetFilter - from sfctl.custom_cluster_upgrade import create_cluster_health_policy time_to_run = chaos_parameters.get("TimeToRunInSeconds") @@ -31,46 +29,47 @@ def parse_chaos_parameters(chaos_parameters): #pylint: disable=too-many-locals chaos_context = chaos_parameters.get("Context") context = None if chaos_context is not None: - context = ChaosContext(map=chaos_context.get("Map")) + context = {"Map": chaos_context.get("Map")} chaos_target_filter = chaos_parameters.get("ChaosTargetFilter") target_filter = None if chaos_target_filter is not None: - target_filter = ChaosTargetFilter( - node_type_inclusion_list=chaos_target_filter.get("NodeTypeInclusionList"), - application_inclusion_list=chaos_target_filter.get("ApplicationTypeInclusionList")) - - return ChaosParameters(time_to_run_in_seconds=time_to_run, - max_cluster_stabilization_timeout_in_seconds=max_cluster_stabilization, - max_concurrent_faults=max_concurrent_faults, - enable_move_replica_faults=enable_move_replica_faults, - wait_time_between_faults_in_seconds=wait_time_between_faults, - wait_time_between_iterations_in_seconds=wait_time_between_iterations, - cluster_health_policy=health_policy, - context=context, - chaos_target_filter=target_filter) + target_filter = { + "NodeTypeInclusionList": chaos_target_filter.get("NodeTypeInclusionList"), + "ApplicationInclusionList": chaos_target_filter.get("ApplicationTypeInclusionList") + } + + return {"TimeToRunInSeconds": time_to_run, + "MaxClusterStabilizationTimeoutInSeconds": max_cluster_stabilization, + "MaxConcurrentFaults": max_concurrent_faults, + "EnableMoveReplicaFaults": enable_move_replica_faults, + "WaitTimeBetweenFaultsInSeconds": wait_time_between_faults, + "WaitTimeBetweenIterationsInSeconds": wait_time_between_iterations, + "ClusterHealthPolicy": health_policy, + "Context": context, + "ChaosTargetFilter": target_filter} + def parse_chaos_context(formatted_chaos_context): """"Parse a chaos context from a formatted context""" - from azure.servicefabric.models import ChaosContext if formatted_chaos_context is None: return None - return ChaosContext(map=formatted_chaos_context) + return {"Map": formatted_chaos_context} def parse_chaos_target_filter(formatted_chaos_target_filter): """"Parse a chaos target filter from a formatted filter""" - from azure.servicefabric.models import ChaosTargetFilter if formatted_chaos_target_filter is None: return None - nodetype_inclusion_list = formatted_chaos_target_filter.get('NodeTypeInclusionList', None) # pylint: disable=line-too-long - application_inclusion_list = formatted_chaos_target_filter.get('ApplicationInclusionList', None) # pylint: disable=line-too-long + nodetype_inclusion_list = formatted_chaos_target_filter.get('NodeTypeInclusionList', None) # pylint: disable=line-too-long + application_inclusion_list = formatted_chaos_target_filter.get('ApplicationInclusionList', None) # pylint: disable=line-too-long + + return {"NodeTypeInclusionList": nodetype_inclusion_list, + "ApplicationInclusionList": application_inclusion_list} - return ChaosTargetFilter(node_type_inclusion_list=nodetype_inclusion_list, - application_inclusion_list=application_inclusion_list) def start(client, time_to_run="4294967295", max_cluster_stabilization=60, #pylint: disable=too-many-arguments,too-many-locals,missing-docstring max_concurrent_faults=1, disable_move_replica_faults=False, @@ -84,33 +83,30 @@ def start(client, time_to_run="4294967295", max_cluster_stabilization=60, #pylin chaos_target_filter=None, timeout=60): - from azure.servicefabric.models import ChaosParameters, ClusterHealthPolicy - from sfctl.custom_health import parse_app_health_map context = parse_chaos_context(context) health_map = parse_app_health_map(app_type_health_policy_map) - health_policy = ClusterHealthPolicy( - consider_warning_as_error=warning_as_error, - max_percent_unhealthy_nodes=max_percent_unhealthy_nodes, - max_percent_unhealthy_applications=max_percent_unhealthy_apps, - application_type_health_policy_map=health_map) + health_policy = { + "ConsiderWarningAsError": warning_as_error, + "MaxPercentUnhealthyNodes": max_percent_unhealthy_nodes, + "MaxPercentUnhealthyApplications": max_percent_unhealthy_apps, + "ApplicationTypeHealthPolicyMap": health_map} target_filter = parse_chaos_target_filter(chaos_target_filter) #pylint: disable=too-many-arguments - chaos_params = ChaosParameters( - time_to_run_in_seconds=time_to_run, - max_cluster_stabilization_timeout_in_seconds=max_cluster_stabilization, - max_concurrent_faults=max_concurrent_faults, - enable_move_replica_faults=not disable_move_replica_faults, - wait_time_between_faults_in_seconds=wait_time_between_faults, - wait_time_between_iterations_in_seconds=wait_time_between_iterations, - cluster_health_policy=health_policy, - context=context, - chaos_target_filter=target_filter) + chaos_params = {"TimeToRunInSeconds": time_to_run, + "MaxClusterStabilizationTimeoutInSeconds": max_cluster_stabilization, + "MaxConcurrentFaults": max_concurrent_faults, + "EnableMoveReplicaFaults": not disable_move_replica_faults, + "WaitTimeBetweenFaultsInSeconds": wait_time_between_faults, + "WaitTimeBetweenIterationsInSeconds": wait_time_between_iterations, + "ClusterHealthPolicy": health_policy, + "Context": context, + "ChaosTargetFilter": target_filter} #pylint: enable=too-many-arguments - client.start_chaos(chaos_params, timeout) + client.start_chaos(chaos_params, timeout=timeout) diff --git a/src/sfctl/custom_chaos_schedule.py b/src/sfctl/custom_chaos_schedule.py index 37f667c3..fa76601e 100644 --- a/src/sfctl/custom_chaos_schedule.py +++ b/src/sfctl/custom_chaos_schedule.py @@ -6,6 +6,7 @@ """Custom commands for the Service Fabric chaos schedule test service""" + def parse_time_of_day(time_of_day): """ Parse a TimeOfDay from string. @@ -13,7 +14,6 @@ def parse_time_of_day(time_of_day): "Hour": int "Minute": int """ - from azure.servicefabric.models import TimeOfDay if not time_of_day: return None @@ -24,7 +24,8 @@ def parse_time_of_day(time_of_day): if hour is None or minute is None: return None - return TimeOfDay(hour=hour, minute=minute) + return {"Hour": hour, "Minute": minute} + def parse_time_range(time_range): """ @@ -33,8 +34,6 @@ def parse_time_range(time_range): "StartTime": dictionary like time_of_day "EndTime": dictionary like time_of_day """ - from azure.servicefabric.models import TimeRange - if time_range is None: return None @@ -43,7 +42,7 @@ def parse_time_range(time_range): # if either start_time or end_time is None, the resulting API call will fail with an exception - return TimeRange(start_time=start_time, end_time=end_time) + return {"StartTime": start_time, "EndTime": end_time} def parse_active_time_ranges(time_ranges): """ @@ -69,7 +68,6 @@ def parse_active_days(active_days): ... "Saturday": bool """ - from azure.servicefabric.models import ChaosScheduleJobActiveDaysOfWeek if active_days is None: return None @@ -82,13 +80,14 @@ def parse_active_days(active_days): friday = active_days.get("Friday", False) saturday = active_days.get("Saturday", False) - return ChaosScheduleJobActiveDaysOfWeek(sunday=sunday, - monday=monday, - tuesday=tuesday, - wednesday=wednesday, - thursday=thursday, - friday=friday, - saturday=saturday) + return {"Sunday": sunday, + "Monday": monday, + "Tuesday": tuesday, + "Wednesday": wednesday, + "Thursday": thursday, + "Friday": friday, + "Saturday": saturday} + def parse_job(job): """ @@ -98,7 +97,6 @@ def parse_job(job): "Days": a dictionary like active_days "Times": a list like time_ranges """ - from azure.servicefabric.models import ChaosScheduleJob if job is None: return None @@ -107,9 +105,9 @@ def parse_job(job): active_days = parse_active_days(job.get('Days')) times = parse_active_time_ranges(job.get('Times')) - return ChaosScheduleJob(chaos_parameters=chaos_parameters, - days=active_days, - times=times) + return {"ChaosParameters": chaos_parameters, + "Days": active_days, + "Times": times} def parse_jobs(jobs): """ @@ -134,8 +132,6 @@ def parse_chaos_params_dictionary(chaos_parameters_dictionary): "Key": string "Value": a dictionary of a chaos_parameters """ - - from azure.servicefabric.models import ChaosParametersDictionaryItem from sfctl.custom_chaos import parse_chaos_parameters if chaos_parameters_dictionary is None: @@ -147,7 +143,7 @@ def parse_chaos_params_dictionary(chaos_parameters_dictionary): key = dictionary_entry.get("Key") value = parse_chaos_parameters(dictionary_entry.get("Value")) - parsed_dictionary.append(ChaosParametersDictionaryItem(key=key, value=value)) + parsed_dictionary.append({"Key": key, "Value": value}) return parsed_dictionary @@ -162,7 +158,6 @@ def set_chaos_schedule( #pylint: disable=too-many-arguments,too-many-locals Set the Chaos Schedule currently in use by Chaos. Chaos will automatically schedule runs based on the Chaos Schedule. """ - from azure.servicefabric.models import ChaosSchedule if chaos_parameters_dictionary is None: chaos_parameters_dictionary = list() @@ -174,9 +169,10 @@ def set_chaos_schedule( #pylint: disable=too-many-arguments,too-many-locals parse_chaos_params_dictionary(chaos_parameters_dictionary) parsed_jobs = parse_jobs(jobs) - schedule = ChaosSchedule(start_date=start_date_utc, - expiry_date=expiry_date_utc, - chaos_parameters_dictionary=parsed_chaos_params_dictionary, - jobs=parsed_jobs) + schedule = {"StartDate": start_date_utc, + "ExpiryDate": expiry_date_utc, + "ChaosParametersDictionary": parsed_chaos_params_dictionary, + "Jobs": parsed_jobs, + "Version": version} - return client.post_chaos_schedule(timeout=timeout, version=version, schedule=schedule) + return client.post_chaos_schedule(schedule, timeout=timeout) diff --git a/src/sfctl/custom_cluster.py b/src/sfctl/custom_cluster.py index 928f3c80..1ce869fb 100644 --- a/src/sfctl/custom_cluster.py +++ b/src/sfctl/custom_cluster.py @@ -13,12 +13,12 @@ from knack.util import CLIError from knack.log import get_logger from azure.servicefabric import ServiceFabricClientAPIs -from msrest import ServiceClient, Configuration -from sfctl.apiclient import dummmy_protocol +from sfctl.apiclient import FakeAuthenticationPolicy, FakeCredentialProtocol from sfctl.config import client_endpoint, SF_CLI_VERSION_CHECK_INTERVAL, get_cluster_auth, set_aad_cache, set_aad_metadata # pylint: disable=line-too-long from sfctl.state import get_sfctl_version from sfctl.custom_exceptions import SFCTLInternalException -from sfctl.auth import ClientCertAuthentication, AdalAuthentication +from sfctl.auth import AdalAuthentication2, ClientCertAuthentication, AdalAuthentication +from azure.core.rest import HttpRequest, HttpResponse logger = get_logger(__name__) # pylint: disable=invalid-name @@ -60,7 +60,7 @@ def show_connection(): return endpoint -def _get_client_cert_auth(pem, cert, key, ca, no_verify): # pylint: disable=invalid-name +def _get_cert_based_client(endpoint, pem, cert, key, ca, no_verify): # pylint: disable=invalid-name """ Return a ClientCertAuthentication based on given credentials @@ -72,14 +72,27 @@ def _get_client_cert_auth(pem, cert, key, ca, no_verify): # pylint: disable=inva :return: ClientCertAuthentication """ + if ca is not None: + no_verify = ca + client_cert = None if pem: client_cert = pem elif cert: client_cert = (cert, key) - return ClientCertAuthentication(client_cert, ca, no_verify) + return ServiceFabricClientAPIs(FakeCredentialProtocol(), endpoint=endpoint, retry_total=0, + connection_verify=no_verify, enforce_https=False, + connection_cert=client_cert, authentication_policy=FakeAuthenticationPolicy()) + +def _get_aad_based_client(endpoint, no_verify): + headers = {} + auth = AdalAuthentication2() + headers['Authorization'] = auth.get_header() + return ServiceFabricClientAPIs(FakeCredentialProtocol(), endpoint=endpoint, retry_total=0, + connection_verify=no_verify, enforce_https=False, + authentication_policy=FakeAuthenticationPolicy()) def _get_rest_client(endpoint, cert=None, key=None, pem=None, ca=None, # pylint: disable=invalid-name, too-many-arguments aad=False, no_verify=False): @@ -99,15 +112,12 @@ def _get_rest_client(endpoint, cert=None, key=None, pem=None, ca=None, # pylint if aad: new_token, new_cache = get_aad_token(endpoint, no_verify) set_aad_cache(new_token, new_cache) - return ServiceClient(AdalAuthentication(no_verify), Configuration(endpoint)) + return _get_aad_based_client(endpoint, no_verify) # If the code reaches here, it is not AAD - return ServiceClient( - _get_client_cert_auth(pem, cert, key, ca, no_verify), - Configuration(endpoint) - ) - + return _get_cert_based_client(endpoint, pem, cert, key, ca, no_verify) + def select(endpoint='http://localhost:19080', cert=None, key=None, pem=None, ca=None, #pylint: disable=invalid-name, too-many-arguments aad=False, no_verify=False): @@ -160,7 +170,7 @@ def select(endpoint='http://localhost:19080', cert=None, key=None, pem=None, ca= # Make sure basic GET request succeeds rest_client = _get_rest_client(endpoint, cert, key, pem, ca, aad, no_verify) - rest_client.send(rest_client.get('/')).raise_for_status() + rest_client.send_request(HttpRequest('GET', endpoint)).raise_for_status() set_cluster_endpoint(endpoint) set_no_verify(no_verify) @@ -220,11 +230,9 @@ def check_cluster_version(on_failure_or_connection, dummy_cluster_version=None): cluster_auth = get_cluster_auth() - auth = _get_client_cert_auth(cluster_auth['pem'], cluster_auth['cert'], cluster_auth['key'], + client = _get_cert_based_client(client_endpoint(), cluster_auth['pem'], cluster_auth['cert'], cluster_auth['key'], cluster_auth['ca'], cluster_auth['no_verify']) - client = ServiceFabricClientAPIs(auth, base_url=client_endpoint()) - sfctl_version = get_sfctl_version() # Update the timestamp of the last cluster version check @@ -235,7 +243,7 @@ def check_cluster_version(on_failure_or_connection, dummy_cluster_version=None): # is that the corresponding get_cluster_version API on the cluster doesn't exist. try: logger.info('Performing cluster version check') - cluster_version = client.get_cluster_version().version + cluster_version = client.get_cluster_version().get('Version') except: # pylint: disable=bare-except ex = exc_info()[0] @@ -289,11 +297,7 @@ def get_aad_token(endpoint, no_verify): #pylint: disable-msg=too-many-locals """Get AAD token""" - # auth = ClientCertAuthentication(None, None, no_verify) - dummy_credential = dummmy_protocol() - - - client = ServiceFabricClientAPIs(dummy_credential, base_url=endpoint, connection_verify=False) + client = ServiceFabricClientAPIs(FakeCredentialProtocol(), base_url=endpoint, connection_verify=False) aad_metadata = client.get_aad_metadata() if aad_metadata.type != "aad": diff --git a/src/sfctl/custom_cluster_upgrade.py b/src/sfctl/custom_cluster_upgrade.py index 31c0d370..e0b57529 100644 --- a/src/sfctl/custom_cluster_upgrade.py +++ b/src/sfctl/custom_cluster_upgrade.py @@ -12,7 +12,6 @@ def create_monitoring_policy(failure_action, health_check_wait, #pylint: disable health_check_stable, health_check_retry, upgrade_timeout, upgrade_domain_timeout): """Create a monitoring policy description for an upgrade""" - from azure.servicefabric.models import MonitoringPolicyDescription if failure_action not in ['Invalid', 'Rollback', 'Manual', None]: raise CLIError('Invalid upgrade failure action specified') @@ -20,80 +19,77 @@ def create_monitoring_policy(failure_action, health_check_wait, #pylint: disable if not any([failure_action, health_check_wait, health_check_stable, health_check_retry, upgrade_timeout, upgrade_domain_timeout]): return None - return MonitoringPolicyDescription( - failure_action=failure_action, - health_check_wait_duration_in_milliseconds=health_check_wait, - health_check_stable_duration_in_milliseconds=health_check_stable, - health_check_retry_timeout_in_milliseconds=health_check_retry, - upgrade_timeout_in_milliseconds=upgrade_timeout, - upgrade_domain_timeout_in_milliseconds=upgrade_domain_timeout) + return { + "FailureAction": failure_action, + "HealthCheckWaitDurationInMilliseconds": health_check_wait, + "HealthCheckStableDurationInMilliseconds": health_check_stable, + "HealthCheckRetryTimeoutInMilliseconds": health_check_retry, + "UpgradeTimeoutInMilliseconds": upgrade_timeout, + "UpgradeDomainTimeoutInMilliseconds": upgrade_domain_timeout + } def create_upgrade_health_policy(delta_unhealthy_nodes, ud_delta_unhealthy_nodes): """Create an upgrade node health policy""" - from azure.servicefabric.models import ClusterUpgradeHealthPolicyObject if not any([delta_unhealthy_nodes, ud_delta_unhealthy_nodes]): return None - return ClusterUpgradeHealthPolicyObject( - max_percent_delta_unhealthy_nodes=delta_unhealthy_nodes, - max_percent_upgrade_domain_delta_unhealthy_nodes=ud_delta_unhealthy_nodes - ) + return { + "MaxPercentDeltaUnhealthyNodes": delta_unhealthy_nodes, + "MaxPercentUpgradeDomainDeltaUnhealthyNodes":ud_delta_unhealthy_nodes + } def create_cluster_health_policy(warning_as_error, unhealthy_nodes, unhealthy_applications, application_type_health_map): """Create a cluster health policy for an upgrade""" - from azure.servicefabric.models import ClusterHealthPolicy, ApplicationTypeHealthPolicyMapItem app_type_list = None if application_type_health_map: app_type_list = [] for app_type in application_type_health_map: allowed_unhealthy = application_type_health_map[app_type] - policy_item = ApplicationTypeHealthPolicyMapItem(key=app_type, - value=allowed_unhealthy) + policy_item = {"Key": app_type, + "Value": allowed_unhealthy} app_type_list.append(policy_item) if not any([warning_as_error, unhealthy_nodes, unhealthy_applications, app_type_list]): return None - return ClusterHealthPolicy(consider_warning_as_error=warning_as_error, - max_percent_unhealthy_nodes=unhealthy_nodes, - max_percent_unhealthy_applications=unhealthy_applications, - application_type_health_policy_map=app_type_list) + return {"ConsiderWarningAsError": warning_as_error, + "MaxPercentUnhealthyNodes": unhealthy_nodes, + "MaxPercentUnhealthyApplications": unhealthy_applications, + "ApplicationTypeHealthPolicyMap": app_type_list} def parse_app_health_policy(app_health_map): """From a complex object create a map of application health policies""" - from azure.servicefabric.models import ApplicationHealthPolicies, ApplicationHealthPolicyMapItem if not app_health_map: return None policy_list = [] for app in app_health_map: allowed_unhealthy = app_health_map[app] - policy_item = ApplicationHealthPolicyMapItem(key=app, value=allowed_unhealthy) + policy_item = {"Key":app, "Value":allowed_unhealthy} policy_list.append(policy_item) - return ApplicationHealthPolicies(application_health_policy_map=policy_list) + return { "ApplicationHealthPolicyMap":policy_list} def create_rolling_update_desc( #pylint: disable=too-many-arguments rolling_upgrade_mode, force_restart, replica_set_check_timeout, failure_action, health_check_wait, health_check_stable, health_check_retry, upgrade_timeout, upgrade_domain_timeout): """Create an update description for an upgrade rolling mode""" - from azure.servicefabric.models import RollingUpgradeUpdateDescription - - return RollingUpgradeUpdateDescription( - rolling_upgrade_mode=rolling_upgrade_mode, - force_restart=force_restart, - replica_set_check_timeout_in_milliseconds=replica_set_check_timeout, #pylint: disable=line-too-long - failure_action=failure_action, - health_check_wait_duration_in_milliseconds=health_check_wait, - health_check_stable_duration_in_milliseconds=health_check_stable, - health_check_retry_timeout_in_milliseconds=health_check_retry, - upgrade_domain_timeout_in_milliseconds=upgrade_domain_timeout, - upgrade_timeout_in_milliseconds=upgrade_timeout) + + return { + "RollingUpgradeMode": rolling_upgrade_mode, + "ForceRestart": force_restart, + "ReplicaSetCheckTimeoutInMilliseconds": replica_set_check_timeout, #pylint: disable=line-too-long + "FailureAction":failure_action, + "HealthCheckWaitDurationInMilliseconds": health_check_wait, + "HealthCheckStableDurationInMilliseconds":health_check_stable, + "HealthCheckRetryTimeoutInMilliseconds": health_check_retry, + "UpgradeDomainTimeoutInMilliseconds": upgrade_domain_timeout, + "UpgradeTimeoutInMilliseconds": upgrade_timeout} def upgrade( #pylint: disable=too-many-locals,missing-docstring,invalid-name,too-many-arguments client, code_version=None, config_version=None, @@ -105,7 +101,6 @@ def upgrade( #pylint: disable=too-many-locals,missing-docstring,invalid-name,too app_type_health_map=None, delta_health_evaluation=False, delta_unhealthy_nodes=10, upgrade_domain_delta_unhealthy_nodes=15, app_health_map=None, timeout=60): - from azure.servicefabric.models import StartClusterUpgradeDescription mon_policy = create_monitoring_policy(failure_action, health_check_wait, health_check_stable, @@ -119,44 +114,41 @@ def upgrade( #pylint: disable=too-many-locals,missing-docstring,invalid-name,too delta_unhealthy_nodes, upgrade_domain_delta_unhealthy_nodes) app_health_policy = parse_app_health_policy(app_health_map) - upgrade_desc = StartClusterUpgradeDescription( - code_version=code_version, config_version=config_version, - upgrade_kind='Rolling', rolling_upgrade_mode=rolling_upgrade_mode, - upgrade_replica_set_check_timeout_in_seconds=replica_set_check_timeout, - force_restart=force_restart, monitoring_policy=mon_policy, - cluster_health_policy=cluster_policy, - enable_delta_health_evaluation=delta_health_evaluation, - cluster_upgrade_health_policy=cluster_upgrade_policy, - application_health_policy_map=app_health_policy) + upgrade_desc = { + "CodeVersion": code_version, "ConfigVersion": config_version, + "UpgradeKind": 'Rolling', "RollingUpgradeMode": rolling_upgrade_mode, + "UpgradeReplicaSetCheckTimeoutInSeconds": replica_set_check_timeout, + "ForceRestart": force_restart, "MonitoringPolicy": mon_policy, + "ClusterHealthPolicy": cluster_policy, + "EnableDeltaHealthEvaluation": delta_health_evaluation, + "ClusterUpgradeHealthPolicy": cluster_upgrade_policy, + "ApplicationHealthPolicyMap":app_health_policy} client.start_cluster_upgrade(upgrade_desc, timeout=timeout) def sa_configuration_upgrade( #pylint: disable=missing-docstring,invalid-name,too-many-arguments,too-many-locals - client, cluster_config, health_check_retry='PT0H0M0S', - health_check_wait='PT0H0M0S', health_check_stable='PT0H0M0S', - upgrade_domain_timeout='PT0H0M0S', upgrade_timeout='PT0H0M0S', + client, cluster_config, health_check_retry='P0D', + health_check_wait='P0D', health_check_stable='P0D', + upgrade_domain_timeout='P0D', upgrade_timeout='P0D', unhealthy_applications=0, unhealthy_nodes=0, delta_unhealthy_nodes=0, upgrade_domain_delta_unhealthy_nodes=0, application_health_policies=None, timeout=60): - from azure.servicefabric.models import ClusterConfigurationUpgradeDescription app_health_policies = parse_app_health_policy(application_health_policies) - upgrade_desc = ClusterConfigurationUpgradeDescription( - cluster_config=cluster_config, - health_check_retry_timeout=health_check_retry, - health_check_wait_duration_in_seconds=health_check_wait, - health_check_stable_duration_in_seconds=health_check_stable, - upgrade_domain_timeout_in_seconds=upgrade_domain_timeout, - upgrade_timeout_in_seconds=upgrade_timeout, - max_percent_unhealthy_applications=unhealthy_applications, - max_percent_unhealthy_nodes=unhealthy_nodes, - max_percent_delta_unhealthy_nodes=delta_unhealthy_nodes, - max_percent_upgrade_domain_delta_unhealthy_nodes=upgrade_domain_delta_unhealthy_nodes, #pylint: disable=line-too-long - application_health_policies=app_health_policies) - - client.start_cluster_configuration_upgrade( - cluster_configuration_upgrade_description=upgrade_desc, - timeout=timeout) + upgrade_desc = { + "ClusterConfig": cluster_config, + "HealthCheckRetryTimeout": health_check_retry, + "HealthCheckWaitDurationInSeconds": health_check_wait, + "HealthCheckStableDurationInSeconds": health_check_stable, + "UpgradeDomainTimeoutInSeconds": upgrade_domain_timeout, + "UpgradeTimeoutInSeconds": upgrade_timeout, + "MaxPercentUnhealthyApplications": unhealthy_applications, + "MaxPercentUnhealthyNodes": unhealthy_nodes, + "MaxPercentDeltaUnhealthyNodes":delta_unhealthy_nodes, + "MaxPercentUpgradeDomainDeltaUnhealthyNodes": upgrade_domain_delta_unhealthy_nodes, #pylint: disable=line-too-long + "ApplicationHealthPolicies": app_health_policies} + + client.start_cluster_configuration_upgrade(upgrade_desc, timeout=timeout) def update_upgrade( #pylint: disable=too-many-locals,missing-docstring,invalid-name,too-many-arguments client, upgrade_kind='Rolling', rolling_upgrade_mode='UnmonitoredAuto', @@ -168,7 +160,6 @@ def update_upgrade( #pylint: disable=too-many-locals,missing-docstring,invalid-n delta_health_evaluation=False, delta_unhealthy_nodes=10, upgrade_domain_delta_unhealthy_nodes=15, app_health_map=None, timeout=60): - from azure.servicefabric.models import UpdateClusterUpgradeDescription rolling_desc = create_rolling_update_desc( rolling_upgrade_mode, force_restart, replica_set_check_timeout, @@ -184,12 +175,48 @@ def update_upgrade( #pylint: disable=too-many-locals,missing-docstring,invalid-n ) app_policies = parse_app_health_policy(app_health_map) - update_desc = UpdateClusterUpgradeDescription( - upgrade_kind=upgrade_kind, update_description=rolling_desc, - cluster_health_policy=health_policy, - enable_delta_health_evaluation=delta_health_evaluation, - cluster_upgrade_health_policy=upgrade_health_policy, - application_health_policy_map=app_policies - ) + update_desc = { + "UpgradeKind":upgrade_kind, "UpdateDescription":rolling_desc, + "ClusterHealthPolicy": health_policy, + "EnableDeltaHealthEvaluation": delta_health_evaluation, + "ClusterUpgradeHealthPolicy": upgrade_health_policy, + "ApplicationHealthPolicyMap": app_policies + } client.update_cluster_upgrade(update_desc, timeout=timeout) + +def provision(client, cluster_manifest_file_path, code_file_path, timeout=60): + """ + Provision the code or configuration packages of a Service Fabric cluster. + :param cluster_manifest_file_path: The cluster manifest file path. + :param code_file_path: The cluster code package file path. + + """ + payload = { + "ClusterManifestFilePath": cluster_manifest_file_path, + "CodeFilePath": code_file_path + } + client.provision_cluster(payload, timeout=timeout) + +def unprovision_cluster(client, code_version, config_version, timeout=60): + """ + Unprovision the code or configuration packages of a Service Fabric cluster. + :param code_version: The cluster code package version. + :param config_version: The cluster manifest version. + """ + payload = { + "CodeVersion": code_version, + "ConfigVersion": config_version + } + client.unprovision_cluster(payload, timeout=timeout) + +def resume_cluster_upgrade(client, upgrade_domain, timeout=60): + """ + Make the cluster upgrade move on to the next upgrade domain. + :param upgrade_domain: The next upgrade domain for this cluster upgrade. + + """ + payload = { + "UpgradeDomain": upgrade_domain, + } + client.resume_cluster_upgrade(payload, timeout=timeout) \ No newline at end of file diff --git a/src/sfctl/custom_container.py b/src/sfctl/custom_container.py index 27f0f072..85f94f68 100644 --- a/src/sfctl/custom_container.py +++ b/src/sfctl/custom_container.py @@ -8,7 +8,6 @@ from __future__ import print_function import json -from azure.servicefabric.models import ContainerApiRequestBody def invoke_api( # pylint: disable=too-many-arguments client, @@ -24,20 +23,27 @@ def invoke_api( # pylint: disable=too-many-arguments timeout=60): """Invoke container API on a cluster node""" - request_body = ContainerApiRequestBody( - uri_path=container_api_uri_path, - http_verb=container_api_http_verb, - content_type=container_api_content_type, - body=container_api_body) + request_body = { + "UriPath": container_api_uri_path + } + + if container_api_http_verb: + request_body["HttpVerb"] = container_api_http_verb + + if container_api_body: + request_body["Body"] = container_api_body + + if container_api_content_type: + request_body["ContentType"] = container_api_content_type response = client.invoke_container_api( node_name, application_id, - service_manifest_name, - code_package_name, - code_package_instance_id, request_body, - timeout) + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, + code_package_instance_id=code_package_instance_id, + timeout=timeout) print(format_response(response)) @@ -56,16 +62,16 @@ def logs( # pylint: disable=too-many-arguments if tail: uri_path += '&tail={}'.format(tail) - request_body = ContainerApiRequestBody(uri_path=uri_path) + request_body = { "UriPath": uri_path} response = client.invoke_container_api( node_name, application_id, - service_manifest_name, - code_package_name, - code_package_instance_id, request_body, - timeout) + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, + code_package_instance_id=code_package_instance_id, + timeout=timeout) if response: if response.container_api_result.status == 200: diff --git a/src/sfctl/custom_health.py b/src/sfctl/custom_health.py index 2443e19a..bdccf5c2 100644 --- a/src/sfctl/custom_health.py +++ b/src/sfctl/custom_health.py @@ -10,7 +10,6 @@ def parse_service_health_policy(policy): """Parse a health service policy from string""" - from azure.servicefabric.models import ServiceTypeHealthPolicy if policy is None: return None @@ -18,15 +17,14 @@ def parse_service_health_policy(policy): uphp = policy.get('max_percent_unhealthy_partitions_per_service', 0) rhp = policy.get('max_percent_unhealthy_replicas_per_partition', 0) ushp = policy.get('max_percent_unhealthy_services', 0) - return ServiceTypeHealthPolicy(max_percent_unhealthy_partitions_per_service=uphp, - max_percent_unhealthy_replicas_per_partition=rhp, - max_percent_unhealthy_services=ushp) + return {"MaxPercentUnhealthyPartitionsPerService": uphp, + "MaxpercentUnhealthyReplicasPerPartition": rhp, + "MaxPercentUnhealthyServices": ushp} + def parse_service_health_policy_map(formatted_policy): """Parse a service health policy map from a string""" - from azure.servicefabric.models import ServiceTypeHealthPolicyMapItem #pylint: disable=line-too-long - if formatted_policy is None: return None @@ -42,7 +40,7 @@ def parse_service_health_policy_map(formatted_policy): raise CLIError('Could not find service type policy in service ' 'health policy map') service_p = parse_service_health_policy(st_policy) - std_list_item = ServiceTypeHealthPolicyMapItem(key=st_name, value=service_p) + std_list_item = {"Key": st_name, "Value": service_p} map_shp.append(std_list_item) return map_shp @@ -50,8 +48,6 @@ def parse_service_health_policy_map(formatted_policy): def parse_app_health_map(formatted_map): """Parse application health map from string""" - from azure.servicefabric.models import ApplicationTypeHealthPolicyMapItem #pylint: disable=line-too-long - if not formatted_map: return None @@ -65,28 +61,34 @@ def parse_app_health_map(formatted_map): if percent_unhealthy is None: raise CLIError('Cannot find application type health policy map ' 'unhealthy percent') - map_item = ApplicationTypeHealthPolicyMapItem(key=name, value=percent_unhealthy) + map_item = {"Key": name, "Value": percent_unhealthy} health_map.append(map_item) return health_map -def create_health_information(source_id, health_property, health_state, ttl, #pylint: disable=too-many-arguments +def create_health_information(source_id, health_property, health_state, ttl, # pylint: disable=too-many-arguments description, sequence_number, remove_when_expired): """Validates and creates a health information object""" - from azure.servicefabric.models import HealthInformation - + import distutils if health_state not in ['Invalid', 'Ok', 'Warning', 'Error', 'Unknown']: raise CLIError('Invalid health state specified') - return HealthInformation(source_id=source_id, - property=health_property, - health_state=health_state, - time_to_live_in_milli_seconds=ttl, - description=description, - sequence_number=sequence_number, - remove_when_expired=remove_when_expired) + if type(remove_when_expired) == bool: + rwe = remove_when_expired + else: + rwe = bool(distutils.util.strtobool(remove_when_expired)) + + + return {"SourceId": source_id, + "Property": health_property, + "HealthState": health_state, + "TimeToLiveInMilliSeconds": ttl, + "Description": description, + "SequenceNumber": sequence_number, + "RemoveWhenExpired": rwe} + -def report_cluster_health(client, source_id, health_property, health_state, #pylint: disable=missing-docstring,too-many-arguments +def report_cluster_health(client, source_id, health_property, health_state, # pylint: disable=missing-docstring,too-many-arguments ttl=None, description=None, sequence_number=None, remove_when_expired=False, immediate=False, timeout=60): @@ -150,7 +152,7 @@ def report_replica_health(client, partition_id, replica_id, source_id, #pylint: remove_when_expired) client.report_replica_health(partition_id, replica_id, info, - service_kind, timeout=timeout, + service_kind=service_kind, timeout=timeout, immediate=immediate) @@ -162,4 +164,4 @@ def report_node_health(client, node_name, source_id, health_property, #pylint: d info = create_health_information(source_id, health_property, health_state, ttl, description, sequence_number, remove_when_expired) - client.report_node_health(node_name, info, immediate, timeout) + client.report_node_health(node_name, info, immediate=immediate, timeout=timeout) diff --git a/src/sfctl/custom_is.py b/src/sfctl/custom_is.py index 9ae19546..8080195e 100644 --- a/src/sfctl/custom_is.py +++ b/src/sfctl/custom_is.py @@ -11,10 +11,40 @@ def is_command(client, command_input, service_id=None, timeout=60): """Invokes an administrative command on the given Infrastructure Service instance. """ - client.invoke_infrastructure_command(command_input, service_id, timeout) + client.invoke_infrastructure_command(command=command_input, service_id=service_id, timeout=timeout) def is_query(client, command_input, service_id=None, timeout=60): """Invokes a read-only query on the given infrastructure service instance. """ - client.invoke_infrastructure_query(command_input, service_id, timeout) + client.invoke_infrastructure_query(command=command_input, service_id=service_id, timeout=timeout) + + +def force_approve_repair_task(client, task_id, version, timeout=60): + """Forces the approval of the given repair task. + + :param str task_id: The ID of the repair task. + :param str version: The current version number of the repair task. If non-zero, then the + request will only succeed if this value matches the actual current + version of the repair task. If zero, then no version check is performed. + """ + payload = { + "TaskId": task_id, + "Version": version + } + client.force_approve_repair_task(payload, timeout=timeout) + + +def delete_repair_task(client, task_id, version, timeout=60): + """This API supports the Service Fabric platform; it is not meant to be used directly from your code. + + :param str task_id: The ID of the repair task. + :param str version: The current version number of the repair task. If non-zero, then the + request will only succeed if this value matches the actual current + version of the repair task. If zero, then no version check is performed. + """ + payload = { + "TaskId": task_id, + "Version": version + } + client.delete_repair_task(payload, timeout=timeout) \ No newline at end of file diff --git a/src/sfctl/custom_node.py b/src/sfctl/custom_node.py index 9aa38ff4..c054e8cc 100644 --- a/src/sfctl/custom_node.py +++ b/src/sfctl/custom_node.py @@ -16,3 +16,33 @@ def remove_node_tags(client, node_name, tags): """remove the corresponding tags to a node""" client.remove_node_tags(node_name, tags.split(",")) + +def disable_node(client, node_name, deactivation_intent, timeout=60): + """Deactivate a Service Fabric cluster node with the specified deactivation. + + :param str node_name: The name of the node + :param str deactivation_intent: Describes the intent or reason for deactivating the node. + """ + payload = { + "DeactivationIntent": deactivation_intent + } + + client.disable_node(node_name, payload, timeout=timeout) + + +def restart_node(client, node_name, node_instance_id=0, create_fabric_dump=False, timeout=60): + """Restarts a Service Fabric cluster node. + + :param str node_name: The name of the node + :param str node_instance_id: The instance ID of the target node. If instance ID is specified the + node is restarted only if it matches with the current instance of the + node. A default value of "0" would match any instance ID. The instance + ID can be obtained using get node query + :param str create_fabric_dump: Specify True to create a dump of the fabric node process. This is case sensitive. Default: False + """ + payload = { + "CreateFabricDump": create_fabric_dump, + "NodeInstanceId": node_instance_id + } + + client.restart_node(node_name, payload, timeout=timeout) \ No newline at end of file diff --git a/src/sfctl/custom_property.py b/src/sfctl/custom_property.py index 938077c8..2f5f329c 100644 --- a/src/sfctl/custom_property.py +++ b/src/sfctl/custom_property.py @@ -10,9 +10,8 @@ def naming_property_put(client, name_id, property_name, # pylint: disable=too-many-arguments value, custom_id_type=None, timeout=60): """Custom commands for creating or updating a Service Fabric property""" - from azure.servicefabric.models import PropertyDescription - desc = PropertyDescription(property_name=property_name, - value=value, - custom_type_id=custom_id_type) + desc = {"PropertyName" : property_name, + "Value" :value, + "CustomTypeId" : custom_id_type} client.put_property(name_id, desc, timeout=timeout) diff --git a/src/sfctl/custom_service.py b/src/sfctl/custom_service.py index 82941179..c419ccbc 100644 --- a/src/sfctl/custom_service.py +++ b/src/sfctl/custom_service.py @@ -11,7 +11,6 @@ def correlation_desc(correlated_service, correlation): """Get a service correlation description""" - from azure.servicefabric.models import ServiceCorrelationDescription if not any([correlated_service, correlation]): return None @@ -21,13 +20,11 @@ def correlation_desc(correlated_service, correlation): raise CLIError('Must specify both a correlation service and ' 'correlation scheme') - return ServiceCorrelationDescription(scheme=correlation, service_name=correlated_service) + return {"Scheme": correlation, "ServiceName": correlated_service} def parse_load_metrics(formatted_metrics): """Parse a service load metric description from a string""" - from azure.servicefabric.models import ServiceLoadMetricDescription - s_load_list = None if formatted_metrics: s_load_list = [] @@ -39,11 +36,11 @@ def parse_load_metrics(formatted_metrics): l_primary = item.get('primary_default_load', None) l_secondary = item.get('secondary_default_load', None) l_default = item.get('default_load', None) - l_desc = ServiceLoadMetricDescription(name=l_name, - weight=l_weight, - primary_default_load=l_primary, - secondary_default_load=l_secondary, - default_load=l_default) + l_desc = {"Name": l_name, + "Weight": l_weight, + "PrimaryDefaultLoad": l_primary, + "SecondaryDefaultLoad": l_secondary, + "DefaultLoad": l_default} s_load_list.append(l_desc) return s_load_list @@ -52,10 +49,6 @@ def parse_load_metrics(formatted_metrics): def parse_placement_policies(formatted_placement_policies): """"Parse a placement policy description from a formatted policy""" - from azure.servicefabric.models import (ServicePlacementNonPartiallyPlaceServicePolicyDescription, # pylint: disable=line-too-long - ServicePlacementPreferPrimaryDomainPolicyDescription, - ServicePlacementRequiredDomainPolicyDescription, - ServicePlacementRequireDomainDistributionPolicyDescription) # pylint: disable=line-too-long if formatted_placement_policies: policy_list = [] @@ -77,23 +70,13 @@ def parse_placement_policies(formatted_placement_policies): 'Placement policy type requires target domain name' ) if p_type == 'NonPartiallyPlaceService': - policy_list.append( - ServicePlacementNonPartiallyPlaceServicePolicyDescription() - ) + policy_list.append({}) elif p_type == 'PreferPrimaryDomain': - policy_list.append( - ServicePlacementPreferPrimaryDomainPolicyDescription(domain_name=p_domain_name) - ) + policy_list.append({"DomainName": p_domain_name}) elif p_type == 'RequireDomain': - policy_list.append( - ServicePlacementRequiredDomainPolicyDescription(domain_name=p_domain_name) - ) + policy_list.append({"DomainName": p_domain_name}) elif p_type == 'RequireDomainDistribution': - policy_list.append( - ServicePlacementRequireDomainDistributionPolicyDescription( - domain_name=p_domain_name - ) - ) + policy_list.append({"DomainName": p_domain_name}) return policy_list return None @@ -192,9 +175,6 @@ def parse_partition_policy(named_scheme, named_scheme_list, int_scheme, # pylin int_scheme_low, int_scheme_high, int_scheme_count, singleton_scheme): """Create a partition scheme""" - from azure.servicefabric.models import (NamedPartitionSchemeDescription, - SingletonPartitionSchemeDescription, - UniformInt64RangePartitionSchemeDescription) if named_scheme and not named_scheme_list: raise CLIError('When specifying named partition scheme, must include ' @@ -209,14 +189,14 @@ def parse_partition_policy(named_scheme, named_scheme_list, int_scheme, # pylin '--named-scheme, or --int-scheme') if named_scheme: - return NamedPartitionSchemeDescription(count=len(named_scheme_list), - names=named_scheme_list) + return {"Count": len(named_scheme_list), + "Names": named_scheme_list} if int_scheme: - return UniformInt64RangePartitionSchemeDescription(count=int_scheme_count, - low_key=int_scheme_low, - high_key=int_scheme_high) + return {"Count": int_scheme_count, + "LowKey": int_scheme_low, + "HighKey": int_scheme_high} if singleton_scheme: - return SingletonPartitionSchemeDescription() + return {} return None @@ -229,8 +209,6 @@ def validate_activation_mode(activation_mode): def parse_scaling_mechanism(scaling_mechanism): """"Parse a scaling mechanism description""" - from azure.servicefabric.models import (AddRemoveIncrementalNamedPartitionScalingMechanism, - PartitionInstanceCountScaleMechanism) if scaling_mechanism: p_kind = scaling_mechanism.get('kind') @@ -242,28 +220,25 @@ def parse_scaling_mechanism(scaling_mechanism): p_min_count = scaling_mechanism.get('min_instance_count', None) p_max_count = scaling_mechanism.get('max_instance_count', None) p_scale_increment = scaling_mechanism.get('scale_increment', None) - return PartitionInstanceCountScaleMechanism( - min_instance_count=p_min_count, - max_instance_count=p_max_count, - scale_increment=p_scale_increment - ) + return { + "MinInstanceCount": p_min_count, + "MaxInstanceCount": p_max_count, + "ScaleIncrement": p_scale_increment + } if p_kind == 'AddRemoveIncrementalNamedPartition': - p_min_count = scaling_mechanism.get('min_partition_count', None) - p_max_count = scaling_mechanism.get('max_partition_count', None) + p_min_count = scaling_mechanism.get('min_instance_count', None) + p_max_count = scaling_mechanism.get('max_instance_count', None) p_scale_increment = scaling_mechanism.get('scale_increment', None) - return AddRemoveIncrementalNamedPartitionScalingMechanism( - min_partition_count=p_min_count, - max_partition_count=p_max_count, - scale_increment=p_scale_increment - ) - + return { + "MinPartitionCount": p_min_count, + "MaxPartitionCount": p_max_count, + "ScaleIncrement": p_scale_increment + } return None def parse_scaling_trigger(scaling_trigger): """"Parse a scaling trigger description""" - from azure.servicefabric.models import (AveragePartitionLoadScalingTrigger, - AverageServiceLoadScalingTrigger) if scaling_trigger: p_kind = scaling_trigger.get('kind') @@ -271,39 +246,32 @@ def parse_scaling_trigger(scaling_trigger): raise CLIError('Invalid scaling trigger specified') if p_kind not in ['AveragePartitionLoad', 'AverageServiceLoad']: raise CLIError('Invalid scaling trigger specified') + + p_metricname = scaling_trigger.get('metric_name', None) + p_upper_load_threshold = scaling_trigger.get('upper_load_threshold', None) + p_lower_load_threshold = scaling_trigger.get('lower_load_threshold', None) + p_scale_interval = scaling_trigger.get('scale_interval_in_seconds', None) + + triggers = { + "MetricName": p_metricname, + "LowerLoadThreshold": p_lower_load_threshold, + "UpperLoadThreshold": p_upper_load_threshold, + "ScaleIntervalInSeconds": p_scale_interval + } + if p_kind == 'AveragePartitionLoad': - p_metricname = scaling_trigger.get('metric_name', None) - p_upper_load_threshold = scaling_trigger.get('upper_load_threshold', None) - p_lower_load_threshold = scaling_trigger.get('lower_load_threshold', None) - p_scale_interval = scaling_trigger.get('scale_interval_in_seconds', None) - return AveragePartitionLoadScalingTrigger( - metric_name=p_metricname, - lower_load_threshold=p_lower_load_threshold, - upper_load_threshold=p_upper_load_threshold, - scale_interval_in_seconds=p_scale_interval - ) + return triggers if p_kind == 'AverageServiceLoad': - p_metricname = scaling_trigger.get('metric_name', None) - p_upper_load_threshold = scaling_trigger.get('upper_load_threshold', None) - p_lower_load_threshold = scaling_trigger.get('lower_load_threshold', None) - p_scale_interval = scaling_trigger.get('scale_interval_in_seconds', None) - p_scale_interval = scaling_trigger.get('scale_interval_in_seconds', None) - p_use_only_primary_load = scaling_trigger.get('use_only_primary_load', False) - return AverageServiceLoadScalingTrigger( - metric_name=p_metricname, - lower_load_threshold=p_lower_load_threshold, - upper_load_threshold=p_upper_load_threshold, - scale_interval_in_seconds=p_scale_interval, - use_only_primary_load=p_use_only_primary_load - ) + p_use_only_primary_load = scaling_trigger.get('use_only_primary_load', False) + triggers['UseOnlyPrimaryLoad'] = p_use_only_primary_load + return triggers return None def parse_scaling_policy(formatted_scaling_policy): """"Parse a scaling policy description from a formatted policy""" - from azure.servicefabric.models import ScalingPolicyDescription scaling_list = None if formatted_scaling_policy: scaling_list = [] @@ -316,18 +284,17 @@ def parse_scaling_policy(formatted_scaling_policy): if scaling_mechanism_string is None: raise CLIError('No scaling mechanism specified') scaling_mechanism = parse_scaling_mechanism(scaling_mechanism_string) - scaling_policy = ScalingPolicyDescription(scaling_trigger=scaling_trigger, - scaling_mechanism=scaling_mechanism) + scaling_policy = {"ScalingTrigger": scaling_trigger, + "ScalingMechanism": scaling_mechanism} scaling_list.append(scaling_policy) return scaling_list def parse_service_tags(service_tags): """Parse service tags from string""" - from azure.servicefabric.models import NodeTagsDescription if service_tags: - return NodeTagsDescription(count=len(service_tags), - tags=service_tags) + return {"Count": len(service_tags), + "Tags": service_tags} return None @@ -421,7 +388,6 @@ def create( # pylint: disable=too-many-arguments, too-many-locals InBuild before reporting that build is stuck. This applies to stateful services only. """ - from azure.servicefabric.models import StatelessServiceDescription, StatefulServiceDescription validate_service_create_params(stateful, stateless, singleton_scheme, int_scheme, named_scheme, instance_count, @@ -440,53 +406,39 @@ def create( # pylint: disable=too-many-arguments, too-many-locals tags_required_to_place_description = parse_service_tags(tags_required_to_place) tags_required_to_run_description = parse_service_tags(tags_required_to_run) + svc_desc = { + "ServiceName": name, + "ServiceTypeName": service_type, + "PartitionDescription": partition_desc, + "ApplicationName": "fabric:/" + app_id, + "InitializationData": None, + "PlacementConstraints": constraints, + "CorrelationScheme": cor_desc, + "ServiceLoadMetrics": load_list, + "ServicePlacementPolicies": place_policy, + "DefaultMoveCost": move_cost, + "IsDefaultMoveCostSpecified": bool(move_cost), + "ServicePackageActivationMode": activation_mode, + "ServiceDnsName": dns_name, + "ScalingPolicies": scaling_policy_description, + "TagsRequiredToPlace": tags_required_to_place_description, + "TagsRequiredToRun": tags_required_to_run_description} + if stateless: - svc_desc = StatelessServiceDescription(service_name=name, - service_type_name=service_type, - partition_description=partition_desc, - instance_count=instance_count, - application_name="fabric:/" + app_id, - initialization_data=None, - placement_constraints=constraints, - correlation_scheme=cor_desc, - service_load_metrics=load_list, - service_placement_policies=place_policy, - default_move_cost=move_cost, - is_default_move_cost_specified=bool(move_cost), - service_package_activation_mode=activation_mode, - service_dns_name=dns_name, - scaling_policies=scaling_policy_description, - tags_required_to_place=tags_required_to_place_description, - tags_required_to_run=tags_required_to_run_description) + svc_desc["InstanceCount"] = instance_count if stateful: flags = stateful_flags(replica_restart_wait, quorum_loss_wait, stand_by_replica_keep, service_placement_time) - svc_desc = StatefulServiceDescription( - service_name=name, - service_type_name=service_type, - partition_description=partition_desc, - target_replica_set_size=target_replica_set_size, - min_replica_set_size=min_replica_set_size, - has_persisted_state=not no_persisted_state, - application_name="fabric:/" + app_id, - initialization_data=None, - placement_constraints=constraints, - correlation_scheme=cor_desc, - service_load_metrics=load_list, - service_placement_policies=place_policy, - default_move_cost=move_cost, - is_default_move_cost_specified=bool(move_cost), - service_package_activation_mode=activation_mode, - service_dns_name=dns_name, - scaling_policies=scaling_policy_description, - flags=flags, - replica_restart_wait_duration_seconds=replica_restart_wait, - quorum_loss_wait_duration_seconds=quorum_loss_wait, - stand_by_replica_keep_duration_seconds=stand_by_replica_keep, - service_placement_time_limit_seconds=service_placement_time, - tags_required_to_place=tags_required_to_place_description, - tags_required_to_run=tags_required_to_run_description) + svc_desc["TargetReplicaSetSize"] = target_replica_set_size + svc_desc["MinReplicaSetSize"] = min_replica_set_size + svc_desc["HasPersistedState"] = not no_persisted_state + svc_desc["Flags"] = flags + svc_desc["ReplicaRestartWaitDurationSeconds"] = replica_restart_wait + svc_desc["QuorumLossWaitDurationSeconds"] = quorum_loss_wait + svc_desc["StandByReplicaKeepDurationSeconds"] = stand_by_replica_keep + svc_desc["ServicePlacementTimeLimitSeconds"] = service_placement_time + client.create_service(app_id, svc_desc, timeout) @@ -585,8 +537,6 @@ def update(client, service_id, stateless=False, stateful=False, # pylint: disab InBuild before reporting that build is stuck. This applies to stateful services only. """ - from azure.servicefabric.models import (StatefulServiceUpdateDescription, - StatelessServiceUpdateDescription) validate_update_service_params(stateless, stateful, target_replica_set_size, @@ -609,36 +559,28 @@ def update(client, service_id, stateless=False, stateful=False, # pylint: disab metric_desc, move_cost, scaling_policy_description, service_placement_time) - update_desc = None + update_desc = {"Flags": flags, + "PlacementConstraints": constraints, + "CorrelationScheme": cor_desc, + "LoadMetrics": metric_desc, + "ServicePlacementPolicies": place_desc, + "DefaultMoveCost": move_cost, + "ScalingPolicies": scaling_policy_description, + "InstanceCount": instance_count, + "TagsRequiredToPlace": tags_required_to_place_description, + "TagsRequiredToRun": tags_required_to_run_description} + if stateful: - update_desc = StatefulServiceUpdateDescription( - flags=flags, - placement_constraints=constraints, - correlation_scheme=cor_desc, - load_metrics=metric_desc, - service_placement_policies=place_desc, - default_move_cost=move_cost, - scaling_policies=scaling_policy_description, - target_replica_set_size=target_replica_set_size, - min_replica_set_size=min_replica_set_size, - replica_restart_wait_duration_seconds=replica_restart_wait, - quorum_loss_wait_duration_seconds=quorum_loss_wait, - stand_by_replica_keep_duration_seconds=stand_by_replica_keep, - service_placement_time_limit_seconds=service_placement_time, - tags_required_to_place=tags_required_to_place_description, - tags_required_to_run=tags_required_to_run_description) + update_desc["TargetReplicaSetSize"] = target_replica_set_size + update_desc["MinReplicaSetSize"] = min_replica_set_size + update_desc["ReplicaRestartWaitDurationSeconds"] = replica_restart_wait + update_desc["QuorumLossWaitDurationSeconds"] = quorum_loss_wait + update_desc["StandByReplicaKeepDurationSeconds"] = stand_by_replica_keep + update_desc["ServicePlacementTimeLimitSeconds"] = service_placement_time if stateless: - update_desc = StatelessServiceUpdateDescription(flags=flags, - placement_constraints=constraints, - correlation_scheme=cor_desc, - load_metrics=metric_desc, - service_placement_policies=place_desc, - default_move_cost=move_cost, - scaling_policies=scaling_policy_description, - instance_count=instance_count, - tags_required_to_place=tags_required_to_place_description, - tags_required_to_run=tags_required_to_run_description) + update_desc["InstanceCount"] = instance_count + client.update_service(service_id, update_desc, timeout) @@ -646,7 +588,6 @@ def update(client, service_id, stateless=False, stateful=False, # pylint: disab def parse_package_sharing_policies(formatted_policies): """Parse package sharing policy description from a JSON encoded set of policies""" - from azure.servicefabric.models import PackageSharingPolicyInfo if not formatted_policies: return None @@ -658,8 +599,8 @@ def parse_package_sharing_policies(formatted_policies): policy_scope = policy.get("scope", None) if policy_scope not in [None, 'All', 'Code', 'Config', 'Data']: raise CLIError('Invalid policy scope specified') - list_psps.append(PackageSharingPolicyInfo(shared_package_name=policy_name, - package_sharing_scope=policy_scope)) + list_psps.append({"SharedPackageName": policy_name, + "PackageSharingScope": policy_scope}) return list_psps @@ -681,13 +622,12 @@ def package_upload(client, node_name, service_manifest_name, app_type_name, # p is to be shared. The scope can be either 'None', 'All', 'Code', 'Config' or 'Data'. """ - from azure.servicefabric.models import DeployServicePackageToNodeDescription list_psps = parse_package_sharing_policies(share_policy) - desc = DeployServicePackageToNodeDescription(service_manifest_name=service_manifest_name, - application_type_name=app_type_name, - application_type_version=app_type_version, - node_name=node_name, - package_sharing_policy=list_psps) + desc = {"ServiceManifestName": service_manifest_name, + "ApplicationTypeName": app_type_name, + "ApplicationTypeVersion": app_type_version, + "NodeName": node_name, + "PackageSharingPolicy": list_psps} client.deployed_service_package_to_node(node_name, desc, timeout) diff --git a/src/sfctl/tests/app_test.py b/src/sfctl/tests/app_test.py index 3fdd5868..91a88cac 100644 --- a/src/sfctl/tests/app_test.py +++ b/src/sfctl/tests/app_test.py @@ -78,14 +78,13 @@ def test_parse_app_params_empty(self): def test_parse_single_app_param(self): """Parse app params returns a single parameter successfully""" - from azure.servicefabric.models import ApplicationParameter res = sf_c.parse_app_params({'test': 'test2'}) self.assertEqual(len(res), 1) res = res[0] - self.assertIsInstance(res, ApplicationParameter) - self.assertEqual(res.key, 'test') - self.assertEqual(res.value, 'test2') + + self.assertEqual(res['Key'], 'test') + self.assertEqual(res['Value'], 'test2') def test_parse_app_metrics_none(self): """Parse app metrics returns None with None args""" @@ -97,7 +96,6 @@ def test_parse_app_metrics_empty(self): def test_parse_app_metrics_single(self): """Parse app metrics returns a single metric successfully""" - from azure.servicefabric.models import ApplicationMetricDescription res = sf_c.parse_app_metrics([{'name': 'test', 'maximum_capacity': '3', @@ -106,11 +104,11 @@ def test_parse_app_metrics_single(self): self.assertEqual(len(res), 1) res = res[0] - self.assertIsInstance(res, ApplicationMetricDescription) - self.assertEqual(res.name, 'test') - self.assertEqual(res.maximum_capacity, '3') - self.assertEqual(res.reservation_capacity, '2') - self.assertEqual(res.total_application_capacity, '2') + + self.assertEqual(res['Name'], 'test') + self.assertEqual(res['MaximumCapacity'], '3') + self.assertEqual(res['ReservationCapacity'], '2') + self.assertEqual(res['TotalApplicationCapacity'], '2') def test_parse_fileshare_path(self): """Parse fileshare path from the image store connection string""" @@ -241,6 +239,6 @@ def test_upload_image_store_timeout_long(self): #pylint: disable=too-many-local # however, the mock server can be a bit slow, taking an extra second from receiving # the request to start processing it. Linux does not seem to have this problem. # Issue seen on Windows only. If testing on windows, change the 3 seconds to 4. - self.assertAlmostEqual(int(query_timeout[0]), timeout-iteration*3, delta=2) + self.assertAlmostEqual(int(query_timeout[0]), timeout-iteration*3, delta=4) iteration += 1 diff --git a/src/sfctl/tests/chaos_schedule_test.py b/src/sfctl/tests/chaos_schedule_test.py index 575a02d3..d2bd1459 100644 --- a/src/sfctl/tests/chaos_schedule_test.py +++ b/src/sfctl/tests/chaos_schedule_test.py @@ -21,27 +21,23 @@ def test_parse_none_time_of_day(self): def test_parse_valid_time_of_day(self): """Parse a valid TimeOfDay""" - from azure.servicefabric.models import TimeOfDay res = sf_c.parse_time_of_day({ 'Hour': 23, 'Minute': 59 }) - self.assertIsInstance(res, TimeOfDay) - self.assertEqual(res.hour, 23) - self.assertEqual(res.minute, 59) + self.assertEqual(res['Hour'], 23) + self.assertEqual(res['Minute'], 59) res2 = sf_c.parse_time_of_day({ 'Hour': 0, 'Minute': 0 }) - self.assertIsInstance(res2, TimeOfDay) - - self.assertEqual(res2.hour, 0) - self.assertEqual(res2.minute, 0) + self.assertEqual(res2['Hour'], 0) + self.assertEqual(res2['Minute'], 0) def test_parse_none_time_range(self): """Parsing None TimeRange should return None""" @@ -51,8 +47,6 @@ def test_parse_none_time_range(self): def test_parse_valid_time_range(self): """Parse a valid time range""" - from azure.servicefabric.models import TimeRange, TimeOfDay - res = sf_c.parse_time_range({ 'StartTime': { 'Hour': 0, @@ -64,15 +58,11 @@ def test_parse_valid_time_range(self): } }) - self.assertIsInstance(res, TimeRange) + self.assertEqual(res['StartTime']['Hour'], 0) + self.assertEqual(res['StartTime']['Minute'], 0) - self.assertIsInstance(res.start_time, TimeOfDay) - self.assertEqual(res.start_time.hour, 0) - self.assertEqual(res.start_time.minute, 0) - - self.assertIsInstance(res.end_time, TimeOfDay) - self.assertEqual(res.end_time.hour, 23) - self.assertEqual(res.end_time.minute, 59) + self.assertEqual(res['EndTime']['Hour'], 23) + self.assertEqual(res['EndTime']['Minute'], 59) def test_parse_none_active_time_ranges(self): """Parsing None ActiveTimeRanges should return an empty list""" @@ -84,7 +74,6 @@ def test_parse_none_active_time_ranges(self): def test_parse_valid_active_time_ranges(self): """Parse a list of valid time ranges""" - from azure.servicefabric.models import TimeRange, TimeOfDay res = sf_c.parse_active_time_ranges( [ @@ -114,23 +103,17 @@ def test_parse_valid_active_time_ranges(self): self.assertIsInstance(res, list) self.assertEqual(len(res), 2) - self.assertIsInstance(res[0], TimeRange) - self.assertIsInstance(res[0].start_time, TimeOfDay) - self.assertEqual(res[0].start_time.hour, 0) - self.assertEqual(res[0].start_time.minute, 0) + self.assertEqual(res[0]['StartTime']['Hour'], 0) + self.assertEqual(res[0]['StartTime']['Minute'], 0) - self.assertIsInstance(res[0].end_time, TimeOfDay) - self.assertEqual(res[0].end_time.hour, 12) - self.assertEqual(res[0].end_time.minute, 0) + self.assertEqual(res[0]['EndTime']['Hour'], 12) + self.assertEqual(res[0]['EndTime']['Minute'], 0) - self.assertIsInstance(res[1], TimeRange) - self.assertIsInstance(res[1].start_time, TimeOfDay) - self.assertEqual(res[1].start_time.hour, 12) - self.assertEqual(res[1].start_time.minute, 0) + self.assertEqual(res[1]['StartTime']['Hour'], 12) + self.assertEqual(res[1]['StartTime']['Minute'], 0) - self.assertIsInstance(res[1].end_time, TimeOfDay) - self.assertEqual(res[1].end_time.hour, 23) - self.assertEqual(res[1].end_time.minute, 59) + self.assertEqual(res[1]['EndTime']['Hour'], 23) + self.assertEqual(res[1]['EndTime']['Minute'], 59) def test_parse_none_active_days(self): """Parsing None ChaosScheduleActiveDays should return None""" @@ -140,7 +123,6 @@ def test_parse_none_active_days(self): def test_parse_valid_active_days(self): """Parse a valid active days""" - from azure.servicefabric.models import ChaosScheduleJobActiveDaysOfWeek res = sf_c.parse_active_days({ 'Monday': True, @@ -150,14 +132,13 @@ def test_parse_valid_active_days(self): 'Friday': True }) - self.assertIsInstance(res, ChaosScheduleJobActiveDaysOfWeek) - self.assertEqual(res.sunday, False) - self.assertEqual(res.monday, True) - self.assertEqual(res.tuesday, True) - self.assertEqual(res.wednesday, True) - self.assertEqual(res.thursday, True) - self.assertEqual(res.friday, True) - self.assertEqual(res.saturday, False) + self.assertEqual(res['Sunday'], False) + self.assertEqual(res['Monday'], True) + self.assertEqual(res['Tuesday'], True) + self.assertEqual(res['Wednesday'], True) + self.assertEqual(res['Thursday'], True) + self.assertEqual(res['Friday'], True) + self.assertEqual(res['Saturday'], False) def test_parse_none_job(self): """Parsing None ChaosScheduleJob should return None""" @@ -167,10 +148,6 @@ def test_parse_none_job(self): def test_parse_valid_job(self): """Parse a valid ChaosScheduleJob""" - from azure.servicefabric.models import (TimeRange, - ChaosScheduleJob, - TimeOfDay, - ChaosScheduleJobActiveDaysOfWeek) res = sf_c.parse_job({ 'ChaosParameters': 'myParametersName', @@ -205,37 +182,32 @@ def test_parse_valid_job(self): ] }) - self.assertIsInstance(res, ChaosScheduleJob) - - self.assertEqual(res.chaos_parameters, 'myParametersName') - - self.assertIsInstance(res.days, ChaosScheduleJobActiveDaysOfWeek) - self.assertEqual(res.days.sunday, False) - self.assertEqual(res.days.monday, True) - self.assertEqual(res.days.tuesday, True) - self.assertEqual(res.days.wednesday, True) - self.assertEqual(res.days.thursday, True) - self.assertEqual(res.days.friday, True) - self.assertEqual(res.days.saturday, False) - - self.assertIsInstance(res.times, list) - self.assertEqual(len(res.times), 2) - - self.assertIsInstance(res.times[0], TimeRange) - self.assertIsInstance(res.times[0].start_time, TimeOfDay) - self.assertEqual(res.times[0].start_time.hour, 0) - self.assertEqual(res.times[0].start_time.minute, 0) - self.assertIsInstance(res.times[0].end_time, TimeOfDay) - self.assertEqual(res.times[0].end_time.hour, 6) - self.assertEqual(res.times[0].end_time.minute, 0) - - self.assertIsInstance(res.times[1], TimeRange) - self.assertIsInstance(res.times[1].start_time, TimeOfDay) - self.assertEqual(res.times[1].start_time.hour, 18) - self.assertEqual(res.times[1].start_time.minute, 0) - self.assertIsInstance(res.times[1].end_time, TimeOfDay) - self.assertEqual(res.times[1].end_time.hour, 23) - self.assertEqual(res.times[1].end_time.minute, 59) + + self.assertEqual(res['ChaosParameters'], 'myParametersName') + + self.assertEqual(res['Days']['Sunday'], False) + self.assertEqual(res['Days']['Monday'], True) + self.assertEqual(res['Days']['Tuesday'], True) + self.assertEqual(res['Days']['Wednesday'], True) + self.assertEqual(res['Days']['Thursday'], True) + self.assertEqual(res['Days']['Friday'], True) + self.assertEqual(res['Days']['Saturday'], False) + + self.assertIsInstance(res['Times'], list) + self.assertEqual(len(res['Times']), 2) + + self.assertEqual(res['Times'][0]['StartTime']['Hour'], 0) + self.assertEqual(res['Times'][0]['StartTime']['Minute'], 0) + + self.assertEqual(res['Times'][0]['EndTime']['Hour'], 6) + self.assertEqual(res['Times'][0]['EndTime']['Minute'], 0) + + + self.assertEqual(res['Times'][1]['StartTime']['Hour'], 18) + self.assertEqual(res['Times'][1]['StartTime']['Minute'], 0) + + self.assertEqual(res['Times'][1]['EndTime']['Hour'], 23) + self.assertEqual(res['Times'][1]['EndTime']['Minute'], 59) def test_parse_none_jobs(self): """Parsing None ChaosScheduleJobs should return an empty list""" @@ -247,10 +219,6 @@ def test_parse_none_jobs(self): def test_parse_valid_jobs(self): #pylint: disable=too-many-statements """Parse a valid list of ChaosScheduleJobs""" - from azure.servicefabric.models import (TimeRange, - ChaosScheduleJobActiveDaysOfWeek, - TimeOfDay, - ChaosScheduleJob) res = sf_c.parse_jobs([ @@ -309,60 +277,51 @@ def test_parse_valid_jobs(self): self.assertIsInstance(res, list) - self.assertIsInstance(res[0], ChaosScheduleJob) - self.assertEqual(res[0].chaos_parameters, 'myParametersName') - - self.assertIsInstance(res[0].days, ChaosScheduleJobActiveDaysOfWeek) - self.assertEqual(res[0].days.sunday, False) - self.assertEqual(res[0].days.monday, True) - self.assertEqual(res[0].days.tuesday, True) - self.assertEqual(res[0].days.wednesday, True) - self.assertEqual(res[0].days.thursday, True) - self.assertEqual(res[0].days.friday, True) - self.assertEqual(res[0].days.saturday, False) - - self.assertIsInstance(res[0].times, list) - self.assertEqual(len(res[0].times), 2) - - self.assertIsInstance(res[0].times[0], TimeRange) - self.assertIsInstance(res[0].times[0].start_time, TimeOfDay) - self.assertEqual(res[0].times[0].start_time.hour, 0) - self.assertEqual(res[0].times[0].start_time.minute, 0) - self.assertIsInstance(res[0].times[0].end_time, TimeOfDay) - self.assertEqual(res[0].times[0].end_time.hour, 6) - self.assertEqual(res[0].times[0].end_time.minute, 0) - - self.assertIsInstance(res[0].times[1], TimeRange) - self.assertIsInstance(res[0].times[1].start_time, TimeOfDay) - self.assertEqual(res[0].times[1].start_time.hour, 18) - self.assertEqual(res[0].times[1].start_time.minute, 0) - self.assertIsInstance(res[0].times[1].end_time, TimeOfDay) - self.assertEqual(res[0].times[1].end_time.hour, 23) - self.assertEqual(res[0].times[1].end_time.minute, 59) - - self.assertIsInstance(res[1], ChaosScheduleJob) - self.assertEqual(res[1].chaos_parameters, 'myOtherParametersName') - - self.assertIsInstance(res[1].days, ChaosScheduleJobActiveDaysOfWeek) - self.assertEqual(res[1].days.sunday, True) - self.assertEqual(res[1].days.monday, False) - self.assertEqual(res[1].days.tuesday, False) - self.assertEqual(res[1].days.wednesday, False) - self.assertEqual(res[1].days.thursday, False) - self.assertEqual(res[1].days.friday, False) - self.assertEqual(res[1].days.saturday, True) - - self.assertIsInstance(res[1].times, list) - self.assertEqual(len(res[1].times), 1) - - self.assertIsInstance(res[1].times[0], TimeRange) - self.assertIsInstance(res[1].times[0].start_time, TimeOfDay) - self.assertEqual(res[1].times[0].start_time.hour, 12) - self.assertEqual(res[1].times[0].start_time.minute, 0) - self.assertIsInstance(res[1].times[0].end_time, TimeOfDay) - self.assertEqual(res[1].times[0].end_time.hour, 14) - self.assertEqual(res[1].times[0].end_time.minute, 0) + self.assertEqual(res[0]['ChaosParameters'], 'myParametersName') + + self.assertEqual(res[0]['Days']['Sunday'], False) + self.assertEqual(res[0]['Days']['Monday'], True) + self.assertEqual(res[0]['Days']['Tuesday'], True) + self.assertEqual(res[0]['Days']['Wednesday'], True) + self.assertEqual(res[0]['Days']['Thursday'], True) + self.assertEqual(res[0]['Days']['Friday'], True) + self.assertEqual(res[0]['Days']['Saturday'], False) + + self.assertIsInstance(res[0]['Times'], list) + self.assertEqual(len(res[0]['Times']), 2) + + self.assertEqual(res[0]['Times'][0]['StartTime']['Hour'], 0) + self.assertEqual(res[0]['Times'][0]['StartTime']['Minute'], 0) + + self.assertEqual(res[0]['Times'][0]['EndTime']['Hour'], 6) + self.assertEqual(res[0]['Times'][0]['EndTime']['Minute'], 0) + + + self.assertEqual(res[0]['Times'][1]['StartTime']['Hour'], 18) + self.assertEqual(res[0]['Times'][1]['StartTime']['Minute'], 0) + + self.assertEqual(res[0]['Times'][1]['EndTime']['Hour'], 23) + self.assertEqual(res[0]['Times'][1]['EndTime']['Minute'], 59) + + + self.assertEqual(res[1]['ChaosParameters'], 'myOtherParametersName') + self.assertEqual(res[1]['Days']['Sunday'], True) + self.assertEqual(res[1]['Days']['Monday'], False) + self.assertEqual(res[1]['Days']['Tuesday'], False) + self.assertEqual(res[1]['Days']['Wednesday'], False) + self.assertEqual(res[1]['Days']['Thursday'], False) + self.assertEqual(res[1]['Days']['Friday'], False) + self.assertEqual(res[1]['Days']['Saturday'], True) + + self.assertIsInstance(res[1]['Times'], list) + self.assertEqual(len(res[1]['Times']), 1) + + self.assertEqual(res[1]['Times'][0]['StartTime']['Hour'], 12) + self.assertEqual(res[1]['Times'][0]['StartTime']['Minute'], 0) + + self.assertEqual(res[1]['Times'][0]['EndTime']['Hour'], 14) + self.assertEqual(res[1]['Times'][0]['EndTime']['Minute'], 0) def test_parse_none_chaos_parameters_dictionary(self): """Parsing None parameters dictionary should return an empty list""" @@ -374,11 +333,7 @@ def test_parse_none_chaos_parameters_dictionary(self): def test_parse_valid_chaos_parameters_dictionary(self): #pylint: disable=too-many-statements """Parse a valid ChaosParametersDictionary""" - from azure.servicefabric.models import (ChaosParametersDictionaryItem, - ChaosParameters, - ClusterHealthPolicy, - ChaosTargetFilter, - ChaosContext) + res = sf_c.parse_chaos_params_dictionary([ { @@ -442,75 +397,70 @@ def test_parse_valid_chaos_parameters_dictionary(self): self.assertIsInstance(res, list) self.assertEqual(len(res), 2) - self.assertIsInstance(res[0], ChaosParametersDictionaryItem) - self.assertEqual(res[0].key, 'myParametersName') - self.assertIsInstance(res[0].value, ChaosParameters) - self.assertEqual(res[0].value.time_to_run_in_seconds, '600') + self.assertEqual(res[0]['Key'], 'myParametersName') + + self.assertEqual(res[0]['Value']['TimeToRunInSeconds'], '600') self.assertEqual( - res[0].value.max_cluster_stabilization_timeout_in_seconds, 60) - self.assertEqual(res[0].value.max_concurrent_faults, 1) - self.assertEqual(res[0].value.enable_move_replica_faults, True) - self.assertEqual(res[0].value.wait_time_between_faults_in_seconds, 30) + res[0]['Value']['MaxClusterStabilizationTimeoutInSeconds'], 60) + self.assertEqual(res[0]['Value']['MaxConcurrentFaults'], 1) + self.assertEqual(res[0]['Value']['EnableMoveReplicaFaults'], True) + self.assertEqual(res[0]['Value']['WaitTimeBetweenFaultsInSeconds'], 30) self.assertEqual( - res[0].value.wait_time_between_iterations_in_seconds, 15) + res[0]['Value']['WaitTimeBetweenIterationsInSeconds'], 15) + + cluster_health_policy = res[0]['Value']['ClusterHealthPolicy'] - cluster_health_policy = res[0].value.cluster_health_policy - self.assertIsInstance(cluster_health_policy, ClusterHealthPolicy) - self.assertEqual(cluster_health_policy.max_percent_unhealthy_nodes, 0) - self.assertEqual(cluster_health_policy.consider_warning_as_error, True) + self.assertEqual(cluster_health_policy['MaxPercentUnhealthyNodes'], 0) + self.assertEqual(cluster_health_policy['ConsiderWarningAsError'], True) self.assertEqual( - cluster_health_policy.max_percent_unhealthy_applications, 0) + cluster_health_policy['MaxPercentUnhealthyApplications'], 0) - self.assertIsInstance(res[0].value.context, ChaosContext) - self.assertIsInstance(res[0].value.context.map, dict) + self.assertIsInstance(res[0]['Value']['Context']['Map'], dict) self.assertEqual( - res[0].value.context.map['myContextKey'], 'myContextValue') + res[0]['Value']['Context']['Map']['myContextKey'], 'myContextValue') + + chaos_target_filter = res[0]['Value']['ChaosTargetFilter'] - chaos_target_filter = res[0].value.chaos_target_filter - self.assertIsInstance(chaos_target_filter, ChaosTargetFilter) self.assertIsInstance( - chaos_target_filter.node_type_inclusion_list, list) - self.assertEqual(len(chaos_target_filter.node_type_inclusion_list), 2) + chaos_target_filter['NodeTypeInclusionList'], list) + self.assertEqual(len(chaos_target_filter['NodeTypeInclusionList']), 2) self.assertEqual( - chaos_target_filter.node_type_inclusion_list[0], 'N0010Ref') + chaos_target_filter['NodeTypeInclusionList'][0], 'N0010Ref') self.assertEqual( - chaos_target_filter.node_type_inclusion_list[1], 'N0020Ref') + chaos_target_filter['NodeTypeInclusionList'][1], 'N0020Ref') + + self.assertEqual(res[1]['Key'], 'myOtherParametersName') - self.assertIsInstance(res[1], ChaosParametersDictionaryItem) - self.assertEqual(res[1].key, 'myOtherParametersName') - self.assertIsInstance(res[1].value, ChaosParameters) - self.assertEqual(res[1].value.time_to_run_in_seconds, '300') + self.assertEqual(res[1]['Value']['TimeToRunInSeconds'], '300') self.assertEqual( - res[1].value.max_cluster_stabilization_timeout_in_seconds, 20) - self.assertEqual(res[1].value.max_concurrent_faults, 4) - self.assertEqual(res[1].value.enable_move_replica_faults, False) - self.assertEqual(res[1].value.wait_time_between_faults_in_seconds, 50) + res[1]['Value']['MaxClusterStabilizationTimeoutInSeconds'], 20) + self.assertEqual(res[1]['Value']['MaxConcurrentFaults'], 4) + self.assertEqual(res[1]['Value']['EnableMoveReplicaFaults'], False) + self.assertEqual(res[1]['Value']['WaitTimeBetweenFaultsInSeconds'], 50) self.assertEqual( - res[1].value.wait_time_between_iterations_in_seconds, 10) + res[1]['Value']['WaitTimeBetweenIterationsInSeconds'], 10) - cluster_health_policy2 = res[1].value.cluster_health_policy - self.assertIsInstance(cluster_health_policy2, ClusterHealthPolicy) - self.assertEqual(cluster_health_policy2.max_percent_unhealthy_nodes, 2) + cluster_health_policy2 = res[1]['Value']['ClusterHealthPolicy'] + + self.assertEqual(cluster_health_policy2['MaxPercentUnhealthyNodes'], 2) self.assertEqual( - cluster_health_policy2.consider_warning_as_error, False) + cluster_health_policy2['ConsiderWarningAsError'], False) self.assertEqual( - cluster_health_policy2.max_percent_unhealthy_applications, 5) + cluster_health_policy2['MaxPercentUnhealthyApplications'], 5) - self.assertIsInstance(res[1].value.context, ChaosContext) - self.assertIsInstance(res[1].value.context.map, dict) - self.assertEqual( - res[1].value.context.map['myOtherContextKey'], + self.assertIsInstance(res[1]['Value']['Context']['Map'], dict) + self.assertEqual(res[1]['Value']['Context']['Map']['myOtherContextKey'], 'myOtherContextValue') - chaos_target_filter2 = res[1].value.chaos_target_filter - self.assertIsInstance(chaos_target_filter2, ChaosTargetFilter) + chaos_target_filter2 = res[1]['Value']['ChaosTargetFilter'] + self.assertIsInstance( - chaos_target_filter2.node_type_inclusion_list, list) + chaos_target_filter2['NodeTypeInclusionList'], list) self.assertEqual( - len(chaos_target_filter2.node_type_inclusion_list), 2) + len(chaos_target_filter2['NodeTypeInclusionList']), 2) self.assertEqual( - chaos_target_filter2.node_type_inclusion_list[0], + chaos_target_filter2['NodeTypeInclusionList'][0], 'N0030Ref') self.assertEqual( - chaos_target_filter2.node_type_inclusion_list[1], + chaos_target_filter2['NodeTypeInclusionList'][1], 'N0040Ref') diff --git a/src/sfctl/tests/chaos_test.py b/src/sfctl/tests/chaos_test.py index e2742dd2..509b25b1 100644 --- a/src/sfctl/tests/chaos_test.py +++ b/src/sfctl/tests/chaos_test.py @@ -20,7 +20,6 @@ def test_parse_none_context(self): def test_parse_populated_context(self): """Parse context with contents""" - from azure.servicefabric.models import ChaosContext wrapper = sf_c.parse_chaos_context({ 'key1': 'value1', @@ -28,8 +27,7 @@ def test_parse_populated_context(self): 'key3': 'value3' }) - self.assertIsInstance(wrapper, ChaosContext) - res = wrapper.map + res = wrapper['Map'] self.assertIsInstance(res, dict) self.assertEqual(len(res), 3) self.assertEqual(res['key1'], 'value1') @@ -48,12 +46,12 @@ def test_parse_node_type_list(self): 'N0010Ref', 'N0020Ref', 'N0030Ref', 'N0070Ref'] }) - self.assertEqual(len(res.node_type_inclusion_list), 4) - self.assertEqual(res.application_inclusion_list, None) - self.assertEqual(res.node_type_inclusion_list[0], 'N0010Ref') - self.assertEqual(res.node_type_inclusion_list[1], 'N0020Ref') - self.assertEqual(res.node_type_inclusion_list[2], 'N0030Ref') - self.assertEqual(res.node_type_inclusion_list[3], 'N0070Ref') + self.assertEqual(len(res['NodeTypeInclusionList']), 4) + self.assertEqual(res['ApplicationInclusionList'], None) + self.assertEqual(res['NodeTypeInclusionList'][0], 'N0010Ref') + self.assertEqual(res['NodeTypeInclusionList'][1], 'N0020Ref') + self.assertEqual(res['NodeTypeInclusionList'][2], 'N0030Ref') + self.assertEqual(res['NodeTypeInclusionList'][3], 'N0070Ref') def test_parse_application_list(self): """Parse application inclusion list""" @@ -62,7 +60,7 @@ def test_parse_application_list(self): 'ApplicationInclusionList': ['fabric:/TestApp1', 'fabric:/TestApp2'] # pylint: disable=line-too-long }) - self.assertEqual(len(res.application_inclusion_list), 2) - self.assertEqual(res.node_type_inclusion_list, None) - self.assertEqual(res.application_inclusion_list[0], 'fabric:/TestApp1') - self.assertEqual(res.application_inclusion_list[1], 'fabric:/TestApp2') + self.assertEqual(len(res['ApplicationInclusionList']), 2) + self.assertEqual(res['NodeTypeInclusionList'], None) + self.assertEqual(res['ApplicationInclusionList'][0], 'fabric:/TestApp1') + self.assertEqual(res['ApplicationInclusionList'][1], 'fabric:/TestApp2') diff --git a/src/sfctl/tests/health_test.py b/src/sfctl/tests/health_test.py index 1882dac3..420d69ee 100644 --- a/src/sfctl/tests/health_test.py +++ b/src/sfctl/tests/health_test.py @@ -21,17 +21,15 @@ def test_parse_none_svc_health_policy(self): def test_parse_single_svc_health_policy(self): """Parse single health policy item""" - from azure.servicefabric.models import ServiceTypeHealthPolicy res = sf_c.parse_service_health_policy({ 'max_percent_unhealthy_partitions_per_service': 10, 'max_percent_unhealthy_replicas_per_partition': 20, 'max_percent_unhealthy_services': 25 }) - self.assertIsInstance(res, ServiceTypeHealthPolicy) - self.assertEqual(res.max_percent_unhealthy_partitions_per_service, 10) - self.assertEqual(res.max_percent_unhealthy_replicas_per_partition, 20) - self.assertEqual(res.max_percent_unhealthy_services, 25) + self.assertEqual(res['MaxPercentUnhealthyPartitionsPerService'], 10) + self.assertEqual(res['MaxpercentUnhealthyReplicasPerPartition'], 20) + self.assertEqual(res['MaxPercentUnhealthyServices'], 25) def test_parse_none_svc_health_policy_map(self): """Parse None service health policy map returns None""" @@ -43,7 +41,6 @@ def test_parse_empty_svc_health_policy_map(self): def test_parse_single_svc_health_policy_map_item(self): """Parse single item service health policy map""" - from azure.servicefabric.models import ServiceTypeHealthPolicyMapItem # pylint: disable=line-too-long res = sf_c.parse_service_health_policy_map([{ 'Key': 'test_svc', @@ -55,11 +52,10 @@ def test_parse_single_svc_health_policy_map_item(self): }]) self.assertEqual(len(res), 1) - self.assertIsInstance(res[0], ServiceTypeHealthPolicyMapItem) - res = res[0].value - self.assertEqual(res.max_percent_unhealthy_partitions_per_service, 10) - self.assertEqual(res.max_percent_unhealthy_replicas_per_partition, 20) - self.assertEqual(res.max_percent_unhealthy_services, 25) + res = res[0]['Value'] + self.assertEqual(res['MaxPercentUnhealthyPartitionsPerService'], 10) + self.assertEqual(res['MaxpercentUnhealthyReplicasPerPartition'], 20) + self.assertEqual(res['MaxPercentUnhealthyServices'], 25) def test_parse_none_app_health_map(self): """Parse None application health policy map returns None""" @@ -71,11 +67,9 @@ def test_parse_empty_app_health_map(self): def test_parse_single_app_health_map_item(self): """Parse single item application health policy map""" - from azure.servicefabric.models import ApplicationTypeHealthPolicyMapItem # pylint: disable=line-too-long res = sf_c.parse_app_health_map([{'key': 'test_app', 'value': '30'}]) self.assertEqual(len(res), 1) res = res[0] - self.assertIsInstance(res, ApplicationTypeHealthPolicyMapItem) - self.assertEqual(res.key, 'test_app') - self.assertEqual(res.value, '30') + self.assertEqual(res['Key'], 'test_app') + self.assertEqual(res['Value'], '30') diff --git a/src/sfctl/tests/help_text_test.py b/src/sfctl/tests/help_text_test.py index b1f33dc8..1086039f 100644 --- a/src/sfctl/tests/help_text_test.py +++ b/src/sfctl/tests/help_text_test.py @@ -197,6 +197,9 @@ def validate_output(self, command_input, subgroups=(), commands=()): # pylint: self.fail('No help text in command: ' + help_command) returned_string = returned_string.decode('utf-8') + # remove global flag for verbose text because it too easily false triggers + returned_string = returned_string.replace("--debug for full debug logs.", "") + lines = returned_string.splitlines() for line in lines: diff --git a/src/sfctl/tests/request_generation_body_validation.py b/src/sfctl/tests/request_generation_body_validation.py index 644fc10c..c1fc0f33 100644 --- a/src/sfctl/tests/request_generation_body_validation.py +++ b/src/sfctl/tests/request_generation_body_validation.py @@ -39,9 +39,10 @@ def validate_dictionary_value(command, dict_key, actual_body, expected_body): This function expects that actual_body and expected_body are dictionaries. The command parameter is a string that identifies which command this is validating. """ + actual_value = actual_body[dict_key] + expected_value = expected_body[dict_key] - return _check_and_print_matching_error(command, dict_key, - actual_body[dict_key], expected_body[dict_key]) + return _check_and_print_matching_error(command, dict_key, actual_value, expected_value) def validate_list_of_objects(command, actual_body, expected_body): """ Validate that two dictionaries, actual_body and expected_body, @@ -81,8 +82,7 @@ def validate_flat_dictionary(command, actual_body, expected_body): return False for key in expected_body: - if not validate_dictionary_value(command, key, - actual_body, expected_body): + if not validate_dictionary_value(command, key, actual_body, expected_body): return False return True diff --git a/src/sfctl/tests/request_generation_test.py b/src/sfctl/tests/request_generation_test.py index a398d073..b05e4076 100644 --- a/src/sfctl/tests/request_generation_test.py +++ b/src/sfctl/tests/request_generation_test.py @@ -14,10 +14,10 @@ import logging from shutil import rmtree import vcr -from msrest.authentication import Authentication from mock import patch from knack.testsdk import ScenarioTest from azure.servicefabric import ServiceFabricClientAPIs +from sfctl.apiclient import FakeAuthenticationPolicy, FakeCredentialProtocol from sfctl.entry import cli from sfctl.tests.helpers import (MOCK_CONFIG, get_mock_endpoint, set_mock_endpoint) from sfctl.tests.mock_server import (find_localhost_free_port, start_mock_server) @@ -302,8 +302,7 @@ def paths_generation_helper(self): # pylint: disable=too-many-statements, too-m '/$/GetClusterVersion', ['api-version=6.4'], command_as_func=True, - command_args=ServiceFabricClientAPIs(credentials=Authentication(), - base_url=get_mock_endpoint())) + command_args=ServiceFabricClientAPIs(FakeCredentialProtocol(), endpoint=get_mock_endpoint(), connection_verify=False, enforce_https=False, authentication_policy=FakeAuthenticationPolicy())) self.validate_command( # config-versions 'sfctl cluster config-versions --config-version=version', 'GET', diff --git a/src/sfctl/tests/service_test.py b/src/sfctl/tests/service_test.py index 0324d108..f65074ec 100644 --- a/src/sfctl/tests/service_test.py +++ b/src/sfctl/tests/service_test.py @@ -28,8 +28,8 @@ def test_parse_partial_correlation_desc(self): def test_parse_complete_correlation_desc(self): """Parse a single correlation description""" res = sf_c.correlation_desc('test', 'Affinity') - self.assertEqual(res.service_name, 'test') - self.assertEqual(res.scheme, 'Affinity') + self.assertEqual(res['ServiceName'], 'test') + self.assertEqual(res['Scheme'], 'Affinity') def test_parse_empty_load_metrics(self): """Parse empty load metrics returns None""" @@ -49,23 +49,23 @@ def test_parse_scaling_policy_test(self): 'trigger':{'kind':'AverageServiceLoad', 'metric_name':'MetricB', 'upper_load_threshold':30.0, 'lower_load_threshold':10.0, 'scale_interval_in_seconds':1000} #pylint: disable=line-too-long }]) self.assertEqual(len(res), 2) - self.assertEqual(res[0].scaling_trigger.metric_name, 'MetricA') - self.assertEqual(res[0].scaling_trigger.upper_load_threshold, 20.0) - self.assertEqual(res[0].scaling_trigger.lower_load_threshold, 10.0) - self.assertEqual(res[0].scaling_mechanism.max_instance_count, 4) - self.assertEqual(res[1].scaling_trigger.scale_interval_in_seconds, 1000) - self.assertEqual(res[1].scaling_trigger.upper_load_threshold, 30.0) - self.assertEqual(res[1].scaling_trigger.lower_load_threshold, 10.0) - self.assertEqual(res[1].scaling_mechanism.scale_increment, 2) + self.assertEqual(res[0]['ScalingTrigger']['MetricName'], 'MetricA') + self.assertEqual(res[0]['ScalingTrigger']['UpperLoadThreshold'], 20.0) + self.assertEqual(res[0]['ScalingTrigger']['LowerLoadThreshold'], 10.0) + self.assertEqual(res[0]['ScalingMechanism']['MaxInstanceCount'], 4) + self.assertEqual(res[1]['ScalingTrigger']['ScaleIntervalInSeconds'], 1000) + self.assertEqual(res[1]['ScalingTrigger']['UpperLoadThreshold'], 30.0) + self.assertEqual(res[1]['ScalingTrigger']['LowerLoadThreshold'], 10.0) + self.assertEqual(res[1]['ScalingMechanism']['ScaleIncrement'], 2) def test_parse_service_tags(self): """Parse service tags""" service_tags = ["tagX", "tagY", "tagZ"] res = sf_c.parse_service_tags(service_tags) - self.assertEqual(len(service_tags), res.count) - self.assertEqual(res.tags[0], service_tags[0]) - self.assertEqual(res.tags[1], service_tags[1]) - self.assertEqual(res.tags[2], service_tags[2]) + self.assertEqual(len(service_tags), res['Count']) + self.assertEqual(res['Tags'][0], service_tags[0]) + self.assertEqual(res['Tags'][1], service_tags[1]) + self.assertEqual(res['Tags'][2], service_tags[2]) def test_parse_incomplete_load_metrics(self): """Parse single incomplete load metrics definition""" @@ -75,11 +75,11 @@ def test_parse_incomplete_load_metrics(self): self.assertEqual(len(res), 1) res = res[0] - self.assertEqual(res.name, 'test_metric') - self.assertIsNone(res.weight) - self.assertIsNone(res.primary_default_load) - self.assertIsNone(res.secondary_default_load) - self.assertEqual(res.default_load, 10) + self.assertEqual(res['Name'], 'test_metric') + self.assertIsNone(res['Weight']) + self.assertIsNone(res['PrimaryDefaultLoad']) + self.assertIsNone(res['SecondaryDefaultLoad']) + self.assertEqual(res['DefaultLoad'], 10) def test_parse_invalid_placement_policy_type(self): """Parsing invalid placement policy type raises error""" @@ -95,11 +95,6 @@ def test_parse_missing_placement_policy_domain_name(self): def test_parse_all_placement_policy_types(self): """Parse all placement policy types""" - from azure.servicefabric.models import (ServicePlacementNonPartiallyPlaceServicePolicyDescription, # pylint: disable=line-too-long - ServicePlacementPreferPrimaryDomainPolicyDescription, # pylint: disable=line-too-long - ServicePlacementRequiredDomainPolicyDescription, # pylint: disable=line-too-long - ServicePlacementRequireDomainDistributionPolicyDescription) # pylint: disable=line-too-long - res = sf_c.parse_placement_policies([{ 'type': 'NonPartiallyPlaceService' }, { @@ -112,25 +107,8 @@ def test_parse_all_placement_policy_types(self): 'type': 'RequireDomainDistribution', 'domain_name': 'test_3' }]) - self.assertIsInstance( - res[0], - ServicePlacementNonPartiallyPlaceServicePolicyDescription - ) - self.assertIsInstance( - res[1], - ServicePlacementPreferPrimaryDomainPolicyDescription - ) - self.assertEqual(res[1].domain_name, 'test_1') - self.assertIsInstance( - res[2], - ServicePlacementRequiredDomainPolicyDescription - ) - self.assertEqual(res[2].domain_name, 'test-22') - self.assertIsInstance( - res[3], - ServicePlacementRequireDomainDistributionPolicyDescription - ) - self.assertEqual(res[3].domain_name, 'test_3') + + self.assertEqual(res[3]['DomainName'], 'test_3') def test_invalid_move_cost(self): """Invalid move cost raises error""" @@ -210,25 +188,20 @@ def test_parse_multiple_partition_policy(self): def test_parse_valid_partition_policy(self): """Parsing valid partition polices returns correct policies""" - from azure.servicefabric.models import (NamedPartitionSchemeDescription, # pylint: disable=line-too-long - SingletonPartitionSchemeDescription, # pylint:disable=line-too-long - UniformInt64RangePartitionSchemeDescription) # pylint:disable=line-too-long res = sf_c.parse_partition_policy(True, ['test'], False, None, None, None, False) - self.assertIsInstance(res, NamedPartitionSchemeDescription) - self.assertEqual(res.count, 1) - self.assertEqual(res.names, ['test']) + self.assertEqual(res['Count'], 1) + self.assertEqual(res['Names'], ['test']) res = sf_c.parse_partition_policy(False, None, True, 1, 5, 3, False) - self.assertIsInstance(res, UniformInt64RangePartitionSchemeDescription) - self.assertEqual(res.high_key, 5) - self.assertEqual(res.low_key, 1) - self.assertEqual(res.count, 3) + + self.assertEqual(res['HighKey'], 5) + self.assertEqual(res['LowKey'], 1) + self.assertEqual(res['Count'], 3) res = sf_c.parse_partition_policy(False, None, False, None, None, None, True) - self.assertIsInstance(res, SingletonPartitionSchemeDescription) def test_activation_mode_invalid(self): """Invalid activation mode specified raises error""" From 55ac75d1255b7e3239f22454d7379a66d3a672c0 Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Wed, 4 May 2022 15:10:11 -0700 Subject: [PATCH 08/20] removed , --- .github/workflows/build-wheel.yml | 2 +- src/setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-wheel.yml b/.github/workflows/build-wheel.yml index 59846492..c96a645a 100644 --- a/.github/workflows/build-wheel.yml +++ b/.github/workflows/build-wheel.yml @@ -25,7 +25,7 @@ jobs: pip install --force-reinstall -r requirements.txt - name: Build Wheel run: | - python sfctl/setup.py bdist_wheel --universal + python src/setup.py bdist_wheel --universal - name: upload wheel uses: actions/upload-artifact@v2-preview diff --git a/src/setup.py b/src/setup.py index 71a5ce0b..86817772 100644 --- a/src/setup.py +++ b/src/setup.py @@ -34,7 +34,7 @@ def read(fname): 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.10' ], keywords='servicefabric azure', python_requires='>3.6, <4', From 6eebf549b285d3080a86643497b3e26dd4b35ed6 Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Wed, 4 May 2022 15:15:39 -0700 Subject: [PATCH 09/20] install wheel. --- .github/workflows/build-wheel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-wheel.yml b/.github/workflows/build-wheel.yml index c96a645a..d16af778 100644 --- a/.github/workflows/build-wheel.yml +++ b/.github/workflows/build-wheel.yml @@ -23,6 +23,7 @@ jobs: python -m pip install --upgrade pip pip install --force-reinstall -e ./src pip install --force-reinstall -r requirements.txt + pip install wheel - name: Build Wheel run: | python src/setup.py bdist_wheel --universal From 17aaa807c6f85d396b9dc278f536de6bb7940849 Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Wed, 4 May 2022 15:17:22 -0700 Subject: [PATCH 10/20] doesnt like version 3.10 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 779d6535..d5f6a0e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9, 3.10] + python-version: [3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 From b31f957e3af53782f37612fe238e16b942ad82ec Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Wed, 4 May 2022 16:39:54 -0700 Subject: [PATCH 11/20] changed how restart is passed in. --- src/sfctl/custom_node.py | 2 +- src/sfctl/tests/custom_help_text_correctness_test.py | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/sfctl/custom_node.py b/src/sfctl/custom_node.py index c054e8cc..aea46280 100644 --- a/src/sfctl/custom_node.py +++ b/src/sfctl/custom_node.py @@ -30,7 +30,7 @@ def disable_node(client, node_name, deactivation_intent, timeout=60): client.disable_node(node_name, payload, timeout=timeout) -def restart_node(client, node_name, node_instance_id=0, create_fabric_dump=False, timeout=60): +def restart_node(client, node_name, node_instance_id=0, create_fabric_dump="False", timeout=60): """Restarts a Service Fabric cluster node. :param str node_name: The name of the node diff --git a/src/sfctl/tests/custom_help_text_correctness_test.py b/src/sfctl/tests/custom_help_text_correctness_test.py index bd518d51..c4e008ac 100644 --- a/src/sfctl/tests/custom_help_text_correctness_test.py +++ b/src/sfctl/tests/custom_help_text_correctness_test.py @@ -90,14 +90,7 @@ def _read_python_sdk(): # List of strings # Only one service_fabric_client_ap_is.py should exist but can appear differently depending on if its custom sdk # or if its the official release. - sdk_files_path = [join(sdk_path, '_service_fabric_client_ap_is.py'), - join(sdk_path, 'service_fabric_client_ap_is.py')] - - # Add all the models files - models_path = join(sdk_path, 'models') - for file_name in listdir(models_path): - if file_name.endswith('.py'): - sdk_files_path.append(join(models_path, file_name)) + sdk_files_path = [join(sdk_path, 'operations', '_operations.py')] for python_file_path in sdk_files_path: try: @@ -230,7 +223,7 @@ def test_custom_help_text(self): print() print(line) - allowable_lines_not_found = [148, 89] + allowable_lines_not_found = [120, 89] print() print('The total number of lines compared is ' + str(len(custom_help_lines))) From c4ec57ccdcac8c68d7090b39579bd4960b9c1275 Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Thu, 5 May 2022 14:16:55 -0700 Subject: [PATCH 12/20] updated the deployed app. --- src/sfctl/commands.py | 2 +- src/sfctl/custom_app.py | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/sfctl/commands.py b/src/sfctl/commands.py index 04fd3df6..fe2085d2 100644 --- a/src/sfctl/commands.py +++ b/src/sfctl/commands.py @@ -130,7 +130,6 @@ def load_command_table(self, args): # pylint: disable=too-many-statements 'deployed-list', 'get_deployed_application_info_list' ) - group.command('deployed', 'get_deployed_application_info') group.command( 'deployed-health', 'get_deployed_application_health' @@ -308,6 +307,7 @@ def load_command_table(self, args): # pylint: disable=too-many-statements group.command('upgrade', 'upgrade') group.command('delete', 'delete_application') group.command('upgrade-resume', 'resume_application_upgrade') + group.command('deployed', 'get_deployed_application_info') with CommandGroup(self, 'application', 'sfctl.custom_app#{}') as group: group.command('upload', 'upload') diff --git a/src/sfctl/custom_app.py b/src/sfctl/custom_app.py index 64df730a..5a3044bd 100644 --- a/src/sfctl/custom_app.py +++ b/src/sfctl/custom_app.py @@ -791,4 +791,35 @@ def delete_application(client, application_id, force_remove, timeout=60): delete is timing out due to issues in the service code that prevents graceful close of replicas. """ - client.delete_application(application_id, force_remove=force_remove, timeout=timeout) \ No newline at end of file + client.delete_application(application_id, force_remove=force_remove, timeout=timeout) + +def get_deployed_application_info(client, application_id, node_name, include_health_state, timeout): + """Gets the information about an application deployed on a Service Fabric node. + + This query returns system application information if the application ID provided is for system + application. Results encompass deployed applications in active, activating, and downloading + states. This query requires that the node name corresponds to a node on the cluster. The query + fails if the provided node name does not point to any active Service Fabric nodes on the + cluster. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :paramtype timeout: long + :param include_health_state: Include the health state of an entity. + If this parameter is false or not specified, then the health state returned is "Unknown". + When set to true, the query goes in parallel to the node and the health system service before + the results are merged. + As a result, the query is more expensive and may take a longer time. Default value is False. + :paramtype include_health_state: bool + """ + + client.get_deployed_application_info(application_id, node_name, include_health_state=include_health_state, timeout=timeout) \ No newline at end of file From 12592b73f6f6b2547ec511cda7b109e2befe2b09 Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Thu, 5 May 2022 15:22:34 -0700 Subject: [PATCH 13/20] breaking test fixes --- src/sfctl/commands.py | 6 ++---- src/sfctl/custom_app.py | 43 ++++++++++++++++++++++++++++++++++++-- src/sfctl/custom_health.py | 14 +++++++------ 3 files changed, 51 insertions(+), 12 deletions(-) diff --git a/src/sfctl/commands.py b/src/sfctl/commands.py index fe2085d2..cadf9f98 100644 --- a/src/sfctl/commands.py +++ b/src/sfctl/commands.py @@ -126,10 +126,7 @@ def load_command_table(self, args): # pylint: disable=too-many-statements 'upgrade-rollback', 'rollback_application_upgrade' ) - group.command( - 'deployed-list', - 'get_deployed_application_info_list' - ) + group.command( 'deployed-health', 'get_deployed_application_health' @@ -308,6 +305,7 @@ def load_command_table(self, args): # pylint: disable=too-many-statements group.command('delete', 'delete_application') group.command('upgrade-resume', 'resume_application_upgrade') group.command('deployed', 'get_deployed_application_info') + group.command('deployed-list', 'get_deployed_application_info_list') with CommandGroup(self, 'application', 'sfctl.custom_app#{}') as group: group.command('upload', 'upload') diff --git a/src/sfctl/custom_app.py b/src/sfctl/custom_app.py index 5a3044bd..fe1a62e3 100644 --- a/src/sfctl/custom_app.py +++ b/src/sfctl/custom_app.py @@ -793,7 +793,7 @@ def delete_application(client, application_id, force_remove, timeout=60): """ client.delete_application(application_id, force_remove=force_remove, timeout=timeout) -def get_deployed_application_info(client, application_id, node_name, include_health_state, timeout): +def get_deployed_application_info(client, application_id, node_name, include_health_state=False, timeout=60): """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 @@ -822,4 +822,43 @@ def get_deployed_application_info(client, application_id, node_name, include_hea :paramtype include_health_state: bool """ - client.get_deployed_application_info(application_id, node_name, include_health_state=include_health_state, timeout=timeout) \ No newline at end of file + client.get_deployed_application_info(node_name, application_id, include_health_state=include_health_state, timeout=timeout) + + +def get_deployed_application_info_list(client, node_name, include_health_state=False, continuation_token="", max_results=0, timeout=60): + """Gets the list of applications deployed on a Service Fabric node. + + Gets the list of applications deployed on a Service Fabric node. The results do not include + information about deployed system applications unless explicitly queried for by ID. Results + encompass deployed applications in active, activating, and downloading states. This query + requires that the node name corresponds to a node on the cluster. The query fails if the + provided node name does not point to any active Service Fabric nodes on the cluster. + + :param node_name: The name of the node. + :type node_name: str + :keyword 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. Default value is 60. + :paramtype timeout: long + :param include_health_state: Include the health state of an entity. + If this parameter is false or not specified, then the health state returned is "Unknown". + When set to true, the query goes in parallel to the node and the health system service before + the results are merged. + As a result, the query is more expensive and may take a longer time. Default value is False. + :paramtype include_health_state: bool + :param continuation_token_parameter: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged + queries. This parameter defines the upper bound on the number of results returned. The results + returned can be less than the specified maximum results if they do not fit in the message as + per the max message size restrictions defined in the configuration. If this parameter is zero + or not specified, the paged query includes as many results as possible that fit in the return + """ + + client.get_deployed_application_info_list(node_name, include_health_state=include_health_state, continuation_token_parameter=continuation_token, + max_results=max_results, timeout=timeout) diff --git a/src/sfctl/custom_health.py b/src/sfctl/custom_health.py index bdccf5c2..cea99698 100644 --- a/src/sfctl/custom_health.py +++ b/src/sfctl/custom_health.py @@ -65,19 +65,21 @@ def parse_app_health_map(formatted_map): health_map.append(map_item) return health_map -def create_health_information(source_id, health_property, health_state, ttl, # pylint: disable=too-many-arguments +def create_health_information(source_id, health_property, health_state, ttl, #pylint: disable=too-many-arguments description, sequence_number, remove_when_expired): """Validates and creates a health information object""" - import distutils + # import distutils if health_state not in ['Invalid', 'Ok', 'Warning', 'Error', 'Unknown']: raise CLIError('Invalid health state specified') if type(remove_when_expired) == bool: rwe = remove_when_expired - else: - rwe = bool(distutils.util.strtobool(remove_when_expired)) - + elif type(remove_when_expired) == str: + if remove_when_expired == "True" or remove_when_expired == "true": + rwe = True + else: + rwe = False return {"SourceId": source_id, "Property": health_property, @@ -88,7 +90,7 @@ def create_health_information(source_id, health_property, health_state, ttl, # "RemoveWhenExpired": rwe} -def report_cluster_health(client, source_id, health_property, health_state, # pylint: disable=missing-docstring,too-many-arguments +def report_cluster_health(client, source_id, health_property, health_state, #pylint: disable=missing-docstring,too-many-arguments ttl=None, description=None, sequence_number=None, remove_when_expired=False, immediate=False, timeout=60): From de4562500e52ad2b35f464cc1b18a756a4876fd2 Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Mon, 9 May 2022 11:00:22 -0700 Subject: [PATCH 14/20] moved some of the calls into sfctl. --- src/sfctl/commands.py | 218 ++++++++-------- src/sfctl/custom_app.py | 346 +++++++++++++++++++++++++- src/sfctl/custom_chaos.py | 40 +++ src/sfctl/custom_cluster_upgrade.py | 158 +++++++++++- src/sfctl/custom_compose.py | 89 ++++--- src/sfctl/custom_events.py | 324 ++++++++++++++++++++++++ src/sfctl/custom_is.py | 28 ++- src/sfctl/custom_node.py | 125 +++++++++- src/sfctl/custom_partition.py | 372 ++++++++++++++++++++++++++++ src/sfctl/custom_property.py | 48 +++- src/sfctl/custom_replica.py | 113 +++++++++ src/sfctl/custom_sa_cluster.py | 18 ++ src/sfctl/custom_service.py | 337 +++++++++++++++++++++++++ 13 files changed, 2055 insertions(+), 161 deletions(-) create mode 100644 src/sfctl/custom_events.py create mode 100644 src/sfctl/custom_partition.py create mode 100644 src/sfctl/custom_replica.py create mode 100644 src/sfctl/custom_sa_cluster.py diff --git a/src/sfctl/commands.py b/src/sfctl/commands.py index cadf9f98..49d017eb 100644 --- a/src/sfctl/commands.py +++ b/src/sfctl/commands.py @@ -59,51 +59,25 @@ def load_command_table(self, args): # pylint: disable=too-many-statements client_func_path = 'azure.servicefabric#ServiceFabricClientAPIs.{}' - with CommandGroup(self, 'rpm', client_func_path, - client_factory=client_create) as group: - group.command('list', 'get_repair_task_list') - with CommandGroup(self, 'sa-cluster', client_func_path, client_factory=client_create) as group: - group.command('config', 'get_cluster_configuration') group.command('upgrade-status', 'get_cluster_configuration_upgrade_status') with CommandGroup(self, 'cluster', client_func_path, client_factory=client_create) as group: - group.command('health', 'get_cluster_health') group.command('manifest', 'get_cluster_manifest') - group.command( - 'code-versions', - 'get_provisioned_fabric_code_version_info_list' - ) - group.command( - 'config-versions', - 'get_provisioned_fabric_config_version_info_list' - ) group.command('upgrade-status', 'get_cluster_upgrade_progress') group.command('recover-system', 'recover_system_partitions') group.command('operation-list', 'get_fault_operation_list') - group.command('operation-cancel', 'cancel_operation') group.command('upgrade-rollback', 'rollback_cluster_upgrade') with CommandGroup(self, 'node', client_func_path, client_factory=client_create) as group: - group.command('list', 'get_node_info_list') group.command('info', 'get_node_info') - group.command('health', 'get_node_health') group.command('load', 'get_node_load_info') group.command('enable', 'enable_node') group.command('remove-state', 'remove_node_state') - group.command('transition', 'start_node_transition') - group.command( - 'transition-status', - 'get_node_transition_progress' - ) - group.command( - 'add-configuration-parameter-overrides', - 'add_configuration_parameter_overrides' - ) group.command( 'get-configuration-overrides', 'get_configuration_overrides' @@ -115,44 +89,19 @@ def load_command_table(self, args): # pylint: disable=too-many-statements with CommandGroup(self, 'application', client_func_path, client_factory=client_create) as group: - group.command('type-list', 'get_application_type_info_list') - group.command('type', 'get_application_type_info_list_by_name') group.command('unprovision', 'unprovision_application_type') - group.command('list', 'get_application_info_list') - group.command('info', 'get_application_info') - group.command('health', 'get_application_health') group.command('upgrade-status', 'get_application_upgrade') group.command( 'upgrade-rollback', 'rollback_application_upgrade' ) - - group.command( - 'deployed-health', - 'get_deployed_application_health' - ) - group.command('manifest', 'get_application_manifest') group.command('load', 'get_application_load_info') with CommandGroup(self, 'service', client_func_path, client_factory=client_create) as group: - group.command('type-list', 'get_service_type_info_list') - group.command('manifest', 'get_service_manifest') - group.command( - 'deployed-type-list', - 'get_deployed_service_type_info_list' - ) - group.command( - 'deployed-type', - 'get_deployed_service_type_info_by_name' - ) - group.command('list', 'get_service_info_list') group.command('info', 'get_service_info') group.command('app-name', 'get_application_name_info') - group.command('delete', 'delete_service') group.command('description', 'get_service_description') - group.command('health', 'get_service_health') - group.command('resolve', 'resolve_service') group.command('recover', 'recover_service_partitions') group.command( 'package-list', @@ -162,75 +111,28 @@ def load_command_table(self, args): # pylint: disable=too-many-statements 'package-info', 'get_deployed_service_package_info_list_by_name' ) - group.command( - 'package-health', - 'get_deployed_service_package_health' - ) - group.command( - 'code-package-list', - 'get_deployed_code_package_info_list' - ) - group.command( - 'get-container-logs', - 'get_container_logs_deployed_on_node' - ) with CommandGroup(self, 'partition', client_func_path, client_factory=client_create) as group: - group.command('list', 'get_partition_info_list') group.command('info', 'get_partition_info') group.command('svc-name', 'get_service_name_info') - group.command('health', 'get_partition_health') group.command('load', 'get_partition_load_information') group.command('load-reset', 'reset_partition_load') group.command('recover', 'recover_partition') group.command('recover-all', 'recover_all_partitions') - group.command('data-loss', 'start_data_loss') - group.command('data-loss-status', 'get_data_loss_progress') - group.command('quorum-loss', 'start_quorum_loss') - group.command('quorum-loss-status', 'get_quorum_loss_progress') - group.command('restart', 'start_partition_restart') - group.command( - 'restart-status', - 'get_partition_restart_progress' - ) - group.command( - 'move-primary-replica', - 'move_primary_replica', - ) - group.command( - 'move-secondary-replica', - 'move_secondary_replica', - ) - group.command( - 'move-instance', - 'move_instance', - ) - group.command( - 'get-loaded-partition-info-list', - 'get_loaded_partition_info_list', - ) with CommandGroup(self, 'replica', client_func_path, client_factory=client_create) as group: - group.command('list', 'get_replica_info_list') group.command('info', 'get_replica_info') - group.command('health', 'get_replica_health') - group.command( - 'deployed-list', - 'get_deployed_service_replica_info_list' - ) group.command( 'deployed', 'get_deployed_service_replica_detail_info' ) group.command('restart', 'restart_replica') - group.command('remove', 'remove_replica') with CommandGroup(self, 'compose', client_func_path, client_factory=client_create) as group: group.command('status', 'get_compose_deployment_status') - group.command('list', 'get_compose_deployment_status_list') group.command('remove', 'remove_compose_deployment') group.command('upgrade-status', 'get_compose_deployment_upgrade_progress') @@ -252,26 +154,6 @@ def load_command_table(self, args): # pylint: disable=too-many-statements group.command('delete', 'delete_image_store_content') group.command('root-info', 'get_image_store_root_content') - with CommandGroup(self, 'property', client_func_path, - client_factory=client_create) as group: - group.command('list', 'get_property_info_list') - group.command('get', 'get_property_info') - group.command('delete', 'delete_property') - - with CommandGroup(self, 'events', client_func_path, - client_factory=client_create) as group: - group.command('cluster-list', 'get_cluster_event_list') - group.command('all-nodes-list', 'get_nodes_event_list') - group.command('node-list', 'get_node_event_list') - group.command('all-applications-list', 'get_applications_event_list') - group.command('application-list', 'get_application_event_list') - group.command('all-services-list', 'get_services_event_list') - group.command('service-list', 'get_service_event_list') - group.command('all-partitions-list', 'get_partitions_event_list') - group.command('partition-list', 'get_partition_event_list') - group.command('partition-all-replicas-list', 'get_partition_replicas_event_list') - group.command('partition-replica-list', 'get_partition_replica_event_list') - # --------------- # Custom commands # --------------- @@ -288,15 +170,25 @@ def load_command_table(self, args): # pylint: disable=too-many-statements group.command('provision', 'provision') group.command('unprovision', 'unprovision_cluster') group.command('upgrade-resume', 'resume_cluster_upgrade') + group.command('code-versions', 'get_provisioned_fabric_code_version_info_list') + group.command('config-versions', 'get_provisioned_fabric_config_version_info_list') + group.command('health', 'get_cluster_health') + group.command('operation-cancel', 'cancel_operation') with CommandGroup(self, 'sa-cluster', 'sfctl.custom_cluster_upgrade#{}', client_factory=client_create) as group: group.command('config-upgrade', 'sa_configuration_upgrade') + with CommandGroup(self, 'sa-cluster', 'sfctl.custom_sa_cluster#{}', + client_factory=client_create) as group: + group.command('config', 'get_cluster_configuration') + + with CommandGroup(self, 'compose', 'sfctl.custom_compose#{}', client_factory=client_create) as group: group.command('upgrade', 'upgrade') group.command('create', 'create') + group.command('list', 'get_compose_deployment_status_list') with CommandGroup(self, 'application', 'sfctl.custom_app#{}', client_factory=client_create) as group: @@ -306,6 +198,13 @@ def load_command_table(self, args): # pylint: disable=too-many-statements group.command('upgrade-resume', 'resume_application_upgrade') group.command('deployed', 'get_deployed_application_info') group.command('deployed-list', 'get_deployed_application_info_list') + group.command('deployed-health', 'get_deployed_application_health') + group.command('info', 'get_application_info') + group.command('list', 'get_application_info_list') + group.command('type', 'get_application_type_info_list_by_name') + group.command('type-list', 'get_application_type_info_list') + group.command('health', 'get_application_health') + group.command('manifest', 'get_application_manifest') with CommandGroup(self, 'application', 'sfctl.custom_app#{}') as group: group.command('upload', 'upload') @@ -318,6 +217,7 @@ def load_command_table(self, args): # pylint: disable=too-many-statements with CommandGroup(self, 'chaos', 'sfctl.custom_chaos#{}', client_factory=client_create) as group: group.command('start', 'start') + group.command('events', 'get_chaos_events') with CommandGroup(self, 'chaos schedule', 'sfctl.custom_chaos_schedule#{}', client_factory=client_create) as group: @@ -328,6 +228,32 @@ def load_command_table(self, args): # pylint: disable=too-many-statements group.command('create', 'create') group.command('update', 'update') group.command('package-deploy', 'package_upload') + group.command( + 'code-package-list', + 'get_deployed_code_package_info_list' + ) + group.command('delete', 'delete_service') + group.command( + 'deployed-type', + 'get_deployed_service_type_info_by_name' + ) + group.command( + 'deployed-type-list', + 'get_deployed_service_type_info_list' + ) + group.command( + 'get-container-logs', + 'get_container_logs_deployed_on_node' + ) + group.command('health', 'get_service_health') + group.command('list', 'get_service_info_list') + group.command('manifest', 'get_service_manifest') + group.command( + 'package-health', + 'get_deployed_service_package_health' + ) + group.command('resolve', 'resolve_service') + group.command('type-list', 'get_service_type_info_list') with CommandGroup(self, 'is', 'sfctl.custom_is#{}', client_factory=client_create) as group: @@ -338,10 +264,14 @@ def load_command_table(self, args): # pylint: disable=too-many-statements client_factory=client_create) as group: group.command('approve-force', 'force_approve_repair_task') group.command('delete', 'delete_repair_task') + group.command('list', 'get_repair_task_list') with CommandGroup(self, 'property', 'sfctl.custom_property#{}', client_factory=client_create) as group: group.command('put', 'naming_property_put') + group.command('delete', 'delete_property') + group.command('list', 'get_property_info_list') + group.command('get', 'get_property_info') with CommandGroup(self, 'application', 'sfctl.custom_app_type#{}', client_factory=client_create) as group: @@ -379,7 +309,59 @@ def load_command_table(self, args): # pylint: disable=too-many-statements group.command('remove-node-tags', 'remove_node_tags') group.command('disable', 'disable_node') group.command('restart', 'restart_node') + group.command( + 'add-configuration-parameter-overrides', + 'add_configuration_parameter_overrides' + ) + group.command('health', 'get_node_health') + group.command('list', 'get_node_info_list') + group.command('transition', 'start_node_transition') + group.command( + 'transition-status', + 'get_node_transition_progress' + ) + with CommandGroup(self, 'partition', 'sfctl.custom_partition#{}', + client_factory=client_create) as group: + group.command('data-loss', 'start_data_loss') + group.command('data-loss-status', 'get_data_loss_progress') + group.command( + 'get-loaded-partition-info-list', + 'get_loaded_partition_info_list', + ) + group.command('health', 'get_partition_health') + group.command('list', 'get_partition_info_list') + group.command('move-instance', 'move_instance') + group.command('move-primary-replica', 'move_primary_replica') + group.command('move-secondary-replica', 'move_secondary_replica') + group.command('quorum-loss', 'start_quorum_loss') + group.command('quorum-loss-status', 'get_quorum_loss_progress') + group.command('restart', 'start_partition_restart') + group.command('restart-status', 'get_partition_restart_progress') + + with CommandGroup(self, 'replica', 'sfctl.custom_replica#{}', + client_factory=client_create) as group: + group.command('list', 'get_replica_info_list') + group.command( + 'deployed-list', + 'get_deployed_service_replica_info_list' + ) + group.command('health', 'get_replica_health') + group.command('remove', 'remove_replica') + + with CommandGroup(self, 'events', 'sfctl.custom_events#{}', + client_factory=client_create) as group: + group.command('cluster-list', 'get_cluster_event_list') + group.command('all-nodes-list', 'get_nodes_event_list') + group.command('node-list', 'get_node_event_list') + group.command('all-applications-list', 'get_applications_event_list') + group.command('application-list', 'get_application_event_list') + group.command('all-services-list', 'get_services_event_list') + group.command('service-list', 'get_service_event_list') + group.command('all-partitions-list', 'get_partitions_event_list') + group.command('partition-list', 'get_partition_event_list') + group.command('partition-all-replicas-list', 'get_partition_replicas_event_list') + group.command('partition-replica-list', 'get_partition_replica_event_list') # --------------- # Settings diff --git a/src/sfctl/custom_app.py b/src/sfctl/custom_app.py index fe1a62e3..d1cbfdbe 100644 --- a/src/sfctl/custom_app.py +++ b/src/sfctl/custom_app.py @@ -773,7 +773,7 @@ def resume_application_upgrade(client, application_id, upgrade_domain_name, time "UpgradeDomainName": upgrade_domain_name } - client.resume_application_upgrade(application_id, payload, timeout=timeout) + return client.resume_application_upgrade(application_id, payload, timeout=timeout) def delete_application(client, application_id, force_remove, timeout=60): @@ -822,10 +822,10 @@ def get_deployed_application_info(client, application_id, node_name, include_hea :paramtype include_health_state: bool """ - client.get_deployed_application_info(node_name, application_id, include_health_state=include_health_state, timeout=timeout) + return client.get_deployed_application_info(node_name, application_id, include_health_state=include_health_state, timeout=timeout) -def get_deployed_application_info_list(client, node_name, include_health_state=False, continuation_token="", max_results=0, timeout=60): +def get_deployed_application_info_list(client, node_name, include_health_state=False, continuation_token=None, max_results=0, timeout=60): """Gets the list of applications deployed on a Service Fabric node. Gets the list of applications deployed on a Service Fabric node. The results do not include @@ -846,13 +846,12 @@ def get_deployed_application_info_list(client, node_name, include_health_state=F the results are merged. As a result, the query is more expensive and may take a longer time. Default value is False. :paramtype include_health_state: bool - :param continuation_token_parameter: The continuation token parameter is used to obtain next + :param continuation_token: The continuation token parameter is used to obtain next set of results. A continuation token with a non-empty value is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token does not contain a value. The value of this parameter should not be URL encoded. Default value is None. - :paramtype continuation_token_parameter: str :param max_results: The maximum number of results to be returned as part of the paged queries. This parameter defines the upper bound on the number of results returned. The results returned can be less than the specified maximum results if they do not fit in the message as @@ -860,5 +859,340 @@ def get_deployed_application_info_list(client, node_name, include_health_state=F or not specified, the paged query includes as many results as possible that fit in the return """ - client.get_deployed_application_info_list(node_name, include_health_state=include_health_state, continuation_token_parameter=continuation_token, + return client.get_deployed_application_info_list(node_name, include_health_state=include_health_state, continuation_token_parameter=continuation_token, max_results=max_results, timeout=timeout) + + +def get_deployed_application_health(client, application_id, node_name, deployed_service_packages_health_state_filter=0, + events_health_state_filter=0, exclude_health_statistics=False, timeout=60): + """Gets the information about health of an application deployed on a Service Fabric node. + + Gets the information about health of an application deployed on a Service Fabric node. Use + EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported + on the deployed application based on health state. Use DeployedServicePackagesHealthStateFilter + to optionally filter for DeployedServicePackageHealth children based on health state. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :param deployed_service_packages_health_state_filter: Allows filtering of the deployed + service package health state objects returned in the result of deployed application health + query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only deployed service packages that match the filter are returned. All deployed service + packages are used to evaluate the aggregated health state of the deployed application. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value can be a combination of these + values, obtained using the bitwise 'OR' operator. + For example, if the provided value is 6 then health state of service packages with HealthState + value of OK (2) and Warning (4) are returned. + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype deployed_service_packages_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + """ + + return client.get_deployed_application_health(node_name, application_id, events_health_state_filter=events_health_state_filter, + deployed_service_packages_health_state_filter=deployed_service_packages_health_state_filter, + exclude_health_statistics=exclude_health_statistics, timeout=timeout) + +def get_application_info(client, application_id, exclude_application_parameters=False, timeout=60): + """Gets information about a Service Fabric application. + + Returns the information about the application that was created or in the process of being + created in the Service Fabric cluster and whose name matches the one specified as the + parameter. The response includes the name, type, status, parameters, and other details about + the application. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :paramtype exclude_application_parameters: bool + """ + return client.get_application_info(application_id, exclude_application_parameters=exclude_application_parameters, timeout=timeout) + +def get_application_info_list(client, application_definition_kind_filter=0, application_type_name=None, exclude_application_parameters=False, + continuation_token = None, max_results=0, timeout=60): + """Gets the list of applications created in the Service Fabric cluster that match the specified + filters. + + Gets the information about the applications that were created or in the process of being + created in the Service Fabric cluster and match the specified filters. The response includes + the name, type, status, parameters, and other details about the application. If the + applications do not fit in a page, one page of results is returned as well as a continuation + token, which can be used to get the next page. Filters ApplicationTypeName and + ApplicationDefinitionKindFilter cannot be specified at the same time. + + :param application_definition_kind_filter: Used to filter on ApplicationDefinitionKind, which + is the mechanism used to define a Service Fabric application. + + + * Default - Default value, which performs the same function as selecting "All". The value is + 0. + * All - Filter that matches input with any ApplicationDefinitionKind value. The value is + 65535. + * ServiceFabricApplicationDescription - Filter that matches input with + ApplicationDefinitionKind value ServiceFabricApplicationDescription. The value is 1. + * Compose - Filter that matches input with ApplicationDefinitionKind value Compose. The value + is 2. Default value is 0. + :paramtype application_definition_kind_filter: int + :param application_type_name: The application type name used to filter the applications to + query for. This value should not contain the application type version. Default value is None. + :paramtype application_type_name: str + :param exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :paramtype exclude_application_parameters: bool + :param continuation_token: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token: str + :param max_results: The maximum number of results to be returned as part of the paged + queries. This parameter defines the upper bound on the number of results returned. The results + returned can be less than the specified maximum results if they do not fit in the message as + per the max message size restrictions defined in the configuration. If this parameter is zero + or not specified, the paged query includes as many results as possible that fit in the return + message. Default value is 0. + """ + return client.get_application_info_list(application_definition_kind_filter=application_definition_kind_filter, + application_type_name=application_type_name, + exclude_application_parameters=exclude_application_parameters, + continuation_token_parameter=continuation_token, max_results=max_results, timeout=timeout) + +def get_application_type_info_list_by_name(client, application_type_name, application_type_version=None, + exclude_application_parameters=False, continuation_token=None, max_results=0, timeout=60): + """Gets the list of application types in the Service Fabric cluster matching exactly the specified + name. + + Returns the information about the application types that are provisioned or in the process of + being provisioned in the Service Fabric cluster. These results are of application types whose + name match exactly the one specified as the parameter, and which comply with the given query + parameters. All versions of the application type matching the application type name are + returned, with each version returned as one application type. The response includes the name, + version, status, and other details about the application type. This is a paged query, meaning + that if not all of the application types fit in a page, one page of results is returned as well + as a continuation token, which can be used to get the next page. For example, if there are 10 + application types but a page only fits the first three application types, or if max results is + set to 3, then three is returned. To access the rest of the results, retrieve subsequent pages + by using the returned continuation token in the next query. An empty continuation token is + returned if there are no subsequent pages. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. Default value is None. + :paramtype application_type_version: str + :param exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :paramtype exclude_application_parameters: bool + :param continuation_token: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged + queries. This parameter defines the upper bound on the number of results returned. The results + returned can be less than the specified maximum results if they do not fit in the message as + per the max message size restrictions defined in the configuration. If this parameter is zero + or not specified, the paged query includes as many results as possible that fit in the return + message. Default value is 0. + :paramtype max_results: long + """ + return client.get_application_type_info_list_by_name(application_type_name, application_type_version=application_type_version, + exclude_application_parameters=exclude_application_parameters, continuation_token_paramater=continuation_token, + max_results=max_results, timeout=timeout) + +def get_application_type_info_list(client, application_type_definition_kind_filter=0, exclude_application_parameters=False, + continuation_token=None, max_results=0, timeout=60): + """Gets the list of application types in the Service Fabric cluster. + + Returns the information about the application types that are provisioned or in the process of + being provisioned in the Service Fabric cluster. Each version of an application type is + returned as one application type. The response includes the name, version, status, and other + details about the application type. This is a paged query, meaning that if not all of the + application types fit in a page, one page of results is returned as well as a continuation + token, which can be used to get the next page. For example, if there are 10 application types + but a page only fits the first three application types, or if max results is set to 3, then + three is returned. To access the rest of the results, retrieve subsequent pages by using the + returned continuation token in the next query. An empty continuation token is returned if there + are no subsequent pages. + + :param application_type_definition_kind_filter: Used to filter on + ApplicationTypeDefinitionKind which is the mechanism used to define a Service Fabric + application type. + + + * Default - Default value, which performs the same function as selecting "All". The value is + 0. + * All - Filter that matches input with any ApplicationTypeDefinitionKind value. The value is + 65535. + * ServiceFabricApplicationPackage - Filter that matches input with + ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. The value is 1. + * Compose - Filter that matches input with ApplicationTypeDefinitionKind value Compose. The + value is 2. Default value is 0. + :paramtype application_type_definition_kind_filter: int + :param exclude_application_parameters: The flag that specifies whether application parameters + will be excluded from the result. Default value is False. + :paramtype exclude_application_parameters: bool + :param continuation_token: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :param max_results: The maximum number of results to be returned as part of the paged + queries. This parameter defines the upper bound on the number of results returned. The results + returned can be less than the specified maximum results if they do not fit in the message as + per the max message size restrictions defined in the configuration. If this parameter is zero + or not specified, the paged query includes as many results as possible that fit in the return + message. Default value is 0. + """ + return client.get_application_type_info_list(application_type_definition_kind_filter=application_type_definition_kind_filter, + exclude_application_parameters=exclude_application_parameters, continuation_token_paramater=continuation_token, + max_results=max_results, timeout=timeout) + + +def get_application_health(client, application_id, events_health_state_filter=0, services_health_state_filter=0, + deployed_applications_health_state_filter=0, exclude_health_statistics=False, timeout=60): + """Gets the health of the service fabric application. + + Returns the heath state of the service fabric application. The response reports either Ok, + Error or Warning health state. If the entity is not found in the health store, it will return + Error. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :param deployed_applications_health_state_filter: Allows filtering of the deployed + applications health state objects returned in the result of application health query based on + their health state. + The possible values for this parameter include integer value of one of the following health + states. Only deployed applications that match the filter will be returned. + All deployed applications are used to evaluate the aggregated health state. If not specified, + all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values, obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of deployed applications with + HealthState value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype deployed_applications_health_state_filter: int + :param services_health_state_filter: Allows filtering of the services health state objects + returned in the result of services health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only services that match the filter are returned. All services are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of services with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype services_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + """ + return client.get_application_health(application_id, events_health_state_filter=events_health_state_filter, services_health_state_filter=services_health_state_filter, + deployed_applications_health_state_filter=deployed_applications_health_state_filter, exclude_health_statistics=exclude_health_statistics, timeout=timeout) + +def get_application_manifest(client, application_type_name, application_type_version, timeout=60): + """Gets the manifest describing an application type. + The response contains the application manifest XML as a string. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :paramtype application_type_version: str + """ + return client.get_application_manifest(application_type_name, application_type_version=application_type_version, timeout=timeout) diff --git a/src/sfctl/custom_chaos.py b/src/sfctl/custom_chaos.py index 552c8f8a..8566875b 100644 --- a/src/sfctl/custom_chaos.py +++ b/src/sfctl/custom_chaos.py @@ -110,3 +110,43 @@ def start(client, time_to_run="4294967295", max_cluster_stabilization=60, #pylin #pylint: enable=too-many-arguments client.start_chaos(chaos_params, timeout=timeout) + +def get_chaos_events(client, continuation_token=None, start_time_utc=None, end_time_utc=None, max_results=0, timeout=60): + """Gets the next segment of the Chaos events based on the continuation token or the time range. + + To get the next segment of the Chaos events, you can specify the ContinuationToken. To get the + start of a new segment of Chaos events, you can specify the time range + through StartTimeUtc and EndTimeUtc. You cannot specify both the ContinuationToken and the time + range in the same call. + When there are more than 100 Chaos events, the Chaos events are returned in multiple segments + where a segment contains no more than 100 Chaos events and to get the next segment you make a + call to this API with the continuation token. + + :param continuation_token: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token_parameter: str + :param start_time_utc: The Windows file time representing the start time of the time range + for which a Chaos report is to be generated. Consult `DateTime.ToFileTimeUtc Method + `_.aspx) for + details. Default value is None. + :paramtype start_time_utc: str + :param end_time_utc: The Windows file time representing the end time of the time range for + which a Chaos report is to be generated. Consult `DateTime.ToFileTimeUtc Method + `_.aspx) for + details. Default value is None. + :paramtype end_time_utc: str + :param max_results: The maximum number of results to be returned as part of the paged + queries. This parameter defines the upper bound on the number of results returned. The results + returned can be less than the specified maximum results if they do not fit in the message as + per the max message size restrictions defined in the configuration. If this parameter is zero + or not specified, the paged query includes as many results as possible that fit in the return + message. Default value is 0. + :paramtype max_results: long + """ + + return client.get_chaos_events(continuation_token_parameter=continuation_token, start_time_utc=start_time_utc, + end_time_utc=end_time_utc, max_results=max_results, timeout=timeout) diff --git a/src/sfctl/custom_cluster_upgrade.py b/src/sfctl/custom_cluster_upgrade.py index e0b57529..bee4a48e 100644 --- a/src/sfctl/custom_cluster_upgrade.py +++ b/src/sfctl/custom_cluster_upgrade.py @@ -183,7 +183,7 @@ def update_upgrade( #pylint: disable=too-many-locals,missing-docstring,invalid-n "ApplicationHealthPolicyMap": app_policies } - client.update_cluster_upgrade(update_desc, timeout=timeout) + return client.update_cluster_upgrade(update_desc, timeout=timeout) def provision(client, cluster_manifest_file_path, code_file_path, timeout=60): """ @@ -196,7 +196,7 @@ def provision(client, cluster_manifest_file_path, code_file_path, timeout=60): "ClusterManifestFilePath": cluster_manifest_file_path, "CodeFilePath": code_file_path } - client.provision_cluster(payload, timeout=timeout) + return client.provision_cluster(payload, timeout=timeout) def unprovision_cluster(client, code_version, config_version, timeout=60): """ @@ -208,7 +208,7 @@ def unprovision_cluster(client, code_version, config_version, timeout=60): "CodeVersion": code_version, "ConfigVersion": config_version } - client.unprovision_cluster(payload, timeout=timeout) + return client.unprovision_cluster(payload, timeout=timeout) def resume_cluster_upgrade(client, upgrade_domain, timeout=60): """ @@ -219,4 +219,154 @@ def resume_cluster_upgrade(client, upgrade_domain, timeout=60): payload = { "UpgradeDomain": upgrade_domain, } - client.resume_cluster_upgrade(payload, timeout=timeout) \ No newline at end of file + return client.resume_cluster_upgrade(payload, timeout=timeout) + +def get_provisioned_fabric_code_version_info_list(client, code_version=None, timeout=60): + """Gets a list of fabric config versions that are provisioned in a Service Fabric cluster. + + Gets a list of information about fabric config versions that are provisioned in the cluster. + The parameter ConfigVersion can be used to optionally filter the output to only that particular + version. + + :param code_version: The code version of Service Fabric. Default value is None. + :paramtype config_version: str + """ + return client.get_provisioned_fabric_config_version_info_list(code_version=code_version, timeout=timeout) + +def get_provisioned_fabric_config_version_info_list(client, config_version=None, timeout=60): + """Gets a list of fabric config versions that are provisioned in a Service Fabric cluster. + + Gets a list of information about fabric config versions that are provisioned in the cluster. + The parameter ConfigVersion can be used to optionally filter the output to only that particular + version. + + :param config_version: The config version of Service Fabric. Default value is None. + :paramtype config_version: str + """ + return client.get_provisioned_fabric_config_version_info_list(config_version=config_version, timeout=timeout) + + +def get_cluster_health(client, 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): + """Gets the health of a Service Fabric cluster. + + Use EventsHealthStateFilter to filter the collection of health events reported on the cluster + based on the health state. + Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the + collection of nodes and applications returned based on their aggregated health state. + + :param nodes_health_state_filter: Allows filtering of the node health state objects returned + in the result of cluster health query + based on their health state. The possible values for this parameter include integer value of + one of the + following health states. Only nodes that match the filter are returned. All nodes are used to + evaluate the aggregated health state. + If not specified, all entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of nodes with HealthState value of + OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype nodes_health_state_filter: int + :param applications_health_state_filter: Allows filtering of the application health state + objects returned in the result of cluster health + query based on their health state. + The possible values for this parameter include integer value obtained from members or bitwise + operations + on members of HealthStateFilter enumeration. Only applications that match the filter are + returned. + All applications are used to evaluate the aggregated health state. If not specified, all + entries are returned. + The state values are flag-based enumeration, so the value could be a combination of these + values obtained using bitwise 'OR' operator. + For example, if the provided value is 6 then health state of applications with HealthState + value of OK (2) and Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype applications_health_state_filter: int + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + :param include_system_application_health_statistics: Indicates whether the health statistics + should include the fabric:/System application health statistics. False by default. + If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the + entities that belong to the fabric:/System application. + Otherwise, the query result includes health statistics only for user applications. + The health statistics must be included in the query result for this parameter to be applied. + Default value is False. + :paramtype include_system_application_health_statistics: bool + """ + return client.get_cluster_health(nodes_health_state_filter=nodes_health_state_filter, applications_health_state_filter=applications_health_state_filter, + events_health_state_filter=events_health_state_filter, exclude_health_statistics=exclude_health_statistics, + include_system_application_health_statistics=include_system_application_health_statistics, timeout=timeout) + +def cancel_operation(client, operation_id, force=False, timeout=60): + """Cancels a user-induced fault operation. + + The following APIs start fault operations that may be cancelled by using CancelOperation: + StartDataLoss, StartQuorumLoss, StartPartitionRestart, StartNodeTransition. + + If force is false, then the specified user-induced operation will be gracefully stopped and + cleaned up. If force is true, the command will be aborted, and some internal state + may be left behind. Specifying force as true should be used with care. Calling this API with + force set to true is not allowed until this API has already + been called on the same test command with force set to false first, or unless the test command + already has an OperationState of OperationState.RollingBack. + Clarification: OperationState.RollingBack means that the system will be/is cleaning up internal + system state caused by executing the command. It will not restore data if the + test command was to cause data loss. For example, if you call StartDataLoss then call this + API, the system will only clean up internal state from running the command. + It will not restore the target partition's data, if the command progressed far enough to cause + data loss. + + Important note: if this API is invoked with force==true, internal state may be left behind. + + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :param force: Indicates whether to gracefully roll back and clean up internal system state + modified by executing the user-induced operation. Default value is False. + :paramtype force: bool + """ + client.cancel_operation(operation_id, force=force, timeout=timeout) \ No newline at end of file diff --git a/src/sfctl/custom_compose.py b/src/sfctl/custom_compose.py index 483ca4d1..bf57e8f8 100644 --- a/src/sfctl/custom_compose.py +++ b/src/sfctl/custom_compose.py @@ -19,7 +19,6 @@ def read_file(file_path): def repo_creds(username, encrypted_password, has_pass): """Get a representation of the container repository credentials""" - from azure.servicefabric.models import RegistryCredential from getpass import getpass # Wonky since we allow empty string as an encrypted passphrase @@ -33,16 +32,18 @@ def repo_creds(username, encrypted_password, has_pass): raise CLIError('Missing container repository username') if encrypted_password is not None: - return RegistryCredential(registry_user_name=username, - registry_password=encrypted_password, - password_encrypted=True) + return { "RegistryUserName": username, + "RegistryPassword": encrypted_password, + "PasswordEncrypted":True + } if has_pass: passphrase = getpass(prompt='Container repository password: ') - return RegistryCredential(registry_user_name=username, - registry_password=passphrase, - password_encrypted=False) + return {"RegistryUserName": username, + "RegistryPassword": passphrase, + "PasswordEncrypted": False + } - return RegistryCredential(registry_user_name=username) + return { "RegistryUserName": username } def create_app_health_policy( warning_as_error, unhealthy_app, default_svc_health_map, @@ -50,30 +51,29 @@ def create_app_health_policy( """Create an application health policy description""" from sfctl.custom_health import (parse_service_health_policy, parse_service_health_policy_map) - from azure.servicefabric.models import ApplicationHealthPolicy default_svc_type_policy = parse_service_health_policy( default_svc_health_map ) svc_type_policy = parse_service_health_policy_map(svc_type_health_map) - return ApplicationHealthPolicy( - consider_warning_as_error=warning_as_error, - max_percent_unhealthy_deployed_applications=unhealthy_app, - default_service_type_health_policy=default_svc_type_policy, - service_type_health_policy_map=svc_type_policy - ) + return { + "ConsiderWarningAsError": warning_as_error, + "MaxPercentUnhealthyDeployedApplications": unhealthy_app, + "DefaultServiceTypeHealthPolicy": default_svc_type_policy, + "ServiceTypeHealthPolicyMap": svc_type_policy + } def create(client, deployment_name, file_path, user=None, has_pass=False, #pylint: disable=missing-docstring,too-many-arguments encrypted_pass=None, timeout=60): - from azure.servicefabric.models import CreateComposeDeploymentDescription file_contents = read_file(file_path) credentials = repo_creds(user, encrypted_pass, has_pass) - desc = CreateComposeDeploymentDescription(deployment_name=deployment_name, - compose_file_content=file_contents, - registry_credential=credentials) + desc = {"DeploymentName": deployment_name, + "ComposeFileContent": file_contents, + "RegistryCredential": credentials + } client.create_compose_deployment(desc, timeout=timeout) @@ -86,7 +86,7 @@ def upgrade(client, deployment_name, file_path, user=None, has_pass=False, #pyli warning_as_error=False, unhealthy_app=0, default_svc_type_health_map=None, svc_type_health_map=None, timeout=60): - from azure.servicefabric.models import ComposeDeploymentUpgradeDescription + from sfctl.custom_cluster_upgrade import create_monitoring_policy file_contents = read_file(file_path) @@ -105,17 +105,46 @@ def upgrade(client, deployment_name, file_path, user=None, has_pass=False, #pyli default_svc_type_health_map, svc_type_health_map) - desc = ComposeDeploymentUpgradeDescription( - deployment_name=deployment_name, - compose_file_content=file_contents, - registry_credential=credentials, - upgrade_kind=upgrade_kind, - rolling_upgrade_mode=upgrade_mode, - upgrade_replica_set_check_timeout_in_seconds=replica_set_check, - force_restart=force_restart, - monitoring_policy=monitoring_policy, - application_health_policy=app_health_policy) + desc = { + "DeploymentName": deployment_name, + "ComposeFileContent": file_contents, + "RegistryCredential": credentials, + "UpgradeKind": upgrade_kind, + "RollingUpgradeMode": upgrade_mode, + "UpgradeReplicaSetCheckTimeoutInSeconds": replica_set_check, + "ForceRestart": force_restart, + "MonitoringPolicy": monitoring_policy, + "ApplicationHealthPolicy": app_health_policy + } client.start_compose_deployment_upgrade(deployment_name, desc, timeout=timeout) + + +def get_compose_deployment_status_list(client, continuation_token=None, max_results=0, timeout=60): + """Gets the list of compose deployments created in the Service Fabric cluster. + + Gets the status about the compose deployments that were created or in the process of being + created in the Service Fabric cluster. The response includes the name, status, and other + details about the compose deployments. If the list of deployments do not fit in a page, one + page of results is returned as well as a continuation token, which can be used to get the next + page. + + :param continuation_token: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token: str + :param max_results: The maximum number of results to be returned as part of the paged + queries. This parameter defines the upper bound on the number of results returned. The results + returned can be less than the specified maximum results if they do not fit in the message as + per the max message size restrictions defined in the configuration. If this parameter is zero + or not specified, the paged query includes as many results as possible that fit in the return + message. Default value is 0. + :paramtype max_results: long + """ + + return client.get_compose_deployment_status_list(continuation_token_parameter=continuation_token, max_results=max_results, timeout=60) \ No newline at end of file diff --git a/src/sfctl/custom_events.py b/src/sfctl/custom_events.py new file mode 100644 index 00000000..9adda1a7 --- /dev/null +++ b/src/sfctl/custom_events.py @@ -0,0 +1,324 @@ +# ----------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ----------------------------------------------------------------------------- + +def get_cluster_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): + """Gets all CLuster-related events. + + The response is list of ClusterEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :paramtype timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + """ + return client.get_cluster_event_list(start_time_utc, end_time_utc, events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + +def get_nodes_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): + """Gets all Nodes-related events. + + The response is list of NodeEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :paramtype timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + """ + return client.get_nodes_event_list(start_time_utc, end_time_utc, events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + +def get_node_event_list(client, node_name, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): + """Gets all Node-related events for a specific node. + + The response is list of NodeEvent objects. + + :param node_name: The name of the node. + :type node_name: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :paramtype timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + """ + return client.get_node_event_list(node_name, start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + +def get_applications_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): + """Gets all Applications-related events. + + The response is list of ApplicationEvent objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :paramtype timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + """ + return client.get_applications_event_list(start_time_utc, end_time_utc, events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + +def get_application_event_list(client, application_id, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): + """Gets all Applications-related events for a specific application. + + The response is list of ApplicationEvent objects. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :paramtype timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + """ + return client.get_application_event_list(application_id, start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + +def get_services_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): + """Gets all Service-related events. + + The response is list of Service event objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :paramtype timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + """ + return client.get_services_event_list(start_time_utc, end_time_utc, events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + +def get_service_event_list(client, service_id, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): + """Gets all Service-related events for a specific node. + + The response is list of Service event objects. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :paramtype timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + """ + return client.get_service_event_list(service_id, start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + +def get_partitions_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): + """Gets all Partition-related events. + + The response is list of Partition event objects. + + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :paramtype timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + """ + return client.get_partitions_event_list(start_time_utc, end_time_utc, events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + +def get_partition_event_list(client, partition_id, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): + """Gets all Partition-related events for a specific partition. + + The response is list of Partition event objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :paramtype timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + """ + return client.get_partition_event_list(partition_id, start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + +def get_partition_replicas_event_list(client, partition_id, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): + """Gets all Partition Replica-related events for a specific replica. + + The response is list of Partition Replica-related event objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :paramtype timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + """ + return client.get_partition_replicas_event_list(partition_id, start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + +def get_partition_replica_event_list(client, partition_id, replica_id, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): + """Gets all Partition Replica-related events. + + The response is list of Partition Replica-related objects. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype start_time_utc: str + :param end_time_utc: The end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. + :paramtype end_time_utc: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + :paramtype timeout: long + :param events_types_filter: This is a comma separated string specifying the types of + FabricEvents that should only be included in the response. Default value is None. + :paramtype events_types_filter: str + :param exclude_analysis_events: This param disables the retrieval of AnalysisEvents if true + is passed. Default value is None. + :paramtype exclude_analysis_events: bool + :param skip_correlation_lookup: This param disables the search of CorrelatedEvents + information if true is passed. otherwise the CorrelationEvents get processed and + HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. + """ + return client.get_partition_replica_event_list(partition_id, replica_id, start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) \ No newline at end of file diff --git a/src/sfctl/custom_is.py b/src/sfctl/custom_is.py index 8080195e..b14b4c65 100644 --- a/src/sfctl/custom_is.py +++ b/src/sfctl/custom_is.py @@ -47,4 +47,30 @@ def delete_repair_task(client, task_id, version, timeout=60): "TaskId": task_id, "Version": version } - client.delete_repair_task(payload, timeout=timeout) \ No newline at end of file + client.delete_repair_task(payload, timeout=timeout) + +def get_repair_task_list(client, task_id_filter=None, state_filter=None, executor_filter=None): + """Gets a list of repair tasks matching the given filters. + + This API supports the Service Fabric platform; it is not meant to be used directly from your + code. + + :param task_id_filter: The repair task ID prefix to be matched. Default value is None. + :paramtype task_id_filter: str + :param state_filter: A bitwise-OR of the following values, specifying which task states + should be included in the result list. + + + * 1 - Created + * 2 - Claimed + * 4 - Preparing + * 8 - Approved + * 16 - Executing + * 32 - Restoring + * 64 - Completed. Default value is None. + :paramtype state_filter: int + :param executor_filter: The name of the repair executor whose claimed tasks should be + included in the list. Default value is None. + """ + + return client.get_repair_task_list(task_id_filter=task_id_filter, state_filter=state_filter, executor_filter=executor_filter) \ No newline at end of file diff --git a/src/sfctl/custom_node.py b/src/sfctl/custom_node.py index aea46280..8fcf9bb0 100644 --- a/src/sfctl/custom_node.py +++ b/src/sfctl/custom_node.py @@ -45,4 +45,127 @@ def restart_node(client, node_name, node_instance_id=0, create_fabric_dump="Fals "NodeInstanceId": node_instance_id } - client.restart_node(node_name, payload, timeout=timeout) \ No newline at end of file + client.restart_node(node_name, payload, timeout=timeout) + +def add_configuration_parameter_overrides(client, config_parameter_override_list, node_name, force=False, timeout=60): + """Adds the list of configuration overrides on the specified node. + + This api allows adding all existing configuration overrides on the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param config_parameter_override_list: Description for adding list of configuration overrides. + :type config_parameter_override_list: list[JSON] + :param force: Force adding configuration overrides on specified nodes. Default value is None. + :paramtype force: bool + """ + + return client.add_configuration_parameter_overrides(node_name, config_parameter_override_list, force=force, timeout=timeout) + +def get_node_health(client, node_name, events_health_state_filter=0, timeout=60): + """Gets the health of a Service Fabric node. + + Gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection + of health events reported on the node based on the health state. If the node that you specify + by name does not exist in the health store, this returns an error. + + :param node_name: The name of the node. + :type node_name: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + """ + return client.get_node_health(node_name, events_health_state_filter=events_health_state_filter, timeout=timeout) + + +def get_node_info_list(client, continuation_token=None, max_results=0, node_status_filter="default", timeout=60): + """Gets the list of nodes in the Service Fabric cluster. + + The response includes the name, status, ID, health, uptime, and other details about the nodes. + + :param continuation_token: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token: str + :param node_status_filter: Allows filtering the nodes based on the NodeStatus. Only the nodes + that are matching the specified filter value will be returned. The filter value can be one of + the following. Known values are: "default", "all", "up", "down", "enabling", "disabling", + "disabled", "unknown", and "removed". Default value is "default". + :paramtype node_status_filter: str + :param max_results: The maximum number of results to be returned as part of the paged + queries. This parameter defines the upper bound on the number of results returned. The results + returned can be less than the specified maximum results if they do not fit in the message as + per the max message size restrictions defined in the configuration. If this parameter is zero + or not specified, the paged query includes as many results as possible that fit in the return + message. Default value is 0. + """ + return client.get_node_info_list(continuation_token_parameter=continuation_token, node_status_filter=node_status_filter, + max_results=max_results, timeout=timeout) + + +def start_node_transition(client, node_name, node_instance_id, node_transition_type, operation_id, stop_duration_in_seconds, timeout=60): + """Starts or stops a cluster node. + + Starts or stops a cluster node. A cluster node is a process, not the OS instance itself. To + start a node, pass in "Start" for the NodeTransitionType parameter. + To stop a node, pass in "Stop" for the NodeTransitionType parameter. This API starts the + operation - when the API returns the node may not have finished transitioning yet. + Call GetNodeTransitionProgress with the same OperationId to get the progress of the operation. + + :param node_name: The name of the node. + :type node_name: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :param node_transition_type: Indicates the type of transition to perform. + NodeTransitionType.Start will start a stopped node. NodeTransitionType.Stop will stop a node + that is up. Known values are: "Invalid", "Start", and "Stop". + :paramtype node_transition_type: str + :param node_instance_id: The node instance ID of the target node. This can be determined + through GetNodeInfo API. + :paramtype node_instance_id: str + :param stop_duration_in_seconds: The duration, in seconds, to keep the node stopped. The + minimum value is 600, the maximum is 14400. After this time expires, the node will + automatically come back up. + :paramtype stop_duration_in_seconds: int + """ + return client.start_node_transition(node_name, node_instance_id=node_instance_id, node_transition_type=node_transition_type, + operation_id=operation_id, stop_duration_in_seconds=stop_duration_in_seconds, timeout=timeout) + + +def get_node_transition_progress(client, node_name, operation_id, timeout=60): + """Gets the progress of an operation started using StartNodeTransition. + + Gets the progress of an operation started with StartNodeTransition using the provided + OperationId. + + :param node_name: The name of the node. + :type node_name: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + """ + + + return client.get_node_transition_progress(node_name, operation_id=operation_id, timeout=timeout) \ No newline at end of file diff --git a/src/sfctl/custom_partition.py b/src/sfctl/custom_partition.py new file mode 100644 index 00000000..59e7aac9 --- /dev/null +++ b/src/sfctl/custom_partition.py @@ -0,0 +1,372 @@ +# ----------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ----------------------------------------------------------------------------- + +"""Custom commands for the Service Fabric partition support""" + +def start_data_loss(client, service_id, partition_id, operation_id, data_loss_mode, timeout=60): + """This API will induce data loss for the specified partition. It will trigger a call to the + OnDataLossAsync API of the partition. + + This API will induce data loss for the specified partition. It will trigger a call to the + OnDataLoss API of the partition. + Actual data loss will depend on the specified DataLossMode. + + + * PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is triggered for the + partition but actual data loss depends on the presence of in-flight replication. + * FullDataLoss - All replicas are removed hence all data is lost and OnDataLoss is triggered. + + This API should only be called with a stateful service as the target. + + Calling this API with a system service as the target is not advised. + + Note: Once this API has been called, it cannot be reversed. Calling CancelOperation will only + stop execution and clean up internal system state. + It will not restore data if the command has progressed far enough to cause data loss. + + Call the GetDataLossProgress API with the same OperationId to return information on the + operation started with this API. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :param data_loss_mode: This enum is passed to the StartDataLoss API to indicate what type of + data loss to induce. Known values are: "Invalid", "PartialDataLoss", and "FullDataLoss". + :paramtype data_loss_mode: str + """ + + return client.start_data_loss(service_id, partition_id, operation_id=operation_id, data_loss_mode=data_loss_mode, timeout=timeout) + +def get_data_loss_progress(client, service_id, partition_id, operation_id, timeout=60): + """Gets the progress of a partition data loss operation started using the StartDataLoss API. + + Gets the progress of a data loss operation started with StartDataLoss, using the OperationId. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + """ + + return client.get_data_loss_progress(service_id, partition_id, operation_id=operation_id, timeout=timeout) + +def get_loaded_partition_info_list(client, metric_name, service_name=None, ordering=None, max_results=0, continuation_token=None, timeout=60): + """Gets ordered list of partitions. + + Retrieves partitions which are most/least loaded according to specified metric. + + :param metric_name: Name of the metric based on which to get ordered list of partitions. + :paramtype metric_name: str + :param service_name: The name of a service. Default value is None. + :paramtype service_name: str + :param ordering: Ordering of partitions' load. Known values are: "Desc" or "Asc". Default + value is None. + :paramtype ordering: str + :param max_results: The maximum number of results to be returned as part of the paged + queries. This parameter defines the upper bound on the number of results returned. The results + returned can be less than the specified maximum results if they do not fit in the message as + per the max message size restrictions defined in the configuration. If this parameter is zero + or not specified, the paged query includes as many results as possible that fit in the return + message. Default value is 0. + :paramtype max_results: long + :param continuation_token: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + """ + + return client.get_loaded_partition_info_list(metric_name=metric_name, continuation_token_parameter=continuation_token, + service_name=service_name, ordering=ordering, max_results=max_results, timeout=60) + +def get_partition_health(client, partition_id, events_health_state_filter=0, replicas_health_state_filter=0, exclude_health_statistics=False, timeout=60): + """Gets the health of the specified Service Fabric partition. + + Use EventsHealthStateFilter to filter the collection of health events reported on the service + based on the health state. + Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the + partition. + If you specify a partition that does not exist in the health store, this request returns an + error. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :param replicas_health_state_filter: Allows filtering the collection of ReplicaHealthState + objects on the partition. The value can be obtained from members or bitwise operations on + members of HealthStateFilter. Only replicas that match the filter will be returned. All + replicas will be used to evaluate the aggregated health state. If not specified, all entries + will be returned.The state values are flag-based enumeration, so the value could be a + combination of these values obtained using bitwise 'OR' operator. For example, If the provided + value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be + returned. The possible values for this parameter include integer value of one of the following + health states. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype replicas_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + """ + + return client.get_partition_health(partition_id, events_health_state_filter=events_health_state_filter, replicas_health_state_filter=replicas_health_state_filter, + exclude_health_statistics=exclude_health_statistics, timeout=timeout) + + +def get_partition_info_list(client, service_id, continuation_token=None, timeout=60): + """Gets the list of partitions of a Service Fabric service. + + The response includes the partition ID, partitioning scheme information, keys supported by the + partition, status, health, and other details about the partition. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param continuation_token: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token: str + """ + return client.get_partition_info_list(service_id, continuation_token_parameter=continuation_token, timeout=timeout) + +def move_instance(client, service_id, partition_id, current_node_name=None, new_node_name=None, ignore_constraints=False, timeout=60): + """Moves the instance of a partition of a stateless service. + + This command moves the instance of a partition of a stateless service, respecting all + constraints. + Partition id and service name must be specified to be able to move the instance. + CurrentNodeName when specified identifies the instance that is moved. If not specified, random + instance will be moved + New node name can be omitted, and in that case instance is moved to a random node. + If IgnoreConstraints parameter is specified and set to true, then instance will be moved + regardless of the constraints. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param current_node_name: The name of the source node for instance move. If not specified, + instance is moved from a random node. Default value is None. + :paramtype current_node_name: str + :param new_node_name: The name of the target node for secondary replica or instance move. If + not specified, replica or instance is moved to a random node. Default value is None. + :paramtype new_node_name: str + :param ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :paramtype ignore_constraints: bool + """ + return client.move_instance(service_id, partition_id, current_node_name=current_node_name, new_node_name=new_node_name, + ignore_constraints=ignore_constraints, timeout=timeout) + +def move_primary_replica(client, partition_id, node_name=None, ignore_constraints=False, timeout=60): + """Moves the primary replica of a partition of a stateful service. + + This command moves the primary replica of a partition of a stateful service, respecting all + constraints. + If NodeName parameter is specified, primary will be moved to the specified node (if constraints + allow it). + If NodeName parameter is not specified, primary replica will be moved to a random node in the + cluster. + If IgnoreConstraints parameter is specified and set to true, then primary will be moved + regardless of the constraints. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param node_name: The name of the node. Default value is None. + :paramtype node_name: str + :param ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :paramtype ignore_constraints: bool + """ + return client.move_primary_replica(partition_id, node_name=node_name, ignore_constraints=ignore_constraints, timeout=timeout) + +def move_secondary_replica(client, partition_id, current_node_name, new_node_name=None, ignore_constraints=False, timeout=60): + """Moves the secondary replica of a partition of a stateful service. + + This command moves the secondary replica of a partition of a stateful service, respecting all + constraints. + CurrentNodeName parameter must be specified to identify the replica that is moved. + Source node name must be specified, but new node name can be omitted, and in that case replica + is moved to a random node. + If IgnoreConstraints parameter is specified and set to true, then secondary will be moved + regardless of the constraints. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param current_node_name: The name of the source node for secondary replica move. + :paramtype current_node_name: str + :param new_node_name: The name of the target node for secondary replica or instance move. If + not specified, replica or instance is moved to a random node. Default value is None. + :paramtype new_node_name: str + :param ignore_constraints: Ignore constraints when moving a replica or instance. If this + parameter is not specified, all constraints are honored. Default value is False. + :paramtype ignore_constraints: bool + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + """ + return client.move_secondary_replica(partition_id, current_node_name=current_node_name, new_node_name=new_node_name, + ignore_constraints=ignore_constraints, timeout=timeout) + +def start_quorum_loss(client, service_id, partition_id, operation_id, quorum_loss_mode, quorum_loss_duration, timeout=60): + """Induces quorum loss for a given stateful service partition. + + This API is useful for a temporary quorum loss situation on your service. + + Call the GetQuorumLossProgress API with the same OperationId to return information on the + operation started with this API. + + This can only be called on stateful persisted (HasPersistedState==true) services. Do not use + this API on stateless services or stateful in-memory only services. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :param quorum_loss_mode: This enum is passed to the StartQuorumLoss API to indicate what type + of quorum loss to induce. Known values are: "Invalid", "QuorumReplicas", and "AllReplicas". + :paramtype quorum_loss_mode: str + :param quorum_loss_duration: The amount of time for which the partition will be kept in + quorum loss. This must be specified in seconds. + :paramtype quorum_loss_duration: int + """ + client.start_quorum_loss(service_id, partition_id, operation_id=operation_id, + quorum_loss_mode=quorum_loss_mode, quorum_loss_duration=quorum_loss_duration, timeout=timeout) + +def get_quorum_loss_progress(client, service_id, partition_id, operation_id, timeout=60): + """Gets the progress of a quorum loss operation on a partition started using the StartQuorumLoss + API. + + Gets the progress of a quorum loss operation started with StartQuorumLoss, using the provided + OperationId. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + """ + return client.get_quorum_loss_progress(service_id, partition_id, operation_id=operation_id, timeout=timeout) + +def start_partition_restart(client, service_id, partition_id, operation_id, restart_partition_mode, timeout=60): + """This API will restart some or all replicas or instances of the specified partition. + + This API is useful for testing failover. + + If used to target a stateless service partition, RestartPartitionMode must be + AllReplicasOrInstances. + + Call the GetPartitionRestartProgress API using the same OperationId to get the progress. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :param restart_partition_mode: Describe which partitions to restart. Known values are: + "Invalid", "AllReplicasOrInstances", and "OnlyActiveSecondaries". + :paramtype restart_partition_mode: str + """ + client.start_partition_restart(service_id, partition_id, operation_id=operation_id, + restart_partition_mode=restart_partition_mode, timeout=timeout) + +def get_partition_restart_progress(client, service_id, partition_id, operation_id, timeout=60): + """Gets the progress of a PartitionRestart operation started using StartPartitionRestart. + + Gets the progress of a PartitionRestart started with StartPartitionRestart using the provided + OperationId. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param operation_id: A GUID that identifies a call of this API. This is passed into the + corresponding GetProgress API. + :paramtype operation_id: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60. + """ + return client.get_partition_restart_progress(service_id, partition_id, operation_id=operation_id, timeout=timeout) \ No newline at end of file diff --git a/src/sfctl/custom_property.py b/src/sfctl/custom_property.py index 2f5f329c..ec791988 100644 --- a/src/sfctl/custom_property.py +++ b/src/sfctl/custom_property.py @@ -6,7 +6,6 @@ """Custom commands for the Service Fabric naming support""" - def naming_property_put(client, name_id, property_name, # pylint: disable=too-many-arguments value, custom_id_type=None, timeout=60): """Custom commands for creating or updating a Service Fabric property""" @@ -15,3 +14,50 @@ def naming_property_put(client, name_id, property_name, # pylint: disable=too-m "Value" :value, "CustomTypeId" : custom_id_type} client.put_property(name_id, desc, timeout=timeout) + +def delete_property(client, name_id, property_name, timeout=60): + """Deletes the specified Service Fabric property. + Deletes the specified Service Fabric property under a given name. A property must be created + before it can be deleted. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param property_name: Specifies the name of the property to get. + :paramtype property_name: str + """ + client.delete_property(name_id, property_name=property_name, timeout=timeout) + +def get_property_info(client, name_id, property_name, timeout=60): + """Gets the specified Service Fabric property. + + Gets the specified Service Fabric property under a given name. This will always return both + value and metadata. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param property_name: Specifies the name of the property to get. + """ + return client.get_property_info(name_id, property_name=property_name, timeout=timeout) + + +def get_property_info_list(client, name_id, include_values=False, continuation_token=None, timeout=60): + """Gets information on all Service Fabric properties under a given name. + A Service Fabric name can have one or more named properties that store custom information. This + operation gets the information about these properties in a paged list. The information includes + name, value, and metadata about each of the properties. + + :param name_id: The Service Fabric name, without the 'fabric:' URI scheme. + :type name_id: str + :param include_values: Allows specifying whether to include the values of the properties + returned. True if values should be returned with the metadata; False to return only property + metadata. Default value is False. + :paramtype include_values: bool + :param continuation_token: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token: str + """ + return client.get_property_info_list(name_id, include_values=include_values, continuation_token_parameter=continuation_token, timeout=timeout) \ No newline at end of file diff --git a/src/sfctl/custom_replica.py b/src/sfctl/custom_replica.py new file mode 100644 index 00000000..b147b5d2 --- /dev/null +++ b/src/sfctl/custom_replica.py @@ -0,0 +1,113 @@ +# ----------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ----------------------------------------------------------- + +def get_replica_info_list(client, partition_id, continuation_token=None, timeout=60): + """Gets the information about replicas of a Service Fabric service partition. + + The GetReplicas endpoint returns information about the replicas of the specified partition. The + response includes the ID, role, status, health, node name, uptime, and other details about the + replica. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param continuation_token: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token: str + """ + return client.get_replica_info_list(partition_id, continuation_token_parameter=continuation_token, timeout=timeout) + +def get_deployed_service_replica_info_list(client, node_name, application_id, partition_id=None, service_manifest_name=None, timeout=60): + """Gets the list of replicas deployed on a Service Fabric node. + Gets the list containing the information about replicas deployed on a Service Fabric node. The + information include partition ID, replica ID, status of the replica, name of the service, name + of the service type, and other information. Use PartitionId or ServiceManifestName query + parameters to return information about the deployed replicas matching the specified values for + those parameters. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param partition_id: The identity of the partition. Default value is None. + :paramtype partition_id: str + :param service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. Default value is None. + :paramtype service_manifest_name: str + :param timeout: The server timeout for performing the operation in seconds. This timeout + specifies the time duration that the client is willing to wait for the requested operation to + complete. The default value for this parameter is 60 seconds. Default value is 60.\ + """ + + return client.get_deployed_service_replica_info_list(node_name, application_id, partition_id=partition_id, + service_manifest_name=service_manifest_name, timeout=timeout) + +def get_replica_health(client, partition_id, replica_id, events_health_state_filter=0, timeout=60): + """Gets the health of a Service Fabric stateful service replica or stateless service instance. + + Gets the health of a Service Fabric replica. + Use EventsHealthStateFilter to filter the collection of health events reported on the replica + based on the health state. + + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + """ + return client.get_replica_health(partition_id, replica_id, events_health_state_filter=events_health_state_filter, timeout=timeout) + +def remove_replica(client, node_name, partition_id, replica_id, force_remove=None, timeout=60): + """Removes a service replica running on a node. + + This API simulates a Service Fabric replica failure by removing a replica from a Service Fabric + cluster. The removal closes the replica, transitions the replica to the role None, and then + removes all of the state information of the replica from the cluster. This API tests the + replica state removal path, and simulates the report fault permanent path through client APIs. + Warning - There are no safety checks performed when this API is used. Incorrect use of this API + can lead to data loss for stateful services. In addition, the forceRemove flag impacts all + other replicas hosted in the same process. + + :param node_name: The name of the node. + :type node_name: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param replica_id: The identifier of the replica. + :type replica_id: str + :param force_remove: Remove a Service Fabric application or service forcefully without going + through the graceful shutdown sequence. This parameter can be used to forcefully delete an + application or service for which delete is timing out due to issues in the service code that + prevents graceful close of replicas. Default value is None. + :paramtype force_remove: bool + """ + return client.remove_replica(node_name, partition_id, replica_id, force_remove=force_remove, timeout=timeout) \ No newline at end of file diff --git a/src/sfctl/custom_sa_cluster.py b/src/sfctl/custom_sa_cluster.py new file mode 100644 index 00000000..4bb1bd5e --- /dev/null +++ b/src/sfctl/custom_sa_cluster.py @@ -0,0 +1,18 @@ +# ----------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ----------------------------------------------------------- + +def get_cluster_configuration(client, configuration_api_version, timeout=60): + """Get the Service Fabric standalone cluster configuration. + + The cluster configuration contains properties of the cluster that include different node types + on the cluster, + security configurations, fault, and upgrade domain topologies, etc. + + :param configuration_api_version: The API version of the Standalone cluster json + configuration. + :paramtype configuration_api_version: str + """ + return client.get_cluster_configuration(configuration_api_version=configuration_api_version, timeout=timeout) \ No newline at end of file diff --git a/src/sfctl/custom_service.py b/src/sfctl/custom_service.py index c419ccbc..8435f732 100644 --- a/src/sfctl/custom_service.py +++ b/src/sfctl/custom_service.py @@ -631,3 +631,340 @@ def package_upload(client, node_name, service_manifest_name, app_type_name, # p "NodeName": node_name, "PackageSharingPolicy": list_psps} client.deployed_service_package_to_node(node_name, desc, timeout) + +def get_deployed_code_package_info_list(client, node_name, application_id, service_manifest_name=None, code_package_name=None, timeout=60): + """Gets the list of code packages deployed on a Service Fabric node. + + Gets the list of code packages deployed on a Service Fabric node for the given application. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. Default value is None. + :paramtype service_manifest_name: str + :param code_package_name: The name of code package specified in service manifest registered + as part of an application type in a Service Fabric cluster. Default value is None. + """ + + return client.get_deployed_code_package_info_list(node_name, application_id, service_manifest_name=service_manifest_name, code_package_name=code_package_name, timeout=timeout) + +def delete_service(client, service_id, force_remove=None, timeout=60): + """Deletes an existing Service Fabric service. + + A service must be created before it can be deleted. By default, Service Fabric will try to + close service replicas in a graceful manner and then delete the service. However, if the + service is having issues closing the replica gracefully, the delete operation may take a long + time or get stuck. Use the optional ForceRemove flag to skip the graceful close sequence and + forcefully delete the service. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param force_remove: Remove a Service Fabric application or service forcefully without going + through the graceful shutdown sequence. This parameter can be used to forcefully delete an + application or service for which delete is timing out due to issues in the service code that + prevents graceful close of replicas. Default value is None. + :paramtype force_remove: bool + """ + client.delete_service(service_id, force_remove=force_remove, timeout=timeout) + +def get_deployed_service_type_info_by_name(client, node_name, application_id, service_type_name, service_manifest_name=None, timeout=60): + """Gets the information about a specified service type of the application deployed on a node in a + Service Fabric cluster. + + Gets the list containing the information about a specific service type from the applications + deployed on a node in a Service Fabric cluster. The response includes the name of the service + type, its registration status, the code package that registered it and activation ID of the + service package. Each entry represents one activation of a service type, differentiated by the + activation ID. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_type_name: Specifies the name of a Service Fabric service type. + :type service_type_name: str + :param service_manifest_name: The name of the service manifest to filter the list of deployed + service type information. If specified, the response will only contain the information about + service types that are defined in this service manifest. Default value is None. + :paramtype service_manifest_name: str + """ + return client.get_deployed_service_type_info_by_name(node_name, application_id, service_type_name, + service_manifest_name=service_manifest_name, timeout=timeout) + +def get_deployed_service_type_info_list(client, node_name, application_id, service_manifest_name=None, timeout=60): + """Gets the list containing the information about service types from the applications deployed on + a node in a Service Fabric cluster. + + Gets the list containing the information about service types from the applications deployed on + a node in a Service Fabric cluster. The response includes the name of the service type, its + registration status, the code package that registered it and activation ID of the service + package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_manifest_name: The name of the service manifest to filter the list of deployed + service type information. If specified, the response will only contain the information about + service types that are defined in this service manifest. Default value is None. + :paramtype service_manifest_name: str + """ + + return client.get_deployed_service_type_info_list(node_name, application_id, service_manifest_name=service_manifest_name, timeout=timeout) + + +def get_container_logs_deployed_on_node(client, node_name, application_id, service_manifest_name, code_package_name, + tail=None, previous=False, timeout=60): + """Gets the container logs for container deployed on a Service Fabric node. + + Gets the container logs for container deployed on a Service Fabric node for the given code + package. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. + :paramtype service_manifest_name: str + :param code_package_name: The name of code package specified in service manifest registered + as part of an application type in a Service Fabric cluster. + :paramtype code_package_name: str + :param tail: Number of lines to show from the end of the logs. Default is 100. 'all' to show + the complete logs. + :paramtype tail: str + :param previous: Specifies whether to get container logs from exited/dead containers of the + code package instance. Default value is False. + :paramtype previous: bool + """ + return client.get_container_logs_deployed_on_node(node_name, application_id, service_manifest_name=service_manifest_name, + code_package_name=code_package_name, tail=tail, previous=previous, timeout=timeout) + + +def get_service_health(client, service_id, events_health_state_filter=0, partitions_health_state_filter=0, exclude_health_statistics=False, timeout=60): + """Gets the health of the specified Service Fabric service. + + Gets the health information of the specified service. + Use EventsHealthStateFilter to filter the collection of health events reported on the service + based on the health state. + Use PartitionsHealthStateFilter to filter the collection of partitions returned. + If you specify a service that does not exist in the health store, this request returns an + error. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + :param partitions_health_state_filter: Allows filtering of the partitions health state + objects returned in the result of service health query based on their health state. + The possible values for this parameter include integer value of one of the following health + states. + Only partitions that match the filter are returned. All partitions are used to evaluate the + aggregated health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these value + obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health + state of partitions with HealthState value of OK (2) and Warning (4) will be returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype partitions_health_state_filter: int + :param exclude_health_statistics: Indicates whether the health statistics should be returned + as part of the query result. False by default. + The statistics show the number of children entities in health state Ok, Warning, and Error. + Default value is False. + :paramtype exclude_health_statistics: bool + """ + return client.get_service_health(service_id, events_health_state_filter=events_health_state_filter, partitions_health_state_filter=partitions_health_state_filter, + exclude_health_statistics=exclude_health_statistics, timeout=timeout) + +def get_service_info_list(client, application_id, service_type_name=None, continuation_token=None, timeout=60): + """Gets the information about all services belonging to the application specified by the + application ID. + + Returns the information about all services belonging to the application specified by the + application ID. + + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_type_name: The service type name used to filter the services to query for. + Default value is None. + :paramtype service_type_name: str + :param continuation_token: The continuation token parameter is used to obtain next + set of results. A continuation token with a non-empty value is included in the response of the + API when the results from the system do not fit in a single response. When this value is passed + to the next API call, the API returns next set of results. If there are no further results, + then the continuation token does not contain a value. The value of this parameter should not be + URL encoded. Default value is None. + :paramtype continuation_token: str + """ + return client.get_service_info_list(application_id, service_type_name=service_type_name, continuation_token_parameter=continuation_token, timeout=timeout) + +def get_service_manifest(client, application_type_name, application_type_version, service_manifest_name, timeout=60): + """Gets the manifest describing a service type. + + Gets the manifest describing a service type. The response contains the service manifest XML as + a string. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :paramtype application_type_version: str + :param service_manifest_name: The name of a service manifest registered as part of an + application type in a Service Fabric cluster. + :paramtype service_manifest_name: str + """ + return client.get_service_manifest(application_type_name, application_type_version=application_type_version, service_manifest_name=service_manifest_name, timeout=timeout) + +def get_deployed_service_package_health(client, node_name, application_id, service_package_name, events_health_state_filter=0, timeout=60): + """Gets the information about health of a service package for a specific application deployed for + a Service Fabric node and application. + + Gets the information about health of a service package for a specific application deployed on a + Service Fabric node. Use EventsHealthStateFilter to optionally filter for the collection of + HealthEvent objects reported on the deployed service package based on health state. + + :param node_name: The name of the node. + :type node_name: str + :param application_id: The identity of the application. This is typically the full name of the + application without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the application name is "fabric:/myapp/app1", the application identity would + be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions. + :type application_id: str + :param service_package_name: The name of the service package. + :type service_package_name: str + :param events_health_state_filter: Allows filtering the collection of HealthEvent objects + returned based on health state. + The possible values for this parameter include integer value of one of the following health + states. + Only events that match the filter are returned. All events are used to evaluate the aggregated + health state. + If not specified, all entries are returned. The state values are flag-based enumeration, so + the value could be a combination of these values, obtained using the bitwise 'OR' operator. For + example, If the provided value is 6 then all of the events with HealthState value of OK (2) and + Warning (4) are returned. + + + * Default - Default value. Matches any HealthState. The value is zero. + * None - Filter that doesn't match any HealthState value. Used in order to return no results + on a given collection of states. The value is 1. + * Ok - Filter that matches input with HealthState value Ok. The value is 2. + * Warning - Filter that matches input with HealthState value Warning. The value is 4. + * Error - Filter that matches input with HealthState value Error. The value is 8. + * All - Filter that matches input with any HealthState value. The value is 65535. Default + value is 0. + :paramtype events_health_state_filter: int + """ + return client.get_deployed_service_package_health(node_name, application_id, service_package_name, events_health_state_filter=events_health_state_filter, timeout=timeout) + +def resolve_service(client, service_id, partition_key_type=None, partition_key_value=None, previous_rsp_version=None, timeout=60): + """Resolve a Service Fabric partition. + + Resolve a Service Fabric service partition to get the endpoints of the service replicas. + + :param service_id: The identity of the service. This ID is typically the full name of the + service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be + "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_key_type: Key type for the partition. This parameter is required if the + partition scheme for the service is Int64Range or Named. The possible values are following. + + + * None (1) - Indicates that the PartitionKeyValue parameter is not specified. This is valid + for the partitions with partitioning scheme as Singleton. This is the default value. The value + is 1. + * Int64Range (2) - Indicates that the PartitionKeyValue parameter is an int64 partition key. + This is valid for the partitions with partitioning scheme as Int64Range. The value is 2. + * Named (3) - Indicates that the PartitionKeyValue parameter is a name of the partition. This + is valid for the partitions with partitioning scheme as Named. The value is 3. Default value is + None. + :paramtype partition_key_type: int + :param partition_key_value: Partition key. This is required if the partition scheme for the + service is Int64Range or Named. + This is not the partition ID, but rather, either the integer key value, or the name of the + partition ID. + For example, if your service is using ranged partitions from 0 to 10, then they + PartitionKeyValue would be an + integer in that range. Query service description to see the range or name. Default value is + None. + :paramtype partition_key_value: str + :param previous_rsp_version: The value in the Version field of the response that was received + previously. This is required if the user knows that the result that was gotten previously is + stale. Default value is None. + :paramtype previous_rsp_version: str + """ + return client.resolve_service(service_id, partition_key_type=partition_key_type, partition_key_value=partition_key_value, previous_rsp_version=previous_rsp_version, timeout=timeout) + +def get_service_type_info_list(client, application_type_name, application_type_version, timeout=60): + """Gets the list containing the information about service types that are supported by a + provisioned application type in a Service Fabric cluster. + + Gets the list containing the information about service types that are supported by a + provisioned application type in a Service Fabric cluster. The provided application type must + exist. Otherwise, a 404 status is returned. + + :param application_type_name: The name of the application type. + :type application_type_name: str + :param application_type_version: The version of the application type. + :paramtype application_type_version: str + """ + return client.get_service_type_info_list(application_type_name, application_type_version=application_type_version, timeout=timeout) \ No newline at end of file From 894d706d3247fefb4862352e9a8c403a5a3018e1 Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Mon, 9 May 2022 14:38:59 -0700 Subject: [PATCH 15/20] fixed how ES was handled. --- src/sfctl/custom_events.py | 10 +++++----- src/sfctl/tests/request_generation_test.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sfctl/custom_events.py b/src/sfctl/custom_events.py index 9adda1a7..7ec48c44 100644 --- a/src/sfctl/custom_events.py +++ b/src/sfctl/custom_events.py @@ -27,7 +27,7 @@ def get_cluster_event_list(client, start_time_utc, end_time_utc, events_types_fi information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. """ - return client.get_cluster_event_list(start_time_utc, end_time_utc, events_types_filter=events_types_filter, + return client.get_cluster_event_list(start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, exclude_analysis_events=exclude_analysis_events, skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) @@ -54,7 +54,7 @@ def get_nodes_event_list(client, start_time_utc, end_time_utc, events_types_filt information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. """ - return client.get_nodes_event_list(start_time_utc, end_time_utc, events_types_filter=events_types_filter, + return client.get_nodes_event_list(start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, exclude_analysis_events=exclude_analysis_events, skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) @@ -110,7 +110,7 @@ def get_applications_event_list(client, start_time_utc, end_time_utc, events_typ information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. """ - return client.get_applications_event_list(start_time_utc, end_time_utc, events_types_filter=events_types_filter, + return client.get_applications_event_list(start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, exclude_analysis_events=exclude_analysis_events, skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) @@ -170,7 +170,7 @@ def get_services_event_list(client, start_time_utc, end_time_utc, events_types_f information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. """ - return client.get_services_event_list(start_time_utc, end_time_utc, events_types_filter=events_types_filter, + return client.get_services_event_list(start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, exclude_analysis_events=exclude_analysis_events, skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) @@ -230,7 +230,7 @@ def get_partitions_event_list(client, start_time_utc, end_time_utc, events_types information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. """ - return client.get_partitions_event_list(start_time_utc, end_time_utc, events_types_filter=events_types_filter, + return client.get_partitions_event_list(start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, exclude_analysis_events=exclude_analysis_events, skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) diff --git a/src/sfctl/tests/request_generation_test.py b/src/sfctl/tests/request_generation_test.py index b05e4076..4ed3c594 100644 --- a/src/sfctl/tests/request_generation_test.py +++ b/src/sfctl/tests/request_generation_test.py @@ -302,7 +302,7 @@ def paths_generation_helper(self): # pylint: disable=too-many-statements, too-m '/$/GetClusterVersion', ['api-version=6.4'], command_as_func=True, - command_args=ServiceFabricClientAPIs(FakeCredentialProtocol(), endpoint=get_mock_endpoint(), connection_verify=False, enforce_https=False, authentication_policy=FakeAuthenticationPolicy())) + command_args=ServiceFabricClientAPIs(FakeCredentialProtocol(), endpoint=get_mock_endpoint(), connection_verify=False, retry_total=0, enforce_https=False, authentication_policy=FakeAuthenticationPolicy())) self.validate_command( # config-versions 'sfctl cluster config-versions --config-version=version', 'GET', From 159245c64017a43d415a95c7863ce3353465c5e9 Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Mon, 9 May 2022 16:51:14 -0700 Subject: [PATCH 16/20] improved the linting. --- src/sfctl/apiclient.py | 19 ++- src/sfctl/auth.py | 2 +- src/sfctl/custom_cluster.py | 13 +-- src/sfctl/custom_events.py | 129 +++++++++++++-------- src/sfctl/custom_is.py | 3 +- src/sfctl/custom_service.py | 51 +++++--- src/sfctl/tests/request_generation_test.py | 4 +- 7 files changed, 138 insertions(+), 83 deletions(-) diff --git a/src/sfctl/apiclient.py b/src/sfctl/apiclient.py index 28269052..924a8c69 100644 --- a/src/sfctl/apiclient.py +++ b/src/sfctl/apiclient.py @@ -8,22 +8,21 @@ from knack.util import CLIError from azure.servicefabric import ServiceFabricClientAPIs -from azure.core.credentials import TokenCredential, AccessToken - -from sfctl.auth import (AdalAuthentication2, ClientCertAuthentication, AdalAuthentication) +from azure.core.credentials import TokenCredential +from azure.core.pipeline.policies import SansIOHTTPPolicy +from sfctl.auth import AdalAuthentication2 from sfctl.config import (security_type, ca_cert_info, cert_info, client_endpoint, no_verify_setting) -import logging -from azure.core.pipeline.policies import SansIOHTTPPolicy -from azure.core.pipeline import PipelineRequest - class FakeAuthenticationPolicy(SansIOHTTPPolicy): + """Fake authentication policy to avoid issues with token credentials being thrown in some scenaros""" + def __init__(self): - self + pass class FakeCredentialProtocol(TokenCredential): + """Fake credential used to pass in a credential for the API Client""" def __init__(self): - self + pass def get_token(self, scopes): pass @@ -52,7 +51,7 @@ def create(_): no_verify = ca_cert client = ServiceFabricClientAPIs(FakeCredentialProtocol(), endpoint=endpoint, retry_total=0, - connection_verify=False, enforce_https=False, + connection_verify=no_verify, enforce_https=False, connection_cert=cert_info(), authentication_policy=FakeAuthenticationPolicy()) return client diff --git a/src/sfctl/auth.py b/src/sfctl/auth.py index 9c7b6798..4224c9d2 100644 --- a/src/sfctl/auth.py +++ b/src/sfctl/auth.py @@ -101,4 +101,4 @@ def get_header(self): existing_token['userId'], client_id) header = "{} {}".format("Bearer", new_token['accessToken']) - return header \ No newline at end of file + return header diff --git a/src/sfctl/custom_cluster.py b/src/sfctl/custom_cluster.py index 1ce869fb..8ddd9dba 100644 --- a/src/sfctl/custom_cluster.py +++ b/src/sfctl/custom_cluster.py @@ -10,15 +10,15 @@ from sys import exc_info from datetime import datetime, timedelta import adal +from azure.core.rest import HttpRequest +from azure.servicefabric import ServiceFabricClientAPIs from knack.util import CLIError from knack.log import get_logger -from azure.servicefabric import ServiceFabricClientAPIs from sfctl.apiclient import FakeAuthenticationPolicy, FakeCredentialProtocol from sfctl.config import client_endpoint, SF_CLI_VERSION_CHECK_INTERVAL, get_cluster_auth, set_aad_cache, set_aad_metadata # pylint: disable=line-too-long from sfctl.state import get_sfctl_version from sfctl.custom_exceptions import SFCTLInternalException -from sfctl.auth import AdalAuthentication2, ClientCertAuthentication, AdalAuthentication -from azure.core.rest import HttpRequest, HttpResponse +from sfctl.auth import AdalAuthentication2 logger = get_logger(__name__) # pylint: disable=invalid-name @@ -82,7 +82,7 @@ def _get_cert_based_client(endpoint, pem, cert, key, ca, no_verify): # pylint: d client_cert = (cert, key) return ServiceFabricClientAPIs(FakeCredentialProtocol(), endpoint=endpoint, retry_total=0, - connection_verify=no_verify, enforce_https=False, + connection_verify=no_verify, enforce_https=False, connection_cert=client_cert, authentication_policy=FakeAuthenticationPolicy()) @@ -110,14 +110,13 @@ def _get_rest_client(endpoint, cert=None, key=None, pem=None, ca=None, # pylint """ if aad: - new_token, new_cache = get_aad_token(endpoint, no_verify) + new_token, new_cache = get_aad_token(endpoint) set_aad_cache(new_token, new_cache) return _get_aad_based_client(endpoint, no_verify) # If the code reaches here, it is not AAD return _get_cert_based_client(endpoint, pem, cert, key, ca, no_verify) - def select(endpoint='http://localhost:19080', cert=None, key=None, pem=None, ca=None, #pylint: disable=invalid-name, too-many-arguments aad=False, no_verify=False): @@ -293,7 +292,7 @@ def sfctl_cluster_version_matches(cluster_version, sfctl_version): cluster_version)) -def get_aad_token(endpoint, no_verify): +def get_aad_token(endpoint): #pylint: disable-msg=too-many-locals """Get AAD token""" diff --git a/src/sfctl/custom_events.py b/src/sfctl/custom_events.py index 7ec48c44..67118ae7 100644 --- a/src/sfctl/custom_events.py +++ b/src/sfctl/custom_events.py @@ -4,9 +4,13 @@ # license information. # ----------------------------------------------------------------------------- -def get_cluster_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): +"""Custom Event store for Service Fabric CLI""" + +def get_cluster_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, + exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all CLuster-related events. + The response is list of ClusterEvent objects. :param start_time_utc: The start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. @@ -27,11 +31,14 @@ def get_cluster_event_list(client, start_time_utc, end_time_utc, events_types_fi information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. """ - return client.get_cluster_event_list(start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + return client.get_cluster_event_list(start_time_utc=start_time_utc, end_time_utc=end_time_utc, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) -def get_nodes_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): + +def get_nodes_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, + exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Nodes-related events. The response is list of NodeEvent objects. @@ -54,11 +61,14 @@ def get_nodes_event_list(client, start_time_utc, end_time_utc, events_types_filt information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. """ - return client.get_nodes_event_list(start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + return client.get_nodes_event_list(start_time_utc=start_time_utc, end_time_utc=end_time_utc, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + -def get_node_event_list(client, node_name, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): +def get_node_event_list(client, node_name, start_time_utc, end_time_utc, events_types_filter=None, + exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Node-related events for a specific node. The response is list of NodeEvent objects. @@ -83,11 +93,14 @@ def get_node_event_list(client, node_name, start_time_utc, end_time_utc, events_ information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. """ - return client.get_node_event_list(node_name, start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + return client.get_node_event_list(node_name, start_time_utc=start_time_utc, end_time_utc=end_time_utc, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + -def get_applications_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): +def get_applications_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, + exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Applications-related events. The response is list of ApplicationEvent objects. @@ -110,11 +123,15 @@ def get_applications_event_list(client, start_time_utc, end_time_utc, events_typ information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. """ - return client.get_applications_event_list(start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, + return client.get_applications_event_list(start_time_utc=start_time_utc, end_time_utc=end_time_utc, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) -def get_application_event_list(client, application_id, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): + +def get_application_event_list(client, application_id, start_time_utc, end_time_utc, + events_types_filter=None, exclude_analysis_events=None, + skip_correlation_lookup=None, timeout=60): """Gets all Applications-related events for a specific application. The response is list of ApplicationEvent objects. @@ -143,11 +160,14 @@ def get_application_event_list(client, application_id, start_time_utc, end_time_ information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. """ - return client.get_application_event_list(application_id, start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + return client.get_application_event_list(application_id, start_time_utc=start_time_utc, end_time_utc=end_time_utc, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + -def get_services_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): +def get_services_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, + exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Service-related events. The response is list of Service event objects. @@ -170,11 +190,14 @@ def get_services_event_list(client, start_time_utc, end_time_utc, events_types_f information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. """ - return client.get_services_event_list(start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + return client.get_services_event_list(start_time_utc=start_time_utc, end_time_utc=end_time_utc, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) -def get_service_event_list(client, service_id, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): + +def get_service_event_list(client, service_id, start_time_utc, end_time_utc, events_types_filter=None, + exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Service-related events for a specific node. The response is list of Service event objects. @@ -203,11 +226,14 @@ def get_service_event_list(client, service_id, start_time_utc, end_time_utc, eve information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. """ - return client.get_service_event_list(service_id, start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) - -def get_partitions_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): + return client.get_service_event_list(service_id, start_time_utc=start_time_utc, end_time_utc=end_time_utc, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + + +def get_partitions_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, + exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Partition-related events. The response is list of Partition event objects. @@ -230,11 +256,14 @@ def get_partitions_event_list(client, start_time_utc, end_time_utc, events_types information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. """ - return client.get_partitions_event_list(start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) - -def get_partition_event_list(client, partition_id, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): + return client.get_partitions_event_list(start_time_utc=start_time_utc, end_time_utc=end_time_utc, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + + +def get_partition_event_list(client, partition_id, start_time_utc, end_time_utc, events_types_filter=None, + exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Partition-related events for a specific partition. The response is list of Partition event objects. @@ -259,11 +288,14 @@ def get_partition_event_list(client, partition_id, start_time_utc, end_time_utc, information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. """ - return client.get_partition_event_list(partition_id, start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + return client.get_partition_event_list(partition_id, start_time_utc=start_time_utc, end_time_utc=end_time_utc, + events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + -def get_partition_replicas_event_list(client, partition_id, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): +def get_partition_replicas_event_list(client, partition_id, start_time_utc, end_time_utc, events_types_filter=None, + exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Partition Replica-related events for a specific replica. The response is list of Partition Replica-related event objects. @@ -288,11 +320,15 @@ def get_partition_replicas_event_list(client, partition_id, start_time_utc, end_ information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. """ - return client.get_partition_replicas_event_list(partition_id, start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) - -def get_partition_replica_event_list(client, partition_id, replica_id, start_time_utc, end_time_utc, events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): + return client.get_partition_replicas_event_list(partition_id, start_time_utc=start_time_utc, + end_time_utc=end_time_utc, events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) + + +def get_partition_replica_event_list(client, partition_id, replica_id, start_time_utc, end_time_utc, + events_types_filter=None, exclude_analysis_events=None, + skip_correlation_lookup=None, timeout=60): """Gets all Partition Replica-related events. The response is list of Partition Replica-related objects. @@ -319,6 +355,7 @@ def get_partition_replica_event_list(client, partition_id, replica_id, start_tim information if true is passed. otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets populated. Default value is None. """ - return client.get_partition_replica_event_list(partition_id, replica_id, start_time_utc=start_time_utc, end_time_utc=end_time_utc, events_types_filter=events_types_filter, - exclude_analysis_events=exclude_analysis_events, - skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) \ No newline at end of file + return client.get_partition_replica_event_list(partition_id, replica_id, start_time_utc=start_time_utc, + end_time_utc=end_time_utc, events_types_filter=events_types_filter, + exclude_analysis_events=exclude_analysis_events, + skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) diff --git a/src/sfctl/custom_is.py b/src/sfctl/custom_is.py index b14b4c65..b2516538 100644 --- a/src/sfctl/custom_is.py +++ b/src/sfctl/custom_is.py @@ -73,4 +73,5 @@ def get_repair_task_list(client, task_id_filter=None, state_filter=None, executo included in the list. Default value is None. """ - return client.get_repair_task_list(task_id_filter=task_id_filter, state_filter=state_filter, executor_filter=executor_filter) \ No newline at end of file + return client.get_repair_task_list(task_id_filter=task_id_filter, state_filter=state_filter, + executor_filter=executor_filter) diff --git a/src/sfctl/custom_service.py b/src/sfctl/custom_service.py index 8435f732..39744cb9 100644 --- a/src/sfctl/custom_service.py +++ b/src/sfctl/custom_service.py @@ -632,7 +632,8 @@ def package_upload(client, node_name, service_manifest_name, app_type_name, # p "PackageSharingPolicy": list_psps} client.deployed_service_package_to_node(node_name, desc, timeout) -def get_deployed_code_package_info_list(client, node_name, application_id, service_manifest_name=None, code_package_name=None, timeout=60): +def get_deployed_code_package_info_list(client, node_name, application_id, service_manifest_name=None, + code_package_name=None, timeout=60): # pylint: disable=too-many-arguments """Gets the list of code packages deployed on a Service Fabric node. Gets the list of code packages deployed on a Service Fabric node for the given application. @@ -652,7 +653,9 @@ def get_deployed_code_package_info_list(client, node_name, application_id, servi as part of an application type in a Service Fabric cluster. Default value is None. """ - return client.get_deployed_code_package_info_list(node_name, application_id, service_manifest_name=service_manifest_name, code_package_name=code_package_name, timeout=timeout) + return client.get_deployed_code_package_info_list(node_name, application_id, + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, timeout=timeout) def delete_service(client, service_id, force_remove=None, timeout=60): """Deletes an existing Service Fabric service. @@ -677,7 +680,8 @@ def delete_service(client, service_id, force_remove=None, timeout=60): """ client.delete_service(service_id, force_remove=force_remove, timeout=timeout) -def get_deployed_service_type_info_by_name(client, node_name, application_id, service_type_name, service_manifest_name=None, timeout=60): +def get_deployed_service_type_info_by_name(client, node_name, application_id, + service_type_name, service_manifest_name=None, timeout=60): # pylint: disable=too-many-arguments """Gets the information about a specified service type of the application deployed on a node in a Service Fabric cluster. @@ -702,7 +706,7 @@ def get_deployed_service_type_info_by_name(client, node_name, application_id, se service types that are defined in this service manifest. Default value is None. :paramtype service_manifest_name: str """ - return client.get_deployed_service_type_info_by_name(node_name, application_id, service_type_name, + return client.get_deployed_service_type_info_by_name(node_name, application_id, service_type_name, service_manifest_name=service_manifest_name, timeout=timeout) def get_deployed_service_type_info_list(client, node_name, application_id, service_manifest_name=None, timeout=60): @@ -728,11 +732,12 @@ def get_deployed_service_type_info_list(client, node_name, application_id, servi :paramtype service_manifest_name: str """ - return client.get_deployed_service_type_info_list(node_name, application_id, service_manifest_name=service_manifest_name, timeout=timeout) + return client.get_deployed_service_type_info_list(node_name, application_id, + service_manifest_name=service_manifest_name, timeout=timeout) def get_container_logs_deployed_on_node(client, node_name, application_id, service_manifest_name, code_package_name, - tail=None, previous=False, timeout=60): + tail=None, previous=False, timeout=60): # pylint: disable=too-many-arguments """Gets the container logs for container deployed on a Service Fabric node. Gets the container logs for container deployed on a Service Fabric node for the given code @@ -759,11 +764,14 @@ def get_container_logs_deployed_on_node(client, node_name, application_id, servi code package instance. Default value is False. :paramtype previous: bool """ - return client.get_container_logs_deployed_on_node(node_name, application_id, service_manifest_name=service_manifest_name, - code_package_name=code_package_name, tail=tail, previous=previous, timeout=timeout) + return client.get_container_logs_deployed_on_node(node_name, application_id, + service_manifest_name=service_manifest_name, + code_package_name=code_package_name, tail=tail, + previous=previous, timeout=timeout) -def get_service_health(client, service_id, events_health_state_filter=0, partitions_health_state_filter=0, exclude_health_statistics=False, timeout=60): +def get_service_health(client, service_id, events_health_state_filter=0, partitions_health_state_filter=0, + exclude_health_statistics=False, timeout=60): # pylint: disable=too-many-arguments """Gets the health of the specified Service Fabric service. Gets the health information of the specified service. @@ -827,7 +835,8 @@ def get_service_health(client, service_id, events_health_state_filter=0, partiti Default value is False. :paramtype exclude_health_statistics: bool """ - return client.get_service_health(service_id, events_health_state_filter=events_health_state_filter, partitions_health_state_filter=partitions_health_state_filter, + return client.get_service_health(service_id, events_health_state_filter=events_health_state_filter, + partitions_health_state_filter=partitions_health_state_filter, exclude_health_statistics=exclude_health_statistics, timeout=timeout) def get_service_info_list(client, application_id, service_type_name=None, continuation_token=None, timeout=60): @@ -854,7 +863,8 @@ def get_service_info_list(client, application_id, service_type_name=None, contin URL encoded. Default value is None. :paramtype continuation_token: str """ - return client.get_service_info_list(application_id, service_type_name=service_type_name, continuation_token_parameter=continuation_token, timeout=timeout) + return client.get_service_info_list(application_id, service_type_name=service_type_name, + continuation_token_parameter=continuation_token, timeout=timeout) def get_service_manifest(client, application_type_name, application_type_version, service_manifest_name, timeout=60): """Gets the manifest describing a service type. @@ -870,9 +880,11 @@ def get_service_manifest(client, application_type_name, application_type_version application type in a Service Fabric cluster. :paramtype service_manifest_name: str """ - return client.get_service_manifest(application_type_name, application_type_version=application_type_version, service_manifest_name=service_manifest_name, timeout=timeout) + return client.get_service_manifest(application_type_name, application_type_version=application_type_version, + service_manifest_name=service_manifest_name, timeout=timeout) -def get_deployed_service_package_health(client, node_name, application_id, service_package_name, events_health_state_filter=0, timeout=60): +def get_deployed_service_package_health(client, node_name, application_id, service_package_name, + events_health_state_filter=0, timeout=60): # pylint: disable=too-many-arguments """Gets the information about health of a service package for a specific application deployed for a Service Fabric node and application. @@ -912,9 +924,11 @@ def get_deployed_service_package_health(client, node_name, application_id, servi value is 0. :paramtype events_health_state_filter: int """ - return client.get_deployed_service_package_health(node_name, application_id, service_package_name, events_health_state_filter=events_health_state_filter, timeout=timeout) + return client.get_deployed_service_package_health(node_name, application_id, service_package_name, + events_health_state_filter=events_health_state_filter, timeout=timeout) -def resolve_service(client, service_id, partition_key_type=None, partition_key_value=None, previous_rsp_version=None, timeout=60): +def resolve_service(client, service_id, partition_key_type=None, partition_key_value=None, + previous_rsp_version=None, timeout=60): # pylint: disable=too-many-arguments """Resolve a Service Fabric partition. Resolve a Service Fabric service partition to get the endpoints of the service replicas. @@ -952,7 +966,9 @@ def resolve_service(client, service_id, partition_key_type=None, partition_key_v stale. Default value is None. :paramtype previous_rsp_version: str """ - return client.resolve_service(service_id, partition_key_type=partition_key_type, partition_key_value=partition_key_value, previous_rsp_version=previous_rsp_version, timeout=timeout) + return client.resolve_service(service_id, partition_key_type=partition_key_type, + partition_key_value=partition_key_value, + previous_rsp_version=previous_rsp_version, timeout=timeout) def get_service_type_info_list(client, application_type_name, application_type_version, timeout=60): """Gets the list containing the information about service types that are supported by a @@ -967,4 +983,5 @@ def get_service_type_info_list(client, application_type_name, application_type_v :param application_type_version: The version of the application type. :paramtype application_type_version: str """ - return client.get_service_type_info_list(application_type_name, application_type_version=application_type_version, timeout=timeout) \ No newline at end of file + return client.get_service_type_info_list(application_type_name, + application_type_version=application_type_version, timeout=timeout) diff --git a/src/sfctl/tests/request_generation_test.py b/src/sfctl/tests/request_generation_test.py index 4ed3c594..58c9572c 100644 --- a/src/sfctl/tests/request_generation_test.py +++ b/src/sfctl/tests/request_generation_test.py @@ -302,7 +302,9 @@ def paths_generation_helper(self): # pylint: disable=too-many-statements, too-m '/$/GetClusterVersion', ['api-version=6.4'], command_as_func=True, - command_args=ServiceFabricClientAPIs(FakeCredentialProtocol(), endpoint=get_mock_endpoint(), connection_verify=False, retry_total=0, enforce_https=False, authentication_policy=FakeAuthenticationPolicy())) + command_args=ServiceFabricClientAPIs(FakeCredentialProtocol(), endpoint=get_mock_endpoint(), + connection_verify=False, retry_total=0, + enforce_https=False, authentication_policy=FakeAuthenticationPolicy())) self.validate_command( # config-versions 'sfctl cluster config-versions --config-version=version', 'GET', From e1d7d6e8b2ad6795505425082249d5a7413b820b Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Wed, 11 May 2022 15:57:56 -0700 Subject: [PATCH 17/20] fixed a lot of lint rules. --- src/sfctl/apiclient.py | 20 +--- src/sfctl/auth.py | 110 +++++---------------- src/sfctl/commands.py | 2 +- src/sfctl/custom_app.py | 70 ++++++++----- src/sfctl/custom_app_type.py | 3 +- src/sfctl/custom_chaos.py | 3 +- src/sfctl/custom_cluster.py | 9 +- src/sfctl/custom_cluster_upgrade.py | 23 +++-- src/sfctl/custom_compose.py | 3 +- src/sfctl/custom_container.py | 2 +- src/sfctl/custom_events.py | 22 ++--- src/sfctl/custom_health.py | 9 +- src/sfctl/custom_node.py | 31 +++--- src/sfctl/custom_partition.py | 54 ++++++---- src/sfctl/custom_property.py | 3 +- src/sfctl/custom_replica.py | 12 ++- src/sfctl/custom_sa_cluster.py | 4 +- src/sfctl/custom_service.py | 24 ++--- src/sfctl/tests/request_generation_test.py | 2 +- 19 files changed, 185 insertions(+), 221 deletions(-) diff --git a/src/sfctl/apiclient.py b/src/sfctl/apiclient.py index 924a8c69..a31bb49e 100644 --- a/src/sfctl/apiclient.py +++ b/src/sfctl/apiclient.py @@ -8,24 +8,9 @@ from knack.util import CLIError from azure.servicefabric import ServiceFabricClientAPIs -from azure.core.credentials import TokenCredential -from azure.core.pipeline.policies import SansIOHTTPPolicy -from sfctl.auth import AdalAuthentication2 +from sfctl.auth import FakeAuthenticationPolicy, FakeCredentialProtocol, get_aad_header from sfctl.config import (security_type, ca_cert_info, cert_info, client_endpoint, no_verify_setting) -class FakeAuthenticationPolicy(SansIOHTTPPolicy): - """Fake authentication policy to avoid issues with token credentials being thrown in some scenaros""" - - def __init__(self): - pass - -class FakeCredentialProtocol(TokenCredential): - """Fake credential used to pass in a credential for the API Client""" - def __init__(self): - pass - - def get_token(self, scopes): - pass def create(_): """Create a client for Service Fabric APIs.""" @@ -43,8 +28,7 @@ def create(_): headers = {} if security_type() == 'aad': - auth = AdalAuthentication2() - headers['Authorization'] = auth.get_header() + headers['Authorization'] = get_aad_header() else: ca_cert = ca_cert_info() if ca_cert is not None: diff --git a/src/sfctl/auth.py b/src/sfctl/auth.py index 4224c9d2..1653d9aa 100644 --- a/src/sfctl/auth.py +++ b/src/sfctl/auth.py @@ -7,98 +7,38 @@ """Client certificate authentication for Service Fabric API clients""" import adal -from msrest.authentication import Authentication +from azure.core.credentials import TokenCredential +from azure.core.pipeline.policies import SansIOHTTPPolicy -# pylint: disable=too-few-public-methods -class ClientCertAuthentication(Authentication): - """Client certificate authentication for Service Fabric API clients""" - def __init__(self, cert=None, ca_cert=None, no_verify=False): - self.cert = cert - self.ca_cert = ca_cert - self.no_verify = no_verify +def get_aad_header(): + """Create requests session with AAD auth headers - def signed_session(self, session=None): - """Create requests session with any required auth headers - applied. + :rtype: requests.Session. + """ - :rtype: requests.Session. - """ + from sfctl.config import (aad_metadata, aad_cache) - if session: - session = super(ClientCertAuthentication, self).signed_session(session) - else: - session = super(ClientCertAuthentication, self).signed_session() + authority_uri, cluster_id, client_id = aad_metadata() + existing_token, existing_cache = aad_cache() + context = adal.AuthenticationContext(authority_uri, + cache=existing_cache) + new_token = context.acquire_token(cluster_id, + existing_token['userId'], client_id) + header = "{} {}".format("Bearer", new_token['accessToken']) - if self.cert is not None: - session.cert = self.cert - if self.ca_cert is not None: - session.verify = self.ca_cert - if self.no_verify: - session.verify = False + return header - return session +class FakeAuthenticationPolicy(SansIOHTTPPolicy): + """Fake authentication policy to avoid issues with token credentials being thrown in some scenaros""" -class AdalAuthentication(Authentication): - """Azure Active Directory authentication for Service Fabric clusters""" + def __init__(self): + pass - def __init__(self, no_verify=False): - self.no_verify = no_verify +class FakeCredentialProtocol(TokenCredential): # pylint: disable=R0903 + """Fake credential used to pass in a credential for the API Client""" + def __init__(self): # pylint: disable=super-init-not-called + pass - def signed_session(self, session=None): - """Create requests session with AAD auth headers - - :rtype: requests.Session. - """ - - from sfctl.config import (aad_metadata, aad_cache) - - if session: - session = super(AdalAuthentication, self).signed_session(session) - else: - session = super(AdalAuthentication, self).signed_session() - - if self.no_verify: - session.verify = False - - authority_uri, cluster_id, client_id = aad_metadata() - existing_token, existing_cache = aad_cache() - context = adal.AuthenticationContext(authority_uri, - cache=existing_cache) - new_token = context.acquire_token(cluster_id, - existing_token['userId'], client_id) - header = "{} {}".format("Bearer", new_token['accessToken']) - session.headers['Authorization'] = header - return session - -class AdalAuthentication2(): - """Azure Active Directory authentication for Service Fabric clusters""" - - # def __init__(self, no_verify=False): - # self.no_verify = no_verify - - def get_header(self): - """Create requests session with AAD auth headers - - :rtype: requests.Session. - """ - - from sfctl.config import (aad_metadata, aad_cache) - - # if session: - # session = super(AdalAuthentication, self).signed_session(session) - # else: - # session = super(AdalAuthentication, self).signed_session() - - # if self.no_verify: - # session.verify = False - - authority_uri, cluster_id, client_id = aad_metadata() - existing_token, existing_cache = aad_cache() - context = adal.AuthenticationContext(authority_uri, - cache=existing_cache) - new_token = context.acquire_token(cluster_id, - existing_token['userId'], client_id) - header = "{} {}".format("Bearer", new_token['accessToken']) - - return header + def get_token(self, *scopes, claims, tenant_id, **kwargs): + pass diff --git a/src/sfctl/commands.py b/src/sfctl/commands.py index 49d017eb..9326b257 100644 --- a/src/sfctl/commands.py +++ b/src/sfctl/commands.py @@ -338,7 +338,7 @@ def load_command_table(self, args): # pylint: disable=too-many-statements group.command('quorum-loss-status', 'get_quorum_loss_progress') group.command('restart', 'start_partition_restart') group.command('restart-status', 'get_partition_restart_progress') - + with CommandGroup(self, 'replica', 'sfctl.custom_replica#{}', client_factory=client_create) as group: group.command('list', 'get_replica_info_list') diff --git a/src/sfctl/custom_app.py b/src/sfctl/custom_app.py index d1cbfdbe..c36e88de 100644 --- a/src/sfctl/custom_app.py +++ b/src/sfctl/custom_app.py @@ -4,6 +4,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # ----------------------------------------------------------------------------- +#pylint: disable = too-many-lines """Custom application related commands""" @@ -822,10 +823,12 @@ def get_deployed_application_info(client, application_id, node_name, include_hea :paramtype include_health_state: bool """ - return client.get_deployed_application_info(node_name, application_id, include_health_state=include_health_state, timeout=timeout) + return client.get_deployed_application_info(node_name, application_id, include_health_state=include_health_state, + timeout=timeout) -def get_deployed_application_info_list(client, node_name, include_health_state=False, continuation_token=None, max_results=0, timeout=60): +def get_deployed_application_info_list(client, node_name, include_health_state=False, continuation_token=None, # pylint: disable=too-many-arguments + max_results=0, timeout=60): """Gets the list of applications deployed on a Service Fabric node. Gets the list of applications deployed on a Service Fabric node. The results do not include @@ -859,11 +862,11 @@ def get_deployed_application_info_list(client, node_name, include_health_state=F or not specified, the paged query includes as many results as possible that fit in the return """ - return client.get_deployed_application_info_list(node_name, include_health_state=include_health_state, continuation_token_parameter=continuation_token, + return client.get_deployed_application_info_list(node_name, include_health_state=include_health_state, + continuation_token_parameter=continuation_token, max_results=max_results, timeout=timeout) - -def get_deployed_application_health(client, application_id, node_name, deployed_service_packages_health_state_filter=0, +def get_deployed_application_health(client, application_id, node_name, deployed_service_packages_health_state_filter=0, # pylint: disable=too-many-arguments events_health_state_filter=0, exclude_health_statistics=False, timeout=60): """Gets the information about health of an application deployed on a Service Fabric node. @@ -930,9 +933,10 @@ def get_deployed_application_health(client, application_id, node_name, deployed_ complete. The default value for this parameter is 60 seconds. Default value is 60. """ - return client.get_deployed_application_health(node_name, application_id, events_health_state_filter=events_health_state_filter, - deployed_service_packages_health_state_filter=deployed_service_packages_health_state_filter, - exclude_health_statistics=exclude_health_statistics, timeout=timeout) + return client.get_deployed_application_health(node_name, application_id, + events_health_state_filter=events_health_state_filter, + deployed_service_packages_health_state_filter=deployed_service_packages_health_state_filter, # pylint: disable=line-too-long + exclude_health_statistics=exclude_health_statistics, timeout=timeout) def get_application_info(client, application_id, exclude_application_parameters=False, timeout=60): """Gets information about a Service Fabric application. @@ -952,10 +956,11 @@ def get_application_info(client, application_id, exclude_application_parameters= will be excluded from the result. Default value is False. :paramtype exclude_application_parameters: bool """ - return client.get_application_info(application_id, exclude_application_parameters=exclude_application_parameters, timeout=timeout) + return client.get_application_info(application_id, exclude_application_parameters=exclude_application_parameters, timeout=timeout) # pylint: disable=line-too-long -def get_application_info_list(client, application_definition_kind_filter=0, application_type_name=None, exclude_application_parameters=False, - continuation_token = None, max_results=0, timeout=60): +def get_application_info_list(client, application_definition_kind_filter=0, application_type_name=None, # pylint: disable=too-many-arguments + exclude_application_parameters=False, continuation_token = None, max_results=0, + timeout=60): """Gets the list of applications created in the Service Fabric cluster that match the specified filters. @@ -1002,10 +1007,12 @@ def get_application_info_list(client, application_definition_kind_filter=0, appl return client.get_application_info_list(application_definition_kind_filter=application_definition_kind_filter, application_type_name=application_type_name, exclude_application_parameters=exclude_application_parameters, - continuation_token_parameter=continuation_token, max_results=max_results, timeout=timeout) + continuation_token_parameter=continuation_token, max_results=max_results, + timeout=timeout) -def get_application_type_info_list_by_name(client, application_type_name, application_type_version=None, - exclude_application_parameters=False, continuation_token=None, max_results=0, timeout=60): +def get_application_type_info_list_by_name(client, application_type_name, application_type_version=None, # pylint: disable=too-many-arguments + exclude_application_parameters=False, continuation_token=None, + max_results=0, timeout=60): """Gets the list of application types in the Service Fabric cluster matching exactly the specified name. @@ -1044,12 +1051,16 @@ def get_application_type_info_list_by_name(client, application_type_name, applic message. Default value is 0. :paramtype max_results: long """ - return client.get_application_type_info_list_by_name(application_type_name, application_type_version=application_type_version, - exclude_application_parameters=exclude_application_parameters, continuation_token_paramater=continuation_token, - max_results=max_results, timeout=timeout) + return client.get_application_type_info_list_by_name(application_type_name, + application_type_version=application_type_version, + exclude_application_parameters=exclude_application_parameters, + continuation_token_paramater=continuation_token, + max_results=max_results, timeout=timeout) + -def get_application_type_info_list(client, application_type_definition_kind_filter=0, exclude_application_parameters=False, - continuation_token=None, max_results=0, timeout=60): +def get_application_type_info_list(client, application_type_definition_kind_filter=0, # pylint: disable=too-many-arguments + exclude_application_parameters=False, + continuation_token=None, max_results=0, timeout=60): """Gets the list of application types in the Service Fabric cluster. Returns the information about the application types that are provisioned or in the process of @@ -1094,13 +1105,15 @@ def get_application_type_info_list(client, application_type_definition_kind_filt or not specified, the paged query includes as many results as possible that fit in the return message. Default value is 0. """ - return client.get_application_type_info_list(application_type_definition_kind_filter=application_type_definition_kind_filter, - exclude_application_parameters=exclude_application_parameters, continuation_token_paramater=continuation_token, - max_results=max_results, timeout=timeout) + return client.get_application_type_info_list(application_type_definition_kind_filter=application_type_definition_kind_filter, # pylint: disable=line-too-long + exclude_application_parameters=exclude_application_parameters, + continuation_token_paramater=continuation_token, + max_results=max_results, timeout=timeout) -def get_application_health(client, application_id, events_health_state_filter=0, services_health_state_filter=0, - deployed_applications_health_state_filter=0, exclude_health_statistics=False, timeout=60): +def get_application_health(client, application_id, events_health_state_filter=0, services_health_state_filter=0, # pylint: disable=too-many-arguments + deployed_applications_health_state_filter=0, exclude_health_statistics=False, + timeout=60): """Gets the health of the service fabric application. Returns the heath state of the service fabric application. The response reports either Ok, @@ -1183,8 +1196,10 @@ def get_application_health(client, application_id, events_health_state_filter=0, Default value is False. :paramtype exclude_health_statistics: bool """ - return client.get_application_health(application_id, events_health_state_filter=events_health_state_filter, services_health_state_filter=services_health_state_filter, - deployed_applications_health_state_filter=deployed_applications_health_state_filter, exclude_health_statistics=exclude_health_statistics, timeout=timeout) + return client.get_application_health(application_id, events_health_state_filter=events_health_state_filter, + services_health_state_filter=services_health_state_filter, + deployed_applications_health_state_filter=deployed_applications_health_state_filter, # pylint: disable=line-too-long + exclude_health_statistics=exclude_health_statistics, timeout=timeout) def get_application_manifest(client, application_type_name, application_type_version, timeout=60): """Gets the manifest describing an application type. @@ -1195,4 +1210,5 @@ def get_application_manifest(client, application_type_name, application_type_ver :param application_type_version: The version of the application type. :paramtype application_type_version: str """ - return client.get_application_manifest(application_type_name, application_type_version=application_type_version, timeout=timeout) + return client.get_application_manifest(application_type_name, application_type_version=application_type_version, + timeout=timeout) diff --git a/src/sfctl/custom_app_type.py b/src/sfctl/custom_app_type.py index 064f5117..caa6e704 100644 --- a/src/sfctl/custom_app_type.py +++ b/src/sfctl/custom_app_type.py @@ -64,5 +64,4 @@ def provision_application_type(client, #pylint: disable=too-many-locals,invalid- 'ApplicationTypeBuildPath': application_type_build_path } - return client.provision_application_type(provision_description) - + return client.provision_application_type(provision_description, timeout=timeout) diff --git a/src/sfctl/custom_chaos.py b/src/sfctl/custom_chaos.py index 8566875b..76616e50 100644 --- a/src/sfctl/custom_chaos.py +++ b/src/sfctl/custom_chaos.py @@ -111,7 +111,8 @@ def start(client, time_to_run="4294967295", max_cluster_stabilization=60, #pylin client.start_chaos(chaos_params, timeout=timeout) -def get_chaos_events(client, continuation_token=None, start_time_utc=None, end_time_utc=None, max_results=0, timeout=60): +def get_chaos_events(client, continuation_token=None, start_time_utc=None, end_time_utc=None, max_results=0, # pylint: disable=too-many-arguments + timeout=60): """Gets the next segment of the Chaos events based on the continuation token or the time range. To get the next segment of the Chaos events, you can specify the ContinuationToken. To get the diff --git a/src/sfctl/custom_cluster.py b/src/sfctl/custom_cluster.py index 8ddd9dba..54baeea6 100644 --- a/src/sfctl/custom_cluster.py +++ b/src/sfctl/custom_cluster.py @@ -14,12 +14,10 @@ from azure.servicefabric import ServiceFabricClientAPIs from knack.util import CLIError from knack.log import get_logger -from sfctl.apiclient import FakeAuthenticationPolicy, FakeCredentialProtocol +from sfctl.auth import FakeAuthenticationPolicy, FakeCredentialProtocol, get_aad_header from sfctl.config import client_endpoint, SF_CLI_VERSION_CHECK_INTERVAL, get_cluster_auth, set_aad_cache, set_aad_metadata # pylint: disable=line-too-long from sfctl.state import get_sfctl_version from sfctl.custom_exceptions import SFCTLInternalException -from sfctl.auth import AdalAuthentication2 - logger = get_logger(__name__) # pylint: disable=invalid-name @@ -60,7 +58,7 @@ def show_connection(): return endpoint -def _get_cert_based_client(endpoint, pem, cert, key, ca, no_verify): # pylint: disable=invalid-name +def _get_cert_based_client(endpoint, pem, cert, key, ca, no_verify): # pylint: disable=invalid-name, too-many-arguments """ Return a ClientCertAuthentication based on given credentials @@ -88,8 +86,7 @@ def _get_cert_based_client(endpoint, pem, cert, key, ca, no_verify): # pylint: d def _get_aad_based_client(endpoint, no_verify): headers = {} - auth = AdalAuthentication2() - headers['Authorization'] = auth.get_header() + headers['Authorization'] = get_aad_header() return ServiceFabricClientAPIs(FakeCredentialProtocol(), endpoint=endpoint, retry_total=0, connection_verify=no_verify, enforce_https=False, authentication_policy=FakeAuthenticationPolicy()) diff --git a/src/sfctl/custom_cluster_upgrade.py b/src/sfctl/custom_cluster_upgrade.py index bee4a48e..0d281fe7 100644 --- a/src/sfctl/custom_cluster_upgrade.py +++ b/src/sfctl/custom_cluster_upgrade.py @@ -69,7 +69,7 @@ def parse_app_health_policy(app_health_map): policy_list = [] for app in app_health_map: allowed_unhealthy = app_health_map[app] - policy_item = {"Key":app, "Value":allowed_unhealthy} + policy_item = {"Key": app, "Value": allowed_unhealthy} policy_list.append(policy_item) return { "ApplicationHealthPolicyMap":policy_list} @@ -83,10 +83,10 @@ def create_rolling_update_desc( #pylint: disable=too-many-arguments return { "RollingUpgradeMode": rolling_upgrade_mode, "ForceRestart": force_restart, - "ReplicaSetCheckTimeoutInMilliseconds": replica_set_check_timeout, #pylint: disable=line-too-long - "FailureAction":failure_action, + "ReplicaSetCheckTimeoutInMilliseconds": replica_set_check_timeout, # pylint: disable=line-too-long + "FailureAction": failure_action, "HealthCheckWaitDurationInMilliseconds": health_check_wait, - "HealthCheckStableDurationInMilliseconds":health_check_stable, + "HealthCheckStableDurationInMilliseconds": health_check_stable, "HealthCheckRetryTimeoutInMilliseconds": health_check_retry, "UpgradeDomainTimeoutInMilliseconds": upgrade_domain_timeout, "UpgradeTimeoutInMilliseconds": upgrade_timeout} @@ -122,7 +122,7 @@ def upgrade( #pylint: disable=too-many-locals,missing-docstring,invalid-name,too "ClusterHealthPolicy": cluster_policy, "EnableDeltaHealthEvaluation": delta_health_evaluation, "ClusterUpgradeHealthPolicy": cluster_upgrade_policy, - "ApplicationHealthPolicyMap":app_health_policy} + "ApplicationHealthPolicyMap": app_health_policy} client.start_cluster_upgrade(upgrade_desc, timeout=timeout) @@ -246,7 +246,7 @@ def get_provisioned_fabric_config_version_info_list(client, config_version=None, return client.get_provisioned_fabric_config_version_info_list(config_version=config_version, timeout=timeout) -def get_cluster_health(client, nodes_health_state_filter=0, applications_health_state_filter=0, +def get_cluster_health(client, nodes_health_state_filter=0, applications_health_state_filter=0, #pylint: disable=too-many-arguments events_health_state_filter=0, exclude_health_statistics=False, include_system_application_health_statistics=False, timeout=60): """Gets the health of a Service Fabric cluster. @@ -337,9 +337,12 @@ def get_cluster_health(client, nodes_health_state_filter=0, applications_health_ Default value is False. :paramtype include_system_application_health_statistics: bool """ - return client.get_cluster_health(nodes_health_state_filter=nodes_health_state_filter, applications_health_state_filter=applications_health_state_filter, - events_health_state_filter=events_health_state_filter, exclude_health_statistics=exclude_health_statistics, - include_system_application_health_statistics=include_system_application_health_statistics, timeout=timeout) + return client.get_cluster_health(nodes_health_state_filter=nodes_health_state_filter, + applications_health_state_filter=applications_health_state_filter, + events_health_state_filter=events_health_state_filter, + exclude_health_statistics=exclude_health_statistics, + include_system_application_health_statistics=include_system_application_health_statistics, + timeout=timeout) def cancel_operation(client, operation_id, force=False, timeout=60): """Cancels a user-induced fault operation. @@ -369,4 +372,4 @@ def cancel_operation(client, operation_id, force=False, timeout=60): modified by executing the user-induced operation. Default value is False. :paramtype force: bool """ - client.cancel_operation(operation_id, force=force, timeout=timeout) \ No newline at end of file + client.cancel_operation(operation_id, force=force, timeout=timeout) diff --git a/src/sfctl/custom_compose.py b/src/sfctl/custom_compose.py index bf57e8f8..6d2e2606 100644 --- a/src/sfctl/custom_compose.py +++ b/src/sfctl/custom_compose.py @@ -147,4 +147,5 @@ def get_compose_deployment_status_list(client, continuation_token=None, max_resu :paramtype max_results: long """ - return client.get_compose_deployment_status_list(continuation_token_parameter=continuation_token, max_results=max_results, timeout=60) \ No newline at end of file + return client.get_compose_deployment_status_list(continuation_token_parameter=continuation_token, + max_results=max_results, timeout=timeout) diff --git a/src/sfctl/custom_container.py b/src/sfctl/custom_container.py index 85f94f68..994a69fe 100644 --- a/src/sfctl/custom_container.py +++ b/src/sfctl/custom_container.py @@ -62,7 +62,7 @@ def logs( # pylint: disable=too-many-arguments if tail: uri_path += '&tail={}'.format(tail) - request_body = { "UriPath": uri_path} + request_body = { "UriPath": uri_path} response = client.invoke_container_api( node_name, diff --git a/src/sfctl/custom_events.py b/src/sfctl/custom_events.py index 67118ae7..e8f40210 100644 --- a/src/sfctl/custom_events.py +++ b/src/sfctl/custom_events.py @@ -6,7 +6,7 @@ """Custom Event store for Service Fabric CLI""" -def get_cluster_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, +def get_cluster_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, # pylint: disable=too-many-arguments exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all CLuster-related events. @@ -37,7 +37,7 @@ def get_cluster_event_list(client, start_time_utc, end_time_utc, events_types_fi skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) -def get_nodes_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, +def get_nodes_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, # pylint: disable=too-many-arguments exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Nodes-related events. @@ -67,7 +67,7 @@ def get_nodes_event_list(client, start_time_utc, end_time_utc, events_types_filt skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) -def get_node_event_list(client, node_name, start_time_utc, end_time_utc, events_types_filter=None, +def get_node_event_list(client, node_name, start_time_utc, end_time_utc, events_types_filter=None, # pylint: disable=too-many-arguments exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Node-related events for a specific node. @@ -99,7 +99,7 @@ def get_node_event_list(client, node_name, start_time_utc, end_time_utc, events_ skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) -def get_applications_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, +def get_applications_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, # pylint: disable=too-many-arguments exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Applications-related events. @@ -129,7 +129,7 @@ def get_applications_event_list(client, start_time_utc, end_time_utc, events_typ skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) -def get_application_event_list(client, application_id, start_time_utc, end_time_utc, +def get_application_event_list(client, application_id, start_time_utc, end_time_utc, # pylint: disable=too-many-arguments events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Applications-related events for a specific application. @@ -166,7 +166,7 @@ def get_application_event_list(client, application_id, start_time_utc, end_time_ skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) -def get_services_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, +def get_services_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, # pylint: disable=too-many-arguments exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Service-related events. @@ -196,7 +196,7 @@ def get_services_event_list(client, start_time_utc, end_time_utc, events_types_f skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) -def get_service_event_list(client, service_id, start_time_utc, end_time_utc, events_types_filter=None, +def get_service_event_list(client, service_id, start_time_utc, end_time_utc, events_types_filter=None, # pylint: disable=too-many-arguments exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Service-related events for a specific node. @@ -232,7 +232,7 @@ def get_service_event_list(client, service_id, start_time_utc, end_time_utc, eve skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) -def get_partitions_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, +def get_partitions_event_list(client, start_time_utc, end_time_utc, events_types_filter=None, # pylint: disable=too-many-arguments exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Partition-related events. @@ -262,7 +262,7 @@ def get_partitions_event_list(client, start_time_utc, end_time_utc, events_types skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) -def get_partition_event_list(client, partition_id, start_time_utc, end_time_utc, events_types_filter=None, +def get_partition_event_list(client, partition_id, start_time_utc, end_time_utc, events_types_filter=None, # pylint: disable=too-many-arguments exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Partition-related events for a specific partition. @@ -294,7 +294,7 @@ def get_partition_event_list(client, partition_id, start_time_utc, end_time_utc, skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) -def get_partition_replicas_event_list(client, partition_id, start_time_utc, end_time_utc, events_types_filter=None, +def get_partition_replicas_event_list(client, partition_id, start_time_utc, end_time_utc, events_types_filter=None, # pylint: disable=too-many-arguments exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Partition Replica-related events for a specific replica. @@ -326,7 +326,7 @@ def get_partition_replicas_event_list(client, partition_id, start_time_utc, end_ skip_correlation_lookup=skip_correlation_lookup, timeout=timeout) -def get_partition_replica_event_list(client, partition_id, replica_id, start_time_utc, end_time_utc, +def get_partition_replica_event_list(client, partition_id, replica_id, start_time_utc, end_time_utc, # pylint: disable=too-many-arguments events_types_filter=None, exclude_analysis_events=None, skip_correlation_lookup=None, timeout=60): """Gets all Partition Replica-related events. diff --git a/src/sfctl/custom_health.py b/src/sfctl/custom_health.py index cea99698..4ec84253 100644 --- a/src/sfctl/custom_health.py +++ b/src/sfctl/custom_health.py @@ -73,13 +73,10 @@ def create_health_information(source_id, health_property, health_state, ttl, #p if health_state not in ['Invalid', 'Ok', 'Warning', 'Error', 'Unknown']: raise CLIError('Invalid health state specified') - if type(remove_when_expired) == bool: + if isinstance(remove_when_expired) == bool: rwe = remove_when_expired - elif type(remove_when_expired) == str: - if remove_when_expired == "True" or remove_when_expired == "true": - rwe = True - else: - rwe = False + elif isinstance(remove_when_expired) == str: + rwe = remove_when_expired in ("True" , "true") #pylint: disable=simplifiable-if-statement return {"SourceId": source_id, "Property": health_property, diff --git a/src/sfctl/custom_node.py b/src/sfctl/custom_node.py index 8fcf9bb0..8c7ed008 100644 --- a/src/sfctl/custom_node.py +++ b/src/sfctl/custom_node.py @@ -30,7 +30,7 @@ def disable_node(client, node_name, deactivation_intent, timeout=60): client.disable_node(node_name, payload, timeout=timeout) -def restart_node(client, node_name, node_instance_id=0, create_fabric_dump="False", timeout=60): +def restart_node(client, node_name, node_instance_id=0, create_fabric_dump="False", timeout=60): # pylint: disable=too-many-arguments """Restarts a Service Fabric cluster node. :param str node_name: The name of the node @@ -38,7 +38,8 @@ def restart_node(client, node_name, node_instance_id=0, create_fabric_dump="Fals node is restarted only if it matches with the current instance of the node. A default value of "0" would match any instance ID. The instance ID can be obtained using get node query - :param str create_fabric_dump: Specify True to create a dump of the fabric node process. This is case sensitive. Default: False + :param str create_fabric_dump: Specify True to create a dump of the fabric node process. + This is case sensitive. Default: False """ payload = { "CreateFabricDump": create_fabric_dump, @@ -47,7 +48,7 @@ def restart_node(client, node_name, node_instance_id=0, create_fabric_dump="Fals client.restart_node(node_name, payload, timeout=timeout) -def add_configuration_parameter_overrides(client, config_parameter_override_list, node_name, force=False, timeout=60): +def add_configuration_parameter_overrides(client, config_parameter_override_list, node_name, force=False, timeout=60): # pylint: disable=too-many-arguments """Adds the list of configuration overrides on the specified node. This api allows adding all existing configuration overrides on the specified node. @@ -60,7 +61,8 @@ def add_configuration_parameter_overrides(client, config_parameter_override_list :paramtype force: bool """ - return client.add_configuration_parameter_overrides(node_name, config_parameter_override_list, force=force, timeout=timeout) + return client.add_configuration_parameter_overrides(node_name, config_parameter_override_list, + force=force, timeout=timeout) def get_node_health(client, node_name, events_health_state_filter=0, timeout=60): """Gets the health of a Service Fabric node. @@ -96,7 +98,7 @@ def get_node_health(client, node_name, events_health_state_filter=0, timeout=60) return client.get_node_health(node_name, events_health_state_filter=events_health_state_filter, timeout=timeout) -def get_node_info_list(client, continuation_token=None, max_results=0, node_status_filter="default", timeout=60): +def get_node_info_list(client, continuation_token=None, max_results=0, node_status_filter="default", timeout=60): # pylint: disable=too-many-arguments """Gets the list of nodes in the Service Fabric cluster. The response includes the name, status, ID, health, uptime, and other details about the nodes. @@ -120,11 +122,13 @@ def get_node_info_list(client, continuation_token=None, max_results=0, node_stat or not specified, the paged query includes as many results as possible that fit in the return message. Default value is 0. """ - return client.get_node_info_list(continuation_token_parameter=continuation_token, node_status_filter=node_status_filter, - max_results=max_results, timeout=timeout) + return client.get_node_info_list(continuation_token_parameter=continuation_token, + node_status_filter=node_status_filter, + max_results=max_results, timeout=timeout) -def start_node_transition(client, node_name, node_instance_id, node_transition_type, operation_id, stop_duration_in_seconds, timeout=60): +def start_node_transition(client, node_name, node_instance_id, node_transition_type, operation_id, # pylint: disable=too-many-arguments + stop_duration_in_seconds, timeout=60): """Starts or stops a cluster node. Starts or stops a cluster node. A cluster node is a process, not the OS instance itself. To @@ -150,8 +154,11 @@ def start_node_transition(client, node_name, node_instance_id, node_transition_t automatically come back up. :paramtype stop_duration_in_seconds: int """ - return client.start_node_transition(node_name, node_instance_id=node_instance_id, node_transition_type=node_transition_type, - operation_id=operation_id, stop_duration_in_seconds=stop_duration_in_seconds, timeout=timeout) + return client.start_node_transition(node_name, node_instance_id=node_instance_id, + node_transition_type=node_transition_type, + operation_id=operation_id, + stop_duration_in_seconds=stop_duration_in_seconds, + timeout=timeout) def get_node_transition_progress(client, node_name, operation_id, timeout=60): @@ -166,6 +173,4 @@ def get_node_transition_progress(client, node_name, operation_id, timeout=60): corresponding GetProgress API. :paramtype operation_id: str """ - - - return client.get_node_transition_progress(node_name, operation_id=operation_id, timeout=timeout) \ No newline at end of file + return client.get_node_transition_progress(node_name, operation_id=operation_id, timeout=timeout) diff --git a/src/sfctl/custom_partition.py b/src/sfctl/custom_partition.py index 59e7aac9..7dbdb1b4 100644 --- a/src/sfctl/custom_partition.py +++ b/src/sfctl/custom_partition.py @@ -6,7 +6,7 @@ """Custom commands for the Service Fabric partition support""" -def start_data_loss(client, service_id, partition_id, operation_id, data_loss_mode, timeout=60): +def start_data_loss(client, service_id, partition_id, operation_id, data_loss_mode, timeout=60): # pylint: disable=too-many-arguments """This API will induce data loss for the specified partition. It will trigger a call to the OnDataLossAsync API of the partition. @@ -46,7 +46,8 @@ def start_data_loss(client, service_id, partition_id, operation_id, data_loss_mo :paramtype data_loss_mode: str """ - return client.start_data_loss(service_id, partition_id, operation_id=operation_id, data_loss_mode=data_loss_mode, timeout=timeout) + return client.start_data_loss(service_id, partition_id, operation_id=operation_id, + data_loss_mode=data_loss_mode, timeout=timeout) def get_data_loss_progress(client, service_id, partition_id, operation_id, timeout=60): """Gets the progress of a partition data loss operation started using the StartDataLoss API. @@ -68,7 +69,8 @@ def get_data_loss_progress(client, service_id, partition_id, operation_id, timeo return client.get_data_loss_progress(service_id, partition_id, operation_id=operation_id, timeout=timeout) -def get_loaded_partition_info_list(client, metric_name, service_name=None, ordering=None, max_results=0, continuation_token=None, timeout=60): +def get_loaded_partition_info_list(client, metric_name, service_name=None, ordering=None, # pylint: disable=too-many-arguments + max_results=0, continuation_token=None, timeout=60): """Gets ordered list of partitions. Retrieves partitions which are most/least loaded according to specified metric. @@ -95,10 +97,13 @@ def get_loaded_partition_info_list(client, metric_name, service_name=None, order URL encoded. Default value is None. """ - return client.get_loaded_partition_info_list(metric_name=metric_name, continuation_token_parameter=continuation_token, - service_name=service_name, ordering=ordering, max_results=max_results, timeout=60) + return client.get_loaded_partition_info_list(metric_name=metric_name, max_results=max_results, timeout=timeout, + continuation_token_parameter=continuation_token, + service_name=service_name, ordering=ordering) -def get_partition_health(client, partition_id, events_health_state_filter=0, replicas_health_state_filter=0, exclude_health_statistics=False, timeout=60): + +def get_partition_health(client, partition_id, events_health_state_filter=0, replicas_health_state_filter=0, # pylint: disable=too-many-arguments + exclude_health_statistics=False, timeout=60): """Gets the health of the specified Service Fabric partition. Use EventsHealthStateFilter to filter the collection of health events reported on the service @@ -158,8 +163,9 @@ def get_partition_health(client, partition_id, events_health_state_filter=0, rep :paramtype exclude_health_statistics: bool """ - return client.get_partition_health(partition_id, events_health_state_filter=events_health_state_filter, replicas_health_state_filter=replicas_health_state_filter, - exclude_health_statistics=exclude_health_statistics, timeout=timeout) + return client.get_partition_health(partition_id, events_health_state_filter=events_health_state_filter, + replicas_health_state_filter=replicas_health_state_filter, + exclude_health_statistics=exclude_health_statistics, timeout=timeout) def get_partition_info_list(client, service_id, continuation_token=None, timeout=60): @@ -184,7 +190,8 @@ def get_partition_info_list(client, service_id, continuation_token=None, timeout """ return client.get_partition_info_list(service_id, continuation_token_parameter=continuation_token, timeout=timeout) -def move_instance(client, service_id, partition_id, current_node_name=None, new_node_name=None, ignore_constraints=False, timeout=60): +def move_instance(client, service_id, partition_id, current_node_name=None, new_node_name=None, # pylint: disable=too-many-arguments + ignore_constraints=False, timeout=60): """Moves the instance of a partition of a stateless service. This command moves the instance of a partition of a stateless service, respecting all @@ -214,8 +221,9 @@ def move_instance(client, service_id, partition_id, current_node_name=None, new_ parameter is not specified, all constraints are honored. Default value is False. :paramtype ignore_constraints: bool """ - return client.move_instance(service_id, partition_id, current_node_name=current_node_name, new_node_name=new_node_name, - ignore_constraints=ignore_constraints, timeout=timeout) + return client.move_instance(service_id, partition_id, current_node_name=current_node_name, + new_node_name=new_node_name, + ignore_constraints=ignore_constraints, timeout=timeout) def move_primary_replica(client, partition_id, node_name=None, ignore_constraints=False, timeout=60): """Moves the primary replica of a partition of a stateful service. @@ -237,9 +245,12 @@ def move_primary_replica(client, partition_id, node_name=None, ignore_constraint parameter is not specified, all constraints are honored. Default value is False. :paramtype ignore_constraints: bool """ - return client.move_primary_replica(partition_id, node_name=node_name, ignore_constraints=ignore_constraints, timeout=timeout) + return client.move_primary_replica(partition_id, node_name=node_name, + ignore_constraints=ignore_constraints, timeout=timeout) + -def move_secondary_replica(client, partition_id, current_node_name, new_node_name=None, ignore_constraints=False, timeout=60): +def move_secondary_replica(client, partition_id, current_node_name, new_node_name=None, # pylint: disable=too-many-arguments + ignore_constraints=False, timeout=60): """Moves the secondary replica of a partition of a stateful service. This command moves the secondary replica of a partition of a stateful service, respecting all @@ -264,10 +275,13 @@ def move_secondary_replica(client, partition_id, current_node_name, new_node_nam 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. Default value is 60. """ - return client.move_secondary_replica(partition_id, current_node_name=current_node_name, new_node_name=new_node_name, - ignore_constraints=ignore_constraints, timeout=timeout) + return client.move_secondary_replica(partition_id, current_node_name=current_node_name, + new_node_name=new_node_name, + ignore_constraints=ignore_constraints, timeout=timeout) + -def start_quorum_loss(client, service_id, partition_id, operation_id, quorum_loss_mode, quorum_loss_duration, timeout=60): +def start_quorum_loss(client, service_id, partition_id, operation_id, quorum_loss_mode, quorum_loss_duration, # pylint: disable=too-many-arguments + timeout=60): """Induces quorum loss for a given stateful service partition. This API is useful for a temporary quorum loss situation on your service. @@ -296,7 +310,7 @@ def start_quorum_loss(client, service_id, partition_id, operation_id, quorum_los quorum loss. This must be specified in seconds. :paramtype quorum_loss_duration: int """ - client.start_quorum_loss(service_id, partition_id, operation_id=operation_id, + client.start_quorum_loss(service_id, partition_id, operation_id=operation_id, quorum_loss_mode=quorum_loss_mode, quorum_loss_duration=quorum_loss_duration, timeout=timeout) def get_quorum_loss_progress(client, service_id, partition_id, operation_id, timeout=60): @@ -320,7 +334,7 @@ def get_quorum_loss_progress(client, service_id, partition_id, operation_id, tim """ return client.get_quorum_loss_progress(service_id, partition_id, operation_id=operation_id, timeout=timeout) -def start_partition_restart(client, service_id, partition_id, operation_id, restart_partition_mode, timeout=60): +def start_partition_restart(client, service_id, partition_id, operation_id, restart_partition_mode, timeout=60): # pylint: disable=too-many-arguments """This API will restart some or all replicas or instances of the specified partition. This API is useful for testing failover. @@ -345,7 +359,7 @@ def start_partition_restart(client, service_id, partition_id, operation_id, rest "Invalid", "AllReplicasOrInstances", and "OnlyActiveSecondaries". :paramtype restart_partition_mode: str """ - client.start_partition_restart(service_id, partition_id, operation_id=operation_id, + client.start_partition_restart(service_id, partition_id, operation_id=operation_id, restart_partition_mode=restart_partition_mode, timeout=timeout) def get_partition_restart_progress(client, service_id, partition_id, operation_id, timeout=60): @@ -369,4 +383,4 @@ def get_partition_restart_progress(client, service_id, partition_id, operation_i 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. Default value is 60. """ - return client.get_partition_restart_progress(service_id, partition_id, operation_id=operation_id, timeout=timeout) \ No newline at end of file + return client.get_partition_restart_progress(service_id, partition_id, operation_id=operation_id, timeout=timeout) diff --git a/src/sfctl/custom_property.py b/src/sfctl/custom_property.py index ec791988..c106ac43 100644 --- a/src/sfctl/custom_property.py +++ b/src/sfctl/custom_property.py @@ -60,4 +60,5 @@ def get_property_info_list(client, name_id, include_values=False, continuation_t URL encoded. Default value is None. :paramtype continuation_token: str """ - return client.get_property_info_list(name_id, include_values=include_values, continuation_token_parameter=continuation_token, timeout=timeout) \ No newline at end of file + return client.get_property_info_list(name_id, include_values=include_values, timeout=timeout, + continuation_token_parameter=continuation_token) diff --git a/src/sfctl/custom_replica.py b/src/sfctl/custom_replica.py index b147b5d2..6f5c95ac 100644 --- a/src/sfctl/custom_replica.py +++ b/src/sfctl/custom_replica.py @@ -4,6 +4,8 @@ # license information. # ----------------------------------------------------------- +"""Custom commands for the Service Fabric Replica operations""" + def get_replica_info_list(client, partition_id, continuation_token=None, timeout=60): """Gets the information about replicas of a Service Fabric service partition. @@ -23,7 +25,8 @@ def get_replica_info_list(client, partition_id, continuation_token=None, timeout """ return client.get_replica_info_list(partition_id, continuation_token_parameter=continuation_token, timeout=timeout) -def get_deployed_service_replica_info_list(client, node_name, application_id, partition_id=None, service_manifest_name=None, timeout=60): +def get_deployed_service_replica_info_list(client, node_name, application_id, partition_id=None, # pylint: disable=too-many-arguments + service_manifest_name=None, timeout=60): """Gets the list of replicas deployed on a Service Fabric node. Gets the list containing the information about replicas deployed on a Service Fabric node. The information include partition ID, replica ID, status of the replica, name of the service, name @@ -85,9 +88,10 @@ def get_replica_health(client, partition_id, replica_id, events_health_state_fil value is 0. :paramtype events_health_state_filter: int """ - return client.get_replica_health(partition_id, replica_id, events_health_state_filter=events_health_state_filter, timeout=timeout) + return client.get_replica_health(partition_id, replica_id, events_health_state_filter=events_health_state_filter, + timeout=timeout) -def remove_replica(client, node_name, partition_id, replica_id, force_remove=None, timeout=60): +def remove_replica(client, node_name, partition_id, replica_id, force_remove=None, timeout=60): # pylint: disable=too-many-arguments """Removes a service replica running on a node. This API simulates a Service Fabric replica failure by removing a replica from a Service Fabric @@ -110,4 +114,4 @@ def remove_replica(client, node_name, partition_id, replica_id, force_remove=Non prevents graceful close of replicas. Default value is None. :paramtype force_remove: bool """ - return client.remove_replica(node_name, partition_id, replica_id, force_remove=force_remove, timeout=timeout) \ No newline at end of file + return client.remove_replica(node_name, partition_id, replica_id, force_remove=force_remove, timeout=timeout) diff --git a/src/sfctl/custom_sa_cluster.py b/src/sfctl/custom_sa_cluster.py index 4bb1bd5e..69e667b7 100644 --- a/src/sfctl/custom_sa_cluster.py +++ b/src/sfctl/custom_sa_cluster.py @@ -4,6 +4,8 @@ # license information. # ----------------------------------------------------------- +"""Custom commands for stand alone clusters""" + def get_cluster_configuration(client, configuration_api_version, timeout=60): """Get the Service Fabric standalone cluster configuration. @@ -15,4 +17,4 @@ def get_cluster_configuration(client, configuration_api_version, timeout=60): configuration. :paramtype configuration_api_version: str """ - return client.get_cluster_configuration(configuration_api_version=configuration_api_version, timeout=timeout) \ No newline at end of file + return client.get_cluster_configuration(configuration_api_version=configuration_api_version, timeout=timeout) diff --git a/src/sfctl/custom_service.py b/src/sfctl/custom_service.py index 39744cb9..953f6a11 100644 --- a/src/sfctl/custom_service.py +++ b/src/sfctl/custom_service.py @@ -632,8 +632,8 @@ def package_upload(client, node_name, service_manifest_name, app_type_name, # p "PackageSharingPolicy": list_psps} client.deployed_service_package_to_node(node_name, desc, timeout) -def get_deployed_code_package_info_list(client, node_name, application_id, service_manifest_name=None, - code_package_name=None, timeout=60): # pylint: disable=too-many-arguments +def get_deployed_code_package_info_list(client, node_name, application_id, service_manifest_name=None, # pylint: disable=too-many-arguments + code_package_name=None, timeout=60): """Gets the list of code packages deployed on a Service Fabric node. Gets the list of code packages deployed on a Service Fabric node for the given application. @@ -680,8 +680,8 @@ def delete_service(client, service_id, force_remove=None, timeout=60): """ client.delete_service(service_id, force_remove=force_remove, timeout=timeout) -def get_deployed_service_type_info_by_name(client, node_name, application_id, - service_type_name, service_manifest_name=None, timeout=60): # pylint: disable=too-many-arguments +def get_deployed_service_type_info_by_name(client, node_name, application_id, # pylint: disable=too-many-arguments + service_type_name, service_manifest_name=None, timeout=60): """Gets the information about a specified service type of the application deployed on a node in a Service Fabric cluster. @@ -736,8 +736,8 @@ def get_deployed_service_type_info_list(client, node_name, application_id, servi service_manifest_name=service_manifest_name, timeout=timeout) -def get_container_logs_deployed_on_node(client, node_name, application_id, service_manifest_name, code_package_name, - tail=None, previous=False, timeout=60): # pylint: disable=too-many-arguments +def get_container_logs_deployed_on_node(client, node_name, application_id, service_manifest_name, code_package_name, # pylint: disable=too-many-arguments + tail=None, previous=False, timeout=60): """Gets the container logs for container deployed on a Service Fabric node. Gets the container logs for container deployed on a Service Fabric node for the given code @@ -770,8 +770,8 @@ def get_container_logs_deployed_on_node(client, node_name, application_id, servi previous=previous, timeout=timeout) -def get_service_health(client, service_id, events_health_state_filter=0, partitions_health_state_filter=0, - exclude_health_statistics=False, timeout=60): # pylint: disable=too-many-arguments +def get_service_health(client, service_id, events_health_state_filter=0, partitions_health_state_filter=0, # pylint: disable=too-many-arguments + exclude_health_statistics=False, timeout=60): """Gets the health of the specified Service Fabric service. Gets the health information of the specified service. @@ -883,8 +883,8 @@ def get_service_manifest(client, application_type_name, application_type_version return client.get_service_manifest(application_type_name, application_type_version=application_type_version, service_manifest_name=service_manifest_name, timeout=timeout) -def get_deployed_service_package_health(client, node_name, application_id, service_package_name, - events_health_state_filter=0, timeout=60): # pylint: disable=too-many-arguments +def get_deployed_service_package_health(client, node_name, application_id, service_package_name, # pylint: disable=too-many-arguments + events_health_state_filter=0, timeout=60): """Gets the information about health of a service package for a specific application deployed for a Service Fabric node and application. @@ -927,8 +927,8 @@ def get_deployed_service_package_health(client, node_name, application_id, servi return client.get_deployed_service_package_health(node_name, application_id, service_package_name, events_health_state_filter=events_health_state_filter, timeout=timeout) -def resolve_service(client, service_id, partition_key_type=None, partition_key_value=None, - previous_rsp_version=None, timeout=60): # pylint: disable=too-many-arguments +def resolve_service(client, service_id, partition_key_type=None, partition_key_value=None, # pylint: disable=too-many-arguments + previous_rsp_version=None, timeout=60): """Resolve a Service Fabric partition. Resolve a Service Fabric service partition to get the endpoints of the service replicas. diff --git a/src/sfctl/tests/request_generation_test.py b/src/sfctl/tests/request_generation_test.py index 58c9572c..5b00f411 100644 --- a/src/sfctl/tests/request_generation_test.py +++ b/src/sfctl/tests/request_generation_test.py @@ -17,7 +17,7 @@ from mock import patch from knack.testsdk import ScenarioTest from azure.servicefabric import ServiceFabricClientAPIs -from sfctl.apiclient import FakeAuthenticationPolicy, FakeCredentialProtocol +from sfctl.auth import FakeAuthenticationPolicy, FakeCredentialProtocol from sfctl.entry import cli from sfctl.tests.helpers import (MOCK_CONFIG, get_mock_endpoint, set_mock_endpoint) from sfctl.tests.mock_server import (find_localhost_free_port, start_mock_server) From 10e2624af4122e2a207b757ea0fcd1e4f74973ab Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Wed, 11 May 2022 16:03:18 -0700 Subject: [PATCH 18/20] updated the build. --- .github/workflows/build-wheel.yml | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-wheel.yml b/.github/workflows/build-wheel.yml index d16af778..be7a50ac 100644 --- a/.github/workflows/build-wheel.yml +++ b/.github/workflows/build-wheel.yml @@ -6,7 +6,8 @@ on: pull_request: jobs: - build: + build_wheel: + name: build wheel runs-on: ubuntu-latest strategy: matrix: @@ -18,19 +19,33 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - name: Get versions + run: | + echo "pip version:" + pip -V + echo "python version:" + python -V + echo "git version:" + git --version + echo "bash version:" + bash --version + echo "os version:" + cat /proc/version - name: Install dependencies run: | python -m pip install --upgrade pip pip install --force-reinstall -e ./src pip install --force-reinstall -r requirements.txt - pip install wheel - - name: Build Wheel + - name: install wheel run: | - python src/setup.py bdist_wheel --universal - + pip install wheel==0.37.1 + - name: Build Wheel + run: | + cd src + python setup.py bdist_wheel --universal - name: upload wheel - uses: actions/upload-artifact@v2-preview + uses: actions/upload-artifact@v2 if: always() with: name: wheel - path: /home/runner/work/service-fabric-cli/src/dist* \ No newline at end of file + path: /home/runner/work/service-fabric-cli/service-fabric-cli/src/dist* \ No newline at end of file From a0c9fad7739f513fcf4f3320d62e22dda5d9b538 Mon Sep 17 00:00:00 2001 From: jeffj6123 Date: Wed, 11 May 2022 16:09:58 -0700 Subject: [PATCH 19/20] fixed error in handling health information. --- src/sfctl/custom_health.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sfctl/custom_health.py b/src/sfctl/custom_health.py index 4ec84253..f9fe12ee 100644 --- a/src/sfctl/custom_health.py +++ b/src/sfctl/custom_health.py @@ -73,9 +73,9 @@ def create_health_information(source_id, health_property, health_state, ttl, #p if health_state not in ['Invalid', 'Ok', 'Warning', 'Error', 'Unknown']: raise CLIError('Invalid health state specified') - if isinstance(remove_when_expired) == bool: + if isinstance(remove_when_expired, bool): rwe = remove_when_expired - elif isinstance(remove_when_expired) == str: + elif isinstance(remove_when_expired, str): rwe = remove_when_expired in ("True" , "true") #pylint: disable=simplifiable-if-statement return {"SourceId": source_id, From 49b8b4c698b85838d7faa47629f1fa9f16458250 Mon Sep 17 00:00:00 2001 From: Jeff Jarry Date: Wed, 19 Apr 2023 13:02:57 -0400 Subject: [PATCH 20/20] renamed a couple files and added the auth header --- src/sfctl/apiclient.py | 10 +++++----- src/sfctl/auth.py | 8 ++++---- src/sfctl/custom_cluster.py | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/sfctl/apiclient.py b/src/sfctl/apiclient.py index a31bb49e..805586ac 100644 --- a/src/sfctl/apiclient.py +++ b/src/sfctl/apiclient.py @@ -8,7 +8,7 @@ from knack.util import CLIError from azure.servicefabric import ServiceFabricClientAPIs -from sfctl.auth import FakeAuthenticationPolicy, FakeCredentialProtocol, get_aad_header +from sfctl.auth import AuthenticationPolicy, CredentialProtocol, get_aad_header from sfctl.config import (security_type, ca_cert_info, cert_info, client_endpoint, no_verify_setting) @@ -31,11 +31,11 @@ def create(_): headers['Authorization'] = get_aad_header() else: ca_cert = ca_cert_info() - if ca_cert is not None: + if ca_cert: no_verify = ca_cert - client = ServiceFabricClientAPIs(FakeCredentialProtocol(), endpoint=endpoint, retry_total=0, - connection_verify=no_verify, enforce_https=False, - connection_cert=cert_info(), authentication_policy=FakeAuthenticationPolicy()) + client = ServiceFabricClientAPIs(CredentialProtocol(), endpoint=endpoint, retry_total=0, + connection_verify=no_verify, enforce_https=False, headers=headers, + connection_cert=cert_info(), authentication_policy=AuthenticationPolicy()) return client diff --git a/src/sfctl/auth.py b/src/sfctl/auth.py index 1653d9aa..3abc74f9 100644 --- a/src/sfctl/auth.py +++ b/src/sfctl/auth.py @@ -29,14 +29,14 @@ def get_aad_header(): return header -class FakeAuthenticationPolicy(SansIOHTTPPolicy): - """Fake authentication policy to avoid issues with token credentials being thrown in some scenaros""" +class AuthenticationPolicy(SansIOHTTPPolicy): + """Authentication policy to avoid issues with token credentials being thrown in some scenarios""" def __init__(self): pass -class FakeCredentialProtocol(TokenCredential): # pylint: disable=R0903 - """Fake credential used to pass in a credential for the API Client""" +class CredentialProtocol(TokenCredential): # pylint: disable=R0903 + """Credential used to pass in a credential for the API Client""" def __init__(self): # pylint: disable=super-init-not-called pass diff --git a/src/sfctl/custom_cluster.py b/src/sfctl/custom_cluster.py index 54baeea6..b6202e2c 100644 --- a/src/sfctl/custom_cluster.py +++ b/src/sfctl/custom_cluster.py @@ -14,7 +14,7 @@ from azure.servicefabric import ServiceFabricClientAPIs from knack.util import CLIError from knack.log import get_logger -from sfctl.auth import FakeAuthenticationPolicy, FakeCredentialProtocol, get_aad_header +from sfctl.auth import AuthenticationPolicy, CredentialProtocol, get_aad_header from sfctl.config import client_endpoint, SF_CLI_VERSION_CHECK_INTERVAL, get_cluster_auth, set_aad_cache, set_aad_metadata # pylint: disable=line-too-long from sfctl.state import get_sfctl_version from sfctl.custom_exceptions import SFCTLInternalException @@ -79,17 +79,17 @@ def _get_cert_based_client(endpoint, pem, cert, key, ca, no_verify): # pylint: d elif cert: client_cert = (cert, key) - return ServiceFabricClientAPIs(FakeCredentialProtocol(), endpoint=endpoint, retry_total=0, + return ServiceFabricClientAPIs(CredentialProtocol(), endpoint=endpoint, retry_total=0, connection_verify=no_verify, enforce_https=False, - connection_cert=client_cert, authentication_policy=FakeAuthenticationPolicy()) + connection_cert=client_cert, authentication_policy=AuthenticationPolicy()) def _get_aad_based_client(endpoint, no_verify): headers = {} headers['Authorization'] = get_aad_header() - return ServiceFabricClientAPIs(FakeCredentialProtocol(), endpoint=endpoint, retry_total=0, - connection_verify=no_verify, enforce_https=False, - authentication_policy=FakeAuthenticationPolicy()) + return ServiceFabricClientAPIs(CredentialProtocol(), endpoint=endpoint, retry_total=0, + connection_verify=no_verify, enforce_https=False, headers=headers, + authentication_policy=AuthenticationPolicy()) def _get_rest_client(endpoint, cert=None, key=None, pem=None, ca=None, # pylint: disable=invalid-name, too-many-arguments aad=False, no_verify=False):